PageSourceSearch

https://vmlu.ai/_next/static/chunks/303.2939b7f75d84af17.js

js vmlu.ai collected 2026-10-04 00:28:05 UTC 15,402 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[303],{7428:function(e,s,a){"use strict";var r=a(5152),t=a.n(r);let l=t()(()=>a.e(289).then(a.bind(a,6289)),{loadableGenerated:{webpack:()=>[6289]},ssr:!1});s.Z=l},5002:function(e,s,a){"use strict";a.d(s,{o:function(){return W},Z:function(){return P}});var r=a(5893),t=a(4184),l=a.n(t),n=a(7294),o=a(1649),c=a(7428),d=a(5980),i=a(9137),m=a(9094),x=a(3627),u=a(5369),p=a(998),g=a(2553),h=a(318),b=e=>{let{value:s,onChange:a,label:t,name:o,required:c=!1,children:d=(0,r.jsx)(r.Fragment,{})}=e,[i,m]=(0,n.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(g.W_,{className:"label text-[var(--gray-light)]",children:[c&&(0,r.jsx)(g.W_,{renderAs:"span",className:"text-[var(--red)]",children:"*\xa0"}),t]}),(0,r.jsxs)(g.W_,{className:"flex mt-[10px] mb-4 relative",children:[(0,r.jsx)(g.W_,{className:"rounded-lg pl-4 pr-11 py-3 border border-[var(--bor-3)] w-full",renderAs:"input",type:i?"text":"password",name:o,value:s,onChange:a}),(0,r.jsx)(g.W_,{className:l()("absolute right-[16px] top-1/2","text-[var(--blue)] text-[14px]","-translate-y-1/2","cursor-pointer"),onClick:()=>m(!i),children:(0,r.jsx)(g.W_,{renderAs:"img",src:"/images/icons/".concat(i?"eye":"eye-cross",".svg"),alt:""})})]}),d]})},v=e=>{let{setAction:s}=e,{loginByRegister:a}=(0,h.aC)(),[t,c]=(0,n.useState)(!0),[d,i]=(0,n.useState)({username:"",password:""}),m=(0,o.v9)(u.aF);(0,n.useEffect)(()=>{d.username&&d.password?c(!1):c(!0)},[d]);let x=e=>{let s={...d,[e.target.name]:e.target.value};i(s)},v=(0,n.useCallback)(()=>{(0,p.x4)()},[]);return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(g.W_,{className:"form-group",renderAs:"form",onSubmit:e=>{e.preventDefault(),a(d.username,d.password)},children:[(0,r.jsx)(g.W_,{className:"label text-[var(--gray-light)]",children:"Username"}),(0,r.jsx)(g.W_,{className:"flex mt-[10px] mb-4",children:(0,r.jsx)(g.W_,{className:"rounded-lg px-4 py-3 border border-[var(--bor-3)] w-full",renderAs:"input",name:"username",value:d.username,onChange:x})}),(0,r.jsx)(b,{value:d.password,onChange:x,label:"Password",name:"password"}),(0,r.jsxs)(g.W_,{className:l()("flex justify-between"),children:[(0,r.jsx)(g.W_,{className:"text-[var(--red)] text-[14px]",children:m.message}),(0,r.jsx)(g.W_,{renderAs:"div",className:"text-[var(--blue)] text-[14px] cursor-pointer",onClick:()=>s(W.FORGOT_PASSWORD),children:"Forgot password?"})]}),(0,r.jsx)(g.W_,{renderAs:"button",type:"submit",className:l()("w-full h-[50px]","bg-gradient-to-l from-[#0D6EFD] to-[#6610F2]","rounded-md","text-[var(--white)] uppercase text-[18px] font-semibold","hover:brightness-110","cursor-pointer","my-[30px]",{disabled:t}),children:"Login"}),(0,r.jsx)(g.W_,{className:l()("relative text-center","after:content-[''] after:absolute after:left-0 after:top-1/2 after:z-[-1]","after:h-px after:w-full","after:bg-[var(--bor-3)]"),children:(0,r.jsx)(g.W_,{renderAs:"span",className:"bg-[var(--white)] px-4 text-[#888] text-[12px]",children:"or continue with"})}),(0,r.jsx)(g.W_,{className:l()("flex items-center justify-center","w-full h-[50px]","bg-[#EBEDFC]","rounded-md","my-[30px]","cursor-pointer","text-[var(--blue)] uppercase text-[20px] font-semibold"),onClick:v,children:"Zalo"}),(0,r.jsxs)(g.W_,{className:"text-center text-[14px]",children:["Don't have an account?\xa0",(0,r.jsx)(g.W_,{renderAs:"a",className:l()("text-[var(--blue)] cursor-pointer"),onClick:()=>s(W.REGISTER),children:"Register now"})]})]})})},f=a(8080),j=e=>{let{setAction:s}=e,[a,t]=(0,n.useState)(!0),[o,c]=(0,n.useState)({username:{value:""},password:{value:""},confirmPassword:{value:""},email:{value:""},code:{value:""}});(0,n.useEffect)(()=>{let e=Object.values(o).filter(e=>!e.value).length>0;t(e)},[o]);let d=e=>{let s={...o,[e.target.name]:{value:e.target.value}};c(s)},i=()=>o.username.value?o.password.value?(0,p.uo)(o.password.value)?o.confirmPassword.value!==o.password.value?(c(Object.assign({},o,{confirmPassword:{...o.confirmPassword,message:"Password and confirm password does not match."}})),!1):(0,p.oH)(o.email.value)?!!o.code.value||(c(Object.assign({},o,{code:{...o.code,message:"Please enter a verification code."}})),!1):(c(Object.assign({},o,{email:{...o.email,message:"Please enter a valid email address."}})),!1):(c(Object.assign({},o,{password:{...o.password,message:"Password must contain at least eight characters, at least one number and both lower and uppercase letters and special characters"}})),!1):(c(Object.assign({},o,{password:{...o.password,message:"Please enter a password."}})),!1):(c(Object.assign({},o,{username:{...o.username,message:"Please enter a username."}})),!1);return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(g.W_,{className:"form-group",renderAs:"form",onSubmit:e=>{if(e.preventDefault(),!i())return;let a={};
1Object.entries(o).forEach(e=>{a[e[0]]=e[1].value}),f.e.register({...a}).then(()=>{s(W.LOGIN)}).catch(e=>{c(Object.assign({},o,{code:{...o.code,message:e.error_message}}))})},children:[(0,r.jsxs)(g.W_,{className:"label text-[var(--gray-light)]",children:[(0,r.jsx)(g.W_,{renderAs:"span",className:"text-[var(--red)]",children:"*\xa0"}),"Username"]}),(0,r.jsx)(g.W_,{className:"flex my-[10px]",children:(0,r.jsx)(g.W_,{className:"rounded-lg px-4 py-3 border border-[var(--bor-3)] w-full",renderAs:"input",name:"username",value:o.username.value,onChange:d})}),(0,r.jsx)(g.W_,{className:l()("text-[var(--red)] text-[14px] pb-[6px] "),children:(0,r.jsx)(g.W_,{className:"mb-[10px]",children:o.username.message})}),(0,r.jsx)(b,{onChange:d,value:o.password.value,required:!0,label:"Password",name:"password",children:(0,r.jsx)(g.W_,{className:l()("text-[var(--red)] text-[14px] pb-[6px] "),children:(0,r.jsx)(g.W_,{className:"mb-[10px]",children:o.password.message})})}),(0,r.jsx)(b,{onChange:d,value:o.confirmPassword.value,required:!0,label:"Confirm Password",name:"confirmPassword",children:(0,r.jsx)(g.W_,{className:l()("text-[var(--red)] text-[14px] pb-[6px] "),children:(0,r.jsx)(g.W_,{className:"mb-[10px]",children:o.confirmPassword.message})})}),(0,r.jsxs)(g.W_,{className:"label text-[var(--gray-light)]",children:[(0,r.jsx)(g.W_,{renderAs:"span",className:"text-[var(--red)]",children:"*\xa0"}),"Email"]}),(0,r.jsx)(g.W_,{className:"flex mt-[10px] mb-4",children:(0,r.jsx)(g.W_,{className:"rounded-lg px-4 py-3 border border-[var(--bor-3)] w-full",renderAs:"input",name:"email",value:o.email.value,onChange:d})}),(0,r.jsx)(g.W_,{className:l()("text-[var(--red)] text-[14px] pb-[6px] "),children:(0,r.jsx)(g.W_,{className:"mb-[10px]",children:o.email.message})}),(0,r.jsxs)(g.W_,{className:"label text-[var(--gray-light)]",children:[(0,r.jsx)(g.W_,{renderAs:"span",className:"text-[var(--red)]",children:"*\xa0"}),"Verification Code"]}),(0,r.jsxs)(g.W_,{className:l()("flex my-[10px] relative"),children:[(0,r.jsx)(g.W_,{className:l()("rounded-lg pl-4 pr-[140px] py-3 border border-[var(--bor-3)] w-full !opacity-100",{disabled:!(0,p.oH)(o.email.value)}),renderAs:"input",name:"code",value:o.code.value,onChange:d}),(0,r.jsx)(g.W_,{renderAs:"button",className:l()("h-[42px] w-[120px]","bg-[var(--green-secondary)]","rounded-md","text-[var(--white)] uppercase text-[14px]","absolute top-[4px] right-[4px]",{disabled:!(0,p.oH)(o.email.value)}),onClick:e=>{if(e.preventDefault(),!(0,p.oH)(o.email.value)){c(Object.assign({},o,{email:{message:"Please enter a valid email address."}}));return}f.e.sendVerifyCode(o.email.value).then(()=>{c(Object.assign({},o,{code:{...o.code,message:"A verification code was just sent to your email.",success:!0}}))}).catch(e=>{c(Object.assign({},o,{code:{...o.code,message:e.error_message,success:!1}}))})},children:"Send code"})]}),(0,r.jsx)(g.W_,{className:l()("text-[14px] pb-[6px] ",{"text-[var(--red)]":!o.code.success},{"text-[var(--green)]":o.code.success}),children:(0,r.jsx)(g.W_,{className:"mb-[10px]",children:o.code.message})}),(0,r.jsx)(g.W_,{renderAs:"button",type:"submit",className:l()("w-full h-[50px]","bg-gradient-to-l from-[#0D6EFD] to-[#6610F2]","rounded-md","text-[var(--white)] uppercase text-[18px] font-semibold","hover:brightness-110","cursor-pointer","my-[30px]",{disabled:a}),children:"Register"}),(0,r.jsxs)(g.W_,{className:"text-center text-[14px] text-[var(--gray-light)]",children:["Already have an account?\xa0",(0,r.jsx)(g.W_,{renderAs:"button",className:l()("text-[var(--blue)] "),onClick:()=>s(W.LOGIN),children:"Login now"})]})]})})},w=()=>{let[e,s]=(0,n.useState)({email:"",message:"",error:!1});return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(g.W_,{className:"form-group",renderAs:"form",onSubmit:a=>{a.preventDefault(),(0,p.oH)(e.email)?f.e.forgotPassword(e.email).then(()=>{s(Object.assign({},e,{message:"A verification code was just sent to your email.",error:!1}))}).catch(a=>{s(Object.assign({},e,{message:a.error_message,error:!0}))}):s(Object.assign({},e,{message:"Not Valid Email",error:!0}))},children:[(0,r.jsx)(g.W_,{className:"label text-[var(--gray-light)]",children:"Email"}),(0,r.jsx)(g.W_,{className:"flex mt-[10px]",children:(0,r.jsx)(g.W_,{className:"rounded-lg px-4 py-3 border border-[var(--bor-3)] w-full",renderAs:"input",name:"email",value:e.email,onChange:a=>{let r={...e,[a.target.name]:a.target.value};s(r)}})}),e.message&&(0,r.jsx)(g.W_,{className:l()("text-[14px] mt-4",{"text-[var(--red)]":e.error},{"text-[var(--green)]":!e.error}),children:e.message}),(0,r.jsx)(g.W_,{renderAs:"button",type:"submit",className:l()("w-full h-[50px]","bg-gradient-to-l from-[#0D6EFD] to-[#6610F2]","rounded-md","text-[var(--white)] uppercase text-[18px] font-semibold","hover:brightness-110","cursor-pointer","mt-[30px]"),children:"Send mail"})]})})},N=e=>{let{setAction:s}
1=e,[a,t]=(0,n.useState)(!0),[o,c]=(0,n.useState)({password:{value:""},confirmPassword:{value:""}});(0,n.useEffect)(()=>{let e=Object.values(o).filter(e=>!e.value).length>0;t(e)},[o]);let d=e=>{let s={...o,[e.target.name]:{value:e.target.value}};c(s)},i=()=>o.password.value?(0,p.uo)(o.password.value)?o.confirmPassword.value===o.password.value||(c(Object.assign({},o,{confirmPassword:{...o.confirmPassword,message:"Password and confirm password does not match."}})),!1):(c(Object.assign({},o,{password:{...o.password,message:"Password must contain at least eight characters, at least one number, at least and both lower and uppercase letters and special characters"}})),!1):(c(Object.assign({},o,{password:{...o.password,message:"Please enter a password."}})),!1);return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(g.W_,{className:"form-group",renderAs:"form",onSubmit:e=>{if(e.preventDefault(),!i())return;let a={};Object.entries(o).forEach(e=>{a[e[0]]=e[1].value}),f.e.resetPassword({...a,token:(0,p.Ph)("token")}).then(e=>{s(W.LOGIN),c(Object.assign({},o,{confirmPassword:{...o.confirmPassword,message:e.error_message}}))}).catch(e=>{c(Object.assign({},o,{confirmPassword:{...o.confirmPassword,message:e.error_message}}))})},children:[(0,r.jsx)(b,{value:o.password.value,onChange:d,label:"Password",name:"password",children:(0,r.jsx)(g.W_,{className:l()("text-[var(--red)] text-[14px] pb-[6px] "),children:(0,r.jsx)(g.W_,{className:"mb-[10px]",children:o.password.message})})}),(0,r.jsx)(b,{value:o.confirmPassword.value,onChange:d,label:"Confirm Password",name:"confirmPassword",children:(0,r.jsx)(g.W_,{className:l()("text-[var(--red)] text-[14px] pb-[6px] "),children:(0,r.jsx)(g.W_,{className:"mb-[10px]",children:o.confirmPassword.message})})}),(0,r.jsx)(g.W_,{renderAs:"button",type:"submit",className:l()("w-full h-[50px]","bg-gradient-to-l from-[#0D6EFD] to-[#6610F2]","rounded-md","text-[var(--white)] uppercase text-[18px] font-semibold","hover:brightness-110","cursor-pointer","mt-[30px]",{disabled:a}),children:"Submit"})]})})},_=a(7793);let W={LOGIN:"Login",REGISTER:"Register",FORGOT_PASSWORD:"Forgot Password",CHANGE_PASSWORD:"Change Password"};function A(e){let{onLogout:s}=e,{visible:a,handleClose:t,handleOpen:n}=(0,x.Z)(),i=(0,o.v9)(u.aF);return(0,r.jsxs)(d.Z,{className:"flex md:hidden cursor-pointer h-full",children:[(0,r.jsx)(d.Z,{className:l()("w-[52px] h-full","flex items-center justify-center",{"bg-[rgba(247,247,248,0.10)]":a}),children:(0,r.jsx)(d.Z,{renderAs:"img",alt:"",src:a?"/images/icons/cross.svg":i.avatar||"https://avatar.talk.zdn.vn/default.jpg",className:l()("w-6 h-6",{"rounded-full":!a}),onClick:a?t:n})}),(0,r.jsx)(c.Z,{visible:a,handleCancel:t,disabledScrollOnActive:!0,children:(0,r.jsxs)(d.Z,{className:l()("animate-menu-fadein","fixed","inset-x-0 top-[50px]","w-full","bg-white","z-50","px-5 py-6","text-[#0D0F10]","flex items-center justify-between"),children:[(0,r.jsxs)(d.Z,{children:["Welcome, ",i.name]}),(0,r.jsx)(d.Z,{renderAs:"img",src:"/images/icons/m-log-out.svg",className:"ml-1.5 cursor-pointer",onClick:s})]})})]})}var P=()=>{let e=(0,o.I0)(),s=(0,o.v9)(u.aF),a=(0,o.v9)(u.ML),{visible:t,handleClose:g,handleOpen:h}=(0,x.Z)(),{logout:b}=(0,m.Z)(),[f,P]=(0,n.useState)(W.LOGIN);(0,n.useEffect)(()=>{let e=(0,p.Ph)("token");e&&(h(),P(W.CHANGE_PASSWORD))},[]);let O=(0,n.useCallback)(()=>{b()},[]);return a?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(d.Z,{className:l()("items-center","border-l border-[rgba(255,255,255,0.20)]","pl-4","hidden md:flex"),children:[(0,r.jsx)(d.Z,{renderAs:"img",alt:"",src:s.avatar||"https://avatar.talk.zdn.vn/default.jpg",className:l()("w-6 h-6 rounded-full mr-2.5")}),(0,r.jsx)(d.Z,{children:s.name}),(0,r.jsx)(d.Z,{renderAs:"img",src:"/images/icons/log-out.svg",className:"ml-1.5 cursor-pointer",onClick:O})]}),(0,r.jsx)(A,{onLogout:O})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(d.Z,{className:"mr-4 md:mr-0",children:[(0,r.jsx)(i.Z,{onClick:h,className:"hidden md:flex font-medium h-[32px]",children:"Login"}),(0,r.jsx)(d.Z,{renderAs:"img",src:"/images/icons/user.svg",alt:"",onClick:h,className:"flex md:hidden cursor-pointer"})]}),(0,r.jsx)(c.Z,{visible:t,handleCancel:()=>{g(),setTimeout(()=>{P(W.LOGIN)},500),e((0,_.oJ)({user:{id:0,message:""}}))},disabledScrollOnActive:!1,className:"z-[999]",children:(0,r.jsxs)(d.Z,{className:l()("flex","absolute top-[50%] left-[50%]","min-w-[335px] w-[70vw] md:w-[750px] rounded","translate-x-[-50%] translate-y-[-50%]","bg-[var(--white)]"),children:[(0,r.jsx)(d.Z,{renderAs:"button",className:"absolute right-[20px] top-[20px]",children:(0,r.jsx)(d.Z,{renderAs:"img",alt:"",src:"/images/icons/cross.svg",onClick:g})}),(0,r.jsxs)(d.Z,{className:l()("grow","p-[30px] md:p-[50px]"),children:[(0,r.jsx)(d.Z,{className:"md:hidden text-[30px] text-center font-semibold font-[BarlowCondensed] mb-6",children:f}),(()=>{switch(f){case W.LOGIN:return(0,r.jsx)(v,{setAction:P});case W.REGISTER:return(0,r.jsx)(j,{setAction:P});case W.FORGOT_PASSWORD:return(0,r.jsx)(w,{});case W.CHANGE_PASSWORD:return(0,r.jsx)(N,{setAction:P})}})()]}),(0,r.jsx)(d.Z,{className:l()("w-[250px]","bg-[url(/images/login-bg.png)] md:bg-[url(/images/login-bg.png)]","bg-no-repeat bg-cover","text-[48px] text-[var(--white)] text-center font-semibold font-[BarlowCondensed]","items-center justify-center shrink-0","hidden md:flex"),children:f})]})})]})}},3277:function(e,s,a){"use strict";a.d(s,{s:function(){return r}});let r=[{url:"/",title:"Home"},{url:"/#Download",title:"Download"},{url:"/leaderboard",title:"Leaderboard"},{url:"/submit",title:"Submit"},{url:"/reference",title:"Reference"}]},5369:function(e,s,a){"use strict";a.d(s,{ML:function(){return t},aF:function(){return r}});let r=e=>e.auth,t=e=>!!e.auth.id},1163:function(e,s,a){e.exports=a(6885)}}]);

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.