(our hidden element)\n // react-dom in dev mode will warn about this. There doesn't seem to be a way to render arbitrary\n // user Head without hitting this issue (our hidden element could be just \"new Document()\", but\n // this can only have 1 child, and we don't control what is being rendered so that's not an option)\n // instead we continue to render to
, and just silence warnings for and elements\n // https://github.com/facebook/react/blob/e2424f33b3ad727321fc12e75c5e94838e84c2b5/packages/react-dom-bindings/src/client/validateDOMNesting.js#L498-L520\n const originalConsoleError = console.error.bind(console)\n console.error = (...args) => {\n if (\n Array.isArray(args) &&\n args.length >= 2 &&\n args[0]?.includes(`validateDOMNesting(...): %s cannot appear as`) &&\n (args[1] === `` || args[1] === ``)\n ) {\n return undefined\n }\n return originalConsoleError(...args)\n }\n\n /* We set up observer to be able to regenerate after react-refresh\n updates our hidden element.\n */\n const observer = new MutationObserver(onHeadRendered)\n observer.observe(hiddenRoot, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true,\n })\n}\n\nexport function headHandlerForBrowser({\n pageComponent,\n staticQueryResults,\n pageComponentProps,\n}) {\n useEffect(() => {\n if (pageComponent?.Head) {\n headExportValidator(pageComponent.Head)\n\n const { render } = reactDOMUtils()\n\n const HeadElement = (\n
\n )\n\n const WrapHeadElement = apiRunner(\n `wrapRootElement`,\n { element: HeadElement },\n HeadElement,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n render(\n // just a hack to call the callback after react has done first render\n // Note: In dev, we call onHeadRendered twice( in FireCallbackInEffect and after mutualution observer dectects initail render into hiddenRoot) this is for hot reloading\n // In Prod we only call onHeadRendered in FireCallbackInEffect to render to head\n
\n \n {WrapHeadElement}\n \n ,\n hiddenRoot\n )\n }\n\n return () => {\n removePrevHeadElements()\n removeHtmlAndBodyAttributes(keysOfHtmlAndBodyAttributes)\n }\n })\n}\n","import React, { Suspense, createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\nimport { headHandlerForBrowser } from \"./head/head-export-handler-for-browser\"\n\n// Renders page\nfunction PageRenderer(props) {\n const pageComponentProps = {\n ...props,\n params: {\n ...grabMatchParams(props.location.pathname),\n ...props.pageResources.json.pageContext.__params,\n },\n }\n\n const preferDefault = m => (m && m.default) || m\n\n let pageElement\n if (props.pageResources.partialHydration) {\n pageElement = props.pageResources.partialHydration\n } else {\n pageElement = createElement(preferDefault(props.pageResources.component), {\n ...pageComponentProps,\n key: props.path || props.pageResources.page.path,\n })\n }\n\n const pageComponent = props.pageResources.head\n\n headHandlerForBrowser({\n pageComponent,\n staticQueryResults: props.pageResources.staticQueryResults,\n pageComponentProps,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n {\n element: pageElement,\n props: pageComponentProps,\n },\n pageElement,\n ({ result }) => {\n return { element: result, props: pageComponentProps }\n }\n ).pop()\n\n return wrappedPage\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport { maybeGetBrowserRedirect } from \"./redirect-utils.js\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport {\n navigate as reachNavigate,\n globalHistory,\n} from \"@gatsbyjs/reach-router\"\nimport { parsePath } from \"gatsby-link\"\n\nfunction maybeRedirect(pathname) {\n const redirect = maybeGetBrowserRedirect(pathname)\n const { hash, search } = window.location\n\n if (redirect != null) {\n window.___replace(redirect.toPath + search + hash)\n return true\n } else {\n return false\n }\n}\n\n// Catch unhandled chunk loading errors and force a restart of the app.\nlet nextRoute = ``\n\nwindow.addEventListener(`unhandledrejection`, event => {\n if (/loading chunk \\d* failed./i.test(event.reason)) {\n if (nextRoute) {\n window.location.pathname = nextRoute\n }\n }\n})\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n nextRoute = location.pathname\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n if (\n process.env.GATSBY_QUERY_ON_DEMAND &&\n process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`\n ) {\n emitter.emit(`onRouteUpdate`, { location, prevLocation })\n }\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n const { pathname, search, hash } = parsePath(to)\n const redirect = maybeGetBrowserRedirect(pathname)\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath + search + hash\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname + search + hash\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname + search).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n window.location = pathname + search + hash\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => [\n 0,\n // FIXME this is actually a big code smell, we should fix this\n // eslint-disable-next-line @babel/no-invalid-this\n this._stateStorage.read(args, args.key),\n ],\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return
\n }\n}\n\nconst compareLocationProps = (prevLocation, nextLocation) => {\n if (prevLocation.href !== nextLocation.href) {\n return true\n }\n\n if (prevLocation?.state?.key !== nextLocation?.state?.key) {\n return true\n }\n\n return false\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onPreRouteUpdate(this.props.location, prevProps.location)\n return true\n }\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n
\n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates, maybeGetBrowserRedirect }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources:\n pageResources ||\n loader.loadPageSync(location.pathname + location.search, {\n withErrorDetails: true,\n }),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(\n location.pathname + location.search,\n {\n withErrorDetails: true,\n }\n )\n\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(\n nextProps.location.pathname + nextProps.location.search\n )\n return false\n }\n\n if (\n process.env.BUILD_STAGE === `develop` &&\n nextState.pageResources.stale\n ) {\n this.loadResources(\n nextProps.location.pathname + nextProps.location.search\n )\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (\n process.env.NODE_ENV !== `production` &&\n (!this.state.pageResources ||\n this.state.pageResources.status === PageResourceStatus.Error)\n ) {\n const message = `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n if (this.state.pageResources?.error) {\n console.error(message)\n throw this.state.pageResources.error\n }\n\n throw new Error(message)\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport { Router, navigate, Location, BaseContext } from \"@gatsbyjs/reach-router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport { StaticQueryContext } from \"./static-query\"\nimport {\n SlicesMapContext,\n SlicesContext,\n SlicesResultsContext,\n} from \"./slice/context\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n getSliceResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\nimport { reactDOMUtils } from \"./react-dom-utils\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths, window.pageData)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nconst { render, hydrate } = reactDOMUtils()\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\nconst reloadStorageKey = `gatsby-reload-compilation-hash-match`\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).filter(Boolean).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n
\n \n \n )\n\n const DataContext = React.createContext({})\n\n const slicesContext = {\n renderEnvironment: `browser`,\n }\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n
\n {({ location }) => (\n \n {({ pageResources, location }) => {\n const staticQueryResults = getStaticQueryResults()\n const sliceResults = getSliceResults()\n\n return (\n \n \n \n \n \n {children}\n \n \n \n \n \n )\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n
\n {({ pageResources, location }) => (\n \n \n \n \n \n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). SSR\n // page paths might include search params, while SSG and DSG won't.\n // If page path include search params we also compare query params.\n // But only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !==\n browserLoc.pathname + (pagePath.includes(`?`) ? browserLoc.search : ``) &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath.match(/^\\/(404|500)(\\/?|.html)$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(\n __BASE_PATH__ +\n pagePath +\n (!pagePath.includes(`?`) ? browserLoc.search : ``) +\n browserLoc.hash,\n {\n replace: true,\n }\n )\n }\n\n // It's possible that sessionStorage can throw an exception if access is not granted, see https://github.com/gatsbyjs/gatsby/issues/34512\n const getSessionStorage = () => {\n try {\n return sessionStorage\n } catch {\n return null\n }\n }\n\n publicLoader.loadPage(browserLoc.pathname + browserLoc.search).then(page => {\n const sessionStorage = getSessionStorage()\n\n if (\n page?.page?.webpackCompilationHash &&\n page.page.webpackCompilationHash !== window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n // We have not matching html + js (inlined `window.___webpackCompilationHash`)\n // with our data (coming from `app-data.json` file). This can cause issues such as\n // errors trying to load static queries (as list of static queries is inside `page-data`\n // which might not match to currently loaded `.js` scripts).\n // We are making attempt to reload if hashes don't match, but we also have to handle case\n // when reload doesn't fix it (possibly broken deploy) so we don't end up in infinite reload loop\n if (sessionStorage) {\n const isReloaded = sessionStorage.getItem(reloadStorageKey) === `1`\n\n if (!isReloaded) {\n sessionStorage.setItem(reloadStorageKey, `1`)\n window.location.reload(true)\n return\n }\n }\n }\n\n if (sessionStorage) {\n sessionStorage.removeItem(reloadStorageKey)\n }\n\n if (!page || page.status === PageResourceStatus.Error) {\n const message = `page resources for ${browserLoc.pathname} not found. Not rendering React`\n\n // if the chunk throws an error we want to capture the real error\n // This should help with https://github.com/gatsbyjs/gatsby/issues/19618\n if (page && page.error) {\n console.error(message)\n throw page.error\n }\n\n throw new Error(message)\n }\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element:
},\n
,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = function App() {\n const onClientEntryRanRef = React.useRef(false)\n\n React.useEffect(() => {\n if (!onClientEntryRanRef.current) {\n onClientEntryRanRef.current = true\n if (performance.mark) {\n performance.mark(`onInitialClientRender`)\n }\n\n apiRunner(`onInitialClientRender`)\n }\n }, [])\n\n return
{SiteRoot}\n }\n\n const focusEl = document.getElementById(`gatsby-focus-wrapper`)\n\n // Client only pages have any empty body so we just do a normal\n // render to avoid React complaining about hydration mis-matches.\n let defaultRenderer = render\n if (focusEl && focusEl.children.length) {\n defaultRenderer = hydrate\n }\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n defaultRenderer\n )[0]\n\n function runRender() {\n const rootElement =\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : null\n\n renderer(
, rootElement)\n }\n\n // https://github.com/madrobby/zepto/blob/b5ed8d607f67724788ec9ff492be297f64d47dfc/src/zepto.js#L439-L450\n // TODO remove IE 10 support\n const doc = document\n if (\n doc.readyState === `complete` ||\n (doc.readyState !== `loading` && !doc.documentElement.doScroll)\n ) {\n setTimeout(function () {\n runRender()\n }, 0)\n } else {\n const handler = function () {\n doc.removeEventListener(`DOMContentLoaded`, handler, false)\n window.removeEventListener(`load`, handler, false)\n\n runRender()\n }\n\n doc.addEventListener(`DOMContentLoaded`, handler, false)\n window.addEventListener(`load`, handler, false)\n }\n\n return\n })\n})\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","const map = new WeakMap()\n\nexport function reactDOMUtils() {\n const reactDomClient = require(`react-dom/client`)\n\n const render = (Component, el) => {\n let root = map.get(el)\n if (!root) {\n map.set(el, (root = reactDomClient.createRoot(el)))\n }\n root.render(Component)\n }\n\n const hydrate = (Component, el) => reactDomClient.hydrateRoot(el, Component)\n\n return { render, hydrate }\n}\n","import redirects from \"./redirects.json\"\n\n// Convert to a map for faster lookup in maybeRedirect()\n\nconst redirectMap = new Map()\nconst redirectIgnoreCaseMap = new Map()\n\nredirects.forEach(redirect => {\n if (redirect.ignoreCase) {\n redirectIgnoreCaseMap.set(redirect.fromPath, redirect)\n } else {\n redirectMap.set(redirect.fromPath, redirect)\n }\n})\n\nexport function maybeGetBrowserRedirect(pathname) {\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n return redirect\n}\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","import React from \"react\"\n\nconst SlicesResultsContext = React.createContext({})\nconst SlicesContext = React.createContext({})\nconst SlicesMapContext = React.createContext({})\nconst SlicesPropsContext = React.createContext({})\n\nexport {\n SlicesResultsContext,\n SlicesContext,\n SlicesMapContext,\n SlicesPropsContext,\n}\n","import React from \"react\"\n\n// Ensure serverContext is not created more than once as React will throw when creating it more than once\n// https://github.com/facebook/react/blob/dd2d6522754f52c70d02c51db25eb7cbd5d1c8eb/packages/react/src/ReactServerContext.js#L101\nconst createServerContext = (name, defaultValue = null) => {\n /* eslint-disable no-undef */\n if (!globalThis.__SERVER_CONTEXT) {\n globalThis.__SERVER_CONTEXT = {}\n }\n\n if (!globalThis.__SERVER_CONTEXT[name]) {\n globalThis.__SERVER_CONTEXT[name] = React.createServerContext(\n name,\n defaultValue\n )\n }\n\n return globalThis.__SERVER_CONTEXT[name]\n}\n\nfunction createServerOrClientContext(name, defaultValue) {\n if (React.createServerContext) {\n return createServerContext(name, defaultValue)\n }\n\n return React.createContext(defaultValue)\n}\n\nexport { createServerOrClientContext }\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { createServerOrClientContext } from \"./context-utils\"\n\nconst StaticQueryContext = createServerOrClientContext(`StaticQuery`, {})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n
\n {finalData && render(finalData)}\n {!finalData && Loading (StaticQuery)
}\n \n )\n}\n\nlet warnedAboutStaticQuery = false\n\n// TODO(v6): Remove completely\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n if (process.env.NODE_ENV === `development` && !warnedAboutStaticQuery) {\n console.warn(\n `The
component is deprecated and will be removed in Gatsby v6. Use useStaticQuery instead. Refer to the migration guide for more information: https://gatsby.dev/migrating-4-to-5/#staticquery--is-deprecated`\n )\n warnedAboutStaticQuery = true\n }\n\n return (\n
\n {staticQueryData => (\n \n )}\n \n )\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n // TODO(v5): Remove since we require React >= 18\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n\n const context = React.useContext(StaticQueryContext)\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nexport { StaticQuery, StaticQueryContext, useStaticQuery }\n","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","export const onRouteUpdate = ({ location }) => {\n startup()\n\n document.querySelector('meta[name=\"generator\"]') &&\n document.querySelector('meta[name=\"generator\"]').remove()\n\n location.hash !== '' &&\n setTimeout(() => {\n let hashVal = location.hash.replace('#', '')\n let el = document.getElementById(hashVal)\n\n window.scrollTo({ top: el.offsetTop })\n }, 50)\n\n}\n\n// Startup checks and functions\nconst startup = () => {\n const tabsCheck = document.querySelectorAll('.elementor-tabs').length\n const vvTabsCheck = document.querySelectorAll('.vv-tabs').length\n const videoCheck = document\n .querySelectorAll('[data-widget_type=\"video.default\"]').length\n const formIframes = document.querySelectorAll(\n 'iframe[src*=\"info.grm\"]:not(.grm-pardot-form)'\n )\n const stickyCheck = document.querySelectorAll('[data-settings*=\"sticky\"]')\n .length\n const elementorTocCheck = document\n .querySelectorAll('.elementor-widget-table-of-contents').length\n\n const searchPageCheck = document\n .querySelectorAll('[data-elementor-id=\"23924\"]').length\n const searchButtonCheck = document.querySelectorAll('.grm-search svg')\n .length\n const hamburgerCheck = document\n .querySelectorAll('[for=\"hamburger-menu-icon\"]').length\n const vvMobileMenuCheck = document\n .querySelectorAll('.elementskit-menu-toggler').length\n const partnerSliderCheck = document\n .querySelectorAll('.elementor-image-carousel').length\n\n const megaMenuCheck = document.getElementById('ekit-megamenu-main-menu')\n\n const videoCoverButtons = document\n .querySelectorAll('.elementor-custom-embed-play').length\n\n if ( megaMenuCheck ) {\n megaMenuFix()\n\n document.getElementById('ekit-megamenu-main-menu')\n .style.pointerEvents = 'none'\n\n setTimeout(() => {\n document.getElementById('ekit-megamenu-main-menu')\n .style.pointerEvents = ''\n }\n , 1000)\n\n document.querySelectorAll('.menu-bottom').forEach((el) => {\n el.addEventListener('click', closeMegaMenu);\n })\n\n document.querySelectorAll('.elementskit-megamenu-panel a')\n .forEach((el) => {\n el.addEventListener('click', closeMegaMenu);\n })\n \n }\n \n if ( tabsCheck > 0 ) {\n initTabs()\n tabsOnClick()\n }\n\n if ( vvTabsCheck > 0 ) {\n if ( document.querySelectorAll('.vv-tabs .e-active').length === 0 )\n initVvTabs()\n\n if ( document.querySelectorAll('.e-n-tabs.e-activated').length === 0 ) {\n document.querySelector('.e-n-tabs').classList\n .add('e-activated')\n document.querySelector('.e-n-tabs').setAttribute('data-touch-mode', false)\n }\n \n vvTabsOnClick()\n }\n\n if (formIframes.length > 0) formIframeSize()\n if (videoCheck > 0) videoEmbedInit()\n if (elementorTocCheck > 0) \n elementorTocRenderList(elementorTocCheck)\n\n if (stickyCheck > 0) elementorStickyFx(stickyCheck)\n\n renderAnimations()\n smoothScrollTo()\n webFlipEvent()\n\n if (searchPageCheck > 0) loadSiteSearch()\n\n if (searchButtonCheck > 0)\n document.querySelector('.grm-search svg')\n .addEventListener('click', loadSiteSearch)\n\n if (hamburgerCheck > 0) hamburgerChange()\n if (vvMobileMenuCheck > 0) vvMobileMenu()\n\n if (partnerSliderCheck> 0) partnerSliderInit()\n\n if (videoCoverButtons > 0) videoPlayButtonCover()\n}\n\nconst videoPlayButtonCover = () => {\n let buttons = document.querySelectorAll('.elementor-custom-embed-play')\n\n buttons.forEach((button) => {\n button.addEventListener('click', () => {\n let videoCover = button.closest('.elementor-custom-embed-image-overlay')\n\n videoCover.style.display = 'none'\n \n })\n })\n}\n\nconst partnerSliderInit = () => {\n let prevButton = document.querySelector('.elementor-swiper-button-prev')\n let nextButton = document.querySelector('.elementor-swiper-button-next')\n let sliderWrap = document.querySelector('.elementor-widget-image-carousel')\n let fullSlide = document.querySelector('.elementor-image-carousel')\n \n let allSlides = document.querySelectorAll('.swiper-slide')\n\n // allSlides.forEach(slide => {\n // let widthDiv = ( document.body.clientWidth > 1024 ) ? \n // 5 : 3\n // let calcWidth = document.body.clientWidth / widthDiv\n \n // slide.querySelector('figure').style.width = calcWidth+'px' \n\n // })\n\n const style = document.createElement('style');\n style.innerHTML = `\n body .elementor .elementor-widget\n :not(.elementor-widget-text-editor)\n :not(.elementor-widget-theme-post-content) figure {\n margin:0 auto;\n width:75%;\n }\n body .elementor-image-carousel::-webkit-scrollbar {\n display: none;\n }\n body .elementor-image-carousel {\n overflow-x: scroll;\n -ms-overflow-style: none; \n scrollbar-width: none;\n }\n `\n document.head.appendChild(style)\n\n cloneNodesFn(allSlides, fullSlide)\n \n const mainLoopFn = () => {\n let scrollOffset = fullSlide.scrollLeft\n let fullSlideW = fullSlide.offsetWidth \n let newOffset = ( scrollOffset >= 2*fullSlideW ) ? 0 : scrollOffset+1\n\n fullSlide.scrollLeft = newOffset\n }\n\n let mainLoop = setInterval(mainLoopFn, 5)\n\n sliderWrap.addEventListener('mouseenter', () => {\n clearInterval(mainLoop)\n })\n\n sliderWrap.addEventListener('mouseleave', () => {\n if ( !fullSlide.getAttribute('data-clicked') )\n mainLoop = setInterval(mainLoopFn, 5)\n })\n\n prevButton.addEventListener('click', () => {\n partnerSlider(0, 5000, 'ease-in-out')\n fullSlide.setAttribute('data-clicked', 1)\n })\n\n nextButton.addEventListener('click', () => {\n partnerSlider(1, 5000, 'ease-in-out')\n fullSlide.setAttribute('data-clicked', 1)\n })\n}\n\nconst closeMegaMenu = (e) => {\n let parent = e.target.closest('.elementskit-megamenu-panel')\n \n if ( !parent ) \n return; // Exit if parent not found\n \n parent.style.display = 'none'\n \n setTimeout(() => {\n parent.style.display = 'block'\n }, 500);\n}\n\nconst partnerSlider = ( dir ) => {\n let fullSlide = document.querySelector('.elementor-image-carousel')\n let scrollOffsetInit = fullSlide.scrollLeft\n let fullSlideW = fullSlide.offsetWidth\n let slideWidth = document.querySelector('.swiper-slide').offsetWidth\n\n const animationFn = () => {\n let scrollOffset = fullSlide.scrollLeft\n let newOffset = ( dir ) ? scrollOffset+10 : scrollOffset-10\n let posFix = scrollOffsetInit%slideWidth\n\n posFix = ( posFix < 20 || posFix > slideWidth-20 ) ? 0 : posFix\n\n let scrollTo = ( dir ) ? \n scrollOffsetInit + (fullSlideW - posFix) : \n scrollOffsetInit - (fullSlideW - posFix)\n\n fullSlide.scrollLeft = newOffset\n\n if ( newOffset <= 0 ) {\n clearInterval(animation)\n\n fullSlide.scrollLeft = 2*fullSlideW\n }\n\n if ( newOffset >= 3*fullSlideW ) {\n clearInterval(animation)\n \n fullSlide.scrollLeft = fullSlideW\n }\n\n if ( (newOffset >= scrollTo && dir) ||\n (newOffset <= scrollTo && !dir) )\n clearInterval(animation)\n\n } \n\n let animation = setInterval(animationFn, 5)\n}\n\nconst cloneNodesFn = (nodes, parent) => {\n nodes.forEach(node => {\n let clone = node.cloneNode(true)\n\n clone.classList.add('clone')\n\n parent.appendChild(clone)\n });\n} \n\nconst vvMobileMenu = () => {\n let mobMenuToggles = \n document.querySelectorAll('.elementskit-menu-toggler')\n let mobSubMenuToggles = \n document.querySelectorAll('.ekit-menu-nav-link')\n\n mobMenuToggles.forEach(toggle => {\n toggle.addEventListener('click', vvHamburgerAction)\n\n })\n\n mobSubMenuToggles.forEach(toggle => {\n toggle.addEventListener('click', (e) => {\n e.preventDefault()\n\n toggle.closest('li')\n .querySelector('.elementskit-megamenu-panel').classList\n .toggle('elementskit-dropdown-open')\n })\n })\n}\n\nconst vvHamburgerAction = () => {\n let megaMenu = document.getElementById('ekit-megamenu-main-menu')\n let menuOverlay = document.querySelector('.elementskit-menu-overlay')\n\n megaMenu.classList.toggle('active')\n menuOverlay.classList.toggle('active')\n}\n\nconst megaMenuFix = () => {\n let globHeader = document\n .getElementById('global-header')\n let megaMenus = document\n .querySelectorAll('.elementskit-megamenu-panel')\n let blurredSections = document\n .getElementById('ekit-megamenu-main-menu')\n .querySelectorAll('.menu-bottom')\n let blurredTimeout\n\n blurredSections.forEach(blurredSection => {\n blurredSection.addEventListener('mouseenter', () => {\n blurredTimeout = setTimeout(() => {\n blurredSection.style.display = 'none'\n setTimeout(() => {\n blurredSection.style.display = 'block'\n }, 500);\n },\n 5000)\n }\n )\n\n blurredSection.addEventListener('mouseleave', () => {\n clearTimeout(blurredTimeout)\n })\n })\n\n if ( globHeader ) {\n globHeader.addEventListener('mouseenter', (event) => {\n setTimeout(() => {\n globHeader.querySelector('ul').style.pointerEvents = ''\n \n megaMenus.forEach((megaMenu) => {\n let offsetLeft = \n parseInt(\n megaMenu.getBoundingClientRect().left\n )\n \n if ( offsetLeft > 50 )\n megaMenu.style.left = '-'+ offsetLeft + 'px'\n })\n }, 350)\n });\n }\n}\n\nconst hamburgerChange = () => {\n let hamburger = document.querySelector('[for=\"hamburger-menu-icon\"]')\n let theInput = document.querySelector('.hamburger-menu-icon')\n let innerToggles = document\n .querySelectorAll('.grm-mega-menu > li > [for^=\"grm-mmtog-\"]')\n\n document.querySelector('body').style.overflow = ''\n \n hamburger.addEventListener('click', () => {\n if ( theInput.checked ) {\n hamburger.classList.remove('open')\n\n document.querySelector('body').style.overflow = ''\n\n } else {\n hamburger.classList.add('open')\n\n document.querySelector('body').style.overflow = 'hidden'\n }\n })\n\n innerToggles.forEach(toggle => {\n toggle.addEventListener('click', (e) => {\n e.preventDefault()\n\n let toBeChecked = toggle.getAttribute('for')\n let check = document.getElementById(toBeChecked).checked\n\n innerToggles.forEach(tog => {\n let target = tog.getAttribute('for')\n\n if ( toBeChecked !== target )\n document.getElementById(target).checked = false\n })\n\n document.getElementById(toBeChecked).checked = ( check ) ? \n false : true\n\n })\n })\n}\n\nconst loadSiteSearch = () => {\n const scriptTag = document.createElement(\"script\")\n scriptTag.src = \"https://js.sitesearch360.com/plugin/bundle/3248.js\"\n scriptTag.async = true\n document.body.appendChild(scriptTag)\n}\n\nconst renderAnimations = () => {\n const itemParentSettings = document\n .querySelectorAll('[data-settings]')\n\n itemParentSettings.forEach((item) => {\n let settings = JSON.parse(item.getAttribute('data-settings'))\n\n let transStepX = ( settings.motion_fx_translateX_speed ) ? \n settings.motion_fx_translateX_speed.size * -1 : 0\n let transStepY = ( settings.motion_fx_translateY_speed ) ?\n settings.motion_fx_translateY_speed.size * -1 : 0\n let transStepR = (settings.motion_fx_rotateZ_speed) ?\n settings.motion_fx_rotateZ_speed.size : 0\n\n if ( settings.motion_fx_range )\n item.setAttribute('data-range', settings.motion_fx_range)\n \n if ( settings.motion_fx_translateX_affectedRange ) {\n let arStart =\n settings.motion_fx_translateX_affectedRange.sizes.start\n let arEnd =\n settings.motion_fx_translateX_affectedRange.sizes.end\n\n item.setAttribute('data-ar-start', arStart)\n item.setAttribute('data-ar-end', arEnd)\n }\n\n if ( settings.motion_fx_translateX_speed ) {\n let speedSize = settings.motion_fx_translateX_speed.size\n\n item.setAttribute('data-speed', speedSize)\n }\n\n if ( settings.motion_fx_translateX_direction &&\n settings.motion_fx_translateX_direction === 'negative' ) \n transStepX = transStepX * -1\n\n if ( settings.motion_fx_translateY_direction &&\n settings.motion_fx_translateY_direction === 'negative' )\n transStepY = transStepY * -1\n\n if ( settings.motion_fx_translateX_direction &&\n settings.motion_fx_translateX_direction === 'negative' )\n transStepR = transStepR * -1\n\n if ( transStepX || transStepY || transStepR ) \n item.classList.add('parallax-item')\n if ( transStepX ) item.setAttribute('data-trans-x', transStepX)\n if ( transStepY ) item.setAttribute('data-trans-y', transStepY)\n if ( transStepR ) item.setAttribute('data-trans-r', transStepR)\n \n if ( settings._animation ) {\n item.classList.add(settings._animation)\n item.setAttribute('data-anim-delay', settings._animation_delay)\n }\n\n item.classList.add('elementor-animation')\n\n })\n\n window.onscroll = () => {\n const items = document.querySelectorAll('.elementor-animation')\n let windowScroll = window.scrollY / 10\n let viewpBottom = window.scrollY + window.innerHeight\n\n items.forEach((item) => {\n let itemBottomOffset = item.getBoundingClientRect().top +\n item.getBoundingClientRect().height +\n document.documentElement.scrollTop\n // let range = item.getAttribute('data-range')\n \n if ( itemBottomOffset > window.scrollY ) {\n if ( item.classList.contains('parallax-item') ) {\n let transX = \n windowScroll * item.getAttribute('data-trans-x')\n let transY = \n windowScroll * item.getAttribute('data-trans-y')\n let transR = \n windowScroll * item.getAttribute('data-trans-r')\n \n if ( !item.getAttribute('data-ar-end') ) {\n \n item.style.transform =\n 'translate(' + transX + 'px,' + transY + 'px) '+\n 'rotate('+ transR +'deg)'\n }\n }\n }\n\n if ( itemBottomOffset < viewpBottom ) {\n if ( item.getAttribute('data-ar-end') ) {\n let speed = item.getAttribute('data-speed')\n let end = item.getAttribute('data-ar-end')\n let limit = (window.innerHeight/100) * end\n let max = speed * end\n let calculated = \n (itemBottomOffset + limit) - viewpBottom \n\n\n if ( !item.style.transition )\n item.style.transition = 'transform .1s linear'\n\n if ( calculated > 0 ) {\n let change = parseInt(calculated/end) * 10\n\n item.style.transform = \n 'translateX(-'+ (max/100) * change +'px)'\n } \n }\n\n if ( !item.getAttribute('data-anim-played') ) {\n item.setAttribute('data-anim-played', 1)\n \n if ( item.classList.contains('slideInLeft') ) {\n item.style.transform = 'translateX(-100%)' \n } \n \n if ( item.classList.contains('zoomIn') ) {\n item.style.transform = 'scale(0)'\n }\n \n if (item.classList.contains('fadeIn')) {\n item.style.opacity = '0'\n }\n \n if ( item.getAttribute('data-anim-delay') ) {\n let msTimeout = \n parseInt(item.getAttribute('data-anim-delay'))\n \n setTimeout(() => {\n item.style = ''\n item.style.visibility = 'visible'\n }, msTimeout)\n }\n }\n }\n });\n }\n}\n\nconst smoothScrollTo = () => {\n let items = document.querySelectorAll('a[href^=\"#\"]')\n\n items.forEach((item) => {\n item.addEventListener('click', (e) => {\n e.preventDefault()\n\n const href = item.getAttribute(\"href\").toString()\n const target = document.querySelector(href)\n const offsetTop = target.getBoundingClientRect().top + \n document.documentElement.scrollTop - 60\n let focusedItem = document.querySelectorAll('.toc-focused')\n\n focusedItem &&\n focusedItem.forEach((active) => {\n active.classList.remove('toc-focused')\n })\n\n item.classList.add('toc-focused')\n target.classList.add('toc-focused')\n\n window.scrollTo({\n top: offsetTop,\n behavior: \"smooth\"\n })\n\n })\n })\n}\n\nconst elementorTocRenderList = () => {\n const elementorToc = document\n .querySelectorAll('.elementor-widget-table-of-contents')\n\n if ( elementorToc.length ) {\n elementorToc.forEach((toc) => {\n let tocBody = toc.querySelector('.elementor-toc__body')\n let h3Headings = document.querySelectorAll('h3')\n let itemList = ''\n \n h3Headings.forEach((heading, i) => {\n let anchor = 'anchor-'+ i\n\n heading.closest('.elementor-section').id = anchor\n\n itemList += \n '
'+\n ''+\n '
'+\n heading.textContent +\n ''\n })\n\n tocBody.innerHTML = \n ''+ \n itemList +\n '
'\n })\n }\n}\n\nconst elementorStickyFx = () => {\n const stickyItems = document.querySelectorAll('[data-settings*=\"sticky\"]')\n const contactOffset = document.getElementById('global-footer')\n .getBoundingClientRect().top + document.documentElement.scrollTop\n const stikyCancelBottom = contactOffset - window.innerHeight\n\n stickyItems.forEach((item) => {\n let iClasses = item.classList\n let iOffsetTop = item.getAttribute('data-offset-top') \n let settings = JSON.parse(item.getAttribute('data-settings'))\n let windowScroll = window.scrollY\n let activeStatus = iClasses.contains('sticky-active')\n let stickyOffset = settings.sticky_offset | 0\n let stickyOTP = stickyOffset\n\n if ( item.querySelector('.elementor-toc__body') )\n stickyOTP = stickyOTP + item.querySelector('.elementor-toc__body')\n .style.paddingTop\n\n if ( !iClasses.contains('sticky') ) {\n item.style.width = '100vw'\n item.setAttribute('data-offset-top', item.getBoundingClientRect()\n .top + document.documentElement.scrollTop)\n\n item.style.top = stickyOffset\n item.style.position = 'fixed'\n item.style.zIndex = 9\n iClasses.add('sticky')\n } \n\n if ( iClasses.contains('sticky') && !item.closest('header')) {\n if ( settings.sticky === \"top\" ) {\n if ( windowScroll < stikyCancelBottom ) {\n item.style.top = 0\n \n if ( (windowScroll > iOffsetTop \n && windowScroll < contactOffset) \n && !activeStatus ) {\n item.style.transform = \n 'translateY('+ stickyOTP + 'px)'\n iClasses.add('sticky-active')\n } \n \n if ( iOffsetTop > windowScroll && activeStatus ) {\n item.style.transform = ''\n iClasses.remove('sticky-active')\n }\n \n } else {\n item.style.top = (stikyCancelBottom - windowScroll) +'px'\n \n }\n \n } \n }\n\n })\n}\n\nconst webFlipEvent = () => {\n let staticFlipElement = document.querySelectorAll('.static-flip')\n\n if ( staticFlipElement.length > 0 ) {\n const webpFlip = {\n ids: [\n 'analytics-slider',\n 'workflow-slider',\n 'iforms-slider',\n ],\n switchSlide(id, visible) {\n let parent = document.getElementById(id)\n let childImg = parent\n .querySelector('.elementor-widget-container > img')\n\n if ( !childImg ) return false\n \n let src = childImg.getAttribute('src')\n let srcset = childImg.getAttribute('srcset')\n let dataSrc = parent.getAttribute('data-src')\n let dataSrcset = parent.getAttribute('data-srcset')\n\n parent.setAttribute('data-src', src)\n parent.setAttribute('data-srcset', srcset)\n\n childImg.src = dataSrc\n childImg.srcset = dataSrcset\n\n this.setStatus(id, visible)\n },\n getIds() {\n return this.ids\n },\n isInSight(id) {\n let element = document.getElementById(id)\n\n if ( element ) {\n let hT = element.getBoundingClientRect().top +\n document.documentElement.scrollTop\n let hH = element.offsetHeight\n let wH = window.innerHeight\n let wS = window.scrollY\n \n return wS > (hT + hH - wH)\n }\n },\n setStatus(id, visible) {\n let element = document.getElementById(id)\n\n if ( visible && !element.classList.contains('playing') ) {\n element.classList.add('playing')\n\n } else {\n element.classList.remove('playing')\n\n }\n },\n isPlaying(id) {\n let target = document.getElementById(id)\n\n return (target) ? target.classList.contains('playing') : false\n\n }\n }\n\n document.onscroll = () => {\n let ids = webpFlip.getIds()\n\n for ( let id of ids ) {\n if ( webpFlip.isInSight(id) ) {\n for ( let toOff of ids ) {\n if ( toOff !== id && webpFlip.isPlaying(toOff) )\n webpFlip.switchSlide(toOff, false);\n\n }\n\n !webpFlip.isPlaying(id) &&\n webpFlip.switchSlide(id, true)\n\n return false\n }\n }\n }\n }\n}\n\nconst formIframeSize = () => {\n if ( window.hasOwnProperty('rm') || typeof window.rm === 'function')\n return;\n\n window.rm = function (event) { Â \n const pddomain = \"info.grmdocumentmanagement.com\";\n const selector = 'iframe[src*=\"' + pddomain + '\"]';\n let regexp = new RegExp(pddomain);\n let isResize = event.data.hasOwnProperty('msg') &&\n event.data.msg === \"resize\";\n\n if ( regexp.test(event.origin) && isResize ) {\n let matches = document.querySelectorAll( selector );\n\n for ( let i=0; i < matches.length; i++ ) {\n if ( matches[i].contentWindow === event.source ){\n if ( !isNaN( event.data.height ) ) {\n matches[i].height = Number( event.data.height );\n\n return 1;\n }\n }\n }\n }\n }\n\n window.addEventListener(\"message\", window.rm, false);\n}\n\nconst initVvTabs = () => {\n \n document.querySelectorAll('.e-n-tabs-heading > button')[0].classList\n .add('e-active')\n document.querySelectorAll('.e-n-tabs-content > .e-con')[0].classList\n .add('e-active')\n document.querySelectorAll('.e-n-tabs-content > .elementor-widget-heading')[0].classList\n .add('e-active')\n}\n\nconst vvTabsOnClick = () => {\n let tabSelect = document\n .querySelectorAll('.e-n-tabs-heading > button, '+\n '.e-n-tabs-content > div')\n\n\n tabSelect.forEach(function (v, i) {\n let _this = tabSelect[i]\n\n _this.addEventListener('click', function (e) {\n let tabID = _this.getAttribute('data-tab-index')\n let tabTitles = document\n .querySelectorAll('.e-n-tabs [data-tab-index=\"'+ tabID +'\"]')\n let active = document.querySelectorAll('.e-n-tabs .e-active')\n let activeTabContent = document\n .querySelector('.e-n-tabs-content '+\n '> .e-con.e-active')\n\n console.log(active)\n\n active.forEach((v, i) => {\n v.classList.remove('e-active')\n })\n activeTabContent.classList.remove('e-active')\n\n tabTitles.forEach((v, i) => {\n v.classList.add('e-active')\n })\n document.querySelector(\n '.e-n-tabs-content > [data-tab-index=\"' + tabID + '\"]'\n ).classList.add('e-active')\n\n })\n })\n}\n\nconst initTabs = () => {\n document.querySelectorAll('.elementor-tab-title')[0].classList\n .add('elementor-active')\n document.querySelectorAll('[data-tab=\"1\"][role=\"tabpanel\"]')[0].style\n .display = 'block'\n}\n\nconst tabsOnClick = () => {\n let tabSelect = document.querySelectorAll('[role=\"tablist\"] [role=\"tab\"]')\n\n tabSelect.forEach(function (v, i) {\n let _this = tabSelect[i]\n\n _this.addEventListener('click', function (e) {\n let tab = _this.getAttribute('data-tab'),\n activeTab = document\n .querySelectorAll('[role=\"tablist\"] .elementor-active')[0],\n activeTabContent = document\n .querySelectorAll('[role=\"tabpanel\"][style]')[0]\n\n activeTab.classList.remove('elementor-active')\n activeTabContent.removeAttribute('style')\n\n _this.classList.add('elementor-active')\n document.querySelectorAll(\n '[data-tab=\"' + tab + '\"][role=\"tabpanel\"]'\n )[0].style.display = 'block'\n\n })\n })\n}\n\nconst videoEmbedInit = () => {\n let videos = document.querySelectorAll('[data-widget_type=\"video.default\"]')\n\n videos.forEach(function (v, i) {\n let _this = videos[i]\n let videoData = JSON.parse(_this.getAttribute('data-settings'))\n\n if ( videoData.youtube_url ) {\n let embedUrl = videoData.youtube_url.replace('watch?v=', 'embed/')\n let vidIframe = _this.querySelector('iframe')\n \n if ( !vidIframe ) { \n vidIframe = _this.querySelector('.elementor-video')\n .appendChild(document.createElement('iframe'))\n \n vidIframe.setAttribute('frameborder', 0)\n vidIframe.setAttribute('allowfullscreen', '1')\n vidIframe.setAttribute('width', '640')\n vidIframe.setAttribute('height', '360')\n vidIframe.setAttribute('allow',\n 'accelerometer; autoplay; clipboard-write;'+\n ' encrypted-media; gyroscope; picture-in-picture;'+\n ' web-share\"', 'YouTube video player')\n vidIframe.classList.add('elementor-video')\n vidIframe.style.width = '640px'\n vidIframe.style.height = '360px'\n }\n \n vidIframe.setAttribute('src', embedUrl)\n }\n })\n}\n","export const onRouteUpdate = ({\n location\n}, pluginOptions = {\n stripQueryString: false\n}) => {\n const domElem = document.querySelector(`link[rel='canonical']`);\n const existingValue = domElem.getAttribute(`href`);\n const baseProtocol = domElem.getAttribute(`data-baseProtocol`);\n const baseHost = domElem.getAttribute(`data-baseHost`);\n if (existingValue && baseProtocol && baseHost) {\n let value = `${baseProtocol}//${baseHost}${location.pathname}`;\n const {\n stripQueryString\n } = pluginOptions;\n if (!stripQueryString) {\n value += location.search;\n }\n value += location.hash;\n domElem.setAttribute(`href`, `${value}`);\n }\n};","import escapeStringRegexp from \"escape-string-regexp\";\nimport { withPrefix } from \"gatsby\";\nexport const userIsForcingNavigation = event => event.button !== 0 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;\n\n// IE does not include leading slash in anchor.pathname\nexport const slashedPathname = pathname => pathname[0] === `/` ? pathname : `/${pathname}`;\nexport const navigationWasHandledElsewhere = event => event.defaultPrevented;\nexport const findClosestAnchor = node => {\n for (; node.parentNode; node = node.parentNode) {\n if (node.nodeName.toLowerCase() === `a`) {\n return node;\n }\n }\n return null;\n};\nexport const anchorsTargetIsEquivalentToSelf = anchor => /* If target attribute is not present it's treated as _self */\nanchor.hasAttribute(`target`) === false ||\n/**\n * The browser defaults to _self, but, not all browsers set\n * a.target to the string value `_self` by default\n */\n\n/**\n * Assumption: some browsers use null/undefined for default\n * attribute values\n */\nanchor.target == null ||\n/**\n * Some browsers use the empty string to mean _self, check\n * for actual `_self`\n */\n[`_self`, ``].includes(anchor.target) ||\n/**\n * As per https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n */\nanchor.target === `_parent` && (!anchor.ownerDocument.defaultView.parent ||\n// Assumption: This can be falsey\nanchor.ownerDocument.defaultView.parent === anchor.ownerDocument.defaultView) || anchor.target === `_top` && (!anchor.ownerDocument.defaultView.top ||\n// Assumption: This can be falsey\nanchor.ownerDocument.defaultView.top === anchor.ownerDocument.defaultView);\nexport const authorIsForcingNavigation = anchor =>\n/**\n * HTML5 attribute that informs the browser to handle the\n * href as a downloadable file; let the browser handle it\n */\nanchor.hasAttribute(`download`) === true ||\n/**\n * Let the browser handle anything that doesn't look like a\n * target=\"_self\" anchor\n */\nanchorsTargetIsEquivalentToSelf(anchor) === false;\n\n// https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy\nexport const urlsAreOnSameOrigin = (origin, destination) => origin.protocol === destination.protocol && /* a.host includes both hostname and port in the expected format host:port */\norigin.host === destination.host;\nexport const pathIsNotHandledByApp = (destination, pathStartRegEx) => {\n const pathFileExtensionRegEx = /^.*\\.((?!htm)[a-z0-9]{1,5})$/i;\n return (\n /**\n * For when pathPrefix is used in an app and there happens to be a link\n * pointing to the same domain but outside of the app's pathPrefix. For\n * example, a Gatsby app lives at https://example.com/myapp/, with the\n * pathPrefix set to `/myapp`. When adding an absolute link to the same\n * domain but outside of the /myapp path, for example, `` the plugin won't catch it and\n * will navigate to an external link instead of doing a pushState resulting\n * in `https://example.com/myapp/https://example.com/not-my-app`\n */\n pathStartRegEx.test(slashedPathname(destination.pathname)) === false ||\n /**\n * Don't catch links pointed at what look like file extensions (other than\n * .htm/html extensions).\n */\n destination.pathname.search(pathFileExtensionRegEx) !== -1\n );\n};\nexport const hashShouldBeFollowed = (origin, destination) => destination.hash !== `` && (\n/**\n * Dynamically created anchor links (href=\"#my-anchor\") do not always\n * have pathname on IE\n */\ndestination.pathname === `` || /* Don't catch links pointed to the same page but with a hash. */\ndestination.pathname === origin.pathname);\nexport const routeThroughBrowserOrApp = (hrefHandler, pluginOptions) => event => {\n if (window.___failedResources) return true;\n if (userIsForcingNavigation(event)) return true;\n if (navigationWasHandledElsewhere(event)) return true;\n const clickedAnchor = findClosestAnchor(event.target);\n if (clickedAnchor == null) return true;\n if (authorIsForcingNavigation(clickedAnchor)) return true;\n\n // IE clears the host value if the anchor href changed after creation, e.g.\n // in React. Creating a new anchor element to ensure host value is present\n const destination = document.createElement(`a`);\n\n // https://html.spec.whatwg.org/multipage/links.html#concept-hyperlink-url-set\n // If clickedAnchor has no href attribute like `example`, the href getter returns empty string.\n if (clickedAnchor.href !== ``) {\n destination.href = clickedAnchor.href;\n }\n if (`SVGAnimatedString` in window && clickedAnchor.href instanceof SVGAnimatedString) {\n destination.href = clickedAnchor.href.animVal;\n }\n\n // In IE, the default port is included in the anchor host but excluded from\n // the location host. This affects the ability to directly compare\n // location host to anchor host. For example: http://example.com would\n // have a location.host of 'example.com' and an destination.host of\n // 'example.com:80' Creating anchor from the location.href to normalize the\n // host value.\n const origin = document.createElement(`a`);\n origin.href = window.location.href;\n if (urlsAreOnSameOrigin(origin, destination) === false) return true;\n\n // Regex to test pathname against pathPrefix\n const pathStartRegEx = new RegExp(`^${escapeStringRegexp(withPrefix(`/`))}`);\n if (pathIsNotHandledByApp(destination, pathStartRegEx)) return true;\n if (hashShouldBeFollowed(origin, destination)) return true;\n if (pluginOptions.excludePattern) {\n const excludeRegex = new RegExp(pluginOptions.excludePattern);\n if (excludeRegex.test(destination.pathname)) {\n return true;\n }\n }\n event.preventDefault();\n\n // See issue #8907: destination.pathname already includes pathPrefix added\n // by gatsby-transformer-remark but gatsby-link.navigate needs href without\n const destinationPathname = slashedPathname(destination.pathname).replace(pathStartRegEx, `/`);\n hrefHandler(`${destinationPathname}${destination.search}${destination.hash}`);\n return false;\n};\nexport default function (root, pluginOptions, cb) {\n const clickHandler = routeThroughBrowserOrApp(cb, pluginOptions);\n root.addEventListener(`click`, clickHandler);\n return () => root.removeEventListener(`click`, clickHandler);\n}","import { navigate } from \"gatsby\";\nimport catchLinks from \"./catch-links\";\nexport const onClientEntry = (_, pluginOptions = {}) => {\n catchLinks(window, pluginOptions, href => {\n navigate(href);\n });\n};","const listOfMetricsSend = new Set();\nfunction debounce(fn, timeout) {\n let timer = null;\n return function (...args) {\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(fn, timeout, ...args);\n };\n}\nfunction sendWebVitals(dataLayerName = `dataLayer`) {\n const win = window;\n function sendData(data) {\n if (listOfMetricsSend.has(data.name)) {\n return;\n }\n listOfMetricsSend.add(data.name);\n sendToGTM(data, win[dataLayerName]);\n }\n return import(`web-vitals/base`).then(({\n getLCP,\n getFID,\n getCLS\n }) => {\n const debouncedCLS = debounce(sendData, 3000);\n // we don't need to debounce FID - we send it when it happens\n const debouncedFID = sendData;\n // LCP can occur multiple times so we debounce it\n const debouncedLCP = debounce(sendData, 3000);\n\n // With the true flag, we measure all previous occurences too, in case we start listening to late.\n getCLS(debouncedCLS, true);\n getFID(debouncedFID, true);\n getLCP(debouncedLCP, true);\n });\n}\nfunction sendToGTM({\n name,\n value,\n id\n}, dataLayer) {\n dataLayer.push({\n event: `core-web-vitals`,\n webVitalsMeasurement: {\n name: name,\n // The `id` value will be unique to the current page load. When sending\n // multiple values from the same page (e.g. for CLS), Google Analytics can\n // compute a total by grouping on this ID (note: requires `eventLabel` to\n // be a dimension in your report).\n id,\n // Google Analytics metrics must be integers, so the value is rounded.\n // For CLS the value is first multiplied by 1000 for greater precision\n // (note: increase the multiplier for greater precision if needed).\n value: Math.round(name === `CLS` ? value * 1000 : value)\n }\n });\n}\nexport function onRouteUpdate(_, pluginOptions) {\n if (process.env.NODE_ENV === `production` || pluginOptions.includeInDevelopment) {\n // wrap inside a timeout to ensure the title has properly been changed\n setTimeout(() => {\n const data = pluginOptions.dataLayerName ? window[pluginOptions.dataLayerName] : window.dataLayer;\n const eventName = pluginOptions.routeChangeEventName ? pluginOptions.routeChangeEventName : `gatsby-route-change`;\n data.push({\n event: eventName\n });\n }, 50);\n }\n}\nexport function onInitialClientRender(_, pluginOptions) {\n // we only load the polyfill in production so we can't enable it in development\n if (process.env.NODE_ENV === `production` && pluginOptions.enableWebVitalsTracking) {\n sendWebVitals(pluginOptions.dataLayerName);\n }\n}","/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\nimport { withPrefix } from \"gatsby\";\nimport getManifestForPathname from \"./get-manifest-pathname\";\n\n// when we don't have localisation in our manifest, we tree shake everything away\nexport const onRouteUpdate = function onRouteUpdate({\n location\n}, pluginOptions) {\n if (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n const {\n localize\n } = pluginOptions;\n const manifestFilename = getManifestForPathname(location.pathname, localize, true);\n const manifestEl = document.head.querySelector(`link[rel=\"manifest\"]`);\n if (manifestEl) {\n manifestEl.setAttribute(`href`, withPrefix(manifestFilename));\n }\n }\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _gatsby = require(\"gatsby\");\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @param {boolean} shouldPrependPathPrefix\n * @return string\n */\nvar _default = (pathname, localizedManifests, shouldPrependPathPrefix = false) => {\n const defaultFilename = `manifest.webmanifest`;\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n const localizedManifest = localizedManifests.find(app => {\n let startUrl = app.start_url;\n if (shouldPrependPathPrefix) {\n startUrl = (0, _gatsby.withPrefix)(startUrl);\n }\n return pathname.startsWith(startUrl);\n });\n if (!localizedManifest) {\n return defaultFilename;\n }\n return `manifest_${localizedManifest.lang}.webmanifest`;\n};\nexports.default = _default;","import type { GatsbyImageProps } from \"gatsby-plugin-image\"\nimport React from \"react\"\nimport ReactDOM from \"react-dom/client\"\n\nlet hydrateRef\n\nexport function onRouteUpdate(): void {\n if (`requestIdleCallback` in window) {\n if (hydrateRef) {\n // @ts-ignore cancelIdleCallback is on window object\n cancelIdleCallback(hydrateRef)\n }\n\n // @ts-ignore requestIdleCallback is on window object\n hydrateRef = requestIdleCallback(hydrateImages)\n } else {\n if (hydrateRef) {\n clearTimeout(hydrateRef)\n }\n hydrateRef = setTimeout(hydrateImages)\n }\n}\n\nfunction hydrateImages(): void {\n const doc = document\n const inlineWPimages: Array
= Array.from(\n doc.querySelectorAll(`[data-wp-inline-image]`)\n )\n\n if (!inlineWPimages.length) {\n return\n }\n\n import(\n /* webpackChunkName: \"gatsby-plugin-image\" */ `gatsby-plugin-image`\n ).then(mod => {\n inlineWPimages.forEach(image => {\n // usually this is the right element to hydrate on\n const grandParentIsGatsbyImage =\n // @ts-ignore-next-line classList is on HTMLElement\n image?.parentNode?.parentNode?.classList?.contains(\n `gatsby-image-wrapper`\n )\n\n // but sometimes this is the right element\n const parentIsGatsbyImage =\n // @ts-ignore-next-line classList is on HTMLElement\n image?.parentNode?.classList?.contains(`gatsby-image-wrapper`)\n\n if (!grandParentIsGatsbyImage && !parentIsGatsbyImage) {\n return\n }\n\n const gatsbyImageHydrationElement = grandParentIsGatsbyImage\n ? image.parentNode.parentNode\n : image.parentNode\n\n if (\n image.dataset &&\n image.dataset.wpInlineImage &&\n gatsbyImageHydrationElement\n ) {\n const hydrationData = doc.querySelector(\n `script[data-wp-inline-image-hydration=\"${image.dataset.wpInlineImage}\"]`\n )\n\n if (hydrationData) {\n const imageProps: GatsbyImageProps = JSON.parse(\n hydrationData.innerHTML\n )\n\n // @ts-ignore - TODO: Fix me\n const root = ReactDOM.createRoot(gatsbyImageHydrationElement)\n root.render(React.createElement(mod.GatsbyImage, imageProps))\n }\n }\n })\n })\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","/**\n * @license React\n * react-server-dom-webpack.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var k=require(\"react\"),l={stream:!0},n=new Map,p=Symbol.for(\"react.element\"),q=Symbol.for(\"react.lazy\"),r=Symbol.for(\"react.default_value\"),t=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function u(a){t[a]||(t[a]=k.createServerContext(a,r));return t[a]}function v(a,b,c){this._status=a;this._value=b;this._response=c}v.prototype.then=function(a){0===this._status?(null===this._value&&(this._value=[]),this._value.push(a)):a()};\nfunction w(a){switch(a._status){case 3:return a._value;case 1:var b=JSON.parse(a._value,a._response._fromJSON);a._status=3;return a._value=b;case 2:b=a._value;for(var c=b.chunks,d=0;d {\n const { forward = [], ...filteredConfig } = config || {};\n const configStr = JSON.stringify(filteredConfig, (k, v) => {\n if (typeof v === 'function') {\n v = String(v);\n if (v.startsWith(k + '(')) {\n v = 'function ' + v;\n }\n }\n return v;\n });\n return [\n `!(function(w,p,f,c){`,\n Object.keys(filteredConfig).length > 0\n ? `c=w[p]=Object.assign(w[p]||{},${configStr});`\n : `c=w[p]=w[p]||{};`,\n `c[f]=(c[f]||[])`,\n forward.length > 0 ? `.concat(${JSON.stringify(forward)})` : ``,\n `})(window,'partytown','forward');`,\n snippetCode,\n ].join('');\n};\n\n/**\n * The `type` attribute for Partytown scripts, which does two things:\n *\n * 1. Prevents the `