@storybook/addon-vitest 10.1.0-alpha.1 → 10.1.0-alpha.11

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.
@@ -1,109 +1,58 @@
1
- import CJS_COMPAT_NODE_URL_8w58nre1r1b from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8w58nre1r1b from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8w58nre1r1b from "node:module";
1
+ import CJS_COMPAT_NODE_URL_zfiyucf8tb from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_zfiyucf8tb from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_zfiyucf8tb from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8w58nre1r1b.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8w58nre1r1b.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8w58nre1r1b.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_zfiyucf8tb.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_zfiyucf8tb.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_zfiyucf8tb.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  require_picocolors
14
- } from "../_node-chunks/chunk-RWZYDWYZ.js";
14
+ } from "../_node-chunks/chunk-XN666246.js";
15
15
  import {
16
16
  join,
17
17
  normalize,
18
18
  relative,
19
19
  resolve,
20
20
  sep
21
- } from "../_node-chunks/chunk-JLLEOCT6.js";
21
+ } from "../_node-chunks/chunk-L7WYCUSW.js";
22
22
  import {
23
23
  __commonJS,
24
- __name,
25
24
  __require,
26
25
  __toESM
27
- } from "../_node-chunks/chunk-XYGEMTYA.js";
26
+ } from "../_node-chunks/chunk-FCFZB5YS.js";
28
27
 
29
28
  // ../../node_modules/braces/lib/utils.js
30
29
  var require_utils = __commonJS({
31
30
  "../../node_modules/braces/lib/utils.js"(exports) {
32
31
  "use strict";
33
- exports.isInteger = (num) => {
34
- if (typeof num === "number") {
35
- return Number.isInteger(num);
36
- }
37
- if (typeof num === "string" && num.trim() !== "") {
38
- return Number.isInteger(Number(num));
39
- }
40
- return false;
41
- };
32
+ exports.isInteger = (num) => typeof num == "number" ? Number.isInteger(num) : typeof num == "string" && num.trim() !== "" ? Number.isInteger(Number(num)) : !1;
42
33
  exports.find = (node, type) => node.nodes.find((node2) => node2.type === type);
43
- exports.exceedsLimit = (min, max, step = 1, limit) => {
44
- if (limit === false) return false;
45
- if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
46
- return (Number(max) - Number(min)) / Number(step) >= limit;
47
- };
34
+ exports.exceedsLimit = (min, max, step = 1, limit) => limit === !1 || !exports.isInteger(min) || !exports.isInteger(max) ? !1 : (Number(max) - Number(min)) / Number(step) >= limit;
48
35
  exports.escapeNode = (block, n = 0, type) => {
49
- const node = block.nodes[n];
50
- if (!node) return;
51
- if (type && node.type === type || node.type === "open" || node.type === "close") {
52
- if (node.escaped !== true) {
53
- node.value = "\\" + node.value;
54
- node.escaped = true;
55
- }
56
- }
57
- };
58
- exports.encloseBrace = (node) => {
59
- if (node.type !== "brace") return false;
60
- if (node.commas >> 0 + node.ranges >> 0 === 0) {
61
- node.invalid = true;
62
- return true;
63
- }
64
- return false;
65
- };
66
- exports.isInvalidBrace = (block) => {
67
- if (block.type !== "brace") return false;
68
- if (block.invalid === true || block.dollar) return true;
69
- if (block.commas >> 0 + block.ranges >> 0 === 0) {
70
- block.invalid = true;
71
- return true;
72
- }
73
- if (block.open !== true || block.close !== true) {
74
- block.invalid = true;
75
- return true;
76
- }
77
- return false;
78
- };
79
- exports.isOpenOrClose = (node) => {
80
- if (node.type === "open" || node.type === "close") {
81
- return true;
82
- }
83
- return node.open === true || node.close === true;
36
+ let node = block.nodes[n];
37
+ node && (type && node.type === type || node.type === "open" || node.type === "close") && node.escaped !== !0 && (node.value = "\\" + node.value, node.escaped = !0);
84
38
  };
85
- exports.reduce = (nodes) => nodes.reduce((acc, node) => {
86
- if (node.type === "text") acc.push(node.value);
87
- if (node.type === "range") node.type = "text";
88
- return acc;
89
- }, []);
39
+ exports.encloseBrace = (node) => node.type !== "brace" ? !1 : node.commas >> 0 + node.ranges >> 0 === 0 ? (node.invalid = !0, !0) : !1;
40
+ exports.isInvalidBrace = (block) => block.type !== "brace" ? !1 : block.invalid === !0 || block.dollar ? !0 : block.commas >> 0 + block.ranges >> 0 === 0 || block.open !== !0 || block.close !== !0 ? (block.invalid = !0, !0) : !1;
41
+ exports.isOpenOrClose = (node) => node.type === "open" || node.type === "close" ? !0 : node.open === !0 || node.close === !0;
42
+ exports.reduce = (nodes) => nodes.reduce((acc, node) => (node.type === "text" && acc.push(node.value), node.type === "range" && (node.type = "text"), acc), []);
90
43
  exports.flatten = (...args) => {
91
- const result = [];
92
- const flat = /* @__PURE__ */ __name((arr) => {
44
+ let result = [], flat = (arr) => {
93
45
  for (let i = 0; i < arr.length; i++) {
94
- const ele = arr[i];
46
+ let ele = arr[i];
95
47
  if (Array.isArray(ele)) {
96
48
  flat(ele);
97
49
  continue;
98
50
  }
99
- if (ele !== void 0) {
100
- result.push(ele);
101
- }
51
+ ele !== void 0 && result.push(ele);
102
52
  }
103
53
  return result;
104
- }, "flat");
105
- flat(args);
106
- return result;
54
+ };
55
+ return flat(args), result;
107
56
  };
108
57
  }
109
58
  });
@@ -114,26 +63,17 @@ var require_stringify = __commonJS({
114
63
  "use strict";
115
64
  var utils = require_utils();
116
65
  module.exports = (ast, options = {}) => {
117
- const stringify = /* @__PURE__ */ __name((node, parent = {}) => {
118
- const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
119
- const invalidNode = node.invalid === true && options.escapeInvalid === true;
120
- let output = "";
121
- if (node.value) {
122
- if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
123
- return "\\" + node.value;
124
- }
66
+ let stringify = (node, parent = {}) => {
67
+ let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent), invalidNode = node.invalid === !0 && options.escapeInvalid === !0, output = "";
68
+ if (node.value)
69
+ return (invalidBlock || invalidNode) && utils.isOpenOrClose(node) ? "\\" + node.value : node.value;
70
+ if (node.value)
125
71
  return node.value;
126
- }
127
- if (node.value) {
128
- return node.value;
129
- }
130
- if (node.nodes) {
131
- for (const child of node.nodes) {
72
+ if (node.nodes)
73
+ for (let child of node.nodes)
132
74
  output += stringify(child);
133
- }
134
- }
135
75
  return output;
136
- }, "stringify");
76
+ };
137
77
  return stringify(ast);
138
78
  };
139
79
  }
@@ -144,13 +84,7 @@ var require_is_number = __commonJS({
144
84
  "../../node_modules/is-number/index.js"(exports, module) {
145
85
  "use strict";
146
86
  module.exports = function(num) {
147
- if (typeof num === "number") {
148
- return num - num === 0;
149
- }
150
- if (typeof num === "string" && num.trim() !== "") {
151
- return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
152
- }
153
- return false;
87
+ return typeof num == "number" ? num - num === 0 : typeof num == "string" && num.trim() !== "" ? Number.isFinite ? Number.isFinite(+num) : isFinite(+num) : !1;
154
88
  };
155
89
  }
156
90
  });
@@ -159,208 +93,103 @@ var require_is_number = __commonJS({
159
93
  var require_to_regex_range = __commonJS({
160
94
  "../../node_modules/to-regex-range/index.js"(exports, module) {
161
95
  "use strict";
162
- var isNumber = require_is_number();
163
- var toRegexRange = /* @__PURE__ */ __name((min, max, options) => {
164
- if (isNumber(min) === false) {
96
+ var isNumber = require_is_number(), toRegexRange = (min, max, options) => {
97
+ if (isNumber(min) === !1)
165
98
  throw new TypeError("toRegexRange: expected the first argument to be a number");
166
- }
167
- if (max === void 0 || min === max) {
99
+ if (max === void 0 || min === max)
168
100
  return String(min);
169
- }
170
- if (isNumber(max) === false) {
101
+ if (isNumber(max) === !1)
171
102
  throw new TypeError("toRegexRange: expected the second argument to be a number.");
172
- }
173
- let opts = { relaxZeros: true, ...options };
174
- if (typeof opts.strictZeros === "boolean") {
175
- opts.relaxZeros = opts.strictZeros === false;
176
- }
177
- let relax = String(opts.relaxZeros);
178
- let shorthand = String(opts.shorthand);
179
- let capture = String(opts.capture);
180
- let wrap = String(opts.wrap);
181
- let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
182
- if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
103
+ let opts = { relaxZeros: !0, ...options };
104
+ typeof opts.strictZeros == "boolean" && (opts.relaxZeros = opts.strictZeros === !1);
105
+ let relax = String(opts.relaxZeros), shorthand = String(opts.shorthand), capture = String(opts.capture), wrap = String(opts.wrap), cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
106
+ if (toRegexRange.cache.hasOwnProperty(cacheKey))
183
107
  return toRegexRange.cache[cacheKey].result;
184
- }
185
- let a = Math.min(min, max);
186
- let b = Math.max(min, max);
108
+ let a = Math.min(min, max), b = Math.max(min, max);
187
109
  if (Math.abs(a - b) === 1) {
188
110
  let result = min + "|" + max;
189
- if (opts.capture) {
190
- return `(${result})`;
191
- }
192
- if (opts.wrap === false) {
193
- return result;
194
- }
195
- return `(?:${result})`;
196
- }
197
- let isPadded = hasPadding(min) || hasPadding(max);
198
- let state = { min, max, a, b };
199
- let positives = [];
200
- let negatives = [];
201
- if (isPadded) {
202
- state.isPadded = isPadded;
203
- state.maxLen = String(state.max).length;
111
+ return opts.capture ? `(${result})` : opts.wrap === !1 ? result : `(?:${result})`;
204
112
  }
205
- if (a < 0) {
113
+ let isPadded = hasPadding(min) || hasPadding(max), state = { min, max, a, b }, positives = [], negatives = [];
114
+ if (isPadded && (state.isPadded = isPadded, state.maxLen = String(state.max).length), a < 0) {
206
115
  let newMin = b < 0 ? Math.abs(b) : 1;
207
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
208
- a = state.a = 0;
116
+ negatives = splitToPatterns(newMin, Math.abs(a), state, opts), a = state.a = 0;
209
117
  }
210
- if (b >= 0) {
211
- positives = splitToPatterns(a, b, state, opts);
212
- }
213
- state.negatives = negatives;
214
- state.positives = positives;
215
- state.result = collatePatterns(negatives, positives, opts);
216
- if (opts.capture === true) {
217
- state.result = `(${state.result})`;
218
- } else if (opts.wrap !== false && positives.length + negatives.length > 1) {
219
- state.result = `(?:${state.result})`;
220
- }
221
- toRegexRange.cache[cacheKey] = state;
222
- return state.result;
223
- }, "toRegexRange");
118
+ return b >= 0 && (positives = splitToPatterns(a, b, state, opts)), state.negatives = negatives, state.positives = positives, state.result = collatePatterns(negatives, positives, opts), opts.capture === !0 ? state.result = `(${state.result})` : opts.wrap !== !1 && positives.length + negatives.length > 1 && (state.result = `(?:${state.result})`), toRegexRange.cache[cacheKey] = state, state.result;
119
+ };
224
120
  function collatePatterns(neg, pos, options) {
225
- let onlyNegative = filterPatterns(neg, pos, "-", false, options) || [];
226
- let onlyPositive = filterPatterns(pos, neg, "", false, options) || [];
227
- let intersected = filterPatterns(neg, pos, "-?", true, options) || [];
228
- let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
229
- return subpatterns.join("|");
121
+ let onlyNegative = filterPatterns(neg, pos, "-", !1, options) || [], onlyPositive = filterPatterns(pos, neg, "", !1, options) || [], intersected = filterPatterns(neg, pos, "-?", !0, options) || [];
122
+ return onlyNegative.concat(intersected).concat(onlyPositive).join("|");
230
123
  }
231
- __name(collatePatterns, "collatePatterns");
232
124
  function splitToRanges(min, max) {
233
- let nines = 1;
234
- let zeros = 1;
235
- let stop = countNines(min, nines);
236
- let stops = /* @__PURE__ */ new Set([max]);
237
- while (min <= stop && stop <= max) {
238
- stops.add(stop);
239
- nines += 1;
240
- stop = countNines(min, nines);
241
- }
242
- stop = countZeros(max + 1, zeros) - 1;
243
- while (min < stop && stop <= max) {
244
- stops.add(stop);
245
- zeros += 1;
246
- stop = countZeros(max + 1, zeros) - 1;
247
- }
248
- stops = [...stops];
249
- stops.sort(compare);
250
- return stops;
125
+ let nines = 1, zeros = 1, stop = countNines(min, nines), stops = /* @__PURE__ */ new Set([max]);
126
+ for (; min <= stop && stop <= max; )
127
+ stops.add(stop), nines += 1, stop = countNines(min, nines);
128
+ for (stop = countZeros(max + 1, zeros) - 1; min < stop && stop <= max; )
129
+ stops.add(stop), zeros += 1, stop = countZeros(max + 1, zeros) - 1;
130
+ return stops = [...stops], stops.sort(compare), stops;
251
131
  }
252
- __name(splitToRanges, "splitToRanges");
253
132
  function rangeToPattern(start, stop, options) {
254
- if (start === stop) {
133
+ if (start === stop)
255
134
  return { pattern: start, count: [], digits: 0 };
256
- }
257
- let zipped = zip(start, stop);
258
- let digits = zipped.length;
259
- let pattern = "";
260
- let count = 0;
135
+ let zipped = zip(start, stop), digits = zipped.length, pattern = "", count = 0;
261
136
  for (let i = 0; i < digits; i++) {
262
137
  let [startDigit, stopDigit] = zipped[i];
263
- if (startDigit === stopDigit) {
264
- pattern += startDigit;
265
- } else if (startDigit !== "0" || stopDigit !== "9") {
266
- pattern += toCharacterClass(startDigit, stopDigit, options);
267
- } else {
268
- count++;
269
- }
270
- }
271
- if (count) {
272
- pattern += options.shorthand === true ? "\\d" : "[0-9]";
138
+ startDigit === stopDigit ? pattern += startDigit : startDigit !== "0" || stopDigit !== "9" ? pattern += toCharacterClass(startDigit, stopDigit, options) : count++;
273
139
  }
274
- return { pattern, count: [count], digits };
140
+ return count && (pattern += options.shorthand === !0 ? "\\d" : "[0-9]"), { pattern, count: [count], digits };
275
141
  }
276
- __name(rangeToPattern, "rangeToPattern");
277
142
  function splitToPatterns(min, max, tok, options) {
278
- let ranges = splitToRanges(min, max);
279
- let tokens = [];
280
- let start = min;
281
- let prev;
143
+ let ranges = splitToRanges(min, max), tokens = [], start = min, prev;
282
144
  for (let i = 0; i < ranges.length; i++) {
283
- let max2 = ranges[i];
284
- let obj = rangeToPattern(String(start), String(max2), options);
285
- let zeros = "";
145
+ let max2 = ranges[i], obj = rangeToPattern(String(start), String(max2), options), zeros = "";
286
146
  if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
287
- if (prev.count.length > 1) {
288
- prev.count.pop();
289
- }
290
- prev.count.push(obj.count[0]);
291
- prev.string = prev.pattern + toQuantifier(prev.count);
292
- start = max2 + 1;
147
+ prev.count.length > 1 && prev.count.pop(), prev.count.push(obj.count[0]), prev.string = prev.pattern + toQuantifier(prev.count), start = max2 + 1;
293
148
  continue;
294
149
  }
295
- if (tok.isPadded) {
296
- zeros = padZeros(max2, tok, options);
297
- }
298
- obj.string = zeros + obj.pattern + toQuantifier(obj.count);
299
- tokens.push(obj);
300
- start = max2 + 1;
301
- prev = obj;
150
+ tok.isPadded && (zeros = padZeros(max2, tok, options)), obj.string = zeros + obj.pattern + toQuantifier(obj.count), tokens.push(obj), start = max2 + 1, prev = obj;
302
151
  }
303
152
  return tokens;
304
153
  }
305
- __name(splitToPatterns, "splitToPatterns");
306
154
  function filterPatterns(arr, comparison, prefix, intersection, options) {
307
155
  let result = [];
308
156
  for (let ele of arr) {
309
157
  let { string } = ele;
310
- if (!intersection && !contains(comparison, "string", string)) {
311
- result.push(prefix + string);
312
- }
313
- if (intersection && contains(comparison, "string", string)) {
314
- result.push(prefix + string);
315
- }
158
+ !intersection && !contains(comparison, "string", string) && result.push(prefix + string), intersection && contains(comparison, "string", string) && result.push(prefix + string);
316
159
  }
317
160
  return result;
318
161
  }
319
- __name(filterPatterns, "filterPatterns");
320
162
  function zip(a, b) {
321
163
  let arr = [];
322
164
  for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
323
165
  return arr;
324
166
  }
325
- __name(zip, "zip");
326
167
  function compare(a, b) {
327
168
  return a > b ? 1 : b > a ? -1 : 0;
328
169
  }
329
- __name(compare, "compare");
330
170
  function contains(arr, key, val) {
331
171
  return arr.some((ele) => ele[key] === val);
332
172
  }
333
- __name(contains, "contains");
334
173
  function countNines(min, len) {
335
174
  return Number(String(min).slice(0, -len) + "9".repeat(len));
336
175
  }
337
- __name(countNines, "countNines");
338
176
  function countZeros(integer, zeros) {
339
177
  return integer - integer % Math.pow(10, zeros);
340
178
  }
341
- __name(countZeros, "countZeros");
342
179
  function toQuantifier(digits) {
343
180
  let [start = 0, stop = ""] = digits;
344
- if (stop || start > 1) {
345
- return `{${start + (stop ? "," + stop : "")}}`;
346
- }
347
- return "";
181
+ return stop || start > 1 ? `{${start + (stop ? "," + stop : "")}}` : "";
348
182
  }
349
- __name(toQuantifier, "toQuantifier");
350
183
  function toCharacterClass(a, b, options) {
351
184
  return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
352
185
  }
353
- __name(toCharacterClass, "toCharacterClass");
354
186
  function hasPadding(str) {
355
187
  return /^-?(0+)\d/.test(str);
356
188
  }
357
- __name(hasPadding, "hasPadding");
358
189
  function padZeros(value, tok, options) {
359
- if (!tok.isPadded) {
190
+ if (!tok.isPadded)
360
191
  return value;
361
- }
362
- let diff = Math.abs(tok.maxLen - String(value).length);
363
- let relax = options.relaxZeros !== false;
192
+ let diff = Math.abs(tok.maxLen - String(value).length), relax = options.relaxZeros !== !1;
364
193
  switch (diff) {
365
194
  case 0:
366
195
  return "";
@@ -368,12 +197,10 @@ var require_to_regex_range = __commonJS({
368
197
  return relax ? "0?" : "0";
369
198
  case 2:
370
199
  return relax ? "0{0,2}" : "00";
371
- default: {
200
+ default:
372
201
  return relax ? `0{0,${diff}}` : `0{${diff}}`;
373
- }
374
202
  }
375
203
  }
376
- __name(padZeros, "padZeros");
377
204
  toRegexRange.cache = {};
378
205
  toRegexRange.clearCache = () => toRegexRange.cache = {};
379
206
  module.exports = toRegexRange;
@@ -384,192 +211,83 @@ var require_to_regex_range = __commonJS({
384
211
  var require_fill_range = __commonJS({
385
212
  "../../node_modules/fill-range/index.js"(exports, module) {
386
213
  "use strict";
387
- var util = __require("util");
388
- var toRegexRange = require_to_regex_range();
389
- var isObject = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object" && !Array.isArray(val), "isObject");
390
- var transform = /* @__PURE__ */ __name((toNumber) => {
391
- return (value) => toNumber === true ? Number(value) : String(value);
392
- }, "transform");
393
- var isValidValue = /* @__PURE__ */ __name((value) => {
394
- return typeof value === "number" || typeof value === "string" && value !== "";
395
- }, "isValidValue");
396
- var isNumber = /* @__PURE__ */ __name((num) => Number.isInteger(+num), "isNumber");
397
- var zeros = /* @__PURE__ */ __name((input) => {
398
- let value = `${input}`;
399
- let index = -1;
400
- if (value[0] === "-") value = value.slice(1);
401
- if (value === "0") return false;
402
- while (value[++index] === "0") ;
214
+ var util = __require("util"), toRegexRange = require_to_regex_range(), isObject = (val) => val !== null && typeof val == "object" && !Array.isArray(val), transform = (toNumber) => (value) => toNumber === !0 ? Number(value) : String(value), isValidValue = (value) => typeof value == "number" || typeof value == "string" && value !== "", isNumber = (num) => Number.isInteger(+num), zeros = (input) => {
215
+ let value = `${input}`, index = -1;
216
+ if (value[0] === "-" && (value = value.slice(1)), value === "0") return !1;
217
+ for (; value[++index] === "0"; ) ;
403
218
  return index > 0;
404
- }, "zeros");
405
- var stringify = /* @__PURE__ */ __name((start, end, options) => {
406
- if (typeof start === "string" || typeof end === "string") {
407
- return true;
408
- }
409
- return options.stringify === true;
410
- }, "stringify");
411
- var pad = /* @__PURE__ */ __name((input, maxLength, toNumber) => {
219
+ }, stringify = (start, end, options) => typeof start == "string" || typeof end == "string" ? !0 : options.stringify === !0, pad = (input, maxLength, toNumber) => {
412
220
  if (maxLength > 0) {
413
221
  let dash = input[0] === "-" ? "-" : "";
414
- if (dash) input = input.slice(1);
415
- input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
416
- }
417
- if (toNumber === false) {
418
- return String(input);
222
+ dash && (input = input.slice(1)), input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
419
223
  }
420
- return input;
421
- }, "pad");
422
- var toMaxLen = /* @__PURE__ */ __name((input, maxLength) => {
224
+ return toNumber === !1 ? String(input) : input;
225
+ }, toMaxLen = (input, maxLength) => {
423
226
  let negative = input[0] === "-" ? "-" : "";
424
- if (negative) {
425
- input = input.slice(1);
426
- maxLength--;
427
- }
428
- while (input.length < maxLength) input = "0" + input;
227
+ for (negative && (input = input.slice(1), maxLength--); input.length < maxLength; ) input = "0" + input;
429
228
  return negative ? "-" + input : input;
430
- }, "toMaxLen");
431
- var toSequence = /* @__PURE__ */ __name((parts, options, maxLen) => {
432
- parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
433
- parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
434
- let prefix = options.capture ? "" : "?:";
435
- let positives = "";
436
- let negatives = "";
437
- let result;
438
- if (parts.positives.length) {
439
- positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|");
440
- }
441
- if (parts.negatives.length) {
442
- negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`;
443
- }
444
- if (positives && negatives) {
445
- result = `${positives}|${negatives}`;
446
- } else {
447
- result = positives || negatives;
448
- }
449
- if (options.wrap) {
450
- return `(${prefix}${result})`;
451
- }
452
- return result;
453
- }, "toSequence");
454
- var toRange = /* @__PURE__ */ __name((a, b, isNumbers, options) => {
455
- if (isNumbers) {
456
- return toRegexRange(a, b, { wrap: false, ...options });
457
- }
229
+ }, toSequence = (parts, options, maxLen) => {
230
+ parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0), parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
231
+ let prefix = options.capture ? "" : "?:", positives = "", negatives = "", result;
232
+ return parts.positives.length && (positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|")), parts.negatives.length && (negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`), positives && negatives ? result = `${positives}|${negatives}` : result = positives || negatives, options.wrap ? `(${prefix}${result})` : result;
233
+ }, toRange = (a, b, isNumbers, options) => {
234
+ if (isNumbers)
235
+ return toRegexRange(a, b, { wrap: !1, ...options });
458
236
  let start = String.fromCharCode(a);
459
237
  if (a === b) return start;
460
238
  let stop = String.fromCharCode(b);
461
239
  return `[${start}-${stop}]`;
462
- }, "toRange");
463
- var toRegex = /* @__PURE__ */ __name((start, end, options) => {
240
+ }, toRegex = (start, end, options) => {
464
241
  if (Array.isArray(start)) {
465
- let wrap = options.wrap === true;
466
- let prefix = options.capture ? "" : "?:";
242
+ let wrap = options.wrap === !0, prefix = options.capture ? "" : "?:";
467
243
  return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
468
244
  }
469
245
  return toRegexRange(start, end, options);
470
- }, "toRegex");
471
- var rangeError = /* @__PURE__ */ __name((...args) => {
472
- return new RangeError("Invalid range arguments: " + util.inspect(...args));
473
- }, "rangeError");
474
- var invalidRange = /* @__PURE__ */ __name((start, end, options) => {
475
- if (options.strictRanges === true) throw rangeError([start, end]);
246
+ }, rangeError = (...args) => new RangeError("Invalid range arguments: " + util.inspect(...args)), invalidRange = (start, end, options) => {
247
+ if (options.strictRanges === !0) throw rangeError([start, end]);
476
248
  return [];
477
- }, "invalidRange");
478
- var invalidStep = /* @__PURE__ */ __name((step, options) => {
479
- if (options.strictRanges === true) {
249
+ }, invalidStep = (step, options) => {
250
+ if (options.strictRanges === !0)
480
251
  throw new TypeError(`Expected step "${step}" to be a number`);
481
- }
482
252
  return [];
483
- }, "invalidStep");
484
- var fillNumbers = /* @__PURE__ */ __name((start, end, step = 1, options = {}) => {
485
- let a = Number(start);
486
- let b = Number(end);
253
+ }, fillNumbers = (start, end, step = 1, options = {}) => {
254
+ let a = Number(start), b = Number(end);
487
255
  if (!Number.isInteger(a) || !Number.isInteger(b)) {
488
- if (options.strictRanges === true) throw rangeError([start, end]);
256
+ if (options.strictRanges === !0) throw rangeError([start, end]);
489
257
  return [];
490
258
  }
491
- if (a === 0) a = 0;
492
- if (b === 0) b = 0;
493
- let descending = a > b;
494
- let startString = String(start);
495
- let endString = String(end);
496
- let stepString = String(step);
259
+ a === 0 && (a = 0), b === 0 && (b = 0);
260
+ let descending = a > b, startString = String(start), endString = String(end), stepString = String(step);
497
261
  step = Math.max(Math.abs(step), 1);
498
- let padded = zeros(startString) || zeros(endString) || zeros(stepString);
499
- let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
500
- let toNumber = padded === false && stringify(start, end, options) === false;
501
- let format = options.transform || transform(toNumber);
502
- if (options.toRegex && step === 1) {
503
- return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
504
- }
505
- let parts = { negatives: [], positives: [] };
506
- let push = /* @__PURE__ */ __name((num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)), "push");
507
- let range = [];
508
- let index = 0;
509
- while (descending ? a >= b : a <= b) {
510
- if (options.toRegex === true && step > 1) {
511
- push(a);
512
- } else {
513
- range.push(pad(format(a, index), maxLen, toNumber));
514
- }
515
- a = descending ? a - step : a + step;
516
- index++;
517
- }
518
- if (options.toRegex === true) {
519
- return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: false, ...options });
520
- }
521
- return range;
522
- }, "fillNumbers");
523
- var fillLetters = /* @__PURE__ */ __name((start, end, step = 1, options = {}) => {
524
- if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
262
+ let padded = zeros(startString) || zeros(endString) || zeros(stepString), maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0, toNumber = padded === !1 && stringify(start, end, options) === !1, format = options.transform || transform(toNumber);
263
+ if (options.toRegex && step === 1)
264
+ return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), !0, options);
265
+ let parts = { negatives: [], positives: [] }, push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)), range = [], index = 0;
266
+ for (; descending ? a >= b : a <= b; )
267
+ options.toRegex === !0 && step > 1 ? push(a) : range.push(pad(format(a, index), maxLen, toNumber)), a = descending ? a - step : a + step, index++;
268
+ return options.toRegex === !0 ? step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: !1, ...options }) : range;
269
+ }, fillLetters = (start, end, step = 1, options = {}) => {
270
+ if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1)
525
271
  return invalidRange(start, end, options);
526
- }
527
- let format = options.transform || ((val) => String.fromCharCode(val));
528
- let a = `${start}`.charCodeAt(0);
529
- let b = `${end}`.charCodeAt(0);
530
- let descending = a > b;
531
- let min = Math.min(a, b);
532
- let max = Math.max(a, b);
533
- if (options.toRegex && step === 1) {
534
- return toRange(min, max, false, options);
535
- }
536
- let range = [];
537
- let index = 0;
538
- while (descending ? a >= b : a <= b) {
539
- range.push(format(a, index));
540
- a = descending ? a - step : a + step;
541
- index++;
542
- }
543
- if (options.toRegex === true) {
544
- return toRegex(range, null, { wrap: false, options });
545
- }
546
- return range;
547
- }, "fillLetters");
548
- var fill = /* @__PURE__ */ __name((start, end, step, options = {}) => {
549
- if (end == null && isValidValue(start)) {
272
+ let format = options.transform || ((val) => String.fromCharCode(val)), a = `${start}`.charCodeAt(0), b = `${end}`.charCodeAt(0), descending = a > b, min = Math.min(a, b), max = Math.max(a, b);
273
+ if (options.toRegex && step === 1)
274
+ return toRange(min, max, !1, options);
275
+ let range = [], index = 0;
276
+ for (; descending ? a >= b : a <= b; )
277
+ range.push(format(a, index)), a = descending ? a - step : a + step, index++;
278
+ return options.toRegex === !0 ? toRegex(range, null, { wrap: !1, options }) : range;
279
+ }, fill = (start, end, step, options = {}) => {
280
+ if (end == null && isValidValue(start))
550
281
  return [start];
551
- }
552
- if (!isValidValue(start) || !isValidValue(end)) {
282
+ if (!isValidValue(start) || !isValidValue(end))
553
283
  return invalidRange(start, end, options);
554
- }
555
- if (typeof step === "function") {
284
+ if (typeof step == "function")
556
285
  return fill(start, end, 1, { transform: step });
557
- }
558
- if (isObject(step)) {
286
+ if (isObject(step))
559
287
  return fill(start, end, 0, step);
560
- }
561
288
  let opts = { ...options };
562
- if (opts.capture === true) opts.wrap = true;
563
- step = step || opts.step || 1;
564
- if (!isNumber(step)) {
565
- if (step != null && !isObject(step)) return invalidStep(step, opts);
566
- return fill(start, end, 1, step);
567
- }
568
- if (isNumber(start) && isNumber(end)) {
569
- return fillNumbers(start, end, step, opts);
570
- }
571
- return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
572
- }, "fill");
289
+ return opts.capture === !0 && (opts.wrap = !0), step = step || opts.step || 1, isNumber(step) ? isNumber(start) && isNumber(end) ? fillNumbers(start, end, step, opts) : fillLetters(start, end, Math.max(Math.abs(step), 1), opts) : step != null && !isObject(step) ? invalidStep(step, opts) : fill(start, end, 1, step);
290
+ };
573
291
  module.exports = fill;
