@powerlines/deepkit 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3513 @@
1
+ import { dirname, join, isAbsolute } from 'path';
2
+ import ts2 from 'typescript';
3
+ import { readFileSync } from 'fs';
4
+
5
+ var __create = Object.create;
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
12
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
13
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
14
+ }) : x)(function(x) {
15
+ if (typeof require !== "undefined") return require.apply(this, arguments);
16
+ throw Error('Dynamic require of "' + x + '" is not supported');
17
+ });
18
+ var __esm = (fn, res) => function __init() {
19
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
20
+ };
21
+ var __commonJS = (cb, mod) => function __require2() {
22
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
23
+ };
24
+ var __copyProps = (to, from, except, desc) => {
25
+ if (from && typeof from === "object" || typeof from === "function") {
26
+ for (let key of __getOwnPropNames(from))
27
+ if (!__hasOwnProp.call(to, key) && key !== except)
28
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
+ }
30
+ return to;
31
+ };
32
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
33
+ // If the importer is in node compatibility mode or this is not an ESM
34
+ // file that has been converted to a CommonJS file using a Babel-
35
+ // compatible transform (i.e. "__esModule" has not been set), then set
36
+ // "default" to the CommonJS "module.exports" for node compatibility.
37
+ __defProp(target, "default", { value: mod, enumerable: true }) ,
38
+ mod
39
+ ));
40
+
41
+ // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.55.2_@types+node@24.10.4__@swc+core@1.15.7_@swc+h_f8da27b0440c7f48fd09d237580fc3c9/node_modules/tsup/assets/esm_shims.js
42
+ var init_esm_shims = __esm({
43
+ "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.55.2_@types+node@24.10.4__@swc+core@1.15.7_@swc+h_f8da27b0440c7f48fd09d237580fc3c9/node_modules/tsup/assets/esm_shims.js"() {
44
+ }
45
+ });
46
+
47
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js
48
+ var require_utils = __commonJS({
49
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js"(exports$1) {
50
+ init_esm_shims();
51
+ exports$1.isInteger = (num) => {
52
+ if (typeof num === "number") {
53
+ return Number.isInteger(num);
54
+ }
55
+ if (typeof num === "string" && num.trim() !== "") {
56
+ return Number.isInteger(Number(num));
57
+ }
58
+ return false;
59
+ };
60
+ exports$1.find = (node, type) => node.nodes.find((node2) => node2.type === type);
61
+ exports$1.exceedsLimit = (min, max, step = 1, limit) => {
62
+ if (limit === false) return false;
63
+ if (!exports$1.isInteger(min) || !exports$1.isInteger(max)) return false;
64
+ return (Number(max) - Number(min)) / Number(step) >= limit;
65
+ };
66
+ exports$1.escapeNode = (block, n = 0, type) => {
67
+ const node = block.nodes[n];
68
+ if (!node) return;
69
+ if (type && node.type === type || node.type === "open" || node.type === "close") {
70
+ if (node.escaped !== true) {
71
+ node.value = "\\" + node.value;
72
+ node.escaped = true;
73
+ }
74
+ }
75
+ };
76
+ exports$1.encloseBrace = (node) => {
77
+ if (node.type !== "brace") return false;
78
+ if (node.commas >> 0 + node.ranges >> 0 === 0) {
79
+ node.invalid = true;
80
+ return true;
81
+ }
82
+ return false;
83
+ };
84
+ exports$1.isInvalidBrace = (block) => {
85
+ if (block.type !== "brace") return false;
86
+ if (block.invalid === true || block.dollar) return true;
87
+ if (block.commas >> 0 + block.ranges >> 0 === 0) {
88
+ block.invalid = true;
89
+ return true;
90
+ }
91
+ if (block.open !== true || block.close !== true) {
92
+ block.invalid = true;
93
+ return true;
94
+ }
95
+ return false;
96
+ };
97
+ exports$1.isOpenOrClose = (node) => {
98
+ if (node.type === "open" || node.type === "close") {
99
+ return true;
100
+ }
101
+ return node.open === true || node.close === true;
102
+ };
103
+ exports$1.reduce = (nodes) => nodes.reduce((acc, node) => {
104
+ if (node.type === "text") acc.push(node.value);
105
+ if (node.type === "range") node.type = "text";
106
+ return acc;
107
+ }, []);
108
+ exports$1.flatten = (...args) => {
109
+ const result = [];
110
+ const flat = /* @__PURE__ */ __name((arr) => {
111
+ for (let i = 0; i < arr.length; i++) {
112
+ const ele = arr[i];
113
+ if (Array.isArray(ele)) {
114
+ flat(ele);
115
+ continue;
116
+ }
117
+ if (ele !== void 0) {
118
+ result.push(ele);
119
+ }
120
+ }
121
+ return result;
122
+ }, "flat");
123
+ flat(args);
124
+ return result;
125
+ };
126
+ }
127
+ });
128
+
129
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js
130
+ var require_stringify = __commonJS({
131
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js"(exports$1, module) {
132
+ init_esm_shims();
133
+ var utils = require_utils();
134
+ module.exports = (ast, options = {}) => {
135
+ const stringify = /* @__PURE__ */ __name((node, parent = {}) => {
136
+ const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
137
+ const invalidNode = node.invalid === true && options.escapeInvalid === true;
138
+ let output = "";
139
+ if (node.value) {
140
+ if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
141
+ return "\\" + node.value;
142
+ }
143
+ return node.value;
144
+ }
145
+ if (node.value) {
146
+ return node.value;
147
+ }
148
+ if (node.nodes) {
149
+ for (const child of node.nodes) {
150
+ output += stringify(child);
151
+ }
152
+ }
153
+ return output;
154
+ }, "stringify");
155
+ return stringify(ast);
156
+ };
157
+ }
158
+ });
159
+
160
+ // ../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js
161
+ var require_is_number = __commonJS({
162
+ "../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js"(exports$1, module) {
163
+ init_esm_shims();
164
+ module.exports = function(num) {
165
+ if (typeof num === "number") {
166
+ return num - num === 0;
167
+ }
168
+ if (typeof num === "string" && num.trim() !== "") {
169
+ return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
170
+ }
171
+ return false;
172
+ };
173
+ }
174
+ });
175
+
176
+ // ../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js
177
+ var require_to_regex_range = __commonJS({
178
+ "../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js"(exports$1, module) {
179
+ init_esm_shims();
180
+ var isNumber = require_is_number();
181
+ var toRegexRange = /* @__PURE__ */ __name((min, max, options) => {
182
+ if (isNumber(min) === false) {
183
+ throw new TypeError("toRegexRange: expected the first argument to be a number");
184
+ }
185
+ if (max === void 0 || min === max) {
186
+ return String(min);
187
+ }
188
+ if (isNumber(max) === false) {
189
+ throw new TypeError("toRegexRange: expected the second argument to be a number.");
190
+ }
191
+ let opts = {
192
+ relaxZeros: true,
193
+ ...options
194
+ };
195
+ if (typeof opts.strictZeros === "boolean") {
196
+ opts.relaxZeros = opts.strictZeros === false;
197
+ }
198
+ let relax = String(opts.relaxZeros);
199
+ let shorthand = String(opts.shorthand);
200
+ let capture = String(opts.capture);
201
+ let wrap = String(opts.wrap);
202
+ let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
203
+ if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
204
+ return toRegexRange.cache[cacheKey].result;
205
+ }
206
+ let a = Math.min(min, max);
207
+ let b = Math.max(min, max);
208
+ if (Math.abs(a - b) === 1) {
209
+ let result = min + "|" + max;
210
+ if (opts.capture) {
211
+ return `(${result})`;
212
+ }
213
+ if (opts.wrap === false) {
214
+ return result;
215
+ }
216
+ return `(?:${result})`;
217
+ }
218
+ let isPadded = hasPadding(min) || hasPadding(max);
219
+ let state = {
220
+ min,
221
+ max,
222
+ a,
223
+ b
224
+ };
225
+ let positives = [];
226
+ let negatives = [];
227
+ if (isPadded) {
228
+ state.isPadded = isPadded;
229
+ state.maxLen = String(state.max).length;
230
+ }
231
+ if (a < 0) {
232
+ let newMin = b < 0 ? Math.abs(b) : 1;
233
+ negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
234
+ a = state.a = 0;
235
+ }
236
+ if (b >= 0) {
237
+ positives = splitToPatterns(a, b, state, opts);
238
+ }
239
+ state.negatives = negatives;
240
+ state.positives = positives;
241
+ state.result = collatePatterns(negatives, positives);
242
+ if (opts.capture === true) {
243
+ state.result = `(${state.result})`;
244
+ } else if (opts.wrap !== false && positives.length + negatives.length > 1) {
245
+ state.result = `(?:${state.result})`;
246
+ }
247
+ toRegexRange.cache[cacheKey] = state;
248
+ return state.result;
249
+ }, "toRegexRange");
250
+ function collatePatterns(neg, pos, options) {
251
+ let onlyNegative = filterPatterns(neg, pos, "-", false) || [];
252
+ let onlyPositive = filterPatterns(pos, neg, "", false) || [];
253
+ let intersected = filterPatterns(neg, pos, "-?", true) || [];
254
+ let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
255
+ return subpatterns.join("|");
256
+ }
257
+ __name(collatePatterns, "collatePatterns");
258
+ function splitToRanges(min, max) {
259
+ let nines = 1;
260
+ let zeros = 1;
261
+ let stop = countNines(min, nines);
262
+ let stops = /* @__PURE__ */ new Set([
263
+ max
264
+ ]);
265
+ while (min <= stop && stop <= max) {
266
+ stops.add(stop);
267
+ nines += 1;
268
+ stop = countNines(min, nines);
269
+ }
270
+ stop = countZeros(max + 1, zeros) - 1;
271
+ while (min < stop && stop <= max) {
272
+ stops.add(stop);
273
+ zeros += 1;
274
+ stop = countZeros(max + 1, zeros) - 1;
275
+ }
276
+ stops = [
277
+ ...stops
278
+ ];
279
+ stops.sort(compare);
280
+ return stops;
281
+ }
282
+ __name(splitToRanges, "splitToRanges");
283
+ function rangeToPattern(start, stop, options) {
284
+ if (start === stop) {
285
+ return {
286
+ pattern: start,
287
+ count: [],
288
+ digits: 0
289
+ };
290
+ }
291
+ let zipped = zip(start, stop);
292
+ let digits = zipped.length;
293
+ let pattern = "";
294
+ let count = 0;
295
+ for (let i = 0; i < digits; i++) {
296
+ let [startDigit, stopDigit] = zipped[i];
297
+ if (startDigit === stopDigit) {
298
+ pattern += startDigit;
299
+ } else if (startDigit !== "0" || stopDigit !== "9") {
300
+ pattern += toCharacterClass(startDigit, stopDigit);
301
+ } else {
302
+ count++;
303
+ }
304
+ }
305
+ if (count) {
306
+ pattern += options.shorthand === true ? "\\d" : "[0-9]";
307
+ }
308
+ return {
309
+ pattern,
310
+ count: [
311
+ count
312
+ ],
313
+ digits
314
+ };
315
+ }
316
+ __name(rangeToPattern, "rangeToPattern");
317
+ function splitToPatterns(min, max, tok, options) {
318
+ let ranges = splitToRanges(min, max);
319
+ let tokens = [];
320
+ let start = min;
321
+ let prev;
322
+ for (let i = 0; i < ranges.length; i++) {
323
+ let max2 = ranges[i];
324
+ let obj = rangeToPattern(String(start), String(max2), options);
325
+ let zeros = "";
326
+ if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
327
+ if (prev.count.length > 1) {
328
+ prev.count.pop();
329
+ }
330
+ prev.count.push(obj.count[0]);
331
+ prev.string = prev.pattern + toQuantifier(prev.count);
332
+ start = max2 + 1;
333
+ continue;
334
+ }
335
+ if (tok.isPadded) {
336
+ zeros = padZeros(max2, tok, options);
337
+ }
338
+ obj.string = zeros + obj.pattern + toQuantifier(obj.count);
339
+ tokens.push(obj);
340
+ start = max2 + 1;
341
+ prev = obj;
342
+ }
343
+ return tokens;
344
+ }
345
+ __name(splitToPatterns, "splitToPatterns");
346
+ function filterPatterns(arr, comparison, prefix, intersection, options) {
347
+ let result = [];
348
+ for (let ele of arr) {
349
+ let { string } = ele;
350
+ if (!intersection && !contains(comparison, "string", string)) {
351
+ result.push(prefix + string);
352
+ }
353
+ if (intersection && contains(comparison, "string", string)) {
354
+ result.push(prefix + string);
355
+ }
356
+ }
357
+ return result;
358
+ }
359
+ __name(filterPatterns, "filterPatterns");
360
+ function zip(a, b) {
361
+ let arr = [];
362
+ for (let i = 0; i < a.length; i++) arr.push([
363
+ a[i],
364
+ b[i]
365
+ ]);
366
+ return arr;
367
+ }
368
+ __name(zip, "zip");
369
+ function compare(a, b) {
370
+ return a > b ? 1 : b > a ? -1 : 0;
371
+ }
372
+ __name(compare, "compare");
373
+ function contains(arr, key, val) {
374
+ return arr.some((ele) => ele[key] === val);
375
+ }
376
+ __name(contains, "contains");
377
+ function countNines(min, len) {
378
+ return Number(String(min).slice(0, -len) + "9".repeat(len));
379
+ }
380
+ __name(countNines, "countNines");
381
+ function countZeros(integer, zeros) {
382
+ return integer - integer % Math.pow(10, zeros);
383
+ }
384
+ __name(countZeros, "countZeros");
385
+ function toQuantifier(digits) {
386
+ let [start = 0, stop = ""] = digits;
387
+ if (stop || start > 1) {
388
+ return `{${start + (stop ? "," + stop : "")}}`;
389
+ }
390
+ return "";
391
+ }
392
+ __name(toQuantifier, "toQuantifier");
393
+ function toCharacterClass(a, b, options) {
394
+ return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
395
+ }
396
+ __name(toCharacterClass, "toCharacterClass");
397
+ function hasPadding(str) {
398
+ return /^-?(0+)\d/.test(str);
399
+ }
400
+ __name(hasPadding, "hasPadding");
401
+ function padZeros(value, tok, options) {
402
+ if (!tok.isPadded) {
403
+ return value;
404
+ }
405
+ let diff = Math.abs(tok.maxLen - String(value).length);
406
+ let relax = options.relaxZeros !== false;
407
+ switch (diff) {
408
+ case 0:
409
+ return "";
410
+ case 1:
411
+ return relax ? "0?" : "0";
412
+ case 2:
413
+ return relax ? "0{0,2}" : "00";
414
+ default: {
415
+ return relax ? `0{0,${diff}}` : `0{${diff}}`;
416
+ }
417
+ }
418
+ }
419
+ __name(padZeros, "padZeros");
420
+ toRegexRange.cache = {};
421
+ toRegexRange.clearCache = () => toRegexRange.cache = {};
422
+ module.exports = toRegexRange;
423
+ }
424
+ });
425
+
426
+ // ../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js
427
+ var require_fill_range = __commonJS({
428
+ "../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js"(exports$1, module) {
429
+ init_esm_shims();
430
+ var util = __require("util");
431
+ var toRegexRange = require_to_regex_range();
432
+ var isObject2 = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object" && !Array.isArray(val), "isObject");
433
+ var transform = /* @__PURE__ */ __name((toNumber) => {
434
+ return (value) => toNumber === true ? Number(value) : String(value);
435
+ }, "transform");
436
+ var isValidValue = /* @__PURE__ */ __name((value) => {
437
+ return typeof value === "number" || typeof value === "string" && value !== "";
438
+ }, "isValidValue");
439
+ var isNumber = /* @__PURE__ */ __name((num) => Number.isInteger(+num), "isNumber");
440
+ var zeros = /* @__PURE__ */ __name((input) => {
441
+ let value = `${input}`;
442
+ let index = -1;
443
+ if (value[0] === "-") value = value.slice(1);
444
+ if (value === "0") return false;
445
+ while (value[++index] === "0") ;
446
+ return index > 0;
447
+ }, "zeros");
448
+ var stringify = /* @__PURE__ */ __name((start, end, options) => {
449
+ if (typeof start === "string" || typeof end === "string") {
450
+ return true;
451
+ }
452
+ return options.stringify === true;
453
+ }, "stringify");
454
+ var pad = /* @__PURE__ */ __name((input, maxLength, toNumber) => {
455
+ if (maxLength > 0) {
456
+ let dash = input[0] === "-" ? "-" : "";
457
+ if (dash) input = input.slice(1);
458
+ input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
459
+ }
460
+ if (toNumber === false) {
461
+ return String(input);
462
+ }
463
+ return input;
464
+ }, "pad");
465
+ var toMaxLen = /* @__PURE__ */ __name((input, maxLength) => {
466
+ let negative = input[0] === "-" ? "-" : "";
467
+ if (negative) {
468
+ input = input.slice(1);
469
+ maxLength--;
470
+ }
471
+ while (input.length < maxLength) input = "0" + input;
472
+ return negative ? "-" + input : input;
473
+ }, "toMaxLen");
474
+ var toSequence = /* @__PURE__ */ __name((parts, options, maxLen) => {
475
+ parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
476
+ parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
477
+ let prefix = options.capture ? "" : "?:";
478
+ let positives = "";
479
+ let negatives = "";
480
+ let result;
481
+ if (parts.positives.length) {
482
+ positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|");
483
+ }
484
+ if (parts.negatives.length) {
485
+ negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`;
486
+ }
487
+ if (positives && negatives) {
488
+ result = `${positives}|${negatives}`;
489
+ } else {
490
+ result = positives || negatives;
491
+ }
492
+ if (options.wrap) {
493
+ return `(${prefix}${result})`;
494
+ }
495
+ return result;
496
+ }, "toSequence");
497
+ var toRange = /* @__PURE__ */ __name((a, b, isNumbers, options) => {
498
+ if (isNumbers) {
499
+ return toRegexRange(a, b, {
500
+ wrap: false,
501
+ ...options
502
+ });
503
+ }
504
+ let start = String.fromCharCode(a);
505
+ if (a === b) return start;
506
+ let stop = String.fromCharCode(b);
507
+ return `[${start}-${stop}]`;
508
+ }, "toRange");
509
+ var toRegex = /* @__PURE__ */ __name((start, end, options) => {
510
+ if (Array.isArray(start)) {
511
+ let wrap = options.wrap === true;
512
+ let prefix = options.capture ? "" : "?:";
513
+ return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
514
+ }
515
+ return toRegexRange(start, end, options);
516
+ }, "toRegex");
517
+ var rangeError = /* @__PURE__ */ __name((...args) => {
518
+ return new RangeError("Invalid range arguments: " + util.inspect(...args));
519
+ }, "rangeError");
520
+ var invalidRange = /* @__PURE__ */ __name((start, end, options) => {
521
+ if (options.strictRanges === true) throw rangeError([
522
+ start,
523
+ end
524
+ ]);
525
+ return [];
526
+ }, "invalidRange");
527
+ var invalidStep = /* @__PURE__ */ __name((step, options) => {
528
+ if (options.strictRanges === true) {
529
+ throw new TypeError(`Expected step "${step}" to be a number`);
530
+ }
531
+ return [];
532
+ }, "invalidStep");
533
+ var fillNumbers = /* @__PURE__ */ __name((start, end, step = 1, options = {}) => {
534
+ let a = Number(start);
535
+ let b = Number(end);
536
+ if (!Number.isInteger(a) || !Number.isInteger(b)) {
537
+ if (options.strictRanges === true) throw rangeError([
538
+ start,
539
+ end
540
+ ]);
541
+ return [];
542
+ }
543
+ if (a === 0) a = 0;
544
+ if (b === 0) b = 0;
545
+ let descending = a > b;
546
+ let startString = String(start);
547
+ let endString = String(end);
548
+ let stepString = String(step);
549
+ step = Math.max(Math.abs(step), 1);
550
+ let padded = zeros(startString) || zeros(endString) || zeros(stepString);
551
+ let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
552
+ let toNumber = padded === false && stringify(start, end, options) === false;
553
+ let format = options.transform || transform(toNumber);
554
+ if (options.toRegex && step === 1) {
555
+ return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
556
+ }
557
+ let parts = {
558
+ negatives: [],
559
+ positives: []
560
+ };
561
+ let push = /* @__PURE__ */ __name((num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)), "push");
562
+ let range = [];
563
+ let index = 0;
564
+ while (descending ? a >= b : a <= b) {
565
+ if (options.toRegex === true && step > 1) {
566
+ push(a);
567
+ } else {
568
+ range.push(pad(format(a, index), maxLen, toNumber));
569
+ }
570
+ a = descending ? a - step : a + step;
571
+ index++;
572
+ }
573
+ if (options.toRegex === true) {
574
+ return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, {
575
+ wrap: false,
576
+ ...options
577
+ });
578
+ }
579
+ return range;
580
+ }, "fillNumbers");
581
+ var fillLetters = /* @__PURE__ */ __name((start, end, step = 1, options = {}) => {
582
+ if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
583
+ return invalidRange(start, end, options);
584
+ }
585
+ let format = options.transform || ((val) => String.fromCharCode(val));
586
+ let a = `${start}`.charCodeAt(0);
587
+ let b = `${end}`.charCodeAt(0);
588
+ let descending = a > b;
589
+ let min = Math.min(a, b);
590
+ let max = Math.max(a, b);
591
+ if (options.toRegex && step === 1) {
592
+ return toRange(min, max, false, options);
593
+ }
594
+ let range = [];
595
+ let index = 0;
596
+ while (descending ? a >= b : a <= b) {
597
+ range.push(format(a, index));
598
+ a = descending ? a - step : a + step;
599
+ index++;
600
+ }
601
+ if (options.toRegex === true) {
602
+ return toRegex(range, null, {
603
+ wrap: false,
604
+ options
605
+ });
606
+ }
607
+ return range;
608
+ }, "fillLetters");
609
+ var fill = /* @__PURE__ */ __name((start, end, step, options = {}) => {
610
+ if (end == null && isValidValue(start)) {
611
+ return [
612
+ start
613
+ ];
614
+ }
615
+ if (!isValidValue(start) || !isValidValue(end)) {
616
+ return invalidRange(start, end, options);
617
+ }
618
+ if (typeof step === "function") {
619
+ return fill(start, end, 1, {
620
+ transform: step
621
+ });
622
+ }
623
+ if (isObject2(step)) {
624
+ return fill(start, end, 0, step);
625
+ }
626
+ let opts = {
627
+ ...options
628
+ };
629
+ if (opts.capture === true) opts.wrap = true;
630
+ step = step || opts.step || 1;
631
+ if (!isNumber(step)) {
632
+ if (step != null && !isObject2(step)) return invalidStep(step, opts);
633
+ return fill(start, end, 1, step);
634
+ }
635
+ if (isNumber(start) && isNumber(end)) {
636
+ return fillNumbers(start, end, step, opts);
637
+ }
638
+ return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
639
+ }, "fill");
640
+ module.exports = fill;
641
+ }
642
+ });
643
+
644
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js
645
+ var require_compile = __commonJS({
646
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js"(exports$1, module) {
647
+ init_esm_shims();
648
+ var fill = require_fill_range();
649
+ var utils = require_utils();
650
+ var compile = /* @__PURE__ */ __name((ast, options = {}) => {
651
+ const walk = /* @__PURE__ */ __name((node, parent = {}) => {
652
+ const invalidBlock = utils.isInvalidBrace(parent);
653
+ const invalidNode = node.invalid === true && options.escapeInvalid === true;
654
+ const invalid = invalidBlock === true || invalidNode === true;
655
+ const prefix = options.escapeInvalid === true ? "\\" : "";
656
+ let output = "";
657
+ if (node.isOpen === true) {
658
+ return prefix + node.value;
659
+ }
660
+ if (node.isClose === true) {
661
+ console.log("node.isClose", prefix, node.value);
662
+ return prefix + node.value;
663
+ }
664
+ if (node.type === "open") {
665
+ return invalid ? prefix + node.value : "(";
666
+ }
667
+ if (node.type === "close") {
668
+ return invalid ? prefix + node.value : ")";
669
+ }
670
+ if (node.type === "comma") {
671
+ return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
672
+ }
673
+ if (node.value) {
674
+ return node.value;
675
+ }
676
+ if (node.nodes && node.ranges > 0) {
677
+ const args = utils.reduce(node.nodes);
678
+ const range = fill(...args, {
679
+ ...options,
680
+ wrap: false,
681
+ toRegex: true,
682
+ strictZeros: true
683
+ });
684
+ if (range.length !== 0) {
685
+ return args.length > 1 && range.length > 1 ? `(${range})` : range;
686
+ }
687
+ }
688
+ if (node.nodes) {
689
+ for (const child of node.nodes) {
690
+ output += walk(child, node);
691
+ }
692
+ }
693
+ return output;
694
+ }, "walk");
695
+ return walk(ast);
696
+ }, "compile");
697
+ module.exports = compile;
698
+ }
699
+ });
700
+
701
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js
702
+ var require_expand = __commonJS({
703
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js"(exports$1, module) {
704
+ init_esm_shims();
705
+ var fill = require_fill_range();
706
+ var stringify = require_stringify();
707
+ var utils = require_utils();
708
+ var append = /* @__PURE__ */ __name((queue = "", stash = "", enclose = false) => {
709
+ const result = [];
710
+ queue = [].concat(queue);
711
+ stash = [].concat(stash);
712
+ if (!stash.length) return queue;
713
+ if (!queue.length) {
714
+ return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
715
+ }
716
+ for (const item of queue) {
717
+ if (Array.isArray(item)) {
718
+ for (const value of item) {
719
+ result.push(append(value, stash, enclose));
720
+ }
721
+ } else {
722
+ for (let ele of stash) {
723
+ if (enclose === true && typeof ele === "string") ele = `{${ele}}`;
724
+ result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
725
+ }
726
+ }
727
+ }
728
+ return utils.flatten(result);
729
+ }, "append");
730
+ var expand = /* @__PURE__ */ __name((ast, options = {}) => {
731
+ const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
732
+ const walk = /* @__PURE__ */ __name((node, parent = {}) => {
733
+ node.queue = [];
734
+ let p = parent;
735
+ let q = parent.queue;
736
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
737
+ p = p.parent;
738
+ q = p.queue;
739
+ }
740
+ if (node.invalid || node.dollar) {
741
+ q.push(append(q.pop(), stringify(node, options)));
742
+ return;
743
+ }
744
+ if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
745
+ q.push(append(q.pop(), [
746
+ "{}"
747
+ ]));
748
+ return;
749
+ }
750
+ if (node.nodes && node.ranges > 0) {
751
+ const args = utils.reduce(node.nodes);
752
+ if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
753
+ throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
754
+ }
755
+ let range = fill(...args, options);
756
+ if (range.length === 0) {
757
+ range = stringify(node, options);
758
+ }
759
+ q.push(append(q.pop(), range));
760
+ node.nodes = [];
761
+ return;
762
+ }
763
+ const enclose = utils.encloseBrace(node);
764
+ let queue = node.queue;
765
+ let block = node;
766
+ while (block.type !== "brace" && block.type !== "root" && block.parent) {
767
+ block = block.parent;
768
+ queue = block.queue;
769
+ }
770
+ for (let i = 0; i < node.nodes.length; i++) {
771
+ const child = node.nodes[i];
772
+ if (child.type === "comma" && node.type === "brace") {
773
+ if (i === 1) queue.push("");
774
+ queue.push("");
775
+ continue;
776
+ }
777
+ if (child.type === "close") {
778
+ q.push(append(q.pop(), queue, enclose));
779
+ continue;
780
+ }
781
+ if (child.value && child.type !== "open") {
782
+ queue.push(append(queue.pop(), child.value));
783
+ continue;
784
+ }
785
+ if (child.nodes) {
786
+ walk(child, node);
787
+ }
788
+ }
789
+ return queue;
790
+ }, "walk");
791
+ return utils.flatten(walk(ast));
792
+ }, "expand");
793
+ module.exports = expand;
794
+ }
795
+ });
796
+
797
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js
798
+ var require_constants = __commonJS({
799
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js"(exports$1, module) {
800
+ init_esm_shims();
801
+ module.exports = {
802
+ MAX_LENGTH: 1e4,
803
+ // Digits
804
+ CHAR_0: "0",
805
+ /* 0 */
806
+ CHAR_9: "9",
807
+ /* 9 */
808
+ // Alphabet chars.
809
+ CHAR_UPPERCASE_A: "A",
810
+ /* A */
811
+ CHAR_LOWERCASE_A: "a",
812
+ /* a */
813
+ CHAR_UPPERCASE_Z: "Z",
814
+ /* Z */
815
+ CHAR_LOWERCASE_Z: "z",
816
+ /* z */
817
+ CHAR_LEFT_PARENTHESES: "(",
818
+ /* ( */
819
+ CHAR_RIGHT_PARENTHESES: ")",
820
+ /* ) */
821
+ CHAR_ASTERISK: "*",
822
+ /* * */
823
+ // Non-alphabetic chars.
824
+ CHAR_AMPERSAND: "&",
825
+ /* & */
826
+ CHAR_AT: "@",
827
+ /* @ */
828
+ CHAR_BACKSLASH: "\\",
829
+ /* \ */
830
+ CHAR_BACKTICK: "`",
831
+ /* ` */
832
+ CHAR_CARRIAGE_RETURN: "\r",
833
+ /* \r */
834
+ CHAR_CIRCUMFLEX_ACCENT: "^",
835
+ /* ^ */
836
+ CHAR_COLON: ":",
837
+ /* : */
838
+ CHAR_COMMA: ",",
839
+ /* , */
840
+ CHAR_DOLLAR: "$",
841
+ /* . */
842
+ CHAR_DOT: ".",
843
+ /* . */
844
+ CHAR_DOUBLE_QUOTE: '"',
845
+ /* " */
846
+ CHAR_EQUAL: "=",
847
+ /* = */
848
+ CHAR_EXCLAMATION_MARK: "!",
849
+ /* ! */
850
+ CHAR_FORM_FEED: "\f",
851
+ /* \f */
852
+ CHAR_FORWARD_SLASH: "/",
853
+ /* / */
854
+ CHAR_HASH: "#",
855
+ /* # */
856
+ CHAR_HYPHEN_MINUS: "-",
857
+ /* - */
858
+ CHAR_LEFT_ANGLE_BRACKET: "<",
859
+ /* < */
860
+ CHAR_LEFT_CURLY_BRACE: "{",
861
+ /* { */
862
+ CHAR_LEFT_SQUARE_BRACKET: "[",
863
+ /* [ */
864
+ CHAR_LINE_FEED: "\n",
865
+ /* \n */
866
+ CHAR_NO_BREAK_SPACE: "\xA0",
867
+ /* \u00A0 */
868
+ CHAR_PERCENT: "%",
869
+ /* % */
870
+ CHAR_PLUS: "+",
871
+ /* + */
872
+ CHAR_QUESTION_MARK: "?",
873
+ /* ? */
874
+ CHAR_RIGHT_ANGLE_BRACKET: ">",
875
+ /* > */
876
+ CHAR_RIGHT_CURLY_BRACE: "}",
877
+ /* } */
878
+ CHAR_RIGHT_SQUARE_BRACKET: "]",
879
+ /* ] */
880
+ CHAR_SEMICOLON: ";",
881
+ /* ; */
882
+ CHAR_SINGLE_QUOTE: "'",
883
+ /* ' */
884
+ CHAR_SPACE: " ",
885
+ /* */
886
+ CHAR_TAB: " ",
887
+ /* \t */
888
+ CHAR_UNDERSCORE: "_",
889
+ /* _ */
890
+ CHAR_VERTICAL_LINE: "|",
891
+ /* | */
892
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
893
+ /* \uFEFF */
894
+ };
895
+ }
896
+ });
897
+
898
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js
899
+ var require_parse = __commonJS({
900
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js"(exports$1, module) {
901
+ init_esm_shims();
902
+ var stringify = require_stringify();
903
+ var {
904
+ MAX_LENGTH,
905
+ CHAR_BACKSLASH,
906
+ /* \ */
907
+ CHAR_BACKTICK,
908
+ /* ` */
909
+ CHAR_COMMA,
910
+ /* , */
911
+ CHAR_DOT,
912
+ /* . */
913
+ CHAR_LEFT_PARENTHESES,
914
+ /* ( */
915
+ CHAR_RIGHT_PARENTHESES,
916
+ /* ) */
917
+ CHAR_LEFT_CURLY_BRACE,
918
+ /* { */
919
+ CHAR_RIGHT_CURLY_BRACE,
920
+ /* } */
921
+ CHAR_LEFT_SQUARE_BRACKET,
922
+ /* [ */
923
+ CHAR_RIGHT_SQUARE_BRACKET,
924
+ /* ] */
925
+ CHAR_DOUBLE_QUOTE,
926
+ /* " */
927
+ CHAR_SINGLE_QUOTE,
928
+ /* ' */
929
+ CHAR_NO_BREAK_SPACE,
930
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE
931
+ } = require_constants();
932
+ var parse = /* @__PURE__ */ __name((input, options = {}) => {
933
+ if (typeof input !== "string") {
934
+ throw new TypeError("Expected a string");
935
+ }
936
+ const opts = options || {};
937
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
938
+ if (input.length > max) {
939
+ throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
940
+ }
941
+ const ast = {
942
+ type: "root",
943
+ input,
944
+ nodes: []
945
+ };
946
+ const stack = [
947
+ ast
948
+ ];
949
+ let block = ast;
950
+ let prev = ast;
951
+ let brackets = 0;
952
+ const length = input.length;
953
+ let index = 0;
954
+ let depth = 0;
955
+ let value;
956
+ const advance = /* @__PURE__ */ __name(() => input[index++], "advance");
957
+ const push = /* @__PURE__ */ __name((node) => {
958
+ if (node.type === "text" && prev.type === "dot") {
959
+ prev.type = "text";
960
+ }
961
+ if (prev && prev.type === "text" && node.type === "text") {
962
+ prev.value += node.value;
963
+ return;
964
+ }
965
+ block.nodes.push(node);
966
+ node.parent = block;
967
+ node.prev = prev;
968
+ prev = node;
969
+ return node;
970
+ }, "push");
971
+ push({
972
+ type: "bos"
973
+ });
974
+ while (index < length) {
975
+ block = stack[stack.length - 1];
976
+ value = advance();
977
+ if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
978
+ continue;
979
+ }
980
+ if (value === CHAR_BACKSLASH) {
981
+ push({
982
+ type: "text",
983
+ value: (options.keepEscaping ? value : "") + advance()
984
+ });
985
+ continue;
986
+ }
987
+ if (value === CHAR_RIGHT_SQUARE_BRACKET) {
988
+ push({
989
+ type: "text",
990
+ value: "\\" + value
991
+ });
992
+ continue;
993
+ }
994
+ if (value === CHAR_LEFT_SQUARE_BRACKET) {
995
+ brackets++;
996
+ let next;
997
+ while (index < length && (next = advance())) {
998
+ value += next;
999
+ if (next === CHAR_LEFT_SQUARE_BRACKET) {
1000
+ brackets++;
1001
+ continue;
1002
+ }
1003
+ if (next === CHAR_BACKSLASH) {
1004
+ value += advance();
1005
+ continue;
1006
+ }
1007
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
1008
+ brackets--;
1009
+ if (brackets === 0) {
1010
+ break;
1011
+ }
1012
+ }
1013
+ }
1014
+ push({
1015
+ type: "text",
1016
+ value
1017
+ });
1018
+ continue;
1019
+ }
1020
+ if (value === CHAR_LEFT_PARENTHESES) {
1021
+ block = push({
1022
+ type: "paren",
1023
+ nodes: []
1024
+ });
1025
+ stack.push(block);
1026
+ push({
1027
+ type: "text",
1028
+ value
1029
+ });
1030
+ continue;
1031
+ }
1032
+ if (value === CHAR_RIGHT_PARENTHESES) {
1033
+ if (block.type !== "paren") {
1034
+ push({
1035
+ type: "text",
1036
+ value
1037
+ });
1038
+ continue;
1039
+ }
1040
+ block = stack.pop();
1041
+ push({
1042
+ type: "text",
1043
+ value
1044
+ });
1045
+ block = stack[stack.length - 1];
1046
+ continue;
1047
+ }
1048
+ if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
1049
+ const open = value;
1050
+ let next;
1051
+ if (options.keepQuotes !== true) {
1052
+ value = "";
1053
+ }
1054
+ while (index < length && (next = advance())) {
1055
+ if (next === CHAR_BACKSLASH) {
1056
+ value += next + advance();
1057
+ continue;
1058
+ }
1059
+ if (next === open) {
1060
+ if (options.keepQuotes === true) value += next;
1061
+ break;
1062
+ }
1063
+ value += next;
1064
+ }
1065
+ push({
1066
+ type: "text",
1067
+ value
1068
+ });
1069
+ continue;
1070
+ }
1071
+ if (value === CHAR_LEFT_CURLY_BRACE) {
1072
+ depth++;
1073
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
1074
+ const brace = {
1075
+ type: "brace",
1076
+ open: true,
1077
+ close: false,
1078
+ dollar,
1079
+ depth,
1080
+ commas: 0,
1081
+ ranges: 0,
1082
+ nodes: []
1083
+ };
1084
+ block = push(brace);
1085
+ stack.push(block);
1086
+ push({
1087
+ type: "open",
1088
+ value
1089
+ });
1090
+ continue;
1091
+ }
1092
+ if (value === CHAR_RIGHT_CURLY_BRACE) {
1093
+ if (block.type !== "brace") {
1094
+ push({
1095
+ type: "text",
1096
+ value
1097
+ });
1098
+ continue;
1099
+ }
1100
+ const type = "close";
1101
+ block = stack.pop();
1102
+ block.close = true;
1103
+ push({
1104
+ type,
1105
+ value
1106
+ });
1107
+ depth--;
1108
+ block = stack[stack.length - 1];
1109
+ continue;
1110
+ }
1111
+ if (value === CHAR_COMMA && depth > 0) {
1112
+ if (block.ranges > 0) {
1113
+ block.ranges = 0;
1114
+ const open = block.nodes.shift();
1115
+ block.nodes = [
1116
+ open,
1117
+ {
1118
+ type: "text",
1119
+ value: stringify(block)
1120
+ }
1121
+ ];
1122
+ }
1123
+ push({
1124
+ type: "comma",
1125
+ value
1126
+ });
1127
+ block.commas++;
1128
+ continue;
1129
+ }
1130
+ if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
1131
+ const siblings = block.nodes;
1132
+ if (depth === 0 || siblings.length === 0) {
1133
+ push({
1134
+ type: "text",
1135
+ value
1136
+ });
1137
+ continue;
1138
+ }
1139
+ if (prev.type === "dot") {
1140
+ block.range = [];
1141
+ prev.value += value;
1142
+ prev.type = "range";
1143
+ if (block.nodes.length !== 3 && block.nodes.length !== 5) {
1144
+ block.invalid = true;
1145
+ block.ranges = 0;
1146
+ prev.type = "text";
1147
+ continue;
1148
+ }
1149
+ block.ranges++;
1150
+ block.args = [];
1151
+ continue;
1152
+ }
1153
+ if (prev.type === "range") {
1154
+ siblings.pop();
1155
+ const before = siblings[siblings.length - 1];
1156
+ before.value += prev.value + value;
1157
+ prev = before;
1158
+ block.ranges--;
1159
+ continue;
1160
+ }
1161
+ push({
1162
+ type: "dot",
1163
+ value
1164
+ });
1165
+ continue;
1166
+ }
1167
+ push({
1168
+ type: "text",
1169
+ value
1170
+ });
1171
+ }
1172
+ do {
1173
+ block = stack.pop();
1174
+ if (block.type !== "root") {
1175
+ block.nodes.forEach((node) => {
1176
+ if (!node.nodes) {
1177
+ if (node.type === "open") node.isOpen = true;
1178
+ if (node.type === "close") node.isClose = true;
1179
+ if (!node.nodes) node.type = "text";
1180
+ node.invalid = true;
1181
+ }
1182
+ });
1183
+ const parent = stack[stack.length - 1];
1184
+ const index2 = parent.nodes.indexOf(block);
1185
+ parent.nodes.splice(index2, 1, ...block.nodes);
1186
+ }
1187
+ } while (stack.length > 0);
1188
+ push({
1189
+ type: "eos"
1190
+ });
1191
+ return ast;
1192
+ }, "parse");
1193
+ module.exports = parse;
1194
+ }
1195
+ });
1196
+
1197
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js
1198
+ var require_braces = __commonJS({
1199
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js"(exports$1, module) {
1200
+ init_esm_shims();
1201
+ var stringify = require_stringify();
1202
+ var compile = require_compile();
1203
+ var expand = require_expand();
1204
+ var parse = require_parse();
1205
+ var braces = /* @__PURE__ */ __name((input, options = {}) => {
1206
+ let output = [];
1207
+ if (Array.isArray(input)) {
1208
+ for (const pattern of input) {
1209
+ const result = braces.create(pattern, options);
1210
+ if (Array.isArray(result)) {
1211
+ output.push(...result);
1212
+ } else {
1213
+ output.push(result);
1214
+ }
1215
+ }
1216
+ } else {
1217
+ output = [].concat(braces.create(input, options));
1218
+ }
1219
+ if (options && options.expand === true && options.nodupes === true) {
1220
+ output = [
1221
+ ...new Set(output)
1222
+ ];
1223
+ }
1224
+ return output;
1225
+ }, "braces");
1226
+ braces.parse = (input, options = {}) => parse(input, options);
1227
+ braces.stringify = (input, options = {}) => {
1228
+ if (typeof input === "string") {
1229
+ return stringify(braces.parse(input, options), options);
1230
+ }
1231
+ return stringify(input, options);
1232
+ };
1233
+ braces.compile = (input, options = {}) => {
1234
+ if (typeof input === "string") {
1235
+ input = braces.parse(input, options);
1236
+ }
1237
+ return compile(input, options);
1238
+ };
1239
+ braces.expand = (input, options = {}) => {
1240
+ if (typeof input === "string") {
1241
+ input = braces.parse(input, options);
1242
+ }
1243
+ let result = expand(input, options);
1244
+ if (options.noempty === true) {
1245
+ result = result.filter(Boolean);
1246
+ }
1247
+ if (options.nodupes === true) {
1248
+ result = [
1249
+ ...new Set(result)
1250
+ ];
1251
+ }
1252
+ return result;
1253
+ };
1254
+ braces.create = (input, options = {}) => {
1255
+ if (input === "" || input.length < 3) {
1256
+ return [
1257
+ input
1258
+ ];
1259
+ }
1260
+ return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options);
1261
+ };
1262
+ module.exports = braces;
1263
+ }
1264
+ });
1265
+
1266
+ // ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
1267
+ var require_constants2 = __commonJS({
1268
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"(exports$1, module) {
1269
+ init_esm_shims();
1270
+ var path = __require("path");
1271
+ var WIN_SLASH = "\\\\/";
1272
+ var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1273
+ var DOT_LITERAL = "\\.";
1274
+ var PLUS_LITERAL = "\\+";
1275
+ var QMARK_LITERAL = "\\?";
1276
+ var SLASH_LITERAL = "\\/";
1277
+ var ONE_CHAR = "(?=.)";
1278
+ var QMARK = "[^/]";
1279
+ var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
1280
+ var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
1281
+ var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
1282
+ var NO_DOT = `(?!${DOT_LITERAL})`;
1283
+ var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
1284
+ var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
1285
+ var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
1286
+ var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
1287
+ var STAR = `${QMARK}*?`;
1288
+ var POSIX_CHARS = {
1289
+ DOT_LITERAL,
1290
+ PLUS_LITERAL,
1291
+ QMARK_LITERAL,
1292
+ SLASH_LITERAL,
1293
+ ONE_CHAR,
1294
+ QMARK,
1295
+ END_ANCHOR,
1296
+ DOTS_SLASH,
1297
+ NO_DOT,
1298
+ NO_DOTS,
1299
+ NO_DOT_SLASH,
1300
+ NO_DOTS_SLASH,
1301
+ QMARK_NO_DOT,
1302
+ STAR,
1303
+ START_ANCHOR
1304
+ };
1305
+ var WINDOWS_CHARS = {
1306
+ ...POSIX_CHARS,
1307
+ SLASH_LITERAL: `[${WIN_SLASH}]`,
1308
+ QMARK: WIN_NO_SLASH,
1309
+ STAR: `${WIN_NO_SLASH}*?`,
1310
+ DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
1311
+ NO_DOT: `(?!${DOT_LITERAL})`,
1312
+ NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
1313
+ NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
1314
+ NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
1315
+ QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
1316
+ START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
1317
+ END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
1318
+ };
1319
+ var POSIX_REGEX_SOURCE = {
1320
+ alnum: "a-zA-Z0-9",
1321
+ alpha: "a-zA-Z",
1322
+ ascii: "\\x00-\\x7F",
1323
+ blank: " \\t",
1324
+ cntrl: "\\x00-\\x1F\\x7F",
1325
+ digit: "0-9",
1326
+ graph: "\\x21-\\x7E",
1327
+ lower: "a-z",
1328
+ print: "\\x20-\\x7E ",
1329
+ punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
1330
+ space: " \\t\\r\\n\\v\\f",
1331
+ upper: "A-Z",
1332
+ word: "A-Za-z0-9_",
1333
+ xdigit: "A-Fa-f0-9"
1334
+ };
1335
+ module.exports = {
1336
+ MAX_LENGTH: 1024 * 64,
1337
+ POSIX_REGEX_SOURCE,
1338
+ // regular expressions
1339
+ REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
1340
+ REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
1341
+ REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
1342
+ REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
1343
+ REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
1344
+ REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
1345
+ // Replace globs with equivalent patterns to reduce parsing time.
1346
+ REPLACEMENTS: {
1347
+ "***": "*",
1348
+ "**/**": "**",
1349
+ "**/**/**": "**"
1350
+ },
1351
+ // Digits
1352
+ CHAR_0: 48,
1353
+ /* 0 */
1354
+ CHAR_9: 57,
1355
+ /* 9 */
1356
+ // Alphabet chars.
1357
+ CHAR_UPPERCASE_A: 65,
1358
+ /* A */
1359
+ CHAR_LOWERCASE_A: 97,
1360
+ /* a */
1361
+ CHAR_UPPERCASE_Z: 90,
1362
+ /* Z */
1363
+ CHAR_LOWERCASE_Z: 122,
1364
+ /* z */
1365
+ CHAR_LEFT_PARENTHESES: 40,
1366
+ /* ( */
1367
+ CHAR_RIGHT_PARENTHESES: 41,
1368
+ /* ) */
1369
+ CHAR_ASTERISK: 42,
1370
+ /* * */
1371
+ // Non-alphabetic chars.
1372
+ CHAR_AMPERSAND: 38,
1373
+ /* & */
1374
+ CHAR_AT: 64,
1375
+ /* @ */
1376
+ CHAR_BACKWARD_SLASH: 92,
1377
+ /* \ */
1378
+ CHAR_CARRIAGE_RETURN: 13,
1379
+ /* \r */
1380
+ CHAR_CIRCUMFLEX_ACCENT: 94,
1381
+ /* ^ */
1382
+ CHAR_COLON: 58,
1383
+ /* : */
1384
+ CHAR_COMMA: 44,
1385
+ /* , */
1386
+ CHAR_DOT: 46,
1387
+ /* . */
1388
+ CHAR_DOUBLE_QUOTE: 34,
1389
+ /* " */
1390
+ CHAR_EQUAL: 61,
1391
+ /* = */
1392
+ CHAR_EXCLAMATION_MARK: 33,
1393
+ /* ! */
1394
+ CHAR_FORM_FEED: 12,
1395
+ /* \f */
1396
+ CHAR_FORWARD_SLASH: 47,
1397
+ /* / */
1398
+ CHAR_GRAVE_ACCENT: 96,
1399
+ /* ` */
1400
+ CHAR_HASH: 35,
1401
+ /* # */
1402
+ CHAR_HYPHEN_MINUS: 45,
1403
+ /* - */
1404
+ CHAR_LEFT_ANGLE_BRACKET: 60,
1405
+ /* < */
1406
+ CHAR_LEFT_CURLY_BRACE: 123,
1407
+ /* { */
1408
+ CHAR_LEFT_SQUARE_BRACKET: 91,
1409
+ /* [ */
1410
+ CHAR_LINE_FEED: 10,
1411
+ /* \n */
1412
+ CHAR_NO_BREAK_SPACE: 160,
1413
+ /* \u00A0 */
1414
+ CHAR_PERCENT: 37,
1415
+ /* % */
1416
+ CHAR_PLUS: 43,
1417
+ /* + */
1418
+ CHAR_QUESTION_MARK: 63,
1419
+ /* ? */
1420
+ CHAR_RIGHT_ANGLE_BRACKET: 62,
1421
+ /* > */
1422
+ CHAR_RIGHT_CURLY_BRACE: 125,
1423
+ /* } */
1424
+ CHAR_RIGHT_SQUARE_BRACKET: 93,
1425
+ /* ] */
1426
+ CHAR_SEMICOLON: 59,
1427
+ /* ; */
1428
+ CHAR_SINGLE_QUOTE: 39,
1429
+ /* ' */
1430
+ CHAR_SPACE: 32,
1431
+ /* */
1432
+ CHAR_TAB: 9,
1433
+ /* \t */
1434
+ CHAR_UNDERSCORE: 95,
1435
+ /* _ */
1436
+ CHAR_VERTICAL_LINE: 124,
1437
+ /* | */
1438
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
1439
+ /* \uFEFF */
1440
+ SEP: path.sep,
1441
+ /**
1442
+ * Create EXTGLOB_CHARS
1443
+ */
1444
+ extglobChars(chars) {
1445
+ return {
1446
+ "!": {
1447
+ type: "negate",
1448
+ open: "(?:(?!(?:",
1449
+ close: `))${chars.STAR})`
1450
+ },
1451
+ "?": {
1452
+ type: "qmark",
1453
+ open: "(?:",
1454
+ close: ")?"
1455
+ },
1456
+ "+": {
1457
+ type: "plus",
1458
+ open: "(?:",
1459
+ close: ")+"
1460
+ },
1461
+ "*": {
1462
+ type: "star",
1463
+ open: "(?:",
1464
+ close: ")*"
1465
+ },
1466
+ "@": {
1467
+ type: "at",
1468
+ open: "(?:",
1469
+ close: ")"
1470
+ }
1471
+ };
1472
+ },
1473
+ /**
1474
+ * Create GLOB_CHARS
1475
+ */
1476
+ globChars(win32) {
1477
+ return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
1478
+ }
1479
+ };
1480
+ }
1481
+ });
1482
+
1483
+ // ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js
1484
+ var require_utils2 = __commonJS({
1485
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"(exports$1) {
1486
+ init_esm_shims();
1487
+ var path = __require("path");
1488
+ var win32 = process.platform === "win32";
1489
+ var { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants2();
1490
+ exports$1.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
1491
+ exports$1.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
1492
+ exports$1.isRegexChar = (str) => str.length === 1 && exports$1.hasRegexChars(str);
1493
+ exports$1.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
1494
+ exports$1.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
1495
+ exports$1.removeBackslashes = (str) => {
1496
+ return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
1497
+ return match === "\\" ? "" : match;
1498
+ });
1499
+ };
1500
+ exports$1.supportsLookbehinds = () => {
1501
+ const segs = process.version.slice(1).split(".").map(Number);
1502
+ if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) {
1503
+ return true;
1504
+ }
1505
+ return false;
1506
+ };
1507
+ exports$1.isWindows = (options) => {
1508
+ if (options && typeof options.windows === "boolean") {
1509
+ return options.windows;
1510
+ }
1511
+ return win32 === true || path.sep === "\\";
1512
+ };
1513
+ exports$1.escapeLast = (input, char, lastIdx) => {
1514
+ const idx = input.lastIndexOf(char, lastIdx);
1515
+ if (idx === -1) return input;
1516
+ if (input[idx - 1] === "\\") return exports$1.escapeLast(input, char, idx - 1);
1517
+ return `${input.slice(0, idx)}\\${input.slice(idx)}`;
1518
+ };
1519
+ exports$1.removePrefix = (input, state = {}) => {
1520
+ let output = input;
1521
+ if (output.startsWith("./")) {
1522
+ output = output.slice(2);
1523
+ state.prefix = "./";
1524
+ }
1525
+ return output;
1526
+ };
1527
+ exports$1.wrapOutput = (input, state = {}, options = {}) => {
1528
+ const prepend = options.contains ? "" : "^";
1529
+ const append = options.contains ? "" : "$";
1530
+ let output = `${prepend}(?:${input})${append}`;
1531
+ if (state.negated === true) {
1532
+ output = `(?:^(?!${output}).*$)`;
1533
+ }
1534
+ return output;
1535
+ };
1536
+ }
1537
+ });
1538
+
1539
+ // ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js
1540
+ var require_scan = __commonJS({
1541
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js"(exports$1, module) {
1542
+ init_esm_shims();
1543
+ var utils = require_utils2();
1544
+ var {
1545
+ CHAR_ASTERISK,
1546
+ /* * */
1547
+ CHAR_AT,
1548
+ /* @ */
1549
+ CHAR_BACKWARD_SLASH,
1550
+ /* \ */
1551
+ CHAR_COMMA,
1552
+ /* , */
1553
+ CHAR_DOT,
1554
+ /* . */
1555
+ CHAR_EXCLAMATION_MARK,
1556
+ /* ! */
1557
+ CHAR_FORWARD_SLASH,
1558
+ /* / */
1559
+ CHAR_LEFT_CURLY_BRACE,
1560
+ /* { */
1561
+ CHAR_LEFT_PARENTHESES,
1562
+ /* ( */
1563
+ CHAR_LEFT_SQUARE_BRACKET,
1564
+ /* [ */
1565
+ CHAR_PLUS,
1566
+ /* + */
1567
+ CHAR_QUESTION_MARK,
1568
+ /* ? */
1569
+ CHAR_RIGHT_CURLY_BRACE,
1570
+ /* } */
1571
+ CHAR_RIGHT_PARENTHESES,
1572
+ /* ) */
1573
+ CHAR_RIGHT_SQUARE_BRACKET
1574
+ /* ] */
1575
+ } = require_constants2();
1576
+ var isPathSeparator = /* @__PURE__ */ __name((code) => {
1577
+ return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
1578
+ }, "isPathSeparator");
1579
+ var depth = /* @__PURE__ */ __name((token) => {
1580
+ if (token.isPrefix !== true) {
1581
+ token.depth = token.isGlobstar ? Infinity : 1;
1582
+ }
1583
+ }, "depth");
1584
+ var scan = /* @__PURE__ */ __name((input, options) => {
1585
+ const opts = options || {};
1586
+ const length = input.length - 1;
1587
+ const scanToEnd = opts.parts === true || opts.scanToEnd === true;
1588
+ const slashes = [];
1589
+ const tokens = [];
1590
+ const parts = [];
1591
+ let str = input;
1592
+ let index = -1;
1593
+ let start = 0;
1594
+ let lastIndex = 0;
1595
+ let isBrace = false;
1596
+ let isBracket = false;
1597
+ let isGlob = false;
1598
+ let isExtglob = false;
1599
+ let isGlobstar = false;
1600
+ let braceEscaped = false;
1601
+ let backslashes = false;
1602
+ let negated = false;
1603
+ let negatedExtglob = false;
1604
+ let finished = false;
1605
+ let braces = 0;
1606
+ let prev;
1607
+ let code;
1608
+ let token = {
1609
+ value: "",
1610
+ depth: 0,
1611
+ isGlob: false
1612
+ };
1613
+ const eos = /* @__PURE__ */ __name(() => index >= length, "eos");
1614
+ const peek = /* @__PURE__ */ __name(() => str.charCodeAt(index + 1), "peek");
1615
+ const advance = /* @__PURE__ */ __name(() => {
1616
+ prev = code;
1617
+ return str.charCodeAt(++index);
1618
+ }, "advance");
1619
+ while (index < length) {
1620
+ code = advance();
1621
+ let next;
1622
+ if (code === CHAR_BACKWARD_SLASH) {
1623
+ backslashes = token.backslashes = true;
1624
+ code = advance();
1625
+ if (code === CHAR_LEFT_CURLY_BRACE) {
1626
+ braceEscaped = true;
1627
+ }
1628
+ continue;
1629
+ }
1630
+ if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
1631
+ braces++;
1632
+ while (eos() !== true && (code = advance())) {
1633
+ if (code === CHAR_BACKWARD_SLASH) {
1634
+ backslashes = token.backslashes = true;
1635
+ advance();
1636
+ continue;
1637
+ }
1638
+ if (code === CHAR_LEFT_CURLY_BRACE) {
1639
+ braces++;
1640
+ continue;
1641
+ }
1642
+ if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
1643
+ isBrace = token.isBrace = true;
1644
+ isGlob = token.isGlob = true;
1645
+ finished = true;
1646
+ if (scanToEnd === true) {
1647
+ continue;
1648
+ }
1649
+ break;
1650
+ }
1651
+ if (braceEscaped !== true && code === CHAR_COMMA) {
1652
+ isBrace = token.isBrace = true;
1653
+ isGlob = token.isGlob = true;
1654
+ finished = true;
1655
+ if (scanToEnd === true) {
1656
+ continue;
1657
+ }
1658
+ break;
1659
+ }
1660
+ if (code === CHAR_RIGHT_CURLY_BRACE) {
1661
+ braces--;
1662
+ if (braces === 0) {
1663
+ braceEscaped = false;
1664
+ isBrace = token.isBrace = true;
1665
+ finished = true;
1666
+ break;
1667
+ }
1668
+ }
1669
+ }
1670
+ if (scanToEnd === true) {
1671
+ continue;
1672
+ }
1673
+ break;
1674
+ }
1675
+ if (code === CHAR_FORWARD_SLASH) {
1676
+ slashes.push(index);
1677
+ tokens.push(token);
1678
+ token = {
1679
+ value: "",
1680
+ depth: 0,
1681
+ isGlob: false
1682
+ };
1683
+ if (finished === true) continue;
1684
+ if (prev === CHAR_DOT && index === start + 1) {
1685
+ start += 2;
1686
+ continue;
1687
+ }
1688
+ lastIndex = index + 1;
1689
+ continue;
1690
+ }
1691
+ if (opts.noext !== true) {
1692
+ const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
1693
+ if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
1694
+ isGlob = token.isGlob = true;
1695
+ isExtglob = token.isExtglob = true;
1696
+ finished = true;
1697
+ if (code === CHAR_EXCLAMATION_MARK && index === start) {
1698
+ negatedExtglob = true;
1699
+ }
1700
+ if (scanToEnd === true) {
1701
+ while (eos() !== true && (code = advance())) {
1702
+ if (code === CHAR_BACKWARD_SLASH) {
1703
+ backslashes = token.backslashes = true;
1704
+ code = advance();
1705
+ continue;
1706
+ }
1707
+ if (code === CHAR_RIGHT_PARENTHESES) {
1708
+ isGlob = token.isGlob = true;
1709
+ finished = true;
1710
+ break;
1711
+ }
1712
+ }
1713
+ continue;
1714
+ }
1715
+ break;
1716
+ }
1717
+ }
1718
+ if (code === CHAR_ASTERISK) {
1719
+ if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
1720
+ isGlob = token.isGlob = true;
1721
+ finished = true;
1722
+ if (scanToEnd === true) {
1723
+ continue;
1724
+ }
1725
+ break;
1726
+ }
1727
+ if (code === CHAR_QUESTION_MARK) {
1728
+ isGlob = token.isGlob = true;
1729
+ finished = true;
1730
+ if (scanToEnd === true) {
1731
+ continue;
1732
+ }
1733
+ break;
1734
+ }
1735
+ if (code === CHAR_LEFT_SQUARE_BRACKET) {
1736
+ while (eos() !== true && (next = advance())) {
1737
+ if (next === CHAR_BACKWARD_SLASH) {
1738
+ backslashes = token.backslashes = true;
1739
+ advance();
1740
+ continue;
1741
+ }
1742
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
1743
+ isBracket = token.isBracket = true;
1744
+ isGlob = token.isGlob = true;
1745
+ finished = true;
1746
+ break;
1747
+ }
1748
+ }
1749
+ if (scanToEnd === true) {
1750
+ continue;
1751
+ }
1752
+ break;
1753
+ }
1754
+ if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
1755
+ negated = token.negated = true;
1756
+ start++;
1757
+ continue;
1758
+ }
1759
+ if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
1760
+ isGlob = token.isGlob = true;
1761
+ if (scanToEnd === true) {
1762
+ while (eos() !== true && (code = advance())) {
1763
+ if (code === CHAR_LEFT_PARENTHESES) {
1764
+ backslashes = token.backslashes = true;
1765
+ code = advance();
1766
+ continue;
1767
+ }
1768
+ if (code === CHAR_RIGHT_PARENTHESES) {
1769
+ finished = true;
1770
+ break;
1771
+ }
1772
+ }
1773
+ continue;
1774
+ }
1775
+ break;
1776
+ }
1777
+ if (isGlob === true) {
1778
+ finished = true;
1779
+ if (scanToEnd === true) {
1780
+ continue;
1781
+ }
1782
+ break;
1783
+ }
1784
+ }
1785
+ if (opts.noext === true) {
1786
+ isExtglob = false;
1787
+ isGlob = false;
1788
+ }
1789
+ let base = str;
1790
+ let prefix = "";
1791
+ let glob = "";
1792
+ if (start > 0) {
1793
+ prefix = str.slice(0, start);
1794
+ str = str.slice(start);
1795
+ lastIndex -= start;
1796
+ }
1797
+ if (base && isGlob === true && lastIndex > 0) {
1798
+ base = str.slice(0, lastIndex);
1799
+ glob = str.slice(lastIndex);
1800
+ } else if (isGlob === true) {
1801
+ base = "";
1802
+ glob = str;
1803
+ } else {
1804
+ base = str;
1805
+ }
1806
+ if (base && base !== "" && base !== "/" && base !== str) {
1807
+ if (isPathSeparator(base.charCodeAt(base.length - 1))) {
1808
+ base = base.slice(0, -1);
1809
+ }
1810
+ }
1811
+ if (opts.unescape === true) {
1812
+ if (glob) glob = utils.removeBackslashes(glob);
1813
+ if (base && backslashes === true) {
1814
+ base = utils.removeBackslashes(base);
1815
+ }
1816
+ }
1817
+ const state = {
1818
+ prefix,
1819
+ input,
1820
+ start,
1821
+ base,
1822
+ glob,
1823
+ isBrace,
1824
+ isBracket,
1825
+ isGlob,
1826
+ isExtglob,
1827
+ isGlobstar,
1828
+ negated,
1829
+ negatedExtglob
1830
+ };
1831
+ if (opts.tokens === true) {
1832
+ state.maxDepth = 0;
1833
+ if (!isPathSeparator(code)) {
1834
+ tokens.push(token);
1835
+ }
1836
+ state.tokens = tokens;
1837
+ }
1838
+ if (opts.parts === true || opts.tokens === true) {
1839
+ let prevIndex;
1840
+ for (let idx = 0; idx < slashes.length; idx++) {
1841
+ const n = prevIndex ? prevIndex + 1 : start;
1842
+ const i = slashes[idx];
1843
+ const value = input.slice(n, i);
1844
+ if (opts.tokens) {
1845
+ if (idx === 0 && start !== 0) {
1846
+ tokens[idx].isPrefix = true;
1847
+ tokens[idx].value = prefix;
1848
+ } else {
1849
+ tokens[idx].value = value;
1850
+ }
1851
+ depth(tokens[idx]);
1852
+ state.maxDepth += tokens[idx].depth;
1853
+ }
1854
+ if (idx !== 0 || value !== "") {
1855
+ parts.push(value);
1856
+ }
1857
+ prevIndex = i;
1858
+ }
1859
+ if (prevIndex && prevIndex + 1 < input.length) {
1860
+ const value = input.slice(prevIndex + 1);
1861
+ parts.push(value);
1862
+ if (opts.tokens) {
1863
+ tokens[tokens.length - 1].value = value;
1864
+ depth(tokens[tokens.length - 1]);
1865
+ state.maxDepth += tokens[tokens.length - 1].depth;
1866
+ }
1867
+ }
1868
+ state.slashes = slashes;
1869
+ state.parts = parts;
1870
+ }
1871
+ return state;
1872
+ }, "scan");
1873
+ module.exports = scan;
1874
+ }
1875
+ });
1876
+
1877
+ // ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js
1878
+ var require_parse2 = __commonJS({
1879
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js"(exports$1, module) {
1880
+ init_esm_shims();
1881
+ var constants = require_constants2();
1882
+ var utils = require_utils2();
1883
+ var { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants;
1884
+ var expandRange = /* @__PURE__ */ __name((args, options) => {
1885
+ if (typeof options.expandRange === "function") {
1886
+ return options.expandRange(...args, options);
1887
+ }
1888
+ args.sort();
1889
+ const value = `[${args.join("-")}]`;
1890
+ try {
1891
+ new RegExp(value);
1892
+ } catch (ex) {
1893
+ return args.map((v) => utils.escapeRegex(v)).join("..");
1894
+ }
1895
+ return value;
1896
+ }, "expandRange");
1897
+ var syntaxError = /* @__PURE__ */ __name((type, char) => {
1898
+ return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
1899
+ }, "syntaxError");
1900
+ var parse = /* @__PURE__ */ __name((input, options) => {
1901
+ if (typeof input !== "string") {
1902
+ throw new TypeError("Expected a string");
1903
+ }
1904
+ input = REPLACEMENTS[input] || input;
1905
+ const opts = {
1906
+ ...options
1907
+ };
1908
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
1909
+ let len = input.length;
1910
+ if (len > max) {
1911
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
1912
+ }
1913
+ const bos = {
1914
+ type: "bos",
1915
+ value: "",
1916
+ output: opts.prepend || ""
1917
+ };
1918
+ const tokens = [
1919
+ bos
1920
+ ];
1921
+ const capture = opts.capture ? "" : "?:";
1922
+ const win32 = utils.isWindows(options);
1923
+ const PLATFORM_CHARS = constants.globChars(win32);
1924
+ const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
1925
+ const { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS;
1926
+ const globstar = /* @__PURE__ */ __name((opts2) => {
1927
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
1928
+ }, "globstar");
1929
+ const nodot = opts.dot ? "" : NO_DOT;
1930
+ const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
1931
+ let star = opts.bash === true ? globstar(opts) : STAR;
1932
+ if (opts.capture) {
1933
+ star = `(${star})`;
1934
+ }
1935
+ if (typeof opts.noext === "boolean") {
1936
+ opts.noextglob = opts.noext;
1937
+ }
1938
+ const state = {
1939
+ input,
1940
+ index: -1,
1941
+ start: 0,
1942
+ dot: opts.dot === true,
1943
+ consumed: "",
1944
+ output: "",
1945
+ prefix: "",
1946
+ backtrack: false,
1947
+ negated: false,
1948
+ brackets: 0,
1949
+ braces: 0,
1950
+ parens: 0,
1951
+ quotes: 0,
1952
+ globstar: false,
1953
+ tokens
1954
+ };
1955
+ input = utils.removePrefix(input, state);
1956
+ len = input.length;
1957
+ const extglobs = [];
1958
+ const braces = [];
1959
+ const stack = [];
1960
+ let prev = bos;
1961
+ let value;
1962
+ const eos = /* @__PURE__ */ __name(() => state.index === len - 1, "eos");
1963
+ const peek = state.peek = (n = 1) => input[state.index + n];
1964
+ const advance = state.advance = () => input[++state.index] || "";
1965
+ const remaining = /* @__PURE__ */ __name(() => input.slice(state.index + 1), "remaining");
1966
+ const consume = /* @__PURE__ */ __name((value2 = "", num = 0) => {
1967
+ state.consumed += value2;
1968
+ state.index += num;
1969
+ }, "consume");
1970
+ const append = /* @__PURE__ */ __name((token) => {
1971
+ state.output += token.output != null ? token.output : token.value;
1972
+ consume(token.value);
1973
+ }, "append");
1974
+ const negate = /* @__PURE__ */ __name(() => {
1975
+ let count = 1;
1976
+ while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
1977
+ advance();
1978
+ state.start++;
1979
+ count++;
1980
+ }
1981
+ if (count % 2 === 0) {
1982
+ return false;
1983
+ }
1984
+ state.negated = true;
1985
+ state.start++;
1986
+ return true;
1987
+ }, "negate");
1988
+ const increment = /* @__PURE__ */ __name((type) => {
1989
+ state[type]++;
1990
+ stack.push(type);
1991
+ }, "increment");
1992
+ const decrement = /* @__PURE__ */ __name((type) => {
1993
+ state[type]--;
1994
+ stack.pop();
1995
+ }, "decrement");
1996
+ const push = /* @__PURE__ */ __name((tok) => {
1997
+ if (prev.type === "globstar") {
1998
+ const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
1999
+ const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
2000
+ if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
2001
+ state.output = state.output.slice(0, -prev.output.length);
2002
+ prev.type = "star";
2003
+ prev.value = "*";
2004
+ prev.output = star;
2005
+ state.output += prev.output;
2006
+ }
2007
+ }
2008
+ if (extglobs.length && tok.type !== "paren") {
2009
+ extglobs[extglobs.length - 1].inner += tok.value;
2010
+ }
2011
+ if (tok.value || tok.output) append(tok);
2012
+ if (prev && prev.type === "text" && tok.type === "text") {
2013
+ prev.value += tok.value;
2014
+ prev.output = (prev.output || "") + tok.value;
2015
+ return;
2016
+ }
2017
+ tok.prev = prev;
2018
+ tokens.push(tok);
2019
+ prev = tok;
2020
+ }, "push");
2021
+ const extglobOpen = /* @__PURE__ */ __name((type, value2) => {
2022
+ const token = {
2023
+ ...EXTGLOB_CHARS[value2],
2024
+ conditions: 1,
2025
+ inner: ""
2026
+ };
2027
+ token.prev = prev;
2028
+ token.parens = state.parens;
2029
+ token.output = state.output;
2030
+ const output = (opts.capture ? "(" : "") + token.open;
2031
+ increment("parens");
2032
+ push({
2033
+ type,
2034
+ value: value2,
2035
+ output: state.output ? "" : ONE_CHAR
2036
+ });
2037
+ push({
2038
+ type: "paren",
2039
+ extglob: true,
2040
+ value: advance(),
2041
+ output
2042
+ });
2043
+ extglobs.push(token);
2044
+ }, "extglobOpen");
2045
+ const extglobClose = /* @__PURE__ */ __name((token) => {
2046
+ let output = token.close + (opts.capture ? ")" : "");
2047
+ let rest;
2048
+ if (token.type === "negate") {
2049
+ let extglobStar = star;
2050
+ if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
2051
+ extglobStar = globstar(opts);
2052
+ }
2053
+ if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
2054
+ output = token.close = `)$))${extglobStar}`;
2055
+ }
2056
+ if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
2057
+ const expression = parse(rest, {
2058
+ ...options,
2059
+ fastpaths: false
2060
+ }).output;
2061
+ output = token.close = `)${expression})${extglobStar})`;
2062
+ }
2063
+ if (token.prev.type === "bos") {
2064
+ state.negatedExtglob = true;
2065
+ }
2066
+ }
2067
+ push({
2068
+ type: "paren",
2069
+ extglob: true,
2070
+ value,
2071
+ output
2072
+ });
2073
+ decrement("parens");
2074
+ }, "extglobClose");
2075
+ if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
2076
+ let backslashes = false;
2077
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
2078
+ if (first === "\\") {
2079
+ backslashes = true;
2080
+ return m;
2081
+ }
2082
+ if (first === "?") {
2083
+ if (esc) {
2084
+ return esc + first + (rest ? QMARK.repeat(rest.length) : "");
2085
+ }
2086
+ if (index === 0) {
2087
+ return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
2088
+ }
2089
+ return QMARK.repeat(chars.length);
2090
+ }
2091
+ if (first === ".") {
2092
+ return DOT_LITERAL.repeat(chars.length);
2093
+ }
2094
+ if (first === "*") {
2095
+ if (esc) {
2096
+ return esc + first + (rest ? star : "");
2097
+ }
2098
+ return star;
2099
+ }
2100
+ return esc ? m : `\\${m}`;
2101
+ });
2102
+ if (backslashes === true) {
2103
+ if (opts.unescape === true) {
2104
+ output = output.replace(/\\/g, "");
2105
+ } else {
2106
+ output = output.replace(/\\+/g, (m) => {
2107
+ return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
2108
+ });
2109
+ }
2110
+ }
2111
+ if (output === input && opts.contains === true) {
2112
+ state.output = input;
2113
+ return state;
2114
+ }
2115
+ state.output = utils.wrapOutput(output, state, options);
2116
+ return state;
2117
+ }
2118
+ while (!eos()) {
2119
+ value = advance();
2120
+ if (value === "\0") {
2121
+ continue;
2122
+ }
2123
+ if (value === "\\") {
2124
+ const next = peek();
2125
+ if (next === "/" && opts.bash !== true) {
2126
+ continue;
2127
+ }
2128
+ if (next === "." || next === ";") {
2129
+ continue;
2130
+ }
2131
+ if (!next) {
2132
+ value += "\\";
2133
+ push({
2134
+ type: "text",
2135
+ value
2136
+ });
2137
+ continue;
2138
+ }
2139
+ const match = /^\\+/.exec(remaining());
2140
+ let slashes = 0;
2141
+ if (match && match[0].length > 2) {
2142
+ slashes = match[0].length;
2143
+ state.index += slashes;
2144
+ if (slashes % 2 !== 0) {
2145
+ value += "\\";
2146
+ }
2147
+ }
2148
+ if (opts.unescape === true) {
2149
+ value = advance();
2150
+ } else {
2151
+ value += advance();
2152
+ }
2153
+ if (state.brackets === 0) {
2154
+ push({
2155
+ type: "text",
2156
+ value
2157
+ });
2158
+ continue;
2159
+ }
2160
+ }
2161
+ if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
2162
+ if (opts.posix !== false && value === ":") {
2163
+ const inner = prev.value.slice(1);
2164
+ if (inner.includes("[")) {
2165
+ prev.posix = true;
2166
+ if (inner.includes(":")) {
2167
+ const idx = prev.value.lastIndexOf("[");
2168
+ const pre = prev.value.slice(0, idx);
2169
+ const rest2 = prev.value.slice(idx + 2);
2170
+ const posix = POSIX_REGEX_SOURCE[rest2];
2171
+ if (posix) {
2172
+ prev.value = pre + posix;
2173
+ state.backtrack = true;
2174
+ advance();
2175
+ if (!bos.output && tokens.indexOf(prev) === 1) {
2176
+ bos.output = ONE_CHAR;
2177
+ }
2178
+ continue;
2179
+ }
2180
+ }
2181
+ }
2182
+ }
2183
+ if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
2184
+ value = `\\${value}`;
2185
+ }
2186
+ if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
2187
+ value = `\\${value}`;
2188
+ }
2189
+ if (opts.posix === true && value === "!" && prev.value === "[") {
2190
+ value = "^";
2191
+ }
2192
+ prev.value += value;
2193
+ append({
2194
+ value
2195
+ });
2196
+ continue;
2197
+ }
2198
+ if (state.quotes === 1 && value !== '"') {
2199
+ value = utils.escapeRegex(value);
2200
+ prev.value += value;
2201
+ append({
2202
+ value
2203
+ });
2204
+ continue;
2205
+ }
2206
+ if (value === '"') {
2207
+ state.quotes = state.quotes === 1 ? 0 : 1;
2208
+ if (opts.keepQuotes === true) {
2209
+ push({
2210
+ type: "text",
2211
+ value
2212
+ });
2213
+ }
2214
+ continue;
2215
+ }
2216
+ if (value === "(") {
2217
+ increment("parens");
2218
+ push({
2219
+ type: "paren",
2220
+ value
2221
+ });
2222
+ continue;
2223
+ }
2224
+ if (value === ")") {
2225
+ if (state.parens === 0 && opts.strictBrackets === true) {
2226
+ throw new SyntaxError(syntaxError("opening", "("));
2227
+ }
2228
+ const extglob = extglobs[extglobs.length - 1];
2229
+ if (extglob && state.parens === extglob.parens + 1) {
2230
+ extglobClose(extglobs.pop());
2231
+ continue;
2232
+ }
2233
+ push({
2234
+ type: "paren",
2235
+ value,
2236
+ output: state.parens ? ")" : "\\)"
2237
+ });
2238
+ decrement("parens");
2239
+ continue;
2240
+ }
2241
+ if (value === "[") {
2242
+ if (opts.nobracket === true || !remaining().includes("]")) {
2243
+ if (opts.nobracket !== true && opts.strictBrackets === true) {
2244
+ throw new SyntaxError(syntaxError("closing", "]"));
2245
+ }
2246
+ value = `\\${value}`;
2247
+ } else {
2248
+ increment("brackets");
2249
+ }
2250
+ push({
2251
+ type: "bracket",
2252
+ value
2253
+ });
2254
+ continue;
2255
+ }
2256
+ if (value === "]") {
2257
+ if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
2258
+ push({
2259
+ type: "text",
2260
+ value,
2261
+ output: `\\${value}`
2262
+ });
2263
+ continue;
2264
+ }
2265
+ if (state.brackets === 0) {
2266
+ if (opts.strictBrackets === true) {
2267
+ throw new SyntaxError(syntaxError("opening", "["));
2268
+ }
2269
+ push({
2270
+ type: "text",
2271
+ value,
2272
+ output: `\\${value}`
2273
+ });
2274
+ continue;
2275
+ }
2276
+ decrement("brackets");
2277
+ const prevValue = prev.value.slice(1);
2278
+ if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
2279
+ value = `/${value}`;
2280
+ }
2281
+ prev.value += value;
2282
+ append({
2283
+ value
2284
+ });
2285
+ if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
2286
+ continue;
2287
+ }
2288
+ const escaped = utils.escapeRegex(prev.value);
2289
+ state.output = state.output.slice(0, -prev.value.length);
2290
+ if (opts.literalBrackets === true) {
2291
+ state.output += escaped;
2292
+ prev.value = escaped;
2293
+ continue;
2294
+ }
2295
+ prev.value = `(${capture}${escaped}|${prev.value})`;
2296
+ state.output += prev.value;
2297
+ continue;
2298
+ }
2299
+ if (value === "{" && opts.nobrace !== true) {
2300
+ increment("braces");
2301
+ const open = {
2302
+ type: "brace",
2303
+ value,
2304
+ output: "(",
2305
+ outputIndex: state.output.length,
2306
+ tokensIndex: state.tokens.length
2307
+ };
2308
+ braces.push(open);
2309
+ push(open);
2310
+ continue;
2311
+ }
2312
+ if (value === "}") {
2313
+ const brace = braces[braces.length - 1];
2314
+ if (opts.nobrace === true || !brace) {
2315
+ push({
2316
+ type: "text",
2317
+ value,
2318
+ output: value
2319
+ });
2320
+ continue;
2321
+ }
2322
+ let output = ")";
2323
+ if (brace.dots === true) {
2324
+ const arr = tokens.slice();
2325
+ const range = [];
2326
+ for (let i = arr.length - 1; i >= 0; i--) {
2327
+ tokens.pop();
2328
+ if (arr[i].type === "brace") {
2329
+ break;
2330
+ }
2331
+ if (arr[i].type !== "dots") {
2332
+ range.unshift(arr[i].value);
2333
+ }
2334
+ }
2335
+ output = expandRange(range, opts);
2336
+ state.backtrack = true;
2337
+ }
2338
+ if (brace.comma !== true && brace.dots !== true) {
2339
+ const out = state.output.slice(0, brace.outputIndex);
2340
+ const toks = state.tokens.slice(brace.tokensIndex);
2341
+ brace.value = brace.output = "\\{";
2342
+ value = output = "\\}";
2343
+ state.output = out;
2344
+ for (const t of toks) {
2345
+ state.output += t.output || t.value;
2346
+ }
2347
+ }
2348
+ push({
2349
+ type: "brace",
2350
+ value,
2351
+ output
2352
+ });
2353
+ decrement("braces");
2354
+ braces.pop();
2355
+ continue;
2356
+ }
2357
+ if (value === "|") {
2358
+ if (extglobs.length > 0) {
2359
+ extglobs[extglobs.length - 1].conditions++;
2360
+ }
2361
+ push({
2362
+ type: "text",
2363
+ value
2364
+ });
2365
+ continue;
2366
+ }
2367
+ if (value === ",") {
2368
+ let output = value;
2369
+ const brace = braces[braces.length - 1];
2370
+ if (brace && stack[stack.length - 1] === "braces") {
2371
+ brace.comma = true;
2372
+ output = "|";
2373
+ }
2374
+ push({
2375
+ type: "comma",
2376
+ value,
2377
+ output
2378
+ });
2379
+ continue;
2380
+ }
2381
+ if (value === "/") {
2382
+ if (prev.type === "dot" && state.index === state.start + 1) {
2383
+ state.start = state.index + 1;
2384
+ state.consumed = "";
2385
+ state.output = "";
2386
+ tokens.pop();
2387
+ prev = bos;
2388
+ continue;
2389
+ }
2390
+ push({
2391
+ type: "slash",
2392
+ value,
2393
+ output: SLASH_LITERAL
2394
+ });
2395
+ continue;
2396
+ }
2397
+ if (value === ".") {
2398
+ if (state.braces > 0 && prev.type === "dot") {
2399
+ if (prev.value === ".") prev.output = DOT_LITERAL;
2400
+ const brace = braces[braces.length - 1];
2401
+ prev.type = "dots";
2402
+ prev.output += value;
2403
+ prev.value += value;
2404
+ brace.dots = true;
2405
+ continue;
2406
+ }
2407
+ if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
2408
+ push({
2409
+ type: "text",
2410
+ value,
2411
+ output: DOT_LITERAL
2412
+ });
2413
+ continue;
2414
+ }
2415
+ push({
2416
+ type: "dot",
2417
+ value,
2418
+ output: DOT_LITERAL
2419
+ });
2420
+ continue;
2421
+ }
2422
+ if (value === "?") {
2423
+ const isGroup = prev && prev.value === "(";
2424
+ if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
2425
+ extglobOpen("qmark", value);
2426
+ continue;
2427
+ }
2428
+ if (prev && prev.type === "paren") {
2429
+ const next = peek();
2430
+ let output = value;
2431
+ if (next === "<" && !utils.supportsLookbehinds()) {
2432
+ throw new Error("Node.js v10 or higher is required for regex lookbehinds");
2433
+ }
2434
+ if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
2435
+ output = `\\${value}`;
2436
+ }
2437
+ push({
2438
+ type: "text",
2439
+ value,
2440
+ output
2441
+ });
2442
+ continue;
2443
+ }
2444
+ if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
2445
+ push({
2446
+ type: "qmark",
2447
+ value,
2448
+ output: QMARK_NO_DOT
2449
+ });
2450
+ continue;
2451
+ }
2452
+ push({
2453
+ type: "qmark",
2454
+ value,
2455
+ output: QMARK
2456
+ });
2457
+ continue;
2458
+ }
2459
+ if (value === "!") {
2460
+ if (opts.noextglob !== true && peek() === "(") {
2461
+ if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
2462
+ extglobOpen("negate", value);
2463
+ continue;
2464
+ }
2465
+ }
2466
+ if (opts.nonegate !== true && state.index === 0) {
2467
+ negate();
2468
+ continue;
2469
+ }
2470
+ }
2471
+ if (value === "+") {
2472
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
2473
+ extglobOpen("plus", value);
2474
+ continue;
2475
+ }
2476
+ if (prev && prev.value === "(" || opts.regex === false) {
2477
+ push({
2478
+ type: "plus",
2479
+ value,
2480
+ output: PLUS_LITERAL
2481
+ });
2482
+ continue;
2483
+ }
2484
+ if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
2485
+ push({
2486
+ type: "plus",
2487
+ value
2488
+ });
2489
+ continue;
2490
+ }
2491
+ push({
2492
+ type: "plus",
2493
+ value: PLUS_LITERAL
2494
+ });
2495
+ continue;
2496
+ }
2497
+ if (value === "@") {
2498
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
2499
+ push({
2500
+ type: "at",
2501
+ extglob: true,
2502
+ value,
2503
+ output: ""
2504
+ });
2505
+ continue;
2506
+ }
2507
+ push({
2508
+ type: "text",
2509
+ value
2510
+ });
2511
+ continue;
2512
+ }
2513
+ if (value !== "*") {
2514
+ if (value === "$" || value === "^") {
2515
+ value = `\\${value}`;
2516
+ }
2517
+ const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
2518
+ if (match) {
2519
+ value += match[0];
2520
+ state.index += match[0].length;
2521
+ }
2522
+ push({
2523
+ type: "text",
2524
+ value
2525
+ });
2526
+ continue;
2527
+ }
2528
+ if (prev && (prev.type === "globstar" || prev.star === true)) {
2529
+ prev.type = "star";
2530
+ prev.star = true;
2531
+ prev.value += value;
2532
+ prev.output = star;
2533
+ state.backtrack = true;
2534
+ state.globstar = true;
2535
+ consume(value);
2536
+ continue;
2537
+ }
2538
+ let rest = remaining();
2539
+ if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
2540
+ extglobOpen("star", value);
2541
+ continue;
2542
+ }
2543
+ if (prev.type === "star") {
2544
+ if (opts.noglobstar === true) {
2545
+ consume(value);
2546
+ continue;
2547
+ }
2548
+ const prior = prev.prev;
2549
+ const before = prior.prev;
2550
+ const isStart = prior.type === "slash" || prior.type === "bos";
2551
+ const afterStar = before && (before.type === "star" || before.type === "globstar");
2552
+ if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
2553
+ push({
2554
+ type: "star",
2555
+ value,
2556
+ output: ""
2557
+ });
2558
+ continue;
2559
+ }
2560
+ const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
2561
+ const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
2562
+ if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
2563
+ push({
2564
+ type: "star",
2565
+ value,
2566
+ output: ""
2567
+ });
2568
+ continue;
2569
+ }
2570
+ while (rest.slice(0, 3) === "/**") {
2571
+ const after = input[state.index + 4];
2572
+ if (after && after !== "/") {
2573
+ break;
2574
+ }
2575
+ rest = rest.slice(3);
2576
+ consume("/**", 3);
2577
+ }
2578
+ if (prior.type === "bos" && eos()) {
2579
+ prev.type = "globstar";
2580
+ prev.value += value;
2581
+ prev.output = globstar(opts);
2582
+ state.output = prev.output;
2583
+ state.globstar = true;
2584
+ consume(value);
2585
+ continue;
2586
+ }
2587
+ if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
2588
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
2589
+ prior.output = `(?:${prior.output}`;
2590
+ prev.type = "globstar";
2591
+ prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
2592
+ prev.value += value;
2593
+ state.globstar = true;
2594
+ state.output += prior.output + prev.output;
2595
+ consume(value);
2596
+ continue;
2597
+ }
2598
+ if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
2599
+ const end = rest[1] !== void 0 ? "|$" : "";
2600
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
2601
+ prior.output = `(?:${prior.output}`;
2602
+ prev.type = "globstar";
2603
+ prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
2604
+ prev.value += value;
2605
+ state.output += prior.output + prev.output;
2606
+ state.globstar = true;
2607
+ consume(value + advance());
2608
+ push({
2609
+ type: "slash",
2610
+ value: "/",
2611
+ output: ""
2612
+ });
2613
+ continue;
2614
+ }
2615
+ if (prior.type === "bos" && rest[0] === "/") {
2616
+ prev.type = "globstar";
2617
+ prev.value += value;
2618
+ prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
2619
+ state.output = prev.output;
2620
+ state.globstar = true;
2621
+ consume(value + advance());
2622
+ push({
2623
+ type: "slash",
2624
+ value: "/",
2625
+ output: ""
2626
+ });
2627
+ continue;
2628
+ }
2629
+ state.output = state.output.slice(0, -prev.output.length);
2630
+ prev.type = "globstar";
2631
+ prev.output = globstar(opts);
2632
+ prev.value += value;
2633
+ state.output += prev.output;
2634
+ state.globstar = true;
2635
+ consume(value);
2636
+ continue;
2637
+ }
2638
+ const token = {
2639
+ type: "star",
2640
+ value,
2641
+ output: star
2642
+ };
2643
+ if (opts.bash === true) {
2644
+ token.output = ".*?";
2645
+ if (prev.type === "bos" || prev.type === "slash") {
2646
+ token.output = nodot + token.output;
2647
+ }
2648
+ push(token);
2649
+ continue;
2650
+ }
2651
+ if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
2652
+ token.output = value;
2653
+ push(token);
2654
+ continue;
2655
+ }
2656
+ if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
2657
+ if (prev.type === "dot") {
2658
+ state.output += NO_DOT_SLASH;
2659
+ prev.output += NO_DOT_SLASH;
2660
+ } else if (opts.dot === true) {
2661
+ state.output += NO_DOTS_SLASH;
2662
+ prev.output += NO_DOTS_SLASH;
2663
+ } else {
2664
+ state.output += nodot;
2665
+ prev.output += nodot;
2666
+ }
2667
+ if (peek() !== "*") {
2668
+ state.output += ONE_CHAR;
2669
+ prev.output += ONE_CHAR;
2670
+ }
2671
+ }
2672
+ push(token);
2673
+ }
2674
+ while (state.brackets > 0) {
2675
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
2676
+ state.output = utils.escapeLast(state.output, "[");
2677
+ decrement("brackets");
2678
+ }
2679
+ while (state.parens > 0) {
2680
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
2681
+ state.output = utils.escapeLast(state.output, "(");
2682
+ decrement("parens");
2683
+ }
2684
+ while (state.braces > 0) {
2685
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
2686
+ state.output = utils.escapeLast(state.output, "{");
2687
+ decrement("braces");
2688
+ }
2689
+ if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
2690
+ push({
2691
+ type: "maybe_slash",
2692
+ value: "",
2693
+ output: `${SLASH_LITERAL}?`
2694
+ });
2695
+ }
2696
+ if (state.backtrack === true) {
2697
+ state.output = "";
2698
+ for (const token of state.tokens) {
2699
+ state.output += token.output != null ? token.output : token.value;
2700
+ if (token.suffix) {
2701
+ state.output += token.suffix;
2702
+ }
2703
+ }
2704
+ }
2705
+ return state;
2706
+ }, "parse");
2707
+ parse.fastpaths = (input, options) => {
2708
+ const opts = {
2709
+ ...options
2710
+ };
2711
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
2712
+ const len = input.length;
2713
+ if (len > max) {
2714
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
2715
+ }
2716
+ input = REPLACEMENTS[input] || input;
2717
+ const win32 = utils.isWindows(options);
2718
+ const { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(win32);
2719
+ const nodot = opts.dot ? NO_DOTS : NO_DOT;
2720
+ const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
2721
+ const capture = opts.capture ? "" : "?:";
2722
+ const state = {
2723
+ negated: false,
2724
+ prefix: ""
2725
+ };
2726
+ let star = opts.bash === true ? ".*?" : STAR;
2727
+ if (opts.capture) {
2728
+ star = `(${star})`;
2729
+ }
2730
+ const globstar = /* @__PURE__ */ __name((opts2) => {
2731
+ if (opts2.noglobstar === true) return star;
2732
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
2733
+ }, "globstar");
2734
+ const create = /* @__PURE__ */ __name((str) => {
2735
+ switch (str) {
2736
+ case "*":
2737
+ return `${nodot}${ONE_CHAR}${star}`;
2738
+ case ".*":
2739
+ return `${DOT_LITERAL}${ONE_CHAR}${star}`;
2740
+ case "*.*":
2741
+ return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
2742
+ case "*/*":
2743
+ return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
2744
+ case "**":
2745
+ return nodot + globstar(opts);
2746
+ case "**/*":
2747
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
2748
+ case "**/*.*":
2749
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
2750
+ case "**/.*":
2751
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
2752
+ default: {
2753
+ const match = /^(.*?)\.(\w+)$/.exec(str);
2754
+ if (!match) return;
2755
+ const source2 = create(match[1]);
2756
+ if (!source2) return;
2757
+ return source2 + DOT_LITERAL + match[2];
2758
+ }
2759
+ }
2760
+ }, "create");
2761
+ const output = utils.removePrefix(input, state);
2762
+ let source = create(output);
2763
+ if (source && opts.strictSlashes !== true) {
2764
+ source += `${SLASH_LITERAL}?`;
2765
+ }
2766
+ return source;
2767
+ };
2768
+ module.exports = parse;
2769
+ }
2770
+ });
2771
+
2772
+ // ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js
2773
+ var require_picomatch = __commonJS({
2774
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js"(exports$1, module) {
2775
+ init_esm_shims();
2776
+ var path = __require("path");
2777
+ var scan = require_scan();
2778
+ var parse = require_parse2();
2779
+ var utils = require_utils2();
2780
+ var constants = require_constants2();
2781
+ var isObject2 = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject");
2782
+ var picomatch = /* @__PURE__ */ __name((glob, options, returnState = false) => {
2783
+ if (Array.isArray(glob)) {
2784
+ const fns = glob.map((input) => picomatch(input, options, returnState));
2785
+ const arrayMatcher = /* @__PURE__ */ __name((str) => {
2786
+ for (const isMatch of fns) {
2787
+ const state2 = isMatch(str);
2788
+ if (state2) return state2;
2789
+ }
2790
+ return false;
2791
+ }, "arrayMatcher");
2792
+ return arrayMatcher;
2793
+ }
2794
+ const isState = isObject2(glob) && glob.tokens && glob.input;
2795
+ if (glob === "" || typeof glob !== "string" && !isState) {
2796
+ throw new TypeError("Expected pattern to be a non-empty string");
2797
+ }
2798
+ const opts = options || {};
2799
+ const posix = utils.isWindows(options);
2800
+ const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
2801
+ const state = regex.state;
2802
+ delete regex.state;
2803
+ let isIgnored = /* @__PURE__ */ __name(() => false, "isIgnored");
2804
+ if (opts.ignore) {
2805
+ const ignoreOpts = {
2806
+ ...options,
2807
+ ignore: null,
2808
+ onMatch: null,
2809
+ onResult: null
2810
+ };
2811
+ isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
2812
+ }
2813
+ const matcher = /* @__PURE__ */ __name((input, returnObject = false) => {
2814
+ const { isMatch, match, output } = picomatch.test(input, regex, options, {
2815
+ glob,
2816
+ posix
2817
+ });
2818
+ const result = {
2819
+ glob,
2820
+ state,
2821
+ regex,
2822
+ posix,
2823
+ input,
2824
+ output,
2825
+ match,
2826
+ isMatch
2827
+ };
2828
+ if (typeof opts.onResult === "function") {
2829
+ opts.onResult(result);
2830
+ }
2831
+ if (isMatch === false) {
2832
+ result.isMatch = false;
2833
+ return returnObject ? result : false;
2834
+ }
2835
+ if (isIgnored(input)) {
2836
+ if (typeof opts.onIgnore === "function") {
2837
+ opts.onIgnore(result);
2838
+ }
2839
+ result.isMatch = false;
2840
+ return returnObject ? result : false;
2841
+ }
2842
+ if (typeof opts.onMatch === "function") {
2843
+ opts.onMatch(result);
2844
+ }
2845
+ return returnObject ? result : true;
2846
+ }, "matcher");
2847
+ if (returnState) {
2848
+ matcher.state = state;
2849
+ }
2850
+ return matcher;
2851
+ }, "picomatch");
2852
+ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
2853
+ if (typeof input !== "string") {
2854
+ throw new TypeError("Expected input to be a string");
2855
+ }
2856
+ if (input === "") {
2857
+ return {
2858
+ isMatch: false,
2859
+ output: ""
2860
+ };
2861
+ }
2862
+ const opts = options || {};
2863
+ const format = opts.format || (posix ? utils.toPosixSlashes : null);
2864
+ let match = input === glob;
2865
+ let output = match && format ? format(input) : input;
2866
+ if (match === false) {
2867
+ output = format ? format(input) : input;
2868
+ match = output === glob;
2869
+ }
2870
+ if (match === false || opts.capture === true) {
2871
+ if (opts.matchBase === true || opts.basename === true) {
2872
+ match = picomatch.matchBase(input, regex, options, posix);
2873
+ } else {
2874
+ match = regex.exec(output);
2875
+ }
2876
+ }
2877
+ return {
2878
+ isMatch: Boolean(match),
2879
+ match,
2880
+ output
2881
+ };
2882
+ };
2883
+ picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
2884
+ const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
2885
+ return regex.test(path.basename(input));
2886
+ };
2887
+ picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
2888
+ picomatch.parse = (pattern, options) => {
2889
+ if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
2890
+ return parse(pattern, {
2891
+ ...options,
2892
+ fastpaths: false
2893
+ });
2894
+ };
2895
+ picomatch.scan = (input, options) => scan(input, options);
2896
+ picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
2897
+ if (returnOutput === true) {
2898
+ return state.output;
2899
+ }
2900
+ const opts = options || {};
2901
+ const prepend = opts.contains ? "" : "^";
2902
+ const append = opts.contains ? "" : "$";
2903
+ let source = `${prepend}(?:${state.output})${append}`;
2904
+ if (state && state.negated === true) {
2905
+ source = `^(?!${source}).*$`;
2906
+ }
2907
+ const regex = picomatch.toRegex(source, options);
2908
+ if (returnState === true) {
2909
+ regex.state = state;
2910
+ }
2911
+ return regex;
2912
+ };
2913
+ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
2914
+ if (!input || typeof input !== "string") {
2915
+ throw new TypeError("Expected a non-empty string");
2916
+ }
2917
+ let parsed = {
2918
+ negated: false,
2919
+ fastpaths: true
2920
+ };
2921
+ if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
2922
+ parsed.output = parse.fastpaths(input, options);
2923
+ }
2924
+ if (!parsed.output) {
2925
+ parsed = parse(input, options);
2926
+ }
2927
+ return picomatch.compileRe(parsed, options, returnOutput, returnState);
2928
+ };
2929
+ picomatch.toRegex = (source, options) => {
2930
+ try {
2931
+ const opts = options || {};
2932
+ return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
2933
+ } catch (err) {
2934
+ if (options && options.debug === true) throw err;
2935
+ return /$^/;
2936
+ }
2937
+ };
2938
+ picomatch.constants = constants;
2939
+ module.exports = picomatch;
2940
+ }
2941
+ });
2942
+
2943
+ // ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js
2944
+ var require_picomatch2 = __commonJS({
2945
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js"(exports$1, module) {
2946
+ init_esm_shims();
2947
+ module.exports = require_picomatch();
2948
+ }
2949
+ });
2950
+
2951
+ // ../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js
2952
+ var require_micromatch = __commonJS({
2953
+ "../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js"(exports$1, module) {
2954
+ init_esm_shims();
2955
+ var util = __require("util");
2956
+ var braces = require_braces();
2957
+ var picomatch = require_picomatch2();
2958
+ var utils = require_utils2();
2959
+ var isEmptyString = /* @__PURE__ */ __name((v) => v === "" || v === "./", "isEmptyString");
2960
+ var hasBraces = /* @__PURE__ */ __name((v) => {
2961
+ const index = v.indexOf("{");
2962
+ return index > -1 && v.indexOf("}", index) > -1;
2963
+ }, "hasBraces");
2964
+ var micromatch2 = /* @__PURE__ */ __name((list, patterns, options) => {
2965
+ patterns = [].concat(patterns);
2966
+ list = [].concat(list);
2967
+ let omit = /* @__PURE__ */ new Set();
2968
+ let keep = /* @__PURE__ */ new Set();
2969
+ let items = /* @__PURE__ */ new Set();
2970
+ let negatives = 0;
2971
+ let onResult = /* @__PURE__ */ __name((state) => {
2972
+ items.add(state.output);
2973
+ if (options && options.onResult) {
2974
+ options.onResult(state);
2975
+ }
2976
+ }, "onResult");
2977
+ for (let i = 0; i < patterns.length; i++) {
2978
+ let isMatch = picomatch(String(patterns[i]), {
2979
+ ...options,
2980
+ onResult
2981
+ }, true);
2982
+ let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
2983
+ if (negated) negatives++;
2984
+ for (let item of list) {
2985
+ let matched = isMatch(item, true);
2986
+ let match = negated ? !matched.isMatch : matched.isMatch;
2987
+ if (!match) continue;
2988
+ if (negated) {
2989
+ omit.add(matched.output);
2990
+ } else {
2991
+ omit.delete(matched.output);
2992
+ keep.add(matched.output);
2993
+ }
2994
+ }
2995
+ }
2996
+ let result = negatives === patterns.length ? [
2997
+ ...items
2998
+ ] : [
2999
+ ...keep
3000
+ ];
3001
+ let matches = result.filter((item) => !omit.has(item));
3002
+ if (options && matches.length === 0) {
3003
+ if (options.failglob === true) {
3004
+ throw new Error(`No matches found for "${patterns.join(", ")}"`);
3005
+ }
3006
+ if (options.nonull === true || options.nullglob === true) {
3007
+ return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
3008
+ }
3009
+ }
3010
+ return matches;
3011
+ }, "micromatch");
3012
+ micromatch2.match = micromatch2;
3013
+ micromatch2.matcher = (pattern, options) => picomatch(pattern, options);
3014
+ micromatch2.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
3015
+ micromatch2.any = micromatch2.isMatch;
3016
+ micromatch2.not = (list, patterns, options = {}) => {
3017
+ patterns = [].concat(patterns).map(String);
3018
+ let result = /* @__PURE__ */ new Set();
3019
+ let items = [];
3020
+ let onResult = /* @__PURE__ */ __name((state) => {
3021
+ if (options.onResult) options.onResult(state);
3022
+ items.push(state.output);
3023
+ }, "onResult");
3024
+ let matches = new Set(micromatch2(list, patterns, {
3025
+ ...options,
3026
+ onResult
3027
+ }));
3028
+ for (let item of items) {
3029
+ if (!matches.has(item)) {
3030
+ result.add(item);
3031
+ }
3032
+ }
3033
+ return [
3034
+ ...result
3035
+ ];
3036
+ };
3037
+ micromatch2.contains = (str, pattern, options) => {
3038
+ if (typeof str !== "string") {
3039
+ throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
3040
+ }
3041
+ if (Array.isArray(pattern)) {
3042
+ return pattern.some((p) => micromatch2.contains(str, p, options));
3043
+ }
3044
+ if (typeof pattern === "string") {
3045
+ if (isEmptyString(str) || isEmptyString(pattern)) {
3046
+ return false;
3047
+ }
3048
+ if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) {
3049
+ return true;
3050
+ }
3051
+ }
3052
+ return micromatch2.isMatch(str, pattern, {
3053
+ ...options,
3054
+ contains: true
3055
+ });
3056
+ };
3057
+ micromatch2.matchKeys = (obj, patterns, options) => {
3058
+ if (!utils.isObject(obj)) {
3059
+ throw new TypeError("Expected the first argument to be an object");
3060
+ }
3061
+ let keys = micromatch2(Object.keys(obj), patterns, options);
3062
+ let res = {};
3063
+ for (let key of keys) res[key] = obj[key];
3064
+ return res;
3065
+ };
3066
+ micromatch2.some = (list, patterns, options) => {
3067
+ let items = [].concat(list);
3068
+ for (let pattern of [].concat(patterns)) {
3069
+ let isMatch = picomatch(String(pattern), options);
3070
+ if (items.some((item) => isMatch(item))) {
3071
+ return true;
3072
+ }
3073
+ }
3074
+ return false;
3075
+ };
3076
+ micromatch2.every = (list, patterns, options) => {
3077
+ let items = [].concat(list);
3078
+ for (let pattern of [].concat(patterns)) {
3079
+ let isMatch = picomatch(String(pattern), options);
3080
+ if (!items.every((item) => isMatch(item))) {
3081
+ return false;
3082
+ }
3083
+ }
3084
+ return true;
3085
+ };
3086
+ micromatch2.all = (str, patterns, options) => {
3087
+ if (typeof str !== "string") {
3088
+ throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
3089
+ }
3090
+ return [].concat(patterns).every((p) => picomatch(p, options)(str));
3091
+ };
3092
+ micromatch2.capture = (glob, input, options) => {
3093
+ let posix = utils.isWindows(options);
3094
+ let regex = picomatch.makeRe(String(glob), {
3095
+ ...options,
3096
+ capture: true
3097
+ });
3098
+ let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
3099
+ if (match) {
3100
+ return match.slice(1).map((v) => v === void 0 ? "" : v);
3101
+ }
3102
+ };
3103
+ micromatch2.makeRe = (...args) => picomatch.makeRe(...args);
3104
+ micromatch2.scan = (...args) => picomatch.scan(...args);
3105
+ micromatch2.parse = (patterns, options) => {
3106
+ let res = [];
3107
+ for (let pattern of [].concat(patterns || [])) {
3108
+ for (let str of braces(String(pattern), options)) {
3109
+ res.push(picomatch.parse(str, options));
3110
+ }
3111
+ }
3112
+ return res;
3113
+ };
3114
+ micromatch2.braces = (pattern, options) => {
3115
+ if (typeof pattern !== "string") throw new TypeError("Expected a string");
3116
+ if (options && options.nobrace === true || !hasBraces(pattern)) {
3117
+ return [
3118
+ pattern
3119
+ ];
3120
+ }
3121
+ return braces(pattern, options);
3122
+ };
3123
+ micromatch2.braceExpand = (pattern, options) => {
3124
+ if (typeof pattern !== "string") throw new TypeError("Expected a string");
3125
+ return micromatch2.braces(pattern, {
3126
+ ...options,
3127
+ expand: true
3128
+ });
3129
+ };
3130
+ micromatch2.hasBraces = hasBraces;
3131
+ module.exports = micromatch2;
3132
+ }
3133
+ });
3134
+
3135
+ // ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_ef8b874d406bec4900e1fddc1ea375be/node_modules/@deepkit/type-compiler/dist/esm/src/config.js
3136
+ init_esm_shims();
3137
+
3138
+ // ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_ef8b874d406bec4900e1fddc1ea375be/node_modules/@deepkit/type-compiler/dist/esm/src/debug.js
3139
+ init_esm_shims();
3140
+ function isDebug(level = 1) {
3141
+ const expected = "deepkit" + (level > 1 ? "+".repeat(level - 1) : "");
3142
+ return "undefined" !== typeof process && "string" === typeof process.env.DEBUG && process.env.DEBUG.includes(expected);
3143
+ }
3144
+ __name(isDebug, "isDebug");
3145
+ function debug(...message) {
3146
+ if (isDebug(1)) {
3147
+ console.debug(...message);
3148
+ }
3149
+ }
3150
+ __name(debug, "debug");
3151
+ function debug2(...message) {
3152
+ if (isDebug(2)) {
3153
+ console.debug(...message);
3154
+ }
3155
+ }
3156
+ __name(debug2, "debug2");
3157
+
3158
+ // ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_ef8b874d406bec4900e1fddc1ea375be/node_modules/@deepkit/type-compiler/dist/esm/src/resolver.js
3159
+ init_esm_shims();
3160
+ var import_micromatch = __toESM(require_micromatch());
3161
+ var { createSourceFile, resolveModuleName, isStringLiteral, JSDocParsingMode, ScriptTarget } = ts2;
3162
+ function patternMatch(path, patterns, base) {
3163
+ const include = patterns.filter((pattern) => pattern[0] !== "!");
3164
+ const exclude = patterns.filter((pattern) => pattern[0] === "!").map((pattern) => pattern.substring(1));
3165
+ return import_micromatch.default.isMatch(path, include, {
3166
+ ignore: exclude
3167
+ });
3168
+ }
3169
+ __name(patternMatch, "patternMatch");
3170
+ var Resolver = class {
3171
+ static {
3172
+ __name(this, "Resolver");
3173
+ }
3174
+ constructor(compilerOptions, host, sourceFiles) {
3175
+ this.compilerOptions = compilerOptions;
3176
+ this.host = host;
3177
+ this.sourceFiles = sourceFiles;
3178
+ }
3179
+ resolve(from, importOrExportNode) {
3180
+ const moduleSpecifier = importOrExportNode.moduleSpecifier;
3181
+ if (!moduleSpecifier) return;
3182
+ if (!isStringLiteral(moduleSpecifier)) return;
3183
+ return this.resolveSourceFile(from, moduleSpecifier);
3184
+ }
3185
+ resolveImpl(modulePath, sourceFile) {
3186
+ if (this.host.resolveModuleNameLiterals !== void 0) {
3187
+ const results = this.host.resolveModuleNameLiterals(
3188
+ [
3189
+ modulePath
3190
+ ],
3191
+ sourceFile.fileName,
3192
+ /*reusedNames*/
3193
+ void 0,
3194
+ this.compilerOptions,
3195
+ sourceFile,
3196
+ void 0
3197
+ );
3198
+ if (results[0]) return results[0].resolvedModule;
3199
+ return;
3200
+ }
3201
+ if (this.host.resolveModuleNames !== void 0) {
3202
+ return this.host.resolveModuleNames(
3203
+ [
3204
+ modulePath.text
3205
+ ],
3206
+ sourceFile.fileName,
3207
+ /*reusedNames*/
3208
+ void 0,
3209
+ /*redirectedReference*/
3210
+ void 0,
3211
+ this.compilerOptions
3212
+ )[0];
3213
+ }
3214
+ const result = resolveModuleName(modulePath.text, sourceFile.fileName, this.compilerOptions, this.host);
3215
+ return result.resolvedModule;
3216
+ }
3217
+ /**
3218
+ * Tries to resolve the .ts/d.ts file path for a given module path.
3219
+ * Scans relative paths. Looks into package.json "types" and "exports" (with new 4.7 support)
3220
+ *
3221
+ * @param sourceFile the SourceFile of the file that contains the import. modulePath is relative to that.
3222
+ * @param modulePath the x in 'from x'.
3223
+ */
3224
+ resolveSourceFile(sourceFile, modulePath) {
3225
+ const result = this.resolveImpl(modulePath, sourceFile);
3226
+ if (!result) return;
3227
+ if (!result.resolvedFileName.endsWith(".ts") && !result.resolvedFileName.endsWith(".tsx") && !result.resolvedFileName.endsWith(".d.ts")) {
3228
+ return;
3229
+ }
3230
+ const fileName = result.resolvedFileName;
3231
+ if (this.sourceFiles[fileName]) return this.sourceFiles[fileName];
3232
+ const source = this.host.readFile(result.resolvedFileName);
3233
+ if (!source) return;
3234
+ const moduleSourceFile = this.sourceFiles[fileName] = createSourceFile(fileName, source, {
3235
+ languageVersion: this.compilerOptions.target || ScriptTarget.ES2018,
3236
+ // JSDocParsingMode is not available in TS < 5.3
3237
+ jsDocParsingMode: JSDocParsingMode ? JSDocParsingMode.ParseNone : void 0
3238
+ }, true);
3239
+ this.sourceFiles[fileName] = moduleSourceFile;
3240
+ ts2.bindSourceFile(moduleSourceFile, this.compilerOptions);
3241
+ return moduleSourceFile;
3242
+ }
3243
+ };
3244
+
3245
+ // ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_ef8b874d406bec4900e1fddc1ea375be/node_modules/@deepkit/type-compiler/dist/esm/src/config.js
3246
+ var reflectionModes = [
3247
+ "default",
3248
+ "explicit",
3249
+ "never"
3250
+ ];
3251
+ function isObject(obj) {
3252
+ if (!obj) {
3253
+ return false;
3254
+ }
3255
+ return typeof obj === "object" && !Array.isArray(obj);
3256
+ }
3257
+ __name(isObject, "isObject");
3258
+ var defaultMergeStrategy = "merge";
3259
+ var reflectionLevel = [
3260
+ "minimal",
3261
+ "normal",
3262
+ "verbose"
3263
+ ];
3264
+ function readTsConfig(parseConfigHost, path) {
3265
+ const configFile = ts2.readConfigFile(path, (path2) => parseConfigHost.readFile(path2));
3266
+ if (configFile.error) {
3267
+ debug(`Failed to read tsconfig ${path}: ${configFile.error.messageText}`);
3268
+ return;
3269
+ }
3270
+ const parsed = ts2.parseJsonConfigFileContent(configFile.config, parseConfigHost, dirname(path));
3271
+ const ignoredErrors = [
3272
+ 18003
3273
+ // No inputs were found in config file.
3274
+ ];
3275
+ const softErrors = [
3276
+ 18e3
3277
+ // Circularity detected while resolving configuration
3278
+ ];
3279
+ const errors = parsed.errors.filter((v) => !ignoredErrors.includes(v.code));
3280
+ if (errors.length) {
3281
+ debug(`Failed to parse tsconfig ${path}: ${parsed.errors.map((v) => v.messageText).join(", ")}`);
3282
+ }
3283
+ const hardErrors = errors.filter((v) => !softErrors.includes(v.code));
3284
+ if (hardErrors.length) {
3285
+ return;
3286
+ }
3287
+ const json = readFileSync(path, "utf8");
3288
+ const tsconfig = JSON.parse(json);
3289
+ return Object.assign(configFile.config, {
3290
+ compilerOptions: parsed.options,
3291
+ reflectionLevel: tsconfig.reflectionLevel ? String(tsconfig.reflectionLevel) : void 0
3292
+ });
3293
+ }
3294
+ __name(readTsConfig, "readTsConfig");
3295
+ function reflectionModeMatcher(config, filePath) {
3296
+ if (Array.isArray(config.exclude)) {
3297
+ if (patternMatch(filePath, config.exclude)) return "never";
3298
+ }
3299
+ if (Array.isArray(config.reflection)) {
3300
+ return patternMatch(filePath, config.reflection) ? "default" : "never";
3301
+ }
3302
+ if (config.reflection === "default" || config.reflection === "explicit") return config.reflection;
3303
+ return "never";
3304
+ }
3305
+ __name(reflectionModeMatcher, "reflectionModeMatcher");
3306
+ function ensureStringArray(value) {
3307
+ if (Array.isArray(value)) return value.map((v) => "" + v);
3308
+ if ("string" === typeof value) return [
3309
+ value
3310
+ ];
3311
+ return [];
3312
+ }
3313
+ __name(ensureStringArray, "ensureStringArray");
3314
+ function parseRawMode(mode) {
3315
+ if ("boolean" === typeof mode) return mode ? "default" : "never";
3316
+ if (mode === "default" || mode === "explicit") return mode;
3317
+ return ensureStringArray(mode);
3318
+ }
3319
+ __name(parseRawMode, "parseRawMode");
3320
+ function resolvePaths(baseDir, paths) {
3321
+ if (!paths || !Array.isArray(paths)) return;
3322
+ for (let i = 0; i < paths.length; i++) {
3323
+ if ("string" !== typeof paths[i]) continue;
3324
+ if (isAbsolute(paths[i])) continue;
3325
+ let path = paths[i];
3326
+ let exclude = false;
3327
+ if (path.startsWith("!")) {
3328
+ exclude = true;
3329
+ path = path.substring(1);
3330
+ }
3331
+ if (path.startsWith("./") || path.includes("/")) {
3332
+ path = join(baseDir, path);
3333
+ }
3334
+ path = path.replace(/\\/g, "/");
3335
+ if (exclude) path = "!" + path;
3336
+ paths[i] = path;
3337
+ }
3338
+ }
3339
+ __name(resolvePaths, "resolvePaths");
3340
+ function appendPaths(strategy = defaultMergeStrategy, parent, existing) {
3341
+ if (strategy === "replace") {
3342
+ return [
3343
+ ...existing || parent
3344
+ ];
3345
+ }
3346
+ if (!existing) return [
3347
+ ...parent
3348
+ ];
3349
+ return [
3350
+ ...parent,
3351
+ ...existing
3352
+ ];
3353
+ }
3354
+ __name(appendPaths, "appendPaths");
3355
+ function applyConfigValues(existing, parent, baseDir) {
3356
+ const parentReflection = isObject(parent.deepkitCompilerOptions) ? parent.deepkitCompilerOptions?.reflection : parent.reflection;
3357
+ const parentReflectionLevel = parent.deepkitCompilerOptions?.reflectionLevel || parent.reflectionLevel || parent.compilerOptions?.reflectionLevel;
3358
+ if (isObject(parent.deepkitCompilerOptions) && "undefined" === typeof existing.mergeStrategy) {
3359
+ existing.mergeStrategy = parent.deepkitCompilerOptions.mergeStrategy;
3360
+ }
3361
+ if ("undefined" !== typeof parentReflection) {
3362
+ const next = parseRawMode(parentReflection);
3363
+ if ("undefined" === typeof existing.reflection) {
3364
+ existing.reflection = next;
3365
+ } else if ("string" === typeof existing.reflection) ; else if (Array.isArray(next) && Array.isArray(existing.reflection)) {
3366
+ existing.reflection = appendPaths(existing.mergeStrategy, next, existing.reflection);
3367
+ } else if ("string" === typeof next && Array.isArray(existing.reflection)) ;
3368
+ }
3369
+ if ("undefined" !== typeof parentReflectionLevel) {
3370
+ if ("undefined" === typeof existing.reflectionLevel) {
3371
+ existing.reflectionLevel = parentReflectionLevel;
3372
+ }
3373
+ }
3374
+ if (isObject(parent.deepkitCompilerOptions)) {
3375
+ if (`undefined` !== typeof parent.deepkitCompilerOptions.exclude) {
3376
+ const next = ensureStringArray(parent.deepkitCompilerOptions.exclude);
3377
+ existing.exclude = appendPaths(existing.mergeStrategy, next, existing.exclude);
3378
+ }
3379
+ }
3380
+ resolvePaths(baseDir, existing.reflection);
3381
+ resolvePaths(baseDir, existing.exclude);
3382
+ if (parent.compilerOptions) {
3383
+ if (Object.keys(existing.compilerOptions).length === 0) {
3384
+ Object.assign(existing.compilerOptions, parent.compilerOptions);
3385
+ }
3386
+ }
3387
+ existing.extends = parent.extends;
3388
+ }
3389
+ __name(applyConfigValues, "applyConfigValues");
3390
+ var defaultExcluded = [
3391
+ "lib.dom*.d.ts",
3392
+ "*typedarrays.d.ts",
3393
+ "lib.webworker*.d.ts",
3394
+ "lib.decorator*.d.ts",
3395
+ "lib.es2015.proxy.d.ts",
3396
+ "lib.es2020.sharedmemory.d.ts",
3397
+ "lib.es2015.core.d.ts"
3398
+ ];
3399
+ function getConfigResolver(cache, host, compilerOptions, sourceFile, tsConfigPath = "") {
3400
+ let config = {
3401
+ // We use the parameter `compilerOptions` only for compilerOptions.configFilePath.
3402
+ // We load the compilerOptions manually since transformers don't get the full picture
3403
+ // (path aliases are missing for example).
3404
+ // It's important to load compilerOptions manually if there is compilerOptions.configFilePath
3405
+ // since not all build tools provide the full compilerOptions.
3406
+ compilerOptions: {}
3407
+ };
3408
+ tsConfigPath = tsConfigPath || ("string" === typeof compilerOptions.configFilePath ? compilerOptions.configFilePath : "");
3409
+ if (tsConfigPath) {
3410
+ if (cache[tsConfigPath]) {
3411
+ return cache[tsConfigPath];
3412
+ }
3413
+ const configFile = readTsConfig(host, tsConfigPath);
3414
+ if (configFile) applyConfigValues(config, configFile, dirname(tsConfigPath));
3415
+ } else {
3416
+ if (!tsConfigPath && sourceFile) {
3417
+ const baseDir = dirname(sourceFile.fileName);
3418
+ const configPath = ts2.findConfigFile(baseDir, (path) => {
3419
+ path = isAbsolute(path) ? path : join(baseDir, path);
3420
+ return host.fileExists(path);
3421
+ });
3422
+ debug2(`No tsConfigPath|compilerOptions.configFilePath provided. Manually searching for tsconfig.json in ${baseDir} returned ${configPath}`);
3423
+ if (configPath) {
3424
+ tsConfigPath = isAbsolute(configPath) ? configPath : join(baseDir, configPath);
3425
+ }
3426
+ }
3427
+ if (tsConfigPath) {
3428
+ if (cache[tsConfigPath]) return cache[tsConfigPath];
3429
+ const configFile = readTsConfig(host, tsConfigPath);
3430
+ if (configFile) applyConfigValues(config, configFile, dirname(tsConfigPath));
3431
+ }
3432
+ }
3433
+ if (tsConfigPath) {
3434
+ let basePath = dirname(tsConfigPath);
3435
+ let currentConfig = config;
3436
+ const seen = /* @__PURE__ */ new Set();
3437
+ seen.add(tsConfigPath);
3438
+ while (currentConfig.extends) {
3439
+ const path = join(basePath, currentConfig.extends);
3440
+ if (seen.has(path)) break;
3441
+ seen.add(path);
3442
+ const nextConfig = ts2.readConfigFile(path, (path2) => host.readFile(path2));
3443
+ if (!nextConfig) break;
3444
+ basePath = dirname(path);
3445
+ applyConfigValues(currentConfig, nextConfig.config, basePath);
3446
+ }
3447
+ } else {
3448
+ throw new Error(`No tsconfig found for ${sourceFile?.fileName}, that is weird. Either provide a tsconfig or compilerOptions.configFilePath`);
3449
+ }
3450
+ config.exclude = config.exclude ? [
3451
+ ...defaultExcluded,
3452
+ ...config.exclude
3453
+ ] : [
3454
+ ...defaultExcluded
3455
+ ];
3456
+ config.compilerOptions.configFilePath = tsConfigPath;
3457
+ const resolvedConfig = {
3458
+ path: tsConfigPath,
3459
+ // we want to maintain options passed from tsc API (transpile, Program)
3460
+ compilerOptions: Object.assign(config.compilerOptions, compilerOptions),
3461
+ exclude: config.exclude,
3462
+ reflection: config.reflection,
3463
+ reflectionLevel: config.reflectionLevel || (config.compilerOptions?.reflectionLevel ? String(config.compilerOptions?.reflectionLevel) : void 0) || "normal",
3464
+ mergeStrategy: config.mergeStrategy || defaultMergeStrategy
3465
+ };
3466
+ if (isDebug()) {
3467
+ debug(`Found config ${resolvedConfig.path}:
3468
+ reflection:`, resolvedConfig.reflection, `
3469
+ exclude:`, resolvedConfig.exclude, `
3470
+ paths:`, resolvedConfig.compilerOptions.paths);
3471
+ }
3472
+ const match = /* @__PURE__ */ __name((path) => {
3473
+ const mode = reflectionModeMatcher(config, path);
3474
+ return {
3475
+ mode,
3476
+ tsConfigPath,
3477
+ level: resolvedConfig.reflectionLevel
3478
+ };
3479
+ }, "match");
3480
+ return cache[tsConfigPath] = {
3481
+ config: resolvedConfig,
3482
+ match
3483
+ };
3484
+ }
3485
+ __name(getConfigResolver, "getConfigResolver");
3486
+ /*! Bundled license information:
3487
+
3488
+ is-number/index.js:
3489
+ (*!
3490
+ * is-number <https://github.com/jonschlinkert/is-number>
3491
+ *
3492
+ * Copyright (c) 2014-present, Jon Schlinkert.
3493
+ * Released under the MIT License.
3494
+ *)
3495
+
3496
+ to-regex-range/index.js:
3497
+ (*!
3498
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
3499
+ *
3500
+ * Copyright (c) 2015-present, Jon Schlinkert.
3501
+ * Released under the MIT License.
3502
+ *)
3503
+
3504
+ fill-range/index.js:
3505
+ (*!
3506
+ * fill-range <https://github.com/jonschlinkert/fill-range>
3507
+ *
3508
+ * Copyright (c) 2014-present, Jon Schlinkert.
3509
+ * Licensed under the MIT License.
3510
+ *)
3511
+ */
3512
+
3513
+ export { Resolver, __name, __require, debug, debug2, defaultExcluded, getConfigResolver, init_esm_shims, isObject, parseRawMode, reflectionLevel, reflectionModeMatcher, reflectionModes };