@arbidocs/react 0.5.86 → 0.5.88

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.
Files changed (117) hide show
  1. package/README.md +2 -3
  2. package/dist/artifacts/index.cjs +46 -48
  3. package/dist/artifacts/index.cjs.map +1 -1
  4. package/dist/artifacts/index.js +7 -9
  5. package/dist/artifacts/index.js.map +1 -1
  6. package/dist/calls/livekit/index.cjs +60 -62
  7. package/dist/calls/livekit/index.cjs.map +1 -1
  8. package/dist/calls/livekit/index.js +6 -8
  9. package/dist/calls/livekit/index.js.map +1 -1
  10. package/dist/{chunk-Z3LLUO32.cjs → chunk-5NOZDH3F.cjs} +12 -2
  11. package/dist/chunk-5NOZDH3F.cjs.map +1 -0
  12. package/dist/{chunk-WQY3RQ6G.js → chunk-73ENECAT.js} +5 -6
  13. package/dist/{chunk-LUDIYWT7.cjs.map → chunk-73ENECAT.js.map} +1 -1
  14. package/dist/{chunk-2Y2WOIHH.cjs → chunk-AOPGD23L.cjs} +60 -148
  15. package/dist/chunk-AOPGD23L.cjs.map +1 -0
  16. package/dist/{chunk-G4Z3IP4J.js → chunk-BF5KW5ZI.js} +3 -17
  17. package/dist/chunk-BF5KW5ZI.js.map +1 -0
  18. package/dist/{chunk-TK7ERJPE.js → chunk-BFNY3RZG.js} +22 -12
  19. package/dist/chunk-BFNY3RZG.js.map +1 -0
  20. package/dist/{chunk-U4PWVSCT.cjs → chunk-C4WODQGO.cjs} +24 -11
  21. package/dist/chunk-C4WODQGO.cjs.map +1 -0
  22. package/dist/{chunk-E7VD5WNY.cjs → chunk-DS7NTSKH.cjs} +41 -74
  23. package/dist/chunk-DS7NTSKH.cjs.map +1 -0
  24. package/dist/{chunk-JT7PN7JH.js → chunk-DU2P354H.js} +6 -37
  25. package/dist/chunk-DU2P354H.js.map +1 -0
  26. package/dist/{chunk-TAVS54EN.cjs → chunk-GKWMT64A.cjs} +6 -6
  27. package/dist/{chunk-TAVS54EN.cjs.map → chunk-GKWMT64A.cjs.map} +1 -1
  28. package/dist/{chunk-AXKHDLBB.cjs → chunk-HEVPIVF2.cjs} +15 -15
  29. package/dist/{chunk-AXKHDLBB.cjs.map → chunk-HEVPIVF2.cjs.map} +1 -1
  30. package/dist/{chunk-XPLD4LFC.js → chunk-KTXZ222T.js} +6 -91
  31. package/dist/chunk-KTXZ222T.js.map +1 -0
  32. package/dist/{chunk-PXWKJI4K.cjs → chunk-LBAG7KL7.cjs} +35 -261
  33. package/dist/chunk-LBAG7KL7.cjs.map +1 -0
  34. package/dist/{chunk-CSPAEVZS.js → chunk-MS43RNXM.js} +5 -5
  35. package/dist/{chunk-CSPAEVZS.js.map → chunk-MS43RNXM.js.map} +1 -1
  36. package/dist/{chunk-OC7F5SNA.cjs → chunk-MXP4O4DI.cjs} +5 -5
  37. package/dist/{chunk-OC7F5SNA.cjs.map → chunk-MXP4O4DI.cjs.map} +1 -1
  38. package/dist/{chunk-ZWFMFOGP.cjs → chunk-NDIKMOBJ.cjs} +4 -4
  39. package/dist/{chunk-ZWFMFOGP.cjs.map → chunk-NDIKMOBJ.cjs.map} +1 -1
  40. package/dist/{chunk-XAEVT7ZM.js → chunk-NNAJLY6B.js} +34 -257
  41. package/dist/chunk-NNAJLY6B.js.map +1 -0
  42. package/dist/{chunk-LUDIYWT7.cjs → chunk-QLRDHLWR.cjs} +72 -73
  43. package/dist/chunk-QLRDHLWR.cjs.map +1 -0
  44. package/dist/{chunk-DZUBZ45Y.cjs → chunk-RLSBRZ6Z.cjs} +2 -17
  45. package/dist/chunk-RLSBRZ6Z.cjs.map +1 -0
  46. package/dist/{chunk-VGAA7AFS.js → chunk-S3OGDLDC.js} +4 -13
  47. package/dist/chunk-S3OGDLDC.js.map +1 -0
  48. package/dist/{chunk-NNWMHMEC.js → chunk-UW2SGTI5.js} +3 -3
  49. package/dist/{chunk-NNWMHMEC.js.map → chunk-UW2SGTI5.js.map} +1 -1
  50. package/dist/{chunk-QRCMKEE6.js → chunk-VSCU7K4V.js} +11 -3
  51. package/dist/chunk-VSCU7K4V.js.map +1 -0
  52. package/dist/{chunk-C44GO33B.js → chunk-WL2Y2T47.js} +3 -3
  53. package/dist/{chunk-C44GO33B.js.map → chunk-WL2Y2T47.js.map} +1 -1
  54. package/dist/{chunk-47YVW3J4.js → chunk-YQBDEOVE.js} +4 -4
  55. package/dist/{chunk-47YVW3J4.js.map → chunk-YQBDEOVE.js.map} +1 -1
  56. package/dist/{chunk-Q6U7ALNV.cjs → chunk-ZHXYFJIA.cjs} +44 -54
  57. package/dist/chunk-ZHXYFJIA.cjs.map +1 -0
  58. package/dist/document-tools/core.cjs +100 -110
  59. package/dist/document-tools/core.d.cts +3 -78
  60. package/dist/document-tools/core.d.ts +3 -78
  61. package/dist/document-tools/core.js +5 -7
  62. package/dist/document-tools/index.cjs +102 -112
  63. package/dist/document-tools/index.cjs.map +1 -1
  64. package/dist/document-tools/index.d.cts +2 -2
  65. package/dist/document-tools/index.d.ts +2 -2
  66. package/dist/document-tools/index.js +6 -8
  67. package/dist/document-tools/index.js.map +1 -1
  68. package/dist/index.cjs +1740 -2305
  69. package/dist/index.cjs.map +1 -1
  70. package/dist/{index.d-BDcwpFVa.d.cts → index.d-1_bJB-Yl.d.cts} +1 -58
  71. package/dist/{index.d-BDcwpFVa.d.ts → index.d-1_bJB-Yl.d.ts} +1 -58
  72. package/dist/{index.d-Deqz5-pF.d.ts → index.d-ChaR6kMc.d.cts} +1 -6
  73. package/dist/{index.d-Deqz5-pF.d.cts → index.d-ChaR6kMc.d.ts} +1 -6
  74. package/dist/index.d.cts +184 -1423
  75. package/dist/index.d.ts +184 -1423
  76. package/dist/index.js +281 -799
  77. package/dist/index.js.map +1 -1
  78. package/dist/{query-keys.d-Dm0NL9nr.d.cts → query-keys.d-D6SAUl7S.d.cts} +0 -9
  79. package/dist/{query-keys.d-Dm0NL9nr.d.ts → query-keys.d-D6SAUl7S.d.ts} +0 -9
  80. package/dist/shell/index.cjs +48 -53
  81. package/dist/shell/index.d.cts +1 -1
  82. package/dist/shell/index.d.ts +1 -1
  83. package/dist/shell/index.js +4 -5
  84. package/dist/ui/index.cjs +156 -169
  85. package/dist/ui/index.d.cts +1 -1
  86. package/dist/ui/index.d.ts +1 -1
  87. package/dist/ui/index.js +3 -4
  88. package/dist/viewers/index.cjs +0 -120
  89. package/dist/viewers/index.cjs.map +1 -1
  90. package/dist/viewers/index.d.cts +3 -40
  91. package/dist/viewers/index.d.ts +3 -40
  92. package/dist/viewers/index.js +1 -120
  93. package/dist/viewers/index.js.map +1 -1
  94. package/package.json +3 -3
  95. package/dist/chunk-2Y2WOIHH.cjs.map +0 -1
  96. package/dist/chunk-CPZ36AQS.js +0 -11
  97. package/dist/chunk-CPZ36AQS.js.map +0 -1
  98. package/dist/chunk-DZUBZ45Y.cjs.map +0 -1
  99. package/dist/chunk-E7VD5WNY.cjs.map +0 -1
  100. package/dist/chunk-G4Z3IP4J.js.map +0 -1
  101. package/dist/chunk-JT7PN7JH.js.map +0 -1
  102. package/dist/chunk-PXWKJI4K.cjs.map +0 -1
  103. package/dist/chunk-Q6U7ALNV.cjs.map +0 -1
  104. package/dist/chunk-QRCMKEE6.js.map +0 -1
  105. package/dist/chunk-RCKA7BEF.cjs +0 -14
  106. package/dist/chunk-RCKA7BEF.cjs.map +0 -1
  107. package/dist/chunk-TK7ERJPE.js.map +0 -1
  108. package/dist/chunk-U4PWVSCT.cjs.map +0 -1
  109. package/dist/chunk-VGAA7AFS.js.map +0 -1
  110. package/dist/chunk-VGMMK5OM.cjs +0 -26
  111. package/dist/chunk-VGMMK5OM.cjs.map +0 -1
  112. package/dist/chunk-VGO77X5U.js +0 -22
  113. package/dist/chunk-VGO77X5U.js.map +0 -1
  114. package/dist/chunk-WQY3RQ6G.js.map +0 -1
  115. package/dist/chunk-XAEVT7ZM.js.map +0 -1
  116. package/dist/chunk-XPLD4LFC.js.map +0 -1
  117. package/dist/chunk-Z3LLUO32.cjs.map +0 -1
