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["components/IconComponents/DropdownIcon.tsx","components/IconComponents/ShortArrow.tsx","components/Redirect.jsx","helpers/browserHelper.ts","helpers/window.js","helpers/animation.ts","hooks/useAnimationObserver.ts","components/MobileDemoBanner/styleObjects/MobileDemoBannerStyles.ts","components/MobileDemoBanner/MobileDemoBanner.tsx","pages/public/PageSlug.tsx"],"sourcesContent":["import React from 'react';\n\nexport function DropdownIcon(props: React.SVGProps): JSX.Element {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function ShortArrow(props: React.SVGProps): JSX.Element {\n return (\n \n \n \n );\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Navigate } from 'react-router-dom';\n\nexport function Redirect({ redirectUrl, statusCode }) {\n if (statusCode === 200 && typeof window !== 'undefined') {\n window.location.href = redirectUrl;\n }\n\n return ;\n}\n\nRedirect.propTypes = {\n redirectUrl: PropTypes.string.isRequired,\n statusCode: PropTypes.number.isRequired,\n};\n","export const checkIfReduceMotion = (window: Window): boolean =>\n !!(window.matchMedia && window.matchMedia('(prefers-reduced-motion)').matches);\n","export function scrollToRef(ref) {\n if (typeof window !== 'undefined') {\n window.scrollTo(0, ref.offsetTop);\n }\n}\n\nexport function smoothScrollToRef(ref) {\n if (typeof window !== 'undefined') {\n window.scrollTo({\n top: ref.current.offsetTop,\n left: 0,\n behavior: 'smooth',\n });\n }\n}\n\nexport function ensureAnchorIsLoaded() {\n if (window && window.location && window.location.hash) {\n setTimeout(() => {\n const hash = window.location.hash;\n window.location.hash = '';\n window.location.hash = hash;\n }, 300);\n }\n}\n","import { AnimationObject, Options } from '@models/animation';\n\nexport const getAnimationClassesFromDocument = (currentDocument: Document): AnimationObject => ({\n containers: [].slice.call(currentDocument.querySelectorAll('.animateContainers')),\n triggers: [].slice.call(currentDocument.querySelectorAll('.toAnimateTrigger')),\n});\n\nexport const addAnimation = (allAnimationClasses: AnimationObject, target: Element, options?: Options): void => {\n const currentContainer = target.closest('.animateContainers');\n if (currentContainer && allAnimationClasses) {\n const allToAnimate: HTMLElement[] = [].slice.call(currentContainer.querySelectorAll('.toAnimate'));\n\n allToAnimate.forEach((child, index) => {\n setTimeout(() => {\n child.style.animationDelay = `${index * 200}ms`;\n child.classList.remove('animateHidden');\n child.classList.add('animated');\n if (options?.resetOnChange) {\n child.style.opacity = '1';\n }\n }, 250);\n });\n if (!options?.resetOnChange) {\n allAnimationClasses.containers.shift();\n allAnimationClasses.triggers.shift();\n }\n }\n};\n","import { isPreviewingAnimationAtom } from '@atoms/animation';\nimport { addAnimation, getAnimationClassesFromDocument } from '@helpers/animation';\nimport { AnimationObject } from '@models/animation';\nimport { observeElementIntersect } from '@web-for-marketing/react-ui';\nimport { useSetAtom } from 'jotai';\nimport { useEffect, useRef } from 'react';\n\nexport function useAnimationObserver(change: boolean, resetOnChange = false): void {\n const animations = useRef({ containers: [], triggers: [] });\n const setPreviewingAnimation = useSetAtom(isPreviewingAnimationAtom);\n\n useEffect(() => {\n setPreviewingAnimation(false);\n }, [setPreviewingAnimation]);\n\n useEffect(() => {\n animations.current = getAnimationClassesFromDocument(document);\n observeElementIntersect(animations.current.triggers, (target: Element) =>\n addAnimation(animations.current, target, { resetOnChange })\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [change]);\n}\n","import { v2Colors } from '@web-for-marketing/react-ui';\n\nexport const mobileDemoBannerStyles = {\n hideBanner: {\n opacity: 0,\n visibility: 'hidden',\n },\n mobileDemoButtonContainer: {\n position: 'fixed',\n width: '100%',\n backgroundColor: v2Colors.background.light,\n textAlign: 'center',\n zIndex: 100,\n bottom: 0,\n opacity: 1,\n transition: 'all 0.5s ease',\n },\n mobileDemoButton: {\n margin: '1rem',\n minHeight: '0',\n height: '4.8rem',\n width: 'fit-content !important',\n padding: '1rem 5rem !important',\n },\n} as const;\n","import React, { useMemo, useState, useEffect } from 'react';\nimport { mobileDemoBannerStyles as classes } from './styleObjects/MobileDemoBannerStyles';\nimport { Grid, Button } from '@mui/material';\nimport { PopoutButton } from '@components/PopoutCustomSection/PopoutButton';\nimport { useTranslation } from '@stateManagement/TranslationContext';\nimport { getTranslation } from '@helpers/languageTranslations';\nimport { isMobileAtom } from '@atoms/appSettings';\nimport { useAtom } from 'jotai';\nimport { selectedLanguageAtom } from '@atoms/appSettings';\nimport { getLanguageByCode } from '@helpers/languages';\nimport { MobileDemoBannerType } from '@models/mobileDemoBanner';\n\nexport function MobileDemoBanner(): JSX.Element | null {\n const { selectedLanguageTranslation } = useTranslation();\n const mobileDemoBannerTranslation = useMemo(() => {\n return getTranslation(selectedLanguageTranslation, 'mobileStickyBanner');\n }, [selectedLanguageTranslation]);\n const [isMobile] = useAtom(isMobileAtom);\n const [selectedLanguage] = useAtom(selectedLanguageAtom);\n const mobileDemoBannerType = getLanguageByCode(selectedLanguage)?.mobileDemoBannerType || 'link';\n const [scrolledToBottom, setScrolledToBottom] = useState(false);\n\n useEffect(() => {\n if (isMobile) {\n const timeoutId = setTimeout(() => {\n document.addEventListener('scroll', handleScroll);\n }, 5000);\n\n return () => {\n clearTimeout(timeoutId);\n document.removeEventListener('scroll', handleScroll);\n };\n }\n }, [isMobile]);\n\n function handleScroll(): void {\n if (window.innerHeight + window.scrollY >= document.body.offsetHeight - 300) {\n setScrolledToBottom(true);\n } else {\n setScrolledToBottom(false);\n }\n }\n\n function getBannerButton(type: MobileDemoBannerType): JSX.Element | null {\n switch (type) {\n case 'link':\n return (\n \n {mobileDemoBannerTranslation.text}\n \n );\n case 'popoutButton':\n return (\n \n );\n default:\n return null;\n }\n }\n\n return isMobile ? (\n \n {getBannerButton(mobileDemoBannerType)}\n \n ) : null;\n}\n","import React, { useEffect, useRef, useMemo } from 'react';\nimport { Grid } from '@mui/material';\nimport { ErrorPage } from '@components/ErrorPage';\nimport { Redirect } from '@components/Redirect';\nimport { PageHelmet } from '@components/PageHelmet';\nimport { PageSection } from '@components/PageSection';\nimport { ensureAnchorIsLoaded } from '@helpers/window';\nimport { useAnimationObserver } from '@hooks/useAnimationObserver';\nimport { checkIfReduceMotion } from '@helpers/browserHelper';\nimport { useStaticValues } from '@stateManagement/StaticValuesContext';\nimport { PublicPage } from '@models/page';\nimport { MobileDemoBanner } from '@components/MobileDemoBanner/MobileDemoBanner';\n\nconst classes = {\n mainContent: {\n transition: 'padding 225ms cubic-bezier(0, 0, 0.2, 1)',\n },\n};\n\nfunction formSeo(page: PublicPage, prefixStringWithBaseUrl: (value?: string) => string): Record {\n const { title, description, canonical, modifiedDateUtc, prefixedImagePath } = page;\n return prefixedImagePath\n ? {\n title,\n description,\n canonical,\n dateModified: modifiedDateUtc,\n imageUrl: prefixStringWithBaseUrl(prefixedImagePath),\n }\n : { title, description, canonical, dateModified: modifiedDateUtc };\n}\n\nexport default function PageSlug(): JSX.Element {\n const { page, prefixStringWithBaseUrl } = useStaticValues();\n const reducedMotion = useRef(false);\n const pageChange = useMemo(() => !!page && !reducedMotion.current, [page, reducedMotion]);\n useAnimationObserver(pageChange);\n const disableMobileDemoBanner = page?.mobileDemoBannerDisabled;\n\n useEffect(() => {\n if (window) {\n reducedMotion.current = checkIfReduceMotion(window);\n }\n }, []);\n\n useEffect(() => {\n ensureAnchorIsLoaded();\n }, [page]);\n\n return page ? (\n page.redirectUrl ? (\n \n ) : (\n \n \n \n {!disableMobileDemoBanner ? : null}\n {Array.isArray(page.sections)\n ? page.sections.map((section, index) => )\n : null}\n \n \n )\n ) : (\n \n );\n}\n"],"names":["DropdownIcon","props","_jsx","xmlns","width","height","viewBox","color","children","fill","d","ShortArrow","stroke","strokeWidth","strokeLinecap","strokeLinejoin","Redirect","redirectUrl","statusCode","window","location","href","Navigate","to","replace","propTypes","PropTypes","isRequired","checkIfReduceMotion","matchMedia","matches","smoothScrollToRef","ref","scrollTo","top","current","offsetTop","left","behavior","ensureAnchorIsLoaded","hash","setTimeout","getAnimationClassesFromDocument","currentDocument","containers","slice","call","querySelectorAll","triggers","addAnimation","allAnimationClasses","target","options","currentContainer","closest","forEach","child","index","style","animationDelay","classList","remove","add","resetOnChange","opacity","shift","useAnimationObserver","change","animations","useRef","setPreviewingAnimation","useSetAtom","isPreviewingAnimationAtom","useEffect","document","observeElementIntersect","mobileDemoBannerStyles","hideBanner","visibility","mobileDemoButtonContainer","position","backgroundColor","v2Colors","background","light","textAlign","zIndex","bottom","transition","mobileDemoButton","margin","minHeight","padding","MobileDemoBanner","selectedLanguageTranslation","useTranslation","mobileDemoBannerTranslation","useMemo","getTranslation","isMobile","useAtom","isMobileAtom","selectedLanguage","selectedLanguageAtom","mobileDemoBannerType","getLanguageByCode","scrolledToBottom","setScrolledToBottom","useState","handleScroll","innerHeight","scrollY","body","offsetHeight","timeoutId","addEventListener","clearTimeout","removeEventListener","Grid","css","classes","undefined","type","Button","variant","link","text","PopoutButton","customSectionKey","displayMode","getBannerButton","mainContent","formSeo","page","prefixStringWithBaseUrl","title","description","canonical","modifiedDateUtc","prefixedImagePath","dateModified","imageUrl","PageSlug","useStaticValues","reducedMotion","pageChange","disableMobileDemoBanner","mobileDemoBannerDisabled","_jsxs","PageHelmet","seo","noIndex","Array","isArray","sections","map","section","PageSection","ErrorPage"],"sourceRoot":""}