PageSourceSearch

https://app.laurenvestal.com/assets/reset-password-CNCYgYfT.js

js laurenvestal.com collected 2026-10-05 00:41:10 UTC 2,685 bytes, 1 lines download raw bytes

1import{u as v,r as a,s as d,j as s,t as l}from"./index-C4omiYqX.js";import{B as C}from"./button-TrljJ5s5.js";import{I as h}from"./input-C0JNkts8.js";import{L as f}from"./label-CZ4oxKpO.js";import{E as w}from"./eye-off-Cuu7TG87.js";import{E as x}from"./eye-ByFEb-Rt.js";import"./utils-C4zmdnH3.js";import"./createLucideIcon-BgoXvqI6.js";function U(){const g=v(),[r,c]=a.useState(!1),[o,b]=a.useState(""),[n,j]=a.useState(!1),[u,y]=a.useState(""),[i,N]=a.useState(!1),[m,p]=a.useState(!1);a.useEffect(()=>{d.auth.getSession().then(({data:t})=>{t.session&&c(!0)});const{data:{subscription:e}}=d.auth.onAuthStateChange(t=>{(t==="PASSWORD_RECOVERY"||t==="SIGNED_IN")&&c(!0)});return()=>e.unsubscribe()},[]);const S=async e=>{if(e.preventDefault(),o!==u){l.error("Passwords don't match");return}p(!0);try{const{error:t}=await d.auth.updateUser({password:o});if(t)throw t;l.success("Password updated. You're signed in."),g({to:"/client"})}catch(t){l.error(t instanceof Error?t.message:"Could not update password")}finally{p(!1)}};return s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-6",children:s.jsxs("form",{onSubmit:S,className:"w-full max-w-sm space-y-5 rounded-xl border border-border bg-card p-8 shadow-sm",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold uppercase tracking-wide text-primary",children:"Set new password"}),s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:r?"Choose a new password for your account.":"Verifying reset link…"})]}),s.jsxs("div",{children:[s.jsx(f,{children:"New password"}),s.jsxs("div",{className:"relative",children:[s.jsx(h,{type:n?"text":"password",value:o,onChange:e=>b(e.target.value),required:!0,minLength:6,disabled:!r,className:"pr-10"}),s.jsx("button",{type:"button",onClick:()=>j(e=>!e),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":n?"Hide password":"Show password",children:n?s.jsx(w,{className:"h-4 w-4"}):s.jsx(x,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{children:[s.jsx(f,{children:"Confirm password"}),s.jsxs("div",{className:"relative",children:[s.jsx(h,{type:i?"text":"password",value:u,onChange:e=>y(e.target.value),required:!0,minLength:6,disabled:!r,className:"pr-10"}),s.jsx("button",{type:"button",onClick:()=>N(e=>!e),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":i?"Hide password":"Show password",children:i?s.jsx(w,{className:"h-4 w-4"}):s.jsx(x,{className:"h-4 w-4"})})]})]}),s.jsx(C,{type:"submit",className:"w-full",disabled:m||!r,children:m?"Updating…":"Update password"})]})})}export{U as component};

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.