1import{_ as B}from"./3EBg3iUg.js";import{_ as N}from"./BCNY_h_o.js";import{f as L,u as M,e as E,c as z,r as A,q as f,s as R,t as x,y,C as s,D as o,v as e,z as U,E as j,P as G,B as h,H as v,I as g,M as k,J as P,G as H,x as w}from"./D5MLA-hU.js";import{I}from"./Dwacv551.js";import{u as J}from"./CbqWd3-v.js";import"./B1_oImu8.js";import"./Dvq-jn9A.js";import"./D_rngVSp.js";import"./DA7qIMyu.js";import"./DeIXQDC2.js";import"./DnT6CYIS.js";import"./GhFrNfLP.js";import"./BsSRCWlq.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="2cf545fc-473c-40dc-8fa7-0da29138b457",a._sentryDebugIdIdentifier="sentry-dbid-2cf545fc-473c-40dc-8fa7-0da29138b457")}catch{}})();const O={class:"display text-3xl text-ink-900 sm:text-4xl"},$={class:"mt-2 text-base text-slate-500"},F={key:0,class:"mt-6 rounded-xl border border-red-100 bg-red-50 px-4 py-3 text-sm text-red-700"},K={class:"text-sm font-semibold text-ink-900"},Q={class:"relative mt-2"},W={class:"text-sm font-semibold text-ink-900"},X={class:"relative mt-2"},Y=["disabled"],Z={class:"mt-8 text-center text-sm text-slate-500"},D="w-full rounded-xl border border-slate-200 bg-white py-3 pl-11 pr-4 text-sm text-ink-900 placeholder:text-slate-400 transition-all focus:border-brand-400 focus:outline-none focus:ring-2 focus:ring-brand-100",me=L({__name:"reset-password",setup(a){const{t}=M(),l=E();J({title:t("resetPassword.seoTitle"),description:t("resetPassword.seoDesc"),robots:"noindex, nofollow"});const{resetPassword:C,login:S}=z(),b=String(l.query.token||""),u=String(l.query.email||"");(l.query.token||l.query.email)&&window.history.replaceState(window.history.state,"",window.location.pathname),A(async()=>{(!b||!u)&&await f("/masuk")});const n=w(""),i=w(""),p=w(!1),d=w(""),T=(m,r)=>{const c=m;return(c.data?.errors?Object.values(c.data.errors)[0]?.[0]:"")||c.data?.message||r};async function V(){if(d.value="",!b||!u){await f("/masuk");return}if(n.value!==i.value){d.value=t("resetPassword.mismatch");return}p.value=!0;try{await C({email:u,token:b,password:n.value,password_confirmation:i.value});try{await S(u,n.value),await f("/akun")}catch{await f("/masuk")}}catch(m){d.value=T(m,t("resetPassword.failed"))}finally{p.value=!1}}return(m,r)=>{const c=B,q=N;return y(),R(q,null,{default:x(()=>[s("h1",O,o(e(t)("resetPassword.heading")),1),s("p",$,o(e(t)("resetPassword.subheading")),1),e(d)?(y(),U("p",F,o(e(d)),1)):j("",!0),s("form",{class:"mt-8 space-y-4",onSubmit:G(V,["prevent"])},[s("div",null,[s("label",K,o(e(t)("resetPassword.newPassword")),1),s("div",Q,[h(e(I),{class:"pointer-events-none absolute left-3.5 top-1/2 h-4.5 w-4.5 -translate-y-1/2 text-slate-400"}),v(s("input",{"onUpdate:modelValue":r[0]||(r[0]=_=>k(n)?n.value=_:null),type:"password",autocomplete:"new-password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",class:g(D)},null,512),[[P,e(n)]])])]),s("div",null,[s("label",W,o(e(t)("resetPassword.confirmPassword")),1),s("div",X,[h(e(I),{class:"pointer-events-none absolute left-3.5 top-1/2 h-4.5 w-4.5 -translate-y-1/2 text-slate-400"}),v(s("input",{"onUpdate:modelValue":r[1]||(r[1]=_=>k(i)?i.value=_:null),type:"password",autocomplete:"new-password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",class:g(D)},null,512),[[P,e(i)]])])]),s("button",{type:"submit",disabled:e(p),class:"w-full rounded-full bg-brand-500 px-6 py-3.5 text-base font-semibold text-white shadow-lg shadow-brand-500/25 transition-all duration-300 hover:bg-brand-600 hover:shadow-brand-600/30 disabled:opacity-60 disabled:shadow-none"},o(e(p)?e(t)("auth.processing"):e(t)("resetPassword.submit")),9,Y)],32),s("p",Z,[h(c,{to:"/masuk",class:"font-semibold text-brand-600 hover:underline"},{default:x(()=>[H(o(e(t)("resetPassword.backToLogin")),1)]),_:1})])]),_:1})}}});
1export{me 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.