{"version":3,"file":"GetStartedButton2.CIG-AWfl.mjs","names":["__legacyOverrideHOC_DataObserverContext"],"sources":["https:/framerusercontent.com/modules/1cLbzXMWjJG9MVAGHmST/DVVHWkoJL4YLPtynMtDz/GetStartedButton2.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";export function onButtonClick(){return{onClick:event=>{// Get base URL with any existing cookie parameters\nlet finalUrl=getUpdatedUrl(\"https://web.joinfizz.com\");// Extract Mixpanel distinct ID only if the function exists\nif(window.mixpanel&&typeof mixpanel.get_distinct_id===\"function\"){try{// Get current Mixpanel distinct ID (format: \"$device:uuid-value\")\nconst mixpanelFullId=mixpanel.get_distinct_id();// Extract just the UUID part (removing \"$device:\" if present)\nconst justUUID=mixpanelFullId.includes(\":\")?mixpanelFullId.split(\":\")[1]:mixpanelFullId;// Add the ID to the destination URL\nconst separator=finalUrl.includes(\"?\")?\"&\":\"?\";finalUrl=`${finalUrl}${separator}mpid=${encodeURIComponent(justUUID)}`;// Optional: Log for debugging\nconsole.log(\"Passing Mixpanel ID:\",justUUID);}catch(err){console.error(\"Error extracting Mixpanel ID:\",err);// Continue with navigation even if there's an error\n}}else{console.warn(\"Mixpanel.get_distinct_id is not available.\");}// Dynamically capture button text\nconst buttonText=event.target.innerText||\"Unnamed Button\";// Send the dynamic button name to Mixpanel only if the function exists\nif(window.mixpanel&&typeof mixpanel.track===\"function\"){mixpanel.track(\"Web Button Clicked\",{\"Button Name\":buttonText,Page:window.location.pathname});}else{console.warn(\"Mixpanel.track is not available.\");}// Navigate to the destination URL\nwindow.open(finalUrl);}};}// Helper functions remain the same\nfunction getAllCookies(){let cookies={};document.cookie.split(\"; \").forEach(cookie=>{let[key,value]=cookie.split(\"=\");cookies[key]=value;});return cookies;}function getUpdatedUrl(baseUrl){const cookies=getAllCookies();const queryParams=new URLSearchParams(cookies).toString();return queryParams?`${baseUrl}?${queryParams}`:baseUrl;}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withonButtonClick(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...onButtonClick(props)});};}withonButtonClick.displayName=\"onButtonClick\";\nexport const __FramerMetadata__ = {\"exports\":{\"onButtonClick\":{\"type\":\"override\",\"name\":\"onButtonClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withonButtonClick\":{\"type\":\"reactHoc\",\"name\":\"withonButtonClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GetStartedButton2.map"],"mappings":"yRAA2C,SAAgB,GAAe,CAAC,MAAM,CAAC,QAAQ,GAAO,CACjG,IAAI,EAAS,EAAc,2BAA2B,CACtD,GAAG,EAAO,iBAAiB,SAAS,iBAAkB,WAAY,GAAG,CACrE,IAAM,EAAe,SAAS,iBAAiB,CACzC,EAAS,EAAe,SAAS,IAAI,CAAC,EAAe,MAAM,IAAI,CAAC,GAAG,EACnE,EAAU,EAAS,SAAS,IAAI,CAAC,IAAI,IAC3C,AAD+C,KAAY,IAAW,EAAU,OAAO,mBAAmB,EAAS,GACnH,QAAQ,IAAI,uBAAuB,EAAS,AAAE,OAAM,EAAI,CAAC,QAAQ,MAAM,gCAAgC,EAAI,AAC1G,MAAM,QAAQ,KAAK,6CAA6C,CACjE,IAAM,EAAW,EAAM,OAAO,WAAW,iBAEzC,AADG,EAAO,iBAAiB,SAAS,OAAQ,WAAY,SAAS,MAAM,qBAAqB,CAAC,cAAc,EAAW,KAAK,EAAO,SAAS,QAAS,EAAC,CAAO,QAAQ,KAAK,mCAAmC,CAC5M,EAAO,KAAK,EAAS,AAAE,CAAC,CAAE,CAC1B,SAAS,GAAe,CAAC,IAAI,EAAQ,CAAE,EAAqG,MAApG,UAAS,OAAO,MAAM,KAAK,CAAC,QAAQ,GAAQ,CAAC,GAAG,CAAC,EAAI,EAAM,CAAC,EAAO,MAAM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