1import{j as e}from"./pdf-libs-C_mKJWkL.js";import{u as p,F as T,k as y,dF as C,aQ as E,ad as L,r as R,c as n,T as h,B as z,d as P,D as U,aL as q}from"./index-zL44kPBJ.js";import{a as A,F as g}from"./Form-DgP4nqnw.js";import{F as f}from"./FormRow-DqUzU1Wx.js";import{s as B,u as N,n as O,A as D}from"./regex-CbIgPWMC.js";import{u as M,c as V,d as _}from"./formik.esm-BYyAQAKB.js";import{b as $}from"./charts-libs-BFbHZ7E3.js";import{t as G}from"./errorValidation-BCy2et3Z.js";import{u as Q}from"./hooks-CTNYErBL.js";import{k as W}from"./events-DjL3TSCR.js";import"./firebase-libs-Cj4TgXmH.js";import"./hoist-non-react-statics.cjs-D8SxOR-T.js";const Y=P.img` 2 height: 2rem; 3 object-fit: contain; 4 margin: 0 0 0 auto; 5`,ne=()=>{const x=Q(),[a]=p("auth"),[r]=p("common"),t=T(),w=y(),[b,{isLoading:j}]=C(),[k]=E(),[l]=L(),v=R(),d=l.get("email"),{email:F,fromProposal:I}=v.state||{},o=M({initialValues:{email:F??d??"",password:""},validateOnChange:!1,validationSchema:V({email:_().email(r("error.invalid_email_address")).required(r("error.required_field")),password:_().required(r("error.required_field")).min(8,r("error.password_too_short",{characters:8})).matches(B,r("error.password_missing_special_char")).matches(N,r("error.password_missing_uppercase")).matches(O,r("password_missing_number"))}),enableReinitialize:!0,onSubmit:async(i,{setErrors:S})=>{var u;const m=l.get("userId"),{data:s,error:c}=await b({email:i.email,password:i.password.trim(),userId:m??""});if(!(s!=null&&s.success)){S({...G(((u=c==null?void 0:c.data)==null?void 0:u.data)??{},r)});return}localStorage.setItem("refreshToken",s==null?void 0:s.refreshToken),localStorage.setItem("accessToken",s==null?void 0:s.accessToken),I&&await k({userId:m??"",email:i.email}),U.track(W,{userId:m}),x(q.util.invalidateTags(["User"]))}});return $.useEffect(()=>{l.get("userId")||w("/onboarding")},[]),e.jsxs(D,{children:[e.jsx(Y,{src:t.whiteLabelLogo,alt:a("logo_alt")}),e.jsx(n,{size:2}),e.jsx(h,{as:"h2",size:"text-xl",weight:"Bold",children:a("lets_get_you_on_board")}),e.jsx(n,{size:.75}),e.jsx(h,{as:"p",size:"text-md",weight:"Regular",color:"modal-secondary",children:a("unlock_power",{whiteLabelName:t==null?void 0:t.whiteLabelName})}),e.jsx(n,{size:2}),e.jsxs(A,{onSubmit:o.handleSubmit,children:[e.jsx(f,{children:e.jsx(g,{placeholder:a("email_address"),label:a("email_address"),name:"email",value:o.values.email,onChange:o.handleChange,error:o.errors.email,readonly:!!d})}),e.jsx(f,{children:e.jsx(g,{label:a("set_up_your_password"),placeholder:a("password"),type:"password",name:"password",value:o.values.password,onChange:o.handleChange,error:o.errors.password})}),e.jsx(n,{size:0}),e.jsx(z,{disabled:j,type:"submit",variant:"offset",fullWidth:!0,children:a("set_up_profile")})]})]})};export{ne as GetYouOnBoardPage,ne 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.