@storybook/core
Version:
Storybook framework-agnostic API
1,499 lines (1,475 loc) • 354 kB
JavaScript
"use strict";
var Qm = Object.create;
var Ht = Object.defineProperty;
var Xm = Object.getOwnPropertyDescriptor;
var Zm = Object.getOwnPropertyNames;
var Jm = Object.getPrototypeOf, eg = Object.prototype.hasOwnProperty;
var n = (t, e) => Ht(t, "name", { value: e, configurable: !0 });
var fe = (t, e) => () => (t && (e = t(t = 0)), e);
var f = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), _t = (t, e) => {
for (var r in e)
Ht(t, r, { get: e[r], enumerable: !0 });
}, ma = (t, e, r, i) => {
if (e && typeof e == "object" || typeof e == "function")
for (let s of Zm(e))
!eg.call(t, s) && s !== r && Ht(t, s, { get: () => e[s], enumerable: !(i = Xm(e, s)) || i.enumerable });
return t;
};
var j = (t, e, r) => (r = t != null ? Qm(Jm(t)) : {}, ma(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
e || !t || !t.__esModule ? Ht(r, "default", { value: t, enumerable: !0 }) : r,
t
)), xr = (t) => ma(Ht({}, "__esModule", { value: !0 }), t);
// ../node_modules/ts-dedent/dist/index.js
var ut = f((Bt) => {
"use strict";
Object.defineProperty(Bt, "__esModule", { value: !0 });
Bt.dedent = void 0;
function ga(t) {
for (var e = [], r = 1; r < arguments.length; r++)
e[r - 1] = arguments[r];
var i = Array.from(typeof t == "string" ? [t] : t);
i[i.length - 1] = i[i.length - 1].replace(/\r?\n([\t ]*)$/, "");
var s = i.reduce(function(l, c) {
var u = c.match(/\n([\t ]+|(?!\s).)/g);
return u ? l.concat(u.map(function(h) {
var m, p;
return (p = (m = h.match(/[\t ]/g)) === null || m === void 0 ? void 0 : m.length) !== null && p !== void 0 ? p : 0;
})) : l;
}, []);
if (s.length) {
var o = new RegExp(`
[ ]{` + Math.min.apply(Math, s) + "}", "g");
i = i.map(function(l) {
return l.replace(o, `
`);
});
}
i[0] = i[0].replace(/^\r?\n/, "");
var a = i[0];
return e.forEach(function(l, c) {
var u = a.match(/(?:^|\n)( *)$/), h = u ? u[1] : "", m = l;
typeof l == "string" && l.includes(`
`) && (m = String(l).split(`
`).map(function(p, v) {
return v === 0 ? p : "" + h + p;
}).join(`
`)), a += m + i[c + 1];
}), a;
}
n(ga, "dedent");
Bt.dedent = ga;
Bt.default = ga;
});
// ../node_modules/camelcase/index.js
var ka = {};
_t(ka, {
default: () => La
});
function La(t, e) {
if (!(typeof t == "string" || Array.isArray(t)))
throw new TypeError("Expected the input to be `string | string[]`");
if (e = {
pascalCase: !1,
preserveConsecutiveUppercase: !1,
...e
}, Array.isArray(t) ? t = t.map((o) => o.trim()).filter((o) => o.length).join("-") : t = t.trim(), t.length === 0)
return "";
let r = e.locale === !1 ? (o) => o.toLowerCase() : (o) => o.toLocaleLowerCase(e.locale), i = e.locale === !1 ? (o) => o.toUpperCase() : (o) => o.
toLocaleUpperCase(e.locale);
return t.length === 1 ? qi.test(t) ? "" : e.pascalCase ? i(t) : r(t) : (t !== r(t) && (t = ng(t, r, i, e.preserveConsecutiveUppercase)), t =
t.replace(sg, ""), t = e.preserveConsecutiveUppercase ? og(t, r) : r(t), e.pascalCase && (t = i(t.charAt(0)) + t.slice(1)), ag(t, i));
}
var rg, ig, Ca, Na, qi, sg, Da, Ia, ng, og, ag, $a = fe(() => {
rg = /[\p{Lu}]/u, ig = /[\p{Ll}]/u, Ca = /^[\p{Lu}](?![\p{Lu}])/gu, Na = /([\p{Alpha}\p{N}_]|$)/u, qi = /[_.\- ]+/, sg = new RegExp("^" + qi.
source), Da = new RegExp(qi.source + Na.source, "gu"), Ia = new RegExp("\\d+" + Na.source, "gu"), ng = /* @__PURE__ */ n((t, e, r, i) => {
let s = !1, o = !1, a = !1, l = !1;
for (let c = 0; c < t.length; c++) {
let u = t[c];
l = c > 2 ? t[c - 3] === "-" : !0, s && rg.test(u) ? (t = t.slice(0, c) + "-" + t.slice(c), s = !1, a = o, o = !0, c++) : o && a && ig.
test(u) && (!l || i) ? (t = t.slice(0, c - 1) + "-" + t.slice(c - 1), a = o, o = !1, s = !0) : (s = e(u) === u && r(u) !== u, a = o, o =
r(u) === u && e(u) !== u);
}
return t;
}, "preserveCamelCase"), og = /* @__PURE__ */ n((t, e) => (Ca.lastIndex = 0, t.replaceAll(Ca, (r) => e(r))), "preserveConsecutiveUppercase"),
ag = /* @__PURE__ */ n((t, e) => (Da.lastIndex = 0, Ia.lastIndex = 0, t.replaceAll(Ia, (r, i, s) => ["_", "-"].includes(t.charAt(s + r.length)) ?
r : e(r)).replaceAll(Da, (r, i) => e(i))), "postProcess");
n(La, "camelCase");
});
// ../node_modules/@sindresorhus/merge-streams/index.js
function Vi(t) {
if (!Array.isArray(t))
throw new TypeError(`Expected an array, got \`${typeof t}\`.`);
for (let s of t)
Ui(s);
let e = t.some(({ readableObjectMode: s }) => s), r = lg(t, e), i = new Bi({
objectMode: e,
writableHighWaterMark: r,
readableHighWaterMark: r
});
for (let s of t)
i.add(s);
return t.length === 0 && rl(i), i;
}
var vr, Ja, Gi, lg, Bi, cg, ug, hg, Ui, pg, el, dg, fg, mg, tl, rl, Wi, il, gg, Sr, Xa, Za, sl = fe(() => {
vr = require("node:events"), Ja = require("node:stream"), Gi = require("node:stream/promises");
n(Vi, "mergeStreams");
lg = /* @__PURE__ */ n((t, e) => {
if (t.length === 0)
return 16384;
let r = t.filter(({ readableObjectMode: i }) => i === e).map(({ readableHighWaterMark: i }) => i);
return Math.max(...r);
}, "getHighWaterMark"), Bi = class extends Ja.PassThrough {
static {
n(this, "MergedStream");
}
#e = /* @__PURE__ */ new Set([]);
#r = /* @__PURE__ */ new Set([]);
#i = /* @__PURE__ */ new Set([]);
#t;
add(e) {
Ui(e), !this.#e.has(e) && (this.#e.add(e), this.#t ??= cg(this, this.#e), pg({
passThroughStream: this,
stream: e,
streams: this.#e,
ended: this.#r,
aborted: this.#i,
onFinished: this.#t
}), e.pipe(this, { end: !1 }));
}
remove(e) {
return Ui(e), this.#e.has(e) ? (e.unpipe(this), !0) : !1;
}
}, cg = /* @__PURE__ */ n(async (t, e) => {
Sr(t, Xa);
let r = new AbortController();
try {
await Promise.race([
ug(t, r),
hg(t, e, r)
]);
} finally {
r.abort(), Sr(t, -Xa);
}
}, "onMergedStreamFinished"), ug = /* @__PURE__ */ n(async (t, { signal: e }) => {
await (0, Gi.finished)(t, { signal: e, cleanup: !0 });
}, "onMergedStreamEnd"), hg = /* @__PURE__ */ n(async (t, e, { signal: r }) => {
for await (let [i] of (0, vr.on)(t, "unpipe", { signal: r }))
e.has(i) && i.emit(tl);
}, "onInputStreamsUnpipe"), Ui = /* @__PURE__ */ n((t) => {
if (typeof t?.pipe != "function")
throw new TypeError(`Expected a readable stream, got: \`${typeof t}\`.`);
}, "validateStream"), pg = /* @__PURE__ */ n(async ({ passThroughStream: t, stream: e, streams: r, ended: i, aborted: s, onFinished: o }) => {
Sr(t, Za);
let a = new AbortController();
try {
await Promise.race([
dg(o, e),
fg({ passThroughStream: t, stream: e, streams: r, ended: i, aborted: s, controller: a }),
mg({ stream: e, streams: r, ended: i, aborted: s, controller: a })
]);
} finally {
a.abort(), Sr(t, -Za);
}
r.size === i.size + s.size && (i.size === 0 && s.size > 0 ? Wi(t) : rl(t));
}, "endWhenStreamsDone"), el = /* @__PURE__ */ n((t) => t?.code === "ERR_STREAM_PREMATURE_CLOSE", "isAbortError"), dg = /* @__PURE__ */ n(
async (t, e) => {
try {
await t, Wi(e);
} catch (r) {
el(r) ? Wi(e) : il(e, r);
}
}, "afterMergedStreamFinished"), fg = /* @__PURE__ */ n(async ({ passThroughStream: t, stream: e, streams: r, ended: i, aborted: s, controller: {
signal: o } }) => {
try {
await (0, Gi.finished)(e, { signal: o, cleanup: !0, readable: !0, writable: !1 }), r.has(e) && i.add(e);
} catch (a) {
if (o.aborted || !r.has(e))
return;
el(a) ? s.add(e) : il(t, a);
}
}, "onInputStreamEnd"), mg = /* @__PURE__ */ n(async ({ stream: t, streams: e, ended: r, aborted: i, controller: { signal: s } }) => {
await (0, vr.once)(t, tl, { signal: s }), e.delete(t), r.delete(t), i.delete(t);
}, "onInputStreamUnpipe"), tl = Symbol("unpipe"), rl = /* @__PURE__ */ n((t) => {
t.writable && t.end();
}, "endStream"), Wi = /* @__PURE__ */ n((t) => {
(t.readable || t.writable) && t.destroy();
}, "abortStream"), il = /* @__PURE__ */ n((t, e) => {
t.destroyed || (t.once("error", gg), t.destroy(e));
}, "errorStream"), gg = /* @__PURE__ */ n(() => {
}, "noop"), Sr = /* @__PURE__ */ n((t, e) => {
let r = t.getMaxListeners();
r !== 0 && r !== Number.POSITIVE_INFINITY && t.setMaxListeners(r + e);
}, "updateMaxListeners"), Xa = 2, Za = 1;
});
// ../node_modules/globby/node_modules/fast-glob/out/utils/array.js
var nl = f((vt) => {
"use strict";
Object.defineProperty(vt, "__esModule", { value: !0 });
vt.splitWhen = vt.flatten = void 0;
function yg(t) {
return t.reduce((e, r) => [].concat(e, r), []);
}
n(yg, "flatten");
vt.flatten = yg;
function xg(t, e) {
let r = [[]], i = 0;
for (let s of t)
e(s) ? (i++, r[i] = []) : r[i].push(s);
return r;
}
n(xg, "splitWhen");
vt.splitWhen = xg;
});
// ../node_modules/globby/node_modules/fast-glob/out/utils/errno.js
var ol = f((wr) => {
"use strict";
Object.defineProperty(wr, "__esModule", { value: !0 });
wr.isEnoentCodeError = void 0;
function _g(t) {
return t.code === "ENOENT";
}
n(_g, "isEnoentCodeError");
wr.isEnoentCodeError = _g;
});
// ../node_modules/globby/node_modules/fast-glob/out/utils/fs.js
var al = f((Rr) => {
"use strict";
Object.defineProperty(Rr, "__esModule", { value: !0 });
Rr.createDirentFromStats = void 0;
var Yi = class {
static {
n(this, "DirentFromStats");
}
constructor(e, r) {
this.name = e, this.isBlockDevice = r.isBlockDevice.bind(r), this.isCharacterDevice = r.isCharacterDevice.bind(r), this.isDirectory = r.
isDirectory.bind(r), this.isFIFO = r.isFIFO.bind(r), this.isFile = r.isFile.bind(r), this.isSocket = r.isSocket.bind(r), this.isSymbolicLink =
r.isSymbolicLink.bind(r);
}
};
function bg(t, e) {
return new Yi(t, e);
}
n(bg, "createDirentFromStats");
Rr.createDirentFromStats = bg;
});
// ../node_modules/globby/node_modules/fast-glob/out/utils/path.js
var hl = f((Z) => {
"use strict";
Object.defineProperty(Z, "__esModule", { value: !0 });
Z.convertPosixPathToPattern = Z.convertWindowsPathToPattern = Z.convertPathToPattern = Z.escapePosixPath = Z.escapeWindowsPath = Z.escape =
Z.removeLeadingDotSegment = Z.makeAbsolute = Z.unixify = void 0;
var Eg = require("os"), Sg = require("path"), ll = Eg.platform() === "win32", vg = 2, wg = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,
Rg = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g, Tg = /^\\\\([.?])/, Ag = /\\(?![!()+@[\]{}])/g;
function Pg(t) {
return t.replace(/\\/g, "/");
}
n(Pg, "unixify");
Z.unixify = Pg;
function Og(t, e) {
return Sg.resolve(t, e);
}
n(Og, "makeAbsolute");
Z.makeAbsolute = Og;
function Cg(t) {
if (t.charAt(0) === ".") {
let e = t.charAt(1);
if (e === "/" || e === "\\")
return t.slice(vg);
}
return t;
}
n(Cg, "removeLeadingDotSegment");
Z.removeLeadingDotSegment = Cg;
Z.escape = ll ? zi : Ki;
function zi(t) {
return t.replace(Rg, "\\$2");
}
n(zi, "escapeWindowsPath");
Z.escapeWindowsPath = zi;
function Ki(t) {
return t.replace(wg, "\\$2");
}
n(Ki, "escapePosixPath");
Z.escapePosixPath = Ki;
Z.convertPathToPattern = ll ? cl : ul;
function cl(t) {
return zi(t).replace(Tg, "//$1").replace(Ag, "/");
}
n(cl, "convertWindowsPathToPattern");
Z.convertWindowsPathToPattern = cl;
function ul(t) {
return Ki(t);
}
n(ul, "convertPosixPathToPattern");
Z.convertPosixPathToPattern = ul;
});
// ../node_modules/is-extglob/index.js
var dl = f((hA, pl) => {
pl.exports = /* @__PURE__ */ n(function(e) {
if (typeof e != "string" || e === "")
return !1;
for (var r; r = /(\\).|([@?!+*]\(.*\))/g.exec(e); ) {
if (r[2]) return !0;
e = e.slice(r.index + r[0].length);
}
return !1;
}, "isExtglob");
});
// ../node_modules/is-glob/index.js
var gl = f((dA, ml) => {
var Dg = dl(), fl = { "{": "}", "(": ")", "[": "]" }, Ig = /* @__PURE__ */ n(function(t) {
if (t[0] === "!")
return !0;
for (var e = 0, r = -2, i = -2, s = -2, o = -2, a = -2; e < t.length; ) {
if (t[e] === "*" || t[e + 1] === "?" && /[\].+)]/.test(t[e]) || i !== -1 && t[e] === "[" && t[e + 1] !== "]" && (i < e && (i = t.indexOf(
"]", e)), i > e && (a === -1 || a > i || (a = t.indexOf("\\", e), a === -1 || a > i))) || s !== -1 && t[e] === "{" && t[e + 1] !== "}" &&
(s = t.indexOf("}", e), s > e && (a = t.indexOf("\\", e), a === -1 || a > s)) || o !== -1 && t[e] === "(" && t[e + 1] === "?" && /[:!=]/.
test(t[e + 2]) && t[e + 3] !== ")" && (o = t.indexOf(")", e), o > e && (a = t.indexOf("\\", e), a === -1 || a > o)) || r !== -1 && t[e] ===
"(" && t[e + 1] !== "|" && (r < e && (r = t.indexOf("|", e)), r !== -1 && t[r + 1] !== ")" && (o = t.indexOf(")", r), o > r && (a = t.
indexOf("\\", r), a === -1 || a > o))))
return !0;
if (t[e] === "\\") {
var l = t[e + 1];
e += 2;
var c = fl[l];
if (c) {
var u = t.indexOf(c, e);
u !== -1 && (e = u + 1);
}
if (t[e] === "!")
return !0;
} else
e++;
}
return !1;
}, "strictCheck"), Ng = /* @__PURE__ */ n(function(t) {
if (t[0] === "!")
return !0;
for (var e = 0; e < t.length; ) {
if (/[*?{}()[\]]/.test(t[e]))
return !0;
if (t[e] === "\\") {
var r = t[e + 1];
e += 2;
var i = fl[r];
if (i) {
var s = t.indexOf(i, e);
s !== -1 && (e = s + 1);
}
if (t[e] === "!")
return !0;
} else
e++;
}
return !1;
}, "relaxedCheck");
ml.exports = /* @__PURE__ */ n(function(e, r) {
if (typeof e != "string" || e === "")
return !1;
if (Dg(e))
return !0;
var i = Ig;
return r && r.strict === !1 && (i = Ng), i(e);
}, "isGlob");
});
// ../node_modules/glob-parent/index.js
var xl = f((mA, yl) => {
"use strict";
var Lg = gl(), kg = require("path").posix.dirname, $g = require("os").platform() === "win32", Qi = "/", Mg = /\\/g, qg = /[\{\[].*[\}\]]$/,
Fg = /(^|[^\\])([\{\[]|\([^\)]+$)/, jg = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
yl.exports = /* @__PURE__ */ n(function(e, r) {
var i = Object.assign({ flipBackslashes: !0 }, r);
i.flipBackslashes && $g && e.indexOf(Qi) < 0 && (e = e.replace(Mg, Qi)), qg.test(e) && (e += Qi), e += "a";
do
e = kg(e);
while (Lg(e) || Fg.test(e));
return e.replace(jg, "$1");
}, "globParent");
});
// ../node_modules/braces/lib/utils.js
var Tr = f((me) => {
"use strict";
me.isInteger = (t) => typeof t == "number" ? Number.isInteger(t) : typeof t == "string" && t.trim() !== "" ? Number.isInteger(Number(t)) :
!1;
me.find = (t, e) => t.nodes.find((r) => r.type === e);
me.exceedsLimit = (t, e, r = 1, i) => i === !1 || !me.isInteger(t) || !me.isInteger(e) ? !1 : (Number(e) - Number(t)) / Number(r) >= i;
me.escapeNode = (t, e = 0, r) => {
let i = t.nodes[e];
i && (r && i.type === r || i.type === "open" || i.type === "close") && i.escaped !== !0 && (i.value = "\\" + i.value, i.escaped = !0);
};
me.encloseBrace = (t) => t.type !== "brace" ? !1 : t.commas >> 0 + t.ranges >> 0 === 0 ? (t.invalid = !0, !0) : !1;
me.isInvalidBrace = (t) => t.type !== "brace" ? !1 : t.invalid === !0 || t.dollar ? !0 : t.commas >> 0 + t.ranges >> 0 === 0 || t.open !==
!0 || t.close !== !0 ? (t.invalid = !0, !0) : !1;
me.isOpenOrClose = (t) => t.type === "open" || t.type === "close" ? !0 : t.open === !0 || t.close === !0;
me.reduce = (t) => t.reduce((e, r) => (r.type === "text" && e.push(r.value), r.type === "range" && (r.type = "text"), e), []);
me.flatten = (...t) => {
let e = [], r = /* @__PURE__ */ n((i) => {
for (let s = 0; s < i.length; s++) {
let o = i[s];
if (Array.isArray(o)) {
r(o);
continue;
}
o !== void 0 && e.push(o);
}
return e;
}, "flat");
return r(t), e;
};
});
// ../node_modules/braces/lib/stringify.js
var Ar = f((_A, bl) => {
"use strict";
var _l = Tr();
bl.exports = (t, e = {}) => {
let r = /* @__PURE__ */ n((i, s = {}) => {
let o = e.escapeInvalid && _l.isInvalidBrace(s), a = i.invalid === !0 && e.escapeInvalid === !0, l = "";
if (i.value)
return (o || a) && _l.isOpenOrClose(i) ? "\\" + i.value : i.value;
if (i.value)
return i.value;
if (i.nodes)
for (let c of i.nodes)
l += r(c);
return l;
}, "stringify");
return r(t);
};
});
// ../node_modules/to-regex-range/node_modules/is-number/index.js
var Sl = f((EA, El) => {
"use strict";
El.exports = function(t) {
return typeof t == "number" ? t - t === 0 : typeof t == "string" && t.trim() !== "" ? Number.isFinite ? Number.isFinite(+t) : isFinite(+t) :
!1;
};
});
// ../node_modules/to-regex-range/index.js
var Dl = f((SA, Cl) => {
"use strict";
var vl = Sl(), ht = /* @__PURE__ */ n((t, e, r) => {
if (vl(t) === !1)
throw new TypeError("toRegexRange: expected the first argument to be a number");
if (e === void 0 || t === e)
return String(t);
if (vl(e) === !1)
throw new TypeError("toRegexRange: expected the second argument to be a number.");
let i = { relaxZeros: !0, ...r };
typeof i.strictZeros == "boolean" && (i.relaxZeros = i.strictZeros === !1);
let s = String(i.relaxZeros), o = String(i.shorthand), a = String(i.capture), l = String(i.wrap), c = t + ":" + e + "=" + s + o + a + l;
if (ht.cache.hasOwnProperty(c))
return ht.cache[c].result;
let u = Math.min(t, e), h = Math.max(t, e);
if (Math.abs(u - h) === 1) {
let b = t + "|" + e;
return i.capture ? `(${b})` : i.wrap === !1 ? b : `(?:${b})`;
}
let m = Ol(t) || Ol(e), p = { min: t, max: e, a: u, b: h }, v = [], g = [];
if (m && (p.isPadded = m, p.maxLen = String(p.max).length), u < 0) {
let b = h < 0 ? Math.abs(h) : 1;
g = wl(b, Math.abs(u), p, i), u = p.a = 0;
}
return h >= 0 && (v = wl(u, h, p, i)), p.negatives = g, p.positives = v, p.result = Hg(g, v, i), i.capture === !0 ? p.result = `(${p.result}\
)` : i.wrap !== !1 && v.length + g.length > 1 && (p.result = `(?:${p.result})`), ht.cache[c] = p, p.result;
}, "toRegexRange");
function Hg(t, e, r) {
let i = Xi(t, e, "-", !1, r) || [], s = Xi(e, t, "", !1, r) || [], o = Xi(t, e, "-?", !0, r) || [];
return i.concat(o).concat(s).join("|");
}
n(Hg, "collatePatterns");
function Bg(t, e) {
let r = 1, i = 1, s = Tl(t, r), o = /* @__PURE__ */ new Set([e]);
for (; t <= s && s <= e; )
o.add(s), r += 1, s = Tl(t, r);
for (s = Al(e + 1, i) - 1; t < s && s <= e; )
o.add(s), i += 1, s = Al(e + 1, i) - 1;
return o = [...o], o.sort(Gg), o;
}
n(Bg, "splitToRanges");
function Ug(t, e, r) {
if (t === e)
return { pattern: t, count: [], digits: 0 };
let i = Wg(t, e), s = i.length, o = "", a = 0;
for (let l = 0; l < s; l++) {
let [c, u] = i[l];
c === u ? o += c : c !== "0" || u !== "9" ? o += Vg(c, u, r) : a++;
}
return a && (o += r.shorthand === !0 ? "\\d" : "[0-9]"), { pattern: o, count: [a], digits: s };
}
n(Ug, "rangeToPattern");
function wl(t, e, r, i) {
let s = Bg(t, e), o = [], a = t, l;
for (let c = 0; c < s.length; c++) {
let u = s[c], h = Ug(String(a), String(u), i), m = "";
if (!r.isPadded && l && l.pattern === h.pattern) {
l.count.length > 1 && l.count.pop(), l.count.push(h.count[0]), l.string = l.pattern + Pl(l.count), a = u + 1;
continue;
}
r.isPadded && (m = Yg(u, r, i)), h.string = m + h.pattern + Pl(h.count), o.push(h), a = u + 1, l = h;
}
return o;
}
n(wl, "splitToPatterns");
function Xi(t, e, r, i, s) {
let o = [];
for (let a of t) {
let { string: l } = a;
!i && !Rl(e, "string", l) && o.push(r + l), i && Rl(e, "string", l) && o.push(r + l);
}
return o;
}
n(Xi, "filterPatterns");
function Wg(t, e) {
let r = [];
for (let i = 0; i < t.length; i++) r.push([t[i], e[i]]);
return r;
}
n(Wg, "zip");
function Gg(t, e) {
return t > e ? 1 : e > t ? -1 : 0;
}
n(Gg, "compare");
function Rl(t, e, r) {
return t.some((i) => i[e] === r);
}
n(Rl, "contains");
function Tl(t, e) {
return Number(String(t).slice(0, -e) + "9".repeat(e));
}
n(Tl, "countNines");
function Al(t, e) {
return t - t % Math.pow(10, e);
}
n(Al, "countZeros");
function Pl(t) {
let [e = 0, r = ""] = t;
return r || e > 1 ? `{${e + (r ? "," + r : "")}}` : "";
}
n(Pl, "toQuantifier");
function Vg(t, e, r) {
return `[${t}${e - t === 1 ? "" : "-"}${e}]`;
}
n(Vg, "toCharacterClass");
function Ol(t) {
return /^-?(0+)\d/.test(t);
}
n(Ol, "hasPadding");
function Yg(t, e, r) {
if (!e.isPadded)
return t;
let i = Math.abs(e.maxLen - String(t).length), s = r.relaxZeros !== !1;
switch (i) {
case 0:
return "";
case 1:
return s ? "0?" : "0";
case 2:
return s ? "0{0,2}" : "00";
default:
return s ? `0{0,${i}}` : `0{${i}}`;
}
}
n(Yg, "padZeros");
ht.cache = {};
ht.clearCache = () => ht.cache = {};
Cl.exports = ht;
});
// ../node_modules/fill-range/index.js
var es = f((wA, ql) => {
"use strict";
var zg = require("util"), Nl = Dl(), Il = /* @__PURE__ */ n((t) => t !== null && typeof t == "object" && !Array.isArray(t), "isObject"), Kg = /* @__PURE__ */ n(
(t) => (e) => t === !0 ? Number(e) : String(e), "transform"), Zi = /* @__PURE__ */ n((t) => typeof t == "number" || typeof t == "string" &&
t !== "", "isValidValue"), Vt = /* @__PURE__ */ n((t) => Number.isInteger(+t), "isNumber"), Ji = /* @__PURE__ */ n((t) => {
let e = `${t}`, r = -1;
if (e[0] === "-" && (e = e.slice(1)), e === "0") return !1;
for (; e[++r] === "0"; ) ;
return r > 0;
}, "zeros"), Qg = /* @__PURE__ */ n((t, e, r) => typeof t == "string" || typeof e == "string" ? !0 : r.stringify === !0, "stringify"), Xg = /* @__PURE__ */ n(
(t, e, r) => {
if (e > 0) {
let i = t[0] === "-" ? "-" : "";
i && (t = t.slice(1)), t = i + t.padStart(i ? e - 1 : e, "0");
}
return r === !1 ? String(t) : t;
}, "pad"), Or = /* @__PURE__ */ n((t, e) => {
let r = t[0] === "-" ? "-" : "";
for (r && (t = t.slice(1), e--); t.length < e; ) t = "0" + t;
return r ? "-" + t : t;
}, "toMaxLen"), Zg = /* @__PURE__ */ n((t, e, r) => {
t.negatives.sort((l, c) => l < c ? -1 : l > c ? 1 : 0), t.positives.sort((l, c) => l < c ? -1 : l > c ? 1 : 0);
let i = e.capture ? "" : "?:", s = "", o = "", a;
return t.positives.length && (s = t.positives.map((l) => Or(String(l), r)).join("|")), t.negatives.length && (o = `-(${i}${t.negatives.map(
(l) => Or(String(l), r)).join("|")})`), s && o ? a = `${s}|${o}` : a = s || o, e.wrap ? `(${i}${a})` : a;
}, "toSequence"), Ll = /* @__PURE__ */ n((t, e, r, i) => {
if (r)
return Nl(t, e, { wrap: !1, ...i });
let s = String.fromCharCode(t);
if (t === e) return s;
let o = String.fromCharCode(e);
return `[${s}-${o}]`;
}, "toRange"), kl = /* @__PURE__ */ n((t, e, r) => {
if (Array.isArray(t)) {
let i = r.wrap === !0, s = r.capture ? "" : "?:";
return i ? `(${s}${t.join("|")})` : t.join("|");
}
return Nl(t, e, r);
}, "toRegex"), $l = /* @__PURE__ */ n((...t) => new RangeError("Invalid range arguments: " + zg.inspect(...t)), "rangeError"), Ml = /* @__PURE__ */ n(
(t, e, r) => {
if (r.strictRanges === !0) throw $l([t, e]);
return [];
}, "invalidRange"), Jg = /* @__PURE__ */ n((t, e) => {
if (e.strictRanges === !0)
throw new TypeError(`Expected step "${t}" to be a number`);
return [];
}, "invalidStep"), ey = /* @__PURE__ */ n((t, e, r = 1, i = {}) => {
let s = Number(t), o = Number(e);
if (!Number.isInteger(s) || !Number.isInteger(o)) {
if (i.strictRanges === !0) throw $l([t, e]);
return [];
}
s === 0 && (s = 0), o === 0 && (o = 0);
let a = s > o, l = String(t), c = String(e), u = String(r);
r = Math.max(Math.abs(r), 1);
let h = Ji(l) || Ji(c) || Ji(u), m = h ? Math.max(l.length, c.length, u.length) : 0, p = h === !1 && Qg(t, e, i) === !1, v = i.transform ||
Kg(p);
if (i.toRegex && r === 1)
return Ll(Or(t, m), Or(e, m), !0, i);
let g = { negatives: [], positives: [] }, b = /* @__PURE__ */ n((k) => g[k < 0 ? "negatives" : "positives"].push(Math.abs(k)), "push"), R = [],
T = 0;
for (; a ? s >= o : s <= o; )
i.toRegex === !0 && r > 1 ? b(s) : R.push(Xg(v(s, T), m, p)), s = a ? s - r : s + r, T++;
return i.toRegex === !0 ? r > 1 ? Zg(g, i, m) : kl(R, null, { wrap: !1, ...i }) : R;
}, "fillNumbers"), ty = /* @__PURE__ */ n((t, e, r = 1, i = {}) => {
if (!Vt(t) && t.length > 1 || !Vt(e) && e.length > 1)
return Ml(t, e, i);
let s = i.transform || ((p) => String.fromCharCode(p)), o = `${t}`.charCodeAt(0), a = `${e}`.charCodeAt(0), l = o > a, c = Math.min(o, a),
u = Math.max(o, a);
if (i.toRegex && r === 1)
return Ll(c, u, !1, i);
let h = [], m = 0;
for (; l ? o >= a : o <= a; )
h.push(s(o, m)), o = l ? o - r : o + r, m++;
return i.toRegex === !0 ? kl(h, null, { wrap: !1, options: i }) : h;
}, "fillLetters"), Pr = /* @__PURE__ */ n((t, e, r, i = {}) => {
if (e == null && Zi(t))
return [t];
if (!Zi(t) || !Zi(e))
return Ml(t, e, i);
if (typeof r == "function")
return Pr(t, e, 1, { transform: r });
if (Il(r))
return Pr(t, e, 0, r);
let s = { ...i };
return s.capture === !0 && (s.wrap = !0), r = r || s.step || 1, Vt(r) ? Vt(t) && Vt(e) ? ey(t, e, r, s) : ty(t, e, Math.max(Math.abs(r),
1), s) : r != null && !Il(r) ? Jg(r, s) : Pr(t, e, 1, r);
}, "fill");
ql.exports = Pr;
});
// ../node_modules/braces/lib/compile.js
var Hl = f((TA, jl) => {
"use strict";
var ry = es(), Fl = Tr(), iy = /* @__PURE__ */ n((t, e = {}) => {
let r = /* @__PURE__ */ n((i, s = {}) => {
let o = Fl.isInvalidBrace(s), a = i.invalid === !0 && e.escapeInvalid === !0, l = o === !0 || a === !0, c = e.escapeInvalid === !0 ? "\
\\" : "", u = "";
if (i.isOpen === !0)
return c + i.value;
if (i.isClose === !0)
return console.log("node.isClose", c, i.value), c + i.value;
if (i.type === "open")
return l ? c + i.value : "(";
if (i.type === "close")
return l ? c + i.value : ")";
if (i.type === "comma")
return i.prev.type === "comma" ? "" : l ? i.value : "|";
if (i.value)
return i.value;
if (i.nodes && i.ranges > 0) {
let h = Fl.reduce(i.nodes), m = ry(...h, { ...e, wrap: !1, toRegex: !0, strictZeros: !0 });
if (m.length !== 0)
return h.length > 1 && m.length > 1 ? `(${m})` : m;
}
if (i.nodes)
for (let h of i.nodes)
u += r(h, i);
return u;
}, "walk");
return r(t);
}, "compile");
jl.exports = iy;
});
// ../node_modules/braces/lib/expand.js
var Wl = f((PA, Ul) => {
"use strict";
var sy = es(), Bl = Ar(), wt = Tr(), pt = /* @__PURE__ */ n((t = "", e = "", r = !1) => {
let i = [];
if (t = [].concat(t), e = [].concat(e), !e.length) return t;
if (!t.length)
return r ? wt.flatten(e).map((s) => `{${s}}`) : e;
for (let s of t)
if (Array.isArray(s))
for (let o of s)
i.push(pt(o, e, r));
else
for (let o of e)
r === !0 && typeof o == "string" && (o = `{${o}}`), i.push(Array.isArray(o) ? pt(s, o, r) : s + o);
return wt.flatten(i);
}, "append"), ny = /* @__PURE__ */ n((t, e = {}) => {
let r = e.rangeLimit === void 0 ? 1e3 : e.rangeLimit, i = /* @__PURE__ */ n((s, o = {}) => {
s.queue = [];
let a = o, l = o.queue;
for (; a.type !== "brace" && a.type !== "root" && a.parent; )
a = a.parent, l = a.queue;
if (s.invalid || s.dollar) {
l.push(pt(l.pop(), Bl(s, e)));
return;
}
if (s.type === "brace" && s.invalid !== !0 && s.nodes.length === 2) {
l.push(pt(l.pop(), ["{}"]));
return;
}
if (s.nodes && s.ranges > 0) {
let m = wt.reduce(s.nodes);
if (wt.exceedsLimit(...m, e.step, r))
throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
let p = sy(...m, e);
p.length === 0 && (p = Bl(s, e)), l.push(pt(l.pop(), p)), s.nodes = [];
return;
}
let c = wt.encloseBrace(s), u = s.queue, h = s;
for (; h.type !== "brace" && h.type !== "root" && h.parent; )
h = h.parent, u = h.queue;
for (let m = 0; m < s.nodes.length; m++) {
let p = s.nodes[m];
if (p.type === "comma" && s.type === "brace") {
m === 1 && u.push(""), u.push("");
continue;
}
if (p.type === "close") {
l.push(pt(l.pop(), u, c));
continue;
}
if (p.value && p.type !== "open") {
u.push(pt(u.pop(), p.value));
continue;
}
p.nodes && i(p, s);
}
return u;
}, "walk");
return wt.flatten(i(t));
}, "expand");
Ul.exports = ny;
});
// ../node_modules/braces/lib/constants.js
var Vl = f((CA, Gl) => {
"use strict";
Gl.exports = {
MAX_LENGTH: 1e4,
// Digits
CHAR_0: "0",
/* 0 */
CHAR_9: "9",
/* 9 */
// Alphabet chars.
CHAR_UPPERCASE_A: "A",
/* A */
CHAR_LOWERCASE_A: "a",
/* a */
CHAR_UPPERCASE_Z: "Z",
/* Z */
CHAR_LOWERCASE_Z: "z",
/* z */
CHAR_LEFT_PARENTHESES: "(",
/* ( */
CHAR_RIGHT_PARENTHESES: ")",
/* ) */
CHAR_ASTERISK: "*",
/* * */
// Non-alphabetic chars.
CHAR_AMPERSAND: "&",
/* & */
CHAR_AT: "@",
/* @ */
CHAR_BACKSLASH: "\\",
/* \ */
CHAR_BACKTICK: "`",
/* ` */
CHAR_CARRIAGE_RETURN: "\r",
/* \r */
CHAR_CIRCUMFLEX_ACCENT: "^",
/* ^ */
CHAR_COLON: ":",
/* : */
CHAR_COMMA: ",",
/* , */
CHAR_DOLLAR: "$",
/* . */
CHAR_DOT: ".",
/* . */
CHAR_DOUBLE_QUOTE: '"',
/* " */
CHAR_EQUAL: "=",
/* = */
CHAR_EXCLAMATION_MARK: "!",
/* ! */
CHAR_FORM_FEED: "\f",
/* \f */
CHAR_FORWARD_SLASH: "/",
/* / */
CHAR_HASH: "#",
/* # */
CHAR_HYPHEN_MINUS: "-",
/* - */
CHAR_LEFT_ANGLE_BRACKET: "<",
/* < */
CHAR_LEFT_CURLY_BRACE: "{",
/* { */
CHAR_LEFT_SQUARE_BRACKET: "[",
/* [ */
CHAR_LINE_FEED: `
`,
/* \n */
CHAR_NO_BREAK_SPACE: "\xA0",
/* \u00A0 */
CHAR_PERCENT: "%",
/* % */
CHAR_PLUS: "+",
/* + */
CHAR_QUESTION_MARK: "?",
/* ? */
CHAR_RIGHT_ANGLE_BRACKET: ">",
/* > */
CHAR_RIGHT_CURLY_BRACE: "}",
/* } */
CHAR_RIGHT_SQUARE_BRACKET: "]",
/* ] */
CHAR_SEMICOLON: ";",
/* ; */
CHAR_SINGLE_QUOTE: "'",
/* ' */
CHAR_SPACE: " ",
/* */
CHAR_TAB: " ",
/* \t */
CHAR_UNDERSCORE: "_",
/* _ */
CHAR_VERTICAL_LINE: "|",
/* | */
CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
/* \uFEFF */
};
});
// ../node_modules/braces/lib/parse.js
var Xl = f((DA, Ql) => {
"use strict";
var oy = Ar(), {
MAX_LENGTH: Yl,
CHAR_BACKSLASH: ts,
/* \ */
CHAR_BACKTICK: ay,
/* ` */
CHAR_COMMA: ly,
/* , */
CHAR_DOT: cy,
/* . */
CHAR_LEFT_PARENTHESES: uy,
/* ( */
CHAR_RIGHT_PARENTHESES: hy,
/* ) */
CHAR_LEFT_CURLY_BRACE: py,
/* { */
CHAR_RIGHT_CURLY_BRACE: dy,
/* } */
CHAR_LEFT_SQUARE_BRACKET: zl,
/* [ */
CHAR_RIGHT_SQUARE_BRACKET: Kl,
/* ] */
CHAR_DOUBLE_QUOTE: fy,
/* " */
CHAR_SINGLE_QUOTE: my,
/* ' */
CHAR_NO_BREAK_SPACE: gy,
CHAR_ZERO_WIDTH_NOBREAK_SPACE: yy
} = Vl(), xy = /* @__PURE__ */ n((t, e = {}) => {
if (typeof t != "string")
throw new TypeError("Expected a string");
let r = e || {}, i = typeof r.maxLength == "number" ? Math.min(Yl, r.maxLength) : Yl;
if (t.length > i)
throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${i})`);
let s = { type: "root", input: t, nodes: [] }, o = [s], a = s, l = s, c = 0, u = t.length, h = 0, m = 0, p, v = /* @__PURE__ */ n(() => t[h++],
"advance"), g = /* @__PURE__ */ n((b) => {
if (b.type === "text" && l.type === "dot" && (l.type = "text"), l && l.type === "text" && b.type === "text") {
l.value += b.value;
return;
}
return a.nodes.push(b), b.parent = a, b.prev = l, l = b, b;
}, "push");
for (g({ type: "bos" }); h < u; )
if (a = o[o.length - 1], p = v(), !(p === yy || p === gy)) {
if (p === ts) {
g({ type: "text", value: (e.keepEscaping ? p : "") + v() });
continue;
}
if (p === Kl) {
g({ type: "text", value: "\\" + p });
continue;
}
if (p === zl) {
c++;
let b;
for (; h < u && (b = v()); ) {
if (p += b, b === zl) {
c++;
continue;
}
if (b === ts) {
p += v();
continue;
}
if (b === Kl && (c--, c === 0))
break;
}
g({ type: "text", value: p });
continue;
}
if (p === uy) {
a = g({ type: "paren", nodes: [] }), o.push(a), g({ type: "text", value: p });
continue;
}
if (p === hy) {
if (a.type !== "paren") {
g({ type: "text", value: p });
continue;
}
a = o.pop(), g({ type: "text", value: p }), a = o[o.length - 1];
continue;
}
if (p === fy || p === my || p === ay) {
let b = p, R;
for (e.keepQuotes !== !0 && (p = ""); h < u && (R = v()); ) {
if (R === ts) {
p += R + v();
continue;
}
if (R === b) {
e.keepQuotes === !0 && (p += R);
break;
}
p += R;
}
g({ type: "text", value: p });
continue;
}
if (p === py) {
m++;
let R = {
type: "brace",
open: !0,
close: !1,
dollar: l.value && l.value.slice(-1) === "$" || a.dollar === !0,
depth: m,
commas: 0,
ranges: 0,
nodes: []
};
a = g(R), o.push(a), g({ type: "open", value: p });
continue;
}
if (p === dy) {
if (a.type !== "brace") {
g({ type: "text", value: p });
continue;
}
let b = "close";
a = o.pop(), a.close = !0, g({ type: b, value: p }), m--, a = o[o.length - 1];
continue;
}
if (p === ly && m > 0) {
if (a.ranges > 0) {
a.ranges = 0;
let b = a.nodes.shift();
a.nodes = [b, { type: "text", value: oy(a) }];
}
g({ type: "comma", value: p }), a.commas++;
continue;
}
if (p === cy && m > 0 && a.commas === 0) {
let b = a.nodes;
if (m === 0 || b.length === 0) {
g({ type: "text", value: p });
continue;
}
if (l.type === "dot") {
if (a.range = [], l.value += p, l.type = "range", a.nodes.length !== 3 && a.nodes.length !== 5) {
a.invalid = !0, a.ranges = 0, l.type = "text";
continue;
}
a.ranges++, a.args = [];
continue;
}
if (l.type === "range") {
b.pop();
let R = b[b.length - 1];
R.value += l.value + p, l = R, a.ranges--;
continue;
}
g({ type: "dot", value: p });
continue;
}
g({ type: "text", value: p });
}
do
if (a = o.pop(), a.type !== "root") {
a.nodes.forEach((T) => {
T.nodes || (T.type === "open" && (T.isOpen = !0), T.type === "close" && (T.isClose = !0), T.nodes || (T.type = "text"), T.invalid =
!0);
});
let b = o[o.length - 1], R = b.nodes.indexOf(a);
b.nodes.splice(R, 1, ...a.nodes);
}
while (o.length > 0);
return g({ type: "eos" }), s;
}, "parse");
Ql.exports = xy;
});
// ../node_modules/braces/index.js
var ec = f((NA, Jl) => {
"use strict";
var Zl = Ar(), _y = Hl(), by = Wl(), Ey = Xl(), he = /* @__PURE__ */ n((t, e = {}) => {
let r = [];
if (Array.isArray(t))
for (let i of t) {
let s = he.create(i, e);
Array.isArray(s) ? r.push(...s) : r.push(s);
}
else
r = [].concat(he.create(t, e));
return e && e.expand === !0 && e.nodupes === !0 && (r = [...new Set(r)]), r;
}, "braces");
he.parse = (t, e = {}) => Ey(t, e);
he.stringify = (t, e = {}) => Zl(typeof t == "string" ? he.parse(t, e) : t, e);
he.compile = (t, e = {}) => (typeof t == "string" && (t = he.parse(t, e)), _y(t, e));
he.expand = (t, e = {}) => {
typeof t == "string" && (t = he.parse(t, e));
let r = by(t, e);
return e.noempty === !0 && (r = r.filter(Boolean)), e.nodupes === !0 && (r = [...new Set(r)]), r;
};
he.create = (t, e = {}) => t === "" || t.length < 3 ? [t] : e.expand !== !0 ? he.compile(t, e) : he.expand(t, e);
Jl.exports = he;
});
// ../node_modules/picomatch/lib/constants.js
var Yt = f((kA, nc) => {
"use strict";
var Sy = require("path"), De = "\\\\/", tc = `[^${De}]`, He = "\\.", vy = "\\+", wy = "\\?", Cr = "\\/", Ry = "(?=.)", rc = "[^/]", rs = `\
(?:${Cr}|$)`, ic = `(?:^|${Cr})`, is = `${He}{1,2}${rs}`, Ty = `(?!${He})`, Ay = `(?!${ic}${is})`, Py = `(?!${He}{0,1}${rs})`, Oy = `(?!${is}\
)`, Cy = `[^.${Cr}]`, Dy = `${rc}*?`, sc = {
DOT_LITERAL: He,
PLUS_LITERAL: vy,
QMARK_LITERAL: wy,
SLASH_LITERAL: Cr,
ONE_CHAR: Ry,
QMARK: rc,
END_ANCHOR: rs,
DOTS_SLASH: is,
NO_DOT: Ty,
NO_DOTS: Ay,
NO_DOT_SLASH: Py,
NO_DOTS_SLASH: Oy,
QMARK_NO_DOT: Cy,
STAR: Dy,
START_ANCHOR: ic
}, Iy = {
...sc,
SLASH_LITERAL: `[${De}]`,
QMARK: tc,
STAR: `${tc}*?`,
DOTS_SLASH: `${He}{1,2}(?:[${De}]|$)`,
NO_DOT: `(?!${He})`,
NO_DOTS: `(?!(?:^|[${De}])${He}{1,2}(?:[${De}]|$))`,
NO_DOT_SLASH: `(?!${He}{0,1}(?:[${De}]|$))`,
NO_DOTS_SLASH: `(?!${He}{1,2}(?:[${De}]|$))`,
QMARK_NO_DOT: `[^.${De}]`,
START_ANCHOR: `(?:^|[${De}])`,
END_ANCHOR: `(?:[${De}]|$)`
}, Ny = {
alnum: "a-zA-Z0-9",
alpha: "a-zA-Z",
ascii: "\\x00-\\x7F",
blank: " \\t",
cntrl: "\\x00-\\x1F\\x7F",
digit: "0-9",
graph: "\\x21-\\x7E",
lower: "a-z",
print: "\\x20-\\x7E ",
punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
space: " \\t\\r\\n\\v\\f",
upper: "A-Z",
word: "A-Za-z0-9_",
xdigit: "A-Fa-f0-9"
};
nc.exports = {
MAX_LENGTH: 1024 * 64,
POSIX_REGEX_SOURCE: Ny,
// regular expressions
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
// Replace globs with equivalent patterns to reduce parsing time.
REPLACEMENTS: {
"***": "*",
"**/**": "**",
"**/**/**": "**"
},
// Digits
CHAR_0: 48,
/* 0 */
CHAR_9: 57,
/* 9 */
// Alphabet chars.
CHAR_UPPERCASE_A: 65,
/* A */
CHAR_LOWERCASE_A: 97,
/* a */
CHAR_UPPERCASE_Z: 90,
/* Z */
CHAR_LOWERCASE_Z: 122,
/* z */
CHAR_LEFT_PARENTHESES: 40,
/* ( */
CHAR_RIGHT_PARENTHESES: 41,
/* ) */
CHAR_ASTERISK: 42,
/* * */
// Non-alphabetic chars.
CHAR_AMPERSAND: 38,
/* & */
CHAR_AT: 64,
/* @ */
CHAR_BACKWARD_SLASH: 92,
/* \ */
CHAR_CARRIAGE_RETURN: 13,
/* \r */
CHAR_CIRCUMFLEX_ACCENT: 94,
/* ^ */
CHAR_COLON: 58,
/* : */
CHAR_COMMA: 44,
/* , */
CHAR_DOT: 46,
/* . */
CHAR_DOUBLE_QUOTE: 34,
/* " */
CHAR_EQUAL: 61,
/* = */
CHAR_EXCLAMATION_MARK: 33,
/* ! */
CHAR_FORM_FEED: 12,
/* \f */
CHAR_FORWARD_SLASH: 47,
/* / */
CHAR_GRAVE_ACCENT: 96,
/* ` */
CHAR_HASH: 35,
/* # */
CHAR_HYPHEN_MINUS: 45,
/* - */
CHAR_LEFT_ANGLE_BRACKET: 60,
/* < */
CHAR_LEFT_CURLY_BRACE: 123,
/* { */
CHAR_LEFT_SQUARE_BRACKET: 91,
/* [ */
CHAR_LINE_FEED: 10,
/* \n */
CHAR_NO_BREAK_SPACE: 160,
/* \u00A0 */
CHAR_PERCENT: 37,
/* % */
CHAR_PLUS: 43,
/* + */
CHAR_QUESTION_MARK: 63,
/* ? */
CHAR_RIGHT_ANGLE_BRACKET: 62,
/* > */
CHAR_RIGHT_CURLY_BRACE: 125,
/* } */
CHAR_RIGHT_SQUARE_BRACKET: 93,
/* ] */
CHAR_SEMICOLON: 59,
/* ; */
CHAR_SINGLE_QUOTE: 39,
/* ' */
CHAR_SPACE: 32,
/* */
CHAR_TAB: 9,
/* \t */
CHAR_UNDERSCORE: 95,
/* _ */
CHAR_VERTICAL_LINE: 124,
/* | */
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
/* \uFEFF */
SEP: Sy.sep,
/**
* Create EXTGLOB_CHARS
*/
extglobChars(t) {
return {
"!": { type: "negate", open: "(?:(?!(?:", close: `))${t.STAR})` },
"?": { type: "qmark", open: "(?:", close: ")?" },
"+": { type: "plus", open: "(?:", close: ")+" },
"*": { type: "star", open: "(?:", close: ")*" },
"@": { type: "at", open: "(?:", close: ")" }
};
},
/**
* Create GLOB_CHARS
*/
globChars(t) {
return t === !0 ? Iy : sc;
}
};
});
// ../node_modules/picomatch/lib/utils.js
var zt = f((ae) => {
"use strict";
var Ly = require("path"), ky = process.platform === "win32", {
REGEX_BACKSLASH: $y,
REGEX_REMOVE_BACKSLASH: My,
REGEX_SPECIAL_CHARS: qy,
REGEX_SPECIAL_CHARS_GLOBAL: Fy
} = Yt();
ae.isObject = (t) => t !== null && typeof t == "object" && !Array.isArray(t);
ae.hasRegexChars = (t) => qy.test(t);
ae.isRegexChar = (t) => t.length === 1 && ae.hasRegexChars(t);
ae.escapeRegex = (t) => t.replace(Fy, "\\$1");
ae.toPosixSlashes = (t) => t.replace($y, "/");
ae.removeBackslashes = (t) => t.replace(My, (e) => e === "\\" ? "" : e);
ae.supportsLookbehinds = () => {
let t = process.version.slice(1).split(".").map(Number);
return t.length === 3 && t[0] >= 9 || t[0] === 8 && t[1] >= 10;
};
ae.isWindows = (t) => t && typeof t.windows == "boolean" ? t.windows : ky === !0 || Ly.sep === "\\";
ae.escapeLast = (t, e, r) => {
let i = t.lastIndexOf(e, r);
return i === -1 ? t : t[i - 1] === "\\" ? ae.escapeLast(t, e, i - 1) : `${t.slice(0, i)}\\${t.slice(i)}`;
};
ae.removePrefix = (t, e = {}) => {
let r = t;
return r.startsWith("./") && (r = r.slice(2), e.prefix = "./"), r;
};
ae.wrapOutput = (t, e = {}, r = {}) => {
let i = r.contains ? "" : "^", s = r.contains ? "" : "$", o = `${i}(?:${t})${s}`;
return e.negated === !0 && (o = `(?:^(?!${o}).*$)`), o;
};
});
// ../node_modules/picomatch/lib/scan.js
var dc = f((MA, pc) => {
"use strict";
var oc = zt(), {
CHAR_ASTERISK: ss,
/* * */
CHAR_AT: jy,
/* @ */
CHAR_BACKWARD_SLASH: Kt,
/* \ */
CHAR_COMMA: Hy,
/* , */
CHAR_DOT: ns,
/* . */
CHAR_EXCLAMATION_MARK: os,
/* ! */
CHAR_FORWARD_SLASH: hc,
/* / */
CHAR_LEFT_CURLY_BRACE: as,
/* { */
CHAR_LEFT_PARENTHESES: ls,
/* ( */
CHAR_LEFT_SQUARE_BRACKET: By,
/* [ */
CHAR_PLUS: Uy,
/* + */
CHAR_QUESTION_MARK: ac,
/* ? */
CHAR_RIGHT_CURLY_BRACE: Wy,
/* } */
CHAR_RIGHT_PARENTHESES: lc,
/* ) */
CHAR_RIGHT_SQUARE_BRACKET: Gy
/* ] */
} = Yt(), cc = /* @__PURE__ */ n((t) => t === hc || t === Kt, "isPathSeparator"), uc = /* @__PURE__ */ n((t) => {
t.isPrefix !== !0 && (t.depth = t.isGlobstar ? 1 / 0 : 1);
}, "depth"), Vy = /* @__PURE__ */ n((t, e) => {
let r = e || {}, i = t.length - 1, s = r.parts === !0 || r.scanToEnd === !0, o = [], a = [], l = [], c = t, u = -1, h = 0, m = 0, p = !1,
v = !1, g = !1, b = !1, R = !1, T = !1, k = !1, D = !1, H = !1, C = !1, N = 0, O, P, M = { value: "", depth: 0, isGlob: !1 }, ee = /* @__PURE__ */ n(
() => u >= i, "eos"), _ = /* @__PURE__ */ n(() => c.charCodeAt(u + 1), "peek"), V = /* @__PURE__ */ n(() => (O = P, c.charCodeAt(++u)), "\
advance");
for (; u < i; ) {
P = V();
let se;
if (P === Kt) {
k = M.backslashes = !0, P = V(), P === as && (T = !0);
continue;
}
if (T === !0 || P === as) {
for (N++; ee() !== !0 && (P = V()); ) {
if (P === Kt) {
k = M.backslashes = !0, V();
continue;
}
if (P === as) {
N++;
continue;
}
if (T !== !0 && P === ns && (P = V()) === ns) {
if (p = M.isBrace = !0, g = M.isGlob = !0, C = !0, s === !0)
continue;
break;
}
if (T !== !0 && P === Hy) {
if (p = M.isBrace = !0, g = M.isGlob = !0, C = !0, s === !0)
continue;
break;
}
if (P === Wy && (N--, N === 0)) {
T = !1, p = M.isBrace = !0, C = !0;
break;
}
}
if (s === !0)
continue;
break;
}
if (P === hc) {
if (o.push(u), a.push(M), M = { value: "", depth: 0, isGlob: !1 }, C === !0) continue;
if (O === ns && u === h + 1) {
h += 2;
continue;
}
m = u + 1;
continue;
}
if (r.noext !== !0 && (P === Uy || P === jy || P === ss || P === ac || P === os) === !0 && _() === ls) {
if (g = M.isGlob = !0, b = M.isExtglob = !0, C = !0, P === os && u === h && (H = !0), s === !0) {
for (; ee() !== !0 && (P = V()); ) {
if (P === Kt) {
k = M.backslashes = !0, P = V();
continue;
}
if (P === lc) {
g = M.isGlob = !0, C = !0;
break;
}
}
continue;
}
break;
}
if (P === ss) {
if (O === ss && (R = M.isGlobstar = !0), g = M.isGlob = !0, C = !0, s === !0)
continue;
break;
}
if (P === ac) {
if (g = M.isGlob = !0, C = !0, s === !0)
continue;
break;
}
if (P === By) {
for (; ee() !== !0 && (se = V()); ) {
if (se === Kt) {
k = M.backslashes = !0, V();
continue;
}
if (se === Gy) {
v = M.isBracket = !0, g = M.isGlob = !0, C = !0;
break;
}
}
if (s === !0)
continue;
break;
}
if (r.nonegate !== !0 && P === os && u === h) {
D = M.negated = !0, h++;
continue;
}
if (r.noparen !== !0 && P === ls) {
if (g = M.isGlob = !0, s === !0) {
for (; ee() !== !0 && (P = V()); ) {
if (P === ls) {
k = M.backslashes = !0, P = V();
continue;
}
if (P === lc) {
C = !0;
break;
}
}
continue;
}
break;
}
if (g === !0) {
if (C = !0, s === !0)
continue;
break;
}
}
r.noext === !0 && (b = !1, g = !1);
let U = c, Xe = "", y = "";
h > 0 && (Xe = c.slice(0, h), c = c.slice(h), m -= h), U && g === !0 && m > 0 ? (U = c.slice(0, m), y = c.slice(m)) : g === !0 ? (U = "",
y = c) : U = c, U && U !== "" && U !== "/" && U !== c && cc(U.charCodeAt(U.length - 1)) && (U = U.slice(0, -1)), r.unescape === !0 && (y &&
(y = oc.removeBackslashes(y)), U && k === !0 && (U = oc.removeBackslashes(U)));
let x = {
prefix: Xe,
input: t,
start: h,
base: U,
glob: y,
isBrace: p,
isBracket: v,
isGlob: g,
isExtglob: b,
isGlobstar: R,
negated: D,
negatedExtglob: H
};
if (r.tokens === !0 && (x.maxDepth = 0, cc(P) || a.push(M), x.tokens = a), r.parts === !0 || r.tokens === !0) {
let se;
for (let $ = 0; $ < o.length; $++) {
let Pe = se ? se + 1 : h, Oe = o[$], ue = t.slice(Pe, Oe);
r.tokens && ($ === 0 && h !== 0 ? (a[$].isPrefix = !0, a[$].value = Xe) : a[$].value = ue, uc(a[$]), x.maxDepth += a[$].depth), ($ !==
0 || ue !== "") && l.push(ue), se = Oe;
}
if (se && se + 1 < t.length) {
let $ = t.slice(se + 1);
l.push($), r.tokens && (a[a.length - 1].value = $, uc(a[a.length - 1]), x.maxDepth += a[a.length - 1].depth);
}
x.slashes = o, x.parts = l;
}
return x;
}, "scan");
pc.exports = Vy;
});
// ../node_modules/picomatch/lib/parse.js
var gc = f((FA, mc) => {
"use strict";
var Dr = Yt(), pe = zt(), {
MAX_LENGTH: Ir,
POSIX_REGEX_SOURCE: Yy,
REGEX_NON_SPECIAL_CHARS: zy,
REGEX_SPECIAL_CHARS_BACKREF: Ky,
REPLACEMENTS: fc
} = Dr, Qy = /* @__PURE__ */ n((t, e) => {
if (typeof e.expandRange == "function")
return e.expandRange(...t, e);
t.sort();