1import"@archetype-themes/scripts/config";import"@archetype-themes/scripts/helpers/init-observer";import{Slideshow}from"@archetype-themes/scripts/modules/slideshow";class Testimonials extends HTMLElement{constructor(){super(),this.defaults={adaptiveHeight:!0,avoidReflow:!0,pageDots:!0,prevNextButtons:!1},this.container=this,this.timeout,this.sectionId=this.container.getAttribute("data-section-id"),this.slideshow=this.container.querySelector(`#Testimonials-${this.sectionId}`),this.namespace=`.testimonial-${this.sectionId}`,this.slideshow&&(document.dispatchEvent(new CustomEvent("testimonials:loaded",{detail:{sectionId:this.sectionId}})),this.addEventListener("shopify:section:deselect",this.onDeselect),this.addEventListener("shopify:block:select",this.onBlockSelect),this.addEventListener("shopify:block:deselect",this.onBlockDeselect),theme.initWhenVisible({element:this.container,callback:this.init.bind(this),threshold:600}))}init(){this.slideshow.dataset.count<=3&&(this.defaults.wrapAround=!1),this.flickity=new Slideshow(this.slideshow,this.defaults),this.slideshow.dataset.count>2&&(this.timeout=setTimeout(function(){this.flickity.goToSlide(1)}.bind(this),1e3))}disconnectedCallback(){this.flickity&&typeof this.flickity.destroy=="function"&&this.flickity.destroy()}onDeselect(){this.flickity&&typeof this.flickity.play=="function"&&this.flickity.play()}onBlockSelect(evt){const slide=this.slideshow.querySelector(`.testimonials-slide--${evt.detail.blockId}`),index=parseInt(slide.dataset.index);clearTimeout(this.timeout),this.flickity&&typeof this.flickity.pause=="function"&&(this.flickity.goToSlide(index),this.flickity.pause())}onBlockDeselect(){this.flickity&&typeof this.flickity.play=="function"&&this.flickity.play()}}customElements.define("testimonials-component",Testimonials); 2//# sourceMappingURL=/cdn/shop/t/15/assets/section-testimonials.js.map?v=135504612583298795321784285599
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.