import{d as y,j as E,r as M,C as F,D as I,G as e,aN as d,aI as o,aH as r,u as h,aM as w,aW as q,b4 as D,b5 as L,b6 as U,b7 as j,aX as z,b8 as A,b9 as R}from"./arco.5e30593d.js";import{F as W}from"./index.6521ce51.js";import{v as G,u as H,I as Q,a as T,_ as $}from"./index.24a928a3.js";import{u as X}from"./index.d0b3fd53.js";/* empty css              */import{f as J,g as K}from"./vue.f488a631.js";import"./chart.83e7adb5.js";const O="/assets/bg.05e0780e.mp4",Y="/assets/bg.08c61ebd.jpg",Z="/assets/login-bg.04b20964.gif",ee={class:"login-form-wrapper"},oe={class:"login-form-title"},se={class:"login-form-error-msg"},ae={class:"login-form-password-actions"},re=y({__name:"login-form",setup(k){const m=J(),{t:n}=G.exports.useI18n(),f=E(""),{loading:v,setLoading:b}=X(),x=H(),t=K("login-config",{rememberPassword:!0,username:"admin",password:"admin"}),l=M({username:t.value.username,password:t.value.password}),B=async({errors:s,values:a})=>{if(!v.value&&!s){b(!0);try{await x.login(a);const{redirect:u,...c}=m.currentRoute.value.query;m.push({name:u||"Workplace",query:{...c}}),q.success(n("login.form.login.success"));const{rememberPassword:i}=t.value,{username:_,password:p}=a;t.value.username=i?_:"",t.value.password=i?p:""}catch(u){f.value=u.message}finally{b(!1)}}},C=s=>{t.value.rememberPassword=s};return(s,a)=>{const u=Q,c=D,i=L,_=T,p=U,V=j,P=z,N=A,S=R;return F(),I("div",ee,[e("div",oe,d(s.$t("login.form.title")),1),e("div",se,d(f.value),1),o(S,{ref:"loginForm",model:l,class:"login-form",layout:"vertical",size:"large",onSubmit:B},{default:r(()=>[o(i,{field:"username",rules:[{required:!0,message:s.$t("login.form.userName.errMsg")}],"validate-trigger":["change","blur"],"hide-label":""},{default:r(()=>[o(c,{modelValue:l.username,"onUpdate:modelValue":a[0]||(a[0]=g=>l.username=g),placeholder:s.$t("login.form.userName.placeholder")},{prefix:r(()=>[o(u)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["rules"]),o(i,{field:"password",rules:[{required:!0,message:s.$t("login.form.password.errMsg")}],"validate-trigger":["change","blur"],"hide-label":""},{default:r(()=>[o(p,{modelValue:l.password,"onUpdate:modelValue":a[1]||(a[1]=g=>l.password=g),placeholder:s.$t("login.form.password.placeholder"),"allow-clear":""},{prefix:r(()=>[o(_)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["rules"]),o(N,{size:24,direction:"vertical"},{default:r(()=>[e("div",ae,[o(V,{checked:"rememberPassword","model-value":h(t).rememberPassword,onChange:C},{default:r(()=>[w(d(s.$t("login.form.rememberPassword")),1)]),_:1},8,["model-value","onChange"])]),o(P,{type:"primary",size:"large","html-type":"submit",long:"",loading:h(v)},{default:r(()=>[w(d(s.$t("login.form.login")),1)]),_:1},8,["loading"]),a[2]||(a[2]=e("div",{class:"login-form-protocol"},[e("span",null,"\u767B\u5F55\u5373\u4EE3\u8868\u4F60\u5DF2\u540C\u610F"),e("a",{target:"_blank",href:"https://assets.aotiyun.com/protocol.html"},"\u300A\u7528\u6237\u670D\u52A1\u6761\u6B3E\u300B"),e("span",null,"\u4E0E"),e("a",{target:"_blank",href:"https://assets.aotiyun.com/privacy.html"},"\u300A\u9690\u79C1\u653F\u7B56\u300B"),e("span",null,"\u3002")],-1))]),_:1})]),_:1},8,["model"])])}}});const te=$(re,[["__scopeId","data-v-7cd2f2fa"]]),ne={class:"container"},le={class:"content"},ue={class:"content-inner"},ie={class:"footer"},de=y({__name:"index",setup(k){return(m,n)=>(F(),I("div",ne,[n[1]||(n[1]=e("video",{src:O,poster:Y,width:"auto",autoplay:"",loop:"",muted:"",className:"video-bg"},null,-1)),e("div",le,[e("div",ue,[n[0]||(n[0]=e("img",{src:Z,width:"555",height:"555",alt:""},null,-1)),o(te)]),e("div",ie,[o(W)])])]))}});const be=$(de,[["__scopeId","data-v-4cbfdd5d"]]);export{be as default};
