PageSourceSearch

https://www.uea8gaming.com/assets/10.9.30/reset-password.d9371f6b.1790691266856.js

js uea8gaming.com collected 2026-09-30 11:03:27 UTC 16,948 bytes, 1 lines download raw bytes

1import{r as a,ek as pe,fe as me,fg as he,l as U,fh as we,B as A,fi as fe,fj as xe,A as e,S as I}from"./index.d5ed491e.1790691266856.js";import{u as j,r as K}from"./agentation.5cf31a33.1790691266856.js";import{l as N}from"./index.8da71876.1790691266856.js";import{n as B,a as G}from"./inputUtils.c4219def.1790691266856.js";import ye from"./breadcrumbs.7620e80e.1790691266856.js";import{T as ge}from"./turnstile.440a4565.1790691266856.js";import"./index.5f8b7514.1790691266856.js";import"./index.bce53655.1790691266856.js";import"./index-layout-lite.b1b338ee.1790691266856.js";import"./user-slice.9308c135.1790691266856.js";import"./usePreloadTheme.75050896.1790691266856.js";import"./staticContentModules.2872032d.1790691266856.js";import"./luckyWheelModules.48083fab.1790691266856.js";import"./ms-hook.4307a960.1790691266856.js";const _e="_resetPasswordContainer_xhjys_9",Pe="_formSkeleton_xhjys_15",je="_topbar_xhjys_34",Ce="_helperText_xhjys_37",be="_toggleRow_xhjys_42",Te="_tab_xhjys_50",Ee="_active_xhjys_60",Ne="_telCodePhoneContainer_xhjys_64",Se="_fieldInlineRight_xhjys_69",Re="_label_xhjys_74",ve="_req_xhjys_78",Oe="_selectWrap_xhjys_82",Ae="_input_xhjys_85",Ie="_select_xhjys_82",Me="_error_xhjys_96",De="_field_xhjys_69",$e="_inputWrap_xhjys_113",Le="_inputWrapRow_xhjys_116",ke="_arrowIcon_xhjys_136",He="_suffixBtn_xhjys_148",Fe="_icon_xhjys_162",We="_btnSendOtp_xhjys_167",Be="_sendOTPContainer_xhjys_194",Ge="_errorText_xhjys_224",Ve="_actions_xhjys_228",qe="_copyright_xhjys_234",Ue="_copyrightIcon_xhjys_246",Ke="_btn_xhjys_167",Ye="_btnGhost_xhjys_258",Ze="_btnPrimary_xhjys_262",ze="_successContainer_xhjys_271",Je="_successTitle_xhjys_277",Qe="_successDesc_xhjys_288",Xe="_dropdownContainer_xhjys_291",et="_dropdownTrigger_xhjys_302",tt="_downArrow_xhjys_315",st="_dropdownContentSelected_xhjys_320",ot="_dropdownMenu_xhjys_328",nt="_dropdownContent_xhjys_320",rt="_dropdownContentItem_xhjys_340",s={resetPasswordContainer:_e,formSkeleton:Pe,"skeleton-loading-effect":"_skeleton-loading-effect_xhjys_1",topbar:je,helperText:Ce,toggleRow:be,tab:Te,active:Ee,telCodePhoneContainer:Ne,fieldInlineRight:Se,label:Re,req:ve,selectWrap:Oe,input:Ae,select:Ie,error:Me,field:De,inputWrap:$e,inputWrapRow:Le,arrowIcon:ke,suffixBtn:He,icon:Fe,btnSendOtp:We,sendOTPContainer:Be,errorText:Ge,actions:Ve,copyright:qe,copyrightIcon:Ue,btn:Ke,btnGhost:Ye,btnPrimary:Ze,successContainer:ze,successTitle:Je,successDesc:Qe,dropdownContainer:Xe,dropdownTrigger:et,downArrow:tt,dropdownContentSelected:st,dropdownMenu:ot,dropdownContent:nt,dropdownContentItem:rt},at="/public/html/default_whitelabel/template/images/international-icon",ct=60,V={telCode:"",mobile:"",sendTo:"PHONE",otp:"",newPassword:"",confirmNewPassword:"",captchaToken:"",email:"",contactType:""},q="RESET_PASSWORD",it=["PHONE","WHATSAPP"],lt=["PHONE","EMAIL"];function dt(){const[t,i]=a.useState({loaded:!1,regionSettings:[],phoneChannels:[],authMethod:[]}),[r,u]=a.useState({newPassword:"",confirmNewPassword:""}),[m,w]=a.useState("PENDING"),h=c=>{u(l=>({...l,[c]:!l[c]}))},[n,p]=a.useState(1),{t:x}=j(["liteResetPassword","liteAuth"]),[o,C]=a.useState(V),g=a.useMemo(()=>o.contactType?"v2":"v1"),[b,Y]=a.useState(null);a.useEffect(()=>{Promise.all([pe(),me({isPublic:!0,currencyCode:R?.currentLanguage?.currency,moduleType:q,isNew:!0})]).then(([c,l])=>{const y=(window?.portalSettings?.telCodes||"66,60")?.split(",").map(d=>`+${d}`)||[],f=c.filter(d=>y.includes(d.telCode)).map(({telCode:d,countryCode:P})=>d&&P?{telCode:d,countryCode:P,telCodeFlag:`${at}/${P}.png`}:null).filter(Boolean),E=l?.OTP?.authMethod?.filter(d=>lt.includes(d))||[];i({loaded:!0,regionSettings:[...f],authMethod:E||[],phoneChannels:l?.OTP?.authMethod?.filter(d=>it.includes(d))||[]}),C(d=>{const P=E.filter(O=>O==="PHONE"||O==="WHATSAPP"),ce=P.length>0,ie=E.includes("EMAIL"),v=ce?"PHONE":ie?"EMAIL":d.contactType,le=R?.currentLanguage?.countryCode,de=f?.find?.(O=>O?.countryCode===le),ue=d.telCode||de?.telCode||f?.[0]?.telCode||"";return{...d,contactType:v,telCode:v==="PHONE"?ue:"",sendTo:v==="PHONE"&&(d.sendTo||P[0])||"",email:v==="EMAIL"?d.email:""}})}).finally(()=>{w("LOAD")})},[]);
1const[T,M]=a.useState(""),[Z,D]=a.useState(!1),S=a.useRef(0),z=a.useCallback(async(c,l)=>{if(!c||!l){M(""),D(!1);return}const y=++S.current;D(!0);try{await he({phone:`${c}${l}`}),S.current===y&&M("")}catch(f){if(S.current===y){const E=f?.response?.data?.message??f?.message??"liteResetPassword:invalidPhone";M(E)}}finally{S.current===y&&D(!1)}},[]),[_,$]=a.useState("");a.useEffect(()=>{if(o.contactType!=="EMAIL"&&g!=="v1"){$("");return}if(!o.email){$("");return}const c=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o.email);$(c?"":"liteResetPassword:invalidEmail")},[o.contactType,o.email,g]);const[L,W]=a.useState(""),[k,H]=a.useState("");a.useEffect(()=>{/^[A-Za-z0-9]{6,}$/.test(o.newPassword)?W(""):W("liteResetPassword:invalidPassword")},[o.newPassword]),a.useEffect(()=>{o.confirmNewPassword&&o.confirmNewPassword!==o.newPassword?H("liteResetPassword:passwordNotMatch"):H("")},[o.confirmNewPassword,o.newPassword]);const R=U.useSelector(c=>c.language),J=a.useRef(0),[Q,X]=a.useState(0),[F,ee]=a.useState(!1),te=a.useMemo(()=>o.contactType==="EMAIL"?!!o.email&&!_:!!(o.telCode&&o.mobile)&&!T,[o.contactType,o.email,o.telCode,o.mobile,_,T]),se=a.useCallback(()=>{const c=Date.now()+ct*1e3;J.current=c,X(c),ee(!0),we({verificationType:q,verificationMethod:o.contactType==="EMAIL"?"EMAIL":o.sendTo,...o.contactType==="EMAIL"?{email:o.email}:{phone:`${o.telCode}${o.mobile}`},currencyCode:R?.currentLanguage?.currency,isPublic:!0}).then(({status:l})=>{l===200&&A.toast.success(x("liteTransfer:requestOTPSuccess","Request OTP Success"))}).catch(l=>{const y=l?.attempt?`${x("liteAuth:maxAttempt1","You have reached the OTP limit:")} ${l?.attempt}. ${x("liteAuth:maxAttempt2","Please contact Customer Service for assistance.")}`:x(`liteAuth:error.${l?.code}`);Y({message:y,exist:!0})})},[o]),oe=a.useCallback((c,l)=>{C(y=>{const f={...y,[c]:l};return(c==="mobile"||c==="telCode")&&z(f.telCode,f.mobile),f})},[]),ne=a.useCallback(()=>C(V),[]),re=a.useMemo(()=>g==="v1"?!o.email||!!_:n===1?o.contactType==="EMAIL"?!(F&&o.email&&o.otp)||!!_:!(F&&o.telCode&&o.mobile&&o.otp)||!!T:n===2?!!L||!!k||o.confirmNewPassword!==o.newPassword:!1,[n,o,F,T,_,L,k]),ae=a.useCallback(()=>{if(!o.contactType){fe({email:o.email,captchaToken:null}).then(({status:c})=>{c!==200&&A.toast.error(x("liteResetPassword:contactCustomerService","Reset Password Error! Please Try Again. Contact customer service if error persist.")),c===200&&p(3)});return}xe({captchaToken:o.captchaToken,otpCode:o.otp,newPassword:o.confirmNewPassword,domain:window.location.hostname,isVipLogin:!1,merchantCode:window.merchantCode,rememberMe:!1,...o.contactType==="EMAIL"?{email:o.email}:{phone:`${o.telCode}${o.mobile}`},resetWithPhone:o.contactType==="PHONE",contact:o.contactType==="EMAIL"?o.email:`${o.telCode}${o.mobile}`,verificationMethod:o.contactType==="EMAIL"?"EMAIL":o.sendTo,contactType:o.contactType,version:"v2",currency:R?.currentLanguage?.currency}).then(({status:c})=>{c!==200&&A.toast.error(x("liteResetPassword:contactCustomerService","Reset Password Error! Please Try Again. Contact customer service if error persist.")),c===200&&n===1&&p(2),c===200&&n===2&&p(3)}).catch(()=>{A.toast.error(x("liteResetPassword:contactCustomerService","Reset Password Error! Please Try Again. Contact customer service if error persist."))})},[o]);return{remoteData:t,loadingState:m,form:o,setField:oe,clearForm:ne,sendOtp:se,confirm:ae,isConfirmDisabled:re,steps:n,showPassword:r,toggleHideShow:h,canSendBase:te,otpUntil:Q,phoneError:T,phoneValidating:Z,passwordError:L,confirmPasswordError:k,emailError:_,sendError:b,version:g}}const ut=()=>e.jsxs("svg",{width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("circle",{cx:"10.5977",cy:"10.0469",r:"10",fill:"#28DB00"}),e.jsx("path",{d:"M9.01002 14.0467C8.74913 14.0467 8.48825 13.9509 8.28744 13.7626L5.79359 11.4026C5.38853 11.0194 5.38338 10.3918 5.78157 10.0021C6.17977 9.61232 6.83198 9.60736 7.23703 9.99052L9.02375 11.6817L13.9737 7.2044C14.3873 6.8295 15.0395 6.84932 15.4291 7.24734C15.8188 7.64535 15.7982 8.27293 15.3845 8.64783L9.71372 13.7775C9.51462 13.9575 9.26232 14.0467 9.0083 14.0467H9.01002Z",fill:"white"})]}),pt=({selectedTelCode:t,toggleDropdown:i,setSelectedTelCodes:r,isOpen:u,telCo
1des:m=[]})=>{const{t:w}=j(["liteResetPassword"]),h=a.useMemo(()=>m.find(p=>p?.telCode===t),[m,t]),n=()=>e.jsxs("span",{className:s.dropdownContentSelected,children:[e.jsx("img",{width:"24",height:"24",src:h?.telCodeFlag||"/public/html/default_whitelabel/template/images/international-icon/TH.png",alt:h?.countryCode||""}),e.jsx("span",{children:t})]});return e.jsxs("div",{className:s.dropdownContainer,children:[e.jsxs("button",{onClick:i,className:s.dropdownTrigger,children:[t?n():w("liteRegister:selectTelCode"),e.jsx(I,{category:"SVGMenu",name:"arrowDown",className:s.downArrow})]}),u&&e.jsx("div",{className:s.dropdownMenu,children:e.jsx("ul",{className:s.dropdownContent,children:(m||[]).map(p=>e.jsxs("li",{className:s.dropdownContentItem,onClick:()=>{r(p.telCode),i()},children:[e.jsx("img",{width:"24",height:"24",src:p?.telCodeFlag,alt:p?.countryCode||""}),e.jsx("span",{children:p?.telCode})]},p?.countryCode||p?.telCode))})})]})};function At(){const{t}=j(["liteResetPassword"]),i=K.useHistory(),r=dt(),u=r?.steps===1||r?.steps===2,m=r?.remoteData?.authMethod||[],w=m.includes("PHONE")||m.includes("WHATSAPP"),h=m.includes("EMAIL");return e.jsxs("div",{className:s.resetPasswordContainer,children:[e.jsx("div",{className:s.topbar,children:e.jsx(ye,{title:t("liteResetPassword:resetPassword","Reset Password"),backAction:()=>i.push("/home")})}),r?.loadingState==="PENDING"&&e.jsx(xt,{}),r?.loadingState==="LOAD"&&e.jsxs(e.Fragment,{children:[r?.steps===1&&(w||h)&&e.jsxs("div",{className:s.toggleRow,children:[w&&e.jsx("button",{type:"button",className:`${s.tab} ${r?.form.contactType==="PHONE"?s.active:""}`,onClick:()=>r?.setField("contactType","PHONE"),children:t("liteResetPassword:tab.PHONE","Mobile")}),h&&e.jsx("button",{type:"button",className:`${s.tab} ${r?.form.contactType==="EMAIL"?s.active:""}`,onClick:()=>r?.setField("contactType","EMAIL"),children:t("liteResetPassword:tab.EMAIL","Email")})]}),u&&e.jsx("p",{className:s.helperText,children:r?.steps===1?r?.form.contactType==="PHONE"?t("liteResetPassword:helperPhone","Enter your registered phone number to reset password."):t("liteResetPassword:helperEmail","Enter your registered email address to reset password. If you don't have an email address, please contact customer service."):t("liteResetPassword:helper2","Please enter your new password.")}),r?.steps===1&&e.jsx(mt,{resetPassword:r}),r?.steps===2&&e.jsx(ht,{resetPassword:r}),r?.steps===3&&e.jsx(wt,{}),u&&e.jsxs("div",{className:s.actions,children:[e.jsx("button",{type:"button",className:`${s.btn} ${s.btnGhost}`,onClick:()=>i.push("/home"),children:t("liteResetPassword:cancel","Cancel")}),e.jsx("button",{type:"button",className:`${s.btn} ${s.btnPrimary}`,disabled:r?.isConfirmDisabled,onClick:r?.confirm,children:r?.steps===1?t("liteResetPassword:confirm","Confirm"):t("liteResetPassword:resetPassword","Reset Password")})]}),e.jsxs("div",{className:s.copyright,children:[e.jsx("span",{children:t("liteResetPassword:copyright-pt1","Copyright K929 © 2025. All rights reserved.")}),e.jsx("span",{className:s.copyrightIcon,children:e.jsx(I,{category:"SVGCommon",name:"D-above18",className:s.icon})}),e.jsx("span",{children:t("liteResetPassword:copyright-pt2","above only")})]})]})]})}const mt=({resetPassword:t})=>{const{t:i}=j(["liteResetPassword"]),r="RESET_PASSWORD",u="TURNSTILE_OTP",[m,w]=a.useState(!1),h=()=>{w(n=>!n)};return e.jsxs(e.Fragment,{children:[t?.form.contactType==="PHONE"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s.telCodePhoneContainer,children:[e.jsx(pt,{selectedTelCode:t?.form.telCode,toggleDropdown:h,setSelectedTelCodes:n=>t?.setField("telCode",n),isOpen:m,telCodes:t?.remoteData?.regionSettings}),e.jsxs("div",{className:s.fieldInlineRight,children:[e.jsx(N.DebounceInput,{type:"number",debounceTimeout:500,onPaste:n=>B(n,!1),onKeyDown:n=>G(n,!1),className:`${s.input} ${t?.phoneError&&s.error}`,placeholder:i("liteResetPassword:mobilePlaceholder","Mobile No."),value:t?.form.mobile,onChange:n=>t?.setField("mobile",n.target.value.replace(/[^\d]/g,""))}),!!t?.phoneError&&e.jsx("div",{className:s.errorText,children:i(t.phone
1Error,t.phoneError)})]})]}),e.jsx(ge,{moduleType:r,validateType:u,onVerifyCallback:n=>t?.setField("captchaToken",n)}),e.jsx("div",{className:s.sendOTPContainer,children:e.jsxs("div",{className:s.inputWrap,children:[e.jsx("select",{className:s.input,value:t?.form.sendTo,onChange:n=>t?.setField("sendTo",n.target.value),children:t?.remoteData?.phoneChannels?.map(n=>e.jsx("option",{value:n,children:i(`liteResetPassword:channel.${n}`,n)},n))}),e.jsx("div",{className:s.arrowIcon,children:e.jsx("img",{className:s.arrow,src:"/public/html/images/sp2lite/nav/arrow.png",alt:"type-history-arrow"})})]})})]}),(t?.form.contactType==="EMAIL"||t?.version==="v1")&&e.jsxs("div",{className:s.field,children:[e.jsx(N.DebounceInput,{type:"email",debounceTimeout:300,className:`${s.input} ${t?.emailError&&s.error}`,placeholder:i("liteResetPassword:emailPlaceholder","Email Address"),value:t?.form.email,onChange:n=>t?.setField("email",n.target.value)}),!!t?.emailError&&e.jsx("div",{className:s.errorText,children:i(t.emailError,t.emailError)})]}),t?.form.contactType&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:s.field,children:e.jsxs("div",{className:`${s.inputWrap} ${s.inputWrapRow}`,children:[e.jsx(N.DebounceInput,{type:"text",onPaste:n=>B(n,!1),onKeyDown:n=>G(n,!1),debounceTimeout:500,className:`${s.input} ${t?.sendError&&s.error}`,placeholder:i("liteResetPassword:otpPlaceholder","Enter OTP"),value:t?.form.otp,onChange:n=>t?.setField("otp",n.target.value.replace(/[^\d]/g,""))}),e.jsx(ft,{className:s.btnSendOtp,onClick:t.sendOtp,canSendBase:t.canSendBase,otpUntil:t.otpUntil,label:i("liteResetPassword:sendOtp","Send OTP")})]})}),!!t?.sendError&&e.jsx("p",{className:s.errorText,children:t?.sendError?.message})]})]})},ht=({resetPassword:t})=>{const{t:i}=j(["liteResetPassword"]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s.field,children:[e.jsxs("div",{className:s.inputWrap,children:[e.jsx(N.DebounceInput,{type:t?.showPassword.newPassword?"text":"password",debounceTimeout:500,className:`${s.input} ${t?.passwordError&&s.error}`,placeholder:i("liteResetPassword:newPassword","New Password"),onChange:r=>t?.setField("newPassword",r.target.value)}),e.jsx("button",{type:"button",onClick:()=>t?.toggleHideShow("newPassword"),className:s.suffixBtn,"aria-label":"Toggle password visibility",children:e.jsx(I,{category:"SVGReactIcons",name:t?.showPassword.newPassword?"AiOutlineEye":"AiOutlineEyeInvisible",className:s.icon})})]}),!!t?.passwordError&&e.jsx("div",{className:s.errorText,children:i(t.passwordError,t.passwordError)})]}),e.jsxs("div",{className:s.field,children:[e.jsxs("div",{className:s.inputWrap,children:[e.jsx(N.DebounceInput,{type:t?.showPassword.confirmNewPassword?"text":"password",debounceTimeout:500,className:`${s.input} ${t?.confirmPasswordError&&s.error}`,placeholder:i("liteResetPassword:confirmNewPassword","Confirm New Password"),onChange:r=>t?.setField("confirmNewPassword",r.target.value)}),e.jsx("button",{type:"button",onClick:()=>t?.toggleHideShow("confirmNewPassword"),className:s.suffixBtn,"aria-label":"Toggle password visibility",children:e.jsx(I,{category:"SVGReactIcons",name:t?.showPassword.confirmNewPassword?"AiOutlineEye":"AiOutlineEyeInvisible",className:s.icon})})]}),!!t?.confirmPasswordError&&e.jsx("div",{className:s.errorText,children:i(t.confirmPasswordError,t.confirmPasswordError)})]})]})},wt=()=>{const{t}=j(["liteResetPassword"]),i=K.useHistory();return e.jsxs("div",{className:s.successContainer,children:[e.jsxs("p",{className:s.successTitle,children:[e.jsx(ut,{}),t("liteResetPassword:success","Success")]}),e.jsx("p",{className:s.successDesc,children:t("liteResetPassword:successMessage","Your account password has been successfully changed.")}),e.jsx("button",{type:"button",className:`${s.btn} ${s.btnPrimary}`,onClick:()=>i.push("/login"),children:t("liteResetPassword:login","Login")})]})};function ft({className:t,onClick:i,canSendBase:r,otpUntil:u,label:m}){const[w,h]=a.useState(Date.now());a.useEffect(()=>{if(u>Date.now()&&h(Date.now()),!u||u<=Date.now())return;const b=setInterval(()=>h(Date.now()),1e3);return()=>clearInterval(b)}
1,[u]);const n=Math.max(0,Math.ceil((u-w)/1e3)),p=U.useSelector(b=>b?.turnstile),{otpTurnstileEnabled:x,turnstileToken:o}=p,C=x?!o:!1,g=!r||n>0||C;return e.jsx("button",{type:"button",className:t,onClick:i,disabled:g,children:n>0?`Resend in ${n}s`:m})}const xt=()=>e.jsx("div",{className:s.formSkeleton});export{At 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.