{"version":3,"sources":["webpack://@verndale/toolkit/./src/js/modules/logo-swiper-row.js"],"names":["_getRequireWildcardCache","nodeInterop","cacheBabelInterop","cacheNodeInterop","_interopRequireWildcard","obj","cache","newObj","hasPropertyDescriptor","key","desc","_swiper","Module","Component","slidesWidth","slide"],"mappings":"kJAGA,SAASA,EAAyBC,EAAa,CAAE,GAAI,OAAO,SAAY,WAAY,OAAO,KAAM,MAAMC,EAAoB,IAAI,QAAiBC,EAAmB,IAAI,QAAW,OAAQH,EAA2B,SAAUC,EAAa,CAAE,OAAOA,EAAcE,EAAmBD,CAAmB,GAAGD,CAAW,CAAG,CAG1T,SAASG,EAAwBC,EAAKJ,EAAa,CAAE,GAAI,CAACA,GAAeI,GAAOA,EAAI,WAAc,OAAOA,EAAO,GAAIA,IAAQ,MAAQ,OAAOA,GAAQ,UAAY,OAAOA,GAAQ,WAAc,MAAO,CAAE,QAASA,CAAI,EAAK,MAAMC,EAAQN,EAAyBC,CAAW,EAAG,GAAIK,GAASA,EAAM,IAAID,CAAG,EAAK,OAAOC,EAAM,IAAID,CAAG,EAAK,MAAME,EAAS,CAAC,EAASC,EAAwB,OAAO,gBAAkB,OAAO,yBAA0B,UAAWC,KAAOJ,EAAO,GAAII,IAAQ,WAAa,OAAO,UAAU,eAAe,KAAKJ,EAAKI,CAAG,EAAG,CAAE,MAAMC,EAAOF,EAAwB,OAAO,yBAAyBH,EAAKI,CAAG,EAAI,KAAUC,IAASA,EAAK,KAAOA,EAAK,KAAQ,OAAO,eAAeH,EAAQE,EAAKC,CAAI,EAAYH,EAAOE,GAAOJ,EAAII,EAAQ,CAAI,OAAAF,EAAO,QAAUF,EAASC,GAASA,EAAM,IAAID,EAAKE,CAAM,EAAYA,CAAQ,CAG7yB,MAAMI,EAAUP,EAAwB,EAAQ,KAAQ,CAAC,EAEzDO,EAAQ,QAAQ,IAAI,CAACA,EAAQ,QAAS,CAAC,EAEvC,MAAMC,UAAeC,WAAU,CAC7B,eAAgB,CAEd,KAAK,IAAM,CACT,IAAK,KAAK,GACV,QAAS,KAAK,GAAG,cAAc,cAAc,EAC7C,QAAS,KAAK,GAAG,iBAAiB,eAAe,EACjD,SAAU,KAAK,GAAG,cAAc,uBAAuB,CACzD,EAEA,IAAIC,EAAc,EAClB,KAAK,IAAI,QAAQ,QAASC,GAAU,CAClCD,GAAeC,EAAM,YACrBD,GAAe,EACjB,CAAC,EAED,KAAK,OAAS,KAEXA,EAAc,KAAK,IAAI,QAAQ,aAChC,KAAK,WAAW,CAEpB,CAEA,YAAa,CAEX,KAAK,OAAS,IAAIH,EAAQ,QAAQ,KAAK,IAAI,QAAS,CAChD,KAAM,GACN,aAAc,GACd,SAAU,CACR,MAAO,EACP,qBAAsB,EACxB,EACA,cAAe,OACf,MAAO,IACP,WAAY,GACZ,kBAAmB,GACnB,gBAAiB,EACnB,CAAC,EAEH,KAAK,IAAI,SAAS,iBAAiB,QAAS,IAAM,CAC7C,KAAK,OAAO,SAAS,SAAW,CAAC,KAAK,IAAI,SAAS,UAAU,SAAS,8BAA8B,GACrG,KAAK,OAAO,SAAS,KAAK,EAC1B,KAAK,IAAI,SAAS,UAAU,IAAI,8BAA8B,IAE9D,KAAK,OAAO,SAAS,MAAM,EAC3B,KAAK,IAAI,SAAS,UAAU,OAAO,8BAA8B,EAErE,CAAC,CACH,CACF,CAEA,UAAeC,C","file":"scripts/342.086a0906.js","sourcesContent":["import { Component } from '@verndale/core';\n\n// eslint-disable-next-line no-func-assign, no-shadow, func-names\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; const cacheBabelInterop = new WeakMap(); const cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\n// eslint-disable-next-line no-restricted-syntax\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } const cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } const newObj = {}; const hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (const key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { const desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\n// eslint-disable-next-line no-use-before-define, import/no-extraneous-dependencies\nconst _swiper = _interopRequireWildcard(require(\"swiper\"));\n\n_swiper.default.use([_swiper.Autoplay,]);\n\nclass Module extends Component {\n setupDefaults() {\n\n this.dom = {\n $el: this.el,\n $swiper: this.el.querySelector('.logo-swiper'),\n $slides: this.el.querySelectorAll('.swiper-slide'),\n $control: this.el.querySelector('.logo-swiper__control')\n };\n\n let slidesWidth = 0;\n this.dom.$slides.forEach((slide) => {\n slidesWidth += slide.offsetWidth;\n slidesWidth += 60;\n });\n\n this.swiper = null;\n\n if(slidesWidth > this.dom.$swiper.offsetWidth) {\n this.initSwiper();\n }\n }\n\n initSwiper() {\n // eslint-disable-next-line\n this.slider = new _swiper.default(this.dom.$swiper, {\n loop: true,\n spaceBetween: 60,\n autoplay: {\n delay: 1,\n disableOnInteraction: false\n },\n slidesPerView: 'auto',\n speed: 2000,\n grabCursor: true,\n mousewheelControl: true,\n keyboardControl: true\n });\n\n this.dom.$control.addEventListener('click', () => {\n if(this.slider.autoplay.running && !this.dom.$control.classList.contains('logo-swiper__control--paused')) {\n this.slider.autoplay.stop();\n this.dom.$control.classList.add('logo-swiper__control--paused');\n } else {\n this.slider.autoplay.start();\n this.dom.$control.classList.remove('logo-swiper__control--paused');\n }\n });\n }\n}\n\nexport default Module;\n"],"sourceRoot":""}