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

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-ySwyGJ0X.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-Be1w4WJr.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,G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QAAAC;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-Be1w4WJr.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,MA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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-Be1w4WJr.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, {
@@ -11822,7 +11822,8 @@ function hx(e = {}) {
11822
11822
  client: o,
11823
11823
  tokenAddress: cx,
11824
11824
  holder: fx,
11825
- decimals: 6,
11825
+ decimals: 18,
11826
+ // BSC USDT uses 18 decimals
11826
11827
  fallbackFormatted: "0",
11827
11828
  pollingInterval: r
11828
11829
  }), { formatted: c = "0" } = ss({
@@ -16567,14 +16568,14 @@ var CS = Object.defineProperty, As = Object.getOwnPropertySymbols, C0 = Object.p
16567
16568
  */
16568
16569
  var Gn;
16569
16570
  ((e) => {
16570
- const t = class fe {
16571
+ const t = class de {
16571
16572
  /*-- Constructor (low level) and fields --*/
16572
16573
  // Creates a new QR Code with the given version number,
16573
16574
  // error correction level, data codeword bytes, and mask number.
16574
16575
  // This is a low-level API that most users should not use directly.
16575
16576
  // A mid-level API is the encodeSegments() function.
16576
16577
  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)
16578
+ if (this.version = a, this.errorCorrectionLevel = l, this.modules = [], this.isFunction = [], a < de.MIN_VERSION || a > de.MAX_VERSION)
16578
16579
  throw new RangeError("Version value out of range");
16579
16580
  if (f < -1 || f > 7)
16580
16581
  throw new RangeError("Mask value out of range");
@@ -16604,7 +16605,7 @@ var Gn;
16604
16605
  // ecl argument if it can be done without increasing the version.
16605
16606
  static encodeText(a, l) {
16606
16607
  const u = e.QrSegment.makeSegments(a);
16607
- return fe.encodeSegments(u, l);
16608
+ return de.encodeSegments(u, l);
16608
16609
  }
16609
16610
  // Returns a QR Code representing the given binary data at the given error correction level.
16610
16611
  // This function always encodes using the binary segment mode, not any text mode. The maximum number of
@@ -16612,7 +16613,7 @@ var Gn;
16612
16613
  // The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.
16613
16614
  static encodeBinary(a, l) {
16614
16615
  const u = e.QrSegment.makeBytes(a);
16615
- return fe.encodeSegments([u], l);
16616
+ return de.encodeSegments([u], l);
16616
16617
  }
16617
16618
  /*-- Static factory functions (mid level) --*/
16618
16619
  // Returns a QR Code representing the given segments with the given encoding parameters.
@@ -16625,11 +16626,11 @@ var Gn;
16625
16626
  // between modes (such as alphanumeric and byte) to encode text in less space.
16626
16627
  // This is a mid-level API; the high-level API is encodeText() and encodeBinary().
16627
16628
  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)
16629
+ if (!(de.MIN_VERSION <= u && u <= f && f <= de.MAX_VERSION) || d < -1 || d > 7)
16629
16630
  throw new RangeError("Invalid value");
16630
16631
  let h, m;
16631
16632
  for (h = u; ; h++) {
16632
- const $ = fe.getNumDataCodewords(h, l) * 8, C = i.getTotalBits(a, h);
16633
+ const $ = de.getNumDataCodewords(h, l) * 8, C = i.getTotalBits(a, h);
16633
16634
  if (C <= $) {
16634
16635
  m = C;
16635
16636
  break;
@@ -16637,8 +16638,8 @@ var Gn;
16637
16638
  if (h >= f)
16638
16639
  throw new RangeError("Data too long");
16639
16640
  }
16640
- for (const $ of [fe.Ecc.MEDIUM, fe.Ecc.QUARTILE, fe.Ecc.HIGH])
16641
- p && m <= fe.getNumDataCodewords(h, $) * 8 && (l = $);
16641
+ for (const $ of [de.Ecc.MEDIUM, de.Ecc.QUARTILE, de.Ecc.HIGH])
16642
+ p && m <= de.getNumDataCodewords(h, $) * 8 && (l = $);
16642
16643
  let v = [];
16643
16644
  for (const $ of a) {
16644
16645
  n($.mode.modeBits, 4, v), n($.numChars, $.mode.numCharCountBits(h), v);
@@ -16646,14 +16647,14 @@ var Gn;
16646
16647
  v.push(C);
16647
16648
  }
16648
16649
  o(v.length == m);
16649
- const A = fe.getNumDataCodewords(h, l) * 8;
16650
+ const A = de.getNumDataCodewords(h, l) * 8;
16650
16651
  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
16652
  for (let $ = 236; v.length < A; $ ^= 253)
16652
16653
  n($, 8, v);
16653
16654
  let y = [];
16654
16655
  for (; y.length * 8 < v.length; )
16655
16656
  y.push(0);
16656
- return v.forEach(($, C) => y[C >>> 3] |= $ << 7 - (C & 7)), new fe(h, l, y, d);
16657
+ return v.forEach(($, C) => y[C >>> 3] |= $ << 7 - (C & 7)), new de(h, l, y, d);
16657
16658
  }
16658
16659
  /*-- Accessor methods --*/
16659
16660
  // Returns the color of the module (pixel) at the given coordinates, which is false
@@ -16739,15 +16740,15 @@ var Gn;
16739
16740
  // codewords appended to it, based on this object's version and error correction level.
16740
16741
  addEccAndInterleave(a) {
16741
16742
  const l = this.version, u = this.errorCorrectionLevel;
16742
- if (a.length != fe.getNumDataCodewords(l, u))
16743
+ if (a.length != de.getNumDataCodewords(l, u))
16743
16744
  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);
16745
+ 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
16746
  let v = [];
16746
- const A = fe.reedSolomonComputeDivisor(d);
16747
+ const A = de.reedSolomonComputeDivisor(d);
16747
16748
  for (let $ = 0, C = 0; $ < f; $++) {
16748
16749
  let M = a.slice(C, C + m - d + ($ < h ? 0 : 1));
16749
16750
  C += M.length;
16750
- const j = fe.reedSolomonComputeRemainder(M, A);
16751
+ const j = de.reedSolomonComputeRemainder(M, A);
16751
16752
  $ < h && M.push(0), v.push(M.concat(j));
16752
16753
  }
16753
16754
  let y = [];
@@ -16760,7 +16761,7 @@ var Gn;
16760
16761
  // Draws the given sequence of 8-bit codewords (data and error correction) onto the entire
16761
16762
  // data area of this QR Code. Function modules need to be marked off before this is called.
16762
16763
  drawCodewords(a) {
16763
- if (a.length != Math.floor(fe.getNumRawDataModules(this.version) / 8))
16764
+ if (a.length != Math.floor(de.getNumRawDataModules(this.version) / 8))
16764
16765
  throw new RangeError("Invalid argument");
16765
16766
  let l = 0;
16766
16767
  for (let u = this.size - 1; u >= 1; u -= 2) {
@@ -16822,25 +16823,25 @@ var Gn;
16822
16823
  for (let d = 0; d < this.size; d++) {
16823
16824
  let p = !1, h = 0, m = [0, 0, 0, 0, 0, 0, 0];
16824
16825
  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;
16826
+ 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);
16827
+ a += this.finderPenaltyTerminateAndCount(p, h, m) * de.PENALTY_N3;
16827
16828
  }
16828
16829
  for (let d = 0; d < this.size; d++) {
16829
16830
  let p = !1, h = 0, m = [0, 0, 0, 0, 0, 0, 0];
16830
16831
  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;
16832
+ 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);
16833
+ a += this.finderPenaltyTerminateAndCount(p, h, m) * de.PENALTY_N3;
16833
16834
  }
16834
16835
  for (let d = 0; d < this.size - 1; d++)
16835
16836
  for (let p = 0; p < this.size - 1; p++) {
16836
16837
  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);
16838
+ h == this.modules[d][p + 1] && h == this.modules[d + 1][p] && h == this.modules[d + 1][p + 1] && (a += de.PENALTY_N2);
16838
16839
  }
16839
16840
  let l = 0;
16840
16841
  for (const d of this.modules)
16841
16842
  l = d.reduce((p, h) => p + (h ? 1 : 0), l);
16842
16843
  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;
16844
+ return o(0 <= f && f <= 9), a += f * de.PENALTY_N4, o(0 <= a && a <= 2568888), a;
16844
16845
  }
16845
16846
  /*-- Private helper functions --*/
16846
16847
  // Returns an ascending list of positions of alignment patterns for this version number.
@@ -16861,7 +16862,7 @@ var Gn;
16861
16862
  // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.
16862
16863
  // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.
16863
16864
  static getNumRawDataModules(a) {
16864
- if (a < fe.MIN_VERSION || a > fe.MAX_VERSION)
16865
+ if (a < de.MIN_VERSION || a > de.MAX_VERSION)
16865
16866
  throw new RangeError("Version number out of range");
16866
16867
  let l = (16 * a + 128) * a + 64;
16867
16868
  if (a >= 2) {
@@ -16874,7 +16875,7 @@ var Gn;
16874
16875
  // QR Code of the given version number and error correction level, with remainder bits discarded.
16875
16876
  // This stateless pure function could be implemented as a (40*4)-cell lookup table.
16876
16877
  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];
16878
+ return Math.floor(de.getNumRawDataModules(a) / 8) - de.ECC_CODEWORDS_PER_BLOCK[l.ordinal][a] * de.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][a];
16878
16879
  }
16879
16880
  // Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be
16880
16881
  // implemented as a lookup table over all possible parameter values, instead of as an algorithm.
@@ -16888,8 +16889,8 @@ var Gn;
16888
16889
  let u = 1;
16889
16890
  for (let f = 0; f < a; f++) {
16890
16891
  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);
16892
+ l[d] = de.reedSolomonMultiply(l[d], u), d + 1 < l.length && (l[d] ^= l[d + 1]);
16893
+ u = de.reedSolomonMultiply(u, 2);
16893
16894
  }
