1import{a as ne}from"./chunk-MKMU6CV3.js";import{a as ie}from"./chunk-7HRBTXX4.js";import{a as ee,b as te}from"./chunk-GK4FMGPU.js";import{a as $}from"./chunk-GNSVSSEC.js";import"./chunk-FFTXNXI6.js";import"./chunk-5LWFT2LT.js";import{a as q}from"./chunk-WQGKT4QG.js";import{a as X,e as Z}from"./chunk-EJMX6GXD.js";import{j as Q}from"./chunk-LBFZVMBI.js";import{b as U,p as Y}from"./chunk-SQXH55RY.js";import{A as H,c as W,g as R,l as O}from"./chunk-FZLMV5FP.js";import{O as K,x as J}from"./chunk-2RZNBXEW.js";import"./chunk-WUS6VI32.js";import{ea as j,i as V,j as E,k as G,p as L,r as N,sa as z}from"./chunk-LKIBVTZY.js";import"./chunk-IXSVJUWF.js";import"./chunk-VXMZGT4Q.js";import{A as g,B as S,Da as l,Ia as o,Ja as a,Ka as u,La as M,Ma as T,Oa as C,Ra as x,Sa as m,ab as D,bb as p,cb as b,db as _,ga as r,ha as c,jb as F,kb as A,lb as P,nb as B,p as y,pb as k,sb as d,tb as v,xa as h}from"./chunk-LZGEQQYD.js";import"./chunk-BW2TMJN6.js";import{j as w}from"./chunk-RNQ7BUHW.js";var le=n=>({open:n});function me(n,s){if(n&1&&u(0,"app-account-wallet",16),n&2){let t=m(2);l("ngClass",k(1,le,t.accountInfoService.isProviderListOpen))}}function pe(n,s){if(n&1){let t=C();o(0,"div",8)(1,"label",18),p(2),d(3,"translate"),a(),o(4,"input",19),P("ngModelChange",function(e){g(t);let f=m(3);return A(f.transferService.previewBonus,e)||(f.transferService.previewBonus=e),S(e)}),a()()}if(n&2){let t=m(3);r(2),b(v(3,2,"getpromotionPage.previewBonus")),r(2),F("ngModel",t.transferService.previewBonus)}}function fe(n,s){if(n&1){let t=C();M(0),o(1,"div",8)(2,"label"),p(3),d(4,"translate"),o(5,"span"),p(6,"*"),a()(),o(7,"a",9),x("click",function(){g(t);let e=m(2);return S(e.transferService.openPromotionList())}),p(8),d(9,"translate"),u(10,"i",10),a()(),h(11,pe,5,4,"div",17),T()}if(n&2){let t=m(2);r(3),_("",v(4,3,"getpromotionPage.promotionList")," "),r(5),_(" ",t.transferService.promoteTitle?t.transferService.promoteTitle:v(9,5,"pleaseSelect")," "),r(3),l("ngIf",t.transferService.transferForm.promoteId)}}function de(n,s){if(n&1){let t=C();o(0,"div",5),h(1,me,1,3,"app-account-wallet",6),o(2,"div",7)(3,"div",8)(4,"label"),p(5),d(6,"translate"),o(7,"span"),p(8,"*"),a()(),o(9,"a",9),x("click",function(){g(t);let e=m();return S(e.transferService.openProviderList("to"))}),p(10),d(11,"translate"),u(12,"i",10),a()(),h(13,fe,12,7,"ng-container",11),o(14,"div",8)(15,"label",12),p(16),d(17,"translate"),a(),o(18,"input",13,0),x("ngModelChange",function(e){g(t);let f=D(19),I=m();return S(I.transferService.setAmount(e,f))}),a()(),o(20,"div",14)(21,"button",15),x("debounceClick",function(){g(t);let e=m();return S(e.checkTransPromote())}),p(22),d(23,"translate"),a()()()()}if(n&2){let t=m();r(),l("ngIf",!t.globalData.isMobileStyle&&!t.cmsService.cmsSetting.isAutoTransfer),r(4),_("",v(6,7,"provider")," "),r(5),_(" ",t.transferService.transferForm.to==="-"?v(11,9,"pleaseSelect"):t.transferService.providerToDisplay," "),r(3),l("ngIf",t.transferService.promotionList==null?null:t.transferService.promotionList.length),r(3),b(v(17,11,"transferPage.transferAmount")),r(2),l("value",t.transferService.transferForm.amount),r(4),_(" ",v(23,13,"submit")," ")}}var Ge=(()=>{let s=class s{constructor(i,e,f,I,re,oe,ae,se,ce){this.router=i,this.globalData=e,this.httpService=f,this.reverseFormatPipe=I,this.accountInfoService=re,this.transferService=oe,this.cmsService=ae,this.menuService=se,this.langService=ce}ngOnInit(){this.cmsService.cmsSetting||this.cmsService.initCommonCMS().catch(i=>{console.log(i)}),this.cmsService.cmsSetting.isAutoTransfer||this.router.navigate(["/"]).then(()=>{window.location.reload()}),this.menuService.menuData?this.loadIndex():this.menuService.initMenu().then(()=>{this.loadIndex()}).catch(i=>{console.log(i)})}loadIndex(){return w(this,null,function*(){this.menuService.getProviderMenu("promotion").then(()=>{this.transferService.initPromotionTransfer()})})}promoteSubmit(){let i={providerId:this.transferService.transferForm.to,lastTo:this.transferService.transferForm.lastTo,promoteId:this.transferService.transferForm.promoteId==0?"":this.transferService.transferForm.promoteId};this.globalData.loading=!0,this.httpService.promotionSubmit(i).subscribe(e=>{e.code===0?(this.accountInfoService.getBalance(),this.transferService.initPromotionTransfer(),this.globalData.showDirectAlert("codeMessage.0",1)):(e.code===1440408||e.code===1440411)&&this.globalData.showAlert(e.code),this.globalData.loading=!1})}checkTransPromote(){if(this.transferService.transferForm.to===""||this.transferService.transferForm.to==="-"){this.globalData.showDirectAlert("getpromotionPage.providerBlank",2);return}if(this.transferService.transferForm.promoteId===""||this.transferService.transferForm.promoteId===0){this.globalData.showDirectAlert("getpromotionPage.promotionBlank",2);return}let i=this.reverseFormatPipe.transform(this.transferService.transferForm.amount);if(!new RegExp("^[1-9][0-9]*$").test(i)){this.globalData.showDirectAlert("codeMessage.40418",2);return}if(i=parseFloat(i),isNaN(i)||i<0){this.globalData.showDirectAlert("codeMessage.40419",2);return}this.promoteSubmit()}ngOnDestroy(){}};s.\u0275fac=function(e){return new(e||s)(c(j),c(z),c(J),c(X),c(U),c(Z),c(K),c(Y),c(G))},s.\u0275cmp=y({type:s,selectors:[["app-get-promotion"]],standalone:!0,features:[B],decls:7,vars:6,consts:[["Num",""],[3,"title"],[3,"displayMemberInfo"],["class","acc-block",4,"ngIf"],[3,"MainWallet"],[1,"acc-block"],["class","money-info-box",3,"ngClass",4,"ngIf"],[1,"col"],[1,"form"],[1,"promotion-select",3,"click"],[1,"icon-triangle"],[4,"ngIf"],["for","fAmount"],["type","text","name","fAmount","readonly","",3,"ngModelChange","value"],[1,"btn-group"],["app-debounce-click","",1,"btn-submit",3,"debounceClick"],[1,"money-info-box",3,"ngClass"],["class","form",4,"ngIf"],["for","fBonus"],["type","text","name","fBonus","readonly","",3,"ngModelChange","ngModel"]],template:function(e,f){e&1&&(u(0,"app-title-nav",1),d(1,"translate"),o(2,"main"),u(3,"app-account-nav",2),h(4,de,24,15,"div",3),u(5,"app-provider-select",4)(6,"app-promotion-select"),a()),e&2&&(l("title",v(1,4,"bottomMenu.getpromotion")),r(3),l("displayMemberInfo",f.globalData.isMobileStyle),r(),l("ngIf",f.cmsService.cmsSetting.isAutoTransfer),r(),l("MainWallet",!1))},dependencies:[$,te,N,ee,L,H,W,R,O,q,ne,ie,E,V],encapsulation:2,data:{animation:[Q]}});let n=s;return n})();export{Ge as GetpromotionComponent};
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.