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AAQ,CAACC,OAAO,CAAC,UAACC,IAAI,EAAK;IACvB;IACA,IAAIA,IAAI,CAACC,QAAQ,KAAK,CAAC,EAAE;MACrB,IAAI3C,oBAAoB,CAAC0C,IAAI,CAAC;IAClC;EACJ,CAAC,CAAC;AAEN","sources":["webpack://WebpackConfig.Web/./app/src/js/testimonials-carousel.js"],"sourcesContent":["import hunt from 'huntjs';\r\n// core swiper version + navigation, pagination modules:\r\nimport Swiper from 'swiper';\r\nimport { Navigation, Pagination, Autoplay } from 'swiper/modules';\r\n// swiper core styles\r\nimport 'swiper/css';\r\nimport 'swiper/css/pagination';\r\nimport 'swiper/css/navigation';\r\nimport 'swiper/css/autoplay';\r\n\r\nconst multiCarouselBreakpoints = {\r\n // when window width is >= 'md'\r\n 768: {\r\n spaceBetween: 20,\r\n slidesPerView: 2,\r\n },\r\n // when window width is >= 'lg'\r\n 992: {\r\n spaceBetween: 30,\r\n slidesPerView: 3,\r\n }\r\n};\r\n\r\nconst fullWidthMultiCarouselBreakpoints = {\r\n // when window width is >= 'md'\r\n 768: {\r\n spaceBetween: 20,\r\n slidesPerView: 3,\r\n },\r\n // when window width is >= 'lg'\r\n 992: {\r\n spaceBetween: 30,\r\n slidesPerView: 5,\r\n },\r\n // when window width is >= 'xxl'\r\n 2000: {\r\n slidesPerView: 7,\r\n }\r\n};\r\n\r\nclass testimonialsCarousel {\r\n\r\n constructor(el) {\r\n this.el = el;\r\n this.fullWidth = el.classList.contains('testimonials-carousel--full-width');\r\n this.containerAligned = this.fullWidth && el.classList.contains('testimonials-carousel--container-aligned');\r\n this.wrapper = el.querySelector('.swiper');\r\n this.prevBtn = el.querySelector('.testimonials-carousel--prev');\r\n this.nextBtn = el.querySelector('.testimonials-carousel--next');\r\n // autoplay?\r\n let autoplaySetting = null;\r\n let autoPlayDelay = 3000, // default 3 seconds\r\n findAutoplay = this.el.dataset.autoplay;\r\n if(typeof findAutoplay != 'undefined') {\r\n let parseAutoplay = parseInt(findAutoplay);\r\n if(parseAutoplay > 1000) autoPlayDelay = parseAutoplay;\r\n autoplaySetting = {\r\n delay: autoPlayDelay,\r\n }\r\n }\r\n if(this.wrapper != null) {\r\n // layout mode?\r\n if(this.el.classList.contains('testimonials-carousel--multiple')) {\r\n // multiple layout mode\r\n this.config = {\r\n // Optional parameters\r\n modules: [Pagination, Navigation, Autoplay],\r\n slidesPerView: this.fullWidth && !this.containerAligned ? 3 : 1,\r\n centerInsufficientSlides: !this.fullWidth || (this.fullWidth && this.containerAligned),\r\n loop: this.containerAligned ? false : true,\r\n spaceBetween: 20,\r\n breakpoints: this.fullWidth && !this.containerAligned ? fullWidthMultiCarouselBreakpoints : multiCarouselBreakpoints,\r\n // Pagination\r\n pagination: {\r\n el: el.querySelector('.swiper-pagination'),\r\n clickable: true,\r\n },\r\n // Navigation arrows\r\n navigation: {\r\n prevEl: this.prevBtn,\r\n nextEl: this.nextBtn\r\n },\r\n };\r\n if(autoplaySetting) this.config.autoplay = autoplaySetting;\r\n } else {\r\n // single layout mode\r\n this.config = {\r\n // Optional parameters\r\n modules: [Pagination, Navigation, Autoplay],\r\n slidesPerView: 1,\r\n centeredSlides: false,\r\n loop: true,\r\n // Pagination\r\n pagination: {\r\n el: el.querySelector('.swiper-pagination'),\r\n clickable: true,\r\n },\r\n // Navigation arrows\r\n navigation: {\r\n prevEl: this.prevBtn,\r\n nextEl: this.nextBtn\r\n },\r\n };\r\n if(autoplaySetting) this.config.autoplay = autoplaySetting;\r\n }\r\n this.swiper = new Swiper(this.wrapper, this.config);\r\n if(autoplaySetting) {\r\n this.swiper.autoplay.stop();\r\n // watch with hunt\r\n let _this = this;\r\n this.hunt = new hunt(this.el, {\r\n enter: function () {\r\n //console.log(`paused: ${_this.swiper.autoplay.running}`);\r\n if(!_this.swiper.autoplay.running) _this.swiper.autoplay.start();\r\n },\r\n leave: function () {\r\n //console.log(`running: ${_this.swiper.autoplay.running}`);\r\n if(_this.swiper.autoplay.running) _this.swiper.autoplay.stop();\r\n },\r\n persist: true\r\n });\r\n }\r\n }\r\n }\r\n\r\n}\r\n\r\n// export the default function to create\r\nexport function createFrom(wrappers) {\r\n\r\n wrappers.forEach((node) => {\r\n // if node is an element\r\n if (node.nodeType === 1) {\r\n new testimonialsCarousel(node);\r\n }\r\n });\r\n\r\n}\r\n"],"names":["hunt","Swiper","Navigation","Pagination","Autoplay","multiCarouselBreakpoints","spaceBetween","slidesPerView","fullWidthMultiCarouselBreakpoints","testimonialsCarousel","_createClass","el","_classCallCheck","fullWidth","classList","contains","containerAligned","wrapper","querySelector","prevBtn","nextBtn","autoplaySetting","autoPlayDelay","findAutoplay","dataset","autoplay","parseAutoplay","parseInt","delay","config","modules","centerInsufficientSlides","loop","breakpoints","pagination","clickable","navigation","prevEl","nextEl","centeredSlides","swiper","stop","_this","enter","running","start","leave","persist","createFrom","wrappers","forEach","node","nodeType"],"sourceRoot":""}