PageSourceSearch

https://cdn.joinhomebase.com/assets/index-chunk-D3eHotEQ.js

js joinhomebase.com collected 2026-10-01 08:51:27 UTC 12,502 bytes, 2 lines download raw bytes

1import{reactExports as n,jsxRuntimeExports as e}from"./react-core-chunk-B2r03cU8.js";import{useSelector as v}from"./redux-core-chunk-DgWMjMkF.js";import{cxHelpers as P,useIsMediumScreen as R,Dialog_default as ee,Box_default as _,spacing as u,TextInput_default as te,Button_default as A,Toast as ne,Divider_default as U,Text_default as M,Link_default as f,useExtendUx as k,useTrackUxOnMount as w,useTrackUx as D,useStytch as ae,sendEmailOtp as V,getOrCreateOtpFlowId as K,ObjectSchema as B,StringSchema as J,Formik as G,Form as F,TextField as oe,sendSmsOtp as Y,formatPhoneNumber as ie,PhoneField as se,clearOtpFlowId as H,mapHBSendOtpErrorToMessage as W,withUxRoot as le,useIsLargeScreen as re,getCurrentUserId as ce,getIsSessionFetchCompleted as _e,ROOT_PATH as me}from"./app-init-chunk-Cf9dEl-y.js";import{CodeForm as $,NewPasswordForm as de,LeftPanelWrapper as ue}from"./LeftPanelWrapper-chunk-CDdYXS7R.js";import{HeaderLogo as Ee}from"./HeaderLogo-chunk-BGTzCsga.js";import{FlexLayoutReset as he}from"./FlexLayoutReset-chunk-CL_Mdwtb.js";import{TRACK_ACTION_TYPES as T,EVENT_ACTIONS as N,postJSON as pe,EVENT_CATEGORIES as xe,PRODUCT_AREAS as Ie}from"./app-bundle-kYrKUrz1.js";import{HeaderLayout as Te}from"./HeaderLayout-chunk-5hCHcBAx.js";import{openCSChat as Ne}from"./csChat-chunk-BCztyikp.js";import{toI18n as i}from"./tracking-chunk-2tlC51DH.js";try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="5bfdfc16-2c5e-46ac-ad49-dd43acb6ab75",t._sentryDebugIdIdentifier="sentry-dbid-5bfdfc16-2c5e-46ac-ad49-dd43acb6ab75")})()}catch{}const Se="/onboarding/employee_join_team_complete",je="/onboarding/employee_get_app",fe="/accounts/sign-in?existing_account=1";var E=(t=>(t.EMAIL="join team email",t.PHONE="join team phone",t.EMAIL_CODE="join team email code",t.PHONE_CODE="join team phone code",t.EMAIL_PASSWORD="join team email password",t))(E||{});const C={PHONE:"phone",EMAIL:"email"},y={PHONE_SEND_CODE:"phone_send_code",PHONE_AUTHENTICATE_CODE:"phone_authenticate_code",EMAIL_SEND_CODE:"email_send_code",EMAIL_AUTHENTICATE_CODE:"email_authenticate_code",NEW_PASSWORD:"new_password"},l={NEXT_BUTTON:"next_button",JOIN_WITH_EMAIL_BUTTON:"join_with_email_button",JOIN_WITH_PHONE_BUTTON:"join_with_phone_button",TERMS_SERVICE_LINK:"terms_service_link",PRIVACY_POLICY_LINK:"privacy_policy_link",USER_AGREEMENT_LINK:"user_agreement_link",VERIFY_BUTTON:"verify_button",RESEND_CODE_BUTTON:"resend_code_button",TRY_EMAIL_LINK:"try_email_link",TRY_PHONE_LINK:"try_phone_link",ASK_MANAGER_INVITE_LINK:"ask_manager_invite_link",CHAT_LINK:"chat_link",BACK_LINK:"back_link",CREATE_SIGN_IN_BUTTON:"create_sign_in_button",BACK_TO_SIGNIN_LINK:"back_to_signin_link",COPY_BUTTON:"copy_button"},{cx:Ce,cxEl:Oe}=P("JoinTeamAskManagerModal"),be=({open:t,onClose:a,credential:r})=>{const o=R(),[d,s]=n.useState(!1),m=i("authentication.join_team.ask_manager_modal.message",{props:{credential:r}}),[c,p]=n.useState(m);n.useEffect(()=>{p(m)},[m]);const h=n.useCallback(j=>p(j.target.value),[]),x=n.useCallback(()=>s(!1),[]),I=n.useCallback(async()=>{if(navigator.clipboard?.writeText){try{await navigator.clipboard.writeText(c)}catch{return}s(!0),a()}},[c,a]),S=n.useCallback(()=>{x(),a()},[x,a]);return e.jsxs(e.Fragment,{children:[e.jsx(ee,{open:t,onClose:S,title:i("authentication.join_team.ask_manager_modal.title"),uxElement:"join_team_ask_manager_modal",className:Ce(),children:()=>e.jsxs(_,{column:!0,gap:u.gap.lg,maxw:540,children:[e.jsx(_,{className:Oe("message"),children:e.jsx(te,{name:"ask_manager_message",textArea:!0,minRows:5,maxRows:12,value:c,onChange:h,ariaLabel:i("authentication.join_team.ask_manager_modal.title"),uxElement:"join_team_ask_manager_modal_message"})}),e.jsx(_,{flex:!0,justifyContentEnd:!0,children:e.jsx(A,{variant:"primary",fullWidth:!o,onClick:I,uxElement:l.COPY_BUTTON,children:i("authentication.join_team.ask_manager_modal.copy_cta")})})]})}),e.jsx(ne,{open:d,onClose:x,variant:"success",hideCloseIcon:!0,children:i("authentication.join_team.ask_manager_modal.copied")})]})},q=({variant:t,onTryOther:a,credential:r})=>{const[o,d]=n.useState(!1),s=R(),m=n.useCallback(()=>{Ne("join_team_page")},[]),c=n.useCallback(()=>d(!0),[]),p=n.useCallback(()=>d(!1),[]);return e.jsxs(e.Fragment,{children:[e.jsx(U,{type:"light",color:"mono200",spacing:u.xl}),e.jsxs(_,{column:!0,gap:u.gap.xs,children:[e.jsxs(M,{variant:s?"body":"bodySm",children:[i("authentication.join_team.code_support.alternate_prefix")," ",e.jsx(f,{onClick:a,endIcon:"ArrowRight",size:s?"medium":"small",uxElement:t===C.EMAIL?l.TRY_PHONE_LINK:l.TRY_EMAIL_LINK,children:i(t==="email"?"authentication.join_team.code_support.try_phone_link":"authentication.join_team.code_support.try_email_link")})]}),e.jsxs(M,{variant:s?"body":"bodySm",children:[i("authentication.join_team.code_support.no_account_prefix")," ",e.jsx(f,{onClick:c,endIcon:"ArrowRight",size:s?"medium":"small",uxElement:l.ASK_MANAGER_INVITE_LINK,children:i("authentication.join_team.code_support.ask_manager_text")})]}),e.jsxs(M,{variant:s?"body":"bodySm",children:[i("authentication.join_team.code_support.trouble_prefix")," ",e.jsx(f,{onClick:m,endIcon:"ArrowRight",size:s?"medium":"small",uxElement:l.CHAT_LINK,children:i("authentication.join_team.code_support.chat_with_us_link")})]})]}),e.jsx(be,{open:o,onClose:p,credential:r})]})},ge=({email:t,methodId:a,onSetMethodId:r,onBack:o,onShowPhoneStep:d,onShowPasswordStep:s})=>{k()({flow_type:C.EMAIL,view:y.EMAIL_AUTHENTICATE_CODE}),w(N.PAGE_VIEWED,T.VIEW);const m=D(),{revokeSession:c}=ae(),p=n.useCallback(async I=>{if(I.user?.password){await c(),window.location.href=fe;return}s()},[s,c]),h=n.useCallback(()=>V({email:t,flow:"employee_join_team_email",flow_id:K()}),[t]),x=n.useCallback((I,S,j)=>{m(N.ERROR_MESSAGE_SHOWN,T.VIEW,{errorMessage:I,errorType:S,errorSource:j})},[m]);return n.useEffect(()=>{(!t||!a)&&o()},[t,a,o]),e.jsx($,{email:t,methodId:a,flow:"employee_join_team_email",onBackClick:o,backLinkTextKey:"authentication.back",backUxElement:l.BACK_LINK,verifyUxElement:l.VERIFY_BUTTON,resendUxElement:l.RESEND_CODE_BUTTON,onSetMethodId:r,onSuccess:p,onResendCode:h,onError:x,bottomContent:e.jsx(q,{variant:"email",onTryOther:d,credential:t})})},X=()=>e.jsx(_,{w:"100%",children:e.jsxs(M,{children:[i("authentication.join_team.footer_prefix")," ",e.jsx(f,{href:"/agreements/terms",target:"_blank",uxElement:l.TERMS_SERVICE_LINK,children:i("authentication.legal_links.terms")}),", ",e.jsx(f,{href:"/privacy",target:"_blank",uxElement:l.PRIVACY_POLICY_LINK,children:i("authentication.legal_links.privacy")}),", ",i("and")," ",e.jsx(f,{href:"/agreements/eula",target:"_blank",uxElement:l.USER_AGREEMENT_LINK,children:i("authentication.legal_links.user_agreement")}),"."]})}),{cx:Ae,cxEl:ke}=P("JoinTeamEmailStep"),we=B().shape({email:J().email(i("fe_design_base.errors.field.email_invalid")).required(i("fe_design_base.errors.field.email_required"))}),ye=({onSubmit:t,onShowPhoneStep:a})=>{k()({flow_type:C.EMAIL,view:y.EMAIL_SEND_CODE}),w(N.PAGE_VIEWED,T.VIEW);const r=n.useCallback(({email:o})=>t(o),[t]);return e.jsx(G,{initialValues:{email:""},onSubmit:r,validationSchema:we,children:({dirty:o,isValid:d,isSubmitting:s,touched:m,errors:c})=>e.jsxs(_,{className:Ae(),column:!0,w:"100%",children:[e.jsx(F,{role:"form",children:e.jsxs(_,{column:!0,w:"100%",mt:u.md,children:[e.jsxs(_,{column:!0,gap:m.email&&c.email?u.md:u.sm,children:[e.jsx(oe,{name:"email",label:i("authentication.join_team.email_label"),startIcon:"Email",dataTestId:"JoinTeamEmailStep__input",trim:!0,fullWidth:!0}),e.jsx(A,{type:"submit",uxElement:l.NEXT_BUTTON,isLoading:s,disabled:!o||!d,children:i("authentication.join_team.next_cta")})]}),e.jsx(U,{spacing:u.xl})]})}),e.jsxs(_,{column:!0,gap:u.xl,w:"100%",children:[e.jsx(_,{className:ke("phone-cta"),children:e.jsx(A,{variant:"secondary",fullWidth:!0,startIcon:"Phone",type:"button",uxElement:l.JOIN_WITH_PHONE_BUTTON,onClick:a,children:i("authentication.join_team.phone_cta")})}),e.jsx(X,{})]})]})})};let L=!1;const z=async()=>
1{if(!L){L=!0;try{const{show_get_app:t}=await pe(Se);window.location.replace(t?je:"/")}catch(t){throw L=!1,t}}},Me=()=>{k()({flow_type:C.EMAIL,view:y.NEW_PASSWORD}),w(N.PAGE_VIEWED,T.VIEW);const t=D(),a=n.useCallback((o,d,s)=>{t(N.ERROR_MESSAGE_SHOWN,T.VIEW,{errorMessage:o,errorType:d,errorSource:s})},[t]),r=n.useCallback(()=>z(),[]);return e.jsx(de,{onError:a,onSuccess:r,submitUxElement:l.CREATE_SIGN_IN_BUTTON,backUxElement:l.BACK_TO_SIGNIN_LINK})},Le=({phone:t,methodId:a,onSetMethodId:r,onBack:o,onShowEmailStep:d})=>{k()({flow_type:C.PHONE,view:y.PHONE_AUTHENTICATE_CODE}),w(N.PAGE_VIEWED,T.VIEW);const s=D(),m=n.useCallback(()=>z(),[]),c=n.useCallback(()=>Y({phone:t,flow:"employee_join_team_phone"}),[t]),p=n.useCallback((h,x,I)=>{s(N.ERROR_MESSAGE_SHOWN,T.VIEW,{errorMessage:h,errorType:x,errorSource:I})},[s]);return n.useEffect(()=>{(!t||!a)&&o()},[t,a,o]),e.jsx($,{phoneNumber:t,methodId:a,flow:"employee_join_team_phone",onBackClick:o,backLinkTextKey:"authentication.back",backUxElement:l.BACK_LINK,verifyUxElement:l.VERIFY_BUTTON,resendUxElement:l.RESEND_CODE_BUTTON,onSetMethodId:r,onSuccess:m,onResendCode:c,onError:p,bottomContent:e.jsx(q,{variant:"phone",onTryOther:d,credential:ie(t)})})},{cx:Pe,cxEl:Re}=P("JoinTeamPhoneStep"),Ue=B().shape({phone:J().required(i("fe_design_base.errors.field.phone_required")).matches(/^\d{10}$/,i("fe_design_base.errors.field.phone_invalid"))}),De=({onSubmit:t,onShowEmailStep:a})=>{k()({flow_type:C.PHONE,view:y.PHONE_SEND_CODE}),w(N.PAGE_VIEWED,T.VIEW);const r=n.useCallback(({phone:o})=>t(o),[t]);return e.jsx(G,{initialValues:{phone:""},onSubmit:r,validationSchema:Ue,children:({dirty:o,isValid:d,isSubmitting:s,touched:m,errors:c})=>e.jsxs(_,{className:Pe(),column:!0,w:"100%",children:[e.jsx(F,{role:"form",children:e.jsxs(_,{column:!0,w:"100%",mt:u.md,children:[e.jsxs(_,{column:!0,gap:m.phone&&c.phone?u.md:u.sm,children:[e.jsx(se,{name:"phone",label:i("authentication.join_team.phone_label"),startIcon:"Phone",dataTestId:"JoinTeamPhoneStep__input",fullWidth:!0}),e.jsx(A,{type:"submit",uxElement:l.NEXT_BUTTON,isLoading:s,disabled:!o||!d,children:i("authentication.join_team.next_cta")})]}),e.jsx(U,{spacing:u.xl})]})}),e.jsxs(_,{column:!0,gap:u.xl,w:"100%",children:[e.jsx(_,{className:Re("email-cta"),children:e.jsx(A,{variant:"secondary",fullWidth:!0,startIcon:"Email",type:"button",uxElement:l.JOIN_WITH_EMAIL_BUTTON,onClick:a,children:i("authentication.join_team.email_cta")})}),e.jsx(X,{})]})]})})},ve={[E.EMAIL]:"authentication.join_team.email_description",[E.PHONE]:"authentication.join_team.phone_description"},He=()=>{const[t,a]=n.useState(E.EMAIL),[r,o]=n.useState(""),[d,s]=n.useState(""),[m,c]=n.useState(""),[p,h]=n.useState(""),x=n.useCallback(O=>{H();const b=K();return V({email:O,flow:"employee_join_team_email",flow_id:b}).then(({email_id:g})=>{o(O),c(g),h(""),a(E.EMAIL_CODE)}).catch(g=>Promise.resolve(g?.response?.json?.()??{}).then(Z=>h(W(Z?.errors))))},[]),I=n.useCallback(O=>(H(),Y({phone:O,flow:"employee_join_team_phone"}).then(({phone_id:b})=>{s(O),c(b),h(""),a(E.PHONE_CODE)}).catch(b=>b.response.json().then(g=>{h(W(g.errors))}))),[]),S=n.useCallback(()=>{h(""),a(E.PHONE)},[]),j=n.useCallback(()=>{h(""),a(E.EMAIL)},[]),Q=n.useCallback(()=>{a(E.EMAIL_PASSWORD)},[]);return t===E.EMAIL_PASSWORD?e.jsx(Me,{}):t===E.EMAIL_CODE?e.jsx(ge,{email:r,methodId:m,onSetMethodId:c,onBack:j,onShowPhoneStep:S,onShowPasswordStep:Q}):t===E.PHONE_CODE?e.jsx(Le,{phone:d,methodId:m,onSetMethodId:c,onBack:S,onShowEmailStep:j}):e.jsx(Te,{title:"authentication.join_team.title",description:ve[t],alertError:p,dataTestId:"JoinTeamContainer",children:t===E.EMAIL?e.jsx(ye,{onSubmit:x,onShowPhoneStep:S}):e.jsx(De,{onSubmit:I,onShowEmailStep:j})})},We=()=>{const t=re(),a=R(),r=v(ce),o=v(_e);return n.useEffect(()=>{o&&r&&(window.location.href=me)},[o,r]),!o||r?null:e.jsxs(_,{h:t?"100%":"initial",className:"JoinTeamView",bgcolor:"mono0",children:[e.jsx(he,{}),!t&&e.jsx(_,{bbw:1,bcolor:"mono300",bs:"solid",children:e.jsx(Ee,{isMobile:!0})}),e.jsxs(_,{row:t,column:!t,h:"100%",children:[t&&e.jsx(ue,{}),e.jsx(_,{hcenter:!0,vcenter:!0,grow:1,p:a?u.padding.md:u.padding.lg,mt:a?u.margin["2xl"]:void 0,dataTestId:"JoinTeamVie
1w",children:e.jsx(He,{})})]})]})},ze=le({productArea:Ie.SIGN_IN,eventCategory:xe.ONBOARDING})(We);export{ze as default};
2//# sourceMappingURL=index-chunk-D3eHotEQ.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.