@arbidocs/blocks 0.4.128 → 0.4.130

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 (236) hide show
  1. package/README.md +25 -10
  2. package/dist/{StreamedArtifactEditor-EEYAXJ4H.cjs → StreamedArtifactEditor-TQAND4H5.cjs} +6 -5
  3. package/dist/StreamedArtifactEditor-TQAND4H5.cjs.map +1 -0
  4. package/dist/{StreamedArtifactEditor-TDATDYD2.js → StreamedArtifactEditor-XQNANTWM.js} +4 -3
  5. package/dist/StreamedArtifactEditor-XQNANTWM.js.map +1 -0
  6. package/dist/agents/index.cjs +304 -304
  7. package/dist/agents/index.js +12 -12
  8. package/dist/artifacts/ArtifactCodeView.d.ts +6 -0
  9. package/dist/artifacts/ArtifactPreview.d.ts +22 -0
  10. package/dist/artifacts/index.cjs +50 -21
  11. package/dist/artifacts/index.d.ts +3 -0
  12. package/dist/artifacts/index.js +2 -1
  13. package/dist/artifacts/sandbox-policy.d.ts +34 -0
  14. package/dist/artifacts/sandboxDocument.d.ts +7 -0
  15. package/dist/calendar/CalendarPrint.d.ts +25 -0
  16. package/dist/calendar/booking-slots.d.ts +21 -0
  17. package/dist/calendar/index.cjs +440 -243
  18. package/dist/calendar/index.cjs.map +1 -1
  19. package/dist/calendar/index.d.ts +4 -0
  20. package/dist/calendar/index.js +282 -151
  21. package/dist/calendar/index.js.map +1 -1
  22. package/dist/calendar/print-layout.d.ts +16 -0
  23. package/dist/calendar/printCalendar.d.ts +6 -0
  24. package/dist/calls/composite-canvas.d.ts +52 -0
  25. package/dist/calls/index.cjs +376 -3
  26. package/dist/calls/index.cjs.map +1 -1
  27. package/dist/calls/index.d.ts +3 -0
  28. package/dist/calls/index.js +360 -5
  29. package/dist/calls/index.js.map +1 -1
  30. package/dist/calls/ringtone.d.ts +16 -0
  31. package/dist/calls/voice-levels.d.ts +32 -0
  32. package/dist/chat/ThreadVisualizer.d.ts +28 -0
  33. package/dist/chat/index.cjs +156 -140
  34. package/dist/chat/index.d.ts +2 -0
  35. package/dist/chat/index.js +5 -5
  36. package/dist/chat/open-document.d.ts +5 -1
  37. package/dist/chat/thread-diagram.d.ts +26 -0
  38. package/dist/{chunk-7HAM7Y5U.js → chunk-2DFDFOM7.js} +3 -3
  39. package/dist/{chunk-7HAM7Y5U.js.map → chunk-2DFDFOM7.js.map} +1 -1
  40. package/dist/{chunk-54ANPPMV.js → chunk-2PNNCEPH.js} +4 -4
  41. package/dist/{chunk-54ANPPMV.js.map → chunk-2PNNCEPH.js.map} +1 -1
  42. package/dist/{chunk-DQCYCEDR.js → chunk-2Q7FDZAY.js} +3 -3
  43. package/dist/{chunk-DQCYCEDR.js.map → chunk-2Q7FDZAY.js.map} +1 -1
  44. package/dist/{chunk-INW76PEL.cjs → chunk-2YV7FBLO.cjs} +175 -2
  45. package/dist/chunk-2YV7FBLO.cjs.map +1 -0
  46. package/dist/{chunk-S7PSMMRG.js → chunk-444XKG46.js} +3 -3
  47. package/dist/{chunk-S7PSMMRG.js.map → chunk-444XKG46.js.map} +1 -1
  48. package/dist/{chunk-FSBY2S4V.cjs → chunk-4QIIDXLF.cjs} +10 -10
  49. package/dist/{chunk-FSBY2S4V.cjs.map → chunk-4QIIDXLF.cjs.map} +1 -1
  50. package/dist/{chunk-OYMWV45N.js → chunk-4RLCRFZS.js} +63 -13
  51. package/dist/chunk-4RLCRFZS.js.map +1 -0
  52. package/dist/{chunk-NZUQFF35.cjs → chunk-4S5IDT5F.cjs} +234 -5
  53. package/dist/chunk-4S5IDT5F.cjs.map +1 -0
  54. package/dist/{chunk-CJBN5HIS.js → chunk-4UMXQPNA.js} +20 -8
  55. package/dist/chunk-4UMXQPNA.js.map +1 -0
  56. package/dist/{chunk-KELGOCJA.js → chunk-65S53MZK.js} +174 -5
  57. package/dist/chunk-65S53MZK.js.map +1 -0
  58. package/dist/{chunk-IBZJYCYM.js → chunk-66TA5IBN.js} +17 -25
  59. package/dist/chunk-66TA5IBN.js.map +1 -0
  60. package/dist/{chunk-HM23LXUP.cjs → chunk-6AALMYPS.cjs} +3 -3
  61. package/dist/{chunk-HM23LXUP.cjs.map → chunk-6AALMYPS.cjs.map} +1 -1
  62. package/dist/{chunk-OR4CO743.cjs → chunk-AAFX64WD.cjs} +3 -3
  63. package/dist/{chunk-OR4CO743.cjs.map → chunk-AAFX64WD.cjs.map} +1 -1
  64. package/dist/{chunk-MUMH3Z6K.cjs → chunk-ARDHLU73.cjs} +61 -11
  65. package/dist/chunk-ARDHLU73.cjs.map +1 -0
  66. package/dist/chunk-BIXHB4LV.cjs +178 -0
  67. package/dist/chunk-BIXHB4LV.cjs.map +1 -0
  68. package/dist/chunk-C4WSHRR6.cjs +166 -0
  69. package/dist/chunk-C4WSHRR6.cjs.map +1 -0
  70. package/dist/{chunk-ZAVEMQ37.cjs → chunk-DWZXSPMB.cjs} +3 -3
  71. package/dist/{chunk-ZAVEMQ37.cjs.map → chunk-DWZXSPMB.cjs.map} +1 -1
  72. package/dist/{chunk-VW2C2AZL.js → chunk-ENDP7JER.js} +3 -3
  73. package/dist/{chunk-VW2C2AZL.js.map → chunk-ENDP7JER.js.map} +1 -1
  74. package/dist/{chunk-5HFPRI3W.js → chunk-FUTMU4FR.js} +3 -3
  75. package/dist/{chunk-5HFPRI3W.js.map → chunk-FUTMU4FR.js.map} +1 -1
  76. package/dist/{chunk-P5ST47VY.js → chunk-GDBDHOI4.js} +3 -3
  77. package/dist/{chunk-P5ST47VY.js.map → chunk-GDBDHOI4.js.map} +1 -1
  78. package/dist/chunk-GTCC2VAR.js +153 -0
  79. package/dist/chunk-GTCC2VAR.js.map +1 -0
  80. package/dist/{chunk-3BJLNKOB.cjs → chunk-GZPTWHP5.cjs} +22 -10
  81. package/dist/chunk-GZPTWHP5.cjs.map +1 -0
  82. package/dist/{chunk-OUW6G4O2.cjs → chunk-HFGXA5CL.cjs} +4 -4
  83. package/dist/{chunk-OUW6G4O2.cjs.map → chunk-HFGXA5CL.cjs.map} +1 -1
  84. package/dist/{chunk-SWQX6CTT.cjs → chunk-JKB7WT7L.cjs} +2 -2
  85. package/dist/chunk-JKB7WT7L.cjs.map +1 -0
  86. package/dist/{chunk-D4YR56FV.cjs → chunk-KYDRUFWT.cjs} +5 -5
  87. package/dist/{chunk-D4YR56FV.cjs.map → chunk-KYDRUFWT.cjs.map} +1 -1
  88. package/dist/chunk-NS4JD2VR.js +22 -0
  89. package/dist/chunk-NS4JD2VR.js.map +1 -0
  90. package/dist/{chunk-S6BOINC4.cjs → chunk-OGBXV326.cjs} +7 -7
  91. package/dist/{chunk-S6BOINC4.cjs.map → chunk-OGBXV326.cjs.map} +1 -1
  92. package/dist/{chunk-DJM7DLCT.cjs → chunk-OPTBQSCV.cjs} +3 -3
  93. package/dist/{chunk-DJM7DLCT.cjs.map → chunk-OPTBQSCV.cjs.map} +1 -1
  94. package/dist/{chunk-GFYGYME3.js → chunk-OQ7RUNOC.js} +3 -3
  95. package/dist/{chunk-GFYGYME3.js.map → chunk-OQ7RUNOC.js.map} +1 -1
  96. package/dist/{chunk-WV4IDVDQ.cjs → chunk-PJJY6CYL.cjs} +11 -11
  97. package/dist/{chunk-WV4IDVDQ.cjs.map → chunk-PJJY6CYL.cjs.map} +1 -1
  98. package/dist/{chunk-CXLVI3SB.js → chunk-PUCY3UXN.js} +3 -3
  99. package/dist/{chunk-CXLVI3SB.js.map → chunk-PUCY3UXN.js.map} +1 -1
  100. package/dist/{chunk-ZV3BKLFY.cjs → chunk-QDEODGXE.cjs} +5 -5
  101. package/dist/{chunk-ZV3BKLFY.cjs.map → chunk-QDEODGXE.cjs.map} +1 -1
  102. package/dist/{chunk-7BJRLP3U.js → chunk-QYTYW74G.js} +5 -5
  103. package/dist/{chunk-7BJRLP3U.js.map → chunk-QYTYW74G.js.map} +1 -1
  104. package/dist/{chunk-A7NCSZAP.cjs → chunk-QZTNTP75.cjs} +17 -25
  105. package/dist/chunk-QZTNTP75.cjs.map +1 -0
  106. package/dist/{chunk-OB5F4577.cjs → chunk-R26BK7YL.cjs} +4 -4
  107. package/dist/{chunk-OB5F4577.cjs.map → chunk-R26BK7YL.cjs.map} +1 -1
  108. package/dist/{chunk-A2YAC22G.js → chunk-RI6DZA5X.js} +3 -3
  109. package/dist/{chunk-A2YAC22G.js.map → chunk-RI6DZA5X.js.map} +1 -1
  110. package/dist/{chunk-LC2KJSUS.cjs → chunk-SARREDFP.cjs} +46 -46
  111. package/dist/{chunk-LC2KJSUS.cjs.map → chunk-SARREDFP.cjs.map} +1 -1
  112. package/dist/{chunk-ZCHSJUCI.js → chunk-SZX44LCT.js} +231 -6
  113. package/dist/chunk-SZX44LCT.js.map +1 -0
  114. package/dist/{chunk-7QDX2CO4.cjs → chunk-TP6PLDNM.cjs} +4 -4
  115. package/dist/{chunk-7QDX2CO4.cjs.map → chunk-TP6PLDNM.cjs.map} +1 -1
  116. package/dist/{chunk-W27VK32R.cjs → chunk-TT6XV6WM.cjs} +84 -84
  117. package/dist/{chunk-W27VK32R.cjs.map → chunk-TT6XV6WM.cjs.map} +1 -1
  118. package/dist/{chunk-KLOSOT26.js → chunk-UMIY4SQS.js} +11 -11
  119. package/dist/{chunk-KLOSOT26.js.map → chunk-UMIY4SQS.js.map} +1 -1
  120. package/dist/chunk-VG24E4JJ.cjs +26 -0
  121. package/dist/chunk-VG24E4JJ.cjs.map +1 -0
  122. package/dist/{chunk-ECERC6TI.js → chunk-VHJHY7TT.js} +3 -3
  123. package/dist/{chunk-ECERC6TI.js.map → chunk-VHJHY7TT.js.map} +1 -1
  124. package/dist/{chunk-D3N67Q4D.js → chunk-W3VYZXNS.js} +3 -3
  125. package/dist/{chunk-D3N67Q4D.js.map → chunk-W3VYZXNS.js.map} +1 -1
  126. package/dist/{chunk-JK45LSIH.cjs → chunk-WXYQ66KC.cjs} +5 -5
  127. package/dist/{chunk-JK45LSIH.cjs.map → chunk-WXYQ66KC.cjs.map} +1 -1
  128. package/dist/{chunk-ZCF2JJFA.js → chunk-Y3KA6X7B.js} +3 -3
  129. package/dist/{chunk-ZCF2JJFA.js.map → chunk-Y3KA6X7B.js.map} +1 -1
  130. package/dist/{chunk-GYCQ3FNL.js → chunk-YBLIKTJK.js} +2 -2
  131. package/dist/chunk-YBLIKTJK.js.map +1 -0
  132. package/dist/chunk-YNIBUKV5.js +163 -0
  133. package/dist/chunk-YNIBUKV5.js.map +1 -0
  134. package/dist/citations/index.cjs +12 -11
  135. package/dist/citations/index.js +3 -2
  136. package/dist/collaboration/index.cjs +51 -51
  137. package/dist/collaboration/index.js +3 -3
  138. package/dist/components/DroppableContainer.d.ts +6 -0
  139. package/dist/components/GridRowNavigator.d.ts +29 -0
  140. package/dist/components/LoadingIndicator.d.ts +21 -0
  141. package/dist/components/RowNavigatorControls.d.ts +29 -0
  142. package/dist/components/SharedCell.d.ts +27 -0
  143. package/dist/connect/docx.cjs +7 -5
  144. package/dist/connect/docx.cjs.map +1 -1
  145. package/dist/connect/docx.js +6 -4
  146. package/dist/connect/docx.js.map +1 -1
  147. package/dist/connect/index.cjs +270 -227
  148. package/dist/connect/index.cjs.map +1 -1
  149. package/dist/connect/index.d.ts +1 -1
  150. package/dist/connect/index.js +199 -156
  151. package/dist/connect/index.js.map +1 -1
  152. package/dist/connection/ConnectedSettings.d.ts +46 -20
  153. package/dist/connection/ConnectionProvider.d.ts +5 -0
  154. package/dist/connection/mail/ConnectedMailComposer.d.ts +2 -3
  155. package/dist/connection/mail/ConnectedMailbox.d.ts +2 -3
  156. package/dist/connection/mail/MailComposerForm.d.ts +2 -3
  157. package/dist/connection/mail/index.d.ts +2 -2
  158. package/dist/connection/mail/mailbox.d.ts +1 -4
  159. package/dist/connection/mail/types.d.ts +0 -8
  160. package/dist/document-tools/index.cjs +1 -1
  161. package/dist/document-tools/index.js +1 -1
  162. package/dist/facts/fact-citations.d.ts +56 -0
  163. package/dist/facts/fact-table-column-resize.d.ts +18 -0
  164. package/dist/facts/index.cjs +198 -29
  165. package/dist/facts/index.cjs.map +1 -1
  166. package/dist/facts/index.d.ts +2 -1
  167. package/dist/facts/index.js +187 -27
  168. package/dist/facts/index.js.map +1 -1
  169. package/dist/files/index.cjs +4 -4
  170. package/dist/files/index.js +3 -3
  171. package/dist/home/index.cjs +20 -19
  172. package/dist/home/index.cjs.map +1 -1
  173. package/dist/home/index.js +5 -4
  174. package/dist/home/index.js.map +1 -1
  175. package/dist/index.cjs +877 -679
  176. package/dist/index.cjs.map +1 -1
  177. package/dist/index.d.ts +7 -1
  178. package/dist/index.js +207 -30
  179. package/dist/index.js.map +1 -1
  180. package/dist/provider/BlocksProvider.d.ts +39 -4
  181. package/dist/provider/dialogs.d.ts +31 -0
  182. package/dist/retrieval/index.cjs +5 -4
  183. package/dist/retrieval/index.js +3 -2
  184. package/dist/sandboxDocument-JLEETIWW.js +71 -0
  185. package/dist/sandboxDocument-JLEETIWW.js.map +1 -0
  186. package/dist/sandboxDocument-WQUNODSC.cjs +76 -0
  187. package/dist/sandboxDocument-WQUNODSC.cjs.map +1 -0
  188. package/dist/settings/DraggableHeader.d.ts +10 -0
  189. package/dist/settings/FilterChip.d.ts +15 -0
  190. package/dist/settings/MessageJsonTree.d.ts +7 -0
  191. package/dist/settings/MoreInfo.d.ts +25 -0
  192. package/dist/settings/PlanCard.d.ts +1 -1
  193. package/dist/settings/index.cjs +363 -266
  194. package/dist/settings/index.cjs.map +1 -1
  195. package/dist/settings/index.d.ts +4 -1
  196. package/dist/settings/index.js +317 -222
  197. package/dist/settings/index.js.map +1 -1
  198. package/dist/settings/message-schema-hints.d.ts +19 -0
  199. package/dist/shell/index.cjs +48 -47
  200. package/dist/shell/index.js +4 -3
  201. package/dist/site/index.cjs +5 -5
  202. package/dist/site/index.js +1 -1
  203. package/dist/studio/index.cjs +19 -18
  204. package/dist/studio/index.cjs.map +1 -1
  205. package/dist/studio/index.js +11 -10
  206. package/dist/studio/index.js.map +1 -1
  207. package/dist/workflow-canvas/index.cjs +65 -65
  208. package/dist/workflow-canvas/index.js +13 -13
  209. package/dist/workspaces/index.cjs +42 -3
  210. package/dist/workspaces/index.cjs.map +1 -1
  211. package/dist/workspaces/index.d.ts +1 -0
  212. package/dist/workspaces/index.js +38 -3
  213. package/dist/workspaces/index.js.map +1 -1
  214. package/dist/workspaces/workspace-type.d.ts +29 -0
  215. package/node_modules/@arbidocs/coedit/package.json +1 -1
  216. package/package.json +10 -4
  217. package/dist/StreamedArtifactEditor-EEYAXJ4H.cjs.map +0 -1
  218. package/dist/StreamedArtifactEditor-TDATDYD2.js.map +0 -1
  219. package/dist/chunk-3BJLNKOB.cjs.map +0 -1
  220. package/dist/chunk-76JDDMSP.js +0 -31
  221. package/dist/chunk-76JDDMSP.js.map +0 -1
  222. package/dist/chunk-A7NCSZAP.cjs.map +0 -1
  223. package/dist/chunk-C54XEN5T.cjs +0 -34
  224. package/dist/chunk-C54XEN5T.cjs.map +0 -1
  225. package/dist/chunk-CJBN5HIS.js.map +0 -1
  226. package/dist/chunk-GYCQ3FNL.js.map +0 -1
  227. package/dist/chunk-IBZJYCYM.js.map +0 -1
  228. package/dist/chunk-INW76PEL.cjs.map +0 -1
  229. package/dist/chunk-KELGOCJA.js.map +0 -1
  230. package/dist/chunk-MUMH3Z6K.cjs.map +0 -1
  231. package/dist/chunk-NZUQFF35.cjs.map +0 -1
  232. package/dist/chunk-OYMWV45N.js.map +0 -1
  233. package/dist/chunk-SWQX6CTT.cjs.map +0 -1
  234. package/dist/chunk-ZCHSJUCI.js.map +0 -1
  235. package/dist/facts/timezone.d.ts +0 -4
  236. package/dist/settings/FirmPool.d.ts +0 -82
