1import{Z as V,r as o,A as b,ci as $,b7 as x,a3 as B,z as N,c as _,o as A,w as C,P as m,Q as v,M as s,a7 as M,T as S,a9 as g,aC as h,bX as I,a8 as J,e as R,aH as q,N as z}from"./entry.IRopAhUk.js";import{J as H}from"./Button.ESSauv6W.js";import{P as T}from"./password-input.WWMZsu0x.js";import U from"./spinner.ggbx2I1z.js";import"./generic-link.PubmXkgH.js";import"./index.tsdXPcWo.js";import"./icon-svg.BWRi8_RI.js";import"./link-btn.dxeHs0pv.js";import"./input-text.y6321hHv.js";import"./getFormattedWithCurrency.NlvGOsNG.js";import"./viewport-observer.A5nhnINA.js";import"./text-link.IGBM9D9X.js";import"./Checkbox.xeWO_UTz.js";const D={class:"pass-reset container"},E={key:1,class:"pass-reset__container"},L={class:"pass-reset__title"},Q=V({__name:"reset-password",setup(X){const t=o(""),i=o(!1),w=b(),n=$(),f=o(!1),a=o(""),l=x(),{$store:u,$bus:y}=R(),{t:p}=B({useScope:"global"});N({title:p("reset-password.title")});const k=_(()=>!f.value||!u.getters["user/index/initialized"]),d=_(()=>u.getters["user/index/isAuthenticated"]);A(()=>{f.value=!0,(d.value||!w.query.token)&&n.replace(l("/"))}),C(()=>d.value,()=>{d.value&&n.replace(l("/"))});async function P(){if(!i.value)return;const e=await u.dispatch("customer/resetPassword",{password:t.value,token:w.query?.token});if(e?.error){a.value=e.message||p("reset-password.error-generic");return}return a.value="",y.$emit("show-toast",{type:"success",message:p("reset-password.password-reset-success")}),n.push(l("/user/login"))}return(e,r)=>(m(),v("div",D,[s(k)?(m(),M(U,{key:0,class:"pass-reset__loading"})):(m(),v("div",E,[S("h5",L,g(e.$t("reset-password.title")),1),h(T,{modelValue:s(t),"onUpdate:modelValue":r[0]||(r[0]=c=>I(t)?t.value=c:null),modelModifiers:{trim:!0},validate:"",label:e.$t("reset-password.new-password"),"is-valid":s(i),"error-message":s(a),"display-error":!!s(a),onUpdateValidity:r[1]||(r[1]=c=>i.value=c)},null,8,["modelValue","label","is-valid","error-message","display-error"]),h(H,{primary:"",onClick:P},{default:J(()=>[q(g(e.$t("reset-password.reset")),1)]),_:1})]))]))}}),oe=z(Q,[["__scopeId","data-v-c35a0b08"]]);export{oe 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.