1import{$ as e,A as t,C as n,Ft as r,O as i,S as a,Y as o,b as s,h as c,mt as l,r as u,un as d,w as f,x as p}from"./vue.runtime.esm-bundler-BZJEAd2_.js";import{Fo as m,J as h,K as g,Ko as _,Nn as v,Pn as y,Rn as b,Yn as x,kr as S,lr as C}from"./track-Bk2Q6cbW.js";import{F as w}from"./useDialogControl-B0r4COHK.js";import{t as T}from"./ChainType-CfPzFvPs.js";import{n as E}from"./vue-i18n.runtime-85TcL2zd.js";import{t as D}from"./_plugin-vue_export-helper-BbECKVuF.js";var O={class:`chain-options`},k={class:`chain-label`},A={class:`list`},j=D(t({__name:`ChainOptions`,props:{chainType:{}},emits:[`select`],setup(t,{emit:n}){let r=t,i=n,l=C(),u=s(()=>g(r.chainType)),m=_(),h=s(()=>{if(!l.value.length)return[];let e=x(l.value).filter(e=>e.chainType===r.chainType);return m.value&&r.chainType===T.evm&&(e=e.filter(e=>e.type===S.WalletConnect||e.type===S.BoWallet)),e});return(t,n)=>(o(),f(`div`,O,[p(`div`,k,d(u.value),1),p(`div`,A,[(o(!0),f(c,null,e(h.value,e=>(o(),a(v,{key:e.name,icon:e.icon,name:e.name,"is-installed":e.getIsInstalled(),onClick:t=>i(`select`,e)},null,8,[`icon`,`name`,`is-installed`,`onClick`]))),128))])]))}}),[[`__scopeId`,`data-v-71f1a8c1`]]),M={key:0,class:`title`},N=D(t({__name:`WalletOptions`,props:{chainTypes:{},noTitle:{type:Boolean}},emits:[`select`],setup(t,{emit:i}){let s=i,l=e=>{s(`select`,e)},{t:u}=E();return(t,i)=>(o(),f(`div`,null,[t.noTitle?n(``,!0):(o(),f(`div`,M,d(r(u)(`please_connect_wallet`)),1)),(o(!0),f(c,null,e(t.chainTypes,e=>(o(),a(j,{key:e,"chain-type":e,onSelect:l},null,8,[`chain-type`]))),128))]))}}),[[`__scopeId`,`data-v-96b818de`]]),P={key:1,class:`select-wallet`},F={key:0,class:`desc`},I=D(t({__name:`ChooseWallet`,props:{chainTypes:{},forDetail:{type:Boolean}},emits:[`success`],setup(e,{emit:t}){let c=e,l=t,{t:u}=E(),p=e=>{l(`success`,e)},m=_(),g=s(()=>m.value&&h()),v=s(()=>m.value&&!!c.chainTypes.find(e=>e!==T.evm));return(e,t)=>g.value||v.value?(o(),a(y,{key:0,types:e.chainTypes,"for-detail":e.forDetail},null,8,[`types`,`for-detail`])):(o(),f(`div`,P,[e.forDetail?(o(),f(`div`,F,d(r(u)(`bind_address_des`)),1)):n(``,!0),i(N,{"chain-types":e.chainTypes,"no-title":e.forDetail,onSelect:p},null,8,[`chain-types`,`no-title`])]))}}),[[`__scopeId`,`data-v-440b6c5e`]]),L=t({__name:`ChooseWalletDialog`,props:{chainTypes:{},forDetail:{type:Boolean},onSuccess:{type:Function},onCancel:{type:Function}},setup(e){return(e,t)=>(o(),a(r(w),{visible:!0,"no-padding":``,onClose:e.onCancel},{default:l(()=>[i(I,{"chain-types":e.chainTypes,"for-detail":e.forDetail,onSuccess:e.onSuccess},null,8,[`chain-types`,`for-detail`,`onSuccess`])]),_:1},8,[`onClose`]))}}),R=e=>new Promise((t,n)=>{if(_().value){let e=b();if(e){t(new e);return}}let r=document.createElement(`div`),i=u(L,{chainTypes:e,onSuccess:e=>{i.unmount(),document.body.removeChild(r),t(e)},onCancel:()=>{i.unmount(),document.body.removeChild(r),n()}}).use(m);document.body.appendChild(r),i.mount(r)});export{R as t};
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.