@abaplint/transpiler-cli 2.13.77 → 2.13.78

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 (2) hide show
  1. package/build/bundle.js +379 -3736
  2. package/package.json +9 -9
package/build/bundle.js CHANGED
@@ -138,7 +138,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
138
138
  exports.FileOperations = void 0;
139
139
  const fs = __importStar(__webpack_require__(/*! fs */ "fs"));
140
140
  const path = __importStar(__webpack_require__(/*! path */ "path"));
141
- const glob = __importStar(__webpack_require__(/*! glob */ "./node_modules/glob/glob.js"));
141
+ const glob = __importStar(__webpack_require__(/*! glob */ "./node_modules/glob/dist/commonjs/index.min.js"));
142
142
  const p_limit_1 = __importDefault(__webpack_require__(/*! p-limit */ "./node_modules/p-limit/index.js"));
143
143
  const os = __importStar(__webpack_require__(/*! node:os */ "node:os"));
144
144
  const fsPromises = __importStar(__webpack_require__(/*! node:fs/promises */ "node:fs/promises"));
@@ -181,7 +181,7 @@ class FileOperations {
181
181
  const folders = Array.isArray(config.input_folder) ? config.input_folder : [config.input_folder];
182
182
  const filesToRead = [];
183
183
  for (const folder of folders) {
184
- for (const filename of glob.sync(folder + "/**", { nosort: true, nodir: true })) {
184
+ for (const filename of glob.sync(folder + "/**", { nodir: true })) {
185
185
  if (inputFilters.length > 0 && inputFilters.some(a => a.test(filename)) === false) {
186
186
  skipped++;
187
187
  continue;
@@ -278,7 +278,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
278
278
  Object.defineProperty(exports, "__esModule", ({ value: true }));
279
279
  const fs = __importStar(__webpack_require__(/*! fs */ "fs"));
280
280
  const path = __importStar(__webpack_require__(/*! path */ "path"));
281
- const glob = __importStar(__webpack_require__(/*! glob */ "./node_modules/glob/glob.js"));
281
+ const glob = __importStar(__webpack_require__(/*! glob */ "./node_modules/glob/dist/commonjs/index.min.js"));
282
282
  const childProcess = __importStar(__webpack_require__(/*! child_process */ "child_process"));
283
283
  const os = __importStar(__webpack_require__(/*! os */ "os"));
284
284
  const module_1 = __webpack_require__(/*! module */ "module");
@@ -327,7 +327,7 @@ async function loadLib(config) {
327
327
  const excludeFilters = (lib.exclude_filter ?? []).map(pattern => new RegExp(pattern, "i"));
328
328
  const filesToRead = [];
329
329
  for (const pattern of patterns) {
330
- for (const filename of glob.sync(dir + pattern, { nosort: true, nodir: true })) {
330
+ for (const filename of glob.sync(dir + pattern, { nodir: true })) {
331
331
  if (filename.endsWith(".clas.testclasses.abap")) {
332
332
  continue;
333
333
  }
@@ -20766,7 +20766,7 @@ class Write {
20766
20766
  const to = (0, combi_1.seq)("TO", expressions_1.Target);
20767
20767
  const options = (0, combi_1.per)(mask, to, (0, combi_1.seq)("EXPONENT", expressions_1.Source), "NO-GROUPING", "NO-ZERO", "CENTERED", (0, combi_1.seq)("INPUT", (0, combi_1.opt)(onOff)), "NO-GAP", "LEFT-JUSTIFIED", as, (0, combi_1.seq)("FRAMES", onOff), (0, combi_1.seq)("HOTSPOT", (0, combi_1.opt)(onOff)), "RIGHT-JUSTIFIED", (0, combi_1.seq)("TIME ZONE", expressions_1.Source), (0, combi_1.seq)("UNDER", expressions_1.Source), (0, combi_1.seq)("STYLE", expressions_1.Source), (0, combi_1.seq)("ROUND", expressions_1.Source), (0, combi_1.seq)("QUICKINFO", expressions_1.Source), "ENVIRONMENT TIME FORMAT", dateFormat, (0, combi_1.seq)("UNIT", expressions_1.Source), (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(onOff)), (0, combi_1.seq)("INDEX", expressions_1.Source), (0, combi_1.seq)("DECIMALS", expressions_1.Source), (0, combi_1.seq)("INVERSE", (0, combi_1.opt)(onOff)), expressions_1.Color, (0, combi_1.seq)("CURRENCY", expressions_1.Source), "RESET", "NO-SIGN");
20768
20768
  // Need to refactor all this sometime,
20769
- const ret = (0, combi_1.seq)("WRITE", (0, combi_1.alt)((0, combi_1.seq)("AT /", (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)("NO-GAP")), (0, combi_1.seq)((0, combi_1.opt)(expressions_1.WriteOffsetLength), (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic, "/"), (0, combi_1.opt)(options))));
20769
+ const ret = (0, combi_1.seq)("WRITE", (0, combi_1.alt)((0, combi_1.seq)("AT /", (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)(options)), (0, combi_1.seq)((0, combi_1.opt)(expressions_1.WriteOffsetLength), (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic, "/"), (0, combi_1.opt)(options))));
20770
20770
  return (0, combi_1.verNotLang)(version_1.LanguageVersion.Cloud, ret);
20771
20771
  }
20772
20772
  }
@@ -54355,6 +54355,7 @@ const basic_1 = __webpack_require__(/*! ../abap/types/basic */ "./node_modules/@
54355
54355
  const ddic_1 = __webpack_require__(/*! ../ddic */ "./node_modules/@abaplint/core/build/src/ddic.js");
54356
54356
  class CDSDetermineTypes {
54357
54357
  parseType(reg, parsedData, ddlsName) {
54358
+ var _a;
54358
54359
  const ddic = new ddic_1.DDIC(reg);
54359
54360
  if ((parsedData === null || parsedData === void 0 ? void 0 : parsedData.fields.length) === 0) {
54360
54361
  return basic_1.VoidType.get("DDLS:todo");
@@ -54391,10 +54392,11 @@ class CDSDetermineTypes {
54391
54392
  });
54392
54393
  continue;
54393
54394
  }
54395
+ const nameInSource = (_a = f.nameInSource) !== null && _a !== void 0 ? _a : f.name;
54394
54396
  const lookup = ddic.lookupTableOrView(source.name);
54395
54397
  if (lookup.type) {
54396
54398
  if (lookup.type instanceof basic_1.StructureType) {
54397
- const type = lookup.type.getComponentByName(f.name);
54399
+ const type = lookup.type.getComponentByName(nameInSource);
54398
54400
  if (type) {
54399
54401
  components.push({
54400
54402
  name: f.name,
@@ -54404,7 +54406,7 @@ class CDSDetermineTypes {
54404
54406
  else {
54405
54407
  components.push({
54406
54408
  name: f.name,
54407
- type: new basic_1.UnknownType(f.name + " not found in " + source.name + ", CDSDetermineTypes"),
54409
+ type: new basic_1.UnknownType(nameInSource + " not found in " + source.name + ", CDSDetermineTypes"),
54408
54410
  });
54409
54411
  }
54410
54412
  }
@@ -63227,19 +63229,18 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
63227
63229
  }
63228
63230
  for (const e of (expr === null || expr === void 0 ? void 0 : expr.findDirectExpressions(expressions_1.CDSElement)) || []) {
63229
63231
  let prefix = "";
63232
+ let nameInSource = undefined;
63230
63233
  let found = (_a = e.findDirectExpression(expressions_1.CDSAs)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.CDSName);
63231
- if (found === undefined) {
63232
- const list = (_b = e.findDirectExpression(expressions_1.CDSPrefixedName)) === null || _b === void 0 ? void 0 : _b.findAllExpressions(expressions_1.CDSName);
63233
- if (list) {
63234
- if (e.concatTokens().toUpperCase().includes(" REDIRECTED TO ")) {
63235
- found = list[0];
63236
- }
63237
- else {
63238
- found = list[list.length - 1];
63239
- if (list.length > 1) {
63240
- prefix = list[0].concatTokens();
63241
- }
63242
- }
63234
+ const list = (_b = e.findDirectExpression(expressions_1.CDSPrefixedName)) === null || _b === void 0 ? void 0 : _b.findAllExpressions(expressions_1.CDSName);
63235
+ if (list !== undefined) {
63236
+ const redirected = list.length > 1 && e.concatTokens().toUpperCase().includes(" REDIRECTED TO ");
63237
+ if (list.length > 1 && redirected === false) {
63238
+ // "prefix.field" is looked up as "field" in "prefix", also when aliased via "as"
63239
+ prefix = list[0].concatTokens();
63240
+ nameInSource = list[list.length - 1].concatTokens();
63241
+ }
63242
+ if (found === undefined) {
63243
+ found = redirected === true ? list[0] : list[list.length - 1];
63243
63244
  }
63244
63245
  }
63245
63246
  if (found === undefined) {
@@ -63261,6 +63262,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
63261
63262
  }
63262
63263
  this.parsedData.fields.push({
63263
63264
  name: name,
63265
+ nameInSource: nameInSource,
63264
63266
  annotations: annotations,
63265
63267
  prefix: prefix,
63266
63268
  key: e.findDirectTokenByText("KEY") !== undefined,
@@ -70626,7 +70628,7 @@ class Registry {
70626
70628
  }
70627
70629
  static abaplintVersion() {
70628
70630
  // magic, see build script "version.js"
70629
- return "2.120.42";
70631
+ return "2.120.43";
70630
70632
  }
70631
70633
  getDDICReferences() {
70632
70634
  return this.ddicReferences;
@@ -100536,6 +100538,8 @@ class XMLConsistencyConf extends _basic_rule_config_1.BasicRuleConfig {
100536
100538
  super(...arguments);
100537
100539
  /** Problem severity for text and translation length checks */
100538
100540
  this.textAndTranslationLengthSeverity = severity_1.Severity.Error;
100541
+ /** Problem severity for data element(DTEL) field checks */
100542
+ this.dataElementSeverity = severity_1.Severity.Error;
100539
100543
  }
100540
100544
  }
100541
100545
  exports.XMLConsistencyConf = XMLConsistencyConf;
@@ -100744,7 +100748,7 @@ class XMLConsistency {
100744
100748
  }
100745
100749
  checkRequiredField(file, fieldName, value) {
100746
100750
  if (value === undefined || value === "") {
100747
- return issue_1.Issue.atRow(file, 1, `Missing required field ${fieldName} in DD04V`, this.getMetadata().key, this.conf.severity);
100751
+ return issue_1.Issue.atRow(file, 1, `Missing required field ${fieldName} in DD04V`, this.getMetadata().key, this.conf.dataElementSeverity);
100748
100752
  }
100749
100753
  return undefined;
100750
100754
  }
@@ -124036,3540 +124040,6 @@ class Validation {
124036
124040
  exports.Validation = Validation;
124037
124041
  //# sourceMappingURL=validation.js.map
124038
124042
 
124039
- /***/ },
124040
-
124041
- /***/ "./node_modules/balanced-match/index.js"
124042
- /*!**********************************************!*\
124043
- !*** ./node_modules/balanced-match/index.js ***!
124044
- \**********************************************/
124045
- (module) {
124046
-
124047
- "use strict";
124048
-
124049
- module.exports = balanced;
124050
- function balanced(a, b, str) {
124051
- if (a instanceof RegExp) a = maybeMatch(a, str);
124052
- if (b instanceof RegExp) b = maybeMatch(b, str);
124053
-
124054
- var r = range(a, b, str);
124055
-
124056
- return r && {
124057
- start: r[0],
124058
- end: r[1],
124059
- pre: str.slice(0, r[0]),
124060
- body: str.slice(r[0] + a.length, r[1]),
124061
- post: str.slice(r[1] + b.length)
124062
- };
124063
- }
124064
-
124065
- function maybeMatch(reg, str) {
124066
- var m = str.match(reg);
124067
- return m ? m[0] : null;
124068
- }
124069
-
124070
- balanced.range = range;
124071
- function range(a, b, str) {
124072
- var begs, beg, left, right, result;
124073
- var ai = str.indexOf(a);
124074
- var bi = str.indexOf(b, ai + 1);
124075
- var i = ai;
124076
-
124077
- if (ai >= 0 && bi > 0) {
124078
- if(a===b) {
124079
- return [ai, bi];
124080
- }
124081
- begs = [];
124082
- left = str.length;
124083
-
124084
- while (i >= 0 && !result) {
124085
- if (i == ai) {
124086
- begs.push(i);
124087
- ai = str.indexOf(a, i + 1);
124088
- } else if (begs.length == 1) {
124089
- result = [ begs.pop(), bi ];
124090
- } else {
124091
- beg = begs.pop();
124092
- if (beg < left) {
124093
- left = beg;
124094
- right = bi;
124095
- }
124096
-
124097
- bi = str.indexOf(b, i + 1);
124098
- }
124099
-
124100
- i = ai < bi && ai >= 0 ? ai : bi;
124101
- }
124102
-
124103
- if (begs.length) {
124104
- result = [ left, right ];
124105
- }
124106
- }
124107
-
124108
- return result;
124109
- }
124110
-
124111
-
124112
- /***/ },
124113
-
124114
- /***/ "./node_modules/brace-expansion/index.js"
124115
- /*!***********************************************!*\
124116
- !*** ./node_modules/brace-expansion/index.js ***!
124117
- \***********************************************/
124118
- (module, __unused_webpack_exports, __webpack_require__) {
124119
-
124120
- var concatMap = __webpack_require__(/*! concat-map */ "./node_modules/concat-map/index.js");
124121
- var balanced = __webpack_require__(/*! balanced-match */ "./node_modules/balanced-match/index.js");
124122
-
124123
- module.exports = expandTop;
124124
-
124125
- var escSlash = '\0SLASH'+Math.random()+'\0';
124126
- var escOpen = '\0OPEN'+Math.random()+'\0';
124127
- var escClose = '\0CLOSE'+Math.random()+'\0';
124128
- var escComma = '\0COMMA'+Math.random()+'\0';
124129
- var escPeriod = '\0PERIOD'+Math.random()+'\0';
124130
-
124131
- function numeric(str) {
124132
- return parseInt(str, 10) == str
124133
- ? parseInt(str, 10)
124134
- : str.charCodeAt(0);
124135
- }
124136
-
124137
- function escapeBraces(str) {
124138
- return str.split('\\\\').join(escSlash)
124139
- .split('\\{').join(escOpen)
124140
- .split('\\}').join(escClose)
124141
- .split('\\,').join(escComma)
124142
- .split('\\.').join(escPeriod);
124143
- }
124144
-
124145
- function unescapeBraces(str) {
124146
- return str.split(escSlash).join('\\')
124147
- .split(escOpen).join('{')
124148
- .split(escClose).join('}')
124149
- .split(escComma).join(',')
124150
- .split(escPeriod).join('.');
124151
- }
124152
-
124153
-
124154
- // Basically just str.split(","), but handling cases
124155
- // where we have nested braced sections, which should be
124156
- // treated as individual members, like {a,{b,c},d}
124157
- function parseCommaParts(str) {
124158
- if (!str)
124159
- return [''];
124160
-
124161
- var parts = [];
124162
- var m = balanced('{', '}', str);
124163
-
124164
- if (!m)
124165
- return str.split(',');
124166
-
124167
- var pre = m.pre;
124168
- var body = m.body;
124169
- var post = m.post;
124170
- var p = pre.split(',');
124171
-
124172
- p[p.length-1] += '{' + body + '}';
124173
- var postParts = parseCommaParts(post);
124174
- if (post.length) {
124175
- p[p.length-1] += postParts.shift();
124176
- p.push.apply(p, postParts);
124177
- }
124178
-
124179
- parts.push.apply(parts, p);
124180
-
124181
- return parts;
124182
- }
124183
-
124184
- function expandTop(str, options) {
124185
- if (!str)
124186
- return [];
124187
-
124188
- options = options || {};
124189
- var max = options.max == null ? Infinity : options.max;
124190
-
124191
- // I don't know why Bash 4.3 does this, but it does.
124192
- // Anything starting with {} will have the first two bytes preserved
124193
- // but *only* at the top level, so {},a}b will not expand to anything,
124194
- // but a{},b}c will be expanded to [a}c,abc].
124195
- // One could argue that this is a bug in Bash, but since the goal of
124196
- // this module is to match Bash's rules, we escape a leading {}
124197
- if (str.substr(0, 2) === '{}') {
124198
- str = '\\{\\}' + str.substr(2);
124199
- }
124200
-
124201
- return expand(escapeBraces(str), max, true).map(unescapeBraces);
124202
- }
124203
-
124204
- function identity(e) {
124205
- return e;
124206
- }
124207
-
124208
- function embrace(str) {
124209
- return '{' + str + '}';
124210
- }
124211
- function isPadded(el) {
124212
- return /^-?0\d/.test(el);
124213
- }
124214
-
124215
- function lte(i, y) {
124216
- return i <= y;
124217
- }
124218
- function gte(i, y) {
124219
- return i >= y;
124220
- }
124221
-
124222
- function expand(str, max, isTop) {
124223
- var expansions = [];
124224
-
124225
- var m = balanced('{', '}', str);
124226
- if (!m || /\$$/.test(m.pre)) return [str];
124227
-
124228
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
124229
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
124230
- var isSequence = isNumericSequence || isAlphaSequence;
124231
- var isOptions = m.body.indexOf(',') >= 0;
124232
- if (!isSequence && !isOptions) {
124233
- // {a},b}
124234
- if (m.post.match(/,(?!,).*\}/)) {
124235
- str = m.pre + '{' + m.body + escClose + m.post;
124236
- return expand(str, max, true);
124237
- }
124238
- return [str];
124239
- }
124240
-
124241
- var n;
124242
- if (isSequence) {
124243
- n = m.body.split(/\.\./);
124244
- } else {
124245
- n = parseCommaParts(m.body);
124246
- if (n.length === 1) {
124247
- // x{{a,b}}y ==> x{a}y x{b}y
124248
- n = expand(n[0], max, false).map(embrace);
124249
- if (n.length === 1) {
124250
- var post = m.post.length
124251
- ? expand(m.post, max, false)
124252
- : [''];
124253
- return post.map(function(p) {
124254
- return m.pre + n[0] + p;
124255
- });
124256
- }
124257
- }
124258
- }
124259
-
124260
- // at this point, n is the parts, and we know it's not a comma set
124261
- // with a single entry.
124262
-
124263
- // no need to expand pre, since it is guaranteed to be free of brace-sets
124264
- var pre = m.pre;
124265
- var post = m.post.length
124266
- ? expand(m.post, max, false)
124267
- : [''];
124268
-
124269
- var N;
124270
-
124271
- if (isSequence) {
124272
- var x = numeric(n[0]);
124273
- var y = numeric(n[1]);
124274
- var width = Math.max(n[0].length, n[1].length)
124275
- var incr = n.length == 3
124276
- ? Math.max(Math.abs(numeric(n[2])), 1)
124277
- : 1;
124278
- var test = lte;
124279
- var reverse = y < x;
124280
- if (reverse) {
124281
- incr *= -1;
124282
- test = gte;
124283
- }
124284
- var pad = n.some(isPadded);
124285
-
124286
- N = [];
124287
-
124288
- for (var i = x; test(i, y) && N.length < max; i += incr) {
124289
- var c;
124290
- if (isAlphaSequence) {
124291
- c = String.fromCharCode(i);
124292
- if (c === '\\')
124293
- c = '';
124294
- } else {
124295
- c = String(i);
124296
- if (pad) {
124297
- var need = width - c.length;
124298
- if (need > 0) {
124299
- var z = new Array(need + 1).join('0');
124300
- if (i < 0)
124301
- c = '-' + z + c.slice(1);
124302
- else
124303
- c = z + c;
124304
- }
124305
- }
124306
- }
124307
- N.push(c);
124308
- }
124309
- } else {
124310
- N = concatMap(n, function(el) { return expand(el, max, false) });
124311
- }
124312
-
124313
- for (var j = 0; j < N.length; j++) {
124314
- for (var k = 0; k < post.length && expansions.length < max; k++) {
124315
- var expansion = pre + N[j] + post[k];
124316
- if (!isTop || isSequence || expansion)
124317
- expansions.push(expansion);
124318
- }
124319
- }
124320
-
124321
- return expansions;
124322
- }
124323
-
124324
-
124325
- /***/ },
124326
-
124327
- /***/ "./node_modules/concat-map/index.js"
124328
- /*!******************************************!*\
124329
- !*** ./node_modules/concat-map/index.js ***!
124330
- \******************************************/
124331
- (module) {
124332
-
124333
- module.exports = function (xs, fn) {
124334
- var res = [];
124335
- for (var i = 0; i < xs.length; i++) {
124336
- var x = fn(xs[i], i);
124337
- if (isArray(x)) res.push.apply(res, x);
124338
- else res.push(x);
124339
- }
124340
- return res;
124341
- };
124342
-
124343
- var isArray = Array.isArray || function (xs) {
124344
- return Object.prototype.toString.call(xs) === '[object Array]';
124345
- };
124346
-
124347
-
124348
- /***/ },
124349
-
124350
- /***/ "./node_modules/fs.realpath/index.js"
124351
- /*!*******************************************!*\
124352
- !*** ./node_modules/fs.realpath/index.js ***!
124353
- \*******************************************/
124354
- (module, __unused_webpack_exports, __webpack_require__) {
124355
-
124356
- module.exports = realpath
124357
- realpath.realpath = realpath
124358
- realpath.sync = realpathSync
124359
- realpath.realpathSync = realpathSync
124360
- realpath.monkeypatch = monkeypatch
124361
- realpath.unmonkeypatch = unmonkeypatch
124362
-
124363
- var fs = __webpack_require__(/*! fs */ "fs")
124364
- var origRealpath = fs.realpath
124365
- var origRealpathSync = fs.realpathSync
124366
-
124367
- var version = process.version
124368
- var ok = /^v[0-5]\./.test(version)
124369
- var old = __webpack_require__(/*! ./old.js */ "./node_modules/fs.realpath/old.js")
124370
-
124371
- function newError (er) {
124372
- return er && er.syscall === 'realpath' && (
124373
- er.code === 'ELOOP' ||
124374
- er.code === 'ENOMEM' ||
124375
- er.code === 'ENAMETOOLONG'
124376
- )
124377
- }
124378
-
124379
- function realpath (p, cache, cb) {
124380
- if (ok) {
124381
- return origRealpath(p, cache, cb)
124382
- }
124383
-
124384
- if (typeof cache === 'function') {
124385
- cb = cache
124386
- cache = null
124387
- }
124388
- origRealpath(p, cache, function (er, result) {
124389
- if (newError(er)) {
124390
- old.realpath(p, cache, cb)
124391
- } else {
124392
- cb(er, result)
124393
- }
124394
- })
124395
- }
124396
-
124397
- function realpathSync (p, cache) {
124398
- if (ok) {
124399
- return origRealpathSync(p, cache)
124400
- }
124401
-
124402
- try {
124403
- return origRealpathSync(p, cache)
124404
- } catch (er) {
124405
- if (newError(er)) {
124406
- return old.realpathSync(p, cache)
124407
- } else {
124408
- throw er
124409
- }
124410
- }
124411
- }
124412
-
124413
- function monkeypatch () {
124414
- fs.realpath = realpath
124415
- fs.realpathSync = realpathSync
124416
- }
124417
-
124418
- function unmonkeypatch () {
124419
- fs.realpath = origRealpath
124420
- fs.realpathSync = origRealpathSync
124421
- }
124422
-
124423
-
124424
- /***/ },
124425
-
124426
- /***/ "./node_modules/fs.realpath/old.js"
124427
- /*!*****************************************!*\
124428
- !*** ./node_modules/fs.realpath/old.js ***!
124429
- \*****************************************/
124430
- (__unused_webpack_module, exports, __webpack_require__) {
124431
-
124432
- // Copyright Joyent, Inc. and other Node contributors.
124433
- //
124434
- // Permission is hereby granted, free of charge, to any person obtaining a
124435
- // copy of this software and associated documentation files (the
124436
- // "Software"), to deal in the Software without restriction, including
124437
- // without limitation the rights to use, copy, modify, merge, publish,
124438
- // distribute, sublicense, and/or sell copies of the Software, and to permit
124439
- // persons to whom the Software is furnished to do so, subject to the
124440
- // following conditions:
124441
- //
124442
- // The above copyright notice and this permission notice shall be included
124443
- // in all copies or substantial portions of the Software.
124444
- //
124445
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
124446
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
124447
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
124448
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
124449
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
124450
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
124451
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
124452
-
124453
- var pathModule = __webpack_require__(/*! path */ "path");
124454
- var isWindows = process.platform === 'win32';
124455
- var fs = __webpack_require__(/*! fs */ "fs");
124456
-
124457
- // JavaScript implementation of realpath, ported from node pre-v6
124458
-
124459
- var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
124460
-
124461
- function rethrow() {
124462
- // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and
124463
- // is fairly slow to generate.
124464
- var callback;
124465
- if (DEBUG) {
124466
- var backtrace = new Error;
124467
- callback = debugCallback;
124468
- } else
124469
- callback = missingCallback;
124470
-
124471
- return callback;
124472
-
124473
- function debugCallback(err) {
124474
- if (err) {
124475
- backtrace.message = err.message;
124476
- err = backtrace;
124477
- missingCallback(err);
124478
- }
124479
- }
124480
-
124481
- function missingCallback(err) {
124482
- if (err) {
124483
- if (process.throwDeprecation)
124484
- throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
124485
- else if (!process.noDeprecation) {
124486
- var msg = 'fs: missing callback ' + (err.stack || err.message);
124487
- if (process.traceDeprecation)
124488
- console.trace(msg);
124489
- else
124490
- console.error(msg);
124491
- }
124492
- }
124493
- }
124494
- }
124495
-
124496
- function maybeCallback(cb) {
124497
- return typeof cb === 'function' ? cb : rethrow();
124498
- }
124499
-
124500
- var normalize = pathModule.normalize;
124501
-
124502
- // Regexp that finds the next partion of a (partial) path
124503
- // result is [base_with_slash, base], e.g. ['somedir/', 'somedir']
124504
- if (isWindows) {
124505
- var nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
124506
- } else {
124507
- var nextPartRe = /(.*?)(?:[\/]+|$)/g;
124508
- }
124509
-
124510
- // Regex to find the device root, including trailing slash. E.g. 'c:\\'.
124511
- if (isWindows) {
124512
- var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
124513
- } else {
124514
- var splitRootRe = /^[\/]*/;
124515
- }
124516
-
124517
- exports.realpathSync = function realpathSync(p, cache) {
124518
- // make p is absolute
124519
- p = pathModule.resolve(p);
124520
-
124521
- if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
124522
- return cache[p];
124523
- }
124524
-
124525
- var original = p,
124526
- seenLinks = {},
124527
- knownHard = {};
124528
-
124529
- // current character position in p
124530
- var pos;
124531
- // the partial path so far, including a trailing slash if any
124532
- var current;
124533
- // the partial path without a trailing slash (except when pointing at a root)
124534
- var base;
124535
- // the partial path scanned in the previous round, with slash
124536
- var previous;
124537
-
124538
- start();
124539
-
124540
- function start() {
124541
- // Skip over roots
124542
- var m = splitRootRe.exec(p);
124543
- pos = m[0].length;
124544
- current = m[0];
124545
- base = m[0];
124546
- previous = '';
124547
-
124548
- // On windows, check that the root exists. On unix there is no need.
124549
- if (isWindows && !knownHard[base]) {
124550
- fs.lstatSync(base);
124551
- knownHard[base] = true;
124552
- }
124553
- }
124554
-
124555
- // walk down the path, swapping out linked pathparts for their real
124556
- // values
124557
- // NB: p.length changes.
124558
- while (pos < p.length) {
124559
- // find the next part
124560
- nextPartRe.lastIndex = pos;
124561
- var result = nextPartRe.exec(p);
124562
- previous = current;
124563
- current += result[0];
124564
- base = previous + result[1];
124565
- pos = nextPartRe.lastIndex;
124566
-
124567
- // continue if not a symlink
124568
- if (knownHard[base] || (cache && cache[base] === base)) {
124569
- continue;
124570
- }
124571
-
124572
- var resolvedLink;
124573
- if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
124574
- // some known symbolic link. no need to stat again.
124575
- resolvedLink = cache[base];
124576
- } else {
124577
- var stat = fs.lstatSync(base);
124578
- if (!stat.isSymbolicLink()) {
124579
- knownHard[base] = true;
124580
- if (cache) cache[base] = base;
124581
- continue;
124582
- }
124583
-
124584
- // read the link if it wasn't read before
124585
- // dev/ino always return 0 on windows, so skip the check.
124586
- var linkTarget = null;
124587
- if (!isWindows) {
124588
- var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
124589
- if (seenLinks.hasOwnProperty(id)) {
124590
- linkTarget = seenLinks[id];
124591
- }
124592
- }
124593
- if (linkTarget === null) {
124594
- fs.statSync(base);
124595
- linkTarget = fs.readlinkSync(base);
124596
- }
124597
- resolvedLink = pathModule.resolve(previous, linkTarget);
124598
- // track this, if given a cache.
124599
- if (cache) cache[base] = resolvedLink;
124600
- if (!isWindows) seenLinks[id] = linkTarget;
124601
- }
124602
-
124603
- // resolve the link, then start over
124604
- p = pathModule.resolve(resolvedLink, p.slice(pos));
124605
- start();
124606
- }
124607
-
124608
- if (cache) cache[original] = p;
124609
-
124610
- return p;
124611
- };
124612
-
124613
-
124614
- exports.realpath = function realpath(p, cache, cb) {
124615
- if (typeof cb !== 'function') {
124616
- cb = maybeCallback(cache);
124617
- cache = null;
124618
- }
124619
-
124620
- // make p is absolute
124621
- p = pathModule.resolve(p);
124622
-
124623
- if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
124624
- return process.nextTick(cb.bind(null, null, cache[p]));
124625
- }
124626
-
124627
- var original = p,
124628
- seenLinks = {},
124629
- knownHard = {};
124630
-
124631
- // current character position in p
124632
- var pos;
124633
- // the partial path so far, including a trailing slash if any
124634
- var current;
124635
- // the partial path without a trailing slash (except when pointing at a root)
124636
- var base;
124637
- // the partial path scanned in the previous round, with slash
124638
- var previous;
124639
-
124640
- start();
124641
-
124642
- function start() {
124643
- // Skip over roots
124644
- var m = splitRootRe.exec(p);
124645
- pos = m[0].length;
124646
- current = m[0];
124647
- base = m[0];
124648
- previous = '';
124649
-
124650
- // On windows, check that the root exists. On unix there is no need.
124651
- if (isWindows && !knownHard[base]) {
124652
- fs.lstat(base, function(err) {
124653
- if (err) return cb(err);
124654
- knownHard[base] = true;
124655
- LOOP();
124656
- });
124657
- } else {
124658
- process.nextTick(LOOP);
124659
- }
124660
- }
124661
-
124662
- // walk down the path, swapping out linked pathparts for their real
124663
- // values
124664
- function LOOP() {
124665
- // stop if scanned past end of path
124666
- if (pos >= p.length) {
124667
- if (cache) cache[original] = p;
124668
- return cb(null, p);
124669
- }
124670
-
124671
- // find the next part
124672
- nextPartRe.lastIndex = pos;
124673
- var result = nextPartRe.exec(p);
124674
- previous = current;
124675
- current += result[0];
124676
- base = previous + result[1];
124677
- pos = nextPartRe.lastIndex;
124678
-
124679
- // continue if not a symlink
124680
- if (knownHard[base] || (cache && cache[base] === base)) {
124681
- return process.nextTick(LOOP);
124682
- }
124683
-
124684
- if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
124685
- // known symbolic link. no need to stat again.
124686
- return gotResolvedLink(cache[base]);
124687
- }
124688
-
124689
- return fs.lstat(base, gotStat);
124690
- }
124691
-
124692
- function gotStat(err, stat) {
124693
- if (err) return cb(err);
124694
-
124695
- // if not a symlink, skip to the next path part
124696
- if (!stat.isSymbolicLink()) {
124697
- knownHard[base] = true;
124698
- if (cache) cache[base] = base;
124699
- return process.nextTick(LOOP);
124700
- }
124701
-
124702
- // stat & read the link if not read before
124703
- // call gotTarget as soon as the link target is known
124704
- // dev/ino always return 0 on windows, so skip the check.
124705
- if (!isWindows) {
124706
- var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
124707
- if (seenLinks.hasOwnProperty(id)) {
124708
- return gotTarget(null, seenLinks[id], base);
124709
- }
124710
- }
124711
- fs.stat(base, function(err) {
124712
- if (err) return cb(err);
124713
-
124714
- fs.readlink(base, function(err, target) {
124715
- if (!isWindows) seenLinks[id] = target;
124716
- gotTarget(err, target);
124717
- });
124718
- });
124719
- }
124720
-
124721
- function gotTarget(err, target, base) {
124722
- if (err) return cb(err);
124723
-
124724
- var resolvedLink = pathModule.resolve(previous, target);
124725
- if (cache) cache[base] = resolvedLink;
124726
- gotResolvedLink(resolvedLink);
124727
- }
124728
-
124729
- function gotResolvedLink(resolvedLink) {
124730
- // resolve the link, then start over
124731
- p = pathModule.resolve(resolvedLink, p.slice(pos));
124732
- start();
124733
- }
124734
- };
124735
-
124736
-
124737
- /***/ },
124738
-
124739
- /***/ "./node_modules/glob/common.js"
124740
- /*!*************************************!*\
124741
- !*** ./node_modules/glob/common.js ***!
124742
- \*************************************/
124743
- (__unused_webpack_module, exports, __webpack_require__) {
124744
-
124745
- exports.setopts = setopts
124746
- exports.ownProp = ownProp
124747
- exports.makeAbs = makeAbs
124748
- exports.finish = finish
124749
- exports.mark = mark
124750
- exports.isIgnored = isIgnored
124751
- exports.childrenIgnored = childrenIgnored
124752
-
124753
- function ownProp (obj, field) {
124754
- return Object.prototype.hasOwnProperty.call(obj, field)
124755
- }
124756
-
124757
- var fs = __webpack_require__(/*! fs */ "fs")
124758
- var path = __webpack_require__(/*! path */ "path")
124759
- var minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js")
124760
- var isAbsolute = __webpack_require__(/*! path-is-absolute */ "./node_modules/path-is-absolute/index.js")
124761
- var Minimatch = minimatch.Minimatch
124762
-
124763
- function alphasort (a, b) {
124764
- return a.localeCompare(b, 'en')
124765
- }
124766
-
124767
- function setupIgnores (self, options) {
124768
- self.ignore = options.ignore || []
124769
-
124770
- if (!Array.isArray(self.ignore))
124771
- self.ignore = [self.ignore]
124772
-
124773
- if (self.ignore.length) {
124774
- self.ignore = self.ignore.map(ignoreMap)
124775
- }
124776
- }
124777
-
124778
- // ignore patterns are always in dot:true mode.
124779
- function ignoreMap (pattern) {
124780
- var gmatcher = null
124781
- if (pattern.slice(-3) === '/**') {
124782
- var gpattern = pattern.replace(/(\/\*\*)+$/, '')
124783
- gmatcher = new Minimatch(gpattern, { dot: true })
124784
- }
124785
-
124786
- return {
124787
- matcher: new Minimatch(pattern, { dot: true }),
124788
- gmatcher: gmatcher
124789
- }
124790
- }
124791
-
124792
- function setopts (self, pattern, options) {
124793
- if (!options)
124794
- options = {}
124795
-
124796
- // base-matching: just use globstar for that.
124797
- if (options.matchBase && -1 === pattern.indexOf("/")) {
124798
- if (options.noglobstar) {
124799
- throw new Error("base matching requires globstar")
124800
- }
124801
- pattern = "**/" + pattern
124802
- }
124803
-
124804
- self.silent = !!options.silent
124805
- self.pattern = pattern
124806
- self.strict = options.strict !== false
124807
- self.realpath = !!options.realpath
124808
- self.realpathCache = options.realpathCache || Object.create(null)
124809
- self.follow = !!options.follow
124810
- self.dot = !!options.dot
124811
- self.mark = !!options.mark
124812
- self.nodir = !!options.nodir
124813
- if (self.nodir)
124814
- self.mark = true
124815
- self.sync = !!options.sync
124816
- self.nounique = !!options.nounique
124817
- self.nonull = !!options.nonull
124818
- self.nosort = !!options.nosort
124819
- self.nocase = !!options.nocase
124820
- self.stat = !!options.stat
124821
- self.noprocess = !!options.noprocess
124822
- self.absolute = !!options.absolute
124823
- self.fs = options.fs || fs
124824
-
124825
- self.maxLength = options.maxLength || Infinity
124826
- self.cache = options.cache || Object.create(null)
124827
- self.statCache = options.statCache || Object.create(null)
124828
- self.symlinks = options.symlinks || Object.create(null)
124829
-
124830
- setupIgnores(self, options)
124831
-
124832
- self.changedCwd = false
124833
- var cwd = process.cwd()
124834
- if (!ownProp(options, "cwd"))
124835
- self.cwd = cwd
124836
- else {
124837
- self.cwd = path.resolve(options.cwd)
124838
- self.changedCwd = self.cwd !== cwd
124839
- }
124840
-
124841
- self.root = options.root || path.resolve(self.cwd, "/")
124842
- self.root = path.resolve(self.root)
124843
- if (process.platform === "win32")
124844
- self.root = self.root.replace(/\\/g, "/")
124845
-
124846
- // TODO: is an absolute `cwd` supposed to be resolved against `root`?
124847
- // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
124848
- self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)
124849
- if (process.platform === "win32")
124850
- self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
124851
- self.nomount = !!options.nomount
124852
-
124853
- // disable comments and negation in Minimatch.
124854
- // Note that they are not supported in Glob itself anyway.
124855
- options.nonegate = true
124856
- options.nocomment = true
124857
-
124858
- self.minimatch = new Minimatch(pattern, options)
124859
- self.options = self.minimatch.options
124860
- }
124861
-
124862
- function finish (self) {
124863
- var nou = self.nounique
124864
- var all = nou ? [] : Object.create(null)
124865
-
124866
- for (var i = 0, l = self.matches.length; i < l; i ++) {
124867
- var matches = self.matches[i]
124868
- if (!matches || Object.keys(matches).length === 0) {
124869
- if (self.nonull) {
124870
- // do like the shell, and spit out the literal glob
124871
- var literal = self.minimatch.globSet[i]
124872
- if (nou)
124873
- all.push(literal)
124874
- else
124875
- all[literal] = true
124876
- }
124877
- } else {
124878
- // had matches
124879
- var m = Object.keys(matches)
124880
- if (nou)
124881
- all.push.apply(all, m)
124882
- else
124883
- m.forEach(function (m) {
124884
- all[m] = true
124885
- })
124886
- }
124887
- }
124888
-
124889
- if (!nou)
124890
- all = Object.keys(all)
124891
-
124892
- if (!self.nosort)
124893
- all = all.sort(alphasort)
124894
-
124895
- // at *some* point we statted all of these
124896
- if (self.mark) {
124897
- for (var i = 0; i < all.length; i++) {
124898
- all[i] = self._mark(all[i])
124899
- }
124900
- if (self.nodir) {
124901
- all = all.filter(function (e) {
124902
- var notDir = !(/\/$/.test(e))
124903
- var c = self.cache[e] || self.cache[makeAbs(self, e)]
124904
- if (notDir && c)
124905
- notDir = c !== 'DIR' && !Array.isArray(c)
124906
- return notDir
124907
- })
124908
- }
124909
- }
124910
-
124911
- if (self.ignore.length)
124912
- all = all.filter(function(m) {
124913
- return !isIgnored(self, m)
124914
- })
124915
-
124916
- self.found = all
124917
- }
124918
-
124919
- function mark (self, p) {
124920
- var abs = makeAbs(self, p)
124921
- var c = self.cache[abs]
124922
- var m = p
124923
- if (c) {
124924
- var isDir = c === 'DIR' || Array.isArray(c)
124925
- var slash = p.slice(-1) === '/'
124926
-
124927
- if (isDir && !slash)
124928
- m += '/'
124929
- else if (!isDir && slash)
124930
- m = m.slice(0, -1)
124931
-
124932
- if (m !== p) {
124933
- var mabs = makeAbs(self, m)
124934
- self.statCache[mabs] = self.statCache[abs]
124935
- self.cache[mabs] = self.cache[abs]
124936
- }
124937
- }
124938
-
124939
- return m
124940
- }
124941
-
124942
- // lotta situps...
124943
- function makeAbs (self, f) {
124944
- var abs = f
124945
- if (f.charAt(0) === '/') {
124946
- abs = path.join(self.root, f)
124947
- } else if (isAbsolute(f) || f === '') {
124948
- abs = f
124949
- } else if (self.changedCwd) {
124950
- abs = path.resolve(self.cwd, f)
124951
- } else {
124952
- abs = path.resolve(f)
124953
- }
124954
-
124955
- if (process.platform === 'win32')
124956
- abs = abs.replace(/\\/g, '/')
124957
-
124958
- return abs
124959
- }
124960
-
124961
-
124962
- // Return true, if pattern ends with globstar '**', for the accompanying parent directory.
124963
- // Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
124964
- function isIgnored (self, path) {
124965
- if (!self.ignore.length)
124966
- return false
124967
-
124968
- return self.ignore.some(function(item) {
124969
- return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
124970
- })
124971
- }
124972
-
124973
- function childrenIgnored (self, path) {
124974
- if (!self.ignore.length)
124975
- return false
124976
-
124977
- return self.ignore.some(function(item) {
124978
- return !!(item.gmatcher && item.gmatcher.match(path))
124979
- })
124980
- }
124981
-
124982
-
124983
- /***/ },
124984
-
124985
- /***/ "./node_modules/glob/glob.js"
124986
- /*!***********************************!*\
124987
- !*** ./node_modules/glob/glob.js ***!
124988
- \***********************************/
124989
- (module, __unused_webpack_exports, __webpack_require__) {
124990
-
124991
- // Approach:
124992
- //
124993
- // 1. Get the minimatch set
124994
- // 2. For each pattern in the set, PROCESS(pattern, false)
124995
- // 3. Store matches per-set, then uniq them
124996
- //
124997
- // PROCESS(pattern, inGlobStar)
124998
- // Get the first [n] items from pattern that are all strings
124999
- // Join these together. This is PREFIX.
125000
- // If there is no more remaining, then stat(PREFIX) and
125001
- // add to matches if it succeeds. END.
125002
- //
125003
- // If inGlobStar and PREFIX is symlink and points to dir
125004
- // set ENTRIES = []
125005
- // else readdir(PREFIX) as ENTRIES
125006
- // If fail, END
125007
- //
125008
- // with ENTRIES
125009
- // If pattern[n] is GLOBSTAR
125010
- // // handle the case where the globstar match is empty
125011
- // // by pruning it out, and testing the resulting pattern
125012
- // PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
125013
- // // handle other cases.
125014
- // for ENTRY in ENTRIES (not dotfiles)
125015
- // // attach globstar + tail onto the entry
125016
- // // Mark that this entry is a globstar match
125017
- // PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
125018
- //
125019
- // else // not globstar
125020
- // for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
125021
- // Test ENTRY against pattern[n]
125022
- // If fails, continue
125023
- // If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
125024
- //
125025
- // Caveat:
125026
- // Cache all stats and readdirs results to minimize syscall. Since all
125027
- // we ever care about is existence and directory-ness, we can just keep
125028
- // `true` for files, and [children,...] for directories, or `false` for
125029
- // things that don't exist.
125030
-
125031
- module.exports = glob
125032
-
125033
- var rp = __webpack_require__(/*! fs.realpath */ "./node_modules/fs.realpath/index.js")
125034
- var minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js")
125035
- var Minimatch = minimatch.Minimatch
125036
- var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits.js")
125037
- var EE = (__webpack_require__(/*! events */ "events").EventEmitter)
125038
- var path = __webpack_require__(/*! path */ "path")
125039
- var assert = __webpack_require__(/*! assert */ "assert")
125040
- var isAbsolute = __webpack_require__(/*! path-is-absolute */ "./node_modules/path-is-absolute/index.js")
125041
- var globSync = __webpack_require__(/*! ./sync.js */ "./node_modules/glob/sync.js")
125042
- var common = __webpack_require__(/*! ./common.js */ "./node_modules/glob/common.js")
125043
- var setopts = common.setopts
125044
- var ownProp = common.ownProp
125045
- var inflight = __webpack_require__(/*! inflight */ "./node_modules/inflight/inflight.js")
125046
- var util = __webpack_require__(/*! util */ "util")
125047
- var childrenIgnored = common.childrenIgnored
125048
- var isIgnored = common.isIgnored
125049
-
125050
- var once = __webpack_require__(/*! once */ "./node_modules/once/once.js")
125051
-
125052
- function glob (pattern, options, cb) {
125053
- if (typeof options === 'function') cb = options, options = {}
125054
- if (!options) options = {}
125055
-
125056
- if (options.sync) {
125057
- if (cb)
125058
- throw new TypeError('callback provided to sync glob')
125059
- return globSync(pattern, options)
125060
- }
125061
-
125062
- return new Glob(pattern, options, cb)
125063
- }
125064
-
125065
- glob.sync = globSync
125066
- var GlobSync = glob.GlobSync = globSync.GlobSync
125067
-
125068
- // old api surface
125069
- glob.glob = glob
125070
-
125071
- function extend (origin, add) {
125072
- if (add === null || typeof add !== 'object') {
125073
- return origin
125074
- }
125075
-
125076
- var keys = Object.keys(add)
125077
- var i = keys.length
125078
- while (i--) {
125079
- origin[keys[i]] = add[keys[i]]
125080
- }
125081
- return origin
125082
- }
125083
-
125084
- glob.hasMagic = function (pattern, options_) {
125085
- var options = extend({}, options_)
125086
- options.noprocess = true
125087
-
125088
- var g = new Glob(pattern, options)
125089
- var set = g.minimatch.set
125090
-
125091
- if (!pattern)
125092
- return false
125093
-
125094
- if (set.length > 1)
125095
- return true
125096
-
125097
- for (var j = 0; j < set[0].length; j++) {
125098
- if (typeof set[0][j] !== 'string')
125099
- return true
125100
- }
125101
-
125102
- return false
125103
- }
125104
-
125105
- glob.Glob = Glob
125106
- inherits(Glob, EE)
125107
- function Glob (pattern, options, cb) {
125108
- if (typeof options === 'function') {
125109
- cb = options
125110
- options = null
125111
- }
125112
-
125113
- if (options && options.sync) {
125114
- if (cb)
125115
- throw new TypeError('callback provided to sync glob')
125116
- return new GlobSync(pattern, options)
125117
- }
125118
-
125119
- if (!(this instanceof Glob))
125120
- return new Glob(pattern, options, cb)
125121
-
125122
- setopts(this, pattern, options)
125123
- this._didRealPath = false
125124
-
125125
- // process each pattern in the minimatch set
125126
- var n = this.minimatch.set.length
125127
-
125128
- // The matches are stored as {<filename>: true,...} so that
125129
- // duplicates are automagically pruned.
125130
- // Later, we do an Object.keys() on these.
125131
- // Keep them as a list so we can fill in when nonull is set.
125132
- this.matches = new Array(n)
125133
-
125134
- if (typeof cb === 'function') {
125135
- cb = once(cb)
125136
- this.on('error', cb)
125137
- this.on('end', function (matches) {
125138
- cb(null, matches)
125139
- })
125140
- }
125141
-
125142
- var self = this
125143
- this._processing = 0
125144
-
125145
- this._emitQueue = []
125146
- this._processQueue = []
125147
- this.paused = false
125148
-
125149
- if (this.noprocess)
125150
- return this
125151
-
125152
- if (n === 0)
125153
- return done()
125154
-
125155
- var sync = true
125156
- for (var i = 0; i < n; i ++) {
125157
- this._process(this.minimatch.set[i], i, false, done)
125158
- }
125159
- sync = false
125160
-
125161
- function done () {
125162
- --self._processing
125163
- if (self._processing <= 0) {
125164
- if (sync) {
125165
- process.nextTick(function () {
125166
- self._finish()
125167
- })
125168
- } else {
125169
- self._finish()
125170
- }
125171
- }
125172
- }
125173
- }
125174
-
125175
- Glob.prototype._finish = function () {
125176
- assert(this instanceof Glob)
125177
- if (this.aborted)
125178
- return
125179
-
125180
- if (this.realpath && !this._didRealpath)
125181
- return this._realpath()
125182
-
125183
- common.finish(this)
125184
- this.emit('end', this.found)
125185
- }
125186
-
125187
- Glob.prototype._realpath = function () {
125188
- if (this._didRealpath)
125189
- return
125190
-
125191
- this._didRealpath = true
125192
-
125193
- var n = this.matches.length
125194
- if (n === 0)
125195
- return this._finish()
125196
-
125197
- var self = this
125198
- for (var i = 0; i < this.matches.length; i++)
125199
- this._realpathSet(i, next)
125200
-
125201
- function next () {
125202
- if (--n === 0)
125203
- self._finish()
125204
- }
125205
- }
125206
-
125207
- Glob.prototype._realpathSet = function (index, cb) {
125208
- var matchset = this.matches[index]
125209
- if (!matchset)
125210
- return cb()
125211
-
125212
- var found = Object.keys(matchset)
125213
- var self = this
125214
- var n = found.length
125215
-
125216
- if (n === 0)
125217
- return cb()
125218
-
125219
- var set = this.matches[index] = Object.create(null)
125220
- found.forEach(function (p, i) {
125221
- // If there's a problem with the stat, then it means that
125222
- // one or more of the links in the realpath couldn't be
125223
- // resolved. just return the abs value in that case.
125224
- p = self._makeAbs(p)
125225
- rp.realpath(p, self.realpathCache, function (er, real) {
125226
- if (!er)
125227
- set[real] = true
125228
- else if (er.syscall === 'stat')
125229
- set[p] = true
125230
- else
125231
- self.emit('error', er) // srsly wtf right here
125232
-
125233
- if (--n === 0) {
125234
- self.matches[index] = set
125235
- cb()
125236
- }
125237
- })
125238
- })
125239
- }
125240
-
125241
- Glob.prototype._mark = function (p) {
125242
- return common.mark(this, p)
125243
- }
125244
-
125245
- Glob.prototype._makeAbs = function (f) {
125246
- return common.makeAbs(this, f)
125247
- }
125248
-
125249
- Glob.prototype.abort = function () {
125250
- this.aborted = true
125251
- this.emit('abort')
125252
- }
125253
-
125254
- Glob.prototype.pause = function () {
125255
- if (!this.paused) {
125256
- this.paused = true
125257
- this.emit('pause')
125258
- }
125259
- }
125260
-
125261
- Glob.prototype.resume = function () {
125262
- if (this.paused) {
125263
- this.emit('resume')
125264
- this.paused = false
125265
- if (this._emitQueue.length) {
125266
- var eq = this._emitQueue.slice(0)
125267
- this._emitQueue.length = 0
125268
- for (var i = 0; i < eq.length; i ++) {
125269
- var e = eq[i]
125270
- this._emitMatch(e[0], e[1])
125271
- }
125272
- }
125273
- if (this._processQueue.length) {
125274
- var pq = this._processQueue.slice(0)
125275
- this._processQueue.length = 0
125276
- for (var i = 0; i < pq.length; i ++) {
125277
- var p = pq[i]
125278
- this._processing--
125279
- this._process(p[0], p[1], p[2], p[3])
125280
- }
125281
- }
125282
- }
125283
- }
125284
-
125285
- Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
125286
- assert(this instanceof Glob)
125287
- assert(typeof cb === 'function')
125288
-
125289
- if (this.aborted)
125290
- return
125291
-
125292
- this._processing++
125293
- if (this.paused) {
125294
- this._processQueue.push([pattern, index, inGlobStar, cb])
125295
- return
125296
- }
125297
-
125298
- //console.error('PROCESS %d', this._processing, pattern)
125299
-
125300
- // Get the first [n] parts of pattern that are all strings.
125301
- var n = 0
125302
- while (typeof pattern[n] === 'string') {
125303
- n ++
125304
- }
125305
- // now n is the index of the first one that is *not* a string.
125306
-
125307
- // see if there's anything else
125308
- var prefix
125309
- switch (n) {
125310
- // if not, then this is rather simple
125311
- case pattern.length:
125312
- this._processSimple(pattern.join('/'), index, cb)
125313
- return
125314
-
125315
- case 0:
125316
- // pattern *starts* with some non-trivial item.
125317
- // going to readdir(cwd), but not include the prefix in matches.
125318
- prefix = null
125319
- break
125320
-
125321
- default:
125322
- // pattern has some string bits in the front.
125323
- // whatever it starts with, whether that's 'absolute' like /foo/bar,
125324
- // or 'relative' like '../baz'
125325
- prefix = pattern.slice(0, n).join('/')
125326
- break
125327
- }
125328
-
125329
- var remain = pattern.slice(n)
125330
-
125331
- // get the list of entries.
125332
- var read
125333
- if (prefix === null)
125334
- read = '.'
125335
- else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
125336
- if (!prefix || !isAbsolute(prefix))
125337
- prefix = '/' + prefix
125338
- read = prefix
125339
- } else
125340
- read = prefix
125341
-
125342
- var abs = this._makeAbs(read)
125343
-
125344
- //if ignored, skip _processing
125345
- if (childrenIgnored(this, read))
125346
- return cb()
125347
-
125348
- var isGlobStar = remain[0] === minimatch.GLOBSTAR
125349
- if (isGlobStar)
125350
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
125351
- else
125352
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
125353
- }
125354
-
125355
- Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
125356
- var self = this
125357
- this._readdir(abs, inGlobStar, function (er, entries) {
125358
- return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
125359
- })
125360
- }
125361
-
125362
- Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
125363
-
125364
- // if the abs isn't a dir, then nothing can match!
125365
- if (!entries)
125366
- return cb()
125367
-
125368
- // It will only match dot entries if it starts with a dot, or if
125369
- // dot is set. Stuff like @(.foo|.bar) isn't allowed.
125370
- var pn = remain[0]
125371
- var negate = !!this.minimatch.negate
125372
- var rawGlob = pn._glob
125373
- var dotOk = this.dot || rawGlob.charAt(0) === '.'
125374
-
125375
- var matchedEntries = []
125376
- for (var i = 0; i < entries.length; i++) {
125377
- var e = entries[i]
125378
- if (e.charAt(0) !== '.' || dotOk) {
125379
- var m
125380
- if (negate && !prefix) {
125381
- m = !e.match(pn)
125382
- } else {
125383
- m = e.match(pn)
125384
- }
125385
- if (m)
125386
- matchedEntries.push(e)
125387
- }
125388
- }
125389
-
125390
- //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
125391
-
125392
- var len = matchedEntries.length
125393
- // If there are no matched entries, then nothing matches.
125394
- if (len === 0)
125395
- return cb()
125396
-
125397
- // if this is the last remaining pattern bit, then no need for
125398
- // an additional stat *unless* the user has specified mark or
125399
- // stat explicitly. We know they exist, since readdir returned
125400
- // them.
125401
-
125402
- if (remain.length === 1 && !this.mark && !this.stat) {
125403
- if (!this.matches[index])
125404
- this.matches[index] = Object.create(null)
125405
-
125406
- for (var i = 0; i < len; i ++) {
125407
- var e = matchedEntries[i]
125408
- if (prefix) {
125409
- if (prefix !== '/')
125410
- e = prefix + '/' + e
125411
- else
125412
- e = prefix + e
125413
- }
125414
-
125415
- if (e.charAt(0) === '/' && !this.nomount) {
125416
- e = path.join(this.root, e)
125417
- }
125418
- this._emitMatch(index, e)
125419
- }
125420
- // This was the last one, and no stats were needed
125421
- return cb()
125422
- }
125423
-
125424
- // now test all matched entries as stand-ins for that part
125425
- // of the pattern.
125426
- remain.shift()
125427
- for (var i = 0; i < len; i ++) {
125428
- var e = matchedEntries[i]
125429
- var newPattern
125430
- if (prefix) {
125431
- if (prefix !== '/')
125432
- e = prefix + '/' + e
125433
- else
125434
- e = prefix + e
125435
- }
125436
- this._process([e].concat(remain), index, inGlobStar, cb)
125437
- }
125438
- cb()
125439
- }
125440
-
125441
- Glob.prototype._emitMatch = function (index, e) {
125442
- if (this.aborted)
125443
- return
125444
-
125445
- if (isIgnored(this, e))
125446
- return
125447
-
125448
- if (this.paused) {
125449
- this._emitQueue.push([index, e])
125450
- return
125451
- }
125452
-
125453
- var abs = isAbsolute(e) ? e : this._makeAbs(e)
125454
-
125455
- if (this.mark)
125456
- e = this._mark(e)
125457
-
125458
- if (this.absolute)
125459
- e = abs
125460
-
125461
- if (this.matches[index][e])
125462
- return
125463
-
125464
- if (this.nodir) {
125465
- var c = this.cache[abs]
125466
- if (c === 'DIR' || Array.isArray(c))
125467
- return
125468
- }
125469
-
125470
- this.matches[index][e] = true
125471
-
125472
- var st = this.statCache[abs]
125473
- if (st)
125474
- this.emit('stat', e, st)
125475
-
125476
- this.emit('match', e)
125477
- }
125478
-
125479
- Glob.prototype._readdirInGlobStar = function (abs, cb) {
125480
- if (this.aborted)
125481
- return
125482
-
125483
- // follow all symlinked directories forever
125484
- // just proceed as if this is a non-globstar situation
125485
- if (this.follow)
125486
- return this._readdir(abs, false, cb)
125487
-
125488
- var lstatkey = 'lstat\0' + abs
125489
- var self = this
125490
- var lstatcb = inflight(lstatkey, lstatcb_)
125491
-
125492
- if (lstatcb)
125493
- self.fs.lstat(abs, lstatcb)
125494
-
125495
- function lstatcb_ (er, lstat) {
125496
- if (er && er.code === 'ENOENT')
125497
- return cb()
125498
-
125499
- var isSym = lstat && lstat.isSymbolicLink()
125500
- self.symlinks[abs] = isSym
125501
-
125502
- // If it's not a symlink or a dir, then it's definitely a regular file.
125503
- // don't bother doing a readdir in that case.
125504
- if (!isSym && lstat && !lstat.isDirectory()) {
125505
- self.cache[abs] = 'FILE'
125506
- cb()
125507
- } else
125508
- self._readdir(abs, false, cb)
125509
- }
125510
- }
125511
-
125512
- Glob.prototype._readdir = function (abs, inGlobStar, cb) {
125513
- if (this.aborted)
125514
- return
125515
-
125516
- cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
125517
- if (!cb)
125518
- return
125519
-
125520
- //console.error('RD %j %j', +inGlobStar, abs)
125521
- if (inGlobStar && !ownProp(this.symlinks, abs))
125522
- return this._readdirInGlobStar(abs, cb)
125523
-
125524
- if (ownProp(this.cache, abs)) {
125525
- var c = this.cache[abs]
125526
- if (!c || c === 'FILE')
125527
- return cb()
125528
-
125529
- if (Array.isArray(c))
125530
- return cb(null, c)
125531
- }
125532
-
125533
- var self = this
125534
- self.fs.readdir(abs, readdirCb(this, abs, cb))
125535
- }
125536
-
125537
- function readdirCb (self, abs, cb) {
125538
- return function (er, entries) {
125539
- if (er)
125540
- self._readdirError(abs, er, cb)
125541
- else
125542
- self._readdirEntries(abs, entries, cb)
125543
- }
125544
- }
125545
-
125546
- Glob.prototype._readdirEntries = function (abs, entries, cb) {
125547
- if (this.aborted)
125548
- return
125549
-
125550
- // if we haven't asked to stat everything, then just
125551
- // assume that everything in there exists, so we can avoid
125552
- // having to stat it a second time.
125553
- if (!this.mark && !this.stat) {
125554
- for (var i = 0; i < entries.length; i ++) {
125555
- var e = entries[i]
125556
- if (abs === '/')
125557
- e = abs + e
125558
- else
125559
- e = abs + '/' + e
125560
- this.cache[e] = true
125561
- }
125562
- }
125563
-
125564
- this.cache[abs] = entries
125565
- return cb(null, entries)
125566
- }
125567
-
125568
- Glob.prototype._readdirError = function (f, er, cb) {
125569
- if (this.aborted)
125570
- return
125571
-
125572
- // handle errors, and cache the information
125573
- switch (er.code) {
125574
- case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
125575
- case 'ENOTDIR': // totally normal. means it *does* exist.
125576
- var abs = this._makeAbs(f)
125577
- this.cache[abs] = 'FILE'
125578
- if (abs === this.cwdAbs) {
125579
- var error = new Error(er.code + ' invalid cwd ' + this.cwd)
125580
- error.path = this.cwd
125581
- error.code = er.code
125582
- this.emit('error', error)
125583
- this.abort()
125584
- }
125585
- break
125586
-
125587
- case 'ENOENT': // not terribly unusual
125588
- case 'ELOOP':
125589
- case 'ENAMETOOLONG':
125590
- case 'UNKNOWN':
125591
- this.cache[this._makeAbs(f)] = false
125592
- break
125593
-
125594
- default: // some unusual error. Treat as failure.
125595
- this.cache[this._makeAbs(f)] = false
125596
- if (this.strict) {
125597
- this.emit('error', er)
125598
- // If the error is handled, then we abort
125599
- // if not, we threw out of here
125600
- this.abort()
125601
- }
125602
- if (!this.silent)
125603
- console.error('glob error', er)
125604
- break
125605
- }
125606
-
125607
- return cb()
125608
- }
125609
-
125610
- Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
125611
- var self = this
125612
- this._readdir(abs, inGlobStar, function (er, entries) {
125613
- self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
125614
- })
125615
- }
125616
-
125617
-
125618
- Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
125619
- //console.error('pgs2', prefix, remain[0], entries)
125620
-
125621
- // no entries means not a dir, so it can never have matches
125622
- // foo.txt/** doesn't match foo.txt
125623
- if (!entries)
125624
- return cb()
125625
-
125626
- // test without the globstar, and with every child both below
125627
- // and replacing the globstar.
125628
- var remainWithoutGlobStar = remain.slice(1)
125629
- var gspref = prefix ? [ prefix ] : []
125630
- var noGlobStar = gspref.concat(remainWithoutGlobStar)
125631
-
125632
- // the noGlobStar pattern exits the inGlobStar state
125633
- this._process(noGlobStar, index, false, cb)
125634
-
125635
- var isSym = this.symlinks[abs]
125636
- var len = entries.length
125637
-
125638
- // If it's a symlink, and we're in a globstar, then stop
125639
- if (isSym && inGlobStar)
125640
- return cb()
125641
-
125642
- for (var i = 0; i < len; i++) {
125643
- var e = entries[i]
125644
- if (e.charAt(0) === '.' && !this.dot)
125645
- continue
125646
-
125647
- // these two cases enter the inGlobStar state
125648
- var instead = gspref.concat(entries[i], remainWithoutGlobStar)
125649
- this._process(instead, index, true, cb)
125650
-
125651
- var below = gspref.concat(entries[i], remain)
125652
- this._process(below, index, true, cb)
125653
- }
125654
-
125655
- cb()
125656
- }
125657
-
125658
- Glob.prototype._processSimple = function (prefix, index, cb) {
125659
- // XXX review this. Shouldn't it be doing the mounting etc
125660
- // before doing stat? kinda weird?
125661
- var self = this
125662
- this._stat(prefix, function (er, exists) {
125663
- self._processSimple2(prefix, index, er, exists, cb)
125664
- })
125665
- }
125666
- Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
125667
-
125668
- //console.error('ps2', prefix, exists)
125669
-
125670
- if (!this.matches[index])
125671
- this.matches[index] = Object.create(null)
125672
-
125673
- // If it doesn't exist, then just mark the lack of results
125674
- if (!exists)
125675
- return cb()
125676
-
125677
- if (prefix && isAbsolute(prefix) && !this.nomount) {
125678
- var trail = /[\/\\]$/.test(prefix)
125679
- if (prefix.charAt(0) === '/') {
125680
- prefix = path.join(this.root, prefix)
125681
- } else {
125682
- prefix = path.resolve(this.root, prefix)
125683
- if (trail)
125684
- prefix += '/'
125685
- }
125686
- }
125687
-
125688
- if (process.platform === 'win32')
125689
- prefix = prefix.replace(/\\/g, '/')
125690
-
125691
- // Mark this as a match
125692
- this._emitMatch(index, prefix)
125693
- cb()
125694
- }
125695
-
125696
- // Returns either 'DIR', 'FILE', or false
125697
- Glob.prototype._stat = function (f, cb) {
125698
- var abs = this._makeAbs(f)
125699
- var needDir = f.slice(-1) === '/'
125700
-
125701
- if (f.length > this.maxLength)
125702
- return cb()
125703
-
125704
- if (!this.stat && ownProp(this.cache, abs)) {
125705
- var c = this.cache[abs]
125706
-
125707
- if (Array.isArray(c))
125708
- c = 'DIR'
125709
-
125710
- // It exists, but maybe not how we need it
125711
- if (!needDir || c === 'DIR')
125712
- return cb(null, c)
125713
-
125714
- if (needDir && c === 'FILE')
125715
- return cb()
125716
-
125717
- // otherwise we have to stat, because maybe c=true
125718
- // if we know it exists, but not what it is.
125719
- }
125720
-
125721
- var exists
125722
- var stat = this.statCache[abs]
125723
- if (stat !== undefined) {
125724
- if (stat === false)
125725
- return cb(null, stat)
125726
- else {
125727
- var type = stat.isDirectory() ? 'DIR' : 'FILE'
125728
- if (needDir && type === 'FILE')
125729
- return cb()
125730
- else
125731
- return cb(null, type, stat)
125732
- }
125733
- }
125734
-
125735
- var self = this
125736
- var statcb = inflight('stat\0' + abs, lstatcb_)
125737
- if (statcb)
125738
- self.fs.lstat(abs, statcb)
125739
-
125740
- function lstatcb_ (er, lstat) {
125741
- if (lstat && lstat.isSymbolicLink()) {
125742
- // If it's a symlink, then treat it as the target, unless
125743
- // the target does not exist, then treat it as a file.
125744
- return self.fs.stat(abs, function (er, stat) {
125745
- if (er)
125746
- self._stat2(f, abs, null, lstat, cb)
125747
- else
125748
- self._stat2(f, abs, er, stat, cb)
125749
- })
125750
- } else {
125751
- self._stat2(f, abs, er, lstat, cb)
125752
- }
125753
- }
125754
- }
125755
-
125756
- Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
125757
- if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
125758
- this.statCache[abs] = false
125759
- return cb()
125760
- }
125761
-
125762
- var needDir = f.slice(-1) === '/'
125763
- this.statCache[abs] = stat
125764
-
125765
- if (abs.slice(-1) === '/' && stat && !stat.isDirectory())
125766
- return cb(null, false, stat)
125767
-
125768
- var c = true
125769
- if (stat)
125770
- c = stat.isDirectory() ? 'DIR' : 'FILE'
125771
- this.cache[abs] = this.cache[abs] || c
125772
-
125773
- if (needDir && c === 'FILE')
125774
- return cb()
125775
-
125776
- return cb(null, c, stat)
125777
- }
125778
-
125779
-
125780
- /***/ },
125781
-
125782
- /***/ "./node_modules/glob/sync.js"
125783
- /*!***********************************!*\
125784
- !*** ./node_modules/glob/sync.js ***!
125785
- \***********************************/
125786
- (module, __unused_webpack_exports, __webpack_require__) {
125787
-
125788
- module.exports = globSync
125789
- globSync.GlobSync = GlobSync
125790
-
125791
- var rp = __webpack_require__(/*! fs.realpath */ "./node_modules/fs.realpath/index.js")
125792
- var minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js")
125793
- var Minimatch = minimatch.Minimatch
125794
- var Glob = (__webpack_require__(/*! ./glob.js */ "./node_modules/glob/glob.js").Glob)
125795
- var util = __webpack_require__(/*! util */ "util")
125796
- var path = __webpack_require__(/*! path */ "path")
125797
- var assert = __webpack_require__(/*! assert */ "assert")
125798
- var isAbsolute = __webpack_require__(/*! path-is-absolute */ "./node_modules/path-is-absolute/index.js")
125799
- var common = __webpack_require__(/*! ./common.js */ "./node_modules/glob/common.js")
125800
- var setopts = common.setopts
125801
- var ownProp = common.ownProp
125802
- var childrenIgnored = common.childrenIgnored
125803
- var isIgnored = common.isIgnored
125804
-
125805
- function globSync (pattern, options) {
125806
- if (typeof options === 'function' || arguments.length === 3)
125807
- throw new TypeError('callback provided to sync glob\n'+
125808
- 'See: https://github.com/isaacs/node-glob/issues/167')
125809
-
125810
- return new GlobSync(pattern, options).found
125811
- }
125812
-
125813
- function GlobSync (pattern, options) {
125814
- if (!pattern)
125815
- throw new Error('must provide pattern')
125816
-
125817
- if (typeof options === 'function' || arguments.length === 3)
125818
- throw new TypeError('callback provided to sync glob\n'+
125819
- 'See: https://github.com/isaacs/node-glob/issues/167')
125820
-
125821
- if (!(this instanceof GlobSync))
125822
- return new GlobSync(pattern, options)
125823
-
125824
- setopts(this, pattern, options)
125825
-
125826
- if (this.noprocess)
125827
- return this
125828
-
125829
- var n = this.minimatch.set.length
125830
- this.matches = new Array(n)
125831
- for (var i = 0; i < n; i ++) {
125832
- this._process(this.minimatch.set[i], i, false)
125833
- }
125834
- this._finish()
125835
- }
125836
-
125837
- GlobSync.prototype._finish = function () {
125838
- assert(this instanceof GlobSync)
125839
- if (this.realpath) {
125840
- var self = this
125841
- this.matches.forEach(function (matchset, index) {
125842
- var set = self.matches[index] = Object.create(null)
125843
- for (var p in matchset) {
125844
- try {
125845
- p = self._makeAbs(p)
125846
- var real = rp.realpathSync(p, self.realpathCache)
125847
- set[real] = true
125848
- } catch (er) {
125849
- if (er.syscall === 'stat')
125850
- set[self._makeAbs(p)] = true
125851
- else
125852
- throw er
125853
- }
125854
- }
125855
- })
125856
- }
125857
- common.finish(this)
125858
- }
125859
-
125860
-
125861
- GlobSync.prototype._process = function (pattern, index, inGlobStar) {
125862
- assert(this instanceof GlobSync)
125863
-
125864
- // Get the first [n] parts of pattern that are all strings.
125865
- var n = 0
125866
- while (typeof pattern[n] === 'string') {
125867
- n ++
125868
- }
125869
- // now n is the index of the first one that is *not* a string.
125870
-
125871
- // See if there's anything else
125872
- var prefix
125873
- switch (n) {
125874
- // if not, then this is rather simple
125875
- case pattern.length:
125876
- this._processSimple(pattern.join('/'), index)
125877
- return
125878
-
125879
- case 0:
125880
- // pattern *starts* with some non-trivial item.
125881
- // going to readdir(cwd), but not include the prefix in matches.
125882
- prefix = null
125883
- break
125884
-
125885
- default:
125886
- // pattern has some string bits in the front.
125887
- // whatever it starts with, whether that's 'absolute' like /foo/bar,
125888
- // or 'relative' like '../baz'
125889
- prefix = pattern.slice(0, n).join('/')
125890
- break
125891
- }
125892
-
125893
- var remain = pattern.slice(n)
125894
-
125895
- // get the list of entries.
125896
- var read
125897
- if (prefix === null)
125898
- read = '.'
125899
- else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
125900
- if (!prefix || !isAbsolute(prefix))
125901
- prefix = '/' + prefix
125902
- read = prefix
125903
- } else
125904
- read = prefix
125905
-
125906
- var abs = this._makeAbs(read)
125907
-
125908
- //if ignored, skip processing
125909
- if (childrenIgnored(this, read))
125910
- return
125911
-
125912
- var isGlobStar = remain[0] === minimatch.GLOBSTAR
125913
- if (isGlobStar)
125914
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
125915
- else
125916
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
125917
- }
125918
-
125919
-
125920
- GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
125921
- var entries = this._readdir(abs, inGlobStar)
125922
-
125923
- // if the abs isn't a dir, then nothing can match!
125924
- if (!entries)
125925
- return
125926
-
125927
- // It will only match dot entries if it starts with a dot, or if
125928
- // dot is set. Stuff like @(.foo|.bar) isn't allowed.
125929
- var pn = remain[0]
125930
- var negate = !!this.minimatch.negate
125931
- var rawGlob = pn._glob
125932
- var dotOk = this.dot || rawGlob.charAt(0) === '.'
125933
-
125934
- var matchedEntries = []
125935
- for (var i = 0; i < entries.length; i++) {
125936
- var e = entries[i]
125937
- if (e.charAt(0) !== '.' || dotOk) {
125938
- var m
125939
- if (negate && !prefix) {
125940
- m = !e.match(pn)
125941
- } else {
125942
- m = e.match(pn)
125943
- }
125944
- if (m)
125945
- matchedEntries.push(e)
125946
- }
125947
- }
125948
-
125949
- var len = matchedEntries.length
125950
- // If there are no matched entries, then nothing matches.
125951
- if (len === 0)
125952
- return
125953
-
125954
- // if this is the last remaining pattern bit, then no need for
125955
- // an additional stat *unless* the user has specified mark or
125956
- // stat explicitly. We know they exist, since readdir returned
125957
- // them.
125958
-
125959
- if (remain.length === 1 && !this.mark && !this.stat) {
125960
- if (!this.matches[index])
125961
- this.matches[index] = Object.create(null)
125962
-
125963
- for (var i = 0; i < len; i ++) {
125964
- var e = matchedEntries[i]
125965
- if (prefix) {
125966
- if (prefix.slice(-1) !== '/')
125967
- e = prefix + '/' + e
125968
- else
125969
- e = prefix + e
125970
- }
125971
-
125972
- if (e.charAt(0) === '/' && !this.nomount) {
125973
- e = path.join(this.root, e)
125974
- }
125975
- this._emitMatch(index, e)
125976
- }
125977
- // This was the last one, and no stats were needed
125978
- return
125979
- }
125980
-
125981
- // now test all matched entries as stand-ins for that part
125982
- // of the pattern.
125983
- remain.shift()
125984
- for (var i = 0; i < len; i ++) {
125985
- var e = matchedEntries[i]
125986
- var newPattern
125987
- if (prefix)
125988
- newPattern = [prefix, e]
125989
- else
125990
- newPattern = [e]
125991
- this._process(newPattern.concat(remain), index, inGlobStar)
125992
- }
125993
- }
125994
-
125995
-
125996
- GlobSync.prototype._emitMatch = function (index, e) {
125997
- if (isIgnored(this, e))
125998
- return
125999
-
126000
- var abs = this._makeAbs(e)
126001
-
126002
- if (this.mark)
126003
- e = this._mark(e)
126004
-
126005
- if (this.absolute) {
126006
- e = abs
126007
- }
126008
-
126009
- if (this.matches[index][e])
126010
- return
126011
-
126012
- if (this.nodir) {
126013
- var c = this.cache[abs]
126014
- if (c === 'DIR' || Array.isArray(c))
126015
- return
126016
- }
126017
-
126018
- this.matches[index][e] = true
126019
-
126020
- if (this.stat)
126021
- this._stat(e)
126022
- }
126023
-
126024
-
126025
- GlobSync.prototype._readdirInGlobStar = function (abs) {
126026
- // follow all symlinked directories forever
126027
- // just proceed as if this is a non-globstar situation
126028
- if (this.follow)
126029
- return this._readdir(abs, false)
126030
-
126031
- var entries
126032
- var lstat
126033
- var stat
126034
- try {
126035
- lstat = this.fs.lstatSync(abs)
126036
- } catch (er) {
126037
- if (er.code === 'ENOENT') {
126038
- // lstat failed, doesn't exist
126039
- return null
126040
- }
126041
- }
126042
-
126043
- var isSym = lstat && lstat.isSymbolicLink()
126044
- this.symlinks[abs] = isSym
126045
-
126046
- // If it's not a symlink or a dir, then it's definitely a regular file.
126047
- // don't bother doing a readdir in that case.
126048
- if (!isSym && lstat && !lstat.isDirectory())
126049
- this.cache[abs] = 'FILE'
126050
- else
126051
- entries = this._readdir(abs, false)
126052
-
126053
- return entries
126054
- }
126055
-
126056
- GlobSync.prototype._readdir = function (abs, inGlobStar) {
126057
- var entries
126058
-
126059
- if (inGlobStar && !ownProp(this.symlinks, abs))
126060
- return this._readdirInGlobStar(abs)
126061
-
126062
- if (ownProp(this.cache, abs)) {
126063
- var c = this.cache[abs]
126064
- if (!c || c === 'FILE')
126065
- return null
126066
-
126067
- if (Array.isArray(c))
126068
- return c
126069
- }
126070
-
126071
- try {
126072
- return this._readdirEntries(abs, this.fs.readdirSync(abs))
126073
- } catch (er) {
126074
- this._readdirError(abs, er)
126075
- return null
126076
- }
126077
- }
126078
-
126079
- GlobSync.prototype._readdirEntries = function (abs, entries) {
126080
- // if we haven't asked to stat everything, then just
126081
- // assume that everything in there exists, so we can avoid
126082
- // having to stat it a second time.
126083
- if (!this.mark && !this.stat) {
126084
- for (var i = 0; i < entries.length; i ++) {
126085
- var e = entries[i]
126086
- if (abs === '/')
126087
- e = abs + e
126088
- else
126089
- e = abs + '/' + e
126090
- this.cache[e] = true
126091
- }
126092
- }
126093
-
126094
- this.cache[abs] = entries
126095
-
126096
- // mark and cache dir-ness
126097
- return entries
126098
- }
126099
-
126100
- GlobSync.prototype._readdirError = function (f, er) {
126101
- // handle errors, and cache the information
126102
- switch (er.code) {
126103
- case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
126104
- case 'ENOTDIR': // totally normal. means it *does* exist.
126105
- var abs = this._makeAbs(f)
126106
- this.cache[abs] = 'FILE'
126107
- if (abs === this.cwdAbs) {
126108
- var error = new Error(er.code + ' invalid cwd ' + this.cwd)
126109
- error.path = this.cwd
126110
- error.code = er.code
126111
- throw error
126112
- }
126113
- break
126114
-
126115
- case 'ENOENT': // not terribly unusual
126116
- case 'ELOOP':
126117
- case 'ENAMETOOLONG':
126118
- case 'UNKNOWN':
126119
- this.cache[this._makeAbs(f)] = false
126120
- break
126121
-
126122
- default: // some unusual error. Treat as failure.
126123
- this.cache[this._makeAbs(f)] = false
126124
- if (this.strict)
126125
- throw er
126126
- if (!this.silent)
126127
- console.error('glob error', er)
126128
- break
126129
- }
126130
- }
126131
-
126132
- GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
126133
-
126134
- var entries = this._readdir(abs, inGlobStar)
126135
-
126136
- // no entries means not a dir, so it can never have matches
126137
- // foo.txt/** doesn't match foo.txt
126138
- if (!entries)
126139
- return
126140
-
126141
- // test without the globstar, and with every child both below
126142
- // and replacing the globstar.
126143
- var remainWithoutGlobStar = remain.slice(1)
126144
- var gspref = prefix ? [ prefix ] : []
126145
- var noGlobStar = gspref.concat(remainWithoutGlobStar)
126146
-
126147
- // the noGlobStar pattern exits the inGlobStar state
126148
- this._process(noGlobStar, index, false)
126149
-
126150
- var len = entries.length
126151
- var isSym = this.symlinks[abs]
126152
-
126153
- // If it's a symlink, and we're in a globstar, then stop
126154
- if (isSym && inGlobStar)
126155
- return
126156
-
126157
- for (var i = 0; i < len; i++) {
126158
- var e = entries[i]
126159
- if (e.charAt(0) === '.' && !this.dot)
126160
- continue
126161
-
126162
- // these two cases enter the inGlobStar state
126163
- var instead = gspref.concat(entries[i], remainWithoutGlobStar)
126164
- this._process(instead, index, true)
126165
-
126166
- var below = gspref.concat(entries[i], remain)
126167
- this._process(below, index, true)
126168
- }
126169
- }
126170
-
126171
- GlobSync.prototype._processSimple = function (prefix, index) {
126172
- // XXX review this. Shouldn't it be doing the mounting etc
126173
- // before doing stat? kinda weird?
126174
- var exists = this._stat(prefix)
126175
-
126176
- if (!this.matches[index])
126177
- this.matches[index] = Object.create(null)
126178
-
126179
- // If it doesn't exist, then just mark the lack of results
126180
- if (!exists)
126181
- return
126182
-
126183
- if (prefix && isAbsolute(prefix) && !this.nomount) {
126184
- var trail = /[\/\\]$/.test(prefix)
126185
- if (prefix.charAt(0) === '/') {
126186
- prefix = path.join(this.root, prefix)
126187
- } else {
126188
- prefix = path.resolve(this.root, prefix)
126189
- if (trail)
126190
- prefix += '/'
126191
- }
126192
- }
126193
-
126194
- if (process.platform === 'win32')
126195
- prefix = prefix.replace(/\\/g, '/')
126196
-
126197
- // Mark this as a match
126198
- this._emitMatch(index, prefix)
126199
- }
126200
-
126201
- // Returns either 'DIR', 'FILE', or false
126202
- GlobSync.prototype._stat = function (f) {
126203
- var abs = this._makeAbs(f)
126204
- var needDir = f.slice(-1) === '/'
126205
-
126206
- if (f.length > this.maxLength)
126207
- return false
126208
-
126209
- if (!this.stat && ownProp(this.cache, abs)) {
126210
- var c = this.cache[abs]
126211
-
126212
- if (Array.isArray(c))
126213
- c = 'DIR'
126214
-
126215
- // It exists, but maybe not how we need it
126216
- if (!needDir || c === 'DIR')
126217
- return c
126218
-
126219
- if (needDir && c === 'FILE')
126220
- return false
126221
-
126222
- // otherwise we have to stat, because maybe c=true
126223
- // if we know it exists, but not what it is.
126224
- }
126225
-
126226
- var exists
126227
- var stat = this.statCache[abs]
126228
- if (!stat) {
126229
- var lstat
126230
- try {
126231
- lstat = this.fs.lstatSync(abs)
126232
- } catch (er) {
126233
- if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
126234
- this.statCache[abs] = false
126235
- return false
126236
- }
126237
- }
126238
-
126239
- if (lstat && lstat.isSymbolicLink()) {
126240
- try {
126241
- stat = this.fs.statSync(abs)
126242
- } catch (er) {
126243
- stat = lstat
126244
- }
126245
- } else {
126246
- stat = lstat
126247
- }
126248
- }
126249
-
126250
- this.statCache[abs] = stat
126251
-
126252
- var c = true
126253
- if (stat)
126254
- c = stat.isDirectory() ? 'DIR' : 'FILE'
126255
-
126256
- this.cache[abs] = this.cache[abs] || c
126257
-
126258
- if (needDir && c === 'FILE')
126259
- return false
126260
-
126261
- return c
126262
- }
126263
-
126264
- GlobSync.prototype._mark = function (p) {
126265
- return common.mark(this, p)
126266
- }
126267
-
126268
- GlobSync.prototype._makeAbs = function (f) {
126269
- return common.makeAbs(this, f)
126270
- }
126271
-
126272
-
126273
- /***/ },
126274
-
126275
- /***/ "./node_modules/inflight/inflight.js"
126276
- /*!*******************************************!*\
126277
- !*** ./node_modules/inflight/inflight.js ***!
126278
- \*******************************************/
126279
- (module, __unused_webpack_exports, __webpack_require__) {
126280
-
126281
- var wrappy = __webpack_require__(/*! wrappy */ "./node_modules/wrappy/wrappy.js")
126282
- var reqs = Object.create(null)
126283
- var once = __webpack_require__(/*! once */ "./node_modules/once/once.js")
126284
-
126285
- module.exports = wrappy(inflight)
126286
-
126287
- function inflight (key, cb) {
126288
- if (reqs[key]) {
126289
- reqs[key].push(cb)
126290
- return null
126291
- } else {
126292
- reqs[key] = [cb]
126293
- return makeres(key)
126294
- }
126295
- }
126296
-
126297
- function makeres (key) {
126298
- return once(function RES () {
126299
- var cbs = reqs[key]
126300
- var len = cbs.length
126301
- var args = slice(arguments)
126302
-
126303
- // XXX It's somewhat ambiguous whether a new callback added in this
126304
- // pass should be queued for later execution if something in the
126305
- // list of callbacks throws, or if it should just be discarded.
126306
- // However, it's such an edge case that it hardly matters, and either
126307
- // choice is likely as surprising as the other.
126308
- // As it happens, we do go ahead and schedule it for later execution.
126309
- try {
126310
- for (var i = 0; i < len; i++) {
126311
- cbs[i].apply(null, args)
126312
- }
126313
- } finally {
126314
- if (cbs.length > len) {
126315
- // added more in the interim.
126316
- // de-zalgo, just in case, but don't call again.
126317
- cbs.splice(0, len)
126318
- process.nextTick(function () {
126319
- RES.apply(null, args)
126320
- })
126321
- } else {
126322
- delete reqs[key]
126323
- }
126324
- }
126325
- })
126326
- }
126327
-
126328
- function slice (args) {
126329
- var length = args.length
126330
- var array = []
126331
-
126332
- for (var i = 0; i < length; i++) array[i] = args[i]
126333
- return array
126334
- }
126335
-
126336
-
126337
- /***/ },
126338
-
126339
- /***/ "./node_modules/inherits/inherits.js"
126340
- /*!*******************************************!*\
126341
- !*** ./node_modules/inherits/inherits.js ***!
126342
- \*******************************************/
126343
- (module, __unused_webpack_exports, __webpack_require__) {
126344
-
126345
- try {
126346
- var util = __webpack_require__(/*! util */ "util");
126347
- /* istanbul ignore next */
126348
- if (typeof util.inherits !== 'function') throw '';
126349
- module.exports = util.inherits;
126350
- } catch (e) {
126351
- /* istanbul ignore next */
126352
- module.exports = __webpack_require__(/*! ./inherits_browser.js */ "./node_modules/inherits/inherits_browser.js");
126353
- }
126354
-
126355
-
126356
- /***/ },
126357
-
126358
- /***/ "./node_modules/inherits/inherits_browser.js"
126359
- /*!***************************************************!*\
126360
- !*** ./node_modules/inherits/inherits_browser.js ***!
126361
- \***************************************************/
126362
- (module) {
126363
-
126364
- if (typeof Object.create === 'function') {
126365
- // implementation from standard node.js 'util' module
126366
- module.exports = function inherits(ctor, superCtor) {
126367
- if (superCtor) {
126368
- ctor.super_ = superCtor
126369
- ctor.prototype = Object.create(superCtor.prototype, {
126370
- constructor: {
126371
- value: ctor,
126372
- enumerable: false,
126373
- writable: true,
126374
- configurable: true
126375
- }
126376
- })
126377
- }
126378
- };
126379
- } else {
126380
- // old school shim for old browsers
126381
- module.exports = function inherits(ctor, superCtor) {
126382
- if (superCtor) {
126383
- ctor.super_ = superCtor
126384
- var TempCtor = function () {}
126385
- TempCtor.prototype = superCtor.prototype
126386
- ctor.prototype = new TempCtor()
126387
- ctor.prototype.constructor = ctor
126388
- }
126389
- }
126390
- }
126391
-
126392
-
126393
- /***/ },
126394
-
126395
- /***/ "./node_modules/minimatch/minimatch.js"
126396
- /*!*********************************************!*\
126397
- !*** ./node_modules/minimatch/minimatch.js ***!
126398
- \*********************************************/
126399
- (module, __unused_webpack_exports, __webpack_require__) {
126400
-
126401
- module.exports = minimatch
126402
- minimatch.Minimatch = Minimatch
126403
-
126404
- var path = (function () { try { return __webpack_require__(/*! path */ "path") } catch (e) {}}()) || {
126405
- sep: '/'
126406
- }
126407
- minimatch.sep = path.sep
126408
-
126409
- var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
126410
- var expand = __webpack_require__(/*! brace-expansion */ "./node_modules/brace-expansion/index.js")
126411
-
126412
- var plTypes = {
126413
- '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
126414
- '?': { open: '(?:', close: ')?' },
126415
- '+': { open: '(?:', close: ')+' },
126416
- '*': { open: '(?:', close: ')*' },
126417
- '@': { open: '(?:', close: ')' }
126418
- }
126419
-
126420
- // any single thing other than /
126421
- // don't need to escape / when using new RegExp()
126422
- var qmark = '[^/]'
126423
-
126424
- // * => any number of characters
126425
- var star = qmark + '*?'
126426
-
126427
- // ** when dots are allowed. Anything goes, except .. and .
126428
- // not (^ or / followed by one or two dots followed by $ or /),
126429
- // followed by anything, any number of times.
126430
- var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
126431
-
126432
- // not a ^ or / followed by a dot,
126433
- // followed by anything, any number of times.
126434
- var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
126435
-
126436
- // characters that need to be escaped in RegExp.
126437
- var reSpecials = charSet('().*{}+?[]^$\\!')
126438
-
126439
- // "abc" -> { a:true, b:true, c:true }
126440
- function charSet (s) {
126441
- return s.split('').reduce(function (set, c) {
126442
- set[c] = true
126443
- return set
126444
- }, {})
126445
- }
126446
-
126447
- // normalizes slashes.
126448
- var slashSplit = /\/+/
126449
-
126450
- minimatch.filter = filter
126451
- function filter (pattern, options) {
126452
- options = options || {}
126453
- return function (p, i, list) {
126454
- return minimatch(p, pattern, options)
126455
- }
126456
- }
126457
-
126458
- function ext (a, b) {
126459
- b = b || {}
126460
- var t = {}
126461
- Object.keys(a).forEach(function (k) {
126462
- t[k] = a[k]
126463
- })
126464
- Object.keys(b).forEach(function (k) {
126465
- t[k] = b[k]
126466
- })
126467
- return t
126468
- }
126469
-
126470
- minimatch.defaults = function (def) {
126471
- if (!def || typeof def !== 'object' || !Object.keys(def).length) {
126472
- return minimatch
126473
- }
126474
-
126475
- var orig = minimatch
126476
-
126477
- var m = function minimatch (p, pattern, options) {
126478
- return orig(p, pattern, ext(def, options))
126479
- }
126480
-
126481
- m.Minimatch = function Minimatch (pattern, options) {
126482
- return new orig.Minimatch(pattern, ext(def, options))
126483
- }
126484
- m.Minimatch.defaults = function defaults (options) {
126485
- return orig.defaults(ext(def, options)).Minimatch
126486
- }
126487
-
126488
- m.filter = function filter (pattern, options) {
126489
- return orig.filter(pattern, ext(def, options))
126490
- }
126491
-
126492
- m.defaults = function defaults (options) {
126493
- return orig.defaults(ext(def, options))
126494
- }
126495
-
126496
- m.makeRe = function makeRe (pattern, options) {
126497
- return orig.makeRe(pattern, ext(def, options))
126498
- }
126499
-
126500
- m.braceExpand = function braceExpand (pattern, options) {
126501
- return orig.braceExpand(pattern, ext(def, options))
126502
- }
126503
-
126504
- m.match = function (list, pattern, options) {
126505
- return orig.match(list, pattern, ext(def, options))
126506
- }
126507
-
126508
- return m
126509
- }
126510
-
126511
- Minimatch.defaults = function (def) {
126512
- return minimatch.defaults(def).Minimatch
126513
- }
126514
-
126515
- function minimatch (p, pattern, options) {
126516
- assertValidPattern(pattern)
126517
-
126518
- if (!options) options = {}
126519
-
126520
- // shortcut: comments match nothing.
126521
- if (!options.nocomment && pattern.charAt(0) === '#') {
126522
- return false
126523
- }
126524
-
126525
- return new Minimatch(pattern, options).match(p)
126526
- }
126527
-
126528
- function Minimatch (pattern, options) {
126529
- if (!(this instanceof Minimatch)) {
126530
- return new Minimatch(pattern, options)
126531
- }
126532
-
126533
- assertValidPattern(pattern)
126534
-
126535
- if (!options) options = {}
126536
-
126537
- pattern = pattern.trim()
126538
-
126539
- // windows support: need to use /, not \
126540
- if (!options.allowWindowsEscape && path.sep !== '/') {
126541
- pattern = pattern.split(path.sep).join('/')
126542
- }
126543
-
126544
- this.options = options
126545
- this.maxGlobstarRecursion = options.maxGlobstarRecursion !== undefined
126546
- ? options.maxGlobstarRecursion : 200
126547
- this.set = []
126548
- this.pattern = pattern
126549
- this.regexp = null
126550
- this.negate = false
126551
- this.comment = false
126552
- this.empty = false
126553
- this.partial = !!options.partial
126554
-
126555
- // make the set of regexps etc.
126556
- this.make()
126557
- }
126558
-
126559
- Minimatch.prototype.debug = function () {}
126560
-
126561
- Minimatch.prototype.make = make
126562
- function make () {
126563
- var pattern = this.pattern
126564
- var options = this.options
126565
-
126566
- // empty patterns and comments match nothing.
126567
- if (!options.nocomment && pattern.charAt(0) === '#') {
126568
- this.comment = true
126569
- return
126570
- }
126571
- if (!pattern) {
126572
- this.empty = true
126573
- return
126574
- }
126575
-
126576
- // step 1: figure out negation, etc.
126577
- this.parseNegate()
126578
-
126579
- // step 2: expand braces
126580
- var set = this.globSet = this.braceExpand()
126581
-
126582
- if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
126583
-
126584
- this.debug(this.pattern, set)
126585
-
126586
- // step 3: now we have a set, so turn each one into a series of path-portion
126587
- // matching patterns.
126588
- // These will be regexps, except in the case of "**", which is
126589
- // set to the GLOBSTAR object for globstar behavior,
126590
- // and will not contain any / characters
126591
- set = this.globParts = set.map(function (s) {
126592
- return s.split(slashSplit)
126593
- })
126594
-
126595
- this.debug(this.pattern, set)
126596
-
126597
- // glob --> regexps
126598
- set = set.map(function (s, si, set) {
126599
- return s.map(this.parse, this)
126600
- }, this)
126601
-
126602
- this.debug(this.pattern, set)
126603
-
126604
- // filter out everything that didn't compile properly.
126605
- set = set.filter(function (s) {
126606
- return s.indexOf(false) === -1
126607
- })
126608
-
126609
- this.debug(this.pattern, set)
126610
-
126611
- this.set = set
126612
- }
126613
-
126614
- Minimatch.prototype.parseNegate = parseNegate
126615
- function parseNegate () {
126616
- var pattern = this.pattern
126617
- var negate = false
126618
- var options = this.options
126619
- var negateOffset = 0
126620
-
126621
- if (options.nonegate) return
126622
-
126623
- for (var i = 0, l = pattern.length
126624
- ; i < l && pattern.charAt(i) === '!'
126625
- ; i++) {
126626
- negate = !negate
126627
- negateOffset++
126628
- }
126629
-
126630
- if (negateOffset) this.pattern = pattern.substr(negateOffset)
126631
- this.negate = negate
126632
- }
126633
-
126634
- // Brace expansion:
126635
- // a{b,c}d -> abd acd
126636
- // a{b,}c -> abc ac
126637
- // a{0..3}d -> a0d a1d a2d a3d
126638
- // a{b,c{d,e}f}g -> abg acdfg acefg
126639
- // a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
126640
- //
126641
- // Invalid sets are not expanded.
126642
- // a{2..}b -> a{2..}b
126643
- // a{b}c -> a{b}c
126644
- minimatch.braceExpand = function (pattern, options) {
126645
- return braceExpand(pattern, options)
126646
- }
126647
-
126648
- Minimatch.prototype.braceExpand = braceExpand
126649
-
126650
- function braceExpand (pattern, options) {
126651
- if (!options) {
126652
- if (this instanceof Minimatch) {
126653
- options = this.options
126654
- } else {
126655
- options = {}
126656
- }
126657
- }
126658
-
126659
- pattern = typeof pattern === 'undefined'
126660
- ? this.pattern : pattern
126661
-
126662
- assertValidPattern(pattern)
126663
-
126664
- // Thanks to Yeting Li <https://github.com/yetingli> for
126665
- // improving this regexp to avoid a ReDOS vulnerability.
126666
- if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
126667
- // shortcut. no need to expand.
126668
- return [pattern]
126669
- }
126670
-
126671
- return expand(pattern)
126672
- }
126673
-
126674
- var MAX_PATTERN_LENGTH = 1024 * 64
126675
- var assertValidPattern = function (pattern) {
126676
- if (typeof pattern !== 'string') {
126677
- throw new TypeError('invalid pattern')
126678
- }
126679
-
126680
- if (pattern.length > MAX_PATTERN_LENGTH) {
126681
- throw new TypeError('pattern is too long')
126682
- }
126683
- }
126684
-
126685
- // parse a component of the expanded set.
126686
- // At this point, no pattern may contain "/" in it
126687
- // so we're going to return a 2d array, where each entry is the full
126688
- // pattern, split on '/', and then turned into a regular expression.
126689
- // A regexp is made at the end which joins each array with an
126690
- // escaped /, and another full one which joins each regexp with |.
126691
- //
126692
- // Following the lead of Bash 4.1, note that "**" only has special meaning
126693
- // when it is the *only* thing in a path portion. Otherwise, any series
126694
- // of * is equivalent to a single *. Globstar behavior is enabled by
126695
- // default, and can be disabled by setting options.noglobstar.
126696
- Minimatch.prototype.parse = parse
126697
- var SUBPARSE = {}
126698
- function parse (pattern, isSub) {
126699
- assertValidPattern(pattern)
126700
-
126701
- var options = this.options
126702
-
126703
- // shortcuts
126704
- if (pattern === '**') {
126705
- if (!options.noglobstar)
126706
- return GLOBSTAR
126707
- else
126708
- pattern = '*'
126709
- }
126710
- if (pattern === '') return ''
126711
-
126712
- var re = ''
126713
- var hasMagic = !!options.nocase
126714
- var escaping = false
126715
- // ? => one single character
126716
- var patternListStack = []
126717
- var negativeLists = []
126718
- var stateChar
126719
- var inClass = false
126720
- var reClassStart = -1
126721
- var classStart = -1
126722
- // . and .. never match anything that doesn't start with .,
126723
- // even when options.dot is set.
126724
- var patternStart = pattern.charAt(0) === '.' ? '' // anything
126725
- // not (start or / followed by . or .. followed by / or end)
126726
- : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
126727
- : '(?!\\.)'
126728
- var self = this
126729
-
126730
- function clearStateChar () {
126731
- if (stateChar) {
126732
- // we had some state-tracking character
126733
- // that wasn't consumed by this pass.
126734
- switch (stateChar) {
126735
- case '*':
126736
- re += star
126737
- hasMagic = true
126738
- break
126739
- case '?':
126740
- re += qmark
126741
- hasMagic = true
126742
- break
126743
- default:
126744
- re += '\\' + stateChar
126745
- break
126746
- }
126747
- self.debug('clearStateChar %j %j', stateChar, re)
126748
- stateChar = false
126749
- }
126750
- }
126751
-
126752
- for (var i = 0, len = pattern.length, c
126753
- ; (i < len) && (c = pattern.charAt(i))
126754
- ; i++) {
126755
- this.debug('%s\t%s %s %j', pattern, i, re, c)
126756
-
126757
- // skip over any that are escaped.
126758
- if (escaping && reSpecials[c]) {
126759
- re += '\\' + c
126760
- escaping = false
126761
- continue
126762
- }
126763
-
126764
- switch (c) {
126765
- /* istanbul ignore next */
126766
- case '/': {
126767
- // completely not allowed, even escaped.
126768
- // Should already be path-split by now.
126769
- return false
126770
- }
126771
-
126772
- case '\\':
126773
- clearStateChar()
126774
- escaping = true
126775
- continue
126776
-
126777
- // the various stateChar values
126778
- // for the "extglob" stuff.
126779
- case '?':
126780
- case '*':
126781
- case '+':
126782
- case '@':
126783
- case '!':
126784
- this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
126785
-
126786
- // all of those are literals inside a class, except that
126787
- // the glob [!a] means [^a] in regexp
126788
- if (inClass) {
126789
- this.debug(' in class')
126790
- if (c === '!' && i === classStart + 1) c = '^'
126791
- re += c
126792
- continue
126793
- }
126794
-
126795
- // coalesce consecutive non-globstar * characters
126796
- if (c === '*' && stateChar === '*') continue
126797
-
126798
- // if we already have a stateChar, then it means
126799
- // that there was something like ** or +? in there.
126800
- // Handle the stateChar, then proceed with this one.
126801
- self.debug('call clearStateChar %j', stateChar)
126802
- clearStateChar()
126803
- stateChar = c
126804
- // if extglob is disabled, then +(asdf|foo) isn't a thing.
126805
- // just clear the statechar *now*, rather than even diving into
126806
- // the patternList stuff.
126807
- if (options.noext) clearStateChar()
126808
- continue
126809
-
126810
- case '(':
126811
- if (inClass) {
126812
- re += '('
126813
- continue
126814
- }
126815
-
126816
- if (!stateChar) {
126817
- re += '\\('
126818
- continue
126819
- }
126820
-
126821
- patternListStack.push({
126822
- type: stateChar,
126823
- start: i - 1,
126824
- reStart: re.length,
126825
- open: plTypes[stateChar].open,
126826
- close: plTypes[stateChar].close
126827
- })
126828
- // negation is (?:(?!js)[^/]*)
126829
- re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
126830
- this.debug('plType %j %j', stateChar, re)
126831
- stateChar = false
126832
- continue
126833
-
126834
- case ')':
126835
- if (inClass || !patternListStack.length) {
126836
- re += '\\)'
126837
- continue
126838
- }
126839
-
126840
- clearStateChar()
126841
- hasMagic = true
126842
- var pl = patternListStack.pop()
126843
- // negation is (?:(?!js)[^/]*)
126844
- // The others are (?:<pattern>)<type>
126845
- re += pl.close
126846
- if (pl.type === '!') {
126847
- negativeLists.push(pl)
126848
- }
126849
- pl.reEnd = re.length
126850
- continue
126851
-
126852
- case '|':
126853
- if (inClass || !patternListStack.length || escaping) {
126854
- re += '\\|'
126855
- escaping = false
126856
- continue
126857
- }
126858
-
126859
- clearStateChar()
126860
- re += '|'
126861
- continue
126862
-
126863
- // these are mostly the same in regexp and glob
126864
- case '[':
126865
- // swallow any state-tracking char before the [
126866
- clearStateChar()
126867
-
126868
- if (inClass) {
126869
- re += '\\' + c
126870
- continue
126871
- }
126872
-
126873
- inClass = true
126874
- classStart = i
126875
- reClassStart = re.length
126876
- re += c
126877
- continue
126878
-
126879
- case ']':
126880
- // a right bracket shall lose its special
126881
- // meaning and represent itself in
126882
- // a bracket expression if it occurs
126883
- // first in the list. -- POSIX.2 2.8.3.2
126884
- if (i === classStart + 1 || !inClass) {
126885
- re += '\\' + c
126886
- escaping = false
126887
- continue
126888
- }
126889
-
126890
- // handle the case where we left a class open.
126891
- // "[z-a]" is valid, equivalent to "\[z-a\]"
126892
- // split where the last [ was, make sure we don't have
126893
- // an invalid re. if so, re-walk the contents of the
126894
- // would-be class to re-translate any characters that
126895
- // were passed through as-is
126896
- // TODO: It would probably be faster to determine this
126897
- // without a try/catch and a new RegExp, but it's tricky
126898
- // to do safely. For now, this is safe and works.
126899
- var cs = pattern.substring(classStart + 1, i)
126900
- try {
126901
- RegExp('[' + cs + ']')
126902
- } catch (er) {
126903
- // not a valid class!
126904
- var sp = this.parse(cs, SUBPARSE)
126905
- re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
126906
- hasMagic = hasMagic || sp[1]
126907
- inClass = false
126908
- continue
126909
- }
126910
-
126911
- // finish up the class.
126912
- hasMagic = true
126913
- inClass = false
126914
- re += c
126915
- continue
126916
-
126917
- default:
126918
- // swallow any state char that wasn't consumed
126919
- clearStateChar()
126920
-
126921
- if (escaping) {
126922
- // no need
126923
- escaping = false
126924
- } else if (reSpecials[c]
126925
- && !(c === '^' && inClass)) {
126926
- re += '\\'
126927
- }
126928
-
126929
- re += c
126930
-
126931
- } // switch
126932
- } // for
126933
-
126934
- // handle the case where we left a class open.
126935
- // "[abc" is valid, equivalent to "\[abc"
126936
- if (inClass) {
126937
- // split where the last [ was, and escape it
126938
- // this is a huge pita. We now have to re-walk
126939
- // the contents of the would-be class to re-translate
126940
- // any characters that were passed through as-is
126941
- cs = pattern.substr(classStart + 1)
126942
- sp = this.parse(cs, SUBPARSE)
126943
- re = re.substr(0, reClassStart) + '\\[' + sp[0]
126944
- hasMagic = hasMagic || sp[1]
126945
- }
126946
-
126947
- // handle the case where we had a +( thing at the *end*
126948
- // of the pattern.
126949
- // each pattern list stack adds 3 chars, and we need to go through
126950
- // and escape any | chars that were passed through as-is for the regexp.
126951
- // Go through and escape them, taking care not to double-escape any
126952
- // | chars that were already escaped.
126953
- for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
126954
- var tail = re.slice(pl.reStart + pl.open.length)
126955
- this.debug('setting tail', re, pl)
126956
- // maybe some even number of \, then maybe 1 \, followed by a |
126957
- tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
126958
- if (!$2) {
126959
- // the | isn't already escaped, so escape it.
126960
- $2 = '\\'
126961
- }
126962
-
126963
- // need to escape all those slashes *again*, without escaping the
126964
- // one that we need for escaping the | character. As it works out,
126965
- // escaping an even number of slashes can be done by simply repeating
126966
- // it exactly after itself. That's why this trick works.
126967
- //
126968
- // I am sorry that you have to see this.
126969
- return $1 + $1 + $2 + '|'
126970
- })
126971
-
126972
- this.debug('tail=%j\n %s', tail, tail, pl, re)
126973
- var t = pl.type === '*' ? star
126974
- : pl.type === '?' ? qmark
126975
- : '\\' + pl.type
126976
-
126977
- hasMagic = true
126978
- re = re.slice(0, pl.reStart) + t + '\\(' + tail
126979
- }
126980
-
126981
- // handle trailing things that only matter at the very end.
126982
- clearStateChar()
126983
- if (escaping) {
126984
- // trailing \\
126985
- re += '\\\\'
126986
- }
126987
-
126988
- // only need to apply the nodot start if the re starts with
126989
- // something that could conceivably capture a dot
126990
- var addPatternStart = false
126991
- switch (re.charAt(0)) {
126992
- case '[': case '.': case '(': addPatternStart = true
126993
- }
126994
-
126995
- // Hack to work around lack of negative lookbehind in JS
126996
- // A pattern like: *.!(x).!(y|z) needs to ensure that a name
126997
- // like 'a.xyz.yz' doesn't match. So, the first negative
126998
- // lookahead, has to look ALL the way ahead, to the end of
126999
- // the pattern.
127000
- for (var n = negativeLists.length - 1; n > -1; n--) {
127001
- var nl = negativeLists[n]
127002
-
127003
- var nlBefore = re.slice(0, nl.reStart)
127004
- var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
127005
- var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
127006
- var nlAfter = re.slice(nl.reEnd)
127007
-
127008
- nlLast += nlAfter
127009
-
127010
- // Handle nested stuff like *(*.js|!(*.json)), where open parens
127011
- // mean that we should *not* include the ) in the bit that is considered
127012
- // "after" the negated section.
127013
- var openParensBefore = nlBefore.split('(').length - 1
127014
- var cleanAfter = nlAfter
127015
- for (i = 0; i < openParensBefore; i++) {
127016
- cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
127017
- }
127018
- nlAfter = cleanAfter
127019
-
127020
- var dollar = ''
127021
- if (nlAfter === '' && isSub !== SUBPARSE) {
127022
- dollar = '$'
127023
- }
127024
- var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
127025
- re = newRe
127026
- }
127027
-
127028
- // if the re is not "" at this point, then we need to make sure
127029
- // it doesn't match against an empty path part.
127030
- // Otherwise a/* will match a/, which it should not.
127031
- if (re !== '' && hasMagic) {
127032
- re = '(?=.)' + re
127033
- }
127034
-
127035
- if (addPatternStart) {
127036
- re = patternStart + re
127037
- }
127038
-
127039
- // parsing just a piece of a larger pattern.
127040
- if (isSub === SUBPARSE) {
127041
- return [re, hasMagic]
127042
- }
127043
-
127044
- // skip the regexp for non-magical patterns
127045
- // unescape anything in it, though, so that it'll be
127046
- // an exact match against a file etc.
127047
- if (!hasMagic) {
127048
- return globUnescape(pattern)
127049
- }
127050
-
127051
- var flags = options.nocase ? 'i' : ''
127052
- try {
127053
- var regExp = new RegExp('^' + re + '$', flags)
127054
- } catch (er) /* istanbul ignore next - should be impossible */ {
127055
- // If it was an invalid regular expression, then it can't match
127056
- // anything. This trick looks for a character after the end of
127057
- // the string, which is of course impossible, except in multi-line
127058
- // mode, but it's not a /m regex.
127059
- return new RegExp('$.')
127060
- }
127061
-
127062
- regExp._glob = pattern
127063
- regExp._src = re
127064
-
127065
- return regExp
127066
- }
127067
-
127068
- minimatch.makeRe = function (pattern, options) {
127069
- return new Minimatch(pattern, options || {}).makeRe()
127070
- }
127071
-
127072
- Minimatch.prototype.makeRe = makeRe
127073
- function makeRe () {
127074
- if (this.regexp || this.regexp === false) return this.regexp
127075
-
127076
- // at this point, this.set is a 2d array of partial
127077
- // pattern strings, or "**".
127078
- //
127079
- // It's better to use .match(). This function shouldn't
127080
- // be used, really, but it's pretty convenient sometimes,
127081
- // when you just want to work with a regex.
127082
- var set = this.set
127083
-
127084
- if (!set.length) {
127085
- this.regexp = false
127086
- return this.regexp
127087
- }
127088
- var options = this.options
127089
-
127090
- var twoStar = options.noglobstar ? star
127091
- : options.dot ? twoStarDot
127092
- : twoStarNoDot
127093
- var flags = options.nocase ? 'i' : ''
127094
-
127095
- var re = set.map(function (pattern) {
127096
- return pattern.map(function (p) {
127097
- return (p === GLOBSTAR) ? twoStar
127098
- : (typeof p === 'string') ? regExpEscape(p)
127099
- : p._src
127100
- }).join('\\\/')
127101
- }).join('|')
127102
-
127103
- // must match entire pattern
127104
- // ending in a * or ** will make it less strict.
127105
- re = '^(?:' + re + ')$'
127106
-
127107
- // can match anything, as long as it's not this.
127108
- if (this.negate) re = '^(?!' + re + ').*$'
127109
-
127110
- try {
127111
- this.regexp = new RegExp(re, flags)
127112
- } catch (ex) /* istanbul ignore next - should be impossible */ {
127113
- this.regexp = false
127114
- }
127115
- return this.regexp
127116
- }
127117
-
127118
- minimatch.match = function (list, pattern, options) {
127119
- options = options || {}
127120
- var mm = new Minimatch(pattern, options)
127121
- list = list.filter(function (f) {
127122
- return mm.match(f)
127123
- })
127124
- if (mm.options.nonull && !list.length) {
127125
- list.push(pattern)
127126
- }
127127
- return list
127128
- }
127129
-
127130
- Minimatch.prototype.match = function match (f, partial) {
127131
- if (typeof partial === 'undefined') partial = this.partial
127132
- this.debug('match', f, this.pattern)
127133
- // short-circuit in the case of busted things.
127134
- // comments, etc.
127135
- if (this.comment) return false
127136
- if (this.empty) return f === ''
127137
-
127138
- if (f === '/' && partial) return true
127139
-
127140
- var options = this.options
127141
-
127142
- // windows: need to use /, not \
127143
- if (path.sep !== '/') {
127144
- f = f.split(path.sep).join('/')
127145
- }
127146
-
127147
- // treat the test path as a set of pathparts.
127148
- f = f.split(slashSplit)
127149
- this.debug(this.pattern, 'split', f)
127150
-
127151
- // just ONE of the pattern sets in this.set needs to match
127152
- // in order for it to be valid. If negating, then just one
127153
- // match means that we have failed.
127154
- // Either way, return on the first hit.
127155
-
127156
- var set = this.set
127157
- this.debug(this.pattern, 'set', set)
127158
-
127159
- // Find the basename of the path by looking for the last non-empty segment
127160
- var filename
127161
- var i
127162
- for (i = f.length - 1; i >= 0; i--) {
127163
- filename = f[i]
127164
- if (filename) break
127165
- }
127166
-
127167
- for (i = 0; i < set.length; i++) {
127168
- var pattern = set[i]
127169
- var file = f
127170
- if (options.matchBase && pattern.length === 1) {
127171
- file = [filename]
127172
- }
127173
- var hit = this.matchOne(file, pattern, partial)
127174
- if (hit) {
127175
- if (options.flipNegate) return true
127176
- return !this.negate
127177
- }
127178
- }
127179
-
127180
- // didn't get any hits. this is success if it's a negative
127181
- // pattern, failure otherwise.
127182
- if (options.flipNegate) return false
127183
- return this.negate
127184
- }
127185
-
127186
- // set partial to true to test if, for example,
127187
- // "/a/b" matches the start of "/*/b/*/d"
127188
- // Partial means, if you run out of file before you run
127189
- // out of pattern, then that's fine, as long as all
127190
- // the parts match.
127191
- Minimatch.prototype.matchOne = function (file, pattern, partial) {
127192
- if (pattern.indexOf(GLOBSTAR) !== -1) {
127193
- return this._matchGlobstar(file, pattern, partial, 0, 0)
127194
- }
127195
- return this._matchOne(file, pattern, partial, 0, 0)
127196
- }
127197
-
127198
- Minimatch.prototype._matchGlobstar = function (file, pattern, partial, fileIndex, patternIndex) {
127199
- var i
127200
-
127201
- // find first globstar from patternIndex
127202
- var firstgs = -1
127203
- for (i = patternIndex; i < pattern.length; i++) {
127204
- if (pattern[i] === GLOBSTAR) { firstgs = i; break }
127205
- }
127206
-
127207
- // find last globstar
127208
- var lastgs = -1
127209
- for (i = pattern.length - 1; i >= 0; i--) {
127210
- if (pattern[i] === GLOBSTAR) { lastgs = i; break }
127211
- }
127212
-
127213
- var head = pattern.slice(patternIndex, firstgs)
127214
- var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs)
127215
- var tail = partial ? [] : pattern.slice(lastgs + 1)
127216
-
127217
- // check the head
127218
- if (head.length) {
127219
- var fileHead = file.slice(fileIndex, fileIndex + head.length)
127220
- if (!this._matchOne(fileHead, head, partial, 0, 0)) {
127221
- return false
127222
- }
127223
- fileIndex += head.length
127224
- }
127225
-
127226
- // check the tail
127227
- var fileTailMatch = 0
127228
- if (tail.length) {
127229
- if (tail.length + fileIndex > file.length) return false
127230
-
127231
- var tailStart = file.length - tail.length
127232
- if (this._matchOne(file, tail, partial, tailStart, 0)) {
127233
- fileTailMatch = tail.length
127234
- } else {
127235
- // affordance for stuff like a/**/* matching a/b/
127236
- if (file[file.length - 1] !== '' ||
127237
- fileIndex + tail.length === file.length) {
127238
- return false
127239
- }
127240
- tailStart--
127241
- if (!this._matchOne(file, tail, partial, tailStart, 0)) {
127242
- return false
127243
- }
127244
- fileTailMatch = tail.length + 1
127245
- }
127246
- }
127247
-
127248
- // if body is empty (single ** between head and tail)
127249
- if (!body.length) {
127250
- var sawSome = !!fileTailMatch
127251
- for (i = fileIndex; i < file.length - fileTailMatch; i++) {
127252
- var f = String(file[i])
127253
- sawSome = true
127254
- if (f === '.' || f === '..' ||
127255
- (!this.options.dot && f.charAt(0) === '.')) {
127256
- return false
127257
- }
127258
- }
127259
- return partial || sawSome
127260
- }
127261
-
127262
- // split body into segments at each GLOBSTAR
127263
- var bodySegments = [[[], 0]]
127264
- var currentBody = bodySegments[0]
127265
- var nonGsParts = 0
127266
- var nonGsPartsSums = [0]
127267
- for (var bi = 0; bi < body.length; bi++) {
127268
- var b = body[bi]
127269
- if (b === GLOBSTAR) {
127270
- nonGsPartsSums.push(nonGsParts)
127271
- currentBody = [[], 0]
127272
- bodySegments.push(currentBody)
127273
- } else {
127274
- currentBody[0].push(b)
127275
- nonGsParts++
127276
- }
127277
- }
127278
-
127279
- var idx = bodySegments.length - 1
127280
- var fileLength = file.length - fileTailMatch
127281
- for (var si = 0; si < bodySegments.length; si++) {
127282
- bodySegments[si][1] = fileLength -
127283
- (nonGsPartsSums[idx--] + bodySegments[si][0].length)
127284
- }
127285
-
127286
- return !!this._matchGlobStarBodySections(
127287
- file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch
127288
- )
127289
- }
127290
-
127291
- // return false for "nope, not matching"
127292
- // return null for "not matching, cannot keep trying"
127293
- Minimatch.prototype._matchGlobStarBodySections = function (
127294
- file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail
127295
- ) {
127296
- var bs = bodySegments[bodyIndex]
127297
- if (!bs) {
127298
- // just make sure there are no bad dots
127299
- for (var i = fileIndex; i < file.length; i++) {
127300
- sawTail = true
127301
- var f = file[i]
127302
- if (f === '.' || f === '..' ||
127303
- (!this.options.dot && f.charAt(0) === '.')) {
127304
- return false
127305
- }
127306
- }
127307
- return sawTail
127308
- }
127309
-
127310
- var body = bs[0]
127311
- var after = bs[1]
127312
- while (fileIndex <= after) {
127313
- var m = this._matchOne(
127314
- file.slice(0, fileIndex + body.length),
127315
- body,
127316
- partial,
127317
- fileIndex,
127318
- 0
127319
- )
127320
- // if limit exceeded, no match. intentional false negative,
127321
- // acceptable break in correctness for security.
127322
- if (m && globStarDepth < this.maxGlobstarRecursion) {
127323
- var sub = this._matchGlobStarBodySections(
127324
- file, bodySegments,
127325
- fileIndex + body.length, bodyIndex + 1,
127326
- partial, globStarDepth + 1, sawTail
127327
- )
127328
- if (sub !== false) {
127329
- return sub
127330
- }
127331
- }
127332
- var f = file[fileIndex]
127333
- if (f === '.' || f === '..' ||
127334
- (!this.options.dot && f.charAt(0) === '.')) {
127335
- return false
127336
- }
127337
- fileIndex++
127338
- }
127339
- return partial || null
127340
- }
127341
-
127342
- Minimatch.prototype._matchOne = function (file, pattern, partial, fileIndex, patternIndex) {
127343
- var fi, pi, fl, pl
127344
- for (
127345
- fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length
127346
- ; (fi < fl) && (pi < pl)
127347
- ; fi++, pi++
127348
- ) {
127349
- this.debug('matchOne loop')
127350
- var p = pattern[pi]
127351
- var f = file[fi]
127352
-
127353
- this.debug(pattern, p, f)
127354
-
127355
- // should be impossible.
127356
- // some invalid regexp stuff in the set.
127357
- /* istanbul ignore if */
127358
- if (p === false || p === GLOBSTAR) return false
127359
-
127360
- // something other than **
127361
- // non-magic patterns just have to match exactly
127362
- // patterns with magic have been turned into regexps.
127363
- var hit
127364
- if (typeof p === 'string') {
127365
- hit = f === p
127366
- this.debug('string match', p, f, hit)
127367
- } else {
127368
- hit = f.match(p)
127369
- this.debug('pattern match', p, f, hit)
127370
- }
127371
-
127372
- if (!hit) return false
127373
- }
127374
-
127375
- // now either we fell off the end of the pattern, or we're done.
127376
- if (fi === fl && pi === pl) {
127377
- // ran out of pattern and filename at the same time.
127378
- // an exact hit!
127379
- return true
127380
- } else if (fi === fl) {
127381
- // ran out of file, but still had pattern left.
127382
- // this is ok if we're doing the match as part of
127383
- // a glob fs traversal.
127384
- return partial
127385
- } else /* istanbul ignore else */ if (pi === pl) {
127386
- // ran out of pattern, still have file left.
127387
- // this is only acceptable if we're on the very last
127388
- // empty segment of a file with a trailing slash.
127389
- // a/* should match a/b/
127390
- return (fi === fl - 1) && (file[fi] === '')
127391
- }
127392
-
127393
- // should be unreachable.
127394
- /* istanbul ignore next */
127395
- throw new Error('wtf?')
127396
- }
127397
-
127398
- // replace stuff like \* with *
127399
- function globUnescape (s) {
127400
- return s.replace(/\\(.)/g, '$1')
127401
- }
127402
-
127403
- function regExpEscape (s) {
127404
- return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
127405
- }
127406
-
127407
-
127408
- /***/ },
127409
-
127410
- /***/ "./node_modules/once/once.js"
127411
- /*!***********************************!*\
127412
- !*** ./node_modules/once/once.js ***!
127413
- \***********************************/
127414
- (module, __unused_webpack_exports, __webpack_require__) {
127415
-
127416
- var wrappy = __webpack_require__(/*! wrappy */ "./node_modules/wrappy/wrappy.js")
127417
- module.exports = wrappy(once)
127418
- module.exports.strict = wrappy(onceStrict)
127419
-
127420
- once.proto = once(function () {
127421
- Object.defineProperty(Function.prototype, 'once', {
127422
- value: function () {
127423
- return once(this)
127424
- },
127425
- configurable: true
127426
- })
127427
-
127428
- Object.defineProperty(Function.prototype, 'onceStrict', {
127429
- value: function () {
127430
- return onceStrict(this)
127431
- },
127432
- configurable: true
127433
- })
127434
- })
127435
-
127436
- function once (fn) {
127437
- var f = function () {
127438
- if (f.called) return f.value
127439
- f.called = true
127440
- return f.value = fn.apply(this, arguments)
127441
- }
127442
- f.called = false
127443
- return f
127444
- }
127445
-
127446
- function onceStrict (fn) {
127447
- var f = function () {
127448
- if (f.called)
127449
- throw new Error(f.onceError)
127450
- f.called = true
127451
- return f.value = fn.apply(this, arguments)
127452
- }
127453
- var name = fn.name || 'Function wrapped with `once`'
127454
- f.onceError = name + " shouldn't be called more than once"
127455
- f.called = false
127456
- return f
127457
- }
127458
-
127459
-
127460
- /***/ },
127461
-
127462
- /***/ "./node_modules/p-limit/index.js"
127463
- /*!***************************************!*\
127464
- !*** ./node_modules/p-limit/index.js ***!
127465
- \***************************************/
127466
- (module, __unused_webpack_exports, __webpack_require__) {
127467
-
127468
- "use strict";
127469
-
127470
- const Queue = __webpack_require__(/*! yocto-queue */ "./node_modules/yocto-queue/index.js");
127471
-
127472
- const pLimit = concurrency => {
127473
- if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
127474
- throw new TypeError('Expected `concurrency` to be a number from 1 and up');
127475
- }
127476
-
127477
- const queue = new Queue();
127478
- let activeCount = 0;
127479
-
127480
- const next = () => {
127481
- activeCount--;
127482
-
127483
- if (queue.size > 0) {
127484
- queue.dequeue()();
127485
- }
127486
- };
127487
-
127488
- const run = async (fn, resolve, ...args) => {
127489
- activeCount++;
127490
-
127491
- const result = (async () => fn(...args))();
127492
-
127493
- resolve(result);
127494
-
127495
- try {
127496
- await result;
127497
- } catch {}
127498
-
127499
- next();
127500
- };
127501
-
127502
- const enqueue = (fn, resolve, ...args) => {
127503
- queue.enqueue(run.bind(null, fn, resolve, ...args));
127504
-
127505
- (async () => {
127506
- // This function needs to wait until the next microtask before comparing
127507
- // `activeCount` to `concurrency`, because `activeCount` is updated asynchronously
127508
- // when the run function is dequeued and called. The comparison in the if-statement
127509
- // needs to happen asynchronously as well to get an up-to-date value for `activeCount`.
127510
- await Promise.resolve();
127511
-
127512
- if (activeCount < concurrency && queue.size > 0) {
127513
- queue.dequeue()();
127514
- }
127515
- })();
127516
- };
127517
-
127518
- const generator = (fn, ...args) => new Promise(resolve => {
127519
- enqueue(fn, resolve, ...args);
127520
- });
127521
-
127522
- Object.defineProperties(generator, {
127523
- activeCount: {
127524
- get: () => activeCount
127525
- },
127526
- pendingCount: {
127527
- get: () => queue.size
127528
- },
127529
- clearQueue: {
127530
- value: () => {
127531
- queue.clear();
127532
- }
127533
- }
127534
- });
127535
-
127536
- return generator;
127537
- };
127538
-
127539
- module.exports = pLimit;
127540
-
127541
-
127542
- /***/ },
127543
-
127544
- /***/ "./node_modules/path-is-absolute/index.js"
127545
- /*!************************************************!*\
127546
- !*** ./node_modules/path-is-absolute/index.js ***!
127547
- \************************************************/
127548
- (module) {
127549
-
127550
- "use strict";
127551
-
127552
-
127553
- function posix(path) {
127554
- return path.charAt(0) === '/';
127555
- }
127556
-
127557
- function win32(path) {
127558
- // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
127559
- var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
127560
- var result = splitDeviceRe.exec(path);
127561
- var device = result[1] || '';
127562
- var isUnc = Boolean(device && device.charAt(1) !== ':');
127563
-
127564
- // UNC paths are always absolute
127565
- return Boolean(result[2] || isUnc);
127566
- }
127567
-
127568
- module.exports = process.platform === 'win32' ? win32 : posix;
127569
- module.exports.posix = posix;
127570
- module.exports.win32 = win32;
127571
-
127572
-
127573
124043
  /***/ },
