@opencloud-eu/web-client 7.0.0 → 7.0.1

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.
@@ -1,119 +1,151 @@
1
- import { n as e, r as t, t as n } from "./axios-DAxu7d04.js";
2
- import { n as r } from "./dist-CSYfvE5O.js";
3
- import { u as i } from "./toString-9BJo4tor.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-BuCcZhiF.js";
5
- import { i as h, n as g, r as _, t as v } from "./ocs-BX4C1k3k.js";
1
+ import { n as e, r as t, t as n } from "./axios-BAw8OjE9.js";
2
+ import { n as r } from "./dist-D0YulRs6.js";
3
+ import { u as i } from "./toString-DkamdJp-.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-DHmgNO5B.js";
5
+ import { a as h, i as g, n as _, r as v, t as y } from "./ocs-BXaLGcUt.js";
6
6
  //#region src/utils/encodePath.ts
7
- var y = (e) => encodeURIComponent(e).split("%2F").join("/"), b = "\n";
8
- function x(e, t) {
7
+ var b = (e) => encodeURIComponent(e).split("%2F").join("/");
8
+ //#endregion
9
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.2.0/node_modules/fast-xml-builder/src/util.js
10
+ function x(e) {
11
+ return String(e).replace(/--/g, "- -").replace(/--/g, "- -").replace(/-$/, "- ");
12
+ }
13
+ function S(e) {
14
+ return String(e).replace(/\]\]>/g, "]]]]><![CDATA[>");
15
+ }
16
+ function C(e) {
17
+ return String(e).replace(/"/g, "&quot;").replace(/'/g, "&apos;");
18
+ }
19
+ //#endregion
20
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.2.0/node_modules/fast-xml-builder/src/orderedJs2Xml.js
21
+ var ee = "\n";
22
+ function te(e, t) {
23
+ if (!Array.isArray(e) || e.length === 0) return "1.0";
24
+ let n = e[0];
25
+ if (oe(n) === "?xml") {
26
+ let e = n[":@"];
27
+ if (e) {
28
+ let n = t.attributeNamePrefix + "version";
29
+ if (e[n]) return e[n];
30
+ }
31
+ }
32
+ return "1.0";
33
+ }
34
+ function ne(e, t, n, r, i) {
35
+ return !n.sanitizeName || h(e, { xmlVersion: i }) ? e : n.sanitizeName(e, {
36
+ isAttribute: t,
37
+ matcher: r.readOnly()
38
+ });
39
+ }
40
+ function re(e, t) {
9
41
  let n = "";
10
- t.format && t.indentBy.length > 0 && (n = b);
42
+ t.format && (n = ee);
11
43
  let r = [];
12
44
  if (t.stopNodes && Array.isArray(t.stopNodes)) for (let e = 0; e < t.stopNodes.length; e++) {
13
45
  let n = t.stopNodes[e];
14
- typeof n == "string" ? r.push(new h(n)) : n instanceof h && r.push(n);
46
+ typeof n == "string" ? r.push(new g(n)) : n instanceof g && r.push(n);
15
47
  }
16
- let i = new _();
17
- return S(e, t, n, i, r);
48
+ let i = te(e, t), a = new v();
49
+ return ie(e, t, n, a, r, i);
18
50
  }
19
- function S(e, t, n, r, i) {
20
- let a = "", o = !1;
51
+ function ie(e, t, n, r, i, a) {
52
+ let o = "", s = !1;
21
53
  if (t.maxNestedTags && r.getDepth() > t.maxNestedTags) throw Error("Maximum nested tags exceeded");
22
54
  if (!Array.isArray(e)) {
23
55
  if (e != null) {
24
56
  let n = e.toString();
25
- return n = w(n, t), n;
57
+ return n = ce(n, t), n;
26
58
  }
27
59
  return "";
28
60
  }
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();
61
+ for (let c = 0; c < e.length; c++) {
62
+ let l = e[c], u = oe(l);
63
+ if (u === void 0) continue;
64
+ let d = u === t.textNodeName || u === t.cdataPropName || u === t.commentPropName || u[0] === "?" ? u : ne(u, !1, t, r, a), f = w(l[":@"], t);
65
+ r.push(d, f);
66
+ let p = se(r, i);
67
+ if (d === t.textNodeName) {
68
+ let e = l[u];
69
+ p || (e = t.tagValueProcessor(d, e), e = ce(e, t)), s && (o += n), o += e, s = !1, r.pop();
38
70
  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();
71
+ } else if (d === t.cdataPropName) {
72
+ s && (o += n);
73
+ let e = l[u][0][t.textNodeName], i = S(e);
74
+ o += `<![CDATA[${i}]]>`, s = !1, r.pop();
43
75
  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();
76
+ } else if (d === t.commentPropName) {
77
+ let e = l[u][0][t.textNodeName], i = x(e);
78
+ o += n + `<!--${i}-->`, s = !0, r.pop();
47
79
  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();
80
+ } else if (d[0] === "?") {
81
+ let e = E(l[":@"], t, p, r, a);
82
+ o += (d === "?xml" ? "" : n) + `<${d}${e}?>`, s = !0, r.pop();
51
83
  continue;
52
84
  }
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();
85
+ let m = n;
86
+ m !== "" && (m += t.indentBy);
87
+ let h = n + `<${d}${E(l[":@"], t, p, r, a)}`, g;
88
+ g = p ? T(l[u], t) : ie(l[u], t, m, r, i, a), t.unpairedTags.indexOf(d) === -1 ? (!g || g.length === 0) && t.suppressEmptyNode ? o += h + "/>" : g && g.endsWith(">") ? o += h + `>${g}${n}</${d}>` : (o += h + ">", g && n !== "" && (g.includes("/>") || g.includes("</")) ? o += n + t.indentBy + g + n : o += g, o += `</${d}>`) : t.suppressUnpairedNode ? o += h + ">" : o += h + "/>", s = !0, r.pop();
57
89
  }
58
- return a;
90
+ return o;
59
91
  }
60
- function ee(e, t) {
92
+ function w(e, t) {
61
93
  if (!e || t.ignoreAttributes) return null;
62
94
  let n = {}, r = !1;
63
95
  for (let i in e) {
64
96
  if (!Object.prototype.hasOwnProperty.call(e, i)) continue;
65
97
  let a = i.startsWith(t.attributeNamePrefix) ? i.substr(t.attributeNamePrefix.length) : i;
66
- n[a] = e[i], r = !0;
98
+ n[a] = C(e[i]), r = !0;
67
99
  }
68
100
  return r ? n : null;
69
101
  }
70
- function te(e, t) {
102
+ function T(e, t) {
71
103
  if (!Array.isArray(e)) return e == null ? "" : e.toString();
72
104
  let n = "";
73
105
  for (let r = 0; r < e.length; r++) {
74
- let i = e[r], a = re(i);
106
+ let i = e[r], a = oe(i);
75
107
  if (a === t.textNodeName) n += i[a];
76
108
  else if (a === t.cdataPropName) n += i[a][0][t.textNodeName];
77
109
  else if (a === t.commentPropName) n += i[a][0][t.textNodeName];
78
110
  else if (a && a[0] === "?") continue;
79
111
  else if (a) {
80
- let e = ne(i[":@"], t), r = te(i[a], t);
112
+ let e = ae(i[":@"], t), r = T(i[a], t);
81
113
  !r || r.length === 0 ? n += `<${a}${e}/>` : n += `<${a}${e}>${r}</${a}>`;
82
114
  }
83
115
  }
84
116
  return n;
85
117
  }
86
- function ne(e, t) {
118
+ function ae(e, t) {
87
119
  let n = "";
88
120
  if (e && !t.ignoreAttributes) for (let r in e) {
89
121
  if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
90
122
  let i = e[r];
91
- i === !0 && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${i}"`;
123
+ i === !0 && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${C(i)}"`;
92
124
  }
93
125
  return n;
94
126
  }
95
- function re(e) {
127
+ function oe(e) {
96
128
  let t = Object.keys(e);
97
129
  for (let n = 0; n < t.length; n++) {
98
130
  let r = t[n];
99
131
  if (Object.prototype.hasOwnProperty.call(e, r) && r !== ":@") return r;
100
132
  }
101
133
  }
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}"`;
134
+ function E(e, t, n, r, i) {
135
+ let a = "";
136
+ if (e && !t.ignoreAttributes) for (let o in e) {
137
+ if (!Object.prototype.hasOwnProperty.call(e, o)) continue;
138
+ let s = o.substr(t.attributeNamePrefix.length), c = n ? s : ne(s, !0, t, r, i), l;
139
+ n ? l = e[o] : (l = t.attributeValueProcessor(o, e[o]), l = ce(l, t)), l === !0 && t.suppressBooleanAttributes ? a += ` ${c}` : a += ` ${c}="${C(l)}"`;
108
140
  }
109
- return r;
141
+ return a;
110
142
  }
111
- function ie(e, t) {
143
+ function se(e, t) {
112
144
  if (!t || t.length === 0) return !1;
113
145
  for (let n = 0; n < t.length; n++) if (e.matches(t[n])) return !0;
114
146
  return !1;
115
147
  }
116
- function w(e, t) {
148
+ function ce(e, t) {
117
149
  if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
118
150
  let r = t.entities[n];
119
151
  e = e.replace(r.regex, r.val);
@@ -121,15 +153,15 @@ function w(e, t) {
121
153
  return e;
122
154
  }
123
155
  //#endregion
124
- //#region ../../node_modules/.pnpm/fast-xml-builder@1.1.5/node_modules/fast-xml-builder/src/ignoreAttributes.js
125
- function T(e) {
156
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.2.0/node_modules/fast-xml-builder/src/ignoreAttributes.js
157
+ function le(e) {
126
158
  return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
127
159
  for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
128
160
  } : () => !1;
129
161
  }
130
162
  //#endregion
131
- //#region ../../node_modules/.pnpm/fast-xml-builder@1.1.5/node_modules/fast-xml-builder/src/fxb.js
132
- var ae = {
163
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.2.0/node_modules/fast-xml-builder/src/fxb.js
164
+ var ue = {
133
165
  attributeNamePrefix: "@_",
134
166
  attributesGroupName: !1,
135
167
  textNodeName: "#text",
@@ -175,91 +207,119 @@ var ae = {
175
207
  stopNodes: [],
176
208
  oneListGroup: !1,
177
209
  maxNestedTags: 100,
178
- jPath: !0
210
+ jPath: !0,
211
+ sanitizeName: !1
179
212
  };
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++) {
213
+ function D(e) {
214
+ if (this.options = Object.assign({}, ue, 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
215
  let t = this.options.stopNodes[e];
183
- typeof t == "string" ? this.stopNodeExpressions.push(new h(t)) : t instanceof h && this.stopNodeExpressions.push(t);
216
+ typeof t == "string" ? this.stopNodeExpressions.push(new g(t)) : t instanceof g && this.stopNodeExpressions.push(t);
184
217
  }
185
218
  this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
186
219
  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() {
220
+ } : (this.ignoreAttributesFn = le(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = he), this.processTextOrObjNode = pe, this.options.format ? (this.indentate = me, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
188
221
  return "";
189
222
  }, this.tagEndChar = ">", this.newLine = "");
190
223
  }
191
- E.prototype.build = function(e) {
192
- if (this.options.preserveOrder) return x(e, this.options);
224
+ function de(e, t) {
225
+ let n = e["?xml"];
226
+ if (n && typeof n == "object") {
227
+ if (t.attributesGroupName && n[t.attributesGroupName]) {
228
+ let e = n[t.attributesGroupName][t.attributeNamePrefix + "version"];
229
+ if (e) return e;
230
+ }
231
+ let e = n[t.attributeNamePrefix + "version"];
232
+ if (e) return e;
233
+ }
234
+ return "1.0";
235
+ }
236
+ function fe(e, t, n, r, i) {
237
+ return !n.sanitizeName || h(e, { xmlVersion: i }) ? e : n.sanitizeName(e, {
238
+ isAttribute: t,
239
+ matcher: r.readOnly()
240
+ });
241
+ }
242
+ D.prototype.build = function(e) {
243
+ if (this.options.preserveOrder) return re(e, this.options);
193
244
  {
194
245
  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;
246
+ let t = new v(), n = de(e, this.options);
247
+ return this.j2x(e, 0, t, n).val;
197
248
  }
198
- }, E.prototype.j2x = function(e, t, n) {
199
- let r = "", i = "";
249
+ }, D.prototype.j2x = function(e, t, n, r) {
250
+ let i = "", a = "";
200
251
  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;
252
+ let o = this.options.jPath ? n.toString() : n, s = this.checkStopNode(n);
253
+ for (let c in e) {
254
+ if (!Object.prototype.hasOwnProperty.call(e, c)) continue;
255
+ let l = c === this.options.textNodeName || c === this.options.cdataPropName || c === this.options.commentPropName || this.options.attributesGroupName && c === this.options.attributesGroupName || this.isAttribute(c) || c[0] === "?" ? c : fe(c, !1, this.options, n, r);
256
+ if (e[c] === void 0) this.isAttribute(c) && (a += "");
257
+ else if (e[c] === null) this.isAttribute(c) || l === this.options.cdataPropName || l === this.options.commentPropName ? a += "" : l[0] === "?" ? a += this.indentate(t) + "<" + l + "?" + this.tagEndChar : a += this.indentate(t) + "<" + l + "/" + this.tagEndChar;
258
+ else if (e[c] instanceof Date) a += this.buildTextValNode(e[c], l, "", t, n);
259
+ else if (typeof e[c] != "object") {
260
+ let u = this.isAttribute(c);
261
+ if (u && !this.ignoreAttributesFn(u, o)) {
262
+ let t = fe(u, !0, this.options, n, r);
263
+ i += this.buildAttrPairStr(t, "" + e[c], s);
264
+ } else if (!u) if (c === this.options.textNodeName) {
265
+ let t = this.options.tagValueProcessor(c, "" + e[c]);
266
+ a += this.replaceEntitiesValue(t);
232
267
  } 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);
268
+ n.push(l);
269
+ let r = this.checkStopNode(n);
270
+ if (n.pop(), r) {
271
+ let n = "" + e[c];
272
+ n === "" ? a += this.indentate(t) + "<" + l + this.closeTag(l) + this.tagEndChar : a += this.indentate(t) + "<" + l + ">" + n + "</" + l + this.tagEndChar;
273
+ } else a += this.buildTextValNode(e[c], l, "", t, n);
239
274
  }
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);
275
+ } else if (Array.isArray(e[c])) {
276
+ let i = e[c].length, o = "", s = "";
277
+ for (let u = 0; u < i; u++) {
278
+ let i = e[c][u];
279
+ if (i !== void 0) if (i === null) l[0] === "?" ? a += this.indentate(t) + "<" + l + "?" + this.tagEndChar : a += this.indentate(t) + "<" + l + "/" + this.tagEndChar;
280
+ else if (typeof i == "object") if (this.options.oneListGroup) {
281
+ n.push(l);
282
+ let e = this.j2x(i, t + 1, n, r);
283
+ n.pop(), o += e.val, this.options.attributesGroupName && i.hasOwnProperty(this.options.attributesGroupName) && (s += e.attrStr);
284
+ } else o += this.processTextOrObjNode(i, l, t, n, r);
285
+ else if (this.options.oneListGroup) {
286
+ let e = this.options.tagValueProcessor(l, i);
287
+ e = this.replaceEntitiesValue(e), o += e;
288
+ } else {
289
+ n.push(l);
290
+ let e = this.checkStopNode(n);
291
+ if (n.pop(), e) {
292
+ let e = "" + i;
293
+ e === "" ? o += this.indentate(t) + "<" + l + this.closeTag(l) + this.tagEndChar : o += this.indentate(t) + "<" + l + ">" + e + "</" + l + this.tagEndChar;
294
+ } else o += this.buildTextValNode(i, l, "", t, n);
295
+ }
296
+ }
297
+ this.options.oneListGroup && (o = this.buildObjectNode(o, l, s, t)), a += o;
298
+ } else if (this.options.attributesGroupName && c === this.options.attributesGroupName) {
299
+ let t = Object.keys(e[c]), a = t.length;
300
+ for (let o = 0; o < a; o++) {
301
+ let a = fe(t[o], !0, this.options, n, r);
302
+ i += this.buildAttrPairStr(a, "" + e[c][t[o]], s);
303
+ }
304
+ } else a += this.processTextOrObjNode(e[c], l, t, n, r);
305
+ }
246
306
  return {
247
- attrStr: r,
248
- val: i
307
+ attrStr: i,
308
+ val: a
249
309
  };
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 + "\"";
310
+ }, D.prototype.buildAttrPairStr = function(e, t, n) {
311
+ return n || (t = this.options.attributeValueProcessor(e, "" + t), t = this.replaceEntitiesValue(t)), this.options.suppressBooleanAttributes && t === "true" ? " " + e : " " + e + "=\"" + C(t) + "\"";
252
312
  };
253
- function D(e, t, n, r) {
254
- let i = this.extractAttributes(e);
255
- if (r.push(t, i), this.checkStopNode(r)) {
313
+ function pe(e, t, n, r, i) {
314
+ let a = this.extractAttributes(e);
315
+ if (r.push(t, a), this.checkStopNode(r)) {
256
316
  let i = this.buildRawContent(e), a = this.buildAttributesForStopNode(e);
257
317
  return r.pop(), this.buildObjectNode(i, t, a, n);
258
318
  }
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);
319
+ let o = this.j2x(e, n + 1, r, i);
320
+ return r.pop(), t[0] === "?" ? this.buildTextValNode("", t, o.attrStr, n, r) : e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, o.attrStr, n, r) : this.buildObjectNode(o.val, t, o.attrStr, n);
261
321
  }
262
- E.prototype.extractAttributes = function(e) {
322
+ D.prototype.extractAttributes = function(e) {
263
323
  if (!e || typeof e != "object") return null;
264
324
  let t = {}, n = !1;
265
325
  if (this.options.attributesGroupName && e[this.options.attributesGroupName]) {
@@ -267,15 +327,15 @@ E.prototype.extractAttributes = function(e) {
267
327
  for (let e in r) {
268
328
  if (!Object.prototype.hasOwnProperty.call(r, e)) continue;
269
329
  let i = e.startsWith(this.options.attributeNamePrefix) ? e.substring(this.options.attributeNamePrefix.length) : e;
270
- t[i] = r[e], n = !0;
330
+ t[i] = C(r[e]), n = !0;
271
331
  }
272
332
  } else for (let r in e) {
273
333
  if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
274
334
  let i = this.isAttribute(r);
275
- i && (t[i] = e[r], n = !0);
335
+ i && (t[i] = C(e[r]), n = !0);
276
336
  }
277
337
  return n ? t : null;
278
- }, E.prototype.buildRawContent = function(e) {
338
+ }, D.prototype.buildRawContent = function(e) {
279
339
  if (typeof e == "string") return e;
280
340
  if (typeof e != "object" || !e) return String(e);
281
341
  if (e[this.options.textNodeName] !== void 0) return e[this.options.textNodeName];
@@ -296,7 +356,7 @@ E.prototype.extractAttributes = function(e) {
296
356
  } else t += `<${n}>${r}</${n}>`;
297
357
  }
298
358
  return t;
299
- }, E.prototype.buildAttributesForStopNode = function(e) {
359
+ }, D.prototype.buildAttributesForStopNode = function(e) {
300
360
  if (!e || typeof e != "object") return "";
301
361
  let t = "";
302
362
  if (this.options.attributesGroupName && e[this.options.attributesGroupName]) {
@@ -315,54 +375,55 @@ E.prototype.extractAttributes = function(e) {
315
375
  }
316
376
  }
317
377
  return t;
318
- }, E.prototype.buildObjectNode = function(e, t, n, r) {
378
+ }, D.prototype.buildObjectNode = function(e, t, n, r) {
319
379
  if (e === "") return t[0] === "?" ? this.indentate(r) + "<" + t + n + "?" + this.tagEndChar : this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
380
+ if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
320
381
  {
321
382
  let i = "</" + t + this.tagEndChar, a = "";
322
383
  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
384
  }
324
- }, E.prototype.closeTag = function(e) {
385
+ }, D.prototype.closeTag = function(e) {
325
386
  let t = "";
326
387
  return this.options.unpairedTags.indexOf(e) === -1 ? t = this.options.suppressEmptyNode ? "/" : `></${e}` : this.options.suppressUnpairedNode || (t = "/"), t;
327
- }, E.prototype.checkStopNode = function(e) {
388
+ }, D.prototype.checkStopNode = function(e) {
328
389
  if (!this.stopNodeExpressions || this.stopNodeExpressions.length === 0) return !1;
329
390
  for (let t = 0; t < this.stopNodeExpressions.length; t++) if (e.matches(this.stopNodeExpressions[t])) return !0;
330
391
  return !1;
331
- }, E.prototype.buildTextValNode = function(e, t, n, r, i) {
392
+ }, D.prototype.buildTextValNode = function(e, t, n, r, i) {
332
393
  if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName) {
333
- let t = String(e).replace(/\]\]>/g, "]]]]><![CDATA[>");
394
+ let t = S(e);
334
395
  return this.indentate(r) + `<![CDATA[${t}]]>` + this.newLine;
335
396
  } else if (this.options.commentPropName !== !1 && t === this.options.commentPropName) {
336
- let t = String(e).replace(/--/g, "- -").replace(/-$/, "- ");
397
+ let t = x(e);
337
398
  return this.indentate(r) + `<!--${t}-->` + this.newLine;
338
399
  } else if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
339
400
  else {
340
401
  let i = this.options.tagValueProcessor(t, e);
341
402
  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
403
  }
343
- }, E.prototype.replaceEntitiesValue = function(e) {
404
+ }, D.prototype.replaceEntitiesValue = function(e) {
344
405
  if (e && e.length > 0 && this.options.processEntities) for (let t = 0; t < this.options.entities.length; t++) {
345
406
  let n = this.options.entities[t];
346
407
  e = e.replace(n.regex, n.val);
347
408
  }
348
409
  return e;
349
410
  };
350
- function oe(e) {
411
+ function me(e) {
351
412
  return this.options.indentBy.repeat(e);
352
413
  }
353
- function se(e) {
414
+ function he(e) {
354
415
  return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;
355
416
  }
356
417
  //#endregion
357
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.7.2/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js
358
- var ce = E, O = (e, { fileId: t, path: n, name: r }) => {
418
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.8.0/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js
419
+ var ge = D, O = (e, { fileId: t, path: n, name: r }) => {
359
420
  if (n !== void 0) return i(e.webDavPath, n);
360
421
  if (t !== void 0) {
361
422
  if (a(e)) throw Error("public spaces need a path provided");
362
423
  return i("spaces", t, r || "");
363
424
  }
364
425
  return e.webDavPath;
365
- }, le = (e, t) => ({ copyFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
426
+ }, _e = (e, t) => ({ copyFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
366
427
  let u = O(t, {
367
428
  fileId: r,
368
429
  path: n
@@ -375,14 +436,14 @@ var ce = E, O = (e, { fileId: t, path: n, name: r }) => {
375
436
  overwrite: c || !1,
376
437
  ...l
377
438
  });
378
- } }), ue = (e, t, n) => ({ async createFolder(n, { path: r, parentFolderId: i, folderName: a, fetchFolder: o = !0, ...s }) {
439
+ } }), ve = (e, t, n) => ({ async createFolder(n, { path: r, parentFolderId: i, folderName: a, fetchFolder: o = !0, ...s }) {
379
440
  let c = O(n, {
380
441
  fileId: i,
381
442
  path: r,
382
443
  name: a
383
444
  });
384
445
  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 } = {}) {
446
+ } }), ye = (e, { axiosClient: t }) => ({ async getFileContents(n, { fileId: r, path: i }, { responseType: a = "text", noCache: o = !0, headers: s, ...c } = {}) {
386
447
  try {
387
448
  let l = O(n, {
388
449
  fileId: r,
@@ -408,12 +469,12 @@ var ce = E, O = (e, { fileId: t, path: n, name: r }) => {
408
469
  let { message: t, response: n } = e;
409
470
  throw new l(t, n, n.status);
410
471
  }
411
- } }), fe = (e, t) => ({ async getFileInfo(t, n, r) {
472
+ } }), be = (e, t) => ({ async getFileInfo(t, n, r) {
412
473
  return (await e.listFiles(t, n, {
413
474
  depth: 0,
414
475
  ...r
415
476
  })).resource;
416
- } }), pe = (e, t, n, { axiosClient: r, baseUrl: a }) => ({
477
+ } }), xe = (e, t, n, { axiosClient: r, baseUrl: a }) => ({
417
478
  async getFileUrl(o, s, { disposition: c = "attachment", version: l = null, username: u = "", ...d }) {
418
479
  if (c === "inline") {
419
480
  let e = await t.getFileContents(o, s, {
@@ -425,7 +486,7 @@ var ce = E, O = (e, { fileId: t, path: n, name: r }) => {
425
486
  if (l) {
426
487
  if (!u) throw Error("username is required for URL signing");
427
488
  let t = e.getFileUrl(i("meta", s.fileId, "v", l));
428
- return await v(a, r).signUrl(t, u);
489
+ return await y(a, r).signUrl(t, u);
429
490
  }
430
491
  if (s.downloadURL) return s.downloadURL;
431
492
  let { downloadURL: f } = await n.getFileInfo(o, s, { davProperties: [m.DownloadURL] });
@@ -434,9 +495,9 @@ var ce = E, O = (e, { fileId: t, path: n, name: r }) => {
434
495
  revokeUrl: (e) => {
435
496
  e && e.startsWith("blob:") && URL.revokeObjectURL(e);
436
497
  }
437
- }), me = (e, t) => ({ getPublicFileUrl(t, n) {
498
+ }), Se = (e, t) => ({ getPublicFileUrl(t, n) {
438
499
  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 } = {}) {
500
+ } }), Ce = (e, t, n) => ({ async listFiles(n, { path: r, fileId: l } = {}, { depth: u = 1, davProperties: d, isTrash: h = !1, ...g } = {}) {
440
501
  let _;
441
502
  if (a(n)) {
442
503
  _ = await e.propfind(i(n.webDavPath, r), {
@@ -502,7 +563,7 @@ var ce = E, O = (e, { fileId: t, path: n, name: r }) => {
502
563
  if (e.statusCode === 404 && l) return v();
503
564
  throw e;
504
565
  }
505
- } }), ge = (e, t) => ({ moveFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
566
+ } }), we = (e, t) => ({ moveFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
506
567
  let u = O(t, {
507
568
  fileId: r,
508
569
  path: n
@@ -515,7 +576,7 @@ var ce = E, O = (e, { fileId: t, path: n, name: r }) => {
515
576
  overwrite: c || !1,
516
577
  ...l
517
578
  });
518
- } }), _e = (e, t, n) => ({ async putFileContents(n, { fileName: r, path: i, parentFolderId: a, content: o = "", previousEntityTag: s = "", overwrite: c, onUploadProgress: l = null, ...u }) {
579
+ } }), Te = (e, t, n) => ({ async putFileContents(n, { fileName: r, path: i, parentFolderId: a, content: o = "", previousEntityTag: s = "", overwrite: c, onUploadProgress: l = null, ...u }) {
519
580
  let d = O(n, {
520
581
  fileId: a,
521
582
  name: r,
@@ -530,26 +591,26 @@ var ce = E, O = (e, { fileId: t, path: n, name: r }) => {
530
591
  fileId: f.headers.get("Oc-Fileid"),
531
592
  path: i
532
593
  });
533
- } }), ve = (e, t) => ({ deleteFile(t, { path: n, ...r }) {
594
+ } }), Ee = (e, t) => ({ deleteFile(t, { path: n, ...r }) {
534
595
  return e.delete(i(t.webDavPath, n), r);
535
- } }), ye = (e, t) => ({ restoreFile(t, { id: n }, { path: r }, { overwrite: o, ...s } = {}) {
596
+ } }), De = (e, t) => ({ restoreFile(t, { id: n }, { path: r }, { overwrite: o, ...s } = {}) {
536
597
  if (a(t)) return;
537
598
  let c = i(t.webDavPath, r);
538
599
  return e.move(i(t.webDavTrashPath, n), c, {
539
600
  overwrite: o,
540
601
  ...s
541
602
  });
542
- } }), be = (e, t) => ({ restoreFileVersion(t, { parentFolderId: n, name: r, path: a }, o, s = {}) {
603
+ } }), Oe = (e, t) => ({ restoreFileVersion(t, { parentFolderId: n, name: r, path: a }, o, s = {}) {
543
604
  let c = O(t, {
544
605
  path: a,
545
606
  fileId: n,
546
607
  name: r
547
608
  }), l = i("meta", n, "v", o, { leadingSlash: !0 }), u = i("files", c, { leadingSlash: !0 });
548
609
  return e.copy(l, u, s);
549
- } }), xe = (e, t) => ({ clearTrashBin(t, { id: n, ...r } = {}) {
610
+ } }), ke = (e, t) => ({ clearTrashBin(t, { id: n, ...r } = {}) {
550
611
  let a = f(t.id);
551
612
  return n && (a = i(a, n)), e.delete(a, r);
552
- } }), Se = (e, t) => ({ async search(t, { davProperties: n = o.Default, searchLimit: r, ...i }) {
613
+ } }), Ae = (e, t) => ({ async search(t, { davProperties: n = o.Default, searchLimit: r, ...i }) {
553
614
  let { range: a, results: s } = await e.report("/spaces/", {
554
615
  pattern: t,
555
616
  limit: r,
@@ -563,7 +624,7 @@ var ce = E, O = (e, { fileId: t, path: n, name: r }) => {
563
624
  })),
564
625
  totalResults: a ? parseInt(a?.split("/")[1]) : null
565
626
  };
566
- } }), Ce = (e, t) => ({ async getPathForFileId(t, n = {}) {
627
+ } }), je = (e, t) => ({ async getPathForFileId(t, n = {}) {
567
628
  return (await e.propfind(i("meta", t, { leadingSlash: !0 }), {
568
629
  properties: [m.MetaPathForUser],
569
630
  ...n
@@ -572,7 +633,7 @@ var ce = E, O = (e, { fileId: t, path: n, name: r }) => {
572
633
  //#endregion
573
634
  //#region ../../node_modules/.pnpm/webdav@5.9.0/node_modules/webdav/dist/web/index.js
574
635
  e();
575
- var we = {
636
+ var Me = {
576
637
  2: (e) => {
577
638
  function t(e, t, i) {
578
639
  e instanceof RegExp && (e = n(e, i)), t instanceof RegExp && (t = n(t, i));
@@ -775,27 +836,27 @@ var we = {
775
836
  return i.pre + _[0] + e;
776
837
  }));
777
838
  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);
839
+ var C = l(_[0]), ee = l(_[1]), te = Math.max(_[0].length, _[1].length), ne = _.length == 3 ? Math.abs(l(_[2])) : 1, re = m;
840
+ ee < C && (ne *= -1, re = h);
780
841
  var ie = _.some(p);
781
842
  v = [];
782
- for (var w = ee; C(w, te); w += re) {
843
+ for (var w = C; re(w, ee); w += ne) {
783
844
  var T;
784
845
  if (b) (T = String.fromCharCode(w)) === "\\" && (T = "");
785
846
  else if (T = String(w), ie) {
786
- var ae = ne - T.length;
847
+ var ae = te - T.length;
787
848
  if (ae > 0) {
788
- var E = Array(ae + 1).join("0");
789
- T = w < 0 ? "-" + E + T.slice(1) : E + T;
849
+ var oe = Array(ae + 1).join("0");
850
+ T = w < 0 ? "-" + oe + T.slice(1) : oe + T;
790
851
  }
791
852
  }
792
853
  v.push(T);
793
854
  }
794
855
  } else {
795
856
  v = [];
796
- for (var D = 0; D < _.length; D++) v.push.apply(v, g(_[D], !1));
857
+ for (var E = 0; E < _.length; E++) v.push.apply(v, g(_[E], !1));
797
858
  }
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);
859
+ for (E = 0; E < v.length; E++) for (c = 0; c < s.length; c++) u = a + v[E] + s[c], (!t || x || u) && n.push(u);
799
860
  }
800
861
  return n;
801
862
  }
@@ -1239,16 +1300,16 @@ var we = {
1239
1300
  ObjectPrototypeMutationError: o
1240
1301
  };
1241
1302
  }
1242
- }, Te = {};
1303
+ }, Ne = {};
1243
1304
  function k(e) {
1244
- var t = Te[e];
1305
+ var t = Ne[e];
1245
1306
  if (t !== void 0) return t.exports;
1246
- var n = Te[e] = {
1307
+ var n = Ne[e] = {
1247
1308
  id: e,
1248
1309
  loaded: !1,
1249
1310
  exports: {}
1250
1311
  };
1251
- return we[e].call(n.exports, n, n.exports, k), n.loaded = !0, n.exports;
1312
+ return Me[e].call(n.exports, n, n.exports, k), n.loaded = !0, n.exports;
1252
1313
  }
1253
1314
  k.n = (e) => {
1254
1315
  var t = e && e.__esModule ? () => e.default : () => e;
@@ -1259,11 +1320,11 @@ k.n = (e) => {
1259
1320
  get: t[n]
1260
1321
  });
1261
1322
  }, 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");
1323
+ var Pe = k(737), Fe = k.n(Pe);
1324
+ function Ie(e) {
1325
+ if (!Le(e)) throw Error("Parameter was not an error");
1265
1326
  }
1266
- function ke(e) {
1327
+ function Le(e) {
1267
1328
  return !!e && typeof e == "object" && (t = e, Object.prototype.toString.call(t)) === "[object Error]" || e instanceof Error;
1268
1329
  var t;
1269
1330
  }
@@ -1272,7 +1333,7 @@ var A = class e extends Error {
1272
1333
  let { options: n, shortMessage: r } = function(e) {
1273
1334
  let t, n = "";
1274
1335
  if (e.length === 0) t = {};
1275
- else if (ke(e[0])) t = { cause: e[0] }, n = e.slice(1).join(" ") || "";
1336
+ else if (Le(e[0])) t = { cause: e[0] }, n = e.slice(1).join(" ") || "";
1276
1337
  else if (e[0] && typeof e[0] == "object") t = Object.assign({}, e[0]), n = e.slice(1).join(" ") || "";
1277
1338
  else {
1278
1339
  if (typeof e[0] != "string") throw Error("Invalid arguments passed to Layerr");
@@ -1289,15 +1350,15 @@ var A = class e extends Error {
1289
1350
  }
1290
1351
  }
1291
1352
  static cause(e) {
1292
- return Oe(e), e._cause && ke(e._cause) ? e._cause : null;
1353
+ return Ie(e), e._cause && Le(e._cause) ? e._cause : null;
1293
1354
  }
1294
1355
  static fullStack(t) {
1295
- Oe(t);
1356
+ Ie(t);
1296
1357
  let n = e.cause(t);
1297
1358
  return n ? `${t.stack}\ncaused by: ${e.fullStack(n)}` : t.stack ?? "";
1298
1359
  }
1299
1360
  static info(t) {
1300
- Oe(t);
1361
+ Ie(t);
1301
1362
  let n = {}, r = e.cause(t);
1302
1363
  return r && Object.assign(n, e.info(r)), t._info && Object.assign(n, t._info), n;
1303
1364
  }
@@ -1305,25 +1366,25 @@ var A = class e extends Error {
1305
1366
  let e = this.name || this.constructor.name || this.constructor.prototype.name;
1306
1367
  return this.message && (e = `${e}: ${this.message}`), e;
1307
1368
  }
1308
- }, Ae = k(47), je = k.n(Ae), Me = "__PATH_SEPARATOR_POSIX__", Ne = "__PATH_SEPARATOR_WINDOWS__";
1369
+ }, Re = k(47), ze = k.n(Re), Be = "__PATH_SEPARATOR_POSIX__", Ve = "__PATH_SEPARATOR_WINDOWS__";
1309
1370
  function j(e) {
1310
1371
  try {
1311
- let t = e.replace(/\//g, Me).replace(/\\\\/g, Ne);
1312
- return encodeURIComponent(t).split(Ne).join("\\\\").split(Me).join("/");
1372
+ let t = e.replace(/\//g, Be).replace(/\\\\/g, Ve);
1373
+ return encodeURIComponent(t).split(Ve).join("\\\\").split(Be).join("/");
1313
1374
  } catch (e) {
1314
1375
  throw new A(e, "Failed encoding path");
1315
1376
  }
1316
1377
  }
1317
- function Pe(e) {
1378
+ function He(e) {
1318
1379
  return e.startsWith("/") ? e : "/" + e;
1319
1380
  }
1320
- function Fe(e) {
1381
+ function Ue(e) {
1321
1382
  let t = e;
1322
1383
  return t[0] !== "/" && (t = "/" + t), /^.+\/$/.test(t) && (t = t.substr(0, t.length - 1)), t;
1323
1384
  }
1324
- function Ie(e) {
1325
- let t = new (De())(e).pathname;
1326
- return t.length <= 0 && (t = "/"), Fe(t);
1385
+ function We(e) {
1386
+ let t = new (Fe())(e).pathname;
1387
+ return t.length <= 0 && (t = "/"), Ue(t);
1327
1388
  }
1328
1389
  function M() {
1329
1390
  return function() {
@@ -1342,12 +1403,12 @@ function M() {
1342
1403
  }(typeof arguments[0] == "object" ? arguments[0] : [].slice.call(arguments));
1343
1404
  }([...arguments].reduce(((e, t, n) => ((n === 0 || t !== "/" || t === "/" && e[e.length - 1] !== "/") && e.push(t), e)), []));
1344
1405
  }
1345
- var Le = k(542), Re = k.n(Le);
1346
- function ze(e, t) {
1406
+ var Ge = k(542), Ke = k.n(Ge);
1407
+ function qe(e, t) {
1347
1408
  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 = {
1409
+ let s = o || Ke()(`${t}:${n}:${r}`);
1410
+ return e && e.toLowerCase() === "md5-sess" ? Ke()(`${s}:${i}:${a}`) : s;
1411
+ }(t.algorithm, t.username, t.realm, t.password, t.nonce, t.cnonce, t.ha1), c = Ke()(`${i}:${r}`), l = a ? Ke()(`${s}:${t.nonce}:${o}:${t.cnonce}:${a}:${c}`) : Ke()(`${s}:${t.nonce}:${c}`), u = {
1351
1412
  username: t.username,
1352
1413
  realm: t.realm,
1353
1414
  nonce: t.nonce,
@@ -1362,28 +1423,28 @@ function ze(e, t) {
1362
1423
  for (let e in u) u[e] && (e === "qop" || e === "nc" || e === "algorithm" ? d.push(`${e}=${u[e]}`) : d.push(`${e}="${u[e]}"`));
1363
1424
  return `Digest ${d.join(", ")}`;
1364
1425
  }
1365
- function Be(e) {
1426
+ function Je(e) {
1366
1427
  return (e.headers && e.headers.get("www-authenticate") || "").split(/\s/)[0].toLowerCase() === "digest";
1367
1428
  }
1368
- var Ve = k(101), He = k.n(Ve);
1369
- function Ue(e) {
1370
- return He().decode(e);
1429
+ var Ye = k(101), Xe = k.n(Ye);
1430
+ function Ze(e) {
1431
+ return Xe().decode(e);
1371
1432
  }
1372
- function We(e, t) {
1433
+ function Qe(e, t) {
1373
1434
  var n;
1374
- return `Basic ${n = `${e}:${t}`, He().encode(n)}`;
1435
+ return `Basic ${n = `${e}:${t}`, Xe().encode(n)}`;
1375
1436
  }
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;
1437
+ var $e = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : typeof window < "u" ? window : globalThis, et = $e.fetch.bind($e);
1438
+ $e.Headers, $e.Request, $e.Response;
1378
1439
  var N = function(e) {
1379
1440
  return e.Auto = "auto", e.Digest = "digest", e.None = "none", e.Password = "password", e.Token = "token", e;
1380
1441
  }({}), P = function(e) {
1381
1442
  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
1443
  }({});
1383
- function qe(e, t, n, r, i) {
1444
+ function tt(e, t, n, r, i) {
1384
1445
  switch (e.authType) {
1385
1446
  case N.Auto:
1386
- t && n && (e.headers.Authorization = We(t, n));
1447
+ t && n && (e.headers.Authorization = Qe(t, n));
1387
1448
  break;
1388
1449
  case N.Digest:
1389
1450
  e.digest = function(e, t, n) {
@@ -1399,7 +1460,7 @@ function qe(e, t, n, r, i) {
1399
1460
  break;
1400
1461
  case N.None: break;
1401
1462
  case N.Password:
1402
- e.headers.Authorization = We(t, n);
1463
+ e.headers.Authorization = Qe(t, n);
1403
1464
  break;
1404
1465
  case N.Token:
1405
1466
  e.headers.Authorization = `${(a = r).token_type} ${a.access_token}`;
@@ -1409,20 +1470,20 @@ function qe(e, t, n, r, i) {
1409
1470
  var a;
1410
1471
  }
1411
1472
  k(345), k(800);
1412
- var Je = "@@HOTPATCHER", Ye = () => {};
1413
- function Xe(e) {
1473
+ var nt = "@@HOTPATCHER", rt = () => {};
1474
+ function it(e) {
1414
1475
  return {
1415
1476
  original: e,
1416
1477
  methods: [e],
1417
1478
  final: !1
1418
1479
  };
1419
1480
  }
1420
- var Ze = class {
1481
+ var at = class {
1421
1482
  constructor() {
1422
1483
  this._configuration = {
1423
1484
  registry: {},
1424
1485
  getEmptyAction: "null"
1425
- }, this.__type__ = Je;
1486
+ }, this.__type__ = nt;
1426
1487
  }
1427
1488
  get configuration() {
1428
1489
  return this._configuration;
@@ -1435,13 +1496,13 @@ var Ze = class {
1435
1496
  }
1436
1497
  control(e) {
1437
1498
  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");
1499
+ if (!e || e.__type__ !== nt) throw Error("Failed taking control of target HotPatcher instance: Invalid type or object");
1439
1500
  return Object.keys(e.configuration.registry).forEach(((n) => {
1440
1501
  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
1502
  })), e._configuration = this.configuration, this;
1442
1503
  }
1443
1504
  execute(e) {
1444
- return (this.get(e) || Ye)(...[...arguments].slice(1));
1505
+ return (this.get(e) || rt)(...[...arguments].slice(1));
1445
1506
  }
1446
1507
  get(e) {
1447
1508
  let t = this.configuration.registry[e];
@@ -1467,11 +1528,11 @@ var Ze = class {
1467
1528
  let { chain: n = !1 } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1468
1529
  if (this.configuration.registry[e] && this.configuration.registry[e].final) throw Error(`Failed patching '${e}': Method marked as being final`);
1469
1530
  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);
1531
+ if (n) this.configuration.registry[e] ? this.configuration.registry[e].methods.push(t) : this.configuration.registry[e] = it(t);
1471
1532
  else if (this.isPatched(e)) {
1472
1533
  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);
1534
+ this.configuration.registry[e] = Object.assign(it(t), { original: n });
1535
+ } else this.configuration.registry[e] = it(t);
1475
1536
  return this;
1476
1537
  }
1477
1538
  patchInline(e, t) {
@@ -1493,11 +1554,11 @@ var Ze = class {
1493
1554
  if (!this.configuration.registry.hasOwnProperty(e)) throw Error(`Failed marking '${e}' as final: No method found for key`);
1494
1555
  return this.configuration.registry[e].final = !0, this;
1495
1556
  }
1496
- }, Qe = null;
1497
- function $e() {
1498
- return Qe ||= new Ze(), Qe;
1557
+ }, ot = null;
1558
+ function st() {
1559
+ return ot ||= new at(), ot;
1499
1560
  }
1500
- function et(e) {
1561
+ function ct(e) {
1501
1562
  return function(e) {
1502
1563
  if (typeof e != "object" || !e || Object.prototype.toString.call(e) != "[object Object]") return !1;
1503
1564
  if (Object.getPrototypeOf(e) === null) return !0;
@@ -1506,27 +1567,27 @@ function et(e) {
1506
1567
  return Object.getPrototypeOf(e) === t;
1507
1568
  }(e) ? Object.assign({}, e) : Object.setPrototypeOf(Object.assign({}, e), Object.getPrototypeOf(e));
1508
1569
  }
1509
- function tt() {
1570
+ function lt() {
1510
1571
  var e = [...arguments];
1511
1572
  let t = null, n = [...e];
1512
1573
  for (; n.length > 0;) {
1513
1574
  let e = n.shift();
1514
- t = t ? nt(t, e) : et(e);
1575
+ t = t ? ut(t, e) : ct(e);
1515
1576
  }
1516
1577
  return t;
1517
1578
  }
1518
- function nt(e, t) {
1519
- let n = et(e);
1579
+ function ut(e, t) {
1580
+ let n = ct(e);
1520
1581
  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];
1582
+ 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] ? ut(n[e], t[e]) : ct(t[e]) : n[e] = t[e] : n[e] = t[e];
1522
1583
  })), n;
1523
1584
  }
1524
- function rt(e) {
1585
+ function dt(e) {
1525
1586
  let t = {};
1526
1587
  for (let n of e.keys()) t[n] = e.get(n);
1527
1588
  return t;
1528
1589
  }
1529
- function it() {
1590
+ function ft() {
1530
1591
  var e = [...arguments];
1531
1592
  if (e.length === 0) return {};
1532
1593
  let t = {};
@@ -1536,14 +1597,14 @@ function it() {
1536
1597
  })), e)), {});
1537
1598
  }
1538
1599
  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]");
1600
+ var pt = typeof ArrayBuffer == "function", { toString: mt } = Object.prototype;
1601
+ function ht(e) {
1602
+ return pt && (e instanceof ArrayBuffer || mt.call(e) === "[object ArrayBuffer]");
1542
1603
  }
1543
- function ct(e) {
1604
+ function gt(e) {
1544
1605
  return e != null && e.constructor != null && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
1545
1606
  }
1546
- function lt(e) {
1607
+ function _t(e) {
1547
1608
  return function() {
1548
1609
  var t = [...arguments];
1549
1610
  try {
@@ -1553,18 +1614,18 @@ function lt(e) {
1553
1614
  }
1554
1615
  };
1555
1616
  }
1556
- function ut(e, t, n) {
1617
+ function vt(e, t, n) {
1557
1618
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
1558
1619
  }
1559
- var dt = lt((function(e) {
1620
+ var yt = _t((function(e) {
1560
1621
  let t = e._digest;
1561
- return delete e._digest, t.hasDigestAuth && (e = tt(e, { headers: { Authorization: ze(e, t) } })), ut(pt(e), (function(n) {
1622
+ return delete e._digest, t.hasDigestAuth && (e = lt(e, { headers: { Authorization: qe(e, t) } })), vt(xt(e), (function(n) {
1562
1623
  let r = !1;
1563
1624
  return i = function(e) {
1564
1625
  return r ? e : n;
1565
1626
  }, (a = function() {
1566
1627
  if (n.status == 401) return t.hasDigestAuth = function(e, t) {
1567
- if (!Be(e)) return !1;
1628
+ if (!Je(e)) return !1;
1568
1629
  let n = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;
1569
1630
  for (;;) {
1570
1631
  let r = e.headers && e.headers.get("www-authenticate") || "", i = n.exec(r);
@@ -1577,7 +1638,7 @@ var dt = lt((function(e) {
1577
1638
  return e;
1578
1639
  }(), !0;
1579
1640
  }(n, t), function() {
1580
- if (t.hasDigestAuth) return ut(pt(e = tt(e, { headers: { Authorization: ze(e, t) } })), (function(e) {
1641
+ if (t.hasDigestAuth) return vt(xt(e = lt(e, { headers: { Authorization: qe(e, t) } })), (function(e) {
1581
1642
  return e.status == 401 ? t.hasDigestAuth = !1 : t.nc++, r = !0, e;
1582
1643
  }));
1583
1644
  }();
@@ -1585,36 +1646,36 @@ var dt = lt((function(e) {
1585
1646
  }()) && a.then ? a.then(i) : i(a);
1586
1647
  var i, a;
1587
1648
  }));
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;
1649
+ })), bt = _t((function(e, t) {
1650
+ return vt(xt(e), (function(n) {
1651
+ return n.ok ? (t.authType = N.Password, n) : n.status == 401 && Je(n) ? (t.authType = N.Digest, tt(t, t.username, t.password, void 0, void 0), e._digest = t.digest, yt(e)) : n;
1591
1652
  }));
1592
- })), F = lt((function(e, t) {
1593
- return t.authType === N.Auto ? ft(e, t) : e._digest ? dt(e) : pt(e);
1653
+ })), F = _t((function(e, t) {
1654
+ return t.authType === N.Auto ? bt(e, t) : e._digest ? yt(e) : xt(e);
1594
1655
  }));
1595
1656
  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;
1657
+ let r = ct(e);
1658
+ return r.headers = ft(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
1659
  }
1599
- function pt(e) {
1600
- let t = $e();
1601
- return t.patchInline("request", ((e) => t.patchInline("fetch", Ke, e.url, function(e) {
1660
+ function xt(e) {
1661
+ let t = st();
1662
+ return t.patchInline("request", ((e) => t.patchInline("fetch", et, e.url, function(e) {
1602
1663
  let t = {}, n = { method: e.method };
1603
- if (e.headers && (t = it(t, e.headers)), e.data !== void 0) {
1664
+ if (e.headers && (t = ft(t, e.headers)), e.data !== void 0) {
1604
1665
  let [r, i] = function(e) {
1605
- if (typeof e == "string" || ct(e) || st(e)) return [e, {}];
1666
+ if (typeof e == "string" || gt(e) || ht(e)) return [e, {}];
1606
1667
  if (e && typeof e == "object") return [JSON.stringify(e), { "content-type": "application/json" }];
1607
1668
  throw Error("Unable to convert request body: Unexpected body type: " + typeof e);
1608
1669
  }(e.data);
1609
- n.body = r, t = it(t, i);
1670
+ n.body = r, t = ft(t, i);
1610
1671
  }
1611
1672
  return e.signal && (n.signal = e.signal), e.withCredentials && (n.credentials = "include"), n.headers = t, n;
1612
1673
  }(e))), e);
1613
1674
  }
1614
- var mt = k(285), ht = (e) => {
1675
+ var St = k(285), Ct = (e) => {
1615
1676
  if (typeof e != "string") throw TypeError("invalid pattern");
1616
1677
  if (e.length > 65536) throw TypeError("pattern is too long");
1617
- }, gt = {
1678
+ }, wt = {
1618
1679
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
1619
1680
  "[:alpha:]": ["\\p{L}\\p{Nl}", !0],
1620
1681
  "[:ascii:]": ["\\x00-\\x7f", !1],
@@ -1633,7 +1694,7 @@ var mt = k(285), ht = (e) => {
1633
1694
  "[:upper:]": ["\\p{Lu}", !0],
1634
1695
  "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
1635
1696
  "[:xdigit:]": ["A-Fa-f0-9", !1]
1636
- }, _t = (e) => e.replace(/[[\]\\-]/g, "\\$&"), vt = (e) => e.join(""), yt = (e, t) => {
1697
+ }, Tt = (e) => e.replace(/[[\]\\-]/g, "\\$&"), Et = (e) => e.join(""), Dt = (e, t) => {
1637
1698
  let n = t;
1638
1699
  if (e.charAt(n) !== "[") throw Error("not in a brace expression");
1639
1700
  let r = [], i = [], a = n + 1, o = !1, s = !1, c = !1, l = !1, u = n, d = "";
@@ -1646,7 +1707,7 @@ var mt = k(285), ht = (e) => {
1646
1707
  }
1647
1708
  if (o = !0, t !== "\\" || c) {
1648
1709
  if (t === "[" && !c) {
1649
- for (let [t, [o, c, l]] of Object.entries(gt)) if (e.startsWith(t, a)) {
1710
+ for (let [t, [o, c, l]] of Object.entries(wt)) if (e.startsWith(t, a)) {
1650
1711
  if (d) return [
1651
1712
  "$.",
1652
1713
  !1,
@@ -1657,7 +1718,7 @@ var mt = k(285), ht = (e) => {
1657
1718
  continue t;
1658
1719
  }
1659
1720
  }
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++);
1721
+ c = !1, d ? (t > d ? r.push(Tt(d) + "-" + Tt(t)) : t === d && r.push(Tt(t)), d = "", a++) : e.startsWith("-]", a + 1) ? (r.push(Tt(t + "-")), a += 2) : e.startsWith("-", a + 1) ? (d = t, a += 2) : (r.push(Tt(t)), a++);
1661
1722
  } else c = !0, a++;
1662
1723
  } else l = !0, a++;
1663
1724
  }
@@ -1680,23 +1741,23 @@ var mt = k(285), ht = (e) => {
1680
1741
  !1
1681
1742
  ];
1682
1743
  var f;
1683
- let p = "[" + (l ? "^" : "") + vt(r) + "]", m = "[" + (l ? "" : "^") + vt(i) + "]";
1744
+ let p = "[" + (l ? "^" : "") + Et(r) + "]", m = "[" + (l ? "" : "^") + Et(i) + "]";
1684
1745
  return [
1685
1746
  r.length && i.length ? "(" + p + "|" + m + ")" : r.length ? p : m,
1686
1747
  s,
1687
1748
  u - n,
1688
1749
  !0
1689
1750
  ];
1690
- }, bt = function(e) {
1751
+ }, Ot = function(e) {
1691
1752
  let { windowsPathsNoEscape: t = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1692
1753
  return t ? e.replace(/\[([^\/\\])\]/g, "$1") : e.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
1693
- }, xt = new Set([
1754
+ }, kt = new Set([
1694
1755
  "!",
1695
1756
  "?",
1696
1757
  "+",
1697
1758
  "*",
1698
1759
  "@"
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 {
1760
+ ]), At = (e) => kt.has(e), jt = "(?!\\.)", Mt = new Set(["[", "."]), Nt = new Set(["..", "."]), Pt = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), Ft = "[^/]", It = Ft + "*?", Lt = Ft + "+?", Rt = class e {
1700
1761
  type;
1701
1762
  #e;
1702
1763
  #t;
@@ -1783,7 +1844,7 @@ var mt = k(285), ht = (e) => {
1783
1844
  let r = t.charAt(l++);
1784
1845
  if (a || r === "\\") a = !a, u += r;
1785
1846
  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;
1847
+ else if (r !== "[") if (i.noext || !At(r) || t.charAt(l) !== "(") u += r;
1787
1848
  else {
1788
1849
  n.push(u), u = "";
1789
1850
  let a = new e(r, n);
@@ -1798,7 +1859,7 @@ var mt = k(285), ht = (e) => {
1798
1859
  let r = t.charAt(l++);
1799
1860
  if (a || r === "\\") a = !a, f += r;
1800
1861
  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) === "(") {
1862
+ else if (r !== "[") if (At(r) && t.charAt(l) === "(") {
1802
1863
  u.push(f), f = "";
1803
1864
  let n = new e(r, u);
1804
1865
  u.push(n), l = e.#f(t, n, l, i);
@@ -1834,14 +1895,14 @@ var mt = k(285), ht = (e) => {
1834
1895
  let [i, a, o, s] = typeof n == "string" ? e.#m(n, this.#t, r) : n.toRegExpSource(t);
1835
1896
  return this.#t = this.#t || o, this.#n = this.#n || s, i;
1836
1897
  })).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 : "";
1898
+ if (this.isStart() && typeof this.#r[0] == "string" && (this.#r.length !== 1 || !Nt.has(this.#r[0]))) {
1899
+ let e = Mt, 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));
1900
+ a = r ? "(?!(?:^|/)\\.\\.?(?:$|/))" : o ? jt : "";
1840
1901
  }
1841
1902
  let o = "";
1842
1903
  return this.isEnd() && this.#e.#s && this.#i?.type === "!" && (o = "(?:$|\\/)"), [
1843
1904
  a + i + o,
1844
- bt(i),
1905
+ Ot(i),
1845
1906
  this.#t = !!this.#t,
1846
1907
  this.#n
1847
1908
  ];
@@ -1851,7 +1912,7 @@ var mt = k(285), ht = (e) => {
1851
1912
  let e = this.toString();
1852
1913
  return this.#r = [e], this.type = null, this.#t = void 0, [
1853
1914
  e,
1854
- bt(this.toString()),
1915
+ Ot(this.toString()),
1855
1916
  !1,
1856
1917
  !1
1857
1918
  ];
@@ -1859,9 +1920,9 @@ var mt = k(285), ht = (e) => {
1859
1920
  let o = !r || t || n ? "" : this.#p(!0);
1860
1921
  o === a && (o = ""), o && (a = `(?:${a})(?:${o})*?`);
1861
1922
  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}`), [
1923
+ return s = this.type === "!" && this.#u ? (this.isStart() && !n ? jt : "") + Lt : i + a + (this.type === "!" ? "))" + (!this.isStart() || n || t ? "" : jt) + It + ")" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && o ? ")" : this.type === "*" && o ? ")?" : `)${this.type}`), [
1863
1924
  s,
1864
- bt(a),
1925
+ Ot(a),
1865
1926
  this.#t = !!this.#t,
1866
1927
  this.#n
1867
1928
  ];
@@ -1877,48 +1938,48 @@ var mt = k(285), ht = (e) => {
1877
1938
  let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = !1, i = "", a = !1;
1878
1939
  for (let o = 0; o < e.length; o++) {
1879
1940
  let s = e.charAt(o);
1880
- if (r) r = !1, i += (Et.has(s) ? "\\" : "") + s;
1941
+ if (r) r = !1, i += (Pt.has(s) ? "\\" : "") + s;
1881
1942
  else if (s !== "\\") {
1882
1943
  if (s === "[") {
1883
- let [n, r, s, c] = yt(e, o);
1944
+ let [n, r, s, c] = Dt(e, o);
1884
1945
  if (s) {
1885
1946
  i += n, a ||= r, o += s - 1, t ||= c;
1886
1947
  continue;
1887
1948
  }
1888
1949
  }
1889
- s === "*" ? (i += n && e === "*" ? kt : Ot, t = !0) : s === "?" ? (i += Dt, t = !0) : i += s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1950
+ s === "*" ? (i += n && e === "*" ? Lt : It, t = !0) : s === "?" ? (i += Ft, t = !0) : i += s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1890
1951
  } else o === e.length - 1 ? i += "\\\\" : r = !0;
1891
1952
  }
1892
1953
  return [
1893
1954
  i,
1894
- bt(e),
1955
+ Ot(e),
1895
1956
  !!t,
1896
1957
  a
1897
1958
  ];
1898
1959
  }
1899
1960
  }, L = function(e, t) {
1900
1961
  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]);
1962
+ return Ct(t), !(!n.nocomment && t.charAt(0) === "#") && new ln(t, n).match(e);
1963
+ }, zt = /^\*+([^+@!?\*\[\(]*)$/, Bt = (e) => (t) => !t.startsWith(".") && t.endsWith(e), Vt = (e) => (t) => t.endsWith(e), Ht = (e) => (e = e.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(e)), Ut = (e) => (e = e.toLowerCase(), (t) => t.toLowerCase().endsWith(e)), Wt = /^\*+\.\*+$/, Gt = (e) => !e.startsWith(".") && e.includes("."), Kt = (e) => e !== "." && e !== ".." && e.includes("."), qt = /^\.\*+$/, Jt = (e) => e !== "." && e !== ".." && e.startsWith("."), Yt = /^\*+$/, Xt = (e) => e.length !== 0 && !e.startsWith("."), Zt = (e) => e.length !== 0 && e !== "." && e !== "..", Qt = /^\?+([^+@!?\*\[\(]*)?$/, $t = (e) => {
1964
+ let [t, n = ""] = e, r = rn([t]);
1904
1965
  return n ? (n = n.toLowerCase(), (e) => r(e) && e.toLowerCase().endsWith(n)) : r;
1905
- }, Kt = (e) => {
1906
- let [t, n = ""] = e, r = Xt([t]);
1966
+ }, en = (e) => {
1967
+ let [t, n = ""] = e, r = an([t]);
1907
1968
  return n ? (n = n.toLowerCase(), (e) => r(e) && e.toLowerCase().endsWith(n)) : r;
1908
- }, qt = (e) => {
1909
- let [t, n = ""] = e, r = Xt([t]);
1969
+ }, tn = (e) => {
1970
+ let [t, n = ""] = e, r = an([t]);
1910
1971
  return n ? (e) => r(e) && e.endsWith(n) : r;
1911
- }, Jt = (e) => {
1912
- let [t, n = ""] = e, r = Yt([t]);
1972
+ }, nn = (e) => {
1973
+ let [t, n = ""] = e, r = rn([t]);
1913
1974
  return n ? (e) => r(e) && e.endsWith(n) : r;
1914
- }, Yt = (e) => {
1975
+ }, rn = (e) => {
1915
1976
  let [t] = e, n = t.length;
1916
1977
  return (e) => e.length === n && !e.startsWith(".");
1917
- }, Xt = (e) => {
1978
+ }, an = (e) => {
1918
1979
  let [t] = e, n = t.length;
1919
1980
  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" ? "\\" : "/";
1981
+ }, on = typeof t == "object" && t ? typeof t.env == "object" && t.env && t.env.__MINIMATCH_TESTING_PLATFORM__ || t.platform : "posix";
1982
+ L.sep = on === "win32" ? "\\" : "/";
1922
1983
  var R = Symbol("globstar **");
1923
1984
  L.GLOBSTAR = R, L.filter = function(e) {
1924
1985
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -1980,17 +2041,17 @@ L.defaults = (e) => {
1980
2041
  GLOBSTAR: R
1981
2042
  });
1982
2043
  };
1983
- var Qt = function(e) {
2044
+ var sn = function(e) {
1984
2045
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1985
- return ht(e), t.nobrace || !/\{(?:(?!\{).)*\}/.test(e) ? [e] : mt(e);
2046
+ return Ct(e), t.nobrace || !/\{(?:(?!\{).)*\}/.test(e) ? [e] : St(e);
1986
2047
  };
1987
- L.braceExpand = Qt, L.makeRe = function(e) {
1988
- return new en(e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).makeRe();
2048
+ L.braceExpand = sn, L.makeRe = function(e) {
2049
+ return new ln(e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).makeRe();
1989
2050
  }, L.match = function(e, t) {
1990
- let n = new en(t, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {});
2051
+ let n = new ln(t, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {});
1991
2052
  return e = e.filter(((e) => n.match(e))), n.options.nonull && !e.length && e.push(t), e;
1992
2053
  };
1993
- var $t = /[?*]|[+@!]\(.*?\)|\[|\]/, en = class {
2054
+ var cn = /[?*]|[+@!]\(.*?\)|\[|\]/, ln = class {
1994
2055
  options;
1995
2056
  set;
1996
2057
  pattern;
@@ -2010,7 +2071,7 @@ var $t = /[?*]|[+@!]\(.*?\)|\[|\]/, en = class {
2010
2071
  regexp;
2011
2072
  constructor(e) {
2012
2073
  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();
2074
+ Ct(e), t ||= {}, this.options = t, this.pattern = e, this.platform = t.platform || on, 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
2075
  }
2015
2076
  hasMagic() {
2016
2077
  if (this.options.magicalBraces && this.set.length > 1) return !0;
@@ -2029,7 +2090,7 @@ var $t = /[?*]|[+@!]\(.*?\)|\[|\]/, en = class {
2029
2090
  this.globParts = this.preprocess(n), this.debug(this.pattern, this.globParts);
2030
2091
  let r = this.globParts.map(((e, t, n) => {
2031
2092
  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]);
2093
+ let t = !(e[0] !== "" || e[1] !== "" || e[2] !== "?" && cn.test(e[2]) || cn.test(e[3])), n = /^[a-z]:/i.test(e[0]);
2033
2094
  if (t) return [...e.slice(0, 4), ...e.slice(4).map(((e) => this.parse(e)))];
2034
2095
  if (n) return [e[0], ...e.slice(1).map(((e) => this.parse(e)))];
2035
2096
  }
@@ -2197,16 +2258,16 @@ var $t = /[?*]|[+@!]\(.*?\)|\[|\]/, en = class {
2197
2258
  throw Error("wtf?");
2198
2259
  }
2199
2260
  braceExpand() {
2200
- return Qt(this.pattern, this.options);
2261
+ return sn(this.pattern, this.options);
2201
2262
  }
2202
2263
  parse(e) {
2203
- ht(e);
2264
+ Ct(e);
2204
2265
  let t = this.options;
2205
2266
  if (e === "**") return R;
2206
2267
  if (e === "") return "";
2207
2268
  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();
2269
+ (n = e.match(Yt)) ? r = t.dot ? Zt : Xt : (n = e.match(zt)) ? r = (t.nocase ? t.dot ? Ut : Ht : t.dot ? Vt : Bt)(n[1]) : (n = e.match(Qt)) ? r = (t.nocase ? t.dot ? en : $t : t.dot ? tn : nn)(n) : (n = e.match(Wt)) ? r = t.dot ? Kt : Gt : (n = e.match(qt)) && (r = Jt);
2270
+ let i = Rt.fromGlob(e, this.options).toMMPattern();
2210
2271
  return r && typeof i == "object" && Reflect.defineProperty(i, "test", { value: r }), i;
2211
2272
  }
2212
2273
  makeRe() {
@@ -2257,29 +2318,29 @@ var $t = /[?*]|[+@!]\(.*?\)|\[|\]/, en = class {
2257
2318
  return L.defaults(e).Minimatch;
2258
2319
  }
2259
2320
  };
2260
- function tn(e) {
2321
+ function un(e) {
2261
2322
  let t = /* @__PURE__ */ Error(`${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""}Invalid response: ${e.status} ${e.statusText}`);
2262
2323
  return t.status = e.status, t.response = e, t;
2263
2324
  }
2264
2325
  function B(e, t) {
2265
2326
  let { status: n } = t;
2266
2327
  if (n === 401 && e.digest) return t;
2267
- if (n >= 400) throw tn(t);
2328
+ if (n >= 400) throw un(t);
2268
2329
  return t;
2269
2330
  }
2270
2331
  function V(e, t) {
2271
2332
  return arguments.length > 2 && arguments[2] !== void 0 && arguments[2] ? {
2272
2333
  data: t,
2273
- headers: e.headers ? rt(e.headers) : {},
2334
+ headers: e.headers ? dt(e.headers) : {},
2274
2335
  status: e.status,
2275
2336
  statusText: e.statusText
2276
2337
  } : t;
2277
2338
  }
2278
- L.AST = At, L.Minimatch = en, L.escape = function(e) {
2339
+ L.AST = Rt, L.Minimatch = ln, L.escape = function(e) {
2279
2340
  let { windowsPathsNoEscape: t = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2280
2341
  return t ? e.replace(/[?*()[\]]/g, "[$&]") : e.replace(/[?*()[\]\\]/g, "\\$&");
2281
- }, L.unescape = bt;
2282
- var nn = (rn = function(e, t, n) {
2342
+ }, L.unescape = Ot;
2343
+ var dn = (fn = function(e, t, n) {
2283
2344
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = I({
2284
2345
  url: M(e.remoteURL, j(t)),
2285
2346
  method: "COPY",
@@ -2296,11 +2357,11 @@ var nn = (rn = function(e, t, n) {
2296
2357
  }, function() {
2297
2358
  var e = [...arguments];
2298
2359
  try {
2299
- return Promise.resolve(rn.apply(this, e));
2360
+ return Promise.resolve(fn.apply(this, e));
2300
2361
  } catch (e) {
2301
2362
  return Promise.reject(e);
2302
2363
  }
2303
- }), rn, an = {
2364
+ }), fn, pn = {
2304
2365
  preserveOrder: !1,
2305
2366
  attributeNamePrefix: "@_",
2306
2367
  attributesGroupName: !1,
@@ -2338,8 +2399,8 @@ var nn = (rn = function(e, t, n) {
2338
2399
  return e;
2339
2400
  },
2340
2401
  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) {
2402
+ }, mn = /* @__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]*$");
2403
+ function hn(e, t) {
2343
2404
  let n = [], r = t.exec(e);
2344
2405
  for (; r;) {
2345
2406
  let i = [];
@@ -2350,9 +2411,9 @@ function sn(e, t) {
2350
2411
  }
2351
2412
  return n;
2352
2413
  }
2353
- var cn = function(e) {
2354
- return on.exec(e) != null;
2355
- }, ln = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", H = class {
2414
+ var gn = function(e) {
2415
+ return mn.exec(e) != null;
2416
+ }, _n = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", H = class {
2356
2417
  constructor(e) {
2357
2418
  this.tagname = e, this.child = [], this[":@"] = {};
2358
2419
  }
@@ -2363,12 +2424,12 @@ var cn = function(e) {
2363
2424
  e.tagname === "__proto__" && (e.tagname = "#__proto__"), e[":@"] && Object.keys(e[":@"]).length > 0 ? this.child.push({
2364
2425
  [e.tagname]: e.child,
2365
2426
  ":@": e[":@"]
2366
- }) : this.child.push({ [e.tagname]: e.child }), t !== void 0 && (this.child[this.child.length - 1][ln] = { startIndex: t });
2427
+ }) : this.child.push({ [e.tagname]: e.child }), t !== void 0 && (this.child[this.child.length - 1][_n] = { startIndex: t });
2367
2428
  }
2368
2429
  static getMetaDataSymbol() {
2369
- return ln;
2430
+ return _n;
2370
2431
  }
2371
- }, un = class {
2432
+ }, vn = class {
2372
2433
  constructor(e) {
2373
2434
  this.suppressValidationErr = !e;
2374
2435
  }
@@ -2414,7 +2475,7 @@ var cn = function(e) {
2414
2475
  t = U(e, t);
2415
2476
  let n = "";
2416
2477
  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) {
2478
+ if (yn(n), t = U(e, t), !this.suppressValidationErr) {
2418
2479
  if (e.substring(t, t + 6).toUpperCase() === "SYSTEM") throw Error("External entities are not supported");
2419
2480
  if (e[t] === "%") throw Error("Parameter entities are not supported");
2420
2481
  }
@@ -2429,7 +2490,7 @@ var cn = function(e) {
2429
2490
  t = U(e, t);
2430
2491
  let n = "";
2431
2492
  for (; t < e.length && !/\s/.test(e[t]);) n += e[t], t++;
2432
- !this.suppressValidationErr && dn(n), t = U(e, t);
2493
+ !this.suppressValidationErr && yn(n), t = U(e, t);
2433
2494
  let r = e.substring(t, t + 6).toUpperCase();
2434
2495
  if (!this.suppressValidationErr && r !== "SYSTEM" && r !== "PUBLIC") throw Error(`Expected SYSTEM or PUBLIC, found "${r}"`);
2435
2496
  t += r.length, t = U(e, t);
@@ -2454,7 +2515,7 @@ var cn = function(e) {
2454
2515
  t = U(e, t);
2455
2516
  let n = "";
2456
2517
  for (; t < e.length && !/\s/.test(e[t]);) n += e[t], t++;
2457
- if (!this.suppressValidationErr && !cn(n)) throw Error(`Invalid element name: "${n}"`);
2518
+ if (!this.suppressValidationErr && !gn(n)) throw Error(`Invalid element name: "${n}"`);
2458
2519
  let r = "";
2459
2520
  if (e[t = U(e, t)] === "E" && W(e, "MPTY", t)) t += 4;
2460
2521
  else if (e[t] === "A" && W(e, "NY", t)) t += 2;
@@ -2472,10 +2533,10 @@ var cn = function(e) {
2472
2533
  t = U(e, t);
2473
2534
  let n = "";
2474
2535
  for (; t < e.length && !/\s/.test(e[t]);) n += e[t], t++;
2475
- dn(n), t = U(e, t);
2536
+ yn(n), t = U(e, t);
2476
2537
  let r = "";
2477
2538
  for (; t < e.length && !/\s/.test(e[t]);) r += e[t], t++;
2478
- if (!dn(r)) throw Error(`Invalid attribute name: "${r}"`);
2539
+ if (!yn(r)) throw Error(`Invalid attribute name: "${r}"`);
2479
2540
  t = U(e, t);
2480
2541
  let i = "";
2481
2542
  if (e.substring(t, t + 8).toUpperCase() === "NOTATION") {
@@ -2485,7 +2546,7 @@ var cn = function(e) {
2485
2546
  for (; t < e.length && e[t] !== ")";) {
2486
2547
  let r = "";
2487
2548
  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}"`);
2549
+ if (r = r.trim(), !yn(r)) throw Error(`Invalid notation name: "${r}"`);
2489
2550
  n.push(r), e[t] === "|" && (t++, t = U(e, t));
2490
2551
  }
2491
2552
  if (e[t] !== ")") throw Error("Unterminated list of notations");
@@ -2521,22 +2582,22 @@ function W(e, t, n) {
2521
2582
  for (let r = 0; r < t.length; r++) if (t[r] !== e[n + r + 1]) return !1;
2522
2583
  return !0;
2523
2584
  }
2524
- function dn(e) {
2525
- if (cn(e)) return e;
2585
+ function yn(e) {
2586
+ if (gn(e)) return e;
2526
2587
  throw Error(`Invalid entity name ${e}`);
2527
2588
  }
2528
- var fn = /^[-+]?0x[a-fA-F0-9]+$/, pn = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, mn = {
2589
+ var bn = /^[-+]?0x[a-fA-F0-9]+$/, xn = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, Sn = {
2529
2590
  hex: !0,
2530
2591
  leadingZeros: !0,
2531
2592
  decimalPoint: ".",
2532
2593
  eNotation: !0
2533
- }, hn = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
2534
- function gn(e) {
2594
+ }, Cn = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
2595
+ function wn(e) {
2535
2596
  return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
2536
2597
  for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
2537
2598
  } : () => !1;
2538
2599
  }
2539
- var _n = class {
2600
+ var Tn = class {
2540
2601
  constructor(e) {
2541
2602
  if (this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {
2542
2603
  apos: {
@@ -2593,13 +2654,13 @@ var _n = class {
2593
2654
  },
2594
2655
  num_dec: {
2595
2656
  regex: /&#([0-9]{1,7});/g,
2596
- val: (e, t) => jn(t, 10, "&#")
2657
+ val: (e, t) => zn(t, 10, "&#")
2597
2658
  },
2598
2659
  num_hex: {
2599
2660
  regex: /&#x([0-9a-fA-F]{1,6});/g,
2600
- val: (e, t) => jn(t, 16, "&#x")
2661
+ val: (e, t) => zn(t, 16, "&#x")
2601
2662
  }
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) {
2663
+ }, this.addExternalEntities = En, this.parseXml = jn, this.parseTextData = Dn, this.resolveNameSpace = On, this.buildAttributesMap = An, this.isItStopNode = Fn, this.replaceEntitiesValue = Nn, this.readStopNodeData = Ln, this.saveTextToParentTag = Pn, this.addChild = Mn, this.ignoreAttributesFn = wn(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) {
2603
2664
  this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set();
2604
2665
  for (let e = 0; e < this.options.stopNodes.length; e++) {
2605
2666
  let t = this.options.stopNodes[e];
@@ -2608,7 +2669,7 @@ var _n = class {
2608
2669
  }
2609
2670
  }
2610
2671
  };
2611
- function vn(e) {
2672
+ function En(e) {
2612
2673
  let t = Object.keys(e);
2613
2674
  for (let n = 0; n < t.length; n++) {
2614
2675
  let r = t[n];
@@ -2618,14 +2679,14 @@ function vn(e) {
2618
2679
  };
2619
2680
  }
2620
2681
  }
2621
- function yn(e, t, n, r, i, a, o) {
2682
+ function Dn(e, t, n, r, i, a, o) {
2622
2683
  if (e !== void 0 && (this.options.trimValues && !r && (e = e.trim()), e.length > 0)) {
2623
2684
  o || (e = this.replaceEntitiesValue(e));
2624
2685
  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;
2686
+ return r == null ? e : typeof r != typeof e || r !== e ? r : this.options.trimValues || e.trim() === e ? Rn(e, this.options.parseTagValue, this.options.numberParseOptions) : e;
2626
2687
  }
2627
2688
  }
2628
- function bn(e) {
2689
+ function On(e) {
2629
2690
  if (this.options.removeNSPrefix) {
2630
2691
  let t = e.split(":"), n = e.charAt(0) === "/" ? "/" : "";
2631
2692
  if (t[0] === "xmlns") return "";
@@ -2633,10 +2694,10 @@ function bn(e) {
2633
2694
  }
2634
2695
  return e;
2635
2696
  }
2636
- var xn = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
2637
- function Sn(e, t) {
2697
+ var kn = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
2698
+ function An(e, t) {
2638
2699
  if (!0 !== this.options.ignoreAttributes && typeof e == "string") {
2639
- let n = sn(e, xn), r = n.length, i = {};
2700
+ let n = hn(e, kn), r = n.length, i = {};
2640
2701
  for (let e = 0; e < r; e++) {
2641
2702
  let r = this.resolveNameSpace(n[e][1]);
2642
2703
  if (this.ignoreAttributesFn(r, t)) continue;
@@ -2644,7 +2705,7 @@ function Sn(e, t) {
2644
2705
  if (r.length) if (this.options.transformAttributeName && (o = this.options.transformAttributeName(o)), o === "__proto__" && (o = "#__proto__"), a !== void 0) {
2645
2706
  this.options.trimValues && (a = a.trim()), a = this.replaceEntitiesValue(a);
2646
2707
  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);
2708
+ i[o] = e == null ? a : typeof e != typeof a || e !== a ? e : Rn(a, this.options.parseAttributeValue, this.options.numberParseOptions);
2648
2709
  } else this.options.allowBooleanAttributes && (i[o] = !0);
2649
2710
  }
2650
2711
  if (!Object.keys(i).length) return;
@@ -2655,9 +2716,9 @@ function Sn(e, t) {
2655
2716
  return i;
2656
2717
  }
2657
2718
  }
2658
- var Cn = function(e) {
2719
+ var jn = function(e) {
2659
2720
  e = e.replace(/\r\n?/g, "\n");
2660
- let t = new H("!xml"), n = t, r = "", i = "", a = new un(this.options.processEntities);
2721
+ let t = new H("!xml"), n = t, r = "", i = "", a = new vn(this.options.processEntities);
2661
2722
  for (let o = 0; o < e.length; o++) if (e[o] === "<") if (e[o + 1] === "/") {
2662
2723
  let t = G(e, ">", o, "Closing Tag is not closed."), a = e.substring(o + 2, t).trim();
2663
2724
  if (this.options.removeNSPrefix) {
@@ -2670,7 +2731,7 @@ var Cn = function(e) {
2670
2731
  let c = 0;
2671
2732
  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
2733
  } else if (e[o + 1] === "?") {
2673
- let t = On(e, o, !1, "?>");
2734
+ let t = In(e, o, !1, "?>");
2674
2735
  if (!t) throw Error("Pi Tag is not closed.");
2675
2736
  if (r = this.saveTextToParentTag(r, n, i), !(this.options.ignoreDeclaration && t.tagName === "?xml" || this.options.ignorePiTags)) {
2676
2737
  let e = new H(t.tagName);
@@ -2693,7 +2754,7 @@ var Cn = function(e) {
2693
2754
  let s = this.parseTextData(a, n.tagname, i, !0, !1, !0, !0);
2694
2755
  s ??= "", this.options.cdataPropName ? n.add(this.options.cdataPropName, [{ [this.options.textNodeName]: a }]) : n.add(this.options.textNodeName, s), o = t + 2;
2695
2756
  } 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;
2757
+ let a = In(e, o, this.options.removeNSPrefix), s = a.tagName, c = a.rawTagName, l = a.tagExp, u = a.attrExpPresent, d = a.closeIndex;
2697
2758
  if (this.options.transformTagName) {
2698
2759
  let e = this.options.transformTagName(s);
2699
2760
  l === s && (l = e), s = e;
@@ -2731,12 +2792,12 @@ var Cn = function(e) {
2731
2792
  else r += e[o];
2732
2793
  return t.child;
2733
2794
  };
2734
- function wn(e, t, n, r) {
2795
+ function Mn(e, t, n, r) {
2735
2796
  this.options.captureMetaData || (r = void 0);
2736
2797
  let i = this.options.updateTag(t.tagname, n, t[":@"]);
2737
2798
  !1 === i || (typeof i == "string" && (t.tagname = i), e.addChild(t, r));
2738
2799
  }
2739
- var Tn = function(e) {
2800
+ var Nn = function(e) {
2740
2801
  if (this.options.processEntities) {
2741
2802
  for (let t in this.docTypeEntities) {
2742
2803
  let n = this.docTypeEntities[t];
@@ -2754,10 +2815,10 @@ var Tn = function(e) {
2754
2815
  }
2755
2816
  return e;
2756
2817
  };
2757
- function En(e, t, n, r) {
2818
+ function Pn(e, t, n, r) {
2758
2819
  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
2820
  }
2760
- function Dn(e, t, n, r) {
2821
+ function Fn(e, t, n, r) {
2761
2822
  return !(!t || !t.has(r)) || !(!e || !e.has(n));
2762
2823
  }
2763
2824
  function G(e, t, n, r) {
@@ -2765,7 +2826,7 @@ function G(e, t, n, r) {
2765
2826
  if (i === -1) throw Error(r);
2766
2827
  return i + t.length - 1;
2767
2828
  }
2768
- function On(e, t, n) {
2829
+ function In(e, t, n) {
2769
2830
  let r = function(e, t) {
2770
2831
  let n, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ">", i = "";
2771
2832
  for (let a = t; a < e.length; a++) {
@@ -2797,7 +2858,7 @@ function On(e, t, n) {
2797
2858
  rawTagName: l
2798
2859
  };
2799
2860
  }
2800
- function kn(e, t, n) {
2861
+ function Ln(e, t, n) {
2801
2862
  let r = n, i = 1;
2802
2863
  for (; n < e.length; n++) if (e[n] === "<") if (e[n + 1] === "/") {
2803
2864
  let a = G(e, ">", n, `${t} is not closed`);
@@ -2810,20 +2871,20 @@ function kn(e, t, n) {
2810
2871
  else if (e.substr(n + 1, 3) === "!--") n = G(e, "-->", n + 3, "StopNode is not closed.");
2811
2872
  else if (e.substr(n + 1, 2) === "![") n = G(e, "]]>", n, "StopNode is not closed.") - 2;
2812
2873
  else {
2813
- let r = On(e, n, ">");
2874
+ let r = In(e, n, ">");
2814
2875
  r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
2815
2876
  }
2816
2877
  }
2817
- function An(e, t, n) {
2878
+ function Rn(e, t, n) {
2818
2879
  if (t && typeof e == "string") {
2819
2880
  let t = e.trim();
2820
2881
  return t === "true" || t !== "false" && function(e) {
2821
2882
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2822
- if (t = Object.assign({}, mn, t), !e || typeof e != "string") return e;
2883
+ if (t = Object.assign({}, Sn, t), !e || typeof e != "string") return e;
2823
2884
  let n = e.trim();
2824
2885
  if (t.skipLike !== void 0 && t.skipLike.test(n)) return e;
2825
2886
  if (e === "0") return 0;
2826
- if (t.hex && fn.test(n)) return function(e) {
2887
+ if (t.hex && bn.test(n)) return function(e) {
2827
2888
  if (parseInt) return parseInt(e, 16);
2828
2889
  if (Number.parseInt) return Number.parseInt(e, 16);
2829
2890
  if (window && window.parseInt) return window.parseInt(e, 16);
@@ -2831,7 +2892,7 @@ function An(e, t, n) {
2831
2892
  }(n);
2832
2893
  if (n.includes("e") || n.includes("E")) return function(e, t, n) {
2833
2894
  if (!n.eNotation) return e;
2834
- let r = t.match(hn);
2895
+ let r = t.match(Cn);
2835
2896
  if (r) {
2836
2897
  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
2898
  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);
@@ -2839,7 +2900,7 @@ function An(e, t, n) {
2839
2900
  return e;
2840
2901
  }(e, n, t);
2841
2902
  {
2842
- let i = pn.exec(n);
2903
+ let i = xn.exec(n);
2843
2904
  if (i) {
2844
2905
  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
2906
  if (!t.leadingZeros && (o.length > 1 || o.length === 1 && !c)) return e;
@@ -2859,37 +2920,37 @@ function An(e, t, n) {
2859
2920
  }
2860
2921
  return e === void 0 ? "" : e;
2861
2922
  }
2862
- function jn(e, t, n) {
2923
+ function zn(e, t, n) {
2863
2924
  let r = Number.parseInt(e, t);
2864
2925
  return r >= 0 && r <= 1114111 ? String.fromCodePoint(r) : n + e + ";";
2865
2926
  }
2866
- var Mn = H.getMetaDataSymbol();
2867
- function Nn(e, t) {
2868
- return Pn(e, t);
2927
+ var Bn = H.getMetaDataSymbol();
2928
+ function Vn(e, t) {
2929
+ return Hn(e, t);
2869
2930
  }
2870
- function Pn(e, t, n) {
2931
+ function Hn(e, t, n) {
2871
2932
  let r, i = {};
2872
2933
  for (let a = 0; a < e.length; a++) {
2873
- let o = e[a], s = Fn(o), c = "";
2934
+ let o = e[a], s = Un(o), c = "";
2874
2935
  if (c = n === void 0 ? s : n + "." + s, s === t.textNodeName) r === void 0 ? r = o[s] : r += "" + o[s];
2875
2936
  else {
2876
2937
  if (s === void 0) continue;
2877
2938
  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;
2939
+ let e = Hn(o[s], t, c), n = Gn(e, t);
2940
+ o[Bn] !== void 0 && (e[Bn] = o[Bn]), o[":@"] ? Wn(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
2941
  }
2881
2942
  }
2882
2943
  }
2883
2944
  return typeof r == "string" ? r.length > 0 && (i[t.textNodeName] = r) : r !== void 0 && (i[t.textNodeName] = r), i;
2884
2945
  }
2885
- function Fn(e) {
2946
+ function Un(e) {
2886
2947
  let t = Object.keys(e);
2887
2948
  for (let e = 0; e < t.length; e++) {
2888
2949
  let n = t[e];
2889
2950
  if (n !== ":@") return n;
2890
2951
  }
2891
2952
  }
2892
- function In(e, t, n, r) {
2953
+ function Wn(e, t, n, r) {
2893
2954
  if (t) {
2894
2955
  let i = Object.keys(t), a = i.length;
2895
2956
  for (let o = 0; o < a; o++) {
@@ -2898,18 +2959,18 @@ function In(e, t, n, r) {
2898
2959
  }
2899
2960
  }
2900
2961
  }
2901
- function Ln(e, t) {
2962
+ function Gn(e, t) {
2902
2963
  let { textNodeName: n } = t, r = Object.keys(e).length;
2903
2964
  return r === 0 || !(r !== 1 || !e[n] && typeof e[n] != "boolean" && e[n] !== 0);
2904
2965
  }
2905
- var Rn = {
2966
+ var Kn = {
2906
2967
  allowBooleanAttributes: !1,
2907
2968
  unpairedTags: []
2908
2969
  };
2909
- function zn(e) {
2970
+ function qn(e) {
2910
2971
  return e === " " || e === " " || e === "\n" || e === "\r";
2911
2972
  }
2912
- function Bn(e, t) {
2973
+ function Jn(e, t) {
2913
2974
  let n = t;
2914
2975
  for (; t < e.length; t++) if (!(e[t] != "?" && e[t] != " ")) {
2915
2976
  let r = e.substr(n, t - n);
@@ -2921,7 +2982,7 @@ function Bn(e, t) {
2921
2982
  }
2922
2983
  return t;
2923
2984
  }
2924
- function Vn(e, t) {
2985
+ function Yn(e, t) {
2925
2986
  if (e.length > t + 5 && e[t + 1] === "-" && e[t + 2] === "-") {
2926
2987
  for (t += 3; t < e.length; t++) if (e[t] === "-" && e[t + 1] === "-" && e[t + 2] === ">") {
2927
2988
  t += 2;
@@ -2939,7 +3000,7 @@ function Vn(e, t) {
2939
3000
  }
2940
3001
  return t;
2941
3002
  }
2942
- function Hn(e, t) {
3003
+ function Xn(e, t) {
2943
3004
  let n = "", r = "", i = !1;
2944
3005
  for (; t < e.length; t++) {
2945
3006
  if (e[t] === "\"" || e[t] === "'") r === "" ? r = e[t] : r !== e[t] || (r = "");
@@ -2955,21 +3016,21 @@ function Hn(e, t) {
2955
3016
  tagClosed: i
2956
3017
  };
2957
3018
  }
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 = {};
3019
+ var Zn = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
3020
+ function Qn(e, t) {
3021
+ let n = hn(e, Zn), r = {};
2961
3022
  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]));
3023
+ if (n[e][1].length === 0) return K("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", tr(n[e]));
3024
+ if (n[e][3] !== void 0 && n[e][4] === void 0) return K("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", tr(n[e]));
3025
+ if (n[e][3] === void 0 && !t.allowBooleanAttributes) return K("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", tr(n[e]));
2965
3026
  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]));
3027
+ if (!er(i)) return K("InvalidAttr", "Attribute '" + i + "' is an invalid name.", tr(n[e]));
3028
+ if (r.hasOwnProperty(i)) return K("InvalidAttr", "Attribute '" + i + "' is repeated.", tr(n[e]));
2968
3029
  r[i] = 1;
2969
3030
  }
2970
3031
  return !0;
2971
3032
  }
2972
- function Gn(e, t) {
3033
+ function $n(e, t) {
2973
3034
  if (e[++t] === ";") return -1;
2974
3035
  if (e[t] === "#") return function(e, t) {
2975
3036
  let n = /\d/;
@@ -2994,8 +3055,8 @@ function K(e, t, n) {
2994
3055
  col: n.col
2995
3056
  } };
2996
3057
  }
2997
- function Kn(e) {
2998
- return cn(e);
3058
+ function er(e) {
3059
+ return gn(e);
2999
3060
  }
3000
3061
  function q(e, t) {
3001
3062
  let n = e.substring(0, t).split(/\r?\n/);
@@ -3004,13 +3065,13 @@ function q(e, t) {
3004
3065
  col: n[n.length - 1].length + 1
3005
3066
  };
3006
3067
  }
3007
- function qn(e) {
3068
+ function tr(e) {
3008
3069
  return e.startIndex + e[1].length;
3009
3070
  }
3010
- var Jn = class {
3071
+ var nr = class {
3011
3072
  constructor(e) {
3012
3073
  this.externalEntities = {}, this.options = function(e) {
3013
- return Object.assign({}, an, e);
3074
+ return Object.assign({}, pn, e);
3014
3075
  }(e);
3015
3076
  }
3016
3077
  parse(e, t) {
@@ -3019,20 +3080,20 @@ var Jn = class {
3019
3080
  if (t) {
3020
3081
  !0 === t && (t = {});
3021
3082
  let n = function(e, t) {
3022
- t = Object.assign({}, Rn, t);
3083
+ t = Object.assign({}, Kn, t);
3023
3084
  let n = [], r = !1, i = !1;
3024
3085
  e[0] === "" && (e = e.substr(1));
3025
3086
  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;
3087
+ if (a += 2, a = Jn(e, a), a.err) return a;
3027
3088
  } else {
3028
3089
  if (e[a] !== "<") {
3029
- if (zn(e[a])) continue;
3090
+ if (qn(e[a])) continue;
3030
3091
  return K("InvalidChar", "char '" + e[a] + "' is not expected.", q(e, a));
3031
3092
  }
3032
3093
  {
3033
3094
  let o = a;
3034
3095
  if (a++, e[a] === "!") {
3035
- a = Vn(e, a);
3096
+ a = Yn(e, a);
3036
3097
  continue;
3037
3098
  }
3038
3099
  {
@@ -3040,17 +3101,17 @@ var Jn = class {
3040
3101
  e[a] === "/" && (s = !0, a++);
3041
3102
  let c = "";
3042
3103
  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)) {
3104
+ if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !gn(c)) {
3044
3105
  let t;
3045
3106
  return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", K("InvalidTag", t, q(e, a));
3046
3107
  }
3047
- let l = Hn(e, a);
3108
+ let l = Xn(e, a);
3048
3109
  if (!1 === l) return K("InvalidAttr", "Attributes for '" + c + "' have open quote.", q(e, a));
3049
3110
  let u = l.value;
3050
3111
  if (a = l.index, u[u.length - 1] === "/") {
3051
3112
  let n = a - u.length;
3052
3113
  u = u.substring(0, u.length - 1);
3053
- let i = Wn(u, t);
3114
+ let i = Qn(u, t);
3054
3115
  if (!0 !== i) return K(i.err.code, i.err.msg, q(e, n + i.err.line));
3055
3116
  r = !0;
3056
3117
  } else if (s) {
@@ -3066,7 +3127,7 @@ var Jn = class {
3066
3127
  n.length == 0 && (i = !0);
3067
3128
  }
3068
3129
  } else {
3069
- let s = Wn(u, t);
3130
+ let s = Qn(u, t);
3070
3131
  if (!0 !== s) return K(s.err.code, s.err.msg, q(e, a - u.length + s.err.line));
3071
3132
  if (!0 === i) return K("InvalidXml", "Multiple possible root nodes found.", q(e, a));
3072
3133
  t.unpairedTags.indexOf(c) !== -1 || n.push({
@@ -3076,16 +3137,16 @@ var Jn = class {
3076
3137
  }
3077
3138
  for (a++; a < e.length; a++) if (e[a] === "<") {
3078
3139
  if (e[a + 1] === "!") {
3079
- a++, a = Vn(e, a);
3140
+ a++, a = Yn(e, a);
3080
3141
  continue;
3081
3142
  }
3082
3143
  if (e[a + 1] !== "?") break;
3083
- if (a = Bn(e, ++a), a.err) return a;
3144
+ if (a = Jn(e, ++a), a.err) return a;
3084
3145
  } else if (e[a] === "&") {
3085
- let t = Gn(e, a);
3146
+ let t = $n(e, a);
3086
3147
  if (t == -1) return K("InvalidChar", "char '&' is not expected.", q(e, a));
3087
3148
  a = t;
3088
- } else if (!0 === i && !zn(e[a])) return K("InvalidXml", "Extra text at the end", q(e, a));
3149
+ } else if (!0 === i && !qn(e[a])) return K("InvalidXml", "Extra text at the end", q(e, a));
3089
3150
  e[a] === "<" && a--;
3090
3151
  }
3091
3152
  }
@@ -3097,10 +3158,10 @@ var Jn = class {
3097
3158
  }(e, t);
3098
3159
  if (!0 !== n) throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
3099
3160
  }
3100
- let n = new _n(this.options);
3161
+ let n = new Tn(this.options);
3101
3162
  n.addExternalEntities(this.externalEntities);
3102
3163
  let r = n.parseXml(e);
3103
- return this.options.preserveOrder || r === void 0 ? r : Nn(r, this.options);
3164
+ return this.options.preserveOrder || r === void 0 ? r : Vn(r, this.options);
3104
3165
  }
3105
3166
  addEntity(e, t) {
3106
3167
  if (t.indexOf("&") !== -1) throw Error("Entity value can't have '&'");
@@ -3111,34 +3172,34 @@ var Jn = class {
3111
3172
  static getMetaDataSymbol() {
3112
3173
  return H.getMetaDataSymbol();
3113
3174
  }
3114
- }, Yn = k(829), J = k.n(Yn), Y = function(e) {
3175
+ }, rr = k(829), J = k.n(rr), Y = function(e) {
3115
3176
  return e.Array = "array", e.Object = "object", e.Original = "original", e;
3116
3177
  }(Y || {});
3117
- function Xn(e, t) {
3178
+ function ir(e, t) {
3118
3179
  if (!e.endsWith("propstat.prop.displayname")) return t;
3119
3180
  }
3120
- function Zn(e, t) {
3181
+ function ar(e, t) {
3121
3182
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Y.Original, r = J().get(e, t);
3122
3183
  return n === "array" && !1 === Array.isArray(r) ? [r] : n === "object" && Array.isArray(r) ? r[0] : r;
3123
3184
  }
3124
- function Qn(e, t) {
3185
+ function or(e, t) {
3125
3186
  return t ??= {
3126
3187
  attributeNamePrefix: "@",
3127
3188
  attributeParsers: [],
3128
- tagParsers: [Xn]
3189
+ tagParsers: [ir]
3129
3190
  }, new Promise(((n) => {
3130
3191
  n(function(e) {
3131
3192
  let { multistatus: t } = e;
3132
3193
  if (t === "") return { multistatus: { response: [] } };
3133
3194
  if (!t) throw Error("Invalid response: No root multistatus found");
3134
3195
  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) {
3196
+ return J().set(n, "multistatus.response", ar(n, "multistatus.response", Y.Array)), J().set(n, "multistatus.response", J().get(n, "multistatus.response").map(((e) => function(e) {
3136
3197
  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;
3198
+ return t.status ? J().set(t, "status", ar(t, "status", Y.Object)) : (J().set(t, "propstat", ar(t, "propstat", Y.Object)), J().set(t, "propstat.prop", ar(t, "propstat.prop", Y.Object))), t;
3138
3199
  }(e)))), n;
3139
3200
  }(function(e) {
3140
3201
  let { attributeNamePrefix: t, attributeParsers: n, tagParsers: r } = e;
3141
- return new Jn({
3202
+ return new nr({
3142
3203
  allowBooleanAttributes: !0,
3143
3204
  attributeNamePrefix: t,
3144
3205
  textNodeName: "text",
@@ -3166,10 +3227,10 @@ function Qn(e, t) {
3166
3227
  }(t).parse(e)));
3167
3228
  }));
3168
3229
  }
3169
- function $n(e, t) {
3230
+ function sr(e, t) {
3170
3231
  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
3232
  filename: t,
3172
- basename: je().basename(t),
3233
+ basename: ze().basename(t),
3173
3234
  lastmod: r,
3174
3235
  size: parseInt(i, 10),
3175
3236
  type: c,
@@ -3177,7 +3238,7 @@ function $n(e, t) {
3177
3238
  };
3178
3239
  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
3240
  }
3180
- function er(e, t) {
3241
+ function cr(e, t) {
3181
3242
  let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = null;
3182
3243
  try {
3183
3244
  e.multistatus.response[0].propstat && (r = e.multistatus.response[0]);
@@ -3188,9 +3249,9 @@ function er(e, t) {
3188
3249
  let e = /* @__PURE__ */ Error(`Invalid response: ${l} ${c}`);
3189
3250
  throw e.status = l, e;
3190
3251
  }
3191
- return $n(i, Fe(t), n);
3252
+ return sr(i, Ue(t), n);
3192
3253
  }
3193
- function tr(e) {
3254
+ function lr(e) {
3194
3255
  switch (String(e)) {
3195
3256
  case "-3": return "unlimited";
3196
3257
  case "-2":
@@ -3198,10 +3259,10 @@ function tr(e) {
3198
3259
  default: return parseInt(String(e), 10);
3199
3260
  }
3200
3261
  }
3201
- function nr(e, t, n) {
3262
+ function ur(e, t, n) {
3202
3263
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3203
3264
  }
3204
- var rr = function(e) {
3265
+ var dr = function(e) {
3205
3266
  return function() {
3206
3267
  var t = [...arguments];
3207
3268
  try {
@@ -3212,7 +3273,7 @@ var rr = function(e) {
3212
3273
  };
3213
3274
  }((function(e, t) {
3214
3275
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { details: r = !1 } = n;
3215
- return nr(F(I({
3276
+ return ur(F(I({
3216
3277
  url: M(e.remoteURL, j(t)),
3217
3278
  method: "PROPFIND",
3218
3279
  headers: {
@@ -3220,34 +3281,34 @@ var rr = function(e) {
3220
3281
  Depth: "0"
3221
3282
  }
3222
3283
  }, 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);
3284
+ return B(e, n), ur(n.text(), (function(i) {
3285
+ return ur(or(i, e.parsing), (function(e) {
3286
+ return V(n, cr(e, t, r), r);
3226
3287
  }));
3227
3288
  }));
3228
3289
  }));
3229
3290
  }));
3230
- function ir(e, t, n) {
3291
+ function fr(e, t, n) {
3231
3292
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3232
3293
  }
3233
- var ar = or((function(e, t) {
3294
+ var pr = mr((function(e, t) {
3234
3295
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = function(e) {
3235
3296
  if (!e || e === "/") return [];
3236
3297
  let t = e, n = [];
3237
3298
  do
3238
- n.push(t), t = je().dirname(t);
3299
+ n.push(t), t = ze().dirname(t);
3239
3300
  while (t && t !== "/");
3240
3301
  return n;
3241
- }(Fe(t));
3302
+ }(Ue(t));
3242
3303
  r.sort(((e, t) => e.length > t.length ? 1 : t.length > e.length ? -1 : 0));
3243
3304
  let i = !1;
3244
3305
  return function(e, t, n) {
3245
- if (typeof e[lr] == "function") {
3246
- var r, i, a, o = e[lr]();
3306
+ if (typeof e[_r] == "function") {
3307
+ var r, i, a, o = e[_r]();
3247
3308
  function n(e) {
3248
3309
  try {
3249
3310
  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));
3311
+ if (!vr(e)) return void e.then(n, a ||= X.bind(null, i = new Z(), 2));
3251
3312
  e = e.v;
3252
3313
  }
3253
3314
  i ? X(i, 1, e) : i = e;
@@ -3276,7 +3337,7 @@ var ar = or((function(e, t) {
3276
3337
  return function o(s) {
3277
3338
  try {
3278
3339
  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));
3340
+ if (!vr(s)) return void s.then(o, i ||= X.bind(null, r = new Z(), 2));
3280
3341
  s = s.v;
3281
3342
  }
3282
3343
  r ? X(r, 1, s) : r = s;
@@ -3291,7 +3352,7 @@ var ar = or((function(e, t) {
3291
3352
  return a = function() {
3292
3353
  return function(n, i) {
3293
3354
  try {
3294
- var a = ir(rr(e, r), (function(e) {
3355
+ var a = fr(dr(e, r), (function(e) {
3295
3356
  if (e.type !== "directory") throw Error(`Path includes a file: ${t}`);
3296
3357
  }));
3297
3358
  } catch (e) {
@@ -3301,7 +3362,7 @@ var ar = or((function(e, t) {
3301
3362
  }(0, (function(t) {
3302
3363
  let a = t;
3303
3364
  return function() {
3304
- if (a.status === 404) return i = !0, cr(dr(e, r, {
3365
+ if (a.status === 404) return i = !0, gr(yr(e, r, {
3305
3366
  ...n,
3306
3367
  recursive: !1
3307
3368
  }));
@@ -3309,7 +3370,7 @@ var ar = or((function(e, t) {
3309
3370
  }();
3310
3371
  }));
3311
3372
  }, (o = function() {
3312
- if (i) return cr(dr(e, r, {
3373
+ if (i) return gr(yr(e, r, {
3313
3374
  ...n,
3314
3375
  recursive: !1
3315
3376
  }));
@@ -3319,7 +3380,7 @@ var ar = or((function(e, t) {
3319
3380
  return !1;
3320
3381
  }));
3321
3382
  }));
3322
- function or(e) {
3383
+ function mr(e) {
3323
3384
  return function() {
3324
3385
  var t = [...arguments];
3325
3386
  try {
@@ -3329,11 +3390,11 @@ function or(e) {
3329
3390
  }
3330
3391
  };
3331
3392
  }
3332
- function sr() {}
3333
- function cr(e, t) {
3334
- if (!t) return e && e.then ? e.then(sr) : Promise.resolve();
3393
+ function hr() {}
3394
+ function gr(e, t) {
3395
+ if (!t) return e && e.then ? e.then(hr) : Promise.resolve();
3335
3396
  }
3336
- var lr = typeof Symbol < "u" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
3397
+ var _r = typeof Symbol < "u" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
3337
3398
  function X(e, t, n) {
3338
3399
  if (!e.s) {
3339
3400
  if (n instanceof Z) {
@@ -3372,21 +3433,21 @@ var Z = function() {
3372
3433
  }, r;
3373
3434
  }, e;
3374
3435
  }();
3375
- function ur(e) {
3436
+ function vr(e) {
3376
3437
  return e instanceof Z && 1 & e.s;
3377
3438
  }
3378
- var dr = or((function(e, t) {
3439
+ var yr = mr((function(e, t) {
3379
3440
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3380
- if (!0 === n.recursive) return ar(e, t, n);
3441
+ if (!0 === n.recursive) return pr(e, t, n);
3381
3442
  let r = I({
3382
3443
  url: M(e.remoteURL, (i = j(t), i.endsWith("/") ? i : i + "/")),
3383
3444
  method: "MKCOL"
3384
3445
  }, e, n);
3385
3446
  var i;
3386
- return ir(F(r, e), (function(t) {
3447
+ return fr(F(r, e), (function(t) {
3387
3448
  B(e, t);
3388
3449
  }));
3389
- })), fr = k(388), pr = k.n(fr), mr = function(e) {
3450
+ })), br = k(388), xr = k.n(br), Sr = function(e) {
3390
3451
  return function() {
3391
3452
  var t = [...arguments];
3392
3453
  try {
@@ -3416,7 +3477,7 @@ var dr = or((function(e, t) {
3416
3477
  }), 0), t.body;
3417
3478
  }, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
3418
3479
  var a, o;
3419
- })), hr = () => {}, gr = function(e) {
3480
+ })), Cr = () => {}, wr = function(e) {
3420
3481
  return function() {
3421
3482
  var t = [...arguments];
3422
3483
  try {
@@ -3432,7 +3493,7 @@ var dr = or((function(e, t) {
3432
3493
  return B(e, t), t;
3433
3494
  }, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3434
3495
  var i, a;
3435
- })), _r = function(e) {
3496
+ })), Tr = function(e) {
3436
3497
  return function() {
3437
3498
  var t = [...arguments];
3438
3499
  try {
@@ -3450,7 +3511,7 @@ var dr = or((function(e, t) {
3450
3511
  B(e, t);
3451
3512
  }, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3452
3513
  var i, a;
3453
- })), vr = function(e) {
3514
+ })), Er = function(e) {
3454
3515
  return function() {
3455
3516
  var t = [...arguments];
3456
3517
  try {
@@ -3463,7 +3524,7 @@ var dr = or((function(e, t) {
3463
3524
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3464
3525
  return function(r, i) {
3465
3526
  try {
3466
- var a = (o = rr(e, t, n), s = function() {
3527
+ var a = (o = dr(e, t, n), s = function() {
3467
3528
  return !0;
3468
3529
  }, c ? s ? s(o) : o : (o && o.then || (o = Promise.resolve(o)), s ? o.then(s) : o));
3469
3530
  } catch (e) {
@@ -3476,10 +3537,10 @@ var dr = or((function(e, t) {
3476
3537
  throw e;
3477
3538
  }));
3478
3539
  }));
3479
- function yr(e, t, n) {
3540
+ function Dr(e, t, n) {
3480
3541
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3481
3542
  }
3482
- var br = function(e) {
3543
+ var Or = function(e) {
3483
3544
  return function() {
3484
3545
  var t = [...arguments];
3485
3546
  try {
@@ -3490,7 +3551,7 @@ var br = function(e) {
3490
3551
  };
3491
3552
  }((function(e, t) {
3492
3553
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3493
- return yr(F(I({
3554
+ return Dr(F(I({
3494
3555
  url: M(e.remoteURL, j(t), "/"),
3495
3556
  method: "PROPFIND",
3496
3557
  headers: {
@@ -3498,11 +3559,11 @@ var br = function(e) {
3498
3559
  Depth: n.deep ? "infinity" : "1"
3499
3560
  }
3500
3561
  }, e, n), e), (function(r) {
3501
- return B(e, r), yr(r.text(), (function(i) {
3562
+ return B(e, r), Dr(r.text(), (function(i) {
3502
3563
  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) => {
3564
+ return Dr(or(i, e.parsing), (function(i) {
3565
+ let a = He(t), o = function(e, t, n) {
3566
+ let r = arguments.length > 3 && arguments[3] !== void 0 && arguments[3], i = arguments.length > 4 && arguments[4] !== void 0 && arguments[4], a = ze().join(t, "/"), { multistatus: { response: o } } = e, s = o.map(((e) => {
3506
3567
  let t = function(e) {
3507
3568
  try {
3508
3569
  return e.replace(/^https?:\/\/[^\/]+/, "");
@@ -3510,10 +3571,10 @@ var br = function(e) {
3510
3571
  throw new A(e, "Failed normalising HREF");
3511
3572
  }
3512
3573
  }(e.href), { propstat: { prop: n } } = e;
3513
- return $n(n, a === "/" ? decodeURIComponent(Fe(t)) : Fe(je().relative(decodeURIComponent(a), decodeURIComponent(t))), r);
3574
+ return sr(n, a === "/" ? decodeURIComponent(Ue(t)) : Ue(ze().relative(decodeURIComponent(a), decodeURIComponent(t))), r);
3514
3575
  }));
3515
3576
  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);
3577
+ }(i, He(e.remoteBasePath || e.remotePath), a, n.details, n.includeSelf);
3517
3578
  return n.glob && (o = function(e, t) {
3518
3579
  return e.filter(((e) => L(e.filename, t, { matchBase: !0 })));
3519
3580
  }(o, n.glob)), V(r, o, n.details);
@@ -3521,7 +3582,7 @@ var br = function(e) {
3521
3582
  }));
3522
3583
  }));
3523
3584
  }));
3524
- function xr(e) {
3585
+ function kr(e) {
3525
3586
  return function() {
3526
3587
  var t = [...arguments];
3527
3588
  try {
@@ -3531,25 +3592,25 @@ function xr(e) {
3531
3592
  }
3532
3593
  };
3533
3594
  }
3534
- var Sr = xr((function(e, t) {
3595
+ var Ar = kr((function(e, t) {
3535
3596
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3536
- return Cr(F(I({
3597
+ return jr(F(I({
3537
3598
  url: M(e.remoteURL, j(t)),
3538
3599
  method: "GET",
3539
3600
  headers: { Accept: "text/plain" },
3540
- transformResponse: [Er]
3601
+ transformResponse: [Pr]
3541
3602
  }, e, n), e), (function(t) {
3542
- return B(e, t), Cr(t.text(), (function(e) {
3603
+ return B(e, t), jr(t.text(), (function(e) {
3543
3604
  return V(t, e, n.details);
3544
3605
  }));
3545
3606
  }));
3546
3607
  }));
3547
- function Cr(e, t, n) {
3608
+ function jr(e, t, n) {
3548
3609
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3549
3610
  }
3550
- var wr = xr((function(e, t) {
3611
+ var Mr = kr((function(e, t) {
3551
3612
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3552
- return Cr(F(I({
3613
+ return jr(F(I({
3553
3614
  url: M(e.remoteURL, j(t)),
3554
3615
  method: "GET"
3555
3616
  }, e, n), e), (function(t) {
@@ -3558,31 +3619,31 @@ var wr = xr((function(e, t) {
3558
3619
  var n = e();
3559
3620
  return n && n.then ? n.then(t) : t();
3560
3621
  }((function() {
3561
- return Cr(t.arrayBuffer(), (function(e) {
3622
+ return jr(t.arrayBuffer(), (function(e) {
3562
3623
  r = e;
3563
3624
  }));
3564
3625
  }), (function() {
3565
3626
  return V(t, r, n.details);
3566
3627
  }));
3567
3628
  }));
3568
- })), Tr = xr((function(e, t) {
3629
+ })), Nr = kr((function(e, t) {
3569
3630
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { format: r = "binary" } = n;
3570
3631
  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) {
3632
+ return r === "text" ? Ar(e, t, n) : Mr(e, t, n);
3633
+ })), Pr = (e) => e;
3634
+ function Fr(e, t) {
3574
3635
  let n = "";
3575
- return t.format && t.indentBy.length > 0 && (n = "\n"), Or(e, t, "", n);
3636
+ return t.format && t.indentBy.length > 0 && (n = "\n"), Ir(e, t, "", n);
3576
3637
  }
3577
- function Or(e, t, n, r) {
3638
+ function Ir(e, t, n, r) {
3578
3639
  let i = "", a = !1;
3579
3640
  for (let o = 0; o < e.length; o++) {
3580
- let s = e[o], c = kr(s);
3641
+ let s = e[o], c = Lr(s);
3581
3642
  if (c === void 0) continue;
3582
3643
  let l = "";
3583
3644
  if (l = n.length === 0 ? c : `${n}.${c}`, c === t.textNodeName) {
3584
3645
  let e = s[c];
3585
- jr(l, t) || (e = t.tagValueProcessor(c, e), e = Mr(e, t)), a && (i += r), i += e, a = !1;
3646
+ zr(l, t) || (e = t.tagValueProcessor(c, e), e = Br(e, t)), a && (i += r), i += e, a = !1;
3586
3647
  continue;
3587
3648
  }
3588
3649
  if (c === t.cdataPropName) {
@@ -3594,46 +3655,46 @@ function Or(e, t, n, r) {
3594
3655
  continue;
3595
3656
  }
3596
3657
  if (c[0] === "?") {
3597
- let e = Ar(s[":@"], t), n = c === "?xml" ? "" : r, o = s[c][0][t.textNodeName];
3658
+ let e = Rr(s[":@"], t), n = c === "?xml" ? "" : r, o = s[c][0][t.textNodeName];
3598
3659
  o = o.length === 0 ? "" : " " + o, i += n + `<${c}${o}${e}?>`, a = !0;
3599
3660
  continue;
3600
3661
  }
3601
3662
  let u = r;
3602
3663
  u !== "" && (u += t.indentBy);
3603
- let d = r + `<${c}${Ar(s[":@"], t)}`, f = Or(s[c], t, l, u);
3664
+ let d = r + `<${c}${Rr(s[":@"], t)}`, f = Ir(s[c], t, l, u);
3604
3665
  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
3666
  }
3606
3667
  return i;
3607
3668
  }
3608
- function kr(e) {
3669
+ function Lr(e) {
3609
3670
  let t = Object.keys(e);
3610
3671
  for (let n = 0; n < t.length; n++) {
3611
3672
  let r = t[n];
3612
3673
  if (e.hasOwnProperty(r) && r !== ":@") return r;
3613
3674
  }
3614
3675
  }
3615
- function Ar(e, t) {
3676
+ function Rr(e, t) {
3616
3677
  let n = "";
3617
3678
  if (e && !t.ignoreAttributes) for (let r in e) {
3618
3679
  if (!e.hasOwnProperty(r)) continue;
3619
3680
  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}"`;
3681
+ i = Br(i, t), !0 === i && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${i}"`;
3621
3682
  }
3622
3683
  return n;
3623
3684
  }
3624
- function jr(e, t) {
3685
+ function zr(e, t) {
3625
3686
  let n = (e = e.substr(0, e.length - t.textNodeName.length - 1)).substr(e.lastIndexOf(".") + 1);
3626
3687
  for (let r in t.stopNodes) if (t.stopNodes[r] === e || t.stopNodes[r] === "*." + n) return !0;
3627
3688
  return !1;
3628
3689
  }
3629
- function Mr(e, t) {
3690
+ function Br(e, t) {
3630
3691
  if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
3631
3692
  let r = t.entities[n];
3632
3693
  e = e.replace(r.regex, r.val);
3633
3694
  }
3634
3695
  return e;
3635
3696
  }
3636
- var Nr = {
3697
+ var Vr = {
3637
3698
  attributeNamePrefix: "@_",
3638
3699
  attributesGroupName: !1,
3639
3700
  textNodeName: "#text",
@@ -3680,44 +3741,44 @@ var Nr = {
3680
3741
  oneListGroup: !1
3681
3742
  };
3682
3743
  function Q(e) {
3683
- this.options = Object.assign({}, Nr, e), !0 === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
3744
+ this.options = Object.assign({}, Vr, e), !0 === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
3684
3745
  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() {
3746
+ } : (this.ignoreAttributesFn = wn(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Wr), this.processTextOrObjNode = Hr, this.options.format ? (this.indentate = Ur, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
3686
3747
  return "";
3687
3748
  }, this.tagEndChar = ">", this.newLine = "");
3688
3749
  }
3689
- function Pr(e, t, n, r) {
3750
+ function Hr(e, t, n, r) {
3690
3751
  let i = this.j2x(e, n + 1, r.concat(t));
3691
3752
  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
3753
  }
3693
- function Fr(e) {
3754
+ function Ur(e) {
3694
3755
  return this.options.indentBy.repeat(e);
3695
3756
  }
3696
- function Ir(e) {
3757
+ function Wr(e) {
3697
3758
  return !(!e.startsWith(this.options.attributeNamePrefix) || e === this.options.textNodeName) && e.substr(this.attrPrefixLen);
3698
3759
  }
3699
- function Lr(e) {
3760
+ function Gr(e) {
3700
3761
  return new Q({
3701
3762
  attributeNamePrefix: "@_",
3702
3763
  format: !0,
3703
3764
  ignoreAttributes: !1,
3704
3765
  suppressEmptyNode: !0
3705
- }).build(Rr({ lockinfo: {
3766
+ }).build(Kr({ lockinfo: {
3706
3767
  "@_xmlns:d": "DAV:",
3707
3768
  lockscope: { exclusive: {} },
3708
3769
  locktype: { write: {} },
3709
3770
  owner: { href: e }
3710
3771
  } }, "d"));
3711
3772
  }
3712
- function Rr(e, t) {
3773
+ function Kr(e, t) {
3713
3774
  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]));
3775
+ for (let e in n) n.hasOwnProperty(e) && (n[e] && typeof n[e] == "object" && e.indexOf(":") === -1 ? (n[`${t}:${e}`] = Kr(n[e], t), delete n[e]) : !1 === /^@_/.test(e) && (n[`${t}:${e}`] = n[e], delete n[e]));
3715
3776
  return n;
3716
3777
  }
3717
- function zr(e, t, n) {
3778
+ function qr(e, t, n) {
3718
3779
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3719
3780
  }
3720
- function Br(e) {
3781
+ function Jr(e) {
3721
3782
  return function() {
3722
3783
  var t = [...arguments];
3723
3784
  try {
@@ -3728,7 +3789,7 @@ function Br(e) {
3728
3789
  };
3729
3790
  }
3730
3791
  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);
3792
+ return this.options.preserveOrder ? Fr(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
3793
  }, Q.prototype.j2x = function(e, t, n) {
3733
3794
  let r = "", i = "", a = n.join(".");
3734
3795
  for (let o in e) if (Object.prototype.hasOwnProperty.call(e, o)) if (e[o] === void 0) this.isAttribute(o) && (i += "");
@@ -3790,45 +3851,45 @@ Q.prototype.build = function(e) {
3790
3851
  }
3791
3852
  return e;
3792
3853
  };
3793
- var Vr = Br((function(e, t, n) {
3854
+ var Yr = Jr((function(e, t, n) {
3794
3855
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
3795
- return zr(F(I({
3856
+ return qr(F(I({
3796
3857
  url: M(e.remoteURL, j(t)),
3797
3858
  method: "UNLOCK",
3798
3859
  headers: { "Lock-Token": n }
3799
3860
  }, e, r), e), (function(t) {
3800
- if (B(e, t), t.status !== 204 && t.status !== 200) throw tn(t);
3861
+ if (B(e, t), t.status !== 204 && t.status !== 200) throw un(t);
3801
3862
  }));
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 = {
3863
+ })), Xr = Jr((function(e, t) {
3864
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { refreshToken: r, timeout: i = Zr } = n, a = {
3804
3865
  Accept: "text/plain,application/xml",
3805
3866
  Timeout: i
3806
3867
  };
3807
- return r && (a.If = r), zr(F(I({
3868
+ return r && (a.If = r), qr(F(I({
3808
3869
  url: M(e.remoteURL, j(t)),
3809
3870
  method: "LOCK",
3810
3871
  headers: a,
3811
- data: Lr(e.contactHref)
3872
+ data: Gr(e.contactHref)
3812
3873
  }, e, n), e), (function(t) {
3813
- return B(e, t), zr(t.text(), (function(e) {
3814
- let n = (a = e, new Jn({
3874
+ return B(e, t), qr(t.text(), (function(e) {
3875
+ let n = (a = e, new nr({
3815
3876
  removeNSPrefix: !0,
3816
3877
  parseAttributeValue: !0,
3817
3878
  parseTagValue: !0
3818
3879
  }).parse(a)), r = J().get(n, "prop.lockdiscovery.activelock.locktoken.href"), i = J().get(n, "prop.lockdiscovery.activelock.timeout");
3819
3880
  var a;
3820
- if (!r) throw tn(t, "No lock token received: ");
3881
+ if (!r) throw un(t, "No lock token received: ");
3821
3882
  return {
3822
3883
  token: r,
3823
3884
  serverTimeout: i
3824
3885
  };
3825
3886
  }));
3826
3887
  }));
3827
- })), Ur = "Infinite, Second-4100000000";
3828
- function Wr(e, t, n) {
3888
+ })), Zr = "Infinite, Second-4100000000";
3889
+ function Qr(e, t, n) {
3829
3890
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3830
3891
  }
3831
- var Gr = function(e) {
3892
+ var $r = function(e) {
3832
3893
  return function() {
3833
3894
  var t = [...arguments];
3834
3895
  try {
@@ -3839,7 +3900,7 @@ var Gr = function(e) {
3839
3900
  };
3840
3901
  }((function(e) {
3841
3902
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.path || "/";
3842
- return Wr(F(I({
3903
+ return Qr(F(I({
3843
3904
  url: M(e.remoteURL, n),
3844
3905
  method: "PROPFIND",
3845
3906
  headers: {
@@ -3847,14 +3908,14 @@ var Gr = function(e) {
3847
3908
  Depth: "0"
3848
3909
  }
3849
3910
  }, e, t), e), (function(n) {
3850
- return B(e, n), Wr(n.text(), (function(r) {
3851
- return Wr(Qn(r, e.parsing), (function(e) {
3911
+ return B(e, n), Qr(n.text(), (function(r) {
3912
+ return Qr(or(r, e.parsing), (function(e) {
3852
3913
  return V(n, function(e) {
3853
3914
  try {
3854
3915
  let [t] = e.multistatus.response, { propstat: { prop: { "quota-used-bytes": n, "quota-available-bytes": r } } } = t;
3855
3916
  return n !== void 0 && r !== void 0 ? {
3856
3917
  used: parseInt(String(n), 10),
3857
- available: tr(r)
3918
+ available: lr(r)
3858
3919
  } : null;
3859
3920
  } catch {}
3860
3921
  return null;
@@ -3863,10 +3924,10 @@ var Gr = function(e) {
3863
3924
  }));
3864
3925
  }));
3865
3926
  }));
3866
- function Kr(e, t, n) {
3927
+ function ei(e, t, n) {
3867
3928
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3868
3929
  }
3869
- var qr = function(e) {
3930
+ var ti = function(e) {
3870
3931
  return function() {
3871
3932
  var t = [...arguments];
3872
3933
  try {
@@ -3877,7 +3938,7 @@ var qr = function(e) {
3877
3938
  };
3878
3939
  }((function(e, t) {
3879
3940
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { details: r = !1 } = n;
3880
- return Kr(F(I({
3941
+ return ei(F(I({
3881
3942
  url: M(e.remoteURL, j(t)),
3882
3943
  method: "SEARCH",
3883
3944
  headers: {
@@ -3885,8 +3946,8 @@ var qr = function(e) {
3885
3946
  "Content-Type": e.headers["Content-Type"] || "application/xml; charset=utf-8"
3886
3947
  }
3887
3948
  }, e, n), e), (function(n) {
3888
- return B(e, n), Kr(n.text(), (function(i) {
3889
- return Kr(Qn(i, e.parsing), (function(e) {
3949
+ return B(e, n), ei(n.text(), (function(i) {
3950
+ return ei(or(i, e.parsing), (function(e) {
3890
3951
  return V(n, function(e, t, n) {
3891
3952
  let r = {
3892
3953
  truncated: !1,
@@ -3895,13 +3956,13 @@ var qr = function(e) {
3895
3956
  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
3957
  if (e.propstat === void 0) return;
3897
3958
  let t = e.href.split("/").map(decodeURIComponent).join("/");
3898
- r.results.push($n(e.propstat.prop, t, n));
3959
+ r.results.push(sr(e.propstat.prop, t, n));
3899
3960
  })), r;
3900
3961
  }(e, t, r), r);
3901
3962
  }));
3902
3963
  }));
3903
3964
  }));
3904
- })), Jr = function(e) {
3965
+ })), ni = function(e) {
3905
3966
  return function() {
3906
3967
  var t = [...arguments];
3907
3968
  try {
@@ -3923,14 +3984,14 @@ var qr = function(e) {
3923
3984
  B(e, t);
3924
3985
  }, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
3925
3986
  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);
3987
+ })), ri = k(172);
3988
+ function ii(e) {
3989
+ if (ht(e)) return e.byteLength;
3990
+ if (gt(e)) return e.length;
3991
+ if (typeof e == "string") return (0, ri.d)(e);
3931
3992
  throw new A({ info: { code: P.DataTypeNoLength } }, "Cannot calculate data length: Invalid type");
3932
3993
  }
3933
- var Zr = function(e) {
3994
+ var ai = function(e) {
3934
3995
  return function() {
3935
3996
  var t = [...arguments];
3936
3997
  try {
@@ -3941,7 +4002,7 @@ var Zr = function(e) {
3941
4002
  };
3942
4003
  }((function(e, t, n) {
3943
4004
  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"] = "*");
4005
+ !1 === i || (o["Content-Length"] = typeof i == "number" ? `${i}` : `${ii(n)}`), a || (o["If-None-Match"] = "*");
3945
4006
  let s = I({
3946
4007
  url: M(e.remoteURL, j(t)),
3947
4008
  method: "PUT",
@@ -3959,7 +4020,7 @@ var Zr = function(e) {
3959
4020
  return !0;
3960
4021
  }, (c = F(s, e)) && c.then || (c = Promise.resolve(c)), l ? c.then(l) : c;
3961
4022
  var c, l;
3962
- })), Qr = function(e) {
4023
+ })), oi = function(e) {
3963
4024
  return function() {
3964
4025
  var t = [...arguments];
3965
4026
  try {
@@ -3986,10 +4047,10 @@ var Zr = function(e) {
3986
4047
  }, (i = F(r, e)) && i.then || (i = Promise.resolve(i)), a ? i.then(a) : i;
3987
4048
  var i, a;
3988
4049
  }));
3989
- function $r(e, t, n) {
4050
+ function si(e, t, n) {
3990
4051
  return n ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
3991
4052
  }
3992
- var ei = ri((function(e, t, n, r, i) {
4053
+ var ci = di((function(e, t, n, r, i) {
3993
4054
  let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
3994
4055
  if (n > r || n < 0) throw new A({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
3995
4056
  let o = {
@@ -3997,7 +4058,7 @@ var ei = ri((function(e, t, n, r, i) {
3997
4058
  "Content-Length": "" + (r - n + 1),
3998
4059
  "Content-Range": `bytes ${n}-${r}/*`
3999
4060
  };
4000
- return $r(F(I({
4061
+ return si(F(I({
4001
4062
  url: M(e.remoteURL, j(t)),
4002
4063
  method: "PUT",
4003
4064
  headers: o,
@@ -4006,11 +4067,11 @@ var ei = ri((function(e, t, n, r, i) {
4006
4067
  B(e, t);
4007
4068
  }));
4008
4069
  }));
4009
- function ti(e, t) {
4070
+ function li(e, t) {
4010
4071
  var n = e();
4011
4072
  return n && n.then ? n.then(t) : t(n);
4012
4073
  }
4013
- var ni = ri((function(e, t, n, r, i) {
4074
+ var ui = di((function(e, t, n, r, i) {
4014
4075
  let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
4015
4076
  if (n > r || n < 0) throw new A({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
4016
4077
  let o = {
@@ -4018,7 +4079,7 @@ var ni = ri((function(e, t, n, r, i) {
4018
4079
  "Content-Length": "" + (r - n + 1),
4019
4080
  "X-Update-Range": `bytes=${n}-${r}`
4020
4081
  };
4021
- return $r(F(I({
4082
+ return si(F(I({
4022
4083
  url: M(e.remoteURL, j(t)),
4023
4084
  method: "PATCH",
4024
4085
  headers: o,
@@ -4027,7 +4088,7 @@ var ni = ri((function(e, t, n, r, i) {
4027
4088
  B(e, t);
4028
4089
  }));
4029
4090
  }));
4030
- function ri(e) {
4091
+ function di(e) {
4031
4092
  return function() {
4032
4093
  var t = [...arguments];
4033
4094
  try {
@@ -4037,18 +4098,18 @@ function ri(e) {
4037
4098
  }
4038
4099
  };
4039
4100
  }
4040
- var ii = ri((function(e, t, n, r, i) {
4101
+ var fi = di((function(e, t, n, r, i) {
4041
4102
  let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
4042
- return $r(Qr(e, t, a), (function(o) {
4103
+ return si(oi(e, t, a), (function(o) {
4043
4104
  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) {
4105
+ return li((function() {
4106
+ if (o.compliance.includes("sabredav-partialupdate")) return si(ui(e, t, n, r, i, a), (function(e) {
4046
4107
  return s = !0, e;
4047
4108
  }));
4048
4109
  }), (function(c) {
4049
4110
  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) {
4111
+ return s ? c : li((function() {
4112
+ if (o.server.includes("Apache") && o.compliance.includes("<http://apache.org/dav/propset/fs/1>")) return si(ci(e, t, n, r, i, a), (function(e) {
4052
4113
  return l = !0, e;
4053
4114
  }));
4054
4115
  }), (function(e) {
@@ -4057,9 +4118,9 @@ var ii = ri((function(e, t, n, r, i) {
4057
4118
  }));
4058
4119
  }));
4059
4120
  }));
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;
4121
+ })), pi = "https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";
4122
+ function mi(e) {
4123
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { authType: n = null, remoteBasePath: r, contactHref: i = pi, ha1: a, headers: o = {}, httpAgent: s, httpsAgent: c, password: l, token: u, username: d, withCredentials: f } = t, p = n;
4063
4124
  p ||= d || l ? N.Password : N.None;
4064
4125
  let m = {
4065
4126
  authType: p,
@@ -4073,27 +4134,27 @@ function oi(e) {
4073
4134
  parsing: {
4074
4135
  attributeNamePrefix: t.attributeNamePrefix ?? "@",
4075
4136
  attributeParsers: [],
4076
- tagParsers: [Xn]
4137
+ tagParsers: [ir]
4077
4138
  },
4078
- remotePath: Ie(e),
4139
+ remotePath: We(e),
4079
4140
  remoteURL: e,
4080
4141
  token: u,
4081
4142
  username: d,
4082
4143
  withCredentials: f
4083
4144
  };
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),
4145
+ return tt(m, d, l, u, a), {
4146
+ copyFile: (e, t, n) => dn(m, e, t, n),
4147
+ createDirectory: (e, t) => yr(m, e, t),
4087
4148
  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) => {
4149
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = new (xr()).PassThrough();
4150
+ return Sr(e, t, n).then(((e) => {
4090
4151
  e.pipe(r);
4091
4152
  })).catch(((e) => {
4092
4153
  r.emit("error", e);
4093
4154
  })), r;
4094
4155
  }(m, e, t),
4095
4156
  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 = {};
4157
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : Cr, i = new (xr()).PassThrough(), a = {};
4097
4158
  return !1 === n.overwrite && (a["If-None-Match"] = "*"), F(I({
4098
4159
  url: M(e.remoteURL, j(t)),
4099
4160
  method: "PUT",
@@ -4108,17 +4169,17 @@ function oi(e) {
4108
4169
  i.emit("error", e);
4109
4170
  })), i;
4110
4171
  }(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),
4172
+ customRequest: (e, t) => wr(m, e, t),
4173
+ deleteFile: (e, t) => Tr(m, e, t),
4174
+ exists: (e, t) => Er(m, e, t),
4175
+ getDirectoryContents: (e, t) => Or(m, e, t),
4176
+ getFileContents: (e, t) => Nr(m, e, t),
4116
4177
  getFileDownloadLink: (e) => function(e, t) {
4117
4178
  let n = M(e.remoteURL, j(t)), r = /^https:/i.test(n) ? "https" : "http";
4118
4179
  switch (e.authType) {
4119
4180
  case N.None: break;
4120
4181
  case N.Password: {
4121
- let t = Ue(e.headers.Authorization.replace(/^Basic /i, "").trim());
4182
+ let t = Ze(e.headers.Authorization.replace(/^Basic /i, "").trim());
4122
4183
  n = n.replace(/^https?:\/\//, `${r}://${t}@`);
4123
4184
  break;
4124
4185
  }
@@ -4131,7 +4192,7 @@ function oi(e) {
4131
4192
  switch (e.authType) {
4132
4193
  case N.None: break;
4133
4194
  case N.Password: {
4134
- let t = Ue(e.headers.Authorization.replace(/^Basic /i, "").trim());
4195
+ let t = Ze(e.headers.Authorization.replace(/^Basic /i, "").trim());
4135
4196
  n = n.replace(/^https?:\/\//, `${r}://${t}@`);
4136
4197
  break;
4137
4198
  }
@@ -4140,18 +4201,18 @@ function oi(e) {
4140
4201
  return n;
4141
4202
  }(m, e),
4142
4203
  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),
4204
+ getQuota: (e) => $r(m, e),
4205
+ lock: (e, t) => Xr(m, e, t),
4206
+ moveFile: (e, t, n) => ni(m, e, t, n),
4207
+ putFileContents: (e, t, n) => ai(m, e, t, n),
4208
+ partialUpdateFileContents: (e, t, n, r, i) => fi(m, e, t, n, r, i),
4209
+ getDAVCompliance: (e) => oi(m, e),
4210
+ search: (e, t) => ti(m, e, t),
4150
4211
  setHeaders: (e) => {
4151
4212
  m.headers = Object.assign({}, e);
4152
4213
  },
4153
- stat: (e, t) => rr(m, e, t),
4154
- unlock: (e, t, n) => Vr(m, e, t, n),
4214
+ stat: (e, t) => dr(m, e, t),
4215
+ unlock: (e, t, n) => Yr(m, e, t, n),
4155
4216
  registerAttributeParser: (e) => {
4156
4217
  m.parsing.attributeParsers.push(e);
4157
4218
  },
@@ -4164,37 +4225,37 @@ function oi(e) {
4164
4225
  //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/stringify.js
4165
4226
  var $ = [];
4166
4227
  for (let e = 0; e < 256; ++e) $.push((e + 256).toString(16).slice(1));
4167
- function si(e, t = 0) {
4228
+ function hi(e, t = 0) {
4168
4229
  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
4230
  }
4170
4231
  //#endregion
4171
4232
  //#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);
4233
+ var gi = new Uint8Array(16);
4234
+ function _i() {
4235
+ return crypto.getRandomValues(gi);
4175
4236
  }
4176
4237
  //#endregion
4177
4238
  //#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);
4239
+ function vi(e, t, n) {
4240
+ return !t && !e && crypto.randomUUID ? crypto.randomUUID() : yi(e, t, n);
4180
4241
  }
4181
- function di(e, t, n) {
4242
+ function yi(e, t, n) {
4182
4243
  e ||= {};
4183
- let r = e.random ?? e.rng?.() ?? li();
4244
+ let r = e.random ?? e.rng?.() ?? _i();
4184
4245
  if (r.length < 16) throw Error("Random bytes length must be >= 16");
4185
4246
  if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
4186
4247
  if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
4187
4248
  for (let e = 0; e < 16; ++e) t[n + e] = r[e];
4188
4249
  return t;
4189
4250
  }
4190
- return si(r);
4251
+ return hi(r);
4191
4252
  }
4192
4253
  //#endregion
4193
4254
  //#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 = [] }) => {
4255
+ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includes(e) ? [e, n || ""] : [o.DavNamespace.includes(e) ? `d:${e}` : `oc:${e}`, n || ""])), xi = (e = [], { pattern: t, filterRules: n, limit: r = 0, extraProps: i = [] }) => {
4195
4256
  let a = "d:propfind";
4196
4257
  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]: {
4258
+ let o = bi(e.reduce((e, t) => Object.assign(e, { [t]: null }), {}), i), s = { [a]: {
4198
4259
  "d:prop": o,
4199
4260
  "@@xmlns:d": "DAV:",
4200
4261
  "@@xmlns:oc": "http://owncloud.org/ns",
@@ -4202,30 +4263,30 @@ var fi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4202
4263
  "oc:pattern": t,
4203
4264
  "oc:limit": r
4204
4265
  } },
4205
- ...n && { "oc:filter-rules": fi(n, []) }
4266
+ ...n && { "oc:filter-rules": bi(n, []) }
4206
4267
  } };
4207
- return new ce({
4268
+ return new ge({
4208
4269
  format: !0,
4209
4270
  ignoreAttributes: !1,
4210
4271
  attributeNamePrefix: "@@",
4211
4272
  suppressEmptyNode: !0
4212
4273
  }).build(s);
4213
- }, mi = (e) => {
4274
+ }, Si = (e) => {
4214
4275
  let t = { "d:propertyupdate": {
4215
- "d:set": { "d:prop": fi(e, []) },
4276
+ "d:set": { "d:prop": bi(e, []) },
4216
4277
  "@@xmlns:d": "DAV:",
4217
4278
  "@@xmlns:oc": "http://owncloud.org/ns"
4218
4279
  } };
4219
- return new ce({
4280
+ return new ge({
4220
4281
  format: !0,
4221
4282
  ignoreAttributes: !1,
4222
4283
  attributeNamePrefix: "@@",
4223
4284
  suppressEmptyNode: !0
4224
4285
  }).build(t);
4225
- }, hi = (e) => {
4286
+ }, Ci = (e) => {
4226
4287
  let t = {}, n = e.get("tus-version");
4227
4288
  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) => {
4289
+ }, wi = async (e) => {
4229
4290
  let t = (e) => {
4230
4291
  let t = decodeURIComponent(e);
4231
4292
  return e?.startsWith("/remote.php/dav/") ? i(t.replace("/remote.php/dav/", ""), {
@@ -4233,15 +4294,15 @@ var fi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4233
4294
  trailingSlash: !1
4234
4295
  }) : t;
4235
4296
  };
4236
- return (await Qn(e)).multistatus.response.map(({ href: e, propstat: n }) => {
4297
+ return (await or(e)).multistatus.response.map(({ href: e, propstat: n }) => {
4237
4298
  let r = {
4238
- ...$n(n.prop, t(e), !0),
4299
+ ...sr(n.prop, t(e), !0),
4239
4300
  processing: n.status === "HTTP/1.1 425 TOO EARLY"
4240
4301
  };
4241
4302
  return r.props.name && (r.props.name = r.props.name.toString()), r;
4242
4303
  });
4243
- }, _i = (e) => {
4244
- let t = new g(), n = {
4304
+ }, Ti = (e) => {
4305
+ let t = new _(), n = {
4245
4306
  message: "Unknown error",
4246
4307
  errorCode: void 0
4247
4308
  };
@@ -4260,13 +4321,13 @@ var fi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4260
4321
  return n;
4261
4322
  }
4262
4323
  return n;
4263
- }, vi = class {
4324
+ }, Ei = class {
4264
4325
  client;
4265
4326
  davPath;
4266
4327
  headers;
4267
4328
  extraProps;
4268
4329
  constructor({ baseUrl: e, headers: t }) {
4269
- this.davPath = i(e, "remote.php/dav"), this.client = oi(this.davPath, {}), this.headers = t, this.extraProps = [];
4330
+ this.davPath = i(e, "remote.php/dav"), this.client = mi(this.davPath, {}), this.headers = t, this.extraProps = [];
4270
4331
  }
4271
4332
  mkcol(e, t = {}) {
4272
4333
  return this.request(e, {
@@ -4280,16 +4341,16 @@ var fi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4280
4341
  Depth: t.toString()
4281
4342
  }, { body: o, result: s } = await this.request(e, {
4282
4343
  method: u.propfind,
4283
- data: pi(n, { extraProps: this.extraProps }),
4344
+ data: xi(n, { extraProps: this.extraProps }),
4284
4345
  headers: a,
4285
4346
  ...i
4286
4347
  });
4287
- return o?.length && (o[0].tusSupport = hi(s.headers)), o;
4348
+ return o?.length && (o[0].tusSupport = Ci(s.headers)), o;
4288
4349
  }
4289
4350
  async report(e, { pattern: t = "", filterRules: n = null, limit: r = 30, properties: i, ...a } = {}) {
4290
4351
  let { body: o, result: s } = await this.request(e, {
4291
4352
  method: u.report,
4292
- data: pi(i, {
4353
+ data: xi(i, {
4293
4354
  pattern: t,
4294
4355
  filterRules: n,
4295
4356
  limit: r,
@@ -4303,7 +4364,7 @@ var fi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4303
4364
  };
4304
4365
  }
4305
4366
  copy(e, t, { overwrite: n = !1, headers: r = {}, ...a } = {}) {
4306
- let o = i(this.davPath, y(t));
4367
+ let o = i(this.davPath, b(t));
4307
4368
  return this.request(e, {
4308
4369
  method: u.copy,
4309
4370
  headers: {
@@ -4315,7 +4376,7 @@ var fi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4315
4376
  });
4316
4377
  }
4317
4378
  move(e, t, { overwrite: n = !1, headers: r = {}, ...a } = {}) {
4318
- let o = i(this.davPath, y(t));
4379
+ let o = i(this.davPath, b(t));
4319
4380
  return this.request(e, {
4320
4381
  method: u.move,
4321
4382
  headers: {
@@ -4343,7 +4404,7 @@ var fi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4343
4404
  });
4344
4405
  }
4345
4406
  propPatch(e, t, n = {}) {
4346
- let r = mi(t);
4407
+ let r = Si(t);
4347
4408
  return this.request(e, {
4348
4409
  method: u.proppatch,
4349
4410
  data: r,
@@ -4351,75 +4412,75 @@ var fi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4351
4412
  });
4352
4413
  }
4353
4414
  getFileUrl(e) {
4354
- return i(this.davPath, y(e));
4415
+ return i(this.davPath, b(e));
4355
4416
  }
4356
4417
  buildHeaders(e = {}) {
4357
4418
  return {
4358
4419
  "Content-Type": "application/xml; charset=utf-8",
4359
4420
  "X-Requested-With": "XMLHttpRequest",
4360
- "X-Request-ID": ui(),
4421
+ "X-Request-ID": vi(),
4361
4422
  ...this.headers && { ...this.headers() },
4362
4423
  ...e
4363
4424
  };
4364
4425
  }
4365
4426
  async request(e, t) {
4366
- let n = i(this.davPath, y(e), { leadingSlash: !0 }), r = {
4427
+ let n = i(this.davPath, b(e), { leadingSlash: !0 }), r = {
4367
4428
  ...t,
4368
4429
  url: n,
4369
4430
  headers: this.buildHeaders(t.headers || {})
4370
4431
  };
4371
4432
  try {
4372
4433
  let e = await this.client.customRequest("", r), t;
4373
- return e.status === 207 && (t = await gi(await e.text())), {
4434
+ return e.status === 207 && (t = await wi(await e.text())), {
4374
4435
  body: t,
4375
4436
  status: e.status,
4376
4437
  result: e
4377
4438
  };
4378
4439
  } catch (e) {
4379
- let { response: t } = e, n = _i(await t.text());
4440
+ let { response: t } = e, n = Ti(await t.text());
4380
4441
  throw new d(n.message, n.errorCode, t, t.status);
4381
4442
  }
4382
4443
  }
4383
- }, yi = (e, t) => ({ async listFileVersions(t, n = {}) {
4444
+ }, Di = (e, t) => ({ async listFileVersions(t, n = {}) {
4384
4445
  let [r, ...a] = await e.propfind(i("meta", t, "v", { leadingSlash: !0 }), n);
4385
4446
  return a.map((t) => c(t, e.extraProps));
4386
- } }), bi = (e, t) => ({ setFavorite(t, { path: n }, r, a = {}) {
4447
+ } }), Oi = (e, t) => ({ setFavorite(t, { path: n }, r, a = {}) {
4387
4448
  let o = { [m.IsFavorite]: r ? "true" : "false" };
4388
4449
  return e.propPatch(i(t.webDavPath, n), o, a);
4389
- } }), xi = (e, t) => {
4450
+ } }), ki = (e, t) => {
4390
4451
  let r = n.create();
4391
4452
  t && r.interceptors.request.use((e) => (Object.assign(e.headers, t()), e));
4392
4453
  let i = {
4393
4454
  axiosClient: r,
4394
4455
  baseUrl: e,
4395
4456
  headers: t
4396
- }, a = new vi({
4457
+ }, a = new Ei({
4397
4458
  baseUrl: e,
4398
4459
  headers: t
4399
4460
  }), o = (e) => {
4400
4461
  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);
4462
+ }, s = je(a, i), { getPathForFileId: c } = s, l = Ce(a, s, i), { listFiles: u } = l, d = be(l, i), { getFileInfo: f } = d, { createFolder: p } = ve(a, d, i), m = ye(a, i), { getFileContents: h } = m, { putFileContents: g } = Te(a, d, i), { getFileUrl: _, revokeUrl: v } = xe(a, m, d, i), { getPublicFileUrl: y } = Se(a, i), { copyFiles: b } = _e(a, i), { moveFiles: x } = we(a, i), { deleteFile: S } = Ee(a, i), { restoreFile: C } = De(a, i), { listFileVersions: ee } = Di(a, i), { restoreFileVersion: te } = Oe(a, i), { clearTrashBin: ne } = ke(a, i), { search: re } = Ae(a, i), { setFavorite: ie } = Oi(a, i);
4402
4463
  return {
4403
4464
  copyFiles: b,
4404
4465
  createFolder: p,
4405
4466
  deleteFile: S,
4406
- restoreFile: ee,
4407
- restoreFileVersion: ne,
4467
+ restoreFile: C,
4468
+ restoreFileVersion: te,
4408
4469
  getFileContents: h,
4409
4470
  getFileInfo: f,
4410
4471
  getFileUrl: _,
4411
4472
  getPublicFileUrl: y,
4412
4473
  getPathForFileId: c,
4413
4474
  listFiles: u,
4414
- listFileVersions: te,
4475
+ listFileVersions: ee,
4415
4476
  moveFiles: x,
4416
4477
  putFileContents: g,
4417
4478
  revokeUrl: v,
4418
- clearTrashBin: re,
4419
- search: C,
4479
+ clearTrashBin: ne,
4480
+ search: re,
4420
4481
  setFavorite: ie,
4421
4482
  registerExtraProp: o
4422
4483
  };
4423
4484
  };
4424
4485
  //#endregion
4425
- export { y as n, xi as t };
4486
+ export { b as n, ki as t };