@opencloud-eu/web-client 6.1.0 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import { n as e, r as t, t as n } from "./axios-Drchb9eh.js";
2
- import { n as r } from "./dist-tjee3PVd.js";
3
- import { u as i } from "./toString-tGn_k7yU.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-B0hzJ78Q.js";
5
- import { i as h, n as g, r as _, t as v } from "./ocs-2K0ogAXF.js";
1
+ import { n as e, r as t, t as n } from "./axios-B1HWJqDx.js";
2
+ import { n as r } from "./dist-SL1_CMpG.js";
3
+ import { u as i } from "./toString-DAQZ_8iK.js";
4
+ import { E as a, K as o, N as s, P as c, Q as l, W as u, Z as d, _ as f, f as p, q as m } from "./helpers-DoHY9e_0.js";
5
+ import { i as h, n as g, r as _, t as v } from "./ocs-B7FkclLT.js";
6
6
  //#region src/utils/encodePath.ts
7
7
  var y = (e) => encodeURIComponent(e).split("%2F").join("/"), b = "\n";
8
8
  function x(e, t) {
@@ -22,7 +22,7 @@ function S(e, t, n, r, i) {
22
22
  if (!Array.isArray(e)) {
23
23
  if (e != null) {
24
24
  let n = e.toString();
25
- return n = C(n, t), n;
25
+ return n = w(n, t), n;
26
26
  }
27
27
  return "";
28
28
  }
@@ -31,25 +31,28 @@ function S(e, t, n, r, i) {
31
31
  if (l === void 0) continue;
32
32
  let u = ee(c[":@"], t);
33
33
  r.push(l, u);
34
- let d = ae(r, i);
34
+ let d = ie(r, i);
35
35
  if (l === t.textNodeName) {
36
36
  let e = c[l];
37
- d || (e = t.tagValueProcessor(l, e), e = C(e, t)), o && (a += n), a += e, o = !1, r.pop();
37
+ d || (e = t.tagValueProcessor(l, e), e = w(e, t)), o && (a += n), a += e, o = !1, r.pop();
38
38
  continue;
39
39
  } else if (l === t.cdataPropName) {
40
- o && (a += n), a += `<![CDATA[${c[l][0][t.textNodeName]}]]>`, o = !1, r.pop();
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();
41
43
  continue;
42
44
  } else if (l === t.commentPropName) {
43
- a += n + `<!--${c[l][0][t.textNodeName]}-->`, o = !0, r.pop();
45
+ let e = c[l][0][t.textNodeName], i = String(e).replace(/--/g, "- -").replace(/-$/, "- ");
46
+ a += n + `<!--${i}-->`, o = !0, r.pop();
44
47
  continue;
45
48
  } else if (l[0] === "?") {
46
- let e = ie(c[":@"], t, d), i = l === "?xml" ? "" : n, s = c[l][0][t.textNodeName];
49
+ let e = C(c[":@"], t, d), i = l === "?xml" ? "" : n, s = c[l][0][t.textNodeName];
47
50
  s = s.length === 0 ? "" : " " + s, a += i + `<${l}${s}${e}?>`, o = !0, r.pop();
48
51
  continue;
49
52
  }
50
53
  let f = n;
51
54
  f !== "" && (f += t.indentBy);
52
- let p = n + `<${l}${ie(c[":@"], t, d)}`, m;
55
+ let p = n + `<${l}${C(c[":@"], t, d)}`, m;
53
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();
54
57
  }
55
58
  return a;
@@ -96,21 +99,21 @@ function re(e) {
96
99
  if (Object.prototype.hasOwnProperty.call(e, r) && r !== ":@") return r;
97
100
  }
98
101
  }
99
- function ie(e, t, n) {
102
+ function C(e, t, n) {
100
103
  let r = "";
101
104
  if (e && !t.ignoreAttributes) for (let i in e) {
102
105
  if (!Object.prototype.hasOwnProperty.call(e, i)) continue;
103
106
  let a;
104
- n ? a = e[i] : (a = t.attributeValueProcessor(i, e[i]), a = C(a, t)), a === !0 && t.suppressBooleanAttributes ? r += ` ${i.substr(t.attributeNamePrefix.length)}` : r += ` ${i.substr(t.attributeNamePrefix.length)}="${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}"`;
105
108
  }
106
109
  return r;
107
110
  }
108
- function ae(e, t) {
111
+ function ie(e, t) {
109
112
  if (!t || t.length === 0) return !1;
110
113
  for (let n = 0; n < t.length; n++) if (e.matches(t[n])) return !0;
111
114
  return !1;
112
115
  }
113
- function C(e, t) {
116
+ function w(e, t) {
114
117
  if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
115
118
  let r = t.entities[n];
116
119
  e = e.replace(r.regex, r.val);
@@ -118,15 +121,15 @@ function C(e, t) {
118
121
  return e;
119
122
  }
120
123
  //#endregion
121
- //#region ../../node_modules/.pnpm/fast-xml-builder@1.1.4/node_modules/fast-xml-builder/src/ignoreAttributes.js
122
- function w(e) {
124
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.1.5/node_modules/fast-xml-builder/src/ignoreAttributes.js
125
+ function T(e) {
123
126
  return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
124
127
  for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
125
128
  } : () => !1;
126
129
  }
127
130
  //#endregion
128
- //#region ../../node_modules/.pnpm/fast-xml-builder@1.1.4/node_modules/fast-xml-builder/src/fxb.js
129
- var oe = {
131
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.1.5/node_modules/fast-xml-builder/src/fxb.js
132
+ var ae = {
130
133
  attributeNamePrefix: "@_",
131
134
  attributesGroupName: !1,
132
135
  textNodeName: "#text",
@@ -174,25 +177,25 @@ var oe = {
174
177
  maxNestedTags: 100,
175
178
  jPath: !0
176
179
  };
177
- function T(e) {
178
- if (this.options = Object.assign({}, oe, 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++) {
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++) {
179
182
  let t = this.options.stopNodes[e];
180
183
  typeof t == "string" ? this.stopNodeExpressions.push(new h(t)) : t instanceof h && this.stopNodeExpressions.push(t);
181
184
  }
182
185
  this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
183
186
  return !1;
184
- } : (this.ignoreAttributesFn = w(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ce), this.processTextOrObjNode = E, this.options.format ? (this.indentate = se, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
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() {
185
188
  return "";
186
189
  }, this.tagEndChar = ">", this.newLine = "");
187
190
  }
188
- T.prototype.build = function(e) {
191
+ E.prototype.build = function(e) {
189
192
  if (this.options.preserveOrder) return x(e, this.options);
190
193
  {
191
194
  Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = { [this.options.arrayNodeName]: e });
192
195
  let t = new _();
193
196
  return this.j2x(e, 0, t).val;
194
197
  }
195
- }, T.prototype.j2x = function(e, t, n) {
198
+ }, E.prototype.j2x = function(e, t, n) {
196
199
  let r = "", i = "";
197
200
  if (this.options.maxNestedTags && n.getDepth() >= this.options.maxNestedTags) throw Error("Maximum nested tags exceeded");
198
201
  let a = this.options.jPath ? n.toString() : n, o = this.checkStopNode(n);
@@ -244,10 +247,10 @@ T.prototype.build = function(e) {
244
247
  attrStr: r,
245
248
  val: i
246
249
  };
247
- }, T.prototype.buildAttrPairStr = function(e, t, n) {
250
+ }, E.prototype.buildAttrPairStr = function(e, t, n) {
248
251
  return n || (t = this.options.attributeValueProcessor(e, "" + t), t = this.replaceEntitiesValue(t)), this.options.suppressBooleanAttributes && t === "true" ? " " + e : " " + e + "=\"" + t + "\"";
249
252
  };
250
- function E(e, t, n, r) {
253
+ function D(e, t, n, r) {
251
254
  let i = this.extractAttributes(e);
252
255
  if (r.push(t, i), this.checkStopNode(r)) {
253
256
  let i = this.buildRawContent(e), a = this.buildAttributesForStopNode(e);
@@ -256,7 +259,7 @@ function E(e, t, n, r) {
256
259
  let a = this.j2x(e, n + 1, r);
257
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);
258
261
  }
259
- T.prototype.extractAttributes = function(e) {
262
+ E.prototype.extractAttributes = function(e) {
260
263
  if (!e || typeof e != "object") return null;
261
264
  let t = {}, n = !1;
262
265
  if (this.options.attributesGroupName && e[this.options.attributesGroupName]) {
@@ -272,7 +275,7 @@ T.prototype.extractAttributes = function(e) {
272
275
  i && (t[i] = e[r], n = !0);
273
276
  }
274
277
  return n ? t : null;
275
- }, T.prototype.buildRawContent = function(e) {
278
+ }, E.prototype.buildRawContent = function(e) {
276
279
  if (typeof e == "string") return e;
277
280
  if (typeof e != "object" || !e) return String(e);
278
281
  if (e[this.options.textNodeName] !== void 0) return e[this.options.textNodeName];
@@ -293,7 +296,7 @@ T.prototype.extractAttributes = function(e) {
293
296
  } else t += `<${n}>${r}</${n}>`;
294
297
  }
295
298
  return t;
296
- }, T.prototype.buildAttributesForStopNode = function(e) {
299
+ }, E.prototype.buildAttributesForStopNode = function(e) {
297
300
  if (!e || typeof e != "object") return "";
298
301
  let t = "";
299
302
  if (this.options.attributesGroupName && e[this.options.attributesGroupName]) {
@@ -312,54 +315,58 @@ T.prototype.extractAttributes = function(e) {
312
315
  }
313
316
  }
314
317
  return t;
315
- }, T.prototype.buildObjectNode = function(e, t, n, r) {
318
+ }, E.prototype.buildObjectNode = function(e, t, n, r) {
316
319
  if (e === "") return t[0] === "?" ? this.indentate(r) + "<" + t + n + "?" + this.tagEndChar : this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
317
320
  {
318
321
  let i = "</" + t + this.tagEndChar, a = "";
319
322
  return t[0] === "?" && (a = "?", i = ""), (n || n === "") && e.indexOf("<") === -1 ? this.indentate(r) + "<" + t + n + a + ">" + e + i : this.options.commentPropName !== !1 && t === this.options.commentPropName && a.length === 0 ? this.indentate(r) + `<!--${e}-->` + this.newLine : this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i;
320
323
  }
321
- }, T.prototype.closeTag = function(e) {
324
+ }, E.prototype.closeTag = function(e) {
322
325
  let t = "";
323
326
  return this.options.unpairedTags.indexOf(e) === -1 ? t = this.options.suppressEmptyNode ? "/" : `></${e}` : this.options.suppressUnpairedNode || (t = "/"), t;
324
- }, T.prototype.checkStopNode = function(e) {
327
+ }, E.prototype.checkStopNode = function(e) {
325
328
  if (!this.stopNodeExpressions || this.stopNodeExpressions.length === 0) return !1;
326
329
  for (let t = 0; t < this.stopNodeExpressions.length; t++) if (e.matches(this.stopNodeExpressions[t])) return !0;
327
330
  return !1;
328
- }, T.prototype.buildTextValNode = function(e, t, n, r, i) {
329
- if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName) return this.indentate(r) + `<![CDATA[${e}]]>` + this.newLine;
330
- if (this.options.commentPropName !== !1 && t === this.options.commentPropName) return this.indentate(r) + `<!--${e}-->` + this.newLine;
331
- if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
332
- {
331
+ }, E.prototype.buildTextValNode = function(e, t, n, r, i) {
332
+ if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName) {
333
+ let t = String(e).replace(/\]\]>/g, "]]]]><![CDATA[>");
334
+ return this.indentate(r) + `<![CDATA[${t}]]>` + this.newLine;
335
+ } else if (this.options.commentPropName !== !1 && t === this.options.commentPropName) {
336
+ let t = String(e).replace(/--/g, "- -").replace(/-$/, "- ");
337
+ return this.indentate(r) + `<!--${t}-->` + this.newLine;
338
+ } else if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
339
+ else {
333
340
  let i = this.options.tagValueProcessor(t, e);
334
341
  return i = this.replaceEntitiesValue(i), i === "" ? this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar : this.indentate(r) + "<" + t + n + ">" + i + "</" + t + this.tagEndChar;
335
342
  }
336
- }, T.prototype.replaceEntitiesValue = function(e) {
343
+ }, E.prototype.replaceEntitiesValue = function(e) {
337
344
  if (e && e.length > 0 && this.options.processEntities) for (let t = 0; t < this.options.entities.length; t++) {
338
345
  let n = this.options.entities[t];
339
346
  e = e.replace(n.regex, n.val);
340
347
  }
341
348
  return e;
342
349
  };
343
- function se(e) {
350
+ function oe(e) {
344
351
  return this.options.indentBy.repeat(e);
345
352
  }
346
- function ce(e) {
353
+ function se(e) {
347
354
  return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;
348
355
  }
349
356
  //#endregion
350
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.5.9/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js
351
- var le = T, D = (e, { fileId: t, path: n, name: r }) => {
357
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.7.1/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js
358
+ var ce = E, O = (e, { fileId: t, path: n, name: r }) => {
352
359
  if (n !== void 0) return i(e.webDavPath, n);
353
360
  if (t !== void 0) {
354
361
  if (a(e)) throw Error("public spaces need a path provided");
355
362
  return i("spaces", t, r || "");
356
363
  }
357
364
  return e.webDavPath;
358
- }, ue = (e, t) => ({ copyFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
359
- let u = D(t, {
365
+ }, le = (e, t) => ({ copyFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
366
+ let u = O(t, {
360
367
  fileId: r,
361
368
  path: n
362
- }), d = D(i, {
369
+ }), d = O(i, {
363
370
  fileId: o,
364
371
  path: a,
365
372
  name: s
@@ -368,16 +375,16 @@ var le = T, D = (e, { fileId: t, path: n, name: r }) => {
368
375
  overwrite: c || !1,
369
376
  ...l
370
377
  });
371
- } }), de = (e, t, n) => ({ async createFolder(n, { path: r, parentFolderId: i, folderName: a, fetchFolder: o = !0, ...s }) {
372
- let c = D(n, {
378
+ } }), ue = (e, t, n) => ({ async createFolder(n, { path: r, parentFolderId: i, folderName: a, fetchFolder: o = !0, ...s }) {
379
+ let c = O(n, {
373
380
  fileId: i,
374
381
  path: r,
375
382
  name: a
376
383
  });
377
384
  if (await e.mkcol(c), o) return t.getFileInfo(n, { path: r }, s);
378
- } }), fe = (e, { axiosClient: t }) => ({ async getFileContents(n, { fileId: r, path: i }, { responseType: a = "text", noCache: o = !0, headers: s, ...c } = {}) {
385
+ } }), de = (e, { axiosClient: t }) => ({ async getFileContents(n, { fileId: r, path: i }, { responseType: a = "text", noCache: o = !0, headers: s, ...c } = {}) {
379
386
  try {
380
- let l = D(n, {
387
+ let l = O(n, {
381
388
  fileId: r,
382
389
  path: i
383
390
  }), u = await t.get(e.getFileUrl(l), {
@@ -401,12 +408,12 @@ var le = T, D = (e, { fileId: t, path: n, name: r }) => {
401
408
  let { message: t, response: n } = e;
402
409
  throw new l(t, n, n.status);
403
410
  }
404
- } }), pe = (e, t) => ({ async getFileInfo(t, n, r) {
411
+ } }), fe = (e, t) => ({ async getFileInfo(t, n, r) {
405
412
  return (await e.listFiles(t, n, {
406
413
  depth: 0,
407
414
  ...r
408
415
  })).resource;
409
- } }), me = (e, t, n, { axiosClient: r, baseUrl: a }) => ({
416
+ } }), pe = (e, t, n, { axiosClient: r, baseUrl: a }) => ({
410
417
  async getFileUrl(o, s, { disposition: c = "attachment", version: l = null, username: u = "", ...d }) {
411
418
  if (c === "inline") {
412
419
  let e = await t.getFileContents(o, s, {
@@ -427,9 +434,9 @@ var le = T, D = (e, { fileId: t, path: n, name: r }) => {
427
434
  revokeUrl: (e) => {
428
435
  e && e.startsWith("blob:") && URL.revokeObjectURL(e);
429
436
  }
430
- }), he = (e, t) => ({ getPublicFileUrl(t, n) {
437
+ }), me = (e, t) => ({ getPublicFileUrl(t, n) {
431
438
  return e.getFileUrl(i("public-files", n));
432
- } }), ge = (e, t, n) => ({ async listFiles(n, { path: r, fileId: l } = {}, { depth: u = 1, davProperties: d, isTrash: h = !1, ...g } = {}) {
439
+ } }), he = (e, t, n) => ({ async listFiles(n, { path: r, fileId: l } = {}, { depth: u = 1, davProperties: d, isTrash: h = !1, ...g } = {}) {
433
440
  let _;
434
441
  if (a(n)) {
435
442
  _ = await e.propfind(i(n.webDavPath, r), {
@@ -475,7 +482,7 @@ var le = T, D = (e, { fileId: t, path: n, name: r }) => {
475
482
  };
476
483
  try {
477
484
  let t = "";
478
- if (t = h ? f(n.id) : D(n, {
485
+ if (t = h ? f(n.id) : O(n, {
479
486
  fileId: l,
480
487
  path: r
481
488
  }), _ = await e.propfind(t, {
@@ -495,11 +502,11 @@ var le = T, D = (e, { fileId: t, path: n, name: r }) => {
495
502
  if (e.statusCode === 404 && l) return v();
496
503
  throw e;
497
504
  }
498
- } }), _e = (e, t) => ({ moveFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
499
- let u = D(t, {
505
+ } }), ge = (e, t) => ({ moveFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
506
+ let u = O(t, {
500
507
  fileId: r,
501
508
  path: n
502
- }), d = D(i, {
509
+ }), d = O(i, {
503
510
  fileId: o,
504
511
  path: a,
505
512
  name: s
@@ -508,8 +515,8 @@ var le = T, D = (e, { fileId: t, path: n, name: r }) => {
508
515
  overwrite: c || !1,
509
516
  ...l
510
517
  });
511
- } }), ve = (e, t, n) => ({ async putFileContents(n, { fileName: r, path: i, parentFolderId: a, content: o = "", previousEntityTag: s = "", overwrite: c, onUploadProgress: l = null, ...u }) {
512
- let d = D(n, {
518
+ } }), _e = (e, t, n) => ({ async putFileContents(n, { fileName: r, path: i, parentFolderId: a, content: o = "", previousEntityTag: s = "", overwrite: c, onUploadProgress: l = null, ...u }) {
519
+ let d = O(n, {
513
520
  fileId: a,
514
521
  name: r,
515
522
  path: i
@@ -523,26 +530,26 @@ var le = T, D = (e, { fileId: t, path: n, name: r }) => {
523
530
  fileId: f.headers.get("Oc-Fileid"),
524
531
  path: i
525
532
  });
526
- } }), ye = (e, t) => ({ deleteFile(t, { path: n, ...r }) {
533
+ } }), ve = (e, t) => ({ deleteFile(t, { path: n, ...r }) {
527
534
  return e.delete(i(t.webDavPath, n), r);
528
- } }), be = (e, t) => ({ restoreFile(t, { id: n }, { path: r }, { overwrite: o, ...s } = {}) {
535
+ } }), ye = (e, t) => ({ restoreFile(t, { id: n }, { path: r }, { overwrite: o, ...s } = {}) {
529
536
  if (a(t)) return;
530
537
  let c = i(t.webDavPath, r);
531
538
  return e.move(i(t.webDavTrashPath, n), c, {
532
539
  overwrite: o,
533
540
  ...s
534
541
  });
535
- } }), xe = (e, t) => ({ restoreFileVersion(t, { parentFolderId: n, name: r, path: a }, o, s = {}) {
536
- let c = D(t, {
542
+ } }), be = (e, t) => ({ restoreFileVersion(t, { parentFolderId: n, name: r, path: a }, o, s = {}) {
543
+ let c = O(t, {
537
544
  path: a,
538
545
  fileId: n,
539
546
  name: r
540
547
  }), l = i("meta", n, "v", o, { leadingSlash: !0 }), u = i("files", c, { leadingSlash: !0 });
541
548
  return e.copy(l, u, s);
542
- } }), Se = (e, t) => ({ clearTrashBin(t, { id: n, ...r } = {}) {
549
+ } }), xe = (e, t) => ({ clearTrashBin(t, { id: n, ...r } = {}) {
543
550
  let a = f(t.id);
544
551
  return n && (a = i(a, n)), e.delete(a, r);
545
- } }), Ce = (e, t) => ({ async search(t, { davProperties: n = o.Default, searchLimit: r, ...i }) {
552
+ } }), Se = (e, t) => ({ async search(t, { davProperties: n = o.Default, searchLimit: r, ...i }) {
546
553
  let { range: a, results: s } = await e.report("/spaces/", {
547
554
  pattern: t,
548
555
  limit: r,
@@ -556,7 +563,7 @@ var le = T, D = (e, { fileId: t, path: n, name: r }) => {
556
563
  })),
557
564
  totalResults: a ? parseInt(a?.split("/")[1]) : null
558
565
  };
559
- } }), we = (e, t) => ({ async getPathForFileId(t, n = {}) {
566
+ } }), Ce = (e, t) => ({ async getPathForFileId(t, n = {}) {
560
567
  return (await e.propfind(i("meta", t, { leadingSlash: !0 }), {
561
568
  properties: [m.MetaPathForUser],
562
569
  ...n
@@ -565,7 +572,7 @@ var le = T, D = (e, { fileId: t, path: n, name: r }) => {
565
572
  //#endregion
566
573
  //#region ../../node_modules/.pnpm/webdav@5.9.0/node_modules/webdav/dist/web/index.js
567
574
  e();
568
- var Te = {
575
+ var we = {
569
576
  2: (e) => {
570
577
  function t(e, t, i) {
571
578
  e instanceof RegExp && (e = n(e, i)), t instanceof RegExp && (t = n(t, i));
@@ -768,27 +775,27 @@ var Te = {
768
775
  return i.pre + _[0] + e;
769
776
  }));
770
777
  if (x) {
771
- var ee = l(_[0]), te = l(_[1]), ne = Math.max(_[0].length, _[1].length), re = _.length == 3 ? Math.abs(l(_[2])) : 1, ie = m;
772
- te < ee && (re *= -1, ie = h);
773
- var ae = _.some(p);
778
+ var ee = l(_[0]), te = l(_[1]), ne = Math.max(_[0].length, _[1].length), re = _.length == 3 ? Math.abs(l(_[2])) : 1, C = m;
779
+ te < ee && (re *= -1, C = h);
780
+ var ie = _.some(p);
774
781
  v = [];
775
- for (var C = ee; ie(C, te); C += re) {
776
- var w;
777
- if (b) (w = String.fromCharCode(C)) === "\\" && (w = "");
778
- else if (w = String(C), ae) {
779
- var oe = ne - w.length;
780
- if (oe > 0) {
781
- var T = Array(oe + 1).join("0");
782
- w = C < 0 ? "-" + T + w.slice(1) : T + w;
782
+ for (var w = ee; C(w, te); w += re) {
783
+ var T;
784
+ if (b) (T = String.fromCharCode(w)) === "\\" && (T = "");
785
+ else if (T = String(w), ie) {
786
+ var ae = ne - T.length;
787
+ if (ae > 0) {
788
+ var E = Array(ae + 1).join("0");
789
+ T = w < 0 ? "-" + E + T.slice(1) : E + T;
783
790
  }
784
791
  }
785
- v.push(w);
792
+ v.push(T);
786
793
  }
787
794
  } else {
788
795
  v = [];
789
- for (var E = 0; E < _.length; E++) v.push.apply(v, g(_[E], !1));
796
+ for (var D = 0; D < _.length; D++) v.push.apply(v, g(_[D], !1));
790
797
  }
791
- 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);
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);
792
799
  }
793
800
  return n;
794
801
  }
@@ -1232,40 +1239,40 @@ var Te = {
1232
1239
  ObjectPrototypeMutationError: o
1233
1240
  };
1234
1241
  }
1235
- }, Ee = {};
1236
- function O(e) {
1237
- var t = Ee[e];
1242
+ }, Te = {};
1243
+ function k(e) {
1244
+ var t = Te[e];
1238
1245
  if (t !== void 0) return t.exports;
1239
- var n = Ee[e] = {
1246
+ var n = Te[e] = {
1240
1247
  id: e,
1241
1248
  loaded: !1,
1242
1249
  exports: {}
1243
1250
  };
1244
- return Te[e].call(n.exports, n, n.exports, O), n.loaded = !0, n.exports;
1251
+ return we[e].call(n.exports, n, n.exports, k), n.loaded = !0, n.exports;
1245
1252
  }
1246
- O.n = (e) => {
1253
+ k.n = (e) => {
1247
1254
  var t = e && e.__esModule ? () => e.default : () => e;
1248
- return O.d(t, { a: t }), t;
1249
- }, O.d = (e, t) => {
1250
- for (var n in t) O.o(t, n) && !O.o(e, n) && Object.defineProperty(e, n, {
1255
+ return k.d(t, { a: t }), t;
1256
+ }, k.d = (e, t) => {
1257
+ for (var n in t) k.o(t, n) && !k.o(e, n) && Object.defineProperty(e, n, {
1251
1258
  enumerable: !0,
1252
1259
  get: t[n]
1253
1260
  });
1254
- }, O.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), O.nmd = (e) => (e.paths = [], e.children ||= [], e);
1255
- var De = O(737), Oe = O.n(De);
1256
- function ke(e) {
1257
- if (!Ae(e)) throw Error("Parameter was not an error");
1261
+ }, k.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), k.nmd = (e) => (e.paths = [], e.children ||= [], e);
1262
+ var Ee = k(737), De = k.n(Ee);
1263
+ function Oe(e) {
1264
+ if (!ke(e)) throw Error("Parameter was not an error");
1258
1265
  }
1259
- function Ae(e) {
1266
+ function ke(e) {
1260
1267
  return !!e && typeof e == "object" && (t = e, Object.prototype.toString.call(t)) === "[object Error]" || e instanceof Error;
1261
1268
  var t;
1262
1269
  }
1263
- var k = class e extends Error {
1270
+ var A = class e extends Error {
1264
1271
  constructor(e, t) {
1265
1272
  let { options: n, shortMessage: r } = function(e) {
1266
1273
  let t, n = "";
1267
1274
  if (e.length === 0) t = {};
1268
- else if (Ae(e[0])) t = { cause: e[0] }, n = e.slice(1).join(" ") || "";
1275
+ else if (ke(e[0])) t = { cause: e[0] }, n = e.slice(1).join(" ") || "";
1269
1276
  else if (e[0] && typeof e[0] == "object") t = Object.assign({}, e[0]), n = e.slice(1).join(" ") || "";
1270
1277
  else {
1271
1278
  if (typeof e[0] != "string") throw Error("Invalid arguments passed to Layerr");
@@ -1282,15 +1289,15 @@ var k = class e extends Error {
1282
1289
  }
1283
1290
  }
1284
1291
  static cause(e) {
1285
- return ke(e), e._cause && Ae(e._cause) ? e._cause : null;
1292
+ return Oe(e), e._cause && ke(e._cause) ? e._cause : null;
1286
1293
  }
1287
1294
  static fullStack(t) {
1288
- ke(t);
1295
+ Oe(t);
1289
1296
  let n = e.cause(t);
1290
1297
  return n ? `${t.stack}\ncaused by: ${e.fullStack(n)}` : t.stack ?? "";
1291
1298
  }
1292
1299
  static info(t) {
1293
- ke(t);
1300
+ Oe(t);
1294
1301
  let n = {}, r = e.cause(t);
1295
1302
  return r && Object.assign(n, e.info(r)), t._info && Object.assign(n, t._info), n;
1296
1303
  }
@@ -1298,25 +1305,25 @@ var k = class e extends Error {
1298
1305
  let e = this.name || this.constructor.name || this.constructor.prototype.name;
1299
1306
  return this.message && (e = `${e}: ${this.message}`), e;
1300
1307
  }
1301
- }, je = O(47), Me = O.n(je), Ne = "__PATH_SEPARATOR_POSIX__", Pe = "__PATH_SEPARATOR_WINDOWS__";
1302
- function A(e) {
1308
+ }, Ae = k(47), je = k.n(Ae), Me = "__PATH_SEPARATOR_POSIX__", Ne = "__PATH_SEPARATOR_WINDOWS__";
1309
+ function j(e) {
1303
1310
  try {
1304
- let t = e.replace(/\//g, Ne).replace(/\\\\/g, Pe);
1305
- return encodeURIComponent(t).split(Pe).join("\\\\").split(Ne).join("/");
1311
+ let t = e.replace(/\//g, Me).replace(/\\\\/g, Ne);
1312
+ return encodeURIComponent(t).split(Ne).join("\\\\").split(Me).join("/");
1306
1313
  } catch (e) {
1307
- throw new k(e, "Failed encoding path");
1314
+ throw new A(e, "Failed encoding path");
1308
1315
  }
1309
1316
  }
1310
- function Fe(e) {
1317
+ function Pe(e) {
1311
1318
  return e.startsWith("/") ? e : "/" + e;
1312
1319
  }
1313
- function j(e) {
1320
+ function Fe(e) {
1314
1321
  let t = e;
1315
1322
  return t[0] !== "/" && (t = "/" + t), /^.+\/$/.test(t) && (t = t.substr(0, t.length - 1)), t;
1316
1323
  }
1317
1324
  function Ie(e) {
1318
- let t = new (Oe())(e).pathname;
1319
- return t.length <= 0 && (t = "/"), j(t);
1325
+ let t = new (De())(e).pathname;
1326
+ return t.length <= 0 && (t = "/"), Fe(t);
1320
1327
  }
1321
1328
  function M() {
1322
1329
  return function() {
@@ -1335,7 +1342,7 @@ function M() {
1335
1342
  }(typeof arguments[0] == "object" ? arguments[0] : [].slice.call(arguments));
1336
1343
  }([...arguments].reduce(((e, t, n) => ((n === 0 || t !== "/" || t === "/" && e[e.length - 1] !== "/") && e.push(t), e)), []));
1337
1344
  }
1338
- var Le = O(542), Re = O.n(Le);
1345
+ var Le = k(542), Re = k.n(Le);
1339
1346
  function ze(e, t) {
1340
1347
  let n = e.url.replace("//", ""), r = n.indexOf("/") == -1 ? "/" : n.slice(n.indexOf("/")), i = e.method ? e.method.toUpperCase() : "GET", a = !!/(^|,)\s*auth\s*($|,)/.test(t.qop) && "auth", o = `00000000${t.nc}`.slice(-8), s = function(e, t, n, r, i, a, o) {
1341
1348
  let s = o || Re()(`${t}:${n}:${r}`);
@@ -1358,7 +1365,7 @@ function ze(e, t) {
1358
1365
  function Be(e) {
1359
1366
  return (e.headers && e.headers.get("www-authenticate") || "").split(/\s/)[0].toLowerCase() === "digest";
1360
1367
  }
1361
- var Ve = O(101), He = O.n(Ve);
1368
+ var Ve = k(101), He = k.n(Ve);
1362
1369
  function Ue(e) {
1363
1370
  return He().decode(e);
1364
1371
  }
@@ -1397,11 +1404,11 @@ function qe(e, t, n, r, i) {
1397
1404
  case N.Token:
1398
1405
  e.headers.Authorization = `${(a = r).token_type} ${a.access_token}`;
1399
1406
  break;
1400
- default: throw new k({ info: { code: P.InvalidAuthType } }, `Invalid auth type: ${e.authType}`);
1407
+ default: throw new A({ info: { code: P.InvalidAuthType } }, `Invalid auth type: ${e.authType}`);
1401
1408
  }
1402
1409
  var a;
1403
1410
  }
1404
- O(345), O(800);
1411
+ k(345), k(800);
1405
1412
  var Je = "@@HOTPATCHER", Ye = () => {};
1406
1413
  function Xe(e) {
1407
1414
  return {
@@ -1528,7 +1535,7 @@ function it() {
1528
1535
  t.hasOwnProperty(i) ? e[t[i]] = n[r] : (t[i] = r, e[r] = n[r]);
1529
1536
  })), e)), {});
1530
1537
  }
1531
- O(805);
1538
+ k(805);
1532
1539
  var at = typeof ArrayBuffer == "function", { toString: ot } = Object.prototype;
1533
1540
  function st(e) {
1534
1541
  return at && (e instanceof ArrayBuffer || ot.call(e) === "[object ArrayBuffer]");
@@ -1604,7 +1611,7 @@ function pt(e) {
1604
1611
  return e.signal && (n.signal = e.signal), e.withCredentials && (n.credentials = "include"), n.headers = t, n;
1605
1612
  }(e))), e);
1606
1613
  }
1607
- var mt = O(285), ht = (e) => {
1614
+ var mt = k(285), ht = (e) => {
1608
1615
  if (typeof e != "string") throw TypeError("invalid pattern");
1609
1616
  if (e.length > 65536) throw TypeError("pattern is too long");
1610
1617
  }, gt = {
@@ -2274,10 +2281,10 @@ L.AST = At, L.Minimatch = en, L.escape = function(e) {
2274
2281
  }, L.unescape = bt;
2275
2282
  var nn = (rn = function(e, t, n) {
2276
2283
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = I({
2277
- url: M(e.remoteURL, A(t)),
2284
+ url: M(e.remoteURL, j(t)),
2278
2285
  method: "COPY",
2279
2286
  headers: {
2280
- Destination: M(e.remoteURL, A(n)),
2287
+ Destination: M(e.remoteURL, j(n)),
2281
2288
  Overwrite: !1 === r.overwrite ? "F" : "T",
2282
2289
  Depth: r.shallow ? "0" : "infinity"
2283
2290
  }
@@ -3104,7 +3111,7 @@ var Jn = class {
3104
3111
  static getMetaDataSymbol() {
3105
3112
  return H.getMetaDataSymbol();
3106
3113
  }
3107
- }, Yn = O(829), J = O.n(Yn), Y = function(e) {
3114
+ }, Yn = k(829), J = k.n(Yn), Y = function(e) {
3108
3115
  return e.Array = "array", e.Object = "object", e.Original = "original", e;
3109
3116
  }(Y || {});
3110
3117
  function Xn(e, t) {
@@ -3162,7 +3169,7 @@ function Qn(e, t) {
3162
3169
  function $n(e, t) {
3163
3170
  let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], { getlastmodified: r = null, getcontentlength: i = "0", resourcetype: a = null, getcontenttype: o = null, getetag: s = null } = e, c = a && typeof a == "object" && a.collection !== void 0 ? "directory" : "file", l = {
3164
3171
  filename: t,
3165
- basename: Me().basename(t),
3172
+ basename: je().basename(t),
3166
3173
  lastmod: r,
3167
3174
  size: parseInt(i, 10),
3168
3175
  type: c,
@@ -3181,7 +3188,7 @@ function er(e, t) {
3181
3188
  let e = /* @__PURE__ */ Error(`Invalid response: ${l} ${c}`);
3182
3189
  throw e.status = l, e;
3183
3190
  }
3184
- return $n(i, j(t), n);
3191
+ return $n(i, Fe(t), n);
3185
3192
  }
3186
3193
  function tr(e) {
3187
3194
  switch (String(e)) {
@@ -3206,7 +3213,7 @@ var rr = function(e) {
3206
3213
  }((function(e, t) {
3207
3214
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { details: r = !1 } = n;
3208
3215
  return nr(F(I({
3209
- url: M(e.remoteURL, A(t)),
3216
+ url: M(e.remoteURL, j(t)),
3210
3217
  method: "PROPFIND",
3211
3218
  headers: {
3212
3219
  Accept: "text/plain,application/xml",
@@ -3228,10 +3235,10 @@ var ar = or((function(e, t) {
3228
3235
  if (!e || e === "/") return [];
3229
3236
  let t = e, n = [];
3230
3237
  do
3231
- n.push(t), t = Me().dirname(t);
3238
+ n.push(t), t = je().dirname(t);
3232
3239
  while (t && t !== "/");
3233
3240
  return n;
3234
- }(j(t));
3241
+ }(Fe(t));
3235
3242
  r.sort(((e, t) => e.length > t.length ? 1 : t.length > e.length ? -1 : 0));
3236
3243
  let i = !1;
3237
3244
  return function(e, t, n) {
@@ -3372,14 +3379,14 @@ var dr = or((function(e, t) {
3372
3379
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3373
3380
  if (!0 === n.recursive) return ar(e, t, n);
3374
3381
  let r = I({
3375
- url: M(e.remoteURL, (i = A(t), i.endsWith("/") ? i : i + "/")),
3382
+ url: M(e.remoteURL, (i = j(t), i.endsWith("/") ? i : i + "/")),
3376
3383
  method: "MKCOL"
3377
3384
  }, e, n);
3378
3385
  var i;
3379
3386
  return ir(F(r, e), (function(t) {
3380
3387
  B(e, t);
3381
3388
  }));
3382
- })), fr = O(388), pr = O.n(fr), mr = function(e) {
3389
+ })), fr = k(388), pr = k.n(fr), mr = function(e) {
3383
3390
  return function() {
3384
3391
  var t = [...arguments];
3385
3392
  try {
@@ -3395,7 +3402,7 @@ var dr = or((function(e, t) {
3395
3402
  typeof n.range.end == "number" && (e = `${e}${n.range.end}`), r.Range = e;
3396
3403
  }
3397
3404
  let i = I({
3398
- url: M(e.remoteURL, A(t)),
3405
+ url: M(e.remoteURL, j(t)),
3399
3406
  method: "GET",
3400
3407
  headers: r
3401
3408
  }, e, n);
@@ -3419,7 +3426,7 @@ var dr = or((function(e, t) {
3419
3426
  }
3420
3427
  };
3421
3428
  }((function(e, t, n) {
3422
- n.url ||= M(e.remoteURL, A(t));
3429
+ n.url ||= M(e.remoteURL, j(t));
3423
3430
  let r = I(n, e, {});
3424
3431
  return a = function(t) {
3425
3432
  return B(e, t), t;
@@ -3436,7 +3443,7 @@ var dr = or((function(e, t) {
3436
3443
  };
3437
3444
  }((function(e, t) {
3438
3445
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = I({
3439
- url: M(e.remoteURL, A(t)),
3446
+ url: M(e.remoteURL, j(t)),
3440
3447
  method: "DELETE"
3441
3448
  }, e, n);
3442
3449
  return a = function(t) {
@@ -3484,7 +3491,7 @@ var br = function(e) {
3484
3491
  }((function(e, t) {
3485
3492
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3486
3493
  return yr(F(I({
3487
- url: M(e.remoteURL, A(t), "/"),
3494
+ url: M(e.remoteURL, j(t), "/"),
3488
3495
  method: "PROPFIND",
3489
3496
  headers: {
3490
3497
  Accept: "text/plain,application/xml",
@@ -3494,19 +3501,19 @@ var br = function(e) {
3494
3501
  return B(e, r), yr(r.text(), (function(i) {
3495
3502
  if (!i) throw Error("Failed parsing directory contents: Empty response");
3496
3503
  return yr(Qn(i, e.parsing), (function(i) {
3497
- let a = Fe(t), o = function(e, t, n) {
3498
- let r = arguments.length > 3 && arguments[3] !== void 0 && arguments[3], i = arguments.length > 4 && arguments[4] !== void 0 && arguments[4], a = Me().join(t, "/"), { multistatus: { response: o } } = e, s = o.map(((e) => {
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) => {
3499
3506
  let t = function(e) {
3500
3507
  try {
3501
3508
  return e.replace(/^https?:\/\/[^\/]+/, "");
3502
3509
  } catch (e) {
3503
- throw new k(e, "Failed normalising HREF");
3510
+ throw new A(e, "Failed normalising HREF");
3504
3511
  }
3505
3512
  }(e.href), { propstat: { prop: n } } = e;
3506
- return $n(n, a === "/" ? decodeURIComponent(j(t)) : j(Me().relative(decodeURIComponent(a), decodeURIComponent(t))), r);
3513
+ return $n(n, a === "/" ? decodeURIComponent(Fe(t)) : Fe(je().relative(decodeURIComponent(a), decodeURIComponent(t))), r);
3507
3514
  }));
3508
3515
  return i ? s : s.filter(((e) => e.basename && (e.type === "file" || e.filename !== n.replace(/\/$/, ""))));
3509
- }(i, Fe(e.remoteBasePath || e.remotePath), a, n.details, n.includeSelf);
3516
+ }(i, Pe(e.remoteBasePath || e.remotePath), a, n.details, n.includeSelf);
3510
3517
  return n.glob && (o = function(e, t) {
3511
3518
  return e.filter(((e) => L(e.filename, t, { matchBase: !0 })));
3512
3519
  }(o, n.glob)), V(r, o, n.details);
@@ -3527,7 +3534,7 @@ function xr(e) {
3527
3534
  var Sr = xr((function(e, t) {
3528
3535
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3529
3536
  return Cr(F(I({
3530
- url: M(e.remoteURL, A(t)),
3537
+ url: M(e.remoteURL, j(t)),
3531
3538
  method: "GET",
3532
3539
  headers: { Accept: "text/plain" },
3533
3540
  transformResponse: [Er]
@@ -3543,7 +3550,7 @@ function Cr(e, t, n) {
3543
3550
  var wr = xr((function(e, t) {
3544
3551
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3545
3552
  return Cr(F(I({
3546
- url: M(e.remoteURL, A(t)),
3553
+ url: M(e.remoteURL, j(t)),
3547
3554
  method: "GET"
3548
3555
  }, e, n), e), (function(t) {
3549
3556
  let r;
@@ -3560,7 +3567,7 @@ var wr = xr((function(e, t) {
3560
3567
  }));
3561
3568
  })), Tr = xr((function(e, t) {
3562
3569
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { format: r = "binary" } = n;
3563
- if (r !== "binary" && r !== "text") throw new k({ info: { code: P.InvalidOutputFormat } }, `Invalid output format: ${r}`);
3570
+ if (r !== "binary" && r !== "text") throw new A({ info: { code: P.InvalidOutputFormat } }, `Invalid output format: ${r}`);
3564
3571
  return r === "text" ? Sr(e, t, n) : wr(e, t, n);
3565
3572
  })), Er = (e) => e;
3566
3573
  function Dr(e, t) {
@@ -3786,7 +3793,7 @@ Q.prototype.build = function(e) {
3786
3793
  var Vr = Br((function(e, t, n) {
3787
3794
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
3788
3795
  return zr(F(I({
3789
- url: M(e.remoteURL, A(t)),
3796
+ url: M(e.remoteURL, j(t)),
3790
3797
  method: "UNLOCK",
3791
3798
  headers: { "Lock-Token": n }
3792
3799
  }, e, r), e), (function(t) {
@@ -3798,7 +3805,7 @@ var Vr = Br((function(e, t, n) {
3798
3805
  Timeout: i
3799
3806
  };
3800
3807
  return r && (a.If = r), zr(F(I({
3801
- url: M(e.remoteURL, A(t)),
3808
+ url: M(e.remoteURL, j(t)),
3802
3809
  method: "LOCK",
3803
3810
  headers: a,
3804
3811
  data: Lr(e.contactHref)
@@ -3871,7 +3878,7 @@ var qr = function(e) {
3871
3878
  }((function(e, t) {
3872
3879
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, { details: r = !1 } = n;
3873
3880
  return Kr(F(I({
3874
- url: M(e.remoteURL, A(t)),
3881
+ url: M(e.remoteURL, j(t)),
3875
3882
  method: "SEARCH",
3876
3883
  headers: {
3877
3884
  Accept: "text/plain,application/xml",
@@ -3885,7 +3892,7 @@ var qr = function(e) {
3885
3892
  truncated: !1,
3886
3893
  results: []
3887
3894
  };
3888
- return r.truncated = e.multistatus.response.some(((e) => (e.status || e.propstat?.status).split(" ", 3)?.[1] === "507" && e.href.replace(/\/$/, "").endsWith(A(t).replace(/\/$/, "")))), e.multistatus.response.forEach(((e) => {
3895
+ return r.truncated = e.multistatus.response.some(((e) => (e.status || e.propstat?.status).split(" ", 3)?.[1] === "507" && e.href.replace(/\/$/, "").endsWith(j(t).replace(/\/$/, "")))), e.multistatus.response.forEach(((e) => {
3889
3896
  if (e.propstat === void 0) return;
3890
3897
  let t = e.href.split("/").map(decodeURIComponent).join("/");
3891
3898
  r.results.push($n(e.propstat.prop, t, n));
@@ -3905,10 +3912,10 @@ var qr = function(e) {
3905
3912
  };
3906
3913
  }((function(e, t, n) {
3907
3914
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = I({
3908
- url: M(e.remoteURL, A(t)),
3915
+ url: M(e.remoteURL, j(t)),
3909
3916
  method: "MOVE",
3910
3917
  headers: {
3911
- Destination: M(e.remoteURL, A(n)),
3918
+ Destination: M(e.remoteURL, j(n)),
3912
3919
  Overwrite: !1 === r.overwrite ? "F" : "T"
3913
3920
  }
3914
3921
  }, e, r);
@@ -3916,12 +3923,12 @@ var qr = function(e) {
3916
3923
  B(e, t);
3917
3924
  }, (a = F(i, e)) && a.then || (a = Promise.resolve(a)), o ? a.then(o) : a;
3918
3925
  var a, o;
3919
- })), Yr = O(172);
3926
+ })), Yr = k(172);
3920
3927
  function Xr(e) {
3921
3928
  if (st(e)) return e.byteLength;
3922
3929
  if (ct(e)) return e.length;
3923
3930
  if (typeof e == "string") return (0, Yr.d)(e);
3924
- throw new k({ info: { code: P.DataTypeNoLength } }, "Cannot calculate data length: Invalid type");
3931
+ throw new A({ info: { code: P.DataTypeNoLength } }, "Cannot calculate data length: Invalid type");
3925
3932
  }
3926
3933
  var Zr = function(e) {
3927
3934
  return function() {
@@ -3936,7 +3943,7 @@ var Zr = function(e) {
3936
3943
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, { contentLength: i = !0, overwrite: a = !0 } = r, o = { "Content-Type": "application/octet-stream" };
3937
3944
  !1 === i || (o["Content-Length"] = typeof i == "number" ? `${i}` : `${Xr(n)}`), a || (o["If-None-Match"] = "*");
3938
3945
  let s = I({
3939
- url: M(e.remoteURL, A(t)),
3946
+ url: M(e.remoteURL, j(t)),
3940
3947
  method: "PUT",
3941
3948
  headers: o,
3942
3949
  data: n
@@ -3963,7 +3970,7 @@ var Zr = function(e) {
3963
3970
  };
3964
3971
  }((function(e, t) {
3965
3972
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = I({
3966
- url: M(e.remoteURL, A(t)),
3973
+ url: M(e.remoteURL, j(t)),
3967
3974
  method: "OPTIONS"
3968
3975
  }, e, n);
3969
3976
  return a = function(t) {
@@ -3984,14 +3991,14 @@ function $r(e, t, n) {
3984
3991
  }
3985
3992
  var ei = ri((function(e, t, n, r, i) {
3986
3993
  let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
3987
- if (n > r || n < 0) throw new k({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
3994
+ if (n > r || n < 0) throw new A({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
3988
3995
  let o = {
3989
3996
  "Content-Type": "application/octet-stream",
3990
3997
  "Content-Length": "" + (r - n + 1),
3991
3998
  "Content-Range": `bytes ${n}-${r}/*`
3992
3999
  };
3993
4000
  return $r(F(I({
3994
- url: M(e.remoteURL, A(t)),
4001
+ url: M(e.remoteURL, j(t)),
3995
4002
  method: "PUT",
3996
4003
  headers: o,
3997
4004
  data: i
@@ -4005,14 +4012,14 @@ function ti(e, t) {
4005
4012
  }
4006
4013
  var ni = ri((function(e, t, n, r, i) {
4007
4014
  let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
4008
- if (n > r || n < 0) throw new k({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
4015
+ if (n > r || n < 0) throw new A({ info: { code: P.InvalidUpdateRange } }, `Invalid update range ${n} for partial update`);
4009
4016
  let o = {
4010
4017
  "Content-Type": "application/x-sabredav-partialupdate",
4011
4018
  "Content-Length": "" + (r - n + 1),
4012
4019
  "X-Update-Range": `bytes=${n}-${r}`
4013
4020
  };
4014
4021
  return $r(F(I({
4015
- url: M(e.remoteURL, A(t)),
4022
+ url: M(e.remoteURL, j(t)),
4016
4023
  method: "PATCH",
4017
4024
  headers: o,
4018
4025
  data: i
@@ -4046,7 +4053,7 @@ var ii = ri((function(e, t, n, r, i) {
4046
4053
  }));
4047
4054
  }), (function(e) {
4048
4055
  if (l) return e;
4049
- throw new k({ info: { code: P.NotSupported } }, "Not supported");
4056
+ throw new A({ info: { code: P.NotSupported } }, "Not supported");
4050
4057
  }));
4051
4058
  }));
4052
4059
  }));
@@ -4088,7 +4095,7 @@ function oi(e) {
4088
4095
  createWriteStream: (e, t, n) => function(e, t) {
4089
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 = {};
4090
4097
  return !1 === n.overwrite && (a["If-None-Match"] = "*"), F(I({
4091
- url: M(e.remoteURL, A(t)),
4098
+ url: M(e.remoteURL, j(t)),
4092
4099
  method: "PUT",
4093
4100
  headers: a,
4094
4101
  data: i,
@@ -4107,7 +4114,7 @@ function oi(e) {
4107
4114
  getDirectoryContents: (e, t) => br(m, e, t),
4108
4115
  getFileContents: (e, t) => Tr(m, e, t),
4109
4116
  getFileDownloadLink: (e) => function(e, t) {
4110
- let n = M(e.remoteURL, A(t)), r = /^https:/i.test(n) ? "https" : "http";
4117
+ let n = M(e.remoteURL, j(t)), r = /^https:/i.test(n) ? "https" : "http";
4111
4118
  switch (e.authType) {
4112
4119
  case N.None: break;
4113
4120
  case N.Password: {
@@ -4115,12 +4122,12 @@ function oi(e) {
4115
4122
  n = n.replace(/^https?:\/\//, `${r}://${t}@`);
4116
4123
  break;
4117
4124
  }
4118
- default: throw new k({ info: { code: P.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${e.authType}`);
4125
+ default: throw new A({ info: { code: P.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${e.authType}`);
4119
4126
  }
4120
4127
  return n;
4121
4128
  }(m, e),
4122
4129
  getFileUploadLink: (e) => function(e, t) {
4123
- let n = `${M(e.remoteURL, A(t))}?Content-Type=application/octet-stream`, r = /^https:/i.test(n) ? "https" : "http";
4130
+ let n = `${M(e.remoteURL, j(t))}?Content-Type=application/octet-stream`, r = /^https:/i.test(n) ? "https" : "http";
4124
4131
  switch (e.authType) {
4125
4132
  case N.None: break;
4126
4133
  case N.Password: {
@@ -4128,7 +4135,7 @@ function oi(e) {
4128
4135
  n = n.replace(/^https?:\/\//, `${r}://${t}@`);
4129
4136
  break;
4130
4137
  }
4131
- default: throw new k({ info: { code: P.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${e.authType}`);
4138
+ default: throw new A({ info: { code: P.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${e.authType}`);
4132
4139
  }
4133
4140
  return n;
4134
4141
  }(m, e),
@@ -4154,28 +4161,26 @@ function oi(e) {
4154
4161
  };
4155
4162
  }
4156
4163
  //#endregion
4157
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/stringify.js
4164
+ //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/stringify.js
4158
4165
  var $ = [];
4159
4166
  for (let e = 0; e < 256; ++e) $.push((e + 256).toString(16).slice(1));
4160
4167
  function si(e, t = 0) {
4161
4168
  return ($[e[t + 0]] + $[e[t + 1]] + $[e[t + 2]] + $[e[t + 3]] + "-" + $[e[t + 4]] + $[e[t + 5]] + "-" + $[e[t + 6]] + $[e[t + 7]] + "-" + $[e[t + 8]] + $[e[t + 9]] + "-" + $[e[t + 10]] + $[e[t + 11]] + $[e[t + 12]] + $[e[t + 13]] + $[e[t + 14]] + $[e[t + 15]]).toLowerCase();
4162
4169
  }
4163
4170
  //#endregion
4164
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/rng.js
4165
- var ci, li = new Uint8Array(16);
4166
- function ui() {
4167
- if (!ci) {
4168
- if (typeof crypto > "u" || !crypto.getRandomValues) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
4169
- ci = crypto.getRandomValues.bind(crypto);
4170
- }
4171
- return ci(li);
4171
+ //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/rng.js
4172
+ var ci = new Uint8Array(16);
4173
+ function li() {
4174
+ return crypto.getRandomValues(ci);
4172
4175
  }
4173
- var di = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
4174
4176
  //#endregion
4175
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js
4176
- function fi(e, t, n) {
4177
+ //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v4.js
4178
+ function ui(e, t, n) {
4179
+ return !t && !e && crypto.randomUUID ? crypto.randomUUID() : di(e, t, n);
4180
+ }
4181
+ function di(e, t, n) {
4177
4182
  e ||= {};
4178
- let r = e.random ?? e.rng?.() ?? ui();
4183
+ let r = e.random ?? e.rng?.() ?? li();
4179
4184
  if (r.length < 16) throw Error("Random bytes length must be >= 16");
4180
4185
  if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
4181
4186
  if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
@@ -4184,15 +4189,12 @@ function fi(e, t, n) {
4184
4189
  }
4185
4190
  return si(r);
4186
4191
  }
4187
- function pi(e, t, n) {
4188
- return di.randomUUID && !t && !e ? di.randomUUID() : fi(e, t, n);
4189
- }
4190
4192
  //#endregion
4191
4193
  //#region src/webdav/client/builders.ts
4192
- var mi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includes(e) ? [e, n || ""] : [o.DavNamespace.includes(e) ? `d:${e}` : `oc:${e}`, n || ""])), hi = (e = [], { pattern: t, filterRules: n, limit: r = 0, extraProps: i = [] }) => {
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 = [] }) => {
4193
4195
  let a = "d:propfind";
4194
4196
  t && (a = "oc:search-files"), n && (a = "oc:filter-files");
4195
- let o = mi(e.reduce((e, t) => Object.assign(e, { [t]: null }), {}), i), s = { [a]: {
4197
+ let o = fi(e.reduce((e, t) => Object.assign(e, { [t]: null }), {}), i), s = { [a]: {
4196
4198
  "d:prop": o,
4197
4199
  "@@xmlns:d": "DAV:",
4198
4200
  "@@xmlns:oc": "http://owncloud.org/ns",
@@ -4200,30 +4202,30 @@ var mi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4200
4202
  "oc:pattern": t,
4201
4203
  "oc:limit": r
4202
4204
  } },
4203
- ...n && { "oc:filter-rules": mi(n, []) }
4205
+ ...n && { "oc:filter-rules": fi(n, []) }
4204
4206
  } };
4205
- return new le({
4207
+ return new ce({
4206
4208
  format: !0,
4207
4209
  ignoreAttributes: !1,
4208
4210
  attributeNamePrefix: "@@",
4209
4211
  suppressEmptyNode: !0
4210
4212
  }).build(s);
4211
- }, gi = (e) => {
4213
+ }, mi = (e) => {
4212
4214
  let t = { "d:propertyupdate": {
4213
- "d:set": { "d:prop": mi(e, []) },
4215
+ "d:set": { "d:prop": fi(e, []) },
4214
4216
  "@@xmlns:d": "DAV:",
4215
4217
  "@@xmlns:oc": "http://owncloud.org/ns"
4216
4218
  } };
4217
- return new le({
4219
+ return new ce({
4218
4220
  format: !0,
4219
4221
  ignoreAttributes: !1,
4220
4222
  attributeNamePrefix: "@@",
4221
4223
  suppressEmptyNode: !0
4222
4224
  }).build(t);
4223
- }, _i = (e) => {
4225
+ }, hi = (e) => {
4224
4226
  let t = {}, n = e.get("tus-version");
4225
4227
  return n ? (t.version = n.split(","), e.get("tus-extension") && (t.extension = e.get("tus-extension").split(",")), e.get("tus-resumable") && (t.resumable = e.get("tus-resumable")), e.get("tus-max-size") && (t.maxSize = parseInt(e.get("tus-max-size"), 10)), t) : null;
4226
- }, vi = async (e) => {
4228
+ }, gi = async (e) => {
4227
4229
  let t = (e) => {
4228
4230
  let t = decodeURIComponent(e);
4229
4231
  return e?.startsWith("/remote.php/dav/") ? i(t.replace("/remote.php/dav/", ""), {
@@ -4238,7 +4240,7 @@ var mi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4238
4240
  };
4239
4241
  return r.props.name && (r.props.name = r.props.name.toString()), r;
4240
4242
  });
4241
- }, yi = (e) => {
4243
+ }, _i = (e) => {
4242
4244
  let t = new g(), n = {
4243
4245
  message: "Unknown error",
4244
4246
  errorCode: void 0
@@ -4258,7 +4260,7 @@ var mi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4258
4260
  return n;
4259
4261
  }
4260
4262
  return n;
4261
- }, bi = class {
4263
+ }, vi = class {
4262
4264
  client;
4263
4265
  davPath;
4264
4266
  headers;
@@ -4278,16 +4280,16 @@ var mi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4278
4280
  Depth: t.toString()
4279
4281
  }, { body: o, result: s } = await this.request(e, {
4280
4282
  method: u.propfind,
4281
- data: hi(n, { extraProps: this.extraProps }),
4283
+ data: pi(n, { extraProps: this.extraProps }),
4282
4284
  headers: a,
4283
4285
  ...i
4284
4286
  });
4285
- return o?.length && (o[0].tusSupport = _i(s.headers)), o;
4287
+ return o?.length && (o[0].tusSupport = hi(s.headers)), o;
4286
4288
  }
4287
4289
  async report(e, { pattern: t = "", filterRules: n = null, limit: r = 30, properties: i, ...a } = {}) {
4288
4290
  let { body: o, result: s } = await this.request(e, {
4289
4291
  method: u.report,
4290
- data: hi(i, {
4292
+ data: pi(i, {
4291
4293
  pattern: t,
4292
4294
  filterRules: n,
4293
4295
  limit: r,
@@ -4341,7 +4343,7 @@ var mi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4341
4343
  });
4342
4344
  }
4343
4345
  propPatch(e, t, n = {}) {
4344
- let r = gi(t);
4346
+ let r = mi(t);
4345
4347
  return this.request(e, {
4346
4348
  method: u.proppatch,
4347
4349
  data: r,
@@ -4355,7 +4357,7 @@ var mi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4355
4357
  return {
4356
4358
  "Content-Type": "application/xml; charset=utf-8",
4357
4359
  "X-Requested-With": "XMLHttpRequest",
4358
- "X-Request-ID": pi(),
4360
+ "X-Request-ID": ui(),
4359
4361
  ...this.headers && { ...this.headers() },
4360
4362
  ...e
4361
4363
  };
@@ -4368,35 +4370,35 @@ var mi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4368
4370
  };
4369
4371
  try {
4370
4372
  let e = await this.client.customRequest("", r), t;
4371
- return e.status === 207 && (t = await vi(await e.text())), {
4373
+ return e.status === 207 && (t = await gi(await e.text())), {
4372
4374
  body: t,
4373
4375
  status: e.status,
4374
4376
  result: e
4375
4377
  };
4376
4378
  } catch (e) {
4377
- let { response: t } = e, n = yi(await t.text());
4379
+ let { response: t } = e, n = _i(await t.text());
4378
4380
  throw new d(n.message, n.errorCode, t, t.status);
4379
4381
  }
4380
4382
  }
4381
- }, xi = (e, t) => ({ async listFileVersions(t, n = {}) {
4383
+ }, yi = (e, t) => ({ async listFileVersions(t, n = {}) {
4382
4384
  let [r, ...a] = await e.propfind(i("meta", t, "v", { leadingSlash: !0 }), n);
4383
4385
  return a.map((t) => c(t, e.extraProps));
4384
- } }), Si = (e, t) => ({ setFavorite(t, { path: n }, r, a = {}) {
4386
+ } }), bi = (e, t) => ({ setFavorite(t, { path: n }, r, a = {}) {
4385
4387
  let o = { [m.IsFavorite]: r ? "true" : "false" };
4386
4388
  return e.propPatch(i(t.webDavPath, n), o, a);
4387
- } }), Ci = (e, t) => {
4389
+ } }), xi = (e, t) => {
4388
4390
  let r = n.create();
4389
4391
  t && r.interceptors.request.use((e) => (Object.assign(e.headers, t()), e));
4390
4392
  let i = {
4391
4393
  axiosClient: r,
4392
4394
  baseUrl: e,
4393
4395
  headers: t
4394
- }, a = new bi({
4396
+ }, a = new vi({
4395
4397
  baseUrl: e,
4396
4398
  headers: t
4397
4399
  }), o = (e) => {
4398
4400
  a.extraProps.push(e);
4399
- }, s = we(a, i), { getPathForFileId: c } = s, l = ge(a, s, i), { listFiles: u } = l, d = pe(l, i), { getFileInfo: f } = d, { createFolder: p } = de(a, d, i), m = fe(a, i), { getFileContents: h } = m, { putFileContents: g } = ve(a, d, i), { getFileUrl: _, revokeUrl: v } = me(a, m, d, i), { getPublicFileUrl: y } = he(a, i), { copyFiles: b } = ue(a, i), { moveFiles: x } = _e(a, i), { deleteFile: S } = ye(a, i), { restoreFile: ee } = be(a, i), { listFileVersions: te } = xi(a, i), { restoreFileVersion: ne } = xe(a, i), { clearTrashBin: re } = Se(a, i), { search: ie } = Ce(a, i), { setFavorite: ae } = Si(a, i);
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);
4400
4402
  return {
4401
4403
  copyFiles: b,
4402
4404
  createFolder: p,
@@ -4414,10 +4416,10 @@ var mi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4414
4416
  putFileContents: g,
4415
4417
  revokeUrl: v,
4416
4418
  clearTrashBin: re,
4417
- search: ie,
4418
- setFavorite: ae,
4419
+ search: C,
4420
+ setFavorite: ie,
4419
4421
  registerExtraProp: o
4420
4422
  };
4421
4423
  };
4422
4424
  //#endregion
4423
- export { y as n, Ci as t };
4425
+ export { y as n, xi as t };