127574
124044
 
127575
124045
  /***/ "./node_modules/progress/index.js"
@@ -129909,7 +126379,7 @@ const isSourceNode = "$$$isSourceNode$$$";
129909
126379
  class SourceNode {
129910
126380
  constructor(aLine, aColumn, aSource, aChunks, aName) {
129911
126381
  this.children = [];
129912
- this.sourceContents = {};
126382
+ this.sourceContents = Object.create(null);
129913
126383
  this.line = aLine == null ? null : aLine;
129914
126384
  this.column = aColumn == null ? null : aColumn;
129915
126385
  this.source = aSource == null ? null : aSource;
@@ -130948,138 +127418,6 @@ exports.SourceMapConsumer = __webpack_require__(/*! ./lib/source-map-consumer */
130948
127418
  exports.SourceNode = __webpack_require__(/*! ./lib/source-node */ "./node_modules/source-map/lib/source-node.js").SourceNode;
130949
127419
 
130950
127420
 
130951
- /***/ },
130952
-
130953
- /***/ "./node_modules/wrappy/wrappy.js"
130954
- /*!***************************************!*\
130955
- !*** ./node_modules/wrappy/wrappy.js ***!
130956
- \***************************************/
130957
- (module) {
130958
-
130959
- // Returns a wrapper function that returns a wrapped callback
130960
- // The wrapper function should do some stuff, and return a
130961
- // presumably different callback function.
130962
- // This makes sure that own properties are retained, so that
130963
- // decorations and such are not lost along the way.
130964
- module.exports = wrappy
130965
- function wrappy (fn, cb) {
130966
- if (fn && cb) return wrappy(fn)(cb)
130967
-
130968
- if (typeof fn !== 'function')
130969
- throw new TypeError('need wrapper function')
130970
-
130971
- Object.keys(fn).forEach(function (k) {
130972
- wrapper[k] = fn[k]
130973
- })
130974
-
130975
- return wrapper
130976
-
130977
- function wrapper() {
130978
- var args = new Array(arguments.length)
130979
- for (var i = 0; i < args.length; i++) {
130980
- args[i] = arguments[i]
130981
- }
130982
- var ret = fn.apply(this, args)
130983
- var cb = args[args.length-1]
130984
- if (typeof ret === 'function' && ret !== cb) {
130985
- Object.keys(cb).forEach(function (k) {
130986
- ret[k] = cb[k]
130987
- })
130988
- }
130989
- return ret
130990
- }
130991
- }
130992
-
130993
-
130994
- /***/ },
130995
-
130996
- /***/ "./node_modules/yocto-queue/index.js"
130997
- /*!*******************************************!*\
130998
- !*** ./node_modules/yocto-queue/index.js ***!
130999
- \*******************************************/
131000
- (module) {
131001
-
131002
- class Node {
131003
- /// value;
131004
- /// next;
131005
-
131006
- constructor(value) {
131007
- this.value = value;
131008
-
131009
- // TODO: Remove this when targeting Node.js 12.
131010
- this.next = undefined;
131011
- }
131012
- }
131013
-
131014
- class Queue {
131015
- // TODO: Use private class fields when targeting Node.js 12.
131016
- // #_head;
131017
- // #_tail;
131018
- // #_size;
131019
-
131020
- constructor() {
131021
- this.clear();
131022
- }
131023
-
131024
- enqueue(value) {
131025
- const node = new Node(value);
131026
-
131027
- if (this._head) {
131028
- this._tail.next = node;
131029
- this._tail = node;
131030
- } else {
131031
- this._head = node;
131032
- this._tail = node;
131033
- }
131034
-
131035
- this._size++;
131036
- }
131037
-
131038
- dequeue() {
131039
- const current = this._head;
131040
- if (!current) {
131041
- return;
131042
- }
131043
-
131044
- this._head = this._head.next;
131045
- this._size--;
131046
- return current.value;
131047
- }
131048
-
131049
- clear() {
131050
- this._head = undefined;
131051
- this._tail = undefined;
131052
- this._size = 0;
131053
- }
131054
-
131055
- get size() {
131056
- return this._size;
131057
- }
131058
-
131059
- * [Symbol.iterator]() {
131060
- let current = this._head;
131061
-
131062
- while (current) {
131063
- yield current.value;
131064
- current = current.next;
131065
- }
131066
- }
131067
- }
131068
-
131069
- module.exports = Queue;
131070
-
131071
-
131072
- /***/ },
131073
-
131074
- /***/ "assert"
131075
- /*!*************************!*\
131076
- !*** external "assert" ***!
131077
- \*************************/
131078
- (module) {
131079
-
131080
- "use strict";
131081
- module.exports = require("assert");
131082
-
131083
127421
  /***/ },
131084
127422
 
131085
127423
  /***/ "child_process"
@@ -131104,17 +127442,6 @@ module.exports = require("crypto");
131104
127442
 
131105
127443
  /***/ },
131106
127444
 
131107
- /***/ "events"
131108
- /*!*************************!*\
131109
- !*** external "events" ***!
131110
- \*************************/
131111
- (module) {
131112
-
131113
- "use strict";
131114
- module.exports = require("events");
131115
-
131116
- /***/ },
131117
-
131118
127445
  /***/ "fs"
131119
127446
  /*!*********************!*\
131120
127447
  !*** external "fs" ***!
@@ -131137,6 +127464,28 @@ module.exports = require("module");
131137
127464
 
131138
127465
  /***/ },
