import { by as t, bz as e } from "./vendor-208d0ff5.js";
class r {
  constructor(t2) {
    this.left = t2 ? [...t2] : [], this.right = [];
  }
  get(t2) {
    if (t2 < 0 || t2 >= this.left.length + this.right.length)
      throw new RangeError("Cannot access index `" + t2 + "` in a splice buffer of size `" + (this.left.length + this.right.length) + "`");
    return t2 < this.left.length ? this.left[t2] : this.right[this.right.length - t2 + this.left.length - 1];
  }
  get length() {
    return this.left.length + this.right.length;
  }
  shift() {
    return this.setCursor(0), this.right.pop();
  }
  slice(t2, e2) {
    const r2 = null == e2 ? Number.POSITIVE_INFINITY : e2;
    return r2 < this.left.length ? this.left.slice(t2, r2) : t2 > this.left.length ? this.right.slice(this.right.length - r2 + this.left.length, this.right.length - t2 + this.left.length).reverse() : this.left.slice(t2).concat(this.right.slice(this.right.length - r2 + this.left.length).reverse());
  }
  splice(t2, e2, r2) {
    const i2 = e2 || 0;
    this.setCursor(Math.trunc(t2));
    const o = this.right.splice(this.right.length - i2, Number.POSITIVE_INFINITY);
    return r2 && n(this.left, r2), o.reverse();
  }
  pop() {
    return this.setCursor(Number.POSITIVE_INFINITY), this.left.pop();
  }
  push(t2) {
    this.setCursor(Number.POSITIVE_INFINITY), this.left.push(t2);
  }
  pushMany(t2) {
    this.setCursor(Number.POSITIVE_INFINITY), n(this.left, t2);
  }
  unshift(t2) {
    this.setCursor(0), this.right.push(t2);
  }
  unshiftMany(t2) {
    this.setCursor(0), n(this.right, t2.reverse());
  }
  setCursor(t2) {
    if (!(t2 === this.left.length || t2 > this.left.length && 0 === this.right.length || t2 < 0 && 0 === this.left.length))
      if (t2 < this.left.length) {
        const e2 = this.left.splice(t2, Number.POSITIVE_INFINITY);
        n(this.right, e2.reverse());
      } else {
        const e2 = this.right.splice(this.left.length + this.right.length - t2, Number.POSITIVE_INFINITY);
        n(this.left, e2.reverse());
      }
  }
}
function n(t2, e2) {
  let r2 = 0;
  if (e2.length < 1e4)
    t2.push(...e2);
  else
    for (; r2 < e2.length; )
      t2.push(...e2.slice(r2, r2 + 1e4)), r2 += 1e4;
}
var i = {};
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
!function(r2) {
  const n2 = t, i2 = e, o = "function" == typeof Symbol && "function" == typeof Symbol.for ? Symbol.for("nodejs.util.inspect.custom") : null;
  r2.Buffer = u, r2.SlowBuffer = function(t2) {
    +t2 != t2 && (t2 = 0);
    return u.alloc(+t2);
  }, r2.INSPECT_MAX_BYTES = 50;
  const f = 2147483647;
  function s(t2) {
    if (t2 > f)
      throw new RangeError('The value "' + t2 + '" is invalid for option "size"');
    const e2 = new Uint8Array(t2);
    return Object.setPrototypeOf(e2, u.prototype), e2;
  }
  function u(t2, e2, r3) {
    if ("number" == typeof t2) {
      if ("string" == typeof e2)
        throw new TypeError('The "string" argument must be of type string. Received type number');
      return c(t2);
    }
    return h(t2, e2, r3);
  }
  function h(t2, e2, r3) {
    if ("string" == typeof t2)
      return function(t3, e3) {
        "string" == typeof e3 && "" !== e3 || (e3 = "utf8");
        if (!u.isEncoding(e3))
          throw new TypeError("Unknown encoding: " + e3);
        const r4 = 0 | y(t3, e3);
        let n4 = s(r4);
        const i4 = n4.write(t3, e3);
        i4 !== r4 && (n4 = n4.slice(0, i4));
        return n4;
      }(t2, e2);
    if (ArrayBuffer.isView(t2))
      return function(t3) {
        if (J(t3, Uint8Array)) {
          const e3 = new Uint8Array(t3);
          return p(e3.buffer, e3.byteOffset, e3.byteLength);
        }
        return a(t3);
      }(t2);
    if (null == t2)
      throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof t2);
    if (J(t2, ArrayBuffer) || t2 && J(t2.buffer, ArrayBuffer))
      return p(t2, e2, r3);
    if ("undefined" != typeof SharedArrayBuffer && (J(t2, SharedArrayBuffer) || t2 && J(t2.buffer, SharedArrayBuffer)))
      return p(t2, e2, r3);
    if ("number" == typeof t2)
      throw new TypeError('The "value" argument must not be of type number. Received type number');
    const n3 = t2.valueOf && t2.valueOf();
    if (null != n3 && n3 !== t2)
      return u.from(n3, e2, r3);
    const i3 = function(t3) {
      if (u.isBuffer(t3)) {
        const e3 = 0 | g(t3.length), r4 = s(e3);
        return 0 === r4.length || t3.copy(r4, 0, 0, e3), r4;
      }
      if (void 0 !== t3.length)
        return "number" != typeof t3.length || Z(t3.length) ? s(0) : a(t3);
      if ("Buffer" === t3.type && Array.isArray(t3.data))
        return a(t3.data);
    }(t2);
    if (i3)
      return i3;
    if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof t2[Symbol.toPrimitive])
      return u.from(t2[Symbol.toPrimitive]("string"), e2, r3);
    throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof t2);
  }
  function l(t2) {
    if ("number" != typeof t2)
      throw new TypeError('"size" argument must be of type number');
    if (t2 < 0)
      throw new RangeError('The value "' + t2 + '" is invalid for option "size"');
  }
  function c(t2) {
    return l(t2), s(t2 < 0 ? 0 : 0 | g(t2));
  }
  function a(t2) {
    const e2 = t2.length < 0 ? 0 : 0 | g(t2.length), r3 = s(e2);
    for (let n3 = 0; n3 < e2; n3 += 1)
      r3[n3] = 255 & t2[n3];
    return r3;
  }
  function p(t2, e2, r3) {
    if (e2 < 0 || t2.byteLength < e2)
      throw new RangeError('"offset" is outside of buffer bounds');
    if (t2.byteLength < e2 + (r3 || 0))
      throw new RangeError('"length" is outside of buffer bounds');
    let n3;
    return n3 = void 0 === e2 && void 0 === r3 ? new Uint8Array(t2) : void 0 === r3 ? new Uint8Array(t2, e2) : new Uint8Array(t2, e2, r3), Object.setPrototypeOf(n3, u.prototype), n3;
  }
  function g(t2) {
    if (t2 >= f)
      throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + f.toString(16) + " bytes");
    return 0 | t2;
  }
  function y(t2, e2) {
    if (u.isBuffer(t2))
      return t2.length;
    if (ArrayBuffer.isView(t2) || J(t2, ArrayBuffer))
      return t2.byteLength;
    if ("string" != typeof t2)
      throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof t2);
    const r3 = t2.length, n3 = arguments.length > 2 && true === arguments[2];
    if (!n3 && 0 === r3)
      return 0;
    let i3 = false;
    for (; ; )
      switch (e2) {
        case "ascii":
        case "latin1":
        case "binary":
          return r3;
        case "utf8":
        case "utf-8":
          return q(t2).length;
        case "ucs2":
        case "ucs-2":
        case "utf16le":
        case "utf-16le":
          return 2 * r3;
        case "hex":
          return r3 >>> 1;
        case "base64":
          return W(t2).length;
        default:
          if (i3)
            return n3 ? -1 : q(t2).length;
          e2 = ("" + e2).toLowerCase(), i3 = true;
      }
  }
  function w(t2, e2, r3) {
    let n3 = false;
    if ((void 0 === e2 || e2 < 0) && (e2 = 0), e2 > this.length)
      return "";
    if ((void 0 === r3 || r3 > this.length) && (r3 = this.length), r3 <= 0)
      return "";
    if ((r3 >>>= 0) <= (e2 >>>= 0))
      return "";
    for (t2 || (t2 = "utf8"); ; )
      switch (t2) {
        case "hex":
          return _(this, e2, r3);
        case "utf8":
        case "utf-8":
          return T(this, e2, r3);
        case "ascii":
          return O(this, e2, r3);
        case "latin1":
        case "binary":
          return S(this, e2, r3);
        case "base64":
          return v(this, e2, r3);
        case "ucs2":
        case "ucs-2":
        case "utf16le":
        case "utf-16le":
          return L(this, e2, r3);
        default:
          if (n3)
            throw new TypeError("Unknown encoding: " + t2);
          t2 = (t2 + "").toLowerCase(), n3 = true;
      }
  }
  function d(t2, e2, r3) {
    const n3 = t2[e2];
    t2[e2] = t2[r3], t2[r3] = n3;
  }
  function b(t2, e2, r3, n3, i3) {
    if (0 === t2.length)
      return -1;
    if ("string" == typeof r3 ? (n3 = r3, r3 = 0) : r3 > 2147483647 ? r3 = 2147483647 : r3 < -2147483648 && (r3 = -2147483648), Z(r3 = +r3) && (r3 = i3 ? 0 : t2.length - 1), r3 < 0 && (r3 = t2.length + r3), r3 >= t2.length) {
      if (i3)
        return -1;
      r3 = t2.length - 1;
    } else if (r3 < 0) {
      if (!i3)
        return -1;
      r3 = 0;
    }
    if ("string" == typeof e2 && (e2 = u.from(e2, n3)), u.isBuffer(e2))
      return 0 === e2.length ? -1 : E(t2, e2, r3, n3, i3);
    if ("number" == typeof e2)
      return e2 &= 255, "function" == typeof Uint8Array.prototype.indexOf ? i3 ? Uint8Array.prototype.indexOf.call(t2, e2, r3) : Uint8Array.prototype.lastIndexOf.call(t2, e2, r3) : E(t2, [e2], r3, n3, i3);
    throw new TypeError("val must be string, number or Buffer");
  }
  function E(t2, e2, r3, n3, i3) {
    let o2, f2 = 1, s2 = t2.length, u2 = e2.length;
    if (void 0 !== n3 && ("ucs2" === (n3 = String(n3).toLowerCase()) || "ucs-2" === n3 || "utf16le" === n3 || "utf-16le" === n3)) {
      if (t2.length < 2 || e2.length < 2)
        return -1;
      f2 = 2, s2 /= 2, u2 /= 2, r3 /= 2;
    }
    function h2(t3, e3) {
      return 1 === f2 ? t3[e3] : t3.readUInt16BE(e3 * f2);
    }
    if (i3) {
      let n4 = -1;
      for (o2 = r3; o2 < s2; o2++)
        if (h2(t2, o2) === h2(e2, -1 === n4 ? 0 : o2 - n4)) {
          if (-1 === n4 && (n4 = o2), o2 - n4 + 1 === u2)
            return n4 * f2;
        } else
          -1 !== n4 && (o2 -= o2 - n4), n4 = -1;
    } else
      for (r3 + u2 > s2 && (r3 = s2 - u2), o2 = r3; o2 >= 0; o2--) {
        let r4 = true;
        for (let n4 = 0; n4 < u2; n4++)
          if (h2(t2, o2 + n4) !== h2(e2, n4)) {
            r4 = false;
            break;
          }
        if (r4)
          return o2;
      }
    return -1;
  }
  function m(t2, e2, r3, n3) {
    r3 = Number(r3) || 0;
    const i3 = t2.length - r3;
    n3 ? (n3 = Number(n3)) > i3 && (n3 = i3) : n3 = i3;
    const o2 = e2.length;
    let f2;
    for (n3 > o2 / 2 && (n3 = o2 / 2), f2 = 0; f2 < n3; ++f2) {
      const n4 = parseInt(e2.substr(2 * f2, 2), 16);
      if (Z(n4))
        return f2;
      t2[r3 + f2] = n4;
    }
    return f2;
  }
  function B(t2, e2, r3, n3) {
    return X(q(e2, t2.length - r3), t2, r3, n3);
  }
  function I(t2, e2, r3, n3) {
    return X(function(t3) {
      const e3 = [];
      for (let r4 = 0; r4 < t3.length; ++r4)
        e3.push(255 & t3.charCodeAt(r4));
      return e3;
    }(e2), t2, r3, n3);
  }
  function U(t2, e2, r3, n3) {
    return X(W(e2), t2, r3, n3);
  }
  function A(t2, e2, r3, n3) {
    return X(function(t3, e3) {
      let r4, n4, i3;
      const o2 = [];
      for (let f2 = 0; f2 < t3.length && !((e3 -= 2) < 0); ++f2)
        r4 = t3.charCodeAt(f2), n4 = r4 >> 8, i3 = r4 % 256, o2.push(i3), o2.push(n4);
      return o2;
    }(e2, t2.length - r3), t2, r3, n3);
  }
  function v(t2, e2, r3) {
    return 0 === e2 && r3 === t2.length ? n2.fromByteArray(t2) : n2.fromByteArray(t2.slice(e2, r3));
  }
  function T(t2, e2, r3) {
    r3 = Math.min(t2.length, r3);
    const n3 = [];
    let i3 = e2;
    for (; i3 < r3; ) {
      const e3 = t2[i3];
      let o2 = null, f2 = e3 > 239 ? 4 : e3 > 223 ? 3 : e3 > 191 ? 2 : 1;
      if (i3 + f2 <= r3) {
        let r4, n4, s2, u2;
        switch (f2) {
          case 1:
            e3 < 128 && (o2 = e3);
            break;
          case 2:
            r4 = t2[i3 + 1], 128 == (192 & r4) && (u2 = (31 & e3) << 6 | 63 & r4, u2 > 127 && (o2 = u2));
            break;
          case 3:
            r4 = t2[i3 + 1], n4 = t2[i3 + 2], 128 == (192 & r4) && 128 == (192 & n4) && (u2 = (15 & e3) << 12 | (63 & r4) << 6 | 63 & n4, u2 > 2047 && (u2 < 55296 || u2 > 57343) && (o2 = u2));
            break;
          case 4:
            r4 = t2[i3 + 1], n4 = t2[i3 + 2], s2 = t2[i3 + 3], 128 == (192 & r4) && 128 == (192 & n4) && 128 == (192 & s2) && (u2 = (15 & e3) << 18 | (63 & r4) << 12 | (63 & n4) << 6 | 63 & s2, u2 > 65535 && u2 < 1114112 && (o2 = u2));
        }
      }
      null === o2 ? (o2 = 65533, f2 = 1) : o2 > 65535 && (o2 -= 65536, n3.push(o2 >>> 10 & 1023 | 55296), o2 = 56320 | 1023 & o2), n3.push(o2), i3 += f2;
    }
    return function(t3) {
      const e3 = t3.length;
      if (e3 <= R)
        return String.fromCharCode.apply(String, t3);
      let r4 = "", n4 = 0;
      for (; n4 < e3; )
        r4 += String.fromCharCode.apply(String, t3.slice(n4, n4 += R));
      return r4;
    }(n3);
  }
  r2.kMaxLength = f, u.TYPED_ARRAY_SUPPORT = function() {
    try {
      const t2 = new Uint8Array(1), e2 = { foo: function() {
        return 42;
      } };
      return Object.setPrototypeOf(e2, Uint8Array.prototype), Object.setPrototypeOf(t2, e2), 42 === t2.foo();
    } catch (t2) {
      return false;
    }
  }(), u.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(u.prototype, "parent", { enumerable: true, get: function() {
    if (u.isBuffer(this))
      return this.buffer;
  } }), Object.defineProperty(u.prototype, "offset", { enumerable: true, get: function() {
    if (u.isBuffer(this))
      return this.byteOffset;
  } }), u.poolSize = 8192, u.from = function(t2, e2, r3) {
    return h(t2, e2, r3);
  }, Object.setPrototypeOf(u.prototype, Uint8Array.prototype), Object.setPrototypeOf(u, Uint8Array), u.alloc = function(t2, e2, r3) {
    return function(t3, e3, r4) {
      return l(t3), t3 <= 0 ? s(t3) : void 0 !== e3 ? "string" == typeof r4 ? s(t3).fill(e3, r4) : s(t3).fill(e3) : s(t3);
    }(t2, e2, r3);
  }, u.allocUnsafe = function(t2) {
    return c(t2);
  }, u.allocUnsafeSlow = function(t2) {
    return c(t2);
  }, u.isBuffer = function(t2) {
    return null != t2 && true === t2._isBuffer && t2 !== u.prototype;
  }, u.compare = function(t2, e2) {
    if (J(t2, Uint8Array) && (t2 = u.from(t2, t2.offset, t2.byteLength)), J(e2, Uint8Array) && (e2 = u.from(e2, e2.offset, e2.byteLength)), !u.isBuffer(t2) || !u.isBuffer(e2))
      throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
    if (t2 === e2)
      return 0;
    let r3 = t2.length, n3 = e2.length;
    for (let i3 = 0, o2 = Math.min(r3, n3); i3 < o2; ++i3)
      if (t2[i3] !== e2[i3]) {
        r3 = t2[i3], n3 = e2[i3];
        break;
      }
    return r3 < n3 ? -1 : n3 < r3 ? 1 : 0;
  }, u.isEncoding = function(t2) {
    switch (String(t2).toLowerCase()) {
      case "hex":
      case "utf8":
      case "utf-8":
      case "ascii":
      case "latin1":
      case "binary":
      case "base64":
      case "ucs2":
      case "ucs-2":
      case "utf16le":
      case "utf-16le":
        return true;
      default:
        return false;
    }
  }, u.concat = function(t2, e2) {
    if (!Array.isArray(t2))
      throw new TypeError('"list" argument must be an Array of Buffers');
    if (0 === t2.length)
      return u.alloc(0);
    let r3;
    if (void 0 === e2)
      for (e2 = 0, r3 = 0; r3 < t2.length; ++r3)
        e2 += t2[r3].length;
    const n3 = u.allocUnsafe(e2);
    let i3 = 0;
    for (r3 = 0; r3 < t2.length; ++r3) {
      let e3 = t2[r3];
      if (J(e3, Uint8Array))
        i3 + e3.length > n3.length ? (u.isBuffer(e3) || (e3 = u.from(e3)), e3.copy(n3, i3)) : Uint8Array.prototype.set.call(n3, e3, i3);
      else {
        if (!u.isBuffer(e3))
          throw new TypeError('"list" argument must be an Array of Buffers');
        e3.copy(n3, i3);
      }
      i3 += e3.length;
    }
    return n3;
  }, u.byteLength = y, u.prototype._isBuffer = true, u.prototype.swap16 = function() {
    const t2 = this.length;
    if (t2 % 2 != 0)
      throw new RangeError("Buffer size must be a multiple of 16-bits");
    for (let e2 = 0; e2 < t2; e2 += 2)
      d(this, e2, e2 + 1);
    return this;
  }, u.prototype.swap32 = function() {
    const t2 = this.length;
    if (t2 % 4 != 0)
      throw new RangeError("Buffer size must be a multiple of 32-bits");
    for (let e2 = 0; e2 < t2; e2 += 4)
      d(this, e2, e2 + 3), d(this, e2 + 1, e2 + 2);
    return this;
  }, u.prototype.swap64 = function() {
    const t2 = this.length;
    if (t2 % 8 != 0)
      throw new RangeError("Buffer size must be a multiple of 64-bits");
    for (let e2 = 0; e2 < t2; e2 += 8)
      d(this, e2, e2 + 7), d(this, e2 + 1, e2 + 6), d(this, e2 + 2, e2 + 5), d(this, e2 + 3, e2 + 4);
    return this;
  }, u.prototype.toString = function() {
    const t2 = this.length;
    return 0 === t2 ? "" : 0 === arguments.length ? T(this, 0, t2) : w.apply(this, arguments);
  }, u.prototype.toLocaleString = u.prototype.toString, u.prototype.equals = function(t2) {
    if (!u.isBuffer(t2))
      throw new TypeError("Argument must be a Buffer");
    return this === t2 || 0 === u.compare(this, t2);
  }, u.prototype.inspect = function() {
    let t2 = "";
    const e2 = r2.INSPECT_MAX_BYTES;
    return t2 = this.toString("hex", 0, e2).replace(/(.{2})/g, "$1 ").trim(), this.length > e2 && (t2 += " ... "), "<Buffer " + t2 + ">";
  }, o && (u.prototype[o] = u.prototype.inspect), u.prototype.compare = function(t2, e2, r3, n3, i3) {
    if (J(t2, Uint8Array) && (t2 = u.from(t2, t2.offset, t2.byteLength)), !u.isBuffer(t2))
      throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t2);
    if (void 0 === e2 && (e2 = 0), void 0 === r3 && (r3 = t2 ? t2.length : 0), void 0 === n3 && (n3 = 0), void 0 === i3 && (i3 = this.length), e2 < 0 || r3 > t2.length || n3 < 0 || i3 > this.length)
      throw new RangeError("out of range index");
    if (n3 >= i3 && e2 >= r3)
      return 0;
    if (n3 >= i3)
      return -1;
    if (e2 >= r3)
      return 1;
    if (this === t2)
      return 0;
    let o2 = (i3 >>>= 0) - (n3 >>>= 0), f2 = (r3 >>>= 0) - (e2 >>>= 0);
    const s2 = Math.min(o2, f2), h2 = this.slice(n3, i3), l2 = t2.slice(e2, r3);
    for (let t3 = 0; t3 < s2; ++t3)
      if (h2[t3] !== l2[t3]) {
        o2 = h2[t3], f2 = l2[t3];
        break;
      }
    return o2 < f2 ? -1 : f2 < o2 ? 1 : 0;
  }, u.prototype.includes = function(t2, e2, r3) {
    return -1 !== this.indexOf(t2, e2, r3);
  }, u.prototype.indexOf = function(t2, e2, r3) {
    return b(this, t2, e2, r3, true);
  }, u.prototype.lastIndexOf = function(t2, e2, r3) {
    return b(this, t2, e2, r3, false);
  }, u.prototype.write = function(t2, e2, r3, n3) {
    if (void 0 === e2)
      n3 = "utf8", r3 = this.length, e2 = 0;
    else if (void 0 === r3 && "string" == typeof e2)
      n3 = e2, r3 = this.length, e2 = 0;
    else {
      if (!isFinite(e2))
        throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
      e2 >>>= 0, isFinite(r3) ? (r3 >>>= 0, void 0 === n3 && (n3 = "utf8")) : (n3 = r3, r3 = void 0);
    }
    const i3 = this.length - e2;
    if ((void 0 === r3 || r3 > i3) && (r3 = i3), t2.length > 0 && (r3 < 0 || e2 < 0) || e2 > this.length)
      throw new RangeError("Attempt to write outside buffer bounds");
    n3 || (n3 = "utf8");
    let o2 = false;
    for (; ; )
      switch (n3) {
        case "hex":
          return m(this, t2, e2, r3);
        case "utf8":
        case "utf-8":
          return B(this, t2, e2, r3);
        case "ascii":
        case "latin1":
        case "binary":
          return I(this, t2, e2, r3);
        case "base64":
          return U(this, t2, e2, r3);
        case "ucs2":
        case "ucs-2":
        case "utf16le":
        case "utf-16le":
          return A(this, t2, e2, r3);
        default:
          if (o2)
            throw new TypeError("Unknown encoding: " + n3);
          n3 = ("" + n3).toLowerCase(), o2 = true;
      }
  }, u.prototype.toJSON = function() {
    return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };
  };
  const R = 4096;
  function O(t2, e2, r3) {
    let n3 = "";
    r3 = Math.min(t2.length, r3);
    for (let i3 = e2; i3 < r3; ++i3)
      n3 += String.fromCharCode(127 & t2[i3]);
    return n3;
  }
  function S(t2, e2, r3) {
    let n3 = "";
    r3 = Math.min(t2.length, r3);
    for (let i3 = e2; i3 < r3; ++i3)
      n3 += String.fromCharCode(t2[i3]);
    return n3;
  }
  function _(t2, e2, r3) {
    const n3 = t2.length;
    (!e2 || e2 < 0) && (e2 = 0), (!r3 || r3 < 0 || r3 > n3) && (r3 = n3);
    let i3 = "";
    for (let n4 = e2; n4 < r3; ++n4)
      i3 += H[t2[n4]];
    return i3;
  }
  function L(t2, e2, r3) {
    const n3 = t2.slice(e2, r3);
    let i3 = "";
    for (let t3 = 0; t3 < n3.length - 1; t3 += 2)
      i3 += String.fromCharCode(n3[t3] + 256 * n3[t3 + 1]);
    return i3;
  }
  function N(t2, e2, r3) {
    if (t2 % 1 != 0 || t2 < 0)
      throw new RangeError("offset is not uint");
    if (t2 + e2 > r3)
      throw new RangeError("Trying to access beyond buffer length");
  }
  function x(t2, e2, r3, n3, i3, o2) {
    if (!u.isBuffer(t2))
      throw new TypeError('"buffer" argument must be a Buffer instance');
    if (e2 > i3 || e2 < o2)
      throw new RangeError('"value" argument is out of bounds');
    if (r3 + n3 > t2.length)
      throw new RangeError("Index out of range");
  }
  function P(t2, e2, r3, n3, i3) {
    z(e2, n3, i3, t2, r3, 7);
    let o2 = Number(e2 & BigInt(4294967295));
    t2[r3++] = o2, o2 >>= 8, t2[r3++] = o2, o2 >>= 8, t2[r3++] = o2, o2 >>= 8, t2[r3++] = o2;
    let f2 = Number(e2 >> BigInt(32) & BigInt(4294967295));
    return t2[r3++] = f2, f2 >>= 8, t2[r3++] = f2, f2 >>= 8, t2[r3++] = f2, f2 >>= 8, t2[r3++] = f2, r3;
  }
  function $(t2, e2, r3, n3, i3) {
    z(e2, n3, i3, t2, r3, 7);
    let o2 = Number(e2 & BigInt(4294967295));
    t2[r3 + 7] = o2, o2 >>= 8, t2[r3 + 6] = o2, o2 >>= 8, t2[r3 + 5] = o2, o2 >>= 8, t2[r3 + 4] = o2;
    let f2 = Number(e2 >> BigInt(32) & BigInt(4294967295));
    return t2[r3 + 3] = f2, f2 >>= 8, t2[r3 + 2] = f2, f2 >>= 8, t2[r3 + 1] = f2, f2 >>= 8, t2[r3] = f2, r3 + 8;
  }
  function C(t2, e2, r3, n3, i3, o2) {
    if (r3 + n3 > t2.length)
      throw new RangeError("Index out of range");
    if (r3 < 0)
      throw new RangeError("Index out of range");
  }
  function F(t2, e2, r3, n3, o2) {
    return e2 = +e2, r3 >>>= 0, o2 || C(t2, 0, r3, 4), i2.write(t2, e2, r3, n3, 23, 4), r3 + 4;
  }
  function M(t2, e2, r3, n3, o2) {
    return e2 = +e2, r3 >>>= 0, o2 || C(t2, 0, r3, 8), i2.write(t2, e2, r3, n3, 52, 8), r3 + 8;
  }
  u.prototype.slice = function(t2, e2) {
    const r3 = this.length;
    (t2 = ~~t2) < 0 ? (t2 += r3) < 0 && (t2 = 0) : t2 > r3 && (t2 = r3), (e2 = void 0 === e2 ? r3 : ~~e2) < 0 ? (e2 += r3) < 0 && (e2 = 0) : e2 > r3 && (e2 = r3), e2 < t2 && (e2 = t2);
    const n3 = this.subarray(t2, e2);
    return Object.setPrototypeOf(n3, u.prototype), n3;
  }, u.prototype.readUintLE = u.prototype.readUIntLE = function(t2, e2, r3) {
    t2 >>>= 0, e2 >>>= 0, r3 || N(t2, e2, this.length);
    let n3 = this[t2], i3 = 1, o2 = 0;
    for (; ++o2 < e2 && (i3 *= 256); )
      n3 += this[t2 + o2] * i3;
    return n3;
  }, u.prototype.readUintBE = u.prototype.readUIntBE = function(t2, e2, r3) {
    t2 >>>= 0, e2 >>>= 0, r3 || N(t2, e2, this.length);
    let n3 = this[t2 + --e2], i3 = 1;
    for (; e2 > 0 && (i3 *= 256); )
      n3 += this[t2 + --e2] * i3;
    return n3;
  }, u.prototype.readUint8 = u.prototype.readUInt8 = function(t2, e2) {
    return t2 >>>= 0, e2 || N(t2, 1, this.length), this[t2];
  }, u.prototype.readUint16LE = u.prototype.readUInt16LE = function(t2, e2) {
    return t2 >>>= 0, e2 || N(t2, 2, this.length), this[t2] | this[t2 + 1] << 8;
  }, u.prototype.readUint16BE = u.prototype.readUInt16BE = function(t2, e2) {
    return t2 >>>= 0, e2 || N(t2, 2, this.length), this[t2] << 8 | this[t2 + 1];
  }, u.prototype.readUint32LE = u.prototype.readUInt32LE = function(t2, e2) {
    return t2 >>>= 0, e2 || N(t2, 4, this.length), (this[t2] | this[t2 + 1] << 8 | this[t2 + 2] << 16) + 16777216 * this[t2 + 3];
  }, u.prototype.readUint32BE = u.prototype.readUInt32BE = function(t2, e2) {
    return t2 >>>= 0, e2 || N(t2, 4, this.length), 16777216 * this[t2] + (this[t2 + 1] << 16 | this[t2 + 2] << 8 | this[t2 + 3]);
  }, u.prototype.readBigUInt64LE = K(function(t2) {
    V(t2 >>>= 0, "offset");
    const e2 = this[t2], r3 = this[t2 + 7];
    void 0 !== e2 && void 0 !== r3 || D(t2, this.length - 8);
    const n3 = e2 + 256 * this[++t2] + 65536 * this[++t2] + this[++t2] * 2 ** 24, i3 = this[++t2] + 256 * this[++t2] + 65536 * this[++t2] + r3 * 2 ** 24;
    return BigInt(n3) + (BigInt(i3) << BigInt(32));
  }), u.prototype.readBigUInt64BE = K(function(t2) {
    V(t2 >>>= 0, "offset");
    const e2 = this[t2], r3 = this[t2 + 7];
    void 0 !== e2 && void 0 !== r3 || D(t2, this.length - 8);
    const n3 = e2 * 2 ** 24 + 65536 * this[++t2] + 256 * this[++t2] + this[++t2], i3 = this[++t2] * 2 ** 24 + 65536 * this[++t2] + 256 * this[++t2] + r3;
    return (BigInt(n3) << BigInt(32)) + BigInt(i3);
  }), u.prototype.readIntLE = function(t2, e2, r3) {
    t2 >>>= 0, e2 >>>= 0, r3 || N(t2, e2, this.length);
    let n3 = this[t2], i3 = 1, o2 = 0;
    for (; ++o2 < e2 && (i3 *= 256); )
      n3 += this[t2 + o2] * i3;
    return i3 *= 128, n3 >= i3 && (n3 -= Math.pow(2, 8 * e2)), n3;
  }, u.prototype.readIntBE = function(t2, e2, r3) {
    t2 >>>= 0, e2 >>>= 0, r3 || N(t2, e2, this.length);
    let n3 = e2, i3 = 1, o2 = this[t2 + --n3];
    for (; n3 > 0 && (i3 *= 256); )
      o2 += this[t2 + --n3] * i3;
    return i3 *= 128, o2 >= i3 && (o2 -= Math.pow(2, 8 * e2)), o2;
  }, u.prototype.readInt8 = function(t2, e2) {
    return t2 >>>= 0, e2 || N(t2, 1, this.length), 128 & this[t2] ? -1 * (255 - this[t2] + 1) : this[t2];
  }, u.prototype.readInt16LE = function(t2, e2) {
    t2 >>>= 0, e2 || N(t2, 2, this.length);
    const r3 = this[t2] | this[t2 + 1] << 8;
    return 32768 & r3 ? 4294901760 | r3 : r3;
  }, u.prototype.readInt16BE = function(t2, e2) {
    t2 >>>= 0, e2 || N(t2, 2, this.length);
    const r3 = this[t2 + 1] | this[t2] << 8;
    return 32768 & r3 ? 4294901760 | r3 : r3;
  }, u.prototype.readInt32LE = function(t2, e2) {
    return t2 >>>= 0, e2 || N(t2, 4, this.length), this[t2] | this[t2 + 1] << 8 | this[t2 + 2] << 16 | this[t2 + 3] << 24;
  }, u.prototype.readInt32BE = function(t2, e2) {
    return t2 >>>= 0, e2 || N(t2, 4, this.length), this[t2] << 24 | this[t2 + 1] << 16 | this[t2 + 2] << 8 | this[t2 + 3];
  }, u.prototype.readBigInt64LE = K(function(t2) {
    V(t2 >>>= 0, "offset");
    const e2 = this[t2], r3 = this[t2 + 7];
    void 0 !== e2 && void 0 !== r3 || D(t2, this.length - 8);
    const n3 = this[t2 + 4] + 256 * this[t2 + 5] + 65536 * this[t2 + 6] + (r3 << 24);
    return (BigInt(n3) << BigInt(32)) + BigInt(e2 + 256 * this[++t2] + 65536 * this[++t2] + this[++t2] * 2 ** 24);
  }), u.prototype.readBigInt64BE = K(function(t2) {
    V(t2 >>>= 0, "offset");
    const e2 = this[t2], r3 = this[t2 + 7];
    void 0 !== e2 && void 0 !== r3 || D(t2, this.length - 8);
    const n3 = (e2 << 24) + 65536 * this[++t2] + 256 * this[++t2] + this[++t2];
    return (BigInt(n3) << BigInt(32)) + BigInt(this[++t2] * 2 ** 24 + 65536 * this[++t2] + 256 * this[++t2] + r3);
  }), u.prototype.readFloatLE = function(t2, e2) {
    return t2 >>>= 0, e2 || N(t2, 4, this.length), i2.read(this, t2, true, 23, 4);
  }, u.prototype.readFloatBE = function(t2, e2) {
    return t2 >>>= 0, e2 || N(t2, 4, this.length), i2.read(this, t2, false, 23, 4);
  }, u.prototype.readDoubleLE = function(t2, e2) {
    return t2 >>>= 0, e2 || N(t2, 8, this.length), i2.read(this, t2, true, 52, 8);
  }, u.prototype.readDoubleBE = function(t2, e2) {
    return t2 >>>= 0, e2 || N(t2, 8, this.length), i2.read(this, t2, false, 52, 8);
  }, u.prototype.writeUintLE = u.prototype.writeUIntLE = function(t2, e2, r3, n3) {
    if (t2 = +t2, e2 >>>= 0, r3 >>>= 0, !n3) {
      x(this, t2, e2, r3, Math.pow(2, 8 * r3) - 1, 0);
    }
    let i3 = 1, o2 = 0;
    for (this[e2] = 255 & t2; ++o2 < r3 && (i3 *= 256); )
      this[e2 + o2] = t2 / i3 & 255;
    return e2 + r3;
  }, u.prototype.writeUintBE = u.prototype.writeUIntBE = function(t2, e2, r3, n3) {
    if (t2 = +t2, e2 >>>= 0, r3 >>>= 0, !n3) {
      x(this, t2, e2, r3, Math.pow(2, 8 * r3) - 1, 0);
    }
    let i3 = r3 - 1, o2 = 1;
    for (this[e2 + i3] = 255 & t2; --i3 >= 0 && (o2 *= 256); )
      this[e2 + i3] = t2 / o2 & 255;
    return e2 + r3;
  }, u.prototype.writeUint8 = u.prototype.writeUInt8 = function(t2, e2, r3) {
    return t2 = +t2, e2 >>>= 0, r3 || x(this, t2, e2, 1, 255, 0), this[e2] = 255 & t2, e2 + 1;
  }, u.prototype.writeUint16LE = u.prototype.writeUInt16LE = function(t2, e2, r3) {
    return t2 = +t2, e2 >>>= 0, r3 || x(this, t2, e2, 2, 65535, 0), this[e2] = 255 & t2, this[e2 + 1] = t2 >>> 8, e2 + 2;
  }, u.prototype.writeUint16BE = u.prototype.writeUInt16BE = function(t2, e2, r3) {
    return t2 = +t2, e2 >>>= 0, r3 || x(this, t2, e2, 2, 65535, 0), this[e2] = t2 >>> 8, this[e2 + 1] = 255 & t2, e2 + 2;
  }, u.prototype.writeUint32LE = u.prototype.writeUInt32LE = function(t2, e2, r3) {
    return t2 = +t2, e2 >>>= 0, r3 || x(this, t2, e2, 4, 4294967295, 0), this[e2 + 3] = t2 >>> 24, this[e2 + 2] = t2 >>> 16, this[e2 + 1] = t2 >>> 8, this[e2] = 255 & t2, e2 + 4;
  }, u.prototype.writeUint32BE = u.prototype.writeUInt32BE = function(t2, e2, r3) {
    return t2 = +t2, e2 >>>= 0, r3 || x(this, t2, e2, 4, 4294967295, 0), this[e2] = t2 >>> 24, this[e2 + 1] = t2 >>> 16, this[e2 + 2] = t2 >>> 8, this[e2 + 3] = 255 & t2, e2 + 4;
  }, u.prototype.writeBigUInt64LE = K(function(t2, e2 = 0) {
    return P(this, t2, e2, BigInt(0), BigInt("0xffffffffffffffff"));
  }), u.prototype.writeBigUInt64BE = K(function(t2, e2 = 0) {
    return $(this, t2, e2, BigInt(0), BigInt("0xffffffffffffffff"));
  }), u.prototype.writeIntLE = function(t2, e2, r3, n3) {
    if (t2 = +t2, e2 >>>= 0, !n3) {
      const n4 = Math.pow(2, 8 * r3 - 1);
      x(this, t2, e2, r3, n4 - 1, -n4);
    }
    let i3 = 0, o2 = 1, f2 = 0;
    for (this[e2] = 255 & t2; ++i3 < r3 && (o2 *= 256); )
      t2 < 0 && 0 === f2 && 0 !== this[e2 + i3 - 1] && (f2 = 1), this[e2 + i3] = (t2 / o2 | 0) - f2 & 255;
    return e2 + r3;
  }, u.prototype.writeIntBE = function(t2, e2, r3, n3) {
    if (t2 = +t2, e2 >>>= 0, !n3) {
      const n4 = Math.pow(2, 8 * r3 - 1);
      x(this, t2, e2, r3, n4 - 1, -n4);
    }
    let i3 = r3 - 1, o2 = 1, f2 = 0;
    for (this[e2 + i3] = 255 & t2; --i3 >= 0 && (o2 *= 256); )
      t2 < 0 && 0 === f2 && 0 !== this[e2 + i3 + 1] && (f2 = 1), this[e2 + i3] = (t2 / o2 | 0) - f2 & 255;
    return e2 + r3;
  }, u.prototype.writeInt8 = function(t2, e2, r3) {
    return t2 = +t2, e2 >>>= 0, r3 || x(this, t2, e2, 1, 127, -128), t2 < 0 && (t2 = 255 + t2 + 1), this[e2] = 255 & t2, e2 + 1;
  }, u.prototype.writeInt16LE = function(t2, e2, r3) {
    return t2 = +t2, e2 >>>= 0, r3 || x(this, t2, e2, 2, 32767, -32768), this[e2] = 255 & t2, this[e2 + 1] = t2 >>> 8, e2 + 2;
  }, u.prototype.writeInt16BE = function(t2, e2, r3) {
    return t2 = +t2, e2 >>>= 0, r3 || x(this, t2, e2, 2, 32767, -32768), this[e2] = t2 >>> 8, this[e2 + 1] = 255 & t2, e2 + 2;
  }, u.prototype.writeInt32LE = function(t2, e2, r3) {
    return t2 = +t2, e2 >>>= 0, r3 || x(this, t2, e2, 4, 2147483647, -2147483648), this[e2] = 255 & t2, this[e2 + 1] = t2 >>> 8, this[e2 + 2] = t2 >>> 16, this[e2 + 3] = t2 >>> 24, e2 + 4;
  }, u.prototype.writeInt32BE = function(t2, e2, r3) {
    return t2 = +t2, e2 >>>= 0, r3 || x(this, t2, e2, 4, 2147483647, -2147483648), t2 < 0 && (t2 = 4294967295 + t2 + 1), this[e2] = t2 >>> 24, this[e2 + 1] = t2 >>> 16, this[e2 + 2] = t2 >>> 8, this[e2 + 3] = 255 & t2, e2 + 4;
  }, u.prototype.writeBigInt64LE = K(function(t2, e2 = 0) {
    return P(this, t2, e2, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
  }), u.prototype.writeBigInt64BE = K(function(t2, e2 = 0) {
    return $(this, t2, e2, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
  }), u.prototype.writeFloatLE = function(t2, e2, r3) {
    return F(this, t2, e2, true, r3);
  }, u.prototype.writeFloatBE = function(t2, e2, r3) {
    return F(this, t2, e2, false, r3);
  }, u.prototype.writeDoubleLE = function(t2, e2, r3) {
    return M(this, t2, e2, true, r3);
  }, u.prototype.writeDoubleBE = function(t2, e2, r3) {
    return M(this, t2, e2, false, r3);
  }, u.prototype.copy = function(t2, e2, r3, n3) {
    if (!u.isBuffer(t2))
      throw new TypeError("argument should be a Buffer");
    if (r3 || (r3 = 0), n3 || 0 === n3 || (n3 = this.length), e2 >= t2.length && (e2 = t2.length), e2 || (e2 = 0), n3 > 0 && n3 < r3 && (n3 = r3), n3 === r3)
      return 0;
    if (0 === t2.length || 0 === this.length)
      return 0;
    if (e2 < 0)
      throw new RangeError("targetStart out of bounds");
    if (r3 < 0 || r3 >= this.length)
      throw new RangeError("Index out of range");
    if (n3 < 0)
      throw new RangeError("sourceEnd out of bounds");
    n3 > this.length && (n3 = this.length), t2.length - e2 < n3 - r3 && (n3 = t2.length - e2 + r3);
    const i3 = n3 - r3;
    return this === t2 && "function" == typeof Uint8Array.prototype.copyWithin ? this.copyWithin(e2, r3, n3) : Uint8Array.prototype.set.call(t2, this.subarray(r3, n3), e2), i3;
  }, u.prototype.fill = function(t2, e2, r3, n3) {
    if ("string" == typeof t2) {
      if ("string" == typeof e2 ? (n3 = e2, e2 = 0, r3 = this.length) : "string" == typeof r3 && (n3 = r3, r3 = this.length), void 0 !== n3 && "string" != typeof n3)
        throw new TypeError("encoding must be a string");
      if ("string" == typeof n3 && !u.isEncoding(n3))
        throw new TypeError("Unknown encoding: " + n3);
      if (1 === t2.length) {
        const e3 = t2.charCodeAt(0);
        ("utf8" === n3 && e3 < 128 || "latin1" === n3) && (t2 = e3);
      }
    } else
      "number" == typeof t2 ? t2 &= 255 : "boolean" == typeof t2 && (t2 = Number(t2));
    if (e2 < 0 || this.length < e2 || this.length < r3)
      throw new RangeError("Out of range index");
    if (r3 <= e2)
      return this;
    let i3;
    if (e2 >>>= 0, r3 = void 0 === r3 ? this.length : r3 >>> 0, t2 || (t2 = 0), "number" == typeof t2)
      for (i3 = e2; i3 < r3; ++i3)
        this[i3] = t2;
    else {
      const o2 = u.isBuffer(t2) ? t2 : u.from(t2, n3), f2 = o2.length;
      if (0 === f2)
        throw new TypeError('The value "' + t2 + '" is invalid for argument "value"');
      for (i3 = 0; i3 < r3 - e2; ++i3)
        this[i3 + e2] = o2[i3 % f2];
    }
    return this;
  };
  const k = {};
  function j(t2, e2, r3) {
    k[t2] = class extends r3 {
      constructor() {
        super(), Object.defineProperty(this, "message", { value: e2.apply(this, arguments), writable: true, configurable: true }), this.name = `${this.name} [${t2}]`, delete this.name;
      }
      get code() {
        return t2;
      }
      set code(t3) {
        Object.defineProperty(this, "code", { configurable: true, enumerable: true, value: t3, writable: true });
      }
      toString() {
        return `${this.name} [${t2}]: ${this.message}`;
      }
    };
  }
  function Y(t2) {
    let e2 = "", r3 = t2.length;
    const n3 = "-" === t2[0] ? 1 : 0;
    for (; r3 >= n3 + 4; r3 -= 3)
      e2 = `_${t2.slice(r3 - 3, r3)}${e2}`;
    return `${t2.slice(0, r3)}${e2}`;
  }
  function z(t2, e2, r3, n3, i3, o2) {
    if (t2 > r3 || t2 < e2) {
      const n4 = "bigint" == typeof e2 ? "n" : "";
      let i4;
      throw i4 = o2 > 3 ? 0 === e2 || e2 === BigInt(0) ? `>= 0${n4} and < 2${n4} ** ${8 * (o2 + 1)}${n4}` : `>= -(2${n4} ** ${8 * (o2 + 1) - 1}${n4}) and < 2 ** ${8 * (o2 + 1) - 1}${n4}` : `>= ${e2}${n4} and <= ${r3}${n4}`, new k.ERR_OUT_OF_RANGE("value", i4, t2);
    }
    !function(t3, e3, r4) {
      V(e3, "offset"), void 0 !== t3[e3] && void 0 !== t3[e3 + r4] || D(e3, t3.length - (r4 + 1));
    }(n3, i3, o2);
  }
  function V(t2, e2) {
    if ("number" != typeof t2)
      throw new k.ERR_INVALID_ARG_TYPE(e2, "number", t2);
  }
  function D(t2, e2, r3) {
    if (Math.floor(t2) !== t2)
      throw V(t2, r3), new k.ERR_OUT_OF_RANGE(r3 || "offset", "an integer", t2);
    if (e2 < 0)
      throw new k.ERR_BUFFER_OUT_OF_BOUNDS();
    throw new k.ERR_OUT_OF_RANGE(r3 || "offset", `>= ${r3 ? 1 : 0} and <= ${e2}`, t2);
  }
  j("ERR_BUFFER_OUT_OF_BOUNDS", function(t2) {
    return t2 ? `${t2} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
  }, RangeError), j("ERR_INVALID_ARG_TYPE", function(t2, e2) {
    return `The "${t2}" argument must be of type number. Received type ${typeof e2}`;
  }, TypeError), j("ERR_OUT_OF_RANGE", function(t2, e2, r3) {
    let n3 = `The value of "${t2}" is out of range.`, i3 = r3;
    return Number.isInteger(r3) && Math.abs(r3) > 2 ** 32 ? i3 = Y(String(r3)) : "bigint" == typeof r3 && (i3 = String(r3), (r3 > BigInt(2) ** BigInt(32) || r3 < -(BigInt(2) ** BigInt(32))) && (i3 = Y(i3)), i3 += "n"), n3 += ` It must be ${e2}. Received ${i3}`, n3;
  }, RangeError);
  const G = /[^+/0-9A-Za-z-_]/g;
  function q(t2, e2) {
    let r3;
    e2 = e2 || 1 / 0;
    const n3 = t2.length;
    let i3 = null;
    const o2 = [];
    for (let f2 = 0; f2 < n3; ++f2) {
      if (r3 = t2.charCodeAt(f2), r3 > 55295 && r3 < 57344) {
        if (!i3) {
          if (r3 > 56319) {
            (e2 -= 3) > -1 && o2.push(239, 191, 189);
            continue;
          }
          if (f2 + 1 === n3) {
            (e2 -= 3) > -1 && o2.push(239, 191, 189);
            continue;
          }
          i3 = r3;
          continue;
        }
        if (r3 < 56320) {
          (e2 -= 3) > -1 && o2.push(239, 191, 189), i3 = r3;
          continue;
        }
        r3 = 65536 + (i3 - 55296 << 10 | r3 - 56320);
      } else
        i3 && (e2 -= 3) > -1 && o2.push(239, 191, 189);
      if (i3 = null, r3 < 128) {
        if ((e2 -= 1) < 0)
          break;
        o2.push(r3);
      } else if (r3 < 2048) {
        if ((e2 -= 2) < 0)
          break;
        o2.push(r3 >> 6 | 192, 63 & r3 | 128);
      } else if (r3 < 65536) {
        if ((e2 -= 3) < 0)
          break;
        o2.push(r3 >> 12 | 224, r3 >> 6 & 63 | 128, 63 & r3 | 128);
      } else {
        if (!(r3 < 1114112))
          throw new Error("Invalid code point");
        if ((e2 -= 4) < 0)
          break;
        o2.push(r3 >> 18 | 240, r3 >> 12 & 63 | 128, r3 >> 6 & 63 | 128, 63 & r3 | 128);
      }
    }
    return o2;
  }
  function W(t2) {
    return n2.toByteArray(function(t3) {
      if ((t3 = (t3 = t3.split("=")[0]).trim().replace(G, "")).length < 2)
        return "";
      for (; t3.length % 4 != 0; )
        t3 += "=";
      return t3;
    }(t2));
  }
  function X(t2, e2, r3, n3) {
    let i3;
    for (i3 = 0; i3 < n3 && !(i3 + r3 >= e2.length || i3 >= t2.length); ++i3)
      e2[i3 + r3] = t2[i3];
    return i3;
  }
  function J(t2, e2) {
    return t2 instanceof e2 || null != t2 && null != t2.constructor && null != t2.constructor.name && t2.constructor.name === e2.name;
  }
  function Z(t2) {
    return t2 != t2;
  }
  const H = function() {
    const t2 = "0123456789abcdef", e2 = new Array(256);
    for (let r3 = 0; r3 < 16; ++r3) {
      const n3 = 16 * r3;
      for (let i3 = 0; i3 < 16; ++i3)
        e2[n3 + i3] = t2[r3] + t2[i3];
    }
    return e2;
  }();
  function K(t2) {
    return "undefined" == typeof BigInt ? Q : t2;
  }
  function Q() {
    throw new Error("BigInt not supported");
  }
}(i);
export {
  r as S,
  i as b
};