@@ -1,9 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunk2Y2WOIHH_cjs = require('./chunk-2Y2WOIHH.cjs');
4
- var chunkU4PWVSCT_cjs = require('./chunk-U4PWVSCT.cjs');
5
- var chunkVGMMK5OM_cjs = require('./chunk-VGMMK5OM.cjs');
6
- var chunkDZUBZ45Y_cjs = require('./chunk-DZUBZ45Y.cjs');
3
+ var chunkAOPGD23L_cjs = require('./chunk-AOPGD23L.cjs');
4
+ var chunkC4WODQGO_cjs = require('./chunk-C4WODQGO.cjs');
5
+ var chunkRLSBRZ6Z_cjs = require('./chunk-RLSBRZ6Z.cjs');
7
6
  var chunkEEIYXVM4_cjs = require('./chunk-EEIYXVM4.cjs');
8
7
  var reactQuery = require('@tanstack/react-query');
9
8
  var react = require('react');
@@ -11,9 +10,9 @@ var browser = require('@arbidocs/sdk/browser');
11
10
  var client = require('@arbidocs/client');
12
11
 
13
12
  function useUserSettings(options) {
14
- const arbi = chunkVGMMK5OM_cjs.useArbi();
13
+ const arbi = chunkC4WODQGO_cjs.useArbi();
15
14
  return reactQuery.useQuery({
16
- queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.userSettings(),
15
+ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.userSettings(),
17
16
  queryFn: () => arbi.settings.get(),
18
17
  // Edited about once a month, and every write here patches the cache: no refetch on each mount.
19
18
  staleTime: 30 * 60 * 1e3,
@@ -21,23 +20,23 @@ function useUserSettings(options) {
21
20
  });
22
21
  }
23
22
  function useUpdateUserSettings() {
24
- const arbi = chunkVGMMK5OM_cjs.useArbi();
23
+ const arbi = chunkC4WODQGO_cjs.useArbi();
25
24
  const qc = reactQuery.useQueryClient();
26
25
  return reactQuery.useMutation({
27
26
  mutationFn: (patch) => arbi.settings.update(patch),
28
27
  onMutate: async (patch) => {
29
- await qc.cancelQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.userSettings() });
30
- const previous = qc.getQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.userSettings());
28
+ await qc.cancelQueries({ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.userSettings() });
29
+ const previous = qc.getQueryData(chunkC4WODQGO_cjs.arbiQueryKeys.userSettings());
31
30
  qc.setQueryData(
32
- chunkU4PWVSCT_cjs.arbiQueryKeys.userSettings(),
31
+ chunkC4WODQGO_cjs.arbiQueryKeys.userSettings(),
33
32
  (old) => old ? { ...old, ...patch } : old
34
33
  );
35
34
  return { previous };
36
35
  },
37
36
  onError: (_err, _patch, context) => {
38
- qc.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.userSettings(), context?.previous);
37
+ qc.setQueryData(chunkC4WODQGO_cjs.arbiQueryKeys.userSettings(), context?.previous);
39
38
  },
