{"version":3,"sources":["webpack:///./src/js/utils/slider.js","webpack:///./src/js/components/upcoming-events-slider.js","webpack:///./src/js/components/upcoming-events.js"],"names":["hideFocusableElementsinSlide","$slide","_$$","focusableElements","forEach","$element","setAttribute","disableFocusOnHiddenSlides","$slides","$selectedSlide","find","classList","contains","removeAttribute","getGenericSliderConfig","element","heading","textDefault","arguments","length","undefined","slides","querySelectorAll","pager","querySelector","prevButton","nextButton","a11y","enabled","nextSlideMessage","concat","textContent","replace","trim","prevSlideMessage","paginationBulletMessage","keyboard","onlyInViewport","watchSlidesProgress","watchSlidesVisibility","slideToClickedSlide","observer","allowTouchMove","pagination","dynamicBullets","clickable","el","bulletClass","bulletActiveClass","modifierClass","navigation","nextEl","prevEl","watchOverflow","UpcomingEventsSlider","_Component","_classCallCheck","_callSuper","_inherits","key","value","this","dom","resetSlider","breakpoints","addBreakpointListenerLg","bind","swiper","destroy","initSlider","Swiper","_objectSpread","slidesPerView","slidesPerColumn","slidesPerColumnFill","observeParents","_defineProperty","tablet","lg","on","init","remove","add","Component","UpcomingEvents","$swiperContainers","container"],"mappings":"wNAIMA,EAA+B,SAACC,GACTA,EAAOC,IAAIC,KACnBC,SAAQ,SAACC,GAAQ,OAClCA,EAASC,aAAa,WAAY,UAWzBC,EAA6B,SAACC,GACzCA,EAAQJ,QAAQJ,GAChB,IAAMS,EAAiBD,EAAQE,MAAK,SAACT,GAAM,OACzCA,EAAOU,UAAUC,SAAS,0BAECH,EAXKP,IAAIC,KACnBC,SAAQ,SAACC,GAAQ,OAClCA,EAASQ,gBAAgB,gBAYhBC,EAAyB,SAACC,EAASC,GAA8B,IAArBC,EAAWC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GAC/DG,EAASN,EAAQO,iBAAiB,iBAClCC,EAAQR,EAAQS,cAAc,sBAC9BC,EAAaV,EAAQS,cAAc,uBACnCE,EAAaX,EAAQS,cAAc,uBAEzC,MAAO,CACLG,KAAM,CACJC,SAAS,EACT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C3BzD,YAAuBC,EAAS,KAAM,oBAAkB,IAC3DyD,cAAe,EACfC,gBAAiB,EACjBC,oBAAqB,MACrBjC,UAAU,EACVkC,gBAAgB,EAChBX,YAAWY,IAAA,GACRZ,IAAYa,OAAS,CACpBrC,qBAAqB,EACrBiC,gBAAiB,EACjBC,oBAAqB,SACrBF,cAAe,IAEhBR,IAAYc,GAAK,CAChBtC,qBAAqB,EACrBiC,gBAAiB,EACjBC,oBAAqB,MACrBF,cAAe,IAGnBO,GAAI,CACFC,KAAI,WACFnB,KAAKf,GAAGnC,UAAUsE,OAAO,WACzBpB,KAAKf,GAAGnC,UAAUuE,IAAI,qB,0FAlDR,CAASC,a,sjDCJyB,IAEtDC,EAAc,SAAA7B,GAAA,SAAA6B,IAAA,OAAA5B,EAAA,KAAA4B,GAAA3B,EAAA,KAAA2B,EAAAlE,WAAA,O,qRAAAwC,CAAA0B,EAAA7B,G,EAAA6B,G,EAAA,EAAAzB,IAAA,gBAAAC,MAClB,WACEC,KAAKC,IAAM,CACTuB,kBAAmBxB,KAAKf,GAAG5C,IAAI,sBAGjC2D,KAAKC,IAAIuB,kBAAkBjF,SACzB,SAACkF,GAAS,OAAK,IAAIhC,EAAqBgC,W,0FAP1B,CAASH,aAYdC","file":"51.f4b538.js","sourcesContent":["/* eslint-disable indent */\r\nimport breakpoints from './breakpoints';\r\nimport focusableElements from './focusable-elements';\r\n\r\nconst hideFocusableElementsinSlide = ($slide) => {\r\n const $focusableElements = $slide._$$(focusableElements);\r\n $focusableElements.forEach(($element) =>\r\n $element.setAttribute('tabindex', '-1')\r\n );\r\n};\r\n\r\nconst showFocusableElementsinSlide = ($slide) => {\r\n const $focusableElements = $slide._$$(focusableElements);\r\n $focusableElements.forEach(($element) =>\r\n $element.removeAttribute('tabindex')\r\n );\r\n};\r\n\r\nexport const disableFocusOnHiddenSlides = ($slides) => {\r\n $slides.forEach(hideFocusableElementsinSlide);\r\n const $selectedSlide = $slides.find(($slide) =>\r\n $slide.classList.contains('swiper-slide-active')\r\n );\r\n showFocusableElementsinSlide($selectedSlide);\r\n};\r\n\r\nexport const getGenericSliderConfig = (element, heading, textDefault = '') => {\r\n const slides = element.querySelectorAll('.swiper-slide');\r\n const pager = element.querySelector('.swiper-pagination');\r\n const prevButton = element.querySelector('.swiper-button-prev');\r\n const nextButton = element.querySelector('.swiper-button-next');\r\n\r\n return {\r\n a11y: {\r\n enabled: true,\r\n nextSlideMessage: `Go to ${\r\n heading\r\n ? `${heading.textContent\r\n .replace(/(\\r\\n|\\n|\\r)/gm, '')\r\n .replace(/\\s+/g, ' ')\r\n .trim()}`\r\n : textDefault\r\n } next slide`,\r\n prevSlideMessage: `Go to ${\r\n heading\r\n ? `${heading.textContent\r\n .replace(/(\\r\\n|\\n|\\r)/gm, '')\r\n .replace(/\\s+/g, ' ')\r\n .trim()}`\r\n : textDefault\r\n } previous slide`,\r\n paginationBulletMessage: `Go to ${\r\n heading\r\n ? `${heading.textContent\r\n .replace(/(\\r\\n|\\n|\\r)/gm, '')\r\n .replace(/\\s+/g, ' ')\r\n .trim()}`\r\n : textDefault\r\n } slide {{index}} of ${slides.length}`\r\n },\r\n keyboard: {\r\n enabled: true,\r\n onlyInViewport: true\r\n },\r\n watchSlidesProgress: true,\r\n watchSlidesVisibility: true,\r\n slideToClickedSlide: false,\r\n observer: true,\r\n allowTouchMove: true,\r\n pagination: {\r\n dynamicBullets: true,\r\n clickable: true,\r\n el: pager,\r\n bulletClass: 'swiper-bullet',\r\n bulletActiveClass: 'swiper-bullet--active',\r\n modifierClass: 'swiper-bullet--'\r\n },\r\n navigation: {\r\n nextEl: nextButton,\r\n prevEl: prevButton\r\n },\r\n watchOverflow: true\r\n };\r\n};\r\n","import { Component } from '@verndale/core';\r\nimport Swiper from 'swiper/js/swiper';\r\n\r\nimport breakpoints from '../utils/breakpoints';\r\nimport { getGenericSliderConfig } from '../utils/slider';\r\n\r\nclass UpcomingEventsSlider extends Component {\r\n setupDefaults() {\r\n this.dom = {\r\n $slides: this.el._$$('.swiper-slide')\r\n };\r\n\r\n this.resetSlider();\r\n }\r\n\r\n addListeners() {\r\n breakpoints.addBreakpointListenerLg(::this.resetSlider);\r\n }\r\n\r\n resetSlider() {\r\n if (this.swiper) {\r\n this.swiper.destroy();\r\n this.swiper = null;\r\n }\r\n\r\n this.initSlider();\r\n }\r\n\r\n initSlider() {\r\n const element = this.el;\r\n\r\n if (!this.swiper) {\r\n this.swiper = new Swiper(this.el, {\r\n ...getGenericSliderConfig(element, null, 'Upcoming Events'),\r\n slidesPerView: 1,\r\n slidesPerColumn: 2,\r\n slidesPerColumnFill: 'row',\r\n observer: true,\r\n observeParents: true,\r\n breakpoints: {\r\n [breakpoints.tablet]: {\r\n slideToClickedSlide: false,\r\n slidesPerColumn: 1,\r\n slidesPerColumnFill: 'column',\r\n slidesPerView: 3\r\n },\r\n [breakpoints.lg]: {\r\n slideToClickedSlide: false,\r\n slidesPerColumn: 2,\r\n slidesPerColumnFill: 'row',\r\n slidesPerView: 4\r\n }\r\n },\r\n on: {\r\n init() {\r\n this.el.classList.remove('loading');\r\n this.el.classList.add('loaded');\r\n }\r\n }\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport default UpcomingEventsSlider;\r\n","import { Component } from '@verndale/core';\r\n\r\nimport UpcomingEventsSlider from './upcoming-events-slider';\r\n\r\nclass UpcomingEvents extends Component {\r\n setupDefaults() {\r\n this.dom = {\r\n $swiperContainers: this.el._$$('.swiper-container')\r\n };\r\n\r\n this.dom.$swiperContainers.forEach(\r\n (container) => new UpcomingEventsSlider(container)\r\n );\r\n }\r\n}\r\n\r\nexport default UpcomingEvents;\r\n"],"sourceRoot":""}