@opencloud-eu/web-client 6.0.0 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/axios-B1HWJqDx.js +1682 -0
  2. package/dist/dist-SL1_CMpG.js +809 -0
  3. package/dist/generated-DPf3CPe4.js +3317 -0
  4. package/dist/graph-Cld6mTON.js +372 -0
  5. package/dist/helpers-DoHY9e_0.js +1463 -0
  6. package/dist/ocs-B7FkclLT.js +2919 -0
  7. package/dist/src/graph/activities/activities.d.ts +2 -2
  8. package/dist/src/graph/activities/types.d.ts +2 -2
  9. package/dist/src/graph/applications/applications.d.ts +2 -2
  10. package/dist/src/graph/applications/types.d.ts +2 -2
  11. package/dist/src/graph/driveItems/driveItems.d.ts +2 -2
  12. package/dist/src/graph/driveItems/types.d.ts +3 -1
  13. package/dist/src/graph/drives/drives.d.ts +2 -2
  14. package/dist/src/graph/drives/types.d.ts +4 -3
  15. package/dist/src/graph/generated/api.d.ts +394 -1720
  16. package/dist/src/graph/generated/base.d.ts +11 -24
  17. package/dist/src/graph/generated/common.d.ts +15 -35
  18. package/dist/src/graph/generated/configuration.d.ts +24 -17
  19. package/dist/src/graph/generated/index.d.ts +2 -2
  20. package/dist/src/graph/groups/groups.d.ts +2 -2
  21. package/dist/src/graph/groups/types.d.ts +2 -2
  22. package/dist/src/graph/index.d.ts +2 -2
  23. package/dist/src/graph/permissions/permissions.d.ts +2 -2
  24. package/dist/src/graph/permissions/types.d.ts +2 -2
  25. package/dist/src/graph/photos/photo.d.ts +2 -2
  26. package/dist/src/graph/photos/types.d.ts +1 -1
  27. package/dist/src/graph/tags/tags.d.ts +2 -2
  28. package/dist/src/graph/tags/types.d.ts +2 -2
  29. package/dist/src/graph/types.d.ts +2 -2
  30. package/dist/src/graph/users/types.d.ts +2 -2
  31. package/dist/src/graph/users/users.d.ts +2 -2
  32. package/dist/src/helpers/space/functions.d.ts +1 -1
  33. package/dist/src/webdav/clearTrashBin.d.ts +1 -1
  34. package/dist/src/webdav/copyFiles.d.ts +1 -1
  35. package/dist/src/webdav/deleteFile.d.ts +1 -1
  36. package/dist/src/webdav/listFileVersions.d.ts +1 -1
  37. package/dist/src/webdav/moveFiles.d.ts +1 -1
  38. package/dist/src/webdav/putFileContents.d.ts +1 -1
  39. package/dist/src/webdav/restoreFile.d.ts +1 -1
  40. package/dist/src/webdav/restoreFileVersion.d.ts +1 -1
  41. package/dist/src/webdav/setFavorite.d.ts +1 -1
  42. package/dist/src/webdav/types.d.ts +0 -2
  43. package/dist/toString-DAQZ_8iK.js +287 -0
  44. package/dist/web-client/graph/generated.js +2 -5757
  45. package/dist/web-client/graph.js +2 -5
  46. package/dist/web-client/ocs.js +2 -5
  47. package/dist/web-client/sse.js +195 -201
  48. package/dist/web-client/webdav.js +3 -10
  49. package/dist/web-client.js +6 -82
  50. package/dist/webdav-BMNOaQXh.js +4425 -0
  51. package/package.json +9 -15
  52. package/dist/functions-BBKWOL6l.js +0 -1189
  53. package/dist/functions-VxhUeT1u.cjs +0 -1
  54. package/dist/index-BYnmk_Nt.cjs +0 -13
  55. package/dist/index-Bf956okn.js +0 -3874
  56. package/dist/index-Bjx4f50a.js +0 -1999
  57. package/dist/index-C32gBO3b.cjs +0 -6
  58. package/dist/index-D0bnLDAA.cjs +0 -1
  59. package/dist/index-Di51ZQKD.cjs +0 -4
  60. package/dist/index-Dn8UfKx7.js +0 -1520
  61. package/dist/index-Sp7XASDj.js +0 -688
  62. package/dist/index-_S-l3FmE.cjs +0 -1
  63. package/dist/index-cttW6Cve.js +0 -1018
  64. package/dist/src/webdav/listFavoriteFiles.d.ts +0 -12
  65. package/dist/toString-CKeGA2IK.js +0 -255
  66. package/dist/toString-DsGM1XcL.cjs +0 -1
  67. package/dist/vite.config.d.ts +0 -2
  68. package/dist/web-client/graph/generated.cjs +0 -1
  69. package/dist/web-client/graph.cjs +0 -1
  70. package/dist/web-client/ocs.cjs +0 -1
  71. package/dist/web-client/sse.cjs +0 -2
  72. package/dist/web-client/webdav.cjs +0 -1
  73. package/dist/web-client.cjs +0 -1
