1!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0.797.0-argo"}}catch(e){}}();try{e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(n=(new e.Error).stack)&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00f4a531-4650-4d2c-80e8-a4158be5472e",e._sentryDebugIdIdentifier="sentry-dbid-00f4a531-4650-4d2c-80e8-a4158be5472e")}catch(e){}var e,n;import{L as s,S as t}from"./BLxw2h3XNSCQLbkTIxUv.js";import{r as a,k as i}from"./BH1hkhJJGfROhHZ8U3kF.js";import{d as r,N as o,L as c,S as l,e as I,A as E,f as d,T,B as _,a as S,I as u,b as f,g as m}from"./BriVvJ7JPLhLKhoSVq-n.js";import{n as N,a7 as R,a8 as y,c as p,u as v,r as g,U as j}from"./Dut9G4aA7NF_0NDDKJbZ.js";import{N as h}from"./DOf-L4m8fZ4eGdYhvxat.js";import{g as U,S as V}from"./F0xOpoluVyRIyo50T2J4.js";import{a as b}from"./B2FSDzO-EOMfVlfVQ3rW.js";import"./CZF61sPJTpHkhKbhhAAi.js";import"./kaq5hapTEw9QrBl2mYwp.js";import"./D-q59vvKl54XhnGRAyR-.js";import"./D-9i83SAfg9dI9hpVBgU.js";import"./7-pRm9UwjDzQ5CZ7c5Q5.js";import"./CmWfsBdki6C7UPg1RvKX.js";import"./DFPgiPTl2rKEi89yBrlY.js";import"./DUeeGlgPH1Fwmj47nI66.js";import"./h1-nQmDw6cL0eRHmoB5P.js";const x="_centered-flex-container_gdc7e_1",w="_account-item-wrapper_gdc7e_6";function O(e){var n;let{confirmInvitationState:t}=e;const m=(null==t||null===(n=t.userRegisterVerifyResponse)||void 0===n?void 0:n.accountName)||"",[p,v]=a.useState(!1),{runAsync:g}=N(R.bindAccount,{manual:!0});return i.jsxs(s,{className:b.container,children:[i.jsx(s.Header,{children:i.jsx(h,{notShowAccountSelectorAndManageButton:!0,notShowAggregateModeEntry:!0,show:!0,showUserInfo:!1})}),i.jsx(s,{className:x,children:i.jsx("div",{className:b.content,children:i.jsxs(r,{className:b["confirm-invite-card"],children:[i.jsx(o,{style:{color:"var(--items-primary, rgba(0, 1, 3, 0.90))",font:"var(--typography-display-sm)"},children:"Join account"}),i.jsx(c,{nsLeadSlot:i.jsx(I,{nsIcon:"account_circle",nsSize:l.MD}),nsOverline:"Your email:",nsSize:l.MD,nsText:null==t?void 0:t.email}),i.jsxs("div",{className:b["account-info-item"],children:[i.jsx(o,{style:{color:"var(--items-secondary, rgba(0, 9, 21, 0.70))",font:"var(--typography-label-md)"},children:"You have been invited to join:"}),i.jsxs("div",{className:w,children:[i.jsx(E,{nsInitials:U(m),nsTint:T.BLUE,nsVariant:d.INITIALS}),i.jsx(o,{style:{font:"var(--typography-label-strong-md)",color:"var(--items-primary, rgba(0, 1, 3, 0.90))"},children:m})]})]}),i.jsx(_,{loading:p,nsImportance:u.PRIMARY,nsLabel:"Confirm",nsSize:l.XXL,nsTint:T.NEUTRAL,nsVariant:S.BASIC,onClick:async()=>{v(!0);try{await g({token:null==t?void 0:t.invitedUserToken.token},!0)}catch(e){return f.error("Sorry, we had trouble granting you access to this account. Please try again."),void v(!1)}f.success("Successfully joined the account."),setTimeout(()=>{y()},3e3)},style:{alignSelf:"stretch"}})]})})})]})}function k(e){var n;return i.jsx(V,{inviteInfo:{email:e.confirmInvitationState.email,token:e.confirmInvitationState.invitedUserToken.token,accountName:null===(n=e.confirmInvitationState.userRegisterVerifyResponse)||void 0===n?void 0:n.accountName}})}var A=(e=>(e.SET_USER_EMAIL="SET_USER_EMAIL",e.SET_INVITED_USER_TOKEN="SET_INVITED_USER_TOKEN",e.SET_USER_REGISTER_VERIFY_RESPONSE="SET_USER_REGISTER_VERIFY_RESPONSE",e.SET_VERIFYING_INVITE_TOKEN="SET_VERIFYING_INVITE_TOKEN",e))(A||{});const D={email:"",invitedUserToken:null,userRegisterVerifyResponse:null,verifyingInviteToken:!1};function G(e=D,n){switch(n.type){case A.SET_USER_EMAIL:return{...e,email:n.payload};case A.SET_USER_REGISTER_VERIFY_RESPONSE:return{...e,...n.payload};case A.SET_INVITED_USER_TOKEN:return{...e,invitedUserToken:n.payload};case A.SET_VERIFYING_INVITE_TOKEN:return{...e,...n.payload};default:return e}}var L=(e=>(e.CONFIRM_INVITATION="CONFIRM_INVITATION",e.SIGN_UP_INVITED_USER="SIGN_UP_INVITED_USER",e))(L||{});function F(){const[e,n]=a.useReducer(G,D),[s,r]=a.useState(),o=p(),c=v();a.useEffect(()=>{const e=new URLSearchParams(c.search).get("invitedUserToken");e&&n({type:A.SET_INVITED_USER_TOKEN,payload:{token:e}})},[]);a.useEffect(()=>{e.invitedUserToken&&(async()=>{let n;l(A.SET_VERIFYING_INVITE_TOKEN,{verifyingInviteToken:!0});try{n=await g.verifyUserRegisterToken(e.invitedUserToken),l(A.SET_VERIFYING_INVITE_TOKEN,{verifyingInviteToken:!1})}catch(s){await new Promise(()=>setTimeout(()=>{o.replace(j.AUTH_SIGNIN)},3e3))}l(A.SET_USER_EMAIL,n.userEmail),l(A.SET_USER_REGISTER_VERIFY_RESPONSE,{userRegisterVerifyResponse:n}),n.isRegistered?r(L.CONFIRM_INVITATION):r(L.SIGN_UP_INVITED_USER)})()},[e.invitedUserToken]);const l=(e,s)=>{n({type:e,payload:s})};return e.verifyingInviteToken?i.jsx("div",{className:b.container,children:i.jsx("div",{className:b.content,children:i.jsx(t,{size:50})})}):(()=>{switch(s){case L.SIGN_UP_INVITED_USER:return i.jsx(k,{confirmInvitationState:e});case L.CONFIRM_INVITATION:return i.jsx(O,{confirmInvitationState:e});default:return i.jsx(m,{nsTint:"alert",nsTitle:"Invalid step"})}})()}export{F 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.