1import{bY as y,c4 as g,cc as k,c6 as x,be as P,U as R,cs as t,i as C,bt as S,bi as $,a1 as o,S as c,bE as i,bK as n,cu as q,az as L,k as T,j as U,g as N,a0 as B,bv as m,b1 as D}from"./Bz2teeeH.js";import{D as w}from"./BURYKKZL.js";import{u as I}from"./2ksdYChw.js";import{V as M}from"./DSoGvfxy.js";import{V as j}from"./CzydoDWT.js";import{a as z}from"./C1qS52u0.js";import"./BAL7c-p8.js";import"./B4r2BO0B.js";import"./BVwMu-ms.js";const A={class:"text-h5 mb-1"},F=["textContent"],Z={__name:"choosepassword",setup(X){I();const{t:l}=y(),_=g(),f=k(),{$initialQuery:h,$parse:u}=x(),d=m(!1),b=m(""),r=S({new_password:"",token:""}),V=[e=>!!e||l("account_password_enter"),e=>e&&e.length>=2||l("account_password_enter"),e=>e&&e.length>=6||l("account_password_invalid")];let p="";P(()=>{const e=new URLSearchParams(h||"");r.token=e.get("token")||f.query.token,p=u.Parse.serverURL+"/apps/"+u.Parse.applicationId+"/request_password_reset"});async function v(){try{const e=await fetch(p,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},body:new URLSearchParams({token:r.token,new_password:r.new_password}).toString()});if(e.ok){await D(_("/parse/passwordresetsuccess"));return}let s=l("account_password_invalid");try{const a=await e.json();a&&a.error&&(s=a.error)}catch{}w.error(null,s)}catch(e){w.error(null,e.message)}}return(e,s)=>($(),R(C,{class:"mx-auto mt-10","max-width":"344",elevation:"0"},{default:t(()=>[o(M,{lines:"three"},{default:t(()=>[c("div",A,i(e.$t("account_reset_password")),1),c("div",null,i(e.$t("account_newpassword_enter")),1)]),_:1}),c("div",{textContent:i(n(b))},null,8,F),o(j,{id:"form",ref:"form",modelValue:n(d),"onUpdate:modelValue":s[1]||(s[1]=a=>
1L(d)?d.value=a:null),"lazy-validation":"",onSubmit:q(v,["prevent"])},{default:t(()=>[o(T,null,{default:t(()=>[o(z,{modelValue:n(r).new_password,"onUpdate:modelValue":s[0]||(s[0]=a=>n(r).new_password=a),name:"new_password",class:"svgicondef","prepend-icon":"$pfprivacy",label:e.$t("account_newpassword"),rules:V,required:"",type:"password"},null,8,["modelValue","label"])]),_:1}),o(U,null,{default:t(()=>[o(N,{block:"block",type:"submit",rounded:"",disabled:!n(d),color:"primary",elevation:"0"},{default:t(()=>[B(i(e.$t("account_change_password")),1)]),_:1},8,["disabled"])]),_:1})]),_:1},8,["modelValue"])]),_:1}))}};export{Z 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.