@opencloud-eu/web-client 7.3.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{axios-DvF8YTlk.js → axios-ULsDSF3p.js} +842 -626
- package/dist/dist-WdVfmT0d.js +4 -0
- package/dist/{generated-FCm3SbzB.js → generated-CkfYRFme.js} +395 -239
- package/dist/{graph-CppzmKYd.js → graph-D3q1149Y.js} +101 -97
- package/dist/{helpers-MRfkPTnV.js → helpers-C_9em2wB.js} +236 -224
- package/dist/{ocs-gQyxMolJ.js → ocs-CGD-4vGl.js} +1454 -563
- package/dist/ox-D1FgExd1.js +3849 -0
- package/dist/src/graph/generated/api.d.ts +461 -122
- package/dist/src/graph/users/types.d.ts +2 -1
- package/dist/src/helpers/resource/types.d.ts +2 -1
- package/dist/src/helpers/space/types.d.ts +6 -0
- package/dist/src/sse/index.d.ts +2 -0
- package/dist/src/webdav/client/builders.d.ts +3 -2
- package/dist/src/webdav/client/dav.d.ts +8 -2
- package/dist/src/webdav/constants/dav.d.ts +17 -1
- package/dist/src/webdav/listFiles.d.ts +10 -1
- package/dist/src/webdav/restoreFileVersion.d.ts +2 -1
- package/dist/src/webdav/setProperties.d.ts +19 -0
- package/dist/src/webdav/types.d.ts +2 -0
- package/dist/{toString-B4UEwRgf.js → toString-DfgrQ1mh.js} +2 -2
- package/dist/web-client/graph/generated.js +2 -2
- package/dist/web-client/graph.js +1 -1
- package/dist/web-client/ocs.js +1 -1
- package/dist/web-client/ox.js +1 -1
- package/dist/web-client/sse.js +1 -1
- package/dist/web-client/webdav.js +3 -3
- package/dist/web-client.js +6 -6
- package/dist/{webdav-BMoGCm4T.js → webdav-BxsiETq0.js} +997 -963
- package/package.json +4 -4
- package/dist/dist-CeGfU4rJ.js +0 -810
- package/dist/ox-DIaYdpxw.js +0 -3045
|
@@ -1,68 +1,67 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import { a as n, n as r, s as i, t as a } from "./toString-B4UEwRgf.js";
|
|
1
|
+
import { t as e } from "./urlJoin-_pUL1TUx.js";
|
|
2
|
+
import { a as t, n, s as r, t as i } from "./toString-DfgrQ1mh.js";
|
|
4
3
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
var
|
|
9
|
-
return
|
|
4
|
+
var a = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, o = /^\w*$/;
|
|
5
|
+
function s(e, n) {
|
|
6
|
+
if (t(e)) return !1;
|
|
7
|
+
var i = typeof e;
|
|
8
|
+
return i == "number" || i == "symbol" || i == "boolean" || e == null || r(e) ? !0 : o.test(e) || !a.test(e) || n != null && e in Object(n);
|
|
10
9
|
}
|
|
11
10
|
//#endregion
|
|
12
11
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/memoize.js
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (typeof e != "function" || t != null && typeof t != "function") throw TypeError(
|
|
16
|
-
var
|
|
17
|
-
var
|
|
12
|
+
var c = "Expected a function";
|
|
13
|
+
function l(e, t) {
|
|
14
|
+
if (typeof e != "function" || t != null && typeof t != "function") throw TypeError(c);
|
|
15
|
+
var r = function() {
|
|
16
|
+
var n = arguments, i = t ? t.apply(this, n) : n[0], a = r.cache;
|
|
18
17
|
if (a.has(i)) return a.get(i);
|
|
19
|
-
var o = e.apply(this,
|
|
20
|
-
return
|
|
18
|
+
var o = e.apply(this, n);
|
|
19
|
+
return r.cache = a.set(i, o) || a, o;
|
|
21
20
|
};
|
|
22
|
-
return
|
|
21
|
+
return r.cache = new (l.Cache || n)(), r;
|
|
23
22
|
}
|
|
24
|
-
|
|
23
|
+
l.Cache = n;
|
|
25
24
|
//#endregion
|
|
26
25
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
var t =
|
|
30
|
-
return n.size ===
|
|
26
|
+
var u = 500;
|
|
27
|
+
function d(e) {
|
|
28
|
+
var t = l(e, function(e) {
|
|
29
|
+
return n.size === u && n.clear(), e;
|
|
31
30
|
}), n = t.cache;
|
|
32
31
|
return t;
|
|
33
32
|
}
|
|
34
33
|
//#endregion
|
|
35
34
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js
|
|
36
|
-
var
|
|
35
|
+
var f = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, p = /\\(\\)?/g, m = d(function(e) {
|
|
37
36
|
var t = [];
|
|
38
|
-
return e.charCodeAt(0) === 46 && t.push(""), e.replace(
|
|
39
|
-
t.push(r ? i.replace(
|
|
37
|
+
return e.charCodeAt(0) === 46 && t.push(""), e.replace(f, function(e, n, r, i) {
|
|
38
|
+
t.push(r ? i.replace(p, "$1") : n || e);
|
|
40
39
|
}), t;
|
|
41
40
|
});
|
|
42
41
|
//#endregion
|
|
43
42
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js
|
|
44
|
-
function
|
|
45
|
-
return
|
|
43
|
+
function h(e, n) {
|
|
44
|
+
return t(e) ? e : s(e, n) ? [e] : m(i(e));
|
|
46
45
|
}
|
|
47
46
|
//#endregion
|
|
48
47
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js
|
|
49
|
-
var
|
|
50
|
-
function
|
|
51
|
-
if (typeof e == "string" ||
|
|
48
|
+
var g = 1 / 0;
|
|
49
|
+
function _(e) {
|
|
50
|
+
if (typeof e == "string" || r(e)) return e;
|
|
52
51
|
var t = e + "";
|
|
53
|
-
return t == "0" && 1 / e == -
|
|
52
|
+
return t == "0" && 1 / e == -g ? "-0" : t;
|
|
54
53
|
}
|
|
55
54
|
//#endregion
|
|
56
55
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js
|
|
57
|
-
function
|
|
58
|
-
t =
|
|
59
|
-
for (var n = 0, r = t.length; e != null && n < r;) e = e[
|
|
56
|
+
function ee(e, t) {
|
|
57
|
+
t = h(t, e);
|
|
58
|
+
for (var n = 0, r = t.length; e != null && n < r;) e = e[_(t[n++])];
|
|
60
59
|
return n && n == r ? e : void 0;
|
|
61
60
|
}
|
|
62
61
|
//#endregion
|
|
63
62
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.js
|
|
64
|
-
function
|
|
65
|
-
var r = e == null ? void 0 :
|
|
63
|
+
function te(e, t, n) {
|
|
64
|
+
var r = e == null ? void 0 : ee(e, t);
|
|
66
65
|
return r === void 0 ? n : r;
|
|
67
66
|
}
|
|
68
67
|
//#endregion
|
|
@@ -76,71 +75,885 @@ var v = (e, t) => {
|
|
|
76
75
|
].filter(Boolean).join("/"), n.searchParams.append("format", "json");
|
|
77
76
|
let r = n.href;
|
|
78
77
|
return { async getCapabilities() {
|
|
79
|
-
return
|
|
78
|
+
return te(await t.get(r), "data.ocs.data", {
|
|
80
79
|
capabilities: null,
|
|
81
80
|
version: null
|
|
82
81
|
});
|
|
83
82
|
} };
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
}, y = {}, b = {};
|
|
84
|
+
b.byteLength = ie, b.toByteArray = oe, b.fromByteArray = le;
|
|
85
|
+
for (var x = [], S = [], C = typeof Uint8Array < "u" ? Uint8Array : Array, w = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", T = 0, ne = w.length; T < ne; ++T) x[T] = w[T], S[w.charCodeAt(T)] = T;
|
|
86
|
+
S[45] = 62, S[95] = 63;
|
|
87
87
|
function re(e) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
var t = e.length;
|
|
89
|
+
if (t % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
|
|
90
|
+
var n = e.indexOf("=");
|
|
91
|
+
n === -1 && (n = t);
|
|
92
|
+
var r = n === t ? 0 : 4 - n % 4;
|
|
93
|
+
return [n, r];
|
|
94
|
+
}
|
|
95
|
+
function ie(e) {
|
|
96
|
+
var t = re(e), n = t[0], r = t[1];
|
|
97
|
+
return (n + r) * 3 / 4 - r;
|
|
98
|
+
}
|
|
99
|
+
function ae(e, t, n) {
|
|
100
|
+
return (t + n) * 3 / 4 - n;
|
|
101
|
+
}
|
|
102
|
+
function oe(e) {
|
|
103
|
+
for (var t, n = re(e), r = n[0], i = n[1], a = new C(ae(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c = 0; c < s; c += 4) t = S[e.charCodeAt(c)] << 18 | S[e.charCodeAt(c + 1)] << 12 | S[e.charCodeAt(c + 2)] << 6 | S[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
|
|
104
|
+
return i === 2 && (t = S[e.charCodeAt(c)] << 2 | S[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = S[e.charCodeAt(c)] << 10 | S[e.charCodeAt(c + 1)] << 4 | S[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
|
|
105
|
+
}
|
|
106
|
+
function se(e) {
|
|
107
|
+
return x[e >> 18 & 63] + x[e >> 12 & 63] + x[e >> 6 & 63] + x[e & 63];
|
|
108
|
+
}
|
|
109
|
+
function ce(e, t, n) {
|
|
110
|
+
for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(se(r));
|
|
111
|
+
return i.join("");
|
|
112
|
+
}
|
|
113
|
+
function le(e) {
|
|
114
|
+
for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(ce(e, o, o + a > s ? s : o + a));
|
|
115
|
+
return r === 1 ? (t = e[n - 1], i.push(x[t >> 2] + x[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(x[t >> 10] + x[t >> 4 & 63] + x[t << 2 & 63] + "=")), i.join("");
|
|
116
|
+
}
|
|
117
|
+
var ue = {};
|
|
118
|
+
ue.read = function(e, t, n, r, i) {
|
|
119
|
+
var a, o, s = i * 8 - r - 1, c = (1 << s) - 1, l = c >> 1, u = -7, d = n ? i - 1 : 0, f = n ? -1 : 1, p = e[t + d];
|
|
120
|
+
for (d += f, a = p & (1 << -u) - 1, p >>= -u, u += s; u > 0; a = a * 256 + e[t + d], d += f, u -= 8);
|
|
121
|
+
for (o = a & (1 << -u) - 1, a >>= -u, u += r; u > 0; o = o * 256 + e[t + d], d += f, u -= 8);
|
|
122
|
+
if (a === 0) a = 1 - l;
|
|
123
|
+
else if (a === c) return o ? NaN : (p ? -1 : 1) * Infinity;
|
|
124
|
+
else o += 2 ** r, a -= l;
|
|
125
|
+
return (p ? -1 : 1) * o * 2 ** (a - r);
|
|
126
|
+
}, ue.write = function(e, t, n, r, i, a) {
|
|
127
|
+
var o, s, c, l = a * 8 - i - 1, u = (1 << l) - 1, d = u >> 1, f = i === 23 ? 2 ** -24 - 2 ** -77 : 0, p = r ? 0 : a - 1, m = r ? 1 : -1, h = +(t < 0 || t === 0 && 1 / t < 0);
|
|
128
|
+
for (t = Math.abs(t), isNaN(t) || t === Infinity ? (s = +!!isNaN(t), o = u) : (o = Math.floor(Math.log(t) / Math.LN2), t * (c = 2 ** -o) < 1 && (o--, c *= 2), o + d >= 1 ? t += f / c : t += f * 2 ** (1 - d), t * c >= 2 && (o++, c /= 2), o + d >= u ? (s = 0, o = u) : o + d >= 1 ? (s = (t * c - 1) * 2 ** i, o += d) : (s = t * 2 ** (d - 1) * 2 ** i, o = 0)); i >= 8; e[n + p] = s & 255, p += m, s /= 256, i -= 8);
|
|
129
|
+
for (o = o << i | s, l += i; l > 0; e[n + p] = o & 255, p += m, o /= 256, l -= 8);
|
|
130
|
+
e[n + p - m] |= h * 128;
|
|
131
|
+
}, (function(e) {
|
|
132
|
+
let t = b, n = ue, r = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
133
|
+
e.Buffer = u, e.SlowBuffer = y, e.INSPECT_MAX_BYTES = 50;
|
|
134
|
+
let i = 2147483647;
|
|
135
|
+
e.kMaxLength = i;
|
|
136
|
+
let { Uint8Array: a, ArrayBuffer: o, SharedArrayBuffer: s } = globalThis;
|
|
137
|
+
u.TYPED_ARRAY_SUPPORT = c(), !u.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
|
|
138
|
+
function c() {
|
|
139
|
+
try {
|
|
140
|
+
let e = new a(1), t = { foo: function() {
|
|
141
|
+
return 42;
|
|
142
|
+
} };
|
|
143
|
+
return Object.setPrototypeOf(t, a.prototype), Object.setPrototypeOf(e, t), e.foo() === 42;
|
|
144
|
+
} catch {
|
|
145
|
+
return !1;
|
|
146
|
+
}
|
|
94
147
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
148
|
+
Object.defineProperty(u.prototype, "parent", {
|
|
149
|
+
enumerable: !0,
|
|
150
|
+
get: function() {
|
|
151
|
+
if (u.isBuffer(this)) return this.buffer;
|
|
152
|
+
}
|
|
153
|
+
}), Object.defineProperty(u.prototype, "offset", {
|
|
154
|
+
enumerable: !0,
|
|
155
|
+
get: function() {
|
|
156
|
+
if (u.isBuffer(this)) return this.byteOffset;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
function l(e) {
|
|
160
|
+
if (e > i) throw RangeError("The value \"" + e + "\" is invalid for option \"size\"");
|
|
161
|
+
let t = new a(e);
|
|
162
|
+
return Object.setPrototypeOf(t, u.prototype), t;
|
|
163
|
+
}
|
|
164
|
+
function u(e, t, n) {
|
|
165
|
+
if (typeof e == "number") {
|
|
166
|
+
if (typeof t == "string") throw TypeError("The \"string\" argument must be of type string. Received type number");
|
|
167
|
+
return m(e);
|
|
168
|
+
}
|
|
169
|
+
return d(e, t, n);
|
|
170
|
+
}
|
|
171
|
+
u.poolSize = 8192;
|
|
172
|
+
function d(e, t, n) {
|
|
173
|
+
if (typeof e == "string") return h(e, t);
|
|
174
|
+
if (o.isView(e)) return _(e);
|
|
175
|
+
if (e == null) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
176
|
+
if (L(e, o) || e && L(e.buffer, o) || s !== void 0 && (L(e, s) || e && L(e.buffer, s))) return ee(e, t, n);
|
|
177
|
+
if (typeof e == "number") throw TypeError("The \"value\" argument must not be of type number. Received type number");
|
|
178
|
+
let r = e.valueOf && e.valueOf();
|
|
179
|
+
if (r != null && r !== e) return u.from(r, t, n);
|
|
180
|
+
let i = te(e);
|
|
181
|
+
if (i) return i;
|
|
182
|
+
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof e[Symbol.toPrimitive] == "function") return u.from(e[Symbol.toPrimitive]("string"), t, n);
|
|
183
|
+
throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
184
|
+
}
|
|
185
|
+
u.from = function(e, t, n) {
|
|
186
|
+
return d(e, t, n);
|
|
187
|
+
}, Object.setPrototypeOf(u.prototype, a.prototype), Object.setPrototypeOf(u, a);
|
|
188
|
+
function f(e) {
|
|
189
|
+
if (typeof e != "number") throw TypeError("\"size\" argument must be of type number");
|
|
190
|
+
if (e < 0) throw RangeError("The value \"" + e + "\" is invalid for option \"size\"");
|
|
191
|
+
}
|
|
192
|
+
function p(e, t, n) {
|
|
193
|
+
return f(e), e <= 0 || t === void 0 ? l(e) : typeof n == "string" ? l(e).fill(t, n) : l(e).fill(t);
|
|
194
|
+
}
|
|
195
|
+
u.alloc = function(e, t, n) {
|
|
196
|
+
return p(e, t, n);
|
|
197
|
+
};
|
|
198
|
+
function m(e) {
|
|
199
|
+
return f(e), l(e < 0 ? 0 : v(e) | 0);
|
|
98
200
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
201
|
+
u.allocUnsafe = function(e) {
|
|
202
|
+
return m(e);
|
|
203
|
+
}, u.allocUnsafeSlow = function(e) {
|
|
204
|
+
return m(e);
|
|
205
|
+
};
|
|
206
|
+
function h(e, t) {
|
|
207
|
+
if ((typeof t != "string" || t === "") && (t = "utf8"), !u.isEncoding(t)) throw TypeError("Unknown encoding: " + t);
|
|
208
|
+
let n = x(e, t) | 0, r = l(n), i = r.write(e, t);
|
|
209
|
+
return i !== n && (r = r.slice(0, i)), r;
|
|
210
|
+
}
|
|
211
|
+
function g(e) {
|
|
212
|
+
let t = e.length < 0 ? 0 : v(e.length) | 0, n = l(t);
|
|
213
|
+
for (let r = 0; r < t; r += 1) n[r] = e[r] & 255;
|
|
214
|
+
return n;
|
|
215
|
+
}
|
|
216
|
+
function _(e) {
|
|
217
|
+
if (L(e, a)) {
|
|
218
|
+
let t = new a(e);
|
|
219
|
+
return ee(t.buffer, t.byteOffset, t.byteLength);
|
|
220
|
+
}
|
|
221
|
+
return g(e);
|
|
222
|
+
}
|
|
223
|
+
function ee(e, t, n) {
|
|
224
|
+
if (t < 0 || e.byteLength < t) throw RangeError("\"offset\" is outside of buffer bounds");
|
|
225
|
+
if (e.byteLength < t + (n || 0)) throw RangeError("\"length\" is outside of buffer bounds");
|
|
226
|
+
let r;
|
|
227
|
+
return r = t === void 0 && n === void 0 ? new a(e) : n === void 0 ? new a(e, t) : new a(e, t, n), Object.setPrototypeOf(r, u.prototype), r;
|
|
228
|
+
}
|
|
229
|
+
function te(e) {
|
|
230
|
+
if (u.isBuffer(e)) {
|
|
231
|
+
let t = v(e.length) | 0, n = l(t);
|
|
232
|
+
return n.length === 0 || e.copy(n, 0, 0, t), n;
|
|
233
|
+
}
|
|
234
|
+
if (e.length !== void 0) return typeof e.length != "number" || Ee(e.length) ? l(0) : g(e);
|
|
235
|
+
if (e.type === "Buffer" && Array.isArray(e.data)) return g(e.data);
|
|
236
|
+
}
|
|
237
|
+
function v(e) {
|
|
238
|
+
if (e >= i) throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + i.toString(16) + " bytes");
|
|
239
|
+
return e | 0;
|
|
240
|
+
}
|
|
241
|
+
function y(e) {
|
|
242
|
+
return +e != e && (e = 0), u.alloc(+e);
|
|
243
|
+
}
|
|
244
|
+
u.isBuffer = function(e) {
|
|
245
|
+
return e != null && e._isBuffer === !0 && e !== u.prototype;
|
|
246
|
+
}, u.compare = function(e, t) {
|
|
247
|
+
if (L(e, a) && (e = u.from(e, e.offset, e.byteLength)), L(t, a) && (t = u.from(t, t.offset, t.byteLength)), !u.isBuffer(e) || !u.isBuffer(t)) throw TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");
|
|
248
|
+
if (e === t) return 0;
|
|
249
|
+
let n = e.length, r = t.length;
|
|
250
|
+
for (let i = 0, a = Math.min(n, r); i < a; ++i) if (e[i] !== t[i]) {
|
|
251
|
+
n = e[i], r = t[i];
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
return n < r ? -1 : +(r < n);
|
|
255
|
+
}, u.isEncoding = function(e) {
|
|
256
|
+
switch (String(e).toLowerCase()) {
|
|
257
|
+
case "hex":
|
|
258
|
+
case "utf8":
|
|
259
|
+
case "utf-8":
|
|
260
|
+
case "ascii":
|
|
261
|
+
case "latin1":
|
|
262
|
+
case "binary":
|
|
263
|
+
case "base64":
|
|
264
|
+
case "ucs2":
|
|
265
|
+
case "ucs-2":
|
|
266
|
+
case "utf16le":
|
|
267
|
+
case "utf-16le": return !0;
|
|
268
|
+
default: return !1;
|
|
269
|
+
}
|
|
270
|
+
}, u.concat = function(e, t) {
|
|
271
|
+
if (!Array.isArray(e)) throw TypeError("\"list\" argument must be an Array of Buffers");
|
|
272
|
+
if (e.length === 0) return u.alloc(0);
|
|
273
|
+
let n;
|
|
274
|
+
if (t === void 0) for (t = 0, n = 0; n < e.length; ++n) t += e[n].length;
|
|
275
|
+
let r = u.allocUnsafe(t), i = 0;
|
|
276
|
+
for (n = 0; n < e.length; ++n) {
|
|
277
|
+
let t = e[n];
|
|
278
|
+
if (L(t, a)) i + t.length > r.length ? (u.isBuffer(t) || (t = u.from(t)), t.copy(r, i)) : a.prototype.set.call(r, t, i);
|
|
279
|
+
else if (u.isBuffer(t)) t.copy(r, i);
|
|
280
|
+
else throw TypeError("\"list\" argument must be an Array of Buffers");
|
|
281
|
+
i += t.length;
|
|
282
|
+
}
|
|
283
|
+
return r;
|
|
284
|
+
};
|
|
285
|
+
function x(e, t) {
|
|
286
|
+
if (u.isBuffer(e)) return e.length;
|
|
287
|
+
if (o.isView(e) || L(e, o)) return e.byteLength;
|
|
288
|
+
if (typeof e != "string") throw TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type " + typeof e);
|
|
289
|
+
let n = e.length, r = arguments.length > 2 && arguments[2] === !0;
|
|
290
|
+
if (!r && n === 0) return 0;
|
|
291
|
+
let i = !1;
|
|
292
|
+
for (;;) switch (t) {
|
|
293
|
+
case "ascii":
|
|
294
|
+
case "latin1":
|
|
295
|
+
case "binary": return n;
|
|
296
|
+
case "utf8":
|
|
297
|
+
case "utf-8": return Se(e).length;
|
|
298
|
+
case "ucs2":
|
|
299
|
+
case "ucs-2":
|
|
300
|
+
case "utf16le":
|
|
301
|
+
case "utf-16le": return n * 2;
|
|
302
|
+
case "hex": return n >>> 1;
|
|
303
|
+
case "base64": return we(e).length;
|
|
304
|
+
default:
|
|
305
|
+
if (i) return r ? -1 : Se(e).length;
|
|
306
|
+
t = ("" + t).toLowerCase(), i = !0;
|
|
307
|
+
}
|
|
105
308
|
}
|
|
106
|
-
|
|
309
|
+
u.byteLength = x;
|
|
310
|
+
function S(e, t, n) {
|
|
311
|
+
let r = !1;
|
|
312
|
+
if ((t === void 0 || t < 0) && (t = 0), t > this.length || ((n === void 0 || n > this.length) && (n = this.length), n <= 0) || (n >>>= 0, t >>>= 0, n <= t)) return "";
|
|
313
|
+
for (e ||= "utf8";;) switch (e) {
|
|
314
|
+
case "hex": return E(this, t, n);
|
|
315
|
+
case "utf8":
|
|
316
|
+
case "utf-8": return ce(this, t, n);
|
|
317
|
+
case "ascii": return fe(this, t, n);
|
|
318
|
+
case "latin1":
|
|
319
|
+
case "binary": return pe(this, t, n);
|
|
320
|
+
case "base64": return se(this, t, n);
|
|
321
|
+
case "ucs2":
|
|
322
|
+
case "ucs-2":
|
|
323
|
+
case "utf16le":
|
|
324
|
+
case "utf-16le": return me(this, t, n);
|
|
325
|
+
default:
|
|
326
|
+
if (r) throw TypeError("Unknown encoding: " + e);
|
|
327
|
+
e = (e + "").toLowerCase(), r = !0;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
u.prototype._isBuffer = !0;
|
|
331
|
+
function C(e, t, n) {
|
|
332
|
+
let r = e[t];
|
|
333
|
+
e[t] = e[n], e[n] = r;
|
|
334
|
+
}
|
|
335
|
+
u.prototype.swap16 = function() {
|
|
336
|
+
let e = this.length;
|
|
337
|
+
if (e % 2 != 0) throw RangeError("Buffer size must be a multiple of 16-bits");
|
|
338
|
+
for (let t = 0; t < e; t += 2) C(this, t, t + 1);
|
|
339
|
+
return this;
|
|
340
|
+
}, u.prototype.swap32 = function() {
|
|
341
|
+
let e = this.length;
|
|
342
|
+
if (e % 4 != 0) throw RangeError("Buffer size must be a multiple of 32-bits");
|
|
343
|
+
for (let t = 0; t < e; t += 4) C(this, t, t + 3), C(this, t + 1, t + 2);
|
|
344
|
+
return this;
|
|
345
|
+
}, u.prototype.swap64 = function() {
|
|
346
|
+
let e = this.length;
|
|
347
|
+
if (e % 8 != 0) throw RangeError("Buffer size must be a multiple of 64-bits");
|
|
348
|
+
for (let t = 0; t < e; t += 8) C(this, t, t + 7), C(this, t + 1, t + 6), C(this, t + 2, t + 5), C(this, t + 3, t + 4);
|
|
349
|
+
return this;
|
|
350
|
+
}, u.prototype.toString = function() {
|
|
351
|
+
let e = this.length;
|
|
352
|
+
return e === 0 ? "" : arguments.length === 0 ? ce(this, 0, e) : S.apply(this, arguments);
|
|
353
|
+
}, u.prototype.toLocaleString = u.prototype.toString, u.prototype.equals = function(e) {
|
|
354
|
+
if (!u.isBuffer(e)) throw TypeError("Argument must be a Buffer");
|
|
355
|
+
return this === e || u.compare(this, e) === 0;
|
|
356
|
+
}, u.prototype.inspect = function() {
|
|
357
|
+
let t = "", n = e.INSPECT_MAX_BYTES;
|
|
358
|
+
return t = this.toString("hex", 0, n).replace(/(.{2})/g, "$1 ").trim(), this.length > n && (t += " ... "), "<Buffer " + t + ">";
|
|
359
|
+
}, r && (u.prototype[r] = u.prototype.inspect), u.prototype.compare = function(e, t, n, r, i) {
|
|
360
|
+
if (L(e, a) && (e = u.from(e, e.offset, e.byteLength)), !u.isBuffer(e)) throw TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof e);
|
|
361
|
+
if (t === void 0 && (t = 0), n === void 0 && (n = e ? e.length : 0), r === void 0 && (r = 0), i === void 0 && (i = this.length), t < 0 || n > e.length || r < 0 || i > this.length) throw RangeError("out of range index");
|
|
362
|
+
if (r >= i && t >= n) return 0;
|
|
363
|
+
if (r >= i) return -1;
|
|
364
|
+
if (t >= n) return 1;
|
|
365
|
+
if (t >>>= 0, n >>>= 0, r >>>= 0, i >>>= 0, this === e) return 0;
|
|
366
|
+
let o = i - r, s = n - t, c = Math.min(o, s), l = this.slice(r, i), d = e.slice(t, n);
|
|
367
|
+
for (let e = 0; e < c; ++e) if (l[e] !== d[e]) {
|
|
368
|
+
o = l[e], s = d[e];
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
return o < s ? -1 : +(s < o);
|
|
372
|
+
};
|
|
373
|
+
function w(e, t, n, r, i) {
|
|
374
|
+
if (e.length === 0) return -1;
|
|
375
|
+
if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, Ee(n) && (n = i ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
|
|
376
|
+
if (i) return -1;
|
|
377
|
+
n = e.length - 1;
|
|
378
|
+
} else if (n < 0) {
|
|
379
|
+
if (i) n = 0;
|
|
380
|
+
else return -1;
|
|
381
|
+
}
|
|
382
|
+
if (typeof t == "string" && (t = u.from(t, r)), u.isBuffer(t)) return t.length === 0 ? -1 : T(e, t, n, r, i);
|
|
383
|
+
if (typeof t == "number") return t &= 255, typeof a.prototype.indexOf == "function" ? i ? a.prototype.indexOf.call(e, t, n) : a.prototype.lastIndexOf.call(e, t, n) : T(e, [t], n, r, i);
|
|
384
|
+
throw TypeError("val must be string, number or Buffer");
|
|
385
|
+
}
|
|
386
|
+
function T(e, t, n, r, i) {
|
|
387
|
+
let a = 1, o = e.length, s = t.length;
|
|
388
|
+
if (r !== void 0 && (r = String(r).toLowerCase(), r === "ucs2" || r === "ucs-2" || r === "utf16le" || r === "utf-16le")) {
|
|
389
|
+
if (e.length < 2 || t.length < 2) return -1;
|
|
390
|
+
a = 2, o /= 2, s /= 2, n /= 2;
|
|
391
|
+
}
|
|
392
|
+
function c(e, t) {
|
|
393
|
+
return a === 1 ? e[t] : e.readUInt16BE(t * a);
|
|
394
|
+
}
|
|
395
|
+
let l;
|
|
396
|
+
if (i) {
|
|
397
|
+
let r = -1;
|
|
398
|
+
for (l = n; l < o; l++) if (c(e, l) === c(t, r === -1 ? 0 : l - r)) {
|
|
399
|
+
if (r === -1 && (r = l), l - r + 1 === s) return r * a;
|
|
400
|
+
} else r !== -1 && (l -= l - r), r = -1;
|
|
401
|
+
} else for (n + s > o && (n = o - s), l = n; l >= 0; l--) {
|
|
402
|
+
let n = !0;
|
|
403
|
+
for (let r = 0; r < s; r++) if (c(e, l + r) !== c(t, r)) {
|
|
404
|
+
n = !1;
|
|
405
|
+
break;
|
|
406
|
+
}
|
|
407
|
+
if (n) return l;
|
|
408
|
+
}
|
|
409
|
+
return -1;
|
|
410
|
+
}
|
|
411
|
+
u.prototype.includes = function(e, t, n) {
|
|
412
|
+
return this.indexOf(e, t, n) !== -1;
|
|
413
|
+
}, u.prototype.indexOf = function(e, t, n) {
|
|
414
|
+
return w(this, e, t, n, !0);
|
|
415
|
+
}, u.prototype.lastIndexOf = function(e, t, n) {
|
|
416
|
+
return w(this, e, t, n, !1);
|
|
417
|
+
};
|
|
418
|
+
function ne(e, t, n, r) {
|
|
419
|
+
n = Number(n) || 0;
|
|
420
|
+
let i = e.length - n;
|
|
421
|
+
r ? (r = Number(r), r > i && (r = i)) : r = i;
|
|
422
|
+
let a = t.length;
|
|
423
|
+
r > a / 2 && (r = a / 2);
|
|
424
|
+
let o = 0;
|
|
425
|
+
for (; o < r; ++o) {
|
|
426
|
+
let r = parseInt(t.substr(o * 2, 2), 16);
|
|
427
|
+
if (Ee(r)) return o;
|
|
428
|
+
e[n + o] = r;
|
|
429
|
+
}
|
|
430
|
+
return o;
|
|
431
|
+
}
|
|
432
|
+
function re(e, t, n, r) {
|
|
433
|
+
return Te(Se(t, e.length - n), e, n, r);
|
|
434
|
+
}
|
|
435
|
+
function ie(e, t, n, r) {
|
|
436
|
+
return Te(I(t), e, n, r);
|
|
437
|
+
}
|
|
438
|
+
function ae(e, t, n, r) {
|
|
439
|
+
return Te(we(t), e, n, r);
|
|
440
|
+
}
|
|
441
|
+
function oe(e, t, n, r) {
|
|
442
|
+
return Te(Ce(t, e.length - n), e, n, r);
|
|
443
|
+
}
|
|
444
|
+
u.prototype.write = function(e, t, n, r) {
|
|
445
|
+
if (t === void 0) r = "utf8", n = this.length, t = 0;
|
|
446
|
+
else if (n === void 0 && typeof t == "string") r = t, n = this.length, t = 0;
|
|
447
|
+
else if (isFinite(t)) t >>>= 0, isFinite(n) ? (n >>>= 0, r === void 0 && (r = "utf8")) : (r = n, n = void 0);
|
|
448
|
+
else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
|
|
449
|
+
let i = this.length - t;
|
|
450
|
+
if ((n === void 0 || n > i) && (n = i), e.length > 0 && (n < 0 || t < 0) || t > this.length) throw RangeError("Attempt to write outside buffer bounds");
|
|
451
|
+
r ||= "utf8";
|
|
452
|
+
let a = !1;
|
|
453
|
+
for (;;) switch (r) {
|
|
454
|
+
case "hex": return ne(this, e, t, n);
|
|
455
|
+
case "utf8":
|
|
456
|
+
case "utf-8": return re(this, e, t, n);
|
|
457
|
+
case "ascii":
|
|
458
|
+
case "latin1":
|
|
459
|
+
case "binary": return ie(this, e, t, n);
|
|
460
|
+
case "base64": return ae(this, e, t, n);
|
|
461
|
+
case "ucs2":
|
|
462
|
+
case "ucs-2":
|
|
463
|
+
case "utf16le":
|
|
464
|
+
case "utf-16le": return oe(this, e, t, n);
|
|
465
|
+
default:
|
|
466
|
+
if (a) throw TypeError("Unknown encoding: " + r);
|
|
467
|
+
r = ("" + r).toLowerCase(), a = !0;
|
|
468
|
+
}
|
|
469
|
+
}, u.prototype.toJSON = function() {
|
|
470
|
+
return {
|
|
471
|
+
type: "Buffer",
|
|
472
|
+
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
function se(e, n, r) {
|
|
476
|
+
return n === 0 && r === e.length ? t.fromByteArray(e) : t.fromByteArray(e.slice(n, r));
|
|
477
|
+
}
|
|
478
|
+
function ce(e, t, n) {
|
|
479
|
+
n = Math.min(e.length, n);
|
|
480
|
+
let r = [], i = t;
|
|
481
|
+
for (; i < n;) {
|
|
482
|
+
let t = e[i], a = null, o = t > 239 ? 4 : t > 223 ? 3 : t > 191 ? 2 : 1;
|
|
483
|
+
if (i + o <= n) {
|
|
484
|
+
let n, r, s, c;
|
|
485
|
+
switch (o) {
|
|
486
|
+
case 1:
|
|
487
|
+
t < 128 && (a = t);
|
|
488
|
+
break;
|
|
489
|
+
case 2:
|
|
490
|
+
n = e[i + 1], (n & 192) == 128 && (c = (t & 31) << 6 | n & 63, c > 127 && (a = c));
|
|
491
|
+
break;
|
|
492
|
+
case 3:
|
|
493
|
+
n = e[i + 1], r = e[i + 2], (n & 192) == 128 && (r & 192) == 128 && (c = (t & 15) << 12 | (n & 63) << 6 | r & 63, c > 2047 && (c < 55296 || c > 57343) && (a = c));
|
|
494
|
+
break;
|
|
495
|
+
case 4: n = e[i + 1], r = e[i + 2], s = e[i + 3], (n & 192) == 128 && (r & 192) == 128 && (s & 192) == 128 && (c = (t & 15) << 18 | (n & 63) << 12 | (r & 63) << 6 | s & 63, c > 65535 && c < 1114112 && (a = c));
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
a === null ? (a = 65533, o = 1) : a > 65535 && (a -= 65536, r.push(a >>> 10 & 1023 | 55296), a = 56320 | a & 1023), r.push(a), i += o;
|
|
499
|
+
}
|
|
500
|
+
return de(r);
|
|
501
|
+
}
|
|
502
|
+
let le = 4096;
|
|
503
|
+
function de(e) {
|
|
504
|
+
let t = e.length;
|
|
505
|
+
if (t <= le) return String.fromCharCode.apply(String, e);
|
|
506
|
+
let n = "", r = 0;
|
|
507
|
+
for (; r < t;) n += String.fromCharCode.apply(String, e.slice(r, r += le));
|
|
508
|
+
return n;
|
|
509
|
+
}
|
|
510
|
+
function fe(e, t, n) {
|
|
511
|
+
let r = "";
|
|
512
|
+
n = Math.min(e.length, n);
|
|
513
|
+
for (let i = t; i < n; ++i) r += String.fromCharCode(e[i] & 127);
|
|
514
|
+
return r;
|
|
515
|
+
}
|
|
516
|
+
function pe(e, t, n) {
|
|
517
|
+
let r = "";
|
|
518
|
+
n = Math.min(e.length, n);
|
|
519
|
+
for (let i = t; i < n; ++i) r += String.fromCharCode(e[i]);
|
|
520
|
+
return r;
|
|
521
|
+
}
|
|
522
|
+
function E(e, t, n) {
|
|
523
|
+
let r = e.length;
|
|
524
|
+
(!t || t < 0) && (t = 0), (!n || n < 0 || n > r) && (n = r);
|
|
525
|
+
let i = "";
|
|
526
|
+
for (let r = t; r < n; ++r) i += De[e[r]];
|
|
527
|
+
return i;
|
|
528
|
+
}
|
|
529
|
+
function me(e, t, n) {
|
|
530
|
+
let r = e.slice(t, n), i = "";
|
|
531
|
+
for (let e = 0; e < r.length - 1; e += 2) i += String.fromCharCode(r[e] + r[e + 1] * 256);
|
|
532
|
+
return i;
|
|
533
|
+
}
|
|
534
|
+
u.prototype.slice = function(e, t) {
|
|
535
|
+
let n = this.length;
|
|
536
|
+
e = ~~e, t = t === void 0 ? n : ~~t, e < 0 ? (e += n, e < 0 && (e = 0)) : e > n && (e = n), t < 0 ? (t += n, t < 0 && (t = 0)) : t > n && (t = n), t < e && (t = e);
|
|
537
|
+
let r = this.subarray(e, t);
|
|
538
|
+
return Object.setPrototypeOf(r, u.prototype), r;
|
|
539
|
+
};
|
|
540
|
+
function D(e, t, n) {
|
|
541
|
+
if (e % 1 != 0 || e < 0) throw RangeError("offset is not uint");
|
|
542
|
+
if (e + t > n) throw RangeError("Trying to access beyond buffer length");
|
|
543
|
+
}
|
|
544
|
+
u.prototype.readUintLE = u.prototype.readUIntLE = function(e, t, n) {
|
|
545
|
+
e >>>= 0, t >>>= 0, n || D(e, t, this.length);
|
|
546
|
+
let r = this[e], i = 1, a = 0;
|
|
547
|
+
for (; ++a < t && (i *= 256);) r += this[e + a] * i;
|
|
548
|
+
return r;
|
|
549
|
+
}, u.prototype.readUintBE = u.prototype.readUIntBE = function(e, t, n) {
|
|
550
|
+
e >>>= 0, t >>>= 0, n || D(e, t, this.length);
|
|
551
|
+
let r = this[e + --t], i = 1;
|
|
552
|
+
for (; t > 0 && (i *= 256);) r += this[e + --t] * i;
|
|
553
|
+
return r;
|
|
554
|
+
}, u.prototype.readUint8 = u.prototype.readUInt8 = function(e, t) {
|
|
555
|
+
return e >>>= 0, t || D(e, 1, this.length), this[e];
|
|
556
|
+
}, u.prototype.readUint16LE = u.prototype.readUInt16LE = function(e, t) {
|
|
557
|
+
return e >>>= 0, t || D(e, 2, this.length), this[e] | this[e + 1] << 8;
|
|
558
|
+
}, u.prototype.readUint16BE = u.prototype.readUInt16BE = function(e, t) {
|
|
559
|
+
return e >>>= 0, t || D(e, 2, this.length), this[e] << 8 | this[e + 1];
|
|
560
|
+
}, u.prototype.readUint32LE = u.prototype.readUInt32LE = function(e, t) {
|
|
561
|
+
return e >>>= 0, t || D(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
|
|
562
|
+
}, u.prototype.readUint32BE = u.prototype.readUInt32BE = function(e, t) {
|
|
563
|
+
return e >>>= 0, t || D(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
|
|
564
|
+
}, u.prototype.readBigUInt64LE = R(function(e) {
|
|
565
|
+
e >>>= 0, P(e, "offset");
|
|
566
|
+
let t = this[e], n = this[e + 7];
|
|
567
|
+
(t === void 0 || n === void 0) && F(e, this.length - 8);
|
|
568
|
+
let r = t + this[++e] * 256 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, i = this[++e] + this[++e] * 256 + this[++e] * 2 ** 16 + n * 2 ** 24;
|
|
569
|
+
return BigInt(r) + (BigInt(i) << BigInt(32));
|
|
570
|
+
}), u.prototype.readBigUInt64BE = R(function(e) {
|
|
571
|
+
e >>>= 0, P(e, "offset");
|
|
572
|
+
let t = this[e], n = this[e + 7];
|
|
573
|
+
(t === void 0 || n === void 0) && F(e, this.length - 8);
|
|
574
|
+
let r = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 256 + this[++e], i = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 256 + n;
|
|
575
|
+
return (BigInt(r) << BigInt(32)) + BigInt(i);
|
|
576
|
+
}), u.prototype.readIntLE = function(e, t, n) {
|
|
577
|
+
e >>>= 0, t >>>= 0, n || D(e, t, this.length);
|
|
578
|
+
let r = this[e], i = 1, a = 0;
|
|
579
|
+
for (; ++a < t && (i *= 256);) r += this[e + a] * i;
|
|
580
|
+
return i *= 128, r >= i && (r -= 2 ** (8 * t)), r;
|
|
581
|
+
}, u.prototype.readIntBE = function(e, t, n) {
|
|
582
|
+
e >>>= 0, t >>>= 0, n || D(e, t, this.length);
|
|
583
|
+
let r = t, i = 1, a = this[e + --r];
|
|
584
|
+
for (; r > 0 && (i *= 256);) a += this[e + --r] * i;
|
|
585
|
+
return i *= 128, a >= i && (a -= 2 ** (8 * t)), a;
|
|
586
|
+
}, u.prototype.readInt8 = function(e, t) {
|
|
587
|
+
return e >>>= 0, t || D(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
|
|
588
|
+
}, u.prototype.readInt16LE = function(e, t) {
|
|
589
|
+
e >>>= 0, t || D(e, 2, this.length);
|
|
590
|
+
let n = this[e] | this[e + 1] << 8;
|
|
591
|
+
return n & 32768 ? n | 4294901760 : n;
|
|
592
|
+
}, u.prototype.readInt16BE = function(e, t) {
|
|
593
|
+
e >>>= 0, t || D(e, 2, this.length);
|
|
594
|
+
let n = this[e + 1] | this[e] << 8;
|
|
595
|
+
return n & 32768 ? n | 4294901760 : n;
|
|
596
|
+
}, u.prototype.readInt32LE = function(e, t) {
|
|
597
|
+
return e >>>= 0, t || D(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
|
|
598
|
+
}, u.prototype.readInt32BE = function(e, t) {
|
|
599
|
+
return e >>>= 0, t || D(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
|
|
600
|
+
}, u.prototype.readBigInt64LE = R(function(e) {
|
|
601
|
+
e >>>= 0, P(e, "offset");
|
|
602
|
+
let t = this[e], n = this[e + 7];
|
|
603
|
+
(t === void 0 || n === void 0) && F(e, this.length - 8);
|
|
604
|
+
let r = this[e + 4] + this[e + 5] * 256 + this[e + 6] * 2 ** 16 + (n << 24);
|
|
605
|
+
return (BigInt(r) << BigInt(32)) + BigInt(t + this[++e] * 256 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24);
|
|
606
|
+
}), u.prototype.readBigInt64BE = R(function(e) {
|
|
607
|
+
e >>>= 0, P(e, "offset");
|
|
608
|
+
let t = this[e], n = this[e + 7];
|
|
609
|
+
(t === void 0 || n === void 0) && F(e, this.length - 8);
|
|
610
|
+
let r = (t << 24) + this[++e] * 2 ** 16 + this[++e] * 256 + this[++e];
|
|
611
|
+
return (BigInt(r) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 256 + n);
|
|
612
|
+
}), u.prototype.readFloatLE = function(e, t) {
|
|
613
|
+
return e >>>= 0, t || D(e, 4, this.length), n.read(this, e, !0, 23, 4);
|
|
614
|
+
}, u.prototype.readFloatBE = function(e, t) {
|
|
615
|
+
return e >>>= 0, t || D(e, 4, this.length), n.read(this, e, !1, 23, 4);
|
|
616
|
+
}, u.prototype.readDoubleLE = function(e, t) {
|
|
617
|
+
return e >>>= 0, t || D(e, 8, this.length), n.read(this, e, !0, 52, 8);
|
|
618
|
+
}, u.prototype.readDoubleBE = function(e, t) {
|
|
619
|
+
return e >>>= 0, t || D(e, 8, this.length), n.read(this, e, !1, 52, 8);
|
|
620
|
+
};
|
|
621
|
+
function O(e, t, n, r, i, a) {
|
|
622
|
+
if (!u.isBuffer(e)) throw TypeError("\"buffer\" argument must be a Buffer instance");
|
|
623
|
+
if (t > i || t < a) throw RangeError("\"value\" argument is out of bounds");
|
|
624
|
+
if (n + r > e.length) throw RangeError("Index out of range");
|
|
625
|
+
}
|
|
626
|
+
u.prototype.writeUintLE = u.prototype.writeUIntLE = function(e, t, n, r) {
|
|
627
|
+
if (e = +e, t >>>= 0, n >>>= 0, !r) {
|
|
628
|
+
let r = 2 ** (8 * n) - 1;
|
|
629
|
+
O(this, e, t, n, r, 0);
|
|
630
|
+
}
|
|
631
|
+
let i = 1, a = 0;
|
|
632
|
+
for (this[t] = e & 255; ++a < n && (i *= 256);) this[t + a] = e / i & 255;
|
|
633
|
+
return t + n;
|
|
634
|
+
}, u.prototype.writeUintBE = u.prototype.writeUIntBE = function(e, t, n, r) {
|
|
635
|
+
if (e = +e, t >>>= 0, n >>>= 0, !r) {
|
|
636
|
+
let r = 2 ** (8 * n) - 1;
|
|
637
|
+
O(this, e, t, n, r, 0);
|
|
638
|
+
}
|
|
639
|
+
let i = n - 1, a = 1;
|
|
640
|
+
for (this[t + i] = e & 255; --i >= 0 && (a *= 256);) this[t + i] = e / a & 255;
|
|
641
|
+
return t + n;
|
|
642
|
+
}, u.prototype.writeUint8 = u.prototype.writeUInt8 = function(e, t, n) {
|
|
643
|
+
return e = +e, t >>>= 0, n || O(this, e, t, 1, 255, 0), this[t] = e & 255, t + 1;
|
|
644
|
+
}, u.prototype.writeUint16LE = u.prototype.writeUInt16LE = function(e, t, n) {
|
|
645
|
+
return e = +e, t >>>= 0, n || O(this, e, t, 2, 65535, 0), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
|
|
646
|
+
}, u.prototype.writeUint16BE = u.prototype.writeUInt16BE = function(e, t, n) {
|
|
647
|
+
return e = +e, t >>>= 0, n || O(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
|
|
648
|
+
}, u.prototype.writeUint32LE = u.prototype.writeUInt32LE = function(e, t, n) {
|
|
649
|
+
return e = +e, t >>>= 0, n || O(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = e & 255, t + 4;
|
|
650
|
+
}, u.prototype.writeUint32BE = u.prototype.writeUInt32BE = function(e, t, n) {
|
|
651
|
+
return e = +e, t >>>= 0, n || O(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
652
|
+
};
|
|
653
|
+
function he(e, t, n, r, i) {
|
|
654
|
+
ye(t, r, i, e, n, 7);
|
|
655
|
+
let a = Number(t & BigInt(4294967295));
|
|
656
|
+
e[n++] = a, a >>= 8, e[n++] = a, a >>= 8, e[n++] = a, a >>= 8, e[n++] = a;
|
|
657
|
+
let o = Number(t >> BigInt(32) & BigInt(4294967295));
|
|
658
|
+
return e[n++] = o, o >>= 8, e[n++] = o, o >>= 8, e[n++] = o, o >>= 8, e[n++] = o, n;
|
|
659
|
+
}
|
|
660
|
+
function k(e, t, n, r, i) {
|
|
661
|
+
ye(t, r, i, e, n, 7);
|
|
662
|
+
let a = Number(t & BigInt(4294967295));
|
|
663
|
+
e[n + 7] = a, a >>= 8, e[n + 6] = a, a >>= 8, e[n + 5] = a, a >>= 8, e[n + 4] = a;
|
|
664
|
+
let o = Number(t >> BigInt(32) & BigInt(4294967295));
|
|
665
|
+
return e[n + 3] = o, o >>= 8, e[n + 2] = o, o >>= 8, e[n + 1] = o, o >>= 8, e[n] = o, n + 8;
|
|
666
|
+
}
|
|
667
|
+
u.prototype.writeBigUInt64LE = R(function(e, t = 0) {
|
|
668
|
+
return he(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
669
|
+
}), u.prototype.writeBigUInt64BE = R(function(e, t = 0) {
|
|
670
|
+
return k(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
671
|
+
}), u.prototype.writeIntLE = function(e, t, n, r) {
|
|
672
|
+
if (e = +e, t >>>= 0, !r) {
|
|
673
|
+
let r = 2 ** (8 * n - 1);
|
|
674
|
+
O(this, e, t, n, r - 1, -r);
|
|
675
|
+
}
|
|
676
|
+
let i = 0, a = 1, o = 0;
|
|
677
|
+
for (this[t] = e & 255; ++i < n && (a *= 256);) e < 0 && o === 0 && this[t + i - 1] !== 0 && (o = 1), this[t + i] = (e / a >> 0) - o & 255;
|
|
678
|
+
return t + n;
|
|
679
|
+
}, u.prototype.writeIntBE = function(e, t, n, r) {
|
|
680
|
+
if (e = +e, t >>>= 0, !r) {
|
|
681
|
+
let r = 2 ** (8 * n - 1);
|
|
682
|
+
O(this, e, t, n, r - 1, -r);
|
|
683
|
+
}
|
|
684
|
+
let i = n - 1, a = 1, o = 0;
|
|
685
|
+
for (this[t + i] = e & 255; --i >= 0 && (a *= 256);) e < 0 && o === 0 && this[t + i + 1] !== 0 && (o = 1), this[t + i] = (e / a >> 0) - o & 255;
|
|
686
|
+
return t + n;
|
|
687
|
+
}, u.prototype.writeInt8 = function(e, t, n) {
|
|
688
|
+
return e = +e, t >>>= 0, n || O(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = e & 255, t + 1;
|
|
689
|
+
}, u.prototype.writeInt16LE = function(e, t, n) {
|
|
690
|
+
return e = +e, t >>>= 0, n || O(this, e, t, 2, 32767, -32768), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
|
|
691
|
+
}, u.prototype.writeInt16BE = function(e, t, n) {
|
|
692
|
+
return e = +e, t >>>= 0, n || O(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
|
|
693
|
+
}, u.prototype.writeInt32LE = function(e, t, n) {
|
|
694
|
+
return e = +e, t >>>= 0, n || O(this, e, t, 4, 2147483647, -2147483648), this[t] = e & 255, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4;
|
|
695
|
+
}, u.prototype.writeInt32BE = function(e, t, n) {
|
|
696
|
+
return e = +e, t >>>= 0, n || O(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
697
|
+
}, u.prototype.writeBigInt64LE = R(function(e, t = 0) {
|
|
698
|
+
return he(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
699
|
+
}), u.prototype.writeBigInt64BE = R(function(e, t = 0) {
|
|
700
|
+
return k(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
701
|
+
});
|
|
702
|
+
function ge(e, t, n, r, i, a) {
|
|
703
|
+
if (n + r > e.length || n < 0) throw RangeError("Index out of range");
|
|
704
|
+
}
|
|
705
|
+
function A(e, t, r, i, a) {
|
|
706
|
+
return t = +t, r >>>= 0, a || ge(e, t, r, 4), n.write(e, t, r, i, 23, 4), r + 4;
|
|
707
|
+
}
|
|
708
|
+
u.prototype.writeFloatLE = function(e, t, n) {
|
|
709
|
+
return A(this, e, t, !0, n);
|
|
710
|
+
}, u.prototype.writeFloatBE = function(e, t, n) {
|
|
711
|
+
return A(this, e, t, !1, n);
|
|
712
|
+
};
|
|
713
|
+
function j(e, t, r, i, a) {
|
|
714
|
+
return t = +t, r >>>= 0, a || ge(e, t, r, 8), n.write(e, t, r, i, 52, 8), r + 8;
|
|
715
|
+
}
|
|
716
|
+
u.prototype.writeDoubleLE = function(e, t, n) {
|
|
717
|
+
return j(this, e, t, !0, n);
|
|
718
|
+
}, u.prototype.writeDoubleBE = function(e, t, n) {
|
|
719
|
+
return j(this, e, t, !1, n);
|
|
720
|
+
}, u.prototype.copy = function(e, t, n, r) {
|
|
721
|
+
if (!u.isBuffer(e)) throw TypeError("argument should be a Buffer");
|
|
722
|
+
if (n ||= 0, !r && r !== 0 && (r = this.length), t >= e.length && (t = e.length), t ||= 0, r > 0 && r < n && (r = n), r === n || e.length === 0 || this.length === 0) return 0;
|
|
723
|
+
if (t < 0) throw RangeError("targetStart out of bounds");
|
|
724
|
+
if (n < 0 || n >= this.length) throw RangeError("Index out of range");
|
|
725
|
+
if (r < 0) throw RangeError("sourceEnd out of bounds");
|
|
726
|
+
r > this.length && (r = this.length), e.length - t < r - n && (r = e.length - t + n);
|
|
727
|
+
let i = r - n;
|
|
728
|
+
return this === e && typeof a.prototype.copyWithin == "function" ? this.copyWithin(t, n, r) : a.prototype.set.call(e, this.subarray(n, r), t), i;
|
|
729
|
+
}, u.prototype.fill = function(e, t, n, r) {
|
|
730
|
+
if (typeof e == "string") {
|
|
731
|
+
if (typeof t == "string" ? (r = t, t = 0, n = this.length) : typeof n == "string" && (r = n, n = this.length), r !== void 0 && typeof r != "string") throw TypeError("encoding must be a string");
|
|
732
|
+
if (typeof r == "string" && !u.isEncoding(r)) throw TypeError("Unknown encoding: " + r);
|
|
733
|
+
if (e.length === 1) {
|
|
734
|
+
let t = e.charCodeAt(0);
|
|
735
|
+
(r === "utf8" && t < 128 || r === "latin1") && (e = t);
|
|
736
|
+
}
|
|
737
|
+
} else typeof e == "number" ? e &= 255 : typeof e == "boolean" && (e = Number(e));
|
|
738
|
+
if (t < 0 || this.length < t || this.length < n) throw RangeError("Out of range index");
|
|
739
|
+
if (n <= t) return this;
|
|
740
|
+
t >>>= 0, n = n === void 0 ? this.length : n >>> 0, e ||= 0;
|
|
741
|
+
let i;
|
|
742
|
+
if (typeof e == "number") for (i = t; i < n; ++i) this[i] = e;
|
|
743
|
+
else {
|
|
744
|
+
let a = u.isBuffer(e) ? e : u.from(e, r), o = a.length;
|
|
745
|
+
if (o === 0) throw TypeError("The value \"" + e + "\" is invalid for argument \"value\"");
|
|
746
|
+
for (i = 0; i < n - t; ++i) this[i + t] = a[i % o];
|
|
747
|
+
}
|
|
748
|
+
return this;
|
|
749
|
+
};
|
|
750
|
+
let M = {};
|
|
751
|
+
function N(e, t, n) {
|
|
752
|
+
M[e] = class extends n {
|
|
753
|
+
constructor() {
|
|
754
|
+
super(), Object.defineProperty(this, "message", {
|
|
755
|
+
value: t.apply(this, arguments),
|
|
756
|
+
writable: !0,
|
|
757
|
+
configurable: !0
|
|
758
|
+
}), this.name = `${this.name} [${e}]`, this.stack, delete this.name;
|
|
759
|
+
}
|
|
760
|
+
get code() {
|
|
761
|
+
return e;
|
|
762
|
+
}
|
|
763
|
+
set code(e) {
|
|
764
|
+
Object.defineProperty(this, "code", {
|
|
765
|
+
configurable: !0,
|
|
766
|
+
enumerable: !0,
|
|
767
|
+
value: e,
|
|
768
|
+
writable: !0
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
toString() {
|
|
772
|
+
return `${this.name} [${e}]: ${this.message}`;
|
|
773
|
+
}
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
N("ERR_BUFFER_OUT_OF_BOUNDS", function(e) {
|
|
777
|
+
return e ? `${e} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
778
|
+
}, RangeError), N("ERR_INVALID_ARG_TYPE", function(e, t) {
|
|
779
|
+
return `The "${e}" argument must be of type number. Received type ${typeof t}`;
|
|
780
|
+
}, TypeError), N("ERR_OUT_OF_RANGE", function(e, t, n) {
|
|
781
|
+
let r = `The value of "${e}" is out of range.`, i = n;
|
|
782
|
+
return Number.isInteger(n) && Math.abs(n) > 2 ** 32 ? i = _e(String(n)) : typeof n == "bigint" && (i = String(n), (n > BigInt(2) ** BigInt(32) || n < -(BigInt(2) ** BigInt(32))) && (i = _e(i)), i += "n"), r += ` It must be ${t}. Received ${i}`, r;
|
|
783
|
+
}, RangeError);
|
|
784
|
+
function _e(e) {
|
|
785
|
+
let t = "", n = e.length, r = +(e[0] === "-");
|
|
786
|
+
for (; n >= r + 4; n -= 3) t = `_${e.slice(n - 3, n)}${t}`;
|
|
787
|
+
return `${e.slice(0, n)}${t}`;
|
|
788
|
+
}
|
|
789
|
+
function ve(e, t, n) {
|
|
790
|
+
P(t, "offset"), (e[t] === void 0 || e[t + n] === void 0) && F(t, e.length - (n + 1));
|
|
791
|
+
}
|
|
792
|
+
function ye(e, t, n, r, i, a) {
|
|
793
|
+
if (e > n || e < t) {
|
|
794
|
+
let r = typeof t == "bigint" ? "n" : "", i;
|
|
795
|
+
throw i = a > 3 ? t === 0 || t === BigInt(0) ? `>= 0${r} and < 2${r} ** ${(a + 1) * 8}${r}` : `>= -(2${r} ** ${(a + 1) * 8 - 1}${r}) and < 2 ** ${(a + 1) * 8 - 1}${r}` : `>= ${t}${r} and <= ${n}${r}`, new M.ERR_OUT_OF_RANGE("value", i, e);
|
|
796
|
+
}
|
|
797
|
+
ve(r, i, a);
|
|
798
|
+
}
|
|
799
|
+
function P(e, t) {
|
|
800
|
+
if (typeof e != "number") throw new M.ERR_INVALID_ARG_TYPE(t, "number", e);
|
|
801
|
+
}
|
|
802
|
+
function F(e, t, n) {
|
|
803
|
+
throw Math.floor(e) === e ? t < 0 ? new M.ERR_BUFFER_OUT_OF_BOUNDS() : new M.ERR_OUT_OF_RANGE(n || "offset", `>= ${+!!n} and <= ${t}`, e) : (P(e, n), new M.ERR_OUT_OF_RANGE(n || "offset", "an integer", e));
|
|
804
|
+
}
|
|
805
|
+
let be = /[^+/0-9A-Za-z-_]/g;
|
|
806
|
+
function xe(e) {
|
|
807
|
+
if (e = e.split("=")[0], e = e.trim().replace(be, ""), e.length < 2) return "";
|
|
808
|
+
for (; e.length % 4 != 0;) e += "=";
|
|
809
|
+
return e;
|
|
810
|
+
}
|
|
811
|
+
function Se(e, t) {
|
|
812
|
+
t ||= Infinity;
|
|
813
|
+
let n, r = e.length, i = null, a = [];
|
|
814
|
+
for (let o = 0; o < r; ++o) {
|
|
815
|
+
if (n = e.charCodeAt(o), n > 55295 && n < 57344) {
|
|
816
|
+
if (!i) {
|
|
817
|
+
if (n > 56319) {
|
|
818
|
+
(t -= 3) > -1 && a.push(239, 191, 189);
|
|
819
|
+
continue;
|
|
820
|
+
}
|
|
821
|
+
if (o + 1 === r) {
|
|
822
|
+
(t -= 3) > -1 && a.push(239, 191, 189);
|
|
823
|
+
continue;
|
|
824
|
+
}
|
|
825
|
+
i = n;
|
|
826
|
+
continue;
|
|
827
|
+
}
|
|
828
|
+
if (n < 56320) {
|
|
829
|
+
(t -= 3) > -1 && a.push(239, 191, 189), i = n;
|
|
830
|
+
continue;
|
|
831
|
+
}
|
|
832
|
+
n = (i - 55296 << 10 | n - 56320) + 65536;
|
|
833
|
+
} else i && (t -= 3) > -1 && a.push(239, 191, 189);
|
|
834
|
+
if (i = null, n < 128) {
|
|
835
|
+
if (--t < 0) break;
|
|
836
|
+
a.push(n);
|
|
837
|
+
} else if (n < 2048) {
|
|
838
|
+
if ((t -= 2) < 0) break;
|
|
839
|
+
a.push(n >> 6 | 192, n & 63 | 128);
|
|
840
|
+
} else if (n < 65536) {
|
|
841
|
+
if ((t -= 3) < 0) break;
|
|
842
|
+
a.push(n >> 12 | 224, n >> 6 & 63 | 128, n & 63 | 128);
|
|
843
|
+
} else if (n < 1114112) {
|
|
844
|
+
if ((t -= 4) < 0) break;
|
|
845
|
+
a.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, n & 63 | 128);
|
|
846
|
+
} else throw Error("Invalid code point");
|
|
847
|
+
}
|
|
848
|
+
return a;
|
|
849
|
+
}
|
|
850
|
+
function I(e) {
|
|
851
|
+
let t = [];
|
|
852
|
+
for (let n = 0; n < e.length; ++n) t.push(e.charCodeAt(n) & 255);
|
|
853
|
+
return t;
|
|
854
|
+
}
|
|
855
|
+
function Ce(e, t) {
|
|
856
|
+
let n, r, i, a = [];
|
|
857
|
+
for (let o = 0; o < e.length && !((t -= 2) < 0); ++o) n = e.charCodeAt(o), r = n >> 8, i = n % 256, a.push(i), a.push(r);
|
|
858
|
+
return a;
|
|
859
|
+
}
|
|
860
|
+
function we(e) {
|
|
861
|
+
return t.toByteArray(xe(e));
|
|
862
|
+
}
|
|
863
|
+
function Te(e, t, n, r) {
|
|
864
|
+
let i = 0;
|
|
865
|
+
for (; i < r && !(i + n >= t.length || i >= e.length); ++i) t[i + n] = e[i];
|
|
866
|
+
return i;
|
|
867
|
+
}
|
|
868
|
+
function L(e, t) {
|
|
869
|
+
return e instanceof t || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name;
|
|
870
|
+
}
|
|
871
|
+
function Ee(e) {
|
|
872
|
+
return e !== e;
|
|
873
|
+
}
|
|
874
|
+
let De = (function() {
|
|
875
|
+
let e = "0123456789abcdef", t = Array(256);
|
|
876
|
+
for (let n = 0; n < 16; ++n) {
|
|
877
|
+
let r = n * 16;
|
|
878
|
+
for (let i = 0; i < 16; ++i) t[r + i] = e[n] + e[i];
|
|
879
|
+
}
|
|
880
|
+
return t;
|
|
881
|
+
})();
|
|
882
|
+
function R(e) {
|
|
883
|
+
return typeof BigInt > "u" ? Oe : e;
|
|
884
|
+
}
|
|
885
|
+
function Oe() {
|
|
886
|
+
throw Error("BigInt not supported");
|
|
887
|
+
}
|
|
888
|
+
})(y);
|
|
889
|
+
var de = y.Buffer;
|
|
890
|
+
y.Blob, y.BlobOptions, y.Buffer, y.File, y.FileOptions, y.INSPECT_MAX_BYTES, y.SlowBuffer, y.TranscodeEncoding, y.atob, y.btoa, y.constants, y.isAscii, y.isUtf8, y.kMaxLength, y.kStringMaxLength, y.resolveObjectURL, y.transcode;
|
|
891
|
+
//#endregion
|
|
892
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/utils.js
|
|
893
|
+
function fe(e) {
|
|
894
|
+
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in e && e.BYTES_PER_ELEMENT === 1;
|
|
107
895
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (
|
|
111
|
-
if (e
|
|
896
|
+
var pe = (e) => e ? `"${e}" ` : "";
|
|
897
|
+
function E(e, t = "") {
|
|
898
|
+
if (typeof e != "number") throw TypeError(pe(t) + "expected number, got " + typeof e);
|
|
899
|
+
if (!Number.isSafeInteger(e) || e < 0) throw RangeError(pe(t) + "expected integer >= 0, got " + e);
|
|
900
|
+
return e;
|
|
112
901
|
}
|
|
113
|
-
function
|
|
114
|
-
if (e
|
|
115
|
-
|
|
902
|
+
function me(e, t, n = "") {
|
|
903
|
+
if (fe(e) && (t === void 0 || e.length === t)) return e;
|
|
904
|
+
t !== void 0 && E(t, "length");
|
|
905
|
+
let r = fe(e), i = t === void 0 ? "" : ` of length ${t}`, a = r ? `length=${e.length}` : `type=${typeof e}`, o = pe(n) + "expected Uint8Array" + i + ", got " + a;
|
|
906
|
+
throw r ? RangeError(o) : TypeError(o);
|
|
907
|
+
}
|
|
908
|
+
function D(e) {
|
|
909
|
+
if (typeof e != "function" || typeof e.create != "function") throw TypeError("expected hash wrapped by utils.createHasher");
|
|
910
|
+
if (E(e.outputLen), E(e.blockLen), e.outputLen < 1 || e.blockLen < 1) throw Error("hash blockLen / outputLen must be >= 1");
|
|
911
|
+
}
|
|
912
|
+
var O = (e, t) => {
|
|
913
|
+
if (typeof e != "object" || !e || Array.isArray(e)) throw TypeError((t === "object" ? "" : `"${t}" `) + "expected object, got type=" + typeof e);
|
|
914
|
+
}, he = (e, t) => {
|
|
915
|
+
O(e, t);
|
|
916
|
+
let n = Object.getPrototypeOf(e);
|
|
917
|
+
if (n !== Object.prototype && n !== null) throw TypeError(`"${t}" expected plain object`);
|
|
918
|
+
if (Object.hasOwn(e, "__proto__")) throw TypeError(`"${t}.__proto__" is not allowed`);
|
|
919
|
+
};
|
|
920
|
+
function k(e, t = !0) {
|
|
921
|
+
if (e.destroyed) throw Error("hash was destroyed");
|
|
922
|
+
if (t && e.finished) throw Error("digest() was already called");
|
|
116
923
|
}
|
|
117
|
-
function
|
|
118
|
-
|
|
924
|
+
function ge(e, t) {
|
|
925
|
+
me(e, void 0, "output");
|
|
119
926
|
let n = t.outputLen;
|
|
120
|
-
if (e.length
|
|
927
|
+
if (!(e.length >= n)) throw RangeError("\"output\" expected length >= " + n);
|
|
121
928
|
}
|
|
122
|
-
function
|
|
929
|
+
function A(...e) {
|
|
123
930
|
for (let t = 0; t < e.length; t++) e[t].fill(0);
|
|
124
931
|
}
|
|
125
|
-
function
|
|
932
|
+
function j(e) {
|
|
126
933
|
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
127
934
|
}
|
|
128
|
-
function
|
|
935
|
+
function M(e) {
|
|
129
936
|
if (typeof e != "string") throw TypeError("string expected");
|
|
130
|
-
|
|
937
|
+
let t = new TextEncoder().encode(e);
|
|
938
|
+
try {
|
|
939
|
+
return new Uint8Array(t);
|
|
940
|
+
} finally {
|
|
941
|
+
A(t);
|
|
942
|
+
}
|
|
131
943
|
}
|
|
132
|
-
function
|
|
133
|
-
return typeof e == "string" ?
|
|
944
|
+
function N(e, t = "") {
|
|
945
|
+
return typeof e == "string" ? M(e) : me(e, void 0, t);
|
|
134
946
|
}
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
-
return Object.assign(e, t);
|
|
947
|
+
function _e(e, t, n = "opts") {
|
|
948
|
+
return he(e, "defaults"), t !== void 0 && he(t, n), Object.assign(Object.create(null), e, t);
|
|
138
949
|
}
|
|
139
|
-
function
|
|
950
|
+
function ve(e, t = {}) {
|
|
951
|
+
if (typeof e != "function") throw TypeError("\"hashCons\" expected function, got type=" + typeof e);
|
|
952
|
+
t = _e({}, t, "info");
|
|
140
953
|
let n = (t, n) => e(n).update(t).digest(), r = e(void 0);
|
|
141
954
|
return n.outputLen = r.outputLen, n.blockLen = r.blockLen, n.canXOF = r.canXOF, n.create = (t) => e(t), Object.assign(n, t), Object.freeze(n);
|
|
142
955
|
}
|
|
143
|
-
var
|
|
956
|
+
var ye = (e) => ({ oid: Uint8Array.from([
|
|
144
957
|
6,
|
|
145
958
|
9,
|
|
146
959
|
96,
|
|
@@ -152,7 +965,7 @@ var le = (e) => ({ oid: Uint8Array.from([
|
|
|
152
965
|
4,
|
|
153
966
|
2,
|
|
154
967
|
e
|
|
155
|
-
]) }),
|
|
968
|
+
]) }), P = class {
|
|
156
969
|
oHash;
|
|
157
970
|
iHash;
|
|
158
971
|
blockLen;
|
|
@@ -161,20 +974,20 @@ var le = (e) => ({ oid: Uint8Array.from([
|
|
|
161
974
|
finished = !1;
|
|
162
975
|
destroyed = !1;
|
|
163
976
|
constructor(e, t) {
|
|
164
|
-
if (
|
|
977
|
+
if (D(e), me(t, void 0, "key"), this.iHash = e.create(), typeof this.iHash.update != "function") throw Error("expected Hash instance");
|
|
165
978
|
this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
|
|
166
979
|
let n = this.blockLen, r = new Uint8Array(n);
|
|
167
980
|
r.set(t.length > n ? e.create().update(t).digest() : t);
|
|
168
981
|
for (let e = 0; e < r.length; e++) r[e] ^= 54;
|
|
169
982
|
this.iHash.update(r), this.oHash = e.create();
|
|
170
983
|
for (let e = 0; e < r.length; e++) r[e] ^= 106;
|
|
171
|
-
this.oHash.update(r),
|
|
984
|
+
this.oHash.update(r), A(r);
|
|
172
985
|
}
|
|
173
986
|
update(e) {
|
|
174
|
-
return
|
|
987
|
+
return k(this), this.iHash.update(e), this;
|
|
175
988
|
}
|
|
176
989
|
digestInto(e) {
|
|
177
|
-
|
|
990
|
+
k(this), ge(e, this), this.finished = !0;
|
|
178
991
|
let t = e.subarray(0, this.outputLen);
|
|
179
992
|
this.iHash.digestInto(t), this.oHash.update(t), this.oHash.digestInto(t), this.destroy();
|
|
180
993
|
}
|
|
@@ -184,8 +997,8 @@ var le = (e) => ({ oid: Uint8Array.from([
|
|
|
184
997
|
}
|
|
185
998
|
_cloneInto(e) {
|
|
186
999
|
e ||= Object.create(Object.getPrototypeOf(this), {});
|
|
187
|
-
let { oHash: t, iHash: n, finished: r, destroyed: i, blockLen: a, outputLen: o } = this;
|
|
188
|
-
return e = e, e.finished = r, e.destroyed = i, e.blockLen = a, e.outputLen = o, e.oHash = t._cloneInto(e.oHash), e.iHash = n._cloneInto(e.iHash), e;
|
|
1000
|
+
let { oHash: t, iHash: n, finished: r, destroyed: i, blockLen: a, outputLen: o, canXOF: s } = this;
|
|
1001
|
+
return e = e, e.finished = r, e.destroyed = i, e.blockLen = a, e.outputLen = o, e.canXOF = s, e.oHash = t._cloneInto(e.oHash), e.iHash = n._cloneInto(e.iHash), e;
|
|
189
1002
|
}
|
|
190
1003
|
clone() {
|
|
191
1004
|
return this._cloneInto();
|
|
@@ -193,49 +1006,98 @@ var le = (e) => ({ oid: Uint8Array.from([
|
|
|
193
1006
|
destroy() {
|
|
194
1007
|
this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
|
|
195
1008
|
}
|
|
196
|
-
},
|
|
197
|
-
let e = ((e, t, n) => new
|
|
198
|
-
return e.create = (e, t) => new
|
|
1009
|
+
}, F = /* @__PURE__ */ (() => {
|
|
1010
|
+
let e = ((e, t, n) => new P(e, t).update(n).digest());
|
|
1011
|
+
return e.create = (e, t) => new P(e, t), e;
|
|
199
1012
|
})();
|
|
200
1013
|
//#endregion
|
|
201
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
202
|
-
function
|
|
203
|
-
|
|
204
|
-
let { c: i, dkLen: a, asyncTick: o } =
|
|
1014
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/pbkdf2.js
|
|
1015
|
+
function be(e, t, n, r) {
|
|
1016
|
+
D(e);
|
|
1017
|
+
let { c: i, dkLen: a, asyncTick: o } = _e({
|
|
205
1018
|
dkLen: 32,
|
|
206
1019
|
asyncTick: 10
|
|
207
1020
|
}, r);
|
|
208
|
-
if (
|
|
1021
|
+
if (E(i, "c"), E(a, "dkLen"), E(o, "asyncTick"), i < 1) throw Error("\"c\" (iterations) must be >= 1");
|
|
209
1022
|
if (a < 1) throw Error("\"dkLen\" must be >= 1");
|
|
210
1023
|
if (a > (2 ** 32 - 1) * e.outputLen) throw Error("derived key too long");
|
|
211
|
-
let s =
|
|
1024
|
+
let s = N(t, "password");
|
|
1025
|
+
try {
|
|
1026
|
+
let t = N(n, "salt");
|
|
1027
|
+
try {
|
|
1028
|
+
let n = new Uint8Array(a), { iHash: r, oHash: c, outputLen: l } = F.create(e, s);
|
|
1029
|
+
return {
|
|
1030
|
+
c: i,
|
|
1031
|
+
dkLen: a,
|
|
1032
|
+
asyncTick: o,
|
|
1033
|
+
DK: n,
|
|
1034
|
+
outputLen: l,
|
|
1035
|
+
eng: xe(r, c, t, new Uint8Array(l))
|
|
1036
|
+
};
|
|
1037
|
+
} finally {
|
|
1038
|
+
typeof n == "string" && A(t);
|
|
1039
|
+
}
|
|
1040
|
+
} finally {
|
|
1041
|
+
typeof t == "string" && A(s);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
function xe(e, t, n, r) {
|
|
1045
|
+
let i = /* @__PURE__ */ new Uint8Array(4), a = j(i), o = e._cloneInto().update(n), s = t._cloneInto(), c = e._cloneInto, l = t._cloneInto;
|
|
212
1046
|
return {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
1047
|
+
u1: (e, n) => {
|
|
1048
|
+
a.setInt32(0, e, !1), o._cloneInto(s).update(i).digestInto(r), t._cloneInto(s).update(r).digestInto(r), n.set(r.subarray(0, n.length));
|
|
1049
|
+
},
|
|
1050
|
+
rounds: (n, i) => {
|
|
1051
|
+
for (let a = 1; a < n; a++) {
|
|
1052
|
+
c.call(e, s).update(r).digestInto(r), l.call(t, s).update(r).digestInto(r);
|
|
1053
|
+
for (let e = 0; e < i.length; e++) i[e] ^= r[e];
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
output: (n) => (e.destroy(), t.destroy(), o.destroy(), s.destroy(), A(r), n)
|
|
219
1057
|
};
|
|
220
1058
|
}
|
|
221
|
-
function
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
for (let e = 1, t = 0; t < a; e++, t += s.outputLen) {
|
|
227
|
-
let n = o.subarray(t, t + s.outputLen);
|
|
228
|
-
d.setInt32(0, e, !1), (l = c._cloneInto(l)).update(u).digestInto(f), n.set(f.subarray(0, n.length));
|
|
229
|
-
for (let e = 1; e < i; e++) {
|
|
230
|
-
s._cloneInto(l).update(f).digestInto(f);
|
|
231
|
-
for (let e = 0; e < n.length; e++) n[e] ^= f[e];
|
|
232
|
-
}
|
|
1059
|
+
function Se(e, t, n, r) {
|
|
1060
|
+
let { c: i, dkLen: a, DK: o, outputLen: s, eng: c } = be(e, t, n, r);
|
|
1061
|
+
for (let e = 1, t = 0; t < a; e++, t += s) {
|
|
1062
|
+
let n = o.subarray(t, t + s);
|
|
1063
|
+
c.u1(e, n), c.rounds(i, n);
|
|
233
1064
|
}
|
|
234
|
-
return
|
|
1065
|
+
return c.output(o);
|
|
235
1066
|
}
|
|
236
1067
|
//#endregion
|
|
237
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
238
|
-
var
|
|
1068
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/_u64.js
|
|
1069
|
+
var I = /* @__PURE__ */ BigInt(2 ** 32 - 1), Ce = /* @__PURE__ */ BigInt(32);
|
|
1070
|
+
function we(e, t = !1) {
|
|
1071
|
+
return t ? {
|
|
1072
|
+
h: Number(e & I),
|
|
1073
|
+
l: Number(e >> Ce & I)
|
|
1074
|
+
} : {
|
|
1075
|
+
h: Number(e >> Ce & I) | 0,
|
|
1076
|
+
l: Number(e & I) | 0
|
|
1077
|
+
};
|
|
1078
|
+
}
|
|
1079
|
+
function Te(e, t = !1) {
|
|
1080
|
+
let n = e.length, r = new Uint32Array(n), i = new Uint32Array(n);
|
|
1081
|
+
for (let a = 0; a < n; a++) {
|
|
1082
|
+
let { h: n, l: o } = we(e[a], t);
|
|
1083
|
+
[r[a], i[a]] = [n, o];
|
|
1084
|
+
}
|
|
1085
|
+
return [r, i];
|
|
1086
|
+
}
|
|
1087
|
+
var L = (e) => e / 2 ** 32 | 0, Ee = (e) => e >>> 0;
|
|
1088
|
+
function De(e, t, n, r) {
|
|
1089
|
+
let i = L(n), a = Ee(n);
|
|
1090
|
+
e.setUint32(t, r ? a : i, r), e.setUint32(t + 4, r ? i : a, r);
|
|
1091
|
+
}
|
|
1092
|
+
var R = (e, t, n) => e >>> n, Oe = (e, t, n) => e << 32 - n | t >>> n, z = (e, t, n) => e >>> n | t << 32 - n, B = (e, t, n) => e << 32 - n | t >>> n, ke = (e, t, n) => e << 64 - n | t >>> n - 32, Ae = (e, t, n) => e >>> n - 32 | t << 64 - n;
|
|
1093
|
+
function V(e, t, n, r) {
|
|
1094
|
+
let i = (t >>> 0) + (r >>> 0);
|
|
1095
|
+
return {
|
|
1096
|
+
h: e + n + (i / 2 ** 32 | 0) | 0,
|
|
1097
|
+
l: i | 0
|
|
1098
|
+
};
|
|
1099
|
+
}
|
|
1100
|
+
var je = (e, t, n) => (e >>> 0) + (t >>> 0) + (n >>> 0), Me = (e, t, n, r) => t + n + r + (e / 2 ** 32 | 0) | 0, Ne = (e, t, n, r) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0), Pe = (e, t, n, r, i) => t + n + r + i + (e / 2 ** 32 | 0) | 0, Fe = (e, t, n, r, i) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0) + (i >>> 0), Ie = (e, t, n, r, i, a) => t + n + r + i + a + (e / 2 ** 32 | 0) | 0, Le = class {
|
|
239
1101
|
blockLen;
|
|
240
1102
|
outputLen;
|
|
241
1103
|
canXOF = !1;
|
|
@@ -248,32 +1110,29 @@ var he = class {
|
|
|
248
1110
|
pos = 0;
|
|
249
1111
|
destroyed = !1;
|
|
250
1112
|
constructor(e, t, n, r) {
|
|
251
|
-
this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = r, this.buffer = new Uint8Array(e), this.view =
|
|
1113
|
+
this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = r, this.buffer = new Uint8Array(e), this.view = j(this.buffer);
|
|
252
1114
|
}
|
|
253
1115
|
update(e) {
|
|
254
|
-
|
|
255
|
-
let { view: t, buffer: n, blockLen: r } = this, i = e.length;
|
|
256
|
-
for (let
|
|
257
|
-
let
|
|
258
|
-
if (
|
|
259
|
-
let t =
|
|
260
|
-
for (; r <= i -
|
|
1116
|
+
k(this), me(e);
|
|
1117
|
+
let { view: t, buffer: n, blockLen: r } = this, i = e.length, a = !1;
|
|
1118
|
+
for (let o = 0; o < i;) {
|
|
1119
|
+
let s = Math.min(r - this.pos, i - o);
|
|
1120
|
+
if (s === r) {
|
|
1121
|
+
let t = j(e);
|
|
1122
|
+
for (; r <= i - o; o += r) this.process(t, o);
|
|
1123
|
+
a = !0;
|
|
261
1124
|
continue;
|
|
262
1125
|
}
|
|
263
|
-
n.set(e.subarray(
|
|
1126
|
+
n.set(o === 0 && s === i ? e : e.subarray(o, o + s), this.pos), this.pos += s, o += s, this.pos === r && (this.process(t, 0), this.pos = 0, a = !0);
|
|
264
1127
|
}
|
|
265
|
-
return this.length += e.length, this.roundClean(), this;
|
|
1128
|
+
return this.length += e.length, a && this.roundClean(), this;
|
|
266
1129
|
}
|
|
267
1130
|
digestInto(e) {
|
|
268
|
-
|
|
1131
|
+
k(this), ge(e, this), this.finished = !0;
|
|
269
1132
|
let { buffer: t, view: n, blockLen: r, isLE: i } = this, { pos: a } = this;
|
|
270
|
-
t[a++] = 128,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
let o = w(e), s = this.outputLen;
|
|
274
|
-
if (s % 4) throw Error("_sha2: outputLen must be aligned to 32bit");
|
|
275
|
-
let c = s / 4, l = this.get();
|
|
276
|
-
if (c > l.length) throw Error("_sha2: outputLen bigger than state");
|
|
1133
|
+
t[a++] = 128, t.fill(0, a), this.padOffset > r - a && (this.process(n, 0), t.fill(0)), De(n, r - 8, this.length * 8, i), this.process(n, 0), this.roundClean();
|
|
1134
|
+
let o = e === t ? n : j(e), s = this.outputLen, c = s / 4, l = this.get();
|
|
1135
|
+
if (s % 4 || c > l.length) throw Error("invalid outputLen");
|
|
277
1136
|
for (let e = 0; e < c; e++) o.setUint32(4 * e, l[e], i);
|
|
278
1137
|
}
|
|
279
1138
|
digest() {
|
|
@@ -282,15 +1141,14 @@ var he = class {
|
|
|
282
1141
|
let n = e.slice(0, t);
|
|
283
1142
|
return this.destroy(), n;
|
|
284
1143
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
return e.destroyed = a, e.finished = i, e.length = r, e.pos = o, r % t && e.buffer.set(n), e;
|
|
1144
|
+
_cloneIntoMeta(e) {
|
|
1145
|
+
let { buffer: t, length: n, finished: r, destroyed: i, pos: a } = this;
|
|
1146
|
+
return e.destroyed = i, e.finished = r, e.length = n, e.pos = a, a && e.buffer.set(t), e;
|
|
289
1147
|
}
|
|
290
1148
|
clone() {
|
|
291
1149
|
return this._cloneInto();
|
|
292
1150
|
}
|
|
293
|
-
},
|
|
1151
|
+
}, Re = /* @__PURE__ */ Uint32Array.from([
|
|
294
1152
|
1779033703,
|
|
295
1153
|
4089235720,
|
|
296
1154
|
3144134277,
|
|
@@ -307,35 +1165,25 @@ var he = class {
|
|
|
307
1165
|
4215389547,
|
|
308
1166
|
1541459225,
|
|
309
1167
|
327033209
|
|
310
|
-
]),
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
function j(e, t, n, r) {
|
|
330
|
-
let i = (t >>> 0) + (r >>> 0);
|
|
331
|
-
return {
|
|
332
|
-
h: e + n + (i / 2 ** 32 | 0) | 0,
|
|
333
|
-
l: i | 0
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
var xe = (e, t, n) => (e >>> 0) + (t >>> 0) + (n >>> 0), Se = (e, t, n, r) => t + n + r + (e / 2 ** 32 | 0) | 0, Ce = (e, t, n, r) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0), we = (e, t, n, r, i) => t + n + r + i + (e / 2 ** 32 | 0) | 0, Te = (e, t, n, r, i) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0) + (i >>> 0), Ee = (e, t, n, r, i, a) => t + n + r + i + a + (e / 2 ** 32 | 0) | 0, De = /* @__PURE__ */ ve((/* @__PURE__ */ "0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817".split(".")).map((e) => BigInt(e))), Oe = De[0], ke = De[1], M = /* @__PURE__ */ new Uint32Array(80), N = /* @__PURE__ */ new Uint32Array(80), Ae = class extends he {
|
|
337
|
-
constructor(e) {
|
|
338
|
-
super(128, e, 16, !1);
|
|
1168
|
+
]), ze = /* @__PURE__ */ Te((/* @__PURE__ */ "0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817".split(".")).map((e) => BigInt(e))), Be = ze[0], Ve = ze[1], H = /* @__PURE__ */ new Uint32Array(80), U = /* @__PURE__ */ new Uint32Array(80), He = class extends Le {
|
|
1169
|
+
Ah = 0;
|
|
1170
|
+
Al = 0;
|
|
1171
|
+
Bh = 0;
|
|
1172
|
+
Bl = 0;
|
|
1173
|
+
Ch = 0;
|
|
1174
|
+
Cl = 0;
|
|
1175
|
+
Dh = 0;
|
|
1176
|
+
Dl = 0;
|
|
1177
|
+
Eh = 0;
|
|
1178
|
+
El = 0;
|
|
1179
|
+
Fh = 0;
|
|
1180
|
+
Fl = 0;
|
|
1181
|
+
Gh = 0;
|
|
1182
|
+
Gl = 0;
|
|
1183
|
+
Hh = 0;
|
|
1184
|
+
Hl = 0;
|
|
1185
|
+
constructor(e, t) {
|
|
1186
|
+
super(128, e, 16, !1), this.Ah = t[0] | 0, this.Al = t[1] | 0, this.Bh = t[2] | 0, this.Bl = t[3] | 0, this.Ch = t[4] | 0, this.Cl = t[5] | 0, this.Dh = t[6] | 0, this.Dl = t[7] | 0, this.Eh = t[8] | 0, this.El = t[9] | 0, this.Fh = t[10] | 0, this.Fl = t[11] | 0, this.Gh = t[12] | 0, this.Gl = t[13] | 0, this.Hh = t[14] | 0, this.Hl = t[15] | 0;
|
|
339
1187
|
}
|
|
340
1188
|
get() {
|
|
341
1189
|
let { Ah: e, Al: t, Bh: n, Bl: r, Ch: i, Cl: a, Dh: o, Dl: s, Eh: c, El: l, Fh: u, Fl: d, Gh: f, Gl: p, Hh: m, Hl: h } = this;
|
|
@@ -361,52 +1209,41 @@ var xe = (e, t, n) => (e >>> 0) + (t >>> 0) + (n >>> 0), Se = (e, t, n, r) => t
|
|
|
361
1209
|
set(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
362
1210
|
this.Ah = e | 0, this.Al = t | 0, this.Bh = n | 0, this.Bl = r | 0, this.Ch = i | 0, this.Cl = a | 0, this.Dh = o | 0, this.Dl = s | 0, this.Eh = c | 0, this.El = l | 0, this.Fh = u | 0, this.Fl = d | 0, this.Gh = f | 0, this.Gl = p | 0, this.Hh = m | 0, this.Hl = h | 0;
|
|
363
1211
|
}
|
|
1212
|
+
_cloneInto(e) {
|
|
1213
|
+
return (e ||= new this.constructor()).set(...this.get()), this._cloneIntoMeta(e);
|
|
1214
|
+
}
|
|
364
1215
|
process(e, t) {
|
|
365
|
-
for (let n = 0; n < 16; n++, t += 4)
|
|
1216
|
+
for (let n = 0; n < 16; n++, t += 4) H[n] = e.getUint32(t), U[n] = e.getUint32(t += 4);
|
|
366
1217
|
for (let e = 16; e < 80; e++) {
|
|
367
|
-
let t =
|
|
368
|
-
|
|
1218
|
+
let t = H[e - 15] | 0, n = U[e - 15] | 0, r = z(t, n, 1) ^ z(t, n, 8) ^ R(t, n, 7), i = B(t, n, 1) ^ B(t, n, 8) ^ Oe(t, n, 7), a = H[e - 2] | 0, o = U[e - 2] | 0, s = z(a, o, 19) ^ ke(a, o, 61) ^ R(a, o, 6), c = Ne(i, B(a, o, 19) ^ Ae(a, o, 61) ^ Oe(a, o, 6), U[e - 7], U[e - 16]), l = Pe(c, r, s, H[e - 7], H[e - 16]);
|
|
1219
|
+
H[e] = l | 0, U[e] = c | 0;
|
|
369
1220
|
}
|
|
370
1221
|
let { Ah: n, Al: r, Bh: i, Bl: a, Ch: o, Cl: s, Dh: c, Dl: l, Eh: u, El: d, Fh: f, Fl: p, Gh: m, Gl: h, Hh: g, Hl: _ } = this;
|
|
371
1222
|
for (let e = 0; e < 80; e++) {
|
|
372
|
-
let t =
|
|
373
|
-
g = m | 0, _ = h | 0, m = f | 0, h = p | 0, f = u | 0, p = d | 0, {h: u, l: d} =
|
|
374
|
-
let
|
|
375
|
-
n =
|
|
1223
|
+
let t = z(u, d, 14) ^ z(u, d, 18) ^ ke(u, d, 41), ee = B(u, d, 14) ^ B(u, d, 18) ^ Ae(u, d, 41), te = u & f ^ ~u & m, v = d & p ^ ~d & h, y = Fe(_, ee, v, Ve[e], U[e]), b = Ie(y, g, t, te, Be[e], H[e]), x = y | 0, S = z(n, r, 28) ^ ke(n, r, 34) ^ ke(n, r, 39), C = B(n, r, 28) ^ Ae(n, r, 34) ^ Ae(n, r, 39), w = n & i ^ n & o ^ i & o, T = r & a ^ r & s ^ a & s;
|
|
1224
|
+
g = m | 0, _ = h | 0, m = f | 0, h = p | 0, f = u | 0, p = d | 0, {h: u, l: d} = V(c | 0, l | 0, b | 0, x | 0), c = o | 0, l = s | 0, o = i | 0, s = a | 0, i = n | 0, a = r | 0;
|
|
1225
|
+
let ne = je(x, C, T);
|
|
1226
|
+
n = Me(ne, b, S, w), r = ne | 0;
|
|
376
1227
|
}
|
|
377
|
-
({h: n, l: r} =
|
|
1228
|
+
({h: n, l: r} = V(this.Ah | 0, this.Al | 0, n | 0, r | 0)), {h: i, l: a} = V(this.Bh | 0, this.Bl | 0, i | 0, a | 0), {h: o, l: s} = V(this.Ch | 0, this.Cl | 0, o | 0, s | 0), {h: c, l: l} = V(this.Dh | 0, this.Dl | 0, c | 0, l | 0), {h: u, l: d} = V(this.Eh | 0, this.El | 0, u | 0, d | 0), {h: f, l: p} = V(this.Fh | 0, this.Fl | 0, f | 0, p | 0), {h: m, l: h} = V(this.Gh | 0, this.Gl | 0, m | 0, h | 0), {h: g, l: _} = V(this.Hh | 0, this.Hl | 0, g | 0, _ | 0), this.set(n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _);
|
|
378
1229
|
}
|
|
379
1230
|
roundClean() {
|
|
380
|
-
|
|
1231
|
+
A(H, U);
|
|
381
1232
|
}
|
|
382
1233
|
destroy() {
|
|
383
|
-
this.destroyed = !0,
|
|
384
|
-
}
|
|
385
|
-
}, je = class extends Ae {
|
|
386
|
-
Ah = T[0] | 0;
|
|
387
|
-
Al = T[1] | 0;
|
|
388
|
-
Bh = T[2] | 0;
|
|
389
|
-
Bl = T[3] | 0;
|
|
390
|
-
Ch = T[4] | 0;
|
|
391
|
-
Cl = T[5] | 0;
|
|
392
|
-
Dh = T[6] | 0;
|
|
393
|
-
Dl = T[7] | 0;
|
|
394
|
-
Eh = T[8] | 0;
|
|
395
|
-
El = T[9] | 0;
|
|
396
|
-
Fh = T[10] | 0;
|
|
397
|
-
Fl = T[11] | 0;
|
|
398
|
-
Gh = T[12] | 0;
|
|
399
|
-
Gl = T[13] | 0;
|
|
400
|
-
Hh = T[14] | 0;
|
|
401
|
-
Hl = T[15] | 0;
|
|
402
|
-
constructor() {
|
|
403
|
-
super(64);
|
|
1234
|
+
this.destroyed = !0, A(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
404
1235
|
}
|
|
405
|
-
},
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
}
|
|
409
|
-
|
|
1236
|
+
}, Ue = class extends He {
|
|
1237
|
+
constructor() {
|
|
1238
|
+
super(64, Re);
|
|
1239
|
+
}
|
|
1240
|
+
}, We = /* @__PURE__ */ ve(() => new Ue(), /* @__PURE__ */ ye(3)), Ge = (e, t, n, r) => de.from(Se(We, e, t, {
|
|
1241
|
+
c: n,
|
|
1242
|
+
dkLen: r
|
|
1243
|
+
})), Ke = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", qe = Ke + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
|
|
1244
|
+
"" + Ke + qe;
|
|
1245
|
+
var Je = /* @__PURE__ */ RegExp("^[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
|
|
1246
|
+
function Ye(e, t) {
|
|
410
1247
|
let n = [], r = t.exec(e);
|
|
411
1248
|
for (; r;) {
|
|
412
1249
|
let i = [];
|
|
@@ -417,13 +1254,13 @@ function Fe(e, t) {
|
|
|
417
1254
|
}
|
|
418
1255
|
return n;
|
|
419
1256
|
}
|
|
420
|
-
var
|
|
421
|
-
return
|
|
1257
|
+
var Xe = function(e) {
|
|
1258
|
+
return Je.exec(e) != null;
|
|
422
1259
|
};
|
|
423
|
-
function
|
|
1260
|
+
function Ze(e) {
|
|
424
1261
|
return e !== void 0;
|
|
425
1262
|
}
|
|
426
|
-
var
|
|
1263
|
+
var Qe = [
|
|
427
1264
|
"hasOwnProperty",
|
|
428
1265
|
"toString",
|
|
429
1266
|
"valueOf",
|
|
@@ -431,24 +1268,24 @@ var P = [
|
|
|
431
1268
|
"__defineSetter__",
|
|
432
1269
|
"__lookupGetter__",
|
|
433
1270
|
"__lookupSetter__"
|
|
434
|
-
],
|
|
1271
|
+
], $e = [
|
|
435
1272
|
"__proto__",
|
|
436
1273
|
"constructor",
|
|
437
1274
|
"prototype"
|
|
438
|
-
],
|
|
1275
|
+
], et = {
|
|
439
1276
|
allowBooleanAttributes: !1,
|
|
440
1277
|
unpairedTags: []
|
|
441
1278
|
};
|
|
442
|
-
function
|
|
443
|
-
t = Object.assign({},
|
|
1279
|
+
function tt(e, t) {
|
|
1280
|
+
t = Object.assign({}, et, t);
|
|
444
1281
|
let n = [], r = !1, i = !1;
|
|
445
1282
|
e[0] === "" && (e = e.substr(1));
|
|
446
1283
|
for (let a = 0; a < e.length; a++) if (e[a] === "<" && e[a + 1] === "?") {
|
|
447
|
-
if (a += 2, a =
|
|
1284
|
+
if (a += 2, a = nt(e, a), a.err) return a;
|
|
448
1285
|
} else if (e[a] === "<") {
|
|
449
1286
|
let o = a;
|
|
450
1287
|
if (a++, e[a] === "!") {
|
|
451
|
-
a =
|
|
1288
|
+
a = rt(e, a);
|
|
452
1289
|
continue;
|
|
453
1290
|
}
|
|
454
1291
|
{
|
|
@@ -456,70 +1293,72 @@ function Be(e, t) {
|
|
|
456
1293
|
e[a] === "/" && (s = !0, a++);
|
|
457
1294
|
let c = "";
|
|
458
1295
|
for (; a < e.length && e[a] !== ">" && e[a] !== " " && e[a] !== " " && e[a] !== "\n" && e[a] !== "\r"; a++) c += e[a];
|
|
459
|
-
if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !
|
|
1296
|
+
if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !ft(c)) {
|
|
460
1297
|
let t;
|
|
461
|
-
return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.",
|
|
1298
|
+
return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", G("InvalidTag", t, K(e, a));
|
|
462
1299
|
}
|
|
463
|
-
let l =
|
|
464
|
-
if (l === !1) return
|
|
1300
|
+
let l = ot(e, a);
|
|
1301
|
+
if (l === !1) return G("InvalidAttr", "Attributes for '" + c + "' have open quote.", K(e, a));
|
|
465
1302
|
let u = l.value;
|
|
466
1303
|
if (a = l.index, u[u.length - 1] === "/") {
|
|
467
1304
|
let n = a - u.length;
|
|
468
1305
|
u = u.substring(0, u.length - 1);
|
|
469
|
-
let i =
|
|
1306
|
+
let i = ct(u, t);
|
|
470
1307
|
if (i === !0) r = !0;
|
|
471
|
-
else return
|
|
1308
|
+
else return G(i.err.code, i.err.msg, K(e, n + i.err.line));
|
|
472
1309
|
} else if (s) {
|
|
473
|
-
if (!l.tagClosed) return
|
|
474
|
-
if (u.trim().length > 0) return
|
|
475
|
-
if (n.length === 0) return
|
|
1310
|
+
if (!l.tagClosed) return G("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", K(e, a));
|
|
1311
|
+
if (u.trim().length > 0) return G("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", K(e, o));
|
|
1312
|
+
if (n.length === 0) return G("InvalidTag", "Closing tag '" + c + "' has not been opened.", K(e, o));
|
|
476
1313
|
{
|
|
477
1314
|
let t = n.pop();
|
|
478
1315
|
if (c !== t.tagName) {
|
|
479
|
-
let n =
|
|
480
|
-
return
|
|
1316
|
+
let n = K(e, t.tagStartPos);
|
|
1317
|
+
return G("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", K(e, o));
|
|
481
1318
|
}
|
|
482
1319
|
n.length == 0 && (i = !0);
|
|
483
1320
|
}
|
|
484
1321
|
} else {
|
|
485
|
-
let s =
|
|
486
|
-
if (s !== !0) return
|
|
487
|
-
if (i === !0) return
|
|
1322
|
+
let s = ct(u, t);
|
|
1323
|
+
if (s !== !0) return G(s.err.code, s.err.msg, K(e, a - u.length + s.err.line));
|
|
1324
|
+
if (i === !0) return G("InvalidXml", "Multiple possible root nodes found.", K(e, a));
|
|
488
1325
|
t.unpairedTags.indexOf(c) !== -1 || n.push({
|
|
489
1326
|
tagName: c,
|
|
490
1327
|
tagStartPos: o
|
|
491
1328
|
}), r = !0;
|
|
492
1329
|
}
|
|
493
|
-
for (a++; a < e.length; a++) if (e[a] === "<")
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
1330
|
+
for (a++; a < e.length; a++) if (e[a] === "<") {
|
|
1331
|
+
if (e[a + 1] === "!") {
|
|
1332
|
+
a++, a = rt(e, a);
|
|
1333
|
+
continue;
|
|
1334
|
+
}
|
|
1335
|
+
if (e[a + 1] === "?") {
|
|
1336
|
+
if (a = nt(e, ++a), a.err) return a;
|
|
1337
|
+
} else break;
|
|
1338
|
+
} else if (e[a] === "&") {
|
|
1339
|
+
let t = ut(e, a);
|
|
1340
|
+
if (t == -1) return G("InvalidChar", "char '&' is not expected.", K(e, a));
|
|
502
1341
|
a = t;
|
|
503
|
-
} else if (i === !0 && !
|
|
1342
|
+
} else if (i === !0 && !W(e[a])) return G("InvalidXml", "Extra text at the end", K(e, a));
|
|
504
1343
|
e[a] === "<" && a--;
|
|
505
1344
|
}
|
|
506
1345
|
} else {
|
|
507
|
-
if (
|
|
508
|
-
return
|
|
1346
|
+
if (W(e[a])) continue;
|
|
1347
|
+
return G("InvalidChar", "char '" + e[a] + "' is not expected.", K(e, a));
|
|
509
1348
|
}
|
|
510
|
-
return r ? n.length == 1 ?
|
|
1349
|
+
return r ? n.length == 1 ? G("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", K(e, n[0].tagStartPos)) : n.length > 0 ? G("InvalidXml", "Invalid '" + JSON.stringify(n.map((e) => e.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", {
|
|
511
1350
|
line: 1,
|
|
512
1351
|
col: 1
|
|
513
|
-
}) : !0 :
|
|
1352
|
+
}) : !0 : G("InvalidXml", "Start tag expected.", 1);
|
|
514
1353
|
}
|
|
515
|
-
function
|
|
1354
|
+
function W(e) {
|
|
516
1355
|
return e === " " || e === " " || e === "\n" || e === "\r";
|
|
517
1356
|
}
|
|
518
|
-
function
|
|
1357
|
+
function nt(e, t) {
|
|
519
1358
|
let n = t;
|
|
520
1359
|
for (; t < e.length; t++) if (e[t] == "?" || e[t] == " ") {
|
|
521
1360
|
let r = e.substr(n, t - n);
|
|
522
|
-
if (t > 5 && r === "xml") return
|
|
1361
|
+
if (t > 5 && r === "xml") return G("InvalidXml", "XML declaration allowed only at the start of the document.", K(e, t));
|
|
523
1362
|
if (e[t] == "?" && e[t + 1] == ">") {
|
|
524
1363
|
t++;
|
|
525
1364
|
break;
|
|
@@ -528,7 +1367,7 @@ function He(e, t) {
|
|
|
528
1367
|
}
|
|
529
1368
|
return t;
|
|
530
1369
|
}
|
|
531
|
-
function
|
|
1370
|
+
function rt(e, t) {
|
|
532
1371
|
if (e.length > t + 5 && e[t + 1] === "-" && e[t + 2] === "-") {
|
|
533
1372
|
for (t += 3; t < e.length; t++) if (e[t] === "-" && e[t + 1] === "-" && e[t + 2] === ">") {
|
|
534
1373
|
t += 2;
|
|
@@ -546,11 +1385,11 @@ function Ue(e, t) {
|
|
|
546
1385
|
}
|
|
547
1386
|
return t;
|
|
548
1387
|
}
|
|
549
|
-
var
|
|
550
|
-
function
|
|
1388
|
+
var it = "\"", at = "'";
|
|
1389
|
+
function ot(e, t) {
|
|
551
1390
|
let n = "", r = "", i = !1;
|
|
552
1391
|
for (; t < e.length; t++) {
|
|
553
|
-
if (e[t] ===
|
|
1392
|
+
if (e[t] === it || e[t] === at) r === "" ? r = e[t] : r !== e[t] || (r = "");
|
|
554
1393
|
else if (e[t] === ">" && r === "") {
|
|
555
1394
|
i = !0;
|
|
556
1395
|
break;
|
|
@@ -563,21 +1402,46 @@ function Ke(e, t) {
|
|
|
563
1402
|
tagClosed: i
|
|
564
1403
|
};
|
|
565
1404
|
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
1405
|
+
function st(e) {
|
|
1406
|
+
let t = [], n = e.length, r = 0;
|
|
1407
|
+
for (; r < n;) {
|
|
1408
|
+
let i = r;
|
|
1409
|
+
for (; r < n && W(e[r]);) r++;
|
|
1410
|
+
if (r >= n) break;
|
|
1411
|
+
if (e[r] === "=") {
|
|
1412
|
+
r = i + 1;
|
|
1413
|
+
continue;
|
|
1414
|
+
}
|
|
1415
|
+
let a = e.slice(i, r), o = r;
|
|
1416
|
+
for (; r < n && !W(e[r]) && e[r] !== "=";) r++;
|
|
1417
|
+
let s = e.slice(o, r), c, l = r;
|
|
1418
|
+
for (; l < n && W(e[l]);) l++;
|
|
1419
|
+
l < n && e[l] === "=" && (c = e.slice(r, l + 1), r = l + 1);
|
|
1420
|
+
let u, d, f = r;
|
|
1421
|
+
for (; f < n && W(e[f]);) f++;
|
|
1422
|
+
if (f < n && (e[f] === "\"" || e[f] === "'")) {
|
|
1423
|
+
let t = f + 1, n = e.indexOf(e[f], t);
|
|
1424
|
+
n !== -1 && (u = e[f], d = e.slice(t, n), r = n + 1);
|
|
1425
|
+
}
|
|
1426
|
+
let p = { startIndex: i };
|
|
1427
|
+
p[1] = a, p[2] = s, p[3] = c, p[4] = u !== void 0 || void 0, p[5] = u, p[6] = d, t.push(p);
|
|
1428
|
+
}
|
|
1429
|
+
return t;
|
|
1430
|
+
}
|
|
1431
|
+
function ct(e, t) {
|
|
1432
|
+
let n = st(e), r = {};
|
|
569
1433
|
for (let e = 0; e < n.length; e++) {
|
|
570
|
-
if (n[e][1].length === 0) return
|
|
571
|
-
if (n[e][3] !== void 0 && n[e][4] === void 0) return
|
|
572
|
-
if (n[e][3] === void 0 && !t.allowBooleanAttributes) return
|
|
1434
|
+
if (n[e][1].length === 0) return G("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", pt(n[e]));
|
|
1435
|
+
if (n[e][3] !== void 0 && n[e][4] === void 0) return G("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", pt(n[e]));
|
|
1436
|
+
if (n[e][3] === void 0 && !t.allowBooleanAttributes) return G("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", pt(n[e]));
|
|
573
1437
|
let i = n[e][2];
|
|
574
|
-
if (!
|
|
1438
|
+
if (!dt(i)) return G("InvalidAttr", "Attribute '" + i + "' is an invalid name.", pt(n[e]));
|
|
575
1439
|
if (!Object.prototype.hasOwnProperty.call(r, i)) r[i] = 1;
|
|
576
|
-
else return
|
|
1440
|
+
else return G("InvalidAttr", "Attribute '" + i + "' is repeated.", pt(n[e]));
|
|
577
1441
|
}
|
|
578
1442
|
return !0;
|
|
579
1443
|
}
|
|
580
|
-
function
|
|
1444
|
+
function lt(e, t) {
|
|
581
1445
|
let n = /\d/;
|
|
582
1446
|
for (e[t] === "x" && (t++, n = /[\da-fA-F]/); t < e.length; t++) {
|
|
583
1447
|
if (e[t] === ";") return t;
|
|
@@ -585,9 +1449,9 @@ function Ye(e, t) {
|
|
|
585
1449
|
}
|
|
586
1450
|
return -1;
|
|
587
1451
|
}
|
|
588
|
-
function
|
|
1452
|
+
function ut(e, t) {
|
|
589
1453
|
if (t++, e[t] === ";") return -1;
|
|
590
|
-
if (e[t] === "#") return t++,
|
|
1454
|
+
if (e[t] === "#") return t++, lt(e, t);
|
|
591
1455
|
let n = 0;
|
|
592
1456
|
for (; t < e.length; t++, n++) if (!(e[t].match(/\w/) && n < 20)) {
|
|
593
1457
|
if (e[t] === ";") break;
|
|
@@ -595,7 +1459,7 @@ function Xe(e, t) {
|
|
|
595
1459
|
}
|
|
596
1460
|
return t;
|
|
597
1461
|
}
|
|
598
|
-
function
|
|
1462
|
+
function G(e, t, n) {
|
|
599
1463
|
return { err: {
|
|
600
1464
|
code: e,
|
|
601
1465
|
msg: t,
|
|
@@ -603,25 +1467,25 @@ function F(e, t, n) {
|
|
|
603
1467
|
col: n.col
|
|
604
1468
|
} };
|
|
605
1469
|
}
|
|
606
|
-
function
|
|
607
|
-
return
|
|
1470
|
+
function dt(e) {
|
|
1471
|
+
return Xe(e);
|
|
608
1472
|
}
|
|
609
|
-
function
|
|
610
|
-
return
|
|
1473
|
+
function ft(e) {
|
|
1474
|
+
return Xe(e);
|
|
611
1475
|
}
|
|
612
|
-
function
|
|
1476
|
+
function K(e, t) {
|
|
613
1477
|
let n = e.substring(0, t).split(/\r?\n/);
|
|
614
1478
|
return {
|
|
615
1479
|
line: n.length,
|
|
616
1480
|
col: n[n.length - 1].length + 1
|
|
617
1481
|
};
|
|
618
1482
|
}
|
|
619
|
-
function
|
|
1483
|
+
function pt(e) {
|
|
620
1484
|
return e.startIndex + e[1].length;
|
|
621
1485
|
}
|
|
622
1486
|
//#endregion
|
|
623
1487
|
//#region ../../node_modules/.pnpm/@nodable+entities@3.0.0/node_modules/@nodable/entities/src/entities.js
|
|
624
|
-
var
|
|
1488
|
+
var mt = {
|
|
625
1489
|
cent: "¢",
|
|
626
1490
|
pound: "£",
|
|
627
1491
|
curren: "¤",
|
|
@@ -637,13 +1501,13 @@ var $e = {
|
|
|
637
1501
|
won: "₩",
|
|
638
1502
|
yuan: "¥",
|
|
639
1503
|
cedil: "¸"
|
|
640
|
-
},
|
|
1504
|
+
}, ht = {
|
|
641
1505
|
amp: "&",
|
|
642
1506
|
apos: "'",
|
|
643
1507
|
gt: ">",
|
|
644
1508
|
lt: "<",
|
|
645
1509
|
quot: "\""
|
|
646
|
-
},
|
|
1510
|
+
}, gt = {
|
|
647
1511
|
nbsp: "\xA0",
|
|
648
1512
|
copy: "©",
|
|
649
1513
|
reg: "®",
|
|
@@ -664,17 +1528,17 @@ var $e = {
|
|
|
664
1528
|
frac12: "½",
|
|
665
1529
|
frac14: "¼",
|
|
666
1530
|
frac34: "¾"
|
|
667
|
-
},
|
|
1531
|
+
}, _t = Object.freeze({
|
|
668
1532
|
ALLOW: "allow",
|
|
669
1533
|
BLOCK: "block",
|
|
670
1534
|
THROW: "throw"
|
|
671
|
-
}),
|
|
672
|
-
function
|
|
1535
|
+
}), vt = /* @__PURE__ */ new Set("!?\\\\/[]$%{}^&*()<>|+");
|
|
1536
|
+
function yt(e) {
|
|
673
1537
|
if (e[0] === "#") throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);
|
|
674
|
-
for (let t of e) if (
|
|
1538
|
+
for (let t of e) if (vt.has(t)) throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);
|
|
675
1539
|
return e;
|
|
676
1540
|
}
|
|
677
|
-
function
|
|
1541
|
+
function bt(...e) {
|
|
678
1542
|
let t = Object.create(null);
|
|
679
1543
|
for (let n of e) if (n) for (let e of Object.keys(n)) {
|
|
680
1544
|
let r = n[e];
|
|
@@ -686,65 +1550,65 @@ function z(...e) {
|
|
|
686
1550
|
}
|
|
687
1551
|
return t;
|
|
688
1552
|
}
|
|
689
|
-
var
|
|
690
|
-
function
|
|
691
|
-
return !e || e ===
|
|
1553
|
+
var q = "external", xt = "base", St = "all";
|
|
1554
|
+
function Ct(e) {
|
|
1555
|
+
return !e || e === q ? /* @__PURE__ */ new Set([q]) : e === St ? /* @__PURE__ */ new Set([St]) : e === xt ? /* @__PURE__ */ new Set([xt]) : Array.isArray(e) ? new Set(e) : /* @__PURE__ */ new Set([q]);
|
|
692
1556
|
}
|
|
693
|
-
var
|
|
1557
|
+
var J = Object.freeze({
|
|
694
1558
|
allow: 0,
|
|
695
1559
|
leave: 1,
|
|
696
1560
|
remove: 2,
|
|
697
1561
|
throw: 3
|
|
698
|
-
}),
|
|
1562
|
+
}), wt = /* @__PURE__ */ new Set([
|
|
699
1563
|
9,
|
|
700
1564
|
10,
|
|
701
1565
|
13
|
|
702
1566
|
]);
|
|
703
|
-
function
|
|
1567
|
+
function Tt(e) {
|
|
704
1568
|
if (!e) return {
|
|
705
1569
|
xmlVersion: 1,
|
|
706
|
-
onLevel:
|
|
707
|
-
nullLevel:
|
|
1570
|
+
onLevel: J.allow,
|
|
1571
|
+
nullLevel: J.remove
|
|
708
1572
|
};
|
|
709
|
-
let t = e.xmlVersion === 1.1 ? 1.1 : 1, n =
|
|
1573
|
+
let t = e.xmlVersion === 1.1 ? 1.1 : 1, n = J[e.onNCR] ?? J.allow, r = J[e.nullNCR] ?? J.remove;
|
|
710
1574
|
return {
|
|
711
1575
|
xmlVersion: t,
|
|
712
1576
|
onLevel: n,
|
|
713
|
-
nullLevel: Math.max(r,
|
|
1577
|
+
nullLevel: Math.max(r, J.remove)
|
|
714
1578
|
};
|
|
715
1579
|
}
|
|
716
|
-
var
|
|
1580
|
+
var Et = class {
|
|
717
1581
|
constructor(e = {}) {
|
|
718
|
-
this._limit = e.limit || {}, this._maxTotalExpansions = this._limit.maxTotalExpansions || 0, this._maxExpandedLength = this._limit.maxExpandedLength || 0, this._postCheck = typeof e.postCheck == "function" ? e.postCheck : (e) => e, this._limitTiers =
|
|
719
|
-
let t =
|
|
1582
|
+
this._limit = e.limit || {}, this._maxTotalExpansions = this._limit.maxTotalExpansions || 0, this._maxExpandedLength = this._limit.maxExpandedLength || 0, this._postCheck = typeof e.postCheck == "function" ? e.postCheck : (e) => e, this._limitTiers = Ct(this._limit.applyLimitsTo ?? q), this._numericAllowed = e.numericAllowed ?? !0, this._baseMap = bt(ht, e.namedEntities || null), this._externalMap = Object.create(null), this._inputMap = Object.create(null), this._totalExpansions = 0, this._expandedLength = 0, this._removeSet = new Set(e.remove && Array.isArray(e.remove) ? e.remove : []), this._leaveSet = new Set(e.leave && Array.isArray(e.leave) ? e.leave : []);
|
|
1583
|
+
let t = Tt(e.ncr);
|
|
720
1584
|
this._ncrXmlVersion = t.xmlVersion, this._ncrOnLevel = t.onLevel, this._ncrNullLevel = t.nullLevel, this._onExternalEntity = typeof e.onExternalEntity == "function" ? e.onExternalEntity : null, this._onInputEntity = typeof e.onInputEntity == "function" ? e.onInputEntity : null;
|
|
721
1585
|
}
|
|
722
1586
|
_applyRegistrationHook(e, t, n, r) {
|
|
723
1587
|
if (!e) return !0;
|
|
724
1588
|
let i = e(t, n);
|
|
725
|
-
if (i ===
|
|
726
|
-
if (i ===
|
|
1589
|
+
if (i === _t.BLOCK) return !1;
|
|
1590
|
+
if (i === _t.THROW) throw Error(`[EntityDecoder] Registration of ${r} entity "&${t};" was rejected by hook`);
|
|
727
1591
|
return !0;
|
|
728
1592
|
}
|
|
729
1593
|
setExternalEntities(e) {
|
|
730
|
-
if (e) for (let t of Object.keys(e))
|
|
1594
|
+
if (e) for (let t of Object.keys(e)) yt(t);
|
|
731
1595
|
if (!this._onExternalEntity) {
|
|
732
|
-
this._externalMap =
|
|
1596
|
+
this._externalMap = bt(e);
|
|
733
1597
|
return;
|
|
734
1598
|
}
|
|
735
|
-
let t =
|
|
1599
|
+
let t = bt(e), n = Object.create(null);
|
|
736
1600
|
for (let [e, r] of Object.entries(t)) this._applyRegistrationHook(this._onExternalEntity, e, r, "external") && (n[e] = r);
|
|
737
1601
|
this._externalMap = n;
|
|
738
1602
|
}
|
|
739
1603
|
addExternalEntity(e, t) {
|
|
740
|
-
|
|
1604
|
+
yt(e), typeof t == "string" && t.indexOf("&") === -1 && this._applyRegistrationHook(this._onExternalEntity, e, t, "external") && (this._externalMap[e] = t);
|
|
741
1605
|
}
|
|
742
1606
|
addInputEntities(e) {
|
|
743
1607
|
if (this._totalExpansions = 0, this._expandedLength = 0, !this._onInputEntity) {
|
|
744
|
-
this._inputMap =
|
|
1608
|
+
this._inputMap = bt(e);
|
|
745
1609
|
return;
|
|
746
1610
|
}
|
|
747
|
-
let t =
|
|
1611
|
+
let t = bt(e), n = Object.create(null);
|
|
748
1612
|
for (let [e, r] of Object.entries(t)) this._applyRegistrationHook(this._onInputEntity, e, r, "input") && (n[e] = r);
|
|
749
1613
|
this._inputMap = n;
|
|
750
1614
|
}
|
|
@@ -774,7 +1638,7 @@ var st = class {
|
|
|
774
1638
|
continue;
|
|
775
1639
|
}
|
|
776
1640
|
let u, d;
|
|
777
|
-
if (this._removeSet.has(l)) u = "", d === void 0 && (d =
|
|
1641
|
+
if (this._removeSet.has(l)) u = "", d === void 0 && (d = q);
|
|
778
1642
|
else if (this._leaveSet.has(l)) {
|
|
779
1643
|
a++;
|
|
780
1644
|
continue;
|
|
@@ -784,7 +1648,7 @@ var st = class {
|
|
|
784
1648
|
a++;
|
|
785
1649
|
continue;
|
|
786
1650
|
}
|
|
787
|
-
u = e, d =
|
|
1651
|
+
u = e, d = xt;
|
|
788
1652
|
} else {
|
|
789
1653
|
let e = this._resolveName(l);
|
|
790
1654
|
u = e?.value, d = e?.tier;
|
|
@@ -806,31 +1670,31 @@ var st = class {
|
|
|
806
1670
|
return this._postCheck(l, t);
|
|
807
1671
|
}
|
|
808
1672
|
_tierCounts(e) {
|
|
809
|
-
return this._limitTiers.has(
|
|
1673
|
+
return this._limitTiers.has(St) ? !0 : this._limitTiers.has(e);
|
|
810
1674
|
}
|
|
811
1675
|
_resolveName(e) {
|
|
812
1676
|
if (e in this._inputMap) return {
|
|
813
1677
|
value: this._inputMap[e],
|
|
814
|
-
tier:
|
|
1678
|
+
tier: q
|
|
815
1679
|
};
|
|
816
1680
|
if (e in this._externalMap) return {
|
|
817
1681
|
value: this._externalMap[e],
|
|
818
|
-
tier:
|
|
1682
|
+
tier: q
|
|
819
1683
|
};
|
|
820
1684
|
if (e in this._baseMap) return {
|
|
821
1685
|
value: this._baseMap[e],
|
|
822
|
-
tier:
|
|
1686
|
+
tier: xt
|
|
823
1687
|
};
|
|
824
1688
|
}
|
|
825
1689
|
_classifyNCR(e) {
|
|
826
|
-
return e === 0 ? this._ncrNullLevel : e >= 55296 && e <= 57343 || this._ncrXmlVersion === 1 && e >= 1 && e <= 31 && !
|
|
1690
|
+
return e === 0 ? this._ncrNullLevel : e >= 55296 && e <= 57343 || this._ncrXmlVersion === 1 && e >= 1 && e <= 31 && !wt.has(e) ? J.remove : -1;
|
|
827
1691
|
}
|
|
828
1692
|
_applyNCRAction(e, t, n) {
|
|
829
1693
|
switch (e) {
|
|
830
|
-
case
|
|
831
|
-
case
|
|
832
|
-
case
|
|
833
|
-
case
|
|
1694
|
+
case J.allow: return String.fromCodePoint(n);
|
|
1695
|
+
case J.remove: return "";
|
|
1696
|
+
case J.leave: return;
|
|
1697
|
+
case J.throw: throw Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${n.toString(16).toUpperCase().padStart(4, "0")})`);
|
|
834
1698
|
default: return String.fromCodePoint(n);
|
|
835
1699
|
}
|
|
836
1700
|
}
|
|
@@ -838,11 +1702,11 @@ var st = class {
|
|
|
838
1702
|
let t = e.charCodeAt(1), n;
|
|
839
1703
|
if (n = t === 120 || t === 88 ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10), Number.isNaN(n) || n < 0 || n > 1114111) return;
|
|
840
1704
|
let r = this._classifyNCR(n);
|
|
841
|
-
if (!this._numericAllowed && r <
|
|
1705
|
+
if (!this._numericAllowed && r < J.remove) return;
|
|
842
1706
|
let i = r === -1 ? this._ncrOnLevel : Math.max(this._ncrOnLevel, r);
|
|
843
1707
|
return this._applyNCRAction(i, e, n);
|
|
844
1708
|
}
|
|
845
|
-
},
|
|
1709
|
+
}, Dt = (e) => Qe.includes(e) ? "__" + e : e, Ot = {
|
|
846
1710
|
preserveOrder: !1,
|
|
847
1711
|
attributeNamePrefix: "@_",
|
|
848
1712
|
attributesGroupName: !1,
|
|
@@ -885,14 +1749,14 @@ var st = class {
|
|
|
885
1749
|
maxNestedTags: 100,
|
|
886
1750
|
strictReservedNames: !0,
|
|
887
1751
|
jPath: !0,
|
|
888
|
-
onDangerousProperty:
|
|
1752
|
+
onDangerousProperty: Dt
|
|
889
1753
|
};
|
|
890
|
-
function
|
|
1754
|
+
function kt(e, t) {
|
|
891
1755
|
if (typeof e != "string") return;
|
|
892
1756
|
let n = e.toLowerCase();
|
|
893
|
-
if (
|
|
1757
|
+
if (Qe.some((e) => n === e.toLowerCase()) || $e.some((e) => n === e.toLowerCase())) throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
894
1758
|
}
|
|
895
|
-
function
|
|
1759
|
+
function At(e, t) {
|
|
896
1760
|
return typeof e == "boolean" ? {
|
|
897
1761
|
enabled: e,
|
|
898
1762
|
maxEntitySize: 1e4,
|
|
@@ -913,10 +1777,10 @@ function dt(e, t) {
|
|
|
913
1777
|
allowedTags: e.allowedTags ?? null,
|
|
914
1778
|
tagFilter: e.tagFilter ?? null,
|
|
915
1779
|
appliesTo: e.appliesTo ?? "all"
|
|
916
|
-
} :
|
|
1780
|
+
} : At(!0);
|
|
917
1781
|
}
|
|
918
|
-
var
|
|
919
|
-
let t = Object.assign({},
|
|
1782
|
+
var jt = function(e) {
|
|
1783
|
+
let t = Object.assign({}, Ot, e), n = [
|
|
920
1784
|
{
|
|
921
1785
|
value: t.attributeNamePrefix,
|
|
922
1786
|
name: "attributeNamePrefix"
|
|
@@ -938,9 +1802,9 @@ var ft = function(e) {
|
|
|
938
1802
|
name: "commentPropName"
|
|
939
1803
|
}
|
|
940
1804
|
];
|
|
941
|
-
for (let { value: e, name: t } of n) e &&
|
|
942
|
-
return t.onDangerousProperty === null && (t.onDangerousProperty =
|
|
943
|
-
},
|
|
1805
|
+
for (let { value: e, name: t } of n) e && kt(e, t);
|
|
1806
|
+
return t.onDangerousProperty === null && (t.onDangerousProperty = Dt), t.processEntities = At(t.processEntities, t.htmlEntities), t.unpairedTagsSet = new Set(t.unpairedTags), t.stopNodes && Array.isArray(t.stopNodes) && (t.stopNodes = t.stopNodes.map((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e)), t;
|
|
1807
|
+
}, Mt = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", Y = class {
|
|
944
1808
|
constructor(e) {
|
|
945
1809
|
this.tagname = e, this.child = [], this[":@"] = Object.create(null);
|
|
946
1810
|
}
|
|
@@ -951,12 +1815,19 @@ var ft = function(e) {
|
|
|
951
1815
|
e.tagname === "__proto__" && (e.tagname = "#__proto__"), e[":@"] && Object.keys(e[":@"]).length > 0 ? this.child.push({
|
|
952
1816
|
[e.tagname]: e.child,
|
|
953
1817
|
":@": e[":@"]
|
|
954
|
-
}) : this.child.push({ [e.tagname]: e.child }),
|
|
1818
|
+
}) : this.child.push({ [e.tagname]: e.child }), this.addStartIndex(t);
|
|
1819
|
+
}
|
|
1820
|
+
addStartIndex(e) {
|
|
1821
|
+
e !== void 0 && (this.child[this.child.length - 1][Mt] = { startIndex: e });
|
|
1822
|
+
}
|
|
1823
|
+
addEndIndex(e) {
|
|
1824
|
+
let t = this.child[this.child.length - 1];
|
|
1825
|
+
t !== void 0 && t[Mt] !== void 0 && t[Mt].endIndex === void 0 && (t[Mt].endIndex = e);
|
|
955
1826
|
}
|
|
956
1827
|
static getMetaDataSymbol() {
|
|
957
|
-
return
|
|
1828
|
+
return Mt;
|
|
958
1829
|
}
|
|
959
|
-
},
|
|
1830
|
+
}, Nt = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�", Pt = Nt + "\\-\\.\\d·̀-ͯ‿-⁀", Ft = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", It = Ft + "\\-\\.\\d·̀-ͯ҇‿-⁀", Lt = (e, t, n = "") => {
|
|
960
1831
|
let r = `[${e.replace(":", "")}][${t.replace(":", "")}]*`;
|
|
961
1832
|
return {
|
|
962
1833
|
name: RegExp(`^[${e}][${t}]*$`, n),
|
|
@@ -965,15 +1836,15 @@ var ft = function(e) {
|
|
|
965
1836
|
nmToken: RegExp(`^[${t}]+$`, n),
|
|
966
1837
|
nmTokens: RegExp(`^[${t}]+(?:\\s+[${t}]+)*$`, n)
|
|
967
1838
|
};
|
|
968
|
-
},
|
|
1839
|
+
}, Rt = Lt(Nt, Pt), zt = Lt(Ft, It, "u"), Bt = Lt(":A-Za-z_", ":A-Za-z_\\-\\.\\d"), Vt = (e = "1.0", t = !1) => t ? Bt : e === "1.1" ? zt : Rt, Ht = (e, { xmlVersion: t = "1.0", asciiOnly: n = !1 } = {}) => Vt(t, n).qName.test(e), Ut = [
|
|
969
1840
|
"name",
|
|
970
1841
|
"ncName",
|
|
971
1842
|
"qName",
|
|
972
1843
|
"nmToken",
|
|
973
1844
|
"nmTokens"
|
|
974
|
-
],
|
|
975
|
-
if (!
|
|
976
|
-
let i =
|
|
1845
|
+
], Wt = (e, { xmlVersion: t = "1.0", asciiOnly: n = !1, maxCacheSize: r = 2048 } = {}) => {
|
|
1846
|
+
if (!Ut.includes(e)) throw TypeError(`Unknown production "${e}". Must be one of: ${Ut.join(", ")}`);
|
|
1847
|
+
let i = Vt(t, n)[e], a = /* @__PURE__ */ new Map(), o = (e) => {
|
|
977
1848
|
let t = a.get(e);
|
|
978
1849
|
if (t !== void 0) return t;
|
|
979
1850
|
let n = i.test(e);
|
|
@@ -982,7 +1853,7 @@ var ft = function(e) {
|
|
|
982
1853
|
return o.reset = () => {
|
|
983
1854
|
a = /* @__PURE__ */ new Map();
|
|
984
1855
|
}, o;
|
|
985
|
-
},
|
|
1856
|
+
}, Gt = class {
|
|
986
1857
|
constructor(e, t) {
|
|
987
1858
|
this.suppressValidationErr = !e, this.options = e, this.xmlVersion = t || 1;
|
|
988
1859
|
}
|
|
@@ -993,31 +1864,41 @@ var ft = function(e) {
|
|
|
993
1864
|
let n = Object.create(null), r = 0;
|
|
994
1865
|
if (e[t + 3] === "O" && e[t + 4] === "C" && e[t + 5] === "T" && e[t + 6] === "Y" && e[t + 7] === "P" && e[t + 8] === "E") {
|
|
995
1866
|
t += 9;
|
|
996
|
-
let i = 1, a = !1, o = !1, s = "";
|
|
997
|
-
for (; t < e.length; t++)
|
|
998
|
-
if (
|
|
999
|
-
t +=
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1867
|
+
let i = 1, a = !1, o = !1, s = null, c = "";
|
|
1868
|
+
for (; t < e.length; t++) {
|
|
1869
|
+
if (s !== null) {
|
|
1870
|
+
e[t] === s && (s = null), c += e[t];
|
|
1871
|
+
continue;
|
|
1872
|
+
}
|
|
1873
|
+
if (!a && !o && (e[t] === "\"" || e[t] === "'")) {
|
|
1874
|
+
s = e[t], c += e[t];
|
|
1875
|
+
continue;
|
|
1876
|
+
}
|
|
1877
|
+
if (e[t] === "<" && !o) {
|
|
1878
|
+
if (a && Z(e, "!ENTITY", t)) {
|
|
1879
|
+
t += 7;
|
|
1880
|
+
let i, a;
|
|
1881
|
+
if ([i, a, t] = this.readEntityExp(e, t + 1, this.suppressValidationErr), a.indexOf("&") === -1) {
|
|
1882
|
+
if (this.options.enabled !== !1 && this.options.maxEntityCount != null && r >= this.options.maxEntityCount) throw Error(`Entity count (${r + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
|
1883
|
+
n[i] = a, r++;
|
|
1884
|
+
}
|
|
1885
|
+
} else if (a && Z(e, "!ELEMENT", t)) {
|
|
1886
|
+
t += 8;
|
|
1887
|
+
let { index: n } = this.readElementExp(e, t + 1);
|
|
1888
|
+
t = n;
|
|
1889
|
+
} else if (a && Z(e, "!ATTLIST", t)) t += 8;
|
|
1890
|
+
else if (a && Z(e, "!NOTATION", t)) {
|
|
1891
|
+
t += 9;
|
|
1892
|
+
let { index: n } = this.readNotationExp(e, t + 1, this.suppressValidationErr);
|
|
1893
|
+
t = n;
|
|
1894
|
+
} else if (Z(e, "!--", t)) o = !0;
|
|
1895
|
+
else throw Error("Invalid DOCTYPE");
|
|
1896
|
+
i++, c = "";
|
|
1897
|
+
} else if (e[t] === ">") {
|
|
1898
|
+
if (o ? e[t - 1] === "-" && e[t - 2] === "-" && (o = !1, i--) : i--, i === 0) break;
|
|
1899
|
+
} else e[t] === "[" ? a = !0 : c += e[t];
|
|
1900
|
+
}
|
|
1901
|
+
if (s !== null || i !== 0) throw Error("Unclosed DOCTYPE");
|
|
1021
1902
|
} else throw Error("Invalid Tag instead of DOCTYPE");
|
|
1022
1903
|
return {
|
|
1023
1904
|
entities: n,
|
|
@@ -1025,11 +1906,11 @@ var ft = function(e) {
|
|
|
1025
1906
|
};
|
|
1026
1907
|
}
|
|
1027
1908
|
readEntityExp(e, t) {
|
|
1028
|
-
t =
|
|
1909
|
+
t = X(e, t);
|
|
1029
1910
|
let n = t;
|
|
1030
1911
|
for (; t < e.length && !/\s/.test(e[t]) && e[t] !== "\"" && e[t] !== "'";) t++;
|
|
1031
1912
|
let r = e.substring(n, t);
|
|
1032
|
-
if (
|
|
1913
|
+
if (Kt(r, { xmlVersion: this.xmlVersion }), t = X(e, t), !this.suppressValidationErr) {
|
|
1033
1914
|
if (e.substring(t, t + 6).toUpperCase() === "SYSTEM") throw Error("External entities are not supported");
|
|
1034
1915
|
if (e[t] === "%") throw Error("Parameter entities are not supported");
|
|
1035
1916
|
}
|
|
@@ -1042,16 +1923,16 @@ var ft = function(e) {
|
|
|
1042
1923
|
];
|
|
1043
1924
|
}
|
|
1044
1925
|
readNotationExp(e, t) {
|
|
1045
|
-
t =
|
|
1926
|
+
t = X(e, t);
|
|
1046
1927
|
let n = t;
|
|
1047
1928
|
for (; t < e.length && !/\s/.test(e[t]);) t++;
|
|
1048
1929
|
let r = e.substring(n, t);
|
|
1049
|
-
!this.suppressValidationErr &&
|
|
1930
|
+
!this.suppressValidationErr && Kt(r, { xmlVersion: this.xmlVersion }), t = X(e, t);
|
|
1050
1931
|
let i = e.substring(t, t + 6).toUpperCase();
|
|
1051
1932
|
if (!this.suppressValidationErr && i !== "SYSTEM" && i !== "PUBLIC") throw Error(`Expected SYSTEM or PUBLIC, found "${i}"`);
|
|
1052
|
-
t += i.length, t =
|
|
1933
|
+
t += i.length, t = X(e, t);
|
|
1053
1934
|
let a = null, o = null;
|
|
1054
|
-
if (i === "PUBLIC") [t, a] = this.readIdentifierVal(e, t, "publicIdentifier"), t =
|
|
1935
|
+
if (i === "PUBLIC") [t, a] = this.readIdentifierVal(e, t, "publicIdentifier"), t = X(e, t), (e[t] === "\"" || e[t] === "'") && ([t, o] = this.readIdentifierVal(e, t, "systemIdentifier"));
|
|
1055
1936
|
else if (i === "SYSTEM" && ([t, o] = this.readIdentifierVal(e, t, "systemIdentifier"), !this.suppressValidationErr && !o)) throw Error("Missing mandatory system identifier for SYSTEM notation");
|
|
1056
1937
|
return {
|
|
1057
1938
|
notationName: r,
|
|
@@ -1070,15 +1951,15 @@ var ft = function(e) {
|
|
|
1070
1951
|
return t++, [t, r];
|
|
1071
1952
|
}
|
|
1072
1953
|
readElementExp(e, t) {
|
|
1073
|
-
t =
|
|
1954
|
+
t = X(e, t);
|
|
1074
1955
|
let n = t;
|
|
1075
1956
|
for (; t < e.length && !/\s/.test(e[t]);) t++;
|
|
1076
1957
|
let r = e.substring(n, t);
|
|
1077
|
-
if (!this.suppressValidationErr && !
|
|
1078
|
-
t =
|
|
1958
|
+
if (!this.suppressValidationErr && !Ht(r, { xmlVersion: this.xmlVersion })) throw Error(`Invalid element name: "${r}"`);
|
|
1959
|
+
t = X(e, t);
|
|
1079
1960
|
let i = "";
|
|
1080
|
-
if (e[t] === "E" &&
|
|
1081
|
-
else if (e[t] === "A" &&
|
|
1961
|
+
if (e[t] === "E" && Z(e, "MPTY", t)) t += 4;
|
|
1962
|
+
else if (e[t] === "A" && Z(e, "NY", t)) t += 2;
|
|
1082
1963
|
else if (e[t] === "(") {
|
|
1083
1964
|
t++;
|
|
1084
1965
|
let n = t;
|
|
@@ -1092,25 +1973,25 @@ var ft = function(e) {
|
|
|
1092
1973
|
};
|
|
1093
1974
|
}
|
|
1094
1975
|
readAttlistExp(e, t) {
|
|
1095
|
-
t =
|
|
1976
|
+
t = X(e, t);
|
|
1096
1977
|
let n = t;
|
|
1097
1978
|
for (; t < e.length && !/\s/.test(e[t]);) t++;
|
|
1098
1979
|
let r = e.substring(n, t);
|
|
1099
|
-
for (
|
|
1980
|
+
for (Kt(r, { xmlVersion: this.xmlVersion }), t = X(e, t), n = t; t < e.length && !/\s/.test(e[t]);) t++;
|
|
1100
1981
|
let i = e.substring(n, t);
|
|
1101
|
-
if (!
|
|
1102
|
-
t =
|
|
1982
|
+
if (!Kt(i, { xmlVersion: this.xmlVersion })) throw Error(`Invalid attribute name: "${i}"`);
|
|
1983
|
+
t = X(e, t);
|
|
1103
1984
|
let a = "";
|
|
1104
1985
|
if (e.substring(t, t + 8).toUpperCase() === "NOTATION") {
|
|
1105
|
-
if (a = "NOTATION", t += 8, t =
|
|
1986
|
+
if (a = "NOTATION", t += 8, t = X(e, t), e[t] !== "(") throw Error(`Expected '(', found "${e[t]}"`);
|
|
1106
1987
|
t++;
|
|
1107
1988
|
let n = [];
|
|
1108
1989
|
for (; t < e.length && e[t] !== ")";) {
|
|
1109
1990
|
let r = t;
|
|
1110
1991
|
for (; t < e.length && e[t] !== "|" && e[t] !== ")";) t++;
|
|
1111
1992
|
let i = e.substring(r, t);
|
|
1112
|
-
if (i = i.trim(), !
|
|
1113
|
-
n.push(i), e[t] === "|" && (t++, t =
|
|
1993
|
+
if (i = i.trim(), !Kt(i, { xmlVersion: this.xmlVersion })) throw Error(`Invalid notation name: "${i}"`);
|
|
1994
|
+
n.push(i), e[t] === "|" && (t++, t = X(e, t));
|
|
1114
1995
|
}
|
|
1115
1996
|
if (e[t] !== ")") throw Error("Unterminated list of notations");
|
|
1116
1997
|
t++, a += " (" + n.join("|") + ")";
|
|
@@ -1128,7 +2009,7 @@ var ft = function(e) {
|
|
|
1128
2009
|
"NMTOKENS"
|
|
1129
2010
|
].includes(a.toUpperCase())) throw Error(`Invalid attribute type: "${a}"`);
|
|
1130
2011
|
}
|
|
1131
|
-
t =
|
|
2012
|
+
t = X(e, t);
|
|
1132
2013
|
let o = "";
|
|
1133
2014
|
return e.substring(t, t + 8).toUpperCase() === "#REQUIRED" ? (o = "#REQUIRED", t += 8) : e.substring(t, t + 7).toUpperCase() === "#IMPLIED" ? (o = "#IMPLIED", t += 7) : [t, o] = this.readIdentifierVal(e, t, "ATTLIST"), {
|
|
1134
2015
|
elementName: r,
|
|
@@ -1138,21 +2019,21 @@ var ft = function(e) {
|
|
|
1138
2019
|
index: t
|
|
1139
2020
|
};
|
|
1140
2021
|
}
|
|
1141
|
-
},
|
|
2022
|
+
}, X = (e, t) => {
|
|
1142
2023
|
for (; t < e.length && /\s/.test(e[t]);) t++;
|
|
1143
2024
|
return t;
|
|
1144
2025
|
};
|
|
1145
|
-
function
|
|
2026
|
+
function Z(e, t, n) {
|
|
1146
2027
|
for (let r = 0; r < t.length; r++) if (t[r] !== e[n + r + 1]) return !1;
|
|
1147
2028
|
return !0;
|
|
1148
2029
|
}
|
|
1149
|
-
function
|
|
1150
|
-
if (
|
|
2030
|
+
function Kt(e, t) {
|
|
2031
|
+
if (Ht(e, { xmlVersion: t })) return e;
|
|
1151
2032
|
throw Error(`Invalid entity name ${e}`);
|
|
1152
2033
|
}
|
|
1153
2034
|
//#endregion
|
|
1154
2035
|
//#region ../../node_modules/.pnpm/anynum@1.0.1/node_modules/anynum/digitTable.js
|
|
1155
|
-
var
|
|
2036
|
+
var qt = [
|
|
1156
2037
|
48,
|
|
1157
2038
|
1632,
|
|
1158
2039
|
1776,
|
|
@@ -1214,28 +2095,28 @@ var Et = [
|
|
|
1214
2095
|
124144,
|
|
1215
2096
|
125264,
|
|
1216
2097
|
130032
|
|
1217
|
-
],
|
|
1218
|
-
for (let e of
|
|
2098
|
+
], Jt = /* @__PURE__ */ new Map(), Yt = 65535, Xt = 1632, Zt = (/* @__PURE__ */ new Uint8Array(63904)).fill(255);
|
|
2099
|
+
for (let e of qt) for (let t = 0; t < 10; t++) {
|
|
1219
2100
|
let n = e + t;
|
|
1220
|
-
n <=
|
|
2101
|
+
n <= Yt ? Zt[n - Xt] = t : Jt.set(n, t);
|
|
1221
2102
|
}
|
|
1222
2103
|
//#endregion
|
|
1223
2104
|
//#region ../../node_modules/.pnpm/anynum@1.0.1/node_modules/anynum/anynum.js
|
|
1224
|
-
var
|
|
2105
|
+
var Qt = 48, $t = 57, en = 45, tn = /* @__PURE__ */ new Set([
|
|
1225
2106
|
8722,
|
|
1226
2107
|
65293,
|
|
1227
2108
|
65123
|
|
1228
2109
|
]);
|
|
1229
|
-
function
|
|
2110
|
+
function nn(e) {
|
|
1230
2111
|
if (typeof e != "string") return e;
|
|
1231
2112
|
let t = e.length;
|
|
1232
2113
|
if (t === 0) return e;
|
|
1233
2114
|
let n = -1;
|
|
1234
2115
|
for (let r = 0; r < t; r++) {
|
|
1235
2116
|
let i = e.charCodeAt(r);
|
|
1236
|
-
if (!(i >=
|
|
2117
|
+
if (!(i >= Qt && i <= $t || i === en)) {
|
|
1237
2118
|
if (i < 1632) {
|
|
1238
|
-
if (
|
|
2119
|
+
if (tn.has(i)) {
|
|
1239
2120
|
n = r;
|
|
1240
2121
|
break;
|
|
1241
2122
|
}
|
|
@@ -1246,7 +2127,7 @@ function Nt(e) {
|
|
|
1246
2127
|
let t = e.charCodeAt(r + 1);
|
|
1247
2128
|
if (t >= 56320 && t <= 57343) {
|
|
1248
2129
|
let e = 65536 + (i - 55296 << 10) + (t - 56320);
|
|
1249
|
-
if (
|
|
2130
|
+
if (Jt.has(e)) {
|
|
1250
2131
|
n = r;
|
|
1251
2132
|
break;
|
|
1252
2133
|
}
|
|
@@ -1254,7 +2135,7 @@ function Nt(e) {
|
|
|
1254
2135
|
}
|
|
1255
2136
|
continue;
|
|
1256
2137
|
}
|
|
1257
|
-
if (
|
|
2138
|
+
if (Zt[i - 1632] !== 255 || tn.has(i)) {
|
|
1258
2139
|
n = r;
|
|
1259
2140
|
break;
|
|
1260
2141
|
}
|
|
@@ -1265,19 +2146,19 @@ function Nt(e) {
|
|
|
1265
2146
|
n > 0 && r.push(e.slice(0, n));
|
|
1266
2147
|
for (let i = n; i < t; i++) {
|
|
1267
2148
|
let n = e.charCodeAt(i);
|
|
1268
|
-
if (n >=
|
|
2149
|
+
if (n >= Qt && n <= $t || n === en) {
|
|
1269
2150
|
r.push(e[i]);
|
|
1270
2151
|
continue;
|
|
1271
2152
|
}
|
|
1272
2153
|
if (n < 1632) {
|
|
1273
|
-
r.push(
|
|
2154
|
+
r.push(tn.has(n) ? "-" : e[i]);
|
|
1274
2155
|
continue;
|
|
1275
2156
|
}
|
|
1276
2157
|
if (n >= 55296 && n <= 56319) {
|
|
1277
2158
|
if (i + 1 < t) {
|
|
1278
2159
|
let t = e.charCodeAt(i + 1);
|
|
1279
2160
|
if (t >= 56320 && t <= 57343) {
|
|
1280
|
-
let e = 65536 + (n - 55296 << 10) + (t - 56320), a =
|
|
2161
|
+
let e = 65536 + (n - 55296 << 10) + (t - 56320), a = Jt.get(e);
|
|
1281
2162
|
if (a !== void 0) {
|
|
1282
2163
|
r.push(String.fromCharCode(a + 48)), i++;
|
|
1283
2164
|
continue;
|
|
@@ -1287,18 +2168,18 @@ function Nt(e) {
|
|
|
1287
2168
|
r.push(e[i]);
|
|
1288
2169
|
continue;
|
|
1289
2170
|
}
|
|
1290
|
-
if (
|
|
2171
|
+
if (tn.has(n)) {
|
|
1291
2172
|
r.push("-");
|
|
1292
2173
|
continue;
|
|
1293
2174
|
}
|
|
1294
|
-
let a =
|
|
2175
|
+
let a = Zt[n - Xt];
|
|
1295
2176
|
r.push(a === 255 ? e[i] : String.fromCharCode(a + 48));
|
|
1296
2177
|
}
|
|
1297
2178
|
return r.join("");
|
|
1298
2179
|
}
|
|
1299
2180
|
//#endregion
|
|
1300
|
-
//#region ../../node_modules/.pnpm/strnum@2.4.
|
|
1301
|
-
var
|
|
2181
|
+
//#region ../../node_modules/.pnpm/strnum@2.4.2/node_modules/strnum/strnum.js
|
|
2182
|
+
var rn = /^[-+]?0x[a-fA-F0-9]+$/, an = /^0b[01]+$/, on = /^0o[0-7]+$/, sn = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, cn = {
|
|
1302
2183
|
hex: !0,
|
|
1303
2184
|
binary: !1,
|
|
1304
2185
|
octal: !1,
|
|
@@ -1308,20 +2189,20 @@ var Pt = /^[-+]?0x[a-fA-F0-9]+$/, Ft = /^0b[01]+$/, It = /^0o[0-7]+$/, Lt = /^([
|
|
|
1308
2189
|
infinity: "original",
|
|
1309
2190
|
unicode: !1
|
|
1310
2191
|
};
|
|
1311
|
-
function
|
|
1312
|
-
if (t = Object.assign({},
|
|
2192
|
+
function ln(e, t = {}) {
|
|
2193
|
+
if (t = Object.assign({}, cn, t), !e || typeof e != "string") return e;
|
|
1313
2194
|
let n = e.trim();
|
|
1314
2195
|
if (n.length === 0 || t.skipLike !== void 0 && t.skipLike.test(n)) return e;
|
|
1315
|
-
if (n === "0" || t.unicode && (n =
|
|
1316
|
-
if (t.hex &&
|
|
1317
|
-
if (t.binary &&
|
|
1318
|
-
if (t.octal &&
|
|
1319
|
-
if (!isFinite(n)) return
|
|
1320
|
-
if (n.includes("e") || n.includes("E")) return
|
|
1321
|
-
{
|
|
1322
|
-
let r =
|
|
2196
|
+
if (n === "0" || t.unicode && (n = nn(n), n === "0")) return 0;
|
|
2197
|
+
if (t.hex && rn.test(n)) return pn(n, 16);
|
|
2198
|
+
if (t.binary && an.test(n)) return pn(n, 2);
|
|
2199
|
+
if (t.octal && on.test(n)) return pn(n, 8);
|
|
2200
|
+
if (!isFinite(n)) return mn(e, Number(n), t);
|
|
2201
|
+
if (n.includes("e") || n.includes("E")) return dn(e, n, t);
|
|
2202
|
+
{
|
|
2203
|
+
let r = sn.exec(n);
|
|
1323
2204
|
if (r) {
|
|
1324
|
-
let i = r[1] || "", a = r[2], o =
|
|
2205
|
+
let i = r[1] || "", a = r[2], o = fn(r[3]), s = i ? e[a.length + 1] === "." : e[a.length] === ".";
|
|
1325
2206
|
if (!t.leadingZeros && (a.length > 1 || a.length === 1 && !s)) return e;
|
|
1326
2207
|
{
|
|
1327
2208
|
let r = Number(n), s = String(r);
|
|
@@ -1335,27 +2216,32 @@ function zt(e, t = {}) {
|
|
|
1335
2216
|
return e;
|
|
1336
2217
|
}
|
|
1337
2218
|
}
|
|
1338
|
-
var
|
|
1339
|
-
function
|
|
2219
|
+
var un = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
|
2220
|
+
function dn(e, t, n) {
|
|
1340
2221
|
if (!n.eNotation) return e;
|
|
1341
|
-
let r = t.match(
|
|
2222
|
+
let r = t.match(un);
|
|
1342
2223
|
if (r) {
|
|
1343
2224
|
let i = r[1] || "", a = r[3].indexOf("e") === -1 ? "E" : "e", o = r[2], s = i ? e[o.length + 1] === a : e[o.length] === a;
|
|
1344
2225
|
return o.length > 1 && s ? e : o.length === 1 && (r[3].startsWith(`.${a}`) || r[3][0] === a) ? Number(t) : o.length > 0 ? n.leadingZeros && !s ? (t = (r[1] || "") + r[3], Number(t)) : e : Number(t);
|
|
1345
2226
|
}
|
|
1346
2227
|
return e;
|
|
1347
2228
|
}
|
|
1348
|
-
function
|
|
1349
|
-
|
|
2229
|
+
function fn(e) {
|
|
2230
|
+
if (e && e.indexOf(".") !== -1) {
|
|
2231
|
+
let t = e.length;
|
|
2232
|
+
for (; t > 0 && e.charCodeAt(t - 1) === 48;) t--;
|
|
2233
|
+
return e = e.slice(0, t), e === "." ? e = "0" : e[0] === "." ? e = "0" + e : e[e.length - 1] === "." && (e = e.substring(0, e.length - 1)), e;
|
|
2234
|
+
}
|
|
2235
|
+
return e;
|
|
1350
2236
|
}
|
|
1351
|
-
function
|
|
2237
|
+
function pn(e, t) {
|
|
1352
2238
|
let n = e.trim();
|
|
1353
2239
|
if ((t === 2 || t === 8) && (e = n.substring(2)), parseInt) return parseInt(e, t);
|
|
1354
2240
|
if (Number.parseInt) return Number.parseInt(e, t);
|
|
1355
2241
|
if (window && window.parseInt) return window.parseInt(e, t);
|
|
1356
2242
|
throw Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
|
1357
2243
|
}
|
|
1358
|
-
function
|
|
2244
|
+
function mn(e, t, n) {
|
|
1359
2245
|
let r = t === Infinity;
|
|
1360
2246
|
switch (n.infinity.toLowerCase()) {
|
|
1361
2247
|
case "null": return null;
|
|
@@ -1365,15 +2251,15 @@ function Wt(e, t, n) {
|
|
|
1365
2251
|
}
|
|
1366
2252
|
}
|
|
1367
2253
|
//#endregion
|
|
1368
|
-
//#region ../../node_modules/.pnpm/fast-xml-parser@5.
|
|
1369
|
-
function
|
|
2254
|
+
//#region ../../node_modules/.pnpm/fast-xml-parser@5.11.1/node_modules/fast-xml-parser/src/ignoreAttributes.js
|
|
2255
|
+
function hn(e) {
|
|
1370
2256
|
return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
|
|
1371
2257
|
for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
|
|
1372
2258
|
} : () => !1;
|
|
1373
2259
|
}
|
|
1374
2260
|
//#endregion
|
|
1375
2261
|
//#region ../../node_modules/.pnpm/path-expression-matcher@1.6.2/node_modules/path-expression-matcher/src/Expression.js
|
|
1376
|
-
var
|
|
2262
|
+
var gn = class {
|
|
1377
2263
|
constructor(e, t = {}, n) {
|
|
1378
2264
|
this.pattern = e, this.separator = t.separator || ".", this.segments = this._parse(e), this.data = n, this._hasDeepWildcard = this.segments.some((e) => e.type === "deep-wildcard"), this._hasAttributeCondition = this.segments.some((e) => e.attrName !== void 0), this._hasPositionSelector = this.segments.some((e) => e.position !== void 0);
|
|
1379
2265
|
}
|
|
@@ -1404,10 +2290,12 @@ var Kt = class {
|
|
|
1404
2290
|
].includes(n) || /^nth\(\d+\)$/.test(n) ? (s = t, c = n) : s = o;
|
|
1405
2291
|
} else s = o;
|
|
1406
2292
|
if (!s) throw Error(`Invalid segment pattern: ${e}`);
|
|
1407
|
-
if (t.tag = s, a && (t.namespace = a), n)
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
2293
|
+
if (t.tag = s, a && (t.namespace = a), n) {
|
|
2294
|
+
if (n.includes("=")) {
|
|
2295
|
+
let e = n.indexOf("=");
|
|
2296
|
+
t.attrName = n.substring(0, e).trim(), t.attrValue = n.substring(e + 1).trim();
|
|
2297
|
+
} else t.attrName = n.trim();
|
|
2298
|
+
}
|
|
1411
2299
|
if (c) {
|
|
1412
2300
|
let e = c.match(/^nth\((\d+)\)$/);
|
|
1413
2301
|
e ? (t.position = "nth", t.positionValue = parseInt(e[1], 10)) : t.position = c;
|
|
@@ -1429,7 +2317,7 @@ var Kt = class {
|
|
|
1429
2317
|
toString() {
|
|
1430
2318
|
return this.pattern;
|
|
1431
2319
|
}
|
|
1432
|
-
},
|
|
2320
|
+
}, _n = class {
|
|
1433
2321
|
constructor() {
|
|
1434
2322
|
this._byDepthAndTag = /* @__PURE__ */ new Map(), this._wildcardByDepth = /* @__PURE__ */ new Map(), this._deepWildcards = [], this._deepByTerminalTag = /* @__PURE__ */ new Map(), this._patterns = /* @__PURE__ */ new Set(), this._sealed = !1;
|
|
1435
2323
|
}
|
|
@@ -1487,7 +2375,7 @@ var Kt = class {
|
|
|
1487
2375
|
for (let t = 0; t < this._deepWildcards.length; t++) if (e.matches(this._deepWildcards[t])) return this._deepWildcards[t];
|
|
1488
2376
|
return null;
|
|
1489
2377
|
}
|
|
1490
|
-
},
|
|
2378
|
+
}, vn = class {
|
|
1491
2379
|
constructor(e) {
|
|
1492
2380
|
this._matcher = e;
|
|
1493
2381
|
}
|
|
@@ -1544,9 +2432,9 @@ var Kt = class {
|
|
|
1544
2432
|
matchesAny(e) {
|
|
1545
2433
|
return e.matchesAny(this._matcher);
|
|
1546
2434
|
}
|
|
1547
|
-
},
|
|
2435
|
+
}, yn = class {
|
|
1548
2436
|
constructor(e = {}) {
|
|
1549
|
-
this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new
|
|
2437
|
+
this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new vn(this), this._keptAttrs = [];
|
|
1550
2438
|
}
|
|
1551
2439
|
push(e, t = null, n = null, r = null) {
|
|
1552
2440
|
this._pathStringCache = null, this.path.length > 0 && (this.path[this.path.length - 1].values = void 0);
|
|
@@ -1697,7 +2585,7 @@ var Kt = class {
|
|
|
1697
2585
|
readOnly() {
|
|
1698
2586
|
return this._view;
|
|
1699
2587
|
}
|
|
1700
|
-
},
|
|
2588
|
+
}, bn = [
|
|
1701
2589
|
{
|
|
1702
2590
|
id: "html-script-open",
|
|
1703
2591
|
description: "<script opening tag",
|
|
@@ -1783,7 +2671,7 @@ var Kt = class {
|
|
|
1783
2671
|
description: "<form tag — can be used for phishing / credential harvesting injection",
|
|
1784
2672
|
pattern: /<form[\s>/]/i
|
|
1785
2673
|
}
|
|
1786
|
-
],
|
|
2674
|
+
], xn = [
|
|
1787
2675
|
{
|
|
1788
2676
|
id: "xml-cdata-injection",
|
|
1789
2677
|
description: "CDATA section injection: <![CDATA[ breaks out of text node context",
|
|
@@ -1844,7 +2732,7 @@ var Kt = class {
|
|
|
1844
2732
|
description: "?> closes an enclosing processing instruction",
|
|
1845
2733
|
pattern: /\?>/
|
|
1846
2734
|
}
|
|
1847
|
-
],
|
|
2735
|
+
], Sn = [
|
|
1848
2736
|
{
|
|
1849
2737
|
id: "svg-script-element",
|
|
1850
2738
|
description: "<script element inside SVG executes JavaScript",
|
|
@@ -1910,7 +2798,7 @@ var Kt = class {
|
|
|
1910
2798
|
description: "style= attribute containing javascript: (e.g. background:url(javascript:...))",
|
|
1911
2799
|
pattern: /style\s*=[\s\S]{0,60}javascript\s*:/i
|
|
1912
2800
|
}
|
|
1913
|
-
],
|
|
2801
|
+
], Cn = [
|
|
1914
2802
|
{
|
|
1915
2803
|
id: "sql-block-comment-open",
|
|
1916
2804
|
description: "SQL block comment open: /* ... */ — unusual in legitimate user text",
|
|
@@ -1986,7 +2874,7 @@ var Kt = class {
|
|
|
1986
2874
|
description: "INFORMATION_SCHEMA — reconnaissance query for table/column enumeration",
|
|
1987
2875
|
pattern: /\bINFORMATION_SCHEMA\b/i
|
|
1988
2876
|
}
|
|
1989
|
-
],
|
|
2877
|
+
], wn = [
|
|
1990
2878
|
{
|
|
1991
2879
|
id: "shell-path-traversal-unix",
|
|
1992
2880
|
description: "Unix path traversal: ../ — climbing the directory tree",
|
|
@@ -2077,7 +2965,7 @@ var Kt = class {
|
|
|
2077
2965
|
description: "curl/wget with URL or flags — can exfiltrate data or download payloads",
|
|
2078
2966
|
pattern: /\b(?:curl|wget)\s+(?:https?:\/\/|ftp:\/\/|-)/i
|
|
2079
2967
|
}
|
|
2080
|
-
],
|
|
2968
|
+
], Tn = [
|
|
2081
2969
|
{
|
|
2082
2970
|
id: "redos-nested-quantifier-plus",
|
|
2083
2971
|
description: "Nested + quantifier inside a group with outer quantifier: (a+)+, (.+b)*, etc.",
|
|
@@ -2118,71 +3006,71 @@ var Kt = class {
|
|
|
2118
3006
|
description: "Long alternation with many similar branches — polynomial backtracking risk",
|
|
2119
3007
|
pattern: /\([^)]{0,200}(?:\|[^|)]{0,50}){9,}\)/
|
|
2120
3008
|
}
|
|
2121
|
-
],
|
|
3009
|
+
], Q = "[\"'\\s]*:", En = [
|
|
2122
3010
|
{
|
|
2123
3011
|
id: "nosql-where-operator",
|
|
2124
3012
|
description: "$where — executes arbitrary JavaScript server-side in MongoDB",
|
|
2125
|
-
pattern: RegExp(`\\$where${
|
|
3013
|
+
pattern: RegExp(`\\$where${Q}`, "i")
|
|
2126
3014
|
},
|
|
2127
3015
|
{
|
|
2128
3016
|
id: "nosql-ne-operator",
|
|
2129
3017
|
description: "$ne — \"not equal\" operator used to bypass equality checks",
|
|
2130
|
-
pattern: RegExp(`\\$ne${
|
|
3018
|
+
pattern: RegExp(`\\$ne${Q}`, "i")
|
|
2131
3019
|
},
|
|
2132
3020
|
{
|
|
2133
3021
|
id: "nosql-gt-operator",
|
|
2134
3022
|
description: "$gt — \"greater than\" used to bypass password/value checks",
|
|
2135
|
-
pattern: RegExp(`\\$gte?${
|
|
3023
|
+
pattern: RegExp(`\\$gte?${Q}`, "i")
|
|
2136
3024
|
},
|
|
2137
3025
|
{
|
|
2138
3026
|
id: "nosql-lt-operator",
|
|
2139
3027
|
description: "$lt / $lte — \"less than\" bypass variants",
|
|
2140
|
-
pattern: RegExp(`\\$lte?${
|
|
3028
|
+
pattern: RegExp(`\\$lte?${Q}`, "i")
|
|
2141
3029
|
},
|
|
2142
3030
|
{
|
|
2143
3031
|
id: "nosql-regex-operator",
|
|
2144
3032
|
description: "$regex — can be used to extract data character by character (blind injection)",
|
|
2145
|
-
pattern: RegExp(`\\$regex${
|
|
3033
|
+
pattern: RegExp(`\\$regex${Q}`, "i")
|
|
2146
3034
|
},
|
|
2147
3035
|
{
|
|
2148
3036
|
id: "nosql-or-operator",
|
|
2149
3037
|
description: "$or — logical OR; used to create always-true conditions",
|
|
2150
|
-
pattern: RegExp(`\\$or${
|
|
3038
|
+
pattern: RegExp(`\\$or${Q}\\s*\\[`, "i")
|
|
2151
3039
|
},
|
|
2152
3040
|
{
|
|
2153
3041
|
id: "nosql-and-operator",
|
|
2154
3042
|
description: "$and — logical AND operator injection",
|
|
2155
|
-
pattern: RegExp(`\\$and${
|
|
3043
|
+
pattern: RegExp(`\\$and${Q}\\s*\\[`, "i")
|
|
2156
3044
|
},
|
|
2157
3045
|
{
|
|
2158
3046
|
id: "nosql-nor-operator",
|
|
2159
3047
|
description: "$nor — logical NOR operator injection",
|
|
2160
|
-
pattern: RegExp(`\\$nor${
|
|
3048
|
+
pattern: RegExp(`\\$nor${Q}\\s*\\[`, "i")
|
|
2161
3049
|
},
|
|
2162
3050
|
{
|
|
2163
3051
|
id: "nosql-exists-operator",
|
|
2164
3052
|
description: "$exists — can enumerate fields to determine schema",
|
|
2165
|
-
pattern: RegExp(`\\$exists${
|
|
3053
|
+
pattern: RegExp(`\\$exists${Q}`, "i")
|
|
2166
3054
|
},
|
|
2167
3055
|
{
|
|
2168
3056
|
id: "nosql-in-operator",
|
|
2169
3057
|
description: "$in — matches any value in a list; can enumerate values",
|
|
2170
|
-
pattern: RegExp(`\\$in${
|
|
3058
|
+
pattern: RegExp(`\\$in${Q}\\s*\\[`, "i")
|
|
2171
3059
|
},
|
|
2172
3060
|
{
|
|
2173
3061
|
id: "nosql-expr-operator",
|
|
2174
3062
|
description: "$expr — allows aggregation expressions in queries (MongoDB 3.6+)",
|
|
2175
|
-
pattern: RegExp(`\\$expr${
|
|
3063
|
+
pattern: RegExp(`\\$expr${Q}`, "i")
|
|
2176
3064
|
},
|
|
2177
3065
|
{
|
|
2178
3066
|
id: "nosql-function-operator",
|
|
2179
3067
|
description: "$function — executes arbitrary JavaScript in MongoDB 4.4+",
|
|
2180
|
-
pattern: RegExp(`\\$function${
|
|
3068
|
+
pattern: RegExp(`\\$function${Q}`, "i")
|
|
2181
3069
|
},
|
|
2182
3070
|
{
|
|
2183
3071
|
id: "nosql-accumulator-operator",
|
|
2184
3072
|
description: "$accumulator — custom aggregation with arbitrary JS execution",
|
|
2185
|
-
pattern: RegExp(`\\$accumulator${
|
|
3073
|
+
pattern: RegExp(`\\$accumulator${Q}`, "i")
|
|
2186
3074
|
},
|
|
2187
3075
|
{
|
|
2188
3076
|
id: "nosql-proto-pollution",
|
|
@@ -2199,7 +3087,7 @@ var Kt = class {
|
|
|
2199
3087
|
description: "[\"__proto__\"] — bracket-notation prototype pollution",
|
|
2200
3088
|
pattern: /\[["']__proto__["']\]/
|
|
2201
3089
|
}
|
|
2202
|
-
],
|
|
3090
|
+
], Dn = [
|
|
2203
3091
|
{
|
|
2204
3092
|
id: "log-crlf-injection",
|
|
2205
3093
|
description: "CRLF injection: literal \\r or \\n embeds fake log lines",
|
|
@@ -2260,7 +3148,7 @@ var Kt = class {
|
|
|
2260
3148
|
description: "ANSI escape sequence: ESC[ — can manipulate terminal output when logs are tailed",
|
|
2261
3149
|
pattern: /\x1b\[/
|
|
2262
3150
|
}
|
|
2263
|
-
],
|
|
3151
|
+
], On = [
|
|
2264
3152
|
{
|
|
2265
3153
|
id: "sql-line-comment",
|
|
2266
3154
|
description: "SQL line comment: -- followed by whitespace or end of string",
|
|
@@ -2276,22 +3164,22 @@ var Kt = class {
|
|
|
2276
3164
|
description: "Hex-encoded string injection: 0x41414141 style (MySQL)",
|
|
2277
3165
|
pattern: /\b0x[0-9a-f]{4,}/i
|
|
2278
3166
|
}
|
|
2279
|
-
],
|
|
2280
|
-
|
|
2281
|
-
HTML:
|
|
2282
|
-
XML:
|
|
2283
|
-
SVG:
|
|
2284
|
-
SQL:
|
|
2285
|
-
"SQL-STRICT":
|
|
2286
|
-
SHELL:
|
|
2287
|
-
REDOS:
|
|
2288
|
-
NOSQL:
|
|
2289
|
-
LOG:
|
|
3167
|
+
], kn = [...Cn, ...On];
|
|
3168
|
+
bn.label = "HTML", xn.label = "XML", Sn.label = "SVG", Cn.label = "SQL", kn.label = "SQL-STRICT", wn.label = "SHELL", Tn.label = "REDOS", En.label = "NOSQL", Dn.label = "LOG", Object.freeze({
|
|
3169
|
+
HTML: bn,
|
|
3170
|
+
XML: xn,
|
|
3171
|
+
SVG: Sn,
|
|
3172
|
+
SQL: Cn,
|
|
3173
|
+
"SQL-STRICT": kn,
|
|
3174
|
+
SHELL: wn,
|
|
3175
|
+
REDOS: Tn,
|
|
3176
|
+
NOSQL: En,
|
|
3177
|
+
LOG: Dn
|
|
2290
3178
|
});
|
|
2291
|
-
function
|
|
3179
|
+
function An(e) {
|
|
2292
3180
|
if (typeof e != "string") throw TypeError(`is-unsafe: first argument must be a string, got ${typeof e}`);
|
|
2293
3181
|
}
|
|
2294
|
-
function
|
|
3182
|
+
function jn(e) {
|
|
2295
3183
|
if (!(e instanceof RegExp)) {
|
|
2296
3184
|
if (Array.isArray(e)) {
|
|
2297
3185
|
if (e.length === 0) throw TypeError("is-unsafe: context must not be an empty array");
|
|
@@ -2303,7 +3191,7 @@ function cn(e) {
|
|
|
2303
3191
|
throw TypeError(`is-unsafe: second argument must be a PatternList (e.g. HTML), an array of PatternLists (e.g. [HTML, XML]), or a RegExp. Got: ${typeof e}`);
|
|
2304
3192
|
}
|
|
2305
3193
|
}
|
|
2306
|
-
function
|
|
3194
|
+
function Mn(e) {
|
|
2307
3195
|
return e instanceof RegExp ? {
|
|
2308
3196
|
lists: null,
|
|
2309
3197
|
regex: e
|
|
@@ -2315,7 +3203,7 @@ function ln(e) {
|
|
|
2315
3203
|
regex: null
|
|
2316
3204
|
};
|
|
2317
3205
|
}
|
|
2318
|
-
function
|
|
3206
|
+
function Nn(e, t) {
|
|
2319
3207
|
let n = t.label ?? "CUSTOM";
|
|
2320
3208
|
for (let r of t) if (r.pattern.test(e)) return {
|
|
2321
3209
|
context: n,
|
|
@@ -2325,16 +3213,16 @@ function un(e, t) {
|
|
|
2325
3213
|
};
|
|
2326
3214
|
return null;
|
|
2327
3215
|
}
|
|
2328
|
-
function
|
|
2329
|
-
|
|
2330
|
-
let { lists: n, regex: r } =
|
|
3216
|
+
function Pn(e, t) {
|
|
3217
|
+
An(e), jn(t);
|
|
3218
|
+
let { lists: n, regex: r } = Mn(t);
|
|
2331
3219
|
if (r) return r.test(e);
|
|
2332
|
-
for (let t of n) if (
|
|
3220
|
+
for (let t of n) if (Nn(e, t) !== null) return !0;
|
|
2333
3221
|
return !1;
|
|
2334
3222
|
}
|
|
2335
3223
|
//#endregion
|
|
2336
|
-
//#region ../../node_modules/.pnpm/fast-xml-parser@5.
|
|
2337
|
-
function
|
|
3224
|
+
//#region ../../node_modules/.pnpm/fast-xml-parser@5.11.1/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js
|
|
3225
|
+
function Fn(e, t) {
|
|
2338
3226
|
if (!e) return {};
|
|
2339
3227
|
let n = t.attributesGroupName ? e[t.attributesGroupName] : e;
|
|
2340
3228
|
if (!n) return {};
|
|
@@ -2345,7 +3233,7 @@ function fn(e, t) {
|
|
|
2345
3233
|
} else r[e] = n[e];
|
|
2346
3234
|
return r;
|
|
2347
3235
|
}
|
|
2348
|
-
function
|
|
3236
|
+
function In(e) {
|
|
2349
3237
|
if (!e || typeof e != "string") return;
|
|
2350
3238
|
let t = e.indexOf(":");
|
|
2351
3239
|
if (t !== -1 && t > 0) {
|
|
@@ -2353,14 +3241,14 @@ function pn(e) {
|
|
|
2353
3241
|
if (n !== "xmlns") return n;
|
|
2354
3242
|
}
|
|
2355
3243
|
}
|
|
2356
|
-
var
|
|
3244
|
+
var Ln = class {
|
|
2357
3245
|
constructor(e, t) {
|
|
2358
|
-
this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.parseXml =
|
|
2359
|
-
let n = { ...
|
|
3246
|
+
this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = Hn, this.parseTextData = Rn, this.resolveNameSpace = zn, this.buildAttributesMap = Vn, this.isItStopNode = Kn, this.replaceEntitiesValue = Wn, this.readStopNodeData = Xn, this.saveTextToParentTag = Gn, this.addChild = Un, this.ignoreAttributesFn = hn(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.doctypefound = !1;
|
|
3247
|
+
let n = { ...ht };
|
|
2360
3248
|
this.options.entityDecoder ? this.entityDecoder = this.options.entityDecoder : (typeof this.options.htmlEntities == "object" ? n = this.options.htmlEntities : this.options.htmlEntities === !0 && (n = {
|
|
2361
|
-
...
|
|
2362
|
-
|
|
2363
|
-
}), this.entityDecoder = new
|
|
3249
|
+
...gt,
|
|
3250
|
+
...mt
|
|
3251
|
+
}), this.entityDecoder = new Et({
|
|
2364
3252
|
namedEntities: {
|
|
2365
3253
|
...n,
|
|
2366
3254
|
...t
|
|
@@ -2371,27 +3259,27 @@ var mn = class {
|
|
|
2371
3259
|
maxExpandedLength: this.options.processEntities.maxExpandedLength,
|
|
2372
3260
|
applyLimitsTo: this.options.processEntities.appliesTo
|
|
2373
3261
|
},
|
|
2374
|
-
onInputEntity: (e, t) =>
|
|
2375
|
-
})), this.matcher = new
|
|
3262
|
+
onInputEntity: (e, t) => Pn(t, [bn, xn]) ? _t.BLOCK : _t.ALLOW
|
|
3263
|
+
})), this.matcher = new yn(), this.readonlyMatcher = this.matcher.readOnly(), this.isCurrentNodeStopNode = !1, this.stopNodeExpressionsSet = new _n();
|
|
2376
3264
|
let r = this.options.stopNodes;
|
|
2377
3265
|
if (r && r.length > 0) {
|
|
2378
3266
|
for (let e = 0; e < r.length; e++) {
|
|
2379
3267
|
let t = r[e];
|
|
2380
|
-
typeof t == "string" ? this.stopNodeExpressionsSet.add(new
|
|
3268
|
+
typeof t == "string" ? this.stopNodeExpressionsSet.add(new gn(t)) : t instanceof gn && this.stopNodeExpressionsSet.add(t);
|
|
2381
3269
|
}
|
|
2382
3270
|
this.stopNodeExpressionsSet.seal();
|
|
2383
3271
|
}
|
|
2384
3272
|
}
|
|
2385
3273
|
};
|
|
2386
|
-
function
|
|
3274
|
+
function Rn(e, t, n, r, i, a, o) {
|
|
2387
3275
|
let s = this.options;
|
|
2388
3276
|
if (e !== void 0 && (s.trimValues && !r && (e = e.trim()), e.length > 0)) {
|
|
2389
3277
|
o || (e = this.replaceEntitiesValue(e, t, n));
|
|
2390
3278
|
let r = s.jPath ? n.toString() : n, c = s.tagValueProcessor(t, e, r, i, a);
|
|
2391
|
-
return c == null ? e : typeof c != typeof e || c !== e ? c : s.trimValues || e.trim() === e ?
|
|
3279
|
+
return c == null ? e : typeof c != typeof e || c !== e ? c : s.trimValues || e.trim() === e ? Zn(e, s.parseTagValue, s.numberParseOptions) : e;
|
|
2392
3280
|
}
|
|
2393
3281
|
}
|
|
2394
|
-
function
|
|
3282
|
+
function zn(e) {
|
|
2395
3283
|
if (this.options.removeNSPrefix) {
|
|
2396
3284
|
let t = e.split(":"), n = e.charAt(0) === "/" ? "/" : "";
|
|
2397
3285
|
if (t[0] === "xmlns") return "";
|
|
@@ -2399,11 +3287,11 @@ function gn(e) {
|
|
|
2399
3287
|
}
|
|
2400
3288
|
return e;
|
|
2401
3289
|
}
|
|
2402
|
-
var
|
|
2403
|
-
function
|
|
3290
|
+
var Bn = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
|
|
3291
|
+
function Vn(e, t, n, r = !1) {
|
|
2404
3292
|
let i = this.options;
|
|
2405
3293
|
if (r === !0 || i.ignoreAttributes !== !0 && typeof e == "string") {
|
|
2406
|
-
let r =
|
|
3294
|
+
let r = Ye(e, Bn), a = r.length, o = {}, s = Array(a), c = !1, l = {};
|
|
2407
3295
|
for (let e = 0; e < a; e++) {
|
|
2408
3296
|
let t = this.resolveNameSpace(r[e][1]), a = r[e][4];
|
|
2409
3297
|
if (t.length && a !== void 0) {
|
|
@@ -2417,10 +3305,12 @@ function vn(e, t, n, r = !1) {
|
|
|
2417
3305
|
let t = this.resolveNameSpace(r[e][1]);
|
|
2418
3306
|
if (this.ignoreAttributesFn(t, u)) continue;
|
|
2419
3307
|
let n = i.attributeNamePrefix + t;
|
|
2420
|
-
if (t.length)
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
3308
|
+
if (t.length) {
|
|
3309
|
+
if (i.transformAttributeName && (n = i.transformAttributeName(n)), n = $n(n, i), r[e][4] !== void 0) {
|
|
3310
|
+
let r = s[e], a = i.attributeValueProcessor(t, r, u);
|
|
3311
|
+
a == null ? o[n] = r : typeof a != typeof r || a !== r ? o[n] = a : o[n] = Zn(r, i.parseAttributeValue, i.numberParseOptions), d = !0;
|
|
3312
|
+
} else i.allowBooleanAttributes && (o[n] = !0, d = !0);
|
|
3313
|
+
}
|
|
2424
3314
|
}
|
|
2425
3315
|
if (!d) return;
|
|
2426
3316
|
if (i.attributesGroupName && !i.preserveOrder) {
|
|
@@ -2430,25 +3320,25 @@ function vn(e, t, n, r = !1) {
|
|
|
2430
3320
|
return o;
|
|
2431
3321
|
}
|
|
2432
3322
|
}
|
|
2433
|
-
var
|
|
3323
|
+
var Hn = function(e) {
|
|
2434
3324
|
e = e.replace(/\r\n?/g, "\n");
|
|
2435
|
-
let t = new
|
|
3325
|
+
let t = new Y("!xml"), n = t, r = "";
|
|
2436
3326
|
this.matcher.reset(), this.entityDecoder.reset(), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.doctypefound = !1;
|
|
2437
|
-
let i = this.options, a = new
|
|
3327
|
+
let i = this.options, a = new Gt(i.processEntities), o = e.length;
|
|
2438
3328
|
for (let s = 0; s < o; s++) if (e[s] === "<") {
|
|
2439
3329
|
let c = e.charCodeAt(s + 1);
|
|
2440
3330
|
if (c === 47) {
|
|
2441
|
-
let
|
|
3331
|
+
let a = $(e, ">", s, "Closing Tag is not closed."), o = e.substring(s + 2, a).trim();
|
|
2442
3332
|
if (i.removeNSPrefix) {
|
|
2443
|
-
let e =
|
|
2444
|
-
e !== -1 && (
|
|
3333
|
+
let e = o.indexOf(":");
|
|
3334
|
+
e !== -1 && (o = o.substr(e + 1));
|
|
2445
3335
|
}
|
|
2446
|
-
|
|
2447
|
-
let
|
|
2448
|
-
if (
|
|
2449
|
-
|
|
3336
|
+
o = Qn(i.transformTagName, o, "", i).tagName, n && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher));
|
|
3337
|
+
let c = this.matcher.getCurrentTag();
|
|
3338
|
+
if (o && i.unpairedTagsSet.has(o)) throw Error(`Unpaired tag can not be used as closing tag: </${o}>`);
|
|
3339
|
+
c && i.unpairedTagsSet.has(c) && (this.matcher.pop(), this.tagsNodeStack.pop()), this.matcher.pop(), this.isCurrentNodeStopNode = !1, n = this.tagsNodeStack.pop() || t, i.captureMetaData && n && n.addEndIndex(a + 1), r = "", s = a;
|
|
2450
3340
|
} else if (c === 63) {
|
|
2451
|
-
let t =
|
|
3341
|
+
let t = Yn(e, s, !1, "?>");
|
|
2452
3342
|
if (!t) throw Error("Pi Tag is not closed.");
|
|
2453
3343
|
r = this.saveTextToParentTag(r, n, this.readonlyMatcher);
|
|
2454
3344
|
let o = this.buildAttributesMap(t.tagExp, this.matcher, t.tagName, !0);
|
|
@@ -2457,12 +3347,12 @@ var yn = function(e) {
|
|
|
2457
3347
|
this.entityDecoder.setXmlVersion(Number(e) || 1), a.setXmlVersion(Number(e) || 1);
|
|
2458
3348
|
}
|
|
2459
3349
|
if (!(i.ignoreDeclaration && t.tagName === "?xml" || i.ignorePiTags)) {
|
|
2460
|
-
let e = new
|
|
2461
|
-
e.add(i.textNodeName, ""), t.tagName !== t.tagExp && t.attrExpPresent && i.ignoreAttributes !== !0 && (e[":@"] = o), this.addChild(n, e, this.readonlyMatcher, s);
|
|
3350
|
+
let e = new Y(t.tagName);
|
|
3351
|
+
e.add(i.textNodeName, ""), t.tagName !== t.tagExp && t.attrExpPresent && i.ignoreAttributes !== !0 && (e[":@"] = o), this.addChild(n, e, this.readonlyMatcher, s), i.captureMetaData && n.addEndIndex(t.closeIndex + 2);
|
|
2462
3352
|
}
|
|
2463
3353
|
s = t.closeIndex + 1;
|
|
2464
3354
|
} else if (c === 33 && e.charCodeAt(s + 2) === 45 && e.charCodeAt(s + 3) === 45) {
|
|
2465
|
-
let t =
|
|
3355
|
+
let t = $(e, "-->", s + 4, "Comment is not closed.");
|
|
2466
3356
|
if (i.commentPropName) {
|
|
2467
3357
|
let a = e.substring(s + 4, t - 2);
|
|
2468
3358
|
r = this.saveTextToParentTag(r, n, this.readonlyMatcher), n.add(i.commentPropName, [{ [i.textNodeName]: a }]);
|
|
@@ -2474,25 +3364,25 @@ var yn = function(e) {
|
|
|
2474
3364
|
let t = a.readDocType(e, s);
|
|
2475
3365
|
this.entityDecoder.addInputEntities(t.entities), s = t.i;
|
|
2476
3366
|
} else if (c === 33 && e.charCodeAt(s + 2) === 91) {
|
|
2477
|
-
let t =
|
|
3367
|
+
let t = $(e, "]]>", s, "CDATA is not closed.") - 2, a = e.substring(s + 9, t);
|
|
2478
3368
|
r = this.saveTextToParentTag(r, n, this.readonlyMatcher);
|
|
2479
3369
|
let o = this.parseTextData(a, n.tagname, this.readonlyMatcher, !0, !1, !0, !0);
|
|
2480
3370
|
o ??= "", i.cdataPropName ? n.add(i.cdataPropName, [{ [i.textNodeName]: a }]) : n.add(i.textNodeName, o), s = t + 2;
|
|
2481
3371
|
} else {
|
|
2482
|
-
let a =
|
|
3372
|
+
let a = Yn(e, s, i.removeNSPrefix);
|
|
2483
3373
|
if (!a) {
|
|
2484
3374
|
let t = e.substring(Math.max(0, s - 50), Math.min(o, s + 50));
|
|
2485
3375
|
throw Error(`readTagExp returned undefined at position ${s}. Context: "${t}"`);
|
|
2486
3376
|
}
|
|
2487
3377
|
let c = a.tagName, l = a.rawTagName, u = a.tagExp, d = a.attrExpPresent, f = a.closeIndex;
|
|
2488
|
-
if ({tagName: c, tagExp: u} =
|
|
3378
|
+
if ({tagName: c, tagExp: u} = Qn(i.transformTagName, c, u, i), i.strictReservedNames && (c === i.commentPropName || c === i.cdataPropName || c === i.textNodeName || c === i.attributesGroupName)) throw Error(`Invalid tag name: ${c}`);
|
|
2489
3379
|
n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher, !1));
|
|
2490
3380
|
let p = n;
|
|
2491
3381
|
p && i.unpairedTagsSet.has(p.tagname) && (n = this.tagsNodeStack.pop(), this.matcher.pop());
|
|
2492
3382
|
let m = !1;
|
|
2493
3383
|
u.length > 0 && u.lastIndexOf("/") === u.length - 1 && (m = !0, c[c.length - 1] === "/" ? (c = c.substr(0, c.length - 1), u = c) : u = u.substr(0, u.length - 1), d = c !== u);
|
|
2494
3384
|
let h = null, g;
|
|
2495
|
-
g =
|
|
3385
|
+
g = In(l), c !== t.tagname && this.matcher.push(c, {}, g), c !== u && d && (h = this.buildAttributesMap(u, this.matcher, c), h && Fn(h, i)), c !== t.tagname && (this.isCurrentNodeStopNode = this.isItStopNode());
|
|
2496
3386
|
let _ = s;
|
|
2497
3387
|
if (this.isCurrentNodeStopNode) {
|
|
2498
3388
|
let t = "";
|
|
@@ -2503,19 +3393,19 @@ var yn = function(e) {
|
|
|
2503
3393
|
if (!n) throw Error(`Unexpected end of ${l}`);
|
|
2504
3394
|
s = n.i, t = n.tagContent;
|
|
2505
3395
|
}
|
|
2506
|
-
let r = new
|
|
2507
|
-
h && (r[":@"] = h), r.add(i.textNodeName, t), this.matcher.pop(), this.isCurrentNodeStopNode = !1, this.addChild(n, r, this.readonlyMatcher, _);
|
|
3396
|
+
let r = new Y(c);
|
|
3397
|
+
h && (r[":@"] = h), r.add(i.textNodeName, t), this.matcher.pop(), this.isCurrentNodeStopNode = !1, this.addChild(n, r, this.readonlyMatcher, _), i.captureMetaData && n.addEndIndex(s + 1);
|
|
2508
3398
|
} else {
|
|
2509
3399
|
if (m) {
|
|
2510
|
-
({tagName: c, tagExp: u} =
|
|
2511
|
-
let e = new
|
|
2512
|
-
h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), this.matcher.pop(), this.isCurrentNodeStopNode = !1;
|
|
3400
|
+
({tagName: c, tagExp: u} = Qn(i.transformTagName, c, u, i));
|
|
3401
|
+
let e = new Y(c);
|
|
3402
|
+
h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), i.captureMetaData && n.addEndIndex(f + 1), this.matcher.pop(), this.isCurrentNodeStopNode = !1;
|
|
2513
3403
|
} else if (i.unpairedTagsSet.has(c)) {
|
|
2514
|
-
let e = new
|
|
2515
|
-
h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), this.matcher.pop(), this.isCurrentNodeStopNode = !1, s = a.closeIndex;
|
|
3404
|
+
let e = new Y(c);
|
|
3405
|
+
h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), i.captureMetaData && n.addEndIndex(a.closeIndex + 1), this.matcher.pop(), this.isCurrentNodeStopNode = !1, s = a.closeIndex;
|
|
2516
3406
|
continue;
|
|
2517
3407
|
} else {
|
|
2518
|
-
let e = new
|
|
3408
|
+
let e = new Y(c);
|
|
2519
3409
|
if (this.tagsNodeStack.length > i.maxNestedTags) throw Error("Maximum nested tags exceeded");
|
|
2520
3410
|
this.tagsNodeStack.push(n), h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), n = e;
|
|
2521
3411
|
}
|
|
@@ -2525,12 +3415,12 @@ var yn = function(e) {
|
|
|
2525
3415
|
} else r += e[s];
|
|
2526
3416
|
return t.child;
|
|
2527
3417
|
};
|
|
2528
|
-
function
|
|
3418
|
+
function Un(e, t, n, r) {
|
|
2529
3419
|
this.options.captureMetaData || (r = void 0);
|
|
2530
3420
|
let i = this.options.jPath ? n.toString() : n, a = this.options.updateTag(t.tagname, i, t[":@"]);
|
|
2531
3421
|
a === !1 || (typeof a == "string" && (t.tagname = a), e.addChild(t, r));
|
|
2532
3422
|
}
|
|
2533
|
-
function
|
|
3423
|
+
function Wn(e, t, n) {
|
|
2534
3424
|
let r = this.options.processEntities;
|
|
2535
3425
|
if (!r || !r.enabled) return e;
|
|
2536
3426
|
if (r.allowedTags) {
|
|
@@ -2543,42 +3433,43 @@ function xn(e, t, n) {
|
|
|
2543
3433
|
}
|
|
2544
3434
|
return this.entityDecoder.decode(e);
|
|
2545
3435
|
}
|
|
2546
|
-
function
|
|
3436
|
+
function Gn(e, t, n, r) {
|
|
2547
3437
|
return e &&= (r === void 0 && (r = t.child.length === 0), e = this.parseTextData(e, t.tagname, n, !1, t[":@"] ? Object.keys(t[":@"]).length !== 0 : !1, r), e !== void 0 && e !== "" && t.add(this.options.textNodeName, e), ""), e;
|
|
2548
3438
|
}
|
|
2549
|
-
function
|
|
3439
|
+
function Kn() {
|
|
2550
3440
|
return this.stopNodeExpressionsSet.size !== 0 && this.matcher.matchesAny(this.stopNodeExpressionsSet);
|
|
2551
3441
|
}
|
|
2552
|
-
function
|
|
3442
|
+
function qn(e, t, n = ">") {
|
|
2553
3443
|
let r = 0, i = e.length, a = n.charCodeAt(0), o = n.length > 1 ? n.charCodeAt(1) : -1, s = "", c = t;
|
|
2554
3444
|
for (let n = t; n < i; n++) {
|
|
2555
3445
|
let t = e.charCodeAt(n);
|
|
2556
3446
|
if (r) t === r && (r = 0);
|
|
2557
3447
|
else if (t === 34 || t === 39) r = t;
|
|
2558
|
-
else if (t === a)
|
|
2559
|
-
if (
|
|
3448
|
+
else if (t === a) {
|
|
3449
|
+
if (o !== -1) {
|
|
3450
|
+
if (e.charCodeAt(n + 1) === o) return s += e.substring(c, n), {
|
|
3451
|
+
data: s,
|
|
3452
|
+
index: n
|
|
3453
|
+
};
|
|
3454
|
+
} else return s += e.substring(c, n), {
|
|
2560
3455
|
data: s,
|
|
2561
3456
|
index: n
|
|
2562
3457
|
};
|
|
2563
|
-
} else
|
|
2564
|
-
data: s,
|
|
2565
|
-
index: n
|
|
2566
|
-
};
|
|
2567
|
-
else t === 9 && !r && (s += e.substring(c, n) + " ", c = n + 1);
|
|
3458
|
+
} else t === 9 && !r && (s += e.substring(c, n) + " ", c = n + 1);
|
|
2568
3459
|
}
|
|
2569
3460
|
}
|
|
2570
|
-
function
|
|
3461
|
+
function $(e, t, n, r) {
|
|
2571
3462
|
let i = e.indexOf(t, n);
|
|
2572
3463
|
if (i === -1) throw Error(r);
|
|
2573
3464
|
return i + t.length - 1;
|
|
2574
3465
|
}
|
|
2575
|
-
function
|
|
3466
|
+
function Jn(e, t, n, r) {
|
|
2576
3467
|
let i = e.indexOf(t, n);
|
|
2577
3468
|
if (i === -1) throw Error(r);
|
|
2578
3469
|
return i;
|
|
2579
3470
|
}
|
|
2580
|
-
function
|
|
2581
|
-
let i =
|
|
3471
|
+
function Yn(e, t, n, r = ">") {
|
|
3472
|
+
let i = qn(e, t + 1, r);
|
|
2582
3473
|
if (!i) return;
|
|
2583
3474
|
let a = i.data, o = i.index, s = a.search(/\s/), c = a, l = !0;
|
|
2584
3475
|
s !== -1 && (c = a.substring(0, s), a = a.substring(s + 1).trimStart());
|
|
@@ -2595,51 +3486,51 @@ function En(e, t, n, r = ">") {
|
|
|
2595
3486
|
rawTagName: u
|
|
2596
3487
|
};
|
|
2597
3488
|
}
|
|
2598
|
-
function
|
|
3489
|
+
function Xn(e, t, n) {
|
|
2599
3490
|
let r = n, i = 1, a = e.length;
|
|
2600
3491
|
for (; n < a; n++) if (e[n] === "<") {
|
|
2601
3492
|
let a = e.charCodeAt(n + 1);
|
|
2602
3493
|
if (a === 47) {
|
|
2603
|
-
let a =
|
|
3494
|
+
let a = Jn(e, ">", n, `${t} is not closed`);
|
|
2604
3495
|
if (e.substring(n + 2, a).trim() === t && (i--, i === 0)) return {
|
|
2605
3496
|
tagContent: e.substring(r, n),
|
|
2606
3497
|
i: a
|
|
2607
3498
|
};
|
|
2608
3499
|
n = a;
|
|
2609
|
-
} else if (a === 63) n =
|
|
2610
|
-
else if (a === 33 && e.charCodeAt(n + 2) === 45 && e.charCodeAt(n + 3) === 45) n =
|
|
2611
|
-
else if (a === 33 && e.charCodeAt(n + 2) === 91) n =
|
|
3500
|
+
} else if (a === 63) n = $(e, "?>", n + 1, "StopNode is not closed.");
|
|
3501
|
+
else if (a === 33 && e.charCodeAt(n + 2) === 45 && e.charCodeAt(n + 3) === 45) n = $(e, "-->", n + 3, "StopNode is not closed.");
|
|
3502
|
+
else if (a === 33 && e.charCodeAt(n + 2) === 91) n = $(e, "]]>", n, "StopNode is not closed.") - 2;
|
|
2612
3503
|
else {
|
|
2613
|
-
let r =
|
|
3504
|
+
let r = Yn(e, n, !1);
|
|
2614
3505
|
r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
|
|
2615
3506
|
}
|
|
2616
3507
|
}
|
|
2617
3508
|
}
|
|
2618
|
-
function
|
|
3509
|
+
function Zn(e, t, n) {
|
|
2619
3510
|
if (t && typeof e == "string") {
|
|
2620
3511
|
let t = e.trim();
|
|
2621
|
-
return t === "true" || t !== "false" &&
|
|
3512
|
+
return t === "true" || t !== "false" && ln(e, n);
|
|
2622
3513
|
}
|
|
2623
|
-
return
|
|
3514
|
+
return Ze(e) ? e : "";
|
|
2624
3515
|
}
|
|
2625
|
-
function
|
|
3516
|
+
function Qn(e, t, n, r) {
|
|
2626
3517
|
if (e) {
|
|
2627
3518
|
let r = e(t);
|
|
2628
3519
|
n === t && (n = r), t = r;
|
|
2629
3520
|
}
|
|
2630
|
-
return t =
|
|
3521
|
+
return t = $n(t, r), {
|
|
2631
3522
|
tagName: t,
|
|
2632
3523
|
tagExp: n
|
|
2633
3524
|
};
|
|
2634
3525
|
}
|
|
2635
|
-
function
|
|
2636
|
-
if (
|
|
2637
|
-
return
|
|
3526
|
+
function $n(e, t) {
|
|
3527
|
+
if ($e.includes(e)) throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
3528
|
+
return Qe.includes(e) ? t.onDangerousProperty(e) : e;
|
|
2638
3529
|
}
|
|
2639
3530
|
//#endregion
|
|
2640
|
-
//#region ../../node_modules/.pnpm/fast-xml-parser@5.
|
|
2641
|
-
var
|
|
2642
|
-
function
|
|
3531
|
+
//#region ../../node_modules/.pnpm/fast-xml-parser@5.11.1/node_modules/fast-xml-parser/src/xmlparser/node2json.js
|
|
3532
|
+
var er = Y.getMetaDataSymbol();
|
|
3533
|
+
function tr(e, t) {
|
|
2643
3534
|
if (!e || typeof e != "object") return {};
|
|
2644
3535
|
if (!t) return e;
|
|
2645
3536
|
let n = {};
|
|
@@ -2649,22 +3540,22 @@ function jn(e, t) {
|
|
|
2649
3540
|
} else n[r] = e[r];
|
|
2650
3541
|
return n;
|
|
2651
3542
|
}
|
|
2652
|
-
function
|
|
2653
|
-
return
|
|
3543
|
+
function nr(e, t, n, r) {
|
|
3544
|
+
return rr(e, t, n, r);
|
|
2654
3545
|
}
|
|
2655
|
-
function
|
|
3546
|
+
function rr(e, t, n, r) {
|
|
2656
3547
|
let i, a = {};
|
|
2657
3548
|
for (let o = 0; o < e.length; o++) {
|
|
2658
|
-
let s = e[o], c =
|
|
3549
|
+
let s = e[o], c = ir(s);
|
|
2659
3550
|
if (c !== void 0 && c !== t.textNodeName) {
|
|
2660
|
-
let e =
|
|
3551
|
+
let e = tr(s[":@"] || {}, t.attributeNamePrefix);
|
|
2661
3552
|
n.push(c, e);
|
|
2662
3553
|
}
|
|
2663
3554
|
if (c === t.textNodeName) i === void 0 ? i = s[c] : i += "" + s[c];
|
|
2664
3555
|
else if (c === void 0) continue;
|
|
2665
3556
|
else if (s[c]) {
|
|
2666
|
-
let e =
|
|
2667
|
-
if (Object.keys(e).length === 0 && t.alwaysCreateTextNode && (e[t.textNodeName] = ""), s[":@"] ?
|
|
3557
|
+
let e = rr(s[c], t, n, r), i = or(e, t);
|
|
3558
|
+
if (Object.keys(e).length === 0 && t.alwaysCreateTextNode && (e[t.textNodeName] = ""), s[":@"] ? ar(e, s[":@"], r, t) : Object.keys(e).length === 1 && e[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? e = e[t.textNodeName] : Object.keys(e).length === 0 && (t.alwaysCreateTextNode ? e[t.textNodeName] = "" : e = ""), s[er] !== void 0 && typeof e == "object" && e && (e[er] = s[er]), a[c] !== void 0 && Object.prototype.hasOwnProperty.call(a, c)) Array.isArray(a[c]) || (a[c] = [a[c]]), a[c].push(e);
|
|
2668
3559
|
else {
|
|
2669
3560
|
let n = t.jPath ? r.toString() : r;
|
|
2670
3561
|
a[c] = t.isArray(c, n, i) ? [e] : e;
|
|
@@ -2674,14 +3565,14 @@ function Nn(e, t, n, r) {
|
|
|
2674
3565
|
}
|
|
2675
3566
|
return typeof i == "string" ? i.length > 0 && (a[t.textNodeName] = i) : i !== void 0 && (a[t.textNodeName] = i), a;
|
|
2676
3567
|
}
|
|
2677
|
-
function
|
|
3568
|
+
function ir(e) {
|
|
2678
3569
|
let t = Object.keys(e);
|
|
2679
3570
|
for (let e = 0; e < t.length; e++) {
|
|
2680
3571
|
let n = t[e];
|
|
2681
3572
|
if (n !== ":@") return n;
|
|
2682
3573
|
}
|
|
2683
3574
|
}
|
|
2684
|
-
function
|
|
3575
|
+
function ar(e, t, n, r) {
|
|
2685
3576
|
if (t) {
|
|
2686
3577
|
let i = Object.keys(t), a = i.length;
|
|
2687
3578
|
for (let o = 0; o < a; o++) {
|
|
@@ -2690,26 +3581,26 @@ function Fn(e, t, n, r) {
|
|
|
2690
3581
|
}
|
|
2691
3582
|
}
|
|
2692
3583
|
}
|
|
2693
|
-
function
|
|
3584
|
+
function or(e, t) {
|
|
2694
3585
|
let { textNodeName: n } = t, r = Object.keys(e).length;
|
|
2695
3586
|
return !!(r === 0 || r === 1 && (e[n] || typeof e[n] == "boolean" || e[n] === 0));
|
|
2696
3587
|
}
|
|
2697
3588
|
//#endregion
|
|
2698
|
-
//#region ../../node_modules/.pnpm/fast-xml-parser@5.
|
|
2699
|
-
var
|
|
3589
|
+
//#region ../../node_modules/.pnpm/fast-xml-parser@5.11.1/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
|
|
3590
|
+
var sr = class {
|
|
2700
3591
|
constructor(e) {
|
|
2701
|
-
this.externalEntities = {}, this.options =
|
|
3592
|
+
this.externalEntities = {}, this.options = jt(e);
|
|
2702
3593
|
}
|
|
2703
3594
|
parse(e, t) {
|
|
2704
3595
|
if (typeof e != "string" && e.toString) e = e.toString();
|
|
2705
3596
|
else if (typeof e != "string") throw Error("XML data is accepted in String or Bytes[] form.");
|
|
2706
3597
|
if (t) {
|
|
2707
3598
|
t === !0 && (t = {});
|
|
2708
|
-
let n =
|
|
3599
|
+
let n = tt(e, t);
|
|
2709
3600
|
if (n !== !0) throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
|
|
2710
3601
|
}
|
|
2711
|
-
let n = new
|
|
2712
|
-
return this.options.preserveOrder || r === void 0 ? r :
|
|
3602
|
+
let n = new Ln(this.options, this.externalEntities), r = n.parseXml(e);
|
|
3603
|
+
return this.options.preserveOrder || r === void 0 ? r : nr(r, this.options, n.matcher, n.readonlyMatcher);
|
|
2713
3604
|
}
|
|
2714
3605
|
addEntity(e, t) {
|
|
2715
3606
|
if (t.indexOf("&") !== -1) throw Error("Entity value can't have '&'");
|
|
@@ -2718,9 +3609,9 @@ var Ln = class {
|
|
|
2718
3609
|
this.externalEntities[e] = t;
|
|
2719
3610
|
}
|
|
2720
3611
|
static getMetaDataSymbol() {
|
|
2721
|
-
return
|
|
3612
|
+
return Y.getMetaDataSymbol();
|
|
2722
3613
|
}
|
|
2723
|
-
},
|
|
3614
|
+
}, cr = class {
|
|
2724
3615
|
axiosClient;
|
|
2725
3616
|
baseURI;
|
|
2726
3617
|
xmlParser;
|
|
@@ -2730,7 +3621,7 @@ var Ln = class {
|
|
|
2730
3621
|
HASH_LENGTH = 32;
|
|
2731
3622
|
ITERATION_COUNT = 1e4;
|
|
2732
3623
|
constructor({ axiosClient: e, baseURI: t }) {
|
|
2733
|
-
this.axiosClient = e, this.baseURI = t, this.xmlParser = new
|
|
3624
|
+
this.axiosClient = e, this.baseURI = t, this.xmlParser = new sr();
|
|
2734
3625
|
}
|
|
2735
3626
|
async signUrl(e, t) {
|
|
2736
3627
|
let n = new URL(e);
|
|
@@ -2740,20 +3631,20 @@ var Ln = class {
|
|
|
2740
3631
|
}
|
|
2741
3632
|
async getSignKey() {
|
|
2742
3633
|
if (this.signingKey) return this.signingKey;
|
|
2743
|
-
let
|
|
3634
|
+
let t = await this.axiosClient.get(e(this.baseURI, "ocs/v1.php/cloud/user/signing-key"), { headers: { "Content-Type": "application/x-www-form-urlencoded" } }), n = this.xmlParser.parse(t.data);
|
|
2744
3635
|
return this.signingKey = n.ocs.data["signing-key"], this.signingKey;
|
|
2745
3636
|
}
|
|
2746
3637
|
async createHashedKey(e) {
|
|
2747
|
-
return
|
|
3638
|
+
return Ge(e, await this.getSignKey(), this.ITERATION_COUNT, this.HASH_LENGTH, this.ALGORITHM).toString("hex");
|
|
2748
3639
|
}
|
|
2749
|
-
},
|
|
3640
|
+
}, lr = (e, t) => {
|
|
2750
3641
|
let n = new URL(e);
|
|
2751
3642
|
n.pathname = [
|
|
2752
3643
|
...n.pathname.split("/"),
|
|
2753
3644
|
"ocs",
|
|
2754
3645
|
"v1.php"
|
|
2755
3646
|
].filter(Boolean).join("/");
|
|
2756
|
-
let r = n.href, i = v(r, t), a = new
|
|
3647
|
+
let r = n.href, i = v(r, t), a = new cr({
|
|
2757
3648
|
baseURI: e,
|
|
2758
3649
|
axiosClient: t
|
|
2759
3650
|
});
|
|
@@ -2763,4 +3654,4 @@ var Ln = class {
|
|
|
2763
3654
|
};
|
|
2764
3655
|
};
|
|
2765
3656
|
//#endregion
|
|
2766
|
-
export {
|
|
3657
|
+
export { Wt as a, gn as i, sr as n, v as o, yn as r, lr as t };
|