module.exports=[738783,(a,b,c)=>{"use strict";b.exports=a.r(342602).vendored["react-ssr"].ReactServerDOMTurbopackClient},37047,a=>{"use strict";let b=(0,a.i(170106).default)("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);a.s(["KeyRound",()=>b],37047)},593755,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(695245),e=a.i(159501),f=a.i(336570),g=a.i(596221),h=a.i(37047),i=a.i(699570),j=a.i(591119),k=a.i(441921),l=a.i(866718),m=a.i(478793),n=a.i(238246),o=a.i(50944),p=a.i(83490);let q=f.z.object({email:f.z.string().email("Please enter a valid email address."),token:f.z.string().min(1,"Reset code is required."),password:f.z.string().min(8,"Password must be at least 8 characters."),password_confirmation:f.z.string()}).refine(a=>a.password===a.password_confirmation,{message:"Passwords don't match",path:["password_confirmation"]});function r(){let{toast:a}=(0,m.useToast)(),f=(0,o.useRouter)(),[r,s]=(0,c.useState)(!1),t=(0,d.useForm)({resolver:(0,e.zodResolver)(q),defaultValues:{email:"",token:"",password:"",password_confirmation:""}}),u=async b=>{s(!0);try{await p.default.post("https://arcedea.losenviskas.com/laravel-backend/public/api/reset-password",b),a({title:"Password Reset Successful",description:"Your password has been changed. You can now log in with your new password."}),f.push("/login")}catch(c){console.error("Reset password failed:",c);let b="Invalid reset code or an unknown error occurred.";p.default.isAxiosError(c)&&c.response&&(b=c.response.data.message||b),a({variant:"destructive",title:"Reset Failed",description:b})}finally{s(!1)}};return(0,b.jsxs)("div",{className:"flex min-h-screen items-center justify-center bg-muted/40 p-4",children:[(0,b.jsxs)(n.default,{href:"/login",className:"absolute left-8 top-8 py-2 px-4 rounded-lg no-underline text-foreground bg-muted-foreground/10 flex items-center gap-2 text-sm",children:[(0,b.jsxs)("svg",{className:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("path",{d:"m12 19-7-7 7-7"}),(0,b.jsx)("path",{d:"M19 12H5"})]}),"Back to Login"]}),(0,b.jsxs)(j.Card,{className:"w-full max-w-sm",children:[(0,b.jsxs)(j.CardHeader,{className:"text-center",children:[(0,b.jsx)("div",{className:"mx-auto bg-primary text-primary-foreground rounded-full w-16 h-16 flex items-center justify-center mb-4",children:(0,b.jsx)(h.KeyRound,{className:"w-8 h-8"})}),(0,b.jsx)(j.CardTitle,{className:"text-2xl",children:"Reset Your Password"}),(0,b.jsx)(j.CardDescription,{children:"Enter your email, the reset code you received, and your new password."})]}),(0,b.jsx)(j.CardContent,{children:(0,b.jsx)(k.Form,{...t,children:(0,b.jsxs)("form",{onSubmit:t.handleSubmit(u),className:"space-y-4",children:[(0,b.jsx)(k.FormField,{control:t.control,name:"email",render:({field:a})=>(0,b.jsxs)(k.FormItem,{children:[(0,b.jsx)(k.FormLabel,{children:"Email Address"}),(0,b.jsx)(k.FormControl,{children:(0,b.jsx)(l.Input,{placeholder:"you@example.com",...a})}),(0,b.jsx)(k.FormMessage,{})]})}),(0,b.jsx)(k.FormField,{control:t.control,name:"token",render:({field:a})=>(0,b.jsxs)(k.FormItem,{children:[(0,b.jsx)(k.FormLabel,{children:"Reset Code"}),(0,b.jsx)(k.FormControl,{children:(0,b.jsx)(l.Input,{placeholder:"123456",...a})}),(0,b.jsx)(k.FormMessage,{})]})}),(0,b.jsx)(k.FormField,{control:t.control,name:"password",render:({field:a})=>(0,b.jsxs)(k.FormItem,{children:[(0,b.jsx)(k.FormLabel,{children:"New Password"}),(0,b.jsx)(k.FormControl,{children:(0,b.jsx)(l.Input,{type:"password",placeholder:"••••••••",...a})}),(0,b.jsx)(k.FormMessage,{})]})}),(0,b.jsx)(k.FormField,{control:t.control,name:"password_confirmation",render:({field:a})=>(0,b.jsxs)(k.FormItem,{children:[(0,b.jsx)(k.FormLabel,{children:"Confirm New Password"}),(0,b.jsx)(k.FormControl,{children:(0,b.jsx)(l.Input,{type:"password",placeholder:"••••••••",...a})}),(0,b.jsx)(k.FormMessage,{})]})}),(0,b.jsxs)(i.Button,{type:"submit",disabled:r,className:"w-full",children:[r?(0,b.jsx)(g.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Reset Password"]})]})})})]})]})}a.s(["default",()=>r])}];

//# sourceMappingURL=_b186237f._.js.map