131139
127466
 
127467
+ /***/ "node:events"
127468
+ /*!******************************!*\
127469
+ !*** external "node:events" ***!
127470
+ \******************************/
127471
+ (module) {
127472
+
127473
+ "use strict";
127474
+ module.exports = require("node:events");
127475
+
127476
+ /***/ },
127477
+
127478
+ /***/ "node:fs"
127479
+ /*!**************************!*\
127480
+ !*** external "node:fs" ***!
127481
+ \**************************/
127482
+ (module) {
127483
+
127484
+ "use strict";
127485
+ module.exports = require("node:fs");
127486
+
127487
+ /***/ },
127488
+
131140
127489
  /***/ "node:fs/promises"
131141
127490
  /*!***********************************!*\
131142
127491
  !*** external "node:fs/promises" ***!
@@ -131159,6 +127508,50 @@ module.exports = require("node:os");
131159
127508
 
131160
127509
  /***/ },
131161
127510
 
127511
+ /***/ "node:path"
127512
+ /*!****************************!*\
127513
+ !*** external "node:path" ***!
127514
+ \****************************/
127515
+ (module) {
127516
+
127517
+ "use strict";
127518
+ module.exports = require("node:path");
127519
+
127520
+ /***/ },
127521
+
127522
+ /***/ "node:stream"
127523
+ /*!******************************!*\
127524
+ !*** external "node:stream" ***!
127525
+ \******************************/
127526
+ (module) {
127527
+
127528
+ "use strict";
127529
+ module.exports = require("node:stream");
127530
+
127531
+ /***/ },
127532
+
127533
+ /***/ "node:string_decoder"
127534
+ /*!**************************************!*\
127535
+ !*** external "node:string_decoder" ***!
127536
+ \**************************************/
127537
+ (module) {
127538
+
127539
+ "use strict";
127540
+ module.exports = require("node:string_decoder");
127541
+
127542
+ /***/ },
127543
+
127544
+ /***/ "node:url"
127545
+ /*!***************************!*\
127546
+ !*** external "node:url" ***!
127547
+ \***************************/
127548
+ (module) {
127549
+
127550
+ "use strict";
127551
+ module.exports = require("node:url");
127552
+
127553
+ /***/ },
127554
+
131162
127555
  /***/ "os"
