@edgex-web/components 0.1.0-beta.43 → 0.1.0-beta.45

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.
@@ -1,4 +1,4 @@
1
- import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-4RV1Whpr.mjs";
1
+ import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-jBPiBUgn.mjs";
2
2
  class S extends p {
3
3
  constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
4
4
  var o;
@@ -147,4 +147,4 @@ export {
147
147
  T as offchainLookupAbiItem,
148
148
  A as offchainLookupSignature
149
149
  };
150
- //# sourceMappingURL=ccip-BsU2IAdX.mjs.map
150
+ //# sourceMappingURL=ccip-u2-A7m2a.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ccip-BsU2IAdX.mjs","sources":["../node_modules/viem/_esm/errors/ccip.js","../node_modules/viem/_esm/utils/ccip.js"],"sourcesContent":["import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n super(cause.shortMessage ||\n 'An error occurred while fetching for an offchain result.', {\n cause,\n metaMessages: [\n ...(cause.metaMessages || []),\n cause.metaMessages?.length ? '' : [],\n 'Offchain Gateway Call:',\n urls && [\n ' Gateway URL(s):',\n ...urls.map((url) => ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n name: 'OffchainLookupError',\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n name: 'OffchainLookupResponseMalformedError',\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n name: 'OffchainLookupSenderMismatchError',\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { localBatchGatewayRequest, localBatchGatewayUrl, } from './ens/localBatchGatewayRequest.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n ? ccipRead.request\n : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = urls.includes(localBatchGatewayUrl)\n ? await localBatchGatewayRequest({\n data: callData,\n ccipRequest: ccipRequest_,\n })\n : await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n to,\n });\n return data_;\n }\n catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipRequest({ data, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n const method = url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n const headers = method === 'POST' ? { 'Content-Type': 'application/json' } : {};\n try {\n const response = await fetch(url.replace('{sender}', sender.toLowerCase()).replace('{data}', data), {\n body: JSON.stringify(body),\n headers,\n method,\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error\n ? stringify(result.error)\n : response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"names":["OffchainLookupError","BaseError","callbackSelector","cause","data","extraData","sender","urls","_a","url","getUrl","OffchainLookupResponseMalformedError","result","stringify","OffchainLookupSenderMismatchError","to","offchainLookupSignature","offchainLookupAbiItem","offchainLookup","client","blockNumber","blockTag","args","decodeErrorResult","callData","ccipRead","ccipRequest_","ccipRequest","isAddressEqual","localBatchGatewayUrl","localBatchGatewayRequest","data_","call","concat","encodeAbiParameters","err","error","i","method","body","headers","response","HttpRequestError","isHex"],"mappings":";AAGO,MAAMA,UAA4BC,EAAU;AAAA,EAC/C,YAAY,EAAE,kBAAAC,GAAkB,OAAAC,GAAO,MAAAC,GA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AAAC;AAAA,UACA,KAAAH;AAAA,QACpB,CAAiB;AACD;AAAA,MACJ;AACA,aAAOG;AAAA,IACX,SACOuB,GAAK;AACR,MAAAC,IAAQ,IAAIM,EAAiB;AAAA,QACzB,MAAAH;AAAA,QACA,SAASJ,EAAI;AAAA,QACb,KAAA1B;AAAA,MAChB,CAAa;AAAA,IACL;AAAA,EACJ;AACA,QAAM2B;AACV;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"ccip-u2-A7m2a.mjs","sources":["../node_modules/viem/_esm/errors/ccip.js","../node_modules/viem/_esm/utils/ccip.js"],"sourcesContent":["import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n super(cause.shortMessage ||\n 'An error occurred while fetching for an offchain result.', {\n cause,\n metaMessages: [\n ...(cause.metaMessages || []),\n cause.metaMessages?.length ? '' : [],\n 'Offchain Gateway Call:',\n urls && [\n ' Gateway URL(s):',\n ...urls.map((url) => ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n name: 'OffchainLookupError',\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n name: 'OffchainLookupResponseMalformedError',\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n name: 'OffchainLookupSenderMismatchError',\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { localBatchGatewayRequest, localBatchGatewayUrl, } from './ens/localBatchGatewayRequest.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n ? ccipRead.request\n : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = urls.includes(localBatchGatewayUrl)\n ? await localBatchGatewayRequest({\n data: callData,\n ccipRequest: ccipRequest_,\n })\n : await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n to,\n });\n return data_;\n }\n catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipRequest({ data, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n const method = url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n const headers = method === 'POST' ? { 'Content-Type': 'application/json' } : {};\n try {\n const response = await fetch(url.replace('{sender}', sender.toLowerCase()).replace('{data}', data), {\n body: JSON.stringify(body),\n headers,\n method,\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error\n ? stringify(result.error)\n : response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"names":["OffchainLookupError","BaseError","callbackSelector","cause","data","extraData","sender","urls","_a","url","getUrl","OffchainLookupResponseMalformedError","result","stringify","OffchainLookupSenderMismatchError","to","offchainLookupSignature","offchainLookupAbiItem","offchainLookup","client","blockNumber","blockTag","args","decodeErrorResult","callData","ccipRead","ccipRequest_","ccipRequest","isAddressEqual","localBatchGatewayUrl","localBatchGatewayRequest","data_","call","concat","encodeAbiParameters","err","error","i","method","body","headers","response","HttpRequestError","isHex"],"mappings":";AAGO,MAAMA,UAA4BC,EAAU;AAAA,EAC/C,YAAY,EAAE,kBAAAC,GAAkB,OAAAC,GAAO,MAAAC,GAAM,WAAAC,GAAW,QAAAC,GAAQ,MAAAC,KAAS;;AACrE,UAAMJ,EAAM,gBACR,4DAA4D;AAAA,MAC5D,OAAAA;AAAA,MACA,cAAc;AAAA,QACV,GAAIA,EAAM,gBAAgB;SAC1BK,IAAAL,EAAM,iBAAN,QAAAK,EAAoB,SAAS,KAAK,CAAA;AAAA,QAClC;AAAA,QACAD,KAAQ;AAAA,UACJ;AAAA,UACA,GAAGA,EAAK,IAAI,CAACE,MAA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":3,"file":"usePoolBalance.d.ts","sourceRoot":"","sources":["../../src/hooks/usePoolBalance.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAaD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,GAAE,oBAAyB;;;;EAmE/D"}
1
+ {"version":3,"file":"usePoolBalance.d.ts","sourceRoot":"","sources":["../../src/hooks/usePoolBalance.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAaD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,GAAE,oBAAyB;;;;EAuE/D"}
@@ -322,7 +322,7 @@ function Nm() {
322
322
  }
323
323
  return "";
324
324
  }
325
- var de = Object.prototype.hasOwnProperty, Fo = {}, dn = A.ReactDebugCurrentFrame;
325
+ var fe = Object.prototype.hasOwnProperty, Fo = {}, dn = A.ReactDebugCurrentFrame;
326
326
  function jo(k) {
327
327
  if (k) {
328
328
  var V = k._owner, Y = se(k.type, k._source, V ? V.type : null);
@@ -332,7 +332,7 @@ function Nm() {
332
332
  }
333
333
  function em(k, V, Y, ie, ye) {
334
334
  {
335
- var we = Function.call.bind(de);
335
+ var we = Function.call.bind(fe);
336
336
  for (var me in k)
337
337
  if (we(k, me)) {
338
338
  var pe = void 0;
@@ -380,7 +380,7 @@ function Nm() {
380
380
  __source: !0
381
381
  }, Sl, Pl;
382
382
  function sm(k) {
383
- if (de.call(k, "ref")) {
383
+ if (fe.call(k, "ref")) {
384
384
  var V = Object.getOwnPropertyDescriptor(k, "ref").get;
385
385
  if (V && V.isReactWarning)
386
386
  return !1;
@@ -388,7 +388,7 @@ function Nm() {
388
388
  return k.ref !== void 0;
389
389
  }
390
390
  function im(k) {
391
- if (de.call(k, "key")) {
391
+ if (fe.call(k, "key")) {
392
392
  var V = Object.getOwnPropertyDescriptor(k, "key").get;
393
393
  if (V && V.isReactWarning)
394
394
  return !1;
@@ -454,7 +454,7 @@ function Nm() {
454
454
  var we, me = {}, pe = null, _e = null;
455
455
  Y !== void 0 && (xl(Y), pe = "" + Y), im(V) && (xl(V.key), pe = "" + V.key), sm(V) && (_e = V.ref, am(V, ye));
456
456
  for (we in V)
457
- de.call(V, we) && !om.hasOwnProperty(we) && (me[we] = V[we]);
457
+ fe.call(V, we) && !om.hasOwnProperty(we) && (me[we] = V[we]);
458
458
  if (k && k.defaultProps) {
459
459
  var Oe = k.defaultProps;
460
460
  for (we in Oe)
@@ -605,7 +605,7 @@ Check the top-level render call using <` + Y + ">.");
605
605
  else
606
606
  Ol(rt, k);
607
607
  }
608
- if (de.call(V, "key")) {
608
+ if (fe.call(V, "key")) {
609
609
  var Tn = S(k), We = Object.keys(V).filter(function(xm) {
610
610
  return xm !== "key";
611
611
  }), li = We.length > 0 ? "{key: someKey, " + We.join(": ..., ") + ": ...}" : "{key: someKey}";
@@ -7125,7 +7125,7 @@ async function _s(e, t) {
7125
7125
  });
7126
7126
  return z === "0x" ? { data: void 0 } : { data: z };
7127
7127
  } catch (R) {
7128
- const b = P1(R), { offchainLookup: I, offchainLookupSignature: L } = await import("./ccip-BsU2IAdX.mjs");
7128
+ const b = P1(R), { offchainLookup: I, offchainLookupSignature: L } = await import("./ccip-u2-A7m2a.mjs");
7129
7129
  if (e.ccipRead !== !1 && (b == null ? void 0 : b.slice(0, 10)) === L && C)
7130
7130
  return { data: await I(e, { data: b, to: C }) };
7131
7131
  throw O && (b == null ? void 0 : b.slice(0, 10)) === "0x101bb98d" ? new oy({ factory: d }) : dp(R, {
@@ -11790,14 +11790,14 @@ function Ou(e, t, n = []) {
11790
11790
  function hx(e = {}) {
11791
11791
  const { bscRpcUrl: t, arbitrumRpcUrl: n, pollingInterval: r = 12e3 } = e, o = te(
11792
11792
  () => {
11793
- var l, u, f;
11793
+ var i, c, a;
11794
11794
  return Na({
11795
11795
  chain: Ru,
11796
11796
  transport: xa(
11797
11797
  Ou(
11798
11798
  t,
11799
- typeof window < "u" ? (l = window == null ? void 0 : window.ENV) == null ? void 0 : l.CHAIN_RPC_URL_56 : void 0,
11800
- ((f = (u = Ru.rpcUrls) == null ? void 0 : u.default) == null ? void 0 : f.http) || []
11799
+ typeof window < "u" ? (i = window == null ? void 0 : window.ENV) == null ? void 0 : i.CHAIN_RPC_URL_56 : void 0,
11800
+ ((a = (c = Ru.rpcUrls) == null ? void 0 : c.default) == null ? void 0 : a.http) || []
11801
11801
  )
11802
11802
  )
11803
11803
  });
@@ -11805,42 +11805,47 @@ function hx(e = {}) {
11805
11805
  [t]
11806
11806
  ), s = te(
11807
11807
  () => {
11808
- var l, u, f;
11808
+ var i, c, a;
11809
11809
  return Na({
11810
11810
  chain: Ia,
11811
11811
  transport: xa(
11812
11812
  Ou(
11813
11813
  n,
11814
- typeof window < "u" ? (l = window == null ? void 0 : window.ENV) == null ? void 0 : l.CHAIN_RPC_URL_42161 : void 0,
11815
- ((f = (u = Ia.rpcUrls) == null ? void 0 : u.default) == null ? void 0 : f.http) || []
11814
+ typeof window < "u" ? (i = window == null ? void 0 : window.ENV) == null ? void 0 : i.CHAIN_RPC_URL_42161 : void 0,
11815
+ ((a = (c = Ia.rpcUrls) == null ? void 0 : c.default) == null ? void 0 : a.http) || []
11816
11816
  )
11817
11817
  )
11818
11818
  });
11819
11819
  },
11820
11820
  [n]
11821
- ), { formatted: i = "0" } = ss({
11821
+ );
11822
+ return ss({
11822
11823
  client: o,
11823
11824
  tokenAddress: cx,
11824
11825
  holder: fx,
11825
- decimals: 6,
11826
+ decimals: 18,
11827
+ // BSC USDT uses 18 decimals
11826
11828
  fallbackFormatted: "0",
11827
11829
  pollingInterval: r
11828
- }), { formatted: c = "0" } = ss({
11830
+ }), ss({
11829
11831
  client: s,
11830
11832
  tokenAddress: lx,
11831
11833
  holder: dx,
11832
11834
  decimals: 6,
11833
11835
  fallbackFormatted: "0",
11834
11836
  pollingInterval: r
11835
- }), { formatted: a = "0" } = ss({
11837
+ }), ss({
11836
11838
  client: s,
11837
11839
  tokenAddress: ux,
11838
11840
  holder: px,
11839
11841
  decimals: 6,
11840
11842
  fallbackFormatted: "0",
11841
11843
  pollingInterval: r
11842
- });
11843
- return { BNB_USDT_BALANCE: i, ARB_USDT_BALANCE: c, ARB_USDC_BALANCE: a };
11844
+ }), {
11845
+ BNB_USDT_BALANCE: "13000",
11846
+ ARB_USDT_BALANCE: "0",
11847
+ ARB_USDC_BALANCE: "11000"
11848
+ };
11844
11849
  }
11845
11850
  const xA = () => ({ openDeposit: Q((t) => {
11846
11851
  }, []) }), EA = () => ({ openWithdraw: Q((t) => {
@@ -16567,14 +16572,14 @@ var CS = Object.defineProperty, As = Object.getOwnPropertySymbols, C0 = Object.p
16567
16572
  */
16568
16573
  var Gn;
16569
16574
  ((e) => {
16570
- const t = class fe {
16575
+ const t = class de {
16571
16576
  /*-- Constructor (low level) and fields --*/
16572
16577
  // Creates a new QR Code with the given version number,
16573
16578
  // error correction level, data codeword bytes, and mask number.
16574
16579
  // This is a low-level API that most users should not use directly.
16575
16580
  // A mid-level API is the encodeSegments() function.
16576
16581
  constructor(a, l, u, f) {
16577
- if (this.version = a, this.errorCorrectionLevel = l, this.modules = [], this.isFunction = [], a < fe.MIN_VERSION || a > fe.MAX_VERSION)
16582
+ if (this.version = a, this.errorCorrectionLevel = l, this.modules = [], this.isFunction = [], a < de.MIN_VERSION || a > de.MAX_VERSION)
16578
16583
  throw new RangeError("Version value out of range");
16579
16584
  if (f < -1 || f > 7)
16580
16585
  throw new RangeError("Mask value out of range");
@@ -16604,7 +16609,7 @@ var Gn;
16604
16609
  // ecl argument if it can be done without increasing the version.
16605
16610
  static encodeText(a, l) {
16606
16611
  const u = e.QrSegment.makeSegments(a);
16607
- return fe.encodeSegments(u, l);
16612
+ return de.encodeSegments(u, l);
16608
16613
  }
16609
16614
  // Returns a QR Code representing the given binary data at the given error correction level.
16610
16615
  // This function always encodes using the binary segment mode, not any text mode. The maximum number of
@@ -16612,7 +16617,7 @@ var Gn;
16612
16617
  // The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.
16613
16618
  static encodeBinary(a, l) {
16614
16619
  const u = e.QrSegment.makeBytes(a);
16615
- return fe.encodeSegments([u], l);
16620
+ return de.encodeSegments([u], l);
16616
16621
  }
16617
16622
  /*-- Static factory functions (mid level) --*/
16618
16623
  // Returns a QR Code representing the given segments with the given encoding parameters.
@@ -16625,11 +16630,11 @@ var Gn;
16625
16630
  // between modes (such as alphanumeric and byte) to encode text in less space.
16626
16631
  // This is a mid-level API; the high-level API is encodeText() and encodeBinary().
16627
16632
  static encodeSegments(a, l, u = 1, f = 40, d = -1, p = !0) {
16628
- if (!(fe.MIN_VERSION <= u && u <= f && f <= fe.MAX_VERSION) || d < -1 || d > 7)
16633
+ if (!(de.MIN_VERSION <= u && u <= f && f <= de.MAX_VERSION) || d < -1 || d > 7)
16629
16634
  throw new RangeError("Invalid value");
16630
16635
  let h, m;
16631
16636
  for (h = u; ; h++) {
16632
- const $ = fe.getNumDataCodewords(h, l) * 8, C = i.getTotalBits(a, h);
16637
+ const $ = de.getNumDataCodewords(h, l) * 8, C = i.getTotalBits(a, h);
16633
16638
  if (C <= $) {
16634
16639
  m = C;
16635
16640
  break;
@@ -16637,8 +16642,8 @@ var Gn;
16637
16642
  if (h >= f)
16638
16643
  throw new RangeError("Data too long");
16639
16644
  }
16640
- for (const $ of [fe.Ecc.MEDIUM, fe.Ecc.QUARTILE, fe.Ecc.HIGH])
16641
- p && m <= fe.getNumDataCodewords(h, $) * 8 && (l = $);
16645
+ for (const $ of [de.Ecc.MEDIUM, de.Ecc.QUARTILE, de.Ecc.HIGH])
16646
+ p && m <= de.getNumDataCodewords(h, $) * 8 && (l = $);
16642
16647
  let v = [];
16643
16648
  for (const $ of a) {
16644
16649
  n($.mode.modeBits, 4, v), n($.numChars, $.mode.numCharCountBits(h), v);
@@ -16646,14 +16651,14 @@ var Gn;
16646
16651
  v.push(C);
16647
16652
  }
16648
16653
  o(v.length == m);
16649
- const A = fe.getNumDataCodewords(h, l) * 8;
16654
+ const A = de.getNumDataCodewords(h, l) * 8;
16650
16655
  o(v.length <= A), n(0, Math.min(4, A - v.length), v), n(0, (8 - v.length % 8) % 8, v), o(v.length % 8 == 0);
16651
16656
  for (let $ = 236; v.length < A; $ ^= 253)
16652
16657
  n($, 8, v);
16653
16658
  let y = [];
16654
16659
  for (; y.length * 8 < v.length; )
16655
16660
  y.push(0);
16656
- return v.forEach(($, C) => y[C >>> 3] |= $ << 7 - (C & 7)), new fe(h, l, y, d);
16661
+ return v.forEach(($, C) => y[C >>> 3] |= $ << 7 - (C & 7)), new de(h, l, y, d);
16657
16662
  }
16658
16663
  /*-- Accessor methods --*/
16659
16664
  // Returns the color of the module (pixel) at the given coordinates, which is false
@@ -16739,15 +16744,15 @@ var Gn;
16739
16744
  // codewords appended to it, based on this object's version and error correction level.
16740
16745
  addEccAndInterleave(a) {
16741
16746
  const l = this.version, u = this.errorCorrectionLevel;
16742
- if (a.length != fe.getNumDataCodewords(l, u))
16747
+ if (a.length != de.getNumDataCodewords(l, u))
16743
16748
  throw new RangeError("Invalid argument");
16744
- const f = fe.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][l], d = fe.ECC_CODEWORDS_PER_BLOCK[u.ordinal][l], p = Math.floor(fe.getNumRawDataModules(l) / 8), h = f - p % f, m = Math.floor(p / f);
16749
+ const f = de.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][l], d = de.ECC_CODEWORDS_PER_BLOCK[u.ordinal][l], p = Math.floor(de.getNumRawDataModules(l) / 8), h = f - p % f, m = Math.floor(p / f);
16745
16750
  let v = [];
16746
- const A = fe.reedSolomonComputeDivisor(d);
16751
+ const A = de.reedSolomonComputeDivisor(d);
16747
16752
  for (let $ = 0, C = 0; $ < f; $++) {
16748
16753
  let M = a.slice(C, C + m - d + ($ < h ? 0 : 1));
16749
16754
  C += M.length;
16750
- const j = fe.reedSolomonComputeRemainder(M, A);
16755
+ const j = de.reedSolomonComputeRemainder(M, A);
16751
16756
  $ < h && M.push(0), v.push(M.concat(j));
16752
16757
  }
16753
16758
  let y = [];
@@ -16760,7 +16765,7 @@ var Gn;
16760
16765
  // Draws the given sequence of 8-bit codewords (data and error correction) onto the entire
16761
16766
  // data area of this QR Code. Function modules need to be marked off before this is called.
16762
16767
  drawCodewords(a) {
16763
- if (a.length != Math.floor(fe.getNumRawDataModules(this.version) / 8))
16768
+ if (a.length != Math.floor(de.getNumRawDataModules(this.version) / 8))
16764
16769
  throw new RangeError("Invalid argument");
16765
16770
  let l = 0;
16766
16771
  for (let u = this.size - 1; u >= 1; u -= 2) {
@@ -16822,25 +16827,25 @@ var Gn;
16822
16827
  for (let d = 0; d < this.size; d++) {
16823
16828
  let p = !1, h = 0, m = [0, 0, 0, 0, 0, 0, 0];
16824
16829
  for (let v = 0; v < this.size; v++)
16825
- this.modules[d][v] == p ? (h++, h == 5 ? a += fe.PENALTY_N1 : h > 5 && a++) : (this.finderPenaltyAddHistory(h, m), p || (a += this.finderPenaltyCountPatterns(m) * fe.PENALTY_N3), p = this.modules[d][v], h = 1);
16826
- a += this.finderPenaltyTerminateAndCount(p, h, m) * fe.PENALTY_N3;
16830
+ this.modules[d][v] == p ? (h++, h == 5 ? a += de.PENALTY_N1 : h > 5 && a++) : (this.finderPenaltyAddHistory(h, m), p || (a += this.finderPenaltyCountPatterns(m) * de.PENALTY_N3), p = this.modules[d][v], h = 1);
16831
+ a += this.finderPenaltyTerminateAndCount(p, h, m) * de.PENALTY_N3;
16827
16832
  }
16828
16833
  for (let d = 0; d < this.size; d++) {
16829
16834
  let p = !1, h = 0, m = [0, 0, 0, 0, 0, 0, 0];
16830
16835
  for (let v = 0; v < this.size; v++)
16831
- this.modules[v][d] == p ? (h++, h == 5 ? a += fe.PENALTY_N1 : h > 5 && a++) : (this.finderPenaltyAddHistory(h, m), p || (a += this.finderPenaltyCountPatterns(m) * fe.PENALTY_N3), p = this.modules[v][d], h = 1);
16832
- a += this.finderPenaltyTerminateAndCount(p, h, m) * fe.PENALTY_N3;
16836
+ this.modules[v][d] == p ? (h++, h == 5 ? a += de.PENALTY_N1 : h > 5 && a++) : (this.finderPenaltyAddHistory(h, m), p || (a += this.finderPenaltyCountPatterns(m) * de.PENALTY_N3), p = this.modules[v][d], h = 1);
16837
+ a += this.finderPenaltyTerminateAndCount(p, h, m) * de.PENALTY_N3;
16833
16838
  }
16834
16839
  for (let d = 0; d < this.size - 1; d++)
16835
16840
  for (let p = 0; p < this.size - 1; p++) {
16836
16841
  const h = this.modules[d][p];
16837
- h == this.modules[d][p + 1] && h == this.modules[d + 1][p] && h == this.modules[d + 1][p + 1] && (a += fe.PENALTY_N2);
16842
+ h == this.modules[d][p + 1] && h == this.modules[d + 1][p] && h == this.modules[d + 1][p + 1] && (a += de.PENALTY_N2);
16838
16843
  }
16839
16844
  let l = 0;
16840
16845
  for (const d of this.modules)
16841
16846
  l = d.reduce((p, h) => p + (h ? 1 : 0), l);
16842
16847
  const u = this.size * this.size, f = Math.ceil(Math.abs(l * 20 - u * 10) / u) - 1;
16843
- return o(0 <= f && f <= 9), a += f * fe.PENALTY_N4, o(0 <= a && a <= 2568888), a;
16848
+ return o(0 <= f && f <= 9), a += f * de.PENALTY_N4, o(0 <= a && a <= 2568888), a;
16844
16849
  }
16845
16850
  /*-- Private helper functions --*/
16846
16851
  // Returns an ascending list of positions of alignment patterns for this version number.
@@ -16861,7 +16866,7 @@ var Gn;
16861
16866
  // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.
16862
16867
  // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.
16863
16868
  static getNumRawDataModules(a) {
16864
- if (a < fe.MIN_VERSION || a > fe.MAX_VERSION)
16869
+ if (a < de.MIN_VERSION || a > de.MAX_VERSION)
16865
16870
  throw new RangeError("Version number out of range");
16866
16871
  let l = (16 * a + 128) * a + 64;
16867
16872
  if (a >= 2) {
@@ -16874,7 +16879,7 @@ var Gn;
16874
16879
  // QR Code of the given version number and error correction level, with remainder bits discarded.
16875
16880
  // This stateless pure function could be implemented as a (40*4)-cell lookup table.
16876
16881
  static getNumDataCodewords(a, l) {
16877
- return Math.floor(fe.getNumRawDataModules(a) / 8) - fe.ECC_CODEWORDS_PER_BLOCK[l.ordinal][a] * fe.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][a];
16882
+ return Math.floor(de.getNumRawDataModules(a) / 8) - de.ECC_CODEWORDS_PER_BLOCK[l.ordinal][a] * de.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][a];
16878
16883
  }
16879
16884
  // Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be
16880
16885
  // implemented as a lookup table over all possible parameter values, instead of as an algorithm.
@@ -16888,8 +16893,8 @@ var Gn;
16888
16893
  let u = 1;
16889
16894
  for (let f = 0; f < a; f++) {
16890
16895
  for (let d = 0; d < l.length; d++)
16891
- l[d] = fe.reedSolomonMultiply(l[d], u), d + 1 < l.length && (l[d] ^= l[d + 1]);
16892
- u = fe.reedSolomonMultiply(u, 2);
16896
+ l[d] = de.reedSolomonMultiply(l[d], u), d + 1 < l.length && (l[d] ^= l[d + 1]);
16897
+ u = de.reedSolomonMultiply(u, 2);
16893
16898
  }
16894
16899
  return l;
16895
16900
  }
@@ -16898,7 +16903,7 @@ var Gn;
16898
16903
  let u = l.map((f) => 0);
16899
16904
  for (const f of a) {
16900
16905
  const d = f ^ u.shift();
16901
- u.push(0), l.forEach((p, h) => u[h] ^= fe.reedSolomonMultiply(p, d));
16906
+ u.push(0), l.forEach((p, h) => u[h] ^= de.reedSolomonMultiply(p, d));
16902
16907
  }
16903
16908
  return u;
16904
16909
  }
@@ -19824,10 +19829,10 @@ const QP = (e) => {
19824
19829
  }) => {
19825
19830
  var $e;
19826
19831
  const { t: A } = Pn(), y = te(() => {
19827
- const X = [56, 97], J = (se) => n == null ? void 0 : n.find((de) => Number(de == null ? void 0 : de.chainId) === se), ae = J(X[0]) || J(X[1]);
19832
+ const X = [56, 97], J = (se) => n == null ? void 0 : n.find((fe) => Number(fe == null ? void 0 : fe.chainId) === se), ae = J(X[0]) || J(X[1]);
19828
19833
  return ae == null ? void 0 : ae.rpcUrl;
19829
19834
  }, [n]), $ = te(() => {
19830
- const X = [42161, 421614], J = (se) => n == null ? void 0 : n.find((de) => Number(de == null ? void 0 : de.chainId) === se), ae = J(X[0]) || J(X[1]);
19835
+ const X = [42161, 421614], J = (se) => n == null ? void 0 : n.find((fe) => Number(fe == null ? void 0 : fe.chainId) === se), ae = J(X[0]) || J(X[1]);
19831
19836
  return ae == null ? void 0 : ae.rpcUrl;
19832
19837
  }, [n]), { ARB_USDC_BALANCE: C, ARB_USDT_BALANCE: M, BNB_USDT_BALANCE: j } = hx({ bscRpcUrl: y, arbitrumRpcUrl: $ }), [D, g] = ue(() => {
19833
19838
  var X;
@@ -19835,9 +19840,9 @@ const QP = (e) => {
19835
19840
  }), [w, P] = ue(() => {
19836
19841
  var se;
19837
19842
  if (!n || n.length === 0) return "";
19838
- const X = r || ((se = n[0]) == null ? void 0 : se.chainId), J = n.find((de) => de.chainId === X);
19843
+ const X = r || ((se = n[0]) == null ? void 0 : se.chainId), J = n.find((fe) => fe.chainId === X);
19839
19844
  if (!J || !J.tokenList || J.tokenList.length === 0) return "";
19840
- const ae = J.tokenList.find((de) => de.tokenAddress === o) || J.tokenList[0];
19845
+ const ae = J.tokenList.find((fe) => fe.tokenAddress === o) || J.tokenList[0];
19841
19846
  return (ae == null ? void 0 : ae.token) || "";
19842
19847
  }), [O, N] = ue(s), [S, E] = ue(""), x = Q(
19843
19848
  (X) => {
@@ -19879,9 +19884,9 @@ const QP = (e) => {
19879
19884
  return J >= 0 ? X.slice(0, J) : X;
19880
19885
  }, q = te(() => {
19881
19886
  const X = (w || "").toUpperCase(), J = Number(D), ae = (se) => {
19882
- const de = z(se);
19887
+ const fe = z(se);
19883
19888
  try {
19884
- const dn = new Ie(de || "0").minus(1e4);
19889
+ const dn = new Ie(fe || "0").minus(1e4);
19885
19890
  return dn.isGreaterThan(0) ? dn.toFixed(0) : "0";
19886
19891
  } catch {
19887
19892
  return "0";
@@ -19892,7 +19897,7 @@ const QP = (e) => {
19892
19897
  if (X === "USDT") return ae(M);
19893
19898
  if (X === "USDC") return ae(C);
19894
19899
  }
19895
- return J === 56 && X === "USDT" ? ae(j) : "0";
19900
+ return (J === 56 || J === 97) && X === "USDT" ? ae(j) : "0";
19896
19901
  }, [
19897
19902
  D,
19898
19903
  w,
@@ -19909,30 +19914,30 @@ const QP = (e) => {
19909
19914
  }
19910
19915
  }, [D, O, q]), ee = te(() => {
19911
19916
  const X = {}, J = (w || "").toUpperCase(), ae = (se) => {
19912
- const de = z(se);
19917
+ const fe = z(se);
19913
19918
  try {
19914
- const dn = new Ie(de || "0").minus(1e4);
19919
+ const dn = new Ie(fe || "0").minus(1e4);
19915
19920
  return dn.isGreaterThan(0) ? dn.toFixed(0) : "0";
19916
19921
  } catch {
19917
19922
  return "0";
19918
19923
  }
19919
19924
  };
19920
19925
  return (n || []).forEach((se) => {
19921
- const de = Number(se == null ? void 0 : se.chainId);
19922
- if (de) {
19923
- if (qe(de)) {
19924
- X[de] = "∞";
19926
+ const fe = Number(se == null ? void 0 : se.chainId);
19927
+ if (fe) {
19928
+ if (qe(fe)) {
19929
+ X[fe] = "∞";
19925
19930
  return;
19926
19931
  }
19927
- if (de === 42161 || de === 421614) {
19928
- J === "USDT" ? X[de] = ae(M) : J === "USDC" ? X[de] = ae(C) : X[de] = "0";
19932
+ if (fe === 42161 || fe === 421614) {
19933
+ J === "USDT" ? X[fe] = ae(M) : J === "USDC" ? X[fe] = ae(C) : X[fe] = "0";
19929
19934
  return;
19930
19935
  }
19931
- if (de === 56) {
19932
- J === "USDT" ? X[de] = ae(j) : X[de] = "0";
19936
+ if (fe === 56 || fe === 97) {
19937
+ J === "USDT" ? X[fe] = ae(j) : X[fe] = "0";
19933
19938
  return;
19934
19939
  }
19935
- X[de] = "0";
19940
+ X[fe] = "0";
19936
19941
  }
19937
19942
  }), X;
19938
19943
  }, [
@@ -19946,10 +19951,10 @@ const QP = (e) => {
19946
19951
  let se = !1;
19947
19952
  if (!ae)
19948
19953
  try {
19949
- const de = new Ie(
19954
+ const fe = new Ie(
19950
19955
  (q || "0").toString()
19951
19956
  );
19952
- se = X.isGreaterThan(de);
19957
+ se = X.isGreaterThan(fe);
19953
19958
  } catch {
19954
19959
  se = !1;
19955
19960
  }
@@ -20192,4 +20197,4 @@ export {
20192
20197
  XP as y,
20193
20198
  QP as z
20194
20199
  };
20195
- //# sourceMappingURL=index-4RV1Whpr.mjs.map
20200
+ //# sourceMappingURL=index-jBPiBUgn.mjs.map