{"version":3,"file":"main.js","sources":["../../../src/components/helpers.js","../../../../node_modules/vanilla-lazyload/dist/lazyload.esm.js","../../../src/components/lazy.js","../../../src/components/paralax.js","../../../src/components/reveal.js","../../../src/components/anim.js","../../../src/components/sidewindow.js","../../../src/components/accordion.js","../../../src/components/equalheight.js","../../../src/components/youtube-loader.js","../../../../node_modules/axios/lib/helpers/bind.js","../../../../node_modules/axios/lib/utils.js","../../../../node_modules/axios/lib/core/AxiosError.js","../../../../node_modules/form-data/lib/browser.js","../../../../node_modules/axios/lib/env/classes/FormData.js","../../../../node_modules/axios/lib/helpers/toFormData.js","../../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../../../node_modules/axios/lib/helpers/buildURL.js","../../../../node_modules/axios/lib/core/InterceptorManager.js","../../../../node_modules/axios/lib/helpers/normalizeHeaderName.js","../../../../node_modules/axios/lib/defaults/transitional.js","../../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../../../node_modules/axios/lib/platform/browser/classes/FormData.js","../../../../node_modules/axios/lib/platform/browser/index.js","../../../../node_modules/axios/lib/platform/index.js","../../../../node_modules/axios/lib/helpers/toURLEncodedForm.js","../../../../node_modules/axios/lib/helpers/formDataToJSON.js","../../../../node_modules/axios/lib/core/settle.js","../../../../node_modules/axios/lib/helpers/cookies.js","../../../../node_modules/axios/lib/helpers/isAbsoluteURL.js","../../../../node_modules/axios/lib/helpers/combineURLs.js","../../../../node_modules/axios/lib/core/buildFullPath.js","../../../../node_modules/axios/lib/helpers/parseHeaders.js","../../../../node_modules/axios/lib/helpers/isURLSameOrigin.js","../../../../node_modules/axios/lib/cancel/CanceledError.js","../../../../node_modules/axios/lib/helpers/parseProtocol.js","../../../../node_modules/axios/lib/adapters/xhr.js","../../../../node_modules/axios/lib/defaults/index.js","../../../../node_modules/axios/lib/core/transformData.js","../../../../node_modules/axios/lib/cancel/isCancel.js","../../../../node_modules/axios/lib/core/dispatchRequest.js","../../../../node_modules/axios/lib/core/mergeConfig.js","../../../../node_modules/axios/lib/env/data.js","../../../../node_modules/axios/lib/helpers/validator.js","../../../../node_modules/axios/lib/core/Axios.js","../../../../node_modules/axios/lib/cancel/CancelToken.js","../../../../node_modules/axios/lib/helpers/spread.js","../../../../node_modules/axios/lib/helpers/isAxiosError.js","../../../../node_modules/axios/lib/axios.js","../../../../node_modules/axios/index.js","../../../src/components/navigation.js","../../../src/components/accordion-micro.js","../../../src/components/polyfills.js","../../../../node_modules/pikaday/pikaday.js","../../../../node_modules/element-data-store/src/element-data-store.js","../../../src/components/searchfilters.js","../../../src/components/tabs.js","../../../src/components/tabaccordions.js","../../../../node_modules/slim-select/dist/slimselect.min.mjs","../../../src/components/select.js","../../../src/components/tasksequence.js","../../../../node_modules/hammerjs/hammer.min.js","../../../src/components/carousel.js","../../../../node_modules/ssr-window/ssr-window.esm.js","../../../../node_modules/dom7/dom7.esm.js","../../../../node_modules/swiper/esm/utils/dom.js","../../../../node_modules/swiper/esm/utils/utils.js","../../../../node_modules/swiper/esm/utils/get-support.js","../../../../node_modules/swiper/esm/utils/get-device.js","../../../../node_modules/swiper/esm/utils/get-browser.js","../../../../node_modules/swiper/esm/modules/resize/resize.js","../../../../node_modules/swiper/esm/modules/observer/observer.js","../../../../node_modules/swiper/esm/components/core/modular.js","../../../../node_modules/swiper/esm/components/core/events-emitter.js","../../../../node_modules/swiper/esm/components/core/update/updateSize.js","../../../../node_modules/swiper/esm/components/core/update/updateSlides.js","../../../../node_modules/swiper/esm/components/core/update/updateAutoHeight.js","../../../../node_modules/swiper/esm/components/core/update/updateSlidesOffset.js","../../../../node_modules/swiper/esm/components/core/update/updateSlidesProgress.js","../../../../node_modules/swiper/esm/components/core/update/updateProgress.js","../../../../node_modules/swiper/esm/components/core/update/updateSlidesClasses.js","../../../../node_modules/swiper/esm/components/core/update/updateActiveIndex.js","../../../../node_modules/swiper/esm/components/core/update/updateClickedSlide.js","../../../../node_modules/swiper/esm/components/core/update/index.js","../../../../node_modules/swiper/esm/components/core/translate/getTranslate.js","../../../../node_modules/swiper/esm/components/core/translate/setTranslate.js","../../../../node_modules/swiper/esm/components/core/translate/minTranslate.js","../../../../node_modules/swiper/esm/components/core/translate/maxTranslate.js","../../../../node_modules/swiper/esm/components/core/translate/translateTo.js","../../../../node_modules/swiper/esm/components/core/translate/index.js","../../../../node_modules/swiper/esm/components/core/transition/setTransition.js","../../../../node_modules/swiper/esm/components/core/transition/transitionStart.js","../../../../node_modules/swiper/esm/components/core/transition/transitionEnd.js","../../../../node_modules/swiper/esm/components/core/transition/index.js","../../../../node_modules/swiper/esm/components/core/slide/slideTo.js","../../../../node_modules/swiper/esm/components/core/slide/slideToLoop.js","../../../../node_modules/swiper/esm/components/core/slide/slideNext.js","../../../../node_modules/swiper/esm/components/core/slide/slidePrev.js","../../../../node_modules/swiper/esm/components/core/slide/slideReset.js","../../../../node_modules/swiper/esm/components/core/slide/slideToClosest.js","../../../../node_modules/swiper/esm/components/core/slide/slideToClickedSlide.js","../../../../node_modules/swiper/esm/components/core/slide/index.js","../../../../node_modules/swiper/esm/components/core/loop/loopCreate.js","../../../../node_modules/swiper/esm/components/core/loop/loopFix.js","../../../../node_modules/swiper/esm/components/core/loop/loopDestroy.js","../../../../node_modules/swiper/esm/components/core/loop/index.js","../../../../node_modules/swiper/esm/components/core/grab-cursor/setGrabCursor.js","../../../../node_modules/swiper/esm/components/core/grab-cursor/unsetGrabCursor.js","../../../../node_modules/swiper/esm/components/core/grab-cursor/index.js","../../../../node_modules/swiper/esm/components/core/manipulation/appendSlide.js","../../../../node_modules/swiper/esm/components/core/manipulation/prependSlide.js","../../../../node_modules/swiper/esm/components/core/manipulation/addSlide.js","../../../../node_modules/swiper/esm/components/core/manipulation/removeSlide.js","../../../../node_modules/swiper/esm/components/core/manipulation/removeAllSlides.js","../../../../node_modules/swiper/esm/components/core/manipulation/index.js","../../../../node_modules/swiper/esm/components/core/events/onTouchStart.js","../../../../node_modules/swiper/esm/components/core/events/onTouchMove.js","../../../../node_modules/swiper/esm/components/core/events/onTouchEnd.js","../../../../node_modules/swiper/esm/components/core/events/onResize.js","../../../../node_modules/swiper/esm/components/core/events/onClick.js","../../../../node_modules/swiper/esm/components/core/events/onScroll.js","../../../../node_modules/swiper/esm/components/core/events/index.js","../../../../node_modules/swiper/esm/components/core/breakpoints/setBreakpoint.js","../../../../node_modules/swiper/esm/components/core/breakpoints/getBreakpoint.js","../../../../node_modules/swiper/esm/components/core/breakpoints/index.js","../../../../node_modules/swiper/esm/components/core/classes/addClasses.js","../../../../node_modules/swiper/esm/components/core/classes/removeClasses.js","../../../../node_modules/swiper/esm/components/core/classes/index.js","../../../../node_modules/swiper/esm/components/core/images/loadImage.js","../../../../node_modules/swiper/esm/components/core/images/preloadImages.js","../../../../node_modules/swiper/esm/components/core/images/index.js","../../../../node_modules/swiper/esm/components/core/check-overflow/index.js","../../../../node_modules/swiper/esm/components/core/defaults.js","../../../../node_modules/swiper/esm/components/core/core-class.js","../../../../node_modules/swiper/esm/components/virtual/virtual.js","../../../../node_modules/swiper/esm/components/keyboard/keyboard.js","../../../../node_modules/swiper/esm/components/mousewheel/mousewheel.js","../../../../node_modules/swiper/esm/components/navigation/navigation.js","../../../../node_modules/swiper/esm/components/pagination/pagination.js","../../../../node_modules/swiper/esm/components/scrollbar/scrollbar.js","../../../../node_modules/swiper/esm/components/parallax/parallax.js","../../../../node_modules/swiper/esm/components/zoom/zoom.js","../../../../node_modules/swiper/esm/components/lazy/lazy.js","../../../../node_modules/swiper/esm/components/controller/controller.js","../../../../node_modules/swiper/esm/components/a11y/a11y.js","../../../../node_modules/swiper/esm/components/history/history.js","../../../../node_modules/swiper/esm/components/hash-navigation/hash-navigation.js","../../../../node_modules/swiper/esm/components/autoplay/autoplay.js","../../../../node_modules/swiper/esm/components/effect-fade/effect-fade.js","../../../../node_modules/swiper/esm/components/effect-cube/effect-cube.js","../../../../node_modules/swiper/esm/components/effect-flip/effect-flip.js","../../../../node_modules/swiper/esm/components/effect-coverflow/effect-coverflow.js","../../../../node_modules/swiper/esm/components/thumbs/thumbs.js","../../../../node_modules/swiper/swiper-bundle.esm.js","../../../src/components/gallery.js","../../../src/components/facetfilters.js","../../../src/components/sticky.js","../../../src/components/maps.js","../../../src/components/cookiebar.js","../../../src/components/contentpage-sticky.js","../../../src/components/sticky-courses.js","../../../src/components/emergencyannouncement.js","../../../src/components/page-selector-micro.js","../../../../node_modules/leaflet/dist/leaflet-src.js","../../../src/components/image-map.js","../../../src/components/image-map-zoom.js","../../../src/components/keyboard-trap.js","../../../src/components/vertical-scroll-carousel.js","../../../src/components/multi-column-links-arias.js","../../../src/components/sg-tabbed-images.js","../../../src/components/media-block.js","../../../src/components/cards.js","../../../src/components/librarysearch.js","../../../src/components/facetfilters-db-cards.js","../../../src/components/facetfilters-buttons.js","../../../src/components/libraryreporting.js","../../../src/components/add-share.js","../../../src/components/timeline.js","../../../src/components/accomm-card-with-carousel.js","../../../src/components/video-button.js","../../../src/components/news-carousel.js","../../../src/components/worktribe.js","../../../src/components/award-badges.js","../../../src/main.js"],"sourcesContent":["export default (function () {\r\n return {\r\n breakpoint(el) {\r\n const element = el === null || el === undefined ? document.getElementsByTagName('body')[0] : el;\r\n\r\n if (window.getComputedStyle) {\r\n return window.getComputedStyle(element, ':before').getPropertyValue('content').replace(/'|\"/g, '');\r\n }\r\n\r\n return false;\r\n },\r\n setAttributes(el, attrs) {\r\n const setAttr = function (element) {\r\n Object.keys(attrs).forEach((key) => {\r\n element.setAttribute(key, attrs[key]);\r\n });\r\n };\r\n\r\n if (this.isNodeList(el)) {\r\n this.forEach(el, (i, val) => {\r\n setAttr(val);\r\n });\r\n } else {\r\n setAttr(el);\r\n }\r\n },\r\n removeAttribute(el, attr) {\r\n const remAttr = function (element) {\r\n element.removeAttribute(attr);\r\n };\r\n\r\n if (this.isNodeList(el)) {\r\n this.forEach(el, (i, val) => {\r\n remAttr(val);\r\n });\r\n } else {\r\n remAttr(el);\r\n }\r\n },\r\n triggerEvent(el, type) {\r\n if ('createEvent' in document) {\r\n // modern browsers, IE9+\r\n const e = document.createEvent('HTMLEvents');\r\n e.initEvent(type, false, true);\r\n el.dispatchEvent(e);\r\n } else {\r\n // IE 8\r\n const e = document.createEventObject();\r\n e.eventType = type;\r\n el.fireEvent(`on${e.eventType}`, e);\r\n }\r\n },\r\n // helper for enabling IE 8 event bindings\r\n addEvent(el, type, handler) {\r\n const addEvent = function (event) {\r\n if (el.attachEvent) el.attachEvent(`on${type}`, handler); else el.addEventListener(type, handler);\r\n };\r\n if (type.indexOf(' ') > 0) {\r\n const events = type.split(' ');\r\n for (let i = 0; i < events.length; i++) {\r\n addEvent(events[i]);\r\n }\r\n } else {\r\n addEvent(type);\r\n }\r\n },\r\n hasClass(el, className) {\r\n if (el === null) return false;\r\n return el.classList ? el.classList.contains(className) : new RegExp(`\\\\b${className}\\\\b`).test(el.className);\r\n },\r\n addClass(el, sClass) {\r\n const addClass = function (element) {\r\n const classArray = sClass.split(' ');\r\n for (let i = 0; i < classArray.length; i++) {\r\n if (element.classList) element.classList.add(classArray[i]);\r\n else if (!this.hasClass(el, classArray[i])) element.className += ` ${classArray[i]}`;\r\n }\r\n };\r\n if (this.isNodeList(el)) {\r\n this.forEach(el, (i, val) => {\r\n addClass(val);\r\n });\r\n } else {\r\n addClass(el);\r\n }\r\n },\r\n removeClass(el, sClass) {\r\n const removeClass = function (element) {\r\n const classArray = sClass.split(' ');\r\n for (let i = 0; i < classArray.length; i++) {\r\n if (element.classList) element.classList.remove(classArray[i]);\r\n else element.className = element.className.replace(new RegExp(`\\\\b${classArray[i]}\\\\b`, 'g'), '');\r\n }\r\n };\r\n\r\n if (this.isNodeList(el)) {\r\n this.forEach(el, (i, val) => {\r\n removeClass(val);\r\n });\r\n } else {\r\n removeClass(el);\r\n }\r\n },\r\n toggleClass(el, sClass) {\r\n const toggleClass = function (element) {\r\n const classArray = sClass.split(' ');\r\n for (let i = 0; i < classArray.length; i++) {\r\n if (element.classList) {\r\n element.classList.toggle(classArray[i]);\r\n } else {\r\n const classes = element.className.split(' ');\r\n const existingIndex = classes.indexOf(classArray[i]);\r\n\r\n if (existingIndex >= 0) {\r\n classes.splice(existingIndex, 1);\r\n } else {\r\n classes.push(classArray[i]);\r\n }\r\n element.className = classes.join(' ');\r\n }\r\n }\r\n };\r\n\r\n if (this.isNodeList(el)) {\r\n this.forEach(el, (i, val) => {\r\n toggleClass(val);\r\n });\r\n } else {\r\n toggleClass(el);\r\n }\r\n },\r\n toggle(el) {\r\n this.toggleClass(el, 'is-hidden');\r\n },\r\n offset(el) {\r\n const rect = el.getBoundingClientRect();\r\n const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;\r\n const scrollTop = window.pageYOffset || document.documentElement.scrollTop;\r\n return { top: rect.top + scrollTop, left: rect.left + scrollLeft };\r\n },\r\n forEach(array, callback, scope) {\r\n for (let i = 0; i < array.length; i++) {\r\n callback.call(scope, i, array[i]); // passes back stuff we need\r\n }\r\n },\r\n isNodeList(nodes) {\r\n const stringRepr = Object.prototype.toString.call(nodes);\r\n const regex = /^\\[object (HTMLCollection|NodeList|Object)\\]$/;\r\n return typeof nodes === 'object' && regex.test(stringRepr) && (typeof nodes.length === 'number') && (nodes.length === 0 || (typeof nodes[0] === 'object' && nodes[0].nodeType > 0));\r\n },\r\n indexInParent(node) {\r\n const children = node.parentNode.childNodes;\r\n let num = 0;\r\n for (let i = 0; i < children.length; i++) {\r\n if (children[i] === node) return num;\r\n if (children[i].nodeType === 1) num += 1;\r\n }\r\n return -1;\r\n },\r\n indexInClass(collection, node) {\r\n for (let i = 0; i < collection.length; i++) {\r\n if (collection[i] === node) { return i; }\r\n }\r\n return -1;\r\n },\r\n setStyle(el, style, val) {\r\n const setStyle = function (element) {\r\n element.style[style] = val;\r\n };\r\n if (this.isNodeList(el)) {\r\n this.forEach(el, (i, element) => {\r\n setStyle(element);\r\n });\r\n } else {\r\n setStyle(el);\r\n }\r\n },\r\n maxSliceHeight(elements, columns) {\r\n let cIndex = 0;\r\n // convert the nodelist to an array to allow slicing later\r\n const elementsArray = [...elements];\r\n\r\n this.setStyle(elements, 'height', '');\r\n\r\n if (elementsArray.length === 0 || !columns) return;\r\n\r\n while (cIndex < elementsArray.length) {\r\n let cMaxHeight = 0;\r\n let cColumn;\r\n for (cColumn = 0; cColumn < columns; cColumn++) {\r\n const cElem = elementsArray[cIndex + cColumn];\r\n if (cElem === undefined) break;\r\n cMaxHeight = (cElem.offsetHeight > cMaxHeight ? cElem.offsetHeight : cMaxHeight);\r\n }\r\n\r\n if (cMaxHeight > 0) {\r\n const set = elementsArray.slice(cIndex, cIndex + columns);\r\n for (let i = 0; i < set.length; i++) {\r\n this.setStyle(set[i], 'height', `${cMaxHeight}px`);\r\n }\r\n }\r\n\r\n cIndex += columns;\r\n }\r\n },\r\n prefixedEvent(element, type, callback) {\r\n const pfx = ['webkit', 'moz', 'MS', 'o', ''];\r\n let eType = type;\r\n for (let p = 0; p < pfx.length; p++) {\r\n if (!pfx[p]) eType = eType.toLowerCase();\r\n element.addEventListener(pfx[p] + eType, callback, false);\r\n }\r\n },\r\n wrap(el, wrapper) {\r\n el.parentNode.insertBefore(wrapper, el);\r\n wrapper.appendChild(el);\r\n },\r\n isEditMode() {\r\n return document.querySelector('.page-editor-mode') !== null;\r\n },\r\n supportsAnimation() {\r\n const b = document.body || document.documentElement;\r\n const s = b.style;\r\n let p = 'animation';\r\n if (typeof s[p] === 'string') { return true; }\r\n\r\n // Tests for vendor specific prop\r\n const v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms'];\r\n p = p.charAt(0).toUpperCase() + p.substr(1);\r\n for (let i = 0; i < v.length; i++) {\r\n if (typeof s[v[i] + p] === 'string') { return true; }\r\n }\r\n return false;\r\n },\r\n supportsTransitions() {\r\n const b = document.body || document.documentElement;\r\n const s = b.style;\r\n let p = 'transition';\r\n if (typeof s[p] === 'string') { return true; }\r\n\r\n // Tests for vendor specific prop\r\n const v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms'];\r\n p = p.charAt(0).toUpperCase() + p.substr(1);\r\n for (let i = 0; i < v.length; i++) {\r\n if (typeof s[v[i] + p] === 'string') { return true; }\r\n }\r\n return false;\r\n },\r\n trapFocus(element, namespace) {\r\n const focusableEls = element.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type=\"text\"]:not([disabled]), input[type=\"radio\"]:not([disabled]), input[type=\"checkbox\"]:not([disabled]), select:not([disabled])');\r\n const firstFocusableEl = focusableEls[0];\r\n const lastFocusableEl = focusableEls[focusableEls.length - 1];\r\n const KEYCODE_TAB = 9;\r\n\r\n element.addEventListener('keydown', (e) => {\r\n const isTabPressed = e.key === 'Tab' || e.keyCode === KEYCODE_TAB;\r\n if (!isTabPressed) {\r\n return;\r\n }\r\n if (e.shiftKey) /* shift + tab */ {\r\n if (document.activeElement === firstFocusableEl) {\r\n lastFocusableEl.focus();\r\n e.preventDefault();\r\n }\r\n } else /* tab */ if (document.activeElement === lastFocusableEl) {\r\n firstFocusableEl.focus();\r\n e.preventDefault();\r\n }\r\n });\r\n },\r\n getUrlParameter(urlParameter) {\r\n // eslint-disable-next-line no-useless-escape\r\n const name = urlParameter.replace(/[\\[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\r\n // eslint-disable-next-line prefer-template\r\n const regex = new RegExp('[\\\\?&]' + name + '=([^&#]*)');\r\n // eslint-disable-next-line no-restricted-globals\r\n const results = regex.exec(location.search);\r\n return results === null ? '' : decodeURIComponent(results[1].replace(/\\+/g, ' '));\r\n },\r\n getAllUrlParams(url) {\r\n // get query string from url (optional) or window\r\n let queryString = url ? url.split('?')[1] : window.location.search.slice(1);\r\n // we'll store the parameters here\r\n // eslint-disable-next-line prefer-const\r\n let obj = {};\r\n // if query string exists\r\n if (queryString) {\r\n // stuff after # is not part of query string, so get rid of it\r\n // eslint-disable-next-line prefer-destructuring\r\n queryString = queryString.split('#')[0];\r\n // split our query string into its component parts\r\n const arr = queryString.split('&');\r\n for (let i = 0; i < arr.length; i++) {\r\n // separate the keys and the values\r\n const a = arr[i].split('=');\r\n // set parameter name and value (use 'true' if empty)\r\n let paramName = a[0];\r\n let paramValue = typeof a[1] === 'undefined' ? true : a[1];\r\n // (optional) keep case consistent\r\n paramName = paramName.toLowerCase();\r\n if (typeof paramValue === 'string') paramValue = paramValue.toLowerCase();\r\n // if the paramName ends with square brackets, e.g. colors[] or colors[2]\r\n if (paramName.match(/\\[(\\d+)?\\]$/)) {\r\n // create key if it doesn't exist\r\n const key = paramName.replace(/\\[(\\d+)?\\]/, '');\r\n if (!obj[key]) obj[key] = [];\r\n // if it's an indexed array e.g. colors[2]\r\n if (paramName.match(/\\[\\d+\\]$/)) {\r\n // get the index value and add the entry at the appropriate position\r\n const index = /\\[(\\d+)\\]/.exec(paramName)[1];\r\n obj[key][index] = paramValue;\r\n } else {\r\n // otherwise add the value to the end of the array\r\n obj[key].push(paramValue);\r\n }\r\n } else {\r\n // we're dealing with a string\r\n // eslint-disable-next-line no-lonely-if\r\n if (!obj[paramName]) {\r\n // if it doesn't exist, create property\r\n obj[paramName] = paramValue;\r\n } else if (obj[paramName] && typeof obj[paramName] === 'string') {\r\n // if property does exist and it's a string, convert it to an array\r\n obj[paramName] = [obj[paramName]];\r\n obj[paramName].push(paramValue);\r\n } else {\r\n // otherwise add the property\r\n obj[paramName].push(paramValue);\r\n }\r\n }\r\n }\r\n }\r\n return obj;\r\n },\r\n };\r\n}());\r\n","const runningOnBrowser = typeof window !== \"undefined\";\r\n\r\nconst isBot =\r\n\t(runningOnBrowser && !(\"onscroll\" in window)) ||\r\n\t(typeof navigator !== \"undefined\" &&\r\n\t\t/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent));\r\n\r\nconst supportsIntersectionObserver =\r\n\trunningOnBrowser && \"IntersectionObserver\" in window;\r\n\r\nconst supportsClassList =\r\n\trunningOnBrowser && \"classList\" in document.createElement(\"p\");\r\n\r\nconst defaultSettings = {\r\n\telements_selector: \"img\",\r\n\tcontainer: isBot || runningOnBrowser ? document : null,\r\n\tthreshold: 300,\r\n\tthresholds: null,\r\n\tdata_src: \"src\",\r\n\tdata_srcset: \"srcset\",\r\n\tdata_sizes: \"sizes\",\r\n\tdata_bg: \"bg\",\r\n\tdata_poster: \"poster\",\r\n\tclass_loading: \"loading\",\r\n\tclass_loaded: \"loaded\",\r\n\tclass_error: \"error\",\r\n\tload_delay: 0,\r\n\tauto_unobserve: true,\r\n\tcallback_enter: null,\r\n\tcallback_exit: null,\r\n\tcallback_reveal: null,\r\n\tcallback_loaded: null,\r\n\tcallback_error: null,\r\n\tcallback_finish: null,\r\n\tuse_native: false\r\n};\r\n\r\nvar getInstanceSettings = customSettings => {\r\n\treturn Object.assign({}, defaultSettings, customSettings);\r\n};\r\n\r\n/* Creates instance and notifies it through the window element */\r\nconst createInstance = function(classObj, options) {\r\n\tvar event;\r\n\tlet eventString = \"LazyLoad::Initialized\";\r\n\tlet instance = new classObj(options);\r\n\ttry {\r\n\t\t// Works in modern browsers\r\n\t\tevent = new CustomEvent(eventString, { detail: { instance } });\r\n\t} catch (err) {\r\n\t\t// Works in Internet Explorer (all versions)\r\n\t\tevent = document.createEvent(\"CustomEvent\");\r\n\t\tevent.initCustomEvent(eventString, false, false, { instance });\r\n\t}\r\n\twindow.dispatchEvent(event);\r\n};\r\n\r\n/* Auto initialization of one or more instances of lazyload, depending on the \r\n options passed in (plain object or an array) */\r\nfunction autoInitialize(classObj, options) {\r\n\tif (!options) {\r\n\t\treturn;\r\n\t}\r\n\tif (!options.length) {\r\n\t\t// Plain object\r\n\t\tcreateInstance(classObj, options);\r\n\t} else {\r\n\t\t// Array of objects\r\n\t\tfor (let i = 0, optionsItem; (optionsItem = options[i]); i += 1) {\r\n\t\t\tcreateInstance(classObj, optionsItem);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nconst dataPrefix = \"data-\";\r\nconst processedDataName = \"was-processed\";\r\nconst timeoutDataName = \"ll-timeout\";\r\nconst trueString = \"true\";\r\n\r\nconst getData = (element, attribute) => {\r\n\treturn element.getAttribute(dataPrefix + attribute);\r\n};\r\n\r\nconst setData = (element, attribute, value) => {\r\n\tvar attrName = dataPrefix + attribute;\r\n\tif (value === null) {\r\n\t\telement.removeAttribute(attrName);\r\n\t\treturn;\r\n\t}\r\n\telement.setAttribute(attrName, value);\r\n};\r\n\r\nconst resetWasProcessedData = element =>\r\n\tsetData(element, processedDataName, null);\r\n\r\nconst setWasProcessedData = element =>\r\n\tsetData(element, processedDataName, trueString);\r\n\r\nconst getWasProcessedData = element =>\r\n\tgetData(element, processedDataName) === trueString;\r\n\r\nconst setTimeoutData = (element, value) =>\r\n\tsetData(element, timeoutDataName, value);\r\n\r\nconst getTimeoutData = element => getData(element, timeoutDataName);\r\n\r\nconst purgeProcessedElements = elements => {\r\n\treturn elements.filter(element => !getWasProcessedData(element));\r\n};\r\n\r\nconst purgeOneElement = (elements, elementToPurge) => {\r\n\treturn elements.filter(element => element !== elementToPurge);\r\n};\r\n\r\nconst safeCallback = (callback, arg1, arg2, arg3) => {\r\n\tif (!callback) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (arg3 !== undefined) {\r\n\t\tcallback(arg1, arg2, arg3);\r\n\t\treturn;\r\n\t}\r\n\tif (arg2 !== undefined) {\r\n\t\tcallback(arg1, arg2);\r\n\t\treturn;\r\n\t}\r\n\tcallback(arg1);\r\n};\r\n\r\nconst updateLoadingCount = (instance, plusMinus) => {\r\n instance.loadingCount += plusMinus;\r\n if (instance._elements.length === 0 && instance.loadingCount === 0) {\r\n safeCallback(instance._settings.callback_finish, instance);\r\n }\r\n};\r\n\r\nconst getSourceTags = parentTag => {\r\n\tlet sourceTags = [];\r\n\tfor (let i = 0, childTag; (childTag = parentTag.children[i]); i += 1) {\r\n\t\tif (childTag.tagName === \"SOURCE\") {\r\n\t\t\tsourceTags.push(childTag);\r\n\t\t}\r\n\t}\r\n\treturn sourceTags;\r\n};\r\n\r\nconst setAttributeIfValue = (element, attrName, value) => {\r\n\tif (!value) {\r\n\t\treturn;\r\n\t}\r\n\telement.setAttribute(attrName, value);\r\n};\r\n\r\nconst setImageAttributes = (element, settings) => {\r\n\tsetAttributeIfValue(\r\n\t\telement,\r\n\t\t\"sizes\",\r\n\t\tgetData(element, settings.data_sizes)\r\n\t);\r\n\tsetAttributeIfValue(\r\n\t\telement,\r\n\t\t\"srcset\",\r\n\t\tgetData(element, settings.data_srcset)\r\n\t);\r\n\tsetAttributeIfValue(element, \"src\", getData(element, settings.data_src));\r\n};\r\n\r\nconst setSourcesImg = (element, settings) => {\r\n\tconst parent = element.parentNode;\r\n\r\n\tif (parent && parent.tagName === \"PICTURE\") {\r\n\t\tlet sourceTags = getSourceTags(parent);\r\n\t\tsourceTags.forEach(sourceTag => {\r\n\t\t\tsetImageAttributes(sourceTag, settings);\r\n\t\t});\r\n\t}\r\n\r\n\tsetImageAttributes(element, settings);\r\n};\r\n\r\nconst setSourcesIframe = (element, settings) => {\r\n\tsetAttributeIfValue(element, \"src\", getData(element, settings.data_src));\r\n};\r\n\r\nconst setSourcesVideo = (element, settings) => {\r\n\tlet sourceTags = getSourceTags(element);\r\n\tsourceTags.forEach(sourceTag => {\r\n\t\tsetAttributeIfValue(\r\n\t\t\tsourceTag,\r\n\t\t\t\"src\",\r\n\t\t\tgetData(sourceTag, settings.data_src)\r\n\t\t);\r\n\t});\r\n\tsetAttributeIfValue(\r\n\t\telement,\r\n\t\t\"poster\",\r\n\t\tgetData(element, settings.data_poster)\r\n\t);\r\n\tsetAttributeIfValue(element, \"src\", getData(element, settings.data_src));\r\n\telement.load();\r\n};\r\n\r\nconst setSourcesBgImage = (element, settings) => {\r\n\tconst srcDataValue = getData(element, settings.data_src);\r\n\tconst bgDataValue = getData(element, settings.data_bg);\r\n\r\n\tif (srcDataValue) {\r\n\t\telement.style.backgroundImage = `url(\"${srcDataValue}\")`;\r\n\t}\r\n\r\n\tif (bgDataValue) {\r\n\t\telement.style.backgroundImage = bgDataValue;\r\n\t}\r\n};\r\n\r\nconst setSourcesFunctions = {\r\n\tIMG: setSourcesImg,\r\n\tIFRAME: setSourcesIframe,\r\n\tVIDEO: setSourcesVideo\r\n};\r\n\r\nconst setSources = (element, instance) => {\r\n\tconst settings = instance._settings;\r\n\tconst tagName = element.tagName;\r\n\tconst setSourcesFunction = setSourcesFunctions[tagName];\r\n\tif (setSourcesFunction) {\r\n\t\tsetSourcesFunction(element, settings);\r\n\t\tupdateLoadingCount(instance, 1);\r\n\t\tinstance._elements = purgeOneElement(instance._elements, element);\r\n\t\treturn;\r\n\t}\r\n\tsetSourcesBgImage(element, settings);\r\n};\r\n\r\nconst addClass = (element, className) => {\r\n\tif (supportsClassList) {\r\n\t\telement.classList.add(className);\r\n\t\treturn;\r\n\t}\r\n\telement.className += (element.className ? \" \" : \"\") + className;\r\n};\r\n\r\nconst removeClass = (element, className) => {\r\n\tif (supportsClassList) {\r\n\t\telement.classList.remove(className);\r\n\t\treturn;\r\n\t}\r\n\telement.className = element.className.\r\n\t\treplace(new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\"), \" \").\r\n\t\treplace(/^\\s+/, \"\").\r\n\t\treplace(/\\s+$/, \"\");\r\n};\r\n\r\nconst genericLoadEventName = \"load\";\r\nconst mediaLoadEventName = \"loadeddata\";\r\nconst errorEventName = \"error\";\r\n\r\nconst addEventListener = (element, eventName, handler) => {\r\n\telement.addEventListener(eventName, handler);\r\n};\r\n\r\nconst removeEventListener = (element, eventName, handler) => {\r\n\telement.removeEventListener(eventName, handler);\r\n};\r\n\r\nconst addEventListeners = (element, loadHandler, errorHandler) => {\r\n\taddEventListener(element, genericLoadEventName, loadHandler);\r\n\taddEventListener(element, mediaLoadEventName, loadHandler);\r\n\taddEventListener(element, errorEventName, errorHandler);\r\n};\r\n\r\nconst removeEventListeners = (element, loadHandler, errorHandler) => {\r\n\tremoveEventListener(element, genericLoadEventName, loadHandler);\r\n\tremoveEventListener(element, mediaLoadEventName, loadHandler);\r\n\tremoveEventListener(element, errorEventName, errorHandler);\r\n};\r\n\r\nconst eventHandler = function(event, success, instance) {\r\n\tvar settings = instance._settings;\r\n\tconst className = success ? settings.class_loaded : settings.class_error;\r\n\tconst callback = success\r\n\t\t? settings.callback_loaded\r\n\t\t: settings.callback_error;\r\n\tconst element = event.target;\r\n\r\n\tremoveClass(element, settings.class_loading);\r\n\taddClass(element, className);\r\n\tsafeCallback(callback, element, instance);\r\n\r\n\tupdateLoadingCount(instance, -1);\r\n};\r\n\r\nconst addOneShotEventListeners = (element, instance) => {\r\n\tconst loadHandler = event => {\r\n\t\teventHandler(event, true, instance);\r\n\t\tremoveEventListeners(element, loadHandler, errorHandler);\r\n\t};\r\n\tconst errorHandler = event => {\r\n\t\teventHandler(event, false, instance);\r\n\t\tremoveEventListeners(element, loadHandler, errorHandler);\r\n\t};\r\n\taddEventListeners(element, loadHandler, errorHandler);\r\n};\r\n\r\nconst managedTags = [\"IMG\", \"IFRAME\", \"VIDEO\"];\r\n\r\nconst onEnter = (element, entry, instance) => {\r\n\tconst settings = instance._settings;\r\n\tsafeCallback(settings.callback_enter, element, entry, instance);\r\n\tif (!settings.load_delay) {\r\n\t\trevealAndUnobserve(element, instance);\r\n\t\treturn;\r\n\t}\r\n\tdelayLoad(element, instance);\r\n};\r\n\r\nconst revealAndUnobserve = (element, instance) => {\r\n\tvar observer = instance._observer;\r\n\trevealElement(element, instance);\r\n\tif (observer && instance._settings.auto_unobserve) {\r\n\t\tobserver.unobserve(element);\r\n\t}\r\n};\r\n\r\nconst onExit = (element, entry, instance) => {\r\n\tconst settings = instance._settings;\r\n\tsafeCallback(settings.callback_exit, element, entry, instance);\r\n\tif (!settings.load_delay) {\r\n\t\treturn;\r\n\t}\r\n\tcancelDelayLoad(element);\r\n};\r\n\r\nconst cancelDelayLoad = element => {\r\n\tvar timeoutId = getTimeoutData(element);\r\n\tif (!timeoutId) {\r\n\t\treturn; // do nothing if timeout doesn't exist\r\n\t}\r\n\tclearTimeout(timeoutId);\r\n\tsetTimeoutData(element, null);\r\n};\r\n\r\nconst delayLoad = (element, instance) => {\r\n\tvar loadDelay = instance._settings.load_delay;\r\n\tvar timeoutId = getTimeoutData(element);\r\n\tif (timeoutId) {\r\n\t\treturn; // do nothing if timeout already set\r\n\t}\r\n\ttimeoutId = setTimeout(function() {\r\n\t\trevealAndUnobserve(element, instance);\r\n\t\tcancelDelayLoad(element);\r\n\t}, loadDelay);\r\n\tsetTimeoutData(element, timeoutId);\r\n};\r\n\r\nconst revealElement = (element, instance, force) => {\r\n\tvar settings = instance._settings;\r\n\tif (!force && getWasProcessedData(element)) {\r\n\t\treturn; // element has already been processed and force wasn't true\r\n\t}\r\n\tif (managedTags.indexOf(element.tagName) > -1) {\r\n\t\taddOneShotEventListeners(element, instance);\r\n\t\taddClass(element, settings.class_loading);\r\n\t}\r\n\tsetSources(element, instance);\r\n\tsetWasProcessedData(element);\r\n\tsafeCallback(settings.callback_reveal, element, instance);\r\n\tsafeCallback(settings.callback_set, element, instance);\r\n};\r\n\r\nconst isIntersecting = entry =>\r\n\tentry.isIntersecting || entry.intersectionRatio > 0;\r\n\r\nconst getObserverSettings = settings => ({\r\n\troot: settings.container === document ? null : settings.container,\r\n\trootMargin: settings.thresholds || settings.threshold + \"px\"\r\n});\r\n\r\nconst setObserver = instance => {\r\n\tif (!supportsIntersectionObserver) {\r\n\t\treturn false;\r\n\t}\r\n\tinstance._observer = new IntersectionObserver(entries => {\r\n\t\tentries.forEach(entry =>\r\n\t\t\tisIntersecting(entry)\r\n\t\t\t\t? onEnter(entry.target, entry, instance)\r\n\t\t\t\t: onExit(entry.target, entry, instance)\r\n\t\t);\r\n\t}, getObserverSettings(instance._settings));\r\n\treturn true;\r\n};\r\n\r\nconst nativeLazyTags = [\"IMG\", \"IFRAME\"];\r\n\r\nconst shouldUseNative = settings =>\r\n\tsettings.use_native && \"loading\" in HTMLImageElement.prototype;\r\n\r\nconst loadAllNative = instance => {\r\n\tinstance._elements.forEach(element => {\r\n\t\tif (nativeLazyTags.indexOf(element.tagName) === -1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telement.setAttribute(\"loading\", \"lazy\");\r\n\t\trevealElement(element, instance);\r\n\t});\r\n};\r\n\r\nconst nodeSetToArray = nodeSet => Array.prototype.slice.call(nodeSet);\r\n\r\nconst queryElements = settings =>\r\n\tsettings.container.querySelectorAll(settings.elements_selector);\r\n\r\nconst getElements = (elements, settings) =>\r\n\tpurgeProcessedElements(nodeSetToArray(elements || queryElements(settings)));\r\n\r\nconst retryLazyLoad = instance => {\r\n\tvar settings = instance._settings;\r\n\tvar errorElements = settings.container.querySelectorAll(\r\n\t\t\".\" + settings.class_error\r\n\t);\r\n\terrorElements.forEach(element => {\r\n\t\tremoveClass(element, settings.class_error);\r\n\t\tresetWasProcessedData(element);\r\n\t});\r\n\tinstance.update();\r\n};\r\n\r\nconst setOnlineCheck = instance => {\r\n\tif (!runningOnBrowser) {\r\n\t\treturn;\r\n\t}\r\n\twindow.addEventListener(\"online\", event => {\r\n\t\tretryLazyLoad(instance);\r\n\t});\r\n};\r\n\r\nconst LazyLoad = function(customSettings, elements) {\r\n this._settings = getInstanceSettings(customSettings);\r\n this.loadingCount = 0;\r\n setObserver(this);\r\n this.update(elements);\r\n setOnlineCheck(this);\r\n};\r\n\r\nLazyLoad.prototype = {\r\n update: function(elements) {\r\n var settings = this._settings;\r\n this._elements = getElements(elements, settings);\r\n if (isBot || !this._observer) {\r\n this.loadAll();\r\n return;\r\n }\r\n if (shouldUseNative(settings)) {\r\n loadAllNative(this);\r\n this._elements = getElements(elements, settings);\r\n }\r\n this._elements.forEach(element => {\r\n this._observer.observe(element);\r\n });\r\n },\r\n\r\n destroy: function() {\r\n if (this._observer) {\r\n this._elements.forEach(element => {\r\n this._observer.unobserve(element);\r\n });\r\n this._observer = null;\r\n }\r\n this._elements = null;\r\n this._settings = null;\r\n },\r\n\r\n load: function(element, force) {\r\n revealElement(element, this, force);\r\n },\r\n\r\n loadAll: function() {\r\n this._elements.forEach(element => {\r\n revealAndUnobserve(element, this);\r\n });\r\n }\r\n};\r\n\r\n/* Automatic instances creation if required (useful for async script loading) */\r\nif (runningOnBrowser) {\r\n autoInitialize(LazyLoad, window.lazyLoadOptions);\r\n}\r\n\r\nexport default LazyLoad;\r\n","import LazyLoad from 'vanilla-lazyload';\r\n\r\nexport default (function () {\r\n return {\r\n init() {\r\n const lazyLoadInstance = new LazyLoad({\r\n elements_selector: '.js-lazy',\r\n // eslint-disable-next-line object-shorthand\r\n callback_enter: function (el) {\r\n if (el.parentElement.classList.contains('g-unit') || el.parentElement.classList.contains('c-card__image')) {\r\n // we need to run our equalheights function after the image has been loaded\r\n uwe.equalheight.run();\r\n }\r\n },\r\n });\r\n },\r\n };\r\n}());\r\n","\r\n// import { on } from 'delegated-events';\r\nimport helpers from './helpers';\r\n\r\nexport default (function () {\r\n return {\r\n init() {\r\n const paralaxEls = document.querySelectorAll('.js-prlx');\r\n if (paralaxEls.length === 0) return;\r\n\r\n [...paralaxEls].forEach((paralaxEl) => {\r\n let lastScrollY = 0;\r\n let ticking = false;\r\n const parent = paralaxEl.parentElement;\r\n const offsetMax = parseInt(paralaxEl.getAttribute('data-paralax-max'), 10) || 100;\r\n const offsetStop = parseInt(paralaxEl.getAttribute('data-paralax-stop'), 10);\r\n const bgOnly = paralaxEl.getAttribute('data-paralax-bg-only') === 'true';\r\n const inverse = paralaxEl.getAttribute('data-paralax-inverse') === 'true';\r\n const inverseX = paralaxEl.getAttribute('data-paralax-inverse-X') === 'true';\r\n const initialOffset = parseInt(paralaxEl.getAttribute('data-paralax-initial-offset'), 10) || 0;\r\n const initialXOffset = parseInt(paralaxEl.getAttribute('data-paralax-initial-X-offset'), 10) || 0;\r\n const bgScaleElem = paralaxEl.querySelector('.js-prlx-bg');\r\n\r\n /**\r\n * Our animation callback\r\n */\r\n function update() {\r\n const rect = parent.getBoundingClientRect();\r\n const wH = document.documentElement.clientHeight;\r\n const factor = helpers.breakpoint(parent) === 'tablet' ? 2 : 1;\r\n\r\n const offset = {\r\n top: rect.top,\r\n };\r\n\r\n const { top } = offset;\r\n const pos = (wH - top) / (parent.offsetHeight + wH);\r\n\r\n if (pos > 1 || pos < 0) {\r\n ticking = false;\r\n return;\r\n }\r\n\r\n let val = (offsetMax / factor) * pos;\r\n let xVal = (offsetMax / factor) * pos;\r\n\r\n if (inverse) {\r\n val = -Math.abs(val);\r\n }\r\n if (inverseX) {\r\n xVal = -Math.abs(xVal);\r\n }\r\n\r\n val += (initialOffset / factor);\r\n xVal += (initialXOffset / factor);\r\n\r\n\r\n const scrollTop = window.pageYOffset || document.documentElement.scrollTop;\r\n const h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\r\n\r\n if (helpers.offset(parent).top < scrollTop + (h / 2)) {\r\n paralaxEl.style.transition = 'all ease-in-out 1s';\r\n paralaxEl.style.transform = 'translateY(0px) translateX(0px)';\r\n ticking = false;\r\n return;\r\n }\r\n\r\n\r\n if (!bgOnly) {\r\n paralaxEl.style.transform = `translateY(${val}px)`;\r\n }\r\n\r\n if (initialXOffset) {\r\n paralaxEl.style.transform = `translateY(${val}px) translateX(${xVal}px)`;\r\n }\r\n\r\n\r\n if (bgScaleElem) {\r\n const scalePercent = pos;\r\n bgScaleElem.style.transform = `scale(${scalePercent})`;\r\n }\r\n\r\n ticking = false;\r\n }\r\n\r\n /**\r\n * Calls rAF if it's not already\r\n * been done already\r\n */\r\n function requestTick() {\r\n if (!ticking) {\r\n requestAnimationFrame(update);\r\n ticking = true;\r\n }\r\n }\r\n\r\n /**\r\n * Callback for our scroll event - just\r\n * keeps track of the last scroll value\r\n */\r\n function onScroll() {\r\n if (helpers.breakpoint(parent) === 'mobile') return;\r\n lastScrollY = window.pageYOffset;\r\n requestTick();\r\n }\r\n\r\n\r\n window.addEventListener('scroll', onScroll, false);\r\n window.addEventListener('resize', onScroll, false);\r\n });\r\n },\r\n };\r\n}());\r\n","import helpers from './helpers.js';\r\n\r\nexport default (function () {\r\n return {\r\n init() {\r\n if (document.querySelectorAll('.ie9').length) return;\r\n const revealItems = document.querySelectorAll('.js-reveal');\r\n\r\n [...revealItems].forEach((item) => {\r\n item.classList.remove('js-reveal');\r\n item.classList.add('reveal-in');\r\n const animateIn = () => {\r\n if (item.getAttribute('data-animtriggered') === 'true') {\r\n return;\r\n }\r\n\r\n const scrollTop = window.pageYOffset || document.documentElement.scrollTop;\r\n const h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\r\n\r\n if (helpers.offset(item).top < scrollTop + (h / 3)) {\r\n item.setAttribute('data-animtriggered', 'true');\r\n\r\n helpers.prefixedEvent(item, 'animationend', (e) => {\r\n e.stopPropagation();\r\n item.classList.remove('reveal-in reveal-in--ready');\r\n });\r\n item.classList.add('reveal-in--ready');\r\n }\r\n };\r\n\r\n window.addEventListener('scroll', animateIn);\r\n animateIn();\r\n });\r\n },\r\n };\r\n}());\r\n","import helpers from './helpers.js';\r\n\r\nexport default (function () {\r\n return {\r\n init() {\r\n if (document.querySelectorAll('.ie9').length) return;\r\n const revealItems = document.querySelectorAll('.js-anim');\r\n\r\n document.body.classList.remove('preload'); // this stops weird loading transitions\r\n\r\n [...revealItems].forEach((item) => {\r\n item.classList.remove('js-anim');\r\n item.classList.add('anim-in');\r\n const animateIn = () => {\r\n if (item.getAttribute('data-animtriggered') === 'true') {\r\n return;\r\n }\r\n\r\n const scrollTop = window.pageYOffset || document.documentElement.scrollTop;\r\n const h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\r\n\r\n if (helpers.offset(item).top < scrollTop + h) {\r\n item.setAttribute('data-animtriggered', 'true');\r\n\r\n helpers.prefixedEvent(item, 'animationend', (e) => {\r\n e.stopPropagation();\r\n item.classList.remove('anim-in anim-in--ready');\r\n });\r\n item.classList.add('anim-in--ready');\r\n }\r\n };\r\n\r\n window.addEventListener('scroll', animateIn);\r\n animateIn();\r\n });\r\n },\r\n };\r\n}());\r\n","import helpers from './helpers.js';\r\n\r\nexport default (function () {\r\n return {\r\n init() {\r\n if (document.querySelectorAll('.ie9').length) return;\r\n const swtriggers = document.querySelectorAll('.js-sw-trigger');\r\n const close = document.querySelectorAll('.js-sw-close');\r\n const sws = document.querySelectorAll('.c-large-quote__sw');\r\n helpers.forEach(sws, (i, w) => {\r\n w.classList.add('is-loaded');\r\n });\r\n\r\n helpers.forEach(swtriggers, (i, el) => {\r\n el.addEventListener('click', (evt) => {\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n const parent = evt.target.closest('.c-large-quote');\r\n const sw = parent.querySelector('.c-large-quote__sw');\r\n if (sw.classList.contains('is-active')) {\r\n sw.classList.remove('is-active');\r\n document.body.classList.remove('is-modal-open');\r\n } else {\r\n helpers.trapFocus(sw);\r\n document.body.classList.add('is-modal-open');\r\n sw.classList.add('is-active');\r\n }\r\n });\r\n });\r\n\r\n helpers.forEach(close, (i, el) => {\r\n el.addEventListener('click', (evt) => {\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n const parent = evt.target.closest('.c-large-quote');\r\n const sw = parent.querySelector('.c-large-quote__sw');\r\n sw.classList.remove('is-active');\r\n document.body.classList.remove('is-modal-open');\r\n });\r\n });\r\n\r\n document.body.addEventListener('click', (e) => {\r\n if (document.querySelectorAll('.c-large-quote__sw.is-active').length) {\r\n if (!e.target.classList.contains('c-large-quote__sw')) {\r\n return;\r\n }\r\n\r\n const activeEls = document.querySelectorAll('.c-large-quote__sw.is-active');\r\n helpers.forEach(activeEls, (i, el) => {\r\n el.classList.remove('is-active');\r\n document.body.classList.remove('is-modal-open');\r\n });\r\n }\r\n });\r\n },\r\n\r\n };\r\n}());\r\n"," import helpers from './helpers';\r\n\r\nexport default (function () {\r\n return {\r\n init() {\r\n const accordian = document.querySelectorAll('.js-accordian');\r\n const accordionShowAllSectionButtons = document.querySelectorAll('.js-accordian-show-hide-all');\r\n let accordionItemHash = false;\r\n let accordionItemDiv = false;\r\n if (window.location.hash) {\r\n accordionItemHash = window.location.hash;\r\n if (document.querySelector(accordionItemHash) && document.querySelector(accordionItemHash).classList.contains('c-accordian-copy-section')) {\r\n accordionItemDiv = document.querySelector(accordionItemHash);\r\n }\r\n }\r\n helpers.forEach(accordian, (i, el) => {\r\n // Default state for browser with JS off is expanded accordian otherwise default state is hidden so add hidden class\r\n el.setAttribute('aria-expanded', 'false');\r\n el.nextElementSibling.classList.add('u-hidden');\r\n el.nextElementSibling.setAttribute('aria-hidden', 'true');\r\n el.addEventListener('click', (evt) => {\r\n const acst = el.nextElementSibling;\r\n uwe.accordion.toggleAccordion(el, acst);\r\n });\r\n el.addEventListener('keydown', (evt) => {\r\n const target = evt;\r\n const key = evt.which.toString();\r\n if (key.match(/32/) || key.match(/13/)) { // Spacebar OR Enter\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n const acst = el.nextElementSibling;\r\n uwe.accordion.toggleAccordion(el, acst);\r\n }\r\n });\r\n });\r\n helpers.forEach(accordionShowAllSectionButtons, (i, el) => {\r\n el.addEventListener('click', (evt) => {\r\n uwe.accordion.toggleAccordionSection(el);\r\n });\r\n el.addEventListener('keydown', (evt) => {\r\n const target = evt;\r\n const key = evt.which.toString();\r\n if (key.match(/32/) || key.match(/13/)) { // Spacebar OR Enter\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n uwe.accordion.toggleAccordionSection(el);\r\n }\r\n });\r\n });\r\n if (accordionItemHash && accordionItemDiv) {\r\n this.setActiveAccordion(accordionItemDiv);\r\n }\r\n window.onhashchange = function () {\r\n if (document.querySelector(window.location.hash) && document.querySelector(window.location.hash).classList.contains('c-accordian-copy-section')) {\r\n uwe.accordion.setActiveAccordion(document.querySelector(window.location.hash));\r\n }\r\n };\r\n },\r\n setActiveAccordion(windowLocationHash) {\r\n const activeAccordion = windowLocationHash;\r\n const el = activeAccordion.firstElementChild;\r\n const acst = el.nextElementSibling;\r\n uwe.accordion.toggleAccordion(el, acst);\r\n el.focus();\r\n },\r\n toggleAccordion(el, acst) {\r\n if (acst.classList.contains('u-hidden')) {\r\n const parentEl = el.parentNode;\r\n let parentElID = false;\r\n if (parentEl.id) {\r\n parentElID = parentEl.id;\r\n }\r\n if (parentElID) {\r\n window.history.pushState({}, '', `#${parentElID}`);\r\n }\r\n acst.classList.remove('u-hidden');\r\n acst.setAttribute('aria-hidden', 'false');\r\n el.classList.add('c-accordian-copy-section__title--is-clicked');\r\n el.setAttribute('aria-expanded', 'true');\r\n } else {\r\n acst.classList.add('u-hidden');\r\n acst.setAttribute('aria-hidden', 'true');\r\n el.classList.remove('c-accordian-copy-section__title--is-clicked');\r\n el.setAttribute('aria-expanded', 'false');\r\n }\r\n },\r\n toggleAccordionSection(el) {\r\n const acgID = el.dataset.acgId;\r\n const acg = document.getElementById(acgID);\r\n const accordions = acg.querySelectorAll('.js-accordian');\r\n helpers.forEach(accordions, (i, el2) => {\r\n const acst = el2.nextElementSibling;\r\n if (el.innerHTML === 'Show all sections') {\r\n acst.classList.remove('u-hidden');\r\n acst.setAttribute('aria-hidden', 'false');\r\n el2.classList.add('c-accordian-copy-section__title--is-clicked');\r\n el2.setAttribute('aria-expanded', 'true');\r\n } else {\r\n acst.classList.add('u-hidden');\r\n acst.setAttribute('aria-hidden', 'true');\r\n el2.classList.remove('c-accordian-copy-section__title--is-clicked');\r\n el2.setAttribute('aria-expanded', 'false');\r\n }\r\n });\r\n if (el.innerHTML === 'Show all sections') {\r\n el.innerHTML = 'Hide all sections';\r\n } else {\r\n el.innerHTML = 'Show all sections';\r\n }\r\n },\r\n };\r\n}());","import helpers from './helpers.js';\r\n\r\n/*\r\n=================================================================\r\nHEIGHT FIX\r\nequalise heights for defined objects\r\n=================================================================\r\n*/\r\nexport default (function () {\r\n return {\r\n init() {\r\n if (typeof helpers.maxSliceHeight !== 'function') {\r\n return;\r\n }\r\n window.addEventListener('load', this.run);\r\n window.addEventListener('resize', this.run);\r\n },\r\n run() {\r\n // generic equalising function based on markup\r\n const eqCols = document.querySelectorAll('[data-eq-cols]');\r\n setTimeout(() => {\r\n helpers.forEach(eqCols, (i, el) => {\r\n const json = el.getAttribute('data-eq-cols');\r\n const selector = el.getAttribute('data-eq-selector') || '>div';\r\n const sel = el.querySelectorAll(selector);\r\n const bp = helpers.breakpoint(el);\r\n\r\n let cols;\r\n if (json === 'length' || json === '*') {\r\n cols = sel.length;\r\n } else {\r\n cols = JSON.parse(json)[bp];\r\n if (cols === 'length' || cols === '*') {\r\n cols = sel.length;\r\n }\r\n }\r\n\r\n if (cols <= 1) {\r\n helpers.forEach(sel, (index, element) => {\r\n element.style.height = '';\r\n });\r\n return;\r\n }\r\n helpers.maxSliceHeight(sel, cols);\r\n });\r\n }, 200);\r\n },\r\n };\r\n}());\r\n","export default (function () {\r\n return {\r\n init() {\r\n function isYoutubePlayerObjectReady() {\r\n return typeof YT !== 'undefined' && typeof YT.Player !== 'undefined';\r\n }\r\n\r\n function onAutoplayVideoReady(event) {\r\n const player = event.target;\r\n player.mute();\r\n player.playVideo();\r\n\r\n const buttonCssClass = 'header--video-content--button';\r\n const pausebuttonCssClass = 'header--video-content--pause';\r\n const playbuttonCssClass = 'header--video-content--play';\r\n const maskCssClass = 'header--video-content__mask';\r\n\r\n const pauseButton = document.querySelector(`.${buttonCssClass}`);\r\n if (pauseButton) {\r\n pauseButton.className = pauseButton.className.replace(' u-hidden-visually', '');\r\n }\r\n\r\n const mask = document.querySelector(`.${maskCssClass}`);\r\n if (mask) {\r\n mask.className = mask.className.replace(' u-hidden-visually', '');\r\n }\r\n\r\n const iframe = document.querySelector('#phHeaderDeepVideo');\r\n if (iframe) {\r\n iframe.tabIndex = -1;\r\n iframe.title = event.target.getVideoData().title;\r\n }\r\n\r\n pauseButton.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n const button = e.srcElement.closest(`.${buttonCssClass}`);\r\n\r\n if (button) {\r\n button.className = button.className.replace(' u-hidden-visually', '');\r\n }\r\n\r\n if (button.className.includes(pausebuttonCssClass)) {\r\n player.pauseVideo();\r\n button.className = button.className.replace(pausebuttonCssClass, playbuttonCssClass);\r\n button.title = 'Play';\r\n button.setAttribute('aria-label', 'Play video');\r\n } else {\r\n player.playVideo();\r\n button.className = button.className.replace(playbuttonCssClass, pausebuttonCssClass);\r\n button.title = 'Pause';\r\n button.setAttribute('aria-label', 'Pause video');\r\n }\r\n }, false);\r\n }\r\n\r\n function onEmbeddedVideoReady(event) {\r\n event.target.playVideo();\r\n\r\n const iframe = event.target.f.parentElement.parentElement.querySelector('iframe');\r\n if (iframe) {\r\n iframe.title = event.target.getVideoData().title;\r\n }\r\n }\r\n\r\n function loadAutoplayVideo(container) {\r\n if (!isYoutubePlayerObjectReady()) {\r\n console.warn('YT is undefined - the YouTube API script has not fully loaded');\r\n return;\r\n }\r\n\r\n if (!container) {\r\n return;\r\n }\r\n\r\n const youtubeEmbedId = container.attributes['data-yembed-id'].value;\r\n const placeholderSelector = container.attributes['data-yembed-placeholder'].value;\r\n const placeholder = container.querySelector(placeholderSelector);\r\n\r\n if (placeholder) {\r\n // eslint-disable-next-line new-cap\r\n const player = new YT.Player(document.querySelector(placeholderSelector), {\r\n videoId: youtubeEmbedId,\r\n host: 'https://www.youtube-nocookie.com',\r\n playerVars: {\r\n autoplay: 1,\r\n controls: 0,\r\n autohide: 1,\r\n wmode: 'opaque',\r\n origin: window.location.origin,\r\n fs: 0,\r\n enablejsapi: 1,\r\n disablekb: 1,\r\n iv_load_policy: 3,\r\n modestbranding: 1,\r\n playsinline: 1,\r\n rel: 0,\r\n showinfo: 0,\r\n start: 0,\r\n loop: 1,\r\n widgetid: 1,\r\n allowfullscreen: 0,\r\n playlist: youtubeEmbedId,\r\n },\r\n events: {\r\n onReady: onAutoplayVideoReady,\r\n },\r\n });\r\n } else {\r\n console.warn(`Could not find ${placeholderSelector} within ${clickedPlayButton.className}`);\r\n }\r\n }\r\n\r\n function embedVideoInContainer(container, selectorsToHide) {\r\n if (!isYoutubePlayerObjectReady()) {\r\n console.warn('YT is undefined - the YouTube API script has not fully loaded');\r\n return;\r\n }\r\n\r\n if (!container) {\r\n return;\r\n }\r\n\r\n const youtubeEmbedId = container.attributes['data-yembed-id'].value;\r\n const placeholderSelector = container.attributes['data-yembed-placeholder'].value;\r\n const placeholder = container.querySelector(placeholderSelector);\r\n const placeholderWrapper = placeholder.parentNode;\r\n\r\n if (placeholder) {\r\n if (selectorsToHide && selectorsToHide.length > 0) {\r\n selectorsToHide.forEach((s) => {\r\n const elementToHide = container.querySelector(s);\r\n elementToHide.style.display = 'none';\r\n });\r\n }\r\n\r\n const thumbnail = container.querySelector('.js-yembed-thumbnail');\r\n const playIcon = container.querySelector('.js-yembed-play-icon');\r\n thumbnail.style.display = 'none';\r\n playIcon.style.display = 'none';\r\n\r\n // This function creates an