{"version":3,"file":"CTA_SendDownloadLink_OSbased_POSTHOG_Events.05NJe7o7.mjs","names":["useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/KPbe1n3qMn1ihBxVXpMe/FrZj48A0ygJLVbnDmOIU/CTA_SendDownloadLink_OSbased_POSTHOG_Events.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";const LABEL=\"Send download link\";// ── Deduplication guard ──────────────────────────────────────────────\nconst DEDUP_WINDOW_MS=600;const _lastFired={};function shouldFire(key){const now=Date.now();if(_lastFired[key]&&now-_lastFired[key]<DEDUP_WINDOW_MS){console.log(\"[PH_DEDUP] blocked duplicate:\",key,`(${now-_lastFired[key]}ms after first)`);return false;}_lastFired[key]=now;return true;}// ── OS detection ─────────────────────────────────────────────────────\nfunction detectOS(){if(typeof window===\"undefined\")return\"mac\";const params=new URLSearchParams(window.location.search);const forced=params.get(\"os\")?.toLowerCase();if(forced===\"mac\"||forced===\"apple\")return\"mac\";if(forced===\"windows\"||forced===\"win\")return\"windows\";const ua=navigator.userAgent.toLowerCase();// Apple ecosystem → Mac CTA\nif(ua.includes(\"macintosh\")||ua.includes(\"mac os x\")||ua.includes(\"iphone\")||ua.includes(\"ipad\")||ua.includes(\"ipod\"))return\"mac\";// Explicitly detected but no dedicated app → Windows CTA\nconst isAndroid=ua.includes(\"android\");const isLinux=!isAndroid&&ua.includes(\"linux\");const isChromeOS=ua.includes(\"cros\");const isWindows=ua.includes(\"windows\");if(isWindows||isAndroid||isLinux||isChromeOS)return\"windows\";// Unknown fallback\nreturn\"windows\";}function useDetectedOS(){const[os,setOS]=useState(\"mac\");useEffect(()=>{setOS(detectOS());},[]);return os;}// ── Shared button logic ──────────────────────────────────────────────\nfunction getMobileButtonProps(currentOS,targetOS,config){const show=currentOS===targetOS;return{style:{display:show?\"flex\":\"none\"},onClick(){const dedupKey=`${config.event}::${config.section}::${config.item}`;if(!shouldFire(dedupKey))return;const payload={section:config.section,label:LABEL,type:config.type,item:config.item,os:targetOS};console.log(\"POSTHOG TEST EVENT:\",config.event);console.log(\"POSTHOG TEST PAYLOAD:\",payload);if(typeof window!==\"undefined\"&&window.posthog){window.posthog.capture(config.event,payload);}}};}// ── HERO ─────────────────────────────────────────────────────────────\nexport function MobileMacButton_POSTHOG_Hero(){const os=useDetectedOS();return getMobileButtonProps(os,\"mac\",{event:\"cta_clicked\",section:\"hero\",type:\"email_link\",item:\"send_download_link\"});}export function MobileWindowsButton_POSTHOG_Hero(){const os=useDetectedOS();return getMobileButtonProps(os,\"windows\",{event:\"cta_clicked\",section:\"hero\",type:\"email_link\",item:\"send_download_link\"});}// ── MID PAGE ─────────────────────────────────────────────────────────\nexport function MobileMacButton_POSTHOG_MidPage(){const os=useDetectedOS();return getMobileButtonProps(os,\"mac\",{event:\"cta_clicked\",section:\"mid_page\",type:\"email_link\",item:\"send_download_link\"});}export function MobileWindowsButton_POSTHOG_MidPage(){const os=useDetectedOS();return getMobileButtonProps(os,\"windows\",{event:\"cta_clicked\",section:\"mid_page\",type:\"email_link\",item:\"send_download_link\"});}// ── MID PAGE FEATURE BANNER ──────────────────────────────────────────\nexport function MobileMacButton_POSTHOG_MidPageFeatureBanner(){const os=useDetectedOS();return getMobileButtonProps(os,\"mac\",{event:\"cta_clicked\",section:\"mid_page_feature_banner\",type:\"email_link\",item:\"send_download_link\"});}export function MobileWindowsButton_POSTHOG_MidPageFeatureBanner(){const os=useDetectedOS();return getMobileButtonProps(os,\"windows\",{event:\"cta_clicked\",section:\"mid_page_feature_banner\",type:\"email_link\",item:\"send_download_link\"});}// ── STICKY NAV ───────────────────────────────────────────────────────\nexport function MobileMacButton_POSTHOG_StickyNav(){const os=useDetectedOS();return getMobileButtonProps(os,\"mac\",{event:\"nav_clicked\",section:\"sticky_nav\",type:\"email_link\",item:\"send_download_link\"});}export function MobileWindowsButton_POSTHOG_StickyNav(){const os=useDetectedOS();return getMobileButtonProps(os,\"windows\",{event:\"nav_clicked\",section:\"sticky_nav\",type:\"email_link\",item:\"send_download_link\"});}// ── BOTTOM BANNER ────────────────────────────────────────────────────\nexport function MobileMacButton_POSTHOG_BottomBanner(){const os=useDetectedOS();return getMobileButtonProps(os,\"mac\",{event:\"cta_clicked\",section:\"bottom_banner\",type:\"email_link\",item:\"send_download_link\"});}export function MobileWindowsButton_POSTHOG_BottomBanner(){const os=useDetectedOS();return getMobileButtonProps(os,\"windows\",{event:\"cta_clicked\",section:\"bottom_banner\",type:\"email_link\",item:\"send_download_link\"});}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withMobileMacButton_POSTHOG_Hero(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MobileMacButton_POSTHOG_Hero(props)});};}withMobileMacButton_POSTHOG_Hero.displayName=\"MobileMacButton_POSTHOG_Hero\";export function withMobileWindowsButton_POSTHOG_Hero(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MobileWindowsButton_POSTHOG_Hero(props)});};}withMobileWindowsButton_POSTHOG_Hero.displayName=\"MobileWindowsButton_POSTHOG_Hero\";export function withMobileMacButton_POSTHOG_MidPage(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MobileMacButton_POSTHOG_MidPage(props)});};}withMobileMacButton_POSTHOG_MidPage.displayName=\"MobileMacButton_POSTHOG_MidPage\";export function withMobileWindowsButton_POSTHOG_MidPage(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MobileWindowsButton_POSTHOG_MidPage(props)});};}withMobileWindowsButton_POSTHOG_MidPage.displayName=\"MobileWindowsButton_POSTHOG_MidPage\";export function withMobileMacButton_POSTHOG_MidPageFeatureBanner(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MobileMacButton_POSTHOG_MidPageFeatureBanner(props)});};}withMobileMacButton_POSTHOG_MidPageFeatureBanner.displayName=\"MobileMacButton_POSTHOG_MidPageFeatureBanner\";export function withMobileWindowsButton_POSTHOG_MidPageFeatureBanner(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MobileWindowsButton_POSTHOG_MidPageFeatureBanner(props)});};}withMobileWindowsButton_POSTHOG_MidPageFeatureBanner.displayName=\"MobileWindowsButton_POSTHOG_MidPageFeatureBanner\";export function withMobileMacButton_POSTHOG_StickyNav(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MobileMacButton_POSTHOG_StickyNav(props)});};}withMobileMacButton_POSTHOG_StickyNav.displayName=\"MobileMacButton_POSTHOG_StickyNav\";export function withMobileWindowsButton_POSTHOG_StickyNav(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MobileWindowsButton_POSTHOG_StickyNav(props)});};}withMobileWindowsButton_POSTHOG_StickyNav.displayName=\"MobileWindowsButton_POSTHOG_StickyNav\";export function withMobileMacButton_POSTHOG_BottomBanner(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MobileMacButton_POSTHOG_BottomBanner(props)});};}withMobileMacButton_POSTHOG_BottomBanner.displayName=\"MobileMacButton_POSTHOG_BottomBanner\";export function withMobileWindowsButton_POSTHOG_BottomBanner(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MobileWindowsButton_POSTHOG_BottomBanner(props)});};}withMobileWindowsButton_POSTHOG_BottomBanner.displayName=\"MobileWindowsButton_POSTHOG_BottomBanner\";\nexport const __FramerMetadata__ = {\"exports\":{\"withMobileMacButton_POSTHOG_Hero\":{\"type\":\"reactHoc\",\"name\":\"withMobileMacButton_POSTHOG_Hero\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMobileWindowsButton_POSTHOG_BottomBanner\":{\"type\":\"reactHoc\",\"name\":\"withMobileWindowsButton_POSTHOG_BottomBanner\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MobileMacButton_POSTHOG_StickyNav\":{\"type\":\"override\",\"name\":\"MobileMacButton_POSTHOG_StickyNav\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMobileMacButton_POSTHOG_MidPage\":{\"type\":\"reactHoc\",\"name\":\"withMobileMacButton_POSTHOG_MidPage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MobileWindowsButton_POSTHOG_MidPage\":{\"type\":\"override\",\"name\":\"MobileWindowsButton_POSTHOG_MidPage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MobileMacButton_POSTHOG_MidPageFeatureBanner\":{\"type\":\"override\",\"name\":\"MobileMacButton_POSTHOG_MidPageFeatureBanner\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MobileWindowsButton_POSTHOG_BottomBanner\":{\"type\":\"override\",\"name\":\"MobileWindowsButton_POSTHOG_BottomBanner\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MobileWindowsButton_POSTHOG_MidPageFeatureBanner\":{\"type\":\"override\",\"name\":\"MobileWindowsButton_POSTHOG_MidPageFeatureBanner\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMobileWindowsButton_POSTHOG_StickyNav\":{\"type\":\"reactHoc\",\"name\":\"withMobileWindowsButton_POSTHOG_StickyNav\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMobileMacButton_POSTHOG_StickyNav\":{\"type\":\"reactHoc\",\"name\":\"withMobileMacButton_POSTHOG_StickyNav\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MobileMacButton_POSTHOG_BottomBanner\":{\"type\":\"override\",\"name\":\"MobileMacButton_POSTHOG_BottomBanner\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MobileWindowsButton_POSTHOG_StickyNav\":{\"type\":\"override\",\"name\":\"MobileWindowsButton_POSTHOG_StickyNav\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMobileMacButton_POSTHOG_MidPageFeatureBanner\":{\"type\":\"reactHoc\",\"name\":\"withMobileMacButton_POSTHOG_MidPageFeatureBanner\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMobileWindowsButton_POSTHOG_MidPage\":{\"type\":\"reactHoc\",\"name\":\"withMobileWindowsButton_POSTHOG_MidPage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMobileWindowsButton_POSTHOG_MidPageFeatureBanner\":{\"type\":\"reactHoc\",\"name\":\"withMobileWindowsButton_POSTHOG_MidPageFeatureBanner\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MobileMacButton_POSTHOG_MidPage\":{\"type\":\"override\",\"name\":\"MobileMacButton_POSTHOG_MidPage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMobileMacButton_POSTHOG_BottomBanner\":{\"type\":\"reactHoc\",\"name\":\"withMobileMacButton_POSTHOG_BottomBanner\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MobileWindowsButton_POSTHOG_Hero\":{\"type\":\"override\",\"name\":\"MobileWindowsButton_POSTHOG_Hero\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MobileMacButton_POSTHOG_Hero\":{\"type\":\"override\",\"name\":\"MobileMacButton_POSTHOG_Hero\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMobileWindowsButton_POSTHOG_Hero\":{\"type\":\"reactHoc\",\"name\":\"withMobileWindowsButton_POSTHOG_Hero\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CTA_SendDownloadLink_OSbased_POSTHOG_Events.map"],"mappings":"kMAC8C,SAAS,EAAW,EAAI,CAAC,IAAM,EAAI,KAAK,KAAK,CAAsL,OAAlL,EAAW,IAAM,EAAI,EAAW,GAAK,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