var ba = Object.create;
var Ye = Object.defineProperty;
var wa = Object.getOwnPropertyDescriptor;
var Sa = Object.getOwnPropertyNames;
var Ea = Object.getPrototypeOf, Pa = Object.prototype.hasOwnProperty;
var o = (t, e) => Ye(t, "name", { value: e, configurable: !0 }), ce = /* @__PURE__ */ ((t) => typeof require < "u" ? require : typeof Proxy <
"u" ? new Proxy(t, {
  get: (e, r) => (typeof require < "u" ? require : e)[r]
}) : t)(function(t) {
  if (typeof require < "u") return require.apply(this, arguments);
  throw Error('Dynamic require of "' + t + '" is not supported');
});
var b = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
var Oa = (t, e, r, n) => {
  if (e && typeof e == "object" || typeof e == "function")
    for (let a of Sa(e))
      !Pa.call(t, a) && a !== r && Ye(t, a, { get: () => e[a], enumerable: !(n = wa(e, a)) || n.enumerable });
  return t;
};
var Xe = (t, e, r) => (r = t != null ? ba(Ea(t)) : {}, Oa(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  e || !t || !t.__esModule ? Ye(r, "default", { value: t, enumerable: !0 }) : r,
  t
));

// ../node_modules/lodash/_freeGlobal.js
var qt = b((Ll, kt) => {
  var xa = typeof global == "object" && global && global.Object === Object && global;
  kt.exports = xa;
});

// ../node_modules/lodash/_root.js
var Bt = b((Ml, Wt) => {
  var Aa = qt(), Ra = typeof self == "object" && self && self.Object === Object && self, Na = Aa || Ra || Function("return this")();
  Wt.exports = Na;
});

// ../node_modules/lodash/_Symbol.js
var Ze = b((Fl, Ut) => {
  var Ia = Bt(), Da = Ia.Symbol;
  Ut.exports = Da;
});

// ../node_modules/lodash/_getRawTag.js
var zt = b(($l, Ht) => {
  var Vt = Ze(), jt = Object.prototype, _a = jt.hasOwnProperty, Ta = jt.toString, fe = Vt ? Vt.toStringTag : void 0;
  function La(t) {
    var e = _a.call(t, fe), r = t[fe];
    try {
      t[fe] = void 0;
      var n = !0;
    } catch {
    }
    var a = Ta.call(t);
    return n && (e ? t[fe] = r : delete t[fe]), a;
  }
  o(La, "getRawTag");
  Ht.exports = La;
});

// ../node_modules/lodash/_objectToString.js
var Qt = b((kl, Gt) => {
  var Ma = Object.prototype, Fa = Ma.toString;
  function $a(t) {
    return Fa.call(t);
  }
  o($a, "objectToString");
  Gt.exports = $a;
});

// ../node_modules/lodash/_baseGetTag.js
var Xt = b((Wl, Yt) => {
  var Kt = Ze(), Ca = zt(), ka = Qt(), qa = "[object Null]", Wa = "[object Undefined]", Jt = Kt ? Kt.toStringTag : void 0;
  function Ba(t) {
    return t == null ? t === void 0 ? Wa : qa : Jt && Jt in Object(t) ? Ca(t) : ka(t);
  }
  o(Ba, "baseGetTag");
  Yt.exports = Ba;
});

// ../node_modules/lodash/_overArg.js
var er = b((Ul, Zt) => {
  function Ua(t, e) {
    return function(r) {
      return t(e(r));
    };
  }
  o(Ua, "overArg");
  Zt.exports = Ua;
});

// ../node_modules/lodash/_getPrototype.js
var rr = b((jl, tr) => {
  var Va = er(), ja = Va(Object.getPrototypeOf, Object);
  tr.exports = ja;
});

// ../node_modules/lodash/isObjectLike.js
var ar = b((Hl, nr) => {
  function Ha(t) {
    return t != null && typeof t == "object";
  }
  o(Ha, "isObjectLike");
  nr.exports = Ha;
});

// ../node_modules/lodash/isPlainObject.js
var lr = b((Gl, ir) => {
  var za = Xt(), Ga = rr(), Qa = ar(), Ka = "[object Object]", Ja = Function.prototype, Ya = Object.prototype, or = Ja.toString, Xa = Ya.hasOwnProperty,
  Za = or.call(Object);
  function eo(t) {
    if (!Qa(t) || za(t) != Ka)
      return !1;
    var e = Ga(t);
    if (e === null)
      return !0;
    var r = Xa.call(e, "constructor") && e.constructor;
    return typeof r == "function" && r instanceof r && or.call(r) == Za;
  }
  o(eo, "isPlainObject");
  ir.exports = eo;
});

// ../node_modules/memoizerific/memoizerific.js
var ur = b((sr, et) => {
  (function(t) {
    if (typeof sr == "object" && typeof et < "u")
      et.exports = t();
    else if (typeof define == "function" && define.amd)
      define([], t);
    else {
      var e;
      typeof window < "u" ? e = window : typeof global < "u" ? e = global : typeof self < "u" ? e = self : e = this, e.memoizerific = t();
    }
  })(function() {
    var t, e, r;
    return (/* @__PURE__ */ o(function n(a, i, l) {
      function u(c, y) {
        if (!i[c]) {
          if (!a[c]) {
            var f = typeof ce == "function" && ce;
            if (!y && f) return f(c, !0);
            if (s) return s(c, !0);
            var d = new Error("Cannot find module '" + c + "'");
            throw d.code = "MODULE_NOT_FOUND", d;
          }
          var h = i[c] = { exports: {} };
          a[c][0].call(h.exports, function(m) {
            var S = a[c][1][m];
            return u(S || m);
          }, h, h.exports, n, a, i, l);
        }
        return i[c].exports;
      }
      o(u, "s");
      for (var s = typeof ce == "function" && ce, p = 0; p < l.length; p++) u(l[p]);
      return u;
    }, "e"))({ 1: [function(n, a, i) {
      a.exports = function(l) {
        if (typeof Map != "function" || l) {
          var u = n("./similar");
          return new u();
        } else
          return /* @__PURE__ */ new Map();
      };
    }, { "./similar": 2 }], 2: [function(n, a, i) {
      function l() {
        return this.list = [], this.lastItem = void 0, this.size = 0, this;
      }
      o(l, "Similar"), l.prototype.get = function(u) {
        var s;
        if (this.lastItem && this.isEqual(this.lastItem.key, u))
          return this.lastItem.val;
        if (s = this.indexOf(u), s >= 0)
          return this.lastItem = this.list[s], this.list[s].val;
      }, l.prototype.set = function(u, s) {
        var p;
        return this.lastItem && this.isEqual(this.lastItem.key, u) ? (this.lastItem.val = s, this) : (p = this.indexOf(u), p >= 0 ? (this.lastItem =
        this.list[p], this.list[p].val = s, this) : (this.lastItem = { key: u, val: s }, this.list.push(this.lastItem), this.size++, this));
      }, l.prototype.delete = function(u) {
        var s;
        if (this.lastItem && this.isEqual(this.lastItem.key, u) && (this.lastItem = void 0), s = this.indexOf(u), s >= 0)
          return this.size--, this.list.splice(s, 1)[0];
      }, l.prototype.has = function(u) {
        var s;
        return this.lastItem && this.isEqual(this.lastItem.key, u) ? !0 : (s = this.indexOf(u), s >= 0 ? (this.lastItem = this.list[s], !0) :
        !1);
      }, l.prototype.forEach = function(u, s) {
        var p;
        for (p = 0; p < this.size; p++)
          u.call(s || this, this.list[p].val, this.list[p].key, this);
      }, l.prototype.indexOf = function(u) {
        var s;
        for (s = 0; s < this.size; s++)
          if (this.isEqual(this.list[s].key, u))
            return s;
        return -1;
      }, l.prototype.isEqual = function(u, s) {
        return u === s || u !== u && s !== s;
      }, a.exports = l;
    }, {}], 3: [function(n, a, i) {
      var l = n("map-or-similar");
      a.exports = function(c) {
        var y = new l(!1), f = [];
        return function(d) {
          var h = /* @__PURE__ */ o(function() {
            var m = y, S, N, P = arguments.length - 1, g = Array(P + 1), I = !0, O;
            if ((h.numArgs || h.numArgs === 0) && h.numArgs !== P + 1)
              throw new Error("Memoizerific functions should always be called with the same number of arguments");
            for (O = 0; O < P; O++) {
              if (g[O] = {
                cacheItem: m,
                arg: arguments[O]
              }, m.has(arguments[O])) {
                m = m.get(arguments[O]);
                continue;
              }
              I = !1, S = new l(!1), m.set(arguments[O], S), m = S;
            }
            return I && (m.has(arguments[P]) ? N = m.get(arguments[P]) : I = !1), I || (N = d.apply(null, arguments), m.set(arguments[P], N)),
            c > 0 && (g[P] = {
              cacheItem: m,
              arg: arguments[P]
            }, I ? u(f, g) : f.push(g), f.length > c && s(f.shift())), h.wasMemoized = I, h.numArgs = P + 1, N;
          }, "memoizerific");
          return h.limit = c, h.wasMemoized = !1, h.cache = y, h.lru = f, h;
        };
      };
      function u(c, y) {
        var f = c.length, d = y.length, h, m, S;
        for (m = 0; m < f; m++) {
          for (h = !0, S = 0; S < d; S++)
            if (!p(c[m][S].arg, y[S].arg)) {
              h = !1;
              break;
            }
          if (h)
            break;
        }
        c.push(c.splice(m, 1)[0]);
      }
      o(u, "moveToMostRecentLru");
      function s(c) {
        var y = c.length, f = c[y - 1], d, h;
        for (f.cacheItem.delete(f.arg), h = y - 2; h >= 0 && (f = c[h], d = f.cacheItem.get(f.arg), !d || !d.size); h--)
          f.cacheItem.delete(f.arg);
      }
      o(s, "removeCachedResult");
      function p(c, y) {
        return c === y || c !== c && y !== y;
      }
      o(p, "isEqual");
    }, { "map-or-similar": 1 }] }, {}, [3])(3);
  });
});

// ../node_modules/es-errors/index.js
var fr = b((Jl, cr) => {
  "use strict";
  cr.exports = Error;
});

// ../node_modules/es-errors/eval.js
var yr = b((Yl, pr) => {
  "use strict";
  pr.exports = EvalError;
});

// ../node_modules/es-errors/range.js
var dr = b((Xl, hr) => {
  "use strict";
  hr.exports = RangeError;
});

// ../node_modules/es-errors/ref.js
var vr = b((Zl, mr) => {
  "use strict";
  mr.exports = ReferenceError;
});

// ../node_modules/es-errors/syntax.js
var tt = b((es, gr) => {
  "use strict";
  gr.exports = SyntaxError;
});

// ../node_modules/es-errors/type.js
var X = b((ts, br) => {
  "use strict";
  br.exports = TypeError;
});

// ../node_modules/es-errors/uri.js
var Sr = b((rs, wr) => {
  "use strict";
  wr.exports = URIError;
});

// ../node_modules/has-symbols/shams.js
var Pr = b((ns, Er) => {
  "use strict";
  Er.exports = /* @__PURE__ */ o(function() {
    if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
      return !1;
    if (typeof Symbol.iterator == "symbol")
      return !0;
    var e = {}, r = Symbol("test"), n = Object(r);
    if (typeof r == "string" || Object.prototype.toString.call(r) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Sy\
mbol]")
      return !1;
    var a = 42;
    e[r] = a;
    for (r in e)
      return !1;
    if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(
    e).length !== 0)
      return !1;
    var i = Object.getOwnPropertySymbols(e);
    if (i.length !== 1 || i[0] !== r || !Object.prototype.propertyIsEnumerable.call(e, r))
      return !1;
    if (typeof Object.getOwnPropertyDescriptor == "function") {
      var l = Object.getOwnPropertyDescriptor(e, r);
      if (l.value !== a || l.enumerable !== !0)
        return !1;
    }
    return !0;
  }, "hasSymbols");
});

