import { V as ct } from "./address-CrYNZ_Nj.mjs";
const Je = "2.29.3";
let H = {
  getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug: r }) => t ? `${e ?? "https://viem.sh"}${t}${r ? `#${r}` : ""}` : void 0,
  version: `viem@${Je}`
};
class w extends Error {
  constructor(t, r = {}) {
    var i;
    const n = (() => {
      var h;
      return r.cause instanceof w ? r.cause.details : (h = r.cause) != null && h.message ? r.cause.message : r.details;
    })(), u = r.cause instanceof w && r.cause.docsPath || r.docsPath, o = (i = H.getDocsUrl) == null ? void 0 : i.call(H, { ...r, docsPath: u }), a = [
      t || "An error occurred.",
      "",
      ...r.metaMessages ? [...r.metaMessages, ""] : [],
      ...o ? [`Docs: ${o}`] : [],
      ...n ? [`Details: ${n}`] : [],
      ...H.version ? [`Version: ${H.version}`] : []
    ].join(`
`);
    super(a, r.cause ? { cause: r.cause } : void 0), Object.defineProperty(this, "details", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), Object.defineProperty(this, "docsPath", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), Object.defineProperty(this, "metaMessages", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), Object.defineProperty(this, "shortMessage", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), Object.defineProperty(this, "version", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), Object.defineProperty(this, "name", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: "BaseError"
    }), this.details = n, this.docsPath = u, this.metaMessages = r.metaMessages, this.name = r.name ?? this.name, this.shortMessage = t, this.version = Je;
  }
  walk(t) {
    return Xe(this, t);
  }
}
function Xe(e, t) {
  return t != null && t(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ? Xe(e.cause, t) : t ? null : e;
}
class lt extends w {
  constructor({ max: t, min: r, signed: n, size: u, value: o }) {
    super(`Number "${o}" is not in safe ${u ? `${u * 8}-bit ${n ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${r} to ${t})` : `(above ${r})`}`, { name: "IntegerOutOfRangeError" });
  }
}
class Sn extends w {
  constructor(t) {
    super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
      name: "InvalidBytesBooleanError"
    });
  }
}
class dt extends w {
  constructor(t) {
    super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`, { name: "InvalidHexBooleanError" });
  }
}
class ft extends w {
  constructor({ givenSize: t, maxSize: r }) {
    super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
  }
}
function Dt(e, { strict: t = !0 } = {}) {
  return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
}
function Fe(e) {
  return Dt(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
}
function Oe(e, { dir: t = "left" } = {}) {
  let r = typeof e == "string" ? e.replace("0x", "") : e, n = 0;
  for (let u = 0; u < r.length - 1 && r[t === "left" ? u : r.length - u - 1].toString() === "0"; u++)
    n++;
  return r = t === "left" ? r.slice(n) : r.slice(0, r.length - n), typeof e == "string" ? (r.length === 1 && t === "right" && (r = `${r}0`), `0x${r.length % 2 === 1 ? `0${r}` : r}`) : r;
}
class Pn extends w {
  constructor({ offset: t, position: r, size: n }) {
    super(`Slice ${r === "start" ? "starting" : "ending"} at offset "${t}" is out-of-bounds (size: ${n}).`, { name: "SliceOffsetOutOfBoundsError" });
  }
}
class Qe extends w {
  constructor({ size: t, targetSize: r, type: n }) {
    super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`, { name: "SizeExceedsPaddingSizeError" });
  }
}
class Rn extends w {
  constructor({ size: t, targetSize: r, type: n }) {
    super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${t} ${n} long.`, { name: "InvalidBytesLengthError" });
  }
}
function Me(e, { dir: t, size: r = 32 } = {}) {
  return typeof e == "string" ? ht(e, { dir: t, size: r }) : bt(e, { dir: t, size: r });
}
function ht(e, { dir: t, size: r = 32 } = {}) {
  if (r === null)
    return e;
  const n = e.replace("0x", "");
  if (n.length > r * 2)
    throw new Qe({
      size: Math.ceil(n.length / 2),
      targetSize: r,
      type: "hex"
    });
  return `0x${n[t === "right" ? "padEnd" : "padStart"](r * 2, "0")}`;
}
function bt(e, { dir: t, size: r = 32 } = {}) {
  if (r === null)
    return e;
  if (e.length > r)
    throw new Qe({
      size: e.length,
      targetSize: r,
      type: "bytes"
    });
  const n = new Uint8Array(r);
  for (let u = 0; u < r; u++) {
    const o = t === "right";
    n[o ? u : r - u - 1] = e[o ? u : e.length - u - 1];
  }
  return n;
}
const pt = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
function jn(e, t = {}) {
  return typeof e == "number" || typeof e == "bigint" ? wt(e, t) : typeof e == "string" ? et(e, t) : typeof e == "boolean" ? gt(e, t) : Ze(e, t);
}
function gt(e, t = {}) {
  const r = `0x${Number(e)}`;
  return typeof t.size == "number" ? (Ee(r, { size: t.size }), Me(r, { size: t.size })) : r;
}
function Ze(e, t = {}) {
  let r = "";
  for (let u = 0; u < e.length; u++)
    r += pt[e[u]];
  const n = `0x${r}`;
  return typeof t.size == "number" ? (Ee(n, { size: t.size }), Me(n, { dir: "right", size: t.size })) : n;
}
function wt(e, t = {}) {
  const { signed: r, size: n } = t, u = BigInt(e);
  let o;
  n ? r ? o = (1n << BigInt(n) * 8n - 1n) - 1n : o = 2n ** (BigInt(n) * 8n) - 1n : typeof e == "number" && (o = BigInt(Number.MAX_SAFE_INTEGER));
  const a = typeof o == "bigint" && r ? -o - 1n : 0;
  if (o && u > o || u < a) {
    const h = typeof e == "bigint" ? "n" : "";
    throw new lt({
      max: o ? `${o}${h}` : void 0,
      min: `${a}${h}`,
      signed: r,
      size: n,
      value: `${e}${h}`
    });
  }
  const i = `0x${(r && u < 0 ? (1n << BigInt(n * 8)) + BigInt(u) : u).toString(16)}`;
  return n ? Me(i, { size: n }) : i;
}
const mt = /* @__PURE__ */ new TextEncoder();
function et(e, t = {}) {
  const r = mt.encode(e);
  return Ze(r, t);
}
function Ee(e, { size: t }) {
  if (Fe(e) > t)
    throw new ft({
      givenSize: Fe(e),
      maxSize: t
    });
}
function Et(e, t = {}) {
  const { signed: r } = t;
  t.size && Ee(e, { size: t.size });
  const n = BigInt(e);
  if (!r)
    return n;
  const u = (e.length - 2) / 2, o = (1n << BigInt(u) * 8n - 1n) - 1n;
  return n <= o ? n : n - BigInt(`0x${"f".padStart(u * 2, "f")}`) - 1n;
}
function xn(e, t = {}) {
  let r = e;
  if (t.size && (Ee(r, { size: t.size }), r = Oe(r)), Oe(r) === "0x00")
    return !1;
  if (Oe(r) === "0x01")
    return !0;
  throw new dt(r);
}
function Nn(e, t = {}) {
  return Number(Et(e, t));
}
const Mn = {
  gwei: 9,
  wei: 18
}, yt = {
  ether: -9,
  wei: 9
};
function vt(e, t) {
  let r = e.toString();
  const n = r.startsWith("-");
  n && (r = r.slice(1)), r = r.padStart(t, "0");
  let [u, o] = [
    r.slice(0, r.length - t),
    r.slice(r.length - t)
  ];
  return o = o.replace(/(0+)$/, ""), `${n ? "-" : ""}${u || "0"}${o ? `.${o}` : ""}`;
}
function me(e, t = "wei") {
  return vt(e, yt[t]);
}
class Ae extends w {
  constructor({ cause: t, message: r } = {}) {
    var u;
    const n = (u = r == null ? void 0 : r.replace("execution reverted: ", "")) == null ? void 0 : u.replace("execution reverted", "");
    super(`Execution reverted ${n ? `with reason: ${n}` : "for an unknown reason"}.`, {
      cause: t,
      name: "ExecutionRevertedError"
    });
  }
}
Object.defineProperty(Ae, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 3
});
Object.defineProperty(Ae, "nodeMessage", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: /execution reverted/
});
class Ot extends w {
  constructor({ cause: t, maxFeePerGas: r } = {}) {
    super(`The fee cap (\`maxFeePerGas\`${r ? ` = ${me(r)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
      cause: t,
      name: "FeeCapTooHighError"
    });
  }
}
Object.defineProperty(Ot, "nodeMessage", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
});
class _t extends w {
  constructor({ cause: t, maxFeePerGas: r } = {}) {
    super(`The fee cap (\`maxFeePerGas\`${r ? ` = ${me(r)}` : ""} gwei) cannot be lower than the block base fee.`, {
      cause: t,
      name: "FeeCapTooLowError"
    });
  }
}
Object.defineProperty(_t, "nodeMessage", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
});
class Ct extends w {
  constructor({ cause: t, nonce: r } = {}) {
    super(`Nonce provided for the transaction ${r ? `(${r}) ` : ""}is higher than the next one expected.`, { cause: t, name: "NonceTooHighError" });
  }
}
Object.defineProperty(Ct, "nodeMessage", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: /nonce too high/
});
class Tt extends w {
  constructor({ cause: t, nonce: r } = {}) {
    super([
      `Nonce provided for the transaction ${r ? `(${r}) ` : ""}is lower than the current nonce of the account.`,
      "Try increasing the nonce or find the latest nonce with `getTransactionCount`."
    ].join(`
`), { cause: t, name: "NonceTooLowError" });
  }
}
Object.defineProperty(Tt, "nodeMessage", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: /nonce too low|transaction already imported|already known/
});
class St extends w {
  constructor({ cause: t, nonce: r } = {}) {
    super(`Nonce provided for the transaction ${r ? `(${r}) ` : ""}exceeds the maximum allowed nonce.`, { cause: t, name: "NonceMaxValueError" });
  }
}
Object.defineProperty(St, "nodeMessage", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: /nonce has max value/
});
class Pt extends w {
  constructor({ cause: t } = {}) {
    super([
      "The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."
    ].join(`
`), {
      cause: t,
      metaMessages: [
        "This error could arise when the account does not have enough funds to:",
        " - pay for the total gas fee,",
        " - pay for the value to send.",
        " ",
        "The cost of the transaction is calculated as `gas * gas fee + value`, where:",
        " - `gas` is the amount of gas needed for transaction to execute,",
        " - `gas fee` is the gas fee,",
        " - `value` is the amount of ether to send to the recipient."
      ],
      name: "InsufficientFundsError"
    });
  }
}
Object.defineProperty(Pt, "nodeMessage", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: /insufficient funds|exceeds transaction sender account balance/
});
class Rt extends w {
  constructor({ cause: t, gas: r } = {}) {
    super(`The amount of gas ${r ? `(${r}) ` : ""}provided for the transaction exceeds the limit allowed for the block.`, {
      cause: t,
      name: "IntrinsicGasTooHighError"
    });
  }
}
Object.defineProperty(Rt, "nodeMessage", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: /intrinsic gas too high|gas limit reached/
});
class jt extends w {
  constructor({ cause: t, gas: r } = {}) {
    super(`The amount of gas ${r ? `(${r}) ` : ""}provided for the transaction is too low.`, {
      cause: t,
      name: "IntrinsicGasTooLowError"
    });
  }
}
Object.defineProperty(jt, "nodeMessage", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: /intrinsic gas too low/
});
class xt extends w {
  constructor({ cause: t }) {
    super("The transaction type is not supported for this chain.", {
      cause: t,
      name: "TransactionTypeNotSupportedError"
    });
  }
}
Object.defineProperty(xt, "nodeMessage", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: /transaction type not valid/
});
class Nt extends w {
  constructor({ cause: t, maxPriorityFeePerGas: r, maxFeePerGas: n } = {}) {
    super([
      `The provided tip (\`maxPriorityFeePerGas\`${r ? ` = ${me(r)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n ? ` = ${me(n)} gwei` : ""}).`
    ].join(`
`), {
      cause: t,
      name: "TipAboveFeeCapError"
    });
  }
}
Object.defineProperty(Nt, "nodeMessage", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
});
class An extends w {
  constructor({ cause: t }) {
    super(`An error occurred while executing: ${t == null ? void 0 : t.shortMessage}`, {
      cause: t,
      name: "UnknownNodeError"
    });
  }
}
class Mt extends Map {
  constructor(t) {
    super(), Object.defineProperty(this, "maxSize", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), this.maxSize = t;
  }
  get(t) {
    const r = super.get(t);
    return super.has(t) && r !== void 0 && (this.delete(t), super.set(t, r)), r;
  }
  set(t, r) {
    if (super.set(t, r), this.maxSize && this.size > this.maxSize) {
      const n = this.keys().next().value;
      n && this.delete(n);
    }
    return this;
  }
}
const N = (e, t, r) => JSON.stringify(e, (n, u) => typeof u == "bigint" ? u.toString() : u, r), $n = (e) => e, he = (e) => e;
class Y extends w {
  constructor({ body: t, cause: r, details: n, headers: u, status: o, url: a }) {
    super("HTTP request failed.", {
      cause: r,
      details: n,
      metaMessages: [
        o && `Status: ${o}`,
        `URL: ${he(a)}`,
        t && `Request body: ${N(t)}`
      ].filter(Boolean),
      name: "HttpRequestError"
    }), Object.defineProperty(this, "body", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), Object.defineProperty(this, "headers", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), Object.defineProperty(this, "status", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), Object.defineProperty(this, "url", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), this.body = t, this.headers = u, this.status = o, this.url = a;
  }
}
class Un extends w {
  constructor({ body: t, cause: r, details: n, url: u }) {
    super("WebSocket request failed.", {
      cause: r,
      details: n,
      metaMessages: [
        `URL: ${he(u)}`,
        t && `Request body: ${N(t)}`
      ].filter(Boolean),
      name: "WebSocketRequestError"
    });
  }
}
class tt extends w {
  constructor({ body: t, error: r, url: n }) {
    super("RPC Request failed.", {
      cause: r,
      details: r.message,
      metaMessages: [`URL: ${he(n)}`, `Request body: ${N(t)}`],
      name: "RpcRequestError"
    }), Object.defineProperty(this, "code", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), Object.defineProperty(this, "data", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), this.code = r.code, this.data = r.data;
  }
}
class Fn extends w {
  constructor({ url: t } = {}) {
    super("The socket has been closed.", {
      metaMessages: [t && `URL: ${he(t)}`].filter(Boolean),
      name: "SocketClosedError"
    });
  }
}
class Ie extends w {
  constructor({ body: t, url: r }) {
    super("The request took too long to respond.", {
      details: "The request timed out.",
      metaMessages: [`URL: ${he(r)}`, `Request body: ${N(t)}`],
      name: "TimeoutError"
    });
  }
}
const At = -1;
class P extends w {
  constructor(t, { code: r, docsPath: n, metaMessages: u, name: o, shortMessage: a }) {
    super(a, {
      cause: t,
      docsPath: n,
      metaMessages: u || (t == null ? void 0 : t.metaMessages),
      name: o || "RpcError"
    }), Object.defineProperty(this, "code", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), this.name = o || t.name, this.code = t instanceof tt ? t.code : r ?? At;
  }
}
class R extends P {
  constructor(t, r) {
    super(t, r), Object.defineProperty(this, "data", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: void 0
    }), this.data = r.data;
  }
}
class V extends P {
  constructor(t) {
    super(t, {
      code: V.code,
      name: "ParseRpcError",
      shortMessage: "Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."
    });
  }
}
Object.defineProperty(V, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: -32700
});
class K extends P {
  constructor(t) {
    super(t, {
      code: K.code,
      name: "InvalidRequestRpcError",
      shortMessage: "JSON is not a valid request object."
    });
  }
}
Object.defineProperty(K, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: -32600
});
class G extends P {
  constructor(t, { method: r } = {}) {
    super(t, {
      code: G.code,
      name: "MethodNotFoundRpcError",
      shortMessage: `The method${r ? ` "${r}"` : ""} does not exist / is not available.`
    });
  }
}
Object.defineProperty(G, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: -32601
});
class J extends P {
  constructor(t) {
    super(t, {
      code: J.code,
      name: "InvalidParamsRpcError",
      shortMessage: [
        "Invalid parameters were provided to the RPC method.",
        "Double check you have provided the correct parameters."
      ].join(`
`)
    });
  }
}
Object.defineProperty(J, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: -32602
});
class q extends P {
  constructor(t) {
    super(t, {
      code: q.code,
      name: "InternalRpcError",
      shortMessage: "An internal error was received."
    });
  }
}
Object.defineProperty(q, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: -32603
});
class X extends P {
  constructor(t) {
    super(t, {
      code: X.code,
      name: "InvalidInputRpcError",
      shortMessage: [
        "Missing or invalid parameters.",
        "Double check you have provided the correct parameters."
      ].join(`
`)
    });
  }
}
Object.defineProperty(X, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: -32e3
});
class Q extends P {
  constructor(t) {
    super(t, {
      code: Q.code,
      name: "ResourceNotFoundRpcError",
      shortMessage: "Requested resource not found."
    }), Object.defineProperty(this, "name", {
      enumerable: !0,
      configurable: !0,
      writable: !0,
      value: "ResourceNotFoundRpcError"
    });
  }
}
Object.defineProperty(Q, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: -32001
});
class Z extends P {
  constructor(t) {
    super(t, {
      code: Z.code,
      name: "ResourceUnavailableRpcError",
      shortMessage: "Requested resource not available."
    });
  }
}
Object.defineProperty(Z, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: -32002
});
class B extends P {
  constructor(t) {
    super(t, {
      code: B.code,
      name: "TransactionRejectedRpcError",
      shortMessage: "Transaction creation failed."
    });
  }
}
Object.defineProperty(B, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: -32003
});
class $ extends P {
  constructor(t, { method: r } = {}) {
    super(t, {
      code: $.code,
      name: "MethodNotSupportedRpcError",
      shortMessage: `Method${r ? ` "${r}"` : ""} is not supported.`
    });
  }
}
Object.defineProperty($, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: -32004
});
class z extends P {
  constructor(t) {
    super(t, {
      code: z.code,
      name: "LimitExceededRpcError",
      shortMessage: "Request exceeds defined limit."
    });
  }
}
Object.defineProperty(z, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: -32005
});
class ee extends P {
  constructor(t) {
    super(t, {
      code: ee.code,
      name: "JsonRpcVersionUnsupportedError",
      shortMessage: "Version of JSON-RPC protocol is not supported."
    });
  }
}
Object.defineProperty(ee, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: -32006
});
class U extends R {
  constructor(t) {
    super(t, {
      code: U.code,
      name: "UserRejectedRequestError",
      shortMessage: "User rejected the request."
    });
  }
}
Object.defineProperty(U, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 4001
});
class te extends R {
  constructor(t) {
    super(t, {
      code: te.code,
      name: "UnauthorizedProviderError",
      shortMessage: "The requested method and/or account has not been authorized by the user."
    });
  }
}
Object.defineProperty(te, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 4100
});
class re extends R {
  constructor(t, { method: r } = {}) {
    super(t, {
      code: re.code,
      name: "UnsupportedProviderMethodError",
      shortMessage: `The Provider does not support the requested method${r ? ` " ${r}"` : ""}.`
    });
  }
}
Object.defineProperty(re, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 4200
});
class ne extends R {
  constructor(t) {
    super(t, {
      code: ne.code,
      name: "ProviderDisconnectedError",
      shortMessage: "The Provider is disconnected from all chains."
    });
  }
}
Object.defineProperty(ne, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 4900
});
class oe extends R {
  constructor(t) {
    super(t, {
      code: oe.code,
      name: "ChainDisconnectedError",
      shortMessage: "The Provider is not connected to the requested chain."
    });
  }
}
Object.defineProperty(oe, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 4901
});
class ue extends R {
  constructor(t) {
    super(t, {
      code: ue.code,
      name: "SwitchChainError",
      shortMessage: "An error occurred when attempting to switch chain."
    });
  }
}
Object.defineProperty(ue, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 4902
});
class ae extends R {
  constructor(t) {
    super(t, {
      code: ae.code,
      name: "UnsupportedNonOptionalCapabilityError",
      shortMessage: "This Wallet does not support a capability that was not marked as optional."
    });
  }
}
Object.defineProperty(ae, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 5700
});
class se extends R {
  constructor(t) {
    super(t, {
      code: se.code,
      name: "UnsupportedChainIdError",
      shortMessage: "This Wallet does not support the requested chain ID."
    });
  }
}
Object.defineProperty(se, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 5710
});
class ie extends R {
  constructor(t) {
    super(t, {
      code: ie.code,
      name: "DuplicateIdError",
      shortMessage: "There is already a bundle submitted with this ID."
    });
  }
}
Object.defineProperty(ie, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 5720
});
class ce extends R {
  constructor(t) {
    super(t, {
      code: ce.code,
      name: "UnknownBundleIdError",
      shortMessage: "This bundle id is unknown / has not been submitted"
    });
  }
}
Object.defineProperty(ce, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 5730
});
class le extends R {
  constructor(t) {
    super(t, {
      code: le.code,
      name: "BundleTooLargeError",
      shortMessage: "The call bundle is too large for the Wallet to process."
    });
  }
}
Object.defineProperty(le, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 5740
});
class de extends R {
  constructor(t) {
    super(t, {
      code: de.code,
      name: "AtomicReadyWalletRejectedUpgradeError",
      shortMessage: "The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."
    });
  }
}
Object.defineProperty(de, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 5750
});
class fe extends R {
  constructor(t) {
    super(t, {
      code: fe.code,
      name: "AtomicityNotSupportedError",
      shortMessage: "The wallet does not support atomic execution but the request requires it."
    });
  }
}
Object.defineProperty(fe, "code", {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: 5760
});
class $t extends P {
  constructor(t) {
    super(t, {
      name: "UnknownRpcError",
      shortMessage: "An unknown RPC error occurred."
    });
  }
}
function Ut() {
  let e = () => {
  }, t = () => {
  };
  return { promise: new Promise((n, u) => {
    e = n, t = u;
  }), resolve: e, reject: t };
}
const _e = /* @__PURE__ */ new Map();
function Ft({ fn: e, id: t, shouldSplitBatch: r, wait: n = 0, sort: u }) {
  const o = async () => {
    const f = h();
    a();
    const p = f.map(({ args: c }) => c);
    p.length !== 0 && e(p).then((c) => {
      u && Array.isArray(c) && c.sort(u);
      for (let s = 0; s < f.length; s++) {
        const { resolve: D } = f[s];
        D == null || D([c[s], c]);
      }
    }).catch((c) => {
      for (let s = 0; s < f.length; s++) {
        const { reject: D } = f[s];
        D == null || D(c);
      }
    });
  }, a = () => _e.delete(t), i = () => h().map(({ args: f }) => f), h = () => _e.get(t) || [], l = (f) => _e.set(t, [...h(), f]);
  return {
    flush: a,
    async schedule(f) {
      const { promise: p, resolve: c, reject: s } = Ut();
      return (r == null ? void 0 : r([...i(), f])) && o(), h().length > 0 ? (l({ args: f, resolve: c, reject: s }), p) : (l({ args: f, resolve: c, reject: s }), setTimeout(o, n), p);
    }
  };
}
async function rt(e) {
  return new Promise((t) => setTimeout(t, e));
}
const Re = 256;
let pe = Re, ge;
function It(e = 11) {
  if (!ge || pe + e > Re * 2) {
    ge = "", pe = 0;
    for (let t = 0; t < Re; t++)
      ge += (256 + Math.random() * 256 | 0).toString(16).substring(1);
  }
  return ge.substring(pe, pe++ + e);
}
const we = /* @__PURE__ */ new Mt(8192);
function qt(e, { enabled: t = !0, id: r }) {
  if (!t || !r)
    return e();
  if (we.get(r))
    return we.get(r);
  const n = e().finally(() => we.delete(r));
  return we.set(r, n), n;
}
function Bt(e, { delay: t = 100, retryCount: r = 2, shouldRetry: n = () => !0 } = {}) {
  return new Promise((u, o) => {
    const a = async ({ count: i = 0 } = {}) => {
      const h = async ({ error: l }) => {
        const f = typeof t == "function" ? t({ count: i, error: l }) : t;
        f && await rt(f), a({ count: i + 1 });
      };
      try {
        const l = await e();
        u(l);
      } catch (l) {
        if (i < r && await n({ count: i, error: l }))
          return h({ error: l });
        o(l);
      }
    };
    a();
  });
}
function zt(e, t = {}) {
  return async (r, n = {}) => {
    var p;
    const { dedupe: u = !1, methods: o, retryDelay: a = 150, retryCount: i = 3, uid: h } = {
      ...t,
      ...n
    }, { method: l } = r;
    if ((p = o == null ? void 0 : o.exclude) != null && p.includes(l))
      throw new $(new Error("method not supported"), {
        method: l
      });
    if (o != null && o.include && !o.include.includes(l))
      throw new $(new Error("method not supported"), {
        method: l
      });
    const f = u ? et(`${h}.${N(r)}`) : void 0;
    return qt(() => Bt(async () => {
      try {
        return await e(r);
      } catch (c) {
        const s = c;
        switch (s.code) {
          case V.code:
            throw new V(s);
          case K.code:
            throw new K(s);
          case G.code:
            throw new G(s, { method: r.method });
          case J.code:
            throw new J(s);
          case q.code:
            throw new q(s);
          case X.code:
            throw new X(s);
          case Q.code:
            throw new Q(s);
          case Z.code:
            throw new Z(s);
          case B.code:
            throw new B(s);
          case $.code:
            throw new $(s, {
              method: r.method
            });
          case z.code:
            throw new z(s);
          case ee.code:
            throw new ee(s);
          case U.code:
            throw new U(s);
          case te.code:
            throw new te(s);
          case re.code:
            throw new re(s);
          case ne.code:
            throw new ne(s);
          case oe.code:
            throw new oe(s);
          case ue.code:
            throw new ue(s);
          case ae.code:
            throw new ae(s);
          case se.code:
            throw new se(s);
          case ie.code:
            throw new ie(s);
          case ce.code:
            throw new ce(s);
          case le.code:
            throw new le(s);
          case de.code:
            throw new de(s);
          case fe.code:
            throw new fe(s);
          case 5e3:
            throw new U(s);
          default:
            throw c instanceof w ? c : new $t(s);
        }
      }
    }, {
      delay: ({ count: c, error: s }) => {
        var D;
        if (s && s instanceof Y) {
          const d = (D = s == null ? void 0 : s.headers) == null ? void 0 : D.get("Retry-After");
          if (d != null && d.match(/\d/))
            return Number.parseInt(d) * 1e3;
        }
        return ~~(1 << c) * a;
      },
      retryCount: i,
      shouldRetry: ({ error: c }) => Wt(c)
    }), { enabled: u, id: f });
  };
}
function Wt(e) {
  return "code" in e && typeof e.code == "number" ? e.code === -1 || e.code === z.code || e.code === q.code : e instanceof Y && e.status ? e.status === 403 || e.status === 408 || e.status === 413 || e.status === 429 || e.status === 500 || e.status === 502 || e.status === 503 || e.status === 504 : !0;
}
function nt({ key: e, methods: t, name: r, request: n, retryCount: u = 3, retryDelay: o = 150, timeout: a, type: i }, h) {
  const l = It();
  return {
    config: {
      key: e,
      methods: t,
      name: r,
      request: n,
      retryCount: u,
      retryDelay: o,
      timeout: a,
      type: i
    },
    request: zt(n, { methods: t, retryCount: u, retryDelay: o, uid: l }),
    value: h
  };
}
function In(e, t = {}) {
  const { key: r = "fallback", name: n = "Fallback", rank: u = !1, shouldThrow: o = Ht, retryCount: a, retryDelay: i } = t;
  return ({ chain: h, pollingInterval: l = 4e3, timeout: f, ...p }) => {
    let c = e, s = () => {
    };
    const D = nt({
      key: r,
      name: n,
      async request({ method: d, params: b }) {
        let g;
        const E = async (m = 0) => {
          const O = c[m]({
            ...p,
            chain: h,
            retryCount: 0,
            timeout: f
          });
          try {
            const v = await O.request({
              method: d,
              params: b
            });
            return s({
              method: d,
              params: b,
              response: v,
              transport: O,
              status: "success"
            }), v;
          } catch (v) {
            if (s({
              error: v,
              method: d,
              params: b,
              transport: O,
              status: "error"
            }), o(v) || m === c.length - 1 || (g ?? (g = c.slice(m + 1).some((_) => {
              const { include: C, exclude: S } = _({ chain: h }).config.methods || {};
              return C ? C.includes(d) : S ? !S.includes(d) : !0;
            })), !g))
              throw v;
            return E(m + 1);
          }
        };
        return E();
      },
      retryCount: a,
      retryDelay: i,
      type: "fallback"
    }, {
      onResponse: (d) => s = d,
      transports: c.map((d) => d({ chain: h, retryCount: 0 }))
    });
    if (u) {
      const d = typeof u == "object" ? u : {};
      kt({
        chain: h,
        interval: d.interval ?? l,
        onTransports: (b) => c = b,
        ping: d.ping,
        sampleCount: d.sampleCount,
        timeout: d.timeout,
        transports: c,
        weights: d.weights
      });
    }
    return D;
  };
}
function Ht(e) {
  return !!("code" in e && typeof e.code == "number" && (e.code === B.code || e.code === U.code || Ae.nodeMessage.test(e.message) || e.code === 5e3));
}
function kt({ chain: e, interval: t = 4e3, onTransports: r, ping: n, sampleCount: u = 10, timeout: o = 1e3, transports: a, weights: i = {} }) {
  const { stability: h = 0.7, latency: l = 0.3 } = i, f = [], p = async () => {
    const c = await Promise.all(a.map(async (d) => {
      const b = d({ chain: e, retryCount: 0, timeout: o }), g = Date.now();
      let E, m;
      try {
        await (n ? n({ transport: b }) : b.request({ method: "net_listening" })), m = 1;
      } catch {
        m = 0;
      } finally {
        E = Date.now();
      }
      return { latency: E - g, success: m };
    }));
    f.push(c), f.length > u && f.shift();
    const s = Math.max(...f.map((d) => Math.max(...d.map(({ latency: b }) => b)))), D = a.map((d, b) => {
      const g = f.map((_) => _[b].latency), m = 1 - g.reduce((_, C) => _ + C, 0) / g.length / s, O = f.map((_) => _[b].success), v = O.reduce((_, C) => _ + C, 0) / O.length;
      return v === 0 ? [0, b] : [
        l * m + h * v,
        b
      ];
    }).sort((d, b) => b[0] - d[0]);
    r(D.map(([, d]) => a[d])), await rt(t), p();
  };
  p();
}
class Lt extends w {
  constructor() {
    super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.", {
      docsPath: "/docs/clients/intro",
      name: "UrlRequiredError"
    });
  }
}
function Yt(e, { errorInstance: t = new Error("timed out"), timeout: r, signal: n }) {
  return new Promise((u, o) => {
    (async () => {
      let a;
      try {
        const i = new AbortController();
        r > 0 && (a = setTimeout(() => {
          n ? i.abort() : o(t);
        }, r)), u(await e({ signal: (i == null ? void 0 : i.signal) || null }));
      } catch (i) {
        (i == null ? void 0 : i.name) === "AbortError" && o(t), o(i);
      } finally {
        clearTimeout(a);
      }
    })();
  });
}
function Vt() {
  return {
    current: 0,
    take() {
      return this.current++;
    },
    reset() {
      this.current = 0;
    }
  };
}
const qe = /* @__PURE__ */ Vt();
function Kt(e, t = {}) {
  return {
    async request(r) {
      var p;
      const { body: n, onRequest: u = t.onRequest, onResponse: o = t.onResponse, timeout: a = t.timeout ?? 1e4 } = r, i = {
        ...t.fetchOptions ?? {},
        ...r.fetchOptions ?? {}
      }, { headers: h, method: l, signal: f } = i;
      try {
        const c = await Yt(async ({ signal: D }) => {
          const d = {
            ...i,
            body: Array.isArray(n) ? N(n.map((m) => ({
              jsonrpc: "2.0",
              id: m.id ?? qe.take(),
              ...m
            }))) : N({
              jsonrpc: "2.0",
              id: n.id ?? qe.take(),
              ...n
            }),
            headers: {
              "Content-Type": "application/json",
              ...h
            },
            method: l || "POST",
            signal: f || (a > 0 ? D : null)
          }, b = new Request(e, d), g = await (u == null ? void 0 : u(b, d)) ?? { ...d, url: e };
          return await fetch(g.url ?? e, g);
        }, {
          errorInstance: new Ie({ body: n, url: e }),
          timeout: a,
          signal: !0
        });
        o && await o(c);
        let s;
        if ((p = c.headers.get("Content-Type")) != null && p.startsWith("application/json"))
          s = await c.json();
        else {
          s = await c.text();
          try {
            s = JSON.parse(s || "{}");
          } catch (D) {
            if (c.ok)
              throw D;
            s = { error: s };
          }
        }
        if (!c.ok)
          throw new Y({
            body: n,
            details: N(s.error) || c.statusText,
            headers: c.headers,
            status: c.status,
            url: e
          });
        return s;
      } catch (c) {
        throw c instanceof Y || c instanceof Ie ? c : new Y({
          body: n,
          cause: c,
          url: e
        });
      }
    }
  };
}
function qn(e, t = {}) {
  const { batch: r, fetchOptions: n, key: u = "http", methods: o, name: a = "HTTP JSON-RPC", onFetchRequest: i, onFetchResponse: h, retryDelay: l, raw: f } = t;
  return ({ chain: p, retryCount: c, timeout: s }) => {
    const { batchSize: D = 1e3, wait: d = 0 } = typeof r == "object" ? r : {}, b = t.retryCount ?? c, g = s ?? t.timeout ?? 1e4, E = e || (p == null ? void 0 : p.rpcUrls.default.http[0]);
    if (!E)
      throw new Lt();
    const m = Kt(E, {
      fetchOptions: n,
      onRequest: i,
      onResponse: h,
      timeout: g
    });
    return nt({
      key: u,
      methods: o,
      name: a,
      async request({ method: O, params: v }) {
        const _ = { method: O, params: v }, { schedule: C } = Ft({
          id: E,
          wait: d,
          shouldSplitBatch(x) {
            return x.length > D;
          },
          fn: (x) => m.request({
            body: x
          }),
          sort: (x, it) => x.id - it.id
        }), S = async (x) => r ? C(x) : [
          await m.request({
            body: x
          })
        ], [{ error: j, result: Ue }] = await S(_);
        if (f)
          return { error: j, result: Ue };
        if (j)
          throw new tt({
            body: _,
            error: j,
            url: E
          });
        return Ue;
      },
      retryCount: b,
      retryDelay: l,
      timeout: g,
      type: "http"
    }, {
      fetchOptions: n,
      url: E
    });
  };
}
function Gt(e, t) {
  if (e.length >= 255)
    throw new TypeError("Alphabet too long");
  for (var r = new Uint8Array(256), n = 0; n < r.length; n++)
    r[n] = 255;
  for (var u = 0; u < e.length; u++) {
    var o = e.charAt(u), a = o.charCodeAt(0);
    if (r[a] !== 255)
      throw new TypeError(o + " is ambiguous");
    r[a] = u;
  }
  var i = e.length, h = e.charAt(0), l = Math.log(i) / Math.log(256), f = Math.log(256) / Math.log(i);
  function p(D) {
    if (D instanceof Uint8Array || (ArrayBuffer.isView(D) ? D = new Uint8Array(D.buffer, D.byteOffset, D.byteLength) : Array.isArray(D) && (D = Uint8Array.from(D))), !(D instanceof Uint8Array))
      throw new TypeError("Expected Uint8Array");
    if (D.length === 0)
      return "";
    for (var d = 0, b = 0, g = 0, E = D.length; g !== E && D[g] === 0; )
      g++, d++;
    for (var m = (E - g) * f + 1 >>> 0, O = new Uint8Array(m); g !== E; ) {
      for (var v = D[g], _ = 0, C = m - 1; (v !== 0 || _ < b) && C !== -1; C--, _++)
        v += 256 * O[C] >>> 0, O[C] = v % i >>> 0, v = v / i >>> 0;
      if (v !== 0)
        throw new Error("Non-zero carry");
      b = _, g++;
    }
    for (var S = m - b; S !== m && O[S] === 0; )
      S++;
    for (var j = h.repeat(d); S < m; ++S)
      j += e.charAt(O[S]);
    return j;
  }
  function c(D) {
    if (typeof D != "string")
      throw new TypeError("Expected String");
    if (D.length === 0)
      return new Uint8Array();
    var d = 0;
    if (D[d] !== " ") {
      for (var b = 0, g = 0; D[d] === h; )
        b++, d++;
      for (var E = (D.length - d) * l + 1 >>> 0, m = new Uint8Array(E); D[d]; ) {
        var O = r[D.charCodeAt(d)];
        if (O === 255)
          return;
        for (var v = 0, _ = E - 1; (O !== 0 || v < g) && _ !== -1; _--, v++)
          O += i * m[_] >>> 0, m[_] = O % 256 >>> 0, O = O / 256 >>> 0;
        if (O !== 0)
          throw new Error("Non-zero carry");
        g = v, d++;
      }
      if (D[d] !== " ") {
        for (var C = E - g; C !== E && m[C] === 0; )
          C++;
        for (var S = new Uint8Array(b + (E - C)), j = b; C !== E; )
          S[j++] = m[C++];
        return S;
      }
    }
  }
  function s(D) {
    var d = c(D);
    if (d)
      return d;
    throw new Error(`Non-${t} character`);
  }
  return {
    encode: p,
    decodeUnsafe: c,
    decode: s
  };
}
var Jt = Gt, Xt = Jt;
const Qt = (e) => {
  if (e instanceof Uint8Array && e.constructor.name === "Uint8Array")
    return e;
  if (e instanceof ArrayBuffer)
    return new Uint8Array(e);
  if (ArrayBuffer.isView(e))
    return new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
  throw new Error("Unknown type, must be binary type");
}, Zt = (e) => new TextEncoder().encode(e), er = (e) => new TextDecoder().decode(e);
class tr {
  constructor(t, r, n) {
    this.name = t, this.prefix = r, this.baseEncode = n;
  }
  encode(t) {
    if (t instanceof Uint8Array)
      return `${this.prefix}${this.baseEncode(t)}`;
    throw Error("Unknown type, must be binary type");
  }
}
class rr {
  constructor(t, r, n) {
    if (this.name = t, this.prefix = r, r.codePointAt(0) === void 0)
      throw new Error("Invalid prefix character");
    this.prefixCodePoint = r.codePointAt(0), this.baseDecode = n;
  }
  decode(t) {
    if (typeof t == "string") {
      if (t.codePointAt(0) !== this.prefixCodePoint)
        throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);
      return this.baseDecode(t.slice(this.prefix.length));
    } else
      throw Error("Can only multibase decode strings");
  }
  or(t) {
    return ot(this, t);
  }
}
class nr {
  constructor(t) {
    this.decoders = t;
  }
  or(t) {
    return ot(this, t);
  }
  decode(t) {
    const r = t[0], n = this.decoders[r];
    if (n)
      return n.decode(t);
    throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`);
  }
}
const ot = (e, t) => new nr({
  ...e.decoders || { [e.prefix]: e },
  ...t.decoders || { [t.prefix]: t }
});
class or {
  constructor(t, r, n, u) {
    this.name = t, this.prefix = r, this.baseEncode = n, this.baseDecode = u, this.encoder = new tr(t, r, n), this.decoder = new rr(t, r, u);
  }
  encode(t) {
    return this.encoder.encode(t);
  }
  decode(t) {
    return this.decoder.decode(t);
  }
}
const ye = ({ name: e, prefix: t, encode: r, decode: n }) => new or(e, t, r, n), be = ({ prefix: e, name: t, alphabet: r }) => {
  const { encode: n, decode: u } = Xt(r, t);
  return ye({
    prefix: e,
    name: t,
    encode: n,
    decode: (o) => Qt(u(o))
  });
}, ur = (e, t, r, n) => {
  const u = {};
  for (let f = 0; f < t.length; ++f)
    u[t[f]] = f;
  let o = e.length;
  for (; e[o - 1] === "="; )
    --o;
  const a = new Uint8Array(o * r / 8 | 0);
  let i = 0, h = 0, l = 0;
  for (let f = 0; f < o; ++f) {
    const p = u[e[f]];
    if (p === void 0)
      throw new SyntaxError(`Non-${n} character`);
    h = h << r | p, i += r, i >= 8 && (i -= 8, a[l++] = 255 & h >> i);
  }
  if (i >= r || 255 & h << 8 - i)
    throw new SyntaxError("Unexpected end of data");
  return a;
}, ar = (e, t, r) => {
  const n = t[t.length - 1] === "=", u = (1 << r) - 1;
  let o = "", a = 0, i = 0;
  for (let h = 0; h < e.length; ++h)
    for (i = i << 8 | e[h], a += 8; a > r; )
      a -= r, o += t[u & i >> a];
  if (a && (o += t[u & i << r - a]), n)
    for (; o.length * r & 7; )
      o += "=";
  return o;
}, T = ({ name: e, prefix: t, bitsPerChar: r, alphabet: n }) => ye({
  prefix: t,
  name: e,
  encode(u) {
    return ar(u, n, r);
  },
  decode(u) {
    return ur(u, n, r, e);
  }
}), sr = ye({
  prefix: "\0",
  name: "identity",
  encode: (e) => er(e),
  decode: (e) => Zt(e)
}), Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  identity: sr
}, Symbol.toStringTag, { value: "Module" })), ir = T({
  prefix: "0",
  name: "base2",
  alphabet: "01",
  bitsPerChar: 1
}), zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base2: ir
}, Symbol.toStringTag, { value: "Module" })), cr = T({
  prefix: "7",
  name: "base8",
  alphabet: "01234567",
  bitsPerChar: 3
}), Wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base8: cr
}, Symbol.toStringTag, { value: "Module" })), lr = be({
  prefix: "9",
  name: "base10",
  alphabet: "0123456789"
}), Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base10: lr
}, Symbol.toStringTag, { value: "Module" })), dr = T({
  prefix: "f",
  name: "base16",
  alphabet: "0123456789abcdef",
  bitsPerChar: 4
}), fr = T({
  prefix: "F",
  name: "base16upper",
  alphabet: "0123456789ABCDEF",
  bitsPerChar: 4
}), kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base16: dr,
  base16upper: fr
}, Symbol.toStringTag, { value: "Module" })), Dr = T({
  prefix: "b",
  name: "base32",
  alphabet: "abcdefghijklmnopqrstuvwxyz234567",
  bitsPerChar: 5
}), hr = T({
  prefix: "B",
  name: "base32upper",
  alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",
  bitsPerChar: 5
}), br = T({
  prefix: "c",
  name: "base32pad",
  alphabet: "abcdefghijklmnopqrstuvwxyz234567=",
  bitsPerChar: 5
}), pr = T({
  prefix: "C",
  name: "base32padupper",
  alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",
  bitsPerChar: 5
}), gr = T({
  prefix: "v",
  name: "base32hex",
  alphabet: "0123456789abcdefghijklmnopqrstuv",
  bitsPerChar: 5
}), wr = T({
  prefix: "V",
  name: "base32hexupper",
  alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV",
  bitsPerChar: 5
}), mr = T({
  prefix: "t",
  name: "base32hexpad",
  alphabet: "0123456789abcdefghijklmnopqrstuv=",
  bitsPerChar: 5
}), Er = T({
  prefix: "T",
  name: "base32hexpadupper",
  alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV=",
  bitsPerChar: 5
}), yr = T({
  prefix: "h",
  name: "base32z",
  alphabet: "ybndrfg8ejkmcpqxot1uwisza345h769",
  bitsPerChar: 5
}), Ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base32: Dr,
  base32hex: gr,
  base32hexpad: mr,
  base32hexpadupper: Er,
  base32hexupper: wr,
  base32pad: br,
  base32padupper: pr,
  base32upper: hr,
  base32z: yr
}, Symbol.toStringTag, { value: "Module" })), vr = be({
  prefix: "k",
  name: "base36",
  alphabet: "0123456789abcdefghijklmnopqrstuvwxyz"
}), Or = be({
  prefix: "K",
  name: "base36upper",
  alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}), Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base36: vr,
  base36upper: Or
}, Symbol.toStringTag, { value: "Module" })), _r = be({
  name: "base58btc",
  prefix: "z",
  alphabet: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
}), Cr = be({
  name: "base58flickr",
  prefix: "Z",
  alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"
}), Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base58btc: _r,
  base58flickr: Cr
}, Symbol.toStringTag, { value: "Module" })), Tr = T({
  prefix: "m",
  name: "base64",
  alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
  bitsPerChar: 6
}), Sr = T({
  prefix: "M",
  name: "base64pad",
  alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  bitsPerChar: 6
}), Pr = T({
  prefix: "u",
  name: "base64url",
  alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",
  bitsPerChar: 6
}), Rr = T({
  prefix: "U",
  name: "base64urlpad",
  alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",
  bitsPerChar: 6
}), Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base64: Tr,
  base64pad: Sr,
  base64url: Pr,
  base64urlpad: Rr
}, Symbol.toStringTag, { value: "Module" })), ut = Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"), jr = ut.reduce((e, t, r) => (e[r] = t, e), []), xr = ut.reduce((e, t, r) => (e[t.codePointAt(0)] = r, e), []);
function Nr(e) {
  return e.reduce((t, r) => (t += jr[r], t), "");
}
function Mr(e) {
  const t = [];
  for (const r of e) {
    const n = xr[r.codePointAt(0)];
    if (n === void 0)
      throw new Error(`Non-base256emoji character: ${r}`);
    t.push(n);
  }
  return new Uint8Array(t);
}
const Ar = ye({
  prefix: "🚀",
  name: "base256emoji",
  encode: Nr,
  decode: Mr
}), Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base256emoji: Ar
}, Symbol.toStringTag, { value: "Module" }));
new TextEncoder();
new TextDecoder();
var $r = {};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var je = function(e, t) {
  return je = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
    r.__proto__ = n;
  } || function(r, n) {
    for (var u in n) n.hasOwnProperty(u) && (r[u] = n[u]);
  }, je(e, t);
};
function Ur(e, t) {
  je(e, t);
  function r() {
    this.constructor = e;
  }
  e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
}
var xe = function() {
  return xe = Object.assign || function(t) {
    for (var r, n = 1, u = arguments.length; n < u; n++) {
      r = arguments[n];
      for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
    }
    return t;
  }, xe.apply(this, arguments);
};
function Fr(e, t) {
  var r = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var u = 0, n = Object.getOwnPropertySymbols(e); u < n.length; u++)
      t.indexOf(n[u]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[u]) && (r[n[u]] = e[n[u]]);
  return r;
}
function Ir(e, t, r, n) {
  var u = arguments.length, o = u < 3 ? t : n === null ? n = Object.getOwnPropertyDescriptor(t, r) : n, a;
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, r, n);
  else for (var i = e.length - 1; i >= 0; i--) (a = e[i]) && (o = (u < 3 ? a(o) : u > 3 ? a(t, r, o) : a(t, r)) || o);
  return u > 3 && o && Object.defineProperty(t, r, o), o;
}
function qr(e, t) {
  return function(r, n) {
    t(r, n, e);
  };
}
function Br(e, t) {
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
}
function zr(e, t, r, n) {
  function u(o) {
    return o instanceof r ? o : new r(function(a) {
      a(o);
    });
  }
  return new (r || (r = Promise))(function(o, a) {
    function i(f) {
      try {
        l(n.next(f));
      } catch (p) {
        a(p);
      }
    }
    function h(f) {
      try {
        l(n.throw(f));
      } catch (p) {
        a(p);
      }
    }
    function l(f) {
      f.done ? o(f.value) : u(f.value).then(i, h);
    }
    l((n = n.apply(e, t || [])).next());
  });
}
function Wr(e, t) {
  var r = { label: 0, sent: function() {
    if (o[0] & 1) throw o[1];
    return o[1];
  }, trys: [], ops: [] }, n, u, o, a;
  return a = { next: i(0), throw: i(1), return: i(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
    return this;
  }), a;
  function i(l) {
    return function(f) {
      return h([l, f]);
    };
  }
  function h(l) {
    if (n) throw new TypeError("Generator is already executing.");
    for (; r; ) try {
      if (n = 1, u && (o = l[0] & 2 ? u.return : l[0] ? u.throw || ((o = u.return) && o.call(u), 0) : u.next) && !(o = o.call(u, l[1])).done) return o;
      switch (u = 0, o && (l = [l[0] & 2, o.value]), l[0]) {
        case 0:
        case 1:
          o = l;
          break;
        case 4:
          return r.label++, { value: l[1], done: !1 };
        case 5:
          r.label++, u = l[1], l = [0];
          continue;
        case 7:
          l = r.ops.pop(), r.trys.pop();
          continue;
        default:
          if (o = r.trys, !(o = o.length > 0 && o[o.length - 1]) && (l[0] === 6 || l[0] === 2)) {
            r = 0;
            continue;
          }
          if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
            r.label = l[1];
            break;
          }
          if (l[0] === 6 && r.label < o[1]) {
            r.label = o[1], o = l;
            break;
          }
          if (o && r.label < o[2]) {
            r.label = o[2], r.ops.push(l);
            break;
          }
          o[2] && r.ops.pop(), r.trys.pop();
          continue;
      }
      l = t.call(e, r);
    } catch (f) {
      l = [6, f], u = 0;
    } finally {
      n = o = 0;
    }
    if (l[0] & 5) throw l[1];
    return { value: l[0] ? l[1] : void 0, done: !0 };
  }
}
function Hr(e, t, r, n) {
  n === void 0 && (n = r), e[n] = t[r];
}
function kr(e, t) {
  for (var r in e) r !== "default" && !t.hasOwnProperty(r) && (t[r] = e[r]);
}
function Ne(e) {
  var t = typeof Symbol == "function" && Symbol.iterator, r = t && e[t], n = 0;
  if (r) return r.call(e);
  if (e && typeof e.length == "number") return {
    next: function() {
      return e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e };
    }
  };
  throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function at(e, t) {
  var r = typeof Symbol == "function" && e[Symbol.iterator];
  if (!r) return e;
  var n = r.call(e), u, o = [], a;
  try {
    for (; (t === void 0 || t-- > 0) && !(u = n.next()).done; ) o.push(u.value);
  } catch (i) {
    a = { error: i };
  } finally {
    try {
      u && !u.done && (r = n.return) && r.call(n);
    } finally {
      if (a) throw a.error;
    }
  }
  return o;
}
function Lr() {
  for (var e = [], t = 0; t < arguments.length; t++)
    e = e.concat(at(arguments[t]));
  return e;
}
function Yr() {
  for (var e = 0, t = 0, r = arguments.length; t < r; t++) e += arguments[t].length;
  for (var n = Array(e), u = 0, t = 0; t < r; t++)
    for (var o = arguments[t], a = 0, i = o.length; a < i; a++, u++)
      n[u] = o[a];
  return n;
}
function De(e) {
  return this instanceof De ? (this.v = e, this) : new De(e);
}
function Vr(e, t, r) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var n = r.apply(e, t || []), u, o = [];
  return u = {}, a("next"), a("throw"), a("return"), u[Symbol.asyncIterator] = function() {
    return this;
  }, u;
  function a(c) {
    n[c] && (u[c] = function(s) {
      return new Promise(function(D, d) {
        o.push([c, s, D, d]) > 1 || i(c, s);
      });
    });
  }
  function i(c, s) {
    try {
      h(n[c](s));
    } catch (D) {
      p(o[0][3], D);
    }
  }
  function h(c) {
    c.value instanceof De ? Promise.resolve(c.value.v).then(l, f) : p(o[0][2], c);
  }
  function l(c) {
    i("next", c);
  }
  function f(c) {
    i("throw", c);
  }
  function p(c, s) {
    c(s), o.shift(), o.length && i(o[0][0], o[0][1]);
  }
}
function Kr(e) {
  var t, r;
  return t = {}, n("next"), n("throw", function(u) {
    throw u;
  }), n("return"), t[Symbol.iterator] = function() {
    return this;
  }, t;
  function n(u, o) {
    t[u] = e[u] ? function(a) {
      return (r = !r) ? { value: De(e[u](a)), done: u === "return" } : o ? o(a) : a;
    } : o;
  }
}
function Gr(e) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var t = e[Symbol.asyncIterator], r;
  return t ? t.call(e) : (e = typeof Ne == "function" ? Ne(e) : e[Symbol.iterator](), r = {}, n("next"), n("throw"), n("return"), r[Symbol.asyncIterator] = function() {
    return this;
  }, r);
  function n(o) {
    r[o] = e[o] && function(a) {
      return new Promise(function(i, h) {
        a = e[o](a), u(i, h, a.done, a.value);
      });
    };
  }
  function u(o, a, i, h) {
    Promise.resolve(h).then(function(l) {
      o({ value: l, done: i });
    }, a);
  }
}
function Jr(e, t) {
  return Object.defineProperty ? Object.defineProperty(e, "raw", { value: t }) : e.raw = t, e;
}
function Xr(e) {
  if (e && e.__esModule) return e;
  var t = {};
  if (e != null) for (var r in e) Object.hasOwnProperty.call(e, r) && (t[r] = e[r]);
  return t.default = e, t;
}
function Qr(e) {
  return e && e.__esModule ? e : { default: e };
}
function Zr(e, t) {
  if (!t.has(e))
    throw new TypeError("attempted to get private field on non-instance");
  return t.get(e);
}
function en(e, t, r) {
  if (!t.has(e))
    throw new TypeError("attempted to set private field on non-instance");
  return t.set(e, r), r;
}
const tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  get __assign() {
    return xe;
  },
  __asyncDelegator: Kr,
  __asyncGenerator: Vr,
  __asyncValues: Gr,
  __await: De,
  __awaiter: zr,
  __classPrivateFieldGet: Zr,
  __classPrivateFieldSet: en,
  __createBinding: Hr,
  __decorate: Ir,
  __exportStar: kr,
  __extends: Ur,
  __generator: Wr,
  __importDefault: Qr,
  __importStar: Xr,
  __makeTemplateObject: Jr,
  __metadata: Br,
  __param: qr,
  __read: at,
  __rest: Fr,
  __spread: Lr,
  __spreadArrays: Yr,
  __values: Ne
}, Symbol.toStringTag, { value: "Module" })), ve = /* @__PURE__ */ ct(tn);
var Ce = {}, k = {}, Be;
function rn() {
  if (Be) return k;
  Be = 1, Object.defineProperty(k, "__esModule", { value: !0 }), k.delay = void 0;
  function e(t) {
    return new Promise((r) => {
      setTimeout(() => {
        r(!0);
      }, t);
    });
  }
  return k.delay = e, k;
}
var M = {}, Te = {}, A = {}, ze;
function nn() {
  return ze || (ze = 1, Object.defineProperty(A, "__esModule", { value: !0 }), A.ONE_THOUSAND = A.ONE_HUNDRED = void 0, A.ONE_HUNDRED = 100, A.ONE_THOUSAND = 1e3), A;
}
var Se = {}, We;
function on() {
  return We || (We = 1, function(e) {
    Object.defineProperty(e, "__esModule", { value: !0 }), e.ONE_YEAR = e.FOUR_WEEKS = e.THREE_WEEKS = e.TWO_WEEKS = e.ONE_WEEK = e.THIRTY_DAYS = e.SEVEN_DAYS = e.FIVE_DAYS = e.THREE_DAYS = e.ONE_DAY = e.TWENTY_FOUR_HOURS = e.TWELVE_HOURS = e.SIX_HOURS = e.THREE_HOURS = e.ONE_HOUR = e.SIXTY_MINUTES = e.THIRTY_MINUTES = e.TEN_MINUTES = e.FIVE_MINUTES = e.ONE_MINUTE = e.SIXTY_SECONDS = e.THIRTY_SECONDS = e.TEN_SECONDS = e.FIVE_SECONDS = e.ONE_SECOND = void 0, e.ONE_SECOND = 1, e.FIVE_SECONDS = 5, e.TEN_SECONDS = 10, e.THIRTY_SECONDS = 30, e.SIXTY_SECONDS = 60, e.ONE_MINUTE = e.SIXTY_SECONDS, e.FIVE_MINUTES = e.ONE_MINUTE * 5, e.TEN_MINUTES = e.ONE_MINUTE * 10, e.THIRTY_MINUTES = e.ONE_MINUTE * 30, e.SIXTY_MINUTES = e.ONE_MINUTE * 60, e.ONE_HOUR = e.SIXTY_MINUTES, e.THREE_HOURS = e.ONE_HOUR * 3, e.SIX_HOURS = e.ONE_HOUR * 6, e.TWELVE_HOURS = e.ONE_HOUR * 12, e.TWENTY_FOUR_HOURS = e.ONE_HOUR * 24, e.ONE_DAY = e.TWENTY_FOUR_HOURS, e.THREE_DAYS = e.ONE_DAY * 3, e.FIVE_DAYS = e.ONE_DAY * 5, e.SEVEN_DAYS = e.ONE_DAY * 7, e.THIRTY_DAYS = e.ONE_DAY * 30, e.ONE_WEEK = e.SEVEN_DAYS, e.TWO_WEEKS = e.ONE_WEEK * 2, e.THREE_WEEKS = e.ONE_WEEK * 3, e.FOUR_WEEKS = e.ONE_WEEK * 4, e.ONE_YEAR = e.ONE_DAY * 365;
  }(Se)), Se;
}
var He;
function st() {
  return He || (He = 1, function(e) {
    Object.defineProperty(e, "__esModule", { value: !0 });
    const t = ve;
    t.__exportStar(nn(), e), t.__exportStar(on(), e);
  }(Te)), Te;
}
var ke;
function un() {
  if (ke) return M;
  ke = 1, Object.defineProperty(M, "__esModule", { value: !0 }), M.fromMiliseconds = M.toMiliseconds = void 0;
  const e = st();
  function t(n) {
    return n * e.ONE_THOUSAND;
  }
  M.toMiliseconds = t;
  function r(n) {
    return Math.floor(n / e.ONE_THOUSAND);
  }
  return M.fromMiliseconds = r, M;
}
var Le;
function an() {
  return Le || (Le = 1, function(e) {
    Object.defineProperty(e, "__esModule", { value: !0 });
    const t = ve;
    t.__exportStar(rn(), e), t.__exportStar(un(), e);
  }(Ce)), Ce;
}
var I = {}, Ye;
function sn() {
  if (Ye) return I;
  Ye = 1, Object.defineProperty(I, "__esModule", { value: !0 }), I.Watch = void 0;
  class e {
    constructor() {
      this.timestamps = /* @__PURE__ */ new Map();
    }
    start(r) {
      if (this.timestamps.has(r))
        throw new Error(`Watch already started for label: ${r}`);
      this.timestamps.set(r, { started: Date.now() });
    }
    stop(r) {
      const n = this.get(r);
      if (typeof n.elapsed < "u")
        throw new Error(`Watch already stopped for label: ${r}`);
      const u = Date.now() - n.started;
      this.timestamps.set(r, { started: n.started, elapsed: u });
    }
    get(r) {
      const n = this.timestamps.get(r);
      if (typeof n > "u")
        throw new Error(`No timestamp found for label: ${r}`);
      return n;
    }
    elapsed(r) {
      const n = this.get(r);
      return n.elapsed || Date.now() - n.started;
    }
  }
  return I.Watch = e, I.default = e, I;
}
var Pe = {}, L = {}, Ve;
function cn() {
  if (Ve) return L;
  Ve = 1, Object.defineProperty(L, "__esModule", { value: !0 }), L.IWatch = void 0;
  class e {
  }
  return L.IWatch = e, L;
}
var Ke;
function ln() {
  return Ke || (Ke = 1, function(e) {
    Object.defineProperty(e, "__esModule", { value: !0 }), ve.__exportStar(cn(), e);
  }(Pe)), Pe;
}
(function(e) {
  Object.defineProperty(e, "__esModule", { value: !0 });
  const t = ve;
  t.__exportStar(an(), e), t.__exportStar(sn(), e), t.__exportStar(ln(), e), t.__exportStar(st(), e);
})($r);
var y = {};
Object.defineProperty(y, "__esModule", { value: !0 });
y.getLocalStorage = y.getLocalStorageOrThrow = y.getCrypto = y.getCryptoOrThrow = mn = y.getLocation = y.getLocationOrThrow = pn = y.getNavigator = y.getNavigatorOrThrow = Dn = y.getDocument = y.getDocumentOrThrow = y.getFromWindowOrThrow = y.getFromWindow = void 0;
function F(e) {
  let t;
  return typeof window < "u" && typeof window[e] < "u" && (t = window[e]), t;
}
y.getFromWindow = F;
function W(e) {
  const t = F(e);
  if (!t)
    throw new Error(`${e} is not defined in Window`);
  return t;
}
y.getFromWindowOrThrow = W;
function dn() {
  return W("document");
}
y.getDocumentOrThrow = dn;
function fn() {
  return F("document");
}
var Dn = y.getDocument = fn;
function hn() {
  return W("navigator");
}
y.getNavigatorOrThrow = hn;
function bn() {
  return F("navigator");
}
var pn = y.getNavigator = bn;
function gn() {
  return W("location");
}
y.getLocationOrThrow = gn;
function wn() {
  return F("location");
}
var mn = y.getLocation = wn;
function En() {
  return W("crypto");
}
y.getCryptoOrThrow = En;
function yn() {
  return F("crypto");
}
y.getCrypto = yn;
function vn() {
  return W("localStorage");
}
y.getLocalStorageOrThrow = vn;
function On() {
  return F("localStorage");
}
y.getLocalStorage = On;
var $e = {};
Object.defineProperty($e, "__esModule", { value: !0 });
var _n = $e.getWindowMetadata = void 0;
const Ge = y;
function Cn() {
  let e, t;
  try {
    e = Ge.getDocumentOrThrow(), t = Ge.getLocationOrThrow();
  } catch {
    return null;
  }
  function r() {
    const p = e.getElementsByTagName("link"), c = [];
    for (let s = 0; s < p.length; s++) {
      const D = p[s], d = D.getAttribute("rel");
      if (d && d.toLowerCase().indexOf("icon") > -1) {
        const b = D.getAttribute("href");
        if (b)
          if (b.toLowerCase().indexOf("https:") === -1 && b.toLowerCase().indexOf("http:") === -1 && b.indexOf("//") !== 0) {
            let g = t.protocol + "//" + t.host;
            if (b.indexOf("/") === 0)
              g += b;
            else {
              const E = t.pathname.split("/");
              E.pop();
              const m = E.join("/");
              g += m + "/" + b;
            }
            c.push(g);
          } else if (b.indexOf("//") === 0) {
            const g = t.protocol + b;
            c.push(g);
          } else
            c.push(b);
      }
    }
    return c;
  }
  function n(...p) {
    const c = e.getElementsByTagName("meta");
    for (let s = 0; s < c.length; s++) {
      const D = c[s], d = ["itemprop", "property", "name"].map((b) => D.getAttribute(b)).filter((b) => b ? p.includes(b) : !1);
      if (d.length && d) {
        const b = D.getAttribute("content");
        if (b)
          return b;
      }
    }
    return "";
  }
  function u() {
    let p = n("name", "og:site_name", "og:title", "twitter:title");
    return p || (p = e.title), p;
  }
  function o() {
    return n("description", "og:description", "twitter:description", "keywords");
  }
  const a = u(), i = o(), h = t.origin, l = r();
  return {
    description: i,
    url: h,
    icons: l,
    name: a
  };
}
_n = $e.getWindowMetadata = Cn;
export {
  Z as $,
  q as A,
  w as B,
  Rn as C,
  Ft as D,
  Ae as E,
  Ot as F,
  rt as G,
  X as H,
  Sn as I,
  Ut as J,
  It as K,
  Mt as L,
  nt as M,
  Ct as N,
  Yt as O,
  Ie as P,
  qe as Q,
  tt as R,
  Pn as S,
  Nt as T,
  An as U,
  Fn as V,
  Un as W,
  xn as X,
  Bt as Y,
  Lt as Z,
  U as _,
  Ee as a,
  ue as a0,
  In as a1,
  qn as a2,
  $r as a3,
  _n as a4,
  Dn as a5,
  pn as a6,
  mn as a7,
  Gn as a8,
  Kn as a9,
  Vn as aa,
  Yn as ab,
  Ln as ac,
  kn as ad,
  Hn as ae,
  Wn as af,
  zn as ag,
  Bn as ah,
  he as ai,
  Y as aj,
  Ze as b,
  Et as c,
  me as d,
  Mn as e,
  vt as f,
  Oe as g,
  Nn as h,
  Dt as i,
  ht as j,
  gt as k,
  lt as l,
  et as m,
  wt as n,
  N as o,
  Me as p,
  $n as q,
  _t as r,
  Fe as s,
  jn as t,
  Tt as u,
  St as v,
  Pt as w,
  Rt as x,
  jt as y,
  xt as z
};
