@opencloud-eu/web-client 7.3.0 → 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{axios-DvF8YTlk.js → axios-CAceQWl5.js} +7 -5
- package/dist/{dist-CeGfU4rJ.js → dist-Ciqaw6jy.js} +11 -9
- package/dist/{generated-FCm3SbzB.js → generated-CSkivkhn.js} +395 -239
- package/dist/{graph-CppzmKYd.js → graph-BDtqSczU.js} +93 -90
- package/dist/{helpers-MRfkPTnV.js → helpers-hr58GB0t.js} +230 -224
- package/dist/{ocs-gQyxMolJ.js → ocs-BupRjiCI.js} +504 -466
- package/dist/src/graph/generated/api.d.ts +351 -28
- package/dist/src/graph/users/types.d.ts +2 -1
- package/dist/src/helpers/space/types.d.ts +6 -0
- package/dist/src/sse/index.d.ts +2 -0
- package/dist/src/webdav/client/builders.d.ts +3 -2
- package/dist/src/webdav/client/dav.d.ts +8 -2
- package/dist/src/webdav/constants/dav.d.ts +12 -0
- package/dist/src/webdav/listFiles.d.ts +10 -1
- package/dist/src/webdav/restoreFileVersion.d.ts +2 -1
- package/dist/src/webdav/setProperties.d.ts +19 -0
- package/dist/src/webdav/types.d.ts +2 -0
- package/dist/{toString-B4UEwRgf.js → toString-Y_fh2BSJ.js} +2 -2
- package/dist/web-client/graph/generated.js +2 -2
- package/dist/web-client/graph.js +1 -1
- package/dist/web-client/ocs.js +1 -1
- package/dist/web-client/sse.js +1 -1
- package/dist/web-client/webdav.js +3 -3
- package/dist/web-client.js +5 -5
- package/dist/{webdav-BMoGCm4T.js → webdav-BE0Z-EcD.js} +997 -963
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as e, i as t, n, r } from "./axios-
|
|
1
|
+
import { a as e, i as t, n, r } from "./axios-CAceQWl5.js";
|
|
2
2
|
import { t as i } from "./urlJoin-_pUL1TUx.js";
|
|
3
|
-
import { c as a, i as o, l as s, n as c, o as l, r as u, t as d } from "./toString-
|
|
3
|
+
import { c as a, i as o, l as s, n as c, o as l, r as u, t as d } from "./toString-Y_fh2BSJ.js";
|
|
4
4
|
//#region src/helpers/publicLink/functions.ts
|
|
5
5
|
function f(e, t = "") {
|
|
6
6
|
return `/public-files/${e}/${t}`.split("/").filter(Boolean).join("/");
|
|
@@ -21,21 +21,23 @@ var m = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
21
21
|
else if (o === 47) break;
|
|
22
22
|
else o = 47;
|
|
23
23
|
if (o === 47) {
|
|
24
|
-
if (i !== s - 1 && a !== 1)
|
|
25
|
-
if (
|
|
26
|
-
if (n.length
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
if (i !== s - 1 && a !== 1) {
|
|
25
|
+
if (i !== s - 1 && a === 2) {
|
|
26
|
+
if (n.length < 2 || r !== 2 || n.charCodeAt(n.length - 1) !== 46 || n.charCodeAt(n.length - 2) !== 46) {
|
|
27
|
+
if (n.length > 2) {
|
|
28
|
+
var c = n.lastIndexOf("/");
|
|
29
|
+
if (c !== n.length - 1) {
|
|
30
|
+
c === -1 ? (n = "", r = 0) : (n = n.slice(0, c), r = n.length - 1 - n.lastIndexOf("/")), i = s, a = 0;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
} else if (n.length === 2 || n.length === 1) {
|
|
34
|
+
n = "", r = 0, i = s, a = 0;
|
|
30
35
|
continue;
|
|
31
36
|
}
|
|
32
|
-
} else if (n.length === 2 || n.length === 1) {
|
|
33
|
-
n = "", r = 0, i = s, a = 0;
|
|
34
|
-
continue;
|
|
35
37
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
38
|
+
t && (n.length > 0 ? n += "/.." : n = "..", r = 2);
|
|
39
|
+
} else n.length > 0 ? n += "/" + e.slice(i + 1, s) : n = e.slice(i + 1, s), r = s - i - 1;
|
|
40
|
+
}
|
|
39
41
|
i = s, a = 0;
|
|
40
42
|
} else o === 46 && a !== -1 ? ++a : a = -1;
|
|
41
43
|
}
|
|
@@ -256,7 +258,10 @@ var m = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
256
258
|
PublicLinkExpiration: v("public-link-expiration"),
|
|
257
259
|
PublicLinkShareDate: v("public-link-share-datetime"),
|
|
258
260
|
PublicLinkShareOwner: v("public-link-share-owner")
|
|
259
|
-
}, b = Object.fromEntries(Object.entries(te).map(([e, t]) => [e, t.value])), ne =
|
|
261
|
+
}, b = Object.fromEntries(Object.entries(te).map(([e, t]) => [e, t.value])), ne = {
|
|
262
|
+
d: "DAV:",
|
|
263
|
+
oc: "http://owncloud.org/ns"
|
|
264
|
+
}, re = class e {
|
|
260
265
|
static Default = [
|
|
261
266
|
b.Permissions,
|
|
262
267
|
b.IsFavorite,
|
|
@@ -312,12 +317,12 @@ var m = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
312
317
|
};
|
|
313
318
|
//#endregion
|
|
314
319
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/identity.js
|
|
315
|
-
function
|
|
320
|
+
function ie(e) {
|
|
316
321
|
return e;
|
|
317
322
|
}
|
|
318
323
|
//#endregion
|
|
319
324
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_apply.js
|
|
320
|
-
function
|
|
325
|
+
function ae(e, t, n) {
|
|
321
326
|
switch (n.length) {
|
|
322
327
|
case 0: return e.call(t);
|
|
323
328
|
case 1: return e.call(t, n[0]);
|
|
@@ -328,106 +333,106 @@ function ie(e, t, n) {
|
|
|
328
333
|
}
|
|
329
334
|
//#endregion
|
|
330
335
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/noop.js
|
|
331
|
-
function
|
|
336
|
+
function oe() {}
|
|
332
337
|
//#endregion
|
|
333
338
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js
|
|
334
|
-
var
|
|
335
|
-
function
|
|
339
|
+
var se = 800, ce = 16, le = Date.now;
|
|
340
|
+
function ue(e) {
|
|
336
341
|
var t = 0, n = 0;
|
|
337
342
|
return function() {
|
|
338
|
-
var r =
|
|
343
|
+
var r = le(), i = ce - (r - n);
|
|
339
344
|
if (n = r, i > 0) {
|
|
340
|
-
if (++t >=
|
|
345
|
+
if (++t >= se) return arguments[0];
|
|
341
346
|
} else t = 0;
|
|
342
347
|
return e.apply(void 0, arguments);
|
|
343
348
|
};
|
|
344
349
|
}
|
|
345
350
|
//#endregion
|
|
346
351
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/constant.js
|
|
347
|
-
function
|
|
352
|
+
function de(e) {
|
|
348
353
|
return function() {
|
|
349
354
|
return e;
|
|
350
355
|
};
|
|
351
356
|
}
|
|
352
357
|
//#endregion
|
|
353
358
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js
|
|
354
|
-
var
|
|
359
|
+
var fe = function() {
|
|
355
360
|
try {
|
|
356
361
|
var e = u(Object, "defineProperty");
|
|
357
362
|
return e({}, "", {}), e;
|
|
358
363
|
} catch {}
|
|
359
|
-
}(),
|
|
360
|
-
return
|
|
364
|
+
}(), pe = ue(fe ? function(e, t) {
|
|
365
|
+
return fe(e, "toString", {
|
|
361
366
|
configurable: !0,
|
|
362
367
|
enumerable: !1,
|
|
363
|
-
value:
|
|
368
|
+
value: de(t),
|
|
364
369
|
writable: !0
|
|
365
370
|
});
|
|
366
|
-
} :
|
|
371
|
+
} : ie);
|
|
367
372
|
//#endregion
|
|
368
373
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js
|
|
369
|
-
function
|
|
374
|
+
function me(e, t, n, r) {
|
|
370
375
|
for (var i = e.length, a = n + (r ? 1 : -1); r ? a-- : ++a < i;) if (t(e[a], a, e)) return a;
|
|
371
376
|
return -1;
|
|
372
377
|
}
|
|
373
378
|
//#endregion
|
|
374
379
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js
|
|
375
|
-
function
|
|
380
|
+
function he(e) {
|
|
376
381
|
return e !== e;
|
|
377
382
|
}
|
|
378
383
|
//#endregion
|
|
379
384
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js
|
|
380
|
-
function
|
|
385
|
+
function ge(e, t, n) {
|
|
381
386
|
for (var r = n - 1, i = e.length; ++r < i;) if (e[r] === t) return r;
|
|
382
387
|
return -1;
|
|
383
388
|
}
|
|
384
389
|
//#endregion
|
|
385
390
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js
|
|
386
|
-
function
|
|
387
|
-
return t === t ?
|
|
391
|
+
function _e(e, t, n) {
|
|
392
|
+
return t === t ? ge(e, t, n) : me(e, he, n);
|
|
388
393
|
}
|
|
389
394
|
//#endregion
|
|
390
395
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js
|
|
391
|
-
function
|
|
392
|
-
return !!(e != null && e.length) &&
|
|
396
|
+
function ve(e, t) {
|
|
397
|
+
return !!(e != null && e.length) && _e(e, t, 0) > -1;
|
|
393
398
|
}
|
|
394
399
|
//#endregion
|
|
395
400
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js
|
|
396
|
-
var
|
|
397
|
-
function
|
|
398
|
-
return t =
|
|
399
|
-
for (var r = arguments, i = -1, a =
|
|
401
|
+
var ye = Math.max;
|
|
402
|
+
function be(e, t, n) {
|
|
403
|
+
return t = ye(t === void 0 ? e.length - 1 : t, 0), function() {
|
|
404
|
+
for (var r = arguments, i = -1, a = ye(r.length - t, 0), o = Array(a); ++i < a;) o[i] = r[t + i];
|
|
400
405
|
i = -1;
|
|
401
406
|
for (var s = Array(t + 1); ++i < t;) s[i] = r[i];
|
|
402
|
-
return s[t] = n(o),
|
|
407
|
+
return s[t] = n(o), ae(e, this, s);
|
|
403
408
|
};
|
|
404
409
|
}
|
|
405
410
|
//#endregion
|
|
406
411
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js
|
|
407
|
-
function
|
|
408
|
-
return
|
|
412
|
+
function xe(e, t) {
|
|
413
|
+
return pe(be(e, t, ie), e + "");
|
|
409
414
|
}
|
|
410
415
|
//#endregion
|
|
411
416
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isLength.js
|
|
412
|
-
var
|
|
413
|
-
function
|
|
414
|
-
return typeof e == "number" && e > -1 && e % 1 == 0 && e <=
|
|
417
|
+
var Se = 9007199254740991;
|
|
418
|
+
function Ce(e) {
|
|
419
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Se;
|
|
415
420
|
}
|
|
416
421
|
//#endregion
|
|
417
422
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js
|
|
418
|
-
function
|
|
419
|
-
return e != null &&
|
|
423
|
+
function we(e) {
|
|
424
|
+
return e != null && Ce(e.length) && !o(e);
|
|
420
425
|
}
|
|
421
426
|
//#endregion
|
|
422
427
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js
|
|
423
|
-
function
|
|
428
|
+
function Te(e) {
|
|
424
429
|
return function(t) {
|
|
425
430
|
return e(t);
|
|
426
431
|
};
|
|
427
432
|
}
|
|
428
433
|
//#endregion
|
|
429
434
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseSlice.js
|
|
430
|
-
function
|
|
435
|
+
function Ee(e, t, n) {
|
|
431
436
|
var r = -1, i = e.length;
|
|
432
437
|
t < 0 && (t = -t > i ? 0 : i + t), n = n > i ? i : n, n < 0 && (n += i), i = t > n ? 0 : n - t >>> 0, t >>>= 0;
|
|
433
438
|
for (var a = Array(i); ++r < i;) a[r] = e[r + t];
|
|
@@ -435,15 +440,15 @@ function Te(e, t, n) {
|
|
|
435
440
|
}
|
|
436
441
|
//#endregion
|
|
437
442
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castSlice.js
|
|
438
|
-
function
|
|
443
|
+
function De(e, t, n) {
|
|
439
444
|
var r = e.length;
|
|
440
|
-
return n = n === void 0 ? r : n, !t && n >= r ? e :
|
|
445
|
+
return n = n === void 0 ? r : n, !t && n >= r ? e : Ee(e, t, n);
|
|
441
446
|
}
|
|
442
447
|
//#endregion
|
|
443
448
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hasUnicode.js
|
|
444
|
-
var
|
|
445
|
-
function
|
|
446
|
-
return
|
|
449
|
+
var Oe = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");
|
|
450
|
+
function x(e) {
|
|
451
|
+
return Oe.test(e);
|
|
447
452
|
}
|
|
448
453
|
//#endregion
|
|
449
454
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_asciiToArray.js
|
|
@@ -452,59 +457,59 @@ function ke(e) {
|
|
|
452
457
|
}
|
|
453
458
|
//#endregion
|
|
454
459
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_unicodeToArray.js
|
|
455
|
-
var
|
|
460
|
+
var S = "\\ud800-\\udfff", Ae = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", je = "\\ufe0e\\ufe0f", Me = "[" + S + "]", C = "[" + Ae + "]", w = "\\ud83c[\\udffb-\\udfff]", Ne = "(?:" + C + "|" + w + ")", T = "[^" + S + "]", E = "(?:\\ud83c[\\udde6-\\uddff]){2}", D = "[\\ud800-\\udbff][\\udc00-\\udfff]", Pe = "\\u200d", O = Ne + "?", k = "[" + je + "]?", Fe = "(?:" + Pe + "(?:" + [
|
|
461
|
+
T,
|
|
462
|
+
E,
|
|
463
|
+
D
|
|
464
|
+
].join("|") + ")" + k + O + ")*", Ie = k + O + Fe, Le = "(?:" + [
|
|
465
|
+
T + C + "?",
|
|
456
466
|
C,
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
w,
|
|
464
|
-
Ne
|
|
465
|
-
].join("|") + ")", Be = RegExp(S + "(?=" + S + ")|" + ze + Re, "g");
|
|
466
|
-
function Ve(e) {
|
|
467
|
-
return e.match(Be) || [];
|
|
467
|
+
E,
|
|
468
|
+
D,
|
|
469
|
+
Me
|
|
470
|
+
].join("|") + ")", Re = RegExp(w + "(?=" + w + ")|" + Le + Ie, "g");
|
|
471
|
+
function ze(e) {
|
|
472
|
+
return e.match(Re) || [];
|
|
468
473
|
}
|
|
469
474
|
//#endregion
|
|
470
475
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stringToArray.js
|
|
471
|
-
function
|
|
472
|
-
return
|
|
476
|
+
function Be(e) {
|
|
477
|
+
return x(e) ? ze(e) : ke(e);
|
|
473
478
|
}
|
|
474
479
|
//#endregion
|
|
475
480
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createCaseFirst.js
|
|
476
|
-
function
|
|
481
|
+
function Ve(e) {
|
|
477
482
|
return function(t) {
|
|
478
483
|
t = d(t);
|
|
479
|
-
var n =
|
|
484
|
+
var n = x(t) ? Be(t) : void 0, r = n ? n[0] : t.charAt(0), i = n ? De(n, 1).join("") : t.slice(1);
|
|
480
485
|
return r[e]() + i;
|
|
481
486
|
};
|
|
482
487
|
}
|
|
483
488
|
//#endregion
|
|
484
489
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/upperFirst.js
|
|
485
|
-
var
|
|
490
|
+
var He = Ve("toUpperCase");
|
|
486
491
|
//#endregion
|
|
487
492
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/capitalize.js
|
|
488
|
-
function
|
|
489
|
-
return
|
|
493
|
+
function Ue(e) {
|
|
494
|
+
return He(d(e).toLowerCase());
|
|
490
495
|
}
|
|
491
496
|
//#endregion
|
|
492
497
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js
|
|
493
|
-
function
|
|
498
|
+
function We(e, t, n, r) {
|
|
494
499
|
var i = -1, a = e == null ? 0 : e.length;
|
|
495
500
|
for (r && a && (n = e[++i]); ++i < a;) n = t(n, e[i], i, e);
|
|
496
501
|
return n;
|
|
497
502
|
}
|
|
498
503
|
//#endregion
|
|
499
504
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js
|
|
500
|
-
function
|
|
505
|
+
function Ge(e) {
|
|
501
506
|
return function(t) {
|
|
502
507
|
return e?.[t];
|
|
503
508
|
};
|
|
504
509
|
}
|
|
505
510
|
//#endregion
|
|
506
511
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_deburrLetter.js
|
|
507
|
-
var
|
|
512
|
+
var Ke = Ge({
|
|
508
513
|
À: "A",
|
|
509
514
|
Á: "A",
|
|
510
515
|
Â: "A",
|
|
@@ -695,77 +700,77 @@ var Je = qe({
|
|
|
695
700
|
œ: "oe",
|
|
696
701
|
ʼn: "'n",
|
|
697
702
|
ſ: "s"
|
|
698
|
-
}),
|
|
699
|
-
function
|
|
700
|
-
return e = d(e), e && e.replace(
|
|
703
|
+
}), qe = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Je = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g");
|
|
704
|
+
function Ye(e) {
|
|
705
|
+
return e = d(e), e && e.replace(qe, Ke).replace(Je, "");
|
|
701
706
|
}
|
|
702
707
|
//#endregion
|
|
703
708
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_asciiWords.js
|
|
704
|
-
var
|
|
705
|
-
function
|
|
706
|
-
return e.match(
|
|
709
|
+
var Xe = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
710
|
+
function Ze(e) {
|
|
711
|
+
return e.match(Xe) || [];
|
|
707
712
|
}
|
|
708
713
|
//#endregion
|
|
709
714
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hasUnicodeWord.js
|
|
710
|
-
var
|
|
711
|
-
function
|
|
712
|
-
return
|
|
715
|
+
var Qe = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
716
|
+
function $e(e) {
|
|
717
|
+
return Qe.test(e);
|
|
713
718
|
}
|
|
714
719
|
//#endregion
|
|
715
720
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_unicodeWords.js
|
|
716
|
-
var
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
].join("|") + ")" +
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
].join("|") + ")" +
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
721
|
+
var A = "\\ud800-\\udfff", et = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", j = "\\u2700-\\u27bf", M = "a-z\\xdf-\\xf6\\xf8-\\xff", tt = "\\xac\\xb1\\xd7\\xf7", nt = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rt = "\\u2000-\\u206f", it = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", N = "A-Z\\xc0-\\xd6\\xd8-\\xde", at = "\\ufe0e\\ufe0f", P = tt + nt + rt + it, ot = "['’]", st = "[" + P + "]", ct = "[" + et + "]", lt = "\\d+", ut = "[" + j + "]", dt = "[" + M + "]", ft = "[^" + A + P + lt + j + M + N + "]", pt = "(?:" + ct + "|\\ud83c[\\udffb-\\udfff])", mt = "[^" + A + "]", ht = "(?:\\ud83c[\\udde6-\\uddff]){2}", gt = "[\\ud800-\\udbff][\\udc00-\\udfff]", F = "[" + N + "]", _t = "\\u200d", vt = "(?:" + dt + "|" + ft + ")", yt = "(?:" + F + "|" + ft + ")", bt = "(?:" + ot + "(?:d|ll|m|re|s|t|ve))?", xt = "(?:" + ot + "(?:D|LL|M|RE|S|T|VE))?", St = pt + "?", Ct = "[" + at + "]?", wt = "(?:" + _t + "(?:" + [
|
|
722
|
+
mt,
|
|
723
|
+
ht,
|
|
724
|
+
gt
|
|
725
|
+
].join("|") + ")" + Ct + St + ")*", Tt = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Et = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Dt = Ct + St + wt, Ot = "(?:" + [
|
|
726
|
+
ut,
|
|
727
|
+
ht,
|
|
728
|
+
gt
|
|
729
|
+
].join("|") + ")" + Dt, kt = RegExp([
|
|
730
|
+
F + "?" + dt + "+" + bt + "(?=" + [
|
|
731
|
+
st,
|
|
732
|
+
F,
|
|
728
733
|
"$"
|
|
729
734
|
].join("|") + ")",
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
735
|
+
yt + "+" + xt + "(?=" + [
|
|
736
|
+
st,
|
|
737
|
+
F + vt,
|
|
733
738
|
"$"
|
|
734
739
|
].join("|") + ")",
|
|
735
|
-
|
|
736
|
-
|
|
740
|
+
F + "?" + vt + "+" + bt,
|
|
741
|
+
F + "+" + xt,
|
|
742
|
+
Et,
|
|
737
743
|
Tt,
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
Dt
|
|
744
|
+
lt,
|
|
745
|
+
Ot
|
|
741
746
|
].join("|"), "g");
|
|
742
|
-
function
|
|
743
|
-
return e.match(
|
|
747
|
+
function At(e) {
|
|
748
|
+
return e.match(kt) || [];
|
|
744
749
|
}
|
|
745
750
|
//#endregion
|
|
746
751
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/words.js
|
|
747
|
-
function
|
|
748
|
-
return e = d(e), t = n ? void 0 : t, t === void 0 ?
|
|
752
|
+
function jt(e, t, n) {
|
|
753
|
+
return e = d(e), t = n ? void 0 : t, t === void 0 ? $e(e) ? At(e) : Ze(e) : e.match(t) || [];
|
|
749
754
|
}
|
|
750
755
|
//#endregion
|
|
751
756
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createCompounder.js
|
|
752
|
-
var
|
|
753
|
-
function
|
|
757
|
+
var Mt = RegExp("['’]", "g");
|
|
758
|
+
function Nt(e) {
|
|
754
759
|
return function(t) {
|
|
755
|
-
return
|
|
760
|
+
return We(jt(Ye(t).replace(Mt, "")), e, "");
|
|
756
761
|
};
|
|
757
762
|
}
|
|
758
763
|
//#endregion
|
|
759
764
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/camelCase.js
|
|
760
|
-
var
|
|
761
|
-
return t = t.toLowerCase(), e + (n ?
|
|
762
|
-
}), I = u(s, "Set"),
|
|
763
|
-
function
|
|
764
|
-
return this.__data__.set(e,
|
|
765
|
+
var Pt = Nt(function(e, t, n) {
|
|
766
|
+
return t = t.toLowerCase(), e + (n ? Ue(t) : t);
|
|
767
|
+
}), I = u(s, "Set"), Ft = "__lodash_hash_undefined__";
|
|
768
|
+
function It(e) {
|
|
769
|
+
return this.__data__.set(e, Ft), this;
|
|
765
770
|
}
|
|
766
771
|
//#endregion
|
|
767
772
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js
|
|
768
|
-
function
|
|
773
|
+
function Lt(e) {
|
|
769
774
|
return this.__data__.has(e);
|
|
770
775
|
}
|
|
771
776
|
//#endregion
|
|
@@ -774,7 +779,7 @@ function L(e) {
|
|
|
774
779
|
var t = -1, n = e == null ? 0 : e.length;
|
|
775
780
|
for (this.__data__ = new c(); ++t < n;) this.add(e[t]);
|
|
776
781
|
}
|
|
777
|
-
L.prototype.add = L.prototype.push =
|
|
782
|
+
L.prototype.add = L.prototype.push = It, L.prototype.has = Lt;
|
|
778
783
|
//#endregion
|
|
779
784
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js
|
|
780
785
|
function R(e, t) {
|
|
@@ -782,7 +787,7 @@ function R(e, t) {
|
|
|
782
787
|
}
|
|
783
788
|
//#endregion
|
|
784
789
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js
|
|
785
|
-
function
|
|
790
|
+
function Rt(e) {
|
|
786
791
|
var t = -1, n = Array(e.size);
|
|
787
792
|
return e.forEach(function(e) {
|
|
788
793
|
n[++t] = e;
|
|
@@ -790,22 +795,22 @@ function z(e) {
|
|
|
790
795
|
}
|
|
791
796
|
//#endregion
|
|
792
797
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js
|
|
793
|
-
function
|
|
794
|
-
return a(e) &&
|
|
798
|
+
function zt(e) {
|
|
799
|
+
return a(e) && we(e);
|
|
795
800
|
}
|
|
796
801
|
//#endregion
|
|
797
802
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js
|
|
798
|
-
function
|
|
803
|
+
function Bt(e, t, n) {
|
|
799
804
|
for (var r = -1, i = e == null ? 0 : e.length; ++r < i;) if (n(t, e[r])) return !0;
|
|
800
805
|
return !1;
|
|
801
806
|
}
|
|
802
807
|
//#endregion
|
|
803
808
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIntersection.js
|
|
804
|
-
var
|
|
805
|
-
function
|
|
806
|
-
for (var r = n ?
|
|
809
|
+
var Vt = Math.min;
|
|
810
|
+
function Ht(e, t, n) {
|
|
811
|
+
for (var r = n ? Bt : ve, i = e[0].length, a = e.length, o = a, s = Array(a), c = Infinity, u = []; o--;) {
|
|
807
812
|
var d = e[o];
|
|
808
|
-
o && t && (d = l(d,
|
|
813
|
+
o && t && (d = l(d, Te(t))), c = Vt(d.length, c), s[o] = !n && (t || i >= 120 && d.length >= 120) ? new L(o && d) : void 0;
|
|
809
814
|
}
|
|
810
815
|
d = e[0];
|
|
811
816
|
var f = -1, p = s[0];
|
|
@@ -823,23 +828,23 @@ function Bt(e, t, n) {
|
|
|
823
828
|
}
|
|
824
829
|
//#endregion
|
|
825
830
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castArrayLikeObject.js
|
|
826
|
-
function
|
|
827
|
-
return
|
|
831
|
+
function Ut(e) {
|
|
832
|
+
return zt(e) ? e : [];
|
|
828
833
|
}
|
|
829
834
|
//#endregion
|
|
830
835
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/intersection.js
|
|
831
|
-
var
|
|
832
|
-
var t = l(e,
|
|
833
|
-
return t.length && t[0] === e[0] ?
|
|
834
|
-
}),
|
|
836
|
+
var Wt = xe(function(e) {
|
|
837
|
+
var t = l(e, Ut);
|
|
838
|
+
return t.length && t[0] === e[0] ? Ht(t) : [];
|
|
839
|
+
}), Gt = I && 1 / Rt(new I([, -0]))[1] == 1 / 0 ? function(e) {
|
|
835
840
|
return new I(e);
|
|
836
|
-
} :
|
|
837
|
-
function
|
|
838
|
-
var r = -1, i =
|
|
839
|
-
if (n) o = !1, i =
|
|
840
|
-
else if (a >=
|
|
841
|
-
var l = t ? null :
|
|
842
|
-
if (l) return
|
|
841
|
+
} : oe, Kt = 200;
|
|
842
|
+
function qt(e, t, n) {
|
|
843
|
+
var r = -1, i = ve, a = e.length, o = !0, s = [], c = s;
|
|
844
|
+
if (n) o = !1, i = Bt;
|
|
845
|
+
else if (a >= Kt) {
|
|
846
|
+
var l = t ? null : Gt(e);
|
|
847
|
+
if (l) return Rt(l);
|
|
843
848
|
o = !1, i = R, c = new L();
|
|
844
849
|
} else c = t ? [] : s;
|
|
845
850
|
outer: for (; ++r < a;) {
|
|
@@ -853,38 +858,38 @@ function Gt(e, t, n) {
|
|
|
853
858
|
}
|
|
854
859
|
//#endregion
|
|
855
860
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/uniq.js
|
|
856
|
-
function
|
|
857
|
-
return e && e.length ?
|
|
861
|
+
function Jt(e) {
|
|
862
|
+
return e && e.length ? qt(e) : [];
|
|
858
863
|
}
|
|
859
864
|
//#endregion
|
|
860
865
|
//#region src/helpers/resource/functions.ts
|
|
861
|
-
var
|
|
866
|
+
var Yt = { complex: [
|
|
862
867
|
"tar.bz2",
|
|
863
868
|
"tar.gz",
|
|
864
869
|
"tar.xz"
|
|
865
|
-
] },
|
|
870
|
+
] }, Xt = (e) => Object.hasOwn(e, "ddate"), Zt = (e) => Object.hasOwn(e, "highlights"), z = (e) => e.replace(/[^A-Za-z0-9\-_]/g, ""), Qt = (e, t) => !e || typeof e != "string" ? "" : e.indexOf("!") >= 0 ? e.split("!")[t] : "", B = (e) => Qt(e, 0), V = (e) => Qt(e, 1), $t = (e) => {
|
|
866
871
|
let t = e.extension || "", n = e.name || "";
|
|
867
872
|
if (!t.length) return n;
|
|
868
873
|
let r = n.lastIndexOf(`.${t}`);
|
|
869
874
|
return n.substring(0, r);
|
|
870
|
-
},
|
|
875
|
+
}, H = (e) => {
|
|
871
876
|
let t = e.name.split(".");
|
|
872
877
|
if (t.length > 2) for (let e = 0; e < t.length; e++) {
|
|
873
878
|
let n = t.slice(e, t.length).join(".");
|
|
874
|
-
if (
|
|
879
|
+
if (Yt.complex.includes(n)) return n;
|
|
875
880
|
}
|
|
876
881
|
return t.length < 2 ? "" : t[t.length - 1];
|
|
877
|
-
},
|
|
882
|
+
}, en = (e) => (0, m.basename)((0, m.dirname)(e.path)) || null, tn = (e) => typeof e.isShareRoot == "function" && e.isShareRoot(), U = (e) => {
|
|
878
883
|
if (!e) return e;
|
|
879
884
|
let t = {};
|
|
880
885
|
return Object.keys(e).forEach((n) => {
|
|
881
|
-
t[
|
|
886
|
+
t[Pt(n)] = e[n];
|
|
882
887
|
}), t;
|
|
883
888
|
};
|
|
884
|
-
function
|
|
889
|
+
function nn(e, t = []) {
|
|
885
890
|
let n = e.props[b.Name]?.toString() || (0, m.basename)(e.filename), r = e.props[b.FileId], i = e.type === "directory", a;
|
|
886
891
|
a = e.filename.startsWith("/files") || e.filename.startsWith("/space") ? e.filename.split("/").slice(3).join("/") : e.filename, a.startsWith("/") || (a = `/${a}`);
|
|
887
|
-
let o =
|
|
892
|
+
let o = H({
|
|
888
893
|
...e,
|
|
889
894
|
id: r,
|
|
890
895
|
name: n,
|
|
@@ -901,7 +906,7 @@ function en(e, t = []) {
|
|
|
901
906
|
let p = {
|
|
902
907
|
id: r,
|
|
903
908
|
fileId: r,
|
|
904
|
-
storageId:
|
|
909
|
+
storageId: B(r),
|
|
905
910
|
parentFolderId: e.props[b.FileParent],
|
|
906
911
|
mimeType: e.props[b.MimeType],
|
|
907
912
|
name: n,
|
|
@@ -930,10 +935,10 @@ function en(e, t = []) {
|
|
|
930
935
|
displayName: e.props[b.OwnerDisplayName]
|
|
931
936
|
},
|
|
932
937
|
tags: (e.props[b.Tags] || "").toString().split(",").filter(Boolean),
|
|
933
|
-
audio:
|
|
934
|
-
location:
|
|
935
|
-
image:
|
|
936
|
-
photo:
|
|
938
|
+
audio: U(e.props[b.Audio]),
|
|
939
|
+
location: U(e.props[b.Location]),
|
|
940
|
+
image: U(e.props[b.Image]),
|
|
941
|
+
photo: U(e.props[b.Photo]),
|
|
937
942
|
extraProps: f,
|
|
938
943
|
hasPreview: () => e.props[b.HasPreview] === 1,
|
|
939
944
|
canUpload: function() {
|
|
@@ -969,14 +974,14 @@ function en(e, t = []) {
|
|
|
969
974
|
isShareRoot() {
|
|
970
975
|
return e.props[b.ShareRoot] ? e.filename.split("/").length === 3 : !1;
|
|
971
976
|
},
|
|
972
|
-
getDomSelector: () =>
|
|
977
|
+
getDomSelector: () => z(r)
|
|
973
978
|
};
|
|
974
979
|
return Object.defineProperty(p, "nodeId", { get() {
|
|
975
|
-
return
|
|
980
|
+
return V(this.id);
|
|
976
981
|
} }), p;
|
|
977
982
|
}
|
|
978
|
-
function
|
|
979
|
-
let t = e.type === "directory", n = e.props[b.TrashbinOriginalFilename]?.toString(), r =
|
|
983
|
+
function rn(e) {
|
|
984
|
+
let t = e.type === "directory", n = e.props[b.TrashbinOriginalFilename]?.toString(), r = H({
|
|
980
985
|
name: n,
|
|
981
986
|
type: e.type
|
|
982
987
|
}), a = m.default.basename(e.filename);
|
|
@@ -1004,14 +1009,14 @@ function tn(e) {
|
|
|
1004
1009
|
hasPreview: () => !1,
|
|
1005
1010
|
isShareRoot: () => !1,
|
|
1006
1011
|
canListVersions: () => !1,
|
|
1007
|
-
getDomSelector: () =>
|
|
1012
|
+
getDomSelector: () => z(a)
|
|
1008
1013
|
};
|
|
1009
1014
|
}
|
|
1010
1015
|
//#endregion
|
|
1011
1016
|
//#region src/helpers/share/types.ts
|
|
1012
|
-
var
|
|
1017
|
+
var W = /* @__PURE__ */ function(e) {
|
|
1013
1018
|
return e.createUpload = "libre.graph/driveItem/upload/create", e.createPermissions = "libre.graph/driveItem/permissions/create", e.createChildren = "libre.graph/driveItem/children/create", e.readBasic = "libre.graph/driveItem/basic/read", e.readPath = "libre.graph/driveItem/path/read", e.readQuota = "libre.graph/driveItem/quota/read", e.readContent = "libre.graph/driveItem/content/read", e.readChildren = "libre.graph/driveItem/children/read", e.readDeleted = "libre.graph/driveItem/deleted/read", e.readPermissions = "libre.graph/driveItem/permissions/read", e.readVersions = "libre.graph/driveItem/versions/read", e.updatePath = "libre.graph/driveItem/path/update", e.updateDeleted = "libre.graph/driveItem/deleted/update", e.updatePermissions = "libre.graph/driveItem/permissions/update", e.updateVersions = "libre.graph/driveItem/versions/update", e.deleteStandard = "libre.graph/driveItem/standard/delete", e.deleteDeleted = "libre.graph/driveItem/deleted/delete", e.deletePermissions = "libre.graph/driveItem/permissions/delete", e;
|
|
1014
|
-
}({}),
|
|
1019
|
+
}({}), G = (e) => e, K = class {
|
|
1015
1020
|
_key;
|
|
1016
1021
|
_value;
|
|
1017
1022
|
_label;
|
|
@@ -1031,13 +1036,13 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1031
1036
|
get icon() {
|
|
1032
1037
|
return this._icon;
|
|
1033
1038
|
}
|
|
1034
|
-
},
|
|
1035
|
-
static user = new
|
|
1036
|
-
static group = new
|
|
1037
|
-
static link = new
|
|
1038
|
-
static guest = new
|
|
1039
|
-
static remote = new
|
|
1040
|
-
static contact = new
|
|
1039
|
+
}, q = class {
|
|
1040
|
+
static user = new K("user", 0, G("User"), "user");
|
|
1041
|
+
static group = new K("group", 1, G("Group"), "group");
|
|
1042
|
+
static link = new K("link", 3, G("Link"), "link");
|
|
1043
|
+
static guest = new K("guest", 4, G("Guest"), "global");
|
|
1044
|
+
static remote = new K("remote", 6, G("External"), "earth");
|
|
1045
|
+
static contact = new K("contact", 100, G("Contact"), "global");
|
|
1041
1046
|
static individuals = [
|
|
1042
1047
|
this.user,
|
|
1043
1048
|
this.guest,
|
|
@@ -1084,18 +1089,18 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1084
1089
|
return e.map((e) => e.value);
|
|
1085
1090
|
}
|
|
1086
1091
|
static containsAnyValue(e, t) {
|
|
1087
|
-
return
|
|
1092
|
+
return Wt(this.getValues(e), t).length > 0;
|
|
1088
1093
|
}
|
|
1089
|
-
},
|
|
1094
|
+
}, an = "a0ca6a90-a365-4782-871e-d44447bbc668", on = "89f37a33-858b-45fa-8890-a1f2b27d90e1", sn = (e) => e?.type === "space", J = (e) => e?.driveType === "personal", cn = (e) => e?.driveType === "project", ln = (e) => e?.driveType === "share", un = (e) => e?.driveType === "mountpoint", dn = (e) => e?.driveType === "public";
|
|
1090
1095
|
//#endregion
|
|
1091
1096
|
//#region src/helpers/space/functions.ts
|
|
1092
|
-
function
|
|
1097
|
+
function Y(e, t) {
|
|
1093
1098
|
return i("spaces", e, t, { leadingSlash: !0 });
|
|
1094
1099
|
}
|
|
1095
|
-
function
|
|
1100
|
+
function X(e, t = "") {
|
|
1096
1101
|
return i("spaces", "trash-bin", e, t, { leadingSlash: !0 });
|
|
1097
1102
|
}
|
|
1098
|
-
function
|
|
1103
|
+
function fn(e, t) {
|
|
1099
1104
|
let n = e[{
|
|
1100
1105
|
image: "spaceImageData",
|
|
1101
1106
|
readme: "spaceReadmeData"
|
|
@@ -1104,16 +1109,16 @@ function dn(e, t) {
|
|
|
1104
1109
|
let r = decodeURI(n.webDavUrl).split("/"), i = r.find((t) => t.startsWith(e.id));
|
|
1105
1110
|
return i ? r.slice(r.indexOf(i) + 1).join("/") : "";
|
|
1106
1111
|
}
|
|
1107
|
-
function
|
|
1108
|
-
return e.permissions.includes(
|
|
1112
|
+
function pn(e) {
|
|
1113
|
+
return e.permissions.includes(W.deletePermissions);
|
|
1109
1114
|
}
|
|
1110
|
-
var
|
|
1115
|
+
var mn = (e, t) => e.root.permissions?.filter((e) => {
|
|
1111
1116
|
let n = [];
|
|
1112
1117
|
e["@libre.graph.permissions.actions"] && (n = e["@libre.graph.permissions.actions"]);
|
|
1113
1118
|
let r = t[e.roles?.[0]];
|
|
1114
|
-
return r && !n.length && (n = r.rolePermissions.find(({ condition: e }) => e === "exists @Resource.Root")?.allowedResourceActions || []), n.includes(
|
|
1119
|
+
return r && !n.length && (n = r.rolePermissions.find(({ condition: e }) => e === "exists @Resource.Root")?.allowedResourceActions || []), n.includes(W.deletePermissions);
|
|
1115
1120
|
});
|
|
1116
|
-
function
|
|
1121
|
+
function hn(e) {
|
|
1117
1122
|
let t = e.publicLinkPassword, n = e.props?.[b.FileId], r = e.props?.[b.PublicLinkItemType], i = e.props?.[b.PublicLinkPermission], a = e.props?.[b.PublicLinkExpiration], o = e.props?.[b.PublicLinkShareDate], s = e.props?.[b.PublicLinkShareOwner], c = e.publicLinkType, l, u;
|
|
1118
1123
|
return c === "ocm" ? (l = `ocm/${e.id}`, u = p(e.id)) : (l = `public/${e.id}`, u = f(e.id)), Object.assign(Z({
|
|
1119
1124
|
...e,
|
|
@@ -1131,7 +1136,7 @@ function mn(e) {
|
|
|
1131
1136
|
publicLinkType: c
|
|
1132
1137
|
});
|
|
1133
1138
|
}
|
|
1134
|
-
function
|
|
1139
|
+
function gn({ driveAliasPrefix: e, id: t, shareName: n, serverUrl: r, graphPermissions: i }) {
|
|
1135
1140
|
let a = Z({
|
|
1136
1141
|
id: t,
|
|
1137
1142
|
driveAlias: `${e}/${n}`,
|
|
@@ -1146,7 +1151,7 @@ function hn({ driveAliasPrefix: e, id: t, shareName: n, serverUrl: r, graphPermi
|
|
|
1146
1151
|
function Z(e) {
|
|
1147
1152
|
let t, n;
|
|
1148
1153
|
e.special && (t = e.special.find((e) => e.specialFolder.name === "image"), n = e.special.find((e) => e.specialFolder.name === "readme"), t && (t.webDavUrl = decodeURI(t.webDavUrl)), n && (n.webDavUrl = decodeURI(n.webDavUrl)));
|
|
1149
|
-
let r = e.root?.deleted?.state === "trashed", a = i(e.webDavPath ||
|
|
1154
|
+
let r = e.root?.deleted?.state === "trashed", a = i(e.webDavPath || Y(e.id), { leadingSlash: !0 }), o = i(e.serverUrl, "dav", a), s = i(e.webDavTrashPath || X(e.id), { leadingSlash: !0 }), c = i(e.serverUrl, "dav", s), l = {
|
|
1150
1155
|
id: e.id,
|
|
1151
1156
|
fileId: e.id,
|
|
1152
1157
|
storageId: e.id,
|
|
@@ -1177,42 +1182,43 @@ function Z(e) {
|
|
|
1177
1182
|
spaceImageData: t,
|
|
1178
1183
|
spaceReadmeData: n,
|
|
1179
1184
|
hasTrashedItems: e["@libre.graph.hasTrashedItems"] || !1,
|
|
1185
|
+
contentType: e["@libre.graph.contentType"],
|
|
1180
1186
|
graphPermissions: void 0,
|
|
1181
1187
|
canUpload: function({ user: e } = {}) {
|
|
1182
|
-
return
|
|
1188
|
+
return J(this) && this.isOwner(e) ? !0 : this.graphPermissions?.includes(W.createUpload);
|
|
1183
1189
|
},
|
|
1184
1190
|
canDownload: function() {
|
|
1185
1191
|
return !0;
|
|
1186
1192
|
},
|
|
1187
1193
|
canBeDeleted: function({ ability: e } = {}) {
|
|
1188
|
-
return this.disabled ? e?.can("delete-all", "Drive") ? !0 : this.graphPermissions?.includes(
|
|
1194
|
+
return this.disabled ? e?.can("delete-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions) : !1;
|
|
1189
1195
|
},
|
|
1190
1196
|
canRename: function({ ability: e } = {}) {
|
|
1191
|
-
return e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(
|
|
1197
|
+
return e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions);
|
|
1192
1198
|
},
|
|
1193
1199
|
canEditDescription: function({ ability: e } = {}) {
|
|
1194
|
-
return e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(
|
|
1200
|
+
return this.isInVault ? !1 : e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions);
|
|
1195
1201
|
},
|
|
1196
1202
|
canRestore: function({ ability: e } = {}) {
|
|
1197
|
-
return this.disabled ? e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(
|
|
1203
|
+
return this.disabled ? e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions) : !1;
|
|
1198
1204
|
},
|
|
1199
1205
|
canDisable: function({ ability: e } = {}) {
|
|
1200
|
-
return this.disabled ? !1 : e?.can("delete-all", "Drive") ? !0 : this.graphPermissions?.includes(
|
|
1206
|
+
return this.disabled ? !1 : e?.can("delete-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions);
|
|
1201
1207
|
},
|
|
1202
1208
|
canShare: function() {
|
|
1203
|
-
return this.graphPermissions?.includes(
|
|
1209
|
+
return this.graphPermissions?.includes(W.createPermissions);
|
|
1204
1210
|
},
|
|
1205
1211
|
canEditImage: function() {
|
|
1206
|
-
return
|
|
1212
|
+
return this.disabled || this.isInVault ? !1 : this.graphPermissions?.includes(W.deletePermissions);
|
|
1207
1213
|
},
|
|
1208
1214
|
canEditReadme: function() {
|
|
1209
|
-
return
|
|
1215
|
+
return this.disabled || this.isInVault ? !1 : this.graphPermissions?.includes(W.deletePermissions);
|
|
1210
1216
|
},
|
|
1211
1217
|
canRestoreFromTrashbin: function() {
|
|
1212
|
-
return this.graphPermissions?.includes(
|
|
1218
|
+
return this.graphPermissions?.includes(W.updateDeleted);
|
|
1213
1219
|
},
|
|
1214
1220
|
canDeleteFromTrashBin: function({ user: e } = {}) {
|
|
1215
|
-
return
|
|
1221
|
+
return J(this) && this.isOwner(e) ? !0 : this.graphPermissions?.includes(W.deletePermissions);
|
|
1216
1222
|
},
|
|
1217
1223
|
canListVersions: function() {
|
|
1218
1224
|
return !1;
|
|
@@ -1236,7 +1242,7 @@ function Z(e) {
|
|
|
1236
1242
|
"public"
|
|
1237
1243
|
].includes(e.driveType);
|
|
1238
1244
|
},
|
|
1239
|
-
getDomSelector: () =>
|
|
1245
|
+
getDomSelector: () => z(e.id),
|
|
1240
1246
|
getDriveAliasAndItem({ path: e }) {
|
|
1241
1247
|
return i(this.driveAlias, e, { leadingSlash: !1 });
|
|
1242
1248
|
},
|
|
@@ -1251,15 +1257,15 @@ function Z(e) {
|
|
|
1251
1257
|
}
|
|
1252
1258
|
};
|
|
1253
1259
|
return Object.defineProperty(l, "nodeId", { get() {
|
|
1254
|
-
return
|
|
1260
|
+
return V(this.id);
|
|
1255
1261
|
} }), l;
|
|
1256
1262
|
}
|
|
1257
|
-
function
|
|
1263
|
+
function _n(e) {
|
|
1258
1264
|
return {
|
|
1259
1265
|
id: e.spaceImageData.id,
|
|
1260
1266
|
name: e.spaceImageData.name,
|
|
1261
1267
|
etag: e.spaceImageData.eTag,
|
|
1262
|
-
extension:
|
|
1268
|
+
extension: H({ name: e.spaceImageData.name }),
|
|
1263
1269
|
mimeType: e.spaceImageData.file.mimeType,
|
|
1264
1270
|
type: "file",
|
|
1265
1271
|
webDavPath: i(e.webDavPath, ".space", e.spaceImageData.name),
|
|
@@ -1269,10 +1275,10 @@ function gn(e) {
|
|
|
1269
1275
|
}
|
|
1270
1276
|
//#endregion
|
|
1271
1277
|
//#region src/helpers/share/functions.ts
|
|
1272
|
-
var Q = (e) => Object.hasOwn(e, "sharedWith"),
|
|
1278
|
+
var Q = (e) => Object.hasOwn(e, "sharedWith"), vn = (e) => Q(e) && e.outgoing, yn = (e) => Q(e) && !e.outgoing, bn = (e) => Object.hasOwn(e, "role"), xn = (e) => !Object.hasOwn(e, "role"), Sn = ({ driveItem: e, graphRoles: t }) => e.remoteItem?.permissions.reduce((e, n) => (n.roles?.forEach((n) => {
|
|
1273
1279
|
let r = t[n];
|
|
1274
1280
|
r && !e.some(({ id: e }) => e === r.id) && e.push(r);
|
|
1275
|
-
}), e), []),
|
|
1281
|
+
}), e), []), Cn = ({ driveItem: e, shareRoles: t }) => {
|
|
1276
1282
|
if (!t.length) {
|
|
1277
1283
|
let t = e.remoteItem?.permissions.reduce((e, t) => {
|
|
1278
1284
|
let n = t["@libre.graph.permissions.actions"];
|
|
@@ -1285,8 +1291,8 @@ var Q = (e) => Object.hasOwn(e, "sharedWith"), _n = (e) => Q(e) && e.outgoing, v
|
|
|
1285
1291
|
}), e), []);
|
|
1286
1292
|
return [...new Set(n)];
|
|
1287
1293
|
};
|
|
1288
|
-
function
|
|
1289
|
-
let r = e.name || e.remoteItem.name, a =
|
|
1294
|
+
function wn({ driveItem: e, graphRoles: t, serverUrl: n }) {
|
|
1295
|
+
let r = e.name || e.remoteItem.name, a = B(e.remoteItem.id), o = e.remoteItem.permissions.map((e) => {
|
|
1290
1296
|
let { grantedToV2: t } = e;
|
|
1291
1297
|
return {
|
|
1292
1298
|
...t.group || t.user,
|
|
@@ -1295,12 +1301,12 @@ function Cn({ driveItem: e, graphRoles: t, serverUrl: n }) {
|
|
|
1295
1301
|
}), s = e.remoteItem.permissions.reduce((e, t) => {
|
|
1296
1302
|
let n = t.invitation.invitedBy.user;
|
|
1297
1303
|
return e.some(({ id: e }) => e === n.id) || e.push(n), e;
|
|
1298
|
-
}, []), c =
|
|
1299
|
-
s.some((e) => e["@libre.graph.userType"] === "Federated") && (c = [
|
|
1300
|
-
let l =
|
|
1304
|
+
}, []), c = Jt(e.remoteItem.permissions.map($));
|
|
1305
|
+
s.some((e) => e["@libre.graph.userType"] === "Federated") && (c = [q.remote.value]);
|
|
1306
|
+
let l = Sn({
|
|
1301
1307
|
driveItem: e,
|
|
1302
1308
|
graphRoles: t
|
|
1303
|
-
}), u =
|
|
1309
|
+
}), u = Cn({
|
|
1304
1310
|
driveItem: e,
|
|
1305
1311
|
shareRoles: l
|
|
1306
1312
|
}), d = {
|
|
@@ -1315,7 +1321,7 @@ function Cn({ driveItem: e, graphRoles: t, serverUrl: n }) {
|
|
|
1315
1321
|
parentFolderId: e.parentReference?.id,
|
|
1316
1322
|
sdate: e.remoteItem.permissions[0].createdDateTime,
|
|
1317
1323
|
tags: [],
|
|
1318
|
-
webDavPath:
|
|
1324
|
+
webDavPath: Y(e.remoteItem.id, "/"),
|
|
1319
1325
|
sharedBy: s,
|
|
1320
1326
|
owner: e.remoteItem.createdBy?.user,
|
|
1321
1327
|
sharedWith: o,
|
|
@@ -1332,22 +1338,22 @@ function Cn({ driveItem: e, graphRoles: t, serverUrl: n }) {
|
|
|
1332
1338
|
privateLink: i(n, "f", e.remoteItem.id),
|
|
1333
1339
|
hasPreview: () => !!e.thumbnails,
|
|
1334
1340
|
canRename: () => e["@client.synchronize"],
|
|
1335
|
-
canDownload: () => u.includes(
|
|
1336
|
-
canUpload: () => u.includes(
|
|
1337
|
-
canCreate: () => u.includes(
|
|
1338
|
-
canBeDeleted: () => u.includes(
|
|
1339
|
-
canEditTags: () => u.includes(
|
|
1340
|
-
canListVersions: () => !e.folder && u.includes(
|
|
1341
|
+
canDownload: () => u.includes(W.readContent),
|
|
1342
|
+
canUpload: () => u.includes(W.createUpload),
|
|
1343
|
+
canCreate: () => u.includes(W.createChildren),
|
|
1344
|
+
canBeDeleted: () => u.includes(W.deleteStandard),
|
|
1345
|
+
canEditTags: () => u.includes(W.createUpload),
|
|
1346
|
+
canListVersions: () => !e.folder && u.includes(W.readVersions),
|
|
1341
1347
|
isMounted: () => !1,
|
|
1342
1348
|
isReceivedShare: () => !0,
|
|
1343
1349
|
canShare: () => !1,
|
|
1344
1350
|
isShareRoot: () => !0,
|
|
1345
|
-
getDomSelector: () =>
|
|
1351
|
+
getDomSelector: () => z(e.id)
|
|
1346
1352
|
};
|
|
1347
|
-
return d.extension =
|
|
1353
|
+
return d.extension = H(d), d;
|
|
1348
1354
|
}
|
|
1349
|
-
function
|
|
1350
|
-
let r =
|
|
1355
|
+
function Tn({ driveItem: e, user: t, serverUrl: n }) {
|
|
1356
|
+
let r = B(e.id), a = i(e.parentReference.path, e.name), o = {
|
|
1351
1357
|
id: e.id,
|
|
1352
1358
|
driveId: e.parentReference?.driveId,
|
|
1353
1359
|
path: a,
|
|
@@ -1358,7 +1364,7 @@ function wn({ driveItem: e, user: t, serverUrl: n }) {
|
|
|
1358
1364
|
parentFolderId: e.parentReference?.id,
|
|
1359
1365
|
sdate: e.permissions[0].createdDateTime,
|
|
1360
1366
|
tags: [],
|
|
1361
|
-
webDavPath:
|
|
1367
|
+
webDavPath: Y(r, a),
|
|
1362
1368
|
sharedBy: [{
|
|
1363
1369
|
id: t.id,
|
|
1364
1370
|
displayName: t.displayName
|
|
@@ -1371,7 +1377,7 @@ function wn({ driveItem: e, user: t, serverUrl: n }) {
|
|
|
1371
1377
|
if (e.link) return {
|
|
1372
1378
|
id: e.id,
|
|
1373
1379
|
displayName: e.link["@libre.graph.displayName"],
|
|
1374
|
-
shareType:
|
|
1380
|
+
shareType: q.link.value
|
|
1375
1381
|
};
|
|
1376
1382
|
let t = $(e);
|
|
1377
1383
|
return {
|
|
@@ -1397,11 +1403,11 @@ function wn({ driveItem: e, user: t, serverUrl: n }) {
|
|
|
1397
1403
|
isShareRoot: () => !1,
|
|
1398
1404
|
isReceivedShare: () => !0,
|
|
1399
1405
|
canShare: () => !0,
|
|
1400
|
-
getDomSelector: () =>
|
|
1406
|
+
getDomSelector: () => z(e.id)
|
|
1401
1407
|
};
|
|
1402
|
-
return o.extension =
|
|
1408
|
+
return o.extension = H(o), o;
|
|
1403
1409
|
}
|
|
1404
|
-
function
|
|
1410
|
+
function En({ graphPermission: e, graphRoles: t, resourceId: n, indirect: r = !1 }) {
|
|
1405
1411
|
let i = t[e.roles?.[0]], a = e.invitation?.invitedBy?.user;
|
|
1406
1412
|
return {
|
|
1407
1413
|
id: e.id,
|
|
@@ -1419,13 +1425,13 @@ function Tn({ graphPermission: e, graphRoles: t, resourceId: n, indirect: r = !1
|
|
|
1419
1425
|
expirationDateTime: e.expirationDateTime
|
|
1420
1426
|
};
|
|
1421
1427
|
}
|
|
1422
|
-
function
|
|
1428
|
+
function Dn({ graphPermission: e, resourceId: t, indirect: n = !1 }) {
|
|
1423
1429
|
let r = e.invitation?.invitedBy?.user;
|
|
1424
1430
|
return {
|
|
1425
1431
|
id: e.id,
|
|
1426
1432
|
resourceId: t,
|
|
1427
1433
|
indirect: n,
|
|
1428
|
-
shareType:
|
|
1434
|
+
shareType: q.link.value,
|
|
1429
1435
|
sharedBy: {
|
|
1430
1436
|
id: r?.id,
|
|
1431
1437
|
displayName: r?.displayName
|
|
@@ -1441,7 +1447,7 @@ function En({ graphPermission: e, resourceId: t, indirect: n = !1 }) {
|
|
|
1441
1447
|
};
|
|
1442
1448
|
}
|
|
1443
1449
|
function $({ link: e, grantedToV2: t }) {
|
|
1444
|
-
return e ?
|
|
1450
|
+
return e ? q.link.value : t?.group ? q.group.value : t?.user?.["@libre.graph.userType"] === "Federated" ? q.remote.value : q.user.value;
|
|
1445
1451
|
}
|
|
1446
1452
|
//#endregion
|
|
1447
|
-
export {
|
|
1453
|
+
export { q as A, Zt as B, un as C, ln as D, dn as E, H as F, h as G, Xt as H, $t as I, p as J, re as K, V as L, rn as M, nn as N, sn as O, z as P, en as R, an as S, cn as T, g as U, tn as V, ne as W, f as Y, X as _, Cn as a, pn as b, yn as c, Q as d, hn as f, Y as g, _n as h, Tn as i, W as j, K as k, xn as l, Z as m, wn as n, Sn as o, gn as p, b as q, Dn as r, bn as s, En as t, vn as u, fn as v, J as w, on as x, mn as y, B as z };
|