131163
127556
  /*!*********************!*\
131164
127557
  !*** external "os" ***!
@@ -131192,17 +127585,6 @@ module.exports = require("url");
131192
127585
 
131193
127586
  /***/ },
131194
127587
 
131195
- /***/ "util"
131196
- /*!***********************!*\
131197
- !*** external "util" ***!
131198
- \***********************/
131199
- (module) {
131200
-
131201
- "use strict";
131202
- module.exports = require("util");
131203
-
131204
- /***/ },
131205
-
131206
127588
  /***/ "./node_modules/fast-xml-parser/lib/fxp.cjs"
131207
127589
  /*!**************************************************!*\
131208
127590
  !*** ./node_modules/fast-xml-parser/lib/fxp.cjs ***!
@@ -131211,6 +127593,21 @@ module.exports = require("util");
131211
127593
 
131212
127594
  (()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{XMLBuilder:()=>Oe,XMLParser:()=>re,XMLValidator:()=>je});const i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("^["+i+"]["+i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function r(t,e){const i=[];let n=e.exec(t);for(;n;){const r=[];r.startIndex=e.lastIndex-n[0].length;const s=n.length;for(let t=0;t<s;t++)r.push(n[t]);i.push(r),n=e.exec(t)}return i}const s=function(t){return!(null==n.exec(t))},o=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],a=["__proto__","constructor","prototype"],l={allowBooleanAttributes:!1,unpairedTags:[]};function p(t,e){e=Object.assign({},l,e);const i=[];let n=!1,r=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let s=0;s<t.length;s++)if("<"===t[s]&&"?"===t[s+1]){if(s+=2,s=h(t,s),s.err)return s}else{if("<"!==t[s]){if(c(t[s]))continue;return y("InvalidChar","char '"+t[s]+"' is not expected.",w(t,s))}{let o=s;if(s++,"!"===t[s]){s=d(t,s);continue}{let a=!1;"/"===t[s]&&(a=!0,s++);let l="";for(;s<t.length&&">"!==t[s]&&" "!==t[s]&&"\t"!==t[s]&&"\n"!==t[s]&&"\r"!==t[s];s++)l+=t[s];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),s--),!E(l)){let e;return e=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",y("InvalidTag",e,w(t,s))}const p=g(t,s);if(!1===p)return y("InvalidAttr","Attributes for '"+l+"' have open quote.",w(t,s));let u=p.value;if(s=p.index,"/"===u[u.length-1]){const i=s-u.length;u=u.substring(0,u.length-1);const r=x(u,e);if(!0!==r)return y(r.err.code,r.err.msg,w(t,i+r.err.line));n=!0}else if(a){if(!p.tagClosed)return y("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",w(t,s));if(u.trim().length>0)return y("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",w(t,o));if(0===i.length)return y("InvalidTag","Closing tag '"+l+"' has not been opened.",w(t,o));{const e=i.pop();if(l!==e.tagName){let i=w(t,e.tagStartPos);return y("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+i.line+", col "+i.col+") instead of closing tag '"+l+"'.",w(t,o))}0==i.length&&(r=!0)}}else{const a=x(u,e);if(!0!==a)return y(a.err.code,a.err.msg,w(t,s-u.length+a.err.line));if(!0===r)return y("InvalidXml","Multiple possible root nodes found.",w(t,s));-1!==e.unpairedTags.indexOf(l)||i.push({tagName:l,tagStartPos:o}),n=!0}for(s++;s<t.length;s++)if("<"===t[s]){if("!"===t[s+1]){s++,s=d(t,s);continue}if("?"!==t[s+1])break;if(s=h(t,++s),s.err)return s}else if("&"===t[s]){const e=b(t,s);if(-1==e)return y("InvalidChar","char '&' is not expected.",w(t,s));s=e}else if(!0===r&&!c(t[s]))return y("InvalidXml","Extra text at the end",w(t,s));"<"===t[s]&&s--}}}return n?1==i.length?y("InvalidTag","Unclosed tag '"+i[0].tagName+"'.",w(t,i[0].tagStartPos)):!(i.length>0)||y("InvalidXml","Invalid '"+JSON.stringify(i.map(t=>t.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):y("InvalidXml","Start tag expected.",1)}function c(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function h(t,e){const i=e;for(;e<t.length;e++)if("?"==t[e]||" "==t[e]){const n=t.substr(i,e-i);if(e>5&&"xml"===n)return y("InvalidXml","XML declaration allowed only at the start of the document.",w(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}continue}return e}function d(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let i=1;for(e+=8;e<t.length;e++)if("<"===t[e])i++;else if(">"===t[e]&&(i--,0===i))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}const u='"',f="'";function g(t,e){let i="",n="",r=!1;for(;e<t.length;e++){if(t[e]===u||t[e]===f)""===n?n=t[e]:n!==t[e]||(n="");else if(">"===t[e]&&""===n){r=!0;break}i+=t[e]}return""===n&&{value:i,index:e,tagClosed:r}}const m=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function x(t,e){const i=r(t,m),n={};for(let t=0;t<i.length;t++){if(0===i[t][1].length)return y("InvalidAttr","Attribute '"+i[t][2]+"' has no space in starting.",v(i[t]));if(void 0!==i[t][3]&&void 0===i[t][4])return y("InvalidAttr","Attribute '"+i[t][2]+"' is without value.",v(i[t]));if(void 0===i[t][3]&&!e.allowBooleanAttributes)return y("InvalidAttr","boolean attribute '"+i[t][2]+"' is not allowed.",v(i[t]));const r=i[t][2];if(!N(r))return y("InvalidAttr","Attribute '"+r+"' is an invalid name.",v(i[t]));if(Object.prototype.hasOwnProperty.call(n,r))return y("InvalidAttr","Attribute '"+r+"' is repeated.",v(i[t]));n[r]=1}return!0}function b(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let i=/\d/;for("x"===t[e]&&(e++,i=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(i))break}return-1}(t,++e);let i=0;for(;e<t.length;e++,i++)if(!(t[e].match(/\w/)&&i<20)){if(";"===t[e])break;return-1}return e}function y(t,e,i){return{err:{code:t,msg:e,line:i.line||i,col:i.col}}}function N(t){return s(t)}function E(t){return s(t)}function w(t,e){const i=t.substring(0,e).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function v(t){return t.startIndex+t[1].length}const S=t=>o.includes(t)?"__"+t:t,A={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0,unicode:!1},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,i){return t},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:S};function T(t,e){if("string"!=typeof t)return;const i=t.toLowerCase();if(o.some(t=>i===t.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);if(a.some(t=>i===t.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`)}function _(t,e){return"boolean"==typeof t?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:"object"==typeof t&&null!==t?{enabled:!1!==t.enabled,maxEntitySize:Math.max(1,t.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,t.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,t.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,t.maxExpandedLength??1e5),maxEntityCount:Math.max(1,t.maxEntityCount??1e3),allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null,appliesTo:t.appliesTo??"all"}:_(!0)}const C=function(t){const e=Object.assign({},A,t),i=[{value:e.attributeNamePrefix,name:"attributeNamePrefix"},{value:e.attributesGroupName,name:"attributesGroupName"},{value:e.textNodeName,name:"textNodeName"},{value:e.cdataPropName,name:"cdataPropName"},{value:e.commentPropName,name:"commentPropName"}];for(const{value:t,name:e}of i)t&&T(t,e);return null===e.onDangerousProperty&&(e.onDangerousProperty=S),e.processEntities=_(e.processEntities,e.htmlEntities),e.unpairedTagsSet=new Set(e.unpairedTags),e.stopNodes&&Array.isArray(e.stopNodes)&&(e.stopNodes=e.stopNodes.map(t=>"string"==typeof t&&t.startsWith("*.")?".."+t.substring(2):t)),e};let $;$="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class P{constructor(t){this.tagname=t,this.child=[],this[":@"]=Object.create(null)}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][$]={startIndex:e})}static getMetaDataSymbol(){return $}}const O=":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�",j=":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",I=j+"\\-\\.\\d·̀-ͯ҇‿-⁀",k=(t,e,i="")=>{const n=`[${t.replace(":","")}][${e.replace(":","")}]*`;return{name:new RegExp(`^[${t}][${e}]*$`,i),ncName:new RegExp(`^${n}$`,i),qName:new RegExp(`^${n}(?::${n})?$`,i),nmToken:new RegExp(`^[${e}]+$`,i),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,i)}},L=k(O,O+"\\-\\.\\d·̀-ͯ‿-⁀"),D=k(j,I,"u"),R=":A-Za-z_",M=k(R,R+"\\-\\.\\d"),V=(t,{xmlVersion:e="1.0",asciiOnly:i=!1}={})=>((t="1.0",e=!1)=>e?M:"1.1"===t?D:L)(e,i).qName.test(t);class q{constructor(t,e){this.suppressValidationErr=!t,this.options=t,this.xmlVersion=e||1}setXmlVersion(t=1){this.xmlVersion=t}readDocType(t,e){const i=Object.create(null);let n=0;if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let r=1,s=!1,o=!1,a="";for(;e<t.length;e++)if("<"!==t[e]||o)if(">"===t[e]){if(o?"-"===t[e-1]&&"-"===t[e-2]&&(o=!1,r--):r--,0===r)break}else"["===t[e]?s=!0:a+=t[e];else{if(s&&U(t,"!ENTITY",e)){let r,s;if(e+=7,[r,s,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),-1===s.indexOf("&")){if(!1!==this.options.enabled&&null!=this.options.maxEntityCount&&n>=this.options.maxEntityCount)throw new Error(`Entity count (${n+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);i[r]=s,n++}}else if(s&&U(t,"!ELEMENT",e)){e+=8;const{index:i}=this.readElementExp(t,e+1);e=i}else if(s&&U(t,"!ATTLIST",e))e+=8;else if(s&&U(t,"!NOTATION",e)){e+=9;const{index:i}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=i}else{if(!U(t,"!--",e))throw new Error("Invalid DOCTYPE");o=!0}r++,a=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:e}}readEntityExp(t,e){const i=e=F(t,e);for(;e<t.length&&!/\s/.test(t[e])&&'"'!==t[e]&&"'"!==t[e];)e++;let n=t.substring(i,e);if(B(n,{xmlVersion:this.xmlVersion}),e=F(t,e),!this.suppressValidationErr){if("SYSTEM"===t.substring(e,e+6).toUpperCase())throw new Error("External entities are not supported");if("%"===t[e])throw new Error("Parameter entities are not supported")}let r="";if([e,r]=this.readIdentifierVal(t,e,"entity"),!1!==this.options.enabled&&null!=this.options.maxEntitySize&&r.length>this.options.maxEntitySize)throw new Error(`Entity "${n}" size (${r.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[n,r,--e]}readNotationExp(t,e){const i=e=F(t,e);for(;e<t.length&&!/\s/.test(t[e]);)e++;let n=t.substring(i,e);!this.suppressValidationErr&&B(n,{xmlVersion:this.xmlVersion}),e=F(t,e);const r=t.substring(e,e+6).toUpperCase();if(!this.suppressValidationErr&&"SYSTEM"!==r&&"PUBLIC"!==r)throw new Error(`Expected SYSTEM or PUBLIC, found "${r}"`);e+=r.length,e=F(t,e);let s=null,o=null;if("PUBLIC"===r)[e,s]=this.readIdentifierVal(t,e,"publicIdentifier"),'"'!==t[e=F(t,e)]&&"'"!==t[e]||([e,o]=this.readIdentifierVal(t,e,"systemIdentifier"));else if("SYSTEM"===r&&([e,o]=this.readIdentifierVal(t,e,"systemIdentifier"),!this.suppressValidationErr&&!o))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:s,systemIdentifier:o,index:--e}}readIdentifierVal(t,e,i){let n="";const r=t[e];if('"'!==r&&"'"!==r)throw new Error(`Expected quoted string, found "${r}"`);const s=++e;for(;e<t.length&&t[e]!==r;)e++;if(n=t.substring(s,e),t[e]!==r)throw new Error(`Unterminated ${i} value`);return[++e,n]}readElementExp(t,e){const i=e=F(t,e);for(;e<t.length&&!/\s/.test(t[e]);)e++;let n=t.substring(i,e);if(!this.suppressValidationErr&&!V(n,{xmlVersion:this.xmlVersion}))throw new Error(`Invalid element name: "${n}"`);let r="";if("E"===t[e=F(t,e)]&&U(t,"MPTY",e))e+=4;else if("A"===t[e]&&U(t,"NY",e))e+=2;else if("("===t[e]){const i=++e;for(;e<t.length&&")"!==t[e];)e++;if(r=t.substring(i,e),")"!==t[e])throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[e]}"`);return{elementName:n,contentModel:r.trim(),index:e}}readAttlistExp(t,e){let i=e=F(t,e);for(;e<t.length&&!/\s/.test(t[e]);)e++;let n=t.substring(i,e);for(B(n,{xmlVersion:this.xmlVersion}),i=e=F(t,e);e<t.length&&!/\s/.test(t[e]);)e++;let r=t.substring(i,e);if(!B(r,{xmlVersion:this.xmlVersion}))throw new Error(`Invalid attribute name: "${r}"`);e=F(t,e);let s="";if("NOTATION"===t.substring(e,e+8).toUpperCase()){if(s="NOTATION","("!==t[e=F(t,e+=8)])throw new Error(`Expected '(', found "${t[e]}"`);e++;let i=[];for(;e<t.length&&")"!==t[e];){const n=e;for(;e<t.length&&"|"!==t[e]&&")"!==t[e];)e++;let r=t.substring(n,e);if(r=r.trim(),!B(r,{xmlVersion:this.xmlVersion}))throw new Error(`Invalid notation name: "${r}"`);i.push(r),"|"===t[e]&&(e++,e=F(t,e))}if(")"!==t[e])throw new Error("Unterminated list of notations");e++,s+=" ("+i.join("|")+")"}else{const i=e;for(;e<t.length&&!/\s/.test(t[e]);)e++;s+=t.substring(i,e);const n=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!n.includes(s.toUpperCase()))throw new Error(`Invalid attribute type: "${s}"`)}e=F(t,e);let o="";return"#REQUIRED"===t.substring(e,e+8).toUpperCase()?(o="#REQUIRED",e+=8):"#IMPLIED"===t.substring(e,e+7).toUpperCase()?(o="#IMPLIED",e+=7):[e,o]=this.readIdentifierVal(t,e,"ATTLIST"),{elementName:n,attributeName:r,attributeType:s,defaultValue:o,index:e}}}const F=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function U(t,e,i){for(let n=0;n<e.length;n++)if(e[n]!==t[i+n+1])return!1;return!0}function B(t,e){if(V(t,{xmlVersion:e}))return t;throw new Error(`Invalid entity name ${t}`)}const G=[48,1632,1776,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,65296,120782,120792,120802,120812,120822,66720,68912,69734,69872,69942,70096,70384,70736,70864,71248,71360,71472,71904,72016,72688,72784,73040,73120,73552,92768,92864,93008,123200,123632,124144,125264,130032],X=new Map,W=1632,z=new Uint8Array(63904).fill(255);for(const t of G)for(let e=0;e<10;e++){const i=t+e;i<=65535?z[i-W]=e:X.set(i,e)}const Y=new Set([8722,65293,65123]),H=/^[-+]?0x[a-fA-F0-9]+$/,Q=/^0b[01]+$/,J=/^0o[0-7]+$/,Z=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,K={hex:!0,binary:!1,octal:!1,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original",unicode:!1};function tt(t,e={}){if(e=Object.assign({},K,e),!t||"string"!=typeof t)return t;let i=t.trim();if(0===i.length)return t;if(void 0!==e.skipLike&&e.skipLike.test(i))return t;if("0"===i)return 0;if(e.unicode&&(i=function(t){if("string"!=typeof t)return t;const e=t.length;if(0===e)return t;let i=-1;for(let n=0;n<e;n++){const r=t.charCodeAt(n);if(!(r>=48&&r<=57||45===r))if(r<W){if(Y.has(r)){i=n;break}}else if(r>=55296&&r<=56319){if(n+1<e){const e=t.charCodeAt(n+1);if(e>=56320&&e<=57343){const t=65536+(r-55296<<10)+(e-56320);if(X.has(t)){i=n;break}}}}else if(255!==z[r-W]||Y.has(r)){i=n;break}}if(-1===i)return t;const n=[];i>0&&n.push(t.slice(0,i));for(let r=i;r<e;r++){const i=t.charCodeAt(r);if(i>=48&&i<=57||45===i){n.push(t[r]);continue}if(i<W){n.push(Y.has(i)?"-":t[r]);continue}if(i>=55296&&i<=56319){if(r+1<e){const e=t.charCodeAt(r+1);if(e>=56320&&e<=57343){const t=65536+(i-55296<<10)+(e-56320),s=X.get(t);if(void 0!==s){n.push(String.fromCharCode(s+48)),r++;continue}}}n.push(t[r]);continue}if(Y.has(i)){n.push("-");continue}const s=z[i-W];n.push(255!==s?String.fromCharCode(s+48):t[r])}return n.join("")}(i),"0"===i))return 0;if(e.hex&&H.test(i))return it(i,16);if(e.binary&&Q.test(i))return it(i,2);if(e.octal&&J.test(i))return it(i,8);if(isFinite(i)){if(i.includes("e")||i.includes("E"))return function(t,e,i){if(!i.eNotation)return t;const n=e.match(et);if(n){let r=n[1]||"";const s=-1===n[3].indexOf("e")?"E":"e",o=n[2],a=r?t[o.length+1]===s:t[o.length]===s;return o.length>1&&a?t:(1!==o.length||!n[3].startsWith(`.${s}`)&&n[3][0]!==s)&&o.length>0?i.leadingZeros&&!a?(e=(n[1]||"")+n[3],Number(e)):t:Number(e)}return t}(t,i,e);{const r=Z.exec(i);if(r){const s=r[1]||"",o=r[2];let a=(n=r[3])&&-1!==n.indexOf(".")?("."===(n=n.replace(/0+$/,""))?n="0":"."===n[0]?n="0"+n:"."===n[n.length-1]&&(n=n.substring(0,n.length-1)),n):n;const l=s?"."===t[o.length+1]:"."===t[o.length];if(!e.leadingZeros&&(o.length>1||1===o.length&&!l))return t;{const n=Number(i),r=String(n);if(0===n)return n;if(-1!==r.search(/[eE]/))return e.eNotation?n:t;if(-1!==i.indexOf("."))return"0"===r||r===a||r===`${s}${a}`?n:t;let l=o?a:i;return o?l===r||s+l===r?n:t:l===r||l===s+r?n:t}}return t}}var n;return function(t,e,i){const n=e===1/0;switch(i.infinity.toLowerCase()){case"null":return null;case"infinity":return e;case"string":return n?"Infinity":"-Infinity";default:return t}}(t,Number(i),e)}const et=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function it(t,e){const i=t.trim();if(2!==e&&8!==e||(t=i.substring(2)),parseInt)return parseInt(t,e);if(Number.parseInt)return Number.parseInt(t,e);if(window&&window.parseInt)return window.parseInt(t,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}class nt{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){const t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){const t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){const e=this._matcher.path;if(0!==e.length)return e[e.length-1].values?.[t]}hasAttr(t){const e=this._matcher.path;if(0===e.length)return!1;const i=e[e.length-1];return void 0!==i.values&&t in i.values}getAnyParentAttr(t){return this._matcher.getAnyParentAttr(t)}hasAnyParentAttr(t){return this._matcher.hasAnyParentAttr(t)}getPosition(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].position??0}getCounter(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class rt{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new nt(this),this._keptAttrs=[]}push(t,e=null,i=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const r=this.path.length;let s=this.siblingStacks[r];s||(s={counts:new Map,total:0},this.siblingStacks[r]=s);const o=i?`${i}:${t}`:t,a=s.counts.get(o)||0,l=s.total;s.counts.set(o,a+1),s.total++;const p={tag:t,position:l,counter:a};null!=i&&(p.namespace=i),null!=e&&(p.values=e),this.path.push(p);const c=this.path.length,h=null!==n?n.keep:null;if(null!=h&&h.length>0&&e)for(let t=0;t<h.length;t++){const i=h[t];void 0!==e[i]&&this._keptAttrs.push({depth:c,name:i,value:e[i]})}}pop(){if(0===this.path.length)return;this._pathStringCache=null;const t=this.path.pop();this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1);const e=this.path.length+1;for(;this._keptAttrs.length>0&&this._keptAttrs[this._keptAttrs.length-1].depth>=e;)this._keptAttrs.pop();return t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];null!=t&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(0!==this.path.length)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(0===this.path.length)return!1;const e=this.path[this.path.length-1];return void 0!==e.values&&t in e.values}getAnyParentAttr(t){const e=this._keptAttrs;for(let i=e.length-1;i>=0;i--)if(e[i].name===t)return e[i].value}hasAnyParentAttr(t){const e=this._keptAttrs;for(let i=e.length-1;i>=0;i--)if(e[i].name===t)return!0;return!1}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const i=t||this.separator;if(i===this.separator&&!0===e){if(null!==this._pathStringCache)return this._pathStringCache;const t=this.path.map(t=>t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(i);return this._pathStringCache=t,t}return this.path.map(t=>e&&t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(i)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[],this._keptAttrs=[]}matches(t){const e=t.segments;return 0!==e.length&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(!this._matchSegment(t[e],this.path[e],e===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(t){let e=this.path.length-1,i=t.length-1;for(;i>=0&&e>=0;){const n=t[i];if("deep-wildcard"===n.type){if(i--,i<0)return!0;const n=t[i];let r=!1;for(let t=e;t>=0;t--)if(this._matchSegment(n,this.path[t],t===this.path.length-1)){e=t-1,i--,r=!0;break}if(!r)return!1}else{if(!this._matchSegment(n,this.path[e],e===this.path.length-1))return!1;e--,i--}}return i<0}_matchSegment(t,e,i){if("*"!==t.tag&&t.tag!==e.tag)return!1;if(void 0!==t.namespace&&"*"!==t.namespace&&t.namespace!==e.namespace)return!1;if(void 0!==t.attrName){if(!i)return!1;if(!e.values||!(t.attrName in e.values))return!1;if(void 0!==t.attrValue&&String(e.values[t.attrName])!==String(t.attrValue))return!1}if(void 0!==t.position){if(!i)return!1;const n=e.counter??0;if("first"===t.position&&0!==n)return!1;if("odd"===t.position&&n%2!=1)return!1;if("even"===t.position&&n%2!=0)return!1;if("nth"===t.position&&n!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>t?{counts:new Map(t.counts),total:t.total}:t),keptAttrs:this._keptAttrs.map(t=>({...t}))}}restore(t){this._pathStringCache=null,this.path=t.path.map(t=>({...t})),this.siblingStacks=t.siblingStacks.map(t=>t?{counts:new Map(t.counts),total:t.total}:t),this._keptAttrs=(t.keptAttrs||[]).map(t=>({...t}))}readOnly(){return this._view}}class st{constructor(t,e={},i){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=i,this._hasDeepWildcard=this.segments.some(t=>"deep-wildcard"===t.type),this._hasAttributeCondition=this.segments.some(t=>void 0!==t.attrName),this._hasPositionSelector=this.segments.some(t=>void 0!==t.position)}_parse(t){const e=[];let i=0,n="";for(;i<t.length;)t[i]===this.separator?i+1<t.length&&t[i+1]===this.separator?(n.trim()&&(e.push(this._parseSegment(n.trim())),n=""),e.push({type:"deep-wildcard"}),i+=2):(n.trim()&&e.push(this._parseSegment(n.trim())),n="",i++):(n+=t[i],i++);return n.trim()&&e.push(this._parseSegment(n.trim())),e}_parseSegment(t){const e={type:"tag"};let i=null,n=t;const r=t.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(r&&(n=r[1]+r[3],r[2])){const t=r[2].slice(1,-1);t&&(i=t)}let s,o,a=n;if(n.includes("::")){const e=n.indexOf("::");if(s=n.substring(0,e).trim(),a=n.substring(e+2).trim(),!s)throw new Error(`Invalid namespace in pattern: ${t}`)}let l=null;if(a.includes(":")){const t=a.lastIndexOf(":"),e=a.substring(0,t).trim(),i=a.substring(t+1).trim();["first","last","odd","even"].includes(i)||/^nth\(\d+\)$/.test(i)?(o=e,l=i):o=a}else o=a;if(!o)throw new Error(`Invalid segment pattern: ${t}`);if(e.tag=o,s&&(e.namespace=s),i)if(i.includes("=")){const t=i.indexOf("=");e.attrName=i.substring(0,t).trim(),e.attrValue=i.substring(t+1).trim()}else e.attrName=i.trim();if(l){const t=l.match(/^nth\((\d+)\)$/);t?(e.position="nth",e.positionValue=parseInt(t[1],10)):e.position=l}return e}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class ot{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._deepByTerminalTag=new Map,this._patterns=new Set,this._sealed=!1}add(t){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(t.pattern))return this;if(this._patterns.add(t.pattern),t.hasDeepWildcard()){const e=t.segments[t.segments.length-1];if(e&&"deep-wildcard"!==e.type&&"*"!==e.tag){const i=e.tag;this._deepByTerminalTag.has(i)||this._deepByTerminalTag.set(i,[]),this._deepByTerminalTag.get(i).push(t)}else this._deepWildcards.push(t);return this}const e=t.length,i=t.segments[t.segments.length-1],n=i?.tag;if(n&&"*"!==n){const i=`${e}:${n}`;this._byDepthAndTag.has(i)||this._byDepthAndTag.set(i,[]),this._byDepthAndTag.get(i).push(t)}else this._wildcardByDepth.has(e)||this._wildcardByDepth.set(e,[]),this._wildcardByDepth.get(e).push(t);return this}addAll(t){for(const e of t)this.add(e);return this}has(t){return this._patterns.has(t.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(t){return null!==this.findMatch(t)}findMatch(t){const e=t.getDepth(),i=t.getCurrentTag(),n=`${e}:${i}`,r=this._byDepthAndTag.get(n);if(r)for(let e=0;e<r.length;e++)if(t.matches(r[e]))return r[e];const s=this._wildcardByDepth.get(e);if(s)for(let e=0;e<s.length;e++)if(t.matches(s[e]))return s[e];const o=this._deepByTerminalTag.get(i);if(o)for(let e=0;e<o.length;e++)if(t.matches(o[e]))return o[e];for(let e=0;e<this._deepWildcards.length;e++)if(t.matches(this._deepWildcards[e]))return this._deepWildcards[e];return null}}const at={cent:"¢",pound:"£",curren:"¤",yen:"¥",euro:"€",dollar:"$",fnof:"ƒ",inr:"₹",af:"؋",birr:"ብር",peso:"₱",rub:"₽",won:"₩",yuan:"¥",cedil:"¸"},lt={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},pt={nbsp:" ",copy:"©",reg:"®",trade:"™",mdash:"—",ndash:"–",hellip:"…",laquo:"«",raquo:"»",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",para:"¶",sect:"§",deg:"°",frac12:"½",frac14:"¼",frac34:"¾"},ct=Object.freeze({ALLOW:"allow",BLOCK:"block",THROW:"throw"}),ht=new Set("!?\\\\/[]$%{}^&*()<>|+");function dt(t){if("#"===t[0])throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${t}"`);for(const e of t)if(ht.has(e))throw new Error(`[EntityReplacer] Invalid character '${e}' in entity name: "${t}"`);return t}function ut(...t){const e=Object.create(null);for(const i of t)if(i)for(const t of Object.keys(i)){const n=i[t];if("string"==typeof n)e[t]=n;else if(n&&"object"==typeof n&&void 0!==n.val){const i=n.val;"string"==typeof i&&(e[t]=i)}}return e}const ft="external",gt="base",mt="all",xt=Object.freeze({allow:0,leave:1,remove:2,throw:3}),bt=new Set([9,10,13]);class yt{constructor(t={}){var e;this._limit=t.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck="function"==typeof t.postCheck?t.postCheck:t=>t,this._limitTiers=(e=this._limit.applyLimitsTo??ft)&&e!==ft?e===mt?new Set([mt]):e===gt?new Set([gt]):Array.isArray(e)?new Set(e):new Set([ft]):new Set([ft]),this._numericAllowed=t.numericAllowed??!0,this._baseMap=ut(lt,t.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(t.remove&&Array.isArray(t.remove)?t.remove:[]),this._leaveSet=new Set(t.leave&&Array.isArray(t.leave)?t.leave:[]);const i=function(t){if(!t)return{xmlVersion:1,onLevel:xt.allow,nullLevel:xt.remove};const e=1.1===t.xmlVersion?1.1:1,i=xt[t.onNCR]??xt.allow,n=xt[t.nullNCR]??xt.remove;return{xmlVersion:e,onLevel:i,nullLevel:Math.max(n,xt.remove)}}(t.ncr);this._ncrXmlVersion=i.xmlVersion,this._ncrOnLevel=i.onLevel,this._ncrNullLevel=i.nullLevel,this._onExternalEntity="function"==typeof t.onExternalEntity?t.onExternalEntity:null,this._onInputEntity="function"==typeof t.onInputEntity?t.onInputEntity:null}_applyRegistrationHook(t,e,i,n){if(!t)return!0;const r=t(e,i);if(r===ct.BLOCK)return!1;if(r===ct.THROW)throw new Error(`[EntityDecoder] Registration of ${n} entity "&${e};" was rejected by hook`);return!0}setExternalEntities(t){if(t)for(const e of Object.keys(t))dt(e);if(!this._onExternalEntity)return void(this._externalMap=ut(t));const e=ut(t),i=Object.create(null);for(const[t,n]of Object.entries(e))this._applyRegistrationHook(this._onExternalEntity,t,n,"external")&&(i[t]=n);this._externalMap=i}addExternalEntity(t,e){dt(t),"string"==typeof e&&-1===e.indexOf("&")&&this._applyRegistrationHook(this._onExternalEntity,t,e,"external")&&(this._externalMap[t]=e)}addInputEntities(t){if(this._totalExpansions=0,this._expandedLength=0,!this._onInputEntity)return void(this._inputMap=ut(t));const e=ut(t),i=Object.create(null);for(const[t,n]of Object.entries(e))this._applyRegistrationHook(this._onInputEntity,t,n,"input")&&(i[t]=n);this._inputMap=i}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(t){this._ncrXmlVersion=1.1===t?1.1:1}decode(t){if("string"!=typeof t||0===t.length)return t;if(-1===t.indexOf("&"))return t;const e=t,i=[],n=t.length;let r=0,s=0;const o=this._maxTotalExpansions>0,a=this._maxExpandedLength>0,l=o||a;for(;s<n;){if(38!==t.charCodeAt(s)){s++;continue}let e=s+1;for(;e<n&&59!==t.charCodeAt(e)&&e-s<=32;)e++;if(e>=n||59!==t.charCodeAt(e)){s++;continue}const p=t.slice(s+1,e);if(0===p.length){s++;continue}let c,h;if(this._removeSet.has(p))c="",void 0===h&&(h=ft);else{if(this._leaveSet.has(p)){s++;continue}if(35===p.charCodeAt(0)){const t=this._resolveNCR(p);if(void 0===t){s++;continue}c=t,h=gt}else{const t=this._resolveName(p);c=t?.value,h=t?.tier}}if(void 0!==c){if(s>r&&i.push(t.slice(r,s)),i.push(c),r=e+1,s=r,l&&this._tierCounts(h)){if(o&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(a){const t=c.length-(p.length+2);if(t>0&&(this._expandedLength+=t,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}else s++}r<n&&i.push(t.slice(r));const p=0===i.length?t:i.join("");return this._postCheck(p,e)}_tierCounts(t){return!!this._limitTiers.has(mt)||this._limitTiers.has(t)}_resolveName(t){return t in this._inputMap?{value:this._inputMap[t],tier:ft}:t in this._externalMap?{value:this._externalMap[t],tier:ft}:t in this._baseMap?{value:this._baseMap[t],tier:gt}:void 0}_classifyNCR(t){return 0===t?this._ncrNullLevel:t>=55296&&t<=57343||1===this._ncrXmlVersion&&t>=1&&t<=31&&!bt.has(t)?xt.remove:-1}_applyNCRAction(t,e,i){switch(t){case xt.allow:return String.fromCodePoint(i);case xt.remove:return"";case xt.leave:return;case xt.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${e}; (U+${i.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(i)}}_resolveNCR(t){const e=t.charCodeAt(1);let i;if(i=120===e||88===e?parseInt(t.slice(2),16):parseInt(t.slice(1),10),Number.isNaN(i)||i<0||i>1114111)return;const n=this._classifyNCR(i);if(!this._numericAllowed&&n<xt.remove)return;const r=-1===n?this._ncrOnLevel:Math.max(this._ncrOnLevel,n);return this._applyNCRAction(r,t,i)}}const Nt=[{id:"sql-block-comment-open",description:"SQL block comment open: /* ... */ — unusual in legitimate user text",pattern:/\/\*/},{id:"sql-union-select",description:"UNION SELECT — most common SQL injection aggregation attack",pattern:/\bUNION\s{1,20}(?:ALL\s{1,20})?SELECT\b/i},{id:"sql-drop-table",description:"DROP TABLE — destructive DDL injection",pattern:/\bDROP\s{1,20}TABLE\b/i},{id:"sql-drop-database",description:"DROP DATABASE — destructive DDL injection",pattern:/\bDROP\s{1,20}DATABASE\b/i},{id:"sql-insert-into",description:"INSERT INTO — data injection",pattern:/\bINSERT\s{1,20}INTO\b/i},{id:"sql-delete-from",description:"DELETE FROM — data deletion injection",pattern:/\bDELETE\s{1,20}FROM\b/i},{id:"sql-update-set",description:"UPDATE ... SET — data modification injection",pattern:/\bUPDATE\b[\s\S]{1,60}\bSET\b/i},{id:"sql-exec-xp",description:"EXEC xp_ — MSSQL extended stored procedure execution",pattern:/\bEXEC(?:UTE)?\s{1,20}xp_/i},{id:"sql-tautology-string",description:'Classic string tautology: \' OR \'1\'=\'1 or " OR "1"="1"',pattern:/'\s{0,10}OR\s{0,10}'[^']{0,20}'\s*=\s*'[^']{0,20}/i},{id:"sql-tautology-numeric",description:"Numeric tautology: OR 1=1",pattern:/\bOR\s{1,10}1\s*=\s*1\b/i},{id:"sql-always-true-zero",description:"Numeric tautology: OR 0=0",pattern:/\bOR\s{1,10}0\s*=\s*0\b/i},{id:"sql-sleep-benchmark",description:"Time-based blind injection: SLEEP() or BENCHMARK()",pattern:/\b(?:SLEEP|BENCHMARK)\s*\(/i},{id:"sql-waitfor-delay",description:"MSSQL time-based blind injection: WAITFOR DELAY",pattern:/\bWAITFOR\s{1,20}DELAY\b/i},{id:"sql-char-function",description:"CHAR() function — used to obfuscate injected strings",pattern:/\bCHAR\s*\(\s*\d{1,3}/i},{id:"sql-information-schema",description:"INFORMATION_SCHEMA — reconnaissance query for table/column enumeration",pattern:/\bINFORMATION_SCHEMA\b/i}],Et=[...Nt,{id:"sql-line-comment",description:"SQL line comment: -- followed by whitespace or end of string",pattern:/--(?:\s|$)/},{id:"sql-stacked-query",description:"Stacked queries: semicolon immediately followed by a SQL keyword",pattern:/;\s{0,10}(?:SELECT|INSERT|UPDATE|DELETE|DROP|CREATE|ALTER|EXEC)\b/i},{id:"sql-hex-encoding",description:"Hex-encoded string injection: 0x41414141 style (MySQL)",pattern:/\b0x[0-9a-f]{4,}/i}],wt=[{id:"html-script-open",description:"<script opening tag",pattern:/<script[\s>/]/i},{id:"html-script-close",description:"<\/script closing tag",pattern:/<\/script[\s>]/i},{id:"html-javascript-protocol",description:"javascript: URI scheme (with optional whitespace/encoding)",pattern:/j[\t\n\r ]*a[\t\n\r ]*v[\t\n\r ]*a[\t\n\r ]*s[\t\n\r ]*c[\t\n\r ]*r[\t\n\r ]*i[\t\n\r ]*p[\t\n\r ]*t[\t\n\r ]*:/i},{id:"html-vbscript-protocol",description:"vbscript: URI scheme",pattern:/vbscript[\t\n\r ]*:/i},{id:"html-data-html",description:"data:text/html URI — can execute scripts in browsers",pattern:/data[\t\n\r ]*:[\t\n\r ]*text\/html/i},{id:"html-data-xhtml",description:"data:application/xhtml+xml URI",pattern:/data[\t\n\r ]*:[\t\n\r ]*application\/xhtml/i},{id:"html-data-svg",description:"data:image/svg+xml URI — can execute scripts",pattern:/data[\t\n\r ]*:[\t\n\r ]*image\/svg\+xml/i},{id:"html-inline-event-handler",description:"Inline event handler attributes: onclick=, onerror=, onload=, etc.",pattern:/\bon\w{1,30}\s*=/i},{id:"html-entity-obfuscated-script",description:"HTML-entity-encoded <script (e.g. &#x3C;script or &lt;script)",pattern:/(?:&#x0*3[Cc];?|&#0*60;?|&lt;)\s*script/i},{id:"html-entity-obfuscated-javascript",description:'HTML-entity-encoded javascript: (partial — catches common &#106; or &#x6a; for "j")',pattern:/(?:&#x0*6[Aa];?|&#0*106;?)\s*(?:&#x0*61;?|a)[\s\S]{0,80}script\s*:/i},{id:"html-style-expression",description:"CSS expression() — IE-era code execution in style attributes",pattern:/style[\s\S]{0,20}expression\s*\(/i},{id:"html-object-embed",description:"<object or <embed tags that can load active content",pattern:/<(?:object|embed)[\s>/]/i},{id:"html-base-tag",description:"<base href= — can hijack all relative URLs on a page",pattern:/<base[\s>]/i},{id:"html-meta-refresh",description:'<meta http-equiv="refresh" — can redirect users',pattern:/<meta[\s\S]{0,40}http-equiv[\s\S]{0,20}refresh/i},{id:"html-srcdoc",description:"srcdoc= attribute on iframes — embeds HTML that can run scripts",pattern:/srcdoc\s*=/i},{id:"html-iframe",description:"<iframe tag",pattern:/<iframe[\s>/]/i},{id:"html-form",description:"<form tag — can be used for phishing / credential harvesting injection",pattern:/<form[\s>/]/i}],vt=[{id:"xml-cdata-injection",description:"CDATA section injection: <![CDATA[ breaks out of text node context",pattern:/<!\[CDATA\[/i},{id:"xml-cdata-close",description:"CDATA close sequence: ]]> can terminate an enclosing CDATA section",pattern:/\]\]>/},{id:"xml-processing-instruction",description:"XML processing instruction: <?xml-stylesheet or <?php etc.",pattern:/<\?(?:xml[\- ]|php|asp)/i},{id:"xml-doctype-injection",description:"DOCTYPE declaration embedded in content — can define entities",pattern:/<!DOCTYPE(?:[\s[]|$)/i},{id:"xml-entity-system",description:"SYSTEM keyword — used in external entity declarations (XXE)",pattern:/\bSYSTEM\s+["']/i},{id:"xml-entity-public",description:"PUBLIC keyword — used in external entity declarations (XXE)",pattern:/\bPUBLIC\s+["']/i},{id:"xml-entity-declaration",description:"<!ENTITY declaration — defines entities, potential XXE or entity expansion",pattern:/<!ENTITY[\s%]/i},{id:"xml-billion-laughs",description:"Entity reference chaining / billion laughs: repeated &eX; style references",pattern:/(?:&\w{1,20};){3,}/},{id:"xml-namespace-confusion",description:"xmlns: attribute injection — can redefine namespaces to confuse parsers",pattern:/\bxmlns\s*(?::\w{1,40})?\s*=/i},{id:"xml-comment-injection",description:"\x3c!-- comment injection — can hide content from some parsers",pattern:/<!--/},{id:"xml-comment-close",description:"--\x3e closes an enclosing XML comment",pattern:/-->/},{id:"xml-pi-close",description:"?> closes an enclosing processing instruction",pattern:/\?>/}],St=[{id:"svg-script-element",description:"<script element inside SVG executes JavaScript",pattern:/<script[\s>/]/i},{id:"svg-xlink-href-javascript",description:"xlink:href with javascript: — classic SVG XSS via <a> or <use>",pattern:/xlink\s*:\s*href\s*=\s*["']?\s*javascript\s*:/i},{id:"svg-href-javascript",description:"href= with javascript: in SVG context (<a>, <animate>, etc.)",pattern:/href\s*=\s*["']?\s*javascript\s*:/i},{id:"svg-foreignobject",description:"<foreignObject embeds HTML inside SVG — can execute scripts",pattern:/<foreignObject[\s>/]/i},{id:"svg-use-external",description:"<use xlink:href or href pointing to external resource (non-fragment URL)",pattern:/<use[\s\S]{0,60}(?:xlink\s*:\s*)?href\s*=\s*(?:["'][^#]|[^"'#\s>])/i},{id:"svg-animate-href",description:'<animate attributeName="href" — can dynamically change href to javascript:',pattern:/<animate[\s\S]{0,80}attributeName\s*=\s*["'][\s]*href["']/i},{id:"svg-animate-xlinkhref",description:'<animate attributeName="xlink:href"',pattern:/<animate[\s\S]{0,80}attributeName\s*=\s*["'][\s]*xlink\s*:\s*href["']/i},{id:"svg-set-javascript",description:'<set to="javascript:..." — sets an attribute to a javascript: URI',pattern:/<set[\s\S]{0,80}to\s*=\s*["']?\s*javascript\s*:/i},{id:"svg-event-handler",description:"SVG-specific event handler attributes: onload=, onerror=, onactivate=, etc.",pattern:/\bon(?:load|error|activate|begin|end|repeat|focus|blur|click|mouse\w{1,20}|key\w{1,20})\s*=/i},{id:"svg-handler-generic",description:"Generic on* handler catch-all for SVG attributes",pattern:/\bon\w{1,30}\s*=/i},{id:"svg-filter-feimage",description:"<feImage href= — filter primitive that can load external resources",pattern:/<feImage[\s\S]{0,80}(?:xlink\s*:\s*)?href\s*=/i},{id:"svg-image-external",description:"<image xlink:href with http/https or javascript protocol",pattern:/<image[\s\S]{0,80}(?:xlink\s*:\s*)?href\s*=\s*["']?\s*(?:https?|javascript)\s*:/i},{id:"svg-style-javascript",description:"style= attribute containing javascript: (e.g. background:url(javascript:...))",pattern:/style\s*=[\s\S]{0,60}javascript\s*:/i}],At=[{id:"shell-path-traversal-unix",description:"Unix path traversal: ../ — climbing the directory tree",pattern:/\.\.\//},{id:"shell-path-traversal-windows",description:"Windows path traversal: ..\\ — climbing the directory tree",pattern:/\.\.\\/},{id:"shell-path-traversal-encoded",description:"URL-encoded path traversal: %2e%2e or %2f variants",pattern:/%2e%2e|%2f\.\.|\.\.%2f/i},{id:"shell-null-byte",description:"Null byte injection: \\x00 or %00 — truncates strings in C-backed functions",pattern:/\x00|%00/},{id:"shell-semicolon",description:"Semicolon command separator: cmd1; cmd2",pattern:/;/},{id:"shell-pipe",description:"Pipe operator: cmd1 | cmd2",pattern:/\|/},{id:"shell-and-operator",description:"AND operator: cmd1 && cmd2",pattern:/&&/},{id:"shell-or-operator",description:"OR operator: cmd1 || cmd2",pattern:/\|\|/},{id:"shell-backtick",description:"Backtick command substitution: `cmd`",pattern:/`/},{id:"shell-dollar-paren",description:"Dollar-paren command substitution: $(cmd)",pattern:/\$\(/},{id:"shell-dollar-brace",description:"Dollar-brace variable expansion: ${var} — can be abused for injection",pattern:/\$\{/},{id:"shell-redirect-out",description:"Output redirection: cmd > file or cmd >> file",pattern:/>{1,2}/},{id:"shell-redirect-in",description:"Input redirection: cmd < file",pattern:/</},{id:"shell-newline-injection",description:"Newline injection: \\n or \\r — can inject new shell commands",pattern:/[\n\r]/},{id:"shell-glob-star",description:"Glob expansion: * or ? — can expand to unintended files",pattern:/[/\\][*?]/},{id:"shell-absolute-root",description:"Absolute root path injection: string starting with / or \\ (Windows UNC)",pattern:/^(?:\/|\\\\)/},{id:"shell-windows-drive",description:"Windows drive letter path injection: C:\\ or D:/",pattern:/^[a-zA-Z]:[/\\]/},{id:"shell-curl-wget",description:"curl/wget with URL or flags — can exfiltrate data or download payloads",pattern:/\b(?:curl|wget)\s+(?:https?:\/\/|ftp:\/\/|-)/i}],Tt=[{id:"redos-nested-quantifier-plus",description:"Nested + quantifier inside a group with outer quantifier: (a+)+, (.+b)*, etc.",pattern:/\([^)]*\+[^)]*\)[+*]/},{id:"redos-nested-quantifier-star",description:"Nested * quantifier: (a*)* or (a*)+ — catastrophic backtracking",pattern:/\([^)]*\*[^)]*\)[*+]/},{id:"redos-nested-groups",description:"Doubly nested quantified groups: ((a+)+) — guaranteed catastrophic",pattern:/\(\([^)]{0,40}\)[+*]\)[+*]/},{id:"redos-alternation-overlap",description:"Overlapping alternation under quantifier: (a|a)+ — ambiguous NFA paths",pattern:/\(([^|()]{1,20})\|(?:\1)(?:\|[^|()]{1,20}){0,5}\)[+*?]{1,2}/},{id:"redos-star-plus-concat",description:"(x*x)+ pattern — triggers super-linear backtracking",pattern:/\([^)]{0,10}\*[^)]{0,10}\)[+*]/},{id:"redos-dot-star-greedy",description:"(.*){n,} or (.+){n,} — repeated greedy dot quantifiers",pattern:/\(\.[*+]\)\{?\d/},{id:"redos-large-repetition",description:"Very large fixed or range repetition count {1000,} or {1000,n} — denial of service via backtracking",pattern:/\{\d{4,}(?:,\d*)?\}/},{id:"redos-catastrophic-alternation",description:"Long alternation with many similar branches — polynomial backtracking risk",pattern:/\([^)]{0,200}(?:\|[^|)]{0,50}){9,}\)/}],_t="[\"'\\s]*:",Ct=[{id:"nosql-where-operator",description:"$where — executes arbitrary JavaScript server-side in MongoDB",pattern:new RegExp(`\\$where${_t}`,"i")},{id:"nosql-ne-operator",description:'$ne — "not equal" operator used to bypass equality checks',pattern:new RegExp(`\\$ne${_t}`,"i")},{id:"nosql-gt-operator",description:'$gt — "greater than" used to bypass password/value checks',pattern:new RegExp(`\\$gte?${_t}`,"i")},{id:"nosql-lt-operator",description:'$lt / $lte — "less than" bypass variants',pattern:new RegExp(`\\$lte?${_t}`,"i")},{id:"nosql-regex-operator",description:"$regex — can be used to extract data character by character (blind injection)",pattern:new RegExp(`\\$regex${_t}`,"i")},{id:"nosql-or-operator",description:"$or — logical OR; used to create always-true conditions",pattern:new RegExp(`\\$or${_t}\\s*\\[`,"i")},{id:"nosql-and-operator",description:"$and — logical AND operator injection",pattern:new RegExp(`\\$and${_t}\\s*\\[`,"i")},{id:"nosql-nor-operator",description:"$nor — logical NOR operator injection",pattern:new RegExp(`\\$nor${_t}\\s*\\[`,"i")},{id:"nosql-exists-operator",description:"$exists — can enumerate fields to determine schema",pattern:new RegExp(`\\$exists${_t}`,"i")},{id:"nosql-in-operator",description:"$in — matches any value in a list; can enumerate values",pattern:new RegExp(`\\$in${_t}\\s*\\[`,"i")},{id:"nosql-expr-operator",description:"$expr — allows aggregation expressions in queries (MongoDB 3.6+)",pattern:new RegExp(`\\$expr${_t}`,"i")},{id:"nosql-function-operator",description:"$function — executes arbitrary JavaScript in MongoDB 4.4+",pattern:new RegExp(`\\$function${_t}`,"i")},{id:"nosql-accumulator-operator",description:"$accumulator — custom aggregation with arbitrary JS execution",pattern:new RegExp(`\\$accumulator${_t}`,"i")},{id:"nosql-proto-pollution",description:"__proto__ — prototype pollution via object key injection",pattern:/__proto__/},{id:"nosql-constructor-prototype",description:"constructor.prototype — alternative prototype pollution vector (dot notation or JSON key)",pattern:/constructor[\s"':.,{\[]*prototype/i},{id:"nosql-proto-bracket",description:'["__proto__"] — bracket-notation prototype pollution',pattern:/\[["']__proto__["']\]/}],$t=[{id:"log-crlf-injection",description:"CRLF injection: literal \\r or \\n embeds fake log lines",pattern:/[\r\n]/},{id:"log-url-encoded-crlf",description:"URL-encoded CRLF: %0d, %0a, %0D, %0A — decoded by some log parsers",pattern:/%0[dDaA]/},{id:"log-unicode-newline",description:"Unicode newline variants: U+2028 (line separator), U+2029 (paragraph separator)",pattern:/[\u2028\u2029]/},{id:"log-log4shell-jndi",description:"Log4Shell: ${jndi:...} triggers remote code execution in Apache Log4j",pattern:/\$\{jndi\s*:/i},{id:"log-log4shell-obfuscated",description:"Obfuscated Log4Shell: ${::-j}... lookup-bypass prefix used to evade WAF detection",pattern:/\$\{::-/},{id:"log-log4j-lookup",description:"Log4j lookup syntax: ${env:...}, ${sys:...}, ${ctx:...} — data exfiltration",pattern:/\$\{(?:env|sys|ctx|main|map|sd|web|docker|k8s|spring)\s*:/i},{id:"log-ssti-double-brace",description:"SSTI double-brace: {{expression}} — Jinja2, Twig, Handlebars, etc.",pattern:/\{\{[\s\S]{0,80}\}\}/},{id:"log-ssti-hash-brace",description:"SSTI hash-brace: #{expression} — Thymeleaf, Velocity, Ruby ERB",pattern:/#\{[\s\S]{0,80}\}/},{id:"log-ssti-dollar-brace",description:"SSTI/EL injection: ${expression with operators or method calls} — JSP EL, Freemarker, SpEL",pattern:/\$\{[^}]*(?:\.|\(|\*|\+|\bclass\b|\bruntime\b|\bprocess\b|\bexec\b)[^}]{0,80}\}/i},{id:"log-ssti-percent-tag",description:"SSTI ERB/ASP tag: <%= expression %> — Ruby ERB, ASP",pattern:/<%=[\s\S]{0,80}%>/},{id:"log-null-byte",description:"Null byte: \\x00 or %00 — can truncate log entries in C-backed loggers",pattern:/\x00|%00/},{id:"log-ansi-escape",description:"ANSI escape sequence: ESC[ — can manipulate terminal output when logs are tailed",pattern:/\x1b\[/}];function Pt(t,e){const i=e.label??"CUSTOM";for(const n of e)if(n.pattern.test(t))return{context:i,id:n.id,description:n.description,pattern:n.pattern};return null}function Ot(t,e){(function(t){if("string"!=typeof t)throw new TypeError("is-unsafe: first argument must be a string, got "+typeof t)})(t),function(t){if(!(t instanceof RegExp)){if(!Array.isArray(t))throw new TypeError("is-unsafe: second argument must be a PatternList (e.g. HTML), an array of PatternLists (e.g. [HTML, XML]), or a RegExp. Got: "+typeof t);if(0===t.length)throw new TypeError("is-unsafe: context must not be an empty array");if(Array.isArray(t[0]))for(const e of t)if(!Array.isArray(e)||0===e.length)throw new TypeError("is-unsafe: each context in the array must be a non-empty pattern array (PatternList)")}}(e);const{lists:i,regex:n}=function(t){return t instanceof RegExp?{lists:null,regex:t}:Array.isArray(t[0])?{lists:t,regex:null}:{lists:[t],regex:null}}(e);if(n)return n.test(t);for(const e of i)if(null!==Pt(t,e))return!0;return!1}function jt(t,e){if(!t)return{};const i=e.attributesGroupName?t[e.attributesGroupName]:t;if(!i)return{};const n={};for(const t in i)t.startsWith(e.attributeNamePrefix)?n[t.substring(e.attributeNamePrefix.length)]=i[t]:n[t]=i[t];return n}function It(t){if(!t||"string"!=typeof t)return;const e=t.indexOf(":");if(-1!==e&&e>0){const i=t.substring(0,e);if("xmlns"!==i)return i}}wt.label="HTML",vt.label="XML",St.label="SVG",Nt.label="SQL",Et.label="SQL-STRICT",At.label="SHELL",Tt.label="REDOS",Ct.label="NOSQL",$t.label="LOG",Object.freeze({HTML:wt,XML:vt,SVG:St,SQL:Nt,"SQL-STRICT":Et,SHELL:At,REDOS:Tt,NOSQL:Ct,LOG:$t});class kt{constructor(t,e){var i;this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=Vt,this.parseTextData=Lt,this.resolveNameSpace=Dt,this.buildAttributesMap=Mt,this.isItStopNode=Bt,this.replaceEntitiesValue=Ft,this.readStopNodeData=zt,this.saveTextToParentTag=Ut,this.addChild=qt,this.ignoreAttributesFn="function"==typeof(i=this.options.ignoreAttributes)?i:Array.isArray(i)?t=>{for(const e of i){if("string"==typeof e&&t===e)return!0;if(e instanceof RegExp&&e.test(t))return!0}}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0,this.doctypefound=!1;let n={...lt};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:("object"==typeof this.options.htmlEntities?n=this.options.htmlEntities:!0===this.options.htmlEntities&&(n={...pt,...at}),this.entityDecoder=new yt({namedEntities:{...n,...e},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo},onInputEntity:(t,e)=>Ot(e,[wt,vt])?ct.BLOCK:ct.ALLOW})),this.matcher=new rt,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new ot;const r=this.options.stopNodes;if(r&&r.length>0){for(let t=0;t<r.length;t++){const e=r[t];"string"==typeof e?this.stopNodeExpressionsSet.add(new st(e)):e instanceof st&&this.stopNodeExpressionsSet.add(e)}this.stopNodeExpressionsSet.seal()}}}function Lt(t,e,i,n,r,s,o){const a=this.options;if(void 0!==t&&(a.trimValues&&!n&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t,e,i));const n=a.jPath?i.toString():i,l=a.tagValueProcessor(e,t,n,r,s);return null==l?t:typeof l!=typeof t||l!==t?l:a.trimValues||t.trim()===t?Yt(t,a.parseTagValue,a.numberParseOptions):t}}function Dt(t){if(this.options.removeNSPrefix){const e=t.split(":"),i="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=i+e[1])}return t}const Rt=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Mt(t,e,i,n=!1){const s=this.options;if(!0===n||!0!==s.ignoreAttributes&&"string"==typeof t){const n=r(t,Rt),o=n.length,a={},l=new Array(o);let p=!1;const c={};for(let t=0;t<o;t++){const e=this.resolveNameSpace(n[t][1]),r=n[t][4];if(e.length&&void 0!==r){let n=r;s.trimValues&&(n=n.trim()),n=this.replaceEntitiesValue(n,i,this.readonlyMatcher),l[t]=n,c[e]=n,p=!0}}p&&"object"==typeof e&&e.updateCurrent&&e.updateCurrent(c);const h=s.jPath?e.toString():this.readonlyMatcher;let d=!1;for(let t=0;t<o;t++){const e=this.resolveNameSpace(n[t][1]);if(this.ignoreAttributesFn(e,h))continue;let i=s.attributeNamePrefix+e;if(e.length)if(s.transformAttributeName&&(i=s.transformAttributeName(i)),i=Qt(i,s),void 0!==n[t][4]){const n=l[t],r=s.attributeValueProcessor(e,n,h);a[i]=null==r?n:typeof r!=typeof n||r!==n?r:Yt(n,s.parseAttributeValue,s.numberParseOptions),d=!0}else s.allowBooleanAttributes&&(a[i]=!0,d=!0)}if(!d)return;if(s.attributesGroupName&&!s.preserveOrder){const t={};return t[s.attributesGroupName]=a,t}return a}}const Vt=function(t){t=t.replace(/\r\n?/g,"\n");const e=new P("!xml");let i=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0,this.doctypefound=!1;const r=this.options,s=new q(r.processEntities),o=t.length;for(let a=0;a<o;a++)if("<"===t[a]){const l=t.charCodeAt(a+1);if(47===l){const e=Gt(t,">",a,"Closing Tag is not closed.");let s=t.substring(a+2,e).trim();if(r.removeNSPrefix){const t=s.indexOf(":");-1!==t&&(s=s.substr(t+1))}s=Ht(r.transformTagName,s,"",r).tagName,i&&(n=this.saveTextToParentTag(n,i,this.readonlyMatcher));const o=this.matcher.getCurrentTag();if(s&&r.unpairedTagsSet.has(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);o&&r.unpairedTagsSet.has(o)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,i=this.tagsNodeStack.pop(),n="",a=e}else if(63===l){let e=Wt(t,a,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,i,this.readonlyMatcher);const o=this.buildAttributesMap(e.tagExp,this.matcher,e.tagName,!0);if(o){const t=o[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(t)||1),s.setXmlVersion(Number(t)||1)}if(r.ignoreDeclaration&&"?xml"===e.tagName||r.ignorePiTags);else{const t=new P(e.tagName);t.add(r.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&!0!==r.ignoreAttributes&&(t[":@"]=o),this.addChild(i,t,this.readonlyMatcher,a)}a=e.closeIndex+1}else if(33===l&&45===t.charCodeAt(a+2)&&45===t.charCodeAt(a+3)){const e=Gt(t,"--\x3e",a+4,"Comment is not closed.");if(r.commentPropName){const s=t.substring(a+4,e-2);n=this.saveTextToParentTag(n,i,this.readonlyMatcher),i.add(r.commentPropName,[{[r.textNodeName]:s}])}a=e}else if(33===l&&68===t.charCodeAt(a+2)){if(this.doctypefound)throw new Error("Multiple DOCTYPE declarations found.");this.doctypefound=!0;const e=s.readDocType(t,a);this.entityDecoder.addInputEntities(e.entities),a=e.i}else if(33===l&&91===t.charCodeAt(a+2)){const e=Gt(t,"]]>",a,"CDATA is not closed.")-2,s=t.substring(a+9,e);n=this.saveTextToParentTag(n,i,this.readonlyMatcher);let o=this.parseTextData(s,i.tagname,this.readonlyMatcher,!0,!1,!0,!0);null==o&&(o=""),r.cdataPropName?i.add(r.cdataPropName,[{[r.textNodeName]:s}]):i.add(r.textNodeName,o),a=e+2}else{let s=Wt(t,a,r.removeNSPrefix);if(!s){const e=t.substring(Math.max(0,a-50),Math.min(o,a+50));throw new Error(`readTagExp returned undefined at position ${a}. Context: "${e}"`)}let l=s.tagName;const p=s.rawTagName;let c=s.tagExp,h=s.attrExpPresent,d=s.closeIndex;if(({tagName:l,tagExp:c}=Ht(r.transformTagName,l,c,r)),r.strictReservedNames&&(l===r.commentPropName||l===r.cdataPropName||l===r.textNodeName||l===r.attributesGroupName))throw new Error(`Invalid tag name: ${l}`);i&&n&&"!xml"!==i.tagname&&(n=this.saveTextToParentTag(n,i,this.readonlyMatcher,!1));const u=i;u&&r.unpairedTagsSet.has(u.tagname)&&(i=this.tagsNodeStack.pop(),this.matcher.pop());let f=!1;c.length>0&&c.lastIndexOf("/")===c.length-1&&(f=!0,"/"===l[l.length-1]?(l=l.substr(0,l.length-1),c=l):c=c.substr(0,c.length-1),h=l!==c);let g,m=null,x={};g=It(p),l!==e.tagname&&this.matcher.push(l,{},g),l!==c&&h&&(m=this.buildAttributesMap(c,this.matcher,l),m&&(x=jt(m,r))),l!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());const b=a;if(this.isCurrentNodeStopNode){let e="";if(f)a=s.closeIndex;else if(r.unpairedTagsSet.has(l))a=s.closeIndex;else{const i=this.readStopNodeData(t,p,d+1);if(!i)throw new Error(`Unexpected end of ${p}`);a=i.i,e=i.tagContent}const n=new P(l);m&&(n[":@"]=m),n.add(r.textNodeName,e),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(i,n,this.readonlyMatcher,b)}else{if(f){({tagName:l,tagExp:c}=Ht(r.transformTagName,l,c,r));const t=new P(l);m&&(t[":@"]=m),this.addChild(i,t,this.readonlyMatcher,b),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(r.unpairedTagsSet.has(l)){const t=new P(l);m&&(t[":@"]=m),this.addChild(i,t,this.readonlyMatcher,b),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=s.closeIndex;continue}{const t=new P(l);if(this.tagsNodeStack.length>r.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(i),m&&(t[":@"]=m),this.addChild(i,t,this.readonlyMatcher,b),i=t}}n="",a=d}}}else n+=t[a];return e.child};function qt(t,e,i,n){this.options.captureMetaData||(n=void 0);const r=this.options.jPath?i.toString():i,s=this.options.updateTag(e.tagname,r,e[":@"]);!1===s||("string"==typeof s?(e.tagname=s,t.addChild(e,n)):t.addChild(e,n))}function Ft(t,e,i){const n=this.options.processEntities;if(!n||!n.enabled)return t;if(n.allowedTags){const r=this.options.jPath?i.toString():i;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,r)))return t}if(n.tagFilter){const r=this.options.jPath?i.toString():i;if(!n.tagFilter(e,r))return t}return this.entityDecoder.decode(t)}function Ut(t,e,i,n){return t&&(void 0===n&&(n=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,i,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Bt(){return 0!==this.stopNodeExpressionsSet.size&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}function Gt(t,e,i,n){const r=t.indexOf(e,i);if(-1===r)throw new Error(n);return r+e.length-1}function Xt(t,e,i,n){const r=t.indexOf(e,i);if(-1===r)throw new Error(n);return r}function Wt(t,e,i,n=">"){const r=function(t,e,i=">"){let n=0;const r=t.length,s=i.charCodeAt(0),o=i.length>1?i.charCodeAt(1):-1;let a="",l=e;for(let i=e;i<r;i++){const e=t.charCodeAt(i);if(n)e===n&&(n=0);else if(34===e||39===e)n=e;else if(e===s){if(-1===o)return a+=t.substring(l,i),{data:a,index:i};if(t.charCodeAt(i+1)===o)return a+=t.substring(l,i),{data:a,index:i}}else 9!==e||n||(a+=t.substring(l,i)+" ",l=i+1)}}(t,e+1,n);if(!r)return;let s=r.data;const o=r.index,a=s.search(/\s/);let l=s,p=!0;-1!==a&&(l=s.substring(0,a),s=s.substring(a+1).trimStart());const c=l;if(i){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),p=l!==r.data.substr(t+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:p,rawTagName:c}}function zt(t,e,i){const n=i;let r=1;const s=t.length;for(;i<s;i++)if("<"===t[i]){const s=t.charCodeAt(i+1);if(47===s){const s=Xt(t,">",i,`${e} is not closed`);if(t.substring(i+2,s).trim()===e&&(r--,0===r))return{tagContent:t.substring(n,i),i:s};i=s}else if(63===s)i=Gt(t,"?>",i+1,"StopNode is not closed.");else if(33===s&&45===t.charCodeAt(i+2)&&45===t.charCodeAt(i+3))i=Gt(t,"--\x3e",i+3,"StopNode is not closed.");else if(33===s&&91===t.charCodeAt(i+2))i=Gt(t,"]]>",i,"StopNode is not closed.")-2;else{const n=Wt(t,i,!1);n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&r++,i=n.closeIndex)}}}function Yt(t,e,i){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&tt(t,i)}return void 0!==t?t:""}function Ht(t,e,i,n){if(t){const n=t(e);i===e&&(i=n),e=n}return{tagName:e=Qt(e,n),tagExp:i}}function Qt(t,e){if(a.includes(t))throw new Error(`[SECURITY] Invalid name: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);return o.includes(t)?e.onDangerousProperty(t):t}const Jt=P.getMetaDataSymbol();function Zt(t,e){if(!t||"object"!=typeof t)return{};if(!e)return t;const i={};for(const n in t)n.startsWith(e)?i[n.substring(e.length)]=t[n]:i[n]=t[n];return i}function Kt(t,e,i,n){return te(t,e,i,n)}function te(t,e,i,n){let r;const s={};for(let o=0;o<t.length;o++){const a=t[o],l=ee(a);if(void 0!==l&&l!==e.textNodeName){const t=Zt(a[":@"]||{},e.attributeNamePrefix);i.push(l,t)}if(l===e.textNodeName)void 0===r?r=a[l]:r+=""+a[l];else{if(void 0===l)continue;if(a[l]){let t=te(a[l],e,i,n);const r=ne(t,e);if(0===Object.keys(t).length&&e.alwaysCreateTextNode&&(t[e.textNodeName]=""),a[":@"]?ie(t,a[":@"],n,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==a[Jt]&&"object"==typeof t&&null!==t&&(t[Jt]=a[Jt]),void 0!==s[l]&&Object.prototype.hasOwnProperty.call(s,l))Array.isArray(s[l])||(s[l]=[s[l]]),s[l].push(t);else{const i=e.jPath?n.toString():n;e.isArray(l,i,r)?s[l]=[t]:s[l]=t}void 0!==l&&l!==e.textNodeName&&i.pop()}}}return"string"==typeof r?r.length>0&&(s[e.textNodeName]=r):void 0!==r&&(s[e.textNodeName]=r),s}function ee(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const i=e[t];if(":@"!==i)return i}}function ie(t,e,i,n){if(e){const r=Object.keys(e),s=r.length;for(let o=0;o<s;o++){const s=r[o],a=s.startsWith(n.attributeNamePrefix)?s.substring(n.attributeNamePrefix.length):s,l=n.jPath?i.toString()+"."+a:i;n.isArray(s,l,!0,!0)?t[s]=[e[s]]:t[s]=e[s]}}}function ne(t,e){const{textNodeName:i}=e,n=Object.keys(t).length;return 0===n||!(1!==n||!t[i]&&"boolean"!=typeof t[i]&&0!==t[i])}class re{constructor(t){this.externalEntities={},this.options=C(t)}parse(t,e){if("string"!=typeof t&&t.toString)t=t.toString();else if("string"!=typeof t)throw new Error("XML data is accepted in String or Bytes[] form.");if(e){!0===e&&(e={});const i=p(t,e);if(!0!==i)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}const i=new kt(this.options,this.externalEntities),n=i.parseXml(t);return this.options.preserveOrder||void 0===n?n:Kt(n,this.options,i.matcher,i.readonlyMatcher)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return P.getMetaDataSymbol()}}function se(t){return String(t).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function oe(t){return String(t).replace(/\]\]>/g,"]]]]><![CDATA[>")}function ae(t){return String(t).replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const le=":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�",pe=":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",ce=pe+"\\-\\.\\d·̀-ͯ҇‿-⁀",he=(t,e,i="")=>{const n=`[${t.replace(":","")}][${e.replace(":","")}]*`;return{name:new RegExp(`^[${t}][${e}]*$`,i),ncName:new RegExp(`^${n}$`,i),qName:new RegExp(`^${n}(?::${n})?$`,i),nmToken:new RegExp(`^[${e}]+$`,i),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,i)}},de=he(le,le+"\\-\\.\\d·̀-ͯ‿-⁀"),ue=he(pe,ce,"u"),fe=(t,{xmlVersion:e="1.0"}={})=>((t="1.0")=>"1.1"===t?ue:de)(e).qName.test(t);function ge(t,e,i,n,r){return i.sanitizeName?fe(t,{xmlVersion:r})?t:i.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()}):t}function me(t,e){let i="";e.format&&(i="\n");const n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let t=0;t<e.stopNodes.length;t++){const i=e.stopNodes[t];"string"==typeof i?n.push(new st(i)):i instanceof st&&n.push(i)}const r=function(t,e){if(!Array.isArray(t)||0===t.length)return"1.0";const i=t[0];if("?xml"===Ee(i)){const t=i[":@"];if(t){const i=e.attributeNamePrefix+"version";if(t[i])return t[i]}}return"1.0"}(t,e);return xe(t,e,i,new rt,n,r)}function xe(t,e,i,n,r,s){let o="",a=!1;if(e.maxNestedTags&&n.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(null!=t){let i=t.toString();return i=Se(i,e),i}return""}for(let l=0;l<t.length;l++){const p=t[l],c=Ee(p);if(void 0===c)continue;const h=c===e.textNodeName||c===e.cdataPropName||c===e.commentPropName||"?"===c[0]?c:ge(c,!1,e,n,s),d=be(p[":@"],e);n.push(h,d);const u=ve(n,r);if(h===e.textNodeName){let t=p[c];u||(t=e.tagValueProcessor(h,t),t=Se(t,e)),a&&(o+=i),o+=t,a=!1,n.pop();continue}if(h===e.cdataPropName){a&&(o+=i),o+=`<![CDATA[${oe(p[c][0][e.textNodeName])}]]>`,a=!1,n.pop();continue}if(h===e.commentPropName){o+=i+`\x3c!--${se(p[c][0][e.textNodeName])}--\x3e`,a=!0,n.pop();continue}if("?"===h[0]){o+=("?xml"===h?"":i)+`<${h}${we(p[":@"],e,u,n,s)}?>`,a=!0,n.pop();continue}let f=i;""!==f&&(f+=e.indentBy);const g=i+`<${h}${we(p[":@"],e,u,n,s)}`;let m;m=u?ye(p[c],e):xe(p[c],e,f,n,r,s),-1!==e.unpairedTags.indexOf(h)?e.suppressUnpairedNode?o+=g+">":o+=g+"/>":m&&0!==m.length||!e.suppressEmptyNode?m&&m.endsWith(">")?o+=g+`>${m}${i}</${h}>`:(o+=g+">",m&&""!==i&&(m.includes("/>")||m.includes("</"))?o+=i+e.indentBy+m+i:o+=m,o+=`</${h}>`):o+=g+"/>",a=!0,n.pop()}return o}function be(t,e){if(!t||e.ignoreAttributes)return null;const i={};let n=!1;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r.startsWith(e.attributeNamePrefix)?r.substr(e.attributeNamePrefix.length):r]=ae(t[r]),n=!0);return n?i:null}function ye(t,e){if(!Array.isArray(t))return null!=t?t.toString():"";let i="";for(let n=0;n<t.length;n++){const r=t[n],s=Ee(r);if(s===e.textNodeName)i+=r[s];else if(s===e.cdataPropName)i+=r[s][0][e.textNodeName];else if(s===e.commentPropName)i+=r[s][0][e.textNodeName];else{if(s&&"?"===s[0])continue;if(s){const t=Ne(r[":@"],e),n=ye(r[s],e);n&&0!==n.length?i+=`<${s}${t}>${n}</${s}>`:i+=`<${s}${t}/>`}}}return i}function Ne(t,e){let i="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let r=t[n];!0===r&&e.suppressBooleanAttributes?i+=` ${n.substr(e.attributeNamePrefix.length)}`:i+=` ${n.substr(e.attributeNamePrefix.length)}="${ae(r)}"`}return i}function Ee(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];if(Object.prototype.hasOwnProperty.call(t,n)&&":@"!==n)return n}}function we(t,e,i,n,r){let s="";if(t&&!e.ignoreAttributes)for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;const a=o.substr(e.attributeNamePrefix.length),l=i?a:ge(a,!0,e,n,r);let p;i?p=t[o]:(p=e.attributeValueProcessor(o,t[o]),p=Se(p,e)),!0===p&&e.suppressBooleanAttributes?s+=` ${l}`:s+=` ${l}="${ae(p)}"`}return s}function ve(t,e){if(!e||0===e.length)return!1;for(let i=0;i<e.length;i++)if(t.matches(e[i]))return!0;return!1}function Se(t,e){if(t&&t.length>0&&e.processEntities)for(let i=0;i<e.entities.length;i++){const n=e.entities[i];t=t.replace(n.regex,n.val)}return t}const Ae={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function Te(t){if(this.options=Object.assign({},Ae,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(t=>"string"==typeof t&&t.startsWith("*.")?".."+t.substring(2):t)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let t=0;t<this.options.stopNodes.length;t++){const e=this.options.stopNodes[t];"string"==typeof e?this.stopNodeExpressions.push(new st(e)):e instanceof st&&this.stopNodeExpressions.push(e)}var e;!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn="function"==typeof(e=this.options.ignoreAttributes)?e:Array.isArray(e)?t=>{for(const i of e){if("string"==typeof i&&t===i)return!0;if(i instanceof RegExp&&i.test(t))return!0}}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Pe),this.processTextOrObjNode=Ce,this.options.format?(this.indentate=$e,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function _e(t,e,i,n,r){return i.sanitizeName?fe(t,{xmlVersion:r})?t:i.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()}):t}function Ce(t,e,i,n,r){const s=this.extractAttributes(t);if(n.push(e,s),this.checkStopNode(n)){const r=this.buildRawContent(t),s=this.buildAttributesForStopNode(t);return n.pop(),this.buildObjectNode(r,e,s,i)}const o=this.j2x(t,i+1,n,r);return n.pop(),"?"===e[0]?this.buildTextValNode("",e,o.attrStr,i,n):void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,o.attrStr,i,n):this.buildObjectNode(o.val,e,o.attrStr,i)}function $e(t){return this.options.indentBy.repeat(t)}function Pe(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}Te.prototype.build=function(t){if(this.options.preserveOrder)return me(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});const e=new rt,i=function(t,e){const i=t["?xml"];if(i&&"object"==typeof i){if(e.attributesGroupName&&i[e.attributesGroupName]){const t=i[e.attributesGroupName][e.attributeNamePrefix+"version"];if(t)return t}const t=i[e.attributeNamePrefix+"version"];if(t)return t}return"1.0"}(t,this.options);return this.j2x(t,0,e,i).val}},Te.prototype.j2x=function(t,e,i,n){let r="",s="";if(this.options.maxNestedTags&&i.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");const o=this.options.jPath?i.toString():i,a=this.checkStopNode(i);for(let l in t){if(!Object.prototype.hasOwnProperty.call(t,l))continue;const p=l===this.options.textNodeName||l===this.options.cdataPropName||l===this.options.commentPropName||this.options.attributesGroupName&&l===this.options.attributesGroupName||this.isAttribute(l)||"?"===l[0]?l:_e(l,!1,this.options,i,n);if(void 0===t[l])this.isAttribute(l)&&(s+="");else if(null===t[l])this.isAttribute(l)||p===this.options.cdataPropName||p===this.options.commentPropName?s+="":"?"===p[0]?s+=this.indentate(e)+"<"+p+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+p+"/"+this.tagEndChar;else if(t[l]instanceof Date)s+=this.buildTextValNode(t[l],p,"",e,i);else if("object"!=typeof t[l]){const c=this.isAttribute(l);if(c&&!this.ignoreAttributesFn(c,o)){const e=_e(c,!0,this.options,i,n);r+=this.buildAttrPairStr(e,""+t[l],a)}else if(!c)if(l===this.options.textNodeName){let e=this.options.tagValueProcessor(l,""+t[l]);s+=this.replaceEntitiesValue(e)}else{i.push(p);const n=this.checkStopNode(i);if(i.pop(),n){const i=""+t[l];s+=""===i?this.indentate(e)+"<"+p+this.closeTag(p)+this.tagEndChar:this.indentate(e)+"<"+p+">"+i+"</"+p+this.tagEndChar}else s+=this.buildTextValNode(t[l],p,"",e,i)}}else if(Array.isArray(t[l])){const r=t[l].length;let o="",a="";for(let c=0;c<r;c++){const r=t[l][c];if(void 0===r);else if(null===r)"?"===p[0]?s+=this.indentate(e)+"<"+p+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+p+"/"+this.tagEndChar;else if("object"==typeof r)if(this.options.oneListGroup){i.push(p);const t=this.j2x(r,e+1,i,n);i.pop(),o+=t.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(a+=t.attrStr)}else o+=this.processTextOrObjNode(r,p,e,i,n);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(p,r);t=this.replaceEntitiesValue(t),o+=t}else{i.push(p);const t=this.checkStopNode(i);if(i.pop(),t){const t=""+r;o+=""===t?this.indentate(e)+"<"+p+this.closeTag(p)+this.tagEndChar:this.indentate(e)+"<"+p+">"+t+"</"+p+this.tagEndChar}else o+=this.buildTextValNode(r,p,"",e,i)}}this.options.oneListGroup&&(o=this.buildObjectNode(o,p,a,e)),s+=o}else if(this.options.attributesGroupName&&l===this.options.attributesGroupName){const e=Object.keys(t[l]),s=e.length;for(let o=0;o<s;o++){const s=_e(e[o],!0,this.options,i,n);r+=this.buildAttrPairStr(s,""+t[l][e[o]],a)}}else s+=this.processTextOrObjNode(t[l],p,e,i,n)}return{attrStr:r,val:s}},Te.prototype.buildAttrPairStr=function(t,e,i){return i||(e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+ae(e)+'"'},Te.prototype.extractAttributes=function(t){if(!t||"object"!=typeof t)return null;const e={};let i=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){const n=t[this.options.attributesGroupName];for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t.startsWith(this.options.attributeNamePrefix)?t.substring(this.options.attributeNamePrefix.length):t]=ae(n[t]),i=!0)}else for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const r=this.isAttribute(n);r&&(e[r]=ae(t[n]),i=!0)}return i?e:null},Te.prototype.buildRawContent=function(t){if("string"==typeof t)return t;if("object"!=typeof t||null===t)return String(t);if(void 0!==t[this.options.textNodeName])return t[this.options.textNodeName];let e="";for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;if(this.isAttribute(i))continue;if(this.options.attributesGroupName&&i===this.options.attributesGroupName)continue;const n=t[i];if(i===this.options.textNodeName)e+=n;else if(Array.isArray(n)){for(let t of n)if("string"==typeof t||"number"==typeof t)e+=`<${i}>${t}</${i}>`;else if("object"==typeof t&&null!==t){const n=this.buildRawContent(t),r=this.buildAttributesForStopNode(t);e+=""===n?`<${i}${r}/>`:`<${i}${r}>${n}</${i}>`}}else if("object"==typeof n&&null!==n){const t=this.buildRawContent(n),r=this.buildAttributesForStopNode(n);e+=""===t?`<${i}${r}/>`:`<${i}${r}>${t}</${i}>`}else e+=`<${i}>${n}</${i}>`}return e},Te.prototype.buildAttributesForStopNode=function(t){if(!t||"object"!=typeof t)return"";let e="";if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){const i=t[this.options.attributesGroupName];for(let t in i){if(!Object.prototype.hasOwnProperty.call(i,t))continue;const n=t.startsWith(this.options.attributeNamePrefix)?t.substring(this.options.attributeNamePrefix.length):t,r=i[t];!0===r&&this.options.suppressBooleanAttributes?e+=" "+n:e+=" "+n+'="'+r+'"'}}else for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;const n=this.isAttribute(i);if(n){const r=t[i];!0===r&&this.options.suppressBooleanAttributes?e+=" "+n:e+=" "+n+'="'+r+'"'}}return e},Te.prototype.buildObjectNode=function(t,e,i,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+i+"?"+this.tagEndChar:this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar;if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let r="</"+e+this.tagEndChar,s="";return"?"===e[0]&&(s="?",r=""),!i&&""!==i||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===s.length?this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(n)+"<"+e+i+s+this.tagEndChar+t+this.indentate(n)+r:this.indentate(n)+"<"+e+i+s+">"+t+r}},Te.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},Te.prototype.checkStopNode=function(t){if(!this.stopNodeExpressions||0===this.stopNodeExpressions.length)return!1;for(let e=0;e<this.stopNodeExpressions.length;e++)if(t.matches(this.stopNodeExpressions[e]))return!0;return!1},Te.prototype.buildTextValNode=function(t,e,i,n,r){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName){const e=oe(t);return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine}if(!1!==this.options.commentPropName&&e===this.options.commentPropName){const e=se(t);return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine}if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+i+">"+r+"</"+e+this.tagEndChar}},Te.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const i=this.options.entities[e];t=t.replace(i.regex,i.val)}return t};const Oe=Te,je={validate:p};module.exports=e})();
131213
127595
 
127596
+ /***/ },
127597
+
127598
+ /***/ "./node_modules/glob/dist/commonjs/index.min.js"
127599
+ /*!******************************************************!*\
127600
+ !*** ./node_modules/glob/dist/commonjs/index.min.js ***!
127601
+ \******************************************************/
127602
+ (__unused_webpack_module, exports, __webpack_require__) {
127603
+
127604
+ "use strict";
127605
+ var R=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var Ge=R(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.range=Y.balanced=void 0;var Gs=(n,t,e)=>{let s=n instanceof RegExp?Ie(n,e):n,i=t instanceof RegExp?Ie(t,e):t,r=s!==null&&i!=null&&(0,Y.range)(s,i,e);return r&&{start:r[0],end:r[1],pre:e.slice(0,r[0]),body:e.slice(r[0]+s.length,r[1]),post:e.slice(r[1]+i.length)}};Y.balanced=Gs;var Ie=(n,t)=>{let e=t.match(n);return e?e[0]:null},zs=(n,t,e)=>{let s,i,r,h,o,a=e.indexOf(n),l=e.indexOf(t,a+1),f=a;if(a>=0&&l>0){if(n===t)return[a,l];for(s=[],r=e.length;f>=0&&!o;){if(f===a)s.push(f),a=e.indexOf(n,f+1);else if(s.length===1){let c=s.pop();c!==void 0&&(o=[c,l])}else i=s.pop(),i!==void 0&&i<r&&(r=i,h=l),l=e.indexOf(t,f+1);f=a<l&&a>=0?a:l}s.length&&h!==void 0&&(o=[r,h])}return o};Y.range=zs});var Ke=R(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.EXPANSION_MAX=void 0;it.expand=ei;var ze=Ge(),Ue="\0SLASH"+Math.random()+"\0",$e="\0OPEN"+Math.random()+"\0",ue="\0CLOSE"+Math.random()+"\0",qe="\0COMMA"+Math.random()+"\0",He="\0PERIOD"+Math.random()+"\0",Us=new RegExp(Ue,"g"),$s=new RegExp($e,"g"),qs=new RegExp(ue,"g"),Hs=new RegExp(qe,"g"),Vs=new RegExp(He,"g"),Ks=/\\\\/g,Xs=/\\{/g,Ys=/\\}/g,Js=/\\,/g,Zs=/\\./g;it.EXPANSION_MAX=1e5;function ce(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function Qs(n){return n.replace(Ks,Ue).replace(Xs,$e).replace(Ys,ue).replace(Js,qe).replace(Zs,He)}function ti(n){return n.replace(Us,"\\").replace($s,"{").replace(qs,"}").replace(Hs,",").replace(Vs,".")}function Ve(n){if(!n)return[""];let t=[],e=(0,ze.balanced)("{","}",n);if(!e)return n.split(",");let{pre:s,body:i,post:r}=e,h=s.split(",");h[h.length-1]+="{"+i+"}";let o=Ve(r);return r.length&&(h[h.length-1]+=o.shift(),h.push.apply(h,o)),t.push.apply(t,h),t}function ei(n,t={}){if(!n)return[];let{max:e=it.EXPANSION_MAX}=t;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),ht(Qs(n),e,!0).map(ti)}function si(n){return"{"+n+"}"}function ii(n){return/^-?0\d/.test(n)}function ri(n,t){return n<=t}function ni(n,t){return n>=t}function ht(n,t,e){let s=[],i=(0,ze.balanced)("{","}",n);if(!i)return[n];let r=i.pre,h=i.post.length?ht(i.post,t,!1):[""];if(/\$$/.test(i.pre))for(let o=0;o<h.length&&o<t;o++){let a=r+"{"+i.body+"}"+h[o];s.push(a)}else{let o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=o||a,f=i.body.indexOf(",")>=0;if(!l&&!f)return i.post.match(/,(?!,).*\}/)?(n=i.pre+"{"+i.body+ue+i.post,ht(n,t,!0)):[n];let c;if(l)c=i.body.split(/\.\./);else if(c=Ve(i.body),c.length===1&&c[0]!==void 0&&(c=ht(c[0],t,!1).map(si),c.length===1))return h.map(u=>i.pre+c[0]+u);let d;if(l&&c[0]!==void 0&&c[1]!==void 0){let u=ce(c[0]),m=ce(c[1]),p=Math.max(c[0].length,c[1].length),b=c.length===3&&c[2]!==void 0?Math.abs(ce(c[2])):1,w=ri;m<u&&(b*=-1,w=ni);let E=c.some(ii);d=[];for(let y=u;w(y,m);y+=b){let S;if(a)S=String.fromCharCode(y),S==="\\"&&(S="");else if(S=String(y),E){let B=p-S.length;if(B>0){let U=new Array(B+1).join("0");y<0?S="-"+U+S.slice(1):S=U+S}}d.push(S)}}else{d=[];for(let u=0;u<c.length;u++)d.push.apply(d,ht(c[u],t,!1))}for(let u=0;u<d.length;u++)for(let m=0;m<h.length&&s.length<t;m++){let p=r+d[u]+h[m];(!e||l||p)&&s.push(p)}}return s}});var Xe=R(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.assertValidPattern=void 0;var hi=1024*64,oi=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>hi)throw new TypeError("pattern is too long")};Ct.assertValidPattern=oi});var Je=R(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.parseClass=void 0;var ai={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ot=n=>n.replace(/[[\]\\-]/g,"\\$&"),li=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ye=n=>n.join(""),ci=(n,t)=>{let e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],i=[],r=e+1,h=!1,o=!1,a=!1,l=!1,f=e,c="";t:for(;r<n.length;){let p=n.charAt(r);if((p==="!"||p==="^")&&r===e+1){l=!0,r++;continue}if(p==="]"&&h&&!a){f=r+1;break}if(h=!0,p==="\\"&&!a){a=!0,r++;continue}if(p==="["&&!a){for(let[b,[w,v,E]]of Object.entries(ai))if(n.startsWith(b,r)){if(c)return["$.",!1,n.length-e,!0];r+=b.length,E?i.push(w):s.push(w),o=o||v;continue t}}if(a=!1,c){p>c?s.push(ot(c)+"-"+ot(p)):p===c&&s.push(ot(p)),c="",r++;continue}if(n.startsWith("-]",r+1)){s.push(ot(p+"-")),r+=2;continue}if(n.startsWith("-",r+1)){c=p,r+=2;continue}s.push(ot(p)),r++}if(f<r)return["",!1,0,!1];if(!s.length&&!i.length)return["$.",!1,n.length-e,!0];if(i.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!l){let p=s[0].length===2?s[0].slice(-1):s[0];return[li(p),!1,f-e,!1]}let d="["+(l?"^":"")+Ye(s)+"]",u="["+(l?"":"^")+Ye(i)+"]";return[s.length&&i.length?"("+d+"|"+u+")":s.length?d:u,o,f-e,!0]};Rt.parseClass=ci});var kt=R(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.unescape=void 0;var ui=(n,{windowsPathsNoEscape:t=!1,magicalBraces:e=!0}={})=>e?t?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?n.replace(/\[([^\/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");At.unescape=ui});var pe=R(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.AST=void 0;var fi=Je(),Mt=kt(),di=new Set(["!","?","+","*","@"]),Ze=n=>di.has(n),pi="(?!(?:^|/)\\.\\.?(?:$|/))",Pt="(?!\\.)",mi=new Set(["[","."]),gi=new Set(["..","."]),wi=new Set("().*{}+?[]^$\\!"),bi=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),de="[^/]",Qe=de+"*?",ts=de+"+?",fe=class n{type;#t;#s;#n=!1;#r=[];#h;#S;#w;#c=!1;#o;#f;#u=!1;constructor(t,e,s={}){this.type=t,t&&(this.#s=!0),this.#h=e,this.#t=this.#h?this.#h.#t:this,this.#o=this.#t===this?s:this.#t.#o,this.#w=this.#t===this?[]:this.#t.#w,t==="!"&&!this.#t.#c&&this.#w.push(this),this.#S=this.#h?this.#h.#r.length:0}get hasMagic(){if(this.#s!==void 0)return this.#s;for(let t of this.#r)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#s=!0;return this.#s}toString(){return this.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#r.map(t=>String(t)).join("|")+")":this.#f=this.#r.map(t=>String(t)).join("")}#a(){if(this!==this.#t)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let t;for(;t=this.#w.pop();){if(t.type!=="!")continue;let e=t,s=e.#h;for(;s;){for(let i=e.#S+1;!s.type&&i<s.#r.length;i++)for(let r of t.#r){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(s.#r[i])}e=s,s=e.#h}}return this}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof n&&e.#h===this))throw new Error("invalid part: "+e);this.#r.push(e)}}toJSON(){let t=this.type===null?this.#r.slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&this.#h?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#h?.isStart())return!1;if(this.#S===0)return!0;let t=this.#h;for(let e=0;e<this.#S;e++){let s=t.#r[e];if(!(s instanceof n&&s.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#h?.type==="!")return!0;if(!this.#h?.isEnd())return!1;if(!this.type)return this.#h?.isEnd();let t=this.#h?this.#h.#r.length:0;return this.#S===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let e=new n(this.type,t);for(let s of this.#r)e.copyIn(s);return e}static#i(t,e,s,i){let r=!1,h=!1,o=-1,a=!1;if(e.type===null){let u=s,m="";for(;u<t.length;){let p=t.charAt(u++);if(r||p==="\\"){r=!r,m+=p;continue}if(h){u===o+1?(p==="^"||p==="!")&&(a=!0):p==="]"&&!(u===o+2&&a)&&(h=!1),m+=p;continue}else if(p==="["){h=!0,o=u,a=!1,m+=p;continue}if(!i.noext&&Ze(p)&&t.charAt(u)==="("){e.push(m),m="";let b=new n(p,e);u=n.#i(t,b,u,i),e.push(b);continue}m+=p}return e.push(m),u}let l=s+1,f=new n(null,e),c=[],d="";for(;l<t.length;){let u=t.charAt(l++);if(r||u==="\\"){r=!r,d+=u;continue}if(h){l===o+1?(u==="^"||u==="!")&&(a=!0):u==="]"&&!(l===o+2&&a)&&(h=!1),d+=u;continue}else if(u==="["){h=!0,o=l,a=!1,d+=u;continue}if(Ze(u)&&t.charAt(l)==="("){f.push(d),d="";let m=new n(u,f);f.push(m),l=n.#i(t,m,l,i);continue}if(u==="|"){f.push(d),d="",c.push(f),f=new n(null,e);continue}if(u===")")return d===""&&e.#r.length===0&&(e.#u=!0),f.push(d),d="",e.push(...c,f),l;d+=u}return e.type=null,e.#s=void 0,e.#r=[t.substring(s-1)],l}static fromGlob(t,e={}){let s=new n(null,void 0,e);return n.#i(t,s,0,e),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let t=this.toString(),[e,s,i,r]=this.toRegExpSource();if(!(i||this.#s||this.#o.nocase&&!this.#o.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;let o=(this.#o.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,o),{_src:e,_glob:t})}get options(){return this.#o}toRegExpSource(t){let e=t??!!this.#o.dot;if(this.#t===this&&this.#a(),!this.type){let a=this.isStart()&&this.isEnd()&&!this.#r.some(u=>typeof u!="string"),l=this.#r.map(u=>{let[m,p,b,w]=typeof u=="string"?n.#v(u,this.#s,a):u.toRegExpSource(t);return this.#s=this.#s||b,this.#n=this.#n||w,m}).join(""),f="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&gi.has(this.#r[0]))){let m=mi,p=e&&m.has(l.charAt(0))||l.startsWith("\\.")&&m.has(l.charAt(2))||l.startsWith("\\.\\.")&&m.has(l.charAt(4)),b=!e&&!t&&m.has(l.charAt(0));f=p?pi:b?Pt:""}let c="";return this.isEnd()&&this.#t.#c&&this.#h?.type==="!"&&(c="(?:$|\\/)"),[f+l+c,(0,Mt.unescape)(l),this.#s=!!this.#s,this.#n]}let s=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#d(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let a=this.toString();return this.#r=[a],this.type=null,this.#s=void 0,[a,(0,Mt.unescape)(this.toString()),!1,!1]}let h=!s||t||e||!Pt?"":this.#d(!0);h===r&&(h=""),h&&(r=`(?:${r})(?:${h})*?`);let o="";if(this.type==="!"&&this.#u)o=(this.isStart()&&!e?Pt:"")+ts;else{let a=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Pt:"")+Qe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&h?")":this.type==="*"&&h?")?":`)${this.type}`;o=i+r+a}return[o,(0,Mt.unescape)(r),this.#s=!!this.#s,this.#n]}#d(t){return this.#r.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,i,r,h]=e.toRegExpSource(t);return this.#n=this.#n||h,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#v(t,e,s=!1){let i=!1,r="",h=!1,o=!1;for(let a=0;a<t.length;a++){let l=t.charAt(a);if(i){i=!1,r+=(wi.has(l)?"\\":"")+l;continue}if(l==="*"){if(o)continue;o=!0,r+=s&&/^[*]+$/.test(t)?ts:Qe,e=!0;continue}else o=!1;if(l==="\\"){a===t.length-1?r+="\\\\":i=!0;continue}if(l==="["){let[f,c,d,u]=(0,fi.parseClass)(t,a);if(d){r+=f,h=h||c,a+=d-1,e=e||u;continue}}if(l==="?"){r+=de,e=!0;continue}r+=bi(l)}return[r,(0,Mt.unescape)(t),!!e,h]}};Dt.AST=fe});var me=R(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.escape=void 0;var yi=(n,{windowsPathsNoEscape:t=!1,magicalBraces:e=!1}={})=>e?t?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");Ft.escape=yi});var H=R(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.unescape=g.escape=g.AST=g.Minimatch=g.match=g.makeRe=g.braceExpand=g.defaults=g.filter=g.GLOBSTAR=g.sep=g.minimatch=void 0;var Si=Ke(),jt=Xe(),is=pe(),vi=me(),Ei=kt(),_i=(n,t,e={})=>((0,jt.assertValidPattern)(t),!e.nocomment&&t.charAt(0)==="#"?!1:new J(t,e).match(n));g.minimatch=_i;var Oi=/^\*+([^+@!?\*\[\(]*)$/,xi=n=>t=>!t.startsWith(".")&&t.endsWith(n),Ti=n=>t=>t.endsWith(n),Ci=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),Ri=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),Ai=/^\*+\.\*+$/,ki=n=>!n.startsWith(".")&&n.includes("."),Mi=n=>n!=="."&&n!==".."&&n.includes("."),Pi=/^\.\*+$/,Di=n=>n!=="."&&n!==".."&&n.startsWith("."),Fi=/^\*+$/,ji=n=>n.length!==0&&!n.startsWith("."),Ni=n=>n.length!==0&&n!=="."&&n!=="..",Li=/^\?+([^+@!?\*\[\(]*)?$/,Wi=([n,t=""])=>{let e=rs([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Bi=([n,t=""])=>{let e=ns([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Ii=([n,t=""])=>{let e=ns([n]);return t?s=>e(s)&&s.endsWith(t):e},Gi=([n,t=""])=>{let e=rs([n]);return t?s=>e(s)&&s.endsWith(t):e},rs=([n])=>{let t=n.length;return e=>e.length===t&&!e.startsWith(".")},ns=([n])=>{let t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},hs=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",es={win32:{sep:"\\"},posix:{sep:"/"}};g.sep=hs==="win32"?es.win32.sep:es.posix.sep;g.minimatch.sep=g.sep;g.GLOBSTAR=Symbol("globstar **");g.minimatch.GLOBSTAR=g.GLOBSTAR;var zi="[^/]",Ui=zi+"*?",$i="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qi="(?:(?!(?:\\/|^)\\.).)*?",Hi=(n,t={})=>e=>(0,g.minimatch)(e,n,t);g.filter=Hi;g.minimatch.filter=g.filter;var F=(n,t={})=>Object.assign({},n,t),Vi=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return g.minimatch;let t=g.minimatch;return Object.assign((s,i,r={})=>t(s,i,F(n,r)),{Minimatch:class extends t.Minimatch{constructor(i,r={}){super(i,F(n,r))}static defaults(i){return t.defaults(F(n,i)).Minimatch}},AST:class extends t.AST{constructor(i,r,h={}){super(i,r,F(n,h))}static fromGlob(i,r={}){return t.AST.fromGlob(i,F(n,r))}},unescape:(s,i={})=>t.unescape(s,F(n,i)),escape:(s,i={})=>t.escape(s,F(n,i)),filter:(s,i={})=>t.filter(s,F(n,i)),defaults:s=>t.defaults(F(n,s)),makeRe:(s,i={})=>t.makeRe(s,F(n,i)),braceExpand:(s,i={})=>t.braceExpand(s,F(n,i)),match:(s,i,r={})=>t.match(s,i,F(n,r)),sep:t.sep,GLOBSTAR:g.GLOBSTAR})};g.defaults=Vi;g.minimatch.defaults=g.defaults;var Ki=(n,t={})=>((0,jt.assertValidPattern)(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:(0,Si.expand)(n,{max:t.braceExpandMax}));g.braceExpand=Ki;g.minimatch.braceExpand=g.braceExpand;var Xi=(n,t={})=>new J(n,t).makeRe();g.makeRe=Xi;g.minimatch.makeRe=g.makeRe;var Yi=(n,t,e={})=>{let s=new J(t,e);return n=n.filter(i=>s.match(i)),s.options.nonull&&!n.length&&n.push(t),n};g.match=Yi;g.minimatch.match=g.match;var ss=/[?*]|[+@!]\(.*?\)|\[|\]/,Ji=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),J=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){(0,jt.assertValidPattern)(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||hs,this.isWindows=this.platform==="win32";let s="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[s]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,h,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=r[0]===""&&r[1]===""&&(r[2]==="?"||!ss.test(r[2]))&&!ss.test(r[3]),l=/^[a-z]:/i.test(r[0]);if(a)return[...r.slice(0,4),...r.slice(4).map(f=>this.parse(f))];if(l)return[r[0],...r.slice(1).map(f=>this.parse(f))]}return r.map(a=>this.parse(a))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){let h=this.set[r];h[0]===""&&h[1]===""&&this.globParts[r][2]==="?"&&typeof h[3]=="string"&&/^[a-z]:$/i.test(h[3])&&(h[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let s=0;s<t.length;s++)for(let i=0;i<t[s].length;i++)t[s][i]==="**"&&(t[s][i]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let i=s;for(;e[i+1]==="**";)i++;i!==s&&e.splice(s,i-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,i)=>{let r=s[s.length-1];return i==="**"&&r==="**"?s:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(i),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let r=t[i];i===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let s=0;for(;(s=t.indexOf("..",s+1))!==-1;){let i=t[s-1];i&&i!=="."&&i!==".."&&i!=="**"&&(e=!0,t.splice(s-1,2),s-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let s of t){let i=-1;for(;(i=s.indexOf("**",i+1))!==-1;){let h=i;for(;s[h+1]==="**";)h++;h>i&&s.splice(i+1,h-i);let o=s[i+1],a=s[i+2],l=s[i+3];if(o!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=!0,s.splice(i,1);let f=s.slice(0);f[i]="**",t.push(f),i--}if(!this.preserveMultipleSlashes){for(let h=1;h<s.length-1;h++){let o=s[h];h===1&&o===""&&s[0]===""||(o==="."||o==="")&&(e=!0,s.splice(h,1),h--)}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(e=!0,s.pop())}let r=0;for(;(r=s.indexOf("..",r+1))!==-1;){let h=s[r-1];if(h&&h!=="."&&h!==".."&&h!=="**"){e=!0;let a=r===1&&s[r+1]==="**"?["."]:[];s.splice(r-1,2,...a),s.length===0&&s.push(""),r-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let s=e+1;s<t.length;s++){let i=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);if(i){t[e]=[],t[s]=i;break}}return t.filter(e=>e.length)}partsMatch(t,e,s=!1){let i=0,r=0,h=[],o="";for(;i<t.length&&r<e.length;)if(t[i]===e[r])h.push(o==="b"?e[r]:t[i]),i++,r++;else if(s&&t[i]==="**"&&e[r]===t[i+1])h.push(t[i]),i++;else if(s&&e[r]==="**"&&t[i]===e[r+1])h.push(e[r]),r++;else if(t[i]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(o==="b")return!1;o="a",h.push(t[i]),i++,r++}else if(e[r]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(o==="a")return!1;o="b",h.push(e[r]),i++,r++}else return!1;return t.length===e.length&&h}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,s=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)e=!e,s++;s&&(this.pattern=t.slice(s)),this.negate=e}matchOne(t,e,s=!1){let i=this.options;if(this.isWindows){let p=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),b=!p&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),w=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),v=!w&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),E=b?3:p?0:void 0,y=v?3:w?0:void 0;if(typeof E=="number"&&typeof y=="number"){let[S,B]=[t[E],e[y]];S.toLowerCase()===B.toLowerCase()&&(e[y]=S,y>E?e=e.slice(y):E>y&&(t=t.slice(E)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var h=0,o=0,a=t.length,l=e.length;h<a&&o<l;h++,o++){this.debug("matchOne loop");var f=e[o],c=t[h];if(this.debug(e,f,c),f===!1)return!1;if(f===g.GLOBSTAR){this.debug("GLOBSTAR",[e,f,c]);var d=h,u=o+1;if(u===l){for(this.debug("** at the end");h<a;h++)if(t[h]==="."||t[h]===".."||!i.dot&&t[h].charAt(0)===".")return!1;return!0}for(;d<a;){var m=t[d];if(this.debug(`
127606
+ globstar while`,t,d,e,u,m),this.matchOne(t.slice(d),e.slice(u),s))return this.debug("globstar found match!",d,a,m),!0;if(m==="."||m===".."||!i.dot&&m.charAt(0)==="."){this.debug("dot detected!",t,d,e,u);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(s&&(this.debug(`
127607
+ >>> no match, partial?`,t,d,e,u),d===a))}let p;if(typeof f=="string"?(p=c===f,this.debug("string match",f,c,p)):(p=f.test(c),this.debug("pattern match",f,c,p)),!p)return!1}if(h===a&&o===l)return!0;if(h===a)return s;if(o===l)return h===a-1&&t[h]==="";throw new Error("wtf?")}braceExpand(){return(0,g.braceExpand)(this.pattern,this.options)}parse(t){(0,jt.assertValidPattern)(t);let e=this.options;if(t==="**")return g.GLOBSTAR;if(t==="")return"";let s,i=null;(s=t.match(Fi))?i=e.dot?Ni:ji:(s=t.match(Oi))?i=(e.nocase?e.dot?Ri:Ci:e.dot?Ti:xi)(s[1]):(s=t.match(Li))?i=(e.nocase?e.dot?Bi:Wi:e.dot?Ii:Gi)(s):(s=t.match(Ai))?i=e.dot?Mi:ki:(s=t.match(Pi))&&(i=Di);let r=is.AST.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?Ui:e.dot?$i:qi,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let d of c.flags.split(""))i.add(d);return typeof c=="string"?Ji(c):c===g.GLOBSTAR?g.GLOBSTAR:c._src});l.forEach((c,d)=>{let u=l[d+1],m=l[d-1];c!==g.GLOBSTAR||m===g.GLOBSTAR||(m===void 0?u!==void 0&&u!==g.GLOBSTAR?l[d+1]="(?:\\/|"+s+"\\/)?"+u:l[d]=s:u===void 0?l[d-1]=m+"(?:\\/|\\/"+s+")?":u!==g.GLOBSTAR&&(l[d-1]=m+"(?:\\/|\\/"+s+"\\/)"+u,l[d+1]=g.GLOBSTAR))});let f=l.filter(c=>c!==g.GLOBSTAR);if(this.partial&&f.length>=1){let c=[];for(let d=1;d<=f.length;d++)c.push(f.slice(0,d).join("/"));return"(?:"+c.join("|")+")"}return f.join("/")}).join("|"),[h,o]=t.length>1?["(?:",")"]:["",""];r="^"+h+r+o+"$",this.partial&&(r="^(?:\\/|"+h+r.slice(1,-1)+o+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let h=i[i.length-1];if(!h)for(let o=i.length-2;!h&&o>=0;o--)h=i[o];for(let o=0;o<r.length;o++){let a=r[o],l=i;if(s.matchBase&&a.length===1&&(l=[h]),this.matchOne(l,a,e))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(t){return g.minimatch.defaults(t).Minimatch}};g.Minimatch=J;var Zi=pe();Object.defineProperty(g,"AST",{enumerable:!0,get:function(){return Zi.AST}});var Qi=me();Object.defineProperty(g,"escape",{enumerable:!0,get:function(){return Qi.escape}});var tr=kt();Object.defineProperty(g,"unescape",{enumerable:!0,get:function(){return tr.unescape}});g.minimatch.AST=is.AST;g.minimatch.Minimatch=J;g.minimatch.escape=vi.escape;g.minimatch.unescape=Ei.unescape});var fs=R(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LRUCache=void 0;var er=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,as=new Set,ge=typeof process=="object"&&process?process:{},ls=(n,t,e,s)=>{typeof ge.emitWarning=="function"?ge.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`)},Lt=globalThis.AbortController,os=globalThis.AbortSignal;if(typeof Lt>"u"){os=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,s){this._onabort.push(s)}},Lt=class{constructor(){t()}signal=new os;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let s of this.signal._onabort)s(e);this.signal.onabort?.(e)}}};let n=ge.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=!1,ls("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var sr=n=>!as.has(n),V=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),cs=n=>V(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Nt:null:null,Nt=class extends Array{constructor(n){super(n),this.fill(0)}},ir=class at{heap;length;static#t=!1;static create(t){let e=cs(t);if(!e)return[];at.#t=!0;let s=new at(t,e);return at.#t=!1,s}constructor(t,e){if(!at.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},rr=class us{#t;#s;#n;#r;#h;#S;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#f;#u;#a;#i;#d;#v;#y;#p;#R;#m;#O;#x;#g;#b;#E;#T;#e;#F;static unsafeExposeInternals(t){return{starts:t.#x,ttls:t.#g,autopurgeTimers:t.#b,sizes:t.#O,keyMap:t.#u,keyList:t.#a,valList:t.#i,next:t.#d,prev:t.#v,get head(){return t.#y},get tail(){return t.#p},free:t.#R,isBackgroundFetch:e=>t.#l(e),backgroundFetch:(e,s,i,r)=>t.#z(e,s,i,r),moveToTail:e=>t.#N(e),indexes:e=>t.#k(e),rindexes:e=>t.#M(e),isStale:e=>t.#_(e)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#f}get size(){return this.#o}get fetchMethod(){return this.#S}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#h}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:a,dispose:l,onInsert:f,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:u,maxSize:m=0,maxEntrySize:p=0,sizeCalculation:b,fetchMethod:w,memoMethod:v,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:B,ignoreFetchAbort:U,perf:et}=t;if(et!==void 0&&typeof et?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=et??er,e!==0&&!V(e))throw new TypeError("max option must be a nonnegative integer");let st=e?cs(e):Array;if(!st)throw new Error("invalid max value: "+e);if(this.#t=e,this.#s=m,this.maxEntrySize=p||this.#s,this.sizeCalculation=b,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(v!==void 0&&typeof v!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=v,w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#S=w,this.#T=!!w,this.#u=new Map,this.#a=new Array(e).fill(void 0),this.#i=new Array(e).fill(void 0),this.#d=new st(e),this.#v=new st(e),this.#y=0,this.#p=0,this.#R=ir.create(e),this.#o=0,this.#f=0,typeof l=="function"&&(this.#n=l),typeof f=="function"&&(this.#r=f),typeof c=="function"?(this.#h=c,this.#m=[]):(this.#h=void 0,this.#m=void 0),this.#E=!!this.#n,this.#F=!!this.#r,this.#e=!!this.#h,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!B,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(this.#s!==0&&!V(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!V(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#$()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=V(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!V(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#t===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#s){let le="LRU_CACHE_UNBOUNDED";sr(le)&&(as.add(le),ls("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",le,us))}}getRemainingTTL(t){return this.#u.has(t)?1/0:0}#P(){let t=new Nt(this.#t),e=new Nt(this.#t);this.#g=t,this.#x=e;let s=this.ttlAutopurge?new Array(this.#t):void 0;this.#b=s,this.#W=(h,o,a=this.#c.now())=>{if(e[h]=o!==0?a:0,t[h]=o,s?.[h]&&(clearTimeout(s[h]),s[h]=void 0),o!==0&&s){let l=setTimeout(()=>{this.#_(h)&&this.#A(this.#a[h],"expire")},o+1);l.unref&&l.unref(),s[h]=l}},this.#C=h=>{e[h]=t[h]!==0?this.#c.now():0},this.#D=(h,o)=>{if(t[o]){let a=t[o],l=e[o];if(!a||!l)return;h.ttl=a,h.start=l,h.now=i||r();let f=h.now-l;h.remainingTTL=a-f}};let i=0,r=()=>{let h=this.#c.now();if(this.ttlResolution>0){i=h;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return h};this.getRemainingTTL=h=>{let o=this.#u.get(h);if(o===void 0)return 0;let a=t[o],l=e[o];if(!a||!l)return 1/0;let f=(i||r())-l;return a-f},this.#_=h=>{let o=e[h],a=t[h];return!!a&&!!o&&(i||r())-o>a}}#C=()=>{};#D=()=>{};#W=()=>{};#_=()=>!1;#$(){let t=new Nt(this.#t);this.#f=0,this.#O=t,this.#L=e=>{this.#f-=t[e],t[e]=0},this.#B=(e,s,i,r)=>{if(this.#l(s))return 0;if(!V(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!V(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#j=(e,s,i)=>{if(t[e]=s,this.#s){let r=this.#s-t[e];for(;this.#f>r;)this.#G(!0)}this.#f+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#f)}}#L=t=>{};#j=(t,e,s)=>{};#B=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#p;!(!this.#I(e)||((t||!this.#_(e))&&(yield e),e===this.#y));)e=this.#v[e]}*#M({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#y;!(!this.#I(e)||((t||!this.#_(e))&&(yield e),e===this.#p));)e=this.#d[e]}#I(t){return t!==void 0&&this.#u.get(this.#a[t])===t}*entries(){for(let t of this.#k())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*rentries(){for(let t of this.#M())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*keys(){for(let t of this.#k()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*rkeys(){for(let t of this.#M()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*values(){for(let t of this.#k())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(let t of this.#M())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#k()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#a[s],this))return this.get(this.#a[s],e)}}forEach(t,e=this){for(let s of this.#k()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}rforEach(t,e=this){for(let s of this.#M()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}purgeStale(){let t=!1;for(let e of this.#M({allowStale:!0}))this.#_(e)&&(this.#A(this.#a[e],"expire"),t=!0);return t}info(t){let e=this.#u.get(t);if(e===void 0)return;let s=this.#i[e],i=this.#l(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#g&&this.#x){let h=this.#g[e],o=this.#x[e];if(h&&o){let a=h-(this.#c.now()-o);r.ttl=a,r.start=Date.now()}}return this.#O&&(r.size=this.#O[e]),r}dump(){let t=[];for(let e of this.#k({allowStale:!0})){let s=this.#a[e],i=this.#i[e],r=this.#l(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let h={value:r};if(this.#g&&this.#x){h.ttl=this.#g[e];let o=this.#c.now()-this.#x[e];h.start=Math.floor(Date.now()-o)}this.#O&&(h.size=this.#O[e]),t.unshift([s,h])}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=this.#c.now()-i}this.set(e,s.value,s)}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,f=this.#B(t,e,s.size||0,o);if(this.maxEntrySize&&f>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#A(t,"set"),this;let c=this.#o===0?void 0:this.#u.get(t);if(c===void 0)c=this.#o===0?this.#p:this.#R.length!==0?this.#R.pop():this.#o===this.#t?this.#G(!1):this.#o,this.#a[c]=t,this.#i[c]=e,this.#u.set(t,c),this.#d[this.#p]=c,this.#v[c]=this.#p,this.#p=c,this.#o++,this.#j(c,f,a),a&&(a.set="add"),l=!1,this.#F&&this.#r?.(e,t,"add");else{this.#N(c);let d=this.#i[c];if(e!==d){if(this.#T&&this.#l(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=d;u!==void 0&&!h&&(this.#E&&this.#n?.(u,t,"set"),this.#e&&this.#m?.push([u,t,"set"]))}else h||(this.#E&&this.#n?.(d,t,"set"),this.#e&&this.#m?.push([d,t,"set"]));if(this.#L(c),this.#j(c,f,a),this.#i[c]=e,a){a.set="replace";let u=d&&this.#l(d)?d.__staleWhileFetching:d;u!==void 0&&(a.oldValue=u)}}else a&&(a.set="update");this.#F&&this.onInsert?.(e,t,e===d?"update":"replace")}if(i!==0&&!this.#g&&this.#P(),this.#g&&(l||this.#W(c,i,r),a&&this.#D(a,c)),!h&&this.#e&&this.#m){let d=this.#m,u;for(;u=d?.shift();)this.#h?.(...u)}return this}pop(){try{for(;this.#o;){let t=this.#i[this.#y];if(this.#G(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#e&&this.#m){let t=this.#m,e;for(;e=t?.shift();)this.#h?.(...e)}}}#G(t){let e=this.#y,s=this.#a[e],i=this.#i[e];return this.#T&&this.#l(i)?i.__abortController.abort(new Error("evicted")):(this.#E||this.#e)&&(this.#E&&this.#n?.(i,s,"evict"),this.#e&&this.#m?.push([i,s,"evict"])),this.#L(e),this.#b?.[e]&&(clearTimeout(this.#b[e]),this.#b[e]=void 0),t&&(this.#a[e]=void 0,this.#i[e]=void 0,this.#R.push(e)),this.#o===1?(this.#y=this.#p=0,this.#R.length=0):this.#y=this.#d[e],this.#u.delete(s),this.#o--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#u.get(t);if(r!==void 0){let h=this.#i[r];if(this.#l(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#_(r))i&&(i.has="stale",this.#D(i,r));else return s&&this.#C(r),i&&(i.has="hit",this.#D(i,r)),!0}else i&&(i.has="miss");return!1}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#u.get(t);if(i===void 0||!s&&this.#_(i))return;let r=this.#i[i];return this.#l(r)?r.__staleWhileFetching:r}#z(t,e,s,i){let r=e===void 0?void 0:this.#i[e];if(this.#l(r))return r;let h=new Lt,{signal:o}=s;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let a={signal:h.signal,options:s,context:i},l=(p,b=!1)=>{let{aborted:w}=h.signal,v=s.ignoreFetchAbort&&p!==void 0,E=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&p!==void 0);if(s.status&&(w&&!b?(s.status.fetchAborted=!0,s.status.fetchError=h.signal.reason,v&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),w&&!v&&!b)return c(h.signal.reason,E);let y=u,S=this.#i[e];return(S===u||v&&b&&S===void 0)&&(p===void 0?y.__staleWhileFetching!==void 0?this.#i[e]=y.__staleWhileFetching:this.#A(t,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(t,p,a.options))),p},f=p=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=p),c(p,!1)),c=(p,b)=>{let{aborted:w}=h.signal,v=w&&s.allowStaleOnFetchAbort,E=v||s.allowStaleOnFetchRejection,y=E||s.noDeleteOnFetchRejection,S=u;if(this.#i[e]===u&&(!y||!b&&S.__staleWhileFetching===void 0?this.#A(t,"fetch"):v||(this.#i[e]=S.__staleWhileFetching)),E)return s.status&&S.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw p},d=(p,b)=>{let w=this.#S?.(t,r,a);w&&w instanceof Promise&&w.then(v=>p(v===void 0?void 0:v),b),h.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=v=>l(v,!0)))})};s.status&&(s.status.fetchDispatched=!0);let u=new Promise(d).then(l,f),m=Object.assign(u,{__abortController:h,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,m,{...a.options,status:void 0}),e=this.#u.get(t)):this.#i[e]=m,m}#l(t){if(!this.#T)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof Lt}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:p,forceRefresh:b=!1,status:w,signal:v}=e;if(!this.#T)return w&&(w.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:w});let E={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:h,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:f,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:u,status:w,signal:v},y=this.#u.get(t);if(y===void 0){w&&(w.fetch="miss");let S=this.#z(t,y,E,p);return S.__returned=S}else{let S=this.#i[y];if(this.#l(S)){let st=s&&S.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",st&&(w.returnedStale=!0)),st?S.__staleWhileFetching:S.__returned=S}let B=this.#_(y);if(!b&&!B)return w&&(w.fetch="hit"),this.#N(y),i&&this.#C(y),w&&this.#D(w,y),S;let U=this.#z(t,y,E,p),et=U.__staleWhileFetching!==void 0&&s;return w&&(w.fetch=B?"stale":"refresh",et&&B&&(w.returnedStale=!0)),et?U.__staleWhileFetching:U.__returned=U}}async forceFetch(t,e={}){let s=await this.fetch(t,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,e={}){let s=this.#w;if(!s)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...h}=e,o=this.get(t,h);if(!r&&o!==void 0)return o;let a=s(t,o,{options:h,context:i});return this.set(t,a,h),a}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:h}=e,o=this.#u.get(t);if(o!==void 0){let a=this.#i[o],l=this.#l(a);return h&&this.#D(h,o),this.#_(o)?(h&&(h.get="stale"),l?(h&&s&&a.__staleWhileFetching!==void 0&&(h.returnedStale=!0),s?a.__staleWhileFetching:void 0):(r||this.#A(t,"expire"),h&&s&&(h.returnedStale=!0),s?a:void 0)):(h&&(h.get="hit"),l?a.__staleWhileFetching:(this.#N(o),i&&this.#C(o),a))}else h&&(h.get="miss")}#U(t,e){this.#v[e]=t,this.#d[t]=e}#N(t){t!==this.#p&&(t===this.#y?this.#y=this.#d[t]:this.#U(this.#v[t],this.#d[t]),this.#U(this.#p,t),this.#p=t)}delete(t){return this.#A(t,"delete")}#A(t,e){let s=!1;if(this.#o!==0){let i=this.#u.get(t);if(i!==void 0)if(this.#b?.[i]&&(clearTimeout(this.#b?.[i]),this.#b[i]=void 0),s=!0,this.#o===1)this.#q(e);else{this.#L(i);let r=this.#i[i];if(this.#l(r)?r.__abortController.abort(new Error("deleted")):(this.#E||this.#e)&&(this.#E&&this.#n?.(r,t,e),this.#e&&this.#m?.push([r,t,e])),this.#u.delete(t),this.#a[i]=void 0,this.#i[i]=void 0,i===this.#p)this.#p=this.#v[i];else if(i===this.#y)this.#y=this.#d[i];else{let h=this.#v[i];this.#d[h]=this.#d[i];let o=this.#d[i];this.#v[o]=this.#v[i]}this.#o--,this.#R.push(i)}}if(this.#e&&this.#m?.length){let i=this.#m,r;for(;r=i?.shift();)this.#h?.(...r)}return s}clear(){return this.#q("delete")}#q(t){for(let e of this.#M({allowStale:!0})){let s=this.#i[e];if(this.#l(s))s.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#E&&this.#n?.(s,i,t),this.#e&&this.#m?.push([s,i,t])}}if(this.#u.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#g&&this.#x){this.#g.fill(0),this.#x.fill(0);for(let e of this.#b??[])e!==void 0&&clearTimeout(e);this.#b?.fill(void 0)}if(this.#O&&this.#O.fill(0),this.#y=0,this.#p=0,this.#R.length=0,this.#f=0,this.#o=0,this.#e&&this.#m){let e=this.#m,s;for(;s=e?.shift();)this.#h?.(...s)}}};Wt.LRUCache=rr});var Oe=R(P=>{"use strict";var nr=P&&P.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(P,"__esModule",{value:!0});P.Minipass=P.isWritable=P.isReadable=P.isStream=void 0;var ds=typeof process=="object"&&process?process:{stdout:null,stderr:null},_e=__webpack_require__(/*! node:events */ "node:events"),ws=nr(__webpack_require__(/*! node:stream */ "node:stream")),hr=__webpack_require__(/*! node:string_decoder */ "node:string_decoder"),or=n=>!!n&&typeof n=="object"&&(n instanceof qt||n instanceof ws.default||(0,P.isReadable)(n)||(0,P.isWritable)(n));P.isStream=or;var ar=n=>!!n&&typeof n=="object"&&n instanceof _e.EventEmitter&&typeof n.pipe=="function"&&n.pipe!==ws.default.Writable.prototype.pipe;P.isReadable=ar;var lr=n=>!!n&&typeof n=="object"&&n instanceof _e.EventEmitter&&typeof n.write=="function"&&typeof n.end=="function";P.isWritable=lr;var $=Symbol("EOF"),q=Symbol("maybeEmitEnd"),K=Symbol("emittedEnd"),Bt=Symbol("emittingEnd"),lt=Symbol("emittedError"),It=Symbol("closed"),ps=Symbol("read"),Gt=Symbol("flush"),ms=Symbol("flushChunk"),L=Symbol("encoding"),rt=Symbol("decoder"),x=Symbol("flowing"),ct=Symbol("paused"),nt=Symbol("resume"),T=Symbol("buffer"),M=Symbol("pipes"),C=Symbol("bufferLength"),we=Symbol("bufferPush"),zt=Symbol("bufferShift"),k=Symbol("objectMode"),O=Symbol("destroyed"),be=Symbol("error"),ye=Symbol("emitData"),gs=Symbol("emitEnd"),Se=Symbol("emitEnd2"),I=Symbol("async"),ve=Symbol("abort"),Ut=Symbol("aborted"),ut=Symbol("signal"),Z=Symbol("dataListeners"),D=Symbol("discarded"),ft=n=>Promise.resolve().then(n),cr=n=>n(),ur=n=>n==="end"||n==="finish"||n==="prefinish",fr=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,dr=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),$t=class{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[nt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Ee=class extends $t{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>this.dest.emit("error",i),t.on("error",this.proxyErrors)}},pr=n=>!!n.objectMode,mr=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",qt=class extends _e.EventEmitter{[x]=!1;[ct]=!1;[M]=[];[T]=[];[k];[L];[I];[rt];[$]=!1;[K]=!1;[Bt]=!1;[It]=!1;[lt]=null;[C]=0;[O]=!1;[ut];[Ut]=!1;[Z]=0;[D]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");pr(e)?(this[k]=!0,this[L]=null):mr(e)?(this[L]=e.encoding,this[k]=!1):(this[k]=!1,this[L]=null),this[I]=!!e.async,this[rt]=this[L]?new hr.StringDecoder(this[L]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[T]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[M]});let{signal:s}=e;s&&(this[ut]=s,s.aborted?this[ve]():s.addEventListener("abort",()=>this[ve]()))}get bufferLength(){return this[C]}get encoding(){return this[L]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[I]}set async(t){this[I]=this[I]||!!t}[ve](){this[Ut]=!0,this.emit("abort",this[ut]?.reason),this.destroy(this[ut]?.reason)}get aborted(){return this[Ut]}set aborted(t){}write(t,e,s){if(this[Ut])return!1;if(this[$])throw new Error("write after end");if(this[O])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[I]?ft:cr;if(!this[k]&&!Buffer.isBuffer(t)){if(dr(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(fr(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k]?(this[x]&&this[C]!==0&&this[Gt](!0),this[x]?this.emit("data",t):this[we](t),this[C]!==0&&this.emit("readable"),s&&i(s),this[x]):t.length?(typeof t=="string"&&!(e===this[L]&&!this[rt]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[L]&&(t=this[rt].write(t)),this[x]&&this[C]!==0&&this[Gt](!0),this[x]?this.emit("data",t):this[we](t),this[C]!==0&&this.emit("readable"),s&&i(s),this[x]):(this[C]!==0&&this.emit("readable"),s&&i(s),this[x])}read(t){if(this[O])return null;if(this[D]=!1,this[C]===0||t===0||t&&t>this[C])return this[q](),null;this[k]&&(t=null),this[T].length>1&&!this[k]&&(this[T]=[this[L]?this[T].join(""):Buffer.concat(this[T],this[C])]);let e=this[ps](t||null,this[T][0]);return this[q](),e}[ps](t,e){if(this[k])this[zt]();else{let s=e;t===s.length||t===null?this[zt]():typeof s=="string"?(this[T][0]=s.slice(t),e=s.slice(0,t),this[C]-=t):(this[T][0]=s.subarray(t),e=s.subarray(0,t),this[C]-=t)}return this.emit("data",e),!this[T].length&&!this[$]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[$]=!0,this.writable=!1,(this[x]||!this[ct])&&this[q](),this}[nt](){this[O]||(!this[Z]&&!this[M].length&&(this[D]=!0),this[ct]=!1,this[x]=!0,this.emit("resume"),this[T].length?this[Gt]():this[$]?this[q]():this.emit("drain"))}resume(){return this[nt]()}pause(){this[x]=!1,this[ct]=!0,this[D]=!1}get destroyed(){return this[O]}get flowing(){return this[x]}get paused(){return this[ct]}[we](t){this[k]?this[C]+=1:this[C]+=t.length,this[T].push(t)}[zt](){return this[k]?this[C]-=1:this[C]-=this[T][0].length,this[T].shift()}[Gt](t=!1){do;while(this[ms](this[zt]())&&this[T].length);!t&&!this[T].length&&!this[$]&&this.emit("drain")}[ms](t){return this.emit("data",t),this[x]}pipe(t,e){if(this[O])return t;this[D]=!1;let s=this[K];return e=e||{},t===ds.stdout||t===ds.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[M].push(e.proxyErrors?new Ee(this,t,e):new $t(this,t,e)),this[I]?ft(()=>this[nt]()):this[nt]()),t}unpipe(t){let e=this[M].find(s=>s.dest===t);e&&(this[M].length===1?(this[x]&&this[Z]===0&&(this[x]=!1),this[M]=[]):this[M].splice(this[M].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[D]=!1,this[Z]++,!this[M].length&&!this[x]&&this[nt]();else if(t==="readable"&&this[C]!==0)super.emit("readable");else if(ur(t)&&this[K])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[lt]){let i=e;this[I]?ft(()=>i.call(this,this[lt])):i.call(this,this[lt])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Z]=this.listeners("data").length,this[Z]===0&&!this[D]&&!this[M].length&&(this[x]=!1)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Z]=0,!this[D]&&!this[M].length&&(this[x]=!1)),e}get emittedEnd(){return this[K]}[q](){!this[Bt]&&!this[K]&&!this[O]&&this[T].length===0&&this[$]&&(this[Bt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[It]&&this.emit("close"),this[Bt]=!1)}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==O&&this[O])return!1;if(t==="data")return!this[k]&&!s?!1:this[I]?(ft(()=>this[ye](s)),!0):this[ye](s);if(t==="end")return this[gs]();if(t==="close"){if(this[It]=!0,!this[K]&&!this[O])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[lt]=s,super.emit(be,s);let r=!this[ut]||this.listeners("error").length?super.emit("error",s):!1;return this[q](),r}else if(t==="resume"){let r=super.emit("resume");return this[q](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[q](),i}[ye](t){for(let s of this[M])s.dest.write(t)===!1&&this.pause();let e=this[D]?!1:super.emit("data",t);return this[q](),e}[gs](){return this[K]?!1:(this[K]=!0,this.readable=!1,this[I]?(ft(()=>this[Se]()),!0):this[Se]())}[Se](){if(this[rt]){let e=this[rt].end();if(e){for(let s of this[M])s.dest.write(e);this[D]||super.emit("data",e)}}for(let e of this[M])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k]||(t.dataLength+=s.length)}),await e,t}async concat(){if(this[k])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[L]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(O,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[D]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[$])return e();let r,h,o=c=>{this.off("data",a),this.off("end",l),this.off(O,f),e(),h(c)},a=c=>{this.off("error",o),this.off("end",l),this.off(O,f),this.pause(),r({value:c,done:!!this[$]})},l=()=>{this.off("error",o),this.off("data",a),this.off(O,f),e(),r({done:!0,value:void 0})},f=()=>o(new Error("stream destroyed"));return new Promise((c,d)=>{h=d,r=c,this.once(O,f),this.once("error",o),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[D]=!1;let t=!1,e=()=>(this.pause(),this.off(be,e),this.off(O,e),this.off("end",e),t=!0,{done:!0,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:!1,value:i}};return this.once("end",e),this.once(be,e),this.once(O,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){if(this[O])return t?this.emit("error",t):this.emit(O),this;this[O]=!0,this[D]=!0,this[T].length=0,this[C]=0;let e=this;return typeof e.close=="function"&&!this[It]&&e.close(),t?this.emit("error",t):this.emit(O),this}static get isStream(){return P.isStream}};P.Minipass=qt});var Ms=R(_=>{"use strict";var gr=_&&_.__createBinding||(Object.create?(function(n,t,e,s){s===void 0&&(s=e);var i=Object.getOwnPropertyDescriptor(t,e);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(n,s,i)}):(function(n,t,e,s){s===void 0&&(s=e),n[s]=t[e]})),wr=_&&_.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),br=_&&_.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&gr(t,n,e);return wr(t,n),t};Object.defineProperty(_,"__esModule",{value:!0});_.PathScurry=_.Path=_.PathScurryDarwin=_.PathScurryPosix=_.PathScurryWin32=_.PathScurryBase=_.PathPosix=_.PathWin32=_.PathBase=_.ChildrenCache=_.ResolveCache=void 0;var Qt=fs(),Yt=__webpack_require__(/*! node:path */ "node:path"),yr=__webpack_require__(/*! node:url */ "node:url"),pt=__webpack_require__(/*! fs */ "fs"),Sr=br(__webpack_require__(/*! node:fs */ "node:fs")),vr=pt.realpathSync.native,Ht=__webpack_require__(/*! node:fs/promises */ "node:fs/promises"),bs=Oe(),mt={lstatSync:pt.lstatSync,readdir:pt.readdir,readdirSync:pt.readdirSync,readlinkSync:pt.readlinkSync,realpathSync:vr,promises:{lstat:Ht.lstat,readdir:Ht.readdir,readlink:Ht.readlink,realpath:Ht.realpath}},_s=n=>!n||n===mt||n===Sr?mt:{...mt,...n,promises:{...mt.promises,...n.promises||{}}},Os=/^\\\\\?\\([a-z]:)\\?$/i,Er=n=>n.replace(/\//g,"\\").replace(Os,"$1\\"),_r=/[\\\/]/,N=0,xs=1,Ts=2,G=4,Cs=6,Rs=8,Q=10,As=12,j=15,dt=~j,xe=16,ys=32,gt=64,W=128,Vt=256,Xt=512,Ss=gt|W|Xt,Or=1023,Te=n=>n.isFile()?Rs:n.isDirectory()?G:n.isSymbolicLink()?Q:n.isCharacterDevice()?Ts:n.isBlockDevice()?Cs:n.isSocket()?As:n.isFIFO()?xs:N,vs=new Qt.LRUCache({max:2**12}),wt=n=>{let t=vs.get(n);if(t)return t;let e=n.normalize("NFKD");return vs.set(n,e),e},Es=new Qt.LRUCache({max:2**12}),Kt=n=>{let t=Es.get(n);if(t)return t;let e=wt(n.toLowerCase());return Es.set(n,e),e},bt=class extends Qt.LRUCache{constructor(){super({max:256})}};_.ResolveCache=bt;var Jt=class extends Qt.LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}};_.ChildrenCache=Jt;var ks=Symbol("PathScurry setAsCwd"),A=class{name;root;roots;parent;nocase;isCWD=!1;#t;#s;get dev(){return this.#s}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#h;get uid(){return this.#h}#S;get gid(){return this.#S}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#o;get ino(){return this.#o}#f;get size(){return this.#f}#u;get blocks(){return this.#u}#a;get atimeMs(){return this.#a}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#v;get birthtimeMs(){return this.#v}#y;get atime(){return this.#y}#p;get mtime(){return this.#p}#R;get ctime(){return this.#R}#m;get birthtime(){return this.#m}#O;#x;#g;#b;#E;#T;#e;#F;#P;#C;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=N,s,i,r,h,o){this.name=t,this.#O=r?Kt(t):wt(t),this.#e=e&Or,this.nocase=r,this.roots=i,this.root=s||this,this.#F=h,this.#g=o.fullpath,this.#E=o.relative,this.#T=o.relativePosix,this.parent=o.parent,this.parent?this.#t=this.parent.#t:this.#t=_s(o.fs)}depth(){return this.#x!==void 0?this.#x:this.parent?this.#x=this.parent.depth()+1:this.#x=0}childrenCache(){return this.#F}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#D(i):this.#D(i)}#D(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#F.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#F.set(this,e),this.#e&=~xe,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?Kt(t):wt(t);for(let a of s)if(a.#O===i)return a;let r=this.parent?this.sep:"",h=this.#g?this.#g+r+t:void 0,o=this.newChild(t,N,{...e,parent:this,fullpath:h});return this.canReaddir()||(o.#e|=W),s.push(o),o}relative(){if(this.isCWD)return"";if(this.#E!==void 0)return this.#E;let t=this.name,e=this.parent;if(!e)return this.#E=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let t=this.name,e=this.parent;if(!e)return this.#T=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#g!==void 0)return this.#g;let t=this.name,e=this.parent;if(!e)return this.#g=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#g=i}fullpathPosix(){if(this.#b!==void 0)return this.#b;if(this.sep==="/")return this.#b=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#b=`//?/${i}`:this.#b=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#b=s}isUnknown(){return(this.#e&j)===N}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#e&j)===Rs}isDirectory(){return(this.#e&j)===G}isCharacterDevice(){return(this.#e&j)===Ts}isBlockDevice(){return(this.#e&j)===Cs}isFIFO(){return(this.#e&j)===xs}isSocket(){return(this.#e&j)===As}isSymbolicLink(){return(this.#e&Q)===Q}lstatCached(){return this.#e&ys?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#C}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let t=this.#e&j;return!(t!==N&&t!==Q||this.#e&Vt||this.#e&W)}calledReaddir(){return!!(this.#e&xe)}isENOENT(){return!!(this.#e&W)}isNamed(t){return this.nocase?this.#O===Kt(t):this.#O===wt(t)}async readlink(){let t=this.#P;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#P=s}catch(e){this.#M(e.code);return}}readlinkSync(){let t=this.#P;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#P=s}catch(e){this.#M(e.code);return}}#W(t){this.#e|=xe;for(let e=t.provisional;e<t.length;e++){let s=t[e];s&&s.#_()}}#_(){this.#e&W||(this.#e=(this.#e|W)&dt,this.#$())}#$(){let t=this.children();t.provisional=0;for(let e of t)e.#_()}#L(){this.#e|=Xt,this.#j()}#j(){if(this.#e&gt)return;let t=this.#e;(t&j)===G&&(t&=dt),this.#e=t|gt,this.#$()}#B(t=""){t==="ENOTDIR"||t==="EPERM"?this.#j():t==="ENOENT"?this.#_():this.children().provisional=0}#k(t=""){t==="ENOTDIR"?this.parent.#j():t==="ENOENT"&&this.#_()}#M(t=""){let e=this.#e;e|=Vt,t==="ENOENT"&&(e|=W),(t==="EINVAL"||t==="UNKNOWN")&&(e&=dt),this.#e=e,t==="ENOTDIR"&&this.parent&&this.parent.#j()}#I(t,e){return this.#z(t,e)||this.#G(t,e)}#G(t,e){let s=Te(t),i=this.newChild(t.name,s,{parent:this}),r=i.#e&j;return r!==G&&r!==Q&&r!==N&&(i.#e|=gt),e.unshift(i),e.provisional++,i}#z(t,e){for(let s=e.provisional;s<e.length;s++){let i=e[s];if((this.nocase?Kt(t.name):wt(t.name))===i.#O)return this.#l(t,i,s,e)}}#l(t,e,s,i){let r=e.name;return e.#e=e.#e&dt|Te(t),r!==t.name&&(e.name=t.name),s!==i.provisional&&(s===i.length-1?i.pop():i.splice(s,1),i.unshift(e)),i.provisional++,e}async lstat(){if((this.#e&W)===0)try{return this.#U(await this.#t.promises.lstat(this.fullpath())),this}catch(t){this.#k(t.code)}}lstatSync(){if((this.#e&W)===0)try{return this.#U(this.#t.lstatSync(this.fullpath())),this}catch(t){this.#k(t.code)}}#U(t){let{atime:e,atimeMs:s,birthtime:i,birthtimeMs:r,blksize:h,blocks:o,ctime:a,ctimeMs:l,dev:f,gid:c,ino:d,mode:u,mtime:m,mtimeMs:p,nlink:b,rdev:w,size:v,uid:E}=t;this.#y=e,this.#a=s,this.#m=i,this.#v=r,this.#c=h,this.#u=o,this.#R=a,this.#d=l,this.#s=f,this.#S=c,this.#o=d,this.#n=u,this.#p=m,this.#i=p,this.#r=b,this.#w=w,this.#f=v,this.#h=E;let y=Te(t);this.#e=this.#e&dt|y|ys,y!==N&&y!==G&&y!==Q&&(this.#e|=gt)}#N=[];#A=!1;#q(t){this.#A=!1;let e=this.#N.slice();this.#N.length=0,e.forEach(s=>s(null,t))}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#N.push(t),this.#A)return;this.#A=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(r,h)=>{if(r)this.#B(r.code),s.provisional=0;else{for(let o of h)this.#I(o,s);this.#W(s)}this.#q(s.slice(0,s.provisional))})}#H;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#H)await this.#H;else{let s=()=>{};this.#H=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#I(i,t);this.#W(t)}catch(i){this.#B(i.code),t.provisional=0}this.#H=void 0,s()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#I(s,t);this.#W(t)}catch(s){this.#B(s.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#e&Ss)return!1;let t=j&this.#e;return t===N||t===G||t===Q}shouldWalk(t,e){return(this.#e&G)===G&&!(this.#e&Ss)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#C)return this.#C;if(!((Xt|Vt|W)&this.#e))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#C=this.resolve(t)}catch{this.#L()}}realpathSync(){if(this.#C)return this.#C;if(!((Xt|Vt|W)&this.#e))try{let t=this.#t.realpathSync(this.fullpath());return this.#C=this.resolve(t)}catch{this.#L()}}[ks](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#E=s.join(this.sep),i.#T=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#E=void 0,i.#T=void 0,i=i.parent}};_.PathBase=A;var yt=class n extends A{sep="\\";splitSep=_r;constructor(t,e=N,s,i,r,h,o){super(t,e,s,i,r,h,o)}newChild(t,e=N,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return Yt.win32.parse(t).root}getRoot(t){if(t=Er(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new Et(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(Os,"$1\\"),t===e}};_.PathWin32=yt;var St=class n extends A{splitSep="/";sep="/";constructor(t,e=N,s,i,r,h,o){super(t,e,s,i,r,h,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=N,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}};_.PathPosix=St;var vt=class{root;rootPath;roots;cwd;#t;#s;#n;nocase;#r;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:h=mt}={}){this.#r=_s(h),(t instanceof URL||t.startsWith("file://"))&&(t=(0,yr.fileURLToPath)(t));let o=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#t=new bt,this.#s=new bt,this.#n=new Jt(r);let a=o.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,f=a.length-1,c=e.sep,d=this.rootPath,u=!1;for(let m of a){let p=f--;l=l.child(m,{relative:new Array(p).fill("..").join(c),relativePosix:new Array(p).fill("..").join("/"),fullpath:d+=(u?"":c)+m}),u=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let h=t[r];if(!(!h||h===".")&&(e=e?`${h}/${e}`:h,this.isAbsolute(h)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let h=t[r];if(!(!h||h===".")&&(e=e?`${h}/${e}`:h,this.isAbsolute(h)))break}let s=this.#s.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#s.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=[];(!r||r(t))&&o.push(s?t:t.fullpath());let a=new Set,l=(c,d)=>{a.add(c),c.readdirCB((u,m)=>{if(u)return d(u);let p=m.length;if(!p)return d();let b=()=>{--p===0&&d()};for(let w of m)(!r||r(w))&&o.push(s?w:w.fullpath()),i&&w.isSymbolicLink()?w.realpath().then(v=>v?.isUnknown()?v.lstat():v).then(v=>v?.shouldWalk(a,h)?l(v,b):b()):w.shouldWalk(a,h)?l(w,b):b()},!0)},f=t;return new Promise((c,d)=>{l(f,u=>{if(u)return d(u);c(o)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=[];(!r||r(t))&&o.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let f=l.readdirSync();for(let c of f){(!r||r(c))&&o.push(s?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(i&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(a,h)&&a.add(d)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e;(!r||r(t))&&(yield s?t:t.fullpath());let o=new Set([t]);for(let a of o){let l=a.readdirSync();for(let f of l){(!r||r(f))&&(yield s?f:f.fullpath());let c=f;if(f.isSymbolicLink()){if(!(i&&(c=f.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(o,h)&&o.add(c)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=new bs.Minipass({objectMode:!0});(!r||r(t))&&o.write(s?t:t.fullpath());let a=new Set,l=[t],f=0,c=()=>{let d=!1;for(;!d;){let u=l.shift();if(!u){f===0&&o.end();return}f++,a.add(u);let m=(b,w,v=!1)=>{if(b)return o.emit("error",b);if(i&&!v){let E=[];for(let y of w)y.isSymbolicLink()&&E.push(y.realpath().then(S=>S?.isUnknown()?S.lstat():S));if(E.length){Promise.all(E).then(()=>m(null,w,!0));return}}for(let E of w)E&&(!r||r(E))&&(o.write(s?E:E.fullpath())||(d=!0));f--;for(let E of w){let y=E.realpathCached()||E;y.shouldWalk(a,h)&&l.push(y)}d&&!o.flowing?o.once("drain",c):p||c()},p=!0;u.readdirCB(m,!0),p=!1}};return c(),o}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=new bs.Minipass({objectMode:!0}),a=new Set;(!r||r(t))&&o.write(s?t:t.fullpath());let l=[t],f=0,c=()=>{let d=!1;for(;!d;){let u=l.shift();if(!u){f===0&&o.end();return}f++,a.add(u);let m=u.readdirSync();for(let p of m)(!r||r(p))&&(o.write(s?p:p.fullpath())||(d=!0));f--;for(let p of m){let b=p;if(p.isSymbolicLink()){if(!(i&&(b=p.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(a,h)&&l.push(b)}}d&&!o.flowing&&o.once("drain",c)};return c(),o}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[ks](e)}};_.PathScurryBase=vt;var Et=class extends vt{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,Yt.win32,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return Yt.win32.parse(t).root.toUpperCase()}newRoot(t){return new yt(this.rootPath,G,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}};_.PathScurryWin32=Et;var _t=class extends vt{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=!1}=e;super(t,Yt.posix,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new St(this.rootPath,G,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}};_.PathScurryPosix=_t;var Zt=class extends _t{constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,{...e,nocase:s})}};_.PathScurryDarwin=Zt;_.Path=process.platform==="win32"?yt:St;_.PathScurry=process.platform==="win32"?Et:process.platform==="darwin"?Zt:_t});var Re=R(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.Pattern=void 0;var xr=H(),Tr=n=>n.length>=1,Cr=n=>n.length>=1,Rr=Symbol.for("nodejs.util.inspect.custom"),Ce=class n{#t;#s;#n;length;#r;#h;#S;#w;#c;#o;#f=!0;constructor(t,e,s,i){if(!Tr(t))throw new TypeError("empty pattern list");if(!Cr(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#s=e,this.#n=s,this.#r=i,this.#n===0){if(this.isUNC()){let[r,h,o,a,...l]=this.#t,[f,c,d,u,...m]=this.#s;l[0]===""&&(l.shift(),m.shift());let p=[r,h,o,a,""].join("/"),b=[f,c,d,u,""].join("/");this.#t=[p,...l],this.#s=[b,...m],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[r,...h]=this.#t,[o,...a]=this.#s;h[0]===""&&(h.shift(),a.shift());let l=r+"/",f=o+"/";this.#t=[l,...h],this.#s=[f,...a],this.length=this.#t.length}}}[Rr](){return"Pattern <"+this.#s.slice(this.#n).join("/")+">"}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===xr.GLOBSTAR}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#h!==void 0?this.#h:this.hasMore()?(this.#h=new n(this.#t,this.#s,this.#n+1,this.#r),this.#h.#o=this.#o,this.#h.#c=this.#c,this.#h.#w=this.#w,this.#h):this.#h=null}isUNC(){let t=this.#t;return this.#c!==void 0?this.#c:this.#c=this.#r==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#w!==void 0?this.#w:this.#w=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#o!==void 0?this.#o:this.#o=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}};te.Pattern=Ce});var ke=R(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.Ignore=void 0;var Ps=H(),Ar=Re(),kr=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ae=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:h=kr}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=h,this.mmopts={dot:!0,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:h,nocomment:!0,nonegate:!0};for(let o of t)this.add(o)}add(t){let e=new Ps.Minimatch(t,this.mmopts);for(let s=0;s<e.set.length;s++){let i=e.set[s],r=e.globParts[s];if(!i||!r)throw new Error("invalid pattern object");for(;i[0]==="."&&r[0]===".";)i.shift(),r.shift();let h=new Ar.Pattern(i,r,0,this.platform),o=new Ps.Minimatch(h.globString(),this.mmopts),a=r[r.length-1]==="**",l=h.isAbsolute();l?this.absolute.push(o):this.relative.push(o),a&&(l?this.absoluteChildren.push(o):this.relativeChildren.push(o))}}ignored(t){let e=t.fullpath(),s=`${e}/`,i=t.relative()||".",r=`${i}/`;for(let h of this.relative)if(h.match(i)||h.match(r))return!0;for(let h of this.absolute)if(h.match(e)||h.match(s))return!0;return!1}childrenIgnored(t){let e=t.fullpath()+"/",s=(t.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(s))return!0;for(let i of this.absoluteChildren)if(i.match(e))return!0;return!1}};ee.Ignore=Ae});var Fs=R(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.Processor=z.SubWalks=z.MatchRecord=z.HasWalkedCache=void 0;var Ds=H(),se=class n{store;constructor(t=new Map){this.store=t}copy(){return new n(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){let s=t.fullpath(),i=this.store.get(s);i?i.add(e.globString()):this.store.set(s,new Set([e.globString()]))}};z.HasWalkedCache=se;var ie=class{store=new Map;add(t,e,s){let i=(e?2:0)|(s?1:0),r=this.store.get(t);this.store.set(t,r===void 0?i:i&r)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}};z.MatchRecord=ie;var re=class{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}};z.SubWalks=re;var Me=class n{hasWalkedCache;matches=new ie;subwalks=new re;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new se}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let h=r.root(),o=r.isAbsolute()&&this.opts.absolute!==!1;if(h){i=i.resolve(h==="/"&&this.opts.root!==void 0?this.opts.root:h);let c=r.rest();if(c)r=c;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let a,l,f=!1;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,f=!0;if(a=r.pattern(),l=r.rest(),f){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r)}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(i.resolve(a),o,c);continue}else if(a===Ds.GLOBSTAR){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let c=l?.pattern(),d=l?.rest();if(!l||(c===""||c===".")&&!d)this.matches.add(i,o,c===""||c===".");else if(c===".."){let u=i.parent||i;d?this.hasWalkedCache.hasWalked(u,d)||this.subwalks.add(u,d):this.matches.add(u,o,!0)}}else a instanceof RegExp&&this.subwalks.add(i,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let h of s){let o=h.isAbsolute(),a=h.pattern(),l=h.rest();a===Ds.GLOBSTAR?i.testGlobstar(r,h,l,o):a instanceof RegExp?i.testRegExp(r,a,l,o):i.testString(r,a,l,o)}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let h=t.parent||t;this.subwalks.add(h,s)}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i)}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}};z.Processor=Me});var Ls=R(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.GlobStream=X.GlobWalker=X.GlobUtil=void 0;var Mr=Oe(),js=ke(),Ns=Fs(),Pr=(n,t)=>typeof n=="string"?new js.Ignore([n],t):Array.isArray(n)?new js.Ignore(n,t):n,Ot=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#s;#n;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#n=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#s=Pr(s.ignore??[],s),!this.includeChildMatches&&typeof this.#s.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#r(t){return this.seen.has(t)||!!this.#s?.ignored?.(t)}#h(t){return!!this.#s?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let h=await r.realpath();h&&(h.isUnknown()||this.opts.stat)&&await h.lstat()}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#r(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let h=r.realpathSync();h&&(h?.isUnknown()||this.opts.stat)&&h.lstatSync()}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#r(t))return;if(!this.includeChildMatches&&this.#s?.add){let r=`${t.relativePosix()}/**`;this.#s.add(r)}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i)}else{let r=this.opts.posix?t.relativePosix():t.relative(),h=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?h+r+i:"."+i)}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e)}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e)}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Ns.Processor(this.opts),s)}walkCB2(t,e,s,i){if(this.#h(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||(r++,this.match(o,a,l).then(()=>h()));for(let o of s.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;r++;let a=o.readdirCached();o.calledReaddir()?this.walkCB3(o,a,s,h):o.readdirCB((l,f)=>this.walkCB3(o,f,s,h),!0)}h()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||(r++,this.match(o,a,l).then(()=>h()));for(let[o,a]of s.subwalks.entries())r++,this.walkCB2(o,a,s.child(),h);h()}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Ns.Processor(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#h(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||this.matchSync(o,a,l);for(let o of s.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;r++;let a=o.readdirSync();this.walkCB3Sync(o,a,s,h)}h()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||this.matchSync(o,a,l);for(let[o,a]of s.subwalks.entries())r++,this.walkCB2Sync(o,a,s.child(),h);h()}};X.GlobUtil=Ot;var Pe=class extends Ot{matches=new Set;constructor(t,e,s){super(t,e,s)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};X.GlobWalker=Pe;var De=class extends Ot{results;constructor(t,e,s){super(t,e,s),this.results=new Mr.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};X.GlobStream=De});var je=R(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.Glob=void 0;var Dr=H(),Fr=__webpack_require__(/*! node:url */ "node:url"),ne=Ms(),jr=Re(),he=Ls(),Nr=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Fe=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=(0,Fr.fileURLToPath)(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=t,this.platform=e.platform||Nr,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=e.platform==="win32"?ne.PathScurryWin32:e.platform==="darwin"?ne.PathScurryDarwin:e.platform?ne.PathScurryPosix:ne.PathScurry;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new Dr.Minimatch(a,i)),[h,o]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=h.map((a,l)=>{let f=o[l];if(!f)throw new Error("invalid pattern object");return new jr.Pattern(a,f,0,this.platform)})}async walk(){return[...await new he.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new he.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new he.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new he.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};oe.Glob=Fe});var Ne=R(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.hasMagic=void 0;var Lr=H(),Wr=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new Lr.Minimatch(e,t).hasMagic())return!0;return!1};ae.hasMagic=Wr});Object.defineProperty(exports, "__esModule", ({value:!0}));exports.glob=exports.sync=exports.iterate=exports.iterateSync=exports.stream=exports.streamSync=exports.Ignore=exports.hasMagic=exports.Glob=exports.unescape=exports.escape=void 0;exports.globStreamSync=xt;exports.globStream=Le;exports.globSync=We;exports.globIterateSync=Tt;exports.globIterate=Be;var Ws=H(),tt=je(),Br=Ne(),Is=H();Object.defineProperty(exports, "escape", ({enumerable:!0,get:function(){return Is.escape}}));Object.defineProperty(exports, "unescape", ({enumerable:!0,get:function(){return Is.unescape}}));var Ir=je();Object.defineProperty(exports, "Glob", ({enumerable:!0,get:function(){return Ir.Glob}}));var Gr=Ne();Object.defineProperty(exports, "hasMagic", ({enumerable:!0,get:function(){return Gr.hasMagic}}));var zr=ke();Object.defineProperty(exports, "Ignore", ({enumerable:!0,get:function(){return zr.Ignore}}));function xt(n,t={}){return new tt.Glob(n,t).streamSync()}function Le(n,t={}){return new tt.Glob(n,t).stream()}function We(n,t={}){return new tt.Glob(n,t).walkSync()}async function Bs(n,t={}){return new tt.Glob(n,t).walk()}function Tt(n,t={}){return new tt.Glob(n,t).iterateSync()}function Be(n,t={}){return new tt.Glob(n,t).iterate()}exports.streamSync=xt;exports.stream=Object.assign(Le,{sync:xt});exports.iterateSync=Tt;exports.iterate=Object.assign(Be,{sync:Tt});exports.sync=Object.assign(We,{stream:xt,iterate:Tt});exports.glob=Object.assign(Bs,{glob:Bs,globSync:We,sync:exports.sync,globStream:Le,stream:exports.stream,globStreamSync:xt,streamSync:exports.streamSync,globIterate:Be,iterate:exports.iterate,globIterateSync:Tt,iterateSync:exports.iterateSync,Glob:tt.Glob,hasMagic:Br.hasMagic,escape:Ws.escape,unescape:Ws.unescape});exports.glob.glob=exports.glob;
127608
+ //# sourceMappingURL=index.min.js.map
127609
+
127610
+
131214
127611
  /***/ },
