@telepath-computer/television 0.1.159 → 0.1.161
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/dist/cli.cjs +2044 -671
- package/dist/skills/television/SKILL.md +28 -5
- package/dist/views/artifact-missing/index.html +2 -2
- package/dist/views/markdown/index.html +10 -10
- package/dist/web/assets/artifact-bridge-KdJfBNuH.js +1 -0
- package/dist/web/assets/{artifactMissing-B7Big40q.js → artifactMissing-CxC-pgtU.js} +1 -1
- package/dist/web/assets/main-BsJuVijD.js +718 -0
- package/dist/web/assets/{urlUnsupported-BqoIG2ob.js → urlUnsupported-D3a0K5cH.js} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/views/artifact-missing/index.html +2 -2
- package/dist/web/views/url-unsupported/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/artifact-bridge-Ce9BPLXH.js +0 -1
- package/dist/web/assets/main-DNa6t8SQ.js +0 -718
package/dist/cli.cjs
CHANGED
|
@@ -230,8 +230,8 @@ var require_help = __commonJS({
|
|
|
230
230
|
visibleCommands.push(helpCommand);
|
|
231
231
|
}
|
|
232
232
|
if (this.sortSubcommands) {
|
|
233
|
-
visibleCommands.sort((a,
|
|
234
|
-
return a.name().localeCompare(
|
|
233
|
+
visibleCommands.sort((a, b2) => {
|
|
234
|
+
return a.name().localeCompare(b2.name());
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
return visibleCommands;
|
|
@@ -243,11 +243,11 @@ var require_help = __commonJS({
|
|
|
243
243
|
* @param {Option} b
|
|
244
244
|
* @returns {number}
|
|
245
245
|
*/
|
|
246
|
-
compareOptions(a,
|
|
246
|
+
compareOptions(a, b2) {
|
|
247
247
|
const getSortKey = (option) => {
|
|
248
248
|
return option.short ? option.short.replace(/^-/, "") : option.long.replace(/^--/, "");
|
|
249
249
|
};
|
|
250
|
-
return getSortKey(a).localeCompare(getSortKey(
|
|
250
|
+
return getSortKey(a).localeCompare(getSortKey(b2));
|
|
251
251
|
}
|
|
252
252
|
/**
|
|
253
253
|
* Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one.
|
|
@@ -1113,38 +1113,38 @@ var require_option = __commonJS({
|
|
|
1113
1113
|
var require_suggestSimilar = __commonJS({
|
|
1114
1114
|
"../../node_modules/commander/lib/suggestSimilar.js"(exports2) {
|
|
1115
1115
|
var maxDistance = 3;
|
|
1116
|
-
function editDistance(a,
|
|
1117
|
-
if (Math.abs(a.length -
|
|
1118
|
-
return Math.max(a.length,
|
|
1116
|
+
function editDistance(a, b2) {
|
|
1117
|
+
if (Math.abs(a.length - b2.length) > maxDistance)
|
|
1118
|
+
return Math.max(a.length, b2.length);
|
|
1119
1119
|
const d = [];
|
|
1120
1120
|
for (let i = 0; i <= a.length; i++) {
|
|
1121
1121
|
d[i] = [i];
|
|
1122
1122
|
}
|
|
1123
|
-
for (let
|
|
1124
|
-
d[0][
|
|
1123
|
+
for (let j2 = 0; j2 <= b2.length; j2++) {
|
|
1124
|
+
d[0][j2] = j2;
|
|
1125
1125
|
}
|
|
1126
|
-
for (let
|
|
1126
|
+
for (let j2 = 1; j2 <= b2.length; j2++) {
|
|
1127
1127
|
for (let i = 1; i <= a.length; i++) {
|
|
1128
1128
|
let cost = 1;
|
|
1129
|
-
if (a[i - 1] ===
|
|
1129
|
+
if (a[i - 1] === b2[j2 - 1]) {
|
|
1130
1130
|
cost = 0;
|
|
1131
1131
|
} else {
|
|
1132
1132
|
cost = 1;
|
|
1133
1133
|
}
|
|
1134
|
-
d[i][
|
|
1135
|
-
d[i - 1][
|
|
1134
|
+
d[i][j2] = Math.min(
|
|
1135
|
+
d[i - 1][j2] + 1,
|
|
1136
1136
|
// deletion
|
|
1137
|
-
d[i][
|
|
1137
|
+
d[i][j2 - 1] + 1,
|
|
1138
1138
|
// insertion
|
|
1139
|
-
d[i - 1][
|
|
1139
|
+
d[i - 1][j2 - 1] + cost
|
|
1140
1140
|
// substitution
|
|
1141
1141
|
);
|
|
1142
|
-
if (i > 1 &&
|
|
1143
|
-
d[i][
|
|
1142
|
+
if (i > 1 && j2 > 1 && a[i - 1] === b2[j2 - 2] && a[i - 2] === b2[j2 - 1]) {
|
|
1143
|
+
d[i][j2] = Math.min(d[i][j2], d[i - 2][j2 - 2] + 1);
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
1146
|
}
|
|
1147
|
-
return d[a.length][
|
|
1147
|
+
return d[a.length][b2.length];
|
|
1148
1148
|
}
|
|
1149
1149
|
function suggestSimilar(word, candidates) {
|
|
1150
1150
|
if (!candidates || candidates.length === 0) return "";
|
|
@@ -1171,7 +1171,7 @@ var require_suggestSimilar = __commonJS({
|
|
|
1171
1171
|
}
|
|
1172
1172
|
}
|
|
1173
1173
|
});
|
|
1174
|
-
similar.sort((a,
|
|
1174
|
+
similar.sort((a, b2) => a.localeCompare(b2));
|
|
1175
1175
|
if (searchingOptions) {
|
|
1176
1176
|
similar = similar.map((candidate) => `--${candidate}`);
|
|
1177
1177
|
}
|
|
@@ -1822,8 +1822,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1822
1822
|
} else if (fn instanceof RegExp) {
|
|
1823
1823
|
const regex = fn;
|
|
1824
1824
|
fn = (val, def) => {
|
|
1825
|
-
const
|
|
1826
|
-
return
|
|
1825
|
+
const m2 = regex.exec(val);
|
|
1826
|
+
return m2 ? m2[0] : def;
|
|
1827
1827
|
};
|
|
1828
1828
|
option.default(defaultValue).argParser(fn);
|
|
1829
1829
|
} else {
|
|
@@ -2404,8 +2404,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2404
2404
|
if (index < this.args.length) {
|
|
2405
2405
|
value = this.args.slice(index);
|
|
2406
2406
|
if (declaredArg.parseArg) {
|
|
2407
|
-
value = value.reduce((processed,
|
|
2408
|
-
return myParseArg(declaredArg,
|
|
2407
|
+
value = value.reduce((processed, v2) => {
|
|
2408
|
+
return myParseArg(declaredArg, v2, processed);
|
|
2409
2409
|
}, declaredArg.defaultValue);
|
|
2410
2410
|
}
|
|
2411
2411
|
} else if (value === void 0) {
|
|
@@ -3528,11 +3528,11 @@ var require_implementation = __commonJS({
|
|
|
3528
3528
|
if (typeof window === "undefined") {
|
|
3529
3529
|
return false;
|
|
3530
3530
|
}
|
|
3531
|
-
for (var
|
|
3531
|
+
for (var k2 in window) {
|
|
3532
3532
|
try {
|
|
3533
|
-
if (!excludedKeys["$" +
|
|
3533
|
+
if (!excludedKeys["$" + k2] && has.call(window, k2) && window[k2] !== null && typeof window[k2] === "object") {
|
|
3534
3534
|
try {
|
|
3535
|
-
equalsConstructorPrototype(window[
|
|
3535
|
+
equalsConstructorPrototype(window[k2]);
|
|
3536
3536
|
} catch (e) {
|
|
3537
3537
|
return true;
|
|
3538
3538
|
}
|
|
@@ -3569,8 +3569,8 @@ var require_implementation = __commonJS({
|
|
|
3569
3569
|
}
|
|
3570
3570
|
}
|
|
3571
3571
|
if (isArguments && object2.length > 0) {
|
|
3572
|
-
for (var
|
|
3573
|
-
theKeys.push(String(
|
|
3572
|
+
for (var j2 = 0; j2 < object2.length; ++j2) {
|
|
3573
|
+
theKeys.push(String(j2));
|
|
3574
3574
|
}
|
|
3575
3575
|
} else {
|
|
3576
3576
|
for (var name in object2) {
|
|
@@ -3581,9 +3581,9 @@ var require_implementation = __commonJS({
|
|
|
3581
3581
|
}
|
|
3582
3582
|
if (hasDontEnumBug) {
|
|
3583
3583
|
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object2);
|
|
3584
|
-
for (var
|
|
3585
|
-
if (!(skipConstructor && dontEnums[
|
|
3586
|
-
theKeys.push(dontEnums[
|
|
3584
|
+
for (var k2 = 0; k2 < dontEnums.length; ++k2) {
|
|
3585
|
+
if (!(skipConstructor && dontEnums[k2] === "constructor") && has.call(object2, dontEnums[k2])) {
|
|
3586
|
+
theKeys.push(dontEnums[k2]);
|
|
3587
3587
|
}
|
|
3588
3588
|
}
|
|
3589
3589
|
}
|
|
@@ -3883,8 +3883,8 @@ var require_globalthis = __commonJS({
|
|
|
3883
3883
|
var require_isObject = __commonJS({
|
|
3884
3884
|
"../../node_modules/es-object-atoms/isObject.js"(exports2, module2) {
|
|
3885
3885
|
"use strict";
|
|
3886
|
-
module2.exports = function isObject2(
|
|
3887
|
-
return !!
|
|
3886
|
+
module2.exports = function isObject2(x2) {
|
|
3887
|
+
return !!x2 && (typeof x2 === "function" || typeof x2 === "object");
|
|
3888
3888
|
};
|
|
3889
3889
|
}
|
|
3890
3890
|
});
|
|
@@ -4034,7 +4034,7 @@ var require_shams = __commonJS({
|
|
|
4034
4034
|
}
|
|
4035
4035
|
var symVal = 42;
|
|
4036
4036
|
obj[sym] = symVal;
|
|
4037
|
-
for (var
|
|
4037
|
+
for (var _2 in obj) {
|
|
4038
4038
|
return false;
|
|
4039
4039
|
}
|
|
4040
4040
|
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
|
|
@@ -4113,20 +4113,20 @@ var require_implementation3 = __commonJS({
|
|
|
4113
4113
|
var toStr = Object.prototype.toString;
|
|
4114
4114
|
var max = Math.max;
|
|
4115
4115
|
var funcType = "[object Function]";
|
|
4116
|
-
var concatty = function concatty2(a,
|
|
4116
|
+
var concatty = function concatty2(a, b2) {
|
|
4117
4117
|
var arr = [];
|
|
4118
4118
|
for (var i = 0; i < a.length; i += 1) {
|
|
4119
4119
|
arr[i] = a[i];
|
|
4120
4120
|
}
|
|
4121
|
-
for (var
|
|
4122
|
-
arr[
|
|
4121
|
+
for (var j2 = 0; j2 < b2.length; j2 += 1) {
|
|
4122
|
+
arr[j2 + a.length] = b2[j2];
|
|
4123
4123
|
}
|
|
4124
4124
|
return arr;
|
|
4125
4125
|
};
|
|
4126
4126
|
var slicy = function slicy2(arrLike, offset) {
|
|
4127
4127
|
var arr = [];
|
|
4128
|
-
for (var i = offset || 0,
|
|
4129
|
-
arr[
|
|
4128
|
+
for (var i = offset || 0, j2 = 0; i < arrLike.length; i += 1, j2 += 1) {
|
|
4129
|
+
arr[j2] = arrLike[i];
|
|
4130
4130
|
}
|
|
4131
4131
|
return arr;
|
|
4132
4132
|
};
|
|
@@ -4281,15 +4281,15 @@ var require_get_proto = __commonJS({
|
|
|
4281
4281
|
var reflectGetProto = require_Reflect_getPrototypeOf();
|
|
4282
4282
|
var originalGetProto = require_Object_getPrototypeOf();
|
|
4283
4283
|
var getDunderProto = require_get();
|
|
4284
|
-
module2.exports = reflectGetProto ? function getProto(
|
|
4285
|
-
return reflectGetProto(
|
|
4286
|
-
} : originalGetProto ? function getProto(
|
|
4287
|
-
if (!
|
|
4284
|
+
module2.exports = reflectGetProto ? function getProto(O2) {
|
|
4285
|
+
return reflectGetProto(O2);
|
|
4286
|
+
} : originalGetProto ? function getProto(O2) {
|
|
4287
|
+
if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
|
|
4288
4288
|
throw new TypeError("getProto: not an object");
|
|
4289
4289
|
}
|
|
4290
|
-
return originalGetProto(
|
|
4291
|
-
} : getDunderProto ? function getProto(
|
|
4292
|
-
return getDunderProto(
|
|
4290
|
+
return originalGetProto(O2);
|
|
4291
|
+
} : getDunderProto ? function getProto(O2) {
|
|
4292
|
+
return getDunderProto(O2);
|
|
4293
4293
|
} : null;
|
|
4294
4294
|
}
|
|
4295
4295
|
});
|
|
@@ -4682,7 +4682,7 @@ var require_DefineOwnProperty = __commonJS({
|
|
|
4682
4682
|
var isArray = hasArrayLengthDefineBug && require_IsArray();
|
|
4683
4683
|
var callBound = require_call_bound();
|
|
4684
4684
|
var $isEnumerable = callBound("Object.prototype.propertyIsEnumerable");
|
|
4685
|
-
module2.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor,
|
|
4685
|
+
module2.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O2, P2, desc) {
|
|
4686
4686
|
if (!$defineProperty) {
|
|
4687
4687
|
if (!IsDataDescriptor(desc)) {
|
|
4688
4688
|
return false;
|
|
@@ -4690,18 +4690,18 @@ var require_DefineOwnProperty = __commonJS({
|
|
|
4690
4690
|
if (!desc["[[Configurable]]"] || !desc["[[Writable]]"]) {
|
|
4691
4691
|
return false;
|
|
4692
4692
|
}
|
|
4693
|
-
if (
|
|
4693
|
+
if (P2 in O2 && $isEnumerable(O2, P2) !== !!desc["[[Enumerable]]"]) {
|
|
4694
4694
|
return false;
|
|
4695
4695
|
}
|
|
4696
|
-
var
|
|
4697
|
-
|
|
4698
|
-
return SameValue(
|
|
4696
|
+
var V2 = desc["[[Value]]"];
|
|
4697
|
+
O2[P2] = V2;
|
|
4698
|
+
return SameValue(O2[P2], V2);
|
|
4699
4699
|
}
|
|
4700
|
-
if (hasArrayLengthDefineBug &&
|
|
4701
|
-
|
|
4702
|
-
return
|
|
4700
|
+
if (hasArrayLengthDefineBug && P2 === "length" && "[[Value]]" in desc && isArray(O2) && O2.length !== desc["[[Value]]"]) {
|
|
4701
|
+
O2.length = desc["[[Value]]"];
|
|
4702
|
+
return O2.length === desc["[[Value]]"];
|
|
4703
4703
|
}
|
|
4704
|
-
$defineProperty(
|
|
4704
|
+
$defineProperty(O2, P2, FromPropertyDescriptor(desc));
|
|
4705
4705
|
return true;
|
|
4706
4706
|
};
|
|
4707
4707
|
}
|
|
@@ -4826,14 +4826,14 @@ var require_SameValue = __commonJS({
|
|
|
4826
4826
|
"../../node_modules/es-abstract/2023/SameValue.js"(exports2, module2) {
|
|
4827
4827
|
"use strict";
|
|
4828
4828
|
var $isNaN = require_isNaN();
|
|
4829
|
-
module2.exports = function SameValue(
|
|
4830
|
-
if (
|
|
4831
|
-
if (
|
|
4832
|
-
return 1 /
|
|
4829
|
+
module2.exports = function SameValue(x2, y2) {
|
|
4830
|
+
if (x2 === y2) {
|
|
4831
|
+
if (x2 === 0) {
|
|
4832
|
+
return 1 / x2 === 1 / y2;
|
|
4833
4833
|
}
|
|
4834
4834
|
return true;
|
|
4835
4835
|
}
|
|
4836
|
-
return $isNaN(
|
|
4836
|
+
return $isNaN(x2) && $isNaN(y2);
|
|
4837
4837
|
};
|
|
4838
4838
|
}
|
|
4839
4839
|
});
|
|
@@ -4849,25 +4849,25 @@ var require_CreateMethodProperty = __commonJS({
|
|
|
4849
4849
|
var IsDataDescriptor = require_IsDataDescriptor();
|
|
4850
4850
|
var isPropertyKey = require_isPropertyKey();
|
|
4851
4851
|
var SameValue = require_SameValue();
|
|
4852
|
-
module2.exports = function CreateMethodProperty(
|
|
4853
|
-
if (!isObject2(
|
|
4852
|
+
module2.exports = function CreateMethodProperty(O2, P2, V2) {
|
|
4853
|
+
if (!isObject2(O2)) {
|
|
4854
4854
|
throw new $TypeError("Assertion failed: Type(O) is not Object");
|
|
4855
4855
|
}
|
|
4856
|
-
if (!isPropertyKey(
|
|
4856
|
+
if (!isPropertyKey(P2)) {
|
|
4857
4857
|
throw new $TypeError("Assertion failed: P is not a Property Key");
|
|
4858
4858
|
}
|
|
4859
4859
|
var newDesc = {
|
|
4860
4860
|
"[[Configurable]]": true,
|
|
4861
4861
|
"[[Enumerable]]": false,
|
|
4862
|
-
"[[Value]]":
|
|
4862
|
+
"[[Value]]": V2,
|
|
4863
4863
|
"[[Writable]]": true
|
|
4864
4864
|
};
|
|
4865
4865
|
return DefineOwnProperty(
|
|
4866
4866
|
IsDataDescriptor,
|
|
4867
4867
|
SameValue,
|
|
4868
4868
|
FromPropertyDescriptor,
|
|
4869
|
-
|
|
4870
|
-
|
|
4869
|
+
O2,
|
|
4870
|
+
P2,
|
|
4871
4871
|
newDesc
|
|
4872
4872
|
);
|
|
4873
4873
|
};
|
|
@@ -4893,8 +4893,8 @@ var require_is_callable = __commonJS({
|
|
|
4893
4893
|
reflectApply(function() {
|
|
4894
4894
|
throw 42;
|
|
4895
4895
|
}, null, badArrayLike);
|
|
4896
|
-
} catch (
|
|
4897
|
-
if (
|
|
4896
|
+
} catch (_2) {
|
|
4897
|
+
if (_2 !== isCallableMarker) {
|
|
4898
4898
|
reflectApply = null;
|
|
4899
4899
|
}
|
|
4900
4900
|
}
|
|
@@ -5071,11 +5071,11 @@ var require_DefinePropertyOrThrow = __commonJS({
|
|
|
5071
5071
|
var isPropertyKey = require_isPropertyKey();
|
|
5072
5072
|
var SameValue = require_SameValue();
|
|
5073
5073
|
var ToPropertyDescriptor = require_ToPropertyDescriptor();
|
|
5074
|
-
module2.exports = function DefinePropertyOrThrow(
|
|
5075
|
-
if (!isObject2(
|
|
5074
|
+
module2.exports = function DefinePropertyOrThrow(O2, P2, desc) {
|
|
5075
|
+
if (!isObject2(O2)) {
|
|
5076
5076
|
throw new $TypeError("Assertion failed: Type(O) is not Object");
|
|
5077
5077
|
}
|
|
5078
|
-
if (!isPropertyKey(
|
|
5078
|
+
if (!isPropertyKey(P2)) {
|
|
5079
5079
|
throw new $TypeError("Assertion failed: P is not a Property Key");
|
|
5080
5080
|
}
|
|
5081
5081
|
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
|
|
@@ -5086,8 +5086,8 @@ var require_DefinePropertyOrThrow = __commonJS({
|
|
|
5086
5086
|
IsDataDescriptor,
|
|
5087
5087
|
SameValue,
|
|
5088
5088
|
FromPropertyDescriptor,
|
|
5089
|
-
|
|
5090
|
-
|
|
5089
|
+
O2,
|
|
5090
|
+
P2,
|
|
5091
5091
|
Desc
|
|
5092
5092
|
);
|
|
5093
5093
|
};
|
|
@@ -5102,20 +5102,20 @@ var require_CreateNonEnumerableDataPropertyOrThrow = __commonJS({
|
|
|
5102
5102
|
var isObject2 = require_isObject();
|
|
5103
5103
|
var DefinePropertyOrThrow = require_DefinePropertyOrThrow();
|
|
5104
5104
|
var isPropertyKey = require_isPropertyKey();
|
|
5105
|
-
module2.exports = function CreateNonEnumerableDataPropertyOrThrow(
|
|
5106
|
-
if (!isObject2(
|
|
5105
|
+
module2.exports = function CreateNonEnumerableDataPropertyOrThrow(O2, P2, V2) {
|
|
5106
|
+
if (!isObject2(O2)) {
|
|
5107
5107
|
throw new $TypeError("Assertion failed: Type(O) is not Object");
|
|
5108
5108
|
}
|
|
5109
|
-
if (!isPropertyKey(
|
|
5109
|
+
if (!isPropertyKey(P2)) {
|
|
5110
5110
|
throw new $TypeError("Assertion failed: P is not a Property Key");
|
|
5111
5111
|
}
|
|
5112
5112
|
var newDesc = {
|
|
5113
5113
|
"[[Configurable]]": true,
|
|
5114
5114
|
"[[Enumerable]]": false,
|
|
5115
|
-
"[[Value]]":
|
|
5115
|
+
"[[Value]]": V2,
|
|
5116
5116
|
"[[Writable]]": true
|
|
5117
5117
|
};
|
|
5118
|
-
return DefinePropertyOrThrow(
|
|
5118
|
+
return DefinePropertyOrThrow(O2, P2, newDesc);
|
|
5119
5119
|
};
|
|
5120
5120
|
}
|
|
5121
5121
|
});
|
|
@@ -5179,14 +5179,14 @@ var require_set_proto = __commonJS({
|
|
|
5179
5179
|
var originalSetProto = require_Object_setPrototypeOf();
|
|
5180
5180
|
var setDunderProto = require_set();
|
|
5181
5181
|
var $TypeError = require_type();
|
|
5182
|
-
module2.exports = reflectSetProto ? function setProto(
|
|
5183
|
-
if (reflectSetProto(
|
|
5184
|
-
return
|
|
5182
|
+
module2.exports = reflectSetProto ? function setProto(O2, proto) {
|
|
5183
|
+
if (reflectSetProto(O2, proto)) {
|
|
5184
|
+
return O2;
|
|
5185
5185
|
}
|
|
5186
5186
|
throw new $TypeError("Reflect.setPrototypeOf: failed to set [[Prototype]]");
|
|
5187
|
-
} : originalSetProto || (setDunderProto ? function setProto(
|
|
5188
|
-
setDunderProto(
|
|
5189
|
-
return
|
|
5187
|
+
} : originalSetProto || (setDunderProto ? function setProto(O2, proto) {
|
|
5188
|
+
setDunderProto(O2, proto);
|
|
5189
|
+
return O2;
|
|
5190
5190
|
} : null);
|
|
5191
5191
|
}
|
|
5192
5192
|
});
|
|
@@ -5198,14 +5198,14 @@ var require_OrdinaryGetPrototypeOf = __commonJS({
|
|
|
5198
5198
|
var $TypeError = require_type();
|
|
5199
5199
|
var isObject2 = require_isObject();
|
|
5200
5200
|
var $getProto = require_get_proto();
|
|
5201
|
-
module2.exports = function OrdinaryGetPrototypeOf(
|
|
5202
|
-
if (!isObject2(
|
|
5201
|
+
module2.exports = function OrdinaryGetPrototypeOf(O2) {
|
|
5202
|
+
if (!isObject2(O2)) {
|
|
5203
5203
|
throw new $TypeError("Assertion failed: O must be an Object");
|
|
5204
5204
|
}
|
|
5205
5205
|
if (!$getProto) {
|
|
5206
5206
|
throw new $TypeError("This environment does not support fetching prototypes.");
|
|
5207
5207
|
}
|
|
5208
|
-
return $getProto(
|
|
5208
|
+
return $getProto(O2);
|
|
5209
5209
|
};
|
|
5210
5210
|
}
|
|
5211
5211
|
});
|
|
@@ -5218,16 +5218,16 @@ var require_OrdinarySetPrototypeOf = __commonJS({
|
|
|
5218
5218
|
var $setProto = require_set_proto();
|
|
5219
5219
|
var isObject2 = require_isObject();
|
|
5220
5220
|
var OrdinaryGetPrototypeOf = require_OrdinaryGetPrototypeOf();
|
|
5221
|
-
module2.exports = function OrdinarySetPrototypeOf(
|
|
5222
|
-
if (
|
|
5221
|
+
module2.exports = function OrdinarySetPrototypeOf(O2, V2) {
|
|
5222
|
+
if (V2 !== null && !isObject2(V2)) {
|
|
5223
5223
|
throw new $TypeError("Assertion failed: V must be Object or Null");
|
|
5224
5224
|
}
|
|
5225
5225
|
try {
|
|
5226
|
-
$setProto(
|
|
5226
|
+
$setProto(O2, V2);
|
|
5227
5227
|
} catch (e) {
|
|
5228
5228
|
return false;
|
|
5229
5229
|
}
|
|
5230
|
-
return OrdinaryGetPrototypeOf(
|
|
5230
|
+
return OrdinaryGetPrototypeOf(O2) === V2;
|
|
5231
5231
|
};
|
|
5232
5232
|
}
|
|
5233
5233
|
});
|
|
@@ -5242,12 +5242,12 @@ var require_implementation4 = __commonJS({
|
|
|
5242
5242
|
var hasPropertyDescriptors = require_has_property_descriptors()();
|
|
5243
5243
|
var $Error = require_es_errors();
|
|
5244
5244
|
function SuppressedError2(error48, suppressed, message) {
|
|
5245
|
-
var
|
|
5246
|
-
OrdinarySetPrototypeOf(
|
|
5247
|
-
delete
|
|
5248
|
-
CreateNonEnumerableDataPropertyOrThrow(
|
|
5249
|
-
CreateNonEnumerableDataPropertyOrThrow(
|
|
5250
|
-
return
|
|
5245
|
+
var O2 = new $Error(message);
|
|
5246
|
+
OrdinarySetPrototypeOf(O2, proto);
|
|
5247
|
+
delete O2.constructor;
|
|
5248
|
+
CreateNonEnumerableDataPropertyOrThrow(O2, "error", error48);
|
|
5249
|
+
CreateNonEnumerableDataPropertyOrThrow(O2, "suppressed", suppressed);
|
|
5250
|
+
return O2;
|
|
5251
5251
|
}
|
|
5252
5252
|
if (hasPropertyDescriptors) {
|
|
5253
5253
|
Object.defineProperty(SuppressedError2, "prototype", { writable: false });
|
|
@@ -5346,14 +5346,14 @@ var require_SameValue2 = __commonJS({
|
|
|
5346
5346
|
"../../node_modules/es-abstract/2024/SameValue.js"(exports2, module2) {
|
|
5347
5347
|
"use strict";
|
|
5348
5348
|
var $isNaN = require_isNaN();
|
|
5349
|
-
module2.exports = function SameValue(
|
|
5350
|
-
if (
|
|
5351
|
-
if (
|
|
5352
|
-
return 1 /
|
|
5349
|
+
module2.exports = function SameValue(x2, y2) {
|
|
5350
|
+
if (x2 === y2) {
|
|
5351
|
+
if (x2 === 0) {
|
|
5352
|
+
return 1 / x2 === 1 / y2;
|
|
5353
5353
|
}
|
|
5354
5354
|
return true;
|
|
5355
5355
|
}
|
|
5356
|
-
return $isNaN(
|
|
5356
|
+
return $isNaN(x2) && $isNaN(y2);
|
|
5357
5357
|
};
|
|
5358
5358
|
}
|
|
5359
5359
|
});
|
|
@@ -5437,11 +5437,11 @@ var require_DefinePropertyOrThrow2 = __commonJS({
|
|
|
5437
5437
|
var isPropertyKey = require_isPropertyKey();
|
|
5438
5438
|
var SameValue = require_SameValue2();
|
|
5439
5439
|
var ToPropertyDescriptor = require_ToPropertyDescriptor2();
|
|
5440
|
-
module2.exports = function DefinePropertyOrThrow(
|
|
5441
|
-
if (!isObject2(
|
|
5440
|
+
module2.exports = function DefinePropertyOrThrow(O2, P2, desc) {
|
|
5441
|
+
if (!isObject2(O2)) {
|
|
5442
5442
|
throw new $TypeError("Assertion failed: Type(O) is not Object");
|
|
5443
5443
|
}
|
|
5444
|
-
if (!isPropertyKey(
|
|
5444
|
+
if (!isPropertyKey(P2)) {
|
|
5445
5445
|
throw new $TypeError("Assertion failed: P is not a Property Key");
|
|
5446
5446
|
}
|
|
5447
5447
|
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
|
|
@@ -5452,8 +5452,8 @@ var require_DefinePropertyOrThrow2 = __commonJS({
|
|
|
5452
5452
|
IsDataDescriptor,
|
|
5453
5453
|
SameValue,
|
|
5454
5454
|
FromPropertyDescriptor,
|
|
5455
|
-
|
|
5456
|
-
|
|
5455
|
+
O2,
|
|
5456
|
+
P2,
|
|
5457
5457
|
Desc
|
|
5458
5458
|
);
|
|
5459
5459
|
};
|
|
@@ -5563,12 +5563,12 @@ var require_Call = __commonJS({
|
|
|
5563
5563
|
var $TypeError = require_type();
|
|
5564
5564
|
var IsArray = require_IsArray2();
|
|
5565
5565
|
var $apply = GetIntrinsic("%Reflect.apply%", true) || callBound("Function.prototype.apply");
|
|
5566
|
-
module2.exports = function Call(
|
|
5566
|
+
module2.exports = function Call(F2, V2) {
|
|
5567
5567
|
var argumentsList = arguments.length > 2 ? arguments[2] : [];
|
|
5568
5568
|
if (!IsArray(argumentsList)) {
|
|
5569
5569
|
throw new $TypeError("Assertion failed: optional `argumentsList`, if provided, must be a List");
|
|
5570
5570
|
}
|
|
5571
|
-
return $apply(
|
|
5571
|
+
return $apply(F2, V2, argumentsList);
|
|
5572
5572
|
};
|
|
5573
5573
|
}
|
|
5574
5574
|
});
|
|
@@ -5616,8 +5616,8 @@ var require_object_inspect = __commonJS({
|
|
|
5616
5616
|
var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
|
|
5617
5617
|
var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
|
|
5618
5618
|
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
5619
|
-
var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(
|
|
5620
|
-
return
|
|
5619
|
+
var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O2) {
|
|
5620
|
+
return O2.__proto__;
|
|
5621
5621
|
} : null);
|
|
5622
5622
|
function addNumericSeparator(num, str) {
|
|
5623
5623
|
if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
|
|
@@ -5902,106 +5902,106 @@ var require_object_inspect = __commonJS({
|
|
|
5902
5902
|
if (f.name) {
|
|
5903
5903
|
return f.name;
|
|
5904
5904
|
}
|
|
5905
|
-
var
|
|
5906
|
-
if (
|
|
5907
|
-
return
|
|
5905
|
+
var m2 = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
5906
|
+
if (m2) {
|
|
5907
|
+
return m2[1];
|
|
5908
5908
|
}
|
|
5909
5909
|
return null;
|
|
5910
5910
|
}
|
|
5911
|
-
function indexOf(xs,
|
|
5911
|
+
function indexOf(xs, x2) {
|
|
5912
5912
|
if (xs.indexOf) {
|
|
5913
|
-
return xs.indexOf(
|
|
5913
|
+
return xs.indexOf(x2);
|
|
5914
5914
|
}
|
|
5915
5915
|
for (var i = 0, l = xs.length; i < l; i++) {
|
|
5916
|
-
if (xs[i] ===
|
|
5916
|
+
if (xs[i] === x2) {
|
|
5917
5917
|
return i;
|
|
5918
5918
|
}
|
|
5919
5919
|
}
|
|
5920
5920
|
return -1;
|
|
5921
5921
|
}
|
|
5922
|
-
function isMap(
|
|
5923
|
-
if (!mapSize || !
|
|
5922
|
+
function isMap(x2) {
|
|
5923
|
+
if (!mapSize || !x2 || typeof x2 !== "object") {
|
|
5924
5924
|
return false;
|
|
5925
5925
|
}
|
|
5926
5926
|
try {
|
|
5927
|
-
mapSize.call(
|
|
5927
|
+
mapSize.call(x2);
|
|
5928
5928
|
try {
|
|
5929
|
-
setSize.call(
|
|
5929
|
+
setSize.call(x2);
|
|
5930
5930
|
} catch (s) {
|
|
5931
5931
|
return true;
|
|
5932
5932
|
}
|
|
5933
|
-
return
|
|
5933
|
+
return x2 instanceof Map;
|
|
5934
5934
|
} catch (e) {
|
|
5935
5935
|
}
|
|
5936
5936
|
return false;
|
|
5937
5937
|
}
|
|
5938
|
-
function isWeakMap(
|
|
5939
|
-
if (!weakMapHas || !
|
|
5938
|
+
function isWeakMap(x2) {
|
|
5939
|
+
if (!weakMapHas || !x2 || typeof x2 !== "object") {
|
|
5940
5940
|
return false;
|
|
5941
5941
|
}
|
|
5942
5942
|
try {
|
|
5943
|
-
weakMapHas.call(
|
|
5943
|
+
weakMapHas.call(x2, weakMapHas);
|
|
5944
5944
|
try {
|
|
5945
|
-
weakSetHas.call(
|
|
5945
|
+
weakSetHas.call(x2, weakSetHas);
|
|
5946
5946
|
} catch (s) {
|
|
5947
5947
|
return true;
|
|
5948
5948
|
}
|
|
5949
|
-
return
|
|
5949
|
+
return x2 instanceof WeakMap;
|
|
5950
5950
|
} catch (e) {
|
|
5951
5951
|
}
|
|
5952
5952
|
return false;
|
|
5953
5953
|
}
|
|
5954
|
-
function isWeakRef(
|
|
5955
|
-
if (!weakRefDeref || !
|
|
5954
|
+
function isWeakRef(x2) {
|
|
5955
|
+
if (!weakRefDeref || !x2 || typeof x2 !== "object") {
|
|
5956
5956
|
return false;
|
|
5957
5957
|
}
|
|
5958
5958
|
try {
|
|
5959
|
-
weakRefDeref.call(
|
|
5959
|
+
weakRefDeref.call(x2);
|
|
5960
5960
|
return true;
|
|
5961
5961
|
} catch (e) {
|
|
5962
5962
|
}
|
|
5963
5963
|
return false;
|
|
5964
5964
|
}
|
|
5965
|
-
function isSet(
|
|
5966
|
-
if (!setSize || !
|
|
5965
|
+
function isSet(x2) {
|
|
5966
|
+
if (!setSize || !x2 || typeof x2 !== "object") {
|
|
5967
5967
|
return false;
|
|
5968
5968
|
}
|
|
5969
5969
|
try {
|
|
5970
|
-
setSize.call(
|
|
5970
|
+
setSize.call(x2);
|
|
5971
5971
|
try {
|
|
5972
|
-
mapSize.call(
|
|
5973
|
-
} catch (
|
|
5972
|
+
mapSize.call(x2);
|
|
5973
|
+
} catch (m2) {
|
|
5974
5974
|
return true;
|
|
5975
5975
|
}
|
|
5976
|
-
return
|
|
5976
|
+
return x2 instanceof Set;
|
|
5977
5977
|
} catch (e) {
|
|
5978
5978
|
}
|
|
5979
5979
|
return false;
|
|
5980
5980
|
}
|
|
5981
|
-
function isWeakSet(
|
|
5982
|
-
if (!weakSetHas || !
|
|
5981
|
+
function isWeakSet(x2) {
|
|
5982
|
+
if (!weakSetHas || !x2 || typeof x2 !== "object") {
|
|
5983
5983
|
return false;
|
|
5984
5984
|
}
|
|
5985
5985
|
try {
|
|
5986
|
-
weakSetHas.call(
|
|
5986
|
+
weakSetHas.call(x2, weakSetHas);
|
|
5987
5987
|
try {
|
|
5988
|
-
weakMapHas.call(
|
|
5988
|
+
weakMapHas.call(x2, weakMapHas);
|
|
5989
5989
|
} catch (s) {
|
|
5990
5990
|
return true;
|
|
5991
5991
|
}
|
|
5992
|
-
return
|
|
5992
|
+
return x2 instanceof WeakSet;
|
|
5993
5993
|
} catch (e) {
|
|
5994
5994
|
}
|
|
5995
5995
|
return false;
|
|
5996
5996
|
}
|
|
5997
|
-
function isElement(
|
|
5998
|
-
if (!
|
|
5997
|
+
function isElement(x2) {
|
|
5998
|
+
if (!x2 || typeof x2 !== "object") {
|
|
5999
5999
|
return false;
|
|
6000
6000
|
}
|
|
6001
|
-
if (typeof HTMLElement !== "undefined" &&
|
|
6001
|
+
if (typeof HTMLElement !== "undefined" && x2 instanceof HTMLElement) {
|
|
6002
6002
|
return true;
|
|
6003
6003
|
}
|
|
6004
|
-
return typeof
|
|
6004
|
+
return typeof x2.nodeName === "string" && typeof x2.getAttribute === "function";
|
|
6005
6005
|
}
|
|
6006
6006
|
function inspectString(str, opts) {
|
|
6007
6007
|
if (str.length > opts.maxStringLength) {
|
|
@@ -6016,15 +6016,15 @@ var require_object_inspect = __commonJS({
|
|
|
6016
6016
|
}
|
|
6017
6017
|
function lowbyte(c) {
|
|
6018
6018
|
var n = c.charCodeAt(0);
|
|
6019
|
-
var
|
|
6019
|
+
var x2 = {
|
|
6020
6020
|
8: "b",
|
|
6021
6021
|
9: "t",
|
|
6022
6022
|
10: "n",
|
|
6023
6023
|
12: "f",
|
|
6024
6024
|
13: "r"
|
|
6025
6025
|
}[n];
|
|
6026
|
-
if (
|
|
6027
|
-
return "\\" +
|
|
6026
|
+
if (x2) {
|
|
6027
|
+
return "\\" + x2;
|
|
6028
6028
|
}
|
|
6029
6029
|
return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
|
|
6030
6030
|
}
|
|
@@ -6080,8 +6080,8 @@ var require_object_inspect = __commonJS({
|
|
|
6080
6080
|
var symMap;
|
|
6081
6081
|
if (hasShammedSymbols) {
|
|
6082
6082
|
symMap = {};
|
|
6083
|
-
for (var
|
|
6084
|
-
symMap["$" + syms[
|
|
6083
|
+
for (var k2 = 0; k2 < syms.length; k2++) {
|
|
6084
|
+
symMap["$" + syms[k2]] = syms[k2];
|
|
6085
6085
|
}
|
|
6086
6086
|
}
|
|
6087
6087
|
for (var key in obj) {
|
|
@@ -6100,9 +6100,9 @@ var require_object_inspect = __commonJS({
|
|
|
6100
6100
|
}
|
|
6101
6101
|
}
|
|
6102
6102
|
if (typeof gOPS === "function") {
|
|
6103
|
-
for (var
|
|
6104
|
-
if (isEnumerable.call(obj, syms[
|
|
6105
|
-
xs.push("[" + inspect(syms[
|
|
6103
|
+
for (var j2 = 0; j2 < syms.length; j2++) {
|
|
6104
|
+
if (isEnumerable.call(obj, syms[j2])) {
|
|
6105
|
+
xs.push("[" + inspect(syms[j2]) + "]: " + inspect(obj[syms[j2]], obj));
|
|
6106
6106
|
}
|
|
6107
6107
|
}
|
|
6108
6108
|
}
|
|
@@ -6381,61 +6381,61 @@ var require_internal_slot = __commonJS({
|
|
|
6381
6381
|
var channel = require_side_channel()();
|
|
6382
6382
|
var $TypeError = require_type();
|
|
6383
6383
|
var SLOT = {
|
|
6384
|
-
assert: function(
|
|
6385
|
-
if (!
|
|
6384
|
+
assert: function(O2, slot) {
|
|
6385
|
+
if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
|
|
6386
6386
|
throw new $TypeError("`O` is not an object");
|
|
6387
6387
|
}
|
|
6388
6388
|
if (typeof slot !== "string") {
|
|
6389
6389
|
throw new $TypeError("`slot` must be a string");
|
|
6390
6390
|
}
|
|
6391
|
-
channel.assert(
|
|
6392
|
-
if (!SLOT.has(
|
|
6391
|
+
channel.assert(O2);
|
|
6392
|
+
if (!SLOT.has(O2, slot)) {
|
|
6393
6393
|
throw new $TypeError("`" + slot + "` is not present on `O`");
|
|
6394
6394
|
}
|
|
6395
6395
|
},
|
|
6396
|
-
get: function(
|
|
6397
|
-
if (!
|
|
6396
|
+
get: function(O2, slot) {
|
|
6397
|
+
if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
|
|
6398
6398
|
throw new $TypeError("`O` is not an object");
|
|
6399
6399
|
}
|
|
6400
6400
|
if (typeof slot !== "string") {
|
|
6401
6401
|
throw new $TypeError("`slot` must be a string");
|
|
6402
6402
|
}
|
|
6403
|
-
var slots = channel.get(
|
|
6403
|
+
var slots = channel.get(O2);
|
|
6404
6404
|
return slots && slots[
|
|
6405
6405
|
/** @type {SaltedInternalSlot} */
|
|
6406
6406
|
"$" + slot
|
|
6407
6407
|
];
|
|
6408
6408
|
},
|
|
6409
|
-
has: function(
|
|
6410
|
-
if (!
|
|
6409
|
+
has: function(O2, slot) {
|
|
6410
|
+
if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
|
|
6411
6411
|
throw new $TypeError("`O` is not an object");
|
|
6412
6412
|
}
|
|
6413
6413
|
if (typeof slot !== "string") {
|
|
6414
6414
|
throw new $TypeError("`slot` must be a string");
|
|
6415
6415
|
}
|
|
6416
|
-
var slots = channel.get(
|
|
6416
|
+
var slots = channel.get(O2);
|
|
6417
6417
|
return !!slots && hasOwn(
|
|
6418
6418
|
slots,
|
|
6419
6419
|
/** @type {SaltedInternalSlot} */
|
|
6420
6420
|
"$" + slot
|
|
6421
6421
|
);
|
|
6422
6422
|
},
|
|
6423
|
-
set: function(
|
|
6424
|
-
if (!
|
|
6423
|
+
set: function(O2, slot, V2) {
|
|
6424
|
+
if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
|
|
6425
6425
|
throw new $TypeError("`O` is not an object");
|
|
6426
6426
|
}
|
|
6427
6427
|
if (typeof slot !== "string") {
|
|
6428
6428
|
throw new $TypeError("`slot` must be a string");
|
|
6429
6429
|
}
|
|
6430
|
-
var slots = channel.get(
|
|
6430
|
+
var slots = channel.get(O2);
|
|
6431
6431
|
if (!slots) {
|
|
6432
6432
|
slots = {};
|
|
6433
|
-
channel.set(
|
|
6433
|
+
channel.set(O2, slots);
|
|
6434
6434
|
}
|
|
6435
6435
|
slots[
|
|
6436
6436
|
/** @type {SaltedInternalSlot} */
|
|
6437
6437
|
"$" + slot
|
|
6438
|
-
] =
|
|
6438
|
+
] = V2;
|
|
6439
6439
|
}
|
|
6440
6440
|
};
|
|
6441
6441
|
if (Object.freeze) {
|
|
@@ -6651,8 +6651,8 @@ var require_disposable_resource_record = __commonJS({
|
|
|
6651
6651
|
"../../node_modules/disposablestack/aos/records/disposable-resource-record.js"(exports2, module2) {
|
|
6652
6652
|
"use strict";
|
|
6653
6653
|
var $Object = Object;
|
|
6654
|
-
module2.exports = function isDisposeCapabilityRecord(
|
|
6655
|
-
return
|
|
6654
|
+
module2.exports = function isDisposeCapabilityRecord(x2) {
|
|
6655
|
+
return x2 && typeof x2 === "object" && (typeof x2["[[ResourceValue]]"] === "undefined" || $Object(x2["[[ResourceValue]]"]) === x2["[[ResourceValue]]"]) && (x2["[[Hint]]"] === "SYNC-DISPOSE" || x2["[[Hint]]"] === "ASYNC-DISPOSE") && (typeof x2["[[DisposeMethod]]"] === "function" || typeof x2["[[DisposeMethod]]"] === "undefined");
|
|
6656
6656
|
};
|
|
6657
6657
|
}
|
|
6658
6658
|
});
|
|
@@ -6665,8 +6665,8 @@ var require_dispose_capability_record = __commonJS({
|
|
|
6665
6665
|
var isArray = require_IsArray();
|
|
6666
6666
|
var every = require_every();
|
|
6667
6667
|
var isDisposableResourceRecord = require_disposable_resource_record();
|
|
6668
|
-
module2.exports = function isDisposeCapabilityRecord(
|
|
6669
|
-
return
|
|
6668
|
+
module2.exports = function isDisposeCapabilityRecord(x2) {
|
|
6669
|
+
return x2 && typeof x2 === "object" && hasOwn(x2, "[[DisposableResourceStack]]") && isArray(x2["[[DisposableResourceStack]]"]) && (x2["[[DisposableResourceStack]]"].length === 0 || every(x2["[[DisposableResourceStack]]"], isDisposableResourceRecord));
|
|
6670
6670
|
};
|
|
6671
6671
|
}
|
|
6672
6672
|
});
|
|
@@ -6676,23 +6676,23 @@ var require_Type = __commonJS({
|
|
|
6676
6676
|
"../../node_modules/es-abstract/5/Type.js"(exports2, module2) {
|
|
6677
6677
|
"use strict";
|
|
6678
6678
|
var isObject2 = require_isObject();
|
|
6679
|
-
module2.exports = function Type(
|
|
6680
|
-
if (
|
|
6679
|
+
module2.exports = function Type(x2) {
|
|
6680
|
+
if (x2 === null) {
|
|
6681
6681
|
return "Null";
|
|
6682
6682
|
}
|
|
6683
|
-
if (typeof
|
|
6683
|
+
if (typeof x2 === "undefined") {
|
|
6684
6684
|
return "Undefined";
|
|
6685
6685
|
}
|
|
6686
|
-
if (isObject2(
|
|
6686
|
+
if (isObject2(x2)) {
|
|
6687
6687
|
return "Object";
|
|
6688
6688
|
}
|
|
6689
|
-
if (typeof
|
|
6689
|
+
if (typeof x2 === "number") {
|
|
6690
6690
|
return "Number";
|
|
6691
6691
|
}
|
|
6692
|
-
if (typeof
|
|
6692
|
+
if (typeof x2 === "boolean") {
|
|
6693
6693
|
return "Boolean";
|
|
6694
6694
|
}
|
|
6695
|
-
if (typeof
|
|
6695
|
+
if (typeof x2 === "string") {
|
|
6696
6696
|
return "String";
|
|
6697
6697
|
}
|
|
6698
6698
|
};
|
|
@@ -6704,14 +6704,14 @@ var require_Type2 = __commonJS({
|
|
|
6704
6704
|
"../../node_modules/es-abstract/2024/Type.js"(exports2, module2) {
|
|
6705
6705
|
"use strict";
|
|
6706
6706
|
var ES5Type = require_Type();
|
|
6707
|
-
module2.exports = function Type(
|
|
6708
|
-
if (typeof
|
|
6707
|
+
module2.exports = function Type(x2) {
|
|
6708
|
+
if (typeof x2 === "symbol") {
|
|
6709
6709
|
return "Symbol";
|
|
6710
6710
|
}
|
|
6711
|
-
if (typeof
|
|
6711
|
+
if (typeof x2 === "bigint") {
|
|
6712
6712
|
return "BigInt";
|
|
6713
6713
|
}
|
|
6714
|
-
return ES5Type(
|
|
6714
|
+
return ES5Type(x2);
|
|
6715
6715
|
};
|
|
6716
6716
|
}
|
|
6717
6717
|
});
|
|
@@ -6723,11 +6723,11 @@ var require_GetV = __commonJS({
|
|
|
6723
6723
|
var $TypeError = require_type();
|
|
6724
6724
|
var inspect = require_object_inspect();
|
|
6725
6725
|
var isPropertyKey = require_isPropertyKey();
|
|
6726
|
-
module2.exports = function GetV(
|
|
6727
|
-
if (!isPropertyKey(
|
|
6728
|
-
throw new $TypeError("Assertion failed: P is not a Property Key, got " + inspect(
|
|
6726
|
+
module2.exports = function GetV(V2, P2) {
|
|
6727
|
+
if (!isPropertyKey(P2)) {
|
|
6728
|
+
throw new $TypeError("Assertion failed: P is not a Property Key, got " + inspect(P2));
|
|
6729
6729
|
}
|
|
6730
|
-
return
|
|
6730
|
+
return V2[P2];
|
|
6731
6731
|
};
|
|
6732
6732
|
}
|
|
6733
6733
|
});
|
|
@@ -6741,16 +6741,16 @@ var require_GetMethod = __commonJS({
|
|
|
6741
6741
|
var IsCallable = require_IsCallable2();
|
|
6742
6742
|
var isPropertyKey = require_isPropertyKey();
|
|
6743
6743
|
var inspect = require_object_inspect();
|
|
6744
|
-
module2.exports = function GetMethod(
|
|
6745
|
-
if (!isPropertyKey(
|
|
6744
|
+
module2.exports = function GetMethod(O2, P2) {
|
|
6745
|
+
if (!isPropertyKey(P2)) {
|
|
6746
6746
|
throw new $TypeError("Assertion failed: P is not a Property Key");
|
|
6747
6747
|
}
|
|
6748
|
-
var func = GetV(
|
|
6748
|
+
var func = GetV(O2, P2);
|
|
6749
6749
|
if (func == null) {
|
|
6750
6750
|
return void 0;
|
|
6751
6751
|
}
|
|
6752
6752
|
if (!IsCallable(func)) {
|
|
6753
|
-
throw new $TypeError(inspect(
|
|
6753
|
+
throw new $TypeError(inspect(P2) + " is not a function: " + inspect(func));
|
|
6754
6754
|
}
|
|
6755
6755
|
return func;
|
|
6756
6756
|
};
|
|
@@ -6811,12 +6811,12 @@ var require_NewPromiseCapability = __commonJS({
|
|
|
6811
6811
|
var $TypeError = require_type();
|
|
6812
6812
|
var IsCallable = require_IsCallable2();
|
|
6813
6813
|
var IsConstructor = require_IsConstructor();
|
|
6814
|
-
module2.exports = function NewPromiseCapability(
|
|
6815
|
-
if (!IsConstructor(
|
|
6814
|
+
module2.exports = function NewPromiseCapability(C2) {
|
|
6815
|
+
if (!IsConstructor(C2)) {
|
|
6816
6816
|
throw new $TypeError("C must be a constructor");
|
|
6817
6817
|
}
|
|
6818
6818
|
var resolvingFunctions = { "[[Resolve]]": void 0, "[[Reject]]": void 0 };
|
|
6819
|
-
var promise2 = new
|
|
6819
|
+
var promise2 = new C2(function(resolve, reject) {
|
|
6820
6820
|
if (typeof resolvingFunctions["[[Resolve]]"] !== "undefined" || typeof resolvingFunctions["[[Reject]]"] !== "undefined") {
|
|
6821
6821
|
throw new $TypeError("executor has already been called");
|
|
6822
6822
|
}
|
|
@@ -6847,8 +6847,8 @@ var require_GetDisposeMethod = __commonJS({
|
|
|
6847
6847
|
var Type = require_Type2();
|
|
6848
6848
|
var symbolDispose = require_polyfill3()();
|
|
6849
6849
|
var symbolAsyncDispose = require_polyfill4()();
|
|
6850
|
-
module2.exports = function GetDisposeMethod(
|
|
6851
|
-
if (Type(
|
|
6850
|
+
module2.exports = function GetDisposeMethod(V2, hint) {
|
|
6851
|
+
if (Type(V2) !== "Object") {
|
|
6852
6852
|
throw new $TypeError("`V` must be an Object");
|
|
6853
6853
|
}
|
|
6854
6854
|
if (hint !== "SYNC-DISPOSE" && hint !== "ASYNC-DISPOSE") {
|
|
@@ -6856,27 +6856,27 @@ var require_GetDisposeMethod = __commonJS({
|
|
|
6856
6856
|
}
|
|
6857
6857
|
var method;
|
|
6858
6858
|
if (hint === "ASYNC-DISPOSE" && symbolAsyncDispose) {
|
|
6859
|
-
method = GetMethod(
|
|
6859
|
+
method = GetMethod(V2, symbolAsyncDispose);
|
|
6860
6860
|
}
|
|
6861
6861
|
if (!method) {
|
|
6862
6862
|
if (!symbolDispose) {
|
|
6863
6863
|
throw new $SyntaxError("`Symbol.dispose` is not supported");
|
|
6864
6864
|
}
|
|
6865
|
-
method = GetMethod(
|
|
6865
|
+
method = GetMethod(V2, symbolDispose);
|
|
6866
6866
|
if (typeof method !== "undefined") {
|
|
6867
6867
|
return function() {
|
|
6868
|
-
var
|
|
6868
|
+
var O2 = this;
|
|
6869
6869
|
if (hint === "ASYNC-DISPOSE") {
|
|
6870
6870
|
var promiseCapability = NewPromiseCapability(Promise);
|
|
6871
6871
|
try {
|
|
6872
|
-
Call(method,
|
|
6872
|
+
Call(method, O2);
|
|
6873
6873
|
Call(promiseCapability["[[Resolve]]"], void 0, [void 0]);
|
|
6874
6874
|
} catch (e) {
|
|
6875
6875
|
promiseCapability["[[Reject]]"](e);
|
|
6876
6876
|
}
|
|
6877
6877
|
return promiseCapability["[[Promise]]"];
|
|
6878
6878
|
}
|
|
6879
|
-
Call(method,
|
|
6879
|
+
Call(method, O2);
|
|
6880
6880
|
return void 0;
|
|
6881
6881
|
};
|
|
6882
6882
|
}
|
|
@@ -6895,20 +6895,20 @@ var require_CreateDisposableResource = __commonJS({
|
|
|
6895
6895
|
var IsCallable = require_IsCallable2();
|
|
6896
6896
|
var Type = require_Type2();
|
|
6897
6897
|
var GetDisposeMethod = require_GetDisposeMethod();
|
|
6898
|
-
module2.exports = function CreateDisposableResource(
|
|
6898
|
+
module2.exports = function CreateDisposableResource(V2, hint) {
|
|
6899
6899
|
if (hint !== "SYNC-DISPOSE" && hint !== "ASYNC-DISPOSE") {
|
|
6900
6900
|
throw new $SyntaxError("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");
|
|
6901
6901
|
}
|
|
6902
6902
|
var method;
|
|
6903
6903
|
if (arguments.length < 3) {
|
|
6904
|
-
if (
|
|
6905
|
-
|
|
6904
|
+
if (V2 == null) {
|
|
6905
|
+
V2 = void 0;
|
|
6906
6906
|
method = void 0;
|
|
6907
6907
|
} else {
|
|
6908
|
-
if (typeof
|
|
6908
|
+
if (typeof V2 !== "undefined" && Type(V2) !== "Object") {
|
|
6909
6909
|
throw new $TypeError("`V` must be an Object, or `null` or `undefined`");
|
|
6910
6910
|
}
|
|
6911
|
-
method = GetDisposeMethod(
|
|
6911
|
+
method = GetDisposeMethod(V2, hint);
|
|
6912
6912
|
if (typeof method === "undefined") {
|
|
6913
6913
|
throw new $TypeError("dispose method must not be `undefined` on `V` when an object `V` is provided");
|
|
6914
6914
|
}
|
|
@@ -6921,7 +6921,7 @@ var require_CreateDisposableResource = __commonJS({
|
|
|
6921
6921
|
}
|
|
6922
6922
|
return {
|
|
6923
6923
|
// step 3
|
|
6924
|
-
"[[ResourceValue]]":
|
|
6924
|
+
"[[ResourceValue]]": V2,
|
|
6925
6925
|
"[[Hint]]": hint,
|
|
6926
6926
|
"[[DisposeMethod]]": method
|
|
6927
6927
|
};
|
|
@@ -6939,7 +6939,7 @@ var require_AddDisposableResource = __commonJS({
|
|
|
6939
6939
|
var CreateDisposableResource = require_CreateDisposableResource();
|
|
6940
6940
|
var callBound = require_call_bound();
|
|
6941
6941
|
var $push = callBound("Array.prototype.push");
|
|
6942
|
-
module2.exports = function AddDisposableResource(disposeCapability,
|
|
6942
|
+
module2.exports = function AddDisposableResource(disposeCapability, V2, hint) {
|
|
6943
6943
|
if (!isDisposeCapabilityRecord(disposeCapability)) {
|
|
6944
6944
|
throw new $TypeError("Assertion failed: `disposeCapability` must be a DisposeCapability Record");
|
|
6945
6945
|
}
|
|
@@ -6955,12 +6955,12 @@ var require_AddDisposableResource = __commonJS({
|
|
|
6955
6955
|
}
|
|
6956
6956
|
var resource;
|
|
6957
6957
|
if (arguments.length < 4) {
|
|
6958
|
-
if (
|
|
6958
|
+
if (V2 == null && hint === "SYNC_DISPOSE") {
|
|
6959
6959
|
return "UNUSED";
|
|
6960
6960
|
}
|
|
6961
|
-
resource = CreateDisposableResource(
|
|
6961
|
+
resource = CreateDisposableResource(V2, hint);
|
|
6962
6962
|
} else {
|
|
6963
|
-
if (typeof
|
|
6963
|
+
if (typeof V2 !== "undefined") {
|
|
6964
6964
|
throw new $TypeError("Assertion failed: `V` must be undefined when `method` is present");
|
|
6965
6965
|
}
|
|
6966
6966
|
resource = CreateDisposableResource(void 0, hint, method);
|
|
@@ -6980,11 +6980,11 @@ var require_PromiseResolve = __commonJS({
|
|
|
6980
6980
|
var $SyntaxError = require_syntax();
|
|
6981
6981
|
var $resolve = GetIntrinsic("%Promise.resolve%", true);
|
|
6982
6982
|
var $PromiseResolve = $resolve && callBind($resolve);
|
|
6983
|
-
module2.exports = function PromiseResolve(
|
|
6983
|
+
module2.exports = function PromiseResolve(C2, x2) {
|
|
6984
6984
|
if (!$PromiseResolve) {
|
|
6985
6985
|
throw new $SyntaxError("This environment does not support Promises.");
|
|
6986
6986
|
}
|
|
6987
|
-
return $PromiseResolve(
|
|
6987
|
+
return $PromiseResolve(C2, x2);
|
|
6988
6988
|
};
|
|
6989
6989
|
}
|
|
6990
6990
|
});
|
|
@@ -6999,8 +6999,8 @@ var require_Dispose = __commonJS({
|
|
|
6999
6999
|
var Call = require_Call();
|
|
7000
7000
|
var PromiseResolve = require_PromiseResolve();
|
|
7001
7001
|
var Type = require_Type2();
|
|
7002
|
-
module2.exports = function Dispose(
|
|
7003
|
-
if (typeof
|
|
7002
|
+
module2.exports = function Dispose(V2, hint, method) {
|
|
7003
|
+
if (typeof V2 !== "undefined" && Type(V2) !== "Object") {
|
|
7004
7004
|
throw new $SyntaxError("Assertion failed: `V` must be `undefined` or an Object");
|
|
7005
7005
|
}
|
|
7006
7006
|
if (hint !== "SYNC-DISPOSE" && hint !== "ASYNC-DISPOSE") {
|
|
@@ -7009,7 +7009,7 @@ var require_Dispose = __commonJS({
|
|
|
7009
7009
|
if (typeof method !== "undefined" && typeof method !== "function") {
|
|
7010
7010
|
throw new $SyntaxError("Assertion failed: `method` must be `undefined` or a function");
|
|
7011
7011
|
}
|
|
7012
|
-
var result = typeof method === "undefined" ? method : Call(method,
|
|
7012
|
+
var result = typeof method === "undefined" ? method : Call(method, V2);
|
|
7013
7013
|
if (hint === "ASYNC-DISPOSE") {
|
|
7014
7014
|
return PromiseResolve($Promise, result);
|
|
7015
7015
|
}
|
|
@@ -7053,10 +7053,10 @@ var require_DisposeResources = __commonJS({
|
|
|
7053
7053
|
throw new $TypeError("Assertion failed: `disposeCapability.[[DisposableResourceStack]]` must not be ~EMPTY~");
|
|
7054
7054
|
}
|
|
7055
7055
|
var actualHint;
|
|
7056
|
-
for (var
|
|
7056
|
+
for (var j2 = stack.length - 1; j2 >= 0; j2 -= 1) {
|
|
7057
7057
|
if (!actualHint) {
|
|
7058
|
-
actualHint = stack[
|
|
7059
|
-
} else if (actualHint !== stack[
|
|
7058
|
+
actualHint = stack[j2]["[[Hint]]"];
|
|
7059
|
+
} else if (actualHint !== stack[j2]["[[Hint]]"]) {
|
|
7060
7060
|
throw new $SyntaxError("mixed hint stacks are not supported");
|
|
7061
7061
|
}
|
|
7062
7062
|
}
|
|
@@ -7196,10 +7196,10 @@ var require_implementation7 = __commonJS({
|
|
|
7196
7196
|
if (!IsCallable(onDispose)) {
|
|
7197
7197
|
throw new $TypeError("`onDispose` must be a function");
|
|
7198
7198
|
}
|
|
7199
|
-
var
|
|
7199
|
+
var F2 = (0, function() {
|
|
7200
7200
|
return Call(onDispose, void 0, [value]);
|
|
7201
7201
|
});
|
|
7202
|
-
AddDisposableResource(SLOT.get(disposableStack, "[[DisposeCapability]]"), void 0, "SYNC-DISPOSE",
|
|
7202
|
+
AddDisposableResource(SLOT.get(disposableStack, "[[DisposeCapability]]"), void 0, "SYNC-DISPOSE", F2);
|
|
7203
7203
|
return value;
|
|
7204
7204
|
});
|
|
7205
7205
|
CreateMethodProperty(DisposableStack2.prototype, "defer", function defer(onDispose) {
|
|
@@ -7345,11 +7345,11 @@ var require_implementation8 = __commonJS({
|
|
|
7345
7345
|
if (!IsCallable(onDisposeAsync)) {
|
|
7346
7346
|
throw new $TypeError("`onDisposeAsync` must be a function");
|
|
7347
7347
|
}
|
|
7348
|
-
var
|
|
7348
|
+
var F2 = (0, function() {
|
|
7349
7349
|
return Call(onDisposeAsync, void 0, [value]);
|
|
7350
7350
|
});
|
|
7351
|
-
|
|
7352
|
-
AddDisposableResource(SLOT.get(asyncDisposableStack, "[[DisposeCapability]]"), void 0, "ASYNC-DISPOSE",
|
|
7351
|
+
F2.value = value;
|
|
7352
|
+
AddDisposableResource(SLOT.get(asyncDisposableStack, "[[DisposeCapability]]"), void 0, "ASYNC-DISPOSE", F2);
|
|
7353
7353
|
return value;
|
|
7354
7354
|
});
|
|
7355
7355
|
CreateMethodProperty(AsyncDisposableStack2.prototype, "defer", function defer(onDisposeAsync) {
|
|
@@ -8320,10 +8320,10 @@ var require_http_errors = __commonJS({
|
|
|
8320
8320
|
var require_ms = __commonJS({
|
|
8321
8321
|
"../../node_modules/body-parser/node_modules/ms/index.js"(exports2, module2) {
|
|
8322
8322
|
var s = 1e3;
|
|
8323
|
-
var
|
|
8324
|
-
var h =
|
|
8323
|
+
var m2 = s * 60;
|
|
8324
|
+
var h = m2 * 60;
|
|
8325
8325
|
var d = h * 24;
|
|
8326
|
-
var
|
|
8326
|
+
var y2 = d * 365.25;
|
|
8327
8327
|
module2.exports = function(val, options) {
|
|
8328
8328
|
options = options || {};
|
|
8329
8329
|
var type = typeof val;
|
|
@@ -8355,7 +8355,7 @@ var require_ms = __commonJS({
|
|
|
8355
8355
|
case "yrs":
|
|
8356
8356
|
case "yr":
|
|
8357
8357
|
case "y":
|
|
8358
|
-
return n *
|
|
8358
|
+
return n * y2;
|
|
8359
8359
|
case "days":
|
|
8360
8360
|
case "day":
|
|
8361
8361
|
case "d":
|
|
@@ -8371,7 +8371,7 @@ var require_ms = __commonJS({
|
|
|
8371
8371
|
case "mins":
|
|
8372
8372
|
case "min":
|
|
8373
8373
|
case "m":
|
|
8374
|
-
return n *
|
|
8374
|
+
return n * m2;
|
|
8375
8375
|
case "seconds":
|
|
8376
8376
|
case "second":
|
|
8377
8377
|
case "secs":
|
|
@@ -8395,8 +8395,8 @@ var require_ms = __commonJS({
|
|
|
8395
8395
|
if (ms >= h) {
|
|
8396
8396
|
return Math.round(ms / h) + "h";
|
|
8397
8397
|
}
|
|
8398
|
-
if (ms >=
|
|
8399
|
-
return Math.round(ms /
|
|
8398
|
+
if (ms >= m2) {
|
|
8399
|
+
return Math.round(ms / m2) + "m";
|
|
8400
8400
|
}
|
|
8401
8401
|
if (ms >= s) {
|
|
8402
8402
|
return Math.round(ms / s) + "s";
|
|
@@ -8404,7 +8404,7 @@ var require_ms = __commonJS({
|
|
|
8404
8404
|
return ms + "ms";
|
|
8405
8405
|
}
|
|
8406
8406
|
function fmtLong(ms) {
|
|
8407
|
-
return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms,
|
|
8407
|
+
return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m2, "minute") || plural(ms, s, "second") || ms + " ms";
|
|
8408
8408
|
}
|
|
8409
8409
|
function plural(ms, n, name) {
|
|
8410
8410
|
if (ms < n) {
|
|
@@ -8551,9 +8551,9 @@ var require_browser = __commonJS({
|
|
|
8551
8551
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // double check webkit in userAgent just in case we are in a worker
|
|
8552
8552
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
8553
8553
|
}
|
|
8554
|
-
exports2.formatters.j = function(
|
|
8554
|
+
exports2.formatters.j = function(v2) {
|
|
8555
8555
|
try {
|
|
8556
|
-
return JSON.stringify(
|
|
8556
|
+
return JSON.stringify(v2);
|
|
8557
8557
|
} catch (err) {
|
|
8558
8558
|
return "[UnexpectedJSONParseError]: " + err.message;
|
|
8559
8559
|
}
|
|
@@ -8625,8 +8625,8 @@ var require_node = __commonJS({
|
|
|
8625
8625
|
exports2.inspectOpts = Object.keys(process.env).filter(function(key) {
|
|
8626
8626
|
return /^debug_/i.test(key);
|
|
8627
8627
|
}).reduce(function(obj, key) {
|
|
8628
|
-
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(
|
|
8629
|
-
return
|
|
8628
|
+
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_2, k2) {
|
|
8629
|
+
return k2.toUpperCase();
|
|
8630
8630
|
});
|
|
8631
8631
|
var val = process.env[key];
|
|
8632
8632
|
if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
|
|
@@ -8645,15 +8645,15 @@ var require_node = __commonJS({
|
|
|
8645
8645
|
function useColors() {
|
|
8646
8646
|
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(fd);
|
|
8647
8647
|
}
|
|
8648
|
-
exports2.formatters.o = function(
|
|
8648
|
+
exports2.formatters.o = function(v2) {
|
|
8649
8649
|
this.inspectOpts.colors = this.useColors;
|
|
8650
|
-
return util.inspect(
|
|
8650
|
+
return util.inspect(v2, this.inspectOpts).split("\n").map(function(str) {
|
|
8651
8651
|
return str.trim();
|
|
8652
8652
|
}).join(" ");
|
|
8653
8653
|
};
|
|
8654
|
-
exports2.formatters.O = function(
|
|
8654
|
+
exports2.formatters.O = function(v2) {
|
|
8655
8655
|
this.inspectOpts.colors = this.useColors;
|
|
8656
|
-
return util.inspect(
|
|
8656
|
+
return util.inspect(v2, this.inspectOpts);
|
|
8657
8657
|
};
|
|
8658
8658
|
function formatArgs(args) {
|
|
8659
8659
|
var name = this.namespace;
|
|
@@ -9113,19 +9113,19 @@ var require_utf16 = __commonJS({
|
|
|
9113
9113
|
Utf16BEDecoder.prototype.write = function(buf) {
|
|
9114
9114
|
if (buf.length == 0)
|
|
9115
9115
|
return "";
|
|
9116
|
-
var buf2 = Buffer2.alloc(buf.length + 1), i = 0,
|
|
9116
|
+
var buf2 = Buffer2.alloc(buf.length + 1), i = 0, j2 = 0;
|
|
9117
9117
|
if (this.overflowByte !== -1) {
|
|
9118
9118
|
buf2[0] = buf[0];
|
|
9119
9119
|
buf2[1] = this.overflowByte;
|
|
9120
9120
|
i = 1;
|
|
9121
|
-
|
|
9121
|
+
j2 = 2;
|
|
9122
9122
|
}
|
|
9123
|
-
for (; i < buf.length - 1; i += 2,
|
|
9124
|
-
buf2[
|
|
9125
|
-
buf2[
|
|
9123
|
+
for (; i < buf.length - 1; i += 2, j2 += 2) {
|
|
9124
|
+
buf2[j2] = buf[i + 1];
|
|
9125
|
+
buf2[j2 + 1] = buf[i];
|
|
9126
9126
|
}
|
|
9127
9127
|
this.overflowByte = i == buf.length - 1 ? buf[buf.length - 1] : -1;
|
|
9128
|
-
return buf2.slice(0,
|
|
9128
|
+
return buf2.slice(0, j2).toString("ucs2");
|
|
9129
9129
|
};
|
|
9130
9130
|
Utf16BEDecoder.prototype.end = function() {
|
|
9131
9131
|
};
|
|
@@ -10097,8 +10097,8 @@ var require_dbcs_codec = __commonJS({
|
|
|
10097
10097
|
if (typeof val === "number")
|
|
10098
10098
|
skipEncodeChars[val] = true;
|
|
10099
10099
|
else
|
|
10100
|
-
for (var
|
|
10101
|
-
skipEncodeChars[
|
|
10100
|
+
for (var j2 = val.from; j2 <= val.to; j2++)
|
|
10101
|
+
skipEncodeChars[j2] = true;
|
|
10102
10102
|
}
|
|
10103
10103
|
this._fillEncodeTable(0, 0, skipEncodeChars);
|
|
10104
10104
|
if (codecOptions.encodeAdd) {
|
|
@@ -10118,8 +10118,8 @@ var require_dbcs_codec = __commonJS({
|
|
|
10118
10118
|
for (var i2 = 129; i2 <= 254; i2++) {
|
|
10119
10119
|
var secondByteNodeIdx = NODE_START - this.decodeTables[0][i2];
|
|
10120
10120
|
var secondByteNode = this.decodeTables[secondByteNodeIdx];
|
|
10121
|
-
for (var
|
|
10122
|
-
secondByteNode[
|
|
10121
|
+
for (var j2 = 48; j2 <= 57; j2++)
|
|
10122
|
+
secondByteNode[j2] = NODE_START - thirdByteNodeIdx;
|
|
10123
10123
|
}
|
|
10124
10124
|
for (var i2 = 129; i2 <= 254; i2++)
|
|
10125
10125
|
thirdByteNode[i2] = NODE_START - fourthByteNodeIdx;
|
|
@@ -10152,8 +10152,8 @@ var require_dbcs_codec = __commonJS({
|
|
|
10152
10152
|
var curAddr = parseInt(chunk[0], 16);
|
|
10153
10153
|
var writeTable = this._getDecodeTrieNode(curAddr);
|
|
10154
10154
|
curAddr = curAddr & 255;
|
|
10155
|
-
for (var
|
|
10156
|
-
var part = chunk[
|
|
10155
|
+
for (var k2 = 1; k2 < chunk.length; k2++) {
|
|
10156
|
+
var part = chunk[k2];
|
|
10157
10157
|
if (typeof part === "string") {
|
|
10158
10158
|
for (var l = 0; l < part.length; ) {
|
|
10159
10159
|
var code = part.charCodeAt(l++);
|
|
@@ -10166,7 +10166,7 @@ var require_dbcs_codec = __commonJS({
|
|
|
10166
10166
|
} else if (4080 < code && code <= 4095) {
|
|
10167
10167
|
var len = 4095 - code + 2;
|
|
10168
10168
|
var seq = [];
|
|
10169
|
-
for (var
|
|
10169
|
+
for (var m2 = 0; m2 < len; m2++)
|
|
10170
10170
|
seq.push(part.charCodeAt(l++));
|
|
10171
10171
|
writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;
|
|
10172
10172
|
this.decodeTableSeq.push(seq);
|
|
@@ -10210,7 +10210,7 @@ var require_dbcs_codec = __commonJS({
|
|
|
10210
10210
|
bucket[low] = SEQ_START - this.encodeTableSeq.length;
|
|
10211
10211
|
this.encodeTableSeq.push(node);
|
|
10212
10212
|
}
|
|
10213
|
-
for (var
|
|
10213
|
+
for (var j2 = 1; j2 < seq.length - 1; j2++) {
|
|
10214
10214
|
var oldVal = node[uCode];
|
|
10215
10215
|
if (typeof oldVal === "object")
|
|
10216
10216
|
node = oldVal;
|
|
@@ -10247,7 +10247,7 @@ var require_dbcs_codec = __commonJS({
|
|
|
10247
10247
|
this.gb18030 = codec2.gb18030;
|
|
10248
10248
|
}
|
|
10249
10249
|
DBCSEncoder.prototype.write = function(str) {
|
|
10250
|
-
var newBuf = Buffer2.alloc(str.length * (this.gb18030 ? 4 : 3)), leadSurrogate = this.leadSurrogate, seqObj = this.seqObj, nextChar = -1, i2 = 0,
|
|
10250
|
+
var newBuf = Buffer2.alloc(str.length * (this.gb18030 ? 4 : 3)), leadSurrogate = this.leadSurrogate, seqObj = this.seqObj, nextChar = -1, i2 = 0, j2 = 0;
|
|
10251
10251
|
while (true) {
|
|
10252
10252
|
if (nextChar === -1) {
|
|
10253
10253
|
if (i2 == str.length) break;
|
|
@@ -10307,13 +10307,13 @@ var require_dbcs_codec = __commonJS({
|
|
|
10307
10307
|
var idx = findIdx(this.gb18030.uChars, uCode);
|
|
10308
10308
|
if (idx != -1) {
|
|
10309
10309
|
var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);
|
|
10310
|
-
newBuf[
|
|
10310
|
+
newBuf[j2++] = 129 + Math.floor(dbcsCode / 12600);
|
|
10311
10311
|
dbcsCode = dbcsCode % 12600;
|
|
10312
|
-
newBuf[
|
|
10312
|
+
newBuf[j2++] = 48 + Math.floor(dbcsCode / 1260);
|
|
10313
10313
|
dbcsCode = dbcsCode % 1260;
|
|
10314
|
-
newBuf[
|
|
10314
|
+
newBuf[j2++] = 129 + Math.floor(dbcsCode / 10);
|
|
10315
10315
|
dbcsCode = dbcsCode % 10;
|
|
10316
|
-
newBuf[
|
|
10316
|
+
newBuf[j2++] = 48 + dbcsCode;
|
|
10317
10317
|
continue;
|
|
10318
10318
|
}
|
|
10319
10319
|
}
|
|
@@ -10321,42 +10321,42 @@ var require_dbcs_codec = __commonJS({
|
|
|
10321
10321
|
if (dbcsCode === UNASSIGNED)
|
|
10322
10322
|
dbcsCode = this.defaultCharSingleByte;
|
|
10323
10323
|
if (dbcsCode < 256) {
|
|
10324
|
-
newBuf[
|
|
10324
|
+
newBuf[j2++] = dbcsCode;
|
|
10325
10325
|
} else if (dbcsCode < 65536) {
|
|
10326
|
-
newBuf[
|
|
10327
|
-
newBuf[
|
|
10326
|
+
newBuf[j2++] = dbcsCode >> 8;
|
|
10327
|
+
newBuf[j2++] = dbcsCode & 255;
|
|
10328
10328
|
} else {
|
|
10329
|
-
newBuf[
|
|
10330
|
-
newBuf[
|
|
10331
|
-
newBuf[
|
|
10329
|
+
newBuf[j2++] = dbcsCode >> 16;
|
|
10330
|
+
newBuf[j2++] = dbcsCode >> 8 & 255;
|
|
10331
|
+
newBuf[j2++] = dbcsCode & 255;
|
|
10332
10332
|
}
|
|
10333
10333
|
}
|
|
10334
10334
|
this.seqObj = seqObj;
|
|
10335
10335
|
this.leadSurrogate = leadSurrogate;
|
|
10336
|
-
return newBuf.slice(0,
|
|
10336
|
+
return newBuf.slice(0, j2);
|
|
10337
10337
|
};
|
|
10338
10338
|
DBCSEncoder.prototype.end = function() {
|
|
10339
10339
|
if (this.leadSurrogate === -1 && this.seqObj === void 0)
|
|
10340
10340
|
return;
|
|
10341
|
-
var newBuf = Buffer2.alloc(10),
|
|
10341
|
+
var newBuf = Buffer2.alloc(10), j2 = 0;
|
|
10342
10342
|
if (this.seqObj) {
|
|
10343
10343
|
var dbcsCode = this.seqObj[DEF_CHAR];
|
|
10344
10344
|
if (dbcsCode !== void 0) {
|
|
10345
10345
|
if (dbcsCode < 256) {
|
|
10346
|
-
newBuf[
|
|
10346
|
+
newBuf[j2++] = dbcsCode;
|
|
10347
10347
|
} else {
|
|
10348
|
-
newBuf[
|
|
10349
|
-
newBuf[
|
|
10348
|
+
newBuf[j2++] = dbcsCode >> 8;
|
|
10349
|
+
newBuf[j2++] = dbcsCode & 255;
|
|
10350
10350
|
}
|
|
10351
10351
|
} else {
|
|
10352
10352
|
}
|
|
10353
10353
|
this.seqObj = void 0;
|
|
10354
10354
|
}
|
|
10355
10355
|
if (this.leadSurrogate !== -1) {
|
|
10356
|
-
newBuf[
|
|
10356
|
+
newBuf[j2++] = this.defaultCharSingleByte;
|
|
10357
10357
|
this.leadSurrogate = -1;
|
|
10358
10358
|
}
|
|
10359
|
-
return newBuf.slice(0,
|
|
10359
|
+
return newBuf.slice(0, j2);
|
|
10360
10360
|
};
|
|
10361
10361
|
DBCSEncoder.prototype.findIdx = findIdx;
|
|
10362
10362
|
function DBCSDecoder(options, codec2) {
|
|
@@ -10371,7 +10371,7 @@ var require_dbcs_codec = __commonJS({
|
|
|
10371
10371
|
var newBuf = Buffer2.alloc(buf.length * 2), nodeIdx = this.nodeIdx, prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, seqStart = -this.prevBuf.length, uCode;
|
|
10372
10372
|
if (prevBufOffset > 0)
|
|
10373
10373
|
prevBuf = Buffer2.concat([prevBuf, buf.slice(0, 10)]);
|
|
10374
|
-
for (var i2 = 0,
|
|
10374
|
+
for (var i2 = 0, j2 = 0; i2 < buf.length; i2++) {
|
|
10375
10375
|
var curByte = i2 >= 0 ? buf[i2] : prevBuf[i2 + prevBufOffset];
|
|
10376
10376
|
var uCode = this.decodeTables[nodeIdx][curByte];
|
|
10377
10377
|
if (uCode >= 0) {
|
|
@@ -10388,10 +10388,10 @@ var require_dbcs_codec = __commonJS({
|
|
|
10388
10388
|
continue;
|
|
10389
10389
|
} else if (uCode <= SEQ_START) {
|
|
10390
10390
|
var seq = this.decodeTableSeq[SEQ_START - uCode];
|
|
10391
|
-
for (var
|
|
10392
|
-
uCode = seq[
|
|
10393
|
-
newBuf[
|
|
10394
|
-
newBuf[
|
|
10391
|
+
for (var k2 = 0; k2 < seq.length - 1; k2++) {
|
|
10392
|
+
uCode = seq[k2];
|
|
10393
|
+
newBuf[j2++] = uCode & 255;
|
|
10394
|
+
newBuf[j2++] = uCode >> 8;
|
|
10395
10395
|
}
|
|
10396
10396
|
uCode = seq[seq.length - 1];
|
|
10397
10397
|
} else
|
|
@@ -10399,18 +10399,18 @@ var require_dbcs_codec = __commonJS({
|
|
|
10399
10399
|
if (uCode > 65535) {
|
|
10400
10400
|
uCode -= 65536;
|
|
10401
10401
|
var uCodeLead = 55296 + Math.floor(uCode / 1024);
|
|
10402
|
-
newBuf[
|
|
10403
|
-
newBuf[
|
|
10402
|
+
newBuf[j2++] = uCodeLead & 255;
|
|
10403
|
+
newBuf[j2++] = uCodeLead >> 8;
|
|
10404
10404
|
uCode = 56320 + uCode % 1024;
|
|
10405
10405
|
}
|
|
10406
|
-
newBuf[
|
|
10407
|
-
newBuf[
|
|
10406
|
+
newBuf[j2++] = uCode & 255;
|
|
10407
|
+
newBuf[j2++] = uCode >> 8;
|
|
10408
10408
|
nodeIdx = 0;
|
|
10409
10409
|
seqStart = i2 + 1;
|
|
10410
10410
|
}
|
|
10411
10411
|
this.nodeIdx = nodeIdx;
|
|
10412
10412
|
this.prevBuf = seqStart >= 0 ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset);
|
|
10413
|
-
return newBuf.slice(0,
|
|
10413
|
+
return newBuf.slice(0, j2).toString("ucs2");
|
|
10414
10414
|
};
|
|
10415
10415
|
DBCSDecoder.prototype.end = function() {
|
|
10416
10416
|
var ret = "";
|
|
@@ -12496,8 +12496,8 @@ var require_ee_first = __commonJS({
|
|
|
12496
12496
|
if (!Array.isArray(arr) || arr.length < 2)
|
|
12497
12497
|
throw new TypeError("each array member must be [ee, events...]");
|
|
12498
12498
|
var ee = arr[0];
|
|
12499
|
-
for (var
|
|
12500
|
-
var event = arr[
|
|
12499
|
+
for (var j2 = 1; j2 < arr.length; j2++) {
|
|
12500
|
+
var event = arr[j2];
|
|
12501
12501
|
var fn = listener(event, callback);
|
|
12502
12502
|
ee.on(event, fn);
|
|
12503
12503
|
cleanups.push({
|
|
@@ -12512,10 +12512,10 @@ var require_ee_first = __commonJS({
|
|
|
12512
12512
|
done.apply(null, arguments);
|
|
12513
12513
|
}
|
|
12514
12514
|
function cleanup() {
|
|
12515
|
-
var
|
|
12515
|
+
var x2;
|
|
12516
12516
|
for (var i2 = 0; i2 < cleanups.length; i2++) {
|
|
12517
|
-
|
|
12518
|
-
|
|
12517
|
+
x2 = cleanups[i2];
|
|
12518
|
+
x2.ee.removeListener(x2.event, x2.fn);
|
|
12519
12519
|
}
|
|
12520
12520
|
}
|
|
12521
12521
|
function thunk(fn2) {
|
|
@@ -21937,9 +21937,9 @@ var require_utils = __commonJS({
|
|
|
21937
21937
|
var obj = item.obj[item.prop];
|
|
21938
21938
|
if (isArray(obj)) {
|
|
21939
21939
|
var compacted = [];
|
|
21940
|
-
for (var
|
|
21941
|
-
if (typeof obj[
|
|
21942
|
-
compacted[compacted.length] = obj[
|
|
21940
|
+
for (var j2 = 0; j2 < obj.length; ++j2) {
|
|
21941
|
+
if (typeof obj[j2] !== "undefined") {
|
|
21942
|
+
compacted[compacted.length] = obj[j2];
|
|
21943
21943
|
}
|
|
21944
21944
|
}
|
|
21945
21945
|
item.obj[item.prop] = compacted;
|
|
@@ -21983,9 +21983,9 @@ var require_utils = __commonJS({
|
|
|
21983
21983
|
if (isOverflow(source)) {
|
|
21984
21984
|
var sourceKeys = Object.keys(source);
|
|
21985
21985
|
var result = options && options.plainObjects ? { __proto__: null, 0: target } : { 0: target };
|
|
21986
|
-
for (var
|
|
21987
|
-
var oldKey = parseInt(sourceKeys[
|
|
21988
|
-
result[oldKey + 1] = source[sourceKeys[
|
|
21986
|
+
for (var m2 = 0; m2 < sourceKeys.length; m2++) {
|
|
21987
|
+
var oldKey = parseInt(sourceKeys[m2], 10);
|
|
21988
|
+
result[oldKey + 1] = source[sourceKeys[m2]];
|
|
21989
21989
|
}
|
|
21990
21990
|
return markOverflow(result, getMaxIndex(source) + 1);
|
|
21991
21991
|
}
|
|
@@ -22067,8 +22067,8 @@ var require_utils = __commonJS({
|
|
|
22067
22067
|
});
|
|
22068
22068
|
}
|
|
22069
22069
|
var out = "";
|
|
22070
|
-
for (var
|
|
22071
|
-
var segment = string4.length >= limit ? string4.slice(
|
|
22070
|
+
for (var j2 = 0; j2 < string4.length; j2 += limit) {
|
|
22071
|
+
var segment = string4.length >= limit ? string4.slice(j2, j2 + limit) : string4;
|
|
22072
22072
|
var arr = [];
|
|
22073
22073
|
for (var i = 0; i < segment.length; ++i) {
|
|
22074
22074
|
var c = segment.charCodeAt(i);
|
|
@@ -22103,8 +22103,8 @@ var require_utils = __commonJS({
|
|
|
22103
22103
|
var item = queue[i];
|
|
22104
22104
|
var obj = item.obj[item.prop];
|
|
22105
22105
|
var keys = Object.keys(obj);
|
|
22106
|
-
for (var
|
|
22107
|
-
var key = keys[
|
|
22106
|
+
for (var j2 = 0; j2 < keys.length; ++j2) {
|
|
22107
|
+
var key = keys[j2];
|
|
22108
22108
|
var val = obj[key];
|
|
22109
22109
|
if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) {
|
|
22110
22110
|
queue[queue.length] = { obj, prop: key };
|
|
@@ -22124,14 +22124,14 @@ var require_utils = __commonJS({
|
|
|
22124
22124
|
}
|
|
22125
22125
|
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
22126
22126
|
};
|
|
22127
|
-
var combine = function combine2(a,
|
|
22127
|
+
var combine = function combine2(a, b2, arrayLimit, plainObjects) {
|
|
22128
22128
|
if (isOverflow(a)) {
|
|
22129
22129
|
var newIndex = getMaxIndex(a) + 1;
|
|
22130
|
-
a[newIndex] =
|
|
22130
|
+
a[newIndex] = b2;
|
|
22131
22131
|
setMaxIndex(a, newIndex);
|
|
22132
22132
|
return a;
|
|
22133
22133
|
}
|
|
22134
|
-
var result = [].concat(a,
|
|
22134
|
+
var result = [].concat(a, b2);
|
|
22135
22135
|
if (result.length > arrayLimit) {
|
|
22136
22136
|
return markOverflow(arrayToObject(result, { plainObjects }), result.length - 1);
|
|
22137
22137
|
}
|
|
@@ -22215,8 +22215,8 @@ var require_stringify = __commonJS({
|
|
|
22215
22215
|
skipNulls: false,
|
|
22216
22216
|
strictNullHandling: false
|
|
22217
22217
|
};
|
|
22218
|
-
var isNonNullishPrimitive = function isNonNullishPrimitive2(
|
|
22219
|
-
return typeof
|
|
22218
|
+
var isNonNullishPrimitive = function isNonNullishPrimitive2(v2) {
|
|
22219
|
+
return typeof v2 === "string" || typeof v2 === "number" || typeof v2 === "boolean" || typeof v2 === "symbol" || typeof v2 === "bigint";
|
|
22220
22220
|
};
|
|
22221
22221
|
var sentinel = {};
|
|
22222
22222
|
var stringify = function stringify2(object2, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
|
|
@@ -22284,8 +22284,8 @@ var require_stringify = __commonJS({
|
|
|
22284
22284
|
if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
|
|
22285
22285
|
return adjustedPrefix + "[]";
|
|
22286
22286
|
}
|
|
22287
|
-
for (var
|
|
22288
|
-
var key = objKeys[
|
|
22287
|
+
for (var j2 = 0; j2 < objKeys.length; ++j2) {
|
|
22288
|
+
var key = objKeys[j2];
|
|
22289
22289
|
var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj[key];
|
|
22290
22290
|
if (skipNulls && value === null) {
|
|
22291
22291
|
continue;
|
|
@@ -23041,10 +23041,10 @@ var require_merge_descriptors = __commonJS({
|
|
|
23041
23041
|
var require_ms2 = __commonJS({
|
|
23042
23042
|
"../../node_modules/finalhandler/node_modules/ms/index.js"(exports2, module2) {
|
|
23043
23043
|
var s = 1e3;
|
|
23044
|
-
var
|
|
23045
|
-
var h =
|
|
23044
|
+
var m2 = s * 60;
|
|
23045
|
+
var h = m2 * 60;
|
|
23046
23046
|
var d = h * 24;
|
|
23047
|
-
var
|
|
23047
|
+
var y2 = d * 365.25;
|
|
23048
23048
|
module2.exports = function(val, options) {
|
|
23049
23049
|
options = options || {};
|
|
23050
23050
|
var type = typeof val;
|
|
@@ -23076,7 +23076,7 @@ var require_ms2 = __commonJS({
|
|
|
23076
23076
|
case "yrs":
|
|
23077
23077
|
case "yr":
|
|
23078
23078
|
case "y":
|
|
23079
|
-
return n *
|
|
23079
|
+
return n * y2;
|
|
23080
23080
|
case "days":
|
|
23081
23081
|
case "day":
|
|
23082
23082
|
case "d":
|
|
@@ -23092,7 +23092,7 @@ var require_ms2 = __commonJS({
|
|
|
23092
23092
|
case "mins":
|
|
23093
23093
|
case "min":
|
|
23094
23094
|
case "m":
|
|
23095
|
-
return n *
|
|
23095
|
+
return n * m2;
|
|
23096
23096
|
case "seconds":
|
|
23097
23097
|
case "second":
|
|
23098
23098
|
case "secs":
|
|
@@ -23116,8 +23116,8 @@ var require_ms2 = __commonJS({
|
|
|
23116
23116
|
if (ms >= h) {
|
|
23117
23117
|
return Math.round(ms / h) + "h";
|
|
23118
23118
|
}
|
|
23119
|
-
if (ms >=
|
|
23120
|
-
return Math.round(ms /
|
|
23119
|
+
if (ms >= m2) {
|
|
23120
|
+
return Math.round(ms / m2) + "m";
|
|
23121
23121
|
}
|
|
23122
23122
|
if (ms >= s) {
|
|
23123
23123
|
return Math.round(ms / s) + "s";
|
|
@@ -23125,7 +23125,7 @@ var require_ms2 = __commonJS({
|
|
|
23125
23125
|
return ms + "ms";
|
|
23126
23126
|
}
|
|
23127
23127
|
function fmtLong(ms) {
|
|
23128
|
-
return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms,
|
|
23128
|
+
return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m2, "minute") || plural(ms, s, "second") || ms + " ms";
|
|
23129
23129
|
}
|
|
23130
23130
|
function plural(ms, n, name) {
|
|
23131
23131
|
if (ms < n) {
|
|
@@ -23272,9 +23272,9 @@ var require_browser2 = __commonJS({
|
|
|
23272
23272
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // double check webkit in userAgent just in case we are in a worker
|
|
23273
23273
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
23274
23274
|
}
|
|
23275
|
-
exports2.formatters.j = function(
|
|
23275
|
+
exports2.formatters.j = function(v2) {
|
|
23276
23276
|
try {
|
|
23277
|
-
return JSON.stringify(
|
|
23277
|
+
return JSON.stringify(v2);
|
|
23278
23278
|
} catch (err) {
|
|
23279
23279
|
return "[UnexpectedJSONParseError]: " + err.message;
|
|
23280
23280
|
}
|
|
@@ -23346,8 +23346,8 @@ var require_node2 = __commonJS({
|
|
|
23346
23346
|
exports2.inspectOpts = Object.keys(process.env).filter(function(key) {
|
|
23347
23347
|
return /^debug_/i.test(key);
|
|
23348
23348
|
}).reduce(function(obj, key) {
|
|
23349
|
-
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(
|
|
23350
|
-
return
|
|
23349
|
+
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_2, k2) {
|
|
23350
|
+
return k2.toUpperCase();
|
|
23351
23351
|
});
|
|
23352
23352
|
var val = process.env[key];
|
|
23353
23353
|
if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
|
|
@@ -23366,15 +23366,15 @@ var require_node2 = __commonJS({
|
|
|
23366
23366
|
function useColors() {
|
|
23367
23367
|
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(fd);
|
|
23368
23368
|
}
|
|
23369
|
-
exports2.formatters.o = function(
|
|
23369
|
+
exports2.formatters.o = function(v2) {
|
|
23370
23370
|
this.inspectOpts.colors = this.useColors;
|
|
23371
|
-
return util.inspect(
|
|
23371
|
+
return util.inspect(v2, this.inspectOpts).split("\n").map(function(str) {
|
|
23372
23372
|
return str.trim();
|
|
23373
23373
|
}).join(" ");
|
|
23374
23374
|
};
|
|
23375
|
-
exports2.formatters.O = function(
|
|
23375
|
+
exports2.formatters.O = function(v2) {
|
|
23376
23376
|
this.inspectOpts.colors = this.useColors;
|
|
23377
|
-
return util.inspect(
|
|
23377
|
+
return util.inspect(v2, this.inspectOpts);
|
|
23378
23378
|
};
|
|
23379
23379
|
function formatArgs(args) {
|
|
23380
23380
|
var name = this.namespace;
|
|
@@ -23760,10 +23760,10 @@ var require_finalhandler = __commonJS({
|
|
|
23760
23760
|
var require_ms3 = __commonJS({
|
|
23761
23761
|
"../../node_modules/express/node_modules/ms/index.js"(exports2, module2) {
|
|
23762
23762
|
var s = 1e3;
|
|
23763
|
-
var
|
|
23764
|
-
var h =
|
|
23763
|
+
var m2 = s * 60;
|
|
23764
|
+
var h = m2 * 60;
|
|
23765
23765
|
var d = h * 24;
|
|
23766
|
-
var
|
|
23766
|
+
var y2 = d * 365.25;
|
|
23767
23767
|
module2.exports = function(val, options) {
|
|
23768
23768
|
options = options || {};
|
|
23769
23769
|
var type = typeof val;
|
|
@@ -23795,7 +23795,7 @@ var require_ms3 = __commonJS({
|
|
|
23795
23795
|
case "yrs":
|
|
23796
23796
|
case "yr":
|
|
23797
23797
|
case "y":
|
|
23798
|
-
return n *
|
|
23798
|
+
return n * y2;
|
|
23799
23799
|
case "days":
|
|
23800
23800
|
case "day":
|
|
23801
23801
|
case "d":
|
|
@@ -23811,7 +23811,7 @@ var require_ms3 = __commonJS({
|
|
|
23811
23811
|
case "mins":
|
|
23812
23812
|
case "min":
|
|
23813
23813
|
case "m":
|
|
23814
|
-
return n *
|
|
23814
|
+
return n * m2;
|
|
23815
23815
|
case "seconds":
|
|
23816
23816
|
case "second":
|
|
23817
23817
|
case "secs":
|
|
@@ -23835,8 +23835,8 @@ var require_ms3 = __commonJS({
|
|
|
23835
23835
|
if (ms >= h) {
|
|
23836
23836
|
return Math.round(ms / h) + "h";
|
|
23837
23837
|
}
|
|
23838
|
-
if (ms >=
|
|
23839
|
-
return Math.round(ms /
|
|
23838
|
+
if (ms >= m2) {
|
|
23839
|
+
return Math.round(ms / m2) + "m";
|
|
23840
23840
|
}
|
|
23841
23841
|
if (ms >= s) {
|
|
23842
23842
|
return Math.round(ms / s) + "s";
|
|
@@ -23844,7 +23844,7 @@ var require_ms3 = __commonJS({
|
|
|
23844
23844
|
return ms + "ms";
|
|
23845
23845
|
}
|
|
23846
23846
|
function fmtLong(ms) {
|
|
23847
|
-
return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms,
|
|
23847
|
+
return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m2, "minute") || plural(ms, s, "second") || ms + " ms";
|
|
23848
23848
|
}
|
|
23849
23849
|
function plural(ms, n, name) {
|
|
23850
23850
|
if (ms < n) {
|
|
@@ -23991,9 +23991,9 @@ var require_browser3 = __commonJS({
|
|
|
23991
23991
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // double check webkit in userAgent just in case we are in a worker
|
|
23992
23992
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
23993
23993
|
}
|
|
23994
|
-
exports2.formatters.j = function(
|
|
23994
|
+
exports2.formatters.j = function(v2) {
|
|
23995
23995
|
try {
|
|
23996
|
-
return JSON.stringify(
|
|
23996
|
+
return JSON.stringify(v2);
|
|
23997
23997
|
} catch (err) {
|
|
23998
23998
|
return "[UnexpectedJSONParseError]: " + err.message;
|
|
23999
23999
|
}
|
|
@@ -24065,8 +24065,8 @@ var require_node3 = __commonJS({
|
|
|
24065
24065
|
exports2.inspectOpts = Object.keys(process.env).filter(function(key) {
|
|
24066
24066
|
return /^debug_/i.test(key);
|
|
24067
24067
|
}).reduce(function(obj, key) {
|
|
24068
|
-
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(
|
|
24069
|
-
return
|
|
24068
|
+
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_2, k2) {
|
|
24069
|
+
return k2.toUpperCase();
|
|
24070
24070
|
});
|
|
24071
24071
|
var val = process.env[key];
|
|
24072
24072
|
if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
|
|
@@ -24085,15 +24085,15 @@ var require_node3 = __commonJS({
|
|
|
24085
24085
|
function useColors() {
|
|
24086
24086
|
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(fd);
|
|
24087
24087
|
}
|
|
24088
|
-
exports2.formatters.o = function(
|
|
24088
|
+
exports2.formatters.o = function(v2) {
|
|
24089
24089
|
this.inspectOpts.colors = this.useColors;
|
|
24090
|
-
return util.inspect(
|
|
24090
|
+
return util.inspect(v2, this.inspectOpts).split("\n").map(function(str) {
|
|
24091
24091
|
return str.trim();
|
|
24092
24092
|
}).join(" ");
|
|
24093
24093
|
};
|
|
24094
|
-
exports2.formatters.O = function(
|
|
24094
|
+
exports2.formatters.O = function(v2) {
|
|
24095
24095
|
this.inspectOpts.colors = this.useColors;
|
|
24096
|
-
return util.inspect(
|
|
24096
|
+
return util.inspect(v2, this.inspectOpts);
|
|
24097
24097
|
};
|
|
24098
24098
|
function formatArgs(args) {
|
|
24099
24099
|
var name = this.namespace;
|
|
@@ -24234,14 +24234,14 @@ var require_path_to_regexp = __commonJS({
|
|
|
24234
24234
|
var name = 0;
|
|
24235
24235
|
var pos = 0;
|
|
24236
24236
|
var backtrack = "";
|
|
24237
|
-
var
|
|
24237
|
+
var m2;
|
|
24238
24238
|
if (path12 instanceof RegExp) {
|
|
24239
|
-
while (
|
|
24240
|
-
if (
|
|
24239
|
+
while (m2 = MATCHING_GROUP_REGEXP.exec(path12.source)) {
|
|
24240
|
+
if (m2[0][0] === "\\") continue;
|
|
24241
24241
|
keys.push({
|
|
24242
|
-
name:
|
|
24242
|
+
name: m2[1] || name++,
|
|
24243
24243
|
optional: false,
|
|
24244
|
-
offset:
|
|
24244
|
+
offset: m2.index
|
|
24245
24245
|
});
|
|
24246
24246
|
}
|
|
24247
24247
|
return path12;
|
|
@@ -24288,8 +24288,8 @@ var require_path_to_regexp = __commonJS({
|
|
|
24288
24288
|
slash = slash || "";
|
|
24289
24289
|
format = format ? "\\." : "";
|
|
24290
24290
|
optional2 = optional2 || "";
|
|
24291
|
-
capture = capture ? capture.replace(/\\.|\*/, function(
|
|
24292
|
-
return
|
|
24291
|
+
capture = capture ? capture.replace(/\\.|\*/, function(m3) {
|
|
24292
|
+
return m3 === "*" ? "(.*)" : m3;
|
|
24293
24293
|
}) : backtrack ? "((?:(?!/|" + backtrack + ").)+?)" : "([^/" + format + "]+?)";
|
|
24294
24294
|
keys.push({
|
|
24295
24295
|
name: key,
|
|
@@ -24302,14 +24302,14 @@ var require_path_to_regexp = __commonJS({
|
|
|
24302
24302
|
return result;
|
|
24303
24303
|
}
|
|
24304
24304
|
);
|
|
24305
|
-
while (
|
|
24306
|
-
if (
|
|
24307
|
-
if (keysOffset + i === keys.length || keys[keysOffset + i].offset >
|
|
24305
|
+
while (m2 = MATCHING_GROUP_REGEXP.exec(path12)) {
|
|
24306
|
+
if (m2[0][0] === "\\") continue;
|
|
24307
|
+
if (keysOffset + i === keys.length || keys[keysOffset + i].offset > m2.index) {
|
|
24308
24308
|
keys.splice(keysOffset + i, 0, {
|
|
24309
24309
|
name: name++,
|
|
24310
24310
|
// Unnamed matching groups must be consistently linear.
|
|
24311
24311
|
optional: false,
|
|
24312
|
-
offset:
|
|
24312
|
+
offset: m2.index
|
|
24313
24313
|
});
|
|
24314
24314
|
}
|
|
24315
24315
|
i++;
|
|
@@ -24579,10 +24579,10 @@ var require_route = __commonJS({
|
|
|
24579
24579
|
// ../../node_modules/utils-merge/index.js
|
|
24580
24580
|
var require_utils_merge = __commonJS({
|
|
24581
24581
|
"../../node_modules/utils-merge/index.js"(exports2, module2) {
|
|
24582
|
-
exports2 = module2.exports = function(a,
|
|
24583
|
-
if (a &&
|
|
24584
|
-
for (var key in
|
|
24585
|
-
a[key] =
|
|
24582
|
+
exports2 = module2.exports = function(a, b2) {
|
|
24583
|
+
if (a && b2) {
|
|
24584
|
+
for (var key in b2) {
|
|
24585
|
+
a[key] = b2[key];
|
|
24586
24586
|
}
|
|
24587
24587
|
}
|
|
24588
24588
|
return a;
|
|
@@ -25326,10 +25326,10 @@ var require_content_disposition = __commonJS({
|
|
|
25326
25326
|
var require_ms4 = __commonJS({
|
|
25327
25327
|
"../../node_modules/send/node_modules/debug/node_modules/ms/index.js"(exports2, module2) {
|
|
25328
25328
|
var s = 1e3;
|
|
25329
|
-
var
|
|
25330
|
-
var h =
|
|
25329
|
+
var m2 = s * 60;
|
|
25330
|
+
var h = m2 * 60;
|
|
25331
25331
|
var d = h * 24;
|
|
25332
|
-
var
|
|
25332
|
+
var y2 = d * 365.25;
|
|
25333
25333
|
module2.exports = function(val, options) {
|
|
25334
25334
|
options = options || {};
|
|
25335
25335
|
var type = typeof val;
|
|
@@ -25361,7 +25361,7 @@ var require_ms4 = __commonJS({
|
|
|
25361
25361
|
case "yrs":
|
|
25362
25362
|
case "yr":
|
|
25363
25363
|
case "y":
|
|
25364
|
-
return n *
|
|
25364
|
+
return n * y2;
|
|
25365
25365
|
case "days":
|
|
25366
25366
|
case "day":
|
|
25367
25367
|
case "d":
|
|
@@ -25377,7 +25377,7 @@ var require_ms4 = __commonJS({
|
|
|
25377
25377
|
case "mins":
|
|
25378
25378
|
case "min":
|
|
25379
25379
|
case "m":
|
|
25380
|
-
return n *
|
|
25380
|
+
return n * m2;
|
|
25381
25381
|
case "seconds":
|
|
25382
25382
|
case "second":
|
|
25383
25383
|
case "secs":
|
|
@@ -25401,8 +25401,8 @@ var require_ms4 = __commonJS({
|
|
|
25401
25401
|
if (ms >= h) {
|
|
25402
25402
|
return Math.round(ms / h) + "h";
|
|
25403
25403
|
}
|
|
25404
|
-
if (ms >=
|
|
25405
|
-
return Math.round(ms /
|
|
25404
|
+
if (ms >= m2) {
|
|
25405
|
+
return Math.round(ms / m2) + "m";
|
|
25406
25406
|
}
|
|
25407
25407
|
if (ms >= s) {
|
|
25408
25408
|
return Math.round(ms / s) + "s";
|
|
@@ -25410,7 +25410,7 @@ var require_ms4 = __commonJS({
|
|
|
25410
25410
|
return ms + "ms";
|
|
25411
25411
|
}
|
|
25412
25412
|
function fmtLong(ms) {
|
|
25413
|
-
return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms,
|
|
25413
|
+
return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m2, "minute") || plural(ms, s, "second") || ms + " ms";
|
|
25414
25414
|
}
|
|
25415
25415
|
function plural(ms, n, name) {
|
|
25416
25416
|
if (ms < n) {
|
|
@@ -25557,9 +25557,9 @@ var require_browser4 = __commonJS({
|
|
|
25557
25557
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // double check webkit in userAgent just in case we are in a worker
|
|
25558
25558
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
25559
25559
|
}
|
|
25560
|
-
exports2.formatters.j = function(
|
|
25560
|
+
exports2.formatters.j = function(v2) {
|
|
25561
25561
|
try {
|
|
25562
|
-
return JSON.stringify(
|
|
25562
|
+
return JSON.stringify(v2);
|
|
25563
25563
|
} catch (err) {
|
|
25564
25564
|
return "[UnexpectedJSONParseError]: " + err.message;
|
|
25565
25565
|
}
|
|
@@ -25631,8 +25631,8 @@ var require_node4 = __commonJS({
|
|
|
25631
25631
|
exports2.inspectOpts = Object.keys(process.env).filter(function(key) {
|
|
25632
25632
|
return /^debug_/i.test(key);
|
|
25633
25633
|
}).reduce(function(obj, key) {
|
|
25634
|
-
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(
|
|
25635
|
-
return
|
|
25634
|
+
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_2, k2) {
|
|
25635
|
+
return k2.toUpperCase();
|
|
25636
25636
|
});
|
|
25637
25637
|
var val = process.env[key];
|
|
25638
25638
|
if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
|
|
@@ -25651,15 +25651,15 @@ var require_node4 = __commonJS({
|
|
|
25651
25651
|
function useColors() {
|
|
25652
25652
|
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(fd);
|
|
25653
25653
|
}
|
|
25654
|
-
exports2.formatters.o = function(
|
|
25654
|
+
exports2.formatters.o = function(v2) {
|
|
25655
25655
|
this.inspectOpts.colors = this.useColors;
|
|
25656
|
-
return util.inspect(
|
|
25656
|
+
return util.inspect(v2, this.inspectOpts).split("\n").map(function(str) {
|
|
25657
25657
|
return str.trim();
|
|
25658
25658
|
}).join(" ");
|
|
25659
25659
|
};
|
|
25660
|
-
exports2.formatters.O = function(
|
|
25660
|
+
exports2.formatters.O = function(v2) {
|
|
25661
25661
|
this.inspectOpts.colors = this.useColors;
|
|
25662
|
-
return util.inspect(
|
|
25662
|
+
return util.inspect(v2, this.inspectOpts);
|
|
25663
25663
|
};
|
|
25664
25664
|
function formatArgs(args) {
|
|
25665
25665
|
var name = this.namespace;
|
|
@@ -25926,11 +25926,11 @@ var require_mime = __commonJS({
|
|
|
25926
25926
|
var require_ms5 = __commonJS({
|
|
25927
25927
|
"../../node_modules/ms/index.js"(exports2, module2) {
|
|
25928
25928
|
var s = 1e3;
|
|
25929
|
-
var
|
|
25930
|
-
var h =
|
|
25929
|
+
var m2 = s * 60;
|
|
25930
|
+
var h = m2 * 60;
|
|
25931
25931
|
var d = h * 24;
|
|
25932
|
-
var
|
|
25933
|
-
var
|
|
25932
|
+
var w2 = d * 7;
|
|
25933
|
+
var y2 = d * 365.25;
|
|
25934
25934
|
module2.exports = function(val, options) {
|
|
25935
25935
|
options = options || {};
|
|
25936
25936
|
var type = typeof val;
|
|
@@ -25962,11 +25962,11 @@ var require_ms5 = __commonJS({
|
|
|
25962
25962
|
case "yrs":
|
|
25963
25963
|
case "yr":
|
|
25964
25964
|
case "y":
|
|
25965
|
-
return n *
|
|
25965
|
+
return n * y2;
|
|
25966
25966
|
case "weeks":
|
|
25967
25967
|
case "week":
|
|
25968
25968
|
case "w":
|
|
25969
|
-
return n *
|
|
25969
|
+
return n * w2;
|
|
25970
25970
|
case "days":
|
|
25971
25971
|
case "day":
|
|
25972
25972
|
case "d":
|
|
@@ -25982,7 +25982,7 @@ var require_ms5 = __commonJS({
|
|
|
25982
25982
|
case "mins":
|
|
25983
25983
|
case "min":
|
|
25984
25984
|
case "m":
|
|
25985
|
-
return n *
|
|
25985
|
+
return n * m2;
|
|
25986
25986
|
case "seconds":
|
|
25987
25987
|
case "second":
|
|
25988
25988
|
case "secs":
|
|
@@ -26007,8 +26007,8 @@ var require_ms5 = __commonJS({
|
|
|
26007
26007
|
if (msAbs >= h) {
|
|
26008
26008
|
return Math.round(ms / h) + "h";
|
|
26009
26009
|
}
|
|
26010
|
-
if (msAbs >=
|
|
26011
|
-
return Math.round(ms /
|
|
26010
|
+
if (msAbs >= m2) {
|
|
26011
|
+
return Math.round(ms / m2) + "m";
|
|
26012
26012
|
}
|
|
26013
26013
|
if (msAbs >= s) {
|
|
26014
26014
|
return Math.round(ms / s) + "s";
|
|
@@ -26023,8 +26023,8 @@ var require_ms5 = __commonJS({
|
|
|
26023
26023
|
if (msAbs >= h) {
|
|
26024
26024
|
return plural(ms, msAbs, h, "hour");
|
|
26025
26025
|
}
|
|
26026
|
-
if (msAbs >=
|
|
26027
|
-
return plural(ms, msAbs,
|
|
26026
|
+
if (msAbs >= m2) {
|
|
26027
|
+
return plural(ms, msAbs, m2, "minute");
|
|
26028
26028
|
}
|
|
26029
26029
|
if (msAbs >= s) {
|
|
26030
26030
|
return plural(ms, msAbs, s, "second");
|
|
@@ -26082,17 +26082,17 @@ var require_range_parser = __commonJS({
|
|
|
26082
26082
|
}
|
|
26083
26083
|
function combineRanges(ranges) {
|
|
26084
26084
|
var ordered = ranges.map(mapWithIndex).sort(sortByRangeStart);
|
|
26085
|
-
for (var
|
|
26085
|
+
for (var j2 = 0, i = 1; i < ordered.length; i++) {
|
|
26086
26086
|
var range = ordered[i];
|
|
26087
|
-
var current = ordered[
|
|
26087
|
+
var current = ordered[j2];
|
|
26088
26088
|
if (range.start > current.end + 1) {
|
|
26089
|
-
ordered[++
|
|
26089
|
+
ordered[++j2] = range;
|
|
26090
26090
|
} else if (range.end > current.end) {
|
|
26091
26091
|
current.end = range.end;
|
|
26092
26092
|
current.index = Math.min(current.index, range.index);
|
|
26093
26093
|
}
|
|
26094
26094
|
}
|
|
26095
|
-
ordered.length =
|
|
26095
|
+
ordered.length = j2 + 1;
|
|
26096
26096
|
var combined = ordered.sort(sortByRangeIndex).map(mapWithoutIndex);
|
|
26097
26097
|
combined.type = ranges.type;
|
|
26098
26098
|
return combined;
|
|
@@ -26110,11 +26110,11 @@ var require_range_parser = __commonJS({
|
|
|
26110
26110
|
end: range.end
|
|
26111
26111
|
};
|
|
26112
26112
|
}
|
|
26113
|
-
function sortByRangeIndex(a,
|
|
26114
|
-
return a.index -
|
|
26113
|
+
function sortByRangeIndex(a, b2) {
|
|
26114
|
+
return a.index - b2.index;
|
|
26115
26115
|
}
|
|
26116
|
-
function sortByRangeStart(a,
|
|
26117
|
-
return a.start -
|
|
26116
|
+
function sortByRangeStart(a, b2) {
|
|
26117
|
+
return a.start - b2.start;
|
|
26118
26118
|
}
|
|
26119
26119
|
}
|
|
26120
26120
|
});
|
|
@@ -26743,7 +26743,7 @@ var require_ipaddr = __commonJS({
|
|
|
26743
26743
|
return true;
|
|
26744
26744
|
};
|
|
26745
26745
|
ipaddr.subnetMatch = function(address, rangeList, defaultName) {
|
|
26746
|
-
var
|
|
26746
|
+
var k2, len, rangeName, rangeSubnets, subnet;
|
|
26747
26747
|
if (defaultName == null) {
|
|
26748
26748
|
defaultName = "unicast";
|
|
26749
26749
|
}
|
|
@@ -26752,8 +26752,8 @@ var require_ipaddr = __commonJS({
|
|
|
26752
26752
|
if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) {
|
|
26753
26753
|
rangeSubnets = [rangeSubnets];
|
|
26754
26754
|
}
|
|
26755
|
-
for (
|
|
26756
|
-
subnet = rangeSubnets[
|
|
26755
|
+
for (k2 = 0, len = rangeSubnets.length; k2 < len; k2++) {
|
|
26756
|
+
subnet = rangeSubnets[k2];
|
|
26757
26757
|
if (address.kind() === subnet[0].kind()) {
|
|
26758
26758
|
if (address.match.apply(address, subnet)) {
|
|
26759
26759
|
return rangeName;
|
|
@@ -26765,12 +26765,12 @@ var require_ipaddr = __commonJS({
|
|
|
26765
26765
|
};
|
|
26766
26766
|
ipaddr.IPv4 = function() {
|
|
26767
26767
|
function IPv4(octets) {
|
|
26768
|
-
var
|
|
26768
|
+
var k2, len, octet;
|
|
26769
26769
|
if (octets.length !== 4) {
|
|
26770
26770
|
throw new Error("ipaddr: ipv4 octet count should be 4");
|
|
26771
26771
|
}
|
|
26772
|
-
for (
|
|
26773
|
-
octet = octets[
|
|
26772
|
+
for (k2 = 0, len = octets.length; k2 < len; k2++) {
|
|
26773
|
+
octet = octets[k2];
|
|
26774
26774
|
if (!(0 <= octet && octet <= 255)) {
|
|
26775
26775
|
throw new Error("ipaddr: ipv4 octet should fit in 8 bits");
|
|
26776
26776
|
}
|
|
@@ -26816,7 +26816,7 @@ var require_ipaddr = __commonJS({
|
|
|
26816
26816
|
return ipaddr.IPv6.parse("::ffff:" + this.toString());
|
|
26817
26817
|
};
|
|
26818
26818
|
IPv4.prototype.prefixLengthFromSubnetMask = function() {
|
|
26819
|
-
var cidr, i,
|
|
26819
|
+
var cidr, i, k2, octet, stop, zeros, zerotable;
|
|
26820
26820
|
zerotable = {
|
|
26821
26821
|
0: 8,
|
|
26822
26822
|
128: 7,
|
|
@@ -26830,7 +26830,7 @@ var require_ipaddr = __commonJS({
|
|
|
26830
26830
|
};
|
|
26831
26831
|
cidr = 0;
|
|
26832
26832
|
stop = false;
|
|
26833
|
-
for (i =
|
|
26833
|
+
for (i = k2 = 3; k2 >= 0; i = k2 += -1) {
|
|
26834
26834
|
octet = this.octets[i];
|
|
26835
26835
|
if (octet in zerotable) {
|
|
26836
26836
|
zeros = zerotable[octet];
|
|
@@ -26865,11 +26865,11 @@ var require_ipaddr = __commonJS({
|
|
|
26865
26865
|
};
|
|
26866
26866
|
if (match = string4.match(ipv4Regexes.fourOctet)) {
|
|
26867
26867
|
return function() {
|
|
26868
|
-
var
|
|
26868
|
+
var k2, len, ref, results;
|
|
26869
26869
|
ref = match.slice(1, 6);
|
|
26870
26870
|
results = [];
|
|
26871
|
-
for (
|
|
26872
|
-
part = ref[
|
|
26871
|
+
for (k2 = 0, len = ref.length; k2 < len; k2++) {
|
|
26872
|
+
part = ref[k2];
|
|
26873
26873
|
results.push(parseIntAuto(part));
|
|
26874
26874
|
}
|
|
26875
26875
|
return results;
|
|
@@ -26880,9 +26880,9 @@ var require_ipaddr = __commonJS({
|
|
|
26880
26880
|
throw new Error("ipaddr: address outside defined range");
|
|
26881
26881
|
}
|
|
26882
26882
|
return function() {
|
|
26883
|
-
var
|
|
26883
|
+
var k2, results;
|
|
26884
26884
|
results = [];
|
|
26885
|
-
for (shift =
|
|
26885
|
+
for (shift = k2 = 0; k2 <= 24; shift = k2 += 8) {
|
|
26886
26886
|
results.push(value >> shift & 255);
|
|
26887
26887
|
}
|
|
26888
26888
|
return results;
|
|
@@ -26893,10 +26893,10 @@ var require_ipaddr = __commonJS({
|
|
|
26893
26893
|
};
|
|
26894
26894
|
ipaddr.IPv6 = function() {
|
|
26895
26895
|
function IPv6(parts, zoneId) {
|
|
26896
|
-
var i,
|
|
26896
|
+
var i, k2, l, len, part, ref;
|
|
26897
26897
|
if (parts.length === 16) {
|
|
26898
26898
|
this.parts = [];
|
|
26899
|
-
for (i =
|
|
26899
|
+
for (i = k2 = 0; k2 <= 14; i = k2 += 2) {
|
|
26900
26900
|
this.parts.push(parts[i] << 8 | parts[i + 1]);
|
|
26901
26901
|
}
|
|
26902
26902
|
} else if (parts.length === 8) {
|
|
@@ -26939,11 +26939,11 @@ var require_ipaddr = __commonJS({
|
|
|
26939
26939
|
return string4.substring(0, bestMatchIndex) + "::" + string4.substring(bestMatchIndex + bestMatchLength);
|
|
26940
26940
|
};
|
|
26941
26941
|
IPv6.prototype.toByteArray = function() {
|
|
26942
|
-
var bytes,
|
|
26942
|
+
var bytes, k2, len, part, ref;
|
|
26943
26943
|
bytes = [];
|
|
26944
26944
|
ref = this.parts;
|
|
26945
|
-
for (
|
|
26946
|
-
part = ref[
|
|
26945
|
+
for (k2 = 0, len = ref.length; k2 < len; k2++) {
|
|
26946
|
+
part = ref[k2];
|
|
26947
26947
|
bytes.push(part >> 8);
|
|
26948
26948
|
bytes.push(part & 255);
|
|
26949
26949
|
}
|
|
@@ -26952,11 +26952,11 @@ var require_ipaddr = __commonJS({
|
|
|
26952
26952
|
IPv6.prototype.toNormalizedString = function() {
|
|
26953
26953
|
var addr, part, suffix;
|
|
26954
26954
|
addr = function() {
|
|
26955
|
-
var
|
|
26955
|
+
var k2, len, ref, results;
|
|
26956
26956
|
ref = this.parts;
|
|
26957
26957
|
results = [];
|
|
26958
|
-
for (
|
|
26959
|
-
part = ref[
|
|
26958
|
+
for (k2 = 0, len = ref.length; k2 < len; k2++) {
|
|
26959
|
+
part = ref[k2];
|
|
26960
26960
|
results.push(part.toString(16));
|
|
26961
26961
|
}
|
|
26962
26962
|
return results;
|
|
@@ -26970,11 +26970,11 @@ var require_ipaddr = __commonJS({
|
|
|
26970
26970
|
IPv6.prototype.toFixedLengthString = function() {
|
|
26971
26971
|
var addr, part, suffix;
|
|
26972
26972
|
addr = function() {
|
|
26973
|
-
var
|
|
26973
|
+
var k2, len, ref, results;
|
|
26974
26974
|
ref = this.parts;
|
|
26975
26975
|
results = [];
|
|
26976
|
-
for (
|
|
26977
|
-
part = ref[
|
|
26976
|
+
for (k2 = 0, len = ref.length; k2 < len; k2++) {
|
|
26977
|
+
part = ref[k2];
|
|
26978
26978
|
results.push(part.toString(16).padStart(4, "0"));
|
|
26979
26979
|
}
|
|
26980
26980
|
return results;
|
|
@@ -27023,7 +27023,7 @@ var require_ipaddr = __commonJS({
|
|
|
27023
27023
|
return new ipaddr.IPv4([high >> 8, high & 255, low >> 8, low & 255]);
|
|
27024
27024
|
};
|
|
27025
27025
|
IPv6.prototype.prefixLengthFromSubnetMask = function() {
|
|
27026
|
-
var cidr, i,
|
|
27026
|
+
var cidr, i, k2, part, stop, zeros, zerotable;
|
|
27027
27027
|
zerotable = {
|
|
27028
27028
|
0: 16,
|
|
27029
27029
|
32768: 15,
|
|
@@ -27045,7 +27045,7 @@ var require_ipaddr = __commonJS({
|
|
|
27045
27045
|
};
|
|
27046
27046
|
cidr = 0;
|
|
27047
27047
|
stop = false;
|
|
27048
|
-
for (i =
|
|
27048
|
+
for (i = k2 = 7; k2 >= 0; i = k2 += -1) {
|
|
27049
27049
|
part = this.parts[i];
|
|
27050
27050
|
if (part in zerotable) {
|
|
27051
27051
|
zeros = zerotable[part];
|
|
@@ -27108,11 +27108,11 @@ var require_ipaddr = __commonJS({
|
|
|
27108
27108
|
string4 = string4.slice(0, -1);
|
|
27109
27109
|
}
|
|
27110
27110
|
parts = function() {
|
|
27111
|
-
var
|
|
27111
|
+
var k2, len, ref, results;
|
|
27112
27112
|
ref = string4.split(":");
|
|
27113
27113
|
results = [];
|
|
27114
|
-
for (
|
|
27115
|
-
part = ref[
|
|
27114
|
+
for (k2 = 0, len = ref.length; k2 < len; k2++) {
|
|
27115
|
+
part = ref[k2];
|
|
27116
27116
|
results.push(parseInt(part, 16));
|
|
27117
27117
|
}
|
|
27118
27118
|
return results;
|
|
@@ -27123,7 +27123,7 @@ var require_ipaddr = __commonJS({
|
|
|
27123
27123
|
};
|
|
27124
27124
|
};
|
|
27125
27125
|
ipaddr.IPv6.parser = function(string4) {
|
|
27126
|
-
var addr,
|
|
27126
|
+
var addr, k2, len, match, octet, octets, zoneId;
|
|
27127
27127
|
if (ipv6Regexes["native"].test(string4)) {
|
|
27128
27128
|
return expandIPv6(string4, 8);
|
|
27129
27129
|
} else if (match = string4.match(ipv6Regexes["transitional"])) {
|
|
@@ -27131,8 +27131,8 @@ var require_ipaddr = __commonJS({
|
|
|
27131
27131
|
addr = expandIPv6(match[1].slice(0, -1) + zoneId, 6);
|
|
27132
27132
|
if (addr.parts) {
|
|
27133
27133
|
octets = [parseInt(match[2]), parseInt(match[3]), parseInt(match[4]), parseInt(match[5])];
|
|
27134
|
-
for (
|
|
27135
|
-
octet = octets[
|
|
27134
|
+
for (k2 = 0, len = octets.length; k2 < len; k2++) {
|
|
27135
|
+
octet = octets[k2];
|
|
27136
27136
|
if (!(0 <= octet && octet <= 255)) {
|
|
27137
27137
|
return null;
|
|
27138
27138
|
}
|
|
@@ -27214,17 +27214,17 @@ var require_ipaddr = __commonJS({
|
|
|
27214
27214
|
throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range");
|
|
27215
27215
|
};
|
|
27216
27216
|
ipaddr.IPv4.subnetMaskFromPrefixLength = function(prefix) {
|
|
27217
|
-
var filledOctetCount,
|
|
27217
|
+
var filledOctetCount, j2, octets;
|
|
27218
27218
|
prefix = parseInt(prefix);
|
|
27219
27219
|
if (prefix < 0 || prefix > 32) {
|
|
27220
27220
|
throw new Error("ipaddr: invalid IPv4 prefix length");
|
|
27221
27221
|
}
|
|
27222
27222
|
octets = [0, 0, 0, 0];
|
|
27223
|
-
|
|
27223
|
+
j2 = 0;
|
|
27224
27224
|
filledOctetCount = Math.floor(prefix / 8);
|
|
27225
|
-
while (
|
|
27226
|
-
octets[
|
|
27227
|
-
|
|
27225
|
+
while (j2 < filledOctetCount) {
|
|
27226
|
+
octets[j2] = 255;
|
|
27227
|
+
j2++;
|
|
27228
27228
|
}
|
|
27229
27229
|
if (filledOctetCount < 4) {
|
|
27230
27230
|
octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - prefix % 8;
|
|
@@ -27598,8 +27598,8 @@ var require_utils2 = __commonJS({
|
|
|
27598
27598
|
};
|
|
27599
27599
|
}
|
|
27600
27600
|
if (typeof val === "string") {
|
|
27601
|
-
val = val.split(",").map(function(
|
|
27602
|
-
return
|
|
27601
|
+
val = val.split(",").map(function(v2) {
|
|
27602
|
+
return v2.trim();
|
|
27603
27603
|
});
|
|
27604
27604
|
}
|
|
27605
27605
|
return proxyaddr.compile(val || []);
|
|
@@ -27914,33 +27914,33 @@ var require_charset = __commonJS({
|
|
|
27914
27914
|
var simpleCharsetRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/;
|
|
27915
27915
|
function parseAcceptCharset(accept) {
|
|
27916
27916
|
var accepts = accept.split(",");
|
|
27917
|
-
for (var i = 0,
|
|
27917
|
+
for (var i = 0, j2 = 0; i < accepts.length; i++) {
|
|
27918
27918
|
var charset = parseCharset(accepts[i].trim(), i);
|
|
27919
27919
|
if (charset) {
|
|
27920
|
-
accepts[
|
|
27920
|
+
accepts[j2++] = charset;
|
|
27921
27921
|
}
|
|
27922
27922
|
}
|
|
27923
|
-
accepts.length =
|
|
27923
|
+
accepts.length = j2;
|
|
27924
27924
|
return accepts;
|
|
27925
27925
|
}
|
|
27926
27926
|
function parseCharset(str, i) {
|
|
27927
27927
|
var match = simpleCharsetRegExp.exec(str);
|
|
27928
27928
|
if (!match) return null;
|
|
27929
27929
|
var charset = match[1];
|
|
27930
|
-
var
|
|
27930
|
+
var q2 = 1;
|
|
27931
27931
|
if (match[2]) {
|
|
27932
27932
|
var params = match[2].split(";");
|
|
27933
|
-
for (var
|
|
27934
|
-
var p = params[
|
|
27933
|
+
for (var j2 = 0; j2 < params.length; j2++) {
|
|
27934
|
+
var p = params[j2].trim().split("=");
|
|
27935
27935
|
if (p[0] === "q") {
|
|
27936
|
-
|
|
27936
|
+
q2 = parseFloat(p[1]);
|
|
27937
27937
|
break;
|
|
27938
27938
|
}
|
|
27939
27939
|
}
|
|
27940
27940
|
}
|
|
27941
27941
|
return {
|
|
27942
27942
|
charset,
|
|
27943
|
-
q,
|
|
27943
|
+
q: q2,
|
|
27944
27944
|
i
|
|
27945
27945
|
};
|
|
27946
27946
|
}
|
|
@@ -27980,8 +27980,8 @@ var require_charset = __commonJS({
|
|
|
27980
27980
|
return provided[priorities.indexOf(priority)];
|
|
27981
27981
|
});
|
|
27982
27982
|
}
|
|
27983
|
-
function compareSpecs(a,
|
|
27984
|
-
return
|
|
27983
|
+
function compareSpecs(a, b2) {
|
|
27984
|
+
return b2.q - a.q || b2.s - a.s || a.o - b2.o || a.i - b2.i || 0;
|
|
27985
27985
|
}
|
|
27986
27986
|
function getFullCharset(spec) {
|
|
27987
27987
|
return spec.charset;
|
|
@@ -28003,42 +28003,42 @@ var require_encoding = __commonJS({
|
|
|
28003
28003
|
var accepts = accept.split(",");
|
|
28004
28004
|
var hasIdentity = false;
|
|
28005
28005
|
var minQuality = 1;
|
|
28006
|
-
for (var i = 0,
|
|
28006
|
+
for (var i = 0, j2 = 0; i < accepts.length; i++) {
|
|
28007
28007
|
var encoding = parseEncoding(accepts[i].trim(), i);
|
|
28008
28008
|
if (encoding) {
|
|
28009
|
-
accepts[
|
|
28009
|
+
accepts[j2++] = encoding;
|
|
28010
28010
|
hasIdentity = hasIdentity || specify("identity", encoding);
|
|
28011
28011
|
minQuality = Math.min(minQuality, encoding.q || 1);
|
|
28012
28012
|
}
|
|
28013
28013
|
}
|
|
28014
28014
|
if (!hasIdentity) {
|
|
28015
|
-
accepts[
|
|
28015
|
+
accepts[j2++] = {
|
|
28016
28016
|
encoding: "identity",
|
|
28017
28017
|
q: minQuality,
|
|
28018
28018
|
i
|
|
28019
28019
|
};
|
|
28020
28020
|
}
|
|
28021
|
-
accepts.length =
|
|
28021
|
+
accepts.length = j2;
|
|
28022
28022
|
return accepts;
|
|
28023
28023
|
}
|
|
28024
28024
|
function parseEncoding(str, i) {
|
|
28025
28025
|
var match = simpleEncodingRegExp.exec(str);
|
|
28026
28026
|
if (!match) return null;
|
|
28027
28027
|
var encoding = match[1];
|
|
28028
|
-
var
|
|
28028
|
+
var q2 = 1;
|
|
28029
28029
|
if (match[2]) {
|
|
28030
28030
|
var params = match[2].split(";");
|
|
28031
|
-
for (var
|
|
28032
|
-
var p = params[
|
|
28031
|
+
for (var j2 = 0; j2 < params.length; j2++) {
|
|
28032
|
+
var p = params[j2].trim().split("=");
|
|
28033
28033
|
if (p[0] === "q") {
|
|
28034
|
-
|
|
28034
|
+
q2 = parseFloat(p[1]);
|
|
28035
28035
|
break;
|
|
28036
28036
|
}
|
|
28037
28037
|
}
|
|
28038
28038
|
}
|
|
28039
28039
|
return {
|
|
28040
28040
|
encoding,
|
|
28041
|
-
q,
|
|
28041
|
+
q: q2,
|
|
28042
28042
|
i
|
|
28043
28043
|
};
|
|
28044
28044
|
}
|
|
@@ -28078,8 +28078,8 @@ var require_encoding = __commonJS({
|
|
|
28078
28078
|
return provided[priorities.indexOf(priority)];
|
|
28079
28079
|
});
|
|
28080
28080
|
}
|
|
28081
|
-
function compareSpecs(a,
|
|
28082
|
-
return
|
|
28081
|
+
function compareSpecs(a, b2) {
|
|
28082
|
+
return b2.q - a.q || b2.s - a.s || a.o - b2.o || a.i - b2.i || 0;
|
|
28083
28083
|
}
|
|
28084
28084
|
function getFullEncoding(spec) {
|
|
28085
28085
|
return spec.encoding;
|
|
@@ -28099,13 +28099,13 @@ var require_language = __commonJS({
|
|
|
28099
28099
|
var simpleLanguageRegExp = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;
|
|
28100
28100
|
function parseAcceptLanguage(accept) {
|
|
28101
28101
|
var accepts = accept.split(",");
|
|
28102
|
-
for (var i = 0,
|
|
28102
|
+
for (var i = 0, j2 = 0; i < accepts.length; i++) {
|
|
28103
28103
|
var language = parseLanguage(accepts[i].trim(), i);
|
|
28104
28104
|
if (language) {
|
|
28105
|
-
accepts[
|
|
28105
|
+
accepts[j2++] = language;
|
|
28106
28106
|
}
|
|
28107
28107
|
}
|
|
28108
|
-
accepts.length =
|
|
28108
|
+
accepts.length = j2;
|
|
28109
28109
|
return accepts;
|
|
28110
28110
|
}
|
|
28111
28111
|
function parseLanguage(str, i) {
|
|
@@ -28115,18 +28115,18 @@ var require_language = __commonJS({
|
|
|
28115
28115
|
var suffix = match[2];
|
|
28116
28116
|
var full = prefix;
|
|
28117
28117
|
if (suffix) full += "-" + suffix;
|
|
28118
|
-
var
|
|
28118
|
+
var q2 = 1;
|
|
28119
28119
|
if (match[3]) {
|
|
28120
28120
|
var params = match[3].split(";");
|
|
28121
|
-
for (var
|
|
28122
|
-
var p = params[
|
|
28123
|
-
if (p[0] === "q")
|
|
28121
|
+
for (var j2 = 0; j2 < params.length; j2++) {
|
|
28122
|
+
var p = params[j2].split("=");
|
|
28123
|
+
if (p[0] === "q") q2 = parseFloat(p[1]);
|
|
28124
28124
|
}
|
|
28125
28125
|
}
|
|
28126
28126
|
return {
|
|
28127
28127
|
prefix,
|
|
28128
28128
|
suffix,
|
|
28129
|
-
q,
|
|
28129
|
+
q: q2,
|
|
28130
28130
|
i,
|
|
28131
28131
|
full
|
|
28132
28132
|
};
|
|
@@ -28173,8 +28173,8 @@ var require_language = __commonJS({
|
|
|
28173
28173
|
return provided[priorities.indexOf(priority)];
|
|
28174
28174
|
});
|
|
28175
28175
|
}
|
|
28176
|
-
function compareSpecs(a,
|
|
28177
|
-
return
|
|
28176
|
+
function compareSpecs(a, b2) {
|
|
28177
|
+
return b2.q - a.q || b2.s - a.s || a.o - b2.o || a.i - b2.i || 0;
|
|
28178
28178
|
}
|
|
28179
28179
|
function getFullLanguage(spec) {
|
|
28180
28180
|
return spec.full;
|
|
@@ -28194,31 +28194,31 @@ var require_mediaType = __commonJS({
|
|
|
28194
28194
|
var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;
|
|
28195
28195
|
function parseAccept(accept) {
|
|
28196
28196
|
var accepts = splitMediaTypes(accept);
|
|
28197
|
-
for (var i = 0,
|
|
28197
|
+
for (var i = 0, j2 = 0; i < accepts.length; i++) {
|
|
28198
28198
|
var mediaType = parseMediaType(accepts[i].trim(), i);
|
|
28199
28199
|
if (mediaType) {
|
|
28200
|
-
accepts[
|
|
28200
|
+
accepts[j2++] = mediaType;
|
|
28201
28201
|
}
|
|
28202
28202
|
}
|
|
28203
|
-
accepts.length =
|
|
28203
|
+
accepts.length = j2;
|
|
28204
28204
|
return accepts;
|
|
28205
28205
|
}
|
|
28206
28206
|
function parseMediaType(str, i) {
|
|
28207
28207
|
var match = simpleMediaTypeRegExp.exec(str);
|
|
28208
28208
|
if (!match) return null;
|
|
28209
28209
|
var params = /* @__PURE__ */ Object.create(null);
|
|
28210
|
-
var
|
|
28210
|
+
var q2 = 1;
|
|
28211
28211
|
var subtype = match[2];
|
|
28212
28212
|
var type = match[1];
|
|
28213
28213
|
if (match[3]) {
|
|
28214
28214
|
var kvps = splitParameters(match[3]).map(splitKeyValuePair);
|
|
28215
|
-
for (var
|
|
28216
|
-
var pair = kvps[
|
|
28215
|
+
for (var j2 = 0; j2 < kvps.length; j2++) {
|
|
28216
|
+
var pair = kvps[j2];
|
|
28217
28217
|
var key = pair[0].toLowerCase();
|
|
28218
28218
|
var val = pair[1];
|
|
28219
28219
|
var value = val && val[0] === '"' && val[val.length - 1] === '"' ? val.substr(1, val.length - 2) : val;
|
|
28220
28220
|
if (key === "q") {
|
|
28221
|
-
|
|
28221
|
+
q2 = parseFloat(value);
|
|
28222
28222
|
break;
|
|
28223
28223
|
}
|
|
28224
28224
|
params[key] = value;
|
|
@@ -28228,7 +28228,7 @@ var require_mediaType = __commonJS({
|
|
|
28228
28228
|
type,
|
|
28229
28229
|
subtype,
|
|
28230
28230
|
params,
|
|
28231
|
-
q,
|
|
28231
|
+
q: q2,
|
|
28232
28232
|
i
|
|
28233
28233
|
};
|
|
28234
28234
|
}
|
|
@@ -28260,8 +28260,8 @@ var require_mediaType = __commonJS({
|
|
|
28260
28260
|
}
|
|
28261
28261
|
var keys = Object.keys(spec.params);
|
|
28262
28262
|
if (keys.length > 0) {
|
|
28263
|
-
if (keys.every(function(
|
|
28264
|
-
return spec.params[
|
|
28263
|
+
if (keys.every(function(k2) {
|
|
28264
|
+
return spec.params[k2] == "*" || (spec.params[k2] || "").toLowerCase() == (p.params[k2] || "").toLowerCase();
|
|
28265
28265
|
})) {
|
|
28266
28266
|
s |= 1;
|
|
28267
28267
|
} else {
|
|
@@ -28287,8 +28287,8 @@ var require_mediaType = __commonJS({
|
|
|
28287
28287
|
return provided[priorities.indexOf(priority)];
|
|
28288
28288
|
});
|
|
28289
28289
|
}
|
|
28290
|
-
function compareSpecs(a,
|
|
28291
|
-
return
|
|
28290
|
+
function compareSpecs(a, b2) {
|
|
28291
|
+
return b2.q - a.q || b2.s - a.s || a.o - b2.o || a.i - b2.i || 0;
|
|
28292
28292
|
}
|
|
28293
28293
|
function getFullType(spec) {
|
|
28294
28294
|
return spec.type + "/" + spec.subtype;
|
|
@@ -28319,26 +28319,26 @@ var require_mediaType = __commonJS({
|
|
|
28319
28319
|
}
|
|
28320
28320
|
function splitMediaTypes(accept) {
|
|
28321
28321
|
var accepts = accept.split(",");
|
|
28322
|
-
for (var i = 1,
|
|
28323
|
-
if (quoteCount(accepts[
|
|
28324
|
-
accepts[++
|
|
28322
|
+
for (var i = 1, j2 = 0; i < accepts.length; i++) {
|
|
28323
|
+
if (quoteCount(accepts[j2]) % 2 == 0) {
|
|
28324
|
+
accepts[++j2] = accepts[i];
|
|
28325
28325
|
} else {
|
|
28326
|
-
accepts[
|
|
28326
|
+
accepts[j2] += "," + accepts[i];
|
|
28327
28327
|
}
|
|
28328
28328
|
}
|
|
28329
|
-
accepts.length =
|
|
28329
|
+
accepts.length = j2 + 1;
|
|
28330
28330
|
return accepts;
|
|
28331
28331
|
}
|
|
28332
28332
|
function splitParameters(str) {
|
|
28333
28333
|
var parameters = str.split(";");
|
|
28334
|
-
for (var i = 1,
|
|
28335
|
-
if (quoteCount(parameters[
|
|
28336
|
-
parameters[++
|
|
28334
|
+
for (var i = 1, j2 = 0; i < parameters.length; i++) {
|
|
28335
|
+
if (quoteCount(parameters[j2]) % 2 == 0) {
|
|
28336
|
+
parameters[++j2] = parameters[i];
|
|
28337
28337
|
} else {
|
|
28338
|
-
parameters[
|
|
28338
|
+
parameters[j2] += ";" + parameters[i];
|
|
28339
28339
|
}
|
|
28340
28340
|
}
|
|
28341
|
-
parameters.length =
|
|
28341
|
+
parameters.length = j2 + 1;
|
|
28342
28342
|
for (var i = 0; i < parameters.length; i++) {
|
|
28343
28343
|
parameters[i] = parameters[i].trim();
|
|
28344
28344
|
}
|
|
@@ -28849,8 +28849,8 @@ var require_vary = __commonJS({
|
|
|
28849
28849
|
throw new TypeError("field argument is required");
|
|
28850
28850
|
}
|
|
28851
28851
|
var fields = !Array.isArray(field) ? parse3(String(field)) : field;
|
|
28852
|
-
for (var
|
|
28853
|
-
if (!FIELD_NAME_REGEXP.test(fields[
|
|
28852
|
+
for (var j2 = 0; j2 < fields.length; j2++) {
|
|
28853
|
+
if (!FIELD_NAME_REGEXP.test(fields[j2])) {
|
|
28854
28854
|
throw new TypeError("field argument contains an invalid header name");
|
|
28855
28855
|
}
|
|
28856
28856
|
}
|
|
@@ -29200,8 +29200,8 @@ var require_response = __commonJS({
|
|
|
29200
29200
|
res.format = function(obj) {
|
|
29201
29201
|
var req = this.req;
|
|
29202
29202
|
var next = req.next;
|
|
29203
|
-
var keys = Object.keys(obj).filter(function(
|
|
29204
|
-
return
|
|
29203
|
+
var keys = Object.keys(obj).filter(function(v2) {
|
|
29204
|
+
return v2 !== "default";
|
|
29205
29205
|
});
|
|
29206
29206
|
var key = keys.length > 0 ? req.accepts(keys) : false;
|
|
29207
29207
|
this.vary("Accept");
|
|
@@ -29322,8 +29322,8 @@ var require_response = __commonJS({
|
|
|
29322
29322
|
body = statuses.message[status] + ". Redirecting to " + address;
|
|
29323
29323
|
},
|
|
29324
29324
|
html: function() {
|
|
29325
|
-
var
|
|
29326
|
-
body = "<p>" + statuses.message[status] + ". Redirecting to " +
|
|
29325
|
+
var u3 = escapeHtml(address);
|
|
29326
|
+
body = "<p>" + statuses.message[status] + ". Redirecting to " + u3 + "</p>";
|
|
29327
29327
|
},
|
|
29328
29328
|
default: function() {
|
|
29329
29329
|
body = "";
|
|
@@ -29420,8 +29420,8 @@ var require_response = __commonJS({
|
|
|
29420
29420
|
var obj = options.headers;
|
|
29421
29421
|
var keys = Object.keys(obj);
|
|
29422
29422
|
for (var i = 0; i < keys.length; i++) {
|
|
29423
|
-
var
|
|
29424
|
-
res3.setHeader(
|
|
29423
|
+
var k2 = keys[i];
|
|
29424
|
+
res3.setHeader(k2, obj[k2]);
|
|
29425
29425
|
}
|
|
29426
29426
|
});
|
|
29427
29427
|
}
|
|
@@ -31372,7 +31372,7 @@ var require_sender = __commonJS({
|
|
|
31372
31372
|
const perMessageDeflate = this._extensions[PerMessageDeflate2.extensionName];
|
|
31373
31373
|
this._bufferedBytes += options[kByteLength];
|
|
31374
31374
|
this._state = DEFLATING;
|
|
31375
|
-
perMessageDeflate.compress(data, options.fin, (
|
|
31375
|
+
perMessageDeflate.compress(data, options.fin, (_2, buf) => {
|
|
31376
31376
|
if (this._socket.destroyed) {
|
|
31377
31377
|
const err = new Error(
|
|
31378
31378
|
"The socket was closed while data was being compressed"
|
|
@@ -31812,10 +31812,10 @@ var require_extension = __commonJS({
|
|
|
31812
31812
|
if (!Array.isArray(configurations)) configurations = [configurations];
|
|
31813
31813
|
return configurations.map((params) => {
|
|
31814
31814
|
return [extension2].concat(
|
|
31815
|
-
Object.keys(params).map((
|
|
31816
|
-
let values = params[
|
|
31815
|
+
Object.keys(params).map((k2) => {
|
|
31816
|
+
let values = params[k2];
|
|
31817
31817
|
if (!Array.isArray(values)) values = [values];
|
|
31818
|
-
return values.map((
|
|
31818
|
+
return values.map((v2) => v2 === true ? k2 : `${k2}=${v2}`).join("; ");
|
|
31819
31819
|
})
|
|
31820
31820
|
).join("; ");
|
|
31821
31821
|
}).join(", ");
|
|
@@ -33307,18 +33307,18 @@ function validateXmlString(s) {
|
|
|
33307
33307
|
throw new Error("string contains characters that are not allowed in XML 1.0");
|
|
33308
33308
|
}
|
|
33309
33309
|
}
|
|
33310
|
-
function validateEnvKey(
|
|
33311
|
-
if (!envKeyPattern.test(
|
|
33312
|
-
throw new Error(`invalid environment variable key: ${
|
|
33310
|
+
function validateEnvKey(k2) {
|
|
33311
|
+
if (!envKeyPattern.test(k2)) {
|
|
33312
|
+
throw new Error(`invalid environment variable key: ${k2}`);
|
|
33313
33313
|
}
|
|
33314
33314
|
}
|
|
33315
|
-
function formatSystemdEnvValue(
|
|
33316
|
-
if (
|
|
33315
|
+
function formatSystemdEnvValue(v2) {
|
|
33316
|
+
if (v2.includes("\0") || v2.includes("\n")) {
|
|
33317
33317
|
throw new Error("systemd environment values cannot contain NUL or newline characters");
|
|
33318
33318
|
}
|
|
33319
|
-
if (safeSystemdEnvValuePattern.test(
|
|
33320
|
-
return
|
|
33321
|
-
return `"${
|
|
33319
|
+
if (safeSystemdEnvValuePattern.test(v2))
|
|
33320
|
+
return v2;
|
|
33321
|
+
return `"${v2.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
|
|
33322
33322
|
}
|
|
33323
33323
|
function renderPlist(name, programArgs, env) {
|
|
33324
33324
|
validateXmlString(name);
|
|
@@ -33328,12 +33328,12 @@ function renderPlist(name, programArgs, env) {
|
|
|
33328
33328
|
}).join("\n");
|
|
33329
33329
|
let envBlock = "";
|
|
33330
33330
|
if (env && Object.keys(env).length > 0) {
|
|
33331
|
-
const envEntries = Object.entries(env).map(([
|
|
33332
|
-
validateXmlString(
|
|
33333
|
-
validateEnvKey(
|
|
33334
|
-
validateXmlString(
|
|
33335
|
-
return ` <key>${xmlEscape(
|
|
33336
|
-
<string>${xmlEscape(
|
|
33331
|
+
const envEntries = Object.entries(env).map(([k2, v2]) => {
|
|
33332
|
+
validateXmlString(k2);
|
|
33333
|
+
validateEnvKey(k2);
|
|
33334
|
+
validateXmlString(v2);
|
|
33335
|
+
return ` <key>${xmlEscape(k2)}</key>
|
|
33336
|
+
<string>${xmlEscape(v2)}</string>`;
|
|
33337
33337
|
}).join("\n");
|
|
33338
33338
|
envBlock = `
|
|
33339
33339
|
<key>EnvironmentVariables</key>
|
|
@@ -33368,9 +33368,9 @@ function quoteSystemdArg(arg) {
|
|
|
33368
33368
|
}
|
|
33369
33369
|
function renderUnit(description, programArgs, env) {
|
|
33370
33370
|
const execStart = programArgs.map(quoteSystemdArg).join(" ");
|
|
33371
|
-
const envLines = env ? Object.entries(env).map(([
|
|
33372
|
-
validateEnvKey(
|
|
33373
|
-
return `Environment=${
|
|
33371
|
+
const envLines = env ? Object.entries(env).map(([k2, v2]) => {
|
|
33372
|
+
validateEnvKey(k2);
|
|
33373
|
+
return `Environment=${k2}=${formatSystemdEnvValue(v2)}`;
|
|
33374
33374
|
}).join("\n") : "";
|
|
33375
33375
|
return `[Unit]
|
|
33376
33376
|
Description=${description}
|
|
@@ -33871,12 +33871,15 @@ function isACPBridgeClientMessage(value) {
|
|
|
33871
33871
|
// ../shared/src/client.ts
|
|
33872
33872
|
var HTTP_OK = 200;
|
|
33873
33873
|
var HTTP_MULTIPLE_CHOICES = 300;
|
|
33874
|
+
var HTTP_UNAUTHORIZED = 401;
|
|
33874
33875
|
var HttpRequester = class {
|
|
33875
33876
|
serverURL;
|
|
33876
33877
|
token;
|
|
33878
|
+
onUnauthorized;
|
|
33877
33879
|
constructor(serverURL, options) {
|
|
33878
33880
|
this.serverURL = serverURL.replace(/\/$/, "");
|
|
33879
33881
|
this.token = options.token;
|
|
33882
|
+
this.onUnauthorized = options.onUnauthorized;
|
|
33880
33883
|
}
|
|
33881
33884
|
async requestJSON(method, pathname, body) {
|
|
33882
33885
|
const response = await this.request(
|
|
@@ -33887,6 +33890,7 @@ var HttpRequester = class {
|
|
|
33887
33890
|
);
|
|
33888
33891
|
const payload = await parseJSON(response);
|
|
33889
33892
|
if (!response.ok || response.status < HTTP_OK || response.status >= HTTP_MULTIPLE_CHOICES) {
|
|
33893
|
+
if (response.status === HTTP_UNAUTHORIZED) this.onUnauthorized?.();
|
|
33890
33894
|
throw this.createError(
|
|
33891
33895
|
typeof payload.error === "string" ? payload.error : response.statusText,
|
|
33892
33896
|
response.status
|
|
@@ -33902,6 +33906,7 @@ var HttpRequester = class {
|
|
|
33902
33906
|
body !== void 0 ? { "content-type": "application/json" } : void 0
|
|
33903
33907
|
);
|
|
33904
33908
|
if (!response.ok) {
|
|
33909
|
+
if (response.status === HTTP_UNAUTHORIZED) this.onUnauthorized?.();
|
|
33905
33910
|
throw this.createError(
|
|
33906
33911
|
await extractErrorMessage(response, response.statusText),
|
|
33907
33912
|
response.status
|
|
@@ -33911,6 +33916,7 @@ var HttpRequester = class {
|
|
|
33911
33916
|
async requestText(method, pathname) {
|
|
33912
33917
|
const response = await this.request(method, pathname);
|
|
33913
33918
|
if (!response.ok) {
|
|
33919
|
+
if (response.status === HTTP_UNAUTHORIZED) this.onUnauthorized?.();
|
|
33914
33920
|
throw this.createError(
|
|
33915
33921
|
await extractErrorMessage(response, response.statusText),
|
|
33916
33922
|
response.status
|
|
@@ -33921,6 +33927,7 @@ var HttpRequester = class {
|
|
|
33921
33927
|
async requestRawVoid(method, pathname, body) {
|
|
33922
33928
|
const response = await this.request(method, pathname, body, { "content-type": "text/markdown; charset=utf-8" });
|
|
33923
33929
|
if (!response.ok) {
|
|
33930
|
+
if (response.status === HTTP_UNAUTHORIZED) this.onUnauthorized?.();
|
|
33924
33931
|
throw this.createError(
|
|
33925
33932
|
await extractErrorMessage(response, response.statusText),
|
|
33926
33933
|
response.status
|
|
@@ -34142,6 +34149,16 @@ var TelevisionClient = class {
|
|
|
34142
34149
|
}
|
|
34143
34150
|
};
|
|
34144
34151
|
|
|
34152
|
+
// ../shared/src/connect-url.ts
|
|
34153
|
+
var TOKEN_QUERY_PARAM = "token";
|
|
34154
|
+
function buildConnectURL(serverURL, token) {
|
|
34155
|
+
const url2 = new URL(serverURL);
|
|
34156
|
+
if (!token) return url2.origin;
|
|
34157
|
+
const clean = new URL(url2.origin);
|
|
34158
|
+
clean.searchParams.set(TOKEN_QUERY_PARAM, token);
|
|
34159
|
+
return clean.toString();
|
|
34160
|
+
}
|
|
34161
|
+
|
|
34145
34162
|
// ../server/src/server.ts
|
|
34146
34163
|
var import_express2 = __toESM(require_express2(), 1);
|
|
34147
34164
|
var import_node_http = __toESM(require("node:http"), 1);
|
|
@@ -34772,7 +34789,7 @@ function $constructor(name, initializer3, params) {
|
|
|
34772
34789
|
Object.defineProperty(inst, "_zod", {
|
|
34773
34790
|
value: {
|
|
34774
34791
|
def,
|
|
34775
|
-
constr:
|
|
34792
|
+
constr: _2,
|
|
34776
34793
|
traits: /* @__PURE__ */ new Set()
|
|
34777
34794
|
},
|
|
34778
34795
|
enumerable: false
|
|
@@ -34783,12 +34800,12 @@ function $constructor(name, initializer3, params) {
|
|
|
34783
34800
|
}
|
|
34784
34801
|
inst._zod.traits.add(name);
|
|
34785
34802
|
initializer3(inst, def);
|
|
34786
|
-
const proto =
|
|
34803
|
+
const proto = _2.prototype;
|
|
34787
34804
|
const keys = Object.keys(proto);
|
|
34788
34805
|
for (let i = 0; i < keys.length; i++) {
|
|
34789
|
-
const
|
|
34790
|
-
if (!(
|
|
34791
|
-
inst[
|
|
34806
|
+
const k2 = keys[i];
|
|
34807
|
+
if (!(k2 in inst)) {
|
|
34808
|
+
inst[k2] = proto[k2].bind(inst);
|
|
34792
34809
|
}
|
|
34793
34810
|
}
|
|
34794
34811
|
}
|
|
@@ -34796,7 +34813,7 @@ function $constructor(name, initializer3, params) {
|
|
|
34796
34813
|
class Definition extends Parent {
|
|
34797
34814
|
}
|
|
34798
34815
|
Object.defineProperty(Definition, "name", { value: name });
|
|
34799
|
-
function
|
|
34816
|
+
function _2(def) {
|
|
34800
34817
|
var _a2;
|
|
34801
34818
|
const inst = params?.Parent ? new Definition() : this;
|
|
34802
34819
|
init(inst, def);
|
|
@@ -34806,16 +34823,16 @@ function $constructor(name, initializer3, params) {
|
|
|
34806
34823
|
}
|
|
34807
34824
|
return inst;
|
|
34808
34825
|
}
|
|
34809
|
-
Object.defineProperty(
|
|
34810
|
-
Object.defineProperty(
|
|
34826
|
+
Object.defineProperty(_2, "init", { value: init });
|
|
34827
|
+
Object.defineProperty(_2, Symbol.hasInstance, {
|
|
34811
34828
|
value: (inst) => {
|
|
34812
34829
|
if (params?.Parent && inst instanceof params.Parent)
|
|
34813
34830
|
return true;
|
|
34814
34831
|
return inst?._zod?.traits?.has(name);
|
|
34815
34832
|
}
|
|
34816
34833
|
});
|
|
34817
|
-
Object.defineProperty(
|
|
34818
|
-
return
|
|
34834
|
+
Object.defineProperty(_2, "name", { value: name });
|
|
34835
|
+
return _2;
|
|
34819
34836
|
}
|
|
34820
34837
|
var $brand = Symbol("zod_brand");
|
|
34821
34838
|
var $ZodAsyncError = class extends Error {
|
|
@@ -34913,17 +34930,17 @@ function assertIs(_arg) {
|
|
|
34913
34930
|
function assertNever(_x) {
|
|
34914
34931
|
throw new Error("Unexpected value in exhaustive check");
|
|
34915
34932
|
}
|
|
34916
|
-
function assert(
|
|
34933
|
+
function assert(_2) {
|
|
34917
34934
|
}
|
|
34918
34935
|
function getEnumValues(entries) {
|
|
34919
|
-
const numericValues = Object.values(entries).filter((
|
|
34920
|
-
const values = Object.entries(entries).filter(([
|
|
34936
|
+
const numericValues = Object.values(entries).filter((v2) => typeof v2 === "number");
|
|
34937
|
+
const values = Object.entries(entries).filter(([k2, _2]) => numericValues.indexOf(+k2) === -1).map(([_2, v2]) => v2);
|
|
34921
34938
|
return values;
|
|
34922
34939
|
}
|
|
34923
34940
|
function joinValues(array2, separator = "|") {
|
|
34924
34941
|
return array2.map((val) => stringifyPrimitive(val)).join(separator);
|
|
34925
34942
|
}
|
|
34926
|
-
function jsonStringifyReplacer(
|
|
34943
|
+
function jsonStringifyReplacer(_2, value) {
|
|
34927
34944
|
if (typeof value === "bigint")
|
|
34928
34945
|
return value.toString();
|
|
34929
34946
|
return value;
|
|
@@ -34978,9 +34995,9 @@ function defineLazy(object2, key, getter) {
|
|
|
34978
34995
|
}
|
|
34979
34996
|
return value;
|
|
34980
34997
|
},
|
|
34981
|
-
set(
|
|
34998
|
+
set(v2) {
|
|
34982
34999
|
Object.defineProperty(object2, key, {
|
|
34983
|
-
value:
|
|
35000
|
+
value: v2
|
|
34984
35001
|
// configurable: true,
|
|
34985
35002
|
});
|
|
34986
35003
|
},
|
|
@@ -35049,10 +35066,10 @@ var allowsEval = cached(() => {
|
|
|
35049
35066
|
return false;
|
|
35050
35067
|
}
|
|
35051
35068
|
try {
|
|
35052
|
-
const
|
|
35053
|
-
new
|
|
35069
|
+
const F2 = Function;
|
|
35070
|
+
new F2("");
|
|
35054
35071
|
return true;
|
|
35055
|
-
} catch (
|
|
35072
|
+
} catch (_2) {
|
|
35056
35073
|
return false;
|
|
35057
35074
|
}
|
|
35058
35075
|
});
|
|
@@ -35162,31 +35179,31 @@ function normalizeParams(_params) {
|
|
|
35162
35179
|
function createTransparentProxy(getter) {
|
|
35163
35180
|
let target;
|
|
35164
35181
|
return new Proxy({}, {
|
|
35165
|
-
get(
|
|
35182
|
+
get(_2, prop, receiver) {
|
|
35166
35183
|
target ?? (target = getter());
|
|
35167
35184
|
return Reflect.get(target, prop, receiver);
|
|
35168
35185
|
},
|
|
35169
|
-
set(
|
|
35186
|
+
set(_2, prop, value, receiver) {
|
|
35170
35187
|
target ?? (target = getter());
|
|
35171
35188
|
return Reflect.set(target, prop, value, receiver);
|
|
35172
35189
|
},
|
|
35173
|
-
has(
|
|
35190
|
+
has(_2, prop) {
|
|
35174
35191
|
target ?? (target = getter());
|
|
35175
35192
|
return Reflect.has(target, prop);
|
|
35176
35193
|
},
|
|
35177
|
-
deleteProperty(
|
|
35194
|
+
deleteProperty(_2, prop) {
|
|
35178
35195
|
target ?? (target = getter());
|
|
35179
35196
|
return Reflect.deleteProperty(target, prop);
|
|
35180
35197
|
},
|
|
35181
|
-
ownKeys(
|
|
35198
|
+
ownKeys(_2) {
|
|
35182
35199
|
target ?? (target = getter());
|
|
35183
35200
|
return Reflect.ownKeys(target);
|
|
35184
35201
|
},
|
|
35185
|
-
getOwnPropertyDescriptor(
|
|
35202
|
+
getOwnPropertyDescriptor(_2, prop) {
|
|
35186
35203
|
target ?? (target = getter());
|
|
35187
35204
|
return Reflect.getOwnPropertyDescriptor(target, prop);
|
|
35188
35205
|
},
|
|
35189
|
-
defineProperty(
|
|
35206
|
+
defineProperty(_2, prop, descriptor) {
|
|
35190
35207
|
target ?? (target = getter());
|
|
35191
35208
|
return Reflect.defineProperty(target, prop, descriptor);
|
|
35192
35209
|
}
|
|
@@ -35200,8 +35217,8 @@ function stringifyPrimitive(value) {
|
|
|
35200
35217
|
return `${value}`;
|
|
35201
35218
|
}
|
|
35202
35219
|
function optionalKeys(shape) {
|
|
35203
|
-
return Object.keys(shape).filter((
|
|
35204
|
-
return shape[
|
|
35220
|
+
return Object.keys(shape).filter((k2) => {
|
|
35221
|
+
return shape[k2]._zod.optin === "optional" && shape[k2]._zod.optout === "optional";
|
|
35205
35222
|
});
|
|
35206
35223
|
}
|
|
35207
35224
|
var NUMBER_FORMAT_RANGES = {
|
|
@@ -35301,15 +35318,15 @@ function safeExtend(schema, shape) {
|
|
|
35301
35318
|
});
|
|
35302
35319
|
return clone(schema, def);
|
|
35303
35320
|
}
|
|
35304
|
-
function merge(a,
|
|
35321
|
+
function merge(a, b2) {
|
|
35305
35322
|
const def = mergeDefs(a._zod.def, {
|
|
35306
35323
|
get shape() {
|
|
35307
|
-
const _shape = { ...a._zod.def.shape, ...
|
|
35324
|
+
const _shape = { ...a._zod.def.shape, ...b2._zod.def.shape };
|
|
35308
35325
|
assignProp(this, "shape", _shape);
|
|
35309
35326
|
return _shape;
|
|
35310
35327
|
},
|
|
35311
35328
|
get catchall() {
|
|
35312
|
-
return
|
|
35329
|
+
return b2._zod.def.catchall;
|
|
35313
35330
|
},
|
|
35314
35331
|
checks: []
|
|
35315
35332
|
// delete existing checks
|
|
@@ -35385,11 +35402,11 @@ function required(Class2, schema, mask) {
|
|
|
35385
35402
|
});
|
|
35386
35403
|
return clone(schema, def);
|
|
35387
35404
|
}
|
|
35388
|
-
function aborted(
|
|
35389
|
-
if (
|
|
35405
|
+
function aborted(x2, startIndex = 0) {
|
|
35406
|
+
if (x2.aborted === true)
|
|
35390
35407
|
return true;
|
|
35391
|
-
for (let i = startIndex; i <
|
|
35392
|
-
if (
|
|
35408
|
+
for (let i = startIndex; i < x2.issues.length; i++) {
|
|
35409
|
+
if (x2.issues[i]?.continue !== true) {
|
|
35393
35410
|
return true;
|
|
35394
35411
|
}
|
|
35395
35412
|
}
|
|
@@ -35469,8 +35486,8 @@ function issue(...args) {
|
|
|
35469
35486
|
return { ...iss };
|
|
35470
35487
|
}
|
|
35471
35488
|
function cleanEnum(obj) {
|
|
35472
|
-
return Object.entries(obj).filter(([
|
|
35473
|
-
return Number.isNaN(Number.parseInt(
|
|
35489
|
+
return Object.entries(obj).filter(([k2, _2]) => {
|
|
35490
|
+
return Number.isNaN(Number.parseInt(k2, 10));
|
|
35474
35491
|
}).map((el) => el[1]);
|
|
35475
35492
|
}
|
|
35476
35493
|
function base64ToUint8Array(base643) {
|
|
@@ -35508,7 +35525,7 @@ function hexToUint8Array(hex3) {
|
|
|
35508
35525
|
return bytes;
|
|
35509
35526
|
}
|
|
35510
35527
|
function uint8ArrayToHex(bytes) {
|
|
35511
|
-
return Array.from(bytes).map((
|
|
35528
|
+
return Array.from(bytes).map((b2) => b2.toString(16).padStart(2, "0")).join("");
|
|
35512
35529
|
}
|
|
35513
35530
|
var Class = class {
|
|
35514
35531
|
constructor(..._args) {
|
|
@@ -35642,7 +35659,7 @@ function toDotPath(_path) {
|
|
|
35642
35659
|
}
|
|
35643
35660
|
function prettifyError(error48) {
|
|
35644
35661
|
const lines = [];
|
|
35645
|
-
const issues = [...error48.issues].sort((a,
|
|
35662
|
+
const issues = [...error48.issues].sort((a, b2) => (a.path ?? []).length - (b2.path ?? []).length);
|
|
35646
35663
|
for (const issue2 of issues) {
|
|
35647
35664
|
lines.push(`\u2716 ${issue2.message}`);
|
|
35648
35665
|
if (issue2.path?.length)
|
|
@@ -36464,19 +36481,19 @@ var Doc = class {
|
|
|
36464
36481
|
return;
|
|
36465
36482
|
}
|
|
36466
36483
|
const content = arg;
|
|
36467
|
-
const lines = content.split("\n").filter((
|
|
36468
|
-
const minIndent = Math.min(...lines.map((
|
|
36469
|
-
const dedented = lines.map((
|
|
36484
|
+
const lines = content.split("\n").filter((x2) => x2);
|
|
36485
|
+
const minIndent = Math.min(...lines.map((x2) => x2.length - x2.trimStart().length));
|
|
36486
|
+
const dedented = lines.map((x2) => x2.slice(minIndent)).map((x2) => " ".repeat(this.indent * 2) + x2);
|
|
36470
36487
|
for (const line of dedented) {
|
|
36471
36488
|
this.content.push(line);
|
|
36472
36489
|
}
|
|
36473
36490
|
}
|
|
36474
36491
|
compile() {
|
|
36475
|
-
const
|
|
36492
|
+
const F2 = Function;
|
|
36476
36493
|
const args = this?.args;
|
|
36477
36494
|
const content = this?.content ?? [``];
|
|
36478
|
-
const lines = [...content.map((
|
|
36479
|
-
return new
|
|
36495
|
+
const lines = [...content.map((x2) => ` ${x2}`)];
|
|
36496
|
+
return new F2(...args, lines.join("\n"));
|
|
36480
36497
|
}
|
|
36481
36498
|
};
|
|
36482
36499
|
|
|
@@ -36521,13 +36538,13 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
36521
36538
|
continue;
|
|
36522
36539
|
}
|
|
36523
36540
|
const currLen = payload.issues.length;
|
|
36524
|
-
const
|
|
36525
|
-
if (
|
|
36541
|
+
const _2 = ch._zod.check(payload);
|
|
36542
|
+
if (_2 instanceof Promise && ctx?.async === false) {
|
|
36526
36543
|
throw new $ZodAsyncError();
|
|
36527
36544
|
}
|
|
36528
|
-
if (asyncResult ||
|
|
36545
|
+
if (asyncResult || _2 instanceof Promise) {
|
|
36529
36546
|
asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
|
|
36530
|
-
await
|
|
36547
|
+
await _2;
|
|
36531
36548
|
const nextLen = payload.issues.length;
|
|
36532
36549
|
if (nextLen === currLen)
|
|
36533
36550
|
return;
|
|
@@ -36589,7 +36606,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
36589
36606
|
try {
|
|
36590
36607
|
const r = safeParse(inst, value);
|
|
36591
36608
|
return r.success ? { value: r.data } : { issues: r.error?.issues };
|
|
36592
|
-
} catch (
|
|
36609
|
+
} catch (_2) {
|
|
36593
36610
|
return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
|
|
36594
36611
|
}
|
|
36595
36612
|
},
|
|
@@ -36600,11 +36617,11 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
36600
36617
|
var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
36601
36618
|
$ZodType.init(inst, def);
|
|
36602
36619
|
inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag);
|
|
36603
|
-
inst._zod.parse = (payload,
|
|
36620
|
+
inst._zod.parse = (payload, _2) => {
|
|
36604
36621
|
if (def.coerce)
|
|
36605
36622
|
try {
|
|
36606
36623
|
payload.value = String(payload.value);
|
|
36607
|
-
} catch (
|
|
36624
|
+
} catch (_3) {
|
|
36608
36625
|
}
|
|
36609
36626
|
if (typeof payload.value === "string")
|
|
36610
36627
|
return payload;
|
|
@@ -36637,10 +36654,10 @@ var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
|
|
|
36637
36654
|
v7: 7,
|
|
36638
36655
|
v8: 8
|
|
36639
36656
|
};
|
|
36640
|
-
const
|
|
36641
|
-
if (
|
|
36657
|
+
const v2 = versionMap[def.version];
|
|
36658
|
+
if (v2 === void 0)
|
|
36642
36659
|
throw new Error(`Invalid UUID version: "${def.version}"`);
|
|
36643
|
-
def.pattern ?? (def.pattern = uuid(
|
|
36660
|
+
def.pattern ?? (def.pattern = uuid(v2));
|
|
36644
36661
|
} else
|
|
36645
36662
|
def.pattern ?? (def.pattern = uuid());
|
|
36646
36663
|
$ZodStringFormat.init(inst, def);
|
|
@@ -36689,7 +36706,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
36689
36706
|
payload.value = trimmed;
|
|
36690
36707
|
}
|
|
36691
36708
|
return;
|
|
36692
|
-
} catch (
|
|
36709
|
+
} catch (_2) {
|
|
36693
36710
|
payload.issues.push({
|
|
36694
36711
|
code: "invalid_format",
|
|
36695
36712
|
format: "url",
|
|
@@ -36914,7 +36931,7 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
|
36914
36931
|
if (def.coerce)
|
|
36915
36932
|
try {
|
|
36916
36933
|
payload.value = Number(payload.value);
|
|
36917
|
-
} catch (
|
|
36934
|
+
} catch (_2) {
|
|
36918
36935
|
}
|
|
36919
36936
|
const input = payload.value;
|
|
36920
36937
|
if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
|
|
@@ -36942,7 +36959,7 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
|
36942
36959
|
if (def.coerce)
|
|
36943
36960
|
try {
|
|
36944
36961
|
payload.value = Boolean(payload.value);
|
|
36945
|
-
} catch (
|
|
36962
|
+
} catch (_2) {
|
|
36946
36963
|
}
|
|
36947
36964
|
const input = payload.value;
|
|
36948
36965
|
if (typeof input === "boolean")
|
|
@@ -36963,7 +36980,7 @@ var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
|
|
|
36963
36980
|
if (def.coerce)
|
|
36964
36981
|
try {
|
|
36965
36982
|
payload.value = BigInt(payload.value);
|
|
36966
|
-
} catch (
|
|
36983
|
+
} catch (_2) {
|
|
36967
36984
|
}
|
|
36968
36985
|
if (typeof payload.value === "bigint")
|
|
36969
36986
|
return payload;
|
|
@@ -37146,9 +37163,9 @@ function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
|
37146
37163
|
}
|
|
37147
37164
|
function normalizeDef(def) {
|
|
37148
37165
|
const keys = Object.keys(def.shape);
|
|
37149
|
-
for (const
|
|
37150
|
-
if (!def.shape?.[
|
|
37151
|
-
throw new Error(`Invalid element at key "${
|
|
37166
|
+
for (const k2 of keys) {
|
|
37167
|
+
if (!def.shape?.[k2]?._zod?.traits?.has("$ZodType")) {
|
|
37168
|
+
throw new Error(`Invalid element at key "${k2}": expected a Zod schema`);
|
|
37152
37169
|
}
|
|
37153
37170
|
}
|
|
37154
37171
|
const okeys = optionalKeys(def.shape);
|
|
@@ -37217,8 +37234,8 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
37217
37234
|
const field = shape[key]._zod;
|
|
37218
37235
|
if (field.values) {
|
|
37219
37236
|
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
37220
|
-
for (const
|
|
37221
|
-
propValues[key].add(
|
|
37237
|
+
for (const v2 of field.values)
|
|
37238
|
+
propValues[key].add(v2);
|
|
37222
37239
|
}
|
|
37223
37240
|
}
|
|
37224
37241
|
return propValues;
|
|
@@ -37265,8 +37282,8 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
37265
37282
|
const doc = new Doc(["shape", "payload", "ctx"]);
|
|
37266
37283
|
const normalized = _normalized.value;
|
|
37267
37284
|
const parseStr = (key) => {
|
|
37268
|
-
const
|
|
37269
|
-
return `shape[${
|
|
37285
|
+
const k2 = esc(key);
|
|
37286
|
+
return `shape[${k2}]._zod.run({ value: input[${k2}], issues: [] }, ctx)`;
|
|
37270
37287
|
};
|
|
37271
37288
|
doc.write(`const input = payload.value;`);
|
|
37272
37289
|
const ids = /* @__PURE__ */ Object.create(null);
|
|
@@ -37277,27 +37294,27 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
37277
37294
|
doc.write(`const newResult = {};`);
|
|
37278
37295
|
for (const key of normalized.keys) {
|
|
37279
37296
|
const id = ids[key];
|
|
37280
|
-
const
|
|
37297
|
+
const k2 = esc(key);
|
|
37281
37298
|
const schema = shape[key];
|
|
37282
37299
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
37283
37300
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
37284
37301
|
if (isOptionalOut) {
|
|
37285
37302
|
doc.write(`
|
|
37286
37303
|
if (${id}.issues.length) {
|
|
37287
|
-
if (${
|
|
37304
|
+
if (${k2} in input) {
|
|
37288
37305
|
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
37289
37306
|
...iss,
|
|
37290
|
-
path: iss.path ? [${
|
|
37307
|
+
path: iss.path ? [${k2}, ...iss.path] : [${k2}]
|
|
37291
37308
|
})));
|
|
37292
37309
|
}
|
|
37293
37310
|
}
|
|
37294
37311
|
|
|
37295
37312
|
if (${id}.value === undefined) {
|
|
37296
|
-
if (${
|
|
37297
|
-
newResult[${
|
|
37313
|
+
if (${k2} in input) {
|
|
37314
|
+
newResult[${k2}] = undefined;
|
|
37298
37315
|
}
|
|
37299
37316
|
} else {
|
|
37300
|
-
newResult[${
|
|
37317
|
+
newResult[${k2}] = ${id}.value;
|
|
37301
37318
|
}
|
|
37302
37319
|
|
|
37303
37320
|
`);
|
|
@@ -37306,16 +37323,16 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
37306
37323
|
if (${id}.issues.length) {
|
|
37307
37324
|
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
37308
37325
|
...iss,
|
|
37309
|
-
path: iss.path ? [${
|
|
37326
|
+
path: iss.path ? [${k2}, ...iss.path] : [${k2}]
|
|
37310
37327
|
})));
|
|
37311
37328
|
}
|
|
37312
37329
|
|
|
37313
37330
|
if (${id}.value === undefined) {
|
|
37314
|
-
if (${
|
|
37315
|
-
newResult[${
|
|
37331
|
+
if (${k2} in input) {
|
|
37332
|
+
newResult[${k2}] = undefined;
|
|
37316
37333
|
}
|
|
37317
37334
|
} else {
|
|
37318
|
-
newResult[${
|
|
37335
|
+
newResult[${k2}] = ${id}.value;
|
|
37319
37336
|
}
|
|
37320
37337
|
|
|
37321
37338
|
`);
|
|
@@ -37486,11 +37503,11 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
37486
37503
|
const pv = option._zod.propValues;
|
|
37487
37504
|
if (!pv || Object.keys(pv).length === 0)
|
|
37488
37505
|
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
|
|
37489
|
-
for (const [
|
|
37490
|
-
if (!propValues[
|
|
37491
|
-
propValues[
|
|
37492
|
-
for (const val of
|
|
37493
|
-
propValues[
|
|
37506
|
+
for (const [k2, v2] of Object.entries(pv)) {
|
|
37507
|
+
if (!propValues[k2])
|
|
37508
|
+
propValues[k2] = /* @__PURE__ */ new Set();
|
|
37509
|
+
for (const val of v2) {
|
|
37510
|
+
propValues[k2].add(val);
|
|
37494
37511
|
}
|
|
37495
37512
|
}
|
|
37496
37513
|
}
|
|
@@ -37503,11 +37520,11 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
37503
37520
|
const values = o._zod.propValues?.[def.discriminator];
|
|
37504
37521
|
if (!values || values.size === 0)
|
|
37505
37522
|
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
|
|
37506
|
-
for (const
|
|
37507
|
-
if (map2.has(
|
|
37508
|
-
throw new Error(`Duplicate discriminator value "${String(
|
|
37523
|
+
for (const v2 of values) {
|
|
37524
|
+
if (map2.has(v2)) {
|
|
37525
|
+
throw new Error(`Duplicate discriminator value "${String(v2)}"`);
|
|
37509
37526
|
}
|
|
37510
|
-
map2.set(
|
|
37527
|
+
map2.set(v2, o);
|
|
37511
37528
|
}
|
|
37512
37529
|
}
|
|
37513
37530
|
return map2;
|
|
@@ -37557,19 +37574,19 @@ var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, d
|
|
|
37557
37574
|
return handleIntersectionResults(payload, left, right);
|
|
37558
37575
|
};
|
|
37559
37576
|
});
|
|
37560
|
-
function mergeValues(a,
|
|
37561
|
-
if (a ===
|
|
37577
|
+
function mergeValues(a, b2) {
|
|
37578
|
+
if (a === b2) {
|
|
37562
37579
|
return { valid: true, data: a };
|
|
37563
37580
|
}
|
|
37564
|
-
if (a instanceof Date &&
|
|
37581
|
+
if (a instanceof Date && b2 instanceof Date && +a === +b2) {
|
|
37565
37582
|
return { valid: true, data: a };
|
|
37566
37583
|
}
|
|
37567
|
-
if (isPlainObject(a) && isPlainObject(
|
|
37568
|
-
const bKeys = Object.keys(
|
|
37584
|
+
if (isPlainObject(a) && isPlainObject(b2)) {
|
|
37585
|
+
const bKeys = Object.keys(b2);
|
|
37569
37586
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
37570
|
-
const newObj = { ...a, ...
|
|
37587
|
+
const newObj = { ...a, ...b2 };
|
|
37571
37588
|
for (const key of sharedKeys) {
|
|
37572
|
-
const sharedValue = mergeValues(a[key],
|
|
37589
|
+
const sharedValue = mergeValues(a[key], b2[key]);
|
|
37573
37590
|
if (!sharedValue.valid) {
|
|
37574
37591
|
return {
|
|
37575
37592
|
valid: false,
|
|
@@ -37580,14 +37597,14 @@ function mergeValues(a, b) {
|
|
|
37580
37597
|
}
|
|
37581
37598
|
return { valid: true, data: newObj };
|
|
37582
37599
|
}
|
|
37583
|
-
if (Array.isArray(a) && Array.isArray(
|
|
37584
|
-
if (a.length !==
|
|
37600
|
+
if (Array.isArray(a) && Array.isArray(b2)) {
|
|
37601
|
+
if (a.length !== b2.length) {
|
|
37585
37602
|
return { valid: false, mergeErrorPath: [] };
|
|
37586
37603
|
}
|
|
37587
37604
|
const newArray = [];
|
|
37588
37605
|
for (let index = 0; index < a.length; index++) {
|
|
37589
37606
|
const itemA = a[index];
|
|
37590
|
-
const itemB =
|
|
37607
|
+
const itemB = b2[index];
|
|
37591
37608
|
const sharedValue = mergeValues(itemA, itemB);
|
|
37592
37609
|
if (!sharedValue.valid) {
|
|
37593
37610
|
return {
|
|
@@ -37607,10 +37624,10 @@ function handleIntersectionResults(result, left, right) {
|
|
|
37607
37624
|
for (const iss of left.issues) {
|
|
37608
37625
|
if (iss.code === "unrecognized_keys") {
|
|
37609
37626
|
unrecIssue ?? (unrecIssue = iss);
|
|
37610
|
-
for (const
|
|
37611
|
-
if (!unrecKeys.has(
|
|
37612
|
-
unrecKeys.set(
|
|
37613
|
-
unrecKeys.get(
|
|
37627
|
+
for (const k2 of iss.keys) {
|
|
37628
|
+
if (!unrecKeys.has(k2))
|
|
37629
|
+
unrecKeys.set(k2, {});
|
|
37630
|
+
unrecKeys.get(k2).l = true;
|
|
37614
37631
|
}
|
|
37615
37632
|
} else {
|
|
37616
37633
|
result.issues.push(iss);
|
|
@@ -37618,16 +37635,16 @@ function handleIntersectionResults(result, left, right) {
|
|
|
37618
37635
|
}
|
|
37619
37636
|
for (const iss of right.issues) {
|
|
37620
37637
|
if (iss.code === "unrecognized_keys") {
|
|
37621
|
-
for (const
|
|
37622
|
-
if (!unrecKeys.has(
|
|
37623
|
-
unrecKeys.set(
|
|
37624
|
-
unrecKeys.get(
|
|
37638
|
+
for (const k2 of iss.keys) {
|
|
37639
|
+
if (!unrecKeys.has(k2))
|
|
37640
|
+
unrecKeys.set(k2, {});
|
|
37641
|
+
unrecKeys.get(k2).r = true;
|
|
37625
37642
|
}
|
|
37626
37643
|
} else {
|
|
37627
37644
|
result.issues.push(iss);
|
|
37628
37645
|
}
|
|
37629
37646
|
}
|
|
37630
|
-
const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([
|
|
37647
|
+
const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k2]) => k2);
|
|
37631
37648
|
if (bothKeys.length && unrecIssue) {
|
|
37632
37649
|
result.issues.push({ ...unrecIssue, keys: bothKeys });
|
|
37633
37650
|
}
|
|
@@ -37921,7 +37938,7 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
|
37921
37938
|
const values = getEnumValues(def.entries);
|
|
37922
37939
|
const valuesSet = new Set(values);
|
|
37923
37940
|
inst._zod.values = valuesSet;
|
|
37924
|
-
inst._zod.pattern = new RegExp(`^(${values.filter((
|
|
37941
|
+
inst._zod.pattern = new RegExp(`^(${values.filter((k2) => propertyKeyTypes.has(typeof k2)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
|
|
37925
37942
|
inst._zod.parse = (payload, _ctx) => {
|
|
37926
37943
|
const input = payload.value;
|
|
37927
37944
|
if (valuesSet.has(input)) {
|
|
@@ -38091,8 +38108,8 @@ var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
|
|
|
38091
38108
|
var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
|
|
38092
38109
|
$ZodType.init(inst, def);
|
|
38093
38110
|
defineLazy(inst._zod, "values", () => {
|
|
38094
|
-
const
|
|
38095
|
-
return
|
|
38111
|
+
const v2 = def.innerType._zod.values;
|
|
38112
|
+
return v2 ? new Set([...v2].filter((x2) => x2 !== void 0)) : void 0;
|
|
38096
38113
|
});
|
|
38097
38114
|
inst._zod.parse = (payload, ctx) => {
|
|
38098
38115
|
const result = def.innerType._zod.run(payload, ctx);
|
|
@@ -38378,9 +38395,9 @@ var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
|
|
|
38378
38395
|
return payload;
|
|
38379
38396
|
};
|
|
38380
38397
|
inst.input = (...args) => {
|
|
38381
|
-
const
|
|
38398
|
+
const F2 = inst.constructor;
|
|
38382
38399
|
if (Array.isArray(args[0])) {
|
|
38383
|
-
return new
|
|
38400
|
+
return new F2({
|
|
38384
38401
|
type: "function",
|
|
38385
38402
|
input: new $ZodTuple({
|
|
38386
38403
|
type: "tuple",
|
|
@@ -38390,15 +38407,15 @@ var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
|
|
|
38390
38407
|
output: inst._def.output
|
|
38391
38408
|
});
|
|
38392
38409
|
}
|
|
38393
|
-
return new
|
|
38410
|
+
return new F2({
|
|
38394
38411
|
type: "function",
|
|
38395
38412
|
input: args[0],
|
|
38396
38413
|
output: inst._def.output
|
|
38397
38414
|
});
|
|
38398
38415
|
};
|
|
38399
38416
|
inst.output = (output) => {
|
|
38400
|
-
const
|
|
38401
|
-
return new
|
|
38417
|
+
const F2 = inst.constructor;
|
|
38418
|
+
return new F2({
|
|
38402
38419
|
type: "function",
|
|
38403
38420
|
input: inst._def.input,
|
|
38404
38421
|
output
|
|
@@ -38427,7 +38444,7 @@ var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
|
38427
38444
|
var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
38428
38445
|
$ZodCheck.init(inst, def);
|
|
38429
38446
|
$ZodType.init(inst, def);
|
|
38430
|
-
inst._zod.parse = (payload,
|
|
38447
|
+
inst._zod.parse = (payload, _2) => {
|
|
38431
38448
|
return payload;
|
|
38432
38449
|
};
|
|
38433
38450
|
inst._zod.check = (payload) => {
|
|
@@ -40345,7 +40362,7 @@ var error16 = () => {
|
|
|
40345
40362
|
if (issue2.values.length === 1) {
|
|
40346
40363
|
return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive(issue2.values[0])}`;
|
|
40347
40364
|
}
|
|
40348
|
-
const stringified = issue2.values.map((
|
|
40365
|
+
const stringified = issue2.values.map((v2) => stringifyPrimitive(v2));
|
|
40349
40366
|
if (issue2.values.length === 2) {
|
|
40350
40367
|
return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`;
|
|
40351
40368
|
}
|
|
@@ -40369,11 +40386,11 @@ var error16 = () => {
|
|
|
40369
40386
|
return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();
|
|
40370
40387
|
}
|
|
40371
40388
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
40372
|
-
const
|
|
40389
|
+
const be2 = verbFor(issue2.origin ?? "value");
|
|
40373
40390
|
if (sizing?.unit) {
|
|
40374
|
-
return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${
|
|
40391
|
+
return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
|
|
40375
40392
|
}
|
|
40376
|
-
return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${
|
|
40393
|
+
return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.maximum.toString()}`;
|
|
40377
40394
|
}
|
|
40378
40395
|
case "too_small": {
|
|
40379
40396
|
const sizing = getSizing(issue2.origin);
|
|
@@ -40395,11 +40412,11 @@ var error16 = () => {
|
|
|
40395
40412
|
return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();
|
|
40396
40413
|
}
|
|
40397
40414
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
40398
|
-
const
|
|
40415
|
+
const be2 = verbFor(issue2.origin ?? "value");
|
|
40399
40416
|
if (sizing?.unit) {
|
|
40400
|
-
return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${
|
|
40417
|
+
return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
40401
40418
|
}
|
|
40402
|
-
return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${
|
|
40419
|
+
return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.minimum.toString()}`;
|
|
40403
40420
|
}
|
|
40404
40421
|
case "invalid_format": {
|
|
40405
40422
|
const _issue = issue2;
|
|
@@ -44856,7 +44873,7 @@ function _set(Class2, valueType, params) {
|
|
|
44856
44873
|
}
|
|
44857
44874
|
// @__NO_SIDE_EFFECTS__
|
|
44858
44875
|
function _enum(Class2, values, params) {
|
|
44859
|
-
const entries = Array.isArray(values) ? Object.fromEntries(values.map((
|
|
44876
|
+
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
|
|
44860
44877
|
return new Class2({
|
|
44861
44878
|
type: "enum",
|
|
44862
44879
|
entries,
|
|
@@ -45061,8 +45078,8 @@ function _stringbool(Classes, _params) {
|
|
|
45061
45078
|
let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
|
|
45062
45079
|
let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
|
|
45063
45080
|
if (params.case !== "sensitive") {
|
|
45064
|
-
truthyArray = truthyArray.map((
|
|
45065
|
-
falsyArray = falsyArray.map((
|
|
45081
|
+
truthyArray = truthyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2);
|
|
45082
|
+
falsyArray = falsyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2);
|
|
45066
45083
|
}
|
|
45067
45084
|
const truthySet = new Set(truthyArray);
|
|
45068
45085
|
const falsySet = new Set(falsyArray);
|
|
@@ -45608,9 +45625,9 @@ var dateProcessor = (_schema, ctx, _json, _params) => {
|
|
|
45608
45625
|
var enumProcessor = (schema, _ctx, json2, _params) => {
|
|
45609
45626
|
const def = schema._zod.def;
|
|
45610
45627
|
const values = getEnumValues(def.entries);
|
|
45611
|
-
if (values.every((
|
|
45628
|
+
if (values.every((v2) => typeof v2 === "number"))
|
|
45612
45629
|
json2.type = "number";
|
|
45613
|
-
if (values.every((
|
|
45630
|
+
if (values.every((v2) => typeof v2 === "string"))
|
|
45614
45631
|
json2.type = "string";
|
|
45615
45632
|
json2.enum = values;
|
|
45616
45633
|
};
|
|
@@ -45643,13 +45660,13 @@ var literalProcessor = (schema, ctx, json2, _params) => {
|
|
|
45643
45660
|
json2.const = val;
|
|
45644
45661
|
}
|
|
45645
45662
|
} else {
|
|
45646
|
-
if (vals.every((
|
|
45663
|
+
if (vals.every((v2) => typeof v2 === "number"))
|
|
45647
45664
|
json2.type = "number";
|
|
45648
|
-
if (vals.every((
|
|
45665
|
+
if (vals.every((v2) => typeof v2 === "string"))
|
|
45649
45666
|
json2.type = "string";
|
|
45650
|
-
if (vals.every((
|
|
45667
|
+
if (vals.every((v2) => typeof v2 === "boolean"))
|
|
45651
45668
|
json2.type = "boolean";
|
|
45652
|
-
if (vals.every((
|
|
45669
|
+
if (vals.every((v2) => v2 === null))
|
|
45653
45670
|
json2.type = "null";
|
|
45654
45671
|
json2.enum = vals;
|
|
45655
45672
|
}
|
|
@@ -45685,7 +45702,7 @@ var fileProcessor = (schema, _ctx, json2, _params) => {
|
|
|
45685
45702
|
Object.assign(_json, file2);
|
|
45686
45703
|
} else {
|
|
45687
45704
|
Object.assign(_json, file2);
|
|
45688
|
-
_json.anyOf = mime.map((
|
|
45705
|
+
_json.anyOf = mime.map((m2) => ({ contentMediaType: m2 }));
|
|
45689
45706
|
}
|
|
45690
45707
|
} else {
|
|
45691
45708
|
Object.assign(_json, file2);
|
|
@@ -45744,11 +45761,11 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
45744
45761
|
}
|
|
45745
45762
|
const allKeys = new Set(Object.keys(shape));
|
|
45746
45763
|
const requiredKeys = new Set([...allKeys].filter((key) => {
|
|
45747
|
-
const
|
|
45764
|
+
const v2 = def.shape[key]._zod;
|
|
45748
45765
|
if (ctx.io === "input") {
|
|
45749
|
-
return
|
|
45766
|
+
return v2.optin === void 0;
|
|
45750
45767
|
} else {
|
|
45751
|
-
return
|
|
45768
|
+
return v2.optout === void 0;
|
|
45752
45769
|
}
|
|
45753
45770
|
}));
|
|
45754
45771
|
if (requiredKeys.size > 0) {
|
|
@@ -45769,7 +45786,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
45769
45786
|
var unionProcessor = (schema, ctx, json2, params) => {
|
|
45770
45787
|
const def = schema._zod.def;
|
|
45771
45788
|
const isExclusive = def.inclusive === false;
|
|
45772
|
-
const options = def.options.map((
|
|
45789
|
+
const options = def.options.map((x2, i) => process2(x2, ctx, {
|
|
45773
45790
|
...params,
|
|
45774
45791
|
path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
|
|
45775
45792
|
}));
|
|
@@ -45785,14 +45802,14 @@ var intersectionProcessor = (schema, ctx, json2, params) => {
|
|
|
45785
45802
|
...params,
|
|
45786
45803
|
path: [...params.path, "allOf", 0]
|
|
45787
45804
|
});
|
|
45788
|
-
const
|
|
45805
|
+
const b2 = process2(def.right, ctx, {
|
|
45789
45806
|
...params,
|
|
45790
45807
|
path: [...params.path, "allOf", 1]
|
|
45791
45808
|
});
|
|
45792
45809
|
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
45793
45810
|
const allOf = [
|
|
45794
45811
|
...isSimpleIntersection(a) ? a.allOf : [a],
|
|
45795
|
-
...isSimpleIntersection(
|
|
45812
|
+
...isSimpleIntersection(b2) ? b2.allOf : [b2]
|
|
45796
45813
|
];
|
|
45797
45814
|
json2.allOf = allOf;
|
|
45798
45815
|
};
|
|
@@ -45802,7 +45819,7 @@ var tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
45802
45819
|
json2.type = "array";
|
|
45803
45820
|
const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
45804
45821
|
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
45805
|
-
const prefixItems = def.items.map((
|
|
45822
|
+
const prefixItems = def.items.map((x2, i) => process2(x2, ctx, {
|
|
45806
45823
|
...params,
|
|
45807
45824
|
path: [...params.path, prefixPath, i]
|
|
45808
45825
|
}));
|
|
@@ -45868,7 +45885,7 @@ var recordProcessor = (schema, ctx, _json, params) => {
|
|
|
45868
45885
|
}
|
|
45869
45886
|
const keyValues = keyType._zod.values;
|
|
45870
45887
|
if (keyValues) {
|
|
45871
|
-
const validKeyValues = [...keyValues].filter((
|
|
45888
|
+
const validKeyValues = [...keyValues].filter((v2) => typeof v2 === "string" || typeof v2 === "number");
|
|
45872
45889
|
if (validKeyValues.length > 0) {
|
|
45873
45890
|
json2.required = validKeyValues;
|
|
45874
45891
|
}
|
|
@@ -45998,7 +46015,7 @@ function toJSONSchema(input, params) {
|
|
|
45998
46015
|
const ctx2 = initializeContext({ ...params, processors: allProcessors });
|
|
45999
46016
|
const defs = {};
|
|
46000
46017
|
for (const entry of registry2._idmap.entries()) {
|
|
46001
|
-
const [
|
|
46018
|
+
const [_2, schema] = entry;
|
|
46002
46019
|
process2(schema, ctx2);
|
|
46003
46020
|
}
|
|
46004
46021
|
const schemas = {};
|
|
@@ -46097,7 +46114,7 @@ var JSONSchemaGenerator = class {
|
|
|
46097
46114
|
}
|
|
46098
46115
|
extractDefs(this.ctx, schema);
|
|
46099
46116
|
const result = finalize(this.ctx, schema);
|
|
46100
|
-
const { "~standard":
|
|
46117
|
+
const { "~standard": _2, ...plainResult } = result;
|
|
46101
46118
|
return plainResult;
|
|
46102
46119
|
}
|
|
46103
46120
|
};
|
|
@@ -47040,11 +47057,11 @@ function record(keyType, valueType, params) {
|
|
|
47040
47057
|
});
|
|
47041
47058
|
}
|
|
47042
47059
|
function partialRecord(keyType, valueType, params) {
|
|
47043
|
-
const
|
|
47044
|
-
|
|
47060
|
+
const k2 = clone(keyType);
|
|
47061
|
+
k2._zod.values = void 0;
|
|
47045
47062
|
return new ZodRecord({
|
|
47046
47063
|
type: "record",
|
|
47047
|
-
keyType:
|
|
47064
|
+
keyType: k2,
|
|
47048
47065
|
valueType,
|
|
47049
47066
|
...util_exports.normalizeParams(params)
|
|
47050
47067
|
});
|
|
@@ -47132,7 +47149,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
|
47132
47149
|
};
|
|
47133
47150
|
});
|
|
47134
47151
|
function _enum2(values, params) {
|
|
47135
|
-
const entries = Array.isArray(values) ? Object.fromEntries(values.map((
|
|
47152
|
+
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
|
|
47136
47153
|
return new ZodEnum({
|
|
47137
47154
|
type: "enum",
|
|
47138
47155
|
entries,
|
|
@@ -47666,10 +47683,10 @@ function convertBaseSchema(schema, ctx) {
|
|
|
47666
47683
|
if (enumValues.length === 1) {
|
|
47667
47684
|
return z.literal(enumValues[0]);
|
|
47668
47685
|
}
|
|
47669
|
-
if (enumValues.every((
|
|
47686
|
+
if (enumValues.every((v2) => typeof v2 === "string")) {
|
|
47670
47687
|
return z.enum(enumValues);
|
|
47671
47688
|
}
|
|
47672
|
-
const literalSchemas = enumValues.map((
|
|
47689
|
+
const literalSchemas = enumValues.map((v2) => z.literal(v2));
|
|
47673
47690
|
if (literalSchemas.length < 2) {
|
|
47674
47691
|
return literalSchemas[0];
|
|
47675
47692
|
}
|
|
@@ -48017,6 +48034,1214 @@ var import_node_fs3 = __toESM(require("node:fs"), 1);
|
|
|
48017
48034
|
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
48018
48035
|
var import_send = __toESM(require_send(), 1);
|
|
48019
48036
|
|
|
48037
|
+
// ../../node_modules/marked/lib/marked.esm.js
|
|
48038
|
+
function M() {
|
|
48039
|
+
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
48040
|
+
}
|
|
48041
|
+
var T = M();
|
|
48042
|
+
function G(u3) {
|
|
48043
|
+
T = u3;
|
|
48044
|
+
}
|
|
48045
|
+
var _ = { exec: () => null };
|
|
48046
|
+
function k(u3, e = "") {
|
|
48047
|
+
let t = typeof u3 == "string" ? u3 : u3.source, n = { replace: (r, i) => {
|
|
48048
|
+
let s = typeof i == "string" ? i : i.source;
|
|
48049
|
+
return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
|
|
48050
|
+
}, getRegex: () => new RegExp(t, e) };
|
|
48051
|
+
return n;
|
|
48052
|
+
}
|
|
48053
|
+
var be = (() => {
|
|
48054
|
+
try {
|
|
48055
|
+
return !!new RegExp("(?<=1)(?<!1)");
|
|
48056
|
+
} catch {
|
|
48057
|
+
return false;
|
|
48058
|
+
}
|
|
48059
|
+
})();
|
|
48060
|
+
var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (u3) => new RegExp(`^( {0,3}${u3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}#`), htmlBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}>`) };
|
|
48061
|
+
var Re = /^(?:[ \t]*(?:\n|$))+/;
|
|
48062
|
+
var Te = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
|
|
48063
|
+
var Oe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
|
|
48064
|
+
var C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
|
|
48065
|
+
var we = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
|
|
48066
|
+
var Q = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
|
|
48067
|
+
var se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
|
|
48068
|
+
var ie = k(se).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
|
|
48069
|
+
var ye = k(se).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
|
|
48070
|
+
var j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
|
|
48071
|
+
var Pe = /^[^\n]+/;
|
|
48072
|
+
var F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
|
|
48073
|
+
var Se = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
|
|
48074
|
+
var $e = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex();
|
|
48075
|
+
var v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
|
|
48076
|
+
var U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
|
|
48077
|
+
var _e = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
|
|
48078
|
+
var oe = k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex();
|
|
48079
|
+
var Le = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex();
|
|
48080
|
+
var K = { blockquote: Le, code: Te, def: Se, fences: Oe, heading: we, hr: C, html: _e, lheading: ie, list: $e, newline: Re, paragraph: oe, table: _, text: Pe };
|
|
48081
|
+
var ne = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex();
|
|
48082
|
+
var Me = { ...K, lheading: ye, table: ne, paragraph: k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ne).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() };
|
|
48083
|
+
var ze = { ...K, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: k(j).replace("hr", C).replace("heading", ` *#{1,6} *[^
|
|
48084
|
+
]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
|
|
48085
|
+
var Ee = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
|
|
48086
|
+
var Ie = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
|
|
48087
|
+
var ae = /^( {2,}|\\)\n(?!\s*$)/;
|
|
48088
|
+
var Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
|
|
48089
|
+
var z2 = /[\p{P}\p{S}]/u;
|
|
48090
|
+
var H = /[\s\p{P}\p{S}]/u;
|
|
48091
|
+
var W = /[^\s\p{P}\p{S}]/u;
|
|
48092
|
+
var Ce = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, H).getRegex();
|
|
48093
|
+
var le = /(?!~)[\p{P}\p{S}]/u;
|
|
48094
|
+
var Be = /(?!~)[\s\p{P}\p{S}]/u;
|
|
48095
|
+
var De = /(?:[^\s\p{P}\p{S}]|~)/u;
|
|
48096
|
+
var qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", be ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
|
|
48097
|
+
var ue = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
|
|
48098
|
+
var ve = k(ue, "u").replace(/punct/g, z2).getRegex();
|
|
48099
|
+
var He = k(ue, "u").replace(/punct/g, le).getRegex();
|
|
48100
|
+
var pe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
|
|
48101
|
+
var Ze = k(pe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z2).getRegex();
|
|
48102
|
+
var Ge = k(pe, "gu").replace(/notPunctSpace/g, De).replace(/punctSpace/g, Be).replace(/punct/g, le).getRegex();
|
|
48103
|
+
var Ne = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z2).getRegex();
|
|
48104
|
+
var Qe = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, z2).getRegex();
|
|
48105
|
+
var je = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
|
|
48106
|
+
var Fe = k(je, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z2).getRegex();
|
|
48107
|
+
var Ue = k(/\\(punct)/, "gu").replace(/punct/g, z2).getRegex();
|
|
48108
|
+
var Ke = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
|
|
48109
|
+
var We = k(U).replace("(?:-->|$)", "-->").getRegex();
|
|
48110
|
+
var Xe = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", We).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
|
|
48111
|
+
var q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;
|
|
48112
|
+
var Je = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
|
|
48113
|
+
var ce = k(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", F).getRegex();
|
|
48114
|
+
var he = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex();
|
|
48115
|
+
var Ve = k("reflink|nolink(?!\\()", "g").replace("reflink", ce).replace("nolink", he).getRegex();
|
|
48116
|
+
var re = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
|
|
48117
|
+
var X = { _backpedal: _, anyPunctuation: Ue, autolink: Ke, blockSkip: qe, br: ae, code: Ie, del: _, delLDelim: _, delRDelim: _, emStrongLDelim: ve, emStrongRDelimAst: Ze, emStrongRDelimUnd: Ne, escape: Ee, link: Je, nolink: he, punctuation: Ce, reflink: ce, reflinkSearch: Ve, tag: Xe, text: Ae, url: _ };
|
|
48118
|
+
var Ye = { ...X, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() };
|
|
48119
|
+
var N = { ...X, emStrongRDelimAst: Ge, emStrongLDelim: He, delLDelim: Qe, delRDelim: Fe, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", re).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", re).getRegex() };
|
|
48120
|
+
var et = { ...N, br: k(ae).replace("{2,}", "*").getRegex(), text: k(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
|
|
48121
|
+
var B = { normal: K, gfm: Me, pedantic: ze };
|
|
48122
|
+
var E = { normal: X, gfm: N, breaks: et, pedantic: Ye };
|
|
48123
|
+
var tt = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" };
|
|
48124
|
+
var ke = (u3) => tt[u3];
|
|
48125
|
+
function O(u3, e) {
|
|
48126
|
+
if (e) {
|
|
48127
|
+
if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, ke);
|
|
48128
|
+
} else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, ke);
|
|
48129
|
+
return u3;
|
|
48130
|
+
}
|
|
48131
|
+
function J(u3) {
|
|
48132
|
+
try {
|
|
48133
|
+
u3 = encodeURI(u3).replace(m.percentDecode, "%");
|
|
48134
|
+
} catch {
|
|
48135
|
+
return null;
|
|
48136
|
+
}
|
|
48137
|
+
return u3;
|
|
48138
|
+
}
|
|
48139
|
+
function V(u3, e) {
|
|
48140
|
+
let t = u3.replace(m.findPipe, (i, s, a) => {
|
|
48141
|
+
let o = false, l = s;
|
|
48142
|
+
for (; --l >= 0 && a[l] === "\\"; ) o = !o;
|
|
48143
|
+
return o ? "|" : " |";
|
|
48144
|
+
}), n = t.split(m.splitPipe), r = 0;
|
|
48145
|
+
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
|
|
48146
|
+
else for (; n.length < e; ) n.push("");
|
|
48147
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
|
|
48148
|
+
return n;
|
|
48149
|
+
}
|
|
48150
|
+
function I(u3, e, t) {
|
|
48151
|
+
let n = u3.length;
|
|
48152
|
+
if (n === 0) return "";
|
|
48153
|
+
let r = 0;
|
|
48154
|
+
for (; r < n; ) {
|
|
48155
|
+
let i = u3.charAt(n - r - 1);
|
|
48156
|
+
if (i === e && !t) r++;
|
|
48157
|
+
else if (i !== e && t) r++;
|
|
48158
|
+
else break;
|
|
48159
|
+
}
|
|
48160
|
+
return u3.slice(0, n - r);
|
|
48161
|
+
}
|
|
48162
|
+
function de(u3, e) {
|
|
48163
|
+
if (u3.indexOf(e[1]) === -1) return -1;
|
|
48164
|
+
let t = 0;
|
|
48165
|
+
for (let n = 0; n < u3.length; n++) if (u3[n] === "\\") n++;
|
|
48166
|
+
else if (u3[n] === e[0]) t++;
|
|
48167
|
+
else if (u3[n] === e[1] && (t--, t < 0)) return n;
|
|
48168
|
+
return t > 0 ? -2 : -1;
|
|
48169
|
+
}
|
|
48170
|
+
function ge(u3, e = 0) {
|
|
48171
|
+
let t = e, n = "";
|
|
48172
|
+
for (let r of u3) if (r === " ") {
|
|
48173
|
+
let i = 4 - t % 4;
|
|
48174
|
+
n += " ".repeat(i), t += i;
|
|
48175
|
+
} else n += r, t++;
|
|
48176
|
+
return n;
|
|
48177
|
+
}
|
|
48178
|
+
function fe(u3, e, t, n, r) {
|
|
48179
|
+
let i = e.href, s = e.title || null, a = u3[1].replace(r.other.outputLinkReplace, "$1");
|
|
48180
|
+
n.state.inLink = true;
|
|
48181
|
+
let o = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: a, tokens: n.inlineTokens(a) };
|
|
48182
|
+
return n.state.inLink = false, o;
|
|
48183
|
+
}
|
|
48184
|
+
function nt(u3, e, t) {
|
|
48185
|
+
let n = u3.match(t.other.indentCodeCompensation);
|
|
48186
|
+
if (n === null) return e;
|
|
48187
|
+
let r = n[1];
|
|
48188
|
+
return e.split(`
|
|
48189
|
+
`).map((i) => {
|
|
48190
|
+
let s = i.match(t.other.beginningSpace);
|
|
48191
|
+
if (s === null) return i;
|
|
48192
|
+
let [a] = s;
|
|
48193
|
+
return a.length >= r.length ? i.slice(r.length) : i;
|
|
48194
|
+
}).join(`
|
|
48195
|
+
`);
|
|
48196
|
+
}
|
|
48197
|
+
var w = class {
|
|
48198
|
+
options;
|
|
48199
|
+
rules;
|
|
48200
|
+
lexer;
|
|
48201
|
+
constructor(e) {
|
|
48202
|
+
this.options = e || T;
|
|
48203
|
+
}
|
|
48204
|
+
space(e) {
|
|
48205
|
+
let t = this.rules.block.newline.exec(e);
|
|
48206
|
+
if (t && t[0].length > 0) return { type: "space", raw: t[0] };
|
|
48207
|
+
}
|
|
48208
|
+
code(e) {
|
|
48209
|
+
let t = this.rules.block.code.exec(e);
|
|
48210
|
+
if (t) {
|
|
48211
|
+
let n = t[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
48212
|
+
return { type: "code", raw: t[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : I(n, `
|
|
48213
|
+
`) };
|
|
48214
|
+
}
|
|
48215
|
+
}
|
|
48216
|
+
fences(e) {
|
|
48217
|
+
let t = this.rules.block.fences.exec(e);
|
|
48218
|
+
if (t) {
|
|
48219
|
+
let n = t[0], r = nt(n, t[3] || "", this.rules);
|
|
48220
|
+
return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
|
|
48221
|
+
}
|
|
48222
|
+
}
|
|
48223
|
+
heading(e) {
|
|
48224
|
+
let t = this.rules.block.heading.exec(e);
|
|
48225
|
+
if (t) {
|
|
48226
|
+
let n = t[2].trim();
|
|
48227
|
+
if (this.rules.other.endingHash.test(n)) {
|
|
48228
|
+
let r = I(n, "#");
|
|
48229
|
+
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
|
|
48230
|
+
}
|
|
48231
|
+
return { type: "heading", raw: t[0], depth: t[1].length, text: n, tokens: this.lexer.inline(n) };
|
|
48232
|
+
}
|
|
48233
|
+
}
|
|
48234
|
+
hr(e) {
|
|
48235
|
+
let t = this.rules.block.hr.exec(e);
|
|
48236
|
+
if (t) return { type: "hr", raw: I(t[0], `
|
|
48237
|
+
`) };
|
|
48238
|
+
}
|
|
48239
|
+
blockquote(e) {
|
|
48240
|
+
let t = this.rules.block.blockquote.exec(e);
|
|
48241
|
+
if (t) {
|
|
48242
|
+
let n = I(t[0], `
|
|
48243
|
+
`).split(`
|
|
48244
|
+
`), r = "", i = "", s = [];
|
|
48245
|
+
for (; n.length > 0; ) {
|
|
48246
|
+
let a = false, o = [], l;
|
|
48247
|
+
for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) o.push(n[l]), a = true;
|
|
48248
|
+
else if (!a) o.push(n[l]);
|
|
48249
|
+
else break;
|
|
48250
|
+
n = n.slice(l);
|
|
48251
|
+
let p = o.join(`
|
|
48252
|
+
`), c = p.replace(this.rules.other.blockquoteSetextReplace, `
|
|
48253
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
48254
|
+
r = r ? `${r}
|
|
48255
|
+
${p}` : p, i = i ? `${i}
|
|
48256
|
+
${c}` : c;
|
|
48257
|
+
let d = this.lexer.state.top;
|
|
48258
|
+
if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = d, n.length === 0) break;
|
|
48259
|
+
let h = s.at(-1);
|
|
48260
|
+
if (h?.type === "code") break;
|
|
48261
|
+
if (h?.type === "blockquote") {
|
|
48262
|
+
let R = h, f = R.raw + `
|
|
48263
|
+
` + n.join(`
|
|
48264
|
+
`), S = this.blockquote(f);
|
|
48265
|
+
s[s.length - 1] = S, r = r.substring(0, r.length - R.raw.length) + S.raw, i = i.substring(0, i.length - R.text.length) + S.text;
|
|
48266
|
+
break;
|
|
48267
|
+
} else if (h?.type === "list") {
|
|
48268
|
+
let R = h, f = R.raw + `
|
|
48269
|
+
` + n.join(`
|
|
48270
|
+
`), S = this.list(f);
|
|
48271
|
+
s[s.length - 1] = S, r = r.substring(0, r.length - h.raw.length) + S.raw, i = i.substring(0, i.length - R.raw.length) + S.raw, n = f.substring(s.at(-1).raw.length).split(`
|
|
48272
|
+
`);
|
|
48273
|
+
continue;
|
|
48274
|
+
}
|
|
48275
|
+
}
|
|
48276
|
+
return { type: "blockquote", raw: r, tokens: s, text: i };
|
|
48277
|
+
}
|
|
48278
|
+
}
|
|
48279
|
+
list(e) {
|
|
48280
|
+
let t = this.rules.block.list.exec(e);
|
|
48281
|
+
if (t) {
|
|
48282
|
+
let n = t[1].trim(), r = n.length > 1, i = { type: "list", raw: "", ordered: r, start: r ? +n.slice(0, -1) : "", loose: false, items: [] };
|
|
48283
|
+
n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
|
|
48284
|
+
let s = this.rules.other.listItemRegex(n), a = false;
|
|
48285
|
+
for (; e; ) {
|
|
48286
|
+
let l = false, p = "", c = "";
|
|
48287
|
+
if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
48288
|
+
p = t[0], e = e.substring(p.length);
|
|
48289
|
+
let d = ge(t[2].split(`
|
|
48290
|
+
`, 1)[0], t[1].length), h = e.split(`
|
|
48291
|
+
`, 1)[0], R = !d.trim(), f = 0;
|
|
48292
|
+
if (this.options.pedantic ? (f = 2, c = d.trimStart()) : R ? f = t[1].length + 1 : (f = d.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = d.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (p += h + `
|
|
48293
|
+
`, e = e.substring(h.length + 1), l = true), !l) {
|
|
48294
|
+
let S = this.rules.other.nextBulletRegex(f), Y = this.rules.other.hrRegex(f), ee = this.rules.other.fencesBeginRegex(f), te = this.rules.other.headingBeginRegex(f), me = this.rules.other.htmlBeginRegex(f), xe = this.rules.other.blockquoteBeginRegex(f);
|
|
48295
|
+
for (; e; ) {
|
|
48296
|
+
let Z = e.split(`
|
|
48297
|
+
`, 1)[0], A;
|
|
48298
|
+
if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), ee.test(h) || te.test(h) || me.test(h) || xe.test(h) || S.test(h) || Y.test(h)) break;
|
|
48299
|
+
if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
|
|
48300
|
+
` + A.slice(f);
|
|
48301
|
+
else {
|
|
48302
|
+
if (R || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ee.test(d) || te.test(d) || Y.test(d)) break;
|
|
48303
|
+
c += `
|
|
48304
|
+
` + h;
|
|
48305
|
+
}
|
|
48306
|
+
R = !h.trim(), p += Z + `
|
|
48307
|
+
`, e = e.substring(Z.length + 1), d = A.slice(f);
|
|
48308
|
+
}
|
|
48309
|
+
}
|
|
48310
|
+
i.loose || (a ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (a = true)), i.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(c), loose: false, text: c, tokens: [] }), i.raw += p;
|
|
48311
|
+
}
|
|
48312
|
+
let o = i.items.at(-1);
|
|
48313
|
+
if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
|
|
48314
|
+
else return;
|
|
48315
|
+
i.raw = i.raw.trimEnd();
|
|
48316
|
+
for (let l of i.items) {
|
|
48317
|
+
if (this.lexer.state.top = false, l.tokens = this.lexer.blockTokens(l.text, []), l.task) {
|
|
48318
|
+
if (l.text = l.text.replace(this.rules.other.listReplaceTask, ""), l.tokens[0]?.type === "text" || l.tokens[0]?.type === "paragraph") {
|
|
48319
|
+
l.tokens[0].raw = l.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), l.tokens[0].text = l.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
|
|
48320
|
+
for (let c = this.lexer.inlineQueue.length - 1; c >= 0; c--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)) {
|
|
48321
|
+
this.lexer.inlineQueue[c].src = this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask, "");
|
|
48322
|
+
break;
|
|
48323
|
+
}
|
|
48324
|
+
}
|
|
48325
|
+
let p = this.rules.other.listTaskCheckbox.exec(l.raw);
|
|
48326
|
+
if (p) {
|
|
48327
|
+
let c = { type: "checkbox", raw: p[0] + " ", checked: p[0] !== "[ ]" };
|
|
48328
|
+
l.checked = c.checked, i.loose ? l.tokens[0] && ["paragraph", "text"].includes(l.tokens[0].type) && "tokens" in l.tokens[0] && l.tokens[0].tokens ? (l.tokens[0].raw = c.raw + l.tokens[0].raw, l.tokens[0].text = c.raw + l.tokens[0].text, l.tokens[0].tokens.unshift(c)) : l.tokens.unshift({ type: "paragraph", raw: c.raw, text: c.raw, tokens: [c] }) : l.tokens.unshift(c);
|
|
48329
|
+
}
|
|
48330
|
+
}
|
|
48331
|
+
if (!i.loose) {
|
|
48332
|
+
let p = l.tokens.filter((d) => d.type === "space"), c = p.length > 0 && p.some((d) => this.rules.other.anyLine.test(d.raw));
|
|
48333
|
+
i.loose = c;
|
|
48334
|
+
}
|
|
48335
|
+
}
|
|
48336
|
+
if (i.loose) for (let l of i.items) {
|
|
48337
|
+
l.loose = true;
|
|
48338
|
+
for (let p of l.tokens) p.type === "text" && (p.type = "paragraph");
|
|
48339
|
+
}
|
|
48340
|
+
return i;
|
|
48341
|
+
}
|
|
48342
|
+
}
|
|
48343
|
+
html(e) {
|
|
48344
|
+
let t = this.rules.block.html.exec(e);
|
|
48345
|
+
if (t) return { type: "html", block: true, raw: t[0], pre: t[1] === "pre" || t[1] === "script" || t[1] === "style", text: t[0] };
|
|
48346
|
+
}
|
|
48347
|
+
def(e) {
|
|
48348
|
+
let t = this.rules.block.def.exec(e);
|
|
48349
|
+
if (t) {
|
|
48350
|
+
let n = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), r = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", i = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
|
|
48351
|
+
return { type: "def", tag: n, raw: t[0], href: r, title: i };
|
|
48352
|
+
}
|
|
48353
|
+
}
|
|
48354
|
+
table(e) {
|
|
48355
|
+
let t = this.rules.block.table.exec(e);
|
|
48356
|
+
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
48357
|
+
let n = V(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
48358
|
+
`) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
|
|
48359
|
+
if (n.length === r.length) {
|
|
48360
|
+
for (let a of r) this.rules.other.tableAlignRight.test(a) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(a) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(a) ? s.align.push("left") : s.align.push(null);
|
|
48361
|
+
for (let a = 0; a < n.length; a++) s.header.push({ text: n[a], tokens: this.lexer.inline(n[a]), header: true, align: s.align[a] });
|
|
48362
|
+
for (let a of i) s.rows.push(V(a, s.header.length).map((o, l) => ({ text: o, tokens: this.lexer.inline(o), header: false, align: s.align[l] })));
|
|
48363
|
+
return s;
|
|
48364
|
+
}
|
|
48365
|
+
}
|
|
48366
|
+
lheading(e) {
|
|
48367
|
+
let t = this.rules.block.lheading.exec(e);
|
|
48368
|
+
if (t) {
|
|
48369
|
+
let n = t[1].trim();
|
|
48370
|
+
return { type: "heading", raw: t[0], depth: t[2].charAt(0) === "=" ? 1 : 2, text: n, tokens: this.lexer.inline(n) };
|
|
48371
|
+
}
|
|
48372
|
+
}
|
|
48373
|
+
paragraph(e) {
|
|
48374
|
+
let t = this.rules.block.paragraph.exec(e);
|
|
48375
|
+
if (t) {
|
|
48376
|
+
let n = t[1].charAt(t[1].length - 1) === `
|
|
48377
|
+
` ? t[1].slice(0, -1) : t[1];
|
|
48378
|
+
return { type: "paragraph", raw: t[0], text: n, tokens: this.lexer.inline(n) };
|
|
48379
|
+
}
|
|
48380
|
+
}
|
|
48381
|
+
text(e) {
|
|
48382
|
+
let t = this.rules.block.text.exec(e);
|
|
48383
|
+
if (t) return { type: "text", raw: t[0], text: t[0], tokens: this.lexer.inline(t[0]) };
|
|
48384
|
+
}
|
|
48385
|
+
escape(e) {
|
|
48386
|
+
let t = this.rules.inline.escape.exec(e);
|
|
48387
|
+
if (t) return { type: "escape", raw: t[0], text: t[1] };
|
|
48388
|
+
}
|
|
48389
|
+
tag(e) {
|
|
48390
|
+
let t = this.rules.inline.tag.exec(e);
|
|
48391
|
+
if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t[0] };
|
|
48392
|
+
}
|
|
48393
|
+
link(e) {
|
|
48394
|
+
let t = this.rules.inline.link.exec(e);
|
|
48395
|
+
if (t) {
|
|
48396
|
+
let n = t[2].trim();
|
|
48397
|
+
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
48398
|
+
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
48399
|
+
let s = I(n.slice(0, -1), "\\");
|
|
48400
|
+
if ((n.length - s.length) % 2 === 0) return;
|
|
48401
|
+
} else {
|
|
48402
|
+
let s = de(t[2], "()");
|
|
48403
|
+
if (s === -2) return;
|
|
48404
|
+
if (s > -1) {
|
|
48405
|
+
let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
|
|
48406
|
+
t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, o).trim(), t[3] = "";
|
|
48407
|
+
}
|
|
48408
|
+
}
|
|
48409
|
+
let r = t[2], i = "";
|
|
48410
|
+
if (this.options.pedantic) {
|
|
48411
|
+
let s = this.rules.other.pedanticHrefTitle.exec(r);
|
|
48412
|
+
s && (r = s[1], i = s[3]);
|
|
48413
|
+
} else i = t[3] ? t[3].slice(1, -1) : "";
|
|
48414
|
+
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), fe(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
|
|
48415
|
+
}
|
|
48416
|
+
}
|
|
48417
|
+
reflink(e, t) {
|
|
48418
|
+
let n;
|
|
48419
|
+
if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
|
|
48420
|
+
let r = (n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "), i = t[r.toLowerCase()];
|
|
48421
|
+
if (!i) {
|
|
48422
|
+
let s = n[0].charAt(0);
|
|
48423
|
+
return { type: "text", raw: s, text: s };
|
|
48424
|
+
}
|
|
48425
|
+
return fe(n, i, n[0], this.lexer, this.rules);
|
|
48426
|
+
}
|
|
48427
|
+
}
|
|
48428
|
+
emStrong(e, t, n = "") {
|
|
48429
|
+
let r = this.rules.inline.emStrongLDelim.exec(e);
|
|
48430
|
+
if (!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
48431
|
+
if (!(r[1] || r[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
48432
|
+
let s = [...r[0]].length - 1, a, o, l = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
48433
|
+
for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
|
|
48434
|
+
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
|
|
48435
|
+
if (o = [...a].length, r[3] || r[4]) {
|
|
48436
|
+
l += o;
|
|
48437
|
+
continue;
|
|
48438
|
+
} else if ((r[5] || r[6]) && s % 3 && !((s + o) % 3)) {
|
|
48439
|
+
p += o;
|
|
48440
|
+
continue;
|
|
48441
|
+
}
|
|
48442
|
+
if (l -= o, l > 0) continue;
|
|
48443
|
+
o = Math.min(o, o + l + p);
|
|
48444
|
+
let d = [...r[0]][0].length, h = e.slice(0, s + r.index + d + o);
|
|
48445
|
+
if (Math.min(s, o) % 2) {
|
|
48446
|
+
let f = h.slice(1, -1);
|
|
48447
|
+
return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
|
|
48448
|
+
}
|
|
48449
|
+
let R = h.slice(2, -2);
|
|
48450
|
+
return { type: "strong", raw: h, text: R, tokens: this.lexer.inlineTokens(R) };
|
|
48451
|
+
}
|
|
48452
|
+
}
|
|
48453
|
+
}
|
|
48454
|
+
codespan(e) {
|
|
48455
|
+
let t = this.rules.inline.code.exec(e);
|
|
48456
|
+
if (t) {
|
|
48457
|
+
let n = t[2].replace(this.rules.other.newLineCharGlobal, " "), r = this.rules.other.nonSpaceChar.test(n), i = this.rules.other.startingSpaceChar.test(n) && this.rules.other.endingSpaceChar.test(n);
|
|
48458
|
+
return r && i && (n = n.substring(1, n.length - 1)), { type: "codespan", raw: t[0], text: n };
|
|
48459
|
+
}
|
|
48460
|
+
}
|
|
48461
|
+
br(e) {
|
|
48462
|
+
let t = this.rules.inline.br.exec(e);
|
|
48463
|
+
if (t) return { type: "br", raw: t[0] };
|
|
48464
|
+
}
|
|
48465
|
+
del(e, t, n = "") {
|
|
48466
|
+
let r = this.rules.inline.delLDelim.exec(e);
|
|
48467
|
+
if (!r) return;
|
|
48468
|
+
if (!(r[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
48469
|
+
let s = [...r[0]].length - 1, a, o, l = s, p = this.rules.inline.delRDelim;
|
|
48470
|
+
for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) != null; ) {
|
|
48471
|
+
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a || (o = [...a].length, o !== s)) continue;
|
|
48472
|
+
if (r[3] || r[4]) {
|
|
48473
|
+
l += o;
|
|
48474
|
+
continue;
|
|
48475
|
+
}
|
|
48476
|
+
if (l -= o, l > 0) continue;
|
|
48477
|
+
o = Math.min(o, o + l);
|
|
48478
|
+
let c = [...r[0]][0].length, d = e.slice(0, s + r.index + c + o), h = d.slice(s, -s);
|
|
48479
|
+
return { type: "del", raw: d, text: h, tokens: this.lexer.inlineTokens(h) };
|
|
48480
|
+
}
|
|
48481
|
+
}
|
|
48482
|
+
}
|
|
48483
|
+
autolink(e) {
|
|
48484
|
+
let t = this.rules.inline.autolink.exec(e);
|
|
48485
|
+
if (t) {
|
|
48486
|
+
let n, r;
|
|
48487
|
+
return t[2] === "@" ? (n = t[1], r = "mailto:" + n) : (n = t[1], r = n), { type: "link", raw: t[0], text: n, href: r, tokens: [{ type: "text", raw: n, text: n }] };
|
|
48488
|
+
}
|
|
48489
|
+
}
|
|
48490
|
+
url(e) {
|
|
48491
|
+
let t;
|
|
48492
|
+
if (t = this.rules.inline.url.exec(e)) {
|
|
48493
|
+
let n, r;
|
|
48494
|
+
if (t[2] === "@") n = t[0], r = "mailto:" + n;
|
|
48495
|
+
else {
|
|
48496
|
+
let i;
|
|
48497
|
+
do
|
|
48498
|
+
i = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
|
|
48499
|
+
while (i !== t[0]);
|
|
48500
|
+
n = t[0], t[1] === "www." ? r = "http://" + t[0] : r = t[0];
|
|
48501
|
+
}
|
|
48502
|
+
return { type: "link", raw: t[0], text: n, href: r, tokens: [{ type: "text", raw: n, text: n }] };
|
|
48503
|
+
}
|
|
48504
|
+
}
|
|
48505
|
+
inlineText(e) {
|
|
48506
|
+
let t = this.rules.inline.text.exec(e);
|
|
48507
|
+
if (t) {
|
|
48508
|
+
let n = this.lexer.state.inRawBlock;
|
|
48509
|
+
return { type: "text", raw: t[0], text: t[0], escaped: n };
|
|
48510
|
+
}
|
|
48511
|
+
}
|
|
48512
|
+
};
|
|
48513
|
+
var x = class u {
|
|
48514
|
+
tokens;
|
|
48515
|
+
options;
|
|
48516
|
+
state;
|
|
48517
|
+
inlineQueue;
|
|
48518
|
+
tokenizer;
|
|
48519
|
+
constructor(e) {
|
|
48520
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
|
|
48521
|
+
let t = { other: m, block: B.normal, inline: E.normal };
|
|
48522
|
+
this.options.pedantic ? (t.block = B.pedantic, t.inline = E.pedantic) : this.options.gfm && (t.block = B.gfm, this.options.breaks ? t.inline = E.breaks : t.inline = E.gfm), this.tokenizer.rules = t;
|
|
48523
|
+
}
|
|
48524
|
+
static get rules() {
|
|
48525
|
+
return { block: B, inline: E };
|
|
48526
|
+
}
|
|
48527
|
+
static lex(e, t) {
|
|
48528
|
+
return new u(t).lex(e);
|
|
48529
|
+
}
|
|
48530
|
+
static lexInline(e, t) {
|
|
48531
|
+
return new u(t).inlineTokens(e);
|
|
48532
|
+
}
|
|
48533
|
+
lex(e) {
|
|
48534
|
+
e = e.replace(m.carriageReturn, `
|
|
48535
|
+
`), this.blockTokens(e, this.tokens);
|
|
48536
|
+
for (let t = 0; t < this.inlineQueue.length; t++) {
|
|
48537
|
+
let n = this.inlineQueue[t];
|
|
48538
|
+
this.inlineTokens(n.src, n.tokens);
|
|
48539
|
+
}
|
|
48540
|
+
return this.inlineQueue = [], this.tokens;
|
|
48541
|
+
}
|
|
48542
|
+
blockTokens(e, t = [], n = false) {
|
|
48543
|
+
for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e; ) {
|
|
48544
|
+
let r;
|
|
48545
|
+
if (this.options.extensions?.block?.some((s) => (r = s.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), true) : false)) continue;
|
|
48546
|
+
if (r = this.tokenizer.space(e)) {
|
|
48547
|
+
e = e.substring(r.raw.length);
|
|
48548
|
+
let s = t.at(-1);
|
|
48549
|
+
r.raw.length === 1 && s !== void 0 ? s.raw += `
|
|
48550
|
+
` : t.push(r);
|
|
48551
|
+
continue;
|
|
48552
|
+
}
|
|
48553
|
+
if (r = this.tokenizer.code(e)) {
|
|
48554
|
+
e = e.substring(r.raw.length);
|
|
48555
|
+
let s = t.at(-1);
|
|
48556
|
+
s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
|
|
48557
|
+
`) ? "" : `
|
|
48558
|
+
`) + r.raw, s.text += `
|
|
48559
|
+
` + r.text, this.inlineQueue.at(-1).src = s.text) : t.push(r);
|
|
48560
|
+
continue;
|
|
48561
|
+
}
|
|
48562
|
+
if (r = this.tokenizer.fences(e)) {
|
|
48563
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
48564
|
+
continue;
|
|
48565
|
+
}
|
|
48566
|
+
if (r = this.tokenizer.heading(e)) {
|
|
48567
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
48568
|
+
continue;
|
|
48569
|
+
}
|
|
48570
|
+
if (r = this.tokenizer.hr(e)) {
|
|
48571
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
48572
|
+
continue;
|
|
48573
|
+
}
|
|
48574
|
+
if (r = this.tokenizer.blockquote(e)) {
|
|
48575
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
48576
|
+
continue;
|
|
48577
|
+
}
|
|
48578
|
+
if (r = this.tokenizer.list(e)) {
|
|
48579
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
48580
|
+
continue;
|
|
48581
|
+
}
|
|
48582
|
+
if (r = this.tokenizer.html(e)) {
|
|
48583
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
48584
|
+
continue;
|
|
48585
|
+
}
|
|
48586
|
+
if (r = this.tokenizer.def(e)) {
|
|
48587
|
+
e = e.substring(r.raw.length);
|
|
48588
|
+
let s = t.at(-1);
|
|
48589
|
+
s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
|
|
48590
|
+
`) ? "" : `
|
|
48591
|
+
`) + r.raw, s.text += `
|
|
48592
|
+
` + r.raw, this.inlineQueue.at(-1).src = s.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = { href: r.href, title: r.title }, t.push(r));
|
|
48593
|
+
continue;
|
|
48594
|
+
}
|
|
48595
|
+
if (r = this.tokenizer.table(e)) {
|
|
48596
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
48597
|
+
continue;
|
|
48598
|
+
}
|
|
48599
|
+
if (r = this.tokenizer.lheading(e)) {
|
|
48600
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
48601
|
+
continue;
|
|
48602
|
+
}
|
|
48603
|
+
let i = e;
|
|
48604
|
+
if (this.options.extensions?.startBlock) {
|
|
48605
|
+
let s = 1 / 0, a = e.slice(1), o;
|
|
48606
|
+
this.options.extensions.startBlock.forEach((l) => {
|
|
48607
|
+
o = l.call({ lexer: this }, a), typeof o == "number" && o >= 0 && (s = Math.min(s, o));
|
|
48608
|
+
}), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
|
|
48609
|
+
}
|
|
48610
|
+
if (this.state.top && (r = this.tokenizer.paragraph(i))) {
|
|
48611
|
+
let s = t.at(-1);
|
|
48612
|
+
n && s?.type === "paragraph" ? (s.raw += (s.raw.endsWith(`
|
|
48613
|
+
`) ? "" : `
|
|
48614
|
+
`) + r.raw, s.text += `
|
|
48615
|
+
` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r), n = i.length !== e.length, e = e.substring(r.raw.length);
|
|
48616
|
+
continue;
|
|
48617
|
+
}
|
|
48618
|
+
if (r = this.tokenizer.text(e)) {
|
|
48619
|
+
e = e.substring(r.raw.length);
|
|
48620
|
+
let s = t.at(-1);
|
|
48621
|
+
s?.type === "text" ? (s.raw += (s.raw.endsWith(`
|
|
48622
|
+
`) ? "" : `
|
|
48623
|
+
`) + r.raw, s.text += `
|
|
48624
|
+
` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r);
|
|
48625
|
+
continue;
|
|
48626
|
+
}
|
|
48627
|
+
if (e) {
|
|
48628
|
+
let s = "Infinite loop on byte: " + e.charCodeAt(0);
|
|
48629
|
+
if (this.options.silent) {
|
|
48630
|
+
console.error(s);
|
|
48631
|
+
break;
|
|
48632
|
+
} else throw new Error(s);
|
|
48633
|
+
}
|
|
48634
|
+
}
|
|
48635
|
+
return this.state.top = true, t;
|
|
48636
|
+
}
|
|
48637
|
+
inline(e, t = []) {
|
|
48638
|
+
return this.inlineQueue.push({ src: e, tokens: t }), t;
|
|
48639
|
+
}
|
|
48640
|
+
inlineTokens(e, t = []) {
|
|
48641
|
+
this.tokenizer.lexer = this;
|
|
48642
|
+
let n = e, r = null;
|
|
48643
|
+
if (this.tokens.links) {
|
|
48644
|
+
let o = Object.keys(this.tokens.links);
|
|
48645
|
+
if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null; ) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
48646
|
+
}
|
|
48647
|
+
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
48648
|
+
let i;
|
|
48649
|
+
for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
48650
|
+
n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
48651
|
+
let s = false, a = "";
|
|
48652
|
+
for (; e; ) {
|
|
48653
|
+
s || (a = ""), s = false;
|
|
48654
|
+
let o;
|
|
48655
|
+
if (this.options.extensions?.inline?.some((p) => (o = p.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
|
|
48656
|
+
if (o = this.tokenizer.escape(e)) {
|
|
48657
|
+
e = e.substring(o.raw.length), t.push(o);
|
|
48658
|
+
continue;
|
|
48659
|
+
}
|
|
48660
|
+
if (o = this.tokenizer.tag(e)) {
|
|
48661
|
+
e = e.substring(o.raw.length), t.push(o);
|
|
48662
|
+
continue;
|
|
48663
|
+
}
|
|
48664
|
+
if (o = this.tokenizer.link(e)) {
|
|
48665
|
+
e = e.substring(o.raw.length), t.push(o);
|
|
48666
|
+
continue;
|
|
48667
|
+
}
|
|
48668
|
+
if (o = this.tokenizer.reflink(e, this.tokens.links)) {
|
|
48669
|
+
e = e.substring(o.raw.length);
|
|
48670
|
+
let p = t.at(-1);
|
|
48671
|
+
o.type === "text" && p?.type === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
|
|
48672
|
+
continue;
|
|
48673
|
+
}
|
|
48674
|
+
if (o = this.tokenizer.emStrong(e, n, a)) {
|
|
48675
|
+
e = e.substring(o.raw.length), t.push(o);
|
|
48676
|
+
continue;
|
|
48677
|
+
}
|
|
48678
|
+
if (o = this.tokenizer.codespan(e)) {
|
|
48679
|
+
e = e.substring(o.raw.length), t.push(o);
|
|
48680
|
+
continue;
|
|
48681
|
+
}
|
|
48682
|
+
if (o = this.tokenizer.br(e)) {
|
|
48683
|
+
e = e.substring(o.raw.length), t.push(o);
|
|
48684
|
+
continue;
|
|
48685
|
+
}
|
|
48686
|
+
if (o = this.tokenizer.del(e, n, a)) {
|
|
48687
|
+
e = e.substring(o.raw.length), t.push(o);
|
|
48688
|
+
continue;
|
|
48689
|
+
}
|
|
48690
|
+
if (o = this.tokenizer.autolink(e)) {
|
|
48691
|
+
e = e.substring(o.raw.length), t.push(o);
|
|
48692
|
+
continue;
|
|
48693
|
+
}
|
|
48694
|
+
if (!this.state.inLink && (o = this.tokenizer.url(e))) {
|
|
48695
|
+
e = e.substring(o.raw.length), t.push(o);
|
|
48696
|
+
continue;
|
|
48697
|
+
}
|
|
48698
|
+
let l = e;
|
|
48699
|
+
if (this.options.extensions?.startInline) {
|
|
48700
|
+
let p = 1 / 0, c = e.slice(1), d;
|
|
48701
|
+
this.options.extensions.startInline.forEach((h) => {
|
|
48702
|
+
d = h.call({ lexer: this }, c), typeof d == "number" && d >= 0 && (p = Math.min(p, d));
|
|
48703
|
+
}), p < 1 / 0 && p >= 0 && (l = e.substring(0, p + 1));
|
|
48704
|
+
}
|
|
48705
|
+
if (o = this.tokenizer.inlineText(l)) {
|
|
48706
|
+
e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), s = true;
|
|
48707
|
+
let p = t.at(-1);
|
|
48708
|
+
p?.type === "text" ? (p.raw += o.raw, p.text += o.text) : t.push(o);
|
|
48709
|
+
continue;
|
|
48710
|
+
}
|
|
48711
|
+
if (e) {
|
|
48712
|
+
let p = "Infinite loop on byte: " + e.charCodeAt(0);
|
|
48713
|
+
if (this.options.silent) {
|
|
48714
|
+
console.error(p);
|
|
48715
|
+
break;
|
|
48716
|
+
} else throw new Error(p);
|
|
48717
|
+
}
|
|
48718
|
+
}
|
|
48719
|
+
return t;
|
|
48720
|
+
}
|
|
48721
|
+
};
|
|
48722
|
+
var y = class {
|
|
48723
|
+
options;
|
|
48724
|
+
parser;
|
|
48725
|
+
constructor(e) {
|
|
48726
|
+
this.options = e || T;
|
|
48727
|
+
}
|
|
48728
|
+
space(e) {
|
|
48729
|
+
return "";
|
|
48730
|
+
}
|
|
48731
|
+
code({ text: e, lang: t, escaped: n }) {
|
|
48732
|
+
let r = (t || "").match(m.notSpaceStart)?.[0], i = e.replace(m.endingNewline, "") + `
|
|
48733
|
+
`;
|
|
48734
|
+
return r ? '<pre><code class="language-' + O(r) + '">' + (n ? i : O(i, true)) + `</code></pre>
|
|
48735
|
+
` : "<pre><code>" + (n ? i : O(i, true)) + `</code></pre>
|
|
48736
|
+
`;
|
|
48737
|
+
}
|
|
48738
|
+
blockquote({ tokens: e }) {
|
|
48739
|
+
return `<blockquote>
|
|
48740
|
+
${this.parser.parse(e)}</blockquote>
|
|
48741
|
+
`;
|
|
48742
|
+
}
|
|
48743
|
+
html({ text: e }) {
|
|
48744
|
+
return e;
|
|
48745
|
+
}
|
|
48746
|
+
def(e) {
|
|
48747
|
+
return "";
|
|
48748
|
+
}
|
|
48749
|
+
heading({ tokens: e, depth: t }) {
|
|
48750
|
+
return `<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
48751
|
+
`;
|
|
48752
|
+
}
|
|
48753
|
+
hr(e) {
|
|
48754
|
+
return `<hr>
|
|
48755
|
+
`;
|
|
48756
|
+
}
|
|
48757
|
+
list(e) {
|
|
48758
|
+
let t = e.ordered, n = e.start, r = "";
|
|
48759
|
+
for (let a = 0; a < e.items.length; a++) {
|
|
48760
|
+
let o = e.items[a];
|
|
48761
|
+
r += this.listitem(o);
|
|
48762
|
+
}
|
|
48763
|
+
let i = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : "";
|
|
48764
|
+
return "<" + i + s + `>
|
|
48765
|
+
` + r + "</" + i + `>
|
|
48766
|
+
`;
|
|
48767
|
+
}
|
|
48768
|
+
listitem(e) {
|
|
48769
|
+
return `<li>${this.parser.parse(e.tokens)}</li>
|
|
48770
|
+
`;
|
|
48771
|
+
}
|
|
48772
|
+
checkbox({ checked: e }) {
|
|
48773
|
+
return "<input " + (e ? 'checked="" ' : "") + 'disabled="" type="checkbox"> ';
|
|
48774
|
+
}
|
|
48775
|
+
paragraph({ tokens: e }) {
|
|
48776
|
+
return `<p>${this.parser.parseInline(e)}</p>
|
|
48777
|
+
`;
|
|
48778
|
+
}
|
|
48779
|
+
table(e) {
|
|
48780
|
+
let t = "", n = "";
|
|
48781
|
+
for (let i = 0; i < e.header.length; i++) n += this.tablecell(e.header[i]);
|
|
48782
|
+
t += this.tablerow({ text: n });
|
|
48783
|
+
let r = "";
|
|
48784
|
+
for (let i = 0; i < e.rows.length; i++) {
|
|
48785
|
+
let s = e.rows[i];
|
|
48786
|
+
n = "";
|
|
48787
|
+
for (let a = 0; a < s.length; a++) n += this.tablecell(s[a]);
|
|
48788
|
+
r += this.tablerow({ text: n });
|
|
48789
|
+
}
|
|
48790
|
+
return r && (r = `<tbody>${r}</tbody>`), `<table>
|
|
48791
|
+
<thead>
|
|
48792
|
+
` + t + `</thead>
|
|
48793
|
+
` + r + `</table>
|
|
48794
|
+
`;
|
|
48795
|
+
}
|
|
48796
|
+
tablerow({ text: e }) {
|
|
48797
|
+
return `<tr>
|
|
48798
|
+
${e}</tr>
|
|
48799
|
+
`;
|
|
48800
|
+
}
|
|
48801
|
+
tablecell(e) {
|
|
48802
|
+
let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
|
|
48803
|
+
return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
|
|
48804
|
+
`;
|
|
48805
|
+
}
|
|
48806
|
+
strong({ tokens: e }) {
|
|
48807
|
+
return `<strong>${this.parser.parseInline(e)}</strong>`;
|
|
48808
|
+
}
|
|
48809
|
+
em({ tokens: e }) {
|
|
48810
|
+
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
48811
|
+
}
|
|
48812
|
+
codespan({ text: e }) {
|
|
48813
|
+
return `<code>${O(e, true)}</code>`;
|
|
48814
|
+
}
|
|
48815
|
+
br(e) {
|
|
48816
|
+
return "<br>";
|
|
48817
|
+
}
|
|
48818
|
+
del({ tokens: e }) {
|
|
48819
|
+
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
48820
|
+
}
|
|
48821
|
+
link({ href: e, title: t, tokens: n }) {
|
|
48822
|
+
let r = this.parser.parseInline(n), i = J(e);
|
|
48823
|
+
if (i === null) return r;
|
|
48824
|
+
e = i;
|
|
48825
|
+
let s = '<a href="' + e + '"';
|
|
48826
|
+
return t && (s += ' title="' + O(t) + '"'), s += ">" + r + "</a>", s;
|
|
48827
|
+
}
|
|
48828
|
+
image({ href: e, title: t, text: n, tokens: r }) {
|
|
48829
|
+
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
48830
|
+
let i = J(e);
|
|
48831
|
+
if (i === null) return O(n);
|
|
48832
|
+
e = i;
|
|
48833
|
+
let s = `<img src="${e}" alt="${O(n)}"`;
|
|
48834
|
+
return t && (s += ` title="${O(t)}"`), s += ">", s;
|
|
48835
|
+
}
|
|
48836
|
+
text(e) {
|
|
48837
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : O(e.text);
|
|
48838
|
+
}
|
|
48839
|
+
};
|
|
48840
|
+
var $ = class {
|
|
48841
|
+
strong({ text: e }) {
|
|
48842
|
+
return e;
|
|
48843
|
+
}
|
|
48844
|
+
em({ text: e }) {
|
|
48845
|
+
return e;
|
|
48846
|
+
}
|
|
48847
|
+
codespan({ text: e }) {
|
|
48848
|
+
return e;
|
|
48849
|
+
}
|
|
48850
|
+
del({ text: e }) {
|
|
48851
|
+
return e;
|
|
48852
|
+
}
|
|
48853
|
+
html({ text: e }) {
|
|
48854
|
+
return e;
|
|
48855
|
+
}
|
|
48856
|
+
text({ text: e }) {
|
|
48857
|
+
return e;
|
|
48858
|
+
}
|
|
48859
|
+
link({ text: e }) {
|
|
48860
|
+
return "" + e;
|
|
48861
|
+
}
|
|
48862
|
+
image({ text: e }) {
|
|
48863
|
+
return "" + e;
|
|
48864
|
+
}
|
|
48865
|
+
br() {
|
|
48866
|
+
return "";
|
|
48867
|
+
}
|
|
48868
|
+
checkbox({ raw: e }) {
|
|
48869
|
+
return e;
|
|
48870
|
+
}
|
|
48871
|
+
};
|
|
48872
|
+
var b = class u2 {
|
|
48873
|
+
options;
|
|
48874
|
+
renderer;
|
|
48875
|
+
textRenderer;
|
|
48876
|
+
constructor(e) {
|
|
48877
|
+
this.options = e || T, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
|
|
48878
|
+
}
|
|
48879
|
+
static parse(e, t) {
|
|
48880
|
+
return new u2(t).parse(e);
|
|
48881
|
+
}
|
|
48882
|
+
static parseInline(e, t) {
|
|
48883
|
+
return new u2(t).parseInline(e);
|
|
48884
|
+
}
|
|
48885
|
+
parse(e) {
|
|
48886
|
+
this.renderer.parser = this;
|
|
48887
|
+
let t = "";
|
|
48888
|
+
for (let n = 0; n < e.length; n++) {
|
|
48889
|
+
let r = e[n];
|
|
48890
|
+
if (this.options.extensions?.renderers?.[r.type]) {
|
|
48891
|
+
let s = r, a = this.options.extensions.renderers[s.type].call({ parser: this }, s);
|
|
48892
|
+
if (a !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(s.type)) {
|
|
48893
|
+
t += a || "";
|
|
48894
|
+
continue;
|
|
48895
|
+
}
|
|
48896
|
+
}
|
|
48897
|
+
let i = r;
|
|
48898
|
+
switch (i.type) {
|
|
48899
|
+
case "space": {
|
|
48900
|
+
t += this.renderer.space(i);
|
|
48901
|
+
break;
|
|
48902
|
+
}
|
|
48903
|
+
case "hr": {
|
|
48904
|
+
t += this.renderer.hr(i);
|
|
48905
|
+
break;
|
|
48906
|
+
}
|
|
48907
|
+
case "heading": {
|
|
48908
|
+
t += this.renderer.heading(i);
|
|
48909
|
+
break;
|
|
48910
|
+
}
|
|
48911
|
+
case "code": {
|
|
48912
|
+
t += this.renderer.code(i);
|
|
48913
|
+
break;
|
|
48914
|
+
}
|
|
48915
|
+
case "table": {
|
|
48916
|
+
t += this.renderer.table(i);
|
|
48917
|
+
break;
|
|
48918
|
+
}
|
|
48919
|
+
case "blockquote": {
|
|
48920
|
+
t += this.renderer.blockquote(i);
|
|
48921
|
+
break;
|
|
48922
|
+
}
|
|
48923
|
+
case "list": {
|
|
48924
|
+
t += this.renderer.list(i);
|
|
48925
|
+
break;
|
|
48926
|
+
}
|
|
48927
|
+
case "checkbox": {
|
|
48928
|
+
t += this.renderer.checkbox(i);
|
|
48929
|
+
break;
|
|
48930
|
+
}
|
|
48931
|
+
case "html": {
|
|
48932
|
+
t += this.renderer.html(i);
|
|
48933
|
+
break;
|
|
48934
|
+
}
|
|
48935
|
+
case "def": {
|
|
48936
|
+
t += this.renderer.def(i);
|
|
48937
|
+
break;
|
|
48938
|
+
}
|
|
48939
|
+
case "paragraph": {
|
|
48940
|
+
t += this.renderer.paragraph(i);
|
|
48941
|
+
break;
|
|
48942
|
+
}
|
|
48943
|
+
case "text": {
|
|
48944
|
+
t += this.renderer.text(i);
|
|
48945
|
+
break;
|
|
48946
|
+
}
|
|
48947
|
+
default: {
|
|
48948
|
+
let s = 'Token with "' + i.type + '" type was not found.';
|
|
48949
|
+
if (this.options.silent) return console.error(s), "";
|
|
48950
|
+
throw new Error(s);
|
|
48951
|
+
}
|
|
48952
|
+
}
|
|
48953
|
+
}
|
|
48954
|
+
return t;
|
|
48955
|
+
}
|
|
48956
|
+
parseInline(e, t = this.renderer) {
|
|
48957
|
+
this.renderer.parser = this;
|
|
48958
|
+
let n = "";
|
|
48959
|
+
for (let r = 0; r < e.length; r++) {
|
|
48960
|
+
let i = e[r];
|
|
48961
|
+
if (this.options.extensions?.renderers?.[i.type]) {
|
|
48962
|
+
let a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
|
|
48963
|
+
if (a !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
|
|
48964
|
+
n += a || "";
|
|
48965
|
+
continue;
|
|
48966
|
+
}
|
|
48967
|
+
}
|
|
48968
|
+
let s = i;
|
|
48969
|
+
switch (s.type) {
|
|
48970
|
+
case "escape": {
|
|
48971
|
+
n += t.text(s);
|
|
48972
|
+
break;
|
|
48973
|
+
}
|
|
48974
|
+
case "html": {
|
|
48975
|
+
n += t.html(s);
|
|
48976
|
+
break;
|
|
48977
|
+
}
|
|
48978
|
+
case "link": {
|
|
48979
|
+
n += t.link(s);
|
|
48980
|
+
break;
|
|
48981
|
+
}
|
|
48982
|
+
case "image": {
|
|
48983
|
+
n += t.image(s);
|
|
48984
|
+
break;
|
|
48985
|
+
}
|
|
48986
|
+
case "checkbox": {
|
|
48987
|
+
n += t.checkbox(s);
|
|
48988
|
+
break;
|
|
48989
|
+
}
|
|
48990
|
+
case "strong": {
|
|
48991
|
+
n += t.strong(s);
|
|
48992
|
+
break;
|
|
48993
|
+
}
|
|
48994
|
+
case "em": {
|
|
48995
|
+
n += t.em(s);
|
|
48996
|
+
break;
|
|
48997
|
+
}
|
|
48998
|
+
case "codespan": {
|
|
48999
|
+
n += t.codespan(s);
|
|
49000
|
+
break;
|
|
49001
|
+
}
|
|
49002
|
+
case "br": {
|
|
49003
|
+
n += t.br(s);
|
|
49004
|
+
break;
|
|
49005
|
+
}
|
|
49006
|
+
case "del": {
|
|
49007
|
+
n += t.del(s);
|
|
49008
|
+
break;
|
|
49009
|
+
}
|
|
49010
|
+
case "text": {
|
|
49011
|
+
n += t.text(s);
|
|
49012
|
+
break;
|
|
49013
|
+
}
|
|
49014
|
+
default: {
|
|
49015
|
+
let a = 'Token with "' + s.type + '" type was not found.';
|
|
49016
|
+
if (this.options.silent) return console.error(a), "";
|
|
49017
|
+
throw new Error(a);
|
|
49018
|
+
}
|
|
49019
|
+
}
|
|
49020
|
+
}
|
|
49021
|
+
return n;
|
|
49022
|
+
}
|
|
49023
|
+
};
|
|
49024
|
+
var P = class {
|
|
49025
|
+
options;
|
|
49026
|
+
block;
|
|
49027
|
+
constructor(e) {
|
|
49028
|
+
this.options = e || T;
|
|
49029
|
+
}
|
|
49030
|
+
static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
|
|
49031
|
+
static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
|
|
49032
|
+
preprocess(e) {
|
|
49033
|
+
return e;
|
|
49034
|
+
}
|
|
49035
|
+
postprocess(e) {
|
|
49036
|
+
return e;
|
|
49037
|
+
}
|
|
49038
|
+
processAllTokens(e) {
|
|
49039
|
+
return e;
|
|
49040
|
+
}
|
|
49041
|
+
emStrongMask(e) {
|
|
49042
|
+
return e;
|
|
49043
|
+
}
|
|
49044
|
+
provideLexer() {
|
|
49045
|
+
return this.block ? x.lex : x.lexInline;
|
|
49046
|
+
}
|
|
49047
|
+
provideParser() {
|
|
49048
|
+
return this.block ? b.parse : b.parseInline;
|
|
49049
|
+
}
|
|
49050
|
+
};
|
|
49051
|
+
var D = class {
|
|
49052
|
+
defaults = M();
|
|
49053
|
+
options = this.setOptions;
|
|
49054
|
+
parse = this.parseMarkdown(true);
|
|
49055
|
+
parseInline = this.parseMarkdown(false);
|
|
49056
|
+
Parser = b;
|
|
49057
|
+
Renderer = y;
|
|
49058
|
+
TextRenderer = $;
|
|
49059
|
+
Lexer = x;
|
|
49060
|
+
Tokenizer = w;
|
|
49061
|
+
Hooks = P;
|
|
49062
|
+
constructor(...e) {
|
|
49063
|
+
this.use(...e);
|
|
49064
|
+
}
|
|
49065
|
+
walkTokens(e, t) {
|
|
49066
|
+
let n = [];
|
|
49067
|
+
for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
|
|
49068
|
+
case "table": {
|
|
49069
|
+
let i = r;
|
|
49070
|
+
for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
|
|
49071
|
+
for (let s of i.rows) for (let a of s) n = n.concat(this.walkTokens(a.tokens, t));
|
|
49072
|
+
break;
|
|
49073
|
+
}
|
|
49074
|
+
case "list": {
|
|
49075
|
+
let i = r;
|
|
49076
|
+
n = n.concat(this.walkTokens(i.items, t));
|
|
49077
|
+
break;
|
|
49078
|
+
}
|
|
49079
|
+
default: {
|
|
49080
|
+
let i = r;
|
|
49081
|
+
this.defaults.extensions?.childTokens?.[i.type] ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
|
|
49082
|
+
let a = i[s].flat(1 / 0);
|
|
49083
|
+
n = n.concat(this.walkTokens(a, t));
|
|
49084
|
+
}) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
|
|
49085
|
+
}
|
|
49086
|
+
}
|
|
49087
|
+
return n;
|
|
49088
|
+
}
|
|
49089
|
+
use(...e) {
|
|
49090
|
+
let t = this.defaults.extensions || { renderers: {}, childTokens: {} };
|
|
49091
|
+
return e.forEach((n) => {
|
|
49092
|
+
let r = { ...n };
|
|
49093
|
+
if (r.async = this.defaults.async || r.async || false, n.extensions && (n.extensions.forEach((i) => {
|
|
49094
|
+
if (!i.name) throw new Error("extension name required");
|
|
49095
|
+
if ("renderer" in i) {
|
|
49096
|
+
let s = t.renderers[i.name];
|
|
49097
|
+
s ? t.renderers[i.name] = function(...a) {
|
|
49098
|
+
let o = i.renderer.apply(this, a);
|
|
49099
|
+
return o === false && (o = s.apply(this, a)), o;
|
|
49100
|
+
} : t.renderers[i.name] = i.renderer;
|
|
49101
|
+
}
|
|
49102
|
+
if ("tokenizer" in i) {
|
|
49103
|
+
if (!i.level || i.level !== "block" && i.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
|
|
49104
|
+
let s = t[i.level];
|
|
49105
|
+
s ? s.unshift(i.tokenizer) : t[i.level] = [i.tokenizer], i.start && (i.level === "block" ? t.startBlock ? t.startBlock.push(i.start) : t.startBlock = [i.start] : i.level === "inline" && (t.startInline ? t.startInline.push(i.start) : t.startInline = [i.start]));
|
|
49106
|
+
}
|
|
49107
|
+
"childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
|
|
49108
|
+
}), r.extensions = t), n.renderer) {
|
|
49109
|
+
let i = this.defaults.renderer || new y(this.defaults);
|
|
49110
|
+
for (let s in n.renderer) {
|
|
49111
|
+
if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
|
|
49112
|
+
if (["options", "parser"].includes(s)) continue;
|
|
49113
|
+
let a = s, o = n.renderer[a], l = i[a];
|
|
49114
|
+
i[a] = (...p) => {
|
|
49115
|
+
let c = o.apply(i, p);
|
|
49116
|
+
return c === false && (c = l.apply(i, p)), c || "";
|
|
49117
|
+
};
|
|
49118
|
+
}
|
|
49119
|
+
r.renderer = i;
|
|
49120
|
+
}
|
|
49121
|
+
if (n.tokenizer) {
|
|
49122
|
+
let i = this.defaults.tokenizer || new w(this.defaults);
|
|
49123
|
+
for (let s in n.tokenizer) {
|
|
49124
|
+
if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
|
|
49125
|
+
if (["options", "rules", "lexer"].includes(s)) continue;
|
|
49126
|
+
let a = s, o = n.tokenizer[a], l = i[a];
|
|
49127
|
+
i[a] = (...p) => {
|
|
49128
|
+
let c = o.apply(i, p);
|
|
49129
|
+
return c === false && (c = l.apply(i, p)), c;
|
|
49130
|
+
};
|
|
49131
|
+
}
|
|
49132
|
+
r.tokenizer = i;
|
|
49133
|
+
}
|
|
49134
|
+
if (n.hooks) {
|
|
49135
|
+
let i = this.defaults.hooks || new P();
|
|
49136
|
+
for (let s in n.hooks) {
|
|
49137
|
+
if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
|
|
49138
|
+
if (["options", "block"].includes(s)) continue;
|
|
49139
|
+
let a = s, o = n.hooks[a], l = i[a];
|
|
49140
|
+
P.passThroughHooks.has(s) ? i[a] = (p) => {
|
|
49141
|
+
if (this.defaults.async && P.passThroughHooksRespectAsync.has(s)) return (async () => {
|
|
49142
|
+
let d = await o.call(i, p);
|
|
49143
|
+
return l.call(i, d);
|
|
49144
|
+
})();
|
|
49145
|
+
let c = o.call(i, p);
|
|
49146
|
+
return l.call(i, c);
|
|
49147
|
+
} : i[a] = (...p) => {
|
|
49148
|
+
if (this.defaults.async) return (async () => {
|
|
49149
|
+
let d = await o.apply(i, p);
|
|
49150
|
+
return d === false && (d = await l.apply(i, p)), d;
|
|
49151
|
+
})();
|
|
49152
|
+
let c = o.apply(i, p);
|
|
49153
|
+
return c === false && (c = l.apply(i, p)), c;
|
|
49154
|
+
};
|
|
49155
|
+
}
|
|
49156
|
+
r.hooks = i;
|
|
49157
|
+
}
|
|
49158
|
+
if (n.walkTokens) {
|
|
49159
|
+
let i = this.defaults.walkTokens, s = n.walkTokens;
|
|
49160
|
+
r.walkTokens = function(a) {
|
|
49161
|
+
let o = [];
|
|
49162
|
+
return o.push(s.call(this, a)), i && (o = o.concat(i.call(this, a))), o;
|
|
49163
|
+
};
|
|
49164
|
+
}
|
|
49165
|
+
this.defaults = { ...this.defaults, ...r };
|
|
49166
|
+
}), this;
|
|
49167
|
+
}
|
|
49168
|
+
setOptions(e) {
|
|
49169
|
+
return this.defaults = { ...this.defaults, ...e }, this;
|
|
49170
|
+
}
|
|
49171
|
+
lexer(e, t) {
|
|
49172
|
+
return x.lex(e, t ?? this.defaults);
|
|
49173
|
+
}
|
|
49174
|
+
parser(e, t) {
|
|
49175
|
+
return b.parse(e, t ?? this.defaults);
|
|
49176
|
+
}
|
|
49177
|
+
parseMarkdown(e) {
|
|
49178
|
+
return (n, r) => {
|
|
49179
|
+
let i = { ...r }, s = { ...this.defaults, ...i }, a = this.onError(!!s.silent, !!s.async);
|
|
49180
|
+
if (this.defaults.async === true && i.async === false) return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
|
|
49181
|
+
if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
|
|
49182
|
+
if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
49183
|
+
if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
|
|
49184
|
+
let o = s.hooks ? await s.hooks.preprocess(n) : n, p = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
|
|
49185
|
+
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
49186
|
+
let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
|
|
49187
|
+
return s.hooks ? await s.hooks.postprocess(h) : h;
|
|
49188
|
+
})().catch(a);
|
|
49189
|
+
try {
|
|
49190
|
+
s.hooks && (n = s.hooks.preprocess(n));
|
|
49191
|
+
let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
|
|
49192
|
+
s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
|
|
49193
|
+
let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
|
|
49194
|
+
return s.hooks && (c = s.hooks.postprocess(c)), c;
|
|
49195
|
+
} catch (o) {
|
|
49196
|
+
return a(o);
|
|
49197
|
+
}
|
|
49198
|
+
};
|
|
49199
|
+
}
|
|
49200
|
+
onError(e, t) {
|
|
49201
|
+
return (n) => {
|
|
49202
|
+
if (n.message += `
|
|
49203
|
+
Please report this to https://github.com/markedjs/marked.`, e) {
|
|
49204
|
+
let r = "<p>An error occurred:</p><pre>" + O(n.message + "", true) + "</pre>";
|
|
49205
|
+
return t ? Promise.resolve(r) : r;
|
|
49206
|
+
}
|
|
49207
|
+
if (t) return Promise.reject(n);
|
|
49208
|
+
throw n;
|
|
49209
|
+
};
|
|
49210
|
+
}
|
|
49211
|
+
};
|
|
49212
|
+
var L = new D();
|
|
49213
|
+
function g(u3, e) {
|
|
49214
|
+
return L.parse(u3, e);
|
|
49215
|
+
}
|
|
49216
|
+
g.options = g.setOptions = function(u3) {
|
|
49217
|
+
return L.setOptions(u3), g.defaults = L.defaults, G(g.defaults), g;
|
|
49218
|
+
};
|
|
49219
|
+
g.getDefaults = M;
|
|
49220
|
+
g.defaults = T;
|
|
49221
|
+
g.use = function(...u3) {
|
|
49222
|
+
return L.use(...u3), g.defaults = L.defaults, G(g.defaults), g;
|
|
49223
|
+
};
|
|
49224
|
+
g.walkTokens = function(u3, e) {
|
|
49225
|
+
return L.walkTokens(u3, e);
|
|
49226
|
+
};
|
|
49227
|
+
g.parseInline = L.parseInline;
|
|
49228
|
+
g.Parser = b;
|
|
49229
|
+
g.parser = b.parse;
|
|
49230
|
+
g.Renderer = y;
|
|
49231
|
+
g.TextRenderer = $;
|
|
49232
|
+
g.Lexer = x;
|
|
49233
|
+
g.lexer = x.lex;
|
|
49234
|
+
g.Tokenizer = w;
|
|
49235
|
+
g.Hooks = P;
|
|
49236
|
+
g.parse = g;
|
|
49237
|
+
var Qt = g.options;
|
|
49238
|
+
var jt = g.setOptions;
|
|
49239
|
+
var Ft = g.use;
|
|
49240
|
+
var Ut = g.walkTokens;
|
|
49241
|
+
var Kt = g.parseInline;
|
|
49242
|
+
var Xt = b.parse;
|
|
49243
|
+
var Jt = x.lex;
|
|
49244
|
+
|
|
48020
49245
|
// ../../node_modules/ulid/dist/node/index.js
|
|
48021
49246
|
var import_node_crypto = __toESM(require("node:crypto"), 1);
|
|
48022
49247
|
var ENCODING = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
@@ -48228,6 +49453,47 @@ function installBridge(win = window, options = {}) {
|
|
|
48228
49453
|
return;
|
|
48229
49454
|
}
|
|
48230
49455
|
bridgeWindow.__televisionArtifactBridgeInstalled = true;
|
|
49456
|
+
const capturedURL = win.location.href;
|
|
49457
|
+
const isTvArtifactURL = (url2) => {
|
|
49458
|
+
try {
|
|
49459
|
+
const parsed = new URL(url2);
|
|
49460
|
+
return /^\/artifact\/[0-9A-Za-z]{26}(\/|$)/.test(parsed.pathname);
|
|
49461
|
+
} catch {
|
|
49462
|
+
return false;
|
|
49463
|
+
}
|
|
49464
|
+
};
|
|
49465
|
+
if (isTvArtifactURL(capturedURL) && typeof win.fetch === "function") {
|
|
49466
|
+
const NORMAL_POLL_MS = 5e3;
|
|
49467
|
+
const SLOW_POLL_MS = 15e3;
|
|
49468
|
+
let baselineETag = null;
|
|
49469
|
+
let delayMs = NORMAL_POLL_MS;
|
|
49470
|
+
let stopped = false;
|
|
49471
|
+
const poll = () => {
|
|
49472
|
+
void (async () => {
|
|
49473
|
+
try {
|
|
49474
|
+
const response = await win.fetch(capturedURL, { method: "HEAD" });
|
|
49475
|
+
if (!response.ok) throw new Error("Artifact poll failed");
|
|
49476
|
+
const etag = response.headers.get("ETag");
|
|
49477
|
+
if (!etag) throw new Error("Artifact poll missing ETag");
|
|
49478
|
+
delayMs = NORMAL_POLL_MS;
|
|
49479
|
+
if (baselineETag === null) {
|
|
49480
|
+
baselineETag = etag;
|
|
49481
|
+
} else if (etag !== baselineETag) {
|
|
49482
|
+
baselineETag = etag;
|
|
49483
|
+
win.parent.postMessage({ type: "proxy-content-changed" }, "*");
|
|
49484
|
+
}
|
|
49485
|
+
} catch {
|
|
49486
|
+
delayMs = Math.min(SLOW_POLL_MS, delayMs * 2);
|
|
49487
|
+
} finally {
|
|
49488
|
+
if (!stopped) win.setTimeout(poll, delayMs);
|
|
49489
|
+
}
|
|
49490
|
+
})();
|
|
49491
|
+
};
|
|
49492
|
+
win.addEventListener("pagehide", () => {
|
|
49493
|
+
stopped = true;
|
|
49494
|
+
});
|
|
49495
|
+
poll();
|
|
49496
|
+
}
|
|
48231
49497
|
const containRootOverscroll = () => {
|
|
48232
49498
|
if (win.document.documentElement) {
|
|
48233
49499
|
win.document.documentElement.style.touchAction = "pan-y";
|
|
@@ -48515,6 +49781,7 @@ function bridgeScriptSource() {
|
|
|
48515
49781
|
}
|
|
48516
49782
|
|
|
48517
49783
|
// ../server/src/artifact-proxy.ts
|
|
49784
|
+
var HTTP_OK2 = 200;
|
|
48518
49785
|
var HTTP_MOVED_PERMANENTLY = 301;
|
|
48519
49786
|
var HTTP_NOT_MODIFIED = 304;
|
|
48520
49787
|
var HTTP_NOT_FOUND = 404;
|
|
@@ -48620,6 +49887,57 @@ function sendInjectedHTML(req, res, stream, resolvedPath, stat) {
|
|
|
48620
49887
|
}
|
|
48621
49888
|
})();
|
|
48622
49889
|
}
|
|
49890
|
+
function markdownDocument(renderedHTML) {
|
|
49891
|
+
return `<!doctype html>
|
|
49892
|
+
<html>
|
|
49893
|
+
<head>
|
|
49894
|
+
<meta charset="utf-8">
|
|
49895
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
49896
|
+
<link rel="stylesheet" href="/canonical/v1/styles.css">
|
|
49897
|
+
<style>
|
|
49898
|
+
/*
|
|
49899
|
+
* The canonical stylesheet intentionally leaves page-level padding to
|
|
49900
|
+
* each artifact's own HTML. Server-rendered markdown has no authored
|
|
49901
|
+
* wrapper, so supply that page padding here (token from the canonical
|
|
49902
|
+
* stylesheet, with a px fallback matching the house examples).
|
|
49903
|
+
*/
|
|
49904
|
+
body {
|
|
49905
|
+
padding: var(--space-32, 32px);
|
|
49906
|
+
}
|
|
49907
|
+
</style>
|
|
49908
|
+
</head>
|
|
49909
|
+
<body>
|
|
49910
|
+
${renderedHTML}
|
|
49911
|
+
</body>
|
|
49912
|
+
</html>`;
|
|
49913
|
+
}
|
|
49914
|
+
function sendRenderedMarkdown(req, res, resolvedPath, stat) {
|
|
49915
|
+
void (async () => {
|
|
49916
|
+
try {
|
|
49917
|
+
const source = await (0, import_promises2.readFile)(resolvedPath, "utf8");
|
|
49918
|
+
const bridgeSource = bridgeScriptSource();
|
|
49919
|
+
const etag = injectedETag(stat, Buffer.from(source + markdownDocument("")), bridgeSource);
|
|
49920
|
+
applyProxyHeaders(res);
|
|
49921
|
+
res.status(HTTP_OK2).type("text/html; charset=utf-8");
|
|
49922
|
+
res.setHeader("Cache-Control", HTML_CACHE_CONTROL);
|
|
49923
|
+
res.setHeader("ETag", etag);
|
|
49924
|
+
if (req.headers["if-none-match"] === etag) {
|
|
49925
|
+
res.status(HTTP_NOT_MODIFIED).end();
|
|
49926
|
+
return;
|
|
49927
|
+
}
|
|
49928
|
+
if (req.method === "HEAD") {
|
|
49929
|
+
res.end();
|
|
49930
|
+
return;
|
|
49931
|
+
}
|
|
49932
|
+
const rendered = g.parse(source, { async: false });
|
|
49933
|
+
const body = appendBridge(Buffer.from(markdownDocument(rendered)), bridgeSource);
|
|
49934
|
+
res.setHeader("Content-Length", String(body.byteLength));
|
|
49935
|
+
res.end(body);
|
|
49936
|
+
} catch {
|
|
49937
|
+
sendNotFound(res);
|
|
49938
|
+
}
|
|
49939
|
+
})();
|
|
49940
|
+
}
|
|
48623
49941
|
function pipeWithInjection(req, res, subpath, options, notFound) {
|
|
48624
49942
|
applyProxyHeaders(res);
|
|
48625
49943
|
const stream = (0, import_send.default)(req, subpath, { ...options, etag: true });
|
|
@@ -48685,6 +50003,33 @@ function serveFileArtifact(req, res, store, artifact, subpath) {
|
|
|
48685
50003
|
}
|
|
48686
50004
|
pipeWithInjection(req, res, subpath, { root: import_node_path3.default.dirname(artifact.path), index: false, dotfiles: "allow" }, () => sendArtifactNotFound(req, res, store));
|
|
48687
50005
|
}
|
|
50006
|
+
function serveMarkdownArtifact(req, res, store, artifact, subpath) {
|
|
50007
|
+
const basename = artifactBasename(artifact.path);
|
|
50008
|
+
const canonical = proxyFilePath(artifact.id, basename);
|
|
50009
|
+
let stat;
|
|
50010
|
+
try {
|
|
50011
|
+
stat = import_node_fs3.default.statSync(artifact.path);
|
|
50012
|
+
} catch {
|
|
50013
|
+
if (subpath === `/${encodeURIComponent(basename)}`) sendArtifactNotFound(req, res, store);
|
|
50014
|
+
else sendNotFound(res);
|
|
50015
|
+
return;
|
|
50016
|
+
}
|
|
50017
|
+
if (!stat.isFile()) {
|
|
50018
|
+
if (subpath === `/${encodeURIComponent(basename)}`) sendArtifactNotFound(req, res, store);
|
|
50019
|
+
else sendNotFound(res);
|
|
50020
|
+
return;
|
|
50021
|
+
}
|
|
50022
|
+
if (subpath === "" || subpath === "/") {
|
|
50023
|
+
applyProxyHeaders(res);
|
|
50024
|
+
res.redirect(HTTP_MOVED_PERMANENTLY, canonical);
|
|
50025
|
+
return;
|
|
50026
|
+
}
|
|
50027
|
+
if (subpath !== `/${encodeURIComponent(basename)}`) {
|
|
50028
|
+
sendNotFound(res);
|
|
50029
|
+
return;
|
|
50030
|
+
}
|
|
50031
|
+
sendRenderedMarkdown(req, res, artifact.path, stat);
|
|
50032
|
+
}
|
|
48688
50033
|
function serveArtifactProxy(store) {
|
|
48689
50034
|
return (req, res) => {
|
|
48690
50035
|
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
@@ -48698,11 +50043,12 @@ function serveArtifactProxy(store) {
|
|
|
48698
50043
|
}
|
|
48699
50044
|
const artifact = store.getArtifact(rawID);
|
|
48700
50045
|
const subpath = requestSubpath(req.originalUrl, rawID);
|
|
48701
|
-
if (!artifact || artifact.kind !== "path" || subpath === null
|
|
50046
|
+
if (!artifact || artifact.kind !== "path" || subpath === null) {
|
|
48702
50047
|
sendNotFound(res);
|
|
48703
50048
|
return;
|
|
48704
50049
|
}
|
|
48705
|
-
if (
|
|
50050
|
+
if (isMarkdownPath(artifact.path)) serveMarkdownArtifact(req, res, store, artifact, subpath);
|
|
50051
|
+
else if (hasTrailingSeparator(artifact.path)) serveDirectoryArtifact(req, res, store, artifact, subpath);
|
|
48706
50052
|
else serveFileArtifact(req, res, store, artifact, subpath);
|
|
48707
50053
|
};
|
|
48708
50054
|
}
|
|
@@ -48900,7 +50246,7 @@ var patchDisplaySchema = external_exports.object({
|
|
|
48900
50246
|
var focusSchema = external_exports.object({
|
|
48901
50247
|
artifactID: external_exports.string()
|
|
48902
50248
|
}).strict();
|
|
48903
|
-
var
|
|
50249
|
+
var HTTP_OK3 = 200;
|
|
48904
50250
|
var HTTP_CREATED = 201;
|
|
48905
50251
|
var HTTP_NO_CONTENT2 = 204;
|
|
48906
50252
|
var HTTP_BAD_REQUEST = 400;
|
|
@@ -49098,7 +50444,7 @@ function registerRoutes(app, store, options) {
|
|
|
49098
50444
|
}
|
|
49099
50445
|
try {
|
|
49100
50446
|
const result = store.focus({ artifactID: parsed.data.artifactID });
|
|
49101
|
-
res.status(
|
|
50447
|
+
res.status(HTTP_OK3).json(result);
|
|
49102
50448
|
} catch (error48) {
|
|
49103
50449
|
handleStoreError(res, error48, "Failed to focus artifact");
|
|
49104
50450
|
}
|
|
@@ -49799,6 +51145,7 @@ var Server = class {
|
|
|
49799
51145
|
authMode;
|
|
49800
51146
|
bindAddresses;
|
|
49801
51147
|
bindFailures = [];
|
|
51148
|
+
listeningPort;
|
|
49802
51149
|
baseURLs;
|
|
49803
51150
|
disposed = false;
|
|
49804
51151
|
constructor(options) {
|
|
@@ -49807,12 +51154,17 @@ var Server = class {
|
|
|
49807
51154
|
this.authRequired = options.auth ?? false;
|
|
49808
51155
|
this.authMode = options.auth === true ? "auth" : options.auth === false ? "no-auth" : "none";
|
|
49809
51156
|
this.bindAddresses = resolveBindAddresses(options.host ? [options.host] : options.listen);
|
|
51157
|
+
this.listeningPort = this.port;
|
|
49810
51158
|
this.baseURLs = [];
|
|
49811
51159
|
this.app = (0, import_express2.default)();
|
|
49812
51160
|
this.httpServers = this.bindAddresses.map(() => import_node_http.default.createServer(this.app));
|
|
49813
51161
|
this.httpServer = this.httpServers[0];
|
|
49814
51162
|
this.app.get("/health", (_req, res) => {
|
|
49815
|
-
res.json({
|
|
51163
|
+
res.json({
|
|
51164
|
+
status: "ok",
|
|
51165
|
+
bindAddresses: this.bindAddresses,
|
|
51166
|
+
port: this.getListeningPort()
|
|
51167
|
+
});
|
|
49816
51168
|
});
|
|
49817
51169
|
this.app.use(import_express2.default.json());
|
|
49818
51170
|
this.events = new EventStreamServer({
|
|
@@ -49877,6 +51229,7 @@ var Server = class {
|
|
|
49877
51229
|
if (typeof serverAddress === "object" && serverAddress) {
|
|
49878
51230
|
resolvedPort = serverAddress.port;
|
|
49879
51231
|
}
|
|
51232
|
+
this.listeningPort = resolvedPort;
|
|
49880
51233
|
const baseURL = buildServerURL(address, resolvedPort);
|
|
49881
51234
|
this.baseURLs.push(baseURL);
|
|
49882
51235
|
log(this.store.storagePath, `bound ${address}:${resolvedPort}`, { address, port: resolvedPort, baseURL });
|
|
@@ -49896,10 +51249,12 @@ var Server = class {
|
|
|
49896
51249
|
if (!this.authRequired) {
|
|
49897
51250
|
log(this.store.storagePath, "server running without bearer-token enforcement", { authMode: this.authMode });
|
|
49898
51251
|
const nonLoopbackBoundAddresses = this.getNonLoopbackBoundAddresses();
|
|
51252
|
+
process.stderr.write(
|
|
51253
|
+
"WARNING: running without an auth token. Tokenless mode is insecure for typical setups \u2014 be sure you mean to run without authentication. Start with --auth to require the bearer token.\n"
|
|
51254
|
+
);
|
|
49899
51255
|
if (this.authMode === "no-auth" && nonLoopbackBoundAddresses.length > 0) {
|
|
49900
51256
|
process.stderr.write(
|
|
49901
|
-
`
|
|
49902
|
-
requests on these listeners are accepted without a token.
|
|
51257
|
+
`Non-loopback listeners without auth: ${nonLoopbackBoundAddresses.join(", ")}
|
|
49903
51258
|
`
|
|
49904
51259
|
);
|
|
49905
51260
|
}
|
|
@@ -49924,6 +51279,9 @@ var Server = class {
|
|
|
49924
51279
|
getACPBridgePIDs() {
|
|
49925
51280
|
return this.acp?.getChildPIDs() ?? [];
|
|
49926
51281
|
}
|
|
51282
|
+
getListeningPort() {
|
|
51283
|
+
return this.listeningPort;
|
|
51284
|
+
}
|
|
49927
51285
|
async dispose(signal) {
|
|
49928
51286
|
if (this.disposed) return;
|
|
49929
51287
|
this.disposed = true;
|
|
@@ -50011,7 +51369,7 @@ var Server = class {
|
|
|
50011
51369
|
next();
|
|
50012
51370
|
return;
|
|
50013
51371
|
}
|
|
50014
|
-
if (isAuthorizedBearer(req.header("authorization"), this.store.authToken)
|
|
51372
|
+
if (isAuthorizedBearer(req.header("authorization"), this.store.authToken)) {
|
|
50015
51373
|
next();
|
|
50016
51374
|
return;
|
|
50017
51375
|
}
|
|
@@ -50928,7 +52286,7 @@ var ServerStore = class extends EventTarget {
|
|
|
50928
52286
|
return this.screens.has(screenID) ? screenID : null;
|
|
50929
52287
|
}
|
|
50930
52288
|
pickPreferredScreenID() {
|
|
50931
|
-
const [firstScreen] = [...this.screens.values()].sort((a,
|
|
52289
|
+
const [firstScreen] = [...this.screens.values()].sort((a, b2) => a.id.localeCompare(b2.id));
|
|
50932
52290
|
if (!firstScreen) {
|
|
50933
52291
|
throw new Error("Cannot initialize display state without a screen");
|
|
50934
52292
|
}
|
|
@@ -51043,6 +52401,17 @@ function writeLine(output, line) {
|
|
|
51043
52401
|
output.write(`${line}
|
|
51044
52402
|
`);
|
|
51045
52403
|
}
|
|
52404
|
+
function terminalHyperlink(url2, text = url2) {
|
|
52405
|
+
return `\x1B]8;;${url2}\x1B\\${text}\x1B]8;;\x1B\\`;
|
|
52406
|
+
}
|
|
52407
|
+
function writeConnectURLs(output, urls, options = {}) {
|
|
52408
|
+
writeLine(output, options.installed ? "Television service installed." : "Television server running.");
|
|
52409
|
+
writeLine(output, "Open Television:");
|
|
52410
|
+
for (const url2 of urls) {
|
|
52411
|
+
const connectURL = buildConnectURL(url2, options.token ?? null);
|
|
52412
|
+
writeLine(output, ` ${terminalHyperlink(connectURL)}`);
|
|
52413
|
+
}
|
|
52414
|
+
}
|
|
51046
52415
|
function ensureHelpPointer(message) {
|
|
51047
52416
|
return message.includes(HELP_POINTER) ? message : `${message}
|
|
51048
52417
|
${HELP_POINTER}`;
|
|
@@ -51061,8 +52430,8 @@ function resolveVercelSkillsInstallerBin() {
|
|
|
51061
52430
|
return localRequire.resolve("skills/bin/cli.mjs");
|
|
51062
52431
|
}
|
|
51063
52432
|
function readCLIVersion() {
|
|
51064
|
-
if ("0.1.
|
|
51065
|
-
return "0.1.
|
|
52433
|
+
if ("0.1.161".length > 0) {
|
|
52434
|
+
return "0.1.161";
|
|
51066
52435
|
}
|
|
51067
52436
|
const devPackageJsonPath = import_node_path12.default.join(getDevPackageDir(), "package.json");
|
|
51068
52437
|
if (!(0, import_node_fs10.existsSync)(devPackageJsonPath)) {
|
|
@@ -51215,7 +52584,7 @@ function copyBundledSkillsToDestination(bundledSkillsRoot, destinationRoot) {
|
|
|
51215
52584
|
}
|
|
51216
52585
|
(0, import_node_fs10.mkdirSync)(destinationRoot, { recursive: true });
|
|
51217
52586
|
const copied = [];
|
|
51218
|
-
const entries = (0, import_node_fs10.readdirSync)(bundledSkillsRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).sort((a,
|
|
52587
|
+
const entries = (0, import_node_fs10.readdirSync)(bundledSkillsRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).sort((a, b2) => a.name.localeCompare(b2.name));
|
|
51219
52588
|
for (const entry of entries) {
|
|
51220
52589
|
const sourcePath = import_node_path12.default.join(bundledSkillsRoot, entry.name);
|
|
51221
52590
|
const destinationPath = import_node_path12.default.join(destinationRoot, entry.name);
|
|
@@ -51473,10 +52842,10 @@ function createProgram(env, argv = []) {
|
|
|
51473
52842
|
throw error48;
|
|
51474
52843
|
}
|
|
51475
52844
|
const serverURL = buildLocalServerURL(opts.port);
|
|
51476
|
-
|
|
51477
|
-
|
|
51478
|
-
auth === true ?
|
|
51479
|
-
);
|
|
52845
|
+
writeConnectURLs(env.stdout, [serverURL], {
|
|
52846
|
+
installed: true,
|
|
52847
|
+
token: auth === true ? readOrCreateAuthToken(storagePath) : null
|
|
52848
|
+
});
|
|
51480
52849
|
return;
|
|
51481
52850
|
}
|
|
51482
52851
|
const profile = resolveACPAgentProfile(process.env);
|
|
@@ -51500,7 +52869,9 @@ function createProgram(env, argv = []) {
|
|
|
51500
52869
|
});
|
|
51501
52870
|
await server.start();
|
|
51502
52871
|
const serverURLs = server.getBaseURLs?.() ?? [server.getBaseURL()];
|
|
51503
|
-
|
|
52872
|
+
writeConnectURLs(env.stdout, serverURLs, {
|
|
52873
|
+
token: auth === true ? server.getAuthToken() : null
|
|
52874
|
+
});
|
|
51504
52875
|
await new Promise((resolve, reject) => {
|
|
51505
52876
|
let shuttingDown = false;
|
|
51506
52877
|
const shutdown = async (signal) => {
|
|
@@ -51711,8 +53082,10 @@ function createProgram(env, argv = []) {
|
|
|
51711
53082
|
};
|
|
51712
53083
|
try {
|
|
51713
53084
|
const client = createAuthenticatedClient(opts);
|
|
51714
|
-
await client.health();
|
|
53085
|
+
const health = await client.health();
|
|
51715
53086
|
result.healthy = true;
|
|
53087
|
+
result.bindAddresses = health.bindAddresses;
|
|
53088
|
+
result.port = health.port;
|
|
51716
53089
|
} catch {
|
|
51717
53090
|
}
|
|
51718
53091
|
try {
|