@parcel/utils 2.0.0-nightly.1136 → 2.0.0-nightly.1137
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/lib/index.js +654 -654
- package/lib/index.js.map +1 -1
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -137,7 +137,7 @@ const $304f14c7e435813f$var$isObject = (val)=>val && typeof val === "object" &&
|
|
|
137
137
|
const opts = options || {};
|
|
138
138
|
const posix = $5MQDC.isWindows(options);
|
|
139
139
|
const regex = isState ? $304f14c7e435813f$var$picomatch.compileRe(glob, options) : $304f14c7e435813f$var$picomatch.makeRe(glob, options, false, true);
|
|
140
|
-
const
|
|
140
|
+
const state = regex.state;
|
|
141
141
|
delete regex.state;
|
|
142
142
|
let isIgnored = ()=>false;
|
|
143
143
|
if (opts.ignore) {
|
|
@@ -156,7 +156,7 @@ const $304f14c7e435813f$var$isObject = (val)=>val && typeof val === "object" &&
|
|
|
156
156
|
});
|
|
157
157
|
const result = {
|
|
158
158
|
glob: glob,
|
|
159
|
-
state:
|
|
159
|
+
state: state,
|
|
160
160
|
regex: regex,
|
|
161
161
|
posix: posix,
|
|
162
162
|
input: input,
|
|
@@ -177,7 +177,7 @@ const $304f14c7e435813f$var$isObject = (val)=>val && typeof val === "object" &&
|
|
|
177
177
|
if (typeof opts.onMatch === "function") opts.onMatch(result);
|
|
178
178
|
return returnObject ? result : true;
|
|
179
179
|
};
|
|
180
|
-
if (returnState) matcher.state =
|
|
180
|
+
if (returnState) matcher.state = state;
|
|
181
181
|
return matcher;
|
|
182
182
|
};
|
|
183
183
|
/**
|
|
@@ -665,10 +665,10 @@ const $1e0430853cfb927a$var$depth = (token)=>{
|
|
|
665
665
|
prevIndex = i;
|
|
666
666
|
}
|
|
667
667
|
if (prevIndex && prevIndex + 1 < input.length) {
|
|
668
|
-
const
|
|
669
|
-
parts.push(
|
|
668
|
+
const value1 = input.slice(prevIndex + 1);
|
|
669
|
+
parts.push(value1);
|
|
670
670
|
if (opts.tokens) {
|
|
671
|
-
tokens[tokens.length - 1].value =
|
|
671
|
+
tokens[tokens.length - 1].value = value1;
|
|
672
672
|
$1e0430853cfb927a$var$depth(tokens[tokens.length - 1]);
|
|
673
673
|
state.maxDepth += tokens[tokens.length - 1].depth;
|
|
674
674
|
}
|
|
@@ -968,21 +968,21 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
968
968
|
*/ const $fd5d6f248e5b4a63$var$parse = (input, options)=>{
|
|
969
969
|
if (typeof input !== "string") throw new TypeError("Expected a string");
|
|
970
970
|
input = $fd5d6f248e5b4a63$var$REPLACEMENTS[input] || input;
|
|
971
|
-
const
|
|
971
|
+
const opts = {
|
|
972
972
|
...options
|
|
973
973
|
};
|
|
974
|
-
const max = typeof
|
|
974
|
+
const max = typeof opts.maxLength === "number" ? Math.min($fd5d6f248e5b4a63$var$MAX_LENGTH, opts.maxLength) : $fd5d6f248e5b4a63$var$MAX_LENGTH;
|
|
975
975
|
let len = input.length;
|
|
976
976
|
if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
977
977
|
const bos = {
|
|
978
978
|
type: "bos",
|
|
979
979
|
value: "",
|
|
980
|
-
output:
|
|
980
|
+
output: opts.prepend || ""
|
|
981
981
|
};
|
|
982
982
|
const tokens = [
|
|
983
983
|
bos
|
|
984
984
|
];
|
|
985
|
-
const capture =
|
|
985
|
+
const capture = opts.capture ? "" : "?:";
|
|
986
986
|
const win32 = $5MQDC.isWindows(options);
|
|
987
987
|
// create constants based on platform, for windows or posix
|
|
988
988
|
const PLATFORM_CHARS = $7XmS6.globChars(win32);
|
|
@@ -991,17 +991,17 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
991
991
|
const globstar = (opts)=>{
|
|
992
992
|
return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
|
|
993
993
|
};
|
|
994
|
-
const nodot =
|
|
995
|
-
const qmarkNoDot =
|
|
996
|
-
let star =
|
|
997
|
-
if (
|
|
994
|
+
const nodot = opts.dot ? "" : NO_DOT;
|
|
995
|
+
const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
|
|
996
|
+
let star = opts.bash === true ? globstar(opts) : STAR;
|
|
997
|
+
if (opts.capture) star = `(${star})`;
|
|
998
998
|
// minimatch options support
|
|
999
|
-
if (typeof
|
|
999
|
+
if (typeof opts.noext === "boolean") opts.noextglob = opts.noext;
|
|
1000
1000
|
const state = {
|
|
1001
1001
|
input: input,
|
|
1002
1002
|
index: -1,
|
|
1003
1003
|
start: 0,
|
|
1004
|
-
dot:
|
|
1004
|
+
dot: opts.dot === true,
|
|
1005
1005
|
consumed: "",
|
|
1006
1006
|
output: "",
|
|
1007
1007
|
prefix: "",
|
|
@@ -1020,7 +1020,7 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1020
1020
|
const braces = [];
|
|
1021
1021
|
const stack = [];
|
|
1022
1022
|
let prev = bos;
|
|
1023
|
-
let
|
|
1023
|
+
let value;
|
|
1024
1024
|
/**
|
|
1025
1025
|
* Tokenizing helpers
|
|
1026
1026
|
*/ const eos = ()=>state.index === len - 1;
|
|
@@ -1093,7 +1093,7 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1093
1093
|
token.prev = prev;
|
|
1094
1094
|
token.parens = state.parens;
|
|
1095
1095
|
token.output = state.output;
|
|
1096
|
-
const output = (
|
|
1096
|
+
const output = (opts.capture ? "(" : "") + token.open;
|
|
1097
1097
|
increment("parens");
|
|
1098
1098
|
push({
|
|
1099
1099
|
type: type,
|
|
@@ -1109,11 +1109,11 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1109
1109
|
extglobs.push(token);
|
|
1110
1110
|
};
|
|
1111
1111
|
const extglobClose = (token)=>{
|
|
1112
|
-
let output = token.close + (
|
|
1112
|
+
let output = token.close + (opts.capture ? ")" : "");
|
|
1113
1113
|
let rest;
|
|
1114
1114
|
if (token.type === "negate") {
|
|
1115
1115
|
let extglobStar = star;
|
|
1116
|
-
if (token.inner && token.inner.length > 1 && token.inner.includes("/")) extglobStar = globstar(
|
|
1116
|
+
if (token.inner && token.inner.length > 1 && token.inner.includes("/")) extglobStar = globstar(opts);
|
|
1117
1117
|
if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) output = token.close = `)$))${extglobStar}`;
|
|
1118
1118
|
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) output = token.close = `)${rest})${extglobStar})`;
|
|
1119
1119
|
if (token.prev.type === "bos") state.negatedExtglob = true;
|
|
@@ -1121,14 +1121,14 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1121
1121
|
push({
|
|
1122
1122
|
type: "paren",
|
|
1123
1123
|
extglob: true,
|
|
1124
|
-
value:
|
|
1124
|
+
value: value,
|
|
1125
1125
|
output: output
|
|
1126
1126
|
});
|
|
1127
1127
|
decrement("parens");
|
|
1128
1128
|
};
|
|
1129
1129
|
/**
|
|
1130
1130
|
* Fast paths
|
|
1131
|
-
*/ if (
|
|
1131
|
+
*/ if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
1132
1132
|
let backslashes = false;
|
|
1133
1133
|
let output = input.replace($fd5d6f248e5b4a63$var$REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index)=>{
|
|
1134
1134
|
if (first === "\\") {
|
|
@@ -1148,12 +1148,12 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1148
1148
|
return esc ? m : `\\${m}`;
|
|
1149
1149
|
});
|
|
1150
1150
|
if (backslashes === true) {
|
|
1151
|
-
if (
|
|
1151
|
+
if (opts.unescape === true) output = output.replace(/\\/g, "");
|
|
1152
1152
|
else output = output.replace(/\\+/g, (m)=>{
|
|
1153
1153
|
return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
|
|
1154
1154
|
});
|
|
1155
1155
|
}
|
|
1156
|
-
if (output === input &&
|
|
1156
|
+
if (output === input && opts.contains === true) {
|
|
1157
1157
|
state.output = input;
|
|
1158
1158
|
return state;
|
|
1159
1159
|
}
|
|
@@ -1163,19 +1163,19 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1163
1163
|
/**
|
|
1164
1164
|
* Tokenize input until we reach end-of-string
|
|
1165
1165
|
*/ while(!eos()){
|
|
1166
|
-
|
|
1167
|
-
if (
|
|
1166
|
+
value = advance();
|
|
1167
|
+
if (value === "\0") continue;
|
|
1168
1168
|
/**
|
|
1169
1169
|
* Escaped characters
|
|
1170
|
-
*/ if (
|
|
1170
|
+
*/ if (value === "\\") {
|
|
1171
1171
|
const next = peek();
|
|
1172
|
-
if (next === "/" &&
|
|
1172
|
+
if (next === "/" && opts.bash !== true) continue;
|
|
1173
1173
|
if (next === "." || next === ";") continue;
|
|
1174
1174
|
if (!next) {
|
|
1175
|
-
|
|
1175
|
+
value += "\\";
|
|
1176
1176
|
push({
|
|
1177
1177
|
type: "text",
|
|
1178
|
-
value:
|
|
1178
|
+
value: value
|
|
1179
1179
|
});
|
|
1180
1180
|
continue;
|
|
1181
1181
|
}
|
|
@@ -1185,14 +1185,14 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1185
1185
|
if (match && match[0].length > 2) {
|
|
1186
1186
|
slashes = match[0].length;
|
|
1187
1187
|
state.index += slashes;
|
|
1188
|
-
if (slashes % 2 !== 0)
|
|
1188
|
+
if (slashes % 2 !== 0) value += "\\";
|
|
1189
1189
|
}
|
|
1190
|
-
if (
|
|
1191
|
-
else
|
|
1190
|
+
if (opts.unescape === true) value = advance();
|
|
1191
|
+
else value += advance();
|
|
1192
1192
|
if (state.brackets === 0) {
|
|
1193
1193
|
push({
|
|
1194
1194
|
type: "text",
|
|
1195
|
-
value:
|
|
1195
|
+
value: value
|
|
1196
1196
|
});
|
|
1197
1197
|
continue;
|
|
1198
1198
|
}
|
|
@@ -1200,8 +1200,8 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1200
1200
|
/**
|
|
1201
1201
|
* If we're inside a regex character class, continue
|
|
1202
1202
|
* until we reach the closing bracket.
|
|
1203
|
-
*/ if (state.brackets > 0 && (
|
|
1204
|
-
if (
|
|
1203
|
+
*/ if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
|
|
1204
|
+
if (opts.posix !== false && value === ":") {
|
|
1205
1205
|
const inner = prev.value.slice(1);
|
|
1206
1206
|
if (inner.includes("[")) {
|
|
1207
1207
|
prev.posix = true;
|
|
@@ -1220,48 +1220,48 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
|
-
if (
|
|
1224
|
-
if (
|
|
1225
|
-
if (
|
|
1226
|
-
prev.value +=
|
|
1223
|
+
if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") value = `\\${value}`;
|
|
1224
|
+
if (value === "]" && (prev.value === "[" || prev.value === "[^")) value = `\\${value}`;
|
|
1225
|
+
if (opts.posix === true && value === "!" && prev.value === "[") value = "^";
|
|
1226
|
+
prev.value += value;
|
|
1227
1227
|
append({
|
|
1228
|
-
value:
|
|
1228
|
+
value: value
|
|
1229
1229
|
});
|
|
1230
1230
|
continue;
|
|
1231
1231
|
}
|
|
1232
1232
|
/**
|
|
1233
1233
|
* If we're inside a quoted string, continue
|
|
1234
1234
|
* until we reach the closing double quote.
|
|
1235
|
-
*/ if (state.quotes === 1 &&
|
|
1236
|
-
|
|
1237
|
-
prev.value +=
|
|
1235
|
+
*/ if (state.quotes === 1 && value !== '"') {
|
|
1236
|
+
value = $5MQDC.escapeRegex(value);
|
|
1237
|
+
prev.value += value;
|
|
1238
1238
|
append({
|
|
1239
|
-
value:
|
|
1239
|
+
value: value
|
|
1240
1240
|
});
|
|
1241
1241
|
continue;
|
|
1242
1242
|
}
|
|
1243
1243
|
/**
|
|
1244
1244
|
* Double quotes
|
|
1245
|
-
*/ if (
|
|
1245
|
+
*/ if (value === '"') {
|
|
1246
1246
|
state.quotes = state.quotes === 1 ? 0 : 1;
|
|
1247
|
-
if (
|
|
1247
|
+
if (opts.keepQuotes === true) push({
|
|
1248
1248
|
type: "text",
|
|
1249
|
-
value:
|
|
1249
|
+
value: value
|
|
1250
1250
|
});
|
|
1251
1251
|
continue;
|
|
1252
1252
|
}
|
|
1253
1253
|
/**
|
|
1254
1254
|
* Parentheses
|
|
1255
|
-
*/ if (
|
|
1255
|
+
*/ if (value === "(") {
|
|
1256
1256
|
increment("parens");
|
|
1257
1257
|
push({
|
|
1258
1258
|
type: "paren",
|
|
1259
|
-
value:
|
|
1259
|
+
value: value
|
|
1260
1260
|
});
|
|
1261
1261
|
continue;
|
|
1262
1262
|
}
|
|
1263
|
-
if (
|
|
1264
|
-
if (state.parens === 0 &&
|
|
1263
|
+
if (value === ")") {
|
|
1264
|
+
if (state.parens === 0 && opts.strictBrackets === true) throw new SyntaxError($fd5d6f248e5b4a63$var$syntaxError("opening", "("));
|
|
1265
1265
|
const extglob = extglobs[extglobs.length - 1];
|
|
1266
1266
|
if (extglob && state.parens === extglob.parens + 1) {
|
|
1267
1267
|
extglobClose(extglobs.pop());
|
|
@@ -1269,7 +1269,7 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1269
1269
|
}
|
|
1270
1270
|
push({
|
|
1271
1271
|
type: "paren",
|
|
1272
|
-
value:
|
|
1272
|
+
value: value,
|
|
1273
1273
|
output: state.parens ? ")" : "\\)"
|
|
1274
1274
|
});
|
|
1275
1275
|
decrement("parens");
|
|
@@ -1277,50 +1277,50 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1277
1277
|
}
|
|
1278
1278
|
/**
|
|
1279
1279
|
* Square brackets
|
|
1280
|
-
*/ if (
|
|
1281
|
-
if (
|
|
1282
|
-
if (
|
|
1283
|
-
|
|
1280
|
+
*/ if (value === "[") {
|
|
1281
|
+
if (opts.nobracket === true || !remaining().includes("]")) {
|
|
1282
|
+
if (opts.nobracket !== true && opts.strictBrackets === true) throw new SyntaxError($fd5d6f248e5b4a63$var$syntaxError("closing", "]"));
|
|
1283
|
+
value = `\\${value}`;
|
|
1284
1284
|
} else increment("brackets");
|
|
1285
1285
|
push({
|
|
1286
1286
|
type: "bracket",
|
|
1287
|
-
value:
|
|
1287
|
+
value: value
|
|
1288
1288
|
});
|
|
1289
1289
|
continue;
|
|
1290
1290
|
}
|
|
1291
|
-
if (
|
|
1292
|
-
if (
|
|
1291
|
+
if (value === "]") {
|
|
1292
|
+
if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
|
|
1293
1293
|
push({
|
|
1294
1294
|
type: "text",
|
|
1295
|
-
value:
|
|
1296
|
-
output: `\\${
|
|
1295
|
+
value: value,
|
|
1296
|
+
output: `\\${value}`
|
|
1297
1297
|
});
|
|
1298
1298
|
continue;
|
|
1299
1299
|
}
|
|
1300
1300
|
if (state.brackets === 0) {
|
|
1301
|
-
if (
|
|
1301
|
+
if (opts.strictBrackets === true) throw new SyntaxError($fd5d6f248e5b4a63$var$syntaxError("opening", "["));
|
|
1302
1302
|
push({
|
|
1303
1303
|
type: "text",
|
|
1304
|
-
value:
|
|
1305
|
-
output: `\\${
|
|
1304
|
+
value: value,
|
|
1305
|
+
output: `\\${value}`
|
|
1306
1306
|
});
|
|
1307
1307
|
continue;
|
|
1308
1308
|
}
|
|
1309
1309
|
decrement("brackets");
|
|
1310
1310
|
const prevValue = prev.value.slice(1);
|
|
1311
|
-
if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/"))
|
|
1312
|
-
prev.value +=
|
|
1311
|
+
if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) value = `/${value}`;
|
|
1312
|
+
prev.value += value;
|
|
1313
1313
|
append({
|
|
1314
|
-
value:
|
|
1314
|
+
value: value
|
|
1315
1315
|
});
|
|
1316
1316
|
// when literal brackets are explicitly disabled
|
|
1317
1317
|
// assume we should match with a regex character class
|
|
1318
|
-
if (
|
|
1318
|
+
if (opts.literalBrackets === false || $5MQDC.hasRegexChars(prevValue)) continue;
|
|
1319
1319
|
const escaped = $5MQDC.escapeRegex(prev.value);
|
|
1320
1320
|
state.output = state.output.slice(0, -prev.value.length);
|
|
1321
1321
|
// when literal brackets are explicitly enabled
|
|
1322
1322
|
// assume we should escape the brackets to match literal characters
|
|
1323
|
-
if (
|
|
1323
|
+
if (opts.literalBrackets === true) {
|
|
1324
1324
|
state.output += escaped;
|
|
1325
1325
|
prev.value = escaped;
|
|
1326
1326
|
continue;
|
|
@@ -1332,11 +1332,11 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1332
1332
|
}
|
|
1333
1333
|
/**
|
|
1334
1334
|
* Braces
|
|
1335
|
-
*/ if (
|
|
1335
|
+
*/ if (value === "{" && opts.nobrace !== true) {
|
|
1336
1336
|
increment("braces");
|
|
1337
1337
|
const open = {
|
|
1338
1338
|
type: "brace",
|
|
1339
|
-
value:
|
|
1339
|
+
value: value,
|
|
1340
1340
|
output: "(",
|
|
1341
1341
|
outputIndex: state.output.length,
|
|
1342
1342
|
tokensIndex: state.tokens.length
|
|
@@ -1345,17 +1345,17 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1345
1345
|
push(open);
|
|
1346
1346
|
continue;
|
|
1347
1347
|
}
|
|
1348
|
-
if (
|
|
1348
|
+
if (value === "}") {
|
|
1349
1349
|
const brace = braces[braces.length - 1];
|
|
1350
|
-
if (
|
|
1350
|
+
if (opts.nobrace === true || !brace) {
|
|
1351
1351
|
push({
|
|
1352
1352
|
type: "text",
|
|
1353
|
-
value:
|
|
1354
|
-
output:
|
|
1353
|
+
value: value,
|
|
1354
|
+
output: value
|
|
1355
1355
|
});
|
|
1356
1356
|
continue;
|
|
1357
1357
|
}
|
|
1358
|
-
let
|
|
1358
|
+
let output1 = ")";
|
|
1359
1359
|
if (brace.dots === true) {
|
|
1360
1360
|
const arr = tokens.slice();
|
|
1361
1361
|
const range = [];
|
|
@@ -1364,21 +1364,21 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1364
1364
|
if (arr[i].type === "brace") break;
|
|
1365
1365
|
if (arr[i].type !== "dots") range.unshift(arr[i].value);
|
|
1366
1366
|
}
|
|
1367
|
-
|
|
1367
|
+
output1 = $fd5d6f248e5b4a63$var$expandRange(range, opts);
|
|
1368
1368
|
state.backtrack = true;
|
|
1369
1369
|
}
|
|
1370
1370
|
if (brace.comma !== true && brace.dots !== true) {
|
|
1371
1371
|
const out = state.output.slice(0, brace.outputIndex);
|
|
1372
1372
|
const toks = state.tokens.slice(brace.tokensIndex);
|
|
1373
1373
|
brace.value = brace.output = "\\{";
|
|
1374
|
-
|
|
1374
|
+
value = output1 = "\\}";
|
|
1375
1375
|
state.output = out;
|
|
1376
1376
|
for (const t of toks)state.output += t.output || t.value;
|
|
1377
1377
|
}
|
|
1378
1378
|
push({
|
|
1379
1379
|
type: "brace",
|
|
1380
|
-
value:
|
|
1381
|
-
output:
|
|
1380
|
+
value: value,
|
|
1381
|
+
output: output1
|
|
1382
1382
|
});
|
|
1383
1383
|
decrement("braces");
|
|
1384
1384
|
braces.pop();
|
|
@@ -1386,33 +1386,33 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1386
1386
|
}
|
|
1387
1387
|
/**
|
|
1388
1388
|
* Pipes
|
|
1389
|
-
*/ if (
|
|
1389
|
+
*/ if (value === "|") {
|
|
1390
1390
|
if (extglobs.length > 0) extglobs[extglobs.length - 1].conditions++;
|
|
1391
1391
|
push({
|
|
1392
1392
|
type: "text",
|
|
1393
|
-
value:
|
|
1393
|
+
value: value
|
|
1394
1394
|
});
|
|
1395
1395
|
continue;
|
|
1396
1396
|
}
|
|
1397
1397
|
/**
|
|
1398
1398
|
* Commas
|
|
1399
|
-
*/ if (
|
|
1400
|
-
let
|
|
1401
|
-
const
|
|
1402
|
-
if (
|
|
1403
|
-
|
|
1404
|
-
|
|
1399
|
+
*/ if (value === ",") {
|
|
1400
|
+
let output2 = value;
|
|
1401
|
+
const brace1 = braces[braces.length - 1];
|
|
1402
|
+
if (brace1 && stack[stack.length - 1] === "braces") {
|
|
1403
|
+
brace1.comma = true;
|
|
1404
|
+
output2 = "|";
|
|
1405
1405
|
}
|
|
1406
1406
|
push({
|
|
1407
1407
|
type: "comma",
|
|
1408
|
-
value:
|
|
1409
|
-
output:
|
|
1408
|
+
value: value,
|
|
1409
|
+
output: output2
|
|
1410
1410
|
});
|
|
1411
1411
|
continue;
|
|
1412
1412
|
}
|
|
1413
1413
|
/**
|
|
1414
1414
|
* Slashes
|
|
1415
|
-
*/ if (
|
|
1415
|
+
*/ if (value === "/") {
|
|
1416
1416
|
// if the beginning of the glob is "./", advance the start
|
|
1417
1417
|
// to the current index, and don't add the "./" characters
|
|
1418
1418
|
// to the state. This greatly simplifies lookbehinds when
|
|
@@ -1427,98 +1427,98 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1427
1427
|
}
|
|
1428
1428
|
push({
|
|
1429
1429
|
type: "slash",
|
|
1430
|
-
value:
|
|
1430
|
+
value: value,
|
|
1431
1431
|
output: SLASH_LITERAL
|
|
1432
1432
|
});
|
|
1433
1433
|
continue;
|
|
1434
1434
|
}
|
|
1435
1435
|
/**
|
|
1436
1436
|
* Dots
|
|
1437
|
-
*/ if (
|
|
1437
|
+
*/ if (value === ".") {
|
|
1438
1438
|
if (state.braces > 0 && prev.type === "dot") {
|
|
1439
1439
|
if (prev.value === ".") prev.output = DOT_LITERAL;
|
|
1440
|
-
const
|
|
1440
|
+
const brace2 = braces[braces.length - 1];
|
|
1441
1441
|
prev.type = "dots";
|
|
1442
|
-
prev.output +=
|
|
1443
|
-
prev.value +=
|
|
1444
|
-
|
|
1442
|
+
prev.output += value;
|
|
1443
|
+
prev.value += value;
|
|
1444
|
+
brace2.dots = true;
|
|
1445
1445
|
continue;
|
|
1446
1446
|
}
|
|
1447
1447
|
if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
|
|
1448
1448
|
push({
|
|
1449
1449
|
type: "text",
|
|
1450
|
-
value:
|
|
1450
|
+
value: value,
|
|
1451
1451
|
output: DOT_LITERAL
|
|
1452
1452
|
});
|
|
1453
1453
|
continue;
|
|
1454
1454
|
}
|
|
1455
1455
|
push({
|
|
1456
1456
|
type: "dot",
|
|
1457
|
-
value:
|
|
1457
|
+
value: value,
|
|
1458
1458
|
output: DOT_LITERAL
|
|
1459
1459
|
});
|
|
1460
1460
|
continue;
|
|
1461
1461
|
}
|
|
1462
1462
|
/**
|
|
1463
1463
|
* Question marks
|
|
1464
|
-
*/ if (
|
|
1464
|
+
*/ if (value === "?") {
|
|
1465
1465
|
const isGroup = prev && prev.value === "(";
|
|
1466
|
-
if (!isGroup &&
|
|
1467
|
-
extglobOpen("qmark",
|
|
1466
|
+
if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
|
|
1467
|
+
extglobOpen("qmark", value);
|
|
1468
1468
|
continue;
|
|
1469
1469
|
}
|
|
1470
1470
|
if (prev && prev.type === "paren") {
|
|
1471
|
-
const
|
|
1472
|
-
let
|
|
1473
|
-
if (
|
|
1474
|
-
if (prev.value === "(" && !/[!=<:]/.test(
|
|
1471
|
+
const next1 = peek();
|
|
1472
|
+
let output3 = value;
|
|
1473
|
+
if (next1 === "<" && !$5MQDC.supportsLookbehinds()) throw new Error("Node.js v10 or higher is required for regex lookbehinds");
|
|
1474
|
+
if (prev.value === "(" && !/[!=<:]/.test(next1) || next1 === "<" && !/<([!=]|\w+>)/.test(remaining())) output3 = `\\${value}`;
|
|
1475
1475
|
push({
|
|
1476
1476
|
type: "text",
|
|
1477
|
-
value:
|
|
1478
|
-
output:
|
|
1477
|
+
value: value,
|
|
1478
|
+
output: output3
|
|
1479
1479
|
});
|
|
1480
1480
|
continue;
|
|
1481
1481
|
}
|
|
1482
|
-
if (
|
|
1482
|
+
if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
|
|
1483
1483
|
push({
|
|
1484
1484
|
type: "qmark",
|
|
1485
|
-
value:
|
|
1485
|
+
value: value,
|
|
1486
1486
|
output: QMARK_NO_DOT
|
|
1487
1487
|
});
|
|
1488
1488
|
continue;
|
|
1489
1489
|
}
|
|
1490
1490
|
push({
|
|
1491
1491
|
type: "qmark",
|
|
1492
|
-
value:
|
|
1492
|
+
value: value,
|
|
1493
1493
|
output: QMARK
|
|
1494
1494
|
});
|
|
1495
1495
|
continue;
|
|
1496
1496
|
}
|
|
1497
1497
|
/**
|
|
1498
1498
|
* Exclamation
|
|
1499
|
-
*/ if (
|
|
1500
|
-
if (
|
|
1499
|
+
*/ if (value === "!") {
|
|
1500
|
+
if (opts.noextglob !== true && peek() === "(") {
|
|
1501
1501
|
if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
|
|
1502
|
-
extglobOpen("negate",
|
|
1502
|
+
extglobOpen("negate", value);
|
|
1503
1503
|
continue;
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
|
-
if (
|
|
1506
|
+
if (opts.nonegate !== true && state.index === 0) {
|
|
1507
1507
|
negate();
|
|
1508
1508
|
continue;
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
1511
|
/**
|
|
1512
1512
|
* Plus
|
|
1513
|
-
*/ if (
|
|
1514
|
-
if (
|
|
1515
|
-
extglobOpen("plus",
|
|
1513
|
+
*/ if (value === "+") {
|
|
1514
|
+
if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
|
|
1515
|
+
extglobOpen("plus", value);
|
|
1516
1516
|
continue;
|
|
1517
1517
|
}
|
|
1518
|
-
if (prev && prev.value === "(" ||
|
|
1518
|
+
if (prev && prev.value === "(" || opts.regex === false) {
|
|
1519
1519
|
push({
|
|
1520
1520
|
type: "plus",
|
|
1521
|
-
value:
|
|
1521
|
+
value: value,
|
|
1522
1522
|
output: PLUS_LITERAL
|
|
1523
1523
|
});
|
|
1524
1524
|
continue;
|
|
@@ -1526,7 +1526,7 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1526
1526
|
if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
|
|
1527
1527
|
push({
|
|
1528
1528
|
type: "plus",
|
|
1529
|
-
value:
|
|
1529
|
+
value: value
|
|
1530
1530
|
});
|
|
1531
1531
|
continue;
|
|
1532
1532
|
}
|
|
@@ -1538,34 +1538,34 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1538
1538
|
}
|
|
1539
1539
|
/**
|
|
1540
1540
|
* Plain text
|
|
1541
|
-
*/ if (
|
|
1542
|
-
if (
|
|
1541
|
+
*/ if (value === "@") {
|
|
1542
|
+
if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
|
|
1543
1543
|
push({
|
|
1544
1544
|
type: "at",
|
|
1545
1545
|
extglob: true,
|
|
1546
|
-
value:
|
|
1546
|
+
value: value,
|
|
1547
1547
|
output: ""
|
|
1548
1548
|
});
|
|
1549
1549
|
continue;
|
|
1550
1550
|
}
|
|
1551
1551
|
push({
|
|
1552
1552
|
type: "text",
|
|
1553
|
-
value:
|
|
1553
|
+
value: value
|
|
1554
1554
|
});
|
|
1555
1555
|
continue;
|
|
1556
1556
|
}
|
|
1557
1557
|
/**
|
|
1558
1558
|
* Plain text
|
|
1559
|
-
*/ if (
|
|
1560
|
-
if (
|
|
1561
|
-
const
|
|
1562
|
-
if (
|
|
1563
|
-
|
|
1564
|
-
state.index +=
|
|
1559
|
+
*/ if (value !== "*") {
|
|
1560
|
+
if (value === "$" || value === "^") value = `\\${value}`;
|
|
1561
|
+
const match1 = $fd5d6f248e5b4a63$var$REGEX_NON_SPECIAL_CHARS.exec(remaining());
|
|
1562
|
+
if (match1) {
|
|
1563
|
+
value += match1[0];
|
|
1564
|
+
state.index += match1[0].length;
|
|
1565
1565
|
}
|
|
1566
1566
|
push({
|
|
1567
1567
|
type: "text",
|
|
1568
|
-
value:
|
|
1568
|
+
value: value
|
|
1569
1569
|
});
|
|
1570
1570
|
continue;
|
|
1571
1571
|
}
|
|
@@ -1574,31 +1574,31 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1574
1574
|
*/ if (prev && (prev.type === "globstar" || prev.star === true)) {
|
|
1575
1575
|
prev.type = "star";
|
|
1576
1576
|
prev.star = true;
|
|
1577
|
-
prev.value +=
|
|
1577
|
+
prev.value += value;
|
|
1578
1578
|
prev.output = star;
|
|
1579
1579
|
state.backtrack = true;
|
|
1580
1580
|
state.globstar = true;
|
|
1581
|
-
consume(
|
|
1581
|
+
consume(value);
|
|
1582
1582
|
continue;
|
|
1583
1583
|
}
|
|
1584
|
-
let
|
|
1585
|
-
if (
|
|
1586
|
-
extglobOpen("star",
|
|
1584
|
+
let rest1 = remaining();
|
|
1585
|
+
if (opts.noextglob !== true && /^\([^?]/.test(rest1)) {
|
|
1586
|
+
extglobOpen("star", value);
|
|
1587
1587
|
continue;
|
|
1588
1588
|
}
|
|
1589
1589
|
if (prev.type === "star") {
|
|
1590
|
-
if (
|
|
1591
|
-
consume(
|
|
1590
|
+
if (opts.noglobstar === true) {
|
|
1591
|
+
consume(value);
|
|
1592
1592
|
continue;
|
|
1593
1593
|
}
|
|
1594
1594
|
const prior = prev.prev;
|
|
1595
1595
|
const before = prior.prev;
|
|
1596
1596
|
const isStart = prior.type === "slash" || prior.type === "bos";
|
|
1597
1597
|
const afterStar = before && (before.type === "star" || before.type === "globstar");
|
|
1598
|
-
if (
|
|
1598
|
+
if (opts.bash === true && (!isStart || rest1[0] && rest1[0] !== "/")) {
|
|
1599
1599
|
push({
|
|
1600
1600
|
type: "star",
|
|
1601
|
-
value:
|
|
1601
|
+
value: value,
|
|
1602
1602
|
output: ""
|
|
1603
1603
|
});
|
|
1604
1604
|
continue;
|
|
@@ -1608,48 +1608,48 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1608
1608
|
if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
|
|
1609
1609
|
push({
|
|
1610
1610
|
type: "star",
|
|
1611
|
-
value:
|
|
1611
|
+
value: value,
|
|
1612
1612
|
output: ""
|
|
1613
1613
|
});
|
|
1614
1614
|
continue;
|
|
1615
1615
|
}
|
|
1616
1616
|
// strip consecutive `/**/`
|
|
1617
|
-
while(
|
|
1617
|
+
while(rest1.slice(0, 3) === "/**"){
|
|
1618
1618
|
const after = input[state.index + 4];
|
|
1619
1619
|
if (after && after !== "/") break;
|
|
1620
|
-
|
|
1620
|
+
rest1 = rest1.slice(3);
|
|
1621
1621
|
consume("/**", 3);
|
|
1622
1622
|
}
|
|
1623
1623
|
if (prior.type === "bos" && eos()) {
|
|
1624
1624
|
prev.type = "globstar";
|
|
1625
|
-
prev.value +=
|
|
1626
|
-
prev.output = globstar(
|
|
1625
|
+
prev.value += value;
|
|
1626
|
+
prev.output = globstar(opts);
|
|
1627
1627
|
state.output = prev.output;
|
|
1628
1628
|
state.globstar = true;
|
|
1629
|
-
consume(
|
|
1629
|
+
consume(value);
|
|
1630
1630
|
continue;
|
|
1631
1631
|
}
|
|
1632
1632
|
if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
|
|
1633
1633
|
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
|
1634
1634
|
prior.output = `(?:${prior.output}`;
|
|
1635
1635
|
prev.type = "globstar";
|
|
1636
|
-
prev.output = globstar(
|
|
1637
|
-
prev.value +=
|
|
1636
|
+
prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
|
|
1637
|
+
prev.value += value;
|
|
1638
1638
|
state.globstar = true;
|
|
1639
1639
|
state.output += prior.output + prev.output;
|
|
1640
|
-
consume(
|
|
1640
|
+
consume(value);
|
|
1641
1641
|
continue;
|
|
1642
1642
|
}
|
|
1643
|
-
if (prior.type === "slash" && prior.prev.type !== "bos" &&
|
|
1644
|
-
const end =
|
|
1643
|
+
if (prior.type === "slash" && prior.prev.type !== "bos" && rest1[0] === "/") {
|
|
1644
|
+
const end = rest1[1] !== void 0 ? "|$" : "";
|
|
1645
1645
|
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
|
1646
1646
|
prior.output = `(?:${prior.output}`;
|
|
1647
1647
|
prev.type = "globstar";
|
|
1648
|
-
prev.output = `${globstar(
|
|
1649
|
-
prev.value +=
|
|
1648
|
+
prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
|
|
1649
|
+
prev.value += value;
|
|
1650
1650
|
state.output += prior.output + prev.output;
|
|
1651
1651
|
state.globstar = true;
|
|
1652
|
-
consume(
|
|
1652
|
+
consume(value + advance());
|
|
1653
1653
|
push({
|
|
1654
1654
|
type: "slash",
|
|
1655
1655
|
value: "/",
|
|
@@ -1657,13 +1657,13 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1657
1657
|
});
|
|
1658
1658
|
continue;
|
|
1659
1659
|
}
|
|
1660
|
-
if (prior.type === "bos" &&
|
|
1660
|
+
if (prior.type === "bos" && rest1[0] === "/") {
|
|
1661
1661
|
prev.type = "globstar";
|
|
1662
|
-
prev.value +=
|
|
1663
|
-
prev.output = `(?:^|${SLASH_LITERAL}|${globstar(
|
|
1662
|
+
prev.value += value;
|
|
1663
|
+
prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
|
|
1664
1664
|
state.output = prev.output;
|
|
1665
1665
|
state.globstar = true;
|
|
1666
|
-
consume(
|
|
1666
|
+
consume(value + advance());
|
|
1667
1667
|
push({
|
|
1668
1668
|
type: "slash",
|
|
1669
1669
|
value: "/",
|
|
@@ -1675,27 +1675,27 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1675
1675
|
state.output = state.output.slice(0, -prev.output.length);
|
|
1676
1676
|
// reset previous token to globstar
|
|
1677
1677
|
prev.type = "globstar";
|
|
1678
|
-
prev.output = globstar(
|
|
1679
|
-
prev.value +=
|
|
1678
|
+
prev.output = globstar(opts);
|
|
1679
|
+
prev.value += value;
|
|
1680
1680
|
// reset output with globstar
|
|
1681
1681
|
state.output += prev.output;
|
|
1682
1682
|
state.globstar = true;
|
|
1683
|
-
consume(
|
|
1683
|
+
consume(value);
|
|
1684
1684
|
continue;
|
|
1685
1685
|
}
|
|
1686
1686
|
const token = {
|
|
1687
1687
|
type: "star",
|
|
1688
|
-
value:
|
|
1688
|
+
value: value,
|
|
1689
1689
|
output: star
|
|
1690
1690
|
};
|
|
1691
|
-
if (
|
|
1691
|
+
if (opts.bash === true) {
|
|
1692
1692
|
token.output = ".*?";
|
|
1693
1693
|
if (prev.type === "bos" || prev.type === "slash") token.output = nodot + token.output;
|
|
1694
1694
|
push(token);
|
|
1695
1695
|
continue;
|
|
1696
1696
|
}
|
|
1697
|
-
if (prev && (prev.type === "bracket" || prev.type === "paren") &&
|
|
1698
|
-
token.output =
|
|
1697
|
+
if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
|
|
1698
|
+
token.output = value;
|
|
1699
1699
|
push(token);
|
|
1700
1700
|
continue;
|
|
1701
1701
|
}
|
|
@@ -1703,7 +1703,7 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1703
1703
|
if (prev.type === "dot") {
|
|
1704
1704
|
state.output += NO_DOT_SLASH;
|
|
1705
1705
|
prev.output += NO_DOT_SLASH;
|
|
1706
|
-
} else if (
|
|
1706
|
+
} else if (opts.dot === true) {
|
|
1707
1707
|
state.output += NO_DOTS_SLASH;
|
|
1708
1708
|
prev.output += NO_DOTS_SLASH;
|
|
1709
1709
|
} else {
|
|
@@ -1718,21 +1718,21 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1718
1718
|
push(token);
|
|
1719
1719
|
}
|
|
1720
1720
|
while(state.brackets > 0){
|
|
1721
|
-
if (
|
|
1721
|
+
if (opts.strictBrackets === true) throw new SyntaxError($fd5d6f248e5b4a63$var$syntaxError("closing", "]"));
|
|
1722
1722
|
state.output = $5MQDC.escapeLast(state.output, "[");
|
|
1723
1723
|
decrement("brackets");
|
|
1724
1724
|
}
|
|
1725
1725
|
while(state.parens > 0){
|
|
1726
|
-
if (
|
|
1726
|
+
if (opts.strictBrackets === true) throw new SyntaxError($fd5d6f248e5b4a63$var$syntaxError("closing", ")"));
|
|
1727
1727
|
state.output = $5MQDC.escapeLast(state.output, "(");
|
|
1728
1728
|
decrement("parens");
|
|
1729
1729
|
}
|
|
1730
1730
|
while(state.braces > 0){
|
|
1731
|
-
if (
|
|
1731
|
+
if (opts.strictBrackets === true) throw new SyntaxError($fd5d6f248e5b4a63$var$syntaxError("closing", "}"));
|
|
1732
1732
|
state.output = $5MQDC.escapeLast(state.output, "{");
|
|
1733
1733
|
decrement("braces");
|
|
1734
1734
|
}
|
|
1735
|
-
if (
|
|
1735
|
+
if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) push({
|
|
1736
1736
|
type: "maybe_slash",
|
|
1737
1737
|
value: "",
|
|
1738
1738
|
output: `${SLASH_LITERAL}?`
|
|
@@ -1740,9 +1740,9 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1740
1740
|
// rebuild the output if we had to backtrack at any point
|
|
1741
1741
|
if (state.backtrack === true) {
|
|
1742
1742
|
state.output = "";
|
|
1743
|
-
for (const
|
|
1744
|
-
state.output +=
|
|
1745
|
-
if (
|
|
1743
|
+
for (const token1 of state.tokens){
|
|
1744
|
+
state.output += token1.output != null ? token1.output : token1.value;
|
|
1745
|
+
if (token1.suffix) state.output += token1.suffix;
|
|
1746
1746
|
}
|
|
1747
1747
|
}
|
|
1748
1748
|
return state;
|
|
@@ -1752,25 +1752,25 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1752
1752
|
* This can significantly speed up processing and has very little downside
|
|
1753
1753
|
* impact when none of the fast paths match.
|
|
1754
1754
|
*/ $fd5d6f248e5b4a63$var$parse.fastpaths = (input, options)=>{
|
|
1755
|
-
const
|
|
1755
|
+
const opts = {
|
|
1756
1756
|
...options
|
|
1757
1757
|
};
|
|
1758
|
-
const max = typeof
|
|
1758
|
+
const max = typeof opts.maxLength === "number" ? Math.min($fd5d6f248e5b4a63$var$MAX_LENGTH, opts.maxLength) : $fd5d6f248e5b4a63$var$MAX_LENGTH;
|
|
1759
1759
|
const len = input.length;
|
|
1760
1760
|
if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
1761
1761
|
input = $fd5d6f248e5b4a63$var$REPLACEMENTS[input] || input;
|
|
1762
1762
|
const win32 = $5MQDC.isWindows(options);
|
|
1763
1763
|
// create constants based on platform, for windows or posix
|
|
1764
1764
|
const { DOT_LITERAL: DOT_LITERAL , SLASH_LITERAL: SLASH_LITERAL , ONE_CHAR: ONE_CHAR , DOTS_SLASH: DOTS_SLASH , NO_DOT: NO_DOT , NO_DOTS: NO_DOTS , NO_DOTS_SLASH: NO_DOTS_SLASH , STAR: STAR , START_ANCHOR: START_ANCHOR } = $7XmS6.globChars(win32);
|
|
1765
|
-
const nodot =
|
|
1766
|
-
const slashDot =
|
|
1767
|
-
const capture =
|
|
1765
|
+
const nodot = opts.dot ? NO_DOTS : NO_DOT;
|
|
1766
|
+
const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
|
|
1767
|
+
const capture = opts.capture ? "" : "?:";
|
|
1768
1768
|
const state = {
|
|
1769
1769
|
negated: false,
|
|
1770
1770
|
prefix: ""
|
|
1771
1771
|
};
|
|
1772
|
-
let star =
|
|
1773
|
-
if (
|
|
1772
|
+
let star = opts.bash === true ? ".*?" : STAR;
|
|
1773
|
+
if (opts.capture) star = `(${star})`;
|
|
1774
1774
|
const globstar = (opts)=>{
|
|
1775
1775
|
if (opts.noglobstar === true) return star;
|
|
1776
1776
|
return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
|
|
@@ -1786,13 +1786,13 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1786
1786
|
case "*/*":
|
|
1787
1787
|
return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
|
|
1788
1788
|
case "**":
|
|
1789
|
-
return nodot + globstar(
|
|
1789
|
+
return nodot + globstar(opts);
|
|
1790
1790
|
case "**/*":
|
|
1791
|
-
return `(?:${nodot}${globstar(
|
|
1791
|
+
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
|
|
1792
1792
|
case "**/*.*":
|
|
1793
|
-
return `(?:${nodot}${globstar(
|
|
1793
|
+
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
|
|
1794
1794
|
case "**/.*":
|
|
1795
|
-
return `(?:${nodot}${globstar(
|
|
1795
|
+
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
|
|
1796
1796
|
default:
|
|
1797
1797
|
{
|
|
1798
1798
|
const match = /^(.*?)\.(\w+)$/.exec(str);
|
|
@@ -1804,9 +1804,9 @@ var $5MQDC = parcelRequire("5MQDC");
|
|
|
1804
1804
|
}
|
|
1805
1805
|
};
|
|
1806
1806
|
const output = $5MQDC.removePrefix(input, state);
|
|
1807
|
-
let
|
|
1808
|
-
if (
|
|
1809
|
-
return
|
|
1807
|
+
let source = create(output);
|
|
1808
|
+
if (source && opts.strictSlashes !== true) source += `${SLASH_LITERAL}?`;
|
|
1809
|
+
return source;
|
|
1810
1810
|
};
|
|
1811
1811
|
module.exports = $fd5d6f248e5b4a63$var$parse;
|
|
1812
1812
|
|
|
@@ -3071,11 +3071,11 @@ var $1Sf6D = parcelRequire("1Sf6D");
|
|
|
3071
3071
|
var $ciuZ9 = parcelRequire("ciuZ9");
|
|
3072
3072
|
function $6e1ae4ed5b62d1d9$var$parseAsync(str, opts) {
|
|
3073
3073
|
if (!opts) opts = {};
|
|
3074
|
-
const
|
|
3075
|
-
const
|
|
3074
|
+
const index = 0;
|
|
3075
|
+
const blocksize = opts.blocksize || 40960;
|
|
3076
3076
|
const parser = new $1Sf6D();
|
|
3077
3077
|
return new Promise((resolve, reject)=>{
|
|
3078
|
-
setImmediate(parseAsyncNext,
|
|
3078
|
+
setImmediate(parseAsyncNext, index, blocksize, resolve, reject);
|
|
3079
3079
|
});
|
|
3080
3080
|
function parseAsyncNext(index, blocksize, resolve, reject) {
|
|
3081
3081
|
if (index >= str.length) {
|
|
@@ -3088,8 +3088,8 @@ function $6e1ae4ed5b62d1d9$var$parseAsync(str, opts) {
|
|
|
3088
3088
|
try {
|
|
3089
3089
|
parser.parse(str.slice(index, index + blocksize));
|
|
3090
3090
|
setImmediate(parseAsyncNext, index + blocksize, blocksize, resolve, reject);
|
|
3091
|
-
} catch (
|
|
3092
|
-
reject($ciuZ9(
|
|
3091
|
+
} catch (err1) {
|
|
3092
|
+
reject($ciuZ9(err1, str));
|
|
3093
3093
|
}
|
|
3094
3094
|
}
|
|
3095
3095
|
}
|
|
@@ -3271,8 +3271,8 @@ function $17af713ce388fcb8$var$numpad(num, str) {
|
|
|
3271
3271
|
function $17af713ce388fcb8$var$escapeString(str) {
|
|
3272
3272
|
return str.replace(/\\/g, "\\\\").replace(/[\b]/g, "\\b").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\f/g, "\\f").replace(/\r/g, "\\r")/* eslint-disable no-control-regex */ .replace(/([\u0000-\u001f\u007f])/, (c)=>"\\u" + $17af713ce388fcb8$var$numpad(4, c.codePointAt(0).toString(16)));
|
|
3273
3273
|
/* eslint-enable no-control-regex */ }
|
|
3274
|
-
function $17af713ce388fcb8$var$stringifyMultilineString(
|
|
3275
|
-
let escaped =
|
|
3274
|
+
function $17af713ce388fcb8$var$stringifyMultilineString(str) {
|
|
3275
|
+
let escaped = str.split(/\n/).map((str)=>{
|
|
3276
3276
|
return $17af713ce388fcb8$var$escapeString(str).replace(/"(?="")/g, '\\"');
|
|
3277
3277
|
}).join("\n");
|
|
3278
3278
|
if (escaped.slice(-1) === '"') escaped += "\\\n";
|
|
@@ -3534,8 +3534,8 @@ async function $15d4bc8b6fca8c7e$var$getSourcemapSizes(filePath, fs, projectRoot
|
|
|
3534
3534
|
}
|
|
3535
3535
|
}
|
|
3536
3536
|
async function $15d4bc8b6fca8c7e$var$createBundleStats(bundle, fs, projectRoot) {
|
|
3537
|
-
let
|
|
3538
|
-
let sourcemapSizes = await $15d4bc8b6fca8c7e$var$getSourcemapSizes(
|
|
3537
|
+
let filePath = bundle.filePath;
|
|
3538
|
+
let sourcemapSizes = await $15d4bc8b6fca8c7e$var$getSourcemapSizes(filePath, fs, projectRoot);
|
|
3539
3539
|
let assets = new Map();
|
|
3540
3540
|
bundle.traverseAssets((asset)=>{
|
|
3541
3541
|
let filePath = (0, ($parcel$interopDefault($8C1kk$path))).normalize(asset.filePath);
|
|
@@ -5802,26 +5802,26 @@ $4143f576ffbec226$var$util.text = {
|
|
|
5802
5802
|
* @param options the options to use:
|
|
5803
5803
|
* update true to force an update (not use the cached value).
|
|
5804
5804
|
* @param callback(err, max) called once the operation completes.
|
|
5805
|
-
*/ $4143f576ffbec226$var$util.estimateCores = function(options,
|
|
5805
|
+
*/ $4143f576ffbec226$var$util.estimateCores = function(options, callback) {
|
|
5806
5806
|
if (typeof options === "function") {
|
|
5807
|
-
|
|
5807
|
+
callback = options;
|
|
5808
5808
|
options = {};
|
|
5809
5809
|
}
|
|
5810
5810
|
options = options || {};
|
|
5811
|
-
if ("cores" in $4143f576ffbec226$var$util && !options.update) return
|
|
5811
|
+
if ("cores" in $4143f576ffbec226$var$util && !options.update) return callback(null, $4143f576ffbec226$var$util.cores);
|
|
5812
5812
|
if (typeof navigator !== "undefined" && "hardwareConcurrency" in navigator && navigator.hardwareConcurrency > 0) {
|
|
5813
5813
|
$4143f576ffbec226$var$util.cores = navigator.hardwareConcurrency;
|
|
5814
|
-
return
|
|
5814
|
+
return callback(null, $4143f576ffbec226$var$util.cores);
|
|
5815
5815
|
}
|
|
5816
5816
|
if (typeof Worker === "undefined") {
|
|
5817
5817
|
// workers not available
|
|
5818
5818
|
$4143f576ffbec226$var$util.cores = 1;
|
|
5819
|
-
return
|
|
5819
|
+
return callback(null, $4143f576ffbec226$var$util.cores);
|
|
5820
5820
|
}
|
|
5821
5821
|
if (typeof Blob === "undefined") {
|
|
5822
5822
|
// can't estimate, default to 2
|
|
5823
5823
|
$4143f576ffbec226$var$util.cores = 2;
|
|
5824
|
-
return
|
|
5824
|
+
return callback(null, $4143f576ffbec226$var$util.cores);
|
|
5825
5825
|
}
|
|
5826
5826
|
// create worker concurrency estimation code as blob
|
|
5827
5827
|
var blobUrl = URL.createObjectURL(new Blob([
|
|
@@ -5847,12 +5847,12 @@ $4143f576ffbec226$var$util.text = {
|
|
|
5847
5847
|
function sample(max, samples, numWorkers) {
|
|
5848
5848
|
if (samples === 0) {
|
|
5849
5849
|
// get overlap average
|
|
5850
|
-
var
|
|
5850
|
+
var avg = Math.floor(max.reduce(function(avg, x) {
|
|
5851
5851
|
return avg + x;
|
|
5852
5852
|
}, 0) / max.length);
|
|
5853
|
-
$4143f576ffbec226$var$util.cores = Math.max(1,
|
|
5853
|
+
$4143f576ffbec226$var$util.cores = Math.max(1, avg);
|
|
5854
5854
|
URL.revokeObjectURL(blobUrl);
|
|
5855
|
-
return
|
|
5855
|
+
return callback(null, $4143f576ffbec226$var$util.cores);
|
|
5856
5856
|
}
|
|
5857
5857
|
map(numWorkers, function(err, results) {
|
|
5858
5858
|
max.push(reduce(numWorkers, results));
|
|
@@ -5862,7 +5862,7 @@ $4143f576ffbec226$var$util.text = {
|
|
|
5862
5862
|
function map(numWorkers, callback) {
|
|
5863
5863
|
var workers = [];
|
|
5864
5864
|
var results = [];
|
|
5865
|
-
for(var
|
|
5865
|
+
for(var i = 0; i < numWorkers; ++i){
|
|
5866
5866
|
var worker = new Worker(blobUrl);
|
|
5867
5867
|
worker.addEventListener("message", function(e) {
|
|
5868
5868
|
results.push(e.data);
|
|
@@ -5873,7 +5873,7 @@ $4143f576ffbec226$var$util.text = {
|
|
|
5873
5873
|
});
|
|
5874
5874
|
workers.push(worker);
|
|
5875
5875
|
}
|
|
5876
|
-
for(var
|
|
5876
|
+
for(var i = 0; i < numWorkers; ++i)workers[i].postMessage(i);
|
|
5877
5877
|
}
|
|
5878
5878
|
function reduce(numWorkers, results) {
|
|
5879
5879
|
// find overlapping time windows
|
|
@@ -7730,13 +7730,13 @@ var $ca9d5cba0afae339$var$imix; // inverse mix-columns table
|
|
|
7730
7730
|
* mode the cipher mode to use (default: 'CBC').
|
|
7731
7731
|
*
|
|
7732
7732
|
* @return the cipher.
|
|
7733
|
-
*/ function $ca9d5cba0afae339$var$_createCipher(
|
|
7734
|
-
|
|
7735
|
-
var mode = (
|
|
7733
|
+
*/ function $ca9d5cba0afae339$var$_createCipher(options) {
|
|
7734
|
+
options = options || {};
|
|
7735
|
+
var mode = (options.mode || "CBC").toUpperCase();
|
|
7736
7736
|
var algorithm = "AES-" + mode;
|
|
7737
7737
|
var cipher;
|
|
7738
|
-
if (
|
|
7739
|
-
else cipher = $iGlOy.cipher.createCipher(algorithm,
|
|
7738
|
+
if (options.decrypt) cipher = $iGlOy.cipher.createDecipher(algorithm, options.key);
|
|
7739
|
+
else cipher = $iGlOy.cipher.createCipher(algorithm, options.key);
|
|
7740
7740
|
// backwards compatible start API
|
|
7741
7741
|
var start = cipher.start;
|
|
7742
7742
|
cipher.start = function(iv, options) {
|
|
@@ -10649,13 +10649,13 @@ var $ff4c3bd9116e15cc$var$spfunction8 = [
|
|
|
10649
10649
|
* mode the cipher mode to use (default: 'CBC').
|
|
10650
10650
|
*
|
|
10651
10651
|
* @return the cipher.
|
|
10652
|
-
*/ function $ff4c3bd9116e15cc$var$_createCipher(
|
|
10653
|
-
|
|
10654
|
-
var mode = (
|
|
10652
|
+
*/ function $ff4c3bd9116e15cc$var$_createCipher(options) {
|
|
10653
|
+
options = options || {};
|
|
10654
|
+
var mode = (options.mode || "CBC").toUpperCase();
|
|
10655
10655
|
var algorithm = "DES-" + mode;
|
|
10656
10656
|
var cipher;
|
|
10657
|
-
if (
|
|
10658
|
-
else cipher = $iGlOy.cipher.createCipher(algorithm,
|
|
10657
|
+
if (options.decrypt) cipher = $iGlOy.cipher.createDecipher(algorithm, options.key);
|
|
10658
|
+
else cipher = $iGlOy.cipher.createCipher(algorithm, options.key);
|
|
10659
10659
|
// backwards compatible start API
|
|
10660
10660
|
var start = cipher.start;
|
|
10661
10661
|
cipher.start = function(iv, options) {
|
|
@@ -10735,9 +10735,9 @@ if ($iGlOy.util.isNodejs && !$iGlOy.options.usePureJavaScript) $7436abf0cf29a7b7
|
|
|
10735
10735
|
var hLen = md.digestLength;
|
|
10736
10736
|
/* 1. If dkLen > (2^32 - 1) * hLen, output "derived key too long" and
|
|
10737
10737
|
stop. */ if (dkLen > 0xFFFFFFFF * hLen) {
|
|
10738
|
-
var
|
|
10739
|
-
if (callback) return callback(
|
|
10740
|
-
throw
|
|
10738
|
+
var err = new Error("Derived key is too long.");
|
|
10739
|
+
if (callback) return callback(err);
|
|
10740
|
+
throw err;
|
|
10741
10741
|
}
|
|
10742
10742
|
/* 2. Let len be the number of hLen-octet blocks in the derived key,
|
|
10743
10743
|
rounding up, and let r be the number of octets in the last
|
|
@@ -11188,9 +11188,9 @@ if ($iGlOy.util.isNodejs && !$iGlOy.options.usePureJavaScript && !process.versio
|
|
|
11188
11188
|
keyBytes: ""
|
|
11189
11189
|
};
|
|
11190
11190
|
// create 32 entropy pools (each is a message digest)
|
|
11191
|
-
var
|
|
11191
|
+
var md = plugin.md;
|
|
11192
11192
|
var pools = new Array(32);
|
|
11193
|
-
for(var
|
|
11193
|
+
for(var i = 0; i < 32; ++i)pools[i] = md.create();
|
|
11194
11194
|
ctx.pools = pools;
|
|
11195
11195
|
// entropy pools are written to cyclically, starting at index 0
|
|
11196
11196
|
ctx.pool = 0;
|
|
@@ -11346,9 +11346,9 @@ if ($iGlOy.util.isNodejs && !$iGlOy.options.usePureJavaScript && !process.versio
|
|
|
11346
11346
|
// use window.crypto.getRandomValues strong source of entropy if available
|
|
11347
11347
|
var getRandomValues = null;
|
|
11348
11348
|
var globalScope = $iGlOy.util.globalScope;
|
|
11349
|
-
var
|
|
11350
|
-
if (
|
|
11351
|
-
return
|
|
11349
|
+
var _crypto = globalScope.crypto || globalScope.msCrypto;
|
|
11350
|
+
if (_crypto && _crypto.getRandomValues) getRandomValues = function(arr) {
|
|
11351
|
+
return _crypto.getRandomValues(arr);
|
|
11352
11352
|
};
|
|
11353
11353
|
var b = $iGlOy.util.createBuffer();
|
|
11354
11354
|
if (getRandomValues) while(b.length() < needed){
|
|
@@ -11460,7 +11460,7 @@ if ($iGlOy.util.isNodejs && !$iGlOy.options.usePureJavaScript && !process.versio
|
|
|
11460
11460
|
};
|
|
11461
11461
|
else {
|
|
11462
11462
|
// main thread sends random bytes upon request
|
|
11463
|
-
var
|
|
11463
|
+
var listener = function(e) {
|
|
11464
11464
|
var data = e.data;
|
|
11465
11465
|
if (data.forge && data.forge.prng) ctx.seedFile(data.forge.prng.needed, function(err, bytes) {
|
|
11466
11466
|
worker.postMessage({
|
|
@@ -11474,7 +11474,7 @@ if ($iGlOy.util.isNodejs && !$iGlOy.options.usePureJavaScript && !process.versio
|
|
|
11474
11474
|
});
|
|
11475
11475
|
};
|
|
11476
11476
|
// TODO: do we need to remove the event listener when the worker dies?
|
|
11477
|
-
worker.addEventListener("message",
|
|
11477
|
+
worker.addEventListener("message", listener);
|
|
11478
11478
|
}
|
|
11479
11479
|
};
|
|
11480
11480
|
return ctx;
|
|
@@ -11488,7 +11488,7 @@ if ($iGlOy.util.isNodejs && !$iGlOy.options.usePureJavaScript && !process.versio
|
|
|
11488
11488
|
$b9b57fce3e6d85ef$exports = $iGlOy.random;
|
|
11489
11489
|
return;
|
|
11490
11490
|
}
|
|
11491
|
-
(function(
|
|
11491
|
+
(function(jQuery1) {
|
|
11492
11492
|
// the default prng plugin, uses AES-128
|
|
11493
11493
|
var prng_aes = {};
|
|
11494
11494
|
var _prng_aes_output = new Array(4);
|
|
@@ -11577,8 +11577,8 @@ if ($iGlOy.util.isNodejs && !$iGlOy.options.usePureJavaScript && !process.versio
|
|
|
11577
11577
|
// add some entropy from navigator object
|
|
11578
11578
|
if (typeof navigator !== "undefined") {
|
|
11579
11579
|
var _navBytes = "";
|
|
11580
|
-
for(var
|
|
11581
|
-
if (typeof navigator[
|
|
11580
|
+
for(var key in navigator)try {
|
|
11581
|
+
if (typeof navigator[key] == "string") _navBytes += navigator[key];
|
|
11582
11582
|
} catch (e) {
|
|
11583
11583
|
/* Some navigator keys might not be accessible, e.g. the geolocation
|
|
11584
11584
|
attribute throws an exception if touched in Mozilla chrome://
|
|
@@ -11590,22 +11590,22 @@ if ($iGlOy.util.isNodejs && !$iGlOy.options.usePureJavaScript && !process.versio
|
|
|
11590
11590
|
_navBytes = null;
|
|
11591
11591
|
}
|
|
11592
11592
|
// add mouse and keyboard collectors if jquery is available
|
|
11593
|
-
if (
|
|
11593
|
+
if (jQuery1) {
|
|
11594
11594
|
// set up mouse entropy capture
|
|
11595
|
-
|
|
11595
|
+
jQuery1().mousemove(function(e) {
|
|
11596
11596
|
// add mouse coords
|
|
11597
11597
|
_ctx.collectInt(e.clientX, 16);
|
|
11598
11598
|
_ctx.collectInt(e.clientY, 16);
|
|
11599
11599
|
});
|
|
11600
11600
|
// set up keyboard entropy capture
|
|
11601
|
-
|
|
11601
|
+
jQuery1().keypress(function(e) {
|
|
11602
11602
|
_ctx.collectInt(e.charCode, 8);
|
|
11603
11603
|
});
|
|
11604
11604
|
}
|
|
11605
11605
|
}
|
|
11606
11606
|
/* Random API */ if (!$iGlOy.random) $iGlOy.random = _ctx;
|
|
11607
11607
|
else // extend forge.random with _ctx
|
|
11608
|
-
for(var
|
|
11608
|
+
for(var key in _ctx)$iGlOy.random[key] = _ctx[key];
|
|
11609
11609
|
// expose spawn PRNG
|
|
11610
11610
|
$iGlOy.random.createInstance = spawnPrng;
|
|
11611
11611
|
$b9b57fce3e6d85ef$exports = $iGlOy.random;
|
|
@@ -14172,11 +14172,11 @@ var $iGlOy = parcelRequire("iGlOy");
|
|
|
14172
14172
|
// asynchronous which may actually be slower
|
|
14173
14173
|
// start workers immediately
|
|
14174
14174
|
var workers = [];
|
|
14175
|
-
for(var
|
|
14176
|
-
workers[
|
|
14175
|
+
for(var i = 0; i < numWorkers; ++i)// FIXME: fix path or use blob URLs
|
|
14176
|
+
workers[i] = new Worker(workerScript);
|
|
14177
14177
|
var running = numWorkers;
|
|
14178
14178
|
// listen for requests from workers and assign ranges to find prime
|
|
14179
|
-
for(var
|
|
14179
|
+
for(var i = 0; i < numWorkers; ++i)workers[i].addEventListener("message", workerMessage);
|
|
14180
14180
|
/* Note: The distribution of random numbers is unknown. Therefore, each
|
|
14181
14181
|
web worker is continuously allocated a range of numbers to check for a
|
|
14182
14182
|
random number until one is found.
|
|
@@ -14943,7 +14943,7 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
14943
14943
|
* @param [callback(err, keypair)] called once the operation completes.
|
|
14944
14944
|
*
|
|
14945
14945
|
* @return an object with privateKey and publicKey properties.
|
|
14946
|
-
*/ $8ab3548bea1beb81$var$pki.rsa.generateKeyPair = function(bits,
|
|
14946
|
+
*/ $8ab3548bea1beb81$var$pki.rsa.generateKeyPair = function(bits, e, options, callback) {
|
|
14947
14947
|
// (bits), (options), (callback)
|
|
14948
14948
|
if (arguments.length === 1) {
|
|
14949
14949
|
if (typeof bits === "object") {
|
|
@@ -14956,42 +14956,42 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
14956
14956
|
} else if (arguments.length === 2) {
|
|
14957
14957
|
// (bits, e), (bits, options), (bits, callback), (options, callback)
|
|
14958
14958
|
if (typeof bits === "number") {
|
|
14959
|
-
if (typeof
|
|
14960
|
-
callback =
|
|
14961
|
-
|
|
14962
|
-
} else if (typeof
|
|
14963
|
-
options =
|
|
14964
|
-
|
|
14959
|
+
if (typeof e === "function") {
|
|
14960
|
+
callback = e;
|
|
14961
|
+
e = undefined;
|
|
14962
|
+
} else if (typeof e !== "number") {
|
|
14963
|
+
options = e;
|
|
14964
|
+
e = undefined;
|
|
14965
14965
|
}
|
|
14966
14966
|
} else {
|
|
14967
14967
|
options = bits;
|
|
14968
|
-
callback =
|
|
14968
|
+
callback = e;
|
|
14969
14969
|
bits = undefined;
|
|
14970
|
-
|
|
14970
|
+
e = undefined;
|
|
14971
14971
|
}
|
|
14972
14972
|
} else if (arguments.length === 3) {
|
|
14973
14973
|
// (bits, e, options), (bits, e, callback), (bits, options, callback)
|
|
14974
|
-
if (typeof
|
|
14974
|
+
if (typeof e === "number") {
|
|
14975
14975
|
if (typeof options === "function") {
|
|
14976
14976
|
callback = options;
|
|
14977
14977
|
options = undefined;
|
|
14978
14978
|
}
|
|
14979
14979
|
} else {
|
|
14980
14980
|
callback = options;
|
|
14981
|
-
options =
|
|
14982
|
-
|
|
14981
|
+
options = e;
|
|
14982
|
+
e = undefined;
|
|
14983
14983
|
}
|
|
14984
14984
|
}
|
|
14985
14985
|
options = options || {};
|
|
14986
14986
|
if (bits === undefined) bits = options.bits || 2048;
|
|
14987
|
-
if (
|
|
14987
|
+
if (e === undefined) e = options.e || 0x10001;
|
|
14988
14988
|
// use native code if permitted, available, and parameters are acceptable
|
|
14989
|
-
if (!$iGlOy.options.usePureJavaScript && !options.prng && bits >= 256 && bits <= 16384 && (
|
|
14989
|
+
if (!$iGlOy.options.usePureJavaScript && !options.prng && bits >= 256 && bits <= 16384 && (e === 0x10001 || e === 3)) {
|
|
14990
14990
|
if (callback) {
|
|
14991
14991
|
// try native async
|
|
14992
14992
|
if ($8ab3548bea1beb81$var$_detectNodeCrypto("generateKeyPair")) return $8ab3548bea1beb81$var$_crypto.generateKeyPair("rsa", {
|
|
14993
14993
|
modulusLength: bits,
|
|
14994
|
-
publicExponent:
|
|
14994
|
+
publicExponent: e,
|
|
14995
14995
|
publicKeyEncoding: {
|
|
14996
14996
|
type: "spki",
|
|
14997
14997
|
format: "pem"
|
|
@@ -15011,7 +15011,7 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15011
15011
|
return $8ab3548bea1beb81$var$util.globalScope.crypto.subtle.generateKey({
|
|
15012
15012
|
name: "RSASSA-PKCS1-v1_5",
|
|
15013
15013
|
modulusLength: bits,
|
|
15014
|
-
publicExponent: $8ab3548bea1beb81$var$_intToUint8Array(
|
|
15014
|
+
publicExponent: $8ab3548bea1beb81$var$_intToUint8Array(e),
|
|
15015
15015
|
hash: {
|
|
15016
15016
|
name: "SHA-256"
|
|
15017
15017
|
}
|
|
@@ -15036,7 +15036,7 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15036
15036
|
var genOp = $8ab3548bea1beb81$var$util.globalScope.msCrypto.subtle.generateKey({
|
|
15037
15037
|
name: "RSASSA-PKCS1-v1_5",
|
|
15038
15038
|
modulusLength: bits,
|
|
15039
|
-
publicExponent: $8ab3548bea1beb81$var$_intToUint8Array(
|
|
15039
|
+
publicExponent: $8ab3548bea1beb81$var$_intToUint8Array(e),
|
|
15040
15040
|
hash: {
|
|
15041
15041
|
name: "SHA-256"
|
|
15042
15042
|
}
|
|
@@ -15044,8 +15044,8 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15044
15044
|
"sign",
|
|
15045
15045
|
"verify"
|
|
15046
15046
|
]);
|
|
15047
|
-
genOp.oncomplete = function(
|
|
15048
|
-
var pair =
|
|
15047
|
+
genOp.oncomplete = function(e) {
|
|
15048
|
+
var pair = e.target.result;
|
|
15049
15049
|
var exportOp = $8ab3548bea1beb81$var$util.globalScope.msCrypto.subtle.exportKey("pkcs8", pair.privateKey);
|
|
15050
15050
|
exportOp.oncomplete = function(e) {
|
|
15051
15051
|
var pkcs8 = e.target.result;
|
|
@@ -15068,7 +15068,7 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15068
15068
|
if ($8ab3548bea1beb81$var$_detectNodeCrypto("generateKeyPairSync")) {
|
|
15069
15069
|
var keypair = $8ab3548bea1beb81$var$_crypto.generateKeyPairSync("rsa", {
|
|
15070
15070
|
modulusLength: bits,
|
|
15071
|
-
publicExponent:
|
|
15071
|
+
publicExponent: e,
|
|
15072
15072
|
publicKeyEncoding: {
|
|
15073
15073
|
type: "spki",
|
|
15074
15074
|
format: "pem"
|
|
@@ -15085,7 +15085,7 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15085
15085
|
}
|
|
15086
15086
|
}
|
|
15087
15087
|
// use JavaScript implementation
|
|
15088
|
-
var state = $8ab3548bea1beb81$var$pki.rsa.createKeyPairGenerationState(bits,
|
|
15088
|
+
var state = $8ab3548bea1beb81$var$pki.rsa.createKeyPairGenerationState(bits, e, options);
|
|
15089
15089
|
if (!callback) {
|
|
15090
15090
|
$8ab3548bea1beb81$var$pki.rsa.stepKeyPairGenerationState(state, 0);
|
|
15091
15091
|
return state.keys;
|
|
@@ -15099,10 +15099,10 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15099
15099
|
* @param e the exponent.
|
|
15100
15100
|
*
|
|
15101
15101
|
* @return the public key.
|
|
15102
|
-
*/ $8ab3548bea1beb81$var$pki.setRsaPublicKey = $8ab3548bea1beb81$var$pki.rsa.setPublicKey = function(n,
|
|
15103
|
-
var
|
|
15102
|
+
*/ $8ab3548bea1beb81$var$pki.setRsaPublicKey = $8ab3548bea1beb81$var$pki.rsa.setPublicKey = function(n, e) {
|
|
15103
|
+
var key = {
|
|
15104
15104
|
n: n,
|
|
15105
|
-
e:
|
|
15105
|
+
e: e
|
|
15106
15106
|
};
|
|
15107
15107
|
/**
|
|
15108
15108
|
* Encrypts the given data with this public key. Newer applications
|
|
@@ -15120,7 +15120,7 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15120
15120
|
* @param schemeOptions any scheme-specific options.
|
|
15121
15121
|
*
|
|
15122
15122
|
* @return the encrypted byte string.
|
|
15123
|
-
*/
|
|
15123
|
+
*/ key.encrypt = function(data, scheme, schemeOptions) {
|
|
15124
15124
|
if (typeof scheme === "string") scheme = scheme.toUpperCase();
|
|
15125
15125
|
else if (scheme === undefined) scheme = "RSAES-PKCS1-V1_5";
|
|
15126
15126
|
if (scheme === "RSAES-PKCS1-V1_5") scheme = {
|
|
@@ -15145,8 +15145,8 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15145
15145
|
};
|
|
15146
15146
|
else if (typeof scheme === "string") throw new Error('Unsupported encryption scheme: "' + scheme + '".');
|
|
15147
15147
|
// do scheme-based encoding then rsa encryption
|
|
15148
|
-
var
|
|
15149
|
-
return $8ab3548bea1beb81$var$pki.rsa.encrypt(
|
|
15148
|
+
var e = scheme.encode(data, key, true);
|
|
15149
|
+
return $8ab3548bea1beb81$var$pki.rsa.encrypt(e, key, true);
|
|
15150
15150
|
};
|
|
15151
15151
|
/**
|
|
15152
15152
|
* Verifies the given signature against the given digest.
|
|
@@ -15178,13 +15178,13 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15178
15178
|
* PKCS#1 v1.5 padding will still be used.
|
|
15179
15179
|
*
|
|
15180
15180
|
* @return true if the signature was verified, false if not.
|
|
15181
|
-
*/
|
|
15181
|
+
*/ key.verify = function(digest, signature, scheme) {
|
|
15182
15182
|
if (typeof scheme === "string") scheme = scheme.toUpperCase();
|
|
15183
15183
|
else if (scheme === undefined) scheme = "RSASSA-PKCS1-V1_5";
|
|
15184
15184
|
if (scheme === "RSASSA-PKCS1-V1_5") scheme = {
|
|
15185
15185
|
verify: function(digest, d) {
|
|
15186
15186
|
// remove padding
|
|
15187
|
-
d = $8ab3548bea1beb81$var$_decodePkcs1_v1_5(d,
|
|
15187
|
+
d = $8ab3548bea1beb81$var$_decodePkcs1_v1_5(d, key, true);
|
|
15188
15188
|
// d is ASN.1 BER-encoded DigestInfo
|
|
15189
15189
|
var obj = $8ab3548bea1beb81$var$asn1.fromDer(d);
|
|
15190
15190
|
// compare the given digest to the decrypted one
|
|
@@ -15194,15 +15194,15 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15194
15194
|
else if (scheme === "NONE" || scheme === "NULL" || scheme === null) scheme = {
|
|
15195
15195
|
verify: function(digest, d) {
|
|
15196
15196
|
// remove padding
|
|
15197
|
-
d = $8ab3548bea1beb81$var$_decodePkcs1_v1_5(d,
|
|
15197
|
+
d = $8ab3548bea1beb81$var$_decodePkcs1_v1_5(d, key, true);
|
|
15198
15198
|
return digest === d;
|
|
15199
15199
|
}
|
|
15200
15200
|
};
|
|
15201
15201
|
// do rsa decryption w/o any decoding, then verify -- which does decoding
|
|
15202
|
-
var
|
|
15203
|
-
return scheme.verify(
|
|
15202
|
+
var d = $8ab3548bea1beb81$var$pki.rsa.decrypt(signature, key, true, false);
|
|
15203
|
+
return scheme.verify(digest, d, key.n.bitLength());
|
|
15204
15204
|
};
|
|
15205
|
-
return
|
|
15205
|
+
return key;
|
|
15206
15206
|
};
|
|
15207
15207
|
/**
|
|
15208
15208
|
* Sets an RSA private key from BigIntegers modulus, exponent, primes,
|
|
@@ -15218,11 +15218,11 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15218
15218
|
* @param qInv ((inverse of q) mod p)
|
|
15219
15219
|
*
|
|
15220
15220
|
* @return the private key.
|
|
15221
|
-
*/ $8ab3548bea1beb81$var$pki.setRsaPrivateKey = $8ab3548bea1beb81$var$pki.rsa.setPrivateKey = function(n, e,
|
|
15222
|
-
var
|
|
15221
|
+
*/ $8ab3548bea1beb81$var$pki.setRsaPrivateKey = $8ab3548bea1beb81$var$pki.rsa.setPrivateKey = function(n, e, d, p, q, dP, dQ, qInv) {
|
|
15222
|
+
var key = {
|
|
15223
15223
|
n: n,
|
|
15224
15224
|
e: e,
|
|
15225
|
-
d:
|
|
15225
|
+
d: d,
|
|
15226
15226
|
p: p,
|
|
15227
15227
|
q: q,
|
|
15228
15228
|
dP: dP,
|
|
@@ -15241,11 +15241,11 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15241
15241
|
* @param schemeOptions any scheme-specific options.
|
|
15242
15242
|
*
|
|
15243
15243
|
* @return the decrypted byte string.
|
|
15244
|
-
*/
|
|
15244
|
+
*/ key.decrypt = function(data, scheme, schemeOptions) {
|
|
15245
15245
|
if (typeof scheme === "string") scheme = scheme.toUpperCase();
|
|
15246
15246
|
else if (scheme === undefined) scheme = "RSAES-PKCS1-V1_5";
|
|
15247
15247
|
// do rsa decryption w/o any decoding
|
|
15248
|
-
var
|
|
15248
|
+
var d = $8ab3548bea1beb81$var$pki.rsa.decrypt(data, key, false, false);
|
|
15249
15249
|
if (scheme === "RSAES-PKCS1-V1_5") scheme = {
|
|
15250
15250
|
decode: $8ab3548bea1beb81$var$_decodePkcs1_v1_5
|
|
15251
15251
|
};
|
|
@@ -15266,7 +15266,7 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15266
15266
|
};
|
|
15267
15267
|
else throw new Error('Unsupported encryption scheme: "' + scheme + '".');
|
|
15268
15268
|
// decode according to scheme
|
|
15269
|
-
return scheme.decode(
|
|
15269
|
+
return scheme.decode(d, key, false);
|
|
15270
15270
|
};
|
|
15271
15271
|
/**
|
|
15272
15272
|
* Signs the given digest, producing a signature.
|
|
@@ -15286,7 +15286,7 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15286
15286
|
* PKCS#1 v1.5 padding will still be used.
|
|
15287
15287
|
*
|
|
15288
15288
|
* @return the signature as a byte string.
|
|
15289
|
-
*/
|
|
15289
|
+
*/ key.sign = function(md, scheme) {
|
|
15290
15290
|
/* Note: The internal implementation of RSA operations is being
|
|
15291
15291
|
transitioned away from a PKCS#1 v1.5 hard-coded scheme. Some legacy
|
|
15292
15292
|
code like the use of an encoding block identifier 'bt' will eventually
|
|
@@ -15307,10 +15307,10 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15307
15307
|
bt = 0x01;
|
|
15308
15308
|
}
|
|
15309
15309
|
// encode and then encrypt
|
|
15310
|
-
var d = scheme.encode(md,
|
|
15311
|
-
return $8ab3548bea1beb81$var$pki.rsa.encrypt(d,
|
|
15310
|
+
var d = scheme.encode(md, key.n.bitLength());
|
|
15311
|
+
return $8ab3548bea1beb81$var$pki.rsa.encrypt(d, key, bt);
|
|
15312
15312
|
};
|
|
15313
|
-
return
|
|
15313
|
+
return key;
|
|
15314
15314
|
};
|
|
15315
15315
|
/**
|
|
15316
15316
|
* Wraps an RSAPrivateKey ASN.1 object in an ASN.1 PrivateKeyInfo object.
|
|
@@ -15597,9 +15597,9 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15597
15597
|
* numbers for each web worker to check per work assignment,
|
|
15598
15598
|
* (default: 100).
|
|
15599
15599
|
* @param callback(err, keypair) called once the operation completes.
|
|
15600
|
-
*/ function $8ab3548bea1beb81$var$_generateKeyPair(state, options,
|
|
15600
|
+
*/ function $8ab3548bea1beb81$var$_generateKeyPair(state, options, callback) {
|
|
15601
15601
|
if (typeof options === "function") {
|
|
15602
|
-
|
|
15602
|
+
callback = options;
|
|
15603
15603
|
options = {};
|
|
15604
15604
|
}
|
|
15605
15605
|
options = options || {};
|
|
@@ -15618,7 +15618,7 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15618
15618
|
function generate() {
|
|
15619
15619
|
// find p and then q (done in series to simplify)
|
|
15620
15620
|
getPrime(state.pBits, function(err, num) {
|
|
15621
|
-
if (err) return
|
|
15621
|
+
if (err) return callback(err);
|
|
15622
15622
|
state.p = num;
|
|
15623
15623
|
if (state.q !== null) return finish(err, state.q);
|
|
15624
15624
|
getPrime(state.qBits, finish);
|
|
@@ -15628,7 +15628,7 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15628
15628
|
$iGlOy.prime.generateProbablePrime(bits, opts, callback);
|
|
15629
15629
|
}
|
|
15630
15630
|
function finish(err, num) {
|
|
15631
|
-
if (err) return
|
|
15631
|
+
if (err) return callback(err);
|
|
15632
15632
|
// set q
|
|
15633
15633
|
state.q = num;
|
|
15634
15634
|
// ensure p is larger than q (swap them if not)
|
|
@@ -15674,7 +15674,7 @@ var $8ab3548bea1beb81$var$publicKeyValidator = $iGlOy.pki.rsa.publicKeyValidator
|
|
|
15674
15674
|
privateKey: $8ab3548bea1beb81$var$pki.rsa.setPrivateKey(state.n, state.e, d, state.p, state.q, d.mod(state.p1), d.mod(state.q1), state.q.modInverse(state.p)),
|
|
15675
15675
|
publicKey: $8ab3548bea1beb81$var$pki.rsa.setPublicKey(state.n, state.e)
|
|
15676
15676
|
};
|
|
15677
|
-
|
|
15677
|
+
callback(null, state.keys);
|
|
15678
15678
|
}
|
|
15679
15679
|
}
|
|
15680
15680
|
/**
|
|
@@ -16540,10 +16540,10 @@ var $4ead143e6089ae29$var$pkcs12PbeParamsValidator = {
|
|
|
16540
16540
|
}
|
|
16541
16541
|
// get PRF message digest
|
|
16542
16542
|
var md = $4ead143e6089ae29$var$prfOidToMessageDigest(capture.prfOid);
|
|
16543
|
-
var
|
|
16543
|
+
var key = $4ead143e6089ae29$var$pki.pbe.generatePkcs12Key(password, salt, 1, count, dkLen, md);
|
|
16544
16544
|
md.start();
|
|
16545
|
-
var
|
|
16546
|
-
return cipherFn(
|
|
16545
|
+
var iv = $4ead143e6089ae29$var$pki.pbe.generatePkcs12Key(password, salt, 2, count, dIvLen, md);
|
|
16546
|
+
return cipherFn(key, iv);
|
|
16547
16547
|
};
|
|
16548
16548
|
/**
|
|
16549
16549
|
* OpenSSL's legacy key derivation function.
|
|
@@ -19447,9 +19447,9 @@ var $f71d929f259208f7$var$jan_1_2050 = new Date("2050-01-01T00:00:00Z");
|
|
|
19447
19447
|
}
|
|
19448
19448
|
// auto-add passed in certs
|
|
19449
19449
|
if (certs) // parse PEM-formatted certificates as necessary
|
|
19450
|
-
for(var
|
|
19451
|
-
var
|
|
19452
|
-
caStore.addCertificate(
|
|
19450
|
+
for(var i = 0; i < certs.length; ++i){
|
|
19451
|
+
var cert = certs[i];
|
|
19452
|
+
caStore.addCertificate(cert);
|
|
19453
19453
|
}
|
|
19454
19454
|
return caStore;
|
|
19455
19455
|
};
|
|
@@ -20632,11 +20632,11 @@ var $71c5302ef2ea3950$var$asn1 = $iGlOy.asn1;
|
|
|
20632
20632
|
* @param maxline the maximum characters per line, defaults to 64.
|
|
20633
20633
|
*
|
|
20634
20634
|
* @return the PEM-formatted private key.
|
|
20635
|
-
*/ $71c5302ef2ea3950$var$pki.privateKeyInfoToPem = function(
|
|
20635
|
+
*/ $71c5302ef2ea3950$var$pki.privateKeyInfoToPem = function(pki, maxline) {
|
|
20636
20636
|
// convert to DER, then PEM-encode
|
|
20637
20637
|
var msg = {
|
|
20638
20638
|
type: "PRIVATE KEY",
|
|
20639
|
-
body: $71c5302ef2ea3950$var$asn1.toDer(
|
|
20639
|
+
body: $71c5302ef2ea3950$var$asn1.toDer(pki).getBytes()
|
|
20640
20640
|
};
|
|
20641
20641
|
return $iGlOy.pem.encode(msg, {
|
|
20642
20642
|
maxline: maxline
|
|
@@ -20762,7 +20762,7 @@ var $71c5302ef2ea3950$var$asn1 = $iGlOy.asn1;
|
|
|
20762
20762
|
* @param record the record.
|
|
20763
20763
|
*
|
|
20764
20764
|
* @return the sha-1 hash (20 bytes) for the given record.
|
|
20765
|
-
*/ var $e55982d45da68b81$var$hmac_sha1 = function(
|
|
20765
|
+
*/ var $e55982d45da68b81$var$hmac_sha1 = function(key, seqNum, record) {
|
|
20766
20766
|
/* MAC is computed like so:
|
|
20767
20767
|
HMAC_hash(
|
|
20768
20768
|
key, seqNum +
|
|
@@ -20771,7 +20771,7 @@ var $71c5302ef2ea3950$var$asn1 = $iGlOy.asn1;
|
|
|
20771
20771
|
TLSCompressed.length +
|
|
20772
20772
|
TLSCompressed.fragment)
|
|
20773
20773
|
*/ var hmac = $iGlOy.hmac.create();
|
|
20774
|
-
hmac.start("SHA1",
|
|
20774
|
+
hmac.start("SHA1", key);
|
|
20775
20775
|
var b = $iGlOy.util.createBuffer();
|
|
20776
20776
|
b.putInt32(seqNum[0]);
|
|
20777
20777
|
b.putInt32(seqNum[1]);
|
|
@@ -21074,8 +21074,8 @@ $e55982d45da68b81$var$tls.Alert.Description = {
|
|
|
21074
21074
|
* @return the matching supported cipher suite or null.
|
|
21075
21075
|
*/ $e55982d45da68b81$var$tls.getCipherSuite = function(twoBytes) {
|
|
21076
21076
|
var rval = null;
|
|
21077
|
-
for(var
|
|
21078
|
-
var cs = $e55982d45da68b81$var$tls.CipherSuites[
|
|
21077
|
+
for(var key in $e55982d45da68b81$var$tls.CipherSuites){
|
|
21078
|
+
var cs = $e55982d45da68b81$var$tls.CipherSuites[key];
|
|
21079
21079
|
if (cs.id[0] === twoBytes.charCodeAt(0) && cs.id[1] === twoBytes.charCodeAt(1)) {
|
|
21080
21080
|
rval = cs;
|
|
21081
21081
|
break;
|
|
@@ -21797,9 +21797,9 @@ $e55982d45da68b81$var$tls.Alert.Description = {
|
|
|
21797
21797
|
* @param c the connection.
|
|
21798
21798
|
* @param record the record.
|
|
21799
21799
|
* @param length the length of the handshake message.
|
|
21800
|
-
*/ $e55982d45da68b81$var$tls.handleServerHelloDone = function(
|
|
21800
|
+
*/ $e55982d45da68b81$var$tls.handleServerHelloDone = function(c, record, length) {
|
|
21801
21801
|
// len must be 0 bytes
|
|
21802
|
-
if (length > 0) return
|
|
21802
|
+
if (length > 0) return c.error(c, {
|
|
21803
21803
|
message: "Invalid ServerHelloDone message. Invalid length.",
|
|
21804
21804
|
send: true,
|
|
21805
21805
|
alert: {
|
|
@@ -21807,7 +21807,7 @@ $e55982d45da68b81$var$tls.Alert.Description = {
|
|
|
21807
21807
|
description: $e55982d45da68b81$var$tls.Alert.Description.record_overflow
|
|
21808
21808
|
}
|
|
21809
21809
|
});
|
|
21810
|
-
if (
|
|
21810
|
+
if (c.serverCertificate === null) {
|
|
21811
21811
|
// no server certificate was provided
|
|
21812
21812
|
var error = {
|
|
21813
21813
|
message: "No server certificate provided. Not enough security.",
|
|
@@ -21819,7 +21819,7 @@ $e55982d45da68b81$var$tls.Alert.Description = {
|
|
|
21819
21819
|
};
|
|
21820
21820
|
// call application callback
|
|
21821
21821
|
var depth = 0;
|
|
21822
|
-
var ret =
|
|
21822
|
+
var ret = c.verify(c, error.alert.description, depth, []);
|
|
21823
21823
|
if (ret !== true) {
|
|
21824
21824
|
// check for custom alert info
|
|
21825
21825
|
if (ret || ret === 0) {
|
|
@@ -21831,25 +21831,25 @@ $e55982d45da68b81$var$tls.Alert.Description = {
|
|
|
21831
21831
|
error.alert.description = ret;
|
|
21832
21832
|
}
|
|
21833
21833
|
// send error
|
|
21834
|
-
return
|
|
21834
|
+
return c.error(c, error);
|
|
21835
21835
|
}
|
|
21836
21836
|
}
|
|
21837
21837
|
// create client certificate message if requested
|
|
21838
|
-
if (
|
|
21839
|
-
record = $e55982d45da68b81$var$tls.createRecord(
|
|
21838
|
+
if (c.session.certificateRequest !== null) {
|
|
21839
|
+
record = $e55982d45da68b81$var$tls.createRecord(c, {
|
|
21840
21840
|
type: $e55982d45da68b81$var$tls.ContentType.handshake,
|
|
21841
|
-
data: $e55982d45da68b81$var$tls.createCertificate(
|
|
21841
|
+
data: $e55982d45da68b81$var$tls.createCertificate(c)
|
|
21842
21842
|
});
|
|
21843
|
-
$e55982d45da68b81$var$tls.queue(
|
|
21843
|
+
$e55982d45da68b81$var$tls.queue(c, record);
|
|
21844
21844
|
}
|
|
21845
21845
|
// create client key exchange message
|
|
21846
|
-
record = $e55982d45da68b81$var$tls.createRecord(
|
|
21846
|
+
record = $e55982d45da68b81$var$tls.createRecord(c, {
|
|
21847
21847
|
type: $e55982d45da68b81$var$tls.ContentType.handshake,
|
|
21848
|
-
data: $e55982d45da68b81$var$tls.createClientKeyExchange(
|
|
21848
|
+
data: $e55982d45da68b81$var$tls.createClientKeyExchange(c)
|
|
21849
21849
|
});
|
|
21850
|
-
$e55982d45da68b81$var$tls.queue(
|
|
21850
|
+
$e55982d45da68b81$var$tls.queue(c, record);
|
|
21851
21851
|
// expect no messages until the following callback has been called
|
|
21852
|
-
|
|
21852
|
+
c.expect = $e55982d45da68b81$var$SER;
|
|
21853
21853
|
// create callback to handle client signature (for client-certs)
|
|
21854
21854
|
var callback = function(c, signature) {
|
|
21855
21855
|
if (c.session.certificateRequest !== null && c.session.clientCertificate !== null) // create certificate verify message
|
|
@@ -21880,9 +21880,9 @@ $e55982d45da68b81$var$tls.Alert.Description = {
|
|
|
21880
21880
|
};
|
|
21881
21881
|
// if there is no certificate request or no client certificate, do
|
|
21882
21882
|
// callback immediately
|
|
21883
|
-
if (
|
|
21883
|
+
if (c.session.certificateRequest === null || c.session.clientCertificate === null) return callback(c, null);
|
|
21884
21884
|
// otherwise get the client signature
|
|
21885
|
-
$e55982d45da68b81$var$tls.getClientSignature(
|
|
21885
|
+
$e55982d45da68b81$var$tls.getClientSignature(c, callback);
|
|
21886
21886
|
};
|
|
21887
21887
|
/**
|
|
21888
21888
|
* Called when a ChangeCipherSpec record is received.
|
|
@@ -22993,8 +22993,8 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
22993
22993
|
* @param c the connection.
|
|
22994
22994
|
*
|
|
22995
22995
|
* @return the new initialized TLS connection state.
|
|
22996
|
-
*/ $e55982d45da68b81$var$tls.createConnectionState = function(
|
|
22997
|
-
var client =
|
|
22996
|
+
*/ $e55982d45da68b81$var$tls.createConnectionState = function(c) {
|
|
22997
|
+
var client = c.entity === $e55982d45da68b81$var$tls.ConnectionEnd.client;
|
|
22998
22998
|
var createMode = function() {
|
|
22999
22999
|
var mode = {
|
|
23000
23000
|
// two 32-bit numbers, first is most significant
|
|
@@ -23074,15 +23074,15 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
23074
23074
|
return !c.fail;
|
|
23075
23075
|
};
|
|
23076
23076
|
// handle security parameters
|
|
23077
|
-
if (
|
|
23078
|
-
var sp =
|
|
23079
|
-
|
|
23077
|
+
if (c.session) {
|
|
23078
|
+
var sp = c.session.sp;
|
|
23079
|
+
c.session.cipherSuite.initSecurityParameters(sp);
|
|
23080
23080
|
// generate keys
|
|
23081
|
-
sp.keys = $e55982d45da68b81$var$tls.generateKeys(
|
|
23081
|
+
sp.keys = $e55982d45da68b81$var$tls.generateKeys(c, sp);
|
|
23082
23082
|
state.read.macKey = client ? sp.keys.server_write_MAC_key : sp.keys.client_write_MAC_key;
|
|
23083
23083
|
state.write.macKey = client ? sp.keys.client_write_MAC_key : sp.keys.server_write_MAC_key;
|
|
23084
23084
|
// cipher suite setup
|
|
23085
|
-
|
|
23085
|
+
c.session.cipherSuite.initConnectionState(state, c, sp);
|
|
23086
23086
|
// compression setup
|
|
23087
23087
|
switch(sp.compression_algorithm){
|
|
23088
23088
|
case $e55982d45da68b81$var$tls.CompressionMethod.none:
|
|
@@ -23477,8 +23477,8 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
23477
23477
|
var sp = c.session.sp;
|
|
23478
23478
|
sp.pre_master_secret = b.getBytes();
|
|
23479
23479
|
// RSA-encrypt the pre-master secret
|
|
23480
|
-
var
|
|
23481
|
-
b =
|
|
23480
|
+
var key = c.session.serverCertificate.publicKey;
|
|
23481
|
+
b = key.encrypt(sp.pre_master_secret);
|
|
23482
23482
|
/* Note: The encrypted pre-master secret will be stored in a
|
|
23483
23483
|
public-key-encrypted opaque vector that has the length prefixed using
|
|
23484
23484
|
2 bytes, so include those 2 bytes in the handshake message length. This
|
|
@@ -23518,14 +23518,14 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
23518
23518
|
*
|
|
23519
23519
|
* @param c the connection.
|
|
23520
23520
|
* @param callback the callback to call once the signed data is ready.
|
|
23521
|
-
*/ $e55982d45da68b81$var$tls.getClientSignature = function(
|
|
23521
|
+
*/ $e55982d45da68b81$var$tls.getClientSignature = function(c, callback) {
|
|
23522
23522
|
// generate data to RSA encrypt
|
|
23523
|
-
var
|
|
23524
|
-
|
|
23525
|
-
|
|
23526
|
-
|
|
23523
|
+
var b = $iGlOy.util.createBuffer();
|
|
23524
|
+
b.putBuffer(c.session.md5.digest());
|
|
23525
|
+
b.putBuffer(c.session.sha1.digest());
|
|
23526
|
+
b = b.getBytes();
|
|
23527
23527
|
// create default signing function as necessary
|
|
23528
|
-
|
|
23528
|
+
c.getSignature = c.getSignature || function(c, b, callback) {
|
|
23529
23529
|
// do rsa encryption, call callback
|
|
23530
23530
|
var privateKey = null;
|
|
23531
23531
|
if (c.getPrivateKey) try {
|
|
@@ -23554,7 +23554,7 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
23554
23554
|
callback(c, b);
|
|
23555
23555
|
};
|
|
23556
23556
|
// get client signature
|
|
23557
|
-
|
|
23557
|
+
c.getSignature(c, b, callback);
|
|
23558
23558
|
};
|
|
23559
23559
|
/**
|
|
23560
23560
|
* Creates a CertificateVerify message.
|
|
@@ -23645,8 +23645,8 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
23645
23645
|
certTypes.putByte(0x01);
|
|
23646
23646
|
// add distinguished names from CA store
|
|
23647
23647
|
var cAs = $iGlOy.util.createBuffer();
|
|
23648
|
-
for(var
|
|
23649
|
-
var cert = c.caStore.certs[
|
|
23648
|
+
for(var key in c.caStore.certs){
|
|
23649
|
+
var cert = c.caStore.certs[key];
|
|
23650
23650
|
var dn = $iGlOy.pki.distinguishedNameToAsn1(cert.subject);
|
|
23651
23651
|
var byteBuffer = $iGlOy.asn1.toDer(dn);
|
|
23652
23652
|
cAs.putInt16(byteBuffer.length());
|
|
@@ -23925,12 +23925,12 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
23925
23925
|
* authority at the end.
|
|
23926
23926
|
*
|
|
23927
23927
|
* @return true if successful, false if not.
|
|
23928
|
-
*/ $e55982d45da68b81$var$tls.verifyCertificateChain = function(c,
|
|
23928
|
+
*/ $e55982d45da68b81$var$tls.verifyCertificateChain = function(c, chain) {
|
|
23929
23929
|
try {
|
|
23930
23930
|
// Make a copy of c.verifyOptions so that we can modify options.verify
|
|
23931
23931
|
// without modifying c.verifyOptions.
|
|
23932
23932
|
var options = {};
|
|
23933
|
-
for(var
|
|
23933
|
+
for(var key in c.verifyOptions)options[key] = c.verifyOptions[key];
|
|
23934
23934
|
options.verify = function(vfd, depth, chain) {
|
|
23935
23935
|
// convert pki.certificateError to tls alert description
|
|
23936
23936
|
var desc = $e55982d45da68b81$var$_certErrorToAlertDesc(vfd);
|
|
@@ -23955,7 +23955,7 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
23955
23955
|
return ret;
|
|
23956
23956
|
};
|
|
23957
23957
|
// verify chain
|
|
23958
|
-
$iGlOy.pki.verifyCertificateChain(c.caStore,
|
|
23958
|
+
$iGlOy.pki.verifyCertificateChain(c.caStore, chain, options);
|
|
23959
23959
|
} catch (ex) {
|
|
23960
23960
|
// build tls error if not already customized
|
|
23961
23961
|
var err = ex;
|
|
@@ -23994,21 +23994,21 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
23994
23994
|
rval.capacity = Math.max(capacity || 100, 1);
|
|
23995
23995
|
rval.order = [];
|
|
23996
23996
|
// store order for sessions, delete session overflow
|
|
23997
|
-
for(var
|
|
23998
|
-
else delete cache[
|
|
23997
|
+
for(var key in cache)if (rval.order.length <= capacity) rval.order.push(key);
|
|
23998
|
+
else delete cache[key];
|
|
23999
23999
|
// get a session from a session ID (or get any session)
|
|
24000
24000
|
rval.getSession = function(sessionId) {
|
|
24001
24001
|
var session = null;
|
|
24002
|
-
var
|
|
24002
|
+
var key = null;
|
|
24003
24003
|
// if session ID provided, use it
|
|
24004
|
-
if (sessionId)
|
|
24004
|
+
if (sessionId) key = $iGlOy.util.bytesToHex(sessionId);
|
|
24005
24005
|
else if (rval.order.length > 0) // get first session from cache
|
|
24006
|
-
|
|
24007
|
-
if (
|
|
24006
|
+
key = rval.order[0];
|
|
24007
|
+
if (key !== null && key in rval.cache) {
|
|
24008
24008
|
// get cached session and remove from cache
|
|
24009
|
-
session = rval.cache[
|
|
24010
|
-
delete rval.cache[
|
|
24011
|
-
for(var i in rval.order)if (rval.order[i] ===
|
|
24009
|
+
session = rval.cache[key];
|
|
24010
|
+
delete rval.cache[key];
|
|
24011
|
+
for(var i in rval.order)if (rval.order[i] === key) {
|
|
24012
24012
|
rval.order.splice(i, 1);
|
|
24013
24013
|
break;
|
|
24014
24014
|
}
|
|
@@ -24019,13 +24019,13 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
24019
24019
|
rval.setSession = function(sessionId, session) {
|
|
24020
24020
|
// remove session from cache if at capacity
|
|
24021
24021
|
if (rval.order.length === rval.capacity) {
|
|
24022
|
-
var
|
|
24023
|
-
delete rval.cache[
|
|
24022
|
+
var key = rval.order.shift();
|
|
24023
|
+
delete rval.cache[key];
|
|
24024
24024
|
}
|
|
24025
24025
|
// add session to cache
|
|
24026
|
-
var
|
|
24027
|
-
rval.order.push(
|
|
24028
|
-
rval.cache[
|
|
24026
|
+
var key = $iGlOy.util.bytesToHex(sessionId);
|
|
24027
|
+
rval.order.push(key);
|
|
24028
|
+
rval.cache[key] = session;
|
|
24029
24029
|
};
|
|
24030
24030
|
}
|
|
24031
24031
|
return rval;
|
|
@@ -24050,14 +24050,14 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
24050
24050
|
var cipherSuites = options.cipherSuites || null;
|
|
24051
24051
|
if (cipherSuites === null) {
|
|
24052
24052
|
cipherSuites = [];
|
|
24053
|
-
for(var
|
|
24053
|
+
for(var key in $e55982d45da68b81$var$tls.CipherSuites)cipherSuites.push($e55982d45da68b81$var$tls.CipherSuites[key]);
|
|
24054
24054
|
}
|
|
24055
24055
|
// set default entity
|
|
24056
24056
|
var entity = options.server || false ? $e55982d45da68b81$var$tls.ConnectionEnd.server : $e55982d45da68b81$var$tls.ConnectionEnd.client;
|
|
24057
24057
|
// create session cache if requested
|
|
24058
24058
|
var sessionCache = options.sessionCache ? $e55982d45da68b81$var$tls.createSessionCache(options.sessionCache) : null;
|
|
24059
24059
|
// create TLS connection
|
|
24060
|
-
var
|
|
24060
|
+
var c = {
|
|
24061
24061
|
version: {
|
|
24062
24062
|
major: $e55982d45da68b81$var$tls.Version.major,
|
|
24063
24063
|
minor: $e55982d45da68b81$var$tls.Version.minor
|
|
@@ -24108,33 +24108,33 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
24108
24108
|
* Resets a closed TLS connection for reuse. Called in c.close().
|
|
24109
24109
|
*
|
|
24110
24110
|
* @param clearFail true to clear the fail flag (default: true).
|
|
24111
|
-
*/
|
|
24112
|
-
|
|
24111
|
+
*/ c.reset = function(clearFail) {
|
|
24112
|
+
c.version = {
|
|
24113
24113
|
major: $e55982d45da68b81$var$tls.Version.major,
|
|
24114
24114
|
minor: $e55982d45da68b81$var$tls.Version.minor
|
|
24115
24115
|
};
|
|
24116
|
-
|
|
24117
|
-
|
|
24118
|
-
|
|
24119
|
-
|
|
24116
|
+
c.record = null;
|
|
24117
|
+
c.session = null;
|
|
24118
|
+
c.peerCertificate = null;
|
|
24119
|
+
c.state = {
|
|
24120
24120
|
pending: null,
|
|
24121
24121
|
current: null
|
|
24122
24122
|
};
|
|
24123
|
-
|
|
24124
|
-
|
|
24125
|
-
|
|
24126
|
-
|
|
24127
|
-
|
|
24128
|
-
|
|
24129
|
-
|
|
24130
|
-
|
|
24131
|
-
|
|
24132
|
-
|
|
24133
|
-
|
|
24134
|
-
|
|
24123
|
+
c.expect = c.entity === $e55982d45da68b81$var$tls.ConnectionEnd.client ? $e55982d45da68b81$var$SHE : $e55982d45da68b81$var$CHE;
|
|
24124
|
+
c.fragmented = null;
|
|
24125
|
+
c.records = [];
|
|
24126
|
+
c.open = false;
|
|
24127
|
+
c.handshakes = 0;
|
|
24128
|
+
c.handshaking = false;
|
|
24129
|
+
c.isConnected = false;
|
|
24130
|
+
c.fail = !(clearFail || typeof clearFail === "undefined");
|
|
24131
|
+
c.input.clear();
|
|
24132
|
+
c.tlsData.clear();
|
|
24133
|
+
c.data.clear();
|
|
24134
|
+
c.state.current = $e55982d45da68b81$var$tls.createConnectionState(c);
|
|
24135
24135
|
};
|
|
24136
24136
|
// do initial reset of connection
|
|
24137
|
-
|
|
24137
|
+
c.reset();
|
|
24138
24138
|
/**
|
|
24139
24139
|
* Updates the current TLS engine state based on the given record.
|
|
24140
24140
|
*
|
|
@@ -24245,39 +24245,39 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
24245
24245
|
* This method should only be called if the connection is in client mode.
|
|
24246
24246
|
*
|
|
24247
24247
|
* @param sessionId the session ID to use, null to start a new one.
|
|
24248
|
-
*/
|
|
24248
|
+
*/ c.handshake = function(sessionId) {
|
|
24249
24249
|
// error to call this in non-client mode
|
|
24250
|
-
if (
|
|
24251
|
-
|
|
24250
|
+
if (c.entity !== $e55982d45da68b81$var$tls.ConnectionEnd.client) // not fatal error
|
|
24251
|
+
c.error(c, {
|
|
24252
24252
|
message: "Cannot initiate handshake as a server.",
|
|
24253
24253
|
fatal: false
|
|
24254
24254
|
});
|
|
24255
|
-
else if (
|
|
24256
|
-
|
|
24255
|
+
else if (c.handshaking) // handshake is already in progress, fail but not fatal error
|
|
24256
|
+
c.error(c, {
|
|
24257
24257
|
message: "Handshake already in progress.",
|
|
24258
24258
|
fatal: false
|
|
24259
24259
|
});
|
|
24260
24260
|
else {
|
|
24261
24261
|
// clear fail flag on reuse
|
|
24262
|
-
if (
|
|
24262
|
+
if (c.fail && !c.open && c.handshakes === 0) c.fail = false;
|
|
24263
24263
|
// now handshaking
|
|
24264
|
-
|
|
24264
|
+
c.handshaking = true;
|
|
24265
24265
|
// default to blank (new session)
|
|
24266
24266
|
sessionId = sessionId || "";
|
|
24267
24267
|
// if a session ID was specified, try to find it in the cache
|
|
24268
24268
|
var session = null;
|
|
24269
24269
|
if (sessionId.length > 0) {
|
|
24270
|
-
if (
|
|
24270
|
+
if (c.sessionCache) session = c.sessionCache.getSession(sessionId);
|
|
24271
24271
|
// matching session not found in cache, clear session ID
|
|
24272
24272
|
if (session === null) sessionId = "";
|
|
24273
24273
|
}
|
|
24274
24274
|
// no session given, grab a session from the cache, if available
|
|
24275
|
-
if (sessionId.length === 0 &&
|
|
24276
|
-
session =
|
|
24275
|
+
if (sessionId.length === 0 && c.sessionCache) {
|
|
24276
|
+
session = c.sessionCache.getSession();
|
|
24277
24277
|
if (session !== null) sessionId = session.id;
|
|
24278
24278
|
}
|
|
24279
24279
|
// set up session
|
|
24280
|
-
|
|
24280
|
+
c.session = {
|
|
24281
24281
|
id: sessionId,
|
|
24282
24282
|
version: null,
|
|
24283
24283
|
cipherSuite: null,
|
|
@@ -24292,19 +24292,19 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
24292
24292
|
// use existing session information
|
|
24293
24293
|
if (session) {
|
|
24294
24294
|
// only update version on connection, session version not yet set
|
|
24295
|
-
|
|
24296
|
-
|
|
24295
|
+
c.version = session.version;
|
|
24296
|
+
c.session.sp = session.sp;
|
|
24297
24297
|
}
|
|
24298
24298
|
// generate new client random
|
|
24299
|
-
|
|
24299
|
+
c.session.sp.client_random = $e55982d45da68b81$var$tls.createRandom().getBytes();
|
|
24300
24300
|
// connection now open
|
|
24301
|
-
|
|
24301
|
+
c.open = true;
|
|
24302
24302
|
// send hello
|
|
24303
|
-
$e55982d45da68b81$var$tls.queue(
|
|
24303
|
+
$e55982d45da68b81$var$tls.queue(c, $e55982d45da68b81$var$tls.createRecord(c, {
|
|
24304
24304
|
type: $e55982d45da68b81$var$tls.ContentType.handshake,
|
|
24305
|
-
data: $e55982d45da68b81$var$tls.createClientHello(
|
|
24305
|
+
data: $e55982d45da68b81$var$tls.createClientHello(c)
|
|
24306
24306
|
}));
|
|
24307
|
-
$e55982d45da68b81$var$tls.flush(
|
|
24307
|
+
$e55982d45da68b81$var$tls.flush(c);
|
|
24308
24308
|
}
|
|
24309
24309
|
};
|
|
24310
24310
|
/**
|
|
@@ -24315,21 +24315,21 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
24315
24315
|
*
|
|
24316
24316
|
* @return 0 if the data could be processed, otherwise the number of bytes
|
|
24317
24317
|
* required for data to be processed.
|
|
24318
|
-
*/
|
|
24318
|
+
*/ c.process = function(data) {
|
|
24319
24319
|
var rval = 0;
|
|
24320
24320
|
// buffer input data
|
|
24321
|
-
if (data)
|
|
24321
|
+
if (data) c.input.putBytes(data);
|
|
24322
24322
|
// process next record if no failure, process will be called after
|
|
24323
24323
|
// each record is handled (since handling can be asynchronous)
|
|
24324
|
-
if (!
|
|
24324
|
+
if (!c.fail) {
|
|
24325
24325
|
// reset record if ready and now empty
|
|
24326
|
-
if (
|
|
24326
|
+
if (c.record !== null && c.record.ready && c.record.fragment.isEmpty()) c.record = null;
|
|
24327
24327
|
// if there is no pending record, try to read record header
|
|
24328
|
-
if (
|
|
24328
|
+
if (c.record === null) rval = _readRecordHeader(c);
|
|
24329
24329
|
// read the next record (if record not yet ready)
|
|
24330
|
-
if (!
|
|
24330
|
+
if (!c.fail && c.record !== null && !c.record.ready) rval = _readRecord(c);
|
|
24331
24331
|
// record ready to be handled, update engine state
|
|
24332
|
-
if (!
|
|
24332
|
+
if (!c.fail && c.record !== null && c.record.ready) _update(c, c.record);
|
|
24333
24333
|
}
|
|
24334
24334
|
return rval;
|
|
24335
24335
|
};
|
|
@@ -24343,12 +24343,12 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
24343
24343
|
* of util.encodeUtf8(str).
|
|
24344
24344
|
*
|
|
24345
24345
|
* @return true on success, false on failure.
|
|
24346
|
-
*/
|
|
24347
|
-
$e55982d45da68b81$var$tls.queue(
|
|
24346
|
+
*/ c.prepare = function(data) {
|
|
24347
|
+
$e55982d45da68b81$var$tls.queue(c, $e55982d45da68b81$var$tls.createRecord(c, {
|
|
24348
24348
|
type: $e55982d45da68b81$var$tls.ContentType.application_data,
|
|
24349
24349
|
data: $iGlOy.util.createBuffer(data)
|
|
24350
24350
|
}));
|
|
24351
|
-
return $e55982d45da68b81$var$tls.flush(
|
|
24351
|
+
return $e55982d45da68b81$var$tls.flush(c);
|
|
24352
24352
|
};
|
|
24353
24353
|
/**
|
|
24354
24354
|
* Requests that a heartbeat request be packaged into a TLS record for
|
|
@@ -24364,53 +24364,53 @@ $e55982d45da68b81$var$hsTable[$e55982d45da68b81$var$tls.ConnectionEnd.server] =
|
|
|
24364
24364
|
* actual payload length.
|
|
24365
24365
|
*
|
|
24366
24366
|
* @return true on success, false on failure.
|
|
24367
|
-
*/
|
|
24367
|
+
*/ c.prepareHeartbeatRequest = function(payload, payloadLength) {
|
|
24368
24368
|
if (payload instanceof $iGlOy.util.ByteBuffer) payload = payload.bytes();
|
|
24369
24369
|
if (typeof payloadLength === "undefined") payloadLength = payload.length;
|
|
24370
|
-
|
|
24371
|
-
$e55982d45da68b81$var$tls.queue(
|
|
24370
|
+
c.expectedHeartbeatPayload = payload;
|
|
24371
|
+
$e55982d45da68b81$var$tls.queue(c, $e55982d45da68b81$var$tls.createRecord(c, {
|
|
24372
24372
|
type: $e55982d45da68b81$var$tls.ContentType.heartbeat,
|
|
24373
24373
|
data: $e55982d45da68b81$var$tls.createHeartbeat($e55982d45da68b81$var$tls.HeartbeatMessageType.heartbeat_request, payload, payloadLength)
|
|
24374
24374
|
}));
|
|
24375
|
-
return $e55982d45da68b81$var$tls.flush(
|
|
24375
|
+
return $e55982d45da68b81$var$tls.flush(c);
|
|
24376
24376
|
};
|
|
24377
24377
|
/**
|
|
24378
24378
|
* Closes the connection (sends a close_notify alert).
|
|
24379
24379
|
*
|
|
24380
24380
|
* @param clearFail true to clear the fail flag (default: true).
|
|
24381
|
-
*/
|
|
24381
|
+
*/ c.close = function(clearFail) {
|
|
24382
24382
|
// save session if connection didn't fail
|
|
24383
|
-
if (!
|
|
24383
|
+
if (!c.fail && c.sessionCache && c.session) {
|
|
24384
24384
|
// only need to preserve session ID, version, and security params
|
|
24385
24385
|
var session = {
|
|
24386
|
-
id:
|
|
24387
|
-
version:
|
|
24388
|
-
sp:
|
|
24386
|
+
id: c.session.id,
|
|
24387
|
+
version: c.session.version,
|
|
24388
|
+
sp: c.session.sp
|
|
24389
24389
|
};
|
|
24390
24390
|
session.sp.keys = null;
|
|
24391
|
-
|
|
24391
|
+
c.sessionCache.setSession(session.id, session);
|
|
24392
24392
|
}
|
|
24393
|
-
if (
|
|
24393
|
+
if (c.open) {
|
|
24394
24394
|
// connection no longer open, clear input
|
|
24395
|
-
|
|
24396
|
-
|
|
24395
|
+
c.open = false;
|
|
24396
|
+
c.input.clear();
|
|
24397
24397
|
// if connected or handshaking, send an alert
|
|
24398
|
-
if (
|
|
24399
|
-
|
|
24398
|
+
if (c.isConnected || c.handshaking) {
|
|
24399
|
+
c.isConnected = c.handshaking = false;
|
|
24400
24400
|
// send close_notify alert
|
|
24401
|
-
$e55982d45da68b81$var$tls.queue(
|
|
24401
|
+
$e55982d45da68b81$var$tls.queue(c, $e55982d45da68b81$var$tls.createAlert(c, {
|
|
24402
24402
|
level: $e55982d45da68b81$var$tls.Alert.Level.warning,
|
|
24403
24403
|
description: $e55982d45da68b81$var$tls.Alert.Description.close_notify
|
|
24404
24404
|
}));
|
|
24405
|
-
$e55982d45da68b81$var$tls.flush(
|
|
24405
|
+
$e55982d45da68b81$var$tls.flush(c);
|
|
24406
24406
|
}
|
|
24407
24407
|
// call handler
|
|
24408
|
-
|
|
24408
|
+
c.closed(c);
|
|
24409
24409
|
}
|
|
24410
24410
|
// reset TLS connection, do not clear fail flag
|
|
24411
|
-
|
|
24411
|
+
c.reset(clearFail);
|
|
24412
24412
|
};
|
|
24413
|
-
return
|
|
24413
|
+
return c;
|
|
24414
24414
|
};
|
|
24415
24415
|
/* TLS API */ $e55982d45da68b81$exports = $iGlOy.tls = $iGlOy.tls || {};
|
|
24416
24416
|
// expose non-functions
|
|
@@ -26874,15 +26874,15 @@ for(var $4b898e145571f67c$var$i = 0; $4b898e145571f67c$var$i < $iGlOy.log.levels
|
|
|
26874
26874
|
* @param message message object
|
|
26875
26875
|
*/ $iGlOy.log.logMessage = function(message) {
|
|
26876
26876
|
var messageLevelIndex = $4b898e145571f67c$var$sLevelInfo[message.level].index;
|
|
26877
|
-
for(var
|
|
26878
|
-
var
|
|
26879
|
-
if (
|
|
26877
|
+
for(var i = 0; i < $4b898e145571f67c$var$sLoggers.length; ++i){
|
|
26878
|
+
var logger = $4b898e145571f67c$var$sLoggers[i];
|
|
26879
|
+
if (logger.flags & $iGlOy.log.NO_LEVEL_CHECK) logger.f(message);
|
|
26880
26880
|
else {
|
|
26881
26881
|
// get logger level
|
|
26882
|
-
var loggerLevelIndex = $4b898e145571f67c$var$sLevelInfo[
|
|
26882
|
+
var loggerLevelIndex = $4b898e145571f67c$var$sLevelInfo[logger.level].index;
|
|
26883
26883
|
// check level
|
|
26884
26884
|
if (messageLevelIndex <= loggerLevelIndex) // message critical enough, call logger
|
|
26885
|
-
|
|
26885
|
+
logger.f(logger, message);
|
|
26886
26886
|
}
|
|
26887
26887
|
}
|
|
26888
26888
|
};
|
|
@@ -26968,12 +26968,12 @@ for(var $4b898e145571f67c$var$i = 0; $4b898e145571f67c$var$i < $4b898e145571f67c
|
|
|
26968
26968
|
*
|
|
26969
26969
|
* @return a logger object.
|
|
26970
26970
|
*/ $iGlOy.log.makeLogger = function(logFunction) {
|
|
26971
|
-
var
|
|
26971
|
+
var logger = {
|
|
26972
26972
|
flags: 0,
|
|
26973
26973
|
f: logFunction
|
|
26974
26974
|
};
|
|
26975
|
-
$iGlOy.log.setLevel(
|
|
26976
|
-
return
|
|
26975
|
+
$iGlOy.log.setLevel(logger, "none");
|
|
26976
|
+
return logger;
|
|
26977
26977
|
};
|
|
26978
26978
|
/**
|
|
26979
26979
|
* Sets the current log level on a logger.
|
|
@@ -26982,13 +26982,13 @@ for(var $4b898e145571f67c$var$i = 0; $4b898e145571f67c$var$i < $4b898e145571f67c
|
|
|
26982
26982
|
* @param level the new maximum log level as a string.
|
|
26983
26983
|
*
|
|
26984
26984
|
* @return true if set, false if not.
|
|
26985
|
-
*/ $iGlOy.log.setLevel = function(
|
|
26985
|
+
*/ $iGlOy.log.setLevel = function(logger, level) {
|
|
26986
26986
|
var rval = false;
|
|
26987
|
-
if (
|
|
26988
|
-
var aValidLevel = $iGlOy.log.levels[
|
|
26987
|
+
if (logger && !(logger.flags & $iGlOy.log.LEVEL_LOCKED)) for(var i = 0; i < $iGlOy.log.levels.length; ++i){
|
|
26988
|
+
var aValidLevel = $iGlOy.log.levels[i];
|
|
26989
26989
|
if (level == aValidLevel) {
|
|
26990
26990
|
// set level
|
|
26991
|
-
|
|
26991
|
+
logger.level = level;
|
|
26992
26992
|
rval = true;
|
|
26993
26993
|
break;
|
|
26994
26994
|
}
|
|
@@ -27000,16 +27000,16 @@ for(var $4b898e145571f67c$var$i = 0; $4b898e145571f67c$var$i < $4b898e145571f67c
|
|
|
27000
27000
|
*
|
|
27001
27001
|
* @param logger the target logger.
|
|
27002
27002
|
* @param lock boolean lock value, default to true.
|
|
27003
|
-
*/ $iGlOy.log.lock = function(
|
|
27004
|
-
if (typeof
|
|
27005
|
-
else
|
|
27003
|
+
*/ $iGlOy.log.lock = function(logger, lock) {
|
|
27004
|
+
if (typeof lock === "undefined" || lock) logger.flags |= $iGlOy.log.LEVEL_LOCKED;
|
|
27005
|
+
else logger.flags &= ~$iGlOy.log.LEVEL_LOCKED;
|
|
27006
27006
|
};
|
|
27007
27007
|
/**
|
|
27008
27008
|
* Adds a logger.
|
|
27009
27009
|
*
|
|
27010
27010
|
* @param logger the logger object.
|
|
27011
|
-
*/ $iGlOy.log.addLogger = function(
|
|
27012
|
-
$4b898e145571f67c$var$sLoggers.push(
|
|
27011
|
+
*/ $iGlOy.log.addLogger = function(logger) {
|
|
27012
|
+
$4b898e145571f67c$var$sLoggers.push(logger);
|
|
27013
27013
|
};
|
|
27014
27014
|
// setup the console logger if possible, else create fake console.log
|
|
27015
27015
|
if (typeof console !== "undefined" && "log" in console) {
|
|
@@ -28634,7 +28634,7 @@ $d0a07df29ef1b0fa$export$a287f47fed4544b8 = (num)=>{
|
|
|
28634
28634
|
if (typeof num === "string" && num.trim() !== "") return Number.isInteger(Number(num));
|
|
28635
28635
|
return false;
|
|
28636
28636
|
};
|
|
28637
|
-
$d0a07df29ef1b0fa$export$71aa6c912b956294 = (
|
|
28637
|
+
$d0a07df29ef1b0fa$export$71aa6c912b956294 = (node, type)=>node.nodes.find((node)=>node.type === type);
|
|
28638
28638
|
$d0a07df29ef1b0fa$export$fbadac39f36b1e16 = (min, max, step = 1, limit)=>{
|
|
28639
28639
|
if (limit === false) return false;
|
|
28640
28640
|
if (!$d0a07df29ef1b0fa$export$a287f47fed4544b8(min) || !$d0a07df29ef1b0fa$export$a287f47fed4544b8(max)) return false;
|
|
@@ -28859,20 +28859,20 @@ function $07628d57aabb0c0b$var$splitToPatterns(min, max, tok, options) {
|
|
|
28859
28859
|
let start = min;
|
|
28860
28860
|
let prev;
|
|
28861
28861
|
for(let i = 0; i < ranges.length; i++){
|
|
28862
|
-
let
|
|
28863
|
-
let obj = $07628d57aabb0c0b$var$rangeToPattern(String(start), String(
|
|
28862
|
+
let max1 = ranges[i];
|
|
28863
|
+
let obj = $07628d57aabb0c0b$var$rangeToPattern(String(start), String(max1), options);
|
|
28864
28864
|
let zeros = "";
|
|
28865
28865
|
if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
|
|
28866
28866
|
if (prev.count.length > 1) prev.count.pop();
|
|
28867
28867
|
prev.count.push(obj.count[0]);
|
|
28868
28868
|
prev.string = prev.pattern + $07628d57aabb0c0b$var$toQuantifier(prev.count);
|
|
28869
|
-
start =
|
|
28869
|
+
start = max1 + 1;
|
|
28870
28870
|
continue;
|
|
28871
28871
|
}
|
|
28872
|
-
if (tok.isPadded) zeros = $07628d57aabb0c0b$var$padZeros(
|
|
28872
|
+
if (tok.isPadded) zeros = $07628d57aabb0c0b$var$padZeros(max1, tok, options);
|
|
28873
28873
|
obj.string = zeros + obj.pattern + $07628d57aabb0c0b$var$toQuantifier(obj.count);
|
|
28874
28874
|
tokens.push(obj);
|
|
28875
|
-
start =
|
|
28875
|
+
start = max1 + 1;
|
|
28876
28876
|
prev = obj;
|
|
28877
28877
|
}
|
|
28878
28878
|
return tokens;
|
|
@@ -29426,18 +29426,18 @@ var $88c0a7901dd4a8c2$require$CHAR_ZERO_WIDTH_NOBREAK_SPACE = $f1bb1ac16e435177$
|
|
|
29426
29426
|
* Quotes: '|"|`
|
|
29427
29427
|
*/ if (value === $88c0a7901dd4a8c2$require$CHAR_DOUBLE_QUOTE || value === $88c0a7901dd4a8c2$require$CHAR_SINGLE_QUOTE || value === $88c0a7901dd4a8c2$require$CHAR_BACKTICK) {
|
|
29428
29428
|
let open = value;
|
|
29429
|
-
let
|
|
29429
|
+
let next1;
|
|
29430
29430
|
if (options.keepQuotes !== true) value = "";
|
|
29431
|
-
while(index < length && (
|
|
29432
|
-
if (
|
|
29433
|
-
value +=
|
|
29431
|
+
while(index < length && (next1 = advance())){
|
|
29432
|
+
if (next1 === $88c0a7901dd4a8c2$require$CHAR_BACKSLASH) {
|
|
29433
|
+
value += next1 + advance();
|
|
29434
29434
|
continue;
|
|
29435
29435
|
}
|
|
29436
|
-
if (
|
|
29437
|
-
if (options.keepQuotes === true) value +=
|
|
29436
|
+
if (next1 === open) {
|
|
29437
|
+
if (options.keepQuotes === true) value += next1;
|
|
29438
29438
|
break;
|
|
29439
29439
|
}
|
|
29440
|
-
value +=
|
|
29440
|
+
value += next1;
|
|
29441
29441
|
}
|
|
29442
29442
|
push({
|
|
29443
29443
|
type: "text",
|
|
@@ -29494,9 +29494,9 @@ var $88c0a7901dd4a8c2$require$CHAR_ZERO_WIDTH_NOBREAK_SPACE = $f1bb1ac16e435177$
|
|
|
29494
29494
|
*/ if (value === $88c0a7901dd4a8c2$require$CHAR_COMMA && depth > 0) {
|
|
29495
29495
|
if (block.ranges > 0) {
|
|
29496
29496
|
block.ranges = 0;
|
|
29497
|
-
let
|
|
29497
|
+
let open1 = block.nodes.shift();
|
|
29498
29498
|
block.nodes = [
|
|
29499
|
-
|
|
29499
|
+
open1,
|
|
29500
29500
|
{
|
|
29501
29501
|
type: "text",
|
|
29502
29502
|
value: $156a1a36db86ccbd$exports(block)
|
|
@@ -29570,9 +29570,9 @@ var $88c0a7901dd4a8c2$require$CHAR_ZERO_WIDTH_NOBREAK_SPACE = $f1bb1ac16e435177$
|
|
|
29570
29570
|
});
|
|
29571
29571
|
// get the location of the block on parent.nodes (block's siblings)
|
|
29572
29572
|
let parent = stack[stack.length - 1];
|
|
29573
|
-
let
|
|
29573
|
+
let index1 = parent.nodes.indexOf(block);
|
|
29574
29574
|
// replace the (invalid) block with it's nodes
|
|
29575
|
-
parent.nodes.splice(
|
|
29575
|
+
parent.nodes.splice(index1, 1, ...block.nodes);
|
|
29576
29576
|
}
|
|
29577
29577
|
}while (stack.length > 0);
|
|
29578
29578
|
push({
|
|
@@ -31734,13 +31734,13 @@ function $b57e78be4f7a2622$var$FastGlob(source, options) {
|
|
|
31734
31734
|
}
|
|
31735
31735
|
// https://github.com/typescript-eslint/typescript-eslint/issues/60
|
|
31736
31736
|
// eslint-disable-next-line no-redeclare
|
|
31737
|
-
(function(
|
|
31737
|
+
(function(FastGlob) {
|
|
31738
31738
|
function sync(source, options) {
|
|
31739
31739
|
$b57e78be4f7a2622$var$assertPatternsInput(source);
|
|
31740
31740
|
const works = $b57e78be4f7a2622$var$getWorks(source, $449ae2813b11b2d5$exports.default, options);
|
|
31741
31741
|
return $1b5b082adfcf5f99$exports.array.flatten(works);
|
|
31742
31742
|
}
|
|
31743
|
-
|
|
31743
|
+
FastGlob.sync = sync;
|
|
31744
31744
|
function stream(source, options) {
|
|
31745
31745
|
$b57e78be4f7a2622$var$assertPatternsInput(source);
|
|
31746
31746
|
const works = $b57e78be4f7a2622$var$getWorks(source, $434410c8b70ca432$exports.default, options);
|
|
@@ -31750,25 +31750,25 @@ function $b57e78be4f7a2622$var$FastGlob(source, options) {
|
|
|
31750
31750
|
* This affects performance (+25%). I don't see best solution right now.
|
|
31751
31751
|
*/ return $1b5b082adfcf5f99$exports.stream.merge(works);
|
|
31752
31752
|
}
|
|
31753
|
-
|
|
31753
|
+
FastGlob.stream = stream;
|
|
31754
31754
|
function generateTasks(source, options) {
|
|
31755
31755
|
$b57e78be4f7a2622$var$assertPatternsInput(source);
|
|
31756
31756
|
const patterns = [].concat(source);
|
|
31757
31757
|
const settings = new $1d7e3dfd05c8321e$exports.default(options);
|
|
31758
31758
|
return $d436392a45e5b9b4$exports.generate(patterns, settings);
|
|
31759
31759
|
}
|
|
31760
|
-
|
|
31760
|
+
FastGlob.generateTasks = generateTasks;
|
|
31761
31761
|
function isDynamicPattern(source, options) {
|
|
31762
31762
|
$b57e78be4f7a2622$var$assertPatternsInput(source);
|
|
31763
31763
|
const settings = new $1d7e3dfd05c8321e$exports.default(options);
|
|
31764
31764
|
return $1b5b082adfcf5f99$exports.pattern.isDynamicPattern(source, settings);
|
|
31765
31765
|
}
|
|
31766
|
-
|
|
31766
|
+
FastGlob.isDynamicPattern = isDynamicPattern;
|
|
31767
31767
|
function escapePath(source) {
|
|
31768
31768
|
$b57e78be4f7a2622$var$assertPatternsInput(source);
|
|
31769
31769
|
return $1b5b082adfcf5f99$exports.path.escape(source);
|
|
31770
31770
|
}
|
|
31771
|
-
|
|
31771
|
+
FastGlob.escapePath = escapePath;
|
|
31772
31772
|
})($b57e78be4f7a2622$var$FastGlob || ($b57e78be4f7a2622$var$FastGlob = {}));
|
|
31773
31773
|
function $b57e78be4f7a2622$var$getWorks(source, _Provider, options) {
|
|
31774
31774
|
const patterns = [].concat(source);
|
|
@@ -31811,14 +31811,14 @@ function $3dff16cfd200ff25$export$7413eea5ad243d4(from, to, leadingDotSlash = tr
|
|
|
31811
31811
|
function $e8d0e504a4244d84$export$f3a2344a73dbdd42(p) {
|
|
31812
31812
|
return (0, (/*@__PURE__*/$parcel$interopDefault($5aee5a8e09e874bf$exports)))((0, $3dff16cfd200ff25$export$16778b798ae8e49d)(p));
|
|
31813
31813
|
}
|
|
31814
|
-
function $e8d0e504a4244d84$export$16e6d319a883f04e(filePath,
|
|
31815
|
-
|
|
31816
|
-
return (0, $fec3b4fc54d3756a$exports.isMatch)(filePath,
|
|
31814
|
+
function $e8d0e504a4244d84$export$16e6d319a883f04e(filePath, glob, opts) {
|
|
31815
|
+
glob = Array.isArray(glob) ? glob.map((0, $3dff16cfd200ff25$export$16778b798ae8e49d)) : (0, $3dff16cfd200ff25$export$16778b798ae8e49d)(glob);
|
|
31816
|
+
return (0, $fec3b4fc54d3756a$exports.isMatch)(filePath, glob, opts);
|
|
31817
31817
|
}
|
|
31818
|
-
function $e8d0e504a4244d84$export$c0436a5422df81e4(
|
|
31819
|
-
return (0, $fec3b4fc54d3756a$exports.makeRe)(
|
|
31818
|
+
function $e8d0e504a4244d84$export$c0436a5422df81e4(glob, opts) {
|
|
31819
|
+
return (0, $fec3b4fc54d3756a$exports.makeRe)(glob, opts);
|
|
31820
31820
|
}
|
|
31821
|
-
function $e8d0e504a4244d84$export$42275ba87174c828(
|
|
31821
|
+
function $e8d0e504a4244d84$export$42275ba87174c828(p, fs, options) {
|
|
31822
31822
|
// $FlowFixMe
|
|
31823
31823
|
options = {
|
|
31824
31824
|
...options,
|
|
@@ -31836,9 +31836,9 @@ function $e8d0e504a4244d84$export$42275ba87174c828(p1, fs, options) {
|
|
|
31836
31836
|
}
|
|
31837
31837
|
}
|
|
31838
31838
|
}; // $FlowFixMe
|
|
31839
|
-
return (0, (/*@__PURE__*/$parcel$interopDefault($b57e78be4f7a2622$exports))).sync((0, $3dff16cfd200ff25$export$16778b798ae8e49d)(
|
|
31839
|
+
return (0, (/*@__PURE__*/$parcel$interopDefault($b57e78be4f7a2622$exports))).sync((0, $3dff16cfd200ff25$export$16778b798ae8e49d)(p), options);
|
|
31840
31840
|
}
|
|
31841
|
-
function $e8d0e504a4244d84$export$442f1a04865e4790(
|
|
31841
|
+
function $e8d0e504a4244d84$export$442f1a04865e4790(p, fs, options) {
|
|
31842
31842
|
// $FlowFixMe
|
|
31843
31843
|
options = {
|
|
31844
31844
|
...options,
|
|
@@ -31872,7 +31872,7 @@ function $e8d0e504a4244d84$export$442f1a04865e4790(p2, fs, options) {
|
|
|
31872
31872
|
}
|
|
31873
31873
|
}
|
|
31874
31874
|
}; // $FlowFixMe Added in Flow 0.121.0 upgrade in #4381
|
|
31875
|
-
return (0, (/*@__PURE__*/$parcel$interopDefault($b57e78be4f7a2622$exports)))((0, $3dff16cfd200ff25$export$16778b798ae8e49d)(
|
|
31875
|
+
return (0, (/*@__PURE__*/$parcel$interopDefault($b57e78be4f7a2622$exports)))((0, $3dff16cfd200ff25$export$16778b798ae8e49d)(p), options);
|
|
31876
31876
|
}
|
|
31877
31877
|
|
|
31878
31878
|
|
|
@@ -32202,8 +32202,8 @@ function $007fe08032bb1964$var$supportsHyperlink(stream) {
|
|
|
32202
32202
|
if ("VTE_VERSION" in env) {
|
|
32203
32203
|
// 0.50.0 was supposed to support hyperlinks, but throws a segfault
|
|
32204
32204
|
if (env.VTE_VERSION === "0.50.0") return false;
|
|
32205
|
-
const
|
|
32206
|
-
return
|
|
32205
|
+
const version1 = $007fe08032bb1964$var$parseVersion(env.VTE_VERSION);
|
|
32206
|
+
return version1.major > 0 || version1.minor >= 50;
|
|
32207
32207
|
}
|
|
32208
32208
|
return false;
|
|
32209
32209
|
}
|
|
@@ -32421,46 +32421,46 @@ const $f48e6c7a66080865$var$myers_x = (b, a)=>{
|
|
|
32421
32421
|
while(k--)$f48e6c7a66080865$var$peq[a.charCodeAt(k)] = 0;
|
|
32422
32422
|
for(k = start; k < start + vlen; k++)$f48e6c7a66080865$var$peq[b.charCodeAt(k)] |= 1 << k;
|
|
32423
32423
|
score = m;
|
|
32424
|
-
for(let
|
|
32425
|
-
const eq = $f48e6c7a66080865$var$peq[a.charCodeAt(
|
|
32426
|
-
const pb = phc[
|
|
32427
|
-
const mb = mhc[
|
|
32424
|
+
for(let i1 = 0; i1 < n; i1++){
|
|
32425
|
+
const eq = $f48e6c7a66080865$var$peq[a.charCodeAt(i1)];
|
|
32426
|
+
const pb = phc[i1 / 32 | 0] >>> i1 % 32 & 1;
|
|
32427
|
+
const mb = mhc[i1 / 32 | 0] >>> i1 % 32 & 1;
|
|
32428
32428
|
const xv = eq | mv;
|
|
32429
32429
|
const xh = ((eq | mb) & pv) + pv ^ pv | eq | mb;
|
|
32430
32430
|
let ph = mv | ~(xh | pv);
|
|
32431
32431
|
let mh = pv & xh;
|
|
32432
|
-
if (ph >>> 31 ^ pb) phc[
|
|
32433
|
-
if (mh >>> 31 ^ mb) mhc[
|
|
32432
|
+
if (ph >>> 31 ^ pb) phc[i1 / 32 | 0] ^= 1 << i1 % 32;
|
|
32433
|
+
if (mh >>> 31 ^ mb) mhc[i1 / 32 | 0] ^= 1 << i1 % 32;
|
|
32434
32434
|
ph = ph << 1 | pb;
|
|
32435
32435
|
mh = mh << 1 | mb;
|
|
32436
32436
|
pv = mh | ~(xv | ph);
|
|
32437
32437
|
mv = ph & xv;
|
|
32438
32438
|
}
|
|
32439
32439
|
}
|
|
32440
|
-
let
|
|
32441
|
-
let
|
|
32442
|
-
const
|
|
32443
|
-
const
|
|
32444
|
-
let
|
|
32445
|
-
while(
|
|
32446
|
-
for(
|
|
32440
|
+
let mv1 = 0;
|
|
32441
|
+
let pv1 = -1;
|
|
32442
|
+
const start1 = j * 32;
|
|
32443
|
+
const vlen1 = Math.min(32, m - start1);
|
|
32444
|
+
let k1 = n;
|
|
32445
|
+
while(k1--)$f48e6c7a66080865$var$peq[a.charCodeAt(k1)] = 0;
|
|
32446
|
+
for(k1 = start1; k1 < start1 + vlen1; k1++)$f48e6c7a66080865$var$peq[b.charCodeAt(k1)] |= 1 << k1;
|
|
32447
32447
|
score = m;
|
|
32448
|
-
for(let
|
|
32449
|
-
const
|
|
32450
|
-
const
|
|
32451
|
-
const
|
|
32452
|
-
const
|
|
32453
|
-
const
|
|
32454
|
-
let
|
|
32455
|
-
let
|
|
32456
|
-
score +=
|
|
32457
|
-
score -=
|
|
32458
|
-
if (
|
|
32459
|
-
if (
|
|
32460
|
-
|
|
32461
|
-
|
|
32462
|
-
|
|
32463
|
-
|
|
32448
|
+
for(let i2 = 0; i2 < n; i2++){
|
|
32449
|
+
const eq1 = $f48e6c7a66080865$var$peq[a.charCodeAt(i2)];
|
|
32450
|
+
const pb1 = phc[i2 / 32 | 0] >>> i2 % 32 & 1;
|
|
32451
|
+
const mb1 = mhc[i2 / 32 | 0] >>> i2 % 32 & 1;
|
|
32452
|
+
const xv1 = eq1 | mv1;
|
|
32453
|
+
const xh1 = ((eq1 | mb1) & pv1) + pv1 ^ pv1 | eq1 | mb1;
|
|
32454
|
+
let ph1 = mv1 | ~(xh1 | pv1);
|
|
32455
|
+
let mh1 = pv1 & xh1;
|
|
32456
|
+
score += ph1 >>> m % 32 - 1 & 1;
|
|
32457
|
+
score -= mh1 >>> m % 32 - 1 & 1;
|
|
32458
|
+
if (ph1 >>> 31 ^ pb1) phc[i2 / 32 | 0] ^= 1 << i2 % 32;
|
|
32459
|
+
if (mh1 >>> 31 ^ mb1) mhc[i2 / 32 | 0] ^= 1 << i2 % 32;
|
|
32460
|
+
ph1 = ph1 << 1 | pb1;
|
|
32461
|
+
mh1 = mh1 << 1 | mb1;
|
|
32462
|
+
pv1 = mh1 | ~(xv1 | ph1);
|
|
32463
|
+
mv1 = ph1 & xv1;
|
|
32464
32464
|
}
|
|
32465
32465
|
return score;
|
|
32466
32466
|
};
|
|
@@ -32545,14 +32545,14 @@ function $4ca1027d34905147$var$validateSchema(schema, data) {
|
|
|
32545
32545
|
case "number":
|
|
32546
32546
|
{
|
|
32547
32547
|
// $FlowFixMe type was already checked
|
|
32548
|
-
let
|
|
32548
|
+
let value1 = dataNode;
|
|
32549
32549
|
if (schemaNode.enum) {
|
|
32550
|
-
if (!schemaNode.enum.includes(
|
|
32550
|
+
if (!schemaNode.enum.includes(value1)) return {
|
|
32551
32551
|
type: "enum",
|
|
32552
32552
|
dataType: "value",
|
|
32553
32553
|
dataPath: dataPath,
|
|
32554
32554
|
expectedValues: schemaNode.enum,
|
|
32555
|
-
actualValue:
|
|
32555
|
+
actualValue: value1,
|
|
32556
32556
|
ancestors: schemaAncestors
|
|
32557
32557
|
};
|
|
32558
32558
|
}
|
|
@@ -32560,13 +32560,13 @@ function $4ca1027d34905147$var$validateSchema(schema, data) {
|
|
|
32560
32560
|
}
|
|
32561
32561
|
case "object":
|
|
32562
32562
|
{
|
|
32563
|
-
let
|
|
32563
|
+
let results1 = [];
|
|
32564
32564
|
let invalidProps;
|
|
32565
32565
|
if (schemaNode.__forbiddenProperties) {
|
|
32566
32566
|
// $FlowFixMe type was already checked
|
|
32567
32567
|
let keys = Object.keys(dataNode);
|
|
32568
32568
|
invalidProps = schemaNode.__forbiddenProperties.filter((val)=>keys.includes(val));
|
|
32569
|
-
|
|
32569
|
+
results1.push(...invalidProps.map((k)=>({
|
|
32570
32570
|
type: "forbidden-prop",
|
|
32571
32571
|
dataPath: dataPath + "/" + (0, $8C1kk$parceldiagnostic.encodeJSONKeyComponent)(k),
|
|
32572
32572
|
dataType: "key",
|
|
@@ -32578,15 +32578,15 @@ function $4ca1027d34905147$var$validateSchema(schema, data) {
|
|
|
32578
32578
|
}
|
|
32579
32579
|
if (schemaNode.required) {
|
|
32580
32580
|
// $FlowFixMe type was already checked
|
|
32581
|
-
let
|
|
32582
|
-
let missingKeys = schemaNode.required.filter((val)=>!
|
|
32583
|
-
|
|
32581
|
+
let keys1 = Object.keys(dataNode);
|
|
32582
|
+
let missingKeys = schemaNode.required.filter((val)=>!keys1.includes(val));
|
|
32583
|
+
results1.push(...missingKeys.map((k)=>({
|
|
32584
32584
|
type: "missing-prop",
|
|
32585
32585
|
dataPath: dataPath,
|
|
32586
32586
|
dataType: "value",
|
|
32587
32587
|
prop: k,
|
|
32588
32588
|
expectedProps: schemaNode.required,
|
|
32589
|
-
actualProps:
|
|
32589
|
+
actualProps: keys1,
|
|
32590
32590
|
ancestors: schemaAncestors
|
|
32591
32591
|
})));
|
|
32592
32592
|
}
|
|
@@ -32595,13 +32595,13 @@ function $4ca1027d34905147$var$validateSchema(schema, data) {
|
|
|
32595
32595
|
for(let k in dataNode){
|
|
32596
32596
|
if (invalidProps && invalidProps.includes(k)) continue;
|
|
32597
32597
|
else if (k in schemaNode.properties) {
|
|
32598
|
-
let
|
|
32598
|
+
let result1 = walk([
|
|
32599
32599
|
schemaNode.properties[k]
|
|
32600
32600
|
].concat(schemaAncestors), dataNode[k], dataPath + "/" + (0, $8C1kk$parceldiagnostic.encodeJSONKeyComponent)(k));
|
|
32601
|
-
if (
|
|
32601
|
+
if (result1) results1.push(result1);
|
|
32602
32602
|
} else {
|
|
32603
32603
|
if (typeof additionalProperties === "boolean") {
|
|
32604
|
-
if (!additionalProperties)
|
|
32604
|
+
if (!additionalProperties) results1.push({
|
|
32605
32605
|
type: "enum",
|
|
32606
32606
|
dataType: "key",
|
|
32607
32607
|
dataPath: dataPath + "/" + (0, $8C1kk$parceldiagnostic.encodeJSONKeyComponent)(k),
|
|
@@ -32611,15 +32611,15 @@ function $4ca1027d34905147$var$validateSchema(schema, data) {
|
|
|
32611
32611
|
prettyType: schemaNode.__type
|
|
32612
32612
|
});
|
|
32613
32613
|
} else {
|
|
32614
|
-
let
|
|
32614
|
+
let result2 = walk([
|
|
32615
32615
|
additionalProperties
|
|
32616
32616
|
].concat(schemaAncestors), dataNode[k], dataPath + "/" + (0, $8C1kk$parceldiagnostic.encodeJSONKeyComponent)(k));
|
|
32617
|
-
if (
|
|
32617
|
+
if (result2) results1.push(result2);
|
|
32618
32618
|
}
|
|
32619
32619
|
}
|
|
32620
32620
|
}
|
|
32621
32621
|
}
|
|
32622
|
-
if (
|
|
32622
|
+
if (results1.length) return results1.reduce((acc, v)=>acc.concat(v), []);
|
|
32623
32623
|
break;
|
|
32624
32624
|
}
|
|
32625
32625
|
case "boolean":
|
|
@@ -32638,23 +32638,23 @@ function $4ca1027d34905147$var$validateSchema(schema, data) {
|
|
|
32638
32638
|
};
|
|
32639
32639
|
if (schemaNode.oneOf || schemaNode.allOf) {
|
|
32640
32640
|
let list = schemaNode.oneOf || schemaNode.allOf;
|
|
32641
|
-
let
|
|
32641
|
+
let results2 = [];
|
|
32642
32642
|
for (let f of list){
|
|
32643
|
-
let
|
|
32643
|
+
let result3 = walk([
|
|
32644
32644
|
f
|
|
32645
32645
|
].concat(schemaAncestors), dataNode, dataPath);
|
|
32646
|
-
if (
|
|
32646
|
+
if (result3) results2.push(result3);
|
|
32647
32647
|
}
|
|
32648
|
-
if (schemaNode.oneOf ?
|
|
32648
|
+
if (schemaNode.oneOf ? results2.length == schemaNode.oneOf.length : results2.length > 0) {
|
|
32649
32649
|
// return the result with more values / longer key
|
|
32650
|
-
|
|
32651
|
-
return
|
|
32650
|
+
results2.sort((a, b)=>Array.isArray(a) || Array.isArray(b) ? Array.isArray(a) && !Array.isArray(b) ? -1 : !Array.isArray(a) && Array.isArray(b) ? 1 : Array.isArray(a) && Array.isArray(b) ? b.length - a.length : 0 : b.dataPath.length - a.dataPath.length);
|
|
32651
|
+
return results2[0];
|
|
32652
32652
|
}
|
|
32653
32653
|
} else if (schemaNode.not) {
|
|
32654
|
-
let
|
|
32654
|
+
let result4 = walk([
|
|
32655
32655
|
schemaNode.not
|
|
32656
32656
|
].concat(schemaAncestors), dataNode, dataPath);
|
|
32657
|
-
if (!
|
|
32657
|
+
if (!result4 || result4.length == 0) return {
|
|
32658
32658
|
type: "other",
|
|
32659
32659
|
dataPath: dataPath,
|
|
32660
32660
|
dataType: null,
|
|
@@ -32666,11 +32666,11 @@ function $4ca1027d34905147$var$validateSchema(schema, data) {
|
|
|
32666
32666
|
}
|
|
32667
32667
|
return undefined;
|
|
32668
32668
|
}
|
|
32669
|
-
let
|
|
32669
|
+
let result = walk([
|
|
32670
32670
|
schema
|
|
32671
32671
|
], data, "");
|
|
32672
|
-
return Array.isArray(
|
|
32673
|
-
|
|
32672
|
+
return Array.isArray(result) ? result : result ? [
|
|
32673
|
+
result
|
|
32674
32674
|
] : [];
|
|
32675
32675
|
}
|
|
32676
32676
|
var $4ca1027d34905147$export$2e2bcd8739ae039 = $4ca1027d34905147$var$validateSchema;
|
|
@@ -32682,7 +32682,7 @@ function $4ca1027d34905147$export$2115c2c0a84eef61(expectedValues, actualValue)
|
|
|
32682
32682
|
result.sort(([, a], [, b])=>a - b);
|
|
32683
32683
|
return result.map(([v])=>v);
|
|
32684
32684
|
}
|
|
32685
|
-
$4ca1027d34905147$var$validateSchema.diagnostic = function(schema, data, origin,
|
|
32685
|
+
$4ca1027d34905147$var$validateSchema.diagnostic = function(schema, data, origin, message) {
|
|
32686
32686
|
if ("source" in data && "data" in data && typeof data.source !== "string" && !data) throw new Error("At least one of data.source and data.data must be defined!");
|
|
32687
32687
|
var _data;
|
|
32688
32688
|
let object = data.map ? data.map.data : (_data = data.data) !== null && _data !== void 0 ? _data : JSON.parse(data.source);
|
|
@@ -32699,17 +32699,17 @@ $4ca1027d34905147$var$validateSchema.diagnostic = function(schema, data, origin,
|
|
|
32699
32699
|
else message = "Unexpected value";
|
|
32700
32700
|
} else if (e.type === "forbidden-prop") {
|
|
32701
32701
|
let { prop: prop , expectedProps: expectedProps , actualProps: actualProps } = e;
|
|
32702
|
-
let
|
|
32703
|
-
if (
|
|
32702
|
+
let likely1 = $4ca1027d34905147$export$2115c2c0a84eef61(expectedProps, prop).filter((v)=>!actualProps.includes(v));
|
|
32703
|
+
if (likely1.length > 0) message = `Did you mean ${likely1.map((v)=>JSON.stringify(v)).join(", ")}?`;
|
|
32704
32704
|
else message = "Unexpected property";
|
|
32705
32705
|
} else if (e.type === "missing-prop") {
|
|
32706
|
-
let { prop:
|
|
32707
|
-
let
|
|
32708
|
-
if (
|
|
32709
|
-
message = `Did you mean ${JSON.stringify(
|
|
32710
|
-
e.dataPath += "/" +
|
|
32706
|
+
let { prop: prop1 , actualProps: actualProps1 } = e;
|
|
32707
|
+
let likely2 = $4ca1027d34905147$export$2115c2c0a84eef61(actualProps1, prop1);
|
|
32708
|
+
if (likely2.length > 0) {
|
|
32709
|
+
message = `Did you mean ${JSON.stringify(prop1)}?`;
|
|
32710
|
+
e.dataPath += "/" + likely2[0];
|
|
32711
32711
|
e.dataType = "key";
|
|
32712
|
-
} else message = `Missing property ${
|
|
32712
|
+
} else message = `Missing property ${prop1}`;
|
|
32713
32713
|
} else if (e.type === "type") {
|
|
32714
32714
|
if (e.prettyType != null) message = `Expected ${e.prettyType}`;
|
|
32715
32715
|
else message = `Expected type ${e.expectedTypes.join(", ")}`;
|
|
@@ -32745,7 +32745,7 @@ $4ca1027d34905147$var$validateSchema.diagnostic = function(schema, data, origin,
|
|
|
32745
32745
|
];
|
|
32746
32746
|
throw new (0, ($parcel$interopDefault($8C1kk$parceldiagnostic)))({
|
|
32747
32747
|
diagnostic: {
|
|
32748
|
-
message:
|
|
32748
|
+
message: message,
|
|
32749
32749
|
origin: origin,
|
|
32750
32750
|
codeFrames: codeFrames
|
|
32751
32751
|
}
|
|
@@ -32834,7 +32834,7 @@ function $e499d3e618e93ebd$export$2e2bcd8739ae039(fn, delay) {
|
|
|
32834
32834
|
var $618f8c1de80a427f$exports = {};
|
|
32835
32835
|
"use strict";
|
|
32836
32836
|
|
|
32837
|
-
var $618f8c1de80a427f$var$
|
|
32837
|
+
var $618f8c1de80a427f$var$$parcel$__dirname = $8C1kk$path.resolve(__dirname, "../../../../node_modules/open");
|
|
32838
32838
|
|
|
32839
32839
|
var $618f8c1de80a427f$require$promisify = $8C1kk$util.promisify;
|
|
32840
32840
|
|
|
@@ -32889,13 +32889,13 @@ else $544c5203b18a57d8$exports = $544c5203b18a57d8$var$isWsl();
|
|
|
32889
32889
|
const $618f8c1de80a427f$var$pAccess = $618f8c1de80a427f$require$promisify($8C1kk$fs.access);
|
|
32890
32890
|
const $618f8c1de80a427f$var$pExecFile = $618f8c1de80a427f$require$promisify($8C1kk$child_process.execFile);
|
|
32891
32891
|
// Path to included `xdg-open`.
|
|
32892
|
-
const $618f8c1de80a427f$var$localXdgOpenPath = $8C1kk$path.join($618f8c1de80a427f$var$
|
|
32892
|
+
const $618f8c1de80a427f$var$localXdgOpenPath = $8C1kk$path.join($618f8c1de80a427f$var$$parcel$__dirname, "xdg-open");
|
|
32893
32893
|
// Convert a path from WSL format to Windows format:
|
|
32894
32894
|
// `/mnt/c/Program Files/Example/MyApp.exe` → `C:\Program Files\Example\MyApp.exe`
|
|
32895
|
-
const $618f8c1de80a427f$var$wslToWindowsPath = async (
|
|
32895
|
+
const $618f8c1de80a427f$var$wslToWindowsPath = async (path)=>{
|
|
32896
32896
|
const { stdout: stdout } = await $618f8c1de80a427f$var$pExecFile("wslpath", [
|
|
32897
32897
|
"-w",
|
|
32898
|
-
|
|
32898
|
+
path
|
|
32899
32899
|
]);
|
|
32900
32900
|
return stdout.trim();
|
|
32901
32901
|
};
|
|
@@ -32956,7 +32956,7 @@ $618f8c1de80a427f$exports = async (target, options)=>{
|
|
|
32956
32956
|
if (options.app) command = options.app;
|
|
32957
32957
|
else {
|
|
32958
32958
|
// When bundled by Webpack, there's no actual package file path and no local `xdg-open`.
|
|
32959
|
-
const isBundled = !$618f8c1de80a427f$var$
|
|
32959
|
+
const isBundled = !$618f8c1de80a427f$var$$parcel$__dirname || $618f8c1de80a427f$var$$parcel$__dirname === "/";
|
|
32960
32960
|
// Check if local `xdg-open` exists and is executable.
|
|
32961
32961
|
let exeLocalXdgOpen = false;
|
|
32962
32962
|
try {
|
|
@@ -33094,9 +33094,9 @@ var $284aeb9e515b63c0$var$clone = function() {
|
|
|
33094
33094
|
* @param `includeNonEnumerable` - set to true if the non-enumerable properties
|
|
33095
33095
|
* should be cloned as well. Non-enumerable properties on the prototype
|
|
33096
33096
|
* chain will be ignored. (optional - false by default)
|
|
33097
|
-
*/ function
|
|
33097
|
+
*/ function clone(parent, circular, depth, prototype, includeNonEnumerable) {
|
|
33098
33098
|
if (typeof circular === "object") {
|
|
33099
|
-
|
|
33099
|
+
depth = circular.depth;
|
|
33100
33100
|
prototype = circular.prototype;
|
|
33101
33101
|
includeNonEnumerable = circular.includeNonEnumerable;
|
|
33102
33102
|
circular = circular.circular;
|
|
@@ -33107,7 +33107,7 @@ var $284aeb9e515b63c0$var$clone = function() {
|
|
|
33107
33107
|
var allChildren = [];
|
|
33108
33108
|
var useBuffer = typeof Buffer != "undefined";
|
|
33109
33109
|
if (typeof circular == "undefined") circular = true;
|
|
33110
|
-
if (typeof
|
|
33110
|
+
if (typeof depth == "undefined") depth = Infinity;
|
|
33111
33111
|
// recurse this function so we don't reset allParents and allChildren
|
|
33112
33112
|
function _clone(parent, depth) {
|
|
33113
33113
|
// cloning null always returns null
|
|
@@ -33125,11 +33125,11 @@ var $284aeb9e515b63c0$var$clone = function() {
|
|
|
33125
33125
|
reject(_clone(err, depth - 1));
|
|
33126
33126
|
});
|
|
33127
33127
|
});
|
|
33128
|
-
else if (
|
|
33129
|
-
else if (
|
|
33128
|
+
else if (clone.__isArray(parent)) child = [];
|
|
33129
|
+
else if (clone.__isRegExp(parent)) {
|
|
33130
33130
|
child = new RegExp(parent.source, __getRegExpFlags(parent));
|
|
33131
33131
|
if (parent.lastIndex) child.lastIndex = parent.lastIndex;
|
|
33132
|
-
} else if (
|
|
33132
|
+
} else if (clone.__isDate(parent)) child = new Date(parent.getTime());
|
|
33133
33133
|
else if (useBuffer && Buffer.isBuffer(parent)) {
|
|
33134
33134
|
if (Buffer.allocUnsafe) // Node.js >= 4.5.0
|
|
33135
33135
|
child = Buffer.allocUnsafe(parent.length);
|
|
@@ -33194,7 +33194,7 @@ var $284aeb9e515b63c0$var$clone = function() {
|
|
|
33194
33194
|
}
|
|
33195
33195
|
return child;
|
|
33196
33196
|
}
|
|
33197
|
-
return _clone(
|
|
33197
|
+
return _clone(parent, depth);
|
|
33198
33198
|
}
|
|
33199
33199
|
/**
|
|
33200
33200
|
* Simple flat clone using prototype, accepts only objects, usefull for property
|
|
@@ -33202,7 +33202,7 @@ var $284aeb9e515b63c0$var$clone = function() {
|
|
|
33202
33202
|
*
|
|
33203
33203
|
* USE WITH CAUTION! This may not behave as you wish if you do not know how this
|
|
33204
33204
|
* works.
|
|
33205
|
-
*/
|
|
33205
|
+
*/ clone.clonePrototype = function clonePrototype(parent) {
|
|
33206
33206
|
if (parent === null) return null;
|
|
33207
33207
|
var c = function() {};
|
|
33208
33208
|
c.prototype = parent;
|
|
@@ -33212,19 +33212,19 @@ var $284aeb9e515b63c0$var$clone = function() {
|
|
|
33212
33212
|
function __objToStr(o) {
|
|
33213
33213
|
return Object.prototype.toString.call(o);
|
|
33214
33214
|
}
|
|
33215
|
-
|
|
33215
|
+
clone.__objToStr = __objToStr;
|
|
33216
33216
|
function __isDate(o) {
|
|
33217
33217
|
return typeof o === "object" && __objToStr(o) === "[object Date]";
|
|
33218
33218
|
}
|
|
33219
|
-
|
|
33219
|
+
clone.__isDate = __isDate;
|
|
33220
33220
|
function __isArray(o) {
|
|
33221
33221
|
return typeof o === "object" && __objToStr(o) === "[object Array]";
|
|
33222
33222
|
}
|
|
33223
|
-
|
|
33223
|
+
clone.__isArray = __isArray;
|
|
33224
33224
|
function __isRegExp(o) {
|
|
33225
33225
|
return typeof o === "object" && __objToStr(o) === "[object RegExp]";
|
|
33226
33226
|
}
|
|
33227
|
-
|
|
33227
|
+
clone.__isRegExp = __isRegExp;
|
|
33228
33228
|
function __getRegExpFlags(re) {
|
|
33229
33229
|
var flags = "";
|
|
33230
33230
|
if (re.global) flags += "g";
|
|
@@ -33232,8 +33232,8 @@ var $284aeb9e515b63c0$var$clone = function() {
|
|
|
33232
33232
|
if (re.multiline) flags += "m";
|
|
33233
33233
|
return flags;
|
|
33234
33234
|
}
|
|
33235
|
-
|
|
33236
|
-
return
|
|
33235
|
+
clone.__getRegExpFlags = __getRegExpFlags;
|
|
33236
|
+
return clone;
|
|
33237
33237
|
}();
|
|
33238
33238
|
if ($284aeb9e515b63c0$exports) $284aeb9e515b63c0$exports = $284aeb9e515b63c0$var$clone;
|
|
33239
33239
|
|
|
@@ -33248,20 +33248,20 @@ var $5dc3ee1f90b35876$var$unicode = {
|
|
|
33248
33248
|
ID_Continue: $5dc3ee1f90b35876$var$ID_Continue
|
|
33249
33249
|
};
|
|
33250
33250
|
var $5dc3ee1f90b35876$var$util = {
|
|
33251
|
-
isSpaceSeparator (
|
|
33252
|
-
return typeof
|
|
33251
|
+
isSpaceSeparator (c) {
|
|
33252
|
+
return typeof c === "string" && $5dc3ee1f90b35876$var$unicode.Space_Separator.test(c);
|
|
33253
33253
|
},
|
|
33254
|
-
isIdStartChar (
|
|
33255
|
-
return typeof
|
|
33254
|
+
isIdStartChar (c) {
|
|
33255
|
+
return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c === "$" || c === "_" || $5dc3ee1f90b35876$var$unicode.ID_Start.test(c));
|
|
33256
33256
|
},
|
|
33257
|
-
isIdContinueChar (
|
|
33258
|
-
return typeof
|
|
33257
|
+
isIdContinueChar (c) {
|
|
33258
|
+
return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c >= "0" && c <= "9" || c === "$" || c === "_" || c === "" || c === "" || $5dc3ee1f90b35876$var$unicode.ID_Continue.test(c));
|
|
33259
33259
|
},
|
|
33260
|
-
isDigit (
|
|
33261
|
-
return typeof
|
|
33260
|
+
isDigit (c) {
|
|
33261
|
+
return typeof c === "string" && /[0-9]/.test(c);
|
|
33262
33262
|
},
|
|
33263
|
-
isHexDigit (
|
|
33264
|
-
return typeof
|
|
33263
|
+
isHexDigit (c) {
|
|
33264
|
+
return typeof c === "string" && /[0-9A-Fa-f]/.test(c);
|
|
33265
33265
|
}
|
|
33266
33266
|
};
|
|
33267
33267
|
let $5dc3ee1f90b35876$var$source;
|
|
@@ -33298,10 +33298,10 @@ var $5dc3ee1f90b35876$var$parse = function parse(text, reviver) {
|
|
|
33298
33298
|
};
|
|
33299
33299
|
function $5dc3ee1f90b35876$var$internalize(holder, name, reviver) {
|
|
33300
33300
|
const value = holder[name];
|
|
33301
|
-
if (value != null && typeof value === "object") for(const
|
|
33302
|
-
const replacement = $5dc3ee1f90b35876$var$internalize(value,
|
|
33303
|
-
if (replacement === undefined) delete value[
|
|
33304
|
-
else value[
|
|
33301
|
+
if (value != null && typeof value === "object") for(const key in value){
|
|
33302
|
+
const replacement = $5dc3ee1f90b35876$var$internalize(value, key, reviver);
|
|
33303
|
+
if (replacement === undefined) delete value[key];
|
|
33304
|
+
else value[key] = replacement;
|
|
33305
33305
|
}
|
|
33306
33306
|
return reviver.call(holder, name, value);
|
|
33307
33307
|
}
|
|
@@ -33321,22 +33321,22 @@ function $5dc3ee1f90b35876$var$lex() {
|
|
|
33321
33321
|
// if (!lexStates[lexState]) {
|
|
33322
33322
|
// throw invalidLexState(lexState)
|
|
33323
33323
|
// }
|
|
33324
|
-
const
|
|
33325
|
-
if (
|
|
33324
|
+
const token = $5dc3ee1f90b35876$var$lexStates[$5dc3ee1f90b35876$var$lexState]();
|
|
33325
|
+
if (token) return token;
|
|
33326
33326
|
}
|
|
33327
33327
|
}
|
|
33328
33328
|
function $5dc3ee1f90b35876$var$peek() {
|
|
33329
33329
|
if ($5dc3ee1f90b35876$var$source[$5dc3ee1f90b35876$var$pos]) return String.fromCodePoint($5dc3ee1f90b35876$var$source.codePointAt($5dc3ee1f90b35876$var$pos));
|
|
33330
33330
|
}
|
|
33331
33331
|
function $5dc3ee1f90b35876$var$read() {
|
|
33332
|
-
const
|
|
33333
|
-
if (
|
|
33332
|
+
const c = $5dc3ee1f90b35876$var$peek();
|
|
33333
|
+
if (c === "\n") {
|
|
33334
33334
|
$5dc3ee1f90b35876$var$line++;
|
|
33335
33335
|
$5dc3ee1f90b35876$var$column = 0;
|
|
33336
|
-
} else if (
|
|
33336
|
+
} else if (c) $5dc3ee1f90b35876$var$column += c.length;
|
|
33337
33337
|
else $5dc3ee1f90b35876$var$column++;
|
|
33338
|
-
if (
|
|
33339
|
-
return
|
|
33338
|
+
if (c) $5dc3ee1f90b35876$var$pos += c.length;
|
|
33339
|
+
return c;
|
|
33340
33340
|
}
|
|
33341
33341
|
const $5dc3ee1f90b35876$var$lexStates = {
|
|
33342
33342
|
default () {
|
|
@@ -33503,8 +33503,8 @@ const $5dc3ee1f90b35876$var$lexStates = {
|
|
|
33503
33503
|
switch($5dc3ee1f90b35876$var$c){
|
|
33504
33504
|
case "$":
|
|
33505
33505
|
case "_":
|
|
33506
|
-
case "
|
|
33507
|
-
case "
|
|
33506
|
+
case "":
|
|
33507
|
+
case "":
|
|
33508
33508
|
$5dc3ee1f90b35876$var$buffer += $5dc3ee1f90b35876$var$read();
|
|
33509
33509
|
return;
|
|
33510
33510
|
case "\\":
|
|
@@ -33525,8 +33525,8 @@ const $5dc3ee1f90b35876$var$lexStates = {
|
|
|
33525
33525
|
switch(u){
|
|
33526
33526
|
case "$":
|
|
33527
33527
|
case "_":
|
|
33528
|
-
case "
|
|
33529
|
-
case "
|
|
33528
|
+
case "":
|
|
33529
|
+
case "":
|
|
33530
33530
|
break;
|
|
33531
33531
|
default:
|
|
33532
33532
|
if (!$5dc3ee1f90b35876$var$util.isIdContinueChar(u)) throw $5dc3ee1f90b35876$var$invalidIdentifier();
|
|
@@ -33798,15 +33798,15 @@ function $5dc3ee1f90b35876$var$newToken(type, value) {
|
|
|
33798
33798
|
};
|
|
33799
33799
|
}
|
|
33800
33800
|
function $5dc3ee1f90b35876$var$literal(s) {
|
|
33801
|
-
for (const
|
|
33801
|
+
for (const c of s){
|
|
33802
33802
|
const p = $5dc3ee1f90b35876$var$peek();
|
|
33803
|
-
if (p !==
|
|
33803
|
+
if (p !== c) throw $5dc3ee1f90b35876$var$invalidChar($5dc3ee1f90b35876$var$read());
|
|
33804
33804
|
$5dc3ee1f90b35876$var$read();
|
|
33805
33805
|
}
|
|
33806
33806
|
}
|
|
33807
33807
|
function $5dc3ee1f90b35876$var$escape() {
|
|
33808
|
-
const
|
|
33809
|
-
switch(
|
|
33808
|
+
const c = $5dc3ee1f90b35876$var$peek();
|
|
33809
|
+
switch(c){
|
|
33810
33810
|
case "b":
|
|
33811
33811
|
$5dc3ee1f90b35876$var$read();
|
|
33812
33812
|
return "\b";
|
|
@@ -33860,24 +33860,24 @@ function $5dc3ee1f90b35876$var$escape() {
|
|
|
33860
33860
|
return $5dc3ee1f90b35876$var$read();
|
|
33861
33861
|
}
|
|
33862
33862
|
function $5dc3ee1f90b35876$var$hexEscape() {
|
|
33863
|
-
let
|
|
33864
|
-
let
|
|
33865
|
-
if (!$5dc3ee1f90b35876$var$util.isHexDigit(
|
|
33866
|
-
|
|
33867
|
-
|
|
33868
|
-
if (!$5dc3ee1f90b35876$var$util.isHexDigit(
|
|
33869
|
-
|
|
33870
|
-
return String.fromCodePoint(parseInt(
|
|
33863
|
+
let buffer = "";
|
|
33864
|
+
let c = $5dc3ee1f90b35876$var$peek();
|
|
33865
|
+
if (!$5dc3ee1f90b35876$var$util.isHexDigit(c)) throw $5dc3ee1f90b35876$var$invalidChar($5dc3ee1f90b35876$var$read());
|
|
33866
|
+
buffer += $5dc3ee1f90b35876$var$read();
|
|
33867
|
+
c = $5dc3ee1f90b35876$var$peek();
|
|
33868
|
+
if (!$5dc3ee1f90b35876$var$util.isHexDigit(c)) throw $5dc3ee1f90b35876$var$invalidChar($5dc3ee1f90b35876$var$read());
|
|
33869
|
+
buffer += $5dc3ee1f90b35876$var$read();
|
|
33870
|
+
return String.fromCodePoint(parseInt(buffer, 16));
|
|
33871
33871
|
}
|
|
33872
33872
|
function $5dc3ee1f90b35876$var$unicodeEscape() {
|
|
33873
|
-
let
|
|
33873
|
+
let buffer = "";
|
|
33874
33874
|
let count = 4;
|
|
33875
33875
|
while(count-- > 0){
|
|
33876
|
-
const
|
|
33877
|
-
if (!$5dc3ee1f90b35876$var$util.isHexDigit(
|
|
33878
|
-
|
|
33876
|
+
const c = $5dc3ee1f90b35876$var$peek();
|
|
33877
|
+
if (!$5dc3ee1f90b35876$var$util.isHexDigit(c)) throw $5dc3ee1f90b35876$var$invalidChar($5dc3ee1f90b35876$var$read());
|
|
33878
|
+
buffer += $5dc3ee1f90b35876$var$read();
|
|
33879
33879
|
}
|
|
33880
|
-
return String.fromCodePoint(parseInt(
|
|
33880
|
+
return String.fromCodePoint(parseInt(buffer, 16));
|
|
33881
33881
|
}
|
|
33882
33882
|
const $5dc3ee1f90b35876$var$parseStates = {
|
|
33883
33883
|
start () {
|
|
@@ -34015,9 +34015,9 @@ function $5dc3ee1f90b35876$var$pop() {
|
|
|
34015
34015
|
// function invalidLexState (state) {
|
|
34016
34016
|
// return new Error(`JSON5: invalid lex state '${state}'`)
|
|
34017
34017
|
// }
|
|
34018
|
-
function $5dc3ee1f90b35876$var$invalidChar(
|
|
34019
|
-
if (
|
|
34020
|
-
return $5dc3ee1f90b35876$var$syntaxError(`JSON5: invalid character '${$5dc3ee1f90b35876$var$formatChar(
|
|
34018
|
+
function $5dc3ee1f90b35876$var$invalidChar(c) {
|
|
34019
|
+
if (c === undefined) return $5dc3ee1f90b35876$var$syntaxError(`JSON5: invalid end of input at ${$5dc3ee1f90b35876$var$line}:${$5dc3ee1f90b35876$var$column}`);
|
|
34020
|
+
return $5dc3ee1f90b35876$var$syntaxError(`JSON5: invalid character '${$5dc3ee1f90b35876$var$formatChar(c)}' at ${$5dc3ee1f90b35876$var$line}:${$5dc3ee1f90b35876$var$column}`);
|
|
34021
34021
|
}
|
|
34022
34022
|
function $5dc3ee1f90b35876$var$invalidEOF() {
|
|
34023
34023
|
return $5dc3ee1f90b35876$var$syntaxError(`JSON5: invalid end of input at ${$5dc3ee1f90b35876$var$line}:${$5dc3ee1f90b35876$var$column}`);
|
|
@@ -34034,10 +34034,10 @@ function $5dc3ee1f90b35876$var$invalidIdentifier() {
|
|
|
34034
34034
|
$5dc3ee1f90b35876$var$column -= 5;
|
|
34035
34035
|
return $5dc3ee1f90b35876$var$syntaxError(`JSON5: invalid identifier character at ${$5dc3ee1f90b35876$var$line}:${$5dc3ee1f90b35876$var$column}`);
|
|
34036
34036
|
}
|
|
34037
|
-
function $5dc3ee1f90b35876$var$separatorChar(
|
|
34038
|
-
console.warn(`JSON5: '${$5dc3ee1f90b35876$var$formatChar(
|
|
34037
|
+
function $5dc3ee1f90b35876$var$separatorChar(c) {
|
|
34038
|
+
console.warn(`JSON5: '${$5dc3ee1f90b35876$var$formatChar(c)}' in strings is not valid ECMAScript; consider escaping`);
|
|
34039
34039
|
}
|
|
34040
|
-
function $5dc3ee1f90b35876$var$formatChar(
|
|
34040
|
+
function $5dc3ee1f90b35876$var$formatChar(c) {
|
|
34041
34041
|
const replacements = {
|
|
34042
34042
|
"'": "\\'",
|
|
34043
34043
|
'"': '\\"',
|
|
@@ -34052,12 +34052,12 @@ function $5dc3ee1f90b35876$var$formatChar(c13) {
|
|
|
34052
34052
|
"\u2028": "\\u2028",
|
|
34053
34053
|
"\u2029": "\\u2029"
|
|
34054
34054
|
};
|
|
34055
|
-
if (replacements[
|
|
34056
|
-
if (
|
|
34057
|
-
const hexString =
|
|
34055
|
+
if (replacements[c]) return replacements[c];
|
|
34056
|
+
if (c < " ") {
|
|
34057
|
+
const hexString = c.charCodeAt(0).toString(16);
|
|
34058
34058
|
return "\\x" + ("00" + hexString).substring(hexString.length);
|
|
34059
34059
|
}
|
|
34060
|
-
return
|
|
34060
|
+
return c;
|
|
34061
34061
|
}
|
|
34062
34062
|
function $5dc3ee1f90b35876$var$syntaxError(message) {
|
|
34063
34063
|
const err = new SyntaxError(message);
|
|
@@ -34065,8 +34065,8 @@ function $5dc3ee1f90b35876$var$syntaxError(message) {
|
|
|
34065
34065
|
err.columnNumber = $5dc3ee1f90b35876$var$column;
|
|
34066
34066
|
return err;
|
|
34067
34067
|
}
|
|
34068
|
-
var $5dc3ee1f90b35876$var$stringify = function stringify(
|
|
34069
|
-
const
|
|
34068
|
+
var $5dc3ee1f90b35876$var$stringify = function stringify(value, replacer, space) {
|
|
34069
|
+
const stack = [];
|
|
34070
34070
|
let indent = "";
|
|
34071
34071
|
let propertyList;
|
|
34072
34072
|
let replacerFunc;
|
|
@@ -34096,19 +34096,19 @@ var $5dc3ee1f90b35876$var$stringify = function stringify(value1, replacer, space
|
|
|
34096
34096
|
}
|
|
34097
34097
|
} else if (typeof space === "string") gap = space.substr(0, 10);
|
|
34098
34098
|
return serializeProperty("", {
|
|
34099
|
-
"":
|
|
34099
|
+
"": value
|
|
34100
34100
|
});
|
|
34101
|
-
function serializeProperty(
|
|
34102
|
-
let value = holder[
|
|
34101
|
+
function serializeProperty(key, holder) {
|
|
34102
|
+
let value = holder[key];
|
|
34103
34103
|
if (value != null) {
|
|
34104
34104
|
if (typeof value.toJSON5 === "function") {
|
|
34105
|
-
value = value.toJSON5(
|
|
34105
|
+
value = value.toJSON5(key);
|
|
34106
34106
|
} else if (typeof value.toJSON === "function") {
|
|
34107
|
-
value = value.toJSON(
|
|
34107
|
+
value = value.toJSON(key);
|
|
34108
34108
|
}
|
|
34109
34109
|
}
|
|
34110
34110
|
if (replacerFunc) {
|
|
34111
|
-
value = replacerFunc.call(holder,
|
|
34111
|
+
value = replacerFunc.call(holder, key, value);
|
|
34112
34112
|
}
|
|
34113
34113
|
if (value instanceof Number) {
|
|
34114
34114
|
value = Number(value);
|
|
@@ -34157,12 +34157,12 @@ var $5dc3ee1f90b35876$var$stringify = function stringify(value1, replacer, space
|
|
|
34157
34157
|
};
|
|
34158
34158
|
let product = "";
|
|
34159
34159
|
for(let i = 0; i < value.length; i++){
|
|
34160
|
-
const
|
|
34161
|
-
switch(
|
|
34160
|
+
const c = value[i];
|
|
34161
|
+
switch(c){
|
|
34162
34162
|
case "'":
|
|
34163
34163
|
case '"':
|
|
34164
|
-
quotes[
|
|
34165
|
-
product +=
|
|
34164
|
+
quotes[c]++;
|
|
34165
|
+
product += c;
|
|
34166
34166
|
continue;
|
|
34167
34167
|
case "\0":
|
|
34168
34168
|
if ($5dc3ee1f90b35876$var$util.isDigit(value[i + 1])) {
|
|
@@ -34170,34 +34170,34 @@ var $5dc3ee1f90b35876$var$stringify = function stringify(value1, replacer, space
|
|
|
34170
34170
|
continue;
|
|
34171
34171
|
}
|
|
34172
34172
|
}
|
|
34173
|
-
if (replacements[
|
|
34174
|
-
product += replacements[
|
|
34173
|
+
if (replacements[c]) {
|
|
34174
|
+
product += replacements[c];
|
|
34175
34175
|
continue;
|
|
34176
34176
|
}
|
|
34177
|
-
if (
|
|
34178
|
-
let hexString =
|
|
34177
|
+
if (c < " ") {
|
|
34178
|
+
let hexString = c.charCodeAt(0).toString(16);
|
|
34179
34179
|
product += "\\x" + ("00" + hexString).substring(hexString.length);
|
|
34180
34180
|
continue;
|
|
34181
34181
|
}
|
|
34182
|
-
product +=
|
|
34182
|
+
product += c;
|
|
34183
34183
|
}
|
|
34184
34184
|
const quoteChar = quote || Object.keys(quotes).reduce((a, b)=>quotes[a] < quotes[b] ? a : b);
|
|
34185
34185
|
product = product.replace(new RegExp(quoteChar, "g"), replacements[quoteChar]);
|
|
34186
34186
|
return quoteChar + product + quoteChar;
|
|
34187
34187
|
}
|
|
34188
34188
|
function serializeObject(value) {
|
|
34189
|
-
if (
|
|
34189
|
+
if (stack.indexOf(value) >= 0) {
|
|
34190
34190
|
throw TypeError("Converting circular structure to JSON5");
|
|
34191
34191
|
}
|
|
34192
|
-
|
|
34192
|
+
stack.push(value);
|
|
34193
34193
|
let stepback = indent;
|
|
34194
34194
|
indent = indent + gap;
|
|
34195
34195
|
let keys = propertyList || Object.keys(value);
|
|
34196
34196
|
let partial = [];
|
|
34197
|
-
for (const
|
|
34198
|
-
const propertyString = serializeProperty(
|
|
34197
|
+
for (const key of keys){
|
|
34198
|
+
const propertyString = serializeProperty(key, value);
|
|
34199
34199
|
if (propertyString !== undefined) {
|
|
34200
|
-
let member = serializeKey(
|
|
34200
|
+
let member = serializeKey(key) + ":";
|
|
34201
34201
|
if (gap !== "") {
|
|
34202
34202
|
member += " ";
|
|
34203
34203
|
}
|
|
@@ -34219,30 +34219,30 @@ var $5dc3ee1f90b35876$var$stringify = function stringify(value1, replacer, space
|
|
|
34219
34219
|
final = "{\n" + indent + properties + ",\n" + stepback + "}";
|
|
34220
34220
|
}
|
|
34221
34221
|
}
|
|
34222
|
-
|
|
34222
|
+
stack.pop();
|
|
34223
34223
|
indent = stepback;
|
|
34224
34224
|
return final;
|
|
34225
34225
|
}
|
|
34226
|
-
function serializeKey(
|
|
34227
|
-
if (
|
|
34228
|
-
return quoteString(
|
|
34226
|
+
function serializeKey(key) {
|
|
34227
|
+
if (key.length === 0) {
|
|
34228
|
+
return quoteString(key, true);
|
|
34229
34229
|
}
|
|
34230
|
-
const firstChar = String.fromCodePoint(
|
|
34230
|
+
const firstChar = String.fromCodePoint(key.codePointAt(0));
|
|
34231
34231
|
if (!$5dc3ee1f90b35876$var$util.isIdStartChar(firstChar)) {
|
|
34232
|
-
return quoteString(
|
|
34232
|
+
return quoteString(key, true);
|
|
34233
34233
|
}
|
|
34234
|
-
for(let i = firstChar.length; i <
|
|
34235
|
-
if (!$5dc3ee1f90b35876$var$util.isIdContinueChar(String.fromCodePoint(
|
|
34236
|
-
return quoteString(
|
|
34234
|
+
for(let i = firstChar.length; i < key.length; i++){
|
|
34235
|
+
if (!$5dc3ee1f90b35876$var$util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
|
|
34236
|
+
return quoteString(key, true);
|
|
34237
34237
|
}
|
|
34238
34238
|
}
|
|
34239
|
-
return
|
|
34239
|
+
return key;
|
|
34240
34240
|
}
|
|
34241
34241
|
function serializeArray(value) {
|
|
34242
|
-
if (
|
|
34242
|
+
if (stack.indexOf(value) >= 0) {
|
|
34243
34243
|
throw TypeError("Converting circular structure to JSON5");
|
|
34244
34244
|
}
|
|
34245
|
-
|
|
34245
|
+
stack.push(value);
|
|
34246
34246
|
let stepback = indent;
|
|
34247
34247
|
indent = indent + gap;
|
|
34248
34248
|
let partial = [];
|
|
@@ -34259,11 +34259,11 @@ var $5dc3ee1f90b35876$var$stringify = function stringify(value1, replacer, space
|
|
|
34259
34259
|
final = "[" + properties + "]";
|
|
34260
34260
|
} else {
|
|
34261
34261
|
let separator = ",\n" + indent;
|
|
34262
|
-
let
|
|
34263
|
-
final = "[\n" + indent +
|
|
34262
|
+
let properties1 = partial.join(separator);
|
|
34263
|
+
final = "[\n" + indent + properties1 + ",\n" + stepback + "]";
|
|
34264
34264
|
}
|
|
34265
34265
|
}
|
|
34266
|
-
|
|
34266
|
+
stack.pop();
|
|
34267
34267
|
indent = stepback;
|
|
34268
34268
|
return final;
|
|
34269
34269
|
}
|
|
@@ -34846,9 +34846,9 @@ async function $10671d0be444e08b$export$c1a4367d4847eb06(fs, filepath, filenames
|
|
|
34846
34846
|
if (parse === false) config = configContent;
|
|
34847
34847
|
else {
|
|
34848
34848
|
var ref1;
|
|
34849
|
-
let
|
|
34849
|
+
let parse1 = (ref1 = opts === null || opts === void 0 ? void 0 : opts.parser) !== null && ref1 !== void 0 ? ref1 : $10671d0be444e08b$var$getParser(extname);
|
|
34850
34850
|
try {
|
|
34851
|
-
config =
|
|
34851
|
+
config = parse1(configContent);
|
|
34852
34852
|
} catch (e) {
|
|
34853
34853
|
if (extname !== "" && extname !== "json") throw e;
|
|
34854
34854
|
let pos = {
|
|
@@ -34877,7 +34877,7 @@ async function $10671d0be444e08b$export$c1a4367d4847eb06(fs, filepath, filenames
|
|
|
34877
34877
|
});
|
|
34878
34878
|
}
|
|
34879
34879
|
}
|
|
34880
|
-
let
|
|
34880
|
+
let output1 = {
|
|
34881
34881
|
config: config,
|
|
34882
34882
|
files: [
|
|
34883
34883
|
{
|
|
@@ -34885,8 +34885,8 @@ async function $10671d0be444e08b$export$c1a4367d4847eb06(fs, filepath, filenames
|
|
|
34885
34885
|
}
|
|
34886
34886
|
]
|
|
34887
34887
|
};
|
|
34888
|
-
$10671d0be444e08b$var$configCache.set(String(parse) + configFile,
|
|
34889
|
-
return
|
|
34888
|
+
$10671d0be444e08b$var$configCache.set(String(parse) + configFile, output1);
|
|
34889
|
+
return output1;
|
|
34890
34890
|
} catch (err) {
|
|
34891
34891
|
if (err.code === "MODULE_NOT_FOUND" || err.code === "ENOENT") return null;
|
|
34892
34892
|
throw err;
|
|
@@ -35125,10 +35125,10 @@ async function $0e887a49fdd81cad$export$3b1983e9896f988b(options) {
|
|
|
35125
35125
|
key: key
|
|
35126
35126
|
}, options.listener);
|
|
35127
35127
|
} else {
|
|
35128
|
-
let { cert:
|
|
35128
|
+
let { cert: cert1 , key: key1 } = await (0, $186980c178984fd2$export$2e2bcd8739ae039)(options.inputFS, options.https);
|
|
35129
35129
|
server = (0, ($parcel$interopDefault($8C1kk$https))).createServer({
|
|
35130
|
-
cert:
|
|
35131
|
-
key:
|
|
35130
|
+
cert: cert1,
|
|
35131
|
+
key: key1
|
|
35132
35132
|
}, options.listener);
|
|
35133
35133
|
} // HTTPServer#close only stops accepting new connections, and does not close existing ones.
|
|
35134
35134
|
// Before closing, destroy any active connections through their sockets. Additionally, remove sockets when they close:
|
|
@@ -35211,8 +35211,8 @@ async function $bc66accb63b05e9a$export$f074a8f9bef628fd({ bundle: bundle , bund
|
|
|
35211
35211
|
let inlineType = (0, (/*@__PURE__*/$parcel$interopDefault($812806c6461f2963$exports)))(entryBundle.getMainEntry()).meta.inlineType;
|
|
35212
35212
|
if (inlineType == null || inlineType === "string") {
|
|
35213
35213
|
var ref;
|
|
35214
|
-
var
|
|
35215
|
-
let placeholder = (
|
|
35214
|
+
var ref1;
|
|
35215
|
+
let placeholder = (ref1 = (ref = dependency.meta) === null || ref === void 0 ? void 0 : ref.placeholder) !== null && ref1 !== void 0 ? ref1 : dependency.id;
|
|
35216
35216
|
(0, ($parcel$interopDefault($8C1kk$assert)))(typeof placeholder === "string");
|
|
35217
35217
|
replacements.set(placeholder, getInlineReplacement(dependency, inlineType, packagedContents));
|
|
35218
35218
|
}
|
|
@@ -35236,8 +35236,8 @@ function $bc66accb63b05e9a$export$a22ef0cbdf8abc95({ dependency: dependency , fr
|
|
|
35236
35236
|
pathname: (0, (/*@__PURE__*/$parcel$interopDefault($812806c6461f2963$exports)))(toBundle.name),
|
|
35237
35237
|
hash: orig.hash
|
|
35238
35238
|
}));
|
|
35239
|
-
var
|
|
35240
|
-
let placeholder = (
|
|
35239
|
+
var ref1;
|
|
35240
|
+
let placeholder = (ref1 = (ref = dependency.meta) === null || ref === void 0 ? void 0 : ref.placeholder) !== null && ref1 !== void 0 ? ref1 : dependency.id;
|
|
35241
35241
|
(0, ($parcel$interopDefault($8C1kk$assert)))(typeof placeholder === "string");
|
|
35242
35242
|
return {
|
|
35243
35243
|
from: placeholder,
|