@epam/ai-dial-chat-hooks 1.1.0-dev.337 → 1.1.0-dev.340
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/index.js
CHANGED
|
@@ -16289,89 +16289,121 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16289
16289
|
} }
|
|
16290
16290
|
};
|
|
16291
16291
|
});
|
|
16292
|
-
}, Zp = 300 * 1e3, Qp = 2e4, $p = (
|
|
16293
|
-
|
|
16292
|
+
}, Zp = 300 * 1e3, Qp = 2e4, $p = (e, t) => ({
|
|
16293
|
+
...e,
|
|
16294
|
+
...t,
|
|
16295
|
+
...(e.custom_content || t.custom_content) && { custom_content: {
|
|
16296
|
+
...e.custom_content,
|
|
16297
|
+
...t.custom_content
|
|
16298
|
+
} }
|
|
16299
|
+
}), em = (e, t) => {
|
|
16300
|
+
if (t.messageIndex > e.messages.length) return e;
|
|
16301
|
+
let n = [...e.messages];
|
|
16302
|
+
return t.messageIndex === n.length ? n.push(t.message) : n[t.messageIndex] = $p(n[t.messageIndex], t.message), {
|
|
16303
|
+
...e,
|
|
16304
|
+
messages: n
|
|
16305
|
+
};
|
|
16306
|
+
}, tm = ({ conversationId: e, state: { setConversation: t, conversationRef: n }, transport: r, generation: { startGeneration: i, completeGeneration: a }, channel: o, overlay: s, onStopError: c }) => {
|
|
16307
|
+
let [l, u] = L(() => /* @__PURE__ */ new Set()), [d, f] = L(null), p = I(null), m = I(null), h = I(/* @__PURE__ */ new Set()), g = I(/* @__PURE__ */ new Map()), _ = I(/* @__PURE__ */ new Set()), v = I(e);
|
|
16294
16308
|
N(() => {
|
|
16295
|
-
|
|
16309
|
+
v.current = e;
|
|
16296
16310
|
}, [e]);
|
|
16297
|
-
let
|
|
16311
|
+
let y = M((e) => wp(v.current ?? "") === e, []), b = M((e) => {
|
|
16298
16312
|
u((t) => {
|
|
16299
16313
|
if (t.has(e)) return t;
|
|
16300
16314
|
let n = new Set(t);
|
|
16301
16315
|
return n.add(e), n;
|
|
16302
16316
|
});
|
|
16303
|
-
}, []),
|
|
16317
|
+
}, []), x = M((e) => {
|
|
16304
16318
|
u((t) => {
|
|
16305
16319
|
if (!t.has(e)) return t;
|
|
16306
16320
|
let n = new Set(t);
|
|
16307
16321
|
return n.delete(e), n;
|
|
16308
16322
|
});
|
|
16309
|
-
}, []),
|
|
16310
|
-
let
|
|
16311
|
-
p.current =
|
|
16312
|
-
let
|
|
16313
|
-
|
|
16314
|
-
let
|
|
16315
|
-
|
|
16316
|
-
|
|
16317
|
-
|
|
16323
|
+
}, []), S = M((e, c, l, u, d, h, v = Ae.Append) => {
|
|
16324
|
+
let S = h ?? k(), C = wp(e);
|
|
16325
|
+
p.current = S, m.current = C, f(C);
|
|
16326
|
+
let w;
|
|
16327
|
+
v === Ae.Regenerate ? w = l : v === Ae.Edit && (w = l - 1);
|
|
16328
|
+
let T = i(C, S), E = n.current?.messages[l];
|
|
16329
|
+
E ? g.current.set(C, {
|
|
16330
|
+
generationId: S,
|
|
16331
|
+
messageIndex: l,
|
|
16332
|
+
message: E
|
|
16333
|
+
}) : g.current.delete(C), b(C), s?.notifyGenerationStart?.(), o?.ensureConnected();
|
|
16334
|
+
let D = {
|
|
16335
|
+
signal: T.signal,
|
|
16318
16336
|
onChunk: (e) => {
|
|
16319
|
-
p.current
|
|
16337
|
+
if (p.current !== S) return;
|
|
16338
|
+
let r = g.current.get(C);
|
|
16339
|
+
if (r?.generationId === S) {
|
|
16340
|
+
let t = Xp([r.message], 0, e);
|
|
16341
|
+
t && (r.message = t[0]);
|
|
16342
|
+
}
|
|
16343
|
+
y(C) && t((t) => {
|
|
16320
16344
|
if (!t) return t;
|
|
16321
|
-
let r =
|
|
16322
|
-
if (
|
|
16323
|
-
|
|
16324
|
-
|
|
16325
|
-
|
|
16326
|
-
|
|
16345
|
+
let r = g.current.get(C), i;
|
|
16346
|
+
if (r?.generationId === S) i = em(t, r);
|
|
16347
|
+
else {
|
|
16348
|
+
let n = Xp(t.messages, l, e);
|
|
16349
|
+
if (!n) return t;
|
|
16350
|
+
i = {
|
|
16351
|
+
...t,
|
|
16352
|
+
messages: n
|
|
16353
|
+
};
|
|
16354
|
+
}
|
|
16327
16355
|
return n.current = i, i;
|
|
16328
16356
|
});
|
|
16329
16357
|
},
|
|
16330
16358
|
onComplete: async () => {
|
|
16331
|
-
if (
|
|
16359
|
+
if (g.current.get(C)?.generationId === S && g.current.delete(C), x(C), p.current === S && (p.current = null, m.current = null, f(null)), a(C, S), _.current.has(S) ? _.current.delete(S) : s?.notifyGenerationEnd?.(), y(C)) try {
|
|
16332
16360
|
let i = await r.getConversation(H(e));
|
|
16333
|
-
if (!
|
|
16361
|
+
if (!y(C)) return;
|
|
16334
16362
|
t(i), n.current = i;
|
|
16335
16363
|
} catch {}
|
|
16336
16364
|
},
|
|
16337
16365
|
onError: (e) => {
|
|
16338
|
-
|
|
16366
|
+
let r = g.current.get(C), i = r?.generationId === S ? r : void 0;
|
|
16367
|
+
i && g.current.delete(C), x(C), p.current === S && (p.current = null, m.current = null, f(null)), y(C) && t((t) => {
|
|
16339
16368
|
if (!t) return t;
|
|
16340
|
-
let r = {
|
|
16341
|
-
...
|
|
16342
|
-
messages:
|
|
16369
|
+
let r = i?.generationId === S ? em(t, i) : t, a = {
|
|
16370
|
+
...r,
|
|
16371
|
+
messages: r.messages.map((t, n) => n === l ? {
|
|
16343
16372
|
...t,
|
|
16344
16373
|
streamErrorMessage: e.message
|
|
16345
16374
|
} : t)
|
|
16346
16375
|
};
|
|
16347
|
-
return n.current =
|
|
16376
|
+
return n.current = a, a;
|
|
16348
16377
|
});
|
|
16349
16378
|
}
|
|
16350
16379
|
};
|
|
16351
16380
|
(async () => {
|
|
16352
16381
|
try {
|
|
16353
16382
|
let e = o?.channelId ?? await o?.waitForChannel(Qp) ?? void 0;
|
|
16354
|
-
r.streamCompletion(
|
|
16383
|
+
r.streamCompletion(C, c, u, D, d, S, v, w, e);
|
|
16355
16384
|
} catch (e) {
|
|
16356
|
-
|
|
16385
|
+
D.onError(e instanceof Error ? e : Error(String(e)));
|
|
16357
16386
|
}
|
|
16358
16387
|
})();
|
|
16359
16388
|
}, [
|
|
16360
16389
|
i,
|
|
16361
16390
|
a,
|
|
16362
|
-
y,
|
|
16363
16391
|
b,
|
|
16364
|
-
|
|
16392
|
+
x,
|
|
16393
|
+
y,
|
|
16365
16394
|
o?.channelId,
|
|
16366
16395
|
o?.ensureConnected,
|
|
16367
16396
|
o?.waitForChannel,
|
|
16368
16397
|
s,
|
|
16369
16398
|
r
|
|
16370
|
-
]),
|
|
16399
|
+
]), C = M((e, t) => {
|
|
16400
|
+
let n = wp(e), r = g.current.get(n);
|
|
16401
|
+
return r ? em(t, r) : t;
|
|
16402
|
+
}, []), w = M(() => {
|
|
16371
16403
|
let t = p.current;
|
|
16372
16404
|
if (!t || !e) return;
|
|
16373
16405
|
let n = wp(e);
|
|
16374
|
-
m.current === n && (
|
|
16406
|
+
m.current === n && (_.current.add(t), s?.notifyStopGenerating?.(), r.stopCompletion({
|
|
16375
16407
|
generationId: t,
|
|
16376
16408
|
path: n
|
|
16377
16409
|
}).catch((e) => {
|
|
@@ -16383,13 +16415,13 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16383
16415
|
c,
|
|
16384
16416
|
s,
|
|
16385
16417
|
r
|
|
16386
|
-
]),
|
|
16418
|
+
]), T = M((e, i) => {
|
|
16387
16419
|
if (!Kp(i)) return;
|
|
16388
16420
|
let a = wp(e);
|
|
16389
16421
|
if (h.current.has(a)) return;
|
|
16390
|
-
h.current.add(a),
|
|
16422
|
+
h.current.add(a), b(a);
|
|
16391
16423
|
let o = new AbortController(), s = (e) => {
|
|
16392
|
-
h.current.delete(a),
|
|
16424
|
+
h.current.delete(a), x(a), e && y(a) && (t(e), n.current = e);
|
|
16393
16425
|
}, c = async () => {
|
|
16394
16426
|
try {
|
|
16395
16427
|
s(await r.getConversation(H(e)));
|
|
@@ -16439,19 +16471,20 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16439
16471
|
await c();
|
|
16440
16472
|
})();
|
|
16441
16473
|
}, [
|
|
16442
|
-
y,
|
|
16443
16474
|
b,
|
|
16444
|
-
|
|
16475
|
+
x,
|
|
16476
|
+
y,
|
|
16445
16477
|
r
|
|
16446
|
-
]),
|
|
16478
|
+
]), E = e != null && l.has(wp(e)), D = e == null ? null : wp(e);
|
|
16447
16479
|
return {
|
|
16448
|
-
startStream:
|
|
16449
|
-
handleStop:
|
|
16450
|
-
resumeIfAwaitingGeneration:
|
|
16451
|
-
|
|
16452
|
-
|
|
16480
|
+
startStream: S,
|
|
16481
|
+
handleStop: w,
|
|
16482
|
+
resumeIfAwaitingGeneration: T,
|
|
16483
|
+
restoreBufferedGeneration: C,
|
|
16484
|
+
isStreaming: E,
|
|
16485
|
+
canStopStreaming: D != null && d === D
|
|
16453
16486
|
};
|
|
16454
|
-
},
|
|
16487
|
+
}, nm = {}, rm = (e, t = nm) => F(() => {
|
|
16455
16488
|
let n = [], r = [], i = [], a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
|
|
16456
16489
|
for (let c of e) {
|
|
16457
16490
|
let e = c.custom_content?.attachments;
|
|
@@ -16491,70 +16524,70 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16491
16524
|
generated: r,
|
|
16492
16525
|
sources: i
|
|
16493
16526
|
};
|
|
16494
|
-
}, [e, t]),
|
|
16527
|
+
}, [e, t]), im = /* @__PURE__ */ function(e) {
|
|
16495
16528
|
return e.Overwrite = "overwrite", e.CreateOnly = "create-only", e;
|
|
16496
16529
|
}({}), $ = /* @__PURE__ */ function(e) {
|
|
16497
16530
|
return e.FolderLoadFailed = "folderLoadFailed", e.MetadataLoadFailed = "metadataLoadFailed", e.FolderCreateFailed = "folderCreateFailed", e.DownloadFileFailed = "downloadFileFailed", e.DownloadFilesFailed = "downloadFilesFailed", e.FilesDeleted = "filesDeleted", e.FilesDeletePartiallyFailed = "filesDeletePartiallyFailed", e.DeleteFailed = "deleteFailed", e.RenameFailed = "renameFailed", e.RenamePartiallyFailed = "renamePartiallyFailed", e.MoveFailed = "moveFailed", e.MovePartiallyFailed = "movePartiallyFailed", e.CopyFailed = "copyFailed", e.CopyPartiallyFailed = "copyPartiallyFailed", e.UnshareFailed = "unshareFailed", e.RemoveAccessFailed = "removeAccessFailed", e.UploadFailed = "uploadFailed", e.UploadCompleted = "uploadCompleted", e.UploadArchiveFailed = "uploadArchiveFailed", e.UploadArchivePartiallyFailed = "uploadArchivePartiallyFailed", e.UploadArchiveRequestFailed = "uploadArchiveRequestFailed", e;
|
|
16498
|
-
}({}),
|
|
16531
|
+
}({}), am = /* @__PURE__ */ function(e) {
|
|
16499
16532
|
return e.Empty = "empty", e.ForbiddenSymbols = "forbiddenSymbols", e.ReservedName = "reservedName", e.TooLong = "tooLong", e.DuplicateName = "duplicateName", e.LeadingDot = "leadingDot", e;
|
|
16500
|
-
}({}),
|
|
16533
|
+
}({}), om = /* @__PURE__ */ function(e) {
|
|
16501
16534
|
return e.FolderCreated = "folderCreated", e.FileRenamed = "fileRenamed", e.FileDownloaded = "fileDownloaded", e.FilesDownloaded = "filesDownloaded", e.FileCopied = "fileCopied", e.FilesCopied = "filesCopied", e.FileMoved = "fileMoved", e.FilesMoved = "filesMoved", e;
|
|
16502
|
-
}({}),
|
|
16535
|
+
}({}), sm = 3, cm = y, lm = /[/\\]/, um = {
|
|
16503
16536
|
year: "numeric",
|
|
16504
16537
|
month: "short",
|
|
16505
16538
|
day: "2-digit"
|
|
16506
|
-
},
|
|
16539
|
+
}, dm = [
|
|
16507
16540
|
Ye.Name,
|
|
16508
16541
|
Ye.UpdatedAt,
|
|
16509
16542
|
Ye.Size,
|
|
16510
16543
|
Ye.Actions
|
|
16511
|
-
],
|
|
16544
|
+
], fm = [
|
|
16512
16545
|
Ye.Name,
|
|
16513
16546
|
Ye.UpdatedAt,
|
|
16514
16547
|
Ye.Size,
|
|
16515
16548
|
Ye.Author,
|
|
16516
16549
|
Ye.Actions
|
|
16517
|
-
],
|
|
16550
|
+
], pm = {
|
|
16518
16551
|
READ: Je.READ,
|
|
16519
16552
|
WRITE: Je.WRITE,
|
|
16520
16553
|
SHARE: Je.SHARE
|
|
16521
|
-
},
|
|
16554
|
+
}, mm = (e) => {
|
|
16522
16555
|
switch (e) {
|
|
16523
16556
|
case h.Attach: return m.Attach;
|
|
16524
16557
|
case h.Standalone: return m.Browse;
|
|
16525
16558
|
case h.FolderPicker: return m.Full;
|
|
16526
16559
|
}
|
|
16527
|
-
},
|
|
16528
|
-
if (
|
|
16560
|
+
}, hm = (e, t) => {
|
|
16561
|
+
if (lm.test(e)) return !0;
|
|
16529
16562
|
if (t == null) return !1;
|
|
16530
16563
|
t.lastIndex = 0;
|
|
16531
16564
|
let n = t.test(e);
|
|
16532
16565
|
return t.lastIndex = 0, n;
|
|
16533
|
-
},
|
|
16566
|
+
}, gm = (e) => e.replace(/\/+$/, "") || "/", _m = (e, t) => {
|
|
16534
16567
|
let n = e.split("/").filter(Boolean);
|
|
16535
16568
|
return H(n[n.length - 1] ?? t);
|
|
16536
|
-
},
|
|
16537
|
-
let n =
|
|
16569
|
+
}, vm = (e, t) => gm(e || `/${t}`).replace(/^\/+/, "") || t, ym = (e, t) => {
|
|
16570
|
+
let n = gm(t);
|
|
16538
16571
|
for (let r of e) {
|
|
16539
16572
|
if (r.nodeType !== B.FOLDER) continue;
|
|
16540
|
-
if (
|
|
16541
|
-
let e =
|
|
16573
|
+
if (gm(r.path) === n) return r;
|
|
16574
|
+
let e = ym(r.items ?? [], t);
|
|
16542
16575
|
if (e) return e;
|
|
16543
16576
|
}
|
|
16544
|
-
},
|
|
16577
|
+
}, bm = (e) => e?.permissions?.includes(Je.WRITE) ?? !1, xm = (e, t) => {
|
|
16545
16578
|
for (let n of e) {
|
|
16546
16579
|
if (n.path === t || n.id === t) return n;
|
|
16547
|
-
let e =
|
|
16580
|
+
let e = xm(n.items ?? [], t);
|
|
16548
16581
|
if (e) return e;
|
|
16549
16582
|
}
|
|
16550
|
-
},
|
|
16583
|
+
}, Sm = (e) => {
|
|
16551
16584
|
switch (e) {
|
|
16552
16585
|
case m.Attach: return !1;
|
|
16553
16586
|
case m.Browse:
|
|
16554
16587
|
case m.Full: return !0;
|
|
16555
16588
|
default: throw Error(`Unhandled actionProfile: ${String(e)}`);
|
|
16556
16589
|
}
|
|
16557
|
-
},
|
|
16590
|
+
}, Cm = (e) => e === m.Full, wm = (e, t) => {
|
|
16558
16591
|
let n = e.replace(/\/$/, ""), r = n.lastIndexOf("/");
|
|
16559
16592
|
if (r <= 0) {
|
|
16560
16593
|
let e = r === 0 ? n.slice(1) : n;
|
|
@@ -16567,13 +16600,13 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16567
16600
|
parentVirtualPath: n.slice(0, r),
|
|
16568
16601
|
name: n.slice(r + 1)
|
|
16569
16602
|
};
|
|
16570
|
-
},
|
|
16603
|
+
}, Tm = (e, t) => {
|
|
16571
16604
|
let n = `files/${t}/`;
|
|
16572
16605
|
return e.startsWith(n) ? e.slice(n.length) : e;
|
|
16573
|
-
},
|
|
16606
|
+
}, Em = (e, t, n) => {
|
|
16574
16607
|
let r = e.replace(/\/+$/, "").split("/").filter(Boolean).map(H).join("/"), i = r ? `/${t}/${r}` : `/${t}`;
|
|
16575
16608
|
return n ? `${i}/` : i;
|
|
16576
|
-
},
|
|
16609
|
+
}, Dm = (e, t, n) => {
|
|
16577
16610
|
if (!e) return {
|
|
16578
16611
|
bucket: n,
|
|
16579
16612
|
path: e
|
|
@@ -16583,15 +16616,15 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16583
16616
|
bucket: n,
|
|
16584
16617
|
path: e
|
|
16585
16618
|
};
|
|
16586
|
-
let o =
|
|
16619
|
+
let o = Tm(a.dialCorePath, a.bucket), s = r === -1 ? "" : e.slice(r + 1);
|
|
16587
16620
|
return {
|
|
16588
16621
|
bucket: a.bucket,
|
|
16589
16622
|
path: o + s
|
|
16590
16623
|
};
|
|
16591
|
-
},
|
|
16624
|
+
}, Om = (e) => e.startsWith("files/"), km = (e, t) => {
|
|
16592
16625
|
let n = `files/${t}/`;
|
|
16593
16626
|
if (e.startsWith(n)) return H(e.slice(n.length));
|
|
16594
|
-
if (
|
|
16627
|
+
if (Om(e)) {
|
|
16595
16628
|
let n = e.slice(6), r = n.indexOf("/");
|
|
16596
16629
|
if (r >= 0) {
|
|
16597
16630
|
let e = n.slice(0, r), i = n.slice(r + 1);
|
|
@@ -16599,7 +16632,7 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16599
16632
|
}
|
|
16600
16633
|
}
|
|
16601
16634
|
return e;
|
|
16602
|
-
},
|
|
16635
|
+
}, Am = (e, t) => {
|
|
16603
16636
|
let n = `/${t}`, r = `/${t}/`, i = `${t}/`;
|
|
16604
16637
|
if (e === n || e === `${t}` || e === r || e === i) return "";
|
|
16605
16638
|
let a;
|
|
@@ -16611,13 +16644,13 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16611
16644
|
}
|
|
16612
16645
|
let o = a.replace(/\/{2,}/g, "/");
|
|
16613
16646
|
return o && !o.endsWith("/") ? `${o}/` : o;
|
|
16614
|
-
},
|
|
16615
|
-
let r = e.nodeType === B.FOLDER, i = e.id ?
|
|
16647
|
+
}, jm = (e, t) => e.startsWith("/") || e === t || e.startsWith(`${t}/`), Mm = (e, t, n) => {
|
|
16648
|
+
let r = e.nodeType === B.FOLDER, i = e.id ? km(e.id, t) : null, a = i != null && !jm(i, n) ? i : Am(e.path, n);
|
|
16616
16649
|
return r ? a.endsWith("/") ? a : `${a}/` : a.replace(/\/$/, "");
|
|
16617
|
-
},
|
|
16618
|
-
let r = e.nodeType === B.FOLDER, i =
|
|
16650
|
+
}, Nm = (e, t, n) => e.map((e) => {
|
|
16651
|
+
let r = e.nodeType === B.FOLDER, i = Am(e.sourceUrl, n), a = Am(e.destinationUrl, n), o = _m(e.sourceUrl, i);
|
|
16619
16652
|
return {
|
|
16620
|
-
destinationName:
|
|
16653
|
+
destinationName: _m(e.destinationUrl, a),
|
|
16621
16654
|
dto: {
|
|
16622
16655
|
bucket: t,
|
|
16623
16656
|
sourcePath: r ? i.endsWith("/") ? i : `${i}/` : i.replace(/\/$/, ""),
|
|
@@ -16627,9 +16660,9 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16627
16660
|
name: o
|
|
16628
16661
|
}
|
|
16629
16662
|
};
|
|
16630
|
-
}),
|
|
16663
|
+
}), Pm = (e, t, n) => {
|
|
16631
16664
|
let r = e.map((e) => {
|
|
16632
|
-
let t = e.nodeType === B.FOLDER, r =
|
|
16665
|
+
let t = e.nodeType === B.FOLDER, r = Am(e.sourceUrl, n), i = Am(e.destinationUrl, n), a = _m(e.sourceUrl, r), o = _m(e.destinationUrl, i), s = t ? r.endsWith("/") ? r : `${r}/` : r.replace(/\/$/, ""), c = t ? i.endsWith("/") ? i : `${i}/` : i.replace(/\/$/, "");
|
|
16633
16666
|
return {
|
|
16634
16667
|
isFolder: t,
|
|
16635
16668
|
name: a,
|
|
@@ -16661,14 +16694,14 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16661
16694
|
}
|
|
16662
16695
|
}))
|
|
16663
16696
|
};
|
|
16664
|
-
},
|
|
16697
|
+
}, Fm = (e) => {
|
|
16665
16698
|
if (!e?.length) return;
|
|
16666
|
-
let t = e.map((e) =>
|
|
16699
|
+
let t = e.map((e) => pm[e.toUpperCase()]).filter((e) => e != null);
|
|
16667
16700
|
return t.length > 0 ? t : void 0;
|
|
16668
|
-
},
|
|
16701
|
+
}, Im = (e, t) => {
|
|
16669
16702
|
let n = t.find((e) => e.success);
|
|
16670
16703
|
if (n != null) return e.find(({ dto: e }) => e.sourcePath === n.sourcePath && e.destinationPath === n.destinationPath) ?? e.find(({ dto: e }) => e.destinationPath === n.destinationPath) ?? e[0];
|
|
16671
|
-
},
|
|
16704
|
+
}, Lm = (e, t, n, r, i) => {
|
|
16672
16705
|
let a = e.get(n);
|
|
16673
16706
|
if (a == null) return [];
|
|
16674
16707
|
let o = r.replace(/\/$/, "");
|
|
@@ -16690,11 +16723,11 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16690
16723
|
};
|
|
16691
16724
|
if (s) {
|
|
16692
16725
|
let r = `${n}${c}/`;
|
|
16693
|
-
u.permissions =
|
|
16726
|
+
u.permissions = Fm(a.permissions) ?? Fm(t.get(r)), u.items = Lm(e, t, r, l, a.path);
|
|
16694
16727
|
}
|
|
16695
16728
|
return u;
|
|
16696
16729
|
});
|
|
16697
|
-
},
|
|
16730
|
+
}, Rm = (e, t, n, r) => {
|
|
16698
16731
|
let i = new Map(e), a = [...i.get(t) ?? []], o = {
|
|
16699
16732
|
name: n.name,
|
|
16700
16733
|
path: n.path,
|
|
@@ -16706,7 +16739,7 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16706
16739
|
permissions: r
|
|
16707
16740
|
};
|
|
16708
16741
|
return a.some((e) => e.name.toLowerCase() === n.name.toLowerCase()) || a.push(o), i.set(t, a), i;
|
|
16709
|
-
},
|
|
16742
|
+
}, zm = (e, t, n) => {
|
|
16710
16743
|
if (!e) return e;
|
|
16711
16744
|
let r = typeof n == "string" ? { status: n } : n, i = e.files.map((e, n) => n === t ? {
|
|
16712
16745
|
...e,
|
|
@@ -16716,12 +16749,12 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16716
16749
|
...e,
|
|
16717
16750
|
files: i
|
|
16718
16751
|
};
|
|
16719
|
-
},
|
|
16752
|
+
}, Bm = (e, t, n, r, i) => {
|
|
16720
16753
|
if (t === z.Shared) {
|
|
16721
16754
|
if (r === "") return e.listSharedFiles({ path: void 0 }).then((e) => ({ items: e.items }));
|
|
16722
16755
|
let t = r.indexOf("/"), n = t === -1 ? r : r.slice(0, t), a = i.get(n);
|
|
16723
16756
|
if (a) {
|
|
16724
|
-
let n =
|
|
16757
|
+
let n = Tm(a.dialCorePath, a.bucket) + (t === -1 ? "" : r.slice(t + 1));
|
|
16725
16758
|
return e.listFiles({
|
|
16726
16759
|
bucket: a.bucket,
|
|
16727
16760
|
path: n,
|
|
@@ -16741,11 +16774,11 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16741
16774
|
items: e.items,
|
|
16742
16775
|
permissions: e.permissions
|
|
16743
16776
|
}));
|
|
16744
|
-
},
|
|
16777
|
+
}, Vm = async (e, t, n, r, i) => {
|
|
16745
16778
|
if (t === z.Shared) {
|
|
16746
16779
|
let t = r.indexOf("/"), n = t === -1 ? r : r.slice(0, t), a = i.get(n);
|
|
16747
16780
|
if (!a) return { items: [] };
|
|
16748
|
-
let o =
|
|
16781
|
+
let o = Tm(a.dialCorePath, a.bucket) + (t === -1 ? "" : r.slice(t + 1)), { items: s } = await e.listFiles({
|
|
16749
16782
|
bucket: a.bucket,
|
|
16750
16783
|
path: o,
|
|
16751
16784
|
permissions: !0,
|
|
@@ -16767,8 +16800,8 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16767
16800
|
recursive: !0
|
|
16768
16801
|
});
|
|
16769
16802
|
return { items: a };
|
|
16770
|
-
},
|
|
16771
|
-
let r = e.nodeType === De.Folder, i = H(e.name), a = e.bucket ?? t, o =
|
|
16803
|
+
}, Hm = (e, t, n) => {
|
|
16804
|
+
let r = e.nodeType === De.Folder, i = H(e.name), a = e.bucket ?? t, o = Tm(e.url ?? e.path ?? "", a).replace(/\/$/, ""), s = o.lastIndexOf("/"), c = s > 0 ? o.slice(0, s) : "", l = c ? `/${n}/${c}` : `/${n}`, u = r ? `${l}/${i}/` : `${l}/${i}`;
|
|
16772
16805
|
return {
|
|
16773
16806
|
id: e.path,
|
|
16774
16807
|
name: i,
|
|
@@ -16783,22 +16816,22 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16783
16816
|
contentType: e.contentType,
|
|
16784
16817
|
updatedAt: e.updatedAt ? new Date(e.updatedAt).toISOString() : void 0
|
|
16785
16818
|
};
|
|
16786
|
-
},
|
|
16819
|
+
}, Um = (e, t) => ({
|
|
16787
16820
|
...t,
|
|
16788
16821
|
bucket: e.bucket ?? t.bucket,
|
|
16789
16822
|
author: e.author,
|
|
16790
16823
|
contentLength: e.contentLength,
|
|
16791
16824
|
contentType: e.contentType,
|
|
16792
16825
|
resourceType: e.resourceType ?? t.resourceType,
|
|
16793
|
-
permissions:
|
|
16826
|
+
permissions: Fm(e.permissions) ?? t.permissions,
|
|
16794
16827
|
updatedAt: e.updatedAt ? new Date(e.updatedAt).toISOString() : t.updatedAt,
|
|
16795
16828
|
createdAt: e.createdAt ? new Date(e.createdAt).toISOString() : t.createdAt
|
|
16796
|
-
}),
|
|
16829
|
+
}), Wm = (e) => e instanceof AbortSignal ? { signal: e } : e ?? {}, Gm = (e, t) => ({
|
|
16797
16830
|
listPublicFiles: (t) => e.listPublicFiles(t),
|
|
16798
16831
|
listSharedFiles: (t) => e.listSharedFiles(t),
|
|
16799
16832
|
listFiles: (t, n) => e.listFiles(t, n ? { signal: n } : void 0),
|
|
16800
16833
|
uploadFile: (n, r, i, a) => {
|
|
16801
|
-
let { signal: o, onProgress: s, uploadMode: c } =
|
|
16834
|
+
let { signal: o, onProgress: s, uploadMode: c } = Wm(a);
|
|
16802
16835
|
return s == null ? e.uploadFile({
|
|
16803
16836
|
bucket: n,
|
|
16804
16837
|
path: r,
|
|
@@ -16829,7 +16862,7 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16829
16862
|
revokeAccess: (t) => e.revokeAccess({ revokeAccessDto: { items: t } }),
|
|
16830
16863
|
discardShared: (t) => e.discardShared({ discardSharedDto: { items: t } }),
|
|
16831
16864
|
listSharedByMe: (t) => e.listSharedByMe({ bucket: t })
|
|
16832
|
-
}),
|
|
16865
|
+
}), Km = (e) => {
|
|
16833
16866
|
let { uploadUrl: t, xhrFactory: n = () => new XMLHttpRequest() } = e;
|
|
16834
16867
|
return (r, i, a, { signal: o, onProgress: s, uploadMode: c } = {}) => new Promise((l, u) => {
|
|
16835
16868
|
let d = n();
|
|
@@ -16867,7 +16900,7 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16867
16900
|
}
|
|
16868
16901
|
d.send(p);
|
|
16869
16902
|
});
|
|
16870
|
-
},
|
|
16903
|
+
}, qm = (e, t) => {
|
|
16871
16904
|
let { url: n } = e;
|
|
16872
16905
|
if (n == null) return;
|
|
16873
16906
|
let r = n.split("#")[0];
|
|
@@ -16876,12 +16909,12 @@ var Au = (e) => Du.sanitize(e, Ou), ju = (e) => Du.sanitize(e, ku), Mu = (e) =>
|
|
|
16876
16909
|
if (n == null) return;
|
|
16877
16910
|
ce(n, e.title ?? r.split("/").pop() ?? "");
|
|
16878
16911
|
} else window.open(n, "_blank", "noopener,noreferrer");
|
|
16879
|
-
},
|
|
16880
|
-
typeof
|
|
16881
|
-
},
|
|
16912
|
+
}, Jm = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, Ym = /* @__PURE__ */ new Set(), Xm = typeof process == "object" && process ? process : {}, Zm = (e, t, n, r) => {
|
|
16913
|
+
typeof Xm.emitWarning == "function" ? Xm.emitWarning(e, t, n, r) : console.error(`[${n}] ${t}: ${e}`);
|
|
16914
|
+
}, Qm = globalThis.AbortController, $m = globalThis.AbortSignal;
|
|
16882
16915
|
/* c8 ignore start */
|
|
16883
|
-
if (
|
|
16884
|
-
|
|
16916
|
+
if (Qm === void 0) {
|
|
16917
|
+
$m = class {
|
|
16885
16918
|
onabort;
|
|
16886
16919
|
_onabort = [];
|
|
16887
16920
|
reason;
|
|
@@ -16889,11 +16922,11 @@ if (Xm === void 0) {
|
|
|
16889
16922
|
addEventListener(e, t) {
|
|
16890
16923
|
this._onabort.push(t);
|
|
16891
16924
|
}
|
|
16892
|
-
},
|
|
16925
|
+
}, Qm = class {
|
|
16893
16926
|
constructor() {
|
|
16894
16927
|
t();
|
|
16895
16928
|
}
|
|
16896
|
-
signal = new
|
|
16929
|
+
signal = new $m();
|
|
16897
16930
|
abort(e) {
|
|
16898
16931
|
if (!this.signal.aborted) {
|
|
16899
16932
|
this.signal.reason = e, this.signal.aborted = !0;
|
|
@@ -16902,21 +16935,21 @@ if (Xm === void 0) {
|
|
|
16902
16935
|
}
|
|
16903
16936
|
}
|
|
16904
16937
|
};
|
|
16905
|
-
let e =
|
|
16906
|
-
e && (e = !1,
|
|
16938
|
+
let e = Xm.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => {
|
|
16939
|
+
e && (e = !1, Zm("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t));
|
|
16907
16940
|
};
|
|
16908
16941
|
}
|
|
16909
16942
|
/* c8 ignore stop */
|
|
16910
|
-
var
|
|
16943
|
+
var eh = (e) => !Ym.has(e), th = (e) => e && e === Math.floor(e) && e > 0 && isFinite(e), nh = (e) => th(e) ? e <= 2 ** 8 ? Uint8Array : e <= 2 ** 16 ? Uint16Array : e <= 2 ** 32 ? Uint32Array : e <= 2 ** 53 - 1 ? rh : null : null, rh = class extends Array {
|
|
16911
16944
|
constructor(e) {
|
|
16912
16945
|
super(e), this.fill(0);
|
|
16913
16946
|
}
|
|
16914
|
-
},
|
|
16947
|
+
}, ih = class e {
|
|
16915
16948
|
heap;
|
|
16916
16949
|
length;
|
|
16917
16950
|
static #e = !1;
|
|
16918
16951
|
static create(t) {
|
|
16919
|
-
let n =
|
|
16952
|
+
let n = nh(t);
|
|
16920
16953
|
if (!n) return [];
|
|
16921
16954
|
e.#e = !0;
|
|
16922
16955
|
let r = new e(t, n);
|
|
@@ -16933,7 +16966,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
16933
16966
|
pop() {
|
|
16934
16967
|
return this.heap[--this.length];
|
|
16935
16968
|
}
|
|
16936
|
-
},
|
|
16969
|
+
}, ah = class e {
|
|
16937
16970
|
#e;
|
|
16938
16971
|
#t;
|
|
16939
16972
|
#n;
|
|
@@ -17023,8 +17056,8 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17023
17056
|
}
|
|
17024
17057
|
constructor(t) {
|
|
17025
17058
|
let { max: n = 0, ttl: r, ttlResolution: i = 1, ttlAutopurge: a, updateAgeOnGet: o, updateAgeOnHas: s, allowStale: c, dispose: l, disposeAfter: u, noDisposeOnSet: d, noUpdateTTL: f, maxSize: p = 0, maxEntrySize: m = 0, sizeCalculation: h, fetchMethod: g, memoMethod: _, noDeleteOnFetchRejection: v, noDeleteOnStaleGet: y, allowStaleOnFetchRejection: b, allowStaleOnFetchAbort: x, ignoreFetchAbort: S } = t;
|
|
17026
|
-
if (n !== 0 &&
|
|
17027
|
-
let C = n ?
|
|
17059
|
+
if (n !== 0 && !th(n)) throw TypeError("max option must be a nonnegative integer");
|
|
17060
|
+
let C = n ? nh(n) : Array;
|
|
17028
17061
|
if (!C) throw Error("invalid max value: " + n);
|
|
17029
17062
|
if (this.#e = n, this.#t = p, this.maxEntrySize = m || this.#t, this.sizeCalculation = h, this.sizeCalculation) {
|
|
17030
17063
|
if (!this.#t && !this.maxEntrySize) throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
|
@@ -17032,27 +17065,27 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17032
17065
|
}
|
|
17033
17066
|
if (_ !== void 0 && typeof _ != "function") throw TypeError("memoMethod must be a function if defined");
|
|
17034
17067
|
if (this.#a = _, g !== void 0 && typeof g != "function") throw TypeError("fetchMethod must be a function if specified");
|
|
17035
|
-
if (this.#i = g, this.#x = !!g, this.#c = /* @__PURE__ */ new Map(), this.#l = Array(n).fill(void 0), this.#u = Array(n).fill(void 0), this.#d = new C(n), this.#f = new C(n), this.#p = 0, this.#m = 0, this.#h =
|
|
17036
|
-
if (this.#t !== 0 &&
|
|
17037
|
-
if (
|
|
17068
|
+
if (this.#i = g, this.#x = !!g, this.#c = /* @__PURE__ */ new Map(), this.#l = Array(n).fill(void 0), this.#u = Array(n).fill(void 0), this.#d = new C(n), this.#f = new C(n), this.#p = 0, this.#m = 0, this.#h = ih.create(n), this.#o = 0, this.#s = 0, typeof l == "function" && (this.#n = l), typeof u == "function" ? (this.#r = u, this.#g = []) : (this.#r = void 0, this.#g = void 0), this.#b = !!this.#n, this.#S = !!this.#r, this.noDisposeOnSet = !!d, this.noUpdateTTL = !!f, this.noDeleteOnFetchRejection = !!v, this.allowStaleOnFetchRejection = !!b, this.allowStaleOnFetchAbort = !!x, this.ignoreFetchAbort = !!S, this.maxEntrySize !== 0) {
|
|
17069
|
+
if (this.#t !== 0 && !th(this.#t)) throw TypeError("maxSize must be a positive integer if specified");
|
|
17070
|
+
if (!th(this.maxEntrySize)) throw TypeError("maxEntrySize must be a positive integer if specified");
|
|
17038
17071
|
this.#O();
|
|
17039
17072
|
}
|
|
17040
|
-
if (this.allowStale = !!c, this.noDeleteOnStaleGet = !!y, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!s, this.ttlResolution =
|
|
17041
|
-
if (
|
|
17073
|
+
if (this.allowStale = !!c, this.noDeleteOnStaleGet = !!y, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!s, this.ttlResolution = th(i) || i === 0 ? i : 1, this.ttlAutopurge = !!a, this.ttl = r || 0, this.ttl) {
|
|
17074
|
+
if (!th(this.ttl)) throw TypeError("ttl must be a positive integer if specified");
|
|
17042
17075
|
this.#C();
|
|
17043
17076
|
}
|
|
17044
17077
|
if (this.#e === 0 && this.ttl === 0 && this.#t === 0) throw TypeError("At least one of max, maxSize, or ttl is required");
|
|
17045
17078
|
if (!this.ttlAutopurge && !this.#e && !this.#t) {
|
|
17046
17079
|
let t = "LRU_CACHE_UNBOUNDED";
|
|
17047
|
-
|
|
17080
|
+
eh(t) && (Ym.add(t), Zm("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", t, e));
|
|
17048
17081
|
}
|
|
17049
17082
|
}
|
|
17050
17083
|
getRemainingTTL(e) {
|
|
17051
17084
|
return this.#c.has(e) ? Infinity : 0;
|
|
17052
17085
|
}
|
|
17053
17086
|
#C() {
|
|
17054
|
-
let e = new
|
|
17055
|
-
this.#y = e, this.#v = t, this.#E = (n, r, i =
|
|
17087
|
+
let e = new rh(this.#e), t = new rh(this.#e);
|
|
17088
|
+
this.#y = e, this.#v = t, this.#E = (n, r, i = Jm.now()) => {
|
|
17056
17089
|
if (t[n] = r === 0 ? 0 : i, e[n] = r, r !== 0 && this.ttlAutopurge) {
|
|
17057
17090
|
let e = setTimeout(() => {
|
|
17058
17091
|
this.#D(n) && this.#B(this.#l[n], "expire");
|
|
@@ -17061,7 +17094,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17061
17094
|
e.unref && e.unref();
|
|
17062
17095
|
}
|
|
17063
17096
|
}, this.#w = (n) => {
|
|
17064
|
-
t[n] = e[n] === 0 ? 0 :
|
|
17097
|
+
t[n] = e[n] === 0 ? 0 : Jm.now();
|
|
17065
17098
|
}, this.#T = (i, a) => {
|
|
17066
17099
|
if (e[a]) {
|
|
17067
17100
|
let o = e[a], s = t[a];
|
|
@@ -17071,7 +17104,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17071
17104
|
}
|
|
17072
17105
|
};
|
|
17073
17106
|
let n = 0, r = () => {
|
|
17074
|
-
let e =
|
|
17107
|
+
let e = Jm.now();
|
|
17075
17108
|
if (this.ttlResolution > 0) {
|
|
17076
17109
|
n = e;
|
|
17077
17110
|
let t = setTimeout(() => n = 0, this.ttlResolution);
|
|
@@ -17096,14 +17129,14 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17096
17129
|
/* c8 ignore stop */
|
|
17097
17130
|
#D = () => !1;
|
|
17098
17131
|
#O() {
|
|
17099
|
-
let e = new
|
|
17132
|
+
let e = new rh(this.#e);
|
|
17100
17133
|
this.#s = 0, this.#_ = e, this.#k = (t) => {
|
|
17101
17134
|
this.#s -= e[t], e[t] = 0;
|
|
17102
17135
|
}, this.#j = (e, t, n, r) => {
|
|
17103
17136
|
if (this.#L(t)) return 0;
|
|
17104
|
-
if (
|
|
17137
|
+
if (!th(n)) if (r) {
|
|
17105
17138
|
if (typeof r != "function") throw TypeError("sizeCalculation must be a function");
|
|
17106
|
-
if (n = r(t, e),
|
|
17139
|
+
if (n = r(t, e), !th(n)) throw TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
17107
17140
|
} else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
17108
17141
|
return n;
|
|
17109
17142
|
}, this.#A = (t, n, r) => {
|
|
@@ -17188,7 +17221,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17188
17221
|
let i = { value: r };
|
|
17189
17222
|
if (this.#y && this.#v) {
|
|
17190
17223
|
let e = this.#y[t], n = this.#v[t];
|
|
17191
|
-
e && n && (i.ttl = e - (
|
|
17224
|
+
e && n && (i.ttl = e - (Jm.now() - n), i.start = Date.now());
|
|
17192
17225
|
}
|
|
17193
17226
|
return this.#_ && (i.size = this.#_[t]), i;
|
|
17194
17227
|
}
|
|
@@ -17200,7 +17233,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17200
17233
|
let a = { value: i };
|
|
17201
17234
|
if (this.#y && this.#v) {
|
|
17202
17235
|
a.ttl = this.#y[t];
|
|
17203
|
-
let e =
|
|
17236
|
+
let e = Jm.now() - this.#v[t];
|
|
17204
17237
|
a.start = Math.floor(Date.now() - e);
|
|
17205
17238
|
}
|
|
17206
17239
|
this.#_ && (a.size = this.#_[t]), e.unshift([n, a]);
|
|
@@ -17212,7 +17245,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17212
17245
|
for (let [t, n] of e) {
|
|
17213
17246
|
if (n.start) {
|
|
17214
17247
|
let e = Date.now() - n.start;
|
|
17215
|
-
n.start =
|
|
17248
|
+
n.start = Jm.now() - e;
|
|
17216
17249
|
}
|
|
17217
17250
|
this.set(t, n.value, n);
|
|
17218
17251
|
}
|
|
@@ -17295,7 +17328,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17295
17328
|
#I(e, t, n, r) {
|
|
17296
17329
|
let i = t === void 0 ? void 0 : this.#u[t];
|
|
17297
17330
|
if (this.#L(i)) return i;
|
|
17298
|
-
let a = new
|
|
17331
|
+
let a = new Qm(), { signal: o } = n;
|
|
17299
17332
|
o?.addEventListener("abort", () => a.abort(o.reason), { signal: a.signal });
|
|
17300
17333
|
let s = {
|
|
17301
17334
|
signal: a.signal,
|
|
@@ -17330,7 +17363,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17330
17363
|
#L(e) {
|
|
17331
17364
|
if (!this.#x) return !1;
|
|
17332
17365
|
let t = e;
|
|
17333
|
-
return !!t && t instanceof Promise && t.hasOwnProperty("__staleWhileFetching") && t.__abortController instanceof
|
|
17366
|
+
return !!t && t instanceof Promise && t.hasOwnProperty("__staleWhileFetching") && t.__abortController instanceof Qm;
|
|
17334
17367
|
}
|
|
17335
17368
|
async fetch(e, t = {}) {
|
|
17336
17369
|
let { allowStale: n = this.allowStale, updateAgeOnGet: r = this.updateAgeOnGet, noDeleteOnStaleGet: i = this.noDeleteOnStaleGet, ttl: a = this.ttl, noDisposeOnSet: o = this.noDisposeOnSet, size: s = 0, sizeCalculation: c = this.sizeCalculation, noUpdateTTL: l = this.noUpdateTTL, noDeleteOnFetchRejection: u = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: f = this.ignoreFetchAbort, allowStaleOnFetchAbort: p = this.allowStaleOnFetchAbort, context: m, forceRefresh: h = !1, status: g, signal: _ } = t;
|
|
@@ -17454,18 +17487,18 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17454
17487
|
for (; t = e?.shift();) this.#r?.(...t);
|
|
17455
17488
|
}
|
|
17456
17489
|
}
|
|
17457
|
-
},
|
|
17490
|
+
}, oh = (e, t) => URL.createObjectURL(T(e, t)), sh = (e) => {
|
|
17458
17491
|
let t = de(e);
|
|
17459
17492
|
return t == null ? e : new TextDecoder().decode(t);
|
|
17460
|
-
},
|
|
17493
|
+
}, ch = (n, r) => ({
|
|
17461
17494
|
type: e.Error,
|
|
17462
17495
|
errorType: n === 403 ? t.Forbidden : t.LoadFailed,
|
|
17463
17496
|
url: r
|
|
17464
|
-
}),
|
|
17497
|
+
}), lh = (n) => ({
|
|
17465
17498
|
type: e.Error,
|
|
17466
17499
|
errorType: t.LoadFailed,
|
|
17467
17500
|
url: n
|
|
17468
|
-
}),
|
|
17501
|
+
}), uh = (e) => {
|
|
17469
17502
|
let t;
|
|
17470
17503
|
try {
|
|
17471
17504
|
t = new URL(e).pathname;
|
|
@@ -17478,51 +17511,51 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17478
17511
|
} catch {
|
|
17479
17512
|
return n;
|
|
17480
17513
|
}
|
|
17481
|
-
},
|
|
17514
|
+
}, dh = (e, t) => {
|
|
17482
17515
|
if (e.startsWith("image/") || e.startsWith("audio/")) return !0;
|
|
17483
|
-
let i =
|
|
17516
|
+
let i = uh(t), a = i.lastIndexOf(".");
|
|
17484
17517
|
return a === -1 ? !1 : i.slice(a + 1).toLowerCase() === g.PDF || r(i) || n(i);
|
|
17485
|
-
},
|
|
17486
|
-
|
|
17487
|
-
},
|
|
17488
|
-
let t =
|
|
17518
|
+
}, fh = new ah({ max: 10 }), ph = new ah({ max: 50 }), mh = () => {
|
|
17519
|
+
fh.clear(), ph.clear();
|
|
17520
|
+
}, hh = (e) => {
|
|
17521
|
+
let t = fh.get(e);
|
|
17489
17522
|
return t ?? (t = fetch(e).then((e) => {
|
|
17490
17523
|
if (!e.ok) throw Object.assign(/* @__PURE__ */ Error(`HTTP ${e.status}`), { status: e.status });
|
|
17491
17524
|
return e.blob();
|
|
17492
17525
|
}).catch((t) => {
|
|
17493
|
-
throw
|
|
17494
|
-
}),
|
|
17495
|
-
},
|
|
17496
|
-
let t =
|
|
17526
|
+
throw fh.delete(e), t;
|
|
17527
|
+
}), fh.set(e, t)), t;
|
|
17528
|
+
}, gh = (e) => {
|
|
17529
|
+
let t = ph.get(e);
|
|
17497
17530
|
return t ?? (t = fetch(e).then((e) => {
|
|
17498
17531
|
if (!e.ok) throw Object.assign(/* @__PURE__ */ Error(`HTTP ${e.status}`), { status: e.status });
|
|
17499
17532
|
return e.text();
|
|
17500
17533
|
}).catch((t) => {
|
|
17501
|
-
throw
|
|
17502
|
-
}),
|
|
17503
|
-
},
|
|
17534
|
+
throw ph.delete(e), t;
|
|
17535
|
+
}), ph.set(e, t)), t;
|
|
17536
|
+
}, _h = async (e, t) => {
|
|
17504
17537
|
if ("file" in e) return URL.createObjectURL(e.file);
|
|
17505
17538
|
let n = t.resolveDialUrl(e);
|
|
17506
17539
|
if (n != null) try {
|
|
17507
|
-
let e = await
|
|
17540
|
+
let e = await hh(n);
|
|
17508
17541
|
return URL.createObjectURL(e);
|
|
17509
17542
|
} catch (e) {
|
|
17510
17543
|
let t = e.status;
|
|
17511
|
-
return t == null ?
|
|
17544
|
+
return t == null ? lh(n) : ch(t, n);
|
|
17512
17545
|
}
|
|
17513
17546
|
if (e.previewUrl != null) return e.previewUrl;
|
|
17514
|
-
if (e.data != null) return
|
|
17515
|
-
},
|
|
17516
|
-
if (e.data != null) return
|
|
17547
|
+
if (e.data != null) return oh(e.data, e.contentType);
|
|
17548
|
+
}, vh = async (e, t) => {
|
|
17549
|
+
if (e.data != null) return sh(e.data);
|
|
17517
17550
|
let n = t.resolveDialUrl(e);
|
|
17518
17551
|
if (n != null) try {
|
|
17519
|
-
return await
|
|
17552
|
+
return await gh(n);
|
|
17520
17553
|
} catch (e) {
|
|
17521
17554
|
let t = e.status;
|
|
17522
|
-
return t == null ?
|
|
17555
|
+
return t == null ? lh(n) : ch(t, n);
|
|
17523
17556
|
}
|
|
17524
17557
|
if ("file" in e) return e.file.text();
|
|
17525
|
-
},
|
|
17558
|
+
}, yh = (e, t) => e.data != null || t.resolveDialUrl(e) != null || "file" in e, bh = (t, n) => {
|
|
17526
17559
|
if ("file" in t) return {
|
|
17527
17560
|
type: e.Image,
|
|
17528
17561
|
url: URL.createObjectURL(t.file)
|
|
@@ -17530,7 +17563,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17530
17563
|
let r = n.resolveDialUrl(t);
|
|
17531
17564
|
return r == null ? t.previewUrl == null ? t.data == null ? null : {
|
|
17532
17565
|
type: e.Image,
|
|
17533
|
-
url:
|
|
17566
|
+
url: oh(t.data, t.contentType)
|
|
17534
17567
|
} : {
|
|
17535
17568
|
type: e.Image,
|
|
17536
17569
|
url: t.previewUrl
|
|
@@ -17538,37 +17571,37 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17538
17571
|
type: e.Image,
|
|
17539
17572
|
url: r
|
|
17540
17573
|
};
|
|
17541
|
-
},
|
|
17542
|
-
let r = await
|
|
17574
|
+
}, xh = async (t, n) => {
|
|
17575
|
+
let r = await vh(t, n);
|
|
17543
17576
|
return r == null ? null : typeof r == "string" ? {
|
|
17544
17577
|
type: e.PlainText,
|
|
17545
17578
|
text: r
|
|
17546
17579
|
} : r;
|
|
17547
|
-
},
|
|
17548
|
-
let r = await
|
|
17580
|
+
}, Sh = async (t, n) => {
|
|
17581
|
+
let r = await vh(t, n);
|
|
17549
17582
|
return r == null ? null : typeof r == "string" ? {
|
|
17550
17583
|
type: e.Markdown,
|
|
17551
17584
|
text: r
|
|
17552
17585
|
} : r;
|
|
17553
|
-
},
|
|
17554
|
-
let i = await
|
|
17586
|
+
}, Ch = 1048576, wh = async (t, n, r) => {
|
|
17587
|
+
let i = await vh(t, n);
|
|
17555
17588
|
return i == null ? null : typeof i == "string" ? {
|
|
17556
17589
|
type: e.Code,
|
|
17557
17590
|
text: i,
|
|
17558
17591
|
language: r
|
|
17559
17592
|
} : i;
|
|
17560
|
-
},
|
|
17561
|
-
let r = await
|
|
17593
|
+
}, Th = async (t, n) => {
|
|
17594
|
+
let r = await vh(t, n);
|
|
17562
17595
|
if (r == null) return null;
|
|
17563
17596
|
if (typeof r != "string") return r;
|
|
17564
|
-
if (r.length >
|
|
17597
|
+
if (r.length > Ch) return null;
|
|
17565
17598
|
let i = n.resolveDialUrl(t) ?? void 0;
|
|
17566
17599
|
return {
|
|
17567
17600
|
type: e.Html,
|
|
17568
17601
|
srcdoc: r,
|
|
17569
17602
|
url: i
|
|
17570
17603
|
};
|
|
17571
|
-
},
|
|
17604
|
+
}, Eh = (t, n, r) => {
|
|
17572
17605
|
let i = t.body?.source?.attachment;
|
|
17573
17606
|
if (i?.type !== b.PDF) return null;
|
|
17574
17607
|
let a = Tt(i.url) ? r.resolveDialFileDownloadUrl(i.url) : i.url;
|
|
@@ -17580,7 +17613,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17580
17613
|
highlights: pe(s),
|
|
17581
17614
|
selectedHighlightId: fe(t, c)
|
|
17582
17615
|
};
|
|
17583
|
-
},
|
|
17616
|
+
}, Dh = (t, n) => {
|
|
17584
17617
|
let r = j(t.url);
|
|
17585
17618
|
if (r == null) return null;
|
|
17586
17619
|
let i = Tt(r.baseUrl) ? n.resolveDialFileDownloadUrl(r.baseUrl) : r.baseUrl;
|
|
@@ -17609,21 +17642,21 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17609
17642
|
}],
|
|
17610
17643
|
selectedHighlightId: a
|
|
17611
17644
|
};
|
|
17612
|
-
},
|
|
17613
|
-
let r = await
|
|
17645
|
+
}, Oh = async (t, n) => {
|
|
17646
|
+
let r = await _h(t, n);
|
|
17614
17647
|
return r == null ? null : typeof r == "string" ? {
|
|
17615
17648
|
type: e.Pdf,
|
|
17616
17649
|
url: r
|
|
17617
17650
|
} : r;
|
|
17618
|
-
},
|
|
17619
|
-
let i = await
|
|
17651
|
+
}, kh = async (t, n, r) => {
|
|
17652
|
+
let i = await _h(t, n);
|
|
17620
17653
|
return i == null ? null : typeof i == "string" ? {
|
|
17621
17654
|
type: e.Ooxml,
|
|
17622
17655
|
url: i,
|
|
17623
17656
|
format: r
|
|
17624
17657
|
} : i;
|
|
17625
|
-
},
|
|
17626
|
-
let r = await
|
|
17658
|
+
}, Ah = async (t, n) => {
|
|
17659
|
+
let r = await vh(t, n);
|
|
17627
17660
|
if (r == null) return null;
|
|
17628
17661
|
if (typeof r != "string") return r;
|
|
17629
17662
|
try {
|
|
@@ -17638,8 +17671,8 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17638
17671
|
text: r
|
|
17639
17672
|
};
|
|
17640
17673
|
}
|
|
17641
|
-
},
|
|
17642
|
-
let a = await
|
|
17674
|
+
}, jh = async (t, n, r, i) => {
|
|
17675
|
+
let a = await vh(t, n);
|
|
17643
17676
|
if (a == null || typeof a != "string") return null;
|
|
17644
17677
|
let o = {};
|
|
17645
17678
|
try {
|
|
@@ -17660,7 +17693,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17660
17693
|
visualizerName: r.title,
|
|
17661
17694
|
requestTimeout: r.requestTimeout
|
|
17662
17695
|
};
|
|
17663
|
-
},
|
|
17696
|
+
}, Mh = (e, t) => se(e, t), Nh = (e) => {
|
|
17664
17697
|
let t = e.body?.source?.attachment;
|
|
17665
17698
|
return t == null ? null : {
|
|
17666
17699
|
id: t.url,
|
|
@@ -17670,12 +17703,12 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17670
17703
|
status: S.Idle,
|
|
17671
17704
|
url: t.url
|
|
17672
17705
|
};
|
|
17673
|
-
},
|
|
17706
|
+
}, Ph = (e, t) => e?.map((e) => Mh(e, t)) ?? [], Fh = (e, t) => {
|
|
17674
17707
|
let n = e.url ?? e.id;
|
|
17675
17708
|
if (n) return Tt(n) || n.startsWith("http://") || n.startsWith("https://") ? n : `files/${t}/${n.replace(/^\/+/, "")}`;
|
|
17676
|
-
},
|
|
17709
|
+
}, Ih = (e, t, n) => {
|
|
17677
17710
|
if (e.nodeType !== We.ITEM) return null;
|
|
17678
|
-
let r =
|
|
17711
|
+
let r = Fh(e, t);
|
|
17679
17712
|
if (!r) return null;
|
|
17680
17713
|
let i = e.contentType ?? "application/octet-stream", a = i.startsWith("image/"), s = a ? n?.resolvePreviewUrl?.(r) : void 0;
|
|
17681
17714
|
return {
|
|
@@ -17688,7 +17721,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17688
17721
|
file: new File([], e.name, { type: i }),
|
|
17689
17722
|
...s == null ? {} : { previewUrl: s }
|
|
17690
17723
|
};
|
|
17691
|
-
},
|
|
17724
|
+
}, Lh = (e, t, n) => e.map((e) => Ih(e, t, n)).filter((e) => e != null), Rh = (e) => {
|
|
17692
17725
|
let t = H(e.replace(/\/$/, "").split("/").filter(Boolean).pop() ?? "");
|
|
17693
17726
|
return {
|
|
17694
17727
|
id: e,
|
|
@@ -17699,11 +17732,11 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17699
17732
|
url: e,
|
|
17700
17733
|
file: new File([], t)
|
|
17701
17734
|
};
|
|
17702
|
-
},
|
|
17735
|
+
}, zh = /* @__PURE__ */ function(e) {
|
|
17703
17736
|
return e.Blob = "blob", e.Stream = "stream", e.Cancelled = "cancelled", e;
|
|
17704
|
-
}({}),
|
|
17737
|
+
}({}), Bh = async (e, t = "application/octet-stream") => {
|
|
17705
17738
|
let n = window.showSaveFilePicker;
|
|
17706
|
-
if (n == null) return { type:
|
|
17739
|
+
if (n == null) return { type: zh.Blob };
|
|
17707
17740
|
try {
|
|
17708
17741
|
let r = e.lastIndexOf("."), i = r >= 0 ? e.slice(r) : void 0, a = await n.call(window, {
|
|
17709
17742
|
suggestedName: e,
|
|
@@ -17713,27 +17746,27 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17713
17746
|
}]
|
|
17714
17747
|
});
|
|
17715
17748
|
return {
|
|
17716
|
-
type:
|
|
17749
|
+
type: zh.Stream,
|
|
17717
17750
|
writable: await a.createWritable()
|
|
17718
17751
|
};
|
|
17719
17752
|
} catch (e) {
|
|
17720
|
-
if (e instanceof DOMException && e.name === "AbortError") return { type:
|
|
17753
|
+
if (e instanceof DOMException && e.name === "AbortError") return { type: zh.Cancelled };
|
|
17721
17754
|
throw e;
|
|
17722
17755
|
}
|
|
17723
|
-
},
|
|
17756
|
+
}, Vh = (e) => {
|
|
17724
17757
|
let t = e.lastIndexOf("."), n = t > 0;
|
|
17725
17758
|
return {
|
|
17726
17759
|
base: n ? e.slice(0, t) : e,
|
|
17727
17760
|
extension: n ? e.slice(t) : ""
|
|
17728
17761
|
};
|
|
17729
|
-
},
|
|
17762
|
+
}, Hh = (e, t = 255) => {
|
|
17730
17763
|
if (ae(e) <= t) return e;
|
|
17731
|
-
let { base: n, extension: r } =
|
|
17764
|
+
let { base: n, extension: r } = Vh(e), i = t - ae(r);
|
|
17732
17765
|
return i <= 0 ? ue(e, t) : `${ue(n, i)}${r}`;
|
|
17733
|
-
},
|
|
17734
|
-
let { base: t, extension: n } =
|
|
17735
|
-
return r === "" ? e :
|
|
17736
|
-
},
|
|
17766
|
+
}, Uh = (e) => {
|
|
17767
|
+
let { base: t, extension: n } = Vh(e), r = t.replace(new RegExp(Ke.source, "g"), "_").replace(/[.\s]+$/, "");
|
|
17768
|
+
return r === "" ? e : Hh(`${r}${n}`);
|
|
17769
|
+
}, Wh = ({ filesApi: e, bucket: t, rootLabel: n, activeTab: r, onNotification: i }) => {
|
|
17737
17770
|
let [a, o] = L(""), [s, c] = L(() => /* @__PURE__ */ new Map()), l = I(s);
|
|
17738
17771
|
N(() => {
|
|
17739
17772
|
l.current = s;
|
|
@@ -17745,11 +17778,11 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17745
17778
|
D.current != null && clearTimeout(D.current), O.current?.();
|
|
17746
17779
|
}, []), N(() => {
|
|
17747
17780
|
let i = !1;
|
|
17748
|
-
return p(!0), h(null),
|
|
17781
|
+
return p(!0), h(null), Bm(e, r, t, a, S.current).then(({ items: e, permissions: t }) => {
|
|
17749
17782
|
i || (c((t) => {
|
|
17750
17783
|
let n = new Map(t);
|
|
17751
17784
|
return n.set(a, e), n;
|
|
17752
|
-
}), d((e) => new Map(e).set(a, t)), r === z.Shared && a === "" && (y(e.map((e) =>
|
|
17785
|
+
}), d((e) => new Map(e).set(a, t)), r === z.Shared && a === "" && (y(e.map((e) => Em(Tm(e.path, e.bucket ?? ""), n, e.nodeType === De.Folder))), S.current = new Map(e.map((e) => [H(e.name), {
|
|
17753
17786
|
bucket: e.bucket ?? "",
|
|
17754
17787
|
dialCorePath: e.path
|
|
17755
17788
|
}]))));
|
|
@@ -17774,7 +17807,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17774
17807
|
}
|
|
17775
17808
|
let i = !1;
|
|
17776
17809
|
return e.listSharedByMe(t).then((e) => {
|
|
17777
|
-
i || x(new Set(e.items.map((e) =>
|
|
17810
|
+
i || x(new Set(e.items.map((e) => Em(Tm(e.path, t), n, e.nodeType === De.Folder))));
|
|
17778
17811
|
}).catch(() => {
|
|
17779
17812
|
i || x(/* @__PURE__ */ new Set());
|
|
17780
17813
|
}), () => {
|
|
@@ -17794,8 +17827,8 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17794
17827
|
parentPath: "",
|
|
17795
17828
|
nodeType: B.FOLDER,
|
|
17796
17829
|
folderId: t,
|
|
17797
|
-
permissions:
|
|
17798
|
-
items:
|
|
17830
|
+
permissions: Fm(u.get("")),
|
|
17831
|
+
items: Lm(s, u, "", `/${n}`, t)
|
|
17799
17832
|
}], [
|
|
17800
17833
|
s,
|
|
17801
17834
|
u,
|
|
@@ -17823,7 +17856,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17823
17856
|
_((e) => e + 1);
|
|
17824
17857
|
}, []), ue = le, de = M((o) => {
|
|
17825
17858
|
if (o.length === 0) return;
|
|
17826
|
-
let s = new Set([...ne].map((e) =>
|
|
17859
|
+
let s = new Set([...ne].map((e) => Am(e, n))), l = (e) => e === a || a.startsWith(e) || s.has(e), u = o.filter((e) => !l(e)), f = o.filter((e) => l(e) && e !== a);
|
|
17827
17860
|
u.length > 0 && (c((e) => {
|
|
17828
17861
|
let t = new Map(e);
|
|
17829
17862
|
return u.forEach((e) => t.delete(e)), t;
|
|
@@ -17833,7 +17866,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17833
17866
|
})), f.forEach((n) => {
|
|
17834
17867
|
(async () => {
|
|
17835
17868
|
try {
|
|
17836
|
-
let { items: i, permissions: a } = await
|
|
17869
|
+
let { items: i, permissions: a } = await Bm(e, r, t, n, S.current);
|
|
17837
17870
|
c((e) => new Map(e).set(n, i)), a != null && d((e) => new Map(e).set(n, a));
|
|
17838
17871
|
} catch {
|
|
17839
17872
|
i?.({
|
|
@@ -17852,9 +17885,9 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17852
17885
|
n,
|
|
17853
17886
|
i
|
|
17854
17887
|
]), fe = M((e, t, n) => {
|
|
17855
|
-
c((r) =>
|
|
17888
|
+
c((r) => Rm(r, e, t, n));
|
|
17856
17889
|
}, []), pe = M((a) => {
|
|
17857
|
-
let o = a == null ? "" :
|
|
17890
|
+
let o = a == null ? "" : Am(a, n), s = a ?? `/${n}`;
|
|
17858
17891
|
if (oe((e) => {
|
|
17859
17892
|
if (e.has(s)) return e;
|
|
17860
17893
|
let t = new Set(e);
|
|
@@ -17872,7 +17905,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17872
17905
|
return t.add(s), t;
|
|
17873
17906
|
}), (async () => {
|
|
17874
17907
|
try {
|
|
17875
|
-
let { items: n, permissions: i } = await
|
|
17908
|
+
let { items: n, permissions: i } = await Bm(e, r, t, o, S.current);
|
|
17876
17909
|
c((e) => new Map(e).set(o, n)), i != null && d((e) => new Map(e).set(o, i)), te.current.delete(o);
|
|
17877
17910
|
} catch {
|
|
17878
17911
|
i?.({
|
|
@@ -17896,7 +17929,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17896
17929
|
]), me = F(() => {
|
|
17897
17930
|
let e = /* @__PURE__ */ new Set(), t = new Set([...ne, ...ae]);
|
|
17898
17931
|
for (let r of t) {
|
|
17899
|
-
let t =
|
|
17932
|
+
let t = Am(r, n);
|
|
17900
17933
|
s.has(t) && e.add(r);
|
|
17901
17934
|
}
|
|
17902
17935
|
return e;
|
|
@@ -17907,15 +17940,15 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17907
17940
|
n
|
|
17908
17941
|
]), he = M((a) => {
|
|
17909
17942
|
ne.forEach((e) => {
|
|
17910
|
-
a.has(e) || te.current.delete(
|
|
17943
|
+
a.has(e) || te.current.delete(Am(e, n));
|
|
17911
17944
|
}), k(a), [...a].filter((e) => {
|
|
17912
|
-
let t =
|
|
17945
|
+
let t = Am(e, n);
|
|
17913
17946
|
return !l.current.has(t) && !ee.current.has(t) && !te.current.has(t);
|
|
17914
17947
|
}).forEach((a) => {
|
|
17915
|
-
let o =
|
|
17948
|
+
let o = Am(a, n);
|
|
17916
17949
|
ee.current.add(o), (async () => {
|
|
17917
17950
|
try {
|
|
17918
|
-
let { items: n, permissions: i } = await
|
|
17951
|
+
let { items: n, permissions: i } = await Bm(e, r, t, o, S.current);
|
|
17919
17952
|
c((e) => new Map(e).set(o, n)), i != null && d((e) => new Map(e).set(o, i));
|
|
17920
17953
|
} catch {
|
|
17921
17954
|
te.current.add(o), i?.({
|
|
@@ -17948,7 +17981,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17948
17981
|
D.current = null;
|
|
17949
17982
|
let i = o.toLowerCase();
|
|
17950
17983
|
if (r === z.Shared && a === "") {
|
|
17951
|
-
O.current?.(), O.current = null, w(!0), E((s.get("") ?? []).filter((e) => H(e.name).toLowerCase().includes(i)).map((e) =>
|
|
17984
|
+
O.current?.(), O.current = null, w(!0), E((s.get("") ?? []).filter((e) => H(e.name).toLowerCase().includes(i)).map((e) => Hm(e, e.bucket ?? t, n))), w(!1);
|
|
17952
17985
|
return;
|
|
17953
17986
|
}
|
|
17954
17987
|
let c = !1;
|
|
@@ -17956,9 +17989,9 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17956
17989
|
c = !0;
|
|
17957
17990
|
}, w(!0), (async () => {
|
|
17958
17991
|
try {
|
|
17959
|
-
let { items: o } = await
|
|
17992
|
+
let { items: o } = await Vm(e, r, t, a, S.current);
|
|
17960
17993
|
if (c) return;
|
|
17961
|
-
E(o.filter((e) => H(e.name).toLowerCase().includes(i)).map((e) =>
|
|
17994
|
+
E(o.filter((e) => H(e.name).toLowerCase().includes(i)).map((e) => Hm(e, e.bucket ?? t, n)));
|
|
17962
17995
|
} catch {
|
|
17963
17996
|
c || E([]);
|
|
17964
17997
|
} finally {
|
|
@@ -17975,7 +18008,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
17975
18008
|
n
|
|
17976
18009
|
]), P = a ? `/${n}/${a}` : `/${n}`, _e = F(() => {
|
|
17977
18010
|
let e = se[0];
|
|
17978
|
-
if (e) return
|
|
18011
|
+
if (e) return gm(P) === gm(`/${n}`) ? e : ym(e.items ?? [], P);
|
|
17979
18012
|
}, [
|
|
17980
18013
|
se,
|
|
17981
18014
|
P,
|
|
@@ -18009,7 +18042,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18009
18042
|
mergeCreatedFolder: fe,
|
|
18010
18043
|
bumpRetry: ue
|
|
18011
18044
|
};
|
|
18012
|
-
},
|
|
18045
|
+
}, Gh = ({ filesApi: e, bucket: t, rootLabel: n, onNotification: r }) => {
|
|
18013
18046
|
let [i, a] = L(void 0), [o, s] = L(!1);
|
|
18014
18047
|
return {
|
|
18015
18048
|
fileMetadata: i,
|
|
@@ -18018,8 +18051,8 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18018
18051
|
(async () => {
|
|
18019
18052
|
s(!0);
|
|
18020
18053
|
try {
|
|
18021
|
-
let r = i.bucket ?? t, o =
|
|
18022
|
-
a(
|
|
18054
|
+
let r = i.bucket ?? t, o = Mm(i, r, n);
|
|
18055
|
+
a(Um(await e.getFileMetadata({
|
|
18023
18056
|
bucket: r,
|
|
18024
18057
|
path: o
|
|
18025
18058
|
}), i));
|
|
@@ -18042,30 +18075,30 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18042
18075
|
a(void 0), s(!1);
|
|
18043
18076
|
}, [])
|
|
18044
18077
|
};
|
|
18045
|
-
},
|
|
18078
|
+
}, Kh = ({ filesApi: e, bucket: t, rootLabel: n, activeTab: r, folderPath: i, currentFolder: a, sharedRootMetaRef: o, listingPermissionsCache: s, invalidateFolders: c, bumpRetry: l, mergeCreatedFolder: u, setFolderPath: d, onNotification: f, onOperationSuccess: p, downloadDestination: m, forbiddenSymbolsRegExp: h }) => {
|
|
18046
18079
|
let [g, _] = L(!1), [v, y] = L(!1), [b, x] = L(!1), [S, C] = L(!1), [w, T] = L(!1), [E, D] = L(!1), O = I(null), ee = I(null), te = M((e, t) => {
|
|
18047
18080
|
let n = null;
|
|
18048
|
-
if (!e || e.trim() === "") n = { reason:
|
|
18049
|
-
else if (
|
|
18050
|
-
reason:
|
|
18081
|
+
if (!e || e.trim() === "") n = { reason: am.Empty };
|
|
18082
|
+
else if (hm(e, h)) n = {
|
|
18083
|
+
reason: am.ForbiddenSymbols,
|
|
18051
18084
|
symbols: Ge
|
|
18052
18085
|
};
|
|
18053
|
-
else if (e.startsWith(".")) n = { reason:
|
|
18054
|
-
else if (e ===
|
|
18086
|
+
else if (e.startsWith(".")) n = { reason: am.LeadingDot };
|
|
18087
|
+
else if (e === cm) n = { reason: am.ReservedName };
|
|
18055
18088
|
else if (e.length > 255) n = {
|
|
18056
|
-
reason:
|
|
18089
|
+
reason: am.TooLong,
|
|
18057
18090
|
maxLength: 255
|
|
18058
18091
|
};
|
|
18059
18092
|
else {
|
|
18060
18093
|
let r = t.items ?? [], i = e.toLowerCase(), a = r.find((e) => e.name.toLowerCase() === i);
|
|
18061
18094
|
a && (n = {
|
|
18062
|
-
reason:
|
|
18095
|
+
reason: am.DuplicateName,
|
|
18063
18096
|
existingName: a.name
|
|
18064
18097
|
});
|
|
18065
18098
|
}
|
|
18066
18099
|
return ee.current = n, n;
|
|
18067
18100
|
}, [h]), ne = M(async (c, d, m) => {
|
|
18068
|
-
let { parentVirtualPath: h, name: g } =
|
|
18101
|
+
let { parentVirtualPath: h, name: g } = wm(d, n), v = Am(h, n), y = a && i === v ? a : {
|
|
18069
18102
|
id: v,
|
|
18070
18103
|
path: v,
|
|
18071
18104
|
name: h.split("/").filter(Boolean).pop() ?? "",
|
|
@@ -18075,7 +18108,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18075
18108
|
}, b = ee.current;
|
|
18076
18109
|
if (ee.current = null, te(g, y) || b) return;
|
|
18077
18110
|
_(!0);
|
|
18078
|
-
let { bucket: x, path: S } = r === z.Shared ?
|
|
18111
|
+
let { bucket: x, path: S } = r === z.Shared ? Dm(v, o.current, t) : {
|
|
18079
18112
|
bucket: t,
|
|
18080
18113
|
path: v
|
|
18081
18114
|
};
|
|
@@ -18085,7 +18118,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18085
18118
|
parentPath: S || void 0,
|
|
18086
18119
|
name: g
|
|
18087
18120
|
}), s.get(v)), l(), p?.({
|
|
18088
|
-
kind:
|
|
18121
|
+
kind: om.FolderCreated,
|
|
18089
18122
|
name: g
|
|
18090
18123
|
});
|
|
18091
18124
|
} catch {
|
|
@@ -18115,32 +18148,32 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18115
18148
|
y(!0);
|
|
18116
18149
|
try {
|
|
18117
18150
|
let i = r.length === 1 ? r[0].nodeType === B.ITEM ? r[0].name : `${r[0].name}.zip` : "files.zip", a = await m.resolveDestination(i, r.length === 1 && r[0].nodeType === B.ITEM ? r[0].contentType ?? "application/octet-stream" : "application/zip");
|
|
18118
|
-
if (a.type ===
|
|
18151
|
+
if (a.type === zh.Cancelled) return;
|
|
18119
18152
|
if (r.length === 1 && r[0].nodeType === B.ITEM) {
|
|
18120
18153
|
let t = r[0];
|
|
18121
18154
|
if (!t.bucket) throw Error("File is missing bucket");
|
|
18122
|
-
let i =
|
|
18155
|
+
let i = Mm(t, t.bucket, n), o = await e.downloadFile(t.bucket, i);
|
|
18123
18156
|
if (!o.ok) throw Error(`Download failed with status ${o.status}`);
|
|
18124
18157
|
let s = await m.triggerDownload(o, t.name, a);
|
|
18125
18158
|
p?.({
|
|
18126
|
-
kind:
|
|
18159
|
+
kind: om.FileDownloaded,
|
|
18127
18160
|
name: s,
|
|
18128
18161
|
count: 1
|
|
18129
18162
|
});
|
|
18130
18163
|
} else {
|
|
18131
18164
|
let o = r.map((e) => ({
|
|
18132
18165
|
bucket: e.bucket ?? t,
|
|
18133
|
-
path:
|
|
18166
|
+
path: Mm(e, e.bucket ?? t, n),
|
|
18134
18167
|
name: e.name,
|
|
18135
18168
|
nodeType: e.nodeType === B.FOLDER ? we.Folder : we.Item
|
|
18136
18169
|
})), s = await e.downloadArchive(o);
|
|
18137
18170
|
if (!s.ok) throw Error(`Download failed with status ${s.status}`);
|
|
18138
18171
|
let c = await m.triggerDownload(s, i, a);
|
|
18139
18172
|
r.length === 1 ? p?.({
|
|
18140
|
-
kind:
|
|
18173
|
+
kind: om.FileDownloaded,
|
|
18141
18174
|
name: c
|
|
18142
18175
|
}) : p?.({
|
|
18143
|
-
kind:
|
|
18176
|
+
kind: om.FilesDownloaded,
|
|
18144
18177
|
count: r.length
|
|
18145
18178
|
});
|
|
18146
18179
|
}
|
|
@@ -18164,7 +18197,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18164
18197
|
a.length !== 0 && (async () => {
|
|
18165
18198
|
x(!0);
|
|
18166
18199
|
let u = a.map((e) => {
|
|
18167
|
-
let i = e.nodeType === B.FOLDER, a =
|
|
18200
|
+
let i = e.nodeType === B.FOLDER, a = Am(e.sourceUrl, n), s = i ? a : a.replace(/\/$/, ""), c = _m(e.sourceUrl, s), { bucket: l, path: u } = r === z.Shared ? Dm(s, o.current, t) : {
|
|
18168
18201
|
bucket: t,
|
|
18169
18202
|
path: s
|
|
18170
18203
|
};
|
|
@@ -18217,19 +18250,19 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18217
18250
|
l,
|
|
18218
18251
|
d
|
|
18219
18252
|
]), ae = M((e, t) => {
|
|
18220
|
-
if (!e || e.trim() === "") return { reason:
|
|
18221
|
-
if (e ===
|
|
18222
|
-
if (
|
|
18223
|
-
reason:
|
|
18253
|
+
if (!e || e.trim() === "") return { reason: am.Empty };
|
|
18254
|
+
if (e === cm) return { reason: am.ReservedName };
|
|
18255
|
+
if (hm(e, h)) return {
|
|
18256
|
+
reason: am.ForbiddenSymbols,
|
|
18224
18257
|
symbols: Ge
|
|
18225
18258
|
};
|
|
18226
18259
|
if (e.length > 255) return {
|
|
18227
|
-
reason:
|
|
18260
|
+
reason: am.TooLong,
|
|
18228
18261
|
maxLength: 255
|
|
18229
18262
|
};
|
|
18230
18263
|
let n = a?.items ?? [], r = e.toLowerCase(), i = n.find((e) => e.path !== t.path && e.name.toLowerCase() === r);
|
|
18231
18264
|
return i ? {
|
|
18232
|
-
reason:
|
|
18265
|
+
reason: am.DuplicateName,
|
|
18233
18266
|
existingName: i.name
|
|
18234
18267
|
} : null;
|
|
18235
18268
|
}, [h, a]), oe = M((r, i) => {
|
|
@@ -18237,16 +18270,16 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18237
18270
|
let a = new AbortController();
|
|
18238
18271
|
O.current = a, (async () => {
|
|
18239
18272
|
T(!0);
|
|
18240
|
-
let o =
|
|
18273
|
+
let o = Nm(r, t, n), s = o.map(({ dto: e }) => e);
|
|
18241
18274
|
try {
|
|
18242
18275
|
let { results: t } = await e.copyFiles(s, a.signal), r = t.filter((e) => !e.success).length, c = t.length - r;
|
|
18243
18276
|
if (c > 0) {
|
|
18244
|
-
let e =
|
|
18277
|
+
let e = Im(o, t);
|
|
18245
18278
|
p?.({
|
|
18246
|
-
kind: c === 1 ?
|
|
18279
|
+
kind: c === 1 ? om.FileCopied : om.FilesCopied,
|
|
18247
18280
|
name: e?.destinationName,
|
|
18248
18281
|
count: c,
|
|
18249
|
-
destinationFolderName:
|
|
18282
|
+
destinationFolderName: vm(i, n)
|
|
18250
18283
|
});
|
|
18251
18284
|
}
|
|
18252
18285
|
r > 0 && r < t.length ? f?.({
|
|
@@ -18293,7 +18326,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18293
18326
|
onRenameValidate: ae,
|
|
18294
18327
|
onMoveToFiles: M((r, a, o) => {
|
|
18295
18328
|
if (r.length === 0 || w || E || S) return;
|
|
18296
|
-
let { renameDtos: s, preparedMoveItems: u } =
|
|
18329
|
+
let { renameDtos: s, preparedMoveItems: u } = Pm(r, t, n), m = u.map(({ dto: e }) => e), h = new AbortController();
|
|
18297
18330
|
m.length > 0 && (O.current = h), (async () => {
|
|
18298
18331
|
s.length > 0 && C(!0), m.length > 0 && D(!0);
|
|
18299
18332
|
let [t, r] = await Promise.all([(async () => {
|
|
@@ -18335,19 +18368,19 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18335
18368
|
}
|
|
18336
18369
|
})()]), a = t.threw ? s.length : t.results.filter((e) => !e.success).length, g = r.threw && r.aborted, _ = g ? 0 : m.length, v = g ? 0 : r.threw ? m.length : r.results.filter((e) => !e.success).length, y = r.threw ? 0 : r.results.filter((e) => e.success).length, b = s.length + _, x = a + v, S = v > 0;
|
|
18337
18370
|
if (y > 0) {
|
|
18338
|
-
let e =
|
|
18371
|
+
let e = Im(u, r.results);
|
|
18339
18372
|
p?.({
|
|
18340
|
-
kind: y === 1 ?
|
|
18373
|
+
kind: y === 1 ? om.FileMoved : om.FilesMoved,
|
|
18341
18374
|
name: e?.destinationName,
|
|
18342
18375
|
count: y,
|
|
18343
|
-
destinationFolderName:
|
|
18376
|
+
destinationFolderName: vm(o, n)
|
|
18344
18377
|
});
|
|
18345
18378
|
}
|
|
18346
18379
|
if (s.length === 1 && a === 0) {
|
|
18347
18380
|
let [e] = s;
|
|
18348
18381
|
p?.({
|
|
18349
|
-
kind:
|
|
18350
|
-
name:
|
|
18382
|
+
kind: om.FileRenamed,
|
|
18383
|
+
name: _m(e.destinationPath, e.destinationPath),
|
|
18351
18384
|
isFolder: e.nodeType === ke.Folder
|
|
18352
18385
|
});
|
|
18353
18386
|
}
|
|
@@ -18386,7 +18419,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18386
18419
|
onCopyFiles: oe,
|
|
18387
18420
|
cancelCopyMove: A
|
|
18388
18421
|
};
|
|
18389
|
-
},
|
|
18422
|
+
}, qh = ({ filesApi: e, bucket: t, rootLabel: n, bumpRetry: r, onNotification: i }) => {
|
|
18390
18423
|
let [a, o] = L(!1), [s, c] = L(!1);
|
|
18391
18424
|
return {
|
|
18392
18425
|
isUnsharing: a,
|
|
@@ -18398,7 +18431,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18398
18431
|
let r = e.bucket ?? t;
|
|
18399
18432
|
return {
|
|
18400
18433
|
bucket: r,
|
|
18401
|
-
path:
|
|
18434
|
+
path: Mm(e, r, n)
|
|
18402
18435
|
};
|
|
18403
18436
|
});
|
|
18404
18437
|
try {
|
|
@@ -18426,7 +18459,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18426
18459
|
let r = e.bucket ?? t;
|
|
18427
18460
|
return {
|
|
18428
18461
|
bucket: r,
|
|
18429
|
-
path:
|
|
18462
|
+
path: Mm(e, r, n)
|
|
18430
18463
|
};
|
|
18431
18464
|
});
|
|
18432
18465
|
try {
|
|
@@ -18448,18 +18481,18 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18448
18481
|
r
|
|
18449
18482
|
])
|
|
18450
18483
|
};
|
|
18451
|
-
},
|
|
18452
|
-
let t = e.slice(0,
|
|
18484
|
+
}, Jh = 5, Yh = (e) => e.error ? `${e.path} (${e.error})` : e.path, Xh = (e) => {
|
|
18485
|
+
let t = e.slice(0, Jh);
|
|
18453
18486
|
return {
|
|
18454
|
-
names: t.map(
|
|
18487
|
+
names: t.map(Yh),
|
|
18455
18488
|
restCount: e.length - t.length
|
|
18456
18489
|
};
|
|
18457
|
-
},
|
|
18490
|
+
}, Zh = (e, t) => `${e}${t}/`, Qh = (e) => /\.zip$/i.test(e), $h = (e) => {
|
|
18458
18491
|
let [t] = e;
|
|
18459
|
-
if (!(e.length !== 1 || t == null)) return
|
|
18460
|
-
},
|
|
18492
|
+
if (!(e.length !== 1 || t == null)) return Qh(t.fileContent.name) && !Qh(t.name) ? t : void 0;
|
|
18493
|
+
}, eg = ({ filesApi: e, bucket: t, rootLabel: n, activeTab: r, cache: i, sharedRootMetaRef: a, invalidateFolders: o, bumpRetry: s, onNotification: c }) => {
|
|
18461
18494
|
let [l, u] = L(null), d = I(null), f = M((r, i, a) => {
|
|
18462
|
-
let l =
|
|
18495
|
+
let l = Am(a, n);
|
|
18463
18496
|
u({
|
|
18464
18497
|
files: [{
|
|
18465
18498
|
id: `${Date.now()}-archive`,
|
|
@@ -18469,7 +18502,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18469
18502
|
isOpen: !0
|
|
18470
18503
|
}), (async () => {
|
|
18471
18504
|
try {
|
|
18472
|
-
let { results: n } = await e.uploadArchive(r, t,
|
|
18505
|
+
let { results: n } = await e.uploadArchive(r, t, Zh(l, i)), a = n.filter((e) => e.success).length, o = n.filter((e) => !e.success), s = o.length, { names: u, restCount: d } = Xh(o);
|
|
18473
18506
|
n.length > 0 && a === 0 ? c?.({
|
|
18474
18507
|
variant: R.Error,
|
|
18475
18508
|
reason: $.UploadArchiveFailed,
|
|
@@ -18502,7 +18535,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18502
18535
|
return {
|
|
18503
18536
|
onUploadFiles: M((l, p) => {
|
|
18504
18537
|
if (l.length === 0) return;
|
|
18505
|
-
let m =
|
|
18538
|
+
let m = $h(l);
|
|
18506
18539
|
if (m != null) {
|
|
18507
18540
|
f(m.fileContent, m.name, p);
|
|
18508
18541
|
return;
|
|
@@ -18516,7 +18549,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18516
18549
|
})),
|
|
18517
18550
|
isOpen: !0
|
|
18518
18551
|
});
|
|
18519
|
-
let g =
|
|
18552
|
+
let g = Am(p, n), { bucket: v, path: y } = r === z.Shared ? Dm(g, a.current, t) : {
|
|
18520
18553
|
bucket: t,
|
|
18521
18554
|
path: g
|
|
18522
18555
|
}, b = new Set((i.get(g) ?? []).map((e) => e.name.toLowerCase()));
|
|
@@ -18525,31 +18558,31 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18525
18558
|
for (; t < l.length;) {
|
|
18526
18559
|
let n = t++, a = l[n];
|
|
18527
18560
|
if (h.signal.aborted) {
|
|
18528
|
-
u((e) =>
|
|
18561
|
+
u((e) => zm(e, n, _.Cancelled));
|
|
18529
18562
|
continue;
|
|
18530
18563
|
}
|
|
18531
|
-
u((e) =>
|
|
18564
|
+
u((e) => zm(e, n, {
|
|
18532
18565
|
status: _.Uploading,
|
|
18533
18566
|
percent: 0
|
|
18534
18567
|
}));
|
|
18535
|
-
let o = b.has(a.name.toLowerCase()) ?
|
|
18568
|
+
let o = b.has(a.name.toLowerCase()) ? im.Overwrite : im.CreateOnly;
|
|
18536
18569
|
try {
|
|
18537
18570
|
await e.uploadFile(v, `${y}${a.name}`, a.fileContent, {
|
|
18538
18571
|
signal: h.signal,
|
|
18539
18572
|
uploadMode: o,
|
|
18540
18573
|
onProgress: (e) => {
|
|
18541
|
-
u((t) =>
|
|
18574
|
+
u((t) => zm(t, n, {
|
|
18542
18575
|
status: _.Uploading,
|
|
18543
18576
|
percent: e
|
|
18544
18577
|
}));
|
|
18545
18578
|
}
|
|
18546
|
-
}), u((e) =>
|
|
18579
|
+
}), u((e) => zm(e, n, {
|
|
18547
18580
|
status: _.Completed,
|
|
18548
18581
|
percent: 100
|
|
18549
18582
|
})), r += 1;
|
|
18550
18583
|
} catch {
|
|
18551
18584
|
let e = h.signal.aborted ? _.Cancelled : _.Failed;
|
|
18552
|
-
e === _.Failed && (i += 1), u((t) =>
|
|
18585
|
+
e === _.Failed && (i += 1), u((t) => zm(t, n, e));
|
|
18553
18586
|
}
|
|
18554
18587
|
}
|
|
18555
18588
|
};
|
|
@@ -18578,7 +18611,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18578
18611
|
f(e, t, n);
|
|
18579
18612
|
}, [f]),
|
|
18580
18613
|
onValidateUpload: M(async (e, t, n) => {
|
|
18581
|
-
for (let t of e) t.name =
|
|
18614
|
+
for (let t of e) t.name = Uh(t.name);
|
|
18582
18615
|
return { valid: !0 };
|
|
18583
18616
|
}, []),
|
|
18584
18617
|
uploadBatchState: l,
|
|
@@ -18589,14 +18622,14 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18589
18622
|
u(null);
|
|
18590
18623
|
}, [])
|
|
18591
18624
|
};
|
|
18592
|
-
},
|
|
18593
|
-
let g = c ??
|
|
18625
|
+
}, tg = ({ filesApi: e, bucket: t, rootLabel: n = "My files", activeTab: r = z.MyFiles, onNotification: i, onOperationSuccess: a, forbiddenSymbolsRegExp: o, variant: s = h.Attach, actionProfile: c, labels: l, locale: u, disabledNewButtonTooltip: d, downloadDestination: f, buildValidationErrorMessage: p }) => {
|
|
18626
|
+
let g = c ?? mm(s), _ = Wh({
|
|
18594
18627
|
filesApi: e,
|
|
18595
18628
|
bucket: t,
|
|
18596
18629
|
rootLabel: n,
|
|
18597
18630
|
activeTab: r,
|
|
18598
18631
|
onNotification: i
|
|
18599
|
-
}), v =
|
|
18632
|
+
}), v = eg({
|
|
18600
18633
|
filesApi: e,
|
|
18601
18634
|
bucket: t,
|
|
18602
18635
|
rootLabel: n,
|
|
@@ -18606,7 +18639,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18606
18639
|
invalidateFolders: _.invalidateFolders,
|
|
18607
18640
|
bumpRetry: _.bumpRetry,
|
|
18608
18641
|
onNotification: i
|
|
18609
|
-
}), y =
|
|
18642
|
+
}), y = Kh({
|
|
18610
18643
|
filesApi: e,
|
|
18611
18644
|
bucket: t,
|
|
18612
18645
|
rootLabel: n,
|
|
@@ -18623,27 +18656,27 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18623
18656
|
onOperationSuccess: a,
|
|
18624
18657
|
downloadDestination: f,
|
|
18625
18658
|
forbiddenSymbolsRegExp: o
|
|
18626
|
-
}), b =
|
|
18659
|
+
}), b = qh({
|
|
18627
18660
|
filesApi: e,
|
|
18628
18661
|
bucket: t,
|
|
18629
18662
|
rootLabel: n,
|
|
18630
18663
|
bumpRetry: _.bumpRetry,
|
|
18631
18664
|
onNotification: i
|
|
18632
|
-
}), x =
|
|
18665
|
+
}), x = Gh({
|
|
18633
18666
|
filesApi: e,
|
|
18634
18667
|
bucket: t,
|
|
18635
18668
|
rootLabel: n,
|
|
18636
18669
|
onNotification: i
|
|
18637
|
-
}), S =
|
|
18670
|
+
}), S = bm(_.currentFolder), C = F(() => r === z.Organization || r === z.Shared && _.folderPath === "" ? !1 : S, [
|
|
18638
18671
|
r,
|
|
18639
18672
|
_.folderPath,
|
|
18640
18673
|
S
|
|
18641
|
-
]), w = F(() => r === z.Shared ?
|
|
18674
|
+
]), w = F(() => r === z.Shared ? fm : dm, [r]), T = F(() => {
|
|
18642
18675
|
let e = {}, t = (t) => {
|
|
18643
18676
|
let n = l[t];
|
|
18644
18677
|
n != null && (e[t] = n);
|
|
18645
18678
|
};
|
|
18646
|
-
return t(qe.Download), r === z.MyFiles ? (t(qe.Delete), C && (t(qe.Rename),
|
|
18679
|
+
return t(qe.Download), r === z.MyFiles ? (t(qe.Delete), C && (t(qe.Rename), Sm(g) && (t(qe.Copy), t(qe.Move), t(qe.Duplicate))), Cm(g) && t(qe.RemoveAccess)) : r === z.Shared && Cm(g) && t(qe.Unshare), g === m.Full && t(qe.Info), e;
|
|
18647
18680
|
}, [
|
|
18648
18681
|
r,
|
|
18649
18682
|
C,
|
|
@@ -18707,7 +18740,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18707
18740
|
disabledNewButtonTooltip: d,
|
|
18708
18741
|
visibleColumns: w,
|
|
18709
18742
|
dateLocale: u,
|
|
18710
|
-
dateOptions:
|
|
18743
|
+
dateOptions: um,
|
|
18711
18744
|
actionLabels: T,
|
|
18712
18745
|
sharedWithMeIds: _.sharedWithMeIds,
|
|
18713
18746
|
sharedByMePaths: _.sharedByMePaths,
|
|
@@ -18721,30 +18754,30 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18721
18754
|
clearMetadata: x.clearMetadata,
|
|
18722
18755
|
isAnyOperationInProgress: E
|
|
18723
18756
|
};
|
|
18724
|
-
},
|
|
18757
|
+
}, ng = [
|
|
18725
18758
|
z.MyFiles,
|
|
18726
18759
|
z.Shared,
|
|
18727
18760
|
z.Organization
|
|
18728
|
-
],
|
|
18761
|
+
], rg = (e, t, n, r) => {
|
|
18729
18762
|
let i = M((e) => r == null || r.includes(e), [r]), a = F(() => n?.filter((e) => i(e.id)).flatMap(({ id: e, label: t, disabled: n }) => typeof t == "string" ? [{
|
|
18730
18763
|
id: e,
|
|
18731
18764
|
label: t,
|
|
18732
18765
|
disabled: n
|
|
18733
18766
|
}] : []), [n, i]);
|
|
18734
18767
|
return N(() => {
|
|
18735
|
-
i(e) || t(
|
|
18768
|
+
i(e) || t(ng.find((e) => i(e)) ?? z.MyFiles);
|
|
18736
18769
|
}, [
|
|
18737
18770
|
i,
|
|
18738
18771
|
e,
|
|
18739
18772
|
t
|
|
18740
18773
|
]), { tabs: a };
|
|
18741
|
-
},
|
|
18774
|
+
}, ig = "custom_app", ag = (e) => !!e && e.id === ig, og = (e) => !!e && (!!e.id?.endsWith("quickapps2") || e.displayName === "Quick app 2.0"), sg = () => {
|
|
18742
18775
|
try {
|
|
18743
18776
|
return Intl.DateTimeFormat().resolvedOptions().timeZone || void 0;
|
|
18744
18777
|
} catch {
|
|
18745
18778
|
return;
|
|
18746
18779
|
}
|
|
18747
|
-
},
|
|
18780
|
+
}, cg = (e) => {
|
|
18748
18781
|
let t = e.trim();
|
|
18749
18782
|
if (!t || !/^https?:\/\//.test(t)) return !1;
|
|
18750
18783
|
try {
|
|
@@ -18752,39 +18785,39 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18752
18785
|
} catch {
|
|
18753
18786
|
return !1;
|
|
18754
18787
|
}
|
|
18755
|
-
},
|
|
18788
|
+
}, lg = (e) => {
|
|
18756
18789
|
let t = e.trim();
|
|
18757
18790
|
if (t) try {
|
|
18758
18791
|
return JSON.parse(t);
|
|
18759
18792
|
} catch {
|
|
18760
18793
|
return;
|
|
18761
18794
|
}
|
|
18762
|
-
},
|
|
18795
|
+
}, ug = ["rate_endpoint", "configuration_endpoint"], dg = (e) => {
|
|
18763
18796
|
let t = e.trim();
|
|
18764
18797
|
if (!t) return !0;
|
|
18765
18798
|
try {
|
|
18766
18799
|
let e = JSON.parse(t);
|
|
18767
18800
|
if (typeof e != "object" || !e || Array.isArray(e)) return !1;
|
|
18768
18801
|
let n = Object.keys(e);
|
|
18769
|
-
return n.length > 0 && n.every((e) =>
|
|
18802
|
+
return n.length > 0 && n.every((e) => ug.includes(e));
|
|
18770
18803
|
} catch {
|
|
18771
18804
|
return !1;
|
|
18772
18805
|
}
|
|
18773
|
-
},
|
|
18774
|
-
let t = e.indexOf(
|
|
18806
|
+
}, fg = "/external_services/", pg = (e) => {
|
|
18807
|
+
let t = e.indexOf(fg);
|
|
18775
18808
|
if (t === -1) return null;
|
|
18776
18809
|
let n = e.slice(0, t), r = e.slice(t + 19);
|
|
18777
18810
|
return !n || !r ? null : {
|
|
18778
18811
|
appId: n,
|
|
18779
18812
|
serviceName: r
|
|
18780
18813
|
};
|
|
18781
|
-
},
|
|
18814
|
+
}, mg = (e, t) => `${e}${fg}${t}`, hg = (e) => {
|
|
18782
18815
|
try {
|
|
18783
18816
|
return decodeURIComponent(e);
|
|
18784
18817
|
} catch {
|
|
18785
18818
|
return e;
|
|
18786
18819
|
}
|
|
18787
|
-
},
|
|
18820
|
+
}, gg = {
|
|
18788
18821
|
settings: "Settings",
|
|
18789
18822
|
savedNotification: "Chat settings have been saved",
|
|
18790
18823
|
responseFormatLabel: "Response format",
|
|
@@ -18800,11 +18833,11 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18800
18833
|
temperatureHint: "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.",
|
|
18801
18834
|
saveLabel: "Apply changes",
|
|
18802
18835
|
saveDisabledTooltip: "Please select a response format"
|
|
18803
|
-
},
|
|
18836
|
+
}, _g = (e) => (e ?? "").toLowerCase().replace(/[^a-z]/g, "") === "plaintext" ? C.PlainText : C.Markdown, vg = (e) => {
|
|
18804
18837
|
let t = F(() => ({
|
|
18805
|
-
...
|
|
18838
|
+
...gg,
|
|
18806
18839
|
...e.labels
|
|
18807
|
-
}), [e.labels]), { onSaved: n } = e, r = e.mode === "local" ? e.values.responseFormat :
|
|
18840
|
+
}), [e.labels]), { onSaved: n } = e, r = e.mode === "local" ? e.values.responseFormat : _g(e.conversation.responseFormat), i = e.mode === "local" ? e.values.systemPrompt : e.conversation.prompt ?? "", a = e.mode === "local" ? e.values.temperature : e.conversation.temperature ?? .5, o = M((t) => {
|
|
18808
18841
|
e.mode === "local" ? e.onValuesChange({
|
|
18809
18842
|
responseFormat: t.responseFormat ?? e.values.responseFormat,
|
|
18810
18843
|
systemPrompt: t.systemPrompt ?? e.values.systemPrompt,
|
|
@@ -18852,7 +18885,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18852
18885
|
i,
|
|
18853
18886
|
a
|
|
18854
18887
|
]);
|
|
18855
|
-
},
|
|
18888
|
+
}, yg = (e = !0, t = !0) => {
|
|
18856
18889
|
let [n, r] = L(!1), [i, a] = L([]), o = I(0), s = I(e), c = I(t);
|
|
18857
18890
|
P(() => {
|
|
18858
18891
|
s.current = e, c.current = t, t || (o.current = 0, r(!1));
|
|
@@ -18881,20 +18914,20 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18881
18914
|
pendingFiles: i,
|
|
18882
18915
|
onFilesConsumed: l
|
|
18883
18916
|
};
|
|
18884
|
-
},
|
|
18885
|
-
let [e, t] = L(
|
|
18917
|
+
}, bg = () => typeof window < "u" ? window.innerWidth : 1024, xg = () => {
|
|
18918
|
+
let [e, t] = L(bg);
|
|
18886
18919
|
return N(() => {
|
|
18887
18920
|
if (typeof window > "u") return;
|
|
18888
18921
|
let e = () => t(window.innerWidth);
|
|
18889
18922
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
18890
18923
|
}, []), e;
|
|
18891
|
-
},
|
|
18892
|
-
let t =
|
|
18924
|
+
}, Sg = (e) => {
|
|
18925
|
+
let t = xg();
|
|
18893
18926
|
return Math.max(0, t - e);
|
|
18894
|
-
},
|
|
18927
|
+
}, Cg = (e) => e.map((e) => e === je.Edit ? Xe.Edit : Xe.View), wg = (e, t) => {
|
|
18895
18928
|
let n = new URL(e, t);
|
|
18896
18929
|
return `${t}${n.pathname}${n.search}${n.hash}`;
|
|
18897
|
-
},
|
|
18930
|
+
}, Tg = (e, t, n = window.location.origin) => {
|
|
18898
18931
|
let [r, i] = L(), [a, o] = L(!0), [s, c] = L(null), l = I(0), u = M(async (r = [Xe.View]) => {
|
|
18899
18932
|
let a = ++l.current;
|
|
18900
18933
|
o(!0), c(null);
|
|
@@ -18904,9 +18937,9 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18904
18937
|
access: r
|
|
18905
18938
|
} });
|
|
18906
18939
|
l.current === a && i({
|
|
18907
|
-
url:
|
|
18940
|
+
url: wg(o.url, n),
|
|
18908
18941
|
expiresInDays: o.expiresInDays,
|
|
18909
|
-
access:
|
|
18942
|
+
access: Cg(o.access)
|
|
18910
18943
|
});
|
|
18911
18944
|
} catch (e) {
|
|
18912
18945
|
l.current === a && c(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create share link"));
|
|
@@ -18928,18 +18961,18 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18928
18961
|
u(e);
|
|
18929
18962
|
}, [u])
|
|
18930
18963
|
};
|
|
18931
|
-
},
|
|
18964
|
+
}, Eg = (e) => e.type === "boolean" || e.type == null && typeof e.default == "boolean", Dg = (e) => {
|
|
18932
18965
|
let t = e.replace(/[_-]+/g, " ").trim();
|
|
18933
18966
|
return t.length === 0 ? e : t.charAt(0).toUpperCase() + t.slice(1);
|
|
18934
|
-
},
|
|
18967
|
+
}, Og = (e) => {
|
|
18935
18968
|
let t = e?.properties;
|
|
18936
|
-
return t == null ? [] : Object.entries(t).filter(([, e]) =>
|
|
18969
|
+
return t == null ? [] : Object.entries(t).filter(([, e]) => Eg(e)).map(([e, t]) => ({
|
|
18937
18970
|
id: e,
|
|
18938
|
-
label: typeof t.title == "string" && t.title.length > 0 ? t.title :
|
|
18971
|
+
label: typeof t.title == "string" && t.title.length > 0 ? t.title : Dg(e),
|
|
18939
18972
|
defaultValue: t.default === !0
|
|
18940
18973
|
}));
|
|
18941
|
-
},
|
|
18942
|
-
let { selectedItemId: t, selectedDeploymentConfiguration: n, toolIcon: r } = e, i = F(() =>
|
|
18974
|
+
}, kg = (e) => {
|
|
18975
|
+
let { selectedItemId: t, selectedDeploymentConfiguration: n, toolIcon: r } = e, i = F(() => Og(n), [n]), a = F(() => Object.fromEntries(i.map(({ id: e, defaultValue: t }) => [e, t])), [i]), [o, s] = L(a), c = JSON.stringify(a), l = I(a);
|
|
18943
18976
|
l.current = a, N(() => {
|
|
18944
18977
|
s(l.current);
|
|
18945
18978
|
}, [t, c]);
|
|
@@ -18973,7 +19006,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18973
19006
|
toolConfigurationValue: F(() => Object.fromEntries(i.map(({ id: e }) => [e, o[e] ?? !1])), [i, o]),
|
|
18974
19007
|
restoreToolConfiguration: d
|
|
18975
19008
|
};
|
|
18976
|
-
},
|
|
19009
|
+
}, Ag = (e) => e instanceof Error ? e : Error(String(e)), jg = (e, t = !0) => {
|
|
18977
19010
|
let [n, r] = L(), [i, a] = L(t), [o, s] = L();
|
|
18978
19011
|
return N(() => {
|
|
18979
19012
|
if (!t) {
|
|
@@ -18988,7 +19021,7 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
18988
19021
|
r(t);
|
|
18989
19022
|
} catch (e) {
|
|
18990
19023
|
if (n) return;
|
|
18991
|
-
s(
|
|
19024
|
+
s(Ag(e));
|
|
18992
19025
|
} finally {
|
|
18993
19026
|
n || a(!1);
|
|
18994
19027
|
}
|
|
@@ -19002,4 +19035,4 @@ var Qm = (e) => !qm.has(e), $m = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
19002
19035
|
};
|
|
19003
19036
|
};
|
|
19004
19037
|
//#endregion
|
|
19005
|
-
export { Kt as AttachmentValidationErrorReason, Mn as AuthenticationType,
|
|
19038
|
+
export { Kt as AttachmentValidationErrorReason, Mn as AuthenticationType, dm as COLUMNS_WITHOUT_AUTHOR, fm as COLUMNS_WITH_AUTHOR, pm as CORE_PERMISSION_MAP, Kc as CatalogPrimaryActionType, Xt as ConversationExportMode, c as ConversationTransferErrorCode, p as ConversationTransferWarningCode, um as DATE_OPTIONS, fp as DEFAULT_MAX_ARCHIVE_BYTES, m as DialFileManagerActionProfile, h as DialFileManagerVariant, im as DialFilesApiUploadMode, zh as DownloadDestinationType, Qt as EXPORT_APP_NAME, Zt as ExportFileNameKind, nl as FavoriteEntityType, $ as FileManagerNotificationReason, am as FileNameValidationErrorReason, om as FileOperationKind, Oc as McpResourceKind, vd as OAuthResourceKind, lm as PATH_SEPARATOR_REGEXP, nf as PROMPT_CONTENT_MAX_LENGTH, rf as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, tf as PROMPT_DESCRIPTION_MAX_LENGTH, ef as PROMPT_NAME_MAX_LENGTH, sc as PUBLIC_SKILL_BUCKET, Qd as PromptFieldError, Gr as PromptSource, cm as RESERVED_MARKER_NAME, Rf as RecipientsCountStatus, Hs as SKILL_FILE_UPLOAD_MAX_BYTES, dc as SKILL_LISTING_MAX_PAGES, uc as SKILL_LISTING_PAGE_SIZE, Vs as SKILL_MANIFEST_FILE, lc as SKILL_MANIFEST_MAX_BYTES, Ws as SKILL_UPLOAD_MAX_FILES, Us as SKILL_UPLOAD_MAX_TOTAL_BYTES, Ef as SkillEditorLoadState, Ff as SkillPreviewErrorKind, oc as SkillSource, Cd as TOOLSET_REDIRECT_STATE_KEY, hd as ToolsetAuthStatus, md as ToolsetAuthTypes, gd as ToolsetCredentialsLevel, Gd as ToolsetLoginOutcomeType, Sd as ToolsetOAuthCallbackQuery, xd as ToolsetOAuthChannelControlType, bd as ToolsetOAuthFailureReason, yd as ToolsetOAuthInitiationResultType, Q as ToolsetOAuthResultType, sm as UPLOAD_CONCURRENCY, df as UnsupportedTriggerReason, _d as WithLogin, Nh as annotationToDisplayAttachment, Eh as annotationToPdfCanvasContent, ff as apSchedulerDayToJsDay, nr as appendLocaleCode, Mh as attachmentDtoToDisplayAttachment, Ph as attachmentDtosToDisplayAttachments, _p as attachmentToDto, vp as attachmentsToDtos, ar as buildAdditionalLocaleOptions, Fu as buildAnnouncementSignature, Nc as buildApplicationMcpUrl, Dn as buildChatCompletionsUrl, Ic as buildConnectApi, kn as buildDeploymentConnectApi, mg as buildExternalServiceScopeId, Lm as buildFromCache, Jd as buildPromptExportEnvelope, Zd as buildPromptExportFileName, Xr as buildPromptOverview, lf as buildPromptPath, On as buildResponsesUrl, Em as buildSharedItemVirtualPath, Tc as buildSkillContentTree, ac as buildSkillFilesPayload, Zs as buildSkillManifest, ic as buildSkillManifestForSubmit, Qs as buildSkillManifestFromFrontmatter, Sc as buildSkillOverview, pd as buildToolsetAuthorizeUrl, Mc as buildToolsetMcpUrl, mh as clearAttachmentCache, rr as composeLocalePayload, Ru as createChatStreamApi, _t as createCsrfMiddleware, Qu as createDeploymentChangedMessage, Gm as createFilesApiClient, yp as createMessagePair, Cn as createPublishApiClient, xt as createUnauthorizedMiddleware, Km as createUploadFileWithProgress, Qn as decodeToolsetId, ir as decomposeLocalizedFields, mm as deriveActionProfile, Wc as deriveAvailableTabIds, Vf as deriveConversationRowActionState, Uc as deriveFavoriteItems, Tm as dialCorePathToRelative, Ih as dialFileToAttachment, Lh as dialFilesToAttachments, Rh as dialFolderPathToAttachment, kt as downloadAttachment, Ud as emitToolsetLoginSuccess, An as encodeDeploymentId, Zn as encodeToolsetId, Bm as fetchByTab, Vm as fetchForSearch, Vc as filterCatalogItemsBySelector, Hc as filterHiddenOwnedItems, jn as findDeploymentByIdOrReference, xm as findDialFileByPath, Im as findFirstSuccessfulCopyMoveItem, ym as findFolderByVirtualPath, Hu as formatAppVersion, sr as formatCalendarDate, Yt as formatDateYM, Jt as formatDateYMD, vm as formatOperationFolderName, vn as formatQuotedNameList, gt as getApiErrorDetails, ht as getApiErrorMessage, mt as getApiErrorStatus, sg as getBrowserTimezone, wp as getConversationPath, Gf as getConversationSource, hg as getExternalServiceFallbackName, ed as getLastDeploymentId, nd as getLastUserMessageToolConfiguration, Xu as getModelIdFromConversationId, ie as getParentFolderPath, sd as getQuickAppConversationStarters, cf as getRemainingCharacters, Sp as getStarterConversationText, cd as getStarterPopulateText, Cp as getStarterSubmitText, ld as getStartersFromSchema, Zu as getTimeOfDayGreeting, Td as getToolsetOAuthChannelName, ud as getToolsetRedirectUri, uh as getUrlFileName, _m as getVirtualPathName, bp as hasActiveToolConfig, Pu as hasAnnouncementContent, yh as hasAttachmentTextSource, bm as hasDialFileWritePermission, hm as hasForbiddenNameSymbols, Nu as hasStructuredAnnouncement, St as includesIgnoreCase, Pd as initiateOAuthLogin, Kp as isAwaitingGenerationResume, pt as isConversationNotFoundError, Sm as isCopyMoveDuplicateAllowed, ag as isCustomAppSchema, Vt as isDialFileAcceptType, Tt as isDialFileId, Ot as isDownloadableAttachment, dh as isExternalSourcePreviewable, xp as isMessageChanged, $u as isMessageStreaming, Zr as isOrganisationPromptItem, $n as isPublicToolsetId, og as isQuickAppSchema, Cm as isShareActionsAllowed, cg as isValidAbsoluteUrl, dg as isValidFeaturesData, Ys as isValidSkillRelativePath, pf as jsDayToApSchedulerDay, Fm as mapCorePermissions, Mr as mapDeploymentDetailsDtoToEntityDetails, qn as mapDeploymentLimitsDtoToCatalogLimits, Jn as mapDeploymentLimitsToInput, Ur as mapDeploymentToCatalogItem, Fr as mapDeploymentToolsetCredentials, wr as mapEntityDetailsToCatalogDetails, Um as mapFileMetadataToDialFile, vf as mapFormValuesToCreateBody, yf as mapFormValuesToUpdateBody, Qr as mapPromptToCatalogItem, Bc as mapPublishConversationResultDto, zc as mapPublishHistoryEntryDto, Cf as mapScheduledTaskDtoToFormValues, Hm as mapSearchItem, hc as mapSkillToCatalogItem, xr as mapToolsetCredentials, Wr as mapToolsetToCatalogItem, Rm as mergeCreatedFolderIntoCache, td as messageHasStages, Wt as mimeTypesToAttachmentExtensionLabels, Ht as mimeTypesToDialFileAcceptTypes, Ut as mimeTypesToFileAccept, nc as nameFromPath, Nd as navigateToolsetOAuthPopup, rd as normalizeResponseFormat, Xs as normalizeSkillName, gm as normalizeVirtualPath, qm as openAnnotationAttachment, Md as openToolsetOAuthPopup, or as padTwoDigits, pg as parseExternalServiceUrl, lg as parseFeaturesData, wm as parseNewFolderVirtualPath, qr as parsePromptResourceUrl, ec as parseSkillManifest, $c as parseSkillManifestDocument, fc as parseSkillResourceUrl, Nm as prepareCopyItems, Bh as prepareDownloadDestination, Pm as prepareMoveRenameItems, Ec as readSkillFileBytes, Dc as readSkillManifest, Gc as reconcileFilterTopics, Dh as referenceAttachmentToPdfCanvasContent, qc as resolveCatalogPrimaryAction, wh as resolveCodeCanvasContent, Vr as resolveDeploymentFolder, Mm as resolveDialFileApiPath, Dt as resolveDialFileBucketAndPath, Th as resolveHtmlCanvasContent, bh as resolveImageCanvasContent, Ah as resolveJsonCanvasContent, tr as resolveLocalizedText, Sh as resolveMarkdownCanvasContent, Fc as resolveMcpResourceKind, kh as resolveOoxmlCanvasContent, Dm as resolveOwnerCoords, Oh as resolvePdfCanvasContent, Et as resolveRelativeDialFilePath, xc as resolveSkillFileDownloadPath, yc as resolveSkillManifestFileId, xh as resolveTextCanvasContent, jh as resolveVisualizerCanvasContent, H as safeDecodeURI, Ct as safeDecodeURIComponent, Au as sanitizeAnnouncementHtml, ju as sanitizeAnnouncementMessageHtml, Uh as sanitizeFileName, Vu as sanitizeFooterHtml, Yd as serializePromptExport, zu as shouldWatchForDisplayNameUpdate, rc as skillFileBytesToBlob, Tf as skillFileToAttachment, Vh as splitFileNameExtension, wt as stripSurroundingSlashes, Wd as subscribeToolsetLoginSuccess, er as toBaseLocale, id as toOverlayMessages, Rc as toPublishEntityType, Sn as toPublishRuleDto, Hh as trimFileNameToByteLimit, tc as unpackSkillArchive, zm as updateEntry, Hf as useActiveConversationSync, Uf as useAsyncConfirmDialog, Mt as useAttachmentAction, Zf as useAttachmentUpload, qt as useAttachmentValidation, tl as useCatalogItemDetails, vg as useChatSettingsFormConfig, gp as useConversationExport, Tp as useConversationHandlers, Hp as useConversationImport, Wf as useConversationLookupMaps, Kf as useConversationPanelItems, Gp as useConversationScroll, rm as useConversationSources, tm as useConversationStream, Wh as useDialFileListing, tg as useDialFileManager, rg as useDialFileManagerTabConfig, Gh as useDialFileMetadata, Kh as useDialFileMutations, qh as useDialFileSharing, eg as useDialFileUploadBatch, rl as useFavoriteEntitiesState, qf as useImportFilePicker, Bd as useOAuthCallbackCompletion, yg as usePageFileDrag, Sg as usePanelMaxWidth, uf as usePromptsState, cl as usePublishFolders, Tg as useShareLink, Bf as useShareRecipientsCount, jf as useSkillEditorLoad, Nf as useSkillEditorSubmit, Pf as useSkillFileActions, If as useSkillFilePreview, Lf as useSkillsState, kg as useToolsMenu, Kd as useToolsetLogin, jg as useUsageData, xg as useViewportWidth, sf as validatePromptContent, of as validatePromptDescription, af as validatePromptName, wf as validateSkillFileBatch, Am as virtualPathToApiPath, Ad as waitForToolsetOAuthResult };
|