import{g as a,c as l,__tla as __tla_0}from"./index-BAqoQ7MI.js";import{am as m,__tla as __tla_1}from"./UnlockedWallet-B6hSmM5s.js";import{__tla as __tla_2}from"./_virtual_wxt-plugins-D2Qy6pl9.js";import{f as u,__tla as __tla_3}from"./debounce-D1Adyjvd.js";import{__tla as __tla_4}from"./headers-DBBLE3ii.js";import{__tla as __tla_5}from"./index-YPJa-kxZ.js";import{__tla as __tla_6}from"./cardano_message_signing-B-K28Lzn.js";import{__tla as __tla_7}from"./TeamThemeProvider-BMMWqJEv.js";import{__tla as __tla_8}from"./gateway-auth-C4f--iOs.js";import{__tla as __tla_9}from"./vault-state-DXmi8wtw.js";let d,v,c;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})(),(()=>{try{return __tla_7}catch{}})(),(()=>{try{return __tla_8}catch{}})(),(()=>{try{return __tla_9}catch{}})()]).then(async()=>{const p={testnet:"Preprod",mainnet:"Mainnet"},f={testnet:"preprod",mainnet:"mainnet"};d=function(e,t){if(!t)return[];try{const n=a(t).paymentCredential;if(n?.type!=="Key")return[t];const o=l(p[e],n);return o===t?[t]:[t,o]}catch{return[t]}};c=function(e,t){let n=0n;for(const o of e)for(const r of o.amount??[])if(r.unit===t)try{n+=BigInt(r.quantity)}catch{continue}return n};v=async function(e){const t=m(e.pair),n=f[e.pair],o=d(e.pair,e.cardanoAddress),i=(await Promise.all(o.map(async s=>{try{return await u(s,void 0,n)}catch{return[]}}))).flat();return{usdm:c(i,t.cardano.lockedAssetUnit),lovelace:c(i,"lovelace")}}});export{d as bridgeSpendableAddresses,v as fetchBridgeCardanoBalance,c as sumAssetUnit,__tla};