UNPKG

@api.global/typedrequest

Version:

A TypeScript library for making typed requests towards APIs, including facilities for handling requests, routing, and virtual stream handling.

12,172 lines • 415 kB
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from2, except, desc) => {
  if (from2 && typeof from2 === "object" || typeof from2 === "function") {
    for (let key of __getOwnPropNames(from2))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // 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.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));

// node_modules/.pnpm/@push.rocks+isounique@1.0.5/node_modules/@push.rocks/isounique/dist_ts/index.js
var require_dist_ts = __commonJS({
  "node_modules/.pnpm/@push.rocks+isounique@1.0.5/node_modules/@push.rocks/isounique/dist_ts/index.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.uni = void 0;
    var uni2 = (prefix = "uni") => {
      return `${prefix}_${`xxxxxxxxxxxxxxxxxxxxxxxx`.replace(/[xy]/g, (c) => {
        const r = Math.random() * 16 | 0;
        const v = c === "x" ? r : r & 3 | 8;
        return v.toString(16);
      })}`;
    };
    exports.uni = uni2;
  }
});

// node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js
var require_dayjs_min = __commonJS({
  "node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js"(exports, module) {
    !function(t, e) {
      "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
    }(exports, function() {
      "use strict";
      var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
        var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
        return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
      } }, m = function(t2, e2, n2) {
        var r2 = String(t2);
        return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
      }, v = { s: m, z: function(t2) {
        var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
        return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
      }, m: function t2(e2, n2) {
        if (e2.date() < n2.date())
          return -t2(n2, e2);
        var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
        return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
      }, a: function(t2) {
        return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
      }, p: function(t2) {
        return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
      }, u: function(t2) {
        return void 0 === t2;
      } }, g = "en", D = {};
      D[g] = M;
      var p = "$isDayjsObject", S = function(t2) {
        return t2 instanceof _ || !(!t2 || !t2[p]);
      }, w = function t2(e2, n2, r2) {
        var i2;
        if (!e2)
          return g;
        if ("string" == typeof e2) {
          var s2 = e2.toLowerCase();
          D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
          var u2 = e2.split("-");
          if (!i2 && u2.length > 1)
            return t2(u2[0]);
        } else {
          var a2 = e2.name;
          D[a2] = e2, i2 = a2;
        }
        return !r2 && i2 && (g = i2), i2 || !r2 && g;
      }, O = function(t2, e2) {
        if (S(t2))
          return t2.clone();
        var n2 = "object" == typeof e2 ? e2 : {};
        return n2.date = t2, n2.args = arguments, new _(n2);
      }, b = v;
      b.l = w, b.i = S, b.w = function(t2, e2) {
        return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
      };
      var _ = function() {
        function M2(t2) {
          this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
        }
        var m2 = M2.prototype;
        return m2.parse = function(t2) {
          this.$d = function(t3) {
            var e2 = t3.date, n2 = t3.utc;
            if (null === e2)
              return /* @__PURE__ */ new Date(NaN);
            if (b.u(e2))
              return /* @__PURE__ */ new Date();
            if (e2 instanceof Date)
              return new Date(e2);
            if ("string" == typeof e2 && !/Z$/i.test(e2)) {
              var r2 = e2.match($);
              if (r2) {
                var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
                return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
              }
            }
            return new Date(e2);
          }(t2), this.init();
        }, m2.init = function() {
          var t2 = this.$d;
          this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
        }, m2.$utils = function() {
          return b;
        }, m2.isValid = function() {
          return !(this.$d.toString() === l);
        }, m2.isSame = function(t2, e2) {
          var n2 = O(t2);
          return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
        }, m2.isAfter = function(t2, e2) {
          return O(t2) < this.startOf(e2);
        }, m2.isBefore = function(t2, e2) {
          return this.endOf(e2) < O(t2);
        }, m2.$g = function(t2, e2, n2) {
          return b.u(t2) ? this[e2] : this.set(n2, t2);
        }, m2.unix = function() {
          return Math.floor(this.valueOf() / 1e3);
        }, m2.valueOf = function() {
          return this.$d.getTime();
        }, m2.startOf = function(t2, e2) {
          var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
            var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
            return r2 ? i2 : i2.endOf(a);
          }, $2 = function(t3, e3) {
            return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
          }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
          switch (f2) {
            case h:
              return r2 ? l2(1, 0) : l2(31, 11);
            case c:
              return r2 ? l2(1, M3) : l2(0, M3 + 1);
            case o:
              var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
              return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
            case a:
            case d:
              return $2(v2 + "Hours", 0);
            case u:
              return $2(v2 + "Minutes", 1);
            case s:
              return $2(v2 + "Seconds", 2);
            case i:
              return $2(v2 + "Milliseconds", 3);
            default:
              return this.clone();
          }
        }, m2.endOf = function(t2) {
          return this.startOf(t2, false);
        }, m2.$set = function(t2, e2) {
          var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
          if (o2 === c || o2 === h) {
            var y2 = this.clone().set(d, 1);
            y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
          } else
            l2 && this.$d[l2]($2);
          return this.init(), this;
        }, m2.set = function(t2, e2) {
          return this.clone().$set(t2, e2);
        }, m2.get = function(t2) {
          return this[b.p(t2)]();
        }, m2.add = function(r2, f2) {
          var d2, l2 = this;
          r2 = Number(r2);
          var $2 = b.p(f2), y2 = function(t2) {
            var e2 = O(l2);
            return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
          };
          if ($2 === c)
            return this.set(c, this.$M + r2);
          if ($2 === h)
            return this.set(h, this.$y + r2);
          if ($2 === a)
            return y2(1);
          if ($2 === o)
            return y2(7);
          var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
          return b.w(m3, this);
        }, m2.subtract = function(t2, e2) {
          return this.add(-1 * t2, e2);
        }, m2.format = function(t2) {
          var e2 = this, n2 = this.$locale();
          if (!this.isValid())
            return n2.invalidDate || l;
          var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
            return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
          }, d2 = function(t3) {
            return b.s(s2 % 12 || 12, t3, "0");
          }, $2 = f2 || function(t3, e3, n3) {
            var r3 = t3 < 12 ? "AM" : "PM";
            return n3 ? r3.toLowerCase() : r3;
          };
          return r2.replace(y, function(t3, r3) {
            return r3 || function(t4) {
              switch (t4) {
                case "YY":
                  return String(e2.$y).slice(-2);
                case "YYYY":
                  return b.s(e2.$y, 4, "0");
                case "M":
                  return a2 + 1;
                case "MM":
                  return b.s(a2 + 1, 2, "0");
                case "MMM":
                  return h2(n2.monthsShort, a2, c2, 3);
                case "MMMM":
                  return h2(c2, a2);
                case "D":
                  return e2.$D;
                case "DD":
                  return b.s(e2.$D, 2, "0");
                case "d":
                  return String(e2.$W);
                case "dd":
                  return h2(n2.weekdaysMin, e2.$W, o2, 2);
                case "ddd":
                  return h2(n2.weekdaysShort, e2.$W, o2, 3);
                case "dddd":
                  return o2[e2.$W];
                case "H":
                  return String(s2);
                case "HH":
                  return b.s(s2, 2, "0");
                case "h":
                  return d2(1);
                case "hh":
                  return d2(2);
                case "a":
                  return $2(s2, u2, true);
                case "A":
                  return $2(s2, u2, false);
                case "m":
                  return String(u2);
                case "mm":
                  return b.s(u2, 2, "0");
                case "s":
                  return String(e2.$s);
                case "ss":
                  return b.s(e2.$s, 2, "0");
                case "SSS":
                  return b.s(e2.$ms, 3, "0");
                case "Z":
                  return i2;
              }
              return null;
            }(t3) || i2.replace(":", "");
          });
        }, m2.utcOffset = function() {
          return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
        }, m2.diff = function(r2, d2, l2) {
          var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
            return b.m(y2, m3);
          };
          switch (M3) {
            case h:
              $2 = D2() / 12;
              break;
            case c:
              $2 = D2();
              break;
            case f:
              $2 = D2() / 3;
              break;
            case o:
              $2 = (g2 - v2) / 6048e5;
              break;
            case a:
              $2 = (g2 - v2) / 864e5;
              break;
            case u:
              $2 = g2 / n;
              break;
            case s:
              $2 = g2 / e;
              break;
            case i:
              $2 = g2 / t;
              break;
            default:
              $2 = g2;
          }
          return l2 ? $2 : b.a($2);
        }, m2.daysInMonth = function() {
          return this.endOf(c).$D;
        }, m2.$locale = function() {
          return D[this.$L];
        }, m2.locale = function(t2, e2) {
          if (!t2)
            return this.$L;
          var n2 = this.clone(), r2 = w(t2, e2, true);
          return r2 && (n2.$L = r2), n2;
        }, m2.clone = function() {
          return b.w(this.$d, this);
        }, m2.toDate = function() {
          return new Date(this.valueOf());
        }, m2.toJSON = function() {
          return this.isValid() ? this.toISOString() : null;
        }, m2.toISOString = function() {
          return this.$d.toISOString();
        }, m2.toString = function() {
          return this.$d.toUTCString();
        }, M2;
      }(), k = _.prototype;
      return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
        k[t2[1]] = function(e2) {
          return this.$g(e2, t2[0], t2[1]);
        };
      }), O.extend = function(t2, e2) {
        return t2.$i || (t2(e2, _, O), t2.$i = true), O;
      }, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
        return O(1e3 * t2);
      }, O.en = D[g], O.Ls = D, O.p = {}, O;
    });
  }
});

// node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/isToday.js
var require_isToday = __commonJS({
  "node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/isToday.js"(exports, module) {
    !function(e, o) {
      "object" == typeof exports && "undefined" != typeof module ? module.exports = o() : "function" == typeof define && define.amd ? define(o) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isToday = o();
    }(exports, function() {
      "use strict";
      return function(e, o, t) {
        o.prototype.isToday = function() {
          var e2 = "YYYY-MM-DD", o2 = t();
          return this.format(e2) === o2.format(e2);
        };
      };
    });
  }
});

// node_modules/.pnpm/symbol-tree@3.2.4/node_modules/symbol-tree/lib/SymbolTreeNode.js
var require_SymbolTreeNode = __commonJS({
  "node_modules/.pnpm/symbol-tree@3.2.4/node_modules/symbol-tree/lib/SymbolTreeNode.js"(exports, module) {
    "use strict";
    module.exports = class SymbolTreeNode {
      constructor() {
        this.parent = null;
        this.previousSibling = null;
        this.nextSibling = null;
        this.firstChild = null;
        this.lastChild = null;
        this.childrenVersion = 0;
        this.childIndexCachedUpTo = null;
        this.cachedIndex = -1;
        this.cachedIndexVersion = NaN;
      }
      get isAttached() {
        return Boolean(this.parent || this.previousSibling || this.nextSibling);
      }
      get hasChildren() {
        return Boolean(this.firstChild);
      }
      childrenChanged() {
        this.childrenVersion = this.childrenVersion + 1 & 4294967295;
        this.childIndexCachedUpTo = null;
      }
      getCachedIndex(parentNode) {
        if (this.cachedIndexVersion !== parentNode.childrenVersion) {
          this.cachedIndexVersion = NaN;
          return -1;
        }
        return this.cachedIndex;
      }
      setCachedIndex(parentNode, index) {
        this.cachedIndexVersion = parentNode.childrenVersion;
        this.cachedIndex = index;
      }
    };
  }
});

// node_modules/.pnpm/symbol-tree@3.2.4/node_modules/symbol-tree/lib/TreePosition.js
var require_TreePosition = __commonJS({
  "node_modules/.pnpm/symbol-tree@3.2.4/node_modules/symbol-tree/lib/TreePosition.js"(exports, module) {
    "use strict";
    module.exports = Object.freeze({
      // same as DOM DOCUMENT_POSITION_
      DISCONNECTED: 1,
      PRECEDING: 2,
      FOLLOWING: 4,
      CONTAINS: 8,
      CONTAINED_BY: 16
    });
  }
});

// node_modules/.pnpm/symbol-tree@3.2.4/node_modules/symbol-tree/lib/TreeIterator.js
var require_TreeIterator = __commonJS({
  "node_modules/.pnpm/symbol-tree@3.2.4/node_modules/symbol-tree/lib/TreeIterator.js"(exports, module) {
    "use strict";
    var TREE = Symbol();
    var ROOT = Symbol();
    var NEXT = Symbol();
    var ITERATE_FUNC = Symbol();
    var TreeIterator = class {
      constructor(tree, root, firstResult, iterateFunction) {
        this[TREE] = tree;
        this[ROOT] = root;
        this[NEXT] = firstResult;
        this[ITERATE_FUNC] = iterateFunction;
      }
      next() {
        const tree = this[TREE];
        const iterateFunc = this[ITERATE_FUNC];
        const root = this[ROOT];
        if (!this[NEXT]) {
          return {
            done: true,
            value: root
          };
        }
        const value = this[NEXT];
        if (iterateFunc === 1) {
          this[NEXT] = tree._node(value).previousSibling;
        } else if (iterateFunc === 2) {
          this[NEXT] = tree._node(value).nextSibling;
        } else if (iterateFunc === 3) {
          this[NEXT] = tree._node(value).parent;
        } else if (iterateFunc === 4) {
          this[NEXT] = tree.preceding(value, { root });
        } else {
          this[NEXT] = tree.following(value, { root });
        }
        return {
          done: false,
          value
        };
      }
    };
    Object.defineProperty(TreeIterator.prototype, Symbol.iterator, {
      value: function() {
        return this;
      },
      writable: false
    });
    TreeIterator.PREV = 1;
    TreeIterator.NEXT = 2;
    TreeIterator.PARENT = 3;
    TreeIterator.PRECEDING = 4;
    TreeIterator.FOLLOWING = 5;
    Object.freeze(TreeIterator);
    Object.freeze(TreeIterator.prototype);
    module.exports = TreeIterator;
  }
});

// node_modules/.pnpm/symbol-tree@3.2.4/node_modules/symbol-tree/lib/SymbolTree.js
var require_SymbolTree = __commonJS({
  "node_modules/.pnpm/symbol-tree@3.2.4/node_modules/symbol-tree/lib/SymbolTree.js"(exports, module) {
    "use strict";
    var SymbolTreeNode = require_SymbolTreeNode();
    var TreePosition = require_TreePosition();
    var TreeIterator = require_TreeIterator();
    function returnTrue() {
      return true;
    }
    function reverseArrayIndex(array, reverseIndex) {
      return array[array.length - 1 - reverseIndex];
    }
    var SymbolTree = class {
      /**
       * @constructor
       * @alias module:symbol-tree
       * @param {string} [description='SymbolTree data'] Description used for the Symbol
       */
      constructor(description) {
        this.symbol = Symbol(description || "SymbolTree data");
      }
      /**
       * You can use this function to (optionally) initialize an object right after its creation,
       * to take advantage of V8's fast properties. Also useful if you would like to
       * freeze your object.
       *
       * `O(1)`
       *
       * @method
       * @alias module:symbol-tree#initialize
       * @param {Object} object
       * @return {Object} object
       */
      initialize(object) {
        this._node(object);
        return object;
      }
      _node(object) {
        if (!object) {
          return null;
        }
        const node = object[this.symbol];
        if (node) {
          return node;
        }
        return object[this.symbol] = new SymbolTreeNode();
      }
      /**
       * Returns `true` if the object has any children. Otherwise it returns `false`.
       *
       * * `O(1)`
       *
       * @method hasChildren
       * @memberOf module:symbol-tree#
       * @param {Object} object
       * @return {Boolean}
       */
      hasChildren(object) {
        return this._node(object).hasChildren;
      }
      /**
       * Returns the first child of the given object.
       *
       * * `O(1)`
       *
       * @method firstChild
       * @memberOf module:symbol-tree#
       * @param {Object} object
       * @return {Object}
       */
      firstChild(object) {
        return this._node(object).firstChild;
      }
      /**
       * Returns the last child of the given object.
       *
       * * `O(1)`
       *
       * @method lastChild
       * @memberOf module:symbol-tree#
       * @param {Object} object
       * @return {Object}
       */
      lastChild(object) {
        return this._node(object).lastChild;
      }
      /**
       * Returns the previous sibling of the given object.
       *
       * * `O(1)`
       *
       * @method previousSibling
       * @memberOf module:symbol-tree#
       * @param {Object} object
       * @return {Object}
       */
      previousSibling(object) {
        return this._node(object).previousSibling;
      }
      /**
       * Returns the next sibling of the given object.
       *
       * * `O(1)`
       *
       * @method nextSibling
       * @memberOf module:symbol-tree#
       * @param {Object} object
       * @return {Object}
       */
      nextSibling(object) {
        return this._node(object).nextSibling;
      }
      /**
       * Return the parent of the given object.
       *
       * * `O(1)`
       *
       * @method parent
       * @memberOf module:symbol-tree#
       * @param {Object} object
       * @return {Object}
       */
      parent(object) {
        return this._node(object).parent;
      }
      /**
       * Find the inclusive descendant that is last in tree order of the given object.
       *
       * * `O(n)` (worst case) where `n` is the depth of the subtree of `object`
       *
       * @method lastInclusiveDescendant
       * @memberOf module:symbol-tree#
       * @param {Object} object
       * @return {Object}
       */
      lastInclusiveDescendant(object) {
        let lastChild;
        let current = object;
        while (lastChild = this._node(current).lastChild) {
          current = lastChild;
        }
        return current;
      }
      /**
       * Find the preceding object (A) of the given object (B).
       * An object A is preceding an object B if A and B are in the same tree
       * and A comes before B in tree order.
       *
       * * `O(n)` (worst case)
       * * `O(1)` (amortized when walking the entire tree)
       *
       * @method preceding
       * @memberOf module:symbol-tree#
       * @param {Object} object
       * @param {Object} [options]
       * @param {Object} [options.root] If set, `root` must be an inclusive ancestor
       *        of the return value (or else null is returned). This check _assumes_
       *        that `root` is also an inclusive ancestor of the given `object`
       * @return {?Object}
       */
      preceding(object, options) {
        const treeRoot = options && options.root;
        if (object === treeRoot) {
          return null;
        }
        const previousSibling = this._node(object).previousSibling;
        if (previousSibling) {
          return this.lastInclusiveDescendant(previousSibling);
        }
        return this._node(object).parent;
      }
      /**
       * Find the following object (A) of the given object (B).
       * An object A is following an object B if A and B are in the same tree
       * and A comes after B in tree order.
       *
       * * `O(n)` (worst case) where `n` is the amount of objects in the entire tree
       * * `O(1)` (amortized when walking the entire tree)
       *
       * @method following
       * @memberOf module:symbol-tree#
       * @param {!Object} object
       * @param {Object} [options]
       * @param {Object} [options.root] If set, `root` must be an inclusive ancestor
       *        of the return value (or else null is returned). This check _assumes_
       *        that `root` is also an inclusive ancestor of the given `object`
       * @param {Boolean} [options.skipChildren=false] If set, ignore the children of `object`
       * @return {?Object}
       */
      following(object, options) {
        const treeRoot = options && options.root;
        const skipChildren = options && options.skipChildren;
        const firstChild = !skipChildren && this._node(object).firstChild;
        if (firstChild) {
          return firstChild;
        }
        let current = object;
        do {
          if (current === treeRoot) {
            return null;
          }
          const nextSibling = this._node(current).nextSibling;
          if (nextSibling) {
            return nextSibling;
          }
          current = this._node(current).parent;
        } while (current);
        return null;
      }
      /**
       * Append all children of the given object to an array.
       *
       * * `O(n)` where `n` is the amount of children of the given `parent`
       *
       * @method childrenToArray
       * @memberOf module:symbol-tree#
       * @param {Object} parent
       * @param {Object} [options]
       * @param {Object[]} [options.array=[]]
       * @param {Function} [options.filter] Function to test each object before it is added to the array.
       *                            Invoked with arguments (object). Should return `true` if an object
       *                            is to be included.
       * @param {*} [options.thisArg] Value to use as `this` when executing `filter`.
       * @return {Object[]}
       */
      childrenToArray(parent, options) {
        const array = options && options.array || [];
        const filter2 = options && options.filter || returnTrue;
        const thisArg = options && options.thisArg || void 0;
        const parentNode = this._node(parent);
        let object = parentNode.firstChild;
        let index = 0;
        while (object) {
          const node = this._node(object);
          node.setCachedIndex(parentNode, index);
          if (filter2.call(thisArg, object)) {
            array.push(object);
          }
          object = node.nextSibling;
          ++index;
        }
        return array;
      }
      /**
       * Append all inclusive ancestors of the given object to an array.
       *
       * * `O(n)` where `n` is the amount of ancestors of the given `object`
       *
       * @method ancestorsToArray
       * @memberOf module:symbol-tree#
       * @param {Object} object
       * @param {Object} [options]
       * @param {Object[]} [options.array=[]]
       * @param {Function} [options.filter] Function to test each object before it is added to the array.
       *                            Invoked with arguments (object). Should return `true` if an object
       *                            is to be included.
       * @param {*} [options.thisArg] Value to use as `this` when executing `filter`.
       * @return {Object[]}
       */
      ancestorsToArray(object, options) {
        const array = options && options.array || [];
        const filter2 = options && options.filter || returnTrue;
        const thisArg = options && options.thisArg || void 0;
        let ancestor = object;
        while (ancestor) {
          if (filter2.call(thisArg, ancestor)) {
            array.push(ancestor);
          }
          ancestor = this._node(ancestor).parent;
        }
        return array;
      }
      /**
       * Append all descendants of the given object to an array (in tree order).
       *
       * * `O(n)` where `n` is the amount of objects in the sub-tree of the given `object`
       *
       * @method treeToArray
       * @memberOf module:symbol-tree#
       * @param {Object} root
       * @param {Object} [options]
       * @param {Object[]} [options.array=[]]
       * @param {Function} [options.filter] Function to test each object before it is added to the array.
       *                            Invoked with arguments (object). Should return `true` if an object
       *                            is to be included.
       * @param {*} [options.thisArg] Value to use as `this` when executing `filter`.
       * @return {Object[]}
       */
      treeToArray(root, options) {
        const array = options && options.array || [];
        const filter2 = options && options.filter || returnTrue;
        const thisArg = options && options.thisArg || void 0;
        let object = root;
        while (object) {
          if (filter2.call(thisArg, object)) {
            array.push(object);
          }
          object = this.following(object, { root });
        }
        return array;
      }
      /**
       * Iterate over all children of the given object
       *
       * * `O(1)` for a single iteration
       *
       * @method childrenIterator
       * @memberOf module:symbol-tree#
       * @param {Object} parent
       * @param {Object} [options]
       * @param {Boolean} [options.reverse=false]
       * @return {Object} An iterable iterator (ES6)
       */
      childrenIterator(parent, options) {
        const reverse = options && options.reverse;
        const parentNode = this._node(parent);
        return new TreeIterator(
          this,
          parent,
          reverse ? parentNode.lastChild : parentNode.firstChild,
          reverse ? TreeIterator.PREV : TreeIterator.NEXT
        );
      }
      /**
       * Iterate over all the previous siblings of the given object. (in reverse tree order)
       *
       * * `O(1)` for a single iteration
       *
       * @method previousSiblingsIterator
       * @memberOf module:symbol-tree#
       * @param {Object} object
       * @return {Object} An iterable iterator (ES6)
       */
      previousSiblingsIterator(object) {
        return new TreeIterator(
          this,
          object,
          this._node(object).previousSibling,
          TreeIterator.PREV
        );
      }
      /**
       * Iterate over all the next siblings of the given object. (in tree order)
       *
       * * `O(1)` for a single iteration
       *
       * @method nextSiblingsIterator
       * @memberOf module:symbol-tree#
       * @param {Object} object
       * @return {Object} An iterable iterator (ES6)
       */
      nextSiblingsIterator(object) {
        return new TreeIterator(
          this,
          object,
          this._node(object).nextSibling,
          TreeIterator.NEXT
        );
      }
      /**
       * Iterate over all inclusive ancestors of the given object
       *
       * * `O(1)` for a single iteration
       *
       * @method ancestorsIterator
       * @memberOf module:symbol-tree#
       * @param {Object} object
       * @return {Object} An iterable iterator (ES6)
       */
      ancestorsIterator(object) {
        return new TreeIterator(
          this,
          object,
          object,
          TreeIterator.PARENT
        );
      }
      /**
       * Iterate over all descendants of the given object (in tree order).
       *
       * Where `n` is the amount of objects in the sub-tree of the given `root`:
       *
       * * `O(n)` (worst case for a single iteration)
       * * `O(n)` (amortized, when completing the iterator)
       *
       * @method treeIterator
       * @memberOf module:symbol-tree#
       * @param {Object} root
       * @param {Object} options
       * @param {Boolean} [options.reverse=false]
       * @return {Object} An iterable iterator (ES6)
       */
      treeIterator(root, options) {
        const reverse = options && options.reverse;
        return new TreeIterator(
          this,
          root,
          reverse ? this.lastInclusiveDescendant(root) : root,
          reverse ? TreeIterator.PRECEDING : TreeIterator.FOLLOWING
        );
      }
      /**
       * Find the index of the given object (the number of preceding siblings).
       *
       * * `O(n)` where `n` is the amount of preceding siblings
       * * `O(1)` (amortized, if the tree is not modified)
       *
       * @method index
       * @memberOf module:symbol-tree#
       * @param {Object} child
       * @return {Number} The number of preceding siblings, or -1 if the object has no parent
       */
      index(child) {
        const childNode = this._node(child);
        const parentNode = this._node(childNode.parent);
        if (!parentNode) {
          return -1;
        }
        let currentIndex = childNode.getCachedIndex(parentNode);
        if (currentIndex >= 0) {
          return currentIndex;
        }
        currentIndex = 0;
        let object = parentNode.firstChild;
        if (parentNode.childIndexCachedUpTo) {
          const cachedUpToNode = this._node(parentNode.childIndexCachedUpTo);
          object = cachedUpToNode.nextSibling;
          currentIndex = cachedUpToNode.getCachedIndex(parentNode) + 1;
        }
        while (object) {
          const node = this._node(object);
          node.setCachedIndex(parentNode, currentIndex);
          if (object === child) {
            break;
          }
          ++currentIndex;
          object = node.nextSibling;
        }
        parentNode.childIndexCachedUpTo = child;
        return currentIndex;
      }
      /**
       * Calculate the number of children.
       *
       * * `O(n)` where `n` is the amount of children
       * * `O(1)` (amortized, if the tree is not modified)
       *
       * @method childrenCount
       * @memberOf module:symbol-tree#
       * @param {Object} parent
       * @return {Number}
       */
      childrenCount(parent) {
        const parentNode = this._node(parent);
        if (!parentNode.lastChild) {
          return 0;
        }
        return this.index(parentNode.lastChild) + 1;
      }
      /**
       * Compare the position of an object relative to another object. A bit set is returned:
       *
       * <ul>
       *     <li>DISCONNECTED : 1</li>
       *     <li>PRECEDING : 2</li>
       *     <li>FOLLOWING : 4</li>
       *     <li>CONTAINS : 8</li>
       *     <li>CONTAINED_BY : 16</li>
       * </ul>
       *
       * The semantics are the same as compareDocumentPosition in DOM, with the exception that
       * DISCONNECTED never occurs with any other bit.
       *
       * where `n` and `m` are the amount of ancestors of `left` and `right`;
       * where `o` is the amount of children of the lowest common ancestor of `left` and `right`:
       *
       * * `O(n + m + o)` (worst case)
       * * `O(n + m)` (amortized, if the tree is not modified)
       *
       * @method compareTreePosition
       * @memberOf module:symbol-tree#
       * @param {Object} left
       * @param {Object} right
       * @return {Number}
       */
      compareTreePosition(left, right) {
        if (left === right) {
          return 0;
        }
        const leftAncestors = [];
        {
          let leftAncestor = left;
          while (leftAncestor) {
            if (leftAncestor === right) {
              return TreePosition.CONTAINS | TreePosition.PRECEDING;
            }
            leftAncestors.push(leftAncestor);
            leftAncestor = this.parent(leftAncestor);
          }
        }
        const rightAncestors = [];
        {
          let rightAncestor = right;
          while (rightAncestor) {
            if (rightAncestor === left) {
              return TreePosition.CONTAINED_BY | TreePosition.FOLLOWING;
            }
            rightAncestors.push(rightAncestor);
            rightAncestor = this.parent(rightAncestor);
          }
        }
        const root = reverseArrayIndex(leftAncestors, 0);
        if (!root || root !== reverseArrayIndex(rightAncestors, 0)) {
          return TreePosition.DISCONNECTED;
        }
        let commonAncestorIndex = 0;
        const ancestorsMinLength = Math.min(leftAncestors.length, rightAncestors.length);
        for (let i = 0; i < ancestorsMinLength; ++i) {
          const leftAncestor = reverseArrayIndex(leftAncestors, i);
          const rightAncestor = reverseArrayIndex(rightAncestors, i);
          if (leftAncestor !== rightAncestor) {
            break;
          }
          commonAncestorIndex = i;
        }
        const leftIndex = this.index(reverseArrayIndex(leftAncestors, commonAncestorIndex + 1));
        const rightIndex = this.index(reverseArrayIndex(rightAncestors, commonAncestorIndex + 1));
        return rightIndex < leftIndex ? TreePosition.PRECEDING : TreePosition.FOLLOWING;
      }
      /**
       * Remove the object from this tree.
       * Has no effect if already removed.
       *
       * * `O(1)`
       *
       * @method remove
       * @memberOf module:symbol-tree#
       * @param {Object} removeObject
       * @return {Object} removeObject
       */
      remove(removeObject) {
        const removeNode = this._node(removeObject);
        const parentNode = this._node(removeNode.parent);
        const prevNode = this._node(removeNode.previousSibling);
        const nextNode = this._node(removeNode.nextSibling);
        if (parentNode) {
          if (parentNode.firstChild === removeObject) {
            parentNode.firstChild = removeNode.nextSibling;
          }
          if (parentNode.lastChild === removeObject) {
            parentNode.lastChild = removeNode.previousSibling;
          }
        }
        if (prevNode) {
          prevNode.nextSibling = removeNode.nextSibling;
        }
        if (nextNode) {
          nextNode.previousSibling = removeNode.previousSibling;
        }
        removeNode.parent = null;
        removeNode.previousSibling = null;
        removeNode.nextSibling = null;
        removeNode.cachedIndex = -1;
        removeNode.cachedIndexVersion = NaN;
        if (parentNode) {
          parentNode.childrenChanged();
        }
        return removeObject;
      }
      /**
       * Insert the given object before the reference object.
       * `newObject` is now the previous sibling of `referenceObject`.
       *
       * * `O(1)`
       *
       * @method insertBefore
       * @memberOf module:symbol-tree#
       * @param {Object} referenceObject
       * @param {Object} newObject
       * @throws {Error} If the newObject is already present in this SymbolTree
       * @return {Object} newObject
       */
      insertBefore(referenceObject, newObject) {
        const referenceNode = this._node(referenceObject);
        const prevNode = this._node(referenceNode.previousSibling);
        const newNode = this._node(newObject);
        const parentNode = this._node(referenceNode.parent);
        if (newNode.isAttached) {
          throw Error("Given object is already present in this SymbolTree, remove it first");
        }
        newNode.parent = referenceNode.parent;
        newNode.previousSibling = referenceNode.previousSibling;
        newNode.nextSibling = referenceObject;
        referenceNode.previousSibling = newObject;
        if (prevNode) {
          prevNode.nextSibling = newObject;
        }
        if (parentNode && parentNode.firstChild === referenceObject) {
          parentNode.firstChild = newObject;
        }
        if (parentNode) {
          parentNode.childrenChanged();
        }
        return newObject;
      }
      /**
       * Insert the given object after the reference object.
       * `newObject` is now the next sibling of `referenceObject`.
       *
       * * `O(1)`
       *
       * @method insertAfter
       * @memberOf module:symbol-tree#
       * @param {Object} referenceObject
       * @param {Object} newObject
       * @throws {Error} If the newObject is already present in this SymbolTree
       * @return {Object} newObject
       */
      insertAfter(referenceObject, newObject) {
        const referenceNode = this._node(referenceObject);
        const nextNode = this._node(referenceNode.nextSibling);
        const newNode = this._node(newObject);
        const parentNode = this._node(referenceNode.parent);
        if (newNode.isAttached) {
          throw Error("Given object is already present in this SymbolTree, remove it first");
        }
        newNode.parent = referenceNode.parent;
        newNode.previousSibling = referenceObject;
        newNode.nextSibling = referenceNode.nextSibling;
        referenceNode.nextSibling = newObject;
        if (nextNode) {
          nextNode.previousSibling = newObject;
        }
        if (parentNode && parentNode.lastChild === referenceObject) {
          parentNode.lastChild = newObject;
        }
        if (parentNode) {
          parentNode.childrenChanged();
        }
        return newObject;
      }
      /**
       * Insert the given object as the first child of the given reference object.
       * `newObject` is now the first child of `referenceObject`.
       *
       * * `O(1)`
       *
       * @method prependChild
       * @memberOf module:symbol-tree#
       * @param {Object} referenceObject
       * @param {Object} newObject
       * @throws {Error} If the newObject is already present in this SymbolTree
       * @return {Object} newObject
       */
      prependChild(referenceObject, newObject) {
        const referenceNode = this._node(referenceObject);
        const newNode = this._node(newObject);
        if (newNode.isAttached) {
          throw Error("Given object is already present in this SymbolTree, remove it first");
        }
        if (referenceNode.hasChildren) {
          this.insertBefore(referenceNode.firstChild, newObject);
        } else {
          newNode.parent = referenceObject;
          referenceNode.firstChild = newObject;
          referenceNode.lastChild = newObject;
          referenceNode.childrenChanged();
        }
        return newObject;
      }
      /**
       * Insert the given object as the last child of the given reference object.
       * `newObject` is now the last child of `referenceObject`.
       *
       * * `O(1)`
       *
       * @method appendChild
       * @memberOf module:symbol-tree#
       * @param {Object} referenceObject
       * @param {Object} newObject
       * @throws {Error} If the newObject is already present in this SymbolTree
       * @return {Object} newObject
       */
      appendChild(referenceObject, newObject) {
        const referenceNode = this._node(referenceObject);
        const newNode = this._node(newObject);
        if (newNode.isAttached) {
          throw Error("Given object is already present in this SymbolTree, remove it first");
        }
        if (referenceNode.hasChildren) {
          this.insertAfter(referenceNode.lastChild, newObject);
        } else {
          newNode.parent = referenceObject;
          referenceNode.firstChild = newObject;
          referenceNode.lastChild = newObject;
          referenceNode.childrenChanged();
        }
        return newObject;
      }
    };
    module.exports = SymbolTree;
    SymbolTree.TreePosition = TreePosition;
  }
});

// node_modules/.pnpm/punycode@1.4.1/node_modules/punycode/punycode.js
var require_punycode = __commonJS({
  "node_modules/.pnpm/punycode@1.4.1/node_modules/punycode/punycode.js"(exports, module) {
    (function(root) {
      var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
      var freeModule = typeof module == "object" && module && !module.nodeType && module;
      var freeGlobal = typeof global == "object" && global;
      if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) {
        root = freeGlobal;
      }
      var punycode, maxInt = 2147483647, base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, delimiter = "-", regexPunycode = /^xn--/, regexNonASCII = /[^\x20-\x7E]/, regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, errors = {
        "overflow": "Overflow: input needs wider integers to process",
        "not-basic": "Illegal input >= 0x80 (not a basic code point)",
        "invalid-input": "Invalid input"
      }, baseMinusTMin = base - tMin, floor = Math.floor, stringFromCharCode = String.fromCharCode, key;
      function error(type) {
        throw new RangeError(errors[type]);
      }
      function map3(array, fn) {
        var length = array.length;
        var result = [];
        while (length--) {
          result[length] = fn(array[length]);
        }
        return result;
      }
      function mapDomain(string, fn) {
        var parts = string.split("@");
        var result = "";
        if (parts.length > 1) {
          result = parts[0] + "@";
          string = parts[1];
        }
        string = string.replace(regexSeparators, ".");
        var labels = string.split(".");
        var encoded = map3(labels, fn).join(".");
        return result + encoded;
      }
      function ucs2decode(string) {
        var output = [], counter = 0, length = string.length, value, extra;
        while (counter < length) {
          value = string.charCodeAt(counter++);
          if (value >= 55296 && value <= 56319 && counter < length) {
            extra = string.charCodeAt(counter++);
            if ((extra & 64512) == 56320) {
              output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
            } else {
              output.push(value);
              counter--;
            }
          } else {
            output.push(value);
          }
        }
        return output;
      }
      function ucs2encode(array) {
        return map3(array, function(value) {
          var output = "";
          if (value > 65535) {
            value -= 65536;
            output += stringFromCharCode(value >>> 10 & 1023 | 55296);
            value = 56320 | value & 1023;
          }
          output += stringFromCharCode(value);
          return output;
        }).join("");
      }
      function basicToDigit(codePoint) {
        if (codePoint - 48 < 10) {
          return codePoint - 22;
        }
        if (codePoint - 65 < 26) {
          return codePoint - 65;
        }
        if (codePoint - 97 < 26) {
          return codePoint - 97;
        }
        return base;
      }
      function digitToBasic(digit, flag) {
        return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
      }
      function adapt(delta, numPoints, firstTime) {
        var k = 0;
        delta = firstTime ? floor(delta / damp) : delta >> 1;
        delta += floor(delta / numPoints);
        for (; delta > baseMinusTMin * tMax >> 1; k += base) {
          delta = floor(delta / baseMinusTMin);
        }
        return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
      }
      function decode2(input) {
        var output = [], inputLength = input.length, out, i = 0, n = initialN, bias = initialBias, basic, j, index, oldi, w, k, digit, t, baseMinusT;
        basic = input.lastIndexOf(delimiter);
        if (basic < 0) {
          basic = 0;
        }
        for (j = 0; j < basic; ++j) {
          if (input.charCodeAt(j) >= 128) {
            error("not-basic");
          }
          output.push(input.charCodeAt(j));
        }
        for (index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
          for (oldi = i, w = 1, k = base; ; k += base) {
            if (index >= inputLength) {
              error("invalid-input");
            }
            digit = basicToDigit(input.charCodeAt(index++));
            if (digit >= base || digit > floor((maxInt - i) / w)) {
              error("overflow");
            }
            i += digit * w;
            t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
            if (digit < t) {
              break;
            }
            baseMinusT = base - t;
            if (w > floor(maxInt / baseMinusT)) {
              error("overflow");
            }
            w *= baseMinusT;
          }
          out = output.length + 1;
          bias = adapt(i - oldi, out, oldi == 0);
          if (floor(i / out) > maxInt - n) {
            error("overflow");
          }
          n += floor(i / out);
          i %= out;
          output.splice(i++, 0, n);
        }
        return ucs2encode(output);
      }
      function encode2(input) {
        var n, delta, handledCPCount, basicLength, bias, j, m, q, k, t, currentValue, output = [], inputLength, handledCPCountPlusOne, baseMinusT, qMinusT;
        input = ucs2decode(input);
        inputLength = input.length;
        n = initialN;
        delta = 0;
        bias = initialBias;
        for (j = 0; j < inputLength; ++j) {
          currentValue = input[j];
          if (currentValue < 128) {
            output.push(stringFromCharCode(currentValue));
          }
        }
        handledCPCount = basicLength = output.length;
        if (basicLength) {
          output.push(delimiter);
        }
        while (handledCPCount < inputLength) {
          for (m = maxInt, j = 0; j < inputLength; ++j) {
            currentValue = input[j];
            if (currentValue >= n && currentValue < m) {
              m = currentValue;
            }
          }
          handledCPCountPlusOne = handledCPCount + 1;
          if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
            error("overflow");
          }
          delta += (m - n) * handledCPCountPlusOne;
          n = m;
          for (j = 0; j < inputLength; ++j) {
            currentValue = input[j];
            if (currentValue < n && ++delta > maxInt) {
              error("overflow");
            }
            if (currentValue == n) {
              for (q = delta, k = base; ; k += base) {
                t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
                if (q < t) {
                  break;
                }
                qMinusT = q - t;
                baseMinusT = base - t;
                output.push(
                  stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
                );
                q = floor(qMinusT / baseMinusT);
              }
              output.push(stringFromCharCode(digitToBasic(q, 0)));
              bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
              delta = 0;
              ++handledCPCount;
            }
          }
          ++delta;
          ++n;
        }
        return output.join("");
      }
      function toUnicode(input) {
        return mapDomain(input, function(string) {
          return regexPunycode.test(string) ? decode2(string.slice(4).toLowerCase()) : string;
        });
      }
      function toASCII(input) {
        return mapDomain(input, function(string) {
          return regexNonASCII.test(string) ? "xn--" + encode2(string) : string;
        });
      }
      punycode = {
        /**
         * A string representing the current Punycode.js version number.
         * @memberOf punycode
         * @type String
         */
        "version": "1.4.1",
        /**
         * An object of methods to convert from JavaScript's internal character
         * representation (UCS-2) to Unicode code points, and back.
         * @see <https://mathiasbynens.be/notes/javascript-encoding>
         * @memberOf punycode
         * @type Object
         */
        "ucs2": {
          "decode": ucs2decode,
          "encode": ucs2encode
        },
        "decode": decode2,
        "encode": encode2,
        "toASCII": toASCII,
        "toUnicode": toUnicode
      };
      if (typeof define == "function" && typeof define.amd == "object" && define.amd) {
        define("punycode", function() {
          return punycode;
        });
      } else if (freeExports && freeModule) {
        if (module.exports == freeExports) {
          freeModule.exports = punycode;
        } else {
          for (key in punycode) {
            punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
          }
        }
      } else {
        root.punycode = punycode;
      }
    })(exports);
  }
});

// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js
var require_es_errors = __commonJS({
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports, module) {
    "use strict";
    module.exports = Error;
  }
});

// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js
var require_eval = __commonJS({
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports, module) {
    "use strict";
    module.exports = EvalError;
  }
});

// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js
var require_range = __commonJS({
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports, module) {
    "use strict";
    module.exports = RangeError;
  }
});

// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js
var require_ref = __commonJS({
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports, module) {
    "use strict";
    module.exports = ReferenceError;
  }
});

// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js
var require_syntax = __commonJS({
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports, module) {
    "use strict";
    module.exports = SyntaxError;
  }
});

// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js
var require_type = __commonJS({
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports, module) {
    "use strict";
    module.exports = TypeError;
  }
});

// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js
var require_uri = __commonJS({
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports, module) {
    "use strict";
    module.exports = URIError;
  }
});

// node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js
var require_shams = __commonJS({
  "node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(exports, module) {
    "use strict";
    module.exports = function hasSymbols() {
      if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
        return false;
      }
      if (typeof Symbol.iterator === "symbol") {
        return true;
      }
      var obj = {};
      var sym = Symbol("test");
      var symObj = Object(sym);
      if (typeof sym === "string") {
        return false;
      }
      if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
        return false;
      }
      if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
        return false;
      }
      var symVal = 42;
      obj[sym] = symVal;
      for (sym in obj) {
        return false;
      }
      if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
        return false;
      }
      if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
        return false;
      }
      var syms = Object.getOwnPropertySymbols(obj);
      if (syms.length !== 1 || syms[0] !== sym) {
        return false;
      }
      if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
        return false;
      }
      if (typeof Object.getOwnPropertyDescriptor === "function") {
        var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
        if (descriptor.value !== symVal || descriptor.enumerable !== true) {
          return false;
        }
      }
      return true;
    };
  }
});

// node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js
var require_has_symbols = __commonJS({
  "node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js"(exports, module) {
    "use strict";
    var origSymbol = typeof Symbol !== "undefined" && Symbol;
    var hasSymbolSham = require_shams();
    module.exports = function hasNativeSymbols() {
      if (typeof origSymbol !== "function") {
        return false;
      }
      if (typeof Symbol !== "function") {
        return false;
      }
      if (typeof origSymbol("foo") !== "symbol") {
        return false;
      }
      if (typeof Symbol("bar") !== "symbol") {
        return false;
      }
      return hasSymbolSham();
    };
  }
});

// node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js
var require_has_proto = __commonJS({
  "node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js"(exports, module) {
    "use strict";
    var test = {
      __proto__: null,
      foo: {}
    };
    var $Object = Object;
    module.exports = function hasProto() {
      return { __proto__: test }.foo === test.foo && !(test instanceof $Object);
    };
  }
});

// node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js
var require_implementation = __commonJS({
  "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module) {
    "use strict";
    var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
    var toStr = Object.prototype.toString;
    var max = Math.max;
    var funcType = "[object Function]";
    var concatty = function concatty2(a, b) {
      var arr = [];
      for (var i = 0; i < a.length; i += 1) {
        arr[i] = a[i];
      }
      for (var j = 0; j < b.length; j += 1) {
        arr[j + a.length] = b[j];
      }
      return arr;
    };
    var slicy = function slicy2(arrLike, offset) {
      var arr = [];
      for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
        arr[j] = arrLike[i];
      }
      return arr;
    };
    var joiny = function(arr, joiner) {
      var str = "";
      for (var i = 0; i < arr.length; i += 1) {
        str += arr[i];
        if (i + 1 < arr.length) {
          str += joiner;
        }
      }
      return str;
    };
    module.exports = function bind2(that) {
      var target = this;
      if (typeof target !== "function" || toStr.apply(target) !== funcType) {
        throw new TypeError(ERROR_MESSAGE + target);
      }
      var args = slicy(arguments, 1);
      var bound;
      var binder = function() {
        if (this instanceof bound) {
          var result = target.apply(
            this,
            concatty(args, arguments)
          );
          if (Object(result) === result) {
            return result;
          }
          return this;
        }
        return target.apply(
          that,
          concatty(args, arguments)
        );
      };
      var boundLength = max(0, target.length - args.length);
      var boundArgs = [];
      for (var i = 0; i < boundLength; i++) {
        boundArgs[i] = "$" + i;
      }
      bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
      if (target.prototype) {
        var Empty = function Empty2() {
        };
        Empty.prototype = target.prototype;
        bound.prototype = new Empty();
        Empty.prototype = null;
      }
      return bound;
    };
  }
});

// node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js
var require_function_bind = __commonJS({
  "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module) {
    "use strict";
    var implementation = require_implementation();
    module.exports = Function.prototype.bind || implementation;
  }
});

// node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js
var require_hasown = __commonJS({
  "node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports, module) {
    "use strict";
    var call = Function.prototype.call;
    var $hasOwn = Object.prototype.hasOwnProperty;
    var bind2 = require_function_bind();
    module.exports = bind2.call(call, $hasOwn);
  }
});

// node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js
var require_get_intrinsic = __commonJS({
  "node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js"(exports, module) {
    "use strict";
    var undefined2;
    var $Error = require_es_errors();
    var $EvalError = require_eval();
    var $RangeError = require_range();
    var $ReferenceError = require_ref();
    var $SyntaxError = require_syntax();
    var $TypeError = require_type();
    var $URIError = require_uri();
    var $Function = Function;
    var getEvalledConstructor = function(expressionSyntax) {
      try {
        return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
      } catch (e) {
      }
    };
    var $gOPD = Object.getOwnPropertyDescriptor;
    if ($gOPD) {
      try {
        $gOPD({}, "");
      } catch (e) {
        $gOPD = null;
      }
    }
    var throwTypeError = function() {
      throw new $TypeError();
    };
    var ThrowTypeError = $gOPD ? function() {
      try {
        arguments.callee;
        return throwTypeError;
      } catch (calleeThrows) {
        try {
          return $gOPD(arguments, "callee").get;
        } catch (gOPDthrows) {
          return throwTypeError;
        }
      }
    }() : throwTypeError;
    var hasSymbols = require_has_symbols()();
    var hasProto = require_has_proto()();
    var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
      return x.__proto__;
    } : null);
    var needsEval = {};
    var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
    var INTRINSICS = {
      __proto__: null,
      "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
      "%Array%": Array,
      "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
      "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
      "%AsyncFromSyncIteratorPrototype%": undefined2,
      "%AsyncFunction%": needsEval,
      "%AsyncGenerator%": needsEval,
      "%AsyncGeneratorFunction%": needsEval,
      "%AsyncIteratorPrototype%": needsEval,
      "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
      "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
      "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
      "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
      "%Boolean%": Boolean,
      "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
      "%Date%": Date,
      "%decodeURI%": decodeURI,
      "%decodeURIComponent%": decodeURIComponent,
      "%encodeURI%": encodeURI,
      "%encodeURIComponent%": encodeURIComponent,
      "%Error%": $Error,
      "%eval%": eval,
      // eslint-disable-line no-eval
      "%EvalError%": $EvalError,
      "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
      "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
      "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
      "%Function%": $Function,
      "%GeneratorFunction%": needsEval,
      "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
      "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
      "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
      "%isFinite%": isFinite,
      "%isNaN%": isNaN,
      "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
      "%JSON%": typeof JSON === "object" ? JSON : undefined2,
      "%Map%": typeof Map === "undefined" ? undefined2 : Map,
      "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
      "%Math%": Math,
      "%Number%": Number,
      "%Object%": Object,
      "%parseFloat%": parseFloat,
      "%parseInt%": parseInt,
      "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
      "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
      "%RangeError%": $RangeError,
      "%ReferenceError%": $ReferenceError,
      "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
      "%RegExp%": RegExp,
      "%Set%": typeof Set === "undefined" ? undefined2 : Set,
      "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
      "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
      "%String%": String,
      "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
      "%Symbol%": hasSymbols ? Symbol : undefined2,
      "%SyntaxError%": $SyntaxError,
      "%ThrowTypeError%": ThrowTypeError,
      "%TypedArray%": TypedArray,
      "%TypeError%": $TypeError,
      "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
      "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
      "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
      "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
      "%URIError%": $URIError,
      "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
      "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
      "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
    };
    if (getProto) {
      try {
        null.error;
      } catch (e) {
        errorProto = getProto(getProto(e));
        INTRINSICS["%Error.prototype%"] = errorProto;
      }
    }
    var errorProto;
    var doEval = function doEval2(name) {
      var value;
      if (name === "%AsyncFunction%") {
        value = getEvalledConstructor("async function () {}");
      } else if (name === "%GeneratorFunction%") {
        value = getEvalledConstructor("function* () {}");
      } else if (name === "%AsyncGeneratorFunction%") {
        value = getEvalledConstructor("async function* () {}");
      } else if (name === "%AsyncGenerator%") {
        var fn = doEval2("%AsyncGeneratorFunction%");
        if (fn) {
          value = fn.prototype;
        }
      } else if (name === "%AsyncIteratorPrototype%") {
        var gen = doEval2("%AsyncGenerator%");
        if (gen && getProto) {
          value = getProto(gen.prototype);
        }
      }
      INTRINSICS[name] = value;
      return value;
    };
    var LEGACY_ALIASES = {
      __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"]
    };
    var bind2 = require_function_bind();
    var hasOwn = require_hasown();
    var $concat = bind2.call(Function.call, Array.prototype.concat);
    var $spliceApply = bind2.call(Function.apply, Array.prototype.splice);
    var $replace = bind2.call(Function.call, String.prototype.replace);
    var $strSlice = bind2.call(Function.call, String.prototype.slice);
    var $exec = bind2.call(Function.call, RegExp.prototype.exec);
    var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
    var reEscapeChar = /\\(\\)?/g;
    var stringToPath = function stringToPath2(string) {
      var first = $strSlice(string, 0, 1);
      var last2 = $strSlice(string, -1);
      if (first === "%" && last2 !== "%") {
        throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
      } else if (last2 === "%" && first !== "%") {
        throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
      }
      var result = [];
      $replace(string, rePropName, function(match, number, quote, subString) {
        result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
      });
      return result;
    };
    var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
      var intrinsicName = name;
      var alias;
      if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
        alias = LEGACY_ALIASES[intrinsicName];
        intrinsicName = "%" + alias[0] + "%";
      }
      if (hasOwn(INTRINSICS, intrinsicName)) {
        var value = INTRINSICS[intrinsicName];
        if (value === needsEval) {
          value = doEval(intrinsicName);
        }
        if (typeof value === "undefined" && !allowMissing) {
          throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
        }
        return {
          alias,
          name: intrinsicName,
          value
        };
      }
      throw new $SyntaxError("intrinsic " + name + " does not exist!");
    };
    module.exports = function GetIntrinsic(name, allowMissing) {
      if (typeof name !== "string" || name.length === 0) {
        throw new $TypeError("intrinsic name must be a non-empty string");
      }
      if (arguments.length > 1 && typeof allowMissing !== "boolean") {
        throw new $TypeError('"allowMissing" argument must be a boolean');
      }
      if ($exec(/^%?[^%]*%?$/, name) === null) {
        throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
      }
      var parts = stringToPath(name);
      var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
      var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
      var intrinsicRealName = intrinsic.name;
      var value = intrinsic.value;
      var skipFurtherCaching = false;
      var alias = intrinsic.alias;
      if (alias) {
        intrinsicBaseName = alias[0];
        $spliceApply(parts, $concat([0, 1], alias));
      }
      for (var i = 1, isOwn = true; i < parts.length; i += 1) {
        var part = parts[i];
        var first = $strSlice(part, 0, 1);
        var last2 = $strSlice(part, -1);
        if ((first === '"' || first === "'" || first === "`" || (last2 === '"' || last2 === "'" || last2 === "`")) && first !== last2) {
          throw new $SyntaxError("property names with quotes must have matching quotes");
        }
        if (part === "constructor" || !isOwn) {
          skipFurtherCaching = true;
        }
        intrinsicBaseName += "." + part;
        intrinsicRealName = "%" + intrinsicBaseName + "%";
        if (hasOwn(INTRINSICS, intrinsicRealName)) {
          value = INTRINSICS[intrinsicRealName];
        } else if (value != null) {
          if (!(part in value)) {
            if (!allowMissing) {
              throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
            }
            return void 0;
          }
          if ($gOPD && i + 1 >= parts.length) {
            var desc = $gOPD(value, part);
            isOwn = !!desc;
            if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
              value = desc.get;
            } else {
              value = value[part];
            }
          } else {
            isOwn = hasOwn(value, part);
            value = value[part];
          }
          if (isOwn && !skipFurtherCaching) {
            INTRINSICS[intrinsicRealName] = value;
          }
        }
      }
      return value;
    };
  }
});

// node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js
var require_es_define_property = __commonJS({
  "node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js"(exports, module) {
    "use strict";
    var GetIntrinsic = require_get_intrinsic();
    var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false;
    if ($defineProperty) {
      try {
        $defineProperty({}, "a", { value: 1 });
      } catch (e) {
        $defineProperty = false;
      }
    }
    module.exports = $defineProperty;
  }
});

// node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js
var require_gopd = __commonJS({
  "node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(exports, module) {
    "use strict";
    var GetIntrinsic = require_get_intrinsic();
    var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
    if ($gOPD) {
      try {
        $gOPD([], "length");
      } catch (e) {
        $gOPD = null;
      }
    }
    module.exports = $gOPD;
  }
});

// node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js
var require_define_data_property = __commonJS({
  "node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js"(exports, module) {
    "use strict";
    var $defineProperty = require_es_define_property();
    var $SyntaxError = require_syntax();
    var $TypeError = require_type();
    var gopd = require_gopd();
    module.exports = function defineDataProperty(obj, property, value) {
      if (!obj || typeof obj !== "object" && typeof obj !== "function") {
        throw new $TypeError("`obj` must be an object or a function`");
      }
      if (typeof property !== "string" && typeof property !== "symbol") {
        throw new $TypeError("`property` must be a string or a symbol`");
      }
      if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
        throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
      }
      if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
        throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
      }
      if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
        throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
      }
      if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
        throw new $TypeError("`loose`, if provided, must be a boolean");
      }
      var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
      var nonWritable = arguments.length > 4 ? arguments[4] : null;
      var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
      var loose = arguments.length > 6 ? arguments[6] : false;
      var desc = !!gopd && gopd(obj, property);
      if ($defineProperty) {
        $defineProperty(obj, property, {
          configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
          enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
          value,
          writable: nonWritable === null && desc ? desc.writable : !nonWritable
        });
      } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
        obj[property] = value;
      } else {
        throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
      }
    };
  }
});

// node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js
var require_has_property_descriptors = __commonJS({
  "node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js"(exports, module) {
    "use strict";
    var $defineProperty = require_es_define_property();
    var hasPropertyDescriptors = function hasPropertyDescriptors2() {
      return !!$defineProperty;
    };
    hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
      if (!$defineProperty) {
        return null;
      }
      try {
        return $defineProperty([], "length", { value: 1 }).length !== 1;
      } catch (e) {
        return true;
      }
    };
    module.exports = hasPropertyDescriptors;
  }
});

// node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js
var require_set_function_length = __commonJS({
  "node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js"(exports, module) {
    "use strict";
    var GetIntrinsic = require_get_intrinsic();
    var define2 = require_define_data_property();
    var hasDescriptors = require_has_property_descriptors()();
    var gOPD = require_gopd();
    var $TypeError = require_type();
    var $floor = GetIntrinsic("%Math.floor%");
    module.exports = function setFunctionLength(fn, length) {
      if (typeof fn !== "function") {
        throw new $TypeError("`fn` is not a function");
      }
      if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
        throw new $TypeError("`length` must be a positive 32-bit integer");
      }
      var loose = arguments.length > 2 && !!arguments[2];
      var functionLengthIsConfigurable = true;
      var functionLengthIsWritable = true;
      if ("length" in fn && gOPD) {
        var desc = gOPD(fn, "length");
        if (desc && !desc.configurable) {
          functionLengthIsConfigurable = false;
        }
        if (desc && !desc.writable) {
          functionLengthIsWritable = false;
        }
      }
      if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
        if (hasDescriptors) {
          define2(
            /** @type {Parameters<define>[0]} */
            fn,
            "length",
            length,
            true,
            true
          );
        } else {
          define2(
            /** @type {Parameters<define>[0]} */
            fn,
            "length",
            length
          );
        }
      }
      return fn;
    };
  }
});

// node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js
var require_call_bind = __commonJS({
  "node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js"(exports, module) {
    "use strict";
    var bind2 = require_function_bind();
    var GetIntrinsic = require_get_intrinsic();
    var setFunctionLength = require_set_function_length();
    var $TypeError = require_type();
    var $apply = GetIntrinsic("%Function.prototype.apply%");
    var $call = GetIntrinsic("%Function.prototype.call%");
    var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind2.call($call, $apply);
    var $defineProperty = require_es_define_property();
    var $max = GetIntrinsic("%Math.max%");
    module.exports = function callBind(originalFunction) {
      if (typeof originalFunction !== "function") {
        throw new $TypeError("a function is required");
      }
      var func = $reflectApply(bind2, $call, arguments);
      return setFunctionLength(
        func,
        1 + $max(0, originalFunction.length - (arguments.length - 1)),
        true
      );
    };
    var applyBind = function applyBind2() {
      return $reflectApply(bind2, $apply, arguments);
    };
    if ($defineProperty) {
      $defineProperty(module.exports, "apply", { value: applyBind });
    } else {
      module.exports.apply = applyBind;
    }
  }
});

// node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js
var require_callBound = __commonJS({
  "node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js"(exports, module) {
    "use strict";
    var GetIntrinsic = require_get_intrinsic();
    var callBind = require_call_bind();
    var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
    module.exports = function callBoundIntrinsic(name, allowMissing) {
      var intrinsic = GetIntrinsic(name, !!allowMissing);
      if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
        return callBind(intrinsic);
      }
      return intrinsic;
    };
  }
});

// (disabled):node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/util.inspect
var require_util = __commonJS({
  "(disabled):node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/util.inspect"() {
  }
});

// node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.js
var require_object_inspect = __commonJS({
  "node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.js"(exports, module) {
    var hasMap = typeof Map === "function" && Map.prototype;
    var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
    var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
    var mapForEach = hasMap && Map.prototype.forEach;
    var hasSet = typeof Set === "function" && Set.prototype;
    var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
    var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
    var setForEach = hasSet && Set.prototype.forEach;
    var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
    var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
    var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
    var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
    var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
    var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
    var booleanValueOf = Boolean.prototype.valueOf;
    var objectToString2 = Object.prototype.toString;
    var functionToString = Function.prototype.toString;
    var $match = String.prototype.match;
    var $slice = String.prototype.slice;
    var $replace = String.prototype.replace;
    var $toUpperCase = String.prototype.toUpperCase;
    var $toLowerCase = String.prototype.toLowerCase;
    var $test = RegExp.prototype.test;
    var $concat = Array.prototype.concat;
    var $join = Array.prototype.join;
    var $arrSlice = Array.prototype.slice;
    var $floor = Math.floor;
    var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
    var gOPS = Object.getOwnPropertySymbols;
    var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
    var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
    var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
    var isEnumerable = Object.prototype.propertyIsEnumerable;
    var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
      return O.__proto__;
    } : null);
    function addNumericSeparator(num, str) {
      if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
        return str;
      }
      var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
      if (typeof num === "number") {
        var int = num < 0 ? -$floor(-num) : $floor(num);
        if (int !== num) {
          var intStr = String(int);
          var dec = $slice.call(str, intStr.length + 1);
          return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
        }
      }
      return $replace.call(str, sepRegex, "$&_");
    }
    var utilInspect = require_util();
    var inspectCustom = utilInspect.custom;
    var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
    module.exports = function inspect_(obj, options, depth, seen) {
      var opts = options || {};
      if (has(opts, "quoteStyle") && (opts.quoteStyle !== "single" && opts.quoteStyle !== "double")) {
        throw new TypeError('option "quoteStyle" must be "single" or "double"');
      }
      if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
        throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
      }
      var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
      if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
        throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
      }
      if (has(opts, "indent") && opts.indent !== null && opts.indent !== "	" && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
        throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
      }
      if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
        throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
      }
      var numericSeparator = opts.numericSeparator;
      if (typeof obj === "undefined") {
        return "undefined";
      }
      if (obj === null) {
        return "null";
      }
      if (typeof obj === "boolean") {
        return obj ? "true" : "false";
      }
      if (typeof obj === "string") {
        return inspectString(obj, opts);
      }
      if (typeof obj === "number") {
        if (obj === 0) {
          return Infinity / obj > 0 ? "0" : "-0";
        }
        var str = String(obj);
        return numericSeparator ? addNumericSeparator(obj, str) : str;
      }
      if (typeof obj === "bigint") {
        var bigIntStr = String(obj) + "n";
        return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
      }
      var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
      if (typeof depth === "undefined") {
        depth = 0;
      }
      if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
        return isArray3(obj) ? "[Array]" : "[Object]";
      }
      var indent2 = getIndent(opts, depth);
      if (typeof seen === "undefined") {
        seen = [];
      } else if (indexOf(seen, obj) >= 0) {
        return "[Circular]";
      }
      function inspect(value, from2, noIndent) {
        if (from2) {
          seen = $arrSlice.call(seen);
          seen.push(from2);
        }
        if (noIndent) {
          var newOpts = {
            depth: opts.depth
          };
          if (has(opts, "quoteStyle")) {
            newOpts.quoteStyle = opts.quoteStyle;
          }
          return inspect_(value, newOpts, depth + 1, seen);
        }
        return inspect_(value, opts, depth + 1, seen);
      }
      if (typeof obj === "function" && !isRegExp(obj)) {
        var name = nameOf(obj);
        var keys = arrObjKeys(obj, inspect);
        return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
      }
      if (isSymbol(obj)) {
        var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
        return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
      }
      if (isElement(obj)) {
        var s = "<" + $toLowerCase.call(String(obj.nodeName));
        var attrs = obj.attributes || [];
        for (var i = 0; i < attrs.length; i++) {
          s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
        }
        s += ">";
        if (obj.childNodes && obj.childNodes.length) {
          s += "...";
        }
        s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
        return s;
      }
      if (isArray3(obj)) {
        if (obj.length === 0) {
          return "[]";
        }
        var xs = arrObjKeys(obj, inspect);
        if (indent2 && !singleLineValues(xs)) {
          return "[" + indentedJoin(xs, indent2) + "]";
        }
        return "[ " + $join.call(xs, ", ") + " ]";
      }
      if (isError(obj)) {
        var parts = arrObjKeys(obj, inspect);
        if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
          return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
        }
        if (parts.length === 0) {
          return "[" + String(obj) + "]";
        }
        return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
      }
      if (typeof obj === "object" && customInspect) {
        if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
          return utilInspect(obj, { depth: maxDepth - depth });
        } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
          return obj.inspect();
        }
      }
      if (isMap(obj)) {
        var mapParts = [];
        if (mapForEach) {
          mapForEach.call(obj, function(value, key) {
            mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
          });
        }
        return collectionOf("Map", mapSize.call(obj), mapParts, indent2);
      }
      if (isSet(obj)) {
        var setParts = [];
        if (setForEach) {
          setForEach.call(obj, function(value) {
            setParts.push(inspect(value, obj));
          });
        }
        return collectionOf("Set", setSize.call(obj), setParts, indent2);
      }
      if (isWeakMap(obj)) {
        return weakCollectionOf("WeakMap");
      }
      if (isWeakSet(obj)) {
        return weakCollectionOf("WeakSet");
      }
      if (isWeakRef(obj)) {
        return weakCollectionOf("WeakRef");
      }
      if (isNumber(obj)) {
        return markBoxed(inspect(Number(obj)));
      }
      if (isBigInt(obj)) {
        return markBoxed(inspect(bigIntValueOf.call(obj)));
      }
      if (isBoolean(obj)) {
        return markBoxed(booleanValueOf.call(obj));
      }
      if (isString2(obj)) {
        return markBoxed(inspect(String(obj)));
      }
      if (typeof window !== "undefined" && obj === window) {
        return "{ [object Window] }";
      }
      if (obj === global) {
        return "{ [object globalThis] }";
      }
      if (!isDate(obj) && !isRegExp(obj)) {
        var ys = arrObjKeys(obj, inspect);
        var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
        var protoTag = obj instanceof Object ? "" : "null prototype";
        var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
        var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
        var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
        if (ys.length === 0) {
          return tag + "{}";
        }
        if (indent2) {
          return tag + "{" + indentedJoin(ys, indent2) + "}";
        }
        return tag + "{ " + $join.call(ys, ", ") + " }";
      }
      return String(obj);
    };
    function wrapQuotes(s, defaultStyle, opts) {
      var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'";
      return quoteChar + s + quoteChar;
    }
    function quote(s) {
      return $replace.call(String(s), /"/g, "&quot;");
    }
    function isArray3(obj) {
      return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
    }
    function isDate(obj) {
      return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
    }
    function isRegExp(obj) {
      return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
    }
    function isError(obj) {
      return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
    }
    function isString2(obj) {
      return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
    }
    function isNumber(obj) {
      return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
    }
    function isBoolean(obj) {
      return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
    }
    function isSymbol(obj) {
      if (hasShammedSymbols) {
        return obj && typeof obj === "object" && obj instanceof Symbol;
      }
      if (typeof obj === "symbol") {
        return true;
      }
      if (!obj || typeof obj !== "object" || !symToString) {
        return false;
      }
      try {
        symToString.call(obj);
        return true;
      } catch (e) {
      }
      return false;
    }
    function isBigInt(obj) {
      if (!obj || typeof obj !== "object" || !bigIntValueOf) {
        return false;
      }
      try {
        bigIntValueOf.call(obj);
        return true;
      } catch (e) {
      }
      return false;
    }
    var hasOwn = Object.prototype.hasOwnProperty || function(key) {
      return key in this;
    };
    function has(obj, key) {
      return hasOwn.call(obj, key);
    }
    function toStr(obj) {
      return objectToString2.call(obj);
    }
    function nameOf(f) {
      if (f.name) {
        return f.name;
      }
      var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
      if (m) {
        return m[1];
      }
      return null;
    }
    function indexOf(xs, x) {
      if (xs.indexOf) {
        return xs.indexOf(x);
      }
      for (var i = 0, l = xs.length; i < l; i++) {
        if (xs[i] === x) {
          return i;
        }
      }
      return -1;
    }
    function isMap(x) {
      if (!mapSize || !x || typeof x !== "object") {
        return false;
      }
      try {
        mapSize.call(x);
        try {
          setSize.call(x);
        } catch (s) {
          return true;
        }
        return x instanceof Map;
      } catch (e) {
      }
      return false;
    }
    function isWeakMap(x) {
      if (!weakMapHas || !x || typeof x !== "object") {
        return false;
      }
      try {
        weakMapHas.call(x, weakMapHas);
        try {
          weakSetHas.call(x, weakSetHas);
        } catch (s) {
          return true;
        }
        return x instanceof WeakMap;
      } catch (e) {
      }
      return false;
    }
    function isWeakRef(x) {
      if (!weakRefDeref || !x || typeof x !== "object") {
        return false;
      }
      try {
        weakRefDeref.call(x);
        return true;
      } catch (e) {
      }
      return false;
    }
    function isSet(x) {
      if (!setSize || !x || typeof x !== "object") {
        return false;
      }
      try {
        setSize.call(x);
        try {
          mapSize.call(x);
        } catch (m) {
          return true;
        }
        return x instanceof Set;
      } catch (e) {
      }
      return false;
    }
    function isWeakSet(x) {
      if (!weakSetHas || !x || typeof x !== "object") {
        return false;
      }
      try {
        weakSetHas.call(x, weakSetHas);
        try {
          weakMapHas.call(x, weakMapHas);
        } catch (s) {
          return true;
        }
        return x instanceof WeakSet;
      } catch (e) {
      }
      return false;
    }
    function isElement(x) {
      if (!x || typeof x !== "object") {
        return false;
      }
      if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
        return true;
      }
      return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
    }
    function inspectString(str, opts) {
      if (str.length > opts.maxStringLength) {
        var remaining = str.length - opts.maxStringLength;
        var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
        return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
      }
      var s = $replace.call($replace.call(str, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte);
      return wrapQuotes(s, "single", opts);
    }
    function lowbyte(c) {
      var n = c.charCodeAt(0);
      var x = {
        8: "b",
        9: "t",
        10: "n",
        12: "f",
        13: "r"
      }[n];
      if (x) {
        return "\\" + x;
      }
      return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
    }
    function markBoxed(str) {
      return "Object(" + str + ")";
    }
    function weakCollectionOf(type) {
      return type + " { ? }";
    }
    function collectionOf(type, size, entries, indent2) {
      var joinedEntries = indent2 ? indentedJoin(entries, indent2) : $join.call(entries, ", ");
      return type + " (" + size + ") {" + joinedEntries + "}";
    }
    function singleLineValues(xs) {
      for (var i = 0; i < xs.length; i++) {
        if (indexOf(xs[i], "\n") >= 0) {
          return false;
        }
      }
      return true;
    }
    function getIndent(opts, depth) {
      var baseIndent;
      if (opts.indent === "	") {
        baseIndent = "	";
      } else if (typeof opts.indent === "number" && opts.indent > 0) {
        baseIndent = $join.call(Array(opts.indent + 1), " ");
      } else {
        return null;
      }
      return {
        base: baseIndent,
        prev: $join.call(Array(depth + 1), baseIndent)
      };
    }
    function indentedJoin(xs, indent2) {
      if (xs.length === 0) {
        return "";
      }
      var lineJoiner = "\n" + indent2.prev + indent2.base;
      return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent2.prev;
    }
    function arrObjKeys(obj, inspect) {
      var isArr = isArray3(obj);
      var xs = [];
      if (isArr) {
        xs.length = obj.length;
        for (var i = 0; i < obj.length; i++) {
          xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
        }
      }
      var syms = typeof gOPS === "function" ? gOPS(obj) : [];
      var symMap;
      if (hasShammedSymbols) {
        symMap = {};
        for (var k = 0; k < syms.length; k++) {
          symMap["$" + syms[k]] = syms[k];
        }
      }
      for (var key in obj) {
        if (!has(obj, key)) {
          continue;
        }
        if (isArr && String(Number(key)) === key && key < obj.length) {
          continue;
        }
        if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
          continue;
        } else if ($test.call(/[^\w$]/, key)) {
          xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
        } else {
          xs.push(key + ": " + inspect(obj[key], obj));
        }
      }
      if (typeof gOPS === "function") {
        for (var j = 0; j < syms.length; j++) {
          if (isEnumerable.call(obj, syms[j])) {
            xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
          }
        }
      }
      return xs;
    }
  }
});

// node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.js
var require_side_channel = __commonJS({
  "node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.js"(exports, module) {
    "use strict";
    var GetIntrinsic = require_get_intrinsic();
    var callBound = require_callBound();
    var inspect = require_object_inspect();
    var $TypeError = require_type();
    var $WeakMap = GetIntrinsic("%WeakMap%", true);
    var $Map = GetIntrinsic("%Map%", true);
    var $weakMapGet = callBound("WeakMap.prototype.get", true);
    var $weakMapSet = callBound("WeakMap.prototype.set", true);
    var $weakMapHas = callBound("WeakMap.prototype.has", true);
    var $mapGet = callBound("Map.prototype.get", true);
    var $mapSet = callBound("Map.prototype.set", true);
    var $mapHas = callBound("Map.prototype.has", true);
    var listGetNode = function(list, key) {
      var prev = list;
      var curr;
      for (; (curr = prev.next) !== null; prev = curr) {
        if (curr.key === key) {
          prev.next = curr.next;
          curr.next = /** @type {NonNullable<typeof list.next>} */
          list.next;
          list.next = curr;
          return curr;
        }
      }
    };
    var listGet = function(objects, key) {
      var node = listGetNode(objects, key);
      return node && node.value;
    };
    var listSet = function(objects, key, value) {
      var node = listGetNode(objects, key);
      if (node) {
        node.value = value;
      } else {
        objects.next = /** @type {import('.').ListNode<typeof value>} */
        {
          // eslint-disable-line no-param-reassign, no-extra-parens
          key,
          next: objects.next,
          value
        };
      }
    };
    var listHas = function(objects, key) {
      return !!listGetNode(objects, key);
    };
    module.exports = function getSideChannel() {
      var $wm;
      var $m;
      var $o;
      var channel = {
        assert: function(key) {
          if (!channel.has(key)) {
            throw new $TypeError("Side channel does not contain " + inspect(key));
          }
        },
        get: function(key) {
          if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
            if ($wm) {
              return $weakMapGet($wm, key);
            }
          } else if ($Map) {
            if ($m) {
              return $mapGet($m, key);
            }
          } else {
            if ($o) {
              return listGet($o, key);
            }
          }
        },
        has: function(key) {
          if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
            if ($wm) {
              return $weakMapHas($wm, key);
            }
          } else if ($Map) {
            if ($m) {
              return $mapHas($m, key);
            }
          } else {
            if ($o) {
              return listHas($o, key);
            }
          }
          return false;
        },
        set: function(key, value) {
          if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
            if (!$wm) {
              $wm = new $WeakMap();
            }
            $weakMapSet($wm, key, value);
          } else if ($Map) {
            if (!$m) {
              $m = new $Map();
            }
            $mapSet($m, key, value);
          } else {
            if (!$o) {
              $o = { key: {}, next: null };
            }
            listSet($o, key, value);
          }
        }
      };
      return channel;
    };
  }
});

// node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/formats.js
var require_formats = __commonJS({
  "node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/formats.js"(exports, module) {
    "use strict";
    var replace = String.prototype.replace;
    var percentTwenties = /%20/g;
    var Format = {
      RFC1738: "RFC1738",
      RFC3986: "RFC3986"
    };
    module.exports = {
      "default": Format.RFC3986,
      formatters: {
        RFC1738: function(value) {
          return replace.call(value, percentTwenties, "+");
        },
        RFC3986: function(value) {
          return String(value);
        }
      },
      RFC1738: Format.RFC1738,
      RFC3986: Format.RFC3986
    };
  }
});

// node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/utils.js
var require_utils = __commonJS({
  "node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/utils.js"(exports, module) {
    "use strict";
    var formats = require_formats();
    var has = Object.prototype.hasOwnProperty;
    var isArray3 = Array.isArray;
    var hexTable = function() {
      var array = [];
      for (var i = 0; i < 256; ++i) {
        array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase());
      }
      return array;
    }();
    var compactQueue = function compactQueue2(queue) {
      while (queue.length > 1) {
        var item = queue.pop();
        var obj = item.obj[item.prop];
        if (isArray3(obj)) {
          var compacted = [];
          for (var j = 0; j < obj.length; ++j) {
            if (typeof obj[j] !== "undefined") {
              compacted.push(obj[j]);
            }
          }
          item.obj[item.prop] = compacted;
        }
      }
    };
    var arrayToObject = function arrayToObject2(source, options) {
      var obj = options && options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
      for (var i = 0; i < source.length; ++i) {
        if (typeof source[i] !== "undefined") {
          obj[i] = source[i];
        }
      }
      return obj;
    };
    var merge = function merge2(target, source, options) {
      if (!source) {
        return target;
      }
      if (typeof source !== "object") {
        if (isArray3(target)) {
          target.push(source);
        } else if (target && typeof target === "object") {
          if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
            target[source] = true;
          }
        } else {
          return [target, source];
        }
        return target;
      }
      if (!target || typeof target !== "object") {
        return [target].concat(source);
      }
      var mergeTarget = target;
      if (isArray3(target) && !isArray3(source)) {
        mergeTarget = arrayToObject(target, options);
      }
      if (isArray3(target) && isArray3(source)) {
        source.forEach(function(item, i) {
          if (has.call(target, i)) {
            var targetItem = target[i];
            if (targetItem && typeof targetItem === "object" && item && typeof item === "object") {
              target[i] = merge2(targetItem, item, options);
            } else {
              target.push(item);
            }
          } else {
            target[i] = item;
          }
        });
        return target;
      }
      return Object.keys(source).reduce(function(acc, key) {
        var value = source[key];
        if (has.call(acc, key)) {
          acc[key] = merge2(acc[key], value, options);
        } else {
          acc[key] = value;
        }
        return acc;
      }, mergeTarget);
    };
    var assign = function assignSingleSource(target, source) {
      return Object.keys(source).reduce(function(acc, key) {
        acc[key] = source[key];
        return acc;
      }, target);
    };
    var decode2 = function(str, decoder, charset) {
      var strWithoutPlus = str.replace(/\+/g, " ");
      if (charset === "iso-8859-1") {
        return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
      }
      try {
        return decodeURIComponent(strWithoutPlus);
      } catch (e) {
        return strWithoutPlus;
      }
    };
    var limit = 1024;
    var encode2 = function encode3(str, defaultEncoder, charset, kind, format) {
      if (str.length === 0) {
        return str;
      }
      var string = str;
      if (typeof str === "symbol") {
        string = Symbol.prototype.toString.call(str);
      } else if (typeof str !== "string") {
        string = String(str);
      }
      if (charset === "iso-8859-1") {
        return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
          return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
        });
      }
      var out = "";
      for (var j = 0; j < string.length; j += limit) {
        var segment = string.length >= limit ? string.slice(j, j + limit) : string;
        var arr = [];
        for (var i = 0; i < segment.length; ++i) {
          var c = segment.charCodeAt(i);
          if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) {
            arr[arr.length] = segment.charAt(i);
            continue;
          }
          if (c < 128) {
            arr[arr.length] = hexTable[c];
            continue;
          }
          if (c < 2048) {
            arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63];
            continue;
          }
          if (c < 55296 || c >= 57344) {
            arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
            continue;
          }
          i += 1;
          c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023);
          arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
        }
        out += arr.join("");
      }
      return out;
    };
    var compact = function compact2(value) {
      var queue = [{ obj: { o: value }, prop: "o" }];
      var refs = [];
      for (var i = 0; i < queue.length; ++i) {
        var item = queue[i];
        var obj = item.obj[item.prop];
        var keys = Object.keys(obj);
        for (var j = 0; j < keys.length; ++j) {
          var key = keys[j];
          var val = obj[key];
          if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) {
            queue.push({ obj, prop: key });
            refs.push(val);
          }
        }
      }
      compactQueue(queue);
      return value;
    };
    var isRegExp = function isRegExp2(obj) {
      return Object.prototype.toString.call(obj) === "[object RegExp]";
    };
    var isBuffer = function isBuffer2(obj) {
      if (!obj || typeof obj !== "object") {
        return false;
      }
      return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
    };
    var combine = function combine2(a, b) {
      return [].concat(a, b);
    };
    var maybeMap = function maybeMap2(val, fn) {
      if (isArray3(val)) {
        var mapped = [];
        for (var i = 0; i < val.length; i += 1) {
          mapped.push(fn(val[i]));
        }
        return mapped;
      }
      return fn(val);
    };
    module.exports = {
      arrayToObject,
      assign,
      combine,
      compact,
      decode: decode2,
      encode: encode2,
      isBuffer,
      isRegExp,
      maybeMap,
      merge
    };
  }
});

// node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/stringify.js
var require_stringify = __commonJS({
  "node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/stringify.js"(exports, module) {
    "use strict";
    var getSideChannel = require_side_channel();
    var utils = require_utils();
    var formats = require_formats();
    var has = Object.prototype.hasOwnProperty;
    var arrayPrefixGenerators = {
      brackets: function brackets(prefix) {
        return prefix + "[]";
      },
      comma: "comma",
      indices: function indices(prefix, key) {
        return prefix + "[" + key + "]";
      },
      repeat: function repeat(prefix) {
        return prefix;
      }
    };
    var isArray3 = Array.isArray;
    var push = Array.prototype.push;
    var pushToArray = function(arr, valueOrArray) {
      push.apply(arr, isArray3(valueOrArray) ? valueOrArray : [valueOrArray]);
    };
    var toISO = Date.prototype.toISOString;
    var defaultFormat = formats["default"];
    var defaults = {
      addQueryPrefix: false,
      allowDots: false,
      allowEmptyArrays: false,
      arrayFormat: "indices",
      charset: "utf-8",
      charsetSentinel: false,
      delimiter: "&",
      encode: true,
      encodeDotInKeys: false,
      encoder: utils.encode,
      encodeValuesOnly: false,
      format: defaultFormat,
      formatter: formats.formatters[defaultFormat],
      // deprecated
      indices: false,
      serializeDate: function serializeDate(date) {
        return toISO.call(date);
      },
      skipNulls: false,
      strictNullHandling: false
    };
    var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
      return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
    };
    var sentinel = {};
    var stringify3 = function stringify4(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter2, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
      var obj = object;
      var tmpSc = sideChannel;
      var step = 0;
      var findFlag = false;
      while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
        var pos = tmpSc.get(object);
        step += 1;
        if (typeof pos !== "undefined") {
          if (pos === step) {
            throw new RangeError("Cyclic object value");
          } else {
            findFlag = true;
          }
        }
        if (typeof tmpSc.get(sentinel) === "undefined") {
          step = 0;
        }
      }
      if (typeof filter2 === "function") {
        obj = filter2(prefix, obj);
      } else if (obj instanceof Date) {
        obj = serializeDate(obj);
      } else if (generateArrayPrefix === "comma" && isArray3(obj)) {
        obj = utils.maybeMap(obj, function(value2) {
          if (value2 instanceof Date) {
            return serializeDate(value2);
          }
          return value2;
        });
      }
      if (obj === null) {
        if (strictNullHandling) {
          return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix;
        }
        obj = "";
      }
      if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
        if (encoder) {
          var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format);
          return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))];
        }
        return [formatter(prefix) + "=" + formatter(String(obj))];
      }
      var values = [];
      if (typeof obj === "undefined") {
        return values;
      }
      var objKeys;
      if (generateArrayPrefix === "comma" && isArray3(obj)) {
        if (encodeValuesOnly && encoder) {
          obj = utils.maybeMap(obj, encoder);
        }
        objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
      } else if (isArray3(filter2)) {
        objKeys = filter2;
      } else {
        var keys = Object.keys(obj);
        objKeys = sort ? keys.sort(sort) : keys;
      }
      var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, "%2E") : prefix;
      var adjustedPrefix = commaRoundTrip && isArray3(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix;
      if (allowEmptyArrays && isArray3(obj) && obj.length === 0) {
        return adjustedPrefix + "[]";
      }
      for (var j = 0; j < objKeys.length; ++j) {
        var key = objKeys[j];
        var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key];
        if (skipNulls && value === null) {
          continue;
        }
        var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, "%2E") : key;
        var keyPrefix = isArray3(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]");
        sideChannel.set(object, step);
        var valueSideChannel = getSideChannel();
        valueSideChannel.set(sentinel, sideChannel);
        pushToArray(values, stringify4(
          value,
          keyPrefix,
          generateArrayPrefix,
          commaRoundTrip,
          allowEmptyArrays,
          strictNullHandling,
          skipNulls,
          encodeDotInKeys,
          generateArrayPrefix === "comma" && encodeValuesOnly && isArray3(obj) ? null : encoder,
          filter2,
          sort,
          allowDots,
          serializeDate,
          format,
          formatter,
          encodeValuesOnly,
          charset,
          valueSideChannel
        ));
      }
      return values;
    };
    var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
      if (!opts) {
        return defaults;
      }
      if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
        throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
      }
      if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") {
        throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
      }
      if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
        throw new TypeError("Encoder has to be a function.");
      }
      var charset = opts.charset || defaults.charset;
      if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
        throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
      }
      var format = formats["default"];
      if (typeof opts.format !== "undefined") {
        if (!has.call(formats.formatters, opts.format)) {
          throw new TypeError("Unknown format option provided.");
        }
        format = opts.format;
      }
      var formatter = formats.formatters[format];
      var filter2 = defaults.filter;
      if (typeof opts.filter === "function" || isArray3(opts.filter)) {
        filter2 = opts.filter;
      }
      var arrayFormat;
      if (opts.arrayFormat in arrayPrefixGenerators) {
        arrayFormat = opts.arrayFormat;
      } else if ("indices" in opts) {
        arrayFormat = opts.indices ? "indices" : "repeat";
      } else {
        arrayFormat = defaults.arrayFormat;
      }
      if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
        throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
      }
      var allowDots = typeof opts.allowDots === "undefined" ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
      return {
        addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix,
        allowDots,
        allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
        arrayFormat,
        charset,
        charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
        commaRoundTrip: opts.commaRoundTrip,
        delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter,
        encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode,
        encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
        encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder,
        encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
        filter: filter2,
        format,
        formatter,
        serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults.serializeDate,
        skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults.skipNulls,
        sort: typeof opts.sort === "function" ? opts.sort : null,
        strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
      };
    };
    module.exports = function(object, opts) {
      var obj = object;
      var options = normalizeStringifyOptions(opts);
      var objKeys;
      var filter2;
      if (typeof options.filter === "function") {
        filter2 = options.filter;
        obj = filter2("", obj);
      } else if (isArray3(options.filter)) {
        filter2 = options.filter;
        objKeys = filter2;
      }
      var keys = [];
      if (typeof obj !== "object" || obj === null) {
        return "";
      }
      var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
      var commaRoundTrip = generateArrayPrefix === "comma" && options.commaRoundTrip;
      if (!objKeys) {
        objKeys = Object.keys(obj);
      }
      if (options.sort) {
        objKeys.sort(options.sort);
      }
      var sideChannel = getSideChannel();
      for (var i = 0; i < objKeys.length; ++i) {
        var key = objKeys[i];
        if (options.skipNulls && obj[key] === null) {
          continue;
        }
        pushToArray(keys, stringify3(
          obj[key],
          key,
          generateArrayPrefix,
          commaRoundTrip,
          options.allowEmptyArrays,
          options.strictNullHandling,
          options.skipNulls,
          options.encodeDotInKeys,
          options.encode ? options.encoder : null,
          options.filter,
          options.sort,
          options.allowDots,
          options.serializeDate,
          options.format,
          options.formatter,
          options.encodeValuesOnly,
          options.charset,
          sideChannel
        ));
      }
      var joined = keys.join(options.delimiter);
      var prefix = options.addQueryPrefix === true ? "?" : "";
      if (options.charsetSentinel) {
        if (options.charset === "iso-8859-1") {
          prefix += "utf8=%26%2310003%3B&";
        } else {
          prefix += "utf8=%E2%9C%93&";
        }
      }
      return joined.length > 0 ? prefix + joined : "";
    };
  }
});

// node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/parse.js
var require_parse = __commonJS({
  "node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/parse.js"(exports, module) {
    "use strict";
    var utils = require_utils();
    var has = Object.prototype.hasOwnProperty;
    var isArray3 = Array.isArray;
    var defaults = {
      allowDots: false,
      allowEmptyArrays: false,
      allowPrototypes: false,
      allowSparse: false,
      arrayLimit: 20,
      charset: "utf-8",
      charsetSentinel: false,
      comma: false,
      decodeDotInKeys: false,
      decoder: utils.decode,
      delimiter: "&",
      depth: 5,
      duplicates: "combine",
      ignoreQueryPrefix: false,
      interpretNumericEntities: false,
      parameterLimit: 1e3,
      parseArrays: true,
      plainObjects: false,
      strictNullHandling: false
    };
    var interpretNumericEntities = function(str) {
      return str.replace(/&#(\d+);/g, function($0, numberStr) {
        return String.fromCharCode(parseInt(numberStr, 10));
      });
    };
    var parseArrayValue = function(val, options) {
      if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
        return val.split(",");
      }
      return val;
    };
    var isoSentinel = "utf8=%26%2310003%3B";
    var charsetSentinel = "utf8=%E2%9C%93";
    var parseValues = function parseQueryStringValues(str, options) {
      var obj = { __proto__: null };
      var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
      var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
      var parts = cleanStr.split(options.delimiter, limit);
      var skipIndex = -1;
      var i;
      var charset = options.charset;
      if (options.charsetSentinel) {
        for (i = 0; i < parts.length; ++i) {
          if (parts[i].indexOf("utf8=") === 0) {
            if (parts[i] === charsetSentinel) {
              charset = "utf-8";
            } else if (parts[i] === isoSentinel) {
              charset = "iso-8859-1";
            }
            skipIndex = i;
            i = parts.length;
          }
        }
      }
      for (i = 0; i < parts.length; ++i) {
        if (i === skipIndex) {
          continue;
        }
        var part = parts[i];
        var bracketEqualsPos = part.indexOf("]=");
        var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
        var key, val;
        if (pos === -1) {
          key = options.decoder(part, defaults.decoder, charset, "key");
          val = options.strictNullHandling ? null : "";
        } else {
          key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key");
          val = utils.maybeMap(
            parseArrayValue(part.slice(pos + 1), options),
            function(encodedVal) {
              return options.decoder(encodedVal, defaults.decoder, charset, "value");
            }
          );
        }
        if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
          val = interpretNumericEntities(val);
        }
        if (part.indexOf("[]=") > -1) {
          val = isArray3(val) ? [val] : val;
        }
        var existing = has.call(obj, key);
        if (existing && options.duplicates === "combine") {
          obj[key] = utils.combine(obj[key], val);
        } else if (!existing || options.duplicates === "last") {
          obj[key] = val;
        }
      }
      return obj;
    };
    var parseObject = function(chain, val, options, valuesParsed) {
      var leaf = valuesParsed ? val : parseArrayValue(val, options);
      for (var i = chain.length - 1; i >= 0; --i) {
        var obj;
        var root = chain[i];
        if (root === "[]" && options.parseArrays) {
          obj = options.allowEmptyArrays && leaf === "" ? [] : [].concat(leaf);
        } else {
          obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
          var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
          var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot;
          var index = parseInt(decodedRoot, 10);
          if (!options.parseArrays && decodedRoot === "") {
            obj = { 0: leaf };
          } else if (!isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
            obj = [];
            obj[index] = leaf;
          } else if (decodedRoot !== "__proto__") {
            obj[decodedRoot] = leaf;
          }
        }
        leaf = obj;
      }
      return leaf;
    };
    var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
      if (!givenKey) {
        return;
      }
      var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
      var brackets = /(\[[^[\]]*])/;
      var child = /(\[[^[\]]*])/g;
      var segment = options.depth > 0 && brackets.exec(key);
      var parent = segment ? key.slice(0, segment.index) : key;
      var keys = [];
      if (parent) {
        if (!options.plainObjects && has.call(Object.prototype, parent)) {
          if (!options.allowPrototypes) {
            return;
          }
        }
        keys.push(parent);
      }
      var i = 0;
      while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
        i += 1;
        if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
          if (!options.allowPrototypes) {
            return;
          }
        }
        keys.push(segment[1]);
      }
      if (segment) {
        keys.push("[" + key.slice(segment.index) + "]");
      }
      return parseObject(keys, val, options, valuesParsed);
    };
    var normalizeParseOptions = function normalizeParseOptions2(opts) {
      if (!opts) {
        return defaults;
      }
      if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
        throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
      }
      if (typeof opts.decodeDotInKeys !== "undefined" && typeof opts.decodeDotInKeys !== "boolean") {
        throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
      }
      if (opts.decoder !== null && typeof opts.decoder !== "undefined" && typeof opts.decoder !== "function") {
        throw new TypeError("Decoder has to be a function.");
      }
      if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
        throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
      }
      var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset;
      var duplicates = typeof opts.duplicates === "undefined" ? defaults.duplicates : opts.duplicates;
      if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") {
        throw new TypeError("The duplicates option must be either combine, first, or last");
      }
      var allowDots = typeof opts.allowDots === "undefined" ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
      return {
        allowDots,
        allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
        allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes,
        allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse,
        arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit,
        charset,
        charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
        comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma,
        decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
        decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder,
        delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
        // eslint-disable-next-line no-implicit-coercion, no-extra-parens
        depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth,
        duplicates,
        ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
        interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
        parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit,
        parseArrays: opts.parseArrays !== false,
        plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects,
        strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
      };
    };
    module.exports = function(str, opts) {
      var options = normalizeParseOptions(opts);
      if (str === "" || str === null || typeof str === "undefined") {
        return options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
      }
      var tempObj = typeof str === "string" ? parseValues(str, options) : str;
      var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
      var keys = Object.keys(tempObj);
      for (var i = 0; i < keys.length; ++i) {
        var key = keys[i];
        var newObj = parseKeys(key, tempObj[key], options, typeof str === "string");
        obj = utils.merge(obj, newObj, options);
      }
      if (options.allowSparse === true) {
        return obj;
      }
      return utils.compact(obj);
    };
  }
});

// node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/index.js
var require_lib = __commonJS({
  "node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/index.js"(exports, module) {
    "use strict";
    var stringify3 = require_stringify();
    var parse3 = require_parse();
    var formats = require_formats();
    module.exports = {
      formats,
      parse: parse3,
      stringify: stringify3
    };
  }
});

// node_modules/.pnpm/url@0.11.3/node_modules/url/url.js
var require_url = __commonJS({
  "node_modules/.pnpm/url@0.11.3/node_modules/url/url.js"(exports) {
    "use strict";
    var punycode = require_punycode();
    function Url() {
      this.protocol = null;
      this.slashes = null;
      this.auth = null;
      this.host = null;
      this.port = null;
      this.hostname = null;
      this.hash = null;
      this.search = null;
      this.query = null;
      this.pathname = null;
      this.path = null;
      this.href = null;
    }
    var protocolPattern = /^([a-z0-9.+-]+:)/i;
    var portPattern = /:[0-9]*$/;
    var simplePathPattern = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/;
    var delims = [
      "<",
      ">",
      '"',
      "`",
      " ",
      "\r",
      "\n",
      "	"
    ];
    var unwise = [
      "{",
      "}",
      "|",
      "\\",
      "^",
      "`"
    ].concat(delims);
    var autoEscape = ["'"].concat(unwise);
    var nonHostChars = [
      "%",
      "/",
      "?",
      ";",
      "#"
    ].concat(autoEscape);
    var hostEndingChars = [
      "/",
      "?",
      "#"
    ];
    var hostnameMaxLen = 255;
    var hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/;
    var hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/;
    var unsafeProtocol = {
      javascript: true,
      "javascript:": true
    };
    var hostlessProtocol = {
      javascript: true,
      "javascript:": true
    };
    var slashedProtocol = {
      http: true,
      https: true,
      ftp: true,
      gopher: true,
      file: true,
      "http:": true,
      "https:": true,
      "ftp:": true,
      "gopher:": true,
      "file:": true
    };
    var querystring = require_lib();
    function urlParse(url2, parseQueryString, slashesDenoteHost) {
      if (url2 && typeof url2 === "object" && url2 instanceof Url) {
        return url2;
      }
      var u = new Url();
      u.parse(url2, parseQueryString, slashesDenoteHost);
      return u;
    }
    Url.prototype.parse = function(url2, parseQueryString, slashesDenoteHost) {
      if (typeof url2 !== "string") {
        throw new TypeError("Parameter 'url' must be a string, not " + typeof url2);
      }
      var queryIndex = url2.indexOf("?"), splitter = queryIndex !== -1 && queryIndex < url2.indexOf("#") ? "?" : "#", uSplit = url2.split(splitter), slashRegex = /\\/g;
      uSplit[0] = uSplit[0].replace(slashRegex, "/");
      url2 = uSplit.join(splitter);
      var rest = url2;
      rest = rest.trim();
      if (!slashesDenoteHost && url2.split("#").length === 1) {
        var simplePath = simplePathPattern.exec(rest);
        if (simplePath) {
          this.path = rest;
          this.href = rest;
          this.pathname = simplePath[1];
          if (simplePath[2]) {
            this.search = simplePath[2];
            if (parseQueryString) {
              this.query = querystring.parse(this.search.substr(1));
            } else {
              this.query = this.search.substr(1);
            }
          } else if (parseQueryString) {
            this.search = "";
            this.query = {};
          }
          return this;
        }
      }
      var proto = protocolPattern.exec(rest);
      if (proto) {
        proto = proto[0];
        var lowerProto = proto.toLowerCase();
        this.protocol = lowerProto;
        rest = rest.substr(proto.length);
      }
      if (slashesDenoteHost || proto || rest.match(/^\/\/[^@/]+@[^@/]+/)) {
        var slashes = rest.substr(0, 2) === "//";
        if (slashes && !(proto && hostlessProtocol[proto])) {
          rest = rest.substr(2);
          this.slashes = true;
        }
      }
      if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) {
        var hostEnd = -1;
        for (var i = 0; i < hostEndingChars.length; i++) {
          var hec = rest.indexOf(hostEndingChars[i]);
          if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
            hostEnd = hec;
          }
        }
        var auth, atSign;
        if (hostEnd === -1) {
          atSign = rest.lastIndexOf("@");
        } else {
          atSign = rest.lastIndexOf("@", hostEnd);
        }
        if (atSign !== -1) {
          auth = rest.slice(0, atSign);
          rest = rest.slice(atSign + 1);
          this.auth = decodeURIComponent(auth);
        }
        hostEnd = -1;
        for (var i = 0; i < nonHostChars.length; i++) {
          var hec = rest.indexOf(nonHostChars[i]);
          if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
            hostEnd = hec;
          }
        }
        if (hostEnd === -1) {
          hostEnd = rest.length;
        }
        this.host = rest.slice(0, hostEnd);
        rest = rest.slice(hostEnd);
        this.parseHost();
        this.hostname = this.hostname || "";
        var ipv6Hostname = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
        if (!ipv6Hostname) {
          var hostparts = this.hostname.split(/\./);
          for (var i = 0, l = hostparts.length; i < l; i++) {
            var part = hostparts[i];
            if (!part) {
              continue;
            }
            if (!part.match(hostnamePartPattern)) {
              var newpart = "";
              for (var j = 0, k = part.length; j < k; j++) {
                if (part.charCodeAt(j) > 127) {
                  newpart += "x";
                } else {
                  newpart += part[j];
                }
              }
              if (!newpart.match(hostnamePartPattern)) {
                var validParts = hostparts.slice(0, i);
                var notHost = hostparts.slice(i + 1);
                var bit = part.match(hostnamePartStart);
                if (bit) {
                  validParts.push(bit[1]);
                  notHost.unshift(bit[2]);
                }
                if (notHost.length) {
                  rest = "/" + notHost.join(".") + rest;
                }
                this.hostname = validParts.join(".");
                break;
              }
            }
          }
        }
        if (this.hostname.length > hostnameMaxLen) {
          this.hostname = "";
        } else {
          this.hostname = this.hostname.toLowerCase();
        }
        if (!ipv6Hostname) {
          this.hostname = punycode.toASCII(this.hostname);
        }
        var p = this.port ? ":" + this.port : "";
        var h = this.hostname || "";
        this.host = h + p;
        this.href += this.host;
        if (ipv6Hostname) {
          this.hostname = this.hostname.substr(1, this.hostname.length - 2);
          if (rest[0] !== "/") {
            rest = "/" + rest;
          }
        }
      }
      if (!unsafeProtocol[lowerProto]) {
        for (var i = 0, l = autoEscape.length; i < l; i++) {
          var ae = autoEscape[i];
          if (rest.indexOf(ae) === -1) {
            continue;
          }
          var esc = encodeURIComponent(ae);
          if (esc === ae) {
            esc = escape(ae);
          }
          rest = rest.split(ae).join(esc);
        }
      }
      var hash = rest.indexOf("#");
      if (hash !== -1) {
        this.hash = rest.substr(hash);
        rest = rest.slice(0, hash);
      }
      var qm = rest.indexOf("?");
      if (qm !== -1) {
        this.search = rest.substr(qm);
        this.query = rest.substr(qm + 1);
        if (parseQueryString) {
          this.query = querystring.parse(this.query);
        }
        rest = rest.slice(0, qm);
      } else if (parseQueryString) {
        this.search = "";
        this.query = {};
      }
      if (rest) {
        this.pathname = rest;
      }
      if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {
        this.pathname = "/";
      }
      if (this.pathname || this.search) {
        var p = this.pathname || "";
        var s = this.search || "";
        this.path = p + s;
      }
      this.href = this.format();
      return this;
    };
    function urlFormat(obj) {
      if (typeof obj === "string") {
        obj = urlParse(obj);
      }
      if (!(obj instanceof Url)) {
        return Url.prototype.format.call(obj);
      }
      return obj.format();
    }
    Url.prototype.format = function() {
      var auth = this.auth || "";
      if (auth) {
        auth = encodeURIComponent(auth);
        auth = auth.replace(/%3A/i, ":");
        auth += "@";
      }
      var protocol = this.protocol || "", pathname = this.pathname || "", hash = this.hash || "", host = false, query = "";
      if (this.host) {
        host = auth + this.host;
      } else if (this.hostname) {
        host = auth + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]");
        if (this.port) {
          host += ":" + this.port;
        }
      }
      if (this.query && typeof this.query === "object" && Object.keys(this.query).length) {
        query = querystring.stringify(this.query, {
          arrayFormat: "repeat",
          addQueryPrefix: false
        });
      }
      var search = this.search || query && "?" + query || "";
      if (protocol && protocol.substr(-1) !== ":") {
        protocol += ":";
      }
      if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) {
        host = "//" + (host || "");
        if (pathname && pathname.charAt(0) !== "/") {
          pathname = "/" + pathname;
        }
      } else if (!host) {
        host = "";
      }
      if (hash && hash.charAt(0) !== "#") {
        hash = "#" + hash;
      }
      if (search && search.charAt(0) !== "?") {
        search = "?" + search;
      }
      pathname = pathname.replace(/[?#]/g, function(match) {
        return encodeURIComponent(match);
      });
      search = search.replace("#", "%23");
      return protocol + host + pathname + search + hash;
    };
    function urlResolve(source, relative) {
      return urlParse(source, false, true).resolve(relative);
    }
    Url.prototype.resolve = function(relative) {
      return this.resolveObject(urlParse(relative, false, true)).format();
    };
    function urlResolveObject(source, relative) {
      if (!source) {
        return relative;
      }
      return urlParse(source, false, true).resolveObject(relative);
    }
    Url.prototype.resolveObject = function(relative) {
      if (typeof relative === "string") {
        var rel = new Url();
        rel.parse(relative, false, true);
        relative = rel;
      }
      var result = new Url();
      var tkeys = Object.keys(this);
      for (var tk = 0; tk < tkeys.length; tk++) {
        var tkey = tkeys[tk];
        result[tkey] = this[tkey];
      }
      result.hash = relative.hash;
      if (relative.href === "") {
        result.href = result.format();
        return result;
      }
      if (relative.slashes && !relative.protocol) {
        var rkeys = Object.keys(relative);
        for (var rk = 0; rk < rkeys.length; rk++) {
          var rkey = rkeys[rk];
          if (rkey !== "protocol") {
            result[rkey] = relative[rkey];
          }
        }
        if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {
          result.pathname = "/";
          result.path = result.pathname;
        }
        result.href = result.format();
        return result;
      }
      if (relative.protocol && relative.protocol !== result.protocol) {
        if (!slashedProtocol[relative.protocol]) {
          var keys = Object.keys(relative);
          for (var v = 0; v < keys.length; v++) {
            var k = keys[v];
            result[k] = relative[k];
          }
          result.href = result.format();
          return result;
        }
        result.protocol = relative.protocol;
        if (!relative.host && !hostlessProtocol[relative.protocol]) {
          var relPath = (relative.pathname || "").split("/");
          while (relPath.length && !(relative.host = relPath.shift())) {
          }
          if (!relative.host) {
            relative.host = "";
          }
          if (!relative.hostname) {
            relative.hostname = "";
          }
          if (relPath[0] !== "") {
            relPath.unshift("");
          }
          if (relPath.length < 2) {
            relPath.unshift("");
          }
          result.pathname = relPath.join("/");
        } else {
          result.pathname = relative.pathname;
        }
        result.search = relative.search;
        result.query = relative.query;
        result.host = relative.host || "";
        result.auth = relative.auth;
        result.hostname = relative.hostname || relative.host;
        result.port = relative.port;
        if (result.pathname || result.search) {
          var p = result.pathname || "";
          var s = result.search || "";
          result.path = p + s;
        }
        result.slashes = result.slashes || relative.slashes;
        result.href = result.format();
        return result;
      }
      var isSourceAbs = result.pathname && result.pathname.charAt(0) === "/", isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === "/", mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname, removeAllDots = mustEndAbs, srcPath = result.pathname && result.pathname.split("/") || [], relPath = relative.pathname && relative.pathname.split("/") || [], psychotic = result.protocol && !slashedProtocol[result.protocol];
      if (psychotic) {
        result.hostname = "";
        result.port = null;
        if (result.host) {
          if (srcPath[0] === "") {
            srcPath[0] = result.host;
          } else {
            srcPath.unshift(result.host);
          }
        }
        result.host = "";
        if (relative.protocol) {
          relative.hostname = null;
          relative.port = null;
          if (relative.host) {
            if (relPath[0] === "") {
              relPath[0] = relative.host;
            } else {
              relPath.unshift(relative.host);
            }
          }
          relative.host = null;
        }
        mustEndAbs = mustEndAbs && (relPath[0] === "" || srcPath[0] === "");
      }
      if (isRelAbs) {
        result.host = relative.host || relative.host === "" ? relative.host : result.host;
        result.hostname = relative.hostname || relative.hostname === "" ? relative.hostname : result.hostname;
        result.search = relative.search;
        result.query = relative.query;
        srcPath = relPath;
      } else if (relPath.length) {
        if (!srcPath) {
          srcPath = [];
        }
        srcPath.pop();
        srcPath = srcPath.concat(relPath);
        result.search = relative.search;
        result.query = relative.query;
      } else if (relative.search != null) {
        if (psychotic) {
          result.host = srcPath.shift();
          result.hostname = result.host;
          var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false;
          if (authInHost) {
            result.auth = authInHost.shift();
            result.hostname = authInHost.shift();
            result.host = result.hostname;
          }
        }
        result.search = relative.search;
        result.query = relative.query;
        if (result.pathname !== null || result.search !== null) {
          result.path = (result.pathname ? result.pathname : "") + (result.search ? result.search : "");
        }
        result.href = result.format();
        return result;
      }
      if (!srcPath.length) {
        result.pathname = null;
        if (result.search) {
          result.path = "/" + result.search;
        } else {
          result.path = null;
        }
        result.href = result.format();
        return result;
      }
      var last2 = srcPath.slice(-1)[0];
      var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last2 === "." || last2 === "..") || last2 === "";
      var up = 0;
      for (var i = srcPath.length; i >= 0; i--) {
        last2 = srcPath[i];
        if (last2 === ".") {
          srcPath.splice(i, 1);
        } else if (last2 === "..") {
          srcPath.splice(i, 1);
          up++;
        } else if (up) {
          srcPath.splice(i, 1);
          up--;
        }
      }
      if (!mustEndAbs && !removeAllDots) {
        for (; up--; up) {
          srcPath.unshift("..");
        }
      }
      if (mustEndAbs && srcPath[0] !== "" && (!srcPath[0] || srcPath[0].charAt(0) !== "/")) {
        srcPath.unshift("");
      }
      if (hasTrailingSlash && srcPath.join("/").substr(-1) !== "/") {
        srcPath.push("");
      }
      var isAbsolute = srcPath[0] === "" || srcPath[0] && srcPath[0].charAt(0) === "/";
      if (psychotic) {
        result.hostname = isAbsolute ? "" : srcPath.length ? srcPath.shift() : "";
        result.host = result.hostname;
        var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false;
        if (authInHost) {
          result.auth = authInHost.shift();
          result.hostname = authInHost.shift();
          result.host = result.hostname;
        }
      }
      mustEndAbs = mustEndAbs || result.host && srcPath.length;
      if (mustEndAbs && !isAbsolute) {
        srcPath.unshift("");
      }
      if (srcPath.length > 0) {
        result.pathname = srcPath.join("/");
      } else {
        result.pathname = null;
        result.path = null;
      }
      if (result.pathname !== null || result.search !== null) {
        result.path = (result.pathname ? result.pathname : "") + (result.search ? result.search : "");
      }
      result.auth = relative.auth || result.auth;
      result.slashes = result.slashes || relative.slashes;
      result.href = result.format();
      return result;
    };
    Url.prototype.parseHost = function() {
      var host = this.host;
      var port = portPattern.exec(host);
      if (port) {
        port = port[0];
        if (port !== ":") {
          this.port = port.substr(1);
        }
        host = host.substr(0, host.length - port.length);
      }
      if (host) {
        this.hostname = host;
      }
    };
    exports.parse = urlParse;
    exports.resolve = urlResolve;
    exports.resolveObject = urlResolveObject;
    exports.format = urlFormat;
    exports.Url = Url;
  }
});

// node_modules/.pnpm/min-indent@1.0.1/node_modules/min-indent/index.js
var require_min_indent = __commonJS({
  "node_modules/.pnpm/min-indent@1.0.1/node_modules/min-indent/index.js"(exports, module) {
    "use strict";
    module.exports = (string) => {
      const match = string.match(/^[ \t]*(?=\S)/gm);
      if (!match) {
        return 0;
      }
      return match.reduce((r, a) => Math.min(r, a.length), Infinity);
    };
  }
});

// node_modules/.pnpm/is-number@4.0.0/node_modules/is-number/index.js
var require_is_number = __commonJS({
  "node_modules/.pnpm/is-number@4.0.0/node_modules/is-number/index.js"(exports, module) {
    "use strict";
    module.exports = function isNumber(num) {
      var type = typeof num;
      if (type === "string" || num instanceof String) {
        if (!num.trim())
          return false;
      } else if (type !== "number" && !(num instanceof Number)) {
        return false;
      }
      return num - num + 1 >= 0;
    };
  }
});

// node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.js
var require_kind_of = __commonJS({
  "node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.js"(exports, module) {
    var toString = Object.prototype.toString;
    module.exports = function kindOf(val) {
      if (val === void 0)
        return "undefined";
      if (val === null)
        return "null";
      var type = typeof val;
      if (type === "boolean")
        return "boolean";
      if (type === "string")
        return "string";
      if (type === "number")
        return "number";
      if (type === "symbol")
        return "symbol";
      if (type === "function") {
        return isGeneratorFn(val) ? "generatorfunction" : "function";
      }
      if (isArray3(val))
        return "array";
      if (isBuffer(val))
        return "buffer";
      if (isArguments(val))
        return "arguments";
      if (isDate(val))
        return "date";
      if (isError(val))
        return "error";
      if (isRegexp(val))
        return "regexp";
      switch (ctorName(val)) {
        case "Symbol":
          return "symbol";
        case "Promise":
          return "promise";
        case "WeakMap":
          return "weakmap";
        case "WeakSet":
          return "weakset";
        case "Map":
          return "map";
        case "Set":
          return "set";
        case "Int8Array":
          return "int8array";
        case "Uint8Array":
          return "uint8array";
        case "Uint8ClampedArray":
          return "uint8clampedarray";
        case "Int16Array":
          return "int16array";
        case "Uint16Array":
          return "uint16array";
        case "Int32Array":
          return "int32array";
        case "Uint32Array":
          return "uint32array";
        case "Float32Array":
          return "float32array";
        case "Float64Array":
          return "float64array";
      }
      if (isGeneratorObj(val)) {
        return "generator";
      }
      type = toString.call(val);
      switch (type) {
        case "[object Object]":
          return "object";
        case "[object Map Iterator]":
          return "mapiterator";
        case "[object Set Iterator]":
          return "setiterator";
        case "[object String Iterator]":
          return "stringiterator";
        case "[object Array Iterator]":
          return "arrayiterator";
      }
      return type.slice(8, -1).toLowerCase().replace(/\s/g, "");
    };
    function ctorName(val) {
      return typeof val.constructor === "function" ? val.constructor.name : null;
    }
    function isArray3(val) {
      if (Array.isArray)
        return Array.isArray(val);
      return val instanceof Array;
    }
    function isError(val) {
      return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
    }
    function isDate(val) {
      if (val instanceof Date)
        return true;
      return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
    }
    function isRegexp(val) {
      if (val instanceof RegExp)
        return true;
      return typeof val.flags === "string" && typeof val.ignoreCase === "boolean" && typeof val.multiline === "boolean" && typeof val.global === "boolean";
    }
    function isGeneratorFn(name, val) {
      return ctorName(name) === "GeneratorFunction";
    }
    function isGeneratorObj(val) {
      return typeof val.throw === "function" && typeof val.return === "function" && typeof val.next === "function";
    }
    function isArguments(val) {
      try {
        if (typeof val.length === "number" && typeof val.callee === "function") {
          return true;
        }
      } catch (err) {
        if (err.message.indexOf("callee") !== -1) {
          return true;
        }
      }
      return false;
    }
    function isBuffer(val) {
      if (val.constructor && typeof val.constructor.isBuffer === "function") {
        return val.constructor.isBuffer(val);
      }
      return false;
    }
  }
});

// node_modules/.pnpm/math-random@1.0.4/node_modules/math-random/browser.js
var require_browser = __commonJS({
  "node_modules/.pnpm/math-random@1.0.4/node_modules/math-random/browser.js"(exports, module) {
    module.exports = function(global2) {
      var uint32 = "Uint32Array" in global2;
      var crypto = global2.crypto || global2.msCrypto;
      var rando = crypto && typeof crypto.getRandomValues === "function";
      var good = uint32 && rando;
      if (!good)
        return Math.random;
      var arr = new Uint32Array(1);
      var max = Math.pow(2, 32);
      function random() {
        crypto.getRandomValues(arr);
        return arr[0] / max;
      }
      random.cryptographic = true;
      return random;
    }(typeof self !== "undefined" ? self : window);
  }
});

// node_modules/.pnpm/randomatic@3.1.1/node_modules/randomatic/index.js
var require_randomatic = __commonJS({
  "node_modules/.pnpm/randomatic@3.1.1/node_modules/randomatic/index.js"(exports, module) {
    "use strict";
    var isNumber = require_is_number();
    var typeOf = require_kind_of();
    var mathRandom = require_browser();
    module.exports = randomatic2;
    module.exports.isCrypto = !!mathRandom.cryptographic;
    var type = {
      lower: "abcdefghijklmnopqrstuvwxyz",
      upper: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
      number: "0123456789",
      special: "~!@#$%^&()_+-={}[];',."
    };
    type.all = type.lower + type.upper + type.number + type.special;
    function randomatic2(pattern, length, options) {
      if (typeof pattern === "undefined") {
        throw new Error("randomatic expects a string or number.");
      }
      var custom = false;
      if (arguments.length === 1) {
        if (typeof pattern === "string") {
          length = pattern.length;
        } else if (isNumber(pattern)) {
          options = {};
          length = pattern;
          pattern = "*";
        }
      }
      if (typeOf(length) === "object" && length.hasOwnProperty("chars")) {
        options = length;
        pattern = options.chars;
        length = pattern.length;
        custom = true;
      }
      var opts = options || {};
      var mask = "";
      var res = "";
      if (pattern.indexOf("?") !== -1)
        mask += opts.chars;
      if (pattern.indexOf("a") !== -1)
        mask += type.lower;
      if (pattern.indexOf("A") !== -1)
        mask += type.upper;
      if (pattern.indexOf("0") !== -1)
        mask += type.number;
      if (pattern.indexOf("!") !== -1)
        mask += type.special;
      if (pattern.indexOf("*") !== -1)
        mask += type.all;
      if (custom)
        mask += pattern;
      if (opts.exclude) {
        var exclude = typeOf(opts.exclude) === "string" ? opts.exclude : opts.exclude.join("");
        exclude = exclude.replace(new RegExp("[\\]]+", "g"), "");
        mask = mask.replace(new RegExp("[" + exclude + "]+", "g"), "");
        if (opts.exclude.indexOf("]") !== -1)
          mask = mask.replace(new RegExp("[\\]]+", "g"), "");
      }
      while (length--) {
        res += mask.charAt(parseInt(mathRandom() * mask.length, 10));
      }
      return res;
    }
  }
});

// node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.js
var require_lodash = __commonJS({
  "node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.js"(exports, module) {
    var LARGE_ARRAY_SIZE = 200;
    var HASH_UNDEFINED = "__lodash_hash_undefined__";
    var MAX_SAFE_INTEGER = 9007199254740991;
    var argsTag = "[object Arguments]";
    var arrayTag = "[object Array]";
    var boolTag = "[object Boolean]";
    var dateTag = "[object Date]";
    var errorTag = "[object Error]";
    var funcTag = "[object Function]";
    var genTag = "[object GeneratorFunction]";
    var mapTag = "[object Map]";
    var numberTag = "[object Number]";
    var objectTag = "[object Object]";
    var promiseTag = "[object Promise]";
    var regexpTag = "[object RegExp]";
    var setTag = "[object Set]";
    var stringTag = "[object String]";
    var symbolTag = "[object Symbol]";
    var weakMapTag = "[object WeakMap]";
    var arrayBufferTag = "[object ArrayBuffer]";
    var dataViewTag = "[object DataView]";
    var float32Tag = "[object Float32Array]";
    var float64Tag = "[object Float64Array]";
    var int8Tag = "[object Int8Array]";
    var int16Tag = "[object Int16Array]";
    var int32Tag = "[object Int32Array]";
    var uint8Tag = "[object Uint8Array]";
    var uint8ClampedTag = "[object Uint8ClampedArray]";
    var uint16Tag = "[object Uint16Array]";
    var uint32Tag = "[object Uint32Array]";
    var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
    var reFlags = /\w*$/;
    var reIsHostCtor = /^\[object .+?Constructor\]$/;
    var reIsUint = /^(?:0|[1-9]\d*)$/;
    var cloneableTags = {};
    cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
    cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
    var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
    var freeSelf = typeof self == "object" && self && self.Object === Object && self;
    var root = freeGlobal || freeSelf || Function("return this")();
    var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
    var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
    var moduleExports = freeModule && freeModule.exports === freeExports;
    function addMapEntry(map3, pair) {
      map3.set(pair[0], pair[1]);
      return map3;
    }
    function addSetEntry(set, value) {
      set.add(value);
      return set;
    }
    function arrayEach(array, iteratee) {
      var index = -1, length = array ? array.length : 0;
      while (++index < length) {
        if (iteratee(array[index], index, array) === false) {
          break;
        }
      }
      return array;
    }
    function arrayPush(array, values) {
      var index = -1, length = values.length, offset = array.length;
      while (++index < length) {
        array[offset + index] = values[index];
      }
      return array;
    }
    function arrayReduce(array, iteratee, accumulator, initAccum) {
      var index = -1, length = array ? array.length : 0;
      if (initAccum && length) {
        accumulator = array[++index];
      }
      while (++index < length) {
        accumulator = iteratee(accumulator, array[index], index, array);
      }
      return accumulator;
    }
    function baseTimes(n, iteratee) {
      var index = -1, result = Array(n);
      while (++index < n) {
        result[index] = iteratee(index);
      }
      return result;
    }
    function getValue(object, key) {
      return object == null ? void 0 : object[key];
    }
    function isHostObject(value) {
      var result = false;
      if (value != null && typeof value.toString != "function") {
        try {
          result = !!(value + "");
        } catch (e) {
        }
      }
      return result;
    }
    function mapToArray(map3) {
      var index = -1, result = Array(map3.size);
      map3.forEach(function(value, key) {
        result[++index] = [key, value];
      });
      return result;
    }
    function overArg(func, transform) {
      return function(arg) {
        return func(transform(arg));
      };
    }
    function setToArray(set) {
      var index = -1, result = Array(set.size);
      set.forEach(function(value) {
        result[++index] = value;
      });
      return result;
    }
    var arrayProto = Array.prototype;
    var funcProto = Function.prototype;
    var objectProto = Object.prototype;
    var coreJsData = root["__core-js_shared__"];
    var maskSrcKey = function() {
      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
      return uid ? "Symbol(src)_1." + uid : "";
    }();
    var funcToString = funcProto.toString;
    var hasOwnProperty = objectProto.hasOwnProperty;
    var objectToString2 = objectProto.toString;
    var reIsNative = RegExp(
      "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
    );
    var Buffer2 = moduleExports ? root.Buffer : void 0;
    var Symbol2 = root.Symbol;
    var Uint8Array2 = root.Uint8Array;
    var getPrototype = overArg(Object.getPrototypeOf, Object);
    var objectCreate = Object.create;
    var propertyIsEnumerable = objectProto.propertyIsEnumerable;
    var splice = arrayProto.splice;
    var nativeGetSymbols = Object.getOwnPropertySymbols;
    var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
    var nativeKeys = overArg(Object.keys, Object);
    var DataView2 = getNative(root, "DataView");
    var Map2 = getNative(root, "Map");
    var Promise2 = getNative(root, "Promise");
    var Set2 = getNative(root, "Set");
    var WeakMap2 = getNative(root, "WeakMap");
    var nativeCreate = getNative(Object, "create");
    var dataViewCtorString = toSource(DataView2);
    var mapCtorString = toSource(Map2);
    var promiseCtorString = toSource(Promise2);
    var setCtorString = toSource(Set2);
    var weakMapCtorString = toSource(WeakMap2);
    var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
    var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
    function Hash(entries) {
      var index = -1, length = entries ? entries.length : 0;
      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }
    function hashClear() {
      this.__data__ = nativeCreate ? nativeCreate(null) : {};
    }
    function hashDelete(key) {
      return this.has(key) && delete this.__data__[key];
    }
    function hashGet(key) {
      var data = this.__data__;
      if (nativeCreate) {
        var result = data[key];
        return result === HASH_UNDEFINED ? void 0 : result;
      }
      return hasOwnProperty.call(data, key) ? data[key] : void 0;
    }
    function hashHas(key) {
      var data = this.__data__;
      return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
    }
    function hashSet(key, value) {
      var data = this.__data__;
      data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
      return this;
    }
    Hash.prototype.clear = hashClear;
    Hash.prototype["delete"] = hashDelete;
    Hash.prototype.get = hashGet;
    Hash.prototype.has = hashHas;
    Hash.prototype.set = hashSet;
    function ListCache(entries) {
      var index = -1, length = entries ? entries.length : 0;
      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }
    function listCacheClear() {
      this.__data__ = [];
    }
    function listCacheDelete(key) {
      var data = this.__data__, index = assocIndexOf(data, key);
      if (index < 0) {
        return false;
      }
      var lastIndex = data.length - 1;
      if (index == lastIndex) {
        data.pop();
      } else {
        splice.call(data, index, 1);
      }
      return true;
    }
    function listCacheGet(key) {
      var data = this.__data__, index = assocIndexOf(data, key);
      return index < 0 ? void 0 : data[index][1];
    }
    function listCacheHas(key) {
      return assocIndexOf(this.__data__, key) > -1;
    }
    function listCacheSet(key, value) {
      var data = this.__data__, index = assocIndexOf(data, key);
      if (index < 0) {
        data.push([key, value]);
      } else {
        data[index][1] = value;
      }
      return this;
    }
    ListCache.prototype.clear = listCacheClear;
    ListCache.prototype["delete"] = listCacheDelete;
    ListCache.prototype.get = listCacheGet;
    ListCache.prototype.has = listCacheHas;
    ListCache.prototype.set = listCacheSet;
    function MapCache(entries) {
      var index = -1, length = entries ? entries.length : 0;
      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }
    function mapCacheClear() {
      this.__data__ = {
        "hash": new Hash(),
        "map": new (Map2 || ListCache)(),
        "string": new Hash()
      };
    }
    function mapCacheDelete(key) {
      return getMapData(this, key)["delete"](key);
    }
    function mapCacheGet(key) {
      return getMapData(this, key).get(key);
    }
    function mapCacheHas(key) {
      return getMapData(this, key).has(key);
    }
    function mapCacheSet(key, value) {
      getMapData(this, key).set(key, value);
      return this;
    }
    MapCache.prototype.clear = mapCacheClear;
    MapCache.prototype["delete"] = mapCacheDelete;
    MapCache.prototype.get = mapCacheGet;
    MapCache.prototype.has = mapCacheHas;
    MapCache.prototype.set = mapCacheSet;
    function Stack(entries) {
      this.__data__ = new ListCache(entries);
    }
    function stackClear() {
      this.__data__ = new ListCache();
    }
    function stackDelete(key) {
      return this.__data__["delete"](key);
    }
    function stackGet(key) {
      return this.__data__.get(key);
    }
    function stackHas(key) {
      return this.__data__.has(key);
    }
    function stackSet(key, value) {
      var cache = this.__data__;
      if (cache instanceof ListCache) {
        var pairs = cache.__data__;
        if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
          pairs.push([key, value]);
          return this;
        }
        cache = this.__data__ = new MapCache(pairs);
      }
      cache.set(key, value);
      return this;
    }
    Stack.prototype.clear = stackClear;
    Stack.prototype["delete"] = stackDelete;
    Stack.prototype.get = stackGet;
    Stack.prototype.has = stackHas;
    Stack.prototype.set = stackSet;
    function arrayLikeKeys(value, inherited) {
      var result = isArray3(value) || isArguments(value) ? baseTimes(value.length, String) : [];
      var length = result.length, skipIndexes = !!length;
      for (var key in value) {
        if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
          result.push(key);
        }
      }
      return result;
    }
    function assignValue(object, key, value) {
      var objValue = object[key];
      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
        object[key] = value;
      }
    }
    function assocIndexOf(array, key) {
      var length = array.length;
      while (length--) {
        if (eq(array[length][0], key)) {
          return length;
        }
      }
      return -1;
    }
    function baseAssign(object, source) {
      return object && copyObject(source, keys(source), object);
    }
    function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
      var result;
      if (customizer) {
        result = object ? customizer(value, key, object, stack) : customizer(value);
      }
      if (result !== void 0) {
        return result;
      }
      if (!isObject2(value)) {
        return value;
      }
      var isArr = isArray3(value);
      if (isArr) {
        result = initCloneArray(value);
        if (!isDeep) {
          return copyArray(value, result);
        }
      } else {
        var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
        if (isBuffer(value)) {
          return cloneBuffer(value, isDeep);
        }
        if (tag == objectTag || tag == argsTag || isFunc && !object) {
          if (isHostObject(value)) {
            return object ? value : {};
          }
          result = initCloneObject(isFunc ? {} : value);
          if (!isDeep) {
            return copySymbols(value, baseAssign(result, value));
          }
        } else {
          if (!cloneableTags[tag]) {
            return object ? value : {};
          }
          result = initCloneByTag(value, tag, baseClone, isDeep);
        }
      }
      stack || (stack = new Stack());
      var stacked = stack.get(value);
      if (stacked) {
        return stacked;
      }
      stack.set(value, result);
      if (!isArr) {
        var props = isFull ? getAllKeys(value) : keys(value);
      }
      arrayEach(props || value, function(subValue, key2) {
        if (props) {
          key2 = subValue;
          subValue = value[key2];
        }
        assignValue(result, key2, baseClone(subValue, isDeep, isFull, customizer, key2, value, stack));
      });
      return result;
    }
    function baseCreate(proto) {
      return isObject2(proto) ? objectCreate(proto) : {};
    }
    function baseGetAllKeys(object, keysFunc, symbolsFunc) {
      var result = keysFunc(object);
      return isArray3(object) ? result : arrayPush(result, symbolsFunc(object));
    }
    function baseGetTag(value) {
      return objectToString2.call(value);
    }
    function baseIsNative(value) {
      if (!isObject2(value) || isMasked(value)) {
        return false;
      }
      var pattern = isFunction3(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
      return pattern.test(toSource(value));
    }
    function baseKeys(object) {
      if (!isPrototype(object)) {
        return nativeKeys(object);
      }
      var result = [];
      for (var key in Object(object)) {
        if (hasOwnProperty.call(object, key) && key != "constructor") {
          result.push(key);
        }
      }
      return result;
    }
    function cloneBuffer(buffer, isDeep) {
      if (isDeep) {
        return buffer.slice();
      }
      var result = new buffer.constructor(buffer.length);
      buffer.copy(result);
      return result;
    }
    function cloneArrayBuffer(arrayBuffer) {
      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
      new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
      return result;
    }
    function cloneDataView(dataView, isDeep) {
      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
    }
    function cloneMap(map3, isDeep, cloneFunc) {
      var array = isDeep ? cloneFunc(mapToArray(map3), true) : mapToArray(map3);
      return arrayReduce(array, addMapEntry, new map3.constructor());
    }
    function cloneRegExp(regexp) {
      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
      result.lastIndex = regexp.lastIndex;
      return result;
    }
    function cloneSet(set, isDeep, cloneFunc) {
      var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
      return arrayReduce(array, addSetEntry, new set.constructor());
    }
    function cloneSymbol(symbol) {
      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
    }
    function cloneTypedArray(typedArray, isDeep) {
      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
    }
    function copyArray(source, array) {
      var index = -1, length = source.length;
      array || (array = Array(length));
      while (++index < length) {
        array[index] = source[index];
      }
      return array;
    }
    function copyObject(source, props, object, customizer) {
      object || (object = {});
      var index = -1, length = props.length;
      while (++index < length) {
        var key = props[index];
        var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
        assignValue(object, key, newValue === void 0 ? source[key] : newValue);
      }
      return object;
    }
    function copySymbols(source, object) {
      return copyObject(source, getSymbols(source), object);
    }
    function getAllKeys(object) {
      return baseGetAllKeys(object, keys, getSymbols);
    }
    function getMapData(map3, key) {
      var data = map3.__data__;
      return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
    }
    function getNative(object, key) {
      var value = getValue(object, key);
      return baseIsNative(value) ? value : void 0;
    }
    var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
    var getTag = baseGetTag;
    if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
      getTag = function(value) {
        var result = objectToString2.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
        if (ctorString) {
          switch (ctorString) {
            case dataViewCtorString:
              return dataViewTag;
            case mapCtorString:
              return mapTag;
            case promiseCtorString:
              return promiseTag;
            case setCtorString:
              return setTag;
            case weakMapCtorString:
              return weakMapTag;
          }
        }
        return result;
      };
    }
    function initCloneArray(array) {
      var length = array.length, result = array.constructor(length);
      if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
        result.index = array.index;
        result.input = array.input;
      }
      return result;
    }
    function initCloneObject(object) {
      return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
    }
    function initCloneByTag(object, tag, cloneFunc, isDeep) {
      var Ctor = object.constructor;
      switch (tag) {
        case arrayBufferTag:
          return cloneArrayBuffer(object);
        case boolTag:
        case dateTag:
          return new Ctor(+object);
        case dataViewTag:
          return cloneDataView(object, isDeep);
        case float32Tag:
        case float64Tag:
        case int8Tag:
        case int16Tag:
        case int32Tag:
        case uint8Tag:
        case uint8ClampedTag:
        case uint16Tag:
        case uint32Tag:
          return cloneTypedArray(object, isDeep);
        case mapTag:
          return cloneMap(object, isDeep, cloneFunc);
        case numberTag:
        case stringTag:
          return new Ctor(object);
        case regexpTag:
          return cloneRegExp(object);
        case setTag:
          return cloneSet(object, isDeep, cloneFunc);
        case symbolTag:
          return cloneSymbol(object);
      }
    }
    function isIndex(value, length) {
      length = length == null ? MAX_SAFE_INTEGER : length;
      return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
    }
    function isKeyable(value) {
      var type = typeof value;
      return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
    }
    function isMasked(func) {
      return !!maskSrcKey && maskSrcKey in func;
    }
    function isPrototype(value) {
      var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
      return value === proto;
    }
    function toSource(func) {
      if (func != null) {
        try {
          return funcToString.call(func);
        } catch (e) {
        }
        try {
          return func + "";
        } catch (e) {
        }
      }
      return "";
    }
    function cloneDeep(value) {
      return baseClone(value, true, true);
    }
    function eq(value, other) {
      return value === other || value !== value && other !== other;
    }
    function isArguments(value) {
      return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString2.call(value) == argsTag);
    }
    var isArray3 = Array.isArray;
    function isArrayLike2(value) {
      return value != null && isLength(value.length) && !isFunction3(value);
    }
    function isArrayLikeObject(value) {
      return isObjectLike(value) && isArrayLike2(value);
    }
    var isBuffer = nativeIsBuffer || stubFalse;
    function isFunction3(value) {
      var tag = isObject2(value) ? objectToString2.call(value) : "";
      return tag == funcTag || tag == genTag;
    }
    function isLength(value) {
      return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
    }
    function isObject2(value) {
      var type = typeof value;
      return !!value && (type == "object" || type == "function");
    }
    function isObjectLike(value) {
      return !!value && typeof value == "object";
    }
    function keys(object) {
      return isArrayLike2(object) ? arrayLikeKeys(object) : baseKeys(object);
    }
    function stubArray() {
      return [];
    }
    function stubFalse() {
      return false;
    }
    module.exports = cloneDeep;
  }
});

// node_modules/.pnpm/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js
var require_fast_json_stable_stringify = __commonJS({
  "node_modules/.pnpm/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js"(exports, module) {
    "use strict";
    module.exports = function(data, opts) {
      if (!opts)
        opts = {};
      if (typeof opts === "function")
        opts = { cmp: opts };
      var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false;
      var cmp = opts.cmp && /* @__PURE__ */ function(f) {
        return function(node) {
          return function(a, b) {
            var aobj = { key: a, value: node[a] };
            var bobj = { key: b, value: node[b] };
            return f(aobj, bobj);
          };
        };
      }(opts.cmp);
      var seen = [];
      return function stringify3(node) {
        if (node && node.toJSON && typeof node.toJSON === "function") {
          node = node.toJSON();
        }
        if (node === void 0)
          return;
        if (typeof node == "number")
          return isFinite(node) ? "" + node : "null";
        if (typeof node !== "object")
          return JSON.stringify(node);
        var i, out;
        if (Array.isArray(node)) {
          out = "[";
          for (i = 0; i < node.length; i++) {
            if (i)
              out += ",";
            out += stringify3(node[i]) || "null";
          }
          return out + "]";
        }
        if (node === null)
          return "null";
        if (seen.indexOf(node) !== -1) {
          if (cycles)
            return JSON.stringify("__cycle__");
          throw new TypeError("Converting circular structure to JSON");
        }
        var seenIndex = seen.push(node) - 1;
        var keys = Object.keys(node).sort(cmp && cmp(node));
        out = "";
        for (i = 0; i < keys.length; i++) {
          var key = keys[i];
          var value = stringify3(node[key]);
          if (!value)
            continue;
          if (out)
            out += ",";
          out += JSON.stringify(key) + ":" + value;
        }
        seen.splice(seenIndex, 1);
        return "{" + out + "}";
      }(data);
    };
  }
});

// ts/plugins.ts
var isounique2 = __toESM(require_dist_ts(), 1);

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/index.js
var dist_ts_exports5 = {};
__export(dist_ts_exports5, {
  AsyncExecutionStack: () => AsyncExecutionStack,
  BackpressuredArray: () => BackpressuredArray,
  FastMap: () => FastMap,
  Interest: () => Interest,
  InterestMap: () => InterestMap,
  LimitedArray: () => LimitedArray,
  LoopTracker: () => LoopTracker,
  ObjectMap: () => ObjectMap,
  Stringmap: () => Stringmap,
  TimedAggregtor: () => TimedAggregtor,
  Tree: () => Tree,
  uni: () => uni
});

// node_modules/.pnpm/@push.rocks+smartdelay@3.0.5/node_modules/@push.rocks/smartdelay/dist_ts/index.js
var dist_ts_exports2 = {};
__export(dist_ts_exports2, {
  Timeout: () => Timeout,
  delayFor: () => delayFor,
  delayForRandom: () => delayForRandom
});

// node_modules/.pnpm/@push.rocks+smartpromise@4.0.4/node_modules/@push.rocks/smartpromise/dist_ts/index.js
var dist_ts_exports = {};
__export(dist_ts_exports, {
  CumulativeDeferred: () => CumulativeDeferred,
  Deferred: () => Deferred,
  cumulativeDefer: () => cumulativeDefer,
  defer: () => defer,
  getFirstTrueOrFalse: () => getFirstTrueOrFalse,
  map: () => map,
  rejectedPromise: () => rejectedPromise,
  resolvedPromise: () => resolvedPromise,
  timeoutAndContinue: () => timeoutAndContinue,
  timeoutWrap: () => timeoutWrap
});

// node_modules/.pnpm/@push.rocks+smartpromise@4.0.4/node_modules/@push.rocks/smartpromise/dist_ts/smartpromise.classes.deferred.js
var Deferred = class {
  claim() {
    if (this.claimed) {
      throw new Error("Deferred already claimed");
    }
    this.claimed = true;
  }
  get duration() {
    if (this.stoppedAt) {
      return this.stoppedAt - this.startedAt;
    } else {
      return Date.now() - this.startedAt;
    }
  }
  constructor() {
    this.claimed = false;
    this.promise = new Promise((resolve, reject) => {
      this.resolve = (valueArg) => {
        this.status = "fulfilled";
        this.stoppedAt = Date.now();
        resolve(valueArg);
      };
      this.reject = (reason) => {
        this.status = "rejected";
        this.stoppedAt = Date.now();
        reject(reason);
      };
      this.startedAt = Date.now();
      this.status = "pending";
    });
  }
};
var defer = () => {
  return new Deferred();
};

// node_modules/.pnpm/@push.rocks+smartpromise@4.0.4/node_modules/@push.rocks/smartpromise/dist_ts/smartpromise.classes.cumulativedeferred.js
var CumulativeDeferred = class {
  constructor() {
    this.accumulatedPromises = [];
    this.deferred = defer();
    this.promise = this.deferred.promise;
    setTimeout(async () => {
      while (this.accumulatedPromises.length > 0) {
        const poppedPromise = this.accumulatedPromises.shift();
        await poppedPromise;
      }
      this.deferred.resolve();
    }, 0);
  }
  addPromise(promiseArg) {
    this.accumulatedPromises.push(promiseArg);
  }
};
var cumulativeDefer = () => {
  return new CumulativeDeferred();
};

// node_modules/.pnpm/@push.rocks+smartpromise@4.0.4/node_modules/@push.rocks/smartpromise/dist_ts/index.js
var resolvedPromise = (value) => {
  return Promise.resolve(value);
};
var rejectedPromise = (err) => {
  return Promise.reject(err);
};
var map = async (inputArg, functionArg) => {
  const promiseArray = [];
  const resultArray = [];
  for (const item of inputArg) {
    const promise = functionArg(item);
    promiseArray.push(promise);
    promise.then((x) => {
      resultArray.push(x);
    });
  }
  await Promise.all(promiseArray);
  return resultArray;
};
var timeoutWrap = async (promiseArg, timeoutInMsArg, rejectArg = true) => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      if (rejectArg) {
        reject(new Error("timeout"));
      } else {
        resolve(null);
      }
    }, timeoutInMsArg);
    promiseArg.then(resolve, reject);
  });
};
var timeoutAndContinue = async (promiseArg, timeoutInMsArg = 6e4) => {
  return timeoutWrap(promiseArg, timeoutInMsArg, false);
};
var getFirstTrueOrFalse = async (promisesArg) => {
  const done = defer();
  for (const promiseArg of promisesArg) {
    promiseArg.then((resultArg) => {
      if (resultArg === true) {
        done.resolve(true);
      }
    });
  }
  Promise.all(promisesArg).then(() => {
    done.resolve(false);
  });
  return done.promise;
};

// node_modules/.pnpm/@push.rocks+smartdelay@3.0.5/node_modules/@push.rocks/smartdelay/dist_ts/index.js
var delayFor = async (timeInMillisecondArg, passOnArg, unrefedArg = false) => {
  const timeout = new Timeout(timeInMillisecondArg, null, unrefedArg);
  await timeout.promise;
  return passOnArg;
};
var delayForRandom = async (timeMinInMillisecondArg, timeMaxInMillisecondArg, passOnArg, unrefedArg = false) => {
  await delayFor(Math.random() * (timeMaxInMillisecondArg - timeMinInMillisecondArg) + timeMinInMillisecondArg, null, unrefedArg);
  return passOnArg;
};
var Timeout = class {
  constructor(timeInMillisecondArg, passOn, unrefedArg = false) {
    this._cancelled = false;
    this.timeoutInMillis = timeInMillisecondArg;
    this._deferred = defer();
    this.promise = this._deferred.promise;
    this._timeout = setTimeout(() => {
      if (!this._cancelled) {
        this._deferred.resolve(passOn);
      }
    }, timeInMillisecondArg);
    this.started = Date.now();
    if (unrefedArg) {
      this.makeUnrefed();
    }
  }
  /**
   * unreffing a timeout causes the node process to not wait for completion before exit
   */
  makeUnrefed() {
    this._timeout.unref();
  }
  /**
   * cancels the timer
   */
  cancel() {
    this._cancelled = true;
    clearTimeout(this._timeout);
  }
  getTimeLeft() {
    const result = this.started + this.timeoutInMillis - Date.now();
    return result > 0 ? result : 0;
  }
};

// node_modules/.pnpm/@push.rocks+smartmatch@2.0.0/node_modules/@push.rocks/smartmatch/dist_ts/index.js
var dist_ts_exports3 = {};
__export(dist_ts_exports3, {
  SmartMatch: () => SmartMatch
});

// node_modules/.pnpm/matcher@5.0.0/node_modules/matcher/index.js
var matcher_exports = {};
__export(matcher_exports, {
  isMatch: () => isMatch,
  matcher: () => matcher
});

// node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js
function escapeStringRegexp(string) {
  if (typeof string !== "string") {
    throw new TypeError("Expected a string");
  }
  return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}

// node_modules/.pnpm/matcher@5.0.0/node_modules/matcher/index.js
var regexpCache = /* @__PURE__ */ new Map();
var sanitizeArray = (input, inputName) => {
  if (!Array.isArray(input)) {
    switch (typeof input) {
      case "string":
        input = [input];
        break;
      case "undefined":
        input = [];
        break;
      default:
        throw new TypeError(`Expected '${inputName}' to be a string or an array, but got a type of '${typeof input}'`);
    }
  }
  return input.filter((string) => {
    if (typeof string !== "string") {
      if (typeof string === "undefined") {
        return false;
      }
      throw new TypeError(`Expected '${inputName}' to be an array of strings, but found a type of '${typeof string}' in the array`);
    }
    return true;
  });
};
var makeRegexp = (pattern, options) => {
  options = {
    caseSensitive: false,
    ...options
  };
  const cacheKey = pattern + JSON.stringify(options);
  if (regexpCache.has(cacheKey)) {
    return regexpCache.get(cacheKey);
  }
  const negated = pattern[0] === "!";
  if (negated) {
    pattern = pattern.slice(1);
  }
  pattern = escapeStringRegexp(pattern).replace(/\\\*/g, "[\\s\\S]*");
  const regexp = new RegExp(`^${pattern}$`, options.caseSensitive ? "" : "i");
  regexp.negated = negated;
  regexpCache.set(cacheKey, regexp);
  return regexp;
};
var baseMatcher = (inputs, patterns, options, firstMatchOnly) => {
  inputs = sanitizeArray(inputs, "inputs");
  patterns = sanitizeArray(patterns, "patterns");
  if (patterns.length === 0) {
    return [];
  }
  patterns = patterns.map((pattern) => makeRegexp(pattern, options));
  const { allPatterns } = options || {};
  const result = [];
  for (const input of inputs) {
    let matches;
    const didFit = [...patterns].fill(false);
    for (const [index, pattern] of patterns.entries()) {
      if (pattern.test(input)) {
        didFit[index] = true;
        matches = !pattern.negated;
        if (!matches) {
          break;
        }
      }
    }
    if (!(matches === false || matches === void 0 && patterns.some((pattern) => !pattern.negated) || allPatterns && didFit.some((yes, index) => !yes && !patterns[index].negated))) {
      result.push(input);
      if (firstMatchOnly) {
        break;
      }
    }
  }
  return result;
};
function matcher(inputs, patterns, options) {
  return baseMatcher(inputs, patterns, options, false);
}
function isMatch(inputs, patterns, options) {
  return baseMatcher(inputs, patterns, options, true).length > 0;
}

// node_modules/.pnpm/@push.rocks+smartmatch@2.0.0/node_modules/@push.rocks/smartmatch/dist_ts/index.js
var SmartMatch = class {
  constructor(wildcardArg) {
    this.wildcard = wildcardArg;
  }
  match(matchStringArg) {
    return matcher_exports.isMatch(matchStringArg, this.wildcard);
  }
};

// node_modules/.pnpm/@push.rocks+smartrx@3.0.7/node_modules/@push.rocks/smartrx/dist_ts/index.js
var dist_ts_exports4 = {};
__export(dist_ts_exports4, {
  ObservableIntake: () => ObservableIntake,
  Observablemap: () => Observablemap,
  rxjs: () => smartrx_plugins_rxjs_exports
});

// node_modules/.pnpm/@push.rocks+smartrx@3.0.7/node_modules/@push.rocks/smartrx/dist_ts/smartrx.plugins.rxjs.js
var smartrx_plugins_rxjs_exports = {};
__export(smartrx_plugins_rxjs_exports, {
  Observable: () => Observable,
  ReplaySubject: () => ReplaySubject,
  Subject: () => Subject,
  Subscription: () => Subscription,
  from: () => from,
  fromEvent: () => fromEvent,
  of: () => of,
  ops: () => ops
});

// node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs
var extendStatics = function(d, b) {
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
    d2.__proto__ = b2;
  } || function(d2, b2) {
    for (var p in b2)
      if (Object.prototype.hasOwnProperty.call(b2, p))
        d2[p] = b2[p];
  };
  return extendStatics(d, b);
};
function __extends(d, b) {
  if (typeof b !== "function" && b !== null)
    throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  extendStatics(d, b);
  function __() {
    this.constructor = d;
  }
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __awaiter(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function(resolve) {
      resolve(value);
    });
  }
  return new (P || (P = Promise))(function(resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
}
function __generator(thisArg, body) {
  var _ = { label: 0, sent: function() {
    if (t[0] & 1)
      throw t[1];
    return t[1];
  }, trys: [], ops: [] }, f, y, t, g;
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
    return this;
  }), g;
  function verb(n) {
    return function(v) {
      return step([n, v]);
    };
  }
  function step(op) {
    if (f)
      throw new TypeError("Generator is already executing.");
    while (g && (g = 0, op[0] && (_ = 0)), _)
      try {
        if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
          return t;
        if (y = 0, t)
          op = [op[0] & 2, t.value];
        switch (op[0]) {
          case 0:
          case 1:
            t = op;
            break;
          case 4:
            _.label++;
            return { value: op[1], done: false };
          case 5:
            _.label++;
            y = op[1];
            op = [0];
            continue;
          case 7:
            op = _.ops.pop();
            _.trys.pop();
            continue;
          default:
            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
              _ = 0;
              continue;
            }
            if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
              _.label = op[1];
              break;
            }
            if (op[0] === 6 && _.label < t[1]) {
              _.label = t[1];
              t = op;
              break;
            }
            if (t && _.label < t[2]) {
              _.label = t[2];
              _.ops.push(op);
              break;
            }
            if (t[2])
              _.ops.pop();
            _.trys.pop();
            continue;
        }
        op = body.call(thisArg, _);
      } catch (e) {
        op = [6, e];
        y = 0;
      } finally {
        f = t = 0;
      }
    if (op[0] & 5)
      throw op[1];
    return { value: op[0] ? op[1] : void 0, done: true };
  }
}
function __values(o) {
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  if (m)
    return m.call(o);
  if (o && typeof o.length === "number")
    return {
      next: function() {
        if (o && i >= o.length)
          o = void 0;
        return { value: o && o[i++], done: !o };
      }
    };
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
  var m = typeof Symbol === "function" && o[Symbol.iterator];
  if (!m)
    return o;
  var i = m.call(o), r, ar = [], e;
  try {
    while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
      ar.push(r.value);
  } catch (error) {
    e = { error };
  } finally {
    try {
      if (r && !r.done && (m = i["return"]))
        m.call(i);
    } finally {
      if (e)
        throw e.error;
    }
  }
  return ar;
}
function __spreadArray(to, from2, pack) {
  if (pack || arguments.length === 2)
    for (var i = 0, l = from2.length, ar; i < l; i++) {
      if (ar || !(i in from2)) {
        if (!ar)
          ar = Array.prototype.slice.call(from2, 0, i);
        ar[i] = from2[i];
      }
    }
  return to.concat(ar || Array.prototype.slice.call(from2));
}
function __await(v) {
  return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator)
    throw new TypeError("Symbol.asyncIterator is not defined.");
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
    return this;
  }, i;
  function verb(n) {
    if (g[n])
      i[n] = function(v) {
        return new Promise(function(a, b) {
          q.push([n, v, a, b]) > 1 || resume(n, v);
        });
      };
  }
  function resume(n, v) {
    try {
      step(g[n](v));
    } catch (e) {
      settle(q[0][3], e);
    }
  }
  function step(r) {
    r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
  }
  function fulfill(value) {
    resume("next", value);
  }
  function reject(value) {
    resume("throw", value);
  }
  function settle(f, v) {
    if (f(v), q.shift(), q.length)
      resume(q[0][0], q[0][1]);
  }
}
function __asyncValues(o) {
  if (!Symbol.asyncIterator)
    throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator], i;
  return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
    return this;
  }, i);
  function verb(n) {
    i[n] = o[n] && function(v) {
      return new Promise(function(resolve, reject) {
        v = o[n](v), settle(resolve, reject, v.done, v.value);
      });
    };
  }
  function settle(resolve, reject, d, v) {
    Promise.resolve(v).then(function(v2) {
      resolve({ value: v2, done: d });
    }, reject);
  }
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isFunction.js
function isFunction(value) {
  return typeof value === "function";
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js
function createErrorClass(createImpl) {
  var _super = function(instance) {
    Error.call(instance);
    instance.stack = new Error().stack;
  };
  var ctorFunc = createImpl(_super);
  ctorFunc.prototype = Object.create(Error.prototype);
  ctorFunc.prototype.constructor = ctorFunc;
  return ctorFunc;
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js
var UnsubscriptionError = createErrorClass(function(_super) {
  return function UnsubscriptionErrorImpl(errors) {
    _super(this);
    this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function(err, i) {
      return i + 1 + ") " + err.toString();
    }).join("\n  ") : "";
    this.name = "UnsubscriptionError";
    this.errors = errors;
  };
});

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js
function arrRemove(arr, item) {
  if (arr) {
    var index = arr.indexOf(item);
    0 <= index && arr.splice(index, 1);
  }
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subscription.js
var Subscription = function() {
  function Subscription2(initialTeardown) {
    this.initialTeardown = initialTeardown;
    this.closed = false;
    this._parentage = null;
    this._finalizers = null;
  }
  Subscription2.prototype.unsubscribe = function() {
    var e_1, _a, e_2, _b;
    var errors;
    if (!this.closed) {
      this.closed = true;
      var _parentage = this._parentage;
      if (_parentage) {
        this._parentage = null;
        if (Array.isArray(_parentage)) {
          try {
            for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
              var parent_1 = _parentage_1_1.value;
              parent_1.remove(this);
            }
          } catch (e_1_1) {
            e_1 = { error: e_1_1 };
          } finally {
            try {
              if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return))
                _a.call(_parentage_1);
            } finally {
              if (e_1)
                throw e_1.error;
            }
          }
        } else {
          _parentage.remove(this);
        }
      }
      var initialFinalizer = this.initialTeardown;
      if (isFunction(initialFinalizer)) {
        try {
          initialFinalizer();
        } catch (e) {
          errors = e instanceof UnsubscriptionError ? e.errors : [e];
        }
      }
      var _finalizers = this._finalizers;
      if (_finalizers) {
        this._finalizers = null;
        try {
          for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {
            var finalizer = _finalizers_1_1.value;
            try {
              execFinalizer(finalizer);
            } catch (err) {
              errors = errors !== null && errors !== void 0 ? errors : [];
              if (err instanceof UnsubscriptionError) {
                errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));
              } else {
                errors.push(err);
              }
            }
          }
        } catch (e_2_1) {
          e_2 = { error: e_2_1 };
        } finally {
          try {
            if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return))
              _b.call(_finalizers_1);
          } finally {
            if (e_2)
              throw e_2.error;
          }
        }
      }
      if (errors) {
        throw new UnsubscriptionError(errors);
      }
    }
  };
  Subscription2.prototype.add = function(teardown) {
    var _a;
    if (teardown && teardown !== this) {
      if (this.closed) {
        execFinalizer(teardown);
      } else {
        if (teardown instanceof Subscription2) {
          if (teardown.closed || teardown._hasParent(this)) {
            return;
          }
          teardown._addParent(this);
        }
        (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);
      }
    }
  };
  Subscription2.prototype._hasParent = function(parent) {
    var _parentage = this._parentage;
    return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent);
  };
  Subscription2.prototype._addParent = function(parent) {
    var _parentage = this._parentage;
    this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
  };
  Subscription2.prototype._removeParent = function(parent) {
    var _parentage = this._parentage;
    if (_parentage === parent) {
      this._parentage = null;
    } else if (Array.isArray(_parentage)) {
      arrRemove(_parentage, parent);
    }
  };
  Subscription2.prototype.remove = function(teardown) {
    var _finalizers = this._finalizers;
    _finalizers && arrRemove(_finalizers, teardown);
    if (teardown instanceof Subscription2) {
      teardown._removeParent(this);
    }
  };
  Subscription2.EMPTY = function() {
    var empty = new Subscription2();
    empty.closed = true;
    return empty;
  }();
  return Subscription2;
}();
var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
function isSubscription(value) {
  return value instanceof Subscription || value && "closed" in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe);
}
function execFinalizer(finalizer) {
  if (isFunction(finalizer)) {
    finalizer();
  } else {
    finalizer.unsubscribe();
  }
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/config.js
var config = {
  onUnhandledError: null,
  onStoppedNotification: null,
  Promise: void 0,
  useDeprecatedSynchronousErrorHandling: false,
  useDeprecatedNextContext: false
};

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js
var timeoutProvider = {
  setTimeout: function(handler, timeout) {
    var args = [];
    for (var _i = 2; _i < arguments.length; _i++) {
      args[_i - 2] = arguments[_i];
    }
    var delegate = timeoutProvider.delegate;
    if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
      return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));
    }
    return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));
  },
  clearTimeout: function(handle) {
    var delegate = timeoutProvider.delegate;
    return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
  },
  delegate: void 0
};

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js
function reportUnhandledError(err) {
  timeoutProvider.setTimeout(function() {
    var onUnhandledError = config.onUnhandledError;
    if (onUnhandledError) {
      onUnhandledError(err);
    } else {
      throw err;
    }
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/noop.js
function noop() {
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js
var COMPLETE_NOTIFICATION = function() {
  return createNotification("C", void 0, void 0);
}();
function errorNotification(error) {
  return createNotification("E", void 0, error);
}
function nextNotification(value) {
  return createNotification("N", value, void 0);
}
function createNotification(kind, value, error) {
  return {
    kind,
    value,
    error
  };
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/errorContext.js
var context = null;
function errorContext(cb) {
  if (config.useDeprecatedSynchronousErrorHandling) {
    var isRoot = !context;
    if (isRoot) {
      context = { errorThrown: false, error: null };
    }
    cb();
    if (isRoot) {
      var _a = context, errorThrown = _a.errorThrown, error = _a.error;
      context = null;
      if (errorThrown) {
        throw error;
      }
    }
  } else {
    cb();
  }
}
function captureError(err) {
  if (config.useDeprecatedSynchronousErrorHandling && context) {
    context.errorThrown = true;
    context.error = err;
  }
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subscriber.js
var Subscriber = function(_super) {
  __extends(Subscriber2, _super);
  function Subscriber2(destination) {
    var _this = _super.call(this) || this;
    _this.isStopped = false;
    if (destination) {
      _this.destination = destination;
      if (isSubscription(destination)) {
        destination.add(_this);
      }
    } else {
      _this.destination = EMPTY_OBSERVER;
    }
    return _this;
  }
  Subscriber2.create = function(next, error, complete) {
    return new SafeSubscriber(next, error, complete);
  };
  Subscriber2.prototype.next = function(value) {
    if (this.isStopped) {
      handleStoppedNotification(nextNotification(value), this);
    } else {
      this._next(value);
    }
  };
  Subscriber2.prototype.error = function(err) {
    if (this.isStopped) {
      handleStoppedNotification(errorNotification(err), this);
    } else {
      this.isStopped = true;
      this._error(err);
    }
  };
  Subscriber2.prototype.complete = function() {
    if (this.isStopped) {
      handleStoppedNotification(COMPLETE_NOTIFICATION, this);
    } else {
      this.isStopped = true;
      this._complete();
    }
  };
  Subscriber2.prototype.unsubscribe = function() {
    if (!this.closed) {
      this.isStopped = true;
      _super.prototype.unsubscribe.call(this);
      this.destination = null;
    }
  };
  Subscriber2.prototype._next = function(value) {
    this.destination.next(value);
  };
  Subscriber2.prototype._error = function(err) {
    try {
      this.destination.error(err);
    } finally {
      this.unsubscribe();
    }
  };
  Subscriber2.prototype._complete = function() {
    try {
      this.destination.complete();
    } finally {
      this.unsubscribe();
    }
  };
  return Subscriber2;
}(Subscription);
var _bind = Function.prototype.bind;
function bind(fn, thisArg) {
  return _bind.call(fn, thisArg);
}
var ConsumerObserver = function() {
  function ConsumerObserver2(partialObserver) {
    this.partialObserver = partialObserver;
  }
  ConsumerObserver2.prototype.next = function(value) {
    var partialObserver = this.partialObserver;
    if (partialObserver.next) {
      try {
        partialObserver.next(value);
      } catch (error) {
        handleUnhandledError(error);
      }
    }
  };
  ConsumerObserver2.prototype.error = function(err) {
    var partialObserver = this.partialObserver;
    if (partialObserver.error) {
      try {
        partialObserver.error(err);
      } catch (error) {
        handleUnhandledError(error);
      }
    } else {
      handleUnhandledError(err);
    }
  };
  ConsumerObserver2.prototype.complete = function() {
    var partialObserver = this.partialObserver;
    if (partialObserver.complete) {
      try {
        partialObserver.complete();
      } catch (error) {
        handleUnhandledError(error);
      }
    }
  };
  return ConsumerObserver2;
}();
var SafeSubscriber = function(_super) {
  __extends(SafeSubscriber2, _super);
  function SafeSubscriber2(observerOrNext, error, complete) {
    var _this = _super.call(this) || this;
    var partialObserver;
    if (isFunction(observerOrNext) || !observerOrNext) {
      partialObserver = {
        next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : void 0,
        error: error !== null && error !== void 0 ? error : void 0,
        complete: complete !== null && complete !== void 0 ? complete : void 0
      };
    } else {
      var context_1;
      if (_this && config.useDeprecatedNextContext) {
        context_1 = Object.create(observerOrNext);
        context_1.unsubscribe = function() {
          return _this.unsubscribe();
        };
        partialObserver = {
          next: observerOrNext.next && bind(observerOrNext.next, context_1),
          error: observerOrNext.error && bind(observerOrNext.error, context_1),
          complete: observerOrNext.complete && bind(observerOrNext.complete, context_1)
        };
      } else {
        partialObserver = observerOrNext;
      }
    }
    _this.destination = new ConsumerObserver(partialObserver);
    return _this;
  }
  return SafeSubscriber2;
}(Subscriber);
function handleUnhandledError(error) {
  if (config.useDeprecatedSynchronousErrorHandling) {
    captureError(error);
  } else {
    reportUnhandledError(error);
  }
}
function defaultErrorHandler(err) {
  throw err;
}
function handleStoppedNotification(notification, subscriber) {
  var onStoppedNotification = config.onStoppedNotification;
  onStoppedNotification && timeoutProvider.setTimeout(function() {
    return onStoppedNotification(notification, subscriber);
  });
}
var EMPTY_OBSERVER = {
  closed: true,
  next: noop,
  error: defaultErrorHandler,
  complete: noop
};

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/symbol/observable.js
var observable = function() {
  return typeof Symbol === "function" && Symbol.observable || "@@observable";
}();

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/identity.js
function identity(x) {
  return x;
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/pipe.js
function pipeFromArray(fns) {
  if (fns.length === 0) {
    return identity;
  }
  if (fns.length === 1) {
    return fns[0];
  }
  return function piped(input) {
    return fns.reduce(function(prev, fn) {
      return fn(prev);
    }, input);
  };
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Observable.js
var Observable = function() {
  function Observable2(subscribe) {
    if (subscribe) {
      this._subscribe = subscribe;
    }
  }
  Observable2.prototype.lift = function(operator) {
    var observable2 = new Observable2();
    observable2.source = this;
    observable2.operator = operator;
    return observable2;
  };
  Observable2.prototype.subscribe = function(observerOrNext, error, complete) {
    var _this = this;
    var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
    errorContext(function() {
      var _a = _this, operator = _a.operator, source = _a.source;
      subscriber.add(operator ? operator.call(subscriber, source) : source ? _this._subscribe(subscriber) : _this._trySubscribe(subscriber));
    });
    return subscriber;
  };
  Observable2.prototype._trySubscribe = function(sink) {
    try {
      return this._subscribe(sink);
    } catch (err) {
      sink.error(err);
    }
  };
  Observable2.prototype.forEach = function(next, promiseCtor) {
    var _this = this;
    promiseCtor = getPromiseCtor(promiseCtor);
    return new promiseCtor(function(resolve, reject) {
      var subscriber = new SafeSubscriber({
        next: function(value) {
          try {
            next(value);
          } catch (err) {
            reject(err);
            subscriber.unsubscribe();
          }
        },
        error: reject,
        complete: resolve
      });
      _this.subscribe(subscriber);
    });
  };
  Observable2.prototype._subscribe = function(subscriber) {
    var _a;
    return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
  };
  Observable2.prototype[observable] = function() {
    return this;
  };
  Observable2.prototype.pipe = function() {
    var operations = [];
    for (var _i = 0; _i < arguments.length; _i++) {
      operations[_i] = arguments[_i];
    }
    return pipeFromArray(operations)(this);
  };
  Observable2.prototype.toPromise = function(promiseCtor) {
    var _this = this;
    promiseCtor = getPromiseCtor(promiseCtor);
    return new promiseCtor(function(resolve, reject) {
      var value;
      _this.subscribe(function(x) {
        return value = x;
      }, function(err) {
        return reject(err);
      }, function() {
        return resolve(value);
      });
    });
  };
  Observable2.create = function(subscribe) {
    return new Observable2(subscribe);
  };
  return Observable2;
}();
function getPromiseCtor(promiseCtor) {
  var _a;
  return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
}
function isObserver(value) {
  return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
}
function isSubscriber(value) {
  return value && value instanceof Subscriber || isObserver(value) && isSubscription(value);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/lift.js
function hasLift(source) {
  return isFunction(source === null || source === void 0 ? void 0 : source.lift);
}
function operate(init) {
  return function(source) {
    if (hasLift(source)) {
      return source.lift(function(liftedSource) {
        try {
          return init(liftedSource, this);
        } catch (err) {
          this.error(err);
        }
      });
    }
    throw new TypeError("Unable to lift unknown Observable type");
  };
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js
function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {
  return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);
}
var OperatorSubscriber = function(_super) {
  __extends(OperatorSubscriber2, _super);
  function OperatorSubscriber2(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {
    var _this = _super.call(this, destination) || this;
    _this.onFinalize = onFinalize;
    _this.shouldUnsubscribe = shouldUnsubscribe;
    _this._next = onNext ? function(value) {
      try {
        onNext(value);
      } catch (err) {
        destination.error(err);
      }
    } : _super.prototype._next;
    _this._error = onError ? function(err) {
      try {
        onError(err);
      } catch (err2) {
        destination.error(err2);
      } finally {
        this.unsubscribe();
      }
    } : _super.prototype._error;
    _this._complete = onComplete ? function() {
      try {
        onComplete();
      } catch (err) {
        destination.error(err);
      } finally {
        this.unsubscribe();
      }
    } : _super.prototype._complete;
    return _this;
  }
  OperatorSubscriber2.prototype.unsubscribe = function() {
    var _a;
    if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
      var closed_1 = this.closed;
      _super.prototype.unsubscribe.call(this);
      !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));
    }
  };
  return OperatorSubscriber2;
}(Subscriber);

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js
var ObjectUnsubscribedError = createErrorClass(function(_super) {
  return function ObjectUnsubscribedErrorImpl() {
    _super(this);
    this.name = "ObjectUnsubscribedError";
    this.message = "object unsubscribed";
  };
});

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subject.js
var Subject = function(_super) {
  __extends(Subject2, _super);
  function Subject2() {
    var _this = _super.call(this) || this;
    _this.closed = false;
    _this.currentObservers = null;
    _this.observers = [];
    _this.isStopped = false;
    _this.hasError = false;
    _this.thrownError = null;
    return _this;
  }
  Subject2.prototype.lift = function(operator) {
    var subject = new AnonymousSubject(this, this);
    subject.operator = operator;
    return subject;
  };
  Subject2.prototype._throwIfClosed = function() {
    if (this.closed) {
      throw new ObjectUnsubscribedError();
    }
  };
  Subject2.prototype.next = function(value) {
    var _this = this;
    errorContext(function() {
      var e_1, _a;
      _this._throwIfClosed();
      if (!_this.isStopped) {
        if (!_this.currentObservers) {
          _this.currentObservers = Array.from(_this.observers);
        }
        try {
          for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {
            var observer = _c.value;
            observer.next(value);
          }
        } catch (e_1_1) {
          e_1 = { error: e_1_1 };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b.return))
              _a.call(_b);
          } finally {
            if (e_1)
              throw e_1.error;
          }
        }
      }
    });
  };
  Subject2.prototype.error = function(err) {
    var _this = this;
    errorContext(function() {
      _this._throwIfClosed();
      if (!_this.isStopped) {
        _this.hasError = _this.isStopped = true;
        _this.thrownError = err;
        var observers = _this.observers;
        while (observers.length) {
          observers.shift().error(err);
        }
      }
    });
  };
  Subject2.prototype.complete = function() {
    var _this = this;
    errorContext(function() {
      _this._throwIfClosed();
      if (!_this.isStopped) {
        _this.isStopped = true;
        var observers = _this.observers;
        while (observers.length) {
          observers.shift().complete();
        }
      }
    });
  };
  Subject2.prototype.unsubscribe = function() {
    this.isStopped = this.closed = true;
    this.observers = this.currentObservers = null;
  };
  Object.defineProperty(Subject2.prototype, "observed", {
    get: function() {
      var _a;
      return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
    },
    enumerable: false,
    configurable: true
  });
  Subject2.prototype._trySubscribe = function(subscriber) {
    this._throwIfClosed();
    return _super.prototype._trySubscribe.call(this, subscriber);
  };
  Subject2.prototype._subscribe = function(subscriber) {
    this._throwIfClosed();
    this._checkFinalizedStatuses(subscriber);
    return this._innerSubscribe(subscriber);
  };
  Subject2.prototype._innerSubscribe = function(subscriber) {
    var _this = this;
    var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;
    if (hasError || isStopped) {
      return EMPTY_SUBSCRIPTION;
    }
    this.currentObservers = null;
    observers.push(subscriber);
    return new Subscription(function() {
      _this.currentObservers = null;
      arrRemove(observers, subscriber);
    });
  };
  Subject2.prototype._checkFinalizedStatuses = function(subscriber) {
    var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;
    if (hasError) {
      subscriber.error(thrownError);
    } else if (isStopped) {
      subscriber.complete();
    }
  };
  Subject2.prototype.asObservable = function() {
    var observable2 = new Observable();
    observable2.source = this;
    return observable2;
  };
  Subject2.create = function(destination, source) {
    return new AnonymousSubject(destination, source);
  };
  return Subject2;
}(Observable);
var AnonymousSubject = function(_super) {
  __extends(AnonymousSubject2, _super);
  function AnonymousSubject2(destination, source) {
    var _this = _super.call(this) || this;
    _this.destination = destination;
    _this.source = source;
    return _this;
  }
  AnonymousSubject2.prototype.next = function(value) {
    var _a, _b;
    (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);
  };
  AnonymousSubject2.prototype.error = function(err) {
    var _a, _b;
    (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);
  };
  AnonymousSubject2.prototype.complete = function() {
    var _a, _b;
    (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);
  };
  AnonymousSubject2.prototype._subscribe = function(subscriber) {
    var _a, _b;
    return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
  };
  return AnonymousSubject2;
}(Subject);

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js
var dateTimestampProvider = {
  now: function() {
    return (dateTimestampProvider.delegate || Date).now();
  },
  delegate: void 0
};

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js
var ReplaySubject = function(_super) {
  __extends(ReplaySubject2, _super);
  function ReplaySubject2(_bufferSize, _windowTime, _timestampProvider) {
    if (_bufferSize === void 0) {
      _bufferSize = Infinity;
    }
    if (_windowTime === void 0) {
      _windowTime = Infinity;
    }
    if (_timestampProvider === void 0) {
      _timestampProvider = dateTimestampProvider;
    }
    var _this = _super.call(this) || this;
    _this._bufferSize = _bufferSize;
    _this._windowTime = _windowTime;
    _this._timestampProvider = _timestampProvider;
    _this._buffer = [];
    _this._infiniteTimeWindow = true;
    _this._infiniteTimeWindow = _windowTime === Infinity;
    _this._bufferSize = Math.max(1, _bufferSize);
    _this._windowTime = Math.max(1, _windowTime);
    return _this;
  }
  ReplaySubject2.prototype.next = function(value) {
    var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;
    if (!isStopped) {
      _buffer.push(value);
      !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);
    }
    this._trimBuffer();
    _super.prototype.next.call(this, value);
  };
  ReplaySubject2.prototype._subscribe = function(subscriber) {
    this._throwIfClosed();
    this._trimBuffer();
    var subscription = this._innerSubscribe(subscriber);
    var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer;
    var copy = _buffer.slice();
    for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {
      subscriber.next(copy[i]);
    }
    this._checkFinalizedStatuses(subscriber);
    return subscription;
  };
  ReplaySubject2.prototype._trimBuffer = function() {
    var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow;
    var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;
    _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);
    if (!_infiniteTimeWindow) {
      var now = _timestampProvider.now();
      var last2 = 0;
      for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {
        last2 = i;
      }
      last2 && _buffer.splice(0, last2 + 1);
    }
  };
  return ReplaySubject2;
}(Subject);

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js
var Action = function(_super) {
  __extends(Action2, _super);
  function Action2(scheduler, work) {
    return _super.call(this) || this;
  }
  Action2.prototype.schedule = function(state, delay) {
    if (delay === void 0) {
      delay = 0;
    }
    return this;
  };
  return Action2;
}(Subscription);

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js
var intervalProvider = {
  setInterval: function(handler, timeout) {
    var args = [];
    for (var _i = 2; _i < arguments.length; _i++) {
      args[_i - 2] = arguments[_i];
    }
    var delegate = intervalProvider.delegate;
    if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {
      return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args)));
    }
    return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args)));
  },
  clearInterval: function(handle) {
    var delegate = intervalProvider.delegate;
    return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);
  },
  delegate: void 0
};

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js
var AsyncAction = function(_super) {
  __extends(AsyncAction2, _super);
  function AsyncAction2(scheduler, work) {
    var _this = _super.call(this, scheduler, work) || this;
    _this.scheduler = scheduler;
    _this.work = work;
    _this.pending = false;
    return _this;
  }
  AsyncAction2.prototype.schedule = function(state, delay) {
    var _a;
    if (delay === void 0) {
      delay = 0;
    }
    if (this.closed) {
      return this;
    }
    this.state = state;
    var id = this.id;
    var scheduler = this.scheduler;
    if (id != null) {
      this.id = this.recycleAsyncId(scheduler, id, delay);
    }
    this.pending = true;
    this.delay = delay;
    this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);
    return this;
  };
  AsyncAction2.prototype.requestAsyncId = function(scheduler, _id, delay) {
    if (delay === void 0) {
      delay = 0;
    }
    return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);
  };
  AsyncAction2.prototype.recycleAsyncId = function(_scheduler, id, delay) {
    if (delay === void 0) {
      delay = 0;
    }
    if (delay != null && this.delay === delay && this.pending === false) {
      return id;
    }
    if (id != null) {
      intervalProvider.clearInterval(id);
    }
    return void 0;
  };
  AsyncAction2.prototype.execute = function(state, delay) {
    if (this.closed) {
      return new Error("executing a cancelled action");
    }
    this.pending = false;
    var error = this._execute(state, delay);
    if (error) {
      return error;
    } else if (this.pending === false && this.id != null) {
      this.id = this.recycleAsyncId(this.scheduler, this.id, null);
    }
  };
  AsyncAction2.prototype._execute = function(state, _delay) {
    var errored = false;
    var errorValue;
    try {
      this.work(state);
    } catch (e) {
      errored = true;
      errorValue = e ? e : new Error("Scheduled action threw falsy error");
    }
    if (errored) {
      this.unsubscribe();
      return errorValue;
    }
  };
  AsyncAction2.prototype.unsubscribe = function() {
    if (!this.closed) {
      var _a = this, id = _a.id, scheduler = _a.scheduler;
      var actions = scheduler.actions;
      this.work = this.state = this.scheduler = null;
      this.pending = false;
      arrRemove(actions, this);
      if (id != null) {
        this.id = this.recycleAsyncId(scheduler, id, null);
      }
      this.delay = null;
      _super.prototype.unsubscribe.call(this);
    }
  };
  return AsyncAction2;
}(Action);

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Scheduler.js
var Scheduler = function() {
  function Scheduler2(schedulerActionCtor, now) {
    if (now === void 0) {
      now = Scheduler2.now;
    }
    this.schedulerActionCtor = schedulerActionCtor;
    this.now = now;
  }
  Scheduler2.prototype.schedule = function(work, delay, state) {
    if (delay === void 0) {
      delay = 0;
    }
    return new this.schedulerActionCtor(this, work).schedule(state, delay);
  };
  Scheduler2.now = dateTimestampProvider.now;
  return Scheduler2;
}();

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js
var AsyncScheduler = function(_super) {
  __extends(AsyncScheduler2, _super);
  function AsyncScheduler2(SchedulerAction, now) {
    if (now === void 0) {
      now = Scheduler.now;
    }
    var _this = _super.call(this, SchedulerAction, now) || this;
    _this.actions = [];
    _this._active = false;
    return _this;
  }
  AsyncScheduler2.prototype.flush = function(action) {
    var actions = this.actions;
    if (this._active) {
      actions.push(action);
      return;
    }
    var error;
    this._active = true;
    do {
      if (error = action.execute(action.state, action.delay)) {
        break;
      }
    } while (action = actions.shift());
    this._active = false;
    if (error) {
      while (action = actions.shift()) {
        action.unsubscribe();
      }
      throw error;
    }
  };
  return AsyncScheduler2;
}(Scheduler);

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/async.js
var asyncScheduler = new AsyncScheduler(AsyncAction);
var async = asyncScheduler;

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js
function isScheduler(value) {
  return value && isFunction(value.schedule);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/args.js
function last(arr) {
  return arr[arr.length - 1];
}
function popScheduler(args) {
  return isScheduler(last(args)) ? args.pop() : void 0;
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js
var isArrayLike = function(x) {
  return x && typeof x.length === "number" && typeof x !== "function";
};

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isPromise.js
function isPromise(value) {
  return isFunction(value === null || value === void 0 ? void 0 : value.then);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js
function isInteropObservable(input) {
  return isFunction(input[observable]);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js
function isAsyncIterable(obj) {
  return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js
function createInvalidObservableTypeError(input) {
  return new TypeError("You provided " + (input !== null && typeof input === "object" ? "an invalid object" : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js
function getSymbolIterator() {
  if (typeof Symbol !== "function" || !Symbol.iterator) {
    return "@@iterator";
  }
  return Symbol.iterator;
}
var iterator = getSymbolIterator();

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isIterable.js
function isIterable(input) {
  return isFunction(input === null || input === void 0 ? void 0 : input[iterator]);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js
function readableStreamLikeToAsyncGenerator(readableStream) {
  return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() {
    var reader, _a, value, done;
    return __generator(this, function(_b) {
      switch (_b.label) {
        case 0:
          reader = readableStream.getReader();
          _b.label = 1;
        case 1:
          _b.trys.push([1, , 9, 10]);
          _b.label = 2;
        case 2:
          if (false)
            return [3, 8];
          return [4, __await(reader.read())];
        case 3:
          _a = _b.sent(), value = _a.value, done = _a.done;
          if (!done)
            return [3, 5];
          return [4, __await(void 0)];
        case 4:
          return [2, _b.sent()];
        case 5:
          return [4, __await(value)];
        case 6:
          return [4, _b.sent()];
        case 7:
          _b.sent();
          return [3, 2];
        case 8:
          return [3, 10];
        case 9:
          reader.releaseLock();
          return [7];
        case 10:
          return [2];
      }
    });
  });
}
function isReadableStreamLike(obj) {
  return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js
function innerFrom(input) {
  if (input instanceof Observable) {
    return input;
  }
  if (input != null) {
    if (isInteropObservable(input)) {
      return fromInteropObservable(input);
    }
    if (isArrayLike(input)) {
      return fromArrayLike(input);
    }
    if (isPromise(input)) {
      return fromPromise(input);
    }
    if (isAsyncIterable(input)) {
      return fromAsyncIterable(input);
    }
    if (isIterable(input)) {
      return fromIterable(input);
    }
    if (isReadableStreamLike(input)) {
      return fromReadableStreamLike(input);
    }
  }
  throw createInvalidObservableTypeError(input);
}
function fromInteropObservable(obj) {
  return new Observable(function(subscriber) {
    var obs = obj[observable]();
    if (isFunction(obs.subscribe)) {
      return obs.subscribe(subscriber);
    }
    throw new TypeError("Provided object does not correctly implement Symbol.observable");
  });
}
function fromArrayLike(array) {
  return new Observable(function(subscriber) {
    for (var i = 0; i < array.length && !subscriber.closed; i++) {
      subscriber.next(array[i]);
    }
    subscriber.complete();
  });
}
function fromPromise(promise) {
  return new Observable(function(subscriber) {
    promise.then(function(value) {
      if (!subscriber.closed) {
        subscriber.next(value);
        subscriber.complete();
      }
    }, function(err) {
      return subscriber.error(err);
    }).then(null, reportUnhandledError);
  });
}
function fromIterable(iterable) {
  return new Observable(function(subscriber) {
    var e_1, _a;
    try {
      for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {
        var value = iterable_1_1.value;
        subscriber.next(value);
        if (subscriber.closed) {
          return;
        }
      }
    } catch (e_1_1) {
      e_1 = { error: e_1_1 };
    } finally {
      try {
        if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return))
          _a.call(iterable_1);
      } finally {
        if (e_1)
          throw e_1.error;
      }
    }
    subscriber.complete();
  });
}
function fromAsyncIterable(asyncIterable) {
  return new Observable(function(subscriber) {
    process2(asyncIterable, subscriber).catch(function(err) {
      return subscriber.error(err);
    });
  });
}
function fromReadableStreamLike(readableStream) {
  return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
}
function process2(asyncIterable, subscriber) {
  var asyncIterable_1, asyncIterable_1_1;
  var e_2, _a;
  return __awaiter(this, void 0, void 0, function() {
    var value, e_2_1;
    return __generator(this, function(_b) {
      switch (_b.label) {
        case 0:
          _b.trys.push([0, 5, 6, 11]);
          asyncIterable_1 = __asyncValues(asyncIterable);
          _b.label = 1;
        case 1:
          return [4, asyncIterable_1.next()];
        case 2:
          if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done))
            return [3, 4];
          value = asyncIterable_1_1.value;
          subscriber.next(value);
          if (subscriber.closed) {
            return [2];
          }
          _b.label = 3;
        case 3:
          return [3, 1];
        case 4:
          return [3, 11];
        case 5:
          e_2_1 = _b.sent();
          e_2 = { error: e_2_1 };
          return [3, 11];
        case 6:
          _b.trys.push([6, , 9, 10]);
          if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)))
            return [3, 8];
          return [4, _a.call(asyncIterable_1)];
        case 7:
          _b.sent();
          _b.label = 8;
        case 8:
          return [3, 10];
        case 9:
          if (e_2)
            throw e_2.error;
          return [7];
        case 10:
          return [7];
        case 11:
          subscriber.complete();
          return [2];
      }
    });
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js
function executeSchedule(parentSubscription, scheduler, work, delay, repeat) {
  if (delay === void 0) {
    delay = 0;
  }
  if (repeat === void 0) {
    repeat = false;
  }
  var scheduleSubscription = scheduler.schedule(function() {
    work();
    if (repeat) {
      parentSubscription.add(this.schedule(null, delay));
    } else {
      this.unsubscribe();
    }
  }, delay);
  parentSubscription.add(scheduleSubscription);
  if (!repeat) {
    return scheduleSubscription;
  }
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js
function observeOn(scheduler, delay) {
  if (delay === void 0) {
    delay = 0;
  }
  return operate(function(source, subscriber) {
    source.subscribe(createOperatorSubscriber(subscriber, function(value) {
      return executeSchedule(subscriber, scheduler, function() {
        return subscriber.next(value);
      }, delay);
    }, function() {
      return executeSchedule(subscriber, scheduler, function() {
        return subscriber.complete();
      }, delay);
    }, function(err) {
      return executeSchedule(subscriber, scheduler, function() {
        return subscriber.error(err);
      }, delay);
    }));
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js
function subscribeOn(scheduler, delay) {
  if (delay === void 0) {
    delay = 0;
  }
  return operate(function(source, subscriber) {
    subscriber.add(scheduler.schedule(function() {
      return source.subscribe(subscriber);
    }, delay));
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js
function scheduleObservable(input, scheduler) {
  return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js
function schedulePromise(input, scheduler) {
  return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js
function scheduleArray(input, scheduler) {
  return new Observable(function(subscriber) {
    var i = 0;
    return scheduler.schedule(function() {
      if (i === input.length) {
        subscriber.complete();
      } else {
        subscriber.next(input[i++]);
        if (!subscriber.closed) {
          this.schedule();
        }
      }
    });
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js
function scheduleIterable(input, scheduler) {
  return new Observable(function(subscriber) {
    var iterator2;
    executeSchedule(subscriber, scheduler, function() {
      iterator2 = input[iterator]();
      executeSchedule(subscriber, scheduler, function() {
        var _a;
        var value;
        var done;
        try {
          _a = iterator2.next(), value = _a.value, done = _a.done;
        } catch (err) {
          subscriber.error(err);
          return;
        }
        if (done) {
          subscriber.complete();
        } else {
          subscriber.next(value);
        }
      }, 0, true);
    });
    return function() {
      return isFunction(iterator2 === null || iterator2 === void 0 ? void 0 : iterator2.return) && iterator2.return();
    };
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js
function scheduleAsyncIterable(input, scheduler) {
  if (!input) {
    throw new Error("Iterable cannot be null");
  }
  return new Observable(function(subscriber) {
    executeSchedule(subscriber, scheduler, function() {
      var iterator2 = input[Symbol.asyncIterator]();
      executeSchedule(subscriber, scheduler, function() {
        iterator2.next().then(function(result) {
          if (result.done) {
            subscriber.complete();
          } else {
            subscriber.next(result.value);
          }
        });
      }, 0, true);
    });
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js
function scheduleReadableStreamLike(input, scheduler) {
  return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js
function scheduled(input, scheduler) {
  if (input != null) {
    if (isInteropObservable(input)) {
      return scheduleObservable(input, scheduler);
    }
    if (isArrayLike(input)) {
      return scheduleArray(input, scheduler);
    }
    if (isPromise(input)) {
      return schedulePromise(input, scheduler);
    }
    if (isAsyncIterable(input)) {
      return scheduleAsyncIterable(input, scheduler);
    }
    if (isIterable(input)) {
      return scheduleIterable(input, scheduler);
    }
    if (isReadableStreamLike(input)) {
      return scheduleReadableStreamLike(input, scheduler);
    }
  }
  throw createInvalidObservableTypeError(input);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/from.js
function from(input, scheduler) {
  return scheduler ? scheduled(input, scheduler) : innerFrom(input);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/of.js
function of() {
  var args = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    args[_i] = arguments[_i];
  }
  var scheduler = popScheduler(args);
  return from(args, scheduler);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isDate.js
function isValidDate(value) {
  return value instanceof Date && !isNaN(value);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/map.js
function map2(project, thisArg) {
  return operate(function(source, subscriber) {
    var index = 0;
    source.subscribe(createOperatorSubscriber(subscriber, function(value) {
      subscriber.next(project.call(thisArg, value, index++));
    }));
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js
var isArray = Array.isArray;
function callOrApply(fn, args) {
  return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args);
}
function mapOneOrManyArgs(fn) {
  return map2(function(args) {
    return callOrApply(fn, args);
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js
function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {
  var buffer = [];
  var active = 0;
  var index = 0;
  var isComplete = false;
  var checkComplete = function() {
    if (isComplete && !buffer.length && !active) {
      subscriber.complete();
    }
  };
  var outerNext = function(value) {
    return active < concurrent ? doInnerSub(value) : buffer.push(value);
  };
  var doInnerSub = function(value) {
    expand && subscriber.next(value);
    active++;
    var innerComplete = false;
    innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function(innerValue) {
      onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);
      if (expand) {
        outerNext(innerValue);
      } else {
        subscriber.next(innerValue);
      }
    }, function() {
      innerComplete = true;
    }, void 0, function() {
      if (innerComplete) {
        try {
          active--;
          var _loop_1 = function() {
            var bufferedValue = buffer.shift();
            if (innerSubScheduler) {
              executeSchedule(subscriber, innerSubScheduler, function() {
                return doInnerSub(bufferedValue);
              });
            } else {
              doInnerSub(bufferedValue);
            }
          };
          while (buffer.length && active < concurrent) {
            _loop_1();
          }
          checkComplete();
        } catch (err) {
          subscriber.error(err);
        }
      }
    }));
  };
  source.subscribe(createOperatorSubscriber(subscriber, outerNext, function() {
    isComplete = true;
    checkComplete();
  }));
  return function() {
    additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();
  };
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js
function mergeMap(project, resultSelector, concurrent) {
  if (concurrent === void 0) {
    concurrent = Infinity;
  }
  if (isFunction(resultSelector)) {
    return mergeMap(function(a, i) {
      return map2(function(b, ii) {
        return resultSelector(a, b, i, ii);
      })(innerFrom(project(a, i)));
    }, concurrent);
  } else if (typeof resultSelector === "number") {
    concurrent = resultSelector;
  }
  return operate(function(source, subscriber) {
    return mergeInternals(source, subscriber, project, concurrent);
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js
function mergeAll(concurrent) {
  if (concurrent === void 0) {
    concurrent = Infinity;
  }
  return mergeMap(identity, concurrent);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js
function concatAll() {
  return mergeAll(1);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/concat.js
function concat() {
  var args = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    args[_i] = arguments[_i];
  }
  return concatAll()(from(args, popScheduler(args)));
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js
var nodeEventEmitterMethods = ["addListener", "removeListener"];
var eventTargetMethods = ["addEventListener", "removeEventListener"];
var jqueryMethods = ["on", "off"];
function fromEvent(target, eventName, options, resultSelector) {
  if (isFunction(options)) {
    resultSelector = options;
    options = void 0;
  }
  if (resultSelector) {
    return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));
  }
  var _a = __read(isEventTarget(target) ? eventTargetMethods.map(function(methodName) {
    return function(handler) {
      return target[methodName](eventName, handler, options);
    };
  }) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [], 2), add = _a[0], remove = _a[1];
  if (!add) {
    if (isArrayLike(target)) {
      return mergeMap(function(subTarget) {
        return fromEvent(subTarget, eventName, options);
      })(innerFrom(target));
    }
  }
  if (!add) {
    throw new TypeError("Invalid event target");
  }
  return new Observable(function(subscriber) {
    var handler = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      return subscriber.next(1 < args.length ? args : args[0]);
    };
    add(handler);
    return function() {
      return remove(handler);
    };
  });
}
function toCommonHandlerRegistry(target, eventName) {
  return function(methodName) {
    return function(handler) {
      return target[methodName](eventName, handler);
    };
  };
}
function isNodeStyleEventEmitter(target) {
  return isFunction(target.addListener) && isFunction(target.removeListener);
}
function isJQueryStyleEventEmitter(target) {
  return isFunction(target.on) && isFunction(target.off);
}
function isEventTarget(target) {
  return isFunction(target.addEventListener) && isFunction(target.removeEventListener);
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/timer.js
function timer(dueTime, intervalOrScheduler, scheduler) {
  if (dueTime === void 0) {
    dueTime = 0;
  }
  if (scheduler === void 0) {
    scheduler = async;
  }
  var intervalDuration = -1;
  if (intervalOrScheduler != null) {
    if (isScheduler(intervalOrScheduler)) {
      scheduler = intervalOrScheduler;
    } else {
      intervalDuration = intervalOrScheduler;
    }
  }
  return new Observable(function(subscriber) {
    var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;
    if (due < 0) {
      due = 0;
    }
    var n = 0;
    return scheduler.schedule(function() {
      if (!subscriber.closed) {
        subscriber.next(n++);
        if (0 <= intervalDuration) {
          this.schedule(void 0, intervalDuration);
        } else {
          subscriber.complete();
        }
      }
    }, due);
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/filter.js
function filter(predicate, thisArg) {
  return operate(function(source, subscriber) {
    var index = 0;
    source.subscribe(createOperatorSubscriber(subscriber, function(value) {
      return predicate.call(thisArg, value, index++) && subscriber.next(value);
    }));
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/debounce.js
function debounce(durationSelector) {
  return operate(function(source, subscriber) {
    var hasValue = false;
    var lastValue = null;
    var durationSubscriber = null;
    var emit = function() {
      durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();
      durationSubscriber = null;
      if (hasValue) {
        hasValue = false;
        var value = lastValue;
        lastValue = null;
        subscriber.next(value);
      }
    };
    source.subscribe(createOperatorSubscriber(subscriber, function(value) {
      durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();
      hasValue = true;
      lastValue = value;
      durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);
      innerFrom(durationSelector(value)).subscribe(durationSubscriber);
    }, function() {
      emit();
      subscriber.complete();
    }, void 0, function() {
      lastValue = durationSubscriber = null;
    }));
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js
function debounceTime(dueTime, scheduler) {
  if (scheduler === void 0) {
    scheduler = asyncScheduler;
  }
  return operate(function(source, subscriber) {
    var activeTask = null;
    var lastValue = null;
    var lastTime = null;
    var emit = function() {
      if (activeTask) {
        activeTask.unsubscribe();
        activeTask = null;
        var value = lastValue;
        lastValue = null;
        subscriber.next(value);
      }
    };
    function emitWhenIdle() {
      var targetTime = lastTime + dueTime;
      var now = scheduler.now();
      if (now < targetTime) {
        activeTask = this.schedule(void 0, targetTime - now);
        subscriber.add(activeTask);
        return;
      }
      emit();
    }
    source.subscribe(createOperatorSubscriber(subscriber, function(value) {
      lastValue = value;
      lastTime = scheduler.now();
      if (!activeTask) {
        activeTask = scheduler.schedule(emitWhenIdle, dueTime);
        subscriber.add(activeTask);
      }
    }, function() {
      emit();
      subscriber.complete();
    }, void 0, function() {
      lastValue = activeTask = null;
    }));
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/startWith.js
function startWith() {
  var values = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    values[_i] = arguments[_i];
  }
  var scheduler = popScheduler(values);
  return operate(function(source, subscriber) {
    (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js
function takeUntil(notifier) {
  return operate(function(source, subscriber) {
    innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function() {
      return subscriber.complete();
    }, noop));
    !subscriber.closed && source.subscribe(subscriber);
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/throttle.js
function throttle(durationSelector, config2) {
  return operate(function(source, subscriber) {
    var _a = config2 !== null && config2 !== void 0 ? config2 : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c;
    var hasValue = false;
    var sendValue = null;
    var throttled = null;
    var isComplete = false;
    var endThrottling = function() {
      throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe();
      throttled = null;
      if (trailing) {
        send();
        isComplete && subscriber.complete();
      }
    };
    var cleanupThrottling = function() {
      throttled = null;
      isComplete && subscriber.complete();
    };
    var startThrottle = function(value) {
      return throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling));
    };
    var send = function() {
      if (hasValue) {
        hasValue = false;
        var value = sendValue;
        sendValue = null;
        subscriber.next(value);
        !isComplete && startThrottle(value);
      }
    };
    source.subscribe(createOperatorSubscriber(subscriber, function(value) {
      hasValue = true;
      sendValue = value;
      !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value));
    }, function() {
      isComplete = true;
      !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete();
    }));
  });
}

// node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js
function throttleTime(duration, scheduler, config2) {
  if (scheduler === void 0) {
    scheduler = asyncScheduler;
  }
  var duration$ = timer(duration, scheduler);
  return throttle(function() {
    return duration$;
  }, config2);
}

// node_modules/.pnpm/@push.rocks+smartrx@3.0.7/node_modules/@push.rocks/smartrx/dist_ts/smartrx.plugins.rxjs.js
var ops = {
  debounce,
  debounceTime,
  map: map2,
  startWith,
  takeUntil,
  throttleTime,
  filter
};

// node_modules/.pnpm/@push.rocks+smartrx@3.0.7/node_modules/@push.rocks/smartrx/dist_ts/smartrx.classes.observablemap.js
var Observablemap = class {
  constructor() {
    this.observableEventEmitterBundleArray = new Array();
    this.observableEventTargetBundleArray = new Array();
  }
  /**
   * creates a hot subject if not yet registered for the event.
   * In case event has been registered before the same observable is returned.
   */
  getSubjectForEmitterEvent(emitterArg, eventArg) {
    const existingBundle = this.observableEventEmitterBundleArray.find((bundleArg) => {
      return bundleArg.eventRef === emitterArg && bundleArg.event === eventArg;
    });
    if (existingBundle) {
      return existingBundle.subject;
    } else {
      const emitterObservable = fromEvent(emitterArg, eventArg);
      const emitterSubject = new Subject();
      emitterObservable.subscribe(emitterSubject);
      const newBundle = {
        subject: emitterSubject,
        eventRef: emitterArg,
        event: eventArg
      };
      this.observableEventEmitterBundleArray.push(newBundle);
      return newBundle.subject;
    }
  }
  getSubjectForEventTarget(eventTargetArg, eventNameArg) {
    const existingBundle = this.observableEventTargetBundleArray.find((bundleArg) => {
      return bundleArg.eventRef === eventTargetArg && bundleArg.event === eventNameArg;
    });
    if (existingBundle) {
      return existingBundle.subject;
    } else {
      const emitterSubject = new Subject();
      const newBundle = {
        subject: emitterSubject,
        eventRef: eventTargetArg,
        event: eventNameArg
      };
      this.observableEventTargetBundleArray.push(newBundle);
      return newBundle.subject;
    }
  }
};

// node_modules/.pnpm/@push.rocks+smartrx@3.0.7/node_modules/@push.rocks/smartrx/dist_ts/smartrx.classes.observableintake.js
var ObservableIntake = class {
  constructor() {
    this.observableFunctions = {
      next: (payloadArg) => {
      },
      complete: (payloadArg) => {
      }
    };
    this.generator = null;
    this.buffered = false;
    this.payloadBuffer = [];
    this.observable = new Observable((observerArg) => {
      this.observableFunctions.next = (...args) => {
        return observerArg.next(args);
      };
      this.observableFunctions.complete = () => {
        this.completedDeffered.resolve();
        return observerArg.complete();
      };
    });
    this.completedDeffered = dist_ts_exports.defer();
    this.completed = this.completedDeffered.promise;
  }
  setObservable(observableFunc) {
    this.observable = observableFunc;
  }
  push(payloadArg) {
    if (this.buffered) {
      this.payloadBuffer.push(payloadArg);
    } else {
      this.internalPush(payloadArg);
    }
  }
  /**
   * pushes many payloads as array
   * @param payloadArgArray
   */
  pushMany(payloadArgArray) {
    for (const item of payloadArgArray) {
      this.push(item);
    }
  }
  /**
   * sets a generator to query the next pushed value
   * @param generatorArg
   */
  setGenerator(generatorArg) {
    this.generator = generatorArg;
  }
  makeBuffered() {
    this.buffered = true;
  }
  subscribe(...args) {
    return this.observable.subscribe(...args);
  }
  /**
   * request the next values in the quantity specified
   * @param howManyArg if a generator is set, of a buffer exists, this allows retrieving values
   */
  request(howManyArg) {
    if (howManyArg === 0) {
      return;
    } else {
      for (let i = 0; i !== howManyArg; i++) {
        if (this.payloadBuffer.length > 0) {
          this.internalPush(this.payloadBuffer.shift());
        } else {
          const nextPayload = this.generator.next();
          this.internalPush(nextPayload.value);
        }
      }
    }
  }
  /**
   * signals the completion of this observable
   */
  signalComplete() {
    this.observableFunctions.complete();
  }
  internalPush(payloadArg) {
    this.observableFunctions.next(payloadArg);
  }
};

// node_modules/.pnpm/@push.rocks+smarttime@4.0.8/node_modules/@push.rocks/smarttime/dist_ts/index.js
var dist_ts_exports6 = {};
__export(dist_ts_exports6, {
  CronJob: () => CronJob,
  CronManager: () => CronManager,
  ExtendedDate: () => ExtendedDate,
  HrtMeasurement: () => HrtMeasurement,
  Interval: () => Interval,
  TimeStamp: () => TimeStamp,
  Timer: () => Timer,
  getMilliSecondsAsHumanReadableString: () => getMilliSecondsAsHumanReadableString,
  getMilliSecondsFromUnits: () => getMilliSecondsFromUnits,
  units: () => units
});

// node_modules/.pnpm/croner@7.0.8/node_modules/croner/dist/croner.min.js
function minitz(y, m, d, h, i, s, tz, throwOnInvalid) {
  return minitz.fromTZ(minitz.tp(y, m, d, h, i, s, tz), throwOnInvalid);
}
minitz.fromTZISO = (localTimeStr, tz, throwOnInvalid) => {
  return minitz.fromTZ(parseISOLocal(localTimeStr, tz), throwOnInvalid);
};
minitz.fromTZ = function(tp, throwOnInvalid) {
  const inDate = new Date(Date.UTC(tp.y, tp.m - 1, tp.d, tp.h, tp.i, tp.s)), offset = getTimezoneOffset(tp.tz, inDate), dateGuess = new Date(inDate.getTime() - offset), dateOffsGuess = getTimezoneOffset(tp.tz, dateGuess);
  if (dateOffsGuess - offset === 0) {
    return dateGuess;
  } else {
    const dateGuess2 = new Date(inDate.getTime() - dateOffsGuess), dateOffsGuess2 = getTimezoneOffset(tp.tz, dateGuess2);
    if (dateOffsGuess2 - dateOffsGuess === 0) {
      return dateGuess2;
    } else if (!throwOnInvalid && dateOffsGuess2 - dateOffsGuess > 0) {
      return dateGuess2;
    } else if (!throwOnInvalid) {
      return dateGuess;
    } else {
      throw new Error("Invalid date passed to fromTZ()");
    }
  }
};
minitz.toTZ = function(d, tzStr) {
  const localDateString = d.toLocaleString("en-US", { timeZone: tzStr }).replace(/[\u202f]/, " ");
  const td = new Date(localDateString);
  return { y: td.getFullYear(), m: td.getMonth() + 1, d: td.getDate(), h: td.getHours(), i: td.getMinutes(), s: td.getSeconds(), tz: tzStr };
};
minitz.tp = (y, m, d, h, i, s, tz) => {
  return { y, m, d, h, i, s, tz };
};
function getTimezoneOffset(timeZone, date = /* @__PURE__ */ new Date()) {
  let tz = date.toLocaleString("en-US", { timeZone, timeZoneName: "short" }).split(" ").slice(-1)[0];
  tz = tz.replace(/\bAKST\b/g, "-0900").replace(/\bAKDT\b/g, "-0800").replace(/\bAST\b/g, "-0400");
  const dateString = date.toLocaleString("en-US").replace(/[\u202f]/, " ");
  return Date.parse(`${dateString} GMT`) - Date.parse(`${dateString} ${tz}`);
}
function parseISOLocal(dtStr, tz) {
  const pd = new Date(Date.parse(dtStr));
  if (isNaN(pd)) {
    throw new Error("minitz: Invalid ISO8601 passed to parser.");
  }
  const stringEnd = dtStr.substring(9);
  if (dtStr.includes("Z") || stringEnd.includes("-") || stringEnd.includes("+")) {
    return minitz.tp(pd.getUTCFullYear(), pd.getUTCMonth() + 1, pd.getUTCDate(), pd.getUTCHours(), pd.getUTCMinutes(), pd.getUTCSeconds(), "Etc/UTC");
  } else {
    return minitz.tp(pd.getFullYear(), pd.getMonth() + 1, pd.getDate(), pd.getHours(), pd.getMinutes(), pd.getSeconds(), tz);
  }
}
minitz.minitz = minitz;
function CronOptions(options) {
  if (options === void 0) {
    options = {};
  }
  delete options.name;
  options.legacyMode = options.legacyMode === void 0 ? true : options.legacyMode;
  options.paused = options.paused === void 0 ? false : options.paused;
  options.maxRuns = options.maxRuns === void 0 ? Infinity : options.maxRuns;
  options.catch = options.catch === void 0 ? false : options.catch;
  options.interval = options.interval === void 0 ? 0 : parseInt(options.interval, 10);
  options.utcOffset = options.utcOffset === void 0 ? void 0 : parseInt(options.utcOffset, 10);
  options.unref = options.unref === void 0 ? false : options.unref;
  if (options.startAt) {
    options.startAt = new CronDate(options.startAt, options.timezone);
  }
  if (options.stopAt) {
    options.stopAt = new CronDate(options.stopAt, options.timezone);
  }
  if (options.interval !== null) {
    if (isNaN(options.interval)) {
      throw new Error("CronOptions: Supplied value for interval is not a number");
    } else if (options.interval < 0) {
      throw new Error("CronOptions: Supplied value for interval can not be negative");
    }
  }
  if (options.utcOffset !== void 0) {
    if (isNaN(options.utcOffset)) {
      throw new Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");
    } else if (options.utcOffset < -870 || options.utcOffset > 870) {
      throw new Error("CronOptions: utcOffset out of bounds.");
    }
    if (options.utcOffset !== void 0 && options.timezone) {
      throw new Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.");
    }
  }
  if (options.unref !== true && options.unref !== false) {
    throw new Error("CronOptions: Unref should be either true, false or undefined(false).");
  }
  return options;
}
var LAST_OCCURRENCE = 32;
var ANY_OCCURRENCE = 1 | 2 | 4 | 8 | 16 | LAST_OCCURRENCE;
var OCCURRENCE_BITMASKS = [1, 2, 4, 8, 16];
function CronPattern(pattern, timezone) {
  this.pattern = pattern;
  this.timezone = timezone;
  this.second = Array(60).fill(0);
  this.minute = Array(60).fill(0);
  this.hour = Array(24).fill(0);
  this.day = Array(31).fill(0);
  this.month = Array(12).fill(0);
  this.dayOfWeek = Array(7).fill(0);
  this.lastDayOfMonth = false;
  this.starDOM = false;
  this.starDOW = false;
  this.parse();
}
CronPattern.prototype.parse = function() {
  if (!(typeof this.pattern === "string" || this.pattern.constructor === String)) {
    throw new TypeError("CronPattern: Pattern has to be of type string.");
  }
  if (this.pattern.indexOf("@") >= 0)
    this.pattern = this.handleNicknames(this.pattern).trim();
  const parts = this.pattern.replace(/\s+/g, " ").split(" ");
  if (parts.length < 5 || parts.length > 6) {
    throw new TypeError("CronPattern: invalid configuration format ('" + this.pattern + "'), exacly five or six space separated parts required.");
  }
  if (parts.length === 5) {
    parts.unshift("0");
  }
  if (parts[3].indexOf("L") >= 0) {
    parts[3] = parts[3].replace("L", "");
    this.lastDayOfMonth = true;
  }
  if (parts[3] == "*") {
    this.starDOM = true;
  }
  if (parts[4].length >= 3)
    parts[4] = this.replaceAlphaMonths(parts[4]);
  if (parts[5].length >= 3)
    parts[5] = this.replaceAlphaDays(parts[5]);
  if (parts[5] == "*") {
    this.starDOW = true;
  }
  if (this.pattern.indexOf("?") >= 0) {
    const initDate = new CronDate(/* @__PURE__ */ new Date(), this.timezone).getDate(true);
    parts[0] = parts[0].replace("?", initDate.getSeconds());
    parts[1] = parts[1].replace("?", initDate.getMinutes());
    parts[2] = parts[2].replace("?", initDate.getHours());
    if (!this.starDOM)
      parts[3] = parts[3].replace("?", initDate.getDate());
    parts[4] = parts[4].replace("?", initDate.getMonth() + 1);
    if (!this.starDOW)
      parts[5] = parts[5].replace("?", initDate.getDay());
  }
  this.throwAtIllegalCharacters(parts);
  this.partToArray("second", parts[0], 0, 1);
  this.partToArray("minute", parts[1], 0, 1);
  this.partToArray("hour", parts[2], 0, 1);
  this.partToArray("day", parts[3], -1, 1);
  this.partToArray("month", parts[4], -1, 1);
  this.partToArray("dayOfWeek", parts[5], 0, ANY_OCCURRENCE);
  if (this.dayOfWeek[7]) {
    this.dayOfWeek[0] = this.dayOfWeek[7];
  }
};
CronPattern.prototype.partToArray = function(type, conf, valueIndexOffset, defaultValue) {
  const arr = this[type];
  const lastDayOfMonth = type === "day" && this.lastDayOfMonth;
  if (conf === "" && !lastDayOfMonth)
    throw new TypeError("CronPattern: configuration entry " + type + " (" + conf + ") is empty, check for trailing spaces.");
  if (conf === "*")
    return arr.fill(defaultValue);
  const split = conf.split(",");
  if (split.length > 1) {
    for (let i = 0; i < split.length; i++) {
      this.partToArray(type, split[i], valueIndexOffset, defaultValue);
    }
  } else if (conf.indexOf("-") !== -1 && conf.indexOf("/") !== -1) {
    this.handleRangeWithStepping(conf, type, valueIndexOffset, defaultValue);
  } else if (conf.indexOf("-") !== -1) {
    this.handleRange(conf, type, valueIndexOffset, defaultValue);
  } else if (conf.indexOf("/") !== -1) {
    this.handleStepping(conf, type, valueIndexOffset, defaultValue);
  } else if (conf !== "") {
    this.handleNumber(conf, type, valueIndexOffset, defaultValue);
  }
};
CronPattern.prototype.throwAtIllegalCharacters = function(parts) {
  for (let i = 0; i < parts.length; i++) {
    const reValidCron = i === 5 ? /[^/*0-9,\-#L]+/ : /[^/*0-9,-]+/;
    if (reValidCron.test(parts[i])) {
      throw new TypeError("CronPattern: configuration entry " + i + " (" + parts[i] + ") contains illegal characters.");
    }
  }
};
CronPattern.prototype.handleNumber = function(conf, type, valueIndexOffset, defaultValue) {
  const result = this.extractNth(conf, type);
  const i = parseInt(result[0], 10) + valueIndexOffset;
  if (isNaN(i)) {
    throw new TypeError("CronPattern: " + type + " is not a number: '" + conf + "'");
  }
  this.setPart(type, i, result[1] || defaultValue);
};
CronPattern.prototype.setPart = function(part, index, value) {
  if (!Object.prototype.hasOwnProperty.call(this, part)) {
    throw new TypeError("CronPattern: Invalid part specified: " + part);
  }
  if (part === "dayOfWeek") {
    if (index === 7)
      index = 0;
    if ((index < 0 || index > 6) && index !== "L") {
      throw new RangeError("CronPattern: Invalid value for dayOfWeek: " + index);
    }
    this.setNthWeekdayOfMonth(index, value);
    return;
  }
  if (part === "second" || part === "minute") {
    if (index < 0 || index >= 60) {
      throw new RangeError("CronPattern: Invalid value for " + part + ": " + index);
    }
  } else if (part === "hour") {
    if (index < 0 || index >= 24) {
      throw new RangeError("CronPattern: Invalid value for " + part + ": " + index);
    }
  } else if (part === "day") {
    if (index < 0 || index >= 31) {
      throw new RangeError("CronPattern: Invalid value for " + part + ": " + index);
    }
  } else if (part === "month") {
    if (index < 0 || index >= 12) {
      throw new RangeError("CronPattern: Invalid value for " + part + ": " + index);
    }
  }
  this[part][index] = value;
};
CronPattern.prototype.handleRangeWithStepping = function(conf, type, valueIndexOffset, defaultValue) {
  const result = this.extractNth(conf, type);
  const matches = result[0].match(/^(\d+)-(\d+)\/(\d+)$/);
  if (matches === null)
    throw new TypeError("CronPattern: Syntax error, illegal range with stepping: '" + conf + "'");
  let [, lower, upper, steps] = matches;
  lower = parseInt(lower, 10) + valueIndexOffset;
  upper = parseInt(upper, 10) + valueIndexOffset;
  steps = parseInt(steps, 10);
  if (isNaN(lower))
    throw new TypeError("CronPattern: Syntax error, illegal lower range (NaN)");
  if (isNaN(upper))
    throw new TypeError("CronPattern: Syntax error, illegal upper range (NaN)");
  if (isNaN(steps))
    throw new TypeError("CronPattern: Syntax error, illegal stepping: (NaN)");
  if (steps === 0)
    throw new TypeError("CronPattern: Syntax error, illegal stepping: 0");
  if (steps > this[type].length)
    throw new TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part (" + this[type].length + ")");
  if (lower > upper)
    throw new TypeError("CronPattern: From value is larger than to value: '" + conf + "'");
  for (let i = lower; i <= upper; i += steps) {
    this.setPart(type, i, result[1] || defaultValue);
  }
};
CronPattern.prototype.extractNth = function(conf, type) {
  let rest = conf;
  let nth;
  if (rest.includes("#")) {
    if (type !== "dayOfWeek") {
      throw new Error("CronPattern: nth (#) only allowed in day-of-week field");
    }
    nth = rest.split("#")[1];
    rest = rest.split("#")[0];
  }
  return [rest, nth];
};
CronPattern.prototype.handleRange = function(conf, type, valueIndexOffset, defaultValue) {
  const result = this.extractNth(conf, type);
  const split = result[0].split("-");
  if (split.length !== 2) {
    throw new TypeError("CronPattern: Syntax error, illegal range: '" + conf + "'");
  }
  const lower = parseInt(split[0], 10) + valueIndexOffset, upper = parseInt(split[1], 10) + valueIndexOffset;
  if (isNaN(lower)) {
    throw new TypeError("CronPattern: Syntax error, illegal lower range (NaN)");
  } else if (isNaN(upper)) {
    throw new TypeError("CronPattern: Syntax error, illegal upper range (NaN)");
  }
  if (lower > upper) {
    throw new TypeError("CronPattern: From value is larger than to value: '" + conf + "'");
  }
  for (let i = lower; i <= upper; i++) {
    this.setPart(type, i, result[1] || defaultValue);
  }
};
CronPattern.prototype.handleStepping = function(conf, type, valueIndexOffset, defaultValue) {
  const result = this.extractNth(conf, type);
  const split = result[0].split("/");
  if (split.length !== 2) {
    throw new TypeError("CronPattern: Syntax error, illegal stepping: '" + conf + "'");
  }
  let start = 0;
  if (split[0] !== "*") {
    start = parseInt(split[0], 10) + valueIndexOffset;
  }
  const steps = parseInt(split[1], 10);
  if (isNaN(steps))
    throw new TypeError("CronPattern: Syntax error, illegal stepping: (NaN)");
  if (steps === 0)
    throw new TypeError("CronPattern: Syntax error, illegal stepping: 0");
  if (steps > this[type].length)
    throw new TypeError("CronPattern: Syntax error, max steps for part is (" + this[type].length + ")");
  for (let i = start; i < this[type].length; i += steps) {
    this.setPart(type, i, result[1] || defaultValue);
  }
};
CronPattern.prototype.replaceAlphaDays = function(conf) {
  return conf.replace(/-sun/gi, "-7").replace(/sun/gi, "0").replace(/mon/gi, "1").replace(/tue/gi, "2").replace(/wed/gi, "3").replace(/thu/gi, "4").replace(/fri/gi, "5").replace(/sat/gi, "6");
};
CronPattern.prototype.replaceAlphaMonths = function(conf) {
  return conf.replace(/jan/gi, "1").replace(/feb/gi, "2").replace(/mar/gi, "3").replace(/apr/gi, "4").replace(/may/gi, "5").replace(/jun/gi, "6").replace(/jul/gi, "7").replace(/aug/gi, "8").replace(/sep/gi, "9").replace(/oct/gi, "10").replace(/nov/gi, "11").replace(/dec/gi, "12");
};
CronPattern.prototype.handleNicknames = function(pattern) {
  const cleanPattern = pattern.trim().toLowerCase();
  if (cleanPattern === "@yearly" || cleanPattern === "@annually") {
    return "0 0 1 1 *";
  } else if (cleanPattern === "@monthly") {
    return "0 0 1 * *";
  } else if (cleanPattern === "@weekly") {
    return "0 0 * * 0";
  } else if (cleanPattern === "@daily") {
    return "0 0 * * *";
  } else if (cleanPattern === "@hourly") {
    return "0 * * * *";
  } else {
    return pattern;
  }
};
CronPattern.prototype.setNthWeekdayOfMonth = function(index, nthWeekday) {
  if (nthWeekday === "L") {
    this["dayOfWeek"][index] = this["dayOfWeek"][index] | LAST_OCCURRENCE;
  } else if (nthWeekday < 6 && nthWeekday > 0) {
    this["dayOfWeek"][index] = this["dayOfWeek"][index] | OCCURRENCE_BITMASKS[nthWeekday - 1];
  } else if (nthWeekday === ANY_OCCURRENCE) {
    this["dayOfWeek"][index] = ANY_OCCURRENCE;
  } else {
    throw new TypeError(`CronPattern: nth weekday of of range, should be 1-5 or L. Value: ${nthWeekday}`);
  }
};
var DaysOfMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var RecursionSteps = [["month", "year", 0], ["day", "month", -1], ["hour", "day", 0], ["minute", "hour", 0], ["second", "minute", 0]];
function CronDate(d, tz) {
  this.tz = tz;
  if (d && d instanceof Date) {
    if (!isNaN(d)) {
      this.fromDate(d);
    } else {
      throw new TypeError("CronDate: Invalid date passed to CronDate constructor");
    }
  } else if (d === void 0) {
    this.fromDate(/* @__PURE__ */ new Date());
  } else if (d && typeof d === "string") {
    this.fromString(d);
  } else if (d instanceof CronDate) {
    this.fromCronDate(d);
  } else {
    throw new TypeError("CronDate: Invalid type (" + typeof d + ") passed to CronDate constructor");
  }
}
CronDate.prototype.isNthWeekdayOfMonth = function(year, month, day, nth) {
  const date = new Date(Date.UTC(year, month, day));
  const weekday = date.getUTCDay();
  let count = 0;
  for (let d = 1; d <= day; d++) {
    if (new Date(Date.UTC(year, month, d)).getUTCDay() === weekday) {
      count++;
    }
  }
  if (nth & ANY_OCCURRENCE && OCCURRENCE_BITMASKS[count - 1] & nth) {
    return true;
  }
  if (nth & LAST_OCCURRENCE) {
    const daysInMonth = new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
    for (let d = day + 1; d <= daysInMonth; d++) {
      if (new Date(Date.UTC(year, month, d)).getUTCDay() === weekday) {
        return false;
      }
    }
    return true;
  }
  return false;
};
CronDate.prototype.fromDate = function(inDate) {
  if (this.tz !== void 0) {
    if (typeof this.tz === "number") {
      this.ms = inDate.getUTCMilliseconds();
      this.second = inDate.getUTCSeconds();
      this.minute = inDate.getUTCMinutes() + this.tz;
      this.hour = inDate.getUTCHours();
      this.day = inDate.getUTCDate();
      this.month = inDate.getUTCMonth();
      this.year = inDate.getUTCFullYear();
      this.apply();
    } else {
      const d = minitz.toTZ(inDate, this.tz);
      this.ms = inDate.getMilliseconds();
      this.second = d.s;
      this.minute = d.i;
      this.hour = d.h;
      this.day = d.d;
      this.month = d.m - 1;
      this.year = d.y;
    }
  } else {
    this.ms = inDate.getMilliseconds();
    this.second = inDate.getSeconds();
    this.minute = inDate.getMinutes();
    this.hour = inDate.getHours();
    this.day = inDate.getDate();
    this.month = inDate.getMonth();
    this.year = inDate.getFullYear();
  }
};
CronDate.prototype.fromCronDate = function(d) {
  this.tz = d.tz;
  this.year = d.year;
  this.month = d.month;
  this.day = d.day;
  this.hour = d.hour;
  this.minute = d.minute;
  this.second = d.second;
  this.ms = d.ms;
};
CronDate.prototype.apply = function() {
  if (this.month > 11 || this.day > DaysOfMonth[this.month] || this.hour > 59 || this.minute > 59 || this.second > 59 || this.hour < 0 || this.minute < 0 || this.second < 0) {
    const d = new Date(Date.UTC(this.year, this.month, this.day, this.hour, this.minute, this.second, this.ms));
    this.ms = d.getUTCMilliseconds();
    this.second = d.getUTCSeconds();
    this.minute = d.getUTCMinutes();
    this.hour = d.getUTCHours();
    this.day = d.getUTCDate();
    this.month = d.getUTCMonth();
    this.year = d.getUTCFullYear();
    return true;
  } else {
    return false;
  }
};
CronDate.prototype.fromString = function(str) {
  return this.fromDate(minitz.fromTZISO(str, this.tz));
};
CronDate.prototype.findNext = function(options, target, pattern, offset) {
  const originalTarget = this[target];
  let lastDayOfMonth;
  if (pattern.lastDayOfMonth) {
    if (this.month !== 1) {
      lastDayOfMonth = DaysOfMonth[this.month];
    } else {
      lastDayOfMonth = new Date(Date.UTC(this.year, this.month + 1, 0, 0, 0, 0, 0)).getUTCDate();
    }
  }
  const fDomWeekDay = !pattern.starDOW && target == "day" ? new Date(Date.UTC(this.year, this.month, 1, 0, 0, 0, 0)).getUTCDay() : void 0;
  for (let i = this[target] + offset; i < pattern[target].length; i++) {
    let match = pattern[target][i];
    if (target === "day" && pattern.lastDayOfMonth && i - offset == lastDayOfMonth) {
      match = true;
    }
    if (target === "day" && !pattern.starDOW) {
      let dowMatch = pattern.dayOfWeek[(fDomWeekDay + (i - offset - 1)) % 7];
      if (dowMatch && dowMatch & ANY_OCCURRENCE) {
        dowMatch = this.isNthWeekdayOfMonth(this.year, this.month, i - offset, dowMatch);
      } else if (dowMatch) {
        throw new Error(`CronDate: Invalid value for dayOfWeek encountered. ${dowMatch}`);
      }
      if (options.legacyMode && !pattern.starDOM) {
        match = match || dowMatch;
      } else {
        match = match && dowMatch;
      }
    }
    if (match) {
      this[target] = i - offset;
      return originalTarget !== this[target] ? 2 : 1;
    }
  }
  return 3;
};
CronDate.prototype.recurse = function(pattern, options, doing) {
  const res = this.findNext(options, RecursionSteps[doing][0], pattern, RecursionSteps[doing][2]);
  if (res > 1) {
    let resetLevel = doing + 1;
    while (resetLevel < RecursionSteps.length) {
      this[RecursionSteps[resetLevel][0]] = -RecursionSteps[resetLevel][2];
      resetLevel++;
    }
    if (res === 3) {
      this[RecursionSteps[doing][1]]++;
      this[RecursionSteps[doing][0]] = -RecursionSteps[doing][2];
      this.apply();
      return this.recurse(pattern, options, 0);
    } else if (this.apply()) {
      return this.recurse(pattern, options, doing - 1);
    }
  }
  doing += 1;
  if (doing >= RecursionSteps.length) {
    return this;
  } else if (this.year >= 3e3) {
    return null;
  } else {
    return this.recurse(pattern, options, doing);
  }
};
CronDate.prototype.increment = function(pattern, options, hasPreviousRun) {
  this.second += options.interval > 1 && hasPreviousRun ? options.interval : 1;
  this.ms = 0;
  this.apply();
  return this.recurse(pattern, options, 0);
};
CronDate.prototype.getDate = function(internal) {
  if (internal || this.tz === void 0) {
    return new Date(this.year, this.month, this.day, this.hour, this.minute, this.second, this.ms);
  } else {
    if (typeof this.tz === "number") {
      return new Date(Date.UTC(this.year, this.month, this.day, this.hour, this.minute - this.tz, this.second, this.ms));
    } else {
      return minitz(this.year, this.month + 1, this.day, this.hour, this.minute, this.second, this.tz);
    }
  }
};
CronDate.prototype.getTime = function() {
  return this.getDate().getTime();
};
function isFunction2(v) {
  return Object.prototype.toString.call(v) === "[object Function]" || "function" === typeof v || v instanceof Function;
}
function unrefTimer(timer2) {
  if (typeof Deno !== "undefined" && typeof Deno.unrefTimer !== "undefined") {
    Deno.unrefTimer(timer2);
  } else if (timer2 && typeof timer2.unref !== "undefined") {
    timer2.unref();
  }
}
var maxDelay = 30 * 1e3;
var scheduledJobs = [];
function Cron(pattern, fnOrOptions1, fnOrOptions2) {
  if (!(this instanceof Cron)) {
    return new Cron(pattern, fnOrOptions1, fnOrOptions2);
  }
  let options, func;
  if (isFunction2(fnOrOptions1)) {
    func = fnOrOptions1;
  } else if (typeof fnOrOptions1 === "object") {
    options = fnOrOptions1;
  } else if (fnOrOptions1 !== void 0) {
    throw new Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");
  }
  if (isFunction2(fnOrOptions2)) {
    func = fnOrOptions2;
  } else if (typeof fnOrOptions2 === "object") {
    options = fnOrOptions2;
  } else if (fnOrOptions2 !== void 0) {
    throw new Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");
  }
  this.name = options ? options.name : void 0;
  this.options = CronOptions(options);
  this._states = { kill: false, blocking: false, previousRun: void 0, currentRun: void 0, once: void 0, currentTimeout: void 0, maxRuns: options ? options.maxRuns : void 0, paused: options ? options.paused : false, pattern: void 0 };
  if (pattern && (pattern instanceof Date || typeof pattern === "string" && pattern.indexOf(":") > 0)) {
    this._states.once = new CronDate(pattern, this.options.timezone || this.options.utcOffset);
  } else {
    this._states.pattern = new CronPattern(pattern, this.options.timezone);
  }
  if (this.name) {
    const existing = scheduledJobs.find((j) => j.name === this.name);
    if (existing) {
      throw new Error("Cron: Tried to initialize new named job '" + this.name + "', but name already taken.");
    } else {
      scheduledJobs.push(this);
    }
  }
  if (func !== void 0) {
    this.fn = func;
    this.schedule();
  }
  return this;
}
Cron.prototype.nextRun = function(prev) {
  const next = this._next(prev);
  return next ? next.getDate() : null;
};
Cron.prototype.nextRuns = function(n, previous) {
  if (n > this._states.maxRuns) {
    n = this._states.maxRuns;
  }
  const enumeration = [];
  let prev = previous || this._states.currentRun;
  while (n-- && (prev = this.nextRun(prev))) {
    enumeration.push(prev);
  }
  return enumeration;
};
Cron.prototype.getPattern = function() {
  return this._states.pattern ? this._states.pattern.pattern : void 0;
};
Cron.prototype.isRunning = function() {
  const nextRunTime = this.nextRun(this._states.currentRun);
  const isRunning = !this._states.paused;
  const isScheduled = this.fn !== void 0;
  const notIsKilled = !this._states.kill;
  return isRunning && isScheduled && notIsKilled && nextRunTime !== null;
};
Cron.prototype.isStopped = function() {
  return this._states.kill;
};
Cron.prototype.isBusy = function() {
  return this._states.blocking;
};
Cron.prototype.currentRun = function() {
  return this._states.currentRun ? this._states.currentRun.getDate() : null;
};
Cron.prototype.previousRun = function() {
  return this._states.previousRun ? this._states.previousRun.getDate() : null;
};
Cron.prototype.msToNext = function(prev) {
  prev = prev || /* @__PURE__ */ new Date();
  const next = this._next(prev);
  if (next) {
    return next.getTime() - prev.getTime();
  } else {
    return null;
  }
};
Cron.prototype.stop = function() {
  this._states.kill = true;
  if (this._states.currentTimeout) {
    clearTimeout(this._states.currentTimeout);
  }
  const jobIndex = scheduledJobs.indexOf(this);
  if (jobIndex >= 0) {
    scheduledJobs.splice(jobIndex, 1);
  }
};
Cron.prototype.pause = function() {
  this._states.paused = true;
  return !this._states.kill;
};
Cron.prototype.resume = function() {
  this._states.paused = false;
  return !this._states.kill;
};
Cron.prototype.schedule = function(func) {
  if (func && this.fn) {
    throw new Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");
  } else if (func) {
    this.fn = func;
  }
  let waitMs = this.msToNext();
  const target = this.nextRun(this._states.currentRun);
  if (waitMs === null || target === null)
    return this;
  if (waitMs > maxDelay) {
    waitMs = maxDelay;
  }
  this._states.currentTimeout = setTimeout(() => this._checkTrigger(target), waitMs);
  if (this._states.currentTimeout && this.options.unref) {
    unrefTimer(this._states.currentTimeout);
  }
  return this;
};
Cron.prototype._trigger = async function(initiationDate) {
  this._states.blocking = true;
  this._states.currentRun = new CronDate(void 0, this.options.timezone || this.options.utcOffset);
  if (this.options.catch) {
    try {
      await this.fn(this, this.options.context);
    } catch (_e) {
      if (isFunction2(this.options.catch)) {
        this.options.catch(_e, this);
      }
    }
  } else {
    await this.fn(this, this.options.context);
  }
  this._states.previousRun = new CronDate(initiationDate, this.options.timezone || this.options.utcOffset);
  this._states.blocking = false;
};
Cron.prototype.trigger = async function() {
  await this._trigger();
};
Cron.prototype._checkTrigger = function(target) {
  const now = /* @__PURE__ */ new Date(), shouldRun = !this._states.paused && now.getTime() >= target, isBlocked = this._states.blocking && this.options.protect;
  if (shouldRun && !isBlocked) {
    this._states.maxRuns--;
    this._trigger();
  } else {
    if (shouldRun && isBlocked && isFunction2(this.options.protect)) {
      setTimeout(() => this.options.protect(this), 0);
    }
  }
  this.schedule();
};
Cron.prototype._next = function(prev) {
  const hasPreviousRun = prev || this._states.currentRun ? true : false;
  prev = new CronDate(prev, this.options.timezone || this.options.utcOffset);
  if (this.options.startAt && prev && prev.getTime() < this.options.startAt.getTime()) {
    prev = this.options.startAt;
  }
  const nextRun = this._states.once || new CronDate(prev, this.options.timezone || this.options.utcOffset).increment(this._states.pattern, this.options, hasPreviousRun);
  if (this._states.once && this._states.once.getTime() <= prev.getTime()) {
    return null;
  } else if (nextRun === null || this._states.maxRuns <= 0 || this._states.kill || this.options.stopAt && nextRun.getTime() >= this.options.stopAt.getTime()) {
    return null;
  } else {
    return nextRun;
  }
};
Cron.Cron = Cron;
Cron.scheduledJobs = scheduledJobs;

// node_modules/.pnpm/@push.rocks+smarttime@4.0.8/node_modules/@push.rocks/smarttime/dist_ts/smarttime.plugins.js
var import_dayjs = __toESM(require_dayjs_min(), 1);
var import_isToday = __toESM(require_isToday(), 1);

// node_modules/.pnpm/parse-ms@3.0.0/node_modules/parse-ms/index.js
function parseMilliseconds(milliseconds) {
  if (typeof milliseconds !== "number") {
    throw new TypeError("Expected a number");
  }
  const roundTowardsZero = milliseconds > 0 ? Math.floor : Math.ceil;
  return {
    days: roundTowardsZero(milliseconds / 864e5),
    hours: roundTowardsZero(milliseconds / 36e5) % 24,
    minutes: roundTowardsZero(milliseconds / 6e4) % 60,
    seconds: roundTowardsZero(milliseconds / 1e3) % 60,
    milliseconds: roundTowardsZero(milliseconds) % 1e3,
    microseconds: roundTowardsZero(milliseconds * 1e3) % 1e3,
    nanoseconds: roundTowardsZero(milliseconds * 1e6) % 1e3
  };
}

// node_modules/.pnpm/pretty-ms@8.0.0/node_modules/pretty-ms/index.js
var pluralize = (word, count) => count === 1 ? word : `${word}s`;
var SECOND_ROUNDING_EPSILON = 1e-7;
function prettyMilliseconds(milliseconds, options = {}) {
  if (!Number.isFinite(milliseconds)) {
    throw new TypeError("Expected a finite number");
  }
  if (options.colonNotation) {
    options.compact = false;
    options.formatSubMilliseconds = false;
    options.separateMilliseconds = false;
    options.verbose = false;
  }
  if (options.compact) {
    options.secondsDecimalDigits = 0;
    options.millisecondsDecimalDigits = 0;
  }
  const result = [];
  const floorDecimals = (value, decimalDigits) => {
    const flooredInterimValue = Math.floor(value * 10 ** decimalDigits + SECOND_ROUNDING_EPSILON);
    const flooredValue = Math.round(flooredInterimValue) / 10 ** decimalDigits;
    return flooredValue.toFixed(decimalDigits);
  };
  const add = (value, long, short, valueString) => {
    if ((result.length === 0 || !options.colonNotation) && value === 0 && !(options.colonNotation && short === "m")) {
      return;
    }
    valueString = (valueString || value || "0").toString();
    let prefix;
    let suffix;
    if (options.colonNotation) {
      prefix = result.length > 0 ? ":" : "";
      suffix = "";
      const wholeDigits = valueString.includes(".") ? valueString.split(".")[0].length : valueString.length;
      const minLength = result.length > 0 ? 2 : 1;
      valueString = "0".repeat(Math.max(0, minLength - wholeDigits)) + valueString;
    } else {
      prefix = "";
      suffix = options.verbose ? " " + pluralize(long, value) : short;
    }
    result.push(prefix + valueString + suffix);
  };
  const parsed = parseMilliseconds(milliseconds);
  add(Math.trunc(parsed.days / 365), "year", "y");
  add(parsed.days % 365, "day", "d");
  add(parsed.hours, "hour", "h");
  add(parsed.minutes, "minute", "m");
  if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
    add(parsed.seconds, "second", "s");
    if (options.formatSubMilliseconds) {
      add(parsed.milliseconds, "millisecond", "ms");
      add(parsed.microseconds, "microsecond", "\xB5s");
      add(parsed.nanoseconds, "nanosecond", "ns");
    } else {
      const millisecondsAndBelow = parsed.milliseconds + parsed.microseconds / 1e3 + parsed.nanoseconds / 1e6;
      const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
      const roundedMiliseconds = millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
      const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : roundedMiliseconds;
      add(
        Number.parseFloat(millisecondsString),
        "millisecond",
        "ms",
        millisecondsString
      );
    }
  } else {
    const seconds = milliseconds / 1e3 % 60;
    const secondsDecimalDigits = typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1;
    const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);
    const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
    add(Number.parseFloat(secondsString), "second", "s", secondsString);
  }
  if (result.length === 0) {
    return "0" + (options.verbose ? " milliseconds" : "ms");
  }
  if (options.compact) {
    return result[0];
  }
  if (typeof options.unitCount === "number") {
    const separator = options.colonNotation ? "" : " ";
    return result.slice(0, Math.max(options.unitCount, 1)).join(separator);
  }
  return options.colonNotation ? result.join("") : result.join(" ");
}

// node_modules/.pnpm/@push.rocks+smarttime@4.0.8/node_modules/@push.rocks/smarttime/dist_ts/smarttime.plugins.js
import_dayjs.default.extend(import_isToday.default);

// node_modules/.pnpm/@push.rocks+smarttime@4.0.8/node_modules/@push.rocks/smarttime/dist_ts/smarttime.classes.cronjob.js
var CronJob = class {
  constructor(cronManager, cronExpressionArg, jobFunction) {
    this.status = "initial";
    this.nextExecutionUnix = 0;
    this.cronExpression = cronExpressionArg;
    this.jobFunction = jobFunction;
    this.cronParser = Cron(cronExpressionArg);
  }
  /**
   * checks wether the cronjob needs to be executed
   */
  checkExecution() {
    if (this.nextExecutionUnix === 0) {
      this.getNextExecutionTime();
    }
    if (Date.now() > this.nextExecutionUnix) {
      const maybePromise = this.jobFunction(this.nextExecutionUnix);
      if (maybePromise instanceof Promise) {
        maybePromise.catch((e) => console.log(e));
      }
      this.nextExecutionUnix = this.getNextExecutionTime();
    }
    return this.nextExecutionUnix;
  }
  getNextExecutionTime() {
    return this.nextExecutionUnix = Date.now() + this.getTimeToNextExecution();
  }
  /**
   * gets the time to next execution
   */
  getTimeToNextExecution() {
    return this.cronParser.msToNext();
  }
  start() {
    this.status = "started";
  }
  stop() {
    this.status = "stopped";
  }
};

// node_modules/.pnpm/@push.rocks+smarttime@4.0.8/node_modules/@push.rocks/smarttime/dist_ts/smarttime.units.js
var units = {
  years: (timesArg = 1) => {
    return timesArg * 3154e7;
  },
  months: (timesArg = 1) => {
    return timesArg * 2628e6;
  },
  weeks: (timesArg = 1) => {
    return timesArg * 6048e5;
  },
  days: (timesArg = 1) => {
    return timesArg * 864e5;
  },
  hours: (timesArg = 1) => {
    return timesArg * 36e5;
  },
  minutes: (timesArg = 1) => {
    return timesArg * 6e4;
  },
  seconds: (timesArg = 1) => {
    return timesArg * 1e3;
  }
};
var getMilliSecondsFromUnits = (combinationArg) => {
  let timeInMilliseconds = 0;
  let addMilliSeconds = (milliSecondsArg) => {
    timeInMilliseconds = timeInMilliseconds + milliSecondsArg;
  };
  if (combinationArg.years) {
    addMilliSeconds(units.years(combinationArg.years));
  }
  if (combinationArg.months) {
    addMilliSeconds(units.months(combinationArg.months));
  }
  if (combinationArg.weeks) {
    addMilliSeconds(units.weeks(combinationArg.weeks));
  }
  if (combinationArg.days) {
    addMilliSeconds(units.days(combinationArg.days));
  }
  if (combinationArg.hours) {
    addMilliSeconds(units.hours(combinationArg.hours));
  }
  if (combinationArg.minutes) {
    addMilliSeconds(units.minutes(combinationArg.minutes));
  }
  if (combinationArg.seconds) {
    addMilliSeconds(units.seconds(combinationArg.seconds));
  }
  return timeInMilliseconds;
};
var getMilliSecondsAsHumanReadableString = (milliSecondsArg) => {
  return prettyMilliseconds(milliSecondsArg);
};

// node_modules/.pnpm/@push.rocks+smarttime@4.0.8/node_modules/@push.rocks/smarttime/dist_ts/smarttime.classes.cronmanager.js
var CronManager = class {
  constructor() {
    this.status = "stopped";
    this.cronjobs = new dist_ts_exports5.ObjectMap();
  }
  addCronjob(cronIdentifierArg, cronFunctionArg) {
    const newCronJob = new CronJob(this, cronIdentifierArg, cronFunctionArg);
    this.cronjobs.add(newCronJob);
    if (this.status === "started") {
      newCronJob.start();
    }
    return newCronJob;
  }
  removeCronjob(cronjobArg) {
    cronjobArg.stop();
    this.cronjobs.remove(cronjobArg);
  }
  /**
   * starts the cronjob
   */
  start() {
    if (this.status !== "started") {
      this.status = "started";
      for (const cronJob of this.cronjobs.getArray()) {
        cronJob.start();
      }
      this.runCronCycle();
    }
  }
  async runCronCycle() {
    this.executionTimeout = new dist_ts_exports2.Timeout(0);
    do {
      let nextRunningCronjob;
      for (const cronJob of this.cronjobs.getArray()) {
        cronJob.checkExecution();
        if (!nextRunningCronjob || cronJob.getTimeToNextExecution() < nextRunningCronjob.getTimeToNextExecution()) {
          nextRunningCronjob = cronJob;
        }
      }
      if (nextRunningCronjob) {
        this.executionTimeout = new dist_ts_exports2.Timeout(nextRunningCronjob.getTimeToNextExecution());
        console.log(`Next CronJob scheduled in ${getMilliSecondsAsHumanReadableString(this.executionTimeout.getTimeLeft())}`);
      } else {
        this.executionTimeout = new dist_ts_exports2.Timeout(1e3);
        console.log("no cronjobs specified! Checking again in 1 second");
      }
      await this.executionTimeout.promise;
    } while (this.status === "started");
  }
  /**
   * stops all cronjobs
   */
  stop() {
    if (this.status === "started") {
      this.status = "stopped";
      this.executionTimeout.cancel();
    } else {
      console.log(`You tried to stop a CronManager that was not actually started.`);
    }
    for (const cron of this.cronjobs.getArray()) {
      cron.stop();
    }
  }
};

// node_modules/.pnpm/@push.rocks+smarttime@4.0.8/node_modules/@push.rocks/smarttime/dist_ts/smarttime.classes.extendeddate.js
var ExtendedDate = class _ExtendedDate extends Date {
  // STATIC factories
  static fromMillis(milliSeconds) {
    return new _ExtendedDate(milliSeconds);
  }
  static fromDate(dateArg) {
    return new _ExtendedDate(dateArg.getTime());
  }
  static fromEuropeanDate(europeanDate) {
    const dateArray = /(.*)\.(.*)\.(.*)/.exec(europeanDate);
    const date = new Date(
      parseFloat(dateArray[3]),
      // year
      parseFloat(dateArray[2]) - 1,
      // month
      parseFloat(dateArray[1])
      // day
    );
    const unixMilli = date.getTime();
    return new _ExtendedDate(unixMilli);
  }
  /**
   * creates an Extended date from a hypedDate like "2018-03-28"
   * @param dateString
   */
  static fromHyphedDate(dateString) {
    const dateMillis = new Date(dateString).getTime();
    return new _ExtendedDate(dateMillis);
  }
  /**
   * Same as .fromEuropeanDate(), but accepts additional timeArg and zoneArg
   */
  static fromEuropeanDateAndTime(europeanDateArg, timeArg = "12:00:00", zoneArg = "Europe/Berlin") {
    const dateArray = /(.*)\.(.*)\.(.*)/.exec(europeanDateArg);
    const sliceDate = (dateString) => {
      return `0${dateString}`.slice(-2);
    };
    const dateTimeString = `${dateArray[3]}-${sliceDate(dateArray[2])}-${sliceDate(dateArray[1])}T${timeArg}`;
    const date = import_dayjs.default(dateTimeString);
    const unixMilli = date.toDate().getTime();
    return new _ExtendedDate(unixMilli);
  }
  constructor(unixMilli = Date.now()) {
    super(unixMilli);
  }
  //
  exportToEuropeanDate() {
    const units2 = this.exportToUnits();
    return `${units2.dayString}.${units2.monthString}.${units2.yearString}`;
  }
  exportToHyphedSortableDate() {
    const units2 = this.exportToUnits();
    return `${units2.yearString}-${units2.monthString}-${units2.dayString}`;
  }
  /**
   * exports units
   */
  exportToUnits() {
    const monthsArray = [
      "January",
      "February",
      "March",
      "April",
      "May",
      "June",
      "July",
      "August",
      "September",
      "October",
      "November",
      "December"
    ];
    const daysArray = [
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday",
      "Saturday",
      "Sunday"
    ];
    return {
      year: this.getFullYear(),
      yearString: `${this.getFullYear()}`,
      month: this.getMonth() + 1,
      monthString: ("0" + (this.getMonth() + 1)).slice(-2),
      monthName: monthsArray[this.getMonth()],
      day: this.getDate(),
      dayString: ("0" + this.getDate()).slice(-2),
      dayOfTheWeek: this.getDay(),
      dayOfTheWeekName: daysArray[this.getDay()]
    };
  }
  format(formatArg) {
    return import_dayjs.default(this.getTime()).format(formatArg);
  }
  /**
   * boolean checks
   */
  isToday() {
    return import_dayjs.default(this.getTime()).isToday();
  }
  lessTimePassedToNow(unitArgs) {
    const maxPassedUnixTime = getMilliSecondsFromUnits(unitArgs);
    const actualPassedUnixTime = Date.now() - this.getTime();
    return actualPassedUnixTime < maxPassedUnixTime;
  }
  moreTimePassedToNow(unitArgs) {
    return !this.lessTimePassedToNow(unitArgs);
  }
};

// node_modules/.pnpm/@push.rocks+smarttime@4.0.8/node_modules/@push.rocks/smarttime/dist_ts/smarttime.classes.hrtmeasurement.js
var HrtMeasurement = class {
  constructor() {
    this.nanoSeconds = null;
    this.milliSeconds = null;
    this._milliStart = null;
    this._milliDiff = null;
    this._started = false;
  }
  /**
   * start the measurement
   */
  start() {
    this._started = true;
    this._milliStart = Date.now();
  }
  /**
   * stop the measurement
   */
  stop() {
    if (this._started === false) {
      console.log("Hasn't started yet");
      return;
    }
    this._milliDiff = Date.now() - this._milliStart;
    this.nanoSeconds = this._milliDiff * 1e3;
    this.milliSeconds = this._milliDiff;
    return this;
  }
  /**
   * reset the measurement
   */
  reset() {
    this.nanoSeconds = null;
    this.milliSeconds = null;
    this._milliStart = null;
    this._milliDiff = null;
    this._started = false;
  }
};

// node_modules/.pnpm/@push.rocks+smarttime@4.0.8/node_modules/@push.rocks/smarttime/dist_ts/smarttime.classes.interval.js
var Interval = class {
  constructor(intervalMillisencondsArg) {
    this.status = "initial";
    this.statusAuthorization = null;
    this.intervalJobs = [];
    this.intervalMilliseconds = intervalMillisencondsArg;
  }
  start() {
    this.status = "started";
    const statusAuth = /* @__PURE__ */ new Date();
    this.statusAuthorization = statusAuth;
    const runInterval = async () => {
      while (this.status === "started" && this.statusAuthorization === statusAuth) {
        await dist_ts_exports2.delayFor(this.intervalMilliseconds);
        this.executeIntervalJobs();
      }
    };
    runInterval();
  }
  stop() {
    this.status = "stopped";
    this.statusAuthorization = null;
  }
  addIntervalJob(funcArg) {
    this.intervalJobs.push(funcArg);
  }
  executeIntervalJobs() {
    for (const funcArg of this.intervalJobs) {
      funcArg();
    }
  }
};

// node_modules/.pnpm/@push.rocks+smarttime@4.0.8/node_modules/@push.rocks/smarttime/dist_ts/smarttime.classes.timestamp.js
var TimeStamp = class _TimeStamp {
  /**
   * returns new TimeStamp from milliseconds
   */
  static fromMilliSeconds(milliSecondsArg) {
    return new _TimeStamp(milliSecondsArg);
  }
  /**
   * returns new TimeStamp for now with change set
   * @param timeStampArg
   */
  static fromTimeStamp(timeStampArg) {
    const localTimeStamp = new _TimeStamp();
    localTimeStamp.change = localTimeStamp.milliSeconds - timeStampArg.milliSeconds;
    return localTimeStamp;
  }
  constructor(creatorArg) {
    this.change = null;
    if (!creatorArg) {
      this.date = /* @__PURE__ */ new Date();
    } else if (typeof creatorArg === "number") {
      this.date = new Date(creatorArg);
    }
    this.milliSeconds = this.date.getTime();
    this.epochtime = Math.floor(this.milliSeconds / 1e3);
  }
  /**
   * returns a boolean for wether the timestamp is older than another timestamp
   * @param TimeStampArg
   * @param tresholdTimeArg
   */
  isOlderThanOtherTimeStamp(TimeStampArg, tresholdTimeArg = 0) {
    if (this.milliSeconds < TimeStampArg.milliSeconds - tresholdTimeArg) {
      return true;
    } else {
      return false;
    }
  }
  /**
   * Is the current instance older than the argument
   * @param TimeStampArg
   */
  isOlderThan(TimeStampArg, tresholdTimeArg = 0) {
    if (this.milliSeconds + tresholdTimeArg < TimeStampArg.milliSeconds) {
      return true;
    } else {
      return false;
    }
  }
  /**
   * returns a boolean for wether the timestamp is younger than another timestamp
   * @param TimeStampArg
   * @param tresholdTimeArg
   */
  isYoungerThanOtherTimeStamp(TimeStampArg, tresholdTimeArg = 0) {
    if (this.milliSeconds > TimeStampArg.milliSeconds + tresholdTimeArg) {
      return true;
    } else {
      return false;
    }
  }
  isYoungerThanMilliSeconds(millisecondArg) {
    const nowTimeStamp = new _TimeStamp();
    const compareEpochTime = nowTimeStamp.epochtime - millisecondArg;
    const compareTimeStamp = new _TimeStamp(compareEpochTime);
    return this.isYoungerThanOtherTimeStamp(compareTimeStamp);
  }
};

// node_modules/.pnpm/@push.rocks+smarttime@4.0.8/node_modules/@push.rocks/smarttime/dist_ts/smarttime.classes.timer.js
var Timer = class {
  get timeLeft() {
    return this.timeInMilliseconds - this.pausedAt.change;
  }
  constructor(timeInMillisecondsArg) {
    this.state = "initiated";
    this.completedDeferred = dist_ts_exports.defer();
    this.timeInMilliseconds = timeInMillisecondsArg;
    this.completed = this.completedDeferred.promise;
  }
  /**
   * starts the timer
   */
  start() {
    if (!this.startedAt) {
      this.currentTimeout = setTimeout(() => {
        this.completedDeferred.resolve();
      }, this.timeInMilliseconds);
      this.startedAt = new TimeStamp();
    } else {
      throw new Error("timer has been started before. Please use resume instead");
    }
  }
  pause() {
    if (this.startedAt) {
      clearTimeout(this.currentTimeout);
      this.currentTimeout = null;
      this.pausedAt = TimeStamp.fromTimeStamp(this.startedAt);
    }
  }
  resume() {
    if (this.startedAt) {
      this.currentTimeout = setTimeout(() => {
        this.completedDeferred.resolve();
      }, this.timeLeft);
    } else {
      throw new Error("timer has NOT been started before. Please use .start() instead");
    }
  }
  reset() {
    this.pause();
    this.startedAt = null;
    this.pausedAt = null;
  }
};

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/classes.plugins.js
var import_symbol_tree = __toESM(require_SymbolTree(), 1);

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/classes.asyncexecutionstack.js
var AsyncExecutionStack = class {
  constructor() {
    this.executionSlots = [];
    this.isProcessing = false;
  }
  async getExclusiveExecutionSlot(funcArg, timeoutArg) {
    const executionDeferred = dist_ts_exports.defer();
    const executionSlot = {
      funcToExecute: funcArg,
      executionDeferred,
      timeout: timeoutArg,
      mode: "exclusive"
    };
    this.executionSlots.push(executionSlot);
    this.processExecutionSlots();
    return executionDeferred.promise;
  }
  async getNonExclusiveExecutionSlot(funcArg, timeoutArg) {
    const executionDeferred = dist_ts_exports.defer();
    const executionSlot = {
      funcToExecute: funcArg,
      executionDeferred,
      timeout: timeoutArg,
      mode: "nonexclusive"
    };
    this.executionSlots.push(executionSlot);
    this.processExecutionSlots();
    return executionDeferred.promise;
  }
  async processExecutionSlots() {
    if (this.isProcessing) {
      return;
    }
    this.isProcessing = true;
    while (this.executionSlots.length > 0) {
      const currentSlot = this.executionSlots[0];
      if (currentSlot.mode === "exclusive") {
        await this.executeExclusiveSlot(currentSlot);
        this.executionSlots.shift();
      } else {
        const nonExclusiveSlots = [];
        while (this.executionSlots.length > 0 && this.executionSlots[0].mode === "nonexclusive") {
          nonExclusiveSlots.push(this.executionSlots.shift());
        }
        await this.executeNonExclusiveSlots(nonExclusiveSlots);
      }
    }
    this.isProcessing = false;
  }
  async executeExclusiveSlot(slot) {
    try {
      if (slot.timeout) {
        const result = await Promise.race([
          slot.funcToExecute(),
          dist_ts_exports2.delayFor(slot.timeout).then(() => {
            throw new Error("Timeout reached");
          })
        ]);
        slot.executionDeferred.resolve(result);
      } else {
        const result = await slot.funcToExecute();
        slot.executionDeferred.resolve(result);
      }
    } catch (error) {
      slot.executionDeferred.reject(error);
    }
  }
  async executeNonExclusiveSlots(slots) {
    const promises = slots.map(async (slot) => {
      try {
        if (slot.timeout) {
          const result = await Promise.race([
            slot.funcToExecute(),
            dist_ts_exports2.delayFor(slot.timeout).then(() => {
              throw new Error("Timeout reached");
            })
          ]);
          slot.executionDeferred.resolve(result);
        } else {
          const result = await slot.funcToExecute();
          slot.executionDeferred.resolve(result);
        }
      } catch (error) {
        slot.executionDeferred.reject(error);
      }
    });
    await Promise.all(promises);
  }
};

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/classes.backpressuredarray.js
var BackpressuredArray = class {
  constructor(highWaterMark = 16) {
    this.hasSpace = new dist_ts_exports4.rxjs.Subject();
    this.itemsAvailable = new dist_ts_exports4.rxjs.Subject();
    this.data = [];
    this.highWaterMark = highWaterMark;
  }
  push(item) {
    this.data.push(item);
    this.itemsAvailable.next("itemsAvailable");
    const spaceAvailable = this.checkSpaceAvailable();
    if (spaceAvailable) {
      this.hasSpace.next("hasSpace");
    }
    return spaceAvailable;
  }
  shift() {
    const item = this.data.shift();
    if (this.checkSpaceAvailable()) {
      this.hasSpace.next("hasSpace");
    }
    return item;
  }
  checkSpaceAvailable() {
    return this.data.length < this.highWaterMark;
  }
  checkHasItems() {
    return this.data.length > 0;
  }
  waitForSpace() {
    return new Promise((resolve) => {
      if (this.checkSpaceAvailable()) {
        resolve();
      } else {
        const subscription = this.hasSpace.subscribe(() => {
          subscription.unsubscribe();
          resolve();
        });
      }
    });
  }
  waitForItems() {
    return new Promise((resolve) => {
      if (this.data.length > 0) {
        resolve();
      } else {
        const subscription = this.itemsAvailable.subscribe(() => {
          subscription.unsubscribe();
          resolve();
        });
      }
    });
  }
};

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/classes.fastmap.js
var FastMap = class _FastMap {
  constructor() {
    this.mapObject = {};
  }
  isUniqueKey(keyArg) {
    return this.mapObject[keyArg] ? false : true;
  }
  addToMap(keyArg, objectArg, optionsArg) {
    if (this.isUniqueKey(keyArg) || optionsArg && optionsArg.force) {
      this.mapObject[keyArg] = objectArg;
      return true;
    } else {
      return false;
    }
  }
  getByKey(keyArg) {
    return this.mapObject[keyArg];
  }
  removeFromMap(keyArg) {
    const removedItem = this.getByKey(keyArg);
    delete this.mapObject[keyArg];
    return removedItem;
  }
  getKeys() {
    const keys = [];
    for (const keyArg in this.mapObject) {
      if (this.mapObject[keyArg]) {
        keys.push(keyArg);
      }
    }
    return keys;
  }
  clean() {
    this.mapObject = {};
  }
  /**
   * returns a new Fastmap that includes all values from this and all from the fastmap in the argument
   */
  concat(fastMapArg) {
    const concatedFastmap = new _FastMap();
    for (const key of this.getKeys()) {
      concatedFastmap.addToMap(key, this.getByKey(key));
    }
    for (const key of fastMapArg.getKeys()) {
      concatedFastmap.addToMap(key, fastMapArg.getByKey(key), {
        force: true
      });
    }
    return concatedFastmap;
  }
  /**
   * tries to merge another Fastmap
   * Note: uniqueKeyCollisions will cause overwrite
   * @param fastMapArg
   */
  addAllFromOther(fastMapArg) {
    for (const key of fastMapArg.getKeys()) {
      this.addToMap(key, fastMapArg.getByKey(key), {
        force: true
      });
    }
  }
  async find(findFunctionArg) {
    for (const key of this.getKeys()) {
      const item = this.getByKey(key);
      const findFunctionResult = await findFunctionArg(item);
      if (findFunctionResult) {
        return item;
      }
    }
  }
};

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/classes.objectmap.js
var uni = (prefix = "uni") => {
  return `${prefix}xxxxxxxxxxx`.replace(/[xy]/g, (c) => {
    const r = Math.random() * 16 | 0;
    const v = c === "x" ? r : r & 3 | 8;
    return v.toString(16);
  });
};
var ObjectMap = class _ObjectMap {
  /**
   * returns a new instance
   */
  constructor() {
    this.fastMap = new FastMap();
    this.eventSubject = new dist_ts_exports4.rxjs.Subject();
  }
  /**
   * adds an object mapped to a string
   * the string must be unique
   */
  addMappedUnique(uniqueKeyArg, objectArg) {
    this.fastMap.addToMap(uniqueKeyArg, objectArg);
  }
  /**
   * fastest way to get an object from the map
   * @param uniqueKey
   */
  getMappedUnique(uniqueKeyArg) {
    return this.fastMap.getByKey(uniqueKeyArg);
  }
  /**
   * remove key
   * @param functionArg
   */
  removeMappedUnique(uniqueKey) {
    const object = this.getMappedUnique(uniqueKey);
  }
  /**
   * add object to Objectmap
   * returns false if the object is already in the map
   * returns true if the object was added successfully
   */
  add(objectArg) {
    for (const keyArg of this.fastMap.getKeys()) {
      const object = this.fastMap.getByKey(keyArg);
      if (object === objectArg) {
        return keyArg;
      }
    }
    const uniqueKey = uni("key");
    this.addMappedUnique(uniqueKey, objectArg);
    this.eventSubject.next({
      operation: "add",
      payload: objectArg
    });
    return uniqueKey;
  }
  /**
   * like .add but adds an whole array of objects
   */
  addArray(objectArrayArg) {
    for (const item of objectArrayArg) {
      this.add(item);
    }
  }
  /**
   * check if object is in Objectmap
   */
  checkForObject(objectArg) {
    return !!this.getKeyForObject(objectArg);
  }
  /**
   * get key for object
   * @param findFunction
   */
  getKeyForObject(objectArg) {
    let foundKey = null;
    for (const keyArg of this.fastMap.getKeys()) {
      if (!foundKey && this.fastMap.getByKey(keyArg) === objectArg) {
        foundKey = keyArg;
      } else {
        continue;
      }
    }
    return foundKey;
  }
  /**
   * find object
   */
  async find(findFunction) {
    return this.fastMap.find(findFunction);
  }
  findSync(findFunction) {
    for (const keyArg of this.fastMap.getKeys()) {
      if (findFunction(this.fastMap.getByKey(keyArg))) {
        return this.getMappedUnique(keyArg);
      }
    }
  }
  /**
   * finds a specific element and then removes it
   */
  async findOneAndRemove(findFunction) {
    const foundElement = await this.find(findFunction);
    if (foundElement) {
      this.remove(foundElement);
    }
    return foundElement;
  }
  findOneAndRemoveSync(findFunction) {
    const foundElement = this.findSync(findFunction);
    if (foundElement) {
      this.remove(foundElement);
    }
    return foundElement;
  }
  /**
   * run function for each item in Objectmap
   */
  async forEach(functionArg) {
    for (const keyArg of this.fastMap.getKeys()) {
      await functionArg(this.fastMap.getByKey(keyArg));
    }
  }
  /**
   * gets an object in the Observablemap and removes it, so it can't be retrieved again
   */
  getOneAndRemove() {
    const keys = this.fastMap.getKeys();
    if (keys.length === 0) {
      return null;
    } else {
      const keyToUse = keys[0];
      const removedItem = this.fastMap.removeFromMap(keyToUse);
      this.eventSubject.next({
        operation: "remove",
        payload: removedItem
      });
      return removedItem;
    }
  }
  /**
   * returns a cloned array of all the objects currently in the Objectmap
   */
  getArray() {
    const returnArray = [];
    for (const keyArg of this.fastMap.getKeys()) {
      returnArray.push(this.fastMap.getByKey(keyArg));
    }
    return returnArray;
  }
  /**
   * check if Objectmap ist empty
   */
  isEmpty() {
    return this.fastMap.getKeys().length === 0;
  }
  /**
   * remove object from Objectmap
   */
  remove(objectArg) {
    if (this.checkForObject(objectArg)) {
      const keyArg = this.getKeyForObject(objectArg);
      const removedObject = this.fastMap.removeFromMap(keyArg);
      this.eventSubject.next({
        operation: "remove",
        payload: removedObject
      });
      return removedObject;
    }
    return null;
  }
  /**
   * wipe Objectmap
   */
  wipe() {
    for (const keyArg of this.fastMap.getKeys()) {
      this.fastMap.removeFromMap(keyArg);
    }
  }
  /**
   * returns a new Objectmap that includes
   */
  concat(objectMapArg) {
    const concattedObjectMap = new _ObjectMap();
    concattedObjectMap.fastMap.addAllFromOther(this.fastMap);
    concattedObjectMap.fastMap.addAllFromOther(objectMapArg.fastMap);
    return concattedObjectMap;
  }
  /**
   * tries to merge another Objectmap
   * Note: uniqueKeyCollisions will cause overwrite
   * @param objectMapArg
   */
  addAllFromOther(objectMapArg) {
    this.fastMap.addAllFromOther(objectMapArg.fastMap);
  }
};

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/classes.interestmap.interest.js
var Interest = class {
  /**
   * quick access to a string that makes the interest comparable for checking for similar interests
   */
  get comparisonString() {
    return this.comparisonFunc(this.originalInterest);
  }
  /**
   * fullfill the interest
   */
  fullfillInterest(objectArg) {
    this.isFullfilled = true;
    this.fullfillmentStore = [];
    this.interestDeferred.resolve(objectArg);
  }
  /**
   *
   */
  constructor(interestMapArg, interestArg, comparisonFuncArg, optionsArg) {
    this.destructionTimer = new dist_ts_exports6.Timer(1e4);
    this.isFullfilled = false;
    this.fullfillmentStore = [];
    this.interestDeferred = new dist_ts_exports.Deferred();
    this.interestFullfilled = this.interestDeferred.promise;
    this.interestMapRef = interestMapArg;
    this.originalInterest = interestArg;
    this.comparisonFunc = comparisonFuncArg;
    this.options = optionsArg;
    this.destructionTimer.completed.then(() => {
      this.destroy();
    });
    if (this.options?.markLostAfterDefault) {
      dist_ts_exports2.delayFor(this.options.markLostAfterDefault).then(this.markLost);
    }
  }
  // ===============================
  // LIFECYCLE MANAGEMENT
  // ===============================
  /**
   * self destructs the interest
   */
  destroy() {
    this.interestMapRef.removeInterest(this);
    if (!this.isFullfilled && this.options.defaultFullfillment) {
      this.fullfillInterest(this.options.defaultFullfillment);
    }
  }
  /**
   * notifies the interest that the interest in it has been lost
   */
  markLost() {
    this.destructionTimer.start();
  }
  /**
   * notifies the interest that the interest in it has been restored
   */
  renew() {
    this.destructionTimer.reset();
  }
};

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/classes.interestmap.js
var InterestMap = class {
  constructor(comparisonFuncArg, optionsArg = {}) {
    this.interestObjectMap = new ObjectMap();
    this.interestObservable = new dist_ts_exports4.ObservableIntake();
    this.comparisonFunc = comparisonFuncArg;
    this.options = optionsArg;
  }
  /**
   * adds an interest to the InterestMap
   * @param interestId
   */
  async addInterest(interestId, defaultFullfillmentArg) {
    const comparisonString = this.comparisonFunc(interestId);
    let returnInterest;
    const newInterest = new Interest(this, interestId, this.comparisonFunc, {
      markLostAfterDefault: this.options.markLostAfterDefault,
      defaultFullfillment: defaultFullfillmentArg
    });
    let interestExists = false;
    await this.interestObjectMap.forEach((interestArg) => {
      if (!interestExists && interestArg.comparisonString === newInterest.comparisonString) {
        console.log("info", `interest already exists for ${newInterest.comparisonString}`);
        interestExists = true;
        returnInterest = interestArg;
        returnInterest.renew();
      }
    });
    if (!returnInterest) {
      returnInterest = newInterest;
      this.interestObjectMap.add(returnInterest);
    }
    this.interestObservable.push(returnInterest);
    return returnInterest;
  }
  /**
   * removes an interest from the interest map
   */
  removeInterest(interestArg) {
    const interestToRemove = this.interestObjectMap.findOneAndRemoveSync((interestArg2) => {
      return interestArg.comparisonString === interestArg2.comparisonString;
    });
  }
  /**
   * check interest
   */
  checkInterest(objectArg) {
    const comparisonString = this.comparisonFunc(objectArg);
    return this.checkInterestByString(comparisonString);
  }
  /**
   * checks an interest
   * @param comparisonStringArg
   */
  checkInterestByString(comparisonStringArg) {
    const foundInterest = this.interestObjectMap.findSync((interest) => {
      return interest.comparisonString === comparisonStringArg;
    });
    if (foundInterest) {
      return true;
    } else {
      return false;
    }
  }
  /**
   * inform lost interest
   * @param interestId
   */
  informLostInterest(interestId) {
    const wantedInterest = this.findInterest(interestId);
    if (wantedInterest) {
      wantedInterest.markLost();
    }
  }
  /**
   * finds an interest
   * @param interestId
   */
  findInterest(interestId) {
    const comparableString = this.comparisonFunc(interestId);
    const interest = this.interestObjectMap.findSync((interestArg) => {
      return interestArg.comparisonString === comparableString;
    });
    return interest;
  }
};

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/classes.limitedarray.js
var LimitedArray = class {
  constructor(limitArg) {
    this.array = [];
    this.arrayLimit = limitArg;
  }
  addOne(objectArg) {
    this.array.unshift(objectArg);
    if (this.array.length > this.arrayLimit) {
      this.array.length = this.arrayLimit;
    }
  }
  addMany(objectArrayArg) {
    for (let objectArg of objectArrayArg) {
      this.addOne(objectArg);
    }
  }
  setLimit(limitArg) {
    this.arrayLimit = limitArg;
    if (this.array.length > this.arrayLimit) {
      this.array.length = this.arrayLimit;
    }
  }
  getAverage() {
    if (typeof this.array[0] === "number") {
      let sum = 0;
      for (let localNumber of this.array) {
        let localNumberAny = localNumber;
        sum = sum + localNumberAny;
      }
      return sum / this.array.length;
    } else {
      return null;
    }
  }
};

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/classes.looptracker.js
var LoopTracker = class {
  constructor() {
    this.referenceObjectMap = new ObjectMap();
  }
  /**
   * checks and tracks an object
   * @param objectArg
   */
  checkAndTrack(objectArg) {
    if (!this.referenceObjectMap.checkForObject(objectArg)) {
      this.referenceObjectMap.add(objectArg);
      return true;
    } else {
      return false;
    }
  }
};

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/classes.stringmap.js
var Stringmap = class {
  constructor() {
    this._stringArray = [];
    this._triggerUntilTrueFunctionArray = [];
  }
  /**
   * add a string to the Stringmap
   */
  addString(stringArg) {
    this._stringArray.push(stringArg);
    this.notifyTrigger();
  }
  /**
   * like addString, but accepts an array of strings
   */
  addStringArray(stringArrayArg) {
    for (const stringItem of stringArrayArg) {
      this.addString(stringItem);
    }
  }
  /**
   * removes a string from Stringmap
   */
  removeString(stringArg) {
    for (const keyArg in this._stringArray) {
      if (this._stringArray[keyArg] === stringArg) {
        this._stringArray.splice(parseInt(keyArg), 1);
      }
    }
    this.notifyTrigger();
  }
  /**
   * wipes the Stringmap
   */
  wipe() {
    this._stringArray = [];
    this.notifyTrigger();
  }
  /**
   * check if string is in Stringmap
   */
  checkString(stringArg) {
    return this._stringArray.indexOf(stringArg) !== -1;
  }
  /**
   * checks stringPresence with minimatch
   */
  checkMinimatch(miniMatchStringArg) {
    const smartMatchInstance = new dist_ts_exports3.SmartMatch(miniMatchStringArg);
    let foundMatch = false;
    for (const stringItem of this._stringArray) {
      if (smartMatchInstance.match(stringItem)) {
        foundMatch = true;
      }
    }
    return foundMatch;
  }
  /**
   * checks if the Stringmap is empty
   */
  checkIsEmpty() {
    return this._stringArray.length === 0;
  }
  /**
   * gets a cloned copy of the current string Array
   */
  getStringArray() {
    const returnArray = [];
    for (const stringItem of this._stringArray) {
      returnArray.push(stringItem);
    }
    return returnArray;
  }
  // trigger registering
  /**
   * register a new trigger
   */
  registerUntilTrue(functionArg, callbackArg) {
    const trueDeferred = dist_ts_exports.defer();
    this._triggerUntilTrueFunctionArray.push(() => {
      const result = functionArg(this.getStringArray());
      if (result === true) {
        if (callbackArg) {
          callbackArg();
        }
        trueDeferred.resolve();
      }
      return result;
    });
    this.notifyTrigger();
    return trueDeferred.promise;
  }
  /**
   * notifies triggers
   */
  notifyTrigger() {
    const filteredArray = this._triggerUntilTrueFunctionArray.filter((functionArg) => {
      return !functionArg();
    });
    this._triggerUntilTrueFunctionArray = filteredArray;
  }
};

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/classes.timedaggregator.js
var TimedAggregtor = class {
  constructor(optionsArg) {
    this.storageArray = [];
    this.options = optionsArg;
  }
  checkAggregationStatus() {
    const addAggregationTimer = () => {
      this.aggregationTimer = new dist_ts_exports6.Timer(this.options.aggregationIntervalInMillis);
      this.aggregationTimer.completed.then(() => {
        const aggregateForProcessing = this.storageArray;
        if (aggregateForProcessing.length === 0) {
          this.aggregationTimer = null;
          return;
        }
        this.storageArray = [];
        addAggregationTimer();
        this.options.functionForAggregation(aggregateForProcessing);
      });
      this.aggregationTimer.start();
    };
    if (!this.aggregationTimer) {
      addAggregationTimer();
    }
  }
  add(aggregationArg) {
    this.storageArray.push(aggregationArg);
    this.checkAggregationStatus();
  }
};

// node_modules/.pnpm/@push.rocks+lik@6.1.0/node_modules/@push.rocks/lik/dist_ts/classes.tree.js
var Tree = class {
  constructor() {
    this.symbolTree = new import_symbol_tree.default();
  }
  // =======================================
  // Functions that map to the functionality of symbol-tree
  // =======================================
  /**
   *
   * @param objectArg
   */
  initialize(objectArg) {
    return this.symbolTree.initialize(objectArg);
  }
  hasChildren(objectArg) {
    return this.symbolTree.hasChildren(objectArg);
  }
  firstChild(objectArg) {
    return this.symbolTree.firstChild(objectArg);
  }
  lastChild(objectArg) {
    return this.symbolTree.lastChild(objectArg);
  }
  previousSibling(objectArg) {
    return this.symbolTree.previousSibling(objectArg);
  }
  nextSibling(objectArg) {
    return this.symbolTree.nextSibling(objectArg);
  }
  parent(objectArg) {
    return this.symbolTree.parent(objectArg);
  }
  lastInclusiveDescendant(objectArg) {
    return this.symbolTree.lastInclusiveDescendant(objectArg);
  }
  preceding(objectArg, optionsArg) {
    return this.symbolTree.preceding(objectArg, optionsArg);
  }
  following(object, optionsArg) {
    return this.symbolTree.following(object, optionsArg);
  }
  childrenToArray(parentArg, optionsArg) {
    return this.symbolTree.childrenToArray(parentArg, optionsArg);
  }
  ancestorsToArray(objectArg, optionsArg) {
    return this.symbolTree.ancestorsToArray(objectArg, optionsArg);
  }
  treeToArray(rootArg, optionsArg) {
    return this.symbolTree.treeToArray(rootArg, optionsArg);
  }
  childrenIterator(parentArg, optionsArg) {
    return this.symbolTree.childrenIterator(parentArg, optionsArg);
  }
  previousSiblingsIterator(objectArg) {
    return this.symbolTree.previousSiblingsIterator(objectArg);
  }
  nextSiblingsIterator(objectArg) {
    return this.symbolTree.nextSiblingsIterator();
  }
  ancestorsIterator(objectArg) {
    this.symbolTree.ancestorsIterator();
  }
  treeIterator(rootArg, optionsArg) {
    return this.symbolTree.treeIterator(rootArg);
  }
  index(childArg) {
    return this.symbolTree.index(childArg);
  }
  childrenCount(parentArg) {
    return this.symbolTree.childrenCount(parentArg);
  }
  compareTreePosition(leftArg, rightArg) {
    return this.compareTreePosition(leftArg, rightArg);
  }
  remove(removeObjectArg) {
    return this.symbolTree.remove(removeObjectArg);
  }
  insertBefore(referenceObjectArg, newObjectArg) {
    return this.symbolTree.insertBefore(referenceObjectArg, newObjectArg);
  }
  insertAfter(referenceObject, newObjectArg) {
    return this.symbolTree.insertAfter(referenceObject, newObjectArg);
  }
  prependChild(referenceObjectArg, newObjectArg) {
    return this.symbolTree.prependChild(referenceObjectArg, newObjectArg);
  }
  appendChild(referenceObjectArg, newObjectArg) {
    return this.symbolTree.appendChild(referenceObjectArg, newObjectArg);
  }
  // ===========================================
  // Functionionality that extends symbol-tree
  // ===========================================
  /**
   * returns a branch of the tree as JSON
   * can be user
   */
  toJsonWithHierachy(rootElement) {
    const treeIterable = this.treeIterator(rootElement, {});
    for (const treeItem of treeIterable) {
      console.log(treeItem);
    }
  }
  /**
   * builds a tree from a JSON with hierachy
   * @param rootElement
   */
  fromJsonWithHierachy(rootElement) {
  }
};

// node_modules/.pnpm/@push.rocks+smartbuffer@3.0.4/node_modules/@push.rocks/smartbuffer/dist_ts/index.js
var dist_ts_exports7 = {};
__export(dist_ts_exports7, {
  base64ToUint8Array: () => base64ToUint8Array2,
  ensurePureUint8Array: () => ensurePureUint8Array,
  isBufferLike: () => isBufferLike,
  isUint8Array: () => isUint8Array2,
  uInt8ArrayExtras: () => uInt8ArrayExtras,
  uInt8ArrayToBase64: () => uInt8ArrayToBase64
});

// node_modules/.pnpm/uint8array-extras@1.1.0/node_modules/uint8array-extras/index.js
var uint8array_extras_exports = {};
__export(uint8array_extras_exports, {
  areUint8ArraysEqual: () => areUint8ArraysEqual,
  assertUint8Array: () => assertUint8Array,
  base64ToString: () => base64ToString,
  base64ToUint8Array: () => base64ToUint8Array,
  compareUint8Arrays: () => compareUint8Arrays,
  concatUint8Arrays: () => concatUint8Arrays,
  hexToUint8Array: () => hexToUint8Array,
  isUint8Array: () => isUint8Array,
  stringToBase64: () => stringToBase64,
  stringToUint8Array: () => stringToUint8Array,
  toUint8Array: () => toUint8Array,
  uint8ArrayToBase64: () => uint8ArrayToBase64,
  uint8ArrayToHex: () => uint8ArrayToHex,
  uint8ArrayToString: () => uint8ArrayToString
});
var objectToString = Object.prototype.toString;
var uint8ArrayStringified = "[object Uint8Array]";
function isUint8Array(value) {
  if (!value) {
    return false;
  }
  if (value.constructor === Uint8Array) {
    return true;
  }
  return objectToString.call(value) === uint8ArrayStringified;
}
function assertUint8Array(value) {
  if (!isUint8Array(value)) {
    throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof value}\``);
  }
}
function toUint8Array(value) {
  if (value instanceof ArrayBuffer) {
    return new Uint8Array(value);
  }
  if (ArrayBuffer.isView(value)) {
    return new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
  }
  throw new TypeError(`Unsupported value, got \`${typeof value}\`.`);
}
function concatUint8Arrays(arrays, totalLength) {
  if (arrays.length === 0) {
    return new Uint8Array(0);
  }
  totalLength ??= arrays.reduce((accumulator, currentValue) => accumulator + currentValue.length, 0);
  const returnValue = new Uint8Array(totalLength);
  let offset = 0;
  for (const array of arrays) {
    assertUint8Array(array);
    returnValue.set(array, offset);
    offset += array.length;
  }
  return returnValue;
}
function areUint8ArraysEqual(a, b) {
  assertUint8Array(a);
  assertUint8Array(b);
  if (a === b) {
    return true;
  }
  if (a.length !== b.length) {
    return false;
  }
  for (let index = 0; index < a.length; index++) {
    if (a[index] !== b[index]) {
      return false;
    }
  }
  return true;
}
function compareUint8Arrays(a, b) {
  assertUint8Array(a);
  assertUint8Array(b);
  const length = Math.min(a.length, b.length);
  for (let index = 0; index < length; index++) {
    const diff = a[index] - b[index];
    if (diff !== 0) {
      return Math.sign(diff);
    }
  }
  return Math.sign(a.length - b.length);
}
var cachedDecoder = new globalThis.TextDecoder();
function uint8ArrayToString(array) {
  assertUint8Array(array);
  return cachedDecoder.decode(array);
}
function assertString(value) {
  if (typeof value !== "string") {
    throw new TypeError(`Expected \`string\`, got \`${typeof value}\``);
  }
}
var cachedEncoder = new globalThis.TextEncoder();
function stringToUint8Array(string) {
  assertString(string);
  return cachedEncoder.encode(string);
}
function base64ToBase64Url(base642) {
  return base642.replaceAll("+", "-").replaceAll("/", "_").replace(/=+$/, "");
}
function base64UrlToBase64(base64url) {
  return base64url.replaceAll("-", "+").replaceAll("_", "/");
}
var MAX_BLOCK_SIZE = 65535;
function uint8ArrayToBase64(array, { urlSafe = false } = {}) {
  assertUint8Array(array);
  let base642;
  if (array.length < MAX_BLOCK_SIZE) {
    base642 = globalThis.btoa(String.fromCodePoint.apply(this, array));
  } else {
    base642 = "";
    for (const value of array) {
      base642 += String.fromCodePoint(value);
    }
    base642 = globalThis.btoa(base642);
  }
  return urlSafe ? base64ToBase64Url(base642) : base642;
}
function base64ToUint8Array(base64String) {
  assertString(base64String);
  return Uint8Array.from(globalThis.atob(base64UrlToBase64(base64String)), (x) => x.codePointAt(0));
}
function stringToBase64(string, { urlSafe = false } = {}) {
  assertString(string);
  return uint8ArrayToBase64(stringToUint8Array(string), { urlSafe });
}
function base64ToString(base64String) {
  assertString(base64String);
  return uint8ArrayToString(base64ToUint8Array(base64String));
}
var byteToHexLookupTable = Array.from({ length: 256 }, (_, index) => index.toString(16).padStart(2, "0"));
function uint8ArrayToHex(array) {
  assertUint8Array(array);
  let hexString = "";
  for (let index = 0; index < array.length; index++) {
    hexString += byteToHexLookupTable[array[index]];
  }
  return hexString;
}
var hexToDecimalLookupTable = {
  0: 0,
  1: 1,
  2: 2,
  3: 3,
  4: 4,
  5: 5,
  6: 6,
  7: 7,
  8: 8,
  9: 9,
  a: 10,
  b: 11,
  c: 12,
  d: 13,
  e: 14,
  f: 15,
  A: 10,
  B: 11,
  C: 12,
  D: 13,
  E: 14,
  F: 15
};
function hexToUint8Array(hexString) {
  assertString(hexString);
  if (hexString.length % 2 !== 0) {
    throw new Error("Invalid Hex string length.");
  }
  const resultLength = hexString.length / 2;
  const bytes = new Uint8Array(resultLength);
  for (let index = 0; index < resultLength; index++) {
    const highNibble = hexToDecimalLookupTable[hexString[index * 2]];
    const lowNibble = hexToDecimalLookupTable[hexString[index * 2 + 1]];
    if (highNibble === void 0 || lowNibble === void 0) {
      throw new Error(`Invalid Hex character encountered at position ${index * 2}`);
    }
    bytes[index] = highNibble << 4 | lowNibble;
  }
  return bytes;
}

// node_modules/.pnpm/@push.rocks+smartbuffer@3.0.4/node_modules/@push.rocks/smartbuffer/dist_ts/index.js
var uInt8ArrayExtras = uint8array_extras_exports;
function uInt8ArrayToBase64(uInt8Array) {
  return uint8array_extras_exports.uint8ArrayToBase64(uInt8Array);
}
function base64ToUint8Array2(base642) {
  return uint8array_extras_exports.base64ToUint8Array(base642);
}
var isUint8Array2 = (obj) => {
  return uint8array_extras_exports.isUint8Array(obj);
};
function isBufferLike(obj) {
  if (obj && typeof obj.byteLength === "number") {
    return true;
  }
  if (typeof Buffer !== "undefined" && Buffer.isBuffer) {
    return Buffer.isBuffer(obj);
  }
  return false;
}
function ensurePureUint8Array(bufferArg) {
  const uint8Array = new Uint8Array(bufferArg.length);
  uint8Array.set(bufferArg);
  return uint8Array;
}

// node_modules/.pnpm/@push.rocks+smartguard@3.1.0/node_modules/@push.rocks/smartguard/dist_ts/index.js
var dist_ts_exports8 = {};
__export(dist_ts_exports8, {
  Guard: () => Guard,
  GuardError: () => GuardError,
  GuardSet: () => GuardSet,
  passGuardsOrReject: () => passGuardsOrReject
});

// node_modules/.pnpm/@push.rocks+smartguard@3.1.0/node_modules/@push.rocks/smartguard/dist_ts/classes.guard.js
var Guard = class {
  constructor(guardFunctionArg, optionsArg) {
    this.guardFunction = guardFunctionArg;
    this.options = optionsArg;
  }
  /**
   * executes the guard against a data argument;
   * @param dataArg
   */
  async exec(dataArg) {
    const result = await this.guardFunction(dataArg);
    return result;
  }
  async getFailedHint(dataArg) {
    const result = await this.exec(dataArg);
    if (!result) {
      return this.options.failedHint;
    } else {
      return null;
    }
  }
};

// node_modules/.pnpm/@push.rocks+smartguard@3.1.0/node_modules/@push.rocks/smartguard/dist_ts/classes.guarderror.js
var GuardError = class extends Error {
  constructor(message) {
    super(message);
    this.name = "GuardError";
  }
};

// node_modules/.pnpm/@push.rocks+smartguard@3.1.0/node_modules/@push.rocks/smartguard/dist_ts/classes.guardset.js
var GuardSet = class extends Guard {
  constructor(guardArray = []) {
    super(async (dataArg) => {
      return this.allGuardsPass(dataArg);
    });
    this.guards = guardArray;
  }
  /**
   * executes all guards in all guardSets against a data argument
   * @param dataArg
   */
  async execAllWithData(dataArg, optionsArg = {
    mode: "parallel",
    stopOnFail: false
  }) {
    const resultPromises = [];
    for (const guard of this.guards) {
      const guardResultPromise = guard.exec(dataArg);
      if (optionsArg.mode === "serial") {
        await guardResultPromise;
      }
      resultPromises.push(guardResultPromise);
      if (optionsArg.stopOnFail) {
        if (!await guardResultPromise) {
          return await Promise.all(resultPromises);
        }
      }
    }
    const results = await Promise.all(resultPromises);
    return results;
  }
  /**
   * checks if all guards pass
   * @param dataArg
   */
  async allGuardsPass(dataArg, optionsArg = {
    mode: "parallel",
    stopOnFail: false
  }) {
    const results = await this.execAllWithData(dataArg, optionsArg);
    return results.every((result) => result);
  }
  /**
   * checks if any guard passes
   * @param dataArg
   */
  async anyGuardsPass(dataArg) {
    const results = await this.execAllWithData(dataArg, {
      mode: "parallel",
      stopOnFail: false
    });
    return results.some((result) => result);
  }
  /**
   * returns the first reason for why something fails
   * @param dataArg
   * @returns
   */
  getFailedHint(dataArg) {
    for (const guard of this.guards) {
      const failedHint = guard.getFailedHint(dataArg);
      if (failedHint) {
        return failedHint;
      }
    }
  }
};

// node_modules/.pnpm/@push.rocks+smartguard@3.1.0/node_modules/@push.rocks/smartguard/dist_ts/index.js
var passGuardsOrReject = async (dataArg, guards) => {
  const guardSet = new GuardSet(guards);
  const result = await guardSet.allGuardsPass(dataArg);
  if (!result) {
    const failedHint = await guardSet.getFailedHint(dataArg);
    throw new GuardError(`Guards failed:
${failedHint}
    `);
  }
  return;
};

// node_modules/.pnpm/@push.rocks+webrequest@3.0.37/node_modules/@push.rocks/webrequest/dist_ts/index.js
var dist_ts_exports14 = {};
__export(dist_ts_exports14, {
  WebRequest: () => WebRequest
});

// node_modules/.pnpm/@push.rocks+smartenv@5.0.12/node_modules/@push.rocks/smartenv/dist_ts/index.js
var dist_ts_exports9 = {};
__export(dist_ts_exports9, {
  Smartenv: () => Smartenv
});

// node_modules/.pnpm/@push.rocks+smartenv@5.0.12/node_modules/@push.rocks/smartenv/dist_ts/smartenv.classes.smartenv.js
var Smartenv = class {
  constructor() {
    this.loadedScripts = [];
  }
  async getEnvAwareModule(optionsArg) {
    if (this.isNode) {
      const moduleResult = await this.getSafeNodeModule(optionsArg.nodeModuleName);
      return moduleResult;
    } else if (this.isBrowser) {
      const moduleResult = await this.getSafeWebModule(optionsArg.webUrlArg, optionsArg.getFunction);
      return moduleResult;
    } else {
      console.error("platform for loading not supported by smartenv");
    }
  }
  async getSafeNodeModule(moduleNameArg, runAfterFunc) {
    if (!this.isNode) {
      console.error(`You tried to load a node module in a wrong context: ${moduleNameArg}`);
      return;
    }
    const returnValue = await new Function(`return import('${moduleNameArg}')`)();
    if (runAfterFunc) {
      await runAfterFunc(returnValue);
    }
    return returnValue;
  }
  async getSafeWebModule(urlArg, getFunctionArg) {
    if (!this.isBrowser) {
      console.error("You tried to load a web module in a wrong context");
      return;
    }
    if (this.loadedScripts.includes(urlArg)) {
      return getFunctionArg();
    } else {
      this.loadedScripts.push(urlArg);
    }
    const done = dist_ts_exports.defer();
    if (globalThis.importScripts) {
      globalThis.importScripts(urlArg);
      done.resolve();
    } else {
      const script = document.createElement("script");
      script.onload = () => {
        done.resolve();
      };
      script.src = urlArg;
      document.head.appendChild(script);
    }
    await done.promise;
    return getFunctionArg();
  }
  get runtimeEnv() {
    if (typeof process !== "undefined") {
      return "node";
    } else {
      return "browser";
    }
  }
  get isBrowser() {
    return !this.isNode;
  }
  get userAgent() {
    if (this.isBrowser) {
      return navigator.userAgent;
    } else {
      return "undefined";
    }
  }
  get isNode() {
    return this.runtimeEnv === "node";
  }
  get nodeVersion() {
    return process.version;
  }
  get isCI() {
    if (this.isNode) {
      if (process.env.CI) {
        return true;
      } else {
        return false;
      }
    } else {
      return false;
    }
  }
  async isMacAsync() {
    if (this.isNode) {
      const os = await this.getSafeNodeModule("os");
      return os.platform() === "darwin";
    } else {
      return false;
    }
  }
  async isWindowsAsync() {
    if (this.isNode) {
      const os = await this.getSafeNodeModule("os");
      return os.platform() === "win32";
    } else {
      return false;
    }
  }
  async isLinuxAsync() {
    if (this.isNode) {
      const os = await this.getSafeNodeModule("os");
      return os.platform() === "linux";
    } else {
      return false;
    }
  }
  /**
   * prints the environment to console
   */
  async printEnv() {
    if (this.isNode) {
      console.log("running on NODE");
      console.log("node version is " + this.nodeVersion);
    } else {
      console.log("running on BROWSER");
      console.log("browser is " + this.userAgent);
    }
  }
};

// node_modules/.pnpm/@push.rocks+smartjson@5.0.19/node_modules/@push.rocks/smartjson/dist_ts/index.js
var dist_ts_exports11 = {};
__export(dist_ts_exports11, {
  Smartjson: () => Smartjson,
  deepEqualJsonLStrings: () => deepEqualJsonLStrings,
  deepEqualObjects: () => deepEqualObjects,
  foldDec: () => foldDec,
  parse: () => parse2,
  parseBase64: () => parseBase64,
  parseJsonL: () => parseJsonL,
  stringify: () => stringify2,
  stringifyBase64: () => stringifyBase64,
  stringifyPretty: () => stringifyPretty
});

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/index.js
var dist_ts_exports10 = {};
__export(dist_ts_exports10, {
  Base64: () => Base64,
  Domain: () => Domain,
  GitRepo: () => GitRepo,
  base64: () => base64,
  create: () => smartstring_create_exports,
  docker: () => smartstring_docker_exports,
  indent: () => smartstring_indent_exports,
  normalize: () => smartstring_normalize_exports,
  type: () => smartstring_type_exports
});

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/smartstring.create.js
var smartstring_create_exports = {};
__export(smartstring_create_exports, {
  createCryptoRandomString: () => createCryptoRandomString,
  createRandomString: () => createRandomString
});

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/smartstring.plugins.js
var isounique = __toESM(require_dist_ts(), 1);
var url = __toESM(require_url(), 1);

// node_modules/.pnpm/js-base64@3.7.7/node_modules/js-base64/base64.mjs
var version = "3.7.7";
var VERSION = version;
var _hasBuffer = typeof Buffer === "function";
var _TD = typeof TextDecoder === "function" ? new TextDecoder() : void 0;
var _TE = typeof TextEncoder === "function" ? new TextEncoder() : void 0;
var b64ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var b64chs = Array.prototype.slice.call(b64ch);
var b64tab = ((a) => {
  let tab = {};
  a.forEach((c, i) => tab[c] = i);
  return tab;
})(b64chs);
var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
var _fromCC = String.fromCharCode.bind(String);
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_");
var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, "");
var btoaPolyfill = (bin) => {
  let u32, c0, c1, c2, asc = "";
  const pad = bin.length % 3;
  for (let i = 0; i < bin.length; ) {
    if ((c0 = bin.charCodeAt(i++)) > 255 || (c1 = bin.charCodeAt(i++)) > 255 || (c2 = bin.charCodeAt(i++)) > 255)
      throw new TypeError("invalid character found");
    u32 = c0 << 16 | c1 << 8 | c2;
    asc += b64chs[u32 >> 18 & 63] + b64chs[u32 >> 12 & 63] + b64chs[u32 >> 6 & 63] + b64chs[u32 & 63];
  }
  return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
};
var _btoa = typeof btoa === "function" ? (bin) => btoa(bin) : _hasBuffer ? (bin) => Buffer.from(bin, "binary").toString("base64") : btoaPolyfill;
var _fromUint8Array = _hasBuffer ? (u8a) => Buffer.from(u8a).toString("base64") : (u8a) => {
  const maxargs = 4096;
  let strs = [];
  for (let i = 0, l = u8a.length; i < l; i += maxargs) {
    strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));
  }
  return _btoa(strs.join(""));
};
var fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);
var cb_utob = (c) => {
  if (c.length < 2) {
    var cc = c.charCodeAt(0);
    return cc < 128 ? c : cc < 2048 ? _fromCC(192 | cc >>> 6) + _fromCC(128 | cc & 63) : _fromCC(224 | cc >>> 12 & 15) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
  } else {
    var cc = 65536 + (c.charCodeAt(0) - 55296) * 1024 + (c.charCodeAt(1) - 56320);
    return _fromCC(240 | cc >>> 18 & 7) + _fromCC(128 | cc >>> 12 & 63) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
  }
};
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
var utob = (u) => u.replace(re_utob, cb_utob);
var _encode = _hasBuffer ? (s) => Buffer.from(s, "utf8").toString("base64") : _TE ? (s) => _fromUint8Array(_TE.encode(s)) : (s) => _btoa(utob(s));
var encode = (src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode(src)) : _encode(src);
var encodeURI2 = (src) => encode(src, true);
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
var cb_btou = (cccc) => {
  switch (cccc.length) {
    case 4:
      var cp = (7 & cccc.charCodeAt(0)) << 18 | (63 & cccc.charCodeAt(1)) << 12 | (63 & cccc.charCodeAt(2)) << 6 | 63 & cccc.charCodeAt(3), offset = cp - 65536;
      return _fromCC((offset >>> 10) + 55296) + _fromCC((offset & 1023) + 56320);
    case 3:
      return _fromCC((15 & cccc.charCodeAt(0)) << 12 | (63 & cccc.charCodeAt(1)) << 6 | 63 & cccc.charCodeAt(2));
    default:
      return _fromCC((31 & cccc.charCodeAt(0)) << 6 | 63 & cccc.charCodeAt(1));
  }
};
var btou = (b) => b.replace(re_btou, cb_btou);
var atobPolyfill = (asc) => {
  asc = asc.replace(/\s+/g, "");
  if (!b64re.test(asc))
    throw new TypeError("malformed base64.");
  asc += "==".slice(2 - (asc.length & 3));
  let u24, bin = "", r1, r2;
  for (let i = 0; i < asc.length; ) {
    u24 = b64tab[asc.charAt(i++)] << 18 | b64tab[asc.charAt(i++)] << 12 | (r1 = b64tab[asc.charAt(i++)]) << 6 | (r2 = b64tab[asc.charAt(i++)]);
    bin += r1 === 64 ? _fromCC(u24 >> 16 & 255) : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255) : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);
  }
  return bin;
};
var _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, "base64").toString("binary") : atobPolyfill;
var _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0)));
var toUint8Array2 = (a) => _toUint8Array(_unURI(a));
var _decode = _hasBuffer ? (a) => Buffer.from(a, "base64").toString("utf8") : _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
var _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/"));
var decode = (src) => _decode(_unURI(src));
var isValid = (src) => {
  if (typeof src !== "string")
    return false;
  const s = src.replace(/\s+/g, "").replace(/={0,2}$/, "");
  return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
};
var _noEnum = (v) => {
  return {
    value: v,
    enumerable: false,
    writable: true,
    configurable: true
  };
};
var extendString = function() {
  const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));
  _add("fromBase64", function() {
    return decode(this);
  });
  _add("toBase64", function(urlsafe) {
    return encode(this, urlsafe);
  });
  _add("toBase64URI", function() {
    return encode(this, true);
  });
  _add("toBase64URL", function() {
    return encode(this, true);
  });
  _add("toUint8Array", function() {
    return toUint8Array2(this);
  });
};
var extendUint8Array = function() {
  const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));
  _add("toBase64", function(urlsafe) {
    return fromUint8Array(this, urlsafe);
  });
  _add("toBase64URI", function() {
    return fromUint8Array(this, true);
  });
  _add("toBase64URL", function() {
    return fromUint8Array(this, true);
  });
};
var extendBuiltins = () => {
  extendString();
  extendUint8Array();
};
var gBase64 = {
  version,
  VERSION,
  atob: _atob,
  atobPolyfill,
  btoa: _btoa,
  btoaPolyfill,
  fromBase64: decode,
  toBase64: encode,
  encode,
  encodeURI: encodeURI2,
  encodeURL: encodeURI2,
  utob,
  btou,
  decode,
  isValid,
  fromUint8Array,
  toUint8Array: toUint8Array2,
  extendString,
  extendUint8Array,
  extendBuiltins
};

// node_modules/.pnpm/strip-indent@4.0.0/node_modules/strip-indent/index.js
var import_min_indent = __toESM(require_min_indent(), 1);
function stripIndent(string) {
  const indent2 = (0, import_min_indent.default)(string);
  if (indent2 === 0) {
    return string;
  }
  const regex = new RegExp(`^[ \\t]{${indent2}}`, "gm");
  return string.replace(regex, "");
}

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/smartstring.plugins.js
var import_randomatic = __toESM(require_randomatic(), 1);
var smartenvInstance = new Smartenv();

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/smartstring.create.js
var createRandomString = (patternArg, lengthArg, optionsArg) => {
  return import_randomatic.default(patternArg, lengthArg, optionsArg);
};
var createCryptoRandomString = () => {
  return isounique.uni();
};

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/smartstring.docker.js
var smartstring_docker_exports = {};
__export(smartstring_docker_exports, {
  makeEnvObject: () => makeEnvObject
});
var makeEnvObject = function(envArrayArg) {
  let returnObject = {};
  let regexString = /(.*)=(.*)/;
  if (typeof envArrayArg !== "undefined") {
    for (let envKey in envArrayArg) {
      let regexMatches = regexString.exec(envArrayArg[envKey]);
      returnObject[regexMatches[1]] = regexMatches[2];
    }
  }
  return returnObject;
};

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/smartstring.indent.js
var smartstring_indent_exports = {};
__export(smartstring_indent_exports, {
  indent: () => indent,
  indentWithPrefix: () => indentWithPrefix,
  normalize: () => normalize
});
var splitStringAtLineBreak = (stringArg) => {
  let resultArray = stringArg.split("\n");
  return cleanStringArray(resultArray);
};
var joinStringWithLineBreaks = (stringArrayArg) => {
  let resultString = "";
  for (let line of stringArrayArg) {
    resultString = resultString + line + "\n";
  }
  return resultString;
};
var cleanStringArray = (stringArrayArg) => {
  let testRegex = /^[\s]*$/;
  if (testRegex.test(stringArrayArg[0])) {
    stringArrayArg.shift();
  }
  if (testRegex.test(stringArrayArg[stringArrayArg.length - 1])) {
    stringArrayArg.pop();
  }
  return stringArrayArg;
};
var indent = (stringArg, spaceAmount) => {
  let localStringArray = splitStringAtLineBreak(stringArg);
  for (let stringArg2 of localStringArray) {
    stringArg2 = " ".repeat(spaceAmount) + stringArg2;
  }
  let resultString = joinStringWithLineBreaks(localStringArray);
  return resultString;
};
var indentWithPrefix = (stringArg, prefixArg) => {
  let resultString;
  let stringArray = splitStringAtLineBreak(stringArg);
  let resultArray = [];
  for (let stringItem of stringArray) {
    resultArray.push(prefixArg + stringItem);
  }
  resultString = joinStringWithLineBreaks(resultArray);
  return resultString;
};
var normalize = (stringArg) => {
  let resultString;
  let splitStringArray = splitStringAtLineBreak(stringArg);
  let minCommonLeftOffset;
  const deIndentRegex = /^(\s*)/;
  const emptyLineRegex = /^(\s*)$/;
  for (let stringItem of splitStringArray) {
    let offsetString = deIndentRegex.exec(stringItem)[1];
    if ((typeof minCommonLeftOffset === "undefined" || offsetString.length < minCommonLeftOffset) && !emptyLineRegex.test(stringItem)) {
      minCommonLeftOffset = offsetString.length;
    }
  }
  let resultSplitStringArray = [];
  for (let stringItem of splitStringArray) {
    resultSplitStringArray.push(stringItem.substr(minCommonLeftOffset));
  }
  resultString = joinStringWithLineBreaks(resultSplitStringArray);
  return resultString;
};

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/smartstring.normalize.js
var smartstring_normalize_exports = {};
__export(smartstring_normalize_exports, {
  replaceAll: () => replaceAll,
  standard: () => standard
});
var replaceAll = (stringArg, searchPattern, replacementString) => {
  return stringArg.replace(new RegExp(searchPattern, "g"), replacementString);
};
var standard = (stringArg, options) => {
  let result = stringArg;
  if (!options || options.stripIndent) {
    result = stripIndent(result);
  }
  if (!options || options.normalizeNewline) {
    result = result.replace(/\r\n/g, "\n");
  }
  if (!options || options.replaceTabs) {
    result = replaceAll(result, "	/", " ");
  }
  if (!options || options.stripLeadingTrailingEmptyLines) {
    result = result.replace(/^\s*[\r\n]/gm, "").replace(/\s*[\r\n]$/gm, "");
  }
  if (!options || options.stripAllEmptyLines) {
    result = result.replace(/^\s*[\r\n]/gm, "");
  }
  return result;
};

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/smartstring.type.js
var smartstring_type_exports = {};
__export(smartstring_type_exports, {
  isBase64: () => isBase64,
  isUtf8: () => isUtf8
});

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/smartstring.base64.js
var Base64 = class {
  constructor(inputStringArg, typeArg) {
    switch (typeArg) {
      case "string":
        this.refString = inputStringArg;
        break;
      case "base64":
        this.refString = base64.decode(inputStringArg);
        break;
      case "base64uri":
        this.refString = base64.decode(inputStringArg);
    }
  }
  /**
   * the simple string (unencoded)
   */
  get simpleString() {
    return this.refString;
  }
  /**
   * the base64 encoded version of the original string
   */
  get base64String() {
    return base64.encode(this.refString);
  }
  /**
   * the base64uri encoded version of the original string
   */
  get base64UriString() {
    return base64.encodeUri(this.refString);
  }
};
var base64 = {
  /**
   * encodes the string
   */
  encode: (stringArg) => {
    return gBase64.encode(stringArg);
  },
  /**
   * encodes a stringArg to base64 uri style
   */
  encodeUri: (stringArg) => {
    return gBase64.encodeURI(stringArg);
  },
  /**
   * decodes a base64 encoded string
   */
  decode: (stringArg) => {
    return gBase64.decode(stringArg);
  },
  /**
   *
   * @param stringArg
   * checks wether the string is base64 encoded
   */
  isBase64: (stringArg) => {
    const regex = /^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$/;
    return regex.test(stringArg);
  }
};

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/smartstring.type.js
var isUtf8 = (stringArg) => {
  const encoder = new TextEncoder();
  const bytes = encoder.encode(stringArg);
  let i = 0;
  while (i < bytes.length) {
    if (
      // ASCII
      bytes[i] === 9 || bytes[i] === 10 || bytes[i] === 13 || 32 <= bytes[i] && bytes[i] <= 126
    ) {
      i += 1;
      continue;
    }
    if (
      // non-overlong 2-byte
      194 <= bytes[i] && bytes[i] <= 223 && 128 <= bytes[i + 1] && bytes[i + 1] <= 191
    ) {
      i += 2;
      continue;
    }
    if (
      // excluding overlongs
      bytes[i] === 224 && 160 <= bytes[i + 1] && bytes[i + 1] <= 191 && 128 <= bytes[i + 2] && bytes[i + 2] <= 191 || // straight 3-byte
      (225 <= bytes[i] && bytes[i] <= 236 || bytes[i] === 238 || bytes[i] === 239) && 128 <= bytes[i + 1] && bytes[i + 1] <= 191 && 128 <= bytes[i + 2] && bytes[i + 2] <= 191 || // excluding surrogates
      bytes[i] === 237 && 128 <= bytes[i + 1] && bytes[i + 1] <= 159 && 128 <= bytes[i + 2] && bytes[i + 2] <= 191
    ) {
      i += 3;
      continue;
    }
    if (
      // planes 1-3
      bytes[i] === 240 && 144 <= bytes[i + 1] && bytes[i + 1] <= 191 && 128 <= bytes[i + 2] && bytes[i + 2] <= 191 && 128 <= bytes[i + 3] && bytes[i + 3] <= 191 || // planes 4-15
      241 <= bytes[i] && bytes[i] <= 243 && 128 <= bytes[i + 1] && bytes[i + 1] <= 191 && 128 <= bytes[i + 2] && bytes[i + 2] <= 191 && 128 <= bytes[i + 3] && bytes[i + 3] <= 191 || // plane 16
      bytes[i] === 244 && 128 <= bytes[i + 1] && bytes[i + 1] <= 143 && 128 <= bytes[i + 2] && bytes[i + 2] <= 191 && 128 <= bytes[i + 3] && bytes[i + 3] <= 191
    ) {
      i += 4;
      continue;
    }
    return false;
  }
  return true;
};
var isBase64 = (stringArg) => {
  const notBase64 = /[^A-Z0-9+\/=]/i;
  const len = stringArg.length;
  if (!len || len % 4 !== 0 || notBase64.test(stringArg)) {
    return false;
  }
  const firstPaddingChar = stringArg.indexOf("=");
  return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && stringArg[len - 1] === "=";
};

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/smartstring.domain.js
var Domain = class {
  constructor(domainStringArg) {
    this.protocol = this._protocolRegex(domainStringArg);
    if (!this.protocol) {
      domainStringArg = `https://${domainStringArg}`;
    }
    this.nodeParsedUrl = url.parse(domainStringArg);
    this.port = this.nodeParsedUrl.port;
    const regexMatches = this._domainRegex(domainStringArg.replace(this.nodeParsedUrl.pathname, ""));
    this.fullName = "";
    for (let i = 1; i <= 5; i++) {
      if (regexMatches[i - 1]) {
        const localMatch = regexMatches[i - 1];
        this["level" + i.toString()] = localMatch;
        if (this.fullName === "") {
          this.fullName = localMatch;
        } else {
          this.fullName = localMatch + "." + this.fullName;
        }
      } else {
        this["level" + i.toString()] = void 0;
      }
    }
    this.zoneName = this.level2 + "." + this.level1;
    this.topLevel = this.level1;
    this.domainName = this.level2;
    this.subDomain = this.level3;
  }
  // helper functions
  /** */
  _domainRegex(stringArg) {
    const regexString = /([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}$/;
    const regexMatches = regexString.exec(stringArg);
    regexMatches.reverse();
    regexMatches.pop();
    const regexMatchesFiltered = regexMatches.filter(function(stringArg2) {
      return stringArg2 !== "";
    });
    return regexMatchesFiltered;
  }
  _protocolRegex(stringArg) {
    const regexString = /^([a-zA-Z0-9]*):\/\//;
    const regexMatches = regexString.exec(stringArg);
    if (regexMatches) {
      return regexMatches[1];
    } else {
      return void 0;
    }
  }
  _portRegex(stringArg) {
    const regexString = /^([a-zA-Z0-9]*):\/\//;
    const regexMatches = regexString.exec(stringArg);
    if (regexMatches) {
      return regexMatches[1];
    } else {
      return void 0;
    }
  }
};

// node_modules/.pnpm/@push.rocks+smartstring@4.0.15/node_modules/@push.rocks/smartstring/dist_ts/smartstring.git.js
var GitRepo = class {
  constructor(stringArg, tokenArg) {
    let regexMatches = gitRegex(stringArg);
    this.host = regexMatches[1];
    this.user = regexMatches[2];
    this.repo = regexMatches[3];
    this.accessToken = tokenArg;
    this.sshUrl = gitLink(this.host, this.user, this.repo, this.accessToken, "ssh");
    this.httpsUrl = gitLink(this.host, this.user, this.repo, this.accessToken, "https");
  }
};
var gitRegex = function(stringArg) {
  const regexString = /([a-zA-Z0-9\-_\.]*)(?:\/|\:)([a-zA-Z0-9\-_\.]*)(?:\/)([a-zA-Z0-9\-_\.]*)(?:\.git)/;
  let regexMatches = regexString.exec(stringArg);
  return regexMatches;
};
var gitLink = function(hostArg, userArg, repoArg, tokenArg = "", linkTypeArg) {
  let returnString;
  if (tokenArg !== "") {
    tokenArg = tokenArg + "@";
  }
  switch (linkTypeArg) {
    case "https":
      returnString = "https://" + tokenArg + hostArg + "/" + userArg + "/" + repoArg + ".git";
      break;
    case "ssh":
      returnString = "git@" + hostArg + ":" + userArg + "/" + repoArg + ".git";
      break;
    default:
      console.error("Link Type " + linkTypeArg + " not known");
      break;
  }
  return returnString;
};

// node_modules/.pnpm/@push.rocks+smartjson@5.0.19/node_modules/@push.rocks/smartjson/dist_ts/smartjson.plugins.js
var import_lodash = __toESM(require_lodash(), 1);
var import_fast_json_stable_stringify = __toESM(require_fast_json_stable_stringify(), 1);
var stableJson = import_fast_json_stable_stringify.default;

// node_modules/.pnpm/@push.rocks+smartjson@5.0.19/node_modules/@push.rocks/smartjson/dist_ts/bufferhandling.js
function base64Encode(data) {
  return btoa(String.fromCharCode(...data));
}
function base64Decode(str) {
  return new Uint8Array(Array.from(atob(str)).map((char) => char.charCodeAt(0)));
}
function stringify(value, space) {
  return JSON.stringify(value, replacer, space);
}
function parse(text) {
  return JSON.parse(text, reviver);
}
var replacer = (key, value) => {
  if (isBufferLike2(value)) {
    let bufferData;
    if ("data" in value && isArray2(value.data)) {
      if (value.data.length > 0) {
        bufferData = new Uint8Array(value.data);
      } else {
        return "";
      }
    } else if (value instanceof Uint8Array) {
      bufferData = value;
    } else {
      return value;
    }
    const base64Data = "base64:" + base64Encode(bufferData);
    return {
      type: "EncodedBuffer",
      data: base64Data
    };
  }
  return value;
};
var reviver = (key, value) => {
  if (isEncodedBuffer(value)) {
    if (isString(value.data) && value.data.startsWith("base64:")) {
      const base64Data = value.data.slice(7);
      const buffer = base64Decode(base64Data);
      return buffer;
    }
  }
  return value;
};
function isEncodedBuffer(x) {
  return isObject(x) && x.type === "EncodedBuffer" && isString(x.data);
}
function isBufferLike2(x) {
  return isObject(x) && (x.type === "Buffer" && (isArray2(x.data) || isString(x.data))) || x instanceof Uint8Array;
}
function isArray2(x) {
  return Array.isArray(x);
}
function isString(x) {
  return typeof x === "string";
}
function isObject(x) {
  return typeof x === "object" && x !== null;
}

// node_modules/.pnpm/@push.rocks+smartjson@5.0.19/node_modules/@push.rocks/smartjson/dist_ts/index.js
var parse2 = parse;
var parseJsonL = (jsonlData) => {
  const lines = jsonlData.trim().split("\n");
  const parsedData = lines.reduce((acc, line) => {
    if (line.trim().length > 0) {
      acc.push(JSON.parse(line));
    }
    return acc;
  }, []);
  return parsedData;
};
var stringify2 = (objArg, simpleOrderArray, optionsArg = {}) => {
  const bufferedJson = stringify(objArg);
  objArg = JSON.parse(bufferedJson);
  let returnJson = stableJson(objArg, optionsArg);
  return returnJson;
};
var stringifyPretty = (objectArg) => {
  const stringified = stringify2(objectArg);
  const object = JSON.parse(stringified);
  return JSON.stringify(object, null, 2);
};
var stringifyBase64 = (...args) => {
  const stringifiedResult = stringify2(...args);
  return dist_ts_exports10.base64.encodeUri(stringifiedResult);
};
var parseBase64 = (base64JsonStringArg) => {
  const simpleStringified = dist_ts_exports10.base64.decode(base64JsonStringArg);
  return parse2(simpleStringified);
};
var Smartjson = class _Smartjson {
  /**
   * enfolds data from an object
   */
  static enfoldFromObject(objectArg) {
    const newInstance = new this();
    for (const keyName in objectArg) {
      if (newInstance.saveableProperties.indexOf(keyName) !== -1) {
        newInstance[keyName] = objectArg[keyName];
      }
    }
    return newInstance;
  }
  /**
   * enfold from json
   */
  static enfoldFromJson(jsonArg) {
    const objectFromJson = parse2(jsonArg);
    return this.enfoldFromObject(objectFromJson);
  }
  /**
   * folds a class into an object
   */
  foldToObject() {
    const newFoldedObject = {};
    const trackMap = [];
    for (const keyName of this.saveableProperties) {
      let value = this[keyName];
      if (value instanceof _Smartjson) {
        if (trackMap.includes(value)) {
          throw new Error("cycle detected");
        }
        trackMap.push(value);
        value = value.foldToObject();
      }
      newFoldedObject[keyName] = import_lodash.default(value);
    }
    return newFoldedObject;
  }
  /**
   * folds a class into an object
   */
  foldToJson() {
    const foldedObject = this.foldToObject();
    return stringify2(foldedObject);
  }
};
var foldDec = () => {
  return (target, key) => {
    if (!target.saveableProperties) {
      target.saveableProperties = [];
    }
    target.saveableProperties.push(key);
  };
};
var deepEqualObjects = (object1, object2) => {
  const object1String = stringify2(object1);
  const object2String = stringify2(object2);
  return object1String === object2String;
};
var deepEqualJsonLStrings = (jsonLString1, jsonLString2) => {
  const firstArray = [];
  jsonLString1.split("\n").forEach((line) => {
    if (line) {
      firstArray.push(parse2(line));
    }
  });
  const secondArray = [];
  jsonLString2.split("\n").forEach((line) => {
    if (line) {
      secondArray.push(parse2(line));
    }
  });
  return deepEqualObjects(firstArray, secondArray);
};

// node_modules/.pnpm/@push.rocks+webstore@2.0.19/node_modules/@push.rocks/webstore/dist_ts/index.js
var dist_ts_exports13 = {};
__export(dist_ts_exports13, {
  TypedrequestCache: () => TypedrequestCache,
  WebStore: () => WebStore
});

// node_modules/.pnpm/@tempfix+idb@8.0.3/node_modules/@tempfix/idb/build/index.js
var build_exports = {};
__export(build_exports, {
  deleteDB: () => deleteDB,
  openDB: () => openDB,
  unwrap: () => unwrap,
  wrap: () => wrap
});
var instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);
var idbProxyableTypes;
var cursorAdvanceMethods;
function getIdbProxyableTypes() {
  return idbProxyableTypes || (idbProxyableTypes = [
    IDBDatabase,
    IDBObjectStore,
    IDBIndex,
    IDBCursor,
    IDBTransaction
  ]);
}
function getCursorAdvanceMethods() {
  return cursorAdvanceMethods || (cursorAdvanceMethods = [
    IDBCursor.prototype.advance,
    IDBCursor.prototype.continue,
    IDBCursor.prototype.continuePrimaryKey
  ]);
}
var transactionDoneMap = /* @__PURE__ */ new WeakMap();
var transformCache = /* @__PURE__ */ new WeakMap();
var reverseTransformCache = /* @__PURE__ */ new WeakMap();
function promisifyRequest(request) {
  const promise = new Promise((resolve, reject) => {
    const unlisten = () => {
      request.removeEventListener("success", success);
      request.removeEventListener("error", error);
    };
    const success = () => {
      resolve(wrap(request.result));
      unlisten();
    };
    const error = () => {
      reject(request.error);
      unlisten();
    };
    request.addEventListener("success", success);
    request.addEventListener("error", error);
  });
  reverseTransformCache.set(promise, request);
  return promise;
}
function cacheDonePromiseForTransaction(tx) {
  if (transactionDoneMap.has(tx))
    return;
  const done = new Promise((resolve, reject) => {
    const unlisten = () => {
      tx.removeEventListener("complete", complete);
      tx.removeEventListener("error", error);
      tx.removeEventListener("abort", error);
    };
    const complete = () => {
      resolve();
      unlisten();
    };
    const error = () => {
      reject(tx.error || new DOMException("AbortError", "AbortError"));
      unlisten();
    };
    tx.addEventListener("complete", complete);
    tx.addEventListener("error", error);
    tx.addEventListener("abort", error);
  });
  transactionDoneMap.set(tx, done);
}
var idbProxyTraps = {
  get(target, prop, receiver) {
    if (target instanceof IDBTransaction) {
      if (prop === "done")
        return transactionDoneMap.get(target);
      if (prop === "store") {
        return receiver.objectStoreNames[1] ? void 0 : receiver.objectStore(receiver.objectStoreNames[0]);
      }
    }
    return wrap(target[prop]);
  },
  set(target, prop, value) {
    target[prop] = value;
    return true;
  },
  has(target, prop) {
    if (target instanceof IDBTransaction && (prop === "done" || prop === "store")) {
      return true;
    }
    return prop in target;
  }
};
function replaceTraps(callback) {
  idbProxyTraps = callback(idbProxyTraps);
}
function wrapFunction(func) {
  if (getCursorAdvanceMethods().includes(func)) {
    return function(...args) {
      func.apply(unwrap(this), args);
      return wrap(this.request);
    };
  }
  return function(...args) {
    return wrap(func.apply(unwrap(this), args));
  };
}
function transformCachableValue(value) {
  if (typeof value === "function")
    return wrapFunction(value);
  if (value instanceof IDBTransaction)
    cacheDonePromiseForTransaction(value);
  if (instanceOfAny(value, getIdbProxyableTypes()))
    return new Proxy(value, idbProxyTraps);
  return value;
}
function wrap(value) {
  if (value instanceof IDBRequest)
    return promisifyRequest(value);
  if (transformCache.has(value))
    return transformCache.get(value);
  const newValue = transformCachableValue(value);
  if (newValue !== value) {
    transformCache.set(value, newValue);
    reverseTransformCache.set(newValue, value);
  }
  return newValue;
}
var unwrap = (value) => reverseTransformCache.get(value);
function openDB(name, version2, { blocked, upgrade, blocking, terminated } = {}) {
  const request = indexedDB.open(name, version2);
  const openPromise = wrap(request);
  if (upgrade) {
    request.addEventListener("upgradeneeded", (event) => {
      upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);
    });
  }
  if (blocked) {
    request.addEventListener("blocked", (event) => blocked(
      // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
      event.oldVersion,
      event.newVersion,
      event
    ));
  }
  openPromise.then((db) => {
    if (terminated)
      db.addEventListener("close", () => terminated());
    if (blocking) {
      db.addEventListener("versionchange", (event) => blocking(event.oldVersion, event.newVersion, event));
    }
  }).catch(() => {
  });
  return openPromise;
}
function deleteDB(name, { blocked } = {}) {
  const request = indexedDB.deleteDatabase(name);
  if (blocked) {
    request.addEventListener("blocked", (event) => blocked(
      // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
      event.oldVersion,
      event
    ));
  }
  return wrap(request).then(() => void 0);
}
var readMethods = ["get", "getKey", "getAll", "getAllKeys", "count"];
var writeMethods = ["put", "add", "delete", "clear"];
var cachedMethods = /* @__PURE__ */ new Map();
function getMethod(target, prop) {
  if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop === "string")) {
    return;
  }
  if (cachedMethods.get(prop))
    return cachedMethods.get(prop);
  const targetFuncName = prop.replace(/FromIndex$/, "");
  const useIndex = prop !== targetFuncName;
  const isWrite = writeMethods.includes(targetFuncName);
  if (
    // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
    !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || readMethods.includes(targetFuncName))
  ) {
    return;
  }
  const method = async function(storeName, ...args) {
    const tx = this.transaction(storeName, isWrite ? "readwrite" : "readonly");
    let target2 = tx.store;
    if (useIndex)
      target2 = target2.index(args.shift());
    return (await Promise.all([
      target2[targetFuncName](...args),
      isWrite && tx.done
    ]))[0];
  };
  cachedMethods.set(prop, method);
  return method;
}
replaceTraps((oldTraps) => ({
  ...oldTraps,
  get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),
  has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop)
}));
var advanceMethodProps = ["continue", "continuePrimaryKey", "advance"];
var methodMap = {};
var advanceResults = /* @__PURE__ */ new WeakMap();
var ittrProxiedCursorToOriginalProxy = /* @__PURE__ */ new WeakMap();
var cursorIteratorTraps = {
  get(target, prop) {
    if (!advanceMethodProps.includes(prop))
      return target[prop];
    let cachedFunc = methodMap[prop];
    if (!cachedFunc) {
      cachedFunc = methodMap[prop] = function(...args) {
        advanceResults.set(this, ittrProxiedCursorToOriginalProxy.get(this)[prop](...args));
      };
    }
    return cachedFunc;
  }
};
async function* iterate(...args) {
  let cursor = this;
  if (!(cursor instanceof IDBCursor)) {
    cursor = await cursor.openCursor(...args);
  }
  if (!cursor)
    return;
  cursor = cursor;
  const proxiedCursor = new Proxy(cursor, cursorIteratorTraps);
  ittrProxiedCursorToOriginalProxy.set(proxiedCursor, cursor);
  reverseTransformCache.set(proxiedCursor, unwrap(cursor));
  while (cursor) {
    yield proxiedCursor;
    cursor = await (advanceResults.get(proxiedCursor) || cursor.continue());
    advanceResults.delete(proxiedCursor);
  }
}
function isIteratorProp(target, prop) {
  return prop === Symbol.asyncIterator && instanceOfAny(target, [IDBIndex, IDBObjectStore, IDBCursor]) || prop === "iterate" && instanceOfAny(target, [IDBIndex, IDBObjectStore]);
}
replaceTraps((oldTraps) => ({
  ...oldTraps,
  get(target, prop, receiver) {
    if (isIteratorProp(target, prop))
      return iterate;
    return oldTraps.get(target, prop, receiver);
  },
  has(target, prop) {
    return isIteratorProp(target, prop) || oldTraps.has(target, prop);
  }
}));

// node_modules/.pnpm/@push.rocks+webstore@2.0.19/node_modules/@push.rocks/webstore/dist_ts/webstore.classes.webstore.js
var WebStore = class {
  constructor(optionsArg) {
    this.initCalled = false;
    this.readyDeferred = dist_ts_exports.defer();
    this.options = optionsArg;
  }
  async init() {
    if (this.initCalled) {
      await this.readyDeferred.promise;
      return;
    }
    this.initCalled = true;
    const smartenv = new dist_ts_exports9.Smartenv();
    if (!smartenv.isBrowser && !globalThis.indexedDB) {
      console.log("hey");
      console.log(globalThis.indexedDB);
      await smartenv.getSafeNodeModule("fake-indexeddb/auto");
      if (!globalThis.indexedDB) {
        const mod = await smartenv.getSafeNodeModule("fake-indexeddb");
        globalThis.indexedDB = new mod.IDBFactory();
      }
    }
    this.db = await build_exports.openDB(this.options.dbName, 1, {
      upgrade: (db) => {
        db.createObjectStore(this.options.storeName);
      }
    });
    this.readyDeferred.resolve();
    return;
  }
  async get(key) {
    await this.init();
    return this.db.get(this.options.storeName, key);
  }
  async check(keyArg) {
    await this.init();
    const result = await this.get(keyArg);
    return !!result;
  }
  async set(key, val) {
    await this.init();
    return this.db.put(this.options.storeName, val, key);
  }
  async delete(key) {
    await this.init();
    return this.db.delete(this.options.storeName, key);
  }
  async clear() {
    await this.init();
    return this.db.clear(this.options.storeName);
  }
  async keys() {
    await this.init();
    return this.db.getAllKeys(this.options.storeName);
  }
};

// node_modules/.pnpm/@push.rocks+webstore@2.0.19/node_modules/@push.rocks/webstore/dist_ts/webstore.classes.typedrequestcache.js
var TypedrequestCache = class {
  constructor(domainArg = "default") {
    this.webstore = new WebStore({
      dbName: "trStore",
      storeName: `trStore-${domainArg}`
    });
  }
  buildKey(requestArg) {
    return dist_ts_exports11.stringify({
      method: requestArg.method,
      request: requestArg.request
    });
  }
  /**
   * stores by request
   * @param typedrequestarg
   */
  async setByRequest(typedrequestArg) {
    if (!typedrequestArg.response) {
      throw new Error("You cannot store requests without a response present");
    }
    await this.webstore.set(this.buildKey(typedrequestArg), typedrequestArg);
  }
  /**
   * get by full tyoedrequest by partial typedrequest
   * @param typedrequestarg
   */
  async getByRequest(typedrequestArg) {
    const result = await this.webstore.get(this.buildKey(typedrequestArg));
    return result;
  }
};

// node_modules/.pnpm/@push.rocks+webrequest@3.0.37/node_modules/@push.rocks/webrequest/dist_ts/index.js
var WebRequest = class {
  constructor(optionsArg = {}) {
    this.optionsArg = optionsArg;
    this.cacheStore = new dist_ts_exports13.WebStore({
      dbName: "webrequest",
      storeName: "webrequest"
    });
    this.options = {
      logging: true,
      ...optionsArg
    };
  }
  async getJson(urlArg, useCacheArg = false) {
    const response = await this.request(urlArg, {
      method: "GET",
      useCache: useCacheArg
    });
    const responseText = await response.text();
    const responseResult = dist_ts_exports11.parse(responseText);
    return responseResult;
  }
  /**
   * postJson
   */
  async postJson(urlArg, requestBody, useCacheArg = false) {
    const response = await this.request(urlArg, {
      method: "POST",
      headers: {
        "Content-Type": "application/json"
      },
      body: dist_ts_exports11.stringify(requestBody),
      useCache: useCacheArg
    });
    const responseText = await response.text();
    const responseResult = dist_ts_exports11.parse(responseText);
    return responseResult;
  }
  /**
   * put js
   */
  async putJson(urlArg, requestBody, useStoreAsFallback = false) {
    const response = await this.request(urlArg, {
      method: "PUT",
      headers: {
        "Content-Type": "application/json"
      },
      body: dist_ts_exports11.stringify(requestBody)
    });
    const responseText = await response.text();
    const responseResult = dist_ts_exports11.parse(responseText);
    return responseResult;
  }
  /**
   * put js
   */
  async deleteJson(urlArg, useStoreAsFallback = false) {
    const response = await this.request(urlArg, {
      headers: {
        "Content-Type": "application/json"
      },
      method: "GET"
    });
    const responseText = await response.text();
    const responseResult = dist_ts_exports11.parse(responseText);
    return responseResult;
  }
  async request(urlArg, optionsArg) {
    optionsArg = {
      timeoutMs: 6e4,
      useCache: false,
      ...optionsArg
    };
    let controller = new AbortController();
    dist_ts_exports2.delayFor(optionsArg.timeoutMs).then(() => {
      controller.abort();
    });
    let cachedResponseDeferred = dist_ts_exports.defer();
    let cacheUsed = false;
    if (optionsArg.useCache && await this.cacheStore.check(urlArg)) {
      const responseBuffer = await this.cacheStore.get(urlArg);
      cachedResponseDeferred.resolve(new Response(responseBuffer, {}));
    } else {
      cachedResponseDeferred.resolve(null);
    }
    let response = await fetch(urlArg, {
      signal: controller.signal,
      method: optionsArg.method,
      headers: {
        ...optionsArg.headers || {}
      },
      body: optionsArg.body
    }).catch(async (err) => {
      if (optionsArg.useCache && await cachedResponseDeferred.promise) {
        cacheUsed = true;
        const cachedResponse = cachedResponseDeferred.promise;
        return cachedResponse;
      } else {
        return err;
      }
    });
    if (optionsArg.useCache && await cachedResponseDeferred.promise && response.status === 500) {
      cacheUsed = true;
      response = await cachedResponseDeferred.promise;
    }
    if (!cacheUsed && optionsArg.useCache && response.status < 300) {
      const buffer = await response.clone().arrayBuffer();
      await this.cacheStore.set(urlArg, buffer);
    }
    this.log(`${urlArg} answers with status: ${response.status}`);
    return response;
  }
  /**
   * a multi endpoint, fault tolerant request function
   */
  async requestMultiEndpoint(urlArg, optionsArg) {
    let allUrls;
    let usedUrlIndex = 0;
    if (Array.isArray(urlArg)) {
      allUrls = urlArg;
    } else {
      allUrls = [urlArg];
    }
    const requestHistory = [];
    const doHistoryCheck = async (historyEntryTypeArg) => {
      requestHistory.push(historyEntryTypeArg);
      if (historyEntryTypeArg === "429") {
        console.log("got 429, so waiting a little bit.");
        await dist_ts_exports2.delayFor(Math.floor(Math.random() * (2e3 - 1e3 + 1)) + 1e3);
      }
      let numOfHistoryType = 0;
      for (const entry of requestHistory) {
        if (entry === historyEntryTypeArg)
          numOfHistoryType++;
      }
      if (numOfHistoryType > 2 * allUrls.length * usedUrlIndex) {
        usedUrlIndex++;
      }
    };
    const doRequest = async (urlToUse) => {
      if (!urlToUse) {
        throw new Error("request failed permanently");
      }
      this.log(`Getting ${urlToUse} with method ${optionsArg.method}`);
      const response = await fetch(urlToUse, {
        method: optionsArg.method,
        headers: {
          "Content-Type": "application/json",
          ...optionsArg.headers || {}
        },
        body: optionsArg.body
      });
      this.log(`${urlToUse} answers with status: ${response.status}`);
      if (response.status >= 200 && response.status < 300) {
        return response;
      } else {
        await doHistoryCheck(response.status.toString());
        const result = await doRequest(allUrls[usedUrlIndex]);
        return result;
      }
    };
    const finalResponse = await doRequest(allUrls[usedUrlIndex]);
    return finalResponse;
  }
  log(logArg) {
    if (this.options.logging) {
      console.log(logArg);
    }
  }
};

// ts/classes.typedresponseerror.ts
var TypedResponseError = class {
  constructor(errorTextArg, errorDataArg) {
    this.errorText = errorTextArg;
    this.errorData = errorDataArg;
  }
};

// ts/classes.typedtools.ts
var TypedTools = class {
  async passGuards(guardsArg, dataArg) {
    const guardSet = new dist_ts_exports8.GuardSet(guardsArg);
    const guardResult = await guardSet.allGuardsPass(dataArg);
    if (!guardResult) {
      const failedHint = await guardSet.getFailedHint(dataArg);
      throw new TypedResponseError(`guard failed: ${failedHint}`, { failedHint });
    }
  }
};

// ts/classes.typedhandler.ts
var TypedHandler = class {
  constructor(methodArg, handlerFunctionArg) {
    this.method = methodArg;
    this.handlerFunction = handlerFunctionArg;
  }
  /**
   * adds a response to the typedRequest
   * @param typedRequestArg
   */
  async addResponse(typedRequestArg) {
    if (typedRequestArg.method !== this.method) {
      throw new Error(
        "this handler has been given a wrong method to answer to. Please use a TypedRouter to filter requests"
      );
    }
    let typedResponseError;
    const typedtoolsInstance = new TypedTools();
    const response = await this.handlerFunction(typedRequestArg.request, typedtoolsInstance).catch((e) => {
      if (e instanceof TypedResponseError) {
        typedResponseError = e;
      } else {
        console.log(e);
      }
    });
    if (typedResponseError) {
      typedRequestArg.error = {
        text: typedResponseError.errorText,
        data: typedResponseError.errorData
      };
    }
    if (response) {
      typedRequestArg.response = response;
    }
    typedRequestArg?.correlation?.phase ? typedRequestArg.correlation.phase = "response" : null;
    return typedRequestArg;
  }
};

// ts/classes.typedrouter.ts
var TypedRouter = class {
  constructor() {
    this.routerMap = new dist_ts_exports5.ObjectMap();
    this.handlerMap = new dist_ts_exports5.ObjectMap();
    this.registeredVirtualStreams = new dist_ts_exports5.ObjectMap();
    this.fireEventInterestMap = new dist_ts_exports5.InterestMap((correlationId) => correlationId);
  }
  /**
   * adds the handler to the routing map
   * @param typedHandlerArg
   */
  addTypedHandler(typedHandlerArg) {
    const existingTypedHandler = this.getTypedHandlerForMethod(typedHandlerArg.method);
    if (existingTypedHandler) {
      throw new Error(
        `a TypedHandler for ${typedHandlerArg.method} alredy exists! Can't add another one.`
      );
    }
    this.handlerMap.add(typedHandlerArg);
  }
  /**
   * adds another sub typedRouter
   * @param typedRequest
   */
  addTypedRouter(typedRouterArg) {
    const routerExists = this.routerMap.findSync((routerArg) => routerArg === typedRouterArg);
    if (!routerExists) {
      this.routerMap.add(typedRouterArg);
      typedRouterArg.addTypedRouter(this);
    }
  }
  checkForTypedHandler(methodArg) {
    return !!this.getTypedHandlerForMethod(methodArg);
  }
  /**
   * gets a typed Router from the router chain, upstream and downstream
   * @param methodArg
   * @param checkUpstreamRouter
   */
  getTypedHandlerForMethod(methodArg, checkedRouters = []) {
    checkedRouters.push(this);
    let typedHandler;
    typedHandler = this.handlerMap.findSync((handler) => {
      return handler.method === methodArg;
    });
    if (!typedHandler) {
      this.routerMap.getArray().forEach((typedRouterArg) => {
        if (!typedHandler && !checkedRouters.includes(typedRouterArg)) {
          typedHandler = typedRouterArg.getTypedHandlerForMethod(methodArg, checkedRouters);
        }
      });
    }
    return typedHandler;
  }
  /**
   * if typedrequest object has correlation.phase === 'request' -> routes a typed request object to a handler
   * if typedrequest object has correlation.phase === 'response' -> routes a typed request object to request fire event
   * @param typedRequestArg
   */
  async routeAndAddResponse(typedRequestArg, localRequestArg = false) {
    typedRequestArg = VirtualStream.decodePayloadFromNetwork(typedRequestArg, {
      typedrouter: this
    });
    typedRequestArg.localData = typedRequestArg.localData || {};
    typedRequestArg.localData.firstTypedrouter = this;
    if (typedRequestArg.method === "##VirtualStream##") {
      const result = await this.handleStreamTypedRequest(typedRequestArg);
      result.localData = null;
      return result;
    }
    if (typedRequestArg?.correlation?.phase === "request" || localRequestArg) {
      const typedHandler = this.getTypedHandlerForMethod(typedRequestArg.method);
      if (!typedHandler) {
        console.log(`Cannot find handler for methodname ${typedRequestArg.method}`);
        typedRequestArg.error = {
          text: "There is no available method for this call on the server side",
          data: {}
        };
        typedRequestArg.correlation.phase = "response";
        typedRequestArg.localData = null;
        typedRequestArg = VirtualStream.encodePayloadForNetwork(typedRequestArg, {
          typedrouter: this
        });
        return typedRequestArg;
      }
      typedRequestArg = await typedHandler.addResponse(typedRequestArg);
      typedRequestArg.localData = null;
      typedRequestArg = VirtualStream.encodePayloadForNetwork(typedRequestArg, {
        typedrouter: this
      });
      return typedRequestArg;
    } else if (typedRequestArg?.correlation?.phase === "response") {
      this.fireEventInterestMap.findInterest(typedRequestArg.correlation.id)?.fullfillInterest(typedRequestArg);
      return null;
    } else {
      console.log("received weirdly shaped request");
      console.log(typedRequestArg);
      return null;
    }
  }
  /**
   * handle streaming
   * @param streamTrArg 
   */
  async handleStreamTypedRequest(streamTrArg) {
    const relevantVirtualStream = await this.registeredVirtualStreams.find(async (virtualStreamArg) => {
      return virtualStreamArg.streamId === streamTrArg.request.streamId;
    });
    if (!relevantVirtualStream) {
      console.log(`no relevant virtual stream found for stream with id ${streamTrArg.request.streamId}`);
      console.log(this.registeredVirtualStreams.getArray());
      return streamTrArg;
    } else {
      console.log(`success: found relevant virtual stream with id ${streamTrArg.request.streamId}`);
    }
    const result = await relevantVirtualStream.handleStreamTr(streamTrArg);
    return result;
  }
};

// ts/classes.virtualstream.ts
var closingBit = "#############CLOSING BIT#############";
var VirtualStream = class _VirtualStream {
  constructor() {
    this.streamId = isounique2.uni();
    // wether to keep the stream alive
    this.keepAlive = true;
    // backpressured arrays
    this.sendBackpressuredArray = new dist_ts_exports5.BackpressuredArray(
      16
    );
    this.receiveBackpressuredArray = new dist_ts_exports5.BackpressuredArray(
      16
    );
  }
  // STATIC
  static encodePayloadForNetwork(objectPayload, commFunctions, originalPayload, path = []) {
    if (!objectPayload) {
      return objectPayload;
    }
    if (dist_ts_exports7.isBufferLike(objectPayload)) {
      return objectPayload;
    }
    if (objectPayload instanceof _VirtualStream) {
      if (!objectPayload.side && commFunctions.sendMethod) {
        objectPayload.side = "requesting";
        objectPayload.sendMethod = commFunctions.sendMethod;
      }
      if (!objectPayload.side && commFunctions.typedrouter) {
        objectPayload.side = "responding";
        objectPayload.typedrouter = commFunctions.typedrouter;
        commFunctions.typedrouter.registeredVirtualStreams.add(objectPayload);
      }
      if (!originalPayload.response || path.includes("response")) {
        objectPayload.startKeepAliveLoop();
        return {
          _isVirtualStream: true,
          streamId: objectPayload.streamId
        };
      } else {
        return {
          _OBMITTED_VIRTUAL_STREAM: true,
          reason: "path is under .request: obmitted for deduplication reasons in response cycle."
        };
      }
    } else if (Array.isArray(objectPayload)) {
      return objectPayload.map(
        (item, index) => _VirtualStream.encodePayloadForNetwork(
          item,
          commFunctions,
          originalPayload || objectPayload,
          path.concat(String(index))
          // Convert index to string and concatenate to path
        )
      );
    } else if (objectPayload !== null && typeof objectPayload === "object") {
      return Object.entries(objectPayload).reduce((acc, [key, value]) => {
        const newPath = path.concat(key);
        acc[key] = _VirtualStream.encodePayloadForNetwork(
          value,
          commFunctions,
          originalPayload || objectPayload,
          newPath
        );
        return acc;
      }, {});
    } else {
      return objectPayload;
    }
  }
  static decodePayloadFromNetwork(objectPayload, commFunctions) {
    if (dist_ts_exports7.isBufferLike(objectPayload) || objectPayload instanceof TypedRouter) {
      return objectPayload;
    }
    if (objectPayload !== null && typeof objectPayload === "object") {
      if (objectPayload._isVirtualStream) {
        const virtualStream = new _VirtualStream();
        virtualStream.streamId = objectPayload.streamId;
        if (!virtualStream.side && commFunctions.sendMethod) {
          virtualStream.side = "requesting";
          virtualStream.sendMethod = commFunctions.sendMethod;
        }
        if (!virtualStream.side && commFunctions.typedrouter) {
          virtualStream.side = "responding";
          virtualStream.typedrouter = commFunctions.typedrouter;
          commFunctions.typedrouter.registeredVirtualStreams.add(virtualStream);
        }
        virtualStream.startKeepAliveLoop();
        return virtualStream;
      } else if (Array.isArray(objectPayload)) {
        const returnArray = [];
        for (const item of objectPayload) {
          returnArray.push(_VirtualStream.decodePayloadFromNetwork(item, commFunctions));
        }
        return returnArray;
      } else {
        return Object.keys(objectPayload).reduce((acc, key) => {
          acc[key] = _VirtualStream.decodePayloadFromNetwork(objectPayload[key], commFunctions);
          return acc;
        }, {});
      }
    } else {
      return objectPayload;
    }
  }
  /**
   * takes care of sending 
   */
  async workOnQueue() {
    if (this.workingDeferred) {
      return this.workingDeferred.promise;
    } else {
      this.workingDeferred = dist_ts_exports.defer();
    }
    if (this.side === "requesting") {
      let thisSideIsBackpressured = !this.receiveBackpressuredArray.checkSpaceAvailable();
      let otherSideHasNext = false;
      let otherSideIsBackpressured = false;
      const getFeedback = async () => {
        const streamTr = await this.sendMethod({
          method: "##VirtualStream##",
          request: {
            streamId: this.streamId,
            cycleId: isounique2.uni(),
            cycle: "request",
            mainPurpose: "feedback",
            next: this.sendBackpressuredArray.data.length > 0,
            backpressure: !this.receiveBackpressuredArray.checkSpaceAvailable()
          },
          response: null
        }).catch(() => {
          console.log("stream ended immaturely");
          this.keepAlive = false;
        });
        if (streamTr && streamTr.response) {
          otherSideIsBackpressured = streamTr.response.backpressure;
          otherSideHasNext = streamTr.response.next;
        }
      };
      await getFeedback();
      while (this.sendBackpressuredArray.data.length > 0 || otherSideHasNext) {
        if (otherSideIsBackpressured) {
          while (otherSideIsBackpressured) {
            console.log("waiting for feedback because of backpressure...");
            await dist_ts_exports2.delayFor(50);
            await getFeedback();
          }
        }
        let dataArg;
        if (this.sendBackpressuredArray.data.length > 0) {
          dataArg = this.sendBackpressuredArray.shift();
        }
        let streamTr;
        streamTr = await this.sendMethod({
          method: "##VirtualStream##",
          request: {
            streamId: this.streamId,
            cycleId: isounique2.uni(),
            cycle: "request",
            mainPurpose: dataArg ? "chunk" : "read",
            backpressure: thisSideIsBackpressured,
            next: this.sendBackpressuredArray.data.length > 0,
            ...dataArg ? { chunkData: dataArg } : {}
          },
          response: null
        }).catch(() => {
          console.log("stream ended immaturely");
          this.keepAlive = false;
          return null;
        });
        if (streamTr && streamTr.response && streamTr.response.chunkData) {
          this.receiveBackpressuredArray.push(streamTr.response.chunkData);
        }
        otherSideIsBackpressured = streamTr && streamTr.response && streamTr.response.backpressure;
        thisSideIsBackpressured = !this.receiveBackpressuredArray.checkSpaceAvailable();
        otherSideHasNext = streamTr && streamTr.response && streamTr.response.next;
      }
    }
    this.workingDeferred.resolve();
    this.workingDeferred = null;
  }
  /**
   * This method handles the stream only on the responding side
   * @param streamTrArg
   * @returns
   */
  async handleStreamTr(streamTrArg) {
    if (streamTrArg.request.keepAlive === true && this.keepAlive === true) {
      this.lastKeepAliveEvent = Date.now();
    } else if (streamTrArg.request.keepAlive === false) {
      this.keepAlive = false;
    }
    if (streamTrArg.request.mainPurpose === "keepAlive") {
      streamTrArg.response = {
        streamId: this.streamId,
        cycleId: streamTrArg.request.cycleId,
        cycle: "response",
        mainPurpose: "keepAlive",
        keepAlive: this.keepAlive,
        next: this.sendBackpressuredArray.data.length > 0,
        backpressure: !this.receiveBackpressuredArray.checkSpaceAvailable()
      };
    }
    if (streamTrArg.request.mainPurpose === "feedback") {
      streamTrArg.response = {
        streamId: this.streamId,
        cycleId: streamTrArg.request.cycleId,
        cycle: "response",
        mainPurpose: "feedback",
        next: this.sendBackpressuredArray.data.length > 0,
        backpressure: !this.receiveBackpressuredArray.checkSpaceAvailable()
      };
    }
    if (streamTrArg.request.mainPurpose === "chunk") {
      this.receiveBackpressuredArray.push(streamTrArg.request.chunkData);
      if (this.sendBackpressuredArray.data.length > 0 && streamTrArg.response.backpressure === false) {
        const dataArg = this.sendBackpressuredArray.shift();
        streamTrArg.response = {
          streamId: this.streamId,
          cycleId: streamTrArg.request.cycleId,
          cycle: "response",
          mainPurpose: "chunk",
          next: this.sendBackpressuredArray.data.length > 1,
          // 1 and not 0 because we call shift a few lines down
          backpressure: !this.receiveBackpressuredArray.checkSpaceAvailable(),
          chunkData: this.sendBackpressuredArray.shift()
        };
      } else {
        streamTrArg.response = {
          streamId: this.streamId,
          cycleId: streamTrArg.request.cycleId,
          cycle: "response",
          mainPurpose: "feedback",
          next: this.sendBackpressuredArray.data.length > 0,
          backpressure: !this.receiveBackpressuredArray.checkSpaceAvailable()
        };
      }
      streamTrArg.request = null;
    }
    return streamTrArg;
  }
  // lifecycle methods
  /**
   * closes the virtual stream
   */
  async cleanup() {
    if (this.typedrouter) {
      this.typedrouter.registeredVirtualStreams.remove(this);
    }
  }
  /**
   * a keepAlive loop that works across technologies
   */
  async startKeepAliveLoop() {
    if (this.side === "responding") {
      return;
    }
    await dist_ts_exports2.delayFor(0);
    console.log(`starting keepalive loop on side ${this.side}`);
    let counter = 0;
    keepAliveLoop:
      while (this.keepAlive) {
        await this.triggerKeepAlive();
        await dist_ts_exports2.delayFor(1e3);
      }
    await dist_ts_exports2.delayFor(1e3);
    await this.cleanup();
    console.log(`cleaned up for stream ${this.streamId}`);
  }
  async triggerKeepAlive() {
    if (this.side === "requesting") {
      console.log(`keepalive sent.`);
      const streamTr = await this.sendMethod({
        method: "##VirtualStream##",
        request: {
          streamId: this.streamId,
          cycleId: isounique2.uni(),
          cycle: "request",
          mainPurpose: "keepAlive",
          keepAlive: this.keepAlive
        },
        response: null
      }).catch(() => {
        this.keepAlive = false;
      });
      if (streamTr && streamTr.response && streamTr.response.keepAlive === false) {
        this.keepAlive = false;
      } else {
        this.lastKeepAliveEvent = Date.now();
      }
      if (streamTr && streamTr.response && streamTr.response.next) {
        this.workOnQueue();
      }
    }
    if (Date.now() - this.lastKeepAliveEvent > 1e4) {
      console.log(`closing stream for ${this.streamId}`);
      this.keepAlive = false;
    }
  }
  // Data sending and receiving
  async sendData(dataArg) {
    this.sendBackpressuredArray.push(dataArg);
    this.workOnQueue();
    await this.sendBackpressuredArray.waitForSpace();
  }
  async fetchData() {
    if (this.receiveBackpressuredArray.hasSpace) {
    }
    await this.receiveBackpressuredArray.waitForItems();
    const dataPackage = this.receiveBackpressuredArray.shift();
    return dataPackage;
  }
  /**
   * reads from a Readable and sends it to the other side
   * @param readableStreamArg
   */
  async readFromWebstream(readableStreamArg, closeAfterReading = true) {
    const reader = readableStreamArg.getReader();
    let streamIsDone = false;
    while (!streamIsDone) {
      const { value, done } = await reader.read();
      if (value) {
        await this.sendData(value);
      }
      streamIsDone = done;
    }
    if (closeAfterReading) {
      await this.close(true);
    }
  }
  async writeToWebstream(writableStreamArg) {
    const writer = writableStreamArg.getWriter();
    while (this.keepAlive || this.receiveBackpressuredArray.checkHasItems()) {
      const value = await this.fetchData();
      if (value === closingBit) {
        writer.releaseLock();
        await writableStreamArg.close();
        break;
      }
      await writer.write(value);
    }
  }
  /**
   * closes the stream
   * if sendClosingBitArg is true, the stream will send a closing bit
   * @param sendClosingBitArg 
   */
  async close(sendClosingBitArg = false) {
    if (sendClosingBitArg) {
      this.sendData(closingBit);
    }
    this.keepAlive = false;
  }
};

// ts/classes.typedtarget.ts
var TypedTarget = class {
  constructor(optionsArg) {
    if (optionsArg.postMethodWithTypedRouter && !optionsArg.typedRouterRef) {
      throw new Error("you have to specify a typedrouter when using postmethod with typedrouter");
    }
    this.options = optionsArg;
  }
  async post(payloadArg) {
    let responseInterest;
    if (this.options.typedRouterRef) {
      responseInterest = await this.options.typedRouterRef.fireEventInterestMap.addInterest(
        payloadArg.correlation.id,
        payloadArg
      );
    }
    const postMethod = this.options.postMethod || this.options.postMethodWithTypedRouter;
    const postMethodReturnValue = await postMethod(payloadArg);
    let responseBody;
    if (responseInterest) {
      responseBody = await responseInterest.interestFullfilled;
    } else if (postMethodReturnValue) {
      responseBody = postMethodReturnValue;
    } else {
      responseBody = payloadArg;
    }
    return responseBody;
  }
};

// ts/classes.typedrequest.ts
var webrequestInstance = new dist_ts_exports14.WebRequest();
var TypedRequest2 = class {
  /**
   * @param postEndPointArg
   * @param methodArg
   */
  constructor(postTarget, methodArg) {
    if (typeof postTarget === "string") {
      this.urlEndPoint = postTarget;
    } else {
      this.typedTarget = postTarget;
    }
    this.method = methodArg;
  }
  /**
   * fires the request
   */
  async fire(fireArg, useCacheArg = false) {
    let payloadSending = {
      method: this.method,
      request: fireArg,
      response: null,
      correlation: {
        id: isounique2.uni(),
        phase: "request"
      }
    };
    payloadSending = VirtualStream.encodePayloadForNetwork(payloadSending, {
      sendMethod: (payloadArg) => {
        return this.postTrObject(payloadArg);
      }
    });
    let payloadReceiving;
    payloadReceiving = await this.postTrObject(payloadSending, useCacheArg);
    payloadReceiving = VirtualStream.decodePayloadFromNetwork(payloadReceiving, {
      sendMethod: (payloadArg) => {
        return this.postTrObject(payloadArg);
      }
    });
    return payloadReceiving.response;
  }
  async postTrObject(payloadSendingArg, useCacheArg = false) {
    let payloadReceiving;
    if (this.urlEndPoint) {
      const response = await webrequestInstance.postJson(
        this.urlEndPoint,
        payloadSendingArg,
        useCacheArg
      );
      payloadReceiving = response;
    } else {
      payloadReceiving = await this.typedTarget.post(payloadSendingArg);
    }
    if (payloadReceiving.error) {
      console.error(
        `method: >>${this.method}<< got an ERROR: "${payloadReceiving.error.text}" with data ${JSON.stringify(
          payloadReceiving.error.data,
          null,
          2
        )}`
      );
      if (!payloadReceiving.retry) {
        throw new TypedResponseError(payloadReceiving.error.text, payloadReceiving.error.data);
      }
      return null;
    }
    if (payloadReceiving.retry) {
      console.log(
        `server requested retry for the following reason: ${payloadReceiving.retry.reason}`
      );
      await dist_ts_exports2.delayFor(payloadReceiving.retry.waitForMs);
      payloadReceiving = await this.postTrObject(payloadSendingArg, useCacheArg);
    }
    return payloadReceiving;
  }
};
export {
  TypedHandler,
  TypedRequest2 as TypedRequest,
  TypedResponseError,
  TypedRouter,
  TypedTarget,
  VirtualStream
};
/*! Bundled license information:

punycode/punycode.js:
  (*! https://mths.be/punycode v1.4.1 by @mathias *)

is-number/index.js:
  (*!
   * is-number <https://github.com/jonschlinkert/is-number>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)

randomatic/index.js:
  (*!
   * randomatic <https://github.com/jonschlinkert/randomatic>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
//# sourceMappingURL=bundle.js.map