// ../node_modules/has-symbols/index.js
var Ar = b((os, xr) => {
  "use strict";
  var Or = typeof Symbol < "u" && Symbol, to = Pr();
  xr.exports = /* @__PURE__ */ o(function() {
    return typeof Or != "function" || typeof Symbol != "function" || typeof Or("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
    to();
  }, "hasNativeSymbols");
});

// ../node_modules/has-proto/index.js
var Nr = b((ls, Rr) => {
  "use strict";
  var rt = {
    __proto__: null,
    foo: {}
  }, ro = Object;
  Rr.exports = /* @__PURE__ */ o(function() {
    return { __proto__: rt }.foo === rt.foo && !(rt instanceof ro);
  }, "hasProto");
});

// ../node_modules/function-bind/implementation.js
var _r = b((us, Dr) => {
  "use strict";
  var no = "Function.prototype.bind called on incompatible ", ao = Object.prototype.toString, oo = Math.max, io = "[object Function]", Ir = /* @__PURE__ */ o(
  function(e, r) {
    for (var n = [], a = 0; a < e.length; a += 1)
      n[a] = e[a];
    for (var i = 0; i < r.length; i += 1)
      n[i + e.length] = r[i];
    return n;
  }, "concatty"), lo = /* @__PURE__ */ o(function(e, r) {
    for (var n = [], a = r || 0, i = 0; a < e.length; a += 1, i += 1)
      n[i] = e[a];
    return n;
  }, "slicy"), so = /* @__PURE__ */ o(function(t, e) {
    for (var r = "", n = 0; n < t.length; n += 1)
      r += t[n], n + 1 < t.length && (r += e);
    return r;
  }, "joiny");
  Dr.exports = /* @__PURE__ */ o(function(e) {
    var r = this;
    if (typeof r != "function" || ao.apply(r) !== io)
      throw new TypeError(no + r);
    for (var n = lo(arguments, 1), a, i = /* @__PURE__ */ o(function() {
      if (this instanceof a) {
        var c = r.apply(
          this,
          Ir(n, arguments)
        );
        return Object(c) === c ? c : this;
      }
      return r.apply(
        e,
        Ir(n, arguments)
      );
    }, "binder"), l = oo(0, r.length - n.length), u = [], s = 0; s < l; s++)
      u[s] = "$" + s;
    if (a = Function("binder", "return function (" + so(u, ",") + "){ return binder.apply(this,arguments); }")(i), r.prototype) {
      var p = /* @__PURE__ */ o(function() {
      }, "Empty");
      p.prototype = r.prototype, a.prototype = new p(), p.prototype = null;
    }
    return a;
  }, "bind");
});

// ../node_modules/function-bind/index.js
var Ae = b((fs, Tr) => {
  "use strict";
  var uo = _r();
  Tr.exports = Function.prototype.bind || uo;
});

// ../node_modules/hasown/index.js
var Mr = b((ps, Lr) => {
  "use strict";
  var co = Function.prototype.call, fo = Object.prototype.hasOwnProperty, po = Ae();
  Lr.exports = po.call(co, fo);
});

// ../node_modules/get-intrinsic/index.js
var K = b((ys, qr) => {
  "use strict";
  var w, yo = fr(), ho = yr(), mo = dr(), vo = vr(), re = tt(), te = X(), go = Sr(), kr = Function, nt = /* @__PURE__ */ o(function(t) {
    try {
      return kr('"use strict"; return (' + t + ").constructor;")();
    } catch {
    }
  }, "getEvalledConstructor"), G = Object.getOwnPropertyDescriptor;
  if (G)
    try {
      G({}, "");
    } catch {
      G = null;
    }
  var at = /* @__PURE__ */ o(function() {
    throw new te();
  }, "throwTypeError"), bo = G ? function() {
    try {
      return arguments.callee, at;
    } catch {
      try {
        return G(arguments, "callee").get;
      } catch {
        return at;
      }
    }
  }() : at, Z = Ar()(), wo = Nr()(), _ = Object.getPrototypeOf || (wo ? function(t) {
    return t.__proto__;
  } : null), ee = {}, So = typeof Uint8Array > "u" || !_ ? w : _(Uint8Array), Q = {
    __proto__: null,
    "%AggregateError%": typeof AggregateError > "u" ? w : AggregateError,
    "%Array%": Array,
    "%ArrayBuffer%": typeof ArrayBuffer > "u" ? w : ArrayBuffer,
    "%ArrayIteratorPrototype%": Z && _ ? _([][Symbol.iterator]()) : w,
    "%AsyncFromSyncIteratorPrototype%": w,
    "%AsyncFunction%": ee,
    "%AsyncGenerator%": ee,
    "%AsyncGeneratorFunction%": ee,
    "%AsyncIteratorPrototype%": ee,
    "%Atomics%": typeof Atomics > "u" ? w : Atomics,
    "%BigInt%": typeof BigInt > "u" ? w : BigInt,
    "%BigInt64Array%": typeof BigInt64Array > "u" ? w : BigInt64Array,
    "%BigUint64Array%": typeof BigUint64Array > "u" ? w : BigUint64Array,
    "%Boolean%": Boolean,
    "%DataView%": typeof DataView > "u" ? w : DataView,
    "%Date%": Date,
    "%decodeURI%": decodeURI,
    "%decodeURIComponent%": decodeURIComponent,
    "%encodeURI%": encodeURI,
    "%encodeURIComponent%": encodeURIComponent,
    "%Error%": yo,
    "%eval%": eval,
    // eslint-disable-line no-eval
    "%EvalError%": ho,
    "%Float32Array%": typeof Float32Array > "u" ? w : Float32Array,
    "%Float64Array%": typeof Float64Array > "u" ? w : Float64Array,
    "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? w : FinalizationRegistry,
    "%Function%": kr,
    "%GeneratorFunction%": ee,
    "%Int8Array%": typeof Int8Array > "u" ? w : Int8Array,
    "%Int16Array%": typeof Int16Array > "u" ? w : Int16Array,
    "%Int32Array%": typeof Int32Array > "u" ? w : Int32Array,
    "%isFinite%": isFinite,
    "%isNaN%": isNaN,
    "%IteratorPrototype%": Z && _ ? _(_([][Symbol.iterator]())) : w,
    "%JSON%": typeof JSON == "object" ? JSON : w,
    "%Map%": typeof Map > "u" ? w : Map,
    "%MapIteratorPrototype%": typeof Map > "u" || !Z || !_ ? w : _((/* @__PURE__ */ new Map())[Symbol.iterator]()),
    "%Math%": Math,
    "%Number%": Number,
    "%Object%": Object,
    "%parseFloat%": parseFloat,
    "%parseInt%": parseInt,
    "%Promise%": typeof Promise > "u" ? w : Promise,
    "%Proxy%": typeof Proxy > "u" ? w : Proxy,
    "%RangeError%": mo,
    "%ReferenceError%": vo,
    "%Reflect%": typeof Reflect > "u" ? w : Reflect,
    "%RegExp%": RegExp,
    "%Set%": typeof Set > "u" ? w : Set,
    "%SetIteratorPrototype%": typeof Set > "u" || !Z || !_ ? w : _((/* @__PURE__ */ new Set())[Symbol.iterator]()),
    "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? w : SharedArrayBuffer,
    "%String%": String,
    "%StringIteratorPrototype%": Z && _ ? _(""[Symbol.iterator]()) : w,
    "%Symbol%": Z ? Symbol : w,
    "%SyntaxError%": re,
    "%ThrowTypeError%": bo,
    "%TypedArray%": So,
    "%TypeError%": te,
    "%Uint8Array%": typeof Uint8Array > "u" ? w : Uint8Array,
    "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? w : Uint8ClampedArray,
    "%Uint16Array%": typeof Uint16Array > "u" ? w : Uint16Array,
    "%Uint32Array%": typeof Uint32Array > "u" ? w : Uint32Array,
    "%URIError%": go,
    "%WeakMap%": typeof WeakMap > "u" ? w : WeakMap,
    "%WeakRef%": typeof WeakRef > "u" ? w : WeakRef,
    "%WeakSet%": typeof WeakSet > "u" ? w : WeakSet
  };
  if (_)
    try {
      null.error;
    } catch (t) {
      Fr = _(_(t)), Q["%Error.prototype%"] = Fr;
    }
  var Fr, Eo = /* @__PURE__ */ o(function t(e) {
    var r;
    if (e === "%AsyncFunction%")
      r = nt("async function () {}");
    else if (e === "%GeneratorFunction%")
      r = nt("function* () {}");
    else if (e === "%AsyncGeneratorFunction%")
      r = nt("async function* () {}");
    else if (e === "%AsyncGenerator%") {
      var n = t("%AsyncGeneratorFunction%");
      n && (r = n.prototype);
    } else if (e === "%AsyncIteratorPrototype%") {
      var a = t("%AsyncGenerator%");
      a && _ && (r = _(a.prototype));
    }
    return Q[e] = r, r;
  }, "doEval"), $r = {
    __proto__: null,
    "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
    "%ArrayPrototype%": ["Array", "prototype"],
    "%ArrayProto_entries%": ["Array", "prototype", "entries"],
    "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
    "%ArrayProto_keys%": ["Array", "prototype", "keys"],
    "%ArrayProto_values%": ["Array", "prototype", "values"],
    "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
    "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
    "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
    "%BooleanPrototype%": ["Boolean", "prototype"],
    "%DataViewPrototype%": ["DataView", "prototype"],
    "%DatePrototype%": ["Date", "prototype"],
    "%ErrorPrototype%": ["Error", "prototype"],
    "%EvalErrorPrototype%": ["EvalError", "prototype"],
    "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
    "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
    "%FunctionPrototype%": ["Function", "prototype"],
    "%Generator%": ["GeneratorFunction", "prototype"],
    "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
    "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
    "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
    "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
    "%JSONParse%": ["JSON", "parse"],
    "%JSONStringify%": ["JSON", "stringify"],
    "%MapPrototype%": ["Map", "prototype"],
    "%NumberPrototype%": ["Number", "prototype"],
    "%ObjectPrototype%": ["Object", "prototype"],
    "%ObjProto_toString%": ["Object", "prototype", "toString"],
    "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
    "%PromisePrototype%": ["Promise", "prototype"],
    "%PromiseProto_then%": ["Promise", "prototype", "then"],
    "%Promise_all%": ["Promise", "all"],
    "%Promise_reject%": ["Promise", "reject"],
    "%Promise_resolve%": ["Promise", "resolve"],
    "%RangeErrorPrototype%": ["RangeError", "prototype"],
    "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
    "%RegExpPrototype%": ["RegExp", "prototype"],
    "%SetPrototype%": ["Set", "prototype"],
    "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
    "%StringPrototype%": ["String", "prototype"],
    "%SymbolPrototype%": ["Symbol", "prototype"],
    "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
    "%TypedArrayPrototype%": ["TypedArray", "prototype"],
    "%TypeErrorPrototype%": ["TypeError", "prototype"],
    "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
    "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
    "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
    "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
    "%URIErrorPrototype%": ["URIError", "prototype"],
    "%WeakMapPrototype%": ["WeakMap", "prototype"],
    "%WeakSetPrototype%": ["WeakSet", "prototype"]
  }, pe = Ae(), Re = Mr(), Po = pe.call(Function.call, Array.prototype.concat), Oo = pe.call(Function.apply, Array.prototype.splice), Cr = pe.
  call(Function.call, String.prototype.replace), Ne = pe.call(Function.call, String.prototype.slice), xo = pe.call(Function.call, RegExp.prototype.
  exec), Ao = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Ro = /\\(\\)?/g, No = /* @__PURE__ */ o(
  function(e) {
    var r = Ne(e, 0, 1), n = Ne(e, -1);
    if (r === "%" && n !== "%")
      throw new re("invalid intrinsic syntax, expected closing `%`");
    if (n === "%" && r !== "%")
      throw new re("invalid intrinsic syntax, expected opening `%`");
    var a = [];
    return Cr(e, Ao, function(i, l, u, s) {
      a[a.length] = u ? Cr(s, Ro, "$1") : l || i;
    }), a;
  }, "stringToPath"), Io = /* @__PURE__ */ o(function(e, r) {
    var n = e, a;
    if (Re($r, n) && (a = $r[n], n = "%" + a[0] + "%"), Re(Q, n)) {
      var i = Q[n];
      if (i === ee && (i = Eo(n)), typeof i > "u" && !r)
        throw new te("intrinsic " + e + " exists, but is not available. Please file an issue!");
      return {
        alias: a,
        name: n,
        value: i
      };
    }
    throw new re("intrinsic " + e + " does not exist!");
  }, "getBaseIntrinsic");
  qr.exports = /* @__PURE__ */ o(function(e, r) {
    if (typeof e != "string" || e.length === 0)
      throw new te("intrinsic name must be a non-empty string");
    if (arguments.length > 1 && typeof r != "boolean")
      throw new te('"allowMissing" argument must be a boolean');
    if (xo(/^%?[^%]*%?$/, e) === null)
      throw new re("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
    var n = No(e), a = n.length > 0 ? n[0] : "", i = Io("%" + a + "%", r), l = i.name, u = i.value, s = !1, p = i.alias;
    p && (a = p[0], Oo(n, Po([0, 1], p)));
    for (var c = 1, y = !0; c < n.length; c += 1) {
      var f = n[c], d = Ne(f, 0, 1), h = Ne(f, -1);
      if ((d === '"' || d === "'" || d === "`" || h === '"' || h === "'" || h === "`") && d !== h)
        throw new re("property names with quotes must have matching quotes");
      if ((f === "constructor" || !y) && (s = !0), a += "." + f, l = "%" + a + "%", Re(Q, l))
        u = Q[l];
      else if (u != null) {
        if (!(f in u)) {
          if (!r)
            throw new te("base intrinsic for " + e + " exists, but the property is not available.");
          return;
        }
        if (G && c + 1 >= n.length) {
          var m = G(u, f);
          y = !!m, y && "get" in m && !("originalValue" in m.get) ? u = m.get : u = u[f];
        } else
          y = Re(u, f), u = u[f];
        y && !s && (Q[l] = u);
      }
    }
    return u;
  }, "GetIntrinsic");
});

// ../node_modules/es-define-property/index.js
var De = b((ds, Wr) => {
  "use strict";
  var Do = K(), Ie = Do("%Object.defineProperty%", !0) || !1;
  if (Ie)
    try {
      Ie({}, "a", { value: 1 });
    } catch {
      Ie = !1;
    }
  Wr.exports = Ie;
});

// ../node_modules/gopd/index.js
var ot = b((ms, Br) => {
  "use strict";
  var _o = K(), _e = _o("%Object.getOwnPropertyDescriptor%", !0);
  if (_e)
    try {
      _e([], "length");
    } catch {
      _e = null;
    }
  Br.exports = _e;
});

// ../node_modules/define-data-property/index.js
var Hr = b((vs, jr) => {
  "use strict";
  var Ur = De(), To = tt(), ne = X(), Vr = ot();
  jr.exports = /* @__PURE__ */ o(function(e, r, n) {
    if (!e || typeof e != "object" && typeof e != "function")
      throw new ne("`obj` must be an object or a function`");
    if (typeof r != "string" && typeof r != "symbol")
      throw new ne("`property` must be a string or a symbol`");
    if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
      throw new ne("`nonEnumerable`, if provided, must be a boolean or null");
    if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
      throw new ne("`nonWritable`, if provided, must be a boolean or null");
    if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
      throw new ne("`nonConfigurable`, if provided, must be a boolean or null");
    if (arguments.length > 6 && typeof arguments[6] != "boolean")
      throw new ne("`loose`, if provided, must be a boolean");
    var a = arguments.length > 3 ? arguments[3] : null, i = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] :
    null, u = arguments.length > 6 ? arguments[6] : !1, s = !!Vr && Vr(e, r);
    if (Ur)
      Ur(e, r, {
        configurable: l === null && s ? s.configurable : !l,
        enumerable: a === null && s ? s.enumerable : !a,
        value: n,
        writable: i === null && s ? s.writable : !i
      });
    else if (u || !a && !i && !l)
      e[r] = n;
    else
      throw new To("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
  }, "defineDataProperty");
});

// ../node_modules/has-property-descriptors/index.js
var Qr = b((bs, Gr) => {
  "use strict";
  var it = De(), zr = /* @__PURE__ */ o(function() {
    return !!it;
  }, "hasPropertyDescriptors");
  zr.hasArrayLengthDefineBug = /* @__PURE__ */ o(function() {
    if (!it)
      return null;
    try {
      return it([], "length", { value: 1 }).length !== 1;
    } catch {
      return !0;
    }
  }, "hasArrayLengthDefineBug");
  Gr.exports = zr;
});

// ../node_modules/set-function-length/index.js
var Zr = b((Ss, Xr) => {
  "use strict";
  var Lo = K(), Kr = Hr(), Mo = Qr()(), Jr = ot(), Yr = X(), Fo = Lo("%Math.floor%");
  Xr.exports = /* @__PURE__ */ o(function(e, r) {
    if (typeof e != "function")
      throw new Yr("`fn` is not a function");
    if (typeof r != "number" || r < 0 || r > 4294967295 || Fo(r) !== r)
      throw new Yr("`length` must be a positive 32-bit integer");
    var n = arguments.length > 2 && !!arguments[2], a = !0, i = !0;
    if ("length" in e && Jr) {
      var l = Jr(e, "length");
      l && !l.configurable && (a = !1), l && !l.writable && (i = !1);
    }
    return (a || i || !n) && (Mo ? Kr(
      /** @type {Parameters<define>[0]} */
      e,
      "length",
      r,
      !0,
      !0
    ) : Kr(
      /** @type {Parameters<define>[0]} */
      e,
      "length",
      r
    )), e;
  }, "setFunctionLength");
});

// ../node_modules/call-bind/index.js
var on = b((Ps, Te) => {
  "use strict";
  var lt = Ae(), Le = K(), $o = Zr(), Co = X(), rn = Le("%Function.prototype.apply%"), nn = Le("%Function.prototype.call%"), an = Le("%Refle\
ct.apply%", !0) || lt.call(nn, rn), en = De(), ko = Le("%Math.max%");
  Te.exports = /* @__PURE__ */ o(function(e) {
    if (typeof e != "function")
      throw new Co("a function is required");
    var r = an(lt, nn, arguments);
    return $o(
      r,
      1 + ko(0, e.length - (arguments.length - 1)),
      !0
    );
  }, "callBind");
  var tn = /* @__PURE__ */ o(function() {
    return an(lt, rn, arguments);
  }, "applyBind");
  en ? en(Te.exports, "apply", { value: tn }) : Te.exports.apply = tn;
});

// ../node_modules/call-bind/callBound.js
var cn = b((xs, un) => {
  "use strict";
  var ln = K(), sn = on(), qo = sn(ln("String.prototype.indexOf"));
  un.exports = /* @__PURE__ */ o(function(e, r) {
    var n = ln(e, !!r);
    return typeof n == "function" && qo(e, ".prototype.") > -1 ? sn(n) : n;
  }, "callBoundIntrinsic");
});

// (disabled):../node_modules/object-inspect/util.inspect
var fn = b(() => {
});

// ../node_modules/object-inspect/index.js
var _n = b((Is, Dn) => {
  var vt = typeof Map == "function" && Map.prototype, st = Object.getOwnPropertyDescriptor && vt ? Object.getOwnPropertyDescriptor(Map.prototype,
  "size") : null, Fe = vt && st && typeof st.get == "function" ? st.get : null, pn = vt && Map.prototype.forEach, gt = typeof Set == "functi\
on" && Set.prototype, ut = Object.getOwnPropertyDescriptor && gt ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, $e = gt &&
  ut && typeof ut.get == "function" ? ut.get : null, yn = gt && Set.prototype.forEach, Wo = typeof WeakMap == "function" && WeakMap.prototype,
  he = Wo ? WeakMap.prototype.has : null, Bo = typeof WeakSet == "function" && WeakSet.prototype, de = Bo ? WeakSet.prototype.has : null, Uo = typeof WeakRef ==
  "function" && WeakRef.prototype, hn = Uo ? WeakRef.prototype.deref : null, Vo = Boolean.prototype.valueOf, jo = Object.prototype.toString,
  Ho = Function.prototype.toString, zo = String.prototype.match, bt = String.prototype.slice, U = String.prototype.replace, Go = String.prototype.
  toUpperCase, dn = String.prototype.toLowerCase, On = RegExp.prototype.test, mn = Array.prototype.concat, C = Array.prototype.join, Qo = Array.
  prototype.slice, vn = Math.floor, pt = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, ct = Object.getOwnPropertySymbols, yt = typeof Symbol ==
  "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, ae = typeof Symbol == "function" && typeof Symbol.iterator ==
  "object", L = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === ae || !0) ? Symbol.toStringTag : null, xn = Object.
  prototype.propertyIsEnumerable, gn = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.
  prototype ? function(t) {
    return t.__proto__;
  } : null);
  function bn(t, e) {
    if (t === 1 / 0 || t === -1 / 0 || t !== t || t && t > -1e3 && t < 1e3 || On.call(/e/, e))
      return e;
    var r = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
    if (typeof t == "number") {
      var n = t < 0 ? -vn(-t) : vn(t);
      if (n !== t) {
        var a = String(n), i = bt.call(e, a.length + 1);
        return U.call(a, r, "$&_") + "." + U.call(U.call(i, /([0-9]{3})/g, "$&_"), /_$/, "");
      }
    }
    return U.call(e, r, "$&_");
  }
  o(bn, "addNumericSeparator");
  var ht = fn(), wn = ht.custom, Sn = Rn(wn) ? wn : null;
  Dn.exports = /* @__PURE__ */ o(function t(e, r, n, a) {
    var i = r || {};
    if (B(i, "quoteStyle") && i.quoteStyle !== "single" && i.quoteStyle !== "double")
      throw new TypeError('option "quoteStyle" must be "single" or "double"');
    if (B(i, "maxStringLength") && (typeof i.maxStringLength == "number" ? i.maxStringLength < 0 && i.maxStringLength !== 1 / 0 : i.maxStringLength !==
    null))
      throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
    var l = B(i, "customInspect") ? i.customInspect : !0;
    if (typeof l != "boolean" && l !== "symbol")
      throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
    if (B(i, "indent") && i.indent !== null && i.indent !== "	" && !(parseInt(i.indent, 10) === i.indent && i.indent > 0))
      throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
    if (B(i, "numericSeparator") && typeof i.numericSeparator != "boolean")
      throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
    var u = i.numericSeparator;
    if (typeof e > "u")
      return "undefined";
    if (e === null)
      return "null";
    if (typeof e == "boolean")
      return e ? "true" : "false";
    if (typeof e == "string")
      return In(e, i);
    if (typeof e == "number") {
      if (e === 0)
        return 1 / 0 / e > 0 ? "0" : "-0";
      var s = String(e);
      return u ? bn(e, s) : s;
    }
    if (typeof e == "bigint") {
      var p = String(e) + "n";
      return u ? bn(e, p) : p;
    }
    var c = typeof i.depth > "u" ? 5 : i.depth;
    if (typeof n > "u" && (n = 0), n >= c && c > 0 && typeof e == "object")
      return dt(e) ? "[Array]" : "[Object]";
    var y = pi(i, n);
    if (typeof a > "u")
      a = [];
    else if (Nn(a, e) >= 0)
      return "[Circular]";
    function f(M, $, W) {
      if ($ && (a = Qo.call(a), a.push($)), W) {
        var ue = {
          depth: i.depth
        };
        return B(i, "quoteStyle") && (ue.quoteStyle = i.quoteStyle), t(M, ue, n + 1, a);
      }
      return t(M, i, n + 1, a);
    }
    if (o(f, "inspect"), typeof e == "function" && !En(e)) {
      var d = ni(e), h = Me(e, f);
      return "[Function" + (d ? ": " + d : " (anonymous)") + "]" + (h.length > 0 ? " { " + C.call(h, ", ") + " }" : "");
    }
    if (Rn(e)) {
      var m = ae ? U.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : yt.call(e);
      return typeof e == "object" && !ae ? ye(m) : m;
    }
    if (ui(e)) {
      for (var S = "<" + dn.call(String(e.nodeName)), N = e.attributes || [], P = 0; P < N.length; P++)
        S += " " + N[P].name + "=" + An(Ko(N[P].value), "double", i);
      return S += ">", e.childNodes && e.childNodes.length && (S += "..."), S += "</" + dn.call(String(e.nodeName)) + ">", S;
    }
    if (dt(e)) {
      if (e.length === 0)
        return "[]";
      var g = Me(e, f);
      return y && !fi(g) ? "[" + mt(g, y) + "]" : "[ " + C.call(g, ", ") + " ]";
    }
    if (Yo(e)) {
      var I = Me(e, f);
      return !("cause" in Error.prototype) && "cause" in e && !xn.call(e, "cause") ? "{ [" + String(e) + "] " + C.call(mn.call("[cause]: " +
      f(e.cause), I), ", ") + " }" : I.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + C.call(I, ", ") + " }";
    }
    if (typeof e == "object" && l) {
      if (Sn && typeof e[Sn] == "function" && ht)
        return ht(e, { depth: c - n });
      if (l !== "symbol" && typeof e.inspect == "function")
        return e.inspect();
    }
    if (ai(e)) {
      var O = [];
      return pn && pn.call(e, function(M, $) {
        O.push(f($, e, !0) + " => " + f(M, e));
      }), Pn("Map", Fe.call(e), O, y);
    }
    if (li(e)) {
      var z = [];
      return yn && yn.call(e, function(M) {
        z.push(f(M, e));
      }), Pn("Set", $e.call(e), z, y);
    }
    if (oi(e))
      return ft("WeakMap");
    if (si(e))
      return ft("WeakSet");
    if (ii(e))
      return ft("WeakRef");
    if (Zo(e))
      return ye(f(Number(e)));
    if (ti(e))
      return ye(f(pt.call(e)));
    if (ei(e))
      return ye(Vo.call(e));
    if (Xo(e))
      return ye(f(String(e)));
    if (typeof window < "u" && e === window)
      return "{ [object Window] }";
    if (e === global)
      return "{ [object globalThis] }";
    if (!Jo(e) && !En(e)) {
      var v = Me(e, f), E = gn ? gn(e) === Object.prototype : e instanceof Object || e.constructor === Object, x = e instanceof Object ? "" :
      "null prototype", D = !E && L && Object(e) === e && L in e ? bt.call(V(e), 8, -1) : x ? "Object" : "", T = E || typeof e.constructor !=
      "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", F = T + (D || x ? "[" + C.call(mn.call([], D || [], x || []), ":\
 ") + "] " : "");
      return v.length === 0 ? F + "{}" : y ? F + "{" + mt(v, y) + "}" : F + "{ " + C.call(v, ", ") + " }";
    }
    return String(e);
  }, "inspect_");
  function An(t, e, r) {
    var n = (r.quoteStyle || e) === "double" ? '"' : "'";
    return n + t + n;
  }
  o(An, "wrapQuotes");
  function Ko(t) {
    return U.call(String(t), /"/g, "&quot;");
  }
  o(Ko, "quote");
  function dt(t) {
    return V(t) === "[object Array]" && (!L || !(typeof t == "object" && L in t));
  }
  o(dt, "isArray");
  function Jo(t) {
    return V(t) === "[object Date]" && (!L || !(typeof t == "object" && L in t));
  }
  o(Jo, "isDate");
  function En(t) {
    return V(t) === "[object RegExp]" && (!L || !(typeof t == "object" && L in t));
  }
  o(En, "isRegExp");
  function Yo(t) {
    return V(t) === "[object Error]" && (!L || !(typeof t == "object" && L in t));
  }
  o(Yo, "isError");
  function Xo(t) {
    return V(t) === "[object String]" && (!L || !(typeof t == "object" && L in t));
  }
  o(Xo, "isString");
  function Zo(t) {
    return V(t) === "[object Number]" && (!L || !(typeof t == "object" && L in t));
  }
  o(Zo, "isNumber");
  function ei(t) {
    return V(t) === "[object Boolean]" && (!L || !(typeof t == "object" && L in t));
  }
  o(ei, "isBoolean");
  function Rn(t) {
    if (ae)
      return t && typeof t == "object" && t instanceof Symbol;
    if (typeof t == "symbol")
      return !0;
    if (!t || typeof t != "object" || !yt)
      return !1;
    try {
      return yt.call(t), !0;
    } catch {
    }
    return !1;
  }
  o(Rn, "isSymbol");
  function ti(t) {
    if (!t || typeof t != "object" || !pt)
      return !1;
    try {
      return pt.call(t), !0;
    } catch {
    }
    return !1;
  }
  o(ti, "isBigInt");
  var ri = Object.prototype.hasOwnProperty || function(t) {
    return t in this;
  };
  function B(t, e) {
    return ri.call(t, e);
  }
  o(B, "has");
  function V(t) {
    return jo.call(t);
  }
  o(V, "toStr");
  function ni(t) {
    if (t.name)
      return t.name;
    var e = zo.call(Ho.call(t), /^function\s*([\w$]+)/);
    return e ? e[1] : null;
  }
  o(ni, "nameOf");
  function Nn(t, e) {
    if (t.indexOf)
      return t.indexOf(e);
    for (var r = 0, n = t.length; r < n; r++)
      if (t[r] === e)
        return r;
    return -1;
  }
  o(Nn, "indexOf");
  function ai(t) {
    if (!Fe || !t || typeof t != "object")
      return !1;
    try {
      Fe.call(t);
      try {
        $e.call(t);
      } catch {
        return !0;
      }
      return t instanceof Map;
    } catch {
    }
    return !1;
  }
  o(ai, "isMap");
  function oi(t) {
    if (!he || !t || typeof t != "object")
      return !1;
    try {
      he.call(t, he);
      try {
        de.call(t, de);
      } catch {
        return !0;
      }
      return t instanceof WeakMap;
    } catch {
    }
    return !1;
  }
  o(oi, "isWeakMap");
  function ii(t) {
    if (!hn || !t || typeof t != "object")
      return !1;
    try {
      return hn.call(t), !0;
    } catch {
    }
    return !1;
  }
  o(ii, "isWeakRef");
  function li(t) {
    if (!$e || !t || typeof t != "object")
      return !1;
    try {
      $e.call(t);
      try {
        Fe.call(t);
      } catch {
        return !0;
      }
      return t instanceof Set;
    } catch {
    }
    return !1;
  }
  o(li, "isSet");
  function si(t) {
    if (!de || !t || typeof t != "object")
      return !1;
    try {
      de.call(t, de);
      try {
        he.call(t, he);
      } catch {
        return !0;
      }
      return t instanceof WeakSet;
    } catch {
    }
    return !1;
  }
  o(si, "isWeakSet");
  function ui(t) {
    return !t || typeof t != "object" ? !1 : typeof HTMLElement < "u" && t instanceof HTMLElement ? !0 : typeof t.nodeName == "string" && typeof t.
    getAttribute == "function";
  }
  o(ui, "isElement");
  function In(t, e) {
    if (t.length > e.maxStringLength) {
      var r = t.length - e.maxStringLength, n = "... " + r + " more character" + (r > 1 ? "s" : "");
      return In(bt.call(t, 0, e.maxStringLength), e) + n;
    }
    var a = U.call(U.call(t, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, ci);
    return An(a, "single", e);
  }
  o(In, "inspectString");
  function ci(t) {
    var e = t.charCodeAt(0), r = {
      8: "b",
      9: "t",
      10: "n",
      12: "f",
      13: "r"
    }[e];
    return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + Go.call(e.toString(16));
  }
  o(ci, "lowbyte");
  function ye(t) {
    return "Object(" + t + ")";
  }
  o(ye, "markBoxed");
  function ft(t) {
    return t + " { ? }";
  }
  o(ft, "weakCollectionOf");
  function Pn(t, e, r, n) {
    var a = n ? mt(r, n) : C.call(r, ", ");
    return t + " (" + e + ") {" + a + "}";
  }
  o(Pn, "collectionOf");
  function fi(t) {
    for (var e = 0; e < t.length; e++)
      if (Nn(t[e], `
`) >= 0)
        return !1;
    return !0;
  }
  o(fi, "singleLineValues");
  function pi(t, e) {
    var r;
    if (t.indent === "	")
      r = "	";
    else if (typeof t.indent == "number" && t.indent > 0)
      r = C.call(Array(t.indent + 1), " ");
    else
      return null;
    return {
      base: r,
      prev: C.call(Array(e + 1), r)
    };
  }
  o(pi, "getIndent");
  function mt(t, e) {
    if (t.length === 0)
      return "";
    var r = `
` + e.prev + e.base;
    return r + C.call(t, "," + r) + `
` + e.prev;
  }
  o(mt, "indentedJoin");
  function Me(t, e) {
    var r = dt(t), n = [];
    if (r) {
      n.length = t.length;
      for (var a = 0; a < t.length; a++)
        n[a] = B(t, a) ? e(t[a], t) : "";
    }
    var i = typeof ct == "function" ? ct(t) : [], l;
    if (ae) {
      l = {};
      for (var u = 0; u < i.length; u++)
        l["$" + i[u]] = i[u];
    }
    for (var s in t)
      B(t, s) && (r && String(Number(s)) === s && s < t.length || ae && l["$" + s] instanceof Symbol || (On.call(/[^\w$]/, s) ? n.push(e(s, t) +
      ": " + e(t[s], t)) : n.push(s + ": " + e(t[s], t))));
    if (typeof ct == "function")
      for (var p = 0; p < i.length; p++)
        xn.call(t, i[p]) && n.push("[" + e(i[p]) + "]: " + e(t[i[p]], t));
    return n;
  }
  o(Me, "arrObjKeys");
});

// ../node_modules/side-channel/index.js
var Mn = b((_s, Ln) => {
  "use strict";
  var Tn = K(), oe = cn(), yi = _n(), hi = X(), Ce = Tn("%WeakMap%", !0), ke = Tn("%Map%", !0), di = oe("WeakMap.prototype.get", !0), mi = oe(
  "WeakMap.prototype.set", !0), vi = oe("WeakMap.prototype.has", !0), gi = oe("Map.prototype.get", !0), bi = oe("Map.prototype.set", !0), wi = oe(
  "Map.prototype.has", !0), wt = /* @__PURE__ */ o(function(t, e) {
    for (var r = t, n; (n = r.next) !== null; r = n)
      if (n.key === e)
        return r.next = n.next, n.next = /** @type {NonNullable<typeof list.next>} */
        t.next, t.next = n, n;
  }, "listGetNode"), Si = /* @__PURE__ */ o(function(t, e) {
    var r = wt(t, e);
    return r && r.value;
  }, "listGet"), Ei = /* @__PURE__ */ o(function(t, e, r) {
    var n = wt(t, e);
    n ? n.value = r : t.next = /** @type {import('.').ListNode<typeof value>} */
    {
      // eslint-disable-line no-param-reassign, no-extra-parens
      key: e,
      next: t.next,
      value: r
    };
  }, "listSet"), Pi = /* @__PURE__ */ o(function(t, e) {
    return !!wt(t, e);
  }, "listHas");
  Ln.exports = /* @__PURE__ */ o(function() {
    var e, r, n, a = {
      assert: /* @__PURE__ */ o(function(i) {
        if (!a.has(i))
          throw new hi("Side channel does not contain " + yi(i));
      }, "assert"),
      get: /* @__PURE__ */ o(function(i) {
        if (Ce && i && (typeof i == "object" || typeof i == "function")) {
          if (e)
            return di(e, i);
        } else if (ke) {
          if (r)
            return gi(r, i);
        } else if (n)
          return Si(n, i);
      }, "get"),
      has: /* @__PURE__ */ o(function(i) {
        if (Ce && i && (typeof i == "object" || typeof i == "function")) {
          if (e)
            return vi(e, i);
        } else if (ke) {
          if (r)
            return wi(r, i);
        } else if (n)
          return Pi(n, i);
        return !1;
      }, "has"),
      set: /* @__PURE__ */ o(function(i, l) {
        Ce && i && (typeof i == "object" || typeof i == "function") ? (e || (e = new Ce()), mi(e, i, l)) : ke ? (r || (r = new ke()), bi(r, i,
        l)) : (n || (n = { key: {}, next: null }), Ei(n, i, l));
      }, "set")
    };
    return a;
  }, "getSideChannel");
});

// ../node_modules/qs/lib/formats.js
var qe = b((Ls, Fn) => {
  "use strict";
  var Oi = String.prototype.replace, xi = /%20/g, St = {
    RFC1738: "RFC1738",
    RFC3986: "RFC3986"
  };
  Fn.exports = {
    default: St.RFC3986,
    formatters: {
      RFC1738: /* @__PURE__ */ o(function(t) {
        return Oi.call(t, xi, "+");
      }, "RFC1738"),
      RFC3986: /* @__PURE__ */ o(function(t) {
        return String(t);
      }, "RFC3986")
    },
    RFC1738: St.RFC1738,
    RFC3986: St.RFC3986
  };
});

// ../node_modules/qs/lib/utils.js
var Ot = b((Fs, Cn) => {
  "use strict";
  var Ai = qe(), Et = Object.prototype.hasOwnProperty, J = Array.isArray, k = function() {
    for (var t = [], e = 0; e < 256; ++e)
      t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
    return t;
  }(), Ri = /* @__PURE__ */ o(function(e) {
    for (; e.length > 1; ) {
      var r = e.pop(), n = r.obj[r.prop];
      if (J(n)) {
        for (var a = [], i = 0; i < n.length; ++i)
          typeof n[i] < "u" && a.push(n[i]);
        r.obj[r.prop] = a;
      }
    }
  }, "compactQueue"), $n = /* @__PURE__ */ o(function(e, r) {
    for (var n = r && r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, a = 0; a < e.length; ++a)
      typeof e[a] < "u" && (n[a] = e[a]);
    return n;
  }, "arrayToObject"), Ni = /* @__PURE__ */ o(function t(e, r, n) {
    if (!r)
      return e;
    if (typeof r != "object") {
      if (J(e))
        e.push(r);
      else if (e && typeof e == "object")
        (n && (n.plainObjects || n.allowPrototypes) || !Et.call(Object.prototype, r)) && (e[r] = !0);
      else
        return [e, r];
      return e;
    }
    if (!e || typeof e != "object")
      return [e].concat(r);
    var a = e;
    return J(e) && !J(r) && (a = $n(e, n)), J(e) && J(r) ? (r.forEach(function(i, l) {
      if (Et.call(e, l)) {
        var u = e[l];
        u && typeof u == "object" && i && typeof i == "object" ? e[l] = t(u, i, n) : e.push(i);
      } else
        e[l] = i;
    }), e) : Object.keys(r).reduce(function(i, l) {
      var u = r[l];
      return Et.call(i, l) ? i[l] = t(i[l], u, n) : i[l] = u, i;
    }, a);
  }, "merge"), Ii = /* @__PURE__ */ o(function(e, r) {
    return Object.keys(r).reduce(function(n, a) {
      return n[a] = r[a], n;
    }, e);
  }, "assignSingleSource"), Di = /* @__PURE__ */ o(function(t, e, r) {
    var n = t.replace(/\+/g, " ");
    if (r === "iso-8859-1")
      return n.replace(/%[0-9a-f]{2}/gi, unescape);
    try {
      return decodeURIComponent(n);
    } catch {
      return n;
    }
  }, "decode"), Pt = 1024, _i = /* @__PURE__ */ o(function(e, r, n, a, i) {
    if (e.length === 0)
      return e;
    var l = e;
    if (typeof e == "symbol" ? l = Symbol.prototype.toString.call(e) : typeof e != "string" && (l = String(e)), n === "iso-8859-1")
      return escape(l).replace(/%u[0-9a-f]{4}/gi, function(d) {
        return "%26%23" + parseInt(d.slice(2), 16) + "%3B";
      });
    for (var u = "", s = 0; s < l.length; s += Pt) {
      for (var p = l.length >= Pt ? l.slice(s, s + Pt) : l, c = [], y = 0; y < p.length; ++y) {
        var f = p.charCodeAt(y);
        if (f === 45 || f === 46 || f === 95 || f === 126 || f >= 48 && f <= 57 || f >= 65 && f <= 90 || f >= 97 && f <= 122 || i === Ai.RFC1738 &&
        (f === 40 || f === 41)) {
          c[c.length] = p.charAt(y);
          continue;
        }
        if (f < 128) {
          c[c.length] = k[f];
          continue;
        }
        if (f < 2048) {
          c[c.length] = k[192 | f >> 6] + k[128 | f & 63];
          continue;
        }
        if (f < 55296 || f >= 57344) {
          c[c.length] = k[224 | f >> 12] + k[128 | f >> 6 & 63] + k[128 | f & 63];
          continue;
        }
        y += 1, f = 65536 + ((f & 1023) << 10 | p.charCodeAt(y) & 1023), c[c.length] = k[240 | f >> 18] + k[128 | f >> 12 & 63] + k[128 | f >>
        6 & 63] + k[128 | f & 63];
      }
      u += c.join("");
    }
    return u;
  }, "encode"), Ti = /* @__PURE__ */ o(function(e) {
    for (var r = [{ obj: { o: e }, prop: "o" }], n = [], a = 0; a < r.length; ++a)
      for (var i = r[a], l = i.obj[i.prop], u = Object.keys(l), s = 0; s < u.length; ++s) {
        var p = u[s], c = l[p];
        typeof c == "object" && c !== null && n.indexOf(c) === -1 && (r.push({ obj: l, prop: p }), n.push(c));
      }
    return Ri(r), e;
  }, "compact"), Li = /* @__PURE__ */ o(function(e) {
    return Object.prototype.toString.call(e) === "[object RegExp]";
  }, "isRegExp"), Mi = /* @__PURE__ */ o(function(e) {
    return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
  }, "isBuffer"), Fi = /* @__PURE__ */ o(function(e, r) {
    return [].concat(e, r);
  }, "combine"), $i = /* @__PURE__ */ o(function(e, r) {
    if (J(e)) {
      for (var n = [], a = 0; a < e.length; a += 1)
        n.push(r(e[a]));
      return n;
    }
    return r(e);
  }, "maybeMap");
  Cn.exports = {
    arrayToObject: $n,
    assign: Ii,
    combine: Fi,
    compact: Ti,
    decode: Di,
    encode: _i,
    isBuffer: Mi,
    isRegExp: Li,
    maybeMap: $i,
    merge: Ni
  };
});

// ../node_modules/qs/lib/stringify.js
var Vn = b((Cs, Un) => {
  "use strict";
  var qn = Mn(), We = Ot(), me = qe(), Ci = Object.prototype.hasOwnProperty, Wn = {
    brackets: /* @__PURE__ */ o(function(e) {
      return e + "[]";
    }, "brackets"),
    comma: "comma",
    indices: /* @__PURE__ */ o(function(e, r) {
      return e + "[" + r + "]";
    }, "indices"),
    repeat: /* @__PURE__ */ o(function(e) {
      return e;
    }, "repeat")
  }, q = Array.isArray, ki = Array.prototype.push, Bn = /* @__PURE__ */ o(function(t, e) {
    ki.apply(t, q(e) ? e : [e]);
  }, "pushToArray"), qi = Date.prototype.toISOString, kn = me.default, R = {
    addQueryPrefix: !1,
    allowDots: !1,
    allowEmptyArrays: !1,
    arrayFormat: "indices",
    charset: "utf-8",
    charsetSentinel: !1,
    delimiter: "&",
    encode: !0,
    encodeDotInKeys: !1,
    encoder: We.encode,
    encodeValuesOnly: !1,
    format: kn,
    formatter: me.formatters[kn],
    // deprecated
    indices: !1,
    serializeDate: /* @__PURE__ */ o(function(e) {
      return qi.call(e);
    }, "serializeDate"),
    skipNulls: !1,
    strictNullHandling: !1
  }, Wi = /* @__PURE__ */ o(function(e) {
    return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
  }, "isNonNullishPrimitive"), xt = {}, Bi = /* @__PURE__ */ o(function t(e, r, n, a, i, l, u, s, p, c, y, f, d, h, m, S, N, P) {
    for (var g = e, I = P, O = 0, z = !1; (I = I.get(xt)) !== void 0 && !z; ) {
      var v = I.get(e);
      if (O += 1, typeof v < "u") {
        if (v === O)
          throw new RangeError("Cyclic object value");
        z = !0;
      }
      typeof I.get(xt) > "u" && (O = 0);
    }
    if (typeof c == "function" ? g = c(r, g) : g instanceof Date ? g = d(g) : n === "comma" && q(g) && (g = We.maybeMap(g, function(Je) {
      return Je instanceof Date ? d(Je) : Je;
    })), g === null) {
      if (l)
        return p && !S ? p(r, R.encoder, N, "key", h) : r;
      g = "";
    }
    if (Wi(g) || We.isBuffer(g)) {
      if (p) {
        var E = S ? r : p(r, R.encoder, N, "key", h);
        return [m(E) + "=" + m(p(g, R.encoder, N, "value", h))];
      }
      return [m(r) + "=" + m(String(g))];
    }
    var x = [];
    if (typeof g > "u")
      return x;
    var D;
    if (n === "comma" && q(g))
      S && p && (g = We.maybeMap(g, p)), D = [{ value: g.length > 0 ? g.join(",") || null : void 0 }];
    else if (q(c))
      D = c;
    else {
      var T = Object.keys(g);
      D = y ? T.sort(y) : T;
    }
    var F = s ? r.replace(/\./g, "%2E") : r, M = a && q(g) && g.length === 1 ? F + "[]" : F;
    if (i && q(g) && g.length === 0)
      return M + "[]";
    for (var $ = 0; $ < D.length; ++$) {
      var W = D[$], ue = typeof W == "object" && typeof W.value < "u" ? W.value : g[W];
      if (!(u && ue === null)) {
        var Ke = f && s ? W.replace(/\./g, "%2E") : W, ga = q(g) ? typeof n == "function" ? n(M, Ke) : M : M + (f ? "." + Ke : "[" + Ke + "]");
        P.set(e, O);
        var Ft = qn();
        Ft.set(xt, P), Bn(x, t(
          ue,
          ga,
          n,
          a,
          i,
          l,
          u,
          s,
          n === "comma" && S && q(g) ? null : p,
          c,
          y,
          f,
          d,
          h,
          m,
          S,
          N,
          Ft
        ));
      }
    }
    return x;
  }, "stringify"), Ui = /* @__PURE__ */ o(function(e) {
    if (!e)
      return R;
    if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
      throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
    if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
      throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
    if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
      throw new TypeError("Encoder has to be a function.");
    var r = e.charset || R.charset;
    if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
      throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
    var n = me.default;
    if (typeof e.format < "u") {
      if (!Ci.call(me.formatters, e.format))
        throw new TypeError("Unknown format option provided.");
      n = e.format;
    }
    var a = me.formatters[n], i = R.filter;
    (typeof e.filter == "function" || q(e.filter)) && (i = e.filter);
    var l;
    if (e.arrayFormat in Wn ? l = e.arrayFormat : "indices" in e ? l = e.indices ? "indices" : "repeat" : l = R.arrayFormat, "commaRoundTrip" in
    e && typeof e.commaRoundTrip != "boolean")
      throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
    var u = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : R.allowDots : !!e.allowDots;
    return {
      addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : R.addQueryPrefix,
      allowDots: u,
      allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : R.allowEmptyArrays,
      arrayFormat: l,
      charset: r,
      charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : R.charsetSentinel,
      commaRoundTrip: e.commaRoundTrip,
      delimiter: typeof e.delimiter > "u" ? R.delimiter : e.delimiter,
      encode: typeof e.encode == "boolean" ? e.encode : R.encode,
      encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : R.encodeDotInKeys,
      encoder: typeof e.encoder == "function" ? e.encoder : R.encoder,
      encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : R.encodeValuesOnly,
      filter: i,
      format: n,
      formatter: a,
      serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : R.serializeDate,
      skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : R.skipNulls,
      sort: typeof e.sort == "function" ? e.sort : null,
      strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : R.strictNullHandling
    };
  }, "normalizeStringifyOptions");
  Un.exports = function(t, e) {
    var r = t, n = Ui(e), a, i;
    typeof n.filter == "function" ? (i = n.filter, r = i("", r)) : q(n.filter) && (i = n.filter, a = i);
    var l = [];
    if (typeof r != "object" || r === null)
      return "";
    var u = Wn[n.arrayFormat], s = u === "comma" && n.commaRoundTrip;
    a || (a = Object.keys(r)), n.sort && a.sort(n.sort);
    for (var p = qn(), c = 0; c < a.length; ++c) {
      var y = a[c];
      n.skipNulls && r[y] === null || Bn(l, Bi(
        r[y],
        y,
        u,
        s,
        n.allowEmptyArrays,
        n.strictNullHandling,
        n.skipNulls,
        n.encodeDotInKeys,
        n.encode ? n.encoder : null,
        n.filter,
        n.sort,
        n.allowDots,
        n.serializeDate,
        n.format,
        n.formatter,
        n.encodeValuesOnly,
        n.charset,
        p
      ));
    }
    var f = l.join(n.delimiter), d = n.addQueryPrefix === !0 ? "?" : "";
    return n.charsetSentinel && (n.charset === "iso-8859-1" ? d += "utf8=%26%2310003%3B&" : d += "utf8=%E2%9C%93&"), f.length > 0 ? d + f : "";
  };
});

// ../node_modules/qs/lib/parse.js
var zn = b((qs, Hn) => {
  "use strict";
  var ie = Ot(), At = Object.prototype.hasOwnProperty, Vi = Array.isArray, A = {
    allowDots: !1,
    allowEmptyArrays: !1,
    allowPrototypes: !1,
    allowSparse: !1,
    arrayLimit: 20,
    charset: "utf-8",
    charsetSentinel: !1,
    comma: !1,
    decodeDotInKeys: !1,
    decoder: ie.decode,
    delimiter: "&",
    depth: 5,
    duplicates: "combine",
    ignoreQueryPrefix: !1,
    interpretNumericEntities: !1,
    parameterLimit: 1e3,
    parseArrays: !0,
    plainObjects: !1,
    strictNullHandling: !1
  }, ji = /* @__PURE__ */ o(function(t) {
    return t.replace(/&#(\d+);/g, function(e, r) {
      return String.fromCharCode(parseInt(r, 10));
    });
  }, "interpretNumericEntities"), jn = /* @__PURE__ */ o(function(t, e) {
    return t && typeof t == "string" && e.comma && t.indexOf(",") > -1 ? t.split(",") : t;
  }, "parseArrayValue"), Hi = "utf8=%26%2310003%3B", zi = "utf8=%E2%9C%93", Gi = /* @__PURE__ */ o(function(e, r) {
    var n = { __proto__: null }, a = r.ignoreQueryPrefix ? e.replace(/^\?/, "") : e;
    a = a.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
    var i = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit, l = a.split(r.delimiter, i), u = -1, s, p = r.charset;
    if (r.charsetSentinel)
      for (s = 0; s < l.length; ++s)
        l[s].indexOf("utf8=") === 0 && (l[s] === zi ? p = "utf-8" : l[s] === Hi && (p = "iso-8859-1"), u = s, s = l.length);
    for (s = 0; s < l.length; ++s)
      if (s !== u) {
        var c = l[s], y = c.indexOf("]="), f = y === -1 ? c.indexOf("=") : y + 1, d, h;
        f === -1 ? (d = r.decoder(c, A.decoder, p, "key"), h = r.strictNullHandling ? null : "") : (d = r.decoder(c.slice(0, f), A.decoder, p,
        "key"), h = ie.maybeMap(
          jn(c.slice(f + 1), r),
          function(S) {
            return r.decoder(S, A.decoder, p, "value");
          }
        )), h && r.interpretNumericEntities && p === "iso-8859-1" && (h = ji(h)), c.indexOf("[]=") > -1 && (h = Vi(h) ? [h] : h);
        var m = At.call(n, d);
        m && r.duplicates === "combine" ? n[d] = ie.combine(n[d], h) : (!m || r.duplicates === "last") && (n[d] = h);
      }
    return n;
  }, "parseQueryStringValues"), Qi = /* @__PURE__ */ o(function(t, e, r, n) {
    for (var a = n ? e : jn(e, r), i = t.length - 1; i >= 0; --i) {
      var l, u = t[i];
      if (u === "[]" && r.parseArrays)
        l = r.allowEmptyArrays && (a === "" || r.strictNullHandling && a === null) ? [] : [].concat(a);
      else {
        l = r.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
        var s = u.charAt(0) === "[" && u.charAt(u.length - 1) === "]" ? u.slice(1, -1) : u, p = r.decodeDotInKeys ? s.replace(/%2E/g, ".") :
        s, c = parseInt(p, 10);
        !r.parseArrays && p === "" ? l = { 0: a } : !isNaN(c) && u !== p && String(c) === p && c >= 0 && r.parseArrays && c <= r.arrayLimit ?
        (l = [], l[c] = a) : p !== "__proto__" && (l[p] = a);
      }
      a = l;
    }
    return a;
  }, "parseObject"), Ki = /* @__PURE__ */ o(function(e, r, n, a) {
    if (e) {
      var i = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, l = /(\[[^[\]]*])/, u = /(\[[^[\]]*])/g, s = n.depth > 0 && l.exec(i), p = s ?
      i.slice(0, s.index) : i, c = [];
      if (p) {
        if (!n.plainObjects && At.call(Object.prototype, p) && !n.allowPrototypes)
          return;
        c.push(p);
      }
      for (var y = 0; n.depth > 0 && (s = u.exec(i)) !== null && y < n.depth; ) {
        if (y += 1, !n.plainObjects && At.call(Object.prototype, s[1].slice(1, -1)) && !n.allowPrototypes)
          return;
        c.push(s[1]);
      }
      return s && c.push("[" + i.slice(s.index) + "]"), Qi(c, r, n, a);
    }
  }, "parseQueryStringKeys"), Ji = /* @__PURE__ */ o(function(e) {
    if (!e)
      return A;
    if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
      throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
    if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
      throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
    if (e.decoder !== null && typeof e.decoder < "u" && typeof e.decoder != "function")
      throw new TypeError("Decoder has to be a function.");
    if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
      throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
    var r = typeof e.charset > "u" ? A.charset : e.charset, n = typeof e.duplicates > "u" ? A.duplicates : e.duplicates;
    if (n !== "combine" && n !== "first" && n !== "last")
      throw new TypeError("The duplicates option must be either combine, first, or last");
    var a = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : A.allowDots : !!e.allowDots;
    return {
      allowDots: a,
      allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : A.allowEmptyArrays,
      allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : A.allowPrototypes,
      allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : A.allowSparse,
      arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : A.arrayLimit,
      charset: r,
      charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : A.charsetSentinel,
      comma: typeof e.comma == "boolean" ? e.comma : A.comma,
      decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : A.decodeDotInKeys,
      decoder: typeof e.decoder == "function" ? e.decoder : A.decoder,
      delimiter: typeof e.delimiter == "string" || ie.isRegExp(e.delimiter) ? e.delimiter : A.delimiter,
      // eslint-disable-next-line no-implicit-coercion, no-extra-parens
      depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : A.depth,
      duplicates: n,
      ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
      interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : A.interpretNumericEntities,
      parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : A.parameterLimit,
      parseArrays: e.parseArrays !== !1,
      plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : A.plainObjects,
      strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : A.strictNullHandling
    };
  }, "normalizeParseOptions");
  Hn.exports = function(t, e) {
    var r = Ji(e);
    if (t === "" || t === null || typeof t > "u")
      return r.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
    for (var n = typeof t == "string" ? Gi(t, r) : t, a = r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, i = Object.keys(n), l = 0; l <
    i.length; ++l) {
      var u = i[l], s = Ki(u, n[u], r, typeof t == "string");
      a = ie.merge(a, s, r);
    }
    return r.allowSparse === !0 ? a : ie.compact(a);
  };
});

// ../node_modules/qs/lib/index.js
var Qn = b((Bs, Gn) => {
  "use strict";
  var Yi = Vn(), Xi = zn(), Zi = qe();
  Gn.exports = {
    formats: Zi,
    parse: Xi,
    stringify: Yi
  };
});

// src/router/utils.ts
import { once as el } from "@storybook/core/client-logger";

// ../node_modules/dequal/dist/index.mjs
var $t = Object.prototype.hasOwnProperty;
function Ct(t, e, r) {
  for (r of t.keys())
    if (Y(r, e)) return r;
}
o(Ct, "find");
function Y(t, e) {
  var r, n, a;
  if (t === e) return !0;
  if (t && e && (r = t.constructor) === e.constructor) {
    if (r === Date) return t.getTime() === e.getTime();
    if (r === RegExp) return t.toString() === e.toString();
    if (r === Array) {
      if ((n = t.length) === e.length)
        for (; n-- && Y(t[n], e[n]); ) ;
      return n === -1;
    }
    if (r === Set) {
      if (t.size !== e.size)
        return !1;
      for (n of t)
        if (a = n, a && typeof a == "object" && (a = Ct(e, a), !a) || !e.has(a)) return !1;
      return !0;
    }
    if (r === Map) {
      if (t.size !== e.size)
        return !1;
      for (n of t)
        if (a = n[0], a && typeof a == "object" && (a = Ct(e, a), !a) || !Y(n[1], e.get(a)))
          return !1;
      return !0;
    }
    if (r === ArrayBuffer)
      t = new Uint8Array(t), e = new Uint8Array(e);
    else if (r === DataView) {
      if ((n = t.byteLength) === e.byteLength)
        for (; n-- && t.getInt8(n) === e.getInt8(n); ) ;
      return n === -1;
    }
    if (ArrayBuffer.isView(t)) {
      if ((n = t.byteLength) === e.byteLength)
        for (; n-- && t[n] === e[n]; ) ;
      return n === -1;
    }
    if (!r || typeof t == "object") {
      n = 0;
      for (r in t)
        if ($t.call(t, r) && ++n && !$t.call(e, r) || !(r in e) || !Y(t[r], e[r])) return !1;
      return Object.keys(e).length === n;
    }
  }
  return t !== t && e !== e;
}
o(Y, "dequal");

// src/router/utils.ts
var ve = Xe(lr(), 1), Ue = Xe(ur(), 1), Ve = Xe(Qn(), 1);

// ../node_modules/ts-dedent/esm/index.js
function Kn(t) {
  for (var e = [], r = 1; r < arguments.length; r++)
    e[r - 1] = arguments[r];
  var n = Array.from(typeof t == "string" ? [t] : t);
  n[n.length - 1] = n[n.length - 1].replace(/\r?\n([\t ]*)$/, "");
  var a = n.reduce(function(u, s) {
    var p = s.match(/\n([\t ]+|(?!\s).)/g);
    return p ? u.concat(p.map(function(c) {
      var y, f;
      return (f = (y = c.match(/[\t ]/g)) === null || y === void 0 ? void 0 : y.length) !== null && f !== void 0 ? f : 0;
    })) : u;
  }, []);
  if (a.length) {
    var i = new RegExp(`
[	 ]{` + Math.min.apply(Math, a) + "}", "g");
    n = n.map(function(u) {
      return u.replace(i, `
`);
    });
  }
  n[0] = n[0].replace(/^\r?\n/, "");
  var l = n[0];
  return e.forEach(function(u, s) {
    var p = l.match(/(?:^|\n)( *)$/), c = p ? p[1] : "", y = u;
    typeof u == "string" && u.includes(`
`) && (y = String(u).split(`
`).map(function(f, d) {
      return d === 0 ? f : "" + c + f;
    }).join(`
`)), l += y + n[s + 1];
  }), l;
}
o(Kn, "dedent");

// src/router/utils.ts
var tl = /\/([^/]+)\/(?:(.*)_)?([^/]+)?/, Yn = (0, Ue.default)(1e3)((t) => {
  let e = {
    viewMode: void 0,
    storyId: void 0,
    refId: void 0
  };
  if (t) {
    let [, r, n, a] = t.toLowerCase().match(tl) || [];
    r && Object.assign(e, {
      viewMode: r,
      storyId: a,
      refId: n
    });
  }
  return e;
}), Be = Symbol("Deeply equal"), Rt = /* @__PURE__ */ o((t, e) => {
  if (typeof t != typeof e) return e;
  if (Y(t, e)) return Be;
  if (Array.isArray(t) && Array.isArray(e)) {
    let r = e.reduce((n, a, i) => {
      let l = Rt(t[i], a);
      return l !== Be && (n[i] = l), n;
    }, new Array(e.length));
    return e.length >= t.length ? r : r.concat(new Array(t.length - e.length).fill(void 0));
  }
  return (0, ve.default)(t) && (0, ve.default)(e) ? Object.keys({ ...t, ...e }).reduce((r, n) => {
    let a = Rt(t?.[n], e?.[n]);
    return a === Be ? r : Object.assign(r, { [n]: a });
  }, {}) : e;
}, "deepDiff"), Jn = /^[a-zA-Z0-9 _-]*$/, rl = /^-?[0-9]+(\.[0-9]+)?$/, Xn = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i, Zn = /^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,
Nt = /* @__PURE__ */ o((t = "", e) => t === null || t === "" || !Jn.test(t) ? !1 : e == null || e instanceof Date || typeof e == "number" ||
typeof e == "boolean" ? !0 : typeof e == "string" ? Jn.test(e) || rl.test(e) || Xn.test(e) || Zn.test(e) : Array.isArray(e) ? e.every((r) => Nt(
t, r)) : (0, ve.default)(e) ? Object.entries(e).every(([r, n]) => Nt(r, n)) : !1, "validateArgs"), It = /* @__PURE__ */ o((t) => t === void 0 ?
"!undefined" : t === null ? "!null" : typeof t == "string" ? Xn.test(t) ? `!hex(${t.slice(1)})` : Zn.test(t) ? `!${t.replace(/[\s%]/g, "")}` :
t : typeof t == "boolean" ? `!${t}` : Array.isArray(t) ? t.map(It) : (0, ve.default)(t) ? Object.entries(t).reduce(
  (e, [r, n]) => Object.assign(e, { [r]: It(n) }),
  {}
) : t, "encodeSpecialValues"), nl = {
  encode: !1,
  // we handle URL encoding ourselves
  delimiter: ";",
  // we don't actually create multiple query params
  allowDots: !0,
  // encode objects using dot notation: obj.key=val
  format: "RFC1738",
  // encode spaces using the + sign
  serializeDate: /* @__PURE__ */ o((t) => `!date(${t.toISOString()})`, "serializeDate")
}, Gs = /* @__PURE__ */ o((t, e) => {
  let r = Rt(t, e);
  if (!r || r === Be) return "";
  let n = Object.entries(r).reduce((a, [i, l]) => Nt(i, l) ? Object.assign(a, { [i]: l }) : (el.warn(Kn`
      Omitted potentially unsafe URL args.

      More info: https://storybook.js.org/docs/react/writing-stories/args#setting-args-through-the-url
    `), a), {});
  return Ve.default.stringify(It(n), nl).replace(/ /g, "+").split(";").map((a) => a.replace("=", ":")).join(";");
}, "buildArgsParam"), Dt = (0, Ue.default)(1e3)(
  (t) => t !== void 0 ? Ve.default.parse(t, { ignoreQueryPrefix: !0 }) : {}
), Qs = /* @__PURE__ */ o((t) => Dt(t.search), "queryFromLocation"), Ks = /* @__PURE__ */ o((t) => Ve.default.stringify(t, { addQueryPrefix: !0,
encode: !1 }), "stringifyQuery"), ea = (0, Ue.default)(1e3)((t, e, r = !0) => {
  if (r) {
    if (typeof e != "string")
      throw new Error("startsWith only works with string targets");
    return t && t.startsWith(e) ? { path: t } : null;
  }
  let n = typeof e == "string" && t === e, a = t && e && t.match(e);
  return n || a ? { path: t } : null;
});

// src/router/router.tsx
import xe, { useCallback as Al } from "react";

// ../node_modules/@storybook/global/dist/index.mjs
var ta = (() => {
  let t;
  return typeof window < "u" ? t = window : typeof globalThis < "u" ? t = globalThis : typeof global < "u" ? t = global : typeof self < "u" ?
  t = self : t = {}, t;
})();

// ../node_modules/react-router-dom/index.js
import { useRef as ml, useState as vl, useLayoutEffect as gl, createElement as Mt, forwardRef as pa, useCallback as bl, useMemo as _u } from "react";

// ../node_modules/@babel/runtime/helpers/esm/extends.js
function ge() {
  return ge = Object.assign ? Object.assign.bind() : function(t) {
    for (var e = 1; e < arguments.length; e++) {
      var r = arguments[e];
      for (var n in r) ({}).hasOwnProperty.call(r, n) && (t[n] = r[n]);
    }
    return t;
  }, ge.apply(null, arguments);
}
o(ge, "_extends");

// ../node_modules/history/index.js
var j;
(function(t) {
  t.Pop = "POP", t.Push = "PUSH", t.Replace = "REPLACE";
})(j || (j = {}));
var ra = function(t) {
  return Object.freeze(t);
};
function al(t, e) {
  if (!t) {
    typeof console < "u" && console.warn(e);
    try {
      throw new Error(e);
    } catch {
    }
  }
}
o(al, "warning");
var na = "beforeunload";
var ol = "popstate";
function ia(t) {
  t === void 0 && (t = {});
  var e = t, r = e.window, n = r === void 0 ? document.defaultView : r, a = n.history;
  function i() {
    var v = n.location, E = v.pathname, x = v.search, D = v.hash, T = a.state || {};
    return [T.idx, ra({
      pathname: E,
      search: x,
      hash: D,
      state: T.usr || null,
      key: T.key || "default"
    })];
  }
  o(i, "getIndexAndLocation");
  var l = null;
  function u() {
    if (l)
      d.call(l), l = null;
    else {
      var v = j.Pop, E = i(), x = E[0], D = E[1];
      if (d.length)
        if (x != null) {
          var T = c - x;
          T && (l = {
            action: v,
            location: D,
            retry: /* @__PURE__ */ o(function() {
              O(T * -1);
            }, "retry")
          }, O(T));
        } else
          al(
            !1,
            // TODO: Write up a doc that explains our blocking strategy in
            // detail and link to it here so people can understand better what
            // is going on and how to avoid it.
            "You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silentl\
y in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) t\
o avoid this situation."
          );
      else
        P(v);
    }
  }
  o(u, "handlePop"), n.addEventListener(ol, u);
  var s = j.Pop, p = i(), c = p[0], y = p[1], f = oa(), d = oa();
  c == null && (c = 0, a.replaceState(ge({}, a.state, {
    idx: c
  }), ""));
  function h(v) {
    return typeof v == "string" ? v : je(v);
  }
  o(h, "createHref");
  function m(v, E) {
    return E === void 0 && (E = null), ra(ge({
      pathname: y.pathname,
      hash: "",
      search: ""
    }, typeof v == "string" ? le(v) : v, {
      state: E,
      key: il()
    }));
  }
  o(m, "getNextLocation");
  function S(v, E) {
    return [{
      usr: v.state,
      key: v.key,
      idx: E
    }, h(v)];
  }
  o(S, "getHistoryStateAndUrl");
  function N(v, E, x) {
    return !d.length || (d.call({
      action: v,
      location: E,
      retry: x
    }), !1);
  }
  o(N, "allowTx");
  function P(v) {
    s = v;
    var E = i();
    c = E[0], y = E[1], f.call({
      action: s,
      location: y
    });
  }
  o(P, "applyTx");
  function g(v, E) {
    var x = j.Push, D = m(v, E);
    function T() {
      g(v, E);
    }
    if (o(T, "retry"), N(x, D, T)) {
      var F = S(D, c + 1), M = F[0], $ = F[1];
      try {
        a.pushState(M, "", $);
      } catch {
        n.location.assign($);
      }
      P(x);
    }
  }
  o(g, "push");
  function I(v, E) {
    var x = j.Replace, D = m(v, E);
    function T() {
      I(v, E);
    }
    if (o(T, "retry"), N(x, D, T)) {
      var F = S(D, c), M = F[0], $ = F[1];
      a.replaceState(M, "", $), P(x);
    }
  }
  o(I, "replace");
  function O(v) {
    a.go(v);
  }
  o(O, "go");
  var z = {
    get action() {
      return s;
    },
    get location() {
      return y;
    },
    createHref: h,
    push: g,
    replace: I,
    go: O,
    back: /* @__PURE__ */ o(function() {
      O(-1);
    }, "back"),
    forward: /* @__PURE__ */ o(function() {
      O(1);
    }, "forward"),
    listen: /* @__PURE__ */ o(function(E) {
      return f.push(E);
    }, "listen"),
    block: /* @__PURE__ */ o(function(E) {
      var x = d.push(E);
      return d.length === 1 && n.addEventListener(na, aa), function() {
        x(), d.length || n.removeEventListener(na, aa);
      };
    }, "block")
  };
  return z;
}
o(ia, "createBrowserHistory");
function aa(t) {
  t.preventDefault(), t.returnValue = "";
}
o(aa, "promptBeforeUnload");
function oa() {
  var t = [];
  return {
    get length() {
      return t.length;
    },
    push: /* @__PURE__ */ o(function(r) {
      return t.push(r), function() {
        t = t.filter(function(n) {
          return n !== r;
        });
      };
    }, "push"),
    call: /* @__PURE__ */ o(function(r) {
      t.forEach(function(n) {
        return n && n(r);
      });
    }, "call")
  };
}
o(oa, "createEvents");
function il() {
  return Math.random().toString(36).substr(2, 8);
}
o(il, "createKey");
function je(t) {
  var e = t.pathname, r = e === void 0 ? "/" : e, n = t.search, a = n === void 0 ? "" : n, i = t.hash, l = i === void 0 ? "" : i;
  return a && a !== "?" && (r += a.charAt(0) === "?" ? a : "?" + a), l && l !== "#" && (r += l.charAt(0) === "#" ? l : "#" + l), r;
}
o(je, "createPath");
function le(t) {
  var e = {};
  if (t) {
    var r = t.indexOf("#");
    r >= 0 && (e.hash = t.substr(r), t = t.substr(0, r));
    var n = t.indexOf("?");
    n >= 0 && (e.search = t.substr(n), t = t.substr(0, n)), t && (e.pathname = t);
  }
  return e;
}
o(le, "parsePath");

// ../node_modules/react-router/index.js
import { createContext as Tt, useRef as ll, useState as iu, useLayoutEffect as lu, createElement as la, useContext as se, useEffect as sl, useMemo as _t,
useCallback as ul, Children as su, isValidElement as uu, Fragment as cu } from "react";
function He(t, e) {
  if (!t) throw new Error(e);
}
o(He, "invariant");
function sa(t, e) {
  if (!t) {
    typeof console < "u" && console.warn(e);
    try {
      throw new Error(e);
    } catch {
    }
  }
}
o(sa, "warning");
var be = /* @__PURE__ */ Tt(null);
be.displayName = "Navigation";
var we = /* @__PURE__ */ Tt(null);
we.displayName = "Location";
var ze = /* @__PURE__ */ Tt({
  outlet: null,
  matches: []
});
ze.displayName = "Route";
function Se(t) {
  let {
    basename: e = "/",
    children: r = null,
    location: n,
    navigationType: a = j.Pop,
    navigator: i,
    static: l = !1
  } = t;
  Ee() && He(!1, "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");
  let u = yl(e), s = _t(() => ({
    basename: u,
    navigator: i,
    static: l
  }), [u, i, l]);
  typeof n == "string" && (n = le(n));
  let {
    pathname: p = "/",
    search: c = "",
    hash: y = "",
    state: f = null,
    key: d = "default"
  } = n, h = _t(() => {
    let m = pl(p, u);
    return m == null ? null : {
      pathname: m,
      search: c,
      hash: y,
      state: f,
      key: d
    };
  }, [u, p, c, y, f, d]);
  return sa(h != null, '<Router basename="' + u + '"> is not able to match the URL ' + ('"' + p + c + y + '" because it does not start with \
the ') + "basename, so the <Router> won't render anything."), h == null ? null : /* @__PURE__ */ la(be.Provider, {
    value: s
  }, /* @__PURE__ */ la(we.Provider, {
    children: r,
    value: {
      location: h,
      navigationType: a
    }
  }));
}
o(Se, "Router");
function Lt(t) {
  Ee() || He(
    !1,
    // TODO: This error is probably because they somehow have 2 versions of the
    // router loaded. We can help them understand how to avoid that.
    "useHref() may be used only in the context of a <Router> component."
  );
  let {
    basename: e,
    navigator: r
  } = se(be), {
    hash: n,
    pathname: a,
    search: i
  } = Oe(t), l = a;
  if (e !== "/") {
    let u = fl(t), s = u != null && u.endsWith("/");
    l = a === "/" ? e + (s ? "/" : "") : fa([e, a]);
  }
  return r.createHref({
    pathname: l,
    search: i,
    hash: n
  });
}
o(Lt, "useHref");
function Ee() {
  return se(we) != null;
}
o(Ee, "useInRouterContext");
function H() {
  return Ee() || He(
    !1,
    // TODO: This error is probably because they somehow have 2 versions of the
    // router loaded. We can help them understand how to avoid that.
    "useLocation() may be used only in the context of a <Router> component."
  ), se(we).location;
}
o(H, "useLocation");
function Pe() {
  Ee() || He(
    !1,
    // TODO: This error is probably because they somehow have 2 versions of the
    // router loaded. We can help them understand how to avoid that.
    "useNavigate() may be used only in the context of a <Router> component."
  );
  let {
    basename: t,
    navigator: e
  } = se(be), {
    matches: r
  } = se(ze), {
    pathname: n
  } = H(), a = JSON.stringify(r.map((u) => u.pathnameBase)), i = ll(!1);
  return sl(() => {
    i.current = !0;
  }), ul(function(u, s) {
    if (s === void 0 && (s = {}), sa(i.current, "You should call navigate() in a React.useEffect(), not when your component is first rendere\
d."), !i.current) return;
    if (typeof u == "number") {
      e.go(u);
      return;
    }
    let p = ca(u, JSON.parse(a), n);
    t !== "/" && (p.pathname = fa([t, p.pathname])), (s.replace ? e.replace : e.push)(p, s.state);
  }, [t, e, a, n]);
}
o(Pe, "useNavigate");
function Oe(t) {
  let {
    matches: e
  } = se(ze), {
    pathname: r
  } = H(), n = JSON.stringify(e.map((a) => a.pathnameBase));
  return _t(() => ca(t, JSON.parse(n), r), [t, n, r]);
}
o(Oe, "useResolvedPath");
function ua(t, e) {
  e === void 0 && (e = "/");
  let {
    pathname: r,
    search: n = "",
    hash: a = ""
  } = typeof t == "string" ? le(t) : t;
  return {
    pathname: r ? r.startsWith("/") ? r : cl(r, e) : e,
    search: hl(n),
    hash: dl(a)
  };
}
o(ua, "resolvePath");
function cl(t, e) {
  let r = e.replace(/\/+$/, "").split("/");
  return t.split("/").forEach((a) => {
    a === ".." ? r.length > 1 && r.pop() : a !== "." && r.push(a);
  }), r.length > 1 ? r.join("/") : "/";
}
o(cl, "resolvePathname");
function ca(t, e, r) {
  let n = typeof t == "string" ? le(t) : t, a = t === "" || n.pathname === "" ? "/" : n.pathname, i;
  if (a == null)
    i = r;
  else {
    let u = e.length - 1;
    if (a.startsWith("..")) {
      let s = a.split("/");
      for (; s[0] === ".."; )
        s.shift(), u -= 1;
      n.pathname = s.join("/");
    }
    i = u >= 0 ? e[u] : "/";
  }
  let l = ua(n, i);
  return a && a !== "/" && a.endsWith("/") && !l.pathname.endsWith("/") && (l.pathname += "/"), l;
}
o(ca, "resolveTo");
function fl(t) {
  return t === "" || t.pathname === "" ? "/" : typeof t == "string" ? le(t).pathname : t.pathname;
}
o(fl, "getToPathname");
function pl(t, e) {
  if (e === "/") return t;
  if (!t.toLowerCase().startsWith(e.toLowerCase()))
    return null;
  let r = t.charAt(e.length);
  return r && r !== "/" ? null : t.slice(e.length) || "/";
}
o(pl, "stripBasename");
var fa = /* @__PURE__ */ o((t) => t.join("/").replace(/\/\/+/g, "/"), "joinPaths"), yl = /* @__PURE__ */ o((t) => t.replace(/\/+$/, "").replace(
/^\/*/, "/"), "normalizePathname"), hl = /* @__PURE__ */ o((t) => !t || t === "?" ? "" : t.startsWith("?") ? t : "?" + t, "normalizeSearch"),
dl = /* @__PURE__ */ o((t) => !t || t === "#" ? "" : t.startsWith("#") ? t : "#" + t, "normalizeHash");

// ../node_modules/react-router-dom/index.js
function Ge() {
  return Ge = Object.assign || function(t) {
    for (var e = 1; e < arguments.length; e++) {
      var r = arguments[e];
      for (var n in r)
        Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
    }
    return t;
  }, Ge.apply(this, arguments);
}
o(Ge, "_extends");
function ya(t, e) {
  if (t == null) return {};
  var r = {}, n = Object.keys(t), a, i;
  for (i = 0; i < n.length; i++)
    a = n[i], !(e.indexOf(a) >= 0) && (r[a] = t[a]);
  return r;
}
o(ya, "_objectWithoutPropertiesLoose");
var wl = ["onClick", "reloadDocument", "replace", "state", "target", "to"], Sl = ["aria-current", "caseSensitive", "className", "end", "styl\
e", "to"];
function ha(t) {
  let {
    basename: e,
    children: r,
    window: n
  } = t, a = ml();
  a.current == null && (a.current = ia({
    window: n
  }));
  let i = a.current, [l, u] = vl({
    action: i.action,
    location: i.location
  });
  return gl(() => i.listen(u), [i]), /* @__PURE__ */ Mt(Se, {
    basename: e,
    children: r,
    location: l.location,
    navigationType: l.action,
    navigator: i
  });
}
o(ha, "BrowserRouter");
function El(t) {
  return !!(t.metaKey || t.altKey || t.ctrlKey || t.shiftKey);
}
o(El, "isModifiedEvent");
var Qe = /* @__PURE__ */ pa(/* @__PURE__ */ o(function(e, r) {
  let {
    onClick: n,
    reloadDocument: a,
    replace: i = !1,
    state: l,
    target: u,
    to: s
  } = e, p = ya(e, wl), c = Lt(s), y = Ol(s, {
    replace: i,
    state: l,
    target: u
  });
  function f(d) {
    n && n(d), !d.defaultPrevented && !a && y(d);
  }
  return o(f, "handleClick"), // eslint-disable-next-line jsx-a11y/anchor-has-content
  /* @__PURE__ */ Mt("a", Ge({}, p, {
    href: c,
    onClick: f,
    ref: r,
    target: u
  }));
}, "LinkWithRef"));
Qe.displayName = "Link";
var Pl = /* @__PURE__ */ pa(/* @__PURE__ */ o(function(e, r) {
  let {
    "aria-current": n = "page",
    caseSensitive: a = !1,
    className: i = "",
    end: l = !1,
    style: u,
    to: s
  } = e, p = ya(e, Sl), c = H(), y = Oe(s), f = c.pathname, d = y.pathname;
  a || (f = f.toLowerCase(), d = d.toLowerCase());
  let h = f === d || !l && f.startsWith(d) && f.charAt(d.length) === "/", m = h ? n : void 0, S;
  typeof i == "function" ? S = i({
    isActive: h
  }) : S = [i, h ? "active" : null].filter(Boolean).join(" ");
  let N = typeof u == "function" ? u({
    isActive: h
  }) : u;
  return /* @__PURE__ */ Mt(Qe, Ge({}, p, {
    "aria-current": m,
    className: S,
    ref: r,
    style: N,
    to: s
  }));
}, "NavLinkWithRef"));
Pl.displayName = "NavLink";
function Ol(t, e) {
  let {
    target: r,
    replace: n,
    state: a
  } = e === void 0 ? {} : e, i = Pe(), l = H(), u = Oe(t);
  return bl((s) => {
    if (s.button === 0 && // Ignore everything but left clicks
    (!r || r === "_self") && // Let browser handle "target=_blank" etc.
    !El(s)) {
      s.preventDefault();
      let p = !!n || je(l) === je(u);
      i(t, {
        replace: p,
        state: a
      });
    }
  }, [l, i, u, n, a, r, t]);
}
o(Ol, "useLinkClickHandler");

// src/router/router.tsx
var { document: da } = ta, Rl = /* @__PURE__ */ o(() => `${da.location.pathname}?`, "getBase"), qu = /* @__PURE__ */ o(() => {
  let t = Pe();
  return Al((e, { plain: r, ...n } = {}) => {
    if (typeof e == "string" && e.startsWith("#")) {
      da.location.hash = e;
      return;
    }
    if (typeof e == "string") {
      let a = r ? e : `?path=${e}`;
      return t(a, n);
    }
    if (typeof e == "number")
      return t(e);
  }, []);
}, "useNavigate"), Nl = /* @__PURE__ */ o(({ to: t, children: e, ...r }) => /* @__PURE__ */ xe.createElement(Qe, { to: `${Rl()}path=${t}`, ...r },
e), "Link");
Nl.displayName = "QueryLink";
var ma = /* @__PURE__ */ o(({ children: t }) => {
  let e = H(), { path: r, singleStory: n } = Dt(e.search), { viewMode: a, storyId: i, refId: l } = Yn(r);
  return /* @__PURE__ */ xe.createElement(xe.Fragment, null, t({
    path: r || "/",
    location: e,
    viewMode: a,
    storyId: i,
    refId: l,
    singleStory: n === "true"
  }));
}, "Location");
ma.displayName = "QueryLocation";
function va({
  children: t,
  path: e,
  startsWith: r = !1
}) {
  return /* @__PURE__ */ xe.createElement(ma, null, ({ path: n, ...a }) => t({
    match: ea(n, e, r),
    ...a
  }));
}
o(va, "Match");
va.displayName = "QueryMatch";
function Il(t) {
  let { children: e, ...r } = t;
  return r.startsWith === void 0 && (r.startsWith = !1), /* @__PURE__ */ xe.createElement(va, { ...r }, ({ match: a }) => a ? e : null);
}
o(Il, "Route");
Il.displayName = "Route";
var Wu = /* @__PURE__ */ o((...t) => ha(...t), "LocationProvider"), Bu = /* @__PURE__ */ o((...t) => Se(...t), "BaseLocationProvider");
export {
  Bu as BaseLocationProvider,
  Be as DEEPLY_EQUAL,
  Nl as Link,
  ma as Location,
  Wu as LocationProvider,
  va as Match,
  Il as Route,
  Gs as buildArgsParam,
  Rt as deepDiff,
  ea as getMatch,
  Yn as parsePath,
  Qs as queryFromLocation,
  Dt as queryFromString,
  Ks as stringifyQuery,
  qu as useNavigate
};
