@wormhole-foundation/wormhole-connect 1.0.0-beta.4-development → 1.0.0-beta.6-development

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/dist/assets/{ccip-Dn5z57Cx.js → ccip-HS3Cs5py.js} +1 -1
  2. package/dist/assets/{evm-Ci-t-8ei.js → evm-DyY55Fca.js} +4 -4
  3. package/dist/assets/{index-yInQCZK6.js → index-CeF-n8om.js} +1 -1
  4. package/dist/assets/{index-Da59NFoY.js → index-CqxhuXyT.js} +1 -1
  5. package/dist/assets/{index-DlyJ6Tua.js → index-CwoiJQ9y.js} +2 -2
  6. package/dist/assets/{index.es-DUffrgf3.js → index.es-BHZwRRXn.js} +2 -2
  7. package/dist/main.js +65 -65
  8. package/dist/src/AppRouter.d.ts.map +1 -1
  9. package/dist/src/consts/index.d.ts +0 -1
  10. package/dist/src/consts/index.d.ts.map +1 -1
  11. package/dist/src/routes/index.d.ts +0 -1
  12. package/dist/src/routes/index.d.ts.map +1 -1
  13. package/dist/src/sdklegacy/wormhole.d.ts +1 -38
  14. package/dist/src/sdklegacy/wormhole.d.ts.map +1 -1
  15. package/dist/src/store/redeem.d.ts +1 -4
  16. package/dist/src/store/redeem.d.ts.map +1 -1
  17. package/dist/src/telemetry/types.d.ts +2 -0
  18. package/dist/src/telemetry/types.d.ts.map +1 -1
  19. package/dist/src/utils/index.d.ts.map +1 -1
  20. package/dist/src/utils/transferValidation.d.ts +1 -2
  21. package/dist/src/utils/transferValidation.d.ts.map +1 -1
  22. package/dist/src/utils/wallet/index.d.ts +0 -1
  23. package/dist/src/utils/wallet/index.d.ts.map +1 -1
  24. package/dist/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
  25. package/dist/src/views/v2/Redeem/index.d.ts.map +1 -1
  26. package/lib/{algorand-BZfir-Gt.js → algorand-B3jpS4mY.js} +1 -1
  27. package/lib/{algorand-B9ai7AKk.mjs → algorand-CIOlvhGh.mjs} +3 -3
  28. package/lib/{aptos-CX7jOv1y.js → aptos-B7P6JL1S.js} +1 -1
  29. package/lib/{aptos-BiWZASIH.mjs → aptos-CKPSmGSC.mjs} +3 -3
  30. package/lib/{aptos-ZpPdNMHJ.mjs → aptos-CrnZjgsh.mjs} +1 -1
  31. package/lib/{aptos-D_w5IEUK.js → aptos-Cx4TaXYo.js} +2 -2
  32. package/lib/{ccip-CLMQ2RsP.js → ccip-B-q-r_A1.js} +1 -1
  33. package/lib/{ccip-lVzudYcQ.mjs → ccip-pU66-Jja.mjs} +1 -1
  34. package/lib/{cosmos-6rjmrhY_.js → cosmos-BDlV5WWM.js} +1 -1
  35. package/lib/{cosmos-B3YMB-qs.mjs → cosmos-mLLSK_Nm.mjs} +6 -6
  36. package/lib/{cosmwasm-SnVdtN68.mjs → cosmwasm-CGolR9gL.mjs} +7 -7
  37. package/lib/{cosmwasm-DMVssDjU.js → cosmwasm-CViLVch6.js} +2 -2
  38. package/lib/{events-t6i_QSEn.js → events-BSNN9qkd.js} +1 -1
  39. package/lib/{events-pgsgrP1S.mjs → events-Dzr-GrPB.mjs} +1 -1
  40. package/lib/{evm-Bd3DzKCY.mjs → evm-BILIyDaj.mjs} +7 -7
  41. package/lib/{evm-D7GRIPdg.js → evm-DMGYpAGT.js} +4 -4
  42. package/lib/{evm-DiQodX72.mjs → evm-DXAiSRNs.mjs} +5 -5
  43. package/lib/{evm-DFJuxSg1.js → evm-ronpaGiZ.js} +1 -1
  44. package/lib/{index-BAqClXT6.js → index-58isS1fK.js} +1 -1
  45. package/lib/{index-C_JBf5AE.js → index-AslWQnUt.js} +1 -1
  46. package/lib/{index-DJgWkkqj.mjs → index-BAErxF8G.mjs} +2 -2
  47. package/lib/{index-BZ7LatAr.js → index-BHGS0dw3.js} +6 -6
  48. package/lib/{index-B_FxM4qi.js → index-BJQjdDt-.js} +1 -1
  49. package/lib/{index-2LZtNZ5P.js → index-BKDeZ8n5.js} +1 -1
  50. package/lib/{index-D4-zCm-j.js → index-BN2lROi0.js} +1 -1
  51. package/lib/{index-BjpzXqrL.js → index-BO5ATVUH.js} +1 -1
  52. package/lib/{index-Dk2OkATw.js → index-BRdg8SSa.js} +1 -1
  53. package/lib/{index-0YCaekiF.mjs → index-BTS53_Aj.mjs} +2 -2
  54. package/lib/{index-Cl110Yt1.js → index-BVxqSkXh.js} +1 -1
  55. package/lib/{index-CkyGUP8I.mjs → index-BWe8c3sQ.mjs} +2 -2
  56. package/lib/{index-0QJFchou.mjs → index-BdINnTi7.mjs} +2 -2
  57. package/lib/{index-CdFX-OBR.mjs → index-Be-kzEHF.mjs} +4 -4
  58. package/lib/{index-C4NKqUWK.mjs → index-BvbKk4T6.mjs} +1 -1
  59. package/lib/{index-mAuqp4GD.js → index-Byr7P1JY.js} +1 -1
  60. package/lib/{index-DPq8nS1b.mjs → index-C1jcO7wH.mjs} +1 -1
  61. package/lib/{index-EhUlCH18.mjs → index-C2DCdxRC.mjs} +39 -122
  62. package/lib/{index-C9xfXphF.mjs → index-C2WFu8In.mjs} +2 -2
  63. package/lib/{index-BhrO8yNx.mjs → index-CAHXQCTs.mjs} +2 -2
  64. package/lib/{index-EPcXyhD3.js → index-CAcB_0Hd.js} +1 -1
  65. package/lib/{index-VI9qDjx0.js → index-CHAdrAO4.js} +1 -1
  66. package/lib/{index-hiGmsL0b.mjs → index-CMWEjIGj.mjs} +1 -1
  67. package/lib/{index-B64jLBfI.mjs → index-CSKSjjgt.mjs} +2 -2
  68. package/lib/{index-fPs98C_X.mjs → index-CZj2FglQ.mjs} +2 -2
  69. package/lib/{index-DWmEAYa2.js → index-Cd8xotiJ.js} +1 -1
  70. package/lib/{index-DUn9bDrk.mjs → index-Co1vTibS.mjs} +2 -2
  71. package/lib/{index-fD6yeQDw.mjs → index-CruftbOC.mjs} +7 -7
  72. package/lib/{index-CpM8O4af.mjs → index-D6u6ZlbM.mjs} +4 -4
  73. package/lib/{index-CE4mRmPN.js → index-DEAhtMw_.js} +1 -1
  74. package/lib/{index-CFVJznfe.js → index-DFZ0Ndqh.js} +1 -1
  75. package/lib/{index-DLXjX60f.js → index-DFa89Itc.js} +1 -1
  76. package/lib/{index-Bd6ExIDW.mjs → index-DWKvilYv.mjs} +4 -4
  77. package/lib/{index-BcbPoWss.mjs → index-DXCl1vFR.mjs} +3 -3
  78. package/lib/{index-DZbeM9gY.mjs → index-Da7Cxyq1.mjs} +2 -2
  79. package/lib/{index-B5TmFc4M.js → index-DbI4zYHg.js} +1 -1
  80. package/lib/{index-DVnPDtFx.mjs → index-DiF1ira9.mjs} +1 -1
  81. package/lib/{index-DllSkb9h.js → index-Dmko8wT8.js} +1 -1
  82. package/lib/{index-CvRFH7pa.js → index-Dpzov1Io.js} +1 -1
  83. package/lib/{index-BT7_dDgl.mjs → index-YNti7nIJ.mjs} +3 -3
  84. package/lib/{index-048e7Uvl.js → index-ZD733qpV.js} +1 -1
  85. package/lib/{index-QqzqKjF9.js → index-bdAItiPr.js} +1 -1
  86. package/lib/{index-DG5KwGj7.mjs → index-e3UZ_0nd.mjs} +3 -3
  87. package/lib/{index-BkyCouQJ.js → index-g3eZpZJ1.js} +1 -1
  88. package/lib/{index-B2aC_g_3.js → index-iXByZuY7.js} +1 -1
  89. package/lib/{index-BYv5Tbwe.mjs → index-mUmOCSLG.mjs} +1 -1
  90. package/lib/{index-bpVbPzFG.mjs → index-oMwdMcy1.mjs} +1 -1
  91. package/lib/{index-CcKxlhe-.js → index-wXdILngm.js} +1 -1
  92. package/lib/{index.es-WCp4WrVw.js → index.es-B6NnL7-2.js} +2 -2
  93. package/lib/{index.es-B4wQLKJO.mjs → index.es-DNGjs0VX.mjs} +5 -5
  94. package/lib/index.js +1 -1
  95. package/lib/index.mjs +1 -1
  96. package/lib/{libsodium-wrappers-BdZeVEOK.js → libsodium-wrappers-B21TAmoM.js} +1 -1
  97. package/lib/{libsodium-wrappers-DnY3rBzj.mjs → libsodium-wrappers-BKcruoKB.mjs} +1 -1
  98. package/lib/{pako.esm-doGHPq3v.mjs → pako.esm-C_3vjkSx.mjs} +3 -3
  99. package/lib/{pako.esm-CpOVp0Fg.js → pako.esm-x_RIwOhS.js} +1 -1
  100. package/lib/{pbkdf2-DRrUaAek.js → pbkdf2-BiOly-Fb.js} +1 -1
  101. package/lib/{pbkdf2-CR1mMO6P.mjs → pbkdf2-h3af_qT8.mjs} +1 -1
  102. package/lib/{sei-BHskcl2R.js → sei-CsiLK3q4.js} +1 -1
  103. package/lib/{sei-ReMraEM4.mjs → sei-J7Ndid0z.mjs} +4 -4
  104. package/lib/{signer-BwkEV8NR.mjs → signer-Bqq-7pmw.mjs} +1 -1
  105. package/lib/{signer-C5udfQih.js → signer-DqTjY4LV.js} +1 -1
  106. package/lib/solana-CRL9xy7K.mjs +16 -0
  107. package/lib/{solana-BWRzXH9-.js → solana-Ce3qepls.js} +1 -1
  108. package/lib/{solana-kr2Et-_M.mjs → solana-DoXIYwUz.mjs} +4 -4
  109. package/lib/solana-rhlzUaN7.js +1 -0
  110. package/lib/{solanaEmbed.esm-HLygiesN.mjs → solanaEmbed.esm-BDiuwARH.mjs} +4 -4
  111. package/lib/{solanaEmbed.esm-8hegnauD.js → solanaEmbed.esm-aEhVr3dz.js} +1 -1
  112. package/lib/src/AppRouter.d.ts.map +1 -1
  113. package/lib/src/consts/index.d.ts +0 -1
  114. package/lib/src/consts/index.d.ts.map +1 -1
  115. package/lib/src/routes/index.d.ts +0 -1
  116. package/lib/src/routes/index.d.ts.map +1 -1
  117. package/lib/src/sdklegacy/wormhole.d.ts +1 -38
  118. package/lib/src/sdklegacy/wormhole.d.ts.map +1 -1
  119. package/lib/src/store/redeem.d.ts +1 -4
  120. package/lib/src/store/redeem.d.ts.map +1 -1
  121. package/lib/src/telemetry/types.d.ts +2 -0
  122. package/lib/src/telemetry/types.d.ts.map +1 -1
  123. package/lib/src/utils/index.d.ts.map +1 -1
  124. package/lib/src/utils/transferValidation.d.ts +1 -2
  125. package/lib/src/utils/transferValidation.d.ts.map +1 -1
  126. package/lib/src/utils/wallet/index.d.ts +0 -1
  127. package/lib/src/utils/wallet/index.d.ts.map +1 -1
  128. package/lib/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
  129. package/lib/src/views/v2/Redeem/index.d.ts.map +1 -1
  130. package/lib/{sui-B6XCpe1d.mjs → sui-Bd2bm_yF.mjs} +1 -1
  131. package/lib/{sui-BWRqoTdl.js → sui-CNNdjXyR.js} +2 -2
  132. package/lib/{sui-BocrppL0.js → sui-CthAG5pi.js} +1 -1
  133. package/lib/{sui-BuZPAcI0.mjs → sui-sEkivVSe.mjs} +4 -4
  134. package/lib/{unsignedTransaction-oXk8lD5s.mjs → unsignedTransaction-CA2s3rKG.mjs} +2 -2
  135. package/lib/{unsignedTransaction-DSuqsGgb.js → unsignedTransaction-qKKmqcBf.js} +1 -1
  136. package/lib/{utils-SML27G4C.js → utils-Deb--_8V.js} +1 -1
  137. package/lib/{utils-fI-uXUZk.mjs → utils-OPA3b1An.mjs} +2 -2
  138. package/package.json +1 -1
  139. package/dist/src/routes/utils.d.ts +0 -2
  140. package/dist/src/routes/utils.d.ts.map +0 -1
  141. package/dist/src/utils/sdk.d.ts +0 -19
  142. package/dist/src/utils/sdk.d.ts.map +0 -1
  143. package/lib/solana-ci1dqiv5.mjs +0 -16
  144. package/lib/solana-gFEm46ZS.js +0 -1
  145. package/lib/src/routes/utils.d.ts +0 -2
  146. package/lib/src/routes/utils.d.ts.map +0 -1
  147. package/lib/src/utils/sdk.d.ts +0 -19
  148. package/lib/src/utils/sdk.d.ts.map +0 -1
