@wormhole-foundation/wormhole-connect 0.3.4-beta.1-development → 0.3.4-beta.3-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 (52) hide show
  1. package/dist/assets/{cosmos-TcYN7x14.js → cosmos-9t5ds48M.js} +1 -1
  2. package/dist/assets/index-bti7uInf.js +3 -0
  3. package/dist/assets/{solana-r3vOVfGL.js → solana-QOFlt-jY.js} +2 -2
  4. package/dist/assets/{solanaEmbed.esm-8lU7Qhqn.js → solanaEmbed.esm-bag_3ej_.js} +1 -1
  5. package/dist/main.js +87 -87
  6. package/dist/src/routes/ntt/chains/evm/getMessage.d.ts +1 -0
  7. package/dist/src/routes/ntt/chains/evm/getMessage.d.ts.map +1 -1
  8. package/dist/src/routes/ntt/chains/solana/nttManager.d.ts.map +1 -1
  9. package/dist/src/views/Bridge/Send.d.ts.map +1 -1
  10. package/lib/{aptos-YJ42vr_W.js → aptos-A2P3fZwR.js} +1 -1
  11. package/lib/{aptos-vICYdEEI.mjs → aptos-LzsTT-yE.mjs} +1 -1
  12. package/lib/{ccip-DygNc1gH.mjs → ccip-EX9Uy7uh.mjs} +3 -3
  13. package/lib/{ccip-Mv-Y7qQB.js → ccip-MYRIWxwr.js} +1 -1
  14. package/lib/{cosmos-WJXFYQNK.mjs → cosmos-8BhxGLk5.mjs} +3 -3
  15. package/lib/{cosmos-cD2komSf.js → cosmos-LAGywRPJ.js} +1 -1
  16. package/lib/{evm-yjlqBufh.mjs → evm-4xBDvIbh.mjs} +4 -4
  17. package/lib/{evm-xkdI8pSv.js → evm-rkkBtxAA.js} +3 -3
  18. package/lib/{index-BuS92LIv.mjs → index-6l7AaQMo.mjs} +68 -68
  19. package/lib/{index-PiMnvd2A.js → index-DFThg9zD.js} +1 -1
  20. package/lib/{index-M1p_Eh-u.js → index-DiFBiIsU.js} +9 -9
  21. package/lib/index-FCAzcpcI.js +3 -0
  22. package/lib/{index-3M-btPTH.mjs → index-HrOVvUmR.mjs} +1 -1
  23. package/lib/{index-svQdWcUQ.js → index-IzBi7jkq.js} +1 -1
  24. package/lib/{index-NdIfNoUC.mjs → index-SXsxLkBQ.mjs} +2 -2
  25. package/lib/{index-mmUC6z11.mjs → index-TXf-Y_5p.mjs} +158 -145
  26. package/lib/{index-Ts0hMNcs.js → index-f0MmfW4C.js} +1 -1
  27. package/lib/{index-HJ7OgT39.mjs → index-oQ6mMVQe.mjs} +3 -3
  28. package/lib/{index.es-5oDTE27I.mjs → index.es-B2GmSqJ1.mjs} +1 -1
  29. package/lib/{index.es-lSW75x3B.js → index.es-JGv9-9pp.js} +1 -1
  30. package/lib/{index.es-m4cVHI1t.js → index.es-dyXbfeDn.js} +1 -1
  31. package/lib/{index.es-HvEoXVEz.js → index.es-i0PmGTV8.js} +2 -2
  32. package/lib/{index.es-uwiDXd7k.mjs → index.es-qoSsRT_G.mjs} +4 -4
  33. package/lib/{index.es-e1jl9j_3.mjs → index.es-wdCYxk2S.mjs} +2 -2
  34. package/lib/index.js +1 -1
  35. package/lib/index.mjs +1 -1
  36. package/lib/{libsodium-wrappers-XdwDixWb.mjs → libsodium-wrappers-ffJoUj0j.mjs} +1 -1
  37. package/lib/{libsodium-wrappers-6sU4RSpm.js → libsodium-wrappers-x1Tf86Kb.js} +1 -1
  38. package/lib/{sei-VsKceiXM.js → sei-ams4Dv3V.js} +1 -1
  39. package/lib/{sei-MWqmtPvc.mjs → sei-yioT3-Yb.mjs} +2 -2
  40. package/lib/{solana-azQ6daZ6.js → solana-2Gb2ijrF.js} +1 -1
  41. package/lib/{solana-wUE98qtT.mjs → solana-VyhiGF9X.mjs} +3 -3
  42. package/lib/{solanaEmbed.esm-TKwIiwFm.js → solanaEmbed.esm-AyFAReSD.js} +1 -1
  43. package/lib/{solanaEmbed.esm-NqE6Wm3_.mjs → solanaEmbed.esm-O2q9SxIk.mjs} +2 -2
  44. package/lib/src/routes/ntt/chains/evm/getMessage.d.ts +1 -0
  45. package/lib/src/routes/ntt/chains/evm/getMessage.d.ts.map +1 -1
  46. package/lib/src/routes/ntt/chains/solana/nttManager.d.ts.map +1 -1
  47. package/lib/src/views/Bridge/Send.d.ts.map +1 -1
  48. package/lib/{sui-QltJ7Szu.mjs → sui-8zqO_WMc.mjs} +1 -1
  49. package/lib/{sui-jKieURbL.js → sui-vAj128v8.js} +1 -1
  50. package/package.json +1 -1
  51. package/dist/assets/index-7UgR9Epe.js +0 -3
  52. package/lib/index-fGNWtA30.js +0 -3
