1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"btse@5f19a485"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fc8e93aa-4338-4c9b-b83e-04e3e14650f8",e._sentryDebugIdIdentifier="sentry-dbid-fc8e93aa-4338-4c9b-b83e-04e3e14650f8")}catch(a){}}();import{ai as e,bC as t,bD as a,r as s,a$ as n,aE as i,aF as r,aI as o,ar as l,ak as c,a9 as u,am as d,ab as p,aK as m,as as g,ae as y,af as h,al as f,a5 as v,a6 as k,aM as S,aa as D,ac as C,aN as w,aL as b,a8 as T,ag as A,ad as _,aU as R,aW as E,bE as I,aX as F,bJ as L,B as N,b6 as x,ah as B,aq as P,bd as O,b7 as U,h as M,ao as $,an as V,aY as H,aC as W,aO as z,be as G,aV as K,ap as Y,aS as j,b5 as q,aH as Q}from"./PmfENnFs.js";import{B as J,C as X,f as Z,g as ee,u as te,F as ae,h as se,G as ne,i as ie,j as re,k as oe,l as le,m as ce,R as ue,n as de,o as pe,s as me,V as ge,p as ye,q as he,c as fe,t as ve,v as ke,w as Se,x as De,y as Ce,z as we,D as be,W as Te,E as Ae,H as _e,S as Re,N as Ee,J as Ie,K as Fe,L as Le,M as Ne,O as xe,Q as Be,T as Pe,U as Oe,X as Ue,Y as Me,Z as $e,_ as Ve,$ as He,a0 as We,a1 as ze,a2 as Ge,a3 as Ke,a4 as Ye,a5 as je,a6 as qe,a7 as Qe,a8 as Je,a9 as Xe,aa as Ze,ab as et,ac as tt,ad as at,ae as st,af as nt,ag as it,ah as rt,ai as ot,aj as lt,ak as ct,al as ut,am as dt,an as pt,ao as mt,ap as gt,aq as yt,ar as ht,as as ft,P as vt,at as kt,au as St,av as Dt,aw as Ct,ax as wt,ay as bt,az as Tt,aA as At,aB as _t}from"./BhKTELSe.js";import{_ as Rt}from"./CRPzHAml.js";const Et={CONVERT:"CONVERT",TOP_UP:"TOP_UP"},It={DEPOSIT:"DEPOSIT",WITHDRAW:"WITHDRAW"},Ft={AUTOTRADER_UPDATED:"AUTOTRADER_UPDATED"},Lt={FAVORITE_STRATEGIES:"FAVORITE_STRATEGIES",BASE_CURRENCY:"BASE_CURRENCY"},Nt={APK:"APK",APP_STORE:"AppStore",GOOGLE_PLAY:"GooglePlay",IPA:"IPA",TEST_FLIGHT:"Testflight"},xt=Rt(e({__name:"InputWithCurrencyDropDown",props:t({inputComponent:{default:ee},id:{default:""},maxBtnId:{default:""},currencyDropdownIdPrefix:{default:""},currencyDropdownIdSuffix:{default:""},placeholder:{default:""},isError:{type:Boolean,default:!1},decimalLimit:{default:0},isInputDisabled:{type:Boolean,default:!1},integerMultiplier:{default:0},isShowMaxBtn:{type:Boolean,default:!1},isMaxBtnDisable:{type:Boolean,default:!1},walletAction:{default:""},isFilterShown:{type:Boolean,default:!1},sortingStrategy:{type:[Function,null],default:null},isCurrencyDropdownDisabled:{type:Boolean,default:!1},appliedCurrencyList:{default:null},excludedCurrencyList:{default:()=>[]},isOnlyListingUserOwnedCurrencies:{type:Boolean,default:!1},showBalance:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},barTextSize:{default:Z.NORMAL},currencyAliasMap:{default:()=>({})},isSearchShown:{type:Boolean,default:!0},showI18nAssetName:{type:Boolean,default:!1},isHideDropdown:{type:Boolean,default:!1},isAppendListToBody:{type:Boolean,default:!1}},{selectedCurrency:{required:!0},selectedCurrencyModifiers:{}}),emits:t(["maxClick","onCurrencyChange"],["update:selectedCurrency"]),setup(e,{expose:t,emit:v}){const k=a(e,"selectedCurrency"),S=e,D=v,C=s({}),w=n("inputRef");async function b(){if(await o(),!w.value)return;const{left:e,width:t}=w.value.$el.getBoundingClientRect();C.value={"--dropdown-list-offset-y":"16px","--dropdown-list-max-width":"auto",width:`${t}px`,left:`${e}px`}}function T(){w.value&&"function"==typeof w.value.onRadioClick&&w.value.onRadioClick(),D("maxClick")}return i((()=>{S.isAppendListToBody&&(b(),window.addEventListener("resize",b))})),r((()=>{window.removeEventListener("resize",b)})),t({focus:function(){var e,t;null==(t=null==(e=w.value)?void 0:e.focus)||t.call(e)}}),(e,t)=>{const a=l("BaseButton");return u(),c(f(e.inputComponent),{id:e.id,ref_key:"inputRef",ref:w,class:"input-with-currency-wrap",textAlign:"right",isPrice:"",hasInnerGap:"",hasFocusStyle:"",isBrandNewStyle:"",placeholder:e.placeholder,isError:e.isError,decimalLimit:e.decimalLimit,disabled:e.isInputDisabled,integerMultiplier:e.integerMultiplier,readonly:e.readonly},{suffix:d((()=>
1[e.isShowMaxBtn?(u(),c(a,{key:0,id:e.maxBtnId,class:"max-button",size:g(J).S,disabled:e.isMaxBtnDisable,onClick:T},{default:d((()=>[y(h(e.$t("t.max.uppercase")),1)])),_:1},8,["id","size","disabled"])):p("",!0),m(X,{selectedCurrency:k.value,"onUpdate:selectedCurrency":t[0]||(t[0]=e=>k.value=e),class:"currency-dropdown",walletAction:e.walletAction,idPrefix:e.currencyDropdownIdPrefix,idSuffix:e.currencyDropdownIdSuffix,isFilterShown:e.isFilterShown,sortingStrategy:e.sortingStrategy,disabled:e.isCurrencyDropdownDisabled,appliedCurrencyList:e.appliedCurrencyList,excludedCurrencyList:e.excludedCurrencyList,isOnlyListingUserOwnedCurrencies:e.isOnlyListingUserOwnedCurrencies,showBalance:e.showBalance,barTextSize:e.barTextSize,currencyAliasMap:e.currencyAliasMap,isSearchShown:e.isSearchShown,isAppendListToBody:e.isAppendListToBody,customListStyles:C.value,isHideDropdown:e.isHideDropdown,hasBarDivider:"",onOnChange:t[1]||(t[1]=e=>D("onCurrencyChange",e))},null,8,["selectedCurrency","walletAction","idPrefix","idSuffix","isFilterShown","sortingStrategy","disabled","appliedCurrencyList","excludedCurrencyList","isOnlyListingUserOwnedCurrencies","showBalance","barTextSize","currencyAliasMap","isSearchShown","isAppendListToBody","customListStyles","isHideDropdown"])])),_:1},8,["id","placeholder","isError","decimalLimit","disabled","integerMultiplier","readonly"])}}}),[["__scopeId","data-v-e574fba2"]]),Bt={class:"kyc-verify-body"},Pt=Rt(e({__name:"FullKycSectionMessage",props:{source:{default:""}},setup(e){const t=te(),{lang:a,accountInfo:s}=v(t),n=e,i=k((()=>n.source?{posthog:{name:"verification_notify_view",props:{entry_channel:n.source}}}:{})),r=k((()=>{var e;return(null==(e=s.value)?void 0:e.kycNotice)===ae.limited}));return(e,t)=>{const s=l("RouterLink"),n=S("track");return r.value?(u(),c(ie,{key:0,class:"kyc-verify",genre:g(ne).WARNING},{default:d((()=>[D("div",Bt,[C(e.$slots,"default",{},void 0,!0),D("div",null,[w((u(),c(s,{class:"kyc-verify-link",to:{name:g(se).VERIFICATION,params:{lang:g(a)}}},{default:d((()=>[D("span",null,h(e.$t("t.verify")),1)])),_:1},8,["to"])),[[n,i.value]])])])])),_:3},8,["genre"])):p("",!0)}}}),[["__scopeId","data-v-e2c991e2"]]),Ot={name:"IconCheck"},Ut=Object.assign(Ot,{props:{width:{type:[String,Number],default:16},height:{type:[String,Number],default:16}},setup:e=>(t,a)=>(u(),c(re,{width:e.width,height:e.height,viewBox:"0 0 16 16","aria-label":"Check Icon","fill-rule":"evenodd"},{default:d((()=>a[0]||(a[0]=[D("path",{d:"M11.516 2.267c.226.158.28.47.122.696-.158.226-.47.281-.696.123-2.714-1.901-6.456-1.241-8.356 1.473-1.901 2.715-1.241 6.456 1.473 8.357 2.715 1.9 6.456 1.24 8.357-1.474.591-.845.947-1.807 1.052-2.81.03-.274.275-.473.55-.444.274.028.474.274.445.549-.123 1.17-.539 2.294-1.228 3.279-2.218 3.166-6.583 3.936-9.75 1.719C.32 11.517-.45 7.152 1.768 3.985 3.984.82 8.349.05 11.516 2.268zm3.881.876c.176.172.198.44.066.637l-.058.07-7.035 7.198c-.04.041-.082.08-.126.116-.603.49-1.47.435-2.008-.104l-.102-.114L3.66 7.904c-.174-.214-.142-.53.072-.703.19-.155.46-.147.64.007l.064.065 2.473 3.042c.175.215.49.247.704.073l.042-.039 7.035-7.198c.193-.197.51-.201.707-.008z"},null,-1)]))),_:1,__:[0]},8,["width","height"]))});const Mt=Rt({name:"IconSwitch",components:{Icon:re}},[["render",function(e,t,a,s,n,i){const r=l("Icon");return u(),c(r,{"aria-label":"switch",width:"30",height:"30",fill:"none",viewBox:"0 0 30 30"},{default:d((()=>t[0]||(t[0]=[D("path",{fill:"currentColor","fill-rule":"evenodd",d:"M17.916 2.464c.441-.54 1.238-.62 1.779-.181l6.822 5.534 1.286 1.043-1.35.96-6.823 4.842c-.568.403-1.358.271-1.763-.295-.405-.566-.273-1.353.296-1.757L22.2 9.745H6.326c-.699 0-1.265-.564-1.265-1.26 0-.695.566-1.259 1.265-1.259h15.458l-3.686-2.99c-.541-.44-.623-1.233-.182-1.772zM7.597 21.663l3.911 3.172c.542.44.623 1.233.182 1.772-.44.54-1.237.62-1.779.181L3.09 21.255l-1.286-1.043 1.351-.959 6.822-4.842c.569-.404 1.358-.272 1.764.294.405.567.272 1.353-.296 1.757l-3.78 2.683h16.108c.698 0 1.264.564 1.264 1.26 0 .695-.566 1.259-1.264 1.259H7.597z","clip-rule":"evenodd"},null,-1)]))),_:1,__:[0]})}]]),$t={name:"SuccessDialog",components:{BrandDialog:le,IconSuccess:oe},props:{data:{type:Object,default:()=>({})},closeAction:{type:Function,default:()=>{}},successText:{type:String,default:"t.ok"},isShowConvertMore:{type:Boolean,default:!1}},emits:["update:isShow","convertMore"],computed:{...b(["currencyMap","lang","isApp"]),toAmount(){return this.$filters.formatNumber(this.data.settlementAmount,"max")},fromAmount(){return this.temporarilyDecimalNumber(this.data.amount)},rate(){return this.temporarilyDecimalNumber(this.data.rate)},convertRateText(){const{isOTCOrder:e,settlementCurrency:t,amountCurrency:a}=this.data;return`1 ${e?t:a} = ${this.rate}`},rateTokens(){return this.convertRateText.split(" ")},rateCurrency(){return this.data.isOTCOrder?this.data.amountCurrency:this.data.settlementCurrency}},methods:{currencyType(e){var t;return(null==(t=this.currencyMap[e])?void 0:t.isFiat)?"fiat":"coin"},close(){this.data.isOTCOrder?this.closeAction():this.$emit("update:isShow",!1)},handleConvertMore(){this.close(),this.$emit("convertMore")},goToHistory(){this.isApp&&ce({currency:this.data.amountCurrency,type:Et.CONVERT})||(this.$router.push({name:this.data.isOTCOrder?"spotTradeHistory":ue.WALLET_SPOT_HISTORY,params:{lang:this.lang}}),this.close())},temporarilyDecimalNumber(e=""){const t="number"==typeof e?e.toString():e;let a=t.replace(/^\d*\./g,"").length;return a>4&&(a="48"),this.$filters.formatNumber(t,a)}}},Vt={class:"success-dialog__body"},Ht={class:"body__title"},Wt={class:"body__subtitle"},zt={class:"body__content"}
1,Gt={class:"summary-block"},Kt={class:"summary-item flex-box items-center justify-between"},Yt={class:"flex-box items-center"},jt={class:"summary-highlight"},qt={class:"summary-suffix"},Qt={class:"summary-item flex-box items-center justify-between"},Jt={class:"flex-box items-center"},Xt={class:"summary-suffix"},Zt={class:"summary-item flex-box items-center justify-end"},ea={class:"flex-box items-center"},ta={class:"rate-text"},aa={class:"summary-suffix"};const sa=Rt($t,[["render",function(e,t,a,s,n,i){const r=l("IconSuccess"),o=l("BrandButton"),g=l("BrandDialog");return u(),c(g,{class:"success-dialog",width:e.isMobile?"375px":"560px",isBrandNewStyle:!0,idPrefix:"convert_success_dialog",onClosed:i.close},{header:d((()=>[y(h(a.data.title||e.$t("wallets.convert.buttonConvert")),1)])),body:d((()=>[D("div",Vt,[m(r),D("p",Ht,h(e.$t("msg.success")),1),D("p",Wt,h(e.$t("home.convert.successDialog.subtitle")),1),D("p",zt,[y(h(e.$t("account.deviceActivity.buttonText2"))+" ",1),D("span",{onClick:t[0]||(t[0]=(...e)=>i.goToHistory&&i.goToHistory(...e))},h(e.$t("wallets.transaction.history")),1)]),D("div",Gt,[D("div",Kt,[D("div",null,h(a.data.actionText||e.$t("t.to")),1),D("div",Yt,[D("span",jt,h(i.toAmount),1),D("span",qt,h(a.data.settlementCurrency),1)])]),D("div",Qt,[D("div",null,h(a.data.totalPayText||e.$t("t.from")),1),D("div",Jt,[D("span",{class:A({"summary-highlight":a.data.isOTCOrder})},h(i.fromAmount),3),D("span",Xt,h(a.data.amountCurrency),1)])]),D("div",Zt,[D("div",ea,[D("span",ta,[(u(!0),T(_,null,R(i.rateTokens,((e,t)=>(u(),T("span",{key:t},h(e),1)))),128))]),D("span",aa,h(i.rateCurrency),1)])])]),m(o,{class:"body__button",type:"primary",onClick:i.close},{default:d((()=>[y(h(e.$t(a.successText)),1)])),_:1},8,["onClick"]),a.isShowConvertMore?(u(),T("div",{key:0,class:"more-button",onClick:t[1]||(t[1]=(...e)=>i.handleConvertMore&&i.handleConvertMore(...e))},h(e.$t("t.convertMore")),1)):p("",!0)])])),_:1},8,["width","onClosed"])}],["__scopeId","data-v-b6eee94f"]]),na={name:"SuccessDialog",components:{BrandDialog:le,IconFlashFail:de},emits:["update:isShow"],computed:{...b(["lang"]),contactUsLink(){return pe(this.lang,"NEW_TICKET")}},methods:{close(){this.$emit("update:isShow",!1)}}},ia={class:"fail-dialog__body"},ra={class:"body__title"},oa={class:"text__link"},la=["href"];const ca=Rt(na,[["render",function(e,t,a,s,n,i){const r=l("IconFlashFail"),o=l("i18n-t"),p=l("BrandButton"),g=l("BrandDialog");return u(),c(g,{class:"fail-dialog",width:e.isMobile?"375px":"560px",isBrandNewStyle:!0,idPrefix:"convert_fail_dialog",onClosed:i.close},{header:d((()=>[y(h(e.$t("t.convert")),1)])),body:d((()=>[D("div",ia,[m(r,{class:"body__icon"}),D("p",ra,h(e.$t("home.convert.failDialog.title")),1),m(o,{keypath:"home.convert.failDialog.content",class:"body__text",tag:"p"},{tryAgain:d((()=>[D("a",oa,h(e.$t("home.convert.failDialog.tryAgain")),1)])),contact:d((()=>[D("a",{class:"text__link",href:i.contactUsLink},h(e.$t("t.contact")),9,la)])),_:1})])])),footer:d((()=>[m(p,{class:"footer__button",type:"primary",onClick:i.close},{default:d((()=>[y(h(e.$t("t.ok")),1)])),_:1},8,["onClick"])])),_:1},8,["width","onClosed"])}],["__scopeId","data-v-ea59eead"]]),ua="/static/img/CFBWAQWT.png",da={name:"UnifiedWalletAutomaticallyUpgradeDialog",components:{BrandDialog:le},data:()=>({ImageUnifiedWallet:ua}),computed:{...b(["lang"]),unifiedWalletUserGuideLink(){return pe(this.lang,"UNIFIED_WALLET_USER_GUIDE")}},methods:{...I(["setShowUnifiedWalletUpgradeDialog"]),...E(["updateIsUnifiedWalletAutomaticallyUpgradeViewed"]),onClose(){me(ge.WALLET_FORCE_UPGRADE_NOTICE),this.updateIsUnifiedWalletAutomaticallyUpgradeViewed()},onUpgradeNow(){this.setShowUnifiedWalletUpgradeDialog(!0),this.onClose()}}},pa={class:"dialog-body-wrap"},ma={class:"content-container"},ga=["src"],ya={class:"upgrade-title"},ha={class:"upgrade-description"},fa={class:"user-guide-block"},va=["href"];const ka=Rt(da,[["render",function(e,t,a,s,n,i){const r=l("BaseButton"),o=l("BrandDialog");return u(),c(o,{class:A(["unified-wallet-automatically-upgrade-dialog",{"is-mobile":e.isMobile}]),width:"560px",height:e.isMobile?"100%":"auto",fullStyle:e.isMobile,isBrandNewStyle:"",onClosed:i.onClose},{body:d((()=>[D("div",pa,[D("div",ma,[D("img",{class:"unified-wallet-image",src:n.ImageUnifiedWallet},null,8,ga),D("div",ya,h(e.$t("wallet.upgradeUnifiedWalletBanner.title")),1),D("div",ha,h(e.$t("wallet.upgradeUnifiedWalletDialog.automatically.description")),1)]),D("div",fa,[y(h(e.$t("t.view"))+" ",1),i.unifiedWalletUserGuideLink?(u(),T("a",{key:0,target:"_blank",href:i.unifiedWalletUserGuideLink,class:"user-guide-link"},h(e.$t("wallet.upgradeUnifiedWalletDialog.userGuide")),9,va)):p("",!0)]),m(r,{class:"primary block action-button",size:"large",onClick:i.onUpgradeNow},{default:d((()=>[y(h(e.$t("t.upgradeNow")),1)])),_:1},8,["onClick"])])])),_:1},8,["class","height","fullStyle","onClosed"])}],["__scopeId","data-v-22e3cdb9"]]),{enableUpgradeUnifiedWalletForceUpdatePhase1:Sa}=ye,Da={CONVERT_SUCCESS:"CONVERT_SUCCESS",CONVERT_FAIL:"CONVERT_FAIL"},Ca={name:"CommonDialogGroup",components:{ConvertSuccessDialog:sa,ConvertFailDialog:ca,UnifiedWalletAutomaticallyUpgradeDialog:ka},provide(){return{gl_dialogData:this.dialogData}},props:{successText:{type:String,default:"t.ok"},isShowConvertMore:{type:Boolean,default:!1}},emits:["convertMore"],data:()=>({enableUpgradeUnifiedWalletForceUpdatePhase1:Sa,dialogName:Da,dialogData:{isShow:{[Da.CONVERT_SUCCESS]:!1,[Da.CONVERT_FAIL]:!1},data:{}}}),computed:{...b(["isUnifiedWalletAutomaticallyUpgradeViewed"]),...F(["isSubAccount","
1isUnifiedWallet","isEnableUnifiedWalletUpgrade"]),isOverviewPage(){return this.$route.name===ue.WALLET_OVERVIEW}}},wa={class:"common-dialog-group"};const ba=Rt(Ca,[["render",function(e,t,a,s,n,i){const r=l("ConvertSuccessDialog"),o=l("ConvertFailDialog"),d=l("UnifiedWalletAutomaticallyUpgradeDialog");return u(),T("div",wa,[C(e.$slots,"default"),n.dialogData.isShow[n.dialogName.CONVERT_SUCCESS]?(u(),c(r,{key:0,isShow:n.dialogData.isShow[n.dialogName.CONVERT_SUCCESS],"onUpdate:isShow":t[0]||(t[0]=e=>n.dialogData.isShow[n.dialogName.CONVERT_SUCCESS]=e),data:n.dialogData.data,successText:a.successText,isShowConvertMore:a.isShowConvertMore,onConvertMore:t[1]||(t[1]=t=>e.$emit("convertMore"))},null,8,["isShow","data","successText","isShowConvertMore"])):p("",!0),n.dialogData.isShow[n.dialogName.CONVERT_FAIL]?(u(),c(o,{key:1,isShow:n.dialogData.isShow[n.dialogName.CONVERT_FAIL],"onUpdate:isShow":t[2]||(t[2]=e=>n.dialogData.isShow[n.dialogName.CONVERT_FAIL]=e)},null,8,["isShow"])):p("",!0),n.enableUpgradeUnifiedWalletForceUpdatePhase1&&i.isOverviewPage&&e.isEnableUnifiedWalletUpgrade&&!e.isSubAccount&&!e.isUnifiedWallet&&!e.isUnifiedWalletAutomaticallyUpgradeViewed?(u(),c(d,{key:2})):p("",!0)])}]]),{convertDefaultSelected:Ta,disabledCurrencyTypes:Aa,baseCurrency:_a,brandToken:Ra}=ye,Ea=(null==Ta?void 0:Ta.fromCurrency)||(Aa.includes(he.CRYPTO_CURRENCY)?_a:"BTC"),Ia=(null==Ta?void 0:Ta.toCurrency)||"USD",Fa={name:"ConvertDialog",components:{BrandDialog:le,IconSecondLoading:ke,IconSwitch:Mt,IconCheck:Ut,FullKycSectionMessage:Pt,InputWithCurrencyDropDown:xt},inject:{gl_dialogData:{type:Object,required:!0}},props:{closeDialog:{type:Function,required:!0},fromCurrency:{type:String,default:Ea},toCurrency:{type:String,default:Ia},selectFromDisabled:{type:Boolean,default:!1},selectToDisabled:{type:Boolean,default:!1},lockTransfer:{type:Boolean,default:!1},appliedToCurrencyList:{type:Array,default:null}},data:()=>({CURRENCY_SORTING_STRATEGY:Ae,walletAction:Te.CONVERT,ruleForm:{fromSelectedCurrency:"",toSelectedCurrency:"",fromText:"",amount:"",isAmountError:!1,rate:""},initialRateLoading:!0,submitLoading:!1,rateLoading:!0,isGetRateError:!1,convertFeeFreeVisible:be.visible.convertFeeFree,isFromInputFocus:!1,appliedFromCurrencyList:[],fetchedAppliedToCurrencyList:[]}),computed:{...b(["loginState","currencyMap"]),finalAppliedToCurrencyList(){return this.appliedToCurrencyList||this.fetchedAppliedToCurrencyList},toExcludedCurrencyList(){return this.ruleForm.fromSelectedCurrency?[this.ruleForm.fromSelectedCurrency]:[]},errorStyle(){return this.ruleForm.isAmountError?{color:"var(--content-red-400)"}:""},fromSelectedCurrencyInfo(){return this.currencyMap[this.ruleForm.fromSelectedCurrency]||{}},toSelectedCurrencyInfo(){return this.currencyMap[this.ruleForm.toSelectedCurrency]||{}},isNotCurrenciesBothAllow(){return!this.fromSelectedCurrencyInfo.allowConvert||!this.toSelectedCurrencyInfo.allowConvert},formDecimalLimit(){return this.getAssetScaleByCurrency(this.ruleForm.fromSelectedCurrency)},availableBalance(){var e;const t=(null==(e=this.fromSelectedCurrencyInfo)?void 0:e.available)??"0";return N(t).dp(this.formDecimalLimit,N.ROUND_DOWN).toFixed()},formatedAvailableBalance(){return this.$filters.commaNumber(this.availableBalance)},isShowRate(){return this.ruleForm.fromSelectedCurrency&&this.ruleForm.toSelectedCurrency&&!this.isGetRateError},isSubmitDisabled(){return this.ruleForm.isAmountError||""===this.ruleForm.amount||this.isNotCurrenciesBothAllow},getToAmount(){if(!this.ruleForm.amount||this.isGetRateError)return"";const e=isNaN(Number(this.ruleForm.amount))?0:this.ruleForm.amount,t=isNaN(Number(this.ruleForm.rate))?0:this.ruleForm.rate;let a=this.$filters.formatNumber(N(e).times(t).toString(),"max");return a=we(a),`â ${a}`},isMaxDisable(){return this.isGetRateError||N(this.availableBalance).lte(0)},buttonTextI18n(){return this.submitLoading?"wallets.convert.buttonConverting":"t.convert"}},watch:{"ruleForm.amount"(e,t){this.checkErrorMsg(e);/^(\d+)\.?(\d+)?$/.test(e)||""===e?this.debounceGetRate():this.$nextTick((()=>{this.ruleForm.amount=t}))},"ruleForm.fromSelectedCurrency"(e,t){if(!this.initialRateLoading){if(this.rateLoading=!0,this.ruleForm.amount="",e===this.ruleForm.toSelectedCurrency)return this.ruleForm.fromSelectedCurrency=t,void this.transferOnclicked();this.isFromAndToCurrencySame()?this.rateLoading=!1:(this.cancelRequest(),this.debounceGetRate())}},"ruleForm.toSelectedCurrency"(){this.initialRateLoading||(this.rateLoading=!0,this.isFromAndToCurrencySame()?this.rateLoading=!1:(this.cancelRequest(),this.debounceGetRate()))}},created(){var e;this.fetchAppliedCurrencyList();this.fromCurrency===this.toCurrency?this.selectToDisabled?(this.ruleForm.fromSelectedCurrency=this.fromCurrency!==Ea?Ea:Ia,this.ruleForm.toSelectedCurrency=this.toCurrency):(this.ruleForm.fromSelectedCurrency=this.fromCurrency,this.toCurrency!==Ia?this.ruleForm.toSelectedCurrency=Ia:(null==(e=this.currencyMap[Ra])?void 0:e.allowConvert)?this.ruleForm.toSelectedCurrency=Ra:this.ruleForm.toSelectedCurrency=Ea):(this.ruleForm.fromSelectedCurrency=this.fromCurrency,this.ruleForm.toSelectedCurrency=this.toCurrency),this.getRate()},beforeUnmount(){clearTimeout(this.rateUpdateTimer)},methods:{...E(["messageSuccess"]),...L(Ce,["getAssetScaleByCurrency"]),e2eID:ve,async fetchAppliedCurrencyList(){try{const e=await De.initWalletInfo(!1),{cryptoList:t=[],fiatList:a=[]}=e,s=[...t,...a].filter((e=>e.allowConvert)).map((e=>e.shortName));this.appliedFromCurrencyList=s,this.fetchedAppliedToCurrencyList=s}catch(e){this.appliedFromCurrencyList=[],this.fetchedAppliedToCurrencyList=[]}},transferOnclicked(){[this.ruleForm.toSelectedCurrency,this.ruleForm.fromSelectedCurrency
1]=[this.ruleForm.fromSelectedCurrency,this.ruleForm.toSelectedCurrency],this.ruleForm.amount=""},cancelRequest(){this.requestController&&this.requestController.abort()},getRate(){if(!this.ruleForm.fromSelectedCurrency||!this.ruleForm.toSelectedCurrency)return this.initialRateLoading=!1,void(this.rateLoading=!1);this.cancelRequest(),this.requestController=new AbortController,clearTimeout(this.rateUpdateTimer);const e=Date.now(),t=N(this.ruleForm.amount).gt(0)?this.ruleForm.amount:"1";Se.getConvertRate({scrCurrency:this.ruleForm.fromSelectedCurrency,targetCurrency:this.ruleForm.toSelectedCurrency,amount:t},this.requestController.signal).then((({rate:t,time:a})=>{const s=Date.now();this.ruleForm.rate=t,this.rateLoading=!1,this.isGetRateError=!1,this.rateUpdateTimer=setTimeout(this.getRate,3e3);const n=s-e;if(n>1e3){(0,console.log)(`ð¢â±ï¸ ${n}ms | â¬ï¸ ts: ${e} | ð¡ ts: ${a} | â¬ï¸ ts: ${s}`)}}),(e=>{this.isGetRateError="CanceledError"!==e.name})).finally((()=>{this.initialRateLoading=!1}))},debounceGetRate:fe((function(){this.getRate()}),300),isFromAndToCurrencySame(){return this.ruleForm.fromSelectedCurrency===this.ruleForm.toSelectedCurrency},checkErrorMsg(e){if(""===e)return this.ruleForm.isAmountError=!1,void(this.ruleForm.fromText="");if(!/^(\d+)\.?(\d+)?$/.test(e))return this.ruleForm.isAmountError=!0,void(this.ruleForm.fromText=this.$t("rules.errorAmount"));return/^\d+(\.\d{0,8})?$/.test(e)?N(e).lte(0)||N(e).gt(this.availableBalance)?(this.ruleForm.isAmountError=!0,void(this.ruleForm.fromText="")):(this.ruleForm.isAmountError=!1,void(this.ruleForm.fromText="")):(this.ruleForm.isAmountError=!0,void(this.ruleForm.fromText=this.$t("wallets.convert.unitAmountError")))},submitForm(){this.ruleForm.isAmountError||this.submit()},submit(){this.submitLoading=!0,Se.convert({scrCurrency:this.ruleForm.fromSelectedCurrency,targetCurrency:this.ruleForm.toSelectedCurrency,amount:this.ruleForm.amount}).then((e=>{Object.keys(e).length?(e.amountCurrency=e.amountCurrency||e.currency,this.gl_dialogData.data=e,this.gl_dialogData.isShow[Da.CONVERT_SUCCESS]=!0):this.messageSuccess(this.$t("response-code.3021")),this.onCancel()})).catch((e=>{e&&e.response&&e.response.data&&3525===e.response.data.code&&(this.getRate(),this.gl_dialogData.isShow[Da.CONVERT_FAIL]=!0)})).finally((()=>{this.submitLoading=!1}))},onCancel(){this.closeDialog()},onMaxClick(){this.ruleForm.amount=this.availableBalance}}},La={class:"convert-heading"},Na={key:0,class:"convert-top-bar-wrap"},xa={class:"convert-top-bar-text"},Ba={class:"convert-form-calculation-wrap"},Pa={class:"convert-form-calculation-from-wrap"},Oa={class:"convert-form-calculation-from-title"},Ua={key:0,class:"convert-form-calculation-available-amount-wrap"},Ma={class:"convert-form-calculation-available-text"},$a={class:"convert-form-calculation-available-value",dir:"ltr"},Va={class:"convert-form-calculation-available-amount"},Ha={class:"convert-form-calculation-available-currency"},Wa={key:1,class:"convert-form-calculation-available-amount-wrap"},za={class:"convert-form-calculation-available-text"},Ga={class:"convert-form-calculation-transfer-wrap"},Ka=["disabled"],Ya={class:"convert-form-calculation-to-wrap"},ja={class:"convert-form-calculation-to-title"},qa={class:"convert-form-calculation-to-option-wrap"},Qa={key:0,class:"convert-form-rate-wrap"},Ja={key:0,class:"convert-rate-loading-wrap"},Xa={class:"convert-rate-loading-text"},Za={key:1,class:"convert-rate-currency-wrap"},es={class:"convert-form-rate-from-wrap"},ts={class:"convert-form-rate-from-currency"},as={class:"convert-form-rate-to-wrap"},ss={class:"convert-form-rate-to-amount"},ns={class:"convert-form-rate-to-currency"};const is=Rt(Fa,[["render",function(e,t,a,s,n,i){const r=l("FullKycSectionMessage"),o=l("IconCheck"),g=l("InputWithCurrencyDropDown"),f=l("IconSwitch"),v=l("IconSecondLoading"),k=l("BrandButton"),C=l("BrandDialog"),b=S("loading");return u(),c(C,{width:e.$isLargeSize(e.$mq)?"530px":"90%",idPrefix:"convert_dialog",isBrandNewStyle:"",onClosed:a.closeDialog},{header:d((()=>[D("span",La,h(e.$t("wallets.convert.title")),1)])),body:d((()=>
1[m(r,{class:"convert-kyc-verify"},{default:d((()=>[D("div",null,h(e.$t("kyc.verifyIdentityUnlockFunction")),1)])),_:1}),n.convertFeeFreeVisible?(u(),T("div",Na,[m(o,{class:"convert-top-bar-icon flex-none"}),D("span",xa,h(e.$t("wallets.convert.fee-free-instant-conversion")),1)])):p("",!0),w((u(),T("form",{ref:"ruleForm",class:"convert-form-wrap",onSubmit:t[6]||(t[6]=x((()=>{}),["prevent"]))},[D("div",Ba,[D("div",Pa,[D("div",{ref:"formAmount",class:"convert-form-calculation-available-wrap",style:B(i.errorStyle)},[D("p",Oa,h(e.$t("wallets.convert.from")),1),n.ruleForm.fromSelectedCurrency&&!n.ruleForm.fromText?(u(),T("div",Ua,[D("p",Ma,h(e.$t("wallets.convert.availableAmount")),1),D("div",$a,[D("p",Va,h(i.formatedAvailableBalance),1),D("p",Ha,h(n.ruleForm.fromSelectedCurrency),1)])])):(u(),T("div",Wa,[D("p",za,h(n.ruleForm.fromText),1)]))],4),m(g,{id:i.e2eID("input_search_coin","from"),value:n.ruleForm.amount,"onUpdate:value":t[0]||(t[0]=e=>n.ruleForm.amount=e),selectedCurrency:n.ruleForm.fromSelectedCurrency,"onUpdate:selectedCurrency":t[1]||(t[1]=e=>n.ruleForm.fromSelectedCurrency=e),class:"convert-form-calculation-from",placeholder:e.$t("wallets.convert.amount"),decimalLimit:i.formDecimalLimit,isError:n.ruleForm.isAmountError,maxBtnId:i.e2eID("btn_max"),isMaxBtnDisable:n.isGetRateError,isCurrencyDropdownDisabled:a.selectFromDisabled,walletAction:n.walletAction,appliedCurrencyList:n.appliedFromCurrencyList,sortingStrategy:n.CURRENCY_SORTING_STRATEGY.BALANCE_DESC,currencyDropdownIdPrefix:"convert_dialog",currencyDropdownIdSuffix:"from",isShowMaxBtn:"",isOnlyListingUserOwnedCurrencies:"",showBalance:"",onMaxClick:i.onMaxClick},null,8,["id","value","selectedCurrency","placeholder","decimalLimit","isError","maxBtnId","isMaxBtnDisable","isCurrencyDropdownDisabled","walletAction","appliedCurrencyList","sortingStrategy","onMaxClick"])]),D("div",Ga,[D("button",{type:"button",class:"convert-form-calculation-transfer-button",disabled:a.lockTransfer,onClick:t[2]||(t[2]=(...e)=>i.transferOnclicked&&i.transferOnclicked(...e))},[m(f,{class:"convert-icon-transfer"})],8,Ka)]),D("div",Ya,[D("p",ja,h(e.$t("wallets.convert.to")),1),D("div",qa,[m(g,{id:i.e2eID("input_search_coin","to"),value:i.getToAmount,"onUpdate:value":t[3]||(t[3]=e=>i.getToAmount=e),selectedCurrency:n.ruleForm.toSelectedCurrency,"onUpdate:selectedCurrency":t[4]||(t[4]=e=>n.ruleForm.toSelectedCurrency=e),class:"convert-form-calculation-to",placeholder:`â ${e.$t("wallets.convert.amount")}`,appliedCurrencyList:i.finalAppliedToCurrencyList,excludedCurrencyList:i.toExcludedCurrencyList,isCurrencyDropdownDisabled:a.selectToDisabled,isFilterShown:!i.finalAppliedToCurrencyList,walletAction:n.walletAction,sortingStrategy:n.CURRENCY_SORTING_STRATEGY.TOKEN_NAME_ASC,currencyDropdownIdPrefix:"convert_dialog",currencyDropdownIdSuffix:"to",readonly:"",onMaxClick:i.onMaxClick},null,8,["id","value","selectedCurrency","placeholder","appliedCurrencyList","excludedCurrencyList","isCurrencyDropdownDisabled","isFilterShown","walletAction","sortingStrategy","onMaxClick"])])])]),i.isShowRate?(u(),T("div",Qa,[n.rateLoading?(u(),T("div",Ja,[D("p",Xa,h(e.$t("wallets.convert.loading")),1),m(v,{class:"convert-rate-loading-icon"})])):(u(),T("div",Za,[D("div",es,[t[7]||(t[7]=D("span",{class:"convert-form-rate-from-amount"},"1",-1)),D("span",ts,h(n.ruleForm.fromSelectedCurrency),1)]),t[8]||(t[8]=D("p",null,"=",-1)),D("div",as,[D("span",ss,h(e.$filters.formatNumber(n.ruleForm.rate,"max")),1),D("span",ns,h(n.ruleForm.toSelectedCurrency),1)])]))])):p("",!0),m(k,{id:n.submitLoading?"":i.e2eID("btn_convert_now"),class:A(["convert-form-submit-button",[n.submitLoading?"convert-form-submit-button-loading":""]]),type:"primary",loading:n.submitLoading,disabled:i.isSubmitDisabled,onClick:t[5]||(t[5]=e=>i.submitForm("ruleForm"))},{default:d((()=>[y(h(e.$t(i.buttonTextI18n)),1)])),_:1},8,["id","class","loading","disabled"])],32)),[[b,n.submitLoading]])])),_:1},8,["width","onClosed"])}],["__scopeId","data-v-a21bec87"]]);const rs=Rt({name:"IconLink",components:{Icon:re}},[["render",function(e,t,a,s,n,i){const r=l("Icon");return u(),c(r,{width:"24",height:"24",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},{default:d((()=>t[0]||(t[0]=[D("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},null,-1),D("polyline",{points:"15 3 21 3 21 9"},null,-1),D("line",{x1:"10",y1:"14",x2:"21",y2:"3"},null,-1)]))),_:1,__:[0]})}]]);const os=Rt({name:"WalletDateRangePicker",components:{DateRangePickerV2:_e},props:{height:{type:String,default:"32px"},width:{type:String,default:"272px"},minDurationToNow:{type:Object,default:null},rangeLimitDuration:{type:Object,default:()=>({days:180})},daysPanelOptions:{type:Array,default:()=>[]}}},[["render",function(e,t,a,s,n,i){const r=l("DateRangePickerV2");return u(),c(r,P(e.$attrs,{ref:"datePicker",class:"date-range-picker",minDurationToNow:a.minDurationToNow,rangeLimitDuration:a.rangeLimitDuration,daysPanelOptions:a.daysPanelOptions}),null,16,["minDurationToNow","rangeLimitDuration","daysPanelOptions"])}],["__scopeId","data-v-81727ecf"]]);const ls={name:"TransactionHistoryTable",components:{TransactionHistoryHeader:Rt({name:"TransactionHistoryHeader",components:{SortableHeaderCell:Re},props:{headerTitles:{type:Array,default:function(){return[]}},sortKey:{type:[Boolean,String],required:!1}},computed:{...F(["isArabic"])},methods:{oppositeDirection:e=>"right"===e.textAlign?"left":"right",textAlignBasedOnI18n(e){return e.textAlign?this.isArabic?this.oppositeDirection(e):e.textAlign:"inherit"}}},[["render",function(e,t,a,s,n,i){const r=l("SortableHeaderCell"),o=l("HeaderRow");return u(),c(o,{class:"transaction-history-header"},{default:d((()=>[(u(!0),T(_,null,R(a.headerTitles,(t=>(u(),c(r,P({ref_for:!0},e.$attrs,{key:t.id,currentSortKey:a.sortKey,style:{textAlign:i.textAlignBasedOnI18n(t)},title:t}),{content:d((()=>[D("span",null,h(t.lang),1)])),_:2},1040,["currentSortKey","style","title"])))),128))])),_:1})}],["__scopeId","data-v-0f4d8e2f"]]),NoDataAvailable:Ee},props:{rowComponent:{type:Object,required:!0},headerTitlesData:{type:Array,required:!0},listData:{type:Array,required:!0},isLoading:{type:Boolean,default:!1},handleRowClick:{type:Function,default:()=>{}}},data:()=>
1({sortKey:null,sortOrder:null}),computed:{isEmpty(){return!this.isLoading&&0===this.listData.length},tableColSpan(){return this.headerTitlesData.length.toString()},sortList(){return this.sortKey?Ie(this.listData,this.sortKey,this.sortOrder):this.listData}},methods:{toRaw:O,setSortData({key:e,order:t}){this.sortKey=e,this.sortOrder=t}}},cs={key:0,class:"loading-wrap"},us={key:1,class:"table-content-wrap"};const ds=Rt(ls,[["render",function(e,t,a,s,n,i){const r=l("TransactionHistoryHeader"),o=l("NoDataAvailable"),g=l("Cell"),y=l("Row"),h=l("DataTable"),v=S("loading");return a.isLoading?w((u(),T("div",cs,null,512)),[[v,!0]]):(u(),T("div",us,[m(h,{ref:"assetTable",class:A(["content-table",{empty:i.isEmpty}]),fixHeader:!0,fixFirstColumn:!1},{header:d((()=>[m(r,{class:"content-list-header",headerTitles:a.headerTitlesData,sortKey:n.sortKey,onSort:i.setSortData},null,8,["headerTitles","sortKey","onSort"])])),body:d((()=>[i.isEmpty?(u(),c(y,{key:0,class:"no-data-section",index:-1,disableCssHoverEffect:"",disableBackground:""},{default:d((()=>[m(g,{textAlign:"center",colspan:i.tableColSpan},{default:d((()=>[m(o,{class:"no-data-available",emptyText:e.$t("t.noDataFound")},null,8,["emptyText"])])),_:1},8,["colspan"])])),_:1})):p("",!0),(u(!0),T(_,null,R(i.sortList,((t,s)=>(u(),c(f(i.toRaw(a.rowComponent)),P({ref_for:!0},e.$attrs,{key:t.id,index:s,data:t,onClick:e=>a.handleRowClick(t)}),null,16,["index","data","onClick"])))),128))])),_:1},8,["class"])]))}],["__scopeId","data-v-6935e408"]]);function ps(e=7){const t=Date.now(),a=Fe(Le.days(t,e-1),"yyyy-MM-dd 00:00:00"),s=Fe(t,"yyyy-MM-dd 23:59:59");return[Ne(a),Ne(s)]}const ms=Rt({name:"IconColorAlert",components:{Icon:re}},[["render",function(e,t,a,s,n,i){const r=l("Icon");return u(),c(r,{width:"18",height:"18"},{default:d((()=>t[0]||(t[0]=[D("circle",{cx:"9",cy:"9",r:"9",fill:"#fff"},null,-1),D("path",{fill:"#FF5B5A","fill-rule":"evenodd",d:"M17 9c0 4.418-3.582 8-8 8s-8-3.582-8-8 3.582-8 8-8 8 3.582 8 8zM9.008 3.607c.646 0 1.192.537 1.192 1.083 0 .993-.064 2.122-.127 3.225-.042.749-.084 1.485-.105 2.158-.013.432-.333.963-.96.963-.63 0-.963-.53-.976-.963-.021-.662-.062-1.388-.104-2.127C7.865 6.834 7.8 5.692 7.8 4.69c0-.546.53-1.083 1.208-1.083zM7.8 13.318c0 .641.518 1.204 1.208 1.204.643 0 1.192-.563 1.192-1.204 0-.656-.549-1.204-1.192-1.204-.69 0-1.208.547-1.208 1.204z","clip-rule":"evenodd"},null,-1)]))),_:1,__:[0]})}]]),gs={DEPOSIT_FIAT:0,DEPOSIT_CREDIT_CARD:2,DEPOSIT_CRYPTO:3,WITHDRAW_FIAT:4,WITHDRAW_CRYPTO:6,CONVERT:7,SEND_TO:8,RECEIVE:9,TRANSFER_IN:10,TRANSFER_OUT:11,REDEEM:12,INVESTMENT:13,C2C_TRANSFER_IN:14,C2C_TRANSFER_OUT:15,PAY_FOR_SERVICE:22,EXPRESS_BUY:23,REWARD_IN:24,REWARD_OUT:25,ROYALTY:28,REBATE:29,VESTING:33,REWARD_EXPIRED:34,COPYTRADING_REBATE:35,COPYTRADING_REBATE_SENT:36,COPYTRADING_REBATE_RECEIVE:37,ASSET_ON_HOLD:38,ASSET_RELEASE:39,SWAP_IN:40,SWAP_OUT:41,EXPRESS_SELL:42,WITHDRAW_FIAT_ALIPAY:43,WITHDRAW_FIAT_GCASH:44,PREDICTION_PROFIT:45,PREDICTION_LOSS:46,BINARY_OPTION_PROFIT:47,BINARY_OPTION_LOSS:48,UP_OR_DOWN_PROFIT:49,UP_OR_DOWN_LOSS:50,API_BROKER_REBATE:51},ys={DEBIT_CARD:"DEBIT_CARD"},hs="REGISTER",fs={PENDING:"PENDING",COMPLETED:"COMPLETED",COMPLETE:"COMPLETE",CANCELED:"CANCELED",PROCESSING:"PROCESSING",DECLINED:"DECLINED",FAILURE:"FAILURE"},vs=["PAY_FOR_SERVICE","EXPRESS_BUY","EXPRESS_SELL","DEPOSIT","WITHDRAW"],ks={name:"InfoCopy",components:{IconCopy:xe},props:{copyText:{type:String,default:""},copyValue:{type:[String,Number],default:""},linkUrl:{type:String,default:""},highlight:{type:Boolean,default:!1}},data:()=>({showToolTip:!1}),methods:{onCopy(){this.showToolTip=!0},transitionEnter(){this.showToolTip=!1}}},Ss={class:"info-wrapper"},Ds=["href"],Cs={class:"copy-text"},ws={class:"copy-icon-wrap"},bs={key:0,class:"tooltip"};const Ts=Rt(ks,[["render",function(e,t,a,s,n,i){const r=l("IconCopy"),o=S("clipboard");return u(),T("div",Ss,[a.linkUrl?(u(),T("a",{key:0,href:a.linkUrl,target:"_blank",class:"link"},[D("span",Cs,h(a.copyText),1)],8,Ds)):(u(),T("span",{key:1,class:A(["copy-text",{highlight:a.highlight}])},h(a.copyText),3)),w((u(),T("div",ws,[m(r,{class:"icon-copy"}),m(U,{name:"fade",onEnter:i.transitionEnter},{default:d((()=>[n.showToolTip?(u(),T("div",bs,h(e.$t("msg.copied"))+"!",1)):p("",!0)])),_:1},8,["onEnter"])])),[[o,a.copyValue,"copy"],[o,i.onCopy,"success"]])])}],["__scopeId","data-v-cbd0a680"]]),As={class:"top-info"},_s={class:"date-wrap"},Rs={class:"date"},Es={class:"time"};const Is=Rt({name:"TopInfoWrapper",components:{InfoCopy:Ts},props:{dateTime:{type:Number,default:0},id:{type:String,default:""}},computed:{dateObject(){const e=M(this.dateTime,"yyyy-MM-dd HH:mm:ss").split(" ");return{date:e[0],time:e[1]}}}},[["render",function(e,t,a,s,n,i){const r=l("InfoCopy");return u(),T("div",As,[D("div",_s,[D("span",Rs,h(i.dateObject.date),1),D("span",Es,h(i.dateObject.time),1)]),a.id?(u(),c(r,{key:0,copyText:a.id,copyValue:a.id},null,8,["copyText","copyValue"])):p("",!0)])}],["__scopeId","data-v-0496bd24"]]),Fs={methods:{formatNumber(e,t){var a,s;const{detailType:n}=this.detailData,i=null==(s=null==(a=this.currencyMap)?void 0:a[t])?void 0:s.isFiat;let r="max8";return n>=0&&n<=6&&(r=i?"max2":"max8"),this.$filters.formatNumber(e,r)},isC2cTransactionType:e=>[gs.C2C_TRANSFER_IN,gs.C2C_TRANSFER_OUT].includes(e),isStakeType:e=>[Be.STAKE,Be.UNSTAKE].includes(e),isUnStake:e=>e===Be.UNSTAKE,isRoyaltyType:e=>e===gs.ROYALTY,isRebateType:e=>e===gs.REBATE,isVestingType:e=>e===gs.VESTING,isCopyTradingRebateType:e=>[gs.COPYTRADING_REBATE,gs.COPYTRADING_REBATE_SENT,gs.COPYTRADING_REBATE_RECEIVE].includes(e),isBinaryOptionType:e=>[gs.BINARY_OPTION_PROFIT,gs.BINARY_OPTION_LOSS].includes(e),isUpOrDownType:e=>[gs.UP_OR_DOWN_PROFIT,gs.UP_OR_DOWN_LOSS].includes(e),isAssetOnHoldOrAssetRelease:e=>[gs.ASSET_ON_HOLD,gs.ASSET_RELEASE].includes(e),isApiBrokerRebate:e=>e===gs.API_BROKER_REBATE}},Ls={name:"NetAmountWrapper",components:{BrandIcon:Oe,BrandTag:Pe},props:{detailData:{type:Object,required:!0}},data:()=>({DETAIL_STATUS:fs}),computed:{...b(["currencyMap","lang"]),...F(["getCurrencyScaledAmount"]),detailType(){return this.detailData.detailType},isWithdrawBank(){return[gs.WITHDRAW_FIAT].includes(this.detailType)},isWithdrawCrypto(){return this.detailType===gs.WITHDRAW_CRYPTO},isSendAndReceive(){return[gs.SEND_TO,gs.RECEIVE].includes(this.detailType)},isBankDeposit(){return[gs.DEPOSIT_FIAT].includes(this.detailType)},isExpressBuySell(){return[gs.EXPRESS_BUY,gs.EXPRESS_SELL].includes(this.detailType)},isCreditCardDeposit(){return this.detailType===gs.DEPOSIT_CREDIT_CARD},isConvert(){return this.detailType===gs.CONVERT},isSwap(){return this.detailType===gs.SWAP_IN||this.detailType===gs.SWAP_OUT},isVesting(){return this.detailType===gs.VESTING},isZkSync(){return this.detailData.currencyNetwork===He.ZKSYNC},isScroll(){return this.detailData.currencyNetwork===He.SCROLL},currency(){const{asset:e,historyType:t,targetCurrency:a}=this.detailData;return this.isStakeType(t)?e:this.isExpressBuySell?a:this.isConvert||this.isSwap?this.detailData.settlementCurrency:this.detailData.amountCurrency},currencyData(){return this.currencyMap[this.currency]||{displayName:this.currency,short
1Name:this.currency}},netAmount(){const{fee:e=0,bankCharge:t=0,amount:a,detailType:s,historyType:n,netAmount:i,issueType:r,targetAmount:o}=this.detailData;return this.isStakeType(n)||this.isVesting?i:this.isC2cTransactionType(s)||r===hs?a:this.isExpressBuySell?o:this.isConvert?N(this.detailData.settlementAmount).minus(e||0).minus(t||0):this.isSwap?N(this.detailData.settlementAmount):N(this.detailData.amount).minus(e||0).minus(t||0)},formatNetAmount(){return this.isExpressBuySell&&this.detailData.status!==fs.COMPLETED?"-":Ve(this.netAmount)?this.getCurrencyScaledAmount({currency:this.currency,amount:this.netAmount,isFormat:!0}):"-"},status(){const{status:e}=this.detailData;return e===fs.FAILURE?fs.DECLINED:e},statusClass(){var e;switch(null==(e=this.status)?void 0:e.toLowerCase()){case"processing":return $e.YELLOW;case"completed":return $e.GREEN;case"declined":return $e.RED;default:return}},statusText(){const e=`t.${this.status.toLowerCase()}`,t=Ue(e)?this.$t(e):Me(this.status.toLowerCase());if(!this.isProcessing)return t;if(this.isZkSync)return t;const a=(this.detailData.coinStatus||"").match(/^\((\d+\/\d+)\)$/);return`${t}${a?` ${a[1]}`:""}`},isProcessing(){return this.detailData.status===fs.PROCESSING},isShowInfoText(){return this.processingInfoText||this.declinedInfoKey},processingInfoText(){var e;return this.isProcessing?this.isUnStake(null==(e=this.detailData)?void 0:e.historyType)?this.$t("token.staking.unstake.received.date",{date:this.receiveDate}):this.isBankDeposit?this.$t("history.detail.prompts.bank.deposit"):this.isZkSync?this.$t("wallets.transaction.validatedTimeSlot",{time:"24"}):"":""},declinedInfoKey(){return this.status!==fs.DECLINED?"":this.isBankDeposit||this.isWithdrawBank?"wallet.history.depositBank.declined.msg":this.isCreditCardDeposit?"wallet.history.depositCreditCard.declined.msg":""},contactUsLink(){return pe(this.lang,"NEW_TICKET")},receiveDate(){const{unlockDate:e}=this.detailData;return e?M(new Date(e),"yyyy-MM-dd HH:mm:ss"):""}},methods:{...Fs.methods}},Ns={class:"net-amount-wrapper"},xs={class:"title"},Bs={class:"net-amount"},Ps={key:0,class:"note"},Os=["href"],Us={key:1,class:"info-text"};const Ms=Rt(Ls,[["render",function(e,t,a,s,n,i){const r=l("BrandIcon"),o=l("BrandTag"),g=l("i18n-t");return u(),T("div",Ns,[m(r,{class:"currency",displayName:i.currencyData.displayName,type:i.currencyData.isFiat?"fiat":"icon",name:i.currencyData.shortName,size:"20",shortName:""},null,8,["displayName","type","name"]),D("span",xs,h(e.$t("t.netAmount")),1),D("span",Bs,h(i.formatNetAmount),1),e.$slots.extra?(u(),T("div",Ps,[C(e.$slots,"extra",{},void 0,!0)])):p("",!0),m(o,{type:i.statusClass,text:i.statusText},null,8,["type","text"]),i.isShowInfoText?(u(),T(_,{key:1},[i.status===n.DETAIL_STATUS.DECLINED?(u(),c(g,{key:0,keypath:i.declinedInfoKey,tag:"p",class:"info-text"},{contactUs:d((()=>[D("a",{class:"link",href:i.contactUsLink,target:"_blank"},h(e.$t("t.contactUs")),9,Os)])),_:1},8,["keypath"])):(u(),T("p",Us,h(i.processingInfoText),1))],64)):p("",!0)])}],["__scopeId","data-v-f26527de"]]),$s={name:"InfoWrapper",components:{InfoCopy:Ts,IconLink:rs,IconArrowRight:We},props:{infoList:{type:Array,default:()=>[]},data:{type:Object,default:()=>({})}},computed:{...b(["lang"]),...F(["getCurrencyScaledAmount"]),filterInfoList(){return this.infoList.filter((e=>!e.disable))},isC2cTransactionType(){var e;return[gs.C2C_TRANSFER_IN,gs.C2C_TRANSFER_OUT].includes(null==(e=this.data)?void 0:e.detailType)}},methods:{onClickOrderLink(){var e;this.$router.push({name:"c2cOrder",params:{id:null==(e=this.data)?void 0:e.c2cOrderNumber,lang:this.lang}})},getFormattedAmountCurrency(e){const{amount:t,currency:a}=e||{};return`${t?this.getCurrencyScaledAmount({currency:a,amount:t,isFormat:!0}):"-"} ${a}`}}},Vs={class:"detail-info-wrapper"},Hs={class:"info-item"},Ws={class:"title"},zs={class:"value-wrapper"},Gs={key:1,class:"value-text-wrap"},Ks={class:"value"},Ys={key:0,class:"note"},js={class:"convert-from"},qs={class:"convert-to"};const Qs=Rt($s,[["render",function(e,t,a,s,n,i){const r=l("InfoCopy"),o=l("IconArrowRight"),g=l("IconLink"),f=l("BrandButton");return u(),T("div",Vs,[(u(!0),T(_,null,R(i.filterInfoList,(e=>(u(),T(_,{key:`info-item-${e.title}`}
1,[D("div",Hs,[D("span",Ws,h(e.title),1),D("div",zs,[e.enableCopy?(u(),c(r,{key:0,class:"info-copy",copyText:e.value,copyValue:e.value,linkUrl:e.linkUrl},null,8,["copyText","copyValue","linkUrl"])):(u(),T("div",Gs,[D("span",Ks,h(e.value||"-"),1),e.note?(u(),T("span",Ys,h(e.note),1)):p("",!0)]))])]),e.convertData?(u(),T("div",{key:`convert-wrap-${e.title}`,class:"convert-wrap"},[D("span",js,h(i.getFormattedAmountCurrency(e.convertData.from)),1),m(o,{class:"convert-arrow"}),D("span",qs,h(i.getFormattedAmountCurrency(e.convertData.to)),1)])):p("",!0)],64)))),128)),i.isC2cTransactionType?(u(),c(f,{key:0,class:"c2c-order-link",type:"text",size:"mediumFontBig",isTextWrap:"",onClick:i.onClickOrderLink},{default:d((()=>[y(h(e.$t("wallet.history.c2cOrderLink"))+" ",1),m(g,{class:"icon-link"})])),_:1},8,["onClick"])):p("",!0)])}],["__scopeId","data-v-e7ecfcb7"]]);const Js=Rt({name:"IconConvertTo",components:{Icon:re},props:{width:{type:[Number,String],default:26},height:{type:[Number,String],default:26}}},[["render",function(e,t,a,s,n,i){const r=l("Icon");return u(),c(r,{width:a.width,height:a.height,"aria-label":"Convert To Icon",viewBox:"0 0 17 17"},{default:d((()=>t[0]||(t[0]=[D("path",{"fill-rule":"evenodd",d:"M8.643 13.57c2.804 0 5.077-2.272 5.077-5.076s-2.273-5.077-5.077-5.077S3.566 5.69 3.566 8.494s2.273 5.077 5.077 5.077zm.707-2.468c.362-.09.674-.273.914-.541.663-.747.408-1.839-.537-2.32-.258-.133-.528-.237-.801-.34l-.116-.045c-.18-.07-.352-.15-.502-.262-.3-.222-.244-.58.107-.723.097-.04.201-.053.309-.06.046-.003.093-.003.14-.003.354 0 .694.07 1.02.215.065.027.115.043.154.043.072 0 .111-.053.15-.165.04-.116.077-.233.113-.35l.067-.215c.04-.126-.011-.209-.14-.262-.233-.096-.476-.166-.73-.202-.334-.05-.334-.05-.334-.359-.003-.418-.004-.434-.423-.434h-.254c-.222.003-.258.04-.265.245V5.6c0 .132 0 .2-.032.245-.034.048-.104.07-.251.12-.684.229-1.103.66-1.15 1.35-.04.61.305 1.026.846 1.324.235.13.485.223.736.316.107.04.214.08.32.122.14.057.273.12.387.21.34.258.276.693-.125.856-.161.063-.326.092-.495.092-.06 0-.121-.003-.182-.01-.362-.04-.706-.129-1.032-.285-.068-.036-.122-.053-.161-.053-.072 0-.111.053-.15.176-.046.138-.09.28-.132.422l-.023.076c-.064.225-.039.278.19.381.294.13.61.2.932.246.25.036.258.046.261.289l.002.164.002.164c0 .14.071.22.225.223.083.003.162.003.244.003.093 0 .186 0 .28-.004.14-.003.214-.076.214-.209l.002-.149c.002-.1.003-.199-.002-.299-.007-.152.065-.228.222-.268z","clip-rule":"evenodd"},null,-1),D("path",{d:"M13.227.827l-1 1.518-.19-.103c-1.069-.578-2.264-.88-3.48-.88-4.016 0-7.318 3.302-7.318 7.318 0 .639.084 1.276.25 1.894.055.207.268.33.475.274.207-.056.33-.268.274-.475-.148-.553-.223-1.122-.223-1.693 0-3.588 2.955-6.542 6.542-6.542 1.23 0 2.432.346 3.481 1.003.279.186.522.363.73.532l.142.122.138.127.093.09s.92 1.013.99 1.075c.07.063.224.001.224.001l.048-.015c.133-.055.177-.135.16-.264L13.74.85l-.015-.052-.027-.052-.02-.025c-.126-.126-.345-.07-.451.106zM2.524 11.887l-.05.014c-.134.05-.182.129-.168.258l.684 3.985.009.041.023.052c.102.172.358.134.48-.052l1.052-1.482.186.11c1.048.614 2.232.958 3.447 1 4.014.141 7.43-3.044 7.57-7.057.022-.64-.04-1.278-.184-1.902-.048-.209-.257-.339-.465-.29-.21.048-.34.256-.291.465.129.557.184 1.128.164 1.7-.126 3.585-3.181 6.435-6.767 6.31-1.226-.043-2.413-.43-3.438-1.12-.262-.19-.495-.371-.692-.54l-.15-.139-.14-.136-.087-.09s-.895-1.056-.96-1.118c-.065-.062-.223-.01-.223-.01z"},null,-1)]))),_:1,__:[0]},8,["width","height"])}]]),Xs={name:"ProgressBarV2",components:{ProgressBar:ze},props:{title:{type:String,default:""},currentAmount:{type:Number,default:0},targetAmount:{type:Number,default:0},decimalPercent:{type:Number,default:0},unit:{type:String,default:""},isShowTopInfo:{type:Boolean,default:!0}},computed:{percent(){return N(this.decimalPercent).times(100).toNumber()}},methods:{formatNumber(e,t="default"){return this.$filters.formatNumber(e,{formatKey:t})}}},Zs={class:"progress"},en={key:0,class:"info"},tn={class:"info-front-title"},an={class:"progress__amount-wrapper"},sn={class:"info-front"},nn={class:"info-front-amount"},rn={class:"info-front-unit"},on={key:0,class:"info-front-percent"},ln={class:"target-amount"},cn={key:0};const un=Rt(Xs,[["render",function(e,t,a,s,n,i){const r=l("ProgressBar");
1return u(),T("div",Zs,[a.isShowTopInfo?(u(),T("div",en,[D("span",tn,h(a.title),1),D("div",an,[D("div",sn,[D("span",nn,h(i.formatNumber(a.currentAmount)),1),D("span",rn,h(a.unit),1),e.isMobile?p("",!0):(u(),T("span",on," ("+h(i.percent)+"%) ",1))]),D("div",ln,[y(h(i.formatNumber(a.targetAmount))+" ",1),e.isMobile?p("",!0):(u(),T("span",cn,h(a.unit),1))])])])):p("",!0),m(r,{class:"progress__progress-bar",percent:i.percent},null,8,["percent"]),C(e.$slots,"bottom",{},void 0,!0)])}],["__scopeId","data-v-e1218451"]]);function dn(e){const t=M(new Date(e),"yyyy-MM-dd HH:mm:ss").split(" ");return{date:t[0],time:t[1]}}const pn={class:"history-status"},mn={class:"status-text"};const gn=Rt({name:"WalletHistoryStatus",components:{IconProcessing:Ge,IconColorAlert:ms},props:{status:{type:String,default:""}},computed:{statusText(){const e=`t.${this.status.toLowerCase()}`;return Ue(e)?this.$t(e):Me(this.status.toLowerCase())},isDeclinedStatus(){return"DECLINED"===this.status},statusIcon(){return["PENDING","PROCESSING"].includes(this.status)?Ge:this.isDeclinedStatus?ms:null}}},[["render",function(e,t,a,s,n,i){return u(),T("div",pn,[D("span",mn,h(i.statusText),1),(u(),c(f(i.statusIcon),{class:"status-icon"}))])}],["__scopeId","data-v-f0dec366"]]);function yn(e={}){const{sortOrdering:t=[Ke.empty,Ke.desc,Ke.asc],initialSortKey:a=null,initialSortDirection:n=Ke.empty}=$(e),i=s(a),r=s(n),o=k((()=>t.indexOf(r.value))),l=k((()=>t.length));return V((()=>o.value),(e=>{e<0&&l.value>0&&(0===l.value?r.value=Ke.empty:r.value=t[0])}),{immediate:!0}),{sortKey:k((()=>r.value===Ke.empty?null:i.value)),sortDirection:r,onSorting:function({key:e}={key:null}){if(l.value>1)if(i.value===e){const e=(o.value+1)%l.value;r.value=t[e]}else if(i.value=e,n)r.value=n;else{const e=t.find((e=>e!==Ke.empty))||null;r.value=e}}}}const hn=["href"],fn={__name:"MailToContainer",props:{receiver:{type:String,required:!0},subject:{type:String,default:""},mailBody:{type:String,default:""}},setup(e){const t=e,a=k((()=>{const e=t.mailBody.replace(/(\n\r|\r\n|\r|\n)/g,"%0D%0A");return`mailto:${t.receiver}?subject=${t.subject}&body=${e}`}));return(t,s)=>(u(),T("a",{href:a.value},[C(t.$slots,"default",{},(()=>[y(h(e.receiver),1)]))],8,hn))}},vn=Rt({__name:"AffiliateProhibitionMsg",props:{feature:{type:Boolean,default:!1}},setup(e){const t=e,a=H(),s=k((()=>{switch(t.feature){case Ye.referral:return a.t("slider.referralProgram");case Ye.vipProgram:return a.t("vip.program.title");case Ye.tokenStakingBenefits:return a.t("token.page.benefits");default:return""}}));return(e,t)=>{const a=l("i18n-t");return u(),c(ie,{genre:g(ne).WARNING},{default:d((()=>[m(a,{keypath:"affiliateProgram.prohibition.message",tag:"div",class:"prohibition-msg"},{featureName:d((()=>[y(h(s.value),1)])),contactUrl:d((()=>[m(g(fn),{class:"contact-link",receiver:g(je).referralContactEmail},null,8,["receiver"])])),_:1})])),_:1},8,["genre"])}}},[["__scopeId","data-v-5a84f3a9"]]);const kn=Rt({name:"IconCrown",components:{Icon:re}},[["render",function(e,t,a,s,n,i){const r=l("Icon");return u(),c(r,{width:"16",height:"16","aria-label":"crown"},{default:d((()=>t[0]||(t[0]=[D("path",{d:"M13.473 14.857H2.527c-.487 0-.903-.35-.986-.83L.27 6.628c-.082-.482.505-.784.849-.436l3.166 3.202c.258.262.702.164.826-.183l2.42-6.754c.158-.442.782-.442.94 0l2.42 6.754c.124.347.567.445.826.183l3.166-3.202c.344-.348.931-.046.849.436l-1.272 7.399c-.083.48-.499.83-.986.83z"},null,-1)]))),_:1,__:[0]})}]]),Sn="tokenStakeState",Dn="token-staking-outer",Cn={level:"level",stake:"tokenStaking",makerFee:"maker",takerFee:"taker"};const wn={class:"masthead-background"};const bn=Rt({},[["render",function(e,t){return u(),T("section",wn)}],["__scopeId","data-v-9b1f2d90"]]);function Tn(){return K(Sn)}const An={class:"token-masthead-content"},_n={class:"title"},Rn={class:"des"},En={__name:"TokenMastheadContent",setup(e){const t=Tn();return(e,a)=>(u(),T("div",An,[D("span",_n,h(e.$t("tokenStaking.title")),1),D("p",Rn,[g(t).isUseVip?(u(),T(_,{key:0},[y(h(e.$t("tokenStaking.description")),1)],64)):(u(),T(_,{key:1},[y(h(e.$t("token.staking.benefits.des")),1)],64))])]))}},In=Rt(En,[["__scopeId","data-v-31d8e283"]]),Fn={class:"masthead-wrap"},Ln={class:"masthead-content"},Nn={__name:"TokenMasthead",setup:e=>(e,t)=>
1(u(),T("div",Fn,[m(g(bn)),m(Xe,{class:"full-kyc-notification"}),D("div",Ln,[m(g(In))])]))},xn=Rt(Nn,[["__scopeId","data-v-083bf708"]]),Bn={key:0,class:"type-switcher"},Pn={__name:"PageSwitcher",setup(e){const t=Y(),a=j(),{t:n}=H(),i=te(),{lang:r,loginState:o}=v(i),{enableTokenStake:l}=Ze(),c=s(!1),d=k((()=>t.name)),y=k((()=>[{title:n("token.page.benefits"),id:ue.TOKEN_STAKING_BENEFITS,isVisible:l.value},{id:ue.TOKEN_TRANSPARENCY_REPORT,title:n("token.page.report"),isVisible:!1},{id:ue.TOKEN_VESTING_HISTORY,title:n("token.page.vestingHistory"),isVisible:c.value},{id:"WHITEPAPER",title:n("token.page.whitepaper"),isVisible:!1}].filter((e=>e.isVisible)))),h=k((()=>t.name!==ue.TOKEN_STAKING_BENEFITS_HISTORY&&y.value.length>1));function f(e){switch(e){case ue.TOKEN_STAKING_BENEFITS:case ue.TOKEN_TRANSPARENCY_REPORT:case ue.TOKEN_VESTING_HISTORY:a.push({name:e,params:{lang:r.value}});break;case"WHITEPAPER":window.open(`${st}token/${ye.tokenWhitePaperFilenamePrefix}${r.value}.pdf`)}}return z((()=>{o.value&&async function(){var e;try{const t={currentPage:1,pageSize:1},a=await De.getBrandTokenVestingData(t);c.value=(null==(e=null==a?void 0:a.vestingWalletList)?void 0:e.totalRows)>0}catch(t){}}()})),(e,t)=>h.value?(u(),T("div",Bn,[m(g(at),{ref:"typeSwitcher",class:"switcher",isDefaultSelectedKey:!1,barHeight:4,type:g(tt).BOTTOM_BAR_NARROW,theme:g(et).compact,itemList:y.value,selected:d.value,onSelect:f},null,8,["type","theme","itemList","selected"])])):p("",!0)}},On=Rt(Pn,[["__scopeId","data-v-7c7f8f1e"]]),Un={class:"token-staking"},Mn={class:"token-staking-content"},$n={class:"token-staking-child"},Vn={__name:"TokenStaking",setup(e){const t=Y(),a=j(),s=te(),{loginState:n,lang:i,isAccountInfoLoaded:r}=v(s),{enableTokenStake:o,hasStakingBenefitsPermission:d}=Ze();function y(){r.value&&t.name===ue.TOKEN_STAKING_PAGE&&(o.value?a.replace({name:ue.TOKEN_STAKING_BENEFITS,params:{lang:i.value}}):a.replace({name:ue.HOME,params:{lang:i.value}}))}return function(){const e=te(),{loginState:t}=v(e),a=W({tradingFeeInfo:{},rules:{spot:[],futures:[]},spotConfiguration:{},isUseVip:k((()=>Je.enableVipLevelWithTokenStake)),unfreezePeriodDay:k((()=>{var e,t;const s=(null==(e=a.tradingFeeInfo)?void 0:e.coin)||"",n=((null==(t=a.spotConfiguration)?void 0:t.unstakeSetting)||[]).find((e=>e.coin===s));return N((null==n?void 0:n.unfreezePeriod)||0).div(864e5).toNumber()})),currentStakeLevel:k((()=>a.tradingFeeInfo.level)),isStakeLevelMax:k((()=>a.tradingFeeInfo.isMaxLevel)),stakeLevelRange:k((()=>{const{futures:e=[]}=a.rules;return s(e)})),maxStakingLimit:k((()=>{const e=a.stakeLevelRange.maxInfo,t=s(a.rules.spot).maxInfo;return Math.max(e.tokenStaking,t.tokenStaking)}
1)),initialize(){t.value&&this.getTradingFeeInfo(),this.getSpotConfiguration(),this.getTradingFeeRules()},refetchTradingFee(){this.getTradingFeeInfo(),this.getSpotConfiguration()},async getTradingFeeInfo(){try{this.tradingFeeInfo=await Qe.getStakeTradingFees()}catch(e){}},async getTradingFeeRules(){try{this.rules=await Qe.getStakeTradingFeeRules()}catch(e){}},async getSpotConfiguration(){try{this.spotConfiguration=await qe.getConfiguration()}catch(e){}}});function s(e=[]){const t=e.slice().sort(((e,t)=>e[Cn.level]-t[Cn.level])),a=e.length-1,s=t[0]||{},n=t[a]||{};return{min:s[Cn.level]||0,minInfo:s,max:n[Cn.level]||0,maxInfo:n}}G(Sn,a),z((()=>{a.initialize()}))}(),V(r,(()=>{y()}),{immediate:!0}),V((()=>t.name),(()=>{y()})),(e,t)=>{const a=l("RouterView");return u(),T("div",null,[D("div",Un,[m(g(xn)),D("div",Mn,[g(n)&&!g(d)?(u(),c(g(vn),{key:0,class:"prohibition-msg",feature:g(Ye).tokenStakingBenefits},null,8,["feature"])):p("",!0),m(g(On)),D("div",$n,[m(a)])])]),D("div",{class:A(g(Dn))},null,2)])}}},Hn=Rt(Vn,[["__scopeId","data-v-2943add1"]]),Wn=Object.freeze(Object.defineProperty({__proto__:null,default:Hn},Symbol.toStringTag,{value:"Module"})),zn={class:"my-benefits-content"},Gn={class:"info-item"},Kn={class:"info-content"},Yn={class:"title"},jn={class:"value"},qn=["src"],Qn={key:0,class:"info-item"},Jn={class:"info-content"},Xn={class:"title"},Zn={class:"des-wrap token-description"},ei=["src"],ti={key:1,class:"info-item"},ai={class:"info-content"},si={class:"title"},ni={class:"des-wrap"},ii={class:"value"},ri=["src"],oi={__name:"MyBenefitsContent",setup(e){const t=Tn(),a=k((()=>nt(N(t.stakeLevelRange.maxInfo[Cn.makerFee]||0).times(100).toNumber(),{defaultValue:"-",formatKey:"max8",postfix:"%"})));return(e,s)=>{const n=l("i18n-t");return u(),T("div",zn,[D("div",Gn,[D("div",Kn,[D("span",Yn,h(e.$t("token.staking.makerFeeDiscount")),1),m(n,{keypath:"t.lowAs",class:"des-wrap description",tag:"div"},{value:d((()=>[D("span",jn,h(a.value),1)])),_:1})]),D("img",{src:g("/static/img/BDCN1_Dw.png"),class:"des-img"},null,8,qn)]),g(t).isUseVip?(u(),T("div",Qn,[D("div",Jn,[D("span",Xn,h(e.$t("token.staking.stakeBrandToken")),1),D("div",Zn,h(e.$t("token.staking.stakeBrandToken.description")),1)]),D("img",{src:g("/static/img/CffQxg3K.png"),class:"des-img"},null,8,ei)])):(u(),T("div",ti,[D("div",ai,[D("div",si,h(e.$t("t.moreBenefits")),1),D("div",ni,[D("span",ii,h(e.$t("t.comingSoon")),1)])]),D("img",{src:g("/static/img/IrtDHpWa.png"),class:"des-img"},null,8,ri)]))])}}},li=Rt(oi,[["__scopeId","data-v-922ee515"]]),ci={class:"amount-wrap"},ui={class:"user-amount-wrapper"},di={class:"amount-text"},pi={class:"amount-avail-wrap"},mi={class:"user-amount"},gi={class:"amount-input-currency"},yi={key:0,class:"amount-convert-button-wrap"},hi={class:"amount-convert-text"},fi={__name:"TokenAmountWrap",props:t({availAmount:{type:Number,default:0},currency:{type:String,default:""},isShowConvert:{type:Boolean,default:!0},showConvertDialog:{type:Function,default:()=>{}},amountUnitText:{type:String,default:""},maxInputAmount:{type:Number,default:0}},{amount:{type:[String,Number],default:""},amountModifiers:{},amountError:{type:String,default:""},amountErrorModifiers:{}}),emits:["update:amount","update:amountError"],setup(e){const t="amountModel",s=a(e,"amount"),n=a(e,"amountError"),i=e,{t:r}=H(),{errors:o,defineField:c}=it({initialValues:{[t]:s.value},validationSchema:{[t]:{decimalPlaceLimit:8,betweenValue:{min:0,max:i.maxInputAmount,errorMsg:r("response-code.-4091")}}}}),[f,v]=c(t),S=k((()=>Math.floor(i.availAmount)>1e9?C(i.availAmount,"default"):C(i.availAmount,"max8")));function C(e,t="max"){return nt(e,t)}function w(){f.value=i.maxInputAmount}return V(f,(e=>{s.value=e})),V(o,(e=>{n.value=e[t]})),V(n,(e=>{o.value[t]=e})),(a,s)=>{const n=l("BrandButton"),i=l("BrandInput");return u(),T("div",ci,[D("div",ui,[D("p",di,h(a.$t("t.amount")),1),D("div",pi,[D("span",null,h(e.amountUnitText),1),D("span",mi,h(S.value),1),D("span",null,h(e.currency),1)])]),m(g(rt),{errorMessage:g(o)[t]},{default:d((({hasError:t})=>[m(i,P({value:g(f),"onUpdate:value":s[0]||(s[0]=e=>q(f)?f.value=e:null)},g(v),{class:"amount-input",textAlign:"right",isBrandNewStyle:"",isNumeric:"",isError:t}),{suffix:d((()=>[m(n,{class:"max-btn",type:"text",size:"fit",onClick:w},{default:d((()=>[y(h(a.$t("t.max.uppercase")),1)])),_:1}),D("p",gi,h(e.currency),1)])),_:2},1040,["value","isError"])])),_:1},8,["errorMessage"]),e.isShowConvert?(u(),T("div",yi,[D("button",{class:"amount-convert-button",onClick:s[1]||(s[1]=(...t)=>e.showConvertDialog&&e.showConvertDialog(...t))},[D("p",hi,h(a.$t("t.convertNow")),1),m(g(Js),{class:"amount-convert-icon"})])])):p("",!0)])}}},vi=Rt(fi,[["__scopeId","data-v-5852b138"]]),ki={class:"dialog-title"},Si={class:"dialog-body"},Di={class:"tip-info"},Ci={class:"dialog-agree-wrap"},wi={class:"agree-link"},bi=Rt({__name:"MyBenefitsStakeDialog",props:{tradingFeeData:{type:Object,required:!0}},emits:["update:isShowStakeSuccessDialog","update:successData","update:isShowFailDialog","update:failData","update:isShow"],setup(e,{emit:t}){const{POLICY_LINK:a}=Je,n=Tn(),i=e,r=t,f=te(),{currencyMap:C}=v(f),b=H(),A=s(""),_=s(!1),R=s(""),E=s(!1),I=s(!1),F=s(!1),L=k((()=>i.tradingFeeData.coin||"")),x=k((()=>{const e=C.value[L.value]||{};return N(e.available).dp(8,N.ROUND_DOWN).toNumber()})),B=k((()=>Math.min(N(n.maxStakingLimit).minus(i.tradingFeeData.stakedAmount).toNumber(),x.value))),P=k((()=>!_.value||0===Number(A.value)||Boolean(R.value)));function O(){A.value="",r("update:isShow",!1)}function U(){E.value=!0}function M(){E.value=!1}function $(){a&&window.open(a,"_blank")}async function V(){I.value=!0;try{await Qe.stakeForTradingFee({coin:L.value,amount:A.value}),r("update:isShowStakeSuccessDialog",!0),r("update:successData",{amount:A.value,currency:L.value}),await o(),O()}catch(e){if(e===lt.EXCEED_MAX_STAKING_AMOUNT)return void(R.value=b.t("response-code.-4091"));r("update:isShowFailDialog",!0),r("update:failData",{errorCode:e}),await o(),O()}finally{n.refetchTradingFee(),I.value=!1}}return z((()=>{F.value=!0,F.value=!1})),(t,a)=>{const s=l("CheckBox"),i=l("i18n-t"),r=l("BaseButton"),o=S("loading");return u(),c(g(ot),{class:"benefits-stake-dialog",width:"560px",fullStyle:t.isMobile,isBrandNewStyle:"",onClosed:O},{header:d((()=>[D("p",ki,h(t.$t("token.staking.stakeToken",{brandCurrency:t.$t("brand.currency")})),1)])),body:d((()=>[w((u(),T("div",Si,[m(g(vi),{amount:A.value,"onUpdate:amount":a[0]||(a[0]=e=>A.value=e),amountError:R.value,"onUpdate:amountError":a[1]||(a[1]=e=>R.value=e),availAmount:x.value,currency:e.tradingFeeData.coin,showConvertDialog:U,amountUnitText:t.$t("t.availableBalance"),maxInputAmount:B.value},null,8,["amount","amountError","availAmount","currency","amountUnitText","maxInputAmount"]),D("div",Di,h(t.$t("token.staking.stakeInfo",{brandCurrency:t.$t("brand.currency"),day:g(n).unfreezePeriodDay})),1),D("div",Ci,[m(s,{value:_.value,"onUpdate:value":a[2]||(a[2]=e=>_.value=e),class:"agree-check-box",name:"agreeTermsAndConditions",filledIn:""},null,8,["value"]),D("div",wi,[m(i,{keypath:"t.iAgreeToTerms",tag:"span"},{termsAndConditions:d((()=>[D("a",{onClick:$},h(t.$t("earn.transferDialog.termsAndConditions"))+". ",1)])),_:1})])]),m(r,{class:"primary block",size:"large",disabled:P.value,isLoading:I.value,onClick:V},{default:d((()=>[y(h(t.$t("t.stake")),1)])),_:1},8,["disabled","isLoading"])])),[[o,F.value]]),m(ba,null,{default:d((()=>[E.value?(u(),c(g(is),{key:0,closeDialog:M,fromCurrency:"USD",toCurrency:e.tradingFeeData.coin,selectToDisabled:!0,lockTransfer:!0},null,8,["toCurrency"])):p("",!0)])),_:1})])),_:1},8,["fullStyle"])}}},[["__scopeId","data-v-79892149"]]),Ti={class:"dialog-title"},Ai={class:"success-dialog-body"},_i={class:"title-text"},Ri={class:"des-text"},Ei={class:"info-wrap"},Ii={class:"title"},Fi={class:"value-wrap"},Li={class:"value"},Ni={class:"currency"},xi=Rt({__name:"MyBenefitsStakeSuccessDialog",props:{successData:{type:Object,default:()=>({})}},emits:["update:isShow"],setup(e,{emit:t}){const a=t;function s(){a("update:isShow",!1)}return(t,a)=>{const n=l("BaseButton");return u(),c(g(ot),{class:"success-dialog-wrap",width:"560px",fullStyle:t.isMobile,isBrandNewStyle:"",onClosed:s},{header:d((()=>[D("p",Ti,h(t.$t("t.stake")),1)])),body:d((()=>[D("div",Ai,[m(g(oe),{class:"dialog-success-icon"}),D("p",_i,h(t.$t("msg.success")),1),D("p",Ri,h(t.$t("token.staking.processed.des",{brandCurrency:t.$t("brand.currency")})),1)]),D("div",Ei,[D("span",Ii,h(t.$t("t.amount")),1),D("div",Fi,[D("span",Li,h(t.$filters.formatNumber(e.successData.amount,"wvc")),1),D("span",Ni,h(e.successData.currency),1)])]),m(n,{class:"primary block",size:"large",onClick:s},{default:d((()=>[y(h(t.$t("t.ok")),1)])),_:1})])),_:1},8,["fullStyle"])}}},[["__scopeId","data-v-2feeba9e"]]),Bi={class:"stake-fail-dialog-body"},Pi={class:"title-text"},Oi={class:"error-code"},Ui={class:"des-text"},Mi=["href"],$i=Rt({__name:"MyBenefitsFailDialog",props:{failData:{type:Object,required:!0}},emits:["update:isShow"],setup(e,{emit:t}){const a=t,s=te(),{lang:n}=v(s),i=k((()=>pe(n.value,"NEW_TICKET")));function r(){a("update:isShow",!1)}return(t,a)=>{const s=l("i18n-t"),n=l("BaseButton");return u(),c(g(ot),{class:"stake-fail-dialog-wrap",width:"560px",fullStyle:t.isMobile,isBrandNewStyle:"",onClosed:r},{body:d((()=>[D("div",Bi,[m(g(de),{class:"dialog-fail-icon"}),D("p",Pi,h(t.$t("t.unsuccessful")),1),D("span",Oi,h(t.$t("t.errorCode"))+" "+h(e.failData.errorCode),1),D("div",Ui,[D("p",null,h(t.$t("t.errorSubmitMsg")),1),m(s,{tag:"p",keypath:"t.tryOrContact"},{tryAgain:d((()=>[D("span",null,h(t.$t("t.try_again").toLowerCase()),1)])),customerSupport:d((()=>[D("a",{class:"link",href:i.value,target:"_blank",rel:"noopener nofollow"},h(t.$t("t.customerSupport")),9,Mi)])),_:1})]),m(n,{class:"primary block",size:"large",onClick:r},{default:d((()=>[y(h(t.$t("t.ok")),1)])),_:1})])])),_:1},8,["fullStyle"])}}},[["__scopeId","data-v-072b883e"]]),Vi={class:"dialog-title"},Hi={class:"dialog-body"},Wi={class:"bold"},zi=Rt({__name:"MyBenefitsUnstakeDialog",props:{tradingFeeData:{type:Object,required:!0}},emits:["update:isShow","update:isShowUnstakeSuccessDialog","update:successData","update:isShowFailDialog","update:failData"],setup(e,{emit:t}){const a=Tn(),n=e,i=t,r=s(""),p=s(""),f=s(!1),v=k((()=>n.tradingFeeData.coin||"")),S=k((()=>n.tradingFeeData.stakedAmount)),C=k((()=>0===Number(r.value)||Boolean(p.value)));function w(){r.value="",i("update:isShow",!1)}async function b(){f.value=!0;try{const{unlockDate:e}=await Qe.unStakeForTradingFee({coin:v.value,amount:r.value});i("update:isShowUnstakeSuccessDialog",!0),i("update:successData",{amount:r.value,currency:v.value,unlockDate:e})}catch(e){i("update:isShowFailDialog",!0),i("update:failData",{errorCode:e})}finally{a.refetchTradingFee(),f.value=!1,await o(),w()}}return(t,s)=>{const n=l("i18n-t"),i=l("BaseButton");return u(),c(g(ot),{class:"benefits-stake-dialog",width:"560px",fullStyle:t.isMobile,isBrandNewStyle:"",onClosed:w},{header:d((()=>[D("p",Vi,h(t.$t("token.staking.unStakeToken",{brandCurrency:t.$t("brand.currency")})),1)])),body:d((()=>[D("div",Hi,[m(g(vi),{amount:r.value,"onUpdate:amount":s[0]||(s[0]=e=>r.value=e),amountError:p.value,"onUpdate:amountError":s[1]||(s[1]=e=>p.value=e),availAmount:S.value,currency:e.tradingFeeData.coin,amountUnitText:t.$t("t.stake"),isShowConvert:!1,maxInputAmount:S.value},null,8,["amount","amountError","availAmount","currency","amountUnitText","maxInputAmount"]),m(n,{keypath:"token.staking.unStakeInfo",tag:"div",class:"tip-info"},{brandCurrency:d((()=>[y(h(t.$t("brand.currency")),1)])),day:d((()=>[D("span",Wi,h(g(a).unfreezePeriodDay),1)])),_:1}),m(i,{class:"red block",size:"large",disabled:C.value,isLoading:f.value,onClick:b},{default:d((()=>[y(h(t.$t("t.unstake")),1)])),_:1},8,["disabled","isLoading"])])])),_:1},8,["fullStyle"])}}},[["__scopeId","data-v-cbf2e36f"]]),Gi={class:"dialog-title"},Ki={class:"success-dialog-body"},Yi={class:"title-text"},ji={class:"des-text"},qi={class:"info-wrap"},Qi={class:"row"},Ji={class:"title"},Xi={class:"value-wrap"},Zi={class:"value"},er={class:"currency"},tr={class:"row"},ar={class:"title"},sr={class:"highlight"},nr=Rt({__name:"MyBenefitsUnstakeSuccessDialog",props:{successData:{type:Object,default:()=>({})}},emits:["update:isShow"],setup(e,{emit:t}){const a=Tn(),s=e,n=t,i=k((()=>{const{unlockDate:e}=s.successData;return M(new Date(e),"yyyy-MM-dd HH:mm:ss")}));function r(){n("update:isShow",!1)}return(t,s)=>{const n=l("BaseButton");return u(),c(g(ot),{class:"success-dialog-wrap",width:"560px",fullStyle:t.isMobile,isBrandNewStyle:"",onClosed:r},{header:d((()=>[D("p",Gi,h(t.$t("t.unstake")),1)])),body:d((()=>[D("div",Ki,[m(g(oe),{class:"dialog-success-icon"}),D("p",Yi,h(t.$t("msg.success")),1),D("p",ji,h(t.$t("token.staking.unStaking.processed.des",{brandCurrency:t.$t("brand.currency"),day:g(a).unfreezePeriodDay})),1)]),D("div",qi,[D("div",Qi,[D("span",Ji,h(t.$t("t.amountUnstaked")),1
1),D("div",Xi,[D("span",Zi,h(t.$filters.formatNumber(e.successData.amount,"max8")),1),D("span",er,h(e.successData.currency),1)])]),D("div",tr,[D("span",ar,h(t.$t("t.receiveDate")),1),D("span",sr,h(i.value),1)])]),m(n,{class:"primary block",size:"large",onClick:r},{default:d((()=>[y(h(t.$t("t.ok")),1)])),_:1})])),_:1},8,["fullStyle"])}}},[["__scopeId","data-v-221edb3c"]]),ir={class:"my-benefits-stake-container"},rr={class:"benefit-card"},or={class:"title-wrap"},lr={class:"title"},cr={class:"info-wrap"},ur={class:"info-title-container"},dr={class:"info-title"},pr={class:"info-value"},mr={key:2,class:"level-max-notice"},gr={class:"info-wrap"},yr={class:"info-title"},hr={class:"info-value"},fr={class:"info-wrap"},vr={class:"info-title"},kr={class:"info-value"},Sr={class:"button-wrap"},Dr={class:"benefit-card"},Cr={class:"title-wrap"},wr={class:"title"},br={class:"current-fee-discount-container"},Tr={class:"current-fee-discount"},Ar={class:"discount-item"},_r={class:"discount-title"},Rr={class:"discount-content"},Er={class:"fee-item"},Ir={class:"fee-title"},Fr={class:"fee-value"},Lr={class:"fee-item"},Nr={class:"fee-title"},xr={class:"fee-value"},Br={class:"discount-item"},Pr={class:"discount-title"},Or={class:"discount-content"},Ur={class:"fee-item"},Mr={class:"fee-title"},$r={class:"fee-value"},Vr={class:"fee-item"},Hr={class:"fee-title"},Wr={class:"fee-value"},zr=Rt({__name:"MyBenefitsStake",setup(e){const t=j(),a=te(),{lang:n}=v(a),i=Tn(),r=k((()=>i.stakeLevelRange)),{getVipLevelName:o}=ct(),f=s(!1),S=s(!1),C=s(!1),w=s(!1),b=s(!1),A=s({}),R=s({}),E=k((()=>i.tradingFeeInfo)),I=k((()=>i.currentStakeLevel));function F(){f.value=!0}function L(){w.value=!0}function x(e){return nt(e,"wvc")}function B(e){return nt(Ve(e)?N(e).times(100).toNumber():null,{defaultValue:"-",formatKey:"max8",postfix:"%"})}function P(){t.push({name:ue.TOKEN_STAKING_BENEFITS_HISTORY,params:{lang:n.value}})}return(e,t)=>{var a,s,v,k,N,O,U,M;const $=l("Tooltip"),V=l("BaseButton"),H=l("RouterLink");return u(),T("div",ir,[D("div",rr,[D("div",or,[D("span",lr,[D("div",cr,[D("div",ur,[D("div",dr,[y(h(e.$t("t.currentLevel"))+" ",1),g(i).isUseVip?(u(),c($,{key:0,tooltip:e.$t("token.stakingBenefits.myBenefits.currentLevel.tooltip",{min:0===r.value.min?r.value.min+1:r.value.min,max:r.value.max,nextMaxLevel:r.value.max+1})},{content:d((()=>[m(g(ut))])),_:1},8,["tooltip"])):p("",!0)]),D("div",{class:"title-link",onClick:P},h(e.$t("token.staking.history")),1)]),D("div",pr,[g(i).isUseVip?(u(),T(_,{key:0},[y(h(g(o)(I.value)),1)],64)):(u(),T(_,{key:1},[y(h(e.$t("token.staking.stakingTierNum",{tierNum:I.value})),1)],64)),g(i).isUseVip&&g(i).isStakeLevelMax?(u(),T("div",mr,h(e.$t("token.stakingBenefits.myBenefits.maxLevelNotice",{max:g(i).stakeLevelRange.max})),1)):p("",!0)])])])]),D("div",gr,[D("span",yr,h(e.$t("token.staking.tokenStaked",{brandName:e.$t("brand.name")})),1),D("span",hr,h(x(E.value.stakedAmount)),1)]),D("div",fr,[D("span",vr,h(e.$t("token.staking.scheduledUnstake")),1),D("span",kr,h(x(E.value.unstakePendingAmount)),1)]),D("div",Sr,[m(V,{class:"primary button-item",size:"large",onClick:F},{default:d((()=>[y(h(e.$t("t.stake")),1)])),_:1}),m(V,{class:"button-item outline-primary unstake-btn",size:"large",onClick:L},{default:d((()=>[y(h(e.$t("t.unstake")),1)])),_:1})])]),D("div",Dr,[D("div",Cr,[D("span",wr,h(e.$t("token.stakingBenefits.myBenefits.currentBenefits")),1),m(H,{class:"title-link",to:{name:g(se).FEE,params:{lang:g(n)}}},{default:d((()=>[y(h(e.$t("dashboard.my-trading-fee.feeStructure")),1)])),_:1},8,["to"])]),D("div",br,[D("div",Tr,[D("div",Ar,[D("div",_r,h(e.$t("t.spot")),1),D("div",Rr,[D("div",Er,[D("div",Ir,h(e.$t("t.maker")),1),D("div",Fr,h(B(null==(s=null==(a=E.value)?void 0:a.spot)?void 0:s.currentLevelMakerFee)),1)]),D("div",Lr,[D("div",Nr,h(e.$t("t.taker")),1),D("div",xr,h(B(null==(k=null==(v=E.value)?void 0:v.spot)?void 0:k.currentLevelTakerFee)),1)])])]),t[13]||(t[13]=D("div",{class:"current-fee-separator"},null,-1)),D("div",Br,[D("div",Pr,h(e.$t("t.futures")),1),D("div",Or,[D("div",Ur,[D("div",Mr,h(e.$t("t.maker")),1),D("div",$r,h(B(null==(O=null==(N=E.value)?void 0:N.futures)?void 0:O.currentLevelMakerFee)),1)]),D("div",Vr,[D("div",Hr,h(e.$t("t.taker")),1),D("div",Wr,h(B(null==(M=null==(U=E.value)?void 0:U.futures)?void 0:M.currentLevelTakerFee)),1)])])])])])]),f.value?(u(),c(g(bi),{key:0,isShow:f.value,"onUpdate:isShow":t[0]||(t[0]=e=>f.value=e),successData:A.value,"onUpdate:successData":t[1]||(t[1]=e=>A.value=e),isShowStakeSuccessDialog:S.value,"onUpdate:isShowStakeSuccessDialog":t[2]||(t[2]=e=>S.value=e),isShowFailDialog:C.value,"onUpdate:isShowFailDialog":t[3]||(t[3]=e=>C.value=e),failData:R.value,"onUpdate:failData":t[4]||(t[4]=e=>R.value=e),tradingFeeData:E.value},null,8,["isShow","successData","isShowStakeSuccessDialog","isShowFailDialog","failData","tradingFeeData"])):p("",!0),w.value?(u(),c(g(zi),{key:1,isShow:w.value,"onUpdate:isShow":t[5]||
1(t[5]=e=>w.value=e),successData:A.value,"onUpdate:successData":t[6]||(t[6]=e=>A.value=e),isShowUnstakeSuccessDialog:b.value,"onUpdate:isShowUnstakeSuccessDialog":t[7]||(t[7]=e=>b.value=e),isShowFailDialog:C.value,"onUpdate:isShowFailDialog":t[8]||(t[8]=e=>C.value=e),failData:R.value,"onUpdate:failData":t[9]||(t[9]=e=>R.value=e),tradingFeeData:E.value},null,8,["isShow","successData","isShowUnstakeSuccessDialog","isShowFailDialog","failData","tradingFeeData"])):p("",!0),S.value?(u(),c(g(xi),{key:2,isShow:S.value,"onUpdate:isShow":t[10]||(t[10]=e=>S.value=e),successData:A.value},null,8,["isShow","successData"])):p("",!0),C.value?(u(),c(g($i),{key:3,isShow:C.value,"onUpdate:isShow":t[11]||(t[11]=e=>C.value=e),failData:R.value},null,8,["isShow","failData"])):p("",!0),b.value?(u(),c(g(nr),{key:4,isShow:b.value,"onUpdate:isShow":t[12]||(t[12]=e=>b.value=e),successData:A.value},null,8,["isShow","successData"])):p("",!0)])}}},[["__scopeId","data-v-a33971ca"]]),Gr={class:"benefits-discounts-wrap"},Kr={class:"title-wrap"},Yr={class:"title"},jr={class:"fee-discounts"},qr={class:"block-wrap"},Qr={class:"title"},Jr={class:"info-wrap"},Xr={class:"info-title"},Zr={class:"info-value"},eo={class:"info-wrap"},to={class:"info-title"},ao={class:"info-value"},so={class:"block-wrap"},no={class:"title"},io={class:"info-wrap"},ro={class:"info-title"},oo={class:"info-value"},lo={class:"info-wrap"},co={class:"info-title"},uo={class:"info-value"},po=Rt({__name:"MyBenefitsDiscounts",setup(e){const t=j(),a=te(),{lang:s}=v(a),n=Tn(),i=k((()=>{const{futures:e={},spot:t={}}=n.tradingFeeInfo;return{spot:{makerFee:t.currentLevelMakerFee,takerFee:t.currentLevelTakerFee},futures:{makerFee:e.currentLevelMakerFee,takerFee:e.currentLevelTakerFee}}}));function r(e){const t=e??"-";return"-"===t?t:`${N(e).times(100)}%`}function o(){t.push({name:se.FEE,params:{lang:s.value}})}return(e,t)=>(u(),T("div",Gr,[D("div",Kr,[D("span",Yr,h(e.$t("token.staking.makerFeeDiscount")),1),D("span",{class:"fee-structure",onClick:o},h(e.$t("dashboard.my-trading-fee.feeStructure")),1)]),D("div",jr,[D("div",qr,[D("span",Qr,h(e.$t("t.spot")),1),D("div",Jr,[D("span",Xr,h(e.$t("t.maker")),1),D("span",Zr,h(r(i.value.spot.makerFee)),1)]),D("div",eo,[D("span",to,h(e.$t("t.taker")),1),D("span",ao,h(r(i.value.spot.takerFee)),1)])]),t[0]||(t[0]=D("div",{class:"split-line"},null,-1)),D("div",so,[D("span",no,h(e.$t("t.futures")),1),D("div",io,[D("span",ro,h(e.$t("t.maker")),1),D("span",oo,h(r(i.value.futures.makerFee)),1)]),D("div",lo,[D("span",co,h(e.$t("t.taker")),1),D("span",uo,h(r(i.value.futures.takerFee)),1)])])])]))}},[["__scopeId","data-v-e3f58ef7"]]),mo=Rt(Object.assign({inheritAttrs:!1},{__name:"MyBenefitsLoginContent",setup(e){const{enableBrandFeeStructureChange:t}=dt;return(e,a)=>(u(),T("div",{class:A(["my-benefits-login-content",{"fee-change":g(t)}])},[m(g(zr)),g(t)?p("",!0):(u(),c(g(po),{key:0}))],2))}}),[["__scopeId","data-v-c8955e3e"]]),go={class:"my-benefits"},yo={class:"title-wrap"},ho={class:"title"},fo=Rt({__name:"MyBenefits",setup(e){const{POLICY_LINK:t}=Je,{enableBrandFeeStructureChange:a}=dt,{t:s}=H(),n=te(),{loginState:i}=v(n),{hasStakingBenefitsPermission:r}=Ze(),o=k((()=>i.value?s("token.staking.myStakingBenefits"):s("token.staking.stakingBenefits"))),l=k((()=>r.value?mo:li));function d(){window.open(t,"_blank","noopener")}return(e,s)=>(u(),T("div",go,[D("div",yo,[D("span",ho,h(o.value),1),!g(a)&&g(t)?(u(),T("span",{key:0,class:"learn-more",onClick:d},h(e.$t("t.learnMore")),1)):p("",!0)]),(u(),c(f(l.value)))]))}},[["__scopeId","data-v-095d2a5e"]]),vo="/static/img/CK-nwuUQ.png",ko={class:"max-level-block"},So={class:"max-level-content-wrap"},Do=["src"],Co={class:"des-wrap"},wo={class:"title"},bo={class:"des"},To=["src"],Ao=Rt({__name:"MaxLevelBlock",setup:e=>(e,t)=>(u(),T("div",ko,[D("div",So,[D("img",{src:g(vo),class:"icon-announce left"},null,8,Do),D("div",Co,[D("span",wo,h(e.$t("t.congrats")),1),D("span",bo,h(e.$t("token.staking.levelUp.max.des")),1)]),D("img",{src:g(vo),class:"icon-announce right"},null,8,To)])]))},[["__scopeId","data-v-aa8b409c"]]),_o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVgSURBVHgBzZhdbBRVFMf/9850P+i2nVagSPkYUBJMsIJRo0bjNkZD+JCi0cQEgvpg8AML0cTIC23Cg9EHiWJiwkPhyaCJbGgRNNGufCQmklAaoxAQBggIheAWULrbnbmee7e77HZmp9vdtuGX3J2dO+fO/Peec+85s8BdDkMZhFq7ohq0VQ6HCYHFdBMDmSZJCKCXMWYxx/nFRio+GFttoUxKFmi07jFSPNQGITbmiSkJEhznQuz6N7Z8J8bIqAIrEeaBRWo3/RdbFit1gK9A6UrGtE4yMjGOCIZtQSfZkYitToxmW1Rg+KUDbRRD2zBxWI
15ItowWn9yrc8qL+7dMsDiJyVmwJ9S6x/Qzcs2gFEfx1o7JwwqI5JJi7tbzT2TMFRP3zgoTddU6xkLf2Zvos27gfP9tPzMzyYJ76NjidZHdEbffZEz0FFsQf3wVxdzpYZTDod+v483tfb5CBa3u27FlrrDKxaDGRdt4r9YsTy9qwJ/0A9e0NBW1YQxb5JYGL4Fy9ugXbMQE88kbD2BOcS8YKQRcGvjwxxZMAnXVVXiXYrkojLWNnEUV9YKJaFlJmdjaedjV17ygES88tcDTfo7hQDgpMB7wumwMpgblLLbnBKpsUUHsbe084tn/6YZnseHlR1z9dREd4vY1sOqZnuOYnWqDGd0GK662Hc7Bo6gQNqXR1bp/veRpe+7vAcBO+dxrmlEVbnote64Lxp4p171ZOAkaydrlzZ62ew+doi3Fhi96ZBV9qi1HZxBGmWWhYsfmZWDBhoK+ZrMGzfNqXbbbvz2KrsOnyL7e75ZggZooudmQbqZFwhajAtYufbAkOynugy9+yggI1vraMi2AKkwxh6jw5ZgEjp/up3Yl8/DwVJqhOv8BWhCOBjVxkyLwofunY8dHy3Hym/Uw591X0hgumNoPdcogFqUZE2VysPe8q8+IhNBMokYyd0Yddn/4MJ54/wh8sZNUeA8LpAIhUckief69rz37pZgfP39VHfORi0dWRl92W0Xv6Qxey33nlEaOo1Kqql3t3LWkZ5ZRImdX+d8vdZOmTKiNWleviMA6VIBW5x1X9Y2mZ/+caQE4lE04LZiRCBInGxzWqwQGkdyZQvAzlMnce2uh1bsrlDUts/C2X2Fge9eG4tZFdUwjbSmBstQOr/4+TrMYRRmc3P0WxorKJkXSnf3PCVogwoJ1wJLnapuh1NOBSaSLBHqh3HtL5fB4tk8JHIytjIu8zolEZpNzlwc8N2v7ym/qyBy2C/kCJRM9i1LUK5u/UylPPThQmO5kCeZcz7g3bXXHs/251zQ5i+HndsRZpCnq+YCrFNRO8TLJi4FbSRw8dh57qUCQxyyqFtTuFKyCNua0tX/4oiiYqIIdOrRofRSznuzxWv4Sm37hWEUWwKvAIzNd7rUvHYZ9tU+6sTd9dt+S/Gta/km6/6jFQg31vGb244wS9khEaiDzhWmlN5opFjTAq2eQuCbqChWKo7iz+4/Jf8AStrBbkDhd8ALvznFmK1W0kR59/srFVJdhIlHiLg8vDIhNQ2f2ud6LNdeoxIlBJzLzB3bzQisL32OwQC3GGxlz9sWDcKRbM3Skz+z72Mu2eJVgLjU1rvXoMx4z+dRmeLm8HBzKFPaFnzPpLCeuu72YvX8ZQyJ1pneyYE1Ua3wUvGEhKhJGLh3eiFXMccY2Df3VtdNvXEl1lj5/RTsd2igmDUarkNcvVAE/GtKV4vpJ2DfO5IQNq4unRfr1bDqrWKBCupxp7fTneK7ykWJlec5Dd7YlMXQjk2dp481zY04YtY78jXj8BOYLBae/hvk6Gh0dzVy6kh6yCw5iYxGW5X8IqvVI2ie93wAAAABJRU5ErkJggg==",Ro={class:"how-level-up"},Eo={class:"main-title-container"},Io={class:"main-title"},Fo={key:0,class:"title-link"},Lo={class:"des"},No={key:0,class:"tier-wrap"},xo={class:"level-info-wrap"},Bo={class:"level-info-block"},Po={class:"state-text"},Oo={class:"state-value-wrap"},Uo={class:"state-value"},Mo=["src"],$o={class:"state-value"},Vo={class:"level-info-block"},Ho={class:"state-text"},Wo={class:"state-value-wrap"},zo={class:"state-value"},Go=["src"],Ko={class:"state-value"},Yo=Rt({__name:"HowLevelUp",setup(e){const t=te(),{lang:a}=v(t),s=Tn(),{getVipLevelName:n}=ct(),i=k((()=>s.tradingFeeInfo)),r=k((()=>s.isStakeLevelMax));return(e,t)=>{const o=l("RouterLink");return u(),T("div",Ro,[D("div",Eo,[D("div",Io,h(e.$t("vip.program.levelUp.title")),1),g(s).isUseVip?(u(),T("div",Fo,[m(o,{class:"vip-program-link",to:{name:g(ue).VIP_PROGRAM,params:{lang:g(a)}}},{default:d((()=>[y(h(e.$t("token.benefitsRequirement.howToUpgrade.goToVipProgramLink")),1)])),_:1},8,["to"])])):p("",!0),D("div",Lo,[g(s).isUseVip?(u(),T(_,{key:0},[y(h(e.$t("token.stakingBenefits.howLevelUp.upgradeVip.description")),1)],64)):(u(),T(_,{key:1},[y(h(e.$t("token.staking.howLevelUp.des")),1)],64))])]),r.value?g(s).isUseVip?(u(),c(Ao,{key:1,class:"how-level-up-max-level"})):p("",!0):(u(),T("div",No,[D("div",xo,[D("div",Bo,[D("span",Po,h(e.$t("t.current")),1),D("div",Oo,[g(s).isUseVip?(u(),T(_,{key:0},[m(g(pt),{class:"icon-token"}),D("span",Uo,h(g(n)(g(s).currentStakeLevel)),1)],64)):(u(),T(_,{key:1},[D("img",{src:g(_o),class:"icon-token"},null,8,Mo),D("span",$o,h(e.$t("token.staking.tierNum",{tierNum:g(s).currentStakeLevel})),1)],64))])]),D("div",Vo,[D("span",Ho,h(e.$t("t.next")),1),D("div",Wo,[g(s).isUseVip?(u(),T(_,{key:0},[m(g(pt),{class:"next-icon-token"}),D("span",zo,h(g(n)(g(s).currentStakeLevel+1)),1)],64)):(u(),T(_,{key:1},[D("img",{src:g("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVISURBVHgBvVjLL2RZGP/urfLo8ioxounIlGdmNarFxsbcTgSJTXVsLNBtYWWhF9iO/gdELywmJDMSiW3NQiIh6css9IYRS88r8SgiFIV4Vs33O5Qpt+6tJ37JlzrOOffc3/3eh0QJQFEUe1pa2mceVrE4WewsjpAtSyzeQCAw6/f71ZmZGZUShBTP5vr6esVisfwOjhQfNBZVkqSvU1NTWjwPxkQwCWJGGGKi32IlGpHggylB7As9LzQm2ckk1WgbLWYLTU1NDtbaFA9d9PyAz34uKyuj9fX12UgbLWbk2MG/8/AXekGwFpVoJC0RyDnoFQCS5eXlJ0zyh+G6fqKxsRHkFP08vrS2tpbiwfn5ObRDy8vLUfcy0Q9GPmkN/aOhocE0UktLS6mtrY0Swf7+Pk1PT9P4+LjpHrbanxyU71VV9YbOy8EBTEvPH60CBQUF4uOGh4cpIyPDbJsjNTU17P2PBDnjD7Ca7fSCgJu0t7ebrvP7e5DaSE8Q2uPFT/QKcLlckbRo12tR+ODd3Z0iyzIlgoWFBVpcXHwyl5WVRXV1dVRUVGT4TG5urgggI0CL5FCGSLv3RUGQySWsPZAbGRkJm5+YmBBBAbJ6pKSkwKXIRCn2yp9sX1Y0GhDcHiYVSgJWq5XevHnzRI6Pj2l1ddVw/97eHqLW9Ly0FOoJjmU0ApQkoBE9wZKSEqqurg7bu7KyQru7u0KDZsiQfHarw6VgbGU1JxW5HHVUXFxMXLf/fwEHQVVVVdhen89H/f39Yhy6Xw9begplynsudkIVPuikJFBRUSEkGmDWvr4+oT2QixSUWLPeXjnEmF4B0ByC6ezsDFFqGDihwAdYpJuqVyMIQs3NzeR2u6m7u5tiSWmB+5aMrBxNaB4pUcBkMJ8elZWVhprq6Oigzc1Nmp+fNz2T8zJrLnBPkMl5KQlMTk4a5kGgq6tLiB69vb3U0tJCZri6unocs7blJUoSwqk5F+pldHRUaFgPRHleXp7pedfX1+Sne8XJuLywmZPSIt9bKDs7O0xQ0nJycgyfMZsHLi4uEBxCcaLUsZnH+KeHEgD8rLCwUJAMRbDFMmsMUEnMyh0I+iWbFkrQzQ8kRLC1tVVIPEDaQZOBj9MTBLmbmxu6ltPFPUWsotU+PT1NyszxYG5uznTN6/XSnZRKl/ROxd+P9DlVjNErAClpcHBQJGzU8FBAcycnJzyS1EvNrT0hqGma++joiF4SSEnwS5iYG9OwddxdgFPp7aOyQi9N6tramlpTU2PYvKJMeTyeiF2IEdC9oMyBHIgBON9msz3ZB+Vg/UrO0nzaP38F5/UlxMkV4F+0SkZAAjXrhGMFoh3kQqsXTLuxsSE+/lR+99GrzbuDa/qex8MEJO7nlMzMzLDDccDt7a04PB6Br4EYzoRp9eS2trZEefPLKd8OtOWh0HcaFmG73f6d78FKfn4+vSSC5PAbkKyaT/r1vVdzP8kmhl3j5eXlLIuL2x673hzPBbhKUHN8viZL9MGj/fDo95m1tV4m+DfXRBf/2lENUFufA3CTg4MDEXCoJiCHf3twFtGM9lsinCVI8q/CEfwWvpeenh6xVY9G7PDwkHZ2dkS1AJiYynnvI5PVzJ6L9jaQ/IM1KfHXKkiiOBwmF11vDGRhStzw0NVgHKzBbNqv29vbnXx+xAoWj3M5uEUaYC1+ChJDdEKg2WDuxMsh/OL7tikkbz7Mq2yNTi5pWiwvTcT7HVzkBzgV/cbkHLFokaMUWhpjTbpBkOJAsuHp5AByMkkn57ef6eEewdrU2IQnLEtMbolNm3BT/B+E0mED2h7m4gAAAABJRU5ErkJggg=="),class:"icon-token"},null,8,Go),D("span",Ko,h(e.$t("token.staking.tierNum",{tierNum:g(s).currentStakeLevel+1})),1)],64))])])]),r.value?p("",!0):(u(),c(un,{key:0,title:e.$t("token.staking.amountStaked"),currentAmount:i.value.stakedAmount,targetAmount:i.value.thresholdAmount,decimalPercent:i.value.percentageToNextLevel,unit:i.value.coin},null,8,["title","currentAmount","targetAmount","decimalPercent","unit"]))]))])}}},[["__scopeId","data-v-1d1fa504"]]),jo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAL4SURBVHgBzVfdUdtAEN6VNfDqElSCnBQQ+ZGBBKggTgVABdgVhFSAqQAy/OUtSgNYqSAqQa8hRptvD6GczrKRZTxhZzTW7Z3uvt377tsz0X82thvhpUTkUUCrWE4p5siSbU6aDK8CuJIxM32kl7EMk1/kOZ0l7zmmJQFkxdPGusVjLzLO72mU7HPqDvbrZhAgRwo/UUsLbyXAVkQsCIYpwnwD3qAoPJe+C8KjNViyxSkCGE92uI/FNRDNZsCbdOqOXQuAChgAkQd6zKYgC0p0y/ymE5m0TmlQ29lBhFNKkw98UQsC/t6NxAoAzT088dIAsEDAHh3X9okBQb
11rSRHtUR0QyekrCB5hjne2vzmA6oLxjI9NdAF36BRki0G2zOl/andXBqDkcn26RZzTxCzQMWkeVwbkEDjPgE9t93pI6M9qCDJjUi9cBdAqA9jrXzPOvJTwlH5TRYbffpOD/MFskY47WxkALJjjT8HHfVtsisVP9B19Y1eWlzkFiWzQfHVEEXqaHCTs0ibUj2i3jBynke7pyP2sMYCC1ePnxoXXEmLhU4Qb2n4cwXjingxaAwm1DE+2uYdz3xcx+52qH++H4M7EZMey5kqIyID2YNGYnOknCHihHCi2IzbfXsqwELEQ9eAcv/2lAWCPu+LNkeLCWBVxgz6/uZXh3RaPnvwAM0QAabE1Ed4HWiO0r9UWaH2veVR+U+1H+odu0TFFic0Ysi89rY7h3YK7Qu9KJkAYmoccyZ6CE6qSFkFflISGYFzV+op1ShUsx7RTwhv5PuMUM2lQTv6HZkszeOSG3LYaRgt6M72A1N3/rBt3tjwAHzI7pdHcfr2UPEDtoJhJjeCoGfLJ453z37QNTe95+BlSS8PRPMbpiEzDKkhti1FjU2J6m6SLH2obv1/sgrQWAOY0+BR6HdqFBA9ECmLiJoXFD+2xtQAgKnvQ7YjaWfnHRKT0ZXgfJTt84g72n5tkJUPEWPgHiHkyj5i+84HKZUyrm9b+dN6ir8r+AiKRNCuMqKQEAAAAAElFTkSuQmCC",qo={class:"level-wrap"},Qo=["src"],Jo={class:"value"},Xo={class:"volume"},Zo={class:"currency"},el={class:"fee"},tl={class:"fee"},al=Rt({__name:"BenefitsRequirementTable",props:{rulesData:{type:Array,required:!0}},setup(e){const t=e,{t:a}=H(),s=Tn(),{getVipLevelName:n}=ct(),{sortKey:i,sortDirection:r,onSorting:o}=yn(),l=k((()=>{const e=t.rulesData.slice();if(i.value===Cn.level)e.sort(((e,t)=>r.value===Ke.asc?t[i.value]-e[i.value]:e[i.value]-t[i.value]));return e})),p=k((()=>[{id:Cn.level,label:s.isUseVip?a("vip.program.rules.header.vip"):a("token.staking.stakingTier"),isSortable:!0},{id:Cn.stake,label:a("t.stake")},{id:Cn.makerFee,label:a("t.makerFee"),columnClassName:"column-marker-fee"},{id:Cn.takerFee,label:a("t.takerFee")}]));function m(e){return nt(e,{formatKey:"max",defaultValue:"-"})}function f(e){const t=e??"-";return"-"===t?t:`${N(e).times(100).toNumber()}%`}return(e,t)=>(u(),c(g(gt),{class:"benefits-table-wrapper",columns:p.value,currentSortKey:g(i),currentSortDirection:g(r),rows:l.value,total:l.value.length,onSort:g(o)},{[`cell(${g(Cn).level})`]:d((({value:e})=>[D("div",qo,[g(s).isUseVip&&0===e?(u(),T(_,{key:0},[y(h(g(n)(e)),1)],64)):(u(),T(_,{key:1},[g(s).isUseVip?(u(),c(g(pt),{key:0,class:"icon-token"})):(u(),T("img",{key:1,src:g(jo),class:"icon-token"},null,8,Qo)),D("div",Jo,[D("span",null,h(g(n)(e,g(s).isUseVip?g(mt).VIP:"")),1)])],64))])])),[`cell(${g(Cn).stake})`]:d((({value:t})=>[D("span",Xo,h(m(t)),1),D("span",Zo,h(e.$t("brand.currency")),1)])),[`cell(${g(Cn).makerFee})`]:d((({value:e})=>[D("div",el,h(f(e)),1)])),[`cell(${g(Cn).takerFee})`]:d((({value:e})=>[D("div",tl,h(f(e)),1)])),_:2},1032,["columns","currentSortKey","currentSortDirection","rows","total","onSort"]))}},[["__scopeId","data-v-fa88a2d0"]]),sl={class:"level-wrap"},nl=["src"],il={class:"value"},rl={class:"fee-wrap"},ol={class:"fee-item"},ll={class:"title"},cl={class:"value"},ul={class:"fee-item"},dl={class:"title"},pl={class:"value"},ml={class:"volume-row"},gl={class:"title"},yl={class:"value"},hl={class:"currency"},fl={key:0,class:"action-wrap"},vl=Rt({__name:"BenefitsRequirementList",props:{rulesData:{type:Array,required:!0},type:{type:Number,required:!0}},setup(e){const t=e,a=Tn(),{getVipLevelName:n}=ct(),i=s(3),r=s(null),o=k((()=>t.rulesData.slice(0,i.value))),l=k((()=>i.value===t.rulesData.length));function d(){if(l.value)return i.value=3,void r.value.scrollIntoView();const e=t.rulesData.length,a=i.value+3;i.value=a>e?e:a}function f(e){const t=e??"-";return"-"===t?t:`${N(e).times(100)}%`}return V((()=>t.type),(()=>{i.value=3})),(e,t)=>(u(),T("div",{ref_key:"ruleListRef",ref:r,class:"vip-discounts-rule-list"},[(u(!0),T(_,null,R(o.value,((s,i)=>{return u(),T("div",{key:s[g(Cn).level],class:"rule-block"},[D("div",sl,[g(a).isUseVip&&0===e.value?(u(),T(_,{key:0},[y(h(g(n)(e.value)),1)],64)):(u(),T(_,{key:1},[g(a).isUseVip?(u(),c(g(pt),{key:0,class:"icon-token"})):(u(),T("img",{key:1,src:g(jo),class:"icon-token"},null,8,nl)),D("div",il,[D("span",null,h(g(n)(s[g(Cn).level],g(a).isUseVip?g(mt).VIP:"")),1)])],64))]),D("div",rl,[D("div",ol,[D("span",ll,h(e.$t("vip.program.rules.header.makerFee")),1),D("span",cl,h(f(s[g(Cn).makerFee])),1)]),D("div",ul,[D("span",dl,h(e.$t("vip.program.rules.header.takerFee")),1),D("span",pl,h(f(s[g(Cn).takerFee])),1)])]),D("div",ml,[D("span",gl,h(e.$t("t.stake")),1),D("span",yl,[y(h((r=s[g(Cn).stake],nt(r,{formatKey:"max",defaultValue:"-"})))+" ",1),D("span",hl,h(e.$t("brand.currency")),1)])]),i===o.value.length-1?(u(),T("div",fl,[t[0]||(t[0]=D("div",{class:"split-line"},null,-1)),D("div",{class:"action-btn",onClick:d},[m(g(yt),{class:A(["more-icon",{collapse:l.value}])},null,8,["class"])])])):p("",!0)]);var r})),128))],512))}},[["__scopeId","data-v-c6861cde"]]),kl={key:0,class:"how-to-upgrade"},Sl={class:"content-container"},Dl={class:"content-detail"},Cl={class:"content-title"},wl={class:"content-description"},bl={class:"content-rules"},Tl={class:"link-container"},Al=Rt({__name:"HowToUpgrade",setup(e){const{enableSpotTrade:t,enableFuturesTrade:a}=ye,s=H(),n=te(),{lang:i}=v(n),r=Tn(),o=k((()=>r.stakeLevelRange.max+1)),c=k((()=>[{title:s.t("token.benefitsRequirement.rules.increase",{item:s.t("t.days.spot.tradingVolume",{days:30})}),isEnable:t},{title:s.t("token.benefitsRequirement.rules.increase",{item:s.t("t.days.futures.tradingVolume",{days:30})}),isEnable:a}].filter((e=>e.isEnable))));return(e,t)=>{const a=l("RouterLink");return c.value.length?(u(),T("div",kl,[D("div",null,[m(g(kn),{class:"crown-icon"})]),D("div",Sl,[D("div",Dl,[D("div",Cl,h(e.$t("token.benefitsRequirement.howToUpgrade.title",{level:o.value})),1),D("div",wl,h(e.$t("token.benefitsRequirement.howToUpgrade.description",{level:o.value})),1),D("ol",bl,[(u(!0),T(_,null,R(c.value,(e=>(u(),T("li",{key:e.title,class:"content-rule-item"}
1,h(e.title),1)))),128))])]),D("div",Tl,[m(a,{class:"go-to-vip",to:{name:g(ue).VIP_PROGRAM,params:{lang:g(i)}}},{default:d((()=>[y(h(e.$t("token.benefitsRequirement.howToUpgrade.goToVipProgramLink")),1)])),_:1},8,["to"])])])])):p("",!0)}}},[["__scopeId","data-v-7bfe6b59"]]),_l={class:"benefits-requirement"},Rl={class:"benefits-requirement-content-wrap"},El={class:"title"},Il={class:"type-switcher"},Fl={class:"requirement-content"},Ll=Rt({__name:"BenefitsRequirement",setup(e){const t={0:"spot",1:"futures"},{t:a}=H(),n=Tn(),i=s(0),r=k((()=>[a("t.spot"),a("t.futures")])),o=k((()=>{const e=t[i.value];return n.rules[e]}));function l(e){i.value=e}return(e,t)=>(u(),T("div",_l,[D("div",Rl,[D("span",El,h(e.$t("token.staking.benefitsAndRequirement")),1),D("div",Il,[m(g(at),{ref:"typeSwitcher",class:"switcher",barHeight:4,type:g(tt).BOTTOM_BAR_NARROW,theme:g(et).compact,itemList:r.value,selected:i.value,onSelect:l},null,8,["type","theme","itemList","selected"])]),D("div",Fl,[e.isMobile?(u(),c(g(vl),{key:1,rulesData:o.value,type:i.value},null,8,["rulesData","type"])):(u(),c(g(al),{key:0,rulesData:o.value},null,8,["rulesData"]))]),g(n).isUseVip?(u(),c(g(Al),{key:0,class:"upgrade-section"})):p("",!0)])]))}},[["__scopeId","data-v-357b099a"]]),Nl={class:"staking-benefits-wrapper"},xl={class:"main-content-wrapper"},Bl={key:0,class:"level-section"},Pl={class:"benefits-requirement-wrapper"},Ol=Rt({__name:"StakingBenefits",setup(e){const t=Tn(),{hasStakingBenefitsPermission:a}=Ze(),n=s(!1),r=k((()=>t.isStakeLevelMax));return i((()=>{n.value=!0})),(e,s)=>(u(),T(_,null,[D("section",Nl,[D("div",xl,[m(g(fo)),g(a)?(u(),T("div",Bl,[g(t).isUseVip||!r.value?(u(),c(g(Yo),{key:0})):p("",!0),!g(t).isUseVip&&r.value?(u(),c(Ao,{key:1})):p("",!0)])):p("",!0)])]),n.value?(u(),c(Q,{key:0,to:`.${g(Dn)}`},[D("section",Pl,[m(g(Ll))])],8,["to"])):p("",!0)],64))}},[["__scopeId","data-v-a88a74f2"]]),Ul=Object.freeze(Object.defineProperty({__proto__:null,default:Ol},Symbol.toStringTag,{value:"Module"})),Ml={class:"time"},$l={class:"icon-wrap"},Vl=["src"];const Hl=Rt({name:"StakingHistoryRow",components:{IconChevronDown2:yt,HistoryStatus:gn},props:{data:{type:Object,default:()=>({})},index:{type:Number,required:!0}},data:()=>({TierCurrent:_o}),computed:{dateObj(){const e=M(new Date(this.data.date),"yyyy-MM-dd HH:mm:ss").split(" ");return{date:e[0],time:e[1]}},historyType(){const{historyType:e}=this.data;return this.$t(`t.${e.toLowerCase()}`)},netAmount(){return this.formatNumber(this.data.netAmount)}},methods:{formatNumber(e){return e=Number(e)||0,this.$filters.formatNumber(e,"wvc")}}},[["render",function(e,t,a,s,n,i){const r=l("Cell"),o=l("HistoryStatus"),p=l("IconChevronDown2"),g=l("Row");return u(),c(g,{class:A(["transaction-history-row",{"has-detail":a.data.hasDetail}]),index:a.index,disableBackground:!0,disableCssHoverEffect:!1},{default:d((()=>[m(r,{textAlign:"left"},{default:d((()=>[D("span",null,h(i.dateObj.date),1),D("span",Ml,h(i.dateObj.time),1)])),_:1}),m(r,{textAlign:"left"},{default:d((()=>[D("div",$l,[D("img",{src:n.TierCurrent,class:"icon-token"},null,8,Vl),D("span",null,h(e.$t("brand.currency")),1)])])),_:1}),m(r,{textAlign:"left"},{default:d((()=>[D("span",null,h(i.historyType),1)])),_:1}),m(r,{textAlign:"left"},{default:d((()=>[D("span",null,h(i.netAmount),1)])),_:1}),m(r,{textAlign:"left"},{default:d((()=>[m(o,{status:a.data.status},null,8,["status"])])),_:1}),m(r,{class:"detail"},{default:d((()=>[m(p,{class:"detail-icon"})])),_:1})])),_:1},8,["class","index"])}],["__scopeId","data-v-f9249254"]]),Wl={name:"HistoryDetailDialog",components:{Dialog:ot,TopInfoWrapper:Is,NetAmountWrapper:Ms,InfoWrapper:Qs},props:{isShow:{type:Boolean,required:!0},detailData:{type:Object,required:!0}},emits:["update:isShow"],computed:{infoList(){return[{title:this.$t("t.type"),value:this.historyType}]},historyType(){const{historyType:e}=this.detailData;return this.$t(`t.${e.toLowerCase()}`)}},methods:{closed(){this.$emit("update:isShow",!1)}}},zl={class:"flex-box flex-column"};const Gl=Rt(Wl,[["render",function(e,t,a,s,n,i){const r=l("TopInfoWrapper"),o=l("NetAmountWrapper"),p=l("InfoWrapper"),g=l("Dialog");return u(),c(g,{class:"history-detail-dialog",width:e.$isLargeSize(e.$mq)?"560px":"9
10%",bodyWithPadding:!1,fullStyle:e.isMobile,isBrandNewStyle:"",onClosed:i.closed},{header:d((()=>[y(h(e.$t("t.details")),1)])),body:d((()=>[D("div",zl,[m(r,{id:a.detailData.id,dateTime:a.detailData.date},null,8,["id","dateTime"]),m(o,{detailData:a.detailData},null,8,["detailData"]),m(p,{infoList:i.infoList},null,8,["infoList"])])])),_:1},8,["width","fullStyle","onClosed"])}]]),Kl=["ALL_TYPES","STAKE","UNSTAKE"],Yl={All_STATUS:"All_STATUS",COMPLETED:"COMPLETED",PROCESSING:"PROCESSING"},jl={data:()=>({historyData:[],isLoading:!1,isFirstLoad:!0}),computed:{listData(){return this.historyData||[]},asset(){var e;return null==(e=this.context.tradingFeeInfo)?void 0:e.coin},params(){const{start:e,end:t}=this.selectedDateRangeData||this.dateRangeData;if(!e)return;const a=this.formatTypeParams(Kl,this.type),s=this.formatStatusParams(Yl,this.status);return{asset:this.asset,fromTimestamp:e.getTime(),toTimestamp:t.getTime(),historyTypes:a,historyStatus:s,pageSize:this.pagination.pageSize,currentPage:this.pagination.currentPage}},stakingDownloadQueryOnly(){const e=["fromTimestamp","toTimestamp","historyTypes","historyStatus","asset"],t=Object.keys(this.params).filter((t=>e.includes(t))).reduce(((e,t)=>({...e,[t]:this.params[t]})),{zoneOffset:ft()});return new URLSearchParams(t).toString().replaceAll(/%2C/g,",")}},methods:{async getHistoryData(){if(!this.asset)return;this.isMobile?(this.isLoading=this.isFirstLoad,this.isFirstLoad=!1):this.isLoading=!0;const e=await ht.getTransactionHistory(this.params);this.isMobile&&this.loadMore?this.historyData=this.historyData.concat(e.data):this.historyData=e.data,this.setPaginationData(e),this.isLoading=!1,this.loadMore=!1},formatTypeParams:(e,t)=>"ALL_TYPES"!==t&&t?t:e.slice(1).join(","),formatStatusParams:(e,t)=>t!==Yl.All_STATUS&&t?t:Object.keys(e).slice(1).join(",")}},ql={isLastPage(){return this.pagination.currentPage===this.pagination.totalPages},showLoadMore(){return!this.isFirstLoad&&!this.isLastPage}},Ql={setPaginationData(e){const{totalRows:t,pageSize:a,currentPage:s,totalPages:n}=e;this.pagination={totalRows:t,pageSize:a,currentPage:s,totalPages:n}},handlePageChange(e){this.pagination.currentPage=e,this.loadMore=!0},handleLoadMore(){if(this.isFirstLoad||this.isLastPage||this.isLoading)return;const e=this.pagination.currentPage+1;this.handlePageChange(e)}},Jl={name:"StakingHistoryContent",components:{Dropdown:kt,DateRangePicker:os,HistoryTable:ds,Pagination:vt,HistoryDetailDialog:Gl},props:{dateRangeData:{type:Object,default:()=>({startDate:null,endDate:null})},setDateRangeData:{type:Function,required:!0},defaultRange:{type:Object,default:()=>({start:null,end:null})}},setup:()=>({context:Tn()}),data(){return{...jl.data(),loadMore:!1,StakingHistoryRow:Hl,selectedDateRangeData:this.dateRangeData,type:null,status:null,pagination:{pageSize:10,currentPage:1},isShowDetailDialog:!1,detailData:{}}},computed:{...jl.computed,...ql,headerTitlesData(){return[{id:"date",lang:this.$t("t.time"),textAlign:"left",sortable:!0},{id:"asset",lang:this.$t("t.asset"),textAlign:"left"},{id:"type",lang:this.$t("t.type"),textAlign:"left"},{id:"netAmount",lang:this.$t("t.netAmount"),textAlign:"left"},{id:"status",lang:this.$t("t.status"),textAlign:"left"},{id:"details"}]},typeList(){return Kl.map((e=>this.formatDropdownData(e)))},statusList(){return Object.keys(Yl).map((e=>this.formatDropdownData(e)))}},watch:{params(e,t){if(!St(e,t)){if(1!==e.currentPage&&e.currentPage===t.currentPage)return void(this.pagination.currentPage=1);this.getHistoryData()}}},created(){this.getHistoryData()},methods:{...jl.methods,...Ql,updateType(e){this.type=e},updateStatus(e){this.status=e},formatDropdownData(e){return{name:this.$t(`t.${e.toLowerCase()}`),value:e}},resetFilters(){this.selectedDateRangeData=this.defaultRange,this.$refs.typeDropdown.reset(),this.$refs.statusDropdown.reset()},handleRowClick(e){this.detailData=e,this.isShowDetailDialog=!0}}},Xl={class:"staking-history-wrap"},Zl={class:"filters-wrap"},ec={class:"filter-left"};const tc=Rt(Jl,[["render",function(e,t,a,s,n,i){const r=l("DateRangePicker"),o=l("Dropdown"),d=l("HistoryTable"),g=l("Pagination"),y=l("HistoryDetailDialog");return u(),T("div",Xl,[D("div",Zl,[D("div",ec,[m(r,{ref:"walletDatePicker",dateRange:n.selectedDateRangeData,"onUpdate:dateRange":t[0]||(t[0]=e=>n.selectedDateRangeData=e),defaultRange:a.defaultRange},null,8,["dateRange","defaultRange"]),m(o,{ref:"typeDropdown",class:A(["dropdown",{selected:!!n.type}]),list:i.typeList,handleUpdate:i.updateType,defaultValue:e.$route.query.type,placeholder:e.$t("t.type")},null,8,["class","list","handleUpdate","defaultValue","placeholder"]),m(o,{ref:"statusDropdown",class:A(["dropdown",{selected:!!n.status}]),list:i.statusList,handleUpdate:i.updateStatus,defaultValue:e.$route.query.status,placeholder:e.$t("t.status")},null,8,["class","list","handleUpdate","defaultValue","placeholder"]),D("span",{class:"reset",onClick:t[1]||(t[1]=(...e)=>i.resetFilters&&i.resetFilters(...e))},h(e.$t("t.resetFilters")),1)]),t[3]||(t[3]=D("div",{class:"filter-right"},null,-1))]),m(d,{rowComponent:n.StakingHistoryRow,headerTitlesData:i.headerTitlesData,listData:e.listData,isLoading:e.isLoading,handleRowClick:i.handleRowClick},null,8,["rowComponent","headerTitlesData","listData","isLoading","handleRowClick"]),e.isLoading?p("",!0):(u(),c(g,{key:0,class:"pagination",layout:"prev, pager, next, jumper",total:n.pagination.totalRows,pageSize:n.pagination.pageSize,totalPages:n.pagination.totalPages,currentPage:n.pagination.currentPage,pagerCount:5,background:!1,onHandleCurrentChangeP:e.handlePageChange},null,8,["total","pageSize","totalPages","currentPage","onHandleCurrentChangeP"])),n.isShowDetailDialog?(u(),c(y,{key:1,isShow:n.isShowDetailDialog,"onUpdate:isShow":t[2]||(t[2]=e=>n.isShowDetailDialog=e),detailData:n.detailData},null,8,["isShow","detailData"])):p("",!0)])}],["__scopeId","data-v-473b9954"]]),ac={class:"top-wrap"},sc={class:"time-wrap"},nc={class:"time"},ic={class:"staking-currency-wrap"},rc={class:"icon-wrap"},oc=["src"],lc={class:"amount"},cc={class:"note-wrap"};const uc={name:"StakingHistoryList",components:{StakingHistoryData:Rt({name:"StakingHistoryData",components:{WalletHistoryStatus:gn},props:{data:{type:Object,required:!0}},emits:["click"],data:()=>({TierCurrent:_o}),computed:{dateObj(){return dn(this.data.date)},netAmount(){return this.data.netAmount?this.formatNumber(this.data.netAmount):"-"},noteText(){const{historyType:e}=this.data;return this.$t(`t.${e.toLowerCase()}`)}},methods:{formatNumber(e){let t="wvc";return(e=Number(e)||0)>1e8&&(t="default"),this.$filters.formatNumber(e,t)}}},[["render",function(e,t,a,s,n,i){const r=l("WalletHistoryStatus");return u(),T("div",{class:"staking-history-data",onClick:t[0]||(t[0]=t=>e.$emit("click",t))},[D("div",ac,[D("div",sc,[D("span",null,h(i.dateObj.date),1),D("span",nc,h(i.dateObj.time),1)]),m(r,{status:a.data.status},null,8,["status"])]),D("div",ic,[D("div",rc,[D("img",{src:n.TierCurrent,class:"icon-token"},null,8,oc),D("span",null,h(e.$t("brand.currency")),1)]),D("span",lc,h(i.netAmount),1)]),D("div",cc,[D("span",null,h(i.noteText),1)])])}],["__scopeId","data-v-bc74baba"]]),NoDataAvailable:Ee},props:{listData:{type:Array,required:!0},isLoading:{type:Boolean,default:!1},handleRowClick:{type:Function,default:()=>{}}},computed:{isEmpty(){return!this.isLoading&&0===this.listData.length}}},dc={key:0,class:"loading-wrap"},pc={key:2,class:"transaction-history-list"};const mc=Rt(uc,[["render",function(e,t,a,s,n,i){const r=l("NoDataAvailable"),o=l("StakingHistoryData"),d=S("loading");return a.isLoading?w((u(),T("div",dc,null,512)),[[d,!0]]):i.isEmpty?(u(),c(r,{key:1,class:"no-data-available",emptyText:e.$t("t.noDataFound")},null,8,["emptyText"])):(u(),T("div",pc,[(u(!0),T(_,null,R(a.listData,(e=>(u(),c(o,{key:e.id,data:e,onClick:t=>a.handleRowClick(e)},null,8,["data","onClick"])))),128))]))}],["__scopeId","data-v-78380f08"]]),gc={name:"FilterDialog",components:{BrandDialog:le,WalletDropdown:kt,IconCalendar:Ct,IconChevronDown:yt,DateRangePickerDialog:Dt},props:{showFilterDialog:{type:Boolean,required:!0},defaultRange:{type:Object,required:!0},dateRangeData:{type:Object,required:!0},updateFilterData:{type:Function,required:!0},type:{type:String,default:""}},emits:["update:showFilterDialog"],data(){return{filterDateRangeData:this.dateRangeData,filterType:this.t
1ype,showDatePickerDialog:!1}},computed:{typeList(){return Kl.map((e=>this.formatDropdownData(e)))},dateRangeText(){return{start:Fe(this.filterDateRangeData.start,"yyyy-MM-dd"),end:Fe(this.filterDateRangeData.end,"yyyy-MM-dd")}}},methods:{updateType(e){this.filterType=e},formatDropdownData(e){return{name:this.$t(`t.${e.toLowerCase()}`),value:e}},onResetClick(){const{typeDropdown:e}=this.$refs;this.resetDate(),e&&e.reset()},onApplyClick(){this.updateFilterData({dateRangeData:this.filterDateRangeData,type:this.filterType}),this.close()},close(){this.$emit("update:showFilterDialog",!1)},resetDate(){this.filterDateRangeData=this.defaultRange},openDatePickerDialog(){this.showDatePickerDialog=!0}}},yc={class:"filters-wrap"},hc={class:"filter"},fc={class:"sub-title"},vc={class:"dates"},kc={class:"filter"},Sc={class:"sub-title"},Dc={class:"flex-box footer-wrapper items-end"};const Cc={name:"MobileStakingHistoryContent",components:{StakingHistoryList:mc,HistoryDetailDialog:Gl,IconCalendar:Ct,DateRangePickerDialog:Dt,FilterButton:wt,FilterDialog:Rt(gc,[["render",function(e,t,a,s,n,i){const r=l("IconCalendar"),o=l("IconChevronDown"),g=l("WalletDropdown"),f=l("DateRangePickerDialog"),v=l("BrandButton"),k=l("BrandDialog");return u(),c(k,{class:"filter-dialog",isBrandNewStyle:"",hideScrollbar:"",fullStyle:"",showClose:"",onClosed:i.close},{header:d((()=>[y(h(e.$t("t.filters")),1)])),body:d((()=>[D("div",yc,[D("div",hc,[D("span",fc,h(e.$t("t.timePeriod")),1),D("div",{class:"date-range-wrapper",onClick:t[0]||(t[0]=(...e)=>i.openDatePickerDialog&&i.openDatePickerDialog(...e))},[m(r,{class:"icon-calendar"}),D("div",vc,[D("span",null,h(i.dateRangeText.start),1),t[3]||(t[3]=D("span",null,"-",-1)),D("span",null,h(i.dateRangeText.end),1)]),m(o,{class:"arrow"})])]),D("div",kc,[D("span",Sc,h(e.$t("t.type")),1),m(g,{ref:"typeDropdown",class:A(["dropdown",{selected:!!n.filterType}]),height:"45px",list:i.typeList,handleUpdate:i.updateType,placeholder:e.$t("t.all_types"),defaultValue:a.type},null,8,["class","list","handleUpdate","placeholder","defaultValue"])])]),n.showDatePickerDialog?(u(),c(f,{key:0,showDatePickerDialog:n.showDatePickerDialog,"onUpdate:showDatePickerDialog":t[1]||(t[1]=e=>n.showDatePickerDialog=e),dateRange:n.filterDateRangeData,"onUpdate:dateRange":t[2]||(t[2]=e=>n.filterDateRangeData=e)},null,8,["showDatePickerDialog","dateRange"])):p("",!0)])),footer:d((()=>[D("div",Dc,[m(v,{class:"action-btn",type:"cancel",size:"biggest",onClick:i.onResetClick},{default:d((()=>[y(h(e.$t("t.reset")),1)])),_:1},8,["onClick"]),m(v,{class:"action-btn",size:"biggest",onClick:i.onApplyClick},{default:d((()=>[y(h(e.$t("earn.filter.apply")),1)])),_:1},8,["onClick"])])])),_:1},8,["onClosed"])}],["__scopeId","data-v-11065470"]]),IconChevronDown2:yt},props:{defaultRange:{type:Object,required:!0}},setup:()=>({context:Tn()}),data(){return{...jl.data(),loadMore:!1,pagination:{pageSize:15,currentPage:1},isShowDetailDialog:!1,detailData:{},showFilterDialog:!1,showDatePickerDialog:!1,dateRangeData:this.defaultRange,type:""}},computed:{...jl.computed,...ql,isFiltered(){return Boolean(this.type)&&"ALL_TYPES"!==this.type},dateRangeText(){return{start:Fe(this.dateRangeData.start,"yyyy-MM-dd"),end:Fe(this.dateRangeData.end,"yyyy-MM-dd")}}},watch:{params(e,t){if(!St(e,t)){if(1!==e.currentPage&&e.currentPage===t.currentPage)return void(this.pagination.currentPage=1);this.getHistoryData()}}},created(){this.getHistoryData()},methods:{...jl.methods,...Ql,resetFilters(){this.resetDate(),this.selectedCurrency="",this.$refs.typeDropdown.reset()},handleRowClick(e){this.detailData=e,this.isShowDetailDialog=!0},setDateRangeData(e){e&&(this.dateRangeData=e)},openDatePickerDialog(){this.showDatePickerDialog=!0},openFilterDialog(){this.showFilterDialog=!0},updateFilterData(e){const{dateRangeData:t,type:a}=e;this.setDateRangeData(t),this.type=a},resetDate(){const[e,t]=ps();this.setDateRangeData({start:e,end:t})}}},wc={class:"staking-history-wrap"},bc={class:"filter-wrapper"},Tc={class:"dates"},Ac={key:0,class:"load-more-wrap"};const _c=Rt(Cc,[["render",function(e,t,a,s,n,i){const r=l("IconCalendar"),o=l("FilterButton"),d=l("StakingHistoryList"),g=l("IconChevronDown2"),y=l("HistoryDetailDialog"),f=l("FilterDialog"),v=l("DateRangePickerDialog");return u(),T("div",wc,[D("div",bc,[D("div",{class:"date-range-wrapper",onClick:t[0]||(t[0]=(...e)=>
1i.openDatePickerDialog&&i.openDatePickerDialog(...e))},[m(r,{class:"icon-calendar"}),D("div",Tc,[D("span",null,h(i.dateRangeText.start),1),t[7]||(t[7]=D("span",null,"-",-1)),D("span",null,h(i.dateRangeText.end),1)])]),m(o,{class:"filter-btn",isFiltered:i.isFiltered,onClick:i.openFilterDialog},null,8,["isFiltered","onClick"])]),m(d,{listData:e.listData,isLoading:e.isLoading,handleRowClick:i.handleRowClick},null,8,["listData","isLoading","handleRowClick"]),e.isLastPage?p("",!0):(u(),T("div",Ac,[t[8]||(t[8]=D("div",{class:"split-line"},null,-1)),D("div",{class:"action-btn",onClick:t[1]||(t[1]=(...t)=>e.handleLoadMore&&e.handleLoadMore(...t))},[m(g,{class:"more-icon"})])])),n.isShowDetailDialog?(u(),c(y,{key:1,isShow:n.isShowDetailDialog,"onUpdate:isShow":t[2]||(t[2]=e=>n.isShowDetailDialog=e),detailData:n.detailData},null,8,["isShow","detailData"])):p("",!0),n.showFilterDialog?(u(),c(f,{key:2,showFilterDialog:n.showFilterDialog,"onUpdate:showFilterDialog":t[3]||(t[3]=e=>n.showFilterDialog=e),dateRangeData:n.dateRangeData,"onUpdate:dateRangeData":t[4]||(t[4]=e=>n.dateRangeData=e),defaultRange:a.defaultRange,type:n.type,updateFilterData:i.updateFilterData},null,8,["showFilterDialog","dateRangeData","defaultRange","type","updateFilterData"])):p("",!0),n.showDatePickerDialog?(u(),c(v,{key:3,showDatePickerDialog:n.showDatePickerDialog,"onUpdate:showDatePickerDialog":t[5]||(t[5]=e=>n.showDatePickerDialog=e),dateRange:n.dateRangeData,"onUpdate:dateRange":t[6]||(t[6]=e=>n.dateRangeData=e)},null,8,["showDatePickerDialog","dateRange"])):p("",!0)])}],["__scopeId","data-v-03cd5ae3"]]),Rc={class:"staking-history-wrapper"},Ec={class:"back-text"},Ic={key:0,class:"main-title"},Fc=Rt({__name:"StakingHistory",setup(e){const[t,a]=bt(),s={start:t,end:a},n=j(),i=te(),{lang:r}=v(i),o=W({startDate:null,endDate:null});function l(){n.push({name:ue.TOKEN_STAKING_BENEFITS,params:{lang:r.value}})}function d(e){e?Object.assign(o,e):Object.assign(o,s)}return z((()=>{d()})),(e,t)=>(u(),T("div",Rc,[D("div",{class:"back-wrap",onClick:l},[m(g(Tt),{class:"prev-btn"}),D("span",Ec,h(e.$t("t.back")),1)]),e.isMobile?p("",!0):(u(),T("div",Ic,h(e.$t("token.staking.stakeHistory",{brandCurrency:e.$t("brand.currency")})),1)),e.isMobile?(u(),c(g(_c),{key:1,defaultRange:s})):(u(),c(g(tc),{key:2,dateRangeData:o,"onUpdate:dateRangeData":t[0]||(t[0]=e=>o=e),setDateRangeData:d,defaultRange:s},null,8,["dateRangeData"]))]))}},[["__scopeId","data-v-20862e19"]]),Lc=Object.freeze(Object.defineProperty({__proto__:null,default:Fc},Symbol.toStringTag,{value:"Module"})),Nc={class:"info-field"},xc={key:0,class:"title"},Bc={key:1,class:"text"};const Pc=Rt({name:"InfoField"},[["render",function(e,t,a,s,n,i){return u(),T("div",Nc,[e.$slots.title?(u(),T("div",xc,[C(e.$slots,"title",{},void 0,!0)])):p("",!0),e.$slots.text?(u(),T("div",Bc,[C(e.$slots,"text",{},void 0,!0)])):p("",!0),C(e.$slots,"default",{},void 0,!0)])}],["__scopeId","data-v-08677e9c"]]),Oc={PENDING:0,PROCESSED:1,FAILED:2,TIME_UP_PENDING:3,TIME_UP_PROCESSED:4},{brandToken:Uc}=ye,Mc={AMOUNT:"amount",UNLOCK_DATE:"vesting_date"},$c={class:"vesting-history-table"},Vc={class:"title"},Hc={class:"table-wrap"},Wc={class:"cell-wrap amount-cell"},zc={class:"cell-wrap cell-unlock-date"};const Gc=Rt({name:"VestingHistoryTable",components:{DataTableWithPagination:_t,IconNotificationCheck:At},props:{list:{type:Array,default:()=>[]},pagination:{type:Object,required:!0},pageSize:{type:Number,required:!0},sorting:{type:Object,required:!0}},emits:["handleSort","handlePageChange"],data:()=>({COLUMN_IDS:Mc,REBATE_STATUS:Oc,brandToken:Uc}),computed:{tableHeader(){return[{id:Mc.AMOUNT,label:this.$t("t.amount")},{id:Mc.UNLOCK_DATE,label:this.$t("wallets.brandBalance.vesting.date"),textAlign:"right",isSortable:!0}]}},methods:{vestingDate:e=>e?M(new Date(e),"yyyy-MM-dd"):"-",onSort(e){this.$emit("handleSort",e)},onPageChange(e){this.$emit("handlePageChange",e)}}},[["render",function(e,t,a,s,n,i){const r=l("IconNotificationCheck"),o=l("DataTableWithPagination");return u(),T("div",$c,[D("div",Vc,h(e.$t("token.page.vestingHistory.table.title",{brandToken:n.brandToken}
1)),1),D("div",Hc,[m(o,{columns:i.tableHeader,rows:a.list,currentSortKey:a.sorting.sortBy,pageSize:a.pageSize,page:a.pagination.currentPage,total:a.pagination.total,onSort:i.onSort,onChangePage:i.onPageChange},{[`cell(${n.COLUMN_IDS.AMOUNT})`]:d((({value:t,info:a})=>[D("div",Wc,[D("div",null,h(e.$filters.formatNumber(t,"wvc"))+" "+h(a.marketName),1),a.rebateStatus===n.REBATE_STATUS.TIME_UP_PROCESSED?(u(),c(r,{key:0,class:"icon-notification-check"})):p("",!0)])])),[`cell(${n.COLUMN_IDS.UNLOCK_DATE})`]:d((({info:e})=>[D("div",zc,h(i.vestingDate(e.vestingDate)),1)])),_:2},1032,["columns","rows","currentSortKey","pageSize","page","total","onSort","onChangePage"])])])}],["__scopeId","data-v-88529645"]]),{brandToken:Kc}=ye,Yc={name:"VestingHistoryContent",components:{InfoField:Pc,VestingHistoryTable:Gc},data:()=>({isLoading:!1,data:{},pagination:{currentPage:1,total:0,totalPages:0},sorting:{sortBy:"",sortOrder:"desc"}}),computed:{...b(["currencyMap"]),availableBalance(){var e;return`${this.formatNumber((null==(e=this.currencyMap[Kc])?void 0:e.available)||0)} ${Kc}`},lockedBalance(){var e;return`${this.formatNumber((null==(e=this.data)?void 0:e.totalLockAmount)||0)} ${Kc}`},historyList(){var e,t;return(null==(t=null==(e=this.data)?void 0:e.vestingWalletList)?void 0:t.data)||[]},pageSize(){return this.isMobile?99999:10}},watch:{isMobile:{handler(){this.reset(),this.getTokenVestingHistoryData()}}},created(){this.getTokenVestingHistoryData()},methods:{async getTokenVestingHistoryData(){this.isLoading=!0;try{const e={currentPage:this.isMobile?1:this.pagination.currentPage,pageSize:this.pageSize,orderDirection:this.sorting.sortOrder,orderColumn:this.sorting.key};this.data=await De.getBrandTokenVestingData(e),this.pagination={currentPage:this.data.vestingWalletList.currentPage,total:this.data.vestingWalletList.totalRows,totalPages:this.data.vestingWalletList.totalPages}}catch{}this.isLoading=!1},formatNumber(e,t="wvc"){return this.$filters.formatNumber(e,{formatKey:t})},reset(){this.pagination={currentPage:1,total:0,totalPages:0},this.sorting={sortBy:"",sortOrder:"desc"}},handleSort({key:e,order:t}){e&&(this.sorting.sortBy=e),this.sorting.sortOrder=t,this.getTokenVestingHistoryData()},handlePageChange(e){this.pagination.currentPage=e,this.getTokenVestingHistoryData()}}},jc={class:"vesting-history-content"},qc={class:"vesting-history-info-wrap"};const Qc=Rt({name:"VestingHistory",components:{VestingHistoryContent:Rt(Yc,[["render",function(e,t,a,s,n,i){const r=l("InfoField"),o=l("VestingHistoryTable");return u(),T("div",jc,[D("div",qc,[m(r,null,{title:d((()=>[y(h(e.$t("t.availableBalance")),1)])),text:d((()=>[y(h(i.availableBalance),1)])),_:1}),m(r,null,{title:d((()=>[y(h(e.$t("wallets.brandBalance.locked")),1)])),text:d((()=>[y(h(i.lockedBalance),1)])),_:1})]),m(o,{class:"vesting-history-table",list:i.historyList,pagination:n.pagination,pageSize:i.pageSize,sorting:n.sorting,onHandleSort:i.handleSort,onHandlePageChange:i.handlePageChange},null,8,["list","pagination","pageSize","sorting","onHandleSort","onHandlePageChange"])])}],["__scopeId","data-v-6d747179"]])}},[["render",function(e,t,a,s,n,i){const r=l("VestingHistoryContent");return u(),T("div",null,[m(r)])}]]),Jc=Object.freeze(Object.defineProperty({__proto__:null,default:Qc},Symbol.toStringTag,{value:"Module"}));export{It as A,ba as C,Nt as D,Pt as F,ds as H,Mt as I,ys as M,Ms as N,un as P,sa as S,Is as T,Jc as V,os as W,Ut as _,xt as a,is as b,Et as c,Lt as d,Ft as e,ua as f,ps as g,ca as h,fn as i,rs as j,kn as k,vn as l,ms as m,fs as n,Ts as o,Fs as p,Qs as q,gs as r,vs as s,Js as t,yn as u,dn as v,gn as w,Wn as x,Ul as y,Lc as z}; 2//# sourceMappingURL=DTvt6p8J.js.map
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.