40
- onSettled: () => qc.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.userSettings() })
39
+ onSettled: () => qc.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.userSettings() })
41
40
  });
42
41
  }
43
42
  var ALWAYS_ON = { on: true, set: () => {
@@ -60,7 +59,7 @@ function useLocalSwitch(source, feature) {
60
59
  return { on: saved ?? fallback, set };
61
60
  }
62
61
  function useFeatureSwitch(feature) {
63
- const source = chunkVGMMK5OM_cjs.useArbiHost().features?.[feature];
62
+ const source = chunkC4WODQGO_cjs.useArbiHost().features?.[feature];
64
63
  const useSource = !source ? useUnlisted : "userSetting" in source ? useUserSettingSwitch : useLocalSwitch;
65
64
  return useSource(source, feature);
66
65
  }
@@ -150,7 +149,7 @@ var LISTS = {
150
149
  };
151
150
  function patchConversationList(queryClient, workspaceId, reducer) {
152
151
  if (!workspaceId) return;
153
- const key = chunkU4PWVSCT_cjs.arbiQueryKeys.conversations(workspaceId);
152
+ const key = chunkC4WODQGO_cjs.arbiQueryKeys.conversations(workspaceId);
154
153
  const current = queryClient.getQueryData(key) ?? [];
155
154
  const next = reducer(current);
156
155
  if (next !== current) queryClient.setQueryData(key, next);
@@ -214,13 +213,13 @@ function byActivity(a, b) {
214
213
  return bt - at;
215
214
  }
216
215
  function cachedChats(queryClient) {
217
- return queryClient.getQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatList()) ?? [];
216
+ return queryClient.getQueryData(chunkC4WODQGO_cjs.arbiQueryKeys.chatList()) ?? [];
218
217
  }
219
218
  function cachedChat(queryClient, chatExtId) {
220
219
  return cachedChats(queryClient).find((c) => c.external_id === chatExtId);
221
220
  }
222
221
  function upsertChat(queryClient, chat) {
223
- queryClient.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatList(), (old) => {
222
+ queryClient.setQueryData(chunkC4WODQGO_cjs.arbiQueryKeys.chatList(), (old) => {
224
223
  if (!old) return old;
225
224
  const rest = old.filter((c) => c.external_id !== chat.external_id);
226
225
  return [chat, ...rest].sort(byActivity);
@@ -228,13 +227,13 @@ function upsertChat(queryClient, chat) {
228
227
  }
229
228
  function removeChat(queryClient, chatExtId) {
230
229
  queryClient.setQueryData(
231
- chunkU4PWVSCT_cjs.arbiQueryKeys.chatList(),
230
+ chunkC4WODQGO_cjs.arbiQueryKeys.chatList(),
232
231
  (old) => old?.filter((c) => c.external_id !== chatExtId)
233
232
  );
234
- queryClient.removeQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId) });
233
+ queryClient.removeQueries({ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.chatThread(chatExtId) });
235
234
  }
236
235
  function appendToThread(queryClient, chatExtId, message, replaceOptimisticId) {
237
- queryClient.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
236
+ queryClient.setQueryData(chunkC4WODQGO_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
238
237
  if (!old) return old;
239
238
  const without = old.messages.filter(
240
239
  (m) => m.external_id !== message.external_id && m.external_id !== replaceOptimisticId
@@ -244,12 +243,12 @@ function appendToThread(queryClient, chatExtId, message, replaceOptimisticId) {
244
243
  }
245
244
  function dropFromThread(queryClient, chatExtId, messageExtId) {
246
245
  queryClient.setQueryData(
247
- chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId),
246
+ chunkC4WODQGO_cjs.arbiQueryKeys.chatThread(chatExtId),
248
247
  (old) => old ? { ...old, messages: old.messages.filter((m) => m.external_id !== messageExtId) } : old
249
248
  );
250
249
  }
251
250
  function replaceInThread(queryClient, chatExtId, message) {
252
- queryClient.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
251
+ queryClient.setQueryData(chunkC4WODQGO_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
253
252
  if (!old || !old.messages.some((m) => m.external_id === message.external_id)) return old;
254
253
  return {
255
254
  ...old,
@@ -259,14 +258,14 @@ function replaceInThread(queryClient, chatExtId, message) {
259
258
  }
260
259
  function patchLastMessage(queryClient, chatExtId, message) {
261
260
  queryClient.setQueryData(
262
- chunkU4PWVSCT_cjs.arbiQueryKeys.chatList(),
261
+ chunkC4WODQGO_cjs.arbiQueryKeys.chatList(),
263
262
  (old) => old?.map(
264
263
  (c) => c.external_id === chatExtId && c.last_message?.external_id === message.external_id ? { ...c, last_message: message } : c
265
264
  )
266
265
  );
267
266
  }
268
267
  async function deleteChatMessage(arbi, queryClient, chatExtId, messageExtId) {
269
- const thread = queryClient.getQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId));
268
+ const thread = queryClient.getQueryData(chunkC4WODQGO_cjs.arbiQueryKeys.chatThread(chatExtId));
270
269
  const before = thread?.messages.find((m) => m.external_id === messageExtId);
271
270
  const listed = cachedChat(queryClient, chatExtId);
272
271
  const wasLast = listed?.last_message?.external_id === messageExtId ? listed.last_message : null;
@@ -287,7 +286,7 @@ async function applyChangedMessage(arbi, queryClient, chatExtId, message) {
287
286
  return;
288
287
  }
289
288
  const chat = cachedChat(queryClient, chatExtId);
290
- if (!chat || !queryClient.getQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId))) return;
289
+ if (!chat || !queryClient.getQueryData(chunkC4WODQGO_cjs.arbiQueryKeys.chatThread(chatExtId))) return;
291
290
  try {
292
291
  replaceInThread(queryClient, chatExtId, await arbi.chats.decrypt(chat, message));
293
292
  } catch (err) {
@@ -299,7 +298,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
299
298
  const me = myChatId(arbi);
300
299
  const chat = cachedChat(queryClient, chatExtId);
301
300
  if (!chat) {
302
- void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.chatList() });
301
+ void queryClient.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.chatList() });
303
302
  return;
304
303
  }
305
304
  const mine = message.sender_ext_id === me;
@@ -313,7 +312,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
313
312
  (m) => m.user.external_id === me ? { ...m, last_read_at: message.created_at } : m
314
313
  ) : chat.members
315
314
  });