@@ -1,39 +1,40 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkOR4CO743_cjs = require('../chunk-OR4CO743.cjs');
5
- var chunkFSBY2S4V_cjs = require('../chunk-FSBY2S4V.cjs');
6
- var chunk3BJLNKOB_cjs = require('../chunk-3BJLNKOB.cjs');
7
- var chunkMUMH3Z6K_cjs = require('../chunk-MUMH3Z6K.cjs');
4
+ var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
5
+ var chunkAAFX64WD_cjs = require('../chunk-AAFX64WD.cjs');
6
+ var chunk4QIIDXLF_cjs = require('../chunk-4QIIDXLF.cjs');
7
+ var chunkGZPTWHP5_cjs = require('../chunk-GZPTWHP5.cjs');
8
+ var chunkARDHLU73_cjs = require('../chunk-ARDHLU73.cjs');
8
9
  var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
9
10
  require('../chunk-S24XEVPS.cjs');
10
11
  require('../chunk-V5OAXIBN.cjs');
11
12
  require('../chunk-5FYU7ZIU.cjs');
12
- var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
13
- var chunkD4YR56FV_cjs = require('../chunk-D4YR56FV.cjs');
13
+ var chunkKYDRUFWT_cjs = require('../chunk-KYDRUFWT.cjs');
14
14
  var chunkO6IEZDRC_cjs = require('../chunk-O6IEZDRC.cjs');
15
15
  var chunkI2QSDQQV_cjs = require('../chunk-I2QSDQQV.cjs');
16
16
  require('../chunk-RC25WMVB.cjs');
