@opencloud-eu/web-client 7.3.0 → 7.4.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-CAceQWl5.js} +7 -5
- package/dist/{dist-CeGfU4rJ.js → dist-Ciqaw6jy.js} +11 -9
- package/dist/{generated-FCm3SbzB.js → generated-CSkivkhn.js} +395 -239
- package/dist/{graph-CppzmKYd.js → graph-BDtqSczU.js} +93 -90
- package/dist/{helpers-MRfkPTnV.js → helpers-hr58GB0t.js} +230 -224
- package/dist/{ocs-gQyxMolJ.js → ocs-BupRjiCI.js} +504 -466
- package/dist/src/graph/generated/api.d.ts +351 -28
- package/dist/src/graph/users/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 +12 -0
- 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-Y_fh2BSJ.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/sse.js +1 -1
- package/dist/web-client/webdav.js +3 -3
- package/dist/web-client.js +5 -5
- package/dist/{webdav-BMoGCm4T.js → webdav-BE0Z-EcD.js} +997 -963
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "./dist-
|
|
1
|
+
import { t as e } from "./dist-Ciqaw6jy.js";
|
|
2
2
|
import { t } from "./urlJoin-_pUL1TUx.js";
|
|
3
|
-
import { a as n, n as r, s as i, t as a } from "./toString-
|
|
3
|
+
import { a as n, n as r, s as i, t as a } from "./toString-Y_fh2BSJ.js";
|
|
4
4
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js
|
|
5
5
|
var o = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s = /^\w*$/;
|
|
6
6
|
function c(e, t) {
|
|
@@ -46,7 +46,7 @@ function g(e, t) {
|
|
|
46
46
|
}
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js
|
|
49
|
-
var _ =
|
|
49
|
+
var _ = 1 / 0;
|
|
50
50
|
function ee(e) {
|
|
51
51
|
if (typeof e == "string" || i(e)) return e;
|
|
52
52
|
var t = e + "";
|
|
@@ -83,64 +83,61 @@ var v = (e, t) => {
|
|
|
83
83
|
} };
|
|
84
84
|
};
|
|
85
85
|
//#endregion
|
|
86
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
87
|
-
function
|
|
86
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/utils.js
|
|
87
|
+
function y(e) {
|
|
88
88
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in e && e.BYTES_PER_ELEMENT === 1;
|
|
89
89
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
if (!Number.isSafeInteger(e) || e < 0) {
|
|
96
|
-
let n = t && `"${t}" `;
|
|
97
|
-
throw RangeError(`${n}expected integer >= 0, got ${e}`);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
function b(e, t, n = "") {
|
|
101
|
-
let r = re(e), i = e?.length, a = t !== void 0;
|
|
102
|
-
if (!r || a && i !== t) {
|
|
103
|
-
let o = n && `"${n}" `, s = a ? ` of length ${t}` : "", c = r ? `length=${i}` : `type=${typeof e}`, l = o + "expected Uint8Array" + s + ", got " + c;
|
|
104
|
-
throw r ? RangeError(l) : TypeError(l);
|
|
105
|
-
}
|
|
90
|
+
var b = (e) => e ? `"${e}" ` : "";
|
|
91
|
+
function x(e, t = "") {
|
|
92
|
+
if (typeof e != "number") throw TypeError(b(t) + "expected number, got " + typeof e);
|
|
93
|
+
if (!Number.isSafeInteger(e) || e < 0) throw RangeError(b(t) + "expected integer >= 0, got " + e);
|
|
106
94
|
return e;
|
|
107
95
|
}
|
|
108
|
-
function
|
|
109
|
-
if (
|
|
110
|
-
|
|
111
|
-
|
|
96
|
+
function S(e, t, n = "") {
|
|
97
|
+
if (y(e) && (t === void 0 || e.length === t)) return e;
|
|
98
|
+
t !== void 0 && x(t, "length");
|
|
99
|
+
let r = y(e), i = t === void 0 ? "" : ` of length ${t}`, a = r ? `length=${e.length}` : `type=${typeof e}`, o = b(n) + "expected Uint8Array" + i + ", got " + a;
|
|
100
|
+
throw r ? RangeError(o) : TypeError(o);
|
|
101
|
+
}
|
|
102
|
+
function re(e) {
|
|
103
|
+
if (typeof e != "function" || typeof e.create != "function") throw TypeError("expected hash wrapped by utils.createHasher");
|
|
104
|
+
if (x(e.outputLen), x(e.blockLen), e.outputLen < 1 || e.blockLen < 1) throw Error("hash blockLen / outputLen must be >= 1");
|
|
112
105
|
}
|
|
113
|
-
|
|
114
|
-
if (e.
|
|
115
|
-
|
|
106
|
+
var ie = (e, t) => {
|
|
107
|
+
if (typeof e != "object" || !e || Array.isArray(e)) throw TypeError((t === "object" ? "" : `"${t}" `) + "expected object, got type=" + typeof e);
|
|
108
|
+
};
|
|
109
|
+
function C(e, t = !0) {
|
|
110
|
+
if (e.destroyed) throw Error("hash was destroyed");
|
|
111
|
+
if (t && e.finished) throw Error("digest() was already called");
|
|
116
112
|
}
|
|
117
|
-
function
|
|
118
|
-
|
|
113
|
+
function ae(e, t) {
|
|
114
|
+
S(e, void 0, "output");
|
|
119
115
|
let n = t.outputLen;
|
|
120
|
-
if (e.length
|
|
116
|
+
if (!(e.length >= n)) throw RangeError("\"output\" expected length >= " + n);
|
|
121
117
|
}
|
|
122
|
-
function
|
|
118
|
+
function w(...e) {
|
|
123
119
|
for (let t = 0; t < e.length; t++) e[t].fill(0);
|
|
124
120
|
}
|
|
125
|
-
function
|
|
121
|
+
function T(e) {
|
|
126
122
|
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
127
123
|
}
|
|
128
|
-
function
|
|
124
|
+
function oe(e) {
|
|
129
125
|
if (typeof e != "string") throw TypeError("string expected");
|
|
130
126
|
return new Uint8Array(new TextEncoder().encode(e));
|
|
131
127
|
}
|
|
132
|
-
function
|
|
133
|
-
return typeof e == "string" ?
|
|
128
|
+
function se(e, t = "") {
|
|
129
|
+
return typeof e == "string" ? oe(e) : S(e, void 0, t);
|
|
134
130
|
}
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
-
return Object.assign(e, t);
|
|
131
|
+
function ce(e, t, n = "opts") {
|
|
132
|
+
return ie(e, "defaults"), t !== void 0 && ie(t, n), Object.assign(e, t);
|
|
138
133
|
}
|
|
139
|
-
function
|
|
134
|
+
function le(e, t = {}) {
|
|
135
|
+
if (typeof e != "function") throw TypeError("\"hashCons\" expected function, got type=" + typeof e);
|
|
136
|
+
t = ce({}, t, "info");
|
|
140
137
|
let n = (t, n) => e(n).update(t).digest(), r = e(void 0);
|
|
141
138
|
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
139
|
}
|
|
143
|
-
var
|
|
140
|
+
var ue = (e) => ({ oid: Uint8Array.from([
|
|
144
141
|
6,
|
|
145
142
|
9,
|
|
146
143
|
96,
|
|
@@ -152,7 +149,7 @@ var le = (e) => ({ oid: Uint8Array.from([
|
|
|
152
149
|
4,
|
|
153
150
|
2,
|
|
154
151
|
e
|
|
155
|
-
]) }),
|
|
152
|
+
]) }), de = class {
|
|
156
153
|
oHash;
|
|
157
154
|
iHash;
|
|
158
155
|
blockLen;
|
|
@@ -161,20 +158,20 @@ var le = (e) => ({ oid: Uint8Array.from([
|
|
|
161
158
|
finished = !1;
|
|
162
159
|
destroyed = !1;
|
|
163
160
|
constructor(e, t) {
|
|
164
|
-
if (
|
|
161
|
+
if (re(e), S(t, void 0, "key"), this.iHash = e.create(), typeof this.iHash.update != "function") throw Error("expected Hash instance");
|
|
165
162
|
this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
|
|
166
163
|
let n = this.blockLen, r = new Uint8Array(n);
|
|
167
164
|
r.set(t.length > n ? e.create().update(t).digest() : t);
|
|
168
165
|
for (let e = 0; e < r.length; e++) r[e] ^= 54;
|
|
169
166
|
this.iHash.update(r), this.oHash = e.create();
|
|
170
167
|
for (let e = 0; e < r.length; e++) r[e] ^= 106;
|
|
171
|
-
this.oHash.update(r),
|
|
168
|
+
this.oHash.update(r), w(r);
|
|
172
169
|
}
|
|
173
170
|
update(e) {
|
|
174
|
-
return
|
|
171
|
+
return C(this), this.iHash.update(e), this;
|
|
175
172
|
}
|
|
176
173
|
digestInto(e) {
|
|
177
|
-
|
|
174
|
+
C(this), ae(e, this), this.finished = !0;
|
|
178
175
|
let t = e.subarray(0, this.outputLen);
|
|
179
176
|
this.iHash.digestInto(t), this.oHash.update(t), this.oHash.digestInto(t), this.destroy();
|
|
180
177
|
}
|
|
@@ -184,8 +181,8 @@ var le = (e) => ({ oid: Uint8Array.from([
|
|
|
184
181
|
}
|
|
185
182
|
_cloneInto(e) {
|
|
186
183
|
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;
|
|
184
|
+
let { oHash: t, iHash: n, finished: r, destroyed: i, blockLen: a, outputLen: o, canXOF: s } = this;
|
|
185
|
+
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
186
|
}
|
|
190
187
|
clone() {
|
|
191
188
|
return this._cloneInto();
|
|
@@ -193,49 +190,88 @@ var le = (e) => ({ oid: Uint8Array.from([
|
|
|
193
190
|
destroy() {
|
|
194
191
|
this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
|
|
195
192
|
}
|
|
196
|
-
},
|
|
197
|
-
let e = ((e, t, n) => new
|
|
198
|
-
return e.create = (e, t) => new
|
|
193
|
+
}, fe = /* @__PURE__ */ (() => {
|
|
194
|
+
let e = ((e, t, n) => new de(e, t).update(n).digest());
|
|
195
|
+
return e.create = (e, t) => new de(e, t), e;
|
|
199
196
|
})();
|
|
200
197
|
//#endregion
|
|
201
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
202
|
-
function
|
|
203
|
-
|
|
204
|
-
let { c: i, dkLen: a, asyncTick: o } =
|
|
198
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/pbkdf2.js
|
|
199
|
+
function pe(e, t, n, r) {
|
|
200
|
+
re(e);
|
|
201
|
+
let { c: i, dkLen: a, asyncTick: o } = ce({
|
|
205
202
|
dkLen: 32,
|
|
206
203
|
asyncTick: 10
|
|
207
204
|
}, r);
|
|
208
|
-
if (
|
|
205
|
+
if (x(i, "c"), x(a, "dkLen"), x(o, "asyncTick"), i < 1) throw Error("\"c\" (iterations) must be >= 1");
|
|
209
206
|
if (a < 1) throw Error("\"dkLen\" must be >= 1");
|
|
210
207
|
if (a > (2 ** 32 - 1) * e.outputLen) throw Error("derived key too long");
|
|
211
|
-
let s =
|
|
208
|
+
let s = se(t, "password"), c = se(n, "salt"), l = new Uint8Array(a), { iHash: u, oHash: d, outputLen: f } = fe.create(e, s);
|
|
212
209
|
return {
|
|
213
210
|
c: i,
|
|
214
211
|
dkLen: a,
|
|
215
212
|
asyncTick: o,
|
|
216
213
|
DK: l,
|
|
217
|
-
|
|
218
|
-
|
|
214
|
+
outputLen: f,
|
|
215
|
+
eng: me(u, d, c, new Uint8Array(f))
|
|
219
216
|
};
|
|
220
217
|
}
|
|
221
|
-
function pe(e, t, n, r, i) {
|
|
222
|
-
return e.destroy(), t.destroy(), r && r.destroy(), C(i), n;
|
|
223
|
-
}
|
|
224
218
|
function me(e, t, n, r) {
|
|
225
|
-
let
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
for (let
|
|
232
|
-
|
|
219
|
+
let i = /* @__PURE__ */ new Uint8Array(4), a = T(i), o = e._cloneInto().update(n), s = t._cloneInto(), c = e._cloneInto, l = t._cloneInto;
|
|
220
|
+
return {
|
|
221
|
+
u1: (e, n) => {
|
|
222
|
+
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));
|
|
223
|
+
},
|
|
224
|
+
rounds: (n, i) => {
|
|
225
|
+
for (let a = 1; a < n; a++) {
|
|
226
|
+
c.call(e, s).update(r).digestInto(r), l.call(t, s).update(r).digestInto(r);
|
|
227
|
+
for (let e = 0; e < i.length; e++) i[e] ^= r[e];
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
output: (n) => (e.destroy(), t.destroy(), o.destroy(), s.destroy(), w(r), n)
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
function he(e, t, n, r) {
|
|
234
|
+
let { c: i, dkLen: a, DK: o, outputLen: s, eng: c } = pe(e, t, n, r);
|
|
235
|
+
for (let e = 1, t = 0; t < a; e++, t += s) {
|
|
236
|
+
let n = o.subarray(t, t + s);
|
|
237
|
+
c.u1(e, n), c.rounds(i, n);
|
|
233
238
|
}
|
|
234
|
-
return
|
|
239
|
+
return c.output(o);
|
|
235
240
|
}
|
|
236
241
|
//#endregion
|
|
237
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
238
|
-
var
|
|
242
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/_u64.js
|
|
243
|
+
var E = /* @__PURE__ */ BigInt(2 ** 32 - 1), ge = /* @__PURE__ */ BigInt(32);
|
|
244
|
+
function _e(e, t = !1) {
|
|
245
|
+
return t ? {
|
|
246
|
+
h: Number(e & E),
|
|
247
|
+
l: Number(e >> ge & E)
|
|
248
|
+
} : {
|
|
249
|
+
h: Number(e >> ge & E) | 0,
|
|
250
|
+
l: Number(e & E) | 0
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
function ve(e, t = !1) {
|
|
254
|
+
let n = e.length, r = new Uint32Array(n), i = new Uint32Array(n);
|
|
255
|
+
for (let a = 0; a < n; a++) {
|
|
256
|
+
let { h: n, l: o } = _e(e[a], t);
|
|
257
|
+
[r[a], i[a]] = [n, o];
|
|
258
|
+
}
|
|
259
|
+
return [r, i];
|
|
260
|
+
}
|
|
261
|
+
var ye = (e) => e / 2 ** 32 | 0, be = (e) => e >>> 0;
|
|
262
|
+
function xe(e, t, n, r) {
|
|
263
|
+
let i = ye(n), a = be(n);
|
|
264
|
+
e.setUint32(t, r ? a : i, r), e.setUint32(t + 4, r ? i : a, r);
|
|
265
|
+
}
|
|
266
|
+
var Se = (e, t, n) => e >>> n, Ce = (e, t, n) => e << 32 - n | t >>> n, D = (e, t, n) => e >>> n | t << 32 - n, O = (e, t, n) => e << 32 - n | t >>> n, k = (e, t, n) => e << 64 - n | t >>> n - 32, A = (e, t, n) => e >>> n - 32 | t << 64 - n;
|
|
267
|
+
function j(e, t, n, r) {
|
|
268
|
+
let i = (t >>> 0) + (r >>> 0);
|
|
269
|
+
return {
|
|
270
|
+
h: e + n + (i / 2 ** 32 | 0) | 0,
|
|
271
|
+
l: i | 0
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
var we = (e, t, n) => (e >>> 0) + (t >>> 0) + (n >>> 0), Te = (e, t, n, r) => t + n + r + (e / 2 ** 32 | 0) | 0, Ee = (e, t, n, r) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0), De = (e, t, n, r, i) => t + n + r + i + (e / 2 ** 32 | 0) | 0, Oe = (e, t, n, r, i) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0) + (i >>> 0), ke = (e, t, n, r, i, a) => t + n + r + i + a + (e / 2 ** 32 | 0) | 0, Ae = class {
|
|
239
275
|
blockLen;
|
|
240
276
|
outputLen;
|
|
241
277
|
canXOF = !1;
|
|
@@ -248,32 +284,29 @@ var he = class {
|
|
|
248
284
|
pos = 0;
|
|
249
285
|
destroyed = !1;
|
|
250
286
|
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 =
|
|
287
|
+
this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = r, this.buffer = new Uint8Array(e), this.view = T(this.buffer);
|
|
252
288
|
}
|
|
253
289
|
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 -
|
|
290
|
+
C(this), S(e);
|
|
291
|
+
let { view: t, buffer: n, blockLen: r } = this, i = e.length, a = !1;
|
|
292
|
+
for (let o = 0; o < i;) {
|
|
293
|
+
let s = Math.min(r - this.pos, i - o);
|
|
294
|
+
if (s === r) {
|
|
295
|
+
let t = T(e);
|
|
296
|
+
for (; r <= i - o; o += r) this.process(t, o);
|
|
297
|
+
a = !0;
|
|
261
298
|
continue;
|
|
262
299
|
}
|
|
263
|
-
n.set(e.subarray(
|
|
300
|
+
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
301
|
}
|
|
265
|
-
return this.length += e.length, this.roundClean(), this;
|
|
302
|
+
return this.length += e.length, a && this.roundClean(), this;
|
|
266
303
|
}
|
|
267
304
|
digestInto(e) {
|
|
268
|
-
|
|
305
|
+
C(this), ae(e, this), this.finished = !0;
|
|
269
306
|
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");
|
|
307
|
+
t[a++] = 128, t.fill(0, a), this.padOffset > r - a && (this.process(n, 0), t.fill(0)), xe(n, r - 8, this.length * 8, i), this.process(n, 0), this.roundClean();
|
|
308
|
+
let o = e === t ? n : T(e), s = this.outputLen, c = s / 4, l = this.get();
|
|
309
|
+
if (s % 4 || c > l.length) throw Error("invalid outputLen");
|
|
277
310
|
for (let e = 0; e < c; e++) o.setUint32(4 * e, l[e], i);
|
|
278
311
|
}
|
|
279
312
|
digest() {
|
|
@@ -282,15 +315,14 @@ var he = class {
|
|
|
282
315
|
let n = e.slice(0, t);
|
|
283
316
|
return this.destroy(), n;
|
|
284
317
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
return e.destroyed = a, e.finished = i, e.length = r, e.pos = o, r % t && e.buffer.set(n), e;
|
|
318
|
+
_cloneIntoMeta(e) {
|
|
319
|
+
let { buffer: t, length: n, finished: r, destroyed: i, pos: a } = this;
|
|
320
|
+
return e.destroyed = i, e.finished = r, e.length = n, e.pos = a, a && e.buffer.set(t), e;
|
|
289
321
|
}
|
|
290
322
|
clone() {
|
|
291
323
|
return this._cloneInto();
|
|
292
324
|
}
|
|
293
|
-
},
|
|
325
|
+
}, je = /* @__PURE__ */ Uint32Array.from([
|
|
294
326
|
1779033703,
|
|
295
327
|
4089235720,
|
|
296
328
|
3144134277,
|
|
@@ -307,35 +339,25 @@ var he = class {
|
|
|
307
339
|
4215389547,
|
|
308
340
|
1541459225,
|
|
309
341
|
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);
|
|
342
|
+
]), Me = /* @__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))), Ne = Me[0], Pe = Me[1], M = /* @__PURE__ */ new Uint32Array(80), N = /* @__PURE__ */ new Uint32Array(80), Fe = class extends Ae {
|
|
343
|
+
Ah = 0;
|
|
344
|
+
Al = 0;
|
|
345
|
+
Bh = 0;
|
|
346
|
+
Bl = 0;
|
|
347
|
+
Ch = 0;
|
|
348
|
+
Cl = 0;
|
|
349
|
+
Dh = 0;
|
|
350
|
+
Dl = 0;
|
|
351
|
+
Eh = 0;
|
|
352
|
+
El = 0;
|
|
353
|
+
Fh = 0;
|
|
354
|
+
Fl = 0;
|
|
355
|
+
Gh = 0;
|
|
356
|
+
Gl = 0;
|
|
357
|
+
Hh = 0;
|
|
358
|
+
Hl = 0;
|
|
359
|
+
constructor(e, t) {
|
|
360
|
+
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
361
|
}
|
|
340
362
|
get() {
|
|
341
363
|
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 +383,39 @@ var xe = (e, t, n) => (e >>> 0) + (t >>> 0) + (n >>> 0), Se = (e, t, n, r) => t
|
|
|
361
383
|
set(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
362
384
|
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
385
|
}
|
|
386
|
+
_cloneInto(e) {
|
|
387
|
+
return (e ||= new this.constructor()).set(...this.get()), this._cloneIntoMeta(e);
|
|
388
|
+
}
|
|
364
389
|
process(e, t) {
|
|
365
390
|
for (let n = 0; n < 16; n++, t += 4) M[n] = e.getUint32(t), N[n] = e.getUint32(t += 4);
|
|
366
391
|
for (let e = 16; e < 80; e++) {
|
|
367
|
-
let t = M[e - 15] | 0, n = N[e - 15] | 0, r = D(t, n, 1) ^ D(t, n, 8) ^
|
|
392
|
+
let t = M[e - 15] | 0, n = N[e - 15] | 0, r = D(t, n, 1) ^ D(t, n, 8) ^ Se(t, n, 7), i = O(t, n, 1) ^ O(t, n, 8) ^ Ce(t, n, 7), a = M[e - 2] | 0, o = N[e - 2] | 0, s = D(a, o, 19) ^ k(a, o, 61) ^ Se(a, o, 6), c = Ee(i, O(a, o, 19) ^ A(a, o, 61) ^ Ce(a, o, 6), N[e - 7], N[e - 16]), l = De(c, r, s, M[e - 7], M[e - 16]);
|
|
368
393
|
M[e] = l | 0, N[e] = c | 0;
|
|
369
394
|
}
|
|
370
395
|
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
396
|
for (let e = 0; e < 80; e++) {
|
|
372
|
-
let t = D(u, d, 14) ^ D(u, d, 18) ^ k(u, d, 41), ee = O(u, d, 14) ^ O(u, d, 18) ^ A(u, d, 41), te = u & f ^ ~u & m, ne = d & p ^ ~d & h, v =
|
|
373
|
-
g = m | 0, _ = h | 0, m = f | 0, h = p | 0, f = u | 0, p = d | 0, {h: u, l: d} = j(c | 0, l | 0,
|
|
374
|
-
let C =
|
|
375
|
-
n =
|
|
397
|
+
let t = D(u, d, 14) ^ D(u, d, 18) ^ k(u, d, 41), ee = O(u, d, 14) ^ O(u, d, 18) ^ A(u, d, 41), te = u & f ^ ~u & m, ne = d & p ^ ~d & h, v = Oe(_, ee, ne, Pe[e], N[e]), y = ke(v, g, t, te, Ne[e], M[e]), b = v | 0, x = D(n, r, 28) ^ k(n, r, 34) ^ k(n, r, 39), S = O(n, r, 28) ^ A(n, r, 34) ^ A(n, r, 39), re = n & i ^ n & o ^ i & o, ie = r & a ^ r & s ^ a & s;
|
|
398
|
+
g = m | 0, _ = h | 0, m = f | 0, h = p | 0, f = u | 0, p = d | 0, {h: u, l: d} = j(c | 0, l | 0, y | 0, b | 0), c = o | 0, l = s | 0, o = i | 0, s = a | 0, i = n | 0, a = r | 0;
|
|
399
|
+
let C = we(b, S, ie);
|
|
400
|
+
n = Te(C, y, x, re), r = C | 0;
|
|
376
401
|
}
|
|
377
402
|
({h: n, l: r} = j(this.Ah | 0, this.Al | 0, n | 0, r | 0)), {h: i, l: a} = j(this.Bh | 0, this.Bl | 0, i | 0, a | 0), {h: o, l: s} = j(this.Ch | 0, this.Cl | 0, o | 0, s | 0), {h: c, l: l} = j(this.Dh | 0, this.Dl | 0, c | 0, l | 0), {h: u, l: d} = j(this.Eh | 0, this.El | 0, u | 0, d | 0), {h: f, l: p} = j(this.Fh | 0, this.Fl | 0, f | 0, p | 0), {h: m, l: h} = j(this.Gh | 0, this.Gl | 0, m | 0, h | 0), {h: g, l: _} = j(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
403
|
}
|
|
379
404
|
roundClean() {
|
|
380
|
-
|
|
405
|
+
w(M, N);
|
|
381
406
|
}
|
|
382
407
|
destroy() {
|
|
383
|
-
this.destroyed = !0,
|
|
384
|
-
}
|
|
385
|
-
},
|
|
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;
|
|
408
|
+
this.destroyed = !0, w(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
409
|
+
}
|
|
410
|
+
}, Ie = class extends Fe {
|
|
402
411
|
constructor() {
|
|
403
|
-
super(64);
|
|
412
|
+
super(64, je);
|
|
404
413
|
}
|
|
405
|
-
},
|
|
414
|
+
}, Le = /* @__PURE__ */ le(() => new Ie(), /* @__PURE__ */ ue(3)), Re = (t, n, r, i) => e.from(he(Le, t, n, {
|
|
406
415
|
c: r,
|
|
407
416
|
dkLen: i
|
|
408
|
-
})),
|
|
409
|
-
function
|
|
417
|
+
})), ze = /* @__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]*$");
|
|
418
|
+
function Be(e, t) {
|
|
410
419
|
let n = [], r = t.exec(e);
|
|
411
420
|
for (; r;) {
|
|
412
421
|
let i = [];
|
|
@@ -417,10 +426,10 @@ function Fe(e, t) {
|
|
|
417
426
|
}
|
|
418
427
|
return n;
|
|
419
428
|
}
|
|
420
|
-
var
|
|
421
|
-
return
|
|
429
|
+
var Ve = function(e) {
|
|
430
|
+
return ze.exec(e) != null;
|
|
422
431
|
};
|
|
423
|
-
function
|
|
432
|
+
function He(e) {
|
|
424
433
|
return e !== void 0;
|
|
425
434
|
}
|
|
426
435
|
var P = [
|
|
@@ -431,24 +440,24 @@ var P = [
|
|
|
431
440
|
"__defineSetter__",
|
|
432
441
|
"__lookupGetter__",
|
|
433
442
|
"__lookupSetter__"
|
|
434
|
-
],
|
|
443
|
+
], Ue = [
|
|
435
444
|
"__proto__",
|
|
436
445
|
"constructor",
|
|
437
446
|
"prototype"
|
|
438
|
-
],
|
|
447
|
+
], We = {
|
|
439
448
|
allowBooleanAttributes: !1,
|
|
440
449
|
unpairedTags: []
|
|
441
450
|
};
|
|
442
|
-
function
|
|
443
|
-
t = Object.assign({},
|
|
451
|
+
function Ge(e, t) {
|
|
452
|
+
t = Object.assign({}, We, t);
|
|
444
453
|
let n = [], r = !1, i = !1;
|
|
445
454
|
e[0] === "" && (e = e.substr(1));
|
|
446
455
|
for (let a = 0; a < e.length; a++) if (e[a] === "<" && e[a + 1] === "?") {
|
|
447
|
-
if (a += 2, a =
|
|
456
|
+
if (a += 2, a = qe(e, a), a.err) return a;
|
|
448
457
|
} else if (e[a] === "<") {
|
|
449
458
|
let o = a;
|
|
450
459
|
if (a++, e[a] === "!") {
|
|
451
|
-
a =
|
|
460
|
+
a = Je(e, a);
|
|
452
461
|
continue;
|
|
453
462
|
}
|
|
454
463
|
{
|
|
@@ -456,17 +465,17 @@ function Be(e, t) {
|
|
|
456
465
|
e[a] === "/" && (s = !0, a++);
|
|
457
466
|
let c = "";
|
|
458
467
|
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--), !
|
|
468
|
+
if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !rt(c)) {
|
|
460
469
|
let t;
|
|
461
470
|
return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", F("InvalidTag", t, I(e, a));
|
|
462
471
|
}
|
|
463
|
-
let l =
|
|
472
|
+
let l = Ze(e, a);
|
|
464
473
|
if (l === !1) return F("InvalidAttr", "Attributes for '" + c + "' have open quote.", I(e, a));
|
|
465
474
|
let u = l.value;
|
|
466
475
|
if (a = l.index, u[u.length - 1] === "/") {
|
|
467
476
|
let n = a - u.length;
|
|
468
477
|
u = u.substring(0, u.length - 1);
|
|
469
|
-
let i =
|
|
478
|
+
let i = $e(u, t);
|
|
470
479
|
if (i === !0) r = !0;
|
|
471
480
|
else return F(i.err.code, i.err.msg, I(e, n + i.err.line));
|
|
472
481
|
} else if (s) {
|
|
@@ -482,7 +491,7 @@ function Be(e, t) {
|
|
|
482
491
|
n.length == 0 && (i = !0);
|
|
483
492
|
}
|
|
484
493
|
} else {
|
|
485
|
-
let s =
|
|
494
|
+
let s = $e(u, t);
|
|
486
495
|
if (s !== !0) return F(s.err.code, s.err.msg, I(e, a - u.length + s.err.line));
|
|
487
496
|
if (i === !0) return F("InvalidXml", "Multiple possible root nodes found.", I(e, a));
|
|
488
497
|
t.unpairedTags.indexOf(c) !== -1 || n.push({
|
|
@@ -490,21 +499,23 @@ function Be(e, t) {
|
|
|
490
499
|
tagStartPos: o
|
|
491
500
|
}), r = !0;
|
|
492
501
|
}
|
|
493
|
-
for (a++; a < e.length; a++) if (e[a] === "<")
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
502
|
+
for (a++; a < e.length; a++) if (e[a] === "<") {
|
|
503
|
+
if (e[a + 1] === "!") {
|
|
504
|
+
a++, a = Je(e, a);
|
|
505
|
+
continue;
|
|
506
|
+
}
|
|
507
|
+
if (e[a + 1] === "?") {
|
|
508
|
+
if (a = qe(e, ++a), a.err) return a;
|
|
509
|
+
} else break;
|
|
510
|
+
} else if (e[a] === "&") {
|
|
511
|
+
let t = tt(e, a);
|
|
501
512
|
if (t == -1) return F("InvalidChar", "char '&' is not expected.", I(e, a));
|
|
502
513
|
a = t;
|
|
503
|
-
} else if (i === !0 && !
|
|
514
|
+
} else if (i === !0 && !Ke(e[a])) return F("InvalidXml", "Extra text at the end", I(e, a));
|
|
504
515
|
e[a] === "<" && a--;
|
|
505
516
|
}
|
|
506
517
|
} else {
|
|
507
|
-
if (
|
|
518
|
+
if (Ke(e[a])) continue;
|
|
508
519
|
return F("InvalidChar", "char '" + e[a] + "' is not expected.", I(e, a));
|
|
509
520
|
}
|
|
510
521
|
return r ? n.length == 1 ? F("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", I(e, n[0].tagStartPos)) : n.length > 0 ? F("InvalidXml", "Invalid '" + JSON.stringify(n.map((e) => e.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", {
|
|
@@ -512,10 +523,10 @@ function Be(e, t) {
|
|
|
512
523
|
col: 1
|
|
513
524
|
}) : !0 : F("InvalidXml", "Start tag expected.", 1);
|
|
514
525
|
}
|
|
515
|
-
function
|
|
526
|
+
function Ke(e) {
|
|
516
527
|
return e === " " || e === " " || e === "\n" || e === "\r";
|
|
517
528
|
}
|
|
518
|
-
function
|
|
529
|
+
function qe(e, t) {
|
|
519
530
|
let n = t;
|
|
520
531
|
for (; t < e.length; t++) if (e[t] == "?" || e[t] == " ") {
|
|
521
532
|
let r = e.substr(n, t - n);
|
|
@@ -528,7 +539,7 @@ function He(e, t) {
|
|
|
528
539
|
}
|
|
529
540
|
return t;
|
|
530
541
|
}
|
|
531
|
-
function
|
|
542
|
+
function Je(e, t) {
|
|
532
543
|
if (e.length > t + 5 && e[t + 1] === "-" && e[t + 2] === "-") {
|
|
533
544
|
for (t += 3; t < e.length; t++) if (e[t] === "-" && e[t + 1] === "-" && e[t + 2] === ">") {
|
|
534
545
|
t += 2;
|
|
@@ -546,11 +557,11 @@ function Ue(e, t) {
|
|
|
546
557
|
}
|
|
547
558
|
return t;
|
|
548
559
|
}
|
|
549
|
-
var
|
|
550
|
-
function
|
|
560
|
+
var Ye = "\"", Xe = "'";
|
|
561
|
+
function Ze(e, t) {
|
|
551
562
|
let n = "", r = "", i = !1;
|
|
552
563
|
for (; t < e.length; t++) {
|
|
553
|
-
if (e[t] ===
|
|
564
|
+
if (e[t] === Ye || e[t] === Xe) r === "" ? r = e[t] : r !== e[t] || (r = "");
|
|
554
565
|
else if (e[t] === ">" && r === "") {
|
|
555
566
|
i = !0;
|
|
556
567
|
break;
|
|
@@ -563,21 +574,21 @@ function Ke(e, t) {
|
|
|
563
574
|
tagClosed: i
|
|
564
575
|
};
|
|
565
576
|
}
|
|
566
|
-
var
|
|
567
|
-
function
|
|
568
|
-
let n =
|
|
577
|
+
var Qe = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
|
|
578
|
+
function $e(e, t) {
|
|
579
|
+
let n = Be(e, Qe), r = {};
|
|
569
580
|
for (let e = 0; e < n.length; e++) {
|
|
570
581
|
if (n[e][1].length === 0) return F("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", L(n[e]));
|
|
571
582
|
if (n[e][3] !== void 0 && n[e][4] === void 0) return F("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", L(n[e]));
|
|
572
583
|
if (n[e][3] === void 0 && !t.allowBooleanAttributes) return F("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", L(n[e]));
|
|
573
584
|
let i = n[e][2];
|
|
574
|
-
if (!
|
|
585
|
+
if (!nt(i)) return F("InvalidAttr", "Attribute '" + i + "' is an invalid name.", L(n[e]));
|
|
575
586
|
if (!Object.prototype.hasOwnProperty.call(r, i)) r[i] = 1;
|
|
576
587
|
else return F("InvalidAttr", "Attribute '" + i + "' is repeated.", L(n[e]));
|
|
577
588
|
}
|
|
578
589
|
return !0;
|
|
579
590
|
}
|
|
580
|
-
function
|
|
591
|
+
function et(e, t) {
|
|
581
592
|
let n = /\d/;
|
|
582
593
|
for (e[t] === "x" && (t++, n = /[\da-fA-F]/); t < e.length; t++) {
|
|
583
594
|
if (e[t] === ";") return t;
|
|
@@ -585,9 +596,9 @@ function Ye(e, t) {
|
|
|
585
596
|
}
|
|
586
597
|
return -1;
|
|
587
598
|
}
|
|
588
|
-
function
|
|
599
|
+
function tt(e, t) {
|
|
589
600
|
if (t++, e[t] === ";") return -1;
|
|
590
|
-
if (e[t] === "#") return t++,
|
|
601
|
+
if (e[t] === "#") return t++, et(e, t);
|
|
591
602
|
let n = 0;
|
|
592
603
|
for (; t < e.length; t++, n++) if (!(e[t].match(/\w/) && n < 20)) {
|
|
593
604
|
if (e[t] === ";") break;
|
|
@@ -603,11 +614,11 @@ function F(e, t, n) {
|
|
|
603
614
|
col: n.col
|
|
604
615
|
} };
|
|
605
616
|
}
|
|
606
|
-
function
|
|
607
|
-
return
|
|
617
|
+
function nt(e) {
|
|
618
|
+
return Ve(e);
|
|
608
619
|
}
|
|
609
|
-
function
|
|
610
|
-
return
|
|
620
|
+
function rt(e) {
|
|
621
|
+
return Ve(e);
|
|
611
622
|
}
|
|
612
623
|
function I(e, t) {
|
|
613
624
|
let n = e.substring(0, t).split(/\r?\n/);
|
|
@@ -621,7 +632,7 @@ function L(e) {
|
|
|
621
632
|
}
|
|
622
633
|
//#endregion
|
|
623
634
|
//#region ../../node_modules/.pnpm/@nodable+entities@3.0.0/node_modules/@nodable/entities/src/entities.js
|
|
624
|
-
var
|
|
635
|
+
var it = {
|
|
625
636
|
cent: "¢",
|
|
626
637
|
pound: "£",
|
|
627
638
|
curren: "¤",
|
|
@@ -637,13 +648,13 @@ var $e = {
|
|
|
637
648
|
won: "₩",
|
|
638
649
|
yuan: "¥",
|
|
639
650
|
cedil: "¸"
|
|
640
|
-
},
|
|
651
|
+
}, at = {
|
|
641
652
|
amp: "&",
|
|
642
653
|
apos: "'",
|
|
643
654
|
gt: ">",
|
|
644
655
|
lt: "<",
|
|
645
656
|
quot: "\""
|
|
646
|
-
},
|
|
657
|
+
}, ot = {
|
|
647
658
|
nbsp: "\xA0",
|
|
648
659
|
copy: "©",
|
|
649
660
|
reg: "®",
|
|
@@ -668,10 +679,10 @@ var $e = {
|
|
|
668
679
|
ALLOW: "allow",
|
|
669
680
|
BLOCK: "block",
|
|
670
681
|
THROW: "throw"
|
|
671
|
-
}),
|
|
672
|
-
function
|
|
682
|
+
}), st = /* @__PURE__ */ new Set("!?\\\\/[]$%{}^&*()<>|+");
|
|
683
|
+
function ct(e) {
|
|
673
684
|
if (e[0] === "#") throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);
|
|
674
|
-
for (let t of e) if (
|
|
685
|
+
for (let t of e) if (st.has(t)) throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);
|
|
675
686
|
return e;
|
|
676
687
|
}
|
|
677
688
|
function z(...e) {
|
|
@@ -687,7 +698,7 @@ function z(...e) {
|
|
|
687
698
|
return t;
|
|
688
699
|
}
|
|
689
700
|
var B = "external", V = "base", H = "all";
|
|
690
|
-
function
|
|
701
|
+
function lt(e) {
|
|
691
702
|
return !e || e === B ? /* @__PURE__ */ new Set([B]) : e === H ? /* @__PURE__ */ new Set([H]) : e === V ? /* @__PURE__ */ new Set([V]) : Array.isArray(e) ? new Set(e) : /* @__PURE__ */ new Set([B]);
|
|
692
703
|
}
|
|
693
704
|
var U = Object.freeze({
|
|
@@ -695,12 +706,12 @@ var U = Object.freeze({
|
|
|
695
706
|
leave: 1,
|
|
696
707
|
remove: 2,
|
|
697
708
|
throw: 3
|
|
698
|
-
}),
|
|
709
|
+
}), ut = /* @__PURE__ */ new Set([
|
|
699
710
|
9,
|
|
700
711
|
10,
|
|
701
712
|
13
|
|
702
713
|
]);
|
|
703
|
-
function
|
|
714
|
+
function dt(e) {
|
|
704
715
|
if (!e) return {
|
|
705
716
|
xmlVersion: 1,
|
|
706
717
|
onLevel: U.allow,
|
|
@@ -713,10 +724,10 @@ function ot(e) {
|
|
|
713
724
|
nullLevel: Math.max(r, U.remove)
|
|
714
725
|
};
|
|
715
726
|
}
|
|
716
|
-
var
|
|
727
|
+
var ft = class {
|
|
717
728
|
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 =
|
|
729
|
+
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 = lt(this._limit.applyLimitsTo ?? B), this._numericAllowed = e.numericAllowed ?? !0, this._baseMap = z(at, 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 : []);
|
|
730
|
+
let t = dt(e.ncr);
|
|
720
731
|
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
732
|
}
|
|
722
733
|
_applyRegistrationHook(e, t, n, r) {
|
|
@@ -727,7 +738,7 @@ var st = class {
|
|
|
727
738
|
return !0;
|
|
728
739
|
}
|
|
729
740
|
setExternalEntities(e) {
|
|
730
|
-
if (e) for (let t of Object.keys(e))
|
|
741
|
+
if (e) for (let t of Object.keys(e)) ct(t);
|
|
731
742
|
if (!this._onExternalEntity) {
|
|
732
743
|
this._externalMap = z(e);
|
|
733
744
|
return;
|
|
@@ -737,7 +748,7 @@ var st = class {
|
|
|
737
748
|
this._externalMap = n;
|
|
738
749
|
}
|
|
739
750
|
addExternalEntity(e, t) {
|
|
740
|
-
|
|
751
|
+
ct(e), typeof t == "string" && t.indexOf("&") === -1 && this._applyRegistrationHook(this._onExternalEntity, e, t, "external") && (this._externalMap[e] = t);
|
|
741
752
|
}
|
|
742
753
|
addInputEntities(e) {
|
|
743
754
|
if (this._totalExpansions = 0, this._expandedLength = 0, !this._onInputEntity) {
|
|
@@ -823,7 +834,7 @@ var st = class {
|
|
|
823
834
|
};
|
|
824
835
|
}
|
|
825
836
|
_classifyNCR(e) {
|
|
826
|
-
return e === 0 ? this._ncrNullLevel : e >= 55296 && e <= 57343 || this._ncrXmlVersion === 1 && e >= 1 && e <= 31 && !
|
|
837
|
+
return e === 0 ? this._ncrNullLevel : e >= 55296 && e <= 57343 || this._ncrXmlVersion === 1 && e >= 1 && e <= 31 && !ut.has(e) ? U.remove : -1;
|
|
827
838
|
}
|
|
828
839
|
_applyNCRAction(e, t, n) {
|
|
829
840
|
switch (e) {
|
|
@@ -842,7 +853,7 @@ var st = class {
|
|
|
842
853
|
let i = r === -1 ? this._ncrOnLevel : Math.max(this._ncrOnLevel, r);
|
|
843
854
|
return this._applyNCRAction(i, e, n);
|
|
844
855
|
}
|
|
845
|
-
},
|
|
856
|
+
}, pt = (e) => P.includes(e) ? "__" + e : e, mt = {
|
|
846
857
|
preserveOrder: !1,
|
|
847
858
|
attributeNamePrefix: "@_",
|
|
848
859
|
attributesGroupName: !1,
|
|
@@ -885,14 +896,14 @@ var st = class {
|
|
|
885
896
|
maxNestedTags: 100,
|
|
886
897
|
strictReservedNames: !0,
|
|
887
898
|
jPath: !0,
|
|
888
|
-
onDangerousProperty:
|
|
899
|
+
onDangerousProperty: pt
|
|
889
900
|
};
|
|
890
|
-
function
|
|
901
|
+
function ht(e, t) {
|
|
891
902
|
if (typeof e != "string") return;
|
|
892
903
|
let n = e.toLowerCase();
|
|
893
|
-
if (P.some((e) => n === e.toLowerCase()) ||
|
|
904
|
+
if (P.some((e) => n === e.toLowerCase()) || Ue.some((e) => n === e.toLowerCase())) throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
894
905
|
}
|
|
895
|
-
function
|
|
906
|
+
function gt(e, t) {
|
|
896
907
|
return typeof e == "boolean" ? {
|
|
897
908
|
enabled: e,
|
|
898
909
|
maxEntitySize: 1e4,
|
|
@@ -913,10 +924,10 @@ function dt(e, t) {
|
|
|
913
924
|
allowedTags: e.allowedTags ?? null,
|
|
914
925
|
tagFilter: e.tagFilter ?? null,
|
|
915
926
|
appliesTo: e.appliesTo ?? "all"
|
|
916
|
-
} :
|
|
927
|
+
} : gt(!0);
|
|
917
928
|
}
|
|
918
|
-
var
|
|
919
|
-
let t = Object.assign({},
|
|
929
|
+
var _t = function(e) {
|
|
930
|
+
let t = Object.assign({}, mt, e), n = [
|
|
920
931
|
{
|
|
921
932
|
value: t.attributeNamePrefix,
|
|
922
933
|
name: "attributeNamePrefix"
|
|
@@ -938,9 +949,9 @@ var ft = function(e) {
|
|
|
938
949
|
name: "commentPropName"
|
|
939
950
|
}
|
|
940
951
|
];
|
|
941
|
-
for (let { value: e, name: t } of n) e &&
|
|
942
|
-
return t.onDangerousProperty === null && (t.onDangerousProperty =
|
|
943
|
-
},
|
|
952
|
+
for (let { value: e, name: t } of n) e && ht(e, t);
|
|
953
|
+
return t.onDangerousProperty === null && (t.onDangerousProperty = pt), t.processEntities = gt(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;
|
|
954
|
+
}, W = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", G = class {
|
|
944
955
|
constructor(e) {
|
|
945
956
|
this.tagname = e, this.child = [], this[":@"] = Object.create(null);
|
|
946
957
|
}
|
|
@@ -951,12 +962,19 @@ var ft = function(e) {
|
|
|
951
962
|
e.tagname === "__proto__" && (e.tagname = "#__proto__"), e[":@"] && Object.keys(e[":@"]).length > 0 ? this.child.push({
|
|
952
963
|
[e.tagname]: e.child,
|
|
953
964
|
":@": e[":@"]
|
|
954
|
-
}) : this.child.push({ [e.tagname]: e.child }),
|
|
965
|
+
}) : this.child.push({ [e.tagname]: e.child }), this.addStartIndex(t);
|
|
966
|
+
}
|
|
967
|
+
addStartIndex(e) {
|
|
968
|
+
e !== void 0 && (this.child[this.child.length - 1][W] = { startIndex: e });
|
|
969
|
+
}
|
|
970
|
+
addEndIndex(e) {
|
|
971
|
+
let t = this.child[this.child.length - 1];
|
|
972
|
+
t !== void 0 && t[W] !== void 0 && t[W].endIndex === void 0 && (t[W].endIndex = e);
|
|
955
973
|
}
|
|
956
974
|
static getMetaDataSymbol() {
|
|
957
|
-
return
|
|
975
|
+
return W;
|
|
958
976
|
}
|
|
959
|
-
},
|
|
977
|
+
}, vt = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�", yt = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�\\-\\.\\d·̀-ͯ‿-⁀", bt = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", xt = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-\\-\\.\\d·̀-ͯ҇‿-⁀", K = (e, t, n = "") => {
|
|
960
978
|
let r = `[${e.replace(":", "")}][${t.replace(":", "")}]*`;
|
|
961
979
|
return {
|
|
962
980
|
name: RegExp(`^[${e}][${t}]*$`, n),
|
|
@@ -965,15 +983,15 @@ var ft = function(e) {
|
|
|
965
983
|
nmToken: RegExp(`^[${t}]+$`, n),
|
|
966
984
|
nmTokens: RegExp(`^[${t}]+(?:\\s+[${t}]+)*$`, n)
|
|
967
985
|
};
|
|
968
|
-
},
|
|
986
|
+
}, St = K(vt, yt), Ct = K(bt, xt, "u"), wt = K(":A-Za-z_", ":A-Za-z_\\-\\.\\d"), Tt = (e = "1.0", t = !1) => t ? wt : e === "1.1" ? Ct : St, Et = (e, { xmlVersion: t = "1.0", asciiOnly: n = !1 } = {}) => Tt(t, n).qName.test(e), Dt = [
|
|
969
987
|
"name",
|
|
970
988
|
"ncName",
|
|
971
989
|
"qName",
|
|
972
990
|
"nmToken",
|
|
973
991
|
"nmTokens"
|
|
974
|
-
],
|
|
975
|
-
if (!
|
|
976
|
-
let i =
|
|
992
|
+
], Ot = (e, { xmlVersion: t = "1.0", asciiOnly: n = !1, maxCacheSize: r = 2048 } = {}) => {
|
|
993
|
+
if (!Dt.includes(e)) throw TypeError(`Unknown production "${e}". Must be one of: ${Dt.join(", ")}`);
|
|
994
|
+
let i = Tt(t, n)[e], a = /* @__PURE__ */ new Map(), o = (e) => {
|
|
977
995
|
let t = a.get(e);
|
|
978
996
|
if (t !== void 0) return t;
|
|
979
997
|
let n = i.test(e);
|
|
@@ -982,7 +1000,7 @@ var ft = function(e) {
|
|
|
982
1000
|
return o.reset = () => {
|
|
983
1001
|
a = /* @__PURE__ */ new Map();
|
|
984
1002
|
}, o;
|
|
985
|
-
},
|
|
1003
|
+
}, kt = class {
|
|
986
1004
|
constructor(e, t) {
|
|
987
1005
|
this.suppressValidationErr = !e, this.options = e, this.xmlVersion = t || 1;
|
|
988
1006
|
}
|
|
@@ -993,31 +1011,41 @@ var ft = function(e) {
|
|
|
993
1011
|
let n = Object.create(null), r = 0;
|
|
994
1012
|
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
1013
|
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
|
-
|
|
1014
|
+
let i = 1, a = !1, o = !1, s = null, c = "";
|
|
1015
|
+
for (; t < e.length; t++) {
|
|
1016
|
+
if (s !== null) {
|
|
1017
|
+
e[t] === s && (s = null), c += e[t];
|
|
1018
|
+
continue;
|
|
1019
|
+
}
|
|
1020
|
+
if (!a && !o && (e[t] === "\"" || e[t] === "'")) {
|
|
1021
|
+
s = e[t], c += e[t];
|
|
1022
|
+
continue;
|
|
1023
|
+
}
|
|
1024
|
+
if (e[t] === "<" && !o) {
|
|
1025
|
+
if (a && J(e, "!ENTITY", t)) {
|
|
1026
|
+
t += 7;
|
|
1027
|
+
let i, a;
|
|
1028
|
+
if ([i, a, t] = this.readEntityExp(e, t + 1, this.suppressValidationErr), a.indexOf("&") === -1) {
|
|
1029
|
+
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})`);
|
|
1030
|
+
n[i] = a, r++;
|
|
1031
|
+
}
|
|
1032
|
+
} else if (a && J(e, "!ELEMENT", t)) {
|
|
1033
|
+
t += 8;
|
|
1034
|
+
let { index: n } = this.readElementExp(e, t + 1);
|
|
1035
|
+
t = n;
|
|
1036
|
+
} else if (a && J(e, "!ATTLIST", t)) t += 8;
|
|
1037
|
+
else if (a && J(e, "!NOTATION", t)) {
|
|
1038
|
+
t += 9;
|
|
1039
|
+
let { index: n } = this.readNotationExp(e, t + 1, this.suppressValidationErr);
|
|
1040
|
+
t = n;
|
|
1041
|
+
} else if (J(e, "!--", t)) o = !0;
|
|
1042
|
+
else throw Error("Invalid DOCTYPE");
|
|
1043
|
+
i++, c = "";
|
|
1044
|
+
} else if (e[t] === ">") {
|
|
1045
|
+
if (o ? e[t - 1] === "-" && e[t - 2] === "-" && (o = !1, i--) : i--, i === 0) break;
|
|
1046
|
+
} else e[t] === "[" ? a = !0 : c += e[t];
|
|
1047
|
+
}
|
|
1048
|
+
if (s !== null || i !== 0) throw Error("Unclosed DOCTYPE");
|
|
1021
1049
|
} else throw Error("Invalid Tag instead of DOCTYPE");
|
|
1022
1050
|
return {
|
|
1023
1051
|
entities: n,
|
|
@@ -1025,11 +1053,11 @@ var ft = function(e) {
|
|
|
1025
1053
|
};
|
|
1026
1054
|
}
|
|
1027
1055
|
readEntityExp(e, t) {
|
|
1028
|
-
t =
|
|
1056
|
+
t = q(e, t);
|
|
1029
1057
|
let n = t;
|
|
1030
1058
|
for (; t < e.length && !/\s/.test(e[t]) && e[t] !== "\"" && e[t] !== "'";) t++;
|
|
1031
1059
|
let r = e.substring(n, t);
|
|
1032
|
-
if (
|
|
1060
|
+
if (Y(r, { xmlVersion: this.xmlVersion }), t = q(e, t), !this.suppressValidationErr) {
|
|
1033
1061
|
if (e.substring(t, t + 6).toUpperCase() === "SYSTEM") throw Error("External entities are not supported");
|
|
1034
1062
|
if (e[t] === "%") throw Error("Parameter entities are not supported");
|
|
1035
1063
|
}
|
|
@@ -1042,16 +1070,16 @@ var ft = function(e) {
|
|
|
1042
1070
|
];
|
|
1043
1071
|
}
|
|
1044
1072
|
readNotationExp(e, t) {
|
|
1045
|
-
t =
|
|
1073
|
+
t = q(e, t);
|
|
1046
1074
|
let n = t;
|
|
1047
1075
|
for (; t < e.length && !/\s/.test(e[t]);) t++;
|
|
1048
1076
|
let r = e.substring(n, t);
|
|
1049
|
-
!this.suppressValidationErr &&
|
|
1077
|
+
!this.suppressValidationErr && Y(r, { xmlVersion: this.xmlVersion }), t = q(e, t);
|
|
1050
1078
|
let i = e.substring(t, t + 6).toUpperCase();
|
|
1051
1079
|
if (!this.suppressValidationErr && i !== "SYSTEM" && i !== "PUBLIC") throw Error(`Expected SYSTEM or PUBLIC, found "${i}"`);
|
|
1052
|
-
t += i.length, t =
|
|
1080
|
+
t += i.length, t = q(e, t);
|
|
1053
1081
|
let a = null, o = null;
|
|
1054
|
-
if (i === "PUBLIC") [t, a] = this.readIdentifierVal(e, t, "publicIdentifier"), t =
|
|
1082
|
+
if (i === "PUBLIC") [t, a] = this.readIdentifierVal(e, t, "publicIdentifier"), t = q(e, t), (e[t] === "\"" || e[t] === "'") && ([t, o] = this.readIdentifierVal(e, t, "systemIdentifier"));
|
|
1055
1083
|
else if (i === "SYSTEM" && ([t, o] = this.readIdentifierVal(e, t, "systemIdentifier"), !this.suppressValidationErr && !o)) throw Error("Missing mandatory system identifier for SYSTEM notation");
|
|
1056
1084
|
return {
|
|
1057
1085
|
notationName: r,
|
|
@@ -1070,15 +1098,15 @@ var ft = function(e) {
|
|
|
1070
1098
|
return t++, [t, r];
|
|
1071
1099
|
}
|
|
1072
1100
|
readElementExp(e, t) {
|
|
1073
|
-
t =
|
|
1101
|
+
t = q(e, t);
|
|
1074
1102
|
let n = t;
|
|
1075
1103
|
for (; t < e.length && !/\s/.test(e[t]);) t++;
|
|
1076
1104
|
let r = e.substring(n, t);
|
|
1077
|
-
if (!this.suppressValidationErr && !
|
|
1078
|
-
t =
|
|
1105
|
+
if (!this.suppressValidationErr && !Et(r, { xmlVersion: this.xmlVersion })) throw Error(`Invalid element name: "${r}"`);
|
|
1106
|
+
t = q(e, t);
|
|
1079
1107
|
let i = "";
|
|
1080
|
-
if (e[t] === "E" &&
|
|
1081
|
-
else if (e[t] === "A" &&
|
|
1108
|
+
if (e[t] === "E" && J(e, "MPTY", t)) t += 4;
|
|
1109
|
+
else if (e[t] === "A" && J(e, "NY", t)) t += 2;
|
|
1082
1110
|
else if (e[t] === "(") {
|
|
1083
1111
|
t++;
|
|
1084
1112
|
let n = t;
|
|
@@ -1092,25 +1120,25 @@ var ft = function(e) {
|
|
|
1092
1120
|
};
|
|
1093
1121
|
}
|
|
1094
1122
|
readAttlistExp(e, t) {
|
|
1095
|
-
t =
|
|
1123
|
+
t = q(e, t);
|
|
1096
1124
|
let n = t;
|
|
1097
1125
|
for (; t < e.length && !/\s/.test(e[t]);) t++;
|
|
1098
1126
|
let r = e.substring(n, t);
|
|
1099
|
-
for (
|
|
1127
|
+
for (Y(r, { xmlVersion: this.xmlVersion }), t = q(e, t), n = t; t < e.length && !/\s/.test(e[t]);) t++;
|
|
1100
1128
|
let i = e.substring(n, t);
|
|
1101
|
-
if (!
|
|
1102
|
-
t =
|
|
1129
|
+
if (!Y(i, { xmlVersion: this.xmlVersion })) throw Error(`Invalid attribute name: "${i}"`);
|
|
1130
|
+
t = q(e, t);
|
|
1103
1131
|
let a = "";
|
|
1104
1132
|
if (e.substring(t, t + 8).toUpperCase() === "NOTATION") {
|
|
1105
|
-
if (a = "NOTATION", t += 8, t =
|
|
1133
|
+
if (a = "NOTATION", t += 8, t = q(e, t), e[t] !== "(") throw Error(`Expected '(', found "${e[t]}"`);
|
|
1106
1134
|
t++;
|
|
1107
1135
|
let n = [];
|
|
1108
1136
|
for (; t < e.length && e[t] !== ")";) {
|
|
1109
1137
|
let r = t;
|
|
1110
1138
|
for (; t < e.length && e[t] !== "|" && e[t] !== ")";) t++;
|
|
1111
1139
|
let i = e.substring(r, t);
|
|
1112
|
-
if (i = i.trim(), !
|
|
1113
|
-
n.push(i), e[t] === "|" && (t++, t =
|
|
1140
|
+
if (i = i.trim(), !Y(i, { xmlVersion: this.xmlVersion })) throw Error(`Invalid notation name: "${i}"`);
|
|
1141
|
+
n.push(i), e[t] === "|" && (t++, t = q(e, t));
|
|
1114
1142
|
}
|
|
1115
1143
|
if (e[t] !== ")") throw Error("Unterminated list of notations");
|
|
1116
1144
|
t++, a += " (" + n.join("|") + ")";
|
|
@@ -1128,7 +1156,7 @@ var ft = function(e) {
|
|
|
1128
1156
|
"NMTOKENS"
|
|
1129
1157
|
].includes(a.toUpperCase())) throw Error(`Invalid attribute type: "${a}"`);
|
|
1130
1158
|
}
|
|
1131
|
-
t =
|
|
1159
|
+
t = q(e, t);
|
|
1132
1160
|
let o = "";
|
|
1133
1161
|
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
1162
|
elementName: r,
|
|
@@ -1138,21 +1166,21 @@ var ft = function(e) {
|
|
|
1138
1166
|
index: t
|
|
1139
1167
|
};
|
|
1140
1168
|
}
|
|
1141
|
-
},
|
|
1169
|
+
}, q = (e, t) => {
|
|
1142
1170
|
for (; t < e.length && /\s/.test(e[t]);) t++;
|
|
1143
1171
|
return t;
|
|
1144
1172
|
};
|
|
1145
|
-
function
|
|
1173
|
+
function J(e, t, n) {
|
|
1146
1174
|
for (let r = 0; r < t.length; r++) if (t[r] !== e[n + r + 1]) return !1;
|
|
1147
1175
|
return !0;
|
|
1148
1176
|
}
|
|
1149
|
-
function
|
|
1150
|
-
if (
|
|
1177
|
+
function Y(e, t) {
|
|
1178
|
+
if (Et(e, { xmlVersion: t })) return e;
|
|
1151
1179
|
throw Error(`Invalid entity name ${e}`);
|
|
1152
1180
|
}
|
|
1153
1181
|
//#endregion
|
|
1154
1182
|
//#region ../../node_modules/.pnpm/anynum@1.0.1/node_modules/anynum/digitTable.js
|
|
1155
|
-
var
|
|
1183
|
+
var At = [
|
|
1156
1184
|
48,
|
|
1157
1185
|
1632,
|
|
1158
1186
|
1776,
|
|
@@ -1214,28 +1242,28 @@ var Et = [
|
|
|
1214
1242
|
124144,
|
|
1215
1243
|
125264,
|
|
1216
1244
|
130032
|
|
1217
|
-
],
|
|
1218
|
-
for (let e of
|
|
1245
|
+
], X = /* @__PURE__ */ new Map(), jt = 65535, Mt = 1632, Nt = (/* @__PURE__ */ new Uint8Array(63904)).fill(255);
|
|
1246
|
+
for (let e of At) for (let t = 0; t < 10; t++) {
|
|
1219
1247
|
let n = e + t;
|
|
1220
|
-
n <=
|
|
1248
|
+
n <= jt ? Nt[n - Mt] = t : X.set(n, t);
|
|
1221
1249
|
}
|
|
1222
1250
|
//#endregion
|
|
1223
1251
|
//#region ../../node_modules/.pnpm/anynum@1.0.1/node_modules/anynum/anynum.js
|
|
1224
|
-
var
|
|
1252
|
+
var Pt = 48, Ft = 57, It = 45, Z = /* @__PURE__ */ new Set([
|
|
1225
1253
|
8722,
|
|
1226
1254
|
65293,
|
|
1227
1255
|
65123
|
|
1228
1256
|
]);
|
|
1229
|
-
function
|
|
1257
|
+
function Lt(e) {
|
|
1230
1258
|
if (typeof e != "string") return e;
|
|
1231
1259
|
let t = e.length;
|
|
1232
1260
|
if (t === 0) return e;
|
|
1233
1261
|
let n = -1;
|
|
1234
1262
|
for (let r = 0; r < t; r++) {
|
|
1235
1263
|
let i = e.charCodeAt(r);
|
|
1236
|
-
if (!(i >=
|
|
1264
|
+
if (!(i >= Pt && i <= Ft || i === It)) {
|
|
1237
1265
|
if (i < 1632) {
|
|
1238
|
-
if (
|
|
1266
|
+
if (Z.has(i)) {
|
|
1239
1267
|
n = r;
|
|
1240
1268
|
break;
|
|
1241
1269
|
}
|
|
@@ -1246,7 +1274,7 @@ function Nt(e) {
|
|
|
1246
1274
|
let t = e.charCodeAt(r + 1);
|
|
1247
1275
|
if (t >= 56320 && t <= 57343) {
|
|
1248
1276
|
let e = 65536 + (i - 55296 << 10) + (t - 56320);
|
|
1249
|
-
if (
|
|
1277
|
+
if (X.has(e)) {
|
|
1250
1278
|
n = r;
|
|
1251
1279
|
break;
|
|
1252
1280
|
}
|
|
@@ -1254,7 +1282,7 @@ function Nt(e) {
|
|
|
1254
1282
|
}
|
|
1255
1283
|
continue;
|
|
1256
1284
|
}
|
|
1257
|
-
if (
|
|
1285
|
+
if (Nt[i - 1632] !== 255 || Z.has(i)) {
|
|
1258
1286
|
n = r;
|
|
1259
1287
|
break;
|
|
1260
1288
|
}
|
|
@@ -1265,19 +1293,19 @@ function Nt(e) {
|
|
|
1265
1293
|
n > 0 && r.push(e.slice(0, n));
|
|
1266
1294
|
for (let i = n; i < t; i++) {
|
|
1267
1295
|
let n = e.charCodeAt(i);
|
|
1268
|
-
if (n >=
|
|
1296
|
+
if (n >= Pt && n <= Ft || n === It) {
|
|
1269
1297
|
r.push(e[i]);
|
|
1270
1298
|
continue;
|
|
1271
1299
|
}
|
|
1272
1300
|
if (n < 1632) {
|
|
1273
|
-
r.push(
|
|
1301
|
+
r.push(Z.has(n) ? "-" : e[i]);
|
|
1274
1302
|
continue;
|
|
1275
1303
|
}
|
|
1276
1304
|
if (n >= 55296 && n <= 56319) {
|
|
1277
1305
|
if (i + 1 < t) {
|
|
1278
1306
|
let t = e.charCodeAt(i + 1);
|
|
1279
1307
|
if (t >= 56320 && t <= 57343) {
|
|
1280
|
-
let e = 65536 + (n - 55296 << 10) + (t - 56320), a =
|
|
1308
|
+
let e = 65536 + (n - 55296 << 10) + (t - 56320), a = X.get(e);
|
|
1281
1309
|
if (a !== void 0) {
|
|
1282
1310
|
r.push(String.fromCharCode(a + 48)), i++;
|
|
1283
1311
|
continue;
|
|
@@ -1287,18 +1315,18 @@ function Nt(e) {
|
|
|
1287
1315
|
r.push(e[i]);
|
|
1288
1316
|
continue;
|
|
1289
1317
|
}
|
|
1290
|
-
if (
|
|
1318
|
+
if (Z.has(n)) {
|
|
1291
1319
|
r.push("-");
|
|
1292
1320
|
continue;
|
|
1293
1321
|
}
|
|
1294
|
-
let a =
|
|
1322
|
+
let a = Nt[n - Mt];
|
|
1295
1323
|
r.push(a === 255 ? e[i] : String.fromCharCode(a + 48));
|
|
1296
1324
|
}
|
|
1297
1325
|
return r.join("");
|
|
1298
1326
|
}
|
|
1299
1327
|
//#endregion
|
|
1300
|
-
//#region ../../node_modules/.pnpm/strnum@2.4.
|
|
1301
|
-
var
|
|
1328
|
+
//#region ../../node_modules/.pnpm/strnum@2.4.2/node_modules/strnum/strnum.js
|
|
1329
|
+
var Rt = /^[-+]?0x[a-fA-F0-9]+$/, zt = /^0b[01]+$/, Bt = /^0o[0-7]+$/, Vt = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, Ht = {
|
|
1302
1330
|
hex: !0,
|
|
1303
1331
|
binary: !1,
|
|
1304
1332
|
octal: !1,
|
|
@@ -1308,20 +1336,20 @@ var Pt = /^[-+]?0x[a-fA-F0-9]+$/, Ft = /^0b[01]+$/, It = /^0o[0-7]+$/, Lt = /^([
|
|
|
1308
1336
|
infinity: "original",
|
|
1309
1337
|
unicode: !1
|
|
1310
1338
|
};
|
|
1311
|
-
function
|
|
1312
|
-
if (t = Object.assign({},
|
|
1339
|
+
function Ut(e, t = {}) {
|
|
1340
|
+
if (t = Object.assign({}, Ht, t), !e || typeof e != "string") return e;
|
|
1313
1341
|
let n = e.trim();
|
|
1314
1342
|
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 =
|
|
1343
|
+
if (n === "0" || t.unicode && (n = Lt(n), n === "0")) return 0;
|
|
1344
|
+
if (t.hex && Rt.test(n)) return qt(n, 16);
|
|
1345
|
+
if (t.binary && zt.test(n)) return qt(n, 2);
|
|
1346
|
+
if (t.octal && Bt.test(n)) return qt(n, 8);
|
|
1347
|
+
if (!isFinite(n)) return Jt(e, Number(n), t);
|
|
1348
|
+
if (n.includes("e") || n.includes("E")) return Gt(e, n, t);
|
|
1349
|
+
{
|
|
1350
|
+
let r = Vt.exec(n);
|
|
1323
1351
|
if (r) {
|
|
1324
|
-
let i = r[1] || "", a = r[2], o =
|
|
1352
|
+
let i = r[1] || "", a = r[2], o = Kt(r[3]), s = i ? e[a.length + 1] === "." : e[a.length] === ".";
|
|
1325
1353
|
if (!t.leadingZeros && (a.length > 1 || a.length === 1 && !s)) return e;
|
|
1326
1354
|
{
|
|
1327
1355
|
let r = Number(n), s = String(r);
|
|
@@ -1335,27 +1363,32 @@ function zt(e, t = {}) {
|
|
|
1335
1363
|
return e;
|
|
1336
1364
|
}
|
|
1337
1365
|
}
|
|
1338
|
-
var
|
|
1339
|
-
function
|
|
1366
|
+
var Wt = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
|
1367
|
+
function Gt(e, t, n) {
|
|
1340
1368
|
if (!n.eNotation) return e;
|
|
1341
|
-
let r = t.match(
|
|
1369
|
+
let r = t.match(Wt);
|
|
1342
1370
|
if (r) {
|
|
1343
1371
|
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
1372
|
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
1373
|
}
|
|
1346
1374
|
return e;
|
|
1347
1375
|
}
|
|
1348
|
-
function
|
|
1349
|
-
|
|
1376
|
+
function Kt(e) {
|
|
1377
|
+
if (e && e.indexOf(".") !== -1) {
|
|
1378
|
+
let t = e.length;
|
|
1379
|
+
for (; t > 0 && e.charCodeAt(t - 1) === 48;) t--;
|
|
1380
|
+
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;
|
|
1381
|
+
}
|
|
1382
|
+
return e;
|
|
1350
1383
|
}
|
|
1351
|
-
function
|
|
1384
|
+
function qt(e, t) {
|
|
1352
1385
|
let n = e.trim();
|
|
1353
1386
|
if ((t === 2 || t === 8) && (e = n.substring(2)), parseInt) return parseInt(e, t);
|
|
1354
1387
|
if (Number.parseInt) return Number.parseInt(e, t);
|
|
1355
1388
|
if (window && window.parseInt) return window.parseInt(e, t);
|
|
1356
1389
|
throw Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
|
1357
1390
|
}
|
|
1358
|
-
function
|
|
1391
|
+
function Jt(e, t, n) {
|
|
1359
1392
|
let r = t === Infinity;
|
|
1360
1393
|
switch (n.infinity.toLowerCase()) {
|
|
1361
1394
|
case "null": return null;
|
|
@@ -1365,15 +1398,15 @@ function Wt(e, t, n) {
|
|
|
1365
1398
|
}
|
|
1366
1399
|
}
|
|
1367
1400
|
//#endregion
|
|
1368
|
-
//#region ../../node_modules/.pnpm/fast-xml-parser@5.
|
|
1369
|
-
function
|
|
1401
|
+
//#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/ignoreAttributes.js
|
|
1402
|
+
function Yt(e) {
|
|
1370
1403
|
return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
|
|
1371
1404
|
for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
|
|
1372
1405
|
} : () => !1;
|
|
1373
1406
|
}
|
|
1374
1407
|
//#endregion
|
|
1375
1408
|
//#region ../../node_modules/.pnpm/path-expression-matcher@1.6.2/node_modules/path-expression-matcher/src/Expression.js
|
|
1376
|
-
var
|
|
1409
|
+
var Xt = class {
|
|
1377
1410
|
constructor(e, t = {}, n) {
|
|
1378
1411
|
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
1412
|
}
|
|
@@ -1404,10 +1437,12 @@ var Kt = class {
|
|
|
1404
1437
|
].includes(n) || /^nth\(\d+\)$/.test(n) ? (s = t, c = n) : s = o;
|
|
1405
1438
|
} else s = o;
|
|
1406
1439
|
if (!s) throw Error(`Invalid segment pattern: ${e}`);
|
|
1407
|
-
if (t.tag = s, a && (t.namespace = a), n)
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1440
|
+
if (t.tag = s, a && (t.namespace = a), n) {
|
|
1441
|
+
if (n.includes("=")) {
|
|
1442
|
+
let e = n.indexOf("=");
|
|
1443
|
+
t.attrName = n.substring(0, e).trim(), t.attrValue = n.substring(e + 1).trim();
|
|
1444
|
+
} else t.attrName = n.trim();
|
|
1445
|
+
}
|
|
1411
1446
|
if (c) {
|
|
1412
1447
|
let e = c.match(/^nth\((\d+)\)$/);
|
|
1413
1448
|
e ? (t.position = "nth", t.positionValue = parseInt(e[1], 10)) : t.position = c;
|
|
@@ -1429,7 +1464,7 @@ var Kt = class {
|
|
|
1429
1464
|
toString() {
|
|
1430
1465
|
return this.pattern;
|
|
1431
1466
|
}
|
|
1432
|
-
},
|
|
1467
|
+
}, Zt = class {
|
|
1433
1468
|
constructor() {
|
|
1434
1469
|
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
1470
|
}
|
|
@@ -1487,7 +1522,7 @@ var Kt = class {
|
|
|
1487
1522
|
for (let t = 0; t < this._deepWildcards.length; t++) if (e.matches(this._deepWildcards[t])) return this._deepWildcards[t];
|
|
1488
1523
|
return null;
|
|
1489
1524
|
}
|
|
1490
|
-
},
|
|
1525
|
+
}, Qt = class {
|
|
1491
1526
|
constructor(e) {
|
|
1492
1527
|
this._matcher = e;
|
|
1493
1528
|
}
|
|
@@ -1544,9 +1579,9 @@ var Kt = class {
|
|
|
1544
1579
|
matchesAny(e) {
|
|
1545
1580
|
return e.matchesAny(this._matcher);
|
|
1546
1581
|
}
|
|
1547
|
-
},
|
|
1582
|
+
}, $t = class {
|
|
1548
1583
|
constructor(e = {}) {
|
|
1549
|
-
this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new
|
|
1584
|
+
this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new Qt(this), this._keptAttrs = [];
|
|
1550
1585
|
}
|
|
1551
1586
|
push(e, t = null, n = null, r = null) {
|
|
1552
1587
|
this._pathStringCache = null, this.path.length > 0 && (this.path[this.path.length - 1].values = void 0);
|
|
@@ -1697,7 +1732,7 @@ var Kt = class {
|
|
|
1697
1732
|
readOnly() {
|
|
1698
1733
|
return this._view;
|
|
1699
1734
|
}
|
|
1700
|
-
},
|
|
1735
|
+
}, en = [
|
|
1701
1736
|
{
|
|
1702
1737
|
id: "html-script-open",
|
|
1703
1738
|
description: "<script opening tag",
|
|
@@ -1783,7 +1818,7 @@ var Kt = class {
|
|
|
1783
1818
|
description: "<form tag — can be used for phishing / credential harvesting injection",
|
|
1784
1819
|
pattern: /<form[\s>/]/i
|
|
1785
1820
|
}
|
|
1786
|
-
],
|
|
1821
|
+
], tn = [
|
|
1787
1822
|
{
|
|
1788
1823
|
id: "xml-cdata-injection",
|
|
1789
1824
|
description: "CDATA section injection: <![CDATA[ breaks out of text node context",
|
|
@@ -1844,7 +1879,7 @@ var Kt = class {
|
|
|
1844
1879
|
description: "?> closes an enclosing processing instruction",
|
|
1845
1880
|
pattern: /\?>/
|
|
1846
1881
|
}
|
|
1847
|
-
],
|
|
1882
|
+
], nn = [
|
|
1848
1883
|
{
|
|
1849
1884
|
id: "svg-script-element",
|
|
1850
1885
|
description: "<script element inside SVG executes JavaScript",
|
|
@@ -1910,7 +1945,7 @@ var Kt = class {
|
|
|
1910
1945
|
description: "style= attribute containing javascript: (e.g. background:url(javascript:...))",
|
|
1911
1946
|
pattern: /style\s*=[\s\S]{0,60}javascript\s*:/i
|
|
1912
1947
|
}
|
|
1913
|
-
],
|
|
1948
|
+
], rn = [
|
|
1914
1949
|
{
|
|
1915
1950
|
id: "sql-block-comment-open",
|
|
1916
1951
|
description: "SQL block comment open: /* ... */ — unusual in legitimate user text",
|
|
@@ -1986,7 +2021,7 @@ var Kt = class {
|
|
|
1986
2021
|
description: "INFORMATION_SCHEMA — reconnaissance query for table/column enumeration",
|
|
1987
2022
|
pattern: /\bINFORMATION_SCHEMA\b/i
|
|
1988
2023
|
}
|
|
1989
|
-
],
|
|
2024
|
+
], an = [
|
|
1990
2025
|
{
|
|
1991
2026
|
id: "shell-path-traversal-unix",
|
|
1992
2027
|
description: "Unix path traversal: ../ — climbing the directory tree",
|
|
@@ -2077,7 +2112,7 @@ var Kt = class {
|
|
|
2077
2112
|
description: "curl/wget with URL or flags — can exfiltrate data or download payloads",
|
|
2078
2113
|
pattern: /\b(?:curl|wget)\s+(?:https?:\/\/|ftp:\/\/|-)/i
|
|
2079
2114
|
}
|
|
2080
|
-
],
|
|
2115
|
+
], on = [
|
|
2081
2116
|
{
|
|
2082
2117
|
id: "redos-nested-quantifier-plus",
|
|
2083
2118
|
description: "Nested + quantifier inside a group with outer quantifier: (a+)+, (.+b)*, etc.",
|
|
@@ -2118,71 +2153,71 @@ var Kt = class {
|
|
|
2118
2153
|
description: "Long alternation with many similar branches — polynomial backtracking risk",
|
|
2119
2154
|
pattern: /\([^)]{0,200}(?:\|[^|)]{0,50}){9,}\)/
|
|
2120
2155
|
}
|
|
2121
|
-
],
|
|
2156
|
+
], Q = "[\"'\\s]*:", sn = [
|
|
2122
2157
|
{
|
|
2123
2158
|
id: "nosql-where-operator",
|
|
2124
2159
|
description: "$where — executes arbitrary JavaScript server-side in MongoDB",
|
|
2125
|
-
pattern: RegExp(`\\$where${
|
|
2160
|
+
pattern: RegExp(`\\$where${Q}`, "i")
|
|
2126
2161
|
},
|
|
2127
2162
|
{
|
|
2128
2163
|
id: "nosql-ne-operator",
|
|
2129
2164
|
description: "$ne — \"not equal\" operator used to bypass equality checks",
|
|
2130
|
-
pattern: RegExp(`\\$ne${
|
|
2165
|
+
pattern: RegExp(`\\$ne${Q}`, "i")
|
|
2131
2166
|
},
|
|
2132
2167
|
{
|
|
2133
2168
|
id: "nosql-gt-operator",
|
|
2134
2169
|
description: "$gt — \"greater than\" used to bypass password/value checks",
|
|
2135
|
-
pattern: RegExp(`\\$gte?${
|
|
2170
|
+
pattern: RegExp(`\\$gte?${Q}`, "i")
|
|
2136
2171
|
},
|
|
2137
2172
|
{
|
|
2138
2173
|
id: "nosql-lt-operator",
|
|
2139
2174
|
description: "$lt / $lte — \"less than\" bypass variants",
|
|
2140
|
-
pattern: RegExp(`\\$lte?${
|
|
2175
|
+
pattern: RegExp(`\\$lte?${Q}`, "i")
|
|
2141
2176
|
},
|
|
2142
2177
|
{
|
|
2143
2178
|
id: "nosql-regex-operator",
|
|
2144
2179
|
description: "$regex — can be used to extract data character by character (blind injection)",
|
|
2145
|
-
pattern: RegExp(`\\$regex${
|
|
2180
|
+
pattern: RegExp(`\\$regex${Q}`, "i")
|
|
2146
2181
|
},
|
|
2147
2182
|
{
|
|
2148
2183
|
id: "nosql-or-operator",
|
|
2149
2184
|
description: "$or — logical OR; used to create always-true conditions",
|
|
2150
|
-
pattern: RegExp(`\\$or${
|
|
2185
|
+
pattern: RegExp(`\\$or${Q}\\s*\\[`, "i")
|
|
2151
2186
|
},
|
|
2152
2187
|
{
|
|
2153
2188
|
id: "nosql-and-operator",
|
|
2154
2189
|
description: "$and — logical AND operator injection",
|
|
2155
|
-
pattern: RegExp(`\\$and${
|
|
2190
|
+
pattern: RegExp(`\\$and${Q}\\s*\\[`, "i")
|
|
2156
2191
|
},
|
|
2157
2192
|
{
|
|
2158
2193
|
id: "nosql-nor-operator",
|
|
2159
2194
|
description: "$nor — logical NOR operator injection",
|
|
2160
|
-
pattern: RegExp(`\\$nor${
|
|
2195
|
+
pattern: RegExp(`\\$nor${Q}\\s*\\[`, "i")
|
|
2161
2196
|
},
|
|
2162
2197
|
{
|
|
2163
2198
|
id: "nosql-exists-operator",
|
|
2164
2199
|
description: "$exists — can enumerate fields to determine schema",
|
|
2165
|
-
pattern: RegExp(`\\$exists${
|
|
2200
|
+
pattern: RegExp(`\\$exists${Q}`, "i")
|
|
2166
2201
|
},
|
|
2167
2202
|
{
|
|
2168
2203
|
id: "nosql-in-operator",
|
|
2169
2204
|
description: "$in — matches any value in a list; can enumerate values",
|
|
2170
|
-
pattern: RegExp(`\\$in${
|
|
2205
|
+
pattern: RegExp(`\\$in${Q}\\s*\\[`, "i")
|
|
2171
2206
|
},
|
|
2172
2207
|
{
|
|
2173
2208
|
id: "nosql-expr-operator",
|
|
2174
2209
|
description: "$expr — allows aggregation expressions in queries (MongoDB 3.6+)",
|
|
2175
|
-
pattern: RegExp(`\\$expr${
|
|
2210
|
+
pattern: RegExp(`\\$expr${Q}`, "i")
|
|
2176
2211
|
},
|
|
2177
2212
|
{
|
|
2178
2213
|
id: "nosql-function-operator",
|
|
2179
2214
|
description: "$function — executes arbitrary JavaScript in MongoDB 4.4+",
|
|
2180
|
-
pattern: RegExp(`\\$function${
|
|
2215
|
+
pattern: RegExp(`\\$function${Q}`, "i")
|
|
2181
2216
|
},
|
|
2182
2217
|
{
|
|
2183
2218
|
id: "nosql-accumulator-operator",
|
|
2184
2219
|
description: "$accumulator — custom aggregation with arbitrary JS execution",
|
|
2185
|
-
pattern: RegExp(`\\$accumulator${
|
|
2220
|
+
pattern: RegExp(`\\$accumulator${Q}`, "i")
|
|
2186
2221
|
},
|
|
2187
2222
|
{
|
|
2188
2223
|
id: "nosql-proto-pollution",
|
|
@@ -2199,7 +2234,7 @@ var Kt = class {
|
|
|
2199
2234
|
description: "[\"__proto__\"] — bracket-notation prototype pollution",
|
|
2200
2235
|
pattern: /\[["']__proto__["']\]/
|
|
2201
2236
|
}
|
|
2202
|
-
],
|
|
2237
|
+
], cn = [
|
|
2203
2238
|
{
|
|
2204
2239
|
id: "log-crlf-injection",
|
|
2205
2240
|
description: "CRLF injection: literal \\r or \\n embeds fake log lines",
|
|
@@ -2260,7 +2295,7 @@ var Kt = class {
|
|
|
2260
2295
|
description: "ANSI escape sequence: ESC[ — can manipulate terminal output when logs are tailed",
|
|
2261
2296
|
pattern: /\x1b\[/
|
|
2262
2297
|
}
|
|
2263
|
-
],
|
|
2298
|
+
], ln = [
|
|
2264
2299
|
{
|
|
2265
2300
|
id: "sql-line-comment",
|
|
2266
2301
|
description: "SQL line comment: -- followed by whitespace or end of string",
|
|
@@ -2276,22 +2311,22 @@ var Kt = class {
|
|
|
2276
2311
|
description: "Hex-encoded string injection: 0x41414141 style (MySQL)",
|
|
2277
2312
|
pattern: /\b0x[0-9a-f]{4,}/i
|
|
2278
2313
|
}
|
|
2279
|
-
],
|
|
2280
|
-
|
|
2281
|
-
HTML:
|
|
2282
|
-
XML:
|
|
2283
|
-
SVG:
|
|
2284
|
-
SQL:
|
|
2285
|
-
"SQL-STRICT":
|
|
2286
|
-
SHELL:
|
|
2287
|
-
REDOS:
|
|
2288
|
-
NOSQL:
|
|
2289
|
-
LOG:
|
|
2314
|
+
], un = [...rn, ...ln];
|
|
2315
|
+
en.label = "HTML", tn.label = "XML", nn.label = "SVG", rn.label = "SQL", un.label = "SQL-STRICT", an.label = "SHELL", on.label = "REDOS", sn.label = "NOSQL", cn.label = "LOG", Object.freeze({
|
|
2316
|
+
HTML: en,
|
|
2317
|
+
XML: tn,
|
|
2318
|
+
SVG: nn,
|
|
2319
|
+
SQL: rn,
|
|
2320
|
+
"SQL-STRICT": un,
|
|
2321
|
+
SHELL: an,
|
|
2322
|
+
REDOS: on,
|
|
2323
|
+
NOSQL: sn,
|
|
2324
|
+
LOG: cn
|
|
2290
2325
|
});
|
|
2291
|
-
function
|
|
2326
|
+
function dn(e) {
|
|
2292
2327
|
if (typeof e != "string") throw TypeError(`is-unsafe: first argument must be a string, got ${typeof e}`);
|
|
2293
2328
|
}
|
|
2294
|
-
function
|
|
2329
|
+
function fn(e) {
|
|
2295
2330
|
if (!(e instanceof RegExp)) {
|
|
2296
2331
|
if (Array.isArray(e)) {
|
|
2297
2332
|
if (e.length === 0) throw TypeError("is-unsafe: context must not be an empty array");
|
|
@@ -2303,7 +2338,7 @@ function cn(e) {
|
|
|
2303
2338
|
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
2339
|
}
|
|
2305
2340
|
}
|
|
2306
|
-
function
|
|
2341
|
+
function pn(e) {
|
|
2307
2342
|
return e instanceof RegExp ? {
|
|
2308
2343
|
lists: null,
|
|
2309
2344
|
regex: e
|
|
@@ -2315,7 +2350,7 @@ function ln(e) {
|
|
|
2315
2350
|
regex: null
|
|
2316
2351
|
};
|
|
2317
2352
|
}
|
|
2318
|
-
function
|
|
2353
|
+
function mn(e, t) {
|
|
2319
2354
|
let n = t.label ?? "CUSTOM";
|
|
2320
2355
|
for (let r of t) if (r.pattern.test(e)) return {
|
|
2321
2356
|
context: n,
|
|
@@ -2325,16 +2360,16 @@ function un(e, t) {
|
|
|
2325
2360
|
};
|
|
2326
2361
|
return null;
|
|
2327
2362
|
}
|
|
2328
|
-
function
|
|
2329
|
-
|
|
2330
|
-
let { lists: n, regex: r } =
|
|
2363
|
+
function hn(e, t) {
|
|
2364
|
+
dn(e), fn(t);
|
|
2365
|
+
let { lists: n, regex: r } = pn(t);
|
|
2331
2366
|
if (r) return r.test(e);
|
|
2332
|
-
for (let t of n) if (
|
|
2367
|
+
for (let t of n) if (mn(e, t) !== null) return !0;
|
|
2333
2368
|
return !1;
|
|
2334
2369
|
}
|
|
2335
2370
|
//#endregion
|
|
2336
|
-
//#region ../../node_modules/.pnpm/fast-xml-parser@5.
|
|
2337
|
-
function
|
|
2371
|
+
//#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js
|
|
2372
|
+
function gn(e, t) {
|
|
2338
2373
|
if (!e) return {};
|
|
2339
2374
|
let n = t.attributesGroupName ? e[t.attributesGroupName] : e;
|
|
2340
2375
|
if (!n) return {};
|
|
@@ -2345,7 +2380,7 @@ function fn(e, t) {
|
|
|
2345
2380
|
} else r[e] = n[e];
|
|
2346
2381
|
return r;
|
|
2347
2382
|
}
|
|
2348
|
-
function
|
|
2383
|
+
function _n(e) {
|
|
2349
2384
|
if (!e || typeof e != "string") return;
|
|
2350
2385
|
let t = e.indexOf(":");
|
|
2351
2386
|
if (t !== -1 && t > 0) {
|
|
@@ -2353,14 +2388,14 @@ function pn(e) {
|
|
|
2353
2388
|
if (n !== "xmlns") return n;
|
|
2354
2389
|
}
|
|
2355
2390
|
}
|
|
2356
|
-
var
|
|
2391
|
+
var vn = class {
|
|
2357
2392
|
constructor(e, t) {
|
|
2358
|
-
this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.parseXml =
|
|
2359
|
-
let n = { ...
|
|
2393
|
+
this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = Cn, this.parseTextData = yn, this.resolveNameSpace = bn, this.buildAttributesMap = Sn, this.isItStopNode = Dn, this.replaceEntitiesValue = Tn, this.readStopNodeData = jn, this.saveTextToParentTag = En, this.addChild = wn, this.ignoreAttributesFn = Yt(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.doctypefound = !1;
|
|
2394
|
+
let n = { ...at };
|
|
2360
2395
|
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
|
|
2396
|
+
...ot,
|
|
2397
|
+
...it
|
|
2398
|
+
}), this.entityDecoder = new ft({
|
|
2364
2399
|
namedEntities: {
|
|
2365
2400
|
...n,
|
|
2366
2401
|
...t
|
|
@@ -2371,27 +2406,27 @@ var mn = class {
|
|
|
2371
2406
|
maxExpandedLength: this.options.processEntities.maxExpandedLength,
|
|
2372
2407
|
applyLimitsTo: this.options.processEntities.appliesTo
|
|
2373
2408
|
},
|
|
2374
|
-
onInputEntity: (e, t) =>
|
|
2375
|
-
})), this.matcher = new
|
|
2409
|
+
onInputEntity: (e, t) => hn(t, [en, tn]) ? R.BLOCK : R.ALLOW
|
|
2410
|
+
})), this.matcher = new $t(), this.readonlyMatcher = this.matcher.readOnly(), this.isCurrentNodeStopNode = !1, this.stopNodeExpressionsSet = new Zt();
|
|
2376
2411
|
let r = this.options.stopNodes;
|
|
2377
2412
|
if (r && r.length > 0) {
|
|
2378
2413
|
for (let e = 0; e < r.length; e++) {
|
|
2379
2414
|
let t = r[e];
|
|
2380
|
-
typeof t == "string" ? this.stopNodeExpressionsSet.add(new
|
|
2415
|
+
typeof t == "string" ? this.stopNodeExpressionsSet.add(new Xt(t)) : t instanceof Xt && this.stopNodeExpressionsSet.add(t);
|
|
2381
2416
|
}
|
|
2382
2417
|
this.stopNodeExpressionsSet.seal();
|
|
2383
2418
|
}
|
|
2384
2419
|
}
|
|
2385
2420
|
};
|
|
2386
|
-
function
|
|
2421
|
+
function yn(e, t, n, r, i, a, o) {
|
|
2387
2422
|
let s = this.options;
|
|
2388
2423
|
if (e !== void 0 && (s.trimValues && !r && (e = e.trim()), e.length > 0)) {
|
|
2389
2424
|
o || (e = this.replaceEntitiesValue(e, t, n));
|
|
2390
2425
|
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 ?
|
|
2426
|
+
return c == null ? e : typeof c != typeof e || c !== e ? c : s.trimValues || e.trim() === e ? Mn(e, s.parseTagValue, s.numberParseOptions) : e;
|
|
2392
2427
|
}
|
|
2393
2428
|
}
|
|
2394
|
-
function
|
|
2429
|
+
function bn(e) {
|
|
2395
2430
|
if (this.options.removeNSPrefix) {
|
|
2396
2431
|
let t = e.split(":"), n = e.charAt(0) === "/" ? "/" : "";
|
|
2397
2432
|
if (t[0] === "xmlns") return "";
|
|
@@ -2399,11 +2434,11 @@ function gn(e) {
|
|
|
2399
2434
|
}
|
|
2400
2435
|
return e;
|
|
2401
2436
|
}
|
|
2402
|
-
var
|
|
2403
|
-
function
|
|
2437
|
+
var xn = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
|
|
2438
|
+
function Sn(e, t, n, r = !1) {
|
|
2404
2439
|
let i = this.options;
|
|
2405
2440
|
if (r === !0 || i.ignoreAttributes !== !0 && typeof e == "string") {
|
|
2406
|
-
let r =
|
|
2441
|
+
let r = Be(e, xn), a = r.length, o = {}, s = Array(a), c = !1, l = {};
|
|
2407
2442
|
for (let e = 0; e < a; e++) {
|
|
2408
2443
|
let t = this.resolveNameSpace(r[e][1]), a = r[e][4];
|
|
2409
2444
|
if (t.length && a !== void 0) {
|
|
@@ -2417,10 +2452,12 @@ function vn(e, t, n, r = !1) {
|
|
|
2417
2452
|
let t = this.resolveNameSpace(r[e][1]);
|
|
2418
2453
|
if (this.ignoreAttributesFn(t, u)) continue;
|
|
2419
2454
|
let n = i.attributeNamePrefix + t;
|
|
2420
|
-
if (t.length)
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2455
|
+
if (t.length) {
|
|
2456
|
+
if (i.transformAttributeName && (n = i.transformAttributeName(n)), n = Pn(n, i), r[e][4] !== void 0) {
|
|
2457
|
+
let r = s[e], a = i.attributeValueProcessor(t, r, u);
|
|
2458
|
+
a == null ? o[n] = r : typeof a != typeof r || a !== r ? o[n] = a : o[n] = Mn(r, i.parseAttributeValue, i.numberParseOptions), d = !0;
|
|
2459
|
+
} else i.allowBooleanAttributes && (o[n] = !0, d = !0);
|
|
2460
|
+
}
|
|
2424
2461
|
}
|
|
2425
2462
|
if (!d) return;
|
|
2426
2463
|
if (i.attributesGroupName && !i.preserveOrder) {
|
|
@@ -2430,25 +2467,25 @@ function vn(e, t, n, r = !1) {
|
|
|
2430
2467
|
return o;
|
|
2431
2468
|
}
|
|
2432
2469
|
}
|
|
2433
|
-
var
|
|
2470
|
+
var Cn = function(e) {
|
|
2434
2471
|
e = e.replace(/\r\n?/g, "\n");
|
|
2435
|
-
let t = new
|
|
2472
|
+
let t = new G("!xml"), n = t, r = "";
|
|
2436
2473
|
this.matcher.reset(), this.entityDecoder.reset(), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.doctypefound = !1;
|
|
2437
|
-
let i = this.options, a = new
|
|
2474
|
+
let i = this.options, a = new kt(i.processEntities), o = e.length;
|
|
2438
2475
|
for (let s = 0; s < o; s++) if (e[s] === "<") {
|
|
2439
2476
|
let c = e.charCodeAt(s + 1);
|
|
2440
2477
|
if (c === 47) {
|
|
2441
|
-
let
|
|
2478
|
+
let a = $(e, ">", s, "Closing Tag is not closed."), o = e.substring(s + 2, a).trim();
|
|
2442
2479
|
if (i.removeNSPrefix) {
|
|
2443
|
-
let e =
|
|
2444
|
-
e !== -1 && (
|
|
2480
|
+
let e = o.indexOf(":");
|
|
2481
|
+
e !== -1 && (o = o.substr(e + 1));
|
|
2445
2482
|
}
|
|
2446
|
-
|
|
2447
|
-
let
|
|
2448
|
-
if (
|
|
2449
|
-
|
|
2483
|
+
o = Nn(i.transformTagName, o, "", i).tagName, n && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher));
|
|
2484
|
+
let c = this.matcher.getCurrentTag();
|
|
2485
|
+
if (o && i.unpairedTagsSet.has(o)) throw Error(`Unpaired tag can not be used as closing tag: </${o}>`);
|
|
2486
|
+
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
2487
|
} else if (c === 63) {
|
|
2451
|
-
let t =
|
|
2488
|
+
let t = An(e, s, !1, "?>");
|
|
2452
2489
|
if (!t) throw Error("Pi Tag is not closed.");
|
|
2453
2490
|
r = this.saveTextToParentTag(r, n, this.readonlyMatcher);
|
|
2454
2491
|
let o = this.buildAttributesMap(t.tagExp, this.matcher, t.tagName, !0);
|
|
@@ -2457,12 +2494,12 @@ var yn = function(e) {
|
|
|
2457
2494
|
this.entityDecoder.setXmlVersion(Number(e) || 1), a.setXmlVersion(Number(e) || 1);
|
|
2458
2495
|
}
|
|
2459
2496
|
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);
|
|
2497
|
+
let e = new G(t.tagName);
|
|
2498
|
+
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
2499
|
}
|
|
2463
2500
|
s = t.closeIndex + 1;
|
|
2464
2501
|
} else if (c === 33 && e.charCodeAt(s + 2) === 45 && e.charCodeAt(s + 3) === 45) {
|
|
2465
|
-
let t =
|
|
2502
|
+
let t = $(e, "-->", s + 4, "Comment is not closed.");
|
|
2466
2503
|
if (i.commentPropName) {
|
|
2467
2504
|
let a = e.substring(s + 4, t - 2);
|
|
2468
2505
|
r = this.saveTextToParentTag(r, n, this.readonlyMatcher), n.add(i.commentPropName, [{ [i.textNodeName]: a }]);
|
|
@@ -2474,25 +2511,25 @@ var yn = function(e) {
|
|
|
2474
2511
|
let t = a.readDocType(e, s);
|
|
2475
2512
|
this.entityDecoder.addInputEntities(t.entities), s = t.i;
|
|
2476
2513
|
} else if (c === 33 && e.charCodeAt(s + 2) === 91) {
|
|
2477
|
-
let t =
|
|
2514
|
+
let t = $(e, "]]>", s, "CDATA is not closed.") - 2, a = e.substring(s + 9, t);
|
|
2478
2515
|
r = this.saveTextToParentTag(r, n, this.readonlyMatcher);
|
|
2479
2516
|
let o = this.parseTextData(a, n.tagname, this.readonlyMatcher, !0, !1, !0, !0);
|
|
2480
2517
|
o ??= "", i.cdataPropName ? n.add(i.cdataPropName, [{ [i.textNodeName]: a }]) : n.add(i.textNodeName, o), s = t + 2;
|
|
2481
2518
|
} else {
|
|
2482
|
-
let a =
|
|
2519
|
+
let a = An(e, s, i.removeNSPrefix);
|
|
2483
2520
|
if (!a) {
|
|
2484
2521
|
let t = e.substring(Math.max(0, s - 50), Math.min(o, s + 50));
|
|
2485
2522
|
throw Error(`readTagExp returned undefined at position ${s}. Context: "${t}"`);
|
|
2486
2523
|
}
|
|
2487
2524
|
let c = a.tagName, l = a.rawTagName, u = a.tagExp, d = a.attrExpPresent, f = a.closeIndex;
|
|
2488
|
-
if ({tagName: c, tagExp: u} =
|
|
2525
|
+
if ({tagName: c, tagExp: u} = Nn(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
2526
|
n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher, !1));
|
|
2490
2527
|
let p = n;
|
|
2491
2528
|
p && i.unpairedTagsSet.has(p.tagname) && (n = this.tagsNodeStack.pop(), this.matcher.pop());
|
|
2492
2529
|
let m = !1;
|
|
2493
2530
|
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
2531
|
let h = null, g;
|
|
2495
|
-
g =
|
|
2532
|
+
g = _n(l), c !== t.tagname && this.matcher.push(c, {}, g), c !== u && d && (h = this.buildAttributesMap(u, this.matcher, c), h && gn(h, i)), c !== t.tagname && (this.isCurrentNodeStopNode = this.isItStopNode());
|
|
2496
2533
|
let _ = s;
|
|
2497
2534
|
if (this.isCurrentNodeStopNode) {
|
|
2498
2535
|
let t = "";
|
|
@@ -2503,19 +2540,19 @@ var yn = function(e) {
|
|
|
2503
2540
|
if (!n) throw Error(`Unexpected end of ${l}`);
|
|
2504
2541
|
s = n.i, t = n.tagContent;
|
|
2505
2542
|
}
|
|
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, _);
|
|
2543
|
+
let r = new G(c);
|
|
2544
|
+
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
2545
|
} else {
|
|
2509
2546
|
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;
|
|
2547
|
+
({tagName: c, tagExp: u} = Nn(i.transformTagName, c, u, i));
|
|
2548
|
+
let e = new G(c);
|
|
2549
|
+
h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), i.captureMetaData && n.addEndIndex(f + 1), this.matcher.pop(), this.isCurrentNodeStopNode = !1;
|
|
2513
2550
|
} 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;
|
|
2551
|
+
let e = new G(c);
|
|
2552
|
+
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
2553
|
continue;
|
|
2517
2554
|
} else {
|
|
2518
|
-
let e = new
|
|
2555
|
+
let e = new G(c);
|
|
2519
2556
|
if (this.tagsNodeStack.length > i.maxNestedTags) throw Error("Maximum nested tags exceeded");
|
|
2520
2557
|
this.tagsNodeStack.push(n), h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), n = e;
|
|
2521
2558
|
}
|
|
@@ -2525,12 +2562,12 @@ var yn = function(e) {
|
|
|
2525
2562
|
} else r += e[s];
|
|
2526
2563
|
return t.child;
|
|
2527
2564
|
};
|
|
2528
|
-
function
|
|
2565
|
+
function wn(e, t, n, r) {
|
|
2529
2566
|
this.options.captureMetaData || (r = void 0);
|
|
2530
2567
|
let i = this.options.jPath ? n.toString() : n, a = this.options.updateTag(t.tagname, i, t[":@"]);
|
|
2531
2568
|
a === !1 || (typeof a == "string" && (t.tagname = a), e.addChild(t, r));
|
|
2532
2569
|
}
|
|
2533
|
-
function
|
|
2570
|
+
function Tn(e, t, n) {
|
|
2534
2571
|
let r = this.options.processEntities;
|
|
2535
2572
|
if (!r || !r.enabled) return e;
|
|
2536
2573
|
if (r.allowedTags) {
|
|
@@ -2543,42 +2580,43 @@ function xn(e, t, n) {
|
|
|
2543
2580
|
}
|
|
2544
2581
|
return this.entityDecoder.decode(e);
|
|
2545
2582
|
}
|
|
2546
|
-
function
|
|
2583
|
+
function En(e, t, n, r) {
|
|
2547
2584
|
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
2585
|
}
|
|
2549
|
-
function
|
|
2586
|
+
function Dn() {
|
|
2550
2587
|
return this.stopNodeExpressionsSet.size !== 0 && this.matcher.matchesAny(this.stopNodeExpressionsSet);
|
|
2551
2588
|
}
|
|
2552
|
-
function
|
|
2589
|
+
function On(e, t, n = ">") {
|
|
2553
2590
|
let r = 0, i = e.length, a = n.charCodeAt(0), o = n.length > 1 ? n.charCodeAt(1) : -1, s = "", c = t;
|
|
2554
2591
|
for (let n = t; n < i; n++) {
|
|
2555
2592
|
let t = e.charCodeAt(n);
|
|
2556
2593
|
if (r) t === r && (r = 0);
|
|
2557
2594
|
else if (t === 34 || t === 39) r = t;
|
|
2558
|
-
else if (t === a)
|
|
2559
|
-
if (
|
|
2595
|
+
else if (t === a) {
|
|
2596
|
+
if (o !== -1) {
|
|
2597
|
+
if (e.charCodeAt(n + 1) === o) return s += e.substring(c, n), {
|
|
2598
|
+
data: s,
|
|
2599
|
+
index: n
|
|
2600
|
+
};
|
|
2601
|
+
} else return s += e.substring(c, n), {
|
|
2560
2602
|
data: s,
|
|
2561
2603
|
index: n
|
|
2562
2604
|
};
|
|
2563
|
-
} else
|
|
2564
|
-
data: s,
|
|
2565
|
-
index: n
|
|
2566
|
-
};
|
|
2567
|
-
else t === 9 && !r && (s += e.substring(c, n) + " ", c = n + 1);
|
|
2605
|
+
} else t === 9 && !r && (s += e.substring(c, n) + " ", c = n + 1);
|
|
2568
2606
|
}
|
|
2569
2607
|
}
|
|
2570
|
-
function
|
|
2608
|
+
function $(e, t, n, r) {
|
|
2571
2609
|
let i = e.indexOf(t, n);
|
|
2572
2610
|
if (i === -1) throw Error(r);
|
|
2573
2611
|
return i + t.length - 1;
|
|
2574
2612
|
}
|
|
2575
|
-
function
|
|
2613
|
+
function kn(e, t, n, r) {
|
|
2576
2614
|
let i = e.indexOf(t, n);
|
|
2577
2615
|
if (i === -1) throw Error(r);
|
|
2578
2616
|
return i;
|
|
2579
2617
|
}
|
|
2580
|
-
function
|
|
2581
|
-
let i =
|
|
2618
|
+
function An(e, t, n, r = ">") {
|
|
2619
|
+
let i = On(e, t + 1, r);
|
|
2582
2620
|
if (!i) return;
|
|
2583
2621
|
let a = i.data, o = i.index, s = a.search(/\s/), c = a, l = !0;
|
|
2584
2622
|
s !== -1 && (c = a.substring(0, s), a = a.substring(s + 1).trimStart());
|
|
@@ -2595,51 +2633,51 @@ function En(e, t, n, r = ">") {
|
|
|
2595
2633
|
rawTagName: u
|
|
2596
2634
|
};
|
|
2597
2635
|
}
|
|
2598
|
-
function
|
|
2636
|
+
function jn(e, t, n) {
|
|
2599
2637
|
let r = n, i = 1, a = e.length;
|
|
2600
2638
|
for (; n < a; n++) if (e[n] === "<") {
|
|
2601
2639
|
let a = e.charCodeAt(n + 1);
|
|
2602
2640
|
if (a === 47) {
|
|
2603
|
-
let a =
|
|
2641
|
+
let a = kn(e, ">", n, `${t} is not closed`);
|
|
2604
2642
|
if (e.substring(n + 2, a).trim() === t && (i--, i === 0)) return {
|
|
2605
2643
|
tagContent: e.substring(r, n),
|
|
2606
2644
|
i: a
|
|
2607
2645
|
};
|
|
2608
2646
|
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 =
|
|
2647
|
+
} else if (a === 63) n = $(e, "?>", n + 1, "StopNode is not closed.");
|
|
2648
|
+
else if (a === 33 && e.charCodeAt(n + 2) === 45 && e.charCodeAt(n + 3) === 45) n = $(e, "-->", n + 3, "StopNode is not closed.");
|
|
2649
|
+
else if (a === 33 && e.charCodeAt(n + 2) === 91) n = $(e, "]]>", n, "StopNode is not closed.") - 2;
|
|
2612
2650
|
else {
|
|
2613
|
-
let r =
|
|
2651
|
+
let r = An(e, n, !1);
|
|
2614
2652
|
r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
|
|
2615
2653
|
}
|
|
2616
2654
|
}
|
|
2617
2655
|
}
|
|
2618
|
-
function
|
|
2656
|
+
function Mn(e, t, n) {
|
|
2619
2657
|
if (t && typeof e == "string") {
|
|
2620
2658
|
let t = e.trim();
|
|
2621
|
-
return t === "true" || t !== "false" &&
|
|
2659
|
+
return t === "true" || t !== "false" && Ut(e, n);
|
|
2622
2660
|
}
|
|
2623
|
-
return
|
|
2661
|
+
return He(e) ? e : "";
|
|
2624
2662
|
}
|
|
2625
|
-
function
|
|
2663
|
+
function Nn(e, t, n, r) {
|
|
2626
2664
|
if (e) {
|
|
2627
2665
|
let r = e(t);
|
|
2628
2666
|
n === t && (n = r), t = r;
|
|
2629
2667
|
}
|
|
2630
|
-
return t =
|
|
2668
|
+
return t = Pn(t, r), {
|
|
2631
2669
|
tagName: t,
|
|
2632
2670
|
tagExp: n
|
|
2633
2671
|
};
|
|
2634
2672
|
}
|
|
2635
|
-
function
|
|
2636
|
-
if (
|
|
2673
|
+
function Pn(e, t) {
|
|
2674
|
+
if (Ue.includes(e)) throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
2637
2675
|
return P.includes(e) ? t.onDangerousProperty(e) : e;
|
|
2638
2676
|
}
|
|
2639
2677
|
//#endregion
|
|
2640
|
-
//#region ../../node_modules/.pnpm/fast-xml-parser@5.
|
|
2641
|
-
var
|
|
2642
|
-
function
|
|
2678
|
+
//#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/xmlparser/node2json.js
|
|
2679
|
+
var Fn = G.getMetaDataSymbol();
|
|
2680
|
+
function In(e, t) {
|
|
2643
2681
|
if (!e || typeof e != "object") return {};
|
|
2644
2682
|
if (!t) return e;
|
|
2645
2683
|
let n = {};
|
|
@@ -2649,22 +2687,22 @@ function jn(e, t) {
|
|
|
2649
2687
|
} else n[r] = e[r];
|
|
2650
2688
|
return n;
|
|
2651
2689
|
}
|
|
2652
|
-
function
|
|
2653
|
-
return
|
|
2690
|
+
function Ln(e, t, n, r) {
|
|
2691
|
+
return Rn(e, t, n, r);
|
|
2654
2692
|
}
|
|
2655
|
-
function
|
|
2693
|
+
function Rn(e, t, n, r) {
|
|
2656
2694
|
let i, a = {};
|
|
2657
2695
|
for (let o = 0; o < e.length; o++) {
|
|
2658
|
-
let s = e[o], c =
|
|
2696
|
+
let s = e[o], c = zn(s);
|
|
2659
2697
|
if (c !== void 0 && c !== t.textNodeName) {
|
|
2660
|
-
let e =
|
|
2698
|
+
let e = In(s[":@"] || {}, t.attributeNamePrefix);
|
|
2661
2699
|
n.push(c, e);
|
|
2662
2700
|
}
|
|
2663
2701
|
if (c === t.textNodeName) i === void 0 ? i = s[c] : i += "" + s[c];
|
|
2664
2702
|
else if (c === void 0) continue;
|
|
2665
2703
|
else if (s[c]) {
|
|
2666
|
-
let e =
|
|
2667
|
-
if (Object.keys(e).length === 0 && t.alwaysCreateTextNode && (e[t.textNodeName] = ""), s[":@"] ?
|
|
2704
|
+
let e = Rn(s[c], t, n, r), i = Vn(e, t);
|
|
2705
|
+
if (Object.keys(e).length === 0 && t.alwaysCreateTextNode && (e[t.textNodeName] = ""), s[":@"] ? Bn(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[Fn] !== void 0 && typeof e == "object" && e && (e[Fn] = s[Fn]), a[c] !== void 0 && Object.prototype.hasOwnProperty.call(a, c)) Array.isArray(a[c]) || (a[c] = [a[c]]), a[c].push(e);
|
|
2668
2706
|
else {
|
|
2669
2707
|
let n = t.jPath ? r.toString() : r;
|
|
2670
2708
|
a[c] = t.isArray(c, n, i) ? [e] : e;
|
|
@@ -2674,14 +2712,14 @@ function Nn(e, t, n, r) {
|
|
|
2674
2712
|
}
|
|
2675
2713
|
return typeof i == "string" ? i.length > 0 && (a[t.textNodeName] = i) : i !== void 0 && (a[t.textNodeName] = i), a;
|
|
2676
2714
|
}
|
|
2677
|
-
function
|
|
2715
|
+
function zn(e) {
|
|
2678
2716
|
let t = Object.keys(e);
|
|
2679
2717
|
for (let e = 0; e < t.length; e++) {
|
|
2680
2718
|
let n = t[e];
|
|
2681
2719
|
if (n !== ":@") return n;
|
|
2682
2720
|
}
|
|
2683
2721
|
}
|
|
2684
|
-
function
|
|
2722
|
+
function Bn(e, t, n, r) {
|
|
2685
2723
|
if (t) {
|
|
2686
2724
|
let i = Object.keys(t), a = i.length;
|
|
2687
2725
|
for (let o = 0; o < a; o++) {
|
|
@@ -2690,26 +2728,26 @@ function Fn(e, t, n, r) {
|
|
|
2690
2728
|
}
|
|
2691
2729
|
}
|
|
2692
2730
|
}
|
|
2693
|
-
function
|
|
2731
|
+
function Vn(e, t) {
|
|
2694
2732
|
let { textNodeName: n } = t, r = Object.keys(e).length;
|
|
2695
2733
|
return !!(r === 0 || r === 1 && (e[n] || typeof e[n] == "boolean" || e[n] === 0));
|
|
2696
2734
|
}
|
|
2697
2735
|
//#endregion
|
|
2698
|
-
//#region ../../node_modules/.pnpm/fast-xml-parser@5.
|
|
2699
|
-
var
|
|
2736
|
+
//#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
|
|
2737
|
+
var Hn = class {
|
|
2700
2738
|
constructor(e) {
|
|
2701
|
-
this.externalEntities = {}, this.options =
|
|
2739
|
+
this.externalEntities = {}, this.options = _t(e);
|
|
2702
2740
|
}
|
|
2703
2741
|
parse(e, t) {
|
|
2704
2742
|
if (typeof e != "string" && e.toString) e = e.toString();
|
|
2705
2743
|
else if (typeof e != "string") throw Error("XML data is accepted in String or Bytes[] form.");
|
|
2706
2744
|
if (t) {
|
|
2707
2745
|
t === !0 && (t = {});
|
|
2708
|
-
let n =
|
|
2746
|
+
let n = Ge(e, t);
|
|
2709
2747
|
if (n !== !0) throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
|
|
2710
2748
|
}
|
|
2711
|
-
let n = new
|
|
2712
|
-
return this.options.preserveOrder || r === void 0 ? r :
|
|
2749
|
+
let n = new vn(this.options, this.externalEntities), r = n.parseXml(e);
|
|
2750
|
+
return this.options.preserveOrder || r === void 0 ? r : Ln(r, this.options, n.matcher, n.readonlyMatcher);
|
|
2713
2751
|
}
|
|
2714
2752
|
addEntity(e, t) {
|
|
2715
2753
|
if (t.indexOf("&") !== -1) throw Error("Entity value can't have '&'");
|
|
@@ -2718,9 +2756,9 @@ var Ln = class {
|
|
|
2718
2756
|
this.externalEntities[e] = t;
|
|
2719
2757
|
}
|
|
2720
2758
|
static getMetaDataSymbol() {
|
|
2721
|
-
return
|
|
2759
|
+
return G.getMetaDataSymbol();
|
|
2722
2760
|
}
|
|
2723
|
-
},
|
|
2761
|
+
}, Un = class {
|
|
2724
2762
|
axiosClient;
|
|
2725
2763
|
baseURI;
|
|
2726
2764
|
xmlParser;
|
|
@@ -2730,7 +2768,7 @@ var Ln = class {
|
|
|
2730
2768
|
HASH_LENGTH = 32;
|
|
2731
2769
|
ITERATION_COUNT = 1e4;
|
|
2732
2770
|
constructor({ axiosClient: e, baseURI: t }) {
|
|
2733
|
-
this.axiosClient = e, this.baseURI = t, this.xmlParser = new
|
|
2771
|
+
this.axiosClient = e, this.baseURI = t, this.xmlParser = new Hn();
|
|
2734
2772
|
}
|
|
2735
2773
|
async signUrl(e, t) {
|
|
2736
2774
|
let n = new URL(e);
|
|
@@ -2744,16 +2782,16 @@ var Ln = class {
|
|
|
2744
2782
|
return this.signingKey = n.ocs.data["signing-key"], this.signingKey;
|
|
2745
2783
|
}
|
|
2746
2784
|
async createHashedKey(e) {
|
|
2747
|
-
return
|
|
2785
|
+
return Re(e, await this.getSignKey(), this.ITERATION_COUNT, this.HASH_LENGTH, this.ALGORITHM).toString("hex");
|
|
2748
2786
|
}
|
|
2749
|
-
},
|
|
2787
|
+
}, Wn = (e, t) => {
|
|
2750
2788
|
let n = new URL(e);
|
|
2751
2789
|
n.pathname = [
|
|
2752
2790
|
...n.pathname.split("/"),
|
|
2753
2791
|
"ocs",
|
|
2754
2792
|
"v1.php"
|
|
2755
2793
|
].filter(Boolean).join("/");
|
|
2756
|
-
let r = n.href, i = v(r, t), a = new
|
|
2794
|
+
let r = n.href, i = v(r, t), a = new Un({
|
|
2757
2795
|
baseURI: e,
|
|
2758
2796
|
axiosClient: t
|
|
2759
2797
|
});
|
|
@@ -2763,4 +2801,4 @@ var Ln = class {
|
|
|
2763
2801
|
};
|
|
2764
2802
|
};
|
|
2765
2803
|
//#endregion
|
|
2766
|
-
export {
|
|
2804
|
+
export { Ot as a, Xt as i, Hn as n, v as o, $t as r, Wn as t };
|