316
- if (queryClient.getQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId))) {
315
+ if (queryClient.getQueryData(chunkC4WODQGO_cjs.arbiQueryKeys.chatThread(chatExtId))) {
317
316
  try {
318
317
  appendToThread(queryClient, chatExtId, await arbi.chats.decrypt(chat, message));
319
318
  } catch (err) {
@@ -324,7 +323,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
324
323
  function applyChatRead(arbi, queryClient, chatExtId, userExtId, lastReadAt) {
325
324
  const me = myChatId(arbi);
326
325
  queryClient.setQueryData(
327
- chunkU4PWVSCT_cjs.arbiQueryKeys.chatList(),
326
+ chunkC4WODQGO_cjs.arbiQueryKeys.chatList(),
328
327
  (old) => old?.map(
329
328
  (c) => c.external_id !== chatExtId ? c : {
330
329
  ...c,
@@ -350,11 +349,11 @@ async function applyChatUpdated(arbi, queryClient, chatExtId, message) {
350
349
  }
351
350
  upsertChat(queryClient, chat);
352
351
  if (!message)
353
- void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId) });
352
+ void queryClient.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.chatThread(chatExtId) });
354
353
  }
355
354
  function applyAgentDmStatus(queryClient, status) {
356
355
  if (!["queued", "working", "done", "failed"].includes(status.status)) return;
357
- queryClient.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.agentDmStatus(status.agent_ext_id), status);
356
+ queryClient.setQueryData(chunkC4WODQGO_cjs.arbiQueryKeys.agentDmStatus(status.agent_ext_id), status);
358
357
  }
