1import{d as $,u as A,q as L,S as oe,o as C,b as S,h as s,w as r,g as e,ap as q,A as N,aq as z,f as a,t as _,K as E,U as M,_ as te,i as se,I as T,ay as ne,M as ae,O as re,Z as le,P as ie,Q as ue,R as ce,V as de,c as w,x as pe,bL as me,ao as O,aB as fe,bM as ge,J as F,l as U,H as _e,F as he}from"./axeh5-cu2nr6pr.js";import{a as be}from"./login-40d2433b.js";import{E as ve,a as we}from"./EyeSharp-e9f078df.js";const ye={class:"flex flex-col space-y-3",id:"input-coupon"},xe={class:"font-bold"},ke=$({__name:"InputPhone",props:{isLoading:{type:Boolean,default:!1}},emits:["forget-password"],setup(y,{emit:x}){const{t:d}=A(),v=y,t=L(),m=oe({phone_number:""}),f=x,k={phone_number:[{required:!0,validator(c,p){if(p){if(p.includes(","))return Error("Phone number cannot contain a comma")}else return Error(d("form.validate.required"));return!0},trigger:["input","blur"]}]},h=async()=>{try{if(await new Promise(p=>{var g;(g=t.value)==null||g.validate(i=>{p(i),i?(console.log(i),M.error(d("form.phone_number.validate.invalid"))):p(i)})}))throw new Error(d("form.validate.required"));f("forget-password",m.phone_number)}catch{}},u=c=>!c||/^\d+$/.test(c);return(c,p)=>(C(),S("div",ye,[s(e(z),{ref_key:"formRef",ref:t,rules:k,model:m},{default:r(()=>[s(e(q),{path:"phone_number","show-label":!0,label:e(d)("form.phone_number.placeholder")},{default:r(()=>[s(e(N),{"input-props":{type:"tel"},value:m.phone_number,"onUpdate:value":p[0]||(p[0]=g=>m.phone_number=g),"allow-input":u,placeholder:e(d)("form.phone_number.placeholder"),autofocus:!1,inputmode:"numeric"},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"]),s(E,{id:"btn-submit",class:"primary-button",onClick:h,loading:v.isLoading,"attr-type":"submit",disabled:!m.phone_number},{default:r(()=>[a("p",xe,_(e(d)("ok")),1)]),_:1},8,["loading","disabled"])]))}});const Fe=te(ke,[["__scopeId","data-v-03785cfc"]]),Ce=$({__name:"ForgetPasswordView",props:{show:{type:Boolean,default:!1}},emits:["close"],setup(y,{emit:x}){const{t:d}=A(),v=x,t=L(!1),m=y,f=()=>{v("close")},k=async h=>{t.value=!0;try{const u=await ne.forgetPassword(h);if(u.message.code===0)M.success(u.message.message),f();else throw new Error(u.message.message)}catch(u){const c=u.message;M.error(c),console.log(u)}t.value=!1};
1return(h,u)=>(C(),se(T,{title:e(d)("login.forgotPassword"),"show-modal":m.show,onClose:f},{content:r(()=>[s(Fe,{onForgetPassword:u[0]||(u[0]=c=>k(c)),isLoading:t.value},null,8,["isLoading"])]),_:1},8,["title","show-modal"]))}}),Me={id:"login-page",class:"login-page"},Pe={class:"wrap-login-page"},Se={class:"wrap-theme-box"},Ee={class:"inner-theme-box"},Le={class:"wrap-form-login-page"},Ie={class:"box-logo-login-page"},Re={class:"text-center title-login-page"},qe={class:"mt-5 mb-2"},Ne={class:"flex justify-between items-center"},$e={class:"box-button-login"},Ae={key:0},Be={style:{display:"flex","justify-content":"space-between"},class:"mt-3"},Ve={class:"text-center mt-8 mb-6"},Oe=["href"],Ue=["src"],ze={class:"text-underline"},He=$({__name:"LoginView",props:{show:{type:Boolean,default:!1}},emits:["close"],setup(y,{emit:x}){const d={boxShadowFocus:"#e9b033"},v={color:"#010600b8",colorFocus:"#010600b8",colorFocusError:"#010600b8",borderFocus:"1px solid #fff",border:"0px",borderRadius:"12px",textColor:"#fff",heightMedium:"40px",boxShadowFocus:"#fff",borderHover:"#fff",caretColor:"#fff"},{t}=A(),m=ae(),f=re(),k=le(),h=ie(),u=ue(),c=ce(),{login:p,rememberMe:g,modelLogin:i,isLoading:P}=be(),B=L(null),I=L(!1),D=x,j=y,V=de(),b=w(()=>V.prefix_data),H=w(()=>b.value?b.value.register.line_status_login:!1),R=w(()=>b.value?b.value.line_login.client_id:""),J=w(()=>b.value?b.value.contact.linecontact:"");w(()=>k.$state.amount),w(()=>{var n;return((n=V.prefix_data)==null?void 0:n.deposit.clear_balance)||10}),pe(async()=>{if(localStorage.getItem("rememberMe")){const n=localStorage.getItem("rememberMe");if(n){const o=JSON.parse(n);i.phone_number=o.phone_number,i.password=o.password;return}}if(f.query.tokenlogin&&f.query.username){const n=f.query.tokenlogin,o=f.query.username;g.value=!1,h.logout(),u.clearRankinfo(),localStorage.removeItem("rememberMe"),setTimeout(async()=>{await X(n,o)},500)}});const Z=()=>{I.value=!0},G=()=>{I.value=!1},K={phone_number:[{required:!0,validator(n,o){return o?!0:new Error(t("form.validate.required"))},trigger:["input","blur"]}],password:[{required:!0,validator(n,o){const l=new RegExp(/[^A-Za-z0-9]/g);if(o){if(o.match(l))return new Error(t("form.password.validate.invali
1dOnlyEng"));if(o.length<6)return new Error(t("form.password.validate.minlength",{length:6}))}else return new Error(t("form.validate.required"));return!0},trigger:["input","blur"]}]};function Q(n){return!n||/^\d+$/.test(n)}function W(n){var o;P.value=!0,n.preventDefault(),(o=B.value)==null||o.validate(async l=>{l?(console.log(l),M.error(t("form.phone_number.validate.invalid")),P.value=!1):await p()})}async function X(n,o){const l=await h.loginByToken(n,o);l.message.code===0?m.push({name:"game"}):M.error(l.message.message)}async function Y(){location.href=`https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=${R.value}&redirect_uri=`+location.origin+"/login&state="+Date.now()+"&scope=openid profile email",localStorage.removeItem("codeLine")}const ee=()=>{D("close")};return(n,o)=>(C(),S(he,null,[s(T,{title:"","show-modal":j.show,onClose:ee},{content:r(()=>[a("div",Me,[a("div",Pe,[a("div",Se,[a("div",Ee,[a("div",Le,[a("div",Ie,[s(me,{width:"90",height:"90"})]),a("h4",Re,_(e(t)("login.title")),1),s(e(z),{ref_key:"formRef",ref:B,model:e(i),rules:K},{default:r(()=>[a("div",qe,[s(e(q),{path:"phone_number","show-label":!1},{default:r(()=>[s(e(N),{value:e(i).phone_number,"onUpdate:value":o[0]||(o[0]=l=>e(i).phone_number=l),"input-props":{type:"tel"},"allow-input":Q,placeholder:e(t)("form.phone_number.title"),style:{"touch-action":"manipulation","-webkit-user-scalable":"none","-moz-user-scalable":"none","-ms-user-scalable":"none","user-scalable":"none"},"theme-overrides":v},null,8,["value","placeholder"])]),_:1}),s(e(q),{path:"password","show-label":!1},{default:r(()=>[s(e(N),{value:e(i).password,"onUpdate:value":o[1]||(o[1]=l=>e(i).password=l),type:"password","show-password-on":"click",placeholder:e(t)("form.password.placeholder"),"theme-overrides":v},{"password-visible-icon":r(()=>[s(e(O),{size:"20",color:"#8F8F8F"},{default:r(()=>[s(e(ve))]),_:1})]),"password-invisible-icon":r(()=>[s(e(O),{size:"20",color:"#8F8F8F"},{default:r(()=>[s(e(we))]),_:1})]),_:1},8,["value","placeholder"])]),_:1})]),a("div",Ne,[s(e(fe),{checked:e(g),"onUpdate:checked":o[2]||(o[2]=l=>ge(g)?g.value=l:null),"theme-overrides":d},{default:r(()=>[F(_(e(t)("login.rememberMe")),1)]),_:1},8,["checked"]),b.value.register.forget_password_btn?(C(),S("a",{key:0,href:"javascript:void(0)",class:"forget-password cursor-pointer",onClick:Z},_(e(t)("login.forgotPassword")),1)):U("",!0)]),a("div",$e,[s(E,{id:"login-button",block:"",class:"primary-button","attr-type":"submit",loading:e(P),disabled:!e(i).password||!e(i).phone_number||e(P),onClick:W},{default:r(()=>[F(_(e(t)("login.title")),1)]),_:1},8,["loading","disabled"]),s(E,{id:"register-button",block:"",class:"register-button",onClick:o[3]||(o[3]=l=>e(c).setOpenModal("RegisterView")),"attr-type":"button"},{default:r(()=>[F(_(e(t)("register.title")),1)]),_:1})]),H.value&&R.value!==""?(C(),S("div",Ae,[a("div",Be,[s(E,{class:"rounded-xl",id:"btn-login-line",type:"line",block:!0,"data-client-id":R.value,onClick:o[4]||(o[4]=l=>Y()),style:{background:`linear-gradient( 2 180deg, 3 #3ad83a 0%, 4 #539000 100% 5 )`}},{default:r(()=>[F(_(e(t)("login.loginVialine")),1)]),_:1},8,["data-client-id"])])])):U("",!0)]),_:1},8,["model"]),a("div",Ve,[a("a",{class:"flex text-call-center justify-center items-center",href:J.value},[F(_(e(t)("extra.haveProblem")),1),a("img",{loading:"lazy",class:"w-[20px] mx-1",src:e(_e)("line.png"),alt:""},null,8,Ue),a("span",ze,_(e(t)("extra.contactAdmin")),1)],8,Oe)])])])])])])]),_:1},8,["show-modal"]),s(Ce,{show:I.value,onClose:G},null,8,["show"])],64))}});export{He 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.