574
292
  }
575
293
  });
@@ -578,50 +296,33 @@ var require_fill_range = __commonJS({
578
296
  var require_compile = __commonJS({
579
297
  "../../node_modules/braces/lib/compile.js"(exports, module) {
580
298
  "use strict";
581
- var fill = require_fill_range();
582
- var utils = require_utils();
583
- var compile = /* @__PURE__ */ __name((ast, options = {}) => {
584
- const walk = /* @__PURE__ */ __name((node, parent = {}) => {
585
- const invalidBlock = utils.isInvalidBrace(parent);
586
- const invalidNode = node.invalid === true && options.escapeInvalid === true;
587
- const invalid = invalidBlock === true || invalidNode === true;
588
- const prefix = options.escapeInvalid === true ? "\\" : "";
589
- let output = "";
590
- if (node.isOpen === true) {
299
+ var fill = require_fill_range(), utils = require_utils(), compile = (ast, options = {}) => {
300
+ let walk = (node, parent = {}) => {
301
+ let invalidBlock = utils.isInvalidBrace(parent), invalidNode = node.invalid === !0 && options.escapeInvalid === !0, invalid = invalidBlock === !0 || invalidNode === !0, prefix = options.escapeInvalid === !0 ? "\\" : "", output = "";
302
+ if (node.isOpen === !0)
591
303
  return prefix + node.value;
592
- }
593
- if (node.isClose === true) {
594
- console.log("node.isClose", prefix, node.value);
595
- return prefix + node.value;
596
- }
597
- if (node.type === "open") {
304
+ if (node.isClose === !0)
305
+ return console.log("node.isClose", prefix, node.value), prefix + node.value;
306
+ if (node.type === "open")
598
307
  return invalid ? prefix + node.value : "(";
599
- }
600
- if (node.type === "close") {
308
+ if (node.type === "close")
601
309
  return invalid ? prefix + node.value : ")";
602
- }
603
- if (node.type === "comma") {
310
+ if (node.type === "comma")
604
311
  return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
605
- }
606
- if (node.value) {
312
+ if (node.value)
607
313
  return node.value;
608
- }
609
314
  if (node.nodes && node.ranges > 0) {
610
- const args = utils.reduce(node.nodes);
611
- const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
612
- if (range.length !== 0) {
315
+ let args = utils.reduce(node.nodes), range = fill(...args, { ...options, wrap: !1, toRegex: !0, strictZeros: !0 });
316
+ if (range.length !== 0)
613
317
  return args.length > 1 && range.length > 1 ? `(${range})` : range;
614
- }
615
318
  }
616
- if (node.nodes) {
617
- for (const child of node.nodes) {
319
+ if (node.nodes)
320
+ for (let child of node.nodes)
618
321
  output += walk(child, node);
619
- }
620
- }
621
322
  return output;
622
- }, "walk");
323
+ };
623
324
  return walk(ast);
624
- }, "compile");
325
+ };
625
326
  module.exports = compile;
626
327
  }
627
328
  });
@@ -630,74 +331,48 @@ var require_compile = __commonJS({
630
331
  var require_expand = __commonJS({
631
332
  "../../node_modules/braces/lib/expand.js"(exports, module) {
632
333
  "use strict";
633
- var fill = require_fill_range();
634
- var stringify = require_stringify();
635
- var utils = require_utils();
636
- var append = /* @__PURE__ */ __name((queue = "", stash = "", enclose = false) => {
637
- const result = [];
638
- queue = [].concat(queue);
639
- stash = [].concat(stash);
640
- if (!stash.length) return queue;
641
- if (!queue.length) {
334
+ var fill = require_fill_range(), stringify = require_stringify(), utils = require_utils(), append = (queue = "", stash = "", enclose = !1) => {
335
+ let result = [];
336
+ if (queue = [].concat(queue), stash = [].concat(stash), !stash.length) return queue;
337
+ if (!queue.length)
642
338
  return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
643
- }
644
- for (const item of queue) {
645
- if (Array.isArray(item)) {
646
- for (const value of item) {
339
+ for (let item of queue)
340
+ if (Array.isArray(item))
341
+ for (let value of item)
647
342
  result.push(append(value, stash, enclose));
648
- }
649
- } else {
650
- for (let ele of stash) {
651
- if (enclose === true && typeof ele === "string") ele = `{${ele}}`;
652
- result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
653
- }
654
- }
655
- }
343
+ else
344
+ for (let ele of stash)
345
+ enclose === !0 && typeof ele == "string" && (ele = `{${ele}}`), result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
656
346
  return utils.flatten(result);
657
- }, "append");
658
- var expand = /* @__PURE__ */ __name((ast, options = {}) => {
659
- const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
660
- const walk = /* @__PURE__ */ __name((node, parent = {}) => {
347
+ }, expand = (ast, options = {}) => {
348
+ let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit, walk = (node, parent = {}) => {
661
349
  node.queue = [];
662
- let p = parent;
663
- let q = parent.queue;
664
- while (p.type !== "brace" && p.type !== "root" && p.parent) {
665
- p = p.parent;
666
- q = p.queue;
667
- }
350
+ let p = parent, q = parent.queue;
351
+ for (; p.type !== "brace" && p.type !== "root" && p.parent; )
352
+ p = p.parent, q = p.queue;
668
353
  if (node.invalid || node.dollar) {
669
354
  q.push(append(q.pop(), stringify(node, options)));
670
355
  return;
671
356
  }
672
- if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
357
+ if (node.type === "brace" && node.invalid !== !0 && node.nodes.length === 2) {
673
358
  q.push(append(q.pop(), ["{}"]));
674
359
  return;
675
360
  }
676
361
  if (node.nodes && node.ranges > 0) {
677
- const args = utils.reduce(node.nodes);
678
- if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
362
+ let args = utils.reduce(node.nodes);
363
+ if (utils.exceedsLimit(...args, options.step, rangeLimit))
679
364
  throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
680
- }
681
365
  let range = fill(...args, options);
682
- if (range.length === 0) {
683
- range = stringify(node, options);
684
- }
685
- q.push(append(q.pop(), range));
686
- node.nodes = [];
366
+ range.length === 0 && (range = stringify(node, options)), q.push(append(q.pop(), range)), node.nodes = [];
687
367
  return;
688
368
  }
689
- const enclose = utils.encloseBrace(node);
690
- let queue = node.queue;
691
- let block = node;
692
- while (block.type !== "brace" && block.type !== "root" && block.parent) {
693
- block = block.parent;
694
- queue = block.queue;
695
- }
369
+ let enclose = utils.encloseBrace(node), queue = node.queue, block = node;
370
+ for (; block.type !== "brace" && block.type !== "root" && block.parent; )
371
+ block = block.parent, queue = block.queue;
696
372
  for (let i = 0; i < node.nodes.length; i++) {
697
- const child = node.nodes[i];
373
+ let child = node.nodes[i];
698
374
  if (child.type === "comma" && node.type === "brace") {
699
- if (i === 1) queue.push("");
700
- queue.push("");
375
+ i === 1 && queue.push(""), queue.push("");
701
376
  continue;
702
377
  }
703
378
  if (child.type === "close") {
@@ -708,14 +383,12 @@ var require_expand = __commonJS({
708
383
  queue.push(append(queue.pop(), child.value));
709
384
  continue;
710
385
  }
711
- if (child.nodes) {
712
- walk(child, node);
713
- }
386
+ child.nodes && walk(child, node);
714
387
  }
715
388
  return queue;
716
- }, "walk");
389
+ };
717
390
  return utils.flatten(walk(ast));
718
- }, "expand");
391
+ };
719
392
  module.exports = expand;
720
393
  }
721
394
  });
@@ -787,7 +460,8 @@ var require_constants = __commonJS({
787
460
  /* { */
788
461
  CHAR_LEFT_SQUARE_BRACKET: "[",
789
462
  /* [ */
790
- CHAR_LINE_FEED: "\n",
463
+ CHAR_LINE_FEED: `
464
+ `,
791
465
  /* \n */
792
466
  CHAR_NO_BREAK_SPACE: "\xA0",
793
467
  /* \u00A0 */
@@ -825,8 +499,7 @@ var require_constants = __commonJS({
825
499
  var require_parse = __commonJS({
826
500
  "../../node_modules/braces/lib/parse.js"(exports, module) {
827
501
  "use strict";
828
- var stringify = require_stringify();
829
- var {
502
+ var stringify = require_stringify(), {
830
503
  MAX_LENGTH,
831
504
  CHAR_BACKSLASH,
832
505
  /* \ */
@@ -854,207 +527,144 @@ var require_parse = __commonJS({
854
527
  /* ' */
855
528
  CHAR_NO_BREAK_SPACE,
856
529
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
857
- } = require_constants();
858
- var parse = /* @__PURE__ */ __name((input, options = {}) => {
859
- if (typeof input !== "string") {
530
+ } = require_constants(), parse = (input, options = {}) => {
531
+ if (typeof input != "string")
860
532
  throw new TypeError("Expected a string");
861
- }
862
- const opts = options || {};
863
- const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
864
- if (input.length > max) {
533
+ let opts = options || {}, max = typeof opts.maxLength == "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
534
+ if (input.length > max)
865
535
  throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
866
- }
867
- const ast = { type: "root", input, nodes: [] };
868
- const stack = [ast];
869
- let block = ast;
870
- let prev = ast;
871
- let brackets = 0;
872
- const length = input.length;
873
- let index = 0;
874
- let depth = 0;
875
- let value;
876
- const advance = /* @__PURE__ */ __name(() => input[index++], "advance");
877
- const push = /* @__PURE__ */ __name((node) => {
878
- if (node.type === "text" && prev.type === "dot") {
879
- prev.type = "text";
880
- }
881
- if (prev && prev.type === "text" && node.type === "text") {
536
+ let ast = { type: "root", input, nodes: [] }, stack = [ast], block = ast, prev = ast, brackets = 0, length = input.length, index = 0, depth = 0, value, advance = () => input[index++], push = (node) => {
537
+ if (node.type === "text" && prev.type === "dot" && (prev.type = "text"), prev && prev.type === "text" && node.type === "text") {
882
538
  prev.value += node.value;
883
539
  return;
884
540
  }
885
- block.nodes.push(node);
886
- node.parent = block;
887
- node.prev = prev;
888
- prev = node;
889
- return node;
890
- }, "push");
891
- push({ type: "bos" });
892
- while (index < length) {
893
- block = stack[stack.length - 1];
894
- value = advance();
895
- if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
896
- continue;
897
- }
898
- if (value === CHAR_BACKSLASH) {
899
- push({ type: "text", value: (options.keepEscaping ? value : "") + advance() });
900
- continue;
901
- }
902
- if (value === CHAR_RIGHT_SQUARE_BRACKET) {
903
- push({ type: "text", value: "\\" + value });
904
- continue;
905
- }
906
- if (value === CHAR_LEFT_SQUARE_BRACKET) {
907
- brackets++;
908
- let next;
909
- while (index < length && (next = advance())) {
910
- value += next;
911
- if (next === CHAR_LEFT_SQUARE_BRACKET) {
912
- brackets++;
913
- continue;
914
- }
915
- if (next === CHAR_BACKSLASH) {
916
- value += advance();
917
- continue;
918
- }
919
- if (next === CHAR_RIGHT_SQUARE_BRACKET) {
920
- brackets--;
921
- if (brackets === 0) {
922
- break;
541
+ return block.nodes.push(node), node.parent = block, node.prev = prev, prev = node, node;
542
+ };
543
+ for (push({ type: "bos" }); index < length; )
544
+ if (block = stack[stack.length - 1], value = advance(), !(value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE)) {
545
+ if (value === CHAR_BACKSLASH) {
546
+ push({ type: "text", value: (options.keepEscaping ? value : "") + advance() });
547
+ continue;
548
+ }
549
+ if (value === CHAR_RIGHT_SQUARE_BRACKET) {
550
+ push({ type: "text", value: "\\" + value });
551
+ continue;
552
+ }
553
+ if (value === CHAR_LEFT_SQUARE_BRACKET) {
554
+ brackets++;
555
+ let next;
556
+ for (; index < length && (next = advance()); ) {
557
+ if (value += next, next === CHAR_LEFT_SQUARE_BRACKET) {
558
+ brackets++;
559
+ continue;
923
560
  }
561
+ if (next === CHAR_BACKSLASH) {
562
+ value += advance();
563
+ continue;
564
+ }
565
+ if (next === CHAR_RIGHT_SQUARE_BRACKET && (brackets--, brackets === 0))
566
+ break;
924
567
  }
925
- }
926
- push({ type: "text", value });
927
- continue;
928
- }
929
- if (value === CHAR_LEFT_PARENTHESES) {
930
- block = push({ type: "paren", nodes: [] });
931
- stack.push(block);
932
- push({ type: "text", value });
933
- continue;
934
- }
935
- if (value === CHAR_RIGHT_PARENTHESES) {
936
- if (block.type !== "paren") {
937
568
  push({ type: "text", value });
938
569
  continue;
939
570
  }
940
- block = stack.pop();
941
- push({ type: "text", value });
942
- block = stack[stack.length - 1];
943
- continue;
944
- }
945
- if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
946
- const open = value;
947
- let next;
948
- if (options.keepQuotes !== true) {
949
- value = "";
571
+ if (value === CHAR_LEFT_PARENTHESES) {
572
+ block = push({ type: "paren", nodes: [] }), stack.push(block), push({ type: "text", value });
573
+ continue;
950
574
  }
951
- while (index < length && (next = advance())) {
952
- if (next === CHAR_BACKSLASH) {
953
- value += next + advance();
575
+ if (value === CHAR_RIGHT_PARENTHESES) {
576
+ if (block.type !== "paren") {
577
+ push({ type: "text", value });
954
578
  continue;
955
579
  }
956
- if (next === open) {
957
- if (options.keepQuotes === true) value += next;
958
- break;
959
- }
960
- value += next;
580
+ block = stack.pop(), push({ type: "text", value }), block = stack[stack.length - 1];
581
+ continue;
961
582
  }
962
- push({ type: "text", value });
963
- continue;
964
- }
965
- if (value === CHAR_LEFT_CURLY_BRACE) {
966
- depth++;
967
- const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
968
- const brace = {
969
- type: "brace",
970
- open: true,
971
- close: false,
972
- dollar,
973
- depth,
974
- commas: 0,
975
- ranges: 0,
976
- nodes: []
977
- };
978
- block = push(brace);
979
- stack.push(block);
980
- push({ type: "open", value });
981
- continue;
982
- }
983
- if (value === CHAR_RIGHT_CURLY_BRACE) {
984
- if (block.type !== "brace") {
583
+ if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
584
+ let open = value, next;
585
+ for (options.keepQuotes !== !0 && (value = ""); index < length && (next = advance()); ) {
586
+ if (next === CHAR_BACKSLASH) {
587
+ value += next + advance();
588
+ continue;
589
+ }
590
+ if (next === open) {
591
+ options.keepQuotes === !0 && (value += next);
592
+ break;
593
+ }
594
+ value += next;
595
+ }
985
596
  push({ type: "text", value });
986
597
  continue;
987
598
  }
988
- const type = "close";
989
- block = stack.pop();
990
- block.close = true;
991
- push({ type, value });
992
- depth--;
993
- block = stack[stack.length - 1];
994
- continue;
995
- }
996
- if (value === CHAR_COMMA && depth > 0) {
997
- if (block.ranges > 0) {
998
- block.ranges = 0;
999
- const open = block.nodes.shift();
1000
- block.nodes = [open, { type: "text", value: stringify(block) }];
599
+ if (value === CHAR_LEFT_CURLY_BRACE) {
600
+ depth++;
601
+ let brace = {
602
+ type: "brace",
603
+ open: !0,
604
+ close: !1,
605
+ dollar: prev.value && prev.value.slice(-1) === "$" || block.dollar === !0,
606
+ depth,
607
+ commas: 0,
608
+ ranges: 0,
609
+ nodes: []
610
+ };
611
+ block = push(brace), stack.push(block), push({ type: "open", value });
612
+ continue;
1001
613
  }
1002
- push({ type: "comma", value });
1003
- block.commas++;
1004
- continue;
1005
- }
1006
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
1007
- const siblings = block.nodes;
1008
- if (depth === 0 || siblings.length === 0) {
1009
- push({ type: "text", value });
614
+ if (value === CHAR_RIGHT_CURLY_BRACE) {
615
+ if (block.type !== "brace") {
616
+ push({ type: "text", value });
617
+ continue;
618
+ }
619
+ let type = "close";
620
+ block = stack.pop(), block.close = !0, push({ type, value }), depth--, block = stack[stack.length - 1];
1010
621
  continue;
1011
622
  }
1012
- if (prev.type === "dot") {
1013
- block.range = [];
1014
- prev.value += value;
1015
- prev.type = "range";
1016
- if (block.nodes.length !== 3 && block.nodes.length !== 5) {
1017
- block.invalid = true;
623
+ if (value === CHAR_COMMA && depth > 0) {
624
+ if (block.ranges > 0) {
1018
625
  block.ranges = 0;
1019
- prev.type = "text";
1020
- continue;
626
+ let open = block.nodes.shift();
627
+ block.nodes = [open, { type: "text", value: stringify(block) }];
1021
628
  }
1022
- block.ranges++;
1023
- block.args = [];
629
+ push({ type: "comma", value }), block.commas++;
1024
630
  continue;
1025
631
  }
1026
- if (prev.type === "range") {
1027
- siblings.pop();
1028
- const before = siblings[siblings.length - 1];
1029
- before.value += prev.value + value;
1030
- prev = before;
1031
- block.ranges--;
632
+ if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
633
+ let siblings = block.nodes;
634
+ if (depth === 0 || siblings.length === 0) {
635
+ push({ type: "text", value });
636
+ continue;
637
+ }
638
+ if (prev.type === "dot") {
639
+ if (block.range = [], prev.value += value, prev.type = "range", block.nodes.length !== 3 && block.nodes.length !== 5) {
640
+ block.invalid = !0, block.ranges = 0, prev.type = "text";
641
+ continue;
642
+ }
643
+ block.ranges++, block.args = [];
644
+ continue;
645
+ }
646
+ if (prev.type === "range") {
647
+ siblings.pop();
648
+ let before = siblings[siblings.length - 1];
649
+ before.value += prev.value + value, prev = before, block.ranges--;
650
+ continue;
651
+ }
652
+ push({ type: "dot", value });
1032
653
  continue;
1033
654
  }
1034
- push({ type: "dot", value });
1035
- continue;
655
+ push({ type: "text", value });
1036
656
  }
1037
- push({ type: "text", value });
1038
- }
1039
- do {
1040
- block = stack.pop();
1041
- if (block.type !== "root") {
657
+ do
658
+ if (block = stack.pop(), block.type !== "root") {
1042
659
  block.nodes.forEach((node) => {
1043
- if (!node.nodes) {
1044
- if (node.type === "open") node.isOpen = true;
1045
- if (node.type === "close") node.isClose = true;
1046
- if (!node.nodes) node.type = "text";
1047
- node.invalid = true;
1048
- }
660
+ node.nodes || (node.type === "open" && (node.isOpen = !0), node.type === "close" && (node.isClose = !0), node.nodes || (node.type = "text"), node.invalid = !0);
1049
661
  });
1050
- const parent = stack[stack.length - 1];
1051
- const index2 = parent.nodes.indexOf(block);
662
+ let parent = stack[stack.length - 1], index2 = parent.nodes.indexOf(block);
1052
663
  parent.nodes.splice(index2, 1, ...block.nodes);
1053
664
  }
1054
- } while (stack.length > 0);
1055
- push({ type: "eos" });
1056
- return ast;
1057
- }, "parse");
665
+ while (stack.length > 0);
666
+ return push({ type: "eos" }), ast;
667
+ };
1058
668
  module.exports = parse;
1059
669
  }
1060
670
  });
@@ -1063,61 +673,26 @@ var require_parse = __commonJS({
1063
673
  var require_braces = __commonJS({
1064
674
  "../../node_modules/braces/index.js"(exports, module) {
1065
675
  "use strict";
1066
- var stringify = require_stringify();
1067
- var compile = require_compile();
1068
- var expand = require_expand();
1069
- var parse = require_parse();
1070
- var braces = /* @__PURE__ */ __name((input, options = {}) => {
676
+ var stringify = require_stringify(), compile = require_compile(), expand = require_expand(), parse = require_parse(), braces = (input, options = {}) => {
1071
677
  let output = [];
1072
- if (Array.isArray(input)) {
1073
- for (const pattern of input) {
1074
- const result = braces.create(pattern, options);
1075
- if (Array.isArray(result)) {
1076
- output.push(...result);
1077
- } else {
1078
- output.push(result);
1079
- }
678
+ if (Array.isArray(input))
679
+ for (let pattern of input) {
680
+ let result = braces.create(pattern, options);
681
+ Array.isArray(result) ? output.push(...result) : output.push(result);
1080
682
  }
1081
- } else {
683
+ else
1082
684
  output = [].concat(braces.create(input, options));
1083
- }
1084
- if (options && options.expand === true && options.nodupes === true) {
1085
- output = [...new Set(output)];
1086
- }
1087
- return output;
1088
- }, "braces");
1089
- braces.parse = (input, options = {}) => parse(input, options);
1090
- braces.stringify = (input, options = {}) => {
1091
- if (typeof input === "string") {
1092
- return stringify(braces.parse(input, options), options);
1093
- }
1094
- return stringify(input, options);
1095
- };
1096
- braces.compile = (input, options = {}) => {
1097
- if (typeof input === "string") {
1098
- input = braces.parse(input, options);
1099
- }
1100
- return compile(input, options);
685
+ return options && options.expand === !0 && options.nodupes === !0 && (output = [...new Set(output)]), output;
1101
686
  };
687
+ braces.parse = (input, options = {}) => parse(input, options);
688
+ braces.stringify = (input, options = {}) => stringify(typeof input == "string" ? braces.parse(input, options) : input, options);
689
+ braces.compile = (input, options = {}) => (typeof input == "string" && (input = braces.parse(input, options)), compile(input, options));
1102
690
  braces.expand = (input, options = {}) => {
1103
- if (typeof input === "string") {
1104
- input = braces.parse(input, options);
1105
- }
691
+ typeof input == "string" && (input = braces.parse(input, options));
1106
692
  let result = expand(input, options);
1107
- if (options.noempty === true) {
1108
- result = result.filter(Boolean);
1109
- }
1110
- if (options.nodupes === true) {
1111
- result = [...new Set(result)];
1112
- }
1113
- return result;
1114
- };
1115
- braces.create = (input, options = {}) => {
1116
- if (input === "" || input.length < 3) {
1117
- return [input];
1118
- }
1119
- return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options);
693
+ return options.noempty === !0 && (result = result.filter(Boolean)), options.nodupes === !0 && (result = [...new Set(result)]), result;
1120
694
  };
695
+ braces.create = (input, options = {}) => input === "" || input.length < 3 ? [input] : options.expand !== !0 ? braces.compile(input, options) : braces.expand(input, options);
1121
696
  module.exports = braces;
1122
697
  }
1123
698
  });
@@ -1126,25 +701,7 @@ var require_braces = __commonJS({
1126
701
  var require_constants2 = __commonJS({
1127
702
  "../../node_modules/picomatch/lib/constants.js"(exports, module) {
1128
703
  "use strict";
1129
- var path = __require("path");
1130
- var WIN_SLASH = "\\\\/";
1131
- var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1132
- var DOT_LITERAL = "\\.";
1133
- var PLUS_LITERAL = "\\+";
1134
- var QMARK_LITERAL = "\\?";
1135
- var SLASH_LITERAL = "\\/";
1136
- var ONE_CHAR = "(?=.)";
1137
- var QMARK = "[^/]";
1138
- var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
1139
- var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
1140
- var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
1141
- var NO_DOT = `(?!${DOT_LITERAL})`;
1142
- var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
1143
- var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
1144
- var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
1145
- var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
1146
- var STAR = `${QMARK}*?`;
1147
- var POSIX_CHARS = {
704
+ var path = __require("path"), WIN_SLASH = "\\\\/", WIN_NO_SLASH = `[^${WIN_SLASH}]`, DOT_LITERAL = "\\.", PLUS_LITERAL = "\\+", QMARK_LITERAL = "\\?", SLASH_LITERAL = "\\/", ONE_CHAR = "(?=.)", QMARK = "[^/]", END_ANCHOR = `(?:${SLASH_LITERAL}|$)`, START_ANCHOR = `(?:^|${SLASH_LITERAL})`, DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`, NO_DOT = `(?!${DOT_LITERAL})`, NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`, STAR = `${QMARK}*?`, POSIX_CHARS = {
1148
705
  DOT_LITERAL,
1149
706
  PLUS_LITERAL,
1150
707
  QMARK_LITERAL,
@@ -1160,8 +717,7 @@ var require_constants2 = __commonJS({
1160
717
  QMARK_NO_DOT,
1161
718
  STAR,
1162
719
  START_ANCHOR
1163
- };
1164
- var WINDOWS_CHARS = {
720
+ }, WINDOWS_CHARS = {
1165
721
  ...POSIX_CHARS,
1166
722
  SLASH_LITERAL: `[${WIN_SLASH}]`,
1167
723
  QMARK: WIN_NO_SLASH,
@@ -1174,8 +730,7 @@ var require_constants2 = __commonJS({
1174
730
  QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
1175
731
  START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
1176
732
  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
1177
- };
1178
- var POSIX_REGEX_SOURCE = {
733
+ }, POSIX_REGEX_SOURCE = {
1179
734
  alnum: "a-zA-Z0-9",
1180
735
  alpha: "a-zA-Z",
1181
736
  ascii: "\\x00-\\x7F",
@@ -1313,7 +868,7 @@ var require_constants2 = __commonJS({
1313
868
  * Create GLOB_CHARS
1314
869
  */
1315
870
  globChars(win32) {
1316
- return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
871
+ return win32 === !0 ? WINDOWS_CHARS : POSIX_CHARS;
1317
872
  }
1318
873
  };
1319
874
  }
@@ -1323,59 +878,34 @@ var require_constants2 = __commonJS({
1323
878
  var require_utils2 = __commonJS({
1324
879
  "../../node_modules/picomatch/lib/utils.js"(exports) {
1325
880
  "use strict";
1326
- var path = __require("path");
1327
- var win32 = process.platform === "win32";
1328
- var {
881
+ var path = __require("path"), win32 = process.platform === "win32", {
1329
882
  REGEX_BACKSLASH,
1330
883
  REGEX_REMOVE_BACKSLASH,
1331
884
  REGEX_SPECIAL_CHARS,
1332
885
  REGEX_SPECIAL_CHARS_GLOBAL
1333
886
  } = require_constants2();
1334
- exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
887
+ exports.isObject = (val) => val !== null && typeof val == "object" && !Array.isArray(val);
1335
888
  exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
1336
889
  exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
1337
890
  exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
1338
891
  exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
1339
- exports.removeBackslashes = (str) => {
1340
- return str.replace(REGEX_REMOVE_BACKSLASH, (match2) => {
1341
- return match2 === "\\" ? "" : match2;
1342
- });
1343
- };
892
+ exports.removeBackslashes = (str) => str.replace(REGEX_REMOVE_BACKSLASH, (match2) => match2 === "\\" ? "" : match2);
1344
893
  exports.supportsLookbehinds = () => {
1345
- const segs = process.version.slice(1).split(".").map(Number);
1346
- if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) {
1347
- return true;
1348
- }
1349
- return false;
1350
- };
1351
- exports.isWindows = (options) => {
1352
- if (options && typeof options.windows === "boolean") {
1353
- return options.windows;
1354
- }
1355
- return win32 === true || path.sep === "\\";
894
+ let segs = process.version.slice(1).split(".").map(Number);
895
+ return segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10;
1356
896
  };
897
+ exports.isWindows = (options) => options && typeof options.windows == "boolean" ? options.windows : win32 === !0 || path.sep === "\\";
1357
898
  exports.escapeLast = (input, char, lastIdx) => {
1358
- const idx = input.lastIndexOf(char, lastIdx);
1359
- if (idx === -1) return input;
1360
- if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1);
1361
- return `${input.slice(0, idx)}\\${input.slice(idx)}`;
899
+ let idx = input.lastIndexOf(char, lastIdx);
900
+ return idx === -1 ? input : input[idx - 1] === "\\" ? exports.escapeLast(input, char, idx - 1) : `${input.slice(0, idx)}\\${input.slice(idx)}`;
1362
901
  };
1363
902
  exports.removePrefix = (input, state = {}) => {
1364
903
  let output = input;
1365
- if (output.startsWith("./")) {
1366
- output = output.slice(2);
1367
- state.prefix = "./";
1368
- }
1369
- return output;
904
+ return output.startsWith("./") && (output = output.slice(2), state.prefix = "./"), output;
1370
905
  };
1371
906
  exports.wrapOutput = (input, state = {}, options = {}) => {
1372
- const prepend = options.contains ? "" : "^";
1373
- const append = options.contains ? "" : "$";
1374
- let output = `${prepend}(?:${input})${append}`;
1375
- if (state.negated === true) {
1376
- output = `(?:^(?!${output}).*$)`;
1377
- }
1378
- return output;
907
+ let prepend = options.contains ? "" : "^", append = options.contains ? "" : "$", output = `${prepend}(?:${input})${append}`;
908
+ return state.negated === !0 && (output = `(?:^(?!${output}).*$)`), output;
1379
909
  };
1380
910
  }
1381
911
  });
@@ -1384,8 +914,7 @@ var require_utils2 = __commonJS({
1384
914
  var require_scan = __commonJS({
1385
915
  "../../node_modules/picomatch/lib/scan.js"(exports, module) {
1386
916
  "use strict";
1387
- var utils = require_utils2();
1388
- var {
917
+ var utils = require_utils2(), {
1389
918
  CHAR_ASTERISK,
1390
919
  /* * */
1391
920
  CHAR_AT,
@@ -1416,107 +945,48 @@ var require_scan = __commonJS({
1416
945
  /* ) */
1417
946
  CHAR_RIGHT_SQUARE_BRACKET
1418
947
  /* ] */
1419
- } = require_constants2();
1420
- var isPathSeparator = /* @__PURE__ */ __name((code) => {
1421
- return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
1422
- }, "isPathSeparator");
1423
- var depth = /* @__PURE__ */ __name((token) => {
1424
- if (token.isPrefix !== true) {
1425
- token.depth = token.isGlobstar ? Infinity : 1;
1426
- }
1427
- }, "depth");
1428
- var scan = /* @__PURE__ */ __name((input, options) => {
1429
- const opts = options || {};
1430
- const length = input.length - 1;
1431
- const scanToEnd = opts.parts === true || opts.scanToEnd === true;
1432
- const slashes = [];
1433
- const tokens = [];
1434
- const parts = [];
1435
- let str = input;
1436
- let index = -1;
1437
- let start = 0;
1438
- let lastIndex = 0;
1439
- let isBrace = false;
1440
- let isBracket = false;
1441
- let isGlob = false;
1442
- let isExtglob = false;
1443
- let isGlobstar = false;
1444
- let braceEscaped = false;
1445
- let backslashes = false;
1446
- let negated = false;
1447
- let negatedExtglob = false;
1448
- let finished = false;
1449
- let braces = 0;
1450
- let prev;
1451
- let code;
1452
- let token = { value: "", depth: 0, isGlob: false };
1453
- const eos = /* @__PURE__ */ __name(() => index >= length, "eos");
1454
- const peek = /* @__PURE__ */ __name(() => str.charCodeAt(index + 1), "peek");
1455
- const advance = /* @__PURE__ */ __name(() => {
1456
- prev = code;
1457
- return str.charCodeAt(++index);
1458
- }, "advance");
1459
- while (index < length) {
948
+ } = require_constants2(), isPathSeparator = (code) => code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH, depth = (token) => {
949
+ token.isPrefix !== !0 && (token.depth = token.isGlobstar ? 1 / 0 : 1);
950
+ }, scan = (input, options) => {
951
+ let opts = options || {}, length = input.length - 1, scanToEnd = opts.parts === !0 || opts.scanToEnd === !0, slashes = [], tokens = [], parts = [], str = input, index = -1, start = 0, lastIndex = 0, isBrace = !1, isBracket = !1, isGlob = !1, isExtglob = !1, isGlobstar = !1, braceEscaped = !1, backslashes = !1, negated = !1, negatedExtglob = !1, finished = !1, braces = 0, prev, code, token = { value: "", depth: 0, isGlob: !1 }, eos = () => index >= length, peek = () => str.charCodeAt(index + 1), advance = () => (prev = code, str.charCodeAt(++index));
952
+ for (; index < length; ) {
1460
953
  code = advance();
1461
954
  let next;
1462
955
  if (code === CHAR_BACKWARD_SLASH) {
1463
- backslashes = token.backslashes = true;
1464
- code = advance();
1465
- if (code === CHAR_LEFT_CURLY_BRACE) {
1466
- braceEscaped = true;
1467
- }
956
+ backslashes = token.backslashes = !0, code = advance(), code === CHAR_LEFT_CURLY_BRACE && (braceEscaped = !0);
1468
957
  continue;
1469
958
  }
1470
- if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
1471
- braces++;
1472
- while (eos() !== true && (code = advance())) {
959
+ if (braceEscaped === !0 || code === CHAR_LEFT_CURLY_BRACE) {
960
+ for (braces++; eos() !== !0 && (code = advance()); ) {
1473
961
  if (code === CHAR_BACKWARD_SLASH) {
1474
- backslashes = token.backslashes = true;
1475
- advance();
962
+ backslashes = token.backslashes = !0, advance();
1476
963
  continue;
1477
964
  }
1478
965
  if (code === CHAR_LEFT_CURLY_BRACE) {
1479
966
  braces++;
1480
967
  continue;
1481
968
  }
1482
- if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
1483
- isBrace = token.isBrace = true;
1484
- isGlob = token.isGlob = true;
1485
- finished = true;
1486
- if (scanToEnd === true) {
969
+ if (braceEscaped !== !0 && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
970
+ if (isBrace = token.isBrace = !0, isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
1487
971
  continue;
1488
- }
1489
972
  break;
1490
973
  }
1491
- if (braceEscaped !== true && code === CHAR_COMMA) {
1492
- isBrace = token.isBrace = true;
1493
- isGlob = token.isGlob = true;
1494
- finished = true;
1495
- if (scanToEnd === true) {
974
+ if (braceEscaped !== !0 && code === CHAR_COMMA) {
975
+ if (isBrace = token.isBrace = !0, isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
1496
976
  continue;
1497
- }
1498
977
  break;
1499
978
  }
1500
- if (code === CHAR_RIGHT_CURLY_BRACE) {
1501
- braces--;
1502
- if (braces === 0) {
1503
- braceEscaped = false;
1504
- isBrace = token.isBrace = true;
1505
- finished = true;
1506
- break;
1507
- }
979
+ if (code === CHAR_RIGHT_CURLY_BRACE && (braces--, braces === 0)) {
980
+ braceEscaped = !1, isBrace = token.isBrace = !0, finished = !0;
981
+ break;
1508
982
  }
1509
983
  }
1510
- if (scanToEnd === true) {
984
+ if (scanToEnd === !0)
1511
985
  continue;
1512
- }
1513
986
  break;
1514
987
  }
1515
988
  if (code === CHAR_FORWARD_SLASH) {
1516
- slashes.push(index);
1517
- tokens.push(token);
1518
- token = { value: "", depth: 0, isGlob: false };
1519
- if (finished === true) continue;
989
+ if (slashes.push(index), tokens.push(token), token = { value: "", depth: 0, isGlob: !1 }, finished === !0) continue;
1520
990
  if (prev === CHAR_DOT && index === start + 1) {
1521
991
  start += 2;
1522
992
  continue;
@@ -1524,85 +994,60 @@ var require_scan = __commonJS({
1524
994
  lastIndex = index + 1;
1525
995
  continue;
1526
996
  }
1527
- if (opts.noext !== true) {
1528
- const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
1529
- if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
1530
- isGlob = token.isGlob = true;
1531
- isExtglob = token.isExtglob = true;
1532
- finished = true;
1533
- if (code === CHAR_EXCLAMATION_MARK && index === start) {
1534
- negatedExtglob = true;
1535
- }
1536
- if (scanToEnd === true) {
1537
- while (eos() !== true && (code = advance())) {
1538
- if (code === CHAR_BACKWARD_SLASH) {
1539
- backslashes = token.backslashes = true;
1540
- code = advance();
1541
- continue;
1542
- }
1543
- if (code === CHAR_RIGHT_PARENTHESES) {
1544
- isGlob = token.isGlob = true;
1545
- finished = true;
1546
- break;
1547
- }
997
+ if (opts.noext !== !0 && (code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK) === !0 && peek() === CHAR_LEFT_PARENTHESES) {
998
+ if (isGlob = token.isGlob = !0, isExtglob = token.isExtglob = !0, finished = !0, code === CHAR_EXCLAMATION_MARK && index === start && (negatedExtglob = !0), scanToEnd === !0) {
999
+ for (; eos() !== !0 && (code = advance()); ) {
1000
+ if (code === CHAR_BACKWARD_SLASH) {
1001
+ backslashes = token.backslashes = !0, code = advance();
1002
+ continue;
1003
+ }
1004
+ if (code === CHAR_RIGHT_PARENTHESES) {
1005
+ isGlob = token.isGlob = !0, finished = !0;
1006
+ break;
1548
1007
  }
1549
- continue;
1550
1008
  }
1551
- break;
1009
+ continue;
1552
1010
  }
1011
+ break;
1553
1012
  }
1554
1013
  if (code === CHAR_ASTERISK) {
1555
- if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
1556
- isGlob = token.isGlob = true;
1557
- finished = true;
1558
- if (scanToEnd === true) {
1014
+ if (prev === CHAR_ASTERISK && (isGlobstar = token.isGlobstar = !0), isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
1559
1015
  continue;
1560
- }
1561
1016
  break;
1562
1017
  }
1563
1018
  if (code === CHAR_QUESTION_MARK) {
1564
- isGlob = token.isGlob = true;
1565
- finished = true;
1566
- if (scanToEnd === true) {
1019
+ if (isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
1567
1020
  continue;
1568
- }
1569
1021
  break;
1570
1022
  }
1571
1023
  if (code === CHAR_LEFT_SQUARE_BRACKET) {
1572
- while (eos() !== true && (next = advance())) {
1024
+ for (; eos() !== !0 && (next = advance()); ) {
1573
1025
  if (next === CHAR_BACKWARD_SLASH) {
1574
- backslashes = token.backslashes = true;
1575
- advance();
1026
+ backslashes = token.backslashes = !0, advance();
1576
1027
  continue;
1577
1028
  }
1578
1029
  if (next === CHAR_RIGHT_SQUARE_BRACKET) {
1579
- isBracket = token.isBracket = true;
1580
- isGlob = token.isGlob = true;
1581
- finished = true;
1030
+ isBracket = token.isBracket = !0, isGlob = token.isGlob = !0, finished = !0;
1582
1031
  break;
1583
1032
  }
1584
1033
  }
1585
- if (scanToEnd === true) {
1034
+ if (scanToEnd === !0)
1586
1035
  continue;
1587
- }
1588
1036
  break;
1589
1037
  }
1590
- if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
1591
- negated = token.negated = true;
1592
- start++;
1038
+ if (opts.nonegate !== !0 && code === CHAR_EXCLAMATION_MARK && index === start) {
1039
+ negated = token.negated = !0, start++;
1593
1040
  continue;
1594
1041
  }
1595
- if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
1596
- isGlob = token.isGlob = true;
1597
- if (scanToEnd === true) {
1598
- while (eos() !== true && (code = advance())) {
1042
+ if (opts.noparen !== !0 && code === CHAR_LEFT_PARENTHESES) {
1043
+ if (isGlob = token.isGlob = !0, scanToEnd === !0) {
1044
+ for (; eos() !== !0 && (code = advance()); ) {
1599
1045
  if (code === CHAR_LEFT_PARENTHESES) {
1600
- backslashes = token.backslashes = true;
1601
- code = advance();
1046
+ backslashes = token.backslashes = !0, code = advance();
1602
1047
  continue;
1603
1048
  }
1604
1049
  if (code === CHAR_RIGHT_PARENTHESES) {
1605
- finished = true;
1050
+ finished = !0;
1606
1051
  break;
1607
1052
  }
1608
1053
  }
@@ -1610,47 +1055,16 @@ var require_scan = __commonJS({
1610
1055
  }
1611
1056
  break;
1612
1057
  }
1613
- if (isGlob === true) {
1614
- finished = true;
1615
- if (scanToEnd === true) {
1058
+ if (isGlob === !0) {
1059
+ if (finished = !0, scanToEnd === !0)
1616
1060
  continue;
1617
- }
1618
1061
  break;
1619
1062
  }
1620
1063
  }
1621
- if (opts.noext === true) {
1622
- isExtglob = false;
1623
- isGlob = false;
1624
- }
1625
- let base = str;
1626
- let prefix = "";
1627
- let glob = "";
1628
- if (start > 0) {
1629
- prefix = str.slice(0, start);
1630
- str = str.slice(start);
1631
- lastIndex -= start;
1632
- }
1633
- if (base && isGlob === true && lastIndex > 0) {
1634
- base = str.slice(0, lastIndex);
1635
- glob = str.slice(lastIndex);
1636
- } else if (isGlob === true) {
1637
- base = "";
1638
- glob = str;
1639
- } else {
1640
- base = str;
1641
- }
1642
- if (base && base !== "" && base !== "/" && base !== str) {
1643
- if (isPathSeparator(base.charCodeAt(base.length - 1))) {
1644
- base = base.slice(0, -1);
1645
- }
1646
- }
1647
- if (opts.unescape === true) {
1648
- if (glob) glob = utils.removeBackslashes(glob);
1649
- if (base && backslashes === true) {
1650
- base = utils.removeBackslashes(base);
1651
- }
1652
- }
1653
- const state = {
1064
+ opts.noext === !0 && (isExtglob = !1, isGlob = !1);
1065
+ let base = str, prefix = "", glob = "";
1066
+ start > 0 && (prefix = str.slice(0, start), str = str.slice(start), lastIndex -= start), base && isGlob === !0 && lastIndex > 0 ? (base = str.slice(0, lastIndex), glob = str.slice(lastIndex)) : isGlob === !0 ? (base = "", glob = str) : base = str, base && base !== "" && base !== "/" && base !== str && isPathSeparator(base.charCodeAt(base.length - 1)) && (base = base.slice(0, -1)), opts.unescape === !0 && (glob && (glob = utils.removeBackslashes(glob)), base && backslashes === !0 && (base = utils.removeBackslashes(base)));
1067
+ let state = {
1654
1068
  prefix,
1655
1069
  input,
1656
1070
  start,
@@ -1664,48 +1078,20 @@ var require_scan = __commonJS({
1664
1078
  negated,
1665
1079
  negatedExtglob
1666
1080
  };
1667
- if (opts.tokens === true) {
1668
- state.maxDepth = 0;
1669
- if (!isPathSeparator(code)) {
1670
- tokens.push(token);
1671
- }
1672
- state.tokens = tokens;
1673
- }
1674
- if (opts.parts === true || opts.tokens === true) {
1081
+ if (opts.tokens === !0 && (state.maxDepth = 0, isPathSeparator(code) || tokens.push(token), state.tokens = tokens), opts.parts === !0 || opts.tokens === !0) {
1675
1082
  let prevIndex;
1676
1083
  for (let idx = 0; idx < slashes.length; idx++) {
1677
- const n = prevIndex ? prevIndex + 1 : start;
1678
- const i = slashes[idx];
1679
- const value = input.slice(n, i);
1680
- if (opts.tokens) {
1681
- if (idx === 0 && start !== 0) {
1682
- tokens[idx].isPrefix = true;
1683
- tokens[idx].value = prefix;
1684
- } else {
1685
- tokens[idx].value = value;
1686
- }
1687
- depth(tokens[idx]);
1688
- state.maxDepth += tokens[idx].depth;
1689
- }
1690
- if (idx !== 0 || value !== "") {
1691
- parts.push(value);
1692
- }
1693
- prevIndex = i;
1084
+ let n = prevIndex ? prevIndex + 1 : start, i = slashes[idx], value = input.slice(n, i);
1085
+ opts.tokens && (idx === 0 && start !== 0 ? (tokens[idx].isPrefix = !0, tokens[idx].value = prefix) : tokens[idx].value = value, depth(tokens[idx]), state.maxDepth += tokens[idx].depth), (idx !== 0 || value !== "") && parts.push(value), prevIndex = i;
1694
1086
  }
1695
1087
  if (prevIndex && prevIndex + 1 < input.length) {
1696
- const value = input.slice(prevIndex + 1);
1697
- parts.push(value);
1698
- if (opts.tokens) {
1699
- tokens[tokens.length - 1].value = value;
1700
- depth(tokens[tokens.length - 1]);
1701
- state.maxDepth += tokens[tokens.length - 1].depth;
1702
- }
1088
+ let value = input.slice(prevIndex + 1);
1089
+ parts.push(value), opts.tokens && (tokens[tokens.length - 1].value = value, depth(tokens[tokens.length - 1]), state.maxDepth += tokens[tokens.length - 1].depth);
1703
1090
  }
1704
- state.slashes = slashes;
1705
- state.parts = parts;
1091
+ state.slashes = slashes, state.parts = parts;
1706
1092
  }
1707
1093
  return state;
1708
- }, "scan");
1094
+ };
1709
1095
  module.exports = scan;
1710
1096
  }
1711
1097
  });
@@ -1714,49 +1100,31 @@ var require_scan = __commonJS({
1714
1100
  var require_parse2 = __commonJS({
1715
1101
  "../../node_modules/picomatch/lib/parse.js"(exports, module) {
1716
1102
  "use strict";
1717
- var constants = require_constants2();
1718
- var utils = require_utils2();
1719
- var {
1103
+ var constants = require_constants2(), utils = require_utils2(), {
1720
1104
  MAX_LENGTH,
1721
1105
  POSIX_REGEX_SOURCE,
1722
1106
  REGEX_NON_SPECIAL_CHARS,
1723
1107
  REGEX_SPECIAL_CHARS_BACKREF,
1724
1108
  REPLACEMENTS
1725
- } = constants;
1726
- var expandRange = /* @__PURE__ */ __name((args, options) => {
1727
- if (typeof options.expandRange === "function") {
1109
+ } = constants, expandRange = (args, options) => {
1110
+ if (typeof options.expandRange == "function")
1728
1111
  return options.expandRange(...args, options);
1729
- }
1730
1112
  args.sort();
1731
- const value = `[${args.join("-")}]`;
1113
+ let value = `[${args.join("-")}]`;
1732
1114
  try {
1733
1115
  new RegExp(value);
1734
- } catch (ex) {
1116
+ } catch {
1735
1117
  return args.map((v) => utils.escapeRegex(v)).join("..");
1736
1118
  }
1737
1119
  return value;
1738
- }, "expandRange");
1739
- var syntaxError = /* @__PURE__ */ __name((type, char) => {
1740
- return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
1741
- }, "syntaxError");
1742
- var parse = /* @__PURE__ */ __name((input, options) => {
1743
- if (typeof input !== "string") {
1120
+ }, syntaxError = (type, char) => `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`, parse = (input, options) => {
1121
+ if (typeof input != "string")
1744
1122
  throw new TypeError("Expected a string");
1745
- }
1746
1123
  input = REPLACEMENTS[input] || input;
1747
- const opts = { ...options };
1748
- const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
1749
- let len = input.length;
1750
- if (len > max) {
1124
+ let opts = { ...options }, max = typeof opts.maxLength == "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
1125
+ if (len > max)
1751
1126
  throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
1752
- }
1753
- const bos = { type: "bos", value: "", output: opts.prepend || "" };
1754
- const tokens = [bos];
1755
- const capture = opts.capture ? "" : "?:";
1756
- const win32 = utils.isWindows(options);
1757
- const PLATFORM_CHARS = constants.globChars(win32);
1758
- const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
1759
- const {
1127
+ let bos = { type: "bos", value: "", output: opts.prepend || "" }, tokens = [bos], capture = opts.capture ? "" : "?:", win32 = utils.isWindows(options), PLATFORM_CHARS = constants.globChars(win32), EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS), {
1760
1128
  DOT_LITERAL,
1761
1129
  PLUS_LITERAL,
1762
1130
  SLASH_LITERAL,
@@ -1769,400 +1137,203 @@ var require_parse2 = __commonJS({
1769
1137
  QMARK_NO_DOT,
1770
1138
  STAR,
1771
1139
  START_ANCHOR
1772
- } = PLATFORM_CHARS;
1773
- const globstar = /* @__PURE__ */ __name((opts2) => {
1774
- return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
1775
- }, "globstar");
1776
- const nodot = opts.dot ? "" : NO_DOT;
1777
- const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
1778
- let star = opts.bash === true ? globstar(opts) : STAR;
1779
- if (opts.capture) {
1780
- star = `(${star})`;
1781
- }
1782
- if (typeof opts.noext === "boolean") {
1783
- opts.noextglob = opts.noext;
1784
- }
1785
- const state = {
1140
+ } = PLATFORM_CHARS, globstar = (opts2) => `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, nodot = opts.dot ? "" : NO_DOT, qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT, star = opts.bash === !0 ? globstar(opts) : STAR;
1141
+ opts.capture && (star = `(${star})`), typeof opts.noext == "boolean" && (opts.noextglob = opts.noext);
1142
+ let state = {
1786
1143
  input,
1787
1144
  index: -1,
1788
1145
  start: 0,
1789
- dot: opts.dot === true,
1146
+ dot: opts.dot === !0,
1790
1147
  consumed: "",
1791
1148
  output: "",
1792
1149
  prefix: "",
1793
- backtrack: false,
1794
- negated: false,
1150
+ backtrack: !1,
1151
+ negated: !1,
1795
1152
  brackets: 0,
1796
1153
  braces: 0,
1797
1154
  parens: 0,
1798
1155
  quotes: 0,
1799
- globstar: false,
1156
+ globstar: !1,
1800
1157
  tokens
1801
1158
  };
1802
- input = utils.removePrefix(input, state);
1803
- len = input.length;
1804
- const extglobs = [];
1805
- const braces = [];
1806
- const stack = [];
1807
- let prev = bos;
1808
- let value;
1809
- const eos = /* @__PURE__ */ __name(() => state.index === len - 1, "eos");
1810
- const peek = state.peek = (n = 1) => input[state.index + n];
1811
- const advance = state.advance = () => input[++state.index] || "";
1812
- const remaining = /* @__PURE__ */ __name(() => input.slice(state.index + 1), "remaining");
1813
- const consume = /* @__PURE__ */ __name((value2 = "", num = 0) => {
1814
- state.consumed += value2;
1815
- state.index += num;
1816
- }, "consume");
1817
- const append = /* @__PURE__ */ __name((token) => {
1818
- state.output += token.output != null ? token.output : token.value;
1819
- consume(token.value);
1820
- }, "append");
1821
- const negate = /* @__PURE__ */ __name(() => {
1159
+ input = utils.removePrefix(input, state), len = input.length;
1160
+ let extglobs = [], braces = [], stack = [], prev = bos, value, eos = () => state.index === len - 1, peek = state.peek = (n = 1) => input[state.index + n], advance = state.advance = () => input[++state.index] || "", remaining = () => input.slice(state.index + 1), consume = (value2 = "", num = 0) => {
1161
+ state.consumed += value2, state.index += num;
1162
+ }, append = (token) => {
1163
+ state.output += token.output != null ? token.output : token.value, consume(token.value);
1164
+ }, negate = () => {
1822
1165
  let count = 1;
1823
- while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
1824
- advance();
1825
- state.start++;
1826
- count++;
1827
- }
1828
- if (count % 2 === 0) {
1829
- return false;
1830
- }
1831
- state.negated = true;
1832
- state.start++;
1833
- return true;
1834
- }, "negate");
1835
- const increment = /* @__PURE__ */ __name((type) => {
1836
- state[type]++;
1837
- stack.push(type);
1838
- }, "increment");
1839
- const decrement = /* @__PURE__ */ __name((type) => {
1840
- state[type]--;
1841
- stack.pop();
1842
- }, "decrement");
1843
- const push = /* @__PURE__ */ __name((tok) => {
1166
+ for (; peek() === "!" && (peek(2) !== "(" || peek(3) === "?"); )
1167
+ advance(), state.start++, count++;
1168
+ return count % 2 === 0 ? !1 : (state.negated = !0, state.start++, !0);
1169
+ }, increment = (type) => {
1170
+ state[type]++, stack.push(type);
1171
+ }, decrement = (type) => {
1172
+ state[type]--, stack.pop();
1173
+ }, push = (tok) => {
1844
1174
  if (prev.type === "globstar") {
1845
- const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
1846
- const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
1847
- if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
1848
- state.output = state.output.slice(0, -prev.output.length);
1849
- prev.type = "star";
1850
- prev.value = "*";
1851
- prev.output = star;
1852
- state.output += prev.output;
1853
- }
1854
- }
1855
- if (extglobs.length && tok.type !== "paren") {
1856
- extglobs[extglobs.length - 1].inner += tok.value;
1175
+ let isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"), isExtglob = tok.extglob === !0 || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
1176
+ tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob && (state.output = state.output.slice(0, -prev.output.length), prev.type = "star", prev.value = "*", prev.output = star, state.output += prev.output);
1857
1177
  }
1858
- if (tok.value || tok.output) append(tok);
1859
- if (prev && prev.type === "text" && tok.type === "text") {
1860
- prev.value += tok.value;
1861
- prev.output = (prev.output || "") + tok.value;
1178
+ if (extglobs.length && tok.type !== "paren" && (extglobs[extglobs.length - 1].inner += tok.value), (tok.value || tok.output) && append(tok), prev && prev.type === "text" && tok.type === "text") {
1179
+ prev.value += tok.value, prev.output = (prev.output || "") + tok.value;
1862
1180
  return;
1863
1181
  }
1864
- tok.prev = prev;
1865
- tokens.push(tok);
1866
- prev = tok;
1867
- }, "push");
1868
- const extglobOpen = /* @__PURE__ */ __name((type, value2) => {
1869
- const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
1870
- token.prev = prev;
1871
- token.parens = state.parens;
1872
- token.output = state.output;
1873
- const output = (opts.capture ? "(" : "") + token.open;
1874
- increment("parens");
1875
- push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
1876
- push({ type: "paren", extglob: true, value: advance(), output });
1877
- extglobs.push(token);
1878
- }, "extglobOpen");
1879
- const extglobClose = /* @__PURE__ */ __name((token) => {
1880
- let output = token.close + (opts.capture ? ")" : "");
1881
- let rest;
1182
+ tok.prev = prev, tokens.push(tok), prev = tok;
1183
+ }, extglobOpen = (type, value2) => {
1184
+ let token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
1185
+ token.prev = prev, token.parens = state.parens, token.output = state.output;
1186
+ let output = (opts.capture ? "(" : "") + token.open;
1187
+ increment("parens"), push({ type, value: value2, output: state.output ? "" : ONE_CHAR }), push({ type: "paren", extglob: !0, value: advance(), output }), extglobs.push(token);
1188
+ }, extglobClose = (token) => {
1189
+ let output = token.close + (opts.capture ? ")" : ""), rest;
1882
1190
  if (token.type === "negate") {
1883
1191
  let extglobStar = star;
1884
- if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
1885
- extglobStar = globstar(opts);
1886
- }
1887
- if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
1888
- output = token.close = `)$))${extglobStar}`;
1889
- }
1890
- if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
1891
- const expression = parse(rest, { ...options, fastpaths: false }).output;
1192
+ if (token.inner && token.inner.length > 1 && token.inner.includes("/") && (extglobStar = globstar(opts)), (extglobStar !== star || eos() || /^\)+$/.test(remaining())) && (output = token.close = `)$))${extglobStar}`), token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
1193
+ let expression = parse(rest, { ...options, fastpaths: !1 }).output;
1892
1194
  output = token.close = `)${expression})${extglobStar})`;
1893
1195
  }
1894
- if (token.prev.type === "bos") {
1895
- state.negatedExtglob = true;
1896
- }
1196
+ token.prev.type === "bos" && (state.negatedExtglob = !0);
1897
1197
  }
1898
- push({ type: "paren", extglob: true, value, output });
1899
- decrement("parens");
1900
- }, "extglobClose");
1901
- if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
1902
- let backslashes = false;
1903
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
1904
- if (first === "\\") {
1905
- backslashes = true;
1906
- return m;
1907
- }
1908
- if (first === "?") {
1909
- if (esc) {
1910
- return esc + first + (rest ? QMARK.repeat(rest.length) : "");
1911
- }
1912
- if (index === 0) {
1913
- return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
1914
- }
1915
- return QMARK.repeat(chars.length);
1916
- }
1917
- if (first === ".") {
1918
- return DOT_LITERAL.repeat(chars.length);
1919
- }
1920
- if (first === "*") {
1921
- if (esc) {
1922
- return esc + first + (rest ? star : "");
1923
- }
1924
- return star;
1925
- }
1926
- return esc ? m : `\\${m}`;
1927
- });
1928
- if (backslashes === true) {
1929
- if (opts.unescape === true) {
1930
- output = output.replace(/\\/g, "");
1931
- } else {
1932
- output = output.replace(/\\+/g, (m) => {
1933
- return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
1934
- });
1935
- }
1936
- }
1937
- if (output === input && opts.contains === true) {
1938
- state.output = input;
1939
- return state;
1940
- }
1941
- state.output = utils.wrapOutput(output, state, options);
1942
- return state;
1198
+ push({ type: "paren", extglob: !0, value, output }), decrement("parens");
1199
+ };
1200
+ if (opts.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(input)) {
1201
+ let backslashes = !1, output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => first === "\\" ? (backslashes = !0, m) : first === "?" ? esc ? esc + first + (rest ? QMARK.repeat(rest.length) : "") : index === 0 ? qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "") : QMARK.repeat(chars.length) : first === "." ? DOT_LITERAL.repeat(chars.length) : first === "*" ? esc ? esc + first + (rest ? star : "") : star : esc ? m : `\\${m}`);
1202
+ return backslashes === !0 && (opts.unescape === !0 ? output = output.replace(/\\/g, "") : output = output.replace(/\\+/g, (m) => m.length % 2 === 0 ? "\\\\" : m ? "\\" : "")), output === input && opts.contains === !0 ? (state.output = input, state) : (state.output = utils.wrapOutput(output, state, options), state);
1943
1203
  }
1944
- while (!eos()) {
1945
- value = advance();
1946
- if (value === "\0") {
1204
+ for (; !eos(); ) {
1205
+ if (value = advance(), value === "\0")
1947
1206
  continue;
1948
- }
1949
1207
  if (value === "\\") {
1950
- const next = peek();
1951
- if (next === "/" && opts.bash !== true) {
1952
- continue;
1953
- }
1954
- if (next === "." || next === ";") {
1208
+ let next = peek();
1209
+ if (next === "/" && opts.bash !== !0 || next === "." || next === ";")
1955
1210
  continue;
1956
- }
1957
1211
  if (!next) {
1958
- value += "\\";
1959
- push({ type: "text", value });
1212
+ value += "\\", push({ type: "text", value });
1960
1213
  continue;
1961
1214
  }
1962
- const match2 = /^\\+/.exec(remaining());
1963
- let slashes = 0;
1964
- if (match2 && match2[0].length > 2) {
1965
- slashes = match2[0].length;
1966
- state.index += slashes;
1967
- if (slashes % 2 !== 0) {
1968
- value += "\\";
1969
- }
1970
- }
1971
- if (opts.unescape === true) {
1972
- value = advance();
1973
- } else {
1974
- value += advance();
1975
- }
1976
- if (state.brackets === 0) {
1215
+ let match2 = /^\\+/.exec(remaining()), slashes = 0;
1216
+ if (match2 && match2[0].length > 2 && (slashes = match2[0].length, state.index += slashes, slashes % 2 !== 0 && (value += "\\")), opts.unescape === !0 ? value = advance() : value += advance(), state.brackets === 0) {
1977
1217
  push({ type: "text", value });
1978
1218
  continue;
1979
1219
  }
1980
1220
  }
1981
1221
  if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
1982
- if (opts.posix !== false && value === ":") {
1983
- const inner = prev.value.slice(1);
1984
- if (inner.includes("[")) {
1985
- prev.posix = true;
1986
- if (inner.includes(":")) {
1987
- const idx = prev.value.lastIndexOf("[");
1988
- const pre = prev.value.slice(0, idx);
1989
- const rest2 = prev.value.slice(idx + 2);
1990
- const posix = POSIX_REGEX_SOURCE[rest2];
1991
- if (posix) {
1992
- prev.value = pre + posix;
1993
- state.backtrack = true;
1994
- advance();
1995
- if (!bos.output && tokens.indexOf(prev) === 1) {
1996
- bos.output = ONE_CHAR;
1997
- }
1998
- continue;
1999
- }
1222
+ if (opts.posix !== !1 && value === ":") {
1223
+ let inner = prev.value.slice(1);
1224
+ if (inner.includes("[") && (prev.posix = !0, inner.includes(":"))) {
1225
+ let idx = prev.value.lastIndexOf("["), pre = prev.value.slice(0, idx), rest2 = prev.value.slice(idx + 2), posix = POSIX_REGEX_SOURCE[rest2];
1226
+ if (posix) {
1227
+ prev.value = pre + posix, state.backtrack = !0, advance(), !bos.output && tokens.indexOf(prev) === 1 && (bos.output = ONE_CHAR);
1228
+ continue;
2000
1229
  }
2001
1230
  }
2002
1231
  }
2003
- if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
2004
- value = `\\${value}`;
2005
- }
2006
- if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
2007
- value = `\\${value}`;
2008
- }
2009
- if (opts.posix === true && value === "!" && prev.value === "[") {
2010
- value = "^";
2011
- }
2012
- prev.value += value;
2013
- append({ value });
1232
+ (value === "[" && peek() !== ":" || value === "-" && peek() === "]") && (value = `\\${value}`), value === "]" && (prev.value === "[" || prev.value === "[^") && (value = `\\${value}`), opts.posix === !0 && value === "!" && prev.value === "[" && (value = "^"), prev.value += value, append({ value });
2014
1233
  continue;
2015
1234
  }
2016
1235
  if (state.quotes === 1 && value !== '"') {
2017
- value = utils.escapeRegex(value);
2018
- prev.value += value;
2019
- append({ value });
1236
+ value = utils.escapeRegex(value), prev.value += value, append({ value });
2020
1237
  continue;
2021
1238
  }
2022
1239
  if (value === '"') {
2023
- state.quotes = state.quotes === 1 ? 0 : 1;
2024
- if (opts.keepQuotes === true) {
2025
- push({ type: "text", value });
2026
- }
1240
+ state.quotes = state.quotes === 1 ? 0 : 1, opts.keepQuotes === !0 && push({ type: "text", value });
2027
1241
  continue;
2028
1242
  }
2029
1243
  if (value === "(") {
2030
- increment("parens");
2031
- push({ type: "paren", value });
1244
+ increment("parens"), push({ type: "paren", value });
2032
1245
  continue;
2033
1246
  }
2034
1247
  if (value === ")") {
2035
- if (state.parens === 0 && opts.strictBrackets === true) {
1248
+ if (state.parens === 0 && opts.strictBrackets === !0)
2036
1249
  throw new SyntaxError(syntaxError("opening", "("));
2037
- }
2038
- const extglob = extglobs[extglobs.length - 1];
1250
+ let extglob = extglobs[extglobs.length - 1];
2039
1251
  if (extglob && state.parens === extglob.parens + 1) {
2040
1252
  extglobClose(extglobs.pop());
2041
1253
  continue;
2042
1254
  }
2043
- push({ type: "paren", value, output: state.parens ? ")" : "\\)" });
2044
- decrement("parens");
1255
+ push({ type: "paren", value, output: state.parens ? ")" : "\\)" }), decrement("parens");
2045
1256
  continue;
2046
1257
  }
2047
1258
  if (value === "[") {
2048
- if (opts.nobracket === true || !remaining().includes("]")) {
2049
- if (opts.nobracket !== true && opts.strictBrackets === true) {
1259
+ if (opts.nobracket === !0 || !remaining().includes("]")) {
1260
+ if (opts.nobracket !== !0 && opts.strictBrackets === !0)
2050
1261
  throw new SyntaxError(syntaxError("closing", "]"));
2051
- }
2052
1262
  value = `\\${value}`;
2053
- } else {
1263
+ } else
2054
1264
  increment("brackets");
2055
- }
2056
1265
  push({ type: "bracket", value });
2057
1266
  continue;
2058
1267
  }
2059
1268
  if (value === "]") {
2060
- if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
1269
+ if (opts.nobracket === !0 || prev && prev.type === "bracket" && prev.value.length === 1) {
2061
1270
  push({ type: "text", value, output: `\\${value}` });
2062
1271
  continue;
2063
1272
  }
2064
1273
  if (state.brackets === 0) {
2065
- if (opts.strictBrackets === true) {
1274
+ if (opts.strictBrackets === !0)
2066
1275
  throw new SyntaxError(syntaxError("opening", "["));
2067
- }
2068
1276
  push({ type: "text", value, output: `\\${value}` });
2069
1277
  continue;
2070
1278
  }
2071
1279
  decrement("brackets");
2072
- const prevValue = prev.value.slice(1);
2073
- if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
2074
- value = `/${value}`;
2075
- }
2076
- prev.value += value;
2077
- append({ value });
2078
- if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
1280
+ let prevValue = prev.value.slice(1);
1281
+ if (prev.posix !== !0 && prevValue[0] === "^" && !prevValue.includes("/") && (value = `/${value}`), prev.value += value, append({ value }), opts.literalBrackets === !1 || utils.hasRegexChars(prevValue))
2079
1282
  continue;
2080
- }
2081
- const escaped = utils.escapeRegex(prev.value);
2082
- state.output = state.output.slice(0, -prev.value.length);
2083
- if (opts.literalBrackets === true) {
2084
- state.output += escaped;
2085
- prev.value = escaped;
1283
+ let escaped = utils.escapeRegex(prev.value);
1284
+ if (state.output = state.output.slice(0, -prev.value.length), opts.literalBrackets === !0) {
1285
+ state.output += escaped, prev.value = escaped;
2086
1286
  continue;
2087
1287
  }
2088
- prev.value = `(${capture}${escaped}|${prev.value})`;
2089
- state.output += prev.value;
1288
+ prev.value = `(${capture}${escaped}|${prev.value})`, state.output += prev.value;
2090
1289
  continue;
2091
1290
  }
2092
- if (value === "{" && opts.nobrace !== true) {
1291
+ if (value === "{" && opts.nobrace !== !0) {
2093
1292
  increment("braces");
2094
- const open = {
1293
+ let open = {
2095
1294
  type: "brace",
2096
1295
  value,
2097
1296
  output: "(",
2098
1297
  outputIndex: state.output.length,
2099
1298
  tokensIndex: state.tokens.length
2100
1299
  };
2101
- braces.push(open);
2102
- push(open);
1300
+ braces.push(open), push(open);
2103
1301
  continue;
2104
1302
  }
2105
1303
  if (value === "}") {
2106
- const brace = braces[braces.length - 1];
2107
- if (opts.nobrace === true || !brace) {
1304
+ let brace = braces[braces.length - 1];
1305
+ if (opts.nobrace === !0 || !brace) {
2108
1306
  push({ type: "text", value, output: value });
2109
1307
  continue;
2110
1308
  }
2111
1309
  let output = ")";
2112
- if (brace.dots === true) {
2113
- const arr = tokens.slice();
2114
- const range = [];
2115
- for (let i = arr.length - 1; i >= 0; i--) {
2116
- tokens.pop();
2117
- if (arr[i].type === "brace") {
2118
- break;
2119
- }
2120
- if (arr[i].type !== "dots") {
2121
- range.unshift(arr[i].value);
2122
- }
2123
- }
2124
- output = expandRange(range, opts);
2125
- state.backtrack = true;
2126
- }
2127
- if (brace.comma !== true && brace.dots !== true) {
2128
- const out = state.output.slice(0, brace.outputIndex);
2129
- const toks = state.tokens.slice(brace.tokensIndex);
2130
- brace.value = brace.output = "\\{";
2131
- value = output = "\\}";
2132
- state.output = out;
2133
- for (const t of toks) {
1310
+ if (brace.dots === !0) {
1311
+ let arr = tokens.slice(), range = [];
1312
+ for (let i = arr.length - 1; i >= 0 && (tokens.pop(), arr[i].type !== "brace"); i--)
1313
+ arr[i].type !== "dots" && range.unshift(arr[i].value);
1314
+ output = expandRange(range, opts), state.backtrack = !0;
1315
+ }
1316
+ if (brace.comma !== !0 && brace.dots !== !0) {
1317
+ let out = state.output.slice(0, brace.outputIndex), toks = state.tokens.slice(brace.tokensIndex);
1318
+ brace.value = brace.output = "\\{", value = output = "\\}", state.output = out;
1319
+ for (let t of toks)
2134
1320
  state.output += t.output || t.value;
2135
- }
2136
1321
  }
2137
- push({ type: "brace", value, output });
2138
- decrement("braces");
2139
- braces.pop();
1322
+ push({ type: "brace", value, output }), decrement("braces"), braces.pop();
2140
1323
  continue;
2141
1324
  }
2142
1325
  if (value === "|") {
2143
- if (extglobs.length > 0) {
2144
- extglobs[extglobs.length - 1].conditions++;
2145
- }
2146
- push({ type: "text", value });
1326
+ extglobs.length > 0 && extglobs[extglobs.length - 1].conditions++, push({ type: "text", value });
2147
1327
  continue;
2148
1328
  }
2149
1329
  if (value === ",") {
2150
- let output = value;
2151
- const brace = braces[braces.length - 1];
2152
- if (brace && stack[stack.length - 1] === "braces") {
2153
- brace.comma = true;
2154
- output = "|";
2155
- }
2156
- push({ type: "comma", value, output });
1330
+ let output = value, brace = braces[braces.length - 1];
1331
+ brace && stack[stack.length - 1] === "braces" && (brace.comma = !0, output = "|"), push({ type: "comma", value, output });
2157
1332
  continue;
2158
1333
  }
2159
1334
  if (value === "/") {
2160
1335
  if (prev.type === "dot" && state.index === state.start + 1) {
2161
- state.start = state.index + 1;
2162
- state.consumed = "";
2163
- state.output = "";
2164
- tokens.pop();
2165
- prev = bos;
1336
+ state.start = state.index + 1, state.consumed = "", state.output = "", tokens.pop(), prev = bos;
2166
1337
  continue;
2167
1338
  }
2168
1339
  push({ type: "slash", value, output: SLASH_LITERAL });
@@ -2170,12 +1341,9 @@ var require_parse2 = __commonJS({
2170
1341
  }
2171
1342
  if (value === ".") {
2172
1343
  if (state.braces > 0 && prev.type === "dot") {
2173
- if (prev.value === ".") prev.output = DOT_LITERAL;
2174
- const brace = braces[braces.length - 1];
2175
- prev.type = "dots";
2176
- prev.output += value;
2177
- prev.value += value;
2178
- brace.dots = true;
1344
+ prev.value === "." && (prev.output = DOT_LITERAL);
1345
+ let brace = braces[braces.length - 1];
1346
+ prev.type = "dots", prev.output += value, prev.value += value, brace.dots = !0;
2179
1347
  continue;
2180
1348
  }
2181
1349
  if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
@@ -2186,24 +1354,18 @@ var require_parse2 = __commonJS({
2186
1354
  continue;
2187
1355
  }
2188
1356
  if (value === "?") {
2189
- const isGroup = prev && prev.value === "(";
2190
- if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1357
+ if (!(prev && prev.value === "(") && opts.noextglob !== !0 && peek() === "(" && peek(2) !== "?") {
2191
1358
  extglobOpen("qmark", value);
2192
1359
  continue;
2193
1360
  }
2194
1361
  if (prev && prev.type === "paren") {
2195
- const next = peek();
2196
- let output = value;
2197
- if (next === "<" && !utils.supportsLookbehinds()) {
1362
+ let next = peek(), output = value;
1363
+ if (next === "<" && !utils.supportsLookbehinds())
2198
1364
  throw new Error("Node.js v10 or higher is required for regex lookbehinds");
2199
- }
2200
- if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
2201
- output = `\\${value}`;
2202
- }
2203
- push({ type: "text", value, output });
1365
+ (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) && (output = `\\${value}`), push({ type: "text", value, output });
2204
1366
  continue;
2205
1367
  }
2206
- if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
1368
+ if (opts.dot !== !0 && (prev.type === "slash" || prev.type === "bos")) {
2207
1369
  push({ type: "qmark", value, output: QMARK_NO_DOT });
2208
1370
  continue;
2209
1371
  }
@@ -2211,23 +1373,21 @@ var require_parse2 = __commonJS({
2211
1373
  continue;
2212
1374
  }
2213
1375
  if (value === "!") {
2214
- if (opts.noextglob !== true && peek() === "(") {
2215
- if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
2216
- extglobOpen("negate", value);
2217
- continue;
2218
- }
1376
+ if (opts.noextglob !== !0 && peek() === "(" && (peek(2) !== "?" || !/[!=<:]/.test(peek(3)))) {
1377
+ extglobOpen("negate", value);
1378
+ continue;
2219
1379
  }
2220
- if (opts.nonegate !== true && state.index === 0) {
1380
+ if (opts.nonegate !== !0 && state.index === 0) {
2221
1381
  negate();
2222
1382
  continue;
2223
1383
  }
2224
1384
  }
2225
1385
  if (value === "+") {
2226
- if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1386
+ if (opts.noextglob !== !0 && peek() === "(" && peek(2) !== "?") {
2227
1387
  extglobOpen("plus", value);
2228
1388
  continue;
2229
1389
  }
2230
- if (prev && prev.value === "(" || opts.regex === false) {
1390
+ if (prev && prev.value === "(" || opts.regex === !1) {
2231
1391
  push({ type: "plus", value, output: PLUS_LITERAL });
2232
1392
  continue;
2233
1393
  }
@@ -2239,190 +1399,105 @@ var require_parse2 = __commonJS({
2239
1399
  continue;
2240
1400
  }
2241
1401
  if (value === "@") {
2242
- if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
2243
- push({ type: "at", extglob: true, value, output: "" });
1402
+ if (opts.noextglob !== !0 && peek() === "(" && peek(2) !== "?") {
1403
+ push({ type: "at", extglob: !0, value, output: "" });
2244
1404
  continue;
2245
1405
  }
2246
1406
  push({ type: "text", value });
2247
1407
  continue;
2248
1408
  }
2249
1409
  if (value !== "*") {
2250
- if (value === "$" || value === "^") {
2251
- value = `\\${value}`;
2252
- }
2253
- const match2 = REGEX_NON_SPECIAL_CHARS.exec(remaining());
2254
- if (match2) {
2255
- value += match2[0];
2256
- state.index += match2[0].length;
2257
- }
2258
- push({ type: "text", value });
1410
+ (value === "$" || value === "^") && (value = `\\${value}`);
1411
+ let match2 = REGEX_NON_SPECIAL_CHARS.exec(remaining());
1412
+ match2 && (value += match2[0], state.index += match2[0].length), push({ type: "text", value });
2259
1413
  continue;
2260
1414
  }
2261
- if (prev && (prev.type === "globstar" || prev.star === true)) {
2262
- prev.type = "star";
2263
- prev.star = true;
2264
- prev.value += value;
2265
- prev.output = star;
2266
- state.backtrack = true;
2267
- state.globstar = true;
2268
- consume(value);
1415
+ if (prev && (prev.type === "globstar" || prev.star === !0)) {
1416
+ prev.type = "star", prev.star = !0, prev.value += value, prev.output = star, state.backtrack = !0, state.globstar = !0, consume(value);
2269
1417
  continue;
2270
1418
  }
2271
1419
  let rest = remaining();
2272
- if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
1420
+ if (opts.noextglob !== !0 && /^\([^?]/.test(rest)) {
2273
1421
  extglobOpen("star", value);
2274
1422
  continue;
2275
1423
  }
2276
1424
  if (prev.type === "star") {
2277
- if (opts.noglobstar === true) {
1425
+ if (opts.noglobstar === !0) {
2278
1426
  consume(value);
2279
1427
  continue;
2280
1428
  }
2281
- const prior = prev.prev;
2282
- const before = prior.prev;
2283
- const isStart = prior.type === "slash" || prior.type === "bos";
2284
- const afterStar = before && (before.type === "star" || before.type === "globstar");
2285
- if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
1429
+ let prior = prev.prev, before = prior.prev, isStart = prior.type === "slash" || prior.type === "bos", afterStar = before && (before.type === "star" || before.type === "globstar");
1430
+ if (opts.bash === !0 && (!isStart || rest[0] && rest[0] !== "/")) {
2286
1431
  push({ type: "star", value, output: "" });
2287
1432
  continue;
2288
1433
  }
2289
- const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
2290
- const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
1434
+ let isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"), isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
2291
1435
  if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
2292
1436
  push({ type: "star", value, output: "" });
2293
1437
  continue;
2294
1438
  }
2295
- while (rest.slice(0, 3) === "/**") {
2296
- const after = input[state.index + 4];
2297
- if (after && after !== "/") {
1439
+ for (; rest.slice(0, 3) === "/**"; ) {
1440
+ let after = input[state.index + 4];
1441
+ if (after && after !== "/")
2298
1442
  break;
2299
- }
2300
- rest = rest.slice(3);
2301
- consume("/**", 3);
1443
+ rest = rest.slice(3), consume("/**", 3);
2302
1444
  }
2303
1445
  if (prior.type === "bos" && eos()) {
2304
- prev.type = "globstar";
2305
- prev.value += value;
2306
- prev.output = globstar(opts);
2307
- state.output = prev.output;
2308
- state.globstar = true;
2309
- consume(value);
1446
+ prev.type = "globstar", prev.value += value, prev.output = globstar(opts), state.output = prev.output, state.globstar = !0, consume(value);
2310
1447
  continue;
2311
1448
  }
2312
1449
  if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
2313
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
2314
- prior.output = `(?:${prior.output}`;
2315
- prev.type = "globstar";
2316
- prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
2317
- prev.value += value;
2318
- state.globstar = true;
2319
- state.output += prior.output + prev.output;
2320
- consume(value);
1450
+ state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = "globstar", prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"), prev.value += value, state.globstar = !0, state.output += prior.output + prev.output, consume(value);
2321
1451
  continue;
2322
1452
  }
2323
1453
  if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
2324
- const end = rest[1] !== void 0 ? "|$" : "";
2325
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
2326
- prior.output = `(?:${prior.output}`;
2327
- prev.type = "globstar";
2328
- prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
2329
- prev.value += value;
2330
- state.output += prior.output + prev.output;
2331
- state.globstar = true;
2332
- consume(value + advance());
2333
- push({ type: "slash", value: "/", output: "" });
1454
+ let end = rest[1] !== void 0 ? "|$" : "";
1455
+ state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = "globstar", prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`, prev.value += value, state.output += prior.output + prev.output, state.globstar = !0, consume(value + advance()), push({ type: "slash", value: "/", output: "" });
2334
1456
  continue;
2335
1457
  }
2336
1458
  if (prior.type === "bos" && rest[0] === "/") {
2337
- prev.type = "globstar";
2338
- prev.value += value;
2339
- prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
2340
- state.output = prev.output;
2341
- state.globstar = true;
2342
- consume(value + advance());
2343
- push({ type: "slash", value: "/", output: "" });
1459
+ prev.type = "globstar", prev.value += value, prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`, state.output = prev.output, state.globstar = !0, consume(value + advance()), push({ type: "slash", value: "/", output: "" });
2344
1460
  continue;
2345
1461
  }
2346
- state.output = state.output.slice(0, -prev.output.length);
2347
- prev.type = "globstar";
2348
- prev.output = globstar(opts);
2349
- prev.value += value;
2350
- state.output += prev.output;
2351
- state.globstar = true;
2352
- consume(value);
1462
+ state.output = state.output.slice(0, -prev.output.length), prev.type = "globstar", prev.output = globstar(opts), prev.value += value, state.output += prev.output, state.globstar = !0, consume(value);
2353
1463
  continue;
2354
1464
  }
2355
- const token = { type: "star", value, output: star };
2356
- if (opts.bash === true) {
2357
- token.output = ".*?";
2358
- if (prev.type === "bos" || prev.type === "slash") {
2359
- token.output = nodot + token.output;
2360
- }
2361
- push(token);
1465
+ let token = { type: "star", value, output: star };
1466
+ if (opts.bash === !0) {
1467
+ token.output = ".*?", (prev.type === "bos" || prev.type === "slash") && (token.output = nodot + token.output), push(token);
2362
1468
  continue;
2363
1469
  }
2364
- if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
2365
- token.output = value;
2366
- push(token);
1470
+ if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === !0) {
1471
+ token.output = value, push(token);
2367
1472
  continue;
2368
1473
  }
2369
- if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
2370
- if (prev.type === "dot") {
2371
- state.output += NO_DOT_SLASH;
2372
- prev.output += NO_DOT_SLASH;
2373
- } else if (opts.dot === true) {
2374
- state.output += NO_DOTS_SLASH;
2375
- prev.output += NO_DOTS_SLASH;
2376
- } else {
2377
- state.output += nodot;
2378
- prev.output += nodot;
2379
- }
2380
- if (peek() !== "*") {
2381
- state.output += ONE_CHAR;
2382
- prev.output += ONE_CHAR;
2383
- }
2384
- }
2385
- push(token);
2386
- }
2387
- while (state.brackets > 0) {
2388
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
2389
- state.output = utils.escapeLast(state.output, "[");
2390
- decrement("brackets");
1474
+ (state.index === state.start || prev.type === "slash" || prev.type === "dot") && (prev.type === "dot" ? (state.output += NO_DOT_SLASH, prev.output += NO_DOT_SLASH) : opts.dot === !0 ? (state.output += NO_DOTS_SLASH, prev.output += NO_DOTS_SLASH) : (state.output += nodot, prev.output += nodot), peek() !== "*" && (state.output += ONE_CHAR, prev.output += ONE_CHAR)), push(token);
2391
1475
  }
2392
- while (state.parens > 0) {
2393
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
2394
- state.output = utils.escapeLast(state.output, "(");
2395
- decrement("parens");
1476
+ for (; state.brackets > 0; ) {
1477
+ if (opts.strictBrackets === !0) throw new SyntaxError(syntaxError("closing", "]"));
1478
+ state.output = utils.escapeLast(state.output, "["), decrement("brackets");
2396
1479
  }
2397
- while (state.braces > 0) {
2398
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
2399
- state.output = utils.escapeLast(state.output, "{");
2400
- decrement("braces");
1480
+ for (; state.parens > 0; ) {
1481
+ if (opts.strictBrackets === !0) throw new SyntaxError(syntaxError("closing", ")"));
1482
+ state.output = utils.escapeLast(state.output, "("), decrement("parens");
2401
1483
  }
2402
- if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
2403
- push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` });
1484
+ for (; state.braces > 0; ) {
1485
+ if (opts.strictBrackets === !0) throw new SyntaxError(syntaxError("closing", "}"));
1486
+ state.output = utils.escapeLast(state.output, "{"), decrement("braces");
2404
1487
  }
2405
- if (state.backtrack === true) {
1488
+ if (opts.strictSlashes !== !0 && (prev.type === "star" || prev.type === "bracket") && push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }), state.backtrack === !0) {
2406
1489
  state.output = "";
2407
- for (const token of state.tokens) {
2408
- state.output += token.output != null ? token.output : token.value;
2409
- if (token.suffix) {
2410
- state.output += token.suffix;
2411
- }
2412
- }
1490
+ for (let token of state.tokens)
1491
+ state.output += token.output != null ? token.output : token.value, token.suffix && (state.output += token.suffix);
2413
1492
  }
2414
1493
  return state;
2415
- }, "parse");
1494
+ };
2416
1495
  parse.fastpaths = (input, options) => {
2417
- const opts = { ...options };
2418
- const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
2419
- const len = input.length;
2420
- if (len > max) {
1496
+ let opts = { ...options }, max = typeof opts.maxLength == "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
1497
+ if (len > max)
2421
1498
  throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
2422
- }
2423
1499
  input = REPLACEMENTS[input] || input;
2424
- const win32 = utils.isWindows(options);
2425
- const {
1500
+ let win32 = utils.isWindows(options), {
2426
1501
  DOT_LITERAL,
2427
1502
  SLASH_LITERAL,
2428
1503
  ONE_CHAR,
@@ -2432,20 +1507,9 @@ var require_parse2 = __commonJS({
2432
1507
  NO_DOTS_SLASH,
2433
1508
  STAR,
2434
1509
  START_ANCHOR
2435
- } = constants.globChars(win32);
2436
- const nodot = opts.dot ? NO_DOTS : NO_DOT;
2437
- const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
2438
- const capture = opts.capture ? "" : "?:";
2439
- const state = { negated: false, prefix: "" };
2440
- let star = opts.bash === true ? ".*?" : STAR;
2441
- if (opts.capture) {
2442
- star = `(${star})`;
2443
- }
2444
- const globstar = /* @__PURE__ */ __name((opts2) => {
2445
- if (opts2.noglobstar === true) return star;
2446
- return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
2447
- }, "globstar");
2448
- const create = /* @__PURE__ */ __name((str) => {
1510
+ } = constants.globChars(win32), nodot = opts.dot ? NO_DOTS : NO_DOT, slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT, capture = opts.capture ? "" : "?:", state = { negated: !1, prefix: "" }, star = opts.bash === !0 ? ".*?" : STAR;
1511
+ opts.capture && (star = `(${star})`);
1512
+ let globstar = (opts2) => opts2.noglobstar === !0 ? star : `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, create = (str) => {
2449
1513
  switch (str) {
2450
1514
  case "*":
2451
1515
  return `${nodot}${ONE_CHAR}${star}`;
@@ -2464,20 +1528,14 @@ var require_parse2 = __commonJS({
2464
1528
  case "**/.*":
2465
1529
  return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
2466
1530
  default: {
2467
- const match2 = /^(.*?)\.(\w+)$/.exec(str);
1531
+ let match2 = /^(.*?)\.(\w+)$/.exec(str);
2468
1532
  if (!match2) return;
2469
- const source2 = create(match2[1]);
2470
- if (!source2) return;
2471
- return source2 + DOT_LITERAL + match2[2];
1533
+ let source2 = create(match2[1]);
1534
+ return source2 ? source2 + DOT_LITERAL + match2[2] : void 0;
2472
1535
  }
2473
1536
  }
2474
- }, "create");
2475
- const output = utils.removePrefix(input, state);
2476
- let source = create(output);
2477
- if (source && opts.strictSlashes !== true) {
2478
- source += `${SLASH_LITERAL}?`;
2479
- }
2480
- return source;
1537
+ }, output = utils.removePrefix(input, state), source = create(output);
1538
+ return source && opts.strictSlashes !== !0 && (source += `${SLASH_LITERAL}?`), source;
2481
1539
  };
2482
1540
  module.exports = parse;
2483
1541
  }
@@ -2487,135 +1545,65 @@ var require_parse2 = __commonJS({
2487
1545
  var require_picomatch = __commonJS({
2488
1546
  "../../node_modules/picomatch/lib/picomatch.js"(exports, module) {
2489
1547
  "use strict";
2490
- var path = __require("path");
2491
- var scan = require_scan();
2492
- var parse = require_parse2();
2493
- var utils = require_utils2();
2494
- var constants = require_constants2();
2495
- var isObject = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject");
2496
- var picomatch = /* @__PURE__ */ __name((glob, options, returnState = false) => {
1548
+ var path = __require("path"), scan = require_scan(), parse = require_parse2(), utils = require_utils2(), constants = require_constants2(), isObject = (val) => val && typeof val == "object" && !Array.isArray(val), picomatch = (glob, options, returnState = !1) => {
2497
1549
  if (Array.isArray(glob)) {
2498
- const fns = glob.map((input) => picomatch(input, options, returnState));
2499
- const arrayMatcher = /* @__PURE__ */ __name((str) => {
2500
- for (const isMatch of fns) {
2501
- const state2 = isMatch(str);
1550
+ let fns = glob.map((input) => picomatch(input, options, returnState));
1551
+ return (str) => {
1552
+ for (let isMatch of fns) {
1553
+ let state2 = isMatch(str);
2502
1554
  if (state2) return state2;
2503
1555
  }
2504
- return false;
2505
- }, "arrayMatcher");
2506
- return arrayMatcher;
1556
+ return !1;
1557
+ };
2507
1558
  }
2508
- const isState = isObject(glob) && glob.tokens && glob.input;
2509
- if (glob === "" || typeof glob !== "string" && !isState) {
1559
+ let isState = isObject(glob) && glob.tokens && glob.input;
1560
+ if (glob === "" || typeof glob != "string" && !isState)
2510
1561
  throw new TypeError("Expected pattern to be a non-empty string");
2511
- }
2512
- const opts = options || {};
2513
- const posix = utils.isWindows(options);
2514
- const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
2515
- const state = regex.state;
1562
+ let opts = options || {}, posix = utils.isWindows(options), regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, !1, !0), state = regex.state;
2516
1563
  delete regex.state;
2517
- let isIgnored = /* @__PURE__ */ __name(() => false, "isIgnored");
1564
+ let isIgnored = () => !1;
2518
1565
  if (opts.ignore) {
2519
- const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
1566
+ let ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
2520
1567
  isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
2521
1568
  }
2522
- const matcher = /* @__PURE__ */ __name((input, returnObject = false) => {
2523
- const { isMatch, match: match2, output } = picomatch.test(input, regex, options, { glob, posix });
2524
- const result = { glob, state, regex, posix, input, output, match: match2, isMatch };
2525
- if (typeof opts.onResult === "function") {
2526
- opts.onResult(result);
2527
- }
2528
- if (isMatch === false) {
2529
- result.isMatch = false;
2530
- return returnObject ? result : false;
2531
- }
2532
- if (isIgnored(input)) {
2533
- if (typeof opts.onIgnore === "function") {
2534
- opts.onIgnore(result);
2535
- }
2536
- result.isMatch = false;
2537
- return returnObject ? result : false;
2538
- }
2539
- if (typeof opts.onMatch === "function") {
2540
- opts.onMatch(result);
2541
- }
2542
- return returnObject ? result : true;
2543
- }, "matcher");
2544
- if (returnState) {
2545
- matcher.state = state;
2546
- }
2547
- return matcher;
2548
- }, "picomatch");
1569
+ let matcher = (input, returnObject = !1) => {
1570
+ let { isMatch, match: match2, output } = picomatch.test(input, regex, options, { glob, posix }), result = { glob, state, regex, posix, input, output, match: match2, isMatch };
1571
+ return typeof opts.onResult == "function" && opts.onResult(result), isMatch === !1 ? (result.isMatch = !1, returnObject ? result : !1) : isIgnored(input) ? (typeof opts.onIgnore == "function" && opts.onIgnore(result), result.isMatch = !1, returnObject ? result : !1) : (typeof opts.onMatch == "function" && opts.onMatch(result), returnObject ? result : !0);
1572
+ };
1573
+ return returnState && (matcher.state = state), matcher;
1574
+ };
2549
1575
  picomatch.test = (input, regex, options, { glob, posix } = {}) => {
2550
- if (typeof input !== "string") {
1576
+ if (typeof input != "string")
2551
1577
  throw new TypeError("Expected input to be a string");
2552
- }
2553
- if (input === "") {
2554
- return { isMatch: false, output: "" };
2555
- }
2556
- const opts = options || {};
2557
- const format = opts.format || (posix ? utils.toPosixSlashes : null);
2558
- let match2 = input === glob;
2559
- let output = match2 && format ? format(input) : input;
2560
- if (match2 === false) {
2561
- output = format ? format(input) : input;
2562
- match2 = output === glob;
2563
- }
2564
- if (match2 === false || opts.capture === true) {
2565
- if (opts.matchBase === true || opts.basename === true) {
2566
- match2 = picomatch.matchBase(input, regex, options, posix);
2567
- } else {
2568
- match2 = regex.exec(output);
2569
- }
2570
- }
2571
- return { isMatch: Boolean(match2), match: match2, output };
2572
- };
2573
- picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
2574
- const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
2575
- return regex.test(path.basename(input));
1578
+ if (input === "")
1579
+ return { isMatch: !1, output: "" };
1580
+ let opts = options || {}, format = opts.format || (posix ? utils.toPosixSlashes : null), match2 = input === glob, output = match2 && format ? format(input) : input;
1581
+ return match2 === !1 && (output = format ? format(input) : input, match2 = output === glob), (match2 === !1 || opts.capture === !0) && (opts.matchBase === !0 || opts.basename === !0 ? match2 = picomatch.matchBase(input, regex, options, posix) : match2 = regex.exec(output)), { isMatch: !!match2, match: match2, output };
2576
1582
  };
1583
+ picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path.basename(input));
2577
1584
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
2578
- picomatch.parse = (pattern, options) => {
2579
- if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
2580
- return parse(pattern, { ...options, fastpaths: false });
2581
- };
1585
+ picomatch.parse = (pattern, options) => Array.isArray(pattern) ? pattern.map((p) => picomatch.parse(p, options)) : parse(pattern, { ...options, fastpaths: !1 });
2582
1586
  picomatch.scan = (input, options) => scan(input, options);
2583
- picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
2584
- if (returnOutput === true) {
1587
+ picomatch.compileRe = (state, options, returnOutput = !1, returnState = !1) => {
1588
+ if (returnOutput === !0)
2585
1589
  return state.output;
2586
- }
2587
- const opts = options || {};
2588
- const prepend = opts.contains ? "" : "^";
2589
- const append = opts.contains ? "" : "$";
2590
- let source = `${prepend}(?:${state.output})${append}`;
2591
- if (state && state.negated === true) {
2592
- source = `^(?!${source}).*$`;
2593
- }
2594
- const regex = picomatch.toRegex(source, options);
2595
- if (returnState === true) {
2596
- regex.state = state;
2597
- }
2598
- return regex;
1590
+ let opts = options || {}, prepend = opts.contains ? "" : "^", append = opts.contains ? "" : "$", source = `${prepend}(?:${state.output})${append}`;
1591
+ state && state.negated === !0 && (source = `^(?!${source}).*$`);
1592
+ let regex = picomatch.toRegex(source, options);
1593
+ return returnState === !0 && (regex.state = state), regex;
2599
1594
  };
2600
- picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
2601
- if (!input || typeof input !== "string") {
1595
+ picomatch.makeRe = (input, options = {}, returnOutput = !1, returnState = !1) => {
1596
+ if (!input || typeof input != "string")
2602
1597
  throw new TypeError("Expected a non-empty string");
2603
- }
2604
- let parsed = { negated: false, fastpaths: true };
2605
- if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
2606
- parsed.output = parse.fastpaths(input, options);
2607
- }
2608
- if (!parsed.output) {
2609
- parsed = parse(input, options);
2610
- }
2611
- return picomatch.compileRe(parsed, options, returnOutput, returnState);
1598
+ let parsed = { negated: !1, fastpaths: !0 };
1599
+ return options.fastpaths !== !1 && (input[0] === "." || input[0] === "*") && (parsed.output = parse.fastpaths(input, options)), parsed.output || (parsed = parse(input, options)), picomatch.compileRe(parsed, options, returnOutput, returnState);
2612
1600
  };
2613
1601
  picomatch.toRegex = (source, options) => {
2614
1602
  try {
2615
- const opts = options || {};
1603
+ let opts = options || {};
2616
1604
  return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
2617
1605
  } catch (err) {
2618
- if (options && options.debug === true) throw err;
1606
+ if (options && options.debug === !0) throw err;
2619
1607
  return /$^/;
2620
1608
  }
2621
1609
  };
@@ -2636,99 +1624,61 @@ var require_picomatch2 = __commonJS({
2636
1624
  var require_micromatch = __commonJS({
2637
1625
  "../../node_modules/micromatch/index.js"(exports, module) {
2638
1626
  "use strict";
2639
- var util = __require("util");
2640
- var braces = require_braces();
2641
- var picomatch = require_picomatch2();
2642
- var utils = require_utils2();
2643
- var isEmptyString = /* @__PURE__ */ __name((v) => v === "" || v === "./", "isEmptyString");
2644
- var hasBraces = /* @__PURE__ */ __name((v) => {
2645
- const index = v.indexOf("{");
1627
+ var util = __require("util"), braces = require_braces(), picomatch = require_picomatch2(), utils = require_utils2(), isEmptyString = (v) => v === "" || v === "./", hasBraces = (v) => {
1628
+ let index = v.indexOf("{");
2646
1629
  return index > -1 && v.indexOf("}", index) > -1;
2647
- }, "hasBraces");
2648
- var micromatch = /* @__PURE__ */ __name((list, patterns, options) => {
2649
- patterns = [].concat(patterns);
2650
- list = [].concat(list);
2651
- let omit = /* @__PURE__ */ new Set();
2652
- let keep = /* @__PURE__ */ new Set();
2653
- let items = /* @__PURE__ */ new Set();
2654
- let negatives = 0;
2655
- let onResult = /* @__PURE__ */ __name((state) => {
2656
- items.add(state.output);
2657
- if (options && options.onResult) {
2658
- options.onResult(state);
2659
- }
2660
- }, "onResult");
1630
+ }, micromatch = (list, patterns, options) => {
1631
+ patterns = [].concat(patterns), list = [].concat(list);
1632
+ let omit = /* @__PURE__ */ new Set(), keep = /* @__PURE__ */ new Set(), items = /* @__PURE__ */ new Set(), negatives = 0, onResult = (state) => {
1633
+ items.add(state.output), options && options.onResult && options.onResult(state);
1634
+ };
2661
1635
  for (let i = 0; i < patterns.length; i++) {
2662
- let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
2663
- let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
2664
- if (negated) negatives++;
1636
+ let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, !0), negated = isMatch.state.negated || isMatch.state.negatedExtglob;
1637
+ negated && negatives++;
2665
1638
  for (let item of list) {
2666
- let matched = isMatch(item, true);
2667
- let match2 = negated ? !matched.isMatch : matched.isMatch;
2668
- if (!match2) continue;
2669
- if (negated) {
2670
- omit.add(matched.output);
2671
- } else {
2672
- omit.delete(matched.output);
2673
- keep.add(matched.output);
2674
- }
1639
+ let matched = isMatch(item, !0);
1640
+ (negated ? !matched.isMatch : matched.isMatch) && (negated ? omit.add(matched.output) : (omit.delete(matched.output), keep.add(matched.output)));
2675
1641
  }
2676
1642
  }
2677
- let result = negatives === patterns.length ? [...items] : [...keep];
2678
- let matches = result.filter((item) => !omit.has(item));
1643
+ let matches = (negatives === patterns.length ? [...items] : [...keep]).filter((item) => !omit.has(item));
2679
1644
  if (options && matches.length === 0) {
2680
- if (options.failglob === true) {
1645
+ if (options.failglob === !0)
2681
1646
  throw new Error(`No matches found for "${patterns.join(", ")}"`);
2682
- }
2683
- if (options.nonull === true || options.nullglob === true) {
1647
+ if (options.nonull === !0 || options.nullglob === !0)
2684
1648
  return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
2685
- }
2686
1649
  }
2687
1650
  return matches;
2688
- }, "micromatch");
1651
+ };
2689
1652
  micromatch.match = micromatch;
2690
1653
  micromatch.matcher = (pattern, options) => picomatch(pattern, options);
2691
1654
  micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
2692
1655
  micromatch.any = micromatch.isMatch;
2693
1656
  micromatch.not = (list, patterns, options = {}) => {
2694
1657
  patterns = [].concat(patterns).map(String);
2695
- let result = /* @__PURE__ */ new Set();
2696
- let items = [];
2697
- let onResult = /* @__PURE__ */ __name((state) => {
2698
- if (options.onResult) options.onResult(state);
2699
- items.push(state.output);
2700
- }, "onResult");
2701
- let matches = new Set(micromatch(list, patterns, { ...options, onResult }));
2702
- for (let item of items) {
2703
- if (!matches.has(item)) {
2704
- result.add(item);
2705
- }
2706
- }
1658
+ let result = /* @__PURE__ */ new Set(), items = [], onResult = (state) => {
1659
+ options.onResult && options.onResult(state), items.push(state.output);
1660
+ }, matches = new Set(micromatch(list, patterns, { ...options, onResult }));
1661
+ for (let item of items)
1662
+ matches.has(item) || result.add(item);
2707
1663
  return [...result];
2708
1664
  };
2709
1665
  micromatch.contains = (str, pattern, options) => {
2710
- if (typeof str !== "string") {
1666
+ if (typeof str != "string")
2711
1667
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
2712
- }
2713
- if (Array.isArray(pattern)) {
1668
+ if (Array.isArray(pattern))
2714
1669
  return pattern.some((p) => micromatch.contains(str, p, options));
1670
+ if (typeof pattern == "string") {
1671
+ if (isEmptyString(str) || isEmptyString(pattern))
1672
+ return !1;
1673
+ if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern))
1674
+ return !0;
2715
1675
  }
2716
- if (typeof pattern === "string") {
2717
- if (isEmptyString(str) || isEmptyString(pattern)) {
2718
- return false;
2719
- }
2720
- if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) {
2721
- return true;
2722
- }
2723
- }
2724
- return micromatch.isMatch(str, pattern, { ...options, contains: true });
1676
+ return micromatch.isMatch(str, pattern, { ...options, contains: !0 });
2725
1677
  };
2726
1678
  micromatch.matchKeys = (obj, patterns, options) => {
2727
- if (!utils.isObject(obj)) {
1679
+ if (!utils.isObject(obj))
2728
1680
  throw new TypeError("Expected the first argument to be an object");
2729
- }
2730
- let keys = micromatch(Object.keys(obj), patterns, options);
2731
- let res = {};
1681
+ let keys = micromatch(Object.keys(obj), patterns, options), res = {};
2732
1682
  for (let key of keys) res[key] = obj[key];
2733
1683
  return res;
2734
1684
  };
@@ -2736,57 +1686,46 @@ var require_micromatch = __commonJS({
2736
1686
  let items = [].concat(list);
2737
1687
  for (let pattern of [].concat(patterns)) {
2738
1688
  let isMatch = picomatch(String(pattern), options);
2739
- if (items.some((item) => isMatch(item))) {
2740
- return true;
2741
- }
1689
+ if (items.some((item) => isMatch(item)))
1690
+ return !0;
2742
1691
  }
2743
- return false;
1692
+ return !1;
2744
1693
  };
2745
1694
  micromatch.every = (list, patterns, options) => {
2746
1695
  let items = [].concat(list);
2747
1696
  for (let pattern of [].concat(patterns)) {
2748
1697
  let isMatch = picomatch(String(pattern), options);
2749
- if (!items.every((item) => isMatch(item))) {
2750
- return false;
2751
- }
1698
+ if (!items.every((item) => isMatch(item)))
1699
+ return !1;
2752
1700
  }
2753
- return true;
1701
+ return !0;
2754
1702
  };
2755
1703
  micromatch.all = (str, patterns, options) => {
2756
- if (typeof str !== "string") {
1704
+ if (typeof str != "string")
2757
1705
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
2758
- }
2759
1706
  return [].concat(patterns).every((p) => picomatch(p, options)(str));
2760
1707
  };
2761
1708
  micromatch.capture = (glob, input, options) => {
2762
- let posix = utils.isWindows(options);
2763
- let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
2764
- let match2 = regex.exec(posix ? utils.toPosixSlashes(input) : input);
2765
- if (match2) {
1709
+ let posix = utils.isWindows(options), match2 = picomatch.makeRe(String(glob), { ...options, capture: !0 }).exec(posix ? utils.toPosixSlashes(input) : input);
1710
+ if (match2)
2766
1711
  return match2.slice(1).map((v) => v === void 0 ? "" : v);
2767
- }
2768
1712
  };
2769
1713
  micromatch.makeRe = (...args) => picomatch.makeRe(...args);
2770
1714
  micromatch.scan = (...args) => picomatch.scan(...args);
2771
1715
  micromatch.parse = (patterns, options) => {
2772
1716
  let res = [];
2773
- for (let pattern of [].concat(patterns || [])) {
2774
- for (let str of braces(String(pattern), options)) {
1717
+ for (let pattern of [].concat(patterns || []))
1718
+ for (let str of braces(String(pattern), options))
2775
1719
  res.push(picomatch.parse(str, options));
2776
- }
2777
- }
2778
1720
  return res;
2779
1721
  };
2780
1722
  micromatch.braces = (pattern, options) => {
2781
- if (typeof pattern !== "string") throw new TypeError("Expected a string");
2782
- if (options && options.nobrace === true || !hasBraces(pattern)) {
2783
- return [pattern];
2784
- }
2785
- return braces(pattern, options);
1723
+ if (typeof pattern != "string") throw new TypeError("Expected a string");
1724
+ return options && options.nobrace === !0 || !hasBraces(pattern) ? [pattern] : braces(pattern, options);
2786
1725
  };
2787
1726
  micromatch.braceExpand = (pattern, options) => {
2788
- if (typeof pattern !== "string") throw new TypeError("Expected a string");
2789
- return micromatch.braces(pattern, { ...options, expand: true });
1727
+ if (typeof pattern != "string") throw new TypeError("Expected a string");
1728
+ return micromatch.braces(pattern, { ...options, expand: !0 });
2790
1729
  };
2791
1730
  micromatch.hasBraces = hasBraces;
2792
1731
  module.exports = micromatch;
@@ -2796,19 +1735,13 @@ var require_micromatch = __commonJS({
2796
1735
  // ../../node_modules/totalist/sync/index.js
2797
1736
  var require_sync = __commonJS({
2798
1737
  "../../node_modules/totalist/sync/index.js"(exports) {
2799
- var { join: join2, resolve: resolve2 } = __require("path");
2800
- var { readdirSync, statSync } = __require("fs");
1738
+ var { join: join2, resolve: resolve2 } = __require("path"), { readdirSync, statSync } = __require("fs");
2801
1739
  function totalist(dir, callback, pre = "") {
2802
1740
  dir = resolve2(".", dir);
2803
- let arr = readdirSync(dir);
2804
- let i = 0, abs, stats;
2805
- for (; i < arr.length; i++) {
2806
- abs = join2(dir, arr[i]);
2807
- stats = statSync(abs);
2808
- stats.isDirectory() ? totalist(abs, callback, join2(pre, arr[i])) : callback(join2(pre, arr[i]), abs, stats);
2809
- }
1741
+ let arr = readdirSync(dir), i = 0, abs, stats;
1742
+ for (; i < arr.length; i++)
1743
+ abs = join2(dir, arr[i]), stats = statSync(abs), stats.isDirectory() ? totalist(abs, callback, join2(pre, arr[i])) : callback(join2(pre, arr[i]), abs, stats);
2810
1744
  }
2811
- __name(totalist, "totalist");
2812
1745
  exports.totalist = totalist;
2813
1746
  }
2814
1747
  });
@@ -2825,22 +1758,10 @@ var require_build = __commonJS({
2825
1758
  let pathname = raw, search = "", query, hash;
2826
1759
  if (raw.length > 1) {
2827
1760
  let idx = raw.indexOf("#", 1);
2828
- if (idx !== -1) {
2829
- hash = raw.substring(idx);
2830
- pathname = raw.substring(0, idx);
2831
- }
2832
- idx = pathname.indexOf("?", 1);
2833
- if (idx !== -1) {
2834
- search = pathname.substring(idx);
2835
- pathname = pathname.substring(0, idx);
2836
- if (search.length > 1) {
2837
- query = qs.parse(search.substring(1));
2838
- }
2839
- }
1761
+ idx !== -1 && (hash = raw.substring(idx), pathname = raw.substring(0, idx)), idx = pathname.indexOf("?", 1), idx !== -1 && (search = pathname.substring(idx), pathname = pathname.substring(0, idx), search.length > 1 && (query = qs.parse(search.substring(1))));
2840
1762
  }
2841
1763
  return req._parsedUrl = { pathname, search, query, hash, raw };
2842
1764
  }
2843
- __name(parse, "parse");
2844
1765
  exports.parse = parse;
2845
1766
  }
2846
1767
  });
@@ -2853,447 +1774,445 @@ var require_mrmime = __commonJS({
2853
1774
  "3gp": "video/3gpp",
2854
1775
  "3gpp": "video/3gpp",
2855
1776
  "3mf": "model/3mf",
2856
- "aac": "audio/aac",
2857
- "ac": "application/pkix-attr-cert",
2858
- "adp": "audio/adpcm",
2859
- "adts": "audio/aac",
2860
- "ai": "application/postscript",
2861
- "aml": "application/automationml-aml+xml",
2862
- "amlx": "application/automationml-amlx+zip",
2863
- "amr": "audio/amr",
2864
- "apng": "image/apng",
2865
- "appcache": "text/cache-manifest",
2866
- "appinstaller": "application/appinstaller",
2867
- "appx": "application/appx",
2868
- "appxbundle": "application/appxbundle",
2869
- "asc": "application/pgp-keys",
2870
- "atom": "application/atom+xml",
2871
- "atomcat": "application/atomcat+xml",
2872
- "atomdeleted": "application/atomdeleted+xml",
2873
- "atomsvc": "application/atomsvc+xml",
2874
- "au": "audio/basic",
2875
- "avci": "image/avci",
2876
- "avcs": "image/avcs",
2877
- "avif": "image/avif",
2878
- "aw": "application/applixware",
2879
- "bdoc": "application/bdoc",
2880
- "bin": "application/octet-stream",
2881
- "bmp": "image/bmp",
2882
- "bpk": "application/octet-stream",
2883
- "btf": "image/prs.btif",
2884
- "btif": "image/prs.btif",
2885
- "buffer": "application/octet-stream",
2886
- "ccxml": "application/ccxml+xml",
2887
- "cdfx": "application/cdfx+xml",
2888
- "cdmia": "application/cdmi-capability",
2889
- "cdmic": "application/cdmi-container",
2890
- "cdmid": "application/cdmi-domain",
2891
- "cdmio": "application/cdmi-object",
2892
- "cdmiq": "application/cdmi-queue",
2893
- "cer": "application/pkix-cert",
2894
- "cgm": "image/cgm",
2895
- "cjs": "application/node",
2896
- "class": "application/java-vm",
2897
- "coffee": "text/coffeescript",
2898
- "conf": "text/plain",
2899
- "cpl": "application/cpl+xml",
2900
- "cpt": "application/mac-compactpro",
2901
- "crl": "application/pkix-crl",
2902
- "css": "text/css",
2903
- "csv": "text/csv",
2904
- "cu": "application/cu-seeme",
2905
- "cwl": "application/cwl",
2906
- "cww": "application/prs.cww",
2907
- "davmount": "application/davmount+xml",
2908
- "dbk": "application/docbook+xml",
2909
- "deb": "application/octet-stream",
2910
- "def": "text/plain",
2911
- "deploy": "application/octet-stream",
2912
- "dib": "image/bmp",
1777
+ aac: "audio/aac",
1778
+ ac: "application/pkix-attr-cert",
1779
+ adp: "audio/adpcm",
1780
+ adts: "audio/aac",
1781
+ ai: "application/postscript",
1782
+ aml: "application/automationml-aml+xml",
1783
+ amlx: "application/automationml-amlx+zip",
1784
+ amr: "audio/amr",
1785
+ apng: "image/apng",
1786
+ appcache: "text/cache-manifest",
1787
+ appinstaller: "application/appinstaller",
1788
+ appx: "application/appx",
1789
+ appxbundle: "application/appxbundle",
1790
+ asc: "application/pgp-keys",
1791
+ atom: "application/atom+xml",
1792
+ atomcat: "application/atomcat+xml",
1793
+ atomdeleted: "application/atomdeleted+xml",
1794
+ atomsvc: "application/atomsvc+xml",
1795
+ au: "audio/basic",
1796
+ avci: "image/avci",
1797
+ avcs: "image/avcs",
1798
+ avif: "image/avif",
1799
+ aw: "application/applixware",
1800
+ bdoc: "application/bdoc",
1801
+ bin: "application/octet-stream",
1802
+ bmp: "image/bmp",
1803
+ bpk: "application/octet-stream",
1804
+ btf: "image/prs.btif",
1805
+ btif: "image/prs.btif",
1806
+ buffer: "application/octet-stream",
1807
+ ccxml: "application/ccxml+xml",
1808
+ cdfx: "application/cdfx+xml",
1809
+ cdmia: "application/cdmi-capability",
1810
+ cdmic: "application/cdmi-container",
1811
+ cdmid: "application/cdmi-domain",
1812
+ cdmio: "application/cdmi-object",
1813
+ cdmiq: "application/cdmi-queue",
1814
+ cer: "application/pkix-cert",
1815
+ cgm: "image/cgm",
1816
+ cjs: "application/node",
1817
+ class: "application/java-vm",
1818
+ coffee: "text/coffeescript",
1819
+ conf: "text/plain",
1820
+ cpl: "application/cpl+xml",
1821
+ cpt: "application/mac-compactpro",
1822
+ crl: "application/pkix-crl",
1823
+ css: "text/css",
1824
+ csv: "text/csv",
1825
+ cu: "application/cu-seeme",
1826
+ cwl: "application/cwl",
1827
+ cww: "application/prs.cww",
1828
+ davmount: "application/davmount+xml",
1829
+ dbk: "application/docbook+xml",
1830
+ deb: "application/octet-stream",
1831
+ def: "text/plain",
1832
+ deploy: "application/octet-stream",
1833
+ dib: "image/bmp",
2913
1834
  "disposition-notification": "message/disposition-notification",
2914
- "dist": "application/octet-stream",
2915
- "distz": "application/octet-stream",
2916
- "dll": "application/octet-stream",
2917
- "dmg": "application/octet-stream",
2918
- "dms": "application/octet-stream",
2919
- "doc": "application/msword",
2920
- "dot": "application/msword",
2921
- "dpx": "image/dpx",
2922
- "drle": "image/dicom-rle",
2923
- "dsc": "text/prs.lines.tag",
2924
- "dssc": "application/dssc+der",
2925
- "dtd": "application/xml-dtd",
2926
- "dump": "application/octet-stream",
2927
- "dwd": "application/atsc-dwd+xml",
2928
- "ear": "application/java-archive",
2929
- "ecma": "application/ecmascript",
2930
- "elc": "application/octet-stream",
2931
- "emf": "image/emf",
2932
- "eml": "message/rfc822",
2933
- "emma": "application/emma+xml",
2934
- "emotionml": "application/emotionml+xml",
2935
- "eps": "application/postscript",
2936
- "epub": "application/epub+zip",
2937
- "exe": "application/octet-stream",
2938
- "exi": "application/exi",
2939
- "exp": "application/express",
2940
- "exr": "image/aces",
2941
- "ez": "application/andrew-inset",
2942
- "fdf": "application/fdf",
2943
- "fdt": "application/fdt+xml",
2944
- "fits": "image/fits",
2945
- "g3": "image/g3fax",
2946
- "gbr": "application/rpki-ghostbusters",
2947
- "geojson": "application/geo+json",
2948
- "gif": "image/gif",
2949
- "glb": "model/gltf-binary",
2950
- "gltf": "model/gltf+json",
2951
- "gml": "application/gml+xml",
2952
- "gpx": "application/gpx+xml",
2953
- "gram": "application/srgs",
2954
- "grxml": "application/srgs+xml",
2955
- "gxf": "application/gxf",
2956
- "gz": "application/gzip",
2957
- "h261": "video/h261",
2958
- "h263": "video/h263",
2959
- "h264": "video/h264",
2960
- "heic": "image/heic",
2961
- "heics": "image/heic-sequence",
2962
- "heif": "image/heif",
2963
- "heifs": "image/heif-sequence",
2964
- "hej2": "image/hej2k",
2965
- "held": "application/atsc-held+xml",
2966
- "hjson": "application/hjson",
2967
- "hlp": "application/winhlp",
2968
- "hqx": "application/mac-binhex40",
2969
- "hsj2": "image/hsj2",
2970
- "htm": "text/html",
2971
- "html": "text/html",
2972
- "ics": "text/calendar",
2973
- "ief": "image/ief",
2974
- "ifb": "text/calendar",
2975
- "iges": "model/iges",
2976
- "igs": "model/iges",
2977
- "img": "application/octet-stream",
2978
- "in": "text/plain",
2979
- "ini": "text/plain",
2980
- "ink": "application/inkml+xml",
2981
- "inkml": "application/inkml+xml",
2982
- "ipfix": "application/ipfix",
2983
- "iso": "application/octet-stream",
2984
- "its": "application/its+xml",
2985
- "jade": "text/jade",
2986
- "jar": "application/java-archive",
2987
- "jhc": "image/jphc",
2988
- "jls": "image/jls",
2989
- "jp2": "image/jp2",
2990
- "jpe": "image/jpeg",
2991
- "jpeg": "image/jpeg",
2992
- "jpf": "image/jpx",
2993
- "jpg": "image/jpeg",
2994
- "jpg2": "image/jp2",
2995
- "jpgm": "image/jpm",
2996
- "jpgv": "video/jpeg",
2997
- "jph": "image/jph",
2998
- "jpm": "image/jpm",
2999
- "jpx": "image/jpx",
3000
- "js": "text/javascript",
3001
- "json": "application/json",
3002
- "json5": "application/json5",
3003
- "jsonld": "application/ld+json",
3004
- "jsonml": "application/jsonml+json",
3005
- "jsx": "text/jsx",
3006
- "jt": "model/jt",
3007
- "jxl": "image/jxl",
3008
- "jxr": "image/jxr",
3009
- "jxra": "image/jxra",
3010
- "jxrs": "image/jxrs",
3011
- "jxs": "image/jxs",
3012
- "jxsc": "image/jxsc",
3013
- "jxsi": "image/jxsi",
3014
- "jxss": "image/jxss",
3015
- "kar": "audio/midi",
3016
- "ktx": "image/ktx",
3017
- "ktx2": "image/ktx2",
3018
- "less": "text/less",
3019
- "lgr": "application/lgr+xml",
3020
- "list": "text/plain",
3021
- "litcoffee": "text/coffeescript",
3022
- "log": "text/plain",
3023
- "lostxml": "application/lost+xml",
3024
- "lrf": "application/octet-stream",
3025
- "m1v": "video/mpeg",
3026
- "m21": "application/mp21",
3027
- "m2a": "audio/mpeg",
3028
- "m2t": "video/mp2t",
3029
- "m2ts": "video/mp2t",
3030
- "m2v": "video/mpeg",
3031
- "m3a": "audio/mpeg",
3032
- "m4a": "audio/mp4",
3033
- "m4p": "application/mp4",
3034
- "m4s": "video/iso.segment",
3035
- "ma": "application/mathematica",
3036
- "mads": "application/mads+xml",
3037
- "maei": "application/mmt-aei+xml",
3038
- "man": "text/troff",
3039
- "manifest": "text/cache-manifest",
3040
- "map": "application/json",
3041
- "mar": "application/octet-stream",
3042
- "markdown": "text/markdown",
3043
- "mathml": "application/mathml+xml",
3044
- "mb": "application/mathematica",
3045
- "mbox": "application/mbox",
3046
- "md": "text/markdown",
3047
- "mdx": "text/mdx",
3048
- "me": "text/troff",
3049
- "mesh": "model/mesh",
3050
- "meta4": "application/metalink4+xml",
3051
- "metalink": "application/metalink+xml",
3052
- "mets": "application/mets+xml",
3053
- "mft": "application/rpki-manifest",
3054
- "mid": "audio/midi",
3055
- "midi": "audio/midi",
3056
- "mime": "message/rfc822",
3057
- "mj2": "video/mj2",
3058
- "mjp2": "video/mj2",
3059
- "mjs": "text/javascript",
3060
- "mml": "text/mathml",
3061
- "mods": "application/mods+xml",
3062
- "mov": "video/quicktime",
3063
- "mp2": "audio/mpeg",
3064
- "mp21": "application/mp21",
3065
- "mp2a": "audio/mpeg",
3066
- "mp3": "audio/mpeg",
3067
- "mp4": "video/mp4",
3068
- "mp4a": "audio/mp4",
3069
- "mp4s": "application/mp4",
3070
- "mp4v": "video/mp4",
3071
- "mpd": "application/dash+xml",
3072
- "mpe": "video/mpeg",
3073
- "mpeg": "video/mpeg",
3074
- "mpf": "application/media-policy-dataset+xml",
3075
- "mpg": "video/mpeg",
3076
- "mpg4": "video/mp4",
3077
- "mpga": "audio/mpeg",
3078
- "mpp": "application/dash-patch+xml",
3079
- "mrc": "application/marc",
3080
- "mrcx": "application/marcxml+xml",
3081
- "ms": "text/troff",
3082
- "mscml": "application/mediaservercontrol+xml",
3083
- "msh": "model/mesh",
3084
- "msi": "application/octet-stream",
3085
- "msix": "application/msix",
3086
- "msixbundle": "application/msixbundle",
3087
- "msm": "application/octet-stream",
3088
- "msp": "application/octet-stream",
3089
- "mtl": "model/mtl",
3090
- "mts": "video/mp2t",
3091
- "musd": "application/mmt-usd+xml",
3092
- "mxf": "application/mxf",
3093
- "mxmf": "audio/mobile-xmf",
3094
- "mxml": "application/xv+xml",
3095
- "n3": "text/n3",
3096
- "nb": "application/mathematica",
3097
- "nq": "application/n-quads",
3098
- "nt": "application/n-triples",
3099
- "obj": "model/obj",
3100
- "oda": "application/oda",
3101
- "oga": "audio/ogg",
3102
- "ogg": "audio/ogg",
3103
- "ogv": "video/ogg",
3104
- "ogx": "application/ogg",
3105
- "omdoc": "application/omdoc+xml",
3106
- "onepkg": "application/onenote",
3107
- "onetmp": "application/onenote",
3108
- "onetoc": "application/onenote",
3109
- "onetoc2": "application/onenote",
3110
- "opf": "application/oebps-package+xml",
3111
- "opus": "audio/ogg",
3112
- "otf": "font/otf",
3113
- "owl": "application/rdf+xml",
3114
- "oxps": "application/oxps",
3115
- "p10": "application/pkcs10",
3116
- "p7c": "application/pkcs7-mime",
3117
- "p7m": "application/pkcs7-mime",
3118
- "p7s": "application/pkcs7-signature",
3119
- "p8": "application/pkcs8",
3120
- "pdf": "application/pdf",
3121
- "pfr": "application/font-tdpfr",
3122
- "pgp": "application/pgp-encrypted",
3123
- "pkg": "application/octet-stream",
3124
- "pki": "application/pkixcmp",
3125
- "pkipath": "application/pkix-pkipath",
3126
- "pls": "application/pls+xml",
3127
- "png": "image/png",
3128
- "prc": "model/prc",
3129
- "prf": "application/pics-rules",
3130
- "provx": "application/provenance+xml",
3131
- "ps": "application/postscript",
3132
- "pskcxml": "application/pskc+xml",
3133
- "pti": "image/prs.pti",
3134
- "qt": "video/quicktime",
3135
- "raml": "application/raml+yaml",
3136
- "rapd": "application/route-apd+xml",
3137
- "rdf": "application/rdf+xml",
3138
- "relo": "application/p2p-overlay+xml",
3139
- "rif": "application/reginfo+xml",
3140
- "rl": "application/resource-lists+xml",
3141
- "rld": "application/resource-lists-diff+xml",
3142
- "rmi": "audio/midi",
3143
- "rnc": "application/relax-ng-compact-syntax",
3144
- "rng": "application/xml",
3145
- "roa": "application/rpki-roa",
3146
- "roff": "text/troff",
3147
- "rq": "application/sparql-query",
3148
- "rs": "application/rls-services+xml",
3149
- "rsat": "application/atsc-rsat+xml",
3150
- "rsd": "application/rsd+xml",
3151
- "rsheet": "application/urc-ressheet+xml",
3152
- "rss": "application/rss+xml",
3153
- "rtf": "text/rtf",
3154
- "rtx": "text/richtext",
3155
- "rusd": "application/route-usd+xml",
3156
- "s3m": "audio/s3m",
3157
- "sbml": "application/sbml+xml",
3158
- "scq": "application/scvp-cv-request",
3159
- "scs": "application/scvp-cv-response",
3160
- "sdp": "application/sdp",
3161
- "senmlx": "application/senml+xml",
3162
- "sensmlx": "application/sensml+xml",
3163
- "ser": "application/java-serialized-object",
3164
- "setpay": "application/set-payment-initiation",
3165
- "setreg": "application/set-registration-initiation",
3166
- "sgi": "image/sgi",
3167
- "sgm": "text/sgml",
3168
- "sgml": "text/sgml",
3169
- "shex": "text/shex",
3170
- "shf": "application/shf+xml",
3171
- "shtml": "text/html",
3172
- "sieve": "application/sieve",
3173
- "sig": "application/pgp-signature",
3174
- "sil": "audio/silk",
3175
- "silo": "model/mesh",
3176
- "siv": "application/sieve",
3177
- "slim": "text/slim",
3178
- "slm": "text/slim",
3179
- "sls": "application/route-s-tsid+xml",
3180
- "smi": "application/smil+xml",
3181
- "smil": "application/smil+xml",
3182
- "snd": "audio/basic",
3183
- "so": "application/octet-stream",
3184
- "spdx": "text/spdx",
3185
- "spp": "application/scvp-vp-response",
3186
- "spq": "application/scvp-vp-request",
3187
- "spx": "audio/ogg",
3188
- "sql": "application/sql",
3189
- "sru": "application/sru+xml",
3190
- "srx": "application/sparql-results+xml",
3191
- "ssdl": "application/ssdl+xml",
3192
- "ssml": "application/ssml+xml",
3193
- "stk": "application/hyperstudio",
3194
- "stl": "model/stl",
3195
- "stpx": "model/step+xml",
3196
- "stpxz": "model/step-xml+zip",
3197
- "stpz": "model/step+zip",
3198
- "styl": "text/stylus",
3199
- "stylus": "text/stylus",
3200
- "svg": "image/svg+xml",
3201
- "svgz": "image/svg+xml",
3202
- "swidtag": "application/swid+xml",
3203
- "t": "text/troff",
3204
- "t38": "image/t38",
3205
- "td": "application/urc-targetdesc+xml",
3206
- "tei": "application/tei+xml",
3207
- "teicorpus": "application/tei+xml",
3208
- "text": "text/plain",
3209
- "tfi": "application/thraud+xml",
3210
- "tfx": "image/tiff-fx",
3211
- "tif": "image/tiff",
3212
- "tiff": "image/tiff",
3213
- "toml": "application/toml",
3214
- "tr": "text/troff",
3215
- "trig": "application/trig",
3216
- "ts": "video/mp2t",
3217
- "tsd": "application/timestamped-data",
3218
- "tsv": "text/tab-separated-values",
3219
- "ttc": "font/collection",
3220
- "ttf": "font/ttf",
3221
- "ttl": "text/turtle",
3222
- "ttml": "application/ttml+xml",
3223
- "txt": "text/plain",
3224
- "u3d": "model/u3d",
3225
- "u8dsn": "message/global-delivery-status",
3226
- "u8hdr": "message/global-headers",
3227
- "u8mdn": "message/global-disposition-notification",
3228
- "u8msg": "message/global",
3229
- "ubj": "application/ubjson",
3230
- "uri": "text/uri-list",
3231
- "uris": "text/uri-list",
3232
- "urls": "text/uri-list",
3233
- "vcard": "text/vcard",
3234
- "vrml": "model/vrml",
3235
- "vtt": "text/vtt",
3236
- "vxml": "application/voicexml+xml",
3237
- "war": "application/java-archive",
3238
- "wasm": "application/wasm",
3239
- "wav": "audio/wav",
3240
- "weba": "audio/webm",
3241
- "webm": "video/webm",
3242
- "webmanifest": "application/manifest+json",
3243
- "webp": "image/webp",
3244
- "wgsl": "text/wgsl",
3245
- "wgt": "application/widget",
3246
- "wif": "application/watcherinfo+xml",
3247
- "wmf": "image/wmf",
3248
- "woff": "font/woff",
3249
- "woff2": "font/woff2",
3250
- "wrl": "model/vrml",
3251
- "wsdl": "application/wsdl+xml",
3252
- "wspolicy": "application/wspolicy+xml",
3253
- "x3d": "model/x3d+xml",
3254
- "x3db": "model/x3d+fastinfoset",
3255
- "x3dbz": "model/x3d+binary",
3256
- "x3dv": "model/x3d-vrml",
3257
- "x3dvz": "model/x3d+vrml",
3258
- "x3dz": "model/x3d+xml",
3259
- "xaml": "application/xaml+xml",
3260
- "xav": "application/xcap-att+xml",
3261
- "xca": "application/xcap-caps+xml",
3262
- "xcs": "application/calendar+xml",
3263
- "xdf": "application/xcap-diff+xml",
3264
- "xdssc": "application/dssc+xml",
3265
- "xel": "application/xcap-el+xml",
3266
- "xenc": "application/xenc+xml",
3267
- "xer": "application/patch-ops-error+xml",
3268
- "xfdf": "application/xfdf",
3269
- "xht": "application/xhtml+xml",
3270
- "xhtml": "application/xhtml+xml",
3271
- "xhvml": "application/xv+xml",
3272
- "xlf": "application/xliff+xml",
3273
- "xm": "audio/xm",
3274
- "xml": "text/xml",
3275
- "xns": "application/xcap-ns+xml",
3276
- "xop": "application/xop+xml",
3277
- "xpl": "application/xproc+xml",
3278
- "xsd": "application/xml",
3279
- "xsf": "application/prs.xsf+xml",
3280
- "xsl": "application/xml",
3281
- "xslt": "application/xml",
3282
- "xspf": "application/xspf+xml",
3283
- "xvm": "application/xv+xml",
3284
- "xvml": "application/xv+xml",
3285
- "yaml": "text/yaml",
3286
- "yang": "application/yang",
3287
- "yin": "application/yin+xml",
3288
- "yml": "text/yaml",
3289
- "zip": "application/zip"
1835
+ dist: "application/octet-stream",
1836
+ distz: "application/octet-stream",
1837
+ dll: "application/octet-stream",
1838
+ dmg: "application/octet-stream",
1839
+ dms: "application/octet-stream",
1840
+ doc: "application/msword",
1841
+ dot: "application/msword",
1842
+ dpx: "image/dpx",
1843
+ drle: "image/dicom-rle",
1844
+ dsc: "text/prs.lines.tag",
1845
+ dssc: "application/dssc+der",
1846
+ dtd: "application/xml-dtd",
1847
+ dump: "application/octet-stream",
1848
+ dwd: "application/atsc-dwd+xml",
1849
+ ear: "application/java-archive",
1850
+ ecma: "application/ecmascript",
1851
+ elc: "application/octet-stream",
1852
+ emf: "image/emf",
1853
+ eml: "message/rfc822",
1854
+ emma: "application/emma+xml",
1855
+ emotionml: "application/emotionml+xml",
1856
+ eps: "application/postscript",
1857
+ epub: "application/epub+zip",
1858
+ exe: "application/octet-stream",
1859
+ exi: "application/exi",
1860
+ exp: "application/express",
1861
+ exr: "image/aces",
1862
+ ez: "application/andrew-inset",
1863
+ fdf: "application/fdf",
1864
+ fdt: "application/fdt+xml",
1865
+ fits: "image/fits",
1866
+ g3: "image/g3fax",
1867
+ gbr: "application/rpki-ghostbusters",
1868
+ geojson: "application/geo+json",
1869
+ gif: "image/gif",
1870
+ glb: "model/gltf-binary",
1871
+ gltf: "model/gltf+json",
1872
+ gml: "application/gml+xml",
1873
+ gpx: "application/gpx+xml",
1874
+ gram: "application/srgs",
1875
+ grxml: "application/srgs+xml",
1876
+ gxf: "application/gxf",
1877
+ gz: "application/gzip",
1878
+ h261: "video/h261",
1879
+ h263: "video/h263",
1880
+ h264: "video/h264",
1881
+ heic: "image/heic",
1882
+ heics: "image/heic-sequence",
1883
+ heif: "image/heif",
1884
+ heifs: "image/heif-sequence",
1885
+ hej2: "image/hej2k",
1886
+ held: "application/atsc-held+xml",
1887
+ hjson: "application/hjson",
1888
+ hlp: "application/winhlp",
1889
+ hqx: "application/mac-binhex40",
1890
+ hsj2: "image/hsj2",
1891
+ htm: "text/html",
1892
+ html: "text/html",
1893
+ ics: "text/calendar",
1894
+ ief: "image/ief",
1895
+ ifb: "text/calendar",
1896
+ iges: "model/iges",
1897
+ igs: "model/iges",
1898
+ img: "application/octet-stream",
1899
+ in: "text/plain",
1900
+ ini: "text/plain",
1901
+ ink: "application/inkml+xml",
1902
+ inkml: "application/inkml+xml",
1903
+ ipfix: "application/ipfix",
1904
+ iso: "application/octet-stream",
1905
+ its: "application/its+xml",
1906
+ jade: "text/jade",
1907
+ jar: "application/java-archive",
1908
+ jhc: "image/jphc",
1909
+ jls: "image/jls",
1910
+ jp2: "image/jp2",
1911
+ jpe: "image/jpeg",
1912
+ jpeg: "image/jpeg",
1913
+ jpf: "image/jpx",
1914
+ jpg: "image/jpeg",
1915
+ jpg2: "image/jp2",
1916
+ jpgm: "image/jpm",
1917
+ jpgv: "video/jpeg",
1918
+ jph: "image/jph",
1919
+ jpm: "image/jpm",
1920
+ jpx: "image/jpx",
1921
+ js: "text/javascript",
1922
+ json: "application/json",
1923
+ json5: "application/json5",
1924
+ jsonld: "application/ld+json",
1925
+ jsonml: "application/jsonml+json",
1926
+ jsx: "text/jsx",
1927
+ jt: "model/jt",
1928
+ jxl: "image/jxl",
1929
+ jxr: "image/jxr",
1930
+ jxra: "image/jxra",
1931
+ jxrs: "image/jxrs",
1932
+ jxs: "image/jxs",
1933
+ jxsc: "image/jxsc",
1934
+ jxsi: "image/jxsi",
1935
+ jxss: "image/jxss",
1936
+ kar: "audio/midi",
1937
+ ktx: "image/ktx",
1938
+ ktx2: "image/ktx2",
1939
+ less: "text/less",
1940
+ lgr: "application/lgr+xml",
1941
+ list: "text/plain",
1942
+ litcoffee: "text/coffeescript",
1943
+ log: "text/plain",
1944
+ lostxml: "application/lost+xml",
1945
+ lrf: "application/octet-stream",
1946
+ m1v: "video/mpeg",
1947
+ m21: "application/mp21",
1948
+ m2a: "audio/mpeg",
1949
+ m2t: "video/mp2t",
1950
+ m2ts: "video/mp2t",
1951
+ m2v: "video/mpeg",
1952
+ m3a: "audio/mpeg",
1953
+ m4a: "audio/mp4",
1954
+ m4p: "application/mp4",
1955
+ m4s: "video/iso.segment",
1956
+ ma: "application/mathematica",
1957
+ mads: "application/mads+xml",
1958
+ maei: "application/mmt-aei+xml",
1959
+ man: "text/troff",
1960
+ manifest: "text/cache-manifest",
1961
+ map: "application/json",
1962
+ mar: "application/octet-stream",
1963
+ markdown: "text/markdown",
1964
+ mathml: "application/mathml+xml",
1965
+ mb: "application/mathematica",
1966
+ mbox: "application/mbox",
1967
+ md: "text/markdown",
1968
+ mdx: "text/mdx",
1969
+ me: "text/troff",
1970
+ mesh: "model/mesh",
1971
+ meta4: "application/metalink4+xml",
1972
+ metalink: "application/metalink+xml",
1973
+ mets: "application/mets+xml",
1974
+ mft: "application/rpki-manifest",
1975
+ mid: "audio/midi",
1976
+ midi: "audio/midi",
1977
+ mime: "message/rfc822",
1978
+ mj2: "video/mj2",
1979
+ mjp2: "video/mj2",
1980
+ mjs: "text/javascript",
1981
+ mml: "text/mathml",
1982
+ mods: "application/mods+xml",
1983
+ mov: "video/quicktime",
1984
+ mp2: "audio/mpeg",
1985
+ mp21: "application/mp21",
1986
+ mp2a: "audio/mpeg",
1987
+ mp3: "audio/mpeg",
1988
+ mp4: "video/mp4",
1989
+ mp4a: "audio/mp4",
1990
+ mp4s: "application/mp4",
1991
+ mp4v: "video/mp4",
1992
+ mpd: "application/dash+xml",
1993
+ mpe: "video/mpeg",
1994
+ mpeg: "video/mpeg",
1995
+ mpf: "application/media-policy-dataset+xml",
1996
+ mpg: "video/mpeg",
1997
+ mpg4: "video/mp4",
1998
+ mpga: "audio/mpeg",
1999
+ mpp: "application/dash-patch+xml",
2000
+ mrc: "application/marc",
2001
+ mrcx: "application/marcxml+xml",
2002
+ ms: "text/troff",
2003
+ mscml: "application/mediaservercontrol+xml",
2004
+ msh: "model/mesh",
2005
+ msi: "application/octet-stream",
2006
+ msix: "application/msix",
2007
+ msixbundle: "application/msixbundle",
2008
+ msm: "application/octet-stream",
2009
+ msp: "application/octet-stream",
2010
+ mtl: "model/mtl",
2011
+ mts: "video/mp2t",
2012
+ musd: "application/mmt-usd+xml",
2013
+ mxf: "application/mxf",
2014
+ mxmf: "audio/mobile-xmf",
2015
+ mxml: "application/xv+xml",
2016
+ n3: "text/n3",
2017
+ nb: "application/mathematica",
2018
+ nq: "application/n-quads",
2019
+ nt: "application/n-triples",
2020
+ obj: "model/obj",
2021
+ oda: "application/oda",
2022
+ oga: "audio/ogg",
2023
+ ogg: "audio/ogg",
2024
+ ogv: "video/ogg",
2025
+ ogx: "application/ogg",
2026
+ omdoc: "application/omdoc+xml",
2027
+ onepkg: "application/onenote",
2028
+ onetmp: "application/onenote",
2029
+ onetoc: "application/onenote",
2030
+ onetoc2: "application/onenote",
2031
+ opf: "application/oebps-package+xml",
2032
+ opus: "audio/ogg",
2033
+ otf: "font/otf",
2034
+ owl: "application/rdf+xml",
2035
+ oxps: "application/oxps",
2036
+ p10: "application/pkcs10",
2037
+ p7c: "application/pkcs7-mime",
2038
+ p7m: "application/pkcs7-mime",
2039
+ p7s: "application/pkcs7-signature",
2040
+ p8: "application/pkcs8",
2041
+ pdf: "application/pdf",
2042
+ pfr: "application/font-tdpfr",
2043
+ pgp: "application/pgp-encrypted",
2044
+ pkg: "application/octet-stream",
2045
+ pki: "application/pkixcmp",
2046
+ pkipath: "application/pkix-pkipath",
2047
+ pls: "application/pls+xml",
2048
+ png: "image/png",
2049
+ prc: "model/prc",
2050
+ prf: "application/pics-rules",
2051
+ provx: "application/provenance+xml",
2052
+ ps: "application/postscript",
2053
+ pskcxml: "application/pskc+xml",
2054
+ pti: "image/prs.pti",
2055
+ qt: "video/quicktime",
2056
+ raml: "application/raml+yaml",
2057
+ rapd: "application/route-apd+xml",
2058
+ rdf: "application/rdf+xml",
2059
+ relo: "application/p2p-overlay+xml",
2060
+ rif: "application/reginfo+xml",
2061
+ rl: "application/resource-lists+xml",
2062
+ rld: "application/resource-lists-diff+xml",
2063
+ rmi: "audio/midi",
2064
+ rnc: "application/relax-ng-compact-syntax",
2065
+ rng: "application/xml",
2066
+ roa: "application/rpki-roa",
2067
+ roff: "text/troff",
2068
+ rq: "application/sparql-query",
2069
+ rs: "application/rls-services+xml",
2070
+ rsat: "application/atsc-rsat+xml",
2071
+ rsd: "application/rsd+xml",
2072
+ rsheet: "application/urc-ressheet+xml",
2073
+ rss: "application/rss+xml",
2074
+ rtf: "text/rtf",
2075
+ rtx: "text/richtext",
2076
+ rusd: "application/route-usd+xml",
2077
+ s3m: "audio/s3m",
2078
+ sbml: "application/sbml+xml",
2079
+ scq: "application/scvp-cv-request",
2080
+ scs: "application/scvp-cv-response",
2081
+ sdp: "application/sdp",
2082
+ senmlx: "application/senml+xml",
2083
+ sensmlx: "application/sensml+xml",
2084
+ ser: "application/java-serialized-object",
2085
+ setpay: "application/set-payment-initiation",
2086
+ setreg: "application/set-registration-initiation",
2087
+ sgi: "image/sgi",
2088
+ sgm: "text/sgml",
2089
+ sgml: "text/sgml",
2090
+ shex: "text/shex",
2091
+ shf: "application/shf+xml",
2092
+ shtml: "text/html",
2093
+ sieve: "application/sieve",
2094
+ sig: "application/pgp-signature",
2095
+ sil: "audio/silk",
2096
+ silo: "model/mesh",
2097
+ siv: "application/sieve",
2098
+ slim: "text/slim",
2099
+ slm: "text/slim",
2100
+ sls: "application/route-s-tsid+xml",
2101
+ smi: "application/smil+xml",
2102
+ smil: "application/smil+xml",
2103
+ snd: "audio/basic",
2104
+ so: "application/octet-stream",
2105
+ spdx: "text/spdx",
2106
+ spp: "application/scvp-vp-response",
2107
+ spq: "application/scvp-vp-request",
2108
+ spx: "audio/ogg",
2109
+ sql: "application/sql",
2110
+ sru: "application/sru+xml",
2111
+ srx: "application/sparql-results+xml",
2112
+ ssdl: "application/ssdl+xml",
2113
+ ssml: "application/ssml+xml",
2114
+ stk: "application/hyperstudio",
2115
+ stl: "model/stl",
2116
+ stpx: "model/step+xml",
2117
+ stpxz: "model/step-xml+zip",
2118
+ stpz: "model/step+zip",
2119
+ styl: "text/stylus",
2120
+ stylus: "text/stylus",
2121
+ svg: "image/svg+xml",
2122
+ svgz: "image/svg+xml",
2123
+ swidtag: "application/swid+xml",
2124
+ t: "text/troff",
2125
+ t38: "image/t38",
2126
+ td: "application/urc-targetdesc+xml",
2127
+ tei: "application/tei+xml",
2128
+ teicorpus: "application/tei+xml",
2129
+ text: "text/plain",
2130
+ tfi: "application/thraud+xml",
2131
+ tfx: "image/tiff-fx",
2132
+ tif: "image/tiff",
2133
+ tiff: "image/tiff",
2134
+ toml: "application/toml",
2135
+ tr: "text/troff",
2136
+ trig: "application/trig",
2137
+ ts: "video/mp2t",
2138
+ tsd: "application/timestamped-data",
2139
+ tsv: "text/tab-separated-values",
2140
+ ttc: "font/collection",
2141
+ ttf: "font/ttf",
2142
+ ttl: "text/turtle",
2143
+ ttml: "application/ttml+xml",
2144
+ txt: "text/plain",
2145
+ u3d: "model/u3d",
2146
+ u8dsn: "message/global-delivery-status",
2147
+ u8hdr: "message/global-headers",
2148
+ u8mdn: "message/global-disposition-notification",
2149
+ u8msg: "message/global",
2150
+ ubj: "application/ubjson",
2151
+ uri: "text/uri-list",
2152
+ uris: "text/uri-list",
2153
+ urls: "text/uri-list",
2154
+ vcard: "text/vcard",
2155
+ vrml: "model/vrml",
2156
+ vtt: "text/vtt",
2157
+ vxml: "application/voicexml+xml",
2158
+ war: "application/java-archive",
2159
+ wasm: "application/wasm",
2160
+ wav: "audio/wav",
2161
+ weba: "audio/webm",
2162
+ webm: "video/webm",
2163
+ webmanifest: "application/manifest+json",
2164
+ webp: "image/webp",
2165
+ wgsl: "text/wgsl",
2166
+ wgt: "application/widget",
2167
+ wif: "application/watcherinfo+xml",
2168
+ wmf: "image/wmf",
2169
+ woff: "font/woff",
2170
+ woff2: "font/woff2",
2171
+ wrl: "model/vrml",
2172
+ wsdl: "application/wsdl+xml",
2173
+ wspolicy: "application/wspolicy+xml",
2174
+ x3d: "model/x3d+xml",
2175
+ x3db: "model/x3d+fastinfoset",
2176
+ x3dbz: "model/x3d+binary",
2177
+ x3dv: "model/x3d-vrml",
2178
+ x3dvz: "model/x3d+vrml",
2179
+ x3dz: "model/x3d+xml",
2180
+ xaml: "application/xaml+xml",
2181
+ xav: "application/xcap-att+xml",
2182
+ xca: "application/xcap-caps+xml",
2183
+ xcs: "application/calendar+xml",
2184
+ xdf: "application/xcap-diff+xml",
2185
+ xdssc: "application/dssc+xml",
2186
+ xel: "application/xcap-el+xml",
2187
+ xenc: "application/xenc+xml",
2188
+ xer: "application/patch-ops-error+xml",
2189
+ xfdf: "application/xfdf",
2190
+ xht: "application/xhtml+xml",
2191
+ xhtml: "application/xhtml+xml",
2192
+ xhvml: "application/xv+xml",
2193
+ xlf: "application/xliff+xml",
2194
+ xm: "audio/xm",
2195
+ xml: "text/xml",
2196
+ xns: "application/xcap-ns+xml",
2197
+ xop: "application/xop+xml",
2198
+ xpl: "application/xproc+xml",
2199
+ xsd: "application/xml",
2200
+ xsf: "application/prs.xsf+xml",
2201
+ xsl: "application/xml",
2202
+ xslt: "application/xml",
2203
+ xspf: "application/xspf+xml",
2204
+ xvm: "application/xv+xml",
2205
+ xvml: "application/xv+xml",
2206
+ yaml: "text/yaml",
2207
+ yang: "application/yang",
2208
+ yin: "application/yin+xml",
2209
+ yml: "text/yaml",
2210
+ zip: "application/zip"
3290
2211
  };
3291
2212
  function lookup(extn) {
3292
- let tmp = ("" + extn).trim().toLowerCase();
3293
- let idx = tmp.lastIndexOf(".");
3294
- return mimes[!~idx ? tmp : tmp.substring(++idx)];
2213
+ let tmp = ("" + extn).trim().toLowerCase(), idx = tmp.lastIndexOf(".");
2214
+ return mimes[~idx ? tmp.substring(++idx) : tmp];
3295
2215
  }
3296
- __name(lookup, "lookup");
3297
2216
  exports.mimes = mimes;
3298
2217
  exports.lookup = lookup;
3299
2218
  }
@@ -3302,169 +2221,96 @@ var require_mrmime = __commonJS({
3302
2221
  // ../../node_modules/sirv/build.js
3303
2222
  var require_build2 = __commonJS({
3304
2223
  "../../node_modules/sirv/build.js"(exports, module) {
3305
- var fs = __require("fs");
3306
- var { join: join2, normalize: normalize2, resolve: resolve2 } = __require("path");
3307
- var { totalist } = require_sync();
3308
- var { parse } = require_build();
3309
- var { lookup } = require_mrmime();
3310
- var noop = /* @__PURE__ */ __name(() => {
3311
- }, "noop");
2224
+ var fs = __require("fs"), { join: join2, normalize: normalize2, resolve: resolve2 } = __require("path"), { totalist } = require_sync(), { parse } = require_build(), { lookup } = require_mrmime(), noop = () => {
2225
+ };
3312
2226
  function isMatch(uri, arr) {
3313
- for (let i = 0; i < arr.length; i++) {
3314
- if (arr[i].test(uri)) return true;
3315
- }
2227
+ for (let i = 0; i < arr.length; i++)
2228
+ if (arr[i].test(uri)) return !0;
3316
2229
  }
3317
- __name(isMatch, "isMatch");
3318
2230
  function toAssume(uri, extns) {
3319
2231
  let i = 0, x, len = uri.length - 1;
3320
- if (uri.charCodeAt(len) === 47) {
3321
- uri = uri.substring(0, len);
3322
- }
2232
+ uri.charCodeAt(len) === 47 && (uri = uri.substring(0, len));
3323
2233
  let arr = [], tmp = `${uri}/index`;
3324
- for (; i < extns.length; i++) {
3325
- x = extns[i] ? `.${extns[i]}` : "";
3326
- if (uri) arr.push(uri + x);
3327
- arr.push(tmp + x);
3328
- }
2234
+ for (; i < extns.length; i++)
2235
+ x = extns[i] ? `.${extns[i]}` : "", uri && arr.push(uri + x), arr.push(tmp + x);
3329
2236
  return arr;
3330
2237
  }
3331
- __name(toAssume, "toAssume");
3332
2238
  function viaCache(cache, uri, extns) {
3333
2239
  let i = 0, data, arr = toAssume(uri, extns);
3334
- for (; i < arr.length; i++) {
2240
+ for (; i < arr.length; i++)
3335
2241
  if (data = cache[arr[i]]) return data;
3336
- }
3337
2242
  }
3338
- __name(viaCache, "viaCache");
3339
2243
  function viaLocal(dir, isEtag, uri, extns) {
3340
- let i = 0, arr = toAssume(uri, extns);
3341
- let abs, stats, name, headers;
3342
- for (; i < arr.length; i++) {
3343
- abs = normalize2(join2(dir, name = arr[i]));
3344
- if (abs.startsWith(dir) && fs.existsSync(abs)) {
3345
- stats = fs.statSync(abs);
3346
- if (stats.isDirectory()) continue;
3347
- headers = toHeaders(name, stats, isEtag);
3348
- headers["Cache-Control"] = isEtag ? "no-cache" : "no-store";
3349
- return { abs, stats, headers };
2244
+ let i = 0, arr = toAssume(uri, extns), abs, stats, name, headers;
2245
+ for (; i < arr.length; i++)
2246
+ if (abs = normalize2(join2(dir, name = arr[i])), abs.startsWith(dir) && fs.existsSync(abs)) {
2247
+ if (stats = fs.statSync(abs), stats.isDirectory()) continue;
2248
+ return headers = toHeaders(name, stats, isEtag), headers["Cache-Control"] = isEtag ? "no-cache" : "no-store", { abs, stats, headers };
3350
2249
  }
3351
- }
3352
2250
  }
3353
- __name(viaLocal, "viaLocal");
3354
2251
  function is404(req, res) {
3355
2252
  return res.statusCode = 404, res.end();
3356
2253
  }
3357
- __name(is404, "is404");
3358
2254
  function send(req, res, file, stats, headers) {
3359
2255
  let code = 200, tmp, opts = {};
3360
2256
  headers = { ...headers };
3361
- for (let key in headers) {
3362
- tmp = res.getHeader(key);
3363
- if (tmp) headers[key] = tmp;
3364
- }
3365
- if (tmp = res.getHeader("content-type")) {
3366
- headers["Content-Type"] = tmp;
3367
- }
3368
- if (req.headers.range) {
2257
+ for (let key in headers)
2258
+ tmp = res.getHeader(key), tmp && (headers[key] = tmp);
2259
+ if ((tmp = res.getHeader("content-type")) && (headers["Content-Type"] = tmp), req.headers.range) {
3369
2260
  code = 206;
3370
- let [x, y] = req.headers.range.replace("bytes=", "").split("-");
3371
- let end = opts.end = parseInt(y, 10) || stats.size - 1;
3372
- let start = opts.start = parseInt(x, 10) || 0;
3373
- if (end >= stats.size) {
3374
- end = stats.size - 1;
3375
- }
3376
- if (start >= stats.size) {
3377
- res.setHeader("Content-Range", `bytes */${stats.size}`);
3378
- res.statusCode = 416;
3379
- return res.end();
3380
- }
3381
- headers["Content-Range"] = `bytes ${start}-${end}/${stats.size}`;
3382
- headers["Content-Length"] = end - start + 1;
3383
- headers["Accept-Ranges"] = "bytes";
2261
+ let [x, y] = req.headers.range.replace("bytes=", "").split("-"), end = opts.end = parseInt(y, 10) || stats.size - 1, start = opts.start = parseInt(x, 10) || 0;
2262
+ if (end >= stats.size && (end = stats.size - 1), start >= stats.size)
2263
+ return res.setHeader("Content-Range", `bytes */${stats.size}`), res.statusCode = 416, res.end();
2264
+ headers["Content-Range"] = `bytes ${start}-${end}/${stats.size}`, headers["Content-Length"] = end - start + 1, headers["Accept-Ranges"] = "bytes";
3384
2265
  }
3385
- res.writeHead(code, headers);
3386
- fs.createReadStream(file, opts).pipe(res);
2266
+ res.writeHead(code, headers), fs.createReadStream(file, opts).pipe(res);
3387
2267
  }
3388
- __name(send, "send");
3389
2268
  var ENCODING = {
3390
2269
  ".br": "br",
3391
2270
  ".gz": "gzip"
3392
2271
  };
3393
2272
  function toHeaders(name, stats, isEtag) {
3394
- let enc = ENCODING[name.slice(-3)];
3395
- let ctype = lookup(name.slice(0, enc && -3)) || "";
3396
- if (ctype === "text/html") ctype += ";charset=utf-8";
2273
+ let enc = ENCODING[name.slice(-3)], ctype = lookup(name.slice(0, enc && -3)) || "";
2274
+ ctype === "text/html" && (ctype += ";charset=utf-8");
3397
2275
  let headers = {
3398
2276
  "Content-Length": stats.size,
3399
2277
  "Content-Type": ctype,
3400
2278
  "Last-Modified": stats.mtime.toUTCString()
3401
2279
  };
3402
- if (enc) headers["Content-Encoding"] = enc;
3403
- if (isEtag) headers["ETag"] = `W/"${stats.size}-${stats.mtime.getTime()}"`;
3404
- return headers;
2280
+ return enc && (headers["Content-Encoding"] = enc), isEtag && (headers.ETag = `W/"${stats.size}-${stats.mtime.getTime()}"`), headers;
3405
2281
  }
3406
- __name(toHeaders, "toHeaders");
3407
2282
  module.exports = function(dir, opts = {}) {
3408
2283
  dir = resolve2(dir || ".");
3409
- let isNotFound = opts.onNoMatch || is404;
3410
- let setHeaders = opts.setHeaders || noop;
3411
- let extensions = opts.extensions || ["html", "htm"];
3412
- let gzips = opts.gzip && extensions.map((x) => `${x}.gz`).concat("gz");
3413
- let brots = opts.brotli && extensions.map((x) => `${x}.br`).concat("br");
3414
- const FILES = {};
3415
- let fallback = "/";
3416
- let isEtag = !!opts.etag;
3417
- let isSPA = !!opts.single;
3418
- if (typeof opts.single === "string") {
2284
+ let isNotFound = opts.onNoMatch || is404, setHeaders = opts.setHeaders || noop, extensions = opts.extensions || ["html", "htm"], gzips = opts.gzip && extensions.map((x) => `${x}.gz`).concat("gz"), brots = opts.brotli && extensions.map((x) => `${x}.br`).concat("br"), FILES = {}, fallback = "/", isEtag = !!opts.etag, isSPA = !!opts.single;
2285
+ if (typeof opts.single == "string") {
3419
2286
  let idx = opts.single.lastIndexOf(".");
3420
- fallback += !!~idx ? opts.single.substring(0, idx) : opts.single;
2287
+ fallback += ~idx ? opts.single.substring(0, idx) : opts.single;
3421
2288
  }
3422
2289
  let ignores = [];
3423
- if (opts.ignores !== false) {
3424
- ignores.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/);
3425
- if (opts.dotfiles) ignores.push(/\/\.\w/);
3426
- else ignores.push(/\/\.well-known/);
3427
- [].concat(opts.ignores || []).forEach((x) => {
3428
- ignores.push(new RegExp(x, "i"));
3429
- });
3430
- }
2290
+ opts.ignores !== !1 && (ignores.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/), opts.dotfiles ? ignores.push(/\/\.\w/) : ignores.push(/\/\.well-known/), [].concat(opts.ignores || []).forEach((x) => {
2291
+ ignores.push(new RegExp(x, "i"));
2292
+ }));
3431
2293
  let cc = opts.maxAge != null && `public,max-age=${opts.maxAge}`;
3432
- if (cc && opts.immutable) cc += ",immutable";
3433
- else if (cc && opts.maxAge === 0) cc += ",must-revalidate";
3434
- if (!opts.dev) {
3435
- totalist(dir, (name, abs, stats) => {
3436
- if (/\.well-known[\\+\/]/.test(name)) {
3437
- } else if (!opts.dotfiles && /(^\.|[\\+|\/+]\.)/.test(name)) return;
3438
- let headers = toHeaders(name, stats, isEtag);
3439
- if (cc) headers["Cache-Control"] = cc;
3440
- FILES["/" + name.normalize().replace(/\\+/g, "/")] = { abs, stats, headers };
3441
- });
3442
- }
2294
+ cc && opts.immutable ? cc += ",immutable" : cc && opts.maxAge === 0 && (cc += ",must-revalidate"), opts.dev || totalist(dir, (name, abs, stats) => {
2295
+ if (!/\.well-known[\\+\/]/.test(name)) {
2296
+ if (!opts.dotfiles && /(^\.|[\\+|\/+]\.)/.test(name)) return;
2297
+ }
2298
+ let headers = toHeaders(name, stats, isEtag);
2299
+ cc && (headers["Cache-Control"] = cc), FILES["/" + name.normalize().replace(/\\+/g, "/")] = { abs, stats, headers };
2300
+ });
3443
2301
  let lookup2 = opts.dev ? viaLocal.bind(0, dir, isEtag) : viaCache.bind(0, FILES);
3444
2302
  return function(req, res, next) {
3445
- let extns = [""];
3446
- let pathname = parse(req).pathname;
3447
- let val = req.headers["accept-encoding"] || "";
3448
- if (gzips && val.includes("gzip")) extns.unshift(...gzips);
3449
- if (brots && /(br|brotli)/i.test(val)) extns.unshift(...brots);
3450
- extns.push(...extensions);
3451
- if (pathname.indexOf("%") !== -1) {
2303
+ let extns = [""], pathname = parse(req).pathname, val = req.headers["accept-encoding"] || "";
2304
+ if (gzips && val.includes("gzip") && extns.unshift(...gzips), brots && /(br|brotli)/i.test(val) && extns.unshift(...brots), extns.push(...extensions), pathname.indexOf("%") !== -1)
3452
2305
  try {
3453
2306
  pathname = decodeURI(pathname);
3454
- } catch (err) {
2307
+ } catch {
3455
2308
  }
3456
- }
3457
2309
  let data = lookup2(pathname, extns) || isSPA && !isMatch(pathname, ignores) && lookup2(fallback, extns);
3458
2310
  if (!data) return next ? next() : isNotFound(req, res);
3459
- if (isEtag && req.headers["if-none-match"] === data.headers["ETag"]) {
3460
- res.writeHead(304);
3461
- return res.end();
3462
- }
3463
- if (gzips || brots) {
3464
- res.setHeader("Vary", "Accept-Encoding");
3465
- }
3466
- setHeaders(res, pathname, data.stats);
3467
- send(req, res, data.abs, data.stats, data.headers);
2311
+ if (isEtag && req.headers["if-none-match"] === data.headers.ETag)
2312
+ return res.writeHead(304), res.end();
2313
+ (gzips || brots) && res.setHeader("Vary", "Accept-Encoding"), setHeaders(res, pathname, data.stats), send(req, res, data.abs, data.stats, data.headers);
3468
2314
  };
3469
2315
  };
3470
2316
  }
@@ -3491,47 +2337,31 @@ import { readConfig, vitestTransform } from "storybook/internal/csf-tools";
3491
2337
  import { MainFileMissingError } from "storybook/internal/server-errors";
3492
2338
  import { telemetry } from "storybook/internal/telemetry";
3493
2339
  import { oneWayHash } from "storybook/internal/telemetry";
3494
- var import_picocolors = __toESM(require_picocolors(), 1);
3495
- var import_sirv = __toESM(require_build2(), 1);
2340
+ var import_picocolors = __toESM(require_picocolors(), 1), import_sirv = __toESM(require_build2(), 1);
3496
2341
  import { dedent } from "ts-dedent";
3497
2342
 
3498
2343
  // ../../builders/builder-vite/src/utils/without-vite-plugins.ts
3499
- var withoutVitePlugins = /* @__PURE__ */ __name(async (plugins = [], namesToRemove) => {
3500
- const result = [];
3501
- const resolvedPlugins = await Promise.all(plugins);
3502
- for (const plugin of resolvedPlugins) {
3503
- if (Array.isArray(plugin)) {
3504
- result.push(await withoutVitePlugins(plugin, namesToRemove));
3505
- } else if (plugin && typeof plugin === "object" && "name" in plugin && typeof plugin.name === "string" && !namesToRemove.includes(plugin.name)) {
3506
- result.push(plugin);
3507
- }
3508
- }
2344
+ var withoutVitePlugins = async (plugins = [], namesToRemove) => {
2345
+ let result = [], resolvedPlugins = await Promise.all(plugins);
2346
+ for (let plugin of resolvedPlugins)
2347
+ Array.isArray(plugin) ? result.push(await withoutVitePlugins(plugin, namesToRemove)) : plugin && typeof plugin == "object" && "name" in plugin && typeof plugin.name == "string" && !namesToRemove.includes(plugin.name) && result.push(plugin);
3509
2348
  return result;
3510
- }, "withoutVitePlugins");
2349
+ };
3511
2350
 
3512
2351
  // src/vitest-plugin/index.ts
3513
- var WORKING_DIR = process.cwd();
3514
- var defaultOptions = {
2352
+ var WORKING_DIR = process.cwd(), defaultOptions = {
3515
2353
  storybookScript: void 0,
3516
2354
  configDir: resolve(join(WORKING_DIR, ".storybook")),
3517
2355
  storybookUrl: "http://localhost:6006",
3518
- disableAddonDocs: true
3519
- };
3520
- var extractTagsFromPreview = /* @__PURE__ */ __name(async (configDir) => {
3521
- const previewConfigPath = getInterpretedFile(join(resolve(configDir), "preview"));
3522
- if (!previewConfigPath) {
3523
- return [];
3524
- }
3525
- const previewConfig = await readConfig(previewConfigPath);
3526
- return previewConfig.getFieldValue(["tags"]) ?? [];
3527
- }, "extractTagsFromPreview");
3528
- var getStoryGlobsAndFiles = /* @__PURE__ */ __name(async (presets, directories) => {
3529
- const stories = await presets.apply("stories", []);
3530
- const normalizedStories = normalizeStories(stories, {
2356
+ disableAddonDocs: !0
2357
+ }, extractTagsFromPreview = async (configDir) => {
2358
+ let previewConfigPath = getInterpretedFile(join(resolve(configDir), "preview"));
2359
+ return previewConfigPath ? (await readConfig(previewConfigPath)).getFieldValue(["tags"]) ?? [] : [];
2360
+ }, getStoryGlobsAndFiles = async (presets, directories) => {
2361
+ let stories = await presets.apply("stories", []), normalizedStories = normalizeStories(stories, {
3531
2362
  configDir: directories.configDir,
3532
2363
  workingDir: directories.workingDir
3533
- });
3534
- const matchingStoryFiles = await StoryIndexGenerator.findMatchingFilesForSpecifiers(
2364
+ }), matchingStoryFiles = await StoryIndexGenerator.findMatchingFilesForSpecifiers(
3535
2365
  normalizedStories,
3536
2366
  directories.workingDir
3537
2367
  );
@@ -3541,25 +2371,17 @@ var getStoryGlobsAndFiles = /* @__PURE__ */ __name(async (presets, directories)
3541
2371
  new Map(matchingStoryFiles.map(([specifier, cache]) => [specifier, cache]))
3542
2372
  )
3543
2373
  };
3544
- }, "getStoryGlobsAndFiles");
3545
- var mdxStubPlugin = {
2374
+ }, mdxStubPlugin = {
3546
2375
  name: "storybook:stub-mdx-plugin",
3547
2376
  enforce: "pre",
3548
2377
  resolveId(id) {
3549
- if (id.endsWith(".mdx")) {
3550
- return id;
3551
- }
3552
- return null;
2378
+ return id.endsWith(".mdx") ? id : null;
3553
2379
  },
3554
2380
  load(id) {
3555
- if (id.endsWith(".mdx")) {
3556
- return `export default {};`;
3557
- }
3558
- return null;
2381
+ return id.endsWith(".mdx") ? "export default {};" : null;
3559
2382
  }
3560
- };
3561
- var storybookTest = /* @__PURE__ */ __name(async (options) => {
3562
- const finalOptions = {
2383
+ }, storybookTest = async (options) => {
2384
+ let finalOptions = {
3563
2385
  ...defaultOptions,
3564
2386
  ...options,
3565
2387
  configDir: options?.configDir ? resolve(WORKING_DIR, options.configDir) : defaultOptions.configDir,
@@ -3569,22 +2391,14 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
3569
2391
  skip: options?.tags?.skip ?? []
3570
2392
  }
3571
2393
  };
3572
- if (optionalEnvToBoolean(process.env.DEBUG)) {
3573
- finalOptions.debug = true;
3574
- }
3575
- process.env.__STORYBOOK_URL__ = finalOptions.storybookUrl;
3576
- process.env.__STORYBOOK_SCRIPT__ = finalOptions.storybookScript;
3577
- const isVitestStorybook = optionalEnvToBoolean(process.env.VITEST_STORYBOOK);
3578
- const directories = {
2394
+ optionalEnvToBoolean(process.env.DEBUG) && (finalOptions.debug = !0), process.env.__STORYBOOK_URL__ = finalOptions.storybookUrl, process.env.__STORYBOOK_SCRIPT__ = finalOptions.storybookScript;
2395
+ let isVitestStorybook = optionalEnvToBoolean(process.env.VITEST_STORYBOOK), directories = {
3579
2396
  configDir: finalOptions.configDir,
3580
2397
  workingDir: WORKING_DIR
3581
- };
3582
- const { presets } = await experimental_loadStorybook({
2398
+ }, { presets } = await experimental_loadStorybook({
3583
2399
  configDir: finalOptions.configDir,
3584
2400
  packageJson: {}
3585
- });
3586
- const stories = await presets.apply("stories", []);
3587
- const [
2401
+ }), stories = await presets.apply("stories", []), [
3588
2402
  { storiesGlobs },
3589
2403
  framework,
3590
2404
  storybookEnv,
@@ -3604,25 +2418,20 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
3604
2418
  presets.apply("core"),
3605
2419
  presets.apply("optimizeViteDeps", []),
3606
2420
  presets.apply("features", {})
3607
- ]);
3608
- const pluginsToIgnore = [
2421
+ ]), pluginsToIgnore = [
3609
2422
  "storybook:react-docgen-plugin",
3610
2423
  "vite:react-docgen-typescript",
3611
2424
  // aka @joshwooding/vite-plugin-react-docgen-typescript
3612
2425
  "storybook:svelte-docgen-plugin",
3613
2426
  "storybook:vue-component-meta-plugin"
3614
2427
  ];
3615
- if (finalOptions.disableAddonDocs) {
3616
- pluginsToIgnore.push("storybook:package-deduplication", "storybook:mdx-plugin");
3617
- }
3618
- const plugins = await withoutVitePlugins(viteConfigFromStorybook.plugins ?? [], pluginsToIgnore);
3619
- if (finalOptions.disableAddonDocs) {
3620
- plugins.push(mdxStubPlugin);
3621
- }
3622
- const storybookTestPlugin = {
2428
+ finalOptions.disableAddonDocs && pluginsToIgnore.push("storybook:package-deduplication", "storybook:mdx-plugin");
2429
+ let plugins = await withoutVitePlugins(viteConfigFromStorybook.plugins ?? [], pluginsToIgnore);
2430
+ finalOptions.disableAddonDocs && plugins.push(mdxStubPlugin);
2431
+ let storybookTestPlugin = {
3623
2432
  name: "vite-plugin-storybook-test",
3624
2433
  async transformIndexHtml(html) {
3625
- const [headHtmlSnippet, bodyHtmlSnippet] = await Promise.all([
2434
+ let [headHtmlSnippet, bodyHtmlSnippet] = await Promise.all([
3626
2435
  presets.apply("previewHead"),
3627
2436
  presets.apply("previewBody")
3628
2437
  ]);
@@ -3631,35 +2440,26 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
3631
2440
  async config(nonMutableInputConfig) {
3632
2441
  try {
3633
2442
  await validateConfigurationFiles(finalOptions.configDir);
3634
- } catch (err) {
2443
+ } catch {
3635
2444
  throw new MainFileMissingError({
3636
2445
  location: finalOptions.configDir,
3637
2446
  source: "vitest"
3638
2447
  });
3639
2448
  }
3640
- const frameworkName = typeof framework === "string" ? framework : framework.name;
3641
- const testConfig = nonMutableInputConfig.test;
2449
+ let frameworkName = typeof framework == "string" ? framework : framework.name, testConfig = nonMutableInputConfig.test;
3642
2450
  finalOptions.vitestRoot = testConfig?.dir || testConfig?.root || nonMutableInputConfig.root || process.cwd();
3643
- const includeStories = stories.map((story) => {
2451
+ let includeStories = stories.map((story) => {
3644
2452
  let storyPath;
3645
- if (typeof story === "string") {
3646
- storyPath = story;
3647
- } else {
3648
- storyPath = `${story.directory}/${story.files ?? DEFAULT_FILES_PATTERN}`;
3649
- }
3650
- return join(finalOptions.configDir, storyPath);
3651
- }).map((story) => {
3652
- return relative(finalOptions.vitestRoot, story);
3653
- });
2453
+ return typeof story == "string" ? storyPath = story : storyPath = `${story.directory}/${story.files ?? DEFAULT_FILES_PATTERN}`, join(finalOptions.configDir, storyPath);
2454
+ }).map((story) => relative(finalOptions.vitestRoot, story));
3654
2455
  finalOptions.includeStories = includeStories;
3655
- const projectId = oneWayHash(finalOptions.configDir);
3656
- const baseConfig = {
2456
+ let projectId = oneWayHash(finalOptions.configDir), baseConfig = {
3657
2457
  cacheDir: resolvePathInStorybookCache("sb-vitest", projectId),
3658
2458
  test: {
3659
2459
  setupFiles: [
3660
2460
  fileURLToPath(import.meta.resolve("@storybook/addon-vitest/internal/setup-file")),
3661
2461
  // if the existing setupFiles is a string, we have to include it otherwise we're overwriting it
3662
- typeof nonMutableInputConfig.test?.setupFiles === "string" && nonMutableInputConfig.test?.setupFiles
2462
+ typeof nonMutableInputConfig.test?.setupFiles == "string" && nonMutableInputConfig.test?.setupFiles
3663
2463
  ].filter(Boolean),
3664
2464
  ...finalOptions.storybookScript ? {
3665
2465
  globalSetup: [
@@ -3684,7 +2484,7 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
3684
2484
  ],
3685
2485
  // if the existing deps.inline is true, we keep it as-is, because it will inline everything
3686
2486
  // TODO: Remove the check once we don't support Vitest 3 anymore
3687
- ...nonMutableInputConfig.test?.server?.deps?.inline !== true ? {
2487
+ ...nonMutableInputConfig.test?.server?.deps?.inline !== !0 ? {
3688
2488
  server: {
3689
2489
  deps: {
3690
2490
  inline: ["@storybook/addon-vitest"]
@@ -3693,19 +2493,18 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
3693
2493
  } : {},
3694
2494
  browser: {
3695
2495
  commands: {
3696
- getInitialGlobals: /* @__PURE__ */ __name(() => {
3697
- const envConfig = JSON.parse(process.env.VITEST_STORYBOOK_CONFIG ?? "{}");
3698
- const shouldRunA11yTests = isVitestStorybook ? envConfig.a11y ?? false : true;
2496
+ getInitialGlobals: () => {
2497
+ let envConfig = JSON.parse(process.env.VITEST_STORYBOOK_CONFIG ?? "{}");
3699
2498
  return {
3700
2499
  a11y: {
3701
- manual: !shouldRunA11yTests
2500
+ manual: !(isVitestStorybook ? envConfig.a11y ?? !1 : !0)
3702
2501
  }
3703
2502
  };
3704
- }, "getInitialGlobals")
2503
+ }
3705
2504
  },
3706
2505
  // if there is a test.browser config AND test.browser.screenshotFailures is not explicitly set, we set it to false
3707
2506
  ...nonMutableInputConfig.test?.browser && nonMutableInputConfig.test.browser.screenshotFailures === void 0 ? {
3708
- screenshotFailures: false
2507
+ screenshotFailures: !1
3709
2508
  } : {}
3710
2509
  }
3711
2510
  },
@@ -3737,64 +2536,53 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
3737
2536
  ...frameworkName?.includes("vue3") ? { __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: "false" } : {},
3738
2537
  FEATURES: JSON.stringify(features)
3739
2538
  }
3740
- };
3741
- const config = mergeConfig(
2539
+ }, config = mergeConfig(
3742
2540
  baseConfig,
3743
2541
  viteConfigFromStorybook
3744
2542
  );
3745
- if ((nonMutableInputConfig.test?.include?.length ?? 0) > 0) {
3746
- nonMutableInputConfig.test.include = [];
3747
- console.log(
3748
- import_picocolors.default.yellow(dedent`
2543
+ return (nonMutableInputConfig.test?.include?.length ?? 0) > 0 && (nonMutableInputConfig.test.include = [], console.log(
2544
+ import_picocolors.default.yellow(dedent`
3749
2545
  Warning: Starting in Storybook 8.5.0-alpha.18, the "test.include" option in Vitest is discouraged in favor of just using the "stories" field in your Storybook configuration.
3750
2546
 
3751
2547
  The values you passed to "test.include" will be ignored, please remove them from your Vitest configuration where the Storybook plugin is applied.
3752
2548
 
3753
2549
  More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#addon-test-indexing-behavior-of-storybookaddon-test-is-changed
3754
2550
  `)
3755
- );
3756
- }
3757
- return config;
2551
+ )), config;
3758
2552
  },
3759
2553
  configureVitest(context) {
3760
- context.vitest.config.coverage.exclude.push("storybook-static");
3761
- if (!core?.disableTelemetry && !optionalEnvToBoolean(process.env.STORYBOOK_DISABLE_TELEMETRY)) {
3762
- telemetry(
3763
- "test-run",
3764
- {
3765
- runner: "vitest",
3766
- watch: context.vitest.config.watch,
3767
- coverage: !!context.vitest.config.coverage?.enabled
3768
- },
3769
- { configDir: finalOptions.configDir }
3770
- );
3771
- }
2554
+ context.vitest.config.coverage.exclude.push("storybook-static"), !core?.disableTelemetry && !optionalEnvToBoolean(process.env.STORYBOOK_DISABLE_TELEMETRY) && telemetry(
2555
+ "test-run",
2556
+ {
2557
+ runner: "vitest",
2558
+ watch: context.vitest.config.watch,
2559
+ coverage: !!context.vitest.config.coverage?.enabled
2560
+ },
2561
+ { configDir: finalOptions.configDir }
2562
+ );
3772
2563
  },
3773
2564
  async configureServer(server) {
3774
- if (staticDirs) {
3775
- for (const staticDir of staticDirs) {
2565
+ if (staticDirs)
2566
+ for (let staticDir of staticDirs)
3776
2567
  try {
3777
- const { staticPath, targetEndpoint } = mapStaticDir(staticDir, directories.configDir);
2568
+ let { staticPath, targetEndpoint } = mapStaticDir(staticDir, directories.configDir);
3778
2569
  server.middlewares.use(
3779
2570
  targetEndpoint,
3780
2571
  (0, import_sirv.default)(staticPath, {
3781
- dev: true,
3782
- etag: true,
2572
+ dev: !0,
2573
+ etag: !0,
3783
2574
  extensions: []
3784
2575
  })
3785
2576
  );
3786
2577
  } catch (e) {
3787
2578
  console.warn(e);
3788
2579
  }
3789
- }
3790
- }
3791
2580
  },
3792
2581
  async transform(code, id) {
3793
- if (!optionalEnvToBoolean(process.env.VITEST)) {
2582
+ if (!optionalEnvToBoolean(process.env.VITEST))
3794
2583
  return code;
3795
- }
3796
- const relativeId = relative(finalOptions.vitestRoot, id);
3797
- if ((0, import_micromatch.match)([relativeId], finalOptions.includeStories).length > 0) {
2584
+ let relativeId = relative(finalOptions.vitestRoot, id);
2585
+ if ((0, import_micromatch.match)([relativeId], finalOptions.includeStories).length > 0)
3798
2586
  return vitestTransform({
3799
2587
  code,
3800
2588
  fileName: id,
@@ -3803,29 +2591,24 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
3803
2591
  stories: storiesGlobs,
3804
2592
  previewLevelTags
3805
2593
  });
3806
- }
3807
2594
  }
3808
2595
  };
3809
- plugins.push(storybookTestPlugin);
3810
- if (isVitestStorybook) {
3811
- const projectName = `storybook:${normalize(finalOptions.configDir)}`;
2596
+ if (plugins.push(storybookTestPlugin), isVitestStorybook) {
2597
+ let projectName = `storybook:${normalize(finalOptions.configDir)}`;
3812
2598
  plugins.push({
3813
2599
  name: "storybook:workspace-name-override",
3814
2600
  config: {
3815
2601
  order: "pre",
3816
- handler: /* @__PURE__ */ __name(() => {
3817
- return {
3818
- test: {
3819
- name: projectName
3820
- }
3821
- };
3822
- }, "handler")
2602
+ handler: () => ({
2603
+ test: {
2604
+ name: projectName
2605
+ }
2606
+ })
3823
2607
  }
3824
2608
  });
3825
2609
  }
3826
2610
  return plugins;
3827
- }, "storybookTest");
3828
- var vitest_plugin_default = storybookTest;
2611
+ }, vitest_plugin_default = storybookTest;
3829
2612
  export {
3830
2613
  vitest_plugin_default as default,
3831
2614
  storybookTest