359
358
  async function applyChatEvent(arbi, queryClient, event) {
360
359
  const e = event;
@@ -369,13 +368,13 @@ async function applyChatEvent(arbi, queryClient, event) {
369
368
 
370
369
  // src/calls/keys.ts
371
370
  function serverCallsExperimental(queryClient) {
372
- return queryClient.getQueryData(chunkU4PWVSCT_cjs.callQueryKeys.config())?.experimental !== false;
371
+ return queryClient.getQueryData(chunkC4WODQGO_cjs.callQueryKeys.config())?.experimental !== false;
373
372
  }
374
373
  function invalidateCall(queryClient, message) {
375
- void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.callQueryKeys.call(message.call_ext_id) });
374
+ void queryClient.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.callQueryKeys.call(message.call_ext_id) });
376
375
  const thread = message.log_conversation_ext_id;
377
376
  if (thread) {
378
- void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.conversationActivity(thread) });
377
+ void queryClient.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.conversationActivity(thread) });
379
378
  }
380
379
  }
381
380
 
@@ -585,7 +584,7 @@ function applyCallEvent(queryClient, event, options = {}) {
585
584
  }
586
585
  case "call.declined":
587
586
  if (callExtId && callSession.getState().active?.callExtId === callExtId) {
588
- chunkDZUBZ45Y_cjs.notify.info("Call declined", { record: false, ambient: false });
587
+ chunkRLSBRZ6Z_cjs.notify.info("Call declined", { record: false, ambient: false });
589
588
  }
590
589
  return true;
591
590
  case "call.started":
@@ -626,19 +625,19 @@ function applyCallEvent(queryClient, event, options = {}) {
626
625
  }
627
626
  case "call.recording": {
628
627
  if (callExtId)
629
- void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.callQueryKeys.recordingsOf(callExtId) });
628
+ void queryClient.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.callQueryKeys.recordingsOf(callExtId) });
630
629
  const state2 = browser.calls.recordingStateFrom(m);
631
630
  relay("call.recording", callExtId && state2 ? { ...state2, call_ext_id: callExtId } : null);
632
631
  return true;
633
632
  }
634
633
  case "call.recording_updated": {
635
634
  if (callExtId)
636
- void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.callQueryKeys.recordingsOf(callExtId) });
635
+ void queryClient.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.callQueryKeys.recordingsOf(callExtId) });
637
636
  return true;
638
637
  }
639
638
  case "call.recording_deleted": {
640
639
  if (callExtId)
641
- void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.callQueryKeys.recordingsOf(callExtId) });
640
+ void queryClient.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.callQueryKeys.recordingsOf(callExtId) });
642
641
  const recordingExtId = str(m.recording_ext_id);
