1import{e as T,o as u,a as p,aq as A,d as D,v as L,A as M,ai as q,aI as y,c as x,w as n,b as t,aJ as I,l as e,f as $,aF as z,aG as K,_ as V,aK as H,af as U,aL as F,aM as Y,aw as G,aN as J,B as W,i as j,t as Q,aO as b,aP as X}from"../../assets/vendor-DYo3sCLj.js";import{_ as k,K as Z,h as ee,$ as c,b as ae,a0 as se,a1 as oe,a2 as te,a3 as ne}from"../../assets/index-B8RyHLsu.js";import{v as re,d as le}from"../../assets/strategy_113_global-B_Uh3f3Y.js";import{l as pe}from"../../assets/strategy_99-DWbsAbFJ.js";import"../../assets/windows-BDAdlApP.js";const ie={},de={class:"main-login"},ce={class:"main-login-box"};function ue(P,i){return u(),T("div",de,[i[0]||(i[0]=p("header",null,[p("img",{src:pe,alt:"Cloud Desktop"})],-1)),p("div",ce,[A(P.$slots,"default",{},void 0,!0)])])}const me=k(ie,[["render",ue],["__scopeId","data-v-eb048f85"]]),_e={class:"login-main-box px-5 w-[400px] flex-center flex-col relative z-11"},ge={flex:"","items-center":""},fe=D({__name:"reset-password",setup(P){Z();const i=ee(),{layoutSetting:we}=L(i),E=M(),s=q({password:void 0,phone:void 0,code:void 0,type:c.PHONE_PASSCODE}),{t:a}=ae(),m=y(),l=y(!1),S=y(!1);async function d(){var _;l.value=!0;try{await((_=m.value)==null?void 0:_.validate());const o={phoneNumber:s.phone,passCode:s.code},{code:g,data:f,success:w}=await re({verifyMethod:c.PHONE_PASSCODE,phonePassCodePayload:o});if(!w){b.error({message:a("common.reset-password.361256-0"),description:a("common.reset-password.361256-1"),duration:3}),l.value=!1;return}if(!(await le({passwordResetToken:f.passwordResetToken,password:s.password})).success){b.error({message:a("common.reset-password.361256-2"),description:a("common.reset-password.361256-1"),duration:3}),l.value=!1;return}b.success({message:a("common.reset-password.361256-3"),description:a("common.reset-password.361256-4"),duration:3}),setTimeout(()=>{E.push({path:"/login",replace:!0})},2e3)}catch(o){o instanceof X&&(S.value=!0),l.value=!1}}function C(){E.push({path:"/login",replace:!0})}async function O(){await m.value.validate(["phone"])}return(_,o)=>{const g=K,f=z,w=V,h=U,v=H,R=G,N=W,B=I;return u(),x(me,null,{default:n(()=>[p("div",_e,[t(B,{ref_key:"formRef",ref:m,"w-320px":"",model:e(s)},{default:n(()=>[t(f,{activeKey:e(s).type,"onUpdate:activeKey":o[0]||(o[0]=r=>e(s).type=r),centered:"",onTabClick:o[1]||(o[1]=r=>r==="goBack"&&C())},{default:n(()=>[(u(),x(g,{key:e(c).PASSCODE,tab:e(a)("pages.login.resetPassword")},null,8,["tab"])),t(g,{key:"goBack",tab:e(a)("pages.login.goBackLogin")},null,8,["tab"])]),_:1},8,["activeKey"]),e(S)&&e(s).type===e(c).PHONE_PASSCODE?(u(),x(w,{key:0,"mb-24px":"",message:e(a)("pages.login.phoneLogin.errorMessage"),type:"error","show-icon":""},null,8,["message"])):$("",!0),t(v,{name:"phone",rules:[{required:!0,message:e(a)("pages.login.phoneNumber.required")},{pattern:e(se),message:e(a)("pages.login.phoneNumber.invalid")}]},{default:n(()=>[t(h,{value:e(s).phone,"onUpdate:value":o[2]||(o[2]=r=>e(s).phone=r),maxlength:11,"allow-clear":"",placeholder:e(a)("pages.login.phoneNumber.placeholder"),size:"large",onPressEnter:d},{prefix:n(()=>[t(e(F))]),_:1},8,["value","placeholder"])]),_:1},8,["rules"]),t(v,{name:"code",rules:[{required:!0,message:e(a)("pages.login.captcha.required")}]},{default:n(()=>[p("div",ge,[t(h,{value:e(s).code,"onUpdate:value":o[3]||(o[3]=r=>e(s).code=r),maxlength:6,style:{flex:"1 1 0%",transition:"width 0.3s ease 0s","margin-right":"8px"},autocomplete:"off","allow-clear":"",placeholder:e(a)("pages.login.captcha.placeholder"),size:"large",onPressEnter:d},{prefix:n(()=>[t(e(Y))]),_:1},8,["value","placeholder"]),t(oe,{phone:e(s).phone,autocomplete:"off","channel-type":e(te).RESET_PASSWORD_CODE,"send-valid-methods":O},null,8,["phone","channel-type"])])]),_:1},8,["rules"]),t(v,{name:"password",rules:[{required:!0,message:e(a)("pages.login.password.required")},{pattern:e(ne),message:e(a)("common.reset-password.361256-5")}]},{default:n(()=>[t(R,{value:e(s).password,"onUpdate:value":o[4]||(o[4]=r=>e(s).password=r),maxlength:18,"allow-clear":"",placeholder:" {{ t('common.reset-password.361256-6') }}",size:"large",onPressEnter:d},{prefix:n(()=>[t(e(J))]),_:1},8,["value"])]),_:1},8,["rules"]),t(N,{type:"primary",block:"",loading:e(l),size:"large",onClick:d},{default:n(()=>[j(Q(e(a)("pages.login.register")),1)]),_:1},8,["loading"])]),_:1},8,["model"])])]),_:1})}}}),Pe=k(fe,[["__scopeId","data-v-fefe437d"]]);export{Pe 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.