PageSourceSearch

https://rolestar.ai/assets/Auth-C1cxoc9J.js

js rolestar.ai collected 2026-10-05 14:42:37 UTC 12,912 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CTfYRMxW.js","assets/index-CLyewysF.js","assets/index-wyJZxHsJ.css"])))=>i.map(i=>d[i]);
2import{g as D,h as V,u as W,r as u,j as e,L as c,B as C,_ as E,f as d,e as q,s as P}from"./index-CLyewysF.js";import{S as G}from"./SEO-CP1J2ubi.js";import{I as b}from"./input-DpYJJGx3.js";import{L as N}from"./label-C6Na70eg.js";import{T as H,r as U}from"./useTermsAcceptance-BaftDBsg.js";import{t as y}from"./proxy-Clwpmd36.js";import{E as Y}from"./eye-off-CxnaMWZa.js";import{E as $}from"./eye-C1ZHSN64.js";import{A as J}from"./arrow-right-DZmumpyY.js";import{o as K,s as F}from"./types-DmVA7TLN.js";import"./checkbox-CVsO4g__.js";import"./Terms-gr5uywfE.js";import"./Layout-u2woqIAH.js";import"./mail-CVE83DXS.js";import"./download-Bi7RX_mJ.js";const Q=K({email:F().email("Please enter a valid email"),password:F().min(6,"Password must be at least 6 characters")});function he(){const[p]=D(),m=V(),{user:w,signIn:L,signUp:I}=W(),a=p.get("mode")==="signup",x=p.get("extension")==="true",R=p.get("from")==="ats",T=p.get("from")==="posting-check",v=p.get("score"),[k,z]=u.useState(!1),[S,_]=u.useState(!1),[A,M]=u.useState(!1),[r,O]=u.useState({firstName:"",lastName:"",email:"",password:""}),[o,h]=u.useState({}),g=x?"/auth/extension-callback":"/dashboard";u.useEffect(()=>{if(!w)return;if(x){m(g);return}(async()=>{const{data:s}=await P.from("profiles").select("onboarding_completed").eq("user_id",w.id).single();m(s!=null&&s.onboarding_completed?"/dashboard":"/profile-setup")})()},[w,m,g,x]);const j=i=>{const{id:s,value:t}=i.target;O(l=>({...l,[s]:t})),o[s]&&h(l=>({...l,[s]:""}))},B=async i=>{i.preventDefault(),h({});const s=Q.safeParse({email:r.email,password:r.password});if(!s.success){const t={};s.error.errors.forEach(l=>{l.path[0]&&(t[l.path[0].toString()]=l.message)}),h(t);return}if(a&&!A){h({terms:"You must agree to the Terms of Service and Privacy Policy"});return}_(!0);try{if(a){const t=[r.firstName,r.lastName].filter(Boolean).join(" "),{error:l,data:n}=await I(r.email,r.password,t||void 0);if(l){l.message.includes("already registered")?h({email:"This email is already registered. Please sign in."}):d.error(l.message);return}if(n!=null&&n.user)try{await U(n.user.id,"web")}catch(f){console.error("Failed to record terms acceptance:",f)}if(n!=null&&n.user){const{data:f}=await P.from("profiles").select("onboarding_completed").eq("user_id",n.user.id).single();m(x?g:f!=null&&f.onboarding_completed?"/dashboard":"/profile-setup")}}else{const{error:t,data:l}=await L(r.email,r.password);if(t){t.message.includes("Invalid login credentials")?h({password:"Invalid email or password"}):d.error(t.message);return}d.success("Welcome back!"),m(g)}}finally{_(!1)}};return e.jsxs("div",{className:"min-h-screen flex",children:[e.jsx(G,{title:"Sign In or Create Account",description:"Sign in to Rolestar or create a free account to access your resume score, job matches, and career tools.",noindex:!0}),e.jsx("div",{className:"flex-1 flex flex-col justify-center px-6 sm:px-12 lg:px-16 py-10",children:e.jsxs("div",{className:"w-full max-w-[400px] mx-auto",children:[e.jsxs("div",{className:"flex items-center justify-between mb-10",children:[e.jsxs(c,{to:"/",className:"inline-flex items-center gap-2",children:[e.jsx("div",{className:"h-7 w-7 rounded-md bg-primary flex items-center justify-center",children:e.jsx("span",{className:"text-primary-foreground font-bold text-sm",children:"R"})}),e.jsx("span",{className:"font-bold text-lg text-foreground",children:"Rolestar"})]}),e.jsx(c,{to:"/",className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"← Home"})]}),e.jsxs(y.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.35},children:[R&&v&&e.jsxs("div",{className:"rounded-xl bg-[#0a1628] p-4 mb-6 flex items-center gap-4",children:[e.jsx("div",{className:"h-12 w-12 rounded-full bg-accent flex items-center justify-center shrink-0",children:e.jsx("span",{className:"text-white font-bold text-lg",children:v})}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-bold text-white",children:["Your resume scored ",v,"/100"]}),e.jsx("p",{className:"text-xs text-highlight mt-0.5",children:"Create your account to unlock all fixes"})]})]}),T&&e.jsxs("div",{className:"rounded-xl bg-[#0a1628] p-4 mb-6 flex items-center gap-4",children:[e.jsx("div",{className:"h-12 w-12 rounded-full bg-accent/15 flex items-center justify-center shrink-0",children:e.jsx("span",{className:"text-accent text-xl",children:"👻"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-white",children:"Your job analysis is ready"}),e.jsx("p",{className:"text-xs text-highlight mt-0.5",children:"Create your account to unlock all signals"})]})]}),e.jsx("h1",{className:"text-2xl font-bold text-foreground mb-1",children:a?"Get started":"Welcome back"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:a?"Create your account to start optimizing your resume.":"Sign in to continue to your dashboard."}
2),a&&e.jsx("p",{className:"text-xs text-muted-foreground/80 bg-muted/50 rounded-lg px-3 py-2 mb-4",children:"✨ 847 people fixed their resume this week"}),e.jsxs(C,{type:"button",variant:"outline",className:"w-full flex items-center justify-center gap-2 h-10 text-sm mb-3",onClick:async()=>{try{const{lovable:i}=await E(async()=>{const{lovable:t}=await import("./index-CTfYRMxW.js");return{lovable:t}},__vite__mapDeps([0,1,2])),{error:s}=await i.auth.signInWithOAuth("google",{redirect_uri:x?"https://rolestar.ai/auth/extension-callback":window.location.origin});s&&d.error(s.message||"Google sign-in failed")}catch{d.error("Google sign-in failed. Please try again.")}},children:[e.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",children:[e.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),e.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),e.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),e.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),"Continue with Google"]}),e.jsxs(C,{type:"button",variant:"outline",className:"w-full flex items-center justify-center gap-2 h-10 text-sm mb-3",onClick:async()=>{try{const{lovable:i}=await E(async()=>{const{lovable:t}=await import("./index-CTfYRMxW.js");return{lovable:t}},__vite__mapDeps([0,1,2])),{error:s}=await i.auth.signInWithOAuth("apple",{redirect_uri:x?"https://rolestar.ai/auth/extension-callback":window.location.origin});s&&d.error(s.message||"Apple sign-in failed")}catch{d.error("Apple sign-in failed. Please try again.")}},children:[e.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M17.05 20.28c-.98.95-2.05.88-3.08.4-1.09-.5-2.08-.48-3.24 0-1.44.62-2.2.44-3.06-.4C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})}),"Continue with Apple"]}),e.jsxs("div",{className:"relative my-5",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t border-border"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-background px-3 text-muted-foreground/60 text-[11px] tracking-wider",children:"or continue with email"})})]}),e.jsxs("form",{onSubmit:B,className:"space-y-3.5",children:[a&&e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{htmlFor:"firstName",className:"text-xs",children:"First name"}),e.jsx(b,{id:"firstName",placeholder:"Jane",value:r.firstName,onChange:j,className:"h-9 text-sm"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{htmlFor:"lastName",className:"text-xs",children:"Last name"}),e.jsx(b,{id:"lastName",placeholder:"Doe",value:r.lastName,onChange:j,className:"h-9 text-sm"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(N,{htmlFor:"email",className:"text-xs",children:"Email"}),e.jsx(b,{id:"email",type:"email",placeholder:"[email protected]",value:r.email,onChange:j,required:!0,className:`h-9 text-sm ${o.email?"border-destructive":""}`}),o.email&&e.jsx("p",{className:"text-xs text-destructive",children:o.email})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(N,{htmlFor:"password",className:"text-xs",children:"Password"}),!a&&e.jsx(c,{to:"/forgot-password",className:"text-xs text-primary hover:underline",children:"Forgot password?"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(b,{id:"password",type:k?"text":"password",placeholder:"Min. 6 characters",value:r.password,onChange:j,required:!0,minLength:6,className:`h-9 text-sm pr-9 ${o.password?"border-destructive":""}`}),e.jsx("button",{type:"button",onClick:()=>z(!k),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:k?e.jsx(Y,{className:"h-3.5 w-3.5"}):e.jsx($,{className:"h-3.5 w-3.5"})})]}),o.password&&e.jsx("p",{className:"text-xs text-destructive",children:o.password})]}),a&&e.jsxs("div",{className:"space-y-3 pt-1",children:[e.jsxs("p",{className:"text-[11px] text-muted-foreground
2/70 leading-relaxed",children:["Free to create your account. We'll never sell your data."," ",e.jsx(c,{to:"/pricing",className:"text-primary hover:underline",children:"View pricing"})]}),e.jsx(H,{checked:A,onCheckedChange:M,error:o.terms})]}),e.jsx(C,{type:"submit",className:"w-full h-10 text-sm",disabled:S,children:S?e.jsx(q,{className:"h-4 w-4 animate-spin"}):a?e.jsxs(e.Fragment,{children:["Create account",e.jsx(J,{className:"h-3.5 w-3.5 ml-1.5"})]}):"Sign in"})]}),e.jsxs("p",{className:"text-center text-xs text-muted-foreground mt-5",children:[a?"Already have an account?":"Don't have an account?"," ",e.jsx(c,{to:a?"/auth":"/auth?mode=signup",className:"text-primary hover:underline font-medium",children:a?"Sign in":"Sign up"})]}),e.jsx("div",{className:"mt-6 pt-5 border-t border-border",children:e.jsxs("p",{className:"text-center text-xs text-muted-foreground",children:["Looking to hire?"," ",e.jsx(c,{to:"/recruiter",className:"text-primary hover:underline font-medium",children:"Recruiter Portal →"})]})})]})]})}),e.jsxs("div",{className:"hidden lg:flex flex-1 bg-hero items-center justify-center p-12 relative overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute -top-20 -right-20 w-80 h-80 border border-white/[0.06] rounded-full"}),e.jsx("div",{className:"absolute -bottom-32 -left-16 w-96 h-96 border border-white/[0.04] rounded-full"}),e.jsx("div",{className:"absolute top-1/2 right-1/4 w-48 h-48 border border-white/[0.05] rounded-full"})]}),e.jsxs(y.div,{initial:{opacity:0,scale:.97},animate:{opacity:1,scale:1},transition:{duration:.5,delay:.15},className:"relative max-w-sm text-center",children:[e.jsx("div",{className:"h-16 w-16 rounded-2xl bg-white/10 backdrop-blur-sm flex items-center justify-center mx-auto mb-8 ring-1 ring-white/10",children:e.jsx("span",{className:"text-white font-bold text-3xl",children:"R"})}),e.jsxs("h2",{className:"text-xl font-semibold text-white mb-3",children:["Resume optimization,",e.jsx("br",{}),"backed by real data."]}),e.jsx("p",{className:"text-sm text-white/50 mb-8 leading-relaxed",children:"See how companies actually screen candidates — and where your resume stands."}),e.jsx("div",{className:"space-y-3 text-left",children:["See your odds before you apply","Targeted resume fixes per company","Encrypted by default — your data stays yours"].map((i,s)=>e.jsxs(y.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:.3+s*.1,duration:.3},className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-accent text-sm",children:"—"}),e.jsx("span",{className:"text-sm text-white/70",children:i})]},s))}),a&&e.jsx(y.div,{initial:{opacity:0}
2,animate:{opacity:1},transition:{delay:.6},className:"mt-8 pt-6 border-t border-white/10",children:e.jsxs("p",{className:"text-xs text-white/40 leading-relaxed",children:["Start free — no credit card needed. ",e.jsx("span",{className:"text-white/60 font-medium",children:"Upgrade anytime"}),"."," ",e.jsx(c,{to:"/pricing",className:"text-accent hover:underline",children:"View pricing →"})]})})]})]})]})}export{he 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.