PageSourceSearch

https://pmhfullrebuild.base44.app/assets/ResetPassword-pPBkPPla.js

js pmhfullrebuild.base44.app collected 2026-10-03 03:10:04 UTC 2,525 bytes, 1 lines download raw bytes

1import{I as g,r as t,j as e,L as v,x as o,d as N}from"./index-DUpcj-SV.js";import{B as y}from"./button-B9wu21LD.js";import{I as c}from"./input-Bs6J1OPY.js";import{L as u}from"./label-DhSSxpWE.js";import{A as p}from"./AuthLayout-DrGblPJ6.js";import{T as b}from"./triangle-alert-pX0W2I0i.js";import{L as P}from"./loader-circle-Bhv7x53j.js";import"./index-BACy2y7J.js";function E(){const[h]=g(),i=h.get("token"),[r,w]=t.useState(""),[n,f]=t.useState(""),[l,a]=t.useState(""),[d,m]=t.useState(!1),x=async s=>{if(s.preventDefault(),a(""),r!==n){a("Passwords do not match");return}m(!0);try{await N.auth.resetPassword({resetToken:i,newPassword:r}),window.location.href="/login"}catch(j){a(j.message||"Failed to reset password")}finally{m(!1)}};return i?e.jsxs(p,{icon:o,title:"New password",subtitle:"Enter your new password below",children:[l&&e.jsx("div",{className:"mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm",children:l}),e.jsxs("form",{onSubmit:x,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(u,{htmlFor:"password",children:"New Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(o,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),e.jsx(c,{id:"password",type:"password",autoComplete:"new-password",autoFocus:!0,placeholder:"••••••••",value:r,onChange:s=>w(s.target.value),className:"pl-10 h-12",required:!0})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(u,{htmlFor:"confirm",children:"Confirm Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(o,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),e.jsx(c,{id:"confirm",type:"password",autoComplete:"new-password",placeholder:"••••••••",value:n,onChange:s=>f(s.target.value),className:"pl-10 h-12",required:!0})]})]}),e.jsx(y,{type:"submit",className:"w-full h-12 font-medium",disabled:d,children:d?e.jsxs(e.Fragment,{children:[e.jsx(P,{className:"w-4 h-4 mr-2 animate-spin"}),"Resetting..."]}):"Reset password"})]})]}):e.jsx(p,{icon:b,title:"Invalid reset link",subtitle:"This password reset link is missing or invalid",footer:e.jsx(v,{to:"/forgot-password",className:"text-primary font-medium hover:underline",children:"Request a new link"}),children:e.jsx("p",{className:"text-sm text-foreground text-center",children:"The link you used appears to be incomplete. Please request a new password reset email."})})}export{E 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.