17
- var chunkLC2KJSUS_cjs = require('../chunk-LC2KJSUS.cjs');
18
- require('../chunk-7D737FLE.cjs');
19
- var chunkN26CXGXC_cjs = require('../chunk-N26CXGXC.cjs');
17
+ var chunkSARREDFP_cjs = require('../chunk-SARREDFP.cjs');
20
18
  require('../chunk-DETZZBG2.cjs');
19
+ var chunkN26CXGXC_cjs = require('../chunk-N26CXGXC.cjs');
21
20
  var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
22
21
  require('../chunk-C2CWWEHO.cjs');
22
+ require('../chunk-7D737FLE.cjs');
23
23
  var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
24
24
  require('../chunk-ADOKTJHV.cjs');
25
- var chunkZAVEMQ37_cjs = require('../chunk-ZAVEMQ37.cjs');
25
+ var chunkDWZXSPMB_cjs = require('../chunk-DWZXSPMB.cjs');
26
26
  var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
27
- var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
28
- var chunkWV4IDVDQ_cjs = require('../chunk-WV4IDVDQ.cjs');
27
+ var chunkPJJY6CYL_cjs = require('../chunk-PJJY6CYL.cjs');
29
28
  require('../chunk-B6MVQCXW.cjs');
30
- var chunkSWQX6CTT_cjs = require('../chunk-SWQX6CTT.cjs');
31
- var chunkHM23LXUP_cjs = require('../chunk-HM23LXUP.cjs');
32
- require('../chunk-7UTB4PHM.cjs');
29
+ var chunkJKB7WT7L_cjs = require('../chunk-JKB7WT7L.cjs');
30
+ var chunk6AALMYPS_cjs = require('../chunk-6AALMYPS.cjs');
33
31
  require('../chunk-32HW2Q33.cjs');
32
+ require('../chunk-7UTB4PHM.cjs');
34
33
  require('../chunk-FX3K6LNZ.cjs');
35
34
  require('../chunk-PPCATBOY.cjs');
36
35
  require('../chunk-MHVNT4J3.cjs');
36
+ var chunkC4WSHRR6_cjs = require('../chunk-C4WSHRR6.cjs');
37
+ var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
37
38
  var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
38
39
  require('../chunk-DES3K4SD.cjs');
39
40
  var react = require('react');
@@ -49,7 +50,7 @@ var client = require('@arbidocs/client');
49
50
  var reactDom = require('react-dom');
50
51
 
51
52
  function ConnectionBoundWebSocket({ children }) {
52
- const { status } = chunkMUMH3Z6K_cjs.useConnection();
53
+ const { status } = chunkARDHLU73_cjs.useConnection();
53
54
  return /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiWebSocketProvider, { enabled: status === "authenticated", children });
54
55
  }
55
56
  function ArbiAppProvider({
@@ -62,10 +63,10 @@ function ArbiAppProvider({
62
63
  })
63
64
  );
64
65
  const providerUrl = config.apiUrl || config.demoApiUrl || "https://demo.arbi.local";
65
- return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiProvider, { url: providerUrl, deploymentDomain: config.deploymentDomain, children: /* @__PURE__ */ jsxRuntime.jsx(chunkMUMH3Z6K_cjs.ConnectionProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(ConnectionBoundWebSocket, { children }) }) }) });
66
+ return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiProvider, { url: providerUrl, deploymentDomain: config.deploymentDomain, children: /* @__PURE__ */ jsxRuntime.jsx(chunkARDHLU73_cjs.ConnectionProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(ConnectionBoundWebSocket, { children }) }) }) });
66
67
  }