@@ -9031,7 +9031,6 @@ const initialState$4 = {
9031
9031
  isInvalidVaa: !1,
9032
9032
  route: void 0,
9033
9033
  transferDestInfo: void 0,
9034
- deliveryStatus: void 0,
9035
9034
  isResumeTx: !1,
9036
9035
  timestamp: 0
9037
9036
  }, redeemSlice = createSlice({
@@ -9064,9 +9063,6 @@ const initialState$4 = {
9064
9063
  T[e] = initialState$4[e];
9065
9064
  });
9066
9065
  },
9067
- setDeliveryStatus: (T, { payload: e }) => {
9068
- T.deliveryStatus = e;
9069
- },
9070
9066
  setInvalidVaa: (T, { payload: e }) => {
9071
9067
  T.isInvalidVaa = e;
9072
9068
  },
@@ -9087,7 +9083,6 @@ const initialState$4 = {
9087
9083
  setTransferDestInfo,
9088
9084
  clearRedeem,
9089
9085
  setRoute: setRoute$2,
9090
- setDeliveryStatus,
9091
9086
  setIsResumeTx,
9092
9087
  setTimestamp
9093
9088
  } = redeemSlice.actions, redeemReducer = redeemSlice.reducer;
@@ -89538,43 +89533,6 @@ class WormholeContext extends MultiProvider {
89538
89533
  getContext(C) {
89539
89534
  return this;
89540
89535
  }
89541
- /**
89542
- * Checks if a transfer has been completed or not
89543
- *
89544
- * @param destChain The destination chain name or id
89545
- * @param signedVAA The Signed VAA bytes
89546
- * @returns True if the transfer has been completed, otherwise false
89547
- */
89548
- async isTransferCompleted(C, $) {
89549
- return await this.getContext(C).isTransferCompleted(C, $);
89550
- }
89551
- /**
89552
- * Format an address to a 32-byte universal address, which can be utilized by the Wormhole contracts
89553
- *
89554
- * @param address The address as a string
89555
- * @returns The address as a 32-byte Wormhole address
89556
- */
89557
- formatAddress(C, $) {
89558
- return this.getContext($).formatAddress(C);
89559
- }
89560
- /**
89561
- * Parse an address from a 32-byte universal address to a canonical address
89562
- *
89563
- * @param address The 32-byte wormhole address
89564
- * @returns The address in the blockchain specific format
89565
- */
89566
- parseAddress(C, $) {
89567
- return this.getContext($).parseAddress(C);
89568
- }
89569
- /**
89570
- * Fetches the wrapped native token ID for a given chain
89571
- *
89572
- * @param chain The chain name or id
89573
- * @returns The native token ID
89574
- */
89575
- async getWrappedNativeTokenId(C) {
89576
- return await this.getContext(C).getWrappedNativeTokenId(C);
89577
- }
89578
89536
  /**
89579
89537
  * Get the default config for Mainnet or Testnet
89580
89538
  *
@@ -89584,31 +89542,6 @@ class WormholeContext extends MultiProvider {
89584
89542
  static getConfig(C) {
89585
89543
  return C === "Mainnet" ? MAINNET_CONFIG : C === "Devnet" ? DEVNET_CONFIG : TESTNET_CONFIG;
89586
89544
  }
89587
- // BEGIN stubbed methods for SDKV2 migration
89588
- // TODO SDKV2
89589
- sign() {
89590
- console.log("TODO remove");
89591
- }
89592
- async approve(C, $, V, J) {
89593
- return !0;
89594
- }
89595
- getCurrentBlock() {
89596
- return 0;
89597
- }
89598
- /* @ts-ignore */
89599
- mustGetProvider(C) {
89600
- console.log("TODO remove");
89601
- }
89602
- get contracts() {
89603
- return {
89604
- mustGetCore(C) {
89605
- console.log("TODO remove");
89606
- },
89607
- mustGetBridge(C) {
89608
- console.log("TODO remove");
89609
- }
89610
- };
89611
- }
89612
89545
  }
