@opencloud-eu/web-client 8.2.1 → 8.2.2
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-CZcFYsAI.js +2405 -0
- package/dist/dist-KEM01zRn.js +3 -0
- package/dist/{generated-4nR8KA38.js → generated-DNXECX0W.js} +2 -3
- package/dist/{graph-CwVan2Jp.js → graph-BKQg17FE.js} +49 -51
- package/dist/{helpers-Bh5xR_vg.js → helpers-BnhEi-vU.js} +63 -107
- package/dist/{ocs-Dfdjrujs.js → ocs-BPMytNew.js} +706 -689
- package/dist/{schemas-rdabTCJb.js → schemas-F0EHDbLA.js} +12 -22
- package/dist/src/helpers/resource/types.d.ts +4 -2
- package/dist/src/ocs/capabilities.d.ts +3 -0
- package/dist/src/webdav/constants/dav.d.ts +7 -0
- package/dist/src/webdav/getFileUrl.d.ts +2 -1
- package/dist/src/webdav/getPublicLinkSignature.d.ts +12 -0
- package/dist/src/webdav/index.d.ts +1 -0
- package/dist/src/webdav/restoreFileVersion.d.ts +2 -2
- package/dist/src/webdav/types.d.ts +2 -0
- package/dist/{toString-uorCN9F3.js → toString-DOYcT1Pn.js} +40 -79
- package/dist/{urlJoin-_pUL1TUx.js → urlJoin-ELOJmfWG.js} +1 -2
- package/dist/web-client/graph/generated.js +1 -1
- package/dist/web-client/graph.js +1 -1
- package/dist/web-client/ocs.js +1 -1
- package/dist/web-client/ox.js +3 -4
- package/dist/web-client/sse.js +4 -7
- package/dist/web-client/webdav.js +2 -2
- package/dist/web-client.js +14 -15
- package/dist/{webdav-DrQsSfxZ.js → webdav-BByRDKI2.js} +911 -909
- package/package.json +1 -1
- package/dist/axios-DRPhbClr.js +0 -2144
- package/dist/dist-CHy-DaIN.js +0 -4
|
@@ -1,43 +1,41 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./axios-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
var
|
|
1
|
+
import { n as e, r as t, t as n } from "./axios-CZcFYsAI.js";
|
|
2
|
+
import { E as r, K as i, M as a, N as o, U as s, W as c, Y as l, _ as u, f as d, q as f } from "./helpers-BnhEi-vU.js";
|
|
3
|
+
import { t as p } from "./urlJoin-ELOJmfWG.js";
|
|
4
|
+
import { a as m, i as h, n as g, r as _, t as v } from "./ocs-BPMytNew.js";
|
|
5
|
+
import { t as y } from "./dist-KEM01zRn.js";
|
|
6
|
+
// src/utils/encodePath.ts
|
|
7
|
+
var b = (e) => encodeURIComponent(e).split("%2F").join("/"), x = class extends Error {
|
|
8
8
|
response;
|
|
9
9
|
statusCode;
|
|
10
10
|
constructor(e, t, n = null) {
|
|
11
11
|
super(e), this.response = t, this.statusCode = n;
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, S = class extends x {
|
|
14
14
|
errorCode;
|
|
15
15
|
errorType;
|
|
16
16
|
constructor(e, t, n, r = null, i) {
|
|
17
17
|
super(e, n, r), this.errorCode = t, this.errorType = i;
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
//#region ../../node_modules/.pnpm/fast-xml-builder@1.3.1/node_modules/fast-xml-builder/src/util.js
|
|
22
|
-
function S(e) {
|
|
23
|
-
return typeof e == "number" && Object.is(e, -0) ? "-0" : String(e);
|
|
24
|
-
}
|
|
20
|
+
// ../../node_modules/.pnpm/fast-xml-builder@1.3.1/node_modules/fast-xml-builder/src/util.js
|
|
25
21
|
function C(e) {
|
|
26
|
-
return
|
|
22
|
+
return typeof e == "number" && Object.is(e, -0) ? "-0" : String(e);
|
|
27
23
|
}
|
|
28
24
|
function ee(e) {
|
|
29
|
-
return
|
|
25
|
+
return C(e).replace(/--/g, "- -").replace(/--/g, "- -").replace(/-$/, "- ");
|
|
26
|
+
}
|
|
27
|
+
function te(e) {
|
|
28
|
+
return C(e).replace(/\]\]>/g, "]]]]><![CDATA[>");
|
|
30
29
|
}
|
|
31
30
|
function w(e) {
|
|
32
|
-
return
|
|
31
|
+
return C(e).replace(/"/g, """).replace(/'/g, "'");
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
function T(e, t) {
|
|
33
|
+
// ../../node_modules/.pnpm/fast-xml-builder@1.3.1/node_modules/fast-xml-builder/src/orderedJs2Xml.js
|
|
34
|
+
var T = "\n";
|
|
35
|
+
function E(e, t) {
|
|
38
36
|
if (!Array.isArray(e) || e.length === 0) return "1.0";
|
|
39
37
|
let n = e[0];
|
|
40
|
-
if (
|
|
38
|
+
if (ce(n) === "?xml") {
|
|
41
39
|
let e = n[":@"];
|
|
42
40
|
if (e) {
|
|
43
41
|
let n = t.attributeNamePrefix + "version";
|
|
@@ -46,68 +44,68 @@ function T(e, t) {
|
|
|
46
44
|
}
|
|
47
45
|
return "1.0";
|
|
48
46
|
}
|
|
49
|
-
function
|
|
47
|
+
function ne(e, t, n, r, i) {
|
|
50
48
|
return !n.sanitizeName || i(e) ? e : n.sanitizeName(e, {
|
|
51
49
|
isAttribute: t,
|
|
52
50
|
matcher: r.readOnly()
|
|
53
51
|
});
|
|
54
52
|
}
|
|
55
|
-
function
|
|
53
|
+
function re(e, t) {
|
|
56
54
|
let n = "";
|
|
57
|
-
t.format && (n =
|
|
55
|
+
t.format && (n = T);
|
|
58
56
|
let r = [];
|
|
59
57
|
if (t.stopNodes && Array.isArray(t.stopNodes)) for (let e = 0; e < t.stopNodes.length; e++) {
|
|
60
58
|
let n = t.stopNodes[e];
|
|
61
59
|
typeof n == "string" ? r.push(new h(n)) : n instanceof h && r.push(n);
|
|
62
60
|
}
|
|
63
|
-
let i =
|
|
64
|
-
return
|
|
61
|
+
let i = E(e, t), a = m("qName", { xmlVersion: i }), o = new _();
|
|
62
|
+
return ie(e, t, n, o, r, a);
|
|
65
63
|
}
|
|
66
|
-
function
|
|
64
|
+
function ie(e, t, n, r, i, a) {
|
|
67
65
|
let o = "", s = !1;
|
|
68
66
|
if (t.maxNestedTags && r.getDepth() > t.maxNestedTags) throw Error("Maximum nested tags exceeded");
|
|
69
67
|
if (!Array.isArray(e)) {
|
|
70
68
|
if (e != null) {
|
|
71
|
-
let n =
|
|
72
|
-
return n =
|
|
69
|
+
let n = C(e);
|
|
70
|
+
return n = de(n, t), n;
|
|
73
71
|
}
|
|
74
72
|
return "";
|
|
75
73
|
}
|
|
76
74
|
for (let c = 0; c < e.length; c++) {
|
|
77
|
-
let l = e[c], u =
|
|
75
|
+
let l = e[c], u = ce(l);
|
|
78
76
|
if (u === void 0) continue;
|
|
79
|
-
let d = u === t.textNodeName || u === t.cdataPropName || u === t.commentPropName || u[0] === "?" ? u :
|
|
77
|
+
let d = u === t.textNodeName || u === t.cdataPropName || u === t.commentPropName || u[0] === "?" ? u : ne(u, !1, t, r, a), f = ae(l[":@"], t);
|
|
80
78
|
r.push(d, f);
|
|
81
|
-
let p =
|
|
79
|
+
let p = ue(r, i);
|
|
82
80
|
if (d === t.textNodeName) {
|
|
83
81
|
let e = l[u];
|
|
84
|
-
p || (e = t.tagValueProcessor(d, e), e =
|
|
82
|
+
p || (e = t.tagValueProcessor(d, e), e = de(e, t)), e = C(e), s && (o += n), o += e, s = !1, r.pop();
|
|
85
83
|
continue;
|
|
86
84
|
}
|
|
87
85
|
if (d === t.cdataPropName) {
|
|
88
86
|
s && (o += n);
|
|
89
|
-
let e = l[u][0][t.textNodeName], i =
|
|
87
|
+
let e = l[u][0][t.textNodeName], i = te(e);
|
|
90
88
|
o += `<![CDATA[${i}]]>`, s = !1, r.pop();
|
|
91
89
|
continue;
|
|
92
90
|
}
|
|
93
91
|
if (d === t.commentPropName) {
|
|
94
|
-
let e = l[u][0][t.textNodeName], i =
|
|
92
|
+
let e = l[u][0][t.textNodeName], i = ee(e);
|
|
95
93
|
o += n + `<!--${i}-->`, s = !0, r.pop();
|
|
96
94
|
continue;
|
|
97
95
|
}
|
|
98
96
|
if (d[0] === "?") {
|
|
99
|
-
let e =
|
|
97
|
+
let e = le(l[":@"], t, p, r, a);
|
|
100
98
|
o += (d === "?xml" ? "" : n) + `<${d}${e}?>`, s = !0, r.pop();
|
|
101
99
|
continue;
|
|
102
100
|
}
|
|
103
101
|
let m = n;
|
|
104
102
|
m !== "" && (m += t.indentBy);
|
|
105
|
-
let h = n + `<${d}${
|
|
106
|
-
g = p ?
|
|
103
|
+
let h = n + `<${d}${le(l[":@"], t, p, r, a)}`, g;
|
|
104
|
+
g = p ? oe(l[u], t) : ie(l[u], t, m, r, i, a), t.unpairedTags.indexOf(d) === -1 ? (!g || g.length === 0) && t.suppressEmptyNode ? o += h + "/>" : g && g.endsWith(">") ? o += h + `>${g}${n}</${d}>` : (o += h + ">", g && n !== "" && (g.includes("/>") || g.includes("</")) ? o += n + t.indentBy + g + n : o += g, o += `</${d}>`) : t.suppressUnpairedNode ? o += h + ">" : o += h + "/>", s = !0, r.pop();
|
|
107
105
|
}
|
|
108
106
|
return o;
|
|
109
107
|
}
|
|
110
|
-
function
|
|
108
|
+
function ae(e, t) {
|
|
111
109
|
if (!e || t.ignoreAttributes) return null;
|
|
112
110
|
let n = {}, r = !1;
|
|
113
111
|
for (let i in e) {
|
|
@@ -117,23 +115,23 @@ function ie(e, t) {
|
|
|
117
115
|
}
|
|
118
116
|
return r ? n : null;
|
|
119
117
|
}
|
|
120
|
-
function
|
|
121
|
-
if (!Array.isArray(e)) return e == null ? "" :
|
|
118
|
+
function oe(e, t) {
|
|
119
|
+
if (!Array.isArray(e)) return e == null ? "" : C(e);
|
|
122
120
|
let n = "";
|
|
123
121
|
for (let r = 0; r < e.length; r++) {
|
|
124
|
-
let i = e[r], a =
|
|
125
|
-
if (a === t.textNodeName) n +=
|
|
122
|
+
let i = e[r], a = ce(i);
|
|
123
|
+
if (a === t.textNodeName) n += C(i[a]);
|
|
126
124
|
else if (a === t.cdataPropName) n += i[a][0][t.textNodeName];
|
|
127
125
|
else if (a === t.commentPropName) n += i[a][0][t.textNodeName];
|
|
128
126
|
else if (a && a[0] === "?") continue;
|
|
129
127
|
else if (a) {
|
|
130
|
-
let e =
|
|
128
|
+
let e = se(i[":@"], t), r = oe(i[a], t);
|
|
131
129
|
!r || r.length === 0 ? n += `<${a}${e}/>` : n += `<${a}${e}>${r}</${a}>`;
|
|
132
130
|
}
|
|
133
131
|
}
|
|
134
132
|
return n;
|
|
135
133
|
}
|
|
136
|
-
function
|
|
134
|
+
function se(e, t) {
|
|
137
135
|
let n = "";
|
|
138
136
|
if (e && !t.ignoreAttributes) for (let r in e) {
|
|
139
137
|
if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
|
|
@@ -142,44 +140,42 @@ function oe(e, t) {
|
|
|
142
140
|
}
|
|
143
141
|
return n;
|
|
144
142
|
}
|
|
145
|
-
function
|
|
143
|
+
function ce(e) {
|
|
146
144
|
let t = Object.keys(e);
|
|
147
145
|
for (let n = 0; n < t.length; n++) {
|
|
148
146
|
let r = t[n];
|
|
149
147
|
if (Object.prototype.hasOwnProperty.call(e, r) && r !== ":@") return r;
|
|
150
148
|
}
|
|
151
149
|
}
|
|
152
|
-
function
|
|
150
|
+
function le(e, t, n, r, i) {
|
|
153
151
|
let a = "";
|
|
154
152
|
if (e && !t.ignoreAttributes) for (let o in e) {
|
|
155
153
|
if (!Object.prototype.hasOwnProperty.call(e, o)) continue;
|
|
156
|
-
let s = o.substr(t.attributeNamePrefix.length), c = n ? s :
|
|
157
|
-
n ? l = e[o] : (l = t.attributeValueProcessor(o, e[o]), l =
|
|
154
|
+
let s = o.substr(t.attributeNamePrefix.length), c = n ? s : ne(s, !0, t, r, i), l;
|
|
155
|
+
n ? l = e[o] : (l = t.attributeValueProcessor(o, e[o]), l = de(l, t)), l === !0 && t.suppressBooleanAttributes ? a += ` ${c}` : a += ` ${c}="${w(l)}"`;
|
|
158
156
|
}
|
|
159
157
|
return a;
|
|
160
158
|
}
|
|
161
|
-
function
|
|
159
|
+
function ue(e, t) {
|
|
162
160
|
if (!t || t.length === 0) return !1;
|
|
163
161
|
for (let n = 0; n < t.length; n++) if (e.matches(t[n])) return !0;
|
|
164
162
|
return !1;
|
|
165
163
|
}
|
|
166
|
-
function
|
|
164
|
+
function de(e, t) {
|
|
167
165
|
if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
|
|
168
166
|
let r = t.entities[n];
|
|
169
167
|
e = e.replace(r.regex, r.val);
|
|
170
168
|
}
|
|
171
169
|
return e;
|
|
172
170
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
function de(e) {
|
|
171
|
+
// ../../node_modules/.pnpm/fast-xml-builder@1.3.1/node_modules/fast-xml-builder/src/ignoreAttributes.js
|
|
172
|
+
function fe(e) {
|
|
176
173
|
return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
|
|
177
174
|
for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
|
|
178
175
|
} : () => !1;
|
|
179
176
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
var fe = {
|
|
177
|
+
// ../../node_modules/.pnpm/fast-xml-builder@1.3.1/node_modules/fast-xml-builder/src/fxb.js
|
|
178
|
+
var pe = {
|
|
183
179
|
attributeNamePrefix: "@_",
|
|
184
180
|
attributesGroupName: !1,
|
|
185
181
|
textNodeName: "#text",
|
|
@@ -229,17 +225,17 @@ var fe = {
|
|
|
229
225
|
sanitizeName: !1
|
|
230
226
|
};
|
|
231
227
|
function D(e) {
|
|
232
|
-
if (this.options = Object.assign({},
|
|
228
|
+
if (this.options = Object.assign({}, pe, e), this.options.stopNodes && Array.isArray(this.options.stopNodes) && (this.options.stopNodes = this.options.stopNodes.map((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e)), this.stopNodeExpressions = [], this.options.stopNodes && Array.isArray(this.options.stopNodes)) for (let e = 0; e < this.options.stopNodes.length; e++) {
|
|
233
229
|
let t = this.options.stopNodes[e];
|
|
234
230
|
typeof t == "string" ? this.stopNodeExpressions.push(new h(t)) : t instanceof h && this.stopNodeExpressions.push(t);
|
|
235
231
|
}
|
|
236
232
|
this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
|
|
237
233
|
return !1;
|
|
238
|
-
} : (this.ignoreAttributesFn =
|
|
234
|
+
} : (this.ignoreAttributesFn = fe(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ve), this.processTextOrObjNode = ge, this.options.format ? (this.indentate = _e, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
|
|
239
235
|
return "";
|
|
240
236
|
}, this.tagEndChar = ">", this.newLine = "");
|
|
241
237
|
}
|
|
242
|
-
function
|
|
238
|
+
function me(e, t) {
|
|
243
239
|
let n = e["?xml"];
|
|
244
240
|
if (n && typeof n == "object") {
|
|
245
241
|
if (t.attributesGroupName && n[t.attributesGroupName]) {
|
|
@@ -251,17 +247,17 @@ function pe(e, t) {
|
|
|
251
247
|
}
|
|
252
248
|
return "1.0";
|
|
253
249
|
}
|
|
254
|
-
function
|
|
250
|
+
function he(e, t, n, r, i) {
|
|
255
251
|
return !n.sanitizeName || i(e) ? e : n.sanitizeName(e, {
|
|
256
252
|
isAttribute: t,
|
|
257
253
|
matcher: r.readOnly()
|
|
258
254
|
});
|
|
259
255
|
}
|
|
260
256
|
D.prototype.build = function(e) {
|
|
261
|
-
if (this.options.preserveOrder) return
|
|
257
|
+
if (this.options.preserveOrder) return re(e, this.options);
|
|
262
258
|
{
|
|
263
259
|
Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = { [this.options.arrayNodeName]: e });
|
|
264
|
-
let t = new _(), n =
|
|
260
|
+
let t = new _(), n = me(e, this.options), r = m("qName", { xmlVersion: n });
|
|
265
261
|
return this.j2x(e, 0, t, r).val;
|
|
266
262
|
}
|
|
267
263
|
}, D.prototype.j2x = function(e, t, n, r) {
|
|
@@ -270,24 +266,24 @@ D.prototype.build = function(e) {
|
|
|
270
266
|
let o = this.options.jPath ? n.toString() : n, s = this.checkStopNode(n);
|
|
271
267
|
for (let c in e) {
|
|
272
268
|
if (!Object.prototype.hasOwnProperty.call(e, c)) continue;
|
|
273
|
-
let l = c === this.options.textNodeName || c === this.options.cdataPropName || c === this.options.commentPropName || this.options.attributesGroupName && c === this.options.attributesGroupName || this.isAttribute(c) || c[0] === "?" ? c :
|
|
269
|
+
let l = c === this.options.textNodeName || c === this.options.cdataPropName || c === this.options.commentPropName || this.options.attributesGroupName && c === this.options.attributesGroupName || this.isAttribute(c) || c[0] === "?" ? c : he(c, !1, this.options, n, r);
|
|
274
270
|
if (e[c] === void 0) this.isAttribute(c) && (a += "");
|
|
275
271
|
else if (e[c] === null) this.isAttribute(c) || l === this.options.cdataPropName || l === this.options.commentPropName ? a += "" : l[0] === "?" ? a += this.indentate(t) + "<" + l + "?" + this.tagEndChar : a += this.indentate(t) + "<" + l + "/" + this.tagEndChar;
|
|
276
272
|
else if (e[c] instanceof Date) a += this.buildTextValNode(e[c], l, "", t, n);
|
|
277
273
|
else if (typeof e[c] != "object") {
|
|
278
274
|
let u = this.isAttribute(c);
|
|
279
275
|
if (u && !this.ignoreAttributesFn(u, o)) {
|
|
280
|
-
let t =
|
|
281
|
-
i += this.buildAttrPairStr(t,
|
|
276
|
+
let t = he(u, !0, this.options, n, r);
|
|
277
|
+
i += this.buildAttrPairStr(t, C(e[c]), s);
|
|
282
278
|
} else if (!u) {
|
|
283
279
|
if (c === this.options.textNodeName) {
|
|
284
|
-
let t = this.options.tagValueProcessor(c,
|
|
280
|
+
let t = this.options.tagValueProcessor(c, C(e[c]));
|
|
285
281
|
a += this.replaceEntitiesValue(t);
|
|
286
282
|
} else {
|
|
287
283
|
n.push(l);
|
|
288
284
|
let r = this.checkStopNode(n);
|
|
289
285
|
if (n.pop(), r) {
|
|
290
|
-
let n =
|
|
286
|
+
let n = C(e[c]);
|
|
291
287
|
a += n === "" ? this.indentate(t) + "<" + l + this.closeTag(l) + this.tagEndChar : this.indentate(t) + "<" + l + ">" + n + "</" + l + this.tagEndChar;
|
|
292
288
|
} else a += this.buildTextValNode(e[c], l, "", t, n);
|
|
293
289
|
}
|
|
@@ -306,12 +302,12 @@ D.prototype.build = function(e) {
|
|
|
306
302
|
} else o += this.processTextOrObjNode(i, l, t, n, r);
|
|
307
303
|
} else if (this.options.oneListGroup) {
|
|
308
304
|
let e = this.options.tagValueProcessor(l, i);
|
|
309
|
-
e = this.replaceEntitiesValue(e), e =
|
|
305
|
+
e = this.replaceEntitiesValue(e), e = C(e), o += e;
|
|
310
306
|
} else {
|
|
311
307
|
n.push(l);
|
|
312
308
|
let e = this.checkStopNode(n);
|
|
313
309
|
if (n.pop(), e) {
|
|
314
|
-
let e =
|
|
310
|
+
let e = C(i);
|
|
315
311
|
o += e === "" ? this.indentate(t) + "<" + l + this.closeTag(l) + this.tagEndChar : this.indentate(t) + "<" + l + ">" + e + "</" + l + this.tagEndChar;
|
|
316
312
|
} else o += this.buildTextValNode(i, l, "", t, n);
|
|
317
313
|
}
|
|
@@ -321,8 +317,8 @@ D.prototype.build = function(e) {
|
|
|
321
317
|
} else if (this.options.attributesGroupName && c === this.options.attributesGroupName) {
|
|
322
318
|
let t = Object.keys(e[c]), a = t.length;
|
|
323
319
|
for (let o = 0; o < a; o++) {
|
|
324
|
-
let a =
|
|
325
|
-
i += this.buildAttrPairStr(a,
|
|
320
|
+
let a = he(t[o], !0, this.options, n, r);
|
|
321
|
+
i += this.buildAttrPairStr(a, C(e[c][t[o]]), s);
|
|
326
322
|
}
|
|
327
323
|
} else a += this.processTextOrObjNode(e[c], l, t, n, r);
|
|
328
324
|
}
|
|
@@ -331,9 +327,9 @@ D.prototype.build = function(e) {
|
|
|
331
327
|
val: a
|
|
332
328
|
};
|
|
333
329
|
}, D.prototype.buildAttrPairStr = function(e, t, n) {
|
|
334
|
-
return n || (t = this.options.attributeValueProcessor(e,
|
|
330
|
+
return n || (t = this.options.attributeValueProcessor(e, C(t)), t = this.replaceEntitiesValue(t)), this.options.suppressBooleanAttributes && t === "true" ? " " + e : " " + e + "=\"" + w(t) + "\"";
|
|
335
331
|
};
|
|
336
|
-
function
|
|
332
|
+
function ge(e, t, n, r, i) {
|
|
337
333
|
let a = this.extractAttributes(e);
|
|
338
334
|
if (r.push(t, a), this.checkStopNode(r)) {
|
|
339
335
|
let i = this.buildRawContent(e), a = this.buildAttributesForStopNode(e);
|
|
@@ -403,7 +399,7 @@ D.prototype.extractAttributes = function(e) {
|
|
|
403
399
|
if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
|
|
404
400
|
{
|
|
405
401
|
let i = "</" + t + this.tagEndChar, a = "";
|
|
406
|
-
return t[0] === "?" && (a = "?", i = ""), (n || n === "") && e.indexOf("<") === -1 ? this.indentate(r) + "<" + t + n + a + ">" + e + i : this.options.commentPropName !== !1 && t === this.options.commentPropName && a.length === 0 ? this.indentate(r) + `<!--${
|
|
402
|
+
return t[0] === "?" && (a = "?", i = ""), (n || n === "") && e.indexOf("<") === -1 ? this.indentate(r) + "<" + t + n + a + ">" + e + i : this.options.commentPropName !== !1 && t === this.options.commentPropName && a.length === 0 ? this.indentate(r) + `<!--${ee(e)}-->` + this.newLine : this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i;
|
|
407
403
|
}
|
|
408
404
|
}, D.prototype.closeTag = function(e) {
|
|
409
405
|
let t = "";
|
|
@@ -414,17 +410,17 @@ D.prototype.extractAttributes = function(e) {
|
|
|
414
410
|
return !1;
|
|
415
411
|
}, D.prototype.buildTextValNode = function(e, t, n, r, i) {
|
|
416
412
|
if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName) {
|
|
417
|
-
let t =
|
|
413
|
+
let t = te(e);
|
|
418
414
|
return this.indentate(r) + `<![CDATA[${t}]]>` + this.newLine;
|
|
419
415
|
}
|
|
420
416
|
if (this.options.commentPropName !== !1 && t === this.options.commentPropName) {
|
|
421
|
-
let t =
|
|
417
|
+
let t = ee(e);
|
|
422
418
|
return this.indentate(r) + `<!--${t}-->` + this.newLine;
|
|
423
419
|
}
|
|
424
420
|
if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
|
|
425
421
|
{
|
|
426
422
|
let i = this.options.tagValueProcessor(t, e);
|
|
427
|
-
return i = this.replaceEntitiesValue(i), i =
|
|
423
|
+
return i = this.replaceEntitiesValue(i), i = C(i), i === "" ? this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar : this.indentate(r) + "<" + t + n + ">" + i + "</" + t + this.tagEndChar;
|
|
428
424
|
}
|
|
429
425
|
}, D.prototype.replaceEntitiesValue = function(e) {
|
|
430
426
|
if (e && e.length > 0 && this.options.processEntities) for (let t = 0; t < this.options.entities.length; t++) {
|
|
@@ -433,22 +429,21 @@ D.prototype.extractAttributes = function(e) {
|
|
|
433
429
|
}
|
|
434
430
|
return e;
|
|
435
431
|
};
|
|
436
|
-
function
|
|
432
|
+
function _e(e) {
|
|
437
433
|
return this.options.indentBy.repeat(e);
|
|
438
434
|
}
|
|
439
|
-
function
|
|
435
|
+
function ve(e) {
|
|
440
436
|
return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;
|
|
441
437
|
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
if (n !== void 0) return i(e.webDavPath, n);
|
|
438
|
+
// ../../node_modules/.pnpm/fast-xml-parser@5.12.0/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js
|
|
439
|
+
var ye = D, O = (e, { fileId: t, path: n, name: i }) => {
|
|
440
|
+
if (n !== void 0) return p(e.webDavPath, n);
|
|
446
441
|
if (t !== void 0) {
|
|
447
|
-
if (
|
|
448
|
-
return
|
|
442
|
+
if (r(e)) throw Error("public spaces need a path provided");
|
|
443
|
+
return p("spaces", t, i || "");
|
|
449
444
|
}
|
|
450
445
|
return e.webDavPath;
|
|
451
|
-
},
|
|
446
|
+
}, be = (e, t) => ({ copyFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
|
|
452
447
|
let u = O(t, {
|
|
453
448
|
fileId: r,
|
|
454
449
|
path: n
|
|
@@ -461,14 +456,14 @@ var ve = D, O = (e, { fileId: t, path: n, name: r }) => {
|
|
|
461
456
|
overwrite: c || !1,
|
|
462
457
|
...l
|
|
463
458
|
});
|
|
464
|
-
} }),
|
|
459
|
+
} }), xe = (e, t, n) => ({ async createFolder(n, { path: r, parentFolderId: i, folderName: a, fetchFolder: o = !0, ...s }) {
|
|
465
460
|
let c = O(n, {
|
|
466
461
|
fileId: i,
|
|
467
462
|
path: r,
|
|
468
463
|
name: a
|
|
469
464
|
});
|
|
470
465
|
if (await e.mkcol(c), o) return t.getFileInfo(n, { path: r }, s);
|
|
471
|
-
} }),
|
|
466
|
+
} }), Se = (e, { axiosClient: t }) => ({ async getFileContents(n, { fileId: r, path: i }, { responseType: a = "text", noCache: o = !0, headers: s, ...c } = {}) {
|
|
472
467
|
try {
|
|
473
468
|
let l = O(n, {
|
|
474
469
|
fileId: r,
|
|
@@ -492,79 +487,86 @@ var ve = D, O = (e, { fileId: t, path: n, name: r }) => {
|
|
|
492
487
|
};
|
|
493
488
|
} catch (e) {
|
|
494
489
|
let { message: t, response: n } = e;
|
|
495
|
-
throw new
|
|
490
|
+
throw n ? new x(t, n, n.status) : e;
|
|
496
491
|
}
|
|
497
|
-
} }),
|
|
492
|
+
} }), Ce = (e, t) => ({ async getFileInfo(t, n, r) {
|
|
498
493
|
return (await e.listFiles(t, n, {
|
|
499
494
|
depth: 0,
|
|
500
495
|
...r
|
|
501
496
|
})).resource;
|
|
502
|
-
} }),
|
|
503
|
-
async getFileUrl(
|
|
504
|
-
if (
|
|
505
|
-
let e = await t.getFileContents(
|
|
497
|
+
} }), we = (e, t, n, { axiosClient: r, baseUrl: i }) => ({
|
|
498
|
+
async getFileUrl(a, o, { disposition: s = "attachment", version: c = null, username: l = "", signUrl: u = !0, ...d }) {
|
|
499
|
+
if (s === "inline") {
|
|
500
|
+
let e = await t.getFileContents(a, o, {
|
|
506
501
|
responseType: "blob",
|
|
507
502
|
...d
|
|
508
503
|
});
|
|
509
504
|
return URL.createObjectURL(e.body);
|
|
510
505
|
}
|
|
511
|
-
if (
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
506
|
+
if (c) {
|
|
507
|
+
let t = e.getFileUrl(p("meta", o.fileId, "v", c));
|
|
508
|
+
if (!u) return t;
|
|
509
|
+
if (!l) throw Error("username is required for URL signing");
|
|
510
|
+
return await v(i, r).signUrl(t, l);
|
|
511
|
+
}
|
|
512
|
+
if (o.downloadURL) return o.downloadURL;
|
|
513
|
+
let { downloadURL: m } = await n.getFileInfo(a, o, { davProperties: [f.DownloadURL] });
|
|
514
|
+
return m;
|
|
519
515
|
},
|
|
520
516
|
revokeUrl: (e) => {
|
|
521
517
|
e && e.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
522
518
|
}
|
|
523
|
-
}),
|
|
524
|
-
return e.getFileUrl(
|
|
525
|
-
} }),
|
|
519
|
+
}), Te = (e, t) => ({ getPublicFileUrl(t, n) {
|
|
520
|
+
return e.getFileUrl(p("public-files", n));
|
|
521
|
+
} }), Ee = (e, t) => ({ async getPublicLinkSignature(t) {
|
|
522
|
+
let [n] = await e.propfind(l(t), {
|
|
523
|
+
depth: 0,
|
|
524
|
+
properties: [f.SignatureAuth]
|
|
525
|
+
});
|
|
526
|
+
return n?.props?.[f.SignatureAuth];
|
|
527
|
+
} }), De = (e, t, n) => ({ async listFiles(s, { path: c, fileId: l } = {}, { depth: m = 1, davProperties: h, extraProps: g = [], isTrash: _ = !1, ...v } = {}) {
|
|
526
528
|
let y = [...e.extraProps, ...g], b;
|
|
527
|
-
if (
|
|
528
|
-
b = await e.propfind(
|
|
529
|
+
if (r(s)) {
|
|
530
|
+
b = await e.propfind(p(s.webDavPath, c), {
|
|
529
531
|
depth: m,
|
|
530
|
-
properties: h ||
|
|
532
|
+
properties: h || i.PublicLink,
|
|
531
533
|
extraProps: g,
|
|
532
534
|
...v
|
|
533
535
|
}), b.forEach((e) => {
|
|
534
536
|
e.filename = e.filename.split("/").slice(1).join("/");
|
|
535
|
-
}), b.length === 1 && (b[0].filename =
|
|
537
|
+
}), b.length === 1 && (b[0].filename = p(s.id, c, { leadingSlash: !0 })), b.forEach((e) => {
|
|
536
538
|
e.filename = e.filename.split("/").slice(2).join("/");
|
|
537
539
|
});
|
|
538
|
-
let t =
|
|
539
|
-
if ((!
|
|
540
|
-
basename:
|
|
540
|
+
let t = s.driveAlias.startsWith("ocm/") ? "ocm" : "public-link";
|
|
541
|
+
if ((!c || c === "/") && m > 0 && t === "ocm" && b[0].props[f.PublicLinkItemType] === "file" && (b = [{
|
|
542
|
+
basename: s.fileId,
|
|
541
543
|
type: "directory",
|
|
542
544
|
filename: "",
|
|
543
545
|
props: {}
|
|
544
|
-
}, ...b]), !
|
|
545
|
-
let [e, ...
|
|
546
|
+
}, ...b]), !c) {
|
|
547
|
+
let [e, ...r] = b;
|
|
546
548
|
return {
|
|
547
|
-
resource:
|
|
549
|
+
resource: d({
|
|
548
550
|
...e,
|
|
549
|
-
id:
|
|
550
|
-
driveAlias:
|
|
551
|
-
webDavPath:
|
|
551
|
+
id: s.id,
|
|
552
|
+
driveAlias: s.driveAlias,
|
|
553
|
+
webDavPath: s.webDavPath,
|
|
552
554
|
serverUrl: n.baseUrl,
|
|
553
555
|
publicLinkType: t
|
|
554
556
|
}),
|
|
555
|
-
children:
|
|
557
|
+
children: r.map((e) => o(e, y))
|
|
556
558
|
};
|
|
557
559
|
}
|
|
558
|
-
let
|
|
560
|
+
let r = b.map((e) => o(e, y));
|
|
559
561
|
return {
|
|
560
|
-
resource:
|
|
561
|
-
children:
|
|
562
|
+
resource: r[0],
|
|
563
|
+
children: r.slice(1)
|
|
562
564
|
};
|
|
563
565
|
}
|
|
564
|
-
let
|
|
565
|
-
let e = await t.getPathForFileId(
|
|
566
|
-
if (!e) throw new
|
|
567
|
-
return this.listFiles(
|
|
566
|
+
let x = async () => {
|
|
567
|
+
let e = await t.getPathForFileId(l);
|
|
568
|
+
if (!e) throw new S("Resource not found", void 0, void 0, 404);
|
|
569
|
+
return this.listFiles(s, { path: e }, {
|
|
568
570
|
depth: m,
|
|
569
571
|
davProperties: h,
|
|
570
572
|
extraProps: g
|
|
@@ -572,28 +574,31 @@ var ve = D, O = (e, { fileId: t, path: n, name: r }) => {
|
|
|
572
574
|
};
|
|
573
575
|
try {
|
|
574
576
|
let t = "";
|
|
575
|
-
if (t = _ ?
|
|
576
|
-
fileId:
|
|
577
|
-
path:
|
|
577
|
+
if (t = _ ? u(s.id, c) : O(s, {
|
|
578
|
+
fileId: l,
|
|
579
|
+
path: c
|
|
578
580
|
}), b = await e.propfind(t, {
|
|
579
581
|
depth: m,
|
|
580
|
-
properties: h ||
|
|
582
|
+
properties: h || i.Default,
|
|
581
583
|
extraProps: g,
|
|
582
584
|
...v
|
|
583
|
-
}), _)
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
585
|
+
}), _) {
|
|
586
|
+
let [e, ...t] = b;
|
|
587
|
+
return {
|
|
588
|
+
resource: c ? a(e) : o(e, y),
|
|
589
|
+
children: t.map(a)
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
let n = b.map((e) => o(e, y)), r = l === s.id;
|
|
593
|
+
return l && !r && n[0].fileId && l !== n[0].fileId ? x() : {
|
|
589
594
|
resource: n[0],
|
|
590
595
|
children: n.slice(1)
|
|
591
596
|
};
|
|
592
597
|
} catch (e) {
|
|
593
|
-
if (e.statusCode === 404 &&
|
|
598
|
+
if (e.statusCode === 404 && l) return x();
|
|
594
599
|
throw e;
|
|
595
600
|
}
|
|
596
|
-
} }),
|
|
601
|
+
} }), Oe = (e, t) => ({ moveFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
|
|
597
602
|
let u = O(t, {
|
|
598
603
|
fileId: r,
|
|
599
604
|
path: n
|
|
@@ -606,7 +611,7 @@ var ve = D, O = (e, { fileId: t, path: n, name: r }) => {
|
|
|
606
611
|
overwrite: c || !1,
|
|
607
612
|
...l
|
|
608
613
|
});
|
|
609
|
-
} }),
|
|
614
|
+
} }), ke = (e, t, n) => ({ async putFileContents(n, { fileName: r, path: i, parentFolderId: a, content: o = "", previousEntityTag: s = "", overwrite: c, onUploadProgress: l = null, ...u }) {
|
|
610
615
|
let d = O(n, {
|
|
611
616
|
fileId: a,
|
|
612
617
|
name: r,
|
|
@@ -621,49 +626,48 @@ var ve = D, O = (e, { fileId: t, path: n, name: r }) => {
|
|
|
621
626
|
fileId: f.headers.get("Oc-Fileid"),
|
|
622
627
|
path: i
|
|
623
628
|
});
|
|
624
|
-
} }),
|
|
625
|
-
return e.delete(
|
|
626
|
-
} }),
|
|
627
|
-
if (
|
|
628
|
-
let
|
|
629
|
-
return e.move(
|
|
630
|
-
overwrite:
|
|
631
|
-
...
|
|
629
|
+
} }), Ae = (e, t) => ({ deleteFile(t, { path: n, ...r }) {
|
|
630
|
+
return e.delete(p(t.webDavPath, n), r);
|
|
631
|
+
} }), je = (e, t) => ({ restoreFile(t, { id: n }, { path: i }, { overwrite: a, ...o } = {}) {
|
|
632
|
+
if (r(t)) return;
|
|
633
|
+
let s = p(t.webDavPath, i);
|
|
634
|
+
return e.move(p(t.webDavTrashPath, n), s, {
|
|
635
|
+
overwrite: a,
|
|
636
|
+
...o
|
|
632
637
|
});
|
|
633
|
-
} }),
|
|
634
|
-
let
|
|
635
|
-
path:
|
|
638
|
+
} }), Me = (e, t) => ({ restoreFileVersion(t, { fileId: n, parentFolderId: r, name: i, path: a }, o, s = {}) {
|
|
639
|
+
let c = O(t, {
|
|
640
|
+
path: a,
|
|
636
641
|
fileId: r,
|
|
637
|
-
name:
|
|
638
|
-
}),
|
|
639
|
-
return e.copy(
|
|
640
|
-
} }),
|
|
641
|
-
let
|
|
642
|
-
return n && (
|
|
643
|
-
} }),
|
|
644
|
-
let { range:
|
|
642
|
+
name: i
|
|
643
|
+
}), l = p("meta", n, "v", o, { leadingSlash: !0 }), u = p("files", c, { leadingSlash: !0 });
|
|
644
|
+
return e.copy(l, u, s);
|
|
645
|
+
} }), Ne = (e, t) => ({ clearTrashBin(t, { id: n, ...r } = {}) {
|
|
646
|
+
let i = u(t.id);
|
|
647
|
+
return n && (i = p(i, n)), e.delete(i, r);
|
|
648
|
+
} }), Pe = (e, t) => ({ async search(t, { davProperties: n = i.Default, searchLimit: r, ...a }) {
|
|
649
|
+
let { range: s, results: c } = await e.report("/spaces/", {
|
|
645
650
|
pattern: t,
|
|
646
651
|
limit: r,
|
|
647
652
|
properties: n,
|
|
648
|
-
...
|
|
653
|
+
...a
|
|
649
654
|
});
|
|
650
655
|
return {
|
|
651
|
-
resources:
|
|
652
|
-
...
|
|
653
|
-
highlights: t.props[
|
|
656
|
+
resources: c.map((t) => ({
|
|
657
|
+
...o(t, e.extraProps),
|
|
658
|
+
highlights: t.props[f.Highlights] || ""
|
|
654
659
|
})).filter((e, t, n) => n.findIndex((t) => t.id === e.id) === t),
|
|
655
|
-
totalResults:
|
|
660
|
+
totalResults: s ? parseInt(s?.split("/")[1]) : null
|
|
656
661
|
};
|
|
657
|
-
} }),
|
|
658
|
-
return (await e.propfind(
|
|
659
|
-
properties: [
|
|
662
|
+
} }), Fe = (e, t) => ({ async getPathForFileId(t, n = {}) {
|
|
663
|
+
return (await e.propfind(p("meta", t, { leadingSlash: !0 }), {
|
|
664
|
+
properties: [f.MetaPathForUser],
|
|
660
665
|
...n
|
|
661
|
-
}))[0].props[
|
|
666
|
+
}))[0].props[f.MetaPathForUser];
|
|
662
667
|
} });
|
|
663
|
-
|
|
664
|
-
//#region ../../node_modules/.pnpm/webdav@5.11.0/node_modules/webdav/dist/web/index.js
|
|
668
|
+
// ../../node_modules/.pnpm/webdav@5.11.0/node_modules/webdav/dist/web/index.js
|
|
665
669
|
e();
|
|
666
|
-
var
|
|
670
|
+
var Ie = {
|
|
667
671
|
2(e) {
|
|
668
672
|
function t(e, t, i) {
|
|
669
673
|
e instanceof RegExp && (e = n(e, i)), t instanceof RegExp && (t = n(t, i));
|
|
@@ -691,33 +695,33 @@ var Pe = {
|
|
|
691
695
|
e.exports = t, t.range = r;
|
|
692
696
|
},
|
|
693
697
|
101(e, t, n) {
|
|
694
|
-
var
|
|
698
|
+
var r;
|
|
695
699
|
e = n.nmd(e), function() {
|
|
696
|
-
var
|
|
697
|
-
|
|
698
|
-
var
|
|
700
|
+
var i = (e && e.exports, typeof y == "object" && y);
|
|
701
|
+
i.global !== i && i.window;
|
|
702
|
+
var a = function(e) {
|
|
699
703
|
this.message = e;
|
|
700
704
|
};
|
|
701
|
-
(
|
|
702
|
-
var
|
|
703
|
-
throw new
|
|
704
|
-
},
|
|
705
|
+
(a.prototype = /* @__PURE__ */ Error()).name = "InvalidCharacterError";
|
|
706
|
+
var o = function(e) {
|
|
707
|
+
throw new a(e);
|
|
708
|
+
}, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", c = /[\t\n\f\r ]/g, l = {
|
|
705
709
|
encode: function(e) {
|
|
706
|
-
e = String(e), /[^\0-\xFF]/.test(e) &&
|
|
707
|
-
for (var t, n, r, i, a = e.length % 3,
|
|
708
|
-
return a == 2 ? (t = e.charCodeAt(l) << 8, n = e.charCodeAt(++l),
|
|
710
|
+
e = String(e), /[^\0-\xFF]/.test(e) && o("The string to be encoded contains characters outside of the Latin1 range.");
|
|
711
|
+
for (var t, n, r, i, a = e.length % 3, c = "", l = -1, u = e.length - a; ++l < u;) t = e.charCodeAt(l) << 16, n = e.charCodeAt(++l) << 8, r = e.charCodeAt(++l), c += s.charAt((i = t + n + r) >> 18 & 63) + s.charAt(i >> 12 & 63) + s.charAt(i >> 6 & 63) + s.charAt(63 & i);
|
|
712
|
+
return a == 2 ? (t = e.charCodeAt(l) << 8, n = e.charCodeAt(++l), c += s.charAt((i = t + n) >> 10) + s.charAt(i >> 4 & 63) + s.charAt(i << 2 & 63) + "=") : a == 1 && (i = e.charCodeAt(l), c += s.charAt(i >> 2) + s.charAt(i << 4 & 63) + "=="), c;
|
|
709
713
|
},
|
|
710
714
|
decode: function(e) {
|
|
711
|
-
var t = (e = String(e).replace(
|
|
712
|
-
t % 4 == 0 && (t = (e = e.replace(/==?$/, "")).length), (t % 4 == 1 || /[^+a-zA-Z0-9/]/.test(e)) &&
|
|
713
|
-
for (var n, r, i = 0, a = "",
|
|
715
|
+
var t = (e = String(e).replace(c, "")).length;
|
|
716
|
+
t % 4 == 0 && (t = (e = e.replace(/==?$/, "")).length), (t % 4 == 1 || /[^+a-zA-Z0-9/]/.test(e)) && o("Invalid character: the string to be decoded is not correctly encoded.");
|
|
717
|
+
for (var n, r, i = 0, a = "", l = -1; ++l < t;) r = s.indexOf(e.charAt(l)), n = i % 4 ? 64 * n + r : r, i++ % 4 && (a += String.fromCharCode(255 & n >> (-2 * i & 6)));
|
|
714
718
|
return a;
|
|
715
719
|
},
|
|
716
720
|
version: "1.0.0"
|
|
717
721
|
};
|
|
718
|
-
(
|
|
719
|
-
return
|
|
720
|
-
}.call(t, n, t, e)) === void 0 || (e.exports =
|
|
722
|
+
(r = function() {
|
|
723
|
+
return l;
|
|
724
|
+
}.call(t, n, t, e)) === void 0 || (e.exports = r);
|
|
721
725
|
}();
|
|
722
726
|
},
|
|
723
727
|
172(e, t) {
|
|
@@ -941,11 +945,11 @@ var Pe = {
|
|
|
941
945
|
for (var b = s && !T.post.length && !E, x = 0; b && x < a.length; x++) a[x] && (b = !1);
|
|
942
946
|
l = [];
|
|
943
947
|
var S = 0;
|
|
944
|
-
t: for (var C = 0; C < y.length; C++) for (var ee = v(y[C], t, n, !1),
|
|
945
|
-
var
|
|
946
|
-
if (!b ||
|
|
947
|
-
if (l.length >= t || S +
|
|
948
|
-
l.push(
|
|
948
|
+
t: for (var C = 0; C < y.length; C++) for (var ee = v(y[C], t, n, !1), te = 0; te < ee.length; te++) {
|
|
949
|
+
var w = ee[te];
|
|
950
|
+
if (!b || w) {
|
|
951
|
+
if (l.length >= t || S + w.length > n) break t;
|
|
952
|
+
l.push(w), S += w.length;
|
|
949
953
|
}
|
|
950
954
|
}
|
|
951
955
|
}
|
|
@@ -1238,15 +1242,15 @@ var Pe = {
|
|
|
1238
1242
|
};
|
|
1239
1243
|
},
|
|
1240
1244
|
737(e, t, n) {
|
|
1241
|
-
var
|
|
1242
|
-
function
|
|
1243
|
-
return (e || "").toString().replace(
|
|
1245
|
+
var r = n(670), i = n(647), a = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/, o = /[\n\r\t]/g, s = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//, c = /:\d+$/, l = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i, u = /^[a-zA-Z]:/;
|
|
1246
|
+
function d(e) {
|
|
1247
|
+
return (e || "").toString().replace(a, "");
|
|
1244
1248
|
}
|
|
1245
|
-
var
|
|
1249
|
+
var f = [
|
|
1246
1250
|
["#", "hash"],
|
|
1247
1251
|
["?", "query"],
|
|
1248
1252
|
function(e, t) {
|
|
1249
|
-
return
|
|
1253
|
+
return h(t.protocol) ? e.replace(/\\/g, "/") : e;
|
|
1250
1254
|
},
|
|
1251
1255
|
["/", "pathname"],
|
|
1252
1256
|
[
|
|
@@ -1274,107 +1278,107 @@ var Pe = {
|
|
|
1274
1278
|
1,
|
|
1275
1279
|
1
|
|
1276
1280
|
]
|
|
1277
|
-
],
|
|
1281
|
+
], p = {
|
|
1278
1282
|
hash: 1,
|
|
1279
1283
|
query: 1
|
|
1280
1284
|
};
|
|
1281
|
-
function
|
|
1282
|
-
var t, n = (typeof window < "u" ? window :
|
|
1283
|
-
if (e.protocol === "blob:")
|
|
1284
|
-
else if (
|
|
1285
|
-
else if (
|
|
1286
|
-
for (t in e) t in
|
|
1287
|
-
|
|
1285
|
+
function m(e) {
|
|
1286
|
+
var t, n = (typeof window < "u" ? window : y === void 0 ? typeof self < "u" ? self : {} : y).location || {}, r = {}, i = typeof (e ||= n);
|
|
1287
|
+
if (e.protocol === "blob:") r = new _(unescape(e.pathname), {});
|
|
1288
|
+
else if (i === "string") for (t in r = new _(e, {}), p) delete r[t];
|
|
1289
|
+
else if (i === "object") {
|
|
1290
|
+
for (t in e) t in p || (r[t] = e[t]);
|
|
1291
|
+
r.slashes === void 0 && (r.slashes = s.test(e.href));
|
|
1288
1292
|
}
|
|
1289
|
-
return
|
|
1293
|
+
return r;
|
|
1290
1294
|
}
|
|
1291
|
-
function
|
|
1295
|
+
function h(e) {
|
|
1292
1296
|
return e === "file:" || e === "ftp:" || e === "http:" || e === "https:" || e === "ws:" || e === "wss:";
|
|
1293
1297
|
}
|
|
1294
|
-
function
|
|
1295
|
-
e = (e =
|
|
1296
|
-
var n, r =
|
|
1297
|
-
return a ?
|
|
1298
|
+
function g(e, t) {
|
|
1299
|
+
e = (e = d(e)).replace(o, ""), t ||= {};
|
|
1300
|
+
var n, r = l.exec(e), i = r[1] ? r[1].toLowerCase() : "", a = !!r[2], s = !!r[3], c = 0;
|
|
1301
|
+
return a ? s ? (n = r[2] + r[3] + r[4], c = r[2].length + r[3].length) : (n = r[2] + r[4], c = r[2].length) : s ? (n = r[3] + r[4], c = r[3].length) : n = r[4], i === "file:" ? c >= 2 && (n = n.slice(2)) : h(i) ? n = r[4] : i ? a && (n = n.slice(2)) : c >= 2 && h(t.protocol) && (n = r[4]), {
|
|
1298
1302
|
protocol: i,
|
|
1299
|
-
slashes: a ||
|
|
1303
|
+
slashes: a || h(i),
|
|
1300
1304
|
slashesCount: c,
|
|
1301
1305
|
rest: n
|
|
1302
1306
|
};
|
|
1303
1307
|
}
|
|
1304
|
-
function
|
|
1305
|
-
if (e = (e =
|
|
1306
|
-
var
|
|
1307
|
-
for (b !== "object" && b !== "string" && (n = t, t = null), n && typeof n != "function" && (n =
|
|
1308
|
-
n && (x.query = n(x.query)),
|
|
1308
|
+
function _(e, t, n) {
|
|
1309
|
+
if (e = (e = d(e)).replace(o, ""), !(this instanceof _)) return new _(e, t, n);
|
|
1310
|
+
var a, s, c, l, p, v, y = f.slice(), b = typeof t, x = this, S = 0;
|
|
1311
|
+
for (b !== "object" && b !== "string" && (n = t, t = null), n && typeof n != "function" && (n = i.parse), a = !(s = g(e || "", t = m(t))).protocol && !s.slashes, x.slashes = s.slashes || a && t.slashes, x.protocol = s.protocol || t.protocol || "", e = s.rest, (s.protocol === "file:" && (s.slashesCount !== 2 || u.test(e)) || !s.slashes && (s.protocol || s.slashesCount < 2 || !h(x.protocol))) && (y[3] = [/(.*)/, "pathname"]); S < y.length; S++) typeof (l = y[S]) == "function" ? e = l(e, x) : (c = l[0], v = l[1], c == c ? typeof c == "string" ? ~(p = c === "@" ? e.lastIndexOf(c) : e.indexOf(c)) && (typeof l[2] == "number" ? (x[v] = e.slice(0, p), e = e.slice(p + l[2])) : (x[v] = e.slice(p), e = e.slice(0, p))) : (p = c.exec(e)) && (x[v] = p[1], e = e.slice(0, p.index)) : x[v] = e, x[v] = x[v] || a && l[3] && t[v] || "", l[4] && (x[v] = x[v].toLowerCase()));
|
|
1312
|
+
n && (x.query = n(x.query)), a && t.slashes && x.pathname.charAt(0) !== "/" && (x.pathname !== "" || t.pathname !== "") && (x.pathname = function(e, t) {
|
|
1309
1313
|
if (e === "") return t;
|
|
1310
1314
|
for (var n = (t || "/").split("/").slice(0, -1).concat(e.split("/")), r = n.length, i = n[r - 1], a = !1, o = 0; r--;) n[r] === "." ? n.splice(r, 1) : n[r] === ".." ? (n.splice(r, 1), o++) : o && (r === 0 && (a = !0), n.splice(r, 1), o--);
|
|
1311
1315
|
return a && n.unshift(""), i !== "." && i !== ".." || n.push(""), n.join("/");
|
|
1312
|
-
}(x.pathname, t.pathname)), x.pathname.charAt(0) !== "/" &&
|
|
1316
|
+
}(x.pathname, t.pathname)), x.pathname.charAt(0) !== "/" && h(x.protocol) && (x.pathname = "/" + x.pathname), r(x.port, x.protocol) || (x.host = x.hostname, x.port = ""), x.username = x.password = "", x.auth &&= (~(p = x.auth.indexOf(":")) ? (x.username = x.auth.slice(0, p), x.username = encodeURIComponent(decodeURIComponent(x.username)), x.password = x.auth.slice(p + 1), x.password = encodeURIComponent(decodeURIComponent(x.password))) : x.username = encodeURIComponent(decodeURIComponent(x.auth)), x.password ? x.username + ":" + x.password : x.username), x.origin = x.protocol !== "file:" && h(x.protocol) && x.host ? x.protocol + "//" + x.host : "null", x.href = x.toString();
|
|
1313
1317
|
}
|
|
1314
|
-
|
|
1318
|
+
_.prototype = {
|
|
1315
1319
|
set: function(e, t, n) {
|
|
1316
|
-
var
|
|
1320
|
+
var a = this;
|
|
1317
1321
|
switch (e) {
|
|
1318
1322
|
case "query":
|
|
1319
|
-
typeof t == "string" && t.length && (t = (n ||
|
|
1323
|
+
typeof t == "string" && t.length && (t = (n || i.parse)(t)), a[e] = t;
|
|
1320
1324
|
break;
|
|
1321
1325
|
case "port":
|
|
1322
|
-
|
|
1326
|
+
a[e] = t, r(t, a.protocol) ? t && (a.host = a.hostname + ":" + t) : (a.host = a.hostname, a[e] = "");
|
|
1323
1327
|
break;
|
|
1324
1328
|
case "hostname":
|
|
1325
|
-
|
|
1329
|
+
a[e] = t, a.port && (t += ":" + a.port), a.host = t;
|
|
1326
1330
|
break;
|
|
1327
1331
|
case "host":
|
|
1328
|
-
|
|
1332
|
+
a[e] = t, c.test(t) ? (t = t.split(":"), a.port = t.pop(), a.hostname = t.join(":")) : (a.hostname = t, a.port = "");
|
|
1329
1333
|
break;
|
|
1330
1334
|
case "protocol":
|
|
1331
|
-
|
|
1335
|
+
a.protocol = t.toLowerCase(), a.slashes = !n;
|
|
1332
1336
|
break;
|
|
1333
1337
|
case "pathname":
|
|
1334
1338
|
case "hash":
|
|
1335
1339
|
if (t) {
|
|
1336
1340
|
var o = e === "pathname" ? "/" : "#";
|
|
1337
|
-
|
|
1338
|
-
} else
|
|
1341
|
+
a[e] = t.charAt(0) === o ? t : o + t;
|
|
1342
|
+
} else a[e] = t;
|
|
1339
1343
|
break;
|
|
1340
1344
|
case "username":
|
|
1341
1345
|
case "password":
|
|
1342
|
-
|
|
1346
|
+
a[e] = encodeURIComponent(t);
|
|
1343
1347
|
break;
|
|
1344
1348
|
case "auth":
|
|
1345
1349
|
var s = t.indexOf(":");
|
|
1346
|
-
~s ? (
|
|
1350
|
+
~s ? (a.username = t.slice(0, s), a.username = encodeURIComponent(decodeURIComponent(a.username)), a.password = t.slice(s + 1), a.password = encodeURIComponent(decodeURIComponent(a.password))) : a.username = encodeURIComponent(decodeURIComponent(t));
|
|
1347
1351
|
}
|
|
1348
|
-
for (var
|
|
1349
|
-
var u =
|
|
1350
|
-
u[4] && (
|
|
1352
|
+
for (var l = 0; l < f.length; l++) {
|
|
1353
|
+
var u = f[l];
|
|
1354
|
+
u[4] && (a[u[1]] = a[u[1]].toLowerCase());
|
|
1351
1355
|
}
|
|
1352
|
-
return
|
|
1356
|
+
return a.auth = a.password ? a.username + ":" + a.password : a.username, a.origin = a.protocol !== "file:" && h(a.protocol) && a.host ? a.protocol + "//" + a.host : "null", a.href = a.toString(), a;
|
|
1353
1357
|
},
|
|
1354
1358
|
toString: function(e) {
|
|
1355
|
-
e && typeof e == "function" || (e =
|
|
1356
|
-
var t, n = this, r = n.host,
|
|
1357
|
-
|
|
1358
|
-
var o =
|
|
1359
|
-
return n.username ? (o += n.username, n.password && (o += ":" + n.password), o += "@") : n.password ? (o += ":" + n.password, o += "@") : n.protocol !== "file:" &&
|
|
1359
|
+
e && typeof e == "function" || (e = i.stringify);
|
|
1360
|
+
var t, n = this, r = n.host, a = n.protocol;
|
|
1361
|
+
a && a.charAt(a.length - 1) !== ":" && (a += ":");
|
|
1362
|
+
var o = a + (n.protocol && n.slashes || h(n.protocol) ? "//" : "");
|
|
1363
|
+
return n.username ? (o += n.username, n.password && (o += ":" + n.password), o += "@") : n.password ? (o += ":" + n.password, o += "@") : n.protocol !== "file:" && h(n.protocol) && !r && n.pathname !== "/" && (o += "@"), (r[r.length - 1] === ":" || c.test(n.hostname) && !n.port) && (r += ":"), o += r + n.pathname, (t = typeof n.query == "object" ? e(n.query) : n.query) && (o += t.charAt(0) === "?" ? t : "?" + t), n.hash && (o += n.hash), o;
|
|
1360
1364
|
}
|
|
1361
|
-
},
|
|
1365
|
+
}, _.extractProtocol = g, _.location = m, _.trimLeft = d, _.qs = i, e.exports = _;
|
|
1362
1366
|
},
|
|
1363
1367
|
410() {},
|
|
1364
1368
|
388() {},
|
|
1365
1369
|
805() {},
|
|
1366
1370
|
345() {},
|
|
1367
1371
|
800() {}
|
|
1368
|
-
},
|
|
1372
|
+
}, Le = {};
|
|
1369
1373
|
function k(e) {
|
|
1370
|
-
var t =
|
|
1374
|
+
var t = Le[e];
|
|
1371
1375
|
if (t !== void 0) return t.exports;
|
|
1372
|
-
var n =
|
|
1376
|
+
var n = Le[e] = {
|
|
1373
1377
|
id: e,
|
|
1374
1378
|
loaded: !1,
|
|
1375
1379
|
exports: {}
|
|
1376
1380
|
};
|
|
1377
|
-
return
|
|
1381
|
+
return Ie[e].call(n.exports, n, n.exports, k), n.loaded = !0, n.exports;
|
|
1378
1382
|
}
|
|
1379
1383
|
k.n = (e) => {
|
|
1380
1384
|
var t = e && e.__esModule ? () => e.default : () => e;
|
|
@@ -1385,11 +1389,11 @@ k.n = (e) => {
|
|
|
1385
1389
|
get: t[n]
|
|
1386
1390
|
});
|
|
1387
1391
|
}, k.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), k.nmd = (e) => (e.paths = [], e.children ||= [], e);
|
|
1388
|
-
var
|
|
1389
|
-
function
|
|
1390
|
-
if (!
|
|
1392
|
+
var Re = k(737), ze = k.n(Re);
|
|
1393
|
+
function Be(e) {
|
|
1394
|
+
if (!Ve(e)) throw Error("Parameter was not an error");
|
|
1391
1395
|
}
|
|
1392
|
-
function
|
|
1396
|
+
function Ve(e) {
|
|
1393
1397
|
return !!e && typeof e == "object" && (t = e, Object.prototype.toString.call(t) === "[object Error]") || e instanceof Error;
|
|
1394
1398
|
var t;
|
|
1395
1399
|
}
|
|
@@ -1398,7 +1402,7 @@ var A = class e extends Error {
|
|
|
1398
1402
|
let { options: n, shortMessage: r } = function(e) {
|
|
1399
1403
|
let t, n = "";
|
|
1400
1404
|
if (e.length === 0) t = {};
|
|
1401
|
-
else if (
|
|
1405
|
+
else if (Ve(e[0])) t = { cause: e[0] }, n = e.slice(1).join(" ") || "";
|
|
1402
1406
|
else if (e[0] && typeof e[0] == "object") t = Object.assign({}, e[0]), n = e.slice(1).join(" ") || "";
|
|
1403
1407
|
else {
|
|
1404
1408
|
if (typeof e[0] != "string") throw Error("Invalid arguments passed to Layerr");
|
|
@@ -1415,15 +1419,15 @@ var A = class e extends Error {
|
|
|
1415
1419
|
}
|
|
1416
1420
|
}
|
|
1417
1421
|
static cause(e) {
|
|
1418
|
-
return
|
|
1422
|
+
return Be(e), e._cause && Ve(e._cause) ? e._cause : null;
|
|
1419
1423
|
}
|
|
1420
1424
|
static fullStack(t) {
|
|
1421
|
-
|
|
1425
|
+
Be(t);
|
|
1422
1426
|
let n = e.cause(t);
|
|
1423
1427
|
return n ? `${t.stack}\ncaused by: ${e.fullStack(n)}` : t.stack ?? "";
|
|
1424
1428
|
}
|
|
1425
1429
|
static info(t) {
|
|
1426
|
-
|
|
1430
|
+
Be(t);
|
|
1427
1431
|
let n = {}, r = e.cause(t);
|
|
1428
1432
|
return r && Object.assign(n, e.info(r)), t._info && Object.assign(n, t._info), n;
|
|
1429
1433
|
}
|
|
@@ -1431,25 +1435,25 @@ var A = class e extends Error {
|
|
|
1431
1435
|
let e = this.name || this.constructor.name || this.constructor.prototype.name;
|
|
1432
1436
|
return this.message && (e = `${e}: ${this.message}`), e;
|
|
1433
1437
|
}
|
|
1434
|
-
},
|
|
1438
|
+
}, He = k(47), Ue = k.n(He), We = "__PATH_SEPARATOR_POSIX__", Ge = "__PATH_SEPARATOR_WINDOWS__";
|
|
1435
1439
|
function j(e) {
|
|
1436
1440
|
try {
|
|
1437
|
-
let t = e.replace(/\//g,
|
|
1438
|
-
return encodeURIComponent(t).split(
|
|
1441
|
+
let t = e.replace(/\//g, We).replace(/\\\\/g, Ge);
|
|
1442
|
+
return encodeURIComponent(t).split(Ge).join("\\\\").split(We).join("/");
|
|
1439
1443
|
} catch (e) {
|
|
1440
1444
|
throw new A(e, "Failed encoding path");
|
|
1441
1445
|
}
|
|
1442
1446
|
}
|
|
1443
|
-
function
|
|
1447
|
+
function Ke(e) {
|
|
1444
1448
|
return e.startsWith("/") ? e : "/" + e;
|
|
1445
1449
|
}
|
|
1446
|
-
function
|
|
1450
|
+
function qe(e) {
|
|
1447
1451
|
let t = e;
|
|
1448
1452
|
return t[0] !== "/" && (t = "/" + t), /^.+\/$/.test(t) && (t = t.substr(0, t.length - 1)), t;
|
|
1449
1453
|
}
|
|
1450
|
-
function
|
|
1451
|
-
let t = new (
|
|
1452
|
-
return t.length <= 0 && (t = "/"),
|
|
1454
|
+
function Je(e) {
|
|
1455
|
+
let t = new (ze())(e).pathname;
|
|
1456
|
+
return t.length <= 0 && (t = "/"), qe(t);
|
|
1453
1457
|
}
|
|
1454
1458
|
function M(...e) {
|
|
1455
1459
|
return function() {
|
|
@@ -1468,12 +1472,12 @@ function M(...e) {
|
|
|
1468
1472
|
}(typeof arguments[0] == "object" ? arguments[0] : [].slice.call(arguments));
|
|
1469
1473
|
}(e.reduce(((e, t, n) => ((n === 0 || t !== "/" || t === "/" && e[e.length - 1] !== "/") && e.push(t), e)), []));
|
|
1470
1474
|
}
|
|
1471
|
-
var
|
|
1472
|
-
function
|
|
1475
|
+
var Ye = k(542), Xe = k.n(Ye);
|
|
1476
|
+
function Ze(e, t) {
|
|
1473
1477
|
let n = e.url.replace("//", ""), r = n.indexOf("/") == -1 ? "/" : n.slice(n.indexOf("/")), i = e.method ? e.method.toUpperCase() : "GET", a = !!/(^|,)\s*auth\s*($|,)/.test(t.qop) && "auth", o = `00000000${t.nc}`.slice(-8), s = function(e, t, n, r, i, a, o) {
|
|
1474
|
-
let s = o ||
|
|
1475
|
-
return e && e.toLowerCase() === "md5-sess" ?
|
|
1476
|
-
}(t.algorithm, t.username, t.realm, t.password, t.nonce, t.cnonce, t.ha1), c =
|
|
1478
|
+
let s = o || Xe()(`${t}:${n}:${r}`);
|
|
1479
|
+
return e && e.toLowerCase() === "md5-sess" ? Xe()(`${s}:${i}:${a}`) : s;
|
|
1480
|
+
}(t.algorithm, t.username, t.realm, t.password, t.nonce, t.cnonce, t.ha1), c = Xe()(`${i}:${r}`), l = a ? Xe()(`${s}:${t.nonce}:${o}:${t.cnonce}:${a}:${c}`) : Xe()(`${s}:${t.nonce}:${c}`), u = {
|
|
1477
1481
|
username: t.username,
|
|
1478
1482
|
realm: t.realm,
|
|
1479
1483
|
nonce: t.nonce,
|
|
@@ -1488,26 +1492,26 @@ function Ye(e, t) {
|
|
|
1488
1492
|
for (let e in u) u[e] && (e === "qop" || e === "nc" || e === "algorithm" ? d.push(`${e}=${u[e]}`) : d.push(`${e}="${u[e]}"`));
|
|
1489
1493
|
return `Digest ${d.join(", ")}`;
|
|
1490
1494
|
}
|
|
1491
|
-
function
|
|
1495
|
+
function Qe(e) {
|
|
1492
1496
|
return (e.headers && e.headers.get("www-authenticate") || "").split(/\s/)[0].toLowerCase() === "digest";
|
|
1493
1497
|
}
|
|
1494
|
-
var
|
|
1495
|
-
function
|
|
1496
|
-
return
|
|
1498
|
+
var $e = k(101), et = k.n($e);
|
|
1499
|
+
function tt(e) {
|
|
1500
|
+
return et().decode(e);
|
|
1497
1501
|
}
|
|
1498
|
-
function
|
|
1502
|
+
function nt(e, t) {
|
|
1499
1503
|
var n;
|
|
1500
|
-
return `Basic ${n = `${e}:${t}`,
|
|
1504
|
+
return `Basic ${n = `${e}:${t}`, et().encode(n)}`;
|
|
1501
1505
|
}
|
|
1502
1506
|
var N = function(e) {
|
|
1503
1507
|
return e.Auto = "auto", e.Digest = "digest", e.None = "none", e.Password = "password", e.Token = "token", e;
|
|
1504
1508
|
}({}), P = function(e) {
|
|
1505
1509
|
return e.DataTypeNoLength = "data-type-no-length", e.InvalidAuthType = "invalid-auth-type", e.InvalidOutputFormat = "invalid-output-format", e.LinkUnsupportedAuthType = "link-unsupported-auth", e.InvalidUpdateRange = "invalid-update-range", e.NotSupported = "not-supported", e;
|
|
1506
1510
|
}({});
|
|
1507
|
-
function
|
|
1511
|
+
function rt(e, t, n, r, i) {
|
|
1508
1512
|
switch (e.authType) {
|
|
1509
1513
|
case N.Auto:
|
|
1510
|
-
t && n && (e.headers.Authorization =
|
|
1514
|
+
t && n && (e.headers.Authorization = nt(t, n));
|
|
1511
1515
|
break;
|
|
1512
1516
|
case N.Digest:
|
|
1513
1517
|
e.digest = function(e, t, n) {
|
|
@@ -1523,7 +1527,7 @@ function tt(e, t, n, r, i) {
|
|
|
1523
1527
|
break;
|
|
1524
1528
|
case N.None: break;
|
|
1525
1529
|
case N.Password:
|
|
1526
|
-
e.headers.Authorization =
|
|
1530
|
+
e.headers.Authorization = nt(t, n);
|
|
1527
1531
|
break;
|
|
1528
1532
|
case N.Token:
|
|
1529
1533
|
e.headers.Authorization = `${(a = r).token_type} ${a.access_token}`;
|
|
@@ -1533,22 +1537,22 @@ function tt(e, t, n, r, i) {
|
|
|
1533
1537
|
var a;
|
|
1534
1538
|
}
|
|
1535
1539
|
k(345), k(800);
|
|
1536
|
-
var
|
|
1537
|
-
|
|
1538
|
-
var
|
|
1539
|
-
function
|
|
1540
|
+
var it = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : typeof window < "u" ? window : globalThis, at = it.fetch.bind(it);
|
|
1541
|
+
it.Headers, it.Request, it.Response;
|
|
1542
|
+
var ot = "@@HOTPATCHER", st = () => {};
|
|
1543
|
+
function ct(e) {
|
|
1540
1544
|
return {
|
|
1541
1545
|
original: e,
|
|
1542
1546
|
methods: [e],
|
|
1543
1547
|
final: !1
|
|
1544
1548
|
};
|
|
1545
1549
|
}
|
|
1546
|
-
var
|
|
1550
|
+
var lt = class {
|
|
1547
1551
|
constructor() {
|
|
1548
1552
|
this._configuration = {
|
|
1549
1553
|
registry: {},
|
|
1550
1554
|
getEmptyAction: "null"
|
|
1551
|
-
}, this.__type__ =
|
|
1555
|
+
}, this.__type__ = ot;
|
|
1552
1556
|
}
|
|
1553
1557
|
get configuration() {
|
|
1554
1558
|
return this._configuration;
|
|
@@ -1560,13 +1564,13 @@ var st = class {
|
|
|
1560
1564
|
this.configuration.getEmptyAction = e;
|
|
1561
1565
|
}
|
|
1562
1566
|
control(e, t = !1) {
|
|
1563
|
-
if (!e || e.__type__ !==
|
|
1567
|
+
if (!e || e.__type__ !== ot) throw Error("Failed taking control of target HotPatcher instance: Invalid type or object");
|
|
1564
1568
|
return Object.keys(e.configuration.registry).forEach(((n) => {
|
|
1565
1569
|
this.configuration.registry.hasOwnProperty(n) ? t && (this.configuration.registry[n] = Object.assign({}, e.configuration.registry[n])) : this.configuration.registry[n] = Object.assign({}, e.configuration.registry[n]);
|
|
1566
1570
|
})), e._configuration = this.configuration, this;
|
|
1567
1571
|
}
|
|
1568
1572
|
execute(e, ...t) {
|
|
1569
|
-
return (this.get(e) ||
|
|
1573
|
+
return (this.get(e) || st)(...t);
|
|
1570
1574
|
}
|
|
1571
1575
|
get(e) {
|
|
1572
1576
|
let t = this.configuration.registry[e];
|
|
@@ -1591,11 +1595,11 @@ var st = class {
|
|
|
1591
1595
|
let { chain: r = !1 } = n;
|
|
1592
1596
|
if (this.configuration.registry[e] && this.configuration.registry[e].final) throw Error(`Failed patching '${e}': Method marked as being final`);
|
|
1593
1597
|
if (typeof t != "function") throw Error(`Failed patching '${e}': Provided method is not a function`);
|
|
1594
|
-
if (r) this.configuration.registry[e] ? this.configuration.registry[e].methods.push(t) : this.configuration.registry[e] =
|
|
1598
|
+
if (r) this.configuration.registry[e] ? this.configuration.registry[e].methods.push(t) : this.configuration.registry[e] = ct(t);
|
|
1595
1599
|
else if (this.isPatched(e)) {
|
|
1596
1600
|
let { original: n } = this.configuration.registry[e];
|
|
1597
|
-
this.configuration.registry[e] = Object.assign(
|
|
1598
|
-
} else this.configuration.registry[e] =
|
|
1601
|
+
this.configuration.registry[e] = Object.assign(ct(t), { original: n });
|
|
1602
|
+
} else this.configuration.registry[e] = ct(t);
|
|
1599
1603
|
return this;
|
|
1600
1604
|
}
|
|
1601
1605
|
patchInline(e, t, ...n) {
|
|
@@ -1615,11 +1619,11 @@ var st = class {
|
|
|
1615
1619
|
if (!this.configuration.registry.hasOwnProperty(e)) throw Error(`Failed marking '${e}' as final: No method found for key`);
|
|
1616
1620
|
return this.configuration.registry[e].final = !0, this;
|
|
1617
1621
|
}
|
|
1618
|
-
},
|
|
1619
|
-
function
|
|
1620
|
-
return
|
|
1622
|
+
}, ut = null;
|
|
1623
|
+
function dt() {
|
|
1624
|
+
return ut ||= new lt(), ut;
|
|
1621
1625
|
}
|
|
1622
|
-
function
|
|
1626
|
+
function ft(e) {
|
|
1623
1627
|
return function(e) {
|
|
1624
1628
|
if (typeof e != "object" || !e || Object.prototype.toString.call(e) != "[object Object]") return !1;
|
|
1625
1629
|
if (Object.getPrototypeOf(e) === null) return !0;
|
|
@@ -1628,27 +1632,27 @@ function ut(e) {
|
|
|
1628
1632
|
return Object.getPrototypeOf(e) === t;
|
|
1629
1633
|
}(e) ? Object.assign({}, e) : Object.setPrototypeOf(Object.assign({}, e), Object.getPrototypeOf(e));
|
|
1630
1634
|
}
|
|
1631
|
-
function
|
|
1635
|
+
function pt(...e) {
|
|
1632
1636
|
let t = null, n = [...e];
|
|
1633
1637
|
for (; n.length > 0;) {
|
|
1634
1638
|
let e = n.shift();
|
|
1635
|
-
t = t ?
|
|
1639
|
+
t = t ? mt(t, e) : ft(e);
|
|
1636
1640
|
}
|
|
1637
1641
|
return t;
|
|
1638
1642
|
}
|
|
1639
|
-
function
|
|
1640
|
-
let n =
|
|
1643
|
+
function mt(e, t) {
|
|
1644
|
+
let n = ft(e);
|
|
1641
1645
|
return Object.keys(t).forEach(((e) => {
|
|
1642
|
-
n.hasOwnProperty(e) ? Array.isArray(t[e]) ? n[e] = Array.isArray(n[e]) ? [...n[e], ...t[e]] : [...t[e]] : typeof t[e] == "object" && t[e] ? n[e] = typeof n[e] == "object" && n[e] ?
|
|
1646
|
+
n.hasOwnProperty(e) ? Array.isArray(t[e]) ? n[e] = Array.isArray(n[e]) ? [...n[e], ...t[e]] : [...t[e]] : typeof t[e] == "object" && t[e] ? n[e] = typeof n[e] == "object" && n[e] ? mt(n[e], t[e]) : ft(t[e]) : n[e] = t[e] : n[e] = t[e];
|
|
1643
1647
|
})), n;
|
|
1644
1648
|
}
|
|
1645
|
-
function
|
|
1649
|
+
function ht(e) {
|
|
1646
1650
|
let t = {};
|
|
1647
1651
|
return e.forEach(((e, n) => {
|
|
1648
1652
|
t[n] = e;
|
|
1649
1653
|
})), t;
|
|
1650
1654
|
}
|
|
1651
|
-
function
|
|
1655
|
+
function gt(...e) {
|
|
1652
1656
|
if (e.length === 0) return {};
|
|
1653
1657
|
let t = {};
|
|
1654
1658
|
return e.reduce(((e, n) => (Object.keys(n).forEach(((r) => {
|
|
@@ -1657,14 +1661,14 @@ function mt(...e) {
|
|
|
1657
1661
|
})), e)), {});
|
|
1658
1662
|
}
|
|
1659
1663
|
k(805);
|
|
1660
|
-
var
|
|
1661
|
-
function
|
|
1662
|
-
return
|
|
1664
|
+
var _t = typeof ArrayBuffer == "function", { toString: vt } = Object.prototype;
|
|
1665
|
+
function yt(e) {
|
|
1666
|
+
return _t && (e instanceof ArrayBuffer || vt.call(e) === "[object ArrayBuffer]");
|
|
1663
1667
|
}
|
|
1664
|
-
function
|
|
1668
|
+
function bt(e) {
|
|
1665
1669
|
return e != null && e.constructor != null && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
|
|
1666
1670
|
}
|
|
1667
|
-
function
|
|
1671
|
+
function xt(e) {
|
|
1668
1672
|
return function() {
|
|
1669
1673
|
var t = [...arguments];
|
|
1670
1674
|
try {
|
|
@@ -1674,18 +1678,18 @@ function yt(e) {
|
|
|
1674
1678
|
}
|
|
1675
1679
|
};
|
|
1676
1680
|
}
|
|
1677
|
-
function
|
|
1681
|
+
function St(e, t, n) {
|
|
1678
1682
|
return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
|
|
1679
1683
|
}
|
|
1680
|
-
var
|
|
1684
|
+
var Ct = xt((function(e) {
|
|
1681
1685
|
let t = e._digest;
|
|
1682
|
-
return delete e._digest, t.hasDigestAuth && (e =
|
|
1686
|
+
return delete e._digest, t.hasDigestAuth && (e = pt(e, { headers: { Authorization: Ze(e, t) } })), St(Tt(e), (function(n) {
|
|
1683
1687
|
let r = !1;
|
|
1684
1688
|
return i = function(e) {
|
|
1685
1689
|
return r ? e : n;
|
|
1686
1690
|
}, (a = function() {
|
|
1687
1691
|
if (n.status == 401) return t.hasDigestAuth = function(e, t) {
|
|
1688
|
-
if (!
|
|
1692
|
+
if (!Qe(e)) return !1;
|
|
1689
1693
|
let n = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;
|
|
1690
1694
|
for (;;) {
|
|
1691
1695
|
let r = e.headers && e.headers.get("www-authenticate") || "", i = n.exec(r);
|
|
@@ -1698,7 +1702,7 @@ var xt = yt((function(e) {
|
|
|
1698
1702
|
return e;
|
|
1699
1703
|
}(), !0;
|
|
1700
1704
|
}(n, t), function() {
|
|
1701
|
-
if (t.hasDigestAuth) return
|
|
1705
|
+
if (t.hasDigestAuth) return St(Tt(e = pt(e, { headers: { Authorization: Ze(e, t) } })), (function(e) {
|
|
1702
1706
|
return e.status == 401 ? t.hasDigestAuth = !1 : t.nc++, r = !0, e;
|
|
1703
1707
|
}));
|
|
1704
1708
|
}();
|
|
@@ -1706,36 +1710,36 @@ var xt = yt((function(e) {
|
|
|
1706
1710
|
}()) && a.then ? a.then(i) : i(a);
|
|
1707
1711
|
var i, a;
|
|
1708
1712
|
}));
|
|
1709
|
-
})),
|
|
1710
|
-
return
|
|
1711
|
-
return n.ok ? (t.authType = N.Password, n) : n.status == 401 &&
|
|
1713
|
+
})), wt = xt((function(e, t) {
|
|
1714
|
+
return St(Tt(e), (function(n) {
|
|
1715
|
+
return n.ok ? (t.authType = N.Password, n) : n.status == 401 && Qe(n) ? (t.authType = N.Digest, rt(t, t.username, t.password, void 0, void 0), e._digest = t.digest, Ct(e)) : n;
|
|
1712
1716
|
}));
|
|
1713
|
-
})), F =
|
|
1714
|
-
return t.authType === N.Auto ?
|
|
1717
|
+
})), F = xt((function(e, t) {
|
|
1718
|
+
return t.authType === N.Auto ? wt(e, t) : e._digest ? Ct(e) : Tt(e);
|
|
1715
1719
|
}));
|
|
1716
1720
|
function I(e, t, n) {
|
|
1717
|
-
let r =
|
|
1718
|
-
return r.headers =
|
|
1721
|
+
let r = ft(e);
|
|
1722
|
+
return r.headers = gt(t.headers, r.headers || {}, n.headers || {}), n.data !== void 0 && (r.data = n.data), n.signal && (r.signal = n.signal), t.httpAgent && (r.httpAgent = t.httpAgent), t.httpsAgent && (r.httpsAgent = t.httpsAgent), t.digest && (r._digest = t.digest), typeof t.withCredentials == "boolean" && (r.withCredentials = t.withCredentials), r;
|
|
1719
1723
|
}
|
|
1720
|
-
function
|
|
1721
|
-
let t =
|
|
1722
|
-
return t.patchInline("request", ((e) => t.patchInline("fetch",
|
|
1724
|
+
function Tt(e) {
|
|
1725
|
+
let t = dt();
|
|
1726
|
+
return t.patchInline("request", ((e) => t.patchInline("fetch", at, e.url, function(e) {
|
|
1723
1727
|
let t = {}, n = { method: e.method };
|
|
1724
|
-
if (e.headers && (t =
|
|
1728
|
+
if (e.headers && (t = gt(t, e.headers)), e.data !== void 0) {
|
|
1725
1729
|
let [r, i] = function(e) {
|
|
1726
|
-
if (typeof e == "string" ||
|
|
1730
|
+
if (typeof e == "string" || bt(e) || yt(e)) return [e, {}];
|
|
1727
1731
|
if (e && typeof e == "object") return [JSON.stringify(e), { "content-type": "application/json" }];
|
|
1728
1732
|
throw Error("Unable to convert request body: Unexpected body type: " + typeof e);
|
|
1729
1733
|
}(e.data);
|
|
1730
|
-
n.body = r, t =
|
|
1734
|
+
n.body = r, t = gt(t, i);
|
|
1731
1735
|
}
|
|
1732
1736
|
return e.signal && (n.signal = e.signal), e.withCredentials && (n.credentials = "include"), n.headers = t, n;
|
|
1733
1737
|
}(e))), e);
|
|
1734
1738
|
}
|
|
1735
|
-
var
|
|
1739
|
+
var Et = k(285), Dt = (e) => {
|
|
1736
1740
|
if (typeof e != "string") throw TypeError("invalid pattern");
|
|
1737
1741
|
if (e.length > 65536) throw TypeError("pattern is too long");
|
|
1738
|
-
},
|
|
1742
|
+
}, Ot = {
|
|
1739
1743
|
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
|
|
1740
1744
|
"[:alpha:]": ["\\p{L}\\p{Nl}", !0],
|
|
1741
1745
|
"[:ascii:]": ["\\x00-\\x7f", !1],
|
|
@@ -1754,7 +1758,7 @@ var wt = k(285), Tt = (e) => {
|
|
|
1754
1758
|
"[:upper:]": ["\\p{Lu}", !0],
|
|
1755
1759
|
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
|
|
1756
1760
|
"[:xdigit:]": ["A-Fa-f0-9", !1]
|
|
1757
|
-
},
|
|
1761
|
+
}, kt = (e) => e.replace(/[[\]\\-]/g, "\\$&"), At = (e) => e.join(""), jt = (e, t) => {
|
|
1758
1762
|
let n = t;
|
|
1759
1763
|
if (e.charAt(n) !== "[") throw Error("not in a brace expression");
|
|
1760
1764
|
let r = [], i = [], a = n + 1, o = !1, s = !1, c = !1, l = !1, u = n, d = "";
|
|
@@ -1767,7 +1771,7 @@ var wt = k(285), Tt = (e) => {
|
|
|
1767
1771
|
}
|
|
1768
1772
|
if (o = !0, t !== "\\" || c) {
|
|
1769
1773
|
if (t === "[" && !c) {
|
|
1770
|
-
for (let [t, [o, c, l]] of Object.entries(
|
|
1774
|
+
for (let [t, [o, c, l]] of Object.entries(Ot)) if (e.startsWith(t, a)) {
|
|
1771
1775
|
if (d) return [
|
|
1772
1776
|
"$.",
|
|
1773
1777
|
!1,
|
|
@@ -1778,7 +1782,7 @@ var wt = k(285), Tt = (e) => {
|
|
|
1778
1782
|
continue t;
|
|
1779
1783
|
}
|
|
1780
1784
|
}
|
|
1781
|
-
c = !1, d ? (t > d ? r.push(
|
|
1785
|
+
c = !1, d ? (t > d ? r.push(kt(d) + "-" + kt(t)) : t === d && r.push(kt(t)), d = "", a++) : e.startsWith("-]", a + 1) ? (r.push(kt(t + "-")), a += 2) : e.startsWith("-", a + 1) ? (d = t, a += 2) : (r.push(kt(t)), a++);
|
|
1782
1786
|
} else c = !0, a++;
|
|
1783
1787
|
} else l = !0, a++;
|
|
1784
1788
|
}
|
|
@@ -1801,20 +1805,20 @@ var wt = k(285), Tt = (e) => {
|
|
|
1801
1805
|
!1
|
|
1802
1806
|
];
|
|
1803
1807
|
var f;
|
|
1804
|
-
let p = "[" + (l ? "^" : "") +
|
|
1808
|
+
let p = "[" + (l ? "^" : "") + At(r) + "]", m = "[" + (l ? "" : "^") + At(i) + "]";
|
|
1805
1809
|
return [
|
|
1806
1810
|
r.length && i.length ? "(" + p + "|" + m + ")" : r.length ? p : m,
|
|
1807
1811
|
s,
|
|
1808
1812
|
u - n,
|
|
1809
1813
|
!0
|
|
1810
1814
|
];
|
|
1811
|
-
},
|
|
1815
|
+
}, Mt = (e, { windowsPathsNoEscape: t = !1 } = {}) => t ? e.replace(/\[([^\/\\])\]/g, "$1") : e.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1"), L, Nt = /* @__PURE__ */ new Set([
|
|
1812
1816
|
"!",
|
|
1813
1817
|
"?",
|
|
1814
1818
|
"+",
|
|
1815
1819
|
"*",
|
|
1816
1820
|
"@"
|
|
1817
|
-
]),
|
|
1821
|
+
]), Pt = (e) => Nt.has(e), Ft = (e) => Pt(e.type), It = /* @__PURE__ */ new Map([
|
|
1818
1822
|
["!", ["@"]],
|
|
1819
1823
|
["?", ["?", "@"]],
|
|
1820
1824
|
["@", ["@"]],
|
|
@@ -1825,11 +1829,11 @@ var wt = k(285), Tt = (e) => {
|
|
|
1825
1829
|
"@"
|
|
1826
1830
|
]],
|
|
1827
1831
|
["+", ["+", "@"]]
|
|
1828
|
-
]),
|
|
1832
|
+
]), Lt = /* @__PURE__ */ new Map([
|
|
1829
1833
|
["!", ["?"]],
|
|
1830
1834
|
["@", ["?"]],
|
|
1831
1835
|
["+", ["?", "*"]]
|
|
1832
|
-
]),
|
|
1836
|
+
]), Rt = /* @__PURE__ */ new Map([
|
|
1833
1837
|
["!", ["?", "@"]],
|
|
1834
1838
|
["?", ["?", "@"]],
|
|
1835
1839
|
["@", ["?", "@"]],
|
|
@@ -1845,7 +1849,7 @@ var wt = k(285), Tt = (e) => {
|
|
|
1845
1849
|
"?",
|
|
1846
1850
|
"*"
|
|
1847
1851
|
]]
|
|
1848
|
-
]),
|
|
1852
|
+
]), zt = /* @__PURE__ */ new Map([
|
|
1849
1853
|
["!", /* @__PURE__ */ new Map([["!", "@"]])],
|
|
1850
1854
|
["?", /* @__PURE__ */ new Map([["*", "*"], ["+", "*"]])],
|
|
1851
1855
|
["@", /* @__PURE__ */ new Map([
|
|
@@ -1856,7 +1860,7 @@ var wt = k(285), Tt = (e) => {
|
|
|
1856
1860
|
["+", "+"]
|
|
1857
1861
|
])],
|
|
1858
1862
|
["+", /* @__PURE__ */ new Map([["?", "*"], ["*", "*"]])]
|
|
1859
|
-
]),
|
|
1863
|
+
]), Bt = "(?!\\.)", Vt = /* @__PURE__ */ new Set(["[", "."]), Ht = /* @__PURE__ */ new Set(["..", "."]), Ut = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), Wt = "[^/]", Gt = Wt + "*?", Kt = Wt + "+?", qt = class {
|
|
1860
1864
|
type;
|
|
1861
1865
|
#e;
|
|
1862
1866
|
#t;
|
|
@@ -1942,7 +1946,7 @@ var wt = k(285), Tt = (e) => {
|
|
|
1942
1946
|
if (o || n === "\\") o = !o, d += n;
|
|
1943
1947
|
else if (s) u === c + 1 ? n !== "^" && n !== "!" || (l = !0) : n !== "]" || u === c + 2 && l || (s = !1), d += n;
|
|
1944
1948
|
else if (n !== "[") {
|
|
1945
|
-
if (!r.noext &&
|
|
1949
|
+
if (!r.noext && Pt(n) && e.charAt(u) === "(" && i <= a) {
|
|
1946
1950
|
t.push(d), d = "";
|
|
1947
1951
|
let a = new L(n, t);
|
|
1948
1952
|
u = L.#f(e, a, u, r, i + 1), t.push(a);
|
|
@@ -1957,7 +1961,7 @@ var wt = k(285), Tt = (e) => {
|
|
|
1957
1961
|
if (o || n === "\\") o = !o, p += n;
|
|
1958
1962
|
else if (s) u === c + 1 ? n !== "^" && n !== "!" || (l = !0) : n !== "]" || u === c + 2 && l || (s = !1), p += n;
|
|
1959
1963
|
else if (n !== "[") {
|
|
1960
|
-
if (
|
|
1964
|
+
if (Pt(n) && e.charAt(u) === "(" && (i <= a || t && t.#h(n))) {
|
|
1961
1965
|
let a = t && t.#h(n) ? 0 : 1;
|
|
1962
1966
|
d.push(p), p = "";
|
|
1963
1967
|
let o = new L(n, d);
|
|
@@ -1971,14 +1975,14 @@ var wt = k(285), Tt = (e) => {
|
|
|
1971
1975
|
return t.type = null, t.#t = void 0, t.#r = [e.substring(n - 1)], u;
|
|
1972
1976
|
}
|
|
1973
1977
|
#p(e) {
|
|
1974
|
-
return this.#m(e,
|
|
1978
|
+
return this.#m(e, Lt);
|
|
1975
1979
|
}
|
|
1976
|
-
#m(e, t =
|
|
1980
|
+
#m(e, t = It) {
|
|
1977
1981
|
if (!e || typeof e != "object" || e.type !== null || e.#r.length !== 1 || this.type === null) return !1;
|
|
1978
1982
|
let n = e.#r[0];
|
|
1979
1983
|
return !(!n || typeof n != "object" || n.type === null) && this.#h(n.type, t);
|
|
1980
1984
|
}
|
|
1981
|
-
#h(e, t =
|
|
1985
|
+
#h(e, t = Rt) {
|
|
1982
1986
|
return !!t.get(this.type)?.includes(e);
|
|
1983
1987
|
}
|
|
1984
1988
|
#g(e, t) {
|
|
@@ -1992,7 +1996,7 @@ var wt = k(285), Tt = (e) => {
|
|
|
1992
1996
|
this.#l = void 0;
|
|
1993
1997
|
}
|
|
1994
1998
|
#v(e) {
|
|
1995
|
-
return !!
|
|
1999
|
+
return !!zt.get(this.type)?.has(e);
|
|
1996
2000
|
}
|
|
1997
2001
|
#y(e) {
|
|
1998
2002
|
if (!e || typeof e != "object" || e.type !== null || e.#r.length !== 1 || this.type === null || this.#r.length !== 1) return !1;
|
|
@@ -2000,14 +2004,14 @@ var wt = k(285), Tt = (e) => {
|
|
|
2000
2004
|
return !(!t || typeof t != "object" || t.type === null) && this.#v(t.type);
|
|
2001
2005
|
}
|
|
2002
2006
|
#b(e) {
|
|
2003
|
-
let t =
|
|
2007
|
+
let t = zt.get(this.type), n = e.#r[0], r = t?.get(n.type);
|
|
2004
2008
|
if (!r) return !1;
|
|
2005
2009
|
this.#r = n.#r;
|
|
2006
2010
|
for (let e of this.#r) typeof e == "object" && (e.#i = this);
|
|
2007
2011
|
this.type = r, this.#l = void 0, this.#u = !1;
|
|
2008
2012
|
}
|
|
2009
2013
|
#x() {
|
|
2010
|
-
if (
|
|
2014
|
+
if (Ft(this)) {
|
|
2011
2015
|
let e = 0, t = !1;
|
|
2012
2016
|
do {
|
|
2013
2017
|
t = !0;
|
|
@@ -2038,19 +2042,19 @@ var wt = k(285), Tt = (e) => {
|
|
|
2038
2042
|
}
|
|
2039
2043
|
toRegExpSource(e) {
|
|
2040
2044
|
let t = e ?? !!this.#c.dot;
|
|
2041
|
-
if (this.#e === this && (this.#x(), this.#d()), !
|
|
2045
|
+
if (this.#e === this && (this.#x(), this.#d()), !Ft(this)) {
|
|
2042
2046
|
let n = this.isStart() && this.isEnd(), r = this.#r.map(((t) => {
|
|
2043
2047
|
let [r, i, a, o] = typeof t == "string" ? L.#C(t, this.#t, n) : t.toRegExpSource(e);
|
|
2044
2048
|
return this.#t = this.#t || a, this.#n = this.#n || o, r;
|
|
2045
2049
|
})).join(""), i = "";
|
|
2046
|
-
if (this.isStart() && typeof this.#r[0] == "string" && (this.#r.length !== 1 || !
|
|
2047
|
-
let n =
|
|
2048
|
-
i = a ? "(?!(?:^|/)\\.\\.?(?:$|/))" : o ?
|
|
2050
|
+
if (this.isStart() && typeof this.#r[0] == "string" && (this.#r.length !== 1 || !Ht.has(this.#r[0]))) {
|
|
2051
|
+
let n = Vt, a = t && n.has(r.charAt(0)) || r.startsWith("\\.") && n.has(r.charAt(2)) || r.startsWith("\\.\\.") && n.has(r.charAt(4)), o = !t && !e && n.has(r.charAt(0));
|
|
2052
|
+
i = a ? "(?!(?:^|/)\\.\\.?(?:$|/))" : o ? Bt : "";
|
|
2049
2053
|
}
|
|
2050
2054
|
let a = "";
|
|
2051
2055
|
return this.isEnd() && this.#e.#s && this.#i?.type === "!" && (a = "(?:$|\\/)"), [
|
|
2052
2056
|
i + r + a,
|
|
2053
|
-
|
|
2057
|
+
Mt(r),
|
|
2054
2058
|
this.#t = !!this.#t,
|
|
2055
2059
|
this.#n
|
|
2056
2060
|
];
|
|
@@ -2060,7 +2064,7 @@ var wt = k(285), Tt = (e) => {
|
|
|
2060
2064
|
let e = this.toString(), t = this;
|
|
2061
2065
|
return t.#r = [e], t.type = null, t.#t = void 0, [
|
|
2062
2066
|
e,
|
|
2063
|
-
|
|
2067
|
+
Mt(this.toString()),
|
|
2064
2068
|
!1,
|
|
2065
2069
|
!1
|
|
2066
2070
|
];
|
|
@@ -2068,9 +2072,9 @@ var wt = k(285), Tt = (e) => {
|
|
|
2068
2072
|
let a = !n || e || t ? "" : this.#S(!0);
|
|
2069
2073
|
a === i && (a = ""), a && (i = `(?:${i})(?:${a})*?`);
|
|
2070
2074
|
let o = "";
|
|
2071
|
-
return o = this.type === "!" && this.#u ? (this.isStart() && !t ?
|
|
2075
|
+
return o = this.type === "!" && this.#u ? (this.isStart() && !t ? Bt : "") + Kt : r + i + (this.type === "!" ? "))" + (!this.isStart() || t || e ? "" : Bt) + "[^/]*?)" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && a ? ")" : this.type === "*" && a ? ")?" : `)${this.type}`), [
|
|
2072
2076
|
o,
|
|
2073
|
-
|
|
2077
|
+
Mt(i),
|
|
2074
2078
|
this.#t = !!this.#t,
|
|
2075
2079
|
this.#n
|
|
2076
2080
|
];
|
|
@@ -2086,51 +2090,51 @@ var wt = k(285), Tt = (e) => {
|
|
|
2086
2090
|
let r = !1, i = "", a = !1, o = !1;
|
|
2087
2091
|
for (let s = 0; s < e.length; s++) {
|
|
2088
2092
|
let c = e.charAt(s);
|
|
2089
|
-
if (r) r = !1, i += (
|
|
2093
|
+
if (r) r = !1, i += (Ut.has(c) ? "\\" : "") + c, o = !1;
|
|
2090
2094
|
else if (c !== "\\") {
|
|
2091
2095
|
if (c === "[") {
|
|
2092
|
-
let [n, r, c, l] =
|
|
2096
|
+
let [n, r, c, l] = jt(e, s);
|
|
2093
2097
|
if (c) {
|
|
2094
2098
|
i += n, a ||= r, s += c - 1, t ||= l, o = !1;
|
|
2095
2099
|
continue;
|
|
2096
2100
|
}
|
|
2097
2101
|
}
|
|
2098
|
-
if (c !== "*") o = !1, c === "?" ? (i +=
|
|
2102
|
+
if (c !== "*") o = !1, c === "?" ? (i += Wt, t = !0) : i += c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
2099
2103
|
else {
|
|
2100
2104
|
if (o) continue;
|
|
2101
|
-
o = !0, i += n && /^[*]+$/.test(e) ?
|
|
2105
|
+
o = !0, i += n && /^[*]+$/.test(e) ? Kt : Gt, t = !0;
|
|
2102
2106
|
}
|
|
2103
2107
|
} else s === e.length - 1 ? i += "\\\\" : r = !0;
|
|
2104
2108
|
}
|
|
2105
2109
|
return [
|
|
2106
2110
|
i,
|
|
2107
|
-
|
|
2111
|
+
Mt(e),
|
|
2108
2112
|
!!t,
|
|
2109
2113
|
a
|
|
2110
2114
|
];
|
|
2111
2115
|
}
|
|
2112
2116
|
};
|
|
2113
|
-
L =
|
|
2114
|
-
var R = (e, t, n = {}) => (
|
|
2115
|
-
let n =
|
|
2117
|
+
L = qt;
|
|
2118
|
+
var R = (e, t, n = {}) => (Dt(t), !(!n.nocomment && t.charAt(0) === "#") && new vn(t, n).match(e)), Jt = /^\*+([^+@!?\*\[\(]*)$/, Yt = (e) => (t) => !t.startsWith(".") && t.endsWith(e), Xt = (e) => (t) => t.endsWith(e), Zt = (e) => (e = e.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(e)), Qt = (e) => (e = e.toLowerCase(), (t) => t.toLowerCase().endsWith(e)), $t = /^\*+\.\*+$/, en = (e) => !e.startsWith(".") && e.includes("."), tn = (e) => e !== "." && e !== ".." && e.includes("."), nn = /^\.\*+$/, rn = (e) => e !== "." && e !== ".." && e.startsWith("."), an = /^\*+$/, on = (e) => e.length !== 0 && !e.startsWith("."), sn = (e) => e.length !== 0 && e !== "." && e !== "..", cn = /^\?+([^+@!?\*\[\(]*)?$/, ln = ([e, t = ""]) => {
|
|
2119
|
+
let n = pn([e]);
|
|
2116
2120
|
return t ? (t = t.toLowerCase(), (e) => n(e) && e.toLowerCase().endsWith(t)) : n;
|
|
2117
|
-
},
|
|
2118
|
-
let n =
|
|
2121
|
+
}, un = ([e, t = ""]) => {
|
|
2122
|
+
let n = mn([e]);
|
|
2119
2123
|
return t ? (t = t.toLowerCase(), (e) => n(e) && e.toLowerCase().endsWith(t)) : n;
|
|
2120
|
-
},
|
|
2121
|
-
let n =
|
|
2124
|
+
}, dn = ([e, t = ""]) => {
|
|
2125
|
+
let n = mn([e]);
|
|
2122
2126
|
return t ? (e) => n(e) && e.endsWith(t) : n;
|
|
2123
|
-
},
|
|
2124
|
-
let n =
|
|
2127
|
+
}, fn = ([e, t = ""]) => {
|
|
2128
|
+
let n = pn([e]);
|
|
2125
2129
|
return t ? (e) => n(e) && e.endsWith(t) : n;
|
|
2126
|
-
},
|
|
2130
|
+
}, pn = ([e]) => {
|
|
2127
2131
|
let t = e.length;
|
|
2128
2132
|
return (e) => e.length === t && !e.startsWith(".");
|
|
2129
|
-
},
|
|
2133
|
+
}, mn = ([e]) => {
|
|
2130
2134
|
let t = e.length;
|
|
2131
2135
|
return (e) => e.length === t && e !== "." && e !== "..";
|
|
2132
|
-
},
|
|
2133
|
-
R.sep =
|
|
2136
|
+
}, hn = typeof t == "object" && t ? typeof t.env == "object" && t.env && t.env.__MINIMATCH_TESTING_PLATFORM__ || t.platform : "posix";
|
|
2137
|
+
R.sep = hn === "win32" ? "\\" : "/";
|
|
2134
2138
|
var z = Symbol("globstar **");
|
|
2135
2139
|
R.GLOBSTAR = z, R.filter = (e, t = {}) => (n) => R(n, e, t);
|
|
2136
2140
|
var B = (e, t = {}) => Object.assign({}, e, t);
|
|
@@ -2165,12 +2169,12 @@ R.defaults = (e) => {
|
|
|
2165
2169
|
GLOBSTAR: z
|
|
2166
2170
|
});
|
|
2167
2171
|
};
|
|
2168
|
-
var
|
|
2169
|
-
R.braceExpand =
|
|
2170
|
-
let r = new
|
|
2172
|
+
var gn = (e, t = {}) => (Dt(e), t.nobrace || !/\{(?:(?!\{).)*\}/.test(e) ? [e] : Et(e));
|
|
2173
|
+
R.braceExpand = gn, R.makeRe = (e, t = {}) => new vn(e, t).makeRe(), R.match = (e, t, n = {}) => {
|
|
2174
|
+
let r = new vn(t, n);
|
|
2171
2175
|
return e = e.filter(((e) => r.match(e))), r.options.nonull && !e.length && e.push(t), e;
|
|
2172
2176
|
};
|
|
2173
|
-
var
|
|
2177
|
+
var _n = /[?*]|[+@!]\(.*?\)|\[|\]/, vn = class {
|
|
2174
2178
|
options;
|
|
2175
2179
|
set;
|
|
2176
2180
|
pattern;
|
|
@@ -2190,7 +2194,7 @@ var hn = /[?*]|[+@!]\(.*?\)|\[|\]/, gn = class {
|
|
|
2190
2194
|
maxGlobstarRecursion;
|
|
2191
2195
|
regexp;
|
|
2192
2196
|
constructor(e, t = {}) {
|
|
2193
|
-
|
|
2197
|
+
Dt(e), t ||= {}, this.options = t, this.maxGlobstarRecursion = t.maxGlobstarRecursion ?? 200, this.pattern = e, this.platform = t.platform || hn, this.isWindows = this.platform === "win32", this.windowsPathsNoEscape = !!t.windowsPathsNoEscape || !1 === t.allowWindowsEscape, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!t.preserveMultipleSlashes, this.regexp = null, this.negate = !1, this.nonegate = !!t.nonegate, this.comment = !1, this.empty = !1, this.partial = !!t.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = t.windowsNoMagicRoot === void 0 ? !(!this.isWindows || !this.nocase) : t.windowsNoMagicRoot, this.globSet = [], this.globParts = [], this.set = [], this.make();
|
|
2194
2198
|
}
|
|
2195
2199
|
hasMagic() {
|
|
2196
2200
|
if (this.options.magicalBraces && this.set.length > 1) return !0;
|
|
@@ -2207,7 +2211,7 @@ var hn = /[?*]|[+@!]\(.*?\)|\[|\]/, gn = class {
|
|
|
2207
2211
|
this.globParts = this.preprocess(n), this.debug(this.pattern, this.globParts);
|
|
2208
2212
|
let r = this.globParts.map(((e, t, n) => {
|
|
2209
2213
|
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
2210
|
-
let t = !(e[0] !== "" || e[1] !== "" || e[2] !== "?" &&
|
|
2214
|
+
let t = !(e[0] !== "" || e[1] !== "" || e[2] !== "?" && _n.test(e[2]) || _n.test(e[3])), n = /^[a-z]:/i.test(e[0]);
|
|
2211
2215
|
if (t) return [...e.slice(0, 4), ...e.slice(4).map(((e) => this.parse(e)))];
|
|
2212
2216
|
if (n) return [e[0], ...e.slice(1).map(((e) => this.parse(e)))];
|
|
2213
2217
|
}
|
|
@@ -2412,16 +2416,16 @@ var hn = /[?*]|[+@!]\(.*?\)|\[|\]/, gn = class {
|
|
|
2412
2416
|
throw Error("wtf?");
|
|
2413
2417
|
}
|
|
2414
2418
|
braceExpand() {
|
|
2415
|
-
return
|
|
2419
|
+
return gn(this.pattern, this.options);
|
|
2416
2420
|
}
|
|
2417
2421
|
parse(e) {
|
|
2418
|
-
|
|
2422
|
+
Dt(e);
|
|
2419
2423
|
let t = this.options;
|
|
2420
2424
|
if (e === "**") return z;
|
|
2421
2425
|
if (e === "") return "";
|
|
2422
2426
|
let n, r = null;
|
|
2423
|
-
(n = e.match(
|
|
2424
|
-
let i =
|
|
2427
|
+
(n = e.match(an)) ? r = t.dot ? sn : on : (n = e.match(Jt)) ? r = (t.nocase ? t.dot ? Qt : Zt : t.dot ? Xt : Yt)(n[1]) : (n = e.match(cn)) ? r = (t.nocase ? t.dot ? un : ln : t.dot ? dn : fn)(n) : (n = e.match($t)) ? r = t.dot ? tn : en : (n = e.match(nn)) && (r = rn);
|
|
2428
|
+
let i = qt.fromGlob(e, this.options).toMMPattern();
|
|
2425
2429
|
return r && typeof i == "object" && Reflect.defineProperty(i, "test", { value: r }), i;
|
|
2426
2430
|
}
|
|
2427
2431
|
makeRe() {
|
|
@@ -2471,26 +2475,26 @@ var hn = /[?*]|[+@!]\(.*?\)|\[|\]/, gn = class {
|
|
|
2471
2475
|
return R.defaults(e).Minimatch;
|
|
2472
2476
|
}
|
|
2473
2477
|
};
|
|
2474
|
-
function
|
|
2478
|
+
function yn(e, t = "") {
|
|
2475
2479
|
let n = /* @__PURE__ */ Error(`${t}Invalid response: ${e.status} ${e.statusText}`);
|
|
2476
2480
|
return n.status = e.status, n.response = e, n;
|
|
2477
2481
|
}
|
|
2478
2482
|
function V(e, t) {
|
|
2479
2483
|
let { status: n } = t;
|
|
2480
2484
|
if (n === 401 && e.digest) return t;
|
|
2481
|
-
if (n >= 400) throw
|
|
2485
|
+
if (n >= 400) throw yn(t);
|
|
2482
2486
|
return t;
|
|
2483
2487
|
}
|
|
2484
|
-
function
|
|
2488
|
+
function bn(e, t, n = !1) {
|
|
2485
2489
|
return n ? {
|
|
2486
2490
|
data: t,
|
|
2487
|
-
headers: e.headers ?
|
|
2491
|
+
headers: e.headers ? ht(e.headers) : {},
|
|
2488
2492
|
status: e.status,
|
|
2489
2493
|
statusText: e.statusText
|
|
2490
2494
|
} : t;
|
|
2491
2495
|
}
|
|
2492
|
-
R.AST =
|
|
2493
|
-
var
|
|
2496
|
+
R.AST = qt, R.Minimatch = vn, R.escape = (e, { windowsPathsNoEscape: t = !1 } = {}) => t ? e.replace(/[?*()[\]]/g, "[$&]") : e.replace(/[?*()[\]\\]/g, "\\$&"), R.unescape = Mt;
|
|
2497
|
+
var xn = (Sn = function(e, t, n, r = {}) {
|
|
2494
2498
|
let i = I({
|
|
2495
2499
|
url: M(e.remoteURL, j(t)),
|
|
2496
2500
|
method: "COPY",
|
|
@@ -2507,13 +2511,13 @@ var yn = (bn = function(e, t, n, r = {}) {
|
|
|
2507
2511
|
}, function() {
|
|
2508
2512
|
var e = [...arguments];
|
|
2509
2513
|
try {
|
|
2510
|
-
return Promise.resolve(
|
|
2514
|
+
return Promise.resolve(Sn.apply(this, e));
|
|
2511
2515
|
} catch (e) {
|
|
2512
2516
|
return Promise.reject(e);
|
|
2513
2517
|
}
|
|
2514
|
-
}),
|
|
2515
|
-
return
|
|
2516
|
-
},
|
|
2518
|
+
}), Sn, Cn = ":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", wn = RegExp("^[" + Cn + "][" + Cn + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), Tn = function(e) {
|
|
2519
|
+
return wn.exec(e) != null;
|
|
2520
|
+
}, En = [
|
|
2517
2521
|
"hasOwnProperty",
|
|
2518
2522
|
"toString",
|
|
2519
2523
|
"valueOf",
|
|
@@ -2521,11 +2525,11 @@ var yn = (bn = function(e, t, n, r = {}) {
|
|
|
2521
2525
|
"__defineSetter__",
|
|
2522
2526
|
"__lookupGetter__",
|
|
2523
2527
|
"__lookupSetter__"
|
|
2524
|
-
],
|
|
2528
|
+
], Dn = [
|
|
2525
2529
|
"__proto__",
|
|
2526
2530
|
"constructor",
|
|
2527
2531
|
"prototype"
|
|
2528
|
-
],
|
|
2532
|
+
], On = (e) => En.includes(e) ? "__" + e : e, kn = {
|
|
2529
2533
|
preserveOrder: !1,
|
|
2530
2534
|
attributeNamePrefix: "@_",
|
|
2531
2535
|
attributesGroupName: !1,
|
|
@@ -2568,14 +2572,14 @@ var yn = (bn = function(e, t, n, r = {}) {
|
|
|
2568
2572
|
maxNestedTags: 100,
|
|
2569
2573
|
strictReservedNames: !0,
|
|
2570
2574
|
jPath: !0,
|
|
2571
|
-
onDangerousProperty:
|
|
2575
|
+
onDangerousProperty: On
|
|
2572
2576
|
};
|
|
2573
|
-
function
|
|
2577
|
+
function An(e, t) {
|
|
2574
2578
|
if (typeof e != "string") return;
|
|
2575
2579
|
let n = e.toLowerCase();
|
|
2576
|
-
if (
|
|
2580
|
+
if (En.some(((e) => n === e.toLowerCase())) || Dn.some(((e) => n === e.toLowerCase()))) throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
2577
2581
|
}
|
|
2578
|
-
function
|
|
2582
|
+
function jn(e, t) {
|
|
2579
2583
|
return typeof e == "boolean" ? {
|
|
2580
2584
|
enabled: e,
|
|
2581
2585
|
maxEntitySize: 1e4,
|
|
@@ -2596,10 +2600,10 @@ function kn(e, t) {
|
|
|
2596
2600
|
allowedTags: e.allowedTags ?? null,
|
|
2597
2601
|
tagFilter: e.tagFilter ?? null,
|
|
2598
2602
|
appliesTo: e.appliesTo ?? "all"
|
|
2599
|
-
} :
|
|
2603
|
+
} : jn(!0);
|
|
2600
2604
|
}
|
|
2601
|
-
var
|
|
2602
|
-
let t = Object.assign({},
|
|
2605
|
+
var Mn = function(e) {
|
|
2606
|
+
let t = Object.assign({}, kn, e), n = [
|
|
2603
2607
|
{
|
|
2604
2608
|
value: t.attributeNamePrefix,
|
|
2605
2609
|
name: "attributeNamePrefix"
|
|
@@ -2621,9 +2625,9 @@ var An = function(e) {
|
|
|
2621
2625
|
name: "commentPropName"
|
|
2622
2626
|
}
|
|
2623
2627
|
];
|
|
2624
|
-
for (let { value: e, name: t } of n) e &&
|
|
2625
|
-
return t.onDangerousProperty === null && (t.onDangerousProperty =
|
|
2626
|
-
},
|
|
2628
|
+
for (let { value: e, name: t } of n) e && An(e, t);
|
|
2629
|
+
return t.onDangerousProperty === null && (t.onDangerousProperty = On), t.processEntities = jn(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;
|
|
2630
|
+
}, Nn = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", H = class {
|
|
2627
2631
|
constructor(e) {
|
|
2628
2632
|
this.tagname = e, this.child = [], this[":@"] = Object.create(null);
|
|
2629
2633
|
}
|
|
@@ -2637,16 +2641,16 @@ var An = function(e) {
|
|
|
2637
2641
|
}) : this.child.push({ [e.tagname]: e.child }), this.addStartIndex(t);
|
|
2638
2642
|
}
|
|
2639
2643
|
addStartIndex(e) {
|
|
2640
|
-
e !== void 0 && (this.child[this.child.length - 1][
|
|
2644
|
+
e !== void 0 && (this.child[this.child.length - 1][Nn] = { startIndex: e });
|
|
2641
2645
|
}
|
|
2642
2646
|
addEndIndex(e) {
|
|
2643
2647
|
let t = this.child[this.child.length - 1];
|
|
2644
|
-
t !== void 0 && t[
|
|
2648
|
+
t !== void 0 && t[Nn] !== void 0 && t[Nn].endIndex === void 0 && (t[Nn].endIndex = e);
|
|
2645
2649
|
}
|
|
2646
2650
|
static getMetaDataSymbol() {
|
|
2647
|
-
return
|
|
2651
|
+
return Nn;
|
|
2648
2652
|
}
|
|
2649
|
-
},
|
|
2653
|
+
}, Pn = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�", Fn = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", In = Fn + "\\-\\.\\d·̀-ͯ҇‿-⁀", Ln = (e, t, n = "") => {
|
|
2650
2654
|
let r = `[${e.replace(":", "")}][${t.replace(":", "")}]*`;
|
|
2651
2655
|
return {
|
|
2652
2656
|
name: RegExp(`^[${e}][${t}]*$`, n),
|
|
@@ -2655,15 +2659,15 @@ var An = function(e) {
|
|
|
2655
2659
|
nmToken: RegExp(`^[${t}]+$`, n),
|
|
2656
2660
|
nmTokens: RegExp(`^[${t}]+(?:\\s+[${t}]+)*$`, n)
|
|
2657
2661
|
};
|
|
2658
|
-
},
|
|
2662
|
+
}, Rn = Ln(Pn, Pn + "\\-\\.\\d·̀-ͯ‿-⁀"), zn = Ln(Fn, In, "u"), Bn = ":A-Za-z_", Vn = Ln(Bn, Bn + "\\-\\.\\d"), Hn = (e = "1.0", t = !1) => t ? Vn : e === "1.1" ? zn : Rn, Un = (e, { xmlVersion: t = "1.0", asciiOnly: n = !1 } = {}) => Hn(t, n).qName.test(e), Wn = [
|
|
2659
2663
|
"name",
|
|
2660
2664
|
"ncName",
|
|
2661
2665
|
"qName",
|
|
2662
2666
|
"nmToken",
|
|
2663
2667
|
"nmTokens"
|
|
2664
|
-
],
|
|
2665
|
-
if (!
|
|
2666
|
-
let i =
|
|
2668
|
+
], Gn = (e, { xmlVersion: t = "1.0", asciiOnly: n = !1, maxCacheSize: r = 2048 } = {}) => {
|
|
2669
|
+
if (!Wn.includes(e)) throw TypeError(`Unknown production "${e}". Must be one of: ${Wn.join(", ")}`);
|
|
2670
|
+
let i = Hn(t, n)[e], a = /* @__PURE__ */ new Map(), o = (e) => {
|
|
2667
2671
|
let t = a.get(e);
|
|
2668
2672
|
if (t !== void 0) return t;
|
|
2669
2673
|
let n = i.test(e);
|
|
@@ -2672,7 +2676,7 @@ var An = function(e) {
|
|
|
2672
2676
|
return o.reset = () => {
|
|
2673
2677
|
a = /* @__PURE__ */ new Map();
|
|
2674
2678
|
}, o;
|
|
2675
|
-
},
|
|
2679
|
+
}, Kn = class {
|
|
2676
2680
|
constructor(e, t) {
|
|
2677
2681
|
this.suppressValidationErr = !e, this.options = e, this.xmlVersion = t || 1;
|
|
2678
2682
|
}
|
|
@@ -2692,23 +2696,23 @@ var An = function(e) {
|
|
|
2692
2696
|
if (o ? e[t - 1] === "-" && e[t - 2] === "-" && (o = !1, i--) : i--, i === 0) break;
|
|
2693
2697
|
} else e[t] === "[" ? a = !0 : c += e[t];
|
|
2694
2698
|
} else {
|
|
2695
|
-
if (a &&
|
|
2699
|
+
if (a && qn(e, "!ENTITY", t)) {
|
|
2696
2700
|
let i, a;
|
|
2697
2701
|
if (t += 7, [i, a, t] = this.readEntityExp(e, t + 1, this.suppressValidationErr), a.indexOf("&") === -1) {
|
|
2698
2702
|
if (!1 !== this.options.enabled && this.options.maxEntityCount != null && r >= this.options.maxEntityCount) throw Error(`Entity count (${r + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
|
2699
2703
|
n[i] = a, r++;
|
|
2700
2704
|
}
|
|
2701
|
-
} else if (a &&
|
|
2705
|
+
} else if (a && qn(e, "!ELEMENT", t)) {
|
|
2702
2706
|
t += 8;
|
|
2703
2707
|
let { index: n } = this.readElementExp(e, t + 1);
|
|
2704
2708
|
t = n;
|
|
2705
|
-
} else if (a &&
|
|
2706
|
-
else if (a &&
|
|
2709
|
+
} else if (a && qn(e, "!ATTLIST", t)) t += 8;
|
|
2710
|
+
else if (a && qn(e, "!NOTATION", t)) {
|
|
2707
2711
|
t += 9;
|
|
2708
2712
|
let { index: n } = this.readNotationExp(e, t + 1, this.suppressValidationErr);
|
|
2709
2713
|
t = n;
|
|
2710
2714
|
} else {
|
|
2711
|
-
if (!
|
|
2715
|
+
if (!qn(e, "!--", t)) throw Error("Invalid DOCTYPE");
|
|
2712
2716
|
o = !0;
|
|
2713
2717
|
}
|
|
2714
2718
|
i++, c = "";
|
|
@@ -2726,7 +2730,7 @@ var An = function(e) {
|
|
|
2726
2730
|
let n = t = U(e, t);
|
|
2727
2731
|
for (; t < e.length && !/\s/.test(e[t]) && e[t] !== "\"" && e[t] !== "'";) t++;
|
|
2728
2732
|
let r = e.substring(n, t);
|
|
2729
|
-
if (
|
|
2733
|
+
if (Jn(r, { xmlVersion: this.xmlVersion }), t = U(e, t), !this.suppressValidationErr) {
|
|
2730
2734
|
if (e.substring(t, t + 6).toUpperCase() === "SYSTEM") throw Error("External entities are not supported");
|
|
2731
2735
|
if (e[t] === "%") throw Error("Parameter entities are not supported");
|
|
2732
2736
|
}
|
|
@@ -2742,7 +2746,7 @@ var An = function(e) {
|
|
|
2742
2746
|
let n = t = U(e, t);
|
|
2743
2747
|
for (; t < e.length && !/\s/.test(e[t]);) t++;
|
|
2744
2748
|
let r = e.substring(n, t);
|
|
2745
|
-
!this.suppressValidationErr &&
|
|
2749
|
+
!this.suppressValidationErr && Jn(r, { xmlVersion: this.xmlVersion }), t = U(e, t);
|
|
2746
2750
|
let i = e.substring(t, t + 6).toUpperCase();
|
|
2747
2751
|
if (!this.suppressValidationErr && i !== "SYSTEM" && i !== "PUBLIC") throw Error(`Expected SYSTEM or PUBLIC, found "${i}"`);
|
|
2748
2752
|
t += i.length, t = U(e, t);
|
|
@@ -2768,10 +2772,10 @@ var An = function(e) {
|
|
|
2768
2772
|
let n = t = U(e, t);
|
|
2769
2773
|
for (; t < e.length && !/\s/.test(e[t]);) t++;
|
|
2770
2774
|
let r = e.substring(n, t);
|
|
2771
|
-
if (!this.suppressValidationErr && !
|
|
2775
|
+
if (!this.suppressValidationErr && !Un(r, { xmlVersion: this.xmlVersion })) throw Error(`Invalid element name: "${r}"`);
|
|
2772
2776
|
let i = "";
|
|
2773
|
-
if (e[t = U(e, t)] === "E" &&
|
|
2774
|
-
else if (e[t] === "A" &&
|
|
2777
|
+
if (e[t = U(e, t)] === "E" && qn(e, "MPTY", t)) t += 4;
|
|
2778
|
+
else if (e[t] === "A" && qn(e, "NY", t)) t += 2;
|
|
2775
2779
|
else if (e[t] === "(") {
|
|
2776
2780
|
let n = ++t;
|
|
2777
2781
|
for (; t < e.length && e[t] !== ")";) t++;
|
|
@@ -2787,9 +2791,9 @@ var An = function(e) {
|
|
|
2787
2791
|
let n = t = U(e, t);
|
|
2788
2792
|
for (; t < e.length && !/\s/.test(e[t]);) t++;
|
|
2789
2793
|
let r = e.substring(n, t);
|
|
2790
|
-
for (
|
|
2794
|
+
for (Jn(r, { xmlVersion: this.xmlVersion }), n = t = U(e, t); t < e.length && !/\s/.test(e[t]);) t++;
|
|
2791
2795
|
let i = e.substring(n, t);
|
|
2792
|
-
if (!
|
|
2796
|
+
if (!Jn(i, { xmlVersion: this.xmlVersion })) throw Error(`Invalid attribute name: "${i}"`);
|
|
2793
2797
|
t = U(e, t);
|
|
2794
2798
|
let a = "";
|
|
2795
2799
|
if (e.substring(t, t + 8).toUpperCase() === "NOTATION") {
|
|
@@ -2800,7 +2804,7 @@ var An = function(e) {
|
|
|
2800
2804
|
let r = t;
|
|
2801
2805
|
for (; t < e.length && e[t] !== "|" && e[t] !== ")";) t++;
|
|
2802
2806
|
let i = e.substring(r, t);
|
|
2803
|
-
if (i = i.trim(), !
|
|
2807
|
+
if (i = i.trim(), !Jn(i, { xmlVersion: this.xmlVersion })) throw Error(`Invalid notation name: "${i}"`);
|
|
2804
2808
|
n.push(i), e[t] === "|" && (t++, t = U(e, t));
|
|
2805
2809
|
}
|
|
2806
2810
|
if (e[t] !== ")") throw Error("Unterminated list of notations");
|
|
@@ -2833,15 +2837,15 @@ var An = function(e) {
|
|
|
2833
2837
|
for (; t < e.length && /\s/.test(e[t]);) t++;
|
|
2834
2838
|
return t;
|
|
2835
2839
|
};
|
|
2836
|
-
function
|
|
2840
|
+
function qn(e, t, n) {
|
|
2837
2841
|
for (let r = 0; r < t.length; r++) if (t[r] !== e[n + r + 1]) return !1;
|
|
2838
2842
|
return !0;
|
|
2839
2843
|
}
|
|
2840
|
-
function
|
|
2841
|
-
if (
|
|
2844
|
+
function Jn(e, t) {
|
|
2845
|
+
if (Un(e, { xmlVersion: t })) return e;
|
|
2842
2846
|
throw Error(`Invalid entity name ${e}`);
|
|
2843
2847
|
}
|
|
2844
|
-
var
|
|
2848
|
+
var Yn = [
|
|
2845
2849
|
48,
|
|
2846
2850
|
1632,
|
|
2847
2851
|
1776,
|
|
@@ -2903,16 +2907,16 @@ var qn = [
|
|
|
2903
2907
|
124144,
|
|
2904
2908
|
125264,
|
|
2905
2909
|
130032
|
|
2906
|
-
],
|
|
2907
|
-
for (let e of
|
|
2910
|
+
], Xn = /* @__PURE__ */ new Map(), Zn = 1632, Qn = (/* @__PURE__ */ new Uint8Array(63904)).fill(255);
|
|
2911
|
+
for (let e of Yn) for (let t = 0; t < 10; t++) {
|
|
2908
2912
|
let n = e + t;
|
|
2909
|
-
n <= 65535 ?
|
|
2913
|
+
n <= 65535 ? Qn[n - Zn] = t : Xn.set(n, t);
|
|
2910
2914
|
}
|
|
2911
|
-
var
|
|
2915
|
+
var $n = /* @__PURE__ */ new Set([
|
|
2912
2916
|
8722,
|
|
2913
2917
|
65293,
|
|
2914
2918
|
65123
|
|
2915
|
-
]),
|
|
2919
|
+
]), er = /^[-+]?0x[a-fA-F0-9]+$/, tr = /^0b[01]+$/, nr = /^0o[0-7]+$/, rr = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, ir = {
|
|
2916
2920
|
hex: !0,
|
|
2917
2921
|
binary: !1,
|
|
2918
2922
|
octal: !1,
|
|
@@ -2922,8 +2926,8 @@ var Zn = /* @__PURE__ */ new Set([
|
|
|
2922
2926
|
infinity: "original",
|
|
2923
2927
|
unicode: !1
|
|
2924
2928
|
};
|
|
2925
|
-
function
|
|
2926
|
-
if (t = Object.assign({},
|
|
2929
|
+
function ar(e, t = {}) {
|
|
2930
|
+
if (t = Object.assign({}, ir, t), !e || typeof e != "string") return e;
|
|
2927
2931
|
let n = e.trim();
|
|
2928
2932
|
if (n.length === 0 || t.skipLike !== void 0 && t.skipLike.test(n)) return e;
|
|
2929
2933
|
if (n === "0" || t.unicode && (n = function(e) {
|
|
@@ -2934,8 +2938,8 @@ function rr(e, t = {}) {
|
|
|
2934
2938
|
for (let r = 0; r < t; r++) {
|
|
2935
2939
|
let i = e.charCodeAt(r);
|
|
2936
2940
|
if (!(i >= 48 && i <= 57 || i === 45)) {
|
|
2937
|
-
if (i <
|
|
2938
|
-
if (
|
|
2941
|
+
if (i < Zn) {
|
|
2942
|
+
if ($n.has(i)) {
|
|
2939
2943
|
n = r;
|
|
2940
2944
|
break;
|
|
2941
2945
|
}
|
|
@@ -2944,13 +2948,13 @@ function rr(e, t = {}) {
|
|
|
2944
2948
|
let t = e.charCodeAt(r + 1);
|
|
2945
2949
|
if (t >= 56320 && t <= 57343) {
|
|
2946
2950
|
let e = 65536 + (i - 55296 << 10) + (t - 56320);
|
|
2947
|
-
if (
|
|
2951
|
+
if (Xn.has(e)) {
|
|
2948
2952
|
n = r;
|
|
2949
2953
|
break;
|
|
2950
2954
|
}
|
|
2951
2955
|
}
|
|
2952
2956
|
}
|
|
2953
|
-
} else if (
|
|
2957
|
+
} else if (Qn[i - Zn] !== 255 || $n.has(i)) {
|
|
2954
2958
|
n = r;
|
|
2955
2959
|
break;
|
|
2956
2960
|
}
|
|
@@ -2965,15 +2969,15 @@ function rr(e, t = {}) {
|
|
|
2965
2969
|
r.push(e[i]);
|
|
2966
2970
|
continue;
|
|
2967
2971
|
}
|
|
2968
|
-
if (n <
|
|
2969
|
-
r.push(
|
|
2972
|
+
if (n < Zn) {
|
|
2973
|
+
r.push($n.has(n) ? "-" : e[i]);
|
|
2970
2974
|
continue;
|
|
2971
2975
|
}
|
|
2972
2976
|
if (n >= 55296 && n <= 56319) {
|
|
2973
2977
|
if (i + 1 < t) {
|
|
2974
2978
|
let t = e.charCodeAt(i + 1);
|
|
2975
2979
|
if (t >= 56320 && t <= 57343) {
|
|
2976
|
-
let e = 65536 + (n - 55296 << 10) + (t - 56320), a =
|
|
2980
|
+
let e = 65536 + (n - 55296 << 10) + (t - 56320), a = Xn.get(e);
|
|
2977
2981
|
if (a !== void 0) {
|
|
2978
2982
|
r.push(String.fromCharCode(a + 48)), i++;
|
|
2979
2983
|
continue;
|
|
@@ -2983,22 +2987,22 @@ function rr(e, t = {}) {
|
|
|
2983
2987
|
r.push(e[i]);
|
|
2984
2988
|
continue;
|
|
2985
2989
|
}
|
|
2986
|
-
if (
|
|
2990
|
+
if ($n.has(n)) {
|
|
2987
2991
|
r.push("-");
|
|
2988
2992
|
continue;
|
|
2989
2993
|
}
|
|
2990
|
-
let a =
|
|
2994
|
+
let a = Qn[n - Zn];
|
|
2991
2995
|
r.push(a === 255 ? e[i] : String.fromCharCode(a + 48));
|
|
2992
2996
|
}
|
|
2993
2997
|
return r.join("");
|
|
2994
2998
|
}(n), n === "0")) return 0;
|
|
2995
|
-
if (t.hex &&
|
|
2996
|
-
if (t.binary &&
|
|
2997
|
-
if (t.octal &&
|
|
2999
|
+
if (t.hex && er.test(n)) return sr(n, 16);
|
|
3000
|
+
if (t.binary && tr.test(n)) return sr(n, 2);
|
|
3001
|
+
if (t.octal && nr.test(n)) return sr(n, 8);
|
|
2998
3002
|
if (isFinite(n)) {
|
|
2999
3003
|
if (n.includes("e") || n.includes("E")) return function(e, t, n) {
|
|
3000
3004
|
if (!n.eNotation) return e;
|
|
3001
|
-
let r = t.match(
|
|
3005
|
+
let r = t.match(or);
|
|
3002
3006
|
if (r) {
|
|
3003
3007
|
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;
|
|
3004
3008
|
return o.length > 1 && s ? e : (o.length !== 1 || !r[3].startsWith(`.${a}`) && r[3][0] !== a) && o.length > 0 ? n.leadingZeros && !s ? (t = (r[1] || "") + r[3], Number(t)) : e : Number(t);
|
|
@@ -3006,7 +3010,7 @@ function rr(e, t = {}) {
|
|
|
3006
3010
|
return e;
|
|
3007
3011
|
}(e, n, t);
|
|
3008
3012
|
{
|
|
3009
|
-
let r =
|
|
3013
|
+
let r = rr.exec(n);
|
|
3010
3014
|
if (r) {
|
|
3011
3015
|
let i = r[1] || "", a = r[2], o = function(e) {
|
|
3012
3016
|
if (e && e.indexOf(".") !== -1) {
|
|
@@ -3039,15 +3043,15 @@ function rr(e, t = {}) {
|
|
|
3039
3043
|
}
|
|
3040
3044
|
}(e, Number(n), t);
|
|
3041
3045
|
}
|
|
3042
|
-
var
|
|
3043
|
-
function
|
|
3046
|
+
var or = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
|
3047
|
+
function sr(e, t) {
|
|
3044
3048
|
let n = e.trim();
|
|
3045
3049
|
if (t !== 2 && t !== 8 || (e = n.substring(2)), parseInt) return parseInt(e, t);
|
|
3046
3050
|
if (Number.parseInt) return Number.parseInt(e, t);
|
|
3047
3051
|
if (window && window.parseInt) return window.parseInt(e, t);
|
|
3048
3052
|
throw Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
|
3049
3053
|
}
|
|
3050
|
-
var
|
|
3054
|
+
var cr = class {
|
|
3051
3055
|
constructor(e) {
|
|
3052
3056
|
this._matcher = e;
|
|
3053
3057
|
}
|
|
@@ -3104,9 +3108,9 @@ var or = class {
|
|
|
3104
3108
|
matchesAny(e) {
|
|
3105
3109
|
return e.matchesAny(this._matcher);
|
|
3106
3110
|
}
|
|
3107
|
-
},
|
|
3111
|
+
}, lr = class {
|
|
3108
3112
|
constructor(e = {}) {
|
|
3109
|
-
this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new
|
|
3113
|
+
this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new cr(this), this._keptAttrs = [];
|
|
3110
3114
|
}
|
|
3111
3115
|
push(e, t = null, n = null, r = null) {
|
|
3112
3116
|
this._pathStringCache = null, this.path.length > 0 && (this.path[this.path.length - 1].values = void 0);
|
|
@@ -3257,7 +3261,7 @@ var or = class {
|
|
|
3257
3261
|
readOnly() {
|
|
3258
3262
|
return this._view;
|
|
3259
3263
|
}
|
|
3260
|
-
},
|
|
3264
|
+
}, ur = class {
|
|
3261
3265
|
constructor(e, t = {}, n) {
|
|
3262
3266
|
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));
|
|
3263
3267
|
}
|
|
@@ -3315,7 +3319,7 @@ var or = class {
|
|
|
3315
3319
|
toString() {
|
|
3316
3320
|
return this.pattern;
|
|
3317
3321
|
}
|
|
3318
|
-
},
|
|
3322
|
+
}, dr = class {
|
|
3319
3323
|
constructor() {
|
|
3320
3324
|
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;
|
|
3321
3325
|
}
|
|
@@ -3372,7 +3376,7 @@ var or = class {
|
|
|
3372
3376
|
for (let t = 0; t < this._deepWildcards.length; t++) if (e.matches(this._deepWildcards[t])) return this._deepWildcards[t];
|
|
3373
3377
|
return null;
|
|
3374
3378
|
}
|
|
3375
|
-
},
|
|
3379
|
+
}, fr = {
|
|
3376
3380
|
cent: "¢",
|
|
3377
3381
|
pound: "£",
|
|
3378
3382
|
curren: "¤",
|
|
@@ -3388,13 +3392,13 @@ var or = class {
|
|
|
3388
3392
|
won: "₩",
|
|
3389
3393
|
yuan: "¥",
|
|
3390
3394
|
cedil: "¸"
|
|
3391
|
-
},
|
|
3395
|
+
}, pr = {
|
|
3392
3396
|
amp: "&",
|
|
3393
3397
|
apos: "'",
|
|
3394
3398
|
gt: ">",
|
|
3395
3399
|
lt: "<",
|
|
3396
3400
|
quot: "\""
|
|
3397
|
-
},
|
|
3401
|
+
}, mr = {
|
|
3398
3402
|
nbsp: "\xA0",
|
|
3399
3403
|
copy: "©",
|
|
3400
3404
|
reg: "®",
|
|
@@ -3415,17 +3419,17 @@ var or = class {
|
|
|
3415
3419
|
frac12: "½",
|
|
3416
3420
|
frac14: "¼",
|
|
3417
3421
|
frac34: "¾"
|
|
3418
|
-
},
|
|
3422
|
+
}, hr = Object.freeze({
|
|
3419
3423
|
ALLOW: "allow",
|
|
3420
3424
|
BLOCK: "block",
|
|
3421
3425
|
THROW: "throw"
|
|
3422
|
-
}),
|
|
3423
|
-
function
|
|
3426
|
+
}), gr = /* @__PURE__ */ new Set("!?\\\\/[]$%{}^&*()<>|+");
|
|
3427
|
+
function _r(e) {
|
|
3424
3428
|
if (e[0] === "#") throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);
|
|
3425
|
-
for (let t of e) if (
|
|
3429
|
+
for (let t of e) if (gr.has(t)) throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);
|
|
3426
3430
|
return e;
|
|
3427
3431
|
}
|
|
3428
|
-
function
|
|
3432
|
+
function vr(...e) {
|
|
3429
3433
|
let t = Object.create(null);
|
|
3430
3434
|
for (let n of e) if (n) for (let e of Object.keys(n)) {
|
|
3431
3435
|
let r = n[e];
|
|
@@ -3437,19 +3441,19 @@ function gr(...e) {
|
|
|
3437
3441
|
}
|
|
3438
3442
|
return t;
|
|
3439
3443
|
}
|
|
3440
|
-
var
|
|
3444
|
+
var yr = "external", br = "base", xr = "all", W = Object.freeze({
|
|
3441
3445
|
allow: 0,
|
|
3442
3446
|
leave: 1,
|
|
3443
3447
|
remove: 2,
|
|
3444
3448
|
throw: 3
|
|
3445
|
-
}),
|
|
3449
|
+
}), Sr = /* @__PURE__ */ new Set([
|
|
3446
3450
|
9,
|
|
3447
3451
|
10,
|
|
3448
3452
|
13
|
|
3449
|
-
]),
|
|
3453
|
+
]), Cr = class {
|
|
3450
3454
|
constructor(e = {}) {
|
|
3451
3455
|
var t;
|
|
3452
|
-
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 = (t = this._limit.applyLimitsTo ??
|
|
3456
|
+
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 = (t = this._limit.applyLimitsTo ?? yr) && t !== yr ? t === xr ? /* @__PURE__ */ new Set([xr]) : t === br ? /* @__PURE__ */ new Set([br]) : Array.isArray(t) ? new Set(t) : /* @__PURE__ */ new Set([yr]) : /* @__PURE__ */ new Set([yr]), this._numericAllowed = e.numericAllowed ?? !0, this._baseMap = vr(pr, 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 : []);
|
|
3453
3457
|
let n = function(e) {
|
|
3454
3458
|
if (!e) return {
|
|
3455
3459
|
xmlVersion: 1,
|
|
@@ -3468,23 +3472,23 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
3468
3472
|
_applyRegistrationHook(e, t, n, r) {
|
|
3469
3473
|
if (!e) return !0;
|
|
3470
3474
|
let i = e(t, n);
|
|
3471
|
-
if (i ===
|
|
3472
|
-
if (i ===
|
|
3475
|
+
if (i === hr.BLOCK) return !1;
|
|
3476
|
+
if (i === hr.THROW) throw Error(`[EntityDecoder] Registration of ${r} entity "&${t};" was rejected by hook`);
|
|
3473
3477
|
return !0;
|
|
3474
3478
|
}
|
|
3475
3479
|
setExternalEntities(e) {
|
|
3476
|
-
if (e) for (let t of Object.keys(e))
|
|
3477
|
-
if (!this._onExternalEntity) return void (this._externalMap =
|
|
3478
|
-
let t =
|
|
3480
|
+
if (e) for (let t of Object.keys(e)) _r(t);
|
|
3481
|
+
if (!this._onExternalEntity) return void (this._externalMap = vr(e));
|
|
3482
|
+
let t = vr(e), n = Object.create(null);
|
|
3479
3483
|
for (let [e, r] of Object.entries(t)) this._applyRegistrationHook(this._onExternalEntity, e, r, "external") && (n[e] = r);
|
|
3480
3484
|
this._externalMap = n;
|
|
3481
3485
|
}
|
|
3482
3486
|
addExternalEntity(e, t) {
|
|
3483
|
-
|
|
3487
|
+
_r(e), typeof t == "string" && t.indexOf("&") === -1 && this._applyRegistrationHook(this._onExternalEntity, e, t, "external") && (this._externalMap[e] = t);
|
|
3484
3488
|
}
|
|
3485
3489
|
addInputEntities(e) {
|
|
3486
|
-
if (this._totalExpansions = 0, this._expandedLength = 0, !this._onInputEntity) return void (this._inputMap =
|
|
3487
|
-
let t =
|
|
3490
|
+
if (this._totalExpansions = 0, this._expandedLength = 0, !this._onInputEntity) return void (this._inputMap = vr(e));
|
|
3491
|
+
let t = vr(e), n = Object.create(null);
|
|
3488
3492
|
for (let [e, r] of Object.entries(t)) this._applyRegistrationHook(this._onInputEntity, e, r, "input") && (n[e] = r);
|
|
3489
3493
|
this._inputMap = n;
|
|
3490
3494
|
}
|
|
@@ -3514,7 +3518,7 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
3514
3518
|
continue;
|
|
3515
3519
|
}
|
|
3516
3520
|
let u, d;
|
|
3517
|
-
if (this._removeSet.has(l)) u = "", d === void 0 && (d =
|
|
3521
|
+
if (this._removeSet.has(l)) u = "", d === void 0 && (d = yr);
|
|
3518
3522
|
else {
|
|
3519
3523
|
if (this._leaveSet.has(l)) {
|
|
3520
3524
|
a++;
|
|
@@ -3526,7 +3530,7 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
3526
3530
|
a++;
|
|
3527
3531
|
continue;
|
|
3528
3532
|
}
|
|
3529
|
-
u = e, d =
|
|
3533
|
+
u = e, d = br;
|
|
3530
3534
|
} else {
|
|
3531
3535
|
let e = this._resolveName(l);
|
|
3532
3536
|
u = e?.value, d = e?.tier;
|
|
@@ -3547,22 +3551,22 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
3547
3551
|
return this._postCheck(l, t);
|
|
3548
3552
|
}
|
|
3549
3553
|
_tierCounts(e) {
|
|
3550
|
-
return !!this._limitTiers.has(
|
|
3554
|
+
return !!this._limitTiers.has(xr) || this._limitTiers.has(e);
|
|
3551
3555
|
}
|
|
3552
3556
|
_resolveName(e) {
|
|
3553
3557
|
return e in this._inputMap ? {
|
|
3554
3558
|
value: this._inputMap[e],
|
|
3555
|
-
tier:
|
|
3559
|
+
tier: yr
|
|
3556
3560
|
} : e in this._externalMap ? {
|
|
3557
3561
|
value: this._externalMap[e],
|
|
3558
|
-
tier:
|
|
3562
|
+
tier: yr
|
|
3559
3563
|
} : e in this._baseMap ? {
|
|
3560
3564
|
value: this._baseMap[e],
|
|
3561
|
-
tier:
|
|
3565
|
+
tier: br
|
|
3562
3566
|
} : void 0;
|
|
3563
3567
|
}
|
|
3564
3568
|
_classifyNCR(e) {
|
|
3565
|
-
return e === 0 ? this._ncrNullLevel : e >= 55296 && e <= 57343 || this._ncrXmlVersion === 1 && e >= 1 && e <= 31 && !
|
|
3569
|
+
return e === 0 ? this._ncrNullLevel : e >= 55296 && e <= 57343 || this._ncrXmlVersion === 1 && e >= 1 && e <= 31 && !Sr.has(e) ? W.remove : -1;
|
|
3566
3570
|
}
|
|
3567
3571
|
_applyNCRAction(e, t, n) {
|
|
3568
3572
|
switch (e) {
|
|
@@ -3581,7 +3585,7 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
3581
3585
|
let i = r === -1 ? this._ncrOnLevel : Math.max(this._ncrOnLevel, r);
|
|
3582
3586
|
return this._applyNCRAction(i, e, n);
|
|
3583
3587
|
}
|
|
3584
|
-
},
|
|
3588
|
+
}, wr = [
|
|
3585
3589
|
{
|
|
3586
3590
|
id: "sql-block-comment-open",
|
|
3587
3591
|
description: "SQL block comment open: /* ... */ — unusual in legitimate user text",
|
|
@@ -3657,8 +3661,8 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
3657
3661
|
description: "INFORMATION_SCHEMA — reconnaissance query for table/column enumeration",
|
|
3658
3662
|
pattern: /\bINFORMATION_SCHEMA\b/i
|
|
3659
3663
|
}
|
|
3660
|
-
],
|
|
3661
|
-
...
|
|
3664
|
+
], Tr = [
|
|
3665
|
+
...wr,
|
|
3662
3666
|
{
|
|
3663
3667
|
id: "sql-line-comment",
|
|
3664
3668
|
description: "SQL line comment: -- followed by whitespace or end of string",
|
|
@@ -3674,7 +3678,7 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
3674
3678
|
description: "Hex-encoded string injection: 0x41414141 style (MySQL)",
|
|
3675
3679
|
pattern: /\b0x[0-9a-f]{4,}/i
|
|
3676
3680
|
}
|
|
3677
|
-
],
|
|
3681
|
+
], Er = [
|
|
3678
3682
|
{
|
|
3679
3683
|
id: "html-script-open",
|
|
3680
3684
|
description: "<script opening tag",
|
|
@@ -3760,7 +3764,7 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
3760
3764
|
description: "<form tag — can be used for phishing / credential harvesting injection",
|
|
3761
3765
|
pattern: /<form[\s>/]/i
|
|
3762
3766
|
}
|
|
3763
|
-
],
|
|
3767
|
+
], Dr = [
|
|
3764
3768
|
{
|
|
3765
3769
|
id: "xml-cdata-injection",
|
|
3766
3770
|
description: "CDATA section injection: <![CDATA[ breaks out of text node context",
|
|
@@ -3821,7 +3825,7 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
3821
3825
|
description: "?> closes an enclosing processing instruction",
|
|
3822
3826
|
pattern: /\?>/
|
|
3823
3827
|
}
|
|
3824
|
-
],
|
|
3828
|
+
], Or = [
|
|
3825
3829
|
{
|
|
3826
3830
|
id: "svg-script-element",
|
|
3827
3831
|
description: "<script element inside SVG executes JavaScript",
|
|
@@ -3887,7 +3891,7 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
3887
3891
|
description: "style= attribute containing javascript: (e.g. background:url(javascript:...))",
|
|
3888
3892
|
pattern: /style\s*=[\s\S]{0,60}javascript\s*:/i
|
|
3889
3893
|
}
|
|
3890
|
-
],
|
|
3894
|
+
], kr = [
|
|
3891
3895
|
{
|
|
3892
3896
|
id: "shell-path-traversal-unix",
|
|
3893
3897
|
description: "Unix path traversal: ../ — climbing the directory tree",
|
|
@@ -3978,7 +3982,7 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
3978
3982
|
description: "curl/wget with URL or flags — can exfiltrate data or download payloads",
|
|
3979
3983
|
pattern: /\b(?:curl|wget)\s+(?:https?:\/\/|ftp:\/\/|-)/i
|
|
3980
3984
|
}
|
|
3981
|
-
],
|
|
3985
|
+
], Ar = [
|
|
3982
3986
|
{
|
|
3983
3987
|
id: "redos-nested-quantifier-plus",
|
|
3984
3988
|
description: "Nested + quantifier inside a group with outer quantifier: (a+)+, (.+b)*, etc.",
|
|
@@ -4019,7 +4023,7 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
4019
4023
|
description: "Long alternation with many similar branches — polynomial backtracking risk",
|
|
4020
4024
|
pattern: /\([^)]{0,200}(?:\|[^|)]{0,50}){9,}\)/
|
|
4021
4025
|
}
|
|
4022
|
-
], G = "[\"'\\s]*:",
|
|
4026
|
+
], G = "[\"'\\s]*:", jr = [
|
|
4023
4027
|
{
|
|
4024
4028
|
id: "nosql-where-operator",
|
|
4025
4029
|
description: "$where — executes arbitrary JavaScript server-side in MongoDB",
|
|
@@ -4100,7 +4104,7 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
4100
4104
|
description: "[\"__proto__\"] — bracket-notation prototype pollution",
|
|
4101
4105
|
pattern: /\[["']__proto__["']\]/
|
|
4102
4106
|
}
|
|
4103
|
-
],
|
|
4107
|
+
], Mr = [
|
|
4104
4108
|
{
|
|
4105
4109
|
id: "log-crlf-injection",
|
|
4106
4110
|
description: "CRLF injection: literal \\r or \\n embeds fake log lines",
|
|
@@ -4162,7 +4166,7 @@ var _r = "external", vr = "base", yr = "all", W = Object.freeze({
|
|
|
4162
4166
|
pattern: /\x1b\[/
|
|
4163
4167
|
}
|
|
4164
4168
|
];
|
|
4165
|
-
function
|
|
4169
|
+
function Nr(e, t) {
|
|
4166
4170
|
let n = t.label ?? "CUSTOM";
|
|
4167
4171
|
for (let r of t) if (r.pattern.test(e)) return {
|
|
4168
4172
|
context: n,
|
|
@@ -4172,7 +4176,7 @@ function jr(e, t) {
|
|
|
4172
4176
|
};
|
|
4173
4177
|
return null;
|
|
4174
4178
|
}
|
|
4175
|
-
function
|
|
4179
|
+
function Pr(e, t) {
|
|
4176
4180
|
(function(e) {
|
|
4177
4181
|
if (typeof e != "string") throw TypeError("is-unsafe: first argument must be a string, got " + typeof e);
|
|
4178
4182
|
})(e), function(e) {
|
|
@@ -4197,10 +4201,10 @@ function Mr(e, t) {
|
|
|
4197
4201
|
};
|
|
4198
4202
|
}(t);
|
|
4199
4203
|
if (r) return r.test(e);
|
|
4200
|
-
for (let t of n) if (
|
|
4204
|
+
for (let t of n) if (Nr(e, t) !== null) return !0;
|
|
4201
4205
|
return !1;
|
|
4202
4206
|
}
|
|
4203
|
-
function
|
|
4207
|
+
function Fr(e, t) {
|
|
4204
4208
|
if (!e) return {};
|
|
4205
4209
|
let n = t.attributesGroupName ? e[t.attributesGroupName] : e;
|
|
4206
4210
|
if (!n) return {};
|
|
@@ -4208,7 +4212,7 @@ function Nr(e, t) {
|
|
|
4208
4212
|
for (let e in n) e.startsWith(t.attributeNamePrefix) ? r[e.substring(t.attributeNamePrefix.length)] = n[e] : r[e] = n[e];
|
|
4209
4213
|
return r;
|
|
4210
4214
|
}
|
|
4211
|
-
function
|
|
4215
|
+
function Ir(e) {
|
|
4212
4216
|
if (!e || typeof e != "string") return;
|
|
4213
4217
|
let t = e.indexOf(":");
|
|
4214
4218
|
if (t !== -1 && t > 0) {
|
|
@@ -4216,28 +4220,28 @@ function Pr(e) {
|
|
|
4216
4220
|
if (n !== "xmlns") return n;
|
|
4217
4221
|
}
|
|
4218
4222
|
}
|
|
4219
|
-
|
|
4220
|
-
HTML:
|
|
4221
|
-
XML:
|
|
4222
|
-
SVG:
|
|
4223
|
-
SQL:
|
|
4224
|
-
"SQL-STRICT":
|
|
4225
|
-
SHELL:
|
|
4226
|
-
REDOS:
|
|
4227
|
-
NOSQL:
|
|
4228
|
-
LOG:
|
|
4223
|
+
Er.label = "HTML", Dr.label = "XML", Or.label = "SVG", wr.label = "SQL", Tr.label = "SQL-STRICT", kr.label = "SHELL", Ar.label = "REDOS", jr.label = "NOSQL", Mr.label = "LOG", Object.freeze({
|
|
4224
|
+
HTML: Er,
|
|
4225
|
+
XML: Dr,
|
|
4226
|
+
SVG: Or,
|
|
4227
|
+
SQL: wr,
|
|
4228
|
+
"SQL-STRICT": Tr,
|
|
4229
|
+
SHELL: kr,
|
|
4230
|
+
REDOS: Ar,
|
|
4231
|
+
NOSQL: jr,
|
|
4232
|
+
LOG: Mr
|
|
4229
4233
|
});
|
|
4230
|
-
var
|
|
4234
|
+
var Lr = class {
|
|
4231
4235
|
constructor(e, t) {
|
|
4232
4236
|
var n;
|
|
4233
|
-
this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.parseXml =
|
|
4237
|
+
this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = Hr, this.parseTextData = Rr, this.resolveNameSpace = zr, this.buildAttributesMap = Vr, this.isItStopNode = Kr, this.replaceEntitiesValue = Wr, this.readStopNodeData = Xr, this.saveTextToParentTag = Gr, this.addChild = Ur, this.ignoreAttributesFn = typeof (n = this.options.ignoreAttributes) == "function" ? n : Array.isArray(n) ? (e) => {
|
|
4234
4238
|
for (let t of n) if (typeof t == "string" && e === t || t instanceof RegExp && t.test(e)) return !0;
|
|
4235
4239
|
} : () => !1, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.doctypefound = !1;
|
|
4236
|
-
let r = { ...
|
|
4240
|
+
let r = { ...pr };
|
|
4237
4241
|
this.options.entityDecoder ? this.entityDecoder = this.options.entityDecoder : (typeof this.options.htmlEntities == "object" ? r = this.options.htmlEntities : !0 === this.options.htmlEntities && (r = {
|
|
4238
|
-
...
|
|
4239
|
-
...
|
|
4240
|
-
}), this.entityDecoder = new
|
|
4242
|
+
...mr,
|
|
4243
|
+
...fr
|
|
4244
|
+
}), this.entityDecoder = new Cr({
|
|
4241
4245
|
namedEntities: {
|
|
4242
4246
|
...r,
|
|
4243
4247
|
...t
|
|
@@ -4248,27 +4252,27 @@ var Fr = class {
|
|
|
4248
4252
|
maxExpandedLength: this.options.processEntities.maxExpandedLength,
|
|
4249
4253
|
applyLimitsTo: this.options.processEntities.appliesTo
|
|
4250
4254
|
},
|
|
4251
|
-
onInputEntity: (e, t) =>
|
|
4252
|
-
})), this.matcher = new
|
|
4255
|
+
onInputEntity: (e, t) => Pr(t, [Er, Dr]) ? hr.BLOCK : hr.ALLOW
|
|
4256
|
+
})), this.matcher = new lr(), this.readonlyMatcher = this.matcher.readOnly(), this.isCurrentNodeStopNode = !1, this.stopNodeExpressionsSet = new dr();
|
|
4253
4257
|
let i = this.options.stopNodes;
|
|
4254
4258
|
if (i && i.length > 0) {
|
|
4255
4259
|
for (let e = 0; e < i.length; e++) {
|
|
4256
4260
|
let t = i[e];
|
|
4257
|
-
typeof t == "string" ? this.stopNodeExpressionsSet.add(new
|
|
4261
|
+
typeof t == "string" ? this.stopNodeExpressionsSet.add(new ur(t)) : t instanceof ur && this.stopNodeExpressionsSet.add(t);
|
|
4258
4262
|
}
|
|
4259
4263
|
this.stopNodeExpressionsSet.seal();
|
|
4260
4264
|
}
|
|
4261
4265
|
}
|
|
4262
4266
|
};
|
|
4263
|
-
function
|
|
4267
|
+
function Rr(e, t, n, r, i, a, o) {
|
|
4264
4268
|
let s = this.options;
|
|
4265
4269
|
if (e !== void 0 && (s.trimValues && !r && (e = e.trim()), e.length > 0)) {
|
|
4266
4270
|
o || (e = this.replaceEntitiesValue(e, t, n));
|
|
4267
4271
|
let r = s.jPath ? n.toString() : n, c = s.tagValueProcessor(t, e, r, i, a);
|
|
4268
|
-
return c == null ? e : typeof c != typeof e || c !== e ? c : s.trimValues || e.trim() === e ?
|
|
4272
|
+
return c == null ? e : typeof c != typeof e || c !== e ? c : s.trimValues || e.trim() === e ? Zr(e, s.parseTagValue, s.numberParseOptions) : e;
|
|
4269
4273
|
}
|
|
4270
4274
|
}
|
|
4271
|
-
function
|
|
4275
|
+
function zr(e) {
|
|
4272
4276
|
if (this.options.removeNSPrefix) {
|
|
4273
4277
|
let t = e.split(":"), n = e.charAt(0) === "/" ? "/" : "";
|
|
4274
4278
|
if (t[0] === "xmlns") return "";
|
|
@@ -4276,8 +4280,8 @@ function Lr(e) {
|
|
|
4276
4280
|
}
|
|
4277
4281
|
return e;
|
|
4278
4282
|
}
|
|
4279
|
-
var
|
|
4280
|
-
function
|
|
4283
|
+
var Br = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
|
|
4284
|
+
function Vr(e, t, n, r = !1) {
|
|
4281
4285
|
let i = this.options;
|
|
4282
4286
|
if (!0 === r || !0 !== i.ignoreAttributes && typeof e == "string") {
|
|
4283
4287
|
let r = function(e, t) {
|
|
@@ -4290,7 +4294,7 @@ function zr(e, t, n, r = !1) {
|
|
|
4290
4294
|
n.push(i), r = t.exec(e);
|
|
4291
4295
|
}
|
|
4292
4296
|
return n;
|
|
4293
|
-
}(e,
|
|
4297
|
+
}(e, Br), a = r.length, o = {}, s = Array(a), c = !1, l = {};
|
|
4294
4298
|
for (let e = 0; e < a; e++) {
|
|
4295
4299
|
let t = this.resolveNameSpace(r[e][1]), a = r[e][4];
|
|
4296
4300
|
if (t.length && a !== void 0) {
|
|
@@ -4305,9 +4309,9 @@ function zr(e, t, n, r = !1) {
|
|
|
4305
4309
|
if (this.ignoreAttributesFn(t, u)) continue;
|
|
4306
4310
|
let n = i.attributeNamePrefix + t;
|
|
4307
4311
|
if (t.length) {
|
|
4308
|
-
if (i.transformAttributeName && (n = i.transformAttributeName(n)), n =
|
|
4312
|
+
if (i.transformAttributeName && (n = i.transformAttributeName(n)), n = $r(n, i), r[e][4] !== void 0) {
|
|
4309
4313
|
let r = s[e], a = i.attributeValueProcessor(t, r, u);
|
|
4310
|
-
o[n] = a == null ? r : typeof a != typeof r || a !== r ? a :
|
|
4314
|
+
o[n] = a == null ? r : typeof a != typeof r || a !== r ? a : Zr(r, i.parseAttributeValue, i.numberParseOptions), d = !0;
|
|
4311
4315
|
} else i.allowBooleanAttributes && (o[n] = !0, d = !0);
|
|
4312
4316
|
}
|
|
4313
4317
|
}
|
|
@@ -4319,25 +4323,25 @@ function zr(e, t, n, r = !1) {
|
|
|
4319
4323
|
return o;
|
|
4320
4324
|
}
|
|
4321
4325
|
}
|
|
4322
|
-
var
|
|
4326
|
+
var Hr = function(e) {
|
|
4323
4327
|
e = e.replace(/\r\n?/g, "\n");
|
|
4324
4328
|
let t = new H("!xml"), n = t, r = "";
|
|
4325
4329
|
this.matcher.reset(), this.entityDecoder.reset(), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.doctypefound = !1;
|
|
4326
|
-
let i = this.options, a = new
|
|
4330
|
+
let i = this.options, a = new Kn(i.processEntities), o = e.length;
|
|
4327
4331
|
for (let s = 0; s < o; s++) if (e[s] === "<") {
|
|
4328
4332
|
let c = e.charCodeAt(s + 1);
|
|
4329
4333
|
if (c === 47) {
|
|
4330
|
-
let a =
|
|
4334
|
+
let a = qr(e, ">", s, "Closing Tag is not closed."), o = e.substring(s + 2, a).trim();
|
|
4331
4335
|
if (i.removeNSPrefix) {
|
|
4332
4336
|
let e = o.indexOf(":");
|
|
4333
4337
|
e !== -1 && (o = o.substr(e + 1));
|
|
4334
4338
|
}
|
|
4335
|
-
o =
|
|
4339
|
+
o = Qr(i.transformTagName, o, "", i).tagName, n && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher));
|
|
4336
4340
|
let c = this.matcher.getCurrentTag();
|
|
4337
4341
|
if (o && i.unpairedTagsSet.has(o)) throw Error(`Unpaired tag can not be used as closing tag: </${o}>`);
|
|
4338
4342
|
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;
|
|
4339
4343
|
} else if (c === 63) {
|
|
4340
|
-
let t =
|
|
4344
|
+
let t = Yr(e, s, !1, "?>");
|
|
4341
4345
|
if (!t) throw Error("Pi Tag is not closed.");
|
|
4342
4346
|
r = this.saveTextToParentTag(r, n, this.readonlyMatcher);
|
|
4343
4347
|
let o = this.buildAttributesMap(t.tagExp, this.matcher, t.tagName, !0);
|
|
@@ -4351,7 +4355,7 @@ var Br = function(e) {
|
|
|
4351
4355
|
}
|
|
4352
4356
|
s = t.closeIndex + 1;
|
|
4353
4357
|
} else if (c === 33 && e.charCodeAt(s + 2) === 45 && e.charCodeAt(s + 3) === 45) {
|
|
4354
|
-
let t =
|
|
4358
|
+
let t = qr(e, "-->", s + 4, "Comment is not closed.");
|
|
4355
4359
|
if (i.commentPropName) {
|
|
4356
4360
|
let a = e.substring(s + 4, t - 2);
|
|
4357
4361
|
r = this.saveTextToParentTag(r, n, this.readonlyMatcher), n.add(i.commentPropName, [{ [i.textNodeName]: a }]);
|
|
@@ -4363,25 +4367,25 @@ var Br = function(e) {
|
|
|
4363
4367
|
let t = a.readDocType(e, s);
|
|
4364
4368
|
this.entityDecoder.addInputEntities(t.entities), s = t.i;
|
|
4365
4369
|
} else if (c === 33 && e.charCodeAt(s + 2) === 91) {
|
|
4366
|
-
let t =
|
|
4370
|
+
let t = qr(e, "]]>", s, "CDATA is not closed.") - 2, a = e.substring(s + 9, t);
|
|
4367
4371
|
r = this.saveTextToParentTag(r, n, this.readonlyMatcher);
|
|
4368
4372
|
let o = this.parseTextData(a, n.tagname, this.readonlyMatcher, !0, !1, !0, !0);
|
|
4369
4373
|
o ??= "", i.cdataPropName ? n.add(i.cdataPropName, [{ [i.textNodeName]: a }]) : n.add(i.textNodeName, o), s = t + 2;
|
|
4370
4374
|
} else {
|
|
4371
|
-
let a =
|
|
4375
|
+
let a = Yr(e, s, i.removeNSPrefix);
|
|
4372
4376
|
if (!a) {
|
|
4373
4377
|
let t = e.substring(Math.max(0, s - 50), Math.min(o, s + 50));
|
|
4374
4378
|
throw Error(`readTagExp returned undefined at position ${s}. Context: "${t}"`);
|
|
4375
4379
|
}
|
|
4376
4380
|
let c = a.tagName, l = a.rawTagName, u = a.tagExp, d = a.attrExpPresent, f = a.closeIndex;
|
|
4377
|
-
if ({tagName: c, tagExp: u} =
|
|
4381
|
+
if ({tagName: c, tagExp: u} = Qr(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}`);
|
|
4378
4382
|
n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher, !1));
|
|
4379
4383
|
let p = n;
|
|
4380
4384
|
p && i.unpairedTagsSet.has(p.tagname) && (n = this.tagsNodeStack.pop(), this.matcher.pop());
|
|
4381
4385
|
let m = !1;
|
|
4382
4386
|
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);
|
|
4383
4387
|
let h, g = null;
|
|
4384
|
-
h =
|
|
4388
|
+
h = Ir(l), c !== t.tagname && this.matcher.push(c, {}, h), c !== u && d && (g = this.buildAttributesMap(u, this.matcher, c), g && Fr(g, i)), c !== t.tagname && (this.isCurrentNodeStopNode = this.isItStopNode());
|
|
4385
4389
|
let _ = s;
|
|
4386
4390
|
if (this.isCurrentNodeStopNode) {
|
|
4387
4391
|
let t = "";
|
|
@@ -4396,7 +4400,7 @@ var Br = function(e) {
|
|
|
4396
4400
|
g && (r[":@"] = g), r.add(i.textNodeName, t), this.matcher.pop(), this.isCurrentNodeStopNode = !1, this.addChild(n, r, this.readonlyMatcher, _), i.captureMetaData && n.addEndIndex(s + 1);
|
|
4397
4401
|
} else {
|
|
4398
4402
|
if (m) {
|
|
4399
|
-
({tagName: c, tagExp: u} =
|
|
4403
|
+
({tagName: c, tagExp: u} = Qr(i.transformTagName, c, u, i));
|
|
4400
4404
|
let e = new H(c);
|
|
4401
4405
|
g && (e[":@"] = g), this.addChild(n, e, this.readonlyMatcher, _), i.captureMetaData && n.addEndIndex(f + 1), this.matcher.pop(), this.isCurrentNodeStopNode = !1;
|
|
4402
4406
|
} else {
|
|
@@ -4417,12 +4421,12 @@ var Br = function(e) {
|
|
|
4417
4421
|
} else r += e[s];
|
|
4418
4422
|
return t.child;
|
|
4419
4423
|
};
|
|
4420
|
-
function
|
|
4424
|
+
function Ur(e, t, n, r) {
|
|
4421
4425
|
this.options.captureMetaData || (r = void 0);
|
|
4422
4426
|
let i = this.options.jPath ? n.toString() : n, a = this.options.updateTag(t.tagname, i, t[":@"]);
|
|
4423
4427
|
!1 === a || (typeof a == "string" && (t.tagname = a), e.addChild(t, r));
|
|
4424
4428
|
}
|
|
4425
|
-
function
|
|
4429
|
+
function Wr(e, t, n) {
|
|
4426
4430
|
let r = this.options.processEntities;
|
|
4427
4431
|
if (!r || !r.enabled) return e;
|
|
4428
4432
|
if (r.allowedTags) {
|
|
@@ -4435,23 +4439,23 @@ function Hr(e, t, n) {
|
|
|
4435
4439
|
}
|
|
4436
4440
|
return this.entityDecoder.decode(e);
|
|
4437
4441
|
}
|
|
4438
|
-
function
|
|
4442
|
+
function Gr(e, t, n, r) {
|
|
4439
4443
|
return e &&= (r === void 0 && (r = t.child.length === 0), (e = this.parseTextData(e, t.tagname, n, !1, !!t[":@"] && Object.keys(t[":@"]).length !== 0, r)) !== void 0 && e !== "" && t.add(this.options.textNodeName, e), ""), e;
|
|
4440
4444
|
}
|
|
4441
|
-
function
|
|
4445
|
+
function Kr() {
|
|
4442
4446
|
return this.stopNodeExpressionsSet.size !== 0 && this.matcher.matchesAny(this.stopNodeExpressionsSet);
|
|
4443
4447
|
}
|
|
4444
|
-
function
|
|
4448
|
+
function qr(e, t, n, r) {
|
|
4445
4449
|
let i = e.indexOf(t, n);
|
|
4446
4450
|
if (i === -1) throw Error(r);
|
|
4447
4451
|
return i + t.length - 1;
|
|
4448
4452
|
}
|
|
4449
|
-
function
|
|
4453
|
+
function Jr(e, t, n, r) {
|
|
4450
4454
|
let i = e.indexOf(t, n);
|
|
4451
4455
|
if (i === -1) throw Error(r);
|
|
4452
4456
|
return i;
|
|
4453
4457
|
}
|
|
4454
|
-
function
|
|
4458
|
+
function Yr(e, t, n, r = ">") {
|
|
4455
4459
|
let i = function(e, t, n = ">") {
|
|
4456
4460
|
let r = 0, i = e.length, a = n.charCodeAt(0), o = n.length > 1 ? n.charCodeAt(1) : -1, s = "", c = t;
|
|
4457
4461
|
for (let n = t; n < i; n++) {
|
|
@@ -4482,72 +4486,72 @@ function qr(e, t, n, r = ">") {
|
|
|
4482
4486
|
rawTagName: u
|
|
4483
4487
|
};
|
|
4484
4488
|
}
|
|
4485
|
-
function
|
|
4489
|
+
function Xr(e, t, n) {
|
|
4486
4490
|
let r = n, i = 1, a = e.length;
|
|
4487
4491
|
for (; n < a; n++) if (e[n] === "<") {
|
|
4488
4492
|
let a = e.charCodeAt(n + 1);
|
|
4489
4493
|
if (a === 47) {
|
|
4490
|
-
let a =
|
|
4494
|
+
let a = Jr(e, ">", n, `${t} is not closed`);
|
|
4491
4495
|
if (e.substring(n + 2, a).trim() === t && (i--, i === 0)) return {
|
|
4492
4496
|
tagContent: e.substring(r, n),
|
|
4493
4497
|
i: a
|
|
4494
4498
|
};
|
|
4495
4499
|
n = a;
|
|
4496
|
-
} else if (a === 63) n =
|
|
4497
|
-
else if (a === 33 && e.charCodeAt(n + 2) === 45 && e.charCodeAt(n + 3) === 45) n =
|
|
4498
|
-
else if (a === 33 && e.charCodeAt(n + 2) === 91) n =
|
|
4500
|
+
} else if (a === 63) n = qr(e, "?>", n + 1, "StopNode is not closed.");
|
|
4501
|
+
else if (a === 33 && e.charCodeAt(n + 2) === 45 && e.charCodeAt(n + 3) === 45) n = qr(e, "-->", n + 3, "StopNode is not closed.");
|
|
4502
|
+
else if (a === 33 && e.charCodeAt(n + 2) === 91) n = qr(e, "]]>", n, "StopNode is not closed.") - 2;
|
|
4499
4503
|
else {
|
|
4500
|
-
let r =
|
|
4504
|
+
let r = Yr(e, n, !1);
|
|
4501
4505
|
r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
|
|
4502
4506
|
}
|
|
4503
4507
|
}
|
|
4504
4508
|
}
|
|
4505
|
-
function
|
|
4509
|
+
function Zr(e, t, n) {
|
|
4506
4510
|
if (t && typeof e == "string") {
|
|
4507
4511
|
let t = e.trim();
|
|
4508
|
-
return t === "true" || t !== "false" &&
|
|
4512
|
+
return t === "true" || t !== "false" && ar(e, n);
|
|
4509
4513
|
}
|
|
4510
4514
|
return e === void 0 ? "" : e;
|
|
4511
4515
|
}
|
|
4512
|
-
function
|
|
4516
|
+
function Qr(e, t, n, r) {
|
|
4513
4517
|
if (e) {
|
|
4514
4518
|
let r = e(t);
|
|
4515
4519
|
n === t && (n = r), t = r;
|
|
4516
4520
|
}
|
|
4517
4521
|
return {
|
|
4518
|
-
tagName: t =
|
|
4522
|
+
tagName: t = $r(t, r),
|
|
4519
4523
|
tagExp: n
|
|
4520
4524
|
};
|
|
4521
4525
|
}
|
|
4522
|
-
function Zr(e, t) {
|
|
4523
|
-
if (Tn.includes(e)) throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
4524
|
-
return wn.includes(e) ? t.onDangerousProperty(e) : e;
|
|
4525
|
-
}
|
|
4526
|
-
var Qr = H.getMetaDataSymbol();
|
|
4527
4526
|
function $r(e, t) {
|
|
4527
|
+
if (Dn.includes(e)) throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
4528
|
+
return En.includes(e) ? t.onDangerousProperty(e) : e;
|
|
4529
|
+
}
|
|
4530
|
+
var ei = H.getMetaDataSymbol();
|
|
4531
|
+
function ti(e, t) {
|
|
4528
4532
|
if (!e || typeof e != "object") return {};
|
|
4529
4533
|
if (!t) return e;
|
|
4530
4534
|
let n = {};
|
|
4531
4535
|
for (let r in e) r.startsWith(t) ? n[r.substring(t.length)] = e[r] : n[r] = e[r];
|
|
4532
4536
|
return n;
|
|
4533
4537
|
}
|
|
4534
|
-
function
|
|
4535
|
-
return
|
|
4538
|
+
function ni(e, t, n, r) {
|
|
4539
|
+
return ri(e, t, n, r);
|
|
4536
4540
|
}
|
|
4537
|
-
function
|
|
4541
|
+
function ri(e, t, n, r) {
|
|
4538
4542
|
let i, a = {};
|
|
4539
4543
|
for (let o = 0; o < e.length; o++) {
|
|
4540
|
-
let s = e[o], c =
|
|
4544
|
+
let s = e[o], c = ii(s);
|
|
4541
4545
|
if (c !== void 0 && c !== t.textNodeName) {
|
|
4542
|
-
let e =
|
|
4546
|
+
let e = ti(s[":@"] || {}, t.attributeNamePrefix);
|
|
4543
4547
|
n.push(c, e);
|
|
4544
4548
|
}
|
|
4545
4549
|
if (c === t.textNodeName) i === void 0 ? i = s[c] : i += "" + s[c];
|
|
4546
4550
|
else {
|
|
4547
4551
|
if (c === void 0) continue;
|
|
4548
4552
|
if (s[c]) {
|
|
4549
|
-
let e =
|
|
4550
|
-
if (Object.keys(e).length === 0 && t.alwaysCreateTextNode && (e[t.textNodeName] = ""), s[":@"] ?
|
|
4553
|
+
let e = ri(s[c], t, n, r), i = oi(e, t);
|
|
4554
|
+
if (Object.keys(e).length === 0 && t.alwaysCreateTextNode && (e[t.textNodeName] = ""), s[":@"] ? ai(e, s[":@"], r, t) : Object.keys(e).length !== 1 || e[t.textNodeName] === void 0 || t.alwaysCreateTextNode ? Object.keys(e).length === 0 && (t.alwaysCreateTextNode ? e[t.textNodeName] = "" : e = "") : e = e[t.textNodeName], s[ei] !== void 0 && typeof e == "object" && e && (e[ei] = s[ei]), a[c] !== void 0 && Object.prototype.hasOwnProperty.call(a, c)) Array.isArray(a[c]) || (a[c] = [a[c]]), a[c].push(e);
|
|
4551
4555
|
else {
|
|
4552
4556
|
let n = t.jPath ? r.toString() : r;
|
|
4553
4557
|
a[c] = t.isArray(c, n, i) ? [e] : e;
|
|
@@ -4558,14 +4562,14 @@ function ti(e, t, n, r) {
|
|
|
4558
4562
|
}
|
|
4559
4563
|
return typeof i == "string" ? i.length > 0 && (a[t.textNodeName] = i) : i !== void 0 && (a[t.textNodeName] = i), a;
|
|
4560
4564
|
}
|
|
4561
|
-
function
|
|
4565
|
+
function ii(e) {
|
|
4562
4566
|
let t = Object.keys(e);
|
|
4563
4567
|
for (let e = 0; e < t.length; e++) {
|
|
4564
4568
|
let n = t[e];
|
|
4565
4569
|
if (n !== ":@") return n;
|
|
4566
4570
|
}
|
|
4567
4571
|
}
|
|
4568
|
-
function
|
|
4572
|
+
function ai(e, t, n, r) {
|
|
4569
4573
|
if (t) {
|
|
4570
4574
|
let i = Object.keys(t), a = i.length;
|
|
4571
4575
|
for (let o = 0; o < a; o++) {
|
|
@@ -4574,18 +4578,18 @@ function ri(e, t, n, r) {
|
|
|
4574
4578
|
}
|
|
4575
4579
|
}
|
|
4576
4580
|
}
|
|
4577
|
-
function
|
|
4581
|
+
function oi(e, t) {
|
|
4578
4582
|
let { textNodeName: n } = t, r = Object.keys(e).length;
|
|
4579
4583
|
return r === 0 || !(r !== 1 || !e[n] && typeof e[n] != "boolean" && e[n] !== 0);
|
|
4580
4584
|
}
|
|
4581
|
-
var
|
|
4585
|
+
var si = {
|
|
4582
4586
|
allowBooleanAttributes: !1,
|
|
4583
4587
|
unpairedTags: []
|
|
4584
4588
|
};
|
|
4585
|
-
function
|
|
4589
|
+
function ci(e) {
|
|
4586
4590
|
return e === " " || e === " " || e === "\n" || e === "\r";
|
|
4587
4591
|
}
|
|
4588
|
-
function
|
|
4592
|
+
function li(e, t) {
|
|
4589
4593
|
let n = t;
|
|
4590
4594
|
for (; t < e.length; t++) if (e[t] == "?" || e[t] == " ") {
|
|
4591
4595
|
let r = e.substr(n, t - n);
|
|
@@ -4597,7 +4601,7 @@ function si(e, t) {
|
|
|
4597
4601
|
}
|
|
4598
4602
|
return t;
|
|
4599
4603
|
}
|
|
4600
|
-
function
|
|
4604
|
+
function ui(e, t) {
|
|
4601
4605
|
if (e.length > t + 5 && e[t + 1] === "-" && e[t + 2] === "-") {
|
|
4602
4606
|
for (t += 3; t < e.length; t++) if (e[t] === "-" && e[t + 1] === "-" && e[t + 2] === ">") {
|
|
4603
4607
|
t += 2;
|
|
@@ -4615,7 +4619,7 @@ function ci(e, t) {
|
|
|
4615
4619
|
}
|
|
4616
4620
|
return t;
|
|
4617
4621
|
}
|
|
4618
|
-
function
|
|
4622
|
+
function di(e, t) {
|
|
4619
4623
|
let n = "", r = "", i = !1;
|
|
4620
4624
|
for (; t < e.length; t++) {
|
|
4621
4625
|
if (e[t] === "\"" || e[t] === "'") r === "" ? r = e[t] : r !== e[t] || (r = "");
|
|
@@ -4631,24 +4635,24 @@ function li(e, t) {
|
|
|
4631
4635
|
tagClosed: i
|
|
4632
4636
|
};
|
|
4633
4637
|
}
|
|
4634
|
-
function
|
|
4638
|
+
function fi(e, t) {
|
|
4635
4639
|
let n = function(e) {
|
|
4636
4640
|
let t = [], n = e.length, r = 0;
|
|
4637
4641
|
for (; r < n;) {
|
|
4638
4642
|
let i = r;
|
|
4639
|
-
for (; r < n &&
|
|
4643
|
+
for (; r < n && ci(e[r]);) r++;
|
|
4640
4644
|
if (r >= n) break;
|
|
4641
4645
|
if (e[r] === "=") {
|
|
4642
4646
|
r = i + 1;
|
|
4643
4647
|
continue;
|
|
4644
4648
|
}
|
|
4645
4649
|
let a = e.slice(i, r), o = r;
|
|
4646
|
-
for (; r < n && !
|
|
4650
|
+
for (; r < n && !ci(e[r]) && e[r] !== "=";) r++;
|
|
4647
4651
|
let s = e.slice(o, r), c, l, u, d = r;
|
|
4648
|
-
for (; d < n &&
|
|
4652
|
+
for (; d < n && ci(e[d]);) d++;
|
|
4649
4653
|
d < n && e[d] === "=" && (c = e.slice(r, d + 1), r = d + 1);
|
|
4650
4654
|
let f = r;
|
|
4651
|
-
for (; f < n &&
|
|
4655
|
+
for (; f < n && ci(e[f]);) f++;
|
|
4652
4656
|
if (f < n && (e[f] === "\"" || e[f] === "'")) {
|
|
4653
4657
|
let t = f + 1, n = e.indexOf(e[f], t);
|
|
4654
4658
|
n !== -1 && (l = e[f], u = e.slice(t, n), r = n + 1);
|
|
@@ -4659,17 +4663,17 @@ function ui(e, t) {
|
|
|
4659
4663
|
return t;
|
|
4660
4664
|
}(e), r = {};
|
|
4661
4665
|
for (let e = 0; e < n.length; e++) {
|
|
4662
|
-
if (n[e][1].length === 0) return K("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.",
|
|
4663
|
-
if (n[e][3] !== void 0 && n[e][4] === void 0) return K("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.",
|
|
4664
|
-
if (n[e][3] === void 0 && !t.allowBooleanAttributes) return K("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.",
|
|
4666
|
+
if (n[e][1].length === 0) return K("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", hi(n[e]));
|
|
4667
|
+
if (n[e][3] !== void 0 && n[e][4] === void 0) return K("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", hi(n[e]));
|
|
4668
|
+
if (n[e][3] === void 0 && !t.allowBooleanAttributes) return K("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", hi(n[e]));
|
|
4665
4669
|
let i = n[e][2];
|
|
4666
|
-
if (!
|
|
4667
|
-
if (Object.prototype.hasOwnProperty.call(r, i)) return K("InvalidAttr", "Attribute '" + i + "' is repeated.",
|
|
4670
|
+
if (!mi(i)) return K("InvalidAttr", "Attribute '" + i + "' is an invalid name.", hi(n[e]));
|
|
4671
|
+
if (Object.prototype.hasOwnProperty.call(r, i)) return K("InvalidAttr", "Attribute '" + i + "' is repeated.", hi(n[e]));
|
|
4668
4672
|
r[i] = 1;
|
|
4669
4673
|
}
|
|
4670
4674
|
return !0;
|
|
4671
4675
|
}
|
|
4672
|
-
function
|
|
4676
|
+
function pi(e, t) {
|
|
4673
4677
|
if (e[++t] === ";") return -1;
|
|
4674
4678
|
if (e[t] === "#") return function(e, t) {
|
|
4675
4679
|
let n = /\d/;
|
|
@@ -4694,8 +4698,8 @@ function K(e, t, n) {
|
|
|
4694
4698
|
col: n.col
|
|
4695
4699
|
} };
|
|
4696
4700
|
}
|
|
4697
|
-
function
|
|
4698
|
-
return
|
|
4701
|
+
function mi(e) {
|
|
4702
|
+
return Tn(e);
|
|
4699
4703
|
}
|
|
4700
4704
|
function q(e, t) {
|
|
4701
4705
|
let n = e.substring(0, t).split(/\r?\n/);
|
|
@@ -4704,12 +4708,12 @@ function q(e, t) {
|
|
|
4704
4708
|
col: n[n.length - 1].length + 1
|
|
4705
4709
|
};
|
|
4706
4710
|
}
|
|
4707
|
-
function
|
|
4711
|
+
function hi(e) {
|
|
4708
4712
|
return e.startIndex + e[1].length;
|
|
4709
4713
|
}
|
|
4710
|
-
var
|
|
4714
|
+
var gi = class {
|
|
4711
4715
|
constructor(e) {
|
|
4712
|
-
this.externalEntities = {}, this.options =
|
|
4716
|
+
this.externalEntities = {}, this.options = Mn(e);
|
|
4713
4717
|
}
|
|
4714
4718
|
parse(e, t) {
|
|
4715
4719
|
if (typeof e != "string" && e.toString) e = e.toString();
|
|
@@ -4717,20 +4721,20 @@ var mi = class {
|
|
|
4717
4721
|
if (t) {
|
|
4718
4722
|
!0 === t && (t = {});
|
|
4719
4723
|
let n = function(e, t) {
|
|
4720
|
-
t = Object.assign({},
|
|
4724
|
+
t = Object.assign({}, si, t);
|
|
4721
4725
|
let n = [], r = !1, i = !1;
|
|
4722
4726
|
e[0] === "" && (e = e.substr(1));
|
|
4723
4727
|
for (let a = 0; a < e.length; a++) if (e[a] === "<" && e[a + 1] === "?") {
|
|
4724
|
-
if (a += 2, a =
|
|
4728
|
+
if (a += 2, a = li(e, a), a.err) return a;
|
|
4725
4729
|
} else {
|
|
4726
4730
|
if (e[a] !== "<") {
|
|
4727
|
-
if (
|
|
4731
|
+
if (ci(e[a])) continue;
|
|
4728
4732
|
return K("InvalidChar", "char '" + e[a] + "' is not expected.", q(e, a));
|
|
4729
4733
|
}
|
|
4730
4734
|
{
|
|
4731
4735
|
let o = a;
|
|
4732
4736
|
if (a++, e[a] === "!") {
|
|
4733
|
-
a =
|
|
4737
|
+
a = ui(e, a);
|
|
4734
4738
|
continue;
|
|
4735
4739
|
}
|
|
4736
4740
|
{
|
|
@@ -4738,17 +4742,17 @@ var mi = class {
|
|
|
4738
4742
|
e[a] === "/" && (s = !0, a++);
|
|
4739
4743
|
let c = "";
|
|
4740
4744
|
for (; a < e.length && e[a] !== ">" && e[a] !== " " && e[a] !== " " && e[a] !== "\n" && e[a] !== "\r"; a++) c += e[a];
|
|
4741
|
-
if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !
|
|
4745
|
+
if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !Tn(c)) {
|
|
4742
4746
|
let t;
|
|
4743
4747
|
return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", K("InvalidTag", t, q(e, a));
|
|
4744
4748
|
}
|
|
4745
|
-
let l =
|
|
4749
|
+
let l = di(e, a);
|
|
4746
4750
|
if (!1 === l) return K("InvalidAttr", "Attributes for '" + c + "' have open quote.", q(e, a));
|
|
4747
4751
|
let u = l.value;
|
|
4748
4752
|
if (a = l.index, u[u.length - 1] === "/") {
|
|
4749
4753
|
let n = a - u.length;
|
|
4750
4754
|
u = u.substring(0, u.length - 1);
|
|
4751
|
-
let i =
|
|
4755
|
+
let i = fi(u, t);
|
|
4752
4756
|
if (!0 !== i) return K(i.err.code, i.err.msg, q(e, n + i.err.line));
|
|
4753
4757
|
r = !0;
|
|
4754
4758
|
} else if (s) {
|
|
@@ -4764,7 +4768,7 @@ var mi = class {
|
|
|
4764
4768
|
n.length == 0 && (i = !0);
|
|
4765
4769
|
}
|
|
4766
4770
|
} else {
|
|
4767
|
-
let s =
|
|
4771
|
+
let s = fi(u, t);
|
|
4768
4772
|
if (!0 !== s) return K(s.err.code, s.err.msg, q(e, a - u.length + s.err.line));
|
|
4769
4773
|
if (!0 === i) return K("InvalidXml", "Multiple possible root nodes found.", q(e, a));
|
|
4770
4774
|
t.unpairedTags.indexOf(c) !== -1 || n.push({
|
|
@@ -4774,16 +4778,16 @@ var mi = class {
|
|
|
4774
4778
|
}
|
|
4775
4779
|
for (a++; a < e.length; a++) if (e[a] === "<") {
|
|
4776
4780
|
if (e[a + 1] === "!") {
|
|
4777
|
-
a++, a =
|
|
4781
|
+
a++, a = ui(e, a);
|
|
4778
4782
|
continue;
|
|
4779
4783
|
}
|
|
4780
4784
|
if (e[a + 1] !== "?") break;
|
|
4781
|
-
if (a =
|
|
4785
|
+
if (a = li(e, ++a), a.err) return a;
|
|
4782
4786
|
} else if (e[a] === "&") {
|
|
4783
|
-
let t =
|
|
4787
|
+
let t = pi(e, a);
|
|
4784
4788
|
if (t == -1) return K("InvalidChar", "char '&' is not expected.", q(e, a));
|
|
4785
4789
|
a = t;
|
|
4786
|
-
} else if (!0 === i && !
|
|
4790
|
+
} else if (!0 === i && !ci(e[a])) return K("InvalidXml", "Extra text at the end", q(e, a));
|
|
4787
4791
|
e[a] === "<" && a--;
|
|
4788
4792
|
}
|
|
4789
4793
|
}
|
|
@@ -4795,8 +4799,8 @@ var mi = class {
|
|
|
4795
4799
|
}(e, t);
|
|
4796
4800
|
if (!0 !== n) throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
|
|
4797
4801
|
}
|
|
4798
|
-
let n = new
|
|
4799
|
-
return this.options.preserveOrder || r === void 0 ? r :
|
|
4802
|
+
let n = new Lr(this.options, this.externalEntities), r = n.parseXml(e);
|
|
4803
|
+
return this.options.preserveOrder || r === void 0 ? r : ni(r, this.options, n.matcher, n.readonlyMatcher);
|
|
4800
4804
|
}
|
|
4801
4805
|
addEntity(e, t) {
|
|
4802
4806
|
if (t.indexOf("&") !== -1) throw Error("Entity value can't have '&'");
|
|
@@ -4807,24 +4811,24 @@ var mi = class {
|
|
|
4807
4811
|
static getMetaDataSymbol() {
|
|
4808
4812
|
return H.getMetaDataSymbol();
|
|
4809
4813
|
}
|
|
4810
|
-
},
|
|
4814
|
+
}, _i = k(829), J = k.n(_i), vi = function(e) {
|
|
4811
4815
|
return e.Array = "array", e.Object = "object", e.Original = "original", e;
|
|
4812
|
-
}(
|
|
4813
|
-
function
|
|
4816
|
+
}(vi || {});
|
|
4817
|
+
function yi(e) {
|
|
4814
4818
|
let t = e.indexOf(":");
|
|
4815
4819
|
return t === -1 ? e : e.slice(t + 1);
|
|
4816
4820
|
}
|
|
4817
|
-
function
|
|
4818
|
-
return typeof e == "string" ? e : e.toArray().map(
|
|
4821
|
+
function bi(e) {
|
|
4822
|
+
return typeof e == "string" ? e : e.toArray().map(yi).join(".");
|
|
4819
4823
|
}
|
|
4820
|
-
function
|
|
4824
|
+
function xi(e, t) {
|
|
4821
4825
|
if (!e.endsWith("propstat.prop.displayname")) return t;
|
|
4822
4826
|
}
|
|
4823
|
-
function
|
|
4827
|
+
function Si(e, t, n = vi.Original) {
|
|
4824
4828
|
let r = J().get(e, t);
|
|
4825
4829
|
return n === "array" && !1 === Array.isArray(r) ? [r] : n === "object" && Array.isArray(r) ? r[0] : r;
|
|
4826
4830
|
}
|
|
4827
|
-
var
|
|
4831
|
+
var Ci = /* @__PURE__ */ new Set([
|
|
4828
4832
|
"multistatus",
|
|
4829
4833
|
"response",
|
|
4830
4834
|
"propstat",
|
|
@@ -4833,14 +4837,14 @@ var xi = /* @__PURE__ */ new Set([
|
|
|
4833
4837
|
"href",
|
|
4834
4838
|
"responsedescription"
|
|
4835
4839
|
]);
|
|
4836
|
-
function
|
|
4840
|
+
function wi(e) {
|
|
4837
4841
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
4838
4842
|
}
|
|
4839
|
-
function
|
|
4843
|
+
function Ti(e, t) {
|
|
4840
4844
|
return t ??= {
|
|
4841
4845
|
attributeNamePrefix: "@",
|
|
4842
4846
|
attributeParsers: [],
|
|
4843
|
-
tagParsers: [
|
|
4847
|
+
tagParsers: [xi]
|
|
4844
4848
|
}, new Promise(((n) => {
|
|
4845
4849
|
let r = function({ attributeNamePrefix: e, attributeParsers: t, clarkNotationProps: n, entityDecoder: r, tagParsers: i }) {
|
|
4846
4850
|
let a = {
|
|
@@ -4857,7 +4861,7 @@ function Ci(e, t) {
|
|
|
4857
4861
|
attributeValueProcessor(e, n, r) {
|
|
4858
4862
|
if (t.length === 0 || (i = e) === "xmlns" || i.startsWith("xmlns:")) return n;
|
|
4859
4863
|
var i;
|
|
4860
|
-
let a =
|
|
4864
|
+
let a = bi(r);
|
|
4861
4865
|
for (let e of t) try {
|
|
4862
4866
|
let t = e(a, n);
|
|
4863
4867
|
if (t !== n) return t;
|
|
@@ -4866,7 +4870,7 @@ function Ci(e, t) {
|
|
|
4866
4870
|
},
|
|
4867
4871
|
tagValueProcessor(e, t, n) {
|
|
4868
4872
|
if (i.length === 0) return t;
|
|
4869
|
-
let r =
|
|
4873
|
+
let r = bi(n);
|
|
4870
4874
|
for (let e of i) try {
|
|
4871
4875
|
let n = e(r, t);
|
|
4872
4876
|
if (n !== t) return n;
|
|
@@ -4874,13 +4878,13 @@ function Ci(e, t) {
|
|
|
4874
4878
|
return t;
|
|
4875
4879
|
}
|
|
4876
4880
|
};
|
|
4877
|
-
return r && (a.entityDecoder = new
|
|
4881
|
+
return r && (a.entityDecoder = new Cr({ limit: {
|
|
4878
4882
|
maxTotalExpansions: r.limit?.maxTotalExpansions ?? 0,
|
|
4879
4883
|
maxExpandedLength: r.limit?.maxExpandedLength ?? 0
|
|
4880
|
-
} })), new
|
|
4884
|
+
} })), new gi(a);
|
|
4881
4885
|
}(t).parse(e);
|
|
4882
4886
|
t.clarkNotationProps && function(e, t) {
|
|
4883
|
-
if (!
|
|
4887
|
+
if (!wi(e) && !Array.isArray(e)) return;
|
|
4884
4888
|
let n = `${t}xmlns`, r = `${n}:`, i = r.length, a = "text";
|
|
4885
4889
|
function o(e) {
|
|
4886
4890
|
return e === n || e.length > i && e.startsWith(r);
|
|
@@ -4892,14 +4896,14 @@ function Ci(e, t) {
|
|
|
4892
4896
|
}
|
|
4893
4897
|
function c(e) {
|
|
4894
4898
|
if (Array.isArray(e)) return e.map(c);
|
|
4895
|
-
if (!
|
|
4899
|
+
if (!wi(e)) return e;
|
|
4896
4900
|
let t = {};
|
|
4897
4901
|
for (let n of Object.keys(e)) o(n) || (t[n] = c(e[n]));
|
|
4898
4902
|
let n = Object.keys(t);
|
|
4899
4903
|
return n.length === 0 ? "" : n.length === 1 && n[0] === a ? t[a] : t;
|
|
4900
4904
|
}
|
|
4901
4905
|
function l(e, t, n, r) {
|
|
4902
|
-
let i = e.indexOf(":"), a = i === -1 ? "" : e.slice(0, i), o = i === -1 ? e : e.slice(i + 1), l = (e) => (
|
|
4906
|
+
let i = e.indexOf(":"), a = i === -1 ? "" : e.slice(0, i), o = i === -1 ? e : e.slice(i + 1), l = (e) => (wi(e) ? s(e, n) : n).get(a) ?? "", u = (e, t) => {
|
|
4903
4907
|
let n = e ? `{${e}}${o}` : o, i = r[n];
|
|
4904
4908
|
i === void 0 ? r[n] = t : Array.isArray(i) ? i.push(t) : r[n] = [i, t];
|
|
4905
4909
|
};
|
|
@@ -4907,7 +4911,7 @@ function Ci(e, t) {
|
|
|
4907
4911
|
else u(l(t), c(t));
|
|
4908
4912
|
}
|
|
4909
4913
|
function u(e, t) {
|
|
4910
|
-
if (!
|
|
4914
|
+
if (!wi(e)) return e;
|
|
4911
4915
|
let n = function(e, t) {
|
|
4912
4916
|
let n = s(e, t), r = {};
|
|
4913
4917
|
for (let t of Object.keys(e)) o(t) || l(t, e[t], n, r);
|
|
@@ -4920,7 +4924,7 @@ function Ci(e, t) {
|
|
|
4920
4924
|
for (let r = 0; r < t.length; r += 1) t[r] = e(t[r], n);
|
|
4921
4925
|
return t;
|
|
4922
4926
|
}
|
|
4923
|
-
if (!
|
|
4927
|
+
if (!wi(t)) return t;
|
|
4924
4928
|
let r = s(t, n);
|
|
4925
4929
|
for (let n of Object.keys(t)) {
|
|
4926
4930
|
if (o(n)) {
|
|
@@ -4928,7 +4932,7 @@ function Ci(e, t) {
|
|
|
4928
4932
|
continue;
|
|
4929
4933
|
}
|
|
4930
4934
|
let i = n.indexOf(":"), a = i === -1 ? n : n.slice(i + 1), s = t[n], c = n;
|
|
4931
|
-
|
|
4935
|
+
Ci.has(a) && a !== n && (delete t[n], t[a] = s, c = a), t[c] = a === "prop" ? Array.isArray(s) ? s.map(((e) => u(e, r))) : u(s, r) : e(s, r);
|
|
4932
4936
|
}
|
|
4933
4937
|
return Object.keys(t).length === 0 ? "" : t;
|
|
4934
4938
|
})(e, /* @__PURE__ */ new Map());
|
|
@@ -4937,17 +4941,17 @@ function Ci(e, t) {
|
|
|
4937
4941
|
if (t === "") return { multistatus: { response: [] } };
|
|
4938
4942
|
if (!t) throw Error("Invalid response: No root multistatus found");
|
|
4939
4943
|
let n = { multistatus: Array.isArray(t) ? t[0] : t };
|
|
4940
|
-
return J().set(n, "multistatus.response",
|
|
4944
|
+
return J().set(n, "multistatus.response", Si(n, "multistatus.response", vi.Array)), J().set(n, "multistatus.response", J().get(n, "multistatus.response").map(((e) => function(e) {
|
|
4941
4945
|
let t = Object.assign({}, e);
|
|
4942
|
-
return t.status ? J().set(t, "status",
|
|
4946
|
+
return t.status ? J().set(t, "status", Si(t, "status", vi.Object)) : (J().set(t, "propstat", Si(t, "propstat", vi.Object)), J().set(t, "propstat.prop", Si(t, "propstat.prop", vi.Object))), t;
|
|
4943
4947
|
}(e)))), n;
|
|
4944
4948
|
}(r));
|
|
4945
4949
|
}));
|
|
4946
4950
|
}
|
|
4947
|
-
function
|
|
4951
|
+
function Ei(e, t, n = !1) {
|
|
4948
4952
|
let { getlastmodified: r = null, getcontentlength: i = "0", resourcetype: a = null, getcontenttype: o = null, getetag: s = null } = e, c = a && typeof a == "object" && a.collection !== void 0 ? "directory" : "file", l = {
|
|
4949
4953
|
filename: t,
|
|
4950
|
-
basename:
|
|
4954
|
+
basename: Ue().basename(t),
|
|
4951
4955
|
lastmod: r,
|
|
4952
4956
|
size: parseInt(i, 10),
|
|
4953
4957
|
type: c,
|
|
@@ -4955,7 +4959,7 @@ function wi(e, t, n = !1) {
|
|
|
4955
4959
|
};
|
|
4956
4960
|
return c === "file" && (l.mime = o && typeof o == "string" ? o.split(";")[0] : ""), n && (e.displayname !== void 0 && (e.displayname = String(e.displayname)), l.props = e), l;
|
|
4957
4961
|
}
|
|
4958
|
-
function
|
|
4962
|
+
function Di(e, t, n = !1) {
|
|
4959
4963
|
let r = null;
|
|
4960
4964
|
try {
|
|
4961
4965
|
e.multistatus.response[0].propstat && (r = e.multistatus.response[0]);
|
|
@@ -4966,9 +4970,9 @@ function Ti(e, t, n = !1) {
|
|
|
4966
4970
|
let e = /* @__PURE__ */ Error(`Invalid response: ${l} ${c}`);
|
|
4967
4971
|
throw e.status = l, e;
|
|
4968
4972
|
}
|
|
4969
|
-
return
|
|
4973
|
+
return Ei(i, qe(t), n);
|
|
4970
4974
|
}
|
|
4971
|
-
function
|
|
4975
|
+
function Oi(e) {
|
|
4972
4976
|
switch (String(e)) {
|
|
4973
4977
|
case "-3": return "unlimited";
|
|
4974
4978
|
case "-2":
|
|
@@ -4976,10 +4980,10 @@ function Ei(e) {
|
|
|
4976
4980
|
default: return parseInt(String(e), 10);
|
|
4977
4981
|
}
|
|
4978
4982
|
}
|
|
4979
|
-
function
|
|
4983
|
+
function ki(e, t, n) {
|
|
4980
4984
|
return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
|
|
4981
4985
|
}
|
|
4982
|
-
var
|
|
4986
|
+
var Ai = function(e) {
|
|
4983
4987
|
return function() {
|
|
4984
4988
|
var t = [...arguments];
|
|
4985
4989
|
try {
|
|
@@ -4990,7 +4994,7 @@ var Oi = function(e) {
|
|
|
4990
4994
|
};
|
|
4991
4995
|
}((function(e, t, n = {}) {
|
|
4992
4996
|
let { details: r = !1 } = n;
|
|
4993
|
-
return
|
|
4997
|
+
return ki(F(I({
|
|
4994
4998
|
url: M(e.remoteURL, j(t)),
|
|
4995
4999
|
method: "PROPFIND",
|
|
4996
5000
|
headers: {
|
|
@@ -4998,39 +5002,39 @@ var Oi = function(e) {
|
|
|
4998
5002
|
Depth: "0"
|
|
4999
5003
|
}
|
|
5000
5004
|
}, e, n), e), (function(n) {
|
|
5001
|
-
return V(e, n),
|
|
5002
|
-
return
|
|
5003
|
-
return
|
|
5005
|
+
return V(e, n), ki(n.text(), (function(i) {
|
|
5006
|
+
return ki(Ti(i, e.parsing), (function(e) {
|
|
5007
|
+
return bn(n, Di(e, t, r), r);
|
|
5004
5008
|
}));
|
|
5005
5009
|
}));
|
|
5006
5010
|
}));
|
|
5007
5011
|
}));
|
|
5008
|
-
function
|
|
5012
|
+
function ji(e, t, n) {
|
|
5009
5013
|
return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
|
|
5010
5014
|
}
|
|
5011
|
-
var
|
|
5015
|
+
var Mi = Ni((function(e, t, n = {}) {
|
|
5012
5016
|
let r = function(e) {
|
|
5013
5017
|
if (!e || e === "/") return [];
|
|
5014
5018
|
let t = e, n = [];
|
|
5015
5019
|
do
|
|
5016
|
-
n.push(t), t =
|
|
5020
|
+
n.push(t), t = Ue().dirname(t);
|
|
5017
5021
|
while (t && t !== "/");
|
|
5018
5022
|
return n;
|
|
5019
|
-
}(
|
|
5023
|
+
}(qe(t));
|
|
5020
5024
|
r.sort(((e, t) => e.length > t.length ? 1 : t.length > e.length ? -1 : 0));
|
|
5021
5025
|
let i = !1;
|
|
5022
5026
|
return function(e, t, n) {
|
|
5023
|
-
if (typeof e[
|
|
5024
|
-
var r, i, a, o = e[
|
|
5027
|
+
if (typeof e[Ii] == "function") {
|
|
5028
|
+
var r, i, a, o = e[Ii]();
|
|
5025
5029
|
function n(e) {
|
|
5026
5030
|
try {
|
|
5027
5031
|
for (; !(r = o.next()).done;) if ((e = t(r.value)) && e.then) {
|
|
5028
|
-
if (!
|
|
5032
|
+
if (!Ri(e)) return void e.then(n, a ||= Y.bind(null, i = new Li(), 2));
|
|
5029
5033
|
e = e.v;
|
|
5030
5034
|
}
|
|
5031
5035
|
i ? Y(i, 1, e) : i = e;
|
|
5032
5036
|
} catch (e) {
|
|
5033
|
-
Y(i ||= new
|
|
5037
|
+
Y(i ||= new Li(), 2, e);
|
|
5034
5038
|
}
|
|
5035
5039
|
}
|
|
5036
5040
|
if (n(), o.return) {
|
|
@@ -5054,12 +5058,12 @@ var Ai = ji((function(e, t, n = {}) {
|
|
|
5054
5058
|
return function o(s) {
|
|
5055
5059
|
try {
|
|
5056
5060
|
for (; ++a < e.length && (!n || !n());) if ((s = t(a)) && s.then) {
|
|
5057
|
-
if (!
|
|
5061
|
+
if (!Ri(s)) return void s.then(o, i ||= Y.bind(null, r = new Li(), 2));
|
|
5058
5062
|
s = s.v;
|
|
5059
5063
|
}
|
|
5060
5064
|
r ? Y(r, 1, s) : r = s;
|
|
5061
5065
|
} catch (e) {
|
|
5062
|
-
Y(r ||= new
|
|
5066
|
+
Y(r ||= new Li(), 2, e);
|
|
5063
5067
|
}
|
|
5064
5068
|
}(), r;
|
|
5065
5069
|
}(c, (function(e) {
|
|
@@ -5069,7 +5073,7 @@ var Ai = ji((function(e, t, n = {}) {
|
|
|
5069
5073
|
return a = function() {
|
|
5070
5074
|
return function(n, i) {
|
|
5071
5075
|
try {
|
|
5072
|
-
var a =
|
|
5076
|
+
var a = ji(Ai(e, r), (function(e) {
|
|
5073
5077
|
if (e.type !== "directory") throw Error(`Path includes a file: ${t}`);
|
|
5074
5078
|
}));
|
|
5075
5079
|
} catch (e) {
|
|
@@ -5079,7 +5083,7 @@ var Ai = ji((function(e, t, n = {}) {
|
|
|
5079
5083
|
}(0, (function(t) {
|
|
5080
5084
|
let a = t;
|
|
5081
5085
|
return function() {
|
|
5082
|
-
if (a.status === 404) return i = !0,
|
|
5086
|
+
if (a.status === 404) return i = !0, Fi(zi(e, r, {
|
|
5083
5087
|
...n,
|
|
5084
5088
|
recursive: !1
|
|
5085
5089
|
}));
|
|
@@ -5087,7 +5091,7 @@ var Ai = ji((function(e, t, n = {}) {
|
|
|
5087
5091
|
}();
|
|
5088
5092
|
}));
|
|
5089
5093
|
}, (o = function() {
|
|
5090
|
-
if (i) return
|
|
5094
|
+
if (i) return Fi(zi(e, r, {
|
|
5091
5095
|
...n,
|
|
5092
5096
|
recursive: !1
|
|
5093
5097
|
}));
|
|
@@ -5097,7 +5101,7 @@ var Ai = ji((function(e, t, n = {}) {
|
|
|
5097
5101
|
return !1;
|
|
5098
5102
|
}));
|
|
5099
5103
|
}));
|
|
5100
|
-
function
|
|
5104
|
+
function Ni(e) {
|
|
5101
5105
|
return function() {
|
|
5102
5106
|
var t = [...arguments];
|
|
5103
5107
|
try {
|
|
@@ -5107,14 +5111,14 @@ function ji(e) {
|
|
|
5107
5111
|
}
|
|
5108
5112
|
};
|
|
5109
5113
|
}
|
|
5110
|
-
function
|
|
5111
|
-
function
|
|
5112
|
-
if (!t) return e && e.then ? e.then(
|
|
5114
|
+
function Pi() {}
|
|
5115
|
+
function Fi(e, t) {
|
|
5116
|
+
if (!t) return e && e.then ? e.then(Pi) : Promise.resolve();
|
|
5113
5117
|
}
|
|
5114
|
-
var
|
|
5118
|
+
var Ii = typeof Symbol < "u" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
5115
5119
|
function Y(e, t, n) {
|
|
5116
5120
|
if (!e.s) {
|
|
5117
|
-
if (n instanceof
|
|
5121
|
+
if (n instanceof Li) {
|
|
5118
5122
|
if (!n.s) return void (n.o = Y.bind(null, e, t));
|
|
5119
5123
|
1 & t && (t = n.s), n = n.v;
|
|
5120
5124
|
}
|
|
@@ -5124,7 +5128,7 @@ function Y(e, t, n) {
|
|
|
5124
5128
|
r && r(e);
|
|
5125
5129
|
}
|
|
5126
5130
|
}
|
|
5127
|
-
var
|
|
5131
|
+
var Li = function() {
|
|
5128
5132
|
function e() {}
|
|
5129
5133
|
return e.prototype.then = function(t, n) {
|
|
5130
5134
|
let r = new e(), i = this.s;
|
|
@@ -5150,20 +5154,20 @@ var Fi = function() {
|
|
|
5150
5154
|
}, r;
|
|
5151
5155
|
}, e;
|
|
5152
5156
|
}();
|
|
5153
|
-
function
|
|
5154
|
-
return e instanceof
|
|
5157
|
+
function Ri(e) {
|
|
5158
|
+
return e instanceof Li && 1 & e.s;
|
|
5155
5159
|
}
|
|
5156
|
-
var
|
|
5157
|
-
if (!0 === n.recursive) return
|
|
5160
|
+
var zi = Ni((function(e, t, n = {}) {
|
|
5161
|
+
if (!0 === n.recursive) return Mi(e, t, n);
|
|
5158
5162
|
let r = I({
|
|
5159
5163
|
url: M(e.remoteURL, (i = j(t), i.endsWith("/") ? i : i + "/")),
|
|
5160
5164
|
method: "MKCOL"
|
|
5161
5165
|
}, e, n);
|
|
5162
5166
|
var i;
|
|
5163
|
-
return
|
|
5167
|
+
return ji(F(r, e), (function(t) {
|
|
5164
5168
|
V(e, t);
|
|
5165
5169
|
}));
|
|
5166
|
-
})),
|
|
5170
|
+
})), Bi = k(388), Vi = k.n(Bi), Hi = function(e) {
|
|
5167
5171
|
return function() {
|
|
5168
5172
|
var t = [...arguments];
|
|
5169
5173
|
try {
|
|
@@ -5193,7 +5197,7 @@ var Li = ji((function(e, t, n = {}) {
|
|
|
5193
5197
|
}), 0), t.body;
|
|
5194
5198
|
}, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
|
|
5195
5199
|
var a, o;
|
|
5196
|
-
})),
|
|
5200
|
+
})), Ui = () => {}, Wi = function(e) {
|
|
5197
5201
|
return function() {
|
|
5198
5202
|
var t = [...arguments];
|
|
5199
5203
|
try {
|
|
@@ -5209,7 +5213,7 @@ var Li = ji((function(e, t, n = {}) {
|
|
|
5209
5213
|
return V(e, t), t;
|
|
5210
5214
|
}, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
|
|
5211
5215
|
var i, a;
|
|
5212
|
-
})),
|
|
5216
|
+
})), Gi = function(e) {
|
|
5213
5217
|
return function() {
|
|
5214
5218
|
var t = [...arguments];
|
|
5215
5219
|
try {
|
|
@@ -5227,7 +5231,7 @@ var Li = ji((function(e, t, n = {}) {
|
|
|
5227
5231
|
V(e, t);
|
|
5228
5232
|
}, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
|
|
5229
5233
|
var i, a;
|
|
5230
|
-
})),
|
|
5234
|
+
})), Ki = function(e) {
|
|
5231
5235
|
return function() {
|
|
5232
5236
|
var t = [...arguments];
|
|
5233
5237
|
try {
|
|
@@ -5239,7 +5243,7 @@ var Li = ji((function(e, t, n = {}) {
|
|
|
5239
5243
|
}((function(e, t, n = {}) {
|
|
5240
5244
|
return function(r, i) {
|
|
5241
5245
|
try {
|
|
5242
|
-
var a = (o =
|
|
5246
|
+
var a = (o = Ai(e, t, n), s = function() {
|
|
5243
5247
|
return !0;
|
|
5244
5248
|
}, c ? s ? s(o) : o : (o && o.then || (o = Promise.resolve(o)), s ? o.then(s) : o));
|
|
5245
5249
|
} catch (e) {
|
|
@@ -5252,10 +5256,10 @@ var Li = ji((function(e, t, n = {}) {
|
|
|
5252
5256
|
throw e;
|
|
5253
5257
|
}));
|
|
5254
5258
|
}));
|
|
5255
|
-
function
|
|
5259
|
+
function qi(e, t, n) {
|
|
5256
5260
|
return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
|
|
5257
5261
|
}
|
|
5258
|
-
var
|
|
5262
|
+
var Ji = function(e) {
|
|
5259
5263
|
return function() {
|
|
5260
5264
|
var t = [...arguments];
|
|
5261
5265
|
try {
|
|
@@ -5265,7 +5269,7 @@ var Ki = function(e) {
|
|
|
5265
5269
|
}
|
|
5266
5270
|
};
|
|
5267
5271
|
}((function(e, t, n = {}) {
|
|
5268
|
-
return
|
|
5272
|
+
return qi(F(I({
|
|
5269
5273
|
url: M(e.remoteURL, j(t), "/"),
|
|
5270
5274
|
method: "PROPFIND",
|
|
5271
5275
|
headers: {
|
|
@@ -5273,11 +5277,11 @@ var Ki = function(e) {
|
|
|
5273
5277
|
Depth: n.deep ? "infinity" : "1"
|
|
5274
5278
|
}
|
|
5275
5279
|
}, e, n), e), (function(r) {
|
|
5276
|
-
return V(e, r),
|
|
5280
|
+
return V(e, r), qi(r.text(), (function(i) {
|
|
5277
5281
|
if (!i) throw Error("Failed parsing directory contents: Empty response");
|
|
5278
|
-
return
|
|
5279
|
-
let a =
|
|
5280
|
-
let a =
|
|
5282
|
+
return qi(Ti(i, e.parsing), (function(i) {
|
|
5283
|
+
let a = Ke(t), o = function(e, t, n, r = !1, i = !1) {
|
|
5284
|
+
let a = Ue().join(t, "/"), { multistatus: { response: o } } = e, s = o.map(((e) => {
|
|
5281
5285
|
let t = function(e) {
|
|
5282
5286
|
try {
|
|
5283
5287
|
return e.replace(/^https?:\/\/[^\/]+/, "");
|
|
@@ -5285,18 +5289,18 @@ var Ki = function(e) {
|
|
|
5285
5289
|
throw new A(e, "Failed normalising HREF");
|
|
5286
5290
|
}
|
|
5287
5291
|
}(e.href), { propstat: { prop: n } } = e;
|
|
5288
|
-
return
|
|
5292
|
+
return Ei(n, a === "/" ? decodeURIComponent(qe(t)) : qe(Ue().relative(decodeURIComponent(a), decodeURIComponent(t))), r);
|
|
5289
5293
|
}));
|
|
5290
5294
|
return i ? s : s.filter(((e) => e.basename && (e.type === "file" || e.filename !== n.replace(/\/$/, ""))));
|
|
5291
|
-
}(i,
|
|
5295
|
+
}(i, Ke(e.remoteBasePath || e.remotePath), a, n.details, n.includeSelf);
|
|
5292
5296
|
return n.glob && (o = function(e, t) {
|
|
5293
5297
|
return e.filter(((e) => R(e.filename, t, { matchBase: !0 })));
|
|
5294
|
-
}(o, n.glob)),
|
|
5298
|
+
}(o, n.glob)), bn(r, o, n.details);
|
|
5295
5299
|
}));
|
|
5296
5300
|
}));
|
|
5297
5301
|
}));
|
|
5298
5302
|
}));
|
|
5299
|
-
function
|
|
5303
|
+
function Yi(e) {
|
|
5300
5304
|
return function() {
|
|
5301
5305
|
var t = [...arguments];
|
|
5302
5306
|
try {
|
|
@@ -5306,23 +5310,23 @@ function qi(e) {
|
|
|
5306
5310
|
}
|
|
5307
5311
|
};
|
|
5308
5312
|
}
|
|
5309
|
-
var
|
|
5310
|
-
return
|
|
5313
|
+
var Xi = Yi((function(e, t, n = {}) {
|
|
5314
|
+
return Zi(F(I({
|
|
5311
5315
|
url: M(e.remoteURL, j(t)),
|
|
5312
5316
|
method: "GET",
|
|
5313
5317
|
headers: { Accept: "text/plain" },
|
|
5314
|
-
transformResponse: [
|
|
5318
|
+
transformResponse: [ea]
|
|
5315
5319
|
}, e, n), e), (function(t) {
|
|
5316
|
-
return V(e, t),
|
|
5317
|
-
return
|
|
5320
|
+
return V(e, t), Zi(t.text(), (function(e) {
|
|
5321
|
+
return bn(t, e, n.details);
|
|
5318
5322
|
}));
|
|
5319
5323
|
}));
|
|
5320
5324
|
}));
|
|
5321
|
-
function
|
|
5325
|
+
function Zi(e, t, n) {
|
|
5322
5326
|
return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
|
|
5323
5327
|
}
|
|
5324
|
-
var
|
|
5325
|
-
return
|
|
5328
|
+
var Qi = Yi((function(e, t, n = {}) {
|
|
5329
|
+
return Zi(F(I({
|
|
5326
5330
|
url: M(e.remoteURL, j(t)),
|
|
5327
5331
|
method: "GET"
|
|
5328
5332
|
}, e, n), e), (function(t) {
|
|
@@ -5331,48 +5335,48 @@ var Xi = qi((function(e, t, n = {}) {
|
|
|
5331
5335
|
var n = e();
|
|
5332
5336
|
return n && n.then ? n.then(t) : t();
|
|
5333
5337
|
}((function() {
|
|
5334
|
-
return
|
|
5338
|
+
return Zi(t.arrayBuffer(), (function(e) {
|
|
5335
5339
|
r = e;
|
|
5336
5340
|
}));
|
|
5337
5341
|
}), (function() {
|
|
5338
|
-
return
|
|
5342
|
+
return bn(t, r, n.details);
|
|
5339
5343
|
}));
|
|
5340
5344
|
}));
|
|
5341
|
-
})),
|
|
5345
|
+
})), $i = Yi((function(e, t, n = {}) {
|
|
5342
5346
|
let { format: r = "binary" } = n;
|
|
5343
5347
|
if (r !== "binary" && r !== "text") throw new A({ info: { code: P.InvalidOutputFormat } }, `Invalid output format: ${r}`);
|
|
5344
|
-
return r === "text" ?
|
|
5345
|
-
})),
|
|
5348
|
+
return r === "text" ? Xi(e, t, n) : Qi(e, t, n);
|
|
5349
|
+
})), ea = (e) => e;
|
|
5346
5350
|
function X(e) {
|
|
5347
5351
|
return typeof e == "number" && Object.is(e, -0) ? "-0" : String(e);
|
|
5348
5352
|
}
|
|
5349
|
-
function
|
|
5353
|
+
function ta(e) {
|
|
5350
5354
|
return X(e).replace(/--/g, "- -").replace(/--/g, "- -").replace(/-$/, "- ");
|
|
5351
5355
|
}
|
|
5352
|
-
function
|
|
5356
|
+
function na(e) {
|
|
5353
5357
|
return X(e).replace(/\]\]>/g, "]]]]><![CDATA[>");
|
|
5354
5358
|
}
|
|
5355
5359
|
function Z(e) {
|
|
5356
5360
|
return X(e).replace(/"/g, """).replace(/'/g, "'");
|
|
5357
5361
|
}
|
|
5358
|
-
function
|
|
5362
|
+
function ra(e, t, n, r, i) {
|
|
5359
5363
|
return n.sanitizeName ? i(e) ? e : n.sanitizeName(e, {
|
|
5360
5364
|
isAttribute: t,
|
|
5361
5365
|
matcher: r.readOnly()
|
|
5362
5366
|
}) : e;
|
|
5363
5367
|
}
|
|
5364
|
-
function
|
|
5368
|
+
function ia(e, t) {
|
|
5365
5369
|
let n = "";
|
|
5366
5370
|
t.format && (n = "\n");
|
|
5367
5371
|
let r = [];
|
|
5368
5372
|
if (t.stopNodes && Array.isArray(t.stopNodes)) for (let e = 0; e < t.stopNodes.length; e++) {
|
|
5369
5373
|
let n = t.stopNodes[e];
|
|
5370
|
-
typeof n == "string" ? r.push(new
|
|
5374
|
+
typeof n == "string" ? r.push(new ur(n)) : n instanceof ur && r.push(n);
|
|
5371
5375
|
}
|
|
5372
|
-
let i =
|
|
5376
|
+
let i = Gn("qName", { xmlVersion: function(e, t) {
|
|
5373
5377
|
if (!Array.isArray(e) || e.length === 0) return "1.0";
|
|
5374
5378
|
let n = e[0];
|
|
5375
|
-
if (
|
|
5379
|
+
if (la(n) === "?xml") {
|
|
5376
5380
|
let e = n[":@"];
|
|
5377
5381
|
if (e) {
|
|
5378
5382
|
let n = t.attributeNamePrefix + "version";
|
|
@@ -5381,73 +5385,73 @@ function na(e, t) {
|
|
|
5381
5385
|
}
|
|
5382
5386
|
return "1.0";
|
|
5383
5387
|
}(e, t) });
|
|
5384
|
-
return
|
|
5388
|
+
return aa(e, t, n, new lr(), r, i);
|
|
5385
5389
|
}
|
|
5386
|
-
function
|
|
5390
|
+
function aa(e, t, n, r, i, a) {
|
|
5387
5391
|
let o = "", s = !1;
|
|
5388
5392
|
if (t.maxNestedTags && r.getDepth() > t.maxNestedTags) throw Error("Maximum nested tags exceeded");
|
|
5389
5393
|
if (!Array.isArray(e)) {
|
|
5390
5394
|
if (e != null) {
|
|
5391
5395
|
let n = X(e);
|
|
5392
|
-
return n =
|
|
5396
|
+
return n = fa(n, t), n;
|
|
5393
5397
|
}
|
|
5394
5398
|
return "";
|
|
5395
5399
|
}
|
|
5396
5400
|
for (let c = 0; c < e.length; c++) {
|
|
5397
|
-
let l = e[c], u =
|
|
5401
|
+
let l = e[c], u = la(l);
|
|
5398
5402
|
if (u === void 0) continue;
|
|
5399
|
-
let d = u === t.textNodeName || u === t.cdataPropName || u === t.commentPropName || u[0] === "?" ? u :
|
|
5403
|
+
let d = u === t.textNodeName || u === t.cdataPropName || u === t.commentPropName || u[0] === "?" ? u : ra(u, !1, t, r, a), f = oa(l[":@"], t);
|
|
5400
5404
|
r.push(d, f);
|
|
5401
|
-
let p =
|
|
5405
|
+
let p = da(r, i);
|
|
5402
5406
|
if (d === t.textNodeName) {
|
|
5403
5407
|
let e = l[u];
|
|
5404
|
-
p || (e = t.tagValueProcessor(d, e), e =
|
|
5408
|
+
p || (e = t.tagValueProcessor(d, e), e = fa(e, t)), e = X(e), s && (o += n), o += e, s = !1, r.pop();
|
|
5405
5409
|
continue;
|
|
5406
5410
|
}
|
|
5407
5411
|
if (d === t.cdataPropName) {
|
|
5408
|
-
s && (o += n), o += `<![CDATA[${
|
|
5412
|
+
s && (o += n), o += `<![CDATA[${na(l[u][0][t.textNodeName])}]]>`, s = !1, r.pop();
|
|
5409
5413
|
continue;
|
|
5410
5414
|
}
|
|
5411
5415
|
if (d === t.commentPropName) {
|
|
5412
|
-
o += n + `\x3c!--${
|
|
5416
|
+
o += n + `\x3c!--${ta(l[u][0][t.textNodeName])}--\x3e`, s = !0, r.pop();
|
|
5413
5417
|
continue;
|
|
5414
5418
|
}
|
|
5415
5419
|
if (d[0] === "?") {
|
|
5416
|
-
o += (d === "?xml" ? "" : n) + `<${d}${
|
|
5420
|
+
o += (d === "?xml" ? "" : n) + `<${d}${ua(l[":@"], t, p, r, a)}?>`, s = !0, r.pop();
|
|
5417
5421
|
continue;
|
|
5418
5422
|
}
|
|
5419
5423
|
let m = n;
|
|
5420
5424
|
m !== "" && (m += t.indentBy);
|
|
5421
|
-
let h = n + `<${d}${
|
|
5422
|
-
g = p ?
|
|
5425
|
+
let h = n + `<${d}${ua(l[":@"], t, p, r, a)}`, g;
|
|
5426
|
+
g = p ? sa(l[u], t) : aa(l[u], t, m, r, i, a), t.unpairedTags.indexOf(d) === -1 ? g && g.length !== 0 || !t.suppressEmptyNode ? g && g.endsWith(">") ? o += h + `>${g}${n}</${d}>` : (o += h + ">", g && n !== "" && (g.includes("/>") || g.includes("</")) ? o += n + t.indentBy + g + n : o += g, o += `</${d}>`) : o += h + "/>" : t.suppressUnpairedNode ? o += h + ">" : o += h + "/>", s = !0, r.pop();
|
|
5423
5427
|
}
|
|
5424
5428
|
return o;
|
|
5425
5429
|
}
|
|
5426
|
-
function
|
|
5430
|
+
function oa(e, t) {
|
|
5427
5431
|
if (!e || t.ignoreAttributes) return null;
|
|
5428
5432
|
let n = {}, r = !1;
|
|
5429
5433
|
for (let i in e) Object.prototype.hasOwnProperty.call(e, i) && (n[i.startsWith(t.attributeNamePrefix) ? i.substr(t.attributeNamePrefix.length) : i] = Z(e[i]), r = !0);
|
|
5430
5434
|
return r ? n : null;
|
|
5431
5435
|
}
|
|
5432
|
-
function
|
|
5436
|
+
function sa(e, t) {
|
|
5433
5437
|
if (!Array.isArray(e)) return e == null ? "" : X(e);
|
|
5434
5438
|
let n = "";
|
|
5435
5439
|
for (let r = 0; r < e.length; r++) {
|
|
5436
|
-
let i = e[r], a =
|
|
5440
|
+
let i = e[r], a = la(i);
|
|
5437
5441
|
if (a === t.textNodeName) n += X(i[a]);
|
|
5438
5442
|
else if (a === t.cdataPropName) n += i[a][0][t.textNodeName];
|
|
5439
5443
|
else if (a === t.commentPropName) n += i[a][0][t.textNodeName];
|
|
5440
5444
|
else {
|
|
5441
5445
|
if (a && a[0] === "?") continue;
|
|
5442
5446
|
if (a) {
|
|
5443
|
-
let e =
|
|
5447
|
+
let e = ca(i[":@"], t), r = sa(i[a], t);
|
|
5444
5448
|
r && r.length !== 0 ? n += `<${a}${e}>${r}</${a}>` : n += `<${a}${e}/>`;
|
|
5445
5449
|
}
|
|
5446
5450
|
}
|
|
5447
5451
|
}
|
|
5448
5452
|
return n;
|
|
5449
5453
|
}
|
|
5450
|
-
function
|
|
5454
|
+
function ca(e, t) {
|
|
5451
5455
|
let n = "";
|
|
5452
5456
|
if (e && !t.ignoreAttributes) for (let r in e) {
|
|
5453
5457
|
if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
|
|
@@ -5456,35 +5460,35 @@ function oa(e, t) {
|
|
|
5456
5460
|
}
|
|
5457
5461
|
return n;
|
|
5458
5462
|
}
|
|
5459
|
-
function
|
|
5463
|
+
function la(e) {
|
|
5460
5464
|
let t = Object.keys(e);
|
|
5461
5465
|
for (let n = 0; n < t.length; n++) {
|
|
5462
5466
|
let r = t[n];
|
|
5463
5467
|
if (Object.prototype.hasOwnProperty.call(e, r) && r !== ":@") return r;
|
|
5464
5468
|
}
|
|
5465
5469
|
}
|
|
5466
|
-
function
|
|
5470
|
+
function ua(e, t, n, r, i) {
|
|
5467
5471
|
let a = "";
|
|
5468
5472
|
if (e && !t.ignoreAttributes) for (let o in e) {
|
|
5469
5473
|
if (!Object.prototype.hasOwnProperty.call(e, o)) continue;
|
|
5470
|
-
let s = o.substr(t.attributeNamePrefix.length), c = n ? s :
|
|
5471
|
-
n ? l = e[o] : (l = t.attributeValueProcessor(o, e[o]), l =
|
|
5474
|
+
let s = o.substr(t.attributeNamePrefix.length), c = n ? s : ra(s, !0, t, r, i), l;
|
|
5475
|
+
n ? l = e[o] : (l = t.attributeValueProcessor(o, e[o]), l = fa(l, t)), !0 === l && t.suppressBooleanAttributes ? a += ` ${c}` : a += ` ${c}="${Z(l)}"`;
|
|
5472
5476
|
}
|
|
5473
5477
|
return a;
|
|
5474
5478
|
}
|
|
5475
|
-
function
|
|
5479
|
+
function da(e, t) {
|
|
5476
5480
|
if (!t || t.length === 0) return !1;
|
|
5477
5481
|
for (let n = 0; n < t.length; n++) if (e.matches(t[n])) return !0;
|
|
5478
5482
|
return !1;
|
|
5479
5483
|
}
|
|
5480
|
-
function
|
|
5484
|
+
function fa(e, t) {
|
|
5481
5485
|
if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
|
|
5482
5486
|
let r = t.entities[n];
|
|
5483
5487
|
e = e.replace(r.regex, r.val);
|
|
5484
5488
|
}
|
|
5485
5489
|
return e;
|
|
5486
5490
|
}
|
|
5487
|
-
var
|
|
5491
|
+
var pa = {
|
|
5488
5492
|
attributeNamePrefix: "@_",
|
|
5489
5493
|
attributesGroupName: !1,
|
|
5490
5494
|
textNodeName: "#text",
|
|
@@ -5534,26 +5538,26 @@ var da = {
|
|
|
5534
5538
|
sanitizeName: !1
|
|
5535
5539
|
};
|
|
5536
5540
|
function Q(e) {
|
|
5537
|
-
if (this.options = Object.assign({},
|
|
5541
|
+
if (this.options = Object.assign({}, pa, e), this.options.stopNodes && Array.isArray(this.options.stopNodes) && (this.options.stopNodes = this.options.stopNodes.map(((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e))), this.stopNodeExpressions = [], this.options.stopNodes && Array.isArray(this.options.stopNodes)) for (let e = 0; e < this.options.stopNodes.length; e++) {
|
|
5538
5542
|
let t = this.options.stopNodes[e];
|
|
5539
|
-
typeof t == "string" ? this.stopNodeExpressions.push(new
|
|
5543
|
+
typeof t == "string" ? this.stopNodeExpressions.push(new ur(t)) : t instanceof ur && this.stopNodeExpressions.push(t);
|
|
5540
5544
|
}
|
|
5541
5545
|
var t;
|
|
5542
5546
|
!0 === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
|
|
5543
5547
|
return !1;
|
|
5544
5548
|
} : (this.ignoreAttributesFn = typeof (t = this.options.ignoreAttributes) == "function" ? t : Array.isArray(t) ? (e) => {
|
|
5545
5549
|
for (let n of t) if (typeof n == "string" && e === n || n instanceof RegExp && n.test(e)) return !0;
|
|
5546
|
-
} : () => !1, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute =
|
|
5550
|
+
} : () => !1, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = _a), this.processTextOrObjNode = ha, this.options.format ? (this.indentate = ga, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
|
|
5547
5551
|
return "";
|
|
5548
5552
|
}, this.tagEndChar = ">", this.newLine = "");
|
|
5549
5553
|
}
|
|
5550
|
-
function
|
|
5554
|
+
function ma(e, t, n, r, i) {
|
|
5551
5555
|
return n.sanitizeName ? i(e) ? e : n.sanitizeName(e, {
|
|
5552
5556
|
isAttribute: t,
|
|
5553
5557
|
matcher: r.readOnly()
|
|
5554
5558
|
}) : e;
|
|
5555
5559
|
}
|
|
5556
|
-
function
|
|
5560
|
+
function ha(e, t, n, r, i) {
|
|
5557
5561
|
let a = this.extractAttributes(e);
|
|
5558
5562
|
if (r.push(t, a), this.checkStopNode(r)) {
|
|
5559
5563
|
let i = this.buildRawContent(e), a = this.buildAttributesForStopNode(e);
|
|
@@ -5562,17 +5566,17 @@ function pa(e, t, n, r, i) {
|
|
|
5562
5566
|
let o = this.j2x(e, n + 1, r, i);
|
|
5563
5567
|
return r.pop(), t[0] === "?" ? this.buildTextValNode("", t, o.attrStr, n, r) : e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, o.attrStr, n, r) : this.buildObjectNode(o.val, t, o.attrStr, n);
|
|
5564
5568
|
}
|
|
5565
|
-
function
|
|
5569
|
+
function ga(e) {
|
|
5566
5570
|
return this.options.indentBy.repeat(e);
|
|
5567
5571
|
}
|
|
5568
|
-
function
|
|
5572
|
+
function _a(e) {
|
|
5569
5573
|
return !(!e.startsWith(this.options.attributeNamePrefix) || e === this.options.textNodeName) && e.substr(this.attrPrefixLen);
|
|
5570
5574
|
}
|
|
5571
5575
|
Q.prototype.build = function(e) {
|
|
5572
|
-
if (this.options.preserveOrder) return
|
|
5576
|
+
if (this.options.preserveOrder) return ia(e, this.options);
|
|
5573
5577
|
{
|
|
5574
5578
|
Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = { [this.options.arrayNodeName]: e });
|
|
5575
|
-
let t = new
|
|
5579
|
+
let t = new lr(), n = Gn("qName", { xmlVersion: function(e, t) {
|
|
5576
5580
|
let n = e["?xml"];
|
|
5577
5581
|
if (n && typeof n == "object") {
|
|
5578
5582
|
if (t.attributesGroupName && n[t.attributesGroupName]) {
|
|
@@ -5592,14 +5596,14 @@ Q.prototype.build = function(e) {
|
|
|
5592
5596
|
let o = this.options.jPath ? n.toString() : n, s = this.checkStopNode(n);
|
|
5593
5597
|
for (let c in e) {
|
|
5594
5598
|
if (!Object.prototype.hasOwnProperty.call(e, c)) continue;
|
|
5595
|
-
let l = c === this.options.textNodeName || c === this.options.cdataPropName || c === this.options.commentPropName || this.options.attributesGroupName && c === this.options.attributesGroupName || this.isAttribute(c) || c[0] === "?" ? c :
|
|
5599
|
+
let l = c === this.options.textNodeName || c === this.options.cdataPropName || c === this.options.commentPropName || this.options.attributesGroupName && c === this.options.attributesGroupName || this.isAttribute(c) || c[0] === "?" ? c : ma(c, !1, this.options, n, r);
|
|
5596
5600
|
if (e[c] === void 0) this.isAttribute(c) && (a += "");
|
|
5597
5601
|
else if (e[c] === null) this.isAttribute(c) || l === this.options.cdataPropName || l === this.options.commentPropName ? a += "" : l[0] === "?" ? a += this.indentate(t) + "<" + l + "?" + this.tagEndChar : a += this.indentate(t) + "<" + l + "/" + this.tagEndChar;
|
|
5598
5602
|
else if (e[c] instanceof Date) a += this.buildTextValNode(e[c], l, "", t, n);
|
|
5599
5603
|
else if (typeof e[c] != "object") {
|
|
5600
5604
|
let u = this.isAttribute(c);
|
|
5601
5605
|
if (u && !this.ignoreAttributesFn(u, o)) {
|
|
5602
|
-
let t =
|
|
5606
|
+
let t = ma(u, !0, this.options, n, r);
|
|
5603
5607
|
i += this.buildAttrPairStr(t, X(e[c]), s);
|
|
5604
5608
|
} else if (!u) {
|
|
5605
5609
|
if (c === this.options.textNodeName) {
|
|
@@ -5643,7 +5647,7 @@ Q.prototype.build = function(e) {
|
|
|
5643
5647
|
} else if (this.options.attributesGroupName && c === this.options.attributesGroupName) {
|
|
5644
5648
|
let t = Object.keys(e[c]), a = t.length;
|
|
5645
5649
|
for (let o = 0; o < a; o++) {
|
|
5646
|
-
let a =
|
|
5650
|
+
let a = ma(t[o], !0, this.options, n, r);
|
|
5647
5651
|
i += this.buildAttrPairStr(a, X(e[c][t[o]]), s);
|
|
5648
5652
|
}
|
|
5649
5653
|
} else a += this.processTextOrObjNode(e[c], l, t, n, r);
|
|
@@ -5711,7 +5715,7 @@ Q.prototype.build = function(e) {
|
|
|
5711
5715
|
if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
|
|
5712
5716
|
{
|
|
5713
5717
|
let i = "</" + t + this.tagEndChar, a = "";
|
|
5714
|
-
return t[0] === "?" && (a = "?", i = ""), !n && n !== "" || e.indexOf("<") !== -1 ? !1 !== this.options.commentPropName && t === this.options.commentPropName && a.length === 0 ? this.indentate(r) + `\x3c!--${
|
|
5718
|
+
return t[0] === "?" && (a = "?", i = ""), !n && n !== "" || e.indexOf("<") !== -1 ? !1 !== this.options.commentPropName && t === this.options.commentPropName && a.length === 0 ? this.indentate(r) + `\x3c!--${ta(e)}--\x3e` + this.newLine : this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i : this.indentate(r) + "<" + t + n + a + ">" + e + i;
|
|
5715
5719
|
}
|
|
5716
5720
|
}, Q.prototype.closeTag = function(e) {
|
|
5717
5721
|
let t = "";
|
|
@@ -5722,11 +5726,11 @@ Q.prototype.build = function(e) {
|
|
|
5722
5726
|
return !1;
|
|
5723
5727
|
}, Q.prototype.buildTextValNode = function(e, t, n, r, i) {
|
|
5724
5728
|
if (!1 !== this.options.cdataPropName && t === this.options.cdataPropName) {
|
|
5725
|
-
let t =
|
|
5729
|
+
let t = na(e);
|
|
5726
5730
|
return this.indentate(r) + `<![CDATA[${t}]]>` + this.newLine;
|
|
5727
5731
|
}
|
|
5728
5732
|
if (!1 !== this.options.commentPropName && t === this.options.commentPropName) {
|
|
5729
|
-
let t =
|
|
5733
|
+
let t = ta(e);
|
|
5730
5734
|
return this.indentate(r) + `\x3c!--${t}--\x3e` + this.newLine;
|
|
5731
5735
|
}
|
|
5732
5736
|
if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
|
|
@@ -5741,29 +5745,29 @@ Q.prototype.build = function(e) {
|
|
|
5741
5745
|
}
|
|
5742
5746
|
return e;
|
|
5743
5747
|
};
|
|
5744
|
-
var
|
|
5745
|
-
function
|
|
5746
|
-
return new
|
|
5748
|
+
var va = Q;
|
|
5749
|
+
function ya(e) {
|
|
5750
|
+
return new va({
|
|
5747
5751
|
attributeNamePrefix: "@_",
|
|
5748
5752
|
format: !0,
|
|
5749
5753
|
ignoreAttributes: !1,
|
|
5750
5754
|
suppressEmptyNode: !0
|
|
5751
|
-
}).build(
|
|
5755
|
+
}).build(ba({ lockinfo: {
|
|
5752
5756
|
"@_xmlns:d": "DAV:",
|
|
5753
5757
|
lockscope: { exclusive: {} },
|
|
5754
5758
|
locktype: { write: {} },
|
|
5755
5759
|
owner: { href: e }
|
|
5756
5760
|
} }, "d"));
|
|
5757
5761
|
}
|
|
5758
|
-
function
|
|
5762
|
+
function ba(e, t) {
|
|
5759
5763
|
let n = { ...e };
|
|
5760
|
-
for (let e in n) n.hasOwnProperty(e) && (n[e] && typeof n[e] == "object" && e.indexOf(":") === -1 ? (n[`${t}:${e}`] =
|
|
5764
|
+
for (let e in n) n.hasOwnProperty(e) && (n[e] && typeof n[e] == "object" && e.indexOf(":") === -1 ? (n[`${t}:${e}`] = ba(n[e], t), delete n[e]) : !1 === /^@_/.test(e) && (n[`${t}:${e}`] = n[e], delete n[e]));
|
|
5761
5765
|
return n;
|
|
5762
5766
|
}
|
|
5763
|
-
function
|
|
5767
|
+
function xa(e, t, n) {
|
|
5764
5768
|
return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
|
|
5765
5769
|
}
|
|
5766
|
-
function
|
|
5770
|
+
function Sa(e) {
|
|
5767
5771
|
return function() {
|
|
5768
5772
|
var t = [...arguments];
|
|
5769
5773
|
try {
|
|
@@ -5773,45 +5777,45 @@ function ba(e) {
|
|
|
5773
5777
|
}
|
|
5774
5778
|
};
|
|
5775
5779
|
}
|
|
5776
|
-
var
|
|
5777
|
-
return
|
|
5780
|
+
var Ca = Sa((function(e, t, n, r = {}) {
|
|
5781
|
+
return xa(F(I({
|
|
5778
5782
|
url: M(e.remoteURL, j(t)),
|
|
5779
5783
|
method: "UNLOCK",
|
|
5780
5784
|
headers: { "Lock-Token": n }
|
|
5781
5785
|
}, e, r), e), (function(t) {
|
|
5782
|
-
if (V(e, t), t.status !== 204 && t.status !== 200) throw
|
|
5786
|
+
if (V(e, t), t.status !== 204 && t.status !== 200) throw yn(t);
|
|
5783
5787
|
}));
|
|
5784
|
-
})),
|
|
5785
|
-
let { refreshToken: r, timeout: i =
|
|
5788
|
+
})), wa = Sa((function(e, t, n = {}) {
|
|
5789
|
+
let { refreshToken: r, timeout: i = Ta } = n, a = {
|
|
5786
5790
|
Accept: "text/plain,application/xml",
|
|
5787
5791
|
Timeout: i
|
|
5788
5792
|
};
|
|
5789
|
-
return r && (a.If = r),
|
|
5793
|
+
return r && (a.If = r), xa(F(I({
|
|
5790
5794
|
url: M(e.remoteURL, j(t)),
|
|
5791
5795
|
method: "LOCK",
|
|
5792
5796
|
headers: a,
|
|
5793
|
-
data:
|
|
5797
|
+
data: ya(e.contactHref)
|
|
5794
5798
|
}, e, n), e), (function(t) {
|
|
5795
|
-
return V(e, t),
|
|
5799
|
+
return V(e, t), xa(t.text(), (function(e) {
|
|
5796
5800
|
let n = function(e) {
|
|
5797
|
-
return new
|
|
5801
|
+
return new gi({
|
|
5798
5802
|
removeNSPrefix: !0,
|
|
5799
5803
|
parseAttributeValue: !0,
|
|
5800
5804
|
parseTagValue: !0
|
|
5801
5805
|
}).parse(e);
|
|
5802
5806
|
}(e), r = J().get(n, "prop.lockdiscovery.activelock.locktoken.href"), i = J().get(n, "prop.lockdiscovery.activelock.timeout");
|
|
5803
|
-
if (!r) throw
|
|
5807
|
+
if (!r) throw yn(t, "No lock token received: ");
|
|
5804
5808
|
return {
|
|
5805
5809
|
token: r,
|
|
5806
5810
|
serverTimeout: i
|
|
5807
5811
|
};
|
|
5808
5812
|
}));
|
|
5809
5813
|
}));
|
|
5810
|
-
})),
|
|
5811
|
-
function
|
|
5814
|
+
})), Ta = "Infinite, Second-4100000000";
|
|
5815
|
+
function Ea(e, t, n) {
|
|
5812
5816
|
return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
|
|
5813
5817
|
}
|
|
5814
|
-
var
|
|
5818
|
+
var Da = function(e) {
|
|
5815
5819
|
return function() {
|
|
5816
5820
|
var t = [...arguments];
|
|
5817
5821
|
try {
|
|
@@ -5822,7 +5826,7 @@ var Ta = function(e) {
|
|
|
5822
5826
|
};
|
|
5823
5827
|
}((function(e, t = {}) {
|
|
5824
5828
|
let n = t.path || "/";
|
|
5825
|
-
return
|
|
5829
|
+
return Ea(F(I({
|
|
5826
5830
|
url: M(e.remoteURL, n),
|
|
5827
5831
|
method: "PROPFIND",
|
|
5828
5832
|
headers: {
|
|
@@ -5830,14 +5834,14 @@ var Ta = function(e) {
|
|
|
5830
5834
|
Depth: "0"
|
|
5831
5835
|
}
|
|
5832
5836
|
}, e, t), e), (function(n) {
|
|
5833
|
-
return V(e, n),
|
|
5834
|
-
return
|
|
5835
|
-
return
|
|
5837
|
+
return V(e, n), Ea(n.text(), (function(r) {
|
|
5838
|
+
return Ea(Ti(r, e.parsing), (function(e) {
|
|
5839
|
+
return bn(n, function(e) {
|
|
5836
5840
|
try {
|
|
5837
5841
|
let [t] = e.multistatus.response, { propstat: { prop: { "quota-used-bytes": n, "quota-available-bytes": r } } } = t;
|
|
5838
5842
|
return n !== void 0 && r !== void 0 ? {
|
|
5839
5843
|
used: parseInt(String(n), 10),
|
|
5840
|
-
available:
|
|
5844
|
+
available: Oi(r)
|
|
5841
5845
|
} : null;
|
|
5842
5846
|
} catch {}
|
|
5843
5847
|
return null;
|
|
@@ -5846,10 +5850,10 @@ var Ta = function(e) {
|
|
|
5846
5850
|
}));
|
|
5847
5851
|
}));
|
|
5848
5852
|
}));
|
|
5849
|
-
function
|
|
5853
|
+
function Oa(e, t, n) {
|
|
5850
5854
|
return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
|
|
5851
5855
|
}
|
|
5852
|
-
var
|
|
5856
|
+
var ka = function(e) {
|
|
5853
5857
|
return function() {
|
|
5854
5858
|
var t = [...arguments];
|
|
5855
5859
|
try {
|
|
@@ -5860,7 +5864,7 @@ var Da = function(e) {
|
|
|
5860
5864
|
};
|
|
5861
5865
|
}((function(e, t, n = {}) {
|
|
5862
5866
|
let { details: r = !1 } = n;
|
|
5863
|
-
return
|
|
5867
|
+
return Oa(F(I({
|
|
5864
5868
|
url: M(e.remoteURL, j(t)),
|
|
5865
5869
|
method: "SEARCH",
|
|
5866
5870
|
headers: {
|
|
@@ -5868,9 +5872,9 @@ var Da = function(e) {
|
|
|
5868
5872
|
"Content-Type": e.headers["Content-Type"] || "application/xml; charset=utf-8"
|
|
5869
5873
|
}
|
|
5870
5874
|
}, e, n), e), (function(n) {
|
|
5871
|
-
return V(e, n),
|
|
5872
|
-
return
|
|
5873
|
-
return
|
|
5875
|
+
return V(e, n), Oa(n.text(), (function(i) {
|
|
5876
|
+
return Oa(Ti(i, e.parsing), (function(e) {
|
|
5877
|
+
return bn(n, function(e, t, n) {
|
|
5874
5878
|
let r = {
|
|
5875
5879
|
truncated: !1,
|
|
5876
5880
|
results: []
|
|
@@ -5878,13 +5882,13 @@ var Da = function(e) {
|
|
|
5878
5882
|
return r.truncated = e.multistatus.response.some(((e) => (e.status || e.propstat?.status).split(" ", 3)?.[1] === "507" && e.href.replace(/\/$/, "").endsWith(j(t).replace(/\/$/, "")))), e.multistatus.response.forEach(((e) => {
|
|
5879
5883
|
if (e.propstat === void 0) return;
|
|
5880
5884
|
let t = e.href.split("/").map(decodeURIComponent).join("/");
|
|
5881
|
-
r.results.push(
|
|
5885
|
+
r.results.push(Ei(e.propstat.prop, t, n));
|
|
5882
5886
|
})), r;
|
|
5883
5887
|
}(e, t, r), r);
|
|
5884
5888
|
}));
|
|
5885
5889
|
}));
|
|
5886
5890
|
}));
|
|
5887
|
-
})),
|
|
5891
|
+
})), Aa = function(e) {
|
|
5888
5892
|
return function() {
|
|
5889
5893
|
var t = [...arguments];
|
|
5890
5894
|
try {
|
|
@@ -5906,14 +5910,14 @@ var Da = function(e) {
|
|
|
5906
5910
|
V(e, t);
|
|
5907
5911
|
}, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
|
|
5908
5912
|
var a, o;
|
|
5909
|
-
})),
|
|
5910
|
-
function
|
|
5911
|
-
if (
|
|
5912
|
-
if (
|
|
5913
|
-
if (typeof e == "string") return (0,
|
|
5913
|
+
})), ja = k(172);
|
|
5914
|
+
function Ma(e) {
|
|
5915
|
+
if (yt(e)) return e.byteLength;
|
|
5916
|
+
if (bt(e)) return e.length;
|
|
5917
|
+
if (typeof e == "string") return (0, ja.d)(e);
|
|
5914
5918
|
throw new A({ info: { code: P.DataTypeNoLength } }, "Cannot calculate data length: Invalid type");
|
|
5915
5919
|
}
|
|
5916
|
-
var
|
|
5920
|
+
var Na = function(e) {
|
|
5917
5921
|
return function() {
|
|
5918
5922
|
var t = [...arguments];
|
|
5919
5923
|
try {
|
|
@@ -5924,7 +5928,7 @@ var ja = function(e) {
|
|
|
5924
5928
|
};
|
|
5925
5929
|
}((function(e, t, n, r = {}) {
|
|
5926
5930
|
let { contentLength: i = !0, overwrite: a = !0 } = r, o = { "Content-Type": "application/octet-stream" };
|
|
5927
|
-
!1 === i || (o["Content-Length"] = typeof i == "number" ? `${i}` : `${
|
|
5931
|
+
!1 === i || (o["Content-Length"] = typeof i == "number" ? `${i}` : `${Ma(n)}`), a || (o["If-None-Match"] = "*");
|
|
5928
5932
|
let s = I({
|
|
5929
5933
|
url: M(e.remoteURL, j(t)),
|
|
5930
5934
|
method: "PUT",
|
|
@@ -5942,7 +5946,7 @@ var ja = function(e) {
|
|
|
5942
5946
|
return !0;
|
|
5943
5947
|
}, (c = F(s, e)) && c.then || (c = Promise.resolve(c)), l ? c.then(l) : c;
|
|
5944
5948
|
var c, l;
|
|
5945
|
-
})),
|
|
5949
|
+
})), Pa = function(e) {
|
|
5946
5950
|
return function() {
|
|
5947
5951
|
var t = [...arguments];
|
|
5948
5952
|
try {
|
|
@@ -5969,17 +5973,17 @@ var ja = function(e) {
|
|
|
5969
5973
|
}, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
|
|
5970
5974
|
var i, a;
|
|
5971
5975
|
}));
|
|
5972
|
-
function
|
|
5976
|
+
function Fa(e, t, n) {
|
|
5973
5977
|
return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
|
|
5974
5978
|
}
|
|
5975
|
-
var
|
|
5979
|
+
var Ia = za((function(e, t, n, r, i, a = {}) {
|
|
5976
5980
|
if (n > r || n < 0) throw new A({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
|
|
5977
5981
|
let o = {
|
|
5978
5982
|
"Content-Type": "application/octet-stream",
|
|
5979
5983
|
"Content-Length": "" + (r - n + 1),
|
|
5980
5984
|
"Content-Range": `bytes ${n}-${r}/*`
|
|
5981
5985
|
};
|
|
5982
|
-
return
|
|
5986
|
+
return Fa(F(I({
|
|
5983
5987
|
url: M(e.remoteURL, j(t)),
|
|
5984
5988
|
method: "PUT",
|
|
5985
5989
|
headers: o,
|
|
@@ -5988,18 +5992,18 @@ var Pa = La((function(e, t, n, r, i, a = {}) {
|
|
|
5988
5992
|
V(e, t);
|
|
5989
5993
|
}));
|
|
5990
5994
|
}));
|
|
5991
|
-
function
|
|
5995
|
+
function La(e, t) {
|
|
5992
5996
|
var n = e();
|
|
5993
5997
|
return n && n.then ? n.then(t) : t(n);
|
|
5994
5998
|
}
|
|
5995
|
-
var
|
|
5999
|
+
var Ra = za((function(e, t, n, r, i, a = {}) {
|
|
5996
6000
|
if (n > r || n < 0) throw new A({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
|
|
5997
6001
|
let o = {
|
|
5998
6002
|
"Content-Type": "application/x-sabredav-partialupdate",
|
|
5999
6003
|
"Content-Length": "" + (r - n + 1),
|
|
6000
6004
|
"X-Update-Range": `bytes=${n}-${r}`
|
|
6001
6005
|
};
|
|
6002
|
-
return
|
|
6006
|
+
return Fa(F(I({
|
|
6003
6007
|
url: M(e.remoteURL, j(t)),
|
|
6004
6008
|
method: "PATCH",
|
|
6005
6009
|
headers: o,
|
|
@@ -6008,7 +6012,7 @@ var Ia = La((function(e, t, n, r, i, a = {}) {
|
|
|
6008
6012
|
V(e, t);
|
|
6009
6013
|
}));
|
|
6010
6014
|
}));
|
|
6011
|
-
function
|
|
6015
|
+
function za(e) {
|
|
6012
6016
|
return function() {
|
|
6013
6017
|
var t = [...arguments];
|
|
6014
6018
|
try {
|
|
@@ -6018,17 +6022,17 @@ function La(e) {
|
|
|
6018
6022
|
}
|
|
6019
6023
|
};
|
|
6020
6024
|
}
|
|
6021
|
-
var
|
|
6022
|
-
return
|
|
6025
|
+
var Ba = za((function(e, t, n, r, i, a = {}) {
|
|
6026
|
+
return Fa(Pa(e, t, a), (function(o) {
|
|
6023
6027
|
let s = !1;
|
|
6024
|
-
return
|
|
6025
|
-
if (o.compliance.includes("sabredav-partialupdate")) return
|
|
6028
|
+
return La((function() {
|
|
6029
|
+
if (o.compliance.includes("sabredav-partialupdate")) return Fa(Ra(e, t, n, r, i, a), (function(e) {
|
|
6026
6030
|
return s = !0, e;
|
|
6027
6031
|
}));
|
|
6028
6032
|
}), (function(c) {
|
|
6029
6033
|
let l = !1;
|
|
6030
|
-
return s ? c :
|
|
6031
|
-
if (o.server.includes("Apache") && o.compliance.includes("<http://apache.org/dav/propset/fs/1>")) return
|
|
6034
|
+
return s ? c : La((function() {
|
|
6035
|
+
if (o.server.includes("Apache") && o.compliance.includes("<http://apache.org/dav/propset/fs/1>")) return Fa(Ia(e, t, n, r, i, a), (function(e) {
|
|
6032
6036
|
return l = !0, e;
|
|
6033
6037
|
}));
|
|
6034
6038
|
}), (function(e) {
|
|
@@ -6037,9 +6041,9 @@ var Ra = La((function(e, t, n, r, i, a = {}) {
|
|
|
6037
6041
|
}));
|
|
6038
6042
|
}));
|
|
6039
6043
|
}));
|
|
6040
|
-
})),
|
|
6041
|
-
function
|
|
6042
|
-
let { authType: n = null, remoteBasePath: r, contactHref: i =
|
|
6044
|
+
})), Va = "https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";
|
|
6045
|
+
function Ha(e, t = {}) {
|
|
6046
|
+
let { authType: n = null, remoteBasePath: r, contactHref: i = Va, entityDecoder: a, ha1: o, headers: s = {}, httpAgent: c, httpsAgent: l, password: u, token: d, username: f, withCredentials: p } = t, m = n;
|
|
6043
6047
|
m ||= f || u ? N.Password : N.None;
|
|
6044
6048
|
let h = {
|
|
6045
6049
|
authType: m,
|
|
@@ -6054,27 +6058,27 @@ function Ba(e, t = {}) {
|
|
|
6054
6058
|
attributeNamePrefix: t.attributeNamePrefix ?? "@",
|
|
6055
6059
|
attributeParsers: [],
|
|
6056
6060
|
entityDecoder: a,
|
|
6057
|
-
tagParsers: [
|
|
6061
|
+
tagParsers: [xi]
|
|
6058
6062
|
},
|
|
6059
|
-
remotePath:
|
|
6063
|
+
remotePath: Je(e),
|
|
6060
6064
|
remoteURL: e,
|
|
6061
6065
|
token: d,
|
|
6062
6066
|
username: f,
|
|
6063
6067
|
withCredentials: p
|
|
6064
6068
|
};
|
|
6065
|
-
return
|
|
6066
|
-
copyFile: (e, t, n) =>
|
|
6067
|
-
createDirectory: (e, t) =>
|
|
6069
|
+
return rt(h, f, u, d, o), {
|
|
6070
|
+
copyFile: (e, t, n) => xn(h, e, t, n),
|
|
6071
|
+
createDirectory: (e, t) => zi(h, e, t),
|
|
6068
6072
|
createReadStream: (e, t) => function(e, t, n = {}) {
|
|
6069
|
-
let r = new (
|
|
6070
|
-
return
|
|
6073
|
+
let r = new (Vi()).PassThrough();
|
|
6074
|
+
return Hi(e, t, n).then(((e) => {
|
|
6071
6075
|
e.pipe(r);
|
|
6072
6076
|
})).catch(((e) => {
|
|
6073
6077
|
r.emit("error", e);
|
|
6074
6078
|
})), r;
|
|
6075
6079
|
}(h, e, t),
|
|
6076
|
-
createWriteStream: (e, t, n) => function(e, t, n = {}, r =
|
|
6077
|
-
let i = new (
|
|
6080
|
+
createWriteStream: (e, t, n) => function(e, t, n = {}, r = Ui) {
|
|
6081
|
+
let i = new (Vi()).PassThrough(), a = {};
|
|
6078
6082
|
return !1 === n.overwrite && (a["If-None-Match"] = "*"), F(I({
|
|
6079
6083
|
url: M(e.remoteURL, j(t)),
|
|
6080
6084
|
method: "PUT",
|
|
@@ -6089,17 +6093,17 @@ function Ba(e, t = {}) {
|
|
|
6089
6093
|
i.emit("error", e);
|
|
6090
6094
|
})), i;
|
|
6091
6095
|
}(h, e, t, n),
|
|
6092
|
-
customRequest: (e, t) =>
|
|
6093
|
-
deleteFile: (e, t) =>
|
|
6094
|
-
exists: (e, t) =>
|
|
6095
|
-
getDirectoryContents: (e, t) =>
|
|
6096
|
-
getFileContents: (e, t) =>
|
|
6096
|
+
customRequest: (e, t) => Wi(h, e, t),
|
|
6097
|
+
deleteFile: (e, t) => Gi(h, e, t),
|
|
6098
|
+
exists: (e, t) => Ki(h, e, t),
|
|
6099
|
+
getDirectoryContents: (e, t) => Ji(h, e, t),
|
|
6100
|
+
getFileContents: (e, t) => $i(h, e, t),
|
|
6097
6101
|
getFileDownloadLink: (e) => function(e, t) {
|
|
6098
6102
|
let n = M(e.remoteURL, j(t)), r = /^https:/i.test(n) ? "https" : "http";
|
|
6099
6103
|
switch (e.authType) {
|
|
6100
6104
|
case N.None: break;
|
|
6101
6105
|
case N.Password: {
|
|
6102
|
-
let t =
|
|
6106
|
+
let t = tt(e.headers.Authorization.replace(/^Basic /i, "").trim());
|
|
6103
6107
|
n = n.replace(/^https?:\/\//, `${r}://${t}@`);
|
|
6104
6108
|
break;
|
|
6105
6109
|
}
|
|
@@ -6112,7 +6116,7 @@ function Ba(e, t = {}) {
|
|
|
6112
6116
|
switch (e.authType) {
|
|
6113
6117
|
case N.None: break;
|
|
6114
6118
|
case N.Password: {
|
|
6115
|
-
let t =
|
|
6119
|
+
let t = tt(e.headers.Authorization.replace(/^Basic /i, "").trim());
|
|
6116
6120
|
n = n.replace(/^https?:\/\//, `${r}://${t}@`);
|
|
6117
6121
|
break;
|
|
6118
6122
|
}
|
|
@@ -6121,18 +6125,18 @@ function Ba(e, t = {}) {
|
|
|
6121
6125
|
return n;
|
|
6122
6126
|
}(h, e),
|
|
6123
6127
|
getHeaders: () => Object.assign({}, h.headers),
|
|
6124
|
-
getQuota: (e) =>
|
|
6125
|
-
lock: (e, t) =>
|
|
6126
|
-
moveFile: (e, t, n) =>
|
|
6127
|
-
putFileContents: (e, t, n) =>
|
|
6128
|
-
partialUpdateFileContents: (e, t, n, r, i) =>
|
|
6129
|
-
getDAVCompliance: (e) =>
|
|
6130
|
-
search: (e, t) =>
|
|
6128
|
+
getQuota: (e) => Da(h, e),
|
|
6129
|
+
lock: (e, t) => wa(h, e, t),
|
|
6130
|
+
moveFile: (e, t, n) => Aa(h, e, t, n),
|
|
6131
|
+
putFileContents: (e, t, n) => Na(h, e, t, n),
|
|
6132
|
+
partialUpdateFileContents: (e, t, n, r, i) => Ba(h, e, t, n, r, i),
|
|
6133
|
+
getDAVCompliance: (e) => Pa(h, e),
|
|
6134
|
+
search: (e, t) => ka(h, e, t),
|
|
6131
6135
|
setHeaders: (e) => {
|
|
6132
6136
|
h.headers = Object.assign({}, e);
|
|
6133
6137
|
},
|
|
6134
|
-
stat: (e, t) =>
|
|
6135
|
-
unlock: (e, t, n) =>
|
|
6138
|
+
stat: (e, t) => Ai(h, e, t),
|
|
6139
|
+
unlock: (e, t, n) => Ca(h, e, t, n),
|
|
6136
6140
|
registerAttributeParser: (e) => {
|
|
6137
6141
|
h.parsing.attributeParsers.push(e);
|
|
6138
6142
|
},
|
|
@@ -6141,103 +6145,99 @@ function Ba(e, t = {}) {
|
|
|
6141
6145
|
}
|
|
6142
6146
|
};
|
|
6143
6147
|
}
|
|
6144
|
-
|
|
6145
|
-
//#region ../../node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/stringify.js
|
|
6148
|
+
// ../../node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/stringify.js
|
|
6146
6149
|
var $ = [];
|
|
6147
6150
|
for (let e = 0; e < 256; ++e) $.push((e + 256).toString(16).slice(1));
|
|
6148
|
-
function
|
|
6151
|
+
function Ua(e, t = 0) {
|
|
6149
6152
|
return ($[e[t + 0]] + $[e[t + 1]] + $[e[t + 2]] + $[e[t + 3]] + "-" + $[e[t + 4]] + $[e[t + 5]] + "-" + $[e[t + 6]] + $[e[t + 7]] + "-" + $[e[t + 8]] + $[e[t + 9]] + "-" + $[e[t + 10]] + $[e[t + 11]] + $[e[t + 12]] + $[e[t + 13]] + $[e[t + 14]] + $[e[t + 15]]).toLowerCase();
|
|
6150
6153
|
}
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
return crypto.getRandomValues(Ha);
|
|
6154
|
+
// ../../node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/rng.js
|
|
6155
|
+
var Wa = /* @__PURE__ */ new Uint8Array(16);
|
|
6156
|
+
function Ga() {
|
|
6157
|
+
return crypto.getRandomValues(Wa);
|
|
6156
6158
|
}
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
return !t && !e && crypto.randomUUID ? crypto.randomUUID() : Ga(e, t, n);
|
|
6159
|
+
// ../../node_modules/.pnpm/uuid@14.0.3/node_modules/uuid/dist/v4.js
|
|
6160
|
+
function Ka(e, t, n) {
|
|
6161
|
+
return !t && !e && crypto.randomUUID ? crypto.randomUUID() : qa(e, t, n);
|
|
6161
6162
|
}
|
|
6162
|
-
function
|
|
6163
|
+
function qa(e, t, n) {
|
|
6163
6164
|
e ||= {};
|
|
6164
|
-
let r = e.random ?? e.rng?.() ??
|
|
6165
|
+
let r = e.random ?? e.rng?.() ?? Ga();
|
|
6165
6166
|
if (r.length < 16) throw Error("Random bytes length must be >= 16");
|
|
6166
6167
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
6167
6168
|
if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
|
|
6168
6169
|
for (let e = 0; e < 16; ++e) t[n + e] = r[e];
|
|
6169
6170
|
return t;
|
|
6170
6171
|
}
|
|
6171
|
-
return
|
|
6172
|
+
return Ua(r);
|
|
6172
6173
|
}
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
let t = Object.fromEntries(Object.entries(u).map(([e, t]) => [`@@xmlns:${e}`, t]));
|
|
6174
|
+
// src/webdav/client/builders.ts
|
|
6175
|
+
var Ja = (e) => {
|
|
6176
|
+
let t = Object.fromEntries(Object.entries(c).map(([e, t]) => [`@@xmlns:${e}`, t]));
|
|
6177
6177
|
for (let n of e) {
|
|
6178
6178
|
let [e] = n.split(":");
|
|
6179
6179
|
e && e !== n && !(`@@xmlns:${e}` in t) && (t[`@@xmlns:${e}`] = e);
|
|
6180
6180
|
}
|
|
6181
6181
|
return t;
|
|
6182
|
-
},
|
|
6182
|
+
}, Ya = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includes(e) ? [e, n || ""] : [i.DavNamespace.includes(e) ? `d:${e}` : `oc:${e}`, n || ""])), Xa = (e = [], { pattern: t, filterRules: n, limit: r = 0, extraProps: i = [] }) => {
|
|
6183
6183
|
let a = "d:propfind";
|
|
6184
6184
|
t && (a = "oc:search-files"), n && (a = "oc:filter-files");
|
|
6185
6185
|
let o = e.reduce((e, t) => Object.assign(e, { [t]: null }), {});
|
|
6186
6186
|
for (let e of i) e in o || (o[e] = null);
|
|
6187
|
-
let s =
|
|
6187
|
+
let s = Ya(o, i), c = { [a]: {
|
|
6188
6188
|
"d:prop": s,
|
|
6189
|
-
...
|
|
6189
|
+
...Ja(i),
|
|
6190
6190
|
...t && { "oc:search": {
|
|
6191
6191
|
"oc:pattern": t,
|
|
6192
6192
|
"oc:limit": r
|
|
6193
6193
|
} },
|
|
6194
|
-
...n && { "oc:filter-rules":
|
|
6194
|
+
...n && { "oc:filter-rules": Ya(n, []) }
|
|
6195
6195
|
} };
|
|
6196
|
-
return new
|
|
6196
|
+
return new ye({
|
|
6197
6197
|
format: !0,
|
|
6198
6198
|
ignoreAttributes: !1,
|
|
6199
6199
|
attributeNamePrefix: "@@",
|
|
6200
6200
|
suppressEmptyNode: !0
|
|
6201
6201
|
}).build(c);
|
|
6202
|
-
},
|
|
6202
|
+
}, Za = (e, t = []) => {
|
|
6203
6203
|
let n = { "d:propertyupdate": {
|
|
6204
|
-
"d:set": { "d:prop":
|
|
6205
|
-
...
|
|
6204
|
+
"d:set": { "d:prop": Ya(e, t) },
|
|
6205
|
+
...Ja(t)
|
|
6206
6206
|
} };
|
|
6207
|
-
return new
|
|
6207
|
+
return new ye({
|
|
6208
6208
|
format: !0,
|
|
6209
6209
|
ignoreAttributes: !1,
|
|
6210
6210
|
attributeNamePrefix: "@@",
|
|
6211
6211
|
suppressEmptyNode: !0
|
|
6212
6212
|
}).build(n);
|
|
6213
|
-
},
|
|
6213
|
+
}, Qa = (e) => {
|
|
6214
6214
|
let t = {}, n = e.get("tus-version");
|
|
6215
6215
|
return n ? (t.version = n.split(","), e.get("tus-extension") && (t.extension = e.get("tus-extension").split(",")), e.get("tus-resumable") && (t.resumable = e.get("tus-resumable")), e.get("tus-max-size") && (t.maxSize = parseInt(e.get("tus-max-size"), 10)), t) : null;
|
|
6216
6216
|
};
|
|
6217
|
-
function
|
|
6217
|
+
function $a(e, t) {
|
|
6218
6218
|
if (!e.endsWith("propstat.prop.displayname")) return t;
|
|
6219
6219
|
}
|
|
6220
|
-
var
|
|
6220
|
+
var eo = async (e) => {
|
|
6221
6221
|
let t = (e) => {
|
|
6222
6222
|
let t = decodeURIComponent(e);
|
|
6223
|
-
return e?.startsWith("/dav/") ?
|
|
6223
|
+
return e?.startsWith("/dav/") ? p(t.replace("/dav/", ""), {
|
|
6224
6224
|
leadingSlash: !0,
|
|
6225
6225
|
trailingSlash: !1
|
|
6226
6226
|
}) : t;
|
|
6227
6227
|
};
|
|
6228
|
-
return (await
|
|
6228
|
+
return (await Ti(e, {
|
|
6229
6229
|
attributeNamePrefix: "@",
|
|
6230
6230
|
attributeParsers: [],
|
|
6231
|
-
tagParsers: [
|
|
6231
|
+
tagParsers: [$a],
|
|
6232
6232
|
entityDecoder: {}
|
|
6233
6233
|
})).multistatus.response.map(({ href: e, propstat: n }) => {
|
|
6234
6234
|
let r = {
|
|
6235
|
-
...
|
|
6235
|
+
...Ei(n.prop, t(e), !0),
|
|
6236
6236
|
processing: n.status === "HTTP/1.1 425 TOO EARLY"
|
|
6237
6237
|
};
|
|
6238
6238
|
return r.props.name && (r.props.name = r.props.name.toString()), r;
|
|
6239
6239
|
});
|
|
6240
|
-
},
|
|
6240
|
+
}, to = (e) => {
|
|
6241
6241
|
let t = new g(), n = {
|
|
6242
6242
|
message: "Unknown error",
|
|
6243
6243
|
errorCode: void 0,
|
|
@@ -6260,18 +6260,18 @@ var Qa = async (e) => {
|
|
|
6260
6260
|
return n;
|
|
6261
6261
|
}
|
|
6262
6262
|
return n;
|
|
6263
|
-
},
|
|
6263
|
+
}, no = class {
|
|
6264
6264
|
client;
|
|
6265
6265
|
davPath;
|
|
6266
6266
|
headers;
|
|
6267
6267
|
withCredentials;
|
|
6268
6268
|
extraProps;
|
|
6269
6269
|
constructor({ baseUrl: e, headers: t, withCredentials: n }) {
|
|
6270
|
-
this.davPath =
|
|
6270
|
+
this.davPath = p(e, "dav"), this.client = Ha(this.davPath, {}), this.headers = t, this.withCredentials = n, this.extraProps = [];
|
|
6271
6271
|
}
|
|
6272
6272
|
mkcol(e, t = {}) {
|
|
6273
6273
|
return this.request(e, {
|
|
6274
|
-
method:
|
|
6274
|
+
method: s.mkcol,
|
|
6275
6275
|
...t
|
|
6276
6276
|
});
|
|
6277
6277
|
}
|
|
@@ -6279,18 +6279,18 @@ var Qa = async (e) => {
|
|
|
6279
6279
|
let o = {
|
|
6280
6280
|
...i,
|
|
6281
6281
|
Depth: t.toString()
|
|
6282
|
-
}, { body:
|
|
6283
|
-
method:
|
|
6284
|
-
data:
|
|
6282
|
+
}, { body: c, result: l } = await this.request(e, {
|
|
6283
|
+
method: s.propfind,
|
|
6284
|
+
data: Xa(n, { extraProps: [...this.extraProps, ...r] }),
|
|
6285
6285
|
headers: o,
|
|
6286
6286
|
...a
|
|
6287
6287
|
});
|
|
6288
|
-
return
|
|
6288
|
+
return c?.length && (c[0].tusSupport = Qa(l.headers)), c;
|
|
6289
6289
|
}
|
|
6290
6290
|
async report(e, { pattern: t = "", filterRules: n = null, limit: r = 30, properties: i, ...a } = {}) {
|
|
6291
|
-
let { body: o, result:
|
|
6292
|
-
method:
|
|
6293
|
-
data:
|
|
6291
|
+
let { body: o, result: c } = await this.request(e, {
|
|
6292
|
+
method: s.report,
|
|
6293
|
+
data: Xa(i, {
|
|
6294
6294
|
pattern: t,
|
|
6295
6295
|
filterRules: n,
|
|
6296
6296
|
limit: r,
|
|
@@ -6300,71 +6300,71 @@ var Qa = async (e) => {
|
|
|
6300
6300
|
});
|
|
6301
6301
|
return {
|
|
6302
6302
|
results: o,
|
|
6303
|
-
range:
|
|
6303
|
+
range: c.headers.get("content-range")
|
|
6304
6304
|
};
|
|
6305
6305
|
}
|
|
6306
|
-
copy(e, t, { overwrite: n = !1, headers: r = {}, ...
|
|
6307
|
-
let
|
|
6306
|
+
copy(e, t, { overwrite: n = !1, headers: r = {}, ...i } = {}) {
|
|
6307
|
+
let a = p(this.davPath, b(t));
|
|
6308
6308
|
return this.request(e, {
|
|
6309
|
-
method:
|
|
6309
|
+
method: s.copy,
|
|
6310
6310
|
headers: {
|
|
6311
6311
|
...r,
|
|
6312
|
-
Destination:
|
|
6312
|
+
Destination: a,
|
|
6313
6313
|
overwrite: n ? "T" : "F"
|
|
6314
6314
|
},
|
|
6315
|
-
...
|
|
6315
|
+
...i
|
|
6316
6316
|
});
|
|
6317
6317
|
}
|
|
6318
|
-
move(e, t, { overwrite: n = !1, headers: r = {}, ...
|
|
6319
|
-
let
|
|
6318
|
+
move(e, t, { overwrite: n = !1, headers: r = {}, ...i } = {}) {
|
|
6319
|
+
let a = p(this.davPath, b(t));
|
|
6320
6320
|
return this.request(e, {
|
|
6321
|
-
method:
|
|
6321
|
+
method: s.move,
|
|
6322
6322
|
headers: {
|
|
6323
6323
|
...r,
|
|
6324
|
-
Destination:
|
|
6324
|
+
Destination: a,
|
|
6325
6325
|
overwrite: n ? "T" : "F"
|
|
6326
6326
|
},
|
|
6327
|
-
...
|
|
6327
|
+
...i
|
|
6328
6328
|
});
|
|
6329
6329
|
}
|
|
6330
6330
|
put(e, t, { headers: n = {}, onUploadProgress: r, previousEntityTag: i, overwrite: a, ...o } = {}) {
|
|
6331
|
-
let
|
|
6332
|
-
return i ?
|
|
6333
|
-
method:
|
|
6331
|
+
let c = { ...n };
|
|
6332
|
+
return i ? c["If-Match"] = i : a || (c["If-None-Match"] = "*"), this.request(e, {
|
|
6333
|
+
method: s.put,
|
|
6334
6334
|
data: t,
|
|
6335
|
-
headers:
|
|
6335
|
+
headers: c,
|
|
6336
6336
|
onUploadProgress: r,
|
|
6337
6337
|
...o
|
|
6338
6338
|
});
|
|
6339
6339
|
}
|
|
6340
6340
|
delete(e, t = {}) {
|
|
6341
6341
|
return this.request(e, {
|
|
6342
|
-
method:
|
|
6342
|
+
method: s.delete,
|
|
6343
6343
|
...t
|
|
6344
6344
|
});
|
|
6345
6345
|
}
|
|
6346
6346
|
propPatch(e, t, { extraProps: n = [], ...r } = {}) {
|
|
6347
|
-
let i =
|
|
6347
|
+
let i = Za(t, [...this.extraProps, ...n]);
|
|
6348
6348
|
return this.request(e, {
|
|
6349
|
-
method:
|
|
6349
|
+
method: s.proppatch,
|
|
6350
6350
|
data: i,
|
|
6351
6351
|
...r
|
|
6352
6352
|
});
|
|
6353
6353
|
}
|
|
6354
6354
|
getFileUrl(e) {
|
|
6355
|
-
return
|
|
6355
|
+
return p(this.davPath, b(e));
|
|
6356
6356
|
}
|
|
6357
6357
|
buildHeaders(e = {}) {
|
|
6358
6358
|
return {
|
|
6359
6359
|
"Content-Type": "application/xml; charset=utf-8",
|
|
6360
6360
|
"X-Requested-With": "XMLHttpRequest",
|
|
6361
|
-
"X-Request-ID":
|
|
6361
|
+
"X-Request-ID": Ka(),
|
|
6362
6362
|
...this.headers && { ...this.headers() },
|
|
6363
6363
|
...e
|
|
6364
6364
|
};
|
|
6365
6365
|
}
|
|
6366
6366
|
async request(e, t) {
|
|
6367
|
-
let n =
|
|
6367
|
+
let n = p(this.davPath, b(e), { leadingSlash: !0 }), r = {
|
|
6368
6368
|
...t,
|
|
6369
6369
|
url: n,
|
|
6370
6370
|
headers: this.buildHeaders(t.headers || {}),
|
|
@@ -6372,60 +6372,62 @@ var Qa = async (e) => {
|
|
|
6372
6372
|
};
|
|
6373
6373
|
try {
|
|
6374
6374
|
let e = await this.client.customRequest("", r), t;
|
|
6375
|
-
return e.status === 207 && (t = await
|
|
6375
|
+
return e.status === 207 && (t = await eo(await e.text())), {
|
|
6376
6376
|
body: t,
|
|
6377
6377
|
status: e.status,
|
|
6378
6378
|
result: e
|
|
6379
6379
|
};
|
|
6380
6380
|
} catch (e) {
|
|
6381
|
-
let { response: t } = e
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
}
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
return e.propPatch(
|
|
6393
|
-
} }),
|
|
6381
|
+
let { response: t } = e;
|
|
6382
|
+
if (!t) throw e;
|
|
6383
|
+
let n = to(await t.text());
|
|
6384
|
+
throw new S(n.message, n.errorCode, t, t.status, n.errorType);
|
|
6385
|
+
}
|
|
6386
|
+
}
|
|
6387
|
+
}, ro = (e, t) => ({ async listFileVersions(t, n = {}) {
|
|
6388
|
+
let [r, ...i] = await e.propfind(p("meta", t, "v", { leadingSlash: !0 }), n);
|
|
6389
|
+
return i.map((t) => o(t, e.extraProps));
|
|
6390
|
+
} }), io = (e, t) => ({ setFavorite(t, { path: n }, r, i = {}) {
|
|
6391
|
+
let a = { [f.IsFavorite]: r ? "true" : "false" };
|
|
6392
|
+
return e.propPatch(p(t.webDavPath, n), a, i);
|
|
6393
|
+
} }), ao = (e, t) => ({ setProperties(t, { path: n }, r, i = {}) {
|
|
6394
|
+
return e.propPatch(p(t.webDavPath, n), r, i);
|
|
6395
|
+
} }), oo = (e, t, r) => {
|
|
6394
6396
|
let i = n.create();
|
|
6395
6397
|
(t || r) && i.interceptors.request.use((e) => (t && Object.assign(e.headers, t()), r?.() && (e.withCredentials = !0), e));
|
|
6396
6398
|
let a = {
|
|
6397
6399
|
axiosClient: i,
|
|
6398
6400
|
baseUrl: e,
|
|
6399
6401
|
headers: t
|
|
6400
|
-
}, o = new
|
|
6402
|
+
}, o = new no({
|
|
6401
6403
|
baseUrl: e,
|
|
6402
6404
|
headers: t,
|
|
6403
6405
|
withCredentials: r
|
|
6404
6406
|
}), s = (e) => {
|
|
6405
6407
|
o.extraProps.push(e);
|
|
6406
|
-
}, c =
|
|
6408
|
+
}, c = Fe(o, a), { getPathForFileId: l } = c, u = De(o, c, a), { listFiles: d } = u, f = Ce(u, a), { getFileInfo: p } = f, { createFolder: m } = xe(o, f, a), h = Se(o, a), { getFileContents: g } = h, { putFileContents: _ } = ke(o, f, a), { getFileUrl: v, revokeUrl: y } = we(o, h, f, a), { getPublicFileUrl: b } = Te(o, a), { getPublicLinkSignature: x } = Ee(o, a), { copyFiles: S } = be(o, a), { moveFiles: C } = Oe(o, a), { deleteFile: ee } = Ae(o, a), { restoreFile: te } = je(o, a), { listFileVersions: w } = ro(o, a), { restoreFileVersion: T } = Me(o, a), { clearTrashBin: E } = Ne(o, a), { search: ne } = Pe(o, a), { setFavorite: re } = io(o, a), { setProperties: ie } = ao(o, a);
|
|
6407
6409
|
return {
|
|
6408
|
-
copyFiles:
|
|
6410
|
+
copyFiles: S,
|
|
6409
6411
|
createFolder: m,
|
|
6410
|
-
deleteFile:
|
|
6411
|
-
restoreFile:
|
|
6412
|
-
restoreFileVersion:
|
|
6412
|
+
deleteFile: ee,
|
|
6413
|
+
restoreFile: te,
|
|
6414
|
+
restoreFileVersion: T,
|
|
6413
6415
|
getFileContents: g,
|
|
6414
6416
|
getFileInfo: p,
|
|
6415
6417
|
getFileUrl: v,
|
|
6416
6418
|
getPublicFileUrl: b,
|
|
6419
|
+
getPublicLinkSignature: x,
|
|
6417
6420
|
getPathForFileId: l,
|
|
6418
6421
|
listFiles: d,
|
|
6419
6422
|
listFileVersions: w,
|
|
6420
|
-
moveFiles:
|
|
6423
|
+
moveFiles: C,
|
|
6421
6424
|
putFileContents: _,
|
|
6422
6425
|
revokeUrl: y,
|
|
6423
|
-
clearTrashBin:
|
|
6424
|
-
search:
|
|
6425
|
-
setFavorite:
|
|
6426
|
-
setProperties:
|
|
6426
|
+
clearTrashBin: E,
|
|
6427
|
+
search: ne,
|
|
6428
|
+
setFavorite: re,
|
|
6429
|
+
setProperties: ie,
|
|
6427
6430
|
registerExtraProp: s
|
|
6428
6431
|
};
|
|
6429
6432
|
};
|
|
6430
|
-
|
|
6431
|
-
export { y as i, x as n, b as r, io as t };
|
|
6433
|
+
export { b as i, S as n, x as r, oo as t };
|