{"version":3,"file":"UseTypeformEmailEmbed.CoLLFupf.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/xdOtSj4oJJCWcVziSFWm/5iF6VLFbNuDHMmFnczVs/UseTypeformEmailEmbed.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";// Shared logic for injecting Typeform\nfunction injectTypeform(containerId,formId){try{const urlParams=new URLSearchParams(window.top.location.search);const email=urlParams.get(\"email\");const container=document.getElementById(containerId);if(!container)return;// Avoid injecting into this specific container multiple times\nif(container.querySelector(\"[data-tf-live]\"))return;const embedDiv=document.createElement(\"div\");embedDiv.setAttribute(\"data-tf-live\",formId);if(email){embedDiv.setAttribute(\"data-tf-hidden\",`email=${email}`);console.log(`[${containerId}] Email found: ${email}`);}else{console.log(`[${containerId}] No email param, loading without prefill`);}container.appendChild(embedDiv);console.log(`[${containerId}] Typeform embed added.`);// Load Typeform script only once globally\nif(!document.getElementById(\"typeform-embed-script\")){const script=document.createElement(\"script\");script.id=\"typeform-embed-script\";script.src=\"https://embed.typeform.com/next/embed.js\";script.onload=()=>console.log(\"Typeform global embed script loaded.\");document.body.appendChild(script);}}catch(err){console.error(`[${containerId}] Error embedding Typeform:`,err);}}// Desktop override\nexport function useTypeformDesktop(){useEffect(()=>{injectTypeform(\"typeform-embed-desktop\",\"01K8E67EF9VTT5K0DP1FVF860G\");},[]);return{};}// Tablet override\nexport function useTypeformTablet(){useEffect(()=>{injectTypeform(\"typeform-embed-tablet\",\"01K8E67EF9VTT5K0DP1FVF860G\");},[]);return{};}// Mobile override\nexport function useTypeformMobile(){useEffect(()=>{injectTypeform(\"typeform-embed-mobile\",\"01K8E67EF9VTT5K0DP1FVF860G\");},[]);return{};}// Mobile override\nexport function contratulationUseTypeformDesktop(){useEffect(()=>{injectTypeform(\"typeform-embed-desktop\",\"01KH8WF5NG780GV0A7JVK87EAX\");},[]);return{};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withuseTypeformDesktop(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...useTypeformDesktop(props)});};}withuseTypeformDesktop.displayName=\"useTypeformDesktop\";export function withuseTypeformTablet(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...useTypeformTablet(props)});};}withuseTypeformTablet.displayName=\"useTypeformTablet\";export function withuseTypeformMobile(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...useTypeformMobile(props)});};}withuseTypeformMobile.displayName=\"useTypeformMobile\";export function withcontratulationUseTypeformDesktop(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...contratulationUseTypeformDesktop(props)});};}withcontratulationUseTypeformDesktop.displayName=\"contratulationUseTypeformDesktop\";\nexport const __FramerMetadata__ = {\"exports\":{\"contratulationUseTypeformDesktop\":{\"type\":\"override\",\"name\":\"contratulationUseTypeformDesktop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useTypeformTablet\":{\"type\":\"override\",\"name\":\"useTypeformTablet\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withuseTypeformTablet\":{\"type\":\"reactHoc\",\"name\":\"withuseTypeformTablet\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withuseTypeformDesktop\":{\"type\":\"reactHoc\",\"name\":\"withuseTypeformDesktop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withuseTypeformMobile\":{\"type\":\"reactHoc\",\"name\":\"withuseTypeformMobile\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useTypeformDesktop\":{\"type\":\"override\",\"name\":\"useTypeformDesktop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useTypeformMobile\":{\"type\":\"override\",\"name\":\"useTypeformMobile\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withcontratulationUseTypeformDesktop\":{\"type\":\"reactHoc\",\"name\":\"withcontratulationUseTypeformDesktop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UseTypeformEmailEmbed.map"],"mappings":"wLACA,SAAS,EAAe,EAAY,EAAO,CAAC,GAAG,CAAiE,IAAM,EAAtD,IAAI,gBAAgB,EAAO,IAAI,SAAS,OAAO,CAAuB,IAAI,QAAQ,CAAO,EAAU,SAAS,eAAe,EAAY,CACvM,GAD2M,CAAC,GACzM,EAAU,cAAc,iBAAiB,CAAC,OAAO,IAAM,EAAS,SAAS,cAAc,MAAM,CAChG,GADiG,EAAS,aAAa,eAAe,EAAO,CAAI,GAAO,EAAS,aAAa,iBAAiB,SAAS,IAAQ,CAAC,QAAQ,IAAI,IAAI,EAAY,iBAAiB,IAAQ,EAAO,QAAQ,IAAI,IAAI,EAAY,2CAA2C,CAAE,EAAU,YAAY,EAAS,CAAC,QAAQ,IAAI,IAAI,EAAY,yBAAyB,CACxa,CAAC,SAAS,eAAe,wBAAwB,CAAC,CAAC,IAAM,EAAO,SAAS,cAAc,SAAS,CAAC,EAAO,GAAG,wBAAwB,EAAO,IAAI,2CAA2C,EAAO,WAAW,QAAQ,IAAI,uCAAuC,CAAC,SAAS,KAAK,YAAY,EAAO,QAAS,EAAI,CAAC,QAAQ,MAAM,IAAI,EAAY,6BAA6B,EAAI,EAChX,SAAgB,GAAoB,CAA4F,OAA3F,MAAc,CAAC,EAAe,yBAAyB,6BAA6B,EAAG,EAAE,CAAC,CAAO,EAAE,CACxI,SAAgB,GAAmB,CAA2F,OAA1F,MAAc,CAAC,EAAe,wBAAwB,6BAA6B,EAAG,EAAE,CAAC,CAAO,EAAE,CACtI,SAAgB,GAAmB,CAA2F,OAA1F,MAAc,CAAC,EAAe,wBAAwB,6BAA6B,EAAG,EAAE,CAAC,CAAO,EAAE,CACtI,SAAgB,GAAkC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