PageSourceSearch

https://laiglesiafiel.com/assets/Register-07f85d6c.js

js laiglesiafiel.com collected 2026-10-02 01:34:32 UTC 17,209 bytes, 1 lines download raw bytes

1import{j as e,ay as z,be as $,cn as U,co as W,v as I,b2 as R,E as T,bg as H,M as Y,cp as _,c7 as V,cc as B,x as M,cq as D,cr as L,cs as G,ck as J,u as w}from"./vendor-ui-fc56ca80.js";import{r as g,e as K}from"./vendor-react-f9ccc48d.js";import{N as Q,a4 as X,R as Z}from"./vendor-firebase-a557f106.js";import{t as P,v as k,w as S,x as A,y as F,z as x,I as u,B as y,P as C,A as ee}from"./index-90016d22.js";import{s as se}from"./stripeService-b4a91f70.js";import{u as N}from"./vendor-utils-323b9898.js";import{f as ae}from"./utils-96af2688.js";import{C as O}from"./CrossMark-291f49d8.js";import"./vendor-charts-9af8b7c0.js";function re({steps:s,currentStep:o}){return e.jsx("div",{className:"w-full mb-8",children:e.jsx("div",{className:"flex items-center justify-between",children:s.map((n,d)=>e.jsxs("div",{className:"flex items-center flex-1",children:[e.jsxs("div",{className:"flex flex-col items-center flex-1",children:[e.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center font-semibold transition-all ${o>n.number?"bg-primary text-white":o===n.number?"bg-primary text-white ring-4 ring-primary/30":"bg-gray-200 text-gray-600"}`,children:o>n.number?e.jsx(z,{className:"h-5 w-5"}):n.number}),e.jsx("span",{className:`mt-2 text-sm font-medium transition-all ${o>=n.number?"text-primary":"text-gray-500"}`,children:n.title})]}),d<s.length-1&&e.jsx("div",{className:"flex-1 h-0.5 mx-2 mt-[-20px]",children:e.jsx("div",{className:`h-full transition-all ${o>n.number?"bg-primary":"bg-gray-200"}`})})]},n.number))})})}function te({data:s,onChange:o,onNext:n}){const[d,a]=g.useState({}),[h,c]=g.useState(!1),[r,m]=g.useState(!1),{t:i}=N("auth"),l=(t,b)=>{o({...s,[t]:b}),d[t]&&a({...d,[t]:""})},p=()=>{const t={};return s.email?/\S+@\S+\.\S+/.test(s.email)||(t.email=i("wizard.personal.errors.emailInvalid")):t.email=i("wizard.personal.errors.emailRequired"),s.password?s.password.length<6&&(t.password=i("wizard.personal.errors.passwordLength")):t.password=i("wizard.personal.errors.passwordRequired"),s.password!==s.confirmPassword&&(t.confirmPassword=i("wizard.personal.errors.passwordsMismatch")),s.displayName||(t.displayName=i("wizard.personal.errors.nameRequired")),a(t),Object.keys(t).length===0},j=t=>{t.preventDefault(),p()&&n()};return e.jsxs(P,{children:[e.jsxs(k,{children:[e.jsx(S,{className:"font-display text-2xl font-medium",children:i("wizard.personal.title")}),e.jsx(A,{children:i("wizard.personal.subtitle")})]}),e.jsx(F,{children:e.jsxs("form",{onSubmit:j,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"displayName",children:i("wizard.personal.labels.fullName")}),e.jsxs("div",{className:"relative",children:[e.jsx($,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx(u,{id:"displayName",type:"text",placeholder:i("wizard.personal.placeholders.fullName"),value:s.displayName||"",onChange:t=>l("displayName",t.target.value),className:"pl-10"})]}),d.displayName&&e.jsx("p",{className:"text-sm text-red-600",children:d.displayName})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"email",children:i("wizard.personal.labels.email")}),e.jsxs("div",{className:"relative",children:[e.jsx(U,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx(u,{id:"email",type:"email",placeholder:i("wizard.personal.placeholders.email"),value:s.email||"",onChange:t=>l("email",t.target.value),className:"pl-10"})]}),d.email&&e.jsx("p",{className:"text-sm text-red-600",children:d.email})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"phone",children:i("wizard.personal.labels.phone")}),e.jsxs("div",{className:"relative",children:[e.jsx(W,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx(u,{id:"phone",type:"tel",placeholder:i("wizard.personal.placeholders.phone"),value:s.phone||"",onChange:t=>l("phone",t.target.value),className:"pl-10"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"password",children:i("wizard.personal.labels.password")}),e.jsxs("div",{className:"relative",children:[e.jsx(I,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx(u,{id:"password",type:h?"text":"password",placeholder:i("wizard.personal.placeholders.password"),value:s.password||"",onChange:t=>l("password",t.target.value),className:"pl-10 pr-10"}),e.jsx("button",{type:"button",onClick:()=>c(t=>
1!t),"aria-label":h?"Ocultar contraseña":"Mostrar contraseña",className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 transition-colors hover:text-foreground",children:h?e.jsx(R,{className:"h-5 w-5"}):e.jsx(T,{className:"h-5 w-5"})})]}),d.password&&e.jsx("p",{className:"text-sm text-red-600",children:d.password})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"confirmPassword",children:i("wizard.personal.labels.confirmPassword")}),e.jsxs("div",{className:"relative",children:[e.jsx(I,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx(u,{id:"confirmPassword",type:r?"text":"password",placeholder:i("wizard.personal.placeholders.confirmPassword"),value:s.confirmPassword||"",onChange:t=>l("confirmPassword",t.target.value),className:"pl-10 pr-10"}),e.jsx("button",{type:"button",onClick:()=>m(t=>!t),"aria-label":r?"Ocultar contraseña":"Mostrar contraseña",className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 transition-colors hover:text-foreground",children:r?e.jsx(R,{className:"h-5 w-5"}):e.jsx(T,{className:"h-5 w-5"})})]}),d.confirmPassword&&e.jsx("p",{className:"text-sm text-red-600",children:d.confirmPassword})]}),e.jsx(y,{type:"submit",className:"w-full",children:i("wizard.personal.continue")})]})})]})}function le({data:s,onChange:o,onNext:n,onBack:d}){const[a,h]=g.useState({}),{t:c}=N("auth"),r=(l,p)=>{o({...s,[l]:p}),a[l]&&h({...a,[l]:""})},m=()=>{const l={};return s.churchName||(l.churchName=c("wizard.church.errors.nameRequired")),s.churchCountry||(l.churchCountry=c("wizard.church.errors.countryRequired")),s.churchCity||(l.churchCity=c("wizard.church.errors.cityRequired")),h(l),Object.keys(l).length===0},i=l=>{l.preventDefault(),m()&&n()};return e.jsxs(P,{children:[e.jsxs(k,{children:[e.jsx(S,{className:"font-display text-2xl font-medium",children:c("wizard.church.title")}),e.jsx(A,{children:c("wizard.church.subtitle")})]}),e.jsx(F,{children:e.jsxs("form",{onSubmit:i,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"churchName",children:c("wizard.church.labels.name")}),e.jsxs("div",{className:"relative",children:[e.jsx(H,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx(u,{id:"churchName",type:"text",placeholder:c("wizard.church.placeholders.name"),value:s.churchName||"",onChange:l=>r("churchName",l.target.value),className:"pl-10"})]}),a.churchName&&e.jsx("p",{className:"text-sm text-red-600",children:a.churchName})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"churchCountry",children:c("wizard.church.labels.country")}),e.jsxs("div",{className:"relative",children:[e.jsx(Y,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx(u,{id:"churchCountry",type:"text",placeholder:c("wizard.church.placeholders.country"),value:s.churchCountry||"",onChange:l=>r("churchCountry",l.target.value),className:"pl-10"})]}),a.churchCountry&&e.jsx("p",{className:"text-sm text-red-600",children:a.churchCountry})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"churchCity",children:c("wizard.church.labels.city")}),e.jsxs("div",{className:"relative",children:[e.jsx(_,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx(u,{id:"churchCity",type:"text",placeholder:c("wizard.church.placeholders.city"),value:s.churchCity||"",onChange:l=>r("churchCity",l.target.value),className:"pl-10"})]}),a.churchCity&&e.jsx("p",{className:"text-sm text-red-600",children:a.churchCity})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"churchAddress",children:c("wizard.church.labels.address")}),e.jsxs("div",{className:"relative",children:[e.jsx(V,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400"}),e.jsx(u,{id:"churchAddress",type:"text",placeholder:c("wizard.church.placeholders.address"),value:s.churchAddress||"",onChange:l=>r("churchAddress",l.target.value),className:"pl-10"})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(y,{type:"button",variant:"outline",onClick:d,className:"flex-1",children:c("wizard.church.back")}),e.jsx(y,{type:"submit",className:"flex-1",children:c("wizard.church.continue")})]})]})})]})}function ie({data:s,onChange:o,onNext:n,onBack:d}){const{t:a}=N("auth"),h=(r,m)=>{o({...s,selectedPlan:r,selectedPriceId:m||""})},c=[{key:"basic",...C.basic,recommended:!1},{key:"pro",...C.pro,recommended:!0},{key:"premium",...C.premium,recommended:!1}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs(P,{children:[e.jsxs(k,{children:[e.jsx(S,{className:"font-display text-2xl font-medium",children:a("wizard.plan.title")}),e.jsx(A,{children:a("wizard.plan.subtitle")})]}),e.jsxs(F,{children:[e.jsx("div",{className:"grid grid-cols-1 gap-3",children:c.map(r=>{const m=s.selectedPlan===r.key;return e.jsxs("button",{type:"button",onClick:()=>h(r.key,r.stripePriceId),className:`w-full rounded-2xl border p-5 text-left transition-all ${m?"border-primary bg-primary/[0.04] ring-2 ring-primary":"border-border hover:border-primary/40 hover:shadow-sm"}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:`mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors ${m?"border-primary bg-primary":"border-gray-300"}`,children:m&&e.jsx(z,{className:"h-3 w-3 text-primary-foreground"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"font-display text-xl font-medium text-foreground",children:r.name}),r.recommended&&e.jsx("span",{className:"rounded-full bg-[#C9A227] px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-[#1C1A17]",children:a("wizard.plan.recommended")})]}),e.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[a("wizard.plan.freeTrialBadge")," · ",a("wizard.plan.afterTrial")]})]})]}),e.jsxs("div",{className:"whitespace-nowrap text-right",children:[e.jsx("span",{className:"font-display text-2xl font-medium text-foreground",children:ae(r.price,r.currency||"USD")}),e.jsx("span",{className:"text-sm text-muted-foreground",children:a("wizard.plan.perMonth")})]})]}),e.jsx("ul",{className:"mt-4 grid grid-cols-1 gap-x-4 gap-y-1.5 pl-8 text-sm sm:grid-cols-2",children:r.features.slice(1).map((i,l)=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(z,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-primary"}),e.jsx("span",{className:"text-muted-foreground",children:i})]},l))})]},r.key)})}),e.jsxs("div",{className:"mt-6 flex gap-3",children:[e.jsx(y,{type:"button",variant:"outline",onClick:d,className:"flex-1",children:a("wizard.plan.back")}),e.jsx(y,{onClick:n,className:"flex-1",disabled:!s.selectedPlan,children:a("wizard.plan.startTrial")})]})]})]}),e.jsxs("div",{className:"text-center text-sm text-muted-foreground",children:[e.jsx("p",{className:"font-semibold text-primary mb-1",children:a("wizard.plan.footer.noCommitment")}),e.jsx("p",{children:a("wizard.plan.footer.noCharge")}
1),e.jsx("p",{children:a("wizard.plan.footer.cancelAnytime")})]})]})}function ne({lang:s}){const o={es:{eyebrow:"Crea tu cuenta",title:"Estás a minutos de pastorear con orden",bullets:[{icon:B,title:"Todo en uno",desc:"Personas, finanzas, eventos, gobierno y app móvil."},{icon:M,title:"App para iOS y Android",desc:"Tu iglesia en el bolsillo de cada miembro."},{icon:D,title:"Ofrendas en línea",desc:"Stripe, MercadoPago y Fintoc integrados."},{icon:L,title:"Bilingüe + soporte en español",desc:"La plataforma y el soporte en tu idioma."}],trust:"30 días gratis · Sin tarjeta · Cancela cuando quieras"},en:{eyebrow:"Create your account",title:"You’re minutes from shepherding with order",bullets:[{icon:B,title:"All in one",desc:"People, finances, events, governance and a mobile app."},{icon:M,title:"iOS & Android app",desc:"Your church in every member’s pocket."},{icon:D,title:"Online giving",desc:"Stripe, MercadoPago and Fintoc built in."},{icon:L,title:"Bilingual + support",desc:"The platform and support in your language."}],trust:"30-day free trial · No credit card · Cancel anytime"}}[s];return e.jsxs("aside",{className:"vellum-grain relative hidden overflow-hidden bg-[#08655D] p-12 text-[#F2ECE0] lg:flex lg:flex-col lg:justify-center",children:[e.jsx("div",{className:"absolute inset-0 z-0","aria-hidden":"true",style:{background:"radial-gradient(55% 45% at 78% 15%, rgba(201,162,75,0.16), transparent 60%)"}}),e.jsxs("div",{className:"relative z-10 mx-auto max-w-md",children:[e.jsx("div",{className:"mb-6 inline-flex items-center justify-center rounded-2xl bg-[#0B7A70] p-3.5 ring-1 ring-[#C9A227]/30",children:e.jsx(O,{className:"h-7 w-7 text-[#C9A227]"})}),e.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-[0.16em] text-[#C9A227]",children:o.eyebrow}),e.jsx("h2",{className:"font-display text-3xl font-medium leading-tight",children:o.title}),e.jsx("ul",{className:"mt-9 space-y-6",children:o.bullets.map(n=>e.jsxs("li",{className:"flex items-start gap-4",children:[e.jsx("span",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-xl bg-[#0B7A70] text-[#C9A227] ring-1 ring-white/10",children:e.jsx(n.icon,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-[#F2ECE0]",children:n.title}),e.jsx("p",{className:"text-sm leading-snug text-[#cdbfa6]",children:n.desc})]})]},n.title))}),e.jsx("div",{className:"mt-10 border-t border-white/10 pt-6",children:e.jsx("p",{className:"text-sm font-medium text-[#C9A227]",children:o.trust})})]})]})}function ce(){var E;const[s,o]=g.useState(1),[n,d]=g.useState(!1),[a,h]=g.useState({selectedPlan:"basic"}),c=K(),{t:r,i18n:m}=N("auth"),i=(E=m.language)!=null&&E.startsWith("en")?"en":"es",l=[{number:1,title:r("wizard.steps.personal")},{number:2,title:r("wizard.steps.church")},{number:3,title:r("wizard.steps.plan")}],p=f=>{h(f)},j=()=>{s<3?o(s+1):b()},t=()=>{s>1&&o(s-1)},b=async()=>{d(!0);try{const f=Q(),v=(await X(f,"registerUserAndChurch")({email:a.email,password:a.password,displayName:a.displayName,phone:a.phone||"",churchName:a.churchName,churchCountry:a.churchCountry,churchCity:a.churchCity,churchAddress:a.churchAddress||"",selectedPriceId:a.selectedPriceId})).data;if(!v.success)throw new Error(r("wizard.errors.registrationFailed"));w.success(r("wizard.success.created")),await Z(ee,a.email,a.password),v.priceId?(w.info(r("wizard.success.startingTrial")),await se.redirectToCheckout(v.priceId)):c("/app/dashboard")}catch(f){console.error("Registration error:",f),f.code==="auth/email-already-in-use"?w.error(r("wizard.errors.emailInUse")):w.error(f.message||r("wizard.errors.generic"))}finally{d(!1)}},q={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}};return e.jsxs("div",{className:"vellum-auth min-h-screen bg-background lg:grid lg:grid-cols-[3fr_2fr]",children:[e.jsx("div",{className:"flex flex-col px-4 py-10 sm:px-8 lg:px-12",children:e.jsxs("div",{className:"mx-auto w-full max-w-2xl",children:[e.jsxs("div",{className:"text-center mb-7",children:[e.jsx("div",{className:"inline-flex items-center justify-center bg-primary text-primary-foreground rounded-2xl p-3.5 mb-5",children:e.jsx(O,{className:"h-8 w-8"})}),e.jsx("h1",{className:"font-display text-4xl font-medium text-foreground",children:r(n?"wizard.submitting":"wizard.title")}),e.jsx("p",{className:"mt-3 text-muted-foreground",children:r("wizard.subtitle")}),e.jsx("p",{className:"mt-4 text-xs font-medium text-muted-foreground",children:i==="es"?"Tarda menos de 2 minutos · 30 días de prueba gratis":"Takes under 2 minutes · 30-day free trial"})]}),!n&&e.jsx(re,{steps:l,currentStep:s}),e.jsx(G,{mode:"wait",children:!n&&e.jsxs(J.div,{variants:q,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.3},children:[s===1&&e.jsx(te,{data:a,onChange:p,onNext:j}),s===2&&e.jsx(le,{data:a,onChange:p,onNext:j,onBack:t}),s===3&&e.jsx(ie,{data:a,onChange:p,onNext:j,onBack:t})]},s)}),n&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[e.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-b-2 border-primary"}),e.jsx("p",{className:"mt-4 text-gray-600",children:r("wizard.configuring")})]}),e.jsx("div",{className:"mt-8 text-center text-sm text-muted-foreground",children:e.jsxs("p",{children:[r("wizard.alreadyAccount")," ",e.jsx("a",{href:"/login",className:"text-primary hover:underline font-semibold",children:r("wizard.login")})]})})]})}),e.jsx(ne,{lang:i})]})}function we(){return e.jsx(ce,{})}export{we as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.