import{r as u,R as l,P as ho,E as Nt,f as Oo,d as Lt,a as Zt,j as p,I as wo,C as bo,b as Eo,A as jo,T as s,e as So}from"./Alert.esm-CXi7FzgY.js?v=97495758439";import{u as _o}from"./index.esm-CpbFq0c5.js?v=97495758439";var f=function(){return f=Object.assign||function(o){for(var t,e=1,n=arguments.length;e{document.dispatchEvent(new CustomEvent("formUpdate"))},[]);const vo=async mo=>{if(e(!0),!n.current)return;n.current?.reset();const Vt=await n.current.executeAsync();if(!Vt)return;const go={...mo,"g-recaptcha-response":Vt},yo=await fetch(`${a.domain}/forms/martech/cms/email/submit`,{body:JSON.stringify(go),headers:{"Content-Type":"application/json"},method:"POST"});e(!1),yo.ok?c.successPageUrl?window.location.href=c.successPageUrl:o({type:"positive",icon:Ht,message:c.successMessage||"Success!"}):o({type:"negative",icon:Nt,message:"Sorry, something went wrong. Please try again."})};return p.jsxs("form",{id:c.htmlId,onSubmit:co(vo),className:`EmailForm ${fo}`.trim(),"data-analytics-form":"","data-analytics-form-module-type":po,"data-analytics-form-module-category":io,"data-analytics-form-module-label":so,children:[p.jsx("input",{...i("mesEventName"),type:"hidden",name:"mesEventName",value:c.mesEventName}),p.jsx("input",{...i("schemaUri"),type:"hidden",name:"schemaUri",value:c.mesSchemaUri}),c.uniqueId&&p.jsx("input",{...i("uniqueId"),type:"hidden",name:"uniqueId",value:c.uniqueId}),c.subscriptionKey&&p.jsx("input",{...i("subscriptionKey"),type:"hidden",name:"subscriptionKey",value:c.subscriptionKey}),c.segmentFormName&&p.jsx("input",{...i("segmentFormName"),type:"hidden",name:"segmentFormName",value:c.segmentFormName}),p.jsx("input",{...i("pagePath"),type:"hidden",name:"pagePath",value:window.location.pathname}),p.jsxs("div",{className:"digmktg-EmailForm-container",children:[p.jsxs("div",{className:`digmktg-EmailForm-inputGroup ${c.justifyContent||""}`,children:[p.jsx(wo,{...i("email"),name:"email",required:!0,className:"digmktg-EmailForm-emailInput u-spacingInlineXs",length:"lg",type:"email",placeholder:"Enter your Email",autoCorrect:"off",autoComplete:"email",maxLength:80,autoCapitalize:"none",icon:K2(c?.iconName),"data-target":"form-filler.field","data-testid":"email-input"}),p.jsx(bo,{type:"submit",size:"medium",appearance:c.buttonAppearance,isOnDarkCanvas:c.isOnDarkCanvas,fullWidthOnMobile:!0,"data-testid":"email-submit-button",disabled:t,children:Bt(c.buttonText)})]}),p.jsxs("div",{className:"digmktg-EmailForm-alertGroup",children:[p.jsx(Eo,{ref:n,sitekey:uo,size:"invisible",style:{marginBottom:0},badge:"bottomleft"}),c.hideRecaptchaBadge&&p.jsx("style",{children:".grecaptcha-badge { display: none !important; }"}),r&&p.jsx("output",{className:`digmktg-EmailForm-alert u-flex ${c.justifyContent||""}`,children:p.jsx(jo,{color:r.type,icon:r.icon,className:"u-spacingBlockXs",role:"alert",children:p.jsx(s,{size:"bodySmall",children:Bt(r.message)})})}),p.jsxs(s,{size:"bodySmall",isOnDarkCanvas:c.isOnDarkCanvas,className:c.justifyContent,children:["By submitting this form you are agreeing to receive emails from Ramsey Solutions. See our"," ",p.jsx("a",{href:"https://theramseysolutions.com/company/policies/terms-of-use",children:"Terms of Use"})," ","and"," ",p.jsx("a",{href:"https://theramseysolutions.com/company/policies/privacy-policy",children:"Privacy Policy"})," ","for more information."]}),c.hideRecaptchaBadge&&p.jsxs(s,{size:"bodySmall",isOnDarkCanvas:c.isOnDarkCanvas,className:c.justifyContent,children:["This site is protected by reCAPTCHA and the Google"," ",p.jsx("a",{href:"https://policies.google.com/privacy",children:"Privacy Policy"})," ","and"," ",p.jsx("a",{href:"https://policies.google.com/terms",children:"Terms of Service"})," ","apply."]})]})]})]})}function J2({formIndex:r}){const o=window._digmktg_forms_app.emailFormConfigs[r];return p.jsx(Zt.Provider,{value:{siteKey:window._digmktg_forms_app.RECAPTCHA_SITE_KEY},children:p.jsx(Lt.Provider,{value:window._digmktg_forms_app.environmentAwareUrls,children:p.jsx(lo.Provider,{value:o,children:p.jsx(X2,{})})})})}const W2=document.querySelectorAll(".email-form-mount-root");W2.forEach((r,o)=>{So.createRoot(r).render(p.jsx(J2,{formIndex:o}))});