{"version":3,"file":"shared-lib.DUeVpnHr.mjs","names":[],"sources":["https:/framerusercontent.com/modules/6N4rItB93vBCFWmPezjL/pmDpldxL3wcIpmsJgIE8/New_form.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useRef}from\"react\";/**\n * @framerSupportedLayoutWidth full\n * @framerSupportedLayoutHeight auto\n */export default function CustomHubspotForm(){const[email,setEmail]=useState(\"\");const[submitted,setSubmitted]=useState(false);const[error,setError]=useState(\"\");const inputRef=useRef(null);const handleSubmit=async e=>{e.preventDefault();setError(\"\");const endpoint=`https://api.hsforms.com/submissions/v3/integration/submit/49252561/4cf00747-d5b6-49bb-b422-96fc0de0a547`;const payload={fields:[{name:\"email\",value:email}],context:{pageUri:window.location.href,pageName:document.title}};try{const res=await fetch(endpoint,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(payload)});if(res.ok){setSubmitted(true);setEmail(\"\");}else{const data=await res.json();setError(data.message||\"Something went wrong.\");}}catch{setError(\"Submission failed. Please try again.\");}};useEffect(()=>{if(inputRef.current){inputRef.current.style.setProperty(\"color\",\"white\",\"important\");}},[]);return /*#__PURE__*/_jsxs(\"div\",{style:wrapper,children:[submitted?/*#__PURE__*/_jsx(\"p\",{style:{...successText,alignSelf:\"flex-start\"},children:\"Thanks for subscribing! 🎉\"}):/*#__PURE__*/_jsx(\"form\",{onSubmit:handleSubmit,style:formStyle,children:/*#__PURE__*/_jsxs(\"div\",{style:inputWrapper,children:[/*#__PURE__*/_jsx(\"input\",{ref:inputRef,className:\"custom-form-input\",type:\"email\",value:email,onChange:e=>setEmail(e.target.value),placeholder:\"Email address\",required:true,style:inputStyle}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",className:\"subscribe-button\",style:buttonStyle,children:\"Subscribe\"})]})}),error&&/*#__PURE__*/_jsx(\"p\",{style:{...errorText,alignSelf:\"flex-start\"},children:error}),/*#__PURE__*/_jsx(\"style\",{children:`\n                .custom-form-input::placeholder {\n                    color: white !important;\n                    opacity: 1 !important;\n                    font-weight: 500 !important;\n                }\n\n                .custom-form-input:-webkit-autofill {\n                    box-shadow: 0 0 0 1000px #f2545b inset !important;\n                    -webkit-text-fill-color: white !important;\n                    caret-color: white;\n                }\n                    .subscribe-button {\n        transition: background-color 0.2s ease, color 0.2s ease;\n    }\n\n    .subscribe-button:hover {\n        background-color: #ffe0e0 !important;\n        color: #a42424 !important;\n    }\n            `})]});}// 🔧 Outer wrapper: responsive, centered\nconst wrapper={display:\"flex\",flexDirection:\"column\",alignItems:\"center\",gap:\"12px\",backgroundColor:\"transparent\",width:\"100%\",maxWidth:\"640px\",boxSizing:\"border-box\"};// 🧱 Form block\nconst formStyle={width:\"100%\"};// 🔄 Input & button inline, with no overflow\nconst inputWrapper={display:\"flex\",flexDirection:\"row\",alignItems:\"center\",flexWrap:\"nowrap\",width:\"100%\",background:\"transparent\",border:\"1px solid white\",borderRadius:\"9999px\",padding:\"6px\",boxSizing:\"border-box\",gap:\"4px\"};// ✏️ Input: flexible and shrink-safe\nconst inputStyle={flexGrow:1,flexShrink:1,minWidth:0,border:\"none\",background:\"transparent\",color:\"white\",padding:\"16px 24px\",fontSize:\"20px\",fontWeight:\"500\",outline:\"none\",fontFamily:'var(--font-family-body, \"Haffer TRIAL\", sans-serif)',letterSpacing:\"-0.2px\",whiteSpace:\"nowrap\"};// 🔘 Button: fixed size, won't shrink or wrap\nconst buttonStyle={backgroundColor:\"white\",color:\"#241F1F\",border:\"none\",borderRadius:\"9999px\",padding:\"16px 24px\",fontSize:\"20px\",fontWeight:\"600\",cursor:\"pointer\",fontFamily:'var(--font-family-body, \"Haffer TRIAL\", sans-serif)',lineHeight:\"24px\",letterSpacing:\"-0.2px\",whiteSpace:\"nowrap\",flexShrink:0};// ✅ Success / Error\nconst successText={color:\"white\",fontSize:\"20px\"};const errorText={color:\"#ffcccc\",fontSize:\"14px\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomHubspotForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"full\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./New_form.map"],"mappings":"0NAGG,SAAwB,GAAmB,CAAC,GAAK,CAAC,EAAM,EAAS,CAAC,EAAS,GAAG,CAAM,CAAC,EAAU,EAAa,CAAC,GAAS,EAAM,CAAM,CAAC,EAAM,EAAS,CAAC,EAAS,GAAG,CAAO,EAAS,EAAO,KAAK,CAAO,EAAa,MAAM,GAAG,CAAoB,AAAnB,EAAE,gBAAgB,CAAC,EAAS,GAAG,CAAC,IAAM,EAAA,0GAAyH,EAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,QAAQ,MAAM,CAAO,CAAA,EAAC,QAAQ,CAAC,QAAQ,EAAO,SAAS,KAAK,SAAS,SAAS,KAAM,CAAC,EAAC,GAAG,CAAC,IAAM,EAAI,KAAM,OAAM,EAAS,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,kBAAmB,EAAC,KAAK,KAAK,UAAU,EAAQ,AAAC,EAAC,CAAC,GAAG,EAAI,GAAuB,AAAnB,GAAa,EAAK,CAAC,EAAS,GAAG,KAAM,CAAC,IAAM,EAAK,KAAM,GAAI,MAAM,CAAC,EAAS,EAAK,SAAS,wBAAwB,AAAE,CAAC,MAAK,CAAC,EAAS,uCAAuC,AAAE,CAAC,EAA4G,MAA3G,GAAU,IAAI,CAAC,AAAG,EAAS,SAAS,EAAS,QAAQ,MAAM,YAAY,QAAQ,QAAQ,YAAY,AAAG,EAAC,CAAE,EAAC,CAAqB,EAAM,MAAM,CAAC,MAAM,EAAQ,SAAS,CAAC,EAAuB,EAAK,IAAI,CAAC,MAAM,CAAC,GAAG,EAAY,UAAU,YAAa,EAAC,SAAS,4BAA6B,EAAC,CAAc,EAAK,OAAO,CAAC,SAAS,EAAa,MAAM,EA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