{"version":3,"file":"Recapta_V2.DpyvurCn.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx","useState"],"sources":["https:/framerusercontent.com/modules/JzM5qvUgtpiSP4F0t8Mq/6A5F1o3vX6Ygt16NWw66/CustomSend.js","https:/framerusercontent.com/modules/MWFSMpjsKkTaZsX9cfLD/jvJmIZOHgPyFIkBpQaQI/Recapta_V2.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function HoneypotOverrideCustom(){useEffect(()=>{const form=document.querySelector(\"form\");if(!form)return;// Create honeypot field (invisible to humans, visible to bots)\nconst honeypot=document.createElement(\"input\");honeypot.type=\"text\";honeypot.name=\"last_name\";honeypot.style.position=\"absolute\";honeypot.style.left=\"-9999px\";honeypot.style.opacity=\"0\";honeypot.setAttribute(\"tabIndex\",\"-1\");honeypot.setAttribute(\"autoComplete\",\"off\");// form.appendChild(honeypot)\n////\nasync function getClientIp(){try{const res=await fetch(\"https://api.ipify.org?format=json\");const data=await res.json();return data.ip;}catch(err){return\"unknown\";}}function getUTMParameters(){const urlParamsForm=new URLSearchParams(window.location.search);const utmLeadSource=urlParamsForm.get(\"utm_lead_source\")||sessionStorage.getItem(\"utm_lead_source\");const utmSourceLvl1=urlParamsForm.get(\"utm_source_lvl_1\")||sessionStorage.getItem(\"utm_source_lvl_1\");const utmSourceLvl2=urlParamsForm.get(\"utm_source_lvl_2\")||sessionStorage.getItem(\"utm_source_lvl_2\");const utmSourceLvl3=urlParamsForm.get(\"utm_source_lvl_3\")||sessionStorage.getItem(\"utm_source_lvl_3\");const gadSource=urlParamsForm.get(\"gad_source\")||sessionStorage.getItem(\"gad_source\");const gclid=urlParamsForm.get(\"gclid\")||sessionStorage.getItem(\"gclid\");return{utmLeadSource,utmSourceLvl1,utmSourceLvl2,utmSourceLvl3,gadSource,gclid};}// Intercept submission\nconst handler=async e=>{e.preventDefault();e.stopImmediatePropagation()// block Framer’s normal submission\n;const submitButton=document.getElementById(\"submitBtnForm\");const loaderIcon=document.getElementById(\"loaderIcon\");const buttonText=document.querySelector(\".button-text\");const info=document.getElementById(\"info\");const error=document.getElementById(\"error\");if(buttonText&&loaderIcon&&submitButton){buttonText.style.display=\"none\";loaderIcon.style.display=\"inline-block\";submitButton.disabled=true;}const formData=new FormData(form);formData.append(\"honeypot\",honeypot.value);formData.append(\"url\",window.location.href);formData.append(\"timestamp\",new Date().toISOString());const utmParams=getUTMParameters();const clientIp=await getClientIp();const phoneInput=window.phoneInput;const phoneInputField=window.phoneInputField;const phoneNumber=phoneInput?.getNumber?.()||\"\";const payload={};formData.append(\"lead_source\",utmParams.utmLeadSource||\"Online\");formData.append(\"lead_source_lv1\",utmParams.utmSourceLvl1||\"https://executivecentre.sa/\");formData.append(\"lead_source_lv2\",utmParams.utmSourceLvl2||\"Organic Traffic\");formData.append(\"lead_source_lv3\",utmParams.utmSourceLvl3||\"Arena\");formData.append(\"phone\",phoneNumber);formData.append(\"url\",parent.window.location.href);formData.append(\"client_ip\",clientIp);formData.forEach((value,key)=>{payload[key]=String(value);});// Convert FormData → JSON\nif(honeypot.value.trim()!==\"\"){//  update zapier link\ntry{const zapierRequest=await fetch(\"https://hooks.zapier.com/hooks/catch/4438683/uhegqw2/\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},mode:\"no-cors\",body:JSON.stringify(payload)});console.log(zapierRequest);}catch(err){console.log(err);console.error(\"Honeypot call failed:\",err);}window.location.href=\"/thank-you\"//\n;}else{try{const zapierRequest=await fetch(\"https://hooks.zapier.com/hooks/catch/4438683/udab4w6/\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},mode:\"no-cors\",body:JSON.stringify(payload)});console.log(zapierRequest);}catch(err){console.log(err);console.error(\"Honeypot call failed:\",err);}window.location.href=\"/thank-you\";}console.log(\"go throuh\");// return\n// else → do nothing, Framer continues normally\n};form.addEventListener(\"submit\",handler,true);return()=>{form.removeEventListener(\"submit\",handler,true);};},[]);return null;}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withHoneypotOverrideCustom(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...HoneypotOverrideCustom(props)});};}withHoneypotOverrideCustom.displayName=\"HoneypotOverrideCustom\";\nexport const __FramerMetadata__ = {\"exports\":{\"withHoneypotOverrideCustom\":{\"type\":\"reactHoc\",\"name\":\"withHoneypotOverrideCustom\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HoneypotOverrideCustom\":{\"type\":\"override\",\"name\":\"HoneypotOverrideCustom\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomSend.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 304\n * @framerIntrinsicHeight 78\n */export default function RecaptchaV2({siteKey=\"6Ld8T7srAAAAAI0Gm27MPkye0q69lufC336dAb-N\",hiddenFieldName=\"g-recaptcha-response\"}){const[token,setToken]=useState(\"\");const[rendered,setRendered]=useState(false);useEffect(()=>{const loadRecaptchaScript=()=>{if(!document.getElementById(\"recaptcha-v2-script\")){const script=document.createElement(\"script\");script.id=\"recaptcha-v2-script\";script.src=\"https://www.google.com/recaptcha/api.js?onload=onRecaptchaLoadCallback&render=explicit\";script.async=true;script.defer=true;document.body.appendChild(script);// Define global callback for Google API\nwindow.onRecaptchaLoadCallback=()=>{renderRecaptcha();};}else{renderRecaptcha();}};const renderRecaptcha=()=>{if(window.grecaptcha&&!rendered){window.grecaptcha.render(\"recaptcha-v2-container\",{sitekey:siteKey,callback:response=>{setToken(response);enableSubmitButton();}});setRendered(true);}};const disableSubmitButton=()=>{const form=findParentForm();if(!form)return;const submitButton=form.querySelector('button[type=\"submit\"]');if(submitButton)submitButton.disabled=true;};const enableSubmitButton=()=>{const form=findParentForm();if(!form)return;const submitButton=form.querySelector('button[type=\"submit\"]');if(submitButton)submitButton.disabled=false;};const findParentForm=()=>{const container=document.getElementById(\"recaptcha-v2-wrapper\");if(!container)return null;return container.closest(\"form\");};loadRecaptchaScript();disableSubmitButton();},[siteKey,rendered]);return /*#__PURE__*/_jsxs(\"div\",{id:\"recaptcha-v2-wrapper\",style:{display:\"flex\",flexDirection:\"column\",gap:8},children:[/*#__PURE__*/_jsx(\"div\",{id:\"recaptcha-v2-container\"}),/*#__PURE__*/_jsx(\"input\",{style:styles.inputBox,type:\"text\",name:hiddenFieldName,value:token,required:true,readOnly:true}),!token&&/*#__PURE__*/_jsx(\"div\",{style:{fontSize:\"13px\",color:\"red\",fontFamily:\"Inter, sans-serif\"},children:\"Please verify you're not a robot*\"})]});}const styles={inputBox:{flex:\"1 1 0%\",border:\"none\",outline:\"none\",backgroundColor:\"#fff\",padding:\"0\",color:\"rgb(0, 0, 0)\",fontFamily:'Poppins, \"Poppins Placeholder\", sans-serif',fontSize:\"0\",fontStyle:\"normal\",letterSpacing:\"0\",lineHeight:\"0\",width:\"100%\"}};addPropertyControls(RecaptchaV2,{siteKey:{type:ControlType.String,title:\"Site Key\",defaultValue:\"6Ld8T7srAAAAAI0Gm27MPkye0q69lufC336dAb-N\"},hiddenFieldName:{type:ControlType.String,title:\"Hidden Field Name\",defaultValue:\"g-recaptcha-response\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RecaptchaV2\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"304\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicHeight\":\"78\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Recapta_V2.map"],"mappings":"gNAAwE,SAAgB,GAAwB,CAUE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