131215
127612
 
131216
127613
  /***/ "./node_modules/json5/dist/index.mjs"
@@ -132652,6 +129049,155 @@ var lib = JSON5;
132652
129049
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lib);
132653
129050
 
132654
129051
 
129052
+ /***/ },
129053
+
129054
+ /***/ "./node_modules/p-limit/index.js"
129055
+ /*!***************************************!*\
129056
+ !*** ./node_modules/p-limit/index.js ***!
129057
+ \***************************************/
129058
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
129059
+
129060
+ "use strict";
129061
+ __webpack_require__.r(__webpack_exports__);
129062
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
129063
+ /* harmony export */ "default": () => (/* binding */ pLimit),
129064
+ /* harmony export */ limitFunction: () => (/* binding */ limitFunction)
129065
+ /* harmony export */ });
129066
+ /* harmony import */ var yocto_queue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! yocto-queue */ "./node_modules/yocto-queue/index.js");
129067
+
129068
+
129069
+ function pLimit(concurrency) {
129070
+ let rejectOnClear = false;
129071
+
129072
+ if (typeof concurrency === 'object') {
129073
+ ({concurrency, rejectOnClear = false} = concurrency);
129074
+ }
129075
+
129076
+ validateConcurrency(concurrency);
129077
+
129078
+ if (typeof rejectOnClear !== 'boolean') {
129079
+ throw new TypeError('Expected `rejectOnClear` to be a boolean');
129080
+ }
129081
+
129082
+ const queue = new yocto_queue__WEBPACK_IMPORTED_MODULE_0__["default"]();
129083
+ let activeCount = 0;
129084
+
129085
+ const resumeNext = () => {
129086
+ // Process the next queued function if we're under the concurrency limit
129087
+ if (activeCount < concurrency && queue.size > 0) {
129088
+ activeCount++;
129089
+ queue.dequeue().run();
129090
+ }
129091
+ };
129092
+
129093
+ const next = () => {
129094
+ activeCount--;
129095
+ resumeNext();
129096
+ };
129097
+
129098
+ const run = async (function_, resolve, arguments_) => {
129099
+ // Execute the function and capture the result promise
129100
+ const result = (async () => function_(...arguments_))();
129101
+
129102
+ // Resolve immediately with the promise (don't wait for completion)
129103
+ resolve(result);
129104
+
129105
+ // Wait for the function to complete (success or failure)
129106
+ // We catch errors here to prevent unhandled rejections,
129107
+ // but the original promise rejection is preserved for the caller
129108
+ try {
129109
+ await result;
129110
+ } catch {}
129111
+
129112
+ // Decrement active count and process next queued function
129113
+ next();
129114
+ };
129115
+
129116
+ const enqueue = (function_, resolve, reject, arguments_) => {
129117
+ const queueItem = {reject};
129118
+
129119
+ // Queue the internal resolve function instead of the run function
129120
+ // to preserve the asynchronous execution context.
129121
+ new Promise(internalResolve => { // eslint-disable-line promise/param-names
129122
+ queueItem.run = internalResolve;
129123
+ queue.enqueue(queueItem);
129124
+ }).then(run.bind(undefined, function_, resolve, arguments_)); // eslint-disable-line promise/prefer-await-to-then
129125
+
129126
+ // Start processing immediately if we haven't reached the concurrency limit
129127
+ if (activeCount < concurrency) {
129128
+ resumeNext();
129129
+ }
129130
+ };
129131
+
129132
+ const generator = (function_, ...arguments_) => new Promise((resolve, reject) => {
129133
+ enqueue(function_, resolve, reject, arguments_);
129134
+ });
129135
+
129136
+ Object.defineProperties(generator, {
129137
+ activeCount: {
129138
+ get: () => activeCount,
129139
+ },
129140
+ pendingCount: {
129141
+ get: () => queue.size,
129142
+ },
129143
+ clearQueue: {
129144
+ value() {
129145
+ if (!rejectOnClear) {
129146
+ queue.clear();
129147
+ return;
129148
+ }
129149
+
129150
+ const abortError = AbortSignal.abort().reason;
129151
+
129152
+ while (queue.size > 0) {
129153
+ queue.dequeue().reject(abortError);
129154
+ }
129155
+ },
129156
+ },
129157
+ concurrency: {
129158
+ get: () => concurrency,
129159
+
129160
+ set(newConcurrency) {
129161
+ validateConcurrency(newConcurrency);
129162
+ concurrency = newConcurrency;
129163
+
129164
+ queueMicrotask(() => {
129165
+ // eslint-disable-next-line no-unmodified-loop-condition
129166
+ while (activeCount < concurrency && queue.size > 0) {
129167
+ resumeNext();
129168
+ }
129169
+ });
129170
+ },
129171
+ },
129172
+ map: {
129173
+ async value(iterable, function_) {
129174
+ const promises = Array.from(iterable, (value, index) => generator(function_, value, index));
129175
+ return Promise.all(promises);
129176
+ },
129177
+ },
129178
+ });
129179
+
129180
+ return generator;
129181
+ }
129182
+
129183
+ function limitFunction(function_, options) {
129184
+ const limit = pLimit(options);
129185
+
129186
+ const limitedFunction = (...arguments_) => limit(() => function_(...arguments_));
129187
+ Object.defineProperty(limitedFunction, 'clearQueue', {
129188
+ value: limit.clearQueue,
129189
+ });
129190
+
129191
+ return limitedFunction;
129192
+ }
129193
+
129194
+ function validateConcurrency(concurrency) {
129195
+ if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
129196
+ throw new TypeError('Expected `concurrency` to be a number from 1 and up');
129197
+ }
129198
+ }
129199
+
129200
+
132655
129201
  /***/ },