89613
89546
  const fa = class fa extends Error {
89614
89547
  constructor() {
@@ -89948,7 +89881,7 @@ const { chains: chains$3 } = CONFIG.MAINNET, MAINNET_CHAINS = {
89948
89881
  }
89949
89882
  return T;
89950
89883
  }
89951
- }, capitalize$1 = (T) => T[0].toUpperCase() + T.slice(1), __vite_import_meta_env__$2 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "a9b55ee355e1e6aea197683969dec20272e1f8d2", REACT_APP_CONNECT_VERSION: "1.0.0-beta.4-development", SSR: !1 }, {
89884
+ }, capitalize$1 = (T) => T[0].toUpperCase() + T.slice(1), __vite_import_meta_env__$2 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "66567716b06cd59468bd3f6c21d89fba8d52a52d", REACT_APP_CONNECT_VERSION: "1.0.0-beta.6-development", SSR: !1 }, {
89952
89885
  REACT_APP_ETHEREUM_RPC,
89953
89886
  REACT_APP_SOLANA_RPC,
89954
89887
  REACT_APP_POLYGON_RPC,
@@ -91644,7 +91577,7 @@ const { chains: chains$3 } = CONFIG.MAINNET, MAINNET_CHAINS = {
91644
91577
  icon: Icon.MANTLE,
91645
91578
  maxBlockSearch: 2e3
91646
91579
  }
91647
- }, __vite_import_meta_env__$1 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "a9b55ee355e1e6aea197683969dec20272e1f8d2", REACT_APP_CONNECT_VERSION: "1.0.0-beta.4-development", SSR: !1 }, {
91580
+ }, __vite_import_meta_env__$1 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "66567716b06cd59468bd3f6c21d89fba8d52a52d", REACT_APP_CONNECT_VERSION: "1.0.0-beta.6-development", SSR: !1 }, {
91648
91581
  REACT_APP_SEPOLIA_RPC,
91649
91582
  REACT_APP_BSC_TESTNET_RPC,
91650
91583
  REACT_APP_FUJI_RPC,
@@ -92288,7 +92221,7 @@ const { chains: chains$3 } = CONFIG.MAINNET, MAINNET_CHAINS = {
92288
92221
  icon: Icon.OSMO,
92289
92222
  maxBlockSearch: 0
92290
92223
  }
92291
- }, __vite_import_meta_env__ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "a9b55ee355e1e6aea197683969dec20272e1f8d2", REACT_APP_CONNECT_VERSION: "1.0.0-beta.4-development", SSR: !1 }, {
92224
+ }, __vite_import_meta_env__ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "66567716b06cd59468bd3f6c21d89fba8d52a52d", REACT_APP_CONNECT_VERSION: "1.0.0-beta.6-development", SSR: !1 }, {
92292
92225
  REACT_APP_ETHEREUM_DEVNET_RPC,
92293
92226
  REACT_APP_OSMOSIS_DEVNET_RPC,
92294
92227
  REACT_APP_WORMCHAIN_DEVNET_RPC,
@@ -92352,7 +92285,7 @@ const { chains: chains$3 } = CONFIG.MAINNET, MAINNET_CHAINS = {
92352
92285
  index: 0,
92353
92286
  keys: ["0x13947Bd48b18E53fdAeEe77F3473391aC727C638"]
92354
92287
  }
92355
- }, WORMSCAN = "https://wormholescan.io/#/", CONNECT_VERSION = "1.0.0-beta.4-development", CONNECT_GIT_HASH = "a9b55ee355e1e6aea197683969dec20272e1f8d2", CHAIN_ORDER = [
92288
+ }, WORMSCAN = "https://wormholescan.io/#/", CONNECT_VERSION = "1.0.0-beta.6-development", CONNECT_GIT_HASH = "66567716b06cd59468bd3f6c21d89fba8d52a52d", CHAIN_ORDER = [
92356
92289
  "Ethereum",
92357
92290
  "Solana",
92358
92291
  "Arbitrum",
@@ -97951,7 +97884,7 @@ class SDKConverter {
97951
97884
  );
97952
97885
  }