643
642
  relay(
644
643
  "call.recording_deleted",
@@ -679,11 +678,11 @@ function useProfile(options) {
679
678
  const { client, enabled } = useAccountClient();
680
679
  const qc = reactQuery.useQueryClient();
681
680
  react.useEffect(
682
- () => client.onProfileChange(() => qc.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.profile(), client.profile())),
681
+ () => client.onProfileChange(() => qc.setQueryData(chunkC4WODQGO_cjs.arbiQueryKeys.profile(), client.profile())),
683
682
  [client, qc]
684
683
  );
685
684
  return reactQuery.useQuery({
686
- queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.profile(),
685
+ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.profile(),
687
686
  queryFn: () => client.profile(),
688
687
  enabled: (options?.enabled ?? true) && enabled,
689
688
  staleTime: Infinity
@@ -698,9 +697,9 @@ function useUpdateProfile() {
698
697
  return client.profile();
699
698
  },
700
699
  onSuccess: (profile) => {
701
- qc.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.profile(), profile);
702
- void qc.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.identity() });
703
- return qc.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.workspaces() });
700
+ qc.setQueryData(chunkC4WODQGO_cjs.arbiQueryKeys.profile(), profile);
701
+ void qc.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.identity() });
702
+ return qc.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.workspaces() });
704
703
  }
705
704
  });
706
705
  }
@@ -802,8 +801,8 @@ function arbiAccountClient(arbi, overrides = {}) {
802
801
  if (everywhere) await arbi.sessions.logoutAll();
803
802
  else await arbi.logout();
804
803
  } finally {
805
- chunk2Y2WOIHH_cjs.clearSealedDrafts();
806
- chunkDZUBZ45Y_cjs.clearChatArtifacts();
804
+ chunkAOPGD23L_cjs.clearSealedDrafts();
805
+ chunkRLSBRZ6Z_cjs.clearChatArtifacts();
807
806
  }
808
807
  },
809
808
  requestDeletion: () => arbi.account.requestDeletion(),
@@ -847,7 +846,7 @@ var NO_ACCOUNT = {
847
846
  };
848
847
  var ALWAYS = () => true;
849
848
  function useAccountClient() {
850
- const { account, arbi } = chunkVGMMK5OM_cjs.useArbiHost();
849
+ const { account, arbi } = chunkC4WODQGO_cjs.useArbiHost();
851
850
  const fallback = react.useMemo(() => arbi ? arbiAccountClient(arbi) : null, [arbi]);
852
851
  const useEnabled = account?.useEnabled ?? ALWAYS;
853
852
  const enabled = useEnabled();
@@ -858,9 +857,9 @@ function useAccountClient() {
858
857
  return { client: fallback, enabled: arbi.isLoggedIn };
859
858
  }
860
859
  function useEntitlements() {
861
- const arbi = chunkVGMMK5OM_cjs.useArbi();
860
+ const arbi = chunkC4WODQGO_cjs.useArbi();
862
861
  return reactQuery.useQuery({
863
- queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.entitlements(),
862
+ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.entitlements(),
864
863
  queryFn: () => arbi.account.entitlements(),
865
864
  enabled: arbi.isLoggedIn,
866
865
  // A plan change shows on the next read; the API enforces it at once either way.
@@ -869,7 +868,7 @@ function useEntitlements() {
869
868
  }
870
869
  function useInvalidateEntitlements() {
871
870
  const qc = reactQuery.useQueryClient();
872
- return () => qc.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.entitlements() });
871
+ return () => qc.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.entitlements() });
873
872
  }
874
873
  function useIsEntitled(feature) {
875
874
  const { data } = useEntitlements();
@@ -993,7 +992,7 @@ function ensureMeetingChat(arbi, queryClient, callExtId, callKey) {
993
992
  });
994
993
  if (!ref) throw new Error("The server did not return a meeting chat");
995
994
  if (ref.kind === "chat")
996
- void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.chatList() });
995
+ void queryClient.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.arbiQueryKeys.chatList() });
997
996
  else void invalidateConversationLists(queryClient);
998
997
  return ref;
999
998
  })();
@@ -1999,9 +1998,9 @@ async function transcribeRecording(params) {
1999
1998
  return { stored, failed };
2000
1999
  }
