@opencloud-eu/web-client 7.3.0 → 8.0.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-ULsDSF3p.js} +842 -626
- package/dist/dist-WdVfmT0d.js +4 -0
- package/dist/{generated-FCm3SbzB.js → generated-CkfYRFme.js} +395 -239
- package/dist/{graph-CppzmKYd.js → graph-D3q1149Y.js} +101 -97
- package/dist/{helpers-MRfkPTnV.js → helpers-C_9em2wB.js} +236 -224
- package/dist/{ocs-gQyxMolJ.js → ocs-CGD-4vGl.js} +1454 -563
- package/dist/ox-D1FgExd1.js +3849 -0
- package/dist/src/graph/generated/api.d.ts +461 -122
- package/dist/src/graph/users/types.d.ts +2 -1
- package/dist/src/helpers/resource/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 +17 -1
- 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-DfgrQ1mh.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/ox.js +1 -1
- package/dist/web-client/sse.js +1 -1
- package/dist/web-client/webdav.js +3 -3
- package/dist/web-client.js +6 -6
- package/dist/{webdav-BMoGCm4T.js → webdav-BxsiETq0.js} +997 -963
- package/package.json +4 -4
- package/dist/dist-CeGfU4rJ.js +0 -810
- package/dist/ox-DIaYdpxw.js +0 -3045
|
@@ -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-ULsDSF3p.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-DfgrQ1mh.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
|
}
|
|
@@ -223,6 +225,10 @@ var m = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
223
225
|
value: "photo",
|
|
224
226
|
type: null
|
|
225
227
|
},
|
|
228
|
+
MotionPhoto: {
|
|
229
|
+
value: "motion-photo",
|
|
230
|
+
type: null
|
|
231
|
+
},
|
|
226
232
|
ETag: v("getetag"),
|
|
227
233
|
MimeType: v("getcontenttype"),
|
|
228
234
|
ResourceType: ((e) => _(e))("resourcetype"),
|
|
@@ -256,7 +262,10 @@ var m = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
256
262
|
PublicLinkExpiration: v("public-link-expiration"),
|
|
257
263
|
PublicLinkShareDate: v("public-link-share-datetime"),
|
|
258
264
|
PublicLinkShareOwner: v("public-link-share-owner")
|
|
259
|
-
}, b = Object.fromEntries(Object.entries(te).map(([e, t]) => [e, t.value])), ne =
|
|
265
|
+
}, b = Object.fromEntries(Object.entries(te).map(([e, t]) => [e, t.value])), ne = {
|
|
266
|
+
d: "DAV:",
|
|
267
|
+
oc: "http://owncloud.org/ns"
|
|
268
|
+
}, re = class e {
|
|
260
269
|
static Default = [
|
|
261
270
|
b.Permissions,
|
|
262
271
|
b.IsFavorite,
|
|
@@ -282,6 +291,7 @@ var m = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
282
291
|
b.Location,
|
|
283
292
|
b.Image,
|
|
284
293
|
b.Photo,
|
|
294
|
+
b.MotionPhoto,
|
|
285
295
|
b.HasPreview
|
|
286
296
|
];
|
|
287
297
|
static PublicLink = e.Default.concat([
|
|
@@ -312,12 +322,12 @@ var m = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
312
322
|
};
|
|
313
323
|
//#endregion
|
|
314
324
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/identity.js
|
|
315
|
-
function
|
|
325
|
+
function ie(e) {
|
|
316
326
|
return e;
|
|
317
327
|
}
|
|
318
328
|
//#endregion
|
|
319
329
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_apply.js
|
|
320
|
-
function
|
|
330
|
+
function ae(e, t, n) {
|
|
321
331
|
switch (n.length) {
|
|
322
332
|
case 0: return e.call(t);
|
|
323
333
|
case 1: return e.call(t, n[0]);
|
|
@@ -328,106 +338,106 @@ function ie(e, t, n) {
|
|
|
328
338
|
}
|
|
329
339
|
//#endregion
|
|
330
340
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/noop.js
|
|
331
|
-
function
|
|
341
|
+
function oe() {}
|
|
332
342
|
//#endregion
|
|
333
343
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js
|
|
334
|
-
var
|
|
335
|
-
function
|
|
344
|
+
var se = 800, ce = 16, le = Date.now;
|
|
345
|
+
function ue(e) {
|
|
336
346
|
var t = 0, n = 0;
|
|
337
347
|
return function() {
|
|
338
|
-
var r =
|
|
348
|
+
var r = le(), i = ce - (r - n);
|
|
339
349
|
if (n = r, i > 0) {
|
|
340
|
-
if (++t >=
|
|
350
|
+
if (++t >= se) return arguments[0];
|
|
341
351
|
} else t = 0;
|
|
342
352
|
return e.apply(void 0, arguments);
|
|
343
353
|
};
|
|
344
354
|
}
|
|
345
355
|
//#endregion
|
|
346
356
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/constant.js
|
|
347
|
-
function
|
|
357
|
+
function de(e) {
|
|
348
358
|
return function() {
|
|
349
359
|
return e;
|
|
350
360
|
};
|
|
351
361
|
}
|
|
352
362
|
//#endregion
|
|
353
363
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js
|
|
354
|
-
var
|
|
364
|
+
var fe = function() {
|
|
355
365
|
try {
|
|
356
366
|
var e = u(Object, "defineProperty");
|
|
357
367
|
return e({}, "", {}), e;
|
|
358
368
|
} catch {}
|
|
359
|
-
}(),
|
|
360
|
-
return
|
|
369
|
+
}(), pe = ue(fe ? function(e, t) {
|
|
370
|
+
return fe(e, "toString", {
|
|
361
371
|
configurable: !0,
|
|
362
372
|
enumerable: !1,
|
|
363
|
-
value:
|
|
373
|
+
value: de(t),
|
|
364
374
|
writable: !0
|
|
365
375
|
});
|
|
366
|
-
} :
|
|
376
|
+
} : ie);
|
|
367
377
|
//#endregion
|
|
368
378
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js
|
|
369
|
-
function
|
|
379
|
+
function me(e, t, n, r) {
|
|
370
380
|
for (var i = e.length, a = n + (r ? 1 : -1); r ? a-- : ++a < i;) if (t(e[a], a, e)) return a;
|
|
371
381
|
return -1;
|
|
372
382
|
}
|
|
373
383
|
//#endregion
|
|
374
384
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js
|
|
375
|
-
function
|
|
385
|
+
function he(e) {
|
|
376
386
|
return e !== e;
|
|
377
387
|
}
|
|
378
388
|
//#endregion
|
|
379
389
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js
|
|
380
|
-
function
|
|
390
|
+
function ge(e, t, n) {
|
|
381
391
|
for (var r = n - 1, i = e.length; ++r < i;) if (e[r] === t) return r;
|
|
382
392
|
return -1;
|
|
383
393
|
}
|
|
384
394
|
//#endregion
|
|
385
395
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js
|
|
386
|
-
function
|
|
387
|
-
return t === t ?
|
|
396
|
+
function _e(e, t, n) {
|
|
397
|
+
return t === t ? ge(e, t, n) : me(e, he, n);
|
|
388
398
|
}
|
|
389
399
|
//#endregion
|
|
390
400
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js
|
|
391
|
-
function
|
|
392
|
-
return !!(e != null && e.length) &&
|
|
401
|
+
function ve(e, t) {
|
|
402
|
+
return !!(e != null && e.length) && _e(e, t, 0) > -1;
|
|
393
403
|
}
|
|
394
404
|
//#endregion
|
|
395
405
|
//#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 =
|
|
406
|
+
var ye = Math.max;
|
|
407
|
+
function be(e, t, n) {
|
|
408
|
+
return t = ye(t === void 0 ? e.length - 1 : t, 0), function() {
|
|
409
|
+
for (var r = arguments, i = -1, a = ye(r.length - t, 0), o = Array(a); ++i < a;) o[i] = r[t + i];
|
|
400
410
|
i = -1;
|
|
401
411
|
for (var s = Array(t + 1); ++i < t;) s[i] = r[i];
|
|
402
|
-
return s[t] = n(o),
|
|
412
|
+
return s[t] = n(o), ae(e, this, s);
|
|
403
413
|
};
|
|
404
414
|
}
|
|
405
415
|
//#endregion
|
|
406
416
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js
|
|
407
|
-
function
|
|
408
|
-
return
|
|
417
|
+
function xe(e, t) {
|
|
418
|
+
return pe(be(e, t, ie), e + "");
|
|
409
419
|
}
|
|
410
420
|
//#endregion
|
|
411
421
|
//#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 <=
|
|
422
|
+
var Se = 9007199254740991;
|
|
423
|
+
function Ce(e) {
|
|
424
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Se;
|
|
415
425
|
}
|
|
416
426
|
//#endregion
|
|
417
427
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js
|
|
418
|
-
function
|
|
419
|
-
return e != null &&
|
|
428
|
+
function we(e) {
|
|
429
|
+
return e != null && Ce(e.length) && !o(e);
|
|
420
430
|
}
|
|
421
431
|
//#endregion
|
|
422
432
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js
|
|
423
|
-
function
|
|
433
|
+
function Te(e) {
|
|
424
434
|
return function(t) {
|
|
425
435
|
return e(t);
|
|
426
436
|
};
|
|
427
437
|
}
|
|
428
438
|
//#endregion
|
|
429
439
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseSlice.js
|
|
430
|
-
function
|
|
440
|
+
function Ee(e, t, n) {
|
|
431
441
|
var r = -1, i = e.length;
|
|
432
442
|
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
443
|
for (var a = Array(i); ++r < i;) a[r] = e[r + t];
|
|
@@ -435,15 +445,15 @@ function Te(e, t, n) {
|
|
|
435
445
|
}
|
|
436
446
|
//#endregion
|
|
437
447
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castSlice.js
|
|
438
|
-
function
|
|
448
|
+
function De(e, t, n) {
|
|
439
449
|
var r = e.length;
|
|
440
|
-
return n = n === void 0 ? r : n, !t && n >= r ? e :
|
|
450
|
+
return n = n === void 0 ? r : n, !t && n >= r ? e : Ee(e, t, n);
|
|
441
451
|
}
|
|
442
452
|
//#endregion
|
|
443
453
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hasUnicode.js
|
|
444
|
-
var
|
|
445
|
-
function
|
|
446
|
-
return
|
|
454
|
+
var Oe = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");
|
|
455
|
+
function x(e) {
|
|
456
|
+
return Oe.test(e);
|
|
447
457
|
}
|
|
448
458
|
//#endregion
|
|
449
459
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_asciiToArray.js
|
|
@@ -452,59 +462,59 @@ function ke(e) {
|
|
|
452
462
|
}
|
|
453
463
|
//#endregion
|
|
454
464
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_unicodeToArray.js
|
|
455
|
-
var
|
|
465
|
+
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 + "(?:" + [
|
|
466
|
+
T,
|
|
467
|
+
E,
|
|
468
|
+
D
|
|
469
|
+
].join("|") + ")" + k + O + ")*", Ie = k + O + Fe, Le = "(?:" + [
|
|
470
|
+
T + C + "?",
|
|
456
471
|
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) || [];
|
|
472
|
+
E,
|
|
473
|
+
D,
|
|
474
|
+
Me
|
|
475
|
+
].join("|") + ")", Re = RegExp(w + "(?=" + w + ")|" + Le + Ie, "g");
|
|
476
|
+
function ze(e) {
|
|
477
|
+
return e.match(Re) || [];
|
|
468
478
|
}
|
|
469
479
|
//#endregion
|
|
470
480
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stringToArray.js
|
|
471
|
-
function
|
|
472
|
-
return
|
|
481
|
+
function Be(e) {
|
|
482
|
+
return x(e) ? ze(e) : ke(e);
|
|
473
483
|
}
|
|
474
484
|
//#endregion
|
|
475
485
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createCaseFirst.js
|
|
476
|
-
function
|
|
486
|
+
function Ve(e) {
|
|
477
487
|
return function(t) {
|
|
478
488
|
t = d(t);
|
|
479
|
-
var n =
|
|
489
|
+
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
490
|
return r[e]() + i;
|
|
481
491
|
};
|
|
482
492
|
}
|
|
483
493
|
//#endregion
|
|
484
494
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/upperFirst.js
|
|
485
|
-
var
|
|
495
|
+
var He = Ve("toUpperCase");
|
|
486
496
|
//#endregion
|
|
487
497
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/capitalize.js
|
|
488
|
-
function
|
|
489
|
-
return
|
|
498
|
+
function Ue(e) {
|
|
499
|
+
return He(d(e).toLowerCase());
|
|
490
500
|
}
|
|
491
501
|
//#endregion
|
|
492
502
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js
|
|
493
|
-
function
|
|
503
|
+
function We(e, t, n, r) {
|
|
494
504
|
var i = -1, a = e == null ? 0 : e.length;
|
|
495
505
|
for (r && a && (n = e[++i]); ++i < a;) n = t(n, e[i], i, e);
|
|
496
506
|
return n;
|
|
497
507
|
}
|
|
498
508
|
//#endregion
|
|
499
509
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js
|
|
500
|
-
function
|
|
510
|
+
function Ge(e) {
|
|
501
511
|
return function(t) {
|
|
502
512
|
return e?.[t];
|
|
503
513
|
};
|
|
504
514
|
}
|
|
505
515
|
//#endregion
|
|
506
516
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_deburrLetter.js
|
|
507
|
-
var
|
|
517
|
+
var Ke = Ge({
|
|
508
518
|
À: "A",
|
|
509
519
|
Á: "A",
|
|
510
520
|
Â: "A",
|
|
@@ -695,77 +705,77 @@ var Je = qe({
|
|
|
695
705
|
œ: "oe",
|
|
696
706
|
ʼn: "'n",
|
|
697
707
|
ſ: "s"
|
|
698
|
-
}),
|
|
699
|
-
function
|
|
700
|
-
return e = d(e), e && e.replace(
|
|
708
|
+
}), qe = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Je = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g");
|
|
709
|
+
function Ye(e) {
|
|
710
|
+
return e = d(e), e && e.replace(qe, Ke).replace(Je, "");
|
|
701
711
|
}
|
|
702
712
|
//#endregion
|
|
703
713
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_asciiWords.js
|
|
704
|
-
var
|
|
705
|
-
function
|
|
706
|
-
return e.match(
|
|
714
|
+
var Xe = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
715
|
+
function Ze(e) {
|
|
716
|
+
return e.match(Xe) || [];
|
|
707
717
|
}
|
|
708
718
|
//#endregion
|
|
709
719
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hasUnicodeWord.js
|
|
710
|
-
var
|
|
711
|
-
function
|
|
712
|
-
return
|
|
720
|
+
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 ]/;
|
|
721
|
+
function $e(e) {
|
|
722
|
+
return Qe.test(e);
|
|
713
723
|
}
|
|
714
724
|
//#endregion
|
|
715
725
|
//#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
|
-
|
|
726
|
+
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 + "(?:" + [
|
|
727
|
+
mt,
|
|
728
|
+
ht,
|
|
729
|
+
gt
|
|
730
|
+
].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 = "(?:" + [
|
|
731
|
+
ut,
|
|
732
|
+
ht,
|
|
733
|
+
gt
|
|
734
|
+
].join("|") + ")" + Dt, kt = RegExp([
|
|
735
|
+
F + "?" + dt + "+" + bt + "(?=" + [
|
|
736
|
+
st,
|
|
737
|
+
F,
|
|
728
738
|
"$"
|
|
729
739
|
].join("|") + ")",
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
740
|
+
yt + "+" + xt + "(?=" + [
|
|
741
|
+
st,
|
|
742
|
+
F + vt,
|
|
733
743
|
"$"
|
|
734
744
|
].join("|") + ")",
|
|
735
|
-
|
|
736
|
-
|
|
745
|
+
F + "?" + vt + "+" + bt,
|
|
746
|
+
F + "+" + xt,
|
|
747
|
+
Et,
|
|
737
748
|
Tt,
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
Dt
|
|
749
|
+
lt,
|
|
750
|
+
Ot
|
|
741
751
|
].join("|"), "g");
|
|
742
|
-
function
|
|
743
|
-
return e.match(
|
|
752
|
+
function At(e) {
|
|
753
|
+
return e.match(kt) || [];
|
|
744
754
|
}
|
|
745
755
|
//#endregion
|
|
746
756
|
//#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 ?
|
|
757
|
+
function jt(e, t, n) {
|
|
758
|
+
return e = d(e), t = n ? void 0 : t, t === void 0 ? $e(e) ? At(e) : Ze(e) : e.match(t) || [];
|
|
749
759
|
}
|
|
750
760
|
//#endregion
|
|
751
761
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createCompounder.js
|
|
752
|
-
var
|
|
753
|
-
function
|
|
762
|
+
var Mt = RegExp("['’]", "g");
|
|
763
|
+
function Nt(e) {
|
|
754
764
|
return function(t) {
|
|
755
|
-
return
|
|
765
|
+
return We(jt(Ye(t).replace(Mt, "")), e, "");
|
|
756
766
|
};
|
|
757
767
|
}
|
|
758
768
|
//#endregion
|
|
759
769
|
//#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,
|
|
770
|
+
var Pt = Nt(function(e, t, n) {
|
|
771
|
+
return t = t.toLowerCase(), e + (n ? Ue(t) : t);
|
|
772
|
+
}), I = u(s, "Set"), Ft = "__lodash_hash_undefined__";
|
|
773
|
+
function It(e) {
|
|
774
|
+
return this.__data__.set(e, Ft), this;
|
|
765
775
|
}
|
|
766
776
|
//#endregion
|
|
767
777
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js
|
|
768
|
-
function
|
|
778
|
+
function Lt(e) {
|
|
769
779
|
return this.__data__.has(e);
|
|
770
780
|
}
|
|
771
781
|
//#endregion
|
|
@@ -774,7 +784,7 @@ function L(e) {
|
|
|
774
784
|
var t = -1, n = e == null ? 0 : e.length;
|
|
775
785
|
for (this.__data__ = new c(); ++t < n;) this.add(e[t]);
|
|
776
786
|
}
|
|
777
|
-
L.prototype.add = L.prototype.push =
|
|
787
|
+
L.prototype.add = L.prototype.push = It, L.prototype.has = Lt;
|
|
778
788
|
//#endregion
|
|
779
789
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js
|
|
780
790
|
function R(e, t) {
|
|
@@ -782,7 +792,7 @@ function R(e, t) {
|
|
|
782
792
|
}
|
|
783
793
|
//#endregion
|
|
784
794
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js
|
|
785
|
-
function
|
|
795
|
+
function Rt(e) {
|
|
786
796
|
var t = -1, n = Array(e.size);
|
|
787
797
|
return e.forEach(function(e) {
|
|
788
798
|
n[++t] = e;
|
|
@@ -790,22 +800,22 @@ function z(e) {
|
|
|
790
800
|
}
|
|
791
801
|
//#endregion
|
|
792
802
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js
|
|
793
|
-
function
|
|
794
|
-
return a(e) &&
|
|
803
|
+
function zt(e) {
|
|
804
|
+
return a(e) && we(e);
|
|
795
805
|
}
|
|
796
806
|
//#endregion
|
|
797
807
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js
|
|
798
|
-
function
|
|
808
|
+
function Bt(e, t, n) {
|
|
799
809
|
for (var r = -1, i = e == null ? 0 : e.length; ++r < i;) if (n(t, e[r])) return !0;
|
|
800
810
|
return !1;
|
|
801
811
|
}
|
|
802
812
|
//#endregion
|
|
803
813
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIntersection.js
|
|
804
|
-
var
|
|
805
|
-
function
|
|
806
|
-
for (var r = n ?
|
|
814
|
+
var Vt = Math.min;
|
|
815
|
+
function Ht(e, t, n) {
|
|
816
|
+
for (var r = n ? Bt : ve, i = e[0].length, a = e.length, o = a, s = Array(a), c = Infinity, u = []; o--;) {
|
|
807
817
|
var d = e[o];
|
|
808
|
-
o && t && (d = l(d,
|
|
818
|
+
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
819
|
}
|
|
810
820
|
d = e[0];
|
|
811
821
|
var f = -1, p = s[0];
|
|
@@ -823,23 +833,23 @@ function Bt(e, t, n) {
|
|
|
823
833
|
}
|
|
824
834
|
//#endregion
|
|
825
835
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castArrayLikeObject.js
|
|
826
|
-
function
|
|
827
|
-
return
|
|
836
|
+
function Ut(e) {
|
|
837
|
+
return zt(e) ? e : [];
|
|
828
838
|
}
|
|
829
839
|
//#endregion
|
|
830
840
|
//#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
|
-
}),
|
|
841
|
+
var Wt = xe(function(e) {
|
|
842
|
+
var t = l(e, Ut);
|
|
843
|
+
return t.length && t[0] === e[0] ? Ht(t) : [];
|
|
844
|
+
}), Gt = I && 1 / Rt(new I([, -0]))[1] == 1 / 0 ? function(e) {
|
|
835
845
|
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
|
|
846
|
+
} : oe, Kt = 200;
|
|
847
|
+
function qt(e, t, n) {
|
|
848
|
+
var r = -1, i = ve, a = e.length, o = !0, s = [], c = s;
|
|
849
|
+
if (n) o = !1, i = Bt;
|
|
850
|
+
else if (a >= Kt) {
|
|
851
|
+
var l = t ? null : Gt(e);
|
|
852
|
+
if (l) return Rt(l);
|
|
843
853
|
o = !1, i = R, c = new L();
|
|
844
854
|
} else c = t ? [] : s;
|
|
845
855
|
outer: for (; ++r < a;) {
|
|
@@ -853,38 +863,38 @@ function Gt(e, t, n) {
|
|
|
853
863
|
}
|
|
854
864
|
//#endregion
|
|
855
865
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/uniq.js
|
|
856
|
-
function
|
|
857
|
-
return e && e.length ?
|
|
866
|
+
function Jt(e) {
|
|
867
|
+
return e && e.length ? qt(e) : [];
|
|
858
868
|
}
|
|
859
869
|
//#endregion
|
|
860
870
|
//#region src/helpers/resource/functions.ts
|
|
861
|
-
var
|
|
871
|
+
var Yt = { complex: [
|
|
862
872
|
"tar.bz2",
|
|
863
873
|
"tar.gz",
|
|
864
874
|
"tar.xz"
|
|
865
|
-
] },
|
|
875
|
+
] }, 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
876
|
let t = e.extension || "", n = e.name || "";
|
|
867
877
|
if (!t.length) return n;
|
|
868
878
|
let r = n.lastIndexOf(`.${t}`);
|
|
869
879
|
return n.substring(0, r);
|
|
870
|
-
},
|
|
880
|
+
}, H = (e) => {
|
|
871
881
|
let t = e.name.split(".");
|
|
872
882
|
if (t.length > 2) for (let e = 0; e < t.length; e++) {
|
|
873
883
|
let n = t.slice(e, t.length).join(".");
|
|
874
|
-
if (
|
|
884
|
+
if (Yt.complex.includes(n)) return n;
|
|
875
885
|
}
|
|
876
886
|
return t.length < 2 ? "" : t[t.length - 1];
|
|
877
|
-
},
|
|
887
|
+
}, en = (e) => (0, m.basename)((0, m.dirname)(e.path)) || null, tn = (e) => typeof e.isShareRoot == "function" && e.isShareRoot(), U = (e) => {
|
|
878
888
|
if (!e) return e;
|
|
879
889
|
let t = {};
|
|
880
890
|
return Object.keys(e).forEach((n) => {
|
|
881
|
-
t[
|
|
891
|
+
t[Pt(n)] = e[n];
|
|
882
892
|
}), t;
|
|
883
893
|
};
|
|
884
|
-
function
|
|
894
|
+
function nn(e, t = []) {
|
|
885
895
|
let n = e.props[b.Name]?.toString() || (0, m.basename)(e.filename), r = e.props[b.FileId], i = e.type === "directory", a;
|
|
886
896
|
a = e.filename.startsWith("/files") || e.filename.startsWith("/space") ? e.filename.split("/").slice(3).join("/") : e.filename, a.startsWith("/") || (a = `/${a}`);
|
|
887
|
-
let o =
|
|
897
|
+
let o = H({
|
|
888
898
|
...e,
|
|
889
899
|
id: r,
|
|
890
900
|
name: n,
|
|
@@ -901,7 +911,7 @@ function en(e, t = []) {
|
|
|
901
911
|
let p = {
|
|
902
912
|
id: r,
|
|
903
913
|
fileId: r,
|
|
904
|
-
storageId:
|
|
914
|
+
storageId: B(r),
|
|
905
915
|
parentFolderId: e.props[b.FileParent],
|
|
906
916
|
mimeType: e.props[b.MimeType],
|
|
907
917
|
name: n,
|
|
@@ -930,10 +940,11 @@ function en(e, t = []) {
|
|
|
930
940
|
displayName: e.props[b.OwnerDisplayName]
|
|
931
941
|
},
|
|
932
942
|
tags: (e.props[b.Tags] || "").toString().split(",").filter(Boolean),
|
|
933
|
-
audio:
|
|
934
|
-
location:
|
|
935
|
-
image:
|
|
936
|
-
photo:
|
|
943
|
+
audio: U(e.props[b.Audio]),
|
|
944
|
+
location: U(e.props[b.Location]),
|
|
945
|
+
image: U(e.props[b.Image]),
|
|
946
|
+
photo: U(e.props[b.Photo]),
|
|
947
|
+
motionPhoto: U(e.props[b.MotionPhoto]),
|
|
937
948
|
extraProps: f,
|
|
938
949
|
hasPreview: () => e.props[b.HasPreview] === 1,
|
|
939
950
|
canUpload: function() {
|
|
@@ -969,14 +980,14 @@ function en(e, t = []) {
|
|
|
969
980
|
isShareRoot() {
|
|
970
981
|
return e.props[b.ShareRoot] ? e.filename.split("/").length === 3 : !1;
|
|
971
982
|
},
|
|
972
|
-
getDomSelector: () =>
|
|
983
|
+
getDomSelector: () => z(r)
|
|
973
984
|
};
|
|
974
985
|
return Object.defineProperty(p, "nodeId", { get() {
|
|
975
|
-
return
|
|
986
|
+
return V(this.id);
|
|
976
987
|
} }), p;
|
|
977
988
|
}
|
|
978
|
-
function
|
|
979
|
-
let t = e.type === "directory", n = e.props[b.TrashbinOriginalFilename]?.toString(), r =
|
|
989
|
+
function rn(e) {
|
|
990
|
+
let t = e.type === "directory", n = e.props[b.TrashbinOriginalFilename]?.toString(), r = H({
|
|
980
991
|
name: n,
|
|
981
992
|
type: e.type
|
|
982
993
|
}), a = m.default.basename(e.filename);
|
|
@@ -1004,14 +1015,14 @@ function tn(e) {
|
|
|
1004
1015
|
hasPreview: () => !1,
|
|
1005
1016
|
isShareRoot: () => !1,
|
|
1006
1017
|
canListVersions: () => !1,
|
|
1007
|
-
getDomSelector: () =>
|
|
1018
|
+
getDomSelector: () => z(a)
|
|
1008
1019
|
};
|
|
1009
1020
|
}
|
|
1010
1021
|
//#endregion
|
|
1011
1022
|
//#region src/helpers/share/types.ts
|
|
1012
|
-
var
|
|
1023
|
+
var W = /* @__PURE__ */ function(e) {
|
|
1013
1024
|
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
|
-
}({}),
|
|
1025
|
+
}({}), G = (e) => e, K = class {
|
|
1015
1026
|
_key;
|
|
1016
1027
|
_value;
|
|
1017
1028
|
_label;
|
|
@@ -1031,13 +1042,13 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1031
1042
|
get icon() {
|
|
1032
1043
|
return this._icon;
|
|
1033
1044
|
}
|
|
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
|
|
1045
|
+
}, q = class {
|
|
1046
|
+
static user = new K("user", 0, G("User"), "user");
|
|
1047
|
+
static group = new K("group", 1, G("Group"), "group");
|
|
1048
|
+
static link = new K("link", 3, G("Link"), "link");
|
|
1049
|
+
static guest = new K("guest", 4, G("Guest"), "global");
|
|
1050
|
+
static remote = new K("remote", 6, G("External"), "earth");
|
|
1051
|
+
static contact = new K("contact", 100, G("Contact"), "global");
|
|
1041
1052
|
static individuals = [
|
|
1042
1053
|
this.user,
|
|
1043
1054
|
this.guest,
|
|
@@ -1084,18 +1095,18 @@ var G = /* @__PURE__ */ function(e) {
|
|
|
1084
1095
|
return e.map((e) => e.value);
|
|
1085
1096
|
}
|
|
1086
1097
|
static containsAnyValue(e, t) {
|
|
1087
|
-
return
|
|
1098
|
+
return Wt(this.getValues(e), t).length > 0;
|
|
1088
1099
|
}
|
|
1089
|
-
},
|
|
1100
|
+
}, 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
1101
|
//#endregion
|
|
1091
1102
|
//#region src/helpers/space/functions.ts
|
|
1092
|
-
function
|
|
1103
|
+
function Y(e, t) {
|
|
1093
1104
|
return i("spaces", e, t, { leadingSlash: !0 });
|
|
1094
1105
|
}
|
|
1095
|
-
function
|
|
1106
|
+
function X(e, t = "") {
|
|
1096
1107
|
return i("spaces", "trash-bin", e, t, { leadingSlash: !0 });
|
|
1097
1108
|
}
|
|
1098
|
-
function
|
|
1109
|
+
function fn(e, t) {
|
|
1099
1110
|
let n = e[{
|
|
1100
1111
|
image: "spaceImageData",
|
|
1101
1112
|
readme: "spaceReadmeData"
|
|
@@ -1104,16 +1115,16 @@ function dn(e, t) {
|
|
|
1104
1115
|
let r = decodeURI(n.webDavUrl).split("/"), i = r.find((t) => t.startsWith(e.id));
|
|
1105
1116
|
return i ? r.slice(r.indexOf(i) + 1).join("/") : "";
|
|
1106
1117
|
}
|
|
1107
|
-
function
|
|
1108
|
-
return e.permissions.includes(
|
|
1118
|
+
function pn(e) {
|
|
1119
|
+
return e.permissions.includes(W.deletePermissions);
|
|
1109
1120
|
}
|
|
1110
|
-
var
|
|
1121
|
+
var mn = (e, t) => e.root.permissions?.filter((e) => {
|
|
1111
1122
|
let n = [];
|
|
1112
1123
|
e["@libre.graph.permissions.actions"] && (n = e["@libre.graph.permissions.actions"]);
|
|
1113
1124
|
let r = t[e.roles?.[0]];
|
|
1114
|
-
return r && !n.length && (n = r.rolePermissions.find(({ condition: e }) => e === "exists @Resource.Root")?.allowedResourceActions || []), n.includes(
|
|
1125
|
+
return r && !n.length && (n = r.rolePermissions.find(({ condition: e }) => e === "exists @Resource.Root")?.allowedResourceActions || []), n.includes(W.deletePermissions);
|
|
1115
1126
|
});
|
|
1116
|
-
function
|
|
1127
|
+
function hn(e) {
|
|
1117
1128
|
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
1129
|
return c === "ocm" ? (l = `ocm/${e.id}`, u = p(e.id)) : (l = `public/${e.id}`, u = f(e.id)), Object.assign(Z({
|
|
1119
1130
|
...e,
|
|
@@ -1131,7 +1142,7 @@ function mn(e) {
|
|
|
1131
1142
|
publicLinkType: c
|
|
1132
1143
|
});
|
|
1133
1144
|
}
|
|
1134
|
-
function
|
|
1145
|
+
function gn({ driveAliasPrefix: e, id: t, shareName: n, serverUrl: r, graphPermissions: i }) {
|
|
1135
1146
|
let a = Z({
|
|
1136
1147
|
id: t,
|
|
1137
1148
|
driveAlias: `${e}/${n}`,
|
|
@@ -1146,7 +1157,7 @@ function hn({ driveAliasPrefix: e, id: t, shareName: n, serverUrl: r, graphPermi
|
|
|
1146
1157
|
function Z(e) {
|
|
1147
1158
|
let t, n;
|
|
1148
1159
|
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 ||
|
|
1160
|
+
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
1161
|
id: e.id,
|
|
1151
1162
|
fileId: e.id,
|
|
1152
1163
|
storageId: e.id,
|
|
@@ -1177,42 +1188,43 @@ function Z(e) {
|
|
|
1177
1188
|
spaceImageData: t,
|
|
1178
1189
|
spaceReadmeData: n,
|
|
1179
1190
|
hasTrashedItems: e["@libre.graph.hasTrashedItems"] || !1,
|
|
1191
|
+
contentType: e["@libre.graph.contentType"],
|
|
1180
1192
|
graphPermissions: void 0,
|
|
1181
1193
|
canUpload: function({ user: e } = {}) {
|
|
1182
|
-
return
|
|
1194
|
+
return J(this) && this.isOwner(e) ? !0 : this.graphPermissions?.includes(W.createUpload);
|
|
1183
1195
|
},
|
|
1184
1196
|
canDownload: function() {
|
|
1185
1197
|
return !0;
|
|
1186
1198
|
},
|
|
1187
1199
|
canBeDeleted: function({ ability: e } = {}) {
|
|
1188
|
-
return this.disabled ? e?.can("delete-all", "Drive") ? !0 : this.graphPermissions?.includes(
|
|
1200
|
+
return this.disabled ? e?.can("delete-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions) : !1;
|
|
1189
1201
|
},
|
|
1190
1202
|
canRename: function({ ability: e } = {}) {
|
|
1191
|
-
return e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(
|
|
1203
|
+
return e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions);
|
|
1192
1204
|
},
|
|
1193
1205
|
canEditDescription: function({ ability: e } = {}) {
|
|
1194
|
-
return e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(
|
|
1206
|
+
return this.isInVault ? !1 : e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions);
|
|
1195
1207
|
},
|
|
1196
1208
|
canRestore: function({ ability: e } = {}) {
|
|
1197
|
-
return this.disabled ? e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(
|
|
1209
|
+
return this.disabled ? e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions) : !1;
|
|
1198
1210
|
},
|
|
1199
1211
|
canDisable: function({ ability: e } = {}) {
|
|
1200
|
-
return this.disabled ? !1 : e?.can("delete-all", "Drive") ? !0 : this.graphPermissions?.includes(
|
|
1212
|
+
return this.disabled ? !1 : e?.can("delete-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions);
|
|
1201
1213
|
},
|
|
1202
1214
|
canShare: function() {
|
|
1203
|
-
return this.graphPermissions?.includes(
|
|
1215
|
+
return this.graphPermissions?.includes(W.createPermissions);
|
|
1204
1216
|
},
|
|
1205
1217
|
canEditImage: function() {
|
|
1206
|
-
return
|
|
1218
|
+
return this.disabled || this.isInVault ? !1 : this.graphPermissions?.includes(W.deletePermissions);
|
|
1207
1219
|
},
|
|
1208
1220
|
canEditReadme: function() {
|
|
1209
|
-
return
|
|
1221
|
+
return this.disabled || this.isInVault ? !1 : this.graphPermissions?.includes(W.deletePermissions);
|
|
1210
1222
|
},
|
|
1211
1223
|
canRestoreFromTrashbin: function() {
|
|
1212
|
-
return this.graphPermissions?.includes(
|
|
1224
|
+
return this.graphPermissions?.includes(W.updateDeleted);
|
|
1213
1225
|
},
|
|
1214
1226
|
canDeleteFromTrashBin: function({ user: e } = {}) {
|
|
1215
|
-
return
|
|
1227
|
+
return J(this) && this.isOwner(e) ? !0 : this.graphPermissions?.includes(W.deletePermissions);
|
|
1216
1228
|
},
|
|
1217
1229
|
canListVersions: function() {
|
|
1218
1230
|
return !1;
|
|
@@ -1236,7 +1248,7 @@ function Z(e) {
|
|
|
1236
1248
|
"public"
|
|
1237
1249
|
].includes(e.driveType);
|
|
1238
1250
|
},
|
|
1239
|
-
getDomSelector: () =>
|
|
1251
|
+
getDomSelector: () => z(e.id),
|
|
1240
1252
|
getDriveAliasAndItem({ path: e }) {
|
|
1241
1253
|
return i(this.driveAlias, e, { leadingSlash: !1 });
|
|
1242
1254
|
},
|
|
@@ -1251,15 +1263,15 @@ function Z(e) {
|
|
|
1251
1263
|
}
|
|
1252
1264
|
};
|
|
1253
1265
|
return Object.defineProperty(l, "nodeId", { get() {
|
|
1254
|
-
return
|
|
1266
|
+
return V(this.id);
|
|
1255
1267
|
} }), l;
|
|
1256
1268
|
}
|
|
1257
|
-
function
|
|
1269
|
+
function _n(e) {
|
|
1258
1270
|
return {
|
|
1259
1271
|
id: e.spaceImageData.id,
|
|
1260
1272
|
name: e.spaceImageData.name,
|
|
1261
1273
|
etag: e.spaceImageData.eTag,
|
|
1262
|
-
extension:
|
|
1274
|
+
extension: H({ name: e.spaceImageData.name }),
|
|
1263
1275
|
mimeType: e.spaceImageData.file.mimeType,
|
|
1264
1276
|
type: "file",
|
|
1265
1277
|
webDavPath: i(e.webDavPath, ".space", e.spaceImageData.name),
|
|
@@ -1269,10 +1281,10 @@ function gn(e) {
|
|
|
1269
1281
|
}
|
|
1270
1282
|
//#endregion
|
|
1271
1283
|
//#region src/helpers/share/functions.ts
|
|
1272
|
-
var Q = (e) => Object.hasOwn(e, "sharedWith"),
|
|
1284
|
+
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
1285
|
let r = t[n];
|
|
1274
1286
|
r && !e.some(({ id: e }) => e === r.id) && e.push(r);
|
|
1275
|
-
}), e), []),
|
|
1287
|
+
}), e), []), Cn = ({ driveItem: e, shareRoles: t }) => {
|
|
1276
1288
|
if (!t.length) {
|
|
1277
1289
|
let t = e.remoteItem?.permissions.reduce((e, t) => {
|
|
1278
1290
|
let n = t["@libre.graph.permissions.actions"];
|
|
@@ -1285,8 +1297,8 @@ var Q = (e) => Object.hasOwn(e, "sharedWith"), _n = (e) => Q(e) && e.outgoing, v
|
|
|
1285
1297
|
}), e), []);
|
|
1286
1298
|
return [...new Set(n)];
|
|
1287
1299
|
};
|
|
1288
|
-
function
|
|
1289
|
-
let r = e.name || e.remoteItem.name, a =
|
|
1300
|
+
function wn({ driveItem: e, graphRoles: t, serverUrl: n }) {
|
|
1301
|
+
let r = e.name || e.remoteItem.name, a = B(e.remoteItem.id), o = e.remoteItem.permissions.map((e) => {
|
|
1290
1302
|
let { grantedToV2: t } = e;
|
|
1291
1303
|
return {
|
|
1292
1304
|
...t.group || t.user,
|
|
@@ -1295,12 +1307,12 @@ function Cn({ driveItem: e, graphRoles: t, serverUrl: n }) {
|
|
|
1295
1307
|
}), s = e.remoteItem.permissions.reduce((e, t) => {
|
|
1296
1308
|
let n = t.invitation.invitedBy.user;
|
|
1297
1309
|
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 =
|
|
1310
|
+
}, []), c = Jt(e.remoteItem.permissions.map($));
|
|
1311
|
+
s.some((e) => e["@libre.graph.userType"] === "Federated") && (c = [q.remote.value]);
|
|
1312
|
+
let l = Sn({
|
|
1301
1313
|
driveItem: e,
|
|
1302
1314
|
graphRoles: t
|
|
1303
|
-
}), u =
|
|
1315
|
+
}), u = Cn({
|
|
1304
1316
|
driveItem: e,
|
|
1305
1317
|
shareRoles: l
|
|
1306
1318
|
}), d = {
|
|
@@ -1315,7 +1327,7 @@ function Cn({ driveItem: e, graphRoles: t, serverUrl: n }) {
|
|
|
1315
1327
|
parentFolderId: e.parentReference?.id,
|
|
1316
1328
|
sdate: e.remoteItem.permissions[0].createdDateTime,
|
|
1317
1329
|
tags: [],
|
|
1318
|
-
webDavPath:
|
|
1330
|
+
webDavPath: Y(e.remoteItem.id, "/"),
|
|
1319
1331
|
sharedBy: s,
|
|
1320
1332
|
owner: e.remoteItem.createdBy?.user,
|
|
1321
1333
|
sharedWith: o,
|
|
@@ -1332,22 +1344,22 @@ function Cn({ driveItem: e, graphRoles: t, serverUrl: n }) {
|
|
|
1332
1344
|
privateLink: i(n, "f", e.remoteItem.id),
|
|
1333
1345
|
hasPreview: () => !!e.thumbnails,
|
|
1334
1346
|
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(
|
|
1347
|
+
canDownload: () => u.includes(W.readContent),
|
|
1348
|
+
canUpload: () => u.includes(W.createUpload),
|
|
1349
|
+
canCreate: () => u.includes(W.createChildren),
|
|
1350
|
+
canBeDeleted: () => u.includes(W.deleteStandard),
|
|
1351
|
+
canEditTags: () => u.includes(W.createUpload),
|
|
1352
|
+
canListVersions: () => !e.folder && u.includes(W.readVersions),
|
|
1341
1353
|
isMounted: () => !1,
|
|
1342
1354
|
isReceivedShare: () => !0,
|
|
1343
1355
|
canShare: () => !1,
|
|
1344
1356
|
isShareRoot: () => !0,
|
|
1345
|
-
getDomSelector: () =>
|
|
1357
|
+
getDomSelector: () => z(e.id)
|
|
1346
1358
|
};
|
|
1347
|
-
return d.extension =
|
|
1359
|
+
return d.extension = H(d), d;
|
|
1348
1360
|
}
|
|
1349
|
-
function
|
|
1350
|
-
let r =
|
|
1361
|
+
function Tn({ driveItem: e, user: t, serverUrl: n }) {
|
|
1362
|
+
let r = B(e.id), a = i(e.parentReference.path, e.name), o = {
|
|
1351
1363
|
id: e.id,
|
|
1352
1364
|
driveId: e.parentReference?.driveId,
|
|
1353
1365
|
path: a,
|
|
@@ -1358,7 +1370,7 @@ function wn({ driveItem: e, user: t, serverUrl: n }) {
|
|
|
1358
1370
|
parentFolderId: e.parentReference?.id,
|
|
1359
1371
|
sdate: e.permissions[0].createdDateTime,
|
|
1360
1372
|
tags: [],
|
|
1361
|
-
webDavPath:
|
|
1373
|
+
webDavPath: Y(r, a),
|
|
1362
1374
|
sharedBy: [{
|
|
1363
1375
|
id: t.id,
|
|
1364
1376
|
displayName: t.displayName
|
|
@@ -1371,7 +1383,7 @@ function wn({ driveItem: e, user: t, serverUrl: n }) {
|
|
|
1371
1383
|
if (e.link) return {
|
|
1372
1384
|
id: e.id,
|
|
1373
1385
|
displayName: e.link["@libre.graph.displayName"],
|
|
1374
|
-
shareType:
|
|
1386
|
+
shareType: q.link.value
|
|
1375
1387
|
};
|
|
1376
1388
|
let t = $(e);
|
|
1377
1389
|
return {
|
|
@@ -1397,11 +1409,11 @@ function wn({ driveItem: e, user: t, serverUrl: n }) {
|
|
|
1397
1409
|
isShareRoot: () => !1,
|
|
1398
1410
|
isReceivedShare: () => !0,
|
|
1399
1411
|
canShare: () => !0,
|
|
1400
|
-
getDomSelector: () =>
|
|
1412
|
+
getDomSelector: () => z(e.id)
|
|
1401
1413
|
};
|
|
1402
|
-
return o.extension =
|
|
1414
|
+
return o.extension = H(o), o;
|
|
1403
1415
|
}
|
|
1404
|
-
function
|
|
1416
|
+
function En({ graphPermission: e, graphRoles: t, resourceId: n, indirect: r = !1 }) {
|
|
1405
1417
|
let i = t[e.roles?.[0]], a = e.invitation?.invitedBy?.user;
|
|
1406
1418
|
return {
|
|
1407
1419
|
id: e.id,
|
|
@@ -1419,13 +1431,13 @@ function Tn({ graphPermission: e, graphRoles: t, resourceId: n, indirect: r = !1
|
|
|
1419
1431
|
expirationDateTime: e.expirationDateTime
|
|
1420
1432
|
};
|
|
1421
1433
|
}
|
|
1422
|
-
function
|
|
1434
|
+
function Dn({ graphPermission: e, resourceId: t, indirect: n = !1 }) {
|
|
1423
1435
|
let r = e.invitation?.invitedBy?.user;
|
|
1424
1436
|
return {
|
|
1425
1437
|
id: e.id,
|
|
1426
1438
|
resourceId: t,
|
|
1427
1439
|
indirect: n,
|
|
1428
|
-
shareType:
|
|
1440
|
+
shareType: q.link.value,
|
|
1429
1441
|
sharedBy: {
|
|
1430
1442
|
id: r?.id,
|
|
1431
1443
|
displayName: r?.displayName
|
|
@@ -1441,7 +1453,7 @@ function En({ graphPermission: e, resourceId: t, indirect: n = !1 }) {
|
|
|
1441
1453
|
};
|
|
1442
1454
|
}
|
|
1443
1455
|
function $({ link: e, grantedToV2: t }) {
|
|
1444
|
-
return e ?
|
|
1456
|
+
return e ? q.link.value : t?.group ? q.group.value : t?.user?.["@libre.graph.userType"] === "Federated" ? q.remote.value : q.user.value;
|
|
1445
1457
|
}
|
|
1446
1458
|
//#endregion
|
|
1447
|
-
export {
|
|
1459
|
+
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 };
|