97953
97886
  }
97954
- const evm = async () => (await import("./evm-DiQodX72.mjs")).default, solana$1 = async () => (await import("./solana-ci1dqiv5.mjs")).default, aptos$1 = async () => (await import("./aptos-BiWZASIH.mjs").then((T) => T.a)).default, sui = async () => (await import("./sui-BuZPAcI0.mjs").then((T) => T.s)).default, cosmwasm = async () => (await import("./cosmwasm-SnVdtN68.mjs").then((T) => T.Q)).default, algorand = async () => (await import("./algorand-B9ai7AKk.mjs").then((T) => T.a)).default;
97887
+ const evm = async () => (await import("./evm-DXAiSRNs.mjs")).default, solana$1 = async () => (await import("./solana-CRL9xy7K.mjs")).default, aptos$1 = async () => (await import("./aptos-CKPSmGSC.mjs").then((T) => T.a)).default, sui = async () => (await import("./sui-sEkivVSe.mjs").then((T) => T.s)).default, cosmwasm = async () => (await import("./cosmwasm-CGolR9gL.mjs").then((T) => T.Q)).default, algorand = async () => (await import("./algorand-CIOlvhGh.mjs").then((T) => T.a)).default;
97955
97888
  var eventemitter3 = { exports: {} };
97956
97889
  (function(T) {
97957
97890
  var e = Object.prototype.hasOwnProperty, C = "~";
@@ -98294,14 +98227,14 @@ const walletConnection = {
98294
98227
  if (C.getNetworkInfo().chainId !== T) {
98295
98228
  if ($.context === Context.ETH)
98296
98229
  try {
98297
- const { switchChain: J } = await import("./evm-Bd3DzKCY.mjs").then((ee) => ee.j);
98230
+ const { switchChain: J } = await import("./evm-BILIyDaj.mjs").then((ee) => ee.j);
98298
98231
  await J(C, T);
98299
98232
  } catch (J) {
98300
98233
  if (J instanceof NotSupported) return;
98301
98234
  throw J;
98302
98235
  }
98303
98236
  if ($.context === Context.COSMOS) {
98304
- const { switchChain: J } = await import("./cosmos-B3YMB-qs.mjs");
98237
+ const { switchChain: J } = await import("./cosmos-mLLSK_Nm.mjs");
98305
98238
  await J(C, T);
98306
98239
  }
98307
98240
  return C.getAddress();
@@ -98314,7 +98247,7 @@ const walletConnection = {
98314
98247
  if (!J)
98315
98248
  throw new Error("wallet is undefined");
98316
98249
  if (V.context === Context.ETH) {
98317
- const { signAndSendTransaction: ee } = await import("./evm-Bd3DzKCY.mjs").then((ne) => ne.j);
98250
+ const { signAndSendTransaction: ee } = await import("./evm-BILIyDaj.mjs").then((ne) => ne.j);
98318
98251
  return await ee(
98319
98252
  e,
98320
98253
  J,
@@ -98322,20 +98255,20 @@ const walletConnection = {
98322
98255
  $
98323
98256
  );
98324
98257
  } else if (V.context === Context.SOLANA) {
98325
- const { signAndSendTransaction: ee } = await import("./solana-kr2Et-_M.mjs");
98258
+ const { signAndSendTransaction: ee } = await import("./solana-DoXIYwUz.mjs");
98326
98259
  return await ee(
98327
98260
  e,
98328
98261
  J,
98329
98262
  $
98330
98263
  );
98331
98264
  } else if (V.context === Context.SUI) {
98332
- const { signAndSendTransaction: ee } = await import("./sui-B6XCpe1d.mjs");
98265
+ const { signAndSendTransaction: ee } = await import("./sui-Bd2bm_yF.mjs");
98333
98266
  return (await ee(
98334
98267
  e,
98335
98268
  J
98336
98269
  )).id;
98337
98270
  } else if (V.context === Context.APTOS) {
98338
- const { signAndSendTransaction: ee } = await import("./aptos-ZpPdNMHJ.mjs");
98271
+ const { signAndSendTransaction: ee } = await import("./aptos-CrnZjgsh.mjs");
98339
98272
  return (await ee(
98340
98273
  e,
98341
98274
  J
@@ -98357,39 +98290,39 @@ const walletConnection = {
98357
98290
  if (T === void 0)
98358
98291
  return [];
98359
98292
  if (T.context === Context.ETH) {
98360
- const { wallets: e } = await import("./evm-Bd3DzKCY.mjs").then((C) => C.j);
98293
+ const { wallets: e } = await import("./evm-BILIyDaj.mjs").then((C) => C.j);
98361
98294
  return Object.values(mapWallets(e, Context.ETH));
98362
98295
  } else if (T.context === Context.SOLANA) {
98363
- const { fetchOptions: e } = await import("./solana-kr2Et-_M.mjs"), C = e();
98296
+ const { fetchOptions: e } = await import("./solana-DoXIYwUz.mjs"), C = e();
98364
98297
  return Object.values(mapWallets(C, Context.SOLANA));
98365
98298
  } else if (T.context === Context.SUI) {
98366
- const C = await (await import("./sui-B6XCpe1d.mjs")).fetchOptions();
98299
+ const C = await (await import("./sui-Bd2bm_yF.mjs")).fetchOptions();
98367
98300
  return Object.values(mapWallets(C, Context.SUI));
98368
98301
  } else if (T.context === Context.APTOS) {
98369
- const C = (await import("./aptos-ZpPdNMHJ.mjs")).fetchOptions();
98302
+ const C = (await import("./aptos-CrnZjgsh.mjs")).fetchOptions();
98370
98303
  return Object.values(mapWallets(C, Context.APTOS));
98371
98304
  } else if (T.context === Context.SEI) {
98372
- const C = await (await import("./sei-ReMraEM4.mjs")).fetchOptions();
98305
+ const C = await (await import("./sei-J7Ndid0z.mjs")).fetchOptions();
98373
98306
  return Object.values(mapWallets(C, Context.SEI));
98374
98307
  } else if (T.context === Context.COSMOS)
98375
98308
  if (T.key === "Evmos") {
98376
98309
  const {
98377
98310
  wallets: { cosmosEvm: e }
98378
- } = await import("./cosmos-B3YMB-qs.mjs");
98311
+ } = await import("./cosmos-mLLSK_Nm.mjs");
98379
98312
  return Object.values(
98380
98313
  mapWallets(e, Context.COSMOS, ["OKX Wallet"])
98381
98314
  );
98382
98315
  } else if (T.key === "Injective") {
98383
98316
  const {
98384
98317
  wallets: { cosmosEvm: e }
98385
- } = await import("./cosmos-B3YMB-qs.mjs");
98318
+ } = await import("./cosmos-mLLSK_Nm.mjs");
98386
98319
  return Object.values(
98387
98320
  mapWallets(e, Context.COSMOS, ["OKX Wallet"])
98388
98321
  );
98389
98322
  } else {
98390
98323
  const {
98391
98324
  wallets: { cosmos: e }
98392
- } = await import("./cosmos-B3YMB-qs.mjs");
98325
+ } = await import("./cosmos-mLLSK_Nm.mjs");
98393
98326
  return Object.values(mapWallets(e, Context.COSMOS));
98394
98327
  }
98395
98328
  return [];
@@ -110903,7 +110836,7 @@ function scale(T, e, C) {
110903
110836
  registerProtocol(_platform$1, "Ntt", EvmNtt);
110904
110837
  class SolanaChain extends ChainContext {
110905
110838
  async getTokenAccount(e, C) {
110906
- const { getAssociatedTokenAddress: $ } = await import("./index-DPq8nS1b.mjs"), V = new SolanaAddress(C).unwrap(), J = new SolanaAddress(e).unwrap(), ee = await $(V, J);
110839
+ const { getAssociatedTokenAddress: $ } = await import("./index-C1jcO7wH.mjs"), V = new SolanaAddress(C).unwrap(), J = new SolanaAddress(e).unwrap(), ee = await $(V, J);
110907
110840
  return {
110908
110841
  chain: this.chain,
110909
110842
  address: new SolanaAddress(ee.toString())
@@ -145505,7 +145438,7 @@ const useFetchSupportedRoutes = () => {
145505
145438
  "49HqitRzdnhYjgTEAhgGpCfsjdTeMbUTU6cyR4JV1R7k2Eej9rGT8JpFiYDa4tZM6RZiFrHmMzgSrhHEqpDYKBe5B2ufNsL",
145506
145439
  "884Bz8UH63aYsjVdkfWfScRYWZGGNbjFL7pztqvWNSrtYT4reFSwyvkCj9KEGUtheHhhMUj87ciTBFyzoesrMJ4L1FvSoxL"
145507
145440
  ])
145508
- ), CCTP_MAX_TRANSFER_LIMIT = 1e6, validateFromChain = (T) => !T || !config$2.chains[T] ? "Select a source chain" : "", validateToChain = (T, e) => {
145441
+ ), validateFromChain = (T) => !T || !config$2.chains[T] ? "Select a source chain" : "", validateToChain = (T, e) => {
145509
145442
  if (!T || !config$2.chains[T]) return "Select a destination chain";
145510
145443
  if (e && T === e)
145511
145444
  return "Source chain and destination chain cannot be the same";
@@ -145535,18 +145468,16 @@ const useFetchSupportedRoutes = () => {
145535
145468
  return `${T} not available on ${e}, select a different token`;
145536
145469
  }
145537
145470
  return C.some((V) => V.key === T) ? "" : "No route available for this token, please select another";
145538
- }, validateAmount = (T, e, C, $) => {
145471
+ }, validateAmount = (T, e, C) => {
145539
145472
  if (T === "") return "";
145540
- const V = Number.parseFloat(T);
145541
- if (isNaN(V)) return "Amount must be a number";
145542
- if (V <= 0) return "Amount must be greater than 0";
145473
+ const $ = Number.parseFloat(T);
145474
+ if (isNaN($)) return "Amount must be a number";
145475
+ if ($ <= 0) return "Amount must be greater than 0";
145543
145476
  if (e) {
145544
- const J = Number.parseFloat(e.replace(",", ""));
145545
- if (V > J) return "Amount exceeds available balance.";
145477
+ const V = Number.parseFloat(e.replace(",", ""));
145478
+ if ($ > V) return "Amount exceeds available balance.";
145546
145479
  }
145547
- return $ && V >= CCTP_MAX_TRANSFER_LIMIT ? `Your transaction exceeds the maximum transfer limit of ${Intl.NumberFormat(
145548
- "en-EN"
145549
- ).format(CCTP_MAX_TRANSFER_LIMIT)} USDC. Please use a different amount.` : V > C ? `At the moment, amount cannot exceed ${C}` : "";
145480
+ return $ > C ? `At the moment, amount cannot exceed ${C}` : "";
145550
145481
  }, checkAddressIsSanctioned = (T) => SANCTIONED_WALLETS.has(T) || SANCTIONED_WALLETS.has("0x" + T), validateWallet = async (T, e) => {
145551
145482
  if (!T.address) return "Wallet not connected";
145552
145483
  try {
@@ -145567,10 +145498,6 @@ const useFetchSupportedRoutes = () => {
145567
145498
  if (!T) return !1;
145568
145499
  const e = config$2.routes.get(T);
145569
145500
  return e ? e.AUTOMATIC_DEPOSIT : !1;
145570
- }, isCctp = (T, e, C, $) => {
145571
- var ee, te, ne, ie;
145572
- return ((ee = config$2.tokens[T]) == null ? void 0 : ee.symbol) === "USDC" && ((te = config$2.tokens[e]) == null ? void 0 : te.symbol) === "USDC" && ((ne = config$2.tokens[T]) == null ? void 0 : ne.nativeChain) === C && ((ie = config$2.tokens[e]) == null ? void 0 : ie.nativeChain) === $ && (!!$ && //CCTP_CHAINS.includes(toChain) && TODO SDKV2
145573
- !!C);
145574
145501
  }, validateAll = async (T, e, C) => {
145575
145502
  const {
145576
145503
  fromChain: $,
@@ -145586,7 +145513,7 @@ const useFetchSupportedRoutes = () => {
145586
145513
  fe.address,
145587
145514
  $,
145588
145515
  J
145589
- ), we = getMaxAmt(ie), Te = isCctp(J, ee, $, V), Ee = {
145516
+ ), we = getMaxAmt(ie), Te = {
145590
145517
  sendingWallet: await validateWallet(fe, $),
145591
145518
  receivingWallet: await validateWallet(he, V),
145592
145519
  fromChain: validateFromChain($),
@@ -145596,17 +145523,16 @@ const useFetchSupportedRoutes = () => {
145596
145523
  amount: validateAmount(
145597
145524
  te,
145598
145525
  (xe == null ? void 0 : xe.balance) || null,
145599
- we,
145600
- Te
145526
+ we
145601
145527
  ),
145602
145528
  toNativeToken: "",
145603
145529
  relayerFee: "",
145604
145530
  receiveAmount: ""
145605
145531
  };
145606
- return be ? ie === "AutomaticNtt" ? Ee : {
145607
- ...Ee,
145532
+ return be ? ie === "AutomaticNtt" ? Te : {
145533
+ ...Te,
145608
145534
  toNativeToken: validateToNativeAmt(ue, de)
145609
- } : Ee;
145535
+ } : Te;
145610
145536
  }, isTransferValid = (T) => {
145611
145537
  for (const e of Object.values(T))
145612
145538
  if (e)
@@ -148985,7 +148911,8 @@ const TokenItem$1 = memo(TokenItem), useStyles$i = makeStyles()((T) => ({
148985
148911
  }) => {
148986
148912
  const [$, V] = useState(T), J = c(e, INPUT_DEBOUNCE), ee = useCallback(
148987
148913
  (te) => {
148988
- Number(te.target.value) < 0 || (V(te.target.value), J(te.target.value));
148914
+ const ne = Number(te.target.value);
148915
+ isNaN(ne) || ne < 0 || (V(te.target.value), J(te.target.value));
148989
148916
  },
148990
148917
  []
148991
148918
  );
@@ -149014,15 +148941,6 @@ const TokenItem$1 = memo(TokenItem), useStyles$i = makeStyles()((T) => ({
149014
148941
  },
149015
148942
  balance: {
149016
148943
  color: T.palette.text.secondary
149017
- },
149018
- amountInput: {
149019
- "&::-webkit-outer-spin-button, &::-webkit-inner-spin-button": {
149020
- webkitAppearance: "none",
149021
- margin: 0
149022
- },
149023
- '&[type="number"]': {
149024
- mozAppearance: "textfield"
149025
- }
149026
148944
  }
149027
148945
  })), AmountInput = (T) => {
149028
148946
  const { classes: e } = useStyles$f(), C = useDispatch(), $ = useTheme$1(), { sending: V } = useSelector(
@@ -149109,9 +149027,7 @@ const TokenItem$1 = memo(TokenItem), useStyles$i = makeStyles()((T) => ({
149109
149027
  endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { alignItems: "end", children: [
149110
149028
  fe,
149111
149029
  ue
149112
- ] }) }),
149113
- type: "number",
149114
- classes: { input: e.amountInput }
149030
+ ] }) })
149115
149031
  }
149116
149032
  }
149117
149033
  ) }) }),
@@ -151417,7 +151333,7 @@ const useStyles$4 = makeStyles()((T) => ({
151417
151333
  },
151418
151334
  claimButton: {
151419
151335
  backgroundColor: T.palette.warning.light,
151420
- color: T.palette.background.default,
151336
+ color: T.palette.warning.contrastText ?? T.palette.background.default,
151421
151337
  "&:hover": {
151422
151338
  backgroundColor: T.palette.warning.main
151423
151339
  }
@@ -152444,7 +152360,8 @@ function AppRouter(T) {
152444
152360
  const { classes: e } = useStyles(), C = useDispatch(), $ = useContext(RouteContext);
152445
152361
  React__default.useEffect(() => {
152446
152362
  isEmptyObject(T.config) || (setConfig(T.config), C(clearTransfer())), config$2.triggerEvent({
152447
- type: "load"
152363
+ type: "load",
152364
+ config: T.config
152448
152365
  });
152449
152366
  }, []);
152450
152367
  const V = useSelector((te) => te.router.route), J = usePrevious(V), { hasExternalSearch: ee } = useExternalSearch();
@@ -1,8 +1,8 @@
1
1
  var J = Object.defineProperty;
2
2
  var K = (n, f, e) => f in n ? J(n, f, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[f] = e;
3
3
  var d = (n, f, e) => K(n, typeof f != "symbol" ? f + "" : f, e);
4
- import { ar as y, bS as f0, bT as z, bU as p, bV as e0, bW as a0, bX as t0, bY as _, bZ as b0, b_ as n0, b$ as d0, aj as L, c0 as O, E as v, a as C, c1 as D, u as U, bL as u, c2 as H, c3 as c0, c4 as N, bP as q, bQ as j, a8 as s0, c5 as i0, c6 as I, bE as S, aA as $, bR as V, _ as Q } from "./index-EhUlCH18.mjs";
5
- import "./index-DVnPDtFx.mjs";
4
+ import { ar as y, bS as f0, bT as z, bU as p, bV as e0, bW as a0, bX as t0, bY as _, bZ as b0, b_ as n0, b$ as d0, aj as L, c0 as O, E as v, a as C, c1 as D, u as U, bL as u, c2 as H, c3 as c0, c4 as N, bP as q, bQ as j, a8 as s0, c5 as i0, c6 as I, bE as S, aA as $, bR as V, _ as Q } from "./index-C2DCdxRC.mjs";
5
+ import "./index-DiF1ira9.mjs";
6
6
  const r0 = new RegExp("^bytes([0-9]+)$"), p0 = new RegExp("^(u?int)([0-9]*)$"), y0 = new RegExp("^(.*)\\[([0-9]*)\\]$");
7
7
  function X(n, f, e) {
8
8
  switch (n) {
@@ -1,6 +1,6 @@
1
- import { n as _t, s as ce, T as N, o as ot, R as Do, a as C, t as H, p as K, y as gt } from "./index-CkyGUP8I.mjs";
1
+ import { n as _t, s as ce, T as N, o as ot, R as Do, a as C, t as H, p as K, y as gt } from "./index-BWe8c3sQ.mjs";
2
2
  import { d as Uo } from "./dijkstra-BZM-8g-B.mjs";
3
- import { Z as Wo } from "./index-EhUlCH18.mjs";
3
+ import { Z as Wo } from "./index-C2DCdxRC.mjs";
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2019 Google LLC
@@ -1 +1 @@
1
- "use strict";const me=Symbol(),se=Object.getPrototypeOf,G=new WeakMap,he=e=>e&&(G.has(e)?G.get(e):se(e)===Object.prototype||se(e)===Array.prototype),ge=e=>he(e)&&e[me]||null,ne=(e,t=!0)=>{G.set(e,t)},H={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,REACT_APP_CONNECT_GIT_HASH:"a9b55ee355e1e6aea197683969dec20272e1f8d2",REACT_APP_CONNECT_VERSION:"1.0.0-beta.4-development",SSR:!1},F=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,g)=>new Proxy(n,g),s=n=>F(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,g,I=r)=>{const v=l.get(n);if((v==null?void 0:v[0])===g)return v[1];const w=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return ne(w,!0),l.set(n,[g,w]),Reflect.ownKeys(n).forEach(_=>{if(Object.getOwnPropertyDescriptor(w,_))return;const L=Reflect.get(n,_),M={value:L,enumerable:!0,configurable:!0};if(x.has(L))ne(L,!1);else if(L instanceof Promise)delete M.value,M.get=()=>I(L);else if(A.has(L)){const[b,q]=A.get(L);M.value=c(b,q(),I)}Object.defineProperty(w,_,M)}),Object.preventExtensions(w)},m=new WeakMap,f=[1,1],W=n=>{if(!F(n))throw new Error("object required");const g=m.get(n);if(g)return g;let I=f[0];const v=new Set,w=(a,i=++f[0])=>{I!==i&&(I=i,v.forEach(o=>o(a,i)))};let _=f[1];const L=(a=++f[1])=>(_!==a&&!v.size&&(_=a,b.forEach(([i])=>{const o=i[1](a);o>I&&(I=o)})),I),M=a=>(i,o)=>{const h=[...i];h[1]=[a,...h[1]],w(h,o)},b=new Map,q=(a,i)=>{if((H?"production":void 0)!=="production"&&b.has(a))throw new Error("prop listener already exists");if(v.size){const o=i[3](M(a));b.set(a,[i,o])}else b.set(a,[i])},te=a=>{var i;const o=b.get(a);o&&(b.delete(a),(i=o[1])==null||i.call(o))},pe=a=>(v.add(a),v.size===1&&b.forEach(([o,h],k)=>{if((H?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const T=o[3](M(k));b.set(k,[o,T])}),()=>{v.delete(a),v.size===0&&b.forEach(([o,h],k)=>{h&&(h(),b.set(k,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),$=t(J,{deleteProperty(a,i){const o=Reflect.get(a,i);te(i);const h=Reflect.deleteProperty(a,i);return h&&w(["delete",[i],o]),h},set(a,i,o,h){const k=Reflect.has(a,i),T=Reflect.get(a,i,h);if(k&&(e(T,o)||m.has(o)&&e(T,m.get(o))))return!0;te(i),F(o)&&(o=ge(o)||o);let V=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,w(["resolve",[i],C])}).catch(C=>{o.status="rejected",o.reason=C,w(["reject",[i],C])});else{!A.has(o)&&s(o)&&(V=W(o));const C=!x.has(V)&&A.get(V);C&&q(i,C)}return Reflect.set(a,i,V,h),w(["set",[i],o,T]),!0}});m.set(n,$);const fe=[J,L,c,pe];return A.set($,fe),Reflect.ownKeys(n).forEach(a=>{const i=Object.getOwnPropertyDescriptor(n,a);"value"in i&&($[a]=n[a],delete i.value,delete i.writable),Object.defineProperty(J,a,i)}),$})=>[W,A,x,e,t,s,r,l,c,m,f],[ye]=be();function j(e={}){return ye(e)}function D(e,t,s){const r=A.get(e);(H?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let f=!1;const n=m(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,n()}}function ve(e,t){const s=A.get(e);(H?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ee={state:d,subscribe(e){return D(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},u={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return u.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return u.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(u.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!u.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(u.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(u.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(u.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(u.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=ee.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),p=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),ue={state:p,subscribe(e){return D(p.events,()=>e(ve(p.events[p.events.length-1])))},initialize(){p.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(p.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){p.connectedWalletId=e},click(e){if(p.enabled){const t={type:"CLICK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},track(e){if(p.enabled){const t={type:"TRACK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},view(e){if(p.enabled){const t={type:"VIEW",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}}},E=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),y={state:E,subscribe(e){return D(E,()=>e(E))},setChains(e){E.chains=e},setWalletConnectUri(e){E.walletConnectUri=e},setIsCustomDesktop(e){E.isCustomDesktop=e},setIsCustomMobile(e){E.isCustomMobile=e},setIsDataLoaded(e){E.isDataLoaded=e},setIsUiLoaded(e){E.isUiLoaded=e},setIsAuth(e){E.isAuth=e}},B=j({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),U={state:B,subscribe(e){return D(B,()=>e(B))},setConfig(e){var t,s;ue.initialize(),y.setChains(e.chains),y.setIsAuth(!!e.enableAuthMode),y.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),y.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),u.setModalVersionInStorage(),Object.assign(B,e)}};var Ie=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Le=(e,t)=>{for(var s in t||(t={}))Ee.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))Oe.call(t,s)&&re(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=Le({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",U.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const P={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Q}/w3m/v1/getWalletImage/${e}?projectId=${U.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${U.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var We=Object.defineProperty,ie=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,ae=(e,t,s)=>t in e?We(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,je=(e,t)=>{for(var s in t||(t={}))Ce.call(t,s)&&ae(e,s,t[s]);if(ie)for(var s of ie(t))Ae.call(t,s)&&ae(e,s,t[s]);return e};const le=u.isMobile(),O=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Me={state:O,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=U.state;if(e==="NONE"||t==="ALL"&&!e)return O.recomendedWallets;if(u.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await P.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),W=e.indexOf(m.id);return f-W}),O.recomendedWallets=l}else{const{chains:s,isAuth:r}=y.state,l=s==null?void 0:s.join(","),c=u.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:u.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=le?await P.getMobileListings(m):await P.getDesktopListings(m);O.recomendedWallets=Object.values(f)}return O.recomendedWallets},async getWallets(e){const t=je({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=U.state,{recomendedWallets:l}=O;if(r==="ALL")return O.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):u.isArray(s)&&(t.excludedIds=s.join(",")),u.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),y.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:f,total:W}=le?await P.getMobileListings(t):await P.getDesktopListings(t),n=Object.values(f),g=m?"search":"wallets";return O[g]={listings:[...O[g].listings,...n],total:W,page:c??1},{listings:n,total:W}},getWalletImageUrl(e){return P.getWalletImageUrl(e)},getAssetImageUrl(e){return P.getAssetImageUrl(e)},resetSearch(){O.search={listings:[],total:0,page:1}}},N=j({open:!1}),z={state:N,subscribe(e){return D(N,()=>e(N))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=y.state;if(u.removeWalletConnectDeepLink(),y.setWalletConnectUri(e==null?void 0:e.uri),y.setChains(e==null?void 0:e.chains),ee.reset("ConnectWallet"),s&&r)N.open=!0,t();else{const l=setInterval(()=>{const c=y.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),N.open=!0,t())},200)}})},close(){N.open=!1}};var Pe=Object.defineProperty,ce=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,de=(e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,De=(e,t)=>{for(var s in t||(t={}))Se.call(t,s)&&de(e,s,t[s]);if(ce)for(var s of ce(t))Ue.call(t,s)&&de(e,s,t[s]);return e};function _e(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=j({themeMode:_e()?"dark":"light"}),Z={state:R,subscribe(e){return D(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=De({},s))}},S=j({open:!1,message:"",variant:"success"}),ke={state:S,subscribe(e){return D(S,()=>e(S))},openToast(e,t){S.open=!0,S.message=e,S.variant=t},closeToast(){S.open=!1}};class Ne{constructor(t){this.openModal=z.open,this.closeModal=z.close,this.subscribeModal=z.subscribe,this.setTheme=Z.setThemeConfig,Z.setThemeConfig(t),U.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>require("./index-C_JBf5AE.js"));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),y.setIsUiLoaded(!0)}}}const Te=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Ne},Symbol.toStringTag,{value:"Module"}));exports.R=ue;exports.T=ee;exports.a=u;exports.index=Te;exports.ne=Z;exports.oe=ke;exports.p=y;exports.se=z;exports.te=Me;exports.y=U;
1
+ "use strict";const me=Symbol(),se=Object.getPrototypeOf,G=new WeakMap,he=e=>e&&(G.has(e)?G.get(e):se(e)===Object.prototype||se(e)===Array.prototype),ge=e=>he(e)&&e[me]||null,ne=(e,t=!0)=>{G.set(e,t)},H={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,REACT_APP_CONNECT_GIT_HASH:"66567716b06cd59468bd3f6c21d89fba8d52a52d",REACT_APP_CONNECT_VERSION:"1.0.0-beta.6-development",SSR:!1},F=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,g)=>new Proxy(n,g),s=n=>F(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,g,I=r)=>{const v=l.get(n);if((v==null?void 0:v[0])===g)return v[1];const w=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return ne(w,!0),l.set(n,[g,w]),Reflect.ownKeys(n).forEach(_=>{if(Object.getOwnPropertyDescriptor(w,_))return;const L=Reflect.get(n,_),M={value:L,enumerable:!0,configurable:!0};if(x.has(L))ne(L,!1);else if(L instanceof Promise)delete M.value,M.get=()=>I(L);else if(A.has(L)){const[b,q]=A.get(L);M.value=c(b,q(),I)}Object.defineProperty(w,_,M)}),Object.preventExtensions(w)},m=new WeakMap,f=[1,1],W=n=>{if(!F(n))throw new Error("object required");const g=m.get(n);if(g)return g;let I=f[0];const v=new Set,w=(a,i=++f[0])=>{I!==i&&(I=i,v.forEach(o=>o(a,i)))};let _=f[1];const L=(a=++f[1])=>(_!==a&&!v.size&&(_=a,b.forEach(([i])=>{const o=i[1](a);o>I&&(I=o)})),I),M=a=>(i,o)=>{const h=[...i];h[1]=[a,...h[1]],w(h,o)},b=new Map,q=(a,i)=>{if((H?"production":void 0)!=="production"&&b.has(a))throw new Error("prop listener already exists");if(v.size){const o=i[3](M(a));b.set(a,[i,o])}else b.set(a,[i])},te=a=>{var i;const o=b.get(a);o&&(b.delete(a),(i=o[1])==null||i.call(o))},pe=a=>(v.add(a),v.size===1&&b.forEach(([o,h],k)=>{if((H?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const T=o[3](M(k));b.set(k,[o,T])}),()=>{v.delete(a),v.size===0&&b.forEach(([o,h],k)=>{h&&(h(),b.set(k,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),$=t(J,{deleteProperty(a,i){const o=Reflect.get(a,i);te(i);const h=Reflect.deleteProperty(a,i);return h&&w(["delete",[i],o]),h},set(a,i,o,h){const k=Reflect.has(a,i),T=Reflect.get(a,i,h);if(k&&(e(T,o)||m.has(o)&&e(T,m.get(o))))return!0;te(i),F(o)&&(o=ge(o)||o);let V=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,w(["resolve",[i],C])}).catch(C=>{o.status="rejected",o.reason=C,w(["reject",[i],C])});else{!A.has(o)&&s(o)&&(V=W(o));const C=!x.has(V)&&A.get(V);C&&q(i,C)}return Reflect.set(a,i,V,h),w(["set",[i],o,T]),!0}});m.set(n,$);const fe=[J,L,c,pe];return A.set($,fe),Reflect.ownKeys(n).forEach(a=>{const i=Object.getOwnPropertyDescriptor(n,a);"value"in i&&($[a]=n[a],delete i.value,delete i.writable),Object.defineProperty(J,a,i)}),$})=>[W,A,x,e,t,s,r,l,c,m,f],[ye]=be();function j(e={}){return ye(e)}function D(e,t,s){const r=A.get(e);(H?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let f=!1;const n=m(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,n()}}function ve(e,t){const s=A.get(e);(H?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ee={state:d,subscribe(e){return D(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},u={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return u.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return u.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(u.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!u.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(u.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(u.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(u.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(u.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=ee.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),p=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),ue={state:p,subscribe(e){return D(p.events,()=>e(ve(p.events[p.events.length-1])))},initialize(){p.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(p.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){p.connectedWalletId=e},click(e){if(p.enabled){const t={type:"CLICK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},track(e){if(p.enabled){const t={type:"TRACK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},view(e){if(p.enabled){const t={type:"VIEW",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}}},E=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),y={state:E,subscribe(e){return D(E,()=>e(E))},setChains(e){E.chains=e},setWalletConnectUri(e){E.walletConnectUri=e},setIsCustomDesktop(e){E.isCustomDesktop=e},setIsCustomMobile(e){E.isCustomMobile=e},setIsDataLoaded(e){E.isDataLoaded=e},setIsUiLoaded(e){E.isUiLoaded=e},setIsAuth(e){E.isAuth=e}},B=j({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),U={state:B,subscribe(e){return D(B,()=>e(B))},setConfig(e){var t,s;ue.initialize(),y.setChains(e.chains),y.setIsAuth(!!e.enableAuthMode),y.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),y.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),u.setModalVersionInStorage(),Object.assign(B,e)}};var Ie=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Le=(e,t)=>{for(var s in t||(t={}))Ee.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))Oe.call(t,s)&&re(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=Le({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",U.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const P={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Q}/w3m/v1/getWalletImage/${e}?projectId=${U.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${U.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var We=Object.defineProperty,ie=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,ae=(e,t,s)=>t in e?We(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,je=(e,t)=>{for(var s in t||(t={}))Ce.call(t,s)&&ae(e,s,t[s]);if(ie)for(var s of ie(t))Ae.call(t,s)&&ae(e,s,t[s]);return e};const le=u.isMobile(),O=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Me={state:O,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=U.state;if(e==="NONE"||t==="ALL"&&!e)return O.recomendedWallets;if(u.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await P.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),W=e.indexOf(m.id);return f-W}),O.recomendedWallets=l}else{const{chains:s,isAuth:r}=y.state,l=s==null?void 0:s.join(","),c=u.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:u.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=le?await P.getMobileListings(m):await P.getDesktopListings(m);O.recomendedWallets=Object.values(f)}return O.recomendedWallets},async getWallets(e){const t=je({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=U.state,{recomendedWallets:l}=O;if(r==="ALL")return O.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):u.isArray(s)&&(t.excludedIds=s.join(",")),u.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),y.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:f,total:W}=le?await P.getMobileListings(t):await P.getDesktopListings(t),n=Object.values(f),g=m?"search":"wallets";return O[g]={listings:[...O[g].listings,...n],total:W,page:c??1},{listings:n,total:W}},getWalletImageUrl(e){return P.getWalletImageUrl(e)},getAssetImageUrl(e){return P.getAssetImageUrl(e)},resetSearch(){O.search={listings:[],total:0,page:1}}},N=j({open:!1}),z={state:N,subscribe(e){return D(N,()=>e(N))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=y.state;if(u.removeWalletConnectDeepLink(),y.setWalletConnectUri(e==null?void 0:e.uri),y.setChains(e==null?void 0:e.chains),ee.reset("ConnectWallet"),s&&r)N.open=!0,t();else{const l=setInterval(()=>{const c=y.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),N.open=!0,t())},200)}})},close(){N.open=!1}};var Pe=Object.defineProperty,ce=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,de=(e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,De=(e,t)=>{for(var s in t||(t={}))Se.call(t,s)&&de(e,s,t[s]);if(ce)for(var s of ce(t))Ue.call(t,s)&&de(e,s,t[s]);return e};function _e(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=j({themeMode:_e()?"dark":"light"}),Z={state:R,subscribe(e){return D(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=De({},s))}},S=j({open:!1,message:"",variant:"success"}),ke={state:S,subscribe(e){return D(S,()=>e(S))},openToast(e,t){S.open=!0,S.message=e,S.variant=t},closeToast(){S.open=!1}};class Ne{constructor(t){this.openModal=z.open,this.closeModal=z.close,this.subscribeModal=z.subscribe,this.setTheme=Z.setThemeConfig,Z.setThemeConfig(t),U.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>require("./index-AslWQnUt.js"));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),y.setIsUiLoaded(!0)}}}const Te=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Ne},Symbol.toStringTag,{value:"Module"}));exports.R=ue;exports.T=ee;exports.a=u;exports.index=Te;exports.ne=Z;exports.oe=ke;exports.p=y;exports.se=z;exports.te=Me;exports.y=U;