67
68
  function ConnectedTaskAccessRequest({ conversationId }) {
68
- const { workspaceId } = chunkMUMH3Z6K_cjs.useConnection();
69
+ const { workspaceId } = chunkARDHLU73_cjs.useConnection();
69
70
  const tasks = react$1.useConversations(workspaceId ?? void 0, { live: true });
70
71
  const run = react$1.useRunConversation();
71
72
  const task = tasks.data?.find((item) => item.external_id === conversationId);
@@ -97,7 +98,7 @@ function ConnectedWorkspaceActivity({
97
98
  pageSize,
98
99
  ...listProps
99
100
  }) {
100
- const { workspaceId: selected, status, ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
101
+ const { workspaceId: selected, status, ensureWorkspaceOpen } = chunkARDHLU73_cjs.useConnection();
101
102
  const workspaceId = workspaceProp ?? selected ?? void 0;
102
103
  const live = status === "authenticated" && !!workspaceId;
103
104
  const feed = react$1.useWorkspaceActivity(workspaceId, {
@@ -124,7 +125,7 @@ function ConnectedWorkspaceActivity({
124
125
  [feed.data]
125
126
  );
126
127
  return /* @__PURE__ */ jsxRuntime.jsx(
127
- chunkD4YR56FV_cjs.WorkspaceActivityList,
128
+ chunkKYDRUFWT_cjs.WorkspaceActivityList,
128
129
  {
129
130
  ...listProps,
130
131
  items,
@@ -143,14 +144,14 @@ function ConnectedWorkspaceNotificationMenu({
143
144
  workspaceId: workspaceProp,
144
145
  ...menuProps
145
146
  }) {
146
- const { workspaceId: selected, status } = chunkMUMH3Z6K_cjs.useConnection();
147
+ const { workspaceId: selected, status } = chunkARDHLU73_cjs.useConnection();
147
148
  const workspaceId = workspaceProp ?? selected;
148
149
  const { level, setLevel, isLoading, isSaving } = react$1.useWorkspaceNotificationLevel(workspaceId, {
149
150
  enabled: status === "authenticated"
150
151
  });
151
152
  if (!workspaceId) return null;
152
153
  return /* @__PURE__ */ jsxRuntime.jsx(
153
- chunkD4YR56FV_cjs.WorkspaceNotificationMenu,
154
+ chunkKYDRUFWT_cjs.WorkspaceNotificationMenu,
154
155
  {
155
156
  ...menuProps,
156
157
  level,
@@ -164,12 +165,12 @@ function ConnectedThreadFollow({
164
165
  as = "button",
165
166
  ...props
166
167
  }) {
167
- const { status } = chunkMUMH3Z6K_cjs.useConnection();
168
+ const { status } = chunkARDHLU73_cjs.useConnection();
168
169
  const { following, setFollowing, isLoading, isSaving } = react$1.useFollowThread(conversationId, {
169
170
  enabled: status === "authenticated"
170
171
  });
171
172
  if (!conversationId) return null;
172
- const Control = as === "menu-item" ? chunkD4YR56FV_cjs.ThreadFollowMenuItem : chunkD4YR56FV_cjs.ThreadFollowButton;
173
+ const Control = as === "menu-item" ? chunkKYDRUFWT_cjs.ThreadFollowMenuItem : chunkKYDRUFWT_cjs.ThreadFollowButton;
173
174
  return /* @__PURE__ */ jsxRuntime.jsx(
174
175
  Control,
175
176
  {
@@ -222,7 +223,7 @@ function ConnectedSkillUpload() {
222
223
  upload.error && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive", children: upload.error.message })
223
224
  ] });
224
225
  }
225
- var StreamedArtifactEditor = react.lazy(() => import('../StreamedArtifactEditor-EEYAXJ4H.cjs'));
226
+ var StreamedArtifactEditor = react.lazy(() => import('../StreamedArtifactEditor-TQAND4H5.cjs'));
226
227
  function StreamedArtifact({
227
228
  artifacts: artifacts$1,
228
229
  workspaceId,
@@ -295,7 +296,7 @@ function StreamedArtifact({
295
296
  }
296
297
  var STARTING = /* @__PURE__ */ new Set(["pending", "running"]);
297
298
  function formValues(step, inputs) {
298
- const fields = chunkHM23LXUP_cjs.stepFields(step);
299
+ const fields = chunk6AALMYPS_cjs.stepFields(step);
299
300
  if (!fields.length) return void 0;
300
301
  if (step.kind === "form")
301
302
  return Object.fromEntries(fields.map((f) => [f.name, inputs[f.name] ?? ""]));
@@ -329,11 +330,11 @@ function useAnswerRetry(missing, refetch) {
329
330
  }
330
331
  function useWorkflowThread(workflow, options = {}) {
331
332
  const arbi = react$1.useArbi();
332
- const { ensureWorkspaceOpen, status } = chunkMUMH3Z6K_cjs.useConnection();
333
- const { wsId } = chunkFSBY2S4V_cjs.useWorkspaceDocs();
333
+ const { ensureWorkspaceOpen, status } = chunkARDHLU73_cjs.useConnection();
334
+ const { wsId } = chunk4QIIDXLF_cjs.useWorkspaceDocs();
334
335
  const [threadId, setThreadId] = react.useState(options.conversationId);
335
336
  const [localInputs, setLocalInputs] = react.useState(
336
- () => chunkHM23LXUP_cjs.initialRunInputs(workflow, options.initialInputs)
337
+ () => chunk6AALMYPS_cjs.initialRunInputs(workflow, options.initialInputs)
337
338
  );
338
339
  const [edits, setEdits] = react.useState({});
339
340
  const [localStates, setLocalStates] = react.useState({});
@@ -353,12 +354,12 @@ function useWorkflowThread(workflow, options = {}) {
353
354
  );
354
355
  const conversation = conversations.data?.find((c) => c.external_id === threadId);
355
356
  const steps = react.useMemo(
356
- () => chunkHM23LXUP_cjs.workflowSteps(workflow).length > 0 ? chunkHM23LXUP_cjs.workflowSteps(workflow) : chunkLC2KJSUS_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
357
+ () => chunk6AALMYPS_cjs.workflowSteps(workflow).length > 0 ? chunk6AALMYPS_cjs.workflowSteps(workflow) : chunkSARREDFP_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
357
358
  [workflow, conversation?.plan?.steps]
358
359
  );
359
360
  const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
360
361
  const serverStates = react.useMemo(
361
- () => chunkHM23LXUP_cjs.stepStatesFromActivity(activity.data ?? []),
362
+ () => chunk6AALMYPS_cjs.stepStatesFromActivity(activity.data ?? []),
362
363
  [activity.data]
363
364
  );
364
365
  const working = steps.some(
@@ -401,7 +402,7 @@ function useWorkflowThread(workflow, options = {}) {
401
402
  async (values, done) => {
402
403
  await ensureWorkspaceOpen();
403
404
  const created = await createWork.mutateAsync({
404
- title: chunkHM23LXUP_cjs.runThreadTitle(workflow, values).slice(0, 60),
405
+ title: chunk6AALMYPS_cjs.runThreadTitle(workflow, values).slice(0, 60),
405
406
  description: workflow.description || null,
406
407
  prompt: null,
407
408
  skill_ref: null,
@@ -413,7 +414,7 @@ function useWorkflowThread(workflow, options = {}) {
413
414
  criteria: [],
414
415
  max_passes: 3,
415
416
  documents: [],
416
- steps: chunkLC2KJSUS_cjs.toPlanSteps(workflow, {
417
+ steps: chunkSARREDFP_cjs.toPlanSteps(workflow, {
417
418
  inputs: values,
418
419
  resolveWorkflow: options.resolveWorkflow,
419
420
  compose: options.compose
@@ -500,7 +501,7 @@ function useWorkflowThread(workflow, options = {}) {
500
501
  const anyRunning = Object.values(states).some((s) => s.status === "running");
501
502
  const needsStart = !threadId || idle && !anyRunning;
502
503
  const runError = idle ? conversation?.last_error ?? null : null;
503
- const view = chunkLC2KJSUS_cjs.useWorkflowView({
504
+ const view = chunkSARREDFP_cjs.useWorkflowView({
504
505
  steps,
505
506
  states,
506
507
  inputs,
@@ -543,7 +544,7 @@ function WorkflowRunThread({
543
544
  if (listed && activeThreadId !== conversationId) selectThread(conversationId);
544
545
  }, [listed, activeThreadId, conversationId, selectThread]);
545
546
  return /* @__PURE__ */ jsxRuntime.jsx(
546
- chunkWV4IDVDQ_cjs.ChatPage,
547
+ chunkPJJY6CYL_cjs.ChatPage,
547
548
  {
548
549
  chat: { ...chat, threads: chat.threads.filter((t) => t.id === conversationId) },
549
550
  singleThread: true,
@@ -579,9 +580,9 @@ function WorkflowSignDialog({
579
580
  labels
580
581
  }) {
581
582
  const arbi = react$1.useArbi();
582
- const { user, ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
583
+ const { user, ensureWorkspaceOpen } = chunkARDHLU73_cjs.useConnection();
583
584
  const tools = documentTools.useOptionalDocumentTools();
584
- const { id, version: stepVersion } = chunkHM23LXUP_cjs.splitDocRef(docRef);
585
+ const { id, version: stepVersion } = chunk6AALMYPS_cjs.splitDocRef(docRef);
585
586
  const [version, setVersion] = react.useState(stepVersion);
586
587
  const [pdf, setPdf] = react.useState(null);
587
588
  const [preparing, setPreparing] = react.useState(false);
@@ -659,7 +660,7 @@ function WorkflowWordDialog({
659
660
  onClose,
660
661
  labels
661
662
  }) {
662
- const { id } = chunkHM23LXUP_cjs.splitDocRef(docRef);
663
+ const { id } = chunk6AALMYPS_cjs.splitDocRef(docRef);
663
664
  return /* @__PURE__ */ jsxRuntime.jsx(
664
665
  chunkULWRNGGE_cjs.ModalScaffold,
665
666
  {
@@ -668,7 +669,7 @@ function WorkflowWordDialog({
668
669
  title: title ?? labels.wordTitle,
669
670
  size: "xl",
670
671
  testId: "workflow-word-dialog",
671
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunk3BJLNKOB_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
672
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkGZPTWHP5_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
672
673
  }
673
674
  );
674
675
  }
@@ -679,7 +680,7 @@ function WorkflowReviewGridDialog({
679
680
  onOpenDocument,
680
681
  labels
681
682
  }) {
682
- const { workspaceId } = chunkMUMH3Z6K_cjs.useConnection();
683
+ const { workspaceId } = chunkARDHLU73_cjs.useConnection();
683
684
  const allTags = react$1.useTags(workspaceId ?? void 0);
684
685
  const all = react$1.useDocuments(workspaceId ?? void 0);
685
686
  const isLoading = allTags.isLoading || all.isLoading || all.isFetching && !all.isFetchedAfterMount;
@@ -807,8 +808,8 @@ function ConnectedWorkflowRunner({
807
808
  const l = { ...DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS, ...connectedLabels };
808
809
  const dl = { ...DEFAULT_WORKFLOW_RUNNER_DIALOG_LABELS, ...dialogLabels };
809
810
  const arbi = react$1.useArbi();
810
- const { ensureWorkspaceOpen, user } = chunkMUMH3Z6K_cjs.useConnection();
811
- const { wsId } = chunkFSBY2S4V_cjs.useWorkspaceDocs();
811
+ const { ensureWorkspaceOpen, user } = chunkARDHLU73_cjs.useConnection();
812
+ const { wsId } = chunk4QIIDXLF_cjs.useWorkspaceDocs();
812
813
  const { data: docs = [], refetch } = react$1.useDocuments(wsId);
813
814
  const [sending, setSending] = react.useState([]);
814
815
  const [added, setAdded] = react.useState({});
@@ -831,7 +832,7 @@ function ConnectedWorkflowRunner({
831
832
  () => ({
832
833
  me: user?.externalId,
833
834
  openDocument: onOpenDocument && ((ref) => {
834
- const { id, version } = chunkHM23LXUP_cjs.splitDocRef(ref);
835
+ const { id, version } = chunk6AALMYPS_cjs.splitDocRef(ref);
835
836
  onOpenDocument(id, version);
836
837
  }),
837
838
  openDraft: onOpenDraft && ((draftId) => onOpenDraft(draftId)),
@@ -841,7 +842,7 @@ function ConnectedWorkflowRunner({
841
842
  const w = state.waiting;
842
843
  if (w?.doc_ext_id) setDialog({ kind: "sign", docRef: w.doc_ext_id });
843
844
  }),
844
- openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(chunkHM23LXUP_cjs.splitDocRef(ref).id) ?? "" })),
845
+ openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(chunk6AALMYPS_cjs.splitDocRef(ref).id) ?? "" })),
845
846
  openReview: hostActions?.openReview ?? ((tags, documents) => setDialog({ kind: "review", tags, documents }))
846
847
  }),
847
848
  [user?.externalId, onOpenDocument, onOpenDraft, onOpenMessage, hostActions, nameOfDoc, inThread]
@@ -977,7 +978,7 @@ function ConnectedWorkflowRunner({
977
978
  );
978
979
  };
979
980
  const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
980
- chunkLC2KJSUS_cjs.WorkflowRunner,
981
+ chunkSARREDFP_cjs.WorkflowRunner,
981
982
  {
982
983
  people,
983
984
  ...runnerProps,
@@ -1023,10 +1024,10 @@ function ConnectedWorkflowRunner({
1023
1024
  ) }),
1024
1025
  inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1025
1026
  /* @__PURE__ */ jsxRuntime.jsx(
1026
- chunkLC2KJSUS_cjs.WorkflowStepBar,
1027
+ chunkSARREDFP_cjs.WorkflowStepBar,
1027
1028
  {
1028
1029
  run: view,
1029
- levels: chunkHM23LXUP_cjs.stepLevels(view.steps),
1030
+ levels: chunk6AALMYPS_cjs.stepLevels(view.steps),
1030
1031
  doneTitle: (workflow.run.kind === "steps" ? workflow.run.completion?.title : void 0) ?? runnerProps.labels?.complete ?? "Done",
1031
1032
  icon: (key) => key && runnerProps.renderIcon ? runnerProps.renderIcon(key) : void 0,
1032
1033
  tid: (suffix) => `${testIdPrefix}-${suffix}`
@@ -1046,13 +1047,13 @@ function ConnectedWorkflowRunner({
1046
1047
  return state ? [[s.id, state]] : [];
1047
1048
  })
1048
1049
  );
1049
- const ref = chunkHM23LXUP_cjs.stepDocuments(view.steps, states, id).at(-1);
1050
+ const ref = chunk6AALMYPS_cjs.stepDocuments(view.steps, states, id).at(-1);
1050
1051
  const open = actions.openDocument ?? actions.openRedline;
1051
1052
  return {
1052
1053
  title: step.title,
1053
- kind: chunkHM23LXUP_cjs.stepKindOf(step),
1054
+ kind: chunk6AALMYPS_cjs.stepKindOf(step),
1054
1055
  phase: view.phaseOf(id),
1055
- document: ref && open ? { name: nameOfDoc(chunkHM23LXUP_cjs.splitDocRef(ref).id) ?? ref, onOpen: () => open(ref) } : void 0
1056
+ document: ref && open ? { name: nameOfDoc(chunk6AALMYPS_cjs.splitDocRef(ref).id) ?? ref, onOpen: () => open(ref) } : void 0
1056
1057
  };
1057
1058
  },
1058
1059
  targetMessageId: target,
@@ -1119,7 +1120,7 @@ function ReviewNotify({
1119
1120
  testId
1120
1121
  }) {
1121
1122
  const arbi = react$1.useArbi();
1122
- const { status, user, ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
1123
+ const { status, user, ensureWorkspaceOpen } = chunkARDHLU73_cjs.useConnection();
1123
1124
  const { data: members = [] } = react$1.useWorkspaceUsers(workspaceId, {
1124
1125
  enabled: status === "authenticated" && !!workspaceId,
1125
1126
  beforeFetch: ensureWorkspaceOpen
@@ -1196,7 +1197,7 @@ function ConnectedTagTable({
1196
1197
  ...props
1197
1198
  }) {
1198
1199
  const arbi = react$1.useArbi();
1199
- const { workspaceId, status, ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
1200
+ const { workspaceId, status, ensureWorkspaceOpen } = chunkARDHLU73_cjs.useConnection();
1200
1201
  const schema = react$1.useTagKindSchema(kind);
1201
1202
  const rows = react$1.useTags(workspaceId ?? void 0, {
1202
1203
  kind,
@@ -1224,7 +1225,7 @@ function ConnectedTagTable({
1224
1225
  const fail = (e) => setError(e instanceof Error ? e.message : String(e));
1225
1226
  const snapshot = (data) => {
1226
1227
  const title = exportTitle ?? KIND_TITLES[kind];
1227
- const bytes = chunkD4YR56FV_cjs.tagTableDocx(data, {
1228
+ const bytes = chunkKYDRUFWT_cjs.tagTableDocx(data, {
1228
1229
  title,
1229
1230
  nameOf: (id) => people.find((p) => p.value === id)?.label
1230
1231
  });
@@ -1234,7 +1235,7 @@ function ConnectedTagTable({
1234
1235
  };
1235
1236
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
1236
1237
  /* @__PURE__ */ jsxRuntime.jsx(
1237
- chunkD4YR56FV_cjs.TagTable,
1238
+ chunkKYDRUFWT_cjs.TagTable,
1238
1239
  {
1239
1240
  ...props,
1240
1241
  table,
@@ -1300,7 +1301,7 @@ function ConnectedTagTable({
1300
1301
  ] });
1301
1302
  }
1302
1303
  function useConnectedShellWorkspaces(options = {}) {
1303
- const { workspaceId, setWorkspace } = chunkMUMH3Z6K_cjs.useConnection();
1304
+ const { workspaceId, setWorkspace } = chunkARDHLU73_cjs.useConnection();
1304
1305
  const query = react$1.useWorkspaces();
1305
1306
  return react$1.useShellWorkspaces({
1306
1307
  ...options,
@@ -1320,21 +1321,25 @@ var AVATAR_PROBLEMS = {
1320
1321
  "too-large": "Image must be 5 MB or smaller",
1321
1322
  unreadable: "Couldn't read that image \u2014 try a different file"
1322
1323
  };
1323
- function ConnectedProfileCard({ notify: notify3, title = "Profile" }) {
1324
+ function ConnectedProfileCard({
1325
+ title = "Profile",
1326
+ avatarClassName = "bg-primary text-primary-foreground",
1327
+ children
1328
+ }) {
1329
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1324
1330
  const { data: profile } = react$1.useProfile();
1325
1331
  const updateProfile = react$1.useUpdateProfile();
1326
1332
  const requestEmailChange = react$1.useRequestEmailChange();
1327
1333
  const confirmEmailChange = react$1.useConfirmEmailChange();
1328
- const { user } = chunkMUMH3Z6K_cjs.useConnection();
1329
1334
  const name = react$1.useNameEditor({
1330
1335
  givenName: profile?.givenName,
1331
1336
  familyName: profile?.familyName,
1332
1337
  save: async (next) => {
1333
1338
  try {
1334
1339
  await updateProfile.mutateAsync(next);
1335
- notify3?.("Name updated", "success");
1340
+ notify("Name updated", "success");
1336
1341
  } catch (e) {
1337
- notify3?.("Failed to update name", "error");
1342
+ notify("Failed to update name", "error");
1338
1343
  throw e;
1339
1344
  }
1340
1345
  }
@@ -1343,89 +1348,96 @@ function ConnectedProfileCard({ notify: notify3, title = "Profile" }) {
1343
1348
  upload: async (picture) => {
1344
1349
  try {
1345
1350
  await updateProfile.mutateAsync({ picture });
1346
- notify3?.("Profile picture updated", "success");
1351
+ notify("Profile picture updated", "success");
1347
1352
  } catch (e) {
1348
- notify3?.("Failed to update picture", "error");
1353
+ notify("Failed to update picture", "error");
1349
1354
  throw e;
1350
1355
  }
1351
1356
  },
1352
- onProblem: (problem) => notify3?.(AVATAR_PROBLEMS[problem], "error")
1357
+ onProblem: (problem) => notify(AVATAR_PROBLEMS[problem], "error")
1353
1358
  });
1354
1359
  const email = react$1.useEmailChange({
1355
1360
  requestCode: async (address) => {
1356
1361
  try {
1357
1362
  await requestEmailChange.mutateAsync(address);
1358
- notify3?.("Verification code sent to your new email", "success");
1363
+ notify("Verification code sent to your new email", "success");
1359
1364
  } catch (e) {
1360
- notify3?.(errorText(e, "Failed to send verification code"), "error");
1365
+ notify(errorText(e, "Failed to send verification code"), "error");
1361
1366
  throw e;
1362
1367
  }
1363
1368
  },
1364
1369
  confirm: async (args) => {
1365
1370
  try {
1366
1371
  await confirmEmailChange.mutateAsync(args);
1367
- notify3?.("Email address updated", "success");
1372
+ notify("Email address updated", "success");
1368
1373
  } catch (e) {
1369
- notify3?.(errorText(e, "Invalid or expired verification code"), "error");
1374
+ notify(errorText(e, "Invalid or expired verification code"), "error");
1370
1375
  throw e;
1371
1376
  }
1372
1377
  }
1373
1378
  });
1374
- const display = profile?.fullName || user?.name || "Unnamed";
1375
- return /* @__PURE__ */ jsxRuntime.jsx(chunkOR4CO743_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: /* @__PURE__ */ jsxRuntime.jsx(
1376
- chunkOR4CO743_cjs.ProfileCard,
1377
- {
1378
- avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1379
- /* @__PURE__ */ jsxRuntime.jsx(
1380
- chunkOR4CO743_cjs.AvatarPicker,
1381
- {
1382
- pictureUrl: profile?.picture ?? user?.picture,
1383
- initials: chunkKDG6FER6_cjs.initials(display),
1384
- fallbackClassName: "bg-primary text-primary-foreground",
1385
- isUploading: avatar.isUploading,
1386
- onFileChosen: avatar.onFileChosen
1387
- }
1388
- ),
1389
- /* @__PURE__ */ jsxRuntime.jsx(
1390
- react$1.ImageCropModal,
1391
- {
1392
- open: avatar.pendingImage !== null,
1393
- image: avatar.pendingImage,
1394
- title: "Crop your photo",
1395
- aspect: 1,
1396
- cropShape: "round",
1397
- output: { maxSize: 128, mimeType: "image/jpeg", quality: 0.85 },
1398
- onComplete: avatar.onCropComplete,
1399
- onCancel: avatar.onCropCancel
1400
- }
1401
- )
1402
- ] }),
1403
- name: { ...name, display, isSaving: name.isSaving },
1404
- email: profile?.email ?? user?.email ?? "",
1405
- isSso: profile?.isSso ?? false,
1406
- isVerified: profile?.isIdentityVerified ?? false,
1407
- onStartEmailChange: email.onStart,
1408
- emailChange: email.isOpen ? email : void 0
1409
- }
1410
- ) });
1379
+ const display = profile?.fullName || "Unnamed";
1380
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkAAFX64WD_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: [
1381
+ /* @__PURE__ */ jsxRuntime.jsx(
1382
+ chunkAAFX64WD_cjs.ProfileCard,
1383
+ {
1384
+ avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1385
+ /* @__PURE__ */ jsxRuntime.jsx(
1386
+ chunkAAFX64WD_cjs.AvatarPicker,
1387
+ {
1388
+ pictureUrl: profile?.picture,
1389
+ initials: chunkKDG6FER6_cjs.initials(display),
1390
+ fallbackClassName: avatarClassName,
1391
+ isUploading: avatar.isUploading,
1392
+ onFileChosen: avatar.onFileChosen
1393
+ }
1394
+ ),
1395
+ /* @__PURE__ */ jsxRuntime.jsx(
1396
+ react$1.ImageCropModal,
1397
+ {
1398
+ open: avatar.pendingImage !== null,
1399
+ image: avatar.pendingImage,
1400
+ title: "Crop your photo",
1401
+ aspect: 1,
1402
+ cropShape: "round",
1403
+ output: { maxSize: 128, mimeType: "image/jpeg", quality: 0.85 },
1404
+ onComplete: avatar.onCropComplete,
1405
+ onCancel: avatar.onCropCancel
1406
+ }
1407
+ )
1408
+ ] }),
1409
+ name: { ...name, display, isSaving: name.isSaving },
1410
+ email: profile?.email ?? "",
1411
+ isSso: profile?.isSso ?? false,
1412
+ isVerified: profile?.isIdentityVerified ?? false,
1413
+ onStartEmailChange: email.onStart,
1414
+ emailChange: email.isOpen ? email : void 0
1415
+ }
1416
+ ),
1417
+ children
1418
+ ] });
1411
1419
  }
1412
1420
  function ConnectedIdentityVerification({
1413
- notify: notify3,
1414
- labels
1421
+ labels,
1422
+ onManageBilling,
1423
+ formatPrice
1415
1424
  }) {
1425
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1416
1426
  const { data: profile } = react$1.useProfile();
1417
1427
  const flow = react$1.useIdentityVerification({
1418
- onVerifiedChange: (verified) => notify3?.(verified ? "Identity verified" : "Verified tick removed", "success"),
1419
- onNameAccepted: () => notify3?.("Name updated to match your ID", "success")
1428
+ formatPrice,
1429
+ onVerifiedChange: (verified) => notify(verified ? "Identity verified" : "Verified tick removed", "success"),
1430
+ onNameAccepted: () => notify("Name updated to match your ID", "success")
1420
1431
  });
1421
1432
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1422
- /* @__PURE__ */ jsxRuntime.jsx(chunkOR4CO743_cjs.IdentityVerificationCard, { flow, labels }),
1433
+ /* @__PURE__ */ jsxRuntime.jsx(chunkAAFX64WD_cjs.IdentityVerificationCard, { flow, labels, onManageBilling }),
1423
1434
  /* @__PURE__ */ jsxRuntime.jsx(
1424
- chunkOR4CO743_cjs.IdentityVerificationDialog,
1435
+ chunkAAFX64WD_cjs.IdentityVerificationDialog,
1425
1436
  {
1426
1437
  flow,
1427
1438
  accountName: profile?.fullName ?? "",
1428
- labels
1439
+ labels,
1440
+ onManageBilling
1429
1441
  }
1430
1442
  )
1431
1443
  ] });
@@ -1433,7 +1445,7 @@ function ConnectedIdentityVerification({
1433
1445
  function ConnectedRequireVerified({ children, labels }) {
1434
1446
  const { data: profile } = react$1.useProfile();
1435
1447
  const flow = react$1.useIdentityVerification();
1436
- return /* @__PURE__ */ jsxRuntime.jsx(chunkOR4CO743_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
1448
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkAAFX64WD_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
1437
1449
  }
1438
1450
  function defaultUnmetPasswordRequirement(password) {
1439
1451
  if (password.length < 8) return "Minimum 8 characters";
@@ -1443,25 +1455,59 @@ function defaultUnmetPasswordRequirement(password) {
1443
1455
  if (!/[0-9]/.test(password)) return "At least one number";
1444
1456
  return null;
1445
1457
  }
1446
- function ConnectedSecuritySection({
1447
- notify: notify3,
1458
+ function ConnectedPasswordChangeDialog({
1459
+ open,
1460
+ onClose,
1448
1461
  getUnmetRequirement = defaultUnmetPasswordRequirement,
1449
- children
1462
+ recoveryMode = false,
1463
+ onRecoveryComplete
1450
1464
  }) {
1451
- const [open, setOpen] = react.useState(false);
1465
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1452
1466
  const change = react$1.usePasswordChange();
1453
1467
  const form = react$1.usePasswordChangeForm({
1468
+ recoveryMode,
1454
1469
  getUnmetRequirement,
1455
1470
  submit: async (vars) => {
1456
1471
  await change.mutateAsync(vars);
1457
- notify3?.("Password changed successfully", "success");
1472
+ notify(
1473
+ recoveryMode ? "Account recovered and password set successfully" : "Password changed successfully",
1474
+ "success"
1475
+ );
1458
1476
  },
1459
- onClose: () => setOpen(false)
1477
+ onClose,
1478
+ onRecoveryComplete
1460
1479
  });
1461
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkOR4CO743_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
1462
- /* @__PURE__ */ jsxRuntime.jsxs(chunkOR4CO743_cjs.SettingsCard, { padding: "sm", children: [
1480
+ return /* @__PURE__ */ jsxRuntime.jsx(
1481
+ chunkAAFX64WD_cjs.PasswordChangeDialog,
1482
+ {
1483
+ open,
1484
+ onClose: form.onCancel,
1485
+ recoveryMode,
1486
+ currentPassword: form.currentPassword,
1487
+ onCurrentPasswordChange: form.onCurrentPasswordChange,
1488
+ newPassword: form.newPassword,
1489
+ onNewPasswordChange: form.onNewPasswordChange,
1490
+ confirmPassword: form.confirmPassword,
1491
+ onConfirmPasswordChange: form.onConfirmPasswordChange,
1492
+ getUnmetRequirement,
1493
+ error: form.error,
1494
+ isProcessing: form.isProcessing,
1495
+ isSubmitDisabled: form.isSubmitDisabled,
1496
+ onSubmit: form.onSubmit,
1497
+ isChanged: form.isChanged,
1498
+ onDone: form.onDone
1499
+ }
1500
+ );
1501
+ }
1502
+ function ConnectedSecuritySection({
1503
+ getUnmetRequirement,
1504
+ children
1505
+ }) {
1506
+ const [open, setOpen] = react.useState(false);
1507
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkAAFX64WD_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
1508
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkAAFX64WD_cjs.SettingsCard, { padding: "sm", children: [
1463
1509
  /* @__PURE__ */ jsxRuntime.jsx(
1464
- chunkOR4CO743_cjs.SettingsActionRow,
1510
+ chunkAAFX64WD_cjs.SettingsActionRow,
1465
1511
  {
1466
1512
  title: "Change password",
1467
1513
  description: "Used to sign in and to unlock your account key. Changing it keeps everything readable and re-encrypts nothing.",
@@ -1472,67 +1518,51 @@ function ConnectedSecuritySection({
1472
1518
  children
1473
1519
  ] }),
1474
1520
  /* @__PURE__ */ jsxRuntime.jsx(
1475
- chunkOR4CO743_cjs.PasswordChangeDialog,
1521
+ ConnectedPasswordChangeDialog,
1476
1522
  {
1477
1523
  open,
1478
- onClose: form.onCancel,
1479
- recoveryMode: false,
1480
- currentPassword: form.currentPassword,
1481
- onCurrentPasswordChange: form.onCurrentPasswordChange,
1482
- newPassword: form.newPassword,
1483
- onNewPasswordChange: form.onNewPasswordChange,
1484
- confirmPassword: form.confirmPassword,
1485
- onConfirmPasswordChange: form.onConfirmPasswordChange,
1486
- getUnmetRequirement,
1487
- error: form.error,
1488
- isProcessing: form.isProcessing,
1489
- isSubmitDisabled: form.isSubmitDisabled,
1490
- onSubmit: form.onSubmit,
1491
- isChanged: form.isChanged,
1492
- onDone: form.onDone
1524
+ onClose: () => setOpen(false),
1525
+ getUnmetRequirement
1493
1526
  }
1494
1527
  )
1495
1528
  ] });
1496
1529
  }
1497
1530
  function ConnectedNotificationPreferences({
1498
- categories = chunkOR4CO743_cjs.EMAIL_NOTIFICATION_CATEGORIES,
1531
+ categories = chunkAAFX64WD_cjs.EMAIL_NOTIFICATION_CATEGORIES,
1499
1532
  title = "Notifications"
1500
1533
  }) {
1501
1534
  const keys = react.useMemo(
1502
- () => categories === chunkOR4CO743_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkOR4CO743_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
1535
+ () => categories === chunkAAFX64WD_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkAAFX64WD_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
1503
1536
  [categories]
1504
1537
  );
1505
1538
  const prefs = react$1.useNotificationPreferences(keys);
1506
- return /* @__PURE__ */ jsxRuntime.jsx(chunkOR4CO743_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkOR4CO743_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
1507
- chunkOR4CO743_cjs.NotificationCategoryList,
1539
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkAAFX64WD_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkAAFX64WD_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
1540
+ chunkAAFX64WD_cjs.NotificationCategoryList,
1508
1541
  {
1509
1542
  masterId: "emailNotifications",
1510
1543
  masterTitle: "Email Notifications",
1511
1544
  masterDescription: "Email me about activity when I\u2019m away",
1512
1545
  masterChecked: prefs.masterChecked,
1513
1546
  onMasterChange: prefs.setAll,
1514
- categories: chunkOR4CO743_cjs.toNotificationCategories(prefs.checked, categories),
1547
+ categories: chunkAAFX64WD_cjs.toNotificationCategories(prefs.checked, categories),
1515
1548
  onCategoryChange: prefs.setCategory
1516
1549
  }
1517
1550
  ) }) });
1518
1551
  }
1519
- function ConnectedSessionsRow({
1520
- notify: notify3,
1521
- confirm,
1522
- renderSessionIcon
1523
- }) {
1552
+ function ConnectedSessionsRow({ renderSessionIcon }) {
1553
+ const { notify, confirm } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1524
1554
  const [open, setOpen] = react.useState(false);
1525
1555
  const sessions = react$1.useSessions({ enabled: open });
1526
1556
  const currentSessionId = react$1.useCurrentSessionId();
1527
1557
  const terminate = react$1.useTerminateSession();
1528
- const views = chunkOR4CO743_cjs.toActiveSessionViews(sessions.data ?? [], {
1558
+ const views = chunkAAFX64WD_cjs.toActiveSessionViews(sessions.data ?? [], {
1529
1559
  currentSessionId,
1530
1560
  terminatingId: terminate.isPending ? terminate.variables : null,
1531
1561
  renderIcon: renderSessionIcon
1532
1562
  });
1533
1563
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1534
1564
  /* @__PURE__ */ jsxRuntime.jsx(
1535
- chunkOR4CO743_cjs.SettingsRow,
1565
+ chunkAAFX64WD_cjs.SettingsRow,
1536
1566
  {
1537
1567
  label: "Active sessions",
1538
1568
  description: "Devices and agents currently signed in to your account.",
@@ -1554,7 +1584,7 @@ function ConnectedSessionsRow({
1554
1584
  }
1555
1585
  ),
1556
1586
  /* @__PURE__ */ jsxRuntime.jsx(
1557
- chunkOR4CO743_cjs.ActiveSessionsDialog,
1587
+ chunkAAFX64WD_cjs.ActiveSessionsDialog,
1558
1588
  {
1559
1589
  open,
1560
1590
  onOpenChange: setOpen,
@@ -1564,14 +1594,15 @@ function ConnectedSessionsRow({
1564
1594
  void (async () => {
1565
1595
  const view = views.find((v) => v.id === id);
1566
1596
  const label = view?.detail.split(" \xB7 ")[0];
1567
- const ok = await confirm?.(
1568
- `End the session on ${label}? It will be signed out immediately.`
1569
- ) ?? true;
1597
+ const ok = await confirm({
1598
+ title: "End session",
1599
+ message: `End the session on ${label}? It will be signed out immediately.`
1600
+ });
1570
1601
  if (!ok) return;
1571
1602
  try {
1572
1603
  await terminate.mutateAsync(id);
1573
1604
  } catch {
1574
- notify3?.("Failed to end session. Please try again.", "error");
1605
+ notify("Failed to end session. Please try again.", "error");
1575
1606
  }
1576
1607
  })();
1577
1608
  }
@@ -1582,47 +1613,50 @@ function ConnectedSessionsRow({
1582
1613
  function ConnectedLogoutDialog({
1583
1614
  open,
1584
1615
  onClose,
1585
- isOnline = true,
1616
+ canLogoutAll = true,
1617
+ confirmSignOut,
1586
1618
  renderSessionIcon
1587
1619
  }) {
1588
- const { logout } = chunkMUMH3Z6K_cjs.useConnection();
1589
1620
  const sessions = react$1.useSessions({ enabled: open });
1590
- const logoutAll = react$1.useLogoutAllSessions();
1621
+ const signOut = react$1.useSignOut();
1622
+ const isOnline = documentTools.useIsOnline();
1623
+ const run = async (everywhere) => {
1624
+ onClose();
1625
+ if (confirmSignOut && !await confirmSignOut()) return;
1626
+ signOut.mutate({ everywhere, reason: "manual" });
1627
+ };
1591
1628
  return /* @__PURE__ */ jsxRuntime.jsx(
1592
- chunkOR4CO743_cjs.LogoutDialog,
1629
+ chunkAAFX64WD_cjs.LogoutDialog,
1593
1630
  {
1594
1631
  open,
1595
1632
  onClose,
1596
- onLogoutThis: () => {
1597
- onClose();
1598
- logout();
1599
- },
1600
- onLogoutAll: () => {
1601
- onClose();
1602
- void logoutAll.mutateAsync().finally(logout);
1603
- },
1604
- canLogoutAll: true,
1633
+ onLogoutThis: () => void run(false),
1634
+ onLogoutAll: () => void run(true),
1635
+ canLogoutAll,
1605
1636
  isOnline,
1606
- sessions: chunkOR4CO743_cjs.toLogoutSessionViews(sessions.data ?? []),
1637
+ sessions: chunkAAFX64WD_cjs.toLogoutSessionViews(sessions.data ?? []),
1607
1638
  renderSessionIcon
1608
1639
  }
1609
1640
  );
1610
1641
  }
1611
- function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
1642
+ function ConnectedDangerZone({ renderSubscriptionLink }) {
1643
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1612
1644
  const [zoneOpen, setZoneOpen] = react.useState(false);
1613
1645
  const [dialogOpen, setDialogOpen] = react.useState(false);
1614
- const { user, logout } = chunkMUMH3Z6K_cjs.useConnection();
1646
+ const { data: profile } = react$1.useProfile();
1647
+ const userEmail = profile?.email ?? "";
1615
1648
  const remove = react$1.useDeleteAccount();
1649
+ const signOut = react$1.useSignOut();
1616
1650
  const flow = react$1.useDeleteAccountFlow({
1617
- userEmail: user?.email ?? "",
1651
+ userEmail,
1618
1652
  remove: () => remove.mutateAsync(),
1619
1653
  onClose: () => setDialogOpen(false),
1620
- onDeleted: logout,
1621
- onError: () => notify3?.("Failed to delete account. Please try again.", "error")
1654
+ onDeleted: () => signOut.mutate({ reason: "account-deleted" }),
1655
+ onError: () => notify("Failed to delete account. Please try again.", "error")
1622
1656
  });
1623
1657
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1624
1658
  /* @__PURE__ */ jsxRuntime.jsx(
1625
- chunkOR4CO743_cjs.SettingsDangerZone,
1659
+ chunkAAFX64WD_cjs.SettingsDangerZone,
1626
1660
  {
1627
1661
  isOpen: zoneOpen,
1628
1662
  onToggle: () => setZoneOpen((o) => !o),
@@ -1633,7 +1667,7 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
1633
1667
  {
1634
1668
  variant: "destructive",
1635
1669
  size: "sm",
1636
- disabled: !user?.email,
1670
+ disabled: !userEmail,
1637
1671
  onClick: () => setDialogOpen(true),
1638
1672
  "data-testid": "delete-account-button",
1639
1673
  children: "Delete Account"
@@ -1642,15 +1676,15 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
1642
1676
  }
1643
1677
  ),
1644
1678
  /* @__PURE__ */ jsxRuntime.jsx(
1645
- chunkOR4CO743_cjs.DeleteAccountDialog,
1679
+ chunkAAFX64WD_cjs.DeleteAccountDialog,
1646
1680
  {
1647
1681
  open: dialogOpen,
1648
1682
  onClose: flow.onClose,
1649
1683
  step: flow.step,
1650
- blockers: chunkOR4CO743_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
1684
+ blockers: chunkAAFX64WD_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
1651
1685
  onContinue: flow.onContinue,
1652
1686
  onBack: flow.onBack,
1653
- userEmail: user?.email ?? "",
1687
+ userEmail,
1654
1688
  confirmEmail: flow.confirmEmail,
1655
1689
  onConfirmEmailChange: flow.onConfirmEmailChange,
1656
1690
  isDeleting: flow.isDeleting,
@@ -1661,7 +1695,8 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
1661
1695
  }
1662
1696
  function useConnectedDocxNotifications(onOpen) {
1663
1697
  const arbi = react$1.useArbi();
1664
- const { status, user, apiUrl } = chunkMUMH3Z6K_cjs.useConnection();
1698
+ const { status, user, apiUrl } = chunkARDHLU73_cjs.useConnection();
1699
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1665
1700
  const queries = reactQuery.useQueryClient();
1666
1701
  const source = `docx-mentions:${apiUrl}:${user?.externalId || ""}`;
1667
1702
  const queryKey = ["docx-mentions", apiUrl, user?.externalId];
@@ -1693,8 +1728,9 @@ function useConnectedDocxNotifications(onOpen) {
1693
1728
  source,
1694
1729
  onSelect: () => {
1695
1730
  void Promise.resolve(onOpen({ documentId, commentId, workspaceId })).catch(
1696
- (error) => react$1.notify.error(
1697
- error instanceof Error ? error.message : "Could not open the document."
1731
+ (error) => notify(
1732
+ error instanceof Error ? error.message : "Could not open the document.",
1733
+ "error"
1698
1734
  )
1699
1735
  );
1700
1736
  }
@@ -1704,13 +1740,13 @@ function useConnectedDocxNotifications(onOpen) {
1704
1740
  }
1705
1741
  shell.useNotify.getState().syncSource(source, items);
1706
1742
  return () => shell.useNotify.getState().syncSource(source, []);
1707
- }, [data, status, user?.externalId, source, onOpen]);
1743
+ }, [data, status, user?.externalId, source, onOpen, notify]);
1708
1744
  const markRead = async (ids) => {
1709
1745
  try {
1710
1746
  await arbi.notifications.markRead(ids);
1711
1747
  await queries.invalidateQueries({ queryKey });
1712
1748
  } catch {
1713
- react$1.notify.error("Could not mark document mentions read.");
1749
+ notify("Could not mark document mentions read.", "error");
1714
1750
  }
1715
1751
  };
1716
1752
  return {
@@ -1725,7 +1761,8 @@ function useConnectedDocxNotifications(onOpen) {
1725
1761
  };
1726
1762
  }
1727
1763
  function useConnectedWorkNotifications(onOpen) {
1728
- const { status, user, apiUrl } = chunkMUMH3Z6K_cjs.useConnection();
1764
+ const { status, user, apiUrl } = chunkARDHLU73_cjs.useConnection();
1765
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1729
1766
  const source = `work-notifications:${apiUrl}:${user?.externalId || ""}`;
1730
1767
  const { data = [], markRead: persistRead } = react$1.useWorkNotifications({
1731
1768
  apiUrl,
@@ -1748,8 +1785,9 @@ function useConnectedWorkNotifications(onOpen) {
1748
1785
  source,
1749
1786
  onSelect: () => {
1750
1787
  void Promise.resolve().then(() => onOpen(mapped.target)).catch(
1751
- (error) => react$1.notify.error(
1752
- error instanceof Error ? error.message : "Could not open this notification."
1788
+ (error) => notify(
1789
+ error instanceof Error ? error.message : "Could not open this notification.",
1790
+ "error"
1753
1791
  )
1754
1792
  );
1755
1793
  }
@@ -1757,13 +1795,13 @@ function useConnectedWorkNotifications(onOpen) {
1757
1795
  }
1758
1796
  shell.useNotify.getState().syncSource(source, items);
1759
1797
  return () => shell.useNotify.getState().syncSource(source, []);
1760
- }, [data, status, user?.externalId, source, onOpen]);
1798
+ }, [data, status, user?.externalId, source, onOpen, notify]);
1761
1799
  const markRead = async (ids) => {
1762
1800
  if (!ids.length) return;
1763
1801
  try {
1764
1802
  await persistRead(ids);
1765
1803
  } catch {
1766
- react$1.notify.error("Could not mark work notifications read.");
1804
+ notify("Could not mark work notifications read.", "error");
1767
1805
  }
1768
1806
  };
1769
1807
  return {
@@ -2136,7 +2174,7 @@ function useWordBody({
2136
2174
  // eslint-disable-next-line react-hooks/exhaustive-deps
2137
2175
  [word.adapter, client, documentKey]
2138
2176
  );
2139
- chunkSWQX6CTT_cjs.useRegisterOpenDocument({ documentId: roomId });
2177
+ chunkJKB7WT7L_cjs.useRegisterOpenDocument({ documentId: roomId });
2140
2178
  const editor = react$1.useMailDraftEditor();
2141
2179
  const state = () => stateRef.current?.() ?? null;
2142
2180
  return {
@@ -2171,16 +2209,16 @@ var NO_WORD = {
2171
2209
  loadFonts: () => Promise.reject(new Error("No Word editor"))
2172
2210
  }
2173
2211
  };
2174
- function notifySent(notify3, result) {
2212
+ function notifySent(notify, result) {
2175
2213
  const status = result && typeof result === "object" && "delivery_status" in result ? result.delivery_status : null;
2176
2214
  if (status === "bounced")
2177
- notify3("Email couldn't be delivered", "error", { description: "Open it in Sent to see why." });
2215
+ notify("Email couldn't be delivered", "error", { description: "Open it in Sent to see why." });
2178
2216
  else if (status === "partially_bounced")
2179
- notify3("Email couldn't be delivered to every recipient", "error", {
2217
+ notify("Email couldn't be delivered to every recipient", "error", {
2180
2218
  description: "Open it in Sent to see which and why."
2181
2219
  });
2182
- else if (status === "delivered") notify3("Email delivered", "success");
2183
- else notify3("Email queued for delivery", "success");
2220
+ else if (status === "delivered") notify("Email delivered", "success");
2221
+ else notify("Email queued for delivery", "success");
2184
2222
  }
2185
2223
  function MailComposerForm({
2186
2224
  account,
@@ -2197,13 +2235,13 @@ function MailComposerForm({
2197
2235
  localDraftId: initialLocalDraftId,
2198
2236
  offline,
2199
2237
  documents,
2200
- notify: notify3,
2201
2238
  word,
2202
2239
  sessionKey,
2203
2240
  roomId,
2204
2241
  headerSlot
2205
2242
  }) {
2206
2243
  const { client } = react$1.useMailClient();
2244
+ const { notify, confirm } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
2207
2245
  const [to, setTo] = react.useState(initial.to.map((r) => r.email).join("; "));
2208
2246
  const [cc, setCc] = react.useState(initial.cc.map((r) => r.email).join("; "));
2209
2247
  const [showCc, setShowCc] = react.useState(initial.cc.length > 0);
@@ -2338,7 +2376,7 @@ function MailComposerForm({
2338
2376
  setWordPending(true);
2339
2377
  try {
2340
2378
  if (!secure) {
2341
- notifySent(notify3, await wordBody.send({ ...value, request_id: requestId.current }));
2379
+ notifySent(notify, await wordBody.send({ ...value, request_id: requestId.current }));
2342
2380
  onClose();
2343
2381
  return;
2344
2382
  }
@@ -2372,13 +2410,13 @@ function MailComposerForm({
2372
2410
  {
2373
2411
  onSuccess: (result) => {
2374
2412
  if (result && typeof result === "object" && "onDevice" in result) {
2375
- notify3("Saved to your Outbox", "info", {
2413
+ notify("Saved to your Outbox", "info", {
2376
2414
  description: "It will be sent automatically when you're back online."
2377
2415
  });
2378
2416
  onClose();
2379
2417
  return;
2380
2418
  }
2381
- notifySent(notify3, result);
2419
+ notifySent(notify, result);
2382
2420
  if (localDraftId) void offline?.deleteDraft(localDraftId);
2383
2421
  onClose();
2384
2422
  },
@@ -2425,9 +2463,14 @@ function MailComposerForm({
2425
2463
  };
2426
2464
  const close = () => {
2427
2465
  if (busy) return;
2428
- if (!saved && (dirty || !draftId) && (text || subject || to || cc || bcc || attachments.length || bodyChanged) && !window.confirm("Close this message without saving your latest changes?"))
2429
- return;
2430
- onClose();
2466
+ const unsaved = !saved && (dirty || !draftId) && (text || subject || to || cc || bcc || attachments.length || bodyChanged);
2467
+ if (!unsaved) return onClose();
2468
+ void confirm({
2469
+ title: "Discard changes",
2470
+ message: "Close this message without saving your latest changes?"
2471
+ }).then((ok) => {
2472
+ if (ok) onClose();
2473
+ });
2431
2474
  };
2432
2475
  react.useEffect(() => {
2433
2476
  if (closeRequestRef) closeRequestRef.current = close;
@@ -2528,8 +2571,12 @@ function MailComposerForm({
2528
2571
  className: "h-7 shrink-0 text-xs",
2529
2572
  disabled: busy,
2530
2573
  onClick: () => {
2531
- if (window.confirm("Discard your unsaved changes and load the changed draft?"))
2532
- onReload(replacedBy);
2574
+ void confirm({
2575
+ title: "Load changes",
2576
+ message: "Discard your unsaved changes and load the changed draft?"
2577
+ }).then((ok) => {
2578
+ if (ok) onReload(replacedBy);
2579
+ });
2533
2580
  },
2534
2581
  children: "Load changes"
2535
2582
  }
@@ -2780,9 +2827,8 @@ function MailComposerForm({
2780
2827
  }
2781
2828
  );
2782
2829
  }
2783
- var defaultMailNotify = (message, variant, options) => {
2784
- react$1.notify[variant](message, options);
2785
- };
2830
+
2831
+ // src/connection/mail/mailbox.ts
2786
2832
  function resolveMailbox(accounts, mailbox) {
2787
2833
  if (!accounts) return void 0;
2788
2834
  if (mailbox === "native") return accounts.find((a) => a.provider === "native");
@@ -2797,7 +2843,6 @@ function ConnectedMailComposer({
2797
2843
  maxBytes: maxBytesProp,
2798
2844
  ready: readyProp,
2799
2845
  drafts: draftsProp,
2800
- notify: notify3 = defaultMailNotify,
2801
2846
  offline,
2802
2847
  replyTo,
2803
2848
  ...rest
@@ -2851,7 +2896,6 @@ function ConnectedMailComposer({
2851
2896
  maxBytes: maxBytesProp ?? policy.data?.max_attachment_bytes ?? DEFAULT_MAX_BYTES,
2852
2897
  ready,
2853
2898
  drafts: draftsProp ?? draftsList.data?.messages ?? [],
2854
- notify: notify3,
2855
2899
  offline,
2856
2900
  onReload: setReloaded,
2857
2901
  ...rest
@@ -3043,9 +3087,9 @@ function ConnectedMailbox({
3043
3087
  onViewerOpenChange,
3044
3088
  gridState,
3045
3089
  onGridStateChange,
3046
- initialMessageId = null,
3047
- notify: notify3 = defaultMailNotify
3090
+ initialMessageId = null
3048
3091
  }) {
3092
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
3049
3093
  const cache = react$1.useMailCache();
3050
3094
  const { client } = react$1.useMailClient();
3051
3095
  const [savingToWorkspace, setSavingToWorkspace] = react.useState(false);
@@ -3259,7 +3303,7 @@ function ConnectedMailbox({
3259
3303
  new File([await response.blob()], fileName, { type: "message/rfc822" })
3260
3304
  );
3261
3305
  setSavingToWorkspace(false);
3262
- notify3(
3306
+ notify(
3263
3307
  "Email saved to workspace",
3264
3308
  "success",
3265
3309
  documentId && onOpenDocument ? { action: { label: "Open", onClick: () => onOpenDocument(documentId, workspaceId) } } : void 0
@@ -3528,7 +3572,6 @@ function ConnectedMailbox({
3528
3572
  localDraftId: composeLocalDraftId,
3529
3573
  offline,
3530
3574
  documents,
3531
- notify: notify3,
3532
3575
  word,
3533
3576
  sessionKey: `${mailboxKey}-${composeSession}`,
3534
3577
  onChange: setCompose,
@@ -3622,7 +3665,7 @@ function ConnectedMailbox({
3622
3665
  }
3623
3666
  ),
3624
3667
  /* @__PURE__ */ jsxRuntime.jsx(
3625
- chunkZAVEMQ37_cjs.ConfirmDialog,
3668
+ chunkDWZXSPMB_cjs.ConfirmDialog,
3626
3669
  {
3627
3670
  isOpen: confirmDelete !== null,
3628
3671
  onClose: () => setConfirmDelete(null),
@@ -3719,10 +3762,10 @@ function ActiveChat({ agentId, workspaceId }) {
3719
3762
  const chat = react$1.useArbiChat({
3720
3763
  agentId,
3721
3764
  workspaceId,
3722
- activeArtifact: () => chunkSWQX6CTT_cjs.takeOpenDocumentForTurn({ workspaceId })
3765
+ activeArtifact: () => chunkJKB7WT7L_cjs.takeOpenDocumentForTurn({ workspaceId })
3723
3766
  });
3724
3767
  return /* @__PURE__ */ jsxRuntime.jsx(
3725
- chunkWV4IDVDQ_cjs.ChatPage,
3768
+ chunkPJJY6CYL_cjs.ChatPage,
3726
3769
  {
3727
3770
  chat: { ...chat, assistantMode: void 0, setAssistantMode: void 0 },
3728
3771
  documentsRequired: false,
@@ -3784,51 +3827,51 @@ function ConnectedAgentChatPanel({
3784
3827
 
3785
3828
  Object.defineProperty(exports, "ConnectedAssistantDock", {
3786
3829
  enumerable: true,
3787
- get: function () { return chunkFSBY2S4V_cjs.ConnectedAssistantDock; }
3830
+ get: function () { return chunk4QIIDXLF_cjs.ConnectedAssistantDock; }
3788
3831
  });
3789
3832
  Object.defineProperty(exports, "redlineStats", {
3790
3833
  enumerable: true,
3791
- get: function () { return chunkFSBY2S4V_cjs.redlineStats; }
3834
+ get: function () { return chunk4QIIDXLF_cjs.redlineStats; }
3792
3835
  });
3793
3836
  Object.defineProperty(exports, "textToArtifact", {
3794
3837
  enumerable: true,
3795
- get: function () { return chunkFSBY2S4V_cjs.textToArtifact; }
3838
+ get: function () { return chunk4QIIDXLF_cjs.textToArtifact; }
3796
3839
  });
3797
3840
  Object.defineProperty(exports, "toRedlineMarkdown", {
3798
3841
  enumerable: true,
3799
- get: function () { return chunkFSBY2S4V_cjs.toRedlineMarkdown; }
3842
+ get: function () { return chunk4QIIDXLF_cjs.toRedlineMarkdown; }
3800
3843
  });
3801
3844
  Object.defineProperty(exports, "useConnectedAiTask", {
3802
3845
  enumerable: true,
3803
- get: function () { return chunkFSBY2S4V_cjs.useConnectedAiTask; }
3846
+ get: function () { return chunk4QIIDXLF_cjs.useConnectedAiTask; }
3804
3847
  });
3805
3848
  Object.defineProperty(exports, "useConnectedChat", {
3806
3849
  enumerable: true,
3807
- get: function () { return chunkFSBY2S4V_cjs.useConnectedChat; }
3850
+ get: function () { return chunk4QIIDXLF_cjs.useConnectedChat; }
3808
3851
  });
3809
3852
  Object.defineProperty(exports, "useSemanticSearch", {
3810
3853
  enumerable: true,
3811
- get: function () { return chunkFSBY2S4V_cjs.useSemanticSearch; }
3854
+ get: function () { return chunk4QIIDXLF_cjs.useSemanticSearch; }
3812
3855
  });
3813
3856
  Object.defineProperty(exports, "useWorkspaceDocs", {
3814
3857
  enumerable: true,
3815
- get: function () { return chunkFSBY2S4V_cjs.useWorkspaceDocs; }
3858
+ get: function () { return chunk4QIIDXLF_cjs.useWorkspaceDocs; }
3816
3859
  });
3817
3860
  Object.defineProperty(exports, "ConnectionProvider", {
3818
3861
  enumerable: true,
3819
- get: function () { return chunkMUMH3Z6K_cjs.ConnectionProvider; }
3862
+ get: function () { return chunkARDHLU73_cjs.ConnectionProvider; }
3820
3863
  });
3821
3864
  Object.defineProperty(exports, "SESSION_EXPIRED_MESSAGE", {
3822
3865
  enumerable: true,
3823
- get: function () { return chunkMUMH3Z6K_cjs.SESSION_EXPIRED_MESSAGE; }
3866
+ get: function () { return chunkARDHLU73_cjs.SESSION_EXPIRED_MESSAGE; }
3824
3867
  });
3825
3868
  Object.defineProperty(exports, "isAuthenticated", {
3826
3869
  enumerable: true,
3827
- get: function () { return chunkMUMH3Z6K_cjs.isAuthenticated; }
3870
+ get: function () { return chunkARDHLU73_cjs.isAuthenticated; }
3828
3871
  });
3829
3872
  Object.defineProperty(exports, "useConnection", {
3830
3873
  enumerable: true,
3831
- get: function () { return chunkMUMH3Z6K_cjs.useConnection; }
3874
+ get: function () { return chunkARDHLU73_cjs.useConnection; }
3832
3875
  });
3833
3876
  exports.ArbiAppProvider = ArbiAppProvider;
3834
3877
  exports.ConnectedAgentChatPanel = ConnectedAgentChatPanel;
@@ -3841,6 +3884,7 @@ exports.ConnectedMailMessage = ConnectedMailMessage;
3841
3884
  exports.ConnectedMailSetup = ConnectedMailSetup;
3842
3885
  exports.ConnectedMailbox = ConnectedMailbox;
3843
3886
  exports.ConnectedNotificationPreferences = ConnectedNotificationPreferences;
3887
+ exports.ConnectedPasswordChangeDialog = ConnectedPasswordChangeDialog;
3844
3888
  exports.ConnectedProfileCard = ConnectedProfileCard;
3845
3889
  exports.ConnectedRequireVerified = ConnectedRequireVerified;
3846
3890
  exports.ConnectedSecuritySection = ConnectedSecuritySection;
@@ -3855,7 +3899,6 @@ exports.ConnectedWorkspaceNotificationMenu = ConnectedWorkspaceNotificationMenu;
3855
3899
  exports.DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS = DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS;
3856
3900
  exports.StreamedArtifact = StreamedArtifact;
3857
3901
  exports.WorkflowRunThread = WorkflowRunThread;
3858
- exports.defaultMailNotify = defaultMailNotify;
3859
3902
  exports.defaultUnmetPasswordRequirement = defaultUnmetPasswordRequirement;
3860
3903
  exports.resolveMailbox = resolveMailbox;
3861
3904
  exports.useConnectedDocxNotifications = useConnectedDocxNotifications;