PageSourceSearch

https://bitstage.ai/assets/OAuthRoleSelection-BN7EMiCJ.js

js bitstage.ai collected 2026-10-05 13:29:44 UTC 4,907 bytes, 1 lines download raw bytes

1import{aH as u,r as x,j as e}from"./vendor-CkXPoFMb.js";import{u as p,x as g,b,ao as v,aY as f,aZ as y,B as j,aw as o,a_ as N,g as w,a$ as S}from"./index-CR9aNikF.js";import{storeMfaSetupNext as c}from"./MfaSetupPage-BYbF_bzC.js";import{b as C,O as d}from"./oauthPostAuthDestination-D5jjaGAb.js";import{I as _,e as k,k as B,g as A}from"./vendor-icons-DPnl4cY3.js";import"./vendor-datefns-N8mCDnaz.js";import"./vendor-jspdf-D2r6YsBm.js";import"./vendor-fingerprint-f-b5Qes_.js";import"./vendor-sanitize-8YZbVxp6.js";import"./vendor-sentry-DuxUMs8C.js";import"./vendor-motion-DvZ9ooo_.js";import"./MfaEnrollPanel-ChuKGc1p.js";import"./input-otp-B7lYn7RV.js";import"./recruiterOnboardingService-DY0IebLw.js";import"./bitstage-logo-full-BrydXt0F.js";function Z(){const t=u(),{toast:m}=p(),{refreshSessionFromServer:h}=g(),[s,i]=x.useState(null),l=async n=>{i(n);try{const r=await o.completeOAuthProfile(n==="hiring"?{signup_type:"hiring"}:{signup_type:"candidate"});if(o.storeTokens(r),N.setTokens(r.access),await h(),n==="hiring"){t("/auth/oauth/consents?needs_company=1",{replace:!0});return}const a=C("candidate");try{if(!(await o.getLegalAcceptance()).terms_accepted){c(a),t(`/auth/oauth/consents?next=${encodeURIComponent(d)}`,{replace:!0});return}}catch{c(a),t(`/auth/oauth/consents?next=${encodeURIComponent(d)}`,{replace:!0});return}t(a,{replace:!0})}catch(r){const a=w(r);m({title:"We couldn't finish setting up your account",description:S(a,"Try again."),variant:"destructive"})}finally{i(null)}};return e.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-background to-slate-100 px-4 py-10",children:[e.jsx(b,{title:"Choose Your Role - BitStage",description:"Continue setting up your BitStage account.",canonicalPath:"/auth/oauth/choose-role",noIndex:!0}),e.jsx("div",{className:"mx-auto flex min-h-[calc(100vh-5rem)] w-full max-w-4xl items-center justify-center",children:e.jsxs("div",{className:"w-full",children:[e.jsx("div",{className:"mb-6 flex justify-center",children:e.jsx("img",{src:v,alt:"BitStage",className:"h-8 w-auto object-contain"})}),e.jsx("div",{className:"mb-5 flex justify-center",children:e.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-[hsl(var(--brand-navy))]/20 bg-[hsl(var(--brand-cream))] px-4 py-1.5 text-xs font-semibold text-[hsl(var(--brand-navy))] shadow-sm",children:[e.jsx(_,{className:"h-3.5 w-3.5"}),"Finish your BitStage profile"]})}),e.jsx(f,{className:"border-border/70 bg-card/95 shadow-[0_24px_64px_-24px_rgba(15,23,42,0.35)]",children:e.jsxs(y,{className:"p-6 md:p-8",children:[e.jsxs("div",{className:"mx-auto max-w-2xl text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-bold tracking-tight text-slate-900 md:text-3xl",children:"How will you use BitStage?"}),e.jsx("p",{className:"mt-2 text-sm text-slate-600 md:text-base",children:"Choose your role to complete sign-in and set up the right experience."})]}),e.jsxs("div",{className:"mt-6 grid grid-cols-1 gap-4 md:grid-cols-2",children:[e.jsxs("button",{type:"button",onClick:()=>l("hiring"),disabled:s!==null,className:"group rounded-2xl border border-slate-200 bg-white p-5 text-left shadow-sm transition hover:-translate-y-0.5 hover:border-[hsl(var(--brand-navy))]/40 hover:shadow-md disabled:cursor-not-allowed disabled:opacity-60",children:[e.jsx("div",{className:"inline-flex h-11 w-11 items-center justify-center rounded-xl bg-[hsl(var(--brand-navy))]/10 ring-1 ring-[hsl(var(--brand-navy))]/20",children:e.jsx(k,{className:"h-5 w-5 text-[hsl(var(--brand-navy))]"})}),e.jsx("h2",{className:"mt-4 text-lg font-semibold text-slate-900",children:"I’m hiring"}),e.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Post roles and review recruiter-verified rehearsals."})]}),e.jsxs("button",{type:"button",onClick:()=>l("candidate"),disabled:s!==null,className:"group rounded-2xl border border-slate-200 bg-white p-5 text-left shadow-sm transition hover:-translate-y-0.5 hover:border-[hsl(var(--brand-navy))]/40 hover:shadow-md disabled:cursor-not-allowed disabled:opacity-60",children:[e.jsx("div",{className:"inline-flex h-11 w-11 items-center justify-center rounded-xl bg-[hsl(var(--brand-navy))]/10 ring-1 ring-[hsl(var(--brand-navy))]/20",children:e.jsx(B,{className:"h-5 w-5 text-[hsl(var(--brand-navy))]"})}),e.jsx("h2",{className:"mt-4 text-lg font-semibold text-slate-900",children:"I’m a candidate"}),e.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Rehearse for real roles and build your proof."})]})]}),s&&e.jsxs("div",{className:"mt-5 flex items-center justify-center gap-2 text-sm text-slate-600",children:[e.jsx(A,{className:"h-4 w-4 animate-spin"}),"Setting up your account…"]}),e.jsx("div",{className:"mt-6 flex justify-center",children:e.jsx(j,{variant:"outline",disabled:s!==null,onClick:()=>t("/login",{replace:!0}),children:"Back to Login"})})]})})]})})]})}export{Z 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.