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gB,EAChBtC,WAAY,CACRuC,GAAIP,EAAQ/B,cAAc,sEAC1BuC,KAAM,WACNC,sBAAuB,SAAUC,GAC7B,OAAOA,EAAOC,WAAWC,SAAS,EAAG,IACzC,EACAC,oBAAqB,SAAUH,GAC3B,OAAOA,EAAOC,WAAWC,SAAS,EAAG,IACzC,GAEJpC,WAAY,CACRC,OAAQuB,EAAQ/B,cAAc,mCAC9BS,OAAQsB,EAAQ/B,cAAc,mCAElCa,MAAM,GACR,G","sources":["webpack://wwwroot/./src/scripts/lockupIconTeaserCarrousel.js"],"sourcesContent":["import { Swiper, Navigation, Keyboard, A11y, Pagination } from 'swiper';\r\n\r\nconst lockupIconTeaserCarouselSections = document.querySelectorAll(\".adm-section-c31-carousel\");\r\n\r\nfor (const lockupSection of lockupIconTeaserCarouselSections) {\r\n setTimeout(() => { // Next frame delay - time for SVG to be injected\r\n const pagination = lockupSection.querySelector(\".adm-c31-carousel-span-selected\");\r\n const swiperc31 = new Swiper(lockupSection.firstElementChild, {\r\n modules: [Navigation, Keyboard, A11y],\r\n direction: \"vertical\",\r\n loop: true,\r\n noSwiping: true,\r\n navigation: {\r\n nextEl: lockupSection.querySelector(\".adm-btn-c31-carousel-arrow-down\"),\r\n prevEl: lockupSection.querySelector(\".adm-btn-c31-carousel-arrow-up\")\r\n },\r\n keyboard: {\r\n enabled: true,\r\n onlyInViewPort: false\r\n },\r\n a11y: false,\r\n });\r\n\r\n swiperc31.on(\"realIndexChange\", () => adjustPagination(swiperc31, pagination));\r\n addTabIndexToSlides(swiperc31);\r\n }, 200);\r\n}\r\n\r\nfunction adjustPagination(swiperc31, pagination) {\r\n if (swiperc31.realIndex < 10) {\r\n pagination.innerHTML = `0${swiperc31.realIndex + 1}`;\r\n } else {\r\n pagination.innerHTML = swiperc31.realIndex + 1;\r\n }\r\n setTimeout(() => addTabIndexToSlides(swiperc31), 200);\r\n}\r\n\r\n//keyboard accessibility\r\nfunction addTabIndexToSlides(swiperc31) {\r\n for (const slide of swiperc31.slides) {\r\n const allLinks = slide.querySelectorAll(\"a\");\r\n if (slide.classList.contains(\"swiper-slide-active\")) {\r\n slide.setAttribute(\"tabindex\", \"0\");\r\n for (const link of allLinks) {\r\n link.setAttribute(\"tabindex\", \"0\");\r\n }\r\n } else {\r\n slide.setAttribute(\"tabindex\", \"-1\");\r\n for (const link of allLinks) {\r\n link.setAttribute(\"tabindex\", \"-1\");\r\n }\r\n }\r\n }\r\n}\r\n\r\n//mobile swiper\r\nconst lockupIconTeaserCarouselSectionsMobile = document.querySelectorAll(\".adm-section-c31-carousel-mobile\");\r\nArray.prototype.forEach.call(lockupIconTeaserCarouselSectionsMobile, (section, index) => {\r\n section.classList.add(`section-${index}`);\r\n new Swiper(`.adm-section-c31-carousel-mobile.section-${index} .swiper`,\r\n {\r\n modules: [Navigation, A11y, Pagination],\r\n slidesPerView: 4,\r\n spaceBetween: 24,\r\n slidesPerGroup: 1,\r\n centeredSlides: true,\r\n pagination: {\r\n el: section.querySelector(\".adm-div-c31-slider-mobile-controls .adm-div-c31-slider-pagination\"),\r\n type: \"fraction\",\r\n formatFractionCurrent: function (number) {\r\n return number.toString().padStart(2, '0')\r\n },\r\n formatFractionTotal: function (number) {\r\n return number.toString().padStart(2, '0')\r\n }\r\n },\r\n navigation: {\r\n nextEl: section.querySelector(\".adm-div-c31-slider-right-arrow\"),\r\n prevEl: section.querySelector(\".adm-div-c31-slider-left-arrow\"),\r\n },\r\n a11y: false,\r\n });\r\n});"],"names":["lockupIconTeaserCarouselSections","document","querySelectorAll","lockupSection","setTimeout","pagination","querySelector","swiperc31","firstElementChild","modules","direction","loop","noSwiping","navigation","nextEl","prevEl","keyboard","enabled","onlyInViewPort","a11y","on","adjustPagination","addTabIndexToSlides","realIndex","innerHTML","slide","slides","allLinks","classList","contains","setAttribute","link","lockupIconTeaserCarouselSectionsMobile","Array","prototype","forEach","call","section","index","add","slidesPerView","spaceBetween","slidesPerGroup","centeredSlides","el","type","formatFractionCurrent","number","toString","padStart","formatFractionTotal"],"sourceRoot":""}