1import{d as kt,e as Lt,f as H,g as J,s as Tt,t as Ft}from"./chunk-WUS6VI32.js";import{J as $,N as L,W as It,X as wt,a as Ut,e as x,ea as G,h as At,k as E,ma as Mt,na as N,qa as Rt,ra as Ot,sa as w}from"./chunk-LKIBVTZY.js";import{b as I}from"./chunk-IXSVJUWF.js";import{E as d,e as p,j as l,ra as Ct}from"./chunk-LZGEQQYD.js";import{$b as tt,E as vt,Ea as B,F as St,K as A,L as X,Nb as Z,Vb as Pt,X as j,b as dt,hb as yt,o as U,ra as bt}from"./chunk-BW2TMJN6.js";import{a as ft,b as mt,f as fe,j as D}from"./chunk-RNQ7BUHW.js";var me={MYR:"Malaysia",USD:"US",IDR:"Indonesia",KRW:"SouthKorea",THB:"Thailand",VND:"Vietnam",CNY:"China",USDT:"US"},de=o=>me[o];var V=o=>Number(o.toString().substring(0,2));var Dt={};fe(Dt,{addListener:()=>ve,checkNumbers:()=>et,removeListener:()=>Se});var et=o=>{/[0-9]+/.test(o.key)||o.preventDefault()},ve=o=>{var i;(i=document.getElementById(o))==null||i.addEventListener("keypress",et)},Se=o=>{var i;(i=document.getElementById(o))==null||i.removeEventListener("keypress",et)};var be="activeLogout",it="logoutErrorAlertShown",z=(()=>{let i=class i{constructor(t,e){this.storageService=t,this.globalData=e}clearClientAuthState(t){var e;t!=null&&t.markActiveLogout&&localStorage.setItem(be,"true"),this.storageService.deletAllCookies(),this.globalData.acctInfo={loginId:"",currency:"",balance:0,bonus:0,isReferralAccount:!1,isAffiliateAccount:!1,expiryUtcDate:""},this.globalData.token="",this.globalData.refreshToken="",this.globalData.sessionId="",this.globalData.isLogin=!1,this.globalData.isSideMenuOpen=!1,this.globalData.loading=!1,sessionStorage.removeItem("isConnect"),sessionStorage.removeItem("wsUrl"),sessionStorage.removeItem("isConnecting"),localStorage.removeItem("wsUrl"),localStorage.removeItem("isLogin"),this.storageService.removeStorage("memInfo",!0),t!=null&&t.clearReferralId&&sessionStorage.removeItem("ReferralId"),t!=null&&t.clearRewardPopupFlag&&localStorage.removeItem("rewardPopupIsShowed"),t!=null&&t.clearFcmTokens&&(localStorage.removeItem("fcmToken"),localStorage.removeItem("registeredFcmToken")),t!=null&&t.clearHttpOnlyFlag&&localStorage.removeItem("useHttpOnlyTokenCookie"),(e=this.globalData.loginSub$)==null||e.next(!1)}};i.\u0275fac=function(e){return new(e||i)(l(x),l(w))},i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();var Wt=(()=>{let i=class i{constructor(t,e,r,s,n,a,c,h){this.http=t,this.router=e,this.globalData=r,this.translate=s,this.swalDialog=n,this.authStateService=a,this.appConfigService=c,this.langService=h}httpCatch(t,e,r,s){var a;let n=V(e);if(!(e=="810000"||e=="1440411")&&!(r!=null&&r.includes("GetPQzpWithdrawProduct")&&e=="1450001")&&!(r!=null&&r.includes("AutoTransfer")&&e=="14800022")&&!((r!=null&&r.includes("TransferSubmit")||r!=null&&r.includes("AutoTransfer"))&&e=="1470020")){if(e=="127"||e=="166"){let c=!!window.opener;if(this.globalData.isLogin||c){if(c&&sessionStorage.getItem(it)==="true")return;c&&(sessionStorage.setItem("needCloseAfterRefresh","true"),sessionStorage.setItem(it,"true")),this.alertBeforeLogOut()}else this.logOut();return}if(e=="1451055"||e=="1450026"){this.globalData.showMessageAlert(s,3);return}if(e=="14112"){let{isMobileStyle:c,isApp:h,history:u}=this.globalData,f=JSON.parse(h?localStorage.cmsSetting:sessionStorage.cmsSetting),S=(h||c?f.mobileMenu:f.webMenu).flatMap(g=>g.subMenu),M=JSON.parse(s),T=(a=S.find(g=>g.providerId===M.providerId))==null?void 0:a.displayName,R=this.translate.instant("codeMessage.".concat(e)).replace("{0}",T),W=u.some(g=>g.includes("gameType"));this.swalDialog.popMessage(R,0,W?()=>h?this.globalData.goBack():window.close():void 0);return}switch(n){case 11:this.router.navigate(["/Maintenance"]);break;case 12:this.logOut();break;case 14:this.globalData.showAlert(e,0);break;case 15:this.logOut(),this.router.navigate(["/Restrict"]);break;case 16:this.alertBeforeLogOut();break;case 18:break;case 21:this.logOut();break;case 20:this.router.navigate(["/Ref-Restrict"]);break;case 22:this.swalDialog.popMessage(this.translate.instant("codeMessage."+e.toString().substring(2)).replace("{0}",t.parameter),0);break;default:this.globalData.showAlert(e,0);break}}}alertBeforeLogOut(){this.globalData.showDirectAlert("codeMessage.6",2,this.logOut.bind(this))}logOut(){this.unregisterCurrentFcmToken(),this.authStateService.clearClientAuthState({clearFcmTokens:!0,clearHttpOnlyFlag:!0})}unregisterCurrentFcmToken(){var n;let t=localStorage.getItem("fcmToken");if(!((n=this.globalData.acctInfo)!=null&&n.enableFcm)||!t||!this.globalData.token)return;let e=this.appConfigService.getConfig("hostUrl"),r={fcmToken:t},s={"Access-Control-Allow-Origin":"*","Content-Type":"application/json",deviceType:this.globalData.device,langCode:this.langService.language,Authorization:"Bearer "+this.globalData.token,"X-HostUrl":e};if(this.appConfigService.isLocalUse(window.location.hostname)){let a=String(this.appConfigService.getConfig("configMerchantCode")).slice(2);a||(a="001"),s.MerchantId=a}console.log("UnregisterFcmToken request:",r),this.http.post("".concat(e,"/api/v1/Notification/UnregisterFcmToken"),r,{headers:new $(s)}).subscribe({next:a=>{console.log("UnregisterFcmToken response:",a)},error:a=>{console.error("UnregisterFcmToken error:",a)}})}};i.\u0275fac=function(e){return new(e||i)(l(L),l(G),l(w),l(At),l(Ot),l(z),l(I),l(E))},i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o}
1)();var q=(()=>{let i=class i{constructor(t,e,r,s,n,a,c,h){this.http=t,this.router=e,this.catchService=r,this.globalData=s,this.storageService=n,this.authStateService=a,this.langService=c,this.appConfigService=h,this.hostUrl=this.appConfigService.getConfig("hostUrl"),this.configUrl=this.appConfigService.getConfig("configUrl"),this.configMerchantCode=this.appConfigService.getConfig("configMerchantCode"),this.credentialBootstrapPaths=["/api/v2/Auth/Login","/api/v2/Auth/LineLogin","/api/Line/CheckLineLogin"],this.extractData=(u,f)=>{this.globalData.token=this.storageService.getCookie("token")||"",this.globalData.refreshToken=this.storageService.getCookie("refreshToken")||"";let m=u;if(m==null)return m;let S=m.code,M=V(S);if(S!=0&&M!=13&&M!=19){let T=m.message;return this.catchService.httpCatch(m.data,m.code,f,T),m}else return m},this.handleError=u=>{let f;if(u.statusText==="Unknown Error")return this.globalData.loading=!1,this.router.navigate(["/Restrict"]),X(()=>u);if(u instanceof Error){let m=u.error||"",S=m.error||JSON.stringify(m);f="".concat(u.status," - ").concat(u.statusText||""," ").concat(S)}else f=u.message?u.message:u.toString();return u&&u.status?(u.status===503&&(this.globalData.loading=!1,this.globalData.isApp&&this.router.navigate(["/Maintenance"])),u.status===403&&(this.globalData.loading=!1,this.globalData.isApp&&this.router.navigate(["/Restrict"])),u.status===429&&(this.globalData.loading=!1,this.globalData.showDirectAlert("httpStatusCode.429",0))):this.globalData.loading=!1,console.error(f),X(()=>f)}}httpPost(t,e,r,s){let n=this.globalData.isApp,a=this.storageService.getUseHttpOnlyTokenCookie(),c=this.getReadableAccessToken(),h={"Access-Control-Allow-Origin":"*","Content-Type":"application/json",deviceType:this.globalData.device,langCode:this.langService.language,"X-HostUrl":this.hostUrl},u=this.shouldForceCredentials(t);n||a&&(u=!0),h.Authorization=c?"Bearer "+c:"",s&&(h.Authorization=""),this.setLocalHeaderMerchantId(h);let m={headers:new $(h)};return u&&(m.withCredentials=!0),r===!0?this.http.post(t,e,m).pipe(j(S=>this.extractData(S,t)),B(this.handleError)):this.http.post(t,e,m).pipe(j(S=>this.extractData(S,t)),B(this.handleError),bt(S=>S!==null))}shouldForceCredentials(t){return this.credentialBootstrapPaths.some(e=>t.includes(e))}getReadableAccessToken(){return this.globalData.token||this.storageService.getCookie("token")||""}setLocalHeaderMerchantId(t){if(this.appConfigService.isLocalUse(window.location.hostname)){let e=String(this.configMerchantCode).slice(2);e||(e="001"),t.MerchantId=e}}httpGet(t){let e=this.globalData.isApp,r=this.storageService.getUseHttpOnlyTokenCookie(),s=this.getReadableAccessToken(),n={"Access-Control-Allow-Origin":"*","X-HostUrl":this.hostUrl},a=!1;e||r&&(a=!0),n.Authorization=s?"Bearer "+s:"",this.setLocalHeaderMerchantId(n);let h={headers:new $(n)};return a&&(h.withCredentials=!0),this.http.get(t,h)}logOut(){let t={sid:this.globalData.sessionId};this.unregisterCurrentFcmToken();let e=this.AccountlogOutV2(t);return this.authStateService.clearClientAuthState({clearReferralId:!0,clearRewardPopupFlag:!0,clearFcmTokens:!0,clearHttpOnlyFlag:!0,markActiveLogout:!0}),this.globalData.loading=!0,e.pipe(yt(()=>{this.globalData.loading=!1}))}unregisterCurrentFcmToken(){var r;let t=localStorage.getItem("fcmToken");if(!((r=this.globalData.acctInfo)!=null&&r.enableFcm)||!t)return;let e={fcmToken:t};console.log("UnregisterFcmToken request:",e),this.unregisterFcmToken(e).subscribe({next:s=>{console.log("UnregisterFcmToken response:",s)},error:s=>{console.error("UnregisterFcmToken error:",s)}})}getAppDetails(t){let e=this.configUrl+"/api/Config/GetConfig";return this.httpPost(e,t,!0)}loginV2(t){let e=this.hostUrl+"/api/v2/Auth/Login";return this.httpPost(e,t,!0)}AccountlogOutV2(t){let e=this.hostUrl+"/api/v2/Auth/Logout";return this.httpPost(e,t,!0)}forgotPassword(t){let e=this.hostUrl+"/api/v1/Member/ForgotPassword";return this.httpPost(e,t,!0,!0)}phoneResetPwd(t){let e=this.hostUrl+"/api/v1/Member/MobileResetPass";return this.httpPost(e,t,!0)}emailResetPwd(t){let e=this.hostUrl+"/api/v1/Member/EmailResetPass";return this.httpPost(e,t,!0)}getPushToClientServerUrl(t){if(!(!!this.globalData.isLogin||localStorage.getItem("isLogin")==="true"))return A({code:-1,message:"Not logged in",data:null});let r=this.hostUrl+"/api/v1/Member/GetPushToClientServerUrl";return this.httpPost(r,t,!0)}registerFcmToken(t){let e=this.hostUrl+"/api/v1/Notification/RegisterFcmToken";return this.httpPost(e,t,!0)}unregisterFcmToken(t){let e=this.hostUrl+"/api/v1/Notification/UnregisterFcmToken";return this.httpPost(e,t,!0)}getToken(t){let e=this.hostUrl+"/api\u200B/v1\u200B/Token\u200B/gettoken";return this.httpPost(e,t,!0)}getMemberInformation(){let t=this.hostUrl+"/api/v1/Member/MemberInformation";return this.httpPost(t,!0)}upgradeVipLevel(){let t=this.hostUrl+"/api/v1/Member/UpgradeVipLevel";return this.httpPost(t,{},!0)}getRegisterData(t){let e=this.hostUrl+"/api/v1/Member/Register";return this.httpPost(e,t,!1)}getBankInfoList(t){let e=this.hostUrl+"/api/v1/Member/GetBankInfoList";return this.httpPost(e,t,!1)}register(t){let e=this.hostUrl+"/api/v1/Member/RegisterSubmit";return this.httpPost(e,t,!0)}slideCaptchaGenerate(t){let e=this.hostUrl+"/api/v1/Member/SlideCaptchaGenerate";return this.httpPost(e,t,!0)}slideCaptchaValidate(t,e,r,s){let n=this.hostUrl+"/api/v1/Member/SlideCaptchaValidate?id=".concat(e,"&percent=").concat(r,"&tolerant=").concat(s);return this.httpPost(n,t,!0)}
1checkAffiliate(t){let e=this.hostUrl+"/api/v1/Member/AffiliateCheck";return this.httpPost(e,t,!0)}checkRestriction(t){let e=this.hostUrl+"/api/v1/Member/CheckRestriction";return this.httpPost(e,t,!0)}checkUserName(t){let e=this.hostUrl+"/api/v1/Member/CheckUserName";return this.httpPost(e,t,!0)}getCMSData(t){let e=this.hostUrl+"/api/v1/Cms/CmsCommonContent";return this.httpPost(e,t,!0)}getCMSPageData(t){let e=this.hostUrl+"/api/v1/Cms/CmsPageContent";return this.httpPost(e,t,!0)}getSupportBank(t){let e=this.hostUrl+"/api/v1/Cms/SupportBank";return this.httpPost(e,t,!0)}getMaintenanceProvider(t){let e=this.hostUrl+"/api/v1/Home/MaintenanceProvider";return this.httpPost(e,t,!0)}getAnnouncement(t){let e=this.hostUrl+"/api/v1/Home/GetAnnouncement";return this.httpPost(e,t,!0)}GetProviderMaintenancePopUpInfo(t){let e=this.hostUrl+"/api/v1/Home/GetProviderMaintenancePopUpInfo";return this.httpPost(e,t,!0)}getPromotion(t){let e=this.hostUrl+"/api/v1/Promotion/GetPromotionList";return this.httpPost(e,t,!0)}getUpcoming(t){let e=this.hostUrl+"/api/v1/Cms/UpcomingMatch";return this.httpPost(e,t,!0)}getGameList(t){let e=this.hostUrl+"/api/v1/Games/GameList";return this.httpPost(e,t,!0)}getGameUrl(t){let e=this.hostUrl+"/api/v1/GamePage/GameUrlV2";return this.httpPost(e,t,!0)}traceGameClick(t){let e=this.hostUrl+"/api/v1/Games/TraceGameClick";return this.httpPost(e,t,!0)}getProviderStatus(t){let e=this.hostUrl+"/api/v1/Games/GetProviderStatusList";return this.httpPost(e,t,!0)}getMemTransferProvider(t){let e=this.hostUrl+"/api/v1/Wallet/GetMemTransferProvider";return this.httpPost(e,t,!0)}getBalance(t){let e=this.hostUrl+"/api/v1/Wallet/GetBalance";return this.httpPost(e,t,!0)}getBonusBalance(t){let e=this.hostUrl+"/api/v1/Wallet/GetBonusBalance";return this.httpPost(e,t,!0)}getBankInfoByPaymentMethod(t){let e=this.hostUrl+"/api/v1/Wallet/GetBankInfoByPaymentMethod";return this.httpPost(e,t,!0)}collectInstantRebate(t){let e=this.hostUrl+"/api/v1/Wallet/CollectInstantRebate";return this.httpPost(e,t,!0)}getNetworkList(t){let e=this.hostUrl+"/api/v1/Member/GetNetworkList";return this.httpPost(e,t,!0)}deposit(t){let e=this.hostUrl+"/api/v1/Wallet/Deposit";return this.httpPost(e,t,!0)}getDepositInfo(t){let e=this.hostUrl+"/api/v1/Wallet/GetDepositInfo";return this.httpPost(e,t,!0)}checkPaymentMaintenance(t){let e=this.hostUrl+"/api/v1/Wallet/CheckPaymentMaintenance";return this.httpPost(e,t,!0)}depositAddOrder(t){let e=this.hostUrl+"/api/v1/Wallet/DepositAddOrder";return this.httpPost(e,t,!0)}submitDeposit(t){let e=this.hostUrl+"/api/v1/Wallet/DepositSubmit";return this.httpPost(e,t,!0)}submitPayment(t){let e=this.hostUrl+"/api/v1/Wallet/ThirdPartyDepositSubmit";return this.httpPost(e,t,!0)}getPhoneNumber(t){let e=this.hostUrl+"/api/v1/Wallet/GetPhoneNumber";return this.httpPost(e,t,!0)}getPQzpBankAccount(t){let e=this.hostUrl+"/api/v1/Wallet/GetPQzpBankAccount";return this.httpPost(e,t,!0)}getCryptoRate(t){let e=this.hostUrl+"/api/v1/Wallet/GetCryptoRate";return this.httpPost(e,t,!0)}withdrawal(t){let e=this.hostUrl+"/api/v1/Wallet/Withdrawal";return this.httpPost(e,t,!0)}getWithdrawalInfo(t){let e=this.hostUrl+"/api/v1/Wallet/GetWithdrawalInfo";return this.httpPost(e,t,!0)}withdrawAllBack(t){let e=this.hostUrl+"/api/v1/Wallet/WithdrawAllBack";return this.httpPost(e,t,!0)}withdrawBack(t){let e=this.hostUrl+"/api/v1/Wallet/WithdrawBack";return this.httpPost(e,t,!0)}withdrawalToLocalTransfer(t){let e=this.hostUrl+"/api/v1/Wallet/WithdrawalToLocalTransfer";return this.httpPost(e,t,!0)}getPQzpWithdrawProduct(t){let e=this.hostUrl+"/api/v1/Wallet/GetPQzpWithdrawProduct";return this.httpPost(e,t,!0)}getWDLimitProgress(t){let e=this.hostUrl+"/api/v1/Wallet/GetWDLimitProgress";return this.httpPost(e,t,!0)}showTwoFactorAuth(t){let e=this.hostUrl+"/api/v1/Wallet/ShowTwoFactorAuth";return this.httpPost(e,t,!0)}isMemberNeedPhoneVerify(t){let e=this.hostUrl+"/api/v1/Member/IsMemberNeedPhoneVerify";return this.httpPost(e,t,!0)}autoTransfer(t){let e=this.hostUrl+"/api/v1/Wallet/AutoTransfer";return this.httpPost(e,t,!0)}getLastTransfer(t){let e=this.hostUrl+"/api/v1/Wallet/GetLastTransfer";return this.httpPost(e,t,!0)}transferSubmit(t){let e=this.hostUrl+"/api/v1/Wallet/TransferSubmit";return this.httpPost(e,t,!0)}getTransferPromotions(t){let e=this.hostUrl+"/api/v1/Wallet/GetTransferPromotions";return this.httpPost(e,t,!0)}getPromotionList(t){let e=this.hostUrl+"/api/v1/Wallet/GetPromotion";return this.httpPost(e,t,!0)}promotionSubmit(t){let e=this.hostUrl+"/api/v1/Promotion/PromotionSubmit";return this.httpPost(e,t,!0)}getRewardsReport(t){let e=this.hostUrl+"/api/v1/Report/GetRewardsReport";return this.httpPost(e,t,!0)}getPromotionBonusReport(t){let e=this.hostUrl+"/api/v1/Report/GetPromotionBonusReport";return this.httpPost(e,t,!0)}getPromotionBonusFinishedReport(t){let e=this.hostUrl+"/api/v1/Report/GetPromotionBonusFinishedReport";return this.httpPost(e,t,!0)}getPromotionBonusEtcReport(t){let e=this.hostUrl+"/api/v1/Report/GetPromotionBonusEtcReport";return this.httpPost(e,t,!0)}getPromotionBonusRunningReport(t){let e=this.hostUrl+"/api/v1/Report/GetPromotionBonusRunningReport";return this.httpPost(e,t,!0)}getRebateCommissionReport(t){let e=this.hostUrl+"/api/v1/Report/GetRebateCommissionReport";return this.httpPost(e,t,!0)}getReferralCommissionReport(t){let e=this.hostUrl+"/api/v1/Report/GetReferralCommissionReport";return this.httpPost(e,t,!0)}getReferralListReport(t){let e=this.hostUrl+"/api/v1/Report/GetPlayerReferralList";return this.httpPost(e,t,!0)}getInstantRebateOrderListByDay(t){let e=this.hostUrl+"/api/v1/Report/getInstantRebateOrderListByDay";return this.httpPost(e,t,!0)}checkBonus(t){let e=this.hostUrl+"/api/v1/Report/CheckBonus";return this.httpPost(e,t,!0)}getProviderList(t){let e=this.hostUrl+"/api/v1/Report/GetProviderMenu";return this.httpPost(e,t,!0)}getProviderMenu(t){let e=this.hostUrl+"/api/v1/Promotion/GetProviderMenu";return this.httpPost(e,t,!0)}getMemberPromotionProviders(t){let e=this.hostUrl+"/api/v1/Promotion/GetMemberPromotionProviders";return this.httpPost(e,t,!0)}getNewsReadList(t){let e=this.hostUrl+"/api/v1/Account/NewsReadList";return this.httpPost(e,t,!0)}getNewsUnreadList(t){let e=this.hostUrl+"/api/v1/Account/NewsUnreadList";return this.httpPost(e,t,!0)}setNewsRead(t){let e=this.hostUrl+"/api/v1/Account/NewsRead";return this.httpPost(e,t,!0)}setNewsReadAll(t){let e=this.hostUrl+"/api/v1/Account/NewsReadAll";return this.httpPost(e,t,!0)}getNewsUnreadCount(t){let e=this.hostUrl+"/api/v1/Account/NewsUnreadCount";return this.httpPost(e,t,!0)}getProfileData(t){let e=this.hostUrl+"/api/v1/Account/GetProfileInfo";return this.httpPost(e,t,!0)}getAccountData(t){let e=this.hostUrl+"/api/v1/Account/MemberInfo";return this.httpPost(e,t,!0)}getContactCountryCodeList(t){let e=this.hostUrl+"/api/v1/Account/GetContactCountryCodeList";return this.httpPost(e,t,!0)}getChangePwdList(t){let e=this.hostUrl+"/api/v1/Account/GetProviderAccountList";return this.httpPost(e,t,!0)}changePassword(t){let e=this.hostUrl+"/api/v1/Account/ChangePassword";return this.httpPost(e,t,!0)}sendVerificationCode(t){let e=this.hostUrl+"/api/v1/Account/SendTelMemEditPhone";return this.httpPost(e,t,!0)}editMemberPhone(t){let e=this.hostUrl+"/api/v1/Account/EditMemberPhone";return this.httpPost(e,t,!0)}setMemberSetting(t){let e=this.hostUrl+"/api/v1/Account/SetupMemberSetting";return this.httpPost(e,t,!0)}editMemberGender(t){let e=this.hostUrl+"/api/v1/Account/EditMemberGender";return this.httpPost(e,t,!0)}getCountryDropdownList(){let t=this.hostUrl+"/api/v1/Common/GetCountryDropdownList";return this.httpPost(t,{},!0)}editMemberCountry(t){let e=this.hostUrl+"/api/v1/Account/EditMemberCountry";return this.httpPost(e,t,!0)}editMemberAcctDetails(t){let e=this.hostUrl+"/api/v1/Account/EditMemberAcctDetails";return this.httpPost(e,t,!0)}getQQEventToken(t){let e=this.hostUrl+"/api/v1/Account/GetQQEventToken";return this.httpPost(e,t,!0)}getWorldCupToken(t){let e=this.hostUrl+"/api/v1/Account/GetWorldCupToken";return this.httpPost(e,t,!0)}getIs2FaActive(t){let e=this.hostUrl+"/api/v1/Auth/Is2FaActive";return this.httpPost(e,t,!0)}getMember2FaQRCode(t){let e=this.hostUrl+"/api/v1/Auth/GetMember2FaQRCode";return this.httpPost(e,t,!0)}verifyMember2FaCode(t){let e=this.hostUrl+"/api/v1/Auth/VerifyMember2FaCode";return this.httpPost(e,t,!0)}change2FaStatus(t){let e=this.hostUrl+"/api/v1/Auth/Change2FaStatus";return this.httpPost(e,t,!0)}getTransactionHistory(t){let e=this.hostUrl+"/api/v1/Account/GetTransactionHistory";return this.httpPost(e,t,!0)}getTransferHistory(t){let e=this.hostUrl+"/api/v1/Account/GetTransferHistory";return this.httpPost(e,t,!0)}getDownloadList(t){let e=this.hostUrl+"/api/v1/Cms/MobileExplorer";return this.httpPost(e,mt(ft({},t),{ConfigType:(t==null?void 0:t.ConfigType)||this.getDownloadConfigType()}),!0)}getDownloadConfigType(){let t=this.hostUrl||"";try{let e=new URL(t).origin.toLowerCase();return{"https://aiorwd.qqkwbase.com":2,"https://aiorwd02.qqkwbase.com":3,"https://aiorwd.ickwbase.com":2}[e]||1}catch(e){return 1}}transferDevice(t){let e=this.hostUrl+"/api/v1/Home/TransferDevice";return this.httpPost(e,t,!0)}TrackAdAccess(t){let e=this.hostUrl+"/api/v1/Home/TrackAdAccess";return this.httpPost(e,t,!0)}addRetargetingPromotion(t){let e=this.hostUrl+"/api/v1/Home/AddRetargetingPromotion";return this.httpPost(e,t,!0)}checkCashbackRule(t){let e=this.hostUrl+"/api/v1/Promote/CheckCashbackRule";return this.httpPost(e,t,!0)}addCashbackBonus(t){let e=this.hostUrl+"/api/v1/Promote/AddCashbackBonus";return this.httpPost(e,t,!0)}checkFreeBetRule(t){let e=this.hostUrl+"/api/v1/Promote/CheckFreeBetRule";return this.httpPost(e,t,!0)}getFreeBet(t){let e=this.hostUrl+"/api/v1/Promote/FreeBet";return this.httpPost(e,t,!0)}checkMobileVerifyCode(t){let e=this.hostUrl+"/api/v1/Promote/CheckMobileVerifyCode";return this.httpPost(e,t,!0)}sendMobileVerifyCode(t){let e=this.hostUrl+"/api/v1/Promote/SendMobileVerifyCode";return this.httpPost(e,t,!0)}resendMobileVerifyCode(t){let e=this.hostUrl+"/api/v1/Promote/ResendMobileVerifyCode";return this.httpPost(e,t,!0)}checkMemPromoteIsActive(t){let e=this.hostUrl+"/api/v1/Promote/CheckMemPromoteIsActive";return this.httpPost(e,t,!0)}checkLatestPeriod(t){return this.http.get(t)}getRewardInfo(t){let e=this.hostUrl+"/api/v1/Reward/GetRewardInfo";return this.httpPost(e,t,!0)}showPastResultList(t){let e=this.hostUrl+"/api/v1/Reward/ShowPastResultList";return this.httpPost(e,t,!0)}getPrizeBonus(t){let e=this.hostUrl+"/api/v1/Reward/GetPrizeBonus";return this.httpPost(e,t,!0)}getPlayerRanking(t){let e=this.hostUrl+"/api/v1/Reward/GetPlayerRanking";return this.httpPost(e,t,!0)}activityResult(){let t=this.hostUrl+"/api/v1/Reward/ActivityResult";return this.httpPost(t,{},!0)}updatePopupClose(t){let e=this.hostUrl+"/api/v1/Reward/UpdatePromoPopup";return this.httpPost(e,t,!0)}voucherSubmit(t){let e=this.hostUrl+"/api/v1/Promotion/VoucherSubmit";return this.httpPost(e,t,!0)}getVoucherList(t){let e=this.hostUrl+"/api/v1/Promotion/GetVoucherList";return this.httpPost(e,t,!0)}editMemberBirthday(t){let e=this.hostUrl+"/api/v1/Account/EditMemberBirthday";return this.httpPost(e,t,!0)}editMemInfoBank(t){let e=this.hostUrl+"/api/v1/Account/EditMemInfoBank";return this.httpPost(e,t,!0)}addMemInfoBank(t){let e=this.hostUrl+"/api/v1/Account/AddMemInfoBank";return this.httpPost(e,t,!0)}deleteMemInfoBank(t){let e=this.hostUrl+"/api/v1/Account/DeleteMemInfoBank";return this.httpPost(e,t,!0)}sendTelMemEditPhone(t){let e=this.hostUrl+"/api/v1/Account/SendTelMemEditPhone";return this.httpPost(e,t,!0)}sendEmailToVerifyCode(t){let e=this.hostUrl+"/api/v1/Member/SendEmailToVerifyCode";return this.httpPost(e,t,!0)}editMemberEmail(t){let e=this.hostUrl+"/api/v1/Account/EditMemberEmail";return this.httpPost(e,t,!0)}checkEmail(t){let e=this.hostUrl+"/api/v1/Member/CheckEmail";return this.httpPost(e,t,!0)}memEditWalletAddress(t){let e=this.hostUrl+"/api/v1/Account/MemEditWalletAddress";return this.httpPost(e,t,!0)}getLastDepositInfo(t){let e=this.hostUrl+"/api/v1/Wallet/GetLastDepositInfo";return this.httpPost(e,t,!0)}getSGSJackPot(t,e){let r="".concat(this.hostUrl,"/api/v1/Reward/GetSgsJackpot?currency=").concat(e);return this.httpPost(r,t,!0)}submitKYC(t){let e=this.hostUrl+"/api/v1/Referral/CertificateFileUpload";return this.httpPost(e,t,!0)}getLineLoginUrl(t){let e=this.hostUrl+"/api/Line/GetLineLoginUrl";return this.httpPost(e,t,!0)}checkLineLogin(t){let e=this.hostUrl+"/api/Line/CheckLineLogin";return this.httpPost(e,t,!0)}lineLoginV2(t){let e=this.hostUrl+"/api/v2/Auth/LineLogin";return this.httpPost(e,t,!0)}};i.\u0275fac=function(e){return new(e||i)(l(L),l(G),l(Wt),l(w),l(x),l(z),l(E),l(I))},i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o}
1)();var $t=function(o){vt(i,o);function i(){return o!==null&&o.apply(this,arguments)||this}return i.prototype.getAppName=function(){return N(this,"getAppName",{},arguments)},i.prototype.getPackageName=function(){return N(this,"getPackageName",{},arguments)},i.prototype.getVersionCode=function(){return N(this,"getVersionCode",{},arguments)},i.prototype.getVersionNumber=function(){return N(this,"getVersionNumber",{},arguments)},i.\u0275fac=(()=>{let gt;return function(e){return(gt||(gt=d(i)))(e||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac}),i.pluginName="AppVersion",i.plugin="cordova-plugin-app-version",i.pluginRef="cordova.getAppVersion",i.repo="https://github.com/whiteoctober/cordova-plugin-app-version",i.platforms=["Android","iOS","Windows"],i=St([],i),i}(Mt);var v=(()=>{let i=class i{constructor(t){this.http=t,this.cache=new Map}getJsonData(t){return!t.forceRefresh&&this.cache.has(t.name)?this.cachedObservable=A(this.cache.get(t.name)):t.obs?this.cachedObservable=t.obs.pipe(tt(e=>this.cache.set(t.name,e)),Z()):this.cachedObservable=this.http.get(t.url).pipe(tt(e=>this.cache.set(t.name,e)),Z()),this.cachedObservable}ngOnDestroy(){this.cache=null}};i.\u0275fac=function(e){return new(e||i)(l(L))},i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),Qe=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),Nt=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),Vt=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),Ht=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),Ye=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),Xe=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),Ze=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();var ti=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),ei=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),ii=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),ri=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),Jt=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),_t=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),oi=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),si=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o}
1)(),ni=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),ai=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})(),ci=(()=>{let i=class i extends v{};i.\u0275fac=(()=>{let t;return function(r){return(t||(t=d(i)))(r||i)}})(),i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();var Kt=(()=>{let i=class i{constructor(t,e,r){this.appConfigService=t,this.http=e,this.appSiteSettingCacheService=r,this.merchantCode=this.appConfigService.getConfig("configMerchantCode"),this.resourceAssetPrefix=this.appConfigService.getConfig("resourceAssetPrefix"),this.staticResourceUrl=this.appConfigService.getConfig("staticResourceUrl"),this.resourceUrl=this.appConfigService.getConfig("resourceUrl"),this.dynamicMerchantUrl="".concat(this.staticResourceUrl,"/dynamic/merchant"),this.staticSharedUrl="".concat(this.staticResourceUrl,"/static/shared/templates"),this.websiteSetting={logoUrl:"",defaultLogoUrl:"",faviconUrl:""},this.websiteSubject$=new U(this.websiteSetting)}getMerchantSettings(){let t="".concat(this.staticSharedUrl,"/json/MerchantSettings.json");return this.http.get(t).pipe(Pt(e=>A(this.getMerchantConfigById(e))))}getMerchantConfigById(t){var s,n,a;let e=(a=(n=(s=this.appConfigService.getConfig("hostUrl"))==null?void 0:s.split("//")[1])==null?void 0:n.split(".")[0])!=null?a:"";e=e.replace("apk",""),e=e=="10000"?"":e;let r=t.merchantConfig.find(c=>c.merchantId==e.slice(-3));return this.merchantConfig=r,r}getWebsiteSettings(){let t=this.generatePrefixImgUrl(),e="".concat(this.dynamicMerchantUrl,"/").concat(this.merchantCode,"/").concat(H),r="".concat(this.staticSharedUrl,"/").concat(this.merchantConfig.template,"/images/logo_default.webp");this.websiteSetting.logoUrl=r,this.appSiteSettingCacheService.getJsonData({name:"appSiteSetting",url:e}).subscribe(s=>{let n=this.specifyDataSource(s);if(n){let{logoImageId:h,faviconId:u}=n,f=h?"".concat(t,"/").concat(h):r,m=u?"".concat(t,"/").concat(u):"";this.websiteSetting={logoUrl:f,defaultLogoUrl:r,faviconUrl:m}}let a=document.querySelector("#favIcon"),c=document.querySelector("#appleFaviIcon");a&&(a.href=this.websiteSetting.faviconUrl?this.websiteSetting.faviconUrl+"?v=".concat(Math.floor(Math.random()*10)):"../../../../assets/images/favicon.ico"),c&&(c.href=this.websiteSetting.faviconUrl?this.websiteSetting.faviconUrl+"?v=".concat(Math.floor(Math.random()*10)):"../../../../assets/images/favicon.ico"),this.websiteSubject$.next(this.websiteSetting)})}specifyDataSource(t){return t!=null&&t.all?t.all:t!=null&&t.mobile?t.mobile:null}getContactsJson(t){let e=t!=null?t:this.merchantCode,r="".concat(this.dynamicMerchantUrl,"/").concat(e,"/").concat(Lt);return this.http.get(r).pipe(B(s=>A([])))}getMaintenanceTimeJson(){let t="".concat(this.staticSharedUrl,"/all_platform/site_maintenance/MaintenanceTime.json");return this.http.get(t).pipe(B(e=>A({beginTime:"",endTime:""})))}generatePrefixImgUrl(){let t=this.appConfigService.isApp?this.staticResourceUrl:this.resourceUrl;return"".concat(t,"/static/merchant/").concat(this.merchantCode,"/").concat(J)}};i.\u0275fac=function(e){return new(e||i)(l(I),l(L),l(Ht))},i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();var qt="ServiceAdvantage",Qt="SupportBank",Yt="HotGame",Xt="UpcomingMatch",Zt="PlayerRanking",ot="a100",st="a200",nt="a300",Q="a412",Y="a421",at="a512",ct="a521",lt="a612",ht="a621",ut="a700",pt="a800",te="b112",ee="b121",ie="b212",re="b221",Ue="b310",Ae="b320";var Ie=[ot,st,nt,ut,pt],ui=Ie,pi=[ot,Q,Y],gi=[Q,Y],oe={[te]:"col-middle sub-position-1",[ee]:"col-small sub-position-2",[ie]:"col-small sub-position-1",[re]:"col-middle sub-position-2",[Ue]:"col-large"},se={[te]:"col-small sub-position-2",[ee]:"col-middle sub-position-1",[ie]:"col-middle sub-position-2",[re]:"col-small sub-position-1",[Ae]:"col-large"},ne={[ot]:"position-big",[st]:"position-1",[nt]:"position-2",[Q]:"position-1 position-big",[Y]:"position-2 position-big",[at]:"position-1",[ct]:"position-3",[lt]:"position-2",[ht]:"position-3",[ut]:"position-1",[pt]:"position-2"},ae={[st]:"position-2",[nt]:"position-1",[Q]:"position-2 position-big",[Y]:"position-1 position-big",[at]:"position-3",[ct]:"position-1",[lt]:"position-3",[ht]:"position-2"},ce={[at]:"position-2",[ct]:"position-2",[lt]:"position-1",[ht]:"position-1",[ut]:"position-2",[pt]:"position-1"};var le=o=>{document.getElementsByTagName("body")[0].insertAdjacentHTML("beforeend",o)};var he=(()=>{let i=class i{constructor(t,e,r){this.globalData=t,this.httpService=e,this.appConfigService=r,this.versionKey="version",this.providerSubject=ne
1w U([]),this.provider$=this.providerSubject.asObservable(),this.subscription=new dt,this.resourceInfoPrefix=this.appConfigService.getConfig("resourceInfoPrefix")}getVersion(){return sessionStorage.getItem(this.versionKey)||""}setVersion(t){sessionStorage.setItem(this.versionKey,t)}getCachedProviderList(){let t=sessionStorage.getItem("cachedProviderList");return t?JSON.parse(t):[]}setCachedProviderList(t){sessionStorage.setItem("cachedProviderList",JSON.stringify(t))}fetchProviderStats(){let e={version:this.getVersion()},r=this.httpService.getProviderStatus(e).subscribe({next:s=>{if(!(s!=null&&s.data)||s.data.version==="")this.loadFromCacheOrFallback();else{let n=s.data.providerStatusList;Array.isArray(n)&&n.length>0?(this.providerSubject.next(n),this.setCachedProviderList(n),this.setVersion(s.data.version)):this.loadFromCacheOrFallback()}},error:()=>{this.loadFromCacheOrFallback()}});this.subscription.add(r)}loadFromCacheOrFallback(){let t=this.getCachedProviderList();t.length>0?this.providerSubject.next(t):this.fallbackLoadProviderJson()}fallbackLoadProviderJson(){return D(this,null,function*(){try{let t="".concat(this.resourceInfoPrefix,"/").concat(Tt,"?v=").concat(Math.floor(Math.random()*100)),r=yield(yield fetch(t)).json();Array.isArray(r)&&(this.providerSubject.next(r),this.setCachedProviderList(r))}catch(t){console.error("Failed to load fallback provider JSON:",t)}})}ngOnDestroy(){this.subscription.unsubscribe()}};i.\u0275fac=function(e){return new(e||i)(l(w),l(q),l(I))},i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();var ue=Object.prototype.hasOwnProperty,Li=(()=>{let i=class i{constructor(t,e,r,s,n,a,c,h,u,f,m,S,M,T,R,W){this.globalData=t,this.langService=e,this.httpService=r,this.metaTagService=s,this.titleService=n,this.appVersion=a,this.storageService=c,this.router=h,this.menuTagSettingCacheService=u,this.webSiteSettingCacheService=f,this.layoutCacheService=m,this.cmsPageContentCacheService=S,this.appConfigService=M,this.siteMaintenanceService=T,this.providerService=R,this.iab=W,this.bottomMenuBubble=[],this.bottomMenuList=[{icon:"icon-Transfer",name:"transfer",link:"/Account/Transfer"},{icon:"icon-Getpromotion",name:"getpromotion",link:"/Account/GetPromotion"},{icon:"icon-Withdraw",name:"withdraw",link:"/Account/Withdraw"}],this.accountMenu=[],this.accountMenuList=[{icon:"icon-Deposit",name:"deposit",link:"/Account/Deposit",mobile:!1},{icon:"icon-Transfer",name:"transfer",link:"/Account/Transfer",mobile:!1},{icon:"icon-Withdraw",name:"withdraw",link:"/Account/Withdraw",mobile:!1},{icon:"icon-Promotion",name:"getpromotion",link:"/Account/GetPromotion",mobile:!1},{icon:"icon-History",name:"history",link:"/Account/History",mobile:!0},{icon:"icon-report",name:"report",link:"/Account/Report",mobile:!0},{icon:"icon-ChangePassword",name:"changePassword",link:"/Account/ChangePassword",mobile:!0},{icon:"icon-Profile",name:"profile",link:"/Account/UserInfo",mobile:!0}],this.isAffiliateOpenForWeb=!1,this.isAffiliateOpenForMobile=!1,this.cmsSettingSignal=Ct({}),this.isFloatingIconOpenedMobile=!1,this.isFloatingIconOpenedWeb=!1,this.isFirstLoad=!0,this.completeMerchantCode$=new U(null),this.needUpdate=!1,this.layout={aboveLayout:"",belowLayout:"",layoutMapping:{}},this.initWebsite={logoUrl:"",faviconUrl:"",vipLogoUrl:"",forgotPasswordSetting:[],copyright:"",defaultLogoUrl:"",verificationCode:!1,apkLogoUrl:""},this.websiteSubject$=new U(this.initWebsite),this.streamingProviderMap$=new U([]),this.codeSource$=new U(null),this.voucherCodeSource$=new U(""),this.hostUrl=this.appConfigService.getConfig("hostUrl"),this.resourceInfoPrefix=this.appConfigService.getConfig("resourceInfoPrefix"),this.resourceAssetPrefix=this.appConfigService.getConfig("resourceAssetPrefix"),this.resourceAssetSharedPrefix=this.appConfigService.getConfig("resourceAssetSharedPrefix"),this.providerStatus=[],this.staticResourceUrl=this.appConfigService.getConfig("staticResourceUrl"),this.referralUrl="",this.headMerchantCode=window.merchantConfig.merchantCode,this.setLayoutFromSSR=()=>{let g=window.layoutSetting;return this.setOrganizedLayout(g),A({layouts:this.layout})},this.setLayoutFromResourceServer=()=>{let g="".concat(this.resourceInfoPrefix,"/").concat(Ft);
1return this.layoutCacheService.getJsonData({name:"layout",url:g}).pipe(j(P=>(this.setOrganizedLayout(P),{layouts:this.layout})))},this.parseLayoutData=g=>{let{area:P,type:k,block1:C,block2:b}=g;return"".concat(P).concat(k).concat(C).concat(b)},this.setOrganizedLayout=g=>{if(g){let[P]=g.filter(C=>C.area==="a"),[k]=g.filter(C=>C.area==="b");this.layout.aboveLayout=this.parseLayoutData(P),this.layout.belowLayout=this.parseLayoutData(k),this.layout.layoutMapping={[qt]:oe[this.layout.belowLayout],[Qt]:se[this.layout.belowLayout],[Yt]:ne[this.layout.aboveLayout],[Xt]:ae[this.layout.aboveLayout],[Zt]:ce[this.layout.aboveLayout]}}},this.setFloatingOpened=()=>D(this,null,function*(){var P,k,C;let g=(b,O)=>{let y=this.globalData.isMobileStyle?"isFloatingIconOpenedMobile":"isFloatingIconOpenedWeb",pe=this.globalData.isMobileStyle?b:O;this.storageService.setStorage(y,String(pe));let ge=this.storageService.getStorage(y);this["isFloatingIconOpened".concat(this.globalData.isMobileStyle?"Mobile":"Web")]=ge==="true"};if(this.globalData.isApp){let b,O,y=yield this.initCommonCMS();b=(k=y==null?void 0:y.isFloatingIconOpened)==null?void 0:k.mobile,O=(C=y==null?void 0:y.isFloatingIconOpened)==null?void 0:C.web,g(b,O)}else{let b=(P=window.websiteControl)==null?void 0:P.isFloatingIconOpened;if(b){let{mobile:O,web:y}=b;setTimeout(()=>{g(O,y)},200)}}}),this.providerService.fetchProviderStats(),this.providerService.provider$.subscribe(g=>{g&&g.length>0&&(this.providerStatus=g)}),this.cmsSetting||(this.cmsSetting=this.parseJsonSafely(this.storageService.getStorage("cmsSetting")))}parseJsonSafely(t){if(t==null)return null;if(typeof t!="string")return t;try{return JSON.parse(t)}catch(e){return null}}initCommonCMS(){return new Promise((t,e)=>{this.globalData.isApp&&this.siteMaintenanceService.getMerchantSettings().subscribe(s=>{let n="".concat(this.staticResourceUrl,"/static/shared/templates/").concat(s.template,"/css/theme.css?v=").concat(this.globalData.getOneMinuteCache());this.loadCSS(n),this.siteMaintenanceService.getWebsiteSettings()});let r={language:this.langService.language};this.httpService.getCMSData(r).subscribe(s=>D(this,null,function*(){if(s.code===0){if(this.cmsSetting=s.data,this.getReferralUrl(this.cmsSetting.referralCode),this.cmsSettingSignal.update(n=>s.data),this.cmsSetting){this.streamingProviderMap$.next(this.cmsSetting.streamingProviderMap),this.cmsSetting.isShowPromoteList=!1;let n;this.globalData.isApp?n=this.cmsSetting.merchantCode?"10".concat(this.cmsSetting.merchantCode):"10000":n=this.headMerchantCode?"10".concat(this.headMerchantCode):"10000",this.completeMerchantCode$.next(n),this.cmsSetting.completeMerchantCode=n,this.checkAppVersion(this.cmsSetting.merchantCode),this.cmsSetting.ampHtml&&this.loadAMP(this.cmsSetting.ampHtml),this.getWebsiteSettings(!1);let a=[];this.cmsSetting.isAutoTransfer?a=["transfer"]:a=["getpromotion"],this.bottomMenuBubble=this.bottomMenuList.filter(c=>!a.includes(c.name)),this.accountMenu=this.accountMenuList.filter(c=>!a.includes(c.name)),this.storageService.setStorage("cmsSetting",JSON.stringify(this.cmsSetting)),this.menuTagSetting||this.getMenuTagSetting(),t({merchantCode:this.cmsSetting.completeMerchantCode,isFloatingIconOpened:this.cmsSetting.isFloatingIconOpened})}}else e("error")}))})}setLayout(){return this.globalData.isApp?this.setLayoutFromResourceServer():this.setLayoutFromSSR()}webSiteSettingCacheServiceWithUrl(t){let e="".concat(this.resourceInfoPrefix,"/").concat(H,"?v=").concat(this.globalData.getOneMinuteCache());return t?this.webSiteSettingCacheService.getJsonData({name:"websiteSetting",url:e,forceRefresh:!0}):this.webSiteSettingCacheService.getJsonData({name:"websiteSetting",url:e})}getWebsiteSettings(t){let e=this.globalData.isApp?this.cmsSetting.template:window.merchantConfig.template,r="".concat(this.resourceAssetPrefix,"/").concat(J),s="".concat(this.resourceAssetSharedPrefix,"/all_platform/logo/images/default"),n="".concat(this.resourceAssetSharedPrefix,"/templates/").concat(e,"/images/logo_default.webp"),a="".concat(s,"/vip_logo.webp"),c="".concat(this.resourceAssetSharedPrefix,"/APK_Logo/").concat(this.cmsSetting.completeMerchantCode,"/img_apk.webp");this.initWebsite.logoUrl=n,this.initWebsite.vipLogoUrl=a,this.initWebsite.apkLogoUrl=c,this.webSiteSettingCacheServiceWithUrl(t).subscribe(h=>{let u=this.specifyDataSource(h);
1if(u){let{copyright:S,faviconId:M,forgotPassword:T,logoImageId:R,verificationCode:W,vipImageId:g}=u,P=R?"".concat(r,"/").concat(R):n,k=M?"".concat(r,"/").concat(M):"",C=g?"".concat(r,"/").concat(g):a,b=this.setForgetPwdMethods(T);this.initWebsite={logoUrl:P,faviconUrl:k,vipLogoUrl:C,forgotPasswordSetting:b,copyright:S,defaultLogoUrl:n,verificationCode:W,apkLogoUrl:c}}this.websiteSubject$.next(this.initWebsite),this.cmsSetting.newLogoUrl=this.initWebsite.logoUrl,this.cmsSetting.vipLogoUrl=this.initWebsite.vipLogoUrl,this.cmsSetting.defaultLogoUrl=this.initWebsite.defaultLogoUrl;let f=document.querySelector("#favIcon"),m=document.querySelector("#appleFaviIcon");f&&(f.href=this.getFavUrl()),m&&(m.href=this.getFavUrl())},h=>{console.log(h)})}getFavUrl(){return this.initWebsite.faviconUrl?this.initWebsite.faviconUrl+"?v=".concat(Math.floor(Math.random()*10)):"../../../../assets/images/favicon.ico"}specifyDataSource(t){return t!=null&&t.all?t.all:null}setForgetPwdMethods(t){return{0:[],1:["Email"],2:["Phone"],3:["Email","Phone"]}[t]}clearOldSeoTags(){document.head.querySelectorAll("[data-seo]").forEach(e=>e.remove())}injectSeoHeader(t){let e=document.createElement("div");e.innerHTML=t;let r=Array.from(e.children),s=Array.from(document.head.children);r.forEach(n=>{s.forEach(a=>{a.outerHTML===n.outerHTML&&a.remove()})}),r.forEach(n=>n.setAttribute("data-seo","true")),document.head.append(...r)}initPageCMS(){var r;let t={url:window.location.href,language:this.langService.language},e=(r=this.storageService.getCookie("acctInfo"))==null?void 0:r.loginId;this.cmsPageContentCacheService.getJsonData({name:window.location.href,obs:this.httpService.getCMSPageData(t),forceRefresh:!0}).subscribe(s=>{var n;if(s.code===0){this.seoSetting=s.data.webSeoSettings,this.setTitle(this.seoSetting.mainTitle),this.clearOldSeoTags(),this.injectSeoHeader(this.seoSetting.seoHeader),this.setGoogleAnalytics(this.seoSetting.gaCode),this.globalData.isSetSeo||(this.setMetaSetting(this.seoSetting),this.setBody(this.seoSetting.seoBody),this.setScript(this.seoSetting.seoScript),this.globalData.isSetSeo=!0);let a=this.storageService.getCookie("acctInfo");e&&this.globalData.isLogin&&this.globalData.acctInfo&&this.globalData.acctInfo.loginId===e&&(a==null?void 0:a.loginId)===e&&this.cmsSetting&&!this.cmsSetting.isAutoTransfer&&(this.globalData.acctInfo.balance=s.data.mainWalletBalance!=null?s.data.mainWalletBalance:(n=this.globalData.acctInfo)==null?void 0:n.balance,this.storageService.setCookie("acctInfo",JSON.stringify(this.globalData.acctInfo))),this.setAffiliateOpened()}})}getMenuData(t){var r,s,n,a;let e=this.globalData.isMobileStyle?(r=this.cmsSetting)==null?void 0:r.mobileMenu:(s=this.cmsSetting)==null?void 0:s.webMenu;if(e)switch(this.providerStatus&&e.forEach(c=>{c.subMenu.forEach(h=>{this.providerStatus.forEach(u=>{h.providerId==u.providerId&&(h.gameActive=u.gameActive==1)})})}),t){case"home":{let c=["Homepage","LiveScore","Racing","MobileExplore"];return(n=this.cmsSetting)!=null&&n.supportQQPool||c.push("Reward"),e.filter(h=>!c.includes(h.position))}case"gamehome":{let c=["Homepage","MobileExplore","Racing","LiveScore","Promotion","Referral","VIP","Reward"];return e.filter(h=>!c.includes(h.position))}case"subMenu":{let c=["Promotion","Referral","VIP"];return(a=this.cmsSetting)!=null&&a.supportQQPool&&c.push("Reward"),e.filter(h=>c.includes(h.position))}default:return e}else return[]}openMenu(t){if(t.openUrl)this.globalData.openWindows(t.openUrl,t.position);else switch(t.position){case"LiveCasino":this.router.navigate(["/Live-Casino"]);break;case"EGAME":this.router.navigate(["/Slot-Games"]);break;case"FishHunter":this.router.navigate(["/Fishing-Games"]);break;case"CrashGame":this.router.navigate(["/Crash-Games"]);break;case"VIP":this.router.navigate(["/VIP/privileges"]);break;default:this.router.navigate(["/"+t.position]);break}}setTitle(t){t?this.titleService.setTitle(t):this.titleService.setTitle("")}setMetaSetting(t){t.metaKeywords?this.metaTagService.getTag("name=keywords")?this.metaTagService.updateTag({name:"keywords",content:t.metaKeywords}):this.metaTagService.addTag({name:"keywords",content:t.metaKeywords}):this.metaTagService.removeTag("name=keywords"),t.metaDescription?this.metaTagService.getTag("name=description")?this.metaTagService.updateTag({name:"description",content:t.metaDescription}):this.metaTagService.addTag({name:"description",content:t.metaDescription}):this.metaTagService.removeTag("name=description")}setGoogleAnalytics(t){if(t){let e=document.createElement("script");
1e.async=!0,e.src="https://www.googletagmanager.com/gtag/js?id=".concat(t),this.checkScript(e),gtag("config",t)}}setHtml(t){t&&document.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",t)}setBody(t){t&&(this.seoBody=t)}setScript(t){let e=["VIP/privileges","Maintenance","Restrict","MaintenanceProvider","Denied403"];if(t&&!window.opener&&!e.some(r=>window.location.href.includes(r)))try{let r=/\<!--.*--\>/i,s=/\<noscript\>[\s\S]*?\<\/noscript\>/,n=/\<script.*src.*\<\/script\>/i,a=/\<script.*text\/javascript.*\>/i,c=/<!--[\s\S]*?-->/,h=/\<noscript\>.*\<\/noscript\>/i,u=t.replace(n,"").replace("<script>","").replace("<\/script>","").replace(a,"").replace(r,"").replace(s,"").replace(c,"").replace(h,"").trim();u&&(0,eval)(u);let f=s.exec(t);f[0].includes("<noscript>")&&le(f[0])}catch(r){console.log("load seoScript error")}}addNoScript(t){document.getElementsByTagName("body")[0].insertAdjacentHTML("beforeend",t)}logCustomEvent(t,e,r){ga(()=>{var s;if(ue.call(window,"ga")){let n=ga.getAll();(n==null?void 0:n.length)>0&&((s=n[0])==null||s.send("event",t,e,r))}})}logPageView(t){ga(()=>{ue.call(window,"ga")&&(ga("set","page",t),ga("send","pageview"))})}loadAMP(t){let e=document.createElement("link");e.href=t,e.rel="amphtml",this.checkLinkFile(e)}loadCSS(t){let e=document.createElement("link");e.href=t,e.rel="stylesheet",e.type="text/css",this.checkLinkFile(e)}checkLinkFile(t){let e=document.getElementsByTagName("head")[0],r=e.getElementsByTagName("link"),s=!1;for(let a=0;a<r.length;a++)r[a].href.indexOf(t.href)>-1&&(s=!0);if(s)return;let n=t.outerHTML;e.insertAdjacentHTML("beforeend",n)}checkScript(t){let e=document.getElementsByTagName("head")[0],r=e.getElementsByTagName("script"),s=!1;for(let n=0;n<r.length;n++)r[n].src.indexOf(t.src)>-1&&(s=!0);s||e.appendChild(t)}getPageMark(t){if(t)return new Promise((r,s)=>{let n=this.cmsSetting.pageUrlMappingList.find(a=>a.url.toLowerCase()===t.toLowerCase());if(n)try{r(n.name)}catch(a){s()}})}getPageUrl(t){let e=this.cmsSetting.pageUrlMappingList.find(r=>r.name===t);return e?e.url:"/"}checkAppVersion(t){this.globalData.isApp&&this.appVersion.getVersionNumber().then(e=>{if(this.version=e,e){this.globalData.loading=!0;let r={merchantId:t,check:Math.floor(new Date().getTime()/1e3),version:e,site:t};this.httpService.getAppDetails(r).subscribe(s=>{s.code===0&&(this.appSetting=s.data,this.appSetting.version&&this.appSetting.version!==e&&(!this.appSetting.isForceUpdate&&this.storageService.getSessionStorage("checkAppStatus")?this.needUpdate=!1:this.needUpdate=!0)),this.globalData.loading=!1})}})}getMenuTagSetting(){let t="".concat(this.resourceInfoPrefix,"/").concat(kt);this.menuTagSettingCacheService.getJsonData({name:"menuTag",url:t}).subscribe(e=>{this.menuTagSetting=e},e=>{console.log(e)})}getReferralUrl(t){let e=this.appConfigService.getConfig("hostUrl");this.referralUrl="".concat(e,"/Member/StreamlinedRegister?R=").concat(t)}updateCode(t){this.codeSource$.next(t)}updateVoucherCode(t){this.voucherCodeSource$.next(t)}initActivityData(){if(!(this.globalData.isLogin||localStorage.getItem("isLogin")==="true")){this.activityData=null;return}this.httpService.activityResult().subscribe(e=>{e.code===0&&(this.activityData=e.data)})}changeFloatingIconOpen(){this.globalData.isMobileStyle?this.isFirstLoad=this.storageService.getStorage("isFloatingIconOpenedMobile")==null:this.isFirstLoad=this.storageService.getStorage("isFloatingIconOpenedWeb")==null,this.isFirstLoad==!0?this.setFloatingOpened():this.globalData.isMobileStyle?this.isFloatingIconOpenedMobile=this.storageService.getStorage("isFloatingIconOpenedMobile")=="true":this.isFloatingIconOpenedWeb=this.storageService.getStorage("isFloatingIconOpenedWeb")=="true",this.globalData.isApp&&this.setFloatingOpened()}setAffiliateOpened(){return D(this,null,function*(){var h,u,f;if(!this.cmsSetting)try{yield this.initCommonCMS()}catch(m){this.isAffiliateOpenForWeb=!1,this.isAffiliateOpenForMobile=!1;return}let t=this.langService.language,e=Ut[t]||null,r=((h=this.globalData.acctInfo)==null?void 0:h.currency)||null,s=((u=this.cmsSetting)==null?void 0:u.affiliateSupCurrency)||[],n=this.globalData.isLogin?r:e,a=!!n&&s.includes(n),c=(f=this.cmsSetting)==null?void 0:f.isShowAffiliate;this.isAffiliateOpenForWeb=!!(c!=null&&c.web)&&a,this.isAffiliateOpenForMobile=!!(c!=null&&c.mobile)&&a})}affUrlTransfer(){var a;let e=this.appConfigService.getConfig("hostUrl").match(/^https?:\/\/(\d+)(?:apk)?\..*$/),r=e==null?void 0:e[1],s=(a=this.appConfigService.config)==null?void 0:a.env,n=window.location.hostname;if(this.globalData.isApp){let c="";switch(s){case"production":c="https://af-web-".concat(r,"apk.deliber.net");break;case"staging":c="https://af-web-".concat(r,".368media.net");break;case"dev":c="https://af-web-".concat(r,".368media.biz");break;default:break}return window.scroll(0,0),this.iab.create(c,"_blank","location=yes,hideurlbar=yes"),c}else switch(s){case"prod":{let c=n.split(".").slice(-2).join(".");return"https://aff.".concat(c)}case"staging":case"dev":return"https://af-web-".concat(n);default:break}}};i.\u0275fac=function(e){return new(e||i)(l(w),l(E),l(q),l(It),l(wt),l($t),l(x),l(G),l(Nt),l(Vt),l(Jt),l(_t),l(I),l(Kt),l(he),l(Rt,8))},i.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o}
1)();export{le as a,ot as b,st as c,nt as d,Q as e,Y as f,at as g,ct as h,lt as i,ht as j,ee as k,ie as l,Ae as m,Ie as n,ui as o,pi as p,gi as q,Dt as r,de as s,V as t,be as u,it as v,z as w,q as x,$t as y,Qe as z,Ye as A,Xe as B,Ze as C,ti as D,ei as E,ii as F,ri as G,oi as H,si as I,ni as J,ai as K,ci as L,Kt as M,he as N,Li as O};
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.