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]="0316da56-cffb-4900-abcb-58d2d8fb9a62",e._sentryDebugIdIdentifier="sentry-dbid-0316da56-cffb-4900-abcb-58d2d8fb9a62")}catch(n){}}();import{bE as e,aX as t,aL as n,ar as s,a8 as a,a9 as i,ab as r,ae as o,aK as c,af as l,ad as d,aa as u,ag as p,ak as m,al as y,am as h,aU as v,aW as C}from"./PmfENnFs.js";import{az as f,U as g,a0 as S,aq as w,pL as b,cl as I,al as P,di as D,nu as N,l as A,qh as k,nG as L,qi as $,pc as W,o$ as x,pd as B,cA as T,qj as R,iZ as _,c as E}from"./BhKTELSe.js";import{_ as q}from"./CRPzHAml.js";import{B as M}from"./B2s_l_PC.js";import{E as j}from"./B9zA1DCc.js";import{_ as O}from"./CHfSbCJU.js";import"./DzIKp7QL.js";import"./ByGuns7q.js";import"./chunk-lottie.zeumoeGY.js";import"./CXr9G-CP.js";import"./chunk-web3.7EmC4Up1.js";import"./chunk-web3-onboard-utils.D-9VMiP0.js";import"./chunk-sentry.q36DUBwH.js";import"./tad1MRrM.js";import"./cvxruSMo.js";import"./chunk-echarts.AHWYl6Ef.js";import"./ByOB-9wo.js";import"./DTvt6p8J.js";import"./xcw4LDtS.js";import"../../app.DuROpXuw.js";import"./Bam2FmDF.js";import"./B9Yq6Vz0.js";import"./B7TQbCQK.js";import"./BLBkQ53j.js";import"./CjHUvruO.js";import"./CRkpGd-d.js";import"./C2-AFtvo.js";import"./3JYsLZg7.js";import"./D-FrGiex.js";import"./DbKBa4Od.js";const Q={name:"WidgetHeader",components:{BrandIcon:g,IconChevron:f},emits:["onGoBack"],computed:{...n("bestpayWidget",{storeStep:e=>e.step,coinInfoMap:e=>e.coinInfoMap,storeReceiveCurrency:e=>e.receiveCurrency}),...t("bestpayWidget",["isQuoteStep"]),step:{get(){return this.storeStep},set(e){this.setWidgetStep(e)}},receiveCurrency:{get(){return this.storeReceiveCurrency},set(e){this.setReceiveCurrency(e)}},receiveInfo(){return this.coinInfoMap[this.receiveCurrency]||{}}},methods:{...e("bestpayWidget",["setWidgetStep","setReceiveCurrency"])}},F={class:"widget-title"};const U=q(Q,[["render",function(e,t,n,u,p,m){const y=s("IconChevron"),h=s("BrandIcon");return i(),a("div",F,[e.isQuoteStep?(i(),a("div",{key:0,class:"go-back",onClick:t[0]||(t[0]=t=>e.$emit("onGoBack"))},[c(y,{class:"icon-arrow"})])):r("",!0),o(" "+l(e.$t("display.expressBuy"))+" ",1),e.isQuoteStep?(i(),a(d,{key:1},[c(h,{name:m.receiveInfo.shortName,type:m.receiveInfo.isFiat?"fiat":"icon",showName:!1,size:"24",class:"title-currency"},null,8,["name","type"]),o(" "+l(m.receiveInfo.displayName),1)],64)):r("",!0)])}],["__scopeId","data-v-b90e5480"]]),H={name:"CurrencyWrapper",components:{BrandIcon:g,IconChevronDown:w,IconArrow:S},props:{spendAmountErrorMessage:{type:String,default:""}},emits:["onCurrencyClick"],data:()=>({hasFirstInput:!1,lastValidValue:""}),computed:{...n("bestpayWidget",{coinInfoMap:e=>e.coinInfoMap,spendCurrency:e=>e.spendCurrency,receiveCurrency:e=>e.receiveCurrency,storeSpendAmount:e=>e.spendAmount}),...t("bestpayWidget",["isQuoteStep","activePaymentCard","minSingleAmount","maxSingleAmount"]),spendAmount:{get(){return this.storeSpendAmount},set(e){this.setSpendAmount(e)}},spendInfo(){return this.coinInfoMap[this.spendCurrency]||{}},receiveInfo(){return this.coinInfoMap[this.receiveCurrency]||{}},spendPlaceholder(){return`${this.formatNumber(this.minSingleAmount)}-${this.formatNumber(this.maxSingleAmount)}`},isRowLayout(){return this.isQuoteStep&&this.isLargeSize}},watch:{spendAmount:{immediate:!0,handler(e){this.lastValidValue=e}}},methods:{...e("bestpayWidget",["setSpendAmount"]),validateNumberInput(e){/^[0-9]*\.?[0-9]*$/.test(e.target.value)?(this.lastValidValue=e.target.value,this.spendAmount=e.target.value):(this.spendAmount=this.lastValidValue,e.target.value=this.lastValidValue),this.hasFirstInput=!0},formatNumber(e,t="max8"){const n=`${e}`;return""===n||"0"===n?"":this.$filters.formatNumber(e,{formatKey:t,defaultValue:""})}}},G={class:"currency-card"},V={class:"currency-value"},K={class:"value-title"},z=["value","placeholder"],Y={key:0,class:"value-error"},X={class:"currency-select-name"},Z={class:"transaction-to"},J={class:"currency-card"},ee={class:"currency-value"},te={class:"value-title"},ne={class:"currency-select-name"};const se=q(H,[["render",function(e,t,n,o,d,m){const y=s("BrandIcon"),h=s("IconChevronDown"),v=s("IconArrow");return i(),a("div",{class:p(["currency-wrapper",{row:m.isRowLayout}])},[u("div",G,[u("div",V,[u("div",K,l(e.$t("wallets.deposit.youSpend")),1),u("input",{value:m.spendAmount,class:
1p(["value-input",{"font-20":m.isRowLayout}]),type:"text",placeholder:m.spendPlaceholder,onInput:t[0]||(t[0]=(...e)=>m.validateNumberInput&&m.validateNumberInput(...e))},null,42,z),d.hasFirstInput&&n.spendAmountErrorMessage?(i(),a("div",Y,l(n.spendAmountErrorMessage),1)):r("",!0)]),u("div",{class:p(["currency-select",{"p-6":m.isRowLayout}]),onClick:t[1]||(t[1]=t=>e.$emit("onCurrencyClick",{type:"spend"}))},[c(y,{displayName:m.spendInfo.displayName,type:m.spendInfo.isFiat?"fiat":"icon",name:m.spendInfo.shortName,showName:!1,size:"24"},null,8,["displayName","type","name"]),u("span",X,l(m.spendInfo.displayName),1),c(h,{class:"bar-arrow"})],2)]),u("div",Z,[c(v,{class:p(["to-arrow",{down:!m.isRowLayout}])},null,8,["class"])]),u("div",J,[u("div",ee,[u("div",te,l(e.$t("wallets.deposit.youReceive")),1),u("div",{class:p(["value-number",{"font-20":m.isRowLayout}])},l(m.formatNumber(e.activePaymentCard.exchange)),3)]),u("div",{class:p(["currency-select",{"p-6":m.isRowLayout}]),onClick:t[2]||(t[2]=t=>e.$emit("onCurrencyClick",{type:"receive"}))},[c(y,{displayName:m.receiveInfo.displayName,type:m.receiveInfo.isFiat?"fiat":"icon",name:m.receiveInfo.shortName,showName:!1,size:"24"},null,8,["displayName","type","name"]),u("span",ne,l(m.receiveInfo.displayName),1),c(h,{class:"bar-arrow"})],2)])],2)}],["__scopeId","data-v-939d6506"]]),ae={name:"PaymentCardInfo",props:{iconComponent:{type:Object,default:()=>I},title:{type:String,default:""},statusType:{type:String,default:b.NULL},statusText:{type:String,default:""},subtitle:{type:String,default:""}}},ie={class:"info-root"},re={class:"info-content"},oe={class:"info-header"},ce={class:"info-title"},le={class:"info-subtitle"};const de=q(ae,[["render",function(e,t,n,s,o,c){return i(),a("div",ie,[(i(),m(y(n.iconComponent))),u("div",re,[u("div",oe,[u("div",ce,l(e.$t(n.title)),1),n.statusText?(i(),a("div",{key:0,class:p(`tag ${n.statusType}`)},l(e.$t(n.statusText)),3)):r("",!0)]),u("div",le,l(e.$t(n.subtitle)),1)])])}],["__scopeId","data-v-f00f13e7"]]),ue={name:"PaymentMethodSelector",components:{IconChevronDown:w,PaymentCardInfo:de},props:{paymentInfo:{type:Object,default:()=>({})},isSelectable:{type:Boolean,default:!1}},emits:["click"],computed:{...n("bestpayWidget",{storeStep:e=>e.step}),...t("bestpayWidget",["isLandingStep"]),step:{get(){return this.storeStep},set(e){this.setWidgetStep(e)}}},methods:{...e("bestpayWidget",["setWidgetStep"]),clickHandler(e){this.isSelectable&&this.$emit("click",e)}}},pe={class:"payment-wrapper"},me={class:"payment-body"},ye={class:"payment-title"};const he=q(ue,[["render",function(e,t,n,o,d,y){const h=s("PaymentCardInfo"),v=s("IconChevronDown");return i(),a("div",{class:p(["payment-root",{"mt-auto":e.isLandingStep,selectable:n.isSelectable}]),onClick:t[0]||(t[0]=(...e)=>y.clickHandler&&y.clickHandler(...e))},[u("div",pe,[u("div",me,[u("div",ye,l(e.$t("t.paymentMethod")),1),c(h,{iconComponent:n.paymentInfo.icon,title:n.paymentInfo.title,statusType:n.paymentInfo.statusType,statusText:n.paymentInfo.statusText,subtitle:n.paymentInfo.subtitle},null,8,["iconComponent","title","statusType","statusText","subtitle"])]),n.isSelectable?(i(),m(v,{key:0,class:"arrow-down"})):r("",!0)])],2)}],["__scopeId","data-v-20fb6601"]]),ve={name:"TransactionInfo",components:{IconClock:D,IconInfo2:P},props:{quoteCountDown:{type:Number,default:0}},computed:{...n("bestpayWidget",["spendAmount","spendCurrency","receiveCurrency"]),...t("bestpayWidget",["activePaymentCard"]),convertRateText(){var e;return this.activePaymentCard.exchange?`1 ${this.receiveCurrency} â ${this.formatNumber((null==(e=this.activePaymentCard)?void 0:e.unitPrice)||0)} ${this.spendCurrency}`:"-"}},methods:{formatNumber(e,t="max8"){const n=`${e}`;return""===n||"0"===n?"":this.$filters.formatNumber(e,{formatKey:t,defaultValue:""})}}},Ce={class:"summary-panel"},fe={class:"panel-item"},ge={class:"panel-item-title"},Se={class:"panel-item-value"},we={class:"panel-item"},be={class:"panel-item-title"},Ie={class:"panel-item-value"},Pe={class:"value-number"},De={class:"panel-item"},Ne={class:"panel-item-title"},Ae={class:"panel-item-value"},ke={class:"value-number"},Le={class:"countdown-wrap"},$e={class:"font-16"};const We=q(ve,[["render",function(e,t,n,r,d,p){const m=s("IconInfo2"),y=s("ToolTip"),v=s("IconClock"),C=s("i18n-t");return i(),a("div",Ce,[u("div",fe,[u("div",ge,l(e.$t("t.unitPrice")),1),u("div",Se,l(p.convertRateText),1)]),u("div",we,[u("div",be,l(e.$t("wallet.topUp.totalSpend")),1),u("div",Ie,[u("span",Pe,l(p.formatNumber(e.spendAmount)),1),o(" "+l(e.spendCurrency),1)])]),u("div",De,[u("div",Ne,[o(l(e.$t("wallets.withdraw.receive"))+" ",1),c(y,{placement:"top"},{content:h((()=>[c(m,{class:"info-icon"})])),tooltip:h((()=>[o(l(e.$t("wallet.expressBuy.youReceive.tooltip")),1)])),_:1})]),u("div",Ae,[u("span",ke,l(p.formatNumber(e.activePaymentCard.exchange)),1),o(" "+l(e.receiveCurrency),1)])]),u("div",Le,[c(v),c(C,{keypath:"wallet.expressBuy.countDown"},{val:h((()=>[u("span",$e,l(n.quoteCountDown),1)])),_:1})])])}],["__scopeId","data-v-6a581856"]]),xe={class:"select-body"},Be={ref:"currencyListEle",class:"currency-list"},Te=["onClick"],Re={class:"sub-text"};const _e=q({name:"CurrencySelectDialog",components:{BrandDialog:A,CurrencySearchInput:N,Brand
1Icon:g},props:{title:{type:String,default:""},coinInfoMap:{type:Object,default:()=>({})},activeCoinName:{type:String,default:""},currencyList:{type:Array,default:()=>[]}},emits:["update:activeCoinName","closeDialog"],data:()=>({searchKey:""}),computed:{filterCurrencyList(){if(!this.searchKey)return this.currencyList;const e=this.searchKey.toUpperCase();return this.currencyList.filter((t=>t.includes(e)))},fullCurrencyList(){return this.filterCurrencyList.map((e=>this.coinInfoMap[e]))}},mounted(){const e=this.$refs.currencyListEle.querySelector(`.coin-${this.activeCoinName}`);e&&e.scrollIntoView()},methods:{selectCurrency(e){this.$emit("update:activeCoinName",e.shortName),this.$emit("closeDialog")},closeDialog(){this.$emit("closeDialog")}}},[["render",function(e,t,n,r,y,C){const f=s("CurrencySearchInput"),g=s("BrandIcon"),S=s("BrandDialog");return i(),m(S,{class:"currency-select-dialog",idPrefix:"currency-select-dialog",fullStyle:"",isBrandNewStyle:"",height:"100%",onClosed:C.closeDialog},{header:h((()=>[o(l(n.title),1)])),body:h((()=>[u("div",xe,[c(f,{value:y.searchKey,"onUpdate:value":t[0]||(t[0]=e=>y.searchKey=e),width:"100%",iconType:"magify"},null,8,["value"]),u("div",Be,[(i(!0),a(d,null,v(C.fullCurrencyList,(e=>(i(),a("div",{key:e.id,class:p(["currency-item",{actived:n.activeCoinName===e.shortName,[`coin-${e.shortName}`]:!0}]),onClick:t=>C.selectCurrency(e)},[c(g,{displayName:e.displayName,type:e.isFiat?"fiat":"icon",name:e.shortName,showName:!0,size:"24"},null,8,["displayName","type","name"]),u("span",Re,l(e.name),1)],10,Te)))),128))],512)])])),_:1},8,["onClosed"])}
1],["__scopeId","data-v-12627991"]]),Ee={name:"PaymentSelectDialog",components:{BrandDialog:A,PaymentCardInfo:de,IconClock:D},props:{title:{type:String,default:""},selectedPayment:{type:String,default:""},paymentCards:{type:Array,default:()=>[]},quoteCountDown:{type:Number,default:0}},emits:["update:selectedPayment","closeDialog"],computed:{...n("bestpayWidget",{storeReceiveCurrency:e=>e.receiveCurrency}),receiveCurrency:{get(){return this.storeReceiveCurrency},set(e){this.setReceiveCurrency(e)}}},methods:{...e("bestpayWidget",["setReceiveCurrency"]),selectPayment(e){this.$emit("update:selectedPayment",e.providerMethodKey),this.$emit("closeDialog")},closeDialog(){this.$emit("closeDialog")},formatNumber(e,t="max8"){return this.$filters.formatNumber(e,{formatKey:t,defaultValue:"-"})}}},qe={class:"select-body"},Me=["onClick"],je={key:0,class:"card-item__value"},Oe={class:"value-currency"},Qe={class:"countdown-wrap"},Fe={class:"font-16"};const Ue={name:"BestpayPaymentQuote",components:{WidgetHeader:U,CurrencyWrapper:se,PaymentMethodSelector:he,TransactionInfo:We,IconInfo2:P,IconChevronDown:w,CurrencySelectDialog:_e,PaymentSelectDialog:q(Ee,[["render",function(e,t,n,y,C,f){const g=s("PaymentCardInfo"),S=s("IconClock"),w=s("i18n-t"),b=s("BrandDialog");return i(),m(b,{class:"payment-select-dialog",idPrefix:"payment-select-dialog",fullStyle:"",isBrandNewStyle:"",height:"100%",onClosed:f.closeDialog},{header:h((()=>[o(l(n.title),1)])),body:h((()=>[u("div",qe,[(i(!0),a(d,null,v(n.paymentCards,(e=>(i(),a("div",{key:e.providerMethodKey,class:p(["card-item",{acitved:n.selectedPayment===e.providerMethodKey}]),onClick:t=>f.selectPayment(e)},[c(g,{iconComponent:e.cardInfo.icon,title:e.cardInfo.title,statusType:e.cardInfo.statusType,statusText:e.cardInfo.statusText,subtitle:e.cardInfo.subtitle},null,8,["iconComponent","title","statusType","statusText","subtitle"]),e.exchange?(i(),a("div",je,[o(" â "+l(f.formatNumber(e.exchange))+" ",1),u("span",Oe,l(f.receiveCurrency),1)])):r("",!0)],10,Me)))),128)),u("div",Qe,[c(S,{class:"icon-clock"}),c(w,{keypath:"wallet.expressBuy.countDown"},{val:h((()=>[u("span",Fe,l(n.quoteCountDown),1)])),_:1})])])])),_:1},8,["onClosed"])}],["__scopeId","data-v-a51df1e9"]]),NotesDrawer:q({name:"NotesDrawer",components:{BrandDrawer:M,ExpressBuyNotes:j},props:{isShow:{type:Boolean,default:!1},activePaymentCard:{type:Object,default:()=>({})},isLoading:{type:Boolean,default:!1}},emits:["update:isShow"],computed:{...n("bestpayWidget",["spendCurrency"]),visible:{get(){return this.isShow},set(e){this.$emit("update:isShow",e)}}}},[["render",function(e,t,n,a,r,o){const l=s("ExpressBuyNotes"),d=s("BrandDrawer");return i(),m(d,{visible:o.visible,"onUpdate:visible":t[0]||(t[0]=e=>o.visible=e),class:"drawer-wrapper",title:e.$t("wallets.transactionInformation"),direction:"bottom"},{default:h((()=>[c(l,{isLoading:n.isLoading,spendCurrency:e.spendCurrency,activePaymentCard:n.activePaymentCard,disableExpand:""},null,8,["isLoading","spendCurrency","activePaymentCard"])])),_:1}
1,8,["visible","title"])}],["__scopeId","data-v-3b471ae6"]])},props:{quoteCountDown:{type:Number,default:0}},emits:["onNext"],data:()=>({isShowSpendCurrencyDialog:!1,isShowReceiveCurrencyDialog:!1,isShowPaymentSelectDialog:!1,isBottomBtnLoading:!1,isShowNotesDrawer:!1}),computed:{...n("bestpayWidget",{spendCurrencyList:e=>e.spendCurrencyList,receiveCurrencyList:e=>e.receiveCurrencyList,coinInfoMap:e=>e.coinInfoMap,paymentCards:e=>e.paymentCards,storeStep:e=>e.step,storeSpendAmount:e=>e.spendAmount,storeSpendCurrency:e=>e.spendCurrency,storeReceiveCurrency:e=>e.receiveCurrency,storeSelectedPayment:e=>e.selectedPayment}),...t("bestpayWidget",["isLandingStep","isQuoteStep","activePaymentCard","spendCurrencyDecimalLimit","minSingleAmount","maxSingleAmount"]),step:{get(){return this.storeStep},set(e){this.setWidgetStep(e)}},spendAmount:{get(){return this.storeSpendAmount},set(e){this.setSpendAmount(e)}},spendCurrency:{get(){return this.storeSpendCurrency},set(e){this.setSpendCurrency(e)}},receiveCurrency:{get(){return this.storeReceiveCurrency},set(e){this.setReceiveCurrency(e)}},selectedPayment:{get(){return this.storeSelectedPayment},set(e){this.setSelectedPayment(e)}},spendAmountErrorMessage(){const e=this.spendAmount,t=Number(e)||0,n=`${t}`;if(!e)return this.$t("rules.required");if(!/^(\d+)\.?(\d+)?$/.test(e))return this.$t("rules.numericalText");return new RegExp(`^-?\\d+(\\.\\d{1,${this.spendCurrencyDecimalLimit}})?$`).test(n)?this.minSingleAmount&&this.maxSingleAmount&&(t<this.minSingleAmount||t>this.maxSingleAmount)?this.$t("wallets.deposit.amount.tip",{min:this.formatNumber(this.minSingleAmount,this.spendCurrency),max:this.formatNumber(this.maxSingleAmount,this.spendCurrency)}):"":this.$t("rules.decimalDigits",{i:this.spendCurrencyDecimalLimit})},isTransactionLimit(){var e;const{txnLimit:t,amountLimit:n}=(null==(e=this.activePaymentCard)?void 0:e.limitSetting)||{};return $({txnLimit:t,amountLimit:n})},convertRateText(){var e;return`1 ${this.receiveCurrency} â ${this.formatNumber((null==(e=this.activePaymentCard)?void 0:e.unitPrice)||0)} ${this.spendCurrency}`},bottomBtnWord(){switch(this.step){case k.LANDING:return this.$t("wallet.expressBuy.getQuote");case k.QUOTE:return this.$t("t.next");default:return""}},isBottomBtnDisable(){return this.spendAmountErrorMessage||this.isTransactionLimit||this.selectedPayment===L.NO_PAYMENT||!this.spendAmount}},methods:{...e("bestpayWidget",["setWidgetStep","setSpendAmount","setSpendCurrency","setReceiveCurrency","setSelectedPayment"]),currencyHandler({type:e}){switch(e){case"spend":this.isShowSpendCurrencyDialog=!0;break;case"receive":this.isShowReceiveCurrencyDialog=!0}},onGoBack(){this.step=k.LANDING},btnHandler(){this.isLandingStep?this.step=k.QUOTE:this.$emit("onNext")},formatNumber(e,t="max8"){return this.$filters.formatNumber(e,{formatKey:t,defaultValue:""})}}},He={key:"pay-widget-container-0",class:"pay-widget-container"},Ge={class:"transaction-body"},Ve={key:0,class:"info-text"},Ke={class:"info-title"};const ze=q(Ue,[["render",function(e,t,n,d,p,y){const v=s("WidgetHeader"),C=s("CurrencyWrapper"),f=s("IconInfo2"),g=s("ToolTip"),S=s("PaymentMethodSelector"),w=s("TransactionInfo"),b=s("BaseButton"),I=s("IconChevronDown"),P=s("CurrencySelectDialog"),D=s("PaymentSelectDialog"),N=s("NotesDrawer");return i(),a("div",He,[c(v,{onOnGoBack:y.onGoBack},null,8,["onOnGoBack"]),u("div",Ge,[c(C,{spendAmountErrorMessage:y.spendAmountErrorMessage,onOnCurrencyClick:y.currencyHandler},null,8,["spendAmountErrorMessage","onOnCurrencyClick"]),e.isLandingStep&&e.activePaymentCard.exchange?(i(),a("div",Ve,[o(l(y.convertRateText)+" ",1),c(g,{placement:"top"},{content:h((()=>[c(f,{class:"info-icon"})])),tooltip:h((()=>[o(l(e.$t("wallet.expressBuy.tooltip")),1)])),_:1})])):r("",!0),c(S,{paymentInfo:e.activePaymentCard.cardInfo,isSelectable:e.paymentCards.length>1,onClick:t[0]||(t[0]=e=>p.isShowPaymentSelectDialog=!0)},null,8,["paymentInfo","isSelectable"]),e.isQuoteStep?(i(),m(w,{key:1,quoteCountDown:n.quoteCountDown},null,8,["quoteCountDown"])):r("",!0)]),c(b,{class:"primary w-100 bottom-button",size:"large",disabled:y.isBottomBtnDisable,isLoading:p.isBottomBtnLoading,onClick:y.btnHandler},{default:h((()=>[o(l(y.bottomBtnWord),1)])),_:1},8,["disabled","isLoading","onClick"]),e.isQuoteStep?(i(),a("div",{key:0,class:"transaction-info",onClick:t[1]||(t[1]=e=>p.isShowNotesDrawer=!0)},[u("div",Ke,l(e.$t("wallets.transactionInformation")),1),c(I,{class:"icon-arrow-down"})])):r("",!0),p.isShowSpendCurrencyDialog?(i(),m(P,{key:1,activeCoinName:y.spendCurrency,"onUpdate:activeCoinName":t[2]||(t[2]=e=>y.spendCurrency=e),title:e.$t("wallets.deposit.youSpend"),coinInfoMap:e.coinInfoMap,currencyList:e.spendCurrencyList,onCloseDialog:t[3]||(t[3]=e=>p.isShowSpendCurrencyDialog=!1)},null,8,["activeCoinName","title","coinInfoMap","currencyList"])):r("",!0),p.isShowReceiveCurrencyDialog?(i(),m(P,{key:2,activeCoinName:y.receiveCurrency,"onUpdate:activeCoinName":t[4]||(t[4]=e=>y.receiveCurrency=e),title:e.$t("wallets.deposit.youReceive"),coinInfoMap:e.coinInfoMap,currencyList:e.receiveCurrencyList,onCloseDialog:t[5]||
1(t[5]=e=>p.isShowReceiveCurrencyDialog=!1)},null,8,["activeCoinName","title","coinInfoMap","currencyList"])):r("",!0),p.isShowPaymentSelectDialog?(i(),m(D,{key:3,selectedPayment:y.selectedPayment,"onUpdate:selectedPayment":t[6]||(t[6]=e=>y.selectedPayment=e),title:e.$t("t.paymentMethod"),paymentCards:e.paymentCards,quoteCountDown:n.quoteCountDown,onCloseDialog:t[7]||(t[7]=e=>p.isShowPaymentSelectDialog=!1)},null,8,["selectedPayment","title","paymentCards","quoteCountDown"])):r("",!0),c(N,{isShow:p.isShowNotesDrawer,"onUpdate:isShow":t[8]||(t[8]=e=>p.isShowNotesDrawer=e),activePaymentCard:e.activePaymentCard},null,8,["isShow","activePaymentCard"])])}],["__scopeId","data-v-5866ce0d"]]),Ye={name:"BestpayPiqStep",components:{IconChevron:f},props:{fetchStorePayments:{type:Function,default:()=>{}}},data:()=>({WIDGET_STEP:k,isPiqLoading:!1}),computed:{...n(["lang"]),...n("bestpayWidget",["userId","spendAmount","spendCurrency","receiveCurrency"]),...t("bestpayWidget",["activePaymentCard"])},mounted(){this.paymentIqHandler()},methods:{...e("bestpayWidget",["setWidgetStep","setStatusData"]),...C("bestpayWidget",["checkStatus"]),async paymentIqHandler(){try{await this.fetchStorePayments(),this.isPiqLoading=!0,await this.$nextTick();const{merchantId:e,pToken:t,transactionHash:n}=this.activePaymentCard.ext||{},s={merchantId:e,userId:this.userId,pToken:t,currency:this.spendCurrency,expressBuyCurrency:this.receiveCurrency,amount:this.spendAmount||0,transactionHash:n,callback:this.piqActions,locale:this.lang,storeAccount:!1,showAccounts:"false",singlePageFlow:!0};x(s)}catch(e){this.isPiqLoading=!1}},piqActions(e){var t;const{CASHIER_INIT_LOAD:n,SUCCESS:s,FAILURE:a,PENDING:i,UNRESOLVED:r}=B,o=console;switch(o.log("=== PIQ Data Log ==="),o.log(e),e.cbType){case n:this.isPiqLoading=!1;break;case s:case i:case a:case r:{const n=W[null==(t=e.data)?void 0:t.statusCode];if(n)return this.setStatusData({status:n,hideViewHistory:!0,hideFooterViewWallet:!0,hideFooter:!0}),void this.setWidgetStep(k.RESULT);this.checkStatus();break}}}}},Xe={key:"pay-widget-container-1",class:"pay-widget-container"},Ze={class:"widget-title"};const Je=q(Ye,[["render",function(e,t,n,r,d,p){const m=s("IconChevron");return i(),a("div",Xe,[u("div",Ze,[u("div",{class:"go-back",onClick:t[0]||(t[0]=t=>e.setWidgetStep(d.WIDGET_STEP.LANDING))},[c(m,{class:"icon-arrow"})]),o(" "+l(e.$t("wallets.deposit.creditCardDatails")),1)]),t[1]||(t[1]=u("div",{id:"paymentiqCashier",class:"paymentiq-cashier"},null,-1))])}],["__scopeId","data-v-125b8945"]]),et={name:"BestpayResult",components:{WalletExpressBuyStatus:O,IconChevron:f},computed:{...n("bestpayWidget",["statusData"])},methods:{...e("bestpayWidget",["setWidgetStep","setSpendAmount"]),onAgain(){this.setSpendAmount(""),this.setWidgetStep(k.LANDING)}}},tt={key:"pay-widget-container-2",class:"pay-widget-container"},nt={class:"widget-title"};const st=q(et,[["render",function(e,t,n,r,d,p){const m=s("IconChevron"),y=s("WalletExpressBuyStatus");return i(),a("div",tt,[u("div",nt,[u("div",{class:"go-back",onClick:t[0]||(t[0]=(...e)=>p.onAgain&&p.onAgain(...e))},[c(m,{class:"icon-arrow"})]),o(" "+l(e.$t("display.expressBuy")),1)]),c(y,{statusData:e.statusData,onOnAgain:p.onAgain},null,8,["statusData","onOnAgain"])])}],["__scopeId","data-v-3f96c510"]]),at={name:"WarningPaymentDrawer",components:{BrandDrawer:M,IconAlertCircle:T},props:{isShow:{type:Boolean,default:!1},isCommonError:{type:Boolean,default:!1}},emits:["update:isShow"],computed:{visible:{get(){return this.isShow},set(e){this.$emit("update:isShow",e)}},title(){return this.isCommonError?this.$t("t.somethingWentWrong"):this.$t("wallets.payment.service_popup.title")},description(){return this.isCommonError?this.$t("t.pleaseTryAgain"):this.$t("wallets.payment.service_popup.desc")}}},it={class:"drawer-body"},rt={class:"body-title"},ot={class:"body-desc"};const ct={name:"WalletBestPayWidget",components:{BestpayPaymentQuote:ze,BestpayPiqStep:Je,BestpayResult:st,WarningPaymentDrawer:q(at,[["render",function(e,t,n,a,r,o){const d=s("IconAlertCircle"),p=s("BrandDrawer");return i(),m(p,{visible:o.visible,"onUpdate:visible":t[0]||(t[0]=e=>
1o.visible=e),class:"drawer-wrapper",direction:"bottom"},{default:h((()=>[u("div",it,[c(d,{class:"warn-icon"}),u("div",rt,l(o.title),1),u("div",ot,l(o.description),1)])])),_:1},8,["visible"])}],["__scopeId","data-v-dd6e00cc"]])},data:()=>({isInitGetPayments:!0,isShowWarningPaymentDrawer:!1,isNoPaymentInfo:!1,quoteCountDown:R,quoteCountDownTimer:null}),computed:{...n("bestpayWidget",{paymentCards:e=>e.paymentCards,storeSpendAmount:e=>e.spendAmount,storeSpendCurrency:e=>e.spendCurrency,storeReceiveCurrency:e=>e.receiveCurrency,storeSelectedPayment:e=>e.selectedPayment}),...t("bestpayWidget",["isLandingStep","isQuoteStep","isPiqStep","isResultStep","activePaymentCard"]),orderId(){return this.$route.query.orderId||""},spendAmount:{get(){return this.storeSpendAmount},set(e){this.setSpendAmount(e)}},spendCurrency:{get(){return this.storeSpendCurrency},set(e){this.setSpendCurrency(e)}},receiveCurrency:{get(){return this.storeReceiveCurrency},set(e){this.setReceiveCurrency(e)}},selectedPayment:{get(){return this.storeSelectedPayment},set(e){this.setSelectedPayment(e)}}},watch:{spendAmount(e){e?this.debounceFetchPaymentRate():this.clearPaymentCardsAllExchange()},spendCurrency(e){this.setReceiveCurrencyList(e),this.debounceFetchPaymentInfo()},receiveCurrency(){this.debounceFetchPaymentInfo()}},created(){this.setOrderId(this.orderId),this.debounceFetchPaymentInfo=E(this.fetchStorePayments,200),this.debounceFetchPaymentRate=E(this.fetchPaymentsRate,200)},async mounted(){await this.fetchCoinPairs(),await this.fetchStorePayments(),this.initQuoteCountdown()},beforeUnmount(){clearInterval(this.quoteCountDownTimer)},methods:{...e("bestpayWidget",["setOrderId","setWidgetStep","setReceiveCurrencyList","clearPaymentCardsAllExchange","setSpendAmount","setSpendCurrency","setReceiveCurrency","setSelectedPayment"]),...C("bestpayWidget",["fetchCoinPairs","fetchPayments","fetchPaymentsRate"]),async fetchStorePayments(){try{await this.fetchPayments(),this.checkAvailablePayment(this.paymentCards),this.isInitGetPayments=!1}catch(e){return Promise.reject(e)}},checkAvailablePayment(e){if(e.some((e=>e.providerMethodKey===this.selectedPayment)))return;const t=(e[0]||{}).providerMethodKey;if(t)this.selectedPayment=t;else{if(!this.isInitGetPayments)return this.selectedPayment!==L.NO_PAYMENT?(this.selectedPayment=L.NO_PAYMENT,void(this.isShowWarningPaymentDrawer=!0)):void 0;this.isShowWarningPaymentDrawer=!0}},nextHandler(){this.activePaymentCard.provider!==_.PIQ||this.setWidgetStep(k.PIQ)},initQuoteCountdown(){clearInterval(this.quoteCountDownTimer),this.debounceFetchPaymentRate(),this.quoteCountDown=R,this.quoteCountDownTimer=setInterval((()=>{this.quoteCountDown-=1,this.quoteCountDown<0&&(this.debounceFetchPaymentRate(),this.quoteCountDown=R)}),1e3)}}},lt={class:"pay-widget-root"};const dt=q(ct,[["render",function(e,t,n,o,l,d){const u=s("BestpayPaymentQuote"),p=s("BestpayPiqStep"),y=s("BestpayResult"),h=s("WarningPaymentDrawer");return i(),a("div",lt,[e.isLandingStep||e.isQuoteStep?(i(),m(u,{key:0,quoteCountDown:l.quoteCountDown,onOnNext:d.nextHandler},null,8,["quoteCountDown","onOnNext"])):e.isPiqStep?(i(),m(p,{key:1,fetchStorePayments:d.fetchStorePayments},null,8,["fetchStorePayments"])):e.isResultStep?(i(),m(y,{key:2})):r("",!0),c(h,{isShow:l.isShowWarningPaymentDrawer,"onUpdate:isShow":t[0]||(t[0]=e=>l.isShowWarningPaymentDrawer=e),isCommonError:l.isNoPaymentInfo},null,8,["isShow","isCommonError"])])}],["__scopeId","data-v-d1f4be95"]]);export{dt as default}; 2//# sourceMappingURL=DI4qQ4v_.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.