132656
129202
 
132657
129203
  /***/ "./node_modules/vscode-languageserver-types/lib/esm/main.js"
@@ -135166,22 +131712,127 @@ var Is;
135166
131712
  })(Is || (Is = {}));
135167
131713
 
135168
131714
 
131715
+ /***/ },
131716
+
131717
+ /***/ "./node_modules/yocto-queue/index.js"
131718
+ /*!*******************************************!*\
131719
+ !*** ./node_modules/yocto-queue/index.js ***!
131720
+ \*******************************************/
131721
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
131722
+
131723
+ "use strict";
131724
+ __webpack_require__.r(__webpack_exports__);
131725
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
131726
+ /* harmony export */ "default": () => (/* binding */ Queue)
131727
+ /* harmony export */ });
131728
+ /*
131729
+ How it works:
131730
+ `this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.
131731
+ */
131732
+
131733
+ class Node {
131734
+ value;
131735
+ next;
131736
+
131737
+ constructor(value) {
131738
+ this.value = value;
131739
+ }
131740
+ }
131741
+
131742
+ class Queue {
131743
+ #head;
131744
+ #tail;
131745
+ #size;
131746
+
131747
+ constructor() {
131748
+ this.clear();
131749
+ }
131750
+
131751
+ enqueue(value) {
131752
+ const node = new Node(value);
131753
+
131754
+ if (this.#head) {
131755
+ this.#tail.next = node;
131756
+ this.#tail = node;
131757
+ } else {
131758
+ this.#head = node;
131759
+ this.#tail = node;
131760
+ }
131761
+
131762
+ this.#size++;
131763
+ }
131764
+
131765
+ dequeue() {
131766
+ const current = this.#head;
131767
+ if (!current) {
131768
+ return;
131769
+ }
131770
+
131771
+ this.#head = this.#head.next;
131772
+ this.#size--;
131773
+
131774
+ // Clean up tail reference when queue becomes empty
131775
+ if (!this.#head) {
131776
+ this.#tail = undefined;
131777
+ }
131778
+
131779
+ return current.value;
131780
+ }
131781
+
131782
+ peek() {
131783
+ if (!this.#head) {
131784
+ return;
131785
+ }
131786
+
131787
+ return this.#head.value;
131788
+
131789
+ // TODO: Node.js 18.
131790
+ // return this.#head?.value;
131791
+ }
131792
+
131793
+ clear() {
131794
+ this.#head = undefined;
131795
+ this.#tail = undefined;
131796
+ this.#size = 0;
131797
+ }
131798
+
131799
+ get size() {
131800
+ return this.#size;
131801
+ }
131802
+
131803
+ * [Symbol.iterator]() {
131804
+ let current = this.#head;
131805
+
131806
+ while (current) {
131807
+ yield current.value;
131808
+ current = current.next;
131809
+ }
131810
+ }
131811
+
131812
+ * drain() {
131813
+ while (this.#head) {
131814
+ yield this.dequeue();
131815
+ }
131816
+ }
131817
+ }
131818
+
131819
+
135169
131820
  /***/ }