@@ -1,4 +1,4 @@
1
- import { q as P, b1 as Ye, b0 as Ze, d as Z, aW as it } from "./index-mmUC6z11.mjs";
1
+ import { q as P, b0 as Ye, d as Z, b1 as Ze, aW as it } from "./index-TXf-Y_5p.mjs";
2
2
  var Je = {}, Qe = { exports: {} }, je = {};
3
3
  (function(o) {
4
4
  o.fetch = n(P.fetch) && n(P.ReadableStream), o.writableStream = n(P.WritableStream), o.abortController = n(P.AbortController);
@@ -33,13 +33,13 @@ var Je = {}, Qe = { exports: {} }, je = {};
33
33
  }
34
34
  r = null;
35
35
  })(je);
36
- var Oe = {}, Ke = je, ft = Ye(), et = Ze(), Ae = Oe.readyStates = {
36
+ var xe = {}, Ke = je, ft = Ze, et = Ye(), Ae = xe.readyStates = {
37
37
  UNSENT: 0,
38
38
  OPENED: 1,
39
39
  HEADERS_RECEIVED: 2,
40
40
  LOADING: 3,
41
41
  DONE: 4
42
- }, $e = Oe.IncomingMessage = function(o, r, h, f) {
42
+ }, $e = xe.IncomingMessage = function(o, r, h, f) {
43
43
  var n = this;
44
44
  if (et.Readable.call(n), n._mode = h, n.headers = {}, n.rawHeaders = [], n.trailers = {}, n.rawTrailers = [], n.on("end", function() {
45
45
  Z.process.nextTick(function() {
@@ -147,11 +147,11 @@ $e.prototype._onXHRProgress = function(o) {
147
147
  }
148
148
  r._xhr.readyState === Ae.DONE && r._mode !== "ms-stream" && (o(!0), r.push(null));
149
149
  };
150
- var he = je, ht = Ye(), tt = Oe, ke = Ze(), ut = tt.IncomingMessage, Ve = tt.readyStates;
150
+ var he = je, ht = Ze, tt = xe, ke = Ye(), ut = tt.IncomingMessage, Ve = tt.readyStates;
151
151
  function ct(o, r) {
152
152
  return he.fetch && r ? "fetch" : he.mozchunkedarraybuffer ? "moz-chunked-arraybuffer" : he.msstream ? "ms-stream" : he.arraybuffer && o ? "arraybuffer" : "text";
153
153
  }
154
- var I = Qe.exports = function(o) {
154
+ var S = Qe.exports = function(o) {
155
155
  var r = this;
156
156
  ke.Writable.call(r), r._opts = o, r._body = [], r._headers = {}, o.auth && r.setHeader("Authorization", "Basic " + Z.Buffer.from(o.auth).toString("base64")), Object.keys(o.headers).forEach(function(n) {
157
157
  r.setHeader(n, o.headers[n]);
@@ -171,23 +171,23 @@ var I = Qe.exports = function(o) {
171
171
  r._onFinish();
172
172
  });
173
173
  };
174
- ht(I, ke.Writable);
175
- I.prototype.setHeader = function(o, r) {
174
+ ht(S, ke.Writable);
175
+ S.prototype.setHeader = function(o, r) {
176
176
  var h = this, f = o.toLowerCase();
177
177
  pt.indexOf(f) === -1 && (h._headers[f] = {
178
178
  name: o,
179
179
  value: r
180
180
  });
181
181
  };
182
- I.prototype.getHeader = function(o) {
182
+ S.prototype.getHeader = function(o) {
183
183
  var r = this._headers[o.toLowerCase()];
184
184
  return r ? r.value : null;
185
185
  };
186
- I.prototype.removeHeader = function(o) {
186
+ S.prototype.removeHeader = function(o) {
187
187
  var r = this;
188
188
  delete r._headers[o.toLowerCase()];
189
189
  };
190
- I.prototype._onFinish = function() {
190
+ S.prototype._onFinish = function() {
191
191
  var o = this;
192
192
  if (!o._destroyed) {
193
193
  var r = o._opts;
@@ -267,43 +267,43 @@ function lt(o) {
267
267
  return !1;
268
268
  }
269
269
  }
270
- I.prototype._onXHRProgress = function() {
270
+ S.prototype._onXHRProgress = function() {
271
271
  var o = this;
272
272
  o._resetTimers(!1), !(!lt(o._xhr) || o._destroyed) && (o._response || o._connect(), o._response._onXHRProgress(o._resetTimers.bind(o)));
273
273
  };
274
- I.prototype._connect = function() {
274
+ S.prototype._connect = function() {
275
275
  var o = this;
276
276
  o._destroyed || (o._response = new ut(o._xhr, o._fetchResponse, o._mode, o._resetTimers.bind(o)), o._response.on("error", function(r) {
277
277
  o.emit("error", r);
278
278
  }), o.emit("response", o._response));
279
279
  };
280
- I.prototype._write = function(o, r, h) {
280
+ S.prototype._write = function(o, r, h) {
281
281
  var f = this;
282
282
  f._body.push(o), h();
283
283
  };
284
- I.prototype._resetTimers = function(o) {
284
+ S.prototype._resetTimers = function(o) {
285
285
  var r = this;
286
286
  P.clearTimeout(r._socketTimer), r._socketTimer = null, o ? (P.clearTimeout(r._fetchTimer), r._fetchTimer = null) : r._socketTimeout && (r._socketTimer = P.setTimeout(function() {
287
287
  r.emit("timeout");
288
288
  }, r._socketTimeout));
289
289
  };
290
- I.prototype.abort = I.prototype.destroy = function(o) {
290
+ S.prototype.abort = S.prototype.destroy = function(o) {
291
291
  var r = this;
292
292
  r._destroyed = !0, r._resetTimers(!0), r._response && (r._response._destroyed = !0), r._xhr ? r._xhr.abort() : r._fetchAbortController && r._fetchAbortController.abort(), o && r.emit("error", o);
293
293
  };
294
- I.prototype.end = function(o, r, h) {
294
+ S.prototype.end = function(o, r, h) {
295
295
  var f = this;
296
296
  typeof o == "function" && (h = o, o = void 0), ke.Writable.prototype.end.call(f, o, r, h);
297
297
  };
298
- I.prototype.setTimeout = function(o, r) {
298
+ S.prototype.setTimeout = function(o, r) {
299
299
  var h = this;
300
300
  r && h.once("timeout", r), h._socketTimeout = o, h._resetTimers(!1);
301
301
  };
302
- I.prototype.flushHeaders = function() {
302
+ S.prototype.flushHeaders = function() {
303
303
  };
304
- I.prototype.setNoDelay = function() {
304
+ S.prototype.setNoDelay = function() {
305
305
  };
306
- I.prototype.setSocketKeepAlive = function() {
306
+ S.prototype.setSocketKeepAlive = function() {
307
307
  };
308
308
  var pt = [
309
309
  "accept-charset",
@@ -405,7 +405,7 @@ qe.exports;
405
405
  (function(h) {
406
406
  var f = r && !r.nodeType && r, n = o && !o.nodeType && o, g = typeof P == "object" && P;
407
407
  (g.global === g || g.window === g || g.self === g) && (h = g);
408
- var u, a = 2147483647, v = 36, T = 1, C = 26, m = 38, A = 700, te = 72, ae = 128, S = "-", xe = /^xn--/, Ee = /[^\x20-\x7E]/, Ue = /[\x2E\u3002\uFF0E\uFF61]/g, Le = {
408
+ var u, a = 2147483647, v = 36, T = 1, C = 26, m = 38, A = 700, te = 72, ae = 128, I = "-", Oe = /^xn--/, Ee = /[^\x20-\x7E]/, Ue = /[\x2E\u3002\uFF0E\uFF61]/g, Le = {
409
409
  overflow: "Overflow: input needs wider integers to process",
410
410
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
411
411
  "invalid-input": "Invalid input"
@@ -449,7 +449,7 @@ qe.exports;
449
449
  }
450
450
  function we(i) {
451
451
  var p = [], y = i.length, b, w = 0, U = ae, q = te, R, N, B, G, L, H, k, W, Q;
452
- for (R = i.lastIndexOf(S), R < 0 && (R = 0), N = 0; N < R; ++N)
452
+ for (R = i.lastIndexOf(I), R < 0 && (R = 0), N = 0; N < R; ++N)
453
453
  i.charCodeAt(N) >= 128 && J("not-basic"), p.push(i.charCodeAt(N));
454
454
  for (B = R > 0 ? R + 1 : 0; B < y; ) {
455
455
  for (G = w, L = 1, H = v; B >= y && J("invalid-input"), k = oe(i.charCodeAt(B++)), (k >= v || k > M((a - w) / L)) && J("overflow"), w += k * L, W = H <= q ? T : H >= q + C ? C : H - q, !(k < W); H += v)
@@ -462,7 +462,7 @@ qe.exports;
462
462
  var p, y, b, w, U, q, R, N, B, G, L, H = [], k, W, Q, me;
463
463
  for (i = Te(i), k = i.length, p = ae, y = 0, U = te, q = 0; q < k; ++q)
464
464
  L = i[q], L < 128 && H.push(re(L));
465
- for (b = w = H.length, w && H.push(S); b < k; ) {
465
+ for (b = w = H.length, w && H.push(I); b < k; ) {
466
466
  for (R = a, q = 0; q < k; ++q)
467
467
  L = i[q], L >= p && L < R && (R = L);
468
468
  for (W = b + 1, R - p > M((a - y) / W) && J("overflow"), y += (R - p) * W, p = R, q = 0; q < k; ++q)
@@ -479,10 +479,10 @@ qe.exports;
479
479
  }
480
480
  function Pe(i) {
481
481
  return be(i, function(p) {
482
- return xe.test(p) ? we(p.slice(4).toLowerCase()) : p;
482
+ return Oe.test(p) ? we(p.slice(4).toLowerCase()) : p;
483
483
  });
484
484
  }
485
- function Ie(i) {
485
+ function Se(i) {
486
486
  return be(i, function(p) {
487
487
  return Ee.test(p) ? "xn--" + Re(p) : p;
488
488
  });
@@ -507,7 +507,7 @@ qe.exports;
507
507
  },
508
508
  decode: we,
509
509
  encode: Re,
510
- toASCII: Ie,
510
+ toASCII: Se,
511
511
  toUnicode: Pe
512
512
  }, f && n)
513
513
  if (o.exports == f)
@@ -539,11 +539,11 @@ var _t = qe.exports;
539
539
  isNullOrUndefined: function(e) {
540
540
  return e == null;
541
541
  }
542
- }, v = g.default, T = a, C = ne, m = Re, A = Pe, te = we, ae = S;
543
- function S() {
542
+ }, v = g.default, T = a, C = ne, m = Re, A = Pe, te = we, ae = I;
543
+ function I() {
544
544
  this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
545
545
  }
546
- var xe = /^([a-z0-9.+-]+:)/i, Ee = /:[0-9]*$/, Ue = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, Le = ["<", ">", '"', "`", " ", "\r", `
546
+ var Oe = /^([a-z0-9.+-]+:)/i, Ee = /:[0-9]*$/, Ue = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, Le = ["<", ">", '"', "`", " ", "\r", `
547
547
  `, " "], pe = ["{", "}", "|", "\\", "^", "`"].concat(Le), M = ["'"].concat(pe), re = ["%", "/", "?", ";", "#"].concat(M), ie = ["/", "?", "#"], J = 255, de = /^[+a-z0-9A-Z_-]{0,63}$/, be = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, Te = {
548
548
  javascript: !0,
549
549
  "javascript:": !0
@@ -563,12 +563,12 @@ var _t = qe.exports;
563
563
  "file:": !0
564
564
  }, ce = u.default;
565
565
  function ne(e, s, t) {
566
- if (e && T.isObject(e) && e instanceof S)
566
+ if (e && T.isObject(e) && e instanceof I)
567
567
  return e;
568
- var l = new S();
568
+ var l = new I();
569
569
  return l.parse(e, s, t), l;
570
570
  }
571
- S.prototype.parse = function(e, s, t) {
571
+ I.prototype.parse = function(e, s, t) {
572
572
  if (!T.isString(e))
573
573
  throw new TypeError("Parameter 'url' must be a string, not " + typeof e);
574
574
  var l = e.indexOf("?"), _ = l !== -1 && l < e.indexOf("#") ? "?" : "#", D = e.split(_), j = /\\/g;
@@ -579,37 +579,37 @@ var _t = qe.exports;
579
579
  if (K)
580
580
  return this.path = c, this.href = c, this.pathname = K[1], K[2] ? (this.search = K[2], s ? this.query = ce.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : s && (this.search = "", this.query = {}), this;
581
581
  }
582
- var O = xe.exec(c);
583
- if (O) {
584
- O = O[0];
585
- var fe = O.toLowerCase();
586
- this.protocol = fe, c = c.substr(O.length);
582
+ var x = Oe.exec(c);
583
+ if (x) {
584
+ x = x[0];
585
+ var fe = x.toLowerCase();
586
+ this.protocol = fe, c = c.substr(x.length);
587
587
  }
588
- if (t || O || c.match(/^\/\/[^@\/]+@[^@\/]+/)) {
588
+ if (t || x || c.match(/^\/\/[^@\/]+@[^@\/]+/)) {
589
589
  var ve = c.substr(0, 2) === "//";
590
- ve && !(O && ue[O]) && (c = c.substr(2), this.slashes = !0);
590
+ ve && !(x && ue[x]) && (c = c.substr(2), this.slashes = !0);
591
591
  }
592
- if (!ue[O] && (ve || O && !oe[O])) {
593
- for (var F = -1, x = 0; x < ie.length; x++) {
594
- var ee = c.indexOf(ie[x]);
592
+ if (!ue[x] && (ve || x && !oe[x])) {
593
+ for (var F = -1, O = 0; O < ie.length; O++) {
594
+ var ee = c.indexOf(ie[O]);
595
595
  ee !== -1 && (F === -1 || ee < F) && (F = ee);
596
596
  }
597
597
  var ye, $;
598
598
  F === -1 ? $ = c.lastIndexOf("@") : $ = c.lastIndexOf("@", F), $ !== -1 && (ye = c.slice(0, $), c = c.slice($ + 1), this.auth = decodeURIComponent(ye)), F = -1;
599
- for (var x = 0; x < re.length; x++) {
600
- var ee = c.indexOf(re[x]);
599
+ for (var O = 0; O < re.length; O++) {
600
+ var ee = c.indexOf(re[O]);
601
601
  ee !== -1 && (F === -1 || ee < F) && (F = ee);
602
602
  }
603
603
  F === -1 && (F = c.length), this.host = c.slice(0, F), c = c.slice(F), this.parseHost(), this.hostname = this.hostname || "";
604
604
  var ge = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
605
605
  if (!ge)
606
- for (var d = this.hostname.split(/\./), x = 0, E = d.length; x < E; x++) {
607
- var V = d[x];
606
+ for (var d = this.hostname.split(/\./), O = 0, E = d.length; O < E; O++) {
607
+ var V = d[O];
608
608
  if (V && !V.match(de)) {
609
- for (var z = "", X = 0, Se = V.length; X < Se; X++)
609
+ for (var z = "", X = 0, Ie = V.length; X < Ie; X++)
610
610
  V.charCodeAt(X) > 127 ? z += "x" : z += V[X];
611
611
  if (!z.match(de)) {
612
- var se = d.slice(0, x), Y = d.slice(x + 1), le = V.match(be);
612
+ var se = d.slice(0, O), Y = d.slice(O + 1), le = V.match(be);
613
613
  le && (se.push(le[1]), Y.unshift(le[2])), Y.length && (c = "/" + Y.join(".") + c), this.hostname = se.join(".");
614
614
  break;
615
615
  }
@@ -620,8 +620,8 @@ var _t = qe.exports;
620
620
  this.host = st + Fe, this.href += this.host, ge && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), c[0] !== "/" && (c = "/" + c));
621
621
  }
622
622
  if (!Te[fe])
623
- for (var x = 0, E = M.length; x < E; x++) {
624
- var _e = M[x];
623
+ for (var O = 0, E = M.length; O < E; O++) {
624
+ var _e = M[O];
625
625
  if (c.indexOf(_e) !== -1) {
626
626
  var Me = encodeURIComponent(_e);
627
627
  Me === _e && (Me = escape(_e)), c = c.split(_e).join(Me);
@@ -637,9 +637,9 @@ var _t = qe.exports;
637
637
  return this.href = this.format(), this;
638
638
  };
639
639
  function we(e) {
640
- return T.isString(e) && (e = ne(e)), e instanceof S ? e.format() : S.prototype.format.call(e);
640
+ return T.isString(e) && (e = ne(e)), e instanceof I ? e.format() : I.prototype.format.call(e);
641
641
  }
642
- S.prototype.format = function() {
642
+ I.prototype.format = function() {
643
643
  var e = this.auth || "";
644
644
  e && (e = encodeURIComponent(e), e = e.replace(/%3A/i, ":"), e += "@");
645
645
  var s = this.protocol || "", t = this.pathname || "", l = this.hash || "", _ = !1, D = "";
@@ -652,18 +652,18 @@ var _t = qe.exports;
652
652
  function Re(e, s) {
653
653
  return ne(e, !1, !0).resolve(s);
654
654
  }
655
- S.prototype.resolve = function(e) {
655
+ I.prototype.resolve = function(e) {
656
656
  return this.resolveObject(ne(e, !1, !0)).format();
657
657
  };
658
658
  function Pe(e, s) {
659
659
  return e ? ne(e, !1, !0).resolveObject(s) : s;
660
660
  }
661
- S.prototype.resolveObject = function(e) {
661
+ I.prototype.resolveObject = function(e) {
662
662
  if (T.isString(e)) {
663
- var s = new S();
663
+ var s = new I();
664
664
  s.parse(e, !1, !0), e = s;
665
665
  }
666
- for (var t = new S(), l = Object.keys(this), _ = 0; _ < l.length; _++) {
666
+ for (var t = new I(), l = Object.keys(this), _ = 0; _ < l.length; _++) {
667
667
  var D = l[_];
668
668
  t[D] = this[D];
669
669
  }
@@ -678,8 +678,8 @@ var _t = qe.exports;
678
678
  }
679
679
  if (e.protocol && e.protocol !== t.protocol) {
680
680
  if (!oe[e.protocol]) {
681
- for (var O = Object.keys(e), fe = 0; fe < O.length; fe++) {
682
- var ve = O[fe];
681
+ for (var x = Object.keys(e), fe = 0; fe < x.length; fe++) {
682
+ var ve = x[fe];
683
683
  t[ve] = e[ve];
684
684
  }
685
685
  return t.href = t.format(), t;
@@ -691,8 +691,8 @@ var _t = qe.exports;
691
691
  } else
692
692
  t.pathname = e.pathname;
693
693
  if (t.search = e.search, t.query = e.query, t.host = e.host || "", t.auth = e.auth, t.hostname = e.hostname || e.host, t.port = e.port, t.pathname || t.search) {
694
- var F = t.pathname || "", x = t.search || "";
695
- t.path = F + x;
694
+ var F = t.pathname || "", O = t.search || "";
695
+ t.path = F + O;
696
696
  }
697
697
  return t.slashes = t.slashes || e.slashes, t.href = t.format(), t;
698
698
  }
@@ -711,12 +711,12 @@ var _t = qe.exports;
711
711
  }
712
712
  if (!d.length)
713
713
  return t.pathname = null, t.search ? t.path = "/" + t.search : t.path = null, t.href = t.format(), t;
714
- for (var X = d.slice(-1)[0], Se = (t.host || e.host || d.length > 1) && (X === "." || X === "..") || X === "", se = 0, Y = d.length; Y >= 0; Y--)
714
+ for (var X = d.slice(-1)[0], Ie = (t.host || e.host || d.length > 1) && (X === "." || X === "..") || X === "", se = 0, Y = d.length; Y >= 0; Y--)
715
715
  X = d[Y], X === "." ? d.splice(Y, 1) : X === ".." ? (d.splice(Y, 1), se++) : se && (d.splice(Y, 1), se--);
716
716
  if (!$ && !ge)
717
717
  for (; se--; se)
718
718
  d.unshift("..");
719
- $ && d[0] !== "" && (!d[0] || d[0].charAt(0) !== "/") && d.unshift(""), Se && d.join("/").substr(-1) !== "/" && d.push("");
719
+ $ && d[0] !== "" && (!d[0] || d[0].charAt(0) !== "/") && d.unshift(""), Ie && d.join("/").substr(-1) !== "/" && d.push("");
720
720
  var le = d[0] === "" || d[0] && d[0].charAt(0) === "/";
721
721
  if (V) {
722
722
  t.hostname = t.host = le ? "" : d.length ? d.shift() : "";
@@ -724,11 +724,11 @@ var _t = qe.exports;
724
724
  z && (t.auth = z.shift(), t.host = t.hostname = z.shift());
725
725
  }
726
726
  return $ = $ || t.host && d.length, $ && !le && d.unshift(""), d.length ? t.pathname = d.join("/") : (t.pathname = null, t.path = null), (!T.isNull(t.pathname) || !T.isNull(t.search)) && (t.path = (t.pathname ? t.pathname : "") + (t.search ? t.search : "")), t.auth = e.auth || t.auth, t.slashes = t.slashes || e.slashes, t.href = t.format(), t;
727
- }, S.prototype.parseHost = function() {
727
+ }, I.prototype.parseHost = function() {
728
728
  var e = this.host, s = Ee.exec(e);
729
729
  s && (s = s[0], s !== ":" && (this.port = s.substr(1)), e = e.substr(0, e.length - s.length)), e && (this.hostname = e);
730
730
  };
731
- function Ie(e, s) {
731
+ function Se(e, s) {
732
732
  for (var t = 0, l = e.length - 1; l >= 0; l--) {
733
733
  var _ = e[l];
734
734
  _ === "." ? e.splice(l, 1) : _ === ".." ? (e.splice(l, 1), t++) : t && (e.splice(l, 1), t--);
@@ -747,7 +747,7 @@ var _t = qe.exports;
747
747
  continue;
748
748
  e = l + "/" + e, s = l.charAt(0) === "/";
749
749
  }
750
- return e = Ie(p(e.split("/"), function(_) {
750
+ return e = Se(p(e.split("/"), function(_) {
751
751
  return !!_;
752
752
  }), !s).join("/"), (s ? "/" : "") + e || ".";
753
753
  }
@@ -859,8 +859,8 @@ var _t = qe.exports;
859
859
  return b(s);
860
860
  if (typeof t != "object" || t === null)
861
861
  throw new TypeError('The "options" argument must be of type object.');
862
- var j = (l = t.auth) != null ? l : !0, c = (_ = t.fragment) != null ? _ : !0, K = (D = t.search) != null ? D : !0, O = new R(s.toString());
863
- return j || (O.username = "", O.password = ""), c || (O.hash = ""), K || (O.search = ""), O.toString();
862
+ var j = (l = t.auth) != null ? l : !0, c = (_ = t.fragment) != null ? _ : !0, K = (D = t.search) != null ? D : !0, x = new R(s.toString());
863
+ return j || (x.username = "", x.password = ""), c || (x.hash = ""), K || (x.search = ""), x.toString();
864
864
  }
865
865
  ), We = {
866
866
  format: Xe,
@@ -879,7 +879,7 @@ var _t = qe.exports;
879
879
  })(He, He.exports);
880
880
  var rt = He.exports;
881
881
  (function(o) {
882
- var r = dt, h = Oe, f = mt, n = gt, g = rt, u = o;
882
+ var r = dt, h = xe, f = mt, n = gt, g = rt, u = o;
883
883
  u.request = function(a, v) {
884
884
  typeof a == "string" ? a = g.parse(a) : a = f(a);
885
885
  var T = P.location.protocol.search(/^https?:$/) === -1 ? "http:" : "", C = a.protocol || T, m = a.hostname || a.host, A = a.port, te = a.path || "/";
@@ -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)};var H={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const 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(k=>{if(Object.getOwnPropertyDescriptor(w,k))return;const W=Reflect.get(n,k),M={value:W,enumerable:!0,configurable:!0};if(x.has(W))ne(W,!1);else if(W instanceof Promise)delete M.value,M.get=()=>I(W);else if(A.has(W)){const[b,q]=A.get(W);M.value=c(b,q(),I)}Object.defineProperty(w,k,M)}),Object.preventExtensions(w)},m=new WeakMap,f=[1,1],E=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 k=f[1];const W=(a=++f[1])=>(k!==a&&!v.size&&(k=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],N)=>{if((H?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const R=o[3](M(N));b.set(N,[o,R])}),()=>{v.delete(a),v.size===0&&b.forEach(([o,h],N)=>{h&&(h(),b.set(N,[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 N=Reflect.has(a,i),R=Reflect.get(a,i,h);if(N&&(e(R,o)||m.has(o)&&e(R,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=E(o));const C=!x.has(V)&&A.get(V);C&&q(i,C)}return Reflect.set(a,i,V,h),w(["set",[i],o,R]),!0}});m.set(n,$);const fe=[J,W,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)}),$})=>[E,A,x,e,t,s,r,l,c,m,f],[ye]=be();function j(e={}){return ye(e)}function P(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=>{if(c.push(g),s){t(c.splice(0));return}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 P(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 P(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)}}},L=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),y={state:L,subscribe(e){return P(L,()=>e(L))},setChains(e){L.chains=e},setWalletConnectUri(e){L.walletConnectUri=e},setIsCustomDesktop(e){L.isCustomDesktop=e},setIsCustomMobile(e){L.isCustomMobile=e},setIsDataLoaded(e){L.isDataLoaded=e},setIsUiLoaded(e){L.isUiLoaded=e},setIsAuth(e){L.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}),S={state:B,subscribe(e){return P(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,Le=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,We=(e,t)=>{for(var s in t||(t={}))Le.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=We({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",S.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const U={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=${S.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${S.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ee=Object.defineProperty,ie=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,ae=(e,t,s)=>t in e?Ee(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}=S.state;if(e==="NONE"||t==="ALL"&&!e)return O.recomendedWallets;if(u.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await U.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),E=e.indexOf(m.id);return f-E}),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 U.getMobileListings(m):await U.getDesktopListings(m);O.recomendedWallets=Object.values(f)}return O.recomendedWallets},async getWallets(e){const t=je({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=S.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:E}=le?await U.getMobileListings(t):await U.getDesktopListings(t),n=Object.values(f),g=m?"search":"wallets";return O[g]={listings:[...O[g].listings,...n],total:E,page:c??1},{listings:n,total:E}},getWalletImageUrl(e){return U.getWalletImageUrl(e)},getAssetImageUrl(e){return U.getAssetImageUrl(e)},resetSearch(){O.search={listings:[],total:0,page:1}}},_=j({open:!1}),z={state:_,subscribe(e){return P(_,()=>e(_))},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)_.open=!0,t();else{const l=setInterval(()=>{const c=y.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),_.open=!0,t())},200)}})},close(){_.open=!1}};var Ue=Object.defineProperty,ce=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,de=(e,t,s)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Pe=(e,t)=>{for(var s in t||(t={}))De.call(t,s)&&de(e,s,t[s]);if(ce)for(var s of ce(t))Se.call(t,s)&&de(e,s,t[s]);return e};function ke(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const T=j({themeMode:ke()?"dark":"light"}),Z={state:T,subscribe(e){return P(T,()=>e(T))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(T.themeMode=t),s&&(T.themeVariables=Pe({},s))}},D=j({open:!1,message:"",variant:"success"}),Ne={state:D,subscribe(e){return P(D,()=>e(D))},openToast(e,t){D.open=!0,D.message=e,D.variant=t},closeToast(){D.open=!1}};class _e{constructor(t){this.openModal=z.open,this.closeModal=z.close,this.subscribeModal=z.subscribe,this.setTheme=Z.setThemeConfig,Z.setThemeConfig(t),S.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>require("./index-svQdWcUQ.js"));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),y.setIsUiLoaded(!0)}}}const Re=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:_e},Symbol.toStringTag,{value:"Module"}));exports.R=ue;exports.T=ee;exports.a=u;exports.index=Re;exports.ne=Z;exports.oe=Ne;exports.p=y;exports.se=z;exports.te=Me;exports.y=S;
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)};var H={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const 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(k=>{if(Object.getOwnPropertyDescriptor(w,k))return;const W=Reflect.get(n,k),M={value:W,enumerable:!0,configurable:!0};if(x.has(W))ne(W,!1);else if(W instanceof Promise)delete M.value,M.get=()=>I(W);else if(A.has(W)){const[b,q]=A.get(W);M.value=c(b,q(),I)}Object.defineProperty(w,k,M)}),Object.preventExtensions(w)},m=new WeakMap,f=[1,1],E=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 k=f[1];const W=(a=++f[1])=>(k!==a&&!v.size&&(k=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],N)=>{if((H?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const R=o[3](M(N));b.set(N,[o,R])}),()=>{v.delete(a),v.size===0&&b.forEach(([o,h],N)=>{h&&(h(),b.set(N,[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 N=Reflect.has(a,i),R=Reflect.get(a,i,h);if(N&&(e(R,o)||m.has(o)&&e(R,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=E(o));const C=!x.has(V)&&A.get(V);C&&q(i,C)}return Reflect.set(a,i,V,h),w(["set",[i],o,R]),!0}});m.set(n,$);const fe=[J,W,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)}),$})=>[E,A,x,e,t,s,r,l,c,m,f],[ye]=be();function j(e={}){return ye(e)}function P(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=>{if(c.push(g),s){t(c.splice(0));return}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 P(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 P(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)}}},L=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),y={state:L,subscribe(e){return P(L,()=>e(L))},setChains(e){L.chains=e},setWalletConnectUri(e){L.walletConnectUri=e},setIsCustomDesktop(e){L.isCustomDesktop=e},setIsCustomMobile(e){L.isCustomMobile=e},setIsDataLoaded(e){L.isDataLoaded=e},setIsUiLoaded(e){L.isUiLoaded=e},setIsAuth(e){L.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}),S={state:B,subscribe(e){return P(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,Le=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,We=(e,t)=>{for(var s in t||(t={}))Le.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=We({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",S.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const U={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=${S.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${S.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ee=Object.defineProperty,ie=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,ae=(e,t,s)=>t in e?Ee(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}=S.state;if(e==="NONE"||t==="ALL"&&!e)return O.recomendedWallets;if(u.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await U.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),E=e.indexOf(m.id);return f-E}),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 U.getMobileListings(m):await U.getDesktopListings(m);O.recomendedWallets=Object.values(f)}return O.recomendedWallets},async getWallets(e){const t=je({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=S.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:E}=le?await U.getMobileListings(t):await U.getDesktopListings(t),n=Object.values(f),g=m?"search":"wallets";return O[g]={listings:[...O[g].listings,...n],total:E,page:c??1},{listings:n,total:E}},getWalletImageUrl(e){return U.getWalletImageUrl(e)},getAssetImageUrl(e){return U.getAssetImageUrl(e)},resetSearch(){O.search={listings:[],total:0,page:1}}},_=j({open:!1}),z={state:_,subscribe(e){return P(_,()=>e(_))},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)_.open=!0,t();else{const l=setInterval(()=>{const c=y.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),_.open=!0,t())},200)}})},close(){_.open=!1}};var Ue=Object.defineProperty,ce=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,de=(e,t,s)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Pe=(e,t)=>{for(var s in t||(t={}))De.call(t,s)&&de(e,s,t[s]);if(ce)for(var s of ce(t))Se.call(t,s)&&de(e,s,t[s]);return e};function ke(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const T=j({themeMode:ke()?"dark":"light"}),Z={state:T,subscribe(e){return P(T,()=>e(T))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(T.themeMode=t),s&&(T.themeVariables=Pe({},s))}},D=j({open:!1,message:"",variant:"success"}),Ne={state:D,subscribe(e){return P(D,()=>e(D))},openToast(e,t){D.open=!0,D.message=e,D.variant=t},closeToast(){D.open=!1}};class _e{constructor(t){this.openModal=z.open,this.closeModal=z.close,this.subscribeModal=z.subscribe,this.setTheme=Z.setThemeConfig,Z.setThemeConfig(t),S.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>require("./index-IzBi7jkq.js"));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),y.setIsUiLoaded(!0)}}}const Re=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:_e},Symbol.toStringTag,{value:"Module"}));exports.R=ue;exports.T=ee;exports.a=u;exports.index=Re;exports.ne=Z;exports.oe=Ne;exports.p=y;exports.se=z;exports.te=Me;exports.y=S;