@tackup/cli 0.0.0-stage → 0.1.0

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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -2
  3. package/dist/builtins/extensions/docs/guides/day-two.md +3 -0
  4. package/dist/builtins/extensions/docs/guides/onboarding-2.md +3 -0
  5. package/dist/builtins/extensions/docs/guides/onboarding-3.md +3 -0
  6. package/dist/builtins/extensions/docs/skills/use-tack-docs/SKILL.md +67 -0
  7. package/dist/builtins/extensions/docs/skills/use-tack-docs/references/declare-docs.md +71 -0
  8. package/dist/builtins/extensions/docs/skills/use-tack-docs/references/docs-in-profiles.md +25 -0
  9. package/dist/builtins/extensions/docs/skills/use-tack-docs/references/docs-maintenance.md +35 -0
  10. package/dist/builtins/extensions/docs/skills/use-tack-docs/references/review.md +34 -0
  11. package/dist/builtins/extensions/docs/skills/write-reader-figures/SKILL.md +66 -0
  12. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figure-components.md +20 -0
  13. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/architecture-map.md +86 -0
  14. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/chart.md +52 -0
  15. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/figure.md +79 -0
  16. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/file-tree.md +74 -0
  17. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/schema.md +116 -0
  18. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/system.md +81 -0
  19. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/walkthrough.md +45 -0
  20. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/page-components.md +82 -0
  21. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/rules.md +27 -0
  22. package/dist/builtins/extensions/docs/tack.yaml +10 -0
  23. package/dist/builtins/extensions/scripts/guides/day-two.md +3 -0
  24. package/dist/builtins/extensions/scripts/guides/onboarding-2.md +3 -0
  25. package/dist/builtins/extensions/scripts/skills/author-tack-scripts/SKILL.md +48 -0
  26. package/dist/builtins/extensions/scripts/skills/author-tack-scripts/references/run-scripts.md +23 -0
  27. package/dist/builtins/extensions/scripts/skills/author-tack-scripts/references/script-api.md +76 -0
  28. package/dist/builtins/extensions/scripts/skills/author-tack-scripts/references/scripts-in-profiles.md +35 -0
  29. package/dist/builtins/extensions/scripts/skills/author-tack-scripts/references/scripts-in-sources.md +56 -0
  30. package/dist/builtins/extensions/scripts/tack.yaml +10 -0
  31. package/dist/builtins/skills/author-tack-profiles/SKILL.md +68 -0
  32. package/dist/builtins/skills/author-tack-profiles/references/apply.md +33 -0
  33. package/dist/builtins/skills/author-tack-profiles/references/bundles.md +59 -0
  34. package/dist/builtins/skills/author-tack-profiles/references/copy-workflows.md +46 -0
  35. package/dist/builtins/skills/manage-tack-sources/SKILL.md +75 -0
  36. package/dist/builtins/skills/manage-tack-sources/references/catalog-issues.md +38 -0
  37. package/dist/builtins/skills/manage-tack-sources/references/metadata.md +35 -0
  38. package/dist/builtins/skills/manage-tack-sources/references/tack-yaml.md +114 -0
  39. package/dist/builtins/skills/manage-tack-sources/references/worked-source.md +126 -0
  40. package/dist/builtins/skills/prepare-tack-checkout/SKILL.md +52 -0
  41. package/dist/builtins/skills/use-tack/SKILL.md +65 -0
  42. package/dist/builtins/skills/use-tack/references/agent-instructions.md +38 -0
  43. package/dist/builtins/skills/use-tack/references/day-two.md +35 -0
  44. package/dist/builtins/skills/use-tack/references/explore.md +13 -0
  45. package/dist/builtins/skills/use-tack/references/imports.md +30 -0
  46. package/dist/builtins/skills/use-tack/references/maintenance.md +51 -0
  47. package/dist/builtins/skills/use-tack/references/onboarding-2.md +41 -0
  48. package/dist/builtins/skills/use-tack/references/onboarding-3.md +29 -0
  49. package/dist/builtins/skills/use-tack/references/onboarding.md +54 -0
  50. package/dist/builtins/skills/use-tack/references/output.md +15 -0
  51. package/dist/builtins/skills/use-tack/references/selection.md +61 -0
  52. package/dist/builtins/skills/use-tack/references/setup.md +69 -0
  53. package/dist/builtins/tack.yaml +10 -0
  54. package/dist/bundle-support-ZGTM5CTZ.js +16 -0
  55. package/dist/chunk-CFUDY2NO.js +1791 -0
  56. package/dist/chunk-CRQMJGMU.js +225 -0
  57. package/dist/chunk-DCX5T7CG.js +281 -0
  58. package/dist/chunk-EZ5C7B2M.js +28 -0
  59. package/dist/chunk-H4AG4WIV.js +52 -0
  60. package/dist/chunk-I5RMMV2Y.js +18013 -0
  61. package/dist/chunk-JL3E32X5.js +92 -0
  62. package/dist/chunk-MR5PTCYF.js +26 -0
  63. package/dist/chunk-PHQL7OBB.js +162 -0
  64. package/dist/chunk-QQBCYPJZ.js +5733 -0
  65. package/dist/chunk-T6JAU547.js +12401 -0
  66. package/dist/chunk-W7GHLGII.js +16 -0
  67. package/dist/chunk-XARHV5M4.js +56 -0
  68. package/dist/chunk-XZH2XPII.js +1017 -0
  69. package/dist/chunk-ZT6BO7LG.js +36671 -0
  70. package/dist/corpus-effects-YWG5VVHJ.js +12069 -0
  71. package/dist/elk.bundled-EVXDSFFG.js +94125 -0
  72. package/dist/main-JHULX3QY.js +65517 -0
  73. package/dist/main.js +17 -0
  74. package/dist/reader/visuals.tsx +368 -0
  75. package/dist/script.d.ts +133 -0
  76. package/dist/script.js +90 -0
  77. package/dist/server-XF7NSYRQ.js +308 -0
  78. package/dist/src-DZKPD6VY.js +1871 -0
  79. package/dist/src-TC3RTKIS.js +1126 -0
  80. package/dist/tack-env.d.ts +137 -0
  81. package/dist/third-party-licenses.txt +2467 -0
  82. package/dist/worker-ZFY6P7X5.js +24246 -0
  83. package/package.json +31 -4