135170
131821
 
135171
131822
  /******/ });
135172
131823
  /************************************************************************/
135173
131824
  /******/ // The module cache
135174
- /******/ var __webpack_module_cache__ = {};
131825
+ /******/ const __webpack_module_cache__ = {};
135175
131826
  /******/
135176
131827
  /******/ // The require function
135177
131828
  /******/ function __webpack_require__(moduleId) {
135178
131829
  /******/ // Check if module is in cache
135179
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
131830
+ /******/ const cachedModule = __webpack_module_cache__[moduleId];
135180
131831
  /******/ if (cachedModule !== undefined) {
135181
131832
  /******/ return cachedModule.exports;
135182
131833
  /******/ }
135183
131834
  /******/ // Create a new module (and put it into the cache)
135184
- /******/ var module = __webpack_module_cache__[moduleId] = {
131835
+ /******/ const module = __webpack_module_cache__[moduleId] = {
135185
131836
  /******/ // no module.id needed
135186
131837
  /******/ // no module.loaded needed
135187
131838
  /******/ exports: {}
@@ -135190,7 +131841,7 @@ var Is;
135190
131841
  /******/ // Execute the module function
135191
131842
  /******/ if (!(moduleId in __webpack_modules__)) {
135192
131843
  /******/ delete __webpack_module_cache__[moduleId];
135193
- /******/ var e = new Error("Cannot find module '" + moduleId + "'");
131844
+ /******/ const e = new Error("Cannot find module '" + moduleId + "'");
135194
131845
  /******/ e.code = 'MODULE_NOT_FOUND';
135195
131846
  /******/ throw e;
135196
131847
  /******/ }
@@ -135202,39 +131853,31 @@ var Is;
135202
131853
  /******/
135203
131854
  /************************************************************************/
135204
131855
  /******/ /* webpack/runtime/define property getters */
135205
- /******/ (() => {
135206
- /******/ // define getter functions for harmony exports
135207
- /******/ __webpack_require__.d = (exports, definition) => {
135208
- /******/ for(var key in definition) {
135209
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
135210
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
135211
- /******/ }
131856
+ /******/ // define getter/value functions for harmony exports
131857
+ /******/ __webpack_require__.d = (exports, definition) => {
131858
+ /******/ for(var key in definition) {
131859
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
131860
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
135212
131861
  /******/ }
135213
- /******/ };
135214
- /******/ })();
131862
+ /******/ }
131863
+ /******/ };
135215
131864
  /******/
135216
131865
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
135217
- /******/ (() => {
135218
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
135219
- /******/ })();
131866
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
135220
131867
  /******/
135221
131868
  /******/ /* webpack/runtime/make namespace object */
135222
- /******/ (() => {
135223
- /******/ // define __esModule on exports
135224
- /******/ __webpack_require__.r = (exports) => {
135225
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
135226
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
135227
- /******/ }
135228
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
135229
- /******/ };
135230
- /******/ })();
131869
+ /******/ // define __esModule on exports
131870
+ /******/ __webpack_require__.r = (exports) => {
131871
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
131872
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
131873
+ /******/ };
135231
131874
  /******/
135232
131875
  /************************************************************************/
135233
131876
  /******/
135234
131877
  /******/ // startup
135235
131878
  /******/ // Load entry module and return exports
135236
131879
  /******/ // This entry module is referenced by other modules so it can't be inlined
135237
- /******/ var __webpack_exports__ = __webpack_require__("./build/index.js");
131880
+ /******/ let __webpack_exports__ = __webpack_require__("./build/index.js");
135238
131881
  /******/
135239
131882
  /******/ })()
135240
131883
  ;