{"version":3,"file":"HubSpotTrackingLoader.CBYN8J68.mjs","names":["React.useCallback"],"sources":["https:/framerusercontent.com/modules/4a5DxWFEueLeUtDnmMmb/E88y6ijz0jbAEDkjRftR/HubSpotTrackingLoader.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function HubSpotTrackingLoader(props){const{style}=props;const scriptSrc=\"https://js-eu1.hs-scripts.com/25864264.js\";const getCurrentPath=React.useCallback(()=>{if(typeof window===\"undefined\")return\"\";return`${window.location.pathname}${window.location.search}`;},[]);const queueSpaPageView=React.useCallback(()=>{if(typeof window===\"undefined\")return;const path=getCurrentPath();if(!path||window.__hsLastTrackedPath===path)return;window._hsq=window._hsq||[];window._hsq.push([\"setPath\",path]);window._hsq.push([\"trackPageView\"]);window.__hsLastTrackedPath=path;},[getCurrentPath]);const ensureTrackingScript=React.useCallback(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const existingById=document.getElementById(\"hs-script-loader\");const existingBySrc=document.querySelector(`script[src=\"${scriptSrc}\"]`);const existingScript=existingById||existingBySrc;if(existingScript){if(existingScript.id!==\"hs-script-loader\"){existingScript.id=\"hs-script-loader\";}return;}const script=document.createElement(\"script\");script.id=\"hs-script-loader\";script.type=\"text/javascript\";script.async=true;script.defer=true;script.src=scriptSrc;document.head.appendChild(script);},[scriptSrc]);const ensureRouteTrackingListeners=React.useCallback(()=>{if(typeof window===\"undefined\")return;if(window.__hsRouteListenerAttached)return;const emitRouteChange=()=>{if(typeof window===\"undefined\")return;window.dispatchEvent(new Event(\"hs-route-change\"));};if(!window.__hsHistoryPatched){const originalPushState=window.history.pushState;const originalReplaceState=window.history.replaceState;window.history.pushState=function(...args){originalPushState.apply(window.history,args);emitRouteChange();};window.history.replaceState=function(...args){originalReplaceState.apply(window.history,args);emitRouteChange();};window.__hsHistoryPatched=true;}window.addEventListener(\"popstate\",emitRouteChange);window.addEventListener(\"hs-route-change\",queueSpaPageView);window.__hsRouteListenerAttached=true;},[queueSpaPageView]);React.useEffect(()=>{if(typeof window===\"undefined\")return;window._hsq=window._hsq||[];ensureTrackingScript();ensureRouteTrackingListeners();if(!window.__hsInitialPageviewSeen){window.__hsInitialPageviewSeen=true;window.__hsLastTrackedPath=getCurrentPath()||window.__hsLastTrackedPath;return;}queueSpaPageView();},[ensureRouteTrackingListeners,ensureTrackingScript,getCurrentPath,queueSpaPageView]);return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{position:\"relative\",width:0,height:0,overflow:\"hidden\",pointerEvents:\"none\",...style}});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HubSpotTrackingLoader\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HubSpotTrackingLoader.map"],"mappings":"uIAGG,SAAwB,EAAsB,EAAM,CAAC,GAAK,CAAC,SAAO,EAAY,EAAU,4CAAkD,EAAeA,MAAiC,IAAS,OAAkB,GAAS,GAAG,EAAO,SAAS,WAAW,EAAO,SAAS,SAAW,CAAC,CAAC,EAAQ,EAAiBA,MAAsB,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAK,EAAe,EAAK,CAAC,GAAM,EAAO,sBAAsB,IAAY,EAAO,KAAK,EAAO,MAAM,CAAC,EAAE,EAAO,KAAK,KAAK,CAAC,UAAU,CAAI,CAAC,EAAE,EAAO,KAAK,KAAK,CAAC,eAAe,CAAC,EAAE,EAAO,oBAAoB,EAAK,EAAE,CAAC,CAAc,CAAC,EAAQ,EAAqBA,MAAsB,CAAC,GAAU,IAAS,QAAa,OAAO,SAAW,IAAY,OAAO,IAAM,EAAa,SAAS,eAAe,kBAAkB,EAAQ,EAAc,SAAS,cAAc,eAA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