#!/usr/bin/env node
import { a as wr, c as Br, i as k, l as oe, o as Or, s as M } from "./chunks/p-map-DaKUJ_MH.js";
import Sr, { a as xr, c as vt, d as Tr, f as ge, i as _t, l as Rr, n as $r, o as Pr, r as Ue, s as Nr, t as Ir, u as ne } from "./index.js";
import Pe from "path";
import kr from "os";
import P, { env as ve } from "node:process";
import xe from "node:os";
import U from "node:path";
import { fileURLToPath as Zt } from "node:url";
import { format as Ge, promisify as X } from "node:util";
import j from "node:fs";
import { spawn as jr } from "node:child_process";
var Ne = /* @__PURE__ */ k(((e) => {
  var r = class extends Error {
    constructor(l, i, s) {
      super(s), Error.captureStackTrace(this, this.constructor), this.name = this.constructor.name, this.code = i, this.exitCode = l, this.nestedError = void 0;
    }
  }, n = class extends r {
    constructor(l) {
      super(1, "commander.invalidArgument", l), Error.captureStackTrace(this, this.constructor), this.name = this.constructor.name;
    }
  };
  e.CommanderError = r, e.InvalidArgumentError = n;
})), ft = /* @__PURE__ */ k(((e) => {
  var { InvalidArgumentError: r } = Ne(), n = class {
    constructor(i, s) {
      switch (this.description = s || "", this.variadic = !1, this.parseArg = void 0, this.defaultValue = void 0, this.defaultValueDescription = void 0, this.argChoices = void 0, i[0]) {
        case "<":
          this.required = !0, this._name = i.slice(1, -1);
          break;
        case "[":
          this.required = !1, this._name = i.slice(1, -1);
          break;
        default:
          this.required = !0, this._name = i;
          break;
      }
      this._name.endsWith("...") && (this.variadic = !0, this._name = this._name.slice(0, -3));
    }
    name() {
      return this._name;
    }
    _collectValue(i, s) {
      return s === this.defaultValue || !Array.isArray(s) ? [i] : (s.push(i), s);
    }
    default(i, s) {
      return this.defaultValue = i, this.defaultValueDescription = s, this;
    }
    argParser(i) {
      return this.parseArg = i, this;
    }
    choices(i) {
      return this.argChoices = i.slice(), this.parseArg = (s, D) => {
        if (!this.argChoices.includes(s)) throw new r(`Allowed choices are ${this.argChoices.join(", ")}.`);
        return this.variadic ? this._collectValue(s, D) : s;
      }, this;
    }
    argRequired() {
      return this.required = !0, this;
    }
    argOptional() {
      return this.required = !1, this;
    }
  };
  function l(i) {
    const s = i.name() + (i.variadic === !0 ? "..." : "");
    return i.required ? "<" + s + ">" : "[" + s + "]";
  }
  e.Argument = n, e.humanReadableArgName = l;
})), er = /* @__PURE__ */ k(((e) => {
  var { humanReadableArgName: r } = ft(), n = class {
    constructor() {
      this.helpWidth = void 0, this.minWidthToWrap = 40, this.sortSubcommands = !1, this.sortOptions = !1, this.showGlobalOptions = !1;
    }
    prepareContext(i) {
      this.helpWidth = this.helpWidth ?? i.helpWidth ?? 80;
    }
    visibleCommands(i) {
      const s = i.commands.filter((o) => !o._hidden), D = i._getHelpCommand();
      return D && !D._hidden && s.push(D), this.sortSubcommands && s.sort((o, u) => o.name().localeCompare(u.name())), s;
    }
    compareOptions(i, s) {
      const D = (o) => o.short ? o.short.replace(/^-/, "") : o.long.replace(/^--/, "");
      return D(i).localeCompare(D(s));
    }
    visibleOptions(i) {
      const s = i.options.filter((o) => !o.hidden), D = i._getHelpOption();
      if (D && !D.hidden) {
        const o = D.short && i._findOption(D.short), u = D.long && i._findOption(D.long);
        !o && !u ? s.push(D) : D.long && !u ? s.push(i.createOption(D.long, D.description)) : D.short && !o && s.push(i.createOption(D.short, D.description));
      }
      return this.sortOptions && s.sort(this.compareOptions), s;
    }
    visibleGlobalOptions(i) {
      if (!this.showGlobalOptions) return [];
      const s = [];
      for (let D = i.parent; D; D = D.parent) {
        const o = D.options.filter((u) => !u.hidden);
        s.push(...o);
      }
      return this.sortOptions && s.sort(this.compareOptions), s;
    }
    visibleArguments(i) {
      return i._argsDescription && i.registeredArguments.forEach((s) => {
        s.description = s.description || i._argsDescription[s.name()] || "";
      }), i.registeredArguments.find((s) => s.description) ? i.registeredArguments : [];
    }
    subcommandTerm(i) {
      const s = i.registeredArguments.map((D) => r(D)).join(" ");
      return i._name + (i._aliases[0] ? "|" + i._aliases[0] : "") + (i.options.length ? " [options]" : "") + (s ? " " + s : "");
    }
    optionTerm(i) {
      return i.flags;
    }
    argumentTerm(i) {
      return i.name();
    }
    longestSubcommandTermLength(i, s) {
      return s.visibleCommands(i).reduce((D, o) => Math.max(D, this.displayWidth(s.styleSubcommandTerm(s.subcommandTerm(o)))), 0);
    }
    longestOptionTermLength(i, s) {
      return s.visibleOptions(i).reduce((D, o) => Math.max(D, this.displayWidth(s.styleOptionTerm(s.optionTerm(o)))), 0);
    }
    longestGlobalOptionTermLength(i, s) {
      return s.visibleGlobalOptions(i).reduce((D, o) => Math.max(D, this.displayWidth(s.styleOptionTerm(s.optionTerm(o)))), 0);
    }
    longestArgumentTermLength(i, s) {
      return s.visibleArguments(i).reduce((D, o) => Math.max(D, this.displayWidth(s.styleArgumentTerm(s.argumentTerm(o)))), 0);
    }
    commandUsage(i) {
      let s = i._name;
      i._aliases[0] && (s = s + "|" + i._aliases[0]);
      let D = "";
      for (let o = i.parent; o; o = o.parent) D = o.name() + " " + D;
      return D + s + " " + i.usage();
    }
    commandDescription(i) {
      return i.description();
    }
    subcommandDescription(i) {
      return i.summary() || i.description();
    }
    optionDescription(i) {
      const s = [];
      if (i.argChoices && s.push(`choices: ${i.argChoices.map((D) => JSON.stringify(D)).join(", ")}`), i.defaultValue !== void 0 && (i.required || i.optional || i.isBoolean() && typeof i.defaultValue == "boolean") && s.push(`default: ${i.defaultValueDescription || JSON.stringify(i.defaultValue)}`), i.presetArg !== void 0 && i.optional && s.push(`preset: ${JSON.stringify(i.presetArg)}`), i.envVar !== void 0 && s.push(`env: ${i.envVar}`), s.length > 0) {
        const D = `(${s.join(", ")})`;
        return i.description ? `${i.description} ${D}` : D;
      }
      return i.description;
    }
    argumentDescription(i) {
      const s = [];
      if (i.argChoices && s.push(`choices: ${i.argChoices.map((D) => JSON.stringify(D)).join(", ")}`), i.defaultValue !== void 0 && s.push(`default: ${i.defaultValueDescription || JSON.stringify(i.defaultValue)}`), s.length > 0) {
        const D = `(${s.join(", ")})`;
        return i.description ? `${i.description} ${D}` : D;
      }
      return i.description;
    }
    formatItemList(i, s, D) {
      return s.length === 0 ? [] : [
        D.styleTitle(i),
        ...s,
        ""
      ];
    }
    groupItems(i, s, D) {
      const o = /* @__PURE__ */ new Map();
      return i.forEach((u) => {
        const c = D(u);
        o.has(c) || o.set(c, []);
      }), s.forEach((u) => {
        const c = D(u);
        o.has(c) || o.set(c, []), o.get(c).push(u);
      }), o;
    }
    formatHelp(i, s) {
      const D = s.padWidth(i, s), o = s.helpWidth ?? 80;
      function u(m, g) {
        return s.formatItem(m, D, g, s);
      }
      let c = [`${s.styleTitle("Usage:")} ${s.styleUsage(s.commandUsage(i))}`, ""];
      const F = s.commandDescription(i);
      F.length > 0 && (c = c.concat([s.boxWrap(s.styleCommandDescription(F), o), ""]));
      const h = s.visibleArguments(i).map((m) => u(s.styleArgumentTerm(s.argumentTerm(m)), s.styleArgumentDescription(s.argumentDescription(m))));
      if (c = c.concat(this.formatItemList("Arguments:", h, s)), this.groupItems(i.options, s.visibleOptions(i), (m) => m.helpGroupHeading ?? "Options:").forEach((m, g) => {
        const E = m.map((v) => u(s.styleOptionTerm(s.optionTerm(v)), s.styleOptionDescription(s.optionDescription(v))));
        c = c.concat(this.formatItemList(g, E, s));
      }), s.showGlobalOptions) {
        const m = s.visibleGlobalOptions(i).map((g) => u(s.styleOptionTerm(s.optionTerm(g)), s.styleOptionDescription(s.optionDescription(g))));
        c = c.concat(this.formatItemList("Global Options:", m, s));
      }
      return this.groupItems(i.commands, s.visibleCommands(i), (m) => m.helpGroup() || "Commands:").forEach((m, g) => {
        const E = m.map((v) => u(s.styleSubcommandTerm(s.subcommandTerm(v)), s.styleSubcommandDescription(s.subcommandDescription(v))));
        c = c.concat(this.formatItemList(g, E, s));
      }), c.join(`
`);
    }
    displayWidth(i) {
      return l(i).length;
    }
    styleTitle(i) {
      return i;
    }
    styleUsage(i) {
      return i.split(" ").map((s) => s === "[options]" ? this.styleOptionText(s) : s === "[command]" ? this.styleSubcommandText(s) : s[0] === "[" || s[0] === "<" ? this.styleArgumentText(s) : this.styleCommandText(s)).join(" ");
    }
    styleCommandDescription(i) {
      return this.styleDescriptionText(i);
    }
    styleOptionDescription(i) {
      return this.styleDescriptionText(i);
    }
    styleSubcommandDescription(i) {
      return this.styleDescriptionText(i);
    }
    styleArgumentDescription(i) {
      return this.styleDescriptionText(i);
    }
    styleDescriptionText(i) {
      return i;
    }
    styleOptionTerm(i) {
      return this.styleOptionText(i);
    }
    styleSubcommandTerm(i) {
      return i.split(" ").map((s) => s === "[options]" ? this.styleOptionText(s) : s[0] === "[" || s[0] === "<" ? this.styleArgumentText(s) : this.styleSubcommandText(s)).join(" ");
    }
    styleArgumentTerm(i) {
      return this.styleArgumentText(i);
    }
    styleOptionText(i) {
      return i;
    }
    styleArgumentText(i) {
      return i;
    }
    styleSubcommandText(i) {
      return i;
    }
    styleCommandText(i) {
      return i;
    }
    padWidth(i, s) {
      return Math.max(s.longestOptionTermLength(i, s), s.longestGlobalOptionTermLength(i, s), s.longestSubcommandTermLength(i, s), s.longestArgumentTermLength(i, s));
    }
    preformatted(i) {
      return /\n[^\S\r\n]/.test(i);
    }
    formatItem(i, s, D, o) {
      const c = " ".repeat(2);
      if (!D) return c + i;
      const F = i.padEnd(s + i.length - o.displayWidth(i)), h = 2, m = (this.helpWidth ?? 80) - s - h - 2;
      let g;
      return m < this.minWidthToWrap || o.preformatted(D) ? g = D : g = o.boxWrap(D, m).replace(/\n/g, `
` + " ".repeat(s + h)), c + F + " ".repeat(h) + g.replace(/\n/g, `
${c}`);
    }
    boxWrap(i, s) {
      if (s < this.minWidthToWrap) return i;
      const D = i.split(/\r\n|\n/), o = /[\s]*[^\s]+/g, u = [];
      return D.forEach((c) => {
        const F = c.match(o);
        if (F === null) {
          u.push("");
          return;
        }
        let h = [F.shift()], m = this.displayWidth(h[0]);
        F.forEach((g) => {
          const E = this.displayWidth(g);
          if (m + E <= s) {
            h.push(g), m += E;
            return;
          }
          u.push(h.join(""));
          const v = g.trimStart();
          h = [v], m = this.displayWidth(v);
        }), u.push(h.join(""));
      }), u.join(`
`);
    }
  };
  function l(i) {
    return i.replace(/\x1b\[\d*(;\d*)*m/g, "");
  }
  e.Help = n, e.stripColor = l;
})), tr = /* @__PURE__ */ k(((e) => {
  var { InvalidArgumentError: r } = Ne(), n = class {
    constructor(D, o) {
      this.flags = D, this.description = o || "", this.required = D.includes("<"), this.optional = D.includes("["), this.variadic = /\w\.\.\.[>\]]$/.test(D), this.mandatory = !1;
      const u = s(D);
      this.short = u.shortFlag, this.long = u.longFlag, this.negate = !1, this.long && (this.negate = this.long.startsWith("--no-")), this.defaultValue = void 0, this.defaultValueDescription = void 0, this.presetArg = void 0, this.envVar = void 0, this.parseArg = void 0, this.hidden = !1, this.argChoices = void 0, this.conflictsWith = [], this.implied = void 0, this.helpGroupHeading = void 0;
    }
    default(D, o) {
      return this.defaultValue = D, this.defaultValueDescription = o, this;
    }
    preset(D) {
      return this.presetArg = D, this;
    }
    conflicts(D) {
      return this.conflictsWith = this.conflictsWith.concat(D), this;
    }
    implies(D) {
      let o = D;
      return typeof D == "string" && (o = { [D]: !0 }), this.implied = Object.assign(this.implied || {}, o), this;
    }
    env(D) {
      return this.envVar = D, this;
    }
    argParser(D) {
      return this.parseArg = D, this;
    }
    makeOptionMandatory(D = !0) {
      return this.mandatory = !!D, this;
    }
    hideHelp(D = !0) {
      return this.hidden = !!D, this;
    }
    _collectValue(D, o) {
      return o === this.defaultValue || !Array.isArray(o) ? [D] : (o.push(D), o);
    }
    choices(D) {
      return this.argChoices = D.slice(), this.parseArg = (o, u) => {
        if (!this.argChoices.includes(o)) throw new r(`Allowed choices are ${this.argChoices.join(", ")}.`);
        return this.variadic ? this._collectValue(o, u) : o;
      }, this;
    }
    name() {
      return this.long ? this.long.replace(/^--/, "") : this.short.replace(/^-/, "");
    }
    attributeName() {
      return this.negate ? i(this.name().replace(/^no-/, "")) : i(this.name());
    }
    helpGroup(D) {
      return this.helpGroupHeading = D, this;
    }
    is(D) {
      return this.short === D || this.long === D;
    }
    isBoolean() {
      return !this.required && !this.optional && !this.negate;
    }
  }, l = class {
    constructor(D) {
      this.positiveOptions = /* @__PURE__ */ new Map(), this.negativeOptions = /* @__PURE__ */ new Map(), this.dualOptions = /* @__PURE__ */ new Set(), D.forEach((o) => {
        o.negate ? this.negativeOptions.set(o.attributeName(), o) : this.positiveOptions.set(o.attributeName(), o);
      }), this.negativeOptions.forEach((o, u) => {
        this.positiveOptions.has(u) && this.dualOptions.add(u);
      });
    }
    valueFromOption(D, o) {
      const u = o.attributeName();
      if (!this.dualOptions.has(u)) return !0;
      const c = this.negativeOptions.get(u).presetArg, F = c !== void 0 ? c : !1;
      return o.negate === (F === D);
    }
  };
  function i(D) {
    return D.split("-").reduce((o, u) => o + u[0].toUpperCase() + u.slice(1));
  }
  function s(D) {
    let o, u;
    const c = /^-[^-]$/, F = /^--[^-]/, h = D.split(/[ |,]+/).concat("guard");
    if (c.test(h[0]) && (o = h.shift()), F.test(h[0]) && (u = h.shift()), !o && c.test(h[0]) && (o = h.shift()), !o && F.test(h[0]) && (o = u, u = h.shift()), h[0].startsWith("-")) {
      const m = h[0], g = `option creation failed due to '${m}' in option flags '${D}'`;
      throw /^-[^-][^-]/.test(m) ? new Error(`${g}
- a short flag is a single dash and a single character
  - either use a single dash and a single character (for a short flag)
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`) : c.test(m) ? new Error(`${g}
- too many short flags`) : F.test(m) ? new Error(`${g}
- too many long flags`) : new Error(`${g}
- unrecognised flag format`);
    }
    if (o === void 0 && u === void 0) throw new Error(`option creation failed due to no flags found in '${D}'.`);
    return {
      shortFlag: o,
      longFlag: u
    };
  }
  e.Option = n, e.DualOptions = l;
})), Lr = /* @__PURE__ */ k(((e) => {
  var r = 3;
  function n(i, s) {
    if (Math.abs(i.length - s.length) > r) return Math.max(i.length, s.length);
    const D = [];
    for (let o = 0; o <= i.length; o++) D[o] = [o];
    for (let o = 0; o <= s.length; o++) D[0][o] = o;
    for (let o = 1; o <= s.length; o++) for (let u = 1; u <= i.length; u++) {
      let c = 1;
      i[u - 1] === s[o - 1] ? c = 0 : c = 1, D[u][o] = Math.min(D[u - 1][o] + 1, D[u][o - 1] + 1, D[u - 1][o - 1] + c), u > 1 && o > 1 && i[u - 1] === s[o - 2] && i[u - 2] === s[o - 1] && (D[u][o] = Math.min(D[u][o], D[u - 2][o - 2] + 1));
    }
    return D[i.length][s.length];
  }
  function l(i, s) {
    if (!s || s.length === 0) return "";
    s = Array.from(new Set(s));
    const D = i.startsWith("--");
    D && (i = i.slice(2), s = s.map((F) => F.slice(2)));
    let o = [], u = r;
    const c = 0.4;
    return s.forEach((F) => {
      if (F.length <= 1) return;
      const h = n(i, F), m = Math.max(i.length, F.length);
      (m - h) / m > c && (h < u ? (u = h, o = [F]) : h === u && o.push(F));
    }), o.sort((F, h) => F.localeCompare(h)), D && (o = o.map((F) => `--${F}`)), o.length > 1 ? `
(Did you mean one of ${o.join(", ")}?)` : o.length === 1 ? `
(Did you mean ${o[0]}?)` : "";
  }
  e.suggestSimilar = l;
})), Mr = /* @__PURE__ */ k(((e) => {
  var r = M("node:events").EventEmitter, n = M("node:child_process"), l = M("node:path"), i = M("node:fs"), s = M("node:process"), { Argument: D, humanReadableArgName: o } = ft(), { CommanderError: u } = Ne(), { Help: c, stripColor: F } = er(), { Option: h, DualOptions: m } = tr(), { suggestSimilar: g } = Lr(), E = class rr extends r {
    constructor(t) {
      super(), this.commands = [], this.options = [], this.parent = null, this._allowUnknownOption = !1, this._allowExcessArguments = !1, this.registeredArguments = [], this._args = this.registeredArguments, this.args = [], this.rawArgs = [], this.processedArgs = [], this._scriptPath = null, this._name = t || "", this._optionValues = {}, this._optionValueSources = {}, this._storeOptionsAsProperties = !1, this._actionHandler = null, this._executableHandler = !1, this._executableFile = null, this._executableDir = null, this._defaultCommandName = null, this._exitCallback = null, this._aliases = [], this._combineFlagAndOptionalValue = !0, this._description = "", this._summary = "", this._argsDescription = void 0, this._enablePositionalOptions = !1, this._passThroughOptions = !1, this._lifeCycleHooks = {}, this._showHelpAfterError = !1, this._showSuggestionAfterError = !0, this._savedState = null, this._outputConfiguration = {
        writeOut: (a) => s.stdout.write(a),
        writeErr: (a) => s.stderr.write(a),
        outputError: (a, p) => p(a),
        getOutHelpWidth: () => s.stdout.isTTY ? s.stdout.columns : void 0,
        getErrHelpWidth: () => s.stderr.isTTY ? s.stderr.columns : void 0,
        getOutHasColors: () => y() ?? (s.stdout.isTTY && s.stdout.hasColors?.()),
        getErrHasColors: () => y() ?? (s.stderr.isTTY && s.stderr.hasColors?.()),
        stripColor: (a) => F(a)
      }, this._hidden = !1, this._helpOption = void 0, this._addImplicitHelpCommand = void 0, this._helpCommand = void 0, this._helpConfiguration = {}, this._helpGroupHeading = void 0, this._defaultCommandGroup = void 0, this._defaultOptionGroup = void 0;
    }
    copyInheritedSettings(t) {
      return this._outputConfiguration = t._outputConfiguration, this._helpOption = t._helpOption, this._helpCommand = t._helpCommand, this._helpConfiguration = t._helpConfiguration, this._exitCallback = t._exitCallback, this._storeOptionsAsProperties = t._storeOptionsAsProperties, this._combineFlagAndOptionalValue = t._combineFlagAndOptionalValue, this._allowExcessArguments = t._allowExcessArguments, this._enablePositionalOptions = t._enablePositionalOptions, this._showHelpAfterError = t._showHelpAfterError, this._showSuggestionAfterError = t._showSuggestionAfterError, this;
    }
    _getCommandAndAncestors() {
      const t = [];
      for (let a = this; a; a = a.parent) t.push(a);
      return t;
    }
    command(t, a, p) {
      let d = a, C = p;
      typeof d == "object" && d !== null && (C = d, d = null), C = C || {};
      const [, _, A] = t.match(/([^ ]+) *(.*)/), b = this.createCommand(_);
      return d && (b.description(d), b._executableHandler = !0), C.isDefault && (this._defaultCommandName = b._name), b._hidden = !!(C.noHelp || C.hidden), b._executableFile = C.executableFile || null, A && b.arguments(A), this._registerCommand(b), b.parent = this, b.copyInheritedSettings(this), d ? this : b;
    }
    createCommand(t) {
      return new rr(t);
    }
    createHelp() {
      return Object.assign(new c(), this.configureHelp());
    }
    configureHelp(t) {
      return t === void 0 ? this._helpConfiguration : (this._helpConfiguration = t, this);
    }
    configureOutput(t) {
      return t === void 0 ? this._outputConfiguration : (this._outputConfiguration = {
        ...this._outputConfiguration,
        ...t
      }, this);
    }
    showHelpAfterError(t = !0) {
      return typeof t != "string" && (t = !!t), this._showHelpAfterError = t, this;
    }
    showSuggestionAfterError(t = !0) {
      return this._showSuggestionAfterError = !!t, this;
    }
    addCommand(t, a) {
      if (!t._name) throw new Error(`Command passed to .addCommand() must have a name
- specify the name in Command constructor or using .name()`);
      return a = a || {}, a.isDefault && (this._defaultCommandName = t._name), (a.noHelp || a.hidden) && (t._hidden = !0), this._registerCommand(t), t.parent = this, t._checkForBrokenPassThrough(), this;
    }
    createArgument(t, a) {
      return new D(t, a);
    }
    argument(t, a, p, d) {
      const C = this.createArgument(t, a);
      return typeof p == "function" ? C.default(d).argParser(p) : C.default(p), this.addArgument(C), this;
    }
    arguments(t) {
      return t.trim().split(/ +/).forEach((a) => {
        this.argument(a);
      }), this;
    }
    addArgument(t) {
      const a = this.registeredArguments.slice(-1)[0];
      if (a?.variadic) throw new Error(`only the last argument can be variadic '${a.name()}'`);
      if (t.required && t.defaultValue !== void 0 && t.parseArg === void 0) throw new Error(`a default value for a required argument is never used: '${t.name()}'`);
      return this.registeredArguments.push(t), this;
    }
    helpCommand(t, a) {
      if (typeof t == "boolean")
        return this._addImplicitHelpCommand = t, t && this._defaultCommandGroup && this._initCommandGroup(this._getHelpCommand()), this;
      const [, p, d] = (t ?? "help [command]").match(/([^ ]+) *(.*)/), C = a ?? "display help for command", _ = this.createCommand(p);
      return _.helpOption(!1), d && _.arguments(d), C && _.description(C), this._addImplicitHelpCommand = !0, this._helpCommand = _, (t || a) && this._initCommandGroup(_), this;
    }
    addHelpCommand(t, a) {
      return typeof t != "object" ? (this.helpCommand(t, a), this) : (this._addImplicitHelpCommand = !0, this._helpCommand = t, this._initCommandGroup(t), this);
    }
    _getHelpCommand() {
      return this._addImplicitHelpCommand ?? (this.commands.length && !this._actionHandler && !this._findCommand("help")) ? (this._helpCommand === void 0 && this.helpCommand(void 0, void 0), this._helpCommand) : null;
    }
    hook(t, a) {
      const p = [
        "preSubcommand",
        "preAction",
        "postAction"
      ];
      if (!p.includes(t)) throw new Error(`Unexpected value for event passed to hook : '${t}'.
Expecting one of '${p.join("', '")}'`);
      return this._lifeCycleHooks[t] ? this._lifeCycleHooks[t].push(a) : this._lifeCycleHooks[t] = [a], this;
    }
    exitOverride(t) {
      return t ? this._exitCallback = t : this._exitCallback = (a) => {
        if (a.code !== "commander.executeSubCommandAsync") throw a;
      }, this;
    }
    _exit(t, a, p) {
      this._exitCallback && this._exitCallback(new u(t, a, p)), s.exit(t);
    }
    action(t) {
      const a = (p) => {
        const d = this.registeredArguments.length, C = p.slice(0, d);
        return this._storeOptionsAsProperties ? C[d] = this : C[d] = this.opts(), C.push(this), t.apply(this, C);
      };
      return this._actionHandler = a, this;
    }
    createOption(t, a) {
      return new h(t, a);
    }
    _callParseArg(t, a, p, d) {
      try {
        return t.parseArg(a, p);
      } catch (C) {
        if (C.code === "commander.invalidArgument") {
          const _ = `${d} ${C.message}`;
          this.error(_, {
            exitCode: C.exitCode,
            code: C.code
          });
        }
        throw C;
      }
    }
    _registerOption(t) {
      const a = t.short && this._findOption(t.short) || t.long && this._findOption(t.long);
      if (a) {
        const p = t.long && this._findOption(t.long) ? t.long : t.short;
        throw new Error(`Cannot add option '${t.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${p}'
-  already used by option '${a.flags}'`);
      }
      this._initOptionGroup(t), this.options.push(t);
    }
    _registerCommand(t) {
      const a = (d) => [d.name()].concat(d.aliases()), p = a(t).find((d) => this._findCommand(d));
      if (p) {
        const d = a(this._findCommand(p)).join("|"), C = a(t).join("|");
        throw new Error(`cannot add command '${C}' as already have command '${d}'`);
      }
      this._initCommandGroup(t), this.commands.push(t);
    }
    addOption(t) {
      this._registerOption(t);
      const a = t.name(), p = t.attributeName();
      if (t.negate) {
        const C = t.long.replace(/^--no-/, "--");
        this._findOption(C) || this.setOptionValueWithSource(p, t.defaultValue === void 0 ? !0 : t.defaultValue, "default");
      } else t.defaultValue !== void 0 && this.setOptionValueWithSource(p, t.defaultValue, "default");
      const d = (C, _, A) => {
        C == null && t.presetArg !== void 0 && (C = t.presetArg);
        const b = this.getOptionValue(p);
        C !== null && t.parseArg ? C = this._callParseArg(t, C, b, _) : C !== null && t.variadic && (C = t._collectValue(C, b)), C == null && (t.negate ? C = !1 : t.isBoolean() || t.optional ? C = !0 : C = ""), this.setOptionValueWithSource(p, C, A);
      };
      return this.on("option:" + a, (C) => {
        d(C, `error: option '${t.flags}' argument '${C}' is invalid.`, "cli");
      }), t.envVar && this.on("optionEnv:" + a, (C) => {
        d(C, `error: option '${t.flags}' value '${C}' from env '${t.envVar}' is invalid.`, "env");
      }), this;
    }
    _optionEx(t, a, p, d, C) {
      if (typeof a == "object" && a instanceof h) throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");
      const _ = this.createOption(a, p);
      if (_.makeOptionMandatory(!!t.mandatory), typeof d == "function") _.default(C).argParser(d);
      else if (d instanceof RegExp) {
        const A = d;
        d = (b, O) => {
          const B = A.exec(b);
          return B ? B[0] : O;
        }, _.default(C).argParser(d);
      } else _.default(d);
      return this.addOption(_);
    }
    option(t, a, p, d) {
      return this._optionEx({}, t, a, p, d);
    }
    requiredOption(t, a, p, d) {
      return this._optionEx({ mandatory: !0 }, t, a, p, d);
    }
    combineFlagAndOptionalValue(t = !0) {
      return this._combineFlagAndOptionalValue = !!t, this;
    }
    allowUnknownOption(t = !0) {
      return this._allowUnknownOption = !!t, this;
    }
    allowExcessArguments(t = !0) {
      return this._allowExcessArguments = !!t, this;
    }
    enablePositionalOptions(t = !0) {
      return this._enablePositionalOptions = !!t, this;
    }
    passThroughOptions(t = !0) {
      return this._passThroughOptions = !!t, this._checkForBrokenPassThrough(), this;
    }
    _checkForBrokenPassThrough() {
      if (this.parent && this._passThroughOptions && !this.parent._enablePositionalOptions) throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`);
    }
    storeOptionsAsProperties(t = !0) {
      if (this.options.length) throw new Error("call .storeOptionsAsProperties() before adding options");
      if (Object.keys(this._optionValues).length) throw new Error("call .storeOptionsAsProperties() before setting option values");
      return this._storeOptionsAsProperties = !!t, this;
    }
    getOptionValue(t) {
      return this._storeOptionsAsProperties ? this[t] : this._optionValues[t];
    }
    setOptionValue(t, a) {
      return this.setOptionValueWithSource(t, a, void 0);
    }
    setOptionValueWithSource(t, a, p) {
      return this._storeOptionsAsProperties ? this[t] = a : this._optionValues[t] = a, this._optionValueSources[t] = p, this;
    }
    getOptionValueSource(t) {
      return this._optionValueSources[t];
    }
    getOptionValueSourceWithGlobals(t) {
      let a;
      return this._getCommandAndAncestors().forEach((p) => {
        p.getOptionValueSource(t) !== void 0 && (a = p.getOptionValueSource(t));
      }), a;
    }
    _prepareUserArgs(t, a) {
      if (t !== void 0 && !Array.isArray(t)) throw new Error("first parameter to parse must be array or undefined");
      if (a = a || {}, t === void 0 && a.from === void 0) {
        s.versions?.electron && (a.from = "electron");
        const d = s.execArgv ?? [];
        (d.includes("-e") || d.includes("--eval") || d.includes("-p") || d.includes("--print")) && (a.from = "eval");
      }
      t === void 0 && (t = s.argv), this.rawArgs = t.slice();
      let p;
      switch (a.from) {
        case void 0:
        case "node":
          this._scriptPath = t[1], p = t.slice(2);
          break;
        case "electron":
          s.defaultApp ? (this._scriptPath = t[1], p = t.slice(2)) : p = t.slice(1);
          break;
        case "user":
          p = t.slice(0);
          break;
        case "eval":
          p = t.slice(1);
          break;
        default:
          throw new Error(`unexpected parse option { from: '${a.from}' }`);
      }
      return !this._name && this._scriptPath && this.nameFromFilename(this._scriptPath), this._name = this._name || "program", p;
    }
    parse(t, a) {
      this._prepareForParse();
      const p = this._prepareUserArgs(t, a);
      return this._parseCommand([], p), this;
    }
    async parseAsync(t, a) {
      this._prepareForParse();
      const p = this._prepareUserArgs(t, a);
      return await this._parseCommand([], p), this;
    }
    _prepareForParse() {
      this._savedState === null ? this.saveStateBeforeParse() : this.restoreStateBeforeParse();
    }
    saveStateBeforeParse() {
      this._savedState = {
        _name: this._name,
        _optionValues: { ...this._optionValues },
        _optionValueSources: { ...this._optionValueSources }
      };
    }
    restoreStateBeforeParse() {
      if (this._storeOptionsAsProperties) throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
- either make a new Command for each call to parse, or stop storing options as properties`);
      this._name = this._savedState._name, this._scriptPath = null, this.rawArgs = [], this._optionValues = { ...this._savedState._optionValues }, this._optionValueSources = { ...this._savedState._optionValueSources }, this.args = [], this.processedArgs = [];
    }
    _checkForMissingExecutable(t, a, p) {
      if (i.existsSync(t)) return;
      const d = `'${t}' does not exist
 - if '${p}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
 - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
 - ${a ? `searched for local subcommand relative to directory '${a}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory"}`;
      throw new Error(d);
    }
    _executeSubCommand(t, a) {
      a = a.slice();
      let p = !1;
      const d = [
        ".js",
        ".ts",
        ".tsx",
        ".mjs",
        ".cjs"
      ];
      function C(B, S) {
        const q = l.resolve(B, S);
        if (i.existsSync(q)) return q;
        if (d.includes(l.extname(S))) return;
        const Y = d.find((J) => i.existsSync(`${q}${J}`));
        if (Y) return `${q}${Y}`;
      }
      this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
      let _ = t._executableFile || `${this._name}-${t._name}`, A = this._executableDir || "";
      if (this._scriptPath) {
        let B;
        try {
          B = i.realpathSync(this._scriptPath);
        } catch {
          B = this._scriptPath;
        }
        A = l.resolve(l.dirname(B), A);
      }
      if (A) {
        let B = C(A, _);
        if (!B && !t._executableFile && this._scriptPath) {
          const S = l.basename(this._scriptPath, l.extname(this._scriptPath));
          S !== this._name && (B = C(A, `${S}-${t._name}`));
        }
        _ = B || _;
      }
      p = d.includes(l.extname(_));
      let b;
      s.platform !== "win32" ? p ? (a.unshift(_), a = v(s.execArgv).concat(a), b = n.spawn(s.argv[0], a, { stdio: "inherit" })) : b = n.spawn(_, a, { stdio: "inherit" }) : (this._checkForMissingExecutable(_, A, t._name), a.unshift(_), a = v(s.execArgv).concat(a), b = n.spawn(s.execPath, a, { stdio: "inherit" })), b.killed || [
        "SIGUSR1",
        "SIGUSR2",
        "SIGTERM",
        "SIGINT",
        "SIGHUP"
      ].forEach((B) => {
        s.on(B, () => {
          b.killed === !1 && b.exitCode === null && b.kill(B);
        });
      });
      const O = this._exitCallback;
      b.on("close", (B) => {
        B = B ?? 1, O ? O(new u(B, "commander.executeSubCommandAsync", "(close)")) : s.exit(B);
      }), b.on("error", (B) => {
        if (B.code === "ENOENT") this._checkForMissingExecutable(_, A, t._name);
        else if (B.code === "EACCES") throw new Error(`'${_}' not executable`);
        if (!O) s.exit(1);
        else {
          const S = new u(1, "commander.executeSubCommandAsync", "(error)");
          S.nestedError = B, O(S);
        }
      }), this.runningCommand = b;
    }
    _dispatchSubcommand(t, a, p) {
      const d = this._findCommand(t);
      d || this.help({ error: !0 }), d._prepareForParse();
      let C;
      return C = this._chainOrCallSubCommandHook(C, d, "preSubcommand"), C = this._chainOrCall(C, () => {
        if (d._executableHandler) this._executeSubCommand(d, a.concat(p));
        else return d._parseCommand(a, p);
      }), C;
    }
    _dispatchHelpCommand(t) {
      t || this.help();
      const a = this._findCommand(t);
      return a && !a._executableHandler && a.help(), this._dispatchSubcommand(t, [], [this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? "--help"]);
    }
    _checkNumberOfArguments() {
      this.registeredArguments.forEach((t, a) => {
        t.required && this.args[a] == null && this.missingArgument(t.name());
      }), !(this.registeredArguments.length > 0 && this.registeredArguments[this.registeredArguments.length - 1].variadic) && this.args.length > this.registeredArguments.length && this._excessArguments(this.args);
    }
    _processArguments() {
      const t = (p, d, C) => {
        let _ = d;
        if (d !== null && p.parseArg) {
          const A = `error: command-argument value '${d}' is invalid for argument '${p.name()}'.`;
          _ = this._callParseArg(p, d, C, A);
        }
        return _;
      };
      this._checkNumberOfArguments();
      const a = [];
      this.registeredArguments.forEach((p, d) => {
        let C = p.defaultValue;
        p.variadic ? d < this.args.length ? (C = this.args.slice(d), p.parseArg && (C = C.reduce((_, A) => t(p, A, _), p.defaultValue))) : C === void 0 && (C = []) : d < this.args.length && (C = this.args[d], p.parseArg && (C = t(p, C, p.defaultValue))), a[d] = C;
      }), this.processedArgs = a;
    }
    _chainOrCall(t, a) {
      return t?.then && typeof t.then == "function" ? t.then(() => a()) : a();
    }
    _chainOrCallHooks(t, a) {
      let p = t;
      const d = [];
      return this._getCommandAndAncestors().reverse().filter((C) => C._lifeCycleHooks[a] !== void 0).forEach((C) => {
        C._lifeCycleHooks[a].forEach((_) => {
          d.push({
            hookedCommand: C,
            callback: _
          });
        });
      }), a === "postAction" && d.reverse(), d.forEach((C) => {
        p = this._chainOrCall(p, () => C.callback(C.hookedCommand, this));
      }), p;
    }
    _chainOrCallSubCommandHook(t, a, p) {
      let d = t;
      return this._lifeCycleHooks[p] !== void 0 && this._lifeCycleHooks[p].forEach((C) => {
        d = this._chainOrCall(d, () => C(this, a));
      }), d;
    }
    _parseCommand(t, a) {
      const p = this.parseOptions(a);
      if (this._parseOptionsEnv(), this._parseOptionsImplied(), t = t.concat(p.operands), a = p.unknown, this.args = t.concat(a), t && this._findCommand(t[0])) return this._dispatchSubcommand(t[0], t.slice(1), a);
      if (this._getHelpCommand() && t[0] === this._getHelpCommand().name()) return this._dispatchHelpCommand(t[1]);
      if (this._defaultCommandName)
        return this._outputHelpIfRequested(a), this._dispatchSubcommand(this._defaultCommandName, t, a);
      this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName && this.help({ error: !0 }), this._outputHelpIfRequested(p.unknown), this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
      const d = () => {
        p.unknown.length > 0 && this.unknownOption(p.unknown[0]);
      }, C = `command:${this.name()}`;
      if (this._actionHandler) {
        d(), this._processArguments();
        let _;
        return _ = this._chainOrCallHooks(_, "preAction"), _ = this._chainOrCall(_, () => this._actionHandler(this.processedArgs)), this.parent && (_ = this._chainOrCall(_, () => {
          this.parent.emit(C, t, a);
        })), _ = this._chainOrCallHooks(_, "postAction"), _;
      }
      if (this.parent?.listenerCount(C))
        d(), this._processArguments(), this.parent.emit(C, t, a);
      else if (t.length) {
        if (this._findCommand("*")) return this._dispatchSubcommand("*", t, a);
        this.listenerCount("command:*") ? this.emit("command:*", t, a) : this.commands.length ? this.unknownCommand() : (d(), this._processArguments());
      } else this.commands.length ? (d(), this.help({ error: !0 })) : (d(), this._processArguments());
    }
    _findCommand(t) {
      if (t)
        return this.commands.find((a) => a._name === t || a._aliases.includes(t));
    }
    _findOption(t) {
      return this.options.find((a) => a.is(t));
    }
    _checkForMissingMandatoryOptions() {
      this._getCommandAndAncestors().forEach((t) => {
        t.options.forEach((a) => {
          a.mandatory && t.getOptionValue(a.attributeName()) === void 0 && t.missingMandatoryOptionValue(a);
        });
      });
    }
    _checkForConflictingLocalOptions() {
      const t = this.options.filter((a) => {
        const p = a.attributeName();
        return this.getOptionValue(p) === void 0 ? !1 : this.getOptionValueSource(p) !== "default";
      });
      t.filter((a) => a.conflictsWith.length > 0).forEach((a) => {
        const p = t.find((d) => a.conflictsWith.includes(d.attributeName()));
        p && this._conflictingOption(a, p);
      });
    }
    _checkForConflictingOptions() {
      this._getCommandAndAncestors().forEach((t) => {
        t._checkForConflictingLocalOptions();
      });
    }
    parseOptions(t) {
      const a = [], p = [];
      let d = a;
      function C(B) {
        return B.length > 1 && B[0] === "-";
      }
      const _ = (B) => /^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(B) ? !this._getCommandAndAncestors().some((S) => S.options.map((q) => q.short).some((q) => /^-\d$/.test(q))) : !1;
      let A = null, b = null, O = 0;
      for (; O < t.length || b; ) {
        const B = b ?? t[O++];
        if (b = null, B === "--") {
          d === p && d.push(B), d.push(...t.slice(O));
          break;
        }
        if (A && (!C(B) || _(B))) {
          this.emit(`option:${A.name()}`, B);
          continue;
        }
        if (A = null, C(B)) {
          const S = this._findOption(B);
          if (S) {
            if (S.required) {
              const q = t[O++];
              q === void 0 && this.optionMissingArgument(S), this.emit(`option:${S.name()}`, q);
            } else if (S.optional) {
              let q = null;
              O < t.length && (!C(t[O]) || _(t[O])) && (q = t[O++]), this.emit(`option:${S.name()}`, q);
            } else this.emit(`option:${S.name()}`);
            A = S.variadic ? S : null;
            continue;
          }
        }
        if (B.length > 2 && B[0] === "-" && B[1] !== "-") {
          const S = this._findOption(`-${B[1]}`);
          if (S) {
            S.required || S.optional && this._combineFlagAndOptionalValue ? this.emit(`option:${S.name()}`, B.slice(2)) : (this.emit(`option:${S.name()}`), b = `-${B.slice(2)}`);
            continue;
          }
        }
        if (/^--[^=]+=/.test(B)) {
          const S = B.indexOf("="), q = this._findOption(B.slice(0, S));
          if (q && (q.required || q.optional)) {
            this.emit(`option:${q.name()}`, B.slice(S + 1));
            continue;
          }
        }
        if (d === a && C(B) && !(this.commands.length === 0 && _(B)) && (d = p), (this._enablePositionalOptions || this._passThroughOptions) && a.length === 0 && p.length === 0) {
          if (this._findCommand(B)) {
            a.push(B), p.push(...t.slice(O));
            break;
          } else if (this._getHelpCommand() && B === this._getHelpCommand().name()) {
            a.push(B, ...t.slice(O));
            break;
          } else if (this._defaultCommandName) {
            p.push(B, ...t.slice(O));
            break;
          }
        }
        if (this._passThroughOptions) {
          d.push(B, ...t.slice(O));
          break;
        }
        d.push(B);
      }
      return {
        operands: a,
        unknown: p
      };
    }
    opts() {
      if (this._storeOptionsAsProperties) {
        const t = {}, a = this.options.length;
        for (let p = 0; p < a; p++) {
          const d = this.options[p].attributeName();
          t[d] = d === this._versionOptionName ? this._version : this[d];
        }
        return t;
      }
      return this._optionValues;
    }
    optsWithGlobals() {
      return this._getCommandAndAncestors().reduce((t, a) => Object.assign(t, a.opts()), {});
    }
    error(t, a) {
      this._outputConfiguration.outputError(`${t}
`, this._outputConfiguration.writeErr), typeof this._showHelpAfterError == "string" ? this._outputConfiguration.writeErr(`${this._showHelpAfterError}
`) : this._showHelpAfterError && (this._outputConfiguration.writeErr(`
`), this.outputHelp({ error: !0 }));
      const p = a || {}, d = p.exitCode || 1, C = p.code || "commander.error";
      this._exit(d, C, t);
    }
    _parseOptionsEnv() {
      this.options.forEach((t) => {
        if (t.envVar && t.envVar in s.env) {
          const a = t.attributeName();
          (this.getOptionValue(a) === void 0 || [
            "default",
            "config",
            "env"
          ].includes(this.getOptionValueSource(a))) && (t.required || t.optional ? this.emit(`optionEnv:${t.name()}`, s.env[t.envVar]) : this.emit(`optionEnv:${t.name()}`));
        }
      });
    }
    _parseOptionsImplied() {
      const t = new m(this.options), a = (p) => this.getOptionValue(p) !== void 0 && !["default", "implied"].includes(this.getOptionValueSource(p));
      this.options.filter((p) => p.implied !== void 0 && a(p.attributeName()) && t.valueFromOption(this.getOptionValue(p.attributeName()), p)).forEach((p) => {
        Object.keys(p.implied).filter((d) => !a(d)).forEach((d) => {
          this.setOptionValueWithSource(d, p.implied[d], "implied");
        });
      });
    }
    missingArgument(t) {
      const a = `error: missing required argument '${t}'`;
      this.error(a, { code: "commander.missingArgument" });
    }
    optionMissingArgument(t) {
      const a = `error: option '${t.flags}' argument missing`;
      this.error(a, { code: "commander.optionMissingArgument" });
    }
    missingMandatoryOptionValue(t) {
      const a = `error: required option '${t.flags}' not specified`;
      this.error(a, { code: "commander.missingMandatoryOptionValue" });
    }
    _conflictingOption(t, a) {
      const p = (_) => {
        const A = _.attributeName(), b = this.getOptionValue(A), O = this.options.find((S) => S.negate && A === S.attributeName()), B = this.options.find((S) => !S.negate && A === S.attributeName());
        return O && (O.presetArg === void 0 && b === !1 || O.presetArg !== void 0 && b === O.presetArg) ? O : B || _;
      }, d = (_) => {
        const A = p(_), b = A.attributeName();
        return this.getOptionValueSource(b) === "env" ? `environment variable '${A.envVar}'` : `option '${A.flags}'`;
      }, C = `error: ${d(t)} cannot be used with ${d(a)}`;
      this.error(C, { code: "commander.conflictingOption" });
    }
    unknownOption(t) {
      if (this._allowUnknownOption) return;
      let a = "";
      if (t.startsWith("--") && this._showSuggestionAfterError) {
        let d = [], C = this;
        do {
          const _ = C.createHelp().visibleOptions(C).filter((A) => A.long).map((A) => A.long);
          d = d.concat(_), C = C.parent;
        } while (C && !C._enablePositionalOptions);
        a = g(t, d);
      }
      const p = `error: unknown option '${t}'${a}`;
      this.error(p, { code: "commander.unknownOption" });
    }
    _excessArguments(t) {
      if (this._allowExcessArguments) return;
      const a = this.registeredArguments.length, p = a === 1 ? "" : "s", d = `error: too many arguments${this.parent ? ` for '${this.name()}'` : ""}. Expected ${a} argument${p} but got ${t.length}.`;
      this.error(d, { code: "commander.excessArguments" });
    }
    unknownCommand() {
      const t = this.args[0];
      let a = "";
      if (this._showSuggestionAfterError) {
        const d = [];
        this.createHelp().visibleCommands(this).forEach((C) => {
          d.push(C.name()), C.alias() && d.push(C.alias());
        }), a = g(t, d);
      }
      const p = `error: unknown command '${t}'${a}`;
      this.error(p, { code: "commander.unknownCommand" });
    }
    version(t, a, p) {
      if (t === void 0) return this._version;
      this._version = t, a = a || "-V, --version", p = p || "output the version number";
      const d = this.createOption(a, p);
      return this._versionOptionName = d.attributeName(), this._registerOption(d), this.on("option:" + d.name(), () => {
        this._outputConfiguration.writeOut(`${t}
`), this._exit(0, "commander.version", t);
      }), this;
    }
    description(t, a) {
      return t === void 0 && a === void 0 ? this._description : (this._description = t, a && (this._argsDescription = a), this);
    }
    summary(t) {
      return t === void 0 ? this._summary : (this._summary = t, this);
    }
    alias(t) {
      if (t === void 0) return this._aliases[0];
      let a = this;
      if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler && (a = this.commands[this.commands.length - 1]), t === a._name) throw new Error("Command alias can't be the same as its name");
      const p = this.parent?._findCommand(t);
      if (p) {
        const d = [p.name()].concat(p.aliases()).join("|");
        throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${d}'`);
      }
      return a._aliases.push(t), this;
    }
    aliases(t) {
      return t === void 0 ? this._aliases : (t.forEach((a) => this.alias(a)), this);
    }
    usage(t) {
      if (t === void 0) {
        if (this._usage) return this._usage;
        const a = this.registeredArguments.map((p) => o(p));
        return [].concat(this.options.length || this._helpOption !== null ? "[options]" : [], this.commands.length ? "[command]" : [], this.registeredArguments.length ? a : []).join(" ");
      }
      return this._usage = t, this;
    }
    name(t) {
      return t === void 0 ? this._name : (this._name = t, this);
    }
    helpGroup(t) {
      return t === void 0 ? this._helpGroupHeading ?? "" : (this._helpGroupHeading = t, this);
    }
    commandsGroup(t) {
      return t === void 0 ? this._defaultCommandGroup ?? "" : (this._defaultCommandGroup = t, this);
    }
    optionsGroup(t) {
      return t === void 0 ? this._defaultOptionGroup ?? "" : (this._defaultOptionGroup = t, this);
    }
    _initOptionGroup(t) {
      this._defaultOptionGroup && !t.helpGroupHeading && t.helpGroup(this._defaultOptionGroup);
    }
    _initCommandGroup(t) {
      this._defaultCommandGroup && !t.helpGroup() && t.helpGroup(this._defaultCommandGroup);
    }
    nameFromFilename(t) {
      return this._name = l.basename(t, l.extname(t)), this;
    }
    executableDir(t) {
      return t === void 0 ? this._executableDir : (this._executableDir = t, this);
    }
    helpInformation(t) {
      const a = this.createHelp(), p = this._getOutputContext(t);
      a.prepareContext({
        error: p.error,
        helpWidth: p.helpWidth,
        outputHasColors: p.hasColors
      });
      const d = a.formatHelp(this, a);
      return p.hasColors ? d : this._outputConfiguration.stripColor(d);
    }
    _getOutputContext(t) {
      t = t || {};
      const a = !!t.error;
      let p, d, C;
      return a ? (p = (A) => this._outputConfiguration.writeErr(A), d = this._outputConfiguration.getErrHasColors(), C = this._outputConfiguration.getErrHelpWidth()) : (p = (A) => this._outputConfiguration.writeOut(A), d = this._outputConfiguration.getOutHasColors(), C = this._outputConfiguration.getOutHelpWidth()), {
        error: a,
        write: (A) => (d || (A = this._outputConfiguration.stripColor(A)), p(A)),
        hasColors: d,
        helpWidth: C
      };
    }
    outputHelp(t) {
      let a;
      typeof t == "function" && (a = t, t = void 0);
      const p = this._getOutputContext(t), d = {
        error: p.error,
        write: p.write,
        command: this
      };
      this._getCommandAndAncestors().reverse().forEach((_) => _.emit("beforeAllHelp", d)), this.emit("beforeHelp", d);
      let C = this.helpInformation({ error: p.error });
      if (a && (C = a(C), typeof C != "string" && !Buffer.isBuffer(C)))
        throw new Error("outputHelp callback must return a string or a Buffer");
      p.write(C), this._getHelpOption()?.long && this.emit(this._getHelpOption().long), this.emit("afterHelp", d), this._getCommandAndAncestors().forEach((_) => _.emit("afterAllHelp", d));
    }
    helpOption(t, a) {
      return typeof t == "boolean" ? (t ? (this._helpOption === null && (this._helpOption = void 0), this._defaultOptionGroup && this._initOptionGroup(this._getHelpOption())) : this._helpOption = null, this) : (this._helpOption = this.createOption(t ?? "-h, --help", a ?? "display help for command"), (t || a) && this._initOptionGroup(this._helpOption), this);
    }
    _getHelpOption() {
      return this._helpOption === void 0 && this.helpOption(void 0, void 0), this._helpOption;
    }
    addHelpOption(t) {
      return this._helpOption = t, this._initOptionGroup(t), this;
    }
    help(t) {
      this.outputHelp(t);
      let a = Number(s.exitCode ?? 0);
      a === 0 && t && typeof t != "function" && t.error && (a = 1), this._exit(a, "commander.help", "(outputHelp)");
    }
    addHelpText(t, a) {
      const p = [
        "beforeAll",
        "before",
        "after",
        "afterAll"
      ];
      if (!p.includes(t)) throw new Error(`Unexpected value for position to addHelpText.
Expecting one of '${p.join("', '")}'`);
      const d = `${t}Help`;
      return this.on(d, (C) => {
        let _;
        typeof a == "function" ? _ = a({
          error: C.error,
          command: C.command
        }) : _ = a, _ && C.write(`${_}
`);
      }), this;
    }
    _outputHelpIfRequested(t) {
      const a = this._getHelpOption();
      a && t.find((p) => a.is(p)) && (this.outputHelp(), this._exit(0, "commander.helpDisplayed", "(outputHelp)"));
    }
  };
  function v(f) {
    return f.map((t) => {
      if (!t.startsWith("--inspect")) return t;
      let a, p = "127.0.0.1", d = "9229", C;
      return (C = t.match(/^(--inspect(-brk)?)$/)) !== null ? a = C[1] : (C = t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null ? (a = C[1], /^\d+$/.test(C[3]) ? d = C[3] : p = C[3]) : (C = t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null && (a = C[1], p = C[3], d = C[4]), a && d !== "0" ? `${a}=${p}:${parseInt(d) + 1}` : t;
    });
  }
  function y() {
    if (s.env.NO_COLOR || s.env.FORCE_COLOR === "0" || s.env.FORCE_COLOR === "false") return !1;
    if (s.env.FORCE_COLOR || s.env.CLICOLOR_FORCE !== void 0) return !0;
  }
  e.Command = E, e.useColor = y;
})), Hr = /* @__PURE__ */ k(((e) => {
  var { Argument: r } = ft(), { Command: n } = Mr(), { CommanderError: l, InvalidArgumentError: i } = Ne(), { Help: s } = er(), { Option: D } = tr();
  e.program = new n(), e.createCommand = (o) => new n(o), e.createOption = (o, u) => new D(o, u), e.createArgument = (o, u) => new r(o, u), e.Command = n, e.Option = D, e.Argument = r, e.Help = s, e.CommanderError = l, e.InvalidArgumentError = i, e.InvalidOptionArgumentError = i;
})), Wr = /* @__PURE__ */ oe(Hr(), 1), { program: te, createCommand: Xi, createArgument: Qi, createOption: Zi, CommanderError: es, InvalidArgumentError: ts, InvalidOptionArgumentError: rs, Command: us, Argument: ns, Option: At, Help: Vr } = Wr.default, qr = /* @__PURE__ */ k(((e, r) => {
  r.exports = l;
  function n(s) {
    return s instanceof Buffer ? Buffer.from(s) : new s.constructor(s.buffer.slice(), s.byteOffset, s.length);
  }
  function l(s) {
    if (s = s || {}, s.circles) return i(s);
    const D = /* @__PURE__ */ new Map();
    if (D.set(Date, (h) => new Date(h)), D.set(Map, (h, m) => new Map(u(Array.from(h), m))), D.set(Set, (h, m) => new Set(u(Array.from(h), m))), s.constructorHandlers) for (const h of s.constructorHandlers) D.set(h[0], h[1]);
    let o = null;
    return s.proto ? F : c;
    function u(h, m) {
      const g = Object.keys(h), E = new Array(g.length);
      for (let v = 0; v < g.length; v++) {
        const y = g[v], f = h[y];
        typeof f != "object" || f === null ? E[y] = f : f.constructor !== Object && (o = D.get(f.constructor)) ? E[y] = o(f, m) : ArrayBuffer.isView(f) ? E[y] = n(f) : E[y] = m(f);
      }
      return E;
    }
    function c(h) {
      if (typeof h != "object" || h === null) return h;
      if (Array.isArray(h)) return u(h, c);
      if (h.constructor !== Object && (o = D.get(h.constructor))) return o(h, c);
      const m = {};
      for (const g in h) {
        if (Object.hasOwnProperty.call(h, g) === !1) continue;
        const E = h[g];
        typeof E != "object" || E === null ? m[g] = E : E.constructor !== Object && (o = D.get(E.constructor)) ? m[g] = o(E, c) : ArrayBuffer.isView(E) ? m[g] = n(E) : m[g] = c(E);
      }
      return m;
    }
    function F(h) {
      if (typeof h != "object" || h === null) return h;
      if (Array.isArray(h)) return u(h, F);
      if (h.constructor !== Object && (o = D.get(h.constructor))) return o(h, F);
      const m = {};
      for (const g in h) {
        const E = h[g];
        typeof E != "object" || E === null ? m[g] = E : E.constructor !== Object && (o = D.get(E.constructor)) ? m[g] = o(E, F) : ArrayBuffer.isView(E) ? m[g] = n(E) : m[g] = F(E);
      }
      return m;
    }
  }
  function i(s) {
    const D = [], o = [], u = /* @__PURE__ */ new Map();
    if (u.set(Date, (g) => new Date(g)), u.set(Map, (g, E) => new Map(F(Array.from(g), E))), u.set(Set, (g, E) => new Set(F(Array.from(g), E))), s.constructorHandlers) for (const g of s.constructorHandlers) u.set(g[0], g[1]);
    let c = null;
    return s.proto ? m : h;
    function F(g, E) {
      const v = Object.keys(g), y = new Array(v.length);
      for (let f = 0; f < v.length; f++) {
        const t = v[f], a = g[t];
        if (typeof a != "object" || a === null) y[t] = a;
        else if (a.constructor !== Object && (c = u.get(a.constructor))) y[t] = c(a, E);
        else if (ArrayBuffer.isView(a)) y[t] = n(a);
        else {
          const p = D.indexOf(a);
          p !== -1 ? y[t] = o[p] : y[t] = E(a);
        }
      }
      return y;
    }
    function h(g) {
      if (typeof g != "object" || g === null) return g;
      if (Array.isArray(g)) return F(g, h);
      if (g.constructor !== Object && (c = u.get(g.constructor))) return c(g, h);
      const E = {};
      D.push(g), o.push(E);
      for (const v in g) {
        if (Object.hasOwnProperty.call(g, v) === !1) continue;
        const y = g[v];
        if (typeof y != "object" || y === null) E[v] = y;
        else if (y.constructor !== Object && (c = u.get(y.constructor))) E[v] = c(y, h);
        else if (ArrayBuffer.isView(y)) E[v] = n(y);
        else {
          const f = D.indexOf(y);
          f !== -1 ? E[v] = o[f] : E[v] = h(y);
        }
      }
      return D.pop(), o.pop(), E;
    }
    function m(g) {
      if (typeof g != "object" || g === null) return g;
      if (Array.isArray(g)) return F(g, m);
      if (g.constructor !== Object && (c = u.get(g.constructor))) return c(g, m);
      const E = {};
      D.push(g), o.push(E);
      for (const v in g) {
        const y = g[v];
        if (typeof y != "object" || y === null) E[v] = y;
        else if (y.constructor !== Object && (c = u.get(y.constructor))) E[v] = c(y, m);
        else if (ArrayBuffer.isView(y)) E[v] = n(y);
        else {
          const f = D.indexOf(y);
          f !== -1 ? E[v] = o[f] : E[v] = m(y);
        }
      }
      return D.pop(), o.pop(), E;
    }
  }
})), Ur = /* @__PURE__ */ k(((e, r) => {
  var n = M("constants"), l = process.cwd, i = null, s = process.env.GRACEFUL_FS_PLATFORM || process.platform;
  process.cwd = function() {
    return i || (i = l.call(process)), i;
  };
  try {
    process.cwd();
  } catch {
  }
  if (typeof process.chdir == "function") {
    var D = process.chdir;
    process.chdir = function(u) {
      i = null, D.call(process, u);
    }, Object.setPrototypeOf && Object.setPrototypeOf(process.chdir, D);
  }
  r.exports = o;
  function o(u) {
    n.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) && c(u), u.lutimes || F(u), u.chown = g(u.chown), u.fchown = g(u.fchown), u.lchown = g(u.lchown), u.chmod = h(u.chmod), u.fchmod = h(u.fchmod), u.lchmod = h(u.lchmod), u.chownSync = E(u.chownSync), u.fchownSync = E(u.fchownSync), u.lchownSync = E(u.lchownSync), u.chmodSync = m(u.chmodSync), u.fchmodSync = m(u.fchmodSync), u.lchmodSync = m(u.lchmodSync), u.stat = v(u.stat), u.fstat = v(u.fstat), u.lstat = v(u.lstat), u.statSync = y(u.statSync), u.fstatSync = y(u.fstatSync), u.lstatSync = y(u.lstatSync), u.chmod && !u.lchmod && (u.lchmod = function(t, a, p) {
      p && process.nextTick(p);
    }, u.lchmodSync = function() {
    }), u.chown && !u.lchown && (u.lchown = function(t, a, p, d) {
      d && process.nextTick(d);
    }, u.lchownSync = function() {
    }), s === "win32" && (u.rename = typeof u.rename != "function" ? u.rename : (function(t) {
      function a(p, d, C) {
        var _ = Date.now(), A = 0;
        t(p, d, function b(O) {
          if (O && (O.code === "EACCES" || O.code === "EPERM" || O.code === "EBUSY") && Date.now() - _ < 6e4) {
            setTimeout(function() {
              u.stat(d, function(B, S) {
                B && B.code === "ENOENT" ? t(p, d, b) : C(O);
              });
            }, A), A < 100 && (A += 10);
            return;
          }
          C && C(O);
        });
      }
      return Object.setPrototypeOf && Object.setPrototypeOf(a, t), a;
    })(u.rename)), u.read = typeof u.read != "function" ? u.read : (function(t) {
      function a(p, d, C, _, A, b) {
        var O;
        if (b && typeof b == "function") {
          var B = 0;
          O = function(S, q, Y) {
            if (S && S.code === "EAGAIN" && B < 10)
              return B++, t.call(u, p, d, C, _, A, O);
            b.apply(this, arguments);
          };
        }
        return t.call(u, p, d, C, _, A, O);
      }
      return Object.setPrototypeOf && Object.setPrototypeOf(a, t), a;
    })(u.read), u.readSync = typeof u.readSync != "function" ? u.readSync : /* @__PURE__ */ (function(t) {
      return function(a, p, d, C, _) {
        for (var A = 0; ; ) try {
          return t.call(u, a, p, d, C, _);
        } catch (b) {
          if (b.code === "EAGAIN" && A < 10) {
            A++;
            continue;
          }
          throw b;
        }
      };
    })(u.readSync);
    function c(t) {
      t.lchmod = function(a, p, d) {
        t.open(a, n.O_WRONLY | n.O_SYMLINK, p, function(C, _) {
          if (C) {
            d && d(C);
            return;
          }
          t.fchmod(_, p, function(A) {
            t.close(_, function(b) {
              d && d(A || b);
            });
          });
        });
      }, t.lchmodSync = function(a, p) {
        var d = t.openSync(a, n.O_WRONLY | n.O_SYMLINK, p), C = !0, _;
        try {
          _ = t.fchmodSync(d, p), C = !1;
        } finally {
          if (C) try {
            t.closeSync(d);
          } catch {
          }
          else t.closeSync(d);
        }
        return _;
      };
    }
    function F(t) {
      n.hasOwnProperty("O_SYMLINK") && t.futimes ? (t.lutimes = function(a, p, d, C) {
        t.open(a, n.O_SYMLINK, function(_, A) {
          if (_) {
            C && C(_);
            return;
          }
          t.futimes(A, p, d, function(b) {
            t.close(A, function(O) {
              C && C(b || O);
            });
          });
        });
      }, t.lutimesSync = function(a, p, d) {
        var C = t.openSync(a, n.O_SYMLINK), _, A = !0;
        try {
          _ = t.futimesSync(C, p, d), A = !1;
        } finally {
          if (A) try {
            t.closeSync(C);
          } catch {
          }
          else t.closeSync(C);
        }
        return _;
      }) : t.futimes && (t.lutimes = function(a, p, d, C) {
        C && process.nextTick(C);
      }, t.lutimesSync = function() {
      });
    }
    function h(t) {
      return t && function(a, p, d) {
        return t.call(u, a, p, function(C) {
          f(C) && (C = null), d && d.apply(this, arguments);
        });
      };
    }
    function m(t) {
      return t && function(a, p) {
        try {
          return t.call(u, a, p);
        } catch (d) {
          if (!f(d)) throw d;
        }
      };
    }
    function g(t) {
      return t && function(a, p, d, C) {
        return t.call(u, a, p, d, function(_) {
          f(_) && (_ = null), C && C.apply(this, arguments);
        });
      };
    }
    function E(t) {
      return t && function(a, p, d) {
        try {
          return t.call(u, a, p, d);
        } catch (C) {
          if (!f(C)) throw C;
        }
      };
    }
    function v(t) {
      return t && function(a, p, d) {
        typeof p == "function" && (d = p, p = null);
        function C(_, A) {
          A && (A.uid < 0 && (A.uid += 4294967296), A.gid < 0 && (A.gid += 4294967296)), d && d.apply(this, arguments);
        }
        return p ? t.call(u, a, p, C) : t.call(u, a, C);
      };
    }
    function y(t) {
      return t && function(a, p) {
        var d = p ? t.call(u, a, p) : t.call(u, a);
        return d && (d.uid < 0 && (d.uid += 4294967296), d.gid < 0 && (d.gid += 4294967296)), d;
      };
    }
    function f(t) {
      return !t || t.code === "ENOSYS" || (!process.getuid || process.getuid() !== 0) && (t.code === "EINVAL" || t.code === "EPERM");
    }
  }
})), Gr = /* @__PURE__ */ k(((e, r) => {
  var n = M("stream").Stream;
  r.exports = l;
  function l(i) {
    return {
      ReadStream: s,
      WriteStream: D
    };
    function s(o, u) {
      if (!(this instanceof s)) return new s(o, u);
      n.call(this);
      var c = this;
      this.path = o, this.fd = null, this.readable = !0, this.paused = !1, this.flags = "r", this.mode = 438, this.bufferSize = 64 * 1024, u = u || {};
      for (var F = Object.keys(u), h = 0, m = F.length; h < m; h++) {
        var g = F[h];
        this[g] = u[g];
      }
      if (this.encoding && this.setEncoding(this.encoding), this.start !== void 0) {
        if (typeof this.start != "number") throw TypeError("start must be a Number");
        if (this.end === void 0) this.end = 1 / 0;
        else if (typeof this.end != "number") throw TypeError("end must be a Number");
        if (this.start > this.end) throw new Error("start must be <= end");
        this.pos = this.start;
      }
      if (this.fd !== null) {
        process.nextTick(function() {
          c._read();
        });
        return;
      }
      i.open(this.path, this.flags, this.mode, function(E, v) {
        if (E) {
          c.emit("error", E), c.readable = !1;
          return;
        }
        c.fd = v, c.emit("open", v), c._read();
      });
    }
    function D(o, u) {
      if (!(this instanceof D)) return new D(o, u);
      n.call(this), this.path = o, this.fd = null, this.writable = !0, this.flags = "w", this.encoding = "binary", this.mode = 438, this.bytesWritten = 0, u = u || {};
      for (var c = Object.keys(u), F = 0, h = c.length; F < h; F++) {
        var m = c[F];
        this[m] = u[m];
      }
      if (this.start !== void 0) {
        if (typeof this.start != "number") throw TypeError("start must be a Number");
        if (this.start < 0) throw new Error("start must be >= zero");
        this.pos = this.start;
      }
      this.busy = !1, this._queue = [], this.fd === null && (this._open = i.open, this._queue.push([
        this._open,
        this.path,
        this.flags,
        this.mode,
        void 0
      ]), this.flush());
    }
  }
})), Yr = /* @__PURE__ */ k(((e, r) => {
  r.exports = l;
  var n = Object.getPrototypeOf || function(i) {
    return i.__proto__;
  };
  function l(i) {
    if (i === null || typeof i != "object") return i;
    if (i instanceof Object) var s = { __proto__: n(i) };
    else var s = /* @__PURE__ */ Object.create(null);
    return Object.getOwnPropertyNames(i).forEach(function(D) {
      Object.defineProperty(s, D, Object.getOwnPropertyDescriptor(i, D));
    }), s;
  }
})), Jr = /* @__PURE__ */ k(((e, r) => {
  var n = M("fs"), l = Ur(), i = Gr(), s = Yr(), D = M("util"), o, u;
  typeof Symbol == "function" && typeof Symbol.for == "function" ? (o = /* @__PURE__ */ Symbol.for("graceful-fs.queue"), u = /* @__PURE__ */ Symbol.for("graceful-fs.previous")) : (o = "___graceful-fs.queue", u = "___graceful-fs.previous");
  function c() {
  }
  function F(f, t) {
    Object.defineProperty(f, o, { get: function() {
      return t;
    } });
  }
  var h = c;
  D.debuglog ? h = D.debuglog("gfs4") : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && (h = function() {
    var f = D.format.apply(D, arguments);
    f = "GFS4: " + f.split(/\n/).join(`
GFS4: `), console.error(f);
  }), n[o] || (F(n, global[o] || []), n.close = (function(f) {
    function t(a, p) {
      return f.call(n, a, function(d) {
        d || v(), typeof p == "function" && p.apply(this, arguments);
      });
    }
    return Object.defineProperty(t, u, { value: f }), t;
  })(n.close), n.closeSync = (function(f) {
    function t(a) {
      f.apply(n, arguments), v();
    }
    return Object.defineProperty(t, u, { value: f }), t;
  })(n.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
    h(n[o]), M("assert").equal(n[o].length, 0);
  })), global[o] || F(global, n[o]), r.exports = m(s(n)), process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !n.__patched && (r.exports = m(n), n.__patched = !0);
  function m(f) {
    l(f), f.gracefulify = m, f.createReadStream = We, f.createWriteStream = Ve;
    var t = f.readFile;
    f.readFile = a;
    function a(w, T, x) {
      return typeof T == "function" && (x = T, T = null), H(w, T, x);
      function H(W, L, N, I) {
        return t(W, L, function(R) {
          R && (R.code === "EMFILE" || R.code === "ENFILE") ? g([
            H,
            [
              W,
              L,
              N
            ],
            R,
            I || Date.now(),
            Date.now()
          ]) : typeof N == "function" && N.apply(this, arguments);
        });
      }
    }
    var p = f.writeFile;
    f.writeFile = d;
    function d(w, T, x, H) {
      return typeof x == "function" && (H = x, x = null), W(w, T, x, H);
      function W(L, N, I, R, V) {
        return p(L, N, I, function($) {
          $ && ($.code === "EMFILE" || $.code === "ENFILE") ? g([
            W,
            [
              L,
              N,
              I,
              R
            ],
            $,
            V || Date.now(),
            Date.now()
          ]) : typeof R == "function" && R.apply(this, arguments);
        });
      }
    }
    var C = f.appendFile;
    C && (f.appendFile = _);
    function _(w, T, x, H) {
      return typeof x == "function" && (H = x, x = null), W(w, T, x, H);
      function W(L, N, I, R, V) {
        return C(L, N, I, function($) {
          $ && ($.code === "EMFILE" || $.code === "ENFILE") ? g([
            W,
            [
              L,
              N,
              I,
              R
            ],
            $,
            V || Date.now(),
            Date.now()
          ]) : typeof R == "function" && R.apply(this, arguments);
        });
      }
    }
    var A = f.copyFile;
    A && (f.copyFile = b);
    function b(w, T, x, H) {
      return typeof x == "function" && (H = x, x = 0), W(w, T, x, H);
      function W(L, N, I, R, V) {
        return A(L, N, I, function($) {
          $ && ($.code === "EMFILE" || $.code === "ENFILE") ? g([
            W,
            [
              L,
              N,
              I,
              R
            ],
            $,
            V || Date.now(),
            Date.now()
          ]) : typeof R == "function" && R.apply(this, arguments);
        });
      }
    }
    var O = f.readdir;
    f.readdir = S;
    var B = /^v[0-5]\./;
    function S(w, T, x) {
      typeof T == "function" && (x = T, T = null);
      var H = B.test(process.version) ? function(N, I, R, V) {
        return O(N, W(N, I, R, V));
      } : function(N, I, R, V) {
        return O(N, I, W(N, I, R, V));
      };
      return H(w, T, x);
      function W(L, N, I, R) {
        return function(V, $) {
          V && (V.code === "EMFILE" || V.code === "ENFILE") ? g([
            H,
            [
              L,
              N,
              I
            ],
            V,
            R || Date.now(),
            Date.now()
          ]) : ($ && $.sort && $.sort(), typeof I == "function" && I.call(this, V, $));
        };
      }
    }
    if (process.version.substr(0, 4) === "v0.8") {
      var q = i(f);
      K = q.ReadStream, z = q.WriteStream;
    }
    var Y = f.ReadStream;
    Y && (K.prototype = Object.create(Y.prototype), K.prototype.open = Me);
    var J = f.WriteStream;
    J && (z.prototype = Object.create(J.prototype), z.prototype.open = He), Object.defineProperty(f, "ReadStream", {
      get: function() {
        return K;
      },
      set: function(w) {
        K = w;
      },
      enumerable: !0,
      configurable: !0
    }), Object.defineProperty(f, "WriteStream", {
      get: function() {
        return z;
      },
      set: function(w) {
        z = w;
      },
      enumerable: !0,
      configurable: !0
    });
    var Ce = K;
    Object.defineProperty(f, "FileReadStream", {
      get: function() {
        return Ce;
      },
      set: function(w) {
        Ce = w;
      },
      enumerable: !0,
      configurable: !0
    });
    var ye = z;
    Object.defineProperty(f, "FileWriteStream", {
      get: function() {
        return ye;
      },
      set: function(w) {
        ye = w;
      },
      enumerable: !0,
      configurable: !0
    });
    function K(w, T) {
      return this instanceof K ? (Y.apply(this, arguments), this) : K.apply(Object.create(K.prototype), arguments);
    }
    function Me() {
      var w = this;
      pe(w.path, w.flags, w.mode, function(T, x) {
        T ? (w.autoClose && w.destroy(), w.emit("error", T)) : (w.fd = x, w.emit("open", x), w.read());
      });
    }
    function z(w, T) {
      return this instanceof z ? (J.apply(this, arguments), this) : z.apply(Object.create(z.prototype), arguments);
    }
    function He() {
      var w = this;
      pe(w.path, w.flags, w.mode, function(T, x) {
        T ? (w.destroy(), w.emit("error", T)) : (w.fd = x, w.emit("open", x));
      });
    }
    function We(w, T) {
      return new f.ReadStream(w, T);
    }
    function Ve(w, T) {
      return new f.WriteStream(w, T);
    }
    var qe = f.open;
    f.open = pe;
    function pe(w, T, x, H) {
      return typeof x == "function" && (H = x, x = null), W(w, T, x, H);
      function W(L, N, I, R, V) {
        return qe(L, N, I, function($, br) {
          $ && ($.code === "EMFILE" || $.code === "ENFILE") ? g([
            W,
            [
              L,
              N,
              I,
              R
            ],
            $,
            V || Date.now(),
            Date.now()
          ]) : typeof R == "function" && R.apply(this, arguments);
        });
      }
    }
    return f;
  }
  function g(f) {
    h("ENQUEUE", f[0].name, f[1]), n[o].push(f), y();
  }
  var E;
  function v() {
    for (var f = Date.now(), t = 0; t < n[o].length; ++t) n[o][t].length > 2 && (n[o][t][3] = f, n[o][t][4] = f);
    y();
  }
  function y() {
    if (clearTimeout(E), E = void 0, n[o].length !== 0) {
      var f = n[o].shift(), t = f[0], a = f[1], p = f[2], d = f[3], C = f[4];
      if (d === void 0)
        h("RETRY", t.name, a), t.apply(null, a);
      else if (Date.now() - d >= 6e4) {
        h("TIMEOUT", t.name, a);
        var _ = a.pop();
        typeof _ == "function" && _.call(null, p);
      } else {
        var A = Date.now() - C, b = Math.max(C - d, 1);
        A >= Math.min(b * 1.2, 100) ? (h("RETRY", t.name, a), t.apply(null, a.concat([d]))) : n[o].push(f);
      }
      E === void 0 && (E = setTimeout(y, 0));
    }
  }
})), Qe = /* @__PURE__ */ oe(xr(), 1), Kr = /* @__PURE__ */ oe(qr(), 1), Te = /* @__PURE__ */ oe(Jr(), 1), he = kr.homedir(), { env: me } = process, bt = me.XDG_DATA_HOME || (he ? Pe.join(he, ".local", "share") : void 0), Re = me.XDG_CONFIG_HOME || (he ? Pe.join(he, ".config") : void 0), is = me.XDG_STATE_HOME || (he ? Pe.join(he, ".local", "state") : void 0), ss = me.XDG_CACHE_HOME || (he ? Pe.join(he, ".cache") : void 0), os = me.XDG_RUNTIME_DIR || void 0, zr = (me.XDG_DATA_DIRS || "/usr/local/share/:/usr/share/").split(":");
bt && zr.unshift(bt);
var Xr = (me.XDG_CONFIG_DIRS || "/etc/xdg").split(":");
Re && Xr.unshift(Re);
var De = (e, r) => {
  const { onError: n } = r;
  return function(...i) {
    return e.apply(void 0, i).catch(n);
  };
}, ae = (e, r) => {
  const { onError: n } = r;
  return function(...i) {
    try {
      return e.apply(void 0, i);
    } catch (s) {
      return n(s);
    }
  };
}, le = (e, r) => {
  const { isRetriable: n } = r;
  return function(i) {
    const { timeout: s } = i, D = i.interval ?? 250, o = Date.now() + s;
    return function u(...c) {
      return e.apply(void 0, c).catch((F) => {
        if (!n(F) || Date.now() >= o) throw F;
        const h = Math.round(D * Math.random());
        return h > 0 ? new Promise((m) => setTimeout(m, h)).then(() => u.apply(void 0, c)) : u.apply(void 0, c);
      });
    };
  };
}, ce = (e, r) => {
  const { isRetriable: n } = r;
  return function(i) {
    const { timeout: s } = i, D = Date.now() + s;
    return function(...u) {
      for (; ; ) try {
        return e.apply(void 0, u);
      } catch (c) {
        if (!n(c) || Date.now() >= D) throw c;
        continue;
      }
    };
  };
}, Ee = {
  isChangeErrorOk: (e) => {
    if (!Ee.isNodeError(e)) return !1;
    const { code: r } = e;
    return r === "ENOSYS" || !Qr && (r === "EINVAL" || r === "EPERM");
  },
  isNodeError: (e) => e instanceof Error,
  isRetriableError: (e) => {
    if (!Ee.isNodeError(e)) return !1;
    const { code: r } = e;
    return r === "EMFILE" || r === "ENFILE" || r === "EAGAIN" || r === "EBUSY" || r === "EACCESS" || r === "EACCES" || r === "EACCS" || r === "EPERM";
  },
  onChangeError: (e) => {
    if (!Ee.isNodeError(e)) throw e;
    if (!Ee.isChangeErrorOk(e))
      throw e;
  }
}, Be = { onError: Ee.onChangeError }, re = { onError: () => {
} }, Qr = P.getuid ? !P.getuid() : !1, Q = { isRetriable: Ee.isRetriableError }, Z = {
  attempt: {
    chmod: De(X(j.chmod), Be),
    chown: De(X(j.chown), Be),
    close: De(X(j.close), re),
    fsync: De(X(j.fsync), re),
    mkdir: De(X(j.mkdir), re),
    realpath: De(X(j.realpath), re),
    stat: De(X(j.stat), re),
    unlink: De(X(j.unlink), re),
    chmodSync: ae(j.chmodSync, Be),
    chownSync: ae(j.chownSync, Be),
    closeSync: ae(j.closeSync, re),
    existsSync: ae(j.existsSync, re),
    fsyncSync: ae(j.fsync, re),
    mkdirSync: ae(j.mkdirSync, re),
    realpathSync: ae(j.realpathSync, re),
    statSync: ae(j.statSync, re),
    unlinkSync: ae(j.unlinkSync, re)
  },
  retry: {
    close: le(X(j.close), Q),
    fsync: le(X(j.fsync), Q),
    open: le(X(j.open), Q),
    readFile: le(X(j.readFile), Q),
    rename: le(X(j.rename), Q),
    stat: le(X(j.stat), Q),
    write: le(X(j.write), Q),
    writeFile: le(X(j.writeFile), Q),
    closeSync: ce(j.closeSync, Q),
    fsyncSync: ce(j.fsyncSync, Q),
    openSync: ce(j.openSync, Q),
    readFileSync: ce(j.readFileSync, Q),
    renameSync: ce(j.renameSync, Q),
    statSync: ce(j.statSync, Q),
    writeSync: ce(j.writeSync, Q),
    writeFileSync: ce(j.writeFileSync, Q)
  }
};
var Zr = {}, eu = P.geteuid ? P.geteuid() : -1, tu = P.getegid ? P.getegid() : -1;
var ru = !!P.getuid, as = P.getuid ? !P.getuid() : !1, uu = (e) => e instanceof Error && "code" in e, wt = (e) => typeof e == "string", Ye = (e) => e === void 0, nu = P.platform === "linux", ur = P.platform === "win32", ht = [
  "SIGHUP",
  "SIGINT",
  "SIGTERM"
];
ur || ht.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
nu && ht.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
var iu = class {
  constructor() {
    this.callbacks = /* @__PURE__ */ new Set(), this.exited = !1, this.exit = (e) => {
      if (!this.exited) {
        this.exited = !0;
        for (const r of this.callbacks) r();
        e && (ur && e !== "SIGINT" && e !== "SIGTERM" && e !== "SIGKILL" ? P.kill(P.pid, "SIGTERM") : P.kill(P.pid, e));
      }
    }, this.hook = () => {
      P.once("exit", () => this.exit());
      for (const e of ht) try {
        P.once(e, () => this.exit(e));
      } catch {
      }
    }, this.register = (e) => (this.callbacks.add(e), () => {
      this.callbacks.delete(e);
    }), this.hook();
  }
}, su = new iu(), ou = su.register, ee = {
  store: {},
  create: (e) => {
    const r = `000000${Math.floor(Math.random() * 16777215).toString(16)}`.slice(-6);
    return `${e}${`.tmp-${Date.now().toString().slice(-10)}${r}`}`;
  },
  get: (e, r, n = !0) => {
    const l = ee.truncate(r(e));
    return l in ee.store ? ee.get(e, r, n) : (ee.store[l] = n, [l, () => delete ee.store[l]]);
  },
  purge: (e) => {
    ee.store[e] && (delete ee.store[e], Z.attempt.unlink(e));
  },
  purgeSync: (e) => {
    ee.store[e] && (delete ee.store[e], Z.attempt.unlinkSync(e));
  },
  purgeSyncAll: () => {
    for (const e in ee.store) ee.purgeSync(e);
  },
  truncate: (e) => {
    const r = U.basename(e);
    if (r.length <= 128) return e;
    const n = /^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(r);
    if (!n) return e;
    const l = r.length - 128;
    return `${e.slice(0, -r.length)}${n[1]}${n[2].slice(0, -l)}${n[3]}`;
  }
};
ou(ee.purgeSyncAll);
function Ze(e, r, n = Zr) {
  if (wt(n)) return Ze(e, r, { encoding: n });
  const l = { timeout: n.timeout ?? 1e3 };
  let i = null, s = null, D = null;
  try {
    const o = Z.attempt.realpathSync(e), u = !!o;
    e = o || e, [s, i] = ee.get(e, n.tmpCreate || ee.create, n.tmpPurge !== !1);
    const c = ru && Ye(n.chown), F = Ye(n.mode);
    if (u && (c || F)) {
      const h = Z.attempt.statSync(e);
      h && (n = { ...n }, c && (n.chown = {
        uid: h.uid,
        gid: h.gid
      }), F && (n.mode = h.mode));
    }
    if (!u) {
      const h = U.dirname(e);
      Z.attempt.mkdirSync(h, {
        mode: 511,
        recursive: !0
      });
    }
    D = Z.retry.openSync(l)(s, "w", n.mode || 438), n.tmpCreated && n.tmpCreated(s), wt(r) ? Z.retry.writeSync(l)(D, r, 0, n.encoding || "utf8") : Ye(r) || Z.retry.writeSync(l)(D, r, 0, r.length, 0), n.fsync !== !1 && (n.fsyncWait !== !1 ? Z.retry.fsyncSync(l)(D) : Z.attempt.fsync(D)), Z.retry.closeSync(l)(D), D = null, n.chown && (n.chown.uid !== eu || n.chown.gid !== tu) && Z.attempt.chownSync(s, n.chown.uid, n.chown.gid), n.mode && n.mode !== 438 && Z.attempt.chmodSync(s, n.mode);
    try {
      Z.retry.renameSync(l)(s, e);
    } catch (h) {
      if (!uu(h) || h.code !== "ENAMETOOLONG") throw h;
      Z.retry.renameSync(l)(s, ee.truncate(e));
    }
    i(), s = null;
  } finally {
    D && Z.attempt.closeSync(D), s && ee.purge(s);
  }
}
var Fe = (e) => {
  const r = typeof e;
  return e !== null && (r === "object" || r === "function");
}, Je = /* @__PURE__ */ new Set([
  "__proto__",
  "prototype",
  "constructor"
]), au = /* @__PURE__ */ new Set("0123456789");
function Ie(e) {
  const r = [];
  let n = "", l = "start", i = !1;
  for (const s of e) switch (s) {
    case "\\":
      if (l === "index") throw new Error("Invalid character in an index");
      if (l === "indexEnd") throw new Error("Invalid character after an index");
      i && (n += s), l = "property", i = !i;
      break;
    case ".":
      if (l === "index") throw new Error("Invalid character in an index");
      if (l === "indexEnd") {
        l = "property";
        break;
      }
      if (i) {
        i = !1, n += s;
        break;
      }
      if (Je.has(n)) return [];
      r.push(n), n = "", l = "property";
      break;
    case "[":
      if (l === "index") throw new Error("Invalid character in an index");
      if (l === "indexEnd") {
        l = "index";
        break;
      }
      if (i) {
        i = !1, n += s;
        break;
      }
      if (l === "property") {
        if (Je.has(n)) return [];
        r.push(n), n = "";
      }
      l = "index";
      break;
    case "]":
      if (l === "index") {
        r.push(Number.parseInt(n, 10)), n = "", l = "indexEnd";
        break;
      }
      if (l === "indexEnd") throw new Error("Invalid character after an index");
    default:
      if (l === "index" && !au.has(s)) throw new Error("Invalid character in an index");
      if (l === "indexEnd") throw new Error("Invalid character after an index");
      l === "start" && (l = "property"), i && (i = !1, n += "\\"), n += s;
  }
  switch (i && (n += "\\"), l) {
    case "property":
      if (Je.has(n)) return [];
      r.push(n);
      break;
    case "index":
      throw new Error("Index was not closed");
    case "start":
      r.push("");
      break;
  }
  return r;
}
function pt(e, r) {
  if (typeof r != "number" && Array.isArray(e)) {
    const n = Number.parseInt(r, 10);
    return Number.isInteger(n) && e[n] === e[r];
  }
  return !1;
}
function nr(e, r) {
  if (pt(e, r)) throw new Error("Cannot use string index");
}
function Du(e, r, n) {
  if (!Fe(e) || typeof r != "string") return n === void 0 ? e : n;
  const l = Ie(r);
  if (l.length === 0) return n;
  for (let i = 0; i < l.length; i++) {
    const s = l[i];
    if (pt(e, s) ? e = i === l.length - 1 ? void 0 : null : e = e[s], e == null) {
      if (i !== l.length - 1) return n;
      break;
    }
  }
  return e === void 0 ? n : e;
}
function Bt(e, r, n) {
  if (!Fe(e) || typeof r != "string") return e;
  const l = e, i = Ie(r);
  for (let s = 0; s < i.length; s++) {
    const D = i[s];
    nr(e, D), s === i.length - 1 ? e[D] = n : Fe(e[D]) || (e[D] = typeof i[s + 1] == "number" ? [] : {}), e = e[D];
  }
  return l;
}
function lu(e, r) {
  if (!Fe(e) || typeof r != "string") return !1;
  const n = Ie(r);
  for (let l = 0; l < n.length; l++) {
    const i = n[l];
    if (nr(e, i), l === n.length - 1)
      return delete e[i], !0;
    if (e = e[i], !Fe(e)) return !1;
  }
}
function cu(e, r) {
  if (!Fe(e) || typeof r != "string") return !1;
  const n = Ie(r);
  if (n.length === 0) return !1;
  for (const l of n) {
    if (!Fe(e) || !(l in e) || pt(e, l)) return !1;
    e = e[l];
  }
  return !0;
}
function fu(e, r) {
  const n = r ? U.join(e, "config.json") : U.join("configstore", `${e}.json`), l = Re ?? Te.default.mkdtempSync(Te.default.realpathSync(xe.tmpdir()) + U.sep);
  return U.join(l, n);
}
var hu = "You don't have access to this file.", pu = {
  mode: 448,
  recursive: !0
}, Ot = { mode: 384 };
function St(e) {
  throw e.code === "EACCES" && (e.message = `${e.message}
${hu}
`), e;
}
var du = class {
  constructor(e, r, n = {}) {
    this._path = n.configPath ?? fu(e, n.globalConfigPath), this._clearInvalidConfig = n.clearInvalidConfig ?? !0, r && (this.all = {
      ...r,
      ...this.all
    });
  }
  get all() {
    try {
      return JSON.parse(Te.default.readFileSync(this._path, "utf8"));
    } catch (e) {
      if (e.code === "ENOENT") return {};
      if (e.name === "SyntaxError") {
        if (this._clearInvalidConfig)
          return Ze(this._path, "", Ot), {};
        throw e;
      }
      return St(e), {};
    }
  }
  set all(e) {
    try {
      Te.default.mkdirSync(U.dirname(this._path), pu), Ze(this._path, JSON.stringify(e, void 0, "	"), Ot);
    } catch (r) {
      St(r);
    }
  }
  get size() {
    return Object.keys(this.all || {}).length;
  }
  get(e) {
    return Du(this.all, e);
  }
  set(e, r) {
    const n = this.all;
    if (typeof e == "object" && arguments.length === 1) for (const l of Object.keys(e)) Bt(n, l, e[l]);
    else Bt(n, e, r);
    this.all = n;
  }
  has(e) {
    return cu(this.all, e);
  }
  delete(e) {
    const r = this.all;
    lu(r, e), this.all = r;
  }
  clear() {
    this.all = {};
  }
  get path() {
    return this._path;
  }
}, Fu = /* @__PURE__ */ oe(Nr(), 1), mu = /* @__PURE__ */ oe(Pr(), 1), et = class extends Error {
  response;
  request;
  options;
  constructor(e, r, n) {
    const l = `${e.status || e.status === 0 ? e.status : ""} ${e.statusText ?? ""}`.trim(), i = l ? `status code ${l}` : "an unknown error";
    super(`Request failed with ${i}: ${r.method} ${r.url}`), this.name = "HTTPError", this.response = e, this.request = r, this.options = n;
  }
}, ir = class extends Error {
  name = "NonError";
  value;
  constructor(e) {
    let r = "Non-error value was thrown";
    try {
      typeof e == "string" ? r = e : e && typeof e == "object" && "message" in e && typeof e.message == "string" && (r = e.message);
    } catch {
    }
    super(r), this.value = e;
  }
}, Ke = class extends Error {
  name = "ForceRetryError";
  customDelay;
  code;
  customRequest;
  constructor(e) {
    const r = e?.cause ? e.cause instanceof Error ? e.cause : new ir(e.cause) : void 0;
    super(e?.code ? `Forced retry: ${e.code}` : "Forced retry", r ? { cause: r } : void 0), this.customDelay = e?.delay, this.code = e?.code, this.customRequest = e?.request;
  }
}, xt = (() => {
  let e = !1, r = !1;
  const n = typeof globalThis.ReadableStream == "function", l = typeof globalThis.Request == "function";
  if (n && l) try {
    r = new globalThis.Request("https://empty.invalid", {
      body: new globalThis.ReadableStream(),
      method: "POST",
      get duplex() {
        return e = !0, "half";
      }
    }).headers.has("Content-Type");
  } catch (i) {
    if (i instanceof Error && i.message === "unsupported BodyInit type") return !1;
    throw i;
  }
  return e && !r;
})(), gu = typeof globalThis.AbortController == "function", sr = typeof globalThis.AbortSignal == "function" && typeof globalThis.AbortSignal.any == "function", Eu = typeof globalThis.ReadableStream == "function", Cu = typeof globalThis.FormData == "function", or = [
  "get",
  "post",
  "put",
  "patch",
  "head",
  "delete"
], yu = () => {
};
yu();
var vu = {
  json: "application/json",
  text: "text/*",
  formData: "multipart/form-data",
  arrayBuffer: "*/*",
  blob: "*/*",
  bytes: "*/*"
}, Tt = 2147483647, _u = new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length, ar = /* @__PURE__ */ Symbol("stop"), Dr = class {
  options;
  constructor(e) {
    this.options = e;
  }
}, Au = (e) => new Dr(e), bu = {
  json: !0,
  parseJson: !0,
  stringifyJson: !0,
  searchParams: !0,
  prefixUrl: !0,
  retry: !0,
  timeout: !0,
  hooks: !0,
  throwHttpErrors: !0,
  onDownloadProgress: !0,
  onUploadProgress: !0,
  fetch: !0,
  context: !0
}, wu = { next: !0 }, Bu = {
  method: !0,
  headers: !0,
  body: !0,
  mode: !0,
  credentials: !0,
  cache: !0,
  redirect: !0,
  referrer: !0,
  referrerPolicy: !0,
  integrity: !0,
  keepalive: !0,
  signal: !0,
  window: !0,
  duplex: !0
}, Ou = (e) => {
  if (!e) return 0;
  if (e instanceof FormData) {
    let r = 0;
    for (const [n, l] of e)
      r += _u, r += new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length, r += typeof l == "string" ? new TextEncoder().encode(l).length : l.size;
    return r;
  }
  if (e instanceof Blob) return e.size;
  if (e instanceof ArrayBuffer) return e.byteLength;
  if (typeof e == "string") return new TextEncoder().encode(e).length;
  if (e instanceof URLSearchParams) return new TextEncoder().encode(e.toString()).length;
  if ("byteLength" in e) return e.byteLength;
  if (typeof e == "object" && e !== null) try {
    const r = JSON.stringify(e);
    return new TextEncoder().encode(r).length;
  } catch {
    return 0;
  }
  return 0;
}, lr = (e, r, n) => {
  let l, i = 0;
  return e.pipeThrough(new TransformStream({
    transform(s, D) {
      if (D.enqueue(s), l) {
        i += l.byteLength;
        let o = r === 0 ? 0 : i / r;
        o >= 1 && (o = 1 - Number.EPSILON), n?.({
          percent: o,
          totalBytes: Math.max(r, i),
          transferredBytes: i
        }, l);
      }
      l = s;
    },
    flush() {
      l && (i += l.byteLength, n?.({
        percent: 1,
        totalBytes: Math.max(r, i),
        transferredBytes: i
      }, l));
    }
  }));
}, Su = (e, r) => {
  if (!e.body) return e;
  if (e.status === 204) return new Response(null, {
    status: e.status,
    statusText: e.statusText,
    headers: e.headers
  });
  const n = Math.max(0, Number(e.headers.get("content-length")) || 0);
  return new Response(lr(e.body, n, r), {
    status: e.status,
    statusText: e.statusText,
    headers: e.headers
  });
}, xu = (e, r, n) => {
  if (!e.body) return e;
  const l = Ou(n ?? e.body);
  return new Request(e, {
    duplex: "half",
    body: lr(e.body, l, r)
  });
}, de = (e) => e !== null && typeof e == "object", Oe = (...e) => {
  for (const r of e) if ((!de(r) || Array.isArray(r)) && r !== void 0) throw new TypeError("The `options` argument must be an object");
  return dt({}, ...e);
}, cr = (e = {}, r = {}) => {
  const n = new globalThis.Headers(e), l = r instanceof globalThis.Headers, i = new globalThis.Headers(r);
  for (const [s, D] of i.entries()) l && D === "undefined" || D === void 0 ? n.delete(s) : n.set(s, D);
  return n;
};
function Se(e, r, n) {
  return Object.hasOwn(r, n) && r[n] === void 0 ? [] : dt(e[n] ?? [], r[n] ?? []);
}
var fr = (e = {}, r = {}) => ({
  beforeRequest: Se(e, r, "beforeRequest"),
  beforeRetry: Se(e, r, "beforeRetry"),
  afterResponse: Se(e, r, "afterResponse"),
  beforeError: Se(e, r, "beforeError")
}), Tu = (e, r) => {
  const n = new URLSearchParams();
  for (const l of [e, r])
    if (l !== void 0)
      if (l instanceof URLSearchParams) for (const [i, s] of l.entries()) n.append(i, s);
      else if (Array.isArray(l)) for (const i of l) {
        if (!Array.isArray(i) || i.length !== 2) throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");
        n.append(String(i[0]), String(i[1]));
      }
      else if (de(l))
        for (const [i, s] of Object.entries(l)) s !== void 0 && n.append(i, String(s));
      else {
        const i = new URLSearchParams(l);
        for (const [s, D] of i.entries()) n.append(s, D);
      }
  return n;
}, dt = (...e) => {
  let r = {}, n = {}, l = {}, i;
  const s = [];
  for (const D of e) if (Array.isArray(D))
    Array.isArray(r) || (r = []), r = [...r, ...D];
  else if (de(D)) {
    for (let [o, u] of Object.entries(D)) {
      if (o === "signal" && u instanceof globalThis.AbortSignal) {
        s.push(u);
        continue;
      }
      if (o === "context") {
        if (u != null && (!de(u) || Array.isArray(u))) throw new TypeError("The `context` option must be an object");
        r = {
          ...r,
          context: u == null ? {} : {
            ...r.context,
            ...u
          }
        };
        continue;
      }
      if (o === "searchParams") {
        u == null ? i = void 0 : i = i === void 0 ? u : Tu(i, u);
        continue;
      }
      de(u) && o in r && (u = dt(r[o], u)), r = {
        ...r,
        [o]: u
      };
    }
    de(D.hooks) && (l = fr(l, D.hooks), r.hooks = l), de(D.headers) && (n = cr(n, D.headers), r.headers = n);
  }
  return i !== void 0 && (r.searchParams = i), s.length > 0 && (s.length === 1 ? r.signal = s[0] : sr ? r.signal = AbortSignal.any(s) : r.signal = s.at(-1)), r;
}, Ru = (e) => or.includes(e) ? e.toUpperCase() : e, Rt = {
  limit: 2,
  methods: [
    "get",
    "put",
    "head",
    "delete",
    "options",
    "trace"
  ],
  statusCodes: [
    408,
    413,
    429,
    500,
    502,
    503,
    504
  ],
  afterStatusCodes: [
    413,
    429,
    503
  ],
  maxRetryAfter: Number.POSITIVE_INFINITY,
  backoffLimit: Number.POSITIVE_INFINITY,
  delay: (e) => 0.3 * 2 ** (e - 1) * 1e3,
  jitter: void 0,
  retryOnTimeout: !1
}, $u = (e = {}) => {
  if (typeof e == "number") return {
    ...Rt,
    limit: e
  };
  if (e.methods && !Array.isArray(e.methods)) throw new Error("retry.methods must be an array");
  if (e.methods &&= e.methods.map((n) => n.toLowerCase()), e.statusCodes && !Array.isArray(e.statusCodes)) throw new Error("retry.statusCodes must be an array");
  const r = Object.fromEntries(Object.entries(e).filter(([, n]) => n !== void 0));
  return {
    ...Rt,
    ...r
  };
}, tt = class extends Error {
  request;
  constructor(e) {
    super(`Request timed out: ${e.method} ${e.url}`), this.name = "TimeoutError", this.request = e;
  }
};
async function Pu(e, r, n, l) {
  return new Promise((i, s) => {
    const D = setTimeout(() => {
      n && n.abort(), s(new tt(e));
    }, l.timeout);
    l.fetch(e, r).then(i).catch(s).then(() => {
      clearTimeout(D);
    });
  });
}
async function Nu(e, { signal: r }) {
  return new Promise((n, l) => {
    r && (r.throwIfAborted(), r.addEventListener("abort", i, { once: !0 }));
    function i() {
      clearTimeout(s), l(r.reason);
    }
    const s = setTimeout(() => {
      r?.removeEventListener("abort", i), n();
    }, e);
  });
}
var Iu = (e, r) => {
  const n = {};
  for (const l in r)
    Object.hasOwn(r, l) && !(l in Bu) && !(l in bu) && (!(l in e) || l in wu) && (n[l] = r[l]);
  return n;
}, ku = (e) => e === void 0 ? !1 : Array.isArray(e) ? e.length > 0 : e instanceof URLSearchParams ? e.size > 0 : typeof e == "object" ? Object.keys(e).length > 0 : typeof e == "string" ? e.trim().length > 0 : !!e;
function ju(e) {
  return e instanceof et || e?.name === et.name;
}
function Lu(e) {
  return e instanceof tt || e?.name === tt.name;
}
var $t = class rt {
  static create(r, n) {
    const l = new rt(r, n), i = async () => {
      if (typeof l.#e.timeout == "number" && l.#e.timeout > 2147483647) throw new RangeError(`The \`timeout\` option cannot be greater than ${Tt}`);
      await Promise.resolve();
      let D = await l.#m();
      for (const o of l.#e.hooks.afterResponse) {
        const u = l.#h(D.clone());
        let c;
        try {
          c = await o(l.request, l.#D(), u, { retryCount: l.#u });
        } catch (h) {
          throw l.#i(u), l.#i(D), h;
        }
        if (c instanceof Dr)
          throw l.#i(u), l.#i(D), new Ke(c.options);
        const F = c instanceof globalThis.Response ? c : D;
        u !== F && l.#i(u), D !== F && l.#i(D), D = F;
      }
      if (l.#h(D), !D.ok && (typeof l.#e.throwHttpErrors == "function" ? l.#e.throwHttpErrors(D.status) : l.#e.throwHttpErrors)) {
        let o = new et(D, l.request, l.#D());
        for (const u of l.#e.hooks.beforeError) o = await u(o, { retryCount: l.#u });
        throw o;
      }
      if (l.#e.onDownloadProgress) {
        if (typeof l.#e.onDownloadProgress != "function") throw new TypeError("The `onDownloadProgress` option must be a function");
        if (!Eu) throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");
        const o = D.clone();
        return l.#i(D), Su(o, l.#e.onDownloadProgress);
      }
      return D;
    }, s = l.#p(i).finally(() => {
      const D = l.#o;
      l.#c(D?.body ?? void 0), l.#c(l.request.body ?? void 0);
    });
    for (const [D, o] of Object.entries(vu))
      D === "bytes" && typeof globalThis.Response?.prototype?.bytes != "function" || (s[D] = async () => {
        l.request.headers.set("accept", l.request.headers.get("accept") || o);
        const u = await s;
        if (D === "json") {
          if (u.status === 204) return "";
          const c = await u.text();
          return c === "" ? "" : n.parseJson ? n.parseJson(c) : JSON.parse(c);
        }
        return u[D]();
      });
    return s;
  }
  static #s(r) {
    return r && typeof r == "object" && !Array.isArray(r) && !(r instanceof URLSearchParams) ? Object.fromEntries(Object.entries(r).filter(([, n]) => n !== void 0)) : r;
  }
  request;
  #r;
  #u = 0;
  #t;
  #e;
  #o;
  #n;
  #a;
  constructor(r, n = {}) {
    if (this.#t = r, this.#e = {
      ...n,
      headers: cr(this.#t.headers, n.headers),
      hooks: fr({
        beforeRequest: [],
        beforeRetry: [],
        beforeError: [],
        afterResponse: []
      }, n.hooks),
      method: Ru(n.method ?? this.#t.method ?? "GET"),
      prefixUrl: String(n.prefixUrl || ""),
      retry: $u(n.retry),
      throwHttpErrors: n.throwHttpErrors ?? !0,
      timeout: n.timeout ?? 1e4,
      fetch: n.fetch ?? globalThis.fetch.bind(globalThis),
      context: n.context ?? {}
    }, typeof this.#t != "string" && !(this.#t instanceof URL || this.#t instanceof globalThis.Request)) throw new TypeError("`input` must be a string, URL, or Request");
    if (this.#e.prefixUrl && typeof this.#t == "string") {
      if (this.#t.startsWith("/")) throw new Error("`input` must not begin with a slash when using `prefixUrl`");
      this.#e.prefixUrl.endsWith("/") || (this.#e.prefixUrl += "/"), this.#t = this.#e.prefixUrl + this.#t;
    }
    gu && sr && (this.#n = this.#e.signal ?? this.#t.signal, this.#r = new globalThis.AbortController(), this.#e.signal = this.#n ? AbortSignal.any([this.#n, this.#r.signal]) : this.#r.signal), xt && (this.#e.duplex = "half"), this.#e.json !== void 0 && (this.#e.body = this.#e.stringifyJson?.(this.#e.json) ?? JSON.stringify(this.#e.json), this.#e.headers.set("content-type", this.#e.headers.get("content-type") ?? "application/json"));
    const l = n.headers && new globalThis.Headers(n.headers).has("content-type");
    if (this.#t instanceof globalThis.Request && (Cu && this.#e.body instanceof globalThis.FormData || this.#e.body instanceof URLSearchParams) && !l && this.#e.headers.delete("content-type"), this.request = new globalThis.Request(this.#t, this.#e), ku(this.#e.searchParams)) {
      const i = "?" + (typeof this.#e.searchParams == "string" ? this.#e.searchParams.replace(/^\?/, "") : new URLSearchParams(rt.#s(this.#e.searchParams)).toString()), s = this.request.url.replace(/(?:\?.*?)?(?=#|$)/, i);
      this.request = new globalThis.Request(s, this.#e);
    }
    if (this.#e.onUploadProgress) {
      if (typeof this.#e.onUploadProgress != "function") throw new TypeError("The `onUploadProgress` option must be a function");
      if (!xt) throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");
      this.request = this.#d(this.request, this.#e.body ?? void 0);
    }
  }
  #l() {
    const r = this.#e.retry.delay(this.#u);
    let n = r;
    this.#e.retry.jitter === !0 ? n = Math.random() * r : typeof this.#e.retry.jitter == "function" && (n = this.#e.retry.jitter(r), (!Number.isFinite(n) || n < 0) && (n = r));
    const l = this.#e.retry.backoffLimit ?? Number.POSITIVE_INFINITY;
    return Math.min(l, n);
  }
  async #F(r) {
    if (this.#u++, this.#u > this.#e.retry.limit) throw r;
    const n = r instanceof Error ? r : new ir(r);
    if (n instanceof Ke) return n.customDelay ?? this.#l();
    if (!this.#e.retry.methods.includes(this.request.method.toLowerCase())) throw r;
    if (this.#e.retry.shouldRetry !== void 0) {
      const l = await this.#e.retry.shouldRetry({
        error: n,
        retryCount: this.#u
      });
      if (l === !1) throw r;
      if (l === !0) return this.#l();
    }
    if (Lu(r) && !this.#e.retry.retryOnTimeout) throw r;
    if (ju(r)) {
      if (!this.#e.retry.statusCodes.includes(r.response.status)) throw r;
      const l = r.response.headers.get("Retry-After") ?? r.response.headers.get("RateLimit-Reset") ?? r.response.headers.get("X-RateLimit-Retry-After") ?? r.response.headers.get("X-RateLimit-Reset") ?? r.response.headers.get("X-Rate-Limit-Reset");
      if (l && this.#e.retry.afterStatusCodes.includes(r.response.status)) {
        let i = Number(l) * 1e3;
        Number.isNaN(i) ? i = Date.parse(l) - Date.now() : i >= Date.parse("2024-01-01") && (i -= Date.now());
        const s = this.#e.retry.maxRetryAfter ?? i;
        return i < s ? i : s;
      }
      if (r.response.status === 413) throw r;
    }
    return this.#l();
  }
  #h(r) {
    return this.#e.parseJson && (r.json = async () => this.#e.parseJson(await r.text())), r;
  }
  #c(r) {
    r && r.cancel().catch(() => {
    });
  }
  #i(r) {
    this.#c(r.body ?? void 0);
  }
  async #p(r) {
    try {
      return await r();
    } catch (n) {
      const l = Math.min(await this.#F(n), Tt);
      if (this.#u < 1) throw n;
      if (await Nu(l, this.#n ? { signal: this.#n } : {}), n instanceof Ke && n.customRequest) {
        const i = this.#e.signal ? new globalThis.Request(n.customRequest, { signal: this.#e.signal }) : new globalThis.Request(n.customRequest);
        this.#f(i);
      }
      for (const i of this.#e.hooks.beforeRetry) {
        const s = await i({
          request: this.request,
          options: this.#D(),
          error: n,
          retryCount: this.#u
        });
        if (s instanceof globalThis.Request) {
          this.#f(s);
          break;
        }
        if (s instanceof globalThis.Response) return s;
        if (s === ar) return;
      }
      return this.#p(r);
    }
  }
  async #m() {
    this.#r?.signal.aborted && (this.#r = new globalThis.AbortController(), this.#e.signal = this.#n ? AbortSignal.any([this.#n, this.#r.signal]) : this.#r.signal, this.request = new globalThis.Request(this.request, { signal: this.#e.signal }));
    for (const n of this.#e.hooks.beforeRequest) {
      const l = await n(this.request, this.#D(), { retryCount: this.#u });
      if (l instanceof Response) return l;
      if (l instanceof globalThis.Request) {
        this.#f(l);
        break;
      }
    }
    const r = Iu(this.request, this.#e);
    return this.#o = this.request, this.request = this.#o.clone(), this.#e.timeout === !1 ? this.#e.fetch(this.#o, r) : Pu(this.#o, r, this.#r, this.#e);
  }
  #D() {
    if (!this.#a) {
      const { hooks: r, ...n } = this.#e;
      this.#a = Object.freeze(n);
    }
    return this.#a;
  }
  #f(r) {
    this.#a = void 0, this.request = this.#d(r);
  }
  #d(r, n) {
    return !this.#e.onUploadProgress || !r.body ? r : xu(r, this.#e.onUploadProgress, n ?? this.#e.body ?? void 0);
  }
}, ut = (e) => {
  const r = (n, l) => $t.create(n, Oe(e, l));
  for (const n of or) r[n] = (l, i) => $t.create(l, Oe(e, i, { method: n }));
  return r.create = (n) => ut(Oe(n)), r.extend = (n) => (typeof n == "function" && (n = n(e ?? {})), ut(Oe(e, n))), r.stop = ar, r.retry = Au, r;
}, Mu = ut(), Hu = /* @__PURE__ */ k(((e) => {
  e.parse = e.decode = i, e.stringify = e.encode = n, e.safe = D, e.unsafe = o;
  var r = typeof process < "u" && process.platform === "win32" ? `\r
` : `
`;
  function n(u, c) {
    var F = [], h = "";
    typeof c == "string" ? c = {
      section: c,
      whitespace: !1
    } : (c = c || {}, c.whitespace = c.whitespace === !0);
    var m = c.whitespace ? " = " : "=";
    return Object.keys(u).forEach(function(g, E, v) {
      var y = u[g];
      y && Array.isArray(y) ? y.forEach(function(f) {
        h += D(g + "[]") + m + D(f) + `
`;
      }) : y && typeof y == "object" ? F.push(g) : h += D(g) + m + D(y) + r;
    }), c.section && h.length && (h = "[" + D(c.section) + "]" + r + h), F.forEach(function(g, E, v) {
      var y = l(g).join("\\."), f = (c.section ? c.section + "." : "") + y, t = n(u[g], {
        section: f,
        whitespace: c.whitespace
      });
      h.length && t.length && (h += r), h += t;
    }), h;
  }
  function l(u) {
    return u.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map(function(c) {
      return c.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "");
    });
  }
  function i(u) {
    var c = {}, F = c, h = null, m = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;
    return u.split(/[\r\n]+/g).forEach(function(g, E, v) {
      if (!(!g || g.match(/^\s*[;#]/))) {
        var y = g.match(m);
        if (y) {
          if (y[1] !== void 0) {
            if (h = o(y[1]), h === "__proto__") {
              F = {};
              return;
            }
            F = c[h] = c[h] || {};
            return;
          }
          var f = o(y[2]);
          if (f !== "__proto__") {
            var t = y[3] ? o(y[4]) : !0;
            switch (t) {
              case "true":
              case "false":
              case "null":
                t = JSON.parse(t);
            }
            if (f.length > 2 && f.slice(-2) === "[]") {
              if (f = f.substring(0, f.length - 2), f === "__proto__") return;
              F[f] ? Array.isArray(F[f]) || (F[f] = [F[f]]) : F[f] = [];
            }
            Array.isArray(F[f]) ? F[f].push(t) : F[f] = t;
          }
        }
      }
    }), Object.keys(c).filter(function(g, E, v) {
      if (!c[g] || typeof c[g] != "object" || Array.isArray(c[g])) return !1;
      var y = l(g), f = c, t = y.pop(), a = t.replace(/\\\./g, ".");
      return y.forEach(function(p, d, C) {
        p !== "__proto__" && ((!f[p] || typeof f[p] != "object") && (f[p] = {}), f = f[p]);
      }), f === c && a === t ? !1 : (f[a] = c[g], !0);
    }).forEach(function(g, E, v) {
      delete c[g];
    }), c;
  }
  function s(u) {
    return u.charAt(0) === '"' && u.slice(-1) === '"' || u.charAt(0) === "'" && u.slice(-1) === "'";
  }
  function D(u) {
    return typeof u != "string" || u.match(/[=\r\n]/) || u.match(/^\[/) || u.length > 1 && s(u) || u !== u.trim() ? JSON.stringify(u) : u.replace(/;/g, "\\;").replace(/#/g, "\\#");
  }
  function o(u, c) {
    if (u = (u || "").trim(), s(u)) {
      u.charAt(0) === "'" && (u = u.substr(1, u.length - 2));
      try {
        u = JSON.parse(u);
      } catch {
      }
    } else {
      for (var F = !1, h = "", m = 0, g = u.length; m < g; m++) {
        var E = u.charAt(m);
        if (F)
          "\\;#".indexOf(E) !== -1 ? h += E : h += "\\" + E, F = !1;
        else {
          if (";#".indexOf(E) !== -1) break;
          E === "\\" ? F = !0 : h += E;
        }
      }
      return F && (h += "\\"), h.trim();
    }
    return u;
  }
})), Wu = /* @__PURE__ */ k(((e, r) => {
  var n = 1, l = 2;
  function i() {
    return "";
  }
  function s(D, o, u) {
    return D.slice(o, u).replace(/\S/g, " ");
  }
  r.exports = function(D, o) {
    o = o || {};
    for (var u, c, F = !1, h = !1, m = 0, g = "", E = o.whitespace === !1 ? i : s, v = 0; v < D.length; v++)
      if (u = D[v], c = D[v + 1], !h && u === '"' && (D[v - 1] === "\\" && D[v - 2] !== "\\" || (F = !F)), !F) {
        if (!h && u + c === "//")
          g += D.slice(m, v), m = v, h = n, v++;
        else if (h === n && u + c === `\r
`) {
          v++, h = !1, g += E(D, m, v), m = v;
          continue;
        } else if (h === n && u === `
`)
          h = !1, g += E(D, m, v), m = v;
        else if (!h && u + c === "/*") {
          g += D.slice(m, v), m = v, h = l, v++;
          continue;
        } else if (h === l && u + c === "*/") {
          v++, h = !1, g += E(D, m, v + 1), m = v + 1;
          continue;
        }
      }
    return g + (h ? E(D.substr(m)) : D.substr(m));
  };
})), Vu = /* @__PURE__ */ k(((e) => {
  var r = M("fs"), n = Hu(), l = M("path"), i = Wu(), s = e.parse = function(o) {
    return /^\s*{/.test(o) ? JSON.parse(i(o)) : n.parse(o);
  }, D = e.file = function() {
    var o = [].slice.call(arguments).filter(function(F) {
      return F != null;
    });
    for (var u in o) if (typeof o[u] != "string") return;
    var c = l.join.apply(null, o);
    try {
      return r.readFileSync(c, "utf-8");
    } catch {
      return;
    }
  };
  e.json = function() {
    var o = D.apply(null, arguments);
    return o ? s(o) : null;
  }, e.env = function(o, u) {
    u = u || process.env;
    var c = {}, F = o.length;
    for (var h in u) if (h.toLowerCase().indexOf(o.toLowerCase()) === 0) {
      for (var m = h.substring(F).split("__"), g; (g = m.indexOf("")) > -1; ) m.splice(g, 1);
      var E = c;
      m.forEach(function(y, f) {
        !y || typeof E != "object" || (f === m.length - 1 && (E[y] = u[h]), E[y] === void 0 && (E[y] = {}), E = E[y]);
      });
    }
    return c;
  }, e.find = function() {
    var o = l.join.apply(null, [].slice.call(arguments));
    function u(c, F) {
      var h = l.join(c, F);
      try {
        return r.statSync(h), h;
      } catch {
        if (l.dirname(c) !== c) return u(l.dirname(c), F);
      }
    }
    return u(process.cwd(), o);
  };
})), qu = /* @__PURE__ */ k(((e, r) => {
  function n(o) {
    return o instanceof Buffer || o instanceof Date || o instanceof RegExp;
  }
  function l(o) {
    if (o instanceof Buffer) {
      var u = Buffer.alloc ? Buffer.alloc(o.length) : new Buffer(o.length);
      return o.copy(u), u;
    } else {
      if (o instanceof Date) return new Date(o.getTime());
      if (o instanceof RegExp) return new RegExp(o);
      throw new Error("Unexpected situation");
    }
  }
  function i(o) {
    var u = [];
    return o.forEach(function(c, F) {
      typeof c == "object" && c !== null ? Array.isArray(c) ? u[F] = i(c) : n(c) ? u[F] = l(c) : u[F] = D({}, c) : u[F] = c;
    }), u;
  }
  function s(o, u) {
    return u === "__proto__" ? void 0 : o[u];
  }
  var D = r.exports = function() {
    if (arguments.length < 1 || typeof arguments[0] != "object") return !1;
    if (arguments.length < 2) return arguments[0];
    var o = arguments[0], u = Array.prototype.slice.call(arguments, 1), c, F;
    return u.forEach(function(h) {
      typeof h != "object" || h === null || Array.isArray(h) || Object.keys(h).forEach(function(m) {
        if (F = s(o, m), c = s(h, m), c !== o)
          if (typeof c != "object" || c === null) {
            o[m] = c;
            return;
          } else if (Array.isArray(c)) {
            o[m] = i(c);
            return;
          } else if (n(c)) {
            o[m] = l(c);
            return;
          } else if (typeof F != "object" || F === null || Array.isArray(F)) {
            o[m] = D({}, c);
            return;
          } else {
            o[m] = D(F, c);
            return;
          }
      });
    }), o;
  };
})), Uu = /* @__PURE__ */ k(((e, r) => {
  function n(s, D) {
    var o = s;
    return D.slice(0, -1).forEach(function(u) {
      o = o[u] || {};
    }), D[D.length - 1] in o;
  }
  function l(s) {
    return typeof s == "number" || /^0x[0-9a-f]+$/i.test(s) ? !0 : /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(s);
  }
  function i(s, D) {
    return D === "constructor" && typeof s[D] == "function" || D === "__proto__";
  }
  r.exports = function(s, D) {
    D || (D = {});
    var o = {
      bools: {},
      strings: {},
      unknownFn: null
    };
    typeof D.unknown == "function" && (o.unknownFn = D.unknown), typeof D.boolean == "boolean" && D.boolean ? o.allBools = !0 : [].concat(D.boolean).filter(Boolean).forEach(function(b) {
      o.bools[b] = !0;
    });
    var u = {};
    function c(b) {
      return u[b].some(function(O) {
        return o.bools[O];
      });
    }
    Object.keys(D.alias || {}).forEach(function(b) {
      u[b] = [].concat(D.alias[b]), u[b].forEach(function(O) {
        u[O] = [b].concat(u[b].filter(function(B) {
          return O !== B;
        }));
      });
    }), [].concat(D.string).filter(Boolean).forEach(function(b) {
      o.strings[b] = !0, u[b] && [].concat(u[b]).forEach(function(O) {
        o.strings[O] = !0;
      });
    });
    var F = D.default || {}, h = { _: [] };
    function m(b, O) {
      return o.allBools && /^--[^=]+$/.test(O) || o.strings[b] || o.bools[b] || u[b];
    }
    function g(b, O, B) {
      for (var S = b, q = 0; q < O.length - 1; q++) {
        var Y = O[q];
        if (i(S, Y)) return;
        S[Y] === void 0 && (S[Y] = {}), (S[Y] === Object.prototype || S[Y] === Number.prototype || S[Y] === String.prototype) && (S[Y] = {}), S[Y] === Array.prototype && (S[Y] = []), S = S[Y];
      }
      var J = O[O.length - 1];
      i(S, J) || ((S === Object.prototype || S === Number.prototype || S === String.prototype) && (S = {}), S === Array.prototype && (S = []), S[J] === void 0 || o.bools[J] || typeof S[J] == "boolean" ? S[J] = B : Array.isArray(S[J]) ? S[J].push(B) : S[J] = [S[J], B]);
    }
    function E(b, O, B) {
      if (!(B && o.unknownFn && !m(b, B) && o.unknownFn(B) === !1)) {
        var S = !o.strings[b] && l(O) ? Number(O) : O;
        g(h, b.split("."), S), (u[b] || []).forEach(function(q) {
          g(h, q.split("."), S);
        });
      }
    }
    Object.keys(o.bools).forEach(function(b) {
      E(b, F[b] === void 0 ? !1 : F[b]);
    });
    var v = [];
    s.indexOf("--") !== -1 && (v = s.slice(s.indexOf("--") + 1), s = s.slice(0, s.indexOf("--")));
    for (var y = 0; y < s.length; y++) {
      var f = s[y], t, a;
      if (/^--.+=/.test(f)) {
        var p = f.match(/^--([^=]+)=([\s\S]*)$/);
        t = p[1];
        var d = p[2];
        o.bools[t] && (d = d !== "false"), E(t, d, f);
      } else if (/^--no-.+/.test(f))
        t = f.match(/^--no-(.+)/)[1], E(t, !1, f);
      else if (/^--.+/.test(f))
        t = f.match(/^--(.+)/)[1], a = s[y + 1], a !== void 0 && !/^(-|--)[^-]/.test(a) && !o.bools[t] && !o.allBools && (!u[t] || !c(t)) ? (E(t, a, f), y += 1) : /^(true|false)$/.test(a) ? (E(t, a === "true", f), y += 1) : E(t, o.strings[t] ? "" : !0, f);
      else if (/^-[^-]+/.test(f)) {
        for (var C = f.slice(1, -1).split(""), _ = !1, A = 0; A < C.length; A++) {
          if (a = f.slice(A + 2), a === "-") {
            E(C[A], a, f);
            continue;
          }
          if (/[A-Za-z]/.test(C[A]) && a[0] === "=") {
            E(C[A], a.slice(1), f), _ = !0;
            break;
          }
          if (/[A-Za-z]/.test(C[A]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(a)) {
            E(C[A], a, f), _ = !0;
            break;
          }
          if (C[A + 1] && C[A + 1].match(/\W/)) {
            E(C[A], f.slice(A + 2), f), _ = !0;
            break;
          } else E(C[A], o.strings[C[A]] ? "" : !0, f);
        }
        t = f.slice(-1)[0], !_ && t !== "-" && (s[y + 1] && !/^(-|--)[^-]/.test(s[y + 1]) && !o.bools[t] && (!u[t] || !c(t)) ? (E(t, s[y + 1], f), y += 1) : s[y + 1] && /^(true|false)$/.test(s[y + 1]) ? (E(t, s[y + 1] === "true", f), y += 1) : E(t, o.strings[t] ? "" : !0, f));
      } else if ((!o.unknownFn || o.unknownFn(f) !== !1) && h._.push(o.strings._ || !l(f) ? f : Number(f)), D.stopEarly) {
        h._.push.apply(h._, s.slice(y + 1));
        break;
      }
    }
    return Object.keys(F).forEach(function(b) {
      n(h, b.split(".")) || (g(h, b.split("."), F[b]), (u[b] || []).forEach(function(O) {
        g(h, O.split("."), F[b]);
      }));
    }), D["--"] ? h["--"] = v.slice() : v.forEach(function(b) {
      h._.push(b);
    }), h;
  };
})), Gu = /* @__PURE__ */ k(((e, r) => {
  var n = Vu(), l = M("path").join, i = qu(), s = "/etc", D = process.platform === "win32", o = D ? process.env.USERPROFILE : process.env.HOME;
  r.exports = function(u, c, F, h) {
    if (typeof u != "string") throw new Error("rc(name): name *must* be string");
    F || (F = Uu()(process.argv.slice(2))), c = (typeof c == "string" ? n.json(c) : c) || {}, h = h || n.parse;
    var m = n.env(u + "_"), g = [c], E = [];
    function v(y) {
      if (!(E.indexOf(y) >= 0)) {
        var f = n.file(y);
        f && (g.push(h(f)), E.push(y));
      }
    }
    return D || [l(s, u, "config"), l(s, u + "rc")].forEach(v), o && [
      l(o, ".config", u, "config"),
      l(o, ".config", u),
      l(o, "." + u, "config"),
      l(o, "." + u + "rc")
    ].forEach(v), v(n.find("." + u + "rc")), m.config && v(m.config), F.config && v(F.config), i.apply(null, g.concat([
      m,
      F,
      E.length ? {
        configs: E,
        config: E[E.length - 1]
      } : void 0
    ]));
  };
})), Yu = /* @__PURE__ */ oe(Gu(), 1);
function Ju(e) {
  const r = (0, Yu.default)("npm", { registry: "https://registry.npmjs.org/" }), n = r[`${e}:registry`] || r.config_registry || r.registry;
  return n.slice(-1) === "/" ? n : `${n}/`;
}
var Ku = /* @__PURE__ */ k(((e, r) => {
  var n = M("constants"), l = process.cwd, i = null, s = process.env.GRACEFUL_FS_PLATFORM || process.platform;
  process.cwd = function() {
    return i || (i = l.call(process)), i;
  };
  try {
    process.cwd();
  } catch {
  }
  if (typeof process.chdir == "function") {
    var D = process.chdir;
    process.chdir = function(u) {
      i = null, D.call(process, u);
    }, Object.setPrototypeOf && Object.setPrototypeOf(process.chdir, D);
  }
  r.exports = o;
  function o(u) {
    n.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) && c(u), u.lutimes || F(u), u.chown = g(u.chown), u.fchown = g(u.fchown), u.lchown = g(u.lchown), u.chmod = h(u.chmod), u.fchmod = h(u.fchmod), u.lchmod = h(u.lchmod), u.chownSync = E(u.chownSync), u.fchownSync = E(u.fchownSync), u.lchownSync = E(u.lchownSync), u.chmodSync = m(u.chmodSync), u.fchmodSync = m(u.fchmodSync), u.lchmodSync = m(u.lchmodSync), u.stat = v(u.stat), u.fstat = v(u.fstat), u.lstat = v(u.lstat), u.statSync = y(u.statSync), u.fstatSync = y(u.fstatSync), u.lstatSync = y(u.lstatSync), u.chmod && !u.lchmod && (u.lchmod = function(t, a, p) {
      p && process.nextTick(p);
    }, u.lchmodSync = function() {
    }), u.chown && !u.lchown && (u.lchown = function(t, a, p, d) {
      d && process.nextTick(d);
    }, u.lchownSync = function() {
    }), s === "win32" && (u.rename = typeof u.rename != "function" ? u.rename : (function(t) {
      function a(p, d, C) {
        var _ = Date.now(), A = 0;
        t(p, d, function b(O) {
          if (O && (O.code === "EACCES" || O.code === "EPERM") && Date.now() - _ < 6e4) {
            setTimeout(function() {
              u.stat(d, function(B, S) {
                B && B.code === "ENOENT" ? t(p, d, b) : C(O);
              });
            }, A), A < 100 && (A += 10);
            return;
          }
          C && C(O);
        });
      }
      return Object.setPrototypeOf && Object.setPrototypeOf(a, t), a;
    })(u.rename)), u.read = typeof u.read != "function" ? u.read : (function(t) {
      function a(p, d, C, _, A, b) {
        var O;
        if (b && typeof b == "function") {
          var B = 0;
          O = function(S, q, Y) {
            if (S && S.code === "EAGAIN" && B < 10)
              return B++, t.call(u, p, d, C, _, A, O);
            b.apply(this, arguments);
          };
        }
        return t.call(u, p, d, C, _, A, O);
      }
      return Object.setPrototypeOf && Object.setPrototypeOf(a, t), a;
    })(u.read), u.readSync = typeof u.readSync != "function" ? u.readSync : /* @__PURE__ */ (function(t) {
      return function(a, p, d, C, _) {
        for (var A = 0; ; ) try {
          return t.call(u, a, p, d, C, _);
        } catch (b) {
          if (b.code === "EAGAIN" && A < 10) {
            A++;
            continue;
          }
          throw b;
        }
      };
    })(u.readSync);
    function c(t) {
      t.lchmod = function(a, p, d) {
        t.open(a, n.O_WRONLY | n.O_SYMLINK, p, function(C, _) {
          if (C) {
            d && d(C);
            return;
          }
          t.fchmod(_, p, function(A) {
            t.close(_, function(b) {
              d && d(A || b);
            });
          });
        });
      }, t.lchmodSync = function(a, p) {
        var d = t.openSync(a, n.O_WRONLY | n.O_SYMLINK, p), C = !0, _;
        try {
          _ = t.fchmodSync(d, p), C = !1;
        } finally {
          if (C) try {
            t.closeSync(d);
          } catch {
          }
          else t.closeSync(d);
        }
        return _;
      };
    }
    function F(t) {
      n.hasOwnProperty("O_SYMLINK") && t.futimes ? (t.lutimes = function(a, p, d, C) {
        t.open(a, n.O_SYMLINK, function(_, A) {
          if (_) {
            C && C(_);
            return;
          }
          t.futimes(A, p, d, function(b) {
            t.close(A, function(O) {
              C && C(b || O);
            });
          });
        });
      }, t.lutimesSync = function(a, p, d) {
        var C = t.openSync(a, n.O_SYMLINK), _, A = !0;
        try {
          _ = t.futimesSync(C, p, d), A = !1;
        } finally {
          if (A) try {
            t.closeSync(C);
          } catch {
          }
          else t.closeSync(C);
        }
        return _;
      }) : t.futimes && (t.lutimes = function(a, p, d, C) {
        C && process.nextTick(C);
      }, t.lutimesSync = function() {
      });
    }
    function h(t) {
      return t && function(a, p, d) {
        return t.call(u, a, p, function(C) {
          f(C) && (C = null), d && d.apply(this, arguments);
        });
      };
    }
    function m(t) {
      return t && function(a, p) {
        try {
          return t.call(u, a, p);
        } catch (d) {
          if (!f(d)) throw d;
        }
      };
    }
    function g(t) {
      return t && function(a, p, d, C) {
        return t.call(u, a, p, d, function(_) {
          f(_) && (_ = null), C && C.apply(this, arguments);
        });
      };
    }
    function E(t) {
      return t && function(a, p, d) {
        try {
          return t.call(u, a, p, d);
        } catch (C) {
          if (!f(C)) throw C;
        }
      };
    }
    function v(t) {
      return t && function(a, p, d) {
        typeof p == "function" && (d = p, p = null);
        function C(_, A) {
          A && (A.uid < 0 && (A.uid += 4294967296), A.gid < 0 && (A.gid += 4294967296)), d && d.apply(this, arguments);
        }
        return p ? t.call(u, a, p, C) : t.call(u, a, C);
      };
    }
    function y(t) {
      return t && function(a, p) {
        var d = p ? t.call(u, a, p) : t.call(u, a);
        return d && (d.uid < 0 && (d.uid += 4294967296), d.gid < 0 && (d.gid += 4294967296)), d;
      };
    }
    function f(t) {
      return !t || t.code === "ENOSYS" || (!process.getuid || process.getuid() !== 0) && (t.code === "EINVAL" || t.code === "EPERM");
    }
  }
})), zu = /* @__PURE__ */ k(((e, r) => {
  var n = M("stream").Stream;
  r.exports = l;
  function l(i) {
    return {
      ReadStream: s,
      WriteStream: D
    };
    function s(o, u) {
      if (!(this instanceof s)) return new s(o, u);
      n.call(this);
      var c = this;
      this.path = o, this.fd = null, this.readable = !0, this.paused = !1, this.flags = "r", this.mode = 438, this.bufferSize = 64 * 1024, u = u || {};
      for (var F = Object.keys(u), h = 0, m = F.length; h < m; h++) {
        var g = F[h];
        this[g] = u[g];
      }
      if (this.encoding && this.setEncoding(this.encoding), this.start !== void 0) {
        if (typeof this.start != "number") throw TypeError("start must be a Number");
        if (this.end === void 0) this.end = 1 / 0;
        else if (typeof this.end != "number") throw TypeError("end must be a Number");
        if (this.start > this.end) throw new Error("start must be <= end");
        this.pos = this.start;
      }
      if (this.fd !== null) {
        process.nextTick(function() {
          c._read();
        });
        return;
      }
      i.open(this.path, this.flags, this.mode, function(E, v) {
        if (E) {
          c.emit("error", E), c.readable = !1;
          return;
        }
        c.fd = v, c.emit("open", v), c._read();
      });
    }
    function D(o, u) {
      if (!(this instanceof D)) return new D(o, u);
      n.call(this), this.path = o, this.fd = null, this.writable = !0, this.flags = "w", this.encoding = "binary", this.mode = 438, this.bytesWritten = 0, u = u || {};
      for (var c = Object.keys(u), F = 0, h = c.length; F < h; F++) {
        var m = c[F];
        this[m] = u[m];
      }
      if (this.start !== void 0) {
        if (typeof this.start != "number") throw TypeError("start must be a Number");
        if (this.start < 0) throw new Error("start must be >= zero");
        this.pos = this.start;
      }
      this.busy = !1, this._queue = [], this.fd === null && (this._open = i.open, this._queue.push([
        this._open,
        this.path,
        this.flags,
        this.mode,
        void 0
      ]), this.flush());
    }
  }
})), Xu = /* @__PURE__ */ k(((e, r) => {
  r.exports = l;
  var n = Object.getPrototypeOf || function(i) {
    return i.__proto__;
  };
  function l(i) {
    if (i === null || typeof i != "object") return i;
    if (i instanceof Object) var s = { __proto__: n(i) };
    else var s = /* @__PURE__ */ Object.create(null);
    return Object.getOwnPropertyNames(i).forEach(function(D) {
      Object.defineProperty(s, D, Object.getOwnPropertyDescriptor(i, D));
    }), s;
  }
})), Qu = /* @__PURE__ */ k(((e, r) => {
  var n = M("fs"), l = Ku(), i = zu(), s = Xu(), D = M("util"), o, u;
  typeof Symbol == "function" && typeof Symbol.for == "function" ? (o = /* @__PURE__ */ Symbol.for("graceful-fs.queue"), u = /* @__PURE__ */ Symbol.for("graceful-fs.previous")) : (o = "___graceful-fs.queue", u = "___graceful-fs.previous");
  function c() {
  }
  function F(f, t) {
    Object.defineProperty(f, o, { get: function() {
      return t;
    } });
  }
  var h = c;
  D.debuglog ? h = D.debuglog("gfs4") : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && (h = function() {
    var f = D.format.apply(D, arguments);
    f = "GFS4: " + f.split(/\n/).join(`
GFS4: `), console.error(f);
  }), n[o] || (F(n, global[o] || []), n.close = (function(f) {
    function t(a, p) {
      return f.call(n, a, function(d) {
        d || v(), typeof p == "function" && p.apply(this, arguments);
      });
    }
    return Object.defineProperty(t, u, { value: f }), t;
  })(n.close), n.closeSync = (function(f) {
    function t(a) {
      f.apply(n, arguments), v();
    }
    return Object.defineProperty(t, u, { value: f }), t;
  })(n.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
    h(n[o]), M("assert").equal(n[o].length, 0);
  })), global[o] || F(global, n[o]), r.exports = m(s(n)), process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !n.__patched && (r.exports = m(n), n.__patched = !0);
  function m(f) {
    l(f), f.gracefulify = m, f.createReadStream = We, f.createWriteStream = Ve;
    var t = f.readFile;
    f.readFile = a;
    function a(w, T, x) {
      return typeof T == "function" && (x = T, T = null), H(w, T, x);
      function H(W, L, N, I) {
        return t(W, L, function(R) {
          R && (R.code === "EMFILE" || R.code === "ENFILE") ? g([
            H,
            [
              W,
              L,
              N
            ],
            R,
            I || Date.now(),
            Date.now()
          ]) : typeof N == "function" && N.apply(this, arguments);
        });
      }
    }
    var p = f.writeFile;
    f.writeFile = d;
    function d(w, T, x, H) {
      return typeof x == "function" && (H = x, x = null), W(w, T, x, H);
      function W(L, N, I, R, V) {
        return p(L, N, I, function($) {
          $ && ($.code === "EMFILE" || $.code === "ENFILE") ? g([
            W,
            [
              L,
              N,
              I,
              R
            ],
            $,
            V || Date.now(),
            Date.now()
          ]) : typeof R == "function" && R.apply(this, arguments);
        });
      }
    }
    var C = f.appendFile;
    C && (f.appendFile = _);
    function _(w, T, x, H) {
      return typeof x == "function" && (H = x, x = null), W(w, T, x, H);
      function W(L, N, I, R, V) {
        return C(L, N, I, function($) {
          $ && ($.code === "EMFILE" || $.code === "ENFILE") ? g([
            W,
            [
              L,
              N,
              I,
              R
            ],
            $,
            V || Date.now(),
            Date.now()
          ]) : typeof R == "function" && R.apply(this, arguments);
        });
      }
    }
    var A = f.copyFile;
    A && (f.copyFile = b);
    function b(w, T, x, H) {
      return typeof x == "function" && (H = x, x = 0), W(w, T, x, H);
      function W(L, N, I, R, V) {
        return A(L, N, I, function($) {
          $ && ($.code === "EMFILE" || $.code === "ENFILE") ? g([
            W,
            [
              L,
              N,
              I,
              R
            ],
            $,
            V || Date.now(),
            Date.now()
          ]) : typeof R == "function" && R.apply(this, arguments);
        });
      }
    }
    var O = f.readdir;
    f.readdir = S;
    var B = /^v[0-5]\./;
    function S(w, T, x) {
      typeof T == "function" && (x = T, T = null);
      var H = B.test(process.version) ? function(N, I, R, V) {
        return O(N, W(N, I, R, V));
      } : function(N, I, R, V) {
        return O(N, I, W(N, I, R, V));
      };
      return H(w, T, x);
      function W(L, N, I, R) {
        return function(V, $) {
          V && (V.code === "EMFILE" || V.code === "ENFILE") ? g([
            H,
            [
              L,
              N,
              I
            ],
            V,
            R || Date.now(),
            Date.now()
          ]) : ($ && $.sort && $.sort(), typeof I == "function" && I.call(this, V, $));
        };
      }
    }
    if (process.version.substr(0, 4) === "v0.8") {
      var q = i(f);
      K = q.ReadStream, z = q.WriteStream;
    }
    var Y = f.ReadStream;
    Y && (K.prototype = Object.create(Y.prototype), K.prototype.open = Me);
    var J = f.WriteStream;
    J && (z.prototype = Object.create(J.prototype), z.prototype.open = He), Object.defineProperty(f, "ReadStream", {
      get: function() {
        return K;
      },
      set: function(w) {
        K = w;
      },
      enumerable: !0,
      configurable: !0
    }), Object.defineProperty(f, "WriteStream", {
      get: function() {
        return z;
      },
      set: function(w) {
        z = w;
      },
      enumerable: !0,
      configurable: !0
    });
    var Ce = K;
    Object.defineProperty(f, "FileReadStream", {
      get: function() {
        return Ce;
      },
      set: function(w) {
        Ce = w;
      },
      enumerable: !0,
      configurable: !0
    });
    var ye = z;
    Object.defineProperty(f, "FileWriteStream", {
      get: function() {
        return ye;
      },
      set: function(w) {
        ye = w;
      },
      enumerable: !0,
      configurable: !0
    });
    function K(w, T) {
      return this instanceof K ? (Y.apply(this, arguments), this) : K.apply(Object.create(K.prototype), arguments);
    }
    function Me() {
      var w = this;
      pe(w.path, w.flags, w.mode, function(T, x) {
        T ? (w.autoClose && w.destroy(), w.emit("error", T)) : (w.fd = x, w.emit("open", x), w.read());
      });
    }
    function z(w, T) {
      return this instanceof z ? (J.apply(this, arguments), this) : z.apply(Object.create(z.prototype), arguments);
    }
    function He() {
      var w = this;
      pe(w.path, w.flags, w.mode, function(T, x) {
        T ? (w.destroy(), w.emit("error", T)) : (w.fd = x, w.emit("open", x));
      });
    }
    function We(w, T) {
      return new f.ReadStream(w, T);
    }
    function Ve(w, T) {
      return new f.WriteStream(w, T);
    }
    var qe = f.open;
    f.open = pe;
    function pe(w, T, x, H) {
      return typeof x == "function" && (H = x, x = null), W(w, T, x, H);
      function W(L, N, I, R, V) {
        return qe(L, N, I, function($, br) {
          $ && ($.code === "EMFILE" || $.code === "ENFILE") ? g([
            W,
            [
              L,
              N,
              I,
              R
            ],
            $,
            V || Date.now(),
            Date.now()
          ]) : typeof R == "function" && R.apply(this, arguments);
        });
      }
    }
    return f;
  }
  function g(f) {
    h("ENQUEUE", f[0].name, f[1]), n[o].push(f), y();
  }
  var E;
  function v() {
    for (var f = Date.now(), t = 0; t < n[o].length; ++t) n[o][t].length > 2 && (n[o][t][3] = f, n[o][t][4] = f);
    y();
  }
  function y() {
    if (clearTimeout(E), E = void 0, n[o].length !== 0) {
      var f = n[o].shift(), t = f[0], a = f[1], p = f[2], d = f[3], C = f[4];
      if (d === void 0)
        h("RETRY", t.name, a), t.apply(null, a);
      else if (Date.now() - d >= 6e4) {
        h("TIMEOUT", t.name, a);
        var _ = a.pop();
        typeof _ == "function" && _.call(null, p);
      } else {
        var A = Date.now() - C, b = Math.max(C - d, 1);
        A >= Math.min(b * 1.2, 100) ? (h("RETRY", t.name, a), t.apply(null, a.concat([d]))) : n[o].push(f);
      }
      E === void 0 && (E = setTimeout(y, 0));
    }
  }
})), Zu = /* @__PURE__ */ k(((e) => {
  var r = e && e.__importDefault || function(i) {
    return i && i.__esModule ? i : { default: i };
  };
  Object.defineProperty(e, "__esModule", { value: !0 }), e.readCAFileSync = void 0;
  var n = r(Qu());
  function l(i) {
    try {
      const s = n.default.readFileSync(i, "utf8"), D = "-----END CERTIFICATE-----";
      return s.split(D).filter((o) => !!o.trim()).map((o) => `${o.trimLeft()}${D}`);
    } catch (s) {
      if (s.code === "ENOENT") return;
      throw s;
    }
  }
  e.readCAFileSync = l;
})), en = /* @__PURE__ */ k(((e) => {
  var r = e && e.__createBinding || (Object.create ? (function(l, i, s, D) {
    D === void 0 && (D = s);
    var o = Object.getOwnPropertyDescriptor(i, s);
    (!o || ("get" in o ? !i.__esModule : o.writable || o.configurable)) && (o = {
      enumerable: !0,
      get: function() {
        return i[s];
      }
    }), Object.defineProperty(l, D, o);
  }) : (function(l, i, s, D) {
    D === void 0 && (D = s), l[D] = i[s];
  })), n = e && e.__exportStar || function(l, i) {
    for (var s in l) s !== "default" && !Object.prototype.hasOwnProperty.call(i, s) && r(i, l, s);
  };
  Object.defineProperty(e, "__esModule", { value: !0 }), n(Zu(), e);
})), tn = /* @__PURE__ */ k(((e, r) => {
  r.exports = l;
  function n(i, s) {
    if (typeof Object.setPrototypeOf == "function") return Object.setPrototypeOf(i, s);
    i.__proto__ = s;
  }
  function l() {
    this.list = [];
    var i = null;
    Object.defineProperty(this, "root", {
      get: function() {
        return i;
      },
      set: function(s) {
        i = s, this.list.length && n(this.list[this.list.length - 1], s);
      },
      enumerable: !0,
      configurable: !0
    });
  }
  l.prototype = {
    get length() {
      return this.list.length;
    },
    get keys() {
      var i = [];
      for (var s in this.list[0]) i.push(s);
      return i;
    },
    get snapshot() {
      var i = {};
      return this.keys.forEach(function(s) {
        i[s] = this.get(s);
      }, this), i;
    },
    get store() {
      return this.list[0];
    },
    push: function(i) {
      return typeof i != "object" && (i = { valueOf: i }), this.list.length >= 1 && n(this.list[this.list.length - 1], i), n(i, this.root), this.list.push(i);
    },
    pop: function() {
      return this.list.length >= 2 && n(this.list[this.list.length - 2], this.root), this.list.pop();
    },
    unshift: function(i) {
      return n(i, this.list[0] || this.root), this.list.unshift(i);
    },
    shift: function() {
      return this.list.length === 1 && n(this.list[0], this.root), this.list.shift();
    },
    get: function(i) {
      return this.list[0][i];
    },
    set: function(i, s, D) {
      return this.length || this.push({}), D && this.list[0].hasOwnProperty(i) && this.push({}), this.list[0][i] = s;
    },
    forEach: function(i, s) {
      for (var D in this.list[0]) i.call(s, D, this.list[0][D]);
    },
    slice: function() {
      return this.list.slice.apply(this.list, arguments);
    },
    splice: function() {
      for (var i = this.list.splice.apply(this.list, arguments), s = 0, D = this.list.length; s < D; s++) n(this.list[s], this.list[s + 1] || this.root);
      return i;
    }
  };
})), rn = /* @__PURE__ */ k(((e) => {
  e.parse = e.decode = i, e.stringify = e.encode = n, e.safe = D, e.unsafe = o;
  var r = typeof process < "u" && process.platform === "win32" ? `\r
` : `
`;
  function n(u, c) {
    var F = [], h = "";
    typeof c == "string" ? c = {
      section: c,
      whitespace: !1
    } : (c = c || {}, c.whitespace = c.whitespace === !0);
    var m = c.whitespace ? " = " : "=";
    return Object.keys(u).forEach(function(g, E, v) {
      var y = u[g];
      y && Array.isArray(y) ? y.forEach(function(f) {
        h += D(g + "[]") + m + D(f) + `
`;
      }) : y && typeof y == "object" ? F.push(g) : h += D(g) + m + D(y) + r;
    }), c.section && h.length && (h = "[" + D(c.section) + "]" + r + h), F.forEach(function(g, E, v) {
      var y = l(g).join("\\."), f = (c.section ? c.section + "." : "") + y, t = n(u[g], {
        section: f,
        whitespace: c.whitespace
      });
      h.length && t.length && (h += r), h += t;
    }), h;
  }
  function l(u) {
    return u.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map(function(c) {
      return c.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "");
    });
  }
  function i(u) {
    var c = {}, F = c, h = null, m = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;
    return u.split(/[\r\n]+/g).forEach(function(g, E, v) {
      if (!(!g || g.match(/^\s*[;#]/))) {
        var y = g.match(m);
        if (y) {
          if (y[1] !== void 0) {
            if (h = o(y[1]), h === "__proto__") {
              F = {};
              return;
            }
            F = c[h] = c[h] || {};
            return;
          }
          var f = o(y[2]);
          if (f !== "__proto__") {
            var t = y[3] ? o(y[4]) : !0;
            switch (t) {
              case "true":
              case "false":
              case "null":
                t = JSON.parse(t);
            }
            if (f.length > 2 && f.slice(-2) === "[]") {
              if (f = f.substring(0, f.length - 2), f === "__proto__") return;
              F[f] ? Array.isArray(F[f]) || (F[f] = [F[f]]) : F[f] = [];
            }
            Array.isArray(F[f]) ? F[f].push(t) : F[f] = t;
          }
        }
      }
    }), Object.keys(c).filter(function(g, E, v) {
      if (!c[g] || typeof c[g] != "object" || Array.isArray(c[g])) return !1;
      var y = l(g), f = c, t = y.pop(), a = t.replace(/\\\./g, ".");
      return y.forEach(function(p, d, C) {
        p !== "__proto__" && ((!f[p] || typeof f[p] != "object") && (f[p] = {}), f = f[p]);
      }), f === c && a === t ? !1 : (f[a] = c[g], !0);
    }).forEach(function(g, E, v) {
      delete c[g];
    }), c;
  }
  function s(u) {
    return u.charAt(0) === '"' && u.slice(-1) === '"' || u.charAt(0) === "'" && u.slice(-1) === "'";
  }
  function D(u) {
    return typeof u != "string" || u.match(/[=\r\n]/) || u.match(/^\[/) || u.length > 1 && s(u) || u !== u.trim() ? JSON.stringify(u) : u.replace(/;/g, "\\;").replace(/#/g, "\\#");
  }
  function o(u, c) {
    if (u = (u || "").trim(), s(u)) {
      u.charAt(0) === "'" && (u = u.substr(1, u.length - 2));
      try {
        u = JSON.parse(u);
      } catch {
      }
    } else {
      for (var F = !1, h = "", m = 0, g = u.length; m < g; m++) {
        var E = u.charAt(m);
        if (F)
          "\\;#".indexOf(E) !== -1 ? h += E : h += "\\" + E, F = !1;
        else {
          if (";#".indexOf(E) !== -1) break;
          E === "\\" ? F = !0 : h += E;
        }
      }
      return F && (h += "\\"), h.trim();
    }
    return u;
  }
})), un = /* @__PURE__ */ k(((c, r) => {
  var n = tn(), l = M("path"), i = M("fs"), s = rn(), D = M("events").EventEmitter, o = M("url"), u = M("http"), c = r.exports = function() {
    for (var E = [].slice.call(arguments), v = new m(); E.length; ) {
      var y = E.shift();
      y && v.push(typeof y == "string" ? h(y) : y);
    }
    return v;
  };
  c.find = function() {
    var E = l.join.apply(null, [].slice.call(arguments));
    function v(y, f) {
      var t = l.join(y, f);
      try {
        return i.statSync(t), t;
      } catch {
        if (l.dirname(y) !== y) return v(l.dirname(y), f);
      }
    }
    return v(__dirname, E);
  };
  var F = c.parse = function(E, v, y) {
    if (E = "" + E, y) if (y === "json") if (this.emit) try {
      return JSON.parse(E);
    } catch (f) {
      this.emit("error", f);
    }
    else return JSON.parse(E);
    else return s.parse(E);
    else try {
      return JSON.parse(E);
    } catch {
      return s.parse(E);
    }
  }, h = c.json = function() {
    var E = [].slice.call(arguments).filter(function(f) {
      return f != null;
    }), v = l.join.apply(null, E), y;
    try {
      y = i.readFileSync(v, "utf-8");
    } catch {
      return;
    }
    return F(y, v, "json");
  };
  c.env = function(E, v) {
    v = v || process.env;
    var y = {}, f = E.length;
    for (var t in v) t.indexOf(E) === 0 && (y[t.substring(f)] = v[t]);
    return y;
  }, c.ConfigChain = m;
  function m() {
    D.apply(this), n.apply(this, arguments), this._awaiting = 0, this._saving = 0, this.sources = {};
  }
  var g = { constructor: { value: m } };
  Object.keys(D.prototype).forEach(function(E) {
    g[E] = Object.getOwnPropertyDescriptor(D.prototype, E);
  }), m.prototype = Object.create(n.prototype, g), m.prototype.del = function(E, v) {
    if (v) {
      var y = this.sources[v];
      if (y = y && y.data, !y) return this.emit("error", /* @__PURE__ */ new Error("not found " + v));
      delete y[E];
    } else for (var f = 0, t = this.list.length; f < t; f++) delete this.list[f][E];
    return this;
  }, m.prototype.set = function(E, v, y) {
    var f;
    if (y) {
      if (f = this.sources[y], f = f && f.data, !f) return this.emit("error", /* @__PURE__ */ new Error("not found " + y));
    } else if (f = this.list[0], !f) return this.emit("error", /* @__PURE__ */ new Error("cannot set, no confs!"));
    return f[E] = v, this;
  }, m.prototype.get = function(E, v) {
    return v ? (v = this.sources[v], v && (v = v.data), v && Object.hasOwnProperty.call(v, E) ? v[E] : void 0) : this.list[0][E];
  }, m.prototype.save = function(E, a, y) {
    typeof a == "function" && (y = a, a = null);
    var f = this.sources[E];
    if (!f || !(f.path || f.source) || !f.data) return this.emit("error", /* @__PURE__ */ new Error("bad save target: " + E));
    if (f.source) {
      var t = f.prefix || "";
      return Object.keys(f.data).forEach(function(d) {
        f.source[t + d] = f.data[d];
      }), this;
    }
    var a = a || f.type, p = f.data;
    return f.type === "json" ? p = JSON.stringify(p) : p = s.stringify(p), this._saving++, i.writeFile(f.path, p, "utf8", function(d) {
      if (this._saving--, d) return y ? y(d) : this.emit("error", d);
      this._saving === 0 && (y && y(), this.emit("save"));
    }.bind(this)), this;
  }, m.prototype.addFile = function(E, v, y) {
    y = y || E;
    var f = { __source__: y };
    return this.sources[y] = {
      path: E,
      type: v
    }, this.push(f), this._await(), i.readFile(E, "utf8", function(t, a) {
      t && this.emit("error", t), this.addString(a, E, v, f);
    }.bind(this)), this;
  }, m.prototype.addEnv = function(E, v, y) {
    y = y || "env";
    var f = c.env(E, v);
    return this.sources[y] = {
      data: f,
      source: v,
      prefix: E
    }, this.add(f, y);
  }, m.prototype.addUrl = function(E, v, y) {
    this._await();
    var f = o.format(E);
    y = y || f;
    var t = { __source__: y };
    return this.sources[y] = {
      href: f,
      type: v
    }, this.push(t), u.request(E, function(a) {
      var p = [], d = a.headers["content-type"];
      v || (v = d.indexOf("json") !== -1 ? "json" : d.indexOf("ini") !== -1 ? "ini" : f.match(/\.json$/) ? "json" : f.match(/\.ini$/) ? "ini" : null, t.type = v), a.on("data", p.push.bind(p)).on("end", function() {
        this.addString(Buffer.concat(p), f, v, t);
      }.bind(this)).on("error", this.emit.bind(this, "error"));
    }.bind(this)).on("error", this.emit.bind(this, "error")).end(), this;
  }, m.prototype.addString = function(E, v, y, f) {
    return E = this.parse(E, v, y), this.add(E, f), this;
  }, m.prototype.add = function(E, v) {
    if (v && typeof v == "object") {
      var y = this.list.indexOf(v);
      if (y === -1) return this.emit("error", /* @__PURE__ */ new Error("bad marker"));
      this.splice(y, 1, E), v = v.__source__, this.sources[v] = this.sources[v] || {}, this.sources[v].data = E, this._resolve();
    } else
      typeof v == "string" && (this.sources[v] = this.sources[v] || {}, this.sources[v].data = E), this._await(), this.push(E), process.nextTick(this._resolve.bind(this));
    return this;
  }, m.prototype.parse = c.parse, m.prototype._await = function() {
    this._awaiting++;
  }, m.prototype._resolve = function() {
    this._awaiting--, this._awaiting === 0 && this.emit("load", this);
  };
})), nn = /* @__PURE__ */ k(((e, r) => {
  r.exports = function(l) {
    const i = l.indexOf(":");
    return i === -1 ? n(l) : `${l.substr(0, i)}:${n(l.substr(i + 1))}`;
  };
  function n(l) {
    if (l = l.toLowerCase(), l === "_authtoken") return "_authToken";
    let i = l[0];
    for (let s = 1; s < l.length; s++) i += l[s] === "_" ? "-" : l[s];
    return i;
  }
})), sn = /* @__PURE__ */ k(((e) => {
  Object.defineProperty(e, "__esModule", { value: !0 }), e.envReplace = void 0;
  var r = /(?<!\\)(\\*)\$\{([^${}]+)\}/g;
  function n(D, o) {
    return D.replace(r, l.bind(null, o));
  }
  e.envReplace = n;
  function l(D, o, u, c) {
    if (u.length % 2) return o.slice((u.length + 1) / 2);
    const F = s(D, c);
    if (F === void 0) throw new Error(`Failed to replace env in config: ${o}`);
    return `${u.slice(u.length / 2)}${F}`;
  }
  var i = /([^:-]+)(:?)-(.+)/;
  function s(D, o) {
    const u = o.match(i);
    if (!u) return D[o];
    const [, c, F, h] = u;
    return Object.prototype.hasOwnProperty.call(D, c) ? !D[c] && F ? h : D[c] : h;
  }
})), on = /* @__PURE__ */ k(((e) => {
  Object.defineProperty(e, "__esModule", { value: !0 }), e.envReplace = void 0;
  var r = sn();
  Object.defineProperty(e, "envReplace", {
    enumerable: !0,
    get: function() {
      return r.envReplace;
    }
  });
})), an = /* @__PURE__ */ k(((e) => {
  var r = M("fs"), n = M("path"), { envReplace: l } = on(), i = (o) => typeof o != "string" ? o : l(o, process.env), s = (o, u, c) => {
    if (typeof u != "string") return u;
    const F = [].concat(o[c]), h = F.indexOf(n) !== -1, m = F.indexOf(Boolean) !== -1, g = F.indexOf(String) !== -1, E = F.indexOf(Number) !== -1;
    if (u = `${u}`.trim(), /^".*"$/.test(u)) try {
      u = JSON.parse(u);
    } catch {
      throw new Error(`Failed parsing JSON config key ${c}: ${u}`);
    }
    if (m && !g && u === "") return !0;
    switch (u) {
      case "true":
        return !0;
      case "false":
        return !1;
      case "null":
        return null;
      case "undefined":
        return;
    }
    const v = l(u, process.env);
    if ((c.endsWith(":tokenHelper") || c === "tokenHelper") && v !== u) throw new Error(`It is not allowed to use environment variables in the value of the ${c} setting.`);
    return u = v, h && ((process.platform === "win32" ? /^~(\/|\\)/ : /^~\//).test(u) && process.env.HOME && (u = n.resolve(process.env.HOME, u.substr(2))), u = n.resolve(u)), E && !isNaN(u) && (u = Number(u)), u;
  }, D = (o) => {
    o = n.resolve(o);
    let u = !1;
    for (; n.basename(o) === "node_modules"; )
      o = n.dirname(o), u = !0;
    if (u) return o;
    const c = (F, h) => {
      if (F === "/" || process.platform === "win32" && /^[a-zA-Z]:(\\|\/)?$/.test(F)) return h;
      try {
        const m = r.readdirSync(F);
        if (m.includes("node_modules") || m.includes("package.json") || m.includes("package.json5") || m.includes("package.yaml") || m.includes("pnpm-workspace.yaml")) return F;
        const g = n.dirname(F);
        return g === F ? h : c(g, h);
      } catch (m) {
        if (F === h) {
          if (m.code === "ENOENT") return h;
          throw m;
        }
        return h;
      }
    };
    return c(o, o);
  };
  e.envReplace = l, e.findPrefix = D, e.parseField = s, e.parseKey = i;
})), Dn = /* @__PURE__ */ k(((e) => {
  var r = M("path"), n = M("stream").Stream, l = M("url"), i = () => {
  }, s = () => [], D = () => {
  };
  e.types = {
    access: [
      null,
      "restricted",
      "public"
    ],
    "allow-same-version": Boolean,
    "always-auth": Boolean,
    also: [
      null,
      "dev",
      "development"
    ],
    audit: Boolean,
    "auth-type": [
      "legacy",
      "sso",
      "saml",
      "oauth"
    ],
    "bin-links": Boolean,
    browser: [null, String],
    ca: [
      null,
      String,
      Array
    ],
    cafile: r,
    cache: r,
    "cache-lock-stale": Number,
    "cache-lock-retries": Number,
    "cache-lock-wait": Number,
    "cache-max": Number,
    "cache-min": Number,
    cert: [null, String],
    cidr: [
      null,
      String,
      Array
    ],
    color: ["always", Boolean],
    depth: Number,
    description: Boolean,
    dev: Boolean,
    "dry-run": Boolean,
    editor: String,
    "engine-strict": Boolean,
    force: Boolean,
    "fetch-retries": Number,
    "fetch-retry-factor": Number,
    "fetch-retry-mintimeout": Number,
    "fetch-retry-maxtimeout": Number,
    git: String,
    "git-tag-version": Boolean,
    "commit-hooks": Boolean,
    global: Boolean,
    globalconfig: r,
    "global-style": Boolean,
    group: [Number, String],
    "https-proxy": [null, l],
    "user-agent": String,
    "ham-it-up": Boolean,
    heading: String,
    "if-present": Boolean,
    "ignore-prepublish": Boolean,
    "ignore-scripts": Boolean,
    "init-module": r,
    "init-author-name": String,
    "init-author-email": String,
    "init-author-url": ["", l],
    "init-license": String,
    "init-version": D,
    json: Boolean,
    key: [null, String],
    "legacy-bundling": Boolean,
    link: Boolean,
    "local-address": s(),
    loglevel: [
      "silent",
      "error",
      "warn",
      "notice",
      "http",
      "timing",
      "info",
      "verbose",
      "silly"
    ],
    logstream: n,
    "logs-max": Number,
    long: Boolean,
    maxsockets: Number,
    message: String,
    "metrics-registry": [null, String],
    "node-options": [null, String],
    "node-version": [null, D],
    "no-proxy": [
      null,
      String,
      Array
    ],
    offline: Boolean,
    "onload-script": [null, String],
    only: [
      null,
      "dev",
      "development",
      "prod",
      "production"
    ],
    optional: Boolean,
    "package-lock": Boolean,
    otp: [null, String],
    "package-lock-only": Boolean,
    parseable: Boolean,
    "prefer-offline": Boolean,
    "prefer-online": Boolean,
    prefix: r,
    production: Boolean,
    progress: Boolean,
    proxy: [
      null,
      !1,
      l
    ],
    provenance: Boolean,
    "read-only": Boolean,
    "rebuild-bundle": Boolean,
    registry: [null, l],
    rollback: Boolean,
    save: Boolean,
    "save-bundle": Boolean,
    "save-dev": Boolean,
    "save-exact": Boolean,
    "save-optional": Boolean,
    "save-prefix": String,
    "save-prod": Boolean,
    scope: String,
    "script-shell": [null, String],
    "scripts-prepend-node-path": [
      !1,
      !0,
      "auto",
      "warn-only"
    ],
    searchopts: String,
    searchexclude: [null, String],
    searchlimit: Number,
    searchstaleness: Number,
    "send-metrics": Boolean,
    shell: String,
    shrinkwrap: Boolean,
    "sign-git-tag": Boolean,
    "sso-poll-frequency": Number,
    "sso-type": [
      null,
      "oauth",
      "saml"
    ],
    "strict-ssl": Boolean,
    tag: String,
    timing: Boolean,
    tmp: r,
    unicode: Boolean,
    "unsafe-perm": Boolean,
    usage: Boolean,
    user: [Number, String],
    userconfig: r,
    umask: i,
    version: Boolean,
    "tag-version-prefix": String,
    versions: Boolean,
    viewer: String,
    _exit: Boolean
  };
})), ln = /* @__PURE__ */ k(((e, r) => {
  var { readCAFileSync: n } = en(), l = M("fs"), i = M("path"), { ConfigChain: s } = un(), D = nn(), o = an(), u = class extends s {
    constructor(F, h) {
      super(F), this.root = F, this._parseField = o.parseField.bind(null, h || Dn());
    }
    add(F, h) {
      try {
        for (const [m, g] of Object.entries(F)) {
          const E = o.parseKey(m);
          E !== m && delete F[m], F[E] = this._parseField(g, E);
        }
      } catch (m) {
        throw m;
      }
      return super.add(F, h);
    }
    addFile(F, h) {
      h = h || F;
      const m = { __source__: h };
      this.sources[h] = {
        path: F,
        type: "ini"
      }, this.push(m), this._await();
      try {
        const g = l.readFileSync(F, "utf8");
        this.addString(g, F, "ini", m);
      } catch (g) {
        if (g.code === "ENOENT") this.add({}, m);
        else if (g.code !== "EISDIR") return `Issue while reading "${F}". ${g.message}`;
      }
    }
    addEnv(F) {
      F = F || process.env;
      const h = {};
      return Object.keys(F).filter((m) => /^npm_config_/i.test(m)).forEach((m) => {
        if (!F[m]) return;
        const g = D(m.substr(11)), E = F[m];
        h[g] = c(g, E);
      }), super.addEnv("", h, "env");
    }
    loadPrefix() {
      const F = this.list[0];
      Object.defineProperty(this, "prefix", {
        enumerable: !0,
        set: (m) => {
          const g = this.get("global");
          this[g ? "globalPrefix" : "localPrefix"] = m;
        },
        get: () => this.get("global") ? this.globalPrefix : this.localPrefix
      }), Object.defineProperty(this, "globalPrefix", {
        enumerable: !0,
        set: (m) => {
          this.set("prefix", m);
        },
        get: () => i.resolve(this.get("prefix"))
      });
      let h;
      if (Object.defineProperty(this, "localPrefix", {
        enumerable: !0,
        set: (m) => {
          h = m;
        },
        get: () => h
      }), Object.prototype.hasOwnProperty.call(F, "prefix")) h = i.resolve(F.prefix);
      else try {
        h = o.findPrefix(process.cwd());
      } catch (m) {
        throw m;
      }
      return h;
    }
    loadCAFile(F) {
      if (!F) return;
      const h = n(F);
      h && this.set("ca", h);
    }
    loadUser() {
      const F = this.root;
      if (this.get("global")) return;
      if (process.env.SUDO_UID) {
        F.user = Number(process.env.SUDO_UID);
        return;
      }
      const h = i.resolve(this.get("prefix"));
      try {
        F.user = l.statSync(h).uid;
      } catch (m) {
        if (m.code === "ENOENT") return;
        throw m;
      }
    }
  };
  function c(F, h) {
    function m(g) {
      return g.indexOf(`

`) ? g.split(`

`) : g.split(",");
    }
    switch (F) {
      case "hoist-pattern":
      case "public-hoist-pattern":
        return m(h);
    }
    return h;
  }
  r.exports = u;
})), cn = /* @__PURE__ */ k(((e) => {
  var r = M("os"), n = M("path"), l = r.tmpdir(), i = process.getuid ? process.getuid() : process.pid, s = () => !0, D = process.platform === "win32", o = {
    editor: () => process.env.EDITOR || process.env.VISUAL || (D ? "notepad.exe" : "vi"),
    shell: () => D ? process.env.COMSPEC || "cmd.exe" : process.env.SHELL || "/bin/bash"
  }, u = { fromString: () => process.umask() }, c = r.homedir();
  c ? process.env.HOME = c : c = n.resolve(l, "npm-" + i);
  var F = process.platform === "win32" ? "npm-cache" : ".npm", h = process.platform === "win32" && process.env.APPDATA || c, m = n.resolve(h, F), g, E;
  Object.defineProperty(e, "defaults", { get: function() {
    return g || (process.env.PREFIX ? E = process.env.PREFIX : process.platform === "win32" ? E = n.dirname(process.execPath) : (E = n.dirname(n.dirname(process.execPath)), process.env.DESTDIR && (E = n.join(process.env.DESTDIR, E))), g = {
      access: null,
      "allow-same-version": !1,
      "always-auth": !1,
      also: null,
      audit: !0,
      "auth-type": "legacy",
      "bin-links": !0,
      browser: null,
      ca: null,
      cafile: null,
      cache: m,
      "cache-lock-stale": 6e4,
      "cache-lock-retries": 10,
      "cache-lock-wait": 1e4,
      "cache-max": 1 / 0,
      "cache-min": 10,
      cert: null,
      cidr: null,
      color: process.env.NO_COLOR == null,
      depth: 1 / 0,
      description: !0,
      dev: !1,
      "dry-run": !1,
      editor: o.editor(),
      "engine-strict": !1,
      force: !1,
      "fetch-retries": 2,
      "fetch-retry-factor": 10,
      "fetch-retry-mintimeout": 1e4,
      "fetch-retry-maxtimeout": 6e4,
      git: "git",
      "git-tag-version": !0,
      "commit-hooks": !0,
      global: !1,
      globalconfig: n.resolve(E, "etc", "npmrc"),
      "global-style": !1,
      group: process.platform === "win32" ? 0 : process.env.SUDO_GID || process.getgid && process.getgid(),
      "ham-it-up": !1,
      heading: "npm",
      "if-present": !1,
      "ignore-prepublish": !1,
      "ignore-scripts": !1,
      "init-module": n.resolve(c, ".npm-init.js"),
      "init-author-name": "",
      "init-author-email": "",
      "init-author-url": "",
      "init-version": "1.0.0",
      "init-license": "ISC",
      json: !1,
      key: null,
      "legacy-bundling": !1,
      link: !1,
      "local-address": void 0,
      loglevel: "notice",
      logstream: process.stderr,
      "logs-max": 10,
      long: !1,
      maxsockets: 50,
      message: "%s",
      "metrics-registry": null,
      "node-options": null,
      offline: !1,
      "onload-script": !1,
      only: null,
      optional: !0,
      otp: null,
      "package-lock": !0,
      "package-lock-only": !1,
      parseable: !1,
      "prefer-offline": !1,
      "prefer-online": !1,
      prefix: E,
      production: !1,
      progress: !process.env.TRAVIS && !process.env.CI,
      provenance: !1,
      proxy: null,
      "https-proxy": null,
      "no-proxy": null,
      "user-agent": "npm/{npm-version} node/{node-version} {platform} {arch}",
      "read-only": !1,
      "rebuild-bundle": !0,
      registry: "https://registry.npmjs.org/",
      rollback: !0,
      save: !0,
      "save-bundle": !1,
      "save-dev": !1,
      "save-exact": !1,
      "save-optional": !1,
      "save-prefix": "^",
      "save-prod": !1,
      scope: "",
      "script-shell": null,
      "scripts-prepend-node-path": "warn-only",
      searchopts: "",
      searchexclude: null,
      searchlimit: 20,
      searchstaleness: 900,
      "send-metrics": !1,
      shell: o.shell(),
      shrinkwrap: !0,
      "sign-git-tag": !1,
      "sso-poll-frequency": 500,
      "sso-type": "oauth",
      "strict-ssl": !0,
      tag: "latest",
      "tag-version-prefix": "v",
      timing: !1,
      tmp: l,
      unicode: s(),
      "unsafe-perm": process.platform === "win32" || process.platform === "cygwin" || !(process.getuid && process.setuid && process.getgid && process.setgid) || process.getuid() !== 0,
      usage: !1,
      user: process.platform === "win32" ? 0 : "nobody",
      userconfig: n.resolve(c, ".npmrc"),
      umask: process.umask ? process.umask() : u.fromString("022"),
      version: !1,
      versions: !1,
      viewer: process.platform === "win32" ? "browser" : "man",
      _exit: !0
    }, g);
  } });
})), fn = /* @__PURE__ */ k(((e, r) => {
  var n = M("path"), l = ln(), i = cn();
  r.exports = (s, D, o) => {
    const u = new l(Object.assign({}, i.defaults, o), D);
    u.add(Object.assign({}, s), "cli");
    const c = [];
    let F = !1;
    if (M.resolve.paths) {
      const E = M.resolve.paths("npm");
      let v;
      try {
        v = M.resolve("npm", { paths: E.slice(-1) });
      } catch {
        F = !0;
      }
      v && c.push(u.addFile(n.resolve(n.dirname(v), "..", "npmrc"), "builtin"));
    }
    u.addEnv(), u.loadPrefix();
    const h = n.resolve(u.localPrefix, ".npmrc"), m = u.get("userconfig");
    if (!u.get("global") && h !== m ? c.push(u.addFile(h, "project")) : u.add({}, "project"), u.get("workspace-prefix") && u.get("workspace-prefix") !== h) {
      const E = n.resolve(u.get("workspace-prefix"), ".npmrc");
      c.push(u.addFile(E, "workspace"));
    }
    if (c.push(u.addFile(u.get("userconfig"), "user")), u.get("prefix")) {
      const E = n.resolve(u.get("prefix"), "etc");
      u.root.globalconfig = n.resolve(E, "npmrc"), u.root.globalignorefile = n.resolve(E, "npmignore");
    }
    c.push(u.addFile(u.get("globalconfig"), "global")), u.loadUser();
    const g = u.get("cafile");
    return g && u.loadCAFile(g), {
      config: u,
      warnings: c.filter(Boolean),
      failedToLoadBuiltInConfig: F
    };
  }, Object.defineProperty(r.exports, "defaults", {
    get() {
      return i.defaults;
    },
    enumerable: !0
  });
})), hn = /* @__PURE__ */ k(((e, r) => {
  var n = fn(), l = ":_authToken", i = ":_auth", s = ":username", D = ":_password";
  r.exports = function() {
    let f, t;
    arguments.length >= 2 ? (f = arguments[0], t = Object.assign({}, arguments[1])) : typeof arguments[0] == "string" ? f = arguments[0] : t = Object.assign({}, arguments[0]), t = t || {};
    const a = t.npmrc;
    return t.npmrc = (t.npmrc ? { config: { get: (p) => a[p] } } : n()).config, f = f || t.npmrc.get("registry") || n.defaults.registry, u(f, t) || c(t.npmrc);
  };
  function o(y, f) {
    const t = new URL(f, new URL(y.startsWith("//") ? `./${y}` : y, "resolve://"));
    if (t.protocol === "resolve:") {
      const { pathname: a, search: p, hash: d } = t;
      return a + p + d;
    }
    return t.toString();
  }
  function u(y, f) {
    let t = y instanceof URL ? y : new URL(y.startsWith("//") ? `http:${y}` : y), a;
    for (; a !== "/" && t.pathname !== a; ) {
      a = t.pathname || "/";
      const p = h("//" + t.host + a.replace(/\/$/, ""), f.npmrc);
      if (p) return p;
      if (!f.recursive) return /\/$/.test(y) ? void 0 : u(new URL("./", t), f);
      t.pathname = o(F(a), "..") || "/";
    }
  }
  function c(y) {
    if (y.get("_auth"))
      return {
        token: m(y.get("_auth")),
        type: "Basic"
      };
  }
  function F(y) {
    return y[y.length - 1] === "/" ? y : y + "/";
  }
  function h(y, f) {
    const t = g(f.get(y + l) || f.get(y + "/:_authToken"));
    if (t) return t;
    const a = E(f.get(y + s) || f.get(y + "/:username"), f.get(y + D) || f.get(y + "/:_password"));
    if (a) return a;
    const p = v(f.get(y + i) || f.get(y + "/:_auth"));
    if (p) return p;
  }
  function m(y) {
    return y.replace(/^\$\{?([^}]*)\}?$/, function(f, t) {
      return process.env[t];
    });
  }
  function g(y) {
    if (y)
      return {
        token: m(y),
        type: "Bearer"
      };
  }
  function E(y, f) {
    if (!y || !f) return;
    const t = Buffer.from(m(f), "base64").toString("utf8");
    return {
      token: Buffer.from(y + ":" + t, "utf8").toString("base64"),
      type: "Basic",
      password: t,
      username: y
    };
  }
  function v(y) {
    if (y)
      return {
        token: m(y),
        type: "Basic"
      };
  }
})), pn = /* @__PURE__ */ oe(hn(), 1), dn = class extends Error {
  constructor(e) {
    super(`Package \`${e}\` could not be found`), this.name = "PackageNotFoundError";
  }
}, Fn = class extends Error {
  constructor(e, r) {
    super(`Version \`${r}\` for package \`${e}\` could not be found`), this.name = "VersionNotFoundError";
  }
};
async function mn(e, r = {}) {
  let { version: n = "latest" } = r;
  const { omitDeprecated: l = !0 } = r, i = e.split("/")[0], s = r.registryUrl ?? Ju(i), D = new URL(encodeURIComponent(e).replace(/^%40/, "@"), s), o = (0, pn.default)(s.toString(), { recursive: !0 }), u = { accept: "application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*" };
  r.fullMetadata && delete u.accept, o && (u.authorization = `${o.type} ${o.token}`);
  let c;
  try {
    c = await Mu(D, {
      headers: u,
      keepalive: !0
    }).json();
  } catch (h) {
    throw h?.response?.status === 404 ? new dn(e) : h;
  }
  if (r.allVersions) return c;
  const F = new Fn(e, n);
  if (c["dist-tags"][n]) {
    const { time: h } = c;
    c = c.versions[c["dist-tags"][n]], c.time = h;
  } else if (n) {
    const h = !!c.versions[n];
    if (l && !h)
      for (const [g, E] of Object.entries(c.versions)) E.deprecated && delete c.versions[g];
    if (!h) {
      const g = Object.keys(c.versions);
      if (n = Qe.default.maxSatisfying(g, n), !n) throw F;
    }
    const { time: m } = c;
    if (c = c.versions[n], c.time = m, !c) throw F;
  }
  return c;
}
async function gn(e, r) {
  const { version: n } = await mn(e.toLowerCase(), r);
  return n;
}
var En = P.env.npm_package_json, ke = P.env.npm_config_user_agent, Cn = !!ke?.startsWith("npm") || !!En?.endsWith("package.json"), yn = !!ke?.startsWith("yarn"), Ds = !!ke?.startsWith("pnpm"), ls = !!ke?.startsWith("bun"), vn = Cn || yn, _n = /* @__PURE__ */ k(((e, r) => {
  var { hasOwnProperty: n } = Object.prototype, l = (c, F = {}) => {
    typeof F == "string" && (F = { section: F }), F.align = F.align === !0, F.newline = F.newline === !0, F.sort = F.sort === !0, F.whitespace = F.whitespace === !0 || F.align === !0, F.platform = F.platform || typeof process < "u" && process.platform, F.bracketedArray = F.bracketedArray !== !1;
    const h = F.platform === "win32" ? `\r
` : `
`, m = F.whitespace ? " = " : "=", g = [], E = F.sort ? Object.keys(c).sort() : Object.keys(c);
    let v = 0;
    F.align && (v = o(E.filter((t) => c[t] === null || Array.isArray(c[t]) || typeof c[t] != "object").map((t) => Array.isArray(c[t]) ? `${t}[]` : t).concat([""]).reduce((t, a) => o(t).length >= o(a).length ? t : a)).length);
    let y = "";
    const f = F.bracketedArray ? "[]" : "";
    for (const t of E) {
      const a = c[t];
      if (a && Array.isArray(a)) for (const p of a) y += o(`${t}${f}`).padEnd(v, " ") + m + o(p) + h;
      else a && typeof a == "object" ? g.push(t) : y += o(t).padEnd(v, " ") + m + o(a) + h;
    }
    F.section && y.length && (y = "[" + o(F.section) + "]" + (F.newline ? h + h : h) + y);
    for (const t of g) {
      const a = i(t, ".").join("\\."), p = (F.section ? F.section + "." : "") + a, d = l(c[t], {
        ...F,
        section: p
      });
      y.length && d.length && (y += h), y += d;
    }
    return y;
  };
  function i(c, F) {
    var h = 0, m = 0, g = 0, E = [];
    do
      if (g = c.indexOf(F, h), g !== -1) {
        if (h = g + F.length, g > 0 && c[g - 1] === "\\") continue;
        E.push(c.slice(m, g)), m = g + F.length;
      }
    while (g !== -1);
    return E.push(c.slice(m)), E;
  }
  var s = (c, F = {}) => {
    F.bracketedArray = F.bracketedArray !== !1;
    const h = /* @__PURE__ */ Object.create(null);
    let m = h, g = null;
    const E = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i, v = c.split(/[\r\n]+/g), y = {};
    for (const t of v) {
      if (!t || t.match(/^\s*[;#]/) || t.match(/^\s*$/)) continue;
      const a = t.match(E);
      if (!a) continue;
      if (a[1] !== void 0) {
        if (g = u(a[1]), g === "__proto__") {
          m = /* @__PURE__ */ Object.create(null);
          continue;
        }
        m = h[g] = h[g] || /* @__PURE__ */ Object.create(null);
        continue;
      }
      const p = u(a[2]);
      let d;
      F.bracketedArray ? d = p.length > 2 && p.slice(-2) === "[]" : (y[p] = (y?.[p] || 0) + 1, d = y[p] > 1);
      const C = d ? p.slice(0, -2) : p;
      if (C === "__proto__") continue;
      const _ = a[3] ? u(a[4]) : !0, A = _ === "true" || _ === "false" || _ === "null" ? JSON.parse(_) : _;
      d && (n.call(m, C) ? Array.isArray(m[C]) || (m[C] = [m[C]]) : m[C] = []), Array.isArray(m[C]) ? m[C].push(A) : m[C] = A;
    }
    const f = [];
    for (const t of Object.keys(h)) {
      if (!n.call(h, t) || typeof h[t] != "object" || Array.isArray(h[t])) continue;
      const a = i(t, ".");
      m = h;
      const p = a.pop(), d = p.replace(/\\\./g, ".");
      for (const C of a)
        C !== "__proto__" && ((!n.call(m, C) || typeof m[C] != "object") && (m[C] = /* @__PURE__ */ Object.create(null)), m = m[C]);
      m === h && d === p || (m[d] = h[t], f.push(t));
    }
    for (const t of f) delete h[t];
    return h;
  }, D = (c) => c.startsWith('"') && c.endsWith('"') || c.startsWith("'") && c.endsWith("'"), o = (c) => typeof c != "string" || c.match(/[=\r\n]/) || c.match(/^\[/) || c.length > 1 && D(c) || c !== c.trim() ? JSON.stringify(c) : c.split(";").join("\\;").split("#").join("\\#"), u = (c, F) => {
    if (c = (c || "").trim(), D(c)) {
      c.charAt(0) === "'" && (c = c.slice(1, -1));
      try {
        c = JSON.parse(c);
      } catch {
      }
    } else {
      let h = !1, m = "";
      for (let g = 0, E = c.length; g < E; g++) {
        const v = c.charAt(g);
        if (h)
          "\\;#".indexOf(v) !== -1 ? m += v : m += "\\" + v, h = !1;
        else {
          if (";#".indexOf(v) !== -1) break;
          v === "\\" ? h = !0 : m += v;
        }
      }
      return h && (m += "\\"), m.trim();
    }
    return c;
  };
  r.exports = {
    parse: s,
    decode: s,
    stringify: l,
    encode: l,
    safe: o,
    unsafe: u
  };
})), An = /* @__PURE__ */ oe(_n(), 1), we = P.platform === "win32", Pt = (e) => {
  try {
    return An.default.parse(j.readFileSync(e, "utf8")).prefix;
  } catch {
  }
}, bn = () => Object.keys(P.env).reduce((e, r) => /^npm_config_prefix$/i.test(r) ? P.env[r] : e, void 0), wn = () => {
  if (we && P.env.APPDATA) return U.join(P.env.APPDATA, "/npm/etc/npmrc");
  if (P.execPath.includes("/Cellar/node")) {
    const e = P.execPath.slice(0, P.execPath.indexOf("/Cellar/node"));
    return U.join(e, "/lib/node_modules/npm/npmrc");
  }
  if (P.execPath.endsWith("/bin/node")) {
    const e = U.dirname(U.dirname(P.execPath));
    return U.join(e, "/etc/npmrc");
  }
}, Bn = () => {
  if (we) {
    const { APPDATA: e } = P.env;
    return e ? U.join(e, "npm") : U.dirname(P.execPath);
  }
  return U.dirname(U.dirname(P.execPath));
}, On = () => {
  const e = bn();
  if (e) return e;
  const r = Pt(U.join(xe.homedir(), ".npmrc"));
  if (r) return r;
  if (P.env.PREFIX) return P.env.PREFIX;
  const n = Pt(wn());
  return n || Bn();
}, _e = U.resolve(On()), hr = () => {
  if (we && P.env.LOCALAPPDATA) {
    const e = U.join(P.env.LOCALAPPDATA, "Yarn");
    if (j.existsSync(e)) return e;
  }
  return !1;
}, Sn = () => {
  if (P.env.PREFIX) return P.env.PREFIX;
  const e = hr();
  if (e) return e;
  const r = U.join(xe.homedir(), ".config/yarn");
  if (j.existsSync(r)) return r;
  const n = U.join(xe.homedir(), ".yarn-config");
  return j.existsSync(n) ? n : _e;
}, ie = {};
ie.npm = {};
ie.npm.prefix = _e;
ie.npm.packages = U.join(_e, we ? "node_modules" : "lib/node_modules");
ie.npm.binaries = we ? _e : U.join(_e, "bin");
var pr = U.resolve(Sn());
ie.yarn = {};
ie.yarn.prefix = pr;
ie.yarn.packages = U.join(pr, hr() ? "Data/global/node_modules" : "global/node_modules");
ie.yarn.binaries = U.join(ie.yarn.packages, ".bin");
function Nt(e, r) {
  const n = U.relative(r, e);
  return !!(n && n !== ".." && !n.startsWith(`..${U.sep}`) && n !== U.resolve(e));
}
var It = U.dirname(Zt(import.meta.url)), xn = (() => {
  try {
    return Nt(It, ie.yarn.packages) || Nt(It, j.realpathSync(ie.npm.packages));
  } catch {
    return !1;
  }
})();
function Tn({ onlyFirst: e = !1 } = {}) {
  return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]", e ? void 0 : "g");
}
var Rn = Tn();
function dr(e) {
  if (typeof e != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);
  return !e.includes("\x1B") && !e.includes("") ? e : e.replace(Rn, "");
}
var Ft = [
  161,
  161,
  164,
  164,
  167,
  168,
  170,
  170,
  173,
  174,
  176,
  180,
  182,
  186,
  188,
  191,
  198,
  198,
  208,
  208,
  215,
  216,
  222,
  225,
  230,
  230,
  232,
  234,
  236,
  237,
  240,
  240,
  242,
  243,
  247,
  250,
  252,
  252,
  254,
  254,
  257,
  257,
  273,
  273,
  275,
  275,
  283,
  283,
  294,
  295,
  299,
  299,
  305,
  307,
  312,
  312,
  319,
  322,
  324,
  324,
  328,
  331,
  333,
  333,
  338,
  339,
  358,
  359,
  363,
  363,
  462,
  462,
  464,
  464,
  466,
  466,
  468,
  468,
  470,
  470,
  472,
  472,
  474,
  474,
  476,
  476,
  593,
  593,
  609,
  609,
  708,
  708,
  711,
  711,
  713,
  715,
  717,
  717,
  720,
  720,
  728,
  731,
  733,
  733,
  735,
  735,
  768,
  879,
  913,
  929,
  931,
  937,
  945,
  961,
  963,
  969,
  1025,
  1025,
  1040,
  1103,
  1105,
  1105,
  8208,
  8208,
  8211,
  8214,
  8216,
  8217,
  8220,
  8221,
  8224,
  8226,
  8228,
  8231,
  8240,
  8240,
  8242,
  8243,
  8245,
  8245,
  8251,
  8251,
  8254,
  8254,
  8308,
  8308,
  8319,
  8319,
  8321,
  8324,
  8364,
  8364,
  8451,
  8451,
  8453,
  8453,
  8457,
  8457,
  8467,
  8467,
  8470,
  8470,
  8481,
  8482,
  8486,
  8486,
  8491,
  8491,
  8531,
  8532,
  8539,
  8542,
  8544,
  8555,
  8560,
  8569,
  8585,
  8585,
  8592,
  8601,
  8632,
  8633,
  8658,
  8658,
  8660,
  8660,
  8679,
  8679,
  8704,
  8704,
  8706,
  8707,
  8711,
  8712,
  8715,
  8715,
  8719,
  8719,
  8721,
  8721,
  8725,
  8725,
  8730,
  8730,
  8733,
  8736,
  8739,
  8739,
  8741,
  8741,
  8743,
  8748,
  8750,
  8750,
  8756,
  8759,
  8764,
  8765,
  8776,
  8776,
  8780,
  8780,
  8786,
  8786,
  8800,
  8801,
  8804,
  8807,
  8810,
  8811,
  8814,
  8815,
  8834,
  8835,
  8838,
  8839,
  8853,
  8853,
  8857,
  8857,
  8869,
  8869,
  8895,
  8895,
  8978,
  8978,
  9312,
  9449,
  9451,
  9547,
  9552,
  9587,
  9600,
  9615,
  9618,
  9621,
  9632,
  9633,
  9635,
  9641,
  9650,
  9651,
  9654,
  9655,
  9660,
  9661,
  9664,
  9665,
  9670,
  9672,
  9675,
  9675,
  9678,
  9681,
  9698,
  9701,
  9711,
  9711,
  9733,
  9734,
  9737,
  9737,
  9742,
  9743,
  9756,
  9756,
  9758,
  9758,
  9792,
  9792,
  9794,
  9794,
  9824,
  9825,
  9827,
  9829,
  9831,
  9834,
  9836,
  9837,
  9839,
  9839,
  9886,
  9887,
  9919,
  9919,
  9926,
  9933,
  9935,
  9939,
  9941,
  9953,
  9955,
  9955,
  9960,
  9961,
  9963,
  9969,
  9972,
  9972,
  9974,
  9977,
  9979,
  9980,
  9982,
  9983,
  10045,
  10045,
  10102,
  10111,
  11094,
  11097,
  12872,
  12879,
  57344,
  63743,
  65024,
  65039,
  65533,
  65533,
  127232,
  127242,
  127248,
  127277,
  127280,
  127337,
  127344,
  127373,
  127375,
  127376,
  127387,
  127404,
  917760,
  917999,
  983040,
  1048573,
  1048576,
  1114109
], mt = [
  12288,
  12288,
  65281,
  65376,
  65504,
  65510
], Fr = [
  8361,
  8361,
  65377,
  65470,
  65474,
  65479,
  65482,
  65487,
  65490,
  65495,
  65498,
  65500,
  65512,
  65518
], mr = [
  32,
  126,
  162,
  163,
  165,
  166,
  172,
  172,
  175,
  175,
  10214,
  10221,
  10629,
  10630
], je = [
  4352,
  4447,
  8986,
  8987,
  9001,
  9002,
  9193,
  9196,
  9200,
  9200,
  9203,
  9203,
  9725,
  9726,
  9748,
  9749,
  9776,
  9783,
  9800,
  9811,
  9855,
  9855,
  9866,
  9871,
  9875,
  9875,
  9889,
  9889,
  9898,
  9899,
  9917,
  9918,
  9924,
  9925,
  9934,
  9934,
  9940,
  9940,
  9962,
  9962,
  9970,
  9971,
  9973,
  9973,
  9978,
  9978,
  9981,
  9981,
  9989,
  9989,
  9994,
  9995,
  10024,
  10024,
  10060,
  10060,
  10062,
  10062,
  10067,
  10069,
  10071,
  10071,
  10133,
  10135,
  10160,
  10160,
  10175,
  10175,
  11035,
  11036,
  11088,
  11088,
  11093,
  11093,
  11904,
  11929,
  11931,
  12019,
  12032,
  12245,
  12272,
  12287,
  12289,
  12350,
  12353,
  12438,
  12441,
  12543,
  12549,
  12591,
  12593,
  12686,
  12688,
  12773,
  12783,
  12830,
  12832,
  12871,
  12880,
  42124,
  42128,
  42182,
  43360,
  43388,
  44032,
  55203,
  63744,
  64255,
  65040,
  65049,
  65072,
  65106,
  65108,
  65126,
  65128,
  65131,
  94176,
  94180,
  94192,
  94198,
  94208,
  101589,
  101631,
  101662,
  101760,
  101874,
  110576,
  110579,
  110581,
  110587,
  110589,
  110590,
  110592,
  110882,
  110898,
  110898,
  110928,
  110930,
  110933,
  110933,
  110948,
  110951,
  110960,
  111355,
  119552,
  119638,
  119648,
  119670,
  126980,
  126980,
  127183,
  127183,
  127374,
  127374,
  127377,
  127386,
  127488,
  127490,
  127504,
  127547,
  127552,
  127560,
  127568,
  127569,
  127584,
  127589,
  127744,
  127776,
  127789,
  127797,
  127799,
  127868,
  127870,
  127891,
  127904,
  127946,
  127951,
  127955,
  127968,
  127984,
  127988,
  127988,
  127992,
  128062,
  128064,
  128064,
  128066,
  128252,
  128255,
  128317,
  128331,
  128334,
  128336,
  128359,
  128378,
  128378,
  128405,
  128406,
  128420,
  128420,
  128507,
  128591,
  128640,
  128709,
  128716,
  128716,
  128720,
  128722,
  128725,
  128728,
  128732,
  128735,
  128747,
  128748,
  128756,
  128764,
  128992,
  129003,
  129008,
  129008,
  129292,
  129338,
  129340,
  129349,
  129351,
  129535,
  129648,
  129660,
  129664,
  129674,
  129678,
  129734,
  129736,
  129736,
  129741,
  129756,
  129759,
  129770,
  129775,
  129784,
  131072,
  196605,
  196608,
  262141
], gt = (e, r) => {
  let n = 0, l = Math.floor(e.length / 2) - 1;
  for (; n <= l; ) {
    const i = Math.floor((n + l) / 2), s = i * 2;
    if (r < e[s]) l = i - 1;
    else if (r > e[s + 1]) n = i + 1;
    else return !0;
  }
  return !1;
}, $n = Ft[0], Pn = Ft.at(-1), Nn = mt[0], In = mt.at(-1), cs = Fr[0], fs = Fr.at(-1), hs = mr[0], ps = mr.at(-1), kn = je[0], jn = je.at(-1), kt = 19968, [Ln, Mn] = Hn(je);
function Hn(e) {
  let r = e[0], n = e[1];
  for (let l = 0; l < e.length; l += 2) {
    const i = e[l], s = e[l + 1];
    if (kt >= i && kt <= s) return [i, s];
    s - i > n - r && (r = i, n = s);
  }
  return [r, n];
}
var Wn = (e) => e < $n || e > Pn ? !1 : gt(Ft, e), Vn = (e) => e < Nn || e > In ? !1 : gt(mt, e), qn = (e) => e >= Ln && e <= Mn ? !0 : e < kn || e > jn ? !1 : gt(je, e);
function Un(e) {
  if (!Number.isSafeInteger(e)) throw new TypeError(`Expected a code point, got \`${typeof e}\`.`);
}
function Gn(e, { ambiguousAsWide: r = !1 } = {}) {
  return Un(e), Vn(e) || qn(e) || r && Wn(e) ? 2 : 1;
}
var Yn = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g, Jn = new Intl.Segmenter(), Kn = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
function se(e, r = {}) {
  if (typeof e != "string" || e.length === 0) return 0;
  const { ambiguousIsNarrow: n = !0, countAnsiEscapeCodes: l = !1 } = r;
  if (l || (e = dr(e)), e.length === 0) return 0;
  let i = 0;
  const s = { ambiguousAsWide: !n };
  for (const { segment: D } of Jn.segment(e)) {
    const o = D.codePointAt(0);
    if (!(o <= 31 || o >= 127 && o <= 159) && !(o >= 8203 && o <= 8207 || o === 65279) && !(o >= 768 && o <= 879 || o >= 6832 && o <= 6911 || o >= 7616 && o <= 7679 || o >= 8400 && o <= 8447 || o >= 65056 && o <= 65071) && !(o >= 55296 && o <= 57343) && !(o >= 65024 && o <= 65039) && !Kn.test(D)) {
      if (Yn().test(D)) {
        i += 2;
        continue;
      }
      i += Gn(o, s);
    }
  }
  return i;
}
function gr(e) {
  let r = 0;
  for (const n of e.split(`
`)) r = Math.max(r, se(n));
  return r;
}
var zn = /* @__PURE__ */ Or({
  arrow: () => ct,
  bold: () => ot,
  classic: () => lt,
  default: () => Er,
  double: () => it,
  doubleSingle: () => Dt,
  round: () => st,
  single: () => nt,
  singleDouble: () => at
}), nt, it, st, ot, at, Dt, lt, ct, Er, Xn = wr((() => {
  nt = {
    topLeft: "┌",
    top: "─",
    topRight: "┐",
    right: "│",
    bottomRight: "┘",
    bottom: "─",
    bottomLeft: "└",
    left: "│"
  }, it = {
    topLeft: "╔",
    top: "═",
    topRight: "╗",
    right: "║",
    bottomRight: "╝",
    bottom: "═",
    bottomLeft: "╚",
    left: "║"
  }, st = {
    topLeft: "╭",
    top: "─",
    topRight: "╮",
    right: "│",
    bottomRight: "╯",
    bottom: "─",
    bottomLeft: "╰",
    left: "│"
  }, ot = {
    topLeft: "┏",
    top: "━",
    topRight: "┓",
    right: "┃",
    bottomRight: "┛",
    bottom: "━",
    bottomLeft: "┗",
    left: "┃"
  }, at = {
    topLeft: "╓",
    top: "─",
    topRight: "╖",
    right: "║",
    bottomRight: "╜",
    bottom: "─",
    bottomLeft: "╙",
    left: "║"
  }, Dt = {
    topLeft: "╒",
    top: "═",
    topRight: "╕",
    right: "│",
    bottomRight: "╛",
    bottom: "═",
    bottomLeft: "╘",
    left: "│"
  }, lt = {
    topLeft: "+",
    top: "-",
    topRight: "+",
    right: "|",
    bottomRight: "+",
    bottom: "-",
    bottomLeft: "+",
    left: "|"
  }, ct = {
    topLeft: "↘",
    top: "↓",
    topRight: "↙",
    right: "←",
    bottomRight: "↖",
    bottom: "↑",
    bottomLeft: "↗",
    left: "→"
  }, Er = {
    single: nt,
    double: it,
    round: st,
    bold: ot,
    singleDouble: at,
    doubleSingle: Dt,
    classic: lt,
    arrow: ct
  };
})), Qn = /* @__PURE__ */ k(((e, r) => {
  var n = (Xn(), Br(zn).default);
  r.exports = n, r.exports.default = n;
})), Zn = /* @__PURE__ */ oe(Qn(), 1), ei = /[\p{Lu}]/u, ti = /[\p{Ll}]/u, jt = /^[\p{Lu}](?![\p{Lu}])/gu, Cr = /([\p{Alpha}\p{N}_]|$)/u, Et = /[_.\- ]+/, ri = new RegExp("^" + Et.source), Lt = new RegExp(Et.source + Cr.source, "gu"), Mt = new RegExp("\\d+" + Cr.source, "gu"), ui = (e, r, n, l) => {
  let i = !1, s = !1, D = !1, o = !1;
  for (let u = 0; u < e.length; u++) {
    const c = e[u];
    o = u > 2 ? e[u - 3] === "-" : !0, i && ei.test(c) ? (e = e.slice(0, u) + "-" + e.slice(u), i = !1, D = s, s = !0, u++) : s && D && ti.test(c) && (!o || l) ? (e = e.slice(0, u - 1) + "-" + e.slice(u - 1), D = s, s = !1, i = !0) : (i = r(c) === c && n(c) !== c, D = s, s = n(c) === c && r(c) !== c);
  }
  return e;
}, ni = (e, r) => (jt.lastIndex = 0, e.replaceAll(jt, (n) => r(n))), ii = (e, r) => (Lt.lastIndex = 0, Mt.lastIndex = 0, e.replaceAll(Mt, (n, l, i) => ["_", "-"].includes(e.charAt(i + n.length)) ? n : r(n)).replaceAll(Lt, (n, l) => r(l)));
function si(e, r) {
  if (!(typeof e == "string" || Array.isArray(e))) throw new TypeError("Expected the input to be `string | string[]`");
  if (r = {
    pascalCase: !1,
    preserveConsecutiveUppercase: !1,
    ...r
  }, Array.isArray(e) ? e = e.map((i) => i.trim()).filter((i) => i.length).join("-") : e = e.trim(), e.length === 0) return "";
  const n = r.locale === !1 ? (i) => i.toLowerCase() : (i) => i.toLocaleLowerCase(r.locale), l = r.locale === !1 ? (i) => i.toUpperCase() : (i) => i.toLocaleUpperCase(r.locale);
  return e.length === 1 ? Et.test(e) ? "" : r.pascalCase ? l(e) : n(e) : (e !== n(e) && (e = ui(e, n, l, r.preserveConsecutiveUppercase)), e = e.replace(ri, ""), e = r.preserveConsecutiveUppercase ? ni(e, n) : n(e), r.pascalCase && (e = l(e.charAt(0)) + e.slice(1)), ii(e, l));
}
var oi = /* @__PURE__ */ k(((e, r) => {
  r.exports = ({ onlyFirst: n = !1 } = {}) => {
    const l = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
    return new RegExp(l, n ? void 0 : "g");
  };
})), ai = /* @__PURE__ */ k(((e, r) => {
  var n = oi();
  r.exports = (l) => typeof l == "string" ? l.replace(n(), "") : l;
})), Di = /* @__PURE__ */ k(((e, r) => {
  r.exports = function() {
    return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
  };
})), li = /* @__PURE__ */ k(((e, r) => {
  var n = ai(), l = Tr(), i = Di(), s = (D) => {
    if (typeof D != "string" || D.length === 0 || (D = n(D), D.length === 0)) return 0;
    D = D.replace(i(), "  ");
    let o = 0;
    for (let u = 0; u < D.length; u++) {
      const c = D.codePointAt(u);
      c <= 31 || c >= 127 && c <= 159 || c >= 768 && c <= 879 || (c > 65535 && u++, o += l(c) ? 2 : 1);
    }
    return o;
  };
  r.exports = s, r.exports.default = s;
})), ci = /* @__PURE__ */ k(((e, r) => {
  var n = li();
  function l(D, o) {
    if (!D) return D;
    o = o || {};
    const u = o.align || "center";
    if (u === "left") return D;
    const c = o.split || `
`, F = o.pad || " ", h = u !== "right" ? i : s;
    let m = !1;
    Array.isArray(D) || (m = !0, D = String(D).split(c));
    let g, E = 0;
    return D = D.map(function(v) {
      return v = String(v), g = n(v), E = Math.max(g, E), {
        str: v,
        width: g
      };
    }).map(function(v) {
      return new Array(h(E, v.width) + 1).join(F) + v.str;
    }), m ? D.join(c) : D;
  }
  l.left = function(o) {
    return l(o, { align: "left" });
  }, l.center = function(o) {
    return l(o, { align: "center" });
  }, l.right = function(o) {
    return l(o, { align: "right" });
  }, r.exports = l;
  function i(D, o) {
    return Math.floor((D - o) / 2);
  }
  function s(D, o) {
    return D - o;
  }
})), Ht = /* @__PURE__ */ oe(ci(), 1), ze = 10, Wt = (e = 0) => (r) => `\x1B[${r + e}m`, Vt = (e = 0) => (r) => `\x1B[${38 + e};5;${r}m`, qt = (e = 0) => (r, n, l) => `\x1B[${38 + e};2;${r};${n};${l}m`, G = {
  modifier: {
    reset: [0, 0],
    bold: [1, 22],
    dim: [2, 22],
    italic: [3, 23],
    underline: [4, 24],
    overline: [53, 55],
    inverse: [7, 27],
    hidden: [8, 28],
    strikethrough: [9, 29]
  },
  color: {
    black: [30, 39],
    red: [31, 39],
    green: [32, 39],
    yellow: [33, 39],
    blue: [34, 39],
    magenta: [35, 39],
    cyan: [36, 39],
    white: [37, 39],
    blackBright: [90, 39],
    gray: [90, 39],
    grey: [90, 39],
    redBright: [91, 39],
    greenBright: [92, 39],
    yellowBright: [93, 39],
    blueBright: [94, 39],
    magentaBright: [95, 39],
    cyanBright: [96, 39],
    whiteBright: [97, 39]
  },
  bgColor: {
    bgBlack: [40, 49],
    bgRed: [41, 49],
    bgGreen: [42, 49],
    bgYellow: [43, 49],
    bgBlue: [44, 49],
    bgMagenta: [45, 49],
    bgCyan: [46, 49],
    bgWhite: [47, 49],
    bgBlackBright: [100, 49],
    bgGray: [100, 49],
    bgGrey: [100, 49],
    bgRedBright: [101, 49],
    bgGreenBright: [102, 49],
    bgYellowBright: [103, 49],
    bgBlueBright: [104, 49],
    bgMagentaBright: [105, 49],
    bgCyanBright: [106, 49],
    bgWhiteBright: [107, 49]
  }
}, ds = Object.keys(G.modifier), fi = Object.keys(G.color), hi = Object.keys(G.bgColor), Fs = [...fi, ...hi];
function pi() {
  const e = /* @__PURE__ */ new Map();
  for (const [r, n] of Object.entries(G)) {
    for (const [l, i] of Object.entries(n))
      G[l] = {
        open: `\x1B[${i[0]}m`,
        close: `\x1B[${i[1]}m`
      }, n[l] = G[l], e.set(i[0], i[1]);
    Object.defineProperty(G, r, {
      value: n,
      enumerable: !1
    });
  }
  return Object.defineProperty(G, "codes", {
    value: e,
    enumerable: !1
  }), G.color.close = "\x1B[39m", G.bgColor.close = "\x1B[49m", G.color.ansi = Wt(), G.color.ansi256 = Vt(), G.color.ansi16m = qt(), G.bgColor.ansi = Wt(ze), G.bgColor.ansi256 = Vt(ze), G.bgColor.ansi16m = qt(ze), Object.defineProperties(G, {
    rgbToAnsi256: {
      value(r, n, l) {
        return r === n && n === l ? r < 8 ? 16 : r > 248 ? 231 : Math.round((r - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(n / 255 * 5) + Math.round(l / 255 * 5);
      },
      enumerable: !1
    },
    hexToRgb: {
      value(r) {
        const n = /[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));
        if (!n) return [
          0,
          0,
          0
        ];
        let [l] = n;
        l.length === 3 && (l = [...l].map((s) => s + s).join(""));
        const i = Number.parseInt(l, 16);
        return [
          i >> 16 & 255,
          i >> 8 & 255,
          i & 255
        ];
      },
      enumerable: !1
    },
    hexToAnsi256: {
      value: (r) => G.rgbToAnsi256(...G.hexToRgb(r)),
      enumerable: !1
    },
    ansi256ToAnsi: {
      value(r) {
        if (r < 8) return 30 + r;
        if (r < 16) return 90 + (r - 8);
        let n, l, i;
        if (r >= 232)
          n = ((r - 232) * 10 + 8) / 255, l = n, i = n;
        else {
          r -= 16;
          const o = r % 36;
          n = Math.floor(r / 36) / 5, l = Math.floor(o / 6) / 5, i = o % 6 / 5;
        }
        const s = Math.max(n, l, i) * 2;
        if (s === 0) return 30;
        let D = 30 + (Math.round(i) << 2 | Math.round(l) << 1 | Math.round(n));
        return s === 2 && (D += 60), D;
      },
      enumerable: !1
    },
    rgbToAnsi: {
      value: (r, n, l) => G.ansi256ToAnsi(G.rgbToAnsi256(r, n, l)),
      enumerable: !1
    },
    hexToAnsi: {
      value: (r) => G.ansi256ToAnsi(G.hexToAnsi256(r)),
      enumerable: !1
    }
  }), G;
}
var di = pi(), Le = /* @__PURE__ */ new Set(["\x1B", ""]), Fi = 39, Ct = "\x07", yr = "[", mi = "]", vr = "m", $e = `${mi}8;;`, Ut = (e) => `${Le.values().next().value}${yr}${e}${vr}`, Gt = (e) => `${Le.values().next().value}${$e}${e}${Ct}`, gi = (e) => e.split(" ").map((r) => se(r)), Xe = (e, r, n) => {
  const l = [...r];
  let i = !1, s = !1, D = se(dr(e.at(-1)));
  for (const [o, u] of l.entries()) {
    const c = se(u);
    if (D + c <= n ? e[e.length - 1] += u : (e.push(u), D = 0), Le.has(u) && (i = !0, s = l.slice(o + 1, o + 1 + $e.length).join("") === $e), i) {
      s ? u === Ct && (i = !1, s = !1) : u === vr && (i = !1);
      continue;
    }
    D += c, D === n && o < l.length - 1 && (e.push(""), D = 0);
  }
  !D && e.at(-1).length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
}, Ei = (e) => {
  const r = e.split(" ");
  let n = r.length;
  for (; n > 0 && !(se(r[n - 1]) > 0); )
    n--;
  return n === r.length ? e : r.slice(0, n).join(" ") + r.slice(n).join("");
}, Ci = (e, r, n = {}) => {
  if (n.trim !== !1 && e.trim() === "") return "";
  let l = "", i, s;
  const D = gi(e);
  let o = [""];
  for (const [h, m] of e.split(" ").entries()) {
    n.trim !== !1 && (o[o.length - 1] = o.at(-1).trimStart());
    let g = se(o.at(-1));
    if (h !== 0 && (g >= r && (n.wordWrap === !1 || n.trim === !1) && (o.push(""), g = 0), (g > 0 || n.trim === !1) && (o[o.length - 1] += " ", g++)), n.hard && D[h] > r) {
      const E = r - g, v = 1 + Math.floor((D[h] - E - 1) / r);
      Math.floor((D[h] - 1) / r) < v && o.push(""), Xe(o, m, r);
      continue;
    }
    if (g + D[h] > r && g > 0 && D[h] > 0) {
      if (n.wordWrap === !1 && g < r) {
        Xe(o, m, r);
        continue;
      }
      o.push("");
    }
    if (g + D[h] > r && n.wordWrap === !1) {
      Xe(o, m, r);
      continue;
    }
    o[o.length - 1] += m;
  }
  n.trim !== !1 && (o = o.map((h) => Ei(h)));
  const u = o.join(`
`), c = [...u];
  let F = 0;
  for (const [h, m] of c.entries()) {
    if (l += m, Le.has(m)) {
      const { groups: E } = new RegExp(`(?:\\${yr}(?<code>\\d+)m|\\${$e}(?<uri>.*)${Ct})`).exec(u.slice(F)) || { groups: {} };
      if (E.code !== void 0) {
        const v = Number.parseFloat(E.code);
        i = v === Fi ? void 0 : v;
      } else E.uri !== void 0 && (s = E.uri.length === 0 ? void 0 : E.uri);
    }
    const g = di.codes.get(Number(i));
    c[h + 1] === `
` ? (s && (l += Gt("")), i && g && (l += Ut(g))) : m === `
` && (i && g && (l += Ut(i)), s && (l += Gt(s))), F += m.length;
  }
  return l;
};
function _r(e, r, n) {
  return String(e).normalize().replaceAll(`\r
`, `
`).split(`
`).map((l) => Ci(l, r, n)).join(`
`);
}
var fe = `
`, ue = " ", Ae = "none", Ar = () => {
  const { env: e, stdout: r, stderr: n } = P;
  return r?.columns ? r.columns : n?.columns ? n.columns : e.COLUMNS ? Number.parseInt(e.COLUMNS, 10) : 80;
}, Yt = (e) => typeof e == "number" ? {
  top: e,
  right: e * 3,
  bottom: e,
  left: e * 3
} : {
  top: 0,
  right: 0,
  bottom: 0,
  left: 0,
  ...e
}, be = (e) => e === Ae ? 0 : 2, yi = (e) => {
  const r = [
    "topLeft",
    "topRight",
    "bottomRight",
    "bottomLeft",
    "left",
    "right",
    "top",
    "bottom"
  ];
  let n;
  if (e === Ae) {
    e = {};
    for (const l of r) e[l] = "";
  }
  if (typeof e == "string") {
    if (n = Zn.default[e], !n) throw new TypeError(`Invalid border style: ${e}`);
  } else {
    typeof e?.vertical == "string" && (e.left = e.vertical, e.right = e.vertical), typeof e?.horizontal == "string" && (e.top = e.horizontal, e.bottom = e.horizontal);
    for (const l of r) if (e[l] === null || typeof e[l] != "string") throw new TypeError(`Invalid border style: ${l}`);
    n = e;
  }
  return n;
}, vi = (e, r, n) => {
  let l = "";
  const i = se(e);
  switch (n) {
    case "left":
      l = e + r.slice(i);
      break;
    case "right":
      l = r.slice(i) + e;
      break;
    default:
      r = r.slice(i), r.length % 2 === 1 ? (r = r.slice(Math.floor(r.length / 2)), l = r.slice(1) + e + r) : (r = r.slice(r.length / 2), l = r + e + r);
      break;
  }
  return l;
}, _i = (e, { padding: r, width: n, textAlignment: l, height: i }) => {
  e = (0, Ht.default)(e, { align: l });
  let s = e.split(fe);
  const D = gr(e), o = n - r.left - r.right;
  if (D > o) {
    const F = [];
    for (const h of s) {
      const m = (0, Ht.default)(_r(h, o, { hard: !0 }), { align: l }).split(`
`), g = Math.max(...m.map((E) => se(E)));
      for (const E of m) {
        let v;
        switch (l) {
          case "center":
            v = ue.repeat((o - g) / 2) + E;
            break;
          case "right":
            v = ue.repeat(o - g) + E;
            break;
          default:
            v = E;
            break;
        }
        F.push(v);
      }
    }
    s = F;
  }
  l === "center" && D < o ? s = s.map((F) => ue.repeat((o - D) / 2) + F) : l === "right" && D < o && (s = s.map((F) => ue.repeat(o - D) + F));
  const u = ue.repeat(r.left), c = ue.repeat(r.right);
  return s = s.map((F) => {
    const h = u + F + c;
    return h + ue.repeat(n - se(h));
  }), r.top > 0 && (s = [...Array.from({ length: r.top }).fill(ue.repeat(n)), ...s]), r.bottom > 0 && (s = [...s, ...Array.from({ length: r.bottom }).fill(ue.repeat(n))]), i && s.length > i ? s = s.slice(0, i) : i && s.length < i && (s = [...s, ...Array.from({ length: i - s.length }).fill(ue.repeat(n))]), s.join(fe);
}, Ai = (e, r, n) => {
  const l = (F) => {
    const h = n.borderColor ? Bi(n.borderColor)(F) : F;
    return n.dimBorder ? ne.dim(h) : h;
  }, i = (F) => n.backgroundColor ? Oi(n.backgroundColor)(F) : F, s = yi(n.borderStyle), D = Ar();
  let o = ue.repeat(n.margin.left);
  if (n.float === "center") {
    const F = Math.max((D - r - be(n.borderStyle)) / 2, 0);
    o = ue.repeat(F);
  } else if (n.float === "right") {
    const F = Math.max(D - r - n.margin.right - be(n.borderStyle), 0);
    o = ue.repeat(F);
  }
  let u = "";
  n.margin.top && (u += fe.repeat(n.margin.top)), (n.borderStyle !== Ae || n.title) && (u += l(o + s.topLeft + (n.title ? vi(n.title, s.top.repeat(r), n.titleAlignment) : s.top.repeat(r)) + s.topRight) + fe);
  const c = e.split(fe);
  return u += c.map((F) => o + l(s.left) + i(F) + l(s.right)).join(fe), n.borderStyle !== Ae && (u += fe + l(o + s.bottomLeft + s.bottom.repeat(r) + s.bottomRight)), n.margin.bottom && (u += fe.repeat(n.margin.bottom)), u;
}, bi = (e) => {
  if (e.fullscreen && P?.stdout) {
    let r = [P.stdout.columns, P.stdout.rows];
    typeof e.fullscreen == "function" && (r = e.fullscreen(...r)), e.width ||= r[0], e.height ||= r[1];
  }
  return e.width &&= Math.max(1, e.width - be(e.borderStyle)), e.height &&= Math.max(1, e.height - be(e.borderStyle)), e;
}, Jt = (e, r) => r === Ae ? e : ` ${e} `, wi = (e, r) => {
  r = bi(r);
  const n = r.width !== void 0, l = Ar(), i = be(r.borderStyle), s = l - r.margin.left - r.margin.right - i, D = gr(_r(e, l - i, {
    hard: !0,
    trim: !1
  })) + r.padding.left + r.padding.right;
  if (r.title && n ? (r.title = r.title.slice(0, Math.max(0, r.width - 2)), r.title &&= Jt(r.title, r.borderStyle)) : r.title && (r.title = r.title.slice(0, Math.max(0, s - 2)), r.title && (r.title = Jt(r.title, r.borderStyle), se(r.title) > D && (r.width = se(r.title)))), r.width ||= D, !n) {
    if (r.margin.left && r.margin.right && r.width > s) {
      const o = (l - r.width - i) / (r.margin.left + r.margin.right);
      r.margin.left = Math.max(0, Math.floor(r.margin.left * o)), r.margin.right = Math.max(0, Math.floor(r.margin.right * o));
    }
    r.width = Math.min(r.width, l - i - r.margin.left - r.margin.right);
  }
  return r.width - (r.padding.left + r.padding.right) <= 0 && (r.padding.left = 0, r.padding.right = 0), r.height && r.height - (r.padding.top + r.padding.bottom) <= 0 && (r.padding.top = 0, r.padding.bottom = 0), r;
}, yt = (e) => e.match(/^#(?:[0-f]{3}){1,2}$/i), Kt = (e) => typeof e == "string" && (ne[e] ?? yt(e)), Bi = (e) => yt(e) ? ne.hex(e) : ne[e], Oi = (e) => yt(e) ? ne.bgHex(e) : ne[si(["bg", e])];
function zt(e, r) {
  if (r = {
    padding: 0,
    borderStyle: "single",
    dimBorder: !1,
    textAlignment: "left",
    float: "left",
    titleAlignment: "left",
    ...r
  }, r.align && (r.textAlignment = r.align), r.borderColor && !Kt(r.borderColor)) throw new Error(`${r.borderColor} is not a valid borderColor`);
  if (r.backgroundColor && !Kt(r.backgroundColor)) throw new Error(`${r.backgroundColor} is not a valid backgroundColor`);
  return r.padding = Yt(r.padding), r.margin = Yt(r.margin), r = wi(e, r), e = _i(e, r), Ai(e, r.width, r);
}
var Si = ve.CI !== "0" && ve.CI !== "false" && ("CI" in ve || "CONTINUOUS_INTEGRATION" in ve || Object.keys(ve).some((e) => e.startsWith("CI_"))), Xt = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
function xi(e, ...r) {
  if (typeof e == "string") return Xt(e);
  let n = e[0];
  for (const [l, i] of r.entries()) n = n + Xt(String(i)) + e[l + 1];
  return n;
}
var Ti = class extends Error {
  constructor(e) {
    super(`Missing a value for ${e ? `the placeholder: ${e}` : "a placeholder"}`, e), this.name = "MissingValueError", this.key = e;
  }
}, Ri = class extends Error {
  constructor(e) {
    super(`Missing filter: ${e}`), this.name = "MissingFilterError", this.filterName = e;
  }
};
function $i(e, r, { ignoreMissing: n = !1, transform: l = ({ value: s }) => s, filters: i = {} } = {}) {
  if (typeof e != "string") throw new TypeError(`Expected a \`string\` in the first argument, got \`${typeof e}\``);
  if (typeof r != "object") throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof r}\``);
  const s = "", D = "";
  e = e.replace(/\\{/g, s), e = e.replace(/\\}/g, D);
  const o = (m) => {
    const g = [];
    let E = "";
    for (let v = 0; v < m.length; v++) m[v] === "\\" && m[v + 1] === "." ? (E += ".", v++) : m[v] === "." ? (g.push(E), E = "") : E += m[v];
    return g.push(E), g;
  }, u = (m, g) => {
    const E = g.split("|").map((p) => p.trim()), v = E[0], y = E.slice(1), f = o(v);
    let t = r;
    for (const p of f) t && (t = t[p]);
    for (const p of y) {
      const d = i[p];
      if (!d) {
        if (n) return m;
        throw new Ri(p);
      }
      t !== void 0 && (t = d(t));
    }
    const a = l({
      value: t,
      key: v
    });
    if (a === void 0) {
      if (n) return m;
      throw new Ti(v);
    }
    return String(a);
  }, c = "((\\d+|[a-z$_][\\w\\-.$\\\\]*)\\s*(?:\\|\\s*[a-z$_][\\w$]*\\s*)*)", F = new RegExp(`{{${c}}}`, "gi"), h = new RegExp(`{${c}}`, "gi");
  return e = e.replace(F, (...m) => xi(u(...m))), e = e.replace(h, u), e = e.replace(new RegExp(s, "g"), "{"), e = e.replace(new RegExp(D, "g"), "}"), e;
}
var Pi = U.dirname(Zt(import.meta.url)), Ni = 1e3 * 60 * 60 * 24, Ii = class {
  config;
  update;
  _packageName;
  _shouldNotifyInNpmScript;
  #s;
  #r;
  #u;
  #t;
  constructor(e = {}) {
    if (this.#s = e, e.pkg ??= {}, e.distTag ??= "latest", e.pkg = {
      name: e.pkg.name ?? e.packageName,
      version: e.pkg.version ?? e.packageVersion
    }, !e.pkg.name || !e.pkg.version) throw new Error("pkg.name and pkg.version required");
    if (this._packageName = e.pkg.name, this.#r = e.pkg.version, this.#u = typeof e.updateCheckInterval == "number" ? e.updateCheckInterval : Ni, this.#t = "NO_UPDATE_NOTIFIER" in P.env || P.env.NODE_ENV === "test" || P.argv.includes("--no-update-notifier") || Si, this._shouldNotifyInNpmScript = e.shouldNotifyInNpmScript, !this.#t) try {
      this.config = new du(`update-notifier-${this._packageName}`, {
        optOut: !1,
        lastUpdateCheck: Date.now()
      });
    } catch {
      const r = ne.yellow(Ge(" %s update check failed ", e.pkg.name)) + Ge(`
 Try running with %s or get access `, ne.cyan("sudo")) + `
 to the local update config store via 
` + ne.cyan(Ge(" sudo chown -R $USER:$(id -gn $USER) %s ", Re));
      P.on("exit", () => {
        console.error(zt(r, { textAlignment: "center" }));
      });
    }
  }
  check() {
    !this.config || this.config.get("optOut") || this.#t || (this.update = this.config.get("update"), this.update && (this.update.current = this.#r, this.config.delete("update")), !(Date.now() - this.config.get("lastUpdateCheck") < this.#u) && jr(P.execPath, [U.join(Pi, "check.js"), JSON.stringify(this.#s)], {
      detached: !0,
      stdio: "ignore"
    }).unref());
  }
  async fetchInfo() {
    const { distTag: e } = this.#s, r = await gn(this._packageName, { version: e });
    return {
      latest: r,
      current: this.#r,
      type: (0, Fu.default)(this.#r, r) ?? e,
      name: this._packageName
    };
  }
  notify(e) {
    const r = !this._shouldNotifyInNpmScript && vn;
    if (!P.stdout.isTTY || r || !this.update || !(0, mu.default)(this.update.latest, this.update.current)) return this;
    e = {
      isGlobal: xn,
      ...e
    };
    const n = e.isGlobal ? `npm i -g ${this._packageName}` : `npm i ${this._packageName}`, l = "Update available " + ne.dim("{currentVersion}") + ne.reset(" → ") + ne.green("{latestVersion}") + ` 
Run ` + ne.cyan("{updateCommand}") + " to update", i = e.message || l;
    e.boxenOptions ??= {
      padding: 1,
      margin: 1,
      textAlignment: "center",
      borderColor: "yellow",
      borderStyle: "round"
    };
    const s = zt($i(i, {
      packageName: this._packageName,
      currentVersion: this.update.current,
      latestVersion: this.update.latest,
      updateCommand: n
    }), e.boxenOptions);
    return e.defer === !1 ? console.error(s) : P.on("exit", () => {
      console.error(s);
    }), this;
  }
};
function ki(e) {
  const r = new Ii(e);
  return r.check(), r;
}
var Qt = "Output the version number of npm-check-updates.", ji = (e) => e.replace(/`/g, ""), Li = (0, Kr.default)();
(async () => {
  const e = ki({ pkg: ge });
  if (e.update && e.update.latest !== ge.version) {
    const f = Rr(!0), t = Qe.default.parse(e.update.current)?.major, a = Qe.default.parse(e.update.latest)?.major, p = (t && a && a >= t ? new Array(a - t).fill(0).map((C, _) => t + _ + 1) : []).map((C) => `${ge.homepage ?? ""}/releases/tag/v${C}.0.0`), d = `${ge.homepage ?? ""}/compare/v${e.update.current}...v${e.update.latest}`;
    e.notify({
      defer: !1,
      isGlobal: !0,
      message: `Update available ${f.dim("{currentVersion}")}${f.reset(" → ")}${e.update.type === "major" ? f.red("{latestVersion}") : e.update.type === "minor" ? f.yellow("{latestVersion}") : f.green("{latestVersion}")}
Run ${f.cyan("{updateCommand}")} to update
${f.dim.underline(e.update.type === "major" ? p.map((C) => f.dim.underline(C)).join(`
`) : d)}`
    });
  }
  const r = process.argv.slice(2), n = r.findIndex((f) => f === "--help" || f === "-h");
  if (n !== -1 && r[n + 1]) {
    const f = r[n + 1].replace(/^-*/, "");
    f === "help" || f === "h" ? console.info("Would you like some help with your help?") : (await vt(), [...r.slice(0, n), ...r.slice(n + 1)].forEach((t) => {
      const a = t.replace(/^-*/, ""), p = Ue.find((d) => a === d.long || a === d.short || a === `no-${d.long}` && d.type === "boolean");
      console.info(p ? _t(p) + `
` : a === "version" || a === "v" || a === "V" ? _t({
        long: "version",
        short: "v",
        description: Qt,
        type: "string"
      }) + `
` : `Unknown option: ${t}`);
    })), process.exit(0);
  }
  const l = new Set(Ue.filter((f) => f.cli === !1).map((f) => `--${f.long}`));
  te.description("[filter] is a list or regex of package names to check (all others will be ignored).").usage("[options] [filter]").configureHelp({
    optionTerm: (f) => f.long && l.has(f.long) ? f.long.replace("--", "") + "*" : f.long === "--version" ? "-v, -V, --version" : f.flags.replace("[bool]", ""),
    optionDescription: (f) => f.long === "--version" ? Qt : f.long === "--help" ? `You're lookin' at it. Run "ncu --help <option>" for a specific option.` : Vr.prototype.optionDescription(f)
  }).addOption(new At("-v, --versionAlias").hideHelp()).on("option:versionAlias", () => {
    console.info(ge.version), process.exit(0);
  }), Ue.forEach(({ long: f, short: t, arg: a, description: p, default: d, help: C, parse: _, type: A }) => {
    const b = `${t ? `-${t}, ` : ""}--${f}${a ? ` <${a}>` : ""}`, O = `${ji(p)}${C ? ` Run "ncu --help ${f}" for details.` : ""}`;
    te.option(b, O, _ || d, _ ? d : void 0), A === "boolean" && te.addOption(new At(`--no-${f}`).default(!1).hideHelp());
  }), te.version(ge.version);
  const i = Li(te._optionValues);
  te.allowExcessArguments(!0), te.parse(process.argv);
  const s = te.opts(), D = process.argv.slice(2), { color: o, configFileName: u, configFilePath: c, global: F, packageFile: h, mergeConfig: m } = s;
  await vt(o);
  const g = !process.env.NCU_TESTS || c || m ? await $r({
    configFileName: u,
    configFilePath: c,
    global: F,
    packageFile: h,
    options: {
      ...s,
      cli: !0
    }
  }) : null, E = (g?.args || []).filter((f, t, a) => (typeof f != "string" || !f.startsWith("-") || !D.includes(f)) && (typeof a[t - 1] != "string" || !a[t - 1].startsWith("-") || !D.includes(a[t - 1]))), v = [
    ...process.argv.slice(0, 2),
    ...E,
    ...D
  ];
  te._optionValues = i, te.parse(v);
  const y = te.opts();
  Sr({
    ...g && Object.keys(g.config).length > 0 ? { rcConfigPath: g.filePath } : null,
    ...Ir(te.opts(), (f) => f !== void 0),
    args: te.args,
    ...y.filter ? { filter: y.filter } : null,
    ...y.reject ? { reject: y.reject } : null
  }, { cli: !0 });
})();

//# sourceMappingURL=cli.js.map