-
Notifications
You must be signed in to change notification settings - Fork 0
/
4418.6fc603be67c68d04.js
1 lines (1 loc) · 45.9 KB
/
4418.6fc603be67c68d04.js
1
"use strict";(self.webpackChunkcheapflightclient=self.webpackChunkcheapflightclient||[]).push([[4418],{14418:(T,m,u)=>{u.r(m),u.d(m,{DepositBalanceSubAgentComponent:()=>nt});var d=u(36895),l=u(24006),g=u(37094),p=u(83700),f=u(72853),a=u(72506),h=u(44143),b=u(74713),t=u(94650),A=u(67460),C=u(28746),v=u(64287);function y(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div",21)(1,"button",22),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.onClose())}),t._UZ(2,"cf-icon",23),t._uU(3," Ki\u1ec3m tra l\u1ea1i "),t.qZA(),t.TgZ(4,"button",24),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(),r=t.MAs(35),c=t.MAs(37);return t.KtG(o.onOk(r,c))}),t._UZ(5,"cf-icon",25),t._uU(6," X\xe1c nh\u1eadn "),t.qZA()()}}function w(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div",26)(1,"div",27),t.O4$(),t.TgZ(2,"svg",28),t._UZ(3,"rect",29)(4,"path",30)(5,"path",31)(6,"path",32)(7,"path",33)(8,"path",34)(9,"path",35)(10,"path",36)(11,"path",37)(12,"path",38)(13,"path",39)(14,"path",40)(15,"path",41)(16,"path",42)(17,"path",43)(18,"path",44)(19,"path",45),t.qZA(),t.kcU(),t._UZ(20,"div",46)(21,"div",47),t.qZA(),t.TgZ(22,"div",48)(23,"button",49),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.onCreateNew())}),t._UZ(24,"cf-icon",50),t._uU(25," T\u1ea1o m\u1edbi "),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(20),t.Q6J("innerHTML",e.titleText,t.oJD),t.xp6(1),t.Q6J("innerHTML",e.bodyText,t.oJD)}}function k(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div",26)(1,"div",27),t.O4$(),t.TgZ(2,"svg",28),t._UZ(3,"rect",29)(4,"path",51)(5,"path",52)(6,"path",32)(7,"path",53)(8,"path",54)(9,"path",55)(10,"path",56)(11,"path",57)(12,"path",58)(13,"path",59)(14,"path",60)(15,"path",61)(16,"path",62)(17,"path",63)(18,"path",64)(19,"path",65)(20,"path",66),t.qZA(),t.kcU(),t._UZ(21,"div",46)(22,"div",47),t.qZA(),t.TgZ(23,"div",67)(24,"button",68),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.onCreateNew())}),t._UZ(25,"cf-icon",50),t._uU(26," T\u1ea1o m\u1edbi "),t.qZA(),t.TgZ(27,"button",69),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(),r=t.MAs(35),c=t.MAs(37);return t.KtG(o.onOk(r,c))}),t._UZ(28,"cf-icon",70),t._uU(29," Th\u1eed l\u1ea1i "),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(21),t.Q6J("innerHTML",e.titleText,t.oJD),t.xp6(1),t.Q6J("innerHTML",e.bodyText,t.oJD)}}function S(n,s){1&n&&t._UZ(0,"cf-spinner")}let E=(()=>{class n{constructor(e,i,o,r,c){this._balanceService=i,this._bottomSheetService=o,this.bottomSheetData=r,this.bottomSheetRef=c,this.onclose=new t.vpe,this.onok=new t.vpe,this.isLoading=!1,this.titleText="",this.bodyText="",this.isShowBottom=!0,e.registerIcons([a.UNF]),r&&(this.subAgentData=r.subAgentData)}onClose(){this.bottomSheetData?this.bottomSheetRef.dismiss(!1):this.onclose.emit()}onOk(e,i){this.btsSuccess&&this.btsSuccess.dismiss(!0),this.btsError&&this.btsError.dismiss(!0),this.bottomSheetData?this.depoitBalance(e,i):this.onok.emit()}onCreateNew(){this.btsSuccess&&this.btsSuccess.dismiss(!0),this.btsError&&this.btsError.dismiss(!0),this.bottomSheetRef.dismiss(!0)}depoitBalance(e,i){this.isLoading=!0,this._balanceService.depositSubAgent({subAgentId:this.subAgentData.subAgentId||"",amount:this.subAgentData.amount||0,description:this.subAgentData.description||""}).pipe((0,C.x)(()=>this.isLoading=!1)).subscribe({next:r=>{r.success?(this.isShowBottom=!1,this.titleText="Th\xeam c\xf4ng n\u1ee3 n\u1ea1p ti\u1ec1n th\xe0nh c\xf4ng!",this.bodyText=`C\xf4ng n\u1ee3 n\u1ea1p ti\u1ec1n cho \u0111\u1ea1i l\xfd <strong>${this.subAgentData.username} - ${this.subAgentData.displayName}</strong> \u0111\xe3 \u0111\u01b0\u1ee3c th\xeam th\xe0nh c\xf4ng.\n S\u1ed1 d\u01b0 c\xf4ng n\u1ee3 c\u1ee7a \u0111\u1ea1i l\xfd \u0111\xe3 \u0111\u01b0\u1ee3c c\u1eadp nh\u1eadt.`,this.btsSuccess=this._bottomSheetService.open(e,{headerTitle:"",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",leftButtonIcon:"",data:{title:this.titleText,content:this.bodyText,status:"success",okText:"OK"}}),this.btsSuccess.containerInstance._rightButtonClick.subscribe(c=>this.btsSuccess.dismiss())):(this.titleText="Th\xeam c\xf4ng n\u1ee3 n\u1ea1p ti\u1ec1n th\u1ea5t b\u1ea1i!",this.bodyText="C\xf3 l\u1ed7i x\u1ea3y ra trong qu\xe1 tr\xecnh th\xeam c\xf4ng n\u1ee3 n\u1ea1p ti\u1ec1n. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c t\u1ea1o m\u1edbi t\u1eeb \u0111\u1ea7u.",this.btsError=this._bottomSheetService.open(i,{headerTitle:"",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",leftButtonIcon:"",data:{title:this.titleText,content:this.bodyText,status:"error",okText:"OK"}}),this.btsError.containerInstance._rightButtonClick.subscribe(c=>this.btsError.dismiss()))},error:()=>{this.titleText="Th\xeam c\xf4ng n\u1ee3 n\u1ea1p ti\u1ec1n th\u1ea5t b\u1ea1i!",this.bodyText="C\xf3 l\u1ed7i x\u1ea3y ra trong qu\xe1 tr\xecnh th\xeam c\xf4ng n\u1ee3 n\u1ea1p ti\u1ec1n. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c t\u1ea1o m\u1edbi t\u1eeb \u0111\u1ea7u.",this.btsError=this._bottomSheetService.open(i,{headerTitle:"",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",leftButtonIcon:"",data:{title:this.titleText,content:this.bodyText,status:"error",okText:"OK"}}),this.btsError.containerInstance._rightButtonClick.subscribe(r=>this.btsError.dismiss())}})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(a.KNP),t.Y36(v.mO),t.Y36(g.a2),t.Y36(g.Rr,8),t.Y36(g.Zu,8))},n.\u0275cmp=t.Xpm({type:n,selectors:[["brief-deposit-balance"]],hostAttrs:[1,"w-full"],inputs:{subAgentData:"subAgentData"},outputs:{onclose:"onclose",onok:"onok"},standalone:!0,features:[t.jDz],decls:39,vars:16,consts:[[1,"p-6","flex","flex-col","gap-y-4","justify-center"],[1,"text-body-sm"],[1,"border","border-neutral-gray-2","rounded"],[1,"p-3","flex","items-center","gap-x-[20px]","bg-neutral-gray-1"],[1,"w-[64px]","h-[64px]","overflow-hidden","relative"],["alt","\u1ea2nh \u0110\u1ea1i Di\u1ec7n",1,"object-cover","h-full","w-full","rounded-full",3,"src"],[1,"flex","flex-col"],[1,"text-heading-md"],[1,"text-body-lg"],[1,"p-3","flex","justify-between","items-center","border-b","border-neutral-gray-2"],[1,"text-body-md"],[1,"text-express-md"],[1,"p-3","flex","justify-end","text-express-md","text-functional-2-3","border-b","border-neutral-gray-2"],[1,"text-express-lg"],[1,"p-3","flex","justify-between"],[1,"flex","justify-end","w-[300px]"],[1,"text-body-md","overflow-ellipsis","whitespace-nowrap","overflow-hidden"],["class","px-6 pb-6 flex justify-end gap-x-4 md:fixed md:bottom-0 md:left-0 md:w-screen md:bg-white md:shadow-cf-large-top md:p-4 md:items-center md:justify-between md:gap-x-4",4,"ngIf"],["successBts",""],["errorBts",""],[4,"ngIf"],[1,"px-6","pb-6","flex","justify-end","gap-x-4","md:fixed","md:bottom-0","md:left-0","md:w-screen","md:bg-white","md:shadow-cf-large-top","md:p-4","md:items-center","md:justify-between","md:gap-x-4"],["cf-button","","size","medium","type","secondary",1,"md:!w-full","md:items-center","md:justify-center",3,"click"],["icon","chevron_left","size","small",1,"mr-2.5"],["cf-button","","size","medium","color","primary-1",1,"md:!w-full","md:items-center","md:justify-center",3,"click"],["icon","circle_check","size","small",1,"mr-2.5"],[1,"px-6","py-3","flex","flex-col","gap-y-6"],[1,"flex","flex-col","gap-2","justify-center","items-center","text-center"],["width","80","height","80","viewBox","0 0 80 80","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","80","height","80","fill","white"],["d","M72.8737 46.6708C72.8797 51.2242 71.9344 55.7286 70.0983 59.8954H9.90136C7.93485 55.4182 6.99194 50.5587 7.14132 45.671C7.2907 40.7833 8.52862 35.9904 10.7649 31.6417C13.0011 27.293 16.1794 23.4979 20.068 20.5331C23.9567 17.5682 28.4579 15.5082 33.2435 14.5032C38.0291 13.4982 42.9787 13.5734 47.7315 14.7235C52.4843 15.8736 56.9207 18.0696 60.7174 21.1513C64.5141 24.2331 67.5755 28.123 69.6785 32.5378C71.7814 36.9525 72.873 41.7808 72.8737 46.6708Z","fill","#E7FFF4"],["d","M3.40918 59.8954H77.7661","stroke","#07A35D","stroke-width","1.5","stroke-miterlimit","10","stroke-linecap","round"],["d","M53.8891 67.0215H51.6553L49.8091 66.0308C49.6728 65.958 49.5206 65.92 49.366 65.92C49.2115 65.92 49.0593 65.958 48.923 66.0308L47.4891 66.7877C47.3527 66.8604 47.2006 66.8985 47.046 66.8985C46.8915 66.8985 46.7393 66.8604 46.603 66.7877L45.1691 66.0308C45.0327 65.958 44.8806 65.92 44.726 65.92C44.5715 65.92 44.4193 65.958 44.283 66.0308L42.8491 66.7877C42.7127 66.8604 42.5606 66.8985 42.406 66.8985C42.2515 66.8985 42.0993 66.8604 41.963 66.7877L40.4922 66.0308C40.3569 65.9581 40.2058 65.92 40.0522 65.92C39.8986 65.92 39.7475 65.9581 39.6122 66.0308L38.1537 66.7877C38.0185 66.8604 37.8673 66.8985 37.7137 66.8985C37.5602 66.8985 37.409 66.8604 37.2737 66.7877L35.8337 66.0308C35.6974 65.958 35.5452 65.92 35.3906 65.92C35.2361 65.92 35.0839 65.958 34.9476 66.0308L33.5137 66.7877C33.3774 66.8604 33.2252 66.8985 33.0707 66.8985C32.9161 66.8985 32.7639 66.8604 32.6276 66.7877L31.1937 66.0308C31.0574 65.958 30.9052 65.92 30.7507 65.92C30.5961 65.92 30.4439 65.958 30.3076 66.0308L28.6583 66.9046C28.5084 66.983 28.3414 67.0232 28.1722 67.0215H26.1107C25.9365 67.0089 25.7743 66.9282 25.6591 66.7969C25.544 66.6657 25.4851 66.4943 25.4953 66.32V23.0708C25.4851 22.8964 25.544 22.7251 25.6591 22.5938C25.7743 22.4626 25.9365 22.3819 26.1107 22.3692H53.8891C54.0633 22.3819 54.2255 22.4626 54.3406 22.5938C54.4558 22.7251 54.5147 22.8964 54.5045 23.0708V66.32C54.5147 66.4943 54.4558 66.6657 54.3406 66.7969C54.2255 66.9282 54.0633 67.0089 53.8891 67.0215Z","fill","white"],["d","M54.5048 23.0708V27.8708H25.4894V23.0708C25.4792 22.8964 25.5381 22.7251 25.6533 22.5938C25.7684 22.4626 25.9306 22.3819 26.1048 22.3692H53.8833C54.0585 22.3803 54.2223 22.4603 54.3387 22.5918C54.4552 22.7232 54.5149 22.8954 54.5048 23.0708Z","fill","#42BA84"],["d","M53.8891 67.0215H51.6553L49.8091 66.0308C49.6728 65.958 49.5206 65.92 49.366 65.92C49.2115 65.92 49.0593 65.958 48.923 66.0308L47.4891 66.7877C47.3527 66.8604 47.2006 66.8985 47.046 66.8985C46.8915 66.8985 46.7393 66.8604 46.603 66.7877L45.1691 66.0308C45.0328 65.958 44.8806 65.92 44.726 65.92C44.5715 65.92 44.4193 65.958 44.283 66.0308L42.8491 66.7877C42.7127 66.8604 42.5606 66.8985 42.406 66.8985C42.2515 66.8985 42.0993 66.8604 41.963 66.7877L40.4922 66.0308C40.3569 65.9581 40.2058 65.92 40.0522 65.92C39.8986 65.92 39.7475 65.9581 39.6122 66.0308L38.1537 66.7877C38.0185 66.8604 37.8673 66.8985 37.7137 66.8985C37.5602 66.8985 37.409 66.8604 37.2737 66.7877L35.8337 66.0308C35.6974 65.958 35.5452 65.92 35.3907 65.92C35.2361 65.92 35.0839 65.958 34.9476 66.0308L33.5137 66.7877C33.3774 66.8604 33.2252 66.8985 33.0707 66.8985C32.9161 66.8985 32.7639 66.8604 32.6276 66.7877L31.1937 66.0308C31.0574 65.958 30.9052 65.92 30.7507 65.92C30.5961 65.92 30.4439 65.958 30.3076 66.0308L28.6583 66.9046C28.5084 66.983 28.3414 67.0232 28.1722 67.0215H26.1107C25.9365 67.0089 25.7743 66.9282 25.6591 66.7969C25.544 66.6657 25.4851 66.4943 25.4953 66.32V23.0708C25.4851 22.8964 25.544 22.7251 25.6591 22.5938C25.7743 22.4626 25.9365 22.3819 26.1107 22.3692H53.8891C54.0633 22.3819 54.2255 22.4626 54.3406 22.5938C54.4558 22.7251 54.5147 22.8964 54.5045 23.0708V66.32C54.5147 66.4943 54.4558 66.6657 54.3406 66.7969C54.2255 66.9282 54.0633 67.0089 53.8891 67.0215V67.0215Z","stroke","#07A35D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M34.8307 35.0769C34.8425 35.5327 34.6745 35.9748 34.363 36.3077C34.0474 36.6638 33.6065 36.8842 33.1322 36.9231V37.7723C33.1355 37.7908 33.1342 37.8098 33.1286 37.8277C33.1229 37.8456 33.113 37.8619 33.0998 37.8752C33.0865 37.8885 33.0702 37.8984 33.0523 37.904C33.0344 37.9097 33.0154 37.9109 32.9969 37.9077H32.4738C32.3815 37.9077 32.3322 37.8646 32.3322 37.7723V36.9231C31.694 36.8451 31.0905 36.5893 30.5907 36.1846C30.5746 36.1747 30.5608 36.1616 30.5502 36.146C30.5395 36.1305 30.5322 36.1129 30.5287 36.0943C30.5252 36.0758 30.5256 36.0567 30.53 36.0384C30.5343 36.02 30.5424 36.0027 30.5538 35.9877L30.9476 35.3723C30.9603 35.3557 30.9766 35.3423 30.9952 35.333C31.0139 35.3238 31.0345 35.319 31.0553 35.319C31.0762 35.319 31.0967 35.3238 31.1154 35.333C31.1341 35.3423 31.1504 35.3557 31.163 35.3723C31.5893 35.714 32.1127 35.9121 32.6584 35.9385C33.3538 35.9385 33.7476 35.5938 33.7476 35.0892C33.7476 33.7292 30.6707 34.2523 30.6707 32.0862C30.7036 31.6518 30.8891 31.2431 31.1943 30.9323C31.4995 30.6214 31.9047 30.4286 32.3384 30.3877V29.5385C32.3365 29.5194 32.3388 29.5001 32.3453 29.4821C32.3517 29.4641 32.3621 29.4477 32.3756 29.4341C32.3891 29.4206 32.4055 29.4102 32.4236 29.4038C32.4416 29.3973 32.4609 29.395 32.4799 29.3969H33.003C33.0953 29.3969 33.1384 29.4462 33.1384 29.5385V30.3446C33.6157 30.422 34.0734 30.5913 34.4861 30.8431C34.5031 30.8519 34.5181 30.8643 34.53 30.8793C34.5419 30.8944 34.5505 30.9118 34.5551 30.9304C34.5598 30.9491 34.5604 30.9685 34.557 30.9873C34.5536 31.0062 34.5462 31.0242 34.5353 31.04L34.1107 31.6554C34.1005 31.6729 34.0864 31.6879 34.0696 31.6993C34.0528 31.7107 34.0336 31.7181 34.0135 31.7211C33.9934 31.724 33.9729 31.7224 33.9535 31.7164C33.9341 31.7103 33.9163 31.7 33.9015 31.6862C33.5575 31.4432 33.1471 31.3122 32.7261 31.3108C32.1784 31.3108 31.7292 31.6123 31.7292 32.0492C31.7538 33.3415 34.8307 32.8431 34.8307 35.0769Z","fill","#84BAA2"],["d","M29.7168 41.5323H50.7076","stroke","#84BAA2","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M29.7168 45.2492H50.7076","stroke","#84BAA2","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M29.7168 48.9662H50.7076","stroke","#84BAA2","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M29.7168 52.6831H50.7076","stroke","#84BAA2","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M29.7168 56.4062H50.7076","stroke","#84BAA2","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M55.8211 75.4646C62.8631 75.4646 68.5719 69.7559 68.5719 62.7138C68.5719 55.6718 62.8631 49.9631 55.8211 49.9631C48.779 49.9631 43.0703 55.6718 43.0703 62.7138C43.0703 69.7559 48.779 75.4646 55.8211 75.4646Z","fill","#07A35D"],["d","M49.8034 63.9261L53.9511 68.3077C54.0476 68.4013 54.1767 68.4537 54.3111 68.4537C54.4455 68.4537 54.5746 68.4013 54.6711 68.3077L63.5019 59.2677C63.5401 59.2236 63.5687 59.172 63.5858 59.1162C63.6029 59.0604 63.6082 59.0016 63.6012 58.9436C63.5943 58.8857 63.5753 58.8298 63.5454 58.7797C63.5156 58.7295 63.4756 58.6861 63.428 58.6523L61.5019 57.0031C61.414 56.9384 61.3044 56.9106 61.1964 56.9255C61.0883 56.9404 60.9904 56.997 60.9234 57.0831L54.6403 63.7908C54.6038 63.8357 54.5582 63.8726 54.5067 63.8991C54.4551 63.9255 54.3986 63.941 54.3408 63.9444C54.2829 63.9479 54.225 63.9393 54.1706 63.9192C54.1162 63.8991 54.0666 63.868 54.0249 63.8277L51.9634 61.7723C51.9247 61.7289 51.8773 61.6942 51.8243 61.6705C51.7713 61.6467 51.7138 61.6344 51.6557 61.6344C51.5976 61.6344 51.5402 61.6467 51.4871 61.6705C51.4341 61.6942 51.3867 61.7289 51.348 61.7723L49.8096 63.3846C49.7433 63.4589 49.7062 63.5547 49.7051 63.6542C49.704 63.7538 49.7389 63.8503 49.8034 63.9261Z","fill","white"],["d","M27.9443 10.1908V17.0708","stroke","#07A35D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M13.1631 25.7415H20.6031","stroke","#07A35D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M16.6094 13.9754L22.2586 19.6308","stroke","#07A35D","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"text-heading-sm","text-neutral-gray-6",3,"innerHTML"],[1,"text-body-md","text-neutral-gray-5",3,"innerHTML"],[1,"w-full"],["cf-button","","size","medium",1,"w-full","justify-center",3,"click"],["cfHeadIcon","","icon","plus","size","small",1,"mr-2"],["d","M72.8737 46.6708C72.8797 51.2242 71.9344 55.7286 70.0983 59.8954H9.90136C7.93485 55.4182 6.99194 50.5587 7.14132 45.671C7.2907 40.7833 8.52862 35.9904 10.7649 31.6417C13.0011 27.293 16.1794 23.4979 20.068 20.5331C23.9567 17.5682 28.4579 15.5082 33.2435 14.5032C38.0291 13.4982 42.9787 13.5734 47.7315 14.7235C52.4843 15.8736 56.9207 18.0696 60.7174 21.1513C64.5141 24.2331 67.5755 28.123 69.6785 32.5378C71.7814 36.9525 72.873 41.7808 72.8737 46.6708Z","fill","#FFECEB"],["d","M3.40918 59.8954H77.7661","stroke","#E03C31","stroke-width","1.5","stroke-miterlimit","10","stroke-linecap","round"],["d","M54.5048 23.0708V27.8708H25.4894V23.0708C25.4792 22.8964 25.5381 22.7251 25.6533 22.5938C25.7684 22.4626 25.9306 22.3819 26.1048 22.3692H53.8833C54.0585 22.3803 54.2223 22.4603 54.3387 22.5918C54.4552 22.7232 54.5149 22.8954 54.5048 23.0708Z","fill","#FFC7C3"],["d","M53.8891 67.0215H51.6553L49.8091 66.0308C49.6728 65.958 49.5206 65.92 49.366 65.92C49.2115 65.92 49.0593 65.958 48.923 66.0308L47.4891 66.7877C47.3527 66.8604 47.2006 66.8985 47.046 66.8985C46.8915 66.8985 46.7393 66.8604 46.603 66.7877L45.1691 66.0308C45.0328 65.958 44.8806 65.92 44.726 65.92C44.5715 65.92 44.4193 65.958 44.283 66.0308L42.8491 66.7877C42.7127 66.8604 42.5606 66.8985 42.406 66.8985C42.2515 66.8985 42.0993 66.8604 41.963 66.7877L40.4922 66.0308C40.3569 65.9581 40.2058 65.92 40.0522 65.92C39.8986 65.92 39.7475 65.9581 39.6122 66.0308L38.1537 66.7877C38.0185 66.8604 37.8673 66.8985 37.7137 66.8985C37.5602 66.8985 37.409 66.8604 37.2737 66.7877L35.8337 66.0308C35.6974 65.958 35.5452 65.92 35.3907 65.92C35.2361 65.92 35.0839 65.958 34.9476 66.0308L33.5137 66.7877C33.3774 66.8604 33.2252 66.8985 33.0707 66.8985C32.9161 66.8985 32.7639 66.8604 32.6276 66.7877L31.1937 66.0308C31.0574 65.958 30.9052 65.92 30.7507 65.92C30.5961 65.92 30.4439 65.958 30.3076 66.0308L28.6583 66.9046C28.5084 66.983 28.3414 67.0232 28.1722 67.0215H26.1107C25.9365 67.0089 25.7743 66.9282 25.6591 66.7969C25.544 66.6657 25.4851 66.4943 25.4953 66.32V23.0708C25.4851 22.8964 25.544 22.7251 25.6591 22.5938C25.7743 22.4626 25.9365 22.3819 26.1107 22.3692H53.8891C54.0633 22.3819 54.2255 22.4626 54.3406 22.5938C54.4558 22.7251 54.5147 22.8964 54.5045 23.0708V66.32C54.5147 66.4943 54.4558 66.6657 54.3406 66.7969C54.2255 66.9282 54.0633 67.0089 53.8891 67.0215V67.0215Z","stroke","#E03C31","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M34.8307 35.0769C34.8425 35.5327 34.6745 35.9748 34.363 36.3077C34.0474 36.6638 33.6065 36.8842 33.1322 36.9231V37.7723C33.1355 37.7908 33.1342 37.8098 33.1286 37.8277C33.1229 37.8456 33.113 37.8619 33.0998 37.8752C33.0865 37.8885 33.0702 37.8984 33.0523 37.904C33.0344 37.9097 33.0154 37.9109 32.9969 37.9077H32.4738C32.3815 37.9077 32.3322 37.8646 32.3322 37.7723V36.9231C31.694 36.8451 31.0905 36.5893 30.5907 36.1846C30.5746 36.1747 30.5608 36.1616 30.5502 36.146C30.5395 36.1305 30.5322 36.1129 30.5287 36.0943C30.5252 36.0758 30.5256 36.0567 30.53 36.0384C30.5343 36.02 30.5424 36.0027 30.5538 35.9877L30.9476 35.3723C30.9603 35.3557 30.9766 35.3423 30.9952 35.333C31.0139 35.3238 31.0345 35.319 31.0553 35.319C31.0762 35.319 31.0967 35.3238 31.1154 35.333C31.1341 35.3423 31.1504 35.3557 31.163 35.3723C31.5893 35.714 32.1127 35.9121 32.6584 35.9385C33.3538 35.9385 33.7476 35.5938 33.7476 35.0892C33.7476 33.7292 30.6707 34.2523 30.6707 32.0862C30.7036 31.6518 30.8891 31.2431 31.1943 30.9323C31.4995 30.6214 31.9047 30.4286 32.3384 30.3877V29.5385C32.3365 29.5194 32.3388 29.5001 32.3453 29.4821C32.3517 29.4641 32.3621 29.4477 32.3756 29.4341C32.3891 29.4206 32.4055 29.4102 32.4236 29.4038C32.4416 29.3973 32.4609 29.395 32.4799 29.3969H33.003C33.0953 29.3969 33.1384 29.4462 33.1384 29.5385V30.3446C33.6157 30.422 34.0734 30.5913 34.4861 30.8431C34.5031 30.8519 34.5181 30.8643 34.53 30.8793C34.5419 30.8944 34.5505 30.9118 34.5551 30.9304C34.5598 30.9491 34.5604 30.9685 34.557 30.9873C34.5536 31.0062 34.5462 31.0242 34.5353 31.04L34.1107 31.6554C34.1005 31.6729 34.0864 31.6879 34.0696 31.6993C34.0528 31.7107 34.0336 31.7181 34.0135 31.7211C33.9934 31.724 33.9729 31.7224 33.9535 31.7164C33.9341 31.7103 33.9163 31.7 33.9015 31.6862C33.5575 31.4432 33.1471 31.3122 32.7261 31.3108C32.1784 31.3108 31.7292 31.6123 31.7292 32.0492C31.7538 33.3415 34.8307 32.8431 34.8307 35.0769Z","fill","#FFC7C3"],["d","M29.7168 41.5323H50.7076","stroke","#FFC7C3","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M29.7168 45.2492H50.7076","stroke","#FFC7C3","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M29.7168 48.9662H50.7076","stroke","#FFC7C3","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M29.7168 52.6831H50.7076","stroke","#FFC7C3","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M29.7168 56.4062H50.7076","stroke","#FFC7C3","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M55.8211 75.4646C62.8631 75.4646 68.5719 69.7559 68.5719 62.7138C68.5719 55.6718 62.8631 49.9631 55.8211 49.9631C48.779 49.9631 43.0703 55.6718 43.0703 62.7138C43.0703 69.7559 48.779 75.4646 55.8211 75.4646Z","fill","#E03C31"],["d","M62.2766 66.4598L51.186 56.8562C51.0062 56.7004 50.7341 56.72 50.5784 56.8998L49.3135 58.3606C49.1577 58.5404 49.1773 58.8125 49.3571 58.9682L60.4477 68.5718C60.6276 68.7276 60.8996 68.708 61.0554 68.5282L62.3203 67.0674C62.476 66.8876 62.4565 66.6155 62.2766 66.4598Z","fill","white"],["d","M51.38 68.7247L62.16 58.7737C62.3348 58.6123 62.3457 58.3398 62.1844 58.165L60.8737 56.7451C60.7123 56.5703 60.4398 56.5594 60.265 56.7208L49.485 66.6718C49.3102 66.8331 49.2993 67.1057 49.4606 67.2805L50.7713 68.7003C50.9327 68.8752 51.2052 68.886 51.38 68.7247Z","fill","white"],["d","M27.9443 10.1908V17.0708","stroke","#E03C31","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M13.1631 25.7415H20.6031","stroke","#E03C31","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M16.6094 13.9754L22.2586 19.6308","stroke","#E03C31","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"flex","gap-x-3","justify-between"],["cf-button","","size","medium","type","secondary",1,"bg-white","justify-center","w-full",3,"click"],["cf-button","","size","medium",1,"justify-center","w-full",3,"click"],["cfHeadIcon","","icon","refresh","size","small",1,"mr-2"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._uU(2,"Th\xf4ng tin n\u1ea1p ti\u1ec1n cho \u0111\u1ea1i l\xfd b\xean d\u01b0\u1edbi. Vui l\xf2ng ki\u1ec3m tra th\xf4ng tin tr\u01b0\u1edbc khi ti\u1ebfp t\u1ee5c. "),t.qZA(),t.TgZ(3,"div",2)(4,"div",3)(5,"div",4),t._UZ(6,"img",5),t.qZA(),t.TgZ(7,"div",6)(8,"div",7),t._uU(9),t.qZA(),t.TgZ(10,"div",8),t._uU(11),t.qZA()()(),t.TgZ(12,"div",9)(13,"div",10),t._uU(14,"C\xf4ng n\u1ee3 c\u0169"),t.qZA(),t.TgZ(15,"div",11),t._uU(16),t.ALo(17,"number"),t.qZA()(),t.TgZ(18,"div",12),t._uU(19),t.ALo(20,"number"),t.qZA(),t.TgZ(21,"div",9)(22,"div",10),t._uU(23,"C\xf4ng n\u1ee3 m\u1edbi"),t.qZA(),t.TgZ(24,"div",13),t._uU(25),t.ALo(26,"number"),t.qZA()(),t.TgZ(27,"div",14)(28,"div",10),t._uU(29,"Di\u1ec5n gi\u1ea3i"),t.qZA(),t.TgZ(30,"div",15)(31,"div",16),t._uU(32),t.qZA()()()()(),t.YNc(33,y,7,0,"div",17),t.YNc(34,w,26,2,"ng-template",null,18,t.W1O),t.YNc(36,k,30,2,"ng-template",null,19,t.W1O),t.YNc(38,S,1,0,"cf-spinner",20)),2&e&&(t.xp6(6),t.Q6J("src",i.subAgentData.avatar||"https://cheapflighttest.s3.ap-southeast-1.amazonaws.com/avarta-default.jpg",t.LSH),t.xp6(3),t.Oqu(i.subAgentData.displayName||""),t.xp6(2),t.Oqu(i.subAgentData.username||""),t.xp6(5),t.hij(" ",t.lcZ(17,10,i.subAgentData.available||0)," \u0111 "),t.xp6(3),t.AsE(" ",i.subAgentData.amount>0?"+ ":"","",t.lcZ(20,12,i.subAgentData.amount||0)," \u0111 "),t.xp6(6),t.hij(" ",t.lcZ(26,14,i.subAgentData.newAmount||0)," \u0111 "),t.xp6(7),t.hij(" ",i.subAgentData.description||""," "),t.xp6(1),t.Q6J("ngIf",i.isShowBottom),t.xp6(5),t.Q6J("ngIf",i.isLoading))},dependencies:[d.ez,d.O5,d.JJ,a.AxE,a.Sm8,p.N8,p.Xq,A.OR,g.DW],encapsulation:2}),n})();var D=u(97579);let B=(()=>{class n{constructor(e,i){this.ref=i,e.registerIcons([a.UNF]),this.subAgentData=this.ref.data.subAgentData}onClose(){this.ref.close(!1)}onOk(){this.ref.close(!0)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(a.KNP),t.Y36(D.gb))},n.\u0275cmp=t.Xpm({type:n,selectors:[["confirm-deposit-balance"]],standalone:!0,features:[t.jDz],decls:6,vars:1,consts:[[1,"w-[500px]","rounded-lg","bg-neutral-white","flex","flex-col"],[1,"flex","justify-between","items-center","px-6","py-[13px]","border-b","border-b-neutral-gray-1"],[1,"text-heading-xs","text-neutral-black"],["size","medium","icon","close",1,"text-neutral-gray-4","cursor-pointer",3,"click"],[3,"subAgentData","onok","onclose"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._uU(3,"X\xe1c nh\u1eadn thay \u0111\u1ed5i c\xf4ng n\u1ee3"),t.qZA(),t.TgZ(4,"cf-icon",3),t.NdJ("click",function(){return i.onClose()}),t.qZA()(),t.TgZ(5,"brief-deposit-balance",4),t.NdJ("onok",function(){return i.onOk()})("onclose",function(){return i.onClose()}),t.qZA()()),2&e&&(t.xp6(5),t.Q6J("subAgentData",i.subAgentData))},dependencies:[d.ez,a.AxE,a.Sm8,p.N8,E],encapsulation:2}),n})();var N=u(76978),U=u(34541),I=u(15439),L=u(62331),q=u(9381);function F(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div",18)(1,"div",19),t._UZ(2,"cf-icon",20),t.TgZ(3,"div")(4,"div",21),t._uU(5,"L\u01b0u \xfd khi n\u1ea1p ti\u1ec1n"),t.qZA(),t.TgZ(6,"div",22),t._uU(7," S\u1ed1 ti\u1ec1n n\u1ea1p ch\u1ec9 mang t\xednh ch\u1ea5t t\u01b0\u1ee3ng tr\u01b0ng. C\xf4ng n\u1ee3 \u0111\u1ea1i l\xfd F3 c\xf3 th\u1ec3 d\xf9ng \u0111\u1ec3 xu\u1ea5t v\xe9 ph\u1ee5 thu\u1ed9c v\xe0o s\u1ed1 d\u01b0 c\xf4ng n\u1ee3 c\u1ee7a b\u1ea1n. N\u1ebfu c\xf4ng n\u1ee3 c\u1ee7a b\u1ea1n kh\xf4ng \u0111\u1ee7 \u0111\u1ec3 xu\u1ea5t v\xe9, \u0111\u1ea1i l\xfd F3 kh\xf4ng th\u1ec3 xu\u1ea5t v\xe9 d\xf9 s\u1ed1 d\u01b0 c\xf4ng n\u1ee3 c\u1ee7a h\u1ecd v\u1eabn \u0111\u1ee7 \u0111\u1ec3 th\u1ef1c hi\u1ec7n. "),t.qZA()()(),t.TgZ(8,"div",23)(9,"button",24),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.isShowNote=!1)}),t._uU(10," Kh\xf4ng hi\u1ec3n th\u1ecb l\u1ea1i "),t.qZA()(),t.TgZ(11,"div",25)(12,"cf-icon",26),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.isShowNote=!1)}),t.qZA()()()}}const M=function(n){return{"text-primary-1-4":n}};function J(n,s){if(1&n&&(t.TgZ(0,"div",36),t._uU(1," Vui l\xf2ng l\u1ef1a ch\u1ecdn \u0111\u1ea1i l\xfd con c\u1ee7a b\u1ea1n c\u1ea7n n\u1ea1p ti\u1ec1n \u0111\u1ec3 b\u1eaft \u0111\u1ea7u "),t.qZA()),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,M,e.subAgentControl.hasError("required")&&(e.subAgentControl.touched||e.subAgentControl.dirty)))}}function H(n,s){1&n&&(t.TgZ(0,"div",49),t._UZ(1,"cf-icon",50),t._uU(2," Ho\u1ea1t \u0111\u1ed9ng "),t.qZA())}function j(n,s){1&n&&(t.TgZ(0,"div",49),t._UZ(1,"cf-icon",51),t._uU(2," Ng\u01b0ng ho\u1ea1t \u0111\u1ed9ng "),t.qZA())}const Z=function(n){return{"!border-primary-1-5 !text-primary-1-5":n}};function V(n,s){if(1&n&&(t.TgZ(0,"div",37)(1,"div",38)(2,"div",39),t._UZ(3,"img",40),t.qZA(),t.TgZ(4,"div",41)(5,"div",16),t._uU(6),t.qZA(),t.TgZ(7,"div",42),t._uU(8),t.qZA()()(),t.TgZ(9,"div",43)(10,"div",44)(11,"div",45),t._uU(12,"S\u1ed1 d\u01b0 c\xf4ng n\u1ee3"),t.qZA(),t.TgZ(13,"div",46),t._uU(14),t.ALo(15,"replace"),t.ALo(16,"number"),t.qZA()(),t.TgZ(17,"div",44)(18,"div",45),t._uU(19,"Tr\u1ea1ng th\xe1i"),t.qZA(),t.TgZ(20,"div",47),t.YNc(21,H,3,0,"div",48),t.YNc(22,j,3,0,"div",48),t.qZA()()()()),2&n){const e=t.oxw(3);t.xp6(3),t.Q6J("src",e.subAgentData.avatar||"https://cheapflighttest.s3.ap-southeast-1.amazonaws.com/avarta-default.jpg",t.LSH),t.xp6(3),t.Oqu(e.subAgentData.displayName),t.xp6(2),t.Oqu(e.subAgentData.username),t.xp6(5),t.Q6J("ngClass",t.VKq(13,Z,e.subAgentData.available<0)),t.xp6(1),t.hij(" ",t.Dn7(15,7,t.lcZ(16,11,e.subAgentData.available||0),",",".")," \u0111 "),t.xp6(7),t.Q6J("ngIf","ACTIVE"===e.subAgentData.state),t.xp6(1),t.Q6J("ngIf","INACTIVE"===e.subAgentData.state)}}function Q(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"div",27)(2,"div",28)(3,"cf-select",29),t.NdJ("selectedChange",function(o){t.CHM(e);const r=t.oxw(2);return t.KtG(r.onSelectAgent(o))}),t.TgZ(4,"label",30),t._uU(5," \u0110\u1ea1i l\xfd con "),t.qZA()(),t.YNc(6,J,2,3,"div",31),t.YNc(7,V,23,15,"div",32),t.qZA(),t.TgZ(8,"div",33)(9,"button",34),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.onChangeStep("DEPOSIT"))}),t._uU(10," Ti\u1ebfp t\u1ee5c "),t._UZ(11,"cf-icon",35),t.qZA()()()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("status",e.subAgentControl.invalid&&(e.subAgentControl.dirty||e.subAgentControl.touched)?"error":"default")("data",e.subAgentOptions)("placeholder",e.placeholderAgentOption)("formControl",e.subAgentControl)("allowSearch",!0),t.xp6(1),t.Q6J("CfRequired",!0),t.xp6(2),t.Q6J("ngIf",!e.hasAgent),t.xp6(1),t.Q6J("ngIf",e.hasAgent),t.xp6(2),t.Q6J("disabled",e.subAgentControl.invalid)}}function O(n,s){1&n&&(t.TgZ(0,"div",49),t._UZ(1,"cf-icon",50),t._uU(2," Ho\u1ea1t \u0111\u1ed9ng "),t.qZA())}function Y(n,s){1&n&&(t.TgZ(0,"div",49),t._UZ(1,"cf-icon",51),t._uU(2," Ng\u01b0ng ho\u1ea1t \u0111\u1ed9ng "),t.qZA())}function z(n,s){if(1&n&&t._UZ(0,"cf-hint",64),2&n){const e=t.oxw(3);t.Q6J("hint",e.errorMsgAmount)}}function R(n,s){if(1&n&&t._UZ(0,"cf-hint",64),2&n){const e=t.oxw(3);t.Q6J("hint",e.errorMsgAmount)}}function K(n,s){if(1&n&&t._UZ(0,"cf-hint",64),2&n){const e=t.oxw(3);t.Q6J("hint",e.errorMsgAmount)}}function P(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"div",27)(2,"div",28)(3,"div",52)(4,"div",53)(5,"div",38)(6,"div",39),t._UZ(7,"img",40),t.qZA(),t.TgZ(8,"div",41)(9,"div",16),t._uU(10),t.qZA(),t.TgZ(11,"div",42),t._uU(12),t.qZA()()(),t.TgZ(13,"div",43)(14,"div",44)(15,"div",45),t._uU(16,"S\u1ed1 d\u01b0 c\xf4ng n\u1ee3"),t.qZA(),t.TgZ(17,"div",46),t._uU(18),t.ALo(19,"replace"),t.ALo(20,"number"),t.qZA()(),t.TgZ(21,"div",44)(22,"div",45),t._uU(23,"Tr\u1ea1ng th\xe1i"),t.qZA(),t.TgZ(24,"div",47),t.YNc(25,O,3,0,"div",48),t.YNc(26,Y,3,0,"div",48),t.qZA()()()(),t.TgZ(27,"div")(28,"cf-input-group",54)(29,"label",55),t._uU(30," S\u1ed1 ti\u1ec1n "),t.qZA(),t.TgZ(31,"cf-input-number",56),t.NdJ("ngModelChange",function(o){t.CHM(e);const r=t.oxw(2);return t.KtG(r.onAmountChange(o))}),t.qZA(),t.YNc(32,z,1,1,"cf-hint",57),t.YNc(33,R,1,1,"cf-hint",57),t.YNc(34,K,1,1,"cf-hint",57),t.qZA()(),t.TgZ(35,"div")(36,"cf-input-group",58)(37,"label",59),t._uU(38," Di\u1ec5n gi\u1ea3i "),t.qZA(),t.TgZ(39,"textarea",60),t._uU(40," "),t.qZA()()()()(),t.TgZ(41,"div",61)(42,"button",62),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.onChangeStep("VIEW"))}),t._UZ(43,"cf-icon",63),t._uU(44," Quay l\u1ea1i "),t.qZA(),t.TgZ(45,"button",34),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.onConfirm())}),t._uU(46," Ti\u1ebfp t\u1ee5c "),t._UZ(47,"cf-icon",35),t.qZA()()()()}if(2&n){const e=t.oxw(2);t.xp6(7),t.Q6J("src",e.subAgentData.avatar||"https://cheapflighttest.s3.ap-southeast-1.amazonaws.com/avarta-default.jpg",t.LSH),t.xp6(3),t.Oqu(e.subAgentData.displayName),t.xp6(2),t.Oqu(e.subAgentData.username),t.xp6(5),t.Q6J("ngClass",t.VKq(22,Z,e.subAgentData.available<0)),t.xp6(1),t.hij(" ",t.Dn7(19,16,t.lcZ(20,20,e.subAgentData.available||0),",",".")," \u0111 "),t.xp6(7),t.Q6J("ngIf","ACTIVE"===e.subAgentData.state),t.xp6(1),t.Q6J("ngIf","INACTIVE"===e.subAgentData.state),t.xp6(2),t.Q6J("status",e.amountControl.invalid&&(e.amountControl.dirty||e.amountControl.touched)?"error":"default"),t.xp6(1),t.Q6J("CfRequired",!0),t.xp6(2),t.Q6J("placeholder","Nh\u1eadp s\u1ed1 ti\u1ec1n mu\u1ed1n n\u1ea1p cho \u0111\u1ea1i l\xfd con (\u0111)")("formControl",e.amountControl),t.xp6(1),t.Q6J("ngIf",(null==e.amountControl.errors?null:e.amountControl.errors.required)&&(e.amountControl.dirty||e.amountControl.touched)),t.xp6(1),t.Q6J("ngIf",(null==e.amountControl.errors?null:e.amountControl.errors.maxAmount)&&(e.amountControl.dirty||e.amountControl.touched)),t.xp6(1),t.Q6J("ngIf",(null==e.amountControl.errors?null:e.amountControl.errors.minAmount)&&(e.amountControl.dirty||e.amountControl.touched)),t.xp6(5),t.Q6J("formControl",e.descriptionControl),t.xp6(6),t.Q6J("disabled",e.amountControl.invalid)}}function $(n,s){1&n&&t._UZ(0,"div")}const _=function(n){return{"text-neutral-gray-6":n}};function G(n,s){if(1&n&&(t.TgZ(0,"div",7),t.YNc(1,F,13,0,"div",8),t.TgZ(2,"div",9)(3,"div",10)(4,"div",11),t._uU(5," Ch\u1ecdn \u0111\u1ea1i l\xfd "),t.qZA(),t._UZ(6,"cf-icon",12),t.TgZ(7,"div",11),t._uU(8," N\u1ea1p ti\u1ec1n "),t.qZA(),t._UZ(9,"cf-icon",12),t.TgZ(10,"div",11),t._uU(11," Ho\xe0n th\xe0nh "),t.qZA()(),t.TgZ(12,"div",13)(13,"div",14),t._UZ(14,"div",15),t.TgZ(15,"div",16),t._uU(16,"Th\xf4ng tin c\u01a1 b\u1ea3n"),t.qZA()(),t.TgZ(17,"div",17),t.YNc(18,Q,12,9,"div",4),t.YNc(19,P,48,24,"div",4),t.YNc(20,$,1,0,"div",5),t.qZA()()()()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.isShowNote),t.xp6(3),t.Q6J("ngClass",t.VKq(7,_,"VIEW"===e.step)),t.xp6(3),t.Q6J("ngClass",t.VKq(9,_,"DEPOSIT"===e.step)),t.xp6(3),t.Q6J("ngClass",t.VKq(11,_,"SUCCESS"===e.step)),t.xp6(7),t.Q6J("ngSwitch",e.step),t.xp6(1),t.Q6J("ngSwitchCase","VIEW"),t.xp6(1),t.Q6J("ngSwitchCase","DEPOSIT")}}function W(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"div",65)(2,"div",66),t._UZ(3,"img",67),t.TgZ(4,"div",68)(5,"div",69),t._uU(6),t.qZA(),t._UZ(7,"div",70),t.qZA(),t.TgZ(8,"div",43)(9,"button",71),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.onCreateNew())}),t._UZ(10,"cf-icon",72),t._uU(11," T\u1ea1o m\u1edbi "),t.qZA()()()()()}if(2&n){const e=t.oxw();t.xp6(6),t.Oqu(e.titleText),t.xp6(1),t.Q6J("innerHTML",e.bodyText,t.oJD)}}function X(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"div",65)(2,"div",66),t._UZ(3,"img",73),t.TgZ(4,"div",74)(5,"div",69),t._uU(6),t.qZA(),t.TgZ(7,"div",75),t._uU(8),t.qZA()(),t.TgZ(9,"div",43)(10,"button",76),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.onCreateNew())}),t._UZ(11,"cf-icon",72),t._uU(12," T\u1ea1o m\u1edbi "),t.qZA(),t.TgZ(13,"button",71),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.onRetryCreate())}),t._UZ(14,"cf-icon",77),t._uU(15," Th\u1eed l\u1ea1i "),t.qZA()()()()()}if(2&n){const e=t.oxw();t.xp6(6),t.hij("",e.titleText," "),t.xp6(2),t.hij(" ",e.bodyText," ")}}function tt(n,s){1&n&&t._UZ(0,"div")}function et(n,s){1&n&&t._UZ(0,"cf-spinner")}let nt=(()=>{class n{constructor(e,i,o,r,c,x,it,ot){this._fb=i,this._balanceService=o,this._modal=r,this._cd=c,this._toastService=x,this._mobileDetectService=it,this._bottomSheetService=ot,this.subAgentControl=new l.NI("",l.kI.required),this.amountControl=new l.NI(null,l.kI.required),this.descriptionControl=new l.NI(""),this.subAgentOptions=[],this.subAgentData={subAgentId:"",displayName:"",username:"",state:"",available:0,maxPositive:0,avatar:""},this.depositBalanceData={amount:0,description:"",subAgentId:""},this.hasAgent=!1,this.step="VIEW",this.state="CREATE",this.isLoading=!1,this.placeholderAgentOption="Ch\u1ecdn \u0111\u1ea1i l\xfd con c\u1ea7n n\u1ea1p ti\u1ec1n",this.isShowNote=!0,this.isPositive=!0,this.today=I().format("DD/MM/YYYY"),e.registerIcons([a.toh,a.rks,a.PcQ,a.whL,a.gW0,a.TM4,a.$S,a.UNF,a.rJw]),sessionStorage.getItem("idSubAgentDeposit")&&(this.subAgentData.subAgentId=JSON.parse(sessionStorage.getItem("idSubAgentDeposit")||""),sessionStorage.removeItem("idSubAgentDeposit")),this.getListSubAgent()}getListSubAgent(){this.subAgentData.subAgentId&&(this.isLoading=!0),this._balanceService.getSubAgentDeposit().pipe((0,C.x)(()=>this.isLoading=!1)).subscribe({next:e=>{var i;if(e.success){if(this.listSubAgent=e.data,!(null===(i=this.listSubAgent)||void 0===i)&&i.length||(this.placeholderAgentOption="Kh\xf4ng c\xf3 \u0111\u1ea1i l\xfd con t\u1ed3n t\u1ea1i"),this.subAgentOptions=e.data.map(o=>({code:o.subAgentId,name:`${o.username} - ${o.displayName}`})),this._cd.detectChanges(),this.subAgentData.subAgentId){this.subAgentControl.setValue(this.subAgentData.subAgentId);const o=this.listSubAgent.find(r=>r.subAgentId===this.subAgentData.subAgentId);o?(this.hasAgent=!0,this.subAgentData={subAgentId:o.subAgentId,displayName:o.displayName,username:o.username,state:o.state,available:o.available,avatar:o.avatar,maxPositive:o.maxPositive}):this.hasAgent=!1}}else this.placeholderAgentOption="Kh\xf4ng c\xf3 \u0111\u1ea1i l\xfd con t\u1ed3n t\u1ea1i"},error:()=>{this.placeholderAgentOption="Kh\xf4ng c\xf3 \u0111\u1ea1i l\xfd con t\u1ed3n t\u1ea1i",this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 l\u1ea5y th\xf4ng tin \u0111\u1ea1i l\xfd con. Vui l\xf2ng th\u1eed l\u1ea1i!",sticky:!0})}})}onSelectAgent(e){const i=this.listSubAgent.find(o=>o.subAgentId===e.code);i?(this.hasAgent=!0,this.subAgentData={subAgentId:i.subAgentId,displayName:i.displayName,username:i.username,state:i.state,available:i.available,avatar:i.avatar,maxPositive:i.maxPositive},this.amountValid=this.subAgentData.maxPositive-this.subAgentData.available):this.hasAgent=!1}generateDescription(e){this.descriptionControl.setValue(`${e?"N\u1ea1p ti\u1ec1n":"Tr\u1eeb ti\u1ec1n"} cho \u0111\u1ea1i l\xfd ${this.subAgentData.displayName} (${this.subAgentData.username}), ${this.today}`)}onChangeStep(e){this.step=e,"DEPOSIT"===this.step&&this.generateDescription(!0)}onConfirm(){const e=Object.assign(Object.assign({},this.subAgentData),{amount:this.amountControl.value,newAmount:this.amountControl.value+this.subAgentData.available,description:this.descriptionControl.value||""});if(this._mobileDetectService.isMobile()){const i=this._bottomSheetService.open(E,{headerTitle:"X\xe1c nh\u1eadn thay \u0111\u1ed5i c\xf4ng n\u1ee3",containerFullHeigh:!0,rightButtonIcon:"",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",restoreFocus:!1,data:{subAgentData:e}});i.containerInstance._leftButtonClick.subscribe(()=>{i.dismiss()}),i.afterDismissed().subscribe(o=>{o&&(this.onCreateNew(),i.dismiss()),typeof o>"u"&&(i.dismiss(),this.amountControl.reset(),this.subAgentData.subAgentId&&(this.isLoading=!0),this._balanceService.getSubAgentDeposit().pipe((0,C.x)(()=>this.isLoading=!1)).subscribe({next:r=>{if(r.success){this.listSubAgent=r.data;const c=this.listSubAgent.find(x=>this.subAgentData.subAgentId===x.subAgentId);c&&(this.subAgentData={subAgentId:c.subAgentId,displayName:c.displayName,username:c.username,state:c.state,available:c.available,avatar:c.avatar,maxPositive:c.maxPositive},this.amountValid=this.subAgentData.maxPositive-this.subAgentData.available)}}}))})}else this._modal.open(B,{subAgentData:e}).afterClosed$.subscribe(o=>{o.data&&this.depoitBalance()})}depoitBalance(){this.isLoading=!0,this._balanceService.depositSubAgent({subAgentId:this.subAgentData.subAgentId||"",amount:this.amountControl.value||0,description:this.descriptionControl.value||""}).pipe((0,C.x)(()=>this.isLoading=!1)).subscribe({next:i=>{i.success?(this.state="SUCCESS",this.titleText="Th\xeam c\xf4ng n\u1ee3 n\u1ea1p ti\u1ec1n th\xe0nh c\xf4ng!",this.bodyText=`C\xf4ng n\u1ee3 n\u1ea1p ti\u1ec1n cho \u0111\u1ea1i l\xfd <strong>${this.subAgentData.username} - ${this.subAgentData.displayName}</strong> \u0111\xe3 \u0111\u01b0\u1ee3c th\xeam th\xe0nh c\xf4ng.\n S\u1ed1 d\u01b0 c\xf4ng n\u1ee3 c\u1ee7a \u0111\u1ea1i l\xfd \u0111\xe3 \u0111\u01b0\u1ee3c c\u1eadp nh\u1eadt.`):(this.state="ERROR",this.titleText="Th\xeam c\xf4ng n\u1ee3 n\u1ea1p ti\u1ec1n th\u1ea5t b\u1ea1i!",this.bodyText="C\xf3 l\u1ed7i x\u1ea3y ra trong qu\xe1 tr\xecnh th\xeam c\xf4ng n\u1ee3 n\u1ea1p ti\u1ec1n. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c t\u1ea1o m\u1edbi t\u1eeb \u0111\u1ea7u.")},error:()=>{this.state="ERROR",this.titleText="Th\xeam c\xf4ng n\u1ee3 n\u1ea1p ti\u1ec1n th\u1ea5t b\u1ea1i!",this.bodyText="C\xf3 l\u1ed7i x\u1ea3y ra trong qu\xe1 tr\xecnh th\xeam c\xf4ng n\u1ee3 n\u1ea1p ti\u1ec1n. Vui l\xf2ng th\u1eed l\u1ea1i ho\u1eb7c t\u1ea1o m\u1edbi t\u1eeb \u0111\u1ea7u."}})}onCreateNew(){this.state="CREATE",this.step="VIEW",this.hasAgent=!1,this.subAgentControl.reset(),this.amountControl.reset(),this.descriptionControl.reset(),this.subAgentData={subAgentId:"",displayName:"",username:"",state:"",available:0,avatar:"",maxPositive:0},this.getListSubAgent()}onRetryCreate(){this.state="CREATE",this.depoitBalance()}onAmountChange(e){let i=null;if(e>0){if(this.generateDescription(!0),this.amountControl.value>this.amountValid){i="maxAmount";const o=new Intl.NumberFormat("vi-VN",{style:"currency",currency:"VND"}).format(this.subAgentData.maxPositive),r=new Intl.NumberFormat("vi-VN",{style:"currency",currency:"VND"}).format(this.amountValid);this.errorMsgAmount=`V\u01b0\u1ee3t qu\xe1 s\u1ed1 d\u01b0 c\xf4ng n\u1ee3 sau khi n\u1ea1p t\u1ed1i \u0111a l\xe0 ${o}. S\u1ed1 ti\u1ec1n n\u1ea1p t\u1ed1i \u0111a l\xe0 ${r}`}}else if(e<0){if(this.generateDescription(!1),Math.abs(e)>this.subAgentData.available){this.isPositive=!1,i="minAmount";const o=new Intl.NumberFormat("vi-VN",{style:"currency",currency:"VND"}).format(-this.subAgentData.available);this.errorMsgAmount=`S\u1ed1 ti\u1ec1n ph\u1ea3i l\u1edbn h\u01a1n ho\u1eb7c b\u1eb1ng ${o}`}}else i="required",this.errorMsgAmount="Vui l\xf2ng nh\u1eadp s\u1ed1 ti\u1ec1n mu\u1ed1n n\u1ea1p";this.amountControl.setErrors(i?{[i]:!0}:null)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(a.KNP),t.Y36(l.qu),t.Y36(v.mO),t.Y36(D.oE),t.Y36(t.sBO),t.Y36(L.BX),t.Y36(q.L),t.Y36(g.a2))},n.\u0275cmp=t.Xpm({type:n,selectors:[["deposit-balance-sub-agent"]],standalone:!0,features:[t.jDz],decls:8,vars:5,consts:[[1,"flex","justify-center","pt-8","pb-4","px-[30px]"],[1,"w-[1000px]","max-w-[1000px]"],[1,"w-full","h-full",3,"ngSwitch"],["class"," flex flex-col gap-y-8 md:flex-col-reverse",4,"ngSwitchCase"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngIf"],[1,"flex","flex-col","gap-y-8","md:flex-col-reverse"],["class","py-3 px-4 flex gap-x-4 bg-functional-1-1",4,"ngIf"],[1,"w-full","h-full","flex","flex-col","gap-y-5"],[1,"flex","gap-x-2"],[1,"text-body-md-short","text-neutral-gray-4",3,"ngClass"],["icon","chevron_right","size","small",1,"text-neutral-gray-4"],[1,"w-full","h-full","flex","flex-col","gap-y-4"],[1,"flex","gap-x-[20px]"],[1,"w-1","bg-[#fcb40a]"],[1,"text-heading-md"],[3,"ngSwitch"],[1,"py-3","px-4","flex","gap-x-4","bg-functional-1-1"],[1,"flex","gap-x-2","items-center","md:items-start"],["icon","info","size","medium",1,"text-secondary-2-4"],[1,"text-express-md"],[1,"text-body-md-short"],[1,"flex","items-center","md:hidden"],["cf-button","","size","medium","type","secondary",1,"bg-white","w-[160px]",3,"click"],[1,"hidden","md:block"],["icon","close","size","small",1,"text-secondary-2-4",3,"click"],[1,"flex","flex-col","gap-y-8"],[1,"p-6","bg-neutral-white","rounded","shadow-cf-md"],["textField","name","valueField","code",1,"!max-w-none","w-full",3,"status","data","placeholder","formControl","allowSearch","selectedChange"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5",3,"CfRequired"],["class","text-body-sm mt-1.5",3,"ngClass",4,"ngIf"],["class","py-[20px] px-6 mt-4 border border-neutral-gray-2 flex md:flex-col md:gap-y-5 md:border-0 md:shadow-cf-info-card justify-between bg-white rounded",4,"ngIf"],[1,"flex","justify-end","md:fixed","md:bottom-0","md:left-0","md:w-screen","md:bg-white","md:shadow-cf-large-top","md:p-4","md:items-center","md:z-10"],["cf-button","","size","medium",1,"md:!w-full","md:items-center","md:justify-center",3,"disabled","click"],["icon","chevron_right","size","small",1,"ml-2.5"],[1,"text-body-sm","mt-1.5",3,"ngClass"],[1,"py-[20px]","px-6","mt-4","border","border-neutral-gray-2","flex","md:flex-col","md:gap-y-5","md:border-0","md:shadow-cf-info-card","justify-between","bg-white","rounded"],[1,"flex","items-center","gap-x-[20px]"],[1,"w-[64px]","h-[64px]","overflow-hidden","relative"],["alt","\u1ea2nh \u0110\u1ea1i Di\u1ec7n",1,"object-cover","h-full","w-full","rounded-full",3,"src"],[1,"flex","flex-col"],[1,"text-body-lg"],[1,"flex","gap-x-3"],[1,"flex","flex-col","gap-y-2","justify-between","items-center"],[1,"text-express-sm"],[1,"text-express-md","rounded","py-1","px-3","border","border-functional-2-3","text-functional-2-3",3,"ngClass"],[1,"rounded","py-1","px-3","border","border-neutral-gray-2"],["class","text-body-md flex items-center",4,"ngIf"],[1,"text-body-md","flex","items-center"],["icon","circle_check","size","small",1,"text-secondary-1-4","mr-2.5"],["icon","circle_remove","size","small",1,"mr-2.5"],[1,"flex","flex-col","gap-y-4","rounded"],[1,"flex","justify-between","py-[20px]","px-6","border","border-neutral-gray-2","rounded","md:flex-col","md:gap-y-4","md:border-0","md:shadow-cf-info-card"],[1,"grow-[400]","!w-full",3,"status"],["cfLabel","",1,"text-express-sm","text-black",3,"CfRequired"],["size","medium",3,"placeholder","formControl","ngModelChange"],["cfHint","",3,"hint",4,"ngIf"],[1,"!w-full"],["cfLabel","",1,"text-express-sm","text-black"],["rows","7","cf-input","","size","medium","placeholder","Nh\u1eadp di\u1ec5n gi\u1ea3i",3,"formControl"],[1,"flex","justify-between","md:fixed","md:bottom-0","md:left-0","md:w-screen","md:bg-white","md:shadow-cf-large-top","md:p-4","md:items-center","md:justify-between","md:gap-x-4","md:z-10"],["cf-button","","size","medium","type","secondary",1,"bg-white","md:!w-full","md:items-center","md:justify-center",3,"click"],["cfHeadIcon","","icon","arrow_left","size","small",1,"mr-2"],["cfHint","",3,"hint"],[1,"p-x","px-40","w-full","h-full"],[1,"flex","flex-col","justify-center","items-center","gap-y-6","bg-white","rounded","p-8"],["src","assets/images/wow-factor.svg"],[1,"flex","flex-col","items-center","gap-y-4"],[1,"text-heading-md","text-neutral-black"],[1,"text-center","text-body-md-long",3,"innerHTML"],["cf-button","","size","medium",3,"click"],["cfHeadIcon","","icon","plus","size","small",1,"mr-2"],["src","assets/images/error.svg"],[1,"flex","flex-col","gap-y-4","text-center"],[1,"text-center","text-body-md-long"],["cf-button","","size","medium","type","secondary",1,"bg-white",3,"click"],["cfHeadIcon","","icon","refresh","size","small",1,"mr-2"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,G,21,13,"div",3),t.YNc(4,W,12,2,"div",4),t.YNc(5,X,16,2,"div",4),t.YNc(6,tt,1,0,"div",5),t.qZA()()(),t.YNc(7,et,1,0,"cf-spinner",6)),2&e&&(t.xp6(2),t.Q6J("ngSwitch",i.state),t.xp6(1),t.Q6J("ngSwitchCase","CREATE"),t.xp6(1),t.Q6J("ngSwitchCase","SUCCESS"),t.xp6(1),t.Q6J("ngSwitchCase","ERROR"),t.xp6(2),t.Q6J("ngIf",i.isLoading))},dependencies:[d.ez,d.mk,d.O5,d.RF,d.n9,d.ED,d.JJ,l.u5,l.Fj,l.JJ,l.UX,l.oH,a.AxE,a.Sm8,b.q,p.N8,p.Xq,N.AS,U.C,h.j$,h.ND,h.BN,h.lt,A.OR,f.m,g.DW],encapsulation:2}),n})()},34541:(T,m,u)=>{u.d(m,{C:()=>g});var d=u(36895),l=u(94650);let g=(()=>{class p{constructor(a,h,b){this.elementRef=a,this.renderer=h,this.document=b}set CfRequired(a){if(a){const h=this.document.createElement("span");h.innerHTML=" (*)",h.className="text-primary-1-4 text-espressive-sm",this.renderer.appendChild(this.elementRef.nativeElement,h)}}}return p.\u0275fac=function(a){return new(a||p)(l.Y36(l.SBq),l.Y36(l.Qsj),l.Y36(d.K0))},p.\u0275dir=l.lG2({type:p,selectors:[["","CfRequired",""]],inputs:{CfRequired:"CfRequired"},standalone:!0}),p})()}}]);