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F,G","sources":["webpack://silverstripe-base/./themes/app/src/scripts/components/scroll-reveal.js","webpack://silverstripe-base/./themes/app/src/scripts/components/site-announcement-bar.js","webpack://silverstripe-base/./themes/app/src/scripts/components/scroll-to.js","webpack://silverstripe-base/./themes/app/src/scripts/components/site-header.js","webpack://silverstripe-base/./themes/app/src/scripts/components/site-widget.js","webpack://silverstripe-base/./themes/app/src/scripts/components/media-slider.js","webpack://silverstripe-base/./themes/app/src/scripts/components/mobile-bar.js","webpack://silverstripe-base/./themes/app/src/index.js","webpack://silverstripe-base/./themes/app/src/scripts/components/page-overlay.js","webpack://silverstripe-base/./themes/app/src/scripts/common/scroll-to.js"],"sourcesContent":["import { animate, inView, stagger, timeline } from \"motion\";\n\nconst animateSlideReveal = (el) => {\n animate(el, { x: [0, \"100%\"] }, { duration: 1.2, delay: 0.2, easing: \"ease\" });\n};\n\nconst variants = {\n \"fade-up\": {\n opacity: 1,\n transform: \"translate3d(0, 0, 0)\",\n },\n \"slide-up\": {\n transform: \"translate3d(0, 0, 0)\",\n },\n \"fade-up-left\": {\n opacity: 1,\n transform: \"translate3d(0, 0, 0)\",\n },\n \"fade-down\": {\n opacity: 1,\n transform: \"translate3d(0, 0, 0)\",\n },\n \"fade-left\": {\n opacity: 1,\n transform: \"translate3d(0, 0, 0)\",\n },\n \"fade-left-slow\": {\n opacity: 1,\n transform: \"translate3d(0, 0, 0)\",\n },\n \"fade-right\": {\n opacity: 1,\n transform: \"translate3d(0, 0, 0)\",\n },\n \"slide-right\": {\n transform: \"translate3d(0, 0, 0)\",\n },\n \"fade-in\": {\n opacity: 1,\n },\n \"scale-in\": {\n opacity: 1,\n transform: \"scale(1)\",\n },\n};\n\nconst reveal = (group) => {\n if (group.dataset.srGroup === \"sequence\") {\n const sequence = [];\n\n group.querySelectorAll(`[data-sr]`).forEach((el) => {\n const variant = variants[el.dataset.sr];\n\n if (variant && el.style.display !== \"none\") {\n sequence.push([el, variant, { ease: \"ease\", duration: 0.8, at: \"-0.4\" }]);\n }\n });\n\n inView(\n group,\n () => {\n timeline(sequence).finished.then((animations) => {\n animations?.forEach((animation) => {\n animation.effect?.target?.setAttribute(\"data-sr-done\", true);\n });\n });\n },\n {\n margin: \"0px 0px -25% 0px\",\n },\n );\n } else {\n for (const [key, opts] of Object.entries(variants)) {\n const els = Array.from(group.querySelectorAll(`[data-sr=\"${key}\"]:not([data-sr-done])`)).filter((el) => {\n return window.getComputedStyle(el).display !== \"none\";\n });\n\n let duration = 0.8;\n let staggerDuration = 0.2;\n\n if (key === \"fade-in\" || key === \"fade-left-slow\") {\n duration = 1.5;\n }\n\n if (els.length) {\n els.forEach((el, index) => {\n const checklists = el.querySelectorAll(\"[class*=as-check-list]\");\n\n if (checklists.length) {\n let children = [];\n\n Array.from(el.children).forEach((child) => {\n if ([\"as-check-list\"].some((className) => child.classList.contains(className))) {\n const lis = Array.from(child.querySelectorAll(\"li\"));\n\n children = [...children, ...lis];\n\n if (lis.length > 8) {\n duration = 0.4;\n staggerDuration = 0.1;\n }\n } else {\n children.push(child);\n }\n });\n\n children.map((child) => child.setAttribute(\"data-sr\", \"fade-up\"));\n\n el.removeAttribute(\"data-sr\");\n els.splice(index, 1, ...children);\n }\n });\n\n const doAnimation = () => {\n animate(els, opts, {\n duration,\n delay: stagger(staggerDuration),\n }).finished.then((animations) => {\n animations?.forEach((animation) => {\n animation.effect?.target?.setAttribute(\"data-sr-done\", true);\n });\n\n group.setAttribute(\"data-sr-done\", true);\n });\n };\n\n if (group.dataset.srGroup === \"onload\") {\n doAnimation();\n } else {\n inView(group, doAnimation, {\n margin: \"0px 0px -25% 0px\",\n });\n }\n }\n }\n }\n};\n\nconst handleMutations = (group, mutationList) => {\n for (const mutation of mutationList) {\n if (mutation.type === \"childList\") {\n reveal(group);\n }\n }\n};\n\nexport default {\n init: () => {\n document.querySelectorAll(\"[data-slide-reveal]\").forEach((el) => {\n const observer = new IntersectionObserver(([e]) => {\n if (e.isIntersecting) {\n animateSlideReveal(el);\n\n observer.disconnect();\n }\n });\n\n observer.observe(el);\n });\n\n document.querySelectorAll(\"[data-sr-group]\").forEach((group) => {\n if (group.closest(\"[data-disable-animations]\")) {\n group.removeAttribute(\"data-sr-group\");\n return;\n }\n\n if (group.dataset.srGroup === \"mobile\") {\n if (window.matchMedia(\"(max-width: 767px)\").matches) {\n reveal(group);\n }\n\n return;\n }\n\n if (group.dataset.srGroup !== \"trigger\") {\n reveal(group);\n }\n\n if (group.dataset.srGroup === \"observe\") {\n const observer = new MutationObserver(handleMutations.bind(null, group));\n\n observer.observe(group, {\n childList: true,\n subtree: true,\n });\n }\n\n if (group.dataset.srGroup === \"observe-only-children\") {\n const observer = new MutationObserver(handleMutations.bind(null, group));\n\n observer.observe(group, {\n childList: true,\n });\n }\n });\n },\n reveal,\n};\n","import { on } from \"delegated-events\";\n\nconst topBar = document.querySelector(\".site-announcement-bar\");\n\nconst handleClose = () => {\n topBar.remove();\n setHeight();\n};\n\nconst setHeight = () => {\n document.documentElement.style.setProperty(\"--site-announcement-height\", `${topBar.offsetHeight}px`);\n};\n\nexport default {\n init: () => {\n if (topBar) {\n on(\"click\", \".site-announcement-bar-close\", handleClose);\n\n setHeight();\n window.addEventListener(\"resize\", setHeight);\n }\n },\n};\n","import { on, fire } from \"delegated-events\";\nimport scrollTo from \"@common/scroll-to\";\n\nconst handleScroll = (event, el) => {\n let targetSelector = null;\n\n if (el.dataset.scroll) {\n targetSelector = el.dataset.scroll;\n } else if (el.tagName === \"A\") {\n targetSelector = el.hash;\n } else {\n return;\n }\n\n if (targetSelector) {\n const target = document.querySelector(targetSelector);\n let offset = 0;\n\n if (target) {\n event.preventDefault();\n\n // Deactivate navigation menu if active\n document.documentElement.classList.remove(\"js-menu-active\");\n\n scrollTo(target, offset);\n }\n }\n};\n\nconst handleUrl = () => {\n if (window.location.hash) {\n let targetSelector = window.location.hash;\n\n let target = document.querySelector(targetSelector);\n\n if (target) {\n document.documentElement.classList.add(\"is-scrolling\");\n window.scrollTo(0, 0);\n\n scrollTo(target);\n }\n }\n\n const urlParams = new URLSearchParams(window.location.search);\n const section = urlParams.get(\"section\");\n\n if (section) {\n const target = document.querySelector(`#${section}`);\n\n if (target) {\n document.documentElement.classList.add(\"is-scrolling\");\n\n setTimeout(() => {\n scrollTo(target);\n }, 125);\n }\n }\n};\n\n// Automatically scrolls to the first element with the [data-scrolltome] attribute\nconst handleScrollToMe = () => {\n const target = document.querySelector(\"[data-scrolltome]\");\n\n if (target) {\n setTimeout(() => {\n scrollTo(target);\n }, 250);\n }\n};\n\nexport default {\n init: () => {\n on(\"click\", \"[data-scroll]\", (event) => {\n const el = event.target.closest(\"[data-scroll]\");\n\n handleScroll(event, el);\n });\n\n // Handle any custom anchor tags\n on(\n \"click\",\n '.site-header a[href*=\"#\"]:not(.ignore-scroll), .site-footer a[href*=\"#\"]:not(.ignore-scroll), .wysiwyg a[href*=\"#\"]:not(.ignore-scroll):not([data-scroll]), .btn[href*=\"#\"]:not(.ignore-scroll):not([data-scroll])',\n (event) => {\n const el = event.target.closest(\"a\");\n\n if (el.dataset.modal !== undefined) {\n return;\n }\n\n handleScroll(event, el);\n\n fire(document.documentElement, \"scrollto:click\");\n },\n );\n\n handleUrl();\n handleScrollToMe();\n },\n};\n","const siteHeader = document.querySelector(\".site-header\");\n\nexport default {\n init: () => {\n const scrollPixel = document.querySelector(\".scroll-pixel\");\n\n if (scrollPixel) {\n const observer = new IntersectionObserver(\n ([e]) => siteHeader.classList.toggle(\"is-stuck\", e.intersectionRatio < 1),\n {\n threshold: [1],\n },\n );\n\n observer.observe(document.querySelector(\".scroll-pixel\"));\n }\n },\n};\n","import Cookies from \"js-cookie\";\nimport { on } from \"delegated-events\";\n\nconst widget = document.querySelector(\".site-widget\");\n\nconst setCookie = (state) => {\n Cookies.set(\"widgetstate\", state, {\n expires: 1,\n });\n};\n\nconst handleToggle = () => {\n const offset = widget.querySelector(\".site-widget-top\").offsetHeight;\n\n if (widget.getAttribute(\"aria-expanded\") === \"false\") {\n widget.style.transform = \"translate3d(0, 0, 0)\";\n widget.setAttribute(\"aria-expanded\", \"true\");\n setCookie(\"active\");\n } else {\n widget.style.transform = `translate3d(0, calc(100% - ${offset}px), 0)`;\n widget.setAttribute(\"aria-expanded\", \"false\");\n setCookie(\"inactive\");\n }\n};\n\nconst handleClose = (e) => {\n e.stopPropagation();\n\n widget.remove();\n};\n\nexport default {\n init: () => {\n if (widget) {\n on(\"click\", \".site-widget-top\", handleToggle);\n on(\"click\", \".site-widget-close\", handleClose);\n\n const offset = widget.querySelector(\".site-widget-top\").offsetHeight;\n\n if (Cookies.get(\"widgetstate\") === \"inactive\") {\n setTimeout(() => {\n widget.style.transform = `translate3d(0, calc(100% - ${offset}px), 0)`;\n widget.setAttribute(\"aria-expanded\", \"false\");\n }, 25);\n setCookie(\"inactive\");\n } else {\n widget.classList.add(\"no-animate\");\n widget.style.transform = \"translate3d(0, 0, 0)\";\n widget.setAttribute(\"aria-expanded\", \"true\");\n setCookie(\"active\");\n\n setTimeout(() => {\n widget.classList.remove(\"no-animate\");\n }, 750);\n }\n\n if (widget.classList.contains(\"has-auto-hide\")) {\n setTimeout(() => {\n if (widget.getAttribute(\"aria-expanded\") === \"true\") {\n widget.style.transform = `translate3d(0, calc(100% - ${offset}px), 0)`;\n widget.setAttribute(\"aria-expanded\", \"false\");\n setCookie(\"inactive\");\n }\n }, 5000);\n }\n }\n },\n};\n","import Swiper from \"swiper\";\nimport { A11y, Autoplay, EffectFade, Pagination } from \"swiper/modules\";\nimport \"@styles/components/slider.css\";\n\nexport default {\n init: () => {\n document.querySelectorAll(\".media-slider\").forEach((el) => {\n const container = el.querySelector(\".swiper\");\n const sliderPagination = el.querySelector(\".slider-pagination\");\n const asMultipleVideos = container.querySelectorAll(\".media-item.as-video\").length > 1;\n\n const opts = {\n modules: [A11y, Autoplay, EffectFade, Pagination],\n effect: \"fade\",\n fadeEffect: {\n crossFade: true,\n },\n loop: true,\n speed: 1000,\n };\n\n if (!asMultipleVideos) {\n opts.autoplay = {\n delay: 4000,\n pauseOnMouseEnter: true,\n };\n }\n\n if (sliderPagination) {\n opts.pagination = {\n el: sliderPagination,\n clickable: true,\n };\n }\n\n const swiper = new Swiper(container, opts);\n\n if (asMultipleVideos) {\n container.querySelectorAll(\".media-item.as-video video\").forEach((video) => {\n video.loop = false;\n video.addEventListener(\"ended\", () => {\n swiper.slideNext();\n });\n });\n\n swiper.on(\"slideChange\", () => {\n const activeSlide = swiper.slides[swiper.activeIndex];\n activeSlide.querySelector(\"video\").play();\n });\n } else {\n swiper.autoplay.stop();\n }\n\n const start = () => {\n if (asMultipleVideos) {\n const activeSlide = swiper.slides[swiper.activeIndex];\n activeSlide.querySelector(\"video\").play();\n } else {\n swiper.autoplay.start();\n }\n };\n\n const observer = new IntersectionObserver(\n ([e]) => {\n if (e.isIntersecting) {\n start();\n observer.disconnect();\n }\n },\n {\n threshold: [0.7],\n },\n );\n\n observer.observe(el);\n });\n\n document.querySelectorAll(\".media-block\").forEach((el) => {\n const asMultipleVideos = el.querySelectorAll(\".media-item.as-video\").length > 1;\n\n if (!asMultipleVideos) {\n el.querySelectorAll(\"video\").forEach((video) => {\n const observer = new IntersectionObserver(\n async ([e]) => {\n if (e.isIntersecting) {\n try {\n await video.play();\n } catch (err) {\n console.error(err);\n }\n observer.disconnect();\n }\n },\n {\n threshold: [0.7],\n },\n );\n\n observer.observe(el);\n });\n }\n });\n },\n};\n","export default {\n init: () => {\n const mobileBar = document.querySelector('.mobile-bar')\n\n if (mobileBar) {\n const observer = new IntersectionObserver(([e]) => mobileBar.classList.toggle('is-hidden', !e.isIntersecting))\n\n observer.observe(document.querySelector('.scroll-pixel'))\n }\n },\n}\n","// Thirdparty\nimport \"swiper/css\";\nimport \"swiper/css/a11y\";\nimport \"swiper/css/autoplay\";\nimport \"swiper/css/effect-fade\";\n\n// Theme\nimport \"@styles/index.css\";\n\nimport mediaSlider from \"@scripts/components/media-slider\";\nimport mobileBar from \"@scripts/components/mobile-bar\";\nimport pageOverlay from \"@scripts/components/page-overlay\";\nimport scrollReveal from \"@scripts/components/scroll-reveal\";\nimport siteAnnouncementBar from \"@scripts/components/site-announcement-bar\";\nimport scrollTo from \"@scripts/components/scroll-to\";\nimport siteHeader from \"@scripts/components/site-header\";\nimport siteWidget from \"@scripts/components/site-widget\";\n\nmediaSlider.init();\nmobileBar.init();\npageOverlay.init();\nif (!window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) {\n scrollReveal.init();\n}\nscrollTo.init();\nsiteAnnouncementBar.init();\nsiteHeader.init();\nsiteWidget.init();\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n setTimeout(() => {\n document.documentElement.classList.remove(\"_preload\");\n }, 250);\n\n const setHeights = () => {\n const siteHeader = document.querySelector(\".site-header\");\n\n if (siteHeader) {\n document.documentElement.style.setProperty(\"--site-header-height\", `${Math.ceil(siteHeader.offsetHeight)}px`);\n }\n };\n\n window.addEventListener(\"resize\", setHeights);\n\n setHeights();\n});\n\n// Dynamically load any components based on page conditions\n\nconst pageHas = (selector) => {\n return document.querySelectorAll(selector).length;\n};\n\nconst loadComponents = async () => {\n if (pageHas(\"[data-modal]\")) {\n const { default: component } = await import(/* webpackChunkName: \"components-modal\" */ \"@scripts/components/modal\");\n\n component.init();\n }\n};\n\nloadComponents();\n","import Cookies from \"js-cookie\";\n\nexport default {\n init: async () => {\n const overlayUrl = document.body.dataset.pageOverlayUrl;\n const overlayCookie = document.body.dataset.pageOverlayCookie;\n\n if (overlayUrl) {\n const { default: component } = await import(\n /* webpackChunkName: \"components-modal\" */ \"@scripts/components/modal\"\n );\n\n component.openModal({\n type: \"content\",\n url: overlayUrl,\n useCustomClose: true,\n });\n\n if (parseInt(overlayCookie) === 1) {\n Cookies.set(\"seenpageoverlay\", true, { expires: 1 });\n }\n }\n },\n};\n","import jump from \"jump.js\";\n\nconst getPageOffset = () => {\n let offset = 0;\n\n const siteHeader = document.querySelector(\".site-header\");\n\n if (siteHeader) {\n const siteHeaderHeight = getComputedStyle(document.documentElement).getPropertyValue(\"--site-header-height\");\n\n offset += parseInt(siteHeaderHeight);\n }\n\n return offset;\n};\n\nconst scrollTo = (target, additionalOffset = 0) => {\n const pageOffset = getPageOffset() * -1;\n\n if (target.dataset.scrollOffset) {\n additionalOffset = parseInt(target.dataset.scrollOffset);\n }\n\n let offset = pageOffset - additionalOffset;\n\n return new Promise((resolve) => {\n jump(target, {\n duration: 600,\n offset,\n callback: () => {\n resolve();\n },\n });\n });\n};\n\nexport const scrollToIfNeeded = (target, additionalOffset = 0) => {\n const rect = target.getBoundingClientRect();\n const viewportHeight = window.innerHeight || document.documentElement.clientHeight;\n const isInViewport = rect.top >= 0 && rect.bottom <= viewportHeight;\n const is50PercentFromTop = rect.top <= viewportHeight / 2;\n\n if (!isInViewport || !is50PercentFromTop) {\n return scrollTo(target, additionalOffset);\n }\n};\n\nexport default scrollTo;\n"],"names":["variants","opacity","transform","reveal","group","dataset","srGroup","sequence","querySelectorAll","forEach","el","variant","sr","style","display","push","ease","duration","at","inView","timeline","finished","then","animations","animation","effect","target","setAttribute","margin","key","opts","Object","entries","els","Array","from","filter","window","getComputedStyle","staggerDuration","length","index","children","child","some","className","classList","contains","lis","map","removeAttribute","splice","doAnimation","animate","delay","stagger","handleMutations","mutationList","mutation","type","topBar","document","querySelector","handleClose","remove","setHeight","documentElement","setProperty","offsetHeight","handleScroll","event","targetSelector","scroll","tagName","hash","offset","preventDefault","scrollTo","siteHeader","widget","setCookie","state","Cookies","set","expires","handleToggle","getAttribute","e","stopPropagation","container","sliderPagination","asMultipleVideos","modules","A11y","Autoplay","EffectFade","Pagination","fadeEffect","crossFade","loop","speed","autoplay","pauseOnMouseEnter","pagination","clickable","swiper","Swiper","video","addEventListener","slideNext","on","slides","activeIndex","play","stop","observer","IntersectionObserver","isIntersecting","start","disconnect","threshold","observe","async","err","console","error","init","mobileBar","toggle","overlayUrl","body","pageOverlayUrl","overlayCookie","pageOverlayCookie","default","component","openModal","url","useCustomClose","parseInt","pageOverlay","matchMedia","matches","x","easing","animateSlideReveal","closest","MutationObserver","bind","childList","subtree","undefined","modal","fire","handleUrl","location","add","section","URLSearchParams","search","get","setTimeout","handleScrollToMe","intersectionRatio","siteWidget","setHeights","Math","ceil","loadComponents","additionalOffset","pageOffset","getPageOffset","siteHeaderHeight","getPropertyValue","scrollOffset","Promise","resolve","jump","callback","scrollToIfNeeded","rect","getBoundingClientRect","viewportHeight","innerHeight","clientHeight","isInViewport","top","bottom","is50PercentFromTop"],"sourceRoot":""}