@@ -0,0 +1,4425 @@
1
+ import { n as e, r as t, t as n } from "./axios-B1HWJqDx.js";
2
+ import { n as r } from "./dist-SL1_CMpG.js";
3
+ import { u as i } from "./toString-DAQZ_8iK.js";
4
+ import { E as a, K as o, N as s, P as c, Q as l, W as u, Z as d, _ as f, f as p, q as m } from "./helpers-DoHY9e_0.js";
5
+ import { i as h, n as g, r as _, t as v } from "./ocs-B7FkclLT.js";
6
+ //#region src/utils/encodePath.ts
7
+ var y = (e) => encodeURIComponent(e).split("%2F").join("/"), b = "\n";
8
+ function x(e, t) {
9
+ let n = "";
10
+ t.format && t.indentBy.length > 0 && (n = b);
11
+ let r = [];
12
+ if (t.stopNodes && Array.isArray(t.stopNodes)) for (let e = 0; e < t.stopNodes.length; e++) {
13
+ let n = t.stopNodes[e];
14
+ typeof n == "string" ? r.push(new h(n)) : n instanceof h && r.push(n);
15
+ }
16
+ let i = new _();
17
+ return S(e, t, n, i, r);
18
+ }
19
+ function S(e, t, n, r, i) {
20
+ let a = "", o = !1;
21
+ if (t.maxNestedTags && r.getDepth() > t.maxNestedTags) throw Error("Maximum nested tags exceeded");
22
+ if (!Array.isArray(e)) {
23
+ if (e != null) {
24
+ let n = e.toString();
25
+ return n = w(n, t), n;
26
+ }
27
+ return "";
28
+ }
29
+ for (let s = 0; s < e.length; s++) {
30
+ let c = e[s], l = re(c);
31
+ if (l === void 0) continue;
32
+ let u = ee(c[":@"], t);
33
+ r.push(l, u);
34
+ let d = ie(r, i);
35
+ if (l === t.textNodeName) {
36
+ let e = c[l];
37
+ d || (e = t.tagValueProcessor(l, e), e = w(e, t)), o && (a += n), a += e, o = !1, r.pop();
38
+ continue;
39
+ } else if (l === t.cdataPropName) {
40
+ o && (a += n);
41
+ let e = c[l][0][t.textNodeName], i = String(e).replace(/\]\]>/g, "]]]]><![CDATA[>");
42
+ a += `<![CDATA[${i}]]>`, o = !1, r.pop();
43
+ continue;
44
+ } else if (l === t.commentPropName) {
45
+ let e = c[l][0][t.textNodeName], i = String(e).replace(/--/g, "- -").replace(/-$/, "- ");
46
+ a += n + `<!--${i}-->`, o = !0, r.pop();
47
+ continue;
48
+ } else if (l[0] === "?") {
49
+ let e = C(c[":@"], t, d), i = l === "?xml" ? "" : n, s = c[l][0][t.textNodeName];
50
+ s = s.length === 0 ? "" : " " + s, a += i + `<${l}${s}${e}?>`, o = !0, r.pop();
51
+ continue;
52
+ }
53
+ let f = n;
54
+ f !== "" && (f += t.indentBy);
55
+ let p = n + `<${l}${C(c[":@"], t, d)}`, m;
56
+ m = d ? te(c[l], t) : S(c[l], t, f, r, i), t.unpairedTags.indexOf(l) === -1 ? (!m || m.length === 0) && t.suppressEmptyNode ? a += p + "/>" : m && m.endsWith(">") ? a += p + `>${m}${n}</${l}>` : (a += p + ">", m && n !== "" && (m.includes("/>") || m.includes("</")) ? a += n + t.indentBy + m + n : a += m, a += `</${l}>`) : t.suppressUnpairedNode ? a += p + ">" : a += p + "/>", o = !0, r.pop();
57
+ }
58
+ return a;
59
+ }
60
+ function ee(e, t) {
61
+ if (!e || t.ignoreAttributes) return null;
62
+ let n = {}, r = !1;
63
+ for (let i in e) {
64
+ if (!Object.prototype.hasOwnProperty.call(e, i)) continue;
65
+ let a = i.startsWith(t.attributeNamePrefix) ? i.substr(t.attributeNamePrefix.length) : i;
66
+ n[a] = e[i], r = !0;
67
+ }
68
+ return r ? n : null;
69
+ }
70
+ function te(e, t) {
71
+ if (!Array.isArray(e)) return e == null ? "" : e.toString();
72
+ let n = "";
73
+ for (let r = 0; r < e.length; r++) {
74
+ let i = e[r], a = re(i);
75
+ if (a === t.textNodeName) n += i[a];
76
+ else if (a === t.cdataPropName) n += i[a][0][t.textNodeName];
77
+ else if (a === t.commentPropName) n += i[a][0][t.textNodeName];
78
+ else if (a && a[0] === "?") continue;
79
+ else if (a) {
80
+ let e = ne(i[":@"], t), r = te(i[a], t);
81
+ !r || r.length === 0 ? n += `<${a}${e}/>` : n += `<${a}${e}>${r}</${a}>`;
82
+ }
83
+ }
84
+ return n;
85
+ }
86
+ function ne(e, t) {
87
+ let n = "";
88
+ if (e && !t.ignoreAttributes) for (let r in e) {
89
+ if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
90
+ let i = e[r];
91
+ i === !0 && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${i}"`;
92
+ }
93
+ return n;
94
+ }
95
+ function re(e) {
96
+ let t = Object.keys(e);
97
+ for (let n = 0; n < t.length; n++) {
98
+ let r = t[n];
99
+ if (Object.prototype.hasOwnProperty.call(e, r) && r !== ":@") return r;
100
+ }
101
+ }
102
+ function C(e, t, n) {
103
+ let r = "";
104
+ if (e && !t.ignoreAttributes) for (let i in e) {
105
+ if (!Object.prototype.hasOwnProperty.call(e, i)) continue;
106
+ let a;
107
+ n ? a = e[i] : (a = t.attributeValueProcessor(i, e[i]), a = w(a, t)), a === !0 && t.suppressBooleanAttributes ? r += ` ${i.substr(t.attributeNamePrefix.length)}` : r += ` ${i.substr(t.attributeNamePrefix.length)}="${a}"`;
108
+ }
109
+ return r;
110
+ }
111
+ function ie(e, t) {
112
+ if (!t || t.length === 0) return !1;
113
+ for (let n = 0; n < t.length; n++) if (e.matches(t[n])) return !0;
114
+ return !1;
115
+ }
116
+ function w(e, t) {
117
+ if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
118
+ let r = t.entities[n];
119
+ e = e.replace(r.regex, r.val);
120
+ }
121
+ return e;
122
+ }
123
+ //#endregion
124
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.1.5/node_modules/fast-xml-builder/src/ignoreAttributes.js
125
+ function T(e) {
126
+ return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
127
+ for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
128
+ } : () => !1;
129
+ }
130
+ //#endregion
131
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.1.5/node_modules/fast-xml-builder/src/fxb.js
132
+ var ae = {
133
+ attributeNamePrefix: "@_",
134
+ attributesGroupName: !1,
135
+ textNodeName: "#text",
136
+ ignoreAttributes: !0,
137
+ cdataPropName: !1,
138
+ format: !1,
139
+ indentBy: " ",
140
+ suppressEmptyNode: !1,
141
+ suppressUnpairedNode: !0,
142
+ suppressBooleanAttributes: !0,
143
+ tagValueProcessor: function(e, t) {
144
+ return t;
145
+ },
146
+ attributeValueProcessor: function(e, t) {
147
+ return t;
148
+ },
149
+ preserveOrder: !1,
150
+ commentPropName: !1,
151
+ unpairedTags: [],
152
+ entities: [
153
+ {
154
+ regex: /* @__PURE__ */ RegExp("&", "g"),
155
+ val: "&amp;"
156
+ },
157
+ {
158
+ regex: /* @__PURE__ */ RegExp(">", "g"),
159
+ val: "&gt;"
160
+ },
161
+ {
162
+ regex: /* @__PURE__ */ RegExp("<", "g"),
163
+ val: "&lt;"
164
+ },
165
+ {
166
+ regex: /* @__PURE__ */ RegExp("'", "g"),
167
+ val: "&apos;"
168
+ },
169
+ {
170
+ regex: /* @__PURE__ */ RegExp("\"", "g"),
171
+ val: "&quot;"
172
+ }
173
+ ],
174
+ processEntities: !0,
175
+ stopNodes: [],
176
+ oneListGroup: !1,
177
+ maxNestedTags: 100,
178
+ jPath: !0
179
+ };
180
+ function E(e) {
181
+ if (this.options = Object.assign({}, ae, 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++) {
182
+ let t = this.options.stopNodes[e];
183
+ typeof t == "string" ? this.stopNodeExpressions.push(new h(t)) : t instanceof h && this.stopNodeExpressions.push(t);
184
+ }
185
+ this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
186
+ return !1;
187
+ } : (this.ignoreAttributesFn = T(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = se), this.processTextOrObjNode = D, this.options.format ? (this.indentate = oe, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
188
+ return "";
189
+ }, this.tagEndChar = ">", this.newLine = "");
190
+ }
191
+ E.prototype.build = function(e) {
192
+ if (this.options.preserveOrder) return x(e, this.options);
193
+ {
194
+ Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = { [this.options.arrayNodeName]: e });
195
+ let t = new _();
196
+ return this.j2x(e, 0, t).val;
197
+ }
198
+ }, E.prototype.j2x = function(e, t, n) {
199
+ let r = "", i = "";
200
+ if (this.options.maxNestedTags && n.getDepth() >= this.options.maxNestedTags) throw Error("Maximum nested tags exceeded");
201
+ let a = this.options.jPath ? n.toString() : n, o = this.checkStopNode(n);
202
+ for (let s in e) if (Object.prototype.hasOwnProperty.call(e, s)) if (e[s] === void 0) this.isAttribute(s) && (i += "");
203
+ else if (e[s] === null) this.isAttribute(s) || s === this.options.cdataPropName ? i += "" : s[0] === "?" ? i += this.indentate(t) + "<" + s + "?" + this.tagEndChar : i += this.indentate(t) + "<" + s + "/" + this.tagEndChar;
204
+ else if (e[s] instanceof Date) i += this.buildTextValNode(e[s], s, "", t, n);
205
+ else if (typeof e[s] != "object") {
206
+ let c = this.isAttribute(s);
207
+ if (c && !this.ignoreAttributesFn(c, a)) r += this.buildAttrPairStr(c, "" + e[s], o);
208
+ else if (!c) if (s === this.options.textNodeName) {
209
+ let t = this.options.tagValueProcessor(s, "" + e[s]);
210
+ i += this.replaceEntitiesValue(t);
211
+ } else {
212
+ n.push(s);
213
+ let r = this.checkStopNode(n);
214
+ if (n.pop(), r) {
215
+ let n = "" + e[s];
216
+ n === "" ? i += this.indentate(t) + "<" + s + this.closeTag(s) + this.tagEndChar : i += this.indentate(t) + "<" + s + ">" + n + "</" + s + this.tagEndChar;
217
+ } else i += this.buildTextValNode(e[s], s, "", t, n);
218
+ }
219
+ } else if (Array.isArray(e[s])) {
220
+ let r = e[s].length, a = "", o = "";
221
+ for (let c = 0; c < r; c++) {
222
+ let r = e[s][c];
223
+ if (r !== void 0) if (r === null) s[0] === "?" ? i += this.indentate(t) + "<" + s + "?" + this.tagEndChar : i += this.indentate(t) + "<" + s + "/" + this.tagEndChar;
224
+ else if (typeof r == "object") if (this.options.oneListGroup) {
225
+ n.push(s);
226
+ let e = this.j2x(r, t + 1, n);
227
+ n.pop(), a += e.val, this.options.attributesGroupName && r.hasOwnProperty(this.options.attributesGroupName) && (o += e.attrStr);
228
+ } else a += this.processTextOrObjNode(r, s, t, n);
229
+ else if (this.options.oneListGroup) {
230
+ let e = this.options.tagValueProcessor(s, r);
231
+ e = this.replaceEntitiesValue(e), a += e;
232
+ } else {
233
+ n.push(s);
234
+ let e = this.checkStopNode(n);
235
+ if (n.pop(), e) {
236
+ let e = "" + r;
237
+ e === "" ? a += this.indentate(t) + "<" + s + this.closeTag(s) + this.tagEndChar : a += this.indentate(t) + "<" + s + ">" + e + "</" + s + this.tagEndChar;
238
+ } else a += this.buildTextValNode(r, s, "", t, n);
239
+ }
240
+ }
241
+ this.options.oneListGroup && (a = this.buildObjectNode(a, s, o, t)), i += a;
242
+ } else if (this.options.attributesGroupName && s === this.options.attributesGroupName) {
243
+ let t = Object.keys(e[s]), n = t.length;
244
+ for (let i = 0; i < n; i++) r += this.buildAttrPairStr(t[i], "" + e[s][t[i]], o);
245
+ } else i += this.processTextOrObjNode(e[s], s, t, n);
246
+ return {
247
+ attrStr: r,
248
+ val: i
249
+ };
250
+ }, E.prototype.buildAttrPairStr = function(e, t, n) {
251
+ return n || (t = this.options.attributeValueProcessor(e, "" + t), t = this.replaceEntitiesValue(t)), this.options.suppressBooleanAttributes && t === "true" ? " " + e : " " + e + "=\"" + t + "\"";
252
+ };
253
+ function D(e, t, n, r) {
254
+ let i = this.extractAttributes(e);
255
+ if (r.push(t, i), this.checkStopNode(r)) {
256
+ let i = this.buildRawContent(e), a = this.buildAttributesForStopNode(e);
257
+ return r.pop(), this.buildObjectNode(i, t, a, n);
258
+ }
259
+ let a = this.j2x(e, n + 1, r);
260
+ return r.pop(), e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, a.attrStr, n, r) : this.buildObjectNode(a.val, t, a.attrStr, n);
261
+ }
262
+ E.prototype.extractAttributes = function(e) {
263
+ if (!e || typeof e != "object") return null;
264
+ let t = {}, n = !1;
265
+ if (this.options.attributesGroupName && e[this.options.attributesGroupName]) {
266
+ let r = e[this.options.attributesGroupName];
267
+ for (let e in r) {
268
+ if (!Object.prototype.hasOwnProperty.call(r, e)) continue;
269
+ let i = e.startsWith(this.options.attributeNamePrefix) ? e.substring(this.options.attributeNamePrefix.length) : e;
270
+ t[i] = r[e], n = !0;
271
+ }
272
+ } else for (let r in e) {
273
+ if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
274
+ let i = this.isAttribute(r);
275
+ i && (t[i] = e[r], n = !0);
276
+ }
277
+ return n ? t : null;
278
+ }, E.prototype.buildRawContent = function(e) {
279
+ if (typeof e == "string") return e;
280
+ if (typeof e != "object" || !e) return String(e);
281
+ if (e[this.options.textNodeName] !== void 0) return e[this.options.textNodeName];
282
+ let t = "";
283
+ for (let n in e) {
284
+ if (!Object.prototype.hasOwnProperty.call(e, n) || this.isAttribute(n) || this.options.attributesGroupName && n === this.options.attributesGroupName) continue;
285
+ let r = e[n];
286
+ if (n === this.options.textNodeName) t += r;
287
+ else if (Array.isArray(r)) {
288
+ for (let e of r) if (typeof e == "string" || typeof e == "number") t += `<${n}>${e}</${n}>`;
289
+ else if (typeof e == "object" && e) {
290
+ let r = this.buildRawContent(e), i = this.buildAttributesForStopNode(e);
291
+ r === "" ? t += `<${n}${i}/>` : t += `<${n}${i}>${r}</${n}>`;
292
+ }
293
+ } else if (typeof r == "object" && r) {
294
+ let e = this.buildRawContent(r), i = this.buildAttributesForStopNode(r);
295
+ e === "" ? t += `<${n}${i}/>` : t += `<${n}${i}>${e}</${n}>`;
296
+ } else t += `<${n}>${r}</${n}>`;
297
+ }
298
+ return t;
299
+ }, E.prototype.buildAttributesForStopNode = function(e) {
300
+ if (!e || typeof e != "object") return "";
301
+ let t = "";
302
+ if (this.options.attributesGroupName && e[this.options.attributesGroupName]) {
303
+ let n = e[this.options.attributesGroupName];
304
+ for (let e in n) {
305
+ if (!Object.prototype.hasOwnProperty.call(n, e)) continue;
306
+ let r = e.startsWith(this.options.attributeNamePrefix) ? e.substring(this.options.attributeNamePrefix.length) : e, i = n[e];
307
+ i === !0 && this.options.suppressBooleanAttributes ? t += " " + r : t += " " + r + "=\"" + i + "\"";
308
+ }
309
+ } else for (let n in e) {
310
+ if (!Object.prototype.hasOwnProperty.call(e, n)) continue;
311
+ let r = this.isAttribute(n);
312
+ if (r) {
313
+ let i = e[n];
314
+ i === !0 && this.options.suppressBooleanAttributes ? t += " " + r : t += " " + r + "=\"" + i + "\"";
315
+ }
316
+ }
317
+ return t;
318
+ }, E.prototype.buildObjectNode = function(e, t, n, r) {
319
+ if (e === "") return t[0] === "?" ? this.indentate(r) + "<" + t + n + "?" + this.tagEndChar : this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
320
+ {
321
+ let i = "</" + t + this.tagEndChar, a = "";
322
+ 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) + `<!--${e}-->` + this.newLine : this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i;
323
+ }
324
+ }, E.prototype.closeTag = function(e) {
325
+ let t = "";
326
+ return this.options.unpairedTags.indexOf(e) === -1 ? t = this.options.suppressEmptyNode ? "/" : `></${e}` : this.options.suppressUnpairedNode || (t = "/"), t;
327
+ }, E.prototype.checkStopNode = function(e) {
328
+ if (!this.stopNodeExpressions || this.stopNodeExpressions.length === 0) return !1;
329
+ for (let t = 0; t < this.stopNodeExpressions.length; t++) if (e.matches(this.stopNodeExpressions[t])) return !0;
330
+ return !1;
331
+ }, E.prototype.buildTextValNode = function(e, t, n, r, i) {
332
+ if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName) {
333
+ let t = String(e).replace(/\]\]>/g, "]]]]><![CDATA[>");
334
+ return this.indentate(r) + `<![CDATA[${t}]]>` + this.newLine;
335
+ } else if (this.options.commentPropName !== !1 && t === this.options.commentPropName) {
336
+ let t = String(e).replace(/--/g, "- -").replace(/-$/, "- ");
337
+ return this.indentate(r) + `<!--${t}-->` + this.newLine;
338
+ } else if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
339
+ else {
340
+ let i = this.options.tagValueProcessor(t, e);
341
+ return i = this.replaceEntitiesValue(i), i === "" ? this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar : this.indentate(r) + "<" + t + n + ">" + i + "</" + t + this.tagEndChar;
342
+ }
343
+ }, E.prototype.replaceEntitiesValue = function(e) {
344
+ if (e && e.length > 0 && this.options.processEntities) for (let t = 0; t < this.options.entities.length; t++) {
345
+ let n = this.options.entities[t];
346
+ e = e.replace(n.regex, n.val);
347
+ }
348
+ return e;
349
+ };
350
+ function oe(e) {
351
+ return this.options.indentBy.repeat(e);
352
+ }
353
+ function se(e) {
354
+ return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;
355
+ }
356
+ //#endregion
357
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.7.1/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js
358
+ var ce = E, O = (e, { fileId: t, path: n, name: r }) => {
359
+ if (n !== void 0) return i(e.webDavPath, n);
360
+ if (t !== void 0) {
361
+ if (a(e)) throw Error("public spaces need a path provided");
362
+ return i("spaces", t, r || "");
363
+ }
364
+ return e.webDavPath;
365
+ }, le = (e, t) => ({ copyFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
366
+ let u = O(t, {
367
+ fileId: r,
368
+ path: n
369
+ }), d = O(i, {
370
+ fileId: o,
371
+ path: a,
372
+ name: s
373
+ });
374
+ return e.copy(u, d, {
375
+ overwrite: c || !1,
376
+ ...l
377
+ });
378
+ } }), ue = (e, t, n) => ({ async createFolder(n, { path: r, parentFolderId: i, folderName: a, fetchFolder: o = !0, ...s }) {
379
+ let c = O(n, {
380
+ fileId: i,
381
+ path: r,
382
+ name: a
383
+ });
384
+ if (await e.mkcol(c), o) return t.getFileInfo(n, { path: r }, s);
385
+ } }), de = (e, { axiosClient: t }) => ({ async getFileContents(n, { fileId: r, path: i }, { responseType: a = "text", noCache: o = !0, headers: s, ...c } = {}) {
386
+ try {
387
+ let l = O(n, {
388
+ fileId: r,
389
+ path: i
390
+ }), u = await t.get(e.getFileUrl(l), {
391
+ responseType: a,
392
+ headers: {
393
+ ...o && { "Cache-Control": "no-cache" },
394
+ ...s || {}
395
+ },
396
+ ...c
397
+ });
398
+ return {
399
+ response: u,
400
+ body: u.data,
401
+ headers: {
402
+ ETag: u.headers.etag,
403
+ "OC-ETag": u.headers["oc-etag"],
404
+ "OC-FileId": u.headers["oc-fileid"]
405
+ }
406
+ };
407
+ } catch (e) {
408
+ let { message: t, response: n } = e;
409
+ throw new l(t, n, n.status);
410
+ }
411
+ } }), fe = (e, t) => ({ async getFileInfo(t, n, r) {
412
+ return (await e.listFiles(t, n, {
413
+ depth: 0,
414
+ ...r
415
+ })).resource;
416
+ } }), pe = (e, t, n, { axiosClient: r, baseUrl: a }) => ({
417
+ async getFileUrl(o, s, { disposition: c = "attachment", version: l = null, username: u = "", ...d }) {
418
+ if (c === "inline") {
419
+ let e = await t.getFileContents(o, s, {
420
+ responseType: "blob",
421
+ ...d
422
+ });
423
+ return URL.createObjectURL(e.body);
424
+ }
425
+ if (l) {
426
+ if (!u) throw Error("username is required for URL signing");
427
+ let t = e.getFileUrl(i("meta", s.fileId, "v", l));
428
+ return await v(a, r).signUrl(t, u);
429
+ }
430
+ if (s.downloadURL) return s.downloadURL;
431
+ let { downloadURL: f } = await n.getFileInfo(o, s, { davProperties: [m.DownloadURL] });
432
+ return f;
433
+ },
434
+ revokeUrl: (e) => {
435
+ e && e.startsWith("blob:") && URL.revokeObjectURL(e);
436
+ }
437
+ }), me = (e, t) => ({ getPublicFileUrl(t, n) {
438
+ return e.getFileUrl(i("public-files", n));
439
+ } }), he = (e, t, n) => ({ async listFiles(n, { path: r, fileId: l } = {}, { depth: u = 1, davProperties: d, isTrash: h = !1, ...g } = {}) {
440
+ let _;
441
+ if (a(n)) {
442
+ _ = await e.propfind(i(n.webDavPath, r), {
443
+ depth: u,
444
+ properties: d || o.PublicLink,
445
+ ...g
446
+ }), _.forEach((e) => {
447
+ e.filename = e.filename.split("/").slice(1).join("/");
448
+ }), _.length === 1 && (_[0].filename = i(n.id, r, { leadingSlash: !0 })), _.forEach((e) => {
449
+ e.filename = e.filename.split("/").slice(2).join("/");
450
+ });
451
+ let t = n.driveAlias.startsWith("ocm/") ? "ocm" : "public-link";
452
+ if ((!r || r === "/") && u > 0 && t === "ocm" && _[0].props[m.PublicLinkItemType] === "file" && (_ = [{
453
+ basename: n.fileId,
454
+ type: "directory",
455
+ filename: "",
456
+ props: {}
457
+ }, ..._]), !r) {
458
+ let [r, ...i] = _;
459
+ return {
460
+ resource: p({
461
+ ...r,
462
+ id: n.id,
463
+ driveAlias: n.driveAlias,
464
+ webDavPath: n.webDavPath,
465
+ publicLinkType: t
466
+ }),
467
+ children: i.map((t) => c(t, e.extraProps))
468
+ };
469
+ }
470
+ let a = _.map((t) => c(t, e.extraProps));
471
+ return {
472
+ resource: a[0],
473
+ children: a.slice(1)
474
+ };
475
+ }
476
+ let v = async () => {
477
+ let e = await t.getPathForFileId(l);
478
+ return this.listFiles(n, { path: e }, {
479
+ depth: u,
480
+ davProperties: d
481
+ });
482
+ };
483
+ try {
484
+ let t = "";
485
+ if (t = h ? f(n.id) : O(n, {
486
+ fileId: l,
487
+ path: r
488
+ }), _ = await e.propfind(t, {
489
+ depth: u,
490
+ properties: d || o.Default,
491
+ ...g
492
+ }), h) return {
493
+ resource: c(_[0], e.extraProps),
494
+ children: _.slice(1).map(s)
495
+ };
496
+ let i = _.map((t) => c(t, e.extraProps)), a = l === n.id;
497
+ return l && !a && i[0].fileId && l !== i[0].fileId ? v() : {
498
+ resource: i[0],
499
+ children: i.slice(1)
500
+ };
501
+ } catch (e) {
502
+ if (e.statusCode === 404 && l) return v();
503
+ throw e;
504
+ }
505
+ } }), ge = (e, t) => ({ moveFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
506
+ let u = O(t, {
507
+ fileId: r,
508
+ path: n
509
+ }), d = O(i, {
510
+ fileId: o,
511
+ path: a,
512
+ name: s
513
+ });
514
+ return e.move(u, d, {
515
+ overwrite: c || !1,
516
+ ...l
517
+ });
518
+ } }), _e = (e, t, n) => ({ async putFileContents(n, { fileName: r, path: i, parentFolderId: a, content: o = "", previousEntityTag: s = "", overwrite: c, onUploadProgress: l = null, ...u }) {
519
+ let d = O(n, {
520
+ fileId: a,
521
+ name: r,
522
+ path: i
523
+ }), { result: f } = await e.put(d, o, {
524
+ previousEntityTag: s,
525
+ overwrite: c,
526
+ onUploadProgress: l,
527
+ ...u
528
+ });
529
+ return t.getFileInfo(n, {
530
+ fileId: f.headers.get("Oc-Fileid"),
531
+ path: i
532
+ });
533
+ } }), ve = (e, t) => ({ deleteFile(t, { path: n, ...r }) {
534
+ return e.delete(i(t.webDavPath, n), r);
535
+ } }), ye = (e, t) => ({ restoreFile(t, { id: n }, { path: r }, { overwrite: o, ...s } = {}) {
536
+ if (a(t)) return;
537
+ let c = i(t.webDavPath, r);
538
+ return e.move(i(t.webDavTrashPath, n), c, {
539
+ overwrite: o,
540
+ ...s
541
+ });
542
+ } }), be = (e, t) => ({ restoreFileVersion(t, { parentFolderId: n, name: r, path: a }, o, s = {}) {
543
+ let c = O(t, {
544
+ path: a,
545
+ fileId: n,
546
+ name: r
547
+ }), l = i("meta", n, "v", o, { leadingSlash: !0 }), u = i("files", c, { leadingSlash: !0 });
548
+ return e.copy(l, u, s);
549
+ } }), xe = (e, t) => ({ clearTrashBin(t, { id: n, ...r } = {}) {
550
+ let a = f(t.id);
551
+ return n && (a = i(a, n)), e.delete(a, r);
552
+ } }), Se = (e, t) => ({ async search(t, { davProperties: n = o.Default, searchLimit: r, ...i }) {
553
+ let { range: a, results: s } = await e.report("/spaces/", {
554
+ pattern: t,
555
+ limit: r,
556
+ properties: n,
557
+ ...i
558
+ });
559
+ return {
560
+ resources: s.map((t) => ({
561
+ ...c(t, e.extraProps),
562
+ highlights: t.props[m.Highlights] || ""
563
+ })),
564
+ totalResults: a ? parseInt(a?.split("/")[1]) : null
565
+ };
566
+ } }), Ce = (e, t) => ({ async getPathForFileId(t, n = {}) {
567
+ return (await e.propfind(i("meta", t, { leadingSlash: !0 }), {
568
+ properties: [m.MetaPathForUser],
569
+ ...n
570
+ }))[0].props[m.MetaPathForUser];
571
+ } });
572
+ //#endregion
573
+ //#region ../../node_modules/.pnpm/webdav@5.9.0/node_modules/webdav/dist/web/index.js
574
+ e();
575
+ var we = {
576
+ 2: (e) => {
577
+ function t(e, t, i) {
578
+ e instanceof RegExp && (e = n(e, i)), t instanceof RegExp && (t = n(t, i));
579
+ var a = r(e, t, i);
580
+ return a && {
581
+ start: a[0],
582
+ end: a[1],
583
+ pre: i.slice(0, a[0]),
584
+ body: i.slice(a[0] + e.length, a[1]),
585
+ post: i.slice(a[1] + t.length)
586
+ };
587
+ }
588
+ function n(e, t) {
589
+ var n = t.match(e);
590
+ return n ? n[0] : null;
591
+ }
592
+ function r(e, t, n) {
593
+ var r, i, a, o, s, c = n.indexOf(e), l = n.indexOf(t, c + 1), u = c;
594
+ if (c >= 0 && l > 0) {
595
+ for (r = [], a = n.length; u >= 0 && !s;) u == c ? (r.push(u), c = n.indexOf(e, u + 1)) : r.length == 1 ? s = [r.pop(), l] : ((i = r.pop()) < a && (a = i, o = l), l = n.indexOf(t, u + 1)), u = c < l && c >= 0 ? c : l;
596
+ r.length && (s = [a, o]);
597
+ }
598
+ return s;
599
+ }
600
+ e.exports = t, t.range = r;
601
+ },
602
+ 47: (e, n, r) => {
603
+ var i = r(410), a = function(e) {
604
+ return typeof e == "string";
605
+ };
606
+ function o(e, t) {
607
+ for (var n = [], r = 0; r < e.length; r++) {
608
+ var i = e[r];
609
+ i && i !== "." && (i === ".." ? n.length && n[n.length - 1] !== ".." ? n.pop() : t && n.push("..") : n.push(i));
610
+ }
611
+ return n;
612
+ }
613
+ var s = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/, c = {};
614
+ function l(e) {
615
+ return s.exec(e).slice(1);
616
+ }
617
+ c.resolve = function() {
618
+ for (var e = "", n = !1, r = arguments.length - 1; r >= -1 && !n; r--) {
619
+ var i = r >= 0 ? arguments[r] : t.cwd();
620
+ if (!a(i)) throw TypeError("Arguments to path.resolve must be strings");
621
+ i && (e = i + "/" + e, n = i.charAt(0) === "/");
622
+ }
623
+ return (n ? "/" : "") + (e = o(e.split("/"), !n).join("/")) || ".";
624
+ }, c.normalize = function(e) {
625
+ var t = c.isAbsolute(e), n = e.substr(-1) === "/";
626
+ return (e = o(e.split("/"), !t).join("/")) || t || (e = "."), e && n && (e += "/"), (t ? "/" : "") + e;
627
+ }, c.isAbsolute = function(e) {
628
+ return e.charAt(0) === "/";
629
+ }, c.join = function() {
630
+ for (var e = "", t = 0; t < arguments.length; t++) {
631
+ var n = arguments[t];
632
+ if (!a(n)) throw TypeError("Arguments to path.join must be strings");
633
+ n && (e += e ? "/" + n : n);
634
+ }
635
+ return c.normalize(e);
636
+ }, c.relative = function(e, t) {
637
+ function n(e) {
638
+ for (var t = 0; t < e.length && e[t] === ""; t++);
639
+ for (var n = e.length - 1; n >= 0 && e[n] === ""; n--);
640
+ return t > n ? [] : e.slice(t, n + 1);
641
+ }
642
+ e = c.resolve(e).substr(1), t = c.resolve(t).substr(1);
643
+ for (var r = n(e.split("/")), i = n(t.split("/")), a = Math.min(r.length, i.length), o = a, s = 0; s < a; s++) if (r[s] !== i[s]) {
644
+ o = s;
645
+ break;
646
+ }
647
+ var l = [];
648
+ for (s = o; s < r.length; s++) l.push("..");
649
+ return (l = l.concat(i.slice(o))).join("/");
650
+ }, c._makeLong = function(e) {
651
+ return e;
652
+ }, c.dirname = function(e) {
653
+ var t = l(e), n = t[0], r = t[1];
654
+ return n || r ? (r &&= r.substr(0, r.length - 1), n + r) : ".";
655
+ }, c.basename = function(e, t) {
656
+ var n = l(e)[2];
657
+ return t && n.substr(-1 * t.length) === t && (n = n.substr(0, n.length - t.length)), n;
658
+ }, c.extname = function(e) {
659
+ return l(e)[3];
660
+ }, c.format = function(e) {
661
+ if (!i.isObject(e)) throw TypeError("Parameter 'pathObject' must be an object, not " + typeof e);
662
+ if (!a(e.root || "")) throw TypeError("'pathObject.root' must be a string or undefined, not " + typeof e.root);
663
+ return (e.dir ? e.dir + c.sep : "") + (e.base || "");
664
+ }, c.parse = function(e) {
665
+ if (!a(e)) throw TypeError("Parameter 'pathString' must be a string, not " + typeof e);
666
+ var t = l(e);
667
+ if (!t || t.length !== 4) throw TypeError("Invalid path '" + e + "'");
668
+ return t[1] = t[1] || "", t[2] = t[2] || "", t[3] = t[3] || "", {
669
+ root: t[0],
670
+ dir: t[0] + t[1].slice(0, t[1].length - 1),
671
+ base: t[2],
672
+ ext: t[3],
673
+ name: t[2].slice(0, t[2].length - t[3].length)
674
+ };
675
+ }, c.sep = "/", c.delimiter = ":", e.exports = c;
676
+ },
677
+ 101: function(e, t, n) {
678
+ var i;
679
+ e = n.nmd(e), function() {
680
+ var a = (e && e.exports, typeof r == "object" && r);
681
+ a.global !== a && a.window;
682
+ var o = function(e) {
683
+ this.message = e;
684
+ };
685
+ (o.prototype = /* @__PURE__ */ Error()).name = "InvalidCharacterError";
686
+ var s = function(e) {
687
+ throw new o(e);
688
+ }, c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", l = /[\t\n\f\r ]/g, u = {
689
+ encode: function(e) {
690
+ e = String(e), /[^\0-\xFF]/.test(e) && s("The string to be encoded contains characters outside of the Latin1 range.");
691
+ for (var t, n, r, i, a = e.length % 3, o = "", l = -1, u = e.length - a; ++l < u;) t = e.charCodeAt(l) << 16, n = e.charCodeAt(++l) << 8, r = e.charCodeAt(++l), o += c.charAt((i = t + n + r) >> 18 & 63) + c.charAt(i >> 12 & 63) + c.charAt(i >> 6 & 63) + c.charAt(63 & i);
692
+ return a == 2 ? (t = e.charCodeAt(l) << 8, n = e.charCodeAt(++l), o += c.charAt((i = t + n) >> 10) + c.charAt(i >> 4 & 63) + c.charAt(i << 2 & 63) + "=") : a == 1 && (i = e.charCodeAt(l), o += c.charAt(i >> 2) + c.charAt(i << 4 & 63) + "=="), o;
693
+ },
694
+ decode: function(e) {
695
+ var t = (e = String(e).replace(l, "")).length;
696
+ t % 4 == 0 && (t = (e = e.replace(/==?$/, "")).length), (t % 4 == 1 || /[^+a-zA-Z0-9/]/.test(e)) && s("Invalid character: the string to be decoded is not correctly encoded.");
697
+ for (var n, r, i = 0, a = "", o = -1; ++o < t;) r = c.indexOf(e.charAt(o)), n = i % 4 ? 64 * n + r : r, i++ % 4 && (a += String.fromCharCode(255 & n >> (-2 * i & 6)));
698
+ return a;
699
+ },
700
+ version: "1.0.0"
701
+ };
702
+ (i = function() {
703
+ return u;
704
+ }.call(t, n, t, e)) === void 0 || (e.exports = i);
705
+ }();
706
+ },
707
+ 135: (e) => {
708
+ function t(e) {
709
+ return !!e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
710
+ }
711
+ e.exports = function(e) {
712
+ return e != null && (t(e) || function(e) {
713
+ return typeof e.readFloatLE == "function" && typeof e.slice == "function" && t(e.slice(0, 0));
714
+ }(e) || !!e._isBuffer);
715
+ };
716
+ },
717
+ 172: (e, t) => {
718
+ t.d = function(e) {
719
+ if (!e) return 0;
720
+ for (var t = (e = e.toString()).length, n = e.length; n--;) {
721
+ var r = e.charCodeAt(n);
722
+ 56320 <= r && r <= 57343 && n--, 127 < r && r <= 2047 ? t++ : 2047 < r && r <= 65535 && (t += 2);
723
+ }
724
+ return t;
725
+ };
726
+ },
727
+ 285: (e, t, n) => {
728
+ var r = n(2);
729
+ e.exports = function(e) {
730
+ return e ? (e.substr(0, 2) === "{}" && (e = "\\{\\}" + e.substr(2)), g(function(e) {
731
+ return e.split("\\\\").join(i).split("\\{").join(a).split("\\}").join(o).split("\\,").join(s).split("\\.").join(c);
732
+ }(e), !0).map(u)) : [];
733
+ };
734
+ var i = "\0SLASH" + Math.random() + "\0", a = "\0OPEN" + Math.random() + "\0", o = "\0CLOSE" + Math.random() + "\0", s = "\0COMMA" + Math.random() + "\0", c = "\0PERIOD" + Math.random() + "\0";
735
+ function l(e) {
736
+ return parseInt(e, 10) == e ? parseInt(e, 10) : e.charCodeAt(0);
737
+ }
738
+ function u(e) {
739
+ return e.split(i).join("\\").split(a).join("{").split(o).join("}").split(s).join(",").split(c).join(".");
740
+ }
741
+ function d(e) {
742
+ if (!e) return [""];
743
+ var t = [], n = r("{", "}", e);
744
+ if (!n) return e.split(",");
745
+ var i = n.pre, a = n.body, o = n.post, s = i.split(",");
746
+ s[s.length - 1] += "{" + a + "}";
747
+ var c = d(o);
748
+ return o.length && (s[s.length - 1] += c.shift(), s.push.apply(s, c)), t.push.apply(t, s), t;
749
+ }
750
+ function f(e) {
751
+ return "{" + e + "}";
752
+ }
753
+ function p(e) {
754
+ return /^-?0\d/.test(e);
755
+ }
756
+ function m(e, t) {
757
+ return e <= t;
758
+ }
759
+ function h(e, t) {
760
+ return e >= t;
761
+ }
762
+ function g(e, t) {
763
+ var n = [], i = r("{", "}", e);
764
+ if (!i) return [e];
765
+ var a = i.pre, s = i.post.length ? g(i.post, !1) : [""];
766
+ if (/\$$/.test(i.pre)) for (var c = 0; c < s.length; c++) {
767
+ var u = a + "{" + i.body + "}" + s[c];
768
+ n.push(u);
769
+ }
770
+ else {
771
+ var _, v, y = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body), b = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body), x = y || b, S = i.body.indexOf(",") >= 0;
772
+ if (!x && !S) return i.post.match(/,(?!,).*\}/) ? g(e = i.pre + "{" + i.body + o + i.post) : [e];
773
+ if (x) _ = i.body.split(/\.\./);
774
+ else if ((_ = d(i.body)).length === 1 && (_ = g(_[0], !1).map(f)).length === 1) return s.map((function(e) {
775
+ return i.pre + _[0] + e;
776
+ }));
777
+ if (x) {
778
+ var ee = l(_[0]), te = l(_[1]), ne = Math.max(_[0].length, _[1].length), re = _.length == 3 ? Math.abs(l(_[2])) : 1, C = m;
779
+ te < ee && (re *= -1, C = h);
780
+ var ie = _.some(p);
781
+ v = [];
782
+ for (var w = ee; C(w, te); w += re) {
783
+ var T;
784
+ if (b) (T = String.fromCharCode(w)) === "\\" && (T = "");
785
+ else if (T = String(w), ie) {
786
+ var ae = ne - T.length;
787
+ if (ae > 0) {
788
+ var E = Array(ae + 1).join("0");
789
+ T = w < 0 ? "-" + E + T.slice(1) : E + T;
790
+ }
791
+ }
792
+ v.push(T);
793
+ }
794
+ } else {
795
+ v = [];
796
+ for (var D = 0; D < _.length; D++) v.push.apply(v, g(_[D], !1));
797
+ }
798
+ for (D = 0; D < v.length; D++) for (c = 0; c < s.length; c++) u = a + v[D] + s[c], (!t || x || u) && n.push(u);
799
+ }
800
+ return n;
801
+ }
802
+ },
803
+ 298: (e) => {
804
+ var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = {
805
+ rotl: function(e, t) {
806
+ return e << t | e >>> 32 - t;
807
+ },
808
+ rotr: function(e, t) {
809
+ return e << 32 - t | e >>> t;
810
+ },
811
+ endian: function(e) {
812
+ if (e.constructor == Number) return 16711935 & n.rotl(e, 8) | 4278255360 & n.rotl(e, 24);
813
+ for (var t = 0; t < e.length; t++) e[t] = n.endian(e[t]);
814
+ return e;
815
+ },
816
+ randomBytes: function(e) {
817
+ for (var t = []; e > 0; e--) t.push(Math.floor(256 * Math.random()));
818
+ return t;
819
+ },
820
+ bytesToWords: function(e) {
821
+ for (var t = [], n = 0, r = 0; n < e.length; n++, r += 8) t[r >>> 5] |= e[n] << 24 - r % 32;
822
+ return t;
823
+ },
824
+ wordsToBytes: function(e) {
825
+ for (var t = [], n = 0; n < 32 * e.length; n += 8) t.push(e[n >>> 5] >>> 24 - n % 32 & 255);
826
+ return t;
827
+ },
828
+ bytesToHex: function(e) {
829
+ for (var t = [], n = 0; n < e.length; n++) t.push((e[n] >>> 4).toString(16)), t.push((15 & e[n]).toString(16));
830
+ return t.join("");
831
+ },
832
+ hexToBytes: function(e) {
833
+ for (var t = [], n = 0; n < e.length; n += 2) t.push(parseInt(e.substr(n, 2), 16));
834
+ return t;
835
+ },
836
+ bytesToBase64: function(e) {
837
+ for (var n = [], r = 0; r < e.length; r += 3) for (var i = e[r] << 16 | e[r + 1] << 8 | e[r + 2], a = 0; a < 4; a++) 8 * r + 6 * a <= 8 * e.length ? n.push(t.charAt(i >>> 6 * (3 - a) & 63)) : n.push("=");
838
+ return n.join("");
839
+ },
840
+ base64ToBytes: function(e) {
841
+ e = e.replace(/[^A-Z0-9+\/]/gi, "");
842
+ for (var n = [], r = 0, i = 0; r < e.length; i = ++r % 4) i != 0 && n.push((t.indexOf(e.charAt(r - 1)) & 2 ** (-2 * i + 8) - 1) << 2 * i | t.indexOf(e.charAt(r)) >>> 6 - 2 * i);
843
+ return n;
844
+ }
845
+ };
846
+ e.exports = n;
847
+ },
848
+ 345: () => {},
849
+ 388: () => {},
850
+ 410: () => {},
851
+ 526: (e) => {
852
+ var t = {
853
+ utf8: {
854
+ stringToBytes: function(e) {
855
+ return t.bin.stringToBytes(unescape(encodeURIComponent(e)));
856
+ },
857
+ bytesToString: function(e) {
858
+ return decodeURIComponent(escape(t.bin.bytesToString(e)));
859
+ }
860
+ },
861
+ bin: {
862
+ stringToBytes: function(e) {
863
+ for (var t = [], n = 0; n < e.length; n++) t.push(255 & e.charCodeAt(n));
864
+ return t;
865
+ },
866
+ bytesToString: function(e) {
867
+ for (var t = [], n = 0; n < e.length; n++) t.push(String.fromCharCode(e[n]));
868
+ return t.join("");
869
+ }
870
+ }
871
+ };
872
+ e.exports = t;
873
+ },
874
+ 542: (e, t, n) => {
875
+ (function() {
876
+ var t = n(298), r = n(526).utf8, i = n(135), a = n(526).bin, o = function(e, n) {
877
+ e.constructor == String ? e = n && n.encoding === "binary" ? a.stringToBytes(e) : r.stringToBytes(e) : i(e) ? e = Array.prototype.slice.call(e, 0) : Array.isArray(e) || e.constructor === Uint8Array || (e = e.toString());
878
+ for (var s = t.bytesToWords(e), c = 8 * e.length, l = 1732584193, u = -271733879, d = -1732584194, f = 271733878, p = 0; p < s.length; p++) s[p] = 16711935 & (s[p] << 8 | s[p] >>> 24) | 4278255360 & (s[p] << 24 | s[p] >>> 8);
879
+ s[c >>> 5] |= 128 << c % 32, s[14 + (c + 64 >>> 9 << 4)] = c;
880
+ var m = o._ff, h = o._gg, g = o._hh, _ = o._ii;
881
+ for (p = 0; p < s.length; p += 16) {
882
+ var v = l, y = u, b = d, x = f;
883
+ l = m(l, u, d, f, s[p + 0], 7, -680876936), f = m(f, l, u, d, s[p + 1], 12, -389564586), d = m(d, f, l, u, s[p + 2], 17, 606105819), u = m(u, d, f, l, s[p + 3], 22, -1044525330), l = m(l, u, d, f, s[p + 4], 7, -176418897), f = m(f, l, u, d, s[p + 5], 12, 1200080426), d = m(d, f, l, u, s[p + 6], 17, -1473231341), u = m(u, d, f, l, s[p + 7], 22, -45705983), l = m(l, u, d, f, s[p + 8], 7, 1770035416), f = m(f, l, u, d, s[p + 9], 12, -1958414417), d = m(d, f, l, u, s[p + 10], 17, -42063), u = m(u, d, f, l, s[p + 11], 22, -1990404162), l = m(l, u, d, f, s[p + 12], 7, 1804603682), f = m(f, l, u, d, s[p + 13], 12, -40341101), d = m(d, f, l, u, s[p + 14], 17, -1502002290), l = h(l, u = m(u, d, f, l, s[p + 15], 22, 1236535329), d, f, s[p + 1], 5, -165796510), f = h(f, l, u, d, s[p + 6], 9, -1069501632), d = h(d, f, l, u, s[p + 11], 14, 643717713), u = h(u, d, f, l, s[p + 0], 20, -373897302), l = h(l, u, d, f, s[p + 5], 5, -701558691), f = h(f, l, u, d, s[p + 10], 9, 38016083), d = h(d, f, l, u, s[p + 15], 14, -660478335), u = h(u, d, f, l, s[p + 4], 20, -405537848), l = h(l, u, d, f, s[p + 9], 5, 568446438), f = h(f, l, u, d, s[p + 14], 9, -1019803690), d = h(d, f, l, u, s[p + 3], 14, -187363961), u = h(u, d, f, l, s[p + 8], 20, 1163531501), l = h(l, u, d, f, s[p + 13], 5, -1444681467), f = h(f, l, u, d, s[p + 2], 9, -51403784), d = h(d, f, l, u, s[p + 7], 14, 1735328473), l = g(l, u = h(u, d, f, l, s[p + 12], 20, -1926607734), d, f, s[p + 5], 4, -378558), f = g(f, l, u, d, s[p + 8], 11, -2022574463), d = g(d, f, l, u, s[p + 11], 16, 1839030562), u = g(u, d, f, l, s[p + 14], 23, -35309556), l = g(l, u, d, f, s[p + 1], 4, -1530992060), f = g(f, l, u, d, s[p + 4], 11, 1272893353), d = g(d, f, l, u, s[p + 7], 16, -155497632), u = g(u, d, f, l, s[p + 10], 23, -1094730640), l = g(l, u, d, f, s[p + 13], 4, 681279174), f = g(f, l, u, d, s[p + 0], 11, -358537222), d = g(d, f, l, u, s[p + 3], 16, -722521979), u = g(u, d, f, l, s[p + 6], 23, 76029189), l = g(l, u, d, f, s[p + 9], 4, -640364487), f = g(f, l, u, d, s[p + 12], 11, -421815835), d = g(d, f, l, u, s[p + 15], 16, 530742520), l = _(l, u = g(u, d, f, l, s[p + 2], 23, -995338651), d, f, s[p + 0], 6, -198630844), f = _(f, l, u, d, s[p + 7], 10, 1126891415), d = _(d, f, l, u, s[p + 14], 15, -1416354905), u = _(u, d, f, l, s[p + 5], 21, -57434055), l = _(l, u, d, f, s[p + 12], 6, 1700485571), f = _(f, l, u, d, s[p + 3], 10, -1894986606), d = _(d, f, l, u, s[p + 10], 15, -1051523), u = _(u, d, f, l, s[p + 1], 21, -2054922799), l = _(l, u, d, f, s[p + 8], 6, 1873313359), f = _(f, l, u, d, s[p + 15], 10, -30611744), d = _(d, f, l, u, s[p + 6], 15, -1560198380), u = _(u, d, f, l, s[p + 13], 21, 1309151649), l = _(l, u, d, f, s[p + 4], 6, -145523070), f = _(f, l, u, d, s[p + 11], 10, -1120210379), d = _(d, f, l, u, s[p + 2], 15, 718787259), u = _(u, d, f, l, s[p + 9], 21, -343485551), l = l + v >>> 0, u = u + y >>> 0, d = d + b >>> 0, f = f + x >>> 0;
884
+ }
885
+ return t.endian([
886
+ l,
887
+ u,
888
+ d,
889
+ f
890
+ ]);
891
+ };
892
+ o._ff = function(e, t, n, r, i, a, o) {
893
+ var s = e + (t & n | ~t & r) + (i >>> 0) + o;
894
+ return (s << a | s >>> 32 - a) + t;
895
+ }, o._gg = function(e, t, n, r, i, a, o) {
896
+ var s = e + (t & r | n & ~r) + (i >>> 0) + o;
897
+ return (s << a | s >>> 32 - a) + t;
898
+ }, o._hh = function(e, t, n, r, i, a, o) {
899
+ var s = e + (t ^ n ^ r) + (i >>> 0) + o;
900
+ return (s << a | s >>> 32 - a) + t;
901
+ }, o._ii = function(e, t, n, r, i, a, o) {
902
+ var s = e + (n ^ (t | ~r)) + (i >>> 0) + o;
903
+ return (s << a | s >>> 32 - a) + t;
904
+ }, o._blocksize = 16, o._digestsize = 16, e.exports = function(e, n) {
905
+ if (e == null) throw Error("Illegal argument " + e);
906
+ var r = t.wordsToBytes(o(e, n));
907
+ return n && n.asBytes ? r : n && n.asString ? a.bytesToString(r) : t.bytesToHex(r);
908
+ };
909
+ })();
910
+ },
911
+ 647: (e, t) => {
912
+ var n = Object.prototype.hasOwnProperty;
913
+ function r(e) {
914
+ try {
915
+ return decodeURIComponent(e.replace(/\+/g, " "));
916
+ } catch {
917
+ return null;
918
+ }
919
+ }
920
+ function i(e) {
921
+ try {
922
+ return encodeURIComponent(e);
923
+ } catch {
924
+ return null;
925
+ }
926
+ }
927
+ t.stringify = function(e, t) {
928
+ t ||= "";
929
+ var r, a, o = [];
930
+ for (a in typeof t != "string" && (t = "?"), e) if (n.call(e, a)) {
931
+ if ((r = e[a]) || r != null && !isNaN(r) || (r = ""), a = i(a), r = i(r), a === null || r === null) continue;
932
+ o.push(a + "=" + r);
933
+ }
934
+ return o.length ? t + o.join("&") : "";
935
+ }, t.parse = function(e) {
936
+ for (var t, n = /([^=?#&]+)=?([^&]*)/g, i = {}; t = n.exec(e);) {
937
+ var a = r(t[1]), o = r(t[2]);
938
+ a === null || o === null || a in i || (i[a] = o);
939
+ }
940
+ return i;
941
+ };
942
+ },
943
+ 670: (e) => {
944
+ e.exports = function(e, t) {
945
+ if (t = t.split(":")[0], !(e = +e)) return !1;
946
+ switch (t) {
947
+ case "http":
948
+ case "ws": return e !== 80;
949
+ case "https":
950
+ case "wss": return e !== 443;
951
+ case "ftp": return e !== 21;
952
+ case "gopher": return e !== 70;
953
+ case "file": return !1;
954
+ }
955
+ return e !== 0;
956
+ };
957
+ },
958
+ 737: (e, t, n) => {
959
+ var i = n(670), a = n(647), o = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/, s = /[\n\r\t]/g, c = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//, l = /:\d+$/, u = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i, d = /^[a-zA-Z]:/;
960
+ function f(e) {
961
+ return (e || "").toString().replace(o, "");
962
+ }
963
+ var p = [
964
+ ["#", "hash"],
965
+ ["?", "query"],
966
+ function(e, t) {
967
+ return g(t.protocol) ? e.replace(/\\/g, "/") : e;
968
+ },
969
+ ["/", "pathname"],
970
+ [
971
+ "@",
972
+ "auth",
973
+ 1
974
+ ],
975
+ [
976
+ NaN,
977
+ "host",
978
+ void 0,
979
+ 1,
980
+ 1
981
+ ],
982
+ [
983
+ /:(\d*)$/,
984
+ "port",
985
+ void 0,
986
+ 1
987
+ ],
988
+ [
989
+ NaN,
990
+ "hostname",
991
+ void 0,
992
+ 1,
993
+ 1
994
+ ]
995
+ ], m = {
996
+ hash: 1,
997
+ query: 1
998
+ };
999
+ function h(e) {
1000
+ var t, n = (typeof window < "u" ? window : r === void 0 ? typeof self < "u" ? self : {} : r).location || {}, i = {}, a = typeof (e ||= n);
1001
+ if (e.protocol === "blob:") i = new v(unescape(e.pathname), {});
1002
+ else if (a === "string") for (t in i = new v(e, {}), m) delete i[t];
1003
+ else if (a === "object") {
1004
+ for (t in e) t in m || (i[t] = e[t]);
1005
+ i.slashes === void 0 && (i.slashes = c.test(e.href));
1006
+ }
1007
+ return i;
1008
+ }
1009
+ function g(e) {
1010
+ return e === "file:" || e === "ftp:" || e === "http:" || e === "https:" || e === "ws:" || e === "wss:";
1011
+ }
1012
+ function _(e, t) {
1013
+ e = (e = f(e)).replace(s, ""), t ||= {};
1014
+ var n, r = u.exec(e), i = r[1] ? r[1].toLowerCase() : "", a = !!r[2], o = !!r[3], c = 0;
1015
+ return a ? o ? (n = r[2] + r[3] + r[4], c = r[2].length + r[3].length) : (n = r[2] + r[4], c = r[2].length) : o ? (n = r[3] + r[4], c = r[3].length) : n = r[4], i === "file:" ? c >= 2 && (n = n.slice(2)) : g(i) ? n = r[4] : i ? a && (n = n.slice(2)) : c >= 2 && g(t.protocol) && (n = r[4]), {
1016
+ protocol: i,
1017
+ slashes: a || g(i),
1018
+ slashesCount: c,
1019
+ rest: n
1020
+ };
1021
+ }
1022
+ function v(e, t, n) {
1023
+ if (e = (e = f(e)).replace(s, ""), !(this instanceof v)) return new v(e, t, n);
1024
+ var r, o, c, l, u, m, y = p.slice(), b = typeof t, x = this, S = 0;
1025
+ for (b !== "object" && b !== "string" && (n = t, t = null), n && typeof n != "function" && (n = a.parse), r = !(o = _(e || "", t = h(t))).protocol && !o.slashes, x.slashes = o.slashes || r && t.slashes, x.protocol = o.protocol || t.protocol || "", e = o.rest, (o.protocol === "file:" && (o.slashesCount !== 2 || d.test(e)) || !o.slashes && (o.protocol || o.slashesCount < 2 || !g(x.protocol))) && (y[3] = [/(.*)/, "pathname"]); S < y.length; S++) typeof (l = y[S]) == "function" ? e = l(e, x) : (c = l[0], m = l[1], c == c ? typeof c == "string" ? ~(u = c === "@" ? e.lastIndexOf(c) : e.indexOf(c)) && (typeof l[2] == "number" ? (x[m] = e.slice(0, u), e = e.slice(u + l[2])) : (x[m] = e.slice(u), e = e.slice(0, u))) : (u = c.exec(e)) && (x[m] = u[1], e = e.slice(0, u.index)) : x[m] = e, x[m] = x[m] || r && l[3] && t[m] || "", l[4] && (x[m] = x[m].toLowerCase()));
1026
+ n && (x.query = n(x.query)), r && t.slashes && x.pathname.charAt(0) !== "/" && (x.pathname !== "" || t.pathname !== "") && (x.pathname = function(e, t) {
1027
+ if (e === "") return t;
1028
+ 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--);
1029
+ return a && n.unshift(""), i !== "." && i !== ".." || n.push(""), n.join("/");
1030
+ }(x.pathname, t.pathname)), x.pathname.charAt(0) !== "/" && g(x.protocol) && (x.pathname = "/" + x.pathname), i(x.port, x.protocol) || (x.host = x.hostname, x.port = ""), x.username = x.password = "", x.auth &&= (~(u = x.auth.indexOf(":")) ? (x.username = x.auth.slice(0, u), x.username = encodeURIComponent(decodeURIComponent(x.username)), x.password = x.auth.slice(u + 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:" && g(x.protocol) && x.host ? x.protocol + "//" + x.host : "null", x.href = x.toString();
1031
+ }
1032
+ v.prototype = {
1033
+ set: function(e, t, n) {
1034
+ var r = this;
1035
+ switch (e) {
1036
+ case "query":
1037
+ typeof t == "string" && t.length && (t = (n || a.parse)(t)), r[e] = t;
1038
+ break;
1039
+ case "port":
1040
+ r[e] = t, i(t, r.protocol) ? t && (r.host = r.hostname + ":" + t) : (r.host = r.hostname, r[e] = "");
1041
+ break;
1042
+ case "hostname":
1043
+ r[e] = t, r.port && (t += ":" + r.port), r.host = t;
1044
+ break;
1045
+ case "host":
1046
+ r[e] = t, l.test(t) ? (t = t.split(":"), r.port = t.pop(), r.hostname = t.join(":")) : (r.hostname = t, r.port = "");
1047
+ break;
1048
+ case "protocol":
1049
+ r.protocol = t.toLowerCase(), r.slashes = !n;
1050
+ break;
1051
+ case "pathname":
1052
+ case "hash":
1053
+ if (t) {
1054
+ var o = e === "pathname" ? "/" : "#";
1055
+ r[e] = t.charAt(0) === o ? t : o + t;
1056
+ } else r[e] = t;
1057
+ break;
1058
+ case "username":
1059
+ case "password":
1060
+ r[e] = encodeURIComponent(t);
1061
+ break;
1062
+ case "auth":
1063
+ var s = t.indexOf(":");
1064
+ ~s ? (r.username = t.slice(0, s), r.username = encodeURIComponent(decodeURIComponent(r.username)), r.password = t.slice(s + 1), r.password = encodeURIComponent(decodeURIComponent(r.password))) : r.username = encodeURIComponent(decodeURIComponent(t));
1065
+ }
1066
+ for (var c = 0; c < p.length; c++) {
1067
+ var u = p[c];
1068
+ u[4] && (r[u[1]] = r[u[1]].toLowerCase());
1069
+ }
1070
+ return r.auth = r.password ? r.username + ":" + r.password : r.username, r.origin = r.protocol !== "file:" && g(r.protocol) && r.host ? r.protocol + "//" + r.host : "null", r.href = r.toString(), r;
1071
+ },
1072
+ toString: function(e) {
1073
+ e && typeof e == "function" || (e = a.stringify);
1074
+ var t, n = this, r = n.host, i = n.protocol;
1075
+ i && i.charAt(i.length - 1) !== ":" && (i += ":");
1076
+ var o = i + (n.protocol && n.slashes || g(n.protocol) ? "//" : "");
1077
+ return n.username ? (o += n.username, n.password && (o += ":" + n.password), o += "@") : n.password ? (o += ":" + n.password, o += "@") : n.protocol !== "file:" && g(n.protocol) && !r && n.pathname !== "/" && (o += "@"), (r[r.length - 1] === ":" || l.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;
1078
+ }
1079
+ }, v.extractProtocol = _, v.location = h, v.trimLeft = f, v.qs = a, e.exports = v;
1080
+ },
1081
+ 800: () => {},
1082
+ 805: () => {},
1083
+ 829: (e) => {
1084
+ function t(e) {
1085
+ return t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
1086
+ return typeof e;
1087
+ } : function(e) {
1088
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1089
+ }, t(e);
1090
+ }
1091
+ function n(e) {
1092
+ var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
1093
+ return n = function(e) {
1094
+ if (e === null || (n = e, Function.toString.call(n).indexOf("[native code]") === -1)) return e;
1095
+ var n;
1096
+ if (typeof e != "function") throw TypeError("Super expression must either be null or a function");
1097
+ if (t !== void 0) {
1098
+ if (t.has(e)) return t.get(e);
1099
+ t.set(e, o);
1100
+ }
1101
+ function o() {
1102
+ return r(e, arguments, a(this).constructor);
1103
+ }
1104
+ return o.prototype = Object.create(e.prototype, { constructor: {
1105
+ value: o,
1106
+ enumerable: !1,
1107
+ writable: !0,
1108
+ configurable: !0
1109
+ } }), i(o, e);
1110
+ }, n(e);
1111
+ }
1112
+ function r(e, t, n) {
1113
+ return r = function() {
1114
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
1115
+ if (typeof Proxy == "function") return !0;
1116
+ try {
1117
+ return Date.prototype.toString.call(Reflect.construct(Date, [], (function() {}))), !0;
1118
+ } catch {
1119
+ return !1;
1120
+ }
1121
+ }() ? Reflect.construct : function(e, t, n) {
1122
+ var r = [null];
1123
+ r.push.apply(r, t);
1124
+ var a = new (Function.bind.apply(e, r))();
1125
+ return n && i(a, n.prototype), a;
1126
+ }, r.apply(null, arguments);
1127
+ }
1128
+ function i(e, t) {
1129
+ return i = Object.setPrototypeOf || function(e, t) {
1130
+ return e.__proto__ = t, e;
1131
+ }, i(e, t);
1132
+ }
1133
+ function a(e) {
1134
+ return a = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
1135
+ return e.__proto__ || Object.getPrototypeOf(e);
1136
+ }, a(e);
1137
+ }
1138
+ var o = function(e) {
1139
+ function n(e) {
1140
+ var r;
1141
+ return function(e, t) {
1142
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
1143
+ }(this, n), (r = function(e, n) {
1144
+ return !n || t(n) !== "object" && typeof n != "function" ? function(e) {
1145
+ if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
1146
+ return e;
1147
+ }(e) : n;
1148
+ }(this, a(n).call(this, e))).name = "ObjectPrototypeMutationError", r;
1149
+ }
1150
+ return function(e, t) {
1151
+ if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function");
1152
+ e.prototype = Object.create(t && t.prototype, { constructor: {
1153
+ value: e,
1154
+ writable: !0,
1155
+ configurable: !0
1156
+ } }), t && i(e, t);
1157
+ }(n, e), n;
1158
+ }(n(Error));
1159
+ function s(e, n) {
1160
+ for (var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {}, i = n.split("."), a = i.length, o = function(t) {
1161
+ var n = i[t];
1162
+ if (!e) return { v: void 0 };
1163
+ if (n === "+") {
1164
+ if (Array.isArray(e)) return { v: e.map((function(n, a) {
1165
+ var o = i.slice(t + 1);
1166
+ return o.length > 0 ? s(n, o.join("."), r) : r(e, a, i, t);
1167
+ })) };
1168
+ var a = i.slice(0, t).join(".");
1169
+ throw Error(`Object at wildcard (${a}) is not an array`);
1170
+ }
1171
+ e = r(e, n, i, t);
1172
+ }, c = 0; c < a; c++) {
1173
+ var l = o(c);
1174
+ if (t(l) === "object") return l.v;
1175
+ }
1176
+ return e;
1177
+ }
1178
+ function c(e, t) {
1179
+ return e.length === t + 1;
1180
+ }
1181
+ e.exports = {
1182
+ set: function(e, n, r) {
1183
+ if (t(e) != "object" || e === null || n === void 0) return e;
1184
+ if (typeof n == "number") return e[n] = r, e[n];
1185
+ try {
1186
+ return s(e, n, (function(e, t, n, i) {
1187
+ if (e === Reflect.getPrototypeOf({})) throw new o("Attempting to mutate Object.prototype");
1188
+ if (!e[t]) {
1189
+ var a = Number.isInteger(Number(n[i + 1])), s = n[i + 1] === "+";
1190
+ e[t] = a || s ? [] : {};
1191
+ }
1192
+ return c(n, i) && (e[t] = r), e[t];
1193
+ }));
1194
+ } catch (t) {
1195
+ if (t instanceof o) throw t;
1196
+ return e;
1197
+ }
1198
+ },
1199
+ get: function(e, n) {
1200
+ if (t(e) != "object" || e === null || n === void 0) return e;
1201
+ if (typeof n == "number") return e[n];
1202
+ try {
1203
+ return s(e, n, (function(e, t) {
1204
+ return e[t];
1205
+ }));
1206
+ } catch {
1207
+ return e;
1208
+ }
1209
+ },
1210
+ has: function(e, n) {
1211
+ var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1212
+ if (t(e) != "object" || e === null || n === void 0) return !1;
1213
+ if (typeof n == "number") return n in e;
1214
+ try {
1215
+ var i = !1;
1216
+ return s(e, n, (function(e, t, n, a) {
1217
+ if (!c(n, a)) return e && e[t];
1218
+ i = r.own ? e.hasOwnProperty(t) : t in e;
1219
+ })), i;
1220
+ } catch {
1221
+ return !1;
1222
+ }
1223
+ },
1224
+ hasOwn: function(e, t, n) {
1225
+ return this.has(e, t, n || { own: !0 });
1226
+ },
1227
+ isIn: function(e, n, r) {
1228
+ var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
1229
+ if (t(e) != "object" || e === null || n === void 0) return !1;
1230
+ try {
1231
+ var a = !1, o = !1;
1232
+ return s(e, n, (function(e, n, i, s) {
1233
+ return a = a || e === r || !!e && e[n] === r, o = c(i, s) && t(e) === "object" && n in e, e && e[n];
1234
+ })), i.validPath ? a && o : a;
1235
+ } catch {
1236
+ return !1;
1237
+ }
1238
+ },
1239
+ ObjectPrototypeMutationError: o
1240
+ };
1241
+ }
1242
+ }, Te = {};
1243
+ function k(e) {
1244
+ var t = Te[e];
1245
+ if (t !== void 0) return t.exports;
1246
+ var n = Te[e] = {
1247
+ id: e,
1248
+ loaded: !1,
1249
+ exports: {}
1250
+ };
1251
+ return we[e].call(n.exports, n, n.exports, k), n.loaded = !0, n.exports;
1252
+ }
1253
+ k.n = (e) => {
1254
+ var t = e && e.__esModule ? () => e.default : () => e;
1255
+ return k.d(t, { a: t }), t;
1256
+ }, k.d = (e, t) => {
1257
+ for (var n in t) k.o(t, n) && !k.o(e, n) && Object.defineProperty(e, n, {
1258
+ enumerable: !0,
1259
+ get: t[n]
1260
+ });
1261
+ }, k.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), k.nmd = (e) => (e.paths = [], e.children ||= [], e);
1262
+ var Ee = k(737), De = k.n(Ee);
1263
+ function Oe(e) {
1264
+ if (!ke(e)) throw Error("Parameter was not an error");
1265
+ }
1266
+ function ke(e) {
1267
+ return !!e && typeof e == "object" && (t = e, Object.prototype.toString.call(t)) === "[object Error]" || e instanceof Error;
1268
+ var t;
1269
+ }
1270
+ var A = class e extends Error {
1271
+ constructor(e, t) {
1272
+ let { options: n, shortMessage: r } = function(e) {
1273
+ let t, n = "";
1274
+ if (e.length === 0) t = {};
1275
+ else if (ke(e[0])) t = { cause: e[0] }, n = e.slice(1).join(" ") || "";
1276
+ else if (e[0] && typeof e[0] == "object") t = Object.assign({}, e[0]), n = e.slice(1).join(" ") || "";
1277
+ else {
1278
+ if (typeof e[0] != "string") throw Error("Invalid arguments passed to Layerr");
1279
+ t = {}, n = n = e.join(" ") || "";
1280
+ }
1281
+ return {
1282
+ options: t,
1283
+ shortMessage: n
1284
+ };
1285
+ }([...arguments]), i = r;
1286
+ if (n.cause && (i = `${i}: ${n.cause.message}`), super(i), this.message = i, n.name && typeof n.name == "string" ? this.name = n.name : this.name = "Layerr", n.cause && Object.defineProperty(this, "_cause", { value: n.cause }), Object.defineProperty(this, "_info", { value: {} }), n.info && typeof n.info == "object" && Object.assign(this._info, n.info), Error.captureStackTrace) {
1287
+ let e = n.constructorOpt || this.constructor;
1288
+ Error.captureStackTrace(this, e);
1289
+ }
1290
+ }
1291
+ static cause(e) {
1292
+ return Oe(e), e._cause && ke(e._cause) ? e._cause : null;
1293
+ }
1294
+ static fullStack(t) {
1295
+ Oe(t);
1296
+ let n = e.cause(t);
1297
+ return n ? `${t.stack}\ncaused by: ${e.fullStack(n)}` : t.stack ?? "";
1298
+ }
1299
+ static info(t) {
1300
+ Oe(t);
1301
+ let n = {}, r = e.cause(t);
1302
+ return r && Object.assign(n, e.info(r)), t._info && Object.assign(n, t._info), n;
1303
+ }
1304
+ toString() {
1305
+ let e = this.name || this.constructor.name || this.constructor.prototype.name;
1306
+ return this.message && (e = `${e}: ${this.message}`), e;
1307
+ }
1308
+ }, Ae = k(47), je = k.n(Ae), Me = "__PATH_SEPARATOR_POSIX__", Ne = "__PATH_SEPARATOR_WINDOWS__";
1309
+ function j(e) {
1310
+ try {
1311
+ let t = e.replace(/\//g, Me).replace(/\\\\/g, Ne);
1312
+ return encodeURIComponent(t).split(Ne).join("\\\\").split(Me).join("/");
1313
+ } catch (e) {
1314
+ throw new A(e, "Failed encoding path");
1315
+ }
1316
+ }
1317
+ function Pe(e) {
1318
+ return e.startsWith("/") ? e : "/" + e;
1319
+ }
1320
+ function Fe(e) {
1321
+ let t = e;
1322
+ return t[0] !== "/" && (t = "/" + t), /^.+\/$/.test(t) && (t = t.substr(0, t.length - 1)), t;
1323
+ }
1324
+ function Ie(e) {
1325
+ let t = new (De())(e).pathname;
1326
+ return t.length <= 0 && (t = "/"), Fe(t);
1327
+ }
1328
+ function M() {
1329
+ return function() {
1330
+ return function(e) {
1331
+ var t = [];
1332
+ if (e.length === 0) return "";
1333
+ if (typeof e[0] != "string") throw TypeError("Url must be a string. Received " + e[0]);
1334
+ e[0].match(/^[^/:]+:\/*$/) && e.length > 1 && (e[0] = e.shift() + e[0]), e[0].match(/^file:\/\/\//) ? e[0] = e[0].replace(/^([^/:]+):\/*/, "$1:///") : e[0] = e[0].replace(/^([^/:]+):\/*/, "$1://");
1335
+ for (var n = 0; n < e.length; n++) {
1336
+ var r = e[n];
1337
+ if (typeof r != "string") throw TypeError("Url must be a string. Received " + r);
1338
+ r !== "" && (n > 0 && (r = r.replace(/^[\/]+/, "")), r = n < e.length - 1 ? r.replace(/[\/]+$/, "") : r.replace(/[\/]+$/, "/"), t.push(r));
1339
+ }
1340
+ var i = t.join("/"), a = (i = i.replace(/\/(\?|&|#[^!])/g, "$1")).split("?");
1341
+ return a.shift() + (a.length > 0 ? "?" : "") + a.join("&");
1342
+ }(typeof arguments[0] == "object" ? arguments[0] : [].slice.call(arguments));
1343
+ }([...arguments].reduce(((e, t, n) => ((n === 0 || t !== "/" || t === "/" && e[e.length - 1] !== "/") && e.push(t), e)), []));
1344
+ }
1345
+ var Le = k(542), Re = k.n(Le);
1346
+ function ze(e, t) {
1347
+ 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) {
1348
+ let s = o || Re()(`${t}:${n}:${r}`);
1349
+ return e && e.toLowerCase() === "md5-sess" ? Re()(`${s}:${i}:${a}`) : s;
1350
+ }(t.algorithm, t.username, t.realm, t.password, t.nonce, t.cnonce, t.ha1), c = Re()(`${i}:${r}`), l = a ? Re()(`${s}:${t.nonce}:${o}:${t.cnonce}:${a}:${c}`) : Re()(`${s}:${t.nonce}:${c}`), u = {
1351
+ username: t.username,
1352
+ realm: t.realm,
1353
+ nonce: t.nonce,
1354
+ uri: r,
1355
+ qop: a,
1356
+ response: l,
1357
+ nc: o,
1358
+ cnonce: t.cnonce,
1359
+ algorithm: t.algorithm,
1360
+ opaque: t.opaque
1361
+ }, d = [];
1362
+ for (let e in u) u[e] && (e === "qop" || e === "nc" || e === "algorithm" ? d.push(`${e}=${u[e]}`) : d.push(`${e}="${u[e]}"`));
1363
+ return `Digest ${d.join(", ")}`;
1364
+ }
1365
+ function Be(e) {
1366
+ return (e.headers && e.headers.get("www-authenticate") || "").split(/\s/)[0].toLowerCase() === "digest";
1367
+ }
1368
+ var Ve = k(101), He = k.n(Ve);
1369
+ function Ue(e) {
1370
+ return He().decode(e);
1371
+ }
1372
+ function We(e, t) {
1373
+ var n;
1374
+ return `Basic ${n = `${e}:${t}`, He().encode(n)}`;
1375
+ }
1376
+ var Ge = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : typeof window < "u" ? window : globalThis, Ke = Ge.fetch.bind(Ge);
1377
+ Ge.Headers, Ge.Request, Ge.Response;
1378
+ var N = function(e) {
1379
+ return e.Auto = "auto", e.Digest = "digest", e.None = "none", e.Password = "password", e.Token = "token", e;
1380
+ }({}), P = function(e) {
1381
+ 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;
1382
+ }({});
1383
+ function qe(e, t, n, r, i) {
1384
+ switch (e.authType) {
1385
+ case N.Auto:
1386
+ t && n && (e.headers.Authorization = We(t, n));
1387
+ break;
1388
+ case N.Digest:
1389
+ e.digest = function(e, t, n) {
1390
+ return {
1391
+ username: e,
1392
+ password: t,
1393
+ ha1: n,
1394
+ nc: 0,
1395
+ algorithm: "md5",
1396
+ hasDigestAuth: !1
1397
+ };
1398
+ }(t, n, i);
1399
+ break;
1400
+ case N.None: break;
1401
+ case N.Password:
1402
+ e.headers.Authorization = We(t, n);
1403
+ break;
1404
+ case N.Token:
1405
+ e.headers.Authorization = `${(a = r).token_type} ${a.access_token}`;
1406
+ break;
1407
+ default: throw new A({ info: { code: P.InvalidAuthType } }, `Invalid auth type: ${e.authType}`);
1408
+ }
1409
+ var a;
1410
+ }
1411
+ k(345), k(800);
1412
+ var Je = "@@HOTPATCHER", Ye = () => {};
1413
+ function Xe(e) {
1414
+ return {
1415
+ original: e,
1416
+ methods: [e],
1417
+ final: !1
1418
+ };
1419
+ }
1420
+ var Ze = class {
1421
+ constructor() {
1422
+ this._configuration = {
1423
+ registry: {},
1424
+ getEmptyAction: "null"
1425
+ }, this.__type__ = Je;
1426
+ }
1427
+ get configuration() {
1428
+ return this._configuration;
1429
+ }
1430
+ get getEmptyAction() {
1431
+ return this.configuration.getEmptyAction;
1432
+ }
1433
+ set getEmptyAction(e) {
1434
+ this.configuration.getEmptyAction = e;
1435
+ }
1436
+ control(e) {
1437
+ let t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
1438
+ if (!e || e.__type__ !== Je) throw Error("Failed taking control of target HotPatcher instance: Invalid type or object");
1439
+ return Object.keys(e.configuration.registry).forEach(((n) => {
1440
+ 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]);
1441
+ })), e._configuration = this.configuration, this;
1442
+ }
1443
+ execute(e) {
1444
+ return (this.get(e) || Ye)(...[...arguments].slice(1));
1445
+ }
1446
+ get(e) {
1447
+ let t = this.configuration.registry[e];
1448
+ if (!t) switch (this.getEmptyAction) {
1449
+ case "null": return null;
1450
+ case "throw": throw Error(`Failed handling method request: No method provided for override: ${e}`);
1451
+ default: throw Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`);
1452
+ }
1453
+ return function() {
1454
+ var e = [...arguments];
1455
+ if (e.length === 0) throw Error("Failed creating sequence: No functions provided");
1456
+ return function() {
1457
+ let t = [...arguments], n = this;
1458
+ for (; e.length > 0;) t = [e.shift().apply(n, t)];
1459
+ return t[0];
1460
+ };
1461
+ }(...t.methods);
1462
+ }
1463
+ isPatched(e) {
1464
+ return !!this.configuration.registry[e];
1465
+ }
1466
+ patch(e, t) {
1467
+ let { chain: n = !1 } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1468
+ if (this.configuration.registry[e] && this.configuration.registry[e].final) throw Error(`Failed patching '${e}': Method marked as being final`);
1469
+ if (typeof t != "function") throw Error(`Failed patching '${e}': Provided method is not a function`);
1470
+ if (n) this.configuration.registry[e] ? this.configuration.registry[e].methods.push(t) : this.configuration.registry[e] = Xe(t);
1471
+ else if (this.isPatched(e)) {
1472
+ let { original: n } = this.configuration.registry[e];
1473
+ this.configuration.registry[e] = Object.assign(Xe(t), { original: n });
1474
+ } else this.configuration.registry[e] = Xe(t);
1475
+ return this;
1476
+ }
1477
+ patchInline(e, t) {
1478
+ this.isPatched(e) || this.patch(e, t);
1479
+ var n = [...arguments].slice(2);
1480
+ return this.execute(e, ...n);
1481
+ }
1482
+ plugin(e) {
1483
+ return [...arguments].slice(1).forEach(((t) => {
1484
+ this.patch(e, t, { chain: !0 });
1485
+ })), this;
1486
+ }
1487
+ restore(e) {
1488
+ if (!this.isPatched(e)) throw Error(`Failed restoring method: No method present for key: ${e}`);
1489
+ if (typeof this.configuration.registry[e].original != "function") throw Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);
1490
+ return this.configuration.registry[e].methods = [this.configuration.registry[e].original], this;
1491
+ }
1492
+ setFinal(e) {
1493
+ if (!this.configuration.registry.hasOwnProperty(e)) throw Error(`Failed marking '${e}' as final: No method found for key`);
1494
+ return this.configuration.registry[e].final = !0, this;
1495
+ }
1496
+ }, Qe = null;
1497
+ function $e() {
1498
+ return Qe ||= new Ze(), Qe;
1499
+ }
1500
+ function et(e) {
1501
+ return function(e) {
1502
+ if (typeof e != "object" || !e || Object.prototype.toString.call(e) != "[object Object]") return !1;
1503
+ if (Object.getPrototypeOf(e) === null) return !0;
1504
+ let t = e;
1505
+ for (; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t);
1506
+ return Object.getPrototypeOf(e) === t;
1507
+ }(e) ? Object.assign({}, e) : Object.setPrototypeOf(Object.assign({}, e), Object.getPrototypeOf(e));
1508
+ }
1509
+ function tt() {
1510
+ var e = [...arguments];
1511
+ let t = null, n = [...e];
1512
+ for (; n.length > 0;) {
1513
+ let e = n.shift();
1514
+ t = t ? nt(t, e) : et(e);
1515
+ }
1516
+ return t;
1517
+ }
1518
+ function nt(e, t) {
1519
+ let n = et(e);
1520
+ return Object.keys(t).forEach(((e) => {
1521
+ 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] ? nt(n[e], t[e]) : et(t[e]) : n[e] = t[e] : n[e] = t[e];
1522
+ })), n;
1523
+ }
1524
+ function rt(e) {
1525
+ let t = {};
1526
+ for (let n of e.keys()) t[n] = e.get(n);
1527
+ return t;
1528
+ }
1529
+ function it() {
1530
+ var e = [...arguments];
1531
+ if (e.length === 0) return {};
1532
+ let t = {};
1533
+ return e.reduce(((e, n) => (Object.keys(n).forEach(((r) => {
1534
+ let i = r.toLowerCase();
1535
+ t.hasOwnProperty(i) ? e[t[i]] = n[r] : (t[i] = r, e[r] = n[r]);
1536
+ })), e)), {});
1537
+ }
1538
+ k(805);
1539
+ var at = typeof ArrayBuffer == "function", { toString: ot } = Object.prototype;
1540
+ function st(e) {
1541
+ return at && (e instanceof ArrayBuffer || ot.call(e) === "[object ArrayBuffer]");
1542
+ }
1543
+ function ct(e) {
1544
+ return e != null && e.constructor != null && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
1545
+ }
1546
+ function lt(e) {
1547
+ return function() {
1548
+ var t = [...arguments];
1549
+ try {
1550
+ return Promise.resolve(e.apply(this, t));
1551
+ } catch (e) {
1552
+ return Promise.reject(e);
1553
+ }
1554
+ };
1555
+ }
1556
+ function ut(e, t, n) {
1557
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
1558
+ }
1559
+ var dt = lt((function(e) {
1560
+ let t = e._digest;
1561
+ return delete e._digest, t.hasDigestAuth && (e = tt(e, { headers: { Authorization: ze(e, t) } })), ut(pt(e), (function(n) {
1562
+ let r = !1;
1563
+ return i = function(e) {
1564
+ return r ? e : n;
1565
+ }, (a = function() {
1566
+ if (n.status == 401) return t.hasDigestAuth = function(e, t) {
1567
+ if (!Be(e)) return !1;
1568
+ let n = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;
1569
+ for (;;) {
1570
+ let r = e.headers && e.headers.get("www-authenticate") || "", i = n.exec(r);
1571
+ if (!i) break;
1572
+ t[i[1]] = i[2] || i[3];
1573
+ }
1574
+ return t.nc += 1, t.cnonce = function() {
1575
+ let e = "";
1576
+ for (let t = 0; t < 32; ++t) e = `${e}${"abcdef0123456789"[Math.floor(16 * Math.random())]}`;
1577
+ return e;
1578
+ }(), !0;
1579
+ }(n, t), function() {
1580
+ if (t.hasDigestAuth) return ut(pt(e = tt(e, { headers: { Authorization: ze(e, t) } })), (function(e) {
1581
+ return e.status == 401 ? t.hasDigestAuth = !1 : t.nc++, r = !0, e;
1582
+ }));
1583
+ }();
1584
+ t.nc++;
1585
+ }()) && a.then ? a.then(i) : i(a);
1586
+ var i, a;
1587
+ }));
1588
+ })), ft = lt((function(e, t) {
1589
+ return ut(pt(e), (function(n) {
1590
+ return n.ok ? (t.authType = N.Password, n) : n.status == 401 && Be(n) ? (t.authType = N.Digest, qe(t, t.username, t.password, void 0, void 0), e._digest = t.digest, dt(e)) : n;
1591
+ }));
1592
+ })), F = lt((function(e, t) {
1593
+ return t.authType === N.Auto ? ft(e, t) : e._digest ? dt(e) : pt(e);
1594
+ }));
1595
+ function I(e, t, n) {
1596
+ let r = et(e);
1597
+ return r.headers = it(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;
1598
+ }
1599
+ function pt(e) {
1600
+ let t = $e();
1601
+ return t.patchInline("request", ((e) => t.patchInline("fetch", Ke, e.url, function(e) {
1602
+ let t = {}, n = { method: e.method };
1603
+ if (e.headers && (t = it(t, e.headers)), e.data !== void 0) {
1604
+ let [r, i] = function(e) {
1605
+ if (typeof e == "string" || ct(e) || st(e)) return [e, {}];
1606
+ if (e && typeof e == "object") return [JSON.stringify(e), { "content-type": "application/json" }];
1607
+ throw Error("Unable to convert request body: Unexpected body type: " + typeof e);
1608
+ }(e.data);
1609
+ n.body = r, t = it(t, i);
1610
+ }
1611
+ return e.signal && (n.signal = e.signal), e.withCredentials && (n.credentials = "include"), n.headers = t, n;
1612
+ }(e))), e);
1613
+ }
1614
+ var mt = k(285), ht = (e) => {
1615
+ if (typeof e != "string") throw TypeError("invalid pattern");
1616
+ if (e.length > 65536) throw TypeError("pattern is too long");
1617
+ }, gt = {
1618
+ "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
1619
+ "[:alpha:]": ["\\p{L}\\p{Nl}", !0],
1620
+ "[:ascii:]": ["\\x00-\\x7f", !1],
1621
+ "[:blank:]": ["\\p{Zs}\\t", !0],
1622
+ "[:cntrl:]": ["\\p{Cc}", !0],
1623
+ "[:digit:]": ["\\p{Nd}", !0],
1624
+ "[:graph:]": [
1625
+ "\\p{Z}\\p{C}",
1626
+ !0,
1627
+ !0
1628
+ ],
1629
+ "[:lower:]": ["\\p{Ll}", !0],
1630
+ "[:print:]": ["\\p{C}", !0],
1631
+ "[:punct:]": ["\\p{P}", !0],
1632
+ "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", !0],
1633
+ "[:upper:]": ["\\p{Lu}", !0],
1634
+ "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
1635
+ "[:xdigit:]": ["A-Fa-f0-9", !1]
1636
+ }, _t = (e) => e.replace(/[[\]\\-]/g, "\\$&"), vt = (e) => e.join(""), yt = (e, t) => {
1637
+ let n = t;
1638
+ if (e.charAt(n) !== "[") throw Error("not in a brace expression");
1639
+ let r = [], i = [], a = n + 1, o = !1, s = !1, c = !1, l = !1, u = n, d = "";
1640
+ t: for (; a < e.length;) {
1641
+ let t = e.charAt(a);
1642
+ if (t !== "!" && t !== "^" || a !== n + 1) {
1643
+ if (t === "]" && o && !c) {
1644
+ u = a + 1;
1645
+ break;
1646
+ }
1647
+ if (o = !0, t !== "\\" || c) {
1648
+ if (t === "[" && !c) {
1649
+ for (let [t, [o, c, l]] of Object.entries(gt)) if (e.startsWith(t, a)) {
1650
+ if (d) return [
1651
+ "$.",
1652
+ !1,
1653
+ e.length - n,
1654
+ !0
1655
+ ];
1656
+ a += t.length, l ? i.push(o) : r.push(o), s ||= c;
1657
+ continue t;
1658
+ }
1659
+ }
1660
+ c = !1, d ? (t > d ? r.push(_t(d) + "-" + _t(t)) : t === d && r.push(_t(t)), d = "", a++) : e.startsWith("-]", a + 1) ? (r.push(_t(t + "-")), a += 2) : e.startsWith("-", a + 1) ? (d = t, a += 2) : (r.push(_t(t)), a++);
1661
+ } else c = !0, a++;
1662
+ } else l = !0, a++;
1663
+ }
1664
+ if (u < a) return [
1665
+ "",
1666
+ !1,
1667
+ 0,
1668
+ !1
1669
+ ];
1670
+ if (!r.length && !i.length) return [
1671
+ "$.",
1672
+ !1,
1673
+ e.length - n,
1674
+ !0
1675
+ ];
1676
+ if (i.length === 0 && r.length === 1 && /^\\?.$/.test(r[0]) && !l) return [
1677
+ (f = r[0].length === 2 ? r[0].slice(-1) : r[0], f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")),
1678
+ !1,
1679
+ u - n,
1680
+ !1
1681
+ ];
1682
+ var f;
1683
+ let p = "[" + (l ? "^" : "") + vt(r) + "]", m = "[" + (l ? "" : "^") + vt(i) + "]";
1684
+ return [
1685
+ r.length && i.length ? "(" + p + "|" + m + ")" : r.length ? p : m,
1686
+ s,
1687
+ u - n,
1688
+ !0
1689
+ ];
1690
+ }, bt = function(e) {
1691
+ let { windowsPathsNoEscape: t = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1692
+ return t ? e.replace(/\[([^\/\\])\]/g, "$1") : e.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
1693
+ }, xt = new Set([
1694
+ "!",
1695
+ "?",
1696
+ "+",
1697
+ "*",
1698
+ "@"
1699
+ ]), St = (e) => xt.has(e), Ct = "(?!\\.)", wt = new Set(["[", "."]), Tt = new Set(["..", "."]), Et = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), Dt = "[^/]", Ot = Dt + "*?", kt = Dt + "+?", At = class e {
1700
+ type;
1701
+ #e;
1702
+ #t;
1703
+ #n = !1;
1704
+ #r = [];
1705
+ #i;
1706
+ #a;
1707
+ #o;
1708
+ #s = !1;
1709
+ #c;
1710
+ #l;
1711
+ #u = !1;
1712
+ constructor(e, t) {
1713
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1714
+ this.type = e, e && (this.#t = !0), this.#i = t, this.#e = this.#i ? this.#i.#e : this, this.#c = this.#e === this ? n : this.#e.#c, this.#o = this.#e === this ? [] : this.#e.#o, e !== "!" || this.#e.#s || this.#o.push(this), this.#a = this.#i ? this.#i.#r.length : 0;
1715
+ }
1716
+ get hasMagic() {
1717
+ if (this.#t !== void 0) return this.#t;
1718
+ for (let e of this.#r) if (typeof e != "string" && (e.type || e.hasMagic)) return this.#t = !0;
1719
+ return this.#t;
1720
+ }
1721
+ toString() {
1722
+ return this.#l === void 0 ? this.type ? this.#l = this.type + "(" + this.#r.map(((e) => String(e))).join("|") + ")" : this.#l = this.#r.map(((e) => String(e))).join("") : this.#l;
1723
+ }
1724
+ #d() {
1725
+ if (this !== this.#e) throw Error("should only call on root");
1726
+ if (this.#s) return this;
1727
+ let e;
1728
+ for (this.toString(), this.#s = !0; e = this.#o.pop();) {
1729
+ if (e.type !== "!") continue;
1730
+ let t = e, n = t.#i;
1731
+ for (; n;) {
1732
+ for (let r = t.#a + 1; !n.type && r < n.#r.length; r++) for (let t of e.#r) {
1733
+ if (typeof t == "string") throw Error("string part in extglob AST??");
1734
+ t.copyIn(n.#r[r]);
1735
+ }
1736
+ t = n, n = t.#i;
1737
+ }
1738
+ }
1739
+ return this;
1740
+ }
1741
+ push() {
1742
+ var t = [...arguments];
1743
+ for (let n of t) if (n !== "") {
1744
+ if (typeof n != "string" && !(n instanceof e && n.#i === this)) throw Error("invalid part: " + n);
1745
+ this.#r.push(n);
1746
+ }
1747
+ }
1748
+ toJSON() {
1749
+ let e = this.type === null ? this.#r.slice().map(((e) => typeof e == "string" ? e : e.toJSON())) : [this.type, ...this.#r.map(((e) => e.toJSON()))];
1750
+ return this.isStart() && !this.type && e.unshift([]), this.isEnd() && (this === this.#e || this.#e.#s && this.#i?.type === "!") && e.push({}), e;
1751
+ }
1752
+ isStart() {
1753
+ if (this.#e === this) return !0;
1754
+ if (!this.#i?.isStart()) return !1;
1755
+ if (this.#a === 0) return !0;
1756
+ let t = this.#i;
1757
+ for (let n = 0; n < this.#a; n++) {
1758
+ let r = t.#r[n];
1759
+ if (!(r instanceof e && r.type === "!")) return !1;
1760
+ }
1761
+ return !0;
1762
+ }
1763
+ isEnd() {
1764
+ if (this.#e === this || this.#i?.type === "!") return !0;
1765
+ if (!this.#i?.isEnd()) return !1;
1766
+ if (!this.type) return this.#i?.isEnd();
1767
+ let e = this.#i ? this.#i.#r.length : 0;
1768
+ return this.#a === e - 1;
1769
+ }
1770
+ copyIn(e) {
1771
+ typeof e == "string" ? this.push(e) : this.push(e.clone(this));
1772
+ }
1773
+ clone(t) {
1774
+ let n = new e(this.type, t);
1775
+ for (let e of this.#r) n.copyIn(e);
1776
+ return n;
1777
+ }
1778
+ static #f(t, n, r, i) {
1779
+ let a = !1, o = !1, s = -1, c = !1;
1780
+ if (n.type === null) {
1781
+ let l = r, u = "";
1782
+ for (; l < t.length;) {
1783
+ let r = t.charAt(l++);
1784
+ if (a || r === "\\") a = !a, u += r;
1785
+ else if (o) l === s + 1 ? r !== "^" && r !== "!" || (c = !0) : r !== "]" || l === s + 2 && c || (o = !1), u += r;
1786
+ else if (r !== "[") if (i.noext || !St(r) || t.charAt(l) !== "(") u += r;
1787
+ else {
1788
+ n.push(u), u = "";
1789
+ let a = new e(r, n);
1790
+ l = e.#f(t, a, l, i), n.push(a);
1791
+ }
1792
+ else o = !0, s = l, c = !1, u += r;
1793
+ }
1794
+ return n.push(u), l;
1795
+ }
1796
+ let l = r + 1, u = new e(null, n), d = [], f = "";
1797
+ for (; l < t.length;) {
1798
+ let r = t.charAt(l++);
1799
+ if (a || r === "\\") a = !a, f += r;
1800
+ else if (o) l === s + 1 ? r !== "^" && r !== "!" || (c = !0) : r !== "]" || l === s + 2 && c || (o = !1), f += r;
1801
+ else if (r !== "[") if (St(r) && t.charAt(l) === "(") {
1802
+ u.push(f), f = "";
1803
+ let n = new e(r, u);
1804
+ u.push(n), l = e.#f(t, n, l, i);
1805
+ } else if (r !== "|") {
1806
+ if (r === ")") return f === "" && n.#r.length === 0 && (n.#u = !0), u.push(f), f = "", n.push(...d, u), l;
1807
+ f += r;
1808
+ } else u.push(f), f = "", d.push(u), u = new e(null, n);
1809
+ else o = !0, s = l, c = !1, f += r;
1810
+ }
1811
+ return n.type = null, n.#t = void 0, n.#r = [t.substring(r - 1)], l;
1812
+ }
1813
+ static fromGlob(t) {
1814
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = new e(null, void 0, n);
1815
+ return e.#f(t, r, 0, n), r;
1816
+ }
1817
+ toMMPattern() {
1818
+ if (this !== this.#e) return this.#e.toMMPattern();
1819
+ let e = this.toString(), [t, n, r, i] = this.toRegExpSource();
1820
+ if (!(r || this.#t || this.#c.nocase && !this.#c.nocaseMagicOnly && e.toUpperCase() !== e.toLowerCase())) return n;
1821
+ let a = (this.#c.nocase ? "i" : "") + (i ? "u" : "");
1822
+ return Object.assign(RegExp(`^${t}$`, a), {
1823
+ _src: t,
1824
+ _glob: e
1825
+ });
1826
+ }
1827
+ get options() {
1828
+ return this.#c;
1829
+ }
1830
+ toRegExpSource(t) {
1831
+ let n = t ?? !!this.#c.dot;
1832
+ if (this.#e === this && this.#d(), !this.type) {
1833
+ let r = this.isStart() && this.isEnd(), i = this.#r.map(((n) => {
1834
+ let [i, a, o, s] = typeof n == "string" ? e.#m(n, this.#t, r) : n.toRegExpSource(t);
1835
+ return this.#t = this.#t || o, this.#n = this.#n || s, i;
1836
+ })).join(""), a = "";
1837
+ if (this.isStart() && typeof this.#r[0] == "string" && (this.#r.length !== 1 || !Tt.has(this.#r[0]))) {
1838
+ let e = wt, r = n && e.has(i.charAt(0)) || i.startsWith("\\.") && e.has(i.charAt(2)) || i.startsWith("\\.\\.") && e.has(i.charAt(4)), o = !n && !t && e.has(i.charAt(0));
1839
+ a = r ? "(?!(?:^|/)\\.\\.?(?:$|/))" : o ? Ct : "";
1840
+ }
1841
+ let o = "";
1842
+ return this.isEnd() && this.#e.#s && this.#i?.type === "!" && (o = "(?:$|\\/)"), [
1843
+ a + i + o,
1844
+ bt(i),
1845
+ this.#t = !!this.#t,
1846
+ this.#n
1847
+ ];
1848
+ }
1849
+ let r = this.type === "*" || this.type === "+", i = this.type === "!" ? "(?:(?!(?:" : "(?:", a = this.#p(n);
1850
+ if (this.isStart() && this.isEnd() && !a && this.type !== "!") {
1851
+ let e = this.toString();
1852
+ return this.#r = [e], this.type = null, this.#t = void 0, [
1853
+ e,
1854
+ bt(this.toString()),
1855
+ !1,
1856
+ !1
1857
+ ];
1858
+ }
1859
+ let o = !r || t || n ? "" : this.#p(!0);
1860
+ o === a && (o = ""), o && (a = `(?:${a})(?:${o})*?`);
1861
+ let s = "";
1862
+ return s = this.type === "!" && this.#u ? (this.isStart() && !n ? Ct : "") + kt : i + a + (this.type === "!" ? "))" + (!this.isStart() || n || t ? "" : Ct) + Ot + ")" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && o ? ")" : this.type === "*" && o ? ")?" : `)${this.type}`), [
1863
+ s,
1864
+ bt(a),
1865
+ this.#t = !!this.#t,
1866
+ this.#n
1867
+ ];
1868
+ }
1869
+ #p(e) {
1870
+ return this.#r.map(((t) => {
1871
+ if (typeof t == "string") throw Error("string type in extglob ast??");
1872
+ let [n, r, i, a] = t.toRegExpSource(e);
1873
+ return this.#n = this.#n || a, n;
1874
+ })).filter(((e) => !(this.isStart() && this.isEnd() && !e))).join("|");
1875
+ }
1876
+ static #m(e, t) {
1877
+ let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = !1, i = "", a = !1;
1878
+ for (let o = 0; o < e.length; o++) {
1879
+ let s = e.charAt(o);
1880
+ if (r) r = !1, i += (Et.has(s) ? "\\" : "") + s;
1881
+ else if (s !== "\\") {
1882
+ if (s === "[") {
1883
+ let [n, r, s, c] = yt(e, o);
1884
+ if (s) {
1885
+ i += n, a ||= r, o += s - 1, t ||= c;
1886
+ continue;
1887
+ }
1888
+ }
1889
+ s === "*" ? (i += n && e === "*" ? kt : Ot, t = !0) : s === "?" ? (i += Dt, t = !0) : i += s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1890
+ } else o === e.length - 1 ? i += "\\\\" : r = !0;
1891
+ }
1892
+ return [
1893
+ i,
1894
+ bt(e),
1895
+ !!t,
1896
+ a
1897
+ ];
1898
+ }
1899
+ }, L = function(e, t) {
1900
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1901
+ return ht(t), !(!n.nocomment && t.charAt(0) === "#") && new en(t, n).match(e);
1902
+ }, jt = /^\*+([^+@!?\*\[\(]*)$/, Mt = (e) => (t) => !t.startsWith(".") && t.endsWith(e), Nt = (e) => (t) => t.endsWith(e), Pt = (e) => (e = e.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(e)), Ft = (e) => (e = e.toLowerCase(), (t) => t.toLowerCase().endsWith(e)), It = /^\*+\.\*+$/, Lt = (e) => !e.startsWith(".") && e.includes("."), Rt = (e) => e !== "." && e !== ".." && e.includes("."), zt = /^\.\*+$/, Bt = (e) => e !== "." && e !== ".." && e.startsWith("."), Vt = /^\*+$/, Ht = (e) => e.length !== 0 && !e.startsWith("."), Ut = (e) => e.length !== 0 && e !== "." && e !== "..", Wt = /^\?+([^+@!?\*\[\(]*)?$/, Gt = (e) => {
1903
+ let [t, n = ""] = e, r = Yt([t]);
1904
+ return n ? (n = n.toLowerCase(), (e) => r(e) && e.toLowerCase().endsWith(n)) : r;
1905
+ }, Kt = (e) => {
1906
+ let [t, n = ""] = e, r = Xt([t]);
1907
+ return n ? (n = n.toLowerCase(), (e) => r(e) && e.toLowerCase().endsWith(n)) : r;
1908
+ }, qt = (e) => {
1909
+ let [t, n = ""] = e, r = Xt([t]);
1910
+ return n ? (e) => r(e) && e.endsWith(n) : r;
1911
+ }, Jt = (e) => {
1912
+ let [t, n = ""] = e, r = Yt([t]);
1913
+ return n ? (e) => r(e) && e.endsWith(n) : r;
1914
+ }, Yt = (e) => {
1915
+ let [t] = e, n = t.length;
1916
+ return (e) => e.length === n && !e.startsWith(".");
1917
+ }, Xt = (e) => {
1918
+ let [t] = e, n = t.length;
1919
+ return (e) => e.length === n && e !== "." && e !== "..";
1920
+ }, Zt = typeof t == "object" && t ? typeof t.env == "object" && t.env && t.env.__MINIMATCH_TESTING_PLATFORM__ || t.platform : "posix";
1921
+ L.sep = Zt === "win32" ? "\\" : "/";
1922
+ var R = Symbol("globstar **");
1923
+ L.GLOBSTAR = R, L.filter = function(e) {
1924
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1925
+ return (n) => L(n, e, t);
1926
+ };
1927
+ var z = function(e) {
1928
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1929
+ return Object.assign({}, e, t);
1930
+ };
1931
+ L.defaults = (e) => {
1932
+ if (!e || typeof e != "object" || !Object.keys(e).length) return L;
1933
+ let t = L;
1934
+ return Object.assign((function(n, r) {
1935
+ return t(n, r, z(e, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}));
1936
+ }), {
1937
+ Minimatch: class extends t.Minimatch {
1938
+ constructor(t) {
1939
+ super(t, z(e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}));
1940
+ }
1941
+ static defaults(n) {
1942
+ return t.defaults(z(e, n)).Minimatch;
1943
+ }
1944
+ },
1945
+ AST: class extends t.AST {
1946
+ constructor(t, n) {
1947
+ super(t, n, z(e, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}));
1948
+ }
1949
+ static fromGlob(n) {
1950
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1951
+ return t.AST.fromGlob(n, z(e, r));
1952
+ }
1953
+ },
1954
+ unescape: function(n) {
1955
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1956
+ return t.unescape(n, z(e, r));
1957
+ },
1958
+ escape: function(n) {
1959
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1960
+ return t.escape(n, z(e, r));
1961
+ },
1962
+ filter: function(n) {
1963
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1964
+ return t.filter(n, z(e, r));
1965
+ },
1966
+ defaults: (n) => t.defaults(z(e, n)),
1967
+ makeRe: function(n) {
1968
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1969
+ return t.makeRe(n, z(e, r));
1970
+ },
1971
+ braceExpand: function(n) {
1972
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1973
+ return t.braceExpand(n, z(e, r));
1974
+ },
1975
+ match: function(n, r) {
1976
+ let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1977
+ return t.match(n, r, z(e, i));
1978
+ },
1979
+ sep: t.sep,
1980
+ GLOBSTAR: R
1981
+ });
1982
+ };
1983
+ var Qt = function(e) {
1984
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1985
+ return ht(e), t.nobrace || !/\{(?:(?!\{).)*\}/.test(e) ? [e] : mt(e);
1986
+ };
1987
+ L.braceExpand = Qt, L.makeRe = function(e) {
1988
+ return new en(e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).makeRe();
1989
+ }, L.match = function(e, t) {
1990
+ let n = new en(t, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {});
1991
+ return e = e.filter(((e) => n.match(e))), n.options.nonull && !e.length && e.push(t), e;
1992
+ };
1993
+ var $t = /[?*]|[+@!]\(.*?\)|\[|\]/, en = class {
1994
+ options;
1995
+ set;
1996
+ pattern;
1997
+ windowsPathsNoEscape;
1998
+ nonegate;
1999
+ negate;
2000
+ comment;
2001
+ empty;
2002
+ preserveMultipleSlashes;
2003
+ partial;
2004
+ globSet;
2005
+ globParts;
2006
+ nocase;
2007
+ isWindows;
2008
+ platform;
2009
+ windowsNoMagicRoot;
2010
+ regexp;
2011
+ constructor(e) {
2012
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2013
+ ht(e), t ||= {}, this.options = t, this.pattern = e, this.platform = t.platform || Zt, 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();
2014
+ }
2015
+ hasMagic() {
2016
+ if (this.options.magicalBraces && this.set.length > 1) return !0;
2017
+ for (let e of this.set) for (let t of e) if (typeof t != "string") return !0;
2018
+ return !1;
2019
+ }
2020
+ debug() {}
2021
+ make() {
2022
+ let e = this.pattern, t = this.options;
2023
+ if (!t.nocomment && e.charAt(0) === "#") return void (this.comment = !0);
2024
+ if (!e) return void (this.empty = !0);
2025
+ this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], t.debug && (this.debug = function() {
2026
+ return console.error(...arguments);
2027
+ }), this.debug(this.pattern, this.globSet);
2028
+ let n = this.globSet.map(((e) => this.slashSplit(e)));
2029
+ this.globParts = this.preprocess(n), this.debug(this.pattern, this.globParts);
2030
+ let r = this.globParts.map(((e, t, n) => {
2031
+ if (this.isWindows && this.windowsNoMagicRoot) {
2032
+ let t = !(e[0] !== "" || e[1] !== "" || e[2] !== "?" && $t.test(e[2]) || $t.test(e[3])), n = /^[a-z]:/i.test(e[0]);
2033
+ if (t) return [...e.slice(0, 4), ...e.slice(4).map(((e) => this.parse(e)))];
2034
+ if (n) return [e[0], ...e.slice(1).map(((e) => this.parse(e)))];
2035
+ }
2036
+ return e.map(((e) => this.parse(e)));
2037
+ }));
2038
+ if (this.debug(this.pattern, r), this.set = r.filter(((e) => e.indexOf(!1) === -1)), this.isWindows) for (let e = 0; e < this.set.length; e++) {
2039
+ let t = this.set[e];
2040
+ t[0] === "" && t[1] === "" && this.globParts[e][2] === "?" && typeof t[3] == "string" && /^[a-z]:$/i.test(t[3]) && (t[2] = "?");
2041
+ }
2042
+ this.debug(this.pattern, this.set);
2043
+ }
2044
+ preprocess(e) {
2045
+ if (this.options.noglobstar) for (let t = 0; t < e.length; t++) for (let n = 0; n < e[t].length; n++) e[t][n] === "**" && (e[t][n] = "*");
2046
+ let { optimizationLevel: t = 1 } = this.options;
2047
+ return t >= 2 ? (e = this.firstPhasePreProcess(e), e = this.secondPhasePreProcess(e)) : e = t >= 1 ? this.levelOneOptimize(e) : this.adjascentGlobstarOptimize(e), e;
2048
+ }
2049
+ adjascentGlobstarOptimize(e) {
2050
+ return e.map(((e) => {
2051
+ let t = -1;
2052
+ for (; (t = e.indexOf("**", t + 1)) !== -1;) {
2053
+ let n = t;
2054
+ for (; e[n + 1] === "**";) n++;
2055
+ n !== t && e.splice(t, n - t);
2056
+ }
2057
+ return e;
2058
+ }));
2059
+ }
2060
+ levelOneOptimize(e) {
2061
+ return e.map(((e) => (e = e.reduce(((e, t) => {
2062
+ let n = e[e.length - 1];
2063
+ return t === "**" && n === "**" ? e : t === ".." && n && n !== ".." && n !== "." && n !== "**" ? (e.pop(), e) : (e.push(t), e);
2064
+ }), [])).length === 0 ? [""] : e));
2065
+ }
2066
+ levelTwoFileOptimize(e) {
2067
+ Array.isArray(e) || (e = this.slashSplit(e));
2068
+ let t = !1;
2069
+ do {
2070
+ if (t = !1, !this.preserveMultipleSlashes) {
2071
+ for (let n = 1; n < e.length - 1; n++) {
2072
+ let r = e[n];
2073
+ n === 1 && r === "" && e[0] === "" || r !== "." && r !== "" || (t = !0, e.splice(n, 1), n--);
2074
+ }
2075
+ e[0] !== "." || e.length !== 2 || e[1] !== "." && e[1] !== "" || (t = !0, e.pop());
2076
+ }
2077
+ let n = 0;
2078
+ for (; (n = e.indexOf("..", n + 1)) !== -1;) {
2079
+ let r = e[n - 1];
2080
+ r && r !== "." && r !== ".." && r !== "**" && (t = !0, e.splice(n - 1, 2), n -= 2);
2081
+ }
2082
+ } while (t);
2083
+ return e.length === 0 ? [""] : e;
2084
+ }
2085
+ firstPhasePreProcess(e) {
2086
+ let t = !1;
2087
+ do {
2088
+ t = !1;
2089
+ for (let n of e) {
2090
+ let r = -1;
2091
+ for (; (r = n.indexOf("**", r + 1)) !== -1;) {
2092
+ let i = r;
2093
+ for (; n[i + 1] === "**";) i++;
2094
+ i > r && n.splice(r + 1, i - r);
2095
+ let a = n[r + 1], o = n[r + 2], s = n[r + 3];
2096
+ if (a !== ".." || !o || o === "." || o === ".." || !s || s === "." || s === "..") continue;
2097
+ t = !0, n.splice(r, 1);
2098
+ let c = n.slice(0);
2099
+ c[r] = "**", e.push(c), r--;
2100
+ }
2101
+ if (!this.preserveMultipleSlashes) {
2102
+ for (let e = 1; e < n.length - 1; e++) {
2103
+ let r = n[e];
2104
+ e === 1 && r === "" && n[0] === "" || r !== "." && r !== "" || (t = !0, n.splice(e, 1), e--);
2105
+ }
2106
+ n[0] !== "." || n.length !== 2 || n[1] !== "." && n[1] !== "" || (t = !0, n.pop());
2107
+ }
2108
+ let i = 0;
2109
+ for (; (i = n.indexOf("..", i + 1)) !== -1;) {
2110
+ let e = n[i - 1];
2111
+ if (e && e !== "." && e !== ".." && e !== "**") {
2112
+ t = !0;
2113
+ let e = i === 1 && n[i + 1] === "**" ? ["."] : [];
2114
+ n.splice(i - 1, 2, ...e), n.length === 0 && n.push(""), i -= 2;
2115
+ }
2116
+ }
2117
+ }
2118
+ } while (t);
2119
+ return e;
2120
+ }
2121
+ secondPhasePreProcess(e) {
2122
+ for (let t = 0; t < e.length - 1; t++) for (let n = t + 1; n < e.length; n++) {
2123
+ let r = this.partsMatch(e[t], e[n], !this.preserveMultipleSlashes);
2124
+ if (r) {
2125
+ e[t] = [], e[n] = r;
2126
+ break;
2127
+ }
2128
+ }
2129
+ return e.filter(((e) => e.length));
2130
+ }
2131
+ partsMatch(e, t) {
2132
+ let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = 0, i = 0, a = [], o = "";
2133
+ for (; r < e.length && i < t.length;) if (e[r] === t[i]) a.push(o === "b" ? t[i] : e[r]), r++, i++;
2134
+ else if (n && e[r] === "**" && t[i] === e[r + 1]) a.push(e[r]), r++;
2135
+ else if (n && t[i] === "**" && e[r] === t[i + 1]) a.push(t[i]), i++;
2136
+ else if (e[r] !== "*" || !t[i] || !this.options.dot && t[i].startsWith(".") || t[i] === "**") {
2137
+ if (t[i] !== "*" || !e[r] || !this.options.dot && e[r].startsWith(".") || e[r] === "**" || o === "a") return !1;
2138
+ o = "b", a.push(t[i]), r++, i++;
2139
+ } else {
2140
+ if (o === "b") return !1;
2141
+ o = "a", a.push(e[r]), r++, i++;
2142
+ }
2143
+ return e.length === t.length && a;
2144
+ }
2145
+ parseNegate() {
2146
+ if (this.nonegate) return;
2147
+ let e = this.pattern, t = !1, n = 0;
2148
+ for (let r = 0; r < e.length && e.charAt(r) === "!"; r++) t = !t, n++;
2149
+ n && (this.pattern = e.slice(n)), this.negate = t;
2150
+ }
2151
+ matchOne(e, t) {
2152
+ let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = this.options;
2153
+ if (this.isWindows) {
2154
+ let n = typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]), r = !n && e[0] === "" && e[1] === "" && e[2] === "?" && /^[a-z]:$/i.test(e[3]), i = typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]), a = r ? 3 : n ? 0 : void 0, o = !i && t[0] === "" && t[1] === "" && t[2] === "?" && typeof t[3] == "string" && /^[a-z]:$/i.test(t[3]) ? 3 : i ? 0 : void 0;
2155
+ if (typeof a == "number" && typeof o == "number") {
2156
+ let [n, r] = [e[a], t[o]];
2157
+ n.toLowerCase() === r.toLowerCase() && (t[o] = n, o > a ? t = t.slice(o) : a > o && (e = e.slice(a)));
2158
+ }
2159
+ }
2160
+ let { optimizationLevel: i = 1 } = this.options;
2161
+ i >= 2 && (e = this.levelTwoFileOptimize(e)), this.debug("matchOne", this, {
2162
+ file: e,
2163
+ pattern: t
2164
+ }), this.debug("matchOne", e.length, t.length);
2165
+ for (var a = 0, o = 0, s = e.length, c = t.length; a < s && o < c; a++, o++) {
2166
+ this.debug("matchOne loop");
2167
+ var l = t[o], u = e[a];
2168
+ if (this.debug(t, l, u), !1 === l) return !1;
2169
+ if (l === R) {
2170
+ this.debug("GLOBSTAR", [
2171
+ t,
2172
+ l,
2173
+ u
2174
+ ]);
2175
+ var d = a, f = o + 1;
2176
+ if (f === c) {
2177
+ for (this.debug("** at the end"); a < s; a++) if (e[a] === "." || e[a] === ".." || !r.dot && e[a].charAt(0) === ".") return !1;
2178
+ return !0;
2179
+ }
2180
+ for (; d < s;) {
2181
+ var p = e[d];
2182
+ if (this.debug("\nglobstar while", e, d, t, f, p), this.matchOne(e.slice(d), t.slice(f), n)) return this.debug("globstar found match!", d, s, p), !0;
2183
+ if (p === "." || p === ".." || !r.dot && p.charAt(0) === ".") {
2184
+ this.debug("dot detected!", e, d, t, f);
2185
+ break;
2186
+ }
2187
+ this.debug("globstar swallow a segment, and continue"), d++;
2188
+ }
2189
+ return !(!n || (this.debug("\n>>> no match, partial?", e, d, t, f), d !== s));
2190
+ }
2191
+ let i;
2192
+ if (typeof l == "string" ? (i = u === l, this.debug("string match", l, u, i)) : (i = l.test(u), this.debug("pattern match", l, u, i)), !i) return !1;
2193
+ }
2194
+ if (a === s && o === c) return !0;
2195
+ if (a === s) return n;
2196
+ if (o === c) return a === s - 1 && e[a] === "";
2197
+ throw Error("wtf?");
2198
+ }
2199
+ braceExpand() {
2200
+ return Qt(this.pattern, this.options);
2201
+ }
2202
+ parse(e) {
2203
+ ht(e);
2204
+ let t = this.options;
2205
+ if (e === "**") return R;
2206
+ if (e === "") return "";
2207
+ let n, r = null;
2208
+ (n = e.match(Vt)) ? r = t.dot ? Ut : Ht : (n = e.match(jt)) ? r = (t.nocase ? t.dot ? Ft : Pt : t.dot ? Nt : Mt)(n[1]) : (n = e.match(Wt)) ? r = (t.nocase ? t.dot ? Kt : Gt : t.dot ? qt : Jt)(n) : (n = e.match(It)) ? r = t.dot ? Rt : Lt : (n = e.match(zt)) && (r = Bt);
2209
+ let i = At.fromGlob(e, this.options).toMMPattern();
2210
+ return r && typeof i == "object" && Reflect.defineProperty(i, "test", { value: r }), i;
2211
+ }
2212
+ makeRe() {
2213
+ if (this.regexp || !1 === this.regexp) return this.regexp;
2214
+ let e = this.set;
2215
+ if (!e.length) return this.regexp = !1, this.regexp;
2216
+ let t = this.options, n = t.noglobstar ? "[^/]*?" : t.dot ? "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?" : "(?:(?!(?:\\/|^)\\.).)*?", r = new Set(t.nocase ? ["i"] : []), i = e.map(((e) => {
2217
+ let t = e.map(((e) => {
2218
+ if (e instanceof RegExp) for (let t of e.flags.split("")) r.add(t);
2219
+ return typeof e == "string" ? e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") : e === R ? R : e._src;
2220
+ }));
2221
+ return t.forEach(((e, r) => {
2222
+ let i = t[r + 1], a = t[r - 1];
2223
+ e === R && a !== R && (a === void 0 ? i !== void 0 && i !== R ? t[r + 1] = "(?:\\/|" + n + "\\/)?" + i : t[r] = n : i === void 0 ? t[r - 1] = a + "(?:\\/|" + n + ")?" : i !== R && (t[r - 1] = a + "(?:\\/|\\/" + n + "\\/)" + i, t[r + 1] = R));
2224
+ })), t.filter(((e) => e !== R)).join("/");
2225
+ })).join("|"), [a, o] = e.length > 1 ? ["(?:", ")"] : ["", ""];
2226
+ i = "^" + a + i + o + "$", this.negate && (i = "^(?!" + i + ").+$");
2227
+ try {
2228
+ this.regexp = new RegExp(i, [...r].join(""));
2229
+ } catch {
2230
+ this.regexp = !1;
2231
+ }
2232
+ return this.regexp;
2233
+ }
2234
+ slashSplit(e) {
2235
+ return this.preserveMultipleSlashes ? e.split("/") : this.isWindows && /^\/\/[^\/]+/.test(e) ? ["", ...e.split(/\/+/)] : e.split(/\/+/);
2236
+ }
2237
+ match(e) {
2238
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.partial;
2239
+ if (this.debug("match", e, this.pattern), this.comment) return !1;
2240
+ if (this.empty) return e === "";
2241
+ if (e === "/" && t) return !0;
2242
+ let n = this.options;
2243
+ this.isWindows && (e = e.split("\\").join("/"));
2244
+ let r = this.slashSplit(e);
2245
+ this.debug(this.pattern, "split", r);
2246
+ let i = this.set;
2247
+ this.debug(this.pattern, "set", i);
2248
+ let a = r[r.length - 1];
2249
+ if (!a) for (let e = r.length - 2; !a && e >= 0; e--) a = r[e];
2250
+ for (let e = 0; e < i.length; e++) {
2251
+ let o = i[e], s = r;
2252
+ if (n.matchBase && o.length === 1 && (s = [a]), this.matchOne(s, o, t)) return !!n.flipNegate || !this.negate;
2253
+ }
2254
+ return !n.flipNegate && this.negate;
2255
+ }
2256
+ static defaults(e) {
2257
+ return L.defaults(e).Minimatch;
2258
+ }
2259
+ };
2260
+ function tn(e) {
2261
+ let t = /* @__PURE__ */ Error(`${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""}Invalid response: ${e.status} ${e.statusText}`);
2262
+ return t.status = e.status, t.response = e, t;
2263
+ }
2264
+ function B(e, t) {
2265
+ let { status: n } = t;
2266
+ if (n === 401 && e.digest) return t;
2267
+ if (n >= 400) throw tn(t);
2268
+ return t;
2269
+ }
2270
+ function V(e, t) {
2271
+ return arguments.length > 2 && arguments[2] !== void 0 && arguments[2] ? {
2272
+ data: t,
2273
+ headers: e.headers ? rt(e.headers) : {},
2274
+ status: e.status,
2275
+ statusText: e.statusText
2276
+ } : t;
2277
+ }
2278
+ L.AST = At, L.Minimatch = en, L.escape = function(e) {
2279
+ let { windowsPathsNoEscape: t = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2280
+ return t ? e.replace(/[?*()[\]]/g, "[$&]") : e.replace(/[?*()[\]\\]/g, "\\$&");
2281
+ }, L.unescape = bt;
2282
+ var nn = (rn = function(e, t, n) {
2283
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = I({
2284
+ url: M(e.remoteURL, j(t)),
2285
+ method: "COPY",
2286
+ headers: {
2287
+ Destination: M(e.remoteURL, j(n)),
2288
+ Overwrite: !1 === r.overwrite ? "F" : "T",
2289
+ Depth: r.shallow ? "0" : "infinity"
2290
+ }
2291
+ }, e, r);
2292
+ return o = function(t) {
2293
+ B(e, t);
2294
+ }, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
2295
+ var a, o;
2296
+ }, function() {
2297
+ var e = [...arguments];
2298
+ try {
2299
+ return Promise.resolve(rn.apply(this, e));
2300
+ } catch (e) {
2301
+ return Promise.reject(e);
2302
+ }
2303
+ }), rn, an = {
2304
+ preserveOrder: !1,
2305
+ attributeNamePrefix: "@_",
2306
+ attributesGroupName: !1,
2307
+ textNodeName: "#text",
2308
+ ignoreAttributes: !0,
2309
+ removeNSPrefix: !1,
2310
+ allowBooleanAttributes: !1,
2311
+ parseTagValue: !0,
2312
+ parseAttributeValue: !1,
2313
+ trimValues: !0,
2314
+ cdataPropName: !1,
2315
+ numberParseOptions: {
2316
+ hex: !0,
2317
+ leadingZeros: !0,
2318
+ eNotation: !0
2319
+ },
2320
+ tagValueProcessor: function(e, t) {
2321
+ return t;
2322
+ },
2323
+ attributeValueProcessor: function(e, t) {
2324
+ return t;
2325
+ },
2326
+ stopNodes: [],
2327
+ alwaysCreateTextNode: !1,
2328
+ isArray: () => !1,
2329
+ commentPropName: !1,
2330
+ unpairedTags: [],
2331
+ processEntities: !0,
2332
+ htmlEntities: !1,
2333
+ ignoreDeclaration: !1,
2334
+ ignorePiTags: !1,
2335
+ transformTagName: !1,
2336
+ transformAttributeName: !1,
2337
+ updateTag: function(e, t, n) {
2338
+ return e;
2339
+ },
2340
+ captureMetaData: !1
2341
+ }, on = /* @__PURE__ */ RegExp("^[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
2342
+ function sn(e, t) {
2343
+ let n = [], r = t.exec(e);
2344
+ for (; r;) {
2345
+ let i = [];
2346
+ i.startIndex = t.lastIndex - r[0].length;
2347
+ let a = r.length;
2348
+ for (let e = 0; e < a; e++) i.push(r[e]);
2349
+ n.push(i), r = t.exec(e);
2350
+ }
2351
+ return n;
2352
+ }
2353
+ var cn = function(e) {
2354
+ return on.exec(e) != null;
2355
+ }, ln = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", H = class {
2356
+ constructor(e) {
2357
+ this.tagname = e, this.child = [], this[":@"] = {};
2358
+ }
2359
+ add(e, t) {
2360
+ e === "__proto__" && (e = "#__proto__"), this.child.push({ [e]: t });
2361
+ }
2362
+ addChild(e, t) {
2363
+ e.tagname === "__proto__" && (e.tagname = "#__proto__"), e[":@"] && Object.keys(e[":@"]).length > 0 ? this.child.push({
2364
+ [e.tagname]: e.child,
2365
+ ":@": e[":@"]
2366
+ }) : this.child.push({ [e.tagname]: e.child }), t !== void 0 && (this.child[this.child.length - 1][ln] = { startIndex: t });
2367
+ }
2368
+ static getMetaDataSymbol() {
2369
+ return ln;
2370
+ }
2371
+ }, un = class {
2372
+ constructor(e) {
2373
+ this.suppressValidationErr = !e;
2374
+ }
2375
+ readDocType(e, t) {
2376
+ let n = {};
2377
+ if (e[t + 3] !== "O" || e[t + 4] !== "C" || e[t + 5] !== "T" || e[t + 6] !== "Y" || e[t + 7] !== "P" || e[t + 8] !== "E") throw Error("Invalid Tag instead of DOCTYPE");
2378
+ {
2379
+ t += 9;
2380
+ let r = 1, i = !1, a = !1, o = "";
2381
+ for (; t < e.length; t++) if (e[t] !== "<" || a) if (e[t] === ">") {
2382
+ if (a ? e[t - 1] === "-" && e[t - 2] === "-" && (a = !1, r--) : r--, r === 0) break;
2383
+ } else e[t] === "[" ? i = !0 : o += e[t];
2384
+ else {
2385
+ if (i && W(e, "!ENTITY", t)) {
2386
+ let r, i;
2387
+ t += 7, [r, i, t] = this.readEntityExp(e, t + 1, this.suppressValidationErr), i.indexOf("&") === -1 && (n[r] = {
2388
+ regx: RegExp(`&${r};`, "g"),
2389
+ val: i
2390
+ });
2391
+ } else if (i && W(e, "!ELEMENT", t)) {
2392
+ t += 8;
2393
+ let { index: n } = this.readElementExp(e, t + 1);
2394
+ t = n;
2395
+ } else if (i && W(e, "!ATTLIST", t)) t += 8;
2396
+ else if (i && W(e, "!NOTATION", t)) {
2397
+ t += 9;
2398
+ let { index: n } = this.readNotationExp(e, t + 1, this.suppressValidationErr);
2399
+ t = n;
2400
+ } else {
2401
+ if (!W(e, "!--", t)) throw Error("Invalid DOCTYPE");
2402
+ a = !0;
2403
+ }
2404
+ r++, o = "";
2405
+ }
2406
+ if (r !== 0) throw Error("Unclosed DOCTYPE");
2407
+ }
2408
+ return {
2409
+ entities: n,
2410
+ i: t
2411
+ };
2412
+ }
2413
+ readEntityExp(e, t) {
2414
+ t = U(e, t);
2415
+ let n = "";
2416
+ for (; t < e.length && !/\s/.test(e[t]) && e[t] !== "\"" && e[t] !== "'";) n += e[t], t++;
2417
+ if (dn(n), t = U(e, t), !this.suppressValidationErr) {
2418
+ if (e.substring(t, t + 6).toUpperCase() === "SYSTEM") throw Error("External entities are not supported");
2419
+ if (e[t] === "%") throw Error("Parameter entities are not supported");
2420
+ }
2421
+ let r = "";
2422
+ return [t, r] = this.readIdentifierVal(e, t, "entity"), [
2423
+ n,
2424
+ r,
2425
+ --t
2426
+ ];
2427
+ }
2428
+ readNotationExp(e, t) {
2429
+ t = U(e, t);
2430
+ let n = "";
2431
+ for (; t < e.length && !/\s/.test(e[t]);) n += e[t], t++;
2432
+ !this.suppressValidationErr && dn(n), t = U(e, t);
2433
+ let r = e.substring(t, t + 6).toUpperCase();
2434
+ if (!this.suppressValidationErr && r !== "SYSTEM" && r !== "PUBLIC") throw Error(`Expected SYSTEM or PUBLIC, found "${r}"`);
2435
+ t += r.length, t = U(e, t);
2436
+ let i = null, a = null;
2437
+ if (r === "PUBLIC") [t, i] = this.readIdentifierVal(e, t, "publicIdentifier"), e[t = U(e, t)] !== "\"" && e[t] !== "'" || ([t, a] = this.readIdentifierVal(e, t, "systemIdentifier"));
2438
+ else if (r === "SYSTEM" && ([t, a] = this.readIdentifierVal(e, t, "systemIdentifier"), !this.suppressValidationErr && !a)) throw Error("Missing mandatory system identifier for SYSTEM notation");
2439
+ return {
2440
+ notationName: n,
2441
+ publicIdentifier: i,
2442
+ systemIdentifier: a,
2443
+ index: --t
2444
+ };
2445
+ }
2446
+ readIdentifierVal(e, t, n) {
2447
+ let r = "", i = e[t];
2448
+ if (i !== "\"" && i !== "'") throw Error(`Expected quoted string, found "${i}"`);
2449
+ for (t++; t < e.length && e[t] !== i;) r += e[t], t++;
2450
+ if (e[t] !== i) throw Error(`Unterminated ${n} value`);
2451
+ return [++t, r];
2452
+ }
2453
+ readElementExp(e, t) {
2454
+ t = U(e, t);
2455
+ let n = "";
2456
+ for (; t < e.length && !/\s/.test(e[t]);) n += e[t], t++;
2457
+ if (!this.suppressValidationErr && !cn(n)) throw Error(`Invalid element name: "${n}"`);
2458
+ let r = "";
2459
+ if (e[t = U(e, t)] === "E" && W(e, "MPTY", t)) t += 4;
2460
+ else if (e[t] === "A" && W(e, "NY", t)) t += 2;
2461
+ else if (e[t] === "(") {
2462
+ for (t++; t < e.length && e[t] !== ")";) r += e[t], t++;
2463
+ if (e[t] !== ")") throw Error("Unterminated content model");
2464
+ } else if (!this.suppressValidationErr) throw Error(`Invalid Element Expression, found "${e[t]}"`);
2465
+ return {
2466
+ elementName: n,
2467
+ contentModel: r.trim(),
2468
+ index: t
2469
+ };
2470
+ }
2471
+ readAttlistExp(e, t) {
2472
+ t = U(e, t);
2473
+ let n = "";
2474
+ for (; t < e.length && !/\s/.test(e[t]);) n += e[t], t++;
2475
+ dn(n), t = U(e, t);
2476
+ let r = "";
2477
+ for (; t < e.length && !/\s/.test(e[t]);) r += e[t], t++;
2478
+ if (!dn(r)) throw Error(`Invalid attribute name: "${r}"`);
2479
+ t = U(e, t);
2480
+ let i = "";
2481
+ if (e.substring(t, t + 8).toUpperCase() === "NOTATION") {
2482
+ if (i = "NOTATION", e[t = U(e, t += 8)] !== "(") throw Error(`Expected '(', found "${e[t]}"`);
2483
+ t++;
2484
+ let n = [];
2485
+ for (; t < e.length && e[t] !== ")";) {
2486
+ let r = "";
2487
+ for (; t < e.length && e[t] !== "|" && e[t] !== ")";) r += e[t], t++;
2488
+ if (r = r.trim(), !dn(r)) throw Error(`Invalid notation name: "${r}"`);
2489
+ n.push(r), e[t] === "|" && (t++, t = U(e, t));
2490
+ }
2491
+ if (e[t] !== ")") throw Error("Unterminated list of notations");
2492
+ t++, i += " (" + n.join("|") + ")";
2493
+ } else {
2494
+ for (; t < e.length && !/\s/.test(e[t]);) i += e[t], t++;
2495
+ if (!this.suppressValidationErr && ![
2496
+ "CDATA",
2497
+ "ID",
2498
+ "IDREF",
2499
+ "IDREFS",
2500
+ "ENTITY",
2501
+ "ENTITIES",
2502
+ "NMTOKEN",
2503
+ "NMTOKENS"
2504
+ ].includes(i.toUpperCase())) throw Error(`Invalid attribute type: "${i}"`);
2505
+ }
2506
+ t = U(e, t);
2507
+ let a = "";
2508
+ return e.substring(t, t + 8).toUpperCase() === "#REQUIRED" ? (a = "#REQUIRED", t += 8) : e.substring(t, t + 7).toUpperCase() === "#IMPLIED" ? (a = "#IMPLIED", t += 7) : [t, a] = this.readIdentifierVal(e, t, "ATTLIST"), {
2509
+ elementName: n,
2510
+ attributeName: r,
2511
+ attributeType: i,
2512
+ defaultValue: a,
2513
+ index: t
2514
+ };
2515
+ }
2516
+ }, U = (e, t) => {
2517
+ for (; t < e.length && /\s/.test(e[t]);) t++;
2518
+ return t;
2519
+ };
2520
+ function W(e, t, n) {
2521
+ for (let r = 0; r < t.length; r++) if (t[r] !== e[n + r + 1]) return !1;
2522
+ return !0;
2523
+ }
2524
+ function dn(e) {
2525
+ if (cn(e)) return e;
2526
+ throw Error(`Invalid entity name ${e}`);
2527
+ }
2528
+ var fn = /^[-+]?0x[a-fA-F0-9]+$/, pn = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, mn = {
2529
+ hex: !0,
2530
+ leadingZeros: !0,
2531
+ decimalPoint: ".",
2532
+ eNotation: !0
2533
+ }, hn = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
2534
+ function gn(e) {
2535
+ return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
2536
+ for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
2537
+ } : () => !1;
2538
+ }
2539
+ var _n = class {
2540
+ constructor(e) {
2541
+ if (this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {
2542
+ apos: {
2543
+ regex: /&(apos|#39|#x27);/g,
2544
+ val: "'"
2545
+ },
2546
+ gt: {
2547
+ regex: /&(gt|#62|#x3E);/g,
2548
+ val: ">"
2549
+ },
2550
+ lt: {
2551
+ regex: /&(lt|#60|#x3C);/g,
2552
+ val: "<"
2553
+ },
2554
+ quot: {
2555
+ regex: /&(quot|#34|#x22);/g,
2556
+ val: "\""
2557
+ }
2558
+ }, this.ampEntity = {
2559
+ regex: /&(amp|#38|#x26);/g,
2560
+ val: "&"
2561
+ }, this.htmlEntities = {
2562
+ space: {
2563
+ regex: /&(nbsp|#160);/g,
2564
+ val: " "
2565
+ },
2566
+ cent: {
2567
+ regex: /&(cent|#162);/g,
2568
+ val: "¢"
2569
+ },
2570
+ pound: {
2571
+ regex: /&(pound|#163);/g,
2572
+ val: "£"
2573
+ },
2574
+ yen: {
2575
+ regex: /&(yen|#165);/g,
2576
+ val: "¥"
2577
+ },
2578
+ euro: {
2579
+ regex: /&(euro|#8364);/g,
2580
+ val: "€"
2581
+ },
2582
+ copyright: {
2583
+ regex: /&(copy|#169);/g,
2584
+ val: "©"
2585
+ },
2586
+ reg: {
2587
+ regex: /&(reg|#174);/g,
2588
+ val: "®"
2589
+ },
2590
+ inr: {
2591
+ regex: /&(inr|#8377);/g,
2592
+ val: "₹"
2593
+ },
2594
+ num_dec: {
2595
+ regex: /&#([0-9]{1,7});/g,
2596
+ val: (e, t) => jn(t, 10, "&#")
2597
+ },
2598
+ num_hex: {
2599
+ regex: /&#x([0-9a-fA-F]{1,6});/g,
2600
+ val: (e, t) => jn(t, 16, "&#x")
2601
+ }
2602
+ }, this.addExternalEntities = vn, this.parseXml = Cn, this.parseTextData = yn, this.resolveNameSpace = bn, this.buildAttributesMap = Sn, this.isItStopNode = Dn, this.replaceEntitiesValue = Tn, this.readStopNodeData = kn, this.saveTextToParentTag = En, this.addChild = wn, this.ignoreAttributesFn = gn(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) {
2603
+ this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set();
2604
+ for (let e = 0; e < this.options.stopNodes.length; e++) {
2605
+ let t = this.options.stopNodes[e];
2606
+ typeof t == "string" && (t.startsWith("*.") ? this.stopNodesWildcard.add(t.substring(2)) : this.stopNodesExact.add(t));
2607
+ }
2608
+ }
2609
+ }
2610
+ };
2611
+ function vn(e) {
2612
+ let t = Object.keys(e);
2613
+ for (let n = 0; n < t.length; n++) {
2614
+ let r = t[n];
2615
+ this.lastEntities[r] = {
2616
+ regex: RegExp("&" + r + ";", "g"),
2617
+ val: e[r]
2618
+ };
2619
+ }
2620
+ }
2621
+ function yn(e, t, n, r, i, a, o) {
2622
+ if (e !== void 0 && (this.options.trimValues && !r && (e = e.trim()), e.length > 0)) {
2623
+ o || (e = this.replaceEntitiesValue(e));
2624
+ let r = this.options.tagValueProcessor(t, e, n, i, a);
2625
+ return r == null ? e : typeof r != typeof e || r !== e ? r : this.options.trimValues || e.trim() === e ? An(e, this.options.parseTagValue, this.options.numberParseOptions) : e;
2626
+ }
2627
+ }
2628
+ function bn(e) {
2629
+ if (this.options.removeNSPrefix) {
2630
+ let t = e.split(":"), n = e.charAt(0) === "/" ? "/" : "";
2631
+ if (t[0] === "xmlns") return "";
2632
+ t.length === 2 && (e = n + t[1]);
2633
+ }
2634
+ return e;
2635
+ }
2636
+ var xn = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
2637
+ function Sn(e, t) {
2638
+ if (!0 !== this.options.ignoreAttributes && typeof e == "string") {
2639
+ let n = sn(e, xn), r = n.length, i = {};
2640
+ for (let e = 0; e < r; e++) {
2641
+ let r = this.resolveNameSpace(n[e][1]);
2642
+ if (this.ignoreAttributesFn(r, t)) continue;
2643
+ let a = n[e][4], o = this.options.attributeNamePrefix + r;
2644
+ if (r.length) if (this.options.transformAttributeName && (o = this.options.transformAttributeName(o)), o === "__proto__" && (o = "#__proto__"), a !== void 0) {
2645
+ this.options.trimValues && (a = a.trim()), a = this.replaceEntitiesValue(a);
2646
+ let e = this.options.attributeValueProcessor(r, a, t);
2647
+ i[o] = e == null ? a : typeof e != typeof a || e !== a ? e : An(a, this.options.parseAttributeValue, this.options.numberParseOptions);
2648
+ } else this.options.allowBooleanAttributes && (i[o] = !0);
2649
+ }
2650
+ if (!Object.keys(i).length) return;
2651
+ if (this.options.attributesGroupName) {
2652
+ let e = {};
2653
+ return e[this.options.attributesGroupName] = i, e;
2654
+ }
2655
+ return i;
2656
+ }
2657
+ }
2658
+ var Cn = function(e) {
2659
+ e = e.replace(/\r\n?/g, "\n");
2660
+ let t = new H("!xml"), n = t, r = "", i = "", a = new un(this.options.processEntities);
2661
+ for (let o = 0; o < e.length; o++) if (e[o] === "<") if (e[o + 1] === "/") {
2662
+ let t = G(e, ">", o, "Closing Tag is not closed."), a = e.substring(o + 2, t).trim();
2663
+ if (this.options.removeNSPrefix) {
2664
+ let e = a.indexOf(":");
2665
+ e !== -1 && (a = a.substr(e + 1));
2666
+ }
2667
+ this.options.transformTagName && (a = this.options.transformTagName(a)), n && (r = this.saveTextToParentTag(r, n, i));
2668
+ let s = i.substring(i.lastIndexOf(".") + 1);
2669
+ if (a && this.options.unpairedTags.indexOf(a) !== -1) throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);
2670
+ let c = 0;
2671
+ s && this.options.unpairedTags.indexOf(s) !== -1 ? (c = i.lastIndexOf(".", i.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : c = i.lastIndexOf("."), i = i.substring(0, c), n = this.tagsNodeStack.pop(), r = "", o = t;
2672
+ } else if (e[o + 1] === "?") {
2673
+ let t = On(e, o, !1, "?>");
2674
+ if (!t) throw Error("Pi Tag is not closed.");
2675
+ if (r = this.saveTextToParentTag(r, n, i), !(this.options.ignoreDeclaration && t.tagName === "?xml" || this.options.ignorePiTags)) {
2676
+ let e = new H(t.tagName);
2677
+ e.add(this.options.textNodeName, ""), t.tagName !== t.tagExp && t.attrExpPresent && (e[":@"] = this.buildAttributesMap(t.tagExp, i)), this.addChild(n, e, i, o);
2678
+ }
2679
+ o = t.closeIndex + 1;
2680
+ } else if (e.substr(o + 1, 3) === "!--") {
2681
+ let t = G(e, "-->", o + 4, "Comment is not closed.");
2682
+ if (this.options.commentPropName) {
2683
+ let a = e.substring(o + 4, t - 2);
2684
+ r = this.saveTextToParentTag(r, n, i), n.add(this.options.commentPropName, [{ [this.options.textNodeName]: a }]);
2685
+ }
2686
+ o = t;
2687
+ } else if (e.substr(o + 1, 2) === "!D") {
2688
+ let t = a.readDocType(e, o);
2689
+ this.docTypeEntities = t.entities, o = t.i;
2690
+ } else if (e.substr(o + 1, 2) === "![") {
2691
+ let t = G(e, "]]>", o, "CDATA is not closed.") - 2, a = e.substring(o + 9, t);
2692
+ r = this.saveTextToParentTag(r, n, i);
2693
+ let s = this.parseTextData(a, n.tagname, i, !0, !1, !0, !0);
2694
+ s ??= "", this.options.cdataPropName ? n.add(this.options.cdataPropName, [{ [this.options.textNodeName]: a }]) : n.add(this.options.textNodeName, s), o = t + 2;
2695
+ } else {
2696
+ let a = On(e, o, this.options.removeNSPrefix), s = a.tagName, c = a.rawTagName, l = a.tagExp, u = a.attrExpPresent, d = a.closeIndex;
2697
+ if (this.options.transformTagName) {
2698
+ let e = this.options.transformTagName(s);
2699
+ l === s && (l = e), s = e;
2700
+ }
2701
+ n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, i, !1));
2702
+ let f = n;
2703
+ f && this.options.unpairedTags.indexOf(f.tagname) !== -1 && (n = this.tagsNodeStack.pop(), i = i.substring(0, i.lastIndexOf("."))), s !== t.tagname && (i += i ? "." + s : s);
2704
+ let p = o;
2705
+ if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, i, s)) {
2706
+ let t = "";
2707
+ if (l.length > 0 && l.lastIndexOf("/") === l.length - 1) s[s.length - 1] === "/" ? (s = s.substr(0, s.length - 1), i = i.substr(0, i.length - 1), l = s) : l = l.substr(0, l.length - 1), o = a.closeIndex;
2708
+ else if (this.options.unpairedTags.indexOf(s) !== -1) o = a.closeIndex;
2709
+ else {
2710
+ let n = this.readStopNodeData(e, c, d + 1);
2711
+ if (!n) throw Error(`Unexpected end of ${c}`);
2712
+ o = n.i, t = n.tagContent;
2713
+ }
2714
+ let r = new H(s);
2715
+ s !== l && u && (r[":@"] = this.buildAttributesMap(l, i)), t &&= this.parseTextData(t, s, i, !0, u, !0, !0), i = i.substr(0, i.lastIndexOf(".")), r.add(this.options.textNodeName, t), this.addChild(n, r, i, p);
2716
+ } else {
2717
+ if (l.length > 0 && l.lastIndexOf("/") === l.length - 1) {
2718
+ if (s[s.length - 1] === "/" ? (s = s.substr(0, s.length - 1), i = i.substr(0, i.length - 1), l = s) : l = l.substr(0, l.length - 1), this.options.transformTagName) {
2719
+ let e = this.options.transformTagName(s);
2720
+ l === s && (l = e), s = e;
2721
+ }
2722
+ let e = new H(s);
2723
+ s !== l && u && (e[":@"] = this.buildAttributesMap(l, i)), this.addChild(n, e, i, p), i = i.substr(0, i.lastIndexOf("."));
2724
+ } else {
2725
+ let e = new H(s);
2726
+ this.tagsNodeStack.push(n), s !== l && u && (e[":@"] = this.buildAttributesMap(l, i)), this.addChild(n, e, i, p), n = e;
2727
+ }
2728
+ r = "", o = d;
2729
+ }
2730
+ }
2731
+ else r += e[o];
2732
+ return t.child;
2733
+ };
2734
+ function wn(e, t, n, r) {
2735
+ this.options.captureMetaData || (r = void 0);
2736
+ let i = this.options.updateTag(t.tagname, n, t[":@"]);
2737
+ !1 === i || (typeof i == "string" && (t.tagname = i), e.addChild(t, r));
2738
+ }
2739
+ var Tn = function(e) {
2740
+ if (this.options.processEntities) {
2741
+ for (let t in this.docTypeEntities) {
2742
+ let n = this.docTypeEntities[t];
2743
+ e = e.replace(n.regx, n.val);
2744
+ }
2745
+ for (let t in this.lastEntities) {
2746
+ let n = this.lastEntities[t];
2747
+ e = e.replace(n.regex, n.val);
2748
+ }
2749
+ if (this.options.htmlEntities) for (let t in this.htmlEntities) {
2750
+ let n = this.htmlEntities[t];
2751
+ e = e.replace(n.regex, n.val);
2752
+ }
2753
+ e = e.replace(this.ampEntity.regex, this.ampEntity.val);
2754
+ }
2755
+ return e;
2756
+ };
2757
+ function En(e, t, n, r) {
2758
+ 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;
2759
+ }
2760
+ function Dn(e, t, n, r) {
2761
+ return !(!t || !t.has(r)) || !(!e || !e.has(n));
2762
+ }
2763
+ function G(e, t, n, r) {
2764
+ let i = e.indexOf(t, n);
2765
+ if (i === -1) throw Error(r);
2766
+ return i + t.length - 1;
2767
+ }
2768
+ function On(e, t, n) {
2769
+ let r = function(e, t) {
2770
+ let n, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ">", i = "";
2771
+ for (let a = t; a < e.length; a++) {
2772
+ let t = e[a];
2773
+ if (n) t === n && (n = "");
2774
+ else if (t === "\"" || t === "'") n = t;
2775
+ else if (t === r[0]) {
2776
+ if (!r[1] || e[a + 1] === r[1]) return {
2777
+ data: i,
2778
+ index: a
2779
+ };
2780
+ } else t === " " && (t = " ");
2781
+ i += t;
2782
+ }
2783
+ }(e, t + 1, arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ">");
2784
+ if (!r) return;
2785
+ let i = r.data, a = r.index, o = i.search(/\s/), s = i, c = !0;
2786
+ o !== -1 && (s = i.substring(0, o), i = i.substring(o + 1).trimStart());
2787
+ let l = s;
2788
+ if (n) {
2789
+ let e = s.indexOf(":");
2790
+ e !== -1 && (s = s.substr(e + 1), c = s !== r.data.substr(e + 1));
2791
+ }
2792
+ return {
2793
+ tagName: s,
2794
+ tagExp: i,
2795
+ closeIndex: a,
2796
+ attrExpPresent: c,
2797
+ rawTagName: l
2798
+ };
2799
+ }
2800
+ function kn(e, t, n) {
2801
+ let r = n, i = 1;
2802
+ for (; n < e.length; n++) if (e[n] === "<") if (e[n + 1] === "/") {
2803
+ let a = G(e, ">", n, `${t} is not closed`);
2804
+ if (e.substring(n + 2, a).trim() === t && (i--, i === 0)) return {
2805
+ tagContent: e.substring(r, n),
2806
+ i: a
2807
+ };
2808
+ n = a;
2809
+ } else if (e[n + 1] === "?") n = G(e, "?>", n + 1, "StopNode is not closed.");
2810
+ else if (e.substr(n + 1, 3) === "!--") n = G(e, "-->", n + 3, "StopNode is not closed.");
2811
+ else if (e.substr(n + 1, 2) === "![") n = G(e, "]]>", n, "StopNode is not closed.") - 2;
2812
+ else {
2813
+ let r = On(e, n, ">");
2814
+ r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
2815
+ }
2816
+ }
2817
+ function An(e, t, n) {
2818
+ if (t && typeof e == "string") {
2819
+ let t = e.trim();
2820
+ return t === "true" || t !== "false" && function(e) {
2821
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2822
+ if (t = Object.assign({}, mn, t), !e || typeof e != "string") return e;
2823
+ let n = e.trim();
2824
+ if (t.skipLike !== void 0 && t.skipLike.test(n)) return e;
2825
+ if (e === "0") return 0;
2826
+ if (t.hex && fn.test(n)) return function(e) {
2827
+ if (parseInt) return parseInt(e, 16);
2828
+ if (Number.parseInt) return Number.parseInt(e, 16);
2829
+ if (window && window.parseInt) return window.parseInt(e, 16);
2830
+ throw Error("parseInt, Number.parseInt, window.parseInt are not supported");
2831
+ }(n);
2832
+ if (n.includes("e") || n.includes("E")) return function(e, t, n) {
2833
+ if (!n.eNotation) return e;
2834
+ let r = t.match(hn);
2835
+ if (r) {
2836
+ 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;
2837
+ return o.length > 1 && s ? e : o.length !== 1 || !r[3].startsWith(`.${a}`) && r[3][0] !== a ? n.leadingZeros && !s ? (t = (r[1] || "") + r[3], Number(t)) : e : Number(t);
2838
+ }
2839
+ return e;
2840
+ }(e, n, t);
2841
+ {
2842
+ let i = pn.exec(n);
2843
+ if (i) {
2844
+ let a = i[1] || "", o = i[2], s = ((r = i[3]) && r.indexOf(".") !== -1 && ((r = r.replace(/0+$/, "")) === "." ? r = "0" : r[0] === "." ? r = "0" + r : r[r.length - 1] === "." && (r = r.substring(0, r.length - 1))), r), c = a ? e[o.length + 1] === "." : e[o.length] === ".";
2845
+ if (!t.leadingZeros && (o.length > 1 || o.length === 1 && !c)) return e;
2846
+ {
2847
+ let r = Number(n), i = String(r);
2848
+ if (r === 0) return r;
2849
+ if (i.search(/[eE]/) !== -1) return t.eNotation ? r : e;
2850
+ if (n.indexOf(".") !== -1) return i === "0" || i === s || i === `${a}${s}` ? r : e;
2851
+ let c = o ? s : n;
2852
+ return o ? c === i || a + c === i ? r : e : c === i || c === a + i ? r : e;
2853
+ }
2854
+ }
2855
+ return e;
2856
+ }
2857
+ var r;
2858
+ }(e, n);
2859
+ }
2860
+ return e === void 0 ? "" : e;
2861
+ }
2862
+ function jn(e, t, n) {
2863
+ let r = Number.parseInt(e, t);
2864
+ return r >= 0 && r <= 1114111 ? String.fromCodePoint(r) : n + e + ";";
2865
+ }
2866
+ var Mn = H.getMetaDataSymbol();
2867
+ function Nn(e, t) {
2868
+ return Pn(e, t);
2869
+ }
2870
+ function Pn(e, t, n) {
2871
+ let r, i = {};
2872
+ for (let a = 0; a < e.length; a++) {
2873
+ let o = e[a], s = Fn(o), c = "";
2874
+ if (c = n === void 0 ? s : n + "." + s, s === t.textNodeName) r === void 0 ? r = o[s] : r += "" + o[s];
2875
+ else {
2876
+ if (s === void 0) continue;
2877
+ if (o[s]) {
2878
+ let e = Pn(o[s], t, c), n = Ln(e, t);
2879
+ o[Mn] !== void 0 && (e[Mn] = o[Mn]), o[":@"] ? In(e, o[":@"], c, 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], i[s] !== void 0 && i.hasOwnProperty(s) ? (Array.isArray(i[s]) || (i[s] = [i[s]]), i[s].push(e)) : t.isArray(s, c, n) ? i[s] = [e] : i[s] = e;
2880
+ }
2881
+ }
2882
+ }
2883
+ return typeof r == "string" ? r.length > 0 && (i[t.textNodeName] = r) : r !== void 0 && (i[t.textNodeName] = r), i;
2884
+ }
2885
+ function Fn(e) {
2886
+ let t = Object.keys(e);
2887
+ for (let e = 0; e < t.length; e++) {
2888
+ let n = t[e];
2889
+ if (n !== ":@") return n;
2890
+ }
2891
+ }
2892
+ function In(e, t, n, r) {
2893
+ if (t) {
2894
+ let i = Object.keys(t), a = i.length;
2895
+ for (let o = 0; o < a; o++) {
2896
+ let a = i[o];
2897
+ r.isArray(a, n + "." + a, !0, !0) ? e[a] = [t[a]] : e[a] = t[a];
2898
+ }
2899
+ }
2900
+ }
2901
+ function Ln(e, t) {
2902
+ let { textNodeName: n } = t, r = Object.keys(e).length;
2903
+ return r === 0 || !(r !== 1 || !e[n] && typeof e[n] != "boolean" && e[n] !== 0);
2904
+ }
2905
+ var Rn = {
2906
+ allowBooleanAttributes: !1,
2907
+ unpairedTags: []
2908
+ };
2909
+ function zn(e) {
2910
+ return e === " " || e === " " || e === "\n" || e === "\r";
2911
+ }
2912
+ function Bn(e, t) {
2913
+ let n = t;
2914
+ for (; t < e.length; t++) if (!(e[t] != "?" && e[t] != " ")) {
2915
+ let r = e.substr(n, t - n);
2916
+ if (t > 5 && r === "xml") return K("InvalidXml", "XML declaration allowed only at the start of the document.", q(e, t));
2917
+ if (e[t] == "?" && e[t + 1] == ">") {
2918
+ t++;
2919
+ break;
2920
+ }
2921
+ }
2922
+ return t;
2923
+ }
2924
+ function Vn(e, t) {
2925
+ if (e.length > t + 5 && e[t + 1] === "-" && e[t + 2] === "-") {
2926
+ for (t += 3; t < e.length; t++) if (e[t] === "-" && e[t + 1] === "-" && e[t + 2] === ">") {
2927
+ t += 2;
2928
+ break;
2929
+ }
2930
+ } else if (e.length > t + 8 && e[t + 1] === "D" && e[t + 2] === "O" && e[t + 3] === "C" && e[t + 4] === "T" && e[t + 5] === "Y" && e[t + 6] === "P" && e[t + 7] === "E") {
2931
+ let n = 1;
2932
+ for (t += 8; t < e.length; t++) if (e[t] === "<") n++;
2933
+ else if (e[t] === ">" && (n--, n === 0)) break;
2934
+ } else if (e.length > t + 9 && e[t + 1] === "[" && e[t + 2] === "C" && e[t + 3] === "D" && e[t + 4] === "A" && e[t + 5] === "T" && e[t + 6] === "A" && e[t + 7] === "[") {
2935
+ for (t += 8; t < e.length; t++) if (e[t] === "]" && e[t + 1] === "]" && e[t + 2] === ">") {
2936
+ t += 2;
2937
+ break;
2938
+ }
2939
+ }
2940
+ return t;
2941
+ }
2942
+ function Hn(e, t) {
2943
+ let n = "", r = "", i = !1;
2944
+ for (; t < e.length; t++) {
2945
+ if (e[t] === "\"" || e[t] === "'") r === "" ? r = e[t] : r !== e[t] || (r = "");
2946
+ else if (e[t] === ">" && r === "") {
2947
+ i = !0;
2948
+ break;
2949
+ }
2950
+ n += e[t];
2951
+ }
2952
+ return r === "" && {
2953
+ value: n,
2954
+ index: t,
2955
+ tagClosed: i
2956
+ };
2957
+ }
2958
+ var Un = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
2959
+ function Wn(e, t) {
2960
+ let n = sn(e, Un), r = {};
2961
+ for (let e = 0; e < n.length; e++) {
2962
+ if (n[e][1].length === 0) return K("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", qn(n[e]));
2963
+ if (n[e][3] !== void 0 && n[e][4] === void 0) return K("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", qn(n[e]));
2964
+ if (n[e][3] === void 0 && !t.allowBooleanAttributes) return K("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", qn(n[e]));
2965
+ let i = n[e][2];
2966
+ if (!Kn(i)) return K("InvalidAttr", "Attribute '" + i + "' is an invalid name.", qn(n[e]));
2967
+ if (r.hasOwnProperty(i)) return K("InvalidAttr", "Attribute '" + i + "' is repeated.", qn(n[e]));
2968
+ r[i] = 1;
2969
+ }
2970
+ return !0;
2971
+ }
2972
+ function Gn(e, t) {
2973
+ if (e[++t] === ";") return -1;
2974
+ if (e[t] === "#") return function(e, t) {
2975
+ let n = /\d/;
2976
+ for (e[t] === "x" && (t++, n = /[\da-fA-F]/); t < e.length; t++) {
2977
+ if (e[t] === ";") return t;
2978
+ if (!e[t].match(n)) break;
2979
+ }
2980
+ return -1;
2981
+ }(e, ++t);
2982
+ let n = 0;
2983
+ for (; t < e.length; t++, n++) if (!(e[t].match(/\w/) && n < 20)) {
2984
+ if (e[t] === ";") break;
2985
+ return -1;
2986
+ }
2987
+ return t;
2988
+ }
2989
+ function K(e, t, n) {
2990
+ return { err: {
2991
+ code: e,
2992
+ msg: t,
2993
+ line: n.line || n,
2994
+ col: n.col
2995
+ } };
2996
+ }
2997
+ function Kn(e) {
2998
+ return cn(e);
2999
+ }
3000
+ function q(e, t) {
3001
+ let n = e.substring(0, t).split(/\r?\n/);
3002
+ return {
3003
+ line: n.length,
3004
+ col: n[n.length - 1].length + 1
3005
+ };
3006
+ }
3007
+ function qn(e) {
3008
+ return e.startIndex + e[1].length;
3009
+ }
3010
+ var Jn = class {
3011
+ constructor(e) {
3012
+ this.externalEntities = {}, this.options = function(e) {
3013
+ return Object.assign({}, an, e);
3014
+ }(e);
3015
+ }
3016
+ parse(e, t) {
3017
+ if (typeof e != "string" && e.toString) e = e.toString();
3018
+ else if (typeof e != "string") throw Error("XML data is accepted in String or Bytes[] form.");
3019
+ if (t) {
3020
+ !0 === t && (t = {});
3021
+ let n = function(e, t) {
3022
+ t = Object.assign({}, Rn, t);
3023
+ let n = [], r = !1, i = !1;
3024
+ e[0] === "" && (e = e.substr(1));
3025
+ for (let a = 0; a < e.length; a++) if (e[a] === "<" && e[a + 1] === "?") {
3026
+ if (a += 2, a = Bn(e, a), a.err) return a;
3027
+ } else {
3028
+ if (e[a] !== "<") {
3029
+ if (zn(e[a])) continue;
3030
+ return K("InvalidChar", "char '" + e[a] + "' is not expected.", q(e, a));
3031
+ }
3032
+ {
3033
+ let o = a;
3034
+ if (a++, e[a] === "!") {
3035
+ a = Vn(e, a);
3036
+ continue;
3037
+ }
3038
+ {
3039
+ let s = !1;
3040
+ e[a] === "/" && (s = !0, a++);
3041
+ let c = "";
3042
+ for (; a < e.length && e[a] !== ">" && e[a] !== " " && e[a] !== " " && e[a] !== "\n" && e[a] !== "\r"; a++) c += e[a];
3043
+ if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !cn(c)) {
3044
+ let t;
3045
+ return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", K("InvalidTag", t, q(e, a));
3046
+ }
3047
+ let l = Hn(e, a);
3048
+ if (!1 === l) return K("InvalidAttr", "Attributes for '" + c + "' have open quote.", q(e, a));
3049
+ let u = l.value;
3050
+ if (a = l.index, u[u.length - 1] === "/") {
3051
+ let n = a - u.length;
3052
+ u = u.substring(0, u.length - 1);
3053
+ let i = Wn(u, t);
3054
+ if (!0 !== i) return K(i.err.code, i.err.msg, q(e, n + i.err.line));
3055
+ r = !0;
3056
+ } else if (s) {
3057
+ if (!l.tagClosed) return K("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", q(e, a));
3058
+ if (u.trim().length > 0) return K("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", q(e, o));
3059
+ if (n.length === 0) return K("InvalidTag", "Closing tag '" + c + "' has not been opened.", q(e, o));
3060
+ {
3061
+ let t = n.pop();
3062
+ if (c !== t.tagName) {
3063
+ let n = q(e, t.tagStartPos);
3064
+ return K("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", q(e, o));
3065
+ }
3066
+ n.length == 0 && (i = !0);
3067
+ }
3068
+ } else {
3069
+ let s = Wn(u, t);
3070
+ if (!0 !== s) return K(s.err.code, s.err.msg, q(e, a - u.length + s.err.line));
3071
+ if (!0 === i) return K("InvalidXml", "Multiple possible root nodes found.", q(e, a));
3072
+ t.unpairedTags.indexOf(c) !== -1 || n.push({
3073
+ tagName: c,
3074
+ tagStartPos: o
3075
+ }), r = !0;
3076
+ }
3077
+ for (a++; a < e.length; a++) if (e[a] === "<") {
3078
+ if (e[a + 1] === "!") {
3079
+ a++, a = Vn(e, a);
3080
+ continue;
3081
+ }
3082
+ if (e[a + 1] !== "?") break;
3083
+ if (a = Bn(e, ++a), a.err) return a;
3084
+ } else if (e[a] === "&") {
3085
+ let t = Gn(e, a);
3086
+ if (t == -1) return K("InvalidChar", "char '&' is not expected.", q(e, a));
3087
+ a = t;
3088
+ } else if (!0 === i && !zn(e[a])) return K("InvalidXml", "Extra text at the end", q(e, a));
3089
+ e[a] === "<" && a--;
3090
+ }
3091
+ }
3092
+ }
3093
+ return r ? n.length == 1 ? K("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", q(e, n[0].tagStartPos)) : !(n.length > 0) || K("InvalidXml", "Invalid '" + JSON.stringify(n.map(((e) => e.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", {
3094
+ line: 1,
3095
+ col: 1
3096
+ }) : K("InvalidXml", "Start tag expected.", 1);
3097
+ }(e, t);
3098
+ if (!0 !== n) throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
3099
+ }
3100
+ let n = new _n(this.options);
3101
+ n.addExternalEntities(this.externalEntities);
3102
+ let r = n.parseXml(e);
3103
+ return this.options.preserveOrder || r === void 0 ? r : Nn(r, this.options);
3104
+ }
3105
+ addEntity(e, t) {
3106
+ if (t.indexOf("&") !== -1) throw Error("Entity value can't have '&'");
3107
+ if (e.indexOf("&") !== -1 || e.indexOf(";") !== -1) throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");
3108
+ if (t === "&") throw Error("An entity with value '&' is not permitted");
3109
+ this.externalEntities[e] = t;
3110
+ }
3111
+ static getMetaDataSymbol() {
3112
+ return H.getMetaDataSymbol();
3113
+ }
3114
+ }, Yn = k(829), J = k.n(Yn), Y = function(e) {
3115
+ return e.Array = "array", e.Object = "object", e.Original = "original", e;
3116
+ }(Y || {});
3117
+ function Xn(e, t) {
3118
+ if (!e.endsWith("propstat.prop.displayname")) return t;
3119
+ }
3120
+ function Zn(e, t) {
3121
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Y.Original, r = J().get(e, t);
3122
+ return n === "array" && !1 === Array.isArray(r) ? [r] : n === "object" && Array.isArray(r) ? r[0] : r;
3123
+ }
3124
+ function Qn(e, t) {
3125
+ return t ??= {
3126
+ attributeNamePrefix: "@",
3127
+ attributeParsers: [],
3128
+ tagParsers: [Xn]
3129
+ }, new Promise(((n) => {
3130
+ n(function(e) {
3131
+ let { multistatus: t } = e;
3132
+ if (t === "") return { multistatus: { response: [] } };
3133
+ if (!t) throw Error("Invalid response: No root multistatus found");
3134
+ let n = { multistatus: Array.isArray(t) ? t[0] : t };
3135
+ return J().set(n, "multistatus.response", Zn(n, "multistatus.response", Y.Array)), J().set(n, "multistatus.response", J().get(n, "multistatus.response").map(((e) => function(e) {
3136
+ let t = Object.assign({}, e);
3137
+ return t.status ? J().set(t, "status", Zn(t, "status", Y.Object)) : (J().set(t, "propstat", Zn(t, "propstat", Y.Object)), J().set(t, "propstat.prop", Zn(t, "propstat.prop", Y.Object))), t;
3138
+ }(e)))), n;
3139
+ }(function(e) {
3140
+ let { attributeNamePrefix: t, attributeParsers: n, tagParsers: r } = e;
3141
+ return new Jn({
3142
+ allowBooleanAttributes: !0,
3143
+ attributeNamePrefix: t,
3144
+ textNodeName: "text",
3145
+ ignoreAttributes: !1,
3146
+ removeNSPrefix: !0,
3147
+ numberParseOptions: {
3148
+ hex: !0,
3149
+ leadingZeros: !1
3150
+ },
3151
+ attributeValueProcessor(e, t, r) {
3152
+ for (let e of n) try {
3153
+ let n = e(r, t);
3154
+ if (n !== t) return n;
3155
+ } catch {}
3156
+ return t;
3157
+ },
3158
+ tagValueProcessor(e, t, n) {
3159
+ for (let e of r) try {
3160
+ let r = e(n, t);
3161
+ if (r !== t) return r;
3162
+ } catch {}
3163
+ return t;
3164
+ }
3165
+ });
3166
+ }(t).parse(e)));
3167
+ }));
3168
+ }
3169
+ function $n(e, t) {
3170
+ let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], { 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 = {
3171
+ filename: t,
3172
+ basename: je().basename(t),
3173
+ lastmod: r,
3174
+ size: parseInt(i, 10),
3175
+ type: c,
3176
+ etag: typeof s == "string" ? s.replace(/"/g, "") : null
3177
+ };
3178
+ 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;
3179
+ }
3180
+ function er(e, t) {
3181
+ let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = null;
3182
+ try {
3183
+ e.multistatus.response[0].propstat && (r = e.multistatus.response[0]);
3184
+ } catch {}
3185
+ if (!r) throw Error("Failed getting item stat: bad response");
3186
+ let { propstat: { prop: i, status: a } } = r, [o, s, c] = a.split(" ", 3), l = parseInt(s, 10);
3187
+ if (l >= 400) {
3188
+ let e = /* @__PURE__ */ Error(`Invalid response: ${l} ${c}`);
3189
+ throw e.status = l, e;
3190
+ }
3191
+ return $n(i, Fe(t), n);
3192
+ }
3193
+ function tr(e) {
3194
+ switch (String(e)) {
3195
+ case "-3": return "unlimited";
3196
+ case "-2":
3197
+ case "-1": return "unknown";
3198
+ default: return parseInt(String(e), 10);
3199
+ }
3200
+ }
3201
+ function nr(e, t, n) {
3202
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3203
+ }
3204
+ var rr = function(e) {
3205
+ return function() {
3206
+ var t = [...arguments];
3207
+ try {
3208
+ return Promise.resolve(e.apply(this, t));
3209
+ } catch (e) {
3210
+ return Promise.reject(e);
3211
+ }
3212
+ };
3213
+ }((function(e, t) {
3214
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { details: r = !1 } = n;
3215
+ return nr(F(I({
3216
+ url: M(e.remoteURL, j(t)),
3217
+ method: "PROPFIND",
3218
+ headers: {
3219
+ Accept: "text/plain,application/xml",
3220
+ Depth: "0"
3221
+ }
3222
+ }, e, n), e), (function(n) {
3223
+ return B(e, n), nr(n.text(), (function(i) {
3224
+ return nr(Qn(i, e.parsing), (function(e) {
3225
+ return V(n, er(e, t, r), r);
3226
+ }));
3227
+ }));
3228
+ }));
3229
+ }));
3230
+ function ir(e, t, n) {
3231
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3232
+ }
3233
+ var ar = or((function(e, t) {
3234
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = function(e) {
3235
+ if (!e || e === "/") return [];
3236
+ let t = e, n = [];
3237
+ do
3238
+ n.push(t), t = je().dirname(t);
3239
+ while (t && t !== "/");
3240
+ return n;
3241
+ }(Fe(t));
3242
+ r.sort(((e, t) => e.length > t.length ? 1 : t.length > e.length ? -1 : 0));
3243
+ let i = !1;
3244
+ return function(e, t, n) {
3245
+ if (typeof e[lr] == "function") {
3246
+ var r, i, a, o = e[lr]();
3247
+ function n(e) {
3248
+ try {
3249
+ for (; !(r = o.next()).done;) if ((e = t(r.value)) && e.then) {
3250
+ if (!ur(e)) return void e.then(n, a ||= X.bind(null, i = new Z(), 2));
3251
+ e = e.v;
3252
+ }
3253
+ i ? X(i, 1, e) : i = e;
3254
+ } catch (e) {
3255
+ X(i ||= new Z(), 2, e);
3256
+ }
3257
+ }
3258
+ if (n(), o.return) {
3259
+ var s = function(e) {
3260
+ try {
3261
+ r.done || o.return();
3262
+ } catch {}
3263
+ return e;
3264
+ };
3265
+ if (i && i.then) return i.then(s, (function(e) {
3266
+ throw s(e);
3267
+ }));
3268
+ s();
3269
+ }
3270
+ return i;
3271
+ }
3272
+ if (!("length" in e)) throw TypeError("Object is not iterable");
3273
+ for (var c = [], l = 0; l < e.length; l++) c.push(e[l]);
3274
+ return function(e, t, n) {
3275
+ var r, i, a = -1;
3276
+ return function o(s) {
3277
+ try {
3278
+ for (; ++a < e.length && (!n || !n());) if ((s = t(a)) && s.then) {
3279
+ if (!ur(s)) return void s.then(o, i ||= X.bind(null, r = new Z(), 2));
3280
+ s = s.v;
3281
+ }
3282
+ r ? X(r, 1, s) : r = s;
3283
+ } catch (e) {
3284
+ X(r ||= new Z(), 2, e);
3285
+ }
3286
+ }(), r;
3287
+ }(c, (function(e) {
3288
+ return t(c[e]);
3289
+ }), n);
3290
+ }(r, (function(r) {
3291
+ return a = function() {
3292
+ return function(n, i) {
3293
+ try {
3294
+ var a = ir(rr(e, r), (function(e) {
3295
+ if (e.type !== "directory") throw Error(`Path includes a file: ${t}`);
3296
+ }));
3297
+ } catch (e) {
3298
+ return i(e);
3299
+ }
3300
+ return a && a.then ? a.then(void 0, i) : a;
3301
+ }(0, (function(t) {
3302
+ let a = t;
3303
+ return function() {
3304
+ if (a.status === 404) return i = !0, cr(dr(e, r, {
3305
+ ...n,
3306
+ recursive: !1
3307
+ }));
3308
+ throw t;
3309
+ }();
3310
+ }));
3311
+ }, (o = function() {
3312
+ if (i) return cr(dr(e, r, {
3313
+ ...n,
3314
+ recursive: !1
3315
+ }));
3316
+ }()) && o.then ? o.then(a) : a();
3317
+ var a, o;
3318
+ }), (function() {
3319
+ return !1;
3320
+ }));
3321
+ }));
3322
+ function or(e) {
3323
+ return function() {
3324
+ var t = [...arguments];
3325
+ try {
3326
+ return Promise.resolve(e.apply(this, t));
3327
+ } catch (e) {
3328
+ return Promise.reject(e);
3329
+ }
3330
+ };
3331
+ }
3332
+ function sr() {}
3333
+ function cr(e, t) {
3334
+ if (!t) return e && e.then ? e.then(sr) : Promise.resolve();
3335
+ }
3336
+ var lr = typeof Symbol < "u" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
3337
+ function X(e, t, n) {
3338
+ if (!e.s) {
3339
+ if (n instanceof Z) {
3340
+ if (!n.s) return void (n.o = X.bind(null, e, t));
3341
+ 1 & t && (t = n.s), n = n.v;
3342
+ }
3343
+ if (n && n.then) return void n.then(X.bind(null, e, t), X.bind(null, e, 2));
3344
+ e.s = t, e.v = n;
3345
+ let r = e.o;
3346
+ r && r(e);
3347
+ }
3348
+ }
3349
+ var Z = function() {
3350
+ function e() {}
3351
+ return e.prototype.then = function(t, n) {
3352
+ let r = new e(), i = this.s;
3353
+ if (i) {
3354
+ let e = 1 & i ? t : n;
3355
+ if (e) {
3356
+ try {
3357
+ X(r, 1, e(this.v));
3358
+ } catch (e) {
3359
+ X(r, 2, e);
3360
+ }
3361
+ return r;
3362
+ }
3363
+ return this;
3364
+ }
3365
+ return this.o = function(e) {
3366
+ try {
3367
+ let i = e.v;
3368
+ 1 & e.s ? X(r, 1, t ? t(i) : i) : n ? X(r, 1, n(i)) : X(r, 2, i);
3369
+ } catch (e) {
3370
+ X(r, 2, e);
3371
+ }
3372
+ }, r;
3373
+ }, e;
3374
+ }();
3375
+ function ur(e) {
3376
+ return e instanceof Z && 1 & e.s;
3377
+ }
3378
+ var dr = or((function(e, t) {
3379
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3380
+ if (!0 === n.recursive) return ar(e, t, n);
3381
+ let r = I({
3382
+ url: M(e.remoteURL, (i = j(t), i.endsWith("/") ? i : i + "/")),
3383
+ method: "MKCOL"
3384
+ }, e, n);
3385
+ var i;
3386
+ return ir(F(r, e), (function(t) {
3387
+ B(e, t);
3388
+ }));
3389
+ })), fr = k(388), pr = k.n(fr), mr = function(e) {
3390
+ return function() {
3391
+ var t = [...arguments];
3392
+ try {
3393
+ return Promise.resolve(e.apply(this, t));
3394
+ } catch (e) {
3395
+ return Promise.reject(e);
3396
+ }
3397
+ };
3398
+ }((function(e, t) {
3399
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = {};
3400
+ if (typeof n.range == "object" && typeof n.range.start == "number") {
3401
+ let e = `bytes=${n.range.start}-`;
3402
+ typeof n.range.end == "number" && (e = `${e}${n.range.end}`), r.Range = e;
3403
+ }
3404
+ let i = I({
3405
+ url: M(e.remoteURL, j(t)),
3406
+ method: "GET",
3407
+ headers: r
3408
+ }, e, n);
3409
+ return o = function(t) {
3410
+ if (B(e, t), r.Range && t.status !== 206) {
3411
+ let e = /* @__PURE__ */ Error(`Invalid response code for partial request: ${t.status}`);
3412
+ throw e.status = t.status, e;
3413
+ }
3414
+ return n.callback && setTimeout((() => {
3415
+ n.callback(t);
3416
+ }), 0), t.body;
3417
+ }, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
3418
+ var a, o;
3419
+ })), hr = () => {}, gr = function(e) {
3420
+ return function() {
3421
+ var t = [...arguments];
3422
+ try {
3423
+ return Promise.resolve(e.apply(this, t));
3424
+ } catch (e) {
3425
+ return Promise.reject(e);
3426
+ }
3427
+ };
3428
+ }((function(e, t, n) {
3429
+ n.url ||= M(e.remoteURL, j(t));
3430
+ let r = I(n, e, {});
3431
+ return a = function(t) {
3432
+ return B(e, t), t;
3433
+ }, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3434
+ var i, a;
3435
+ })), _r = function(e) {
3436
+ return function() {
3437
+ var t = [...arguments];
3438
+ try {
3439
+ return Promise.resolve(e.apply(this, t));
3440
+ } catch (e) {
3441
+ return Promise.reject(e);
3442
+ }
3443
+ };
3444
+ }((function(e, t) {
3445
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = I({
3446
+ url: M(e.remoteURL, j(t)),
3447
+ method: "DELETE"
3448
+ }, e, n);
3449
+ return a = function(t) {
3450
+ B(e, t);
3451
+ }, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3452
+ var i, a;
3453
+ })), vr = function(e) {
3454
+ return function() {
3455
+ var t = [...arguments];
3456
+ try {
3457
+ return Promise.resolve(e.apply(this, t));
3458
+ } catch (e) {
3459
+ return Promise.reject(e);
3460
+ }
3461
+ };
3462
+ }((function(e, t) {
3463
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3464
+ return function(r, i) {
3465
+ try {
3466
+ var a = (o = rr(e, t, n), s = function() {
3467
+ return !0;
3468
+ }, c ? s ? s(o) : o : (o && o.then || (o = Promise.resolve(o)), s ? o.then(s) : o));
3469
+ } catch (e) {
3470
+ return i(e);
3471
+ }
3472
+ var o, s, c;
3473
+ return a && a.then ? a.then(void 0, i) : a;
3474
+ }(0, (function(e) {
3475
+ if (e.status === 404) return !1;
3476
+ throw e;
3477
+ }));
3478
+ }));
3479
+ function yr(e, t, n) {
3480
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3481
+ }
3482
+ var br = function(e) {
3483
+ return function() {
3484
+ var t = [...arguments];
3485
+ try {
3486
+ return Promise.resolve(e.apply(this, t));
3487
+ } catch (e) {
3488
+ return Promise.reject(e);
3489
+ }
3490
+ };
3491
+ }((function(e, t) {
3492
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3493
+ return yr(F(I({
3494
+ url: M(e.remoteURL, j(t), "/"),
3495
+ method: "PROPFIND",
3496
+ headers: {
3497
+ Accept: "text/plain,application/xml",
3498
+ Depth: n.deep ? "infinity" : "1"
3499
+ }
3500
+ }, e, n), e), (function(r) {
3501
+ return B(e, r), yr(r.text(), (function(i) {
3502
+ if (!i) throw Error("Failed parsing directory contents: Empty response");
3503
+ return yr(Qn(i, e.parsing), (function(i) {
3504
+ let a = Pe(t), o = function(e, t, n) {
3505
+ let r = arguments.length > 3 && arguments[3] !== void 0 && arguments[3], i = arguments.length > 4 && arguments[4] !== void 0 && arguments[4], a = je().join(t, "/"), { multistatus: { response: o } } = e, s = o.map(((e) => {
3506
+ let t = function(e) {
3507
+ try {
3508
+ return e.replace(/^https?:\/\/[^\/]+/, "");
3509
+ } catch (e) {
3510
+ throw new A(e, "Failed normalising HREF");
3511
+ }
3512
+ }(e.href), { propstat: { prop: n } } = e;
3513
+ return $n(n, a === "/" ? decodeURIComponent(Fe(t)) : Fe(je().relative(decodeURIComponent(a), decodeURIComponent(t))), r);
3514
+ }));
3515
+ return i ? s : s.filter(((e) => e.basename && (e.type === "file" || e.filename !== n.replace(/\/$/, ""))));
3516
+ }(i, Pe(e.remoteBasePath || e.remotePath), a, n.details, n.includeSelf);
3517
+ return n.glob && (o = function(e, t) {
3518
+ return e.filter(((e) => L(e.filename, t, { matchBase: !0 })));
3519
+ }(o, n.glob)), V(r, o, n.details);
3520
+ }));
3521
+ }));
3522
+ }));
3523
+ }));
3524
+ function xr(e) {
3525
+ return function() {
3526
+ var t = [...arguments];
3527
+ try {
3528
+ return Promise.resolve(e.apply(this, t));
3529
+ } catch (e) {
3530
+ return Promise.reject(e);
3531
+ }
3532
+ };
3533
+ }
3534
+ var Sr = xr((function(e, t) {
3535
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3536
+ return Cr(F(I({
3537
+ url: M(e.remoteURL, j(t)),
3538
+ method: "GET",
3539
+ headers: { Accept: "text/plain" },
3540
+ transformResponse: [Er]
3541
+ }, e, n), e), (function(t) {
3542
+ return B(e, t), Cr(t.text(), (function(e) {
3543
+ return V(t, e, n.details);
3544
+ }));
3545
+ }));
3546
+ }));
3547
+ function Cr(e, t, n) {
3548
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3549
+ }
3550
+ var wr = xr((function(e, t) {
3551
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3552
+ return Cr(F(I({
3553
+ url: M(e.remoteURL, j(t)),
3554
+ method: "GET"
3555
+ }, e, n), e), (function(t) {
3556
+ let r;
3557
+ return B(e, t), function(e, t) {
3558
+ var n = e();
3559
+ return n && n.then ? n.then(t) : t();
3560
+ }((function() {
3561
+ return Cr(t.arrayBuffer(), (function(e) {
3562
+ r = e;
3563
+ }));
3564
+ }), (function() {
3565
+ return V(t, r, n.details);
3566
+ }));
3567
+ }));
3568
+ })), Tr = xr((function(e, t) {
3569
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { format: r = "binary" } = n;
3570
+ if (r !== "binary" && r !== "text") throw new A({ info: { code: P.InvalidOutputFormat } }, `Invalid output format: ${r}`);
3571
+ return r === "text" ? Sr(e, t, n) : wr(e, t, n);
3572
+ })), Er = (e) => e;
3573
+ function Dr(e, t) {
3574
+ let n = "";
3575
+ return t.format && t.indentBy.length > 0 && (n = "\n"), Or(e, t, "", n);
3576
+ }
3577
+ function Or(e, t, n, r) {
3578
+ let i = "", a = !1;
3579
+ for (let o = 0; o < e.length; o++) {
3580
+ let s = e[o], c = kr(s);
3581
+ if (c === void 0) continue;
3582
+ let l = "";
3583
+ if (l = n.length === 0 ? c : `${n}.${c}`, c === t.textNodeName) {
3584
+ let e = s[c];
3585
+ jr(l, t) || (e = t.tagValueProcessor(c, e), e = Mr(e, t)), a && (i += r), i += e, a = !1;
3586
+ continue;
3587
+ }
3588
+ if (c === t.cdataPropName) {
3589
+ a && (i += r), i += `<![CDATA[${s[c][0][t.textNodeName]}]]>`, a = !1;
3590
+ continue;
3591
+ }
3592
+ if (c === t.commentPropName) {
3593
+ i += r + `\x3c!--${s[c][0][t.textNodeName]}--\x3e`, a = !0;
3594
+ continue;
3595
+ }
3596
+ if (c[0] === "?") {
3597
+ let e = Ar(s[":@"], t), n = c === "?xml" ? "" : r, o = s[c][0][t.textNodeName];
3598
+ o = o.length === 0 ? "" : " " + o, i += n + `<${c}${o}${e}?>`, a = !0;
3599
+ continue;
3600
+ }
3601
+ let u = r;
3602
+ u !== "" && (u += t.indentBy);
3603
+ let d = r + `<${c}${Ar(s[":@"], t)}`, f = Or(s[c], t, l, u);
3604
+ t.unpairedTags.indexOf(c) === -1 ? f && f.length !== 0 || !t.suppressEmptyNode ? f && f.endsWith(">") ? i += d + `>${f}${r}</${c}>` : (i += d + ">", f && r !== "" && (f.includes("/>") || f.includes("</")) ? i += r + t.indentBy + f + r : i += f, i += `</${c}>`) : i += d + "/>" : t.suppressUnpairedNode ? i += d + ">" : i += d + "/>", a = !0;
3605
+ }
3606
+ return i;
3607
+ }
3608
+ function kr(e) {
3609
+ let t = Object.keys(e);
3610
+ for (let n = 0; n < t.length; n++) {
3611
+ let r = t[n];
3612
+ if (e.hasOwnProperty(r) && r !== ":@") return r;
3613
+ }
3614
+ }
3615
+ function Ar(e, t) {
3616
+ let n = "";
3617
+ if (e && !t.ignoreAttributes) for (let r in e) {
3618
+ if (!e.hasOwnProperty(r)) continue;
3619
+ let i = t.attributeValueProcessor(r, e[r]);
3620
+ i = Mr(i, t), !0 === i && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${i}"`;
3621
+ }
3622
+ return n;
3623
+ }
3624
+ function jr(e, t) {
3625
+ let n = (e = e.substr(0, e.length - t.textNodeName.length - 1)).substr(e.lastIndexOf(".") + 1);
3626
+ for (let r in t.stopNodes) if (t.stopNodes[r] === e || t.stopNodes[r] === "*." + n) return !0;
3627
+ return !1;
3628
+ }
3629
+ function Mr(e, t) {
3630
+ if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
3631
+ let r = t.entities[n];
3632
+ e = e.replace(r.regex, r.val);
3633
+ }
3634
+ return e;
3635
+ }
3636
+ var Nr = {
3637
+ attributeNamePrefix: "@_",
3638
+ attributesGroupName: !1,
3639
+ textNodeName: "#text",
3640
+ ignoreAttributes: !0,
3641
+ cdataPropName: !1,
3642
+ format: !1,
3643
+ indentBy: " ",
3644
+ suppressEmptyNode: !1,
3645
+ suppressUnpairedNode: !0,
3646
+ suppressBooleanAttributes: !0,
3647
+ tagValueProcessor: function(e, t) {
3648
+ return t;
3649
+ },
3650
+ attributeValueProcessor: function(e, t) {
3651
+ return t;
3652
+ },
3653
+ preserveOrder: !1,
3654
+ commentPropName: !1,
3655
+ unpairedTags: [],
3656
+ entities: [
3657
+ {
3658
+ regex: /* @__PURE__ */ RegExp("&", "g"),
3659
+ val: "&amp;"
3660
+ },
3661
+ {
3662
+ regex: /* @__PURE__ */ RegExp(">", "g"),
3663
+ val: "&gt;"
3664
+ },
3665
+ {
3666
+ regex: /* @__PURE__ */ RegExp("<", "g"),
3667
+ val: "&lt;"
3668
+ },
3669
+ {
3670
+ regex: /* @__PURE__ */ RegExp("'", "g"),
3671
+ val: "&apos;"
3672
+ },
3673
+ {
3674
+ regex: /* @__PURE__ */ RegExp("\"", "g"),
3675
+ val: "&quot;"
3676
+ }
3677
+ ],
3678
+ processEntities: !0,
3679
+ stopNodes: [],
3680
+ oneListGroup: !1
3681
+ };
3682
+ function Q(e) {
3683
+ this.options = Object.assign({}, Nr, e), !0 === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
3684
+ return !1;
3685
+ } : (this.ignoreAttributesFn = gn(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Ir), this.processTextOrObjNode = Pr, this.options.format ? (this.indentate = Fr, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
3686
+ return "";
3687
+ }, this.tagEndChar = ">", this.newLine = "");
3688
+ }
3689
+ function Pr(e, t, n, r) {
3690
+ let i = this.j2x(e, n + 1, r.concat(t));
3691
+ return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, i.attrStr, n) : this.buildObjectNode(i.val, t, i.attrStr, n);
3692
+ }
3693
+ function Fr(e) {
3694
+ return this.options.indentBy.repeat(e);
3695
+ }
3696
+ function Ir(e) {
3697
+ return !(!e.startsWith(this.options.attributeNamePrefix) || e === this.options.textNodeName) && e.substr(this.attrPrefixLen);
3698
+ }
3699
+ function Lr(e) {
3700
+ return new Q({
3701
+ attributeNamePrefix: "@_",
3702
+ format: !0,
3703
+ ignoreAttributes: !1,
3704
+ suppressEmptyNode: !0
3705
+ }).build(Rr({ lockinfo: {
3706
+ "@_xmlns:d": "DAV:",
3707
+ lockscope: { exclusive: {} },
3708
+ locktype: { write: {} },
3709
+ owner: { href: e }
3710
+ } }, "d"));
3711
+ }
3712
+ function Rr(e, t) {
3713
+ let n = { ...e };
3714
+ for (let e in n) n.hasOwnProperty(e) && (n[e] && typeof n[e] == "object" && e.indexOf(":") === -1 ? (n[`${t}:${e}`] = Rr(n[e], t), delete n[e]) : !1 === /^@_/.test(e) && (n[`${t}:${e}`] = n[e], delete n[e]));
3715
+ return n;
3716
+ }
3717
+ function zr(e, t, n) {
3718
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3719
+ }
3720
+ function Br(e) {
3721
+ return function() {
3722
+ var t = [...arguments];
3723
+ try {
3724
+ return Promise.resolve(e.apply(this, t));
3725
+ } catch (e) {
3726
+ return Promise.reject(e);
3727
+ }
3728
+ };
3729
+ }
3730
+ Q.prototype.build = function(e) {
3731
+ return this.options.preserveOrder ? Dr(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = { [this.options.arrayNodeName]: e }), this.j2x(e, 0, []).val);
3732
+ }, Q.prototype.j2x = function(e, t, n) {
3733
+ let r = "", i = "", a = n.join(".");
3734
+ for (let o in e) if (Object.prototype.hasOwnProperty.call(e, o)) if (e[o] === void 0) this.isAttribute(o) && (i += "");
3735
+ else if (e[o] === null) this.isAttribute(o) || o === this.options.cdataPropName ? i += "" : o[0] === "?" ? i += this.indentate(t) + "<" + o + "?" + this.tagEndChar : i += this.indentate(t) + "<" + o + "/" + this.tagEndChar;
3736
+ else if (e[o] instanceof Date) i += this.buildTextValNode(e[o], o, "", t);
3737
+ else if (typeof e[o] != "object") {
3738
+ let n = this.isAttribute(o);
3739
+ if (n && !this.ignoreAttributesFn(n, a)) r += this.buildAttrPairStr(n, "" + e[o]);
3740
+ else if (!n) if (o === this.options.textNodeName) {
3741
+ let t = this.options.tagValueProcessor(o, "" + e[o]);
3742
+ i += this.replaceEntitiesValue(t);
3743
+ } else i += this.buildTextValNode(e[o], o, "", t);
3744
+ } else if (Array.isArray(e[o])) {
3745
+ let r = e[o].length, a = "", s = "";
3746
+ for (let c = 0; c < r; c++) {
3747
+ let r = e[o][c];
3748
+ if (r !== void 0) if (r === null) o[0] === "?" ? i += this.indentate(t) + "<" + o + "?" + this.tagEndChar : i += this.indentate(t) + "<" + o + "/" + this.tagEndChar;
3749
+ else if (typeof r == "object") if (this.options.oneListGroup) {
3750
+ let e = this.j2x(r, t + 1, n.concat(o));
3751
+ a += e.val, this.options.attributesGroupName && r.hasOwnProperty(this.options.attributesGroupName) && (s += e.attrStr);
3752
+ } else a += this.processTextOrObjNode(r, o, t, n);
3753
+ else if (this.options.oneListGroup) {
3754
+ let e = this.options.tagValueProcessor(o, r);
3755
+ e = this.replaceEntitiesValue(e), a += e;
3756
+ } else a += this.buildTextValNode(r, o, "", t);
3757
+ }
3758
+ this.options.oneListGroup && (a = this.buildObjectNode(a, o, s, t)), i += a;
3759
+ } else if (this.options.attributesGroupName && o === this.options.attributesGroupName) {
3760
+ let t = Object.keys(e[o]), n = t.length;
3761
+ for (let i = 0; i < n; i++) r += this.buildAttrPairStr(t[i], "" + e[o][t[i]]);
3762
+ } else i += this.processTextOrObjNode(e[o], o, t, n);
3763
+ return {
3764
+ attrStr: r,
3765
+ val: i
3766
+ };
3767
+ }, Q.prototype.buildAttrPairStr = function(e, t) {
3768
+ return t = this.options.attributeValueProcessor(e, "" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === "true" ? " " + e : " " + e + "=\"" + t + "\"";
3769
+ }, Q.prototype.buildObjectNode = function(e, t, n, r) {
3770
+ if (e === "") return t[0] === "?" ? this.indentate(r) + "<" + t + n + "?" + this.tagEndChar : this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
3771
+ {
3772
+ let i = "</" + t + this.tagEndChar, a = "";
3773
+ 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!--${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;
3774
+ }
3775
+ }, Q.prototype.closeTag = function(e) {
3776
+ let t = "";
3777
+ return this.options.unpairedTags.indexOf(e) === -1 ? t = this.options.suppressEmptyNode ? "/" : `></${e}` : this.options.suppressUnpairedNode || (t = "/"), t;
3778
+ }, Q.prototype.buildTextValNode = function(e, t, n, r) {
3779
+ if (!1 !== this.options.cdataPropName && t === this.options.cdataPropName) return this.indentate(r) + `<![CDATA[${e}]]>` + this.newLine;
3780
+ if (!1 !== this.options.commentPropName && t === this.options.commentPropName) return this.indentate(r) + `\x3c!--${e}--\x3e` + this.newLine;
3781
+ if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
3782
+ {
3783
+ let i = this.options.tagValueProcessor(t, e);
3784
+ return i = this.replaceEntitiesValue(i), i === "" ? this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar : this.indentate(r) + "<" + t + n + ">" + i + "</" + t + this.tagEndChar;
3785
+ }
3786
+ }, Q.prototype.replaceEntitiesValue = function(e) {
3787
+ if (e && e.length > 0 && this.options.processEntities) for (let t = 0; t < this.options.entities.length; t++) {
3788
+ let n = this.options.entities[t];
3789
+ e = e.replace(n.regex, n.val);
3790
+ }
3791
+ return e;
3792
+ };
3793
+ var Vr = Br((function(e, t, n) {
3794
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
3795
+ return zr(F(I({
3796
+ url: M(e.remoteURL, j(t)),
3797
+ method: "UNLOCK",
3798
+ headers: { "Lock-Token": n }
3799
+ }, e, r), e), (function(t) {
3800
+ if (B(e, t), t.status !== 204 && t.status !== 200) throw tn(t);
3801
+ }));
3802
+ })), Hr = Br((function(e, t) {
3803
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { refreshToken: r, timeout: i = Ur } = n, a = {
3804
+ Accept: "text/plain,application/xml",
3805
+ Timeout: i
3806
+ };
3807
+ return r && (a.If = r), zr(F(I({
3808
+ url: M(e.remoteURL, j(t)),
3809
+ method: "LOCK",
3810
+ headers: a,
3811
+ data: Lr(e.contactHref)
3812
+ }, e, n), e), (function(t) {
3813
+ return B(e, t), zr(t.text(), (function(e) {
3814
+ let n = (a = e, new Jn({
3815
+ removeNSPrefix: !0,
3816
+ parseAttributeValue: !0,
3817
+ parseTagValue: !0
3818
+ }).parse(a)), r = J().get(n, "prop.lockdiscovery.activelock.locktoken.href"), i = J().get(n, "prop.lockdiscovery.activelock.timeout");
3819
+ var a;
3820
+ if (!r) throw tn(t, "No lock token received: ");
3821
+ return {
3822
+ token: r,
3823
+ serverTimeout: i
3824
+ };
3825
+ }));
3826
+ }));
3827
+ })), Ur = "Infinite, Second-4100000000";
3828
+ function Wr(e, t, n) {
3829
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3830
+ }
3831
+ var Gr = function(e) {
3832
+ return function() {
3833
+ var t = [...arguments];
3834
+ try {
3835
+ return Promise.resolve(e.apply(this, t));
3836
+ } catch (e) {
3837
+ return Promise.reject(e);
3838
+ }
3839
+ };
3840
+ }((function(e) {
3841
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.path || "/";
3842
+ return Wr(F(I({
3843
+ url: M(e.remoteURL, n),
3844
+ method: "PROPFIND",
3845
+ headers: {
3846
+ Accept: "text/plain,application/xml",
3847
+ Depth: "0"
3848
+ }
3849
+ }, e, t), e), (function(n) {
3850
+ return B(e, n), Wr(n.text(), (function(r) {
3851
+ return Wr(Qn(r, e.parsing), (function(e) {
3852
+ return V(n, function(e) {
3853
+ try {
3854
+ let [t] = e.multistatus.response, { propstat: { prop: { "quota-used-bytes": n, "quota-available-bytes": r } } } = t;
3855
+ return n !== void 0 && r !== void 0 ? {
3856
+ used: parseInt(String(n), 10),
3857
+ available: tr(r)
3858
+ } : null;
3859
+ } catch {}
3860
+ return null;
3861
+ }(e), t.details);
3862
+ }));
3863
+ }));
3864
+ }));
3865
+ }));
3866
+ function Kr(e, t, n) {
3867
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3868
+ }
3869
+ var qr = function(e) {
3870
+ return function() {
3871
+ var t = [...arguments];
3872
+ try {
3873
+ return Promise.resolve(e.apply(this, t));
3874
+ } catch (e) {
3875
+ return Promise.reject(e);
3876
+ }
3877
+ };
3878
+ }((function(e, t) {
3879
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { details: r = !1 } = n;
3880
+ return Kr(F(I({
3881
+ url: M(e.remoteURL, j(t)),
3882
+ method: "SEARCH",
3883
+ headers: {
3884
+ Accept: "text/plain,application/xml",
3885
+ "Content-Type": e.headers["Content-Type"] || "application/xml; charset=utf-8"
3886
+ }
3887
+ }, e, n), e), (function(n) {
3888
+ return B(e, n), Kr(n.text(), (function(i) {
3889
+ return Kr(Qn(i, e.parsing), (function(e) {
3890
+ return V(n, function(e, t, n) {
3891
+ let r = {
3892
+ truncated: !1,
3893
+ results: []
3894
+ };
3895
+ 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) => {
3896
+ if (e.propstat === void 0) return;
3897
+ let t = e.href.split("/").map(decodeURIComponent).join("/");
3898
+ r.results.push($n(e.propstat.prop, t, n));
3899
+ })), r;
3900
+ }(e, t, r), r);
3901
+ }));
3902
+ }));
3903
+ }));
3904
+ })), Jr = function(e) {
3905
+ return function() {
3906
+ var t = [...arguments];
3907
+ try {
3908
+ return Promise.resolve(e.apply(this, t));
3909
+ } catch (e) {
3910
+ return Promise.reject(e);
3911
+ }
3912
+ };
3913
+ }((function(e, t, n) {
3914
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = I({
3915
+ url: M(e.remoteURL, j(t)),
3916
+ method: "MOVE",
3917
+ headers: {
3918
+ Destination: M(e.remoteURL, j(n)),
3919
+ Overwrite: !1 === r.overwrite ? "F" : "T"
3920
+ }
3921
+ }, e, r);
3922
+ return o = function(t) {
3923
+ B(e, t);
3924
+ }, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
3925
+ var a, o;
3926
+ })), Yr = k(172);
3927
+ function Xr(e) {
3928
+ if (st(e)) return e.byteLength;
3929
+ if (ct(e)) return e.length;
3930
+ if (typeof e == "string") return (0, Yr.d)(e);
3931
+ throw new A({ info: { code: P.DataTypeNoLength } }, "Cannot calculate data length: Invalid type");
3932
+ }
3933
+ var Zr = function(e) {
3934
+ return function() {
3935
+ var t = [...arguments];
3936
+ try {
3937
+ return Promise.resolve(e.apply(this, t));
3938
+ } catch (e) {
3939
+ return Promise.reject(e);
3940
+ }
3941
+ };
3942
+ }((function(e, t, n) {
3943
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, { contentLength: i = !0, overwrite: a = !0 } = r, o = { "Content-Type": "application/octet-stream" };
3944
+ !1 === i || (o["Content-Length"] = typeof i == "number" ? `${i}` : `${Xr(n)}`), a || (o["If-None-Match"] = "*");
3945
+ let s = I({
3946
+ url: M(e.remoteURL, j(t)),
3947
+ method: "PUT",
3948
+ headers: o,
3949
+ data: n
3950
+ }, e, r);
3951
+ return l = function(t) {
3952
+ try {
3953
+ B(e, t);
3954
+ } catch (e) {
3955
+ let t = e;
3956
+ if (t.status !== 412 || a) throw t;
3957
+ return !1;
3958
+ }
3959
+ return !0;
3960
+ }, (c = F(s, e)) && c.then || (c = Promise.resolve(c)), l ? c.then(l) : c;
3961
+ var c, l;
3962
+ })), Qr = function(e) {
3963
+ return function() {
3964
+ var t = [...arguments];
3965
+ try {
3966
+ return Promise.resolve(e.apply(this, t));
3967
+ } catch (e) {
3968
+ return Promise.reject(e);
3969
+ }
3970
+ };
3971
+ }((function(e, t) {
3972
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = I({
3973
+ url: M(e.remoteURL, j(t)),
3974
+ method: "OPTIONS"
3975
+ }, e, n);
3976
+ return a = function(t) {
3977
+ try {
3978
+ B(e, t);
3979
+ } catch (e) {
3980
+ throw e;
3981
+ }
3982
+ return {
3983
+ compliance: (t.headers.get("DAV") ?? "").split(",").map(((e) => e.trim())),
3984
+ server: t.headers.get("Server") ?? ""
3985
+ };
3986
+ }, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3987
+ var i, a;
3988
+ }));
3989
+ function $r(e, t, n) {
3990
+ return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3991
+ }
3992
+ var ei = ri((function(e, t, n, r, i) {
3993
+ let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
3994
+ if (n > r || n < 0) throw new A({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
3995
+ let o = {
3996
+ "Content-Type": "application/octet-stream",
3997
+ "Content-Length": "" + (r - n + 1),
3998
+ "Content-Range": `bytes ${n}-${r}/*`
3999
+ };
4000
+ return $r(F(I({
4001
+ url: M(e.remoteURL, j(t)),
4002
+ method: "PUT",
4003
+ headers: o,
4004
+ data: i
4005
+ }, e, a), e), (function(t) {
4006
+ B(e, t);
4007
+ }));
4008
+ }));
4009
+ function ti(e, t) {
4010
+ var n = e();
4011
+ return n && n.then ? n.then(t) : t(n);
4012
+ }
4013
+ var ni = ri((function(e, t, n, r, i) {
4014
+ let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
4015
+ if (n > r || n < 0) throw new A({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
4016
+ let o = {
4017
+ "Content-Type": "application/x-sabredav-partialupdate",
4018
+ "Content-Length": "" + (r - n + 1),
4019
+ "X-Update-Range": `bytes=${n}-${r}`
4020
+ };
4021
+ return $r(F(I({
4022
+ url: M(e.remoteURL, j(t)),
4023
+ method: "PATCH",
4024
+ headers: o,
4025
+ data: i
4026
+ }, e, a), e), (function(t) {
4027
+ B(e, t);
4028
+ }));
4029
+ }));
4030
+ function ri(e) {
4031
+ return function() {
4032
+ var t = [...arguments];
4033
+ try {
4034
+ return Promise.resolve(e.apply(this, t));
4035
+ } catch (e) {
4036
+ return Promise.reject(e);
4037
+ }
4038
+ };
4039
+ }
4040
+ var ii = ri((function(e, t, n, r, i) {
4041
+ let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
4042
+ return $r(Qr(e, t, a), (function(o) {
4043
+ let s = !1;
4044
+ return ti((function() {
4045
+ if (o.compliance.includes("sabredav-partialupdate")) return $r(ni(e, t, n, r, i, a), (function(e) {
4046
+ return s = !0, e;
4047
+ }));
4048
+ }), (function(c) {
4049
+ let l = !1;
4050
+ return s ? c : ti((function() {
4051
+ if (o.server.includes("Apache") && o.compliance.includes("<http://apache.org/dav/propset/fs/1>")) return $r(ei(e, t, n, r, i, a), (function(e) {
4052
+ return l = !0, e;
4053
+ }));
4054
+ }), (function(e) {
4055
+ if (l) return e;
4056
+ throw new A({ info: { code: P.NotSupported } }, "Not supported");
4057
+ }));
4058
+ }));
4059
+ }));
4060
+ })), ai = "https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";
4061
+ function oi(e) {
4062
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { authType: n = null, remoteBasePath: r, contactHref: i = ai, ha1: a, headers: o = {}, httpAgent: s, httpsAgent: c, password: l, token: u, username: d, withCredentials: f } = t, p = n;
4063
+ p ||= d || l ? N.Password : N.None;
4064
+ let m = {
4065
+ authType: p,
4066
+ remoteBasePath: r,
4067
+ contactHref: i,
4068
+ ha1: a,
4069
+ headers: Object.assign({}, o),
4070
+ httpAgent: s,
4071
+ httpsAgent: c,
4072
+ password: l,
4073
+ parsing: {
4074
+ attributeNamePrefix: t.attributeNamePrefix ?? "@",
4075
+ attributeParsers: [],
4076
+ tagParsers: [Xn]
4077
+ },
4078
+ remotePath: Ie(e),
4079
+ remoteURL: e,
4080
+ token: u,
4081
+ username: d,
4082
+ withCredentials: f
4083
+ };
4084
+ return qe(m, d, l, u, a), {
4085
+ copyFile: (e, t, n) => nn(m, e, t, n),
4086
+ createDirectory: (e, t) => dr(m, e, t),
4087
+ createReadStream: (e, t) => function(e, t) {
4088
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = new (pr()).PassThrough();
4089
+ return mr(e, t, n).then(((e) => {
4090
+ e.pipe(r);
4091
+ })).catch(((e) => {
4092
+ r.emit("error", e);
4093
+ })), r;
4094
+ }(m, e, t),
4095
+ createWriteStream: (e, t, n) => function(e, t) {
4096
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : hr, i = new (pr()).PassThrough(), a = {};
4097
+ return !1 === n.overwrite && (a["If-None-Match"] = "*"), F(I({
4098
+ url: M(e.remoteURL, j(t)),
4099
+ method: "PUT",
4100
+ headers: a,
4101
+ data: i,
4102
+ maxRedirects: 0
4103
+ }, e, n), e).then(((t) => B(e, t))).then(((e) => {
4104
+ setTimeout((() => {
4105
+ r(e);
4106
+ }), 0);
4107
+ })).catch(((e) => {
4108
+ i.emit("error", e);
4109
+ })), i;
4110
+ }(m, e, t, n),
4111
+ customRequest: (e, t) => gr(m, e, t),
4112
+ deleteFile: (e, t) => _r(m, e, t),
4113
+ exists: (e, t) => vr(m, e, t),
4114
+ getDirectoryContents: (e, t) => br(m, e, t),
4115
+ getFileContents: (e, t) => Tr(m, e, t),
4116
+ getFileDownloadLink: (e) => function(e, t) {
4117
+ let n = M(e.remoteURL, j(t)), r = /^https:/i.test(n) ? "https" : "http";
4118
+ switch (e.authType) {
4119
+ case N.None: break;
4120
+ case N.Password: {
4121
+ let t = Ue(e.headers.Authorization.replace(/^Basic /i, "").trim());
4122
+ n = n.replace(/^https?:\/\//, `${r}://${t}@`);
4123
+ break;
4124
+ }
4125
+ default: throw new A({ info: { code: P.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${e.authType}`);
4126
+ }
4127
+ return n;
4128
+ }(m, e),
4129
+ getFileUploadLink: (e) => function(e, t) {
4130
+ let n = `${M(e.remoteURL, j(t))}?Content-Type=application/octet-stream`, r = /^https:/i.test(n) ? "https" : "http";
4131
+ switch (e.authType) {
4132
+ case N.None: break;
4133
+ case N.Password: {
4134
+ let t = Ue(e.headers.Authorization.replace(/^Basic /i, "").trim());
4135
+ n = n.replace(/^https?:\/\//, `${r}://${t}@`);
4136
+ break;
4137
+ }
4138
+ default: throw new A({ info: { code: P.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${e.authType}`);
4139
+ }
4140
+ return n;
4141
+ }(m, e),
4142
+ getHeaders: () => Object.assign({}, m.headers),
4143
+ getQuota: (e) => Gr(m, e),
4144
+ lock: (e, t) => Hr(m, e, t),
4145
+ moveFile: (e, t, n) => Jr(m, e, t, n),
4146
+ putFileContents: (e, t, n) => Zr(m, e, t, n),
4147
+ partialUpdateFileContents: (e, t, n, r, i) => ii(m, e, t, n, r, i),
4148
+ getDAVCompliance: (e) => Qr(m, e),
4149
+ search: (e, t) => qr(m, e, t),
4150
+ setHeaders: (e) => {
4151
+ m.headers = Object.assign({}, e);
4152
+ },
4153
+ stat: (e, t) => rr(m, e, t),
4154
+ unlock: (e, t, n) => Vr(m, e, t, n),
4155
+ registerAttributeParser: (e) => {
4156
+ m.parsing.attributeParsers.push(e);
4157
+ },
4158
+ registerTagParser: (e) => {
4159
+ m.parsing.tagParsers.push(e);
4160
+ }
4161
+ };
4162
+ }
4163
+ //#endregion
4164
+ //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/stringify.js
4165
+ var $ = [];
4166
+ for (let e = 0; e < 256; ++e) $.push((e + 256).toString(16).slice(1));
4167
+ function si(e, t = 0) {
4168
+ 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();
4169
+ }
4170
+ //#endregion
4171
+ //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/rng.js
4172
+ var ci = new Uint8Array(16);
4173
+ function li() {
4174
+ return crypto.getRandomValues(ci);
4175
+ }
4176
+ //#endregion
4177
+ //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v4.js
4178
+ function ui(e, t, n) {
4179
+ return !t && !e && crypto.randomUUID ? crypto.randomUUID() : di(e, t, n);
4180
+ }
4181
+ function di(e, t, n) {
4182
+ e ||= {};
4183
+ let r = e.random ?? e.rng?.() ?? li();
4184
+ if (r.length < 16) throw Error("Random bytes length must be >= 16");
4185
+ if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
4186
+ if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
4187
+ for (let e = 0; e < 16; ++e) t[n + e] = r[e];
4188
+ return t;
4189
+ }
4190
+ return si(r);
4191
+ }
4192
+ //#endregion
4193
+ //#region src/webdav/client/builders.ts
4194
+ var fi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includes(e) ? [e, n || ""] : [o.DavNamespace.includes(e) ? `d:${e}` : `oc:${e}`, n || ""])), pi = (e = [], { pattern: t, filterRules: n, limit: r = 0, extraProps: i = [] }) => {
4195
+ let a = "d:propfind";
4196
+ t && (a = "oc:search-files"), n && (a = "oc:filter-files");
4197
+ let o = fi(e.reduce((e, t) => Object.assign(e, { [t]: null }), {}), i), s = { [a]: {
4198
+ "d:prop": o,
4199
+ "@@xmlns:d": "DAV:",
4200
+ "@@xmlns:oc": "http://owncloud.org/ns",
4201
+ ...t && { "oc:search": {
4202
+ "oc:pattern": t,
4203
+ "oc:limit": r
4204
+ } },
4205
+ ...n && { "oc:filter-rules": fi(n, []) }
4206
+ } };
4207
+ return new ce({
4208
+ format: !0,
4209
+ ignoreAttributes: !1,
4210
+ attributeNamePrefix: "@@",
4211
+ suppressEmptyNode: !0
4212
+ }).build(s);
4213
+ }, mi = (e) => {
4214
+ let t = { "d:propertyupdate": {
4215
+ "d:set": { "d:prop": fi(e, []) },
4216
+ "@@xmlns:d": "DAV:",
4217
+ "@@xmlns:oc": "http://owncloud.org/ns"
4218
+ } };
4219
+ return new ce({
4220
+ format: !0,
4221
+ ignoreAttributes: !1,
4222
+ attributeNamePrefix: "@@",
4223
+ suppressEmptyNode: !0
4224
+ }).build(t);
4225
+ }, hi = (e) => {
4226
+ let t = {}, n = e.get("tus-version");
4227
+ 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;
4228
+ }, gi = async (e) => {
4229
+ let t = (e) => {
4230
+ let t = decodeURIComponent(e);
4231
+ return e?.startsWith("/remote.php/dav/") ? i(t.replace("/remote.php/dav/", ""), {
4232
+ leadingSlash: !0,
4233
+ trailingSlash: !1
4234
+ }) : t;
4235
+ };
4236
+ return (await Qn(e)).multistatus.response.map(({ href: e, propstat: n }) => {
4237
+ let r = {
4238
+ ...$n(n.prop, t(e), !0),
4239
+ processing: n.status === "HTTP/1.1 425 TOO EARLY"
4240
+ };
4241
+ return r.props.name && (r.props.name = r.props.name.toString()), r;
4242
+ });
4243
+ }, _i = (e) => {
4244
+ let t = new g(), n = {
4245
+ message: "Unknown error",
4246
+ errorCode: void 0
4247
+ };
4248
+ try {
4249
+ let r = t.parse(e);
4250
+ if (!r["d:error"]) return n;
4251
+ if (r["d:error"]["s:message"]) {
4252
+ let e = r["d:error"]["s:message"];
4253
+ typeof e == "string" && (n.message = e);
4254
+ }
4255
+ if (r["d:error"]["s:errorcode"]) {
4256
+ let e = r["d:error"]["s:errorcode"];
4257
+ typeof e == "string" && (n.errorCode = e);
4258
+ }
4259
+ } catch {
4260
+ return n;
4261
+ }
4262
+ return n;
4263
+ }, vi = class {
4264
+ client;
4265
+ davPath;
4266
+ headers;
4267
+ extraProps;
4268
+ constructor({ baseUrl: e, headers: t }) {
4269
+ this.davPath = i(e, "remote.php/dav"), this.client = oi(this.davPath, {}), this.headers = t, this.extraProps = [];
4270
+ }
4271
+ mkcol(e, t = {}) {
4272
+ return this.request(e, {
4273
+ method: u.mkcol,
4274
+ ...t
4275
+ });
4276
+ }
4277
+ async propfind(e, { depth: t = 1, properties: n = [], headers: r = {}, ...i } = {}) {
4278
+ let a = {
4279
+ ...r,
4280
+ Depth: t.toString()
4281
+ }, { body: o, result: s } = await this.request(e, {
4282
+ method: u.propfind,
4283
+ data: pi(n, { extraProps: this.extraProps }),
4284
+ headers: a,
4285
+ ...i
4286
+ });
4287
+ return o?.length && (o[0].tusSupport = hi(s.headers)), o;
4288
+ }
4289
+ async report(e, { pattern: t = "", filterRules: n = null, limit: r = 30, properties: i, ...a } = {}) {
4290
+ let { body: o, result: s } = await this.request(e, {
4291
+ method: u.report,
4292
+ data: pi(i, {
4293
+ pattern: t,
4294
+ filterRules: n,
4295
+ limit: r,
4296
+ extraProps: this.extraProps
4297
+ }),
4298
+ ...a
4299
+ });
4300
+ return {
4301
+ results: o,
4302
+ range: s.headers.get("content-range")
4303
+ };
4304
+ }
4305
+ copy(e, t, { overwrite: n = !1, headers: r = {}, ...a } = {}) {
4306
+ let o = i(this.davPath, y(t));
4307
+ return this.request(e, {
4308
+ method: u.copy,
4309
+ headers: {
4310
+ ...r,
4311
+ Destination: o,
4312
+ overwrite: n ? "T" : "F"
4313
+ },
4314
+ ...a
4315
+ });
4316
+ }
4317
+ move(e, t, { overwrite: n = !1, headers: r = {}, ...a } = {}) {
4318
+ let o = i(this.davPath, y(t));
4319
+ return this.request(e, {
4320
+ method: u.move,
4321
+ headers: {
4322
+ ...r,
4323
+ Destination: o,
4324
+ overwrite: n ? "T" : "F"
4325
+ },
4326
+ ...a
4327
+ });
4328
+ }
4329
+ put(e, t, { headers: n = {}, onUploadProgress: r, previousEntityTag: i, overwrite: a, ...o } = {}) {
4330
+ let s = { ...n };
4331
+ return i ? s["If-Match"] = i : a || (s["If-None-Match"] = "*"), this.request(e, {
4332
+ method: u.put,
4333
+ data: t,
4334
+ headers: s,
4335
+ onUploadProgress: r,
4336
+ ...o
4337
+ });
4338
+ }
4339
+ delete(e, t = {}) {
4340
+ return this.request(e, {
4341
+ method: u.delete,
4342
+ ...t
4343
+ });
4344
+ }
4345
+ propPatch(e, t, n = {}) {
4346
+ let r = mi(t);
4347
+ return this.request(e, {
4348
+ method: u.proppatch,
4349
+ data: r,
4350
+ ...n
4351
+ });
4352
+ }
4353
+ getFileUrl(e) {
4354
+ return i(this.davPath, y(e));
4355
+ }
4356
+ buildHeaders(e = {}) {
4357
+ return {
4358
+ "Content-Type": "application/xml; charset=utf-8",
4359
+ "X-Requested-With": "XMLHttpRequest",
4360
+ "X-Request-ID": ui(),
4361
+ ...this.headers && { ...this.headers() },
4362
+ ...e
4363
+ };
4364
+ }
4365
+ async request(e, t) {
4366
+ let n = i(this.davPath, y(e), { leadingSlash: !0 }), r = {
4367
+ ...t,
4368
+ url: n,
4369
+ headers: this.buildHeaders(t.headers || {})
4370
+ };
4371
+ try {
4372
+ let e = await this.client.customRequest("", r), t;
4373
+ return e.status === 207 && (t = await gi(await e.text())), {
4374
+ body: t,
4375
+ status: e.status,
4376
+ result: e
4377
+ };
4378
+ } catch (e) {
4379
+ let { response: t } = e, n = _i(await t.text());
4380
+ throw new d(n.message, n.errorCode, t, t.status);
4381
+ }
4382
+ }
4383
+ }, yi = (e, t) => ({ async listFileVersions(t, n = {}) {
4384
+ let [r, ...a] = await e.propfind(i("meta", t, "v", { leadingSlash: !0 }), n);
4385
+ return a.map((t) => c(t, e.extraProps));
4386
+ } }), bi = (e, t) => ({ setFavorite(t, { path: n }, r, a = {}) {
4387
+ let o = { [m.IsFavorite]: r ? "true" : "false" };
4388
+ return e.propPatch(i(t.webDavPath, n), o, a);
4389
+ } }), xi = (e, t) => {
4390
+ let r = n.create();
4391
+ t && r.interceptors.request.use((e) => (Object.assign(e.headers, t()), e));
4392
+ let i = {
4393
+ axiosClient: r,
4394
+ baseUrl: e,
4395
+ headers: t
4396
+ }, a = new vi({
4397
+ baseUrl: e,
4398
+ headers: t
4399
+ }), o = (e) => {
4400
+ a.extraProps.push(e);
4401
+ }, s = Ce(a, i), { getPathForFileId: c } = s, l = he(a, s, i), { listFiles: u } = l, d = fe(l, i), { getFileInfo: f } = d, { createFolder: p } = ue(a, d, i), m = de(a, i), { getFileContents: h } = m, { putFileContents: g } = _e(a, d, i), { getFileUrl: _, revokeUrl: v } = pe(a, m, d, i), { getPublicFileUrl: y } = me(a, i), { copyFiles: b } = le(a, i), { moveFiles: x } = ge(a, i), { deleteFile: S } = ve(a, i), { restoreFile: ee } = ye(a, i), { listFileVersions: te } = yi(a, i), { restoreFileVersion: ne } = be(a, i), { clearTrashBin: re } = xe(a, i), { search: C } = Se(a, i), { setFavorite: ie } = bi(a, i);
4402
+ return {
4403
+ copyFiles: b,
4404
+ createFolder: p,
4405
+ deleteFile: S,
4406
+ restoreFile: ee,
4407
+ restoreFileVersion: ne,
4408
+ getFileContents: h,
4409
+ getFileInfo: f,
4410
+ getFileUrl: _,
4411
+ getPublicFileUrl: y,
4412
+ getPathForFileId: c,
4413
+ listFiles: u,
4414
+ listFileVersions: te,
4415
+ moveFiles: x,
4416
+ putFileContents: g,
4417
+ revokeUrl: v,
4418
+ clearTrashBin: re,
4419
+ search: C,
4420
+ setFavorite: ie,
4421
+ registerExtraProp: o
4422
+ };
4423
+ };
4424
+ //#endregion
4425
+ export { y as n, xi as t };