1import{bK as C,cl as E,bV as R,de as L,az as g,r as M,j as t,bM as w,bO as y,R as O}from"./vendor-ct_YKIP6_bundle.js";import{d as V,ab as I,l as A,et as k,aw as z,z as B,A as _,ai as U,pu as K,pv as N,pw as H,pL as W,H as d,S as Y,px as F,T as n,ec as S,fU as f,iT as Q,fV as D,pz as G,a4 as j,pA as q,pB as $,i$ as J,pK as X,a8 as T,Y as Z}from"./registration-BfOA5mCx_bundle.js";import"./moment-DyvZl3Ud_bundle.js";import"./sentry-DLDmuXKN_bundle.js";import"./datadog-DxmyjtSX_bundle.js";const b=C(["height:48px;"]),tt=C(["top:56px;white-space:initial;bottom:auto;word-break:break-word;"]),et=({methods:e})=>{const{t:r}=E(),{startKeycloakSso:a,userLogin:u,registrationWithInvitation:i}=I(),h=A(x=>x?.currentUser?.user?.companySsoSettings?.enabled),{formState:{isValid:m,errors:l},register:p,getFieldState:o}=e,c=u||i;return h?t.jsx(T,{disabled:a,offsetType:"compact",showSpinner:a,styleType:"red",textTransform:"none",children:r("sign_in.form.sso_button")}):t.jsxs(O.Fragment,{children:[t.jsx(S,{...p("password"),...o("password"),togglePasswordVisibility:!0,customErrorStyles:tt,inputControlStyles:b,label:r("common.new_password"),styleType:"borderless",type:"password"}),t.jsx(d,{top:20,children:t.jsx(S,{...p("passwordConfirmation"),...o("passwordConfirmation"),togglePasswordVisibility:!0,inputControlStyles:b,label:r("registration_with_invitation.confirm_password"),styleType:"borderless",type:"password"})}),t.jsx(d,{top:28,children:t.jsx(T,{disabled:!m||c,offsetType:"compact",showSpinner:c,styleType:"red",textTransform:"none",type:"submit",children:r("registration_with_invitation.join_now")})})]})},st={password:X,passwordConfirmation:J},rt=e=>e?{}:st,pt=()=>{const{t:e}=E(),r=V(),{getUserByEmail:a}=I(),u=R(),i=A(s=>s?.currentUser?.user?.companySsoSettings?.enabled),{handleSubmit:h,...m}=L({mode:"onChange",defaultValues:i?{}:{password:"",passwordConfirmation:""},resolver:s=>k(s,rt(i))}),l=z(u.search),p=g("token",l),o=g("email",l);M.useEffect(()=>{B(o)&&r({type:_.GET_USER_BY_EMAIL_REQUEST,payload:{email:o,includes:["sso_settings","identities"]}})},[r,o]);const c=g("company",l),x=s=>i?r({type:_.START_KEYCLOAK_SSO_REQUEST,payload:{email:o}}):new Promise((v,P)=>{r({type:_.REGISTRATION_WITH_INVITATION_REQUEST,payload:{token:p,values:s,resolve:v,reject:P}})}).catch(Z);return a?t.jsx(U,{}):t.jsxs(K,{compact:!0,children:[t.jsx(N,{children:t.jsx(H,{children:t.jsx(W,{maxWidth:"420px",pb:"32px",children:t.jsxs("form",{style:{width:"100%"},onSubmit:h(x),children:[t.jsx(d,{bottom:45,children:t.jsx(Y,{height:36,width:92})}),t.jsx(F,{fontBold:!0,mb:"12px",children:e("registration_with_invitation.title")}),t.jsx(d,{bottom:58,top:6,children:t.jsx(n,{inheritColor:!0,largerLineHeight:!0,normalBreak:!0,size:"14px",weight:400,children:w.rich(e("registration_with_invitation.subtitle",{name:c||"",action:e(i?"sign_in.form.sso_button":"registration_with_invitation.setup_password")}),{bold:({children:s})=>t.jsx(n,{weight:600,children:s})})})}),t.jsx(S,{disabled:!0,inputControlStyles:b,placeholder:e("common.email"),styleType:"borderless",value:o}),t.jsx(et,{methods:m}),t.jsx(n,{center:!0,smallLineHeight:!0,offsets:{mt:24},size:"14px",weight:400,children:w.rich(e("sign_up.terms_and_privacy.by_clicking_you_agree_with",{button:e(i?"sign_in.form.sso_button":"registration_with_invitation.join_now")}),{terms:({children:s})=>t.jsx(f,{targetBlank:!0,href:D,children:t.jsx(n,{blue300:!0,fontMedium:!0,inheritSize:!0,children:s})}),privacy:({children:s})=>t.jsx(f,{targetBlank:!0,href:Q,children:t.jsx(n,{blue300:!0,fontMedium:!0,inheritSize:!0,children:s})})})})]})})})}),t.jsxs(G,{children:[t.jsx(j,{when:!y.isMobile,children:t.jsx(q,{})}),t.jsx(j,{when:y.isMobile,children:t.jsx($,{})})]})]})};export{pt as default}; 2//# sourceMappingURL=registration_with_invitation-CiBy37En_bundle.js.map
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.