@arbidocs/react 0.5.104 → 0.5.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/annotations/freeze/index.cjs +14 -14
- package/dist/annotations/freeze/index.js +3 -3
- package/dist/artifacts/index.cjs +34 -34
- package/dist/artifacts/index.js +6 -6
- package/dist/bundle-IC65W2AO.cjs +14 -0
- package/dist/{bundle-DCWPYNGD.cjs.map → bundle-IC65W2AO.cjs.map} +1 -1
- package/dist/bundle-YNOX7VIL.js +5 -0
- package/dist/{bundle-JCKKGEJE.js.map → bundle-YNOX7VIL.js.map} +1 -1
- package/dist/calls/livekit/index.cjs +44 -44
- package/dist/calls/livekit/index.js +5 -5
- package/dist/{chunk-YD25DEMR.cjs → chunk-2YRQJ3DR.cjs} +25 -25
- package/dist/{chunk-YD25DEMR.cjs.map → chunk-2YRQJ3DR.cjs.map} +1 -1
- package/dist/{chunk-LD2SJBXC.js → chunk-7NKF3VUN.js} +5 -5
- package/dist/{chunk-LD2SJBXC.js.map → chunk-7NKF3VUN.js.map} +1 -1
- package/dist/{chunk-RC42YRVA.js → chunk-AXKIOI2U.js} +3 -3
- package/dist/{chunk-RC42YRVA.js.map → chunk-AXKIOI2U.js.map} +1 -1
- package/dist/{chunk-TTHJNRLY.cjs → chunk-C72FSQUE.cjs} +6 -6
- package/dist/{chunk-TTHJNRLY.cjs.map → chunk-C72FSQUE.cjs.map} +1 -1
- package/dist/{chunk-NNAJLY6B.js → chunk-DPR7LVZO.js} +3 -3
- package/dist/{chunk-NNAJLY6B.js.map → chunk-DPR7LVZO.js.map} +1 -1
- package/dist/{chunk-LBAG7KL7.cjs → chunk-FQVNZCTD.cjs} +3 -3
- package/dist/{chunk-LBAG7KL7.cjs.map → chunk-FQVNZCTD.cjs.map} +1 -1
- package/dist/{chunk-524AFWK7.cjs → chunk-K7UUWND5.cjs} +7 -6
- package/dist/chunk-K7UUWND5.cjs.map +1 -0
- package/dist/{chunk-7C77IBQZ.cjs → chunk-NDIKMOBJ.cjs} +3 -3
- package/dist/{chunk-7C77IBQZ.cjs.map → chunk-NDIKMOBJ.cjs.map} +1 -1
- package/dist/{chunk-A2XSLTIP.js → chunk-NIKPG4PW.js} +3 -3
- package/dist/{chunk-A2XSLTIP.js.map → chunk-NIKPG4PW.js.map} +1 -1
- package/dist/{chunk-7KZS22EK.js → chunk-OSFKAJT2.js} +5 -5
- package/dist/{chunk-7KZS22EK.js.map → chunk-OSFKAJT2.js.map} +1 -1
- package/dist/{chunk-B6I2HRRF.cjs → chunk-PC4O3JDV.cjs} +3 -3
- package/dist/{chunk-B6I2HRRF.cjs.map → chunk-PC4O3JDV.cjs.map} +1 -1
- package/dist/{chunk-GR7CZEJJ.js → chunk-UW2SGTI5.js} +3 -3
- package/dist/{chunk-GR7CZEJJ.js.map → chunk-UW2SGTI5.js.map} +1 -1
- package/dist/{chunk-A6HUB6PX.js → chunk-VAO76OJO.js} +5 -4
- package/dist/chunk-VAO76OJO.js.map +1 -0
- package/dist/{chunk-6TUNWGRJ.cjs → chunk-XOS7ISIR.cjs} +5 -5
- package/dist/{chunk-6TUNWGRJ.cjs.map → chunk-XOS7ISIR.cjs.map} +1 -1
- package/dist/{chunk-YNKV4MN6.cjs → chunk-YUESCKE2.cjs} +19 -7
- package/dist/chunk-YUESCKE2.cjs.map +1 -0
- package/dist/{chunk-V73GLDHD.js → chunk-ZGGDH54R.js} +18 -6
- package/dist/chunk-ZGGDH54R.js.map +1 -0
- package/dist/document-tools/core.cjs +100 -100
- package/dist/document-tools/core.d.cts +2 -1
- package/dist/document-tools/core.d.ts +2 -1
- package/dist/document-tools/core.js +6 -6
- package/dist/document-tools/index.cjs +103 -103
- package/dist/document-tools/index.js +8 -8
- package/dist/index.cjs +1630 -1578
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +135 -10
- package/dist/index.d.ts +135 -10
- package/dist/index.js +76 -24
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +40 -40
- package/dist/shell/index.js +5 -5
- package/dist/ui/index.cjs +154 -154
- package/dist/ui/index.js +2 -2
- package/package.json +3 -3
- package/dist/bundle-DCWPYNGD.cjs +0 -14
- package/dist/bundle-JCKKGEJE.js +0 -5
- package/dist/chunk-524AFWK7.cjs.map +0 -1
- package/dist/chunk-A6HUB6PX.js.map +0 -1
- package/dist/chunk-V73GLDHD.js.map +0 -1
- package/dist/chunk-YNKV4MN6.cjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var chunk2IJP73ZG_cjs = require('../../chunk-2IJP73ZG.cjs');
|
|
3
|
+
var chunkPC4O3JDV_cjs = require('../../chunk-PC4O3JDV.cjs');
|
|
5
4
|
require('../../chunk-IU2CJNTB.cjs');
|
|
5
|
+
var chunk2IJP73ZG_cjs = require('../../chunk-2IJP73ZG.cjs');
|
|
6
6
|
var reactPdf = require('react-pdf');
|
|
7
7
|
|
|
8
8
|
async function freezePdfInBrowser(bytes, layer, { assets, password, ...options }) {
|
|
9
9
|
const needsRaster = options.mode === "image" || layer.annotations.some(chunk2IJP73ZG_cjs.isEffectiveRedaction);
|
|
10
|
-
const rasterizer = needsRaster ? await
|
|
10
|
+
const rasterizer = needsRaster ? await chunkPC4O3JDV_cjs.createPdfJsRasterizer(reactPdf.pdfjs, bytes, chunkPC4O3JDV_cjs.browserCanvasFactory(), {
|
|
11
11
|
password,
|
|
12
12
|
documentOptions: {
|
|
13
13
|
cMapUrl: assets?.cMapUrl ?? "/cmaps/",
|
|
@@ -16,48 +16,48 @@ async function freezePdfInBrowser(bytes, layer, { assets, password, ...options }
|
|
|
16
16
|
wasmUrl: assets?.wasmUrl ?? "/wasm/"
|
|
17
17
|
}
|
|
18
18
|
}) : void 0;
|
|
19
|
-
return
|
|
19
|
+
return chunkPC4O3JDV_cjs.freezePdf(bytes, layer, { ...options, rasterizer });
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
Object.defineProperty(exports, "DEFAULT_DPI", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkPC4O3JDV_cjs.DEFAULT_DPI; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "FreezeError", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkPC4O3JDV_cjs.FreezeError; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "MAX_PAGE_PIXELS", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkPC4O3JDV_cjs.MAX_PAGE_PIXELS; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "batesLabel", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkPC4O3JDV_cjs.batesLabel; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "browserCanvasFactory", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkPC4O3JDV_cjs.browserCanvasFactory; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "buildBundle", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkPC4O3JDV_cjs.buildBundle; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "burnMarks", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkPC4O3JDV_cjs.burnMarks; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "createPdfJsRasterizer", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkPC4O3JDV_cjs.createPdfJsRasterizer; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "freezePdf", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkPC4O3JDV_cjs.freezePdf; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "readProvenance", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkPC4O3JDV_cjs.readProvenance; }
|
|
61
61
|
});
|
|
62
62
|
exports.freezePdfInBrowser = freezePdfInBrowser;
|
|
63
63
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createPdfJsRasterizer, browserCanvasFactory, freezePdf } from '../../chunk-
|
|
2
|
-
export { DEFAULT_DPI, FreezeError, MAX_PAGE_PIXELS, batesLabel, browserCanvasFactory, buildBundle, burnMarks, createPdfJsRasterizer, freezePdf, readProvenance } from '../../chunk-
|
|
3
|
-
import { isEffectiveRedaction } from '../../chunk-T3USOSVN.js';
|
|
1
|
+
import { createPdfJsRasterizer, browserCanvasFactory, freezePdf } from '../../chunk-NIKPG4PW.js';
|
|
2
|
+
export { DEFAULT_DPI, FreezeError, MAX_PAGE_PIXELS, batesLabel, browserCanvasFactory, buildBundle, burnMarks, createPdfJsRasterizer, freezePdf, readProvenance } from '../../chunk-NIKPG4PW.js';
|
|
4
3
|
import '../../chunk-PTOP7OHG.js';
|
|
4
|
+
import { isEffectiveRedaction } from '../../chunk-T3USOSVN.js';
|
|
5
5
|
import { pdfjs } from 'react-pdf';
|
|
6
6
|
|
|
7
7
|
async function freezePdfInBrowser(bytes, layer, { assets, password, ...options }) {
|
package/dist/artifacts/index.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkIXE7HCCA_cjs = require('../chunk-IXE7HCCA.cjs');
|
|
4
|
-
var
|
|
5
|
-
var chunk6TUNWGRJ_cjs = require('../chunk-6TUNWGRJ.cjs');
|
|
4
|
+
var chunkXOS7ISIR_cjs = require('../chunk-XOS7ISIR.cjs');
|
|
6
5
|
var chunk3AADNIOK_cjs = require('../chunk-3AADNIOK.cjs');
|
|
7
6
|
var chunkQ2GNEVG2_cjs = require('../chunk-Q2GNEVG2.cjs');
|
|
8
7
|
require('../chunk-N73IMVFF.cjs');
|
|
9
|
-
var
|
|
8
|
+
var chunkNDIKMOBJ_cjs = require('../chunk-NDIKMOBJ.cjs');
|
|
9
|
+
var chunkVOFNX4P6_cjs = require('../chunk-VOFNX4P6.cjs');
|
|
10
|
+
var chunkMXP4O4DI_cjs = require('../chunk-MXP4O4DI.cjs');
|
|
10
11
|
require('../chunk-5NOZDH3F.cjs');
|
|
11
12
|
require('../chunk-S6A6FSG7.cjs');
|
|
12
|
-
var chunkVOFNX4P6_cjs = require('../chunk-VOFNX4P6.cjs');
|
|
13
13
|
var react = require('react');
|
|
14
14
|
var reactQuery = require('@tanstack/react-query');
|
|
15
15
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -275,19 +275,19 @@ function useArtifactText(docId, options) {
|
|
|
275
275
|
...DEFAULT_ARTIFACT_TEXT_RETRY,
|
|
276
276
|
...options?.retry
|
|
277
277
|
};
|
|
278
|
-
const enabled = (options?.enabled ?? true) &&
|
|
278
|
+
const enabled = (options?.enabled ?? true) && chunkNDIKMOBJ_cjs.isDocumentId(docId) && arbi.hasWorkspace;
|
|
279
279
|
const query = reactQuery.useQuery({
|
|
280
280
|
// Under the shared `parsedDoc` key, so a document's invalidation reaches it too.
|
|
281
281
|
queryKey: [...chunkQ2GNEVG2_cjs.arbiQueryKeys.parsedDoc(docId ?? "", "marker"), "artifact-text"],
|
|
282
282
|
queryFn: async () => {
|
|
283
|
-
const { docId: plainId, version } =
|
|
283
|
+
const { docId: plainId, version } = chunkNDIKMOBJ_cjs.parseVersionRef(docId);
|
|
284
284
|
const parsed = await arbi.documents.getParsedContent(
|
|
285
285
|
plainId,
|
|
286
286
|
"marker",
|
|
287
287
|
version ?? void 0
|
|
288
288
|
);
|
|
289
289
|
if (!parsed.chunks?.some((c) => c.content?.trim())) throw new NotParsedYetError();
|
|
290
|
-
return
|
|
290
|
+
return chunkNDIKMOBJ_cjs.flattenChunks(parsed.chunks, { unescape: true });
|
|
291
291
|
},
|
|
292
292
|
enabled,
|
|
293
293
|
retry: (failureCount, error) => !isRefusal(error) && failureCount < attempts,
|
|
@@ -325,17 +325,17 @@ function useArtifactText(docId, options) {
|
|
|
325
325
|
|
|
326
326
|
// src/artifacts/useArtifactSession.ts
|
|
327
327
|
function useArtifactVersions(workspaceId, docId) {
|
|
328
|
-
const plainId = docId ?
|
|
328
|
+
const plainId = docId ? chunkNDIKMOBJ_cjs.parseVersionRef(docId).docId : null;
|
|
329
329
|
const { data: documents } = chunkIXE7HCCA_cjs.useDocuments(workspaceId);
|
|
330
330
|
const listed = react.useMemo(
|
|
331
331
|
() => (documents ?? []).find((d) => d.external_id === plainId),
|
|
332
332
|
[documents, plainId]
|
|
333
333
|
);
|
|
334
|
-
const { data: history } =
|
|
334
|
+
const { data: history } = chunkXOS7ISIR_cjs.useDocumentVersionList(plainId, {
|
|
335
335
|
enabled: !!plainId && documents !== void 0 && !listed
|
|
336
336
|
});
|
|
337
337
|
return react.useMemo(
|
|
338
|
-
() => listed ?
|
|
338
|
+
() => listed ? chunkNDIKMOBJ_cjs.documentVersions(listed) : chunkNDIKMOBJ_cjs.toArtifactVersions(plainId, history),
|
|
339
339
|
[listed, history, plainId]
|
|
340
340
|
);
|
|
341
341
|
}
|
|
@@ -350,7 +350,7 @@ function useSaveArtifactVersion() {
|
|
|
350
350
|
fileName,
|
|
351
351
|
{
|
|
352
352
|
wpType: wpType ?? "artifact",
|
|
353
|
-
versionOf: versionOf ?
|
|
353
|
+
versionOf: versionOf ? chunkNDIKMOBJ_cjs.parseVersionRef(versionOf).docId : void 0,
|
|
354
354
|
configExtId: configId ?? void 0
|
|
355
355
|
}
|
|
356
356
|
);
|
|
@@ -378,7 +378,7 @@ function useArtifactSession(options) {
|
|
|
378
378
|
const [saved, setSaved] = react.useState(null);
|
|
379
379
|
const adopted = saved && saved.forId === hostDocId ? saved : null;
|
|
380
380
|
const docId = adopted?.id ?? hostDocId;
|
|
381
|
-
const isLocal = !
|
|
381
|
+
const isLocal = !chunkNDIKMOBJ_cjs.isDocumentId(docId);
|
|
382
382
|
const [ownCompareId, setOwnCompareId] = react.useState(null);
|
|
383
383
|
const activeCompareId = compareId === void 0 ? ownCompareId : compareId;
|
|
384
384
|
const changeCompare = react.useCallback(
|
|
@@ -394,7 +394,7 @@ function useArtifactSession(options) {
|
|
|
394
394
|
enabled: !!activeCompareId
|
|
395
395
|
});
|
|
396
396
|
const saveVersion = useSaveArtifactVersion();
|
|
397
|
-
const current =
|
|
397
|
+
const current = chunkNDIKMOBJ_cjs.findVersion(versions, docId);
|
|
398
398
|
const save = react.useCallback(
|
|
399
399
|
async (content) => {
|
|
400
400
|
const result = await saveVersion.mutateAsync({
|
|
@@ -410,7 +410,7 @@ function useArtifactSession(options) {
|
|
|
410
410
|
);
|
|
411
411
|
const handleSaved = react.useCallback(
|
|
412
412
|
(result, content) => {
|
|
413
|
-
if (!
|
|
413
|
+
if (!chunkNDIKMOBJ_cjs.isDocumentId(hostDocId) && result.docId)
|
|
414
414
|
setSaved({ forId: hostDocId, id: result.docId, text: content });
|
|
415
415
|
onSaved?.(result, content);
|
|
416
416
|
},
|
|
@@ -439,7 +439,7 @@ function useArtifactSession(options) {
|
|
|
439
439
|
isLoading,
|
|
440
440
|
status,
|
|
441
441
|
versions,
|
|
442
|
-
labelOf: (id) =>
|
|
442
|
+
labelOf: (id) => chunkNDIKMOBJ_cjs.versionLabel(versions, id),
|
|
443
443
|
view: {
|
|
444
444
|
content: session.baseline,
|
|
445
445
|
isEditing: session.isEditing,
|
|
@@ -504,7 +504,7 @@ function useStreamedArtifact({
|
|
|
504
504
|
const started = react.useRef(null);
|
|
505
505
|
const content = artifact?.content ?? "";
|
|
506
506
|
const title = artifact?.title ?? "Draft";
|
|
507
|
-
const passThrough = !!artifact &&
|
|
507
|
+
const passThrough = !!artifact && chunkNDIKMOBJ_cjs.isDocumentId(artifact.doc_ext_id);
|
|
508
508
|
const needsSave = settled && !!artifact && !passThrough && !!content.trim() && !!workspaceId;
|
|
509
509
|
react.useEffect(() => {
|
|
510
510
|
const key = `${attempt}:${content}`;
|
|
@@ -514,7 +514,7 @@ function useStreamedArtifact({
|
|
|
514
514
|
let stored;
|
|
515
515
|
if (clean) stored = clean(content);
|
|
516
516
|
else {
|
|
517
|
-
const report =
|
|
517
|
+
const report = chunkNDIKMOBJ_cjs.cleanDraftWithReport(content);
|
|
518
518
|
stored = report.text;
|
|
519
519
|
setCleaned(report);
|
|
520
520
|
onCleaned?.(report);
|
|
@@ -581,71 +581,71 @@ Object.defineProperty(exports, "revertRedlineRegion", {
|
|
|
581
581
|
});
|
|
582
582
|
Object.defineProperty(exports, "cleanDraftMarkdown", {
|
|
583
583
|
enumerable: true,
|
|
584
|
-
get: function () { return
|
|
584
|
+
get: function () { return chunkNDIKMOBJ_cjs.cleanDraftMarkdown; }
|
|
585
585
|
});
|
|
586
586
|
Object.defineProperty(exports, "cleanDraftWithReport", {
|
|
587
587
|
enumerable: true,
|
|
588
|
-
get: function () { return
|
|
588
|
+
get: function () { return chunkNDIKMOBJ_cjs.cleanDraftWithReport; }
|
|
589
589
|
});
|
|
590
590
|
Object.defineProperty(exports, "documentVersions", {
|
|
591
591
|
enumerable: true,
|
|
592
|
-
get: function () { return
|
|
592
|
+
get: function () { return chunkNDIKMOBJ_cjs.documentVersions; }
|
|
593
593
|
});
|
|
594
594
|
Object.defineProperty(exports, "findVersion", {
|
|
595
595
|
enumerable: true,
|
|
596
|
-
get: function () { return
|
|
596
|
+
get: function () { return chunkNDIKMOBJ_cjs.findVersion; }
|
|
597
597
|
});
|
|
598
598
|
Object.defineProperty(exports, "flattenChunks", {
|
|
599
599
|
enumerable: true,
|
|
600
|
-
get: function () { return
|
|
600
|
+
get: function () { return chunkNDIKMOBJ_cjs.flattenChunks; }
|
|
601
601
|
});
|
|
602
602
|
Object.defineProperty(exports, "isDocumentId", {
|
|
603
603
|
enumerable: true,
|
|
604
|
-
get: function () { return
|
|
604
|
+
get: function () { return chunkNDIKMOBJ_cjs.isDocumentId; }
|
|
605
605
|
});
|
|
606
606
|
Object.defineProperty(exports, "parseVersionRef", {
|
|
607
607
|
enumerable: true,
|
|
608
|
-
get: function () { return
|
|
608
|
+
get: function () { return chunkNDIKMOBJ_cjs.parseVersionRef; }
|
|
609
609
|
});
|
|
610
610
|
Object.defineProperty(exports, "promoteBoldTitle", {
|
|
611
611
|
enumerable: true,
|
|
612
|
-
get: function () { return
|
|
612
|
+
get: function () { return chunkNDIKMOBJ_cjs.promoteBoldTitle; }
|
|
613
613
|
});
|
|
614
614
|
Object.defineProperty(exports, "repairParsedStructure", {
|
|
615
615
|
enumerable: true,
|
|
616
|
-
get: function () { return
|
|
616
|
+
get: function () { return chunkNDIKMOBJ_cjs.repairParsedStructure; }
|
|
617
617
|
});
|
|
618
618
|
Object.defineProperty(exports, "repairParsedTitle", {
|
|
619
619
|
enumerable: true,
|
|
620
|
-
get: function () { return
|
|
620
|
+
get: function () { return chunkNDIKMOBJ_cjs.repairParsedTitle; }
|
|
621
621
|
});
|
|
622
622
|
Object.defineProperty(exports, "savedFromId", {
|
|
623
623
|
enumerable: true,
|
|
624
|
-
get: function () { return
|
|
624
|
+
get: function () { return chunkNDIKMOBJ_cjs.savedFromId; }
|
|
625
625
|
});
|
|
626
626
|
Object.defineProperty(exports, "stripAgentPreamble", {
|
|
627
627
|
enumerable: true,
|
|
628
|
-
get: function () { return
|
|
628
|
+
get: function () { return chunkNDIKMOBJ_cjs.stripAgentPreamble; }
|
|
629
629
|
});
|
|
630
630
|
Object.defineProperty(exports, "toArtifactVersions", {
|
|
631
631
|
enumerable: true,
|
|
632
|
-
get: function () { return
|
|
632
|
+
get: function () { return chunkNDIKMOBJ_cjs.toArtifactVersions; }
|
|
633
633
|
});
|
|
634
634
|
Object.defineProperty(exports, "unescapeMarkdown", {
|
|
635
635
|
enumerable: true,
|
|
636
|
-
get: function () { return
|
|
636
|
+
get: function () { return chunkNDIKMOBJ_cjs.unescapeMarkdown; }
|
|
637
637
|
});
|
|
638
638
|
Object.defineProperty(exports, "unwrapCitationLinks", {
|
|
639
639
|
enumerable: true,
|
|
640
|
-
get: function () { return
|
|
640
|
+
get: function () { return chunkNDIKMOBJ_cjs.unwrapCitationLinks; }
|
|
641
641
|
});
|
|
642
642
|
Object.defineProperty(exports, "versionLabel", {
|
|
643
643
|
enumerable: true,
|
|
644
|
-
get: function () { return
|
|
644
|
+
get: function () { return chunkNDIKMOBJ_cjs.versionLabel; }
|
|
645
645
|
});
|
|
646
646
|
Object.defineProperty(exports, "versionRef", {
|
|
647
647
|
enumerable: true,
|
|
648
|
-
get: function () { return
|
|
648
|
+
get: function () { return chunkNDIKMOBJ_cjs.versionRef; }
|
|
649
649
|
});
|
|
650
650
|
Object.defineProperty(exports, "normalizeMarkdown", {
|
|
651
651
|
enumerable: true,
|
package/dist/artifacts/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useDocuments, refreshDocuments } from '../chunk-MAUZSNQY.js';
|
|
2
|
-
import {
|
|
3
|
-
import { useDocumentVersionList } from '../chunk-RC42YRVA.js';
|
|
2
|
+
import { useDocumentVersionList } from '../chunk-AXKIOI2U.js';
|
|
4
3
|
import { revertRedlineRegion, buildHybridRedlineWithRegions, buildHybridRedlineMarkdown } from '../chunk-74N436VK.js';
|
|
5
4
|
export { buildHybridRedlineMarkdown, buildHybridRedlineWithRegions, revertRedlineRegion } from '../chunk-74N436VK.js';
|
|
6
5
|
import { useArbi, arbiQueryKeys } from '../chunk-M74JCOXW.js';
|
|
7
6
|
import '../chunk-DPYBZDJB.js';
|
|
8
|
-
import { isDocumentId, parseVersionRef, flattenChunks, documentVersions, toArtifactVersions, findVersion, versionLabel, cleanDraftWithReport } from '../chunk-
|
|
9
|
-
export { cleanDraftMarkdown, cleanDraftWithReport, documentVersions, findVersion, flattenChunks, isDocumentId, parseVersionRef, promoteBoldTitle, repairParsedStructure, repairParsedTitle, savedFromId, stripAgentPreamble, toArtifactVersions, unescapeMarkdown, unwrapCitationLinks, versionLabel, versionRef } from '../chunk-
|
|
10
|
-
import '../chunk-VSCU7K4V.js';
|
|
11
|
-
import '../chunk-SN5YV6FF.js';
|
|
7
|
+
import { isDocumentId, parseVersionRef, flattenChunks, documentVersions, toArtifactVersions, findVersion, versionLabel, cleanDraftWithReport } from '../chunk-UW2SGTI5.js';
|
|
8
|
+
export { cleanDraftMarkdown, cleanDraftWithReport, documentVersions, findVersion, flattenChunks, isDocumentId, parseVersionRef, promoteBoldTitle, repairParsedStructure, repairParsedTitle, savedFromId, stripAgentPreamble, toArtifactVersions, unescapeMarkdown, unwrapCitationLinks, versionLabel, versionRef } from '../chunk-UW2SGTI5.js';
|
|
12
9
|
import { normalizeMarkdown } from '../chunk-WUTL62MC.js';
|
|
13
10
|
export { normalizeMarkdown } from '../chunk-WUTL62MC.js';
|
|
11
|
+
import { MarkdownRenderer } from '../chunk-WL2Y2T47.js';
|
|
12
|
+
import '../chunk-VSCU7K4V.js';
|
|
13
|
+
import '../chunk-SN5YV6FF.js';
|
|
14
14
|
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
15
15
|
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
16
16
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkPC4O3JDV_cjs = require('./chunk-PC4O3JDV.cjs');
|
|
4
|
+
require('./chunk-IU2CJNTB.cjs');
|
|
5
|
+
require('./chunk-2IJP73ZG.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "buildBundle", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkPC4O3JDV_cjs.buildBundle; }
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=bundle-IC65W2AO.cjs.map
|
|
14
|
+
//# sourceMappingURL=bundle-IC65W2AO.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"bundle-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"bundle-IC65W2AO.cjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"bundle-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"bundle-YNOX7VIL.js"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-6TUNWGRJ.cjs');
|
|
3
|
+
var chunkK7UUWND5_cjs = require('../../chunk-K7UUWND5.cjs');
|
|
4
|
+
require('../../chunk-XOS7ISIR.cjs');
|
|
6
5
|
var chunkQ2GNEVG2_cjs = require('../../chunk-Q2GNEVG2.cjs');
|
|
7
6
|
var chunkRLSBRZ6Z_cjs = require('../../chunk-RLSBRZ6Z.cjs');
|
|
8
7
|
require('../../chunk-N73IMVFF.cjs');
|
|
9
|
-
require('../../chunk-
|
|
8
|
+
require('../../chunk-NDIKMOBJ.cjs');
|
|
9
|
+
require('../../chunk-VOFNX4P6.cjs');
|
|
10
|
+
require('../../chunk-EEIYXVM4.cjs');
|
|
10
11
|
require('../../chunk-5NOZDH3F.cjs');
|
|
11
12
|
require('../../chunk-S6A6FSG7.cjs');
|
|
12
|
-
require('../../chunk-VOFNX4P6.cjs');
|
|
13
13
|
var react = require('react');
|
|
14
14
|
var livekitClient = require('livekit-client');
|
|
15
15
|
var componentsReact = require('@livekit/components-react');
|
|
@@ -123,8 +123,8 @@ function useCallTranscriber({
|
|
|
123
123
|
const arbi = chunkQ2GNEVG2_cjs.useArbi();
|
|
124
124
|
const queryClient = reactQuery.useQueryClient();
|
|
125
125
|
const profile = arbi.isLoggedIn ? arbi.user.profile() : null;
|
|
126
|
-
const myProfileName = profile &&
|
|
127
|
-
const deploymentAvailable =
|
|
126
|
+
const myProfileName = profile && chunkK7UUWND5_cjs.toProfileView(profile).fullName || null;
|
|
127
|
+
const deploymentAvailable = chunkK7UUWND5_cjs.useCallTranscriptionAvailable();
|
|
128
128
|
const available = deploymentAvailable && !!callKey;
|
|
129
129
|
const [state, setState] = react.useState(null);
|
|
130
130
|
const [creatorExtId, setCreatorExtId] = react.useState(null);
|
|
@@ -167,7 +167,7 @@ function useCallTranscriber({
|
|
|
167
167
|
};
|
|
168
168
|
}, [available, callExtId]);
|
|
169
169
|
react.useEffect(
|
|
170
|
-
() =>
|
|
170
|
+
() => chunkK7UUWND5_cjs.onCallEvent("call.transcription", (message) => {
|
|
171
171
|
if (message.call_ext_id === callExtId) applyState(message);
|
|
172
172
|
}),
|
|
173
173
|
[callExtId, applyState]
|
|
@@ -183,7 +183,7 @@ function useCallTranscriber({
|
|
|
183
183
|
const persist = react.useCallback(
|
|
184
184
|
(segment, speakerNeedsProxy) => {
|
|
185
185
|
if (!callKey || persisted.current.has(segment.segmentId)) return;
|
|
186
|
-
const role =
|
|
186
|
+
const role = chunkK7UUWND5_cjs.transcriptPersistRole({
|
|
187
187
|
myIdentity,
|
|
188
188
|
canPost: canPost && (segment.speakerIdentity !== myIdentity || selfPosts.current),
|
|
189
189
|
hasCallKey: true,
|
|
@@ -192,7 +192,7 @@ function useCallTranscriber({
|
|
|
192
192
|
});
|
|
193
193
|
if (!role) return;
|
|
194
194
|
persisted.current.add(segment.segmentId);
|
|
195
|
-
|
|
195
|
+
chunkK7UUWND5_cjs.persistTranscriptSegment(arbi, queryClient, callExtId, callKey, segment).catch(
|
|
196
196
|
(err) => {
|
|
197
197
|
persisted.current.delete(segment.segmentId);
|
|
198
198
|
if (role === "own" && err?.status === 403) {
|
|
@@ -212,7 +212,7 @@ function useCallTranscriber({
|
|
|
212
212
|
);
|
|
213
213
|
react.useEffect(() => {
|
|
214
214
|
const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
|
|
215
|
-
if (topic ===
|
|
215
|
+
if (topic === chunkK7UUWND5_cjs.CALL_TRANSCRIPTION_TOPIC) {
|
|
216
216
|
if (participant || participantIdentity) return;
|
|
217
217
|
try {
|
|
218
218
|
const next = browser.calls.transcriptionStateFrom(JSON.parse(new TextDecoder().decode(payload)));
|
|
@@ -221,10 +221,10 @@ function useCallTranscriber({
|
|
|
221
221
|
}
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
|
-
if (topic !==
|
|
224
|
+
if (topic !== chunkK7UUWND5_cjs.CALL_CAPTION_TOPIC || !callKey) return;
|
|
225
225
|
const identity = participant?.identity ?? participantIdentity;
|
|
226
226
|
if (!identity || identity === myIdentity) return;
|
|
227
|
-
void
|
|
227
|
+
void chunkK7UUWND5_cjs.decodeCaptionPacket(payload, callKey).then((packet) => {
|
|
228
228
|
if (!packet || packet.identity !== identity) return;
|
|
229
229
|
const name = participant?.name || packet.name || identity;
|
|
230
230
|
const t = Math.min(packet.t, Date.now());
|
|
@@ -264,7 +264,7 @@ function useCallTranscriber({
|
|
|
264
264
|
})) {
|
|
265
265
|
return;
|
|
266
266
|
}
|
|
267
|
-
const segmentId =
|
|
267
|
+
const segmentId = chunkK7UUWND5_cjs.newSegmentId();
|
|
268
268
|
const startedAt = new Date(segment.startedAt).toISOString();
|
|
269
269
|
let text;
|
|
270
270
|
try {
|
|
@@ -298,7 +298,7 @@ function useCallTranscriber({
|
|
|
298
298
|
});
|
|
299
299
|
try {
|
|
300
300
|
await localParticipant.publishData(
|
|
301
|
-
await
|
|
301
|
+
await chunkK7UUWND5_cjs.encodeCaptionPacket(
|
|
302
302
|
{
|
|
303
303
|
v: 1,
|
|
304
304
|
segment_id: segmentId,
|
|
@@ -310,7 +310,7 @@ function useCallTranscriber({
|
|
|
310
310
|
},
|
|
311
311
|
callKey
|
|
312
312
|
),
|
|
313
|
-
{ reliable: true, topic:
|
|
313
|
+
{ reliable: true, topic: chunkK7UUWND5_cjs.CALL_CAPTION_TOPIC }
|
|
314
314
|
);
|
|
315
315
|
} catch (err) {
|
|
316
316
|
console.warn("[calls] could not broadcast a caption", err);
|
|
@@ -425,14 +425,14 @@ function useCallRecorder({
|
|
|
425
425
|
};
|
|
426
426
|
}, [callExtId]);
|
|
427
427
|
react.useEffect(
|
|
428
|
-
() =>
|
|
428
|
+
() => chunkK7UUWND5_cjs.onCallEvent("call.recording", (message) => {
|
|
429
429
|
if (message.call_ext_id === callExtId) applyState(message);
|
|
430
430
|
}),
|
|
431
431
|
[callExtId, applyState]
|
|
432
432
|
);
|
|
433
433
|
react.useEffect(() => {
|
|
434
434
|
const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
|
|
435
|
-
if (topic !==
|
|
435
|
+
if (topic !== chunkK7UUWND5_cjs.CALL_RECORDING_TOPIC) return;
|
|
436
436
|
if (participant || participantIdentity) return;
|
|
437
437
|
try {
|
|
438
438
|
const next = browser.calls.recordingStateFrom(JSON.parse(new TextDecoder().decode(payload)));
|
|
@@ -453,7 +453,7 @@ function useCallRecorder({
|
|
|
453
453
|
try {
|
|
454
454
|
const row = call ?? await arbi.calls.get(callExtId);
|
|
455
455
|
if (!row.workspace_locked && !row.chat_ext_id && callKey) {
|
|
456
|
-
const ref = await
|
|
456
|
+
const ref = await chunkK7UUWND5_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
|
|
457
457
|
if (ref.kind === "chat") setCall({ ...row, chat_ext_id: ref.chatExtId });
|
|
458
458
|
}
|
|
459
459
|
const answer = await arbi.calls.recording.start(callExtId, mode);
|
|
@@ -555,7 +555,7 @@ function useTrackUploader(recording, callKey, kind, mimeType) {
|
|
|
555
555
|
const queryClient = reactQuery.useQueryClient();
|
|
556
556
|
return react.useMemo(() => {
|
|
557
557
|
if (!shouldCapture || !recordingExtId || !call) return null;
|
|
558
|
-
return
|
|
558
|
+
return chunkK7UUWND5_cjs.trackUploaderFor({
|
|
559
559
|
arbi,
|
|
560
560
|
callExtId: call.external_id,
|
|
561
561
|
recordingExtId,
|
|
@@ -563,7 +563,7 @@ function useTrackUploader(recording, callKey, kind, mimeType) {
|
|
|
563
563
|
mimeType,
|
|
564
564
|
recordingStartedAt: startedAt,
|
|
565
565
|
linkVersion,
|
|
566
|
-
conversationKey: () =>
|
|
566
|
+
conversationKey: () => chunkK7UUWND5_cjs.conversationKeyForCall(arbi, queryClient, call, { callKey }),
|
|
567
567
|
// The server stopped the recording at the quota (its state event says so too).
|
|
568
568
|
onStopped: () => markStopped()
|
|
569
569
|
});
|
|
@@ -612,10 +612,10 @@ function useInCallChat({
|
|
|
612
612
|
react.useEffect(() => {
|
|
613
613
|
if (!callKey) return;
|
|
614
614
|
const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
|
|
615
|
-
if (topic !==
|
|
615
|
+
if (topic !== chunkK7UUWND5_cjs.CALL_CHAT_TOPIC) return;
|
|
616
616
|
const identity = participant?.identity ?? participantIdentity;
|
|
617
617
|
if (!identity || identity === myIdentity) return;
|
|
618
|
-
void
|
|
618
|
+
void chunkK7UUWND5_cjs.decodeCallChatPacket(payload, callKey).then((packet) => {
|
|
619
619
|
if (!packet) return;
|
|
620
620
|
const key = `${identity}:${packet.id}`;
|
|
621
621
|
if (seen.current.has(key)) return;
|
|
@@ -645,7 +645,7 @@ function useInCallChat({
|
|
|
645
645
|
if (!open || !canRead || historyRequested.current) return;
|
|
646
646
|
historyRequested.current = true;
|
|
647
647
|
setHistoryLoading(true);
|
|
648
|
-
|
|
648
|
+
chunkK7UUWND5_cjs.loadMeetingHistory(arbi, queryClient, callExtId).then((result) => {
|
|
649
649
|
if (!result) return;
|
|
650
650
|
setMeetingChat(result.ref);
|
|
651
651
|
setHistory(result.messages);
|
|
@@ -656,13 +656,13 @@ function useInCallChat({
|
|
|
656
656
|
}, [open, canRead, callExtId]);
|
|
657
657
|
const send = react.useCallback(
|
|
658
658
|
async (raw) => {
|
|
659
|
-
const text = raw.trim().slice(0,
|
|
659
|
+
const text = raw.trim().slice(0, chunkK7UUWND5_cjs.CALL_CHAT_MAX_CHARS);
|
|
660
660
|
if (!text || !callKey || readOnly) return;
|
|
661
|
-
const id =
|
|
661
|
+
const id = chunkK7UUWND5_cjs.newPacketId();
|
|
662
662
|
const at = Date.now();
|
|
663
663
|
await localParticipant.publishData(
|
|
664
|
-
await
|
|
665
|
-
{ reliable: true, topic:
|
|
664
|
+
await chunkK7UUWND5_cjs.encodeCallChatPacket({ v: 1, id, text, at }, callKey),
|
|
665
|
+
{ reliable: true, topic: chunkK7UUWND5_cjs.CALL_CHAT_TOPIC }
|
|
666
666
|
);
|
|
667
667
|
setLive((prev) => [
|
|
668
668
|
...prev,
|
|
@@ -681,7 +681,7 @@ function useInCallChat({
|
|
|
681
681
|
(prev) => prev.map((l) => l.id === id && l.senderIdentity === myIdentity ? { ...l, status } : l)
|
|
682
682
|
);
|
|
683
683
|
try {
|
|
684
|
-
setMeetingChat(await
|
|
684
|
+
setMeetingChat(await chunkK7UUWND5_cjs.persistMeetingMessage(arbi, queryClient, callExtId, callKey, text));
|
|
685
685
|
mark("saved");
|
|
686
686
|
} catch (err) {
|
|
687
687
|
console.warn("[calls] could not keep the message in the meeting chat", err);
|
|
@@ -693,7 +693,7 @@ function useInCallChat({
|
|
|
693
693
|
const openMeeting = react.useCallback(async () => {
|
|
694
694
|
if (!callKey) return;
|
|
695
695
|
try {
|
|
696
|
-
const ref = meetingChat ?? await
|
|
696
|
+
const ref = meetingChat ?? await chunkK7UUWND5_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
|
|
697
697
|
setMeetingChat(ref);
|
|
698
698
|
openMeetingChat?.(ref);
|
|
699
699
|
} catch (err) {
|
|
@@ -701,7 +701,7 @@ function useInCallChat({
|
|
|
701
701
|
}
|
|
702
702
|
}, [callExtId, callKey, meetingChat]);
|
|
703
703
|
const lines = react.useMemo(
|
|
704
|
-
() =>
|
|
704
|
+
() => chunkK7UUWND5_cjs.mergeChatLines(history, live, {
|
|
705
705
|
myIdentity,
|
|
706
706
|
nameOf: (identity) => identity === myIdentity ? localParticipant.name || "You" : room.remoteParticipants.get(identity)?.name || null
|
|
707
707
|
}),
|
|
@@ -760,7 +760,7 @@ function useWebinar({
|
|
|
760
760
|
const n = ++questionsRead.current;
|
|
761
761
|
try {
|
|
762
762
|
const rows = await webinarApi().questions.list(callExtId, linkVersion);
|
|
763
|
-
const opened = await Promise.all(rows.map((q) =>
|
|
763
|
+
const opened = await Promise.all(rows.map((q) => chunkK7UUWND5_cjs.openQuestion(q, callKey)));
|
|
764
764
|
if (n === questionsRead.current) setQuestions(opened);
|
|
765
765
|
} catch (err) {
|
|
766
766
|
console.warn("[calls] could not load the questions", err);
|
|
@@ -772,7 +772,7 @@ function useWebinar({
|
|
|
772
772
|
}, [refresh, refreshQuestions]);
|
|
773
773
|
react.useEffect(() => {
|
|
774
774
|
if (!enabled) return;
|
|
775
|
-
return
|
|
775
|
+
return chunkK7UUWND5_cjs.onCallEvent("call.webinar", (m) => {
|
|
776
776
|
if (m.call_ext_id !== callExtId) return;
|
|
777
777
|
setState((s) => s ? { ...s, live: m.live, chat: m.chat } : s);
|
|
778
778
|
});
|
|
@@ -781,8 +781,8 @@ function useWebinar({
|
|
|
781
781
|
react.useEffect(() => {
|
|
782
782
|
if (!enabled) return;
|
|
783
783
|
const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
|
|
784
|
-
if (topic !==
|
|
785
|
-
const packet =
|
|
784
|
+
if (topic !== chunkK7UUWND5_cjs.CALL_WEBINAR_TOPIC) return;
|
|
785
|
+
const packet = chunkK7UUWND5_cjs.parseWebinarPacket(payload, !!(participant || participantIdentity));
|
|
786
786
|
if (!packet) return;
|
|
787
787
|
switch (packet.type) {
|
|
788
788
|
case "state":
|
|
@@ -803,7 +803,7 @@ function useWebinar({
|
|
|
803
803
|
return;
|
|
804
804
|
case "demoted":
|
|
805
805
|
setStageCheck(false);
|
|
806
|
-
|
|
806
|
+
chunkK7UUWND5_cjs.markRejoining(callExtId);
|
|
807
807
|
if (fallback.current) clearTimeout(fallback.current);
|
|
808
808
|
fallback.current = setTimeout(() => void room.disconnect(), DEMOTE_REJOIN_FALLBACK_MS);
|
|
809
809
|
return;
|
|
@@ -830,12 +830,12 @@ function useWebinar({
|
|
|
830
830
|
[callExtId, linkVersion]
|
|
831
831
|
);
|
|
832
832
|
const stepDown = react.useCallback(async () => {
|
|
833
|
-
|
|
833
|
+
chunkK7UUWND5_cjs.markRejoining(callExtId);
|
|
834
834
|
setStageCheck(false);
|
|
835
835
|
try {
|
|
836
836
|
await webinarApi().demote(callExtId, myIdentity, linkVersion);
|
|
837
837
|
} catch (err) {
|
|
838
|
-
|
|
838
|
+
chunkK7UUWND5_cjs.markRejoining(callExtId, false);
|
|
839
839
|
failed("leave the stage")(err);
|
|
840
840
|
}
|
|
841
841
|
}, [callExtId, myIdentity, linkVersion]);
|
|
@@ -895,7 +895,7 @@ function useWebinar({
|
|
|
895
895
|
if (!callKey) throw new Error("This call has no key.");
|
|
896
896
|
await webinarApi().questions.ask(
|
|
897
897
|
callExtId,
|
|
898
|
-
await
|
|
898
|
+
await chunkK7UUWND5_cjs.sealQuestionText(text, callKey),
|
|
899
899
|
linkVersion
|
|
900
900
|
);
|
|
901
901
|
}, "ask the question"),
|
|
@@ -909,7 +909,7 @@ function useWebinar({
|
|
|
909
909
|
await webinarApi().questions.update(
|
|
910
910
|
callExtId,
|
|
911
911
|
id,
|
|
912
|
-
{ answer: await
|
|
912
|
+
{ answer: await chunkK7UUWND5_cjs.sealQuestionText(text, callKey) },
|
|
913
913
|
linkVersion
|
|
914
914
|
);
|
|
915
915
|
}, "answer the question"),
|
|
@@ -939,15 +939,15 @@ function useWebinar({
|
|
|
939
939
|
function useHostMuteNotice(callExtId) {
|
|
940
940
|
const room = componentsReact.useRoomContext();
|
|
941
941
|
react.useEffect(() => {
|
|
942
|
-
const notifyMuted =
|
|
942
|
+
const notifyMuted = chunkK7UUWND5_cjs.createMutedNotifier((text) => chunkRLSBRZ6Z_cjs.notify.info(text));
|
|
943
943
|
const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
|
|
944
|
-
if (topic !==
|
|
944
|
+
if (topic !== chunkK7UUWND5_cjs.CALL_MODERATION_TOPIC) return;
|
|
945
945
|
if (participant || participantIdentity) return;
|
|
946
|
-
const notice =
|
|
946
|
+
const notice = chunkK7UUWND5_cjs.mutedNoticeFromPacket(payload);
|
|
947
947
|
if (notice) notifyMuted(notice);
|
|
948
948
|
};
|
|
949
949
|
room.on(livekitClient.RoomEvent.DataReceived, onData);
|
|
950
|
-
const offWs =
|
|
950
|
+
const offWs = chunkK7UUWND5_cjs.onCallEvent("call.muted", (message) => {
|
|
951
951
|
if (message.callExtId === callExtId) notifyMuted(message);
|
|
952
952
|
});
|
|
953
953
|
return () => {
|