UNPKG

@storybook/core

Version:

Storybook framework-agnostic API

1,491 lines (1,468 loc) • 353 kB
import ESM_COMPAT_Module from "node:module"; import { fileURLToPath as ESM_COMPAT_fileURLToPath } from 'node:url'; import { dirname as ESM_COMPAT_dirname } from 'node:path'; const __filename = ESM_COMPAT_fileURLToPath(import.meta.url); const __dirname = ESM_COMPAT_dirname(__filename); const require = ESM_COMPAT_Module.createRequire(import.meta.url); var Rm = Object.create; var Ot = Object.defineProperty; var Tm = Object.getOwnPropertyDescriptor; var Am = Object.getOwnPropertyNames; var Pm = Object.getPrototypeOf, Om = Object.prototype.hasOwnProperty; var n = (t, e) => Ot(t, "name", { value: e, configurable: !0 }), I = /* @__PURE__ */ ((t) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(t, { get: (e, r) => (typeof require < "u" ? require : e)[r] }) : t)(function(t) { if (typeof require < "u") return require.apply(this, arguments); throw Error('Dynamic require of "' + t + '" is not supported'); }); var he = (t, e) => () => (t && (e = t(t = 0)), e); var d = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), Ct = (t, e) => { for (var r in e) Ot(t, r, { get: e[r], enumerable: !0 }); }, Yo = (t, e, r, i) => { if (e && typeof e == "object" || typeof e == "function") for (let s of Am(e)) !Om.call(t, s) && s !== r && Ot(t, s, { get: () => e[s], enumerable: !(i = Tm(e, s)) || i.enumerable }); return t; }; var pe = (t, e, r) => (r = t != null ? Rm(Pm(t)) : {}, Yo( // 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 ? Ot(r, "default", { value: t, enumerable: !0 }) : r, t )), oi = (t) => Yo(Ot({}, "__esModule", { value: !0 }), t); // ../node_modules/ts-dedent/dist/index.js var st = d((Dt) => { "use strict"; Object.defineProperty(Dt, "__esModule", { value: !0 }); Dt.dedent = void 0; function zo(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(zo, "dedent"); Dt.dedent = zo; Dt.default = zo; }); // ../node_modules/camelcase/index.js var ga = {}; Ct(ga, { default: () => ma }); function ma(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 ? fi.test(t) ? "" : e.pascalCase ? i(t) : r(t) : (t !== r(t) && (t = km(t, r, i, e.preserveConsecutiveUppercase)), t = t.replace(Nm, ""), t = e.preserveConsecutiveUppercase ? Lm(t, r) : r(t), e.pascalCase && (t = i(t.charAt(0)) + t.slice(1)), $m(t, i)); } var Dm, Im, ha, fa, fi, Nm, pa, da, km, Lm, $m, ya = he(() => { Dm = /[\p{Lu}]/u, Im = /[\p{Ll}]/u, ha = /^[\p{Lu}](?![\p{Lu}])/gu, fa = /([\p{Alpha}\p{N}_]|$)/u, fi = /[_.\- ]+/, Nm = new RegExp("^" + fi. source), pa = new RegExp(fi.source + fa.source, "gu"), da = new RegExp("\\d+" + fa.source, "gu"), km = /* @__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 && Dm.test(u) ? (t = t.slice(0, c) + "-" + t.slice(c), s = !1, a = o, o = !0, c++) : o && a && Im. 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"), Lm = /* @__PURE__ */ n((t, e) => (ha.lastIndex = 0, t.replaceAll(ha, (r) => e(r))), "preserveConsecutiveUppercase"), $m = /* @__PURE__ */ n((t, e) => (pa.lastIndex = 0, da.lastIndex = 0, t.replaceAll(da, (r, i, s) => ["_", "-"].includes(t.charAt(s + r.length)) ? r : e(r)).replaceAll(pa, (r, i) => e(i))), "postProcess"); n(ma, "camelCase"); }); // ../node_modules/@sindresorhus/merge-streams/index.js import { on as Km, once as Qm } from "node:events"; import { PassThrough as Xm } from "node:stream"; import { finished as Na } from "node:stream/promises"; function Si(t) { if (!Array.isArray(t)) throw new TypeError(`Expected an array, got \`${typeof t}\`.`); for (let s of t) bi(s); let e = t.some(({ readableObjectMode: s }) => s), r = Zm(t, e), i = new _i({ objectMode: e, writableHighWaterMark: r, readableHighWaterMark: r }); for (let s of t) i.add(s); return t.length === 0 && $a(i), i; } var Zm, _i, Jm, eg, tg, bi, rg, ka, ig, sg, ng, La, $a, Ei, Ma, og, or, Da, Ia, qa = he(() => { n(Si, "mergeStreams"); Zm = /* @__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"), _i = class extends Xm { static { n(this, "MergedStream"); } #e = /* @__PURE__ */ new Set([]); #r = /* @__PURE__ */ new Set([]); #i = /* @__PURE__ */ new Set([]); #t; add(e) { bi(e), !this.#e.has(e) && (this.#e.add(e), this.#t ??= Jm(this, this.#e), rg({ passThroughStream: this, stream: e, streams: this.#e, ended: this.#r, aborted: this.#i, onFinished: this.#t }), e.pipe(this, { end: !1 })); } remove(e) { return bi(e), this.#e.has(e) ? (e.unpipe(this), !0) : !1; } }, Jm = /* @__PURE__ */ n(async (t, e) => { or(t, Da); let r = new AbortController(); try { await Promise.race([ eg(t, r), tg(t, e, r) ]); } finally { r.abort(), or(t, -Da); } }, "onMergedStreamFinished"), eg = /* @__PURE__ */ n(async (t, { signal: e }) => { await Na(t, { signal: e, cleanup: !0 }); }, "onMergedStreamEnd"), tg = /* @__PURE__ */ n(async (t, e, { signal: r }) => { for await (let [i] of Km(t, "unpipe", { signal: r })) e.has(i) && i.emit(La); }, "onInputStreamsUnpipe"), bi = /* @__PURE__ */ n((t) => { if (typeof t?.pipe != "function") throw new TypeError(`Expected a readable stream, got: \`${typeof t}\`.`); }, "validateStream"), rg = /* @__PURE__ */ n(async ({ passThroughStream: t, stream: e, streams: r, ended: i, aborted: s, onFinished: o }) => { or(t, Ia); let a = new AbortController(); try { await Promise.race([ ig(o, e), sg({ passThroughStream: t, stream: e, streams: r, ended: i, aborted: s, controller: a }), ng({ stream: e, streams: r, ended: i, aborted: s, controller: a }) ]); } finally { a.abort(), or(t, -Ia); } r.size === i.size + s.size && (i.size === 0 && s.size > 0 ? Ei(t) : $a(t)); }, "endWhenStreamsDone"), ka = /* @__PURE__ */ n((t) => t?.code === "ERR_STREAM_PREMATURE_CLOSE", "isAbortError"), ig = /* @__PURE__ */ n( async (t, e) => { try { await t, Ei(e); } catch (r) { ka(r) ? Ei(e) : Ma(e, r); } }, "afterMergedStreamFinished"), sg = /* @__PURE__ */ n(async ({ passThroughStream: t, stream: e, streams: r, ended: i, aborted: s, controller: { signal: o } }) => { try { await Na(e, { signal: o, cleanup: !0, readable: !0, writable: !1 }), r.has(e) && i.add(e); } catch (a) { if (o.aborted || !r.has(e)) return; ka(a) ? s.add(e) : Ma(t, a); } }, "onInputStreamEnd"), ng = /* @__PURE__ */ n(async ({ stream: t, streams: e, ended: r, aborted: i, controller: { signal: s } }) => { await Qm(t, La, { signal: s }), e.delete(t), r.delete(t), i.delete(t); }, "onInputStreamUnpipe"), La = Symbol("unpipe"), $a = /* @__PURE__ */ n((t) => { t.writable && t.end(); }, "endStream"), Ei = /* @__PURE__ */ n((t) => { (t.readable || t.writable) && t.destroy(); }, "abortStream"), Ma = /* @__PURE__ */ n((t, e) => { t.destroyed || (t.once("error", og), t.destroy(e)); }, "errorStream"), og = /* @__PURE__ */ n(() => { }, "noop"), or = /* @__PURE__ */ n((t, e) => { let r = t.getMaxListeners(); r !== 0 && r !== Number.POSITIVE_INFINITY && t.setMaxListeners(r + e); }, "updateMaxListeners"), Da = 2, Ia = 1; }); // ../node_modules/globby/node_modules/fast-glob/out/utils/array.js var ja = d((ft) => { "use strict"; Object.defineProperty(ft, "__esModule", { value: !0 }); ft.splitWhen = ft.flatten = void 0; function ag(t) { return t.reduce((e, r) => [].concat(e, r), []); } n(ag, "flatten"); ft.flatten = ag; function lg(t, e) { let r = [[]], i = 0; for (let s of t) e(s) ? (i++, r[i] = []) : r[i].push(s); return r; } n(lg, "splitWhen"); ft.splitWhen = lg; }); // ../node_modules/globby/node_modules/fast-glob/out/utils/errno.js var Fa = d((ar) => { "use strict"; Object.defineProperty(ar, "__esModule", { value: !0 }); ar.isEnoentCodeError = void 0; function cg(t) { return t.code === "ENOENT"; } n(cg, "isEnoentCodeError"); ar.isEnoentCodeError = cg; }); // ../node_modules/globby/node_modules/fast-glob/out/utils/fs.js var Ha = d((lr) => { "use strict"; Object.defineProperty(lr, "__esModule", { value: !0 }); lr.createDirentFromStats = void 0; var vi = 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 ug(t, e) { return new vi(t, e); } n(ug, "createDirentFromStats"); lr.createDirentFromStats = ug; }); // ../node_modules/globby/node_modules/fast-glob/out/utils/path.js var Ga = d((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 hg = I("os"), pg = I("path"), Ba = hg.platform() === "win32", dg = 2, fg = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g, mg = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g, gg = /^\\\\([.?])/, yg = /\\(?![!()+@[\]{}])/g; function xg(t) { return t.replace(/\\/g, "/"); } n(xg, "unixify"); Z.unixify = xg; function _g(t, e) { return pg.resolve(t, e); } n(_g, "makeAbsolute"); Z.makeAbsolute = _g; function bg(t) { if (t.charAt(0) === ".") { let e = t.charAt(1); if (e === "/" || e === "\\") return t.slice(dg); } return t; } n(bg, "removeLeadingDotSegment"); Z.removeLeadingDotSegment = bg; Z.escape = Ba ? wi : Ri; function wi(t) { return t.replace(mg, "\\$2"); } n(wi, "escapeWindowsPath"); Z.escapeWindowsPath = wi; function Ri(t) { return t.replace(fg, "\\$2"); } n(Ri, "escapePosixPath"); Z.escapePosixPath = Ri; Z.convertPathToPattern = Ba ? Ua : Wa; function Ua(t) { return wi(t).replace(gg, "//$1").replace(yg, "/"); } n(Ua, "convertWindowsPathToPattern"); Z.convertWindowsPathToPattern = Ua; function Wa(t) { return Ri(t); } n(Wa, "convertPosixPathToPattern"); Z.convertPosixPathToPattern = Wa; }); // ../node_modules/is-extglob/index.js var Ya = d((iP, Va) => { Va.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 Qa = d((nP, Ka) => { var Eg = Ya(), za = { "{": "}", "(": ")", "[": "]" }, Sg = /* @__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 = za[l]; if (c) { var u = t.indexOf(c, e); u !== -1 && (e = u + 1); } if (t[e] === "!") return !0; } else e++; } return !1; }, "strictCheck"), vg = /* @__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 = za[r]; if (i) { var s = t.indexOf(i, e); s !== -1 && (e = s + 1); } if (t[e] === "!") return !0; } else e++; } return !1; }, "relaxedCheck"); Ka.exports = /* @__PURE__ */ n(function(e, r) { if (typeof e != "string" || e === "") return !1; if (Eg(e)) return !0; var i = Sg; return r && r.strict === !1 && (i = vg), i(e); }, "isGlob"); }); // ../node_modules/glob-parent/index.js var Za = d((aP, Xa) => { "use strict"; var wg = Qa(), Rg = I("path").posix.dirname, Tg = I("os").platform() === "win32", Ti = "/", Ag = /\\/g, Pg = /[\{\[].*[\}\]]$/, Og = /(^|[^\\])([\{\[]|\([^\)]+$)/, Cg = /\\([\!\*\?\|\[\]\(\)\{\}])/g; Xa.exports = /* @__PURE__ */ n(function(e, r) { var i = Object.assign({ flipBackslashes: !0 }, r); i.flipBackslashes && Tg && e.indexOf(Ti) < 0 && (e = e.replace(Ag, Ti)), Pg.test(e) && (e += Ti), e += "a"; do e = Rg(e); while (wg(e) || Og.test(e)); return e.replace(Cg, "$1"); }, "globParent"); }); // ../node_modules/braces/lib/utils.js var cr = d((de) => { "use strict"; de.isInteger = (t) => typeof t == "number" ? Number.isInteger(t) : typeof t == "string" && t.trim() !== "" ? Number.isInteger(Number(t)) : !1; de.find = (t, e) => t.nodes.find((r) => r.type === e); de.exceedsLimit = (t, e, r = 1, i) => i === !1 || !de.isInteger(t) || !de.isInteger(e) ? !1 : (Number(e) - Number(t)) / Number(r) >= i; de.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); }; de.encloseBrace = (t) => t.type !== "brace" ? !1 : t.commas >> 0 + t.ranges >> 0 === 0 ? (t.invalid = !0, !0) : !1; de.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; de.isOpenOrClose = (t) => t.type === "open" || t.type === "close" ? !0 : t.open === !0 || t.close === !0; de.reduce = (t) => t.reduce((e, r) => (r.type === "text" && e.push(r.value), r.type === "range" && (r.type = "text"), e), []); de.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 ur = d((hP, el) => { "use strict"; var Ja = cr(); el.exports = (t, e = {}) => { let r = /* @__PURE__ */ n((i, s = {}) => { let o = e.escapeInvalid && Ja.isInvalidBrace(s), a = i.invalid === !0 && e.escapeInvalid === !0, l = ""; if (i.value) return (o || a) && Ja.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 rl = d((dP, tl) => { "use strict"; tl.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 hl = d((fP, ul) => { "use strict"; var il = rl(), ot = /* @__PURE__ */ n((t, e, r) => { if (il(t) === !1) throw new TypeError("toRegexRange: expected the first argument to be a number"); if (e === void 0 || t === e) return String(t); if (il(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 (ot.cache.hasOwnProperty(c)) return ot.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 = cl(t) || cl(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 = sl(b, Math.abs(u), p, i), u = p.a = 0; } return h >= 0 && (v = sl(u, h, p, i)), p.negatives = g, p.positives = v, p.result = Dg(g, v, i), i.capture === !0 ? p.result = `(${p.result}\ )` : i.wrap !== !1 && v.length + g.length > 1 && (p.result = `(?:${p.result})`), ot.cache[c] = p, p.result; }, "toRegexRange"); function Dg(t, e, r) { let i = Ai(t, e, "-", !1, r) || [], s = Ai(e, t, "", !1, r) || [], o = Ai(t, e, "-?", !0, r) || []; return i.concat(o).concat(s).join("|"); } n(Dg, "collatePatterns"); function Ig(t, e) { let r = 1, i = 1, s = ol(t, r), o = /* @__PURE__ */ new Set([e]); for (; t <= s && s <= e; ) o.add(s), r += 1, s = ol(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(Lg), o; } n(Ig, "splitToRanges"); function Ng(t, e, r) { if (t === e) return { pattern: t, count: [], digits: 0 }; let i = kg(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 += $g(c, u, r) : a++; } return a && (o += r.shorthand === !0 ? "\\d" : "[0-9]"), { pattern: o, count: [a], digits: s }; } n(Ng, "rangeToPattern"); function sl(t, e, r, i) { let s = Ig(t, e), o = [], a = t, l; for (let c = 0; c < s.length; c++) { let u = s[c], h = Ng(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 + ll(l.count), a = u + 1; continue; } r.isPadded && (m = Mg(u, r, i)), h.string = m + h.pattern + ll(h.count), o.push(h), a = u + 1, l = h; } return o; } n(sl, "splitToPatterns"); function Ai(t, e, r, i, s) { let o = []; for (let a of t) { let { string: l } = a; !i && !nl(e, "string", l) && o.push(r + l), i && nl(e, "string", l) && o.push(r + l); } return o; } n(Ai, "filterPatterns"); function kg(t, e) { let r = []; for (let i = 0; i < t.length; i++) r.push([t[i], e[i]]); return r; } n(kg, "zip"); function Lg(t, e) { return t > e ? 1 : e > t ? -1 : 0; } n(Lg, "compare"); function nl(t, e, r) { return t.some((i) => i[e] === r); } n(nl, "contains"); function ol(t, e) { return Number(String(t).slice(0, -e) + "9".repeat(e)); } n(ol, "countNines"); function al(t, e) { return t - t % Math.pow(10, e); } n(al, "countZeros"); function ll(t) { let [e = 0, r = ""] = t; return r || e > 1 ? `{${e + (r ? "," + r : "")}}` : ""; } n(ll, "toQuantifier"); function $g(t, e, r) { return `[${t}${e - t === 1 ? "" : "-"}${e}]`; } n($g, "toCharacterClass"); function cl(t) { return /^-?(0+)\d/.test(t); } n(cl, "hasPadding"); function Mg(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(Mg, "padZeros"); ot.cache = {}; ot.clearCache = () => ot.cache = {}; ul.exports = ot; }); // ../node_modules/fill-range/index.js var Ci = d((gP, xl) => { "use strict"; var qg = I("util"), dl = hl(), pl = /* @__PURE__ */ n((t) => t !== null && typeof t == "object" && !Array.isArray(t), "isObject"), jg = /* @__PURE__ */ n( (t) => (e) => t === !0 ? Number(e) : String(e), "transform"), Pi = /* @__PURE__ */ n((t) => typeof t == "number" || typeof t == "string" && t !== "", "isValidValue"), kt = /* @__PURE__ */ n((t) => Number.isInteger(+t), "isNumber"), Oi = /* @__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"), Fg = /* @__PURE__ */ n((t, e, r) => typeof t == "string" || typeof e == "string" ? !0 : r.stringify === !0, "stringify"), Hg = /* @__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"), pr = /* @__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"), Bg = /* @__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) => pr(String(l), r)).join("|")), t.negatives.length && (o = `-(${i}${t.negatives.map( (l) => pr(String(l), r)).join("|")})`), s && o ? a = `${s}|${o}` : a = s || o, e.wrap ? `(${i}${a})` : a; }, "toSequence"), fl = /* @__PURE__ */ n((t, e, r, i) => { if (r) return dl(t, e, { wrap: !1, ...i }); let s = String.fromCharCode(t); if (t === e) return s; let o = String.fromCharCode(e); return `[${s}-${o}]`; }, "toRange"), ml = /* @__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 dl(t, e, r); }, "toRegex"), gl = /* @__PURE__ */ n((...t) => new RangeError("Invalid range arguments: " + qg.inspect(...t)), "rangeError"), yl = /* @__PURE__ */ n( (t, e, r) => { if (r.strictRanges === !0) throw gl([t, e]); return []; }, "invalidRange"), Ug = /* @__PURE__ */ n((t, e) => { if (e.strictRanges === !0) throw new TypeError(`Expected step "${t}" to be a number`); return []; }, "invalidStep"), Wg = /* @__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 gl([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 = Oi(l) || Oi(c) || Oi(u), m = h ? Math.max(l.length, c.length, u.length) : 0, p = h === !1 && Fg(t, e, i) === !1, v = i.transform || jg(p); if (i.toRegex && r === 1) return fl(pr(t, m), pr(e, m), !0, i); let g = { negatives: [], positives: [] }, b = /* @__PURE__ */ n(($) => g[$ < 0 ? "negatives" : "positives"].push(Math.abs($)), "push"), R = [], T = 0; for (; a ? s >= o : s <= o; ) i.toRegex === !0 && r > 1 ? b(s) : R.push(Hg(v(s, T), m, p)), s = a ? s - r : s + r, T++; return i.toRegex === !0 ? r > 1 ? Bg(g, i, m) : ml(R, null, { wrap: !1, ...i }) : R; }, "fillNumbers"), Gg = /* @__PURE__ */ n((t, e, r = 1, i = {}) => { if (!kt(t) && t.length > 1 || !kt(e) && e.length > 1) return yl(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 fl(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 ? ml(h, null, { wrap: !1, options: i }) : h; }, "fillLetters"), hr = /* @__PURE__ */ n((t, e, r, i = {}) => { if (e == null && Pi(t)) return [t]; if (!Pi(t) || !Pi(e)) return yl(t, e, i); if (typeof r == "function") return hr(t, e, 1, { transform: r }); if (pl(r)) return hr(t, e, 0, r); let s = { ...i }; return s.capture === !0 && (s.wrap = !0), r = r || s.step || 1, kt(r) ? kt(t) && kt(e) ? Wg(t, e, r, s) : Gg(t, e, Math.max(Math.abs(r), 1), s) : r != null && !pl(r) ? Ug(r, s) : hr(t, e, 1, r); }, "fill"); xl.exports = hr; }); // ../node_modules/braces/lib/compile.js var El = d((xP, bl) => { "use strict"; var Vg = Ci(), _l = cr(), Yg = /* @__PURE__ */ n((t, e = {}) => { let r = /* @__PURE__ */ n((i, s = {}) => { let o = _l.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 = _l.reduce(i.nodes), m = Vg(...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"); bl.exports = Yg; }); // ../node_modules/braces/lib/expand.js var wl = d((bP, vl) => { "use strict"; var zg = Ci(), Sl = ur(), mt = cr(), at = /* @__PURE__ */ n((t = "", e = "", r = !1) => { let i = []; if (t = [].concat(t), e = [].concat(e), !e.length) return t; if (!t.length) return r ? mt.flatten(e).map((s) => `{${s}}`) : e; for (let s of t) if (Array.isArray(s)) for (let o of s) i.push(at(o, e, r)); else for (let o of e) r === !0 && typeof o == "string" && (o = `{${o}}`), i.push(Array.isArray(o) ? at(s, o, r) : s + o); return mt.flatten(i); }, "append"), Kg = /* @__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(at(l.pop(), Sl(s, e))); return; } if (s.type === "brace" && s.invalid !== !0 && s.nodes.length === 2) { l.push(at(l.pop(), ["{}"])); return; } if (s.nodes && s.ranges > 0) { let m = mt.reduce(s.nodes); if (mt.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 = zg(...m, e); p.length === 0 && (p = Sl(s, e)), l.push(at(l.pop(), p)), s.nodes = []; return; } let c = mt.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(at(l.pop(), u, c)); continue; } if (p.value && p.type !== "open") { u.push(at(u.pop(), p.value)); continue; } p.nodes && i(p, s); } return u; }, "walk"); return mt.flatten(i(t)); }, "expand"); vl.exports = Kg; }); // ../node_modules/braces/lib/constants.js var Tl = d((SP, Rl) => { "use strict"; Rl.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 Dl = d((vP, Cl) => { "use strict"; var Qg = ur(), { MAX_LENGTH: Al, CHAR_BACKSLASH: Di, /* \ */ CHAR_BACKTICK: Xg, /* ` */ CHAR_COMMA: Zg, /* , */ CHAR_DOT: Jg, /* . */ CHAR_LEFT_PARENTHESES: ey, /* ( */ CHAR_RIGHT_PARENTHESES: ty, /* ) */ CHAR_LEFT_CURLY_BRACE: ry, /* { */ CHAR_RIGHT_CURLY_BRACE: iy, /* } */ CHAR_LEFT_SQUARE_BRACKET: Pl, /* [ */ CHAR_RIGHT_SQUARE_BRACKET: Ol, /* ] */ CHAR_DOUBLE_QUOTE: sy, /* " */ CHAR_SINGLE_QUOTE: ny, /* ' */ CHAR_NO_BREAK_SPACE: oy, CHAR_ZERO_WIDTH_NOBREAK_SPACE: ay } = Tl(), ly = /* @__PURE__ */ n((t, e = {}) => { if (typeof t != "string") throw new TypeError("Expected a string"); let r = e || {}, i = typeof r.maxLength == "number" ? Math.min(Al, r.maxLength) : Al; 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 === ay || p === oy)) { if (p === Di) { g({ type: "text", value: (e.keepEscaping ? p : "") + v() }); continue; } if (p === Ol) { g({ type: "text", value: "\\" + p }); continue; } if (p === Pl) { c++; let b; for (; h < u && (b = v()); ) { if (p += b, b === Pl) { c++; continue; } if (b === Di) { p += v(); continue; } if (b === Ol && (c--, c === 0)) break; } g({ type: "text", value: p }); continue; } if (p === ey) { a = g({ type: "paren", nodes: [] }), o.push(a), g({ type: "text", value: p }); continue; } if (p === ty) { 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 === sy || p === ny || p === Xg) { let b = p, R; for (e.keepQuotes !== !0 && (p = ""); h < u && (R = v()); ) { if (R === Di) { p += R + v(); continue; } if (R === b) { e.keepQuotes === !0 && (p += R); break; } p += R; } g({ type: "text", value: p }); continue; } if (p === ry) { 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 === iy) { 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 === Zg && m > 0) { if (a.ranges > 0) { a.ranges = 0; let b = a.nodes.shift(); a.nodes = [b, { type: "text", value: Qg(a) }]; } g({ type: "comma", value: p }), a.commas++; continue; } if (p === Jg && 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"); Cl.exports = ly; }); // ../node_modules/braces/index.js var kl = d((RP, Nl) => { "use strict"; var Il = ur(), cy = El(), uy = wl(), hy = Dl(), ce = /* @__PURE__ */ n((t, e = {}) => { let r = []; if (Array.isArray(t)) for (let i of t) { let s = ce.create(i, e); Array.isArray(s) ? r.push(...s) : r.push(s); } else r = [].concat(ce.create(t, e)); return e && e.expand === !0 && e.nodupes === !0 && (r = [...new Set(r)]), r; }, "braces"); ce.parse = (t, e = {}) => hy(t, e); ce.stringify = (t, e = {}) => Il(typeof t == "string" ? ce.parse(t, e) : t, e); ce.compile = (t, e = {}) => (typeof t == "string" && (t = ce.parse(t, e)), cy(t, e)); ce.expand = (t, e = {}) => { typeof t == "string" && (t = ce.parse(t, e)); let r = uy(t, e); return e.noempty === !0 && (r = r.filter(Boolean)), e.nodupes === !0 && (r = [...new Set(r)]), r; }; ce.create = (t, e = {}) => t === "" || t.length < 3 ? [t] : e.expand !== !0 ? ce.compile(t, e) : ce.expand(t, e); Nl.exports = ce; }); // ../node_modules/picomatch/lib/constants.js var Lt = d((AP, jl) => { "use strict"; var py = I("path"), we = "\\\\/", Ll = `[^${we}]`, ke = "\\.", dy = "\\+", fy = "\\?", dr = "\\/", my = "(?=.)", $l = "[^/]", Ii = `(?:${dr}\ |$)`, Ml = `(?:^|${dr})`, Ni = `${ke}{1,2}${Ii}`, gy = `(?!${ke})`, yy = `(?!${Ml}${Ni})`, xy = `(?!${ke}{0,1}${Ii})`, _y = `(?!${Ni})`, by = `\ [^.${dr}]`, Ey = `${$l}*?`, ql = { DOT_LITERAL: ke, PLUS_LITERAL: dy, QMARK_LITERAL: fy, SLASH_LITERAL: dr, ONE_CHAR: my, QMARK: $l, END_ANCHOR: Ii, DOTS_SLASH: Ni, NO_DOT: gy, NO_DOTS: yy, NO_DOT_SLASH: xy, NO_DOTS_SLASH: _y, QMARK_NO_DOT: by, STAR: Ey, START_ANCHOR: Ml }, Sy = { ...ql, SLASH_LITERAL: `[${we}]`, QMARK: Ll, STAR: `${Ll}*?`, DOTS_SLASH: `${ke}{1,2}(?:[${we}]|$)`, NO_DOT: `(?!${ke})`, NO_DOTS: `(?!(?:^|[${we}])${ke}{1,2}(?:[${we}]|$))`, NO_DOT_SLASH: `(?!${ke}{0,1}(?:[${we}]|$))`, NO_DOTS_SLASH: `(?!${ke}{1,2}(?:[${we}]|$))`, QMARK_NO_DOT: `[^.${we}]`, START_ANCHOR: `(?:^|[${we}])`, END_ANCHOR: `(?:[${we}]|$)` }, vy = { 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" }; jl.exports = { MAX_LENGTH: 1024 * 64, POSIX_REGEX_SOURCE: vy, // 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: py.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 ? Sy : ql; } }; }); // ../node_modules/picomatch/lib/utils.js var $t = d((ne) => { "use strict"; var wy = I("path"), Ry = process.platform === "win32", { REGEX_BACKSLASH: Ty, REGEX_REMOVE_BACKSLASH: Ay, REGEX_SPECIAL_CHARS: Py, REGEX_SPECIAL_CHARS_GLOBAL: Oy } = Lt(); ne.isObject = (t) => t !== null && typeof t == "object" && !Array.isArray(t); ne.hasRegexChars = (t) => Py.test(t); ne.isRegexChar = (t) => t.length === 1 && ne.hasRegexChars(t); ne.escapeRegex = (t) => t.replace(Oy, "\\$1"); ne.toPosixSlashes = (t) => t.replace(Ty, "/"); ne.removeBackslashes = (t) => t.replace(Ay, (e) => e === "\\" ? "" : e); ne.supportsLookbehinds = () => { let t = process.version.slice(1).split(".").map(Number); return t.length === 3 && t[0] >= 9 || t[0] === 8 && t[1] >= 10; }; ne.isWindows = (t) => t && typeof t.windows == "boolean" ? t.windows : Ry === !0 || wy.sep === "\\"; ne.escapeLast = (t, e, r) => { let i = t.lastIndexOf(e, r); return i === -1 ? t : t[i - 1] === "\\" ? ne.escapeLast(t, e, i - 1) : `${t.slice(0, i)}\\${t.slice(i)}`; }; ne.removePrefix = (t, e = {}) => { let r = t; return r.startsWith("./") && (r = r.slice(2), e.prefix = "./"), r; }; ne.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 Yl = d((OP, Vl) => { "use strict"; var Fl = $t(), { CHAR_ASTERISK: ki, /* * */ CHAR_AT: Cy, /* @ */ CHAR_BACKWARD_SLASH: Mt, /* \ */ CHAR_COMMA: Dy, /* , */ CHAR_DOT: Li, /* . */ CHAR_EXCLAMATION_MARK: $i, /* ! */ CHAR_FORWARD_SLASH: Gl, /* / */ CHAR_LEFT_CURLY_BRACE: Mi, /* { */ CHAR_LEFT_PARENTHESES: qi, /* ( */ CHAR_LEFT_SQUARE_BRACKET: Iy, /* [ */ CHAR_PLUS: Ny, /* + */ CHAR_QUESTION_MARK: Hl, /* ? */ CHAR_RIGHT_CURLY_BRACE: ky, /* } */ CHAR_RIGHT_PARENTHESES: Bl, /* ) */ CHAR_RIGHT_SQUARE_BRACKET: Ly /* ] */ } = Lt(), Ul = /* @__PURE__ */ n((t) => t === Gl || t === Mt, "isPathSeparator"), Wl = /* @__PURE__ */ n((t) => { t.isPrefix !== !0 && (t.depth = t.isGlobstar ? 1 / 0 : 1); }, "depth"), $y = /* @__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, $ = !1, D = !1, F = !1, C = !1, k = 0, O, P, q = { 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 ie; if (P === Mt) { $ = q.backslashes = !0, P = V(), P === Mi && (T = !0); continue; } if (T === !0 || P === Mi) { for (k++; ee() !== !0 && (P = V()); ) { if (P === Mt) { $ = q.backslashes = !0, V(); continue; } if (P === Mi) { k++; continue; } if (T !== !0 && P === Li && (P = V()) === Li) { if (p = q.isBrace = !0, g = q.isGlob = !0, C = !0, s === !0) continue; break; } if (T !== !0 && P === Dy) { if (p = q.isBrace = !0, g = q.isGlob = !0, C = !0, s === !0) continue; break; } if (P === ky && (k--, k === 0)) { T = !1, p = q.isBrace = !0, C = !0; break; } } if (s === !0) continue; break; } if (P === Gl) { if (o.push(u), a.push(q), q = { value: "", depth: 0, isGlob: !1 }, C === !0) continue; if (O === Li && u === h + 1) { h += 2; continue; } m = u + 1; continue; } if (r.noext !== !0 && (P === Ny || P === Cy || P === ki || P === Hl || P === $i) === !0 && _() === qi) { if (g = q.isGlob = !0, b = q.isExtglob = !0, C = !0, P === $i && u === h && (F = !0), s === !0) { for (; ee() !== !0 && (P = V()); ) { if (P === Mt) { $ = q.backslashes = !0, P = V(); continue; } if (P === Bl) { g = q.isGlob = !0, C = !0; break; } } continue; } break; } if (P === ki) { if (O === ki && (R = q.isGlobstar = !0), g = q.isGlob = !0, C = !0, s === !0) continue; break; } if (P === Hl) { if (g = q.isGlob = !0, C = !0, s === !0) continue; break; } if (P === Iy) { for (; ee() !== !0 && (ie = V()); ) { if (ie === Mt) { $ = q.backslashes = !0, V(); continue; } if (ie === Ly) { v = q.isBracket = !0, g = q.isGlob = !0, C = !0; break; } } if (s === !0) continue; break; } if (r.nonegate !== !0 && P === $i && u === h) { D = q.negated = !0, h++; continue; } if (r.noparen !== !0 && P === qi) { if (g = q.isGlob = !0, s === !0) { for (; ee() !== !0 && (P = V()); ) { if (P === qi) { $ = q.backslashes = !0, P = V(); continue; } if (P === Bl) { 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, Ge = "", y = ""; h > 0 && (Ge = 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 && Ul(U.charCodeAt(U.length - 1)) && (U = U.slice(0, -1)), r.unescape === !0 && (y && (y = Fl.removeBackslashes(y)), U && $ === !0 && (U = Fl.removeBackslashes(U))); let x = { prefix: Ge, input: t, start: h, base: U, glob: y, isBrace: p, isBracket: v, isGlob: g, isExtglob: b, isGlobstar: R, negated: D, negatedExtglob: F }; if (r.tokens === !0 && (x.maxDepth = 0, Ul(P) || a.push(q), x.tokens = a), r.parts === !0 || r.tokens === !0) { let ie; for (let M = 0; M < o.length; M++) { let Se = ie ? ie + 1 : h, ve = o[M], le = t.slice(Se, ve); r.tokens && (M === 0 && h !== 0 ? (a[M].isPrefix = !0, a[M].value = Ge) : a[M].value = le, Wl(a[M]), x.maxDepth += a[M].depth), (M !== 0 || le !== "") && l.push(le), ie = ve; } if (ie && ie + 1 < t.length) { let M = t.slice(ie + 1); l.p