{"version":3,"file":"Posthog.BbPDKwk7.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/uGFkR2oynoQ2H4KUBBpY/v4jTTLW37QwHPVHQPoCf/Posthog.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";/* -------------------- UTM helpers -------------------- */function storeUTMs(){try{const q=new URLSearchParams(location.search);const keys=[\"utm_source\",\"utm_medium\",\"utm_campaign\",\"utm_term\",\"utm_content\"];const stored=JSON.parse(localStorage.getItem(\"__ph_utms\")||\"{}\");let changed=false;keys.forEach(k=>{const v=q.get(k);if(v){stored[k]=v;changed=true;}});if(changed)localStorage.setItem(\"__ph_utms\",JSON.stringify(stored));}catch{}}function getUTMs(){try{return JSON.parse(localStorage.getItem(\"__ph_utms\")||\"{}\");}catch{return{};}}/* -------------------- Email validation -------------------- */// Block obvious personal providers and common disposable inboxes.\nconst PERSONAL_DOMAINS=new Set([\"gmail.com\",\"yahoo.com\",\"outlook.com\",\"hotmail.com\",\"aol.com\",\"icloud.com\",\"proton.me\",\"protonmail.com\",\"live.com\",\"msn.com\",\"yandex.com\",\"mail.com\",\"zoho.com\",\"gmx.com\",\"me.com\",\"pm.me\",\"inbox.com\",\"fastmail.com\",\"hey.com\"]);const DISPOSABLE_DOMAINS=new Set([\"mailinator.com\",\"10minutemail.com\",\"guerrillamail.com\",\"tempmail.com\",\"trashmail.com\",\"dispostable.com\",\"yopmail.com\",\"sharklasers.com\",\"getnada.com\"]);function parseEmail(emailRaw){const email=(emailRaw||\"\").trim().toLowerCase();// require a real TLD (2+ letters) to block \".c\", \".co\" partials\nconst match=email.match(/^([^@\\s]+)@([^@\\s]+\\.[a-z]{2,})$/i);if(!match)return{email,local:\"\",domain:\"\",validSyntax:false};return{email,local:match[1],domain:match[2],validSyntax:true};}function isWorkEmail(emailRaw){const{local,domain,validSyntax}=parseEmail(emailRaw);if(!validSyntax)return{ok:false,reason:\"syntax\"};if(local.includes(\"test\")||domain.includes(\"test\"))return{ok:false,reason:\"test\"};if(domain.endsWith(\".example\")||domain===\"example.com\")return{ok:false,reason:\"test\"};if(PERSONAL_DOMAINS.has(domain)||DISPOSABLE_DOMAINS.has(domain))return{ok:false,reason:\"personal\"};return{ok:true,reason:null};}function setEmailError(el,msg){if(!el)return;try{el.setCustomValidity(msg||\"\");if(msg)el.reportValidity();}catch{}}/* -------------------- Page UTM hook -------------------- */export function PageUTMs(){useEffect(()=>{storeUTMs();},[]);return{};}/* -------------------- IDs / names -------------------- */export function FormId(){return{id:\"schedule-demo-form\"};}export function NameInput(){return{id:\"name\",name:\"name\",autoComplete:\"name\"};}/* -------------------- Email Input -------------------- */export function EmailInput(){function validate(el){if(!el)return false;const res=isWorkEmail(el.value);if(!res.ok){setEmailError(el,res.reason===\"personal\"?\"Please use your work email.\":res.reason===\"test\"?\"Please use a real work email.\":\"Enter a valid work email.\");return false;}setEmailError(el,null);return true;}// identify ONLY on blur with a strict email + session de-dupe\nfunction identifyIfValid(el){if(!el||!window.posthog)return;if(!validate(el))return;const form=el.closest(\"form\");const nameEl=form?.querySelector(\"#name\");const productEl=form?.querySelector(\"#product\")||form?.querySelector('[name=\"Which product are you interested in?\"]');const sourceEl=form?.querySelector(\"#source\")||form?.querySelector('[name=\"Where did you hear about us?\"]');const email=(el.value||\"\").trim().toLowerCase();// de-dupe within the same page/session\nconst last=window.__ph_last_identified_email;if(last===email)return;window.__ph_last_identified_email=email;const props={email,name:(nameEl?.value||\"\").trim()||undefined,product_interest:(productEl?.value||\"\").trim()||undefined,hear_about_us:(sourceEl?.value||\"\").trim()||undefined,page_url:location.href,referrer:document.referrer||null,...getUTMs()};console.log(\"PostHog identify (on blur):\",props);try{window.posthog.identify(email,props);}catch(err){console.error(\"PostHog identify error:\",err);}}return{id:\"email\",name:\"email\",type:\"email\",inputMode:\"email\",autoComplete:\"email\",onInput:e=>validate(e?.target),onBlur:e=>identifyIfValid(e?.target)};}export function ProductSelect(){return{id:\"product\",name:\"product\"};}export function SourceSelect(){return{id:\"source\",name:\"source\"};}/* -------------------- Submit capture + guard -------------------- */export function PostHogFormCapture(){return{onSubmit:e=>{const form=(e?.target)||document.getElementById(\"schedule-demo-form\");const ph=window.posthog;console.log(\"Form submit triggered\",{form,posthog:!!ph});if(!form){console.error(\"Form not found!\");return;}// Try multiple selectors to find elements\nconst emailEl=form.querySelector(\"#email\")||form.querySelector('[name=\"email\"]');const nameEl=form.querySelector(\"#name\")||form.querySelector('[name=\"name\"]');const productEl=form.querySelector(\"#product\")||form.querySelector('[name=\"Which product are you interested in?\"]');const sourceEl=form.querySelector(\"#source\")||form.querySelector('[name=\"Where did you hear about us?\"]');console.log(\"Form elements found:\",{emailEl:!!emailEl,nameEl:!!nameEl,productEl:!!productEl,sourceEl:!!sourceEl,emailValue:emailEl?.value,nameValue:nameEl?.value,productValue:productEl?.value,sourceValue:sourceEl?.value});// Email validation\nconst valid=isWorkEmail(emailEl?.value||\"\");if(!valid.ok){e?.preventDefault?.();setEmailError(emailEl,valid.reason===\"personal\"?\"Please use your work email.\":valid.reason===\"test\"?\"Please use a real work email.\":\"Enter a valid work email.\");emailEl?.focus();return;}else{setEmailError(emailEl,null);}const val=el=>(el?.value||\"\").trim();const payload={name:val(nameEl)||undefined,email:val(emailEl).toLowerCase()||undefined,product_interest:val(productEl)||undefined,hear_about_us:val(sourceEl)||undefined,page_url:location.href,referrer:document.referrer||null,...getUTMs()};console.log(\"PostHog payload:\",payload);try{if(ph&&payload.email){ph.identify(payload.email,payload);console.log(\"PostHog identify called\");}if(ph){ph.capture(\"demo_form_submitted\",payload);console.log(\"PostHog capture called\");}}catch(err){console.error(\"PostHog error:\",err);}}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withPageUTMs(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...PageUTMs(props)});};}withPageUTMs.displayName=\"PageUTMs\";export function withFormId(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...FormId(props)});};}withFormId.displayName=\"FormId\";export function withNameInput(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...NameInput(props)});};}withNameInput.displayName=\"NameInput\";export function withEmailInput(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...EmailInput(props)});};}withEmailInput.displayName=\"EmailInput\";export function withProductSelect(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...ProductSelect(props)});};}withProductSelect.displayName=\"ProductSelect\";export function withSourceSelect(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...SourceSelect(props)});};}withSourceSelect.displayName=\"SourceSelect\";export function withPostHogFormCapture(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...PostHogFormCapture(props)});};}withPostHogFormCapture.displayName=\"PostHogFormCapture\";\nexport const __FramerMetadata__ = {\"exports\":{\"ProductSelect\":{\"type\":\"override\",\"name\":\"ProductSelect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmailInput\":{\"type\":\"reactHoc\",\"name\":\"withEmailInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPageUTMs\":{\"type\":\"reactHoc\",\"name\":\"withPageUTMs\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"NameInput\":{\"type\":\"override\",\"name\":\"NameInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPostHogFormCapture\":{\"type\":\"reactHoc\",\"name\":\"withPostHogFormCapture\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withProductSelect\":{\"type\":\"reactHoc\",\"name\":\"withProductSelect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PostHogFormCapture\":{\"type\":\"override\",\"name\":\"PostHogFormCapture\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFormId\":{\"type\":\"reactHoc\",\"name\":\"withFormId\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSourceSelect\":{\"type\":\"reactHoc\",\"name\":\"withSourceSelect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FormId\":{\"type\":\"override\",\"name\":\"FormId\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SourceSelect\":{\"type\":\"override\",\"name\":\"SourceSelect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PageUTMs\":{\"type\":\"override\",\"name\":\"PageUTMs\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"EmailInput\":{\"type\":\"override\",\"name\":\"EmailInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNameInput\":{\"type\":\"reactHoc\",\"name\":\"withNameInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Posthog.map"],"mappings":"wLAAmI,SAAS,GAAW,CAAC,GAAG,CAAC,IAAM,EAAE,IAAI,gBAAgB,SAAS,OAAO,CAAO,EAAK,CAAC,aAAa,aAAa,eAAe,WAAW,cAAc,CAAO,EAAO,KAAK,MAAM,aAAa,QAAQ,YAAY,EAAE,KAAK,CAAK,EAAQ,GAAM,EAAK,QAAQ,GAAG,CAAC,IAAM,EAAE,EAAE,IAAI,EAAE,CAAI,IAAG,EAAO,GAAG,EAAE,EAAQ,KAAQ,CAAI,GAAQ,aAAa,QAAQ,YAAY,KAAK,UAAU,EAAO,CAAC,MAAO,GAAG,SAAS,GAAS,CAAC,GAAG,CAAC,OAAO,KAAK,MAAM,aAAa,QAAQ,YAAY,EAAE,KAAK,MAAO,CAAC,MAAM,EAAE,EACjK,SAAS,EAAW,EAAS,CAAC,IAAM,GAAO,GAAU,IAAI,MAAM,CAAC,aAAa,CACpgB,EAAM,EAAM,MAAM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