16894
16895
  return l;
16895
16896
  }
@@ -16898,7 +16899,7 @@ var Gn;
16898
16899
  let u = l.map((f) => 0);
16899
16900
  for (const f of a) {
16900
16901
  const d = f ^ u.shift();
16901
- u.push(0), l.forEach((p, h) => u[h] ^= fe.reedSolomonMultiply(p, d));
16902
+ u.push(0), l.forEach((p, h) => u[h] ^= de.reedSolomonMultiply(p, d));
16902
16903
  }
16903
16904
  return u;
16904
16905
  }
@@ -19824,10 +19825,10 @@ const QP = (e) => {
19824
19825
  }) => {
19825
19826
  var $e;
19826
19827
  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]);
19828
+ 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
19829
  return ae == null ? void 0 : ae.rpcUrl;
19829
19830
  }, [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]);
19831
+ 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
19832
  return ae == null ? void 0 : ae.rpcUrl;
19832
19833
  }, [n]), { ARB_USDC_BALANCE: C, ARB_USDT_BALANCE: M, BNB_USDT_BALANCE: j } = hx({ bscRpcUrl: y, arbitrumRpcUrl: $ }), [D, g] = ue(() => {
19833
19834
  var X;
@@ -19835,9 +19836,9 @@ const QP = (e) => {
19835
19836
  }), [w, P] = ue(() => {
19836
19837
  var se;
19837
19838
  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);
19839
+ const X = r || ((se = n[0]) == null ? void 0 : se.chainId), J = n.find((fe) => fe.chainId === X);
19839
19840
  if (!J || !J.tokenList || J.tokenList.length === 0) return "";
19840
- const ae = J.tokenList.find((de) => de.tokenAddress === o) || J.tokenList[0];
19841
+ const ae = J.tokenList.find((fe) => fe.tokenAddress === o) || J.tokenList[0];
19841
19842
  return (ae == null ? void 0 : ae.token) || "";
19842
19843
  }), [O, N] = ue(s), [S, E] = ue(""), x = Q(
19843
19844
  (X) => {
@@ -19879,9 +19880,9 @@ const QP = (e) => {
19879
19880
  return J >= 0 ? X.slice(0, J) : X;
19880
19881
  }, q = te(() => {
19881
19882
  const X = (w || "").toUpperCase(), J = Number(D), ae = (se) => {
19882
- const de = z(se);
19883
+ const fe = z(se);
19883
19884
  try {
19884
- const dn = new Ie(de || "0").minus(1e4);
19885
+ const dn = new Ie(fe || "0").minus(1e4);
19885
19886
  return dn.isGreaterThan(0) ? dn.toFixed(0) : "0";
19886
19887
  } catch {
19887
19888
  return "0";
@@ -19892,7 +19893,7 @@ const QP = (e) => {
19892
19893
  if (X === "USDT") return ae(M);
19893
19894
  if (X === "USDC") return ae(C);
19894
19895
  }
19895
- return J === 56 && X === "USDT" ? ae(j) : "0";
19896
+ return (J === 56 || J === 97) && X === "USDT" ? ae(j) : "0";
19896
19897
  }, [
19897
19898
  D,
19898
19899
  w,
@@ -19909,30 +19910,30 @@ const QP = (e) => {
19909
19910
  }
19910
19911
  }, [D, O, q]), ee = te(() => {
19911
19912
  const X = {}, J = (w || "").toUpperCase(), ae = (se) => {
19912
- const de = z(se);
19913
+ const fe = z(se);
19913
19914
  try {
19914
- const dn = new Ie(de || "0").minus(1e4);
19915
+ const dn = new Ie(fe || "0").minus(1e4);
19915
19916
  return dn.isGreaterThan(0) ? dn.toFixed(0) : "0";
19916
19917
  } catch {
19917
19918
  return "0";
19918
19919
  }
19919
19920
  };
19920
19921
  return (n || []).forEach((se) => {
19921
- const de = Number(se == null ? void 0 : se.chainId);
19922
- if (de) {
19923
- if (qe(de)) {
19924
- X[de] = "∞";
19922
+ const fe = Number(se == null ? void 0 : se.chainId);
19923
+ if (fe) {
19924
+ if (qe(fe)) {
19925
+ X[fe] = "∞";
19925
19926
  return;
19926
19927
  }
19927
- if (de === 42161 || de === 421614) {
19928
- J === "USDT" ? X[de] = ae(M) : J === "USDC" ? X[de] = ae(C) : X[de] = "0";
19928
+ if (fe === 42161 || fe === 421614) {
19929
+ J === "USDT" ? X[fe] = ae(M) : J === "USDC" ? X[fe] = ae(C) : X[fe] = "0";
19929
19930
  return;
19930
19931
  }
19931
- if (de === 56) {
19932
- J === "USDT" ? X[de] = ae(j) : X[de] = "0";
19932
+ if (fe === 56 || fe === 97) {
19933
+ J === "USDT" ? X[fe] = ae(j) : X[fe] = "0";
19933
19934
  return;
19934
19935
  }
19935
- X[de] = "0";
19936
+ X[fe] = "0";
19936
19937
  }
19937
19938
  }), X;
19938
19939
  }, [
@@ -19946,10 +19947,10 @@ const QP = (e) => {
19946
19947
  let se = !1;
19947
19948
  if (!ae)
19948
19949
  try {
19949
- const de = new Ie(
19950
+ const fe = new Ie(
19950
19951
  (q || "0").toString()
19951
19952
  );
19952
- se = X.isGreaterThan(de);
19953
+ se = X.isGreaterThan(fe);
19953
19954
  } catch {
19954
19955
  se = !1;
19955
19956
  }
@@ -20192,4 +20193,4 @@ export {
20192
20193
  XP as y,
20193
20194
  QP as z
20194
20195
  };
20195
- //# sourceMappingURL=index-4RV1Whpr.mjs.map
20196
+ //# sourceMappingURL=index-ySwyGJ0X.mjs.map