2001
2000
  function useCallsConfig() {
2002
- const arbi = chunkVGMMK5OM_cjs.useArbi();
2001
+ const arbi = chunkC4WODQGO_cjs.useArbi();
2003
2002
  const { data } = reactQuery.useQuery({
2004
- queryKey: chunkU4PWVSCT_cjs.callQueryKeys.config(),
2003
+ queryKey: chunkC4WODQGO_cjs.callQueryKeys.config(),
2005
2004
  queryFn: () => arbi.calls.config(),
2006
2005
  enabled: arbi.isLoggedIn,
2007
2006
  staleTime: 5 * 6e4,
@@ -2019,9 +2018,9 @@ function useCallTranscriptionAvailable() {
2019
2018
  return useCallsConfig()?.transcription_available === true;
2020
2019
  }
2021
2020
  function useCall(callExtId) {
2022
- const arbi = chunkVGMMK5OM_cjs.useArbi();
2021
+ const arbi = chunkC4WODQGO_cjs.useArbi();
2023
2022
  return reactQuery.useQuery({
2024
- queryKey: chunkU4PWVSCT_cjs.callQueryKeys.call(callExtId ?? ""),
2023
+ queryKey: chunkC4WODQGO_cjs.callQueryKeys.call(callExtId ?? ""),
2025
2024
  queryFn: () => arbi.calls.get(callExtId),
2026
2025
  enabled: !!callExtId && arbi.isLoggedIn,
2027
2026
  staleTime: 6e4,
@@ -2029,18 +2028,18 @@ function useCall(callExtId) {
2029
2028
  });
2030
2029
  }
2031
2030
  function useCallRecordings(callExtId, enabled = true) {
2032
- const arbi = chunkVGMMK5OM_cjs.useArbi();
2031
+ const arbi = chunkC4WODQGO_cjs.useArbi();
2033
2032
  return reactQuery.useQuery({
2034
- queryKey: chunkU4PWVSCT_cjs.callQueryKeys.recordings(callExtId ?? ""),
2033
+ queryKey: chunkC4WODQGO_cjs.callQueryKeys.recordings(callExtId ?? ""),
2035
2034
  queryFn: () => arbi.calls.recording.list(callExtId),
2036
2035
  enabled: !!callExtId && enabled && arbi.isLoggedIn,
2037
2036
  retry: false
2038
2037
  });
2039
2038
  }
2040
2039
  function useCallRecording(callExtId, recordingExtId) {
2041
- const arbi = chunkVGMMK5OM_cjs.useArbi();
2040
+ const arbi = chunkC4WODQGO_cjs.useArbi();
2042
2041
  return reactQuery.useQuery({
2043
- queryKey: chunkU4PWVSCT_cjs.callQueryKeys.recording(callExtId ?? "", recordingExtId ?? ""),
2042
+ queryKey: chunkC4WODQGO_cjs.callQueryKeys.recording(callExtId ?? "", recordingExtId ?? ""),
2044
2043
  queryFn: () => arbi.calls.recording.get(callExtId, recordingExtId),
2045
2044
  enabled: !!callExtId && !!recordingExtId && arbi.isLoggedIn,
2046
2045
  retry: false
@@ -2052,21 +2051,21 @@ function useRecordingWindows(callExtId, enabled) {
2052
2051
  return react.useMemo(() => data ? recordingWindowsOf(data) : NO_WINDOWS, [data]);
2053
2052
  }
2054
2053
  function useCallInviteLinks(callExtId) {
2055
- const arbi = chunkVGMMK5OM_cjs.useArbi();
2054
+ const arbi = chunkC4WODQGO_cjs.useArbi();
2056
2055
  return reactQuery.useQuery({
2057
- queryKey: chunkU4PWVSCT_cjs.callQueryKeys.inviteLinks(callExtId ?? ""),
2056
+ queryKey: chunkC4WODQGO_cjs.callQueryKeys.inviteLinks(callExtId ?? ""),
2058
2057
  queryFn: () => arbi.calls.inviteLinks.list(callExtId),
2059
2058
  enabled: !!callExtId && arbi.isLoggedIn,
2060
2059
  retry: false
2061
2060
  });
2062
2061
  }
2063
2062
  function useRecordingActions(call) {
2064
- const arbi = chunkVGMMK5OM_cjs.useArbi();
2063
+ const arbi = chunkC4WODQGO_cjs.useArbi();
2065
2064
  const queryClient = reactQuery.useQueryClient();
2066
2065
  return react.useMemo(
2067
2066
  () => ({
2068
2067
  refresh: () => void queryClient.invalidateQueries({
2069
- queryKey: chunkU4PWVSCT_cjs.callQueryKeys.recordingsOf(call.external_id)
2068
+ queryKey: chunkC4WODQGO_cjs.callQueryKeys.recordingsOf(call.external_id)
2070
2069
  }),
2071
2070
  open: (recording) => openRecording(arbi, queryClient, call, recording.external_id, recording),
2072
2071
  transcribe: async (opened, onProgress) => transcribeRecording({
@@ -2082,12 +2081,12 @@ function useRecordingActions(call) {
2082
2081
  );
2083
2082
  }
2084
2083
  function useRevokeCallInviteLink(callExtId) {
2085
- const arbi = chunkVGMMK5OM_cjs.useArbi();
2084
+ const arbi = chunkC4WODQGO_cjs.useArbi();
2086
2085
  const queryClient = reactQuery.useQueryClient();
2087
2086
  return react.useCallback(
2088
2087
  async (inviteExtId) => {
2089
2088
  await arbi.calls.inviteLinks.revoke(callExtId, inviteExtId);
2090
- void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.callQueryKeys.inviteLinks(callExtId) });
2089
+ void queryClient.invalidateQueries({ queryKey: chunkC4WODQGO_cjs.callQueryKeys.inviteLinks(callExtId) });
2091
2090
  },
2092
2091
  [arbi, queryClient, callExtId]
2093
2092
  );
@@ -2145,7 +2144,7 @@ async function saveRecordingFilesToThread(arbi, params) {
2145
2144
  });
2146
2145
  }
2147
2146
  function useSaveToThread() {
2148
- const arbi = chunkVGMMK5OM_cjs.useArbi();
2147
+ const arbi = chunkC4WODQGO_cjs.useArbi();
2149
2148
  const queryClient = reactQuery.useQueryClient();
2150
2149
  return react.useMemo(() => {
2151
2150
  const thenRefresh = async (run) => {
@@ -2165,13 +2164,13 @@ function callLink(callExtId, key, linkVersion) {
2165
2164
  function alreadyInCall(callExtId) {
2166
2165
  const active = callSession.getState().active;
2167
2166
  if (!active || active.callExtId === callExtId) return false;
2168
- chunkDZUBZ45Y_cjs.notify.warning("You are already in a call. Leave it first.");
2167
+ chunkRLSBRZ6Z_cjs.notify.warning("You are already in a call. Leave it first.");
2169
2168
  return true;
2170
2169
  }
2171
2170
  function fail(err, what = "start the call") {
2172
2171
  console.error(`[calls] failed to ${what}`, err);
2173
2172
  const message = err instanceof Error ? err.message : "Unknown error";
2174
- chunkDZUBZ45Y_cjs.notify.error(`Could not ${what}: ${message}`);
2173
+ chunkRLSBRZ6Z_cjs.notify.error(`Could not ${what}: ${message}`);
2175
2174
  }
2176
2175
  function callContext(call) {
2177
2176
  return {
@@ -2194,7 +2193,7 @@ async function sendInviteLinks(arbi, callExtId, key, linkVersion, invites) {
2194
2193
  fail(err, `invite ${invite.name || "a contact"}`);
2195
2194
  }
2196
2195
  }
2197
- if (sent) chunkDZUBZ45Y_cjs.notify.success(`Sent ${sent} ${sent === 1 ? "invitation" : "invitations"}`);
2196
+ if (sent) chunkRLSBRZ6Z_cjs.notify.success(`Sent ${sent} ${sent === 1 ? "invitation" : "invitations"}`);
2198
2197
  return sent;
2199
2198
  }
2200
2199
  async function startCall(arbi, opts) {
@@ -2432,9 +2431,9 @@ function isWorkspaceGuestOf(workspaces, workspaceExtId, me) {
2432
2431
  return workspace?.users?.find((wu) => wu.user.external_id === me)?.role === "guest";
2433
2432
  }
2434
2433
  function useMeetingReadOnly(lockedWorkspaceExtId) {
2435
- const arbi = chunkVGMMK5OM_cjs.useArbi();
2434
+ const arbi = chunkC4WODQGO_cjs.useArbi();
2436
2435
  const me = arbi.isLoggedIn ? arbi.user.identity()?.externalId ?? null : null;
2437
- const { data: workspaces } = chunk2Y2WOIHH_cjs.useWorkspaces({
2436
+ const { data: workspaces } = chunkAOPGD23L_cjs.useWorkspaces({
2438
2437
  enabled: !!lockedWorkspaceExtId && arbi.isLoggedIn
2439
2438
  });
2440
2439
  return isWorkspaceGuestOf(
@@ -2457,9 +2456,9 @@ function useCanHostCalls() {
2457
2456
  return callsEnabled && entitled;
2458
2457
  }
2459
2458
  function useOpenCallMeetingChat() {
2460
- const arbi = chunkVGMMK5OM_cjs.useArbi();
2459
+ const arbi = chunkC4WODQGO_cjs.useArbi();
2461
2460
  const queryClient = reactQuery.useQueryClient();
2462
- const open = chunkVGMMK5OM_cjs.useArbiHost().calls?.openMeetingChat;
2461
+ const open = chunkC4WODQGO_cjs.useArbiHost().calls?.openMeetingChat;
2463
2462
  return react.useCallback(
2464
2463
  async (target) => {
2465
2464
  try {
@@ -2467,7 +2466,7 @@ function useOpenCallMeetingChat() {
2467
2466
  open?.(ref);
2468
2467
  } catch (err) {
2469
2468
  console.warn("[calls] could not open the meeting chat", err);
2470
- chunkDZUBZ45Y_cjs.notify.error(
2469
+ chunkRLSBRZ6Z_cjs.notify.error(
2471
2470
  `Could not open the meeting chat: ${err instanceof Error ? err.message : "unknown error"}`
2472
2471
  );
2473
2472
  }
@@ -2669,5 +2668,5 @@ exports.useUpdateUserSettings = useUpdateUserSettings;
2669
2668
  exports.useUserSettings = useUserSettings;
2670
2669
  exports.wrapTrackKey = wrapTrackKey;
2671
2670
  exports.writeSamples = writeSamples;
2672
- //# sourceMappingURL=chunk-LUDIYWT7.cjs.map
2673
- //# sourceMappingURL=chunk-LUDIYWT7.cjs.map
2671
+ //# sourceMappingURL=chunk-QLRDHLWR.cjs.map
2672
+ //# sourceMappingURL=chunk-QLRDHLWR.cjs.map