{"version":3,"file":"4123.72f376e3b08c1a745b8b.js","mappings":"2LAMA,MAAMA,EAEFC,WAAAA,CAAYC,GACRC,KAAKD,GAAKA,EACVC,KAAKC,cAAgBF,EAAGG,cAAc,sBACtCF,KAAKG,QAAUJ,EAAGG,cAAc,oBAChCF,KAAKI,QAAUL,EAAGG,cAAc,oBAEhCF,KAAKK,OAAS,IAAIC,EAAAA,GAAON,KAAKD,GAAI,CAE9BQ,QAAS,CAACC,EAAAA,GAAWC,EAAAA,IACrBC,cAAe,EACfC,gBAAgB,EAChBC,MAAM,EACNC,aAAc,GACdC,gBAAiB,YACjBC,YAAa,CAET,IAAK,CACDL,cAAe,GAGnB,IAAM,CACFA,cAAe,IAIvBM,WAAY,CACRjB,GAAIC,KAAKC,cACTgB,WAAW,GAGfC,WAAY,CACRC,OAAQnB,KAAKG,QACbiB,OAAQpB,KAAKI,UAGzB,EAIG,SAASiB,EAAWC,GACvBA,EAASC,SAASC,IAEQ,IAAlBA,EAAKC,UACL,IAAI5B,EAAa2B,EACrB,GAER,C","sources":["webpack://National Motor Museum Trust/./wwwroot/app/src/js/panels-swiper.js"],"sourcesContent":["// core version + navigation, pagination modules:\r\nimport Swiper, { Navigation, Pagination } from 'swiper';\r\n// swiper core styles\r\nimport 'swiper/css';\r\nimport 'swiper/css/pagination';\r\n\r\nclass PanelsSwiper {\r\n\r\n constructor(el) {\r\n this.el = el;\r\n this.paginationDiv = el.querySelector('.swiper-pagination');\r\n this.prevBtn = el.querySelector('.swiper-prev-btn');\r\n this.nextBtn = el.querySelector('.swiper-next-btn');\r\n // create swiper\r\n this.swiper = new Swiper(this.el, {\r\n // Optional parameters\r\n modules: [Navigation,Pagination],\r\n slidesPerView: 1,\r\n centeredSlides: false,\r\n loop: true,\r\n spaceBetween: 32,\r\n breakpointsBase: 'container', // use width of swiper element rather than window width\r\n breakpoints: {\r\n // when swiper width is >= 700\r\n 700: {\r\n slidesPerView: 2\r\n },\r\n // when swiper width is >= 1000\r\n 1000: {\r\n slidesPerView: 3\r\n }\r\n },\r\n // Pagination container\r\n pagination: {\r\n el: this.paginationDiv,\r\n clickable: true,\r\n },\r\n // Navigation buttons\r\n navigation: {\r\n prevEl: this.prevBtn,\r\n nextEl: this.nextBtn\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 wrappers.forEach((node) => {\r\n // if node is an element\r\n if (node.nodeType === 1) {\r\n new PanelsSwiper(node);\r\n }\r\n });\r\n}\r\n"],"names":["PanelsSwiper","constructor","el","this","paginationDiv","querySelector","prevBtn","nextBtn","swiper","Swiper","modules","Navigation","Pagination","slidesPerView","centeredSlides","loop","spaceBetween","breakpointsBase","breakpoints","pagination","clickable","navigation","prevEl","nextEl","createFrom","wrappers","forEach","node","nodeType"],"sourceRoot":""}