@@ -0,0 +1,1791 @@
1
+ import { createRequire as tackCreateRequire } from "node:module"; const require = tackCreateRequire(import.meta.url);
2
+ import {
3
+ __commonJS,
4
+ init_define_TACK_BUILD_INFO
5
+ } from "./chunk-XARHV5M4.js";
6
+
7
+ // node_modules/.bun/picomatch@4.0.7/node_modules/picomatch/lib/constants.js
8
+ var require_constants = __commonJS({
9
+ "node_modules/.bun/picomatch@4.0.7/node_modules/picomatch/lib/constants.js"(exports, module) {
10
+ "use strict";
11
+ init_define_TACK_BUILD_INFO();
12
+ var WIN_SLASH = "\\\\/";
13
+ var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
14
+ var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
15
+ var DOT_LITERAL = "\\.";
16
+ var PLUS_LITERAL = "\\+";
17
+ var QMARK_LITERAL = "\\?";
18
+ var SLASH_LITERAL = "\\/";
19
+ var ONE_CHAR = "(?=.)";
20
+ var QMARK = "[^/]";
21
+ var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
22
+ var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
23
+ var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
24
+ var NO_DOT = `(?!${DOT_LITERAL})`;
25
+ var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
26
+ var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
27
+ var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
28
+ var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
29
+ var STAR = `${QMARK}*?`;
30
+ var SEP = "/";
31
+ var POSIX_CHARS = {
32
+ DOT_LITERAL,
33
+ PLUS_LITERAL,
34
+ QMARK_LITERAL,
35
+ SLASH_LITERAL,
36
+ ONE_CHAR,
37
+ QMARK,
38
+ END_ANCHOR,
39
+ DOTS_SLASH,
40
+ NO_DOT,
41
+ NO_DOTS,
42
+ NO_DOT_SLASH,
43
+ NO_DOTS_SLASH,
44
+ QMARK_NO_DOT,
45
+ STAR,
46
+ START_ANCHOR,
47
+ SEP
48
+ };
49
+ var WINDOWS_CHARS = {
50
+ ...POSIX_CHARS,
51
+ SLASH_LITERAL: `[${WIN_SLASH}]`,
52
+ QMARK: WIN_NO_SLASH,
53
+ STAR: `${WIN_NO_SLASH}*?`,
54
+ DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
55
+ NO_DOT: `(?!${DOT_LITERAL})`,
56
+ NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
57
+ NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
58
+ NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
59
+ QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
60
+ START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
61
+ END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
62
+ SEP: "\\"
63
+ };
64
+ var POSIX_REGEX_SOURCE = {
65
+ __proto__: null,
66
+ alnum: "a-zA-Z0-9",
67
+ alpha: "a-zA-Z",
68
+ ascii: "\\x00-\\x7F",
69
+ blank: " \\t",
70
+ cntrl: "\\x00-\\x1F\\x7F",
71
+ digit: "0-9",
72
+ graph: "\\x21-\\x7E",
73
+ lower: "a-z",
74
+ print: "\\x20-\\x7E ",
75
+ punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
76
+ space: " \\t\\r\\n\\v\\f",
77
+ upper: "A-Z",
78
+ word: "A-Za-z0-9_",
79
+ xdigit: "A-Fa-f0-9"
80
+ };
81
+ module.exports = {
82
+ DEFAULT_MAX_EXTGLOB_RECURSION,
83
+ MAX_LENGTH: 1024 * 64,
84
+ POSIX_REGEX_SOURCE,
85
+ // regular expressions
86
+ REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
87
+ REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
88
+ REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
89
+ REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
90
+ REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
91
+ REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
92
+ // Replace globs with equivalent patterns to reduce parsing time.
93
+ REPLACEMENTS: {
94
+ __proto__: null,
95
+ "***": "*",
96
+ "**/**": "**",
97
+ "**/**/**": "**"
98
+ },
99
+ // Digits
100
+ CHAR_0: 48,
101
+ /* 0 */
102
+ CHAR_9: 57,
103
+ /* 9 */
104
+ // Alphabet chars.
105
+ CHAR_UPPERCASE_A: 65,
106
+ /* A */
107
+ CHAR_LOWERCASE_A: 97,
108
+ /* a */
109
+ CHAR_UPPERCASE_Z: 90,
110
+ /* Z */
111
+ CHAR_LOWERCASE_Z: 122,
112
+ /* z */
113
+ CHAR_LEFT_PARENTHESES: 40,
114
+ /* ( */
115
+ CHAR_RIGHT_PARENTHESES: 41,
116
+ /* ) */
117
+ CHAR_ASTERISK: 42,
118
+ /* * */
119
+ // Non-alphabetic chars.
120
+ CHAR_AMPERSAND: 38,
121
+ /* & */
122
+ CHAR_AT: 64,
123
+ /* @ */
124
+ CHAR_BACKWARD_SLASH: 92,
125
+ /* \ */
126
+ CHAR_CARRIAGE_RETURN: 13,
127
+ /* \r */
128
+ CHAR_CIRCUMFLEX_ACCENT: 94,
129
+ /* ^ */
130
+ CHAR_COLON: 58,
131
+ /* : */
132
+ CHAR_COMMA: 44,
133
+ /* , */
134
+ CHAR_DOT: 46,
135
+ /* . */
136
+ CHAR_DOUBLE_QUOTE: 34,
137
+ /* " */
138
+ CHAR_EQUAL: 61,
139
+ /* = */
140
+ CHAR_EXCLAMATION_MARK: 33,
141
+ /* ! */
142
+ CHAR_FORM_FEED: 12,
143
+ /* \f */
144
+ CHAR_FORWARD_SLASH: 47,
145
+ /* / */
146
+ CHAR_GRAVE_ACCENT: 96,
147
+ /* ` */
148
+ CHAR_HASH: 35,
149
+ /* # */
150
+ CHAR_HYPHEN_MINUS: 45,
151
+ /* - */
152
+ CHAR_LEFT_ANGLE_BRACKET: 60,
153
+ /* < */
154
+ CHAR_LEFT_CURLY_BRACE: 123,
155
+ /* { */
156
+ CHAR_LEFT_SQUARE_BRACKET: 91,
157
+ /* [ */
158
+ CHAR_LINE_FEED: 10,
159
+ /* \n */
160
+ CHAR_NO_BREAK_SPACE: 160,
161
+ /* \u00A0 */
162
+ CHAR_PERCENT: 37,
163
+ /* % */
164
+ CHAR_PLUS: 43,
165
+ /* + */
166
+ CHAR_QUESTION_MARK: 63,
167
+ /* ? */
168
+ CHAR_RIGHT_ANGLE_BRACKET: 62,
169
+ /* > */
170
+ CHAR_RIGHT_CURLY_BRACE: 125,
171
+ /* } */
172
+ CHAR_RIGHT_SQUARE_BRACKET: 93,
173
+ /* ] */
174
+ CHAR_SEMICOLON: 59,
175
+ /* ; */
176
+ CHAR_SINGLE_QUOTE: 39,
177
+ /* ' */
178
+ CHAR_SPACE: 32,
179
+ /* */
180
+ CHAR_TAB: 9,
181
+ /* \t */
182
+ CHAR_UNDERSCORE: 95,
183
+ /* _ */
184
+ CHAR_VERTICAL_LINE: 124,
185
+ /* | */
186
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
187
+ /* \uFEFF */
188
+ /**
189
+ * Create EXTGLOB_CHARS
190
+ */
191
+ extglobChars(chars) {
192
+ return {
193
+ "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
194
+ "?": { type: "qmark", open: "(?:", close: ")?" },
195
+ "+": { type: "plus", open: "(?:", close: ")+" },
196
+ "*": { type: "star", open: "(?:", close: ")*" },
197
+ "@": { type: "at", open: "(?:", close: ")" }
198
+ };
199
+ },
200
+ /**
201
+ * Create GLOB_CHARS
202
+ */
203
+ globChars(win32) {
204
+ return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
205
+ }
206
+ };
207
+ }
208
+ });
209
+
210
+ // node_modules/.bun/picomatch@4.0.7/node_modules/picomatch/lib/utils.js
211
+ var require_utils = __commonJS({
212
+ "node_modules/.bun/picomatch@4.0.7/node_modules/picomatch/lib/utils.js"(exports) {
213
+ "use strict";
214
+ init_define_TACK_BUILD_INFO();
215
+ var {
216
+ REGEX_BACKSLASH,
217
+ REGEX_REMOVE_BACKSLASH,
218
+ REGEX_SPECIAL_CHARS,
219
+ REGEX_SPECIAL_CHARS_GLOBAL
220
+ } = require_constants();
221
+ exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
222
+ exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
223
+ exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
224
+ exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
225
+ exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
226
+ exports.isWindows = () => {
227
+ if (typeof navigator !== "undefined" && navigator.platform) {
228
+ const platform = navigator.platform.toLowerCase();
229
+ return platform === "win32" || platform === "windows";
230
+ }
231
+ if (typeof process !== "undefined" && process.platform) {
232
+ return process.platform === "win32";
233
+ }
234
+ return false;
235
+ };
236
+ exports.removeBackslashes = (str) => {
237
+ return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
238
+ return match === "\\" ? "" : match;
239
+ });
240
+ };
241
+ exports.escapeLast = (input, char, lastIdx) => {
242
+ const idx = input.lastIndexOf(char, lastIdx);
243
+ if (idx === -1) return input;
244
+ if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1);
245
+ return `${input.slice(0, idx)}\\${input.slice(idx)}`;
246
+ };
247
+ exports.removePrefix = (input, state = {}) => {
248
+ let output = input;
249
+ if (output.startsWith("./")) {
250
+ output = output.slice(2);
251
+ state.prefix = "./";
252
+ }
253
+ return output;
254
+ };
255
+ exports.wrapOutput = (input, state = {}, options = {}) => {
256
+ const prepend = options.contains ? "" : "^";
257
+ const append = options.contains ? "" : "$";
258
+ let output = `${prepend}(?:${input})${append}`;
259
+ if (state.negated === true) {
260
+ output = `(?:^(?!${output}).*$)`;
261
+ }
262
+ return output;
263
+ };
264
+ exports.basename = (path, { windows } = {}) => {
265
+ const segs = path.split(windows ? /[\\/]/ : "/");
266
+ const last = segs[segs.length - 1];
267
+ if (last === "") {
268
+ return segs[segs.length - 2];
269
+ }
270
+ return last;
271
+ };
272
+ }
273
+ });
274
+
275
+ // node_modules/.bun/picomatch@4.0.7/node_modules/picomatch/lib/scan.js
276
+ var require_scan = __commonJS({
277
+ "node_modules/.bun/picomatch@4.0.7/node_modules/picomatch/lib/scan.js"(exports, module) {
278
+ "use strict";
279
+ init_define_TACK_BUILD_INFO();
280
+ var utils = require_utils();
281
+ var {
282
+ CHAR_ASTERISK,
283
+ /* * */
284
+ CHAR_AT,
285
+ /* @ */
286
+ CHAR_BACKWARD_SLASH,
287
+ /* \ */
288
+ CHAR_COMMA,
289
+ /* , */
290
+ CHAR_DOT,
291
+ /* . */
292
+ CHAR_EXCLAMATION_MARK,
293
+ /* ! */
294
+ CHAR_FORWARD_SLASH,
295
+ /* / */
296
+ CHAR_LEFT_CURLY_BRACE,
297
+ /* { */
298
+ CHAR_LEFT_PARENTHESES,
299
+ /* ( */
300
+ CHAR_LEFT_SQUARE_BRACKET,
301
+ /* [ */
302
+ CHAR_PLUS,
303
+ /* + */
304
+ CHAR_QUESTION_MARK,
305
+ /* ? */
306
+ CHAR_RIGHT_CURLY_BRACE,
307
+ /* } */
308
+ CHAR_RIGHT_PARENTHESES,
309
+ /* ) */
310
+ CHAR_RIGHT_SQUARE_BRACKET
311
+ /* ] */
312
+ } = require_constants();
313
+ var isPathSeparator = (code) => {
314
+ return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
315
+ };
316
+ var depth = (token) => {
317
+ if (token.isPrefix !== true) {
318
+ token.depth = token.isGlobstar ? Infinity : 1;
319
+ }
320
+ };
321
+ var scan = (input, options) => {
322
+ const opts = options || {};
323
+ const length = input.length - 1;
324
+ const scanToEnd = opts.parts === true || opts.tokens === true || opts.scanToEnd === true;
325
+ const slashes = [];
326
+ const tokens = [];
327
+ const parts = [];
328
+ let str = input;
329
+ let index = -1;
330
+ let start = 0;
331
+ let lastIndex = 0;
332
+ let isBrace = false;
333
+ let isBracket = false;
334
+ let isGlob = false;
335
+ let isExtglob = false;
336
+ let isGlobstar = false;
337
+ let braceEscaped = false;
338
+ let backslashes = false;
339
+ let negated = false;
340
+ let negatedExtglob = false;
341
+ let finished = false;
342
+ let braces = 0;
343
+ let prev;
344
+ let code;
345
+ let token = { value: "", depth: 0, isGlob: false };
346
+ const eos = () => index >= length;
347
+ const peek = () => str.charCodeAt(index + 1);
348
+ const advance = () => {
349
+ prev = code;
350
+ return str.charCodeAt(++index);
351
+ };
352
+ while (index < length) {
353
+ code = advance();
354
+ let next;
355
+ if (code === CHAR_BACKWARD_SLASH) {
356
+ backslashes = token.backslashes = true;
357
+ code = advance();
358
+ if (code === CHAR_LEFT_CURLY_BRACE) {
359
+ braceEscaped = true;
360
+ }
361
+ continue;
362
+ }
363
+ if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
364
+ braces++;
365
+ while (eos() !== true && (code = advance())) {
366
+ if (code === CHAR_BACKWARD_SLASH) {
367
+ backslashes = token.backslashes = true;
368
+ advance();
369
+ continue;
370
+ }
371
+ if (code === CHAR_LEFT_CURLY_BRACE) {
372
+ braces++;
373
+ continue;
374
+ }
375
+ if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
376
+ isBrace = token.isBrace = true;
377
+ isGlob = token.isGlob = true;
378
+ finished = true;
379
+ if (scanToEnd === true) {
380
+ continue;
381
+ }
382
+ break;
383
+ }
384
+ if (braceEscaped !== true && code === CHAR_COMMA) {
385
+ isBrace = token.isBrace = true;
386
+ isGlob = token.isGlob = true;
387
+ finished = true;
388
+ if (scanToEnd === true) {
389
+ continue;
390
+ }
391
+ break;
392
+ }
393
+ if (code === CHAR_RIGHT_CURLY_BRACE) {
394
+ braces--;
395
+ if (braces === 0) {
396
+ braceEscaped = false;
397
+ isBrace = token.isBrace = true;
398
+ finished = true;
399
+ break;
400
+ }
401
+ }
402
+ }
403
+ if (scanToEnd === true) {
404
+ continue;
405
+ }
406
+ break;
407
+ }
408
+ if (code === CHAR_FORWARD_SLASH) {
409
+ slashes.push(index);
410
+ tokens.push(token);
411
+ token = { value: "", depth: 0, isGlob: false };
412
+ if (finished === true) continue;
413
+ if (prev === CHAR_DOT && index === start + 1) {
414
+ start += 2;
415
+ continue;
416
+ }
417
+ lastIndex = index + 1;
418
+ continue;
419
+ }
420
+ if (opts.noext !== true) {
421
+ const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
422
+ if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
423
+ isGlob = token.isGlob = true;
424
+ isExtglob = token.isExtglob = true;
425
+ finished = true;
426
+ if (code === CHAR_EXCLAMATION_MARK && index === start) {
427
+ negatedExtglob = true;
428
+ }
429
+ if (scanToEnd === true) {
430
+ let parens = 0;
431
+ while (eos() !== true && (code = advance())) {
432
+ if (code === CHAR_BACKWARD_SLASH) {
433
+ backslashes = token.backslashes = true;
434
+ advance();
435
+ continue;
436
+ }
437
+ if (code === CHAR_LEFT_PARENTHESES) {
438
+ parens++;
439
+ continue;
440
+ }
441
+ if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
442
+ finished = true;
443
+ break;
444
+ }
445
+ }
446
+ continue;
447
+ }
448
+ break;
449
+ }
450
+ }
451
+ if (code === CHAR_ASTERISK) {
452
+ if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
453
+ isGlob = token.isGlob = true;
454
+ finished = true;
455
+ if (scanToEnd === true) {
456
+ continue;
457
+ }
458
+ break;
459
+ }
460
+ if (code === CHAR_QUESTION_MARK) {
461
+ isGlob = token.isGlob = true;
462
+ finished = true;
463
+ if (scanToEnd === true) {
464
+ continue;
465
+ }
466
+ break;
467
+ }
468
+ if (code === CHAR_LEFT_SQUARE_BRACKET) {
469
+ while (eos() !== true && (next = advance())) {
470
+ if (next === CHAR_BACKWARD_SLASH) {
471
+ backslashes = token.backslashes = true;
472
+ advance();
473
+ continue;
474
+ }
475
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
476
+ isBracket = token.isBracket = true;
477
+ isGlob = token.isGlob = true;
478
+ finished = true;
479
+ break;
480
+ }
481
+ }
482
+ if (scanToEnd === true) {
483
+ continue;
484
+ }
485
+ break;
486
+ }
487
+ if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
488
+ negated = token.negated = true;
489
+ start++;
490
+ continue;
491
+ }
492
+ if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
493
+ isGlob = token.isGlob = true;
494
+ if (scanToEnd === true) {
495
+ let parens = 1;
496
+ while (eos() !== true && (code = advance())) {
497
+ if (code === CHAR_BACKWARD_SLASH) {
498
+ backslashes = token.backslashes = true;
499
+ advance();
500
+ continue;
501
+ }
502
+ if (code === CHAR_LEFT_PARENTHESES) {
503
+ parens++;
504
+ continue;
505
+ }
506
+ if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
507
+ finished = true;
508
+ break;
509
+ }
510
+ }
511
+ continue;
512
+ }
513
+ break;
514
+ }
515
+ if (isGlob === true) {
516
+ finished = true;
517
+ if (scanToEnd === true) {
518
+ continue;
519
+ }
520
+ break;
521
+ }
522
+ }
523
+ if (opts.noext === true) {
524
+ isExtglob = false;
525
+ isGlob = false;
526
+ }
527
+ let base = str;
528
+ let prefix = "";
529
+ let glob = "";
530
+ if (start > 0) {
531
+ prefix = str.slice(0, start);
532
+ str = str.slice(start);
533
+ lastIndex -= start;
534
+ }
535
+ if (base && isGlob === true && lastIndex > 0) {
536
+ base = str.slice(0, lastIndex);
537
+ glob = str.slice(lastIndex);
538
+ } else if (isGlob === true) {
539
+ base = "";
540
+ glob = str;
541
+ } else {
542
+ base = str;
543
+ }
544
+ if (base && base !== "" && base !== "/" && base !== str) {
545
+ if (isPathSeparator(base.charCodeAt(base.length - 1))) {
546
+ base = base.slice(0, -1);
547
+ }
548
+ }
549
+ if (opts.unescape === true) {
550
+ if (glob) glob = utils.removeBackslashes(glob);
551
+ if (base && backslashes === true) {
552
+ base = utils.removeBackslashes(base);
553
+ }
554
+ }
555
+ const state = {
556
+ prefix,
557
+ input,
558
+ start,
559
+ base,
560
+ glob,
561
+ isBrace,
562
+ isBracket,
563
+ isGlob,
564
+ isExtglob,
565
+ isGlobstar,
566
+ negated,
567
+ negatedExtglob
568
+ };
569
+ if (opts.tokens === true) {
570
+ state.maxDepth = 0;
571
+ if (!isPathSeparator(code)) {
572
+ tokens.push(token);
573
+ }
574
+ state.tokens = tokens;
575
+ }
576
+ if (opts.parts === true || opts.tokens === true) {
577
+ let prevIndex;
578
+ for (let idx = 0; idx < slashes.length; idx++) {
579
+ const n2 = prevIndex !== void 0 ? prevIndex + 1 : start;
580
+ const i = slashes[idx];
581
+ const value2 = input.slice(n2, i);
582
+ if (opts.tokens) {
583
+ if (idx === 0 && start !== 0) {
584
+ tokens[idx].isPrefix = true;
585
+ tokens[idx].value = prefix;
586
+ } else {
587
+ tokens[idx].value = value2;
588
+ }
589
+ depth(tokens[idx]);
590
+ state.maxDepth += tokens[idx].depth;
591
+ }
592
+ if (i >= start) {
593
+ parts.push(value2);
594
+ prevIndex = i;
595
+ }
596
+ }
597
+ const n = prevIndex !== void 0 ? prevIndex + 1 : start;
598
+ const value = input.slice(n);
599
+ parts.push(value);
600
+ if (opts.tokens && prevIndex && prevIndex + 1 < input.length) {
601
+ tokens[tokens.length - 1].value = value;
602
+ depth(tokens[tokens.length - 1]);
603
+ state.maxDepth += tokens[tokens.length - 1].depth;
604
+ }
605
+ state.slashes = slashes;
606
+ state.parts = parts;
607
+ }
608
+ return state;
609
+ };
610
+ module.exports = scan;
611
+ }
612
+ });
613
+
614
+ // node_modules/.bun/picomatch@4.0.7/node_modules/picomatch/lib/parse.js
615
+ var require_parse = __commonJS({
616
+ "node_modules/.bun/picomatch@4.0.7/node_modules/picomatch/lib/parse.js"(exports, module) {
617
+ "use strict";
618
+ init_define_TACK_BUILD_INFO();
619
+ var constants = require_constants();
620
+ var utils = require_utils();
621
+ var {
622
+ MAX_LENGTH,
623
+ POSIX_REGEX_SOURCE,
624
+ REGEX_NON_SPECIAL_CHARS,
625
+ REGEX_SPECIAL_CHARS_BACKREF,
626
+ REPLACEMENTS
627
+ } = constants;
628
+ var expandRange = (args, options) => {
629
+ if (typeof options.expandRange === "function") {
630
+ return options.expandRange(...args, options);
631
+ }
632
+ args.sort();
633
+ const value = `[${args.join("-")}]`;
634
+ try {
635
+ new RegExp(value);
636
+ } catch (ex) {
637
+ return args.map((v) => utils.escapeRegex(v)).join("..");
638
+ }
639
+ return value;
640
+ };
641
+ var syntaxError = (type, char) => {
642
+ return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
643
+ };
644
+ var splitTopLevel = (input) => {
645
+ const parts = [];
646
+ let bracket = 0;
647
+ let paren = 0;
648
+ let quote = 0;
649
+ let value = "";
650
+ let escaped = false;
651
+ for (const ch of input) {
652
+ if (escaped === true) {
653
+ value += ch;
654
+ escaped = false;
655
+ continue;
656
+ }
657
+ if (ch === "\\") {
658
+ value += ch;
659
+ escaped = true;
660
+ continue;
661
+ }
662
+ if (ch === '"') {
663
+ quote = quote === 1 ? 0 : 1;
664
+ value += ch;
665
+ continue;
666
+ }
667
+ if (quote === 0) {
668
+ if (ch === "[") {
669
+ bracket++;
670
+ } else if (ch === "]" && bracket > 0) {
671
+ bracket--;
672
+ } else if (bracket === 0) {
673
+ if (ch === "(") {
674
+ paren++;
675
+ } else if (ch === ")" && paren > 0) {
676
+ paren--;
677
+ } else if (ch === "|" && paren === 0) {
678
+ parts.push(value);
679
+ value = "";
680
+ continue;
681
+ }
682
+ }
683
+ }
684
+ value += ch;
685
+ }
686
+ parts.push(value);
687
+ return parts;
688
+ };
689
+ var isPlainBranch = (branch) => {
690
+ let escaped = false;
691
+ for (const ch of branch) {
692
+ if (escaped === true) {
693
+ escaped = false;
694
+ continue;
695
+ }
696
+ if (ch === "\\") {
697
+ escaped = true;
698
+ continue;
699
+ }
700
+ if (/[?*+@!()[\]{}]/.test(ch)) {
701
+ return false;
702
+ }
703
+ }
704
+ return true;
705
+ };
706
+ var normalizeSimpleBranch = (branch) => {
707
+ let value = branch.trim();
708
+ let changed = true;
709
+ while (changed === true) {
710
+ changed = false;
711
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
712
+ value = value.slice(2, -1);
713
+ changed = true;
714
+ }
715
+ }
716
+ if (!isPlainBranch(value)) {
717
+ return;
718
+ }
719
+ return value.replace(/\\(.)/g, "$1");
720
+ };
721
+ var hasRepeatedCharPrefixOverlap = (branches) => {
722
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
723
+ for (let i = 0; i < values.length; i++) {
724
+ for (let j = i + 1; j < values.length; j++) {
725
+ const a = values[i];
726
+ const b = values[j];
727
+ const char = a[0];
728
+ if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
729
+ continue;
730
+ }
731
+ if (a === b || a.startsWith(b) || b.startsWith(a)) {
732
+ return true;
733
+ }
734
+ }
735
+ }
736
+ return false;
737
+ };
738
+ var parseRepeatedExtglob = (pattern, requireEnd = true) => {
739
+ if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
740
+ return;
741
+ }
742
+ let bracket = 0;
743
+ let paren = 0;
744
+ let quote = 0;
745
+ let escaped = false;
746
+ for (let i = 1; i < pattern.length; i++) {
747
+ const ch = pattern[i];
748
+ if (escaped === true) {
749
+ escaped = false;
750
+ continue;
751
+ }
752
+ if (ch === "\\") {
753
+ escaped = true;
754
+ continue;
755
+ }
756
+ if (ch === '"') {
757
+ quote = quote === 1 ? 0 : 1;
758
+ continue;
759
+ }
760
+ if (quote === 1) {
761
+ continue;
762
+ }
763
+ if (ch === "[") {
764
+ bracket++;
765
+ continue;
766
+ }
767
+ if (ch === "]" && bracket > 0) {
768
+ bracket--;
769
+ continue;
770
+ }
771
+ if (bracket > 0) {
772
+ continue;
773
+ }
774
+ if (ch === "(") {
775
+ paren++;
776
+ continue;
777
+ }
778
+ if (ch === ")") {
779
+ paren--;
780
+ if (paren === 0) {
781
+ if (requireEnd === true && i !== pattern.length - 1) {
782
+ return;
783
+ }
784
+ return {
785
+ type: pattern[0],
786
+ body: pattern.slice(2, i),
787
+ end: i
788
+ };
789
+ }
790
+ }
791
+ }
792
+ };
793
+ var buildCharClassStar = (chars) => {
794
+ const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
795
+ return `${source}*`;
796
+ };
797
+ var getStarExtglobSequenceChars = (pattern) => {
798
+ let index = 0;
799
+ const chars = [];
800
+ while (index < pattern.length) {
801
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
802
+ if (!match || match.type !== "*") {
803
+ return;
804
+ }
805
+ const branches = splitTopLevel(match.body).map((branch2) => branch2.trim());
806
+ if (branches.length !== 1) {
807
+ return;
808
+ }
809
+ const branch = normalizeSimpleBranch(branches[0]);
810
+ if (!branch || branch.length !== 1) {
811
+ return;
812
+ }
813
+ chars.push(branch);
814
+ index += match.end + 1;
815
+ }
816
+ if (chars.length < 1) {
817
+ return;
818
+ }
819
+ return chars;
820
+ };
821
+ var repeatedExtglobRecursion = (pattern) => {
822
+ let depth = 0;
823
+ let value = pattern.trim();
824
+ let match = parseRepeatedExtglob(value);
825
+ while (match) {
826
+ depth++;
827
+ value = match.body.trim();
828
+ match = parseRepeatedExtglob(value);
829
+ }
830
+ return depth;
831
+ };
832
+ var analyzeRepeatedExtglob = (body, options) => {
833
+ if (options.maxExtglobRecursion === false) {
834
+ return { risky: false };
835
+ }
836
+ const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
837
+ const branches = splitTopLevel(body).map((branch) => branch.trim());
838
+ if (branches.length > 1) {
839
+ if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
840
+ return { risky: true };
841
+ }
842
+ }
843
+ const safeChars = [];
844
+ let sawStarSequence = false;
845
+ let combinable = true;
846
+ for (const branch of branches) {
847
+ const chars = getStarExtglobSequenceChars(branch);
848
+ if (chars) {
849
+ sawStarSequence = true;
850
+ safeChars.push(...chars);
851
+ continue;
852
+ }
853
+ const literal = normalizeSimpleBranch(branch);
854
+ if (literal && literal.length === 1) {
855
+ safeChars.push(literal);
856
+ continue;
857
+ }
858
+ combinable = false;
859
+ if (repeatedExtglobRecursion(branch) > max) {
860
+ return { risky: true };
861
+ }
862
+ }
863
+ if (sawStarSequence) {
864
+ return combinable ? { risky: true, safeOutput: buildCharClassStar([...new Set(safeChars)]) } : { risky: true };
865
+ }
866
+ return { risky: false };
867
+ };
868
+ var parse = (input, options) => {
869
+ if (typeof input !== "string") {
870
+ throw new TypeError("Expected a string");
871
+ }
872
+ input = REPLACEMENTS[input] || input;
873
+ const opts = { ...options };
874
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
875
+ let len = input.length;
876
+ if (len > max) {
877
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
878
+ }
879
+ const bos = { type: "bos", value: "", output: opts.prepend || "" };
880
+ const tokens = [bos];
881
+ const capture = opts.capture ? "" : "?:";
882
+ const PLATFORM_CHARS = constants.globChars(opts.windows);
883
+ const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
884
+ const {
885
+ DOT_LITERAL,
886
+ PLUS_LITERAL,
887
+ SLASH_LITERAL,
888
+ ONE_CHAR,
889
+ DOTS_SLASH,
890
+ NO_DOT,
891
+ NO_DOT_SLASH,
892
+ NO_DOTS_SLASH,
893
+ QMARK,
894
+ QMARK_NO_DOT,
895
+ STAR,
896
+ START_ANCHOR
897
+ } = PLATFORM_CHARS;
898
+ const globstar = (opts2) => {
899
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
900
+ };
901
+ const nodot = opts.dot ? "" : NO_DOT;
902
+ const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
903
+ let star = opts.bash === true ? globstar(opts) : STAR;
904
+ if (opts.capture) {
905
+ star = `(${star})`;
906
+ }
907
+ if (typeof opts.noext === "boolean") {
908
+ opts.noextglob = opts.noext;
909
+ }
910
+ const state = {
911
+ input,
912
+ index: -1,
913
+ start: 0,
914
+ dot: opts.dot === true,
915
+ consumed: "",
916
+ output: "",
917
+ prefix: "",
918
+ backtrack: false,
919
+ negated: false,
920
+ brackets: 0,
921
+ braces: 0,
922
+ parens: 0,
923
+ quotes: 0,
924
+ globstar: false,
925
+ tokens
926
+ };
927
+ input = utils.removePrefix(input, state);
928
+ len = input.length;
929
+ const extglobs = [];
930
+ const braces = [];
931
+ const stack = [];
932
+ let prev = bos;
933
+ let value;
934
+ const eos = () => state.index === len - 1;
935
+ const peek = state.peek = (n = 1) => input[state.index + n];
936
+ const advance = state.advance = () => input[++state.index] || "";
937
+ const remaining = () => input.slice(state.index + 1);
938
+ const consume = (value2 = "", num = 0) => {
939
+ state.consumed += value2;
940
+ state.index += num;
941
+ };
942
+ const append = (token) => {
943
+ state.output += token.output != null ? token.output : token.value;
944
+ consume(token.value);
945
+ };
946
+ const negate = () => {
947
+ let count = 1;
948
+ while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
949
+ advance();
950
+ state.start++;
951
+ count++;
952
+ }
953
+ if (count % 2 === 0) {
954
+ return false;
955
+ }
956
+ state.negated = true;
957
+ state.start++;
958
+ return true;
959
+ };
960
+ const increment = (type) => {
961
+ state[type]++;
962
+ stack.push(type);
963
+ };
964
+ const decrement = (type) => {
965
+ state[type]--;
966
+ stack.pop();
967
+ };
968
+ const push = (tok) => {
969
+ if (prev.type === "globstar") {
970
+ const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
971
+ const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
972
+ if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
973
+ state.output = state.output.slice(0, -prev.output.length);
974
+ prev.type = "star";
975
+ prev.value = "*";
976
+ prev.output = star;
977
+ state.output += prev.output;
978
+ }
979
+ }
980
+ if (extglobs.length && tok.type !== "paren") {
981
+ extglobs[extglobs.length - 1].inner += tok.value;
982
+ }
983
+ if (tok.value || tok.output) append(tok);
984
+ if (prev && prev.type === "text" && tok.type === "text") {
985
+ prev.output = (prev.output || prev.value) + tok.value;
986
+ prev.value += tok.value;
987
+ return;
988
+ }
989
+ tok.prev = prev;
990
+ tokens.push(tok);
991
+ prev = tok;
992
+ };
993
+ const extglobOpen = (type, value2) => {
994
+ const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
995
+ token.prev = prev;
996
+ token.parens = state.parens;
997
+ token.output = state.output;
998
+ token.startIndex = state.index;
999
+ token.tokensIndex = tokens.length;
1000
+ const output = (opts.capture ? "(" : "") + token.open;
1001
+ increment("parens");
1002
+ push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
1003
+ push({ type: "paren", extglob: true, value: advance(), output });
1004
+ extglobs.push(token);
1005
+ };
1006
+ const extglobClose = (token) => {
1007
+ const literal = input.slice(token.startIndex, state.index + 1);
1008
+ const body = input.slice(token.startIndex + 2, state.index);
1009
+ const analysis = analyzeRepeatedExtglob(body, opts);
1010
+ if ((token.type === "plus" || token.type === "star") && analysis.risky) {
1011
+ const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
1012
+ const open = tokens[token.tokensIndex];
1013
+ open.type = "text";
1014
+ open.value = literal;
1015
+ open.output = safeOutput || utils.escapeRegex(literal);
1016
+ for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
1017
+ tokens[i].value = "";
1018
+ tokens[i].output = "";
1019
+ delete tokens[i].suffix;
1020
+ }
1021
+ state.output = token.output + open.output;
1022
+ state.backtrack = true;
1023
+ push({ type: "paren", extglob: true, value, output: "" });
1024
+ decrement("parens");
1025
+ return;
1026
+ }
1027
+ let output = token.close + (opts.capture ? ")" : "");
1028
+ let rest;
1029
+ if (token.type === "negate") {
1030
+ let extglobStar = star;
1031
+ if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
1032
+ extglobStar = globstar(opts);
1033
+ }
1034
+ if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
1035
+ output = token.close = `)$))${extglobStar}`;
1036
+ }
1037
+ if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
1038
+ const expression = parse(rest, { ...options, fastpaths: false }).output;
1039
+ output = token.close = `)${expression})${extglobStar})`;
1040
+ }
1041
+ if (token.prev.type === "bos") {
1042
+ state.negatedExtglob = true;
1043
+ }
1044
+ }
1045
+ push({ type: "paren", extglob: true, value, output });
1046
+ decrement("parens");
1047
+ };
1048
+ if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
1049
+ let backslashes = false;
1050
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
1051
+ if (first === "\\") {
1052
+ backslashes = true;
1053
+ return m;
1054
+ }
1055
+ if (first === "?") {
1056
+ if (esc) {
1057
+ return esc + first + (rest ? QMARK.repeat(rest.length) : "");
1058
+ }
1059
+ if (index === 0) {
1060
+ return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
1061
+ }
1062
+ return QMARK.repeat(chars.length);
1063
+ }
1064
+ if (first === ".") {
1065
+ return DOT_LITERAL.repeat(chars.length);
1066
+ }
1067
+ if (first === "*") {
1068
+ if (esc) {
1069
+ return esc + first + (rest ? star : "");
1070
+ }
1071
+ return star;
1072
+ }
1073
+ return esc ? m : `\\${m}`;
1074
+ });
1075
+ if (backslashes === true) {
1076
+ if (opts.unescape === true) {
1077
+ output = output.replace(/\\/g, "");
1078
+ } else {
1079
+ output = output.replace(/\\+/g, (m) => {
1080
+ return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
1081
+ });
1082
+ }
1083
+ }
1084
+ if (output === input && opts.contains === true) {
1085
+ state.output = input;
1086
+ return state;
1087
+ }
1088
+ state.output = utils.wrapOutput(output, state, options);
1089
+ return state;
1090
+ }
1091
+ while (!eos()) {
1092
+ value = advance();
1093
+ if (value === "\0") {
1094
+ continue;
1095
+ }
1096
+ if (value === "\\") {
1097
+ const next = peek();
1098
+ if (next === "/" && opts.bash !== true) {
1099
+ continue;
1100
+ }
1101
+ if (next === "." || next === ";") {
1102
+ continue;
1103
+ }
1104
+ if (!next) {
1105
+ value += "\\";
1106
+ push({ type: "text", value });
1107
+ continue;
1108
+ }
1109
+ const match = /^\\+/.exec(remaining());
1110
+ let slashes = 0;
1111
+ if (match && match[0].length > 2) {
1112
+ slashes = match[0].length;
1113
+ state.index += slashes;
1114
+ if (slashes % 2 !== 0) {
1115
+ value += "\\";
1116
+ }
1117
+ }
1118
+ if (opts.unescape === true) {
1119
+ value = advance();
1120
+ } else {
1121
+ value += advance();
1122
+ }
1123
+ if (state.brackets === 0) {
1124
+ push({ type: "text", value });
1125
+ continue;
1126
+ }
1127
+ }
1128
+ if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
1129
+ if (opts.posix !== false && value === ":") {
1130
+ const inner = prev.value.slice(1);
1131
+ if (inner.includes("[")) {
1132
+ prev.posix = true;
1133
+ if (inner.includes(":")) {
1134
+ const idx = prev.value.lastIndexOf("[");
1135
+ const pre = prev.value.slice(0, idx);
1136
+ const rest2 = prev.value.slice(idx + 2);
1137
+ const posix = POSIX_REGEX_SOURCE[rest2];
1138
+ if (posix) {
1139
+ prev.value = pre + posix;
1140
+ state.backtrack = true;
1141
+ advance();
1142
+ if (!bos.output && tokens.indexOf(prev) === 1) {
1143
+ bos.output = ONE_CHAR;
1144
+ }
1145
+ continue;
1146
+ }
1147
+ }
1148
+ }
1149
+ }
1150
+ if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
1151
+ value = `\\${value}`;
1152
+ }
1153
+ if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
1154
+ value = `\\${value}`;
1155
+ }
1156
+ if (opts.posix === true && value === "!" && prev.value === "[") {
1157
+ value = "^";
1158
+ }
1159
+ prev.value += value;
1160
+ append({ value });
1161
+ continue;
1162
+ }
1163
+ if (state.quotes === 1 && value !== '"') {
1164
+ value = utils.escapeRegex(value);
1165
+ prev.value += value;
1166
+ append({ value });
1167
+ continue;
1168
+ }
1169
+ if (value === '"') {
1170
+ state.quotes = state.quotes === 1 ? 0 : 1;
1171
+ if (opts.keepQuotes === true) {
1172
+ push({ type: "text", value });
1173
+ }
1174
+ continue;
1175
+ }
1176
+ if (value === "(") {
1177
+ increment("parens");
1178
+ push({ type: "paren", value });
1179
+ continue;
1180
+ }
1181
+ if (value === ")") {
1182
+ if (state.parens === 0 && opts.strictBrackets === true) {
1183
+ throw new SyntaxError(syntaxError("opening", "("));
1184
+ }
1185
+ const extglob = extglobs[extglobs.length - 1];
1186
+ if (extglob && state.parens === extglob.parens + 1) {
1187
+ extglobClose(extglobs.pop());
1188
+ continue;
1189
+ }
1190
+ push({ type: "paren", value, output: state.parens ? ")" : "\\)" });
1191
+ decrement("parens");
1192
+ continue;
1193
+ }
1194
+ if (value === "[") {
1195
+ if (opts.nobracket === true || !remaining().includes("]")) {
1196
+ if (opts.nobracket !== true && opts.strictBrackets === true) {
1197
+ throw new SyntaxError(syntaxError("closing", "]"));
1198
+ }
1199
+ value = `\\${value}`;
1200
+ } else {
1201
+ increment("brackets");
1202
+ }
1203
+ push({ type: "bracket", value });
1204
+ continue;
1205
+ }
1206
+ if (value === "]") {
1207
+ if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
1208
+ push({ type: "text", value, output: `\\${value}` });
1209
+ continue;
1210
+ }
1211
+ if (state.brackets === 0) {
1212
+ if (opts.strictBrackets === true) {
1213
+ throw new SyntaxError(syntaxError("opening", "["));
1214
+ }
1215
+ push({ type: "text", value, output: `\\${value}` });
1216
+ continue;
1217
+ }
1218
+ decrement("brackets");
1219
+ const prevValue = prev.value.slice(1);
1220
+ if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
1221
+ value = `/${value}`;
1222
+ }
1223
+ prev.value += value;
1224
+ append({ value });
1225
+ if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
1226
+ continue;
1227
+ }
1228
+ const escaped = utils.escapeRegex(prev.value);
1229
+ state.output = state.output.slice(0, -prev.value.length);
1230
+ if (opts.literalBrackets === true) {
1231
+ state.output += escaped;
1232
+ prev.value = escaped;
1233
+ continue;
1234
+ }
1235
+ prev.value = `(${capture}${escaped}|${prev.value})`;
1236
+ state.output += prev.value;
1237
+ continue;
1238
+ }
1239
+ if (value === "{" && opts.nobrace !== true) {
1240
+ increment("braces");
1241
+ const open = {
1242
+ type: "brace",
1243
+ value,
1244
+ output: "(",
1245
+ outputIndex: state.output.length,
1246
+ tokensIndex: state.tokens.length
1247
+ };
1248
+ braces.push(open);
1249
+ push(open);
1250
+ continue;
1251
+ }
1252
+ if (value === "}") {
1253
+ const brace = braces[braces.length - 1];
1254
+ if (opts.nobrace === true || !brace) {
1255
+ push({ type: "text", value, output: value });
1256
+ continue;
1257
+ }
1258
+ let output = ")";
1259
+ if (brace.dots === true) {
1260
+ const arr = tokens.slice();
1261
+ const range = [];
1262
+ for (let i = arr.length - 1; i >= 0; i--) {
1263
+ tokens.pop();
1264
+ if (arr[i].type === "brace") {
1265
+ break;
1266
+ }
1267
+ if (arr[i].type !== "dots") {
1268
+ range.unshift(arr[i].value);
1269
+ }
1270
+ }
1271
+ output = expandRange(range, opts);
1272
+ state.backtrack = true;
1273
+ }
1274
+ if (brace.comma !== true && brace.dots !== true) {
1275
+ const out = state.output.slice(0, brace.outputIndex);
1276
+ const toks = state.tokens.slice(brace.tokensIndex);
1277
+ brace.value = brace.output = "\\{";
1278
+ value = output = "\\}";
1279
+ state.output = out;
1280
+ for (const t of toks) {
1281
+ state.output += t.output || t.value;
1282
+ }
1283
+ }
1284
+ push({ type: "brace", value, output });
1285
+ decrement("braces");
1286
+ braces.pop();
1287
+ continue;
1288
+ }
1289
+ if (value === "|") {
1290
+ if (extglobs.length > 0) {
1291
+ extglobs[extglobs.length - 1].conditions++;
1292
+ }
1293
+ push({ type: "text", value });
1294
+ continue;
1295
+ }
1296
+ if (value === ",") {
1297
+ let output = value;
1298
+ const brace = braces[braces.length - 1];
1299
+ if (brace && stack[stack.length - 1] === "braces") {
1300
+ brace.comma = true;
1301
+ output = "|";
1302
+ }
1303
+ push({ type: "comma", value, output });
1304
+ continue;
1305
+ }
1306
+ if (value === "/") {
1307
+ if (prev.type === "dot" && state.index === state.start + 1) {
1308
+ state.start = state.index + 1;
1309
+ state.consumed = "";
1310
+ state.output = "";
1311
+ tokens.pop();
1312
+ prev = bos;
1313
+ continue;
1314
+ }
1315
+ push({ type: "slash", value, output: SLASH_LITERAL });
1316
+ continue;
1317
+ }
1318
+ if (value === ".") {
1319
+ if (state.braces > 0 && prev.type === "dot") {
1320
+ if (prev.value === ".") prev.output = DOT_LITERAL;
1321
+ const brace = braces[braces.length - 1];
1322
+ prev.type = "dots";
1323
+ prev.output += value;
1324
+ prev.value += value;
1325
+ brace.dots = true;
1326
+ continue;
1327
+ }
1328
+ if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
1329
+ push({ type: "text", value, output: DOT_LITERAL });
1330
+ continue;
1331
+ }
1332
+ push({ type: "dot", value, output: DOT_LITERAL });
1333
+ continue;
1334
+ }
1335
+ if (value === "?") {
1336
+ const isGroup = prev && prev.value === "(";
1337
+ if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1338
+ extglobOpen("qmark", value);
1339
+ continue;
1340
+ }
1341
+ if (prev && prev.type === "paren") {
1342
+ const next = peek();
1343
+ let output = value;
1344
+ if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
1345
+ output = `\\${value}`;
1346
+ }
1347
+ push({ type: "text", value, output });
1348
+ continue;
1349
+ }
1350
+ if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
1351
+ push({ type: "qmark", value, output: QMARK_NO_DOT });
1352
+ continue;
1353
+ }
1354
+ push({ type: "qmark", value, output: QMARK });
1355
+ continue;
1356
+ }
1357
+ if (value === "!") {
1358
+ if (opts.noextglob !== true && peek() === "(") {
1359
+ if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
1360
+ extglobOpen("negate", value);
1361
+ continue;
1362
+ }
1363
+ }
1364
+ if (opts.nonegate !== true && state.index === 0) {
1365
+ negate();
1366
+ continue;
1367
+ }
1368
+ }
1369
+ if (value === "+") {
1370
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1371
+ extglobOpen("plus", value);
1372
+ continue;
1373
+ }
1374
+ if (prev && prev.value === "(" || opts.regex === false) {
1375
+ push({ type: "plus", value, output: PLUS_LITERAL });
1376
+ continue;
1377
+ }
1378
+ if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
1379
+ push({ type: "plus", value });
1380
+ continue;
1381
+ }
1382
+ push({ type: "plus", value: PLUS_LITERAL });
1383
+ continue;
1384
+ }
1385
+ if (value === "@") {
1386
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1387
+ push({ type: "at", extglob: true, value, output: "" });
1388
+ continue;
1389
+ }
1390
+ push({ type: "text", value });
1391
+ continue;
1392
+ }
1393
+ if (value !== "*") {
1394
+ if (value === "$" || value === "^") {
1395
+ value = `\\${value}`;
1396
+ }
1397
+ const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
1398
+ if (match) {
1399
+ value += match[0];
1400
+ state.index += match[0].length;
1401
+ }
1402
+ push({ type: "text", value });
1403
+ continue;
1404
+ }
1405
+ if (prev && (prev.type === "globstar" || prev.star === true)) {
1406
+ prev.type = "star";
1407
+ prev.star = true;
1408
+ prev.value += value;
1409
+ prev.output = star;
1410
+ state.backtrack = true;
1411
+ state.globstar = true;
1412
+ consume(value);
1413
+ continue;
1414
+ }
1415
+ let rest = remaining();
1416
+ if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
1417
+ extglobOpen("star", value);
1418
+ continue;
1419
+ }
1420
+ if (prev.type === "star") {
1421
+ if (opts.noglobstar === true) {
1422
+ consume(value);
1423
+ continue;
1424
+ }
1425
+ const prior = prev.prev;
1426
+ const before = prior.prev;
1427
+ const isStart = prior.type === "slash" || prior.type === "bos";
1428
+ const afterStar = before && (before.type === "star" || before.type === "globstar");
1429
+ if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
1430
+ push({ type: "star", value, output: "" });
1431
+ continue;
1432
+ }
1433
+ const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
1434
+ const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
1435
+ if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
1436
+ push({ type: "star", value, output: "" });
1437
+ continue;
1438
+ }
1439
+ while (rest.slice(0, 3) === "/**") {
1440
+ const after = input[state.index + 4];
1441
+ if (after && after !== "/") {
1442
+ break;
1443
+ }
1444
+ rest = rest.slice(3);
1445
+ consume("/**", 3);
1446
+ }
1447
+ const isEnd = eos() || state.parens > 0 && rest === ")".repeat(state.parens) && !extglobs.some((extglob) => extglob.type === "negate");
1448
+ if (prior.type === "bos" && eos()) {
1449
+ prev.type = "globstar";
1450
+ prev.value += value;
1451
+ prev.output = globstar(opts);
1452
+ state.output = prev.output;
1453
+ state.globstar = true;
1454
+ consume(value);
1455
+ continue;
1456
+ }
1457
+ if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && isEnd) {
1458
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
1459
+ prior.output = `(?:${prior.output}`;
1460
+ prev.type = "globstar";
1461
+ prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
1462
+ prev.value += value;
1463
+ state.globstar = true;
1464
+ state.output += prior.output + prev.output;
1465
+ consume(value);
1466
+ continue;
1467
+ }
1468
+ if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
1469
+ const end = rest[1] !== void 0 ? "|$" : "";
1470
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
1471
+ prior.output = `(?:${prior.output}`;
1472
+ prev.type = "globstar";
1473
+ prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
1474
+ prev.value += value;
1475
+ state.output += prior.output + prev.output;
1476
+ state.globstar = true;
1477
+ consume(value + advance());
1478
+ push({ type: "slash", value: "/", output: "" });
1479
+ continue;
1480
+ }
1481
+ if (prior.type === "bos" && rest[0] === "/") {
1482
+ prev.type = "globstar";
1483
+ prev.value += value;
1484
+ prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
1485
+ state.output = prev.output;
1486
+ state.globstar = true;
1487
+ consume(value + advance());
1488
+ push({ type: "slash", value: "/", output: "" });
1489
+ continue;
1490
+ }
1491
+ state.output = state.output.slice(0, -prev.output.length);
1492
+ prev.type = "globstar";
1493
+ prev.output = globstar(opts);
1494
+ prev.value += value;
1495
+ state.output += prev.output;
1496
+ state.globstar = true;
1497
+ consume(value);
1498
+ continue;
1499
+ }
1500
+ const token = { type: "star", value, output: star };
1501
+ if (opts.bash === true) {
1502
+ token.output = ".*?";
1503
+ if (prev.type === "bos" || prev.type === "slash") {
1504
+ token.output = nodot + token.output;
1505
+ }
1506
+ push(token);
1507
+ continue;
1508
+ }
1509
+ if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
1510
+ token.output = value;
1511
+ push(token);
1512
+ continue;
1513
+ }
1514
+ if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
1515
+ if (prev.type === "dot") {
1516
+ state.output += NO_DOT_SLASH;
1517
+ prev.output += NO_DOT_SLASH;
1518
+ } else if (opts.dot === true) {
1519
+ state.output += NO_DOTS_SLASH;
1520
+ prev.output += NO_DOTS_SLASH;
1521
+ } else {
1522
+ state.output += nodot;
1523
+ prev.output += nodot;
1524
+ }
1525
+ if (peek() !== "*") {
1526
+ state.output += ONE_CHAR;
1527
+ prev.output += ONE_CHAR;
1528
+ }
1529
+ }
1530
+ push(token);
1531
+ }
1532
+ while (state.brackets > 0) {
1533
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
1534
+ state.output = utils.escapeLast(state.output, "[");
1535
+ decrement("brackets");
1536
+ }
1537
+ while (state.parens > 0) {
1538
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
1539
+ state.output = utils.escapeLast(state.output, "(");
1540
+ decrement("parens");
1541
+ }
1542
+ while (state.braces > 0) {
1543
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
1544
+ state.output = utils.escapeLast(state.output, "{");
1545
+ decrement("braces");
1546
+ }
1547
+ if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
1548
+ push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` });
1549
+ }
1550
+ if (state.backtrack === true) {
1551
+ state.output = "";
1552
+ for (const token of state.tokens) {
1553
+ state.output += token.output != null ? token.output : token.value;
1554
+ if (token.suffix) {
1555
+ state.output += token.suffix;
1556
+ }
1557
+ }
1558
+ }
1559
+ return state;
1560
+ };
1561
+ parse.fastpaths = (input, options) => {
1562
+ const opts = { ...options };
1563
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
1564
+ const len = input.length;
1565
+ if (len > max) {
1566
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
1567
+ }
1568
+ input = REPLACEMENTS[input] || input;
1569
+ const {
1570
+ DOT_LITERAL,
1571
+ SLASH_LITERAL,
1572
+ ONE_CHAR,
1573
+ DOTS_SLASH,
1574
+ NO_DOT,
1575
+ NO_DOTS,
1576
+ NO_DOTS_SLASH,
1577
+ STAR,
1578
+ START_ANCHOR
1579
+ } = constants.globChars(opts.windows);
1580
+ const nodot = opts.dot ? NO_DOTS : NO_DOT;
1581
+ const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
1582
+ const capture = opts.capture ? "" : "?:";
1583
+ const state = { negated: false, prefix: "" };
1584
+ let star = opts.bash === true ? ".*?" : STAR;
1585
+ if (opts.capture) {
1586
+ star = `(${star})`;
1587
+ }
1588
+ const globstar = (opts2) => {
1589
+ if (opts2.noglobstar === true) return star;
1590
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
1591
+ };
1592
+ const create = (str) => {
1593
+ switch (str) {
1594
+ case "*":
1595
+ return `${nodot}${ONE_CHAR}${star}`;
1596
+ case ".*":
1597
+ return `${DOT_LITERAL}${ONE_CHAR}${star}`;
1598
+ case "*.*":
1599
+ return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
1600
+ case "*/*":
1601
+ return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
1602
+ case "**":
1603
+ return nodot + globstar(opts);
1604
+ case "**/*":
1605
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
1606
+ case "**/*.*":
1607
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
1608
+ case "**/.*":
1609
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
1610
+ default: {
1611
+ const match = /^(.*?)\.(\w+)$/.exec(str);
1612
+ if (!match) return;
1613
+ const source2 = create(match[1]);
1614
+ if (!source2) return;
1615
+ return source2 + DOT_LITERAL + match[2];
1616
+ }
1617
+ }
1618
+ };
1619
+ const output = utils.removePrefix(input, state);
1620
+ let source = create(output);
1621
+ if (source && opts.strictSlashes !== true) {
1622
+ source += `${SLASH_LITERAL}?`;
1623
+ }
1624
+ return source;
1625
+ };
1626
+ module.exports = parse;
1627
+ }
1628
+ });
1629
+
1630
+ // node_modules/.bun/picomatch@4.0.7/node_modules/picomatch/lib/picomatch.js
1631
+ var require_picomatch = __commonJS({
1632
+ "node_modules/.bun/picomatch@4.0.7/node_modules/picomatch/lib/picomatch.js"(exports, module) {
1633
+ "use strict";
1634
+ init_define_TACK_BUILD_INFO();
1635
+ var scan = require_scan();
1636
+ var parse = require_parse();
1637
+ var utils = require_utils();
1638
+ var constants = require_constants();
1639
+ var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
1640
+ var picomatch = (glob, options, returnState = false) => {
1641
+ if (Array.isArray(glob)) {
1642
+ const fns = glob.map((input) => picomatch(input, options, returnState));
1643
+ const arrayMatcher = (str) => {
1644
+ for (const isMatch of fns) {
1645
+ const state2 = isMatch(str);
1646
+ if (state2) return state2;
1647
+ }
1648
+ return false;
1649
+ };
1650
+ return arrayMatcher;
1651
+ }
1652
+ const isState = isObject(glob) && glob.tokens && glob.input;
1653
+ if (glob === "" || typeof glob !== "string" && !isState) {
1654
+ throw new TypeError("Expected pattern to be a non-empty string");
1655
+ }
1656
+ const opts = options || {};
1657
+ const posix = opts.windows;
1658
+ const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
1659
+ const state = regex.state;
1660
+ delete regex.state;
1661
+ let isIgnored = () => false;
1662
+ if (opts.ignore) {
1663
+ const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
1664
+ isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
1665
+ }
1666
+ const matcher = (input, returnObject = false) => {
1667
+ const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
1668
+ const result = { glob, state, regex, posix, input, output, match, isMatch };
1669
+ if (typeof opts.onResult === "function") {
1670
+ opts.onResult(result);
1671
+ }
1672
+ if (isMatch === false) {
1673
+ result.isMatch = false;
1674
+ return returnObject ? result : false;
1675
+ }
1676
+ if (isIgnored(input)) {
1677
+ if (typeof opts.onIgnore === "function") {
1678
+ opts.onIgnore(result);
1679
+ }
1680
+ result.isMatch = false;
1681
+ return returnObject ? result : false;
1682
+ }
1683
+ if (typeof opts.onMatch === "function") {
1684
+ opts.onMatch(result);
1685
+ }
1686
+ return returnObject ? result : true;
1687
+ };
1688
+ if (returnState) {
1689
+ matcher.state = state;
1690
+ }
1691
+ return matcher;
1692
+ };
1693
+ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
1694
+ if (typeof input !== "string") {
1695
+ throw new TypeError("Expected input to be a string");
1696
+ }
1697
+ if (input === "") {
1698
+ return { isMatch: false, output: "" };
1699
+ }
1700
+ const opts = options || {};
1701
+ const format = opts.format || (posix ? utils.toPosixSlashes : null);
1702
+ let match = input === glob;
1703
+ let output = match && format ? format(input) : input;
1704
+ if (match === false) {
1705
+ output = format ? format(input) : input;
1706
+ match = output === glob;
1707
+ }
1708
+ if (match === false || opts.capture === true) {
1709
+ if (opts.matchBase === true || opts.basename === true) {
1710
+ match = picomatch.matchBase(input, regex, options, posix);
1711
+ } else {
1712
+ match = regex.exec(output);
1713
+ }
1714
+ }
1715
+ return { isMatch: Boolean(match), match, output };
1716
+ };
1717
+ picomatch.matchBase = (input, glob, options, posix = options && options.windows) => {
1718
+ const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
1719
+ return regex.test(utils.basename(input, { windows: posix }));
1720
+ };
1721
+ picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
1722
+ picomatch.parse = (pattern, options) => {
1723
+ if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
1724
+ return parse(pattern, { ...options, fastpaths: false });
1725
+ };
1726
+ picomatch.scan = (input, options) => scan(input, options);
1727
+ picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
1728
+ if (returnOutput === true) {
1729
+ return state.output;
1730
+ }
1731
+ const opts = options || {};
1732
+ const prepend = opts.contains ? "" : "^";
1733
+ const append = opts.contains ? "" : "$";
1734
+ let source = `${prepend}(?:${state.output})${append}`;
1735
+ if (state && state.negated === true) {
1736
+ source = `^(?!${source}).*$`;
1737
+ }
1738
+ const regex = picomatch.toRegex(source, options);
1739
+ if (returnState === true) {
1740
+ regex.state = state;
1741
+ }
1742
+ return regex;
1743
+ };
1744
+ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
1745
+ if (!input || typeof input !== "string") {
1746
+ throw new TypeError("Expected a non-empty string");
1747
+ }
1748
+ let parsed = { negated: false, fastpaths: true };
1749
+ if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
1750
+ parsed.output = parse.fastpaths(input, options);
1751
+ }
1752
+ if (!parsed.output) {
1753
+ parsed = parse(input, options);
1754
+ }
1755
+ return picomatch.compileRe(parsed, options, returnOutput, returnState);
1756
+ };
1757
+ picomatch.toRegex = (source, options) => {
1758
+ try {
1759
+ const opts = options || {};
1760
+ return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
1761
+ } catch (err) {
1762
+ if (options && options.debug === true) throw err;
1763
+ return /$^/;
1764
+ }
1765
+ };
1766
+ picomatch.constants = constants;
1767
+ module.exports = picomatch;
1768
+ }
1769
+ });
1770
+
1771
+ // node_modules/.bun/picomatch@4.0.7/node_modules/picomatch/index.js
1772
+ var require_picomatch2 = __commonJS({
1773
+ "node_modules/.bun/picomatch@4.0.7/node_modules/picomatch/index.js"(exports, module) {
1774
+ "use strict";
1775
+ init_define_TACK_BUILD_INFO();
1776
+ var pico = require_picomatch();
1777
+ var utils = require_utils();
1778
+ function picomatch(glob, options, returnState = false) {
1779
+ if (options && (options.windows === null || options.windows === void 0)) {
1780
+ options = { ...options, windows: utils.isWindows() };
1781
+ }
1782
+ return pico(glob, options, returnState);
1783
+ }
1784
+ Object.assign(picomatch, pico);
1785
+ module.exports = picomatch;
1786
+ }
1787
+ });
1788
+
1789
+ export {
1790
+ require_picomatch2 as require_picomatch
1791
+ };