{"version":3,"file":"Example.mYscZvwA.mjs","names":["__esmMin","init_ssg_sandbox_shims","window","c","init_jsx_runtime","init_npm_react_18_3_1","ce","forceLoadRecaptcha","existingRecaptchaScript","script","useForceRecaptchaInitialization","withRecaptcha","Component","props","init_Example"],"sources":["https:/framerusercontent.com/modules/vb5BlzRKMifaw70m0229/IDYjlAJZ3K2G1n50HRJr/Example.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";// Helper function to load the reCAPTCHA script\nfunction forceLoadRecaptcha(){// Remove any existing reCAPTCHA script if already present\nconst existingRecaptchaScript=document.querySelector(\"script[src='https://www.google.com/recaptcha/api.js']\");if(existingRecaptchaScript){existingRecaptchaScript.remove();}// Create and append the new reCAPTCHA script\nconst script=document.createElement(\"script\");script.src=\"https://www.google.com/recaptcha/api.js\";script.async=true;script.defer=true;document.body.appendChild(script);// Call the reCAPTCHA initialization function from the header (if available)\nif(typeof window.initializeRecaptcha===\"function\"){window.initializeRecaptcha()// This should trigger the setup of buttons and form behavior\n;}}// Custom hook to handle reCAPTCHA initialization\nfunction useForceRecaptchaInitialization(){useEffect(()=>{// Force reCAPTCHA to load and initialize on component mount\nforceLoadRecaptcha();},[])// Empty dependency array ensures this runs only once when the component mounts\n;}// Higher-Order Component (HOC) to wrap the target component\nexport function withRecaptcha(Component){return props=>{// Call the custom hook to load reCAPTCHA when the component is rendered\nuseForceRecaptchaInitialization();// Return the wrapped component\nreturn /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withRecaptcha\":{\"type\":\"reactHoc\",\"name\":\"withRecaptcha\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Example.map"],"mappings":"A,gIACA,SAASO,GAAoB,CAC7B,IAAMC,EAAwB,SAAS,cAAc,uDAAuD,EAAKA,GAAyBA,EAAwB,OAAO,EACzK,IAAMC,EAAO,SAAS,cAAc,QAAQ,EAAE,EAAO,IAAI,0CAA0C,EAAO,MAAM,GAAK,EAAO,MAAM,GAAK,SAAS,KAAK,YAAYA,CAAM,EACpK,OAAOP,EAAO,qBAAsB,YAAYA,EAAO,oBAAoB,CAC5E,CACF,SAASQ,GAAiC,CAACJ,MAAc,CACzDC,EAAmB,CAAE,EAAE,CAAC,CAAC,CACxB,CACD,SAAgBI,EAAc,EAAU,CAAC,MAAO,KAChDD,EAAgC,EACZ,gBAAKE,EAAU,CAAC,GAAGC,CAAK,CAAC,EAAI,C"}