{"version":3,"file":"Tracking.CCGboM7n.mjs","names":["useRef","useCallback"],"sources":["https:/framerusercontent.com/modules/GeacVG9LmC1XnXllvFtc/4VZWxN5pBsQpr9p2wftH/Tracking.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback,useRef}from\"react\";import{useTracking}from\"framer\";export function CopyInstallPrompt(Component){const WrappedComponent=Component;return /*#__PURE__*/forwardRef(function Tracking(props,ref){const track=useTracking();// Preserve existing click behavior, then record the copy-install-prompt event in Framer analytics.\nconst handleClick=(...args)=>{props.onClick?.(...args);track(\"copy-install-prompt\");};return /*#__PURE__*/_jsx(WrappedComponent,{ref:ref,...props,onClick:handleClick});});}export function navStartForFree(Component){const WrappedComponent=Component;return /*#__PURE__*/forwardRef(function TrackingNavStartForFree(props,ref){const track=useTracking();// Preserve existing click behavior, then record the nav-start-for-free event in Framer analytics.\nconst handleClick=(...args)=>{props.onClick?.(...args);track(\"nav-start-for-free\");};return /*#__PURE__*/_jsx(WrappedComponent,{ref:ref,...props,onClick:handleClick});});}export function withHeroVideoClickTracking(Component){const WrappedComponent=Component;return /*#__PURE__*/forwardRef(function TrackingHeroVideoClick(props,ref){const track=useTracking();const lastTrackedRef=useRef(null);const trackHeroVideoClick=useCallback((event,source)=>{try{const timestamp=typeof event?.timeStamp===\"number\"?event.timeStamp:Date.now();const target=event?.currentTarget??event?.target??null;const previous=lastTrackedRef.current;// De-duplicate pointer/keyboard activations that happen on the same target almost instantly.\nif(previous&&previous.target===target&&previous.source!==source&&Math.abs(previous.timestamp-timestamp)<500){return;}lastTrackedRef.current={timestamp,source,target};if(typeof track===\"function\"){track(\"hero_video_click\");}}catch(_error){// Fail-safe: never block existing component interactions.\n}},[track]);const handlePointerDownCapture=useCallback(event=>{props.onPointerDownCapture?.(event);if(event?.defaultPrevented)return;trackHeroVideoClick(event,\"pointer\");},[props,trackHeroVideoClick]);const handleKeyDownCapture=useCallback(event=>{props.onKeyDownCapture?.(event);if(event?.defaultPrevented)return;const key=event?.key;const isActivationKey=key===\"Enter\"||key===\"NumpadEnter\"||key===\" \";if(!isActivationKey)return;const currentTarget=event?.currentTarget;const tagName=typeof currentTarget?.tagName===\"string\"?currentTarget.tagName.toLowerCase():\"\";const hasButtonRole=currentTarget?.getAttribute?.(\"role\")===\"button\";const isKeyboardActivatableElement=hasButtonRole||tagName===\"button\"||tagName===\"a\"||typeof currentTarget?.tabIndex===\"number\"&&currentTarget.tabIndex>=0;if(isKeyboardActivatableElement){trackHeroVideoClick(event,\"keyboard\");}},[props,trackHeroVideoClick]);return /*#__PURE__*/_jsx(WrappedComponent,{ref:ref,...props,onPointerDownCapture:handlePointerDownCapture,onKeyDownCapture:handleKeyDownCapture});});}\nexport const __FramerMetadata__ = {\"exports\":{\"navStartForFree\":{\"type\":\"reactHoc\",\"name\":\"navStartForFree\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHeroVideoClickTracking\":{\"type\":\"reactHoc\",\"name\":\"withHeroVideoClickTracking\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CopyInstallPrompt\":{\"type\":\"reactHoc\",\"name\":\"CopyInstallPrompt\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Tracking.map"],"mappings":"mLAA4H,SAAgB,EAAkB,EAAU,CAAC,IAAM,EAAiB,EAAU,OAAoB,EAAW,SAAkB,EAAM,EAAI,CAAC,IAAM,EAAM,EAAY,EACxR,GAAa,GAAG,IAAO,CAAC,EAAM,UAAU,GAAG,CAAI,EAAE,EAAM,qBAAqB,CAAE,EAAE,OAAoB,EAAK,EAAiB,CAAK,MAAI,GAAG,EAAM,QAAQ,CAAW,CAAC,CAAE,CAAC,CAAE,CACA,SAAgB,EAA2B,EAAU,CAAC,IAAM,EAAiB,EAAU,OAAoB,EAAW,SAAgC,EAAM,EAAI,CAAC,IAAM,EAAM,EAAY,EAAQ,EAAeA,EAAO,IAAI,EAAQ,EAA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