@abaplint/transpiler-cli 2.13.76 → 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.
- package/build/bundle.js +434 -3740
- package/package.json +9 -9
- package/schema.json +2 -1
- package/tsconfig.tsbuildinfo +0 -1
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/
|
|
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 + "/**", {
|
|
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/
|
|
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, {
|
|
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)(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
63232
|
-
|
|
63233
|
-
|
|
63234
|
-
|
|
63235
|
-
|
|
63236
|
-
|
|
63237
|
-
|
|
63238
|
-
|
|
63239
|
-
|
|
63240
|
-
|
|
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.
|
|
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.
|
|
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
|
}
|
|
@@ -104661,8 +104665,10 @@ class FieldChainTranspiler {
|
|
|
104661
104665
|
else if (c.get() instanceof core_1.Expressions.AttributeName) {
|
|
104662
104666
|
const interfaceName = traversal.isInterfaceAttribute(c.getFirstToken());
|
|
104663
104667
|
let name = c.getFirstToken().getStr().toLowerCase();
|
|
104664
|
-
|
|
104665
|
-
|
|
104668
|
+
const attributeContext = context;
|
|
104669
|
+
context = traversal.narrowContextAttribute(context, c.getFirstToken().getStr(), scope);
|
|
104670
|
+
if (attributeContext instanceof abaplint.BasicTypes.ObjectReferenceType) {
|
|
104671
|
+
const cdef = traversal.findClassDefinition(attributeContext.getIdentifierName(), scope);
|
|
104666
104672
|
const tokenName = c.getFirstToken().getStr();
|
|
104667
104673
|
const attr = cdef?.getAttributes().findByName(tokenName);
|
|
104668
104674
|
// Do not mark constants as private JS fields. Constants are exposed on instances via constructor copying.
|
|
@@ -104694,6 +104700,7 @@ class FieldChainTranspiler {
|
|
|
104694
104700
|
}
|
|
104695
104701
|
else if (c.get() instanceof core_1.Expressions.ComponentName) {
|
|
104696
104702
|
const name = c.getFirstToken().getStr().toLowerCase();
|
|
104703
|
+
context = traversal_1.Traversal.narrowContextComponent(context, c.getFirstToken().getStr());
|
|
104697
104704
|
if (traversal_1.Traversal.isBracketComponent(name)) {
|
|
104698
104705
|
ret.append(`["` + name + `"]`, c, traversal);
|
|
104699
104706
|
}
|
|
@@ -104723,6 +104730,9 @@ class FieldChainTranspiler {
|
|
|
104723
104730
|
}
|
|
104724
104731
|
else if (c instanceof core_1.Nodes.ExpressionNode
|
|
104725
104732
|
&& c.get() instanceof core_1.Expressions.TableExpression) {
|
|
104733
|
+
if (context instanceof abaplint.BasicTypes.TableType) {
|
|
104734
|
+
context = context.getRowType();
|
|
104735
|
+
}
|
|
104726
104736
|
ret = new _1.TableExpressionTranspiler().transpile(c, traversal, ret);
|
|
104727
104737
|
}
|
|
104728
104738
|
}
|
|
@@ -108518,6 +108528,9 @@ class TargetTranspiler {
|
|
|
108518
108528
|
context = scope?.findVariable(c.getFirstToken().getStr())?.getType();
|
|
108519
108529
|
}
|
|
108520
108530
|
else if (c.get() instanceof core_1.Expressions.TableExpression && c instanceof core_1.Nodes.ExpressionNode) {
|
|
108531
|
+
if (context instanceof abaplint.BasicTypes.TableType) {
|
|
108532
|
+
context = context.getRowType();
|
|
108533
|
+
}
|
|
108521
108534
|
ret = new _1.TableExpressionTranspiler().transpile(c, traversal, ret);
|
|
108522
108535
|
}
|
|
108523
108536
|
else if (c.get() instanceof core_1.Expressions.InlineData && c instanceof core_1.Nodes.ExpressionNode) {
|
|
@@ -108534,6 +108547,7 @@ class TargetTranspiler {
|
|
|
108534
108547
|
}
|
|
108535
108548
|
else if (c.get() instanceof core_1.Expressions.ComponentName) {
|
|
108536
108549
|
const name = c.getFirstToken().getStr().toLowerCase();
|
|
108550
|
+
context = traversal_1.Traversal.narrowContextComponent(context, c.getFirstToken().getStr());
|
|
108537
108551
|
if (traversal_1.Traversal.isBracketComponent(name)) {
|
|
108538
108552
|
ret.append(`["` + name + `"]`, c, traversal);
|
|
108539
108553
|
}
|
|
@@ -108544,8 +108558,10 @@ class TargetTranspiler {
|
|
|
108544
108558
|
else if (c.get() instanceof core_1.Expressions.AttributeName) {
|
|
108545
108559
|
let prefix = "";
|
|
108546
108560
|
let postfix = "";
|
|
108547
|
-
|
|
108548
|
-
|
|
108561
|
+
const attributeContext = context;
|
|
108562
|
+
context = traversal.narrowContextAttribute(context, c.getFirstToken().getStr(), scope);
|
|
108563
|
+
if (attributeContext instanceof abaplint.BasicTypes.ObjectReferenceType) {
|
|
108564
|
+
const cdef = traversal.findClassDefinition(attributeContext.getIdentifierName(), scope);
|
|
108549
108565
|
const attr = cdef?.getAttributes().findByName(c.getFirstToken().getStr());
|
|
108550
108566
|
if (attr?.getVisibility() === abaplint.Visibility.Private) {
|
|
108551
108567
|
const id = scope?.getParent()?.getParent()?.getIdentifier();
|
|
@@ -123002,6 +123018,45 @@ class Traversal {
|
|
|
123002
123018
|
}
|
|
123003
123019
|
return undefined;
|
|
123004
123020
|
}
|
|
123021
|
+
// narrows the current type context of a chain, ie. "ls_struct-comp" or "lt_tab[ 1 ]-comp"
|
|
123022
|
+
static narrowContextComponent(context, name) {
|
|
123023
|
+
const structure = Traversal.dereferenceContext(context);
|
|
123024
|
+
if (structure instanceof abaplint.BasicTypes.StructureType) {
|
|
123025
|
+
return structure.getComponentByName(name);
|
|
123026
|
+
}
|
|
123027
|
+
return undefined;
|
|
123028
|
+
}
|
|
123029
|
+
// narrows the current type context of a chain, ie. "lo_ref->attr"
|
|
123030
|
+
narrowContextAttribute(context, name, scope) {
|
|
123031
|
+
if (context instanceof abaplint.BasicTypes.ObjectReferenceType === false) {
|
|
123032
|
+
return undefined;
|
|
123033
|
+
}
|
|
123034
|
+
let identifierName = context.getIdentifierName();
|
|
123035
|
+
const visited = new Set();
|
|
123036
|
+
while (identifierName !== undefined && visited.has(identifierName.toUpperCase()) === false) {
|
|
123037
|
+
visited.add(identifierName.toUpperCase());
|
|
123038
|
+
const def = this.findClassDefinition(identifierName, scope) || this.findInterfaceDefinition(identifierName, scope);
|
|
123039
|
+
if (def === undefined) {
|
|
123040
|
+
return undefined;
|
|
123041
|
+
}
|
|
123042
|
+
const type = def.getAttributes().findByName(name)?.getType();
|
|
123043
|
+
if (type !== undefined) {
|
|
123044
|
+
return type;
|
|
123045
|
+
}
|
|
123046
|
+
identifierName = def.getSuperClass();
|
|
123047
|
+
}
|
|
123048
|
+
return undefined;
|
|
123049
|
+
}
|
|
123050
|
+
static dereferenceContext(context) {
|
|
123051
|
+
let ret = context;
|
|
123052
|
+
if (ret instanceof abaplint.BasicTypes.TableType) {
|
|
123053
|
+
ret = ret.getRowType();
|
|
123054
|
+
}
|
|
123055
|
+
if (ret instanceof abaplint.BasicTypes.DataReference) {
|
|
123056
|
+
ret = ret.getType();
|
|
123057
|
+
}
|
|
123058
|
+
return ret;
|
|
123059
|
+
}
|
|
123005
123060
|
// returns the interface name if interfaced
|
|
123006
123061
|
isInterfaceAttribute(token) {
|
|
123007
123062
|
const ref = this.findReadOrWriteReference(token);
|
|
@@ -123985,3540 +124040,6 @@ class Validation {
|
|
|
123985
124040
|
exports.Validation = Validation;
|
|
123986
124041
|
//# sourceMappingURL=validation.js.map
|
|
123987
124042
|
|
|
123988
|
-
/***/ },
|
|
123989
|
-
|
|
123990
|
-
/***/ "./node_modules/balanced-match/index.js"
|
|
123991
|
-
/*!**********************************************!*\
|
|
123992
|
-
!*** ./node_modules/balanced-match/index.js ***!
|
|
123993
|
-
\**********************************************/
|
|
123994
|
-
(module) {
|
|
123995
|
-
|
|
123996
|
-
"use strict";
|
|
123997
|
-
|
|
123998
|
-
module.exports = balanced;
|
|
123999
|
-
function balanced(a, b, str) {
|
|
124000
|
-
if (a instanceof RegExp) a = maybeMatch(a, str);
|
|
124001
|
-
if (b instanceof RegExp) b = maybeMatch(b, str);
|
|
124002
|
-
|
|
124003
|
-
var r = range(a, b, str);
|
|
124004
|
-
|
|
124005
|
-
return r && {
|
|
124006
|
-
start: r[0],
|
|
124007
|
-
end: r[1],
|
|
124008
|
-
pre: str.slice(0, r[0]),
|
|
124009
|
-
body: str.slice(r[0] + a.length, r[1]),
|
|
124010
|
-
post: str.slice(r[1] + b.length)
|
|
124011
|
-
};
|
|
124012
|
-
}
|
|
124013
|
-
|
|
124014
|
-
function maybeMatch(reg, str) {
|
|
124015
|
-
var m = str.match(reg);
|
|
124016
|
-
return m ? m[0] : null;
|
|
124017
|
-
}
|
|
124018
|
-
|
|
124019
|
-
balanced.range = range;
|
|
124020
|
-
function range(a, b, str) {
|
|
124021
|
-
var begs, beg, left, right, result;
|
|
124022
|
-
var ai = str.indexOf(a);
|
|
124023
|
-
var bi = str.indexOf(b, ai + 1);
|
|
124024
|
-
var i = ai;
|
|
124025
|
-
|
|
124026
|
-
if (ai >= 0 && bi > 0) {
|
|
124027
|
-
if(a===b) {
|
|
124028
|
-
return [ai, bi];
|
|
124029
|
-
}
|
|
124030
|
-
begs = [];
|
|
124031
|
-
left = str.length;
|
|
124032
|
-
|
|
124033
|
-
while (i >= 0 && !result) {
|
|
124034
|
-
if (i == ai) {
|
|
124035
|
-
begs.push(i);
|
|
124036
|
-
ai = str.indexOf(a, i + 1);
|
|
124037
|
-
} else if (begs.length == 1) {
|
|
124038
|
-
result = [ begs.pop(), bi ];
|
|
124039
|
-
} else {
|
|
124040
|
-
beg = begs.pop();
|
|
124041
|
-
if (beg < left) {
|
|
124042
|
-
left = beg;
|
|
124043
|
-
right = bi;
|
|
124044
|
-
}
|
|
124045
|
-
|
|
124046
|
-
bi = str.indexOf(b, i + 1);
|
|
124047
|
-
}
|
|
124048
|
-
|
|
124049
|
-
i = ai < bi && ai >= 0 ? ai : bi;
|
|
124050
|
-
}
|
|
124051
|
-
|
|
124052
|
-
if (begs.length) {
|
|
124053
|
-
result = [ left, right ];
|
|
124054
|
-
}
|
|
124055
|
-
}
|
|
124056
|
-
|
|
124057
|
-
return result;
|
|
124058
|
-
}
|
|
124059
|
-
|
|
124060
|
-
|
|
124061
|
-
/***/ },
|
|
124062
|
-
|
|
124063
|
-
/***/ "./node_modules/brace-expansion/index.js"
|
|
124064
|
-
/*!***********************************************!*\
|
|
124065
|
-
!*** ./node_modules/brace-expansion/index.js ***!
|
|
124066
|
-
\***********************************************/
|
|
124067
|
-
(module, __unused_webpack_exports, __webpack_require__) {
|
|
124068
|
-
|
|
124069
|
-
var concatMap = __webpack_require__(/*! concat-map */ "./node_modules/concat-map/index.js");
|
|
124070
|
-
var balanced = __webpack_require__(/*! balanced-match */ "./node_modules/balanced-match/index.js");
|
|
124071
|
-
|
|
124072
|
-
module.exports = expandTop;
|
|
124073
|
-
|
|
124074
|
-
var escSlash = '\0SLASH'+Math.random()+'\0';
|
|
124075
|
-
var escOpen = '\0OPEN'+Math.random()+'\0';
|
|
124076
|
-
var escClose = '\0CLOSE'+Math.random()+'\0';
|
|
124077
|
-
var escComma = '\0COMMA'+Math.random()+'\0';
|
|
124078
|
-
var escPeriod = '\0PERIOD'+Math.random()+'\0';
|
|
124079
|
-
|
|
124080
|
-
function numeric(str) {
|
|
124081
|
-
return parseInt(str, 10) == str
|
|
124082
|
-
? parseInt(str, 10)
|
|
124083
|
-
: str.charCodeAt(0);
|
|
124084
|
-
}
|
|
124085
|
-
|
|
124086
|
-
function escapeBraces(str) {
|
|
124087
|
-
return str.split('\\\\').join(escSlash)
|
|
124088
|
-
.split('\\{').join(escOpen)
|
|
124089
|
-
.split('\\}').join(escClose)
|
|
124090
|
-
.split('\\,').join(escComma)
|
|
124091
|
-
.split('\\.').join(escPeriod);
|
|
124092
|
-
}
|
|
124093
|
-
|
|
124094
|
-
function unescapeBraces(str) {
|
|
124095
|
-
return str.split(escSlash).join('\\')
|
|
124096
|
-
.split(escOpen).join('{')
|
|
124097
|
-
.split(escClose).join('}')
|
|
124098
|
-
.split(escComma).join(',')
|
|
124099
|
-
.split(escPeriod).join('.');
|
|
124100
|
-
}
|
|
124101
|
-
|
|
124102
|
-
|
|
124103
|
-
// Basically just str.split(","), but handling cases
|
|
124104
|
-
// where we have nested braced sections, which should be
|
|
124105
|
-
// treated as individual members, like {a,{b,c},d}
|
|
124106
|
-
function parseCommaParts(str) {
|
|
124107
|
-
if (!str)
|
|
124108
|
-
return [''];
|
|
124109
|
-
|
|
124110
|
-
var parts = [];
|
|
124111
|
-
var m = balanced('{', '}', str);
|
|
124112
|
-
|
|
124113
|
-
if (!m)
|
|
124114
|
-
return str.split(',');
|
|
124115
|
-
|
|
124116
|
-
var pre = m.pre;
|
|
124117
|
-
var body = m.body;
|
|
124118
|
-
var post = m.post;
|
|
124119
|
-
var p = pre.split(',');
|
|
124120
|
-
|
|
124121
|
-
p[p.length-1] += '{' + body + '}';
|
|
124122
|
-
var postParts = parseCommaParts(post);
|
|
124123
|
-
if (post.length) {
|
|
124124
|
-
p[p.length-1] += postParts.shift();
|
|
124125
|
-
p.push.apply(p, postParts);
|
|
124126
|
-
}
|
|
124127
|
-
|
|
124128
|
-
parts.push.apply(parts, p);
|
|
124129
|
-
|
|
124130
|
-
return parts;
|
|
124131
|
-
}
|
|
124132
|
-
|
|
124133
|
-
function expandTop(str, options) {
|
|
124134
|
-
if (!str)
|
|
124135
|
-
return [];
|
|
124136
|
-
|
|
124137
|
-
options = options || {};
|
|
124138
|
-
var max = options.max == null ? Infinity : options.max;
|
|
124139
|
-
|
|
124140
|
-
// I don't know why Bash 4.3 does this, but it does.
|
|
124141
|
-
// Anything starting with {} will have the first two bytes preserved
|
|
124142
|
-
// but *only* at the top level, so {},a}b will not expand to anything,
|
|
124143
|
-
// but a{},b}c will be expanded to [a}c,abc].
|
|
124144
|
-
// One could argue that this is a bug in Bash, but since the goal of
|
|
124145
|
-
// this module is to match Bash's rules, we escape a leading {}
|
|
124146
|
-
if (str.substr(0, 2) === '{}') {
|
|
124147
|
-
str = '\\{\\}' + str.substr(2);
|
|
124148
|
-
}
|
|
124149
|
-
|
|
124150
|
-
return expand(escapeBraces(str), max, true).map(unescapeBraces);
|
|
124151
|
-
}
|
|
124152
|
-
|
|
124153
|
-
function identity(e) {
|
|
124154
|
-
return e;
|
|
124155
|
-
}
|
|
124156
|
-
|
|
124157
|
-
function embrace(str) {
|
|
124158
|
-
return '{' + str + '}';
|
|
124159
|
-
}
|
|
124160
|
-
function isPadded(el) {
|
|
124161
|
-
return /^-?0\d/.test(el);
|
|
124162
|
-
}
|
|
124163
|
-
|
|
124164
|
-
function lte(i, y) {
|
|
124165
|
-
return i <= y;
|
|
124166
|
-
}
|
|
124167
|
-
function gte(i, y) {
|
|
124168
|
-
return i >= y;
|
|
124169
|
-
}
|
|
124170
|
-
|
|
124171
|
-
function expand(str, max, isTop) {
|
|
124172
|
-
var expansions = [];
|
|
124173
|
-
|
|
124174
|
-
var m = balanced('{', '}', str);
|
|
124175
|
-
if (!m || /\$$/.test(m.pre)) return [str];
|
|
124176
|
-
|
|
124177
|
-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
124178
|
-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
124179
|
-
var isSequence = isNumericSequence || isAlphaSequence;
|
|
124180
|
-
var isOptions = m.body.indexOf(',') >= 0;
|
|
124181
|
-
if (!isSequence && !isOptions) {
|
|
124182
|
-
// {a},b}
|
|
124183
|
-
if (m.post.match(/,(?!,).*\}/)) {
|
|
124184
|
-
str = m.pre + '{' + m.body + escClose + m.post;
|
|
124185
|
-
return expand(str, max, true);
|
|
124186
|
-
}
|
|
124187
|
-
return [str];
|
|
124188
|
-
}
|
|
124189
|
-
|
|
124190
|
-
var n;
|
|
124191
|
-
if (isSequence) {
|
|
124192
|
-
n = m.body.split(/\.\./);
|
|
124193
|
-
} else {
|
|
124194
|
-
n = parseCommaParts(m.body);
|
|
124195
|
-
if (n.length === 1) {
|
|
124196
|
-
// x{{a,b}}y ==> x{a}y x{b}y
|
|
124197
|
-
n = expand(n[0], max, false).map(embrace);
|
|
124198
|
-
if (n.length === 1) {
|
|
124199
|
-
var post = m.post.length
|
|
124200
|
-
? expand(m.post, max, false)
|
|
124201
|
-
: [''];
|
|
124202
|
-
return post.map(function(p) {
|
|
124203
|
-
return m.pre + n[0] + p;
|
|
124204
|
-
});
|
|
124205
|
-
}
|
|
124206
|
-
}
|
|
124207
|
-
}
|
|
124208
|
-
|
|
124209
|
-
// at this point, n is the parts, and we know it's not a comma set
|
|
124210
|
-
// with a single entry.
|
|
124211
|
-
|
|
124212
|
-
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
|
124213
|
-
var pre = m.pre;
|
|
124214
|
-
var post = m.post.length
|
|
124215
|
-
? expand(m.post, max, false)
|
|
124216
|
-
: [''];
|
|
124217
|
-
|
|
124218
|
-
var N;
|
|
124219
|
-
|
|
124220
|
-
if (isSequence) {
|
|
124221
|
-
var x = numeric(n[0]);
|
|
124222
|
-
var y = numeric(n[1]);
|
|
124223
|
-
var width = Math.max(n[0].length, n[1].length)
|
|
124224
|
-
var incr = n.length == 3
|
|
124225
|
-
? Math.max(Math.abs(numeric(n[2])), 1)
|
|
124226
|
-
: 1;
|
|
124227
|
-
var test = lte;
|
|
124228
|
-
var reverse = y < x;
|
|
124229
|
-
if (reverse) {
|
|
124230
|
-
incr *= -1;
|
|
124231
|
-
test = gte;
|
|
124232
|
-
}
|
|
124233
|
-
var pad = n.some(isPadded);
|
|
124234
|
-
|
|
124235
|
-
N = [];
|
|
124236
|
-
|
|
124237
|
-
for (var i = x; test(i, y) && N.length < max; i += incr) {
|
|
124238
|
-
var c;
|
|
124239
|
-
if (isAlphaSequence) {
|
|
124240
|
-
c = String.fromCharCode(i);
|
|
124241
|
-
if (c === '\\')
|
|
124242
|
-
c = '';
|
|
124243
|
-
} else {
|
|
124244
|
-
c = String(i);
|
|
124245
|
-
if (pad) {
|
|
124246
|
-
var need = width - c.length;
|
|
124247
|
-
if (need > 0) {
|
|
124248
|
-
var z = new Array(need + 1).join('0');
|
|
124249
|
-
if (i < 0)
|
|
124250
|
-
c = '-' + z + c.slice(1);
|
|
124251
|
-
else
|
|
124252
|
-
c = z + c;
|
|
124253
|
-
}
|
|
124254
|
-
}
|
|
124255
|
-
}
|
|
124256
|
-
N.push(c);
|
|
124257
|
-
}
|
|
124258
|
-
} else {
|
|
124259
|
-
N = concatMap(n, function(el) { return expand(el, max, false) });
|
|
124260
|
-
}
|
|
124261
|
-
|
|
124262
|
-
for (var j = 0; j < N.length; j++) {
|
|
124263
|
-
for (var k = 0; k < post.length && expansions.length < max; k++) {
|
|
124264
|
-
var expansion = pre + N[j] + post[k];
|
|
124265
|
-
if (!isTop || isSequence || expansion)
|
|
124266
|
-
expansions.push(expansion);
|
|
124267
|
-
}
|
|
124268
|
-
}
|
|
124269
|
-
|
|
124270
|
-
return expansions;
|
|
124271
|
-
}
|
|
124272
|
-
|
|
124273
|
-
|
|
124274
|
-
/***/ },
|
|
124275
|
-
|
|
124276
|
-
/***/ "./node_modules/concat-map/index.js"
|
|
124277
|
-
/*!******************************************!*\
|
|
124278
|
-
!*** ./node_modules/concat-map/index.js ***!
|
|
124279
|
-
\******************************************/
|
|
124280
|
-
(module) {
|
|
124281
|
-
|
|
124282
|
-
module.exports = function (xs, fn) {
|
|
124283
|
-
var res = [];
|
|
124284
|
-
for (var i = 0; i < xs.length; i++) {
|
|
124285
|
-
var x = fn(xs[i], i);
|
|
124286
|
-
if (isArray(x)) res.push.apply(res, x);
|
|
124287
|
-
else res.push(x);
|
|
124288
|
-
}
|
|
124289
|
-
return res;
|
|
124290
|
-
};
|
|
124291
|
-
|
|
124292
|
-
var isArray = Array.isArray || function (xs) {
|
|
124293
|
-
return Object.prototype.toString.call(xs) === '[object Array]';
|
|
124294
|
-
};
|
|
124295
|
-
|
|
124296
|
-
|
|
124297
|
-
/***/ },
|
|
124298
|
-
|
|
124299
|
-
/***/ "./node_modules/fs.realpath/index.js"
|
|
124300
|
-
/*!*******************************************!*\
|
|
124301
|
-
!*** ./node_modules/fs.realpath/index.js ***!
|
|
124302
|
-
\*******************************************/
|
|
124303
|
-
(module, __unused_webpack_exports, __webpack_require__) {
|
|
124304
|
-
|
|
124305
|
-
module.exports = realpath
|
|
124306
|
-
realpath.realpath = realpath
|
|
124307
|
-
realpath.sync = realpathSync
|
|
124308
|
-
realpath.realpathSync = realpathSync
|
|
124309
|
-
realpath.monkeypatch = monkeypatch
|
|
124310
|
-
realpath.unmonkeypatch = unmonkeypatch
|
|
124311
|
-
|
|
124312
|
-
var fs = __webpack_require__(/*! fs */ "fs")
|
|
124313
|
-
var origRealpath = fs.realpath
|
|
124314
|
-
var origRealpathSync = fs.realpathSync
|
|
124315
|
-
|
|
124316
|
-
var version = process.version
|
|
124317
|
-
var ok = /^v[0-5]\./.test(version)
|
|
124318
|
-
var old = __webpack_require__(/*! ./old.js */ "./node_modules/fs.realpath/old.js")
|
|
124319
|
-
|
|
124320
|
-
function newError (er) {
|
|
124321
|
-
return er && er.syscall === 'realpath' && (
|
|
124322
|
-
er.code === 'ELOOP' ||
|
|
124323
|
-
er.code === 'ENOMEM' ||
|
|
124324
|
-
er.code === 'ENAMETOOLONG'
|
|
124325
|
-
)
|
|
124326
|
-
}
|
|
124327
|
-
|
|
124328
|
-
function realpath (p, cache, cb) {
|
|
124329
|
-
if (ok) {
|
|
124330
|
-
return origRealpath(p, cache, cb)
|
|
124331
|
-
}
|
|
124332
|
-
|
|
124333
|
-
if (typeof cache === 'function') {
|
|
124334
|
-
cb = cache
|
|
124335
|
-
cache = null
|
|
124336
|
-
}
|
|
124337
|
-
origRealpath(p, cache, function (er, result) {
|
|
124338
|
-
if (newError(er)) {
|
|
124339
|
-
old.realpath(p, cache, cb)
|
|
124340
|
-
} else {
|
|
124341
|
-
cb(er, result)
|
|
124342
|
-
}
|
|
124343
|
-
})
|
|
124344
|
-
}
|
|
124345
|
-
|
|
124346
|
-
function realpathSync (p, cache) {
|
|
124347
|
-
if (ok) {
|
|
124348
|
-
return origRealpathSync(p, cache)
|
|
124349
|
-
}
|
|
124350
|
-
|
|
124351
|
-
try {
|
|
124352
|
-
return origRealpathSync(p, cache)
|
|
124353
|
-
} catch (er) {
|
|
124354
|
-
if (newError(er)) {
|
|
124355
|
-
return old.realpathSync(p, cache)
|
|
124356
|
-
} else {
|
|
124357
|
-
throw er
|
|
124358
|
-
}
|
|
124359
|
-
}
|
|
124360
|
-
}
|
|
124361
|
-
|
|
124362
|
-
function monkeypatch () {
|
|
124363
|
-
fs.realpath = realpath
|
|
124364
|
-
fs.realpathSync = realpathSync
|
|
124365
|
-
}
|
|
124366
|
-
|
|
124367
|
-
function unmonkeypatch () {
|
|
124368
|
-
fs.realpath = origRealpath
|
|
124369
|
-
fs.realpathSync = origRealpathSync
|
|
124370
|
-
}
|
|
124371
|
-
|
|
124372
|
-
|
|
124373
|
-
/***/ },
|
|
124374
|
-
|
|
124375
|
-
/***/ "./node_modules/fs.realpath/old.js"
|
|
124376
|
-
/*!*****************************************!*\
|
|
124377
|
-
!*** ./node_modules/fs.realpath/old.js ***!
|
|
124378
|
-
\*****************************************/
|
|
124379
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
124380
|
-
|
|
124381
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
124382
|
-
//
|
|
124383
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
124384
|
-
// copy of this software and associated documentation files (the
|
|
124385
|
-
// "Software"), to deal in the Software without restriction, including
|
|
124386
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
124387
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
124388
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
124389
|
-
// following conditions:
|
|
124390
|
-
//
|
|
124391
|
-
// The above copyright notice and this permission notice shall be included
|
|
124392
|
-
// in all copies or substantial portions of the Software.
|
|
124393
|
-
//
|
|
124394
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
124395
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
124396
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
124397
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
124398
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
124399
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
124400
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
124401
|
-
|
|
124402
|
-
var pathModule = __webpack_require__(/*! path */ "path");
|
|
124403
|
-
var isWindows = process.platform === 'win32';
|
|
124404
|
-
var fs = __webpack_require__(/*! fs */ "fs");
|
|
124405
|
-
|
|
124406
|
-
// JavaScript implementation of realpath, ported from node pre-v6
|
|
124407
|
-
|
|
124408
|
-
var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
|
|
124409
|
-
|
|
124410
|
-
function rethrow() {
|
|
124411
|
-
// Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and
|
|
124412
|
-
// is fairly slow to generate.
|
|
124413
|
-
var callback;
|
|
124414
|
-
if (DEBUG) {
|
|
124415
|
-
var backtrace = new Error;
|
|
124416
|
-
callback = debugCallback;
|
|
124417
|
-
} else
|
|
124418
|
-
callback = missingCallback;
|
|
124419
|
-
|
|
124420
|
-
return callback;
|
|
124421
|
-
|
|
124422
|
-
function debugCallback(err) {
|
|
124423
|
-
if (err) {
|
|
124424
|
-
backtrace.message = err.message;
|
|
124425
|
-
err = backtrace;
|
|
124426
|
-
missingCallback(err);
|
|
124427
|
-
}
|
|
124428
|
-
}
|
|
124429
|
-
|
|
124430
|
-
function missingCallback(err) {
|
|
124431
|
-
if (err) {
|
|
124432
|
-
if (process.throwDeprecation)
|
|
124433
|
-
throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
|
|
124434
|
-
else if (!process.noDeprecation) {
|
|
124435
|
-
var msg = 'fs: missing callback ' + (err.stack || err.message);
|
|
124436
|
-
if (process.traceDeprecation)
|
|
124437
|
-
console.trace(msg);
|
|
124438
|
-
else
|
|
124439
|
-
console.error(msg);
|
|
124440
|
-
}
|
|
124441
|
-
}
|
|
124442
|
-
}
|
|
124443
|
-
}
|
|
124444
|
-
|
|
124445
|
-
function maybeCallback(cb) {
|
|
124446
|
-
return typeof cb === 'function' ? cb : rethrow();
|
|
124447
|
-
}
|
|
124448
|
-
|
|
124449
|
-
var normalize = pathModule.normalize;
|
|
124450
|
-
|
|
124451
|
-
// Regexp that finds the next partion of a (partial) path
|
|
124452
|
-
// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']
|
|
124453
|
-
if (isWindows) {
|
|
124454
|
-
var nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
|
|
124455
|
-
} else {
|
|
124456
|
-
var nextPartRe = /(.*?)(?:[\/]+|$)/g;
|
|
124457
|
-
}
|
|
124458
|
-
|
|
124459
|
-
// Regex to find the device root, including trailing slash. E.g. 'c:\\'.
|
|
124460
|
-
if (isWindows) {
|
|
124461
|
-
var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
|
|
124462
|
-
} else {
|
|
124463
|
-
var splitRootRe = /^[\/]*/;
|
|
124464
|
-
}
|
|
124465
|
-
|
|
124466
|
-
exports.realpathSync = function realpathSync(p, cache) {
|
|
124467
|
-
// make p is absolute
|
|
124468
|
-
p = pathModule.resolve(p);
|
|
124469
|
-
|
|
124470
|
-
if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
|
|
124471
|
-
return cache[p];
|
|
124472
|
-
}
|
|
124473
|
-
|
|
124474
|
-
var original = p,
|
|
124475
|
-
seenLinks = {},
|
|
124476
|
-
knownHard = {};
|
|
124477
|
-
|
|
124478
|
-
// current character position in p
|
|
124479
|
-
var pos;
|
|
124480
|
-
// the partial path so far, including a trailing slash if any
|
|
124481
|
-
var current;
|
|
124482
|
-
// the partial path without a trailing slash (except when pointing at a root)
|
|
124483
|
-
var base;
|
|
124484
|
-
// the partial path scanned in the previous round, with slash
|
|
124485
|
-
var previous;
|
|
124486
|
-
|
|
124487
|
-
start();
|
|
124488
|
-
|
|
124489
|
-
function start() {
|
|
124490
|
-
// Skip over roots
|
|
124491
|
-
var m = splitRootRe.exec(p);
|
|
124492
|
-
pos = m[0].length;
|
|
124493
|
-
current = m[0];
|
|
124494
|
-
base = m[0];
|
|
124495
|
-
previous = '';
|
|
124496
|
-
|
|
124497
|
-
// On windows, check that the root exists. On unix there is no need.
|
|
124498
|
-
if (isWindows && !knownHard[base]) {
|
|
124499
|
-
fs.lstatSync(base);
|
|
124500
|
-
knownHard[base] = true;
|
|
124501
|
-
}
|
|
124502
|
-
}
|
|
124503
|
-
|
|
124504
|
-
// walk down the path, swapping out linked pathparts for their real
|
|
124505
|
-
// values
|
|
124506
|
-
// NB: p.length changes.
|
|
124507
|
-
while (pos < p.length) {
|
|
124508
|
-
// find the next part
|
|
124509
|
-
nextPartRe.lastIndex = pos;
|
|
124510
|
-
var result = nextPartRe.exec(p);
|
|
124511
|
-
previous = current;
|
|
124512
|
-
current += result[0];
|
|
124513
|
-
base = previous + result[1];
|
|
124514
|
-
pos = nextPartRe.lastIndex;
|
|
124515
|
-
|
|
124516
|
-
// continue if not a symlink
|
|
124517
|
-
if (knownHard[base] || (cache && cache[base] === base)) {
|
|
124518
|
-
continue;
|
|
124519
|
-
}
|
|
124520
|
-
|
|
124521
|
-
var resolvedLink;
|
|
124522
|
-
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
|
|
124523
|
-
// some known symbolic link. no need to stat again.
|
|
124524
|
-
resolvedLink = cache[base];
|
|
124525
|
-
} else {
|
|
124526
|
-
var stat = fs.lstatSync(base);
|
|
124527
|
-
if (!stat.isSymbolicLink()) {
|
|
124528
|
-
knownHard[base] = true;
|
|
124529
|
-
if (cache) cache[base] = base;
|
|
124530
|
-
continue;
|
|
124531
|
-
}
|
|
124532
|
-
|
|
124533
|
-
// read the link if it wasn't read before
|
|
124534
|
-
// dev/ino always return 0 on windows, so skip the check.
|
|
124535
|
-
var linkTarget = null;
|
|
124536
|
-
if (!isWindows) {
|
|
124537
|
-
var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
|
|
124538
|
-
if (seenLinks.hasOwnProperty(id)) {
|
|
124539
|
-
linkTarget = seenLinks[id];
|
|
124540
|
-
}
|
|
124541
|
-
}
|
|
124542
|
-
if (linkTarget === null) {
|
|
124543
|
-
fs.statSync(base);
|
|
124544
|
-
linkTarget = fs.readlinkSync(base);
|
|
124545
|
-
}
|
|
124546
|
-
resolvedLink = pathModule.resolve(previous, linkTarget);
|
|
124547
|
-
// track this, if given a cache.
|
|
124548
|
-
if (cache) cache[base] = resolvedLink;
|
|
124549
|
-
if (!isWindows) seenLinks[id] = linkTarget;
|
|
124550
|
-
}
|
|
124551
|
-
|
|
124552
|
-
// resolve the link, then start over
|
|
124553
|
-
p = pathModule.resolve(resolvedLink, p.slice(pos));
|
|
124554
|
-
start();
|
|
124555
|
-
}
|
|
124556
|
-
|
|
124557
|
-
if (cache) cache[original] = p;
|
|
124558
|
-
|
|
124559
|
-
return p;
|
|
124560
|
-
};
|
|
124561
|
-
|
|
124562
|
-
|
|
124563
|
-
exports.realpath = function realpath(p, cache, cb) {
|
|
124564
|
-
if (typeof cb !== 'function') {
|
|
124565
|
-
cb = maybeCallback(cache);
|
|
124566
|
-
cache = null;
|
|
124567
|
-
}
|
|
124568
|
-
|
|
124569
|
-
// make p is absolute
|
|
124570
|
-
p = pathModule.resolve(p);
|
|
124571
|
-
|
|
124572
|
-
if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
|
|
124573
|
-
return process.nextTick(cb.bind(null, null, cache[p]));
|
|
124574
|
-
}
|
|
124575
|
-
|
|
124576
|
-
var original = p,
|
|
124577
|
-
seenLinks = {},
|
|
124578
|
-
knownHard = {};
|
|
124579
|
-
|
|
124580
|
-
// current character position in p
|
|
124581
|
-
var pos;
|
|
124582
|
-
// the partial path so far, including a trailing slash if any
|
|
124583
|
-
var current;
|
|
124584
|
-
// the partial path without a trailing slash (except when pointing at a root)
|
|
124585
|
-
var base;
|
|
124586
|
-
// the partial path scanned in the previous round, with slash
|
|
124587
|
-
var previous;
|
|
124588
|
-
|
|
124589
|
-
start();
|
|
124590
|
-
|
|
124591
|
-
function start() {
|
|
124592
|
-
// Skip over roots
|
|
124593
|
-
var m = splitRootRe.exec(p);
|
|
124594
|
-
pos = m[0].length;
|
|
124595
|
-
current = m[0];
|
|
124596
|
-
base = m[0];
|
|
124597
|
-
previous = '';
|
|
124598
|
-
|
|
124599
|
-
// On windows, check that the root exists. On unix there is no need.
|
|
124600
|
-
if (isWindows && !knownHard[base]) {
|
|
124601
|
-
fs.lstat(base, function(err) {
|
|
124602
|
-
if (err) return cb(err);
|
|
124603
|
-
knownHard[base] = true;
|
|
124604
|
-
LOOP();
|
|
124605
|
-
});
|
|
124606
|
-
} else {
|
|
124607
|
-
process.nextTick(LOOP);
|
|
124608
|
-
}
|
|
124609
|
-
}
|
|
124610
|
-
|
|
124611
|
-
// walk down the path, swapping out linked pathparts for their real
|
|
124612
|
-
// values
|
|
124613
|
-
function LOOP() {
|
|
124614
|
-
// stop if scanned past end of path
|
|
124615
|
-
if (pos >= p.length) {
|
|
124616
|
-
if (cache) cache[original] = p;
|
|
124617
|
-
return cb(null, p);
|
|
124618
|
-
}
|
|
124619
|
-
|
|
124620
|
-
// find the next part
|
|
124621
|
-
nextPartRe.lastIndex = pos;
|
|
124622
|
-
var result = nextPartRe.exec(p);
|
|
124623
|
-
previous = current;
|
|
124624
|
-
current += result[0];
|
|
124625
|
-
base = previous + result[1];
|
|
124626
|
-
pos = nextPartRe.lastIndex;
|
|
124627
|
-
|
|
124628
|
-
// continue if not a symlink
|
|
124629
|
-
if (knownHard[base] || (cache && cache[base] === base)) {
|
|
124630
|
-
return process.nextTick(LOOP);
|
|
124631
|
-
}
|
|
124632
|
-
|
|
124633
|
-
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
|
|
124634
|
-
// known symbolic link. no need to stat again.
|
|
124635
|
-
return gotResolvedLink(cache[base]);
|
|
124636
|
-
}
|
|
124637
|
-
|
|
124638
|
-
return fs.lstat(base, gotStat);
|
|
124639
|
-
}
|
|
124640
|
-
|
|
124641
|
-
function gotStat(err, stat) {
|
|
124642
|
-
if (err) return cb(err);
|
|
124643
|
-
|
|
124644
|
-
// if not a symlink, skip to the next path part
|
|
124645
|
-
if (!stat.isSymbolicLink()) {
|
|
124646
|
-
knownHard[base] = true;
|
|
124647
|
-
if (cache) cache[base] = base;
|
|
124648
|
-
return process.nextTick(LOOP);
|
|
124649
|
-
}
|
|
124650
|
-
|
|
124651
|
-
// stat & read the link if not read before
|
|
124652
|
-
// call gotTarget as soon as the link target is known
|
|
124653
|
-
// dev/ino always return 0 on windows, so skip the check.
|
|
124654
|
-
if (!isWindows) {
|
|
124655
|
-
var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
|
|
124656
|
-
if (seenLinks.hasOwnProperty(id)) {
|
|
124657
|
-
return gotTarget(null, seenLinks[id], base);
|
|
124658
|
-
}
|
|
124659
|
-
}
|
|
124660
|
-
fs.stat(base, function(err) {
|
|
124661
|
-
if (err) return cb(err);
|
|
124662
|
-
|
|
124663
|
-
fs.readlink(base, function(err, target) {
|
|
124664
|
-
if (!isWindows) seenLinks[id] = target;
|
|
124665
|
-
gotTarget(err, target);
|
|
124666
|
-
});
|
|
124667
|
-
});
|
|
124668
|
-
}
|
|
124669
|
-
|
|
124670
|
-
function gotTarget(err, target, base) {
|
|
124671
|
-
if (err) return cb(err);
|
|
124672
|
-
|
|
124673
|
-
var resolvedLink = pathModule.resolve(previous, target);
|
|
124674
|
-
if (cache) cache[base] = resolvedLink;
|
|
124675
|
-
gotResolvedLink(resolvedLink);
|
|
124676
|
-
}
|
|
124677
|
-
|
|
124678
|
-
function gotResolvedLink(resolvedLink) {
|
|
124679
|
-
// resolve the link, then start over
|
|
124680
|
-
p = pathModule.resolve(resolvedLink, p.slice(pos));
|
|
124681
|
-
start();
|
|
124682
|
-
}
|
|
124683
|
-
};
|
|
124684
|
-
|
|
124685
|
-
|
|
124686
|
-
/***/ },
|
|
124687
|
-
|
|
124688
|
-
/***/ "./node_modules/glob/common.js"
|
|
124689
|
-
/*!*************************************!*\
|
|
124690
|
-
!*** ./node_modules/glob/common.js ***!
|
|
124691
|
-
\*************************************/
|
|
124692
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
124693
|
-
|
|
124694
|
-
exports.setopts = setopts
|
|
124695
|
-
exports.ownProp = ownProp
|
|
124696
|
-
exports.makeAbs = makeAbs
|
|
124697
|
-
exports.finish = finish
|
|
124698
|
-
exports.mark = mark
|
|
124699
|
-
exports.isIgnored = isIgnored
|
|
124700
|
-
exports.childrenIgnored = childrenIgnored
|
|
124701
|
-
|
|
124702
|
-
function ownProp (obj, field) {
|
|
124703
|
-
return Object.prototype.hasOwnProperty.call(obj, field)
|
|
124704
|
-
}
|
|
124705
|
-
|
|
124706
|
-
var fs = __webpack_require__(/*! fs */ "fs")
|
|
124707
|
-
var path = __webpack_require__(/*! path */ "path")
|
|
124708
|
-
var minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js")
|
|
124709
|
-
var isAbsolute = __webpack_require__(/*! path-is-absolute */ "./node_modules/path-is-absolute/index.js")
|
|
124710
|
-
var Minimatch = minimatch.Minimatch
|
|
124711
|
-
|
|
124712
|
-
function alphasort (a, b) {
|
|
124713
|
-
return a.localeCompare(b, 'en')
|
|
124714
|
-
}
|
|
124715
|
-
|
|
124716
|
-
function setupIgnores (self, options) {
|
|
124717
|
-
self.ignore = options.ignore || []
|
|
124718
|
-
|
|
124719
|
-
if (!Array.isArray(self.ignore))
|
|
124720
|
-
self.ignore = [self.ignore]
|
|
124721
|
-
|
|
124722
|
-
if (self.ignore.length) {
|
|
124723
|
-
self.ignore = self.ignore.map(ignoreMap)
|
|
124724
|
-
}
|
|
124725
|
-
}
|
|
124726
|
-
|
|
124727
|
-
// ignore patterns are always in dot:true mode.
|
|
124728
|
-
function ignoreMap (pattern) {
|
|
124729
|
-
var gmatcher = null
|
|
124730
|
-
if (pattern.slice(-3) === '/**') {
|
|
124731
|
-
var gpattern = pattern.replace(/(\/\*\*)+$/, '')
|
|
124732
|
-
gmatcher = new Minimatch(gpattern, { dot: true })
|
|
124733
|
-
}
|
|
124734
|
-
|
|
124735
|
-
return {
|
|
124736
|
-
matcher: new Minimatch(pattern, { dot: true }),
|
|
124737
|
-
gmatcher: gmatcher
|
|
124738
|
-
}
|
|
124739
|
-
}
|
|
124740
|
-
|
|
124741
|
-
function setopts (self, pattern, options) {
|
|
124742
|
-
if (!options)
|
|
124743
|
-
options = {}
|
|
124744
|
-
|
|
124745
|
-
// base-matching: just use globstar for that.
|
|
124746
|
-
if (options.matchBase && -1 === pattern.indexOf("/")) {
|
|
124747
|
-
if (options.noglobstar) {
|
|
124748
|
-
throw new Error("base matching requires globstar")
|
|
124749
|
-
}
|
|
124750
|
-
pattern = "**/" + pattern
|
|
124751
|
-
}
|
|
124752
|
-
|
|
124753
|
-
self.silent = !!options.silent
|
|
124754
|
-
self.pattern = pattern
|
|
124755
|
-
self.strict = options.strict !== false
|
|
124756
|
-
self.realpath = !!options.realpath
|
|
124757
|
-
self.realpathCache = options.realpathCache || Object.create(null)
|
|
124758
|
-
self.follow = !!options.follow
|
|
124759
|
-
self.dot = !!options.dot
|
|
124760
|
-
self.mark = !!options.mark
|
|
124761
|
-
self.nodir = !!options.nodir
|
|
124762
|
-
if (self.nodir)
|
|
124763
|
-
self.mark = true
|
|
124764
|
-
self.sync = !!options.sync
|
|
124765
|
-
self.nounique = !!options.nounique
|
|
124766
|
-
self.nonull = !!options.nonull
|
|
124767
|
-
self.nosort = !!options.nosort
|
|
124768
|
-
self.nocase = !!options.nocase
|
|
124769
|
-
self.stat = !!options.stat
|
|
124770
|
-
self.noprocess = !!options.noprocess
|
|
124771
|
-
self.absolute = !!options.absolute
|
|
124772
|
-
self.fs = options.fs || fs
|
|
124773
|
-
|
|
124774
|
-
self.maxLength = options.maxLength || Infinity
|
|
124775
|
-
self.cache = options.cache || Object.create(null)
|
|
124776
|
-
self.statCache = options.statCache || Object.create(null)
|
|
124777
|
-
self.symlinks = options.symlinks || Object.create(null)
|
|
124778
|
-
|
|
124779
|
-
setupIgnores(self, options)
|
|
124780
|
-
|
|
124781
|
-
self.changedCwd = false
|
|
124782
|
-
var cwd = process.cwd()
|
|
124783
|
-
if (!ownProp(options, "cwd"))
|
|
124784
|
-
self.cwd = cwd
|
|
124785
|
-
else {
|
|
124786
|
-
self.cwd = path.resolve(options.cwd)
|
|
124787
|
-
self.changedCwd = self.cwd !== cwd
|
|
124788
|
-
}
|
|
124789
|
-
|
|
124790
|
-
self.root = options.root || path.resolve(self.cwd, "/")
|
|
124791
|
-
self.root = path.resolve(self.root)
|
|
124792
|
-
if (process.platform === "win32")
|
|
124793
|
-
self.root = self.root.replace(/\\/g, "/")
|
|
124794
|
-
|
|
124795
|
-
// TODO: is an absolute `cwd` supposed to be resolved against `root`?
|
|
124796
|
-
// e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
|
|
124797
|
-
self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)
|
|
124798
|
-
if (process.platform === "win32")
|
|
124799
|
-
self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
|
|
124800
|
-
self.nomount = !!options.nomount
|
|
124801
|
-
|
|
124802
|
-
// disable comments and negation in Minimatch.
|
|
124803
|
-
// Note that they are not supported in Glob itself anyway.
|
|
124804
|
-
options.nonegate = true
|
|
124805
|
-
options.nocomment = true
|
|
124806
|
-
|
|
124807
|
-
self.minimatch = new Minimatch(pattern, options)
|
|
124808
|
-
self.options = self.minimatch.options
|
|
124809
|
-
}
|
|
124810
|
-
|
|
124811
|
-
function finish (self) {
|
|
124812
|
-
var nou = self.nounique
|
|
124813
|
-
var all = nou ? [] : Object.create(null)
|
|
124814
|
-
|
|
124815
|
-
for (var i = 0, l = self.matches.length; i < l; i ++) {
|
|
124816
|
-
var matches = self.matches[i]
|
|
124817
|
-
if (!matches || Object.keys(matches).length === 0) {
|
|
124818
|
-
if (self.nonull) {
|
|
124819
|
-
// do like the shell, and spit out the literal glob
|
|
124820
|
-
var literal = self.minimatch.globSet[i]
|
|
124821
|
-
if (nou)
|
|
124822
|
-
all.push(literal)
|
|
124823
|
-
else
|
|
124824
|
-
all[literal] = true
|
|
124825
|
-
}
|
|
124826
|
-
} else {
|
|
124827
|
-
// had matches
|
|
124828
|
-
var m = Object.keys(matches)
|
|
124829
|
-
if (nou)
|
|
124830
|
-
all.push.apply(all, m)
|
|
124831
|
-
else
|
|
124832
|
-
m.forEach(function (m) {
|
|
124833
|
-
all[m] = true
|
|
124834
|
-
})
|
|
124835
|
-
}
|
|
124836
|
-
}
|
|
124837
|
-
|
|
124838
|
-
if (!nou)
|
|
124839
|
-
all = Object.keys(all)
|
|
124840
|
-
|
|
124841
|
-
if (!self.nosort)
|
|
124842
|
-
all = all.sort(alphasort)
|
|
124843
|
-
|
|
124844
|
-
// at *some* point we statted all of these
|
|
124845
|
-
if (self.mark) {
|
|
124846
|
-
for (var i = 0; i < all.length; i++) {
|
|
124847
|
-
all[i] = self._mark(all[i])
|
|
124848
|
-
}
|
|
124849
|
-
if (self.nodir) {
|
|
124850
|
-
all = all.filter(function (e) {
|
|
124851
|
-
var notDir = !(/\/$/.test(e))
|
|
124852
|
-
var c = self.cache[e] || self.cache[makeAbs(self, e)]
|
|
124853
|
-
if (notDir && c)
|
|
124854
|
-
notDir = c !== 'DIR' && !Array.isArray(c)
|
|
124855
|
-
return notDir
|
|
124856
|
-
})
|
|
124857
|
-
}
|
|
124858
|
-
}
|
|
124859
|
-
|
|
124860
|
-
if (self.ignore.length)
|
|
124861
|
-
all = all.filter(function(m) {
|
|
124862
|
-
return !isIgnored(self, m)
|
|
124863
|
-
})
|
|
124864
|
-
|
|
124865
|
-
self.found = all
|
|
124866
|
-
}
|
|
124867
|
-
|
|
124868
|
-
function mark (self, p) {
|
|
124869
|
-
var abs = makeAbs(self, p)
|
|
124870
|
-
var c = self.cache[abs]
|
|
124871
|
-
var m = p
|
|
124872
|
-
if (c) {
|
|
124873
|
-
var isDir = c === 'DIR' || Array.isArray(c)
|
|
124874
|
-
var slash = p.slice(-1) === '/'
|
|
124875
|
-
|
|
124876
|
-
if (isDir && !slash)
|
|
124877
|
-
m += '/'
|
|
124878
|
-
else if (!isDir && slash)
|
|
124879
|
-
m = m.slice(0, -1)
|
|
124880
|
-
|
|
124881
|
-
if (m !== p) {
|
|
124882
|
-
var mabs = makeAbs(self, m)
|
|
124883
|
-
self.statCache[mabs] = self.statCache[abs]
|
|
124884
|
-
self.cache[mabs] = self.cache[abs]
|
|
124885
|
-
}
|
|
124886
|
-
}
|
|
124887
|
-
|
|
124888
|
-
return m
|
|
124889
|
-
}
|
|
124890
|
-
|
|
124891
|
-
// lotta situps...
|
|
124892
|
-
function makeAbs (self, f) {
|
|
124893
|
-
var abs = f
|
|
124894
|
-
if (f.charAt(0) === '/') {
|
|
124895
|
-
abs = path.join(self.root, f)
|
|
124896
|
-
} else if (isAbsolute(f) || f === '') {
|
|
124897
|
-
abs = f
|
|
124898
|
-
} else if (self.changedCwd) {
|
|
124899
|
-
abs = path.resolve(self.cwd, f)
|
|
124900
|
-
} else {
|
|
124901
|
-
abs = path.resolve(f)
|
|
124902
|
-
}
|
|
124903
|
-
|
|
124904
|
-
if (process.platform === 'win32')
|
|
124905
|
-
abs = abs.replace(/\\/g, '/')
|
|
124906
|
-
|
|
124907
|
-
return abs
|
|
124908
|
-
}
|
|
124909
|
-
|
|
124910
|
-
|
|
124911
|
-
// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
|
|
124912
|
-
// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
|
|
124913
|
-
function isIgnored (self, path) {
|
|
124914
|
-
if (!self.ignore.length)
|
|
124915
|
-
return false
|
|
124916
|
-
|
|
124917
|
-
return self.ignore.some(function(item) {
|
|
124918
|
-
return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
|
|
124919
|
-
})
|
|
124920
|
-
}
|
|
124921
|
-
|
|
124922
|
-
function childrenIgnored (self, path) {
|
|
124923
|
-
if (!self.ignore.length)
|
|
124924
|
-
return false
|
|
124925
|
-
|
|
124926
|
-
return self.ignore.some(function(item) {
|
|
124927
|
-
return !!(item.gmatcher && item.gmatcher.match(path))
|
|
124928
|
-
})
|
|
124929
|
-
}
|
|
124930
|
-
|
|
124931
|
-
|
|
124932
|
-
/***/ },
|
|
124933
|
-
|
|
124934
|
-
/***/ "./node_modules/glob/glob.js"
|
|
124935
|
-
/*!***********************************!*\
|
|
124936
|
-
!*** ./node_modules/glob/glob.js ***!
|
|
124937
|
-
\***********************************/
|
|
124938
|
-
(module, __unused_webpack_exports, __webpack_require__) {
|
|
124939
|
-
|
|
124940
|
-
// Approach:
|
|
124941
|
-
//
|
|
124942
|
-
// 1. Get the minimatch set
|
|
124943
|
-
// 2. For each pattern in the set, PROCESS(pattern, false)
|
|
124944
|
-
// 3. Store matches per-set, then uniq them
|
|
124945
|
-
//
|
|
124946
|
-
// PROCESS(pattern, inGlobStar)
|
|
124947
|
-
// Get the first [n] items from pattern that are all strings
|
|
124948
|
-
// Join these together. This is PREFIX.
|
|
124949
|
-
// If there is no more remaining, then stat(PREFIX) and
|
|
124950
|
-
// add to matches if it succeeds. END.
|
|
124951
|
-
//
|
|
124952
|
-
// If inGlobStar and PREFIX is symlink and points to dir
|
|
124953
|
-
// set ENTRIES = []
|
|
124954
|
-
// else readdir(PREFIX) as ENTRIES
|
|
124955
|
-
// If fail, END
|
|
124956
|
-
//
|
|
124957
|
-
// with ENTRIES
|
|
124958
|
-
// If pattern[n] is GLOBSTAR
|
|
124959
|
-
// // handle the case where the globstar match is empty
|
|
124960
|
-
// // by pruning it out, and testing the resulting pattern
|
|
124961
|
-
// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
|
|
124962
|
-
// // handle other cases.
|
|
124963
|
-
// for ENTRY in ENTRIES (not dotfiles)
|
|
124964
|
-
// // attach globstar + tail onto the entry
|
|
124965
|
-
// // Mark that this entry is a globstar match
|
|
124966
|
-
// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
|
|
124967
|
-
//
|
|
124968
|
-
// else // not globstar
|
|
124969
|
-
// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
|
|
124970
|
-
// Test ENTRY against pattern[n]
|
|
124971
|
-
// If fails, continue
|
|
124972
|
-
// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
|
|
124973
|
-
//
|
|
124974
|
-
// Caveat:
|
|
124975
|
-
// Cache all stats and readdirs results to minimize syscall. Since all
|
|
124976
|
-
// we ever care about is existence and directory-ness, we can just keep
|
|
124977
|
-
// `true` for files, and [children,...] for directories, or `false` for
|
|
124978
|
-
// things that don't exist.
|
|
124979
|
-
|
|
124980
|
-
module.exports = glob
|
|
124981
|
-
|
|
124982
|
-
var rp = __webpack_require__(/*! fs.realpath */ "./node_modules/fs.realpath/index.js")
|
|
124983
|
-
var minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js")
|
|
124984
|
-
var Minimatch = minimatch.Minimatch
|
|
124985
|
-
var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits.js")
|
|
124986
|
-
var EE = (__webpack_require__(/*! events */ "events").EventEmitter)
|
|
124987
|
-
var path = __webpack_require__(/*! path */ "path")
|
|
124988
|
-
var assert = __webpack_require__(/*! assert */ "assert")
|
|
124989
|
-
var isAbsolute = __webpack_require__(/*! path-is-absolute */ "./node_modules/path-is-absolute/index.js")
|
|
124990
|
-
var globSync = __webpack_require__(/*! ./sync.js */ "./node_modules/glob/sync.js")
|
|
124991
|
-
var common = __webpack_require__(/*! ./common.js */ "./node_modules/glob/common.js")
|
|
124992
|
-
var setopts = common.setopts
|
|
124993
|
-
var ownProp = common.ownProp
|
|
124994
|
-
var inflight = __webpack_require__(/*! inflight */ "./node_modules/inflight/inflight.js")
|
|
124995
|
-
var util = __webpack_require__(/*! util */ "util")
|
|
124996
|
-
var childrenIgnored = common.childrenIgnored
|
|
124997
|
-
var isIgnored = common.isIgnored
|
|
124998
|
-
|
|
124999
|
-
var once = __webpack_require__(/*! once */ "./node_modules/once/once.js")
|
|
125000
|
-
|
|
125001
|
-
function glob (pattern, options, cb) {
|
|
125002
|
-
if (typeof options === 'function') cb = options, options = {}
|
|
125003
|
-
if (!options) options = {}
|
|
125004
|
-
|
|
125005
|
-
if (options.sync) {
|
|
125006
|
-
if (cb)
|
|
125007
|
-
throw new TypeError('callback provided to sync glob')
|
|
125008
|
-
return globSync(pattern, options)
|
|
125009
|
-
}
|
|
125010
|
-
|
|
125011
|
-
return new Glob(pattern, options, cb)
|
|
125012
|
-
}
|
|
125013
|
-
|
|
125014
|
-
glob.sync = globSync
|
|
125015
|
-
var GlobSync = glob.GlobSync = globSync.GlobSync
|
|
125016
|
-
|
|
125017
|
-
// old api surface
|
|
125018
|
-
glob.glob = glob
|
|
125019
|
-
|
|
125020
|
-
function extend (origin, add) {
|
|
125021
|
-
if (add === null || typeof add !== 'object') {
|
|
125022
|
-
return origin
|
|
125023
|
-
}
|
|
125024
|
-
|
|
125025
|
-
var keys = Object.keys(add)
|
|
125026
|
-
var i = keys.length
|
|
125027
|
-
while (i--) {
|
|
125028
|
-
origin[keys[i]] = add[keys[i]]
|
|
125029
|
-
}
|
|
125030
|
-
return origin
|
|
125031
|
-
}
|
|
125032
|
-
|
|
125033
|
-
glob.hasMagic = function (pattern, options_) {
|
|
125034
|
-
var options = extend({}, options_)
|
|
125035
|
-
options.noprocess = true
|
|
125036
|
-
|
|
125037
|
-
var g = new Glob(pattern, options)
|
|
125038
|
-
var set = g.minimatch.set
|
|
125039
|
-
|
|
125040
|
-
if (!pattern)
|
|
125041
|
-
return false
|
|
125042
|
-
|
|
125043
|
-
if (set.length > 1)
|
|
125044
|
-
return true
|
|
125045
|
-
|
|
125046
|
-
for (var j = 0; j < set[0].length; j++) {
|
|
125047
|
-
if (typeof set[0][j] !== 'string')
|
|
125048
|
-
return true
|
|
125049
|
-
}
|
|
125050
|
-
|
|
125051
|
-
return false
|
|
125052
|
-
}
|
|
125053
|
-
|
|
125054
|
-
glob.Glob = Glob
|
|
125055
|
-
inherits(Glob, EE)
|
|
125056
|
-
function Glob (pattern, options, cb) {
|
|
125057
|
-
if (typeof options === 'function') {
|
|
125058
|
-
cb = options
|
|
125059
|
-
options = null
|
|
125060
|
-
}
|
|
125061
|
-
|
|
125062
|
-
if (options && options.sync) {
|
|
125063
|
-
if (cb)
|
|
125064
|
-
throw new TypeError('callback provided to sync glob')
|
|
125065
|
-
return new GlobSync(pattern, options)
|
|
125066
|
-
}
|
|
125067
|
-
|
|
125068
|
-
if (!(this instanceof Glob))
|
|
125069
|
-
return new Glob(pattern, options, cb)
|
|
125070
|
-
|
|
125071
|
-
setopts(this, pattern, options)
|
|
125072
|
-
this._didRealPath = false
|
|
125073
|
-
|
|
125074
|
-
// process each pattern in the minimatch set
|
|
125075
|
-
var n = this.minimatch.set.length
|
|
125076
|
-
|
|
125077
|
-
// The matches are stored as {<filename>: true,...} so that
|
|
125078
|
-
// duplicates are automagically pruned.
|
|
125079
|
-
// Later, we do an Object.keys() on these.
|
|
125080
|
-
// Keep them as a list so we can fill in when nonull is set.
|
|
125081
|
-
this.matches = new Array(n)
|
|
125082
|
-
|
|
125083
|
-
if (typeof cb === 'function') {
|
|
125084
|
-
cb = once(cb)
|
|
125085
|
-
this.on('error', cb)
|
|
125086
|
-
this.on('end', function (matches) {
|
|
125087
|
-
cb(null, matches)
|
|
125088
|
-
})
|
|
125089
|
-
}
|
|
125090
|
-
|
|
125091
|
-
var self = this
|
|
125092
|
-
this._processing = 0
|
|
125093
|
-
|
|
125094
|
-
this._emitQueue = []
|
|
125095
|
-
this._processQueue = []
|
|
125096
|
-
this.paused = false
|
|
125097
|
-
|
|
125098
|
-
if (this.noprocess)
|
|
125099
|
-
return this
|
|
125100
|
-
|
|
125101
|
-
if (n === 0)
|
|
125102
|
-
return done()
|
|
125103
|
-
|
|
125104
|
-
var sync = true
|
|
125105
|
-
for (var i = 0; i < n; i ++) {
|
|
125106
|
-
this._process(this.minimatch.set[i], i, false, done)
|
|
125107
|
-
}
|
|
125108
|
-
sync = false
|
|
125109
|
-
|
|
125110
|
-
function done () {
|
|
125111
|
-
--self._processing
|
|
125112
|
-
if (self._processing <= 0) {
|
|
125113
|
-
if (sync) {
|
|
125114
|
-
process.nextTick(function () {
|
|
125115
|
-
self._finish()
|
|
125116
|
-
})
|
|
125117
|
-
} else {
|
|
125118
|
-
self._finish()
|
|
125119
|
-
}
|
|
125120
|
-
}
|
|
125121
|
-
}
|
|
125122
|
-
}
|
|
125123
|
-
|
|
125124
|
-
Glob.prototype._finish = function () {
|
|
125125
|
-
assert(this instanceof Glob)
|
|
125126
|
-
if (this.aborted)
|
|
125127
|
-
return
|
|
125128
|
-
|
|
125129
|
-
if (this.realpath && !this._didRealpath)
|
|
125130
|
-
return this._realpath()
|
|
125131
|
-
|
|
125132
|
-
common.finish(this)
|
|
125133
|
-
this.emit('end', this.found)
|
|
125134
|
-
}
|
|
125135
|
-
|
|
125136
|
-
Glob.prototype._realpath = function () {
|
|
125137
|
-
if (this._didRealpath)
|
|
125138
|
-
return
|
|
125139
|
-
|
|
125140
|
-
this._didRealpath = true
|
|
125141
|
-
|
|
125142
|
-
var n = this.matches.length
|
|
125143
|
-
if (n === 0)
|
|
125144
|
-
return this._finish()
|
|
125145
|
-
|
|
125146
|
-
var self = this
|
|
125147
|
-
for (var i = 0; i < this.matches.length; i++)
|
|
125148
|
-
this._realpathSet(i, next)
|
|
125149
|
-
|
|
125150
|
-
function next () {
|
|
125151
|
-
if (--n === 0)
|
|
125152
|
-
self._finish()
|
|
125153
|
-
}
|
|
125154
|
-
}
|
|
125155
|
-
|
|
125156
|
-
Glob.prototype._realpathSet = function (index, cb) {
|
|
125157
|
-
var matchset = this.matches[index]
|
|
125158
|
-
if (!matchset)
|
|
125159
|
-
return cb()
|
|
125160
|
-
|
|
125161
|
-
var found = Object.keys(matchset)
|
|
125162
|
-
var self = this
|
|
125163
|
-
var n = found.length
|
|
125164
|
-
|
|
125165
|
-
if (n === 0)
|
|
125166
|
-
return cb()
|
|
125167
|
-
|
|
125168
|
-
var set = this.matches[index] = Object.create(null)
|
|
125169
|
-
found.forEach(function (p, i) {
|
|
125170
|
-
// If there's a problem with the stat, then it means that
|
|
125171
|
-
// one or more of the links in the realpath couldn't be
|
|
125172
|
-
// resolved. just return the abs value in that case.
|
|
125173
|
-
p = self._makeAbs(p)
|
|
125174
|
-
rp.realpath(p, self.realpathCache, function (er, real) {
|
|
125175
|
-
if (!er)
|
|
125176
|
-
set[real] = true
|
|
125177
|
-
else if (er.syscall === 'stat')
|
|
125178
|
-
set[p] = true
|
|
125179
|
-
else
|
|
125180
|
-
self.emit('error', er) // srsly wtf right here
|
|
125181
|
-
|
|
125182
|
-
if (--n === 0) {
|
|
125183
|
-
self.matches[index] = set
|
|
125184
|
-
cb()
|
|
125185
|
-
}
|
|
125186
|
-
})
|
|
125187
|
-
})
|
|
125188
|
-
}
|
|
125189
|
-
|
|
125190
|
-
Glob.prototype._mark = function (p) {
|
|
125191
|
-
return common.mark(this, p)
|
|
125192
|
-
}
|
|
125193
|
-
|
|
125194
|
-
Glob.prototype._makeAbs = function (f) {
|
|
125195
|
-
return common.makeAbs(this, f)
|
|
125196
|
-
}
|
|
125197
|
-
|
|
125198
|
-
Glob.prototype.abort = function () {
|
|
125199
|
-
this.aborted = true
|
|
125200
|
-
this.emit('abort')
|
|
125201
|
-
}
|
|
125202
|
-
|
|
125203
|
-
Glob.prototype.pause = function () {
|
|
125204
|
-
if (!this.paused) {
|
|
125205
|
-
this.paused = true
|
|
125206
|
-
this.emit('pause')
|
|
125207
|
-
}
|
|
125208
|
-
}
|
|
125209
|
-
|
|
125210
|
-
Glob.prototype.resume = function () {
|
|
125211
|
-
if (this.paused) {
|
|
125212
|
-
this.emit('resume')
|
|
125213
|
-
this.paused = false
|
|
125214
|
-
if (this._emitQueue.length) {
|
|
125215
|
-
var eq = this._emitQueue.slice(0)
|
|
125216
|
-
this._emitQueue.length = 0
|
|
125217
|
-
for (var i = 0; i < eq.length; i ++) {
|
|
125218
|
-
var e = eq[i]
|
|
125219
|
-
this._emitMatch(e[0], e[1])
|
|
125220
|
-
}
|
|
125221
|
-
}
|
|
125222
|
-
if (this._processQueue.length) {
|
|
125223
|
-
var pq = this._processQueue.slice(0)
|
|
125224
|
-
this._processQueue.length = 0
|
|
125225
|
-
for (var i = 0; i < pq.length; i ++) {
|
|
125226
|
-
var p = pq[i]
|
|
125227
|
-
this._processing--
|
|
125228
|
-
this._process(p[0], p[1], p[2], p[3])
|
|
125229
|
-
}
|
|
125230
|
-
}
|
|
125231
|
-
}
|
|
125232
|
-
}
|
|
125233
|
-
|
|
125234
|
-
Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
|
|
125235
|
-
assert(this instanceof Glob)
|
|
125236
|
-
assert(typeof cb === 'function')
|
|
125237
|
-
|
|
125238
|
-
if (this.aborted)
|
|
125239
|
-
return
|
|
125240
|
-
|
|
125241
|
-
this._processing++
|
|
125242
|
-
if (this.paused) {
|
|
125243
|
-
this._processQueue.push([pattern, index, inGlobStar, cb])
|
|
125244
|
-
return
|
|
125245
|
-
}
|
|
125246
|
-
|
|
125247
|
-
//console.error('PROCESS %d', this._processing, pattern)
|
|
125248
|
-
|
|
125249
|
-
// Get the first [n] parts of pattern that are all strings.
|
|
125250
|
-
var n = 0
|
|
125251
|
-
while (typeof pattern[n] === 'string') {
|
|
125252
|
-
n ++
|
|
125253
|
-
}
|
|
125254
|
-
// now n is the index of the first one that is *not* a string.
|
|
125255
|
-
|
|
125256
|
-
// see if there's anything else
|
|
125257
|
-
var prefix
|
|
125258
|
-
switch (n) {
|
|
125259
|
-
// if not, then this is rather simple
|
|
125260
|
-
case pattern.length:
|
|
125261
|
-
this._processSimple(pattern.join('/'), index, cb)
|
|
125262
|
-
return
|
|
125263
|
-
|
|
125264
|
-
case 0:
|
|
125265
|
-
// pattern *starts* with some non-trivial item.
|
|
125266
|
-
// going to readdir(cwd), but not include the prefix in matches.
|
|
125267
|
-
prefix = null
|
|
125268
|
-
break
|
|
125269
|
-
|
|
125270
|
-
default:
|
|
125271
|
-
// pattern has some string bits in the front.
|
|
125272
|
-
// whatever it starts with, whether that's 'absolute' like /foo/bar,
|
|
125273
|
-
// or 'relative' like '../baz'
|
|
125274
|
-
prefix = pattern.slice(0, n).join('/')
|
|
125275
|
-
break
|
|
125276
|
-
}
|
|
125277
|
-
|
|
125278
|
-
var remain = pattern.slice(n)
|
|
125279
|
-
|
|
125280
|
-
// get the list of entries.
|
|
125281
|
-
var read
|
|
125282
|
-
if (prefix === null)
|
|
125283
|
-
read = '.'
|
|
125284
|
-
else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
|
|
125285
|
-
if (!prefix || !isAbsolute(prefix))
|
|
125286
|
-
prefix = '/' + prefix
|
|
125287
|
-
read = prefix
|
|
125288
|
-
} else
|
|
125289
|
-
read = prefix
|
|
125290
|
-
|
|
125291
|
-
var abs = this._makeAbs(read)
|
|
125292
|
-
|
|
125293
|
-
//if ignored, skip _processing
|
|
125294
|
-
if (childrenIgnored(this, read))
|
|
125295
|
-
return cb()
|
|
125296
|
-
|
|
125297
|
-
var isGlobStar = remain[0] === minimatch.GLOBSTAR
|
|
125298
|
-
if (isGlobStar)
|
|
125299
|
-
this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
|
|
125300
|
-
else
|
|
125301
|
-
this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
|
|
125302
|
-
}
|
|
125303
|
-
|
|
125304
|
-
Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
|
|
125305
|
-
var self = this
|
|
125306
|
-
this._readdir(abs, inGlobStar, function (er, entries) {
|
|
125307
|
-
return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
|
|
125308
|
-
})
|
|
125309
|
-
}
|
|
125310
|
-
|
|
125311
|
-
Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
|
|
125312
|
-
|
|
125313
|
-
// if the abs isn't a dir, then nothing can match!
|
|
125314
|
-
if (!entries)
|
|
125315
|
-
return cb()
|
|
125316
|
-
|
|
125317
|
-
// It will only match dot entries if it starts with a dot, or if
|
|
125318
|
-
// dot is set. Stuff like @(.foo|.bar) isn't allowed.
|
|
125319
|
-
var pn = remain[0]
|
|
125320
|
-
var negate = !!this.minimatch.negate
|
|
125321
|
-
var rawGlob = pn._glob
|
|
125322
|
-
var dotOk = this.dot || rawGlob.charAt(0) === '.'
|
|
125323
|
-
|
|
125324
|
-
var matchedEntries = []
|
|
125325
|
-
for (var i = 0; i < entries.length; i++) {
|
|
125326
|
-
var e = entries[i]
|
|
125327
|
-
if (e.charAt(0) !== '.' || dotOk) {
|
|
125328
|
-
var m
|
|
125329
|
-
if (negate && !prefix) {
|
|
125330
|
-
m = !e.match(pn)
|
|
125331
|
-
} else {
|
|
125332
|
-
m = e.match(pn)
|
|
125333
|
-
}
|
|
125334
|
-
if (m)
|
|
125335
|
-
matchedEntries.push(e)
|
|
125336
|
-
}
|
|
125337
|
-
}
|
|
125338
|
-
|
|
125339
|
-
//console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
|
|
125340
|
-
|
|
125341
|
-
var len = matchedEntries.length
|
|
125342
|
-
// If there are no matched entries, then nothing matches.
|
|
125343
|
-
if (len === 0)
|
|
125344
|
-
return cb()
|
|
125345
|
-
|
|
125346
|
-
// if this is the last remaining pattern bit, then no need for
|
|
125347
|
-
// an additional stat *unless* the user has specified mark or
|
|
125348
|
-
// stat explicitly. We know they exist, since readdir returned
|
|
125349
|
-
// them.
|
|
125350
|
-
|
|
125351
|
-
if (remain.length === 1 && !this.mark && !this.stat) {
|
|
125352
|
-
if (!this.matches[index])
|
|
125353
|
-
this.matches[index] = Object.create(null)
|
|
125354
|
-
|
|
125355
|
-
for (var i = 0; i < len; i ++) {
|
|
125356
|
-
var e = matchedEntries[i]
|
|
125357
|
-
if (prefix) {
|
|
125358
|
-
if (prefix !== '/')
|
|
125359
|
-
e = prefix + '/' + e
|
|
125360
|
-
else
|
|
125361
|
-
e = prefix + e
|
|
125362
|
-
}
|
|
125363
|
-
|
|
125364
|
-
if (e.charAt(0) === '/' && !this.nomount) {
|
|
125365
|
-
e = path.join(this.root, e)
|
|
125366
|
-
}
|
|
125367
|
-
this._emitMatch(index, e)
|
|
125368
|
-
}
|
|
125369
|
-
// This was the last one, and no stats were needed
|
|
125370
|
-
return cb()
|
|
125371
|
-
}
|
|
125372
|
-
|
|
125373
|
-
// now test all matched entries as stand-ins for that part
|
|
125374
|
-
// of the pattern.
|
|
125375
|
-
remain.shift()
|
|
125376
|
-
for (var i = 0; i < len; i ++) {
|
|
125377
|
-
var e = matchedEntries[i]
|
|
125378
|
-
var newPattern
|
|
125379
|
-
if (prefix) {
|
|
125380
|
-
if (prefix !== '/')
|
|
125381
|
-
e = prefix + '/' + e
|
|
125382
|
-
else
|
|
125383
|
-
e = prefix + e
|
|
125384
|
-
}
|
|
125385
|
-
this._process([e].concat(remain), index, inGlobStar, cb)
|
|
125386
|
-
}
|
|
125387
|
-
cb()
|
|
125388
|
-
}
|
|
125389
|
-
|
|
125390
|
-
Glob.prototype._emitMatch = function (index, e) {
|
|
125391
|
-
if (this.aborted)
|
|
125392
|
-
return
|
|
125393
|
-
|
|
125394
|
-
if (isIgnored(this, e))
|
|
125395
|
-
return
|
|
125396
|
-
|
|
125397
|
-
if (this.paused) {
|
|
125398
|
-
this._emitQueue.push([index, e])
|
|
125399
|
-
return
|
|
125400
|
-
}
|
|
125401
|
-
|
|
125402
|
-
var abs = isAbsolute(e) ? e : this._makeAbs(e)
|
|
125403
|
-
|
|
125404
|
-
if (this.mark)
|
|
125405
|
-
e = this._mark(e)
|
|
125406
|
-
|
|
125407
|
-
if (this.absolute)
|
|
125408
|
-
e = abs
|
|
125409
|
-
|
|
125410
|
-
if (this.matches[index][e])
|
|
125411
|
-
return
|
|
125412
|
-
|
|
125413
|
-
if (this.nodir) {
|
|
125414
|
-
var c = this.cache[abs]
|
|
125415
|
-
if (c === 'DIR' || Array.isArray(c))
|
|
125416
|
-
return
|
|
125417
|
-
}
|
|
125418
|
-
|
|
125419
|
-
this.matches[index][e] = true
|
|
125420
|
-
|
|
125421
|
-
var st = this.statCache[abs]
|
|
125422
|
-
if (st)
|
|
125423
|
-
this.emit('stat', e, st)
|
|
125424
|
-
|
|
125425
|
-
this.emit('match', e)
|
|
125426
|
-
}
|
|
125427
|
-
|
|
125428
|
-
Glob.prototype._readdirInGlobStar = function (abs, cb) {
|
|
125429
|
-
if (this.aborted)
|
|
125430
|
-
return
|
|
125431
|
-
|
|
125432
|
-
// follow all symlinked directories forever
|
|
125433
|
-
// just proceed as if this is a non-globstar situation
|
|
125434
|
-
if (this.follow)
|
|
125435
|
-
return this._readdir(abs, false, cb)
|
|
125436
|
-
|
|
125437
|
-
var lstatkey = 'lstat\0' + abs
|
|
125438
|
-
var self = this
|
|
125439
|
-
var lstatcb = inflight(lstatkey, lstatcb_)
|
|
125440
|
-
|
|
125441
|
-
if (lstatcb)
|
|
125442
|
-
self.fs.lstat(abs, lstatcb)
|
|
125443
|
-
|
|
125444
|
-
function lstatcb_ (er, lstat) {
|
|
125445
|
-
if (er && er.code === 'ENOENT')
|
|
125446
|
-
return cb()
|
|
125447
|
-
|
|
125448
|
-
var isSym = lstat && lstat.isSymbolicLink()
|
|
125449
|
-
self.symlinks[abs] = isSym
|
|
125450
|
-
|
|
125451
|
-
// If it's not a symlink or a dir, then it's definitely a regular file.
|
|
125452
|
-
// don't bother doing a readdir in that case.
|
|
125453
|
-
if (!isSym && lstat && !lstat.isDirectory()) {
|
|
125454
|
-
self.cache[abs] = 'FILE'
|
|
125455
|
-
cb()
|
|
125456
|
-
} else
|
|
125457
|
-
self._readdir(abs, false, cb)
|
|
125458
|
-
}
|
|
125459
|
-
}
|
|
125460
|
-
|
|
125461
|
-
Glob.prototype._readdir = function (abs, inGlobStar, cb) {
|
|
125462
|
-
if (this.aborted)
|
|
125463
|
-
return
|
|
125464
|
-
|
|
125465
|
-
cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
|
|
125466
|
-
if (!cb)
|
|
125467
|
-
return
|
|
125468
|
-
|
|
125469
|
-
//console.error('RD %j %j', +inGlobStar, abs)
|
|
125470
|
-
if (inGlobStar && !ownProp(this.symlinks, abs))
|
|
125471
|
-
return this._readdirInGlobStar(abs, cb)
|
|
125472
|
-
|
|
125473
|
-
if (ownProp(this.cache, abs)) {
|
|
125474
|
-
var c = this.cache[abs]
|
|
125475
|
-
if (!c || c === 'FILE')
|
|
125476
|
-
return cb()
|
|
125477
|
-
|
|
125478
|
-
if (Array.isArray(c))
|
|
125479
|
-
return cb(null, c)
|
|
125480
|
-
}
|
|
125481
|
-
|
|
125482
|
-
var self = this
|
|
125483
|
-
self.fs.readdir(abs, readdirCb(this, abs, cb))
|
|
125484
|
-
}
|
|
125485
|
-
|
|
125486
|
-
function readdirCb (self, abs, cb) {
|
|
125487
|
-
return function (er, entries) {
|
|
125488
|
-
if (er)
|
|
125489
|
-
self._readdirError(abs, er, cb)
|
|
125490
|
-
else
|
|
125491
|
-
self._readdirEntries(abs, entries, cb)
|
|
125492
|
-
}
|
|
125493
|
-
}
|
|
125494
|
-
|
|
125495
|
-
Glob.prototype._readdirEntries = function (abs, entries, cb) {
|
|
125496
|
-
if (this.aborted)
|
|
125497
|
-
return
|
|
125498
|
-
|
|
125499
|
-
// if we haven't asked to stat everything, then just
|
|
125500
|
-
// assume that everything in there exists, so we can avoid
|
|
125501
|
-
// having to stat it a second time.
|
|
125502
|
-
if (!this.mark && !this.stat) {
|
|
125503
|
-
for (var i = 0; i < entries.length; i ++) {
|
|
125504
|
-
var e = entries[i]
|
|
125505
|
-
if (abs === '/')
|
|
125506
|
-
e = abs + e
|
|
125507
|
-
else
|
|
125508
|
-
e = abs + '/' + e
|
|
125509
|
-
this.cache[e] = true
|
|
125510
|
-
}
|
|
125511
|
-
}
|
|
125512
|
-
|
|
125513
|
-
this.cache[abs] = entries
|
|
125514
|
-
return cb(null, entries)
|
|
125515
|
-
}
|
|
125516
|
-
|
|
125517
|
-
Glob.prototype._readdirError = function (f, er, cb) {
|
|
125518
|
-
if (this.aborted)
|
|
125519
|
-
return
|
|
125520
|
-
|
|
125521
|
-
// handle errors, and cache the information
|
|
125522
|
-
switch (er.code) {
|
|
125523
|
-
case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
|
|
125524
|
-
case 'ENOTDIR': // totally normal. means it *does* exist.
|
|
125525
|
-
var abs = this._makeAbs(f)
|
|
125526
|
-
this.cache[abs] = 'FILE'
|
|
125527
|
-
if (abs === this.cwdAbs) {
|
|
125528
|
-
var error = new Error(er.code + ' invalid cwd ' + this.cwd)
|
|
125529
|
-
error.path = this.cwd
|
|
125530
|
-
error.code = er.code
|
|
125531
|
-
this.emit('error', error)
|
|
125532
|
-
this.abort()
|
|
125533
|
-
}
|
|
125534
|
-
break
|
|
125535
|
-
|
|
125536
|
-
case 'ENOENT': // not terribly unusual
|
|
125537
|
-
case 'ELOOP':
|
|
125538
|
-
case 'ENAMETOOLONG':
|
|
125539
|
-
case 'UNKNOWN':
|
|
125540
|
-
this.cache[this._makeAbs(f)] = false
|
|
125541
|
-
break
|
|
125542
|
-
|
|
125543
|
-
default: // some unusual error. Treat as failure.
|
|
125544
|
-
this.cache[this._makeAbs(f)] = false
|
|
125545
|
-
if (this.strict) {
|
|
125546
|
-
this.emit('error', er)
|
|
125547
|
-
// If the error is handled, then we abort
|
|
125548
|
-
// if not, we threw out of here
|
|
125549
|
-
this.abort()
|
|
125550
|
-
}
|
|
125551
|
-
if (!this.silent)
|
|
125552
|
-
console.error('glob error', er)
|
|
125553
|
-
break
|
|
125554
|
-
}
|
|
125555
|
-
|
|
125556
|
-
return cb()
|
|
125557
|
-
}
|
|
125558
|
-
|
|
125559
|
-
Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
|
|
125560
|
-
var self = this
|
|
125561
|
-
this._readdir(abs, inGlobStar, function (er, entries) {
|
|
125562
|
-
self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
|
|
125563
|
-
})
|
|
125564
|
-
}
|
|
125565
|
-
|
|
125566
|
-
|
|
125567
|
-
Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
|
|
125568
|
-
//console.error('pgs2', prefix, remain[0], entries)
|
|
125569
|
-
|
|
125570
|
-
// no entries means not a dir, so it can never have matches
|
|
125571
|
-
// foo.txt/** doesn't match foo.txt
|
|
125572
|
-
if (!entries)
|
|
125573
|
-
return cb()
|
|
125574
|
-
|
|
125575
|
-
// test without the globstar, and with every child both below
|
|
125576
|
-
// and replacing the globstar.
|
|
125577
|
-
var remainWithoutGlobStar = remain.slice(1)
|
|
125578
|
-
var gspref = prefix ? [ prefix ] : []
|
|
125579
|
-
var noGlobStar = gspref.concat(remainWithoutGlobStar)
|
|
125580
|
-
|
|
125581
|
-
// the noGlobStar pattern exits the inGlobStar state
|
|
125582
|
-
this._process(noGlobStar, index, false, cb)
|
|
125583
|
-
|
|
125584
|
-
var isSym = this.symlinks[abs]
|
|
125585
|
-
var len = entries.length
|
|
125586
|
-
|
|
125587
|
-
// If it's a symlink, and we're in a globstar, then stop
|
|
125588
|
-
if (isSym && inGlobStar)
|
|
125589
|
-
return cb()
|
|
125590
|
-
|
|
125591
|
-
for (var i = 0; i < len; i++) {
|
|
125592
|
-
var e = entries[i]
|
|
125593
|
-
if (e.charAt(0) === '.' && !this.dot)
|
|
125594
|
-
continue
|
|
125595
|
-
|
|
125596
|
-
// these two cases enter the inGlobStar state
|
|
125597
|
-
var instead = gspref.concat(entries[i], remainWithoutGlobStar)
|
|
125598
|
-
this._process(instead, index, true, cb)
|
|
125599
|
-
|
|
125600
|
-
var below = gspref.concat(entries[i], remain)
|
|
125601
|
-
this._process(below, index, true, cb)
|
|
125602
|
-
}
|
|
125603
|
-
|
|
125604
|
-
cb()
|
|
125605
|
-
}
|
|
125606
|
-
|
|
125607
|
-
Glob.prototype._processSimple = function (prefix, index, cb) {
|
|
125608
|
-
// XXX review this. Shouldn't it be doing the mounting etc
|
|
125609
|
-
// before doing stat? kinda weird?
|
|
125610
|
-
var self = this
|
|
125611
|
-
this._stat(prefix, function (er, exists) {
|
|
125612
|
-
self._processSimple2(prefix, index, er, exists, cb)
|
|
125613
|
-
})
|
|
125614
|
-
}
|
|
125615
|
-
Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
|
|
125616
|
-
|
|
125617
|
-
//console.error('ps2', prefix, exists)
|
|
125618
|
-
|
|
125619
|
-
if (!this.matches[index])
|
|
125620
|
-
this.matches[index] = Object.create(null)
|
|
125621
|
-
|
|
125622
|
-
// If it doesn't exist, then just mark the lack of results
|
|
125623
|
-
if (!exists)
|
|
125624
|
-
return cb()
|
|
125625
|
-
|
|
125626
|
-
if (prefix && isAbsolute(prefix) && !this.nomount) {
|
|
125627
|
-
var trail = /[\/\\]$/.test(prefix)
|
|
125628
|
-
if (prefix.charAt(0) === '/') {
|
|
125629
|
-
prefix = path.join(this.root, prefix)
|
|
125630
|
-
} else {
|
|
125631
|
-
prefix = path.resolve(this.root, prefix)
|
|
125632
|
-
if (trail)
|
|
125633
|
-
prefix += '/'
|
|
125634
|
-
}
|
|
125635
|
-
}
|
|
125636
|
-
|
|
125637
|
-
if (process.platform === 'win32')
|
|
125638
|
-
prefix = prefix.replace(/\\/g, '/')
|
|
125639
|
-
|
|
125640
|
-
// Mark this as a match
|
|
125641
|
-
this._emitMatch(index, prefix)
|
|
125642
|
-
cb()
|
|
125643
|
-
}
|
|
125644
|
-
|
|
125645
|
-
// Returns either 'DIR', 'FILE', or false
|
|
125646
|
-
Glob.prototype._stat = function (f, cb) {
|
|
125647
|
-
var abs = this._makeAbs(f)
|
|
125648
|
-
var needDir = f.slice(-1) === '/'
|
|
125649
|
-
|
|
125650
|
-
if (f.length > this.maxLength)
|
|
125651
|
-
return cb()
|
|
125652
|
-
|
|
125653
|
-
if (!this.stat && ownProp(this.cache, abs)) {
|
|
125654
|
-
var c = this.cache[abs]
|
|
125655
|
-
|
|
125656
|
-
if (Array.isArray(c))
|
|
125657
|
-
c = 'DIR'
|
|
125658
|
-
|
|
125659
|
-
// It exists, but maybe not how we need it
|
|
125660
|
-
if (!needDir || c === 'DIR')
|
|
125661
|
-
return cb(null, c)
|
|
125662
|
-
|
|
125663
|
-
if (needDir && c === 'FILE')
|
|
125664
|
-
return cb()
|
|
125665
|
-
|
|
125666
|
-
// otherwise we have to stat, because maybe c=true
|
|
125667
|
-
// if we know it exists, but not what it is.
|
|
125668
|
-
}
|
|
125669
|
-
|
|
125670
|
-
var exists
|
|
125671
|
-
var stat = this.statCache[abs]
|
|
125672
|
-
if (stat !== undefined) {
|
|
125673
|
-
if (stat === false)
|
|
125674
|
-
return cb(null, stat)
|
|
125675
|
-
else {
|
|
125676
|
-
var type = stat.isDirectory() ? 'DIR' : 'FILE'
|
|
125677
|
-
if (needDir && type === 'FILE')
|
|
125678
|
-
return cb()
|
|
125679
|
-
else
|
|
125680
|
-
return cb(null, type, stat)
|
|
125681
|
-
}
|
|
125682
|
-
}
|
|
125683
|
-
|
|
125684
|
-
var self = this
|
|
125685
|
-
var statcb = inflight('stat\0' + abs, lstatcb_)
|
|
125686
|
-
if (statcb)
|
|
125687
|
-
self.fs.lstat(abs, statcb)
|
|
125688
|
-
|
|
125689
|
-
function lstatcb_ (er, lstat) {
|
|
125690
|
-
if (lstat && lstat.isSymbolicLink()) {
|
|
125691
|
-
// If it's a symlink, then treat it as the target, unless
|
|
125692
|
-
// the target does not exist, then treat it as a file.
|
|
125693
|
-
return self.fs.stat(abs, function (er, stat) {
|
|
125694
|
-
if (er)
|
|
125695
|
-
self._stat2(f, abs, null, lstat, cb)
|
|
125696
|
-
else
|
|
125697
|
-
self._stat2(f, abs, er, stat, cb)
|
|
125698
|
-
})
|
|
125699
|
-
} else {
|
|
125700
|
-
self._stat2(f, abs, er, lstat, cb)
|
|
125701
|
-
}
|
|
125702
|
-
}
|
|
125703
|
-
}
|
|
125704
|
-
|
|
125705
|
-
Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
|
|
125706
|
-
if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
|
|
125707
|
-
this.statCache[abs] = false
|
|
125708
|
-
return cb()
|
|
125709
|
-
}
|
|
125710
|
-
|
|
125711
|
-
var needDir = f.slice(-1) === '/'
|
|
125712
|
-
this.statCache[abs] = stat
|
|
125713
|
-
|
|
125714
|
-
if (abs.slice(-1) === '/' && stat && !stat.isDirectory())
|
|
125715
|
-
return cb(null, false, stat)
|
|
125716
|
-
|
|
125717
|
-
var c = true
|
|
125718
|
-
if (stat)
|
|
125719
|
-
c = stat.isDirectory() ? 'DIR' : 'FILE'
|
|
125720
|
-
this.cache[abs] = this.cache[abs] || c
|
|
125721
|
-
|
|
125722
|
-
if (needDir && c === 'FILE')
|
|
125723
|
-
return cb()
|
|
125724
|
-
|
|
125725
|
-
return cb(null, c, stat)
|
|
125726
|
-
}
|
|
125727
|
-
|
|
125728
|
-
|
|
125729
|
-
/***/ },
|
|
125730
|
-
|
|
125731
|
-
/***/ "./node_modules/glob/sync.js"
|
|
125732
|
-
/*!***********************************!*\
|
|
125733
|
-
!*** ./node_modules/glob/sync.js ***!
|
|
125734
|
-
\***********************************/
|
|
125735
|
-
(module, __unused_webpack_exports, __webpack_require__) {
|
|
125736
|
-
|
|
125737
|
-
module.exports = globSync
|
|
125738
|
-
globSync.GlobSync = GlobSync
|
|
125739
|
-
|
|
125740
|
-
var rp = __webpack_require__(/*! fs.realpath */ "./node_modules/fs.realpath/index.js")
|
|
125741
|
-
var minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js")
|
|
125742
|
-
var Minimatch = minimatch.Minimatch
|
|
125743
|
-
var Glob = (__webpack_require__(/*! ./glob.js */ "./node_modules/glob/glob.js").Glob)
|
|
125744
|
-
var util = __webpack_require__(/*! util */ "util")
|
|
125745
|
-
var path = __webpack_require__(/*! path */ "path")
|
|
125746
|
-
var assert = __webpack_require__(/*! assert */ "assert")
|
|
125747
|
-
var isAbsolute = __webpack_require__(/*! path-is-absolute */ "./node_modules/path-is-absolute/index.js")
|
|
125748
|
-
var common = __webpack_require__(/*! ./common.js */ "./node_modules/glob/common.js")
|
|
125749
|
-
var setopts = common.setopts
|
|
125750
|
-
var ownProp = common.ownProp
|
|
125751
|
-
var childrenIgnored = common.childrenIgnored
|
|
125752
|
-
var isIgnored = common.isIgnored
|
|
125753
|
-
|
|
125754
|
-
function globSync (pattern, options) {
|
|
125755
|
-
if (typeof options === 'function' || arguments.length === 3)
|
|
125756
|
-
throw new TypeError('callback provided to sync glob\n'+
|
|
125757
|
-
'See: https://github.com/isaacs/node-glob/issues/167')
|
|
125758
|
-
|
|
125759
|
-
return new GlobSync(pattern, options).found
|
|
125760
|
-
}
|
|
125761
|
-
|
|
125762
|
-
function GlobSync (pattern, options) {
|
|
125763
|
-
if (!pattern)
|
|
125764
|
-
throw new Error('must provide pattern')
|
|
125765
|
-
|
|
125766
|
-
if (typeof options === 'function' || arguments.length === 3)
|
|
125767
|
-
throw new TypeError('callback provided to sync glob\n'+
|
|
125768
|
-
'See: https://github.com/isaacs/node-glob/issues/167')
|
|
125769
|
-
|
|
125770
|
-
if (!(this instanceof GlobSync))
|
|
125771
|
-
return new GlobSync(pattern, options)
|
|
125772
|
-
|
|
125773
|
-
setopts(this, pattern, options)
|
|
125774
|
-
|
|
125775
|
-
if (this.noprocess)
|
|
125776
|
-
return this
|
|
125777
|
-
|
|
125778
|
-
var n = this.minimatch.set.length
|
|
125779
|
-
this.matches = new Array(n)
|
|
125780
|
-
for (var i = 0; i < n; i ++) {
|
|
125781
|
-
this._process(this.minimatch.set[i], i, false)
|
|
125782
|
-
}
|
|
125783
|
-
this._finish()
|
|
125784
|
-
}
|
|
125785
|
-
|
|
125786
|
-
GlobSync.prototype._finish = function () {
|
|
125787
|
-
assert(this instanceof GlobSync)
|
|
125788
|
-
if (this.realpath) {
|
|
125789
|
-
var self = this
|
|
125790
|
-
this.matches.forEach(function (matchset, index) {
|
|
125791
|
-
var set = self.matches[index] = Object.create(null)
|
|
125792
|
-
for (var p in matchset) {
|
|
125793
|
-
try {
|
|
125794
|
-
p = self._makeAbs(p)
|
|
125795
|
-
var real = rp.realpathSync(p, self.realpathCache)
|
|
125796
|
-
set[real] = true
|
|
125797
|
-
} catch (er) {
|
|
125798
|
-
if (er.syscall === 'stat')
|
|
125799
|
-
set[self._makeAbs(p)] = true
|
|
125800
|
-
else
|
|
125801
|
-
throw er
|
|
125802
|
-
}
|
|
125803
|
-
}
|
|
125804
|
-
})
|
|
125805
|
-
}
|
|
125806
|
-
common.finish(this)
|
|
125807
|
-
}
|
|
125808
|
-
|
|
125809
|
-
|
|
125810
|
-
GlobSync.prototype._process = function (pattern, index, inGlobStar) {
|
|
125811
|
-
assert(this instanceof GlobSync)
|
|
125812
|
-
|
|
125813
|
-
// Get the first [n] parts of pattern that are all strings.
|
|
125814
|
-
var n = 0
|
|
125815
|
-
while (typeof pattern[n] === 'string') {
|
|
125816
|
-
n ++
|
|
125817
|
-
}
|
|
125818
|
-
// now n is the index of the first one that is *not* a string.
|
|
125819
|
-
|
|
125820
|
-
// See if there's anything else
|
|
125821
|
-
var prefix
|
|
125822
|
-
switch (n) {
|
|
125823
|
-
// if not, then this is rather simple
|
|
125824
|
-
case pattern.length:
|
|
125825
|
-
this._processSimple(pattern.join('/'), index)
|
|
125826
|
-
return
|
|
125827
|
-
|
|
125828
|
-
case 0:
|
|
125829
|
-
// pattern *starts* with some non-trivial item.
|
|
125830
|
-
// going to readdir(cwd), but not include the prefix in matches.
|
|
125831
|
-
prefix = null
|
|
125832
|
-
break
|
|
125833
|
-
|
|
125834
|
-
default:
|
|
125835
|
-
// pattern has some string bits in the front.
|
|
125836
|
-
// whatever it starts with, whether that's 'absolute' like /foo/bar,
|
|
125837
|
-
// or 'relative' like '../baz'
|
|
125838
|
-
prefix = pattern.slice(0, n).join('/')
|
|
125839
|
-
break
|
|
125840
|
-
}
|
|
125841
|
-
|
|
125842
|
-
var remain = pattern.slice(n)
|
|
125843
|
-
|
|
125844
|
-
// get the list of entries.
|
|
125845
|
-
var read
|
|
125846
|
-
if (prefix === null)
|
|
125847
|
-
read = '.'
|
|
125848
|
-
else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
|
|
125849
|
-
if (!prefix || !isAbsolute(prefix))
|
|
125850
|
-
prefix = '/' + prefix
|
|
125851
|
-
read = prefix
|
|
125852
|
-
} else
|
|
125853
|
-
read = prefix
|
|
125854
|
-
|
|
125855
|
-
var abs = this._makeAbs(read)
|
|
125856
|
-
|
|
125857
|
-
//if ignored, skip processing
|
|
125858
|
-
if (childrenIgnored(this, read))
|
|
125859
|
-
return
|
|
125860
|
-
|
|
125861
|
-
var isGlobStar = remain[0] === minimatch.GLOBSTAR
|
|
125862
|
-
if (isGlobStar)
|
|
125863
|
-
this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
|
|
125864
|
-
else
|
|
125865
|
-
this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
|
|
125866
|
-
}
|
|
125867
|
-
|
|
125868
|
-
|
|
125869
|
-
GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
|
|
125870
|
-
var entries = this._readdir(abs, inGlobStar)
|
|
125871
|
-
|
|
125872
|
-
// if the abs isn't a dir, then nothing can match!
|
|
125873
|
-
if (!entries)
|
|
125874
|
-
return
|
|
125875
|
-
|
|
125876
|
-
// It will only match dot entries if it starts with a dot, or if
|
|
125877
|
-
// dot is set. Stuff like @(.foo|.bar) isn't allowed.
|
|
125878
|
-
var pn = remain[0]
|
|
125879
|
-
var negate = !!this.minimatch.negate
|
|
125880
|
-
var rawGlob = pn._glob
|
|
125881
|
-
var dotOk = this.dot || rawGlob.charAt(0) === '.'
|
|
125882
|
-
|
|
125883
|
-
var matchedEntries = []
|
|
125884
|
-
for (var i = 0; i < entries.length; i++) {
|
|
125885
|
-
var e = entries[i]
|
|
125886
|
-
if (e.charAt(0) !== '.' || dotOk) {
|
|
125887
|
-
var m
|
|
125888
|
-
if (negate && !prefix) {
|
|
125889
|
-
m = !e.match(pn)
|
|
125890
|
-
} else {
|
|
125891
|
-
m = e.match(pn)
|
|
125892
|
-
}
|
|
125893
|
-
if (m)
|
|
125894
|
-
matchedEntries.push(e)
|
|
125895
|
-
}
|
|
125896
|
-
}
|
|
125897
|
-
|
|
125898
|
-
var len = matchedEntries.length
|
|
125899
|
-
// If there are no matched entries, then nothing matches.
|
|
125900
|
-
if (len === 0)
|
|
125901
|
-
return
|
|
125902
|
-
|
|
125903
|
-
// if this is the last remaining pattern bit, then no need for
|
|
125904
|
-
// an additional stat *unless* the user has specified mark or
|
|
125905
|
-
// stat explicitly. We know they exist, since readdir returned
|
|
125906
|
-
// them.
|
|
125907
|
-
|
|
125908
|
-
if (remain.length === 1 && !this.mark && !this.stat) {
|
|
125909
|
-
if (!this.matches[index])
|
|
125910
|
-
this.matches[index] = Object.create(null)
|
|
125911
|
-
|
|
125912
|
-
for (var i = 0; i < len; i ++) {
|
|
125913
|
-
var e = matchedEntries[i]
|
|
125914
|
-
if (prefix) {
|
|
125915
|
-
if (prefix.slice(-1) !== '/')
|
|
125916
|
-
e = prefix + '/' + e
|
|
125917
|
-
else
|
|
125918
|
-
e = prefix + e
|
|
125919
|
-
}
|
|
125920
|
-
|
|
125921
|
-
if (e.charAt(0) === '/' && !this.nomount) {
|
|
125922
|
-
e = path.join(this.root, e)
|
|
125923
|
-
}
|
|
125924
|
-
this._emitMatch(index, e)
|
|
125925
|
-
}
|
|
125926
|
-
// This was the last one, and no stats were needed
|
|
125927
|
-
return
|
|
125928
|
-
}
|
|
125929
|
-
|
|
125930
|
-
// now test all matched entries as stand-ins for that part
|
|
125931
|
-
// of the pattern.
|
|
125932
|
-
remain.shift()
|
|
125933
|
-
for (var i = 0; i < len; i ++) {
|
|
125934
|
-
var e = matchedEntries[i]
|
|
125935
|
-
var newPattern
|
|
125936
|
-
if (prefix)
|
|
125937
|
-
newPattern = [prefix, e]
|
|
125938
|
-
else
|
|
125939
|
-
newPattern = [e]
|
|
125940
|
-
this._process(newPattern.concat(remain), index, inGlobStar)
|
|
125941
|
-
}
|
|
125942
|
-
}
|
|
125943
|
-
|
|
125944
|
-
|
|
125945
|
-
GlobSync.prototype._emitMatch = function (index, e) {
|
|
125946
|
-
if (isIgnored(this, e))
|
|
125947
|
-
return
|
|
125948
|
-
|
|
125949
|
-
var abs = this._makeAbs(e)
|
|
125950
|
-
|
|
125951
|
-
if (this.mark)
|
|
125952
|
-
e = this._mark(e)
|
|
125953
|
-
|
|
125954
|
-
if (this.absolute) {
|
|
125955
|
-
e = abs
|
|
125956
|
-
}
|
|
125957
|
-
|
|
125958
|
-
if (this.matches[index][e])
|
|
125959
|
-
return
|
|
125960
|
-
|
|
125961
|
-
if (this.nodir) {
|
|
125962
|
-
var c = this.cache[abs]
|
|
125963
|
-
if (c === 'DIR' || Array.isArray(c))
|
|
125964
|
-
return
|
|
125965
|
-
}
|
|
125966
|
-
|
|
125967
|
-
this.matches[index][e] = true
|
|
125968
|
-
|
|
125969
|
-
if (this.stat)
|
|
125970
|
-
this._stat(e)
|
|
125971
|
-
}
|
|
125972
|
-
|
|
125973
|
-
|
|
125974
|
-
GlobSync.prototype._readdirInGlobStar = function (abs) {
|
|
125975
|
-
// follow all symlinked directories forever
|
|
125976
|
-
// just proceed as if this is a non-globstar situation
|
|
125977
|
-
if (this.follow)
|
|
125978
|
-
return this._readdir(abs, false)
|
|
125979
|
-
|
|
125980
|
-
var entries
|
|
125981
|
-
var lstat
|
|
125982
|
-
var stat
|
|
125983
|
-
try {
|
|
125984
|
-
lstat = this.fs.lstatSync(abs)
|
|
125985
|
-
} catch (er) {
|
|
125986
|
-
if (er.code === 'ENOENT') {
|
|
125987
|
-
// lstat failed, doesn't exist
|
|
125988
|
-
return null
|
|
125989
|
-
}
|
|
125990
|
-
}
|
|
125991
|
-
|
|
125992
|
-
var isSym = lstat && lstat.isSymbolicLink()
|
|
125993
|
-
this.symlinks[abs] = isSym
|
|
125994
|
-
|
|
125995
|
-
// If it's not a symlink or a dir, then it's definitely a regular file.
|
|
125996
|
-
// don't bother doing a readdir in that case.
|
|
125997
|
-
if (!isSym && lstat && !lstat.isDirectory())
|
|
125998
|
-
this.cache[abs] = 'FILE'
|
|
125999
|
-
else
|
|
126000
|
-
entries = this._readdir(abs, false)
|
|
126001
|
-
|
|
126002
|
-
return entries
|
|
126003
|
-
}
|
|
126004
|
-
|
|
126005
|
-
GlobSync.prototype._readdir = function (abs, inGlobStar) {
|
|
126006
|
-
var entries
|
|
126007
|
-
|
|
126008
|
-
if (inGlobStar && !ownProp(this.symlinks, abs))
|
|
126009
|
-
return this._readdirInGlobStar(abs)
|
|
126010
|
-
|
|
126011
|
-
if (ownProp(this.cache, abs)) {
|
|
126012
|
-
var c = this.cache[abs]
|
|
126013
|
-
if (!c || c === 'FILE')
|
|
126014
|
-
return null
|
|
126015
|
-
|
|
126016
|
-
if (Array.isArray(c))
|
|
126017
|
-
return c
|
|
126018
|
-
}
|
|
126019
|
-
|
|
126020
|
-
try {
|
|
126021
|
-
return this._readdirEntries(abs, this.fs.readdirSync(abs))
|
|
126022
|
-
} catch (er) {
|
|
126023
|
-
this._readdirError(abs, er)
|
|
126024
|
-
return null
|
|
126025
|
-
}
|
|
126026
|
-
}
|
|
126027
|
-
|
|
126028
|
-
GlobSync.prototype._readdirEntries = function (abs, entries) {
|
|
126029
|
-
// if we haven't asked to stat everything, then just
|
|
126030
|
-
// assume that everything in there exists, so we can avoid
|
|
126031
|
-
// having to stat it a second time.
|
|
126032
|
-
if (!this.mark && !this.stat) {
|
|
126033
|
-
for (var i = 0; i < entries.length; i ++) {
|
|
126034
|
-
var e = entries[i]
|
|
126035
|
-
if (abs === '/')
|
|
126036
|
-
e = abs + e
|
|
126037
|
-
else
|
|
126038
|
-
e = abs + '/' + e
|
|
126039
|
-
this.cache[e] = true
|
|
126040
|
-
}
|
|
126041
|
-
}
|
|
126042
|
-
|
|
126043
|
-
this.cache[abs] = entries
|
|
126044
|
-
|
|
126045
|
-
// mark and cache dir-ness
|
|
126046
|
-
return entries
|
|
126047
|
-
}
|
|
126048
|
-
|
|
126049
|
-
GlobSync.prototype._readdirError = function (f, er) {
|
|
126050
|
-
// handle errors, and cache the information
|
|
126051
|
-
switch (er.code) {
|
|
126052
|
-
case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
|
|
126053
|
-
case 'ENOTDIR': // totally normal. means it *does* exist.
|
|
126054
|
-
var abs = this._makeAbs(f)
|
|
126055
|
-
this.cache[abs] = 'FILE'
|
|
126056
|
-
if (abs === this.cwdAbs) {
|
|
126057
|
-
var error = new Error(er.code + ' invalid cwd ' + this.cwd)
|
|
126058
|
-
error.path = this.cwd
|
|
126059
|
-
error.code = er.code
|
|
126060
|
-
throw error
|
|
126061
|
-
}
|
|
126062
|
-
break
|
|
126063
|
-
|
|
126064
|
-
case 'ENOENT': // not terribly unusual
|
|
126065
|
-
case 'ELOOP':
|
|
126066
|
-
case 'ENAMETOOLONG':
|
|
126067
|
-
case 'UNKNOWN':
|
|
126068
|
-
this.cache[this._makeAbs(f)] = false
|
|
126069
|
-
break
|
|
126070
|
-
|
|
126071
|
-
default: // some unusual error. Treat as failure.
|
|
126072
|
-
this.cache[this._makeAbs(f)] = false
|
|
126073
|
-
if (this.strict)
|
|
126074
|
-
throw er
|
|
126075
|
-
if (!this.silent)
|
|
126076
|
-
console.error('glob error', er)
|
|
126077
|
-
break
|
|
126078
|
-
}
|
|
126079
|
-
}
|
|
126080
|
-
|
|
126081
|
-
GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
|
|
126082
|
-
|
|
126083
|
-
var entries = this._readdir(abs, inGlobStar)
|
|
126084
|
-
|
|
126085
|
-
// no entries means not a dir, so it can never have matches
|
|
126086
|
-
// foo.txt/** doesn't match foo.txt
|
|
126087
|
-
if (!entries)
|
|
126088
|
-
return
|
|
126089
|
-
|
|
126090
|
-
// test without the globstar, and with every child both below
|
|
126091
|
-
// and replacing the globstar.
|
|
126092
|
-
var remainWithoutGlobStar = remain.slice(1)
|
|
126093
|
-
var gspref = prefix ? [ prefix ] : []
|
|
126094
|
-
var noGlobStar = gspref.concat(remainWithoutGlobStar)
|
|
126095
|
-
|
|
126096
|
-
// the noGlobStar pattern exits the inGlobStar state
|
|
126097
|
-
this._process(noGlobStar, index, false)
|
|
126098
|
-
|
|
126099
|
-
var len = entries.length
|
|
126100
|
-
var isSym = this.symlinks[abs]
|
|
126101
|
-
|
|
126102
|
-
// If it's a symlink, and we're in a globstar, then stop
|
|
126103
|
-
if (isSym && inGlobStar)
|
|
126104
|
-
return
|
|
126105
|
-
|
|
126106
|
-
for (var i = 0; i < len; i++) {
|
|
126107
|
-
var e = entries[i]
|
|
126108
|
-
if (e.charAt(0) === '.' && !this.dot)
|
|
126109
|
-
continue
|
|
126110
|
-
|
|
126111
|
-
// these two cases enter the inGlobStar state
|
|
126112
|
-
var instead = gspref.concat(entries[i], remainWithoutGlobStar)
|
|
126113
|
-
this._process(instead, index, true)
|
|
126114
|
-
|
|
126115
|
-
var below = gspref.concat(entries[i], remain)
|
|
126116
|
-
this._process(below, index, true)
|
|
126117
|
-
}
|
|
126118
|
-
}
|
|
126119
|
-
|
|
126120
|
-
GlobSync.prototype._processSimple = function (prefix, index) {
|
|
126121
|
-
// XXX review this. Shouldn't it be doing the mounting etc
|
|
126122
|
-
// before doing stat? kinda weird?
|
|
126123
|
-
var exists = this._stat(prefix)
|
|
126124
|
-
|
|
126125
|
-
if (!this.matches[index])
|
|
126126
|
-
this.matches[index] = Object.create(null)
|
|
126127
|
-
|
|
126128
|
-
// If it doesn't exist, then just mark the lack of results
|
|
126129
|
-
if (!exists)
|
|
126130
|
-
return
|
|
126131
|
-
|
|
126132
|
-
if (prefix && isAbsolute(prefix) && !this.nomount) {
|
|
126133
|
-
var trail = /[\/\\]$/.test(prefix)
|
|
126134
|
-
if (prefix.charAt(0) === '/') {
|
|
126135
|
-
prefix = path.join(this.root, prefix)
|
|
126136
|
-
} else {
|
|
126137
|
-
prefix = path.resolve(this.root, prefix)
|
|
126138
|
-
if (trail)
|
|
126139
|
-
prefix += '/'
|
|
126140
|
-
}
|
|
126141
|
-
}
|
|
126142
|
-
|
|
126143
|
-
if (process.platform === 'win32')
|
|
126144
|
-
prefix = prefix.replace(/\\/g, '/')
|
|
126145
|
-
|
|
126146
|
-
// Mark this as a match
|
|
126147
|
-
this._emitMatch(index, prefix)
|
|
126148
|
-
}
|
|
126149
|
-
|
|
126150
|
-
// Returns either 'DIR', 'FILE', or false
|
|
126151
|
-
GlobSync.prototype._stat = function (f) {
|
|
126152
|
-
var abs = this._makeAbs(f)
|
|
126153
|
-
var needDir = f.slice(-1) === '/'
|
|
126154
|
-
|
|
126155
|
-
if (f.length > this.maxLength)
|
|
126156
|
-
return false
|
|
126157
|
-
|
|
126158
|
-
if (!this.stat && ownProp(this.cache, abs)) {
|
|
126159
|
-
var c = this.cache[abs]
|
|
126160
|
-
|
|
126161
|
-
if (Array.isArray(c))
|
|
126162
|
-
c = 'DIR'
|
|
126163
|
-
|
|
126164
|
-
// It exists, but maybe not how we need it
|
|
126165
|
-
if (!needDir || c === 'DIR')
|
|
126166
|
-
return c
|
|
126167
|
-
|
|
126168
|
-
if (needDir && c === 'FILE')
|
|
126169
|
-
return false
|
|
126170
|
-
|
|
126171
|
-
// otherwise we have to stat, because maybe c=true
|
|
126172
|
-
// if we know it exists, but not what it is.
|
|
126173
|
-
}
|
|
126174
|
-
|
|
126175
|
-
var exists
|
|
126176
|
-
var stat = this.statCache[abs]
|
|
126177
|
-
if (!stat) {
|
|
126178
|
-
var lstat
|
|
126179
|
-
try {
|
|
126180
|
-
lstat = this.fs.lstatSync(abs)
|
|
126181
|
-
} catch (er) {
|
|
126182
|
-
if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
|
|
126183
|
-
this.statCache[abs] = false
|
|
126184
|
-
return false
|
|
126185
|
-
}
|
|
126186
|
-
}
|
|
126187
|
-
|
|
126188
|
-
if (lstat && lstat.isSymbolicLink()) {
|
|
126189
|
-
try {
|
|
126190
|
-
stat = this.fs.statSync(abs)
|
|
126191
|
-
} catch (er) {
|
|
126192
|
-
stat = lstat
|
|
126193
|
-
}
|
|
126194
|
-
} else {
|
|
126195
|
-
stat = lstat
|
|
126196
|
-
}
|
|
126197
|
-
}
|
|
126198
|
-
|
|
126199
|
-
this.statCache[abs] = stat
|
|
126200
|
-
|
|
126201
|
-
var c = true
|
|
126202
|
-
if (stat)
|
|
126203
|
-
c = stat.isDirectory() ? 'DIR' : 'FILE'
|
|
126204
|
-
|
|
126205
|
-
this.cache[abs] = this.cache[abs] || c
|
|
126206
|
-
|
|
126207
|
-
if (needDir && c === 'FILE')
|
|
126208
|
-
return false
|
|
126209
|
-
|
|
126210
|
-
return c
|
|
126211
|
-
}
|
|
126212
|
-
|
|
126213
|
-
GlobSync.prototype._mark = function (p) {
|
|
126214
|
-
return common.mark(this, p)
|
|
126215
|
-
}
|
|
126216
|
-
|
|
126217
|
-
GlobSync.prototype._makeAbs = function (f) {
|
|
126218
|
-
return common.makeAbs(this, f)
|
|
126219
|
-
}
|
|
126220
|
-
|
|
126221
|
-
|
|
126222
|
-
/***/ },
|
|
126223
|
-
|
|
126224
|
-
/***/ "./node_modules/inflight/inflight.js"
|
|
126225
|
-
/*!*******************************************!*\
|
|
126226
|
-
!*** ./node_modules/inflight/inflight.js ***!
|
|
126227
|
-
\*******************************************/
|
|
126228
|
-
(module, __unused_webpack_exports, __webpack_require__) {
|
|
126229
|
-
|
|
126230
|
-
var wrappy = __webpack_require__(/*! wrappy */ "./node_modules/wrappy/wrappy.js")
|
|
126231
|
-
var reqs = Object.create(null)
|
|
126232
|
-
var once = __webpack_require__(/*! once */ "./node_modules/once/once.js")
|
|
126233
|
-
|
|
126234
|
-
module.exports = wrappy(inflight)
|
|
126235
|
-
|
|
126236
|
-
function inflight (key, cb) {
|
|
126237
|
-
if (reqs[key]) {
|
|
126238
|
-
reqs[key].push(cb)
|
|
126239
|
-
return null
|
|
126240
|
-
} else {
|
|
126241
|
-
reqs[key] = [cb]
|
|
126242
|
-
return makeres(key)
|
|
126243
|
-
}
|
|
126244
|
-
}
|
|
126245
|
-
|
|
126246
|
-
function makeres (key) {
|
|
126247
|
-
return once(function RES () {
|
|
126248
|
-
var cbs = reqs[key]
|
|
126249
|
-
var len = cbs.length
|
|
126250
|
-
var args = slice(arguments)
|
|
126251
|
-
|
|
126252
|
-
// XXX It's somewhat ambiguous whether a new callback added in this
|
|
126253
|
-
// pass should be queued for later execution if something in the
|
|
126254
|
-
// list of callbacks throws, or if it should just be discarded.
|
|
126255
|
-
// However, it's such an edge case that it hardly matters, and either
|
|
126256
|
-
// choice is likely as surprising as the other.
|
|
126257
|
-
// As it happens, we do go ahead and schedule it for later execution.
|
|
126258
|
-
try {
|
|
126259
|
-
for (var i = 0; i < len; i++) {
|
|
126260
|
-
cbs[i].apply(null, args)
|
|
126261
|
-
}
|
|
126262
|
-
} finally {
|
|
126263
|
-
if (cbs.length > len) {
|
|
126264
|
-
// added more in the interim.
|
|
126265
|
-
// de-zalgo, just in case, but don't call again.
|
|
126266
|
-
cbs.splice(0, len)
|
|
126267
|
-
process.nextTick(function () {
|
|
126268
|
-
RES.apply(null, args)
|
|
126269
|
-
})
|
|
126270
|
-
} else {
|
|
126271
|
-
delete reqs[key]
|
|
126272
|
-
}
|
|
126273
|
-
}
|
|
126274
|
-
})
|
|
126275
|
-
}
|
|
126276
|
-
|
|
126277
|
-
function slice (args) {
|
|
126278
|
-
var length = args.length
|
|
126279
|
-
var array = []
|
|
126280
|
-
|
|
126281
|
-
for (var i = 0; i < length; i++) array[i] = args[i]
|
|
126282
|
-
return array
|
|
126283
|
-
}
|
|
126284
|
-
|
|
126285
|
-
|
|
126286
|
-
/***/ },
|
|
126287
|
-
|
|
126288
|
-
/***/ "./node_modules/inherits/inherits.js"
|
|
126289
|
-
/*!*******************************************!*\
|
|
126290
|
-
!*** ./node_modules/inherits/inherits.js ***!
|
|
126291
|
-
\*******************************************/
|
|
126292
|
-
(module, __unused_webpack_exports, __webpack_require__) {
|
|
126293
|
-
|
|
126294
|
-
try {
|
|
126295
|
-
var util = __webpack_require__(/*! util */ "util");
|
|
126296
|
-
/* istanbul ignore next */
|
|
126297
|
-
if (typeof util.inherits !== 'function') throw '';
|
|
126298
|
-
module.exports = util.inherits;
|
|
126299
|
-
} catch (e) {
|
|
126300
|
-
/* istanbul ignore next */
|
|
126301
|
-
module.exports = __webpack_require__(/*! ./inherits_browser.js */ "./node_modules/inherits/inherits_browser.js");
|
|
126302
|
-
}
|
|
126303
|
-
|
|
126304
|
-
|
|
126305
|
-
/***/ },
|
|
126306
|
-
|
|
126307
|
-
/***/ "./node_modules/inherits/inherits_browser.js"
|
|
126308
|
-
/*!***************************************************!*\
|
|
126309
|
-
!*** ./node_modules/inherits/inherits_browser.js ***!
|
|
126310
|
-
\***************************************************/
|
|
126311
|
-
(module) {
|
|
126312
|
-
|
|
126313
|
-
if (typeof Object.create === 'function') {
|
|
126314
|
-
// implementation from standard node.js 'util' module
|
|
126315
|
-
module.exports = function inherits(ctor, superCtor) {
|
|
126316
|
-
if (superCtor) {
|
|
126317
|
-
ctor.super_ = superCtor
|
|
126318
|
-
ctor.prototype = Object.create(superCtor.prototype, {
|
|
126319
|
-
constructor: {
|
|
126320
|
-
value: ctor,
|
|
126321
|
-
enumerable: false,
|
|
126322
|
-
writable: true,
|
|
126323
|
-
configurable: true
|
|
126324
|
-
}
|
|
126325
|
-
})
|
|
126326
|
-
}
|
|
126327
|
-
};
|
|
126328
|
-
} else {
|
|
126329
|
-
// old school shim for old browsers
|
|
126330
|
-
module.exports = function inherits(ctor, superCtor) {
|
|
126331
|
-
if (superCtor) {
|
|
126332
|
-
ctor.super_ = superCtor
|
|
126333
|
-
var TempCtor = function () {}
|
|
126334
|
-
TempCtor.prototype = superCtor.prototype
|
|
126335
|
-
ctor.prototype = new TempCtor()
|
|
126336
|
-
ctor.prototype.constructor = ctor
|
|
126337
|
-
}
|
|
126338
|
-
}
|
|
126339
|
-
}
|
|
126340
|
-
|
|
126341
|
-
|
|
126342
|
-
/***/ },
|
|
126343
|
-
|
|
126344
|
-
/***/ "./node_modules/minimatch/minimatch.js"
|
|
126345
|
-
/*!*********************************************!*\
|
|
126346
|
-
!*** ./node_modules/minimatch/minimatch.js ***!
|
|
126347
|
-
\*********************************************/
|
|
126348
|
-
(module, __unused_webpack_exports, __webpack_require__) {
|
|
126349
|
-
|
|
126350
|
-
module.exports = minimatch
|
|
126351
|
-
minimatch.Minimatch = Minimatch
|
|
126352
|
-
|
|
126353
|
-
var path = (function () { try { return __webpack_require__(/*! path */ "path") } catch (e) {}}()) || {
|
|
126354
|
-
sep: '/'
|
|
126355
|
-
}
|
|
126356
|
-
minimatch.sep = path.sep
|
|
126357
|
-
|
|
126358
|
-
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
|
|
126359
|
-
var expand = __webpack_require__(/*! brace-expansion */ "./node_modules/brace-expansion/index.js")
|
|
126360
|
-
|
|
126361
|
-
var plTypes = {
|
|
126362
|
-
'!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
|
|
126363
|
-
'?': { open: '(?:', close: ')?' },
|
|
126364
|
-
'+': { open: '(?:', close: ')+' },
|
|
126365
|
-
'*': { open: '(?:', close: ')*' },
|
|
126366
|
-
'@': { open: '(?:', close: ')' }
|
|
126367
|
-
}
|
|
126368
|
-
|
|
126369
|
-
// any single thing other than /
|
|
126370
|
-
// don't need to escape / when using new RegExp()
|
|
126371
|
-
var qmark = '[^/]'
|
|
126372
|
-
|
|
126373
|
-
// * => any number of characters
|
|
126374
|
-
var star = qmark + '*?'
|
|
126375
|
-
|
|
126376
|
-
// ** when dots are allowed. Anything goes, except .. and .
|
|
126377
|
-
// not (^ or / followed by one or two dots followed by $ or /),
|
|
126378
|
-
// followed by anything, any number of times.
|
|
126379
|
-
var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
|
|
126380
|
-
|
|
126381
|
-
// not a ^ or / followed by a dot,
|
|
126382
|
-
// followed by anything, any number of times.
|
|
126383
|
-
var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
|
|
126384
|
-
|
|
126385
|
-
// characters that need to be escaped in RegExp.
|
|
126386
|
-
var reSpecials = charSet('().*{}+?[]^$\\!')
|
|
126387
|
-
|
|
126388
|
-
// "abc" -> { a:true, b:true, c:true }
|
|
126389
|
-
function charSet (s) {
|
|
126390
|
-
return s.split('').reduce(function (set, c) {
|
|
126391
|
-
set[c] = true
|
|
126392
|
-
return set
|
|
126393
|
-
}, {})
|
|
126394
|
-
}
|
|
126395
|
-
|
|
126396
|
-
// normalizes slashes.
|
|
126397
|
-
var slashSplit = /\/+/
|
|
126398
|
-
|
|
126399
|
-
minimatch.filter = filter
|
|
126400
|
-
function filter (pattern, options) {
|
|
126401
|
-
options = options || {}
|
|
126402
|
-
return function (p, i, list) {
|
|
126403
|
-
return minimatch(p, pattern, options)
|
|
126404
|
-
}
|
|
126405
|
-
}
|
|
126406
|
-
|
|
126407
|
-
function ext (a, b) {
|
|
126408
|
-
b = b || {}
|
|
126409
|
-
var t = {}
|
|
126410
|
-
Object.keys(a).forEach(function (k) {
|
|
126411
|
-
t[k] = a[k]
|
|
126412
|
-
})
|
|
126413
|
-
Object.keys(b).forEach(function (k) {
|
|
126414
|
-
t[k] = b[k]
|
|
126415
|
-
})
|
|
126416
|
-
return t
|
|
126417
|
-
}
|
|
126418
|
-
|
|
126419
|
-
minimatch.defaults = function (def) {
|
|
126420
|
-
if (!def || typeof def !== 'object' || !Object.keys(def).length) {
|
|
126421
|
-
return minimatch
|
|
126422
|
-
}
|
|
126423
|
-
|
|
126424
|
-
var orig = minimatch
|
|
126425
|
-
|
|
126426
|
-
var m = function minimatch (p, pattern, options) {
|
|
126427
|
-
return orig(p, pattern, ext(def, options))
|
|
126428
|
-
}
|
|
126429
|
-
|
|
126430
|
-
m.Minimatch = function Minimatch (pattern, options) {
|
|
126431
|
-
return new orig.Minimatch(pattern, ext(def, options))
|
|
126432
|
-
}
|
|
126433
|
-
m.Minimatch.defaults = function defaults (options) {
|
|
126434
|
-
return orig.defaults(ext(def, options)).Minimatch
|
|
126435
|
-
}
|
|
126436
|
-
|
|
126437
|
-
m.filter = function filter (pattern, options) {
|
|
126438
|
-
return orig.filter(pattern, ext(def, options))
|
|
126439
|
-
}
|
|
126440
|
-
|
|
126441
|
-
m.defaults = function defaults (options) {
|
|
126442
|
-
return orig.defaults(ext(def, options))
|
|
126443
|
-
}
|
|
126444
|
-
|
|
126445
|
-
m.makeRe = function makeRe (pattern, options) {
|
|
126446
|
-
return orig.makeRe(pattern, ext(def, options))
|
|
126447
|
-
}
|
|
126448
|
-
|
|
126449
|
-
m.braceExpand = function braceExpand (pattern, options) {
|
|
126450
|
-
return orig.braceExpand(pattern, ext(def, options))
|
|
126451
|
-
}
|
|
126452
|
-
|
|
126453
|
-
m.match = function (list, pattern, options) {
|
|
126454
|
-
return orig.match(list, pattern, ext(def, options))
|
|
126455
|
-
}
|
|
126456
|
-
|
|
126457
|
-
return m
|
|
126458
|
-
}
|
|
126459
|
-
|
|
126460
|
-
Minimatch.defaults = function (def) {
|
|
126461
|
-
return minimatch.defaults(def).Minimatch
|
|
126462
|
-
}
|
|
126463
|
-
|
|
126464
|
-
function minimatch (p, pattern, options) {
|
|
126465
|
-
assertValidPattern(pattern)
|
|
126466
|
-
|
|
126467
|
-
if (!options) options = {}
|
|
126468
|
-
|
|
126469
|
-
// shortcut: comments match nothing.
|
|
126470
|
-
if (!options.nocomment && pattern.charAt(0) === '#') {
|
|
126471
|
-
return false
|
|
126472
|
-
}
|
|
126473
|
-
|
|
126474
|
-
return new Minimatch(pattern, options).match(p)
|
|
126475
|
-
}
|
|
126476
|
-
|
|
126477
|
-
function Minimatch (pattern, options) {
|
|
126478
|
-
if (!(this instanceof Minimatch)) {
|
|
126479
|
-
return new Minimatch(pattern, options)
|
|
126480
|
-
}
|
|
126481
|
-
|
|
126482
|
-
assertValidPattern(pattern)
|
|
126483
|
-
|
|
126484
|
-
if (!options) options = {}
|
|
126485
|
-
|
|
126486
|
-
pattern = pattern.trim()
|
|
126487
|
-
|
|
126488
|
-
// windows support: need to use /, not \
|
|
126489
|
-
if (!options.allowWindowsEscape && path.sep !== '/') {
|
|
126490
|
-
pattern = pattern.split(path.sep).join('/')
|
|
126491
|
-
}
|
|
126492
|
-
|
|
126493
|
-
this.options = options
|
|
126494
|
-
this.maxGlobstarRecursion = options.maxGlobstarRecursion !== undefined
|
|
126495
|
-
? options.maxGlobstarRecursion : 200
|
|
126496
|
-
this.set = []
|
|
126497
|
-
this.pattern = pattern
|
|
126498
|
-
this.regexp = null
|
|
126499
|
-
this.negate = false
|
|
126500
|
-
this.comment = false
|
|
126501
|
-
this.empty = false
|
|
126502
|
-
this.partial = !!options.partial
|
|
126503
|
-
|
|
126504
|
-
// make the set of regexps etc.
|
|
126505
|
-
this.make()
|
|
126506
|
-
}
|
|
126507
|
-
|
|
126508
|
-
Minimatch.prototype.debug = function () {}
|
|
126509
|
-
|
|
126510
|
-
Minimatch.prototype.make = make
|
|
126511
|
-
function make () {
|
|
126512
|
-
var pattern = this.pattern
|
|
126513
|
-
var options = this.options
|
|
126514
|
-
|
|
126515
|
-
// empty patterns and comments match nothing.
|
|
126516
|
-
if (!options.nocomment && pattern.charAt(0) === '#') {
|
|
126517
|
-
this.comment = true
|
|
126518
|
-
return
|
|
126519
|
-
}
|
|
126520
|
-
if (!pattern) {
|
|
126521
|
-
this.empty = true
|
|
126522
|
-
return
|
|
126523
|
-
}
|
|
126524
|
-
|
|
126525
|
-
// step 1: figure out negation, etc.
|
|
126526
|
-
this.parseNegate()
|
|
126527
|
-
|
|
126528
|
-
// step 2: expand braces
|
|
126529
|
-
var set = this.globSet = this.braceExpand()
|
|
126530
|
-
|
|
126531
|
-
if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
|
|
126532
|
-
|
|
126533
|
-
this.debug(this.pattern, set)
|
|
126534
|
-
|
|
126535
|
-
// step 3: now we have a set, so turn each one into a series of path-portion
|
|
126536
|
-
// matching patterns.
|
|
126537
|
-
// These will be regexps, except in the case of "**", which is
|
|
126538
|
-
// set to the GLOBSTAR object for globstar behavior,
|
|
126539
|
-
// and will not contain any / characters
|
|
126540
|
-
set = this.globParts = set.map(function (s) {
|
|
126541
|
-
return s.split(slashSplit)
|
|
126542
|
-
})
|
|
126543
|
-
|
|
126544
|
-
this.debug(this.pattern, set)
|
|
126545
|
-
|
|
126546
|
-
// glob --> regexps
|
|
126547
|
-
set = set.map(function (s, si, set) {
|
|
126548
|
-
return s.map(this.parse, this)
|
|
126549
|
-
}, this)
|
|
126550
|
-
|
|
126551
|
-
this.debug(this.pattern, set)
|
|
126552
|
-
|
|
126553
|
-
// filter out everything that didn't compile properly.
|
|
126554
|
-
set = set.filter(function (s) {
|
|
126555
|
-
return s.indexOf(false) === -1
|
|
126556
|
-
})
|
|
126557
|
-
|
|
126558
|
-
this.debug(this.pattern, set)
|
|
126559
|
-
|
|
126560
|
-
this.set = set
|
|
126561
|
-
}
|
|
126562
|
-
|
|
126563
|
-
Minimatch.prototype.parseNegate = parseNegate
|
|
126564
|
-
function parseNegate () {
|
|
126565
|
-
var pattern = this.pattern
|
|
126566
|
-
var negate = false
|
|
126567
|
-
var options = this.options
|
|
126568
|
-
var negateOffset = 0
|
|
126569
|
-
|
|
126570
|
-
if (options.nonegate) return
|
|
126571
|
-
|
|
126572
|
-
for (var i = 0, l = pattern.length
|
|
126573
|
-
; i < l && pattern.charAt(i) === '!'
|
|
126574
|
-
; i++) {
|
|
126575
|
-
negate = !negate
|
|
126576
|
-
negateOffset++
|
|
126577
|
-
}
|
|
126578
|
-
|
|
126579
|
-
if (negateOffset) this.pattern = pattern.substr(negateOffset)
|
|
126580
|
-
this.negate = negate
|
|
126581
|
-
}
|
|
126582
|
-
|
|
126583
|
-
// Brace expansion:
|
|
126584
|
-
// a{b,c}d -> abd acd
|
|
126585
|
-
// a{b,}c -> abc ac
|
|
126586
|
-
// a{0..3}d -> a0d a1d a2d a3d
|
|
126587
|
-
// a{b,c{d,e}f}g -> abg acdfg acefg
|
|
126588
|
-
// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
|
|
126589
|
-
//
|
|
126590
|
-
// Invalid sets are not expanded.
|
|
126591
|
-
// a{2..}b -> a{2..}b
|
|
126592
|
-
// a{b}c -> a{b}c
|
|
126593
|
-
minimatch.braceExpand = function (pattern, options) {
|
|
126594
|
-
return braceExpand(pattern, options)
|
|
126595
|
-
}
|
|
126596
|
-
|
|
126597
|
-
Minimatch.prototype.braceExpand = braceExpand
|
|
126598
|
-
|
|
126599
|
-
function braceExpand (pattern, options) {
|
|
126600
|
-
if (!options) {
|
|
126601
|
-
if (this instanceof Minimatch) {
|
|
126602
|
-
options = this.options
|
|
126603
|
-
} else {
|
|
126604
|
-
options = {}
|
|
126605
|
-
}
|
|
126606
|
-
}
|
|
126607
|
-
|
|
126608
|
-
pattern = typeof pattern === 'undefined'
|
|
126609
|
-
? this.pattern : pattern
|
|
126610
|
-
|
|
126611
|
-
assertValidPattern(pattern)
|
|
126612
|
-
|
|
126613
|
-
// Thanks to Yeting Li <https://github.com/yetingli> for
|
|
126614
|
-
// improving this regexp to avoid a ReDOS vulnerability.
|
|
126615
|
-
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
126616
|
-
// shortcut. no need to expand.
|
|
126617
|
-
return [pattern]
|
|
126618
|
-
}
|
|
126619
|
-
|
|
126620
|
-
return expand(pattern)
|
|
126621
|
-
}
|
|
126622
|
-
|
|
126623
|
-
var MAX_PATTERN_LENGTH = 1024 * 64
|
|
126624
|
-
var assertValidPattern = function (pattern) {
|
|
126625
|
-
if (typeof pattern !== 'string') {
|
|
126626
|
-
throw new TypeError('invalid pattern')
|
|
126627
|
-
}
|
|
126628
|
-
|
|
126629
|
-
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
126630
|
-
throw new TypeError('pattern is too long')
|
|
126631
|
-
}
|
|
126632
|
-
}
|
|
126633
|
-
|
|
126634
|
-
// parse a component of the expanded set.
|
|
126635
|
-
// At this point, no pattern may contain "/" in it
|
|
126636
|
-
// so we're going to return a 2d array, where each entry is the full
|
|
126637
|
-
// pattern, split on '/', and then turned into a regular expression.
|
|
126638
|
-
// A regexp is made at the end which joins each array with an
|
|
126639
|
-
// escaped /, and another full one which joins each regexp with |.
|
|
126640
|
-
//
|
|
126641
|
-
// Following the lead of Bash 4.1, note that "**" only has special meaning
|
|
126642
|
-
// when it is the *only* thing in a path portion. Otherwise, any series
|
|
126643
|
-
// of * is equivalent to a single *. Globstar behavior is enabled by
|
|
126644
|
-
// default, and can be disabled by setting options.noglobstar.
|
|
126645
|
-
Minimatch.prototype.parse = parse
|
|
126646
|
-
var SUBPARSE = {}
|
|
126647
|
-
function parse (pattern, isSub) {
|
|
126648
|
-
assertValidPattern(pattern)
|
|
126649
|
-
|
|
126650
|
-
var options = this.options
|
|
126651
|
-
|
|
126652
|
-
// shortcuts
|
|
126653
|
-
if (pattern === '**') {
|
|
126654
|
-
if (!options.noglobstar)
|
|
126655
|
-
return GLOBSTAR
|
|
126656
|
-
else
|
|
126657
|
-
pattern = '*'
|
|
126658
|
-
}
|
|
126659
|
-
if (pattern === '') return ''
|
|
126660
|
-
|
|
126661
|
-
var re = ''
|
|
126662
|
-
var hasMagic = !!options.nocase
|
|
126663
|
-
var escaping = false
|
|
126664
|
-
// ? => one single character
|
|
126665
|
-
var patternListStack = []
|
|
126666
|
-
var negativeLists = []
|
|
126667
|
-
var stateChar
|
|
126668
|
-
var inClass = false
|
|
126669
|
-
var reClassStart = -1
|
|
126670
|
-
var classStart = -1
|
|
126671
|
-
// . and .. never match anything that doesn't start with .,
|
|
126672
|
-
// even when options.dot is set.
|
|
126673
|
-
var patternStart = pattern.charAt(0) === '.' ? '' // anything
|
|
126674
|
-
// not (start or / followed by . or .. followed by / or end)
|
|
126675
|
-
: options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
|
|
126676
|
-
: '(?!\\.)'
|
|
126677
|
-
var self = this
|
|
126678
|
-
|
|
126679
|
-
function clearStateChar () {
|
|
126680
|
-
if (stateChar) {
|
|
126681
|
-
// we had some state-tracking character
|
|
126682
|
-
// that wasn't consumed by this pass.
|
|
126683
|
-
switch (stateChar) {
|
|
126684
|
-
case '*':
|
|
126685
|
-
re += star
|
|
126686
|
-
hasMagic = true
|
|
126687
|
-
break
|
|
126688
|
-
case '?':
|
|
126689
|
-
re += qmark
|
|
126690
|
-
hasMagic = true
|
|
126691
|
-
break
|
|
126692
|
-
default:
|
|
126693
|
-
re += '\\' + stateChar
|
|
126694
|
-
break
|
|
126695
|
-
}
|
|
126696
|
-
self.debug('clearStateChar %j %j', stateChar, re)
|
|
126697
|
-
stateChar = false
|
|
126698
|
-
}
|
|
126699
|
-
}
|
|
126700
|
-
|
|
126701
|
-
for (var i = 0, len = pattern.length, c
|
|
126702
|
-
; (i < len) && (c = pattern.charAt(i))
|
|
126703
|
-
; i++) {
|
|
126704
|
-
this.debug('%s\t%s %s %j', pattern, i, re, c)
|
|
126705
|
-
|
|
126706
|
-
// skip over any that are escaped.
|
|
126707
|
-
if (escaping && reSpecials[c]) {
|
|
126708
|
-
re += '\\' + c
|
|
126709
|
-
escaping = false
|
|
126710
|
-
continue
|
|
126711
|
-
}
|
|
126712
|
-
|
|
126713
|
-
switch (c) {
|
|
126714
|
-
/* istanbul ignore next */
|
|
126715
|
-
case '/': {
|
|
126716
|
-
// completely not allowed, even escaped.
|
|
126717
|
-
// Should already be path-split by now.
|
|
126718
|
-
return false
|
|
126719
|
-
}
|
|
126720
|
-
|
|
126721
|
-
case '\\':
|
|
126722
|
-
clearStateChar()
|
|
126723
|
-
escaping = true
|
|
126724
|
-
continue
|
|
126725
|
-
|
|
126726
|
-
// the various stateChar values
|
|
126727
|
-
// for the "extglob" stuff.
|
|
126728
|
-
case '?':
|
|
126729
|
-
case '*':
|
|
126730
|
-
case '+':
|
|
126731
|
-
case '@':
|
|
126732
|
-
case '!':
|
|
126733
|
-
this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
|
|
126734
|
-
|
|
126735
|
-
// all of those are literals inside a class, except that
|
|
126736
|
-
// the glob [!a] means [^a] in regexp
|
|
126737
|
-
if (inClass) {
|
|
126738
|
-
this.debug(' in class')
|
|
126739
|
-
if (c === '!' && i === classStart + 1) c = '^'
|
|
126740
|
-
re += c
|
|
126741
|
-
continue
|
|
126742
|
-
}
|
|
126743
|
-
|
|
126744
|
-
// coalesce consecutive non-globstar * characters
|
|
126745
|
-
if (c === '*' && stateChar === '*') continue
|
|
126746
|
-
|
|
126747
|
-
// if we already have a stateChar, then it means
|
|
126748
|
-
// that there was something like ** or +? in there.
|
|
126749
|
-
// Handle the stateChar, then proceed with this one.
|
|
126750
|
-
self.debug('call clearStateChar %j', stateChar)
|
|
126751
|
-
clearStateChar()
|
|
126752
|
-
stateChar = c
|
|
126753
|
-
// if extglob is disabled, then +(asdf|foo) isn't a thing.
|
|
126754
|
-
// just clear the statechar *now*, rather than even diving into
|
|
126755
|
-
// the patternList stuff.
|
|
126756
|
-
if (options.noext) clearStateChar()
|
|
126757
|
-
continue
|
|
126758
|
-
|
|
126759
|
-
case '(':
|
|
126760
|
-
if (inClass) {
|
|
126761
|
-
re += '('
|
|
126762
|
-
continue
|
|
126763
|
-
}
|
|
126764
|
-
|
|
126765
|
-
if (!stateChar) {
|
|
126766
|
-
re += '\\('
|
|
126767
|
-
continue
|
|
126768
|
-
}
|
|
126769
|
-
|
|
126770
|
-
patternListStack.push({
|
|
126771
|
-
type: stateChar,
|
|
126772
|
-
start: i - 1,
|
|
126773
|
-
reStart: re.length,
|
|
126774
|
-
open: plTypes[stateChar].open,
|
|
126775
|
-
close: plTypes[stateChar].close
|
|
126776
|
-
})
|
|
126777
|
-
// negation is (?:(?!js)[^/]*)
|
|
126778
|
-
re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
|
|
126779
|
-
this.debug('plType %j %j', stateChar, re)
|
|
126780
|
-
stateChar = false
|
|
126781
|
-
continue
|
|
126782
|
-
|
|
126783
|
-
case ')':
|
|
126784
|
-
if (inClass || !patternListStack.length) {
|
|
126785
|
-
re += '\\)'
|
|
126786
|
-
continue
|
|
126787
|
-
}
|
|
126788
|
-
|
|
126789
|
-
clearStateChar()
|
|
126790
|
-
hasMagic = true
|
|
126791
|
-
var pl = patternListStack.pop()
|
|
126792
|
-
// negation is (?:(?!js)[^/]*)
|
|
126793
|
-
// The others are (?:<pattern>)<type>
|
|
126794
|
-
re += pl.close
|
|
126795
|
-
if (pl.type === '!') {
|
|
126796
|
-
negativeLists.push(pl)
|
|
126797
|
-
}
|
|
126798
|
-
pl.reEnd = re.length
|
|
126799
|
-
continue
|
|
126800
|
-
|
|
126801
|
-
case '|':
|
|
126802
|
-
if (inClass || !patternListStack.length || escaping) {
|
|
126803
|
-
re += '\\|'
|
|
126804
|
-
escaping = false
|
|
126805
|
-
continue
|
|
126806
|
-
}
|
|
126807
|
-
|
|
126808
|
-
clearStateChar()
|
|
126809
|
-
re += '|'
|
|
126810
|
-
continue
|
|
126811
|
-
|
|
126812
|
-
// these are mostly the same in regexp and glob
|
|
126813
|
-
case '[':
|
|
126814
|
-
// swallow any state-tracking char before the [
|
|
126815
|
-
clearStateChar()
|
|
126816
|
-
|
|
126817
|
-
if (inClass) {
|
|
126818
|
-
re += '\\' + c
|
|
126819
|
-
continue
|
|
126820
|
-
}
|
|
126821
|
-
|
|
126822
|
-
inClass = true
|
|
126823
|
-
classStart = i
|
|
126824
|
-
reClassStart = re.length
|
|
126825
|
-
re += c
|
|
126826
|
-
continue
|
|
126827
|
-
|
|
126828
|
-
case ']':
|
|
126829
|
-
// a right bracket shall lose its special
|
|
126830
|
-
// meaning and represent itself in
|
|
126831
|
-
// a bracket expression if it occurs
|
|
126832
|
-
// first in the list. -- POSIX.2 2.8.3.2
|
|
126833
|
-
if (i === classStart + 1 || !inClass) {
|
|
126834
|
-
re += '\\' + c
|
|
126835
|
-
escaping = false
|
|
126836
|
-
continue
|
|
126837
|
-
}
|
|
126838
|
-
|
|
126839
|
-
// handle the case where we left a class open.
|
|
126840
|
-
// "[z-a]" is valid, equivalent to "\[z-a\]"
|
|
126841
|
-
// split where the last [ was, make sure we don't have
|
|
126842
|
-
// an invalid re. if so, re-walk the contents of the
|
|
126843
|
-
// would-be class to re-translate any characters that
|
|
126844
|
-
// were passed through as-is
|
|
126845
|
-
// TODO: It would probably be faster to determine this
|
|
126846
|
-
// without a try/catch and a new RegExp, but it's tricky
|
|
126847
|
-
// to do safely. For now, this is safe and works.
|
|
126848
|
-
var cs = pattern.substring(classStart + 1, i)
|
|
126849
|
-
try {
|
|
126850
|
-
RegExp('[' + cs + ']')
|
|
126851
|
-
} catch (er) {
|
|
126852
|
-
// not a valid class!
|
|
126853
|
-
var sp = this.parse(cs, SUBPARSE)
|
|
126854
|
-
re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
|
|
126855
|
-
hasMagic = hasMagic || sp[1]
|
|
126856
|
-
inClass = false
|
|
126857
|
-
continue
|
|
126858
|
-
}
|
|
126859
|
-
|
|
126860
|
-
// finish up the class.
|
|
126861
|
-
hasMagic = true
|
|
126862
|
-
inClass = false
|
|
126863
|
-
re += c
|
|
126864
|
-
continue
|
|
126865
|
-
|
|
126866
|
-
default:
|
|
126867
|
-
// swallow any state char that wasn't consumed
|
|
126868
|
-
clearStateChar()
|
|
126869
|
-
|
|
126870
|
-
if (escaping) {
|
|
126871
|
-
// no need
|
|
126872
|
-
escaping = false
|
|
126873
|
-
} else if (reSpecials[c]
|
|
126874
|
-
&& !(c === '^' && inClass)) {
|
|
126875
|
-
re += '\\'
|
|
126876
|
-
}
|
|
126877
|
-
|
|
126878
|
-
re += c
|
|
126879
|
-
|
|
126880
|
-
} // switch
|
|
126881
|
-
} // for
|
|
126882
|
-
|
|
126883
|
-
// handle the case where we left a class open.
|
|
126884
|
-
// "[abc" is valid, equivalent to "\[abc"
|
|
126885
|
-
if (inClass) {
|
|
126886
|
-
// split where the last [ was, and escape it
|
|
126887
|
-
// this is a huge pita. We now have to re-walk
|
|
126888
|
-
// the contents of the would-be class to re-translate
|
|
126889
|
-
// any characters that were passed through as-is
|
|
126890
|
-
cs = pattern.substr(classStart + 1)
|
|
126891
|
-
sp = this.parse(cs, SUBPARSE)
|
|
126892
|
-
re = re.substr(0, reClassStart) + '\\[' + sp[0]
|
|
126893
|
-
hasMagic = hasMagic || sp[1]
|
|
126894
|
-
}
|
|
126895
|
-
|
|
126896
|
-
// handle the case where we had a +( thing at the *end*
|
|
126897
|
-
// of the pattern.
|
|
126898
|
-
// each pattern list stack adds 3 chars, and we need to go through
|
|
126899
|
-
// and escape any | chars that were passed through as-is for the regexp.
|
|
126900
|
-
// Go through and escape them, taking care not to double-escape any
|
|
126901
|
-
// | chars that were already escaped.
|
|
126902
|
-
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
|
|
126903
|
-
var tail = re.slice(pl.reStart + pl.open.length)
|
|
126904
|
-
this.debug('setting tail', re, pl)
|
|
126905
|
-
// maybe some even number of \, then maybe 1 \, followed by a |
|
|
126906
|
-
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
|
|
126907
|
-
if (!$2) {
|
|
126908
|
-
// the | isn't already escaped, so escape it.
|
|
126909
|
-
$2 = '\\'
|
|
126910
|
-
}
|
|
126911
|
-
|
|
126912
|
-
// need to escape all those slashes *again*, without escaping the
|
|
126913
|
-
// one that we need for escaping the | character. As it works out,
|
|
126914
|
-
// escaping an even number of slashes can be done by simply repeating
|
|
126915
|
-
// it exactly after itself. That's why this trick works.
|
|
126916
|
-
//
|
|
126917
|
-
// I am sorry that you have to see this.
|
|
126918
|
-
return $1 + $1 + $2 + '|'
|
|
126919
|
-
})
|
|
126920
|
-
|
|
126921
|
-
this.debug('tail=%j\n %s', tail, tail, pl, re)
|
|
126922
|
-
var t = pl.type === '*' ? star
|
|
126923
|
-
: pl.type === '?' ? qmark
|
|
126924
|
-
: '\\' + pl.type
|
|
126925
|
-
|
|
126926
|
-
hasMagic = true
|
|
126927
|
-
re = re.slice(0, pl.reStart) + t + '\\(' + tail
|
|
126928
|
-
}
|
|
126929
|
-
|
|
126930
|
-
// handle trailing things that only matter at the very end.
|
|
126931
|
-
clearStateChar()
|
|
126932
|
-
if (escaping) {
|
|
126933
|
-
// trailing \\
|
|
126934
|
-
re += '\\\\'
|
|
126935
|
-
}
|
|
126936
|
-
|
|
126937
|
-
// only need to apply the nodot start if the re starts with
|
|
126938
|
-
// something that could conceivably capture a dot
|
|
126939
|
-
var addPatternStart = false
|
|
126940
|
-
switch (re.charAt(0)) {
|
|
126941
|
-
case '[': case '.': case '(': addPatternStart = true
|
|
126942
|
-
}
|
|
126943
|
-
|
|
126944
|
-
// Hack to work around lack of negative lookbehind in JS
|
|
126945
|
-
// A pattern like: *.!(x).!(y|z) needs to ensure that a name
|
|
126946
|
-
// like 'a.xyz.yz' doesn't match. So, the first negative
|
|
126947
|
-
// lookahead, has to look ALL the way ahead, to the end of
|
|
126948
|
-
// the pattern.
|
|
126949
|
-
for (var n = negativeLists.length - 1; n > -1; n--) {
|
|
126950
|
-
var nl = negativeLists[n]
|
|
126951
|
-
|
|
126952
|
-
var nlBefore = re.slice(0, nl.reStart)
|
|
126953
|
-
var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
|
|
126954
|
-
var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
|
|
126955
|
-
var nlAfter = re.slice(nl.reEnd)
|
|
126956
|
-
|
|
126957
|
-
nlLast += nlAfter
|
|
126958
|
-
|
|
126959
|
-
// Handle nested stuff like *(*.js|!(*.json)), where open parens
|
|
126960
|
-
// mean that we should *not* include the ) in the bit that is considered
|
|
126961
|
-
// "after" the negated section.
|
|
126962
|
-
var openParensBefore = nlBefore.split('(').length - 1
|
|
126963
|
-
var cleanAfter = nlAfter
|
|
126964
|
-
for (i = 0; i < openParensBefore; i++) {
|
|
126965
|
-
cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
|
|
126966
|
-
}
|
|
126967
|
-
nlAfter = cleanAfter
|
|
126968
|
-
|
|
126969
|
-
var dollar = ''
|
|
126970
|
-
if (nlAfter === '' && isSub !== SUBPARSE) {
|
|
126971
|
-
dollar = '$'
|
|
126972
|
-
}
|
|
126973
|
-
var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
|
|
126974
|
-
re = newRe
|
|
126975
|
-
}
|
|
126976
|
-
|
|
126977
|
-
// if the re is not "" at this point, then we need to make sure
|
|
126978
|
-
// it doesn't match against an empty path part.
|
|
126979
|
-
// Otherwise a/* will match a/, which it should not.
|
|
126980
|
-
if (re !== '' && hasMagic) {
|
|
126981
|
-
re = '(?=.)' + re
|
|
126982
|
-
}
|
|
126983
|
-
|
|
126984
|
-
if (addPatternStart) {
|
|
126985
|
-
re = patternStart + re
|
|
126986
|
-
}
|
|
126987
|
-
|
|
126988
|
-
// parsing just a piece of a larger pattern.
|
|
126989
|
-
if (isSub === SUBPARSE) {
|
|
126990
|
-
return [re, hasMagic]
|
|
126991
|
-
}
|
|
126992
|
-
|
|
126993
|
-
// skip the regexp for non-magical patterns
|
|
126994
|
-
// unescape anything in it, though, so that it'll be
|
|
126995
|
-
// an exact match against a file etc.
|
|
126996
|
-
if (!hasMagic) {
|
|
126997
|
-
return globUnescape(pattern)
|
|
126998
|
-
}
|
|
126999
|
-
|
|
127000
|
-
var flags = options.nocase ? 'i' : ''
|
|
127001
|
-
try {
|
|
127002
|
-
var regExp = new RegExp('^' + re + '$', flags)
|
|
127003
|
-
} catch (er) /* istanbul ignore next - should be impossible */ {
|
|
127004
|
-
// If it was an invalid regular expression, then it can't match
|
|
127005
|
-
// anything. This trick looks for a character after the end of
|
|
127006
|
-
// the string, which is of course impossible, except in multi-line
|
|
127007
|
-
// mode, but it's not a /m regex.
|
|
127008
|
-
return new RegExp('$.')
|
|
127009
|
-
}
|
|
127010
|
-
|
|
127011
|
-
regExp._glob = pattern
|
|
127012
|
-
regExp._src = re
|
|
127013
|
-
|
|
127014
|
-
return regExp
|
|
127015
|
-
}
|
|
127016
|
-
|
|
127017
|
-
minimatch.makeRe = function (pattern, options) {
|
|
127018
|
-
return new Minimatch(pattern, options || {}).makeRe()
|
|
127019
|
-
}
|
|
127020
|
-
|
|
127021
|
-
Minimatch.prototype.makeRe = makeRe
|
|
127022
|
-
function makeRe () {
|
|
127023
|
-
if (this.regexp || this.regexp === false) return this.regexp
|
|
127024
|
-
|
|
127025
|
-
// at this point, this.set is a 2d array of partial
|
|
127026
|
-
// pattern strings, or "**".
|
|
127027
|
-
//
|
|
127028
|
-
// It's better to use .match(). This function shouldn't
|
|
127029
|
-
// be used, really, but it's pretty convenient sometimes,
|
|
127030
|
-
// when you just want to work with a regex.
|
|
127031
|
-
var set = this.set
|
|
127032
|
-
|
|
127033
|
-
if (!set.length) {
|
|
127034
|
-
this.regexp = false
|
|
127035
|
-
return this.regexp
|
|
127036
|
-
}
|
|
127037
|
-
var options = this.options
|
|
127038
|
-
|
|
127039
|
-
var twoStar = options.noglobstar ? star
|
|
127040
|
-
: options.dot ? twoStarDot
|
|
127041
|
-
: twoStarNoDot
|
|
127042
|
-
var flags = options.nocase ? 'i' : ''
|
|
127043
|
-
|
|
127044
|
-
var re = set.map(function (pattern) {
|
|
127045
|
-
return pattern.map(function (p) {
|
|
127046
|
-
return (p === GLOBSTAR) ? twoStar
|
|
127047
|
-
: (typeof p === 'string') ? regExpEscape(p)
|
|
127048
|
-
: p._src
|
|
127049
|
-
}).join('\\\/')
|
|
127050
|
-
}).join('|')
|
|
127051
|
-
|
|
127052
|
-
// must match entire pattern
|
|
127053
|
-
// ending in a * or ** will make it less strict.
|
|
127054
|
-
re = '^(?:' + re + ')$'
|
|
127055
|
-
|
|
127056
|
-
// can match anything, as long as it's not this.
|
|
127057
|
-
if (this.negate) re = '^(?!' + re + ').*$'
|
|
127058
|
-
|
|
127059
|
-
try {
|
|
127060
|
-
this.regexp = new RegExp(re, flags)
|
|
127061
|
-
} catch (ex) /* istanbul ignore next - should be impossible */ {
|
|
127062
|
-
this.regexp = false
|
|
127063
|
-
}
|
|
127064
|
-
return this.regexp
|
|
127065
|
-
}
|
|
127066
|
-
|
|
127067
|
-
minimatch.match = function (list, pattern, options) {
|
|
127068
|
-
options = options || {}
|
|
127069
|
-
var mm = new Minimatch(pattern, options)
|
|
127070
|
-
list = list.filter(function (f) {
|
|
127071
|
-
return mm.match(f)
|
|
127072
|
-
})
|
|
127073
|
-
if (mm.options.nonull && !list.length) {
|
|
127074
|
-
list.push(pattern)
|
|
127075
|
-
}
|
|
127076
|
-
return list
|
|
127077
|
-
}
|
|
127078
|
-
|
|
127079
|
-
Minimatch.prototype.match = function match (f, partial) {
|
|
127080
|
-
if (typeof partial === 'undefined') partial = this.partial
|
|
127081
|
-
this.debug('match', f, this.pattern)
|
|
127082
|
-
// short-circuit in the case of busted things.
|
|
127083
|
-
// comments, etc.
|
|
127084
|
-
if (this.comment) return false
|
|
127085
|
-
if (this.empty) return f === ''
|
|
127086
|
-
|
|
127087
|
-
if (f === '/' && partial) return true
|
|
127088
|
-
|
|
127089
|
-
var options = this.options
|
|
127090
|
-
|
|
127091
|
-
// windows: need to use /, not \
|
|
127092
|
-
if (path.sep !== '/') {
|
|
127093
|
-
f = f.split(path.sep).join('/')
|
|
127094
|
-
}
|
|
127095
|
-
|
|
127096
|
-
// treat the test path as a set of pathparts.
|
|
127097
|
-
f = f.split(slashSplit)
|
|
127098
|
-
this.debug(this.pattern, 'split', f)
|
|
127099
|
-
|
|
127100
|
-
// just ONE of the pattern sets in this.set needs to match
|
|
127101
|
-
// in order for it to be valid. If negating, then just one
|
|
127102
|
-
// match means that we have failed.
|
|
127103
|
-
// Either way, return on the first hit.
|
|
127104
|
-
|
|
127105
|
-
var set = this.set
|
|
127106
|
-
this.debug(this.pattern, 'set', set)
|
|
127107
|
-
|
|
127108
|
-
// Find the basename of the path by looking for the last non-empty segment
|
|
127109
|
-
var filename
|
|
127110
|
-
var i
|
|
127111
|
-
for (i = f.length - 1; i >= 0; i--) {
|
|
127112
|
-
filename = f[i]
|
|
127113
|
-
if (filename) break
|
|
127114
|
-
}
|
|
127115
|
-
|
|
127116
|
-
for (i = 0; i < set.length; i++) {
|
|
127117
|
-
var pattern = set[i]
|
|
127118
|
-
var file = f
|
|
127119
|
-
if (options.matchBase && pattern.length === 1) {
|
|
127120
|
-
file = [filename]
|
|
127121
|
-
}
|
|
127122
|
-
var hit = this.matchOne(file, pattern, partial)
|
|
127123
|
-
if (hit) {
|
|
127124
|
-
if (options.flipNegate) return true
|
|
127125
|
-
return !this.negate
|
|
127126
|
-
}
|
|
127127
|
-
}
|
|
127128
|
-
|
|
127129
|
-
// didn't get any hits. this is success if it's a negative
|
|
127130
|
-
// pattern, failure otherwise.
|
|
127131
|
-
if (options.flipNegate) return false
|
|
127132
|
-
return this.negate
|
|
127133
|
-
}
|
|
127134
|
-
|
|
127135
|
-
// set partial to true to test if, for example,
|
|
127136
|
-
// "/a/b" matches the start of "/*/b/*/d"
|
|
127137
|
-
// Partial means, if you run out of file before you run
|
|
127138
|
-
// out of pattern, then that's fine, as long as all
|
|
127139
|
-
// the parts match.
|
|
127140
|
-
Minimatch.prototype.matchOne = function (file, pattern, partial) {
|
|
127141
|
-
if (pattern.indexOf(GLOBSTAR) !== -1) {
|
|
127142
|
-
return this._matchGlobstar(file, pattern, partial, 0, 0)
|
|
127143
|
-
}
|
|
127144
|
-
return this._matchOne(file, pattern, partial, 0, 0)
|
|
127145
|
-
}
|
|
127146
|
-
|
|
127147
|
-
Minimatch.prototype._matchGlobstar = function (file, pattern, partial, fileIndex, patternIndex) {
|
|
127148
|
-
var i
|
|
127149
|
-
|
|
127150
|
-
// find first globstar from patternIndex
|
|
127151
|
-
var firstgs = -1
|
|
127152
|
-
for (i = patternIndex; i < pattern.length; i++) {
|
|
127153
|
-
if (pattern[i] === GLOBSTAR) { firstgs = i; break }
|
|
127154
|
-
}
|
|
127155
|
-
|
|
127156
|
-
// find last globstar
|
|
127157
|
-
var lastgs = -1
|
|
127158
|
-
for (i = pattern.length - 1; i >= 0; i--) {
|
|
127159
|
-
if (pattern[i] === GLOBSTAR) { lastgs = i; break }
|
|
127160
|
-
}
|
|
127161
|
-
|
|
127162
|
-
var head = pattern.slice(patternIndex, firstgs)
|
|
127163
|
-
var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs)
|
|
127164
|
-
var tail = partial ? [] : pattern.slice(lastgs + 1)
|
|
127165
|
-
|
|
127166
|
-
// check the head
|
|
127167
|
-
if (head.length) {
|
|
127168
|
-
var fileHead = file.slice(fileIndex, fileIndex + head.length)
|
|
127169
|
-
if (!this._matchOne(fileHead, head, partial, 0, 0)) {
|
|
127170
|
-
return false
|
|
127171
|
-
}
|
|
127172
|
-
fileIndex += head.length
|
|
127173
|
-
}
|
|
127174
|
-
|
|
127175
|
-
// check the tail
|
|
127176
|
-
var fileTailMatch = 0
|
|
127177
|
-
if (tail.length) {
|
|
127178
|
-
if (tail.length + fileIndex > file.length) return false
|
|
127179
|
-
|
|
127180
|
-
var tailStart = file.length - tail.length
|
|
127181
|
-
if (this._matchOne(file, tail, partial, tailStart, 0)) {
|
|
127182
|
-
fileTailMatch = tail.length
|
|
127183
|
-
} else {
|
|
127184
|
-
// affordance for stuff like a/**/* matching a/b/
|
|
127185
|
-
if (file[file.length - 1] !== '' ||
|
|
127186
|
-
fileIndex + tail.length === file.length) {
|
|
127187
|
-
return false
|
|
127188
|
-
}
|
|
127189
|
-
tailStart--
|
|
127190
|
-
if (!this._matchOne(file, tail, partial, tailStart, 0)) {
|
|
127191
|
-
return false
|
|
127192
|
-
}
|
|
127193
|
-
fileTailMatch = tail.length + 1
|
|
127194
|
-
}
|
|
127195
|
-
}
|
|
127196
|
-
|
|
127197
|
-
// if body is empty (single ** between head and tail)
|
|
127198
|
-
if (!body.length) {
|
|
127199
|
-
var sawSome = !!fileTailMatch
|
|
127200
|
-
for (i = fileIndex; i < file.length - fileTailMatch; i++) {
|
|
127201
|
-
var f = String(file[i])
|
|
127202
|
-
sawSome = true
|
|
127203
|
-
if (f === '.' || f === '..' ||
|
|
127204
|
-
(!this.options.dot && f.charAt(0) === '.')) {
|
|
127205
|
-
return false
|
|
127206
|
-
}
|
|
127207
|
-
}
|
|
127208
|
-
return partial || sawSome
|
|
127209
|
-
}
|
|
127210
|
-
|
|
127211
|
-
// split body into segments at each GLOBSTAR
|
|
127212
|
-
var bodySegments = [[[], 0]]
|
|
127213
|
-
var currentBody = bodySegments[0]
|
|
127214
|
-
var nonGsParts = 0
|
|
127215
|
-
var nonGsPartsSums = [0]
|
|
127216
|
-
for (var bi = 0; bi < body.length; bi++) {
|
|
127217
|
-
var b = body[bi]
|
|
127218
|
-
if (b === GLOBSTAR) {
|
|
127219
|
-
nonGsPartsSums.push(nonGsParts)
|
|
127220
|
-
currentBody = [[], 0]
|
|
127221
|
-
bodySegments.push(currentBody)
|
|
127222
|
-
} else {
|
|
127223
|
-
currentBody[0].push(b)
|
|
127224
|
-
nonGsParts++
|
|
127225
|
-
}
|
|
127226
|
-
}
|
|
127227
|
-
|
|
127228
|
-
var idx = bodySegments.length - 1
|
|
127229
|
-
var fileLength = file.length - fileTailMatch
|
|
127230
|
-
for (var si = 0; si < bodySegments.length; si++) {
|
|
127231
|
-
bodySegments[si][1] = fileLength -
|
|
127232
|
-
(nonGsPartsSums[idx--] + bodySegments[si][0].length)
|
|
127233
|
-
}
|
|
127234
|
-
|
|
127235
|
-
return !!this._matchGlobStarBodySections(
|
|
127236
|
-
file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch
|
|
127237
|
-
)
|
|
127238
|
-
}
|
|
127239
|
-
|
|
127240
|
-
// return false for "nope, not matching"
|
|
127241
|
-
// return null for "not matching, cannot keep trying"
|
|
127242
|
-
Minimatch.prototype._matchGlobStarBodySections = function (
|
|
127243
|
-
file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail
|
|
127244
|
-
) {
|
|
127245
|
-
var bs = bodySegments[bodyIndex]
|
|
127246
|
-
if (!bs) {
|
|
127247
|
-
// just make sure there are no bad dots
|
|
127248
|
-
for (var i = fileIndex; i < file.length; i++) {
|
|
127249
|
-
sawTail = true
|
|
127250
|
-
var f = file[i]
|
|
127251
|
-
if (f === '.' || f === '..' ||
|
|
127252
|
-
(!this.options.dot && f.charAt(0) === '.')) {
|
|
127253
|
-
return false
|
|
127254
|
-
}
|
|
127255
|
-
}
|
|
127256
|
-
return sawTail
|
|
127257
|
-
}
|
|
127258
|
-
|
|
127259
|
-
var body = bs[0]
|
|
127260
|
-
var after = bs[1]
|
|
127261
|
-
while (fileIndex <= after) {
|
|
127262
|
-
var m = this._matchOne(
|
|
127263
|
-
file.slice(0, fileIndex + body.length),
|
|
127264
|
-
body,
|
|
127265
|
-
partial,
|
|
127266
|
-
fileIndex,
|
|
127267
|
-
0
|
|
127268
|
-
)
|
|
127269
|
-
// if limit exceeded, no match. intentional false negative,
|
|
127270
|
-
// acceptable break in correctness for security.
|
|
127271
|
-
if (m && globStarDepth < this.maxGlobstarRecursion) {
|
|
127272
|
-
var sub = this._matchGlobStarBodySections(
|
|
127273
|
-
file, bodySegments,
|
|
127274
|
-
fileIndex + body.length, bodyIndex + 1,
|
|
127275
|
-
partial, globStarDepth + 1, sawTail
|
|
127276
|
-
)
|
|
127277
|
-
if (sub !== false) {
|
|
127278
|
-
return sub
|
|
127279
|
-
}
|
|
127280
|
-
}
|
|
127281
|
-
var f = file[fileIndex]
|
|
127282
|
-
if (f === '.' || f === '..' ||
|
|
127283
|
-
(!this.options.dot && f.charAt(0) === '.')) {
|
|
127284
|
-
return false
|
|
127285
|
-
}
|
|
127286
|
-
fileIndex++
|
|
127287
|
-
}
|
|
127288
|
-
return partial || null
|
|
127289
|
-
}
|
|
127290
|
-
|
|
127291
|
-
Minimatch.prototype._matchOne = function (file, pattern, partial, fileIndex, patternIndex) {
|
|
127292
|
-
var fi, pi, fl, pl
|
|
127293
|
-
for (
|
|
127294
|
-
fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length
|
|
127295
|
-
; (fi < fl) && (pi < pl)
|
|
127296
|
-
; fi++, pi++
|
|
127297
|
-
) {
|
|
127298
|
-
this.debug('matchOne loop')
|
|
127299
|
-
var p = pattern[pi]
|
|
127300
|
-
var f = file[fi]
|
|
127301
|
-
|
|
127302
|
-
this.debug(pattern, p, f)
|
|
127303
|
-
|
|
127304
|
-
// should be impossible.
|
|
127305
|
-
// some invalid regexp stuff in the set.
|
|
127306
|
-
/* istanbul ignore if */
|
|
127307
|
-
if (p === false || p === GLOBSTAR) return false
|
|
127308
|
-
|
|
127309
|
-
// something other than **
|
|
127310
|
-
// non-magic patterns just have to match exactly
|
|
127311
|
-
// patterns with magic have been turned into regexps.
|
|
127312
|
-
var hit
|
|
127313
|
-
if (typeof p === 'string') {
|
|
127314
|
-
hit = f === p
|
|
127315
|
-
this.debug('string match', p, f, hit)
|
|
127316
|
-
} else {
|
|
127317
|
-
hit = f.match(p)
|
|
127318
|
-
this.debug('pattern match', p, f, hit)
|
|
127319
|
-
}
|
|
127320
|
-
|
|
127321
|
-
if (!hit) return false
|
|
127322
|
-
}
|
|
127323
|
-
|
|
127324
|
-
// now either we fell off the end of the pattern, or we're done.
|
|
127325
|
-
if (fi === fl && pi === pl) {
|
|
127326
|
-
// ran out of pattern and filename at the same time.
|
|
127327
|
-
// an exact hit!
|
|
127328
|
-
return true
|
|
127329
|
-
} else if (fi === fl) {
|
|
127330
|
-
// ran out of file, but still had pattern left.
|
|
127331
|
-
// this is ok if we're doing the match as part of
|
|
127332
|
-
// a glob fs traversal.
|
|
127333
|
-
return partial
|
|
127334
|
-
} else /* istanbul ignore else */ if (pi === pl) {
|
|
127335
|
-
// ran out of pattern, still have file left.
|
|
127336
|
-
// this is only acceptable if we're on the very last
|
|
127337
|
-
// empty segment of a file with a trailing slash.
|
|
127338
|
-
// a/* should match a/b/
|
|
127339
|
-
return (fi === fl - 1) && (file[fi] === '')
|
|
127340
|
-
}
|
|
127341
|
-
|
|
127342
|
-
// should be unreachable.
|
|
127343
|
-
/* istanbul ignore next */
|
|
127344
|
-
throw new Error('wtf?')
|
|
127345
|
-
}
|
|
127346
|
-
|
|
127347
|
-
// replace stuff like \* with *
|
|
127348
|
-
function globUnescape (s) {
|
|
127349
|
-
return s.replace(/\\(.)/g, '$1')
|
|
127350
|
-
}
|
|
127351
|
-
|
|
127352
|
-
function regExpEscape (s) {
|
|
127353
|
-
return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
|
|
127354
|
-
}
|
|
127355
|
-
|
|
127356
|
-
|
|
127357
|
-
/***/ },
|
|
127358
|
-
|
|
127359
|
-
/***/ "./node_modules/once/once.js"
|
|
127360
|
-
/*!***********************************!*\
|
|
127361
|
-
!*** ./node_modules/once/once.js ***!
|
|
127362
|
-
\***********************************/
|
|
127363
|
-
(module, __unused_webpack_exports, __webpack_require__) {
|
|
127364
|
-
|
|
127365
|
-
var wrappy = __webpack_require__(/*! wrappy */ "./node_modules/wrappy/wrappy.js")
|
|
127366
|
-
module.exports = wrappy(once)
|
|
127367
|
-
module.exports.strict = wrappy(onceStrict)
|
|
127368
|
-
|
|
127369
|
-
once.proto = once(function () {
|
|
127370
|
-
Object.defineProperty(Function.prototype, 'once', {
|
|
127371
|
-
value: function () {
|
|
127372
|
-
return once(this)
|
|
127373
|
-
},
|
|
127374
|
-
configurable: true
|
|
127375
|
-
})
|
|
127376
|
-
|
|
127377
|
-
Object.defineProperty(Function.prototype, 'onceStrict', {
|
|
127378
|
-
value: function () {
|
|
127379
|
-
return onceStrict(this)
|
|
127380
|
-
},
|
|
127381
|
-
configurable: true
|
|
127382
|
-
})
|
|
127383
|
-
})
|
|
127384
|
-
|
|
127385
|
-
function once (fn) {
|
|
127386
|
-
var f = function () {
|
|
127387
|
-
if (f.called) return f.value
|
|
127388
|
-
f.called = true
|
|
127389
|
-
return f.value = fn.apply(this, arguments)
|
|
127390
|
-
}
|
|
127391
|
-
f.called = false
|
|
127392
|
-
return f
|
|
127393
|
-
}
|
|
127394
|
-
|
|
127395
|
-
function onceStrict (fn) {
|
|
127396
|
-
var f = function () {
|
|
127397
|
-
if (f.called)
|
|
127398
|
-
throw new Error(f.onceError)
|
|
127399
|
-
f.called = true
|
|
127400
|
-
return f.value = fn.apply(this, arguments)
|
|
127401
|
-
}
|
|
127402
|
-
var name = fn.name || 'Function wrapped with `once`'
|
|
127403
|
-
f.onceError = name + " shouldn't be called more than once"
|
|
127404
|
-
f.called = false
|
|
127405
|
-
return f
|
|
127406
|
-
}
|
|
127407
|
-
|
|
127408
|
-
|
|
127409
|
-
/***/ },
|
|
127410
|
-
|
|
127411
|
-
/***/ "./node_modules/p-limit/index.js"
|
|
127412
|
-
/*!***************************************!*\
|
|
127413
|
-
!*** ./node_modules/p-limit/index.js ***!
|
|
127414
|
-
\***************************************/
|
|
127415
|
-
(module, __unused_webpack_exports, __webpack_require__) {
|
|
127416
|
-
|
|
127417
|
-
"use strict";
|
|
127418
|
-
|
|
127419
|
-
const Queue = __webpack_require__(/*! yocto-queue */ "./node_modules/yocto-queue/index.js");
|
|
127420
|
-
|
|
127421
|
-
const pLimit = concurrency => {
|
|
127422
|
-
if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
|
|
127423
|
-
throw new TypeError('Expected `concurrency` to be a number from 1 and up');
|
|
127424
|
-
}
|
|
127425
|
-
|
|
127426
|
-
const queue = new Queue();
|
|
127427
|
-
let activeCount = 0;
|
|
127428
|
-
|
|
127429
|
-
const next = () => {
|
|
127430
|
-
activeCount--;
|
|
127431
|
-
|
|
127432
|
-
if (queue.size > 0) {
|
|
127433
|
-
queue.dequeue()();
|
|
127434
|
-
}
|
|
127435
|
-
};
|
|
127436
|
-
|
|
127437
|
-
const run = async (fn, resolve, ...args) => {
|
|
127438
|
-
activeCount++;
|
|
127439
|
-
|
|
127440
|
-
const result = (async () => fn(...args))();
|
|
127441
|
-
|
|
127442
|
-
resolve(result);
|
|
127443
|
-
|
|
127444
|
-
try {
|
|
127445
|
-
await result;
|
|
127446
|
-
} catch {}
|
|
127447
|
-
|
|
127448
|
-
next();
|
|
127449
|
-
};
|
|
127450
|
-
|
|
127451
|
-
const enqueue = (fn, resolve, ...args) => {
|
|
127452
|
-
queue.enqueue(run.bind(null, fn, resolve, ...args));
|
|
127453
|
-
|
|
127454
|
-
(async () => {
|
|
127455
|
-
// This function needs to wait until the next microtask before comparing
|
|
127456
|
-
// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously
|
|
127457
|
-
// when the run function is dequeued and called. The comparison in the if-statement
|
|
127458
|
-
// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.
|
|
127459
|
-
await Promise.resolve();
|
|
127460
|
-
|
|
127461
|
-
if (activeCount < concurrency && queue.size > 0) {
|
|
127462
|
-
queue.dequeue()();
|
|
127463
|
-
}
|
|
127464
|
-
})();
|
|
127465
|
-
};
|
|
127466
|
-
|
|
127467
|
-
const generator = (fn, ...args) => new Promise(resolve => {
|
|
127468
|
-
enqueue(fn, resolve, ...args);
|
|
127469
|
-
});
|
|
127470
|
-
|
|
127471
|
-
Object.defineProperties(generator, {
|
|
127472
|
-
activeCount: {
|
|
127473
|
-
get: () => activeCount
|
|
127474
|
-
},
|
|
127475
|
-
pendingCount: {
|
|
127476
|
-
get: () => queue.size
|
|
127477
|
-
},
|
|
127478
|
-
clearQueue: {
|
|
127479
|
-
value: () => {
|
|
127480
|
-
queue.clear();
|
|
127481
|
-
}
|
|
127482
|
-
}
|
|
127483
|
-
});
|
|
127484
|
-
|
|
127485
|
-
return generator;
|
|
127486
|
-
};
|
|
127487
|
-
|
|
127488
|
-
module.exports = pLimit;
|
|
127489
|
-
|
|
127490
|
-
|
|
127491
|
-
/***/ },
|
|
127492
|
-
|
|
127493
|
-
/***/ "./node_modules/path-is-absolute/index.js"
|
|
127494
|
-
/*!************************************************!*\
|
|
127495
|
-
!*** ./node_modules/path-is-absolute/index.js ***!
|
|
127496
|
-
\************************************************/
|
|
127497
|
-
(module) {
|
|
127498
|
-
|
|
127499
|
-
"use strict";
|
|
127500
|
-
|
|
127501
|
-
|
|
127502
|
-
function posix(path) {
|
|
127503
|
-
return path.charAt(0) === '/';
|
|
127504
|
-
}
|
|
127505
|
-
|
|
127506
|
-
function win32(path) {
|
|
127507
|
-
// https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
|
|
127508
|
-
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
|
127509
|
-
var result = splitDeviceRe.exec(path);
|
|
127510
|
-
var device = result[1] || '';
|
|
127511
|
-
var isUnc = Boolean(device && device.charAt(1) !== ':');
|
|
127512
|
-
|
|
127513
|
-
// UNC paths are always absolute
|
|
127514
|
-
return Boolean(result[2] || isUnc);
|
|
127515
|
-
}
|
|
127516
|
-
|
|
127517
|
-
module.exports = process.platform === 'win32' ? win32 : posix;
|
|
127518
|
-
module.exports.posix = posix;
|
|
127519
|
-
module.exports.win32 = win32;
|
|
127520
|
-
|
|
127521
|
-
|
|
127522
124043
|
/***/ },
|
|
127523
124044
|
|
|
127524
124045
|
/***/ "./node_modules/progress/index.js"
|
|
@@ -129858,7 +126379,7 @@ const isSourceNode = "$$$isSourceNode$$$";
|
|
|
129858
126379
|
class SourceNode {
|
|
129859
126380
|
constructor(aLine, aColumn, aSource, aChunks, aName) {
|
|
129860
126381
|
this.children = [];
|
|
129861
|
-
this.sourceContents =
|
|
126382
|
+
this.sourceContents = Object.create(null);
|
|
129862
126383
|
this.line = aLine == null ? null : aLine;
|
|
129863
126384
|
this.column = aColumn == null ? null : aColumn;
|
|
129864
126385
|
this.source = aSource == null ? null : aSource;
|
|
@@ -130897,138 +127418,6 @@ exports.SourceMapConsumer = __webpack_require__(/*! ./lib/source-map-consumer */
|
|
|
130897
127418
|
exports.SourceNode = __webpack_require__(/*! ./lib/source-node */ "./node_modules/source-map/lib/source-node.js").SourceNode;
|
|
130898
127419
|
|
|
130899
127420
|
|
|
130900
|
-
/***/ },
|
|
130901
|
-
|
|
130902
|
-
/***/ "./node_modules/wrappy/wrappy.js"
|
|
130903
|
-
/*!***************************************!*\
|
|
130904
|
-
!*** ./node_modules/wrappy/wrappy.js ***!
|
|
130905
|
-
\***************************************/
|
|
130906
|
-
(module) {
|
|
130907
|
-
|
|
130908
|
-
// Returns a wrapper function that returns a wrapped callback
|
|
130909
|
-
// The wrapper function should do some stuff, and return a
|
|
130910
|
-
// presumably different callback function.
|
|
130911
|
-
// This makes sure that own properties are retained, so that
|
|
130912
|
-
// decorations and such are not lost along the way.
|
|
130913
|
-
module.exports = wrappy
|
|
130914
|
-
function wrappy (fn, cb) {
|
|
130915
|
-
if (fn && cb) return wrappy(fn)(cb)
|
|
130916
|
-
|
|
130917
|
-
if (typeof fn !== 'function')
|
|
130918
|
-
throw new TypeError('need wrapper function')
|
|
130919
|
-
|
|
130920
|
-
Object.keys(fn).forEach(function (k) {
|
|
130921
|
-
wrapper[k] = fn[k]
|
|
130922
|
-
})
|
|
130923
|
-
|
|
130924
|
-
return wrapper
|
|
130925
|
-
|
|
130926
|
-
function wrapper() {
|
|
130927
|
-
var args = new Array(arguments.length)
|
|
130928
|
-
for (var i = 0; i < args.length; i++) {
|
|
130929
|
-
args[i] = arguments[i]
|
|
130930
|
-
}
|
|
130931
|
-
var ret = fn.apply(this, args)
|
|
130932
|
-
var cb = args[args.length-1]
|
|
130933
|
-
if (typeof ret === 'function' && ret !== cb) {
|
|
130934
|
-
Object.keys(cb).forEach(function (k) {
|
|
130935
|
-
ret[k] = cb[k]
|
|
130936
|
-
})
|
|
130937
|
-
}
|
|
130938
|
-
return ret
|
|
130939
|
-
}
|
|
130940
|
-
}
|
|
130941
|
-
|
|
130942
|
-
|
|
130943
|
-
/***/ },
|
|
130944
|
-
|
|
130945
|
-
/***/ "./node_modules/yocto-queue/index.js"
|
|
130946
|
-
/*!*******************************************!*\
|
|
130947
|
-
!*** ./node_modules/yocto-queue/index.js ***!
|
|
130948
|
-
\*******************************************/
|
|
130949
|
-
(module) {
|
|
130950
|
-
|
|
130951
|
-
class Node {
|
|
130952
|
-
/// value;
|
|
130953
|
-
/// next;
|
|
130954
|
-
|
|
130955
|
-
constructor(value) {
|
|
130956
|
-
this.value = value;
|
|
130957
|
-
|
|
130958
|
-
// TODO: Remove this when targeting Node.js 12.
|
|
130959
|
-
this.next = undefined;
|
|
130960
|
-
}
|
|
130961
|
-
}
|
|
130962
|
-
|
|
130963
|
-
class Queue {
|
|
130964
|
-
// TODO: Use private class fields when targeting Node.js 12.
|
|
130965
|
-
// #_head;
|
|
130966
|
-
// #_tail;
|
|
130967
|
-
// #_size;
|
|
130968
|
-
|
|
130969
|
-
constructor() {
|
|
130970
|
-
this.clear();
|
|
130971
|
-
}
|
|
130972
|
-
|
|
130973
|
-
enqueue(value) {
|
|
130974
|
-
const node = new Node(value);
|
|
130975
|
-
|
|
130976
|
-
if (this._head) {
|
|
130977
|
-
this._tail.next = node;
|
|
130978
|
-
this._tail = node;
|
|
130979
|
-
} else {
|
|
130980
|
-
this._head = node;
|
|
130981
|
-
this._tail = node;
|
|
130982
|
-
}
|
|
130983
|
-
|
|
130984
|
-
this._size++;
|
|
130985
|
-
}
|
|
130986
|
-
|
|
130987
|
-
dequeue() {
|
|
130988
|
-
const current = this._head;
|
|
130989
|
-
if (!current) {
|
|
130990
|
-
return;
|
|
130991
|
-
}
|
|
130992
|
-
|
|
130993
|
-
this._head = this._head.next;
|
|
130994
|
-
this._size--;
|
|
130995
|
-
return current.value;
|
|
130996
|
-
}
|
|
130997
|
-
|
|
130998
|
-
clear() {
|
|
130999
|
-
this._head = undefined;
|
|
131000
|
-
this._tail = undefined;
|
|
131001
|
-
this._size = 0;
|
|
131002
|
-
}
|
|
131003
|
-
|
|
131004
|
-
get size() {
|
|
131005
|
-
return this._size;
|
|
131006
|
-
}
|
|
131007
|
-
|
|
131008
|
-
* [Symbol.iterator]() {
|
|
131009
|
-
let current = this._head;
|
|
131010
|
-
|
|
131011
|
-
while (current) {
|
|
131012
|
-
yield current.value;
|
|
131013
|
-
current = current.next;
|
|
131014
|
-
}
|
|
131015
|
-
}
|
|
131016
|
-
}
|
|
131017
|
-
|
|
131018
|
-
module.exports = Queue;
|
|
131019
|
-
|
|
131020
|
-
|
|
131021
|
-
/***/ },
|
|
131022
|
-
|
|
131023
|
-
/***/ "assert"
|
|
131024
|
-
/*!*************************!*\
|
|
131025
|
-
!*** external "assert" ***!
|
|
131026
|
-
\*************************/
|
|
131027
|
-
(module) {
|
|
131028
|
-
|
|
131029
|
-
"use strict";
|
|
131030
|
-
module.exports = require("assert");
|
|
131031
|
-
|
|
131032
127421
|
/***/ },
|
|
131033
127422
|
|
|
131034
127423
|
/***/ "child_process"
|
|
@@ -131053,17 +127442,6 @@ module.exports = require("crypto");
|
|
|
131053
127442
|
|
|
131054
127443
|
/***/ },
|
|
131055
127444
|
|
|
131056
|
-
/***/ "events"
|
|
131057
|
-
/*!*************************!*\
|
|
131058
|
-
!*** external "events" ***!
|
|
131059
|
-
\*************************/
|
|
131060
|
-
(module) {
|
|
131061
|
-
|
|
131062
|
-
"use strict";
|
|
131063
|
-
module.exports = require("events");
|
|
131064
|
-
|
|
131065
|
-
/***/ },
|
|
131066
|
-
|
|
131067
127445
|
/***/ "fs"
|
|
131068
127446
|
/*!*********************!*\
|
|
131069
127447
|
!*** external "fs" ***!
|
|
@@ -131086,6 +127464,28 @@ module.exports = require("module");
|
|
|
131086
127464
|
|
|
131087
127465
|
/***/ },
|
|
131088
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
|
+
|
|
131089
127489
|
/***/ "node:fs/promises"
|
|
131090
127490
|
/*!***********************************!*\
|
|
131091
127491
|
!*** external "node:fs/promises" ***!
|
|
@@ -131108,6 +127508,50 @@ module.exports = require("node:os");
|
|
|
131108
127508
|
|
|
131109
127509
|
/***/ },
|
|
131110
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
|
+
|
|
131111
127555
|
/***/ "os"
|
|
131112
127556
|
/*!*********************!*\
|
|
131113
127557
|
!*** external "os" ***!
|
|
@@ -131141,17 +127585,6 @@ module.exports = require("url");
|
|
|
131141
127585
|
|
|
131142
127586
|
/***/ },
|
|
131143
127587
|
|
|
131144
|
-
/***/ "util"
|
|
131145
|
-
/*!***********************!*\
|
|
131146
|
-
!*** external "util" ***!
|
|
131147
|
-
\***********************/
|
|
131148
|
-
(module) {
|
|
131149
|
-
|
|
131150
|
-
"use strict";
|
|
131151
|
-
module.exports = require("util");
|
|
131152
|
-
|
|
131153
|
-
/***/ },
|
|
131154
|
-
|
|
131155
127588
|
/***/ "./node_modules/fast-xml-parser/lib/fxp.cjs"
|
|
131156
127589
|
/*!**************************************************!*\
|
|
131157
127590
|
!*** ./node_modules/fast-xml-parser/lib/fxp.cjs ***!
|
|
@@ -131160,6 +127593,21 @@ module.exports = require("util");
|
|
|
131160
127593
|
|
|
131161
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. <script or <script)",pattern:/(?:�*3[Cc];?|�*60;?|<)\s*script/i},{id:"html-entity-obfuscated-javascript",description:'HTML-entity-encoded javascript: (partial — catches common j or j for "j")',pattern:/(?:�*6[Aa];?|�*106;?)\s*(?:�*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 '
'");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,""").replace(/'/g,"'")}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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],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})();
|
|
131162
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>)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
|
+
|
|
131163
127611
|
/***/ },
|
|
131164
127612
|
|
|
131165
127613
|
/***/ "./node_modules/json5/dist/index.mjs"
|
|
@@ -132601,6 +129049,155 @@ var lib = JSON5;
|
|
|
132601
129049
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (lib);
|
|
132602
129050
|
|
|
132603
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
|
+
|
|
132604
129201
|
/***/ },
|
|
132605
129202
|
|
|
132606
129203
|
/***/ "./node_modules/vscode-languageserver-types/lib/esm/main.js"
|
|
@@ -135115,22 +131712,127 @@ var Is;
|
|
|
135115
131712
|
})(Is || (Is = {}));
|
|
135116
131713
|
|
|
135117
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
|
+
|
|
135118
131820
|
/***/ }
|
|
135119
131821
|
|
|
135120
131822
|
/******/ });
|
|
135121
131823
|
/************************************************************************/
|
|
135122
131824
|
/******/ // The module cache
|
|
135123
|
-
/******/
|
|
131825
|
+
/******/ const __webpack_module_cache__ = {};
|
|
135124
131826
|
/******/
|
|
135125
131827
|
/******/ // The require function
|
|
135126
131828
|
/******/ function __webpack_require__(moduleId) {
|
|
135127
131829
|
/******/ // Check if module is in cache
|
|
135128
|
-
/******/
|
|
131830
|
+
/******/ const cachedModule = __webpack_module_cache__[moduleId];
|
|
135129
131831
|
/******/ if (cachedModule !== undefined) {
|
|
135130
131832
|
/******/ return cachedModule.exports;
|
|
135131
131833
|
/******/ }
|
|
135132
131834
|
/******/ // Create a new module (and put it into the cache)
|
|
135133
|
-
/******/
|
|
131835
|
+
/******/ const module = __webpack_module_cache__[moduleId] = {
|
|
135134
131836
|
/******/ // no module.id needed
|
|
135135
131837
|
/******/ // no module.loaded needed
|
|
135136
131838
|
/******/ exports: {}
|
|
@@ -135139,7 +131841,7 @@ var Is;
|
|
|
135139
131841
|
/******/ // Execute the module function
|
|
135140
131842
|
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
135141
131843
|
/******/ delete __webpack_module_cache__[moduleId];
|
|
135142
|
-
/******/
|
|
131844
|
+
/******/ const e = new Error("Cannot find module '" + moduleId + "'");
|
|
135143
131845
|
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
135144
131846
|
/******/ throw e;
|
|
135145
131847
|
/******/ }
|
|
@@ -135151,39 +131853,31 @@ var Is;
|
|
|
135151
131853
|
/******/
|
|
135152
131854
|
/************************************************************************/
|
|
135153
131855
|
/******/ /* webpack/runtime/define property getters */
|
|
135154
|
-
/******/
|
|
135155
|
-
/******/
|
|
135156
|
-
/******/
|
|
135157
|
-
/******/
|
|
135158
|
-
/******/
|
|
135159
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
135160
|
-
/******/ }
|
|
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] });
|
|
135161
131861
|
/******/ }
|
|
135162
|
-
/******/ }
|
|
135163
|
-
/******/ }
|
|
131862
|
+
/******/ }
|
|
131863
|
+
/******/ };
|
|
135164
131864
|
/******/
|
|
135165
131865
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
135166
|
-
/******/ (
|
|
135167
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
135168
|
-
/******/ })();
|
|
131866
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
|
|
135169
131867
|
/******/
|
|
135170
131868
|
/******/ /* webpack/runtime/make namespace object */
|
|
135171
|
-
/******/
|
|
135172
|
-
/******/
|
|
135173
|
-
/******/
|
|
135174
|
-
/******/
|
|
135175
|
-
/******/
|
|
135176
|
-
/******/ }
|
|
135177
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
135178
|
-
/******/ };
|
|
135179
|
-
/******/ })();
|
|
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
|
+
/******/ };
|
|
135180
131874
|
/******/
|
|
135181
131875
|
/************************************************************************/
|
|
135182
131876
|
/******/
|
|
135183
131877
|
/******/ // startup
|
|
135184
131878
|
/******/ // Load entry module and return exports
|
|
135185
131879
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
135186
|
-
/******/
|
|
131880
|
+
/******/ let __webpack_exports__ = __webpack_require__("./build/index.js");
|
|
135187
131881
|
/******/
|
|
135188
131882
|
/******/ })()
|
|
135189
131883
|
;
|