mc8yp 1.0.3 → 1.0.4
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/LICENSE +1 -1
- package/dist/cli.mjs +842 -850
- package/package.json +9 -9
package/dist/cli.mjs
CHANGED
|
@@ -21,14 +21,14 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
21
21
|
var __getProtoOf = Object.getPrototypeOf;
|
|
22
22
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
23
23
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
24
|
-
var __copyProps = (to, from, except, desc
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
25
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
-
for (var keys = __getOwnPropNames(from), i
|
|
27
|
-
key
|
|
28
|
-
if (!__hasOwnProp.call(to, key
|
|
29
|
-
__defProp(to, key
|
|
30
|
-
get: ((k) => from[k]).bind(null, key
|
|
31
|
-
enumerable: !(desc
|
|
26
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
27
|
+
key = keys[i];
|
|
28
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
29
|
+
__defProp(to, key, {
|
|
30
|
+
get: ((k) => from[k]).bind(null, key),
|
|
31
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -44,7 +44,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region package.json
|
|
46
46
|
var name = "mc8yp";
|
|
47
|
-
var version = "1.0.
|
|
47
|
+
var version = "1.0.4";
|
|
48
48
|
var description = "Cumulocity IoT MCP Server - Model Context Protocol integration for IoT device management";
|
|
49
49
|
|
|
50
50
|
//#endregion
|
|
@@ -354,8 +354,8 @@ function createCalculateDateRangePrompt() {
|
|
|
354
354
|
|
|
355
355
|
Current time: ${now.toISOString()}
|
|
356
356
|
|
|
357
|
-
${Object.entries(calculations).map(([key
|
|
358
|
-
## ${key
|
|
357
|
+
${Object.entries(calculations).map(([key, range]) => `
|
|
358
|
+
## ${key.replace(/_/g, " ").toUpperCase()}
|
|
359
359
|
- **dateFrom**: \`${range.dateFrom}\`
|
|
360
360
|
- **dateTo**: \`${range.dateTo}\`
|
|
361
361
|
`).join("\n")}
|
|
@@ -396,7 +396,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
//#endregion
|
|
399
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
399
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/Paging.js
|
|
400
400
|
/**
|
|
401
401
|
* Paging allows you to query the next and previous data chunks
|
|
402
402
|
* in a convenient way. You can also go to a specific page or just read
|
|
@@ -461,7 +461,7 @@ var Paging = class {
|
|
|
461
461
|
};
|
|
462
462
|
|
|
463
463
|
//#endregion
|
|
464
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
464
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/Service.js
|
|
465
465
|
var Service = class {
|
|
466
466
|
constructor(client, realtime) {
|
|
467
467
|
this.client = client;
|
|
@@ -645,9 +645,9 @@ var Service = class {
|
|
|
645
645
|
//#endregion
|
|
646
646
|
//#region node_modules/.pnpm/webidl-conversions@3.0.1/node_modules/webidl-conversions/lib/index.js
|
|
647
647
|
var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
648
|
-
var conversions
|
|
649
|
-
module.exports = conversions
|
|
650
|
-
function sign
|
|
648
|
+
var conversions = {};
|
|
649
|
+
module.exports = conversions;
|
|
650
|
+
function sign(x) {
|
|
651
651
|
return x < 0 ? -1 : 1;
|
|
652
652
|
}
|
|
653
653
|
function evenRound(x) {
|
|
@@ -665,7 +665,7 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
665
665
|
let x = +V;
|
|
666
666
|
if (opts.enforceRange) {
|
|
667
667
|
if (!Number.isFinite(x)) throw new TypeError("Argument is not a finite number");
|
|
668
|
-
x = sign
|
|
668
|
+
x = sign(x) * Math.floor(Math.abs(x));
|
|
669
669
|
if (x < lowerBound || x > upperBound) throw new TypeError("Argument is not in byte range");
|
|
670
670
|
return x;
|
|
671
671
|
}
|
|
@@ -676,7 +676,7 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
676
676
|
return x;
|
|
677
677
|
}
|
|
678
678
|
if (!Number.isFinite(x) || x === 0) return 0;
|
|
679
|
-
x = sign
|
|
679
|
+
x = sign(x) * Math.floor(Math.abs(x));
|
|
680
680
|
x = x % moduloVal;
|
|
681
681
|
if (!typeOpts.unsigned && x >= moduloBound) return x - moduloVal;
|
|
682
682
|
else if (typeOpts.unsigned) {
|
|
@@ -686,74 +686,74 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
686
686
|
return x;
|
|
687
687
|
};
|
|
688
688
|
}
|
|
689
|
-
conversions
|
|
690
|
-
conversions
|
|
689
|
+
conversions["void"] = function() {};
|
|
690
|
+
conversions["boolean"] = function(val) {
|
|
691
691
|
return !!val;
|
|
692
692
|
};
|
|
693
|
-
conversions
|
|
694
|
-
conversions
|
|
695
|
-
conversions
|
|
696
|
-
conversions
|
|
697
|
-
conversions
|
|
698
|
-
conversions
|
|
699
|
-
conversions
|
|
693
|
+
conversions["byte"] = createNumberConversion(8, { unsigned: false });
|
|
694
|
+
conversions["octet"] = createNumberConversion(8, { unsigned: true });
|
|
695
|
+
conversions["short"] = createNumberConversion(16, { unsigned: false });
|
|
696
|
+
conversions["unsigned short"] = createNumberConversion(16, { unsigned: true });
|
|
697
|
+
conversions["long"] = createNumberConversion(32, { unsigned: false });
|
|
698
|
+
conversions["unsigned long"] = createNumberConversion(32, { unsigned: true });
|
|
699
|
+
conversions["long long"] = createNumberConversion(32, {
|
|
700
700
|
unsigned: false,
|
|
701
701
|
moduloBitLength: 64
|
|
702
702
|
});
|
|
703
|
-
conversions
|
|
703
|
+
conversions["unsigned long long"] = createNumberConversion(32, {
|
|
704
704
|
unsigned: true,
|
|
705
705
|
moduloBitLength: 64
|
|
706
706
|
});
|
|
707
|
-
conversions
|
|
707
|
+
conversions["double"] = function(V) {
|
|
708
708
|
const x = +V;
|
|
709
709
|
if (!Number.isFinite(x)) throw new TypeError("Argument is not a finite floating-point value");
|
|
710
710
|
return x;
|
|
711
711
|
};
|
|
712
|
-
conversions
|
|
712
|
+
conversions["unrestricted double"] = function(V) {
|
|
713
713
|
const x = +V;
|
|
714
714
|
if (isNaN(x)) throw new TypeError("Argument is NaN");
|
|
715
715
|
return x;
|
|
716
716
|
};
|
|
717
|
-
conversions
|
|
718
|
-
conversions
|
|
719
|
-
conversions
|
|
717
|
+
conversions["float"] = conversions["double"];
|
|
718
|
+
conversions["unrestricted float"] = conversions["unrestricted double"];
|
|
719
|
+
conversions["DOMString"] = function(V, opts) {
|
|
720
720
|
if (!opts) opts = {};
|
|
721
721
|
if (opts.treatNullAsEmptyString && V === null) return "";
|
|
722
722
|
return String(V);
|
|
723
723
|
};
|
|
724
|
-
conversions
|
|
724
|
+
conversions["ByteString"] = function(V, opts) {
|
|
725
725
|
const x = String(V);
|
|
726
726
|
let c = void 0;
|
|
727
|
-
for (let i
|
|
727
|
+
for (let i = 0; (c = x.codePointAt(i)) !== void 0; ++i) if (c > 255) throw new TypeError("Argument is not a valid bytestring");
|
|
728
728
|
return x;
|
|
729
729
|
};
|
|
730
|
-
conversions
|
|
730
|
+
conversions["USVString"] = function(V) {
|
|
731
731
|
const S = String(V);
|
|
732
732
|
const n = S.length;
|
|
733
733
|
const U = [];
|
|
734
|
-
for (let i
|
|
735
|
-
const c = S.charCodeAt(i
|
|
734
|
+
for (let i = 0; i < n; ++i) {
|
|
735
|
+
const c = S.charCodeAt(i);
|
|
736
736
|
if (c < 55296 || c > 57343) U.push(String.fromCodePoint(c));
|
|
737
737
|
else if (56320 <= c && c <= 57343) U.push(String.fromCodePoint(65533));
|
|
738
|
-
else if (i
|
|
738
|
+
else if (i === n - 1) U.push(String.fromCodePoint(65533));
|
|
739
739
|
else {
|
|
740
|
-
const d = S.charCodeAt(i
|
|
740
|
+
const d = S.charCodeAt(i + 1);
|
|
741
741
|
if (56320 <= d && d <= 57343) {
|
|
742
742
|
const a = c & 1023;
|
|
743
743
|
const b = d & 1023;
|
|
744
744
|
U.push(String.fromCodePoint(65536 + 1024 * a + b));
|
|
745
|
-
++i
|
|
745
|
+
++i;
|
|
746
746
|
} else U.push(String.fromCodePoint(65533));
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
749
|
return U.join("");
|
|
750
750
|
};
|
|
751
|
-
conversions
|
|
751
|
+
conversions["Date"] = function(V, opts) {
|
|
752
752
|
if (!(V instanceof Date)) throw new TypeError("Argument is not a Date object");
|
|
753
753
|
if (isNaN(V)) return;
|
|
754
754
|
return V;
|
|
755
755
|
};
|
|
756
|
-
conversions
|
|
756
|
+
conversions["RegExp"] = function(V, opts) {
|
|
757
757
|
if (!(V instanceof RegExp)) V = new RegExp(V);
|
|
758
758
|
return V;
|
|
759
759
|
};
|
|
@@ -764,12 +764,12 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
764
764
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
765
765
|
module.exports.mixin = function mixin(target, source) {
|
|
766
766
|
const keys = Object.getOwnPropertyNames(source);
|
|
767
|
-
for (let i
|
|
767
|
+
for (let i = 0; i < keys.length; ++i) Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));
|
|
768
768
|
};
|
|
769
769
|
module.exports.wrapperSymbol = Symbol("wrapper");
|
|
770
770
|
module.exports.implSymbol = Symbol("impl");
|
|
771
|
-
module.exports.wrapperForImpl = function(impl
|
|
772
|
-
return impl
|
|
771
|
+
module.exports.wrapperForImpl = function(impl) {
|
|
772
|
+
return impl[module.exports.wrapperSymbol];
|
|
773
773
|
};
|
|
774
774
|
module.exports.implForWrapper = function(wrapper) {
|
|
775
775
|
return wrapper[module.exports.implSymbol];
|
|
@@ -36361,15 +36361,15 @@ var require_tr46 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
36361
36361
|
return null;
|
|
36362
36362
|
}
|
|
36363
36363
|
var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
36364
|
-
function countSymbols
|
|
36364
|
+
function countSymbols(string) {
|
|
36365
36365
|
return string.replace(regexAstralSymbols, "_").length;
|
|
36366
36366
|
}
|
|
36367
36367
|
function mapChars(domain_name, useSTD3, processing_option) {
|
|
36368
36368
|
var hasError = false;
|
|
36369
36369
|
var processed = "";
|
|
36370
|
-
var len = countSymbols
|
|
36371
|
-
for (var i
|
|
36372
|
-
var codePoint = domain_name.codePointAt(i
|
|
36370
|
+
var len = countSymbols(domain_name);
|
|
36371
|
+
for (var i = 0; i < len; ++i) {
|
|
36372
|
+
var codePoint = domain_name.codePointAt(i);
|
|
36373
36373
|
var status = findStatus(codePoint);
|
|
36374
36374
|
switch (status[1]) {
|
|
36375
36375
|
case "disallowed":
|
|
@@ -36410,28 +36410,28 @@ var require_tr46 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
36410
36410
|
label = punycode$1.toUnicode(label);
|
|
36411
36411
|
processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;
|
|
36412
36412
|
}
|
|
36413
|
-
var error
|
|
36414
|
-
if (normalize(label) !== label || label[3] === "-" && label[4] === "-" || label[0] === "-" || label[label.length - 1] === "-" || label.indexOf(".") !== -1 || label.search(combiningMarksRegex) === 0) error
|
|
36415
|
-
var len = countSymbols
|
|
36416
|
-
for (var i
|
|
36417
|
-
var status = findStatus(label.codePointAt(i
|
|
36413
|
+
var error = false;
|
|
36414
|
+
if (normalize(label) !== label || label[3] === "-" && label[4] === "-" || label[0] === "-" || label[label.length - 1] === "-" || label.indexOf(".") !== -1 || label.search(combiningMarksRegex) === 0) error = true;
|
|
36415
|
+
var len = countSymbols(label);
|
|
36416
|
+
for (var i = 0; i < len; ++i) {
|
|
36417
|
+
var status = findStatus(label.codePointAt(i));
|
|
36418
36418
|
if (processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid" || processing === PROCESSING_OPTIONS.NONTRANSITIONAL && status[1] !== "valid" && status[1] !== "deviation") {
|
|
36419
|
-
error
|
|
36419
|
+
error = true;
|
|
36420
36420
|
break;
|
|
36421
36421
|
}
|
|
36422
36422
|
}
|
|
36423
36423
|
return {
|
|
36424
36424
|
label,
|
|
36425
|
-
error
|
|
36425
|
+
error
|
|
36426
36426
|
};
|
|
36427
36427
|
}
|
|
36428
36428
|
function processing(domain_name, useSTD3, processing_option) {
|
|
36429
36429
|
var result = mapChars(domain_name, useSTD3, processing_option);
|
|
36430
36430
|
result.string = normalize(result.string);
|
|
36431
36431
|
var labels = result.string.split(".");
|
|
36432
|
-
for (var i
|
|
36433
|
-
var validation = validateLabel(labels[i
|
|
36434
|
-
labels[i
|
|
36432
|
+
for (var i = 0; i < labels.length; ++i) try {
|
|
36433
|
+
var validation = validateLabel(labels[i]);
|
|
36434
|
+
labels[i] = validation.label;
|
|
36435
36435
|
result.error = result.error || validation.error;
|
|
36436
36436
|
} catch (e) {
|
|
36437
36437
|
result.error = true;
|
|
@@ -36455,7 +36455,7 @@ var require_tr46 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
36455
36455
|
if (verifyDnsLength) {
|
|
36456
36456
|
var total = labels.slice(0, labels.length - 1).join(".").length;
|
|
36457
36457
|
if (total.length > 253 || total.length === 0) result.error = true;
|
|
36458
|
-
for (var i
|
|
36458
|
+
for (var i = 0; i < labels.length; ++i) if (labels.length > 63 || labels.length === 0) {
|
|
36459
36459
|
result.error = true;
|
|
36460
36460
|
break;
|
|
36461
36461
|
}
|
|
@@ -36546,17 +36546,17 @@ var require_url_state_machine = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
36546
36546
|
function utf8PercentEncode(c) {
|
|
36547
36547
|
const buf = new Buffer(c);
|
|
36548
36548
|
let str = "";
|
|
36549
|
-
for (let i
|
|
36549
|
+
for (let i = 0; i < buf.length; ++i) str += percentEncode(buf[i]);
|
|
36550
36550
|
return str;
|
|
36551
36551
|
}
|
|
36552
36552
|
function utf8PercentDecode(str) {
|
|
36553
36553
|
const input = new Buffer(str);
|
|
36554
36554
|
const output = [];
|
|
36555
|
-
for (let i
|
|
36556
|
-
else if (input[i
|
|
36557
|
-
output.push(parseInt(input.slice(i
|
|
36558
|
-
i
|
|
36559
|
-
} else output.push(input[i
|
|
36555
|
+
for (let i = 0; i < input.length; ++i) if (input[i] !== 37) output.push(input[i]);
|
|
36556
|
+
else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {
|
|
36557
|
+
output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));
|
|
36558
|
+
i += 2;
|
|
36559
|
+
} else output.push(input[i]);
|
|
36560
36560
|
return new Buffer(output).toString();
|
|
36561
36561
|
}
|
|
36562
36562
|
function isC0ControlPercentEncode(c) {
|
|
@@ -36622,7 +36622,7 @@ var require_url_state_machine = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
36622
36622
|
if (n === failure) return input;
|
|
36623
36623
|
numbers.push(n);
|
|
36624
36624
|
}
|
|
36625
|
-
for (let i
|
|
36625
|
+
for (let i = 0; i < numbers.length - 1; ++i) if (numbers[i] > 255) return failure;
|
|
36626
36626
|
if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) return failure;
|
|
36627
36627
|
let ipv4 = numbers.pop();
|
|
36628
36628
|
let counter = 0;
|
|
@@ -36635,9 +36635,9 @@ var require_url_state_machine = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
36635
36635
|
function serializeIPv4(address) {
|
|
36636
36636
|
let output = "";
|
|
36637
36637
|
let n = address;
|
|
36638
|
-
for (let i
|
|
36638
|
+
for (let i = 1; i <= 4; ++i) {
|
|
36639
36639
|
output = String(n % 256) + output;
|
|
36640
|
-
if (i
|
|
36640
|
+
if (i !== 4) output = "." + output;
|
|
36641
36641
|
n = Math.floor(n / 256);
|
|
36642
36642
|
}
|
|
36643
36643
|
return output;
|
|
@@ -36758,7 +36758,7 @@ var require_url_state_machine = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
36758
36758
|
if (containsForbiddenHostCodePointExcludingPercent(input)) return failure;
|
|
36759
36759
|
let output = "";
|
|
36760
36760
|
const decoded = punycode.ucs2.decode(input);
|
|
36761
|
-
for (let i
|
|
36761
|
+
for (let i = 0; i < decoded.length; ++i) output += percentEncodeChar(decoded[i], isC0ControlPercentEncode);
|
|
36762
36762
|
return output;
|
|
36763
36763
|
}
|
|
36764
36764
|
function findLongestZeroSequence(arr) {
|
|
@@ -36766,7 +36766,7 @@ var require_url_state_machine = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
36766
36766
|
let maxLen = 1;
|
|
36767
36767
|
let currStart = null;
|
|
36768
36768
|
let currLen = 0;
|
|
36769
|
-
for (let i
|
|
36769
|
+
for (let i = 0; i < arr.length; ++i) if (arr[i] !== 0) {
|
|
36770
36770
|
if (currLen > maxLen) {
|
|
36771
36771
|
maxIdx = currStart;
|
|
36772
36772
|
maxLen = currLen;
|
|
@@ -36774,7 +36774,7 @@ var require_url_state_machine = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
36774
36774
|
currStart = null;
|
|
36775
36775
|
currLen = 0;
|
|
36776
36776
|
} else {
|
|
36777
|
-
if (currStart === null) currStart = i
|
|
36777
|
+
if (currStart === null) currStart = i;
|
|
36778
36778
|
++currLen;
|
|
36779
36779
|
}
|
|
36780
36780
|
if (currLen > maxLen) {
|
|
@@ -37248,8 +37248,8 @@ var require_url_state_machine = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
37248
37248
|
if (isNaN(c) || !this.stateOverride && c === 35) {
|
|
37249
37249
|
if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") this.encodingOverride = "utf-8";
|
|
37250
37250
|
const buffer$1 = new Buffer(this.buffer);
|
|
37251
|
-
for (let i
|
|
37252
|
-
else this.url.query += String.fromCodePoint(buffer$1[i
|
|
37251
|
+
for (let i = 0; i < buffer$1.length; ++i) if (buffer$1[i] < 33 || buffer$1[i] > 126 || buffer$1[i] === 34 || buffer$1[i] === 35 || buffer$1[i] === 60 || buffer$1[i] === 62) this.url.query += percentEncode(buffer$1[i]);
|
|
37252
|
+
else this.url.query += String.fromCodePoint(buffer$1[i]);
|
|
37253
37253
|
this.buffer = "";
|
|
37254
37254
|
if (c === 35) {
|
|
37255
37255
|
this.url.fragment = "";
|
|
@@ -37317,19 +37317,19 @@ var require_url_state_machine = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
37317
37317
|
};
|
|
37318
37318
|
module.exports.basicURLParse = function(input, options) {
|
|
37319
37319
|
if (options === void 0) options = {};
|
|
37320
|
-
const usm
|
|
37321
|
-
if (usm
|
|
37322
|
-
return usm
|
|
37320
|
+
const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride);
|
|
37321
|
+
if (usm.failure) return "failure";
|
|
37322
|
+
return usm.url;
|
|
37323
37323
|
};
|
|
37324
37324
|
module.exports.setTheUsername = function(url, username) {
|
|
37325
37325
|
url.username = "";
|
|
37326
37326
|
const decoded = punycode.ucs2.decode(username);
|
|
37327
|
-
for (let i
|
|
37327
|
+
for (let i = 0; i < decoded.length; ++i) url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode);
|
|
37328
37328
|
};
|
|
37329
37329
|
module.exports.setThePassword = function(url, password) {
|
|
37330
37330
|
url.password = "";
|
|
37331
37331
|
const decoded = punycode.ucs2.decode(password);
|
|
37332
|
-
for (let i
|
|
37332
|
+
for (let i = 0; i < decoded.length; ++i) url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode);
|
|
37333
37333
|
};
|
|
37334
37334
|
module.exports.serializeHost = serializeHost;
|
|
37335
37335
|
module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;
|
|
@@ -37491,22 +37491,22 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37491
37491
|
const utils = require_utils();
|
|
37492
37492
|
const Impl = require_URL_impl();
|
|
37493
37493
|
const impl = utils.implSymbol;
|
|
37494
|
-
function URL
|
|
37495
|
-
if (!this || this[impl] || !(this instanceof URL
|
|
37494
|
+
function URL(url) {
|
|
37495
|
+
if (!this || this[impl] || !(this instanceof URL)) throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");
|
|
37496
37496
|
if (arguments.length < 1) throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present.");
|
|
37497
37497
|
const args = [];
|
|
37498
|
-
for (let i
|
|
37498
|
+
for (let i = 0; i < arguments.length && i < 2; ++i) args[i] = arguments[i];
|
|
37499
37499
|
args[0] = conversions["USVString"](args[0]);
|
|
37500
37500
|
if (args[1] !== void 0) args[1] = conversions["USVString"](args[1]);
|
|
37501
37501
|
module.exports.setup(this, args);
|
|
37502
37502
|
}
|
|
37503
|
-
URL
|
|
37503
|
+
URL.prototype.toJSON = function toJSON() {
|
|
37504
37504
|
if (!this || !module.exports.is(this)) throw new TypeError("Illegal invocation");
|
|
37505
37505
|
const args = [];
|
|
37506
|
-
for (let i
|
|
37506
|
+
for (let i = 0; i < arguments.length && i < 0; ++i) args[i] = arguments[i];
|
|
37507
37507
|
return this[impl].toJSON.apply(this[impl], args);
|
|
37508
37508
|
};
|
|
37509
|
-
Object.defineProperty(URL
|
|
37509
|
+
Object.defineProperty(URL.prototype, "href", {
|
|
37510
37510
|
get() {
|
|
37511
37511
|
return this[impl].href;
|
|
37512
37512
|
},
|
|
@@ -37517,18 +37517,18 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37517
37517
|
enumerable: true,
|
|
37518
37518
|
configurable: true
|
|
37519
37519
|
});
|
|
37520
|
-
URL
|
|
37520
|
+
URL.prototype.toString = function() {
|
|
37521
37521
|
if (!this || !module.exports.is(this)) throw new TypeError("Illegal invocation");
|
|
37522
37522
|
return this.href;
|
|
37523
37523
|
};
|
|
37524
|
-
Object.defineProperty(URL
|
|
37524
|
+
Object.defineProperty(URL.prototype, "origin", {
|
|
37525
37525
|
get() {
|
|
37526
37526
|
return this[impl].origin;
|
|
37527
37527
|
},
|
|
37528
37528
|
enumerable: true,
|
|
37529
37529
|
configurable: true
|
|
37530
37530
|
});
|
|
37531
|
-
Object.defineProperty(URL
|
|
37531
|
+
Object.defineProperty(URL.prototype, "protocol", {
|
|
37532
37532
|
get() {
|
|
37533
37533
|
return this[impl].protocol;
|
|
37534
37534
|
},
|
|
@@ -37539,7 +37539,7 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37539
37539
|
enumerable: true,
|
|
37540
37540
|
configurable: true
|
|
37541
37541
|
});
|
|
37542
|
-
Object.defineProperty(URL
|
|
37542
|
+
Object.defineProperty(URL.prototype, "username", {
|
|
37543
37543
|
get() {
|
|
37544
37544
|
return this[impl].username;
|
|
37545
37545
|
},
|
|
@@ -37550,7 +37550,7 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37550
37550
|
enumerable: true,
|
|
37551
37551
|
configurable: true
|
|
37552
37552
|
});
|
|
37553
|
-
Object.defineProperty(URL
|
|
37553
|
+
Object.defineProperty(URL.prototype, "password", {
|
|
37554
37554
|
get() {
|
|
37555
37555
|
return this[impl].password;
|
|
37556
37556
|
},
|
|
@@ -37561,7 +37561,7 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37561
37561
|
enumerable: true,
|
|
37562
37562
|
configurable: true
|
|
37563
37563
|
});
|
|
37564
|
-
Object.defineProperty(URL
|
|
37564
|
+
Object.defineProperty(URL.prototype, "host", {
|
|
37565
37565
|
get() {
|
|
37566
37566
|
return this[impl].host;
|
|
37567
37567
|
},
|
|
@@ -37572,7 +37572,7 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37572
37572
|
enumerable: true,
|
|
37573
37573
|
configurable: true
|
|
37574
37574
|
});
|
|
37575
|
-
Object.defineProperty(URL
|
|
37575
|
+
Object.defineProperty(URL.prototype, "hostname", {
|
|
37576
37576
|
get() {
|
|
37577
37577
|
return this[impl].hostname;
|
|
37578
37578
|
},
|
|
@@ -37583,7 +37583,7 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37583
37583
|
enumerable: true,
|
|
37584
37584
|
configurable: true
|
|
37585
37585
|
});
|
|
37586
|
-
Object.defineProperty(URL
|
|
37586
|
+
Object.defineProperty(URL.prototype, "port", {
|
|
37587
37587
|
get() {
|
|
37588
37588
|
return this[impl].port;
|
|
37589
37589
|
},
|
|
@@ -37594,7 +37594,7 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37594
37594
|
enumerable: true,
|
|
37595
37595
|
configurable: true
|
|
37596
37596
|
});
|
|
37597
|
-
Object.defineProperty(URL
|
|
37597
|
+
Object.defineProperty(URL.prototype, "pathname", {
|
|
37598
37598
|
get() {
|
|
37599
37599
|
return this[impl].pathname;
|
|
37600
37600
|
},
|
|
@@ -37605,7 +37605,7 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37605
37605
|
enumerable: true,
|
|
37606
37606
|
configurable: true
|
|
37607
37607
|
});
|
|
37608
|
-
Object.defineProperty(URL
|
|
37608
|
+
Object.defineProperty(URL.prototype, "search", {
|
|
37609
37609
|
get() {
|
|
37610
37610
|
return this[impl].search;
|
|
37611
37611
|
},
|
|
@@ -37616,7 +37616,7 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37616
37616
|
enumerable: true,
|
|
37617
37617
|
configurable: true
|
|
37618
37618
|
});
|
|
37619
|
-
Object.defineProperty(URL
|
|
37619
|
+
Object.defineProperty(URL.prototype, "hash", {
|
|
37620
37620
|
get() {
|
|
37621
37621
|
return this[impl].hash;
|
|
37622
37622
|
},
|
|
@@ -37632,7 +37632,7 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37632
37632
|
return !!obj && obj[impl] instanceof Impl.implementation;
|
|
37633
37633
|
},
|
|
37634
37634
|
create(constructorArgs, privateData) {
|
|
37635
|
-
let obj = Object.create(URL
|
|
37635
|
+
let obj = Object.create(URL.prototype);
|
|
37636
37636
|
this.setup(obj, constructorArgs, privateData);
|
|
37637
37637
|
return obj;
|
|
37638
37638
|
},
|
|
@@ -37642,10 +37642,10 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37642
37642
|
obj[impl] = new Impl.implementation(constructorArgs, privateData);
|
|
37643
37643
|
obj[impl][utils.wrapperSymbol] = obj;
|
|
37644
37644
|
},
|
|
37645
|
-
interface: URL
|
|
37645
|
+
interface: URL,
|
|
37646
37646
|
expose: {
|
|
37647
|
-
Window: { URL
|
|
37648
|
-
Worker: { URL
|
|
37647
|
+
Window: { URL },
|
|
37648
|
+
Worker: { URL }
|
|
37649
37649
|
}
|
|
37650
37650
|
};
|
|
37651
37651
|
}));
|
|
@@ -37668,7 +37668,7 @@ var require_public_api = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37668
37668
|
//#region node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.js
|
|
37669
37669
|
var require_safer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
37670
37670
|
var buffer = __require("buffer");
|
|
37671
|
-
var Buffer
|
|
37671
|
+
var Buffer = buffer.Buffer;
|
|
37672
37672
|
var safer = {};
|
|
37673
37673
|
var key;
|
|
37674
37674
|
for (key in buffer) {
|
|
@@ -37677,21 +37677,21 @@ var require_safer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37677
37677
|
safer[key] = buffer[key];
|
|
37678
37678
|
}
|
|
37679
37679
|
var Safer = safer.Buffer = {};
|
|
37680
|
-
for (key in Buffer
|
|
37681
|
-
if (!Buffer
|
|
37680
|
+
for (key in Buffer) {
|
|
37681
|
+
if (!Buffer.hasOwnProperty(key)) continue;
|
|
37682
37682
|
if (key === "allocUnsafe" || key === "allocUnsafeSlow") continue;
|
|
37683
|
-
Safer[key] = Buffer
|
|
37683
|
+
Safer[key] = Buffer[key];
|
|
37684
37684
|
}
|
|
37685
|
-
safer.Buffer.prototype = Buffer
|
|
37685
|
+
safer.Buffer.prototype = Buffer.prototype;
|
|
37686
37686
|
if (!Safer.from || Safer.from === Uint8Array.from) Safer.from = function(value, encodingOrOffset, length) {
|
|
37687
37687
|
if (typeof value === "number") throw new TypeError("The \"value\" argument must not be of type number. Received type " + typeof value);
|
|
37688
37688
|
if (value && typeof value.length === "undefined") throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
|
|
37689
|
-
return Buffer
|
|
37689
|
+
return Buffer(value, encodingOrOffset, length);
|
|
37690
37690
|
};
|
|
37691
37691
|
if (!Safer.alloc) Safer.alloc = function(size, fill, encoding) {
|
|
37692
37692
|
if (typeof size !== "number") throw new TypeError("The \"size\" argument must be of type number. Received type " + typeof size);
|
|
37693
37693
|
if (size < 0 || size >= 2 * (1 << 30)) throw new RangeError("The value \"" + size + "\" is invalid for option \"size\"");
|
|
37694
|
-
var buf = Buffer
|
|
37694
|
+
var buf = Buffer(size);
|
|
37695
37695
|
if (!fill || fill.length === 0) buf.fill(0);
|
|
37696
37696
|
else if (typeof encoding === "string") buf.fill(fill, encoding);
|
|
37697
37697
|
else buf.fill(fill);
|
|
@@ -37750,7 +37750,7 @@ var require_bom_handling = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37750
37750
|
//#endregion
|
|
37751
37751
|
//#region node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/internal.js
|
|
37752
37752
|
var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
37753
|
-
var Buffer
|
|
37753
|
+
var Buffer = require_safer().Buffer;
|
|
37754
37754
|
module.exports = {
|
|
37755
37755
|
utf8: {
|
|
37756
37756
|
type: "_internal",
|
|
@@ -37771,16 +37771,16 @@ var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37771
37771
|
hex: { type: "_internal" },
|
|
37772
37772
|
_internal: InternalCodec
|
|
37773
37773
|
};
|
|
37774
|
-
function InternalCodec(codecOptions, iconv
|
|
37774
|
+
function InternalCodec(codecOptions, iconv) {
|
|
37775
37775
|
this.enc = codecOptions.encodingName;
|
|
37776
37776
|
this.bomAware = codecOptions.bomAware;
|
|
37777
37777
|
if (this.enc === "base64") this.encoder = InternalEncoderBase64;
|
|
37778
37778
|
else if (this.enc === "cesu8") {
|
|
37779
37779
|
this.enc = "utf8";
|
|
37780
37780
|
this.encoder = InternalEncoderCesu8;
|
|
37781
|
-
if (Buffer
|
|
37781
|
+
if (Buffer.from("eda0bdedb2a9", "hex").toString() !== "💩") {
|
|
37782
37782
|
this.decoder = InternalDecoderCesu8;
|
|
37783
|
-
this.defaultCharUnicode = iconv
|
|
37783
|
+
this.defaultCharUnicode = iconv.defaultCharUnicode;
|
|
37784
37784
|
}
|
|
37785
37785
|
}
|
|
37786
37786
|
}
|
|
@@ -37792,7 +37792,7 @@ var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37792
37792
|
this.decoder = new StringDecoder(codec.enc);
|
|
37793
37793
|
}
|
|
37794
37794
|
InternalDecoder.prototype.write = function(buf) {
|
|
37795
|
-
if (!Buffer
|
|
37795
|
+
if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);
|
|
37796
37796
|
return this.decoder.write(buf);
|
|
37797
37797
|
};
|
|
37798
37798
|
InternalDecoder.prototype.end = function() {
|
|
@@ -37802,7 +37802,7 @@ var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37802
37802
|
this.enc = codec.enc;
|
|
37803
37803
|
}
|
|
37804
37804
|
InternalEncoder.prototype.write = function(str) {
|
|
37805
|
-
return Buffer
|
|
37805
|
+
return Buffer.from(str, this.enc);
|
|
37806
37806
|
};
|
|
37807
37807
|
InternalEncoder.prototype.end = function() {};
|
|
37808
37808
|
function InternalEncoderBase64(options, codec) {
|
|
@@ -37813,16 +37813,16 @@ var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37813
37813
|
var completeQuads = str.length - str.length % 4;
|
|
37814
37814
|
this.prevStr = str.slice(completeQuads);
|
|
37815
37815
|
str = str.slice(0, completeQuads);
|
|
37816
|
-
return Buffer
|
|
37816
|
+
return Buffer.from(str, "base64");
|
|
37817
37817
|
};
|
|
37818
37818
|
InternalEncoderBase64.prototype.end = function() {
|
|
37819
|
-
return Buffer
|
|
37819
|
+
return Buffer.from(this.prevStr, "base64");
|
|
37820
37820
|
};
|
|
37821
37821
|
function InternalEncoderCesu8(options, codec) {}
|
|
37822
37822
|
InternalEncoderCesu8.prototype.write = function(str) {
|
|
37823
|
-
var buf = Buffer
|
|
37824
|
-
for (var i
|
|
37825
|
-
var charCode = str.charCodeAt(i
|
|
37823
|
+
var buf = Buffer.alloc(str.length * 3), bufIdx = 0;
|
|
37824
|
+
for (var i = 0; i < str.length; i++) {
|
|
37825
|
+
var charCode = str.charCodeAt(i);
|
|
37826
37826
|
if (charCode < 128) buf[bufIdx++] = charCode;
|
|
37827
37827
|
else if (charCode < 2048) {
|
|
37828
37828
|
buf[bufIdx++] = 192 + (charCode >>> 6);
|
|
@@ -37844,8 +37844,8 @@ var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37844
37844
|
}
|
|
37845
37845
|
InternalDecoderCesu8.prototype.write = function(buf) {
|
|
37846
37846
|
var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, res = "";
|
|
37847
|
-
for (var i
|
|
37848
|
-
var curByte = buf[i
|
|
37847
|
+
for (var i = 0; i < buf.length; i++) {
|
|
37848
|
+
var curByte = buf[i];
|
|
37849
37849
|
if ((curByte & 192) !== 128) {
|
|
37850
37850
|
if (contBytes > 0) {
|
|
37851
37851
|
res += this.defaultCharUnicode;
|
|
@@ -37885,10 +37885,10 @@ var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37885
37885
|
//#endregion
|
|
37886
37886
|
//#region node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf32.js
|
|
37887
37887
|
var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
37888
|
-
var Buffer
|
|
37888
|
+
var Buffer = require_safer().Buffer;
|
|
37889
37889
|
exports._utf32 = Utf32Codec;
|
|
37890
|
-
function Utf32Codec(codecOptions, iconv
|
|
37891
|
-
this.iconv = iconv
|
|
37890
|
+
function Utf32Codec(codecOptions, iconv) {
|
|
37891
|
+
this.iconv = iconv;
|
|
37892
37892
|
this.bomAware = true;
|
|
37893
37893
|
this.isLE = codecOptions.isLE;
|
|
37894
37894
|
}
|
|
@@ -37909,12 +37909,12 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37909
37909
|
this.highSurrogate = 0;
|
|
37910
37910
|
}
|
|
37911
37911
|
Utf32Encoder.prototype.write = function(str) {
|
|
37912
|
-
var src = Buffer
|
|
37913
|
-
var dst = Buffer
|
|
37912
|
+
var src = Buffer.from(str, "ucs2");
|
|
37913
|
+
var dst = Buffer.alloc(src.length * 2);
|
|
37914
37914
|
var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE;
|
|
37915
37915
|
var offset = 0;
|
|
37916
|
-
for (var i
|
|
37917
|
-
var code = src.readUInt16LE(i
|
|
37916
|
+
for (var i = 0; i < src.length; i += 2) {
|
|
37917
|
+
var code = src.readUInt16LE(i);
|
|
37918
37918
|
var isHighSurrogate = 55296 <= code && code < 56320;
|
|
37919
37919
|
var isLowSurrogate = 56320 <= code && code < 57344;
|
|
37920
37920
|
if (this.highSurrogate) if (isHighSurrogate || !isLowSurrogate) {
|
|
@@ -37939,7 +37939,7 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37939
37939
|
};
|
|
37940
37940
|
Utf32Encoder.prototype.end = function() {
|
|
37941
37941
|
if (!this.highSurrogate) return;
|
|
37942
|
-
var buf = Buffer
|
|
37942
|
+
var buf = Buffer.alloc(4);
|
|
37943
37943
|
if (this.isLE) buf.writeUInt32LE(this.highSurrogate, 0);
|
|
37944
37944
|
else buf.writeUInt32BE(this.highSurrogate, 0);
|
|
37945
37945
|
this.highSurrogate = 0;
|
|
@@ -37952,28 +37952,28 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37952
37952
|
}
|
|
37953
37953
|
Utf32Decoder.prototype.write = function(src) {
|
|
37954
37954
|
if (src.length === 0) return "";
|
|
37955
|
-
var i
|
|
37955
|
+
var i = 0;
|
|
37956
37956
|
var codepoint = 0;
|
|
37957
|
-
var dst = Buffer
|
|
37957
|
+
var dst = Buffer.alloc(src.length + 4);
|
|
37958
37958
|
var offset = 0;
|
|
37959
37959
|
var isLE = this.isLE;
|
|
37960
37960
|
var overflow = this.overflow;
|
|
37961
37961
|
var badChar = this.badChar;
|
|
37962
37962
|
if (overflow.length > 0) {
|
|
37963
|
-
for (; i
|
|
37963
|
+
for (; i < src.length && overflow.length < 4; i++) overflow.push(src[i]);
|
|
37964
37964
|
if (overflow.length === 4) {
|
|
37965
|
-
if (isLE) codepoint = overflow[i
|
|
37966
|
-
else codepoint = overflow[i
|
|
37965
|
+
if (isLE) codepoint = overflow[i] | overflow[i + 1] << 8 | overflow[i + 2] << 16 | overflow[i + 3] << 24;
|
|
37966
|
+
else codepoint = overflow[i + 3] | overflow[i + 2] << 8 | overflow[i + 1] << 16 | overflow[i] << 24;
|
|
37967
37967
|
overflow.length = 0;
|
|
37968
37968
|
offset = _writeCodepoint(dst, offset, codepoint, badChar);
|
|
37969
37969
|
}
|
|
37970
37970
|
}
|
|
37971
|
-
for (; i
|
|
37972
|
-
if (isLE) codepoint = src[i
|
|
37973
|
-
else codepoint = src[i
|
|
37971
|
+
for (; i < src.length - 3; i += 4) {
|
|
37972
|
+
if (isLE) codepoint = src[i] | src[i + 1] << 8 | src[i + 2] << 16 | src[i + 3] << 24;
|
|
37973
|
+
else codepoint = src[i + 3] | src[i + 2] << 8 | src[i + 1] << 16 | src[i] << 24;
|
|
37974
37974
|
offset = _writeCodepoint(dst, offset, codepoint, badChar);
|
|
37975
37975
|
}
|
|
37976
|
-
for (; i
|
|
37976
|
+
for (; i < src.length; i++) overflow.push(src[i]);
|
|
37977
37977
|
return dst.slice(0, offset).toString("ucs2");
|
|
37978
37978
|
};
|
|
37979
37979
|
function _writeCodepoint(dst, offset, codepoint, badChar) {
|
|
@@ -37994,8 +37994,8 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37994
37994
|
};
|
|
37995
37995
|
exports.utf32 = Utf32AutoCodec;
|
|
37996
37996
|
exports.ucs4 = "utf32";
|
|
37997
|
-
function Utf32AutoCodec(options, iconv
|
|
37998
|
-
this.iconv = iconv
|
|
37997
|
+
function Utf32AutoCodec(options, iconv) {
|
|
37998
|
+
this.iconv = iconv;
|
|
37999
37999
|
}
|
|
38000
38000
|
Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder;
|
|
38001
38001
|
Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder;
|
|
@@ -38022,10 +38022,10 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38022
38022
|
this.initialBufs.push(buf);
|
|
38023
38023
|
this.initialBufsLen += buf.length;
|
|
38024
38024
|
if (this.initialBufsLen < 32) return "";
|
|
38025
|
-
var encoding = detectEncoding
|
|
38025
|
+
var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
|
|
38026
38026
|
this.decoder = this.iconv.getDecoder(encoding, this.options);
|
|
38027
38027
|
var resStr = "";
|
|
38028
|
-
for (var i
|
|
38028
|
+
for (var i = 0; i < this.initialBufs.length; i++) resStr += this.decoder.write(this.initialBufs[i]);
|
|
38029
38029
|
this.initialBufs.length = this.initialBufsLen = 0;
|
|
38030
38030
|
return resStr;
|
|
38031
38031
|
}
|
|
@@ -38033,10 +38033,10 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38033
38033
|
};
|
|
38034
38034
|
Utf32AutoDecoder.prototype.end = function() {
|
|
38035
38035
|
if (!this.decoder) {
|
|
38036
|
-
var encoding = detectEncoding
|
|
38036
|
+
var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
|
|
38037
38037
|
this.decoder = this.iconv.getDecoder(encoding, this.options);
|
|
38038
38038
|
var resStr = "";
|
|
38039
|
-
for (var i
|
|
38039
|
+
for (var i = 0; i < this.initialBufs.length; i++) resStr += this.decoder.write(this.initialBufs[i]);
|
|
38040
38040
|
var trail = this.decoder.end();
|
|
38041
38041
|
if (trail) resStr += trail;
|
|
38042
38042
|
this.initialBufs.length = this.initialBufsLen = 0;
|
|
@@ -38044,13 +38044,13 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38044
38044
|
}
|
|
38045
38045
|
return this.decoder.end();
|
|
38046
38046
|
};
|
|
38047
|
-
function detectEncoding
|
|
38047
|
+
function detectEncoding(bufs, defaultEncoding) {
|
|
38048
38048
|
var b = [];
|
|
38049
38049
|
var charsProcessed = 0;
|
|
38050
38050
|
var invalidLE = 0, invalidBE = 0;
|
|
38051
38051
|
var bmpCharsLE = 0, bmpCharsBE = 0;
|
|
38052
|
-
outer_loop: for (var i
|
|
38053
|
-
var buf = bufs[i
|
|
38052
|
+
outer_loop: for (var i = 0; i < bufs.length; i++) {
|
|
38053
|
+
var buf = bufs[i];
|
|
38054
38054
|
for (var j = 0; j < buf.length; j++) {
|
|
38055
38055
|
b.push(buf[j]);
|
|
38056
38056
|
if (b.length === 4) {
|
|
@@ -38077,7 +38077,7 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38077
38077
|
//#endregion
|
|
38078
38078
|
//#region node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf16.js
|
|
38079
38079
|
var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38080
|
-
var Buffer
|
|
38080
|
+
var Buffer = require_safer().Buffer;
|
|
38081
38081
|
exports.utf16be = Utf16BECodec;
|
|
38082
38082
|
function Utf16BECodec() {}
|
|
38083
38083
|
Utf16BECodec.prototype.encoder = Utf16BEEncoder;
|
|
@@ -38085,11 +38085,11 @@ var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38085
38085
|
Utf16BECodec.prototype.bomAware = true;
|
|
38086
38086
|
function Utf16BEEncoder() {}
|
|
38087
38087
|
Utf16BEEncoder.prototype.write = function(str) {
|
|
38088
|
-
var buf = Buffer
|
|
38089
|
-
for (var i
|
|
38090
|
-
var tmp = buf[i
|
|
38091
|
-
buf[i
|
|
38092
|
-
buf[i
|
|
38088
|
+
var buf = Buffer.from(str, "ucs2");
|
|
38089
|
+
for (var i = 0; i < buf.length; i += 2) {
|
|
38090
|
+
var tmp = buf[i];
|
|
38091
|
+
buf[i] = buf[i + 1];
|
|
38092
|
+
buf[i + 1] = tmp;
|
|
38093
38093
|
}
|
|
38094
38094
|
return buf;
|
|
38095
38095
|
};
|
|
@@ -38099,26 +38099,26 @@ var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38099
38099
|
}
|
|
38100
38100
|
Utf16BEDecoder.prototype.write = function(buf) {
|
|
38101
38101
|
if (buf.length == 0) return "";
|
|
38102
|
-
var buf2 = Buffer
|
|
38102
|
+
var buf2 = Buffer.alloc(buf.length + 1), i = 0, j = 0;
|
|
38103
38103
|
if (this.overflowByte !== -1) {
|
|
38104
38104
|
buf2[0] = buf[0];
|
|
38105
38105
|
buf2[1] = this.overflowByte;
|
|
38106
|
-
i
|
|
38106
|
+
i = 1;
|
|
38107
38107
|
j = 2;
|
|
38108
38108
|
}
|
|
38109
|
-
for (; i
|
|
38110
|
-
buf2[j] = buf[i
|
|
38111
|
-
buf2[j + 1] = buf[i
|
|
38109
|
+
for (; i < buf.length - 1; i += 2, j += 2) {
|
|
38110
|
+
buf2[j] = buf[i + 1];
|
|
38111
|
+
buf2[j + 1] = buf[i];
|
|
38112
38112
|
}
|
|
38113
|
-
this.overflowByte = i
|
|
38113
|
+
this.overflowByte = i == buf.length - 1 ? buf[buf.length - 1] : -1;
|
|
38114
38114
|
return buf2.slice(0, j).toString("ucs2");
|
|
38115
38115
|
};
|
|
38116
38116
|
Utf16BEDecoder.prototype.end = function() {
|
|
38117
38117
|
this.overflowByte = -1;
|
|
38118
38118
|
};
|
|
38119
38119
|
exports.utf16 = Utf16Codec;
|
|
38120
|
-
function Utf16Codec(codecOptions, iconv
|
|
38121
|
-
this.iconv = iconv
|
|
38120
|
+
function Utf16Codec(codecOptions, iconv) {
|
|
38121
|
+
this.iconv = iconv;
|
|
38122
38122
|
}
|
|
38123
38123
|
Utf16Codec.prototype.encoder = Utf16Encoder;
|
|
38124
38124
|
Utf16Codec.prototype.decoder = Utf16Decoder;
|
|
@@ -38148,7 +38148,7 @@ var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38148
38148
|
var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
|
|
38149
38149
|
this.decoder = this.iconv.getDecoder(encoding, this.options);
|
|
38150
38150
|
var resStr = "";
|
|
38151
|
-
for (var i
|
|
38151
|
+
for (var i = 0; i < this.initialBufs.length; i++) resStr += this.decoder.write(this.initialBufs[i]);
|
|
38152
38152
|
this.initialBufs.length = this.initialBufsLen = 0;
|
|
38153
38153
|
return resStr;
|
|
38154
38154
|
}
|
|
@@ -38159,7 +38159,7 @@ var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38159
38159
|
var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
|
|
38160
38160
|
this.decoder = this.iconv.getDecoder(encoding, this.options);
|
|
38161
38161
|
var resStr = "";
|
|
38162
|
-
for (var i
|
|
38162
|
+
for (var i = 0; i < this.initialBufs.length; i++) resStr += this.decoder.write(this.initialBufs[i]);
|
|
38163
38163
|
var trail = this.decoder.end();
|
|
38164
38164
|
if (trail) resStr += trail;
|
|
38165
38165
|
this.initialBufs.length = this.initialBufsLen = 0;
|
|
@@ -38171,8 +38171,8 @@ var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38171
38171
|
var b = [];
|
|
38172
38172
|
var charsProcessed = 0;
|
|
38173
38173
|
var asciiCharsLE = 0, asciiCharsBE = 0;
|
|
38174
|
-
outer_loop: for (var i
|
|
38175
|
-
var buf = bufs[i
|
|
38174
|
+
outer_loop: for (var i = 0; i < bufs.length; i++) {
|
|
38175
|
+
var buf = bufs[i];
|
|
38176
38176
|
for (var j = 0; j < buf.length; j++) {
|
|
38177
38177
|
b.push(buf[j]);
|
|
38178
38178
|
if (b.length === 2) {
|
|
@@ -38197,11 +38197,11 @@ var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38197
38197
|
//#endregion
|
|
38198
38198
|
//#region node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf7.js
|
|
38199
38199
|
var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38200
|
-
var Buffer
|
|
38200
|
+
var Buffer = require_safer().Buffer;
|
|
38201
38201
|
exports.utf7 = Utf7Codec;
|
|
38202
38202
|
exports.unicode11utf7 = "utf7";
|
|
38203
|
-
function Utf7Codec(codecOptions, iconv
|
|
38204
|
-
this.iconv = iconv
|
|
38203
|
+
function Utf7Codec(codecOptions, iconv) {
|
|
38204
|
+
this.iconv = iconv;
|
|
38205
38205
|
}
|
|
38206
38206
|
Utf7Codec.prototype.encoder = Utf7Encoder;
|
|
38207
38207
|
Utf7Codec.prototype.decoder = Utf7Decoder;
|
|
@@ -38211,7 +38211,7 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38211
38211
|
this.iconv = codec.iconv;
|
|
38212
38212
|
}
|
|
38213
38213
|
Utf7Encoder.prototype.write = function(str) {
|
|
38214
|
-
return Buffer
|
|
38214
|
+
return Buffer.from(str.replace(nonDirectChars, function(chunk) {
|
|
38215
38215
|
return "+" + (chunk === "+" ? "" : this.iconv.encode(chunk, "utf16-be").toString("base64").replace(/=+$/, "")) + "-";
|
|
38216
38216
|
}.bind(this)));
|
|
38217
38217
|
};
|
|
@@ -38223,24 +38223,24 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38223
38223
|
}
|
|
38224
38224
|
var base64Regex = /[A-Za-z0-9\/+]/;
|
|
38225
38225
|
var base64Chars = [];
|
|
38226
|
-
for (var i
|
|
38226
|
+
for (var i = 0; i < 256; i++) base64Chars[i] = base64Regex.test(String.fromCharCode(i));
|
|
38227
38227
|
var plusChar = "+".charCodeAt(0), minusChar = "-".charCodeAt(0), andChar = "&".charCodeAt(0);
|
|
38228
38228
|
Utf7Decoder.prototype.write = function(buf) {
|
|
38229
38229
|
var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum;
|
|
38230
|
-
for (var i
|
|
38231
|
-
if (buf[i
|
|
38232
|
-
res += this.iconv.decode(buf.slice(lastI, i
|
|
38233
|
-
lastI = i
|
|
38230
|
+
for (var i = 0; i < buf.length; i++) if (!inBase64) {
|
|
38231
|
+
if (buf[i] == plusChar) {
|
|
38232
|
+
res += this.iconv.decode(buf.slice(lastI, i), "ascii");
|
|
38233
|
+
lastI = i + 1;
|
|
38234
38234
|
inBase64 = true;
|
|
38235
38235
|
}
|
|
38236
|
-
} else if (!base64Chars[buf[i
|
|
38237
|
-
if (i
|
|
38236
|
+
} else if (!base64Chars[buf[i]]) {
|
|
38237
|
+
if (i == lastI && buf[i] == minusChar) res += "+";
|
|
38238
38238
|
else {
|
|
38239
|
-
var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i
|
|
38240
|
-
res += this.iconv.decode(Buffer
|
|
38239
|
+
var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii");
|
|
38240
|
+
res += this.iconv.decode(Buffer.from(b64str, "base64"), "utf16-be");
|
|
38241
38241
|
}
|
|
38242
|
-
if (buf[i
|
|
38243
|
-
lastI = i
|
|
38242
|
+
if (buf[i] != minusChar) i--;
|
|
38243
|
+
lastI = i + 1;
|
|
38244
38244
|
inBase64 = false;
|
|
38245
38245
|
base64Accum = "";
|
|
38246
38246
|
}
|
|
@@ -38250,7 +38250,7 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38250
38250
|
var canBeDecoded = b64str.length - b64str.length % 8;
|
|
38251
38251
|
base64Accum = b64str.slice(canBeDecoded);
|
|
38252
38252
|
b64str = b64str.slice(0, canBeDecoded);
|
|
38253
|
-
res += this.iconv.decode(Buffer
|
|
38253
|
+
res += this.iconv.decode(Buffer.from(b64str, "base64"), "utf16-be");
|
|
38254
38254
|
}
|
|
38255
38255
|
this.inBase64 = inBase64;
|
|
38256
38256
|
this.base64Accum = base64Accum;
|
|
@@ -38258,14 +38258,14 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38258
38258
|
};
|
|
38259
38259
|
Utf7Decoder.prototype.end = function() {
|
|
38260
38260
|
var res = "";
|
|
38261
|
-
if (this.inBase64 && this.base64Accum.length > 0) res = this.iconv.decode(Buffer
|
|
38261
|
+
if (this.inBase64 && this.base64Accum.length > 0) res = this.iconv.decode(Buffer.from(this.base64Accum, "base64"), "utf16-be");
|
|
38262
38262
|
this.inBase64 = false;
|
|
38263
38263
|
this.base64Accum = "";
|
|
38264
38264
|
return res;
|
|
38265
38265
|
};
|
|
38266
38266
|
exports.utf7imap = Utf7IMAPCodec;
|
|
38267
|
-
function Utf7IMAPCodec(codecOptions, iconv
|
|
38268
|
-
this.iconv = iconv
|
|
38267
|
+
function Utf7IMAPCodec(codecOptions, iconv) {
|
|
38268
|
+
this.iconv = iconv;
|
|
38269
38269
|
}
|
|
38270
38270
|
Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder;
|
|
38271
38271
|
Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder;
|
|
@@ -38273,13 +38273,13 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38273
38273
|
function Utf7IMAPEncoder(options, codec) {
|
|
38274
38274
|
this.iconv = codec.iconv;
|
|
38275
38275
|
this.inBase64 = false;
|
|
38276
|
-
this.base64Accum = Buffer
|
|
38276
|
+
this.base64Accum = Buffer.alloc(6);
|
|
38277
38277
|
this.base64AccumIdx = 0;
|
|
38278
38278
|
}
|
|
38279
38279
|
Utf7IMAPEncoder.prototype.write = function(str) {
|
|
38280
|
-
var inBase64 = this.inBase64, base64Accum = this.base64Accum, base64AccumIdx = this.base64AccumIdx, buf = Buffer
|
|
38281
|
-
for (var i
|
|
38282
|
-
var uChar = str.charCodeAt(i
|
|
38280
|
+
var inBase64 = this.inBase64, base64Accum = this.base64Accum, base64AccumIdx = this.base64AccumIdx, buf = Buffer.alloc(str.length * 5 + 10), bufIdx = 0;
|
|
38281
|
+
for (var i = 0; i < str.length; i++) {
|
|
38282
|
+
var uChar = str.charCodeAt(i);
|
|
38283
38283
|
if (32 <= uChar && uChar <= 126) {
|
|
38284
38284
|
if (inBase64) {
|
|
38285
38285
|
if (base64AccumIdx > 0) {
|
|
@@ -38313,7 +38313,7 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38313
38313
|
return buf.slice(0, bufIdx);
|
|
38314
38314
|
};
|
|
38315
38315
|
Utf7IMAPEncoder.prototype.end = function() {
|
|
38316
|
-
var buf = Buffer
|
|
38316
|
+
var buf = Buffer.alloc(10), bufIdx = 0;
|
|
38317
38317
|
if (this.inBase64) {
|
|
38318
38318
|
if (this.base64AccumIdx > 0) {
|
|
38319
38319
|
bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), bufIdx);
|
|
@@ -38333,20 +38333,20 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38333
38333
|
base64IMAPChars[",".charCodeAt(0)] = true;
|
|
38334
38334
|
Utf7IMAPDecoder.prototype.write = function(buf) {
|
|
38335
38335
|
var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum;
|
|
38336
|
-
for (var i
|
|
38337
|
-
if (buf[i
|
|
38338
|
-
res += this.iconv.decode(buf.slice(lastI, i
|
|
38339
|
-
lastI = i
|
|
38336
|
+
for (var i = 0; i < buf.length; i++) if (!inBase64) {
|
|
38337
|
+
if (buf[i] == andChar) {
|
|
38338
|
+
res += this.iconv.decode(buf.slice(lastI, i), "ascii");
|
|
38339
|
+
lastI = i + 1;
|
|
38340
38340
|
inBase64 = true;
|
|
38341
38341
|
}
|
|
38342
|
-
} else if (!base64IMAPChars[buf[i
|
|
38343
|
-
if (i
|
|
38342
|
+
} else if (!base64IMAPChars[buf[i]]) {
|
|
38343
|
+
if (i == lastI && buf[i] == minusChar) res += "&";
|
|
38344
38344
|
else {
|
|
38345
|
-
var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i
|
|
38346
|
-
res += this.iconv.decode(Buffer
|
|
38345
|
+
var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, "/");
|
|
38346
|
+
res += this.iconv.decode(Buffer.from(b64str, "base64"), "utf16-be");
|
|
38347
38347
|
}
|
|
38348
|
-
if (buf[i
|
|
38349
|
-
lastI = i
|
|
38348
|
+
if (buf[i] != minusChar) i--;
|
|
38349
|
+
lastI = i + 1;
|
|
38350
38350
|
inBase64 = false;
|
|
38351
38351
|
base64Accum = "";
|
|
38352
38352
|
}
|
|
@@ -38356,7 +38356,7 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38356
38356
|
var canBeDecoded = b64str.length - b64str.length % 8;
|
|
38357
38357
|
base64Accum = b64str.slice(canBeDecoded);
|
|
38358
38358
|
b64str = b64str.slice(0, canBeDecoded);
|
|
38359
|
-
res += this.iconv.decode(Buffer
|
|
38359
|
+
res += this.iconv.decode(Buffer.from(b64str, "base64"), "utf16-be");
|
|
38360
38360
|
}
|
|
38361
38361
|
this.inBase64 = inBase64;
|
|
38362
38362
|
this.base64Accum = base64Accum;
|
|
@@ -38364,7 +38364,7 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38364
38364
|
};
|
|
38365
38365
|
Utf7IMAPDecoder.prototype.end = function() {
|
|
38366
38366
|
var res = "";
|
|
38367
|
-
if (this.inBase64 && this.base64Accum.length > 0) res = this.iconv.decode(Buffer
|
|
38367
|
+
if (this.inBase64 && this.base64Accum.length > 0) res = this.iconv.decode(Buffer.from(this.base64Accum, "base64"), "utf16-be");
|
|
38368
38368
|
this.inBase64 = false;
|
|
38369
38369
|
this.base64Accum = "";
|
|
38370
38370
|
return res;
|
|
@@ -38374,19 +38374,19 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38374
38374
|
//#endregion
|
|
38375
38375
|
//#region node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-codec.js
|
|
38376
38376
|
var require_sbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38377
|
-
var Buffer
|
|
38377
|
+
var Buffer = require_safer().Buffer;
|
|
38378
38378
|
exports._sbcs = SBCSCodec;
|
|
38379
|
-
function SBCSCodec(codecOptions, iconv
|
|
38379
|
+
function SBCSCodec(codecOptions, iconv) {
|
|
38380
38380
|
if (!codecOptions) throw new Error("SBCS codec is called without the data.");
|
|
38381
38381
|
if (!codecOptions.chars || codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256) throw new Error("Encoding '" + codecOptions.type + "' has incorrect 'chars' (must be of len 128 or 256)");
|
|
38382
38382
|
if (codecOptions.chars.length === 128) {
|
|
38383
38383
|
var asciiString = "";
|
|
38384
|
-
for (var i
|
|
38384
|
+
for (var i = 0; i < 128; i++) asciiString += String.fromCharCode(i);
|
|
38385
38385
|
codecOptions.chars = asciiString + codecOptions.chars;
|
|
38386
38386
|
}
|
|
38387
|
-
this.decodeBuf = Buffer
|
|
38388
|
-
var encodeBuf = Buffer
|
|
38389
|
-
for (var i
|
|
38387
|
+
this.decodeBuf = Buffer.from(codecOptions.chars, "ucs2");
|
|
38388
|
+
var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));
|
|
38389
|
+
for (var i = 0; i < codecOptions.chars.length; i++) encodeBuf[codecOptions.chars.charCodeAt(i)] = i;
|
|
38390
38390
|
this.encodeBuf = encodeBuf;
|
|
38391
38391
|
}
|
|
38392
38392
|
SBCSCodec.prototype.encoder = SBCSEncoder;
|
|
@@ -38395,8 +38395,8 @@ var require_sbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38395
38395
|
this.encodeBuf = codec.encodeBuf;
|
|
38396
38396
|
}
|
|
38397
38397
|
SBCSEncoder.prototype.write = function(str) {
|
|
38398
|
-
var buf = Buffer
|
|
38399
|
-
for (var i
|
|
38398
|
+
var buf = Buffer.alloc(str.length);
|
|
38399
|
+
for (var i = 0; i < str.length; i++) buf[i] = this.encodeBuf[str.charCodeAt(i)];
|
|
38400
38400
|
return buf;
|
|
38401
38401
|
};
|
|
38402
38402
|
SBCSEncoder.prototype.end = function() {};
|
|
@@ -38405,11 +38405,11 @@ var require_sbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38405
38405
|
}
|
|
38406
38406
|
SBCSDecoder.prototype.write = function(buf) {
|
|
38407
38407
|
var decodeBuf = this.decodeBuf;
|
|
38408
|
-
var newBuf = Buffer
|
|
38408
|
+
var newBuf = Buffer.alloc(buf.length * 2);
|
|
38409
38409
|
var idx1 = 0, idx2 = 0;
|
|
38410
|
-
for (var i
|
|
38411
|
-
idx1 = buf[i
|
|
38412
|
-
idx2 = i
|
|
38410
|
+
for (var i = 0; i < buf.length; i++) {
|
|
38411
|
+
idx1 = buf[i] * 2;
|
|
38412
|
+
idx2 = i * 2;
|
|
38413
38413
|
newBuf[idx2] = decodeBuf[idx1];
|
|
38414
38414
|
newBuf[idx2 + 1] = decodeBuf[idx1 + 1];
|
|
38415
38415
|
}
|
|
@@ -39023,19 +39023,19 @@ var require_sbcs_data_generated = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
39023
39023
|
//#endregion
|
|
39024
39024
|
//#region node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-codec.js
|
|
39025
39025
|
var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
39026
|
-
var Buffer
|
|
39026
|
+
var Buffer = require_safer().Buffer;
|
|
39027
39027
|
exports._dbcs = DBCSCodec;
|
|
39028
39028
|
var UNASSIGNED = -1, GB18030_CODE = -2, SEQ_START = -10, NODE_START = -1e3, UNASSIGNED_NODE = new Array(256), DEF_CHAR = -1;
|
|
39029
|
-
for (var i
|
|
39030
|
-
function DBCSCodec(codecOptions, iconv
|
|
39029
|
+
for (var i = 0; i < 256; i++) UNASSIGNED_NODE[i] = UNASSIGNED;
|
|
39030
|
+
function DBCSCodec(codecOptions, iconv) {
|
|
39031
39031
|
this.encodingName = codecOptions.encodingName;
|
|
39032
39032
|
if (!codecOptions) throw new Error("DBCS codec is called without the data.");
|
|
39033
39033
|
if (!codecOptions.table) throw new Error("Encoding '" + this.encodingName + "' has no data.");
|
|
39034
|
-
var mappingTable
|
|
39034
|
+
var mappingTable = codecOptions.table();
|
|
39035
39035
|
this.decodeTables = [];
|
|
39036
39036
|
this.decodeTables[0] = UNASSIGNED_NODE.slice(0);
|
|
39037
39037
|
this.decodeTableSeq = [];
|
|
39038
|
-
for (var i
|
|
39038
|
+
for (var i = 0; i < mappingTable.length; i++) this._addDecodeChunk(mappingTable[i]);
|
|
39039
39039
|
if (typeof codecOptions.gb18030 === "function") {
|
|
39040
39040
|
this.gb18030 = codecOptions.gb18030();
|
|
39041
39041
|
var commonThirdByteNodeIdx = this.decodeTables.length;
|
|
@@ -39043,8 +39043,8 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39043
39043
|
var commonFourthByteNodeIdx = this.decodeTables.length;
|
|
39044
39044
|
this.decodeTables.push(UNASSIGNED_NODE.slice(0));
|
|
39045
39045
|
var firstByteNode = this.decodeTables[0];
|
|
39046
|
-
for (var i
|
|
39047
|
-
var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i
|
|
39046
|
+
for (var i = 129; i <= 254; i++) {
|
|
39047
|
+
var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]];
|
|
39048
39048
|
for (var j = 48; j <= 57; j++) {
|
|
39049
39049
|
if (secondByteNode[j] === UNASSIGNED) secondByteNode[j] = NODE_START - commonThirdByteNodeIdx;
|
|
39050
39050
|
else if (secondByteNode[j] > NODE_START) throw new Error("gb18030 decode tables conflict at byte 2");
|
|
@@ -39059,12 +39059,12 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39059
39059
|
}
|
|
39060
39060
|
}
|
|
39061
39061
|
}
|
|
39062
|
-
this.defaultCharUnicode = iconv
|
|
39062
|
+
this.defaultCharUnicode = iconv.defaultCharUnicode;
|
|
39063
39063
|
this.encodeTable = [];
|
|
39064
39064
|
this.encodeTableSeq = [];
|
|
39065
39065
|
var skipEncodeChars = {};
|
|
39066
|
-
if (codecOptions.encodeSkipVals) for (var i
|
|
39067
|
-
var val = codecOptions.encodeSkipVals[i
|
|
39066
|
+
if (codecOptions.encodeSkipVals) for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) {
|
|
39067
|
+
var val = codecOptions.encodeSkipVals[i];
|
|
39068
39068
|
if (typeof val === "number") skipEncodeChars[val] = true;
|
|
39069
39069
|
else for (var j = val.from; j <= val.to; j++) skipEncodeChars[j] = true;
|
|
39070
39070
|
}
|
|
@@ -39072,7 +39072,7 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39072
39072
|
if (codecOptions.encodeAdd) {
|
|
39073
39073
|
for (var uChar in codecOptions.encodeAdd) if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]);
|
|
39074
39074
|
}
|
|
39075
|
-
this.defCharSB = this.encodeTable[0][iconv
|
|
39075
|
+
this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];
|
|
39076
39076
|
if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]["?"];
|
|
39077
39077
|
if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0);
|
|
39078
39078
|
}
|
|
@@ -39083,10 +39083,10 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39083
39083
|
for (; addr > 0; addr >>>= 8) bytes.push(addr & 255);
|
|
39084
39084
|
if (bytes.length == 0) bytes.push(0);
|
|
39085
39085
|
var node = this.decodeTables[0];
|
|
39086
|
-
for (var i
|
|
39087
|
-
var val = node[bytes[i
|
|
39086
|
+
for (var i = bytes.length - 1; i > 0; i--) {
|
|
39087
|
+
var val = node[bytes[i]];
|
|
39088
39088
|
if (val == UNASSIGNED) {
|
|
39089
|
-
node[bytes[i
|
|
39089
|
+
node[bytes[i]] = NODE_START - this.decodeTables.length;
|
|
39090
39090
|
this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));
|
|
39091
39091
|
} else if (val <= NODE_START) node = this.decodeTables[NODE_START - val];
|
|
39092
39092
|
else throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16));
|
|
@@ -39158,9 +39158,9 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39158
39158
|
var node = this.decodeTables[nodeIdx];
|
|
39159
39159
|
var hasValues = false;
|
|
39160
39160
|
var subNodeEmpty = {};
|
|
39161
|
-
for (var i
|
|
39162
|
-
var uCode = node[i
|
|
39163
|
-
var mbCode = prefix + i
|
|
39161
|
+
for (var i = 0; i < 256; i++) {
|
|
39162
|
+
var uCode = node[i];
|
|
39163
|
+
var mbCode = prefix + i;
|
|
39164
39164
|
if (skipEncodeChars[mbCode]) continue;
|
|
39165
39165
|
if (uCode >= 0) {
|
|
39166
39166
|
this._setEncodeChar(uCode, mbCode);
|
|
@@ -39188,11 +39188,11 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39188
39188
|
this.gb18030 = codec.gb18030;
|
|
39189
39189
|
}
|
|
39190
39190
|
DBCSEncoder.prototype.write = function(str) {
|
|
39191
|
-
var newBuf = Buffer
|
|
39191
|
+
var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), leadSurrogate = this.leadSurrogate, seqObj = this.seqObj, nextChar = -1, i = 0, j = 0;
|
|
39192
39192
|
while (true) {
|
|
39193
39193
|
if (nextChar === -1) {
|
|
39194
|
-
if (i
|
|
39195
|
-
var uCode = str.charCodeAt(i
|
|
39194
|
+
if (i == str.length) break;
|
|
39195
|
+
var uCode = str.charCodeAt(i++);
|
|
39196
39196
|
} else {
|
|
39197
39197
|
var uCode = nextChar;
|
|
39198
39198
|
nextChar = -1;
|
|
@@ -39272,7 +39272,7 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39272
39272
|
};
|
|
39273
39273
|
DBCSEncoder.prototype.end = function() {
|
|
39274
39274
|
if (this.leadSurrogate === -1 && this.seqObj === void 0) return;
|
|
39275
|
-
var newBuf = Buffer
|
|
39275
|
+
var newBuf = Buffer.alloc(10), j = 0;
|
|
39276
39276
|
if (this.seqObj) {
|
|
39277
39277
|
var dbcsCode = this.seqObj[DEF_CHAR];
|
|
39278
39278
|
if (dbcsCode !== void 0) if (dbcsCode < 256) newBuf[j++] = dbcsCode;
|
|
@@ -39298,16 +39298,16 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39298
39298
|
this.gb18030 = codec.gb18030;
|
|
39299
39299
|
}
|
|
39300
39300
|
DBCSDecoder.prototype.write = function(buf) {
|
|
39301
|
-
var newBuf = Buffer
|
|
39302
|
-
for (var i
|
|
39303
|
-
var curByte = i
|
|
39301
|
+
var newBuf = Buffer.alloc(buf.length * 2), nodeIdx = this.nodeIdx, prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, seqStart = -this.prevBytes.length, uCode;
|
|
39302
|
+
for (var i = 0, j = 0; i < buf.length; i++) {
|
|
39303
|
+
var curByte = i >= 0 ? buf[i] : prevBytes[i + prevOffset];
|
|
39304
39304
|
var uCode = this.decodeTables[nodeIdx][curByte];
|
|
39305
39305
|
if (uCode >= 0) {} else if (uCode === UNASSIGNED) {
|
|
39306
39306
|
uCode = this.defaultCharUnicode.charCodeAt(0);
|
|
39307
|
-
i
|
|
39307
|
+
i = seqStart;
|
|
39308
39308
|
} else if (uCode === GB18030_CODE) {
|
|
39309
|
-
if (i
|
|
39310
|
-
else var ptr = (prevBytes[i
|
|
39309
|
+
if (i >= 3) var ptr = (buf[i - 3] - 129) * 12600 + (buf[i - 2] - 48) * 1260 + (buf[i - 1] - 129) * 10 + (curByte - 48);
|
|
39310
|
+
else var ptr = (prevBytes[i - 3 + prevOffset] - 129) * 12600 + ((i - 2 >= 0 ? buf[i - 2] : prevBytes[i - 2 + prevOffset]) - 48) * 1260 + ((i - 1 >= 0 ? buf[i - 1] : prevBytes[i - 1 + prevOffset]) - 129) * 10 + (curByte - 48);
|
|
39311
39311
|
var idx = findIdx(this.gb18030.gbChars, ptr);
|
|
39312
39312
|
uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];
|
|
39313
39313
|
} else if (uCode <= NODE_START) {
|
|
@@ -39332,7 +39332,7 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39332
39332
|
newBuf[j++] = uCode & 255;
|
|
39333
39333
|
newBuf[j++] = uCode >> 8;
|
|
39334
39334
|
nodeIdx = 0;
|
|
39335
|
-
seqStart = i
|
|
39335
|
+
seqStart = i + 1;
|
|
39336
39336
|
}
|
|
39337
39337
|
this.nodeIdx = nodeIdx;
|
|
39338
39338
|
this.prevBytes = seqStart >= 0 ? Array.prototype.slice.call(buf, seqStart) : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf));
|
|
@@ -46117,17 +46117,17 @@ var require_encodings = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
46117
46117
|
require_dbcs_data()
|
|
46118
46118
|
];
|
|
46119
46119
|
for (var i = 0; i < modules.length; i++) {
|
|
46120
|
-
var module
|
|
46121
|
-
for (var enc in module
|
|
46120
|
+
var module = modules[i];
|
|
46121
|
+
for (var enc in module) if (Object.prototype.hasOwnProperty.call(module, enc)) exports[enc] = module[enc];
|
|
46122
46122
|
}
|
|
46123
46123
|
}));
|
|
46124
46124
|
|
|
46125
46125
|
//#endregion
|
|
46126
46126
|
//#region node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/streams.js
|
|
46127
46127
|
var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
46128
|
-
var Buffer
|
|
46129
|
-
module.exports = function(stream_module
|
|
46130
|
-
var Transform = stream_module
|
|
46128
|
+
var Buffer = require_safer().Buffer;
|
|
46129
|
+
module.exports = function(stream_module) {
|
|
46130
|
+
var Transform = stream_module.Transform;
|
|
46131
46131
|
function IconvLiteEncoderStream(conv, options) {
|
|
46132
46132
|
this.conv = conv;
|
|
46133
46133
|
options = options || {};
|
|
@@ -46161,7 +46161,7 @@ var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46161
46161
|
chunks.push(chunk);
|
|
46162
46162
|
});
|
|
46163
46163
|
this.on("end", function() {
|
|
46164
|
-
cb(null, Buffer
|
|
46164
|
+
cb(null, Buffer.concat(chunks));
|
|
46165
46165
|
});
|
|
46166
46166
|
return this;
|
|
46167
46167
|
};
|
|
@@ -46173,7 +46173,7 @@ var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46173
46173
|
}
|
|
46174
46174
|
IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { constructor: { value: IconvLiteDecoderStream } });
|
|
46175
46175
|
IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
|
|
46176
|
-
if (!Buffer
|
|
46176
|
+
if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) return done(/* @__PURE__ */ new Error("Iconv decoding stream needs buffers as its input."));
|
|
46177
46177
|
try {
|
|
46178
46178
|
var res = this.conv.write(chunk);
|
|
46179
46179
|
if (res && res.length) this.push(res, this.encoding);
|
|
@@ -46212,7 +46212,7 @@ var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46212
46212
|
//#endregion
|
|
46213
46213
|
//#region node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.js
|
|
46214
46214
|
var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
46215
|
-
var Buffer
|
|
46215
|
+
var Buffer = require_safer().Buffer;
|
|
46216
46216
|
var bomHandling = require_bom_handling(), iconv = module.exports;
|
|
46217
46217
|
iconv.encodings = null;
|
|
46218
46218
|
iconv.defaultCharUnicode = "�";
|
|
@@ -46222,7 +46222,7 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46222
46222
|
var encoder = iconv.getEncoder(encoding, options);
|
|
46223
46223
|
var res = encoder.write(str);
|
|
46224
46224
|
var trail = encoder.end();
|
|
46225
|
-
return trail && trail.length > 0 ? Buffer
|
|
46225
|
+
return trail && trail.length > 0 ? Buffer.concat([res, trail]) : res;
|
|
46226
46226
|
};
|
|
46227
46227
|
iconv.decode = function decode(buf, encoding, options) {
|
|
46228
46228
|
if (typeof buf === "string") {
|
|
@@ -46230,16 +46230,16 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46230
46230
|
console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding");
|
|
46231
46231
|
iconv.skipDecodeWarning = true;
|
|
46232
46232
|
}
|
|
46233
|
-
buf = Buffer
|
|
46233
|
+
buf = Buffer.from("" + (buf || ""), "binary");
|
|
46234
46234
|
}
|
|
46235
46235
|
var decoder = iconv.getDecoder(encoding, options);
|
|
46236
46236
|
var res = decoder.write(buf);
|
|
46237
46237
|
var trail = decoder.end();
|
|
46238
46238
|
return trail ? res + trail : res;
|
|
46239
46239
|
};
|
|
46240
|
-
iconv.encodingExists = function encodingExists(enc
|
|
46240
|
+
iconv.encodingExists = function encodingExists(enc) {
|
|
46241
46241
|
try {
|
|
46242
|
-
iconv.getCodec(enc
|
|
46242
|
+
iconv.getCodec(enc);
|
|
46243
46243
|
return true;
|
|
46244
46244
|
} catch (e) {
|
|
46245
46245
|
return false;
|
|
@@ -46250,27 +46250,27 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46250
46250
|
iconv._codecDataCache = {};
|
|
46251
46251
|
iconv.getCodec = function getCodec(encoding) {
|
|
46252
46252
|
if (!iconv.encodings) iconv.encodings = require_encodings();
|
|
46253
|
-
var enc
|
|
46253
|
+
var enc = iconv._canonicalizeEncoding(encoding);
|
|
46254
46254
|
var codecOptions = {};
|
|
46255
46255
|
while (true) {
|
|
46256
|
-
var codec = iconv._codecDataCache[enc
|
|
46256
|
+
var codec = iconv._codecDataCache[enc];
|
|
46257
46257
|
if (codec) return codec;
|
|
46258
|
-
var codecDef = iconv.encodings[enc
|
|
46258
|
+
var codecDef = iconv.encodings[enc];
|
|
46259
46259
|
switch (typeof codecDef) {
|
|
46260
46260
|
case "string":
|
|
46261
|
-
enc
|
|
46261
|
+
enc = codecDef;
|
|
46262
46262
|
break;
|
|
46263
46263
|
case "object":
|
|
46264
|
-
for (var key
|
|
46265
|
-
if (!codecOptions.encodingName) codecOptions.encodingName = enc
|
|
46266
|
-
enc
|
|
46264
|
+
for (var key in codecDef) codecOptions[key] = codecDef[key];
|
|
46265
|
+
if (!codecOptions.encodingName) codecOptions.encodingName = enc;
|
|
46266
|
+
enc = codecDef.type;
|
|
46267
46267
|
break;
|
|
46268
46268
|
case "function":
|
|
46269
|
-
if (!codecOptions.encodingName) codecOptions.encodingName = enc
|
|
46269
|
+
if (!codecOptions.encodingName) codecOptions.encodingName = enc;
|
|
46270
46270
|
codec = new codecDef(codecOptions, iconv);
|
|
46271
46271
|
iconv._codecDataCache[codecOptions.encodingName] = codec;
|
|
46272
46272
|
return codec;
|
|
46273
|
-
default: throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '" + enc
|
|
46273
|
+
default: throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '" + enc + "')");
|
|
46274
46274
|
}
|
|
46275
46275
|
}
|
|
46276
46276
|
};
|
|
@@ -46287,9 +46287,9 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46287
46287
|
if (codec.bomAware && !(options && options.stripBOM === false)) decoder = new bomHandling.StripBOM(decoder, options);
|
|
46288
46288
|
return decoder;
|
|
46289
46289
|
};
|
|
46290
|
-
iconv.enableStreamingAPI = function enableStreamingAPI(stream_module
|
|
46290
|
+
iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) {
|
|
46291
46291
|
if (iconv.supportsStreams) return;
|
|
46292
|
-
var streams = require_streams()(stream_module
|
|
46292
|
+
var streams = require_streams()(stream_module);
|
|
46293
46293
|
iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream;
|
|
46294
46294
|
iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream;
|
|
46295
46295
|
iconv.encodeStream = function encodeStream(encoding, options) {
|
|
@@ -46314,7 +46314,7 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46314
46314
|
//#region node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/lib/encoding.js
|
|
46315
46315
|
var require_encoding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
46316
46316
|
var iconvLite = require_lib$2();
|
|
46317
|
-
module.exports.convert = convert
|
|
46317
|
+
module.exports.convert = convert;
|
|
46318
46318
|
/**
|
|
46319
46319
|
* Convert encoding of an UTF-8 string or a buffer
|
|
46320
46320
|
*
|
|
@@ -46323,7 +46323,7 @@ var require_encoding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46323
46323
|
* @param {String} [from='UTF-8'] Encoding to be converted from
|
|
46324
46324
|
* @return {Buffer} Encoded string
|
|
46325
46325
|
*/
|
|
46326
|
-
function convert
|
|
46326
|
+
function convert(str, to, from) {
|
|
46327
46327
|
from = checkEncoding(from || "UTF-8");
|
|
46328
46328
|
to = checkEncoding(to || "UTF-8");
|
|
46329
46329
|
str = str || "";
|
|
@@ -46333,8 +46333,8 @@ var require_encoding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46333
46333
|
else result = str;
|
|
46334
46334
|
else try {
|
|
46335
46335
|
result = convertIconvLite(str, to, from);
|
|
46336
|
-
} catch (E
|
|
46337
|
-
console.error(E
|
|
46336
|
+
} catch (E) {
|
|
46337
|
+
console.error(E);
|
|
46338
46338
|
result = str;
|
|
46339
46339
|
}
|
|
46340
46340
|
if (typeof result === "string") result = Buffer.from(result, "utf-8");
|
|
@@ -46390,8 +46390,8 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46390
46390
|
if (blobParts) {
|
|
46391
46391
|
const a = blobParts;
|
|
46392
46392
|
const length = Number(a.length);
|
|
46393
|
-
for (let i
|
|
46394
|
-
const element = a[i
|
|
46393
|
+
for (let i = 0; i < length; i++) {
|
|
46394
|
+
const element = a[i];
|
|
46395
46395
|
let buffer$1;
|
|
46396
46396
|
if (element instanceof Buffer) buffer$1 = element;
|
|
46397
46397
|
else if (ArrayBuffer.isView(element)) buffer$1 = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
|
|
@@ -46519,8 +46519,8 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46519
46519
|
this.size = size;
|
|
46520
46520
|
this.timeout = timeout;
|
|
46521
46521
|
if (body instanceof Stream$3) body.on("error", function(err) {
|
|
46522
|
-
const error
|
|
46523
|
-
_this[INTERNALS].error = error
|
|
46522
|
+
const error = err.name === "AbortError" ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, "system", err);
|
|
46523
|
+
_this[INTERNALS].error = error;
|
|
46524
46524
|
});
|
|
46525
46525
|
}
|
|
46526
46526
|
Body.prototype = {
|
|
@@ -46578,8 +46578,8 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46578
46578
|
for (const name$1 of Object.getOwnPropertyNames(Body.prototype))
|
|
46579
46579
|
// istanbul ignore else: future proof
|
|
46580
46580
|
if (!(name$1 in proto)) {
|
|
46581
|
-
const desc
|
|
46582
|
-
Object.defineProperty(proto, name$1, desc
|
|
46581
|
+
const desc = Object.getOwnPropertyDescriptor(Body.prototype, name$1);
|
|
46582
|
+
Object.defineProperty(proto, name$1, desc);
|
|
46583
46583
|
}
|
|
46584
46584
|
};
|
|
46585
46585
|
/**
|
|
@@ -46602,23 +46602,23 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46602
46602
|
if (!(body instanceof Stream$3)) return Body.Promise.resolve(Buffer.alloc(0));
|
|
46603
46603
|
let accum = [];
|
|
46604
46604
|
let accumBytes = 0;
|
|
46605
|
-
let abort
|
|
46605
|
+
let abort = false;
|
|
46606
46606
|
return new Body.Promise(function(resolve, reject) {
|
|
46607
46607
|
let resTimeout;
|
|
46608
46608
|
if (_this4.timeout) resTimeout = setTimeout(function() {
|
|
46609
|
-
abort
|
|
46609
|
+
abort = true;
|
|
46610
46610
|
reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, "body-timeout"));
|
|
46611
46611
|
}, _this4.timeout);
|
|
46612
46612
|
body.on("error", function(err) {
|
|
46613
46613
|
if (err.name === "AbortError") {
|
|
46614
|
-
abort
|
|
46614
|
+
abort = true;
|
|
46615
46615
|
reject(err);
|
|
46616
46616
|
} else reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, "system", err));
|
|
46617
46617
|
});
|
|
46618
46618
|
body.on("data", function(chunk) {
|
|
46619
|
-
if (abort
|
|
46619
|
+
if (abort || chunk === null) return;
|
|
46620
46620
|
if (_this4.size && accumBytes + chunk.length > _this4.size) {
|
|
46621
|
-
abort
|
|
46621
|
+
abort = true;
|
|
46622
46622
|
reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, "max-size"));
|
|
46623
46623
|
return;
|
|
46624
46624
|
}
|
|
@@ -46626,7 +46626,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46626
46626
|
accum.push(chunk);
|
|
46627
46627
|
});
|
|
46628
46628
|
body.on("end", function() {
|
|
46629
|
-
if (abort
|
|
46629
|
+
if (abort) return;
|
|
46630
46630
|
clearTimeout(resTimeout);
|
|
46631
46631
|
try {
|
|
46632
46632
|
resolve(Buffer.concat(accum, accumBytes));
|
|
@@ -46647,7 +46647,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46647
46647
|
function convertBody(buffer$1, headers) {
|
|
46648
46648
|
if (typeof convert !== "function") throw new Error("The package `encoding` must be installed to use the textConverted() function");
|
|
46649
46649
|
const ct = headers.get("content-type");
|
|
46650
|
-
let charset
|
|
46650
|
+
let charset = "utf-8";
|
|
46651
46651
|
let res, str;
|
|
46652
46652
|
if (ct) res = /charset=([^;]*)/i.exec(ct);
|
|
46653
46653
|
str = buffer$1.slice(0, 1024).toString();
|
|
@@ -46662,10 +46662,10 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46662
46662
|
}
|
|
46663
46663
|
if (!res && str) res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
|
|
46664
46664
|
if (res) {
|
|
46665
|
-
charset
|
|
46666
|
-
if (charset
|
|
46665
|
+
charset = res.pop();
|
|
46666
|
+
if (charset === "gb2312" || charset === "gbk") charset = "gb18030";
|
|
46667
46667
|
}
|
|
46668
|
-
return convert(buffer$1, "UTF-8", charset
|
|
46668
|
+
return convert(buffer$1, "UTF-8", charset).toString();
|
|
46669
46669
|
}
|
|
46670
46670
|
/**
|
|
46671
46671
|
* Detect a URLSearchParams object
|
|
@@ -46787,7 +46787,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46787
46787
|
*/
|
|
46788
46788
|
function find(map, name$1) {
|
|
46789
46789
|
name$1 = name$1.toLowerCase();
|
|
46790
|
-
for (const key
|
|
46790
|
+
for (const key in map) if (key.toLowerCase() === name$1) return key;
|
|
46791
46791
|
}
|
|
46792
46792
|
const MAP = Symbol("map");
|
|
46793
46793
|
var Headers = class Headers {
|
|
@@ -46820,9 +46820,9 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46820
46820
|
if (pair.length !== 2) throw new TypeError("Each header pair must be a name/value tuple");
|
|
46821
46821
|
this.append(pair[0], pair[1]);
|
|
46822
46822
|
}
|
|
46823
|
-
} else for (const key
|
|
46824
|
-
const value = init[key
|
|
46825
|
-
this.append(key
|
|
46823
|
+
} else for (const key of Object.keys(init)) {
|
|
46824
|
+
const value = init[key];
|
|
46825
|
+
this.append(key, value);
|
|
46826
46826
|
}
|
|
46827
46827
|
} else throw new TypeError("Provided initializer must be an object");
|
|
46828
46828
|
}
|
|
@@ -46835,9 +46835,9 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46835
46835
|
get(name$1) {
|
|
46836
46836
|
name$1 = `${name$1}`;
|
|
46837
46837
|
validateName(name$1);
|
|
46838
|
-
const key
|
|
46839
|
-
if (key
|
|
46840
|
-
return this[MAP][key
|
|
46838
|
+
const key = find(this[MAP], name$1);
|
|
46839
|
+
if (key === void 0) return null;
|
|
46840
|
+
return this[MAP][key].join(", ");
|
|
46841
46841
|
}
|
|
46842
46842
|
/**
|
|
46843
46843
|
* Iterate over all headers
|
|
@@ -46849,13 +46849,13 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46849
46849
|
forEach(callback) {
|
|
46850
46850
|
let thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : void 0;
|
|
46851
46851
|
let pairs = getHeaders(this);
|
|
46852
|
-
let i
|
|
46853
|
-
while (i
|
|
46854
|
-
var _pairs$i = pairs[i
|
|
46852
|
+
let i = 0;
|
|
46853
|
+
while (i < pairs.length) {
|
|
46854
|
+
var _pairs$i = pairs[i];
|
|
46855
46855
|
const name$1 = _pairs$i[0], value = _pairs$i[1];
|
|
46856
46856
|
callback.call(thisArg, value, name$1, this);
|
|
46857
46857
|
pairs = getHeaders(this);
|
|
46858
|
-
i
|
|
46858
|
+
i++;
|
|
46859
46859
|
}
|
|
46860
46860
|
}
|
|
46861
46861
|
/**
|
|
@@ -46870,8 +46870,8 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46870
46870
|
value = `${value}`;
|
|
46871
46871
|
validateName(name$1);
|
|
46872
46872
|
validateValue(value);
|
|
46873
|
-
const key
|
|
46874
|
-
this[MAP][key
|
|
46873
|
+
const key = find(this[MAP], name$1);
|
|
46874
|
+
this[MAP][key !== void 0 ? key : name$1] = [value];
|
|
46875
46875
|
}
|
|
46876
46876
|
/**
|
|
46877
46877
|
* Append a value onto existing header
|
|
@@ -46885,8 +46885,8 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46885
46885
|
value = `${value}`;
|
|
46886
46886
|
validateName(name$1);
|
|
46887
46887
|
validateValue(value);
|
|
46888
|
-
const key
|
|
46889
|
-
if (key
|
|
46888
|
+
const key = find(this[MAP], name$1);
|
|
46889
|
+
if (key !== void 0) this[MAP][key].push(value);
|
|
46890
46890
|
else this[MAP][name$1] = [value];
|
|
46891
46891
|
}
|
|
46892
46892
|
/**
|
|
@@ -46909,8 +46909,8 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
46909
46909
|
delete(name$1) {
|
|
46910
46910
|
name$1 = `${name$1}`;
|
|
46911
46911
|
validateName(name$1);
|
|
46912
|
-
const key
|
|
46913
|
-
if (key
|
|
46912
|
+
const key = find(this[MAP], name$1);
|
|
46913
|
+
if (key !== void 0) delete this[MAP][key];
|
|
46914
46914
|
}
|
|
46915
46915
|
/**
|
|
46916
46916
|
* Return raw headers (non-spec api)
|
|
@@ -47056,8 +47056,8 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
47056
47056
|
const status = opts.status || 200;
|
|
47057
47057
|
const headers = new Headers(opts.headers);
|
|
47058
47058
|
if (body != null && !headers.has("Content-Type")) {
|
|
47059
|
-
const contentType
|
|
47060
|
-
if (contentType
|
|
47059
|
+
const contentType = extractContentType(body);
|
|
47060
|
+
if (contentType) headers.append("Content-Type", contentType);
|
|
47061
47061
|
}
|
|
47062
47062
|
this[INTERNALS$1] = {
|
|
47063
47063
|
url: opts.url,
|
|
@@ -47174,8 +47174,8 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
47174
47174
|
});
|
|
47175
47175
|
const headers = new Headers(init.headers || input.headers || {});
|
|
47176
47176
|
if (inputBody != null && !headers.has("Content-Type")) {
|
|
47177
|
-
const contentType
|
|
47178
|
-
if (contentType
|
|
47177
|
+
const contentType = extractContentType(inputBody);
|
|
47178
|
+
if (contentType) headers.append("Content-Type", contentType);
|
|
47179
47179
|
}
|
|
47180
47180
|
let signal = isRequest(input) ? input.signal : null;
|
|
47181
47181
|
if ("signal" in init) signal = init.signal;
|
|
@@ -47283,7 +47283,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
47283
47283
|
AbortError.prototype.name = "AbortError";
|
|
47284
47284
|
const URL$1 = Url.URL || whatwgUrl.URL;
|
|
47285
47285
|
const PassThrough$1 = Stream$3.PassThrough;
|
|
47286
|
-
const isDomainOrSubdomain = function isDomainOrSubdomain
|
|
47286
|
+
const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
|
|
47287
47287
|
const orig = new URL$1(original).hostname;
|
|
47288
47288
|
const dest = new URL$1(destination).hostname;
|
|
47289
47289
|
return orig === dest || orig[orig.length - dest.length - 1] === "." && orig.endsWith(dest);
|
|
@@ -47295,7 +47295,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
47295
47295
|
* @param {string|URL} original
|
|
47296
47296
|
* @param {string|URL} destination
|
|
47297
47297
|
*/
|
|
47298
|
-
const isSameProtocol = function isSameProtocol
|
|
47298
|
+
const isSameProtocol = function isSameProtocol(destination, original) {
|
|
47299
47299
|
return new URL$1(original).protocol === new URL$1(destination).protocol;
|
|
47300
47300
|
};
|
|
47301
47301
|
/**
|
|
@@ -47305,28 +47305,28 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
47305
47305
|
* @param Object opts Fetch options
|
|
47306
47306
|
* @return Promise
|
|
47307
47307
|
*/
|
|
47308
|
-
function fetch
|
|
47309
|
-
if (!fetch
|
|
47310
|
-
Body.Promise = fetch
|
|
47311
|
-
return new fetch
|
|
47308
|
+
function fetch(url, opts) {
|
|
47309
|
+
if (!fetch.Promise) throw new Error("native promise missing, set fetch.Promise to your favorite alternative");
|
|
47310
|
+
Body.Promise = fetch.Promise;
|
|
47311
|
+
return new fetch.Promise(function(resolve, reject) {
|
|
47312
47312
|
const request = new Request(url, opts);
|
|
47313
47313
|
const options = getNodeRequestOptions(request);
|
|
47314
47314
|
const send = (options.protocol === "https:" ? https$1 : http$1).request;
|
|
47315
47315
|
const signal = request.signal;
|
|
47316
47316
|
let response = null;
|
|
47317
|
-
const abort
|
|
47318
|
-
let error
|
|
47319
|
-
reject(error
|
|
47320
|
-
if (request.body && request.body instanceof Stream$3.Readable) destroyStream(request.body, error
|
|
47317
|
+
const abort = function abort$1() {
|
|
47318
|
+
let error = new AbortError("The user aborted a request.");
|
|
47319
|
+
reject(error);
|
|
47320
|
+
if (request.body && request.body instanceof Stream$3.Readable) destroyStream(request.body, error);
|
|
47321
47321
|
if (!response || !response.body) return;
|
|
47322
|
-
response.body.emit("error", error
|
|
47322
|
+
response.body.emit("error", error);
|
|
47323
47323
|
};
|
|
47324
47324
|
if (signal && signal.aborted) {
|
|
47325
|
-
abort
|
|
47325
|
+
abort();
|
|
47326
47326
|
return;
|
|
47327
47327
|
}
|
|
47328
47328
|
const abortAndFinalize = function abortAndFinalize$1() {
|
|
47329
|
-
abort
|
|
47329
|
+
abort();
|
|
47330
47330
|
finalize();
|
|
47331
47331
|
};
|
|
47332
47332
|
const req = send(options);
|
|
@@ -47366,7 +47366,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
47366
47366
|
req.on("response", function(res) {
|
|
47367
47367
|
clearTimeout(reqTimeout);
|
|
47368
47368
|
const headers = createHeadersLenient(res.headers);
|
|
47369
|
-
if (fetch
|
|
47369
|
+
if (fetch.isRedirect(res.statusCode)) {
|
|
47370
47370
|
const location = headers.get("Location");
|
|
47371
47371
|
let locationURL = null;
|
|
47372
47372
|
try {
|
|
@@ -47426,7 +47426,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
47426
47426
|
requestOpts.body = void 0;
|
|
47427
47427
|
requestOpts.headers.delete("content-length");
|
|
47428
47428
|
}
|
|
47429
|
-
resolve(fetch
|
|
47429
|
+
resolve(fetch(new Request(locationURL, requestOpts)));
|
|
47430
47430
|
finalize();
|
|
47431
47431
|
return;
|
|
47432
47432
|
}
|
|
@@ -47517,11 +47517,11 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
47517
47517
|
* @param Number code Status code
|
|
47518
47518
|
* @return Boolean
|
|
47519
47519
|
*/
|
|
47520
|
-
fetch
|
|
47520
|
+
fetch.isRedirect = function(code) {
|
|
47521
47521
|
return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
|
|
47522
47522
|
};
|
|
47523
|
-
fetch
|
|
47524
|
-
module.exports = exports = fetch
|
|
47523
|
+
fetch.Promise = global.Promise;
|
|
47524
|
+
module.exports = exports = fetch;
|
|
47525
47525
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47526
47526
|
exports.default = exports;
|
|
47527
47527
|
exports.Headers = Headers;
|
|
@@ -47536,21 +47536,21 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
47536
47536
|
var require_node_ponyfill = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
47537
47537
|
const nodeFetch = require_lib$1();
|
|
47538
47538
|
const realFetch = nodeFetch.default || nodeFetch;
|
|
47539
|
-
const fetch
|
|
47539
|
+
const fetch = function(url, options) {
|
|
47540
47540
|
if (/^\/\//.test(url)) url = "https:" + url;
|
|
47541
47541
|
return realFetch.call(this, url, options);
|
|
47542
47542
|
};
|
|
47543
|
-
fetch
|
|
47544
|
-
module.exports = exports = fetch
|
|
47545
|
-
exports.fetch = fetch
|
|
47543
|
+
fetch.ponyfill = true;
|
|
47544
|
+
module.exports = exports = fetch;
|
|
47545
|
+
exports.fetch = fetch;
|
|
47546
47546
|
exports.Headers = nodeFetch.Headers;
|
|
47547
47547
|
exports.Request = nodeFetch.Request;
|
|
47548
47548
|
exports.Response = nodeFetch.Response;
|
|
47549
|
-
exports.default = fetch
|
|
47549
|
+
exports.default = fetch;
|
|
47550
47550
|
}));
|
|
47551
47551
|
|
|
47552
47552
|
//#endregion
|
|
47553
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
47553
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/FetchClient.js
|
|
47554
47554
|
var import_node_ponyfill = /* @__PURE__ */ __toESM(require_node_ponyfill());
|
|
47555
47555
|
let auths = /* @__PURE__ */ new WeakMap();
|
|
47556
47556
|
var FetchClient = class {
|
|
@@ -47630,14 +47630,14 @@ var FetchClient = class {
|
|
|
47630
47630
|
//#region node_modules/.pnpm/b2a@1.1.2/node_modules/b2a/lib/index.js
|
|
47631
47631
|
var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
47632
47632
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47633
|
-
var error = function error
|
|
47634
|
-
function E
|
|
47633
|
+
var error = function error(message) {
|
|
47634
|
+
function E() {
|
|
47635
47635
|
this.message = message;
|
|
47636
47636
|
}
|
|
47637
|
-
E
|
|
47638
|
-
E
|
|
47639
|
-
E
|
|
47640
|
-
return E
|
|
47637
|
+
E.prototype = /* @__PURE__ */ new Error();
|
|
47638
|
+
E.prototype.name = "InvalidCharacterError";
|
|
47639
|
+
E.prototype.code = 5;
|
|
47640
|
+
return E;
|
|
47641
47641
|
};
|
|
47642
47642
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
47643
47643
|
var E = error("The string to be encoded contains characters out of range");
|
|
@@ -47653,21 +47653,21 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
47653
47653
|
}
|
|
47654
47654
|
return output;
|
|
47655
47655
|
};
|
|
47656
|
-
var utf8 = function utf8
|
|
47656
|
+
var utf8 = function utf8(input) {
|
|
47657
47657
|
return encodeURIComponent(input).replace(/%([0-9A-F]{2})/g, function(match, p1) {
|
|
47658
47658
|
return String.fromCharCode("0x" + p1);
|
|
47659
47659
|
});
|
|
47660
47660
|
};
|
|
47661
|
-
var btoa$1
|
|
47661
|
+
var btoa$1 = (function(input) {
|
|
47662
47662
|
return _btoa(utf8(input));
|
|
47663
47663
|
});
|
|
47664
47664
|
var E$1 = error("The string to be decoded is not correctly encoded");
|
|
47665
|
-
exports.btoa = btoa$1
|
|
47665
|
+
exports.btoa = btoa$1;
|
|
47666
47666
|
}));
|
|
47667
47667
|
|
|
47668
47668
|
//#endregion
|
|
47669
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
47670
|
-
var import_lib
|
|
47669
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/BasicAuth.js
|
|
47670
|
+
var import_lib = require_lib();
|
|
47671
47671
|
var secrets$1 = /* @__PURE__ */ new WeakMap();
|
|
47672
47672
|
/**
|
|
47673
47673
|
* Allows to use Basic-Auth for Authorization to the
|
|
@@ -47688,7 +47688,7 @@ var BasicAuth = class {
|
|
|
47688
47688
|
if (user && tenant) user = `${tenant}/${user}`;
|
|
47689
47689
|
user = user || this.user;
|
|
47690
47690
|
password = password || secret.password;
|
|
47691
|
-
if (!token && user && password) token = (0, import_lib
|
|
47691
|
+
if (!token && user && password) token = (0, import_lib.btoa)(`${user}:${password}`);
|
|
47692
47692
|
if (user) this.user = user;
|
|
47693
47693
|
token = token || secret.token;
|
|
47694
47694
|
tfa = tfa || secret.tfa;
|
|
@@ -47732,7 +47732,7 @@ var BasicAuth = class {
|
|
|
47732
47732
|
};
|
|
47733
47733
|
|
|
47734
47734
|
//#endregion
|
|
47735
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
47735
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/BearerAuth.js
|
|
47736
47736
|
const secrets = /* @__PURE__ */ new WeakMap();
|
|
47737
47737
|
var BearerAuth = class {
|
|
47738
47738
|
constructor(token) {
|
|
@@ -47781,7 +47781,7 @@ var BearerAuth = class {
|
|
|
47781
47781
|
};
|
|
47782
47782
|
|
|
47783
47783
|
//#endregion
|
|
47784
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
47784
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/BearerAuthFromSessionStorage.js
|
|
47785
47785
|
var BearerAuthFromSessionStorage = class BearerAuthFromSessionStorage extends BearerAuth {
|
|
47786
47786
|
static removeEntriesFromSessionStorage() {
|
|
47787
47787
|
sessionStorage.removeItem(BearerAuthFromSessionStorage.sessionStorageKey);
|
|
@@ -47821,7 +47821,7 @@ BearerAuthFromSessionStorage.sessionStorageKey = "bearerAuthToken";
|
|
|
47821
47821
|
BearerAuthFromSessionStorage.sessionStorageKeyToKeepToken = `bearerAuthTokenKeep`;
|
|
47822
47822
|
|
|
47823
47823
|
//#endregion
|
|
47824
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
47824
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/CookieAuth.js
|
|
47825
47825
|
/**
|
|
47826
47826
|
* Allows to use Cookies for Authorization to the
|
|
47827
47827
|
* Cumulocity API.
|
|
@@ -47870,7 +47870,7 @@ var CookieAuth = class {
|
|
|
47870
47870
|
};
|
|
47871
47871
|
|
|
47872
47872
|
//#endregion
|
|
47873
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
47873
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/MicroserviceClientRequestAuth.js
|
|
47874
47874
|
/**
|
|
47875
47875
|
* Allows to use either Cookie-Auth or Basic-Auth
|
|
47876
47876
|
* of a microservice client request header
|
|
@@ -47919,7 +47919,7 @@ var MicroserviceClientRequestAuth = class {
|
|
|
47919
47919
|
};
|
|
47920
47920
|
|
|
47921
47921
|
//#endregion
|
|
47922
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
47922
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/NodeJSCookieAuth.js
|
|
47923
47923
|
/**
|
|
47924
47924
|
* Extracts the `authorization` cookie from the `set-cookie` header of a response.
|
|
47925
47925
|
*
|
|
@@ -47935,13 +47935,13 @@ var NodeJSCookieAuth = class extends MicroserviceClientRequestAuth {
|
|
|
47935
47935
|
};
|
|
47936
47936
|
|
|
47937
47937
|
//#endregion
|
|
47938
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
47938
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/gettext-typed.js
|
|
47939
47939
|
function gettext$1(str) {
|
|
47940
47940
|
return str;
|
|
47941
47941
|
}
|
|
47942
47942
|
|
|
47943
47943
|
//#endregion
|
|
47944
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
47944
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/Severity.js
|
|
47945
47945
|
const SEVERITY_LABELS = {
|
|
47946
47946
|
CRITICAL: gettext$1("Critical`alarm`"),
|
|
47947
47947
|
MAJOR: gettext$1("Major`alarm`"),
|
|
@@ -47950,7 +47950,7 @@ const SEVERITY_LABELS = {
|
|
|
47950
47950
|
};
|
|
47951
47951
|
|
|
47952
47952
|
//#endregion
|
|
47953
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
47953
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/QueriesUtil.js
|
|
47954
47954
|
var QueriesUtil = class {
|
|
47955
47955
|
constructor() {
|
|
47956
47956
|
this.operatorFns = {
|
|
@@ -48230,8 +48230,8 @@ var require_cometd_nodejs_client = /* @__PURE__ */ __commonJSMin(((exports, modu
|
|
|
48230
48230
|
for (var name$2 in headers) if (headers.hasOwnProperty(name$2)) {
|
|
48231
48231
|
if (/^set-cookie$/i.test(name$2)) {
|
|
48232
48232
|
var header = headers[name$2];
|
|
48233
|
-
for (var i
|
|
48234
|
-
var cookie = header[i
|
|
48233
|
+
for (var i = 0; i < header.length; ++i) {
|
|
48234
|
+
var cookie = header[i].split(";")[0];
|
|
48235
48235
|
var host = _config.hostname;
|
|
48236
48236
|
var jar$1 = cookieStore[host];
|
|
48237
48237
|
if (jar$1 === void 0) cookieStore[host] = jar$1 = {};
|
|
@@ -48264,8 +48264,8 @@ var require_cometd_nodejs_client = /* @__PURE__ */ __commonJSMin(((exports, modu
|
|
|
48264
48264
|
_request.on(event, function(x) {
|
|
48265
48265
|
self$1.readyState = window.XMLHttpRequest.DONE;
|
|
48266
48266
|
if (x) {
|
|
48267
|
-
var error
|
|
48268
|
-
if (error
|
|
48267
|
+
var error = x.message;
|
|
48268
|
+
if (error) self$1.statusText = error;
|
|
48269
48269
|
}
|
|
48270
48270
|
if (self$1.onerror) self$1.onerror(x);
|
|
48271
48271
|
});
|
|
@@ -48360,7 +48360,7 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48360
48360
|
return value instanceof Array;
|
|
48361
48361
|
},
|
|
48362
48362
|
inArray: function(element, array) {
|
|
48363
|
-
for (var i
|
|
48363
|
+
for (var i = 0; i < array.length; ++i) if (element === array[i]) return i;
|
|
48364
48364
|
return -1;
|
|
48365
48365
|
}
|
|
48366
48366
|
};
|
|
@@ -48375,15 +48375,15 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48375
48375
|
};
|
|
48376
48376
|
this.findTransportTypes = function(version$1, crossDomain, url) {
|
|
48377
48377
|
var result = [];
|
|
48378
|
-
for (var i
|
|
48379
|
-
var type = _types[i
|
|
48378
|
+
for (var i = 0; i < _types.length; ++i) {
|
|
48379
|
+
var type = _types[i];
|
|
48380
48380
|
if (_transports[type].accept(version$1, crossDomain, url) === true) result.push(type);
|
|
48381
48381
|
}
|
|
48382
48382
|
return result;
|
|
48383
48383
|
};
|
|
48384
48384
|
this.negotiateTransport = function(types, version$1, crossDomain, url) {
|
|
48385
|
-
for (var i
|
|
48386
|
-
var type = _types[i
|
|
48385
|
+
for (var i = 0; i < _types.length; ++i) {
|
|
48386
|
+
var type = _types[i];
|
|
48387
48387
|
for (var j = 0; j < types.length; ++j) if (type === types[j]) {
|
|
48388
48388
|
var transport = _transports[type];
|
|
48389
48389
|
if (transport.accept(version$1, crossDomain, url) === true) return transport;
|
|
@@ -48393,7 +48393,7 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48393
48393
|
};
|
|
48394
48394
|
this.add = function(type, transport, index) {
|
|
48395
48395
|
var existing = false;
|
|
48396
|
-
for (var i
|
|
48396
|
+
for (var i = 0; i < _types.length; ++i) if (_types[i] === type) {
|
|
48397
48397
|
existing = true;
|
|
48398
48398
|
break;
|
|
48399
48399
|
}
|
|
@@ -48405,12 +48405,12 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48405
48405
|
return !existing;
|
|
48406
48406
|
};
|
|
48407
48407
|
this.find = function(type) {
|
|
48408
|
-
for (var i
|
|
48408
|
+
for (var i = 0; i < _types.length; ++i) if (_types[i] === type) return _transports[type];
|
|
48409
48409
|
return null;
|
|
48410
48410
|
};
|
|
48411
48411
|
this.remove = function(type) {
|
|
48412
|
-
for (var i
|
|
48413
|
-
_types.splice(i
|
|
48412
|
+
for (var i = 0; i < _types.length; ++i) if (_types[i] === type) {
|
|
48413
|
+
_types.splice(i, 1);
|
|
48414
48414
|
var transport = _transports[type];
|
|
48415
48415
|
delete _transports[type];
|
|
48416
48416
|
return transport;
|
|
@@ -48422,7 +48422,7 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48422
48422
|
_transports = {};
|
|
48423
48423
|
};
|
|
48424
48424
|
this.reset = function(init) {
|
|
48425
|
-
for (var i
|
|
48425
|
+
for (var i = 0; i < _types.length; ++i) _transports[_types[i]].reset(init);
|
|
48426
48426
|
};
|
|
48427
48427
|
};
|
|
48428
48428
|
/**
|
|
@@ -48567,13 +48567,13 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48567
48567
|
request.timeout = this.setTimeout(function() {
|
|
48568
48568
|
request.expired = true;
|
|
48569
48569
|
var errorMessage = "Request " + request.id + " of transport " + self$1.getType() + " exceeded " + delay + " ms max network delay";
|
|
48570
|
-
var failure
|
|
48570
|
+
var failure = { reason: errorMessage };
|
|
48571
48571
|
var xhr = request.xhr;
|
|
48572
|
-
failure
|
|
48572
|
+
failure.httpCode = self$1.xhrStatus(xhr);
|
|
48573
48573
|
self$1.abortXHR(xhr);
|
|
48574
48574
|
self$1._debug(errorMessage);
|
|
48575
48575
|
self$1.complete(request, false, request.metaConnect);
|
|
48576
|
-
envelope.onFailure(xhr, envelope.messages, failure
|
|
48576
|
+
envelope.onFailure(xhr, envelope.messages, failure);
|
|
48577
48577
|
}, delay);
|
|
48578
48578
|
}
|
|
48579
48579
|
}
|
|
@@ -48614,10 +48614,10 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48614
48614
|
var self$1 = this;
|
|
48615
48615
|
this.setTimeout(function() {
|
|
48616
48616
|
self$1.complete(nextRequest, false, nextRequest.metaConnect);
|
|
48617
|
-
var failure
|
|
48617
|
+
var failure = { reason: "Previous request failed" };
|
|
48618
48618
|
var xhr = nextRequest.xhr;
|
|
48619
|
-
failure
|
|
48620
|
-
nextEnvelope.onFailure(xhr, nextEnvelope.messages, failure
|
|
48619
|
+
failure.httpCode = self$1.xhrStatus(xhr);
|
|
48620
|
+
nextEnvelope.onFailure(xhr, nextEnvelope.messages, failure);
|
|
48621
48621
|
}, 0);
|
|
48622
48622
|
}
|
|
48623
48623
|
}
|
|
@@ -48642,11 +48642,11 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48642
48642
|
else envelope.onFailure(request.xhr, envelope.messages, { httpCode: 204 });
|
|
48643
48643
|
}
|
|
48644
48644
|
};
|
|
48645
|
-
_self.transportFailure = function(envelope, request, failure
|
|
48645
|
+
_self.transportFailure = function(envelope, request, failure) {
|
|
48646
48646
|
if (!request.expired) {
|
|
48647
48647
|
this.clearTimeout(request.timeout);
|
|
48648
48648
|
this.complete(request, false, request.metaConnect);
|
|
48649
|
-
envelope.onFailure(request.xhr, envelope.messages, failure
|
|
48649
|
+
envelope.onFailure(request.xhr, envelope.messages, failure);
|
|
48650
48650
|
}
|
|
48651
48651
|
};
|
|
48652
48652
|
function _metaConnectSend(envelope) {
|
|
@@ -48667,8 +48667,8 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48667
48667
|
};
|
|
48668
48668
|
_self.abort = function() {
|
|
48669
48669
|
_super.abort();
|
|
48670
|
-
for (var i
|
|
48671
|
-
var request = _requests[i
|
|
48670
|
+
for (var i = 0; i < _requests.length; ++i) {
|
|
48671
|
+
var request = _requests[i];
|
|
48672
48672
|
if (request) {
|
|
48673
48673
|
this._debug("Aborting request", request);
|
|
48674
48674
|
if (!this.abortXHR(request.xhr)) this.transportFailure(request.envelope, request, { reason: "abort" });
|
|
@@ -48689,9 +48689,9 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48689
48689
|
};
|
|
48690
48690
|
_self.abortXHR = function(xhr) {
|
|
48691
48691
|
if (xhr) try {
|
|
48692
|
-
var state
|
|
48692
|
+
var state = xhr.readyState;
|
|
48693
48693
|
xhr.abort();
|
|
48694
|
-
return state
|
|
48694
|
+
return state !== window.XMLHttpRequest.UNSENT;
|
|
48695
48695
|
} catch (x) {
|
|
48696
48696
|
this._debug(x);
|
|
48697
48697
|
}
|
|
@@ -48771,24 +48771,24 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48771
48771
|
self$1._debug(x);
|
|
48772
48772
|
if (!success) {
|
|
48773
48773
|
_supportsCrossDomain = false;
|
|
48774
|
-
var failure
|
|
48775
|
-
failure
|
|
48776
|
-
self$1.transportFailure(envelope, request, failure
|
|
48774
|
+
var failure = { exception: x };
|
|
48775
|
+
failure.httpCode = self$1.xhrStatus(request.xhr);
|
|
48776
|
+
self$1.transportFailure(envelope, request, failure);
|
|
48777
48777
|
}
|
|
48778
48778
|
}
|
|
48779
48779
|
},
|
|
48780
48780
|
onError: function(reason, exception) {
|
|
48781
48781
|
self$1._debug("Transport", self$1.getType(), "received error", reason, exception);
|
|
48782
48782
|
_supportsCrossDomain = false;
|
|
48783
|
-
var failure
|
|
48783
|
+
var failure = {
|
|
48784
48784
|
reason,
|
|
48785
48785
|
exception
|
|
48786
48786
|
};
|
|
48787
|
-
failure
|
|
48787
|
+
failure.httpCode = self$1.xhrStatus(request.xhr);
|
|
48788
48788
|
if (sameStack) self$1.setTimeout(function() {
|
|
48789
|
-
self$1.transportFailure(envelope, request, failure
|
|
48789
|
+
self$1.transportFailure(envelope, request, failure);
|
|
48790
48790
|
}, 0);
|
|
48791
|
-
else self$1.transportFailure(envelope, request, failure
|
|
48791
|
+
else self$1.transportFailure(envelope, request, failure);
|
|
48792
48792
|
}
|
|
48793
48793
|
});
|
|
48794
48794
|
sameStack = false;
|
|
@@ -48870,10 +48870,10 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48870
48870
|
envelopeToSend.messages = envelope.messages.slice(begin, end);
|
|
48871
48871
|
envelopeToSend.onSuccess = envelope.onSuccess;
|
|
48872
48872
|
envelopeToSend.onFailure = envelope.onFailure;
|
|
48873
|
-
for (var i
|
|
48873
|
+
for (var i = 1; i < lengths.length; ++i) {
|
|
48874
48874
|
var nextEnvelope = this._mixin(false, {}, envelope);
|
|
48875
48875
|
begin = end;
|
|
48876
|
-
end += lengths[i
|
|
48876
|
+
end += lengths[i];
|
|
48877
48877
|
nextEnvelope.messages = envelope.messages.slice(begin, end);
|
|
48878
48878
|
nextEnvelope.onSuccess = envelope.onSuccess;
|
|
48879
48879
|
nextEnvelope.onFailure = envelope.onFailure;
|
|
@@ -48904,14 +48904,14 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48904
48904
|
}
|
|
48905
48905
|
},
|
|
48906
48906
|
onError: function(reason, exception) {
|
|
48907
|
-
var failure
|
|
48907
|
+
var failure = {
|
|
48908
48908
|
reason,
|
|
48909
48909
|
exception
|
|
48910
48910
|
};
|
|
48911
48911
|
if (sameStack) self$1.setTimeout(function() {
|
|
48912
|
-
self$1.transportFailure(envelopeToSend, request, failure
|
|
48912
|
+
self$1.transportFailure(envelopeToSend, request, failure);
|
|
48913
48913
|
}, 0);
|
|
48914
|
-
else self$1.transportFailure(envelopeToSend, request, failure
|
|
48914
|
+
else self$1.transportFailure(envelopeToSend, request, failure);
|
|
48915
48915
|
}
|
|
48916
48916
|
});
|
|
48917
48917
|
sameStack = false;
|
|
@@ -48954,8 +48954,8 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
48954
48954
|
}
|
|
48955
48955
|
function _storeEnvelope(context, envelope, metaConnect) {
|
|
48956
48956
|
var messageIds = [];
|
|
48957
|
-
for (var i
|
|
48958
|
-
var message = envelope.messages[i
|
|
48957
|
+
for (var i = 0; i < envelope.messages.length; ++i) {
|
|
48958
|
+
var message = envelope.messages[i];
|
|
48959
48959
|
if (message.id) messageIds.push(message.id);
|
|
48960
48960
|
}
|
|
48961
48961
|
context.envelopes[messageIds.join(",")] = [envelope, metaConnect];
|
|
@@ -49033,8 +49033,8 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49033
49033
|
}
|
|
49034
49034
|
var self$1 = this;
|
|
49035
49035
|
var messageIds = [];
|
|
49036
|
-
for (var i
|
|
49037
|
-
var message = envelope.messages[i
|
|
49036
|
+
for (var i = 0; i < envelope.messages.length; ++i) (function() {
|
|
49037
|
+
var message = envelope.messages[i];
|
|
49038
49038
|
if (message.id) {
|
|
49039
49039
|
messageIds.push(message.id);
|
|
49040
49040
|
context.timeouts[message.id] = self$1.setTimeout(function() {
|
|
@@ -49051,8 +49051,8 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49051
49051
|
_self._notifySuccess = function(fn, messages) {
|
|
49052
49052
|
fn.call(this, messages);
|
|
49053
49053
|
};
|
|
49054
|
-
_self._notifyFailure = function(fn, context, messages, failure
|
|
49055
|
-
fn.call(this, context, messages, failure
|
|
49054
|
+
_self._notifyFailure = function(fn, context, messages, failure) {
|
|
49055
|
+
fn.call(this, context, messages, failure);
|
|
49056
49056
|
};
|
|
49057
49057
|
function _send(context, envelope, metaConnect) {
|
|
49058
49058
|
try {
|
|
@@ -49081,8 +49081,8 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49081
49081
|
_self.onOpen = function(context) {
|
|
49082
49082
|
var envelopes = context.envelopes;
|
|
49083
49083
|
this._debug("Transport", this.getType(), "opened", context, "pending messages", envelopes);
|
|
49084
|
-
for (var key
|
|
49085
|
-
var element = envelopes[key
|
|
49084
|
+
for (var key in envelopes) if (envelopes.hasOwnProperty(key)) {
|
|
49085
|
+
var element = envelopes[key];
|
|
49086
49086
|
var envelope = element[0];
|
|
49087
49087
|
var metaConnect = element[1];
|
|
49088
49088
|
_successCallback = envelope.onSuccess;
|
|
@@ -49094,8 +49094,8 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49094
49094
|
var close = false;
|
|
49095
49095
|
var messages = this.convertToMessages(wsMessage.data);
|
|
49096
49096
|
var messageIds = [];
|
|
49097
|
-
for (var i
|
|
49098
|
-
var message = messages[i
|
|
49097
|
+
for (var i = 0; i < messages.length; ++i) {
|
|
49098
|
+
var message = messages[i];
|
|
49099
49099
|
if (/^\/meta\//.test(message.channel) || message.data === void 0) {
|
|
49100
49100
|
if (message.id) {
|
|
49101
49101
|
messageIds.push(message.id);
|
|
@@ -49114,15 +49114,15 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49114
49114
|
var envelopes = context.envelopes;
|
|
49115
49115
|
for (var j = 0; j < messageIds.length; ++j) {
|
|
49116
49116
|
var id = messageIds[j];
|
|
49117
|
-
for (var key
|
|
49118
|
-
var ids = key
|
|
49117
|
+
for (var key in envelopes) if (envelopes.hasOwnProperty(key)) {
|
|
49118
|
+
var ids = key.split(",");
|
|
49119
49119
|
var index = Utils.inArray(id, ids);
|
|
49120
49120
|
if (index >= 0) {
|
|
49121
49121
|
removed = true;
|
|
49122
49122
|
ids.splice(index, 1);
|
|
49123
|
-
var envelope = envelopes[key
|
|
49124
|
-
var metaConnect = envelopes[key
|
|
49125
|
-
delete envelopes[key
|
|
49123
|
+
var envelope = envelopes[key][0];
|
|
49124
|
+
var metaConnect = envelopes[key][1];
|
|
49125
|
+
delete envelopes[key];
|
|
49126
49126
|
if (ids.length > 0) envelopes[ids.join(",")] = [envelope, metaConnect];
|
|
49127
49127
|
break;
|
|
49128
49128
|
}
|
|
@@ -49144,15 +49144,15 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49144
49144
|
for (var id in timeouts) if (timeouts.hasOwnProperty(id)) this.clearTimeout(timeouts[id]);
|
|
49145
49145
|
var envelopes = context.envelopes;
|
|
49146
49146
|
context.envelopes = {};
|
|
49147
|
-
for (var key
|
|
49148
|
-
var envelope = envelopes[key
|
|
49149
|
-
if (envelopes[key
|
|
49150
|
-
var failure
|
|
49147
|
+
for (var key in envelopes) if (envelopes.hasOwnProperty(key)) {
|
|
49148
|
+
var envelope = envelopes[key][0];
|
|
49149
|
+
if (envelopes[key][1]) _connected = false;
|
|
49150
|
+
var failure = {
|
|
49151
49151
|
websocketCode: event.code,
|
|
49152
49152
|
reason: event.reason
|
|
49153
49153
|
};
|
|
49154
|
-
if (event.exception) failure
|
|
49155
|
-
this._notifyFailure(envelope.onFailure, context, envelope.messages, failure
|
|
49154
|
+
if (event.exception) failure.exception = event.exception;
|
|
49155
|
+
this._notifyFailure(envelope.onFailure, context, envelope.messages, failure);
|
|
49156
49156
|
}
|
|
49157
49157
|
};
|
|
49158
49158
|
_self.registered = function(type, cometd) {
|
|
@@ -49254,8 +49254,8 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49254
49254
|
*/
|
|
49255
49255
|
this._mixin = function(deep, target, objects) {
|
|
49256
49256
|
var result = target || {};
|
|
49257
|
-
for (var i
|
|
49258
|
-
var object = arguments[i
|
|
49257
|
+
for (var i = 2; i < arguments.length; ++i) {
|
|
49258
|
+
var object = arguments[i];
|
|
49259
49259
|
if (object === void 0 || object === null) continue;
|
|
49260
49260
|
for (var propName in object) if (object.hasOwnProperty(propName)) {
|
|
49261
49261
|
var prop = _fieldValue(object, propName);
|
|
@@ -49427,24 +49427,24 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49427
49427
|
}
|
|
49428
49428
|
}
|
|
49429
49429
|
function _applyIncomingExtensions(message) {
|
|
49430
|
-
for (var i
|
|
49430
|
+
for (var i = 0; i < _extensions.length; ++i) {
|
|
49431
49431
|
if (message === void 0 || message === null) break;
|
|
49432
|
-
var extension
|
|
49433
|
-
var callback = extension
|
|
49432
|
+
var extension = _extensions[i];
|
|
49433
|
+
var callback = extension.extension.incoming;
|
|
49434
49434
|
if (_isFunction(callback)) {
|
|
49435
|
-
var result = _applyExtension(extension
|
|
49435
|
+
var result = _applyExtension(extension.extension, callback, extension.name, message, false);
|
|
49436
49436
|
message = result === void 0 ? message : result;
|
|
49437
49437
|
}
|
|
49438
49438
|
}
|
|
49439
49439
|
return message;
|
|
49440
49440
|
}
|
|
49441
49441
|
function _applyOutgoingExtensions(message) {
|
|
49442
|
-
for (var i
|
|
49442
|
+
for (var i = _extensions.length - 1; i >= 0; --i) {
|
|
49443
49443
|
if (message === void 0 || message === null) break;
|
|
49444
|
-
var extension
|
|
49445
|
-
var callback = extension
|
|
49444
|
+
var extension = _extensions[i];
|
|
49445
|
+
var callback = extension.extension.outgoing;
|
|
49446
49446
|
if (_isFunction(callback)) {
|
|
49447
|
-
var result = _applyExtension(extension
|
|
49447
|
+
var result = _applyExtension(extension.extension, callback, extension.name, message, true);
|
|
49448
49448
|
message = result === void 0 ? message : result;
|
|
49449
49449
|
}
|
|
49450
49450
|
}
|
|
@@ -49475,9 +49475,9 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49475
49475
|
_notify(channel, message);
|
|
49476
49476
|
var channelParts = channel.split("/");
|
|
49477
49477
|
var last = channelParts.length - 1;
|
|
49478
|
-
for (var i
|
|
49479
|
-
var channelPart = channelParts.slice(0, i
|
|
49480
|
-
if (i
|
|
49478
|
+
for (var i = last; i > 0; --i) {
|
|
49479
|
+
var channelPart = channelParts.slice(0, i).join("/") + "/*";
|
|
49480
|
+
if (i === last) _notify(channelPart, message);
|
|
49481
49481
|
channelPart += "*";
|
|
49482
49482
|
_notify(channelPart, message);
|
|
49483
49483
|
}
|
|
@@ -49501,17 +49501,17 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49501
49501
|
* @param extraPath an extra path to append to the Bayeux server URL
|
|
49502
49502
|
*/
|
|
49503
49503
|
function _send(messages, metaConnect, extraPath) {
|
|
49504
|
-
for (var i
|
|
49505
|
-
var message = messages[i
|
|
49504
|
+
for (var i = 0; i < messages.length; ++i) {
|
|
49505
|
+
var message = messages[i];
|
|
49506
49506
|
var messageId = message.id;
|
|
49507
49507
|
if (_clientId) message.clientId = _clientId;
|
|
49508
49508
|
message = _applyOutgoingExtensions(message);
|
|
49509
49509
|
if (message !== void 0 && message !== null) {
|
|
49510
49510
|
message.id = messageId;
|
|
49511
|
-
messages[i
|
|
49511
|
+
messages[i] = message;
|
|
49512
49512
|
} else {
|
|
49513
49513
|
delete _callbacks[messageId];
|
|
49514
|
-
messages.splice(i
|
|
49514
|
+
messages.splice(i--, 1);
|
|
49515
49515
|
}
|
|
49516
49516
|
}
|
|
49517
49517
|
if (messages.length === 0) return;
|
|
@@ -49532,11 +49532,11 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49532
49532
|
_cometd._info("Exception during handling of messages", x);
|
|
49533
49533
|
}
|
|
49534
49534
|
},
|
|
49535
|
-
onFailure: function(conduit, messages$1, failure
|
|
49535
|
+
onFailure: function(conduit, messages$1, failure) {
|
|
49536
49536
|
try {
|
|
49537
49537
|
var transport = _cometd.getTransport();
|
|
49538
|
-
failure
|
|
49539
|
-
_handleFailure.call(_cometd, conduit, messages$1, failure
|
|
49538
|
+
failure.connectionType = transport ? transport.getType() : "unknown";
|
|
49539
|
+
_handleFailure.call(_cometd, conduit, messages$1, failure);
|
|
49540
49540
|
} catch (x) {
|
|
49541
49541
|
_cometd._info("Exception during handling of failure", x);
|
|
49542
49542
|
}
|
|
@@ -49618,9 +49618,9 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49618
49618
|
_cometd._debug("New advice", _advice);
|
|
49619
49619
|
}
|
|
49620
49620
|
}
|
|
49621
|
-
function _disconnect(abort
|
|
49621
|
+
function _disconnect(abort) {
|
|
49622
49622
|
_cancelDelayedSend();
|
|
49623
|
-
if (abort
|
|
49623
|
+
if (abort && _transport) _transport.abort();
|
|
49624
49624
|
_crossDomain = false;
|
|
49625
49625
|
_transport = null;
|
|
49626
49626
|
_setStatus("disconnected");
|
|
@@ -49637,12 +49637,12 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49637
49637
|
_handleFailure.call(_cometd, void 0, messages, { reason: "Disconnected" });
|
|
49638
49638
|
}
|
|
49639
49639
|
}
|
|
49640
|
-
function _notifyTransportException(oldTransport, newTransport, failure
|
|
49640
|
+
function _notifyTransportException(oldTransport, newTransport, failure) {
|
|
49641
49641
|
var handler = _cometd.onTransportException;
|
|
49642
49642
|
if (_isFunction(handler)) {
|
|
49643
|
-
_cometd._debug("Invoking transport exception handler", oldTransport, newTransport, failure
|
|
49643
|
+
_cometd._debug("Invoking transport exception handler", oldTransport, newTransport, failure);
|
|
49644
49644
|
try {
|
|
49645
|
-
handler.call(_cometd, failure
|
|
49645
|
+
handler.call(_cometd, failure, oldTransport, newTransport);
|
|
49646
49646
|
} catch (x) {
|
|
49647
49647
|
_cometd._info("Exception during execution of transport exception handler", x);
|
|
49648
49648
|
}
|
|
@@ -49683,9 +49683,9 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49683
49683
|
if (!_transport) {
|
|
49684
49684
|
_transport = _transports.negotiateTransport(transportTypes, version$1, _crossDomain, url);
|
|
49685
49685
|
if (!_transport) {
|
|
49686
|
-
var failure
|
|
49687
|
-
_cometd._warn(failure
|
|
49688
|
-
throw failure
|
|
49686
|
+
var failure = "Could not find initial transport among: " + _transports.getTransportTypes();
|
|
49687
|
+
_cometd._warn(failure);
|
|
49688
|
+
throw failure;
|
|
49689
49689
|
}
|
|
49690
49690
|
}
|
|
49691
49691
|
_cometd._debug("Initial transport is", _transport.getType());
|
|
@@ -49755,10 +49755,10 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49755
49755
|
if (failureInfo.action === "none") {
|
|
49756
49756
|
if (message.channel === "/meta/handshake") {
|
|
49757
49757
|
if (!failureInfo.transport) {
|
|
49758
|
-
var failure
|
|
49759
|
-
this._warn(failure
|
|
49758
|
+
var failure = "Could not negotiate transport, client=[" + transportTypes + "], server=[" + message.supportedConnectionTypes + "]";
|
|
49759
|
+
this._warn(failure);
|
|
49760
49760
|
_notifyTransportException(_transport.getType(), null, {
|
|
49761
|
-
reason: failure
|
|
49761
|
+
reason: failure,
|
|
49762
49762
|
connectionType: _transport.getType(),
|
|
49763
49763
|
transport: _transport
|
|
49764
49764
|
});
|
|
@@ -50005,8 +50005,8 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50005
50005
|
_notifyListeners("/meta/publish", message);
|
|
50006
50006
|
} else _failMessage(message);
|
|
50007
50007
|
}
|
|
50008
|
-
function _messageFailure(failure
|
|
50009
|
-
_failMessage(failure
|
|
50008
|
+
function _messageFailure(failure) {
|
|
50009
|
+
_failMessage(failure);
|
|
50010
50010
|
}
|
|
50011
50011
|
function _receive(message) {
|
|
50012
50012
|
_unconnectTime = 0;
|
|
@@ -50042,23 +50042,23 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50042
50042
|
this.receive = _receive;
|
|
50043
50043
|
_handleMessages = function(rcvdMessages) {
|
|
50044
50044
|
_cometd._debug("Received", rcvdMessages);
|
|
50045
|
-
for (var i
|
|
50046
|
-
var message = rcvdMessages[i
|
|
50045
|
+
for (var i = 0; i < rcvdMessages.length; ++i) {
|
|
50046
|
+
var message = rcvdMessages[i];
|
|
50047
50047
|
_receive(message);
|
|
50048
50048
|
}
|
|
50049
50049
|
};
|
|
50050
|
-
_handleFailure = function(conduit, messages, failure
|
|
50051
|
-
_cometd._debug("handleFailure", conduit, messages, failure
|
|
50052
|
-
failure
|
|
50053
|
-
for (var i
|
|
50054
|
-
var message = messages[i
|
|
50050
|
+
_handleFailure = function(conduit, messages, failure) {
|
|
50051
|
+
_cometd._debug("handleFailure", conduit, messages, failure);
|
|
50052
|
+
failure.transport = conduit;
|
|
50053
|
+
for (var i = 0; i < messages.length; ++i) {
|
|
50054
|
+
var message = messages[i];
|
|
50055
50055
|
var failureMessage = {
|
|
50056
50056
|
id: message.id,
|
|
50057
50057
|
successful: false,
|
|
50058
50058
|
channel: message.channel,
|
|
50059
|
-
failure
|
|
50059
|
+
failure
|
|
50060
50060
|
};
|
|
50061
|
-
failure
|
|
50061
|
+
failure.message = message;
|
|
50062
50062
|
switch (message.channel) {
|
|
50063
50063
|
case "/meta/handshake":
|
|
50064
50064
|
_handshakeFailure(failureMessage);
|
|
@@ -50583,21 +50583,21 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50583
50583
|
* @return true if the extension was registered, false otherwise
|
|
50584
50584
|
* @see #unregisterExtension(name)
|
|
50585
50585
|
*/
|
|
50586
|
-
this.registerExtension = function(name$2, extension
|
|
50586
|
+
this.registerExtension = function(name$2, extension) {
|
|
50587
50587
|
if (arguments.length < 2) throw "Illegal arguments number: required 2, got " + arguments.length;
|
|
50588
50588
|
if (!_isString(name$2)) throw "Illegal argument type: extension name must be a string";
|
|
50589
50589
|
var existing = false;
|
|
50590
|
-
for (var i
|
|
50590
|
+
for (var i = 0; i < _extensions.length; ++i) if (_extensions[i].name === name$2) {
|
|
50591
50591
|
existing = true;
|
|
50592
50592
|
break;
|
|
50593
50593
|
}
|
|
50594
50594
|
if (!existing) {
|
|
50595
50595
|
_extensions.push({
|
|
50596
50596
|
name: name$2,
|
|
50597
|
-
extension
|
|
50597
|
+
extension
|
|
50598
50598
|
});
|
|
50599
50599
|
this._debug("Registered extension", name$2);
|
|
50600
|
-
if (_isFunction(extension
|
|
50600
|
+
if (_isFunction(extension.registered)) extension.registered(name$2, this);
|
|
50601
50601
|
return true;
|
|
50602
50602
|
} else {
|
|
50603
50603
|
this._info("Could not register extension with name", name$2, "since another extension with the same name already exists");
|
|
@@ -50613,13 +50613,13 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50613
50613
|
this.unregisterExtension = function(name$2) {
|
|
50614
50614
|
if (!_isString(name$2)) throw "Illegal argument type: extension name must be a string";
|
|
50615
50615
|
var unregistered = false;
|
|
50616
|
-
for (var i
|
|
50617
|
-
var extension
|
|
50618
|
-
if (extension
|
|
50619
|
-
_extensions.splice(i
|
|
50616
|
+
for (var i = 0; i < _extensions.length; ++i) {
|
|
50617
|
+
var extension = _extensions[i];
|
|
50618
|
+
if (extension.name === name$2) {
|
|
50619
|
+
_extensions.splice(i, 1);
|
|
50620
50620
|
unregistered = true;
|
|
50621
50621
|
this._debug("Unregistered extension", name$2);
|
|
50622
|
-
var ext = extension
|
|
50622
|
+
var ext = extension.extension;
|
|
50623
50623
|
if (_isFunction(ext.unregistered)) ext.unregistered();
|
|
50624
50624
|
break;
|
|
50625
50625
|
}
|
|
@@ -50632,9 +50632,9 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50632
50632
|
* @return the extension found or null if no extension with the given name has been registered
|
|
50633
50633
|
*/
|
|
50634
50634
|
this.getExtension = function(name$2) {
|
|
50635
|
-
for (var i
|
|
50636
|
-
var extension
|
|
50637
|
-
if (extension
|
|
50635
|
+
for (var i = 0; i < _extensions.length; ++i) {
|
|
50636
|
+
var extension = _extensions[i];
|
|
50637
|
+
if (extension.name === name$2) return extension.extension;
|
|
50638
50638
|
}
|
|
50639
50639
|
return null;
|
|
50640
50640
|
};
|
|
@@ -50895,10 +50895,10 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50895
50895
|
var view = new DataView(buffer$1);
|
|
50896
50896
|
var result = "";
|
|
50897
50897
|
var value = 0;
|
|
50898
|
-
for (var i
|
|
50899
|
-
var isPadding = i
|
|
50900
|
-
value = value * 256 + (isPadding ? 0 : view.getUint8(i
|
|
50901
|
-
if ((i
|
|
50898
|
+
for (var i = 0; i < length + padding; ++i) {
|
|
50899
|
+
var isPadding = i >= length;
|
|
50900
|
+
value = value * 256 + (isPadding ? 0 : view.getUint8(i));
|
|
50901
|
+
if ((i + 1) % 4 === 0) {
|
|
50902
50902
|
var divisor = 7225 * 85 * 85;
|
|
50903
50903
|
for (var j = 5; j > 0; --j) {
|
|
50904
50904
|
if (!isPadding || j > padding) {
|
|
@@ -50922,7 +50922,7 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50922
50922
|
var value = 0;
|
|
50923
50923
|
var charIdx = 0;
|
|
50924
50924
|
var byteIdx = 0;
|
|
50925
|
-
for (var i
|
|
50925
|
+
for (var i = 0; i < length; ++i) {
|
|
50926
50926
|
var code = string.charCodeAt(charIdx++) - 32;
|
|
50927
50927
|
value = value * 85 + _z85DecodeTable[code];
|
|
50928
50928
|
if (charIdx % 5 === 0) {
|
|
@@ -50953,7 +50953,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
50953
50953
|
}));
|
|
50954
50954
|
|
|
50955
50955
|
//#endregion
|
|
50956
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
50956
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/realtime/MetaChannel.js
|
|
50957
50957
|
var import_node = require_node();
|
|
50958
50958
|
var MetaChannel;
|
|
50959
50959
|
(function(MetaChannel$1) {
|
|
@@ -50964,7 +50964,7 @@ var MetaChannel;
|
|
|
50964
50964
|
})(MetaChannel || (MetaChannel = {}));
|
|
50965
50965
|
|
|
50966
50966
|
//#endregion
|
|
50967
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
50967
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/realtime/Realtime.js
|
|
50968
50968
|
var Realtime = class {
|
|
50969
50969
|
/**
|
|
50970
50970
|
* only initializing cometd if it is actually needed
|
|
@@ -51062,7 +51062,7 @@ var Realtime = class {
|
|
|
51062
51062
|
};
|
|
51063
51063
|
|
|
51064
51064
|
//#endregion
|
|
51065
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
51065
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/event/EventService.js
|
|
51066
51066
|
/**
|
|
51067
51067
|
* This class allows managing for events.
|
|
51068
51068
|
*/
|
|
@@ -51208,8 +51208,8 @@ var EventService = class extends Service {
|
|
|
51208
51208
|
var require_delayed_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
51209
51209
|
var Stream$2 = __require("stream").Stream;
|
|
51210
51210
|
var util$2 = __require("util");
|
|
51211
|
-
module.exports = DelayedStream
|
|
51212
|
-
function DelayedStream
|
|
51211
|
+
module.exports = DelayedStream;
|
|
51212
|
+
function DelayedStream() {
|
|
51213
51213
|
this.source = null;
|
|
51214
51214
|
this.dataSize = 0;
|
|
51215
51215
|
this.maxDataSize = 1024 * 1024;
|
|
@@ -51218,8 +51218,8 @@ var require_delayed_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
51218
51218
|
this._released = false;
|
|
51219
51219
|
this._bufferedEvents = [];
|
|
51220
51220
|
}
|
|
51221
|
-
util$2.inherits(DelayedStream
|
|
51222
|
-
DelayedStream
|
|
51221
|
+
util$2.inherits(DelayedStream, Stream$2);
|
|
51222
|
+
DelayedStream.create = function(source, options) {
|
|
51223
51223
|
var delayedStream = new this();
|
|
51224
51224
|
options = options || {};
|
|
51225
51225
|
for (var option in options) delayedStream[option] = options[option];
|
|
@@ -51233,36 +51233,36 @@ var require_delayed_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
51233
51233
|
if (delayedStream.pauseStream) source.pause();
|
|
51234
51234
|
return delayedStream;
|
|
51235
51235
|
};
|
|
51236
|
-
Object.defineProperty(DelayedStream
|
|
51236
|
+
Object.defineProperty(DelayedStream.prototype, "readable", {
|
|
51237
51237
|
configurable: true,
|
|
51238
51238
|
enumerable: true,
|
|
51239
51239
|
get: function() {
|
|
51240
51240
|
return this.source.readable;
|
|
51241
51241
|
}
|
|
51242
51242
|
});
|
|
51243
|
-
DelayedStream
|
|
51243
|
+
DelayedStream.prototype.setEncoding = function() {
|
|
51244
51244
|
return this.source.setEncoding.apply(this.source, arguments);
|
|
51245
51245
|
};
|
|
51246
|
-
DelayedStream
|
|
51246
|
+
DelayedStream.prototype.resume = function() {
|
|
51247
51247
|
if (!this._released) this.release();
|
|
51248
51248
|
this.source.resume();
|
|
51249
51249
|
};
|
|
51250
|
-
DelayedStream
|
|
51250
|
+
DelayedStream.prototype.pause = function() {
|
|
51251
51251
|
this.source.pause();
|
|
51252
51252
|
};
|
|
51253
|
-
DelayedStream
|
|
51253
|
+
DelayedStream.prototype.release = function() {
|
|
51254
51254
|
this._released = true;
|
|
51255
51255
|
this._bufferedEvents.forEach(function(args) {
|
|
51256
51256
|
this.emit.apply(this, args);
|
|
51257
51257
|
}.bind(this));
|
|
51258
51258
|
this._bufferedEvents = [];
|
|
51259
51259
|
};
|
|
51260
|
-
DelayedStream
|
|
51260
|
+
DelayedStream.prototype.pipe = function() {
|
|
51261
51261
|
var r = Stream$2.prototype.pipe.apply(this, arguments);
|
|
51262
51262
|
this.resume();
|
|
51263
51263
|
return r;
|
|
51264
51264
|
};
|
|
51265
|
-
DelayedStream
|
|
51265
|
+
DelayedStream.prototype._handleEmit = function(args) {
|
|
51266
51266
|
if (this._released) {
|
|
51267
51267
|
this.emit.apply(this, args);
|
|
51268
51268
|
return;
|
|
@@ -51273,7 +51273,7 @@ var require_delayed_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
51273
51273
|
}
|
|
51274
51274
|
this._bufferedEvents.push(args);
|
|
51275
51275
|
};
|
|
51276
|
-
DelayedStream
|
|
51276
|
+
DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
|
|
51277
51277
|
if (this._maxDataSizeExceeded) return;
|
|
51278
51278
|
if (this.dataSize <= this.maxDataSize) return;
|
|
51279
51279
|
this._maxDataSizeExceeded = true;
|
|
@@ -51288,8 +51288,8 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
51288
51288
|
var util$1 = __require("util");
|
|
51289
51289
|
var Stream$1 = __require("stream").Stream;
|
|
51290
51290
|
var DelayedStream = require_delayed_stream();
|
|
51291
|
-
module.exports = CombinedStream
|
|
51292
|
-
function CombinedStream
|
|
51291
|
+
module.exports = CombinedStream;
|
|
51292
|
+
function CombinedStream() {
|
|
51293
51293
|
this.writable = false;
|
|
51294
51294
|
this.readable = true;
|
|
51295
51295
|
this.dataSize = 0;
|
|
@@ -51301,18 +51301,18 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
51301
51301
|
this._insideLoop = false;
|
|
51302
51302
|
this._pendingNext = false;
|
|
51303
51303
|
}
|
|
51304
|
-
util$1.inherits(CombinedStream
|
|
51305
|
-
CombinedStream
|
|
51304
|
+
util$1.inherits(CombinedStream, Stream$1);
|
|
51305
|
+
CombinedStream.create = function(options) {
|
|
51306
51306
|
var combinedStream = new this();
|
|
51307
51307
|
options = options || {};
|
|
51308
51308
|
for (var option in options) combinedStream[option] = options[option];
|
|
51309
51309
|
return combinedStream;
|
|
51310
51310
|
};
|
|
51311
|
-
CombinedStream
|
|
51311
|
+
CombinedStream.isStreamLike = function(stream) {
|
|
51312
51312
|
return typeof stream !== "function" && typeof stream !== "string" && typeof stream !== "boolean" && typeof stream !== "number" && !Buffer.isBuffer(stream);
|
|
51313
51313
|
};
|
|
51314
|
-
CombinedStream
|
|
51315
|
-
if (CombinedStream
|
|
51314
|
+
CombinedStream.prototype.append = function(stream) {
|
|
51315
|
+
if (CombinedStream.isStreamLike(stream)) {
|
|
51316
51316
|
if (!(stream instanceof DelayedStream)) {
|
|
51317
51317
|
var newStream = DelayedStream.create(stream, {
|
|
51318
51318
|
maxDataSize: Infinity,
|
|
@@ -51327,12 +51327,12 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
51327
51327
|
this._streams.push(stream);
|
|
51328
51328
|
return this;
|
|
51329
51329
|
};
|
|
51330
|
-
CombinedStream
|
|
51330
|
+
CombinedStream.prototype.pipe = function(dest, options) {
|
|
51331
51331
|
Stream$1.prototype.pipe.call(this, dest, options);
|
|
51332
51332
|
this.resume();
|
|
51333
51333
|
return dest;
|
|
51334
51334
|
};
|
|
51335
|
-
CombinedStream
|
|
51335
|
+
CombinedStream.prototype._getNext = function() {
|
|
51336
51336
|
this._currentStream = null;
|
|
51337
51337
|
if (this._insideLoop) {
|
|
51338
51338
|
this._pendingNext = true;
|
|
@@ -51348,7 +51348,7 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
51348
51348
|
this._insideLoop = false;
|
|
51349
51349
|
}
|
|
51350
51350
|
};
|
|
51351
|
-
CombinedStream
|
|
51351
|
+
CombinedStream.prototype._realGetNext = function() {
|
|
51352
51352
|
var stream = this._streams.shift();
|
|
51353
51353
|
if (typeof stream == "undefined") {
|
|
51354
51354
|
this.end();
|
|
@@ -51359,16 +51359,16 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
51359
51359
|
return;
|
|
51360
51360
|
}
|
|
51361
51361
|
stream(function(stream$1) {
|
|
51362
|
-
if (CombinedStream
|
|
51362
|
+
if (CombinedStream.isStreamLike(stream$1)) {
|
|
51363
51363
|
stream$1.on("data", this._checkDataSize.bind(this));
|
|
51364
51364
|
this._handleErrors(stream$1);
|
|
51365
51365
|
}
|
|
51366
51366
|
this._pipeNext(stream$1);
|
|
51367
51367
|
}.bind(this));
|
|
51368
51368
|
};
|
|
51369
|
-
CombinedStream
|
|
51369
|
+
CombinedStream.prototype._pipeNext = function(stream) {
|
|
51370
51370
|
this._currentStream = stream;
|
|
51371
|
-
if (CombinedStream
|
|
51371
|
+
if (CombinedStream.isStreamLike(stream)) {
|
|
51372
51372
|
stream.on("end", this._getNext.bind(this));
|
|
51373
51373
|
stream.pipe(this, { end: false });
|
|
51374
51374
|
return;
|
|
@@ -51377,21 +51377,21 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
51377
51377
|
this.write(value);
|
|
51378
51378
|
this._getNext();
|
|
51379
51379
|
};
|
|
51380
|
-
CombinedStream
|
|
51380
|
+
CombinedStream.prototype._handleErrors = function(stream) {
|
|
51381
51381
|
var self$1 = this;
|
|
51382
51382
|
stream.on("error", function(err) {
|
|
51383
51383
|
self$1._emitError(err);
|
|
51384
51384
|
});
|
|
51385
51385
|
};
|
|
51386
|
-
CombinedStream
|
|
51386
|
+
CombinedStream.prototype.write = function(data) {
|
|
51387
51387
|
this.emit("data", data);
|
|
51388
51388
|
};
|
|
51389
|
-
CombinedStream
|
|
51389
|
+
CombinedStream.prototype.pause = function() {
|
|
51390
51390
|
if (!this.pauseStreams) return;
|
|
51391
51391
|
if (this.pauseStreams && this._currentStream && typeof this._currentStream.pause == "function") this._currentStream.pause();
|
|
51392
51392
|
this.emit("pause");
|
|
51393
51393
|
};
|
|
51394
|
-
CombinedStream
|
|
51394
|
+
CombinedStream.prototype.resume = function() {
|
|
51395
51395
|
if (!this._released) {
|
|
51396
51396
|
this._released = true;
|
|
51397
51397
|
this.writable = true;
|
|
@@ -51400,26 +51400,26 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
51400
51400
|
if (this.pauseStreams && this._currentStream && typeof this._currentStream.resume == "function") this._currentStream.resume();
|
|
51401
51401
|
this.emit("resume");
|
|
51402
51402
|
};
|
|
51403
|
-
CombinedStream
|
|
51403
|
+
CombinedStream.prototype.end = function() {
|
|
51404
51404
|
this._reset();
|
|
51405
51405
|
this.emit("end");
|
|
51406
51406
|
};
|
|
51407
|
-
CombinedStream
|
|
51407
|
+
CombinedStream.prototype.destroy = function() {
|
|
51408
51408
|
this._reset();
|
|
51409
51409
|
this.emit("close");
|
|
51410
51410
|
};
|
|
51411
|
-
CombinedStream
|
|
51411
|
+
CombinedStream.prototype._reset = function() {
|
|
51412
51412
|
this.writable = false;
|
|
51413
51413
|
this._streams = [];
|
|
51414
51414
|
this._currentStream = null;
|
|
51415
51415
|
};
|
|
51416
|
-
CombinedStream
|
|
51416
|
+
CombinedStream.prototype._checkDataSize = function() {
|
|
51417
51417
|
this._updateDataSize();
|
|
51418
51418
|
if (this.dataSize <= this.maxDataSize) return;
|
|
51419
51419
|
var message = "DelayedStream#maxDataSize of " + this.maxDataSize + " bytes exceeded.";
|
|
51420
51420
|
this._emitError(new Error(message));
|
|
51421
51421
|
};
|
|
51422
|
-
CombinedStream
|
|
51422
|
+
CombinedStream.prototype._updateDataSize = function() {
|
|
51423
51423
|
this.dataSize = 0;
|
|
51424
51424
|
var self$1 = this;
|
|
51425
51425
|
this._streams.forEach(function(stream) {
|
|
@@ -51428,7 +51428,7 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
51428
51428
|
});
|
|
51429
51429
|
if (this._currentStream && this._currentStream.dataSize) this.dataSize += this._currentStream.dataSize;
|
|
51430
51430
|
};
|
|
51431
|
-
CombinedStream
|
|
51431
|
+
CombinedStream.prototype._emitError = function(err) {
|
|
51432
51432
|
this._reset();
|
|
51433
51433
|
this.emit("error", err);
|
|
51434
51434
|
};
|
|
@@ -58537,8 +58537,8 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
58537
58537
|
function charset(type) {
|
|
58538
58538
|
if (!type || typeof type !== "string") return false;
|
|
58539
58539
|
var match = EXTRACT_TYPE_REGEXP.exec(type);
|
|
58540
|
-
var mime
|
|
58541
|
-
if (mime
|
|
58540
|
+
var mime = match && db[match[1].toLowerCase()];
|
|
58541
|
+
if (mime && mime.charset) return mime.charset;
|
|
58542
58542
|
if (match && TEXT_TYPE_REGEXP.test(match[1])) return "UTF-8";
|
|
58543
58543
|
return false;
|
|
58544
58544
|
}
|
|
@@ -58550,13 +58550,13 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
58550
58550
|
*/
|
|
58551
58551
|
function contentType(str) {
|
|
58552
58552
|
if (!str || typeof str !== "string") return false;
|
|
58553
|
-
var mime
|
|
58554
|
-
if (!mime
|
|
58555
|
-
if (mime
|
|
58556
|
-
var charset
|
|
58557
|
-
if (charset
|
|
58553
|
+
var mime = str.indexOf("/") === -1 ? exports.lookup(str) : str;
|
|
58554
|
+
if (!mime) return false;
|
|
58555
|
+
if (mime.indexOf("charset") === -1) {
|
|
58556
|
+
var charset = exports.charset(mime);
|
|
58557
|
+
if (charset) mime += "; charset=" + charset.toLowerCase();
|
|
58558
58558
|
}
|
|
58559
|
-
return mime
|
|
58559
|
+
return mime;
|
|
58560
58560
|
}
|
|
58561
58561
|
/**
|
|
58562
58562
|
* Get the default extension for a MIME type.
|
|
@@ -58579,9 +58579,9 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
58579
58579
|
*/
|
|
58580
58580
|
function lookup(path$1) {
|
|
58581
58581
|
if (!path$1 || typeof path$1 !== "string") return false;
|
|
58582
|
-
var extension
|
|
58583
|
-
if (!extension
|
|
58584
|
-
return exports.types[extension
|
|
58582
|
+
var extension = extname("x." + path$1).toLowerCase().substr(1);
|
|
58583
|
+
if (!extension) return false;
|
|
58584
|
+
return exports.types[extension] || false;
|
|
58585
58585
|
}
|
|
58586
58586
|
/**
|
|
58587
58587
|
* Populate the extensions and types maps.
|
|
@@ -58595,18 +58595,18 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
58595
58595
|
"iana"
|
|
58596
58596
|
];
|
|
58597
58597
|
Object.keys(db).forEach(function forEachMimeType(type) {
|
|
58598
|
-
var mime
|
|
58599
|
-
var exts = mime
|
|
58598
|
+
var mime = db[type];
|
|
58599
|
+
var exts = mime.extensions;
|
|
58600
58600
|
if (!exts || !exts.length) return;
|
|
58601
58601
|
extensions[type] = exts;
|
|
58602
|
-
for (var i
|
|
58603
|
-
var extension
|
|
58604
|
-
if (types[extension
|
|
58605
|
-
var from = preference.indexOf(db[types[extension
|
|
58606
|
-
var to = preference.indexOf(mime
|
|
58607
|
-
if (types[extension
|
|
58602
|
+
for (var i = 0; i < exts.length; i++) {
|
|
58603
|
+
var extension = exts[i];
|
|
58604
|
+
if (types[extension]) {
|
|
58605
|
+
var from = preference.indexOf(db[types[extension]].source);
|
|
58606
|
+
var to = preference.indexOf(mime.source);
|
|
58607
|
+
if (types[extension] !== "application/octet-stream" && (from > to || from === to && types[extension].substr(0, 12) === "application/")) continue;
|
|
58608
58608
|
}
|
|
58609
|
-
types[extension
|
|
58609
|
+
types[extension] = type;
|
|
58610
58610
|
}
|
|
58611
58611
|
});
|
|
58612
58612
|
}
|
|
@@ -58615,13 +58615,13 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
58615
58615
|
//#endregion
|
|
58616
58616
|
//#region node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/defer.js
|
|
58617
58617
|
var require_defer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
58618
|
-
module.exports = defer
|
|
58618
|
+
module.exports = defer;
|
|
58619
58619
|
/**
|
|
58620
58620
|
* Runs provided function on next iteration of the event loop
|
|
58621
58621
|
*
|
|
58622
58622
|
* @param {function} fn - function to run
|
|
58623
58623
|
*/
|
|
58624
|
-
function defer
|
|
58624
|
+
function defer(fn) {
|
|
58625
58625
|
var nextTick = typeof setImmediate == "function" ? setImmediate : typeof process == "object" && typeof process.nextTick == "function" ? process.nextTick : null;
|
|
58626
58626
|
if (nextTick) nextTick(fn);
|
|
58627
58627
|
else setTimeout(fn, 0);
|
|
@@ -58632,7 +58632,7 @@ var require_defer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58632
58632
|
//#region node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/async.js
|
|
58633
58633
|
var require_async = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
58634
58634
|
var defer = require_defer();
|
|
58635
|
-
module.exports = async
|
|
58635
|
+
module.exports = async;
|
|
58636
58636
|
/**
|
|
58637
58637
|
* Runs provided callback asynchronously
|
|
58638
58638
|
* even if callback itself is not
|
|
@@ -58640,7 +58640,7 @@ var require_async = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58640
58640
|
* @param {function} callback - callback to invoke
|
|
58641
58641
|
* @returns {function} - augmented callback
|
|
58642
58642
|
*/
|
|
58643
|
-
function async
|
|
58643
|
+
function async(callback) {
|
|
58644
58644
|
var isAsync = false;
|
|
58645
58645
|
defer(function() {
|
|
58646
58646
|
isAsync = true;
|
|
@@ -58657,15 +58657,15 @@ var require_async = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58657
58657
|
//#endregion
|
|
58658
58658
|
//#region node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/abort.js
|
|
58659
58659
|
var require_abort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
58660
|
-
module.exports = abort
|
|
58660
|
+
module.exports = abort;
|
|
58661
58661
|
/**
|
|
58662
58662
|
* Aborts leftover active jobs
|
|
58663
58663
|
*
|
|
58664
58664
|
* @param {object} state - current state object
|
|
58665
58665
|
*/
|
|
58666
|
-
function abort
|
|
58667
|
-
Object.keys(state
|
|
58668
|
-
state
|
|
58666
|
+
function abort(state) {
|
|
58667
|
+
Object.keys(state.jobs).forEach(clean.bind(state));
|
|
58668
|
+
state.jobs = {};
|
|
58669
58669
|
}
|
|
58670
58670
|
/**
|
|
58671
58671
|
* Cleans up leftover job by invoking abort function for the provided job id
|
|
@@ -58673,16 +58673,16 @@ var require_abort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58673
58673
|
* @this state
|
|
58674
58674
|
* @param {string|number} key - job id to abort
|
|
58675
58675
|
*/
|
|
58676
|
-
function clean(key
|
|
58677
|
-
if (typeof this.jobs[key
|
|
58676
|
+
function clean(key) {
|
|
58677
|
+
if (typeof this.jobs[key] == "function") this.jobs[key]();
|
|
58678
58678
|
}
|
|
58679
58679
|
}));
|
|
58680
58680
|
|
|
58681
58681
|
//#endregion
|
|
58682
58682
|
//#region node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/iterate.js
|
|
58683
58683
|
var require_iterate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
58684
|
-
var async
|
|
58685
|
-
module.exports = iterate
|
|
58684
|
+
var async = require_async(), abort = require_abort();
|
|
58685
|
+
module.exports = iterate;
|
|
58686
58686
|
/**
|
|
58687
58687
|
* Iterates over each job object
|
|
58688
58688
|
*
|
|
@@ -58691,14 +58691,14 @@ var require_iterate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58691
58691
|
* @param {object} state - current job status
|
|
58692
58692
|
* @param {function} callback - invoked when all elements processed
|
|
58693
58693
|
*/
|
|
58694
|
-
function iterate
|
|
58695
|
-
var key
|
|
58696
|
-
state
|
|
58697
|
-
if (!(key
|
|
58698
|
-
delete state
|
|
58699
|
-
if (error
|
|
58700
|
-
else state
|
|
58701
|
-
callback(error
|
|
58694
|
+
function iterate(list, iterator, state, callback) {
|
|
58695
|
+
var key = state["keyedList"] ? state["keyedList"][state.index] : state.index;
|
|
58696
|
+
state.jobs[key] = runJob(iterator, key, list[key], function(error, output) {
|
|
58697
|
+
if (!(key in state.jobs)) return;
|
|
58698
|
+
delete state.jobs[key];
|
|
58699
|
+
if (error) abort(state);
|
|
58700
|
+
else state.results[key] = output;
|
|
58701
|
+
callback(error, state.results);
|
|
58702
58702
|
});
|
|
58703
58703
|
}
|
|
58704
58704
|
/**
|
|
@@ -58710,10 +58710,10 @@ var require_iterate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58710
58710
|
* @param {function} callback - invoked after iterator is done with the job
|
|
58711
58711
|
* @returns {function|mixed} - job abort function or something else
|
|
58712
58712
|
*/
|
|
58713
|
-
function runJob(iterator, key
|
|
58713
|
+
function runJob(iterator, key, item, callback) {
|
|
58714
58714
|
var aborter;
|
|
58715
|
-
if (iterator.length == 2) aborter = iterator(item, async
|
|
58716
|
-
else aborter = iterator(item, key
|
|
58715
|
+
if (iterator.length == 2) aborter = iterator(item, async(callback));
|
|
58716
|
+
else aborter = iterator(item, key, async(callback));
|
|
58717
58717
|
return aborter;
|
|
58718
58718
|
}
|
|
58719
58719
|
}));
|
|
@@ -58732,17 +58732,17 @@ var require_state = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58732
58732
|
* @returns {object} - initial state object
|
|
58733
58733
|
*/
|
|
58734
58734
|
function state(list, sortMethod) {
|
|
58735
|
-
var isNamedList = !Array.isArray(list), initState
|
|
58735
|
+
var isNamedList = !Array.isArray(list), initState = {
|
|
58736
58736
|
index: 0,
|
|
58737
58737
|
keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
|
|
58738
58738
|
jobs: {},
|
|
58739
58739
|
results: isNamedList ? {} : [],
|
|
58740
58740
|
size: isNamedList ? Object.keys(list).length : list.length
|
|
58741
58741
|
};
|
|
58742
|
-
if (sortMethod) initState
|
|
58742
|
+
if (sortMethod) initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) {
|
|
58743
58743
|
return sortMethod(list[a], list[b]);
|
|
58744
58744
|
});
|
|
58745
|
-
return initState
|
|
58745
|
+
return initState;
|
|
58746
58746
|
}
|
|
58747
58747
|
}));
|
|
58748
58748
|
|
|
@@ -58750,14 +58750,14 @@ var require_state = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58750
58750
|
//#region node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/terminator.js
|
|
58751
58751
|
var require_terminator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
58752
58752
|
var abort = require_abort(), async = require_async();
|
|
58753
|
-
module.exports = terminator
|
|
58753
|
+
module.exports = terminator;
|
|
58754
58754
|
/**
|
|
58755
58755
|
* Terminates jobs in the attached state context
|
|
58756
58756
|
*
|
|
58757
58757
|
* @this AsyncKitState#
|
|
58758
58758
|
* @param {function} callback - final callback to invoke after termination
|
|
58759
58759
|
*/
|
|
58760
|
-
function terminator
|
|
58760
|
+
function terminator(callback) {
|
|
58761
58761
|
if (!Object.keys(this.jobs).length) return;
|
|
58762
58762
|
this.index = this.size;
|
|
58763
58763
|
abort(this);
|
|
@@ -58768,7 +58768,7 @@ var require_terminator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58768
58768
|
//#endregion
|
|
58769
58769
|
//#region node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/parallel.js
|
|
58770
58770
|
var require_parallel = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
58771
|
-
var iterate
|
|
58771
|
+
var iterate = require_iterate(), initState = require_state(), terminator = require_terminator();
|
|
58772
58772
|
module.exports = parallel;
|
|
58773
58773
|
/**
|
|
58774
58774
|
* Runs iterator over provided array elements in parallel
|
|
@@ -58779,21 +58779,21 @@ var require_parallel = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58779
58779
|
* @returns {function} - jobs terminator
|
|
58780
58780
|
*/
|
|
58781
58781
|
function parallel(list, iterator, callback) {
|
|
58782
|
-
var state
|
|
58783
|
-
while (state
|
|
58784
|
-
iterate
|
|
58785
|
-
if (error
|
|
58786
|
-
callback(error
|
|
58782
|
+
var state = initState(list);
|
|
58783
|
+
while (state.index < (state["keyedList"] || list).length) {
|
|
58784
|
+
iterate(list, iterator, state, function(error, result) {
|
|
58785
|
+
if (error) {
|
|
58786
|
+
callback(error, result);
|
|
58787
58787
|
return;
|
|
58788
58788
|
}
|
|
58789
|
-
if (Object.keys(state
|
|
58790
|
-
callback(null, state
|
|
58789
|
+
if (Object.keys(state.jobs).length === 0) {
|
|
58790
|
+
callback(null, state.results);
|
|
58791
58791
|
return;
|
|
58792
58792
|
}
|
|
58793
58793
|
});
|
|
58794
|
-
state
|
|
58794
|
+
state.index++;
|
|
58795
58795
|
}
|
|
58796
|
-
return terminator
|
|
58796
|
+
return terminator.bind(state, callback);
|
|
58797
58797
|
}
|
|
58798
58798
|
}));
|
|
58799
58799
|
|
|
@@ -58801,7 +58801,7 @@ var require_parallel = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58801
58801
|
//#region node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serialOrdered.js
|
|
58802
58802
|
var require_serialOrdered = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
58803
58803
|
var iterate = require_iterate(), initState = require_state(), terminator = require_terminator();
|
|
58804
|
-
module.exports = serialOrdered
|
|
58804
|
+
module.exports = serialOrdered;
|
|
58805
58805
|
module.exports.ascending = ascending;
|
|
58806
58806
|
module.exports.descending = descending;
|
|
58807
58807
|
/**
|
|
@@ -58813,21 +58813,21 @@ var require_serialOrdered = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
58813
58813
|
* @param {function} callback - invoked when all elements processed
|
|
58814
58814
|
* @returns {function} - jobs terminator
|
|
58815
58815
|
*/
|
|
58816
|
-
function serialOrdered
|
|
58817
|
-
var state
|
|
58818
|
-
iterate(list, iterator, state
|
|
58819
|
-
if (error
|
|
58820
|
-
callback(error
|
|
58816
|
+
function serialOrdered(list, iterator, sortMethod, callback) {
|
|
58817
|
+
var state = initState(list, sortMethod);
|
|
58818
|
+
iterate(list, iterator, state, function iteratorHandler(error, result) {
|
|
58819
|
+
if (error) {
|
|
58820
|
+
callback(error, result);
|
|
58821
58821
|
return;
|
|
58822
58822
|
}
|
|
58823
|
-
state
|
|
58824
|
-
if (state
|
|
58825
|
-
iterate(list, iterator, state
|
|
58823
|
+
state.index++;
|
|
58824
|
+
if (state.index < (state["keyedList"] || list).length) {
|
|
58825
|
+
iterate(list, iterator, state, iteratorHandler);
|
|
58826
58826
|
return;
|
|
58827
58827
|
}
|
|
58828
|
-
callback(null, state
|
|
58828
|
+
callback(null, state.results);
|
|
58829
58829
|
});
|
|
58830
|
-
return terminator.bind(state
|
|
58830
|
+
return terminator.bind(state, callback);
|
|
58831
58831
|
}
|
|
58832
58832
|
/**
|
|
58833
58833
|
* sort helper to sort array elements in ascending order
|
|
@@ -58991,7 +58991,7 @@ var require_isNaN = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
58991
58991
|
var require_sign = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
58992
58992
|
var $isNaN = require_isNaN();
|
|
58993
58993
|
/** @type {import('./sign')} */
|
|
58994
|
-
module.exports = function sign
|
|
58994
|
+
module.exports = function sign(number) {
|
|
58995
58995
|
if ($isNaN(number) || number === 0) return number;
|
|
58996
58996
|
return number < 0 ? -1 : 1;
|
|
58997
58997
|
};
|
|
@@ -59008,33 +59008,33 @@ var require_gOPD = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59008
59008
|
//#region node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js
|
|
59009
59009
|
var require_gopd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
59010
59010
|
/** @type {import('.')} */
|
|
59011
|
-
var $gOPD
|
|
59012
|
-
if ($gOPD
|
|
59013
|
-
$gOPD
|
|
59011
|
+
var $gOPD = require_gOPD();
|
|
59012
|
+
if ($gOPD) try {
|
|
59013
|
+
$gOPD([], "length");
|
|
59014
59014
|
} catch (e) {
|
|
59015
|
-
$gOPD
|
|
59015
|
+
$gOPD = null;
|
|
59016
59016
|
}
|
|
59017
|
-
module.exports = $gOPD
|
|
59017
|
+
module.exports = $gOPD;
|
|
59018
59018
|
}));
|
|
59019
59019
|
|
|
59020
59020
|
//#endregion
|
|
59021
59021
|
//#region node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js
|
|
59022
59022
|
var require_es_define_property = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
59023
59023
|
/** @type {import('.')} */
|
|
59024
|
-
var $defineProperty
|
|
59025
|
-
if ($defineProperty
|
|
59026
|
-
$defineProperty
|
|
59024
|
+
var $defineProperty = Object.defineProperty || false;
|
|
59025
|
+
if ($defineProperty) try {
|
|
59026
|
+
$defineProperty({}, "a", { value: 1 });
|
|
59027
59027
|
} catch (e) {
|
|
59028
|
-
$defineProperty
|
|
59028
|
+
$defineProperty = false;
|
|
59029
59029
|
}
|
|
59030
|
-
module.exports = $defineProperty
|
|
59030
|
+
module.exports = $defineProperty;
|
|
59031
59031
|
}));
|
|
59032
59032
|
|
|
59033
59033
|
//#endregion
|
|
59034
59034
|
//#region node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js
|
|
59035
59035
|
var require_shams$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
59036
59036
|
/** @type {import('./shams')} */
|
|
59037
|
-
module.exports = function hasSymbols
|
|
59037
|
+
module.exports = function hasSymbols() {
|
|
59038
59038
|
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") return false;
|
|
59039
59039
|
if (typeof Symbol.iterator === "symbol") return true;
|
|
59040
59040
|
/** @type {{ [k in symbol]?: unknown }} */
|
|
@@ -59085,9 +59085,9 @@ var require_Reflect_getPrototypeOf = /* @__PURE__ */ __commonJSMin(((exports, mo
|
|
|
59085
59085
|
//#endregion
|
|
59086
59086
|
//#region node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js
|
|
59087
59087
|
var require_Object_getPrototypeOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
59088
|
-
var $Object
|
|
59088
|
+
var $Object = require_es_object_atoms();
|
|
59089
59089
|
/** @type {import('./Object.getPrototypeOf')} */
|
|
59090
|
-
module.exports = $Object
|
|
59090
|
+
module.exports = $Object.getPrototypeOf || null;
|
|
59091
59091
|
}));
|
|
59092
59092
|
|
|
59093
59093
|
//#endregion
|
|
@@ -59095,28 +59095,28 @@ var require_Object_getPrototypeOf = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
59095
59095
|
var require_implementation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
59096
59096
|
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
59097
59097
|
var toStr = Object.prototype.toString;
|
|
59098
|
-
var max
|
|
59098
|
+
var max = Math.max;
|
|
59099
59099
|
var funcType = "[object Function]";
|
|
59100
|
-
var concatty = function concatty
|
|
59100
|
+
var concatty = function concatty(a, b) {
|
|
59101
59101
|
var arr = [];
|
|
59102
|
-
for (var i
|
|
59102
|
+
for (var i = 0; i < a.length; i += 1) arr[i] = a[i];
|
|
59103
59103
|
for (var j = 0; j < b.length; j += 1) arr[j + a.length] = b[j];
|
|
59104
59104
|
return arr;
|
|
59105
59105
|
};
|
|
59106
|
-
var slicy = function slicy
|
|
59106
|
+
var slicy = function slicy(arrLike, offset) {
|
|
59107
59107
|
var arr = [];
|
|
59108
|
-
for (var i
|
|
59108
|
+
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) arr[j] = arrLike[i];
|
|
59109
59109
|
return arr;
|
|
59110
59110
|
};
|
|
59111
59111
|
var joiny = function(arr, joiner) {
|
|
59112
59112
|
var str = "";
|
|
59113
|
-
for (var i
|
|
59114
|
-
str += arr[i
|
|
59115
|
-
if (i
|
|
59113
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
59114
|
+
str += arr[i];
|
|
59115
|
+
if (i + 1 < arr.length) str += joiner;
|
|
59116
59116
|
}
|
|
59117
59117
|
return str;
|
|
59118
59118
|
};
|
|
59119
|
-
module.exports = function bind
|
|
59119
|
+
module.exports = function bind(that) {
|
|
59120
59120
|
var target = this;
|
|
59121
59121
|
if (typeof target !== "function" || toStr.apply(target) !== funcType) throw new TypeError(ERROR_MESSAGE + target);
|
|
59122
59122
|
var args = slicy(arguments, 1);
|
|
@@ -59129,9 +59129,9 @@ var require_implementation = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
59129
59129
|
}
|
|
59130
59130
|
return target.apply(that, concatty(args, arguments));
|
|
59131
59131
|
};
|
|
59132
|
-
var boundLength = max
|
|
59132
|
+
var boundLength = max(0, target.length - args.length);
|
|
59133
59133
|
var boundArgs = [];
|
|
59134
|
-
for (var i
|
|
59134
|
+
for (var i = 0; i < boundLength; i++) boundArgs[i] = "$" + i;
|
|
59135
59135
|
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
59136
59136
|
if (target.prototype) {
|
|
59137
59137
|
var Empty = function Empty$1() {};
|
|
@@ -59174,25 +59174,25 @@ var require_reflectApply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59174
59174
|
//#endregion
|
|
59175
59175
|
//#region node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js
|
|
59176
59176
|
var require_actualApply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
59177
|
-
var bind
|
|
59178
|
-
var $apply
|
|
59179
|
-
var $call
|
|
59177
|
+
var bind = require_function_bind();
|
|
59178
|
+
var $apply = require_functionApply();
|
|
59179
|
+
var $call = require_functionCall();
|
|
59180
59180
|
var $reflectApply = require_reflectApply();
|
|
59181
59181
|
/** @type {import('./actualApply')} */
|
|
59182
|
-
module.exports = $reflectApply || bind
|
|
59182
|
+
module.exports = $reflectApply || bind.call($call, $apply);
|
|
59183
59183
|
}));
|
|
59184
59184
|
|
|
59185
59185
|
//#endregion
|
|
59186
59186
|
//#region node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js
|
|
59187
59187
|
var require_call_bind_apply_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
59188
|
-
var bind
|
|
59189
|
-
var $TypeError
|
|
59190
|
-
var $call
|
|
59188
|
+
var bind = require_function_bind();
|
|
59189
|
+
var $TypeError = require_type();
|
|
59190
|
+
var $call = require_functionCall();
|
|
59191
59191
|
var $actualApply = require_actualApply();
|
|
59192
59192
|
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
|
|
59193
59193
|
module.exports = function callBindBasic(args) {
|
|
59194
|
-
if (args.length < 1 || typeof args[0] !== "function") throw new $TypeError
|
|
59195
|
-
return $actualApply(bind
|
|
59194
|
+
if (args.length < 1 || typeof args[0] !== "function") throw new $TypeError("a function is required");
|
|
59195
|
+
return $actualApply(bind, $call, args);
|
|
59196
59196
|
};
|
|
59197
59197
|
}));
|
|
59198
59198
|
|
|
@@ -59208,11 +59208,11 @@ var require_get = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59208
59208
|
if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") throw e;
|
|
59209
59209
|
}
|
|
59210
59210
|
var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, "__proto__");
|
|
59211
|
-
var $Object
|
|
59212
|
-
var $getPrototypeOf = $Object
|
|
59211
|
+
var $Object = Object;
|
|
59212
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
59213
59213
|
/** @type {import('./get')} */
|
|
59214
59214
|
module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? function getDunder(value) {
|
|
59215
|
-
return $getPrototypeOf(value == null ? value : $Object
|
|
59215
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
59216
59216
|
} : false;
|
|
59217
59217
|
}));
|
|
59218
59218
|
|
|
@@ -59223,12 +59223,12 @@ var require_get_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59223
59223
|
var originalGetProto = require_Object_getPrototypeOf();
|
|
59224
59224
|
var getDunderProto = require_get();
|
|
59225
59225
|
/** @type {import('.')} */
|
|
59226
|
-
module.exports = reflectGetProto ? function getProto
|
|
59226
|
+
module.exports = reflectGetProto ? function getProto(O) {
|
|
59227
59227
|
return reflectGetProto(O);
|
|
59228
|
-
} : originalGetProto ? function getProto
|
|
59228
|
+
} : originalGetProto ? function getProto(O) {
|
|
59229
59229
|
if (!O || typeof O !== "object" && typeof O !== "function") throw new TypeError("getProto: not an object");
|
|
59230
59230
|
return originalGetProto(O);
|
|
59231
|
-
} : getDunderProto ? function getProto
|
|
59231
|
+
} : getDunderProto ? function getProto(O) {
|
|
59232
59232
|
return getDunderProto(O);
|
|
59233
59233
|
} : null;
|
|
59234
59234
|
}));
|
|
@@ -59238,22 +59238,22 @@ var require_get_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59238
59238
|
var require_hasown = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
59239
59239
|
var call = Function.prototype.call;
|
|
59240
59240
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
59241
|
-
var bind
|
|
59241
|
+
var bind = require_function_bind();
|
|
59242
59242
|
/** @type {import('.')} */
|
|
59243
|
-
module.exports = bind
|
|
59243
|
+
module.exports = bind.call(call, $hasOwn);
|
|
59244
59244
|
}));
|
|
59245
59245
|
|
|
59246
59246
|
//#endregion
|
|
59247
59247
|
//#region node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js
|
|
59248
59248
|
var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
59249
|
-
var undefined
|
|
59249
|
+
var undefined;
|
|
59250
59250
|
var $Object = require_es_object_atoms();
|
|
59251
59251
|
var $Error = require_es_errors();
|
|
59252
59252
|
var $EvalError = require_eval();
|
|
59253
59253
|
var $RangeError = require_range();
|
|
59254
59254
|
var $ReferenceError = require_ref();
|
|
59255
59255
|
var $SyntaxError = require_syntax();
|
|
59256
|
-
var $TypeError
|
|
59256
|
+
var $TypeError = require_type();
|
|
59257
59257
|
var $URIError = require_uri();
|
|
59258
59258
|
var abs = require_abs();
|
|
59259
59259
|
var floor = require_floor();
|
|
@@ -59269,9 +59269,9 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
59269
59269
|
} catch (e) {}
|
|
59270
59270
|
};
|
|
59271
59271
|
var $gOPD = require_gopd();
|
|
59272
|
-
var $defineProperty
|
|
59272
|
+
var $defineProperty = require_es_define_property();
|
|
59273
59273
|
var throwTypeError = function() {
|
|
59274
|
-
throw new $TypeError
|
|
59274
|
+
throw new $TypeError();
|
|
59275
59275
|
};
|
|
59276
59276
|
var ThrowTypeError = $gOPD ? function() {
|
|
59277
59277
|
try {
|
|
@@ -59285,31 +59285,31 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
59285
59285
|
}
|
|
59286
59286
|
}
|
|
59287
59287
|
}() : throwTypeError;
|
|
59288
|
-
var hasSymbols
|
|
59288
|
+
var hasSymbols = require_has_symbols()();
|
|
59289
59289
|
var getProto = require_get_proto();
|
|
59290
59290
|
var $ObjectGPO = require_Object_getPrototypeOf();
|
|
59291
59291
|
var $ReflectGPO = require_Reflect_getPrototypeOf();
|
|
59292
59292
|
var $apply = require_functionApply();
|
|
59293
59293
|
var $call = require_functionCall();
|
|
59294
59294
|
var needsEval = {};
|
|
59295
|
-
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined
|
|
59295
|
+
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined : getProto(Uint8Array);
|
|
59296
59296
|
var INTRINSICS = {
|
|
59297
59297
|
__proto__: null,
|
|
59298
|
-
"%AggregateError%": typeof AggregateError === "undefined" ? undefined
|
|
59298
|
+
"%AggregateError%": typeof AggregateError === "undefined" ? undefined : AggregateError,
|
|
59299
59299
|
"%Array%": Array,
|
|
59300
|
-
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined
|
|
59301
|
-
"%ArrayIteratorPrototype%": hasSymbols
|
|
59302
|
-
"%AsyncFromSyncIteratorPrototype%": undefined
|
|
59300
|
+
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined : ArrayBuffer,
|
|
59301
|
+
"%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,
|
|
59302
|
+
"%AsyncFromSyncIteratorPrototype%": undefined,
|
|
59303
59303
|
"%AsyncFunction%": needsEval,
|
|
59304
59304
|
"%AsyncGenerator%": needsEval,
|
|
59305
59305
|
"%AsyncGeneratorFunction%": needsEval,
|
|
59306
59306
|
"%AsyncIteratorPrototype%": needsEval,
|
|
59307
|
-
"%Atomics%": typeof Atomics === "undefined" ? undefined
|
|
59308
|
-
"%BigInt%": typeof BigInt === "undefined" ? undefined
|
|
59309
|
-
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined
|
|
59310
|
-
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined
|
|
59307
|
+
"%Atomics%": typeof Atomics === "undefined" ? undefined : Atomics,
|
|
59308
|
+
"%BigInt%": typeof BigInt === "undefined" ? undefined : BigInt,
|
|
59309
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined : BigInt64Array,
|
|
59310
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined : BigUint64Array,
|
|
59311
59311
|
"%Boolean%": Boolean,
|
|
59312
|
-
"%DataView%": typeof DataView === "undefined" ? undefined
|
|
59312
|
+
"%DataView%": typeof DataView === "undefined" ? undefined : DataView,
|
|
59313
59313
|
"%Date%": Date,
|
|
59314
59314
|
"%decodeURI%": decodeURI,
|
|
59315
59315
|
"%decodeURIComponent%": decodeURIComponent,
|
|
@@ -59318,54 +59318,54 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
59318
59318
|
"%Error%": $Error,
|
|
59319
59319
|
"%eval%": eval,
|
|
59320
59320
|
"%EvalError%": $EvalError,
|
|
59321
|
-
"%Float16Array%": typeof Float16Array === "undefined" ? undefined
|
|
59322
|
-
"%Float32Array%": typeof Float32Array === "undefined" ? undefined
|
|
59323
|
-
"%Float64Array%": typeof Float64Array === "undefined" ? undefined
|
|
59324
|
-
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined
|
|
59321
|
+
"%Float16Array%": typeof Float16Array === "undefined" ? undefined : Float16Array,
|
|
59322
|
+
"%Float32Array%": typeof Float32Array === "undefined" ? undefined : Float32Array,
|
|
59323
|
+
"%Float64Array%": typeof Float64Array === "undefined" ? undefined : Float64Array,
|
|
59324
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined : FinalizationRegistry,
|
|
59325
59325
|
"%Function%": $Function,
|
|
59326
59326
|
"%GeneratorFunction%": needsEval,
|
|
59327
|
-
"%Int8Array%": typeof Int8Array === "undefined" ? undefined
|
|
59328
|
-
"%Int16Array%": typeof Int16Array === "undefined" ? undefined
|
|
59329
|
-
"%Int32Array%": typeof Int32Array === "undefined" ? undefined
|
|
59327
|
+
"%Int8Array%": typeof Int8Array === "undefined" ? undefined : Int8Array,
|
|
59328
|
+
"%Int16Array%": typeof Int16Array === "undefined" ? undefined : Int16Array,
|
|
59329
|
+
"%Int32Array%": typeof Int32Array === "undefined" ? undefined : Int32Array,
|
|
59330
59330
|
"%isFinite%": isFinite,
|
|
59331
59331
|
"%isNaN%": isNaN,
|
|
59332
|
-
"%IteratorPrototype%": hasSymbols
|
|
59333
|
-
"%JSON%": typeof JSON === "object" ? JSON : undefined
|
|
59334
|
-
"%Map%": typeof Map === "undefined" ? undefined
|
|
59335
|
-
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols
|
|
59332
|
+
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
|
59333
|
+
"%JSON%": typeof JSON === "object" ? JSON : undefined,
|
|
59334
|
+
"%Map%": typeof Map === "undefined" ? undefined : Map,
|
|
59335
|
+
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
59336
59336
|
"%Math%": Math,
|
|
59337
59337
|
"%Number%": Number,
|
|
59338
59338
|
"%Object%": $Object,
|
|
59339
59339
|
"%Object.getOwnPropertyDescriptor%": $gOPD,
|
|
59340
59340
|
"%parseFloat%": parseFloat,
|
|
59341
59341
|
"%parseInt%": parseInt,
|
|
59342
|
-
"%Promise%": typeof Promise === "undefined" ? undefined
|
|
59343
|
-
"%Proxy%": typeof Proxy === "undefined" ? undefined
|
|
59342
|
+
"%Promise%": typeof Promise === "undefined" ? undefined : Promise,
|
|
59343
|
+
"%Proxy%": typeof Proxy === "undefined" ? undefined : Proxy,
|
|
59344
59344
|
"%RangeError%": $RangeError,
|
|
59345
59345
|
"%ReferenceError%": $ReferenceError,
|
|
59346
|
-
"%Reflect%": typeof Reflect === "undefined" ? undefined
|
|
59346
|
+
"%Reflect%": typeof Reflect === "undefined" ? undefined : Reflect,
|
|
59347
59347
|
"%RegExp%": RegExp,
|
|
59348
|
-
"%Set%": typeof Set === "undefined" ? undefined
|
|
59349
|
-
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols
|
|
59350
|
-
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined
|
|
59348
|
+
"%Set%": typeof Set === "undefined" ? undefined : Set,
|
|
59349
|
+
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
59350
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined : SharedArrayBuffer,
|
|
59351
59351
|
"%String%": String,
|
|
59352
|
-
"%StringIteratorPrototype%": hasSymbols
|
|
59353
|
-
"%Symbol%": hasSymbols
|
|
59352
|
+
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined,
|
|
59353
|
+
"%Symbol%": hasSymbols ? Symbol : undefined,
|
|
59354
59354
|
"%SyntaxError%": $SyntaxError,
|
|
59355
59355
|
"%ThrowTypeError%": ThrowTypeError,
|
|
59356
59356
|
"%TypedArray%": TypedArray,
|
|
59357
|
-
"%TypeError%": $TypeError
|
|
59358
|
-
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined
|
|
59359
|
-
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined
|
|
59360
|
-
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined
|
|
59361
|
-
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined
|
|
59357
|
+
"%TypeError%": $TypeError,
|
|
59358
|
+
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined : Uint8Array,
|
|
59359
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined : Uint8ClampedArray,
|
|
59360
|
+
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined : Uint16Array,
|
|
59361
|
+
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined : Uint32Array,
|
|
59362
59362
|
"%URIError%": $URIError,
|
|
59363
|
-
"%WeakMap%": typeof WeakMap === "undefined" ? undefined
|
|
59364
|
-
"%WeakRef%": typeof WeakRef === "undefined" ? undefined
|
|
59365
|
-
"%WeakSet%": typeof WeakSet === "undefined" ? undefined
|
|
59363
|
+
"%WeakMap%": typeof WeakMap === "undefined" ? undefined : WeakMap,
|
|
59364
|
+
"%WeakRef%": typeof WeakRef === "undefined" ? undefined : WeakRef,
|
|
59365
|
+
"%WeakSet%": typeof WeakSet === "undefined" ? undefined : WeakSet,
|
|
59366
59366
|
"%Function.prototype.call%": $call,
|
|
59367
59367
|
"%Function.prototype.apply%": $apply,
|
|
59368
|
-
"%Object.defineProperty%": $defineProperty
|
|
59368
|
+
"%Object.defineProperty%": $defineProperty,
|
|
59369
59369
|
"%Object.getPrototypeOf%": $ObjectGPO,
|
|
59370
59370
|
"%Math.abs%": abs,
|
|
59371
59371
|
"%Math.floor%": floor,
|
|
@@ -59381,16 +59381,16 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
59381
59381
|
} catch (e) {
|
|
59382
59382
|
INTRINSICS["%Error.prototype%"] = getProto(getProto(e));
|
|
59383
59383
|
}
|
|
59384
|
-
var doEval = function doEval
|
|
59384
|
+
var doEval = function doEval(name$1) {
|
|
59385
59385
|
var value;
|
|
59386
59386
|
if (name$1 === "%AsyncFunction%") value = getEvalledConstructor("async function () {}");
|
|
59387
59387
|
else if (name$1 === "%GeneratorFunction%") value = getEvalledConstructor("function* () {}");
|
|
59388
59388
|
else if (name$1 === "%AsyncGeneratorFunction%") value = getEvalledConstructor("async function* () {}");
|
|
59389
59389
|
else if (name$1 === "%AsyncGenerator%") {
|
|
59390
|
-
var fn = doEval
|
|
59390
|
+
var fn = doEval("%AsyncGeneratorFunction%");
|
|
59391
59391
|
if (fn) value = fn.prototype;
|
|
59392
59392
|
} else if (name$1 === "%AsyncIteratorPrototype%") {
|
|
59393
|
-
var gen = doEval
|
|
59393
|
+
var gen = doEval("%AsyncGenerator%");
|
|
59394
59394
|
if (gen && getProto) value = getProto(gen.prototype);
|
|
59395
59395
|
}
|
|
59396
59396
|
INTRINSICS[name$1] = value;
|
|
@@ -59487,7 +59487,7 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
59487
59487
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
59488
59488
|
};
|
|
59489
59489
|
var bind = require_function_bind();
|
|
59490
|
-
var hasOwn
|
|
59490
|
+
var hasOwn = require_hasown();
|
|
59491
59491
|
var $concat = bind.call($call, Array.prototype.concat);
|
|
59492
59492
|
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
59493
59493
|
var $replace = bind.call($call, String.prototype.replace);
|
|
@@ -59495,7 +59495,7 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
59495
59495
|
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
59496
59496
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
59497
59497
|
var reEscapeChar = /\\(\\)?/g;
|
|
59498
|
-
var stringToPath = function stringToPath
|
|
59498
|
+
var stringToPath = function stringToPath(string) {
|
|
59499
59499
|
var first = $strSlice(string, 0, 1);
|
|
59500
59500
|
var last = $strSlice(string, -1);
|
|
59501
59501
|
if (first === "%" && last !== "%") throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -59506,17 +59506,17 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
59506
59506
|
});
|
|
59507
59507
|
return result;
|
|
59508
59508
|
};
|
|
59509
|
-
var getBaseIntrinsic = function getBaseIntrinsic
|
|
59509
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name$1, allowMissing) {
|
|
59510
59510
|
var intrinsicName = name$1;
|
|
59511
59511
|
var alias;
|
|
59512
|
-
if (hasOwn
|
|
59512
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
59513
59513
|
alias = LEGACY_ALIASES[intrinsicName];
|
|
59514
59514
|
intrinsicName = "%" + alias[0] + "%";
|
|
59515
59515
|
}
|
|
59516
|
-
if (hasOwn
|
|
59516
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
59517
59517
|
var value = INTRINSICS[intrinsicName];
|
|
59518
59518
|
if (value === needsEval) value = doEval(intrinsicName);
|
|
59519
|
-
if (typeof value === "undefined" && !allowMissing) throw new $TypeError
|
|
59519
|
+
if (typeof value === "undefined" && !allowMissing) throw new $TypeError("intrinsic " + name$1 + " exists, but is not available. Please file an issue!");
|
|
59520
59520
|
return {
|
|
59521
59521
|
alias,
|
|
59522
59522
|
name: intrinsicName,
|
|
@@ -59526,8 +59526,8 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
59526
59526
|
throw new $SyntaxError("intrinsic " + name$1 + " does not exist!");
|
|
59527
59527
|
};
|
|
59528
59528
|
module.exports = function GetIntrinsic(name$1, allowMissing) {
|
|
59529
|
-
if (typeof name$1 !== "string" || name$1.length === 0) throw new $TypeError
|
|
59530
|
-
if (arguments.length > 1 && typeof allowMissing !== "boolean") throw new $TypeError
|
|
59529
|
+
if (typeof name$1 !== "string" || name$1.length === 0) throw new $TypeError("intrinsic name must be a non-empty string");
|
|
59530
|
+
if (arguments.length > 1 && typeof allowMissing !== "boolean") throw new $TypeError("\"allowMissing\" argument must be a boolean");
|
|
59531
59531
|
if ($exec(/^%?[^%]*%?$/, name$1) === null) throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
59532
59532
|
var parts = stringToPath(name$1);
|
|
59533
59533
|
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
@@ -59540,27 +59540,27 @@ var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
59540
59540
|
intrinsicBaseName = alias[0];
|
|
59541
59541
|
$spliceApply(parts, $concat([0, 1], alias));
|
|
59542
59542
|
}
|
|
59543
|
-
for (var i
|
|
59544
|
-
var part = parts[i
|
|
59543
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
59544
|
+
var part = parts[i];
|
|
59545
59545
|
var first = $strSlice(part, 0, 1);
|
|
59546
59546
|
var last = $strSlice(part, -1);
|
|
59547
59547
|
if ((first === "\"" || first === "'" || first === "`" || last === "\"" || last === "'" || last === "`") && first !== last) throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
59548
59548
|
if (part === "constructor" || !isOwn) skipFurtherCaching = true;
|
|
59549
59549
|
intrinsicBaseName += "." + part;
|
|
59550
59550
|
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
59551
|
-
if (hasOwn
|
|
59551
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) value = INTRINSICS[intrinsicRealName];
|
|
59552
59552
|
else if (value != null) {
|
|
59553
59553
|
if (!(part in value)) {
|
|
59554
|
-
if (!allowMissing) throw new $TypeError
|
|
59554
|
+
if (!allowMissing) throw new $TypeError("base intrinsic for " + name$1 + " exists, but the property is not available.");
|
|
59555
59555
|
return;
|
|
59556
59556
|
}
|
|
59557
|
-
if ($gOPD && i
|
|
59558
|
-
var desc
|
|
59559
|
-
isOwn = !!desc
|
|
59560
|
-
if (isOwn && "get" in desc
|
|
59557
|
+
if ($gOPD && i + 1 >= parts.length) {
|
|
59558
|
+
var desc = $gOPD(value, part);
|
|
59559
|
+
isOwn = !!desc;
|
|
59560
|
+
if (isOwn && "get" in desc && !("originalValue" in desc.get)) value = desc.get;
|
|
59561
59561
|
else value = value[part];
|
|
59562
59562
|
} else {
|
|
59563
|
-
isOwn = hasOwn
|
|
59563
|
+
isOwn = hasOwn(value, part);
|
|
59564
59564
|
value = value[part];
|
|
59565
59565
|
}
|
|
59566
59566
|
if (isOwn && !skipFurtherCaching) INTRINSICS[intrinsicRealName] = value;
|
|
@@ -59585,15 +59585,15 @@ var require_shams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59585
59585
|
var require_es_set_tostringtag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
59586
59586
|
var $defineProperty = require_get_intrinsic()("%Object.defineProperty%", true);
|
|
59587
59587
|
var hasToStringTag = require_shams()();
|
|
59588
|
-
var hasOwn
|
|
59588
|
+
var hasOwn = require_hasown();
|
|
59589
59589
|
var $TypeError = require_type();
|
|
59590
59590
|
var toStringTag = hasToStringTag ? Symbol.toStringTag : null;
|
|
59591
59591
|
/** @type {import('.')} */
|
|
59592
|
-
module.exports = function setToStringTag
|
|
59592
|
+
module.exports = function setToStringTag(object, value) {
|
|
59593
59593
|
var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
|
|
59594
59594
|
var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
|
|
59595
59595
|
if (typeof overrideIfSet !== "undefined" && typeof overrideIfSet !== "boolean" || typeof nonConfigurable !== "undefined" && typeof nonConfigurable !== "boolean") throw new $TypeError("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");
|
|
59596
|
-
if (toStringTag && (overrideIfSet || !hasOwn
|
|
59596
|
+
if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) if ($defineProperty) $defineProperty(object, toStringTag, {
|
|
59597
59597
|
configurable: !nonConfigurable,
|
|
59598
59598
|
enumerable: false,
|
|
59599
59599
|
value,
|
|
@@ -59639,8 +59639,8 @@ var require_form_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59639
59639
|
* @constructor
|
|
59640
59640
|
* @param {object} options - Properties to be added/overriden for FormData and CombinedStream
|
|
59641
59641
|
*/
|
|
59642
|
-
function FormData
|
|
59643
|
-
if (!(this instanceof FormData
|
|
59642
|
+
function FormData(options) {
|
|
59643
|
+
if (!(this instanceof FormData)) return new FormData(options);
|
|
59644
59644
|
this._overheadLength = 0;
|
|
59645
59645
|
this._valueLength = 0;
|
|
59646
59646
|
this._valuesToMeasure = [];
|
|
@@ -59648,10 +59648,10 @@ var require_form_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59648
59648
|
options = options || {};
|
|
59649
59649
|
for (var option in options) this[option] = options[option];
|
|
59650
59650
|
}
|
|
59651
|
-
util.inherits(FormData
|
|
59652
|
-
FormData
|
|
59653
|
-
FormData
|
|
59654
|
-
FormData
|
|
59651
|
+
util.inherits(FormData, CombinedStream);
|
|
59652
|
+
FormData.LINE_BREAK = "\r\n";
|
|
59653
|
+
FormData.DEFAULT_CONTENT_TYPE = "application/octet-stream";
|
|
59654
|
+
FormData.prototype.append = function(field, value, options) {
|
|
59655
59655
|
options = options || {};
|
|
59656
59656
|
if (typeof options === "string") options = { filename: options };
|
|
59657
59657
|
var append = CombinedStream.prototype.append.bind(this);
|
|
@@ -59667,17 +59667,17 @@ var require_form_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59667
59667
|
append(footer);
|
|
59668
59668
|
this._trackLength(header, value, options);
|
|
59669
59669
|
};
|
|
59670
|
-
FormData
|
|
59670
|
+
FormData.prototype._trackLength = function(header, value, options) {
|
|
59671
59671
|
var valueLength = 0;
|
|
59672
59672
|
if (options.knownLength != null) valueLength += Number(options.knownLength);
|
|
59673
59673
|
else if (Buffer.isBuffer(value)) valueLength = value.length;
|
|
59674
59674
|
else if (typeof value === "string") valueLength = Buffer.byteLength(value);
|
|
59675
59675
|
this._valueLength += valueLength;
|
|
59676
|
-
this._overheadLength += Buffer.byteLength(header) + FormData
|
|
59676
|
+
this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length;
|
|
59677
59677
|
if (!value || !value.path && !(value.readable && hasOwn(value, "httpVersion")) && !(value instanceof Stream)) return;
|
|
59678
59678
|
if (!options.knownLength) this._valuesToMeasure.push(value);
|
|
59679
59679
|
};
|
|
59680
|
-
FormData
|
|
59680
|
+
FormData.prototype._lengthRetriever = function(value, callback) {
|
|
59681
59681
|
if (hasOwn(value, "fd")) if (value.end != void 0 && value.end != Infinity && value.start != void 0) callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
59682
59682
|
else fs.stat(value.path, function(err, stat) {
|
|
59683
59683
|
if (err) {
|
|
@@ -59695,14 +59695,14 @@ var require_form_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59695
59695
|
value.resume();
|
|
59696
59696
|
} else callback("Unknown stream");
|
|
59697
59697
|
};
|
|
59698
|
-
FormData
|
|
59698
|
+
FormData.prototype._multiPartHeader = function(field, value, options) {
|
|
59699
59699
|
if (typeof options.header === "string") return options.header;
|
|
59700
59700
|
var contentDisposition = this._getContentDisposition(value, options);
|
|
59701
|
-
var contentType
|
|
59701
|
+
var contentType = this._getContentType(value, options);
|
|
59702
59702
|
var contents = "";
|
|
59703
59703
|
var headers = {
|
|
59704
59704
|
"Content-Disposition": ["form-data", "name=\"" + field + "\""].concat(contentDisposition || []),
|
|
59705
|
-
"Content-Type": [].concat(contentType
|
|
59705
|
+
"Content-Type": [].concat(contentType || [])
|
|
59706
59706
|
};
|
|
59707
59707
|
if (typeof options.header === "object") populate(headers, options.header);
|
|
59708
59708
|
var header;
|
|
@@ -59710,75 +59710,75 @@ var require_form_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59710
59710
|
header = headers[prop];
|
|
59711
59711
|
if (header == null) continue;
|
|
59712
59712
|
if (!Array.isArray(header)) header = [header];
|
|
59713
|
-
if (header.length) contents += prop + ": " + header.join("; ") + FormData
|
|
59713
|
+
if (header.length) contents += prop + ": " + header.join("; ") + FormData.LINE_BREAK;
|
|
59714
59714
|
}
|
|
59715
|
-
return "--" + this.getBoundary() + FormData
|
|
59715
|
+
return "--" + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;
|
|
59716
59716
|
};
|
|
59717
|
-
FormData
|
|
59717
|
+
FormData.prototype._getContentDisposition = function(value, options) {
|
|
59718
59718
|
var filename;
|
|
59719
59719
|
if (typeof options.filepath === "string") filename = path.normalize(options.filepath).replace(/\\/g, "/");
|
|
59720
59720
|
else if (options.filename || value && (value.name || value.path)) filename = path.basename(options.filename || value && (value.name || value.path));
|
|
59721
59721
|
else if (value && value.readable && hasOwn(value, "httpVersion")) filename = path.basename(value.client._httpMessage.path || "");
|
|
59722
59722
|
if (filename) return "filename=\"" + filename + "\"";
|
|
59723
59723
|
};
|
|
59724
|
-
FormData
|
|
59725
|
-
var contentType
|
|
59726
|
-
if (!contentType
|
|
59727
|
-
if (!contentType
|
|
59728
|
-
if (!contentType
|
|
59729
|
-
if (!contentType
|
|
59730
|
-
if (!contentType
|
|
59731
|
-
return contentType
|
|
59724
|
+
FormData.prototype._getContentType = function(value, options) {
|
|
59725
|
+
var contentType = options.contentType;
|
|
59726
|
+
if (!contentType && value && value.name) contentType = mime.lookup(value.name);
|
|
59727
|
+
if (!contentType && value && value.path) contentType = mime.lookup(value.path);
|
|
59728
|
+
if (!contentType && value && value.readable && hasOwn(value, "httpVersion")) contentType = value.headers["content-type"];
|
|
59729
|
+
if (!contentType && (options.filepath || options.filename)) contentType = mime.lookup(options.filepath || options.filename);
|
|
59730
|
+
if (!contentType && value && typeof value === "object") contentType = FormData.DEFAULT_CONTENT_TYPE;
|
|
59731
|
+
return contentType;
|
|
59732
59732
|
};
|
|
59733
|
-
FormData
|
|
59733
|
+
FormData.prototype._multiPartFooter = function() {
|
|
59734
59734
|
return function(next) {
|
|
59735
|
-
var footer = FormData
|
|
59735
|
+
var footer = FormData.LINE_BREAK;
|
|
59736
59736
|
if (this._streams.length === 0) footer += this._lastBoundary();
|
|
59737
59737
|
next(footer);
|
|
59738
59738
|
}.bind(this);
|
|
59739
59739
|
};
|
|
59740
|
-
FormData
|
|
59741
|
-
return "--" + this.getBoundary() + "--" + FormData
|
|
59740
|
+
FormData.prototype._lastBoundary = function() {
|
|
59741
|
+
return "--" + this.getBoundary() + "--" + FormData.LINE_BREAK;
|
|
59742
59742
|
};
|
|
59743
|
-
FormData
|
|
59743
|
+
FormData.prototype.getHeaders = function(userHeaders) {
|
|
59744
59744
|
var header;
|
|
59745
59745
|
var formHeaders = { "content-type": "multipart/form-data; boundary=" + this.getBoundary() };
|
|
59746
59746
|
for (header in userHeaders) if (hasOwn(userHeaders, header)) formHeaders[header.toLowerCase()] = userHeaders[header];
|
|
59747
59747
|
return formHeaders;
|
|
59748
59748
|
};
|
|
59749
|
-
FormData
|
|
59749
|
+
FormData.prototype.setBoundary = function(boundary) {
|
|
59750
59750
|
if (typeof boundary !== "string") throw new TypeError("FormData boundary must be a string");
|
|
59751
59751
|
this._boundary = boundary;
|
|
59752
59752
|
};
|
|
59753
|
-
FormData
|
|
59753
|
+
FormData.prototype.getBoundary = function() {
|
|
59754
59754
|
if (!this._boundary) this._generateBoundary();
|
|
59755
59755
|
return this._boundary;
|
|
59756
59756
|
};
|
|
59757
|
-
FormData
|
|
59757
|
+
FormData.prototype.getBuffer = function() {
|
|
59758
59758
|
var dataBuffer = new Buffer.alloc(0);
|
|
59759
59759
|
var boundary = this.getBoundary();
|
|
59760
|
-
for (var i
|
|
59761
|
-
if (Buffer.isBuffer(this._streams[i
|
|
59762
|
-
else dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i
|
|
59763
|
-
if (typeof this._streams[i
|
|
59760
|
+
for (var i = 0, len = this._streams.length; i < len; i++) if (typeof this._streams[i] !== "function") {
|
|
59761
|
+
if (Buffer.isBuffer(this._streams[i])) dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]);
|
|
59762
|
+
else dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]);
|
|
59763
|
+
if (typeof this._streams[i] !== "string" || this._streams[i].substring(2, boundary.length + 2) !== boundary) dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]);
|
|
59764
59764
|
}
|
|
59765
59765
|
return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
|
|
59766
59766
|
};
|
|
59767
|
-
FormData
|
|
59767
|
+
FormData.prototype._generateBoundary = function() {
|
|
59768
59768
|
this._boundary = "--------------------------" + crypto.randomBytes(12).toString("hex");
|
|
59769
59769
|
};
|
|
59770
|
-
FormData
|
|
59770
|
+
FormData.prototype.getLengthSync = function() {
|
|
59771
59771
|
var knownLength = this._overheadLength + this._valueLength;
|
|
59772
59772
|
if (this._streams.length) knownLength += this._lastBoundary().length;
|
|
59773
59773
|
if (!this.hasKnownLength()) this._error(/* @__PURE__ */ new Error("Cannot calculate proper length in synchronous way."));
|
|
59774
59774
|
return knownLength;
|
|
59775
59775
|
};
|
|
59776
|
-
FormData
|
|
59776
|
+
FormData.prototype.hasKnownLength = function() {
|
|
59777
59777
|
var hasKnownLength = true;
|
|
59778
59778
|
if (this._valuesToMeasure.length) hasKnownLength = false;
|
|
59779
59779
|
return hasKnownLength;
|
|
59780
59780
|
};
|
|
59781
|
-
FormData
|
|
59781
|
+
FormData.prototype.getLength = function(cb) {
|
|
59782
59782
|
var knownLength = this._overheadLength + this._valueLength;
|
|
59783
59783
|
if (this._streams.length) knownLength += this._lastBoundary().length;
|
|
59784
59784
|
if (!this._valuesToMeasure.length) {
|
|
@@ -59796,7 +59796,7 @@ var require_form_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59796
59796
|
cb(null, knownLength);
|
|
59797
59797
|
});
|
|
59798
59798
|
};
|
|
59799
|
-
FormData
|
|
59799
|
+
FormData.prototype.submit = function(params, cb) {
|
|
59800
59800
|
var request;
|
|
59801
59801
|
var options;
|
|
59802
59802
|
var defaults = { method: "post" };
|
|
@@ -59824,10 +59824,10 @@ var require_form_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59824
59824
|
this.pipe(request);
|
|
59825
59825
|
if (cb) {
|
|
59826
59826
|
var onResponse;
|
|
59827
|
-
var callback = function(error
|
|
59827
|
+
var callback = function(error, responce) {
|
|
59828
59828
|
request.removeListener("error", callback);
|
|
59829
59829
|
request.removeListener("response", onResponse);
|
|
59830
|
-
return cb.call(this, error
|
|
59830
|
+
return cb.call(this, error, responce);
|
|
59831
59831
|
};
|
|
59832
59832
|
onResponse = callback.bind(this, null);
|
|
59833
59833
|
request.on("error", callback);
|
|
@@ -59836,27 +59836,26 @@ var require_form_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59836
59836
|
}.bind(this));
|
|
59837
59837
|
return request;
|
|
59838
59838
|
};
|
|
59839
|
-
FormData
|
|
59839
|
+
FormData.prototype._error = function(err) {
|
|
59840
59840
|
if (!this.error) {
|
|
59841
59841
|
this.error = err;
|
|
59842
59842
|
this.pause();
|
|
59843
59843
|
this.emit("error", err);
|
|
59844
59844
|
}
|
|
59845
59845
|
};
|
|
59846
|
-
FormData
|
|
59846
|
+
FormData.prototype.toString = function() {
|
|
59847
59847
|
return "[object FormData]";
|
|
59848
59848
|
};
|
|
59849
|
-
setToStringTag(FormData
|
|
59850
|
-
module.exports = FormData
|
|
59849
|
+
setToStringTag(FormData, "FormData");
|
|
59850
|
+
module.exports = FormData;
|
|
59851
59851
|
}));
|
|
59852
59852
|
|
|
59853
59853
|
//#endregion
|
|
59854
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
59855
|
-
var import_form_data
|
|
59854
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/event/EventBinaryService.js
|
|
59855
|
+
var import_form_data = /* @__PURE__ */ __toESM(require_form_data());
|
|
59856
59856
|
|
|
59857
59857
|
//#endregion
|
|
59858
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
59859
|
-
var import_form_data$3 = /* @__PURE__ */ __toESM(require_form_data());
|
|
59858
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory/InventoryBinaryService.js
|
|
59860
59859
|
var InventoryBinaryService = class extends Service {
|
|
59861
59860
|
constructor() {
|
|
59862
59861
|
super(...arguments);
|
|
@@ -59875,7 +59874,7 @@ var InventoryBinaryService = class extends Service {
|
|
|
59875
59874
|
return __awaiter(this, arguments, void 0, function* (file, managedObject = {}) {
|
|
59876
59875
|
const method = "POST";
|
|
59877
59876
|
const url = this.listUrl;
|
|
59878
|
-
const body = new import_form_data
|
|
59877
|
+
const body = new import_form_data.default();
|
|
59879
59878
|
let fileName;
|
|
59880
59879
|
let fileType;
|
|
59881
59880
|
if (managedObject.fileName) {
|
|
@@ -59933,7 +59932,7 @@ var InventoryBinaryService = class extends Service {
|
|
|
59933
59932
|
createWithProgress(file, onProgress, managedObject = {}) {
|
|
59934
59933
|
const url = `/${this.baseUrl}/${this.listUrl}`;
|
|
59935
59934
|
const method = "POST";
|
|
59936
|
-
const body = new import_form_data
|
|
59935
|
+
const body = new import_form_data.default();
|
|
59937
59936
|
let fileName;
|
|
59938
59937
|
let fileType;
|
|
59939
59938
|
if (managedObject.fileName) {
|
|
@@ -59959,7 +59958,7 @@ var InventoryBinaryService = class extends Service {
|
|
|
59959
59958
|
Object.assign(headers, { accept: "application/json" }, bodyHeaders);
|
|
59960
59959
|
const xhr = new XMLHttpRequest();
|
|
59961
59960
|
xhr.open(method, url, true);
|
|
59962
|
-
for (const key
|
|
59961
|
+
for (const key in headers) if (headers.hasOwnProperty(key)) xhr.setRequestHeader(key, headers[key]);
|
|
59963
59962
|
xhr.upload.addEventListener("progress", onProgress);
|
|
59964
59963
|
let xhrBody;
|
|
59965
59964
|
if (typeof body.getBuffer === "function") xhrBody = body.getBuffer();
|
|
@@ -59997,7 +59996,7 @@ var InventoryBinaryService = class extends Service {
|
|
|
59997
59996
|
};
|
|
59998
59997
|
|
|
59999
59998
|
//#endregion
|
|
60000
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
59999
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory/InventoryService.js
|
|
60001
60000
|
/**
|
|
60002
60001
|
* Possible types of a child.
|
|
60003
60002
|
*/
|
|
@@ -60832,7 +60831,7 @@ var InventoryService = class extends Service {
|
|
|
60832
60831
|
};
|
|
60833
60832
|
|
|
60834
60833
|
//#endregion
|
|
60835
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
60834
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/measurement/MeasurementService.js
|
|
60836
60835
|
/**
|
|
60837
60836
|
* This class allows for managing measurements.
|
|
60838
60837
|
*/
|
|
@@ -61032,7 +61031,7 @@ var MeasurementService = class extends Service {
|
|
|
61032
61031
|
};
|
|
61033
61032
|
|
|
61034
61033
|
//#endregion
|
|
61035
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61034
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/measurement/ISeriesFilter.js
|
|
61036
61035
|
var aggregationType;
|
|
61037
61036
|
(function(aggregationType$1) {
|
|
61038
61037
|
aggregationType$1["MINUTELY"] = "MINUTELY";
|
|
@@ -61041,7 +61040,7 @@ var aggregationType;
|
|
|
61041
61040
|
})(aggregationType || (aggregationType = {}));
|
|
61042
61041
|
|
|
61043
61042
|
//#endregion
|
|
61044
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61043
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/alarm/AlarmService.js
|
|
61045
61044
|
/**
|
|
61046
61045
|
* This class allows for managing alarms.
|
|
61047
61046
|
*/
|
|
@@ -61161,7 +61160,7 @@ var AlarmService = class extends Service {
|
|
|
61161
61160
|
*/
|
|
61162
61161
|
updateBulk(entity, filters) {
|
|
61163
61162
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61164
|
-
const params = new URLSearchParams(Object.entries(filters).map(([key
|
|
61163
|
+
const params = new URLSearchParams(Object.entries(filters).map(([key, val]) => [key, String(val)]));
|
|
61165
61164
|
const url = this.getDetailUrl(entity).replace(/\/$/, "") + `?${params.toString()}`;
|
|
61166
61165
|
const method = "PUT";
|
|
61167
61166
|
const body = JSON.stringify(this.onBeforeUpdate(entity));
|
|
@@ -61234,7 +61233,7 @@ var AlarmService = class extends Service {
|
|
|
61234
61233
|
};
|
|
61235
61234
|
|
|
61236
61235
|
//#endregion
|
|
61237
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61236
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/alarm/AlarmStatus.js
|
|
61238
61237
|
const ALARM_STATUS_LABELS = {
|
|
61239
61238
|
ACKNOWLEDGED: gettext$1("Acknowledged`alarm`"),
|
|
61240
61239
|
CLEARED: gettext$1("Cleared`alarm`"),
|
|
@@ -61242,7 +61241,7 @@ const ALARM_STATUS_LABELS = {
|
|
|
61242
61241
|
};
|
|
61243
61242
|
|
|
61244
61243
|
//#endregion
|
|
61245
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61244
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationService.js
|
|
61246
61245
|
/**
|
|
61247
61246
|
* This class allows for managing operations on a device.
|
|
61248
61247
|
*/
|
|
@@ -61370,7 +61369,7 @@ var OperationService = class extends Service {
|
|
|
61370
61369
|
};
|
|
61371
61370
|
|
|
61372
61371
|
//#endregion
|
|
61373
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61372
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationBulkService.js
|
|
61374
61373
|
/**
|
|
61375
61374
|
* This class allows for managing bulk operations.
|
|
61376
61375
|
*/
|
|
@@ -61522,7 +61521,7 @@ var OperationBulkService = class extends Service {
|
|
|
61522
61521
|
};
|
|
61523
61522
|
|
|
61524
61523
|
//#endregion
|
|
61525
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61524
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/gettext.js
|
|
61526
61525
|
/**
|
|
61527
61526
|
* Identity function used for marking strings for translation
|
|
61528
61527
|
* @deprecated Use the typed version of gettext instead from typed-gettext file.
|
|
@@ -61530,7 +61529,7 @@ var OperationBulkService = class extends Service {
|
|
|
61530
61529
|
const gettext = (t) => t;
|
|
61531
61530
|
|
|
61532
61531
|
//#endregion
|
|
61533
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61532
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationBulkStatus.js
|
|
61534
61533
|
/**
|
|
61535
61534
|
* A bulk operation can have one of the following states.
|
|
61536
61535
|
*/
|
|
@@ -61543,7 +61542,7 @@ var OperationBulkStatus;
|
|
|
61543
61542
|
})(OperationBulkStatus || (OperationBulkStatus = {}));
|
|
61544
61543
|
|
|
61545
61544
|
//#endregion
|
|
61546
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61545
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationBulkGeneralStatus.js
|
|
61547
61546
|
/**
|
|
61548
61547
|
* A bulk operation can have one of the following general statuses.
|
|
61549
61548
|
*/
|
|
@@ -61560,7 +61559,7 @@ var OperationBulkGeneralStatus;
|
|
|
61560
61559
|
})(OperationBulkGeneralStatus || (OperationBulkGeneralStatus = {}));
|
|
61561
61560
|
|
|
61562
61561
|
//#endregion
|
|
61563
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61562
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationStatus.js
|
|
61564
61563
|
/**
|
|
61565
61564
|
* An Operation can have one of the following states.
|
|
61566
61565
|
*/
|
|
@@ -61573,7 +61572,7 @@ var OperationStatus;
|
|
|
61573
61572
|
})(OperationStatus || (OperationStatus = {}));
|
|
61574
61573
|
|
|
61575
61574
|
//#endregion
|
|
61576
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61575
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant/TenantService.js
|
|
61577
61576
|
/**
|
|
61578
61577
|
* @description
|
|
61579
61578
|
* This service allows for managing tenants.
|
|
@@ -61941,7 +61940,7 @@ var TenantService = class extends Service {
|
|
|
61941
61940
|
};
|
|
61942
61941
|
|
|
61943
61942
|
//#endregion
|
|
61944
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61943
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant/TenantStatus.js
|
|
61945
61944
|
var TenantStatus;
|
|
61946
61945
|
(function(TenantStatus$1) {
|
|
61947
61946
|
TenantStatus$1[TenantStatus$1["ACTIVE"] = gettext("ACTIVE")] = "ACTIVE";
|
|
@@ -61949,7 +61948,7 @@ var TenantStatus;
|
|
|
61949
61948
|
})(TenantStatus || (TenantStatus = {}));
|
|
61950
61949
|
|
|
61951
61950
|
//#endregion
|
|
61952
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61951
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant/TfaStrategy.js
|
|
61953
61952
|
/**
|
|
61954
61953
|
* Represents a strategy used for two-factor authentication.
|
|
61955
61954
|
*/
|
|
@@ -61962,7 +61961,7 @@ var TfaStrategy;
|
|
|
61962
61961
|
})(TfaStrategy || (TfaStrategy = {}));
|
|
61963
61962
|
|
|
61964
61963
|
//#endregion
|
|
61965
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
61964
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user/UserInventoryRoleService.js
|
|
61966
61965
|
/**
|
|
61967
61966
|
* @description
|
|
61968
61967
|
* This service allows for managing current user's inventory roles.
|
|
@@ -62090,7 +62089,7 @@ var UserInventoryRoleService = class extends Service {
|
|
|
62090
62089
|
};
|
|
62091
62090
|
|
|
62092
62091
|
//#endregion
|
|
62093
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
62092
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user/UserService.js
|
|
62094
62093
|
/**
|
|
62095
62094
|
* @description
|
|
62096
62095
|
* This service allows for managing users.
|
|
@@ -62814,7 +62813,7 @@ var UserService = class extends Service {
|
|
|
62814
62813
|
};
|
|
62815
62814
|
|
|
62816
62815
|
//#endregion
|
|
62817
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
62816
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user/PasswordStrength.js
|
|
62818
62817
|
var PasswordStrength;
|
|
62819
62818
|
(function(PasswordStrength$1) {
|
|
62820
62819
|
PasswordStrength$1["GREEN"] = "GREEN";
|
|
@@ -62823,8 +62822,7 @@ var PasswordStrength;
|
|
|
62823
62822
|
})(PasswordStrength || (PasswordStrength = {}));
|
|
62824
62823
|
|
|
62825
62824
|
//#endregion
|
|
62826
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
62827
|
-
var import_form_data$2 = /* @__PURE__ */ __toESM(require_form_data());
|
|
62825
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationBinaryService.js
|
|
62828
62826
|
var ApplicationBinaryService = class extends Service {
|
|
62829
62827
|
constructor(client, applicationOrId) {
|
|
62830
62828
|
super(client);
|
|
@@ -62870,7 +62868,7 @@ var ApplicationBinaryService = class extends Service {
|
|
|
62870
62868
|
Object.assign(headers, bodyHeaders);
|
|
62871
62869
|
const xhr = new XMLHttpRequest();
|
|
62872
62870
|
xhr.open(method, url, true);
|
|
62873
|
-
for (const key
|
|
62871
|
+
for (const key in headers) if (headers.hasOwnProperty(key)) xhr.setRequestHeader(key, headers[key]);
|
|
62874
62872
|
xhr.upload.addEventListener("progress", onProgress);
|
|
62875
62873
|
let xhrBody;
|
|
62876
62874
|
if (typeof body.getBuffer === "function") xhrBody = body.getBuffer();
|
|
@@ -62912,7 +62910,7 @@ var ApplicationBinaryService = class extends Service {
|
|
|
62912
62910
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62913
62911
|
const url = `${this.listUrl}/plugins/${encodeURIComponent(pluginName)}`;
|
|
62914
62912
|
const method = "POST";
|
|
62915
|
-
const body = new import_form_data
|
|
62913
|
+
const body = new import_form_data.default();
|
|
62916
62914
|
const bufferOrStream = pluginFile instanceof ArrayBuffer ? Buffer.from(pluginFile) : pluginFile;
|
|
62917
62915
|
body.append("file", bufferOrStream);
|
|
62918
62916
|
const res = yield this.fetch(url, {
|
|
@@ -62945,7 +62943,7 @@ var ApplicationBinaryService = class extends Service {
|
|
|
62945
62943
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62946
62944
|
const url = `${this.listUrl}/files`;
|
|
62947
62945
|
const method = "POST";
|
|
62948
|
-
const body = new import_form_data
|
|
62946
|
+
const body = new import_form_data.default();
|
|
62949
62947
|
files.forEach((file) => {
|
|
62950
62948
|
const bufferOrStream = file.contents instanceof ArrayBuffer ? Buffer.from(file.contents) : file.contents;
|
|
62951
62949
|
body.append(file.path, bufferOrStream);
|
|
@@ -62968,21 +62966,21 @@ var ApplicationBinaryService = class extends Service {
|
|
|
62968
62966
|
});
|
|
62969
62967
|
}
|
|
62970
62968
|
createBinaryRequestBody(binary, fileName, uploadParamsOverride) {
|
|
62971
|
-
const body = new import_form_data
|
|
62969
|
+
const body = new import_form_data.default();
|
|
62972
62970
|
const bufferOrStream = binary instanceof ArrayBuffer ? Buffer.from(binary) : binary;
|
|
62973
62971
|
let uploadFileName = fileName;
|
|
62974
62972
|
if (typeof File !== "undefined" && binary instanceof File) uploadFileName = binary.name;
|
|
62975
62973
|
body.append((uploadParamsOverride === null || uploadParamsOverride === void 0 ? void 0 : uploadParamsOverride.bodyFileProperty) || "file", bufferOrStream, uploadFileName);
|
|
62976
62974
|
body.append("fileName", uploadFileName);
|
|
62977
62975
|
if (uploadParamsOverride === null || uploadParamsOverride === void 0 ? void 0 : uploadParamsOverride.requestBody) {
|
|
62978
|
-
for (const key
|
|
62976
|
+
for (const key in uploadParamsOverride.requestBody) if (uploadParamsOverride.requestBody.hasOwnProperty(key)) body.append(key, JSON.stringify(uploadParamsOverride.requestBody[key]));
|
|
62979
62977
|
}
|
|
62980
62978
|
return body;
|
|
62981
62979
|
}
|
|
62982
62980
|
};
|
|
62983
62981
|
|
|
62984
62982
|
//#endregion
|
|
62985
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
62983
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationType.js
|
|
62986
62984
|
var ApplicationType;
|
|
62987
62985
|
(function(ApplicationType$1) {
|
|
62988
62986
|
ApplicationType$1["EXTERNAL"] = "EXTERNAL";
|
|
@@ -62992,7 +62990,7 @@ var ApplicationType;
|
|
|
62992
62990
|
})(ApplicationType || (ApplicationType = {}));
|
|
62993
62991
|
|
|
62994
62992
|
//#endregion
|
|
62995
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
62993
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationService.js
|
|
62996
62994
|
var ApplicationService = class extends Service {
|
|
62997
62995
|
constructor() {
|
|
62998
62996
|
super(...arguments);
|
|
@@ -63573,16 +63571,16 @@ var ApplicationService = class extends Service {
|
|
|
63573
63571
|
});
|
|
63574
63572
|
}
|
|
63575
63573
|
isMatch(object, source) {
|
|
63576
|
-
return Object.keys(source).every((key
|
|
63577
|
-
if (Array.isArray(object[key
|
|
63578
|
-
else if (typeof object[key
|
|
63579
|
-
else return object[key
|
|
63574
|
+
return Object.keys(source).every((key) => {
|
|
63575
|
+
if (Array.isArray(object[key]) && Array.isArray(source[key])) return source[key].every((el) => object[key].includes(el));
|
|
63576
|
+
else if (typeof object[key] === "object" && object[key] !== null && typeof source[key] === "object" && source[key] !== null) return this.isMatch(object[key], source[key]);
|
|
63577
|
+
else return object[key] === source[key];
|
|
63580
63578
|
});
|
|
63581
63579
|
}
|
|
63582
63580
|
};
|
|
63583
63581
|
|
|
63584
63582
|
//#endregion
|
|
63585
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
63583
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/IApplicationInstanceDetails.js
|
|
63586
63584
|
var InstanceStatus;
|
|
63587
63585
|
(function(InstanceStatus$1) {
|
|
63588
63586
|
InstanceStatus$1["Up"] = "Up";
|
|
@@ -63592,7 +63590,7 @@ var InstanceStatus;
|
|
|
63592
63590
|
})(InstanceStatus || (InstanceStatus = {}));
|
|
63593
63591
|
|
|
63594
63592
|
//#endregion
|
|
63595
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
63593
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/BillingMode.js
|
|
63596
63594
|
var BillingMode;
|
|
63597
63595
|
(function(BillingMode$1) {
|
|
63598
63596
|
BillingMode$1["SUBSCRIPTION"] = "SUBSCRIPTION";
|
|
@@ -63600,7 +63598,7 @@ var BillingMode;
|
|
|
63600
63598
|
})(BillingMode || (BillingMode = {}));
|
|
63601
63599
|
|
|
63602
63600
|
//#endregion
|
|
63603
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
63601
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/Isolation.js
|
|
63604
63602
|
var Isolation;
|
|
63605
63603
|
(function(Isolation$1) {
|
|
63606
63604
|
Isolation$1["PER_TENANT"] = "PER_TENANT";
|
|
@@ -63608,7 +63606,7 @@ var Isolation;
|
|
|
63608
63606
|
})(Isolation || (Isolation = {}));
|
|
63609
63607
|
|
|
63610
63608
|
//#endregion
|
|
63611
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
63609
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationAvailability.js
|
|
63612
63610
|
var ApplicationAvailability;
|
|
63613
63611
|
(function(ApplicationAvailability$1) {
|
|
63614
63612
|
ApplicationAvailability$1[ApplicationAvailability$1["MARKET"] = gettext("MARKET")] = "MARKET";
|
|
@@ -63617,7 +63615,7 @@ var ApplicationAvailability;
|
|
|
63617
63615
|
})(ApplicationAvailability || (ApplicationAvailability = {}));
|
|
63618
63616
|
|
|
63619
63617
|
//#endregion
|
|
63620
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
63618
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/system-options/SystemOptionsService.js
|
|
63621
63619
|
var SystemOptionsService = class extends Service {
|
|
63622
63620
|
constructor() {
|
|
63623
63621
|
super(...arguments);
|
|
@@ -63694,7 +63692,7 @@ var SystemOptionsService = class extends Service {
|
|
|
63694
63692
|
};
|
|
63695
63693
|
|
|
63696
63694
|
//#endregion
|
|
63697
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
63695
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-options/TenantOptionsService.js
|
|
63698
63696
|
/**
|
|
63699
63697
|
* @description
|
|
63700
63698
|
* This service allows for managing tenant's options.
|
|
@@ -63872,7 +63870,7 @@ var TenantOptionsService = class extends Service {
|
|
|
63872
63870
|
};
|
|
63873
63871
|
|
|
63874
63872
|
//#endregion
|
|
63875
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
63873
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-security-options/TenantSecurityOptionsService.js
|
|
63876
63874
|
/**
|
|
63877
63875
|
* @description
|
|
63878
63876
|
* This service allows to get tenant security option.
|
|
@@ -63919,7 +63917,7 @@ var TenantSecurityOptionsService = class extends Service {
|
|
|
63919
63917
|
};
|
|
63920
63918
|
|
|
63921
63919
|
//#endregion
|
|
63922
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
63920
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-login-options/TenantLoginOptionsService.js
|
|
63923
63921
|
/**
|
|
63924
63922
|
* @description
|
|
63925
63923
|
* This service allows to get tenant login options.
|
|
@@ -64131,7 +64129,7 @@ var TenantLoginOptionsService = class extends Service {
|
|
|
64131
64129
|
};
|
|
64132
64130
|
|
|
64133
64131
|
//#endregion
|
|
64134
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
64132
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-login-options/ITenantLoginOptions.js
|
|
64135
64133
|
var TenantLoginOptionType;
|
|
64136
64134
|
(function(TenantLoginOptionType$1) {
|
|
64137
64135
|
/**
|
|
@@ -64159,7 +64157,7 @@ var UserManagementSource;
|
|
|
64159
64157
|
})(UserManagementSource || (UserManagementSource = {}));
|
|
64160
64158
|
|
|
64161
64159
|
//#endregion
|
|
64162
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
64160
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/audit/AuditService.js
|
|
64163
64161
|
var AuditService = class extends Service {
|
|
64164
64162
|
constructor() {
|
|
64165
64163
|
super(...arguments);
|
|
@@ -64249,7 +64247,7 @@ var AuditService = class extends Service {
|
|
|
64249
64247
|
};
|
|
64250
64248
|
|
|
64251
64249
|
//#endregion
|
|
64252
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
64250
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/audit/AuditRecordType.js
|
|
64253
64251
|
/**
|
|
64254
64252
|
* A specific audit record can have one of the following types
|
|
64255
64253
|
*/
|
|
@@ -64281,7 +64279,7 @@ var AuditRecordType;
|
|
|
64281
64279
|
})(AuditRecordType || (AuditRecordType = {}));
|
|
64282
64280
|
|
|
64283
64281
|
//#endregion
|
|
64284
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
64282
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/audit/ChangeType.js
|
|
64285
64283
|
/**
|
|
64286
64284
|
* An audit record can have one of the following change type
|
|
64287
64285
|
*/
|
|
@@ -64293,7 +64291,7 @@ var ChangeType;
|
|
|
64293
64291
|
})(ChangeType || (ChangeType = {}));
|
|
64294
64292
|
|
|
64295
64293
|
//#endregion
|
|
64296
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
64294
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory-role/InventoryRoleService.js
|
|
64297
64295
|
var InventoryRoleService = class extends Service {
|
|
64298
64296
|
constructor() {
|
|
64299
64297
|
super(...arguments);
|
|
@@ -64427,7 +64425,7 @@ var InventoryRoleService = class extends Service {
|
|
|
64427
64425
|
};
|
|
64428
64426
|
|
|
64429
64427
|
//#endregion
|
|
64430
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
64428
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationStatus.js
|
|
64431
64429
|
/**
|
|
64432
64430
|
* Device registration can have one of the following states.
|
|
64433
64431
|
*/
|
|
@@ -64440,8 +64438,7 @@ var DeviceRegistrationStatus;
|
|
|
64440
64438
|
})(DeviceRegistrationStatus || (DeviceRegistrationStatus = {}));
|
|
64441
64439
|
|
|
64442
64440
|
//#endregion
|
|
64443
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
64444
|
-
var import_lib = require_lib();
|
|
64441
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationService.js
|
|
64445
64442
|
/**
|
|
64446
64443
|
* This class allows registration of a new device.
|
|
64447
64444
|
*/
|
|
@@ -64795,8 +64792,7 @@ var DeviceRegistrationService = class extends Service {
|
|
|
64795
64792
|
};
|
|
64796
64793
|
|
|
64797
64794
|
//#endregion
|
|
64798
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
64799
|
-
var import_form_data$1 = /* @__PURE__ */ __toESM(require_form_data());
|
|
64795
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationBulkService.js
|
|
64800
64796
|
/**
|
|
64801
64797
|
* This class allows for bulk registering devices.
|
|
64802
64798
|
*/
|
|
@@ -64836,7 +64832,7 @@ var DeviceRegistrationBulkService = class {
|
|
|
64836
64832
|
let csv = inputFile;
|
|
64837
64833
|
const url = "/devicecontrol/bulkNewDeviceRequests";
|
|
64838
64834
|
const method = "POST";
|
|
64839
|
-
const body = new import_form_data
|
|
64835
|
+
const body = new import_form_data.default();
|
|
64840
64836
|
let fileName = "bulk-registration.csv";
|
|
64841
64837
|
if (typeof File !== "undefined" && csv instanceof File) {
|
|
64842
64838
|
fileName = csv.name;
|
|
@@ -64857,7 +64853,7 @@ var DeviceRegistrationBulkService = class {
|
|
|
64857
64853
|
};
|
|
64858
64854
|
|
|
64859
64855
|
//#endregion
|
|
64860
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
64856
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationSecurityMode.js
|
|
64861
64857
|
/**
|
|
64862
64858
|
* Device registration can have one of the following security modes.
|
|
64863
64859
|
*/
|
|
@@ -64869,7 +64865,7 @@ var DeviceRegistrationSecurityMode;
|
|
|
64869
64865
|
})(DeviceRegistrationSecurityMode || (DeviceRegistrationSecurityMode = {}));
|
|
64870
64866
|
|
|
64871
64867
|
//#endregion
|
|
64872
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
64868
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user-role/UserRoleService.js
|
|
64873
64869
|
/**
|
|
64874
64870
|
* @description
|
|
64875
64871
|
* This service allows for fetch user roles.
|
|
@@ -64934,7 +64930,7 @@ var UserRoleService = class extends Service {
|
|
|
64934
64930
|
};
|
|
64935
64931
|
|
|
64936
64932
|
//#endregion
|
|
64937
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
64933
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user-group/UserGroupService.js
|
|
64938
64934
|
var ChildType;
|
|
64939
64935
|
(function(ChildType$2) {
|
|
64940
64936
|
ChildType$2["ROLES"] = "roles";
|
|
@@ -65235,7 +65231,7 @@ var UserGroupService = class extends Service {
|
|
|
65235
65231
|
};
|
|
65236
65232
|
|
|
65237
65233
|
//#endregion
|
|
65238
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
65234
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/identity/IdentityService.js
|
|
65239
65235
|
/**
|
|
65240
65236
|
* This class allwos for managing external identifiers.
|
|
65241
65237
|
*/
|
|
@@ -65413,11 +65409,7 @@ var IdentityService = class {
|
|
|
65413
65409
|
};
|
|
65414
65410
|
|
|
65415
65411
|
//#endregion
|
|
65416
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
65417
|
-
var import_form_data = /* @__PURE__ */ __toESM(require_form_data());
|
|
65418
|
-
|
|
65419
|
-
//#endregion
|
|
65420
|
-
//#region node_modules/.pnpm/@c8y+client@1023.14.2_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/smart-groups/SmartGroupsService.js
|
|
65412
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/smart-groups/SmartGroupsService.js
|
|
65421
65413
|
var SmartGroupsService = class extends Service {
|
|
65422
65414
|
constructor(client) {
|
|
65423
65415
|
super(client);
|
|
@@ -65571,7 +65563,7 @@ var SmartGroupsService = class extends Service {
|
|
|
65571
65563
|
};
|
|
65572
65564
|
|
|
65573
65565
|
//#endregion
|
|
65574
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
65566
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/smart-rules/SmartRulesService.js
|
|
65575
65567
|
var SmartRulesService = class SmartRulesService extends Service {
|
|
65576
65568
|
constructor(client) {
|
|
65577
65569
|
super(client);
|
|
@@ -65723,7 +65715,7 @@ var SmartRulesService = class SmartRulesService extends Service {
|
|
|
65723
65715
|
SmartRulesService.microserviceName = "smartrule";
|
|
65724
65716
|
|
|
65725
65717
|
//#endregion
|
|
65726
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
65718
|
+
//#region node_modules/.pnpm/@c8y+client@1023.17.6_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/Client.js
|
|
65727
65719
|
var Client = class Client {
|
|
65728
65720
|
/**
|
|
65729
65721
|
* Authenticates the given user. Determines the tenant by itself via a call to tenant/currentTenant.
|
|
@@ -65836,9 +65828,9 @@ var Client = class Client {
|
|
|
65836
65828
|
password
|
|
65837
65829
|
}), baseUrl);
|
|
65838
65830
|
client.core.tenant = tenantId;
|
|
65839
|
-
} catch (error
|
|
65840
|
-
if ((!expire || Date.now() < expire) && error
|
|
65841
|
-
else throw error
|
|
65831
|
+
} catch (error) {
|
|
65832
|
+
if ((!expire || Date.now() < expire) && error.res.status === 404) return Client.deviceBootstrap(Object.assign({ expire }, options));
|
|
65833
|
+
else throw error;
|
|
65842
65834
|
}
|
|
65843
65835
|
return client;
|
|
65844
65836
|
});
|
|
@@ -66464,7 +66456,7 @@ ${selected ? `## Selected: ${selected.label}
|
|
|
66464
66456
|
dateFrom: "${selected.from.toISOString()}"
|
|
66465
66457
|
dateTo: "${now.toISOString()}"
|
|
66466
66458
|
\`\`\`` : `## Available Presets
|
|
66467
|
-
${Object.entries(periods).map(([key
|
|
66459
|
+
${Object.entries(periods).map(([key, val]) => `- **${key}**: ${val.label} (from ${val.from.toISOString()})`).join("\n")}`}
|
|
66468
66460
|
|
|
66469
66461
|
## Custom Range Format
|
|
66470
66462
|
Use ISO 8601 format: \`YYYY-MM-DDTHH:mm:ss.sssZ\`
|
|
@@ -66613,8 +66605,8 @@ function createTenantContextPrompt() {
|
|
|
66613
66605
|
|
|
66614
66606
|
---
|
|
66615
66607
|
Use \`tenantId: "${tenantInfo.tenantId}"\` for any tenant-specific API calls.`);
|
|
66616
|
-
} catch (error
|
|
66617
|
-
const msg = error
|
|
66608
|
+
} catch (error) {
|
|
66609
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
66618
66610
|
return prompt.message(`Error getting tenant context: ${msg}`);
|
|
66619
66611
|
}
|
|
66620
66612
|
});
|
|
@@ -66835,25 +66827,25 @@ function createObjectResponse(obj, entityName) {
|
|
|
66835
66827
|
* @param context - Context description of where the error occurred
|
|
66836
66828
|
* @returns Formatted error message string
|
|
66837
66829
|
*/
|
|
66838
|
-
function createErrorResponse(error
|
|
66830
|
+
function createErrorResponse(error, context) {
|
|
66839
66831
|
let msg = "Unknown error";
|
|
66840
|
-
if (error
|
|
66841
|
-
msg = error
|
|
66842
|
-
const anyError = error
|
|
66832
|
+
if (error instanceof Error) {
|
|
66833
|
+
msg = error.message;
|
|
66834
|
+
const anyError = error;
|
|
66843
66835
|
if (anyError.response) {
|
|
66844
66836
|
const status = anyError.response.status || anyError.status;
|
|
66845
66837
|
const statusText = anyError.response.statusText || anyError.statusText;
|
|
66846
66838
|
msg = `${status ? `HTTP ${status}` : "Error"}${statusText ? ` ${statusText}` : ""}: ${msg}`;
|
|
66847
66839
|
}
|
|
66848
|
-
} else if (typeof error
|
|
66849
|
-
else if (error
|
|
66850
|
-
const errorObj = error
|
|
66840
|
+
} else if (typeof error === "string") msg = error;
|
|
66841
|
+
else if (error && typeof error === "object") {
|
|
66842
|
+
const errorObj = error;
|
|
66851
66843
|
if (errorObj.message) msg = errorObj.message;
|
|
66852
66844
|
else if (errorObj.error) msg = typeof errorObj.error === "string" ? errorObj.error : JSON.stringify(errorObj.error);
|
|
66853
66845
|
else try {
|
|
66854
|
-
msg = JSON.stringify(error
|
|
66846
|
+
msg = JSON.stringify(error, null, 2);
|
|
66855
66847
|
} catch {
|
|
66856
|
-
msg = String(error
|
|
66848
|
+
msg = String(error);
|
|
66857
66849
|
}
|
|
66858
66850
|
}
|
|
66859
66851
|
return `Error ${context}: ${msg}`;
|
|
@@ -66923,8 +66915,8 @@ function createGetAlarmsTool() {
|
|
|
66923
66915
|
});
|
|
66924
66916
|
const context = input.deviceId ? `device ${input.deviceId}` : "tenant";
|
|
66925
66917
|
return tool.text(createPaginatedResponse(res, `Alarms for ${context}`));
|
|
66926
|
-
} catch (error
|
|
66927
|
-
return tool.error(createErrorResponse(error
|
|
66918
|
+
} catch (error) {
|
|
66919
|
+
return tool.error(createErrorResponse(error, "getting alarms"));
|
|
66928
66920
|
}
|
|
66929
66921
|
});
|
|
66930
66922
|
}
|
|
@@ -66958,8 +66950,8 @@ function createGetAlarmCountsTool() {
|
|
|
66958
66950
|
deviceId: input.deviceId,
|
|
66959
66951
|
note: "No c8y_ActiveAlarmsStatus fragment found on this managed object"
|
|
66960
66952
|
}, "Alarm counts"));
|
|
66961
|
-
} catch (error
|
|
66962
|
-
return tool.error(createErrorResponse(error
|
|
66953
|
+
} catch (error) {
|
|
66954
|
+
return tool.error(createErrorResponse(error, "getting alarm counts"));
|
|
66963
66955
|
}
|
|
66964
66956
|
});
|
|
66965
66957
|
}
|
|
@@ -66999,8 +66991,8 @@ function createGetEventsTool() {
|
|
|
66999
66991
|
withTotalPages: true
|
|
67000
66992
|
});
|
|
67001
66993
|
return tool.text(createPaginatedResponse(res, `Events for ${input.deviceId}`));
|
|
67002
|
-
} catch (error
|
|
67003
|
-
return tool.error(createErrorResponse(error
|
|
66994
|
+
} catch (error) {
|
|
66995
|
+
return tool.error(createErrorResponse(error, `getting events for ${input.deviceId}`));
|
|
67004
66996
|
}
|
|
67005
66997
|
});
|
|
67006
66998
|
}
|
|
@@ -67024,8 +67016,8 @@ function createGetEventTypesTool() {
|
|
|
67024
67016
|
eventTypes: types,
|
|
67025
67017
|
sampleCount: res.data.length
|
|
67026
67018
|
}, `Event types for ${input.deviceId}`));
|
|
67027
|
-
} catch (error
|
|
67028
|
-
return tool.error(createErrorResponse(error
|
|
67019
|
+
} catch (error) {
|
|
67020
|
+
return tool.error(createErrorResponse(error, `getting event types for ${input.deviceId}`));
|
|
67029
67021
|
}
|
|
67030
67022
|
});
|
|
67031
67023
|
}
|
|
@@ -67054,8 +67046,8 @@ function createQueryInventoryTool() {
|
|
|
67054
67046
|
withTotalPages: true
|
|
67055
67047
|
});
|
|
67056
67048
|
return tool.text(createPaginatedResponse(res, "Inventory", "Refine query if too many results"));
|
|
67057
|
-
} catch (error
|
|
67058
|
-
return tool.error(createErrorResponse(error
|
|
67049
|
+
} catch (error) {
|
|
67050
|
+
return tool.error(createErrorResponse(error, "querying inventory"));
|
|
67059
67051
|
}
|
|
67060
67052
|
});
|
|
67061
67053
|
}
|
|
@@ -67071,8 +67063,8 @@ function createGetObjectTool() {
|
|
|
67071
67063
|
try {
|
|
67072
67064
|
const res = await (await getAuthenticatedClient(input)).inventory.detail(input.id);
|
|
67073
67065
|
return tool.text(createObjectResponse(res.data, `Object ${input.id}`));
|
|
67074
|
-
} catch (error
|
|
67075
|
-
return tool.error(createErrorResponse(error
|
|
67066
|
+
} catch (error) {
|
|
67067
|
+
return tool.error(createErrorResponse(error, `getting object ${input.id}`));
|
|
67076
67068
|
}
|
|
67077
67069
|
});
|
|
67078
67070
|
}
|
|
@@ -67102,8 +67094,8 @@ function createListChildrenTool() {
|
|
|
67102
67094
|
...childType === "device" && { query: "$filter=has(c8y_IsDevice)" }
|
|
67103
67095
|
});
|
|
67104
67096
|
return tool.text(createPaginatedResponse(res, `Children of ${input.id}`));
|
|
67105
|
-
} catch (error
|
|
67106
|
-
return tool.error(createErrorResponse(error
|
|
67097
|
+
} catch (error) {
|
|
67098
|
+
return tool.error(createErrorResponse(error, `listing children of ${input.id}`));
|
|
67107
67099
|
}
|
|
67108
67100
|
});
|
|
67109
67101
|
}
|
|
@@ -67125,8 +67117,8 @@ function createGetSupportedSeriesTool() {
|
|
|
67125
67117
|
supportedSeries: series,
|
|
67126
67118
|
raw: device.c8y_SupportedSeries
|
|
67127
67119
|
}, `Supported series for ${device.name ?? input.deviceId}`));
|
|
67128
|
-
} catch (error
|
|
67129
|
-
return tool.error(createErrorResponse(error
|
|
67120
|
+
} catch (error) {
|
|
67121
|
+
return tool.error(createErrorResponse(error, `getting supported series for ${input.deviceId}`));
|
|
67130
67122
|
}
|
|
67131
67123
|
});
|
|
67132
67124
|
}
|
|
@@ -67166,8 +67158,8 @@ function createGetMeasurementsTool() {
|
|
|
67166
67158
|
withTotalPages: true
|
|
67167
67159
|
});
|
|
67168
67160
|
return tool.text(createPaginatedResponse(res, `Measurements for ${input.deviceId}`));
|
|
67169
|
-
} catch (error
|
|
67170
|
-
return tool.error(createErrorResponse(error
|
|
67161
|
+
} catch (error) {
|
|
67162
|
+
return tool.error(createErrorResponse(error, `getting measurements for ${input.deviceId}`));
|
|
67171
67163
|
}
|
|
67172
67164
|
});
|
|
67173
67165
|
}
|
|
@@ -67209,8 +67201,8 @@ function createGetMeasurementStatsTool() {
|
|
|
67209
67201
|
dateTo: input.dateTo
|
|
67210
67202
|
};
|
|
67211
67203
|
return tool.text(createObjectResponse(stats, `Stats for ${input.fragment}.${input.series}`));
|
|
67212
|
-
} catch (error
|
|
67213
|
-
return tool.error(createErrorResponse(error
|
|
67204
|
+
} catch (error) {
|
|
67205
|
+
return tool.error(createErrorResponse(error, "getting measurement stats"));
|
|
67214
67206
|
}
|
|
67215
67207
|
});
|
|
67216
67208
|
}
|
|
@@ -67236,8 +67228,8 @@ function createGetDashboardsTool() {
|
|
|
67236
67228
|
withTotalPages: true
|
|
67237
67229
|
});
|
|
67238
67230
|
return tool.text(createPaginatedResponse(res, `Dashboards for ${input.deviceId}`));
|
|
67239
|
-
} catch (error
|
|
67240
|
-
return tool.error(createErrorResponse(error
|
|
67231
|
+
} catch (error) {
|
|
67232
|
+
return tool.error(createErrorResponse(error, `getting dashboards for ${input.deviceId}`));
|
|
67241
67233
|
}
|
|
67242
67234
|
});
|
|
67243
67235
|
}
|
|
@@ -67283,8 +67275,8 @@ function createGetAuditTool() {
|
|
|
67283
67275
|
} : void 0
|
|
67284
67276
|
};
|
|
67285
67277
|
return tool.text(createPaginatedResponse(data, "Audit records"));
|
|
67286
|
-
} catch (error
|
|
67287
|
-
return tool.error(createErrorResponse(error
|
|
67278
|
+
} catch (error) {
|
|
67279
|
+
return tool.error(createErrorResponse(error, "getting audit logs"));
|
|
67288
67280
|
}
|
|
67289
67281
|
});
|
|
67290
67282
|
}
|
|
@@ -67302,8 +67294,8 @@ function createGetCurrentTenantTool() {
|
|
|
67302
67294
|
delete res.data.applications;
|
|
67303
67295
|
if ("ownedApplications" in res.data) delete res.data.ownedApplications;
|
|
67304
67296
|
return tool.text(createObjectResponse(res.data, "Current tenant"));
|
|
67305
|
-
} catch (error
|
|
67306
|
-
return tool.error(createErrorResponse(error
|
|
67297
|
+
} catch (error) {
|
|
67298
|
+
return tool.error(createErrorResponse(error, "getting current tenant"));
|
|
67307
67299
|
}
|
|
67308
67300
|
});
|
|
67309
67301
|
}
|
|
@@ -67325,8 +67317,8 @@ function createGetTenantStatsTool() {
|
|
|
67325
67317
|
const url = `/tenant/statistics?pageSize=${input.pageSize ?? 50}&withTotalPages=true${input.dateFrom ? `&dateFrom=${input.dateFrom}` : ""}${input.dateTo ? `&dateTo=${input.dateTo}` : ""}`;
|
|
67326
67318
|
const data = await (await client.core.fetch(url)).json();
|
|
67327
67319
|
return tool.text(createObjectResponse(data, "Tenant statistics"));
|
|
67328
|
-
} catch (error
|
|
67329
|
-
return tool.error(createErrorResponse(error
|
|
67320
|
+
} catch (error) {
|
|
67321
|
+
return tool.error(createErrorResponse(error, "getting tenant statistics"));
|
|
67330
67322
|
}
|
|
67331
67323
|
});
|
|
67332
67324
|
}
|
|
@@ -67347,8 +67339,8 @@ function createGetTenantSummaryTool() {
|
|
|
67347
67339
|
const url = `/tenant/statistics/summary${input.dateFrom ? `?dateFrom=${input.dateFrom}` : ""}${input.dateTo ? `${input.dateFrom ? "&" : "?"}dateTo=${input.dateTo}` : ""}`;
|
|
67348
67340
|
const data = await (await client.core.fetch(url)).json();
|
|
67349
67341
|
return tool.text(createObjectResponse(data, "Tenant summary"));
|
|
67350
|
-
} catch (error
|
|
67351
|
-
return tool.error(createErrorResponse(error
|
|
67342
|
+
} catch (error) {
|
|
67343
|
+
return tool.error(createErrorResponse(error, "getting tenant summary"));
|
|
67352
67344
|
}
|
|
67353
67345
|
});
|
|
67354
67346
|
}
|
|
@@ -67364,8 +67356,8 @@ function createGetCurrentUserTool() {
|
|
|
67364
67356
|
try {
|
|
67365
67357
|
const res = await (await getAuthenticatedClient(input)).user.current();
|
|
67366
67358
|
return tool.text(createObjectResponse(res.data, "Current user"));
|
|
67367
|
-
} catch (error
|
|
67368
|
-
return tool.error(createErrorResponse(error
|
|
67359
|
+
} catch (error) {
|
|
67360
|
+
return tool.error(createErrorResponse(error, "getting current user"));
|
|
67369
67361
|
}
|
|
67370
67362
|
});
|
|
67371
67363
|
}
|
|
@@ -67394,8 +67386,8 @@ function createGetUsersTool() {
|
|
|
67394
67386
|
withTotalPages: true
|
|
67395
67387
|
});
|
|
67396
67388
|
return tool.text(createPaginatedResponse(res, `Users for current tenant`));
|
|
67397
|
-
} catch (error
|
|
67398
|
-
return tool.error(createErrorResponse(error
|
|
67389
|
+
} catch (error) {
|
|
67390
|
+
return tool.error(createErrorResponse(error, "getting users"));
|
|
67399
67391
|
}
|
|
67400
67392
|
});
|
|
67401
67393
|
}
|
|
@@ -67431,8 +67423,8 @@ function createGetApplicationsTool() {
|
|
|
67431
67423
|
const url = `/application/applications?${params.toString()}`;
|
|
67432
67424
|
const data = await (await client.core.fetch(url)).json();
|
|
67433
67425
|
return tool.text(createObjectResponse(data, "Applications"));
|
|
67434
|
-
} catch (error
|
|
67435
|
-
return tool.error(createErrorResponse(error
|
|
67426
|
+
} catch (error) {
|
|
67427
|
+
return tool.error(createErrorResponse(error, "getting applications"));
|
|
67436
67428
|
}
|
|
67437
67429
|
});
|
|
67438
67430
|
}
|
|
@@ -67450,8 +67442,8 @@ function createGetApplicationTool() {
|
|
|
67450
67442
|
const url = `/application/applications/${input.id}`;
|
|
67451
67443
|
const data = await (await client.core.fetch(url)).json();
|
|
67452
67444
|
return tool.text(createObjectResponse(data, `Application ${input.id}`));
|
|
67453
|
-
} catch (error
|
|
67454
|
-
return tool.error(createErrorResponse(error
|
|
67445
|
+
} catch (error) {
|
|
67446
|
+
return tool.error(createErrorResponse(error, `getting application ${input.id}`));
|
|
67455
67447
|
}
|
|
67456
67448
|
});
|
|
67457
67449
|
}
|
|
@@ -67469,8 +67461,8 @@ function createGetApplicationVersionsTool() {
|
|
|
67469
67461
|
const url = `/application/applications/${input.id}/versions`;
|
|
67470
67462
|
const data = await (await client.core.fetch(url)).json();
|
|
67471
67463
|
return tool.text(createObjectResponse(data, `Versions for application ${input.id}`));
|
|
67472
|
-
} catch (error
|
|
67473
|
-
return tool.error(createErrorResponse(error
|
|
67464
|
+
} catch (error) {
|
|
67465
|
+
return tool.error(createErrorResponse(error, `getting versions for application ${input.id}`));
|
|
67474
67466
|
}
|
|
67475
67467
|
});
|
|
67476
67468
|
}
|