@semiont/frontend 0.4.2 → 0.4.3

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 (147) hide show
  1. package/package.json +1 -1
  2. package/standalone/apps/frontend/.next/BUILD_ID +1 -1
  3. package/standalone/apps/frontend/.next/app-path-routes-manifest.json +3 -3
  4. package/standalone/apps/frontend/.next/build-manifest.json +4 -4
  5. package/standalone/apps/frontend/.next/prerender-manifest.json +3 -3
  6. package/standalone/apps/frontend/.next/react-loadable-manifest.json +32 -32
  7. package/standalone/apps/frontend/.next/server/app/[locale]/about/page.js +3 -3
  8. package/standalone/apps/frontend/.next/server/app/[locale]/about/page.js.nft.json +1 -1
  9. package/standalone/apps/frontend/.next/server/app/[locale]/about/page_client-reference-manifest.js +1 -1
  10. package/standalone/apps/frontend/.next/server/app/[locale]/admin/devops/page.js +8 -8
  11. package/standalone/apps/frontend/.next/server/app/[locale]/admin/devops/page.js.nft.json +1 -1
  12. package/standalone/apps/frontend/.next/server/app/[locale]/admin/devops/page_client-reference-manifest.js +1 -1
  13. package/standalone/apps/frontend/.next/server/app/[locale]/admin/exchange/page.js +3 -3
  14. package/standalone/apps/frontend/.next/server/app/[locale]/admin/exchange/page.js.nft.json +1 -1
  15. package/standalone/apps/frontend/.next/server/app/[locale]/admin/exchange/page_client-reference-manifest.js +1 -1
  16. package/standalone/apps/frontend/.next/server/app/[locale]/admin/page.js +3 -3
  17. package/standalone/apps/frontend/.next/server/app/[locale]/admin/page.js.nft.json +1 -1
  18. package/standalone/apps/frontend/.next/server/app/[locale]/admin/page_client-reference-manifest.js +1 -1
  19. package/standalone/apps/frontend/.next/server/app/[locale]/admin/security/page.js +3 -3
  20. package/standalone/apps/frontend/.next/server/app/[locale]/admin/security/page.js.nft.json +1 -1
  21. package/standalone/apps/frontend/.next/server/app/[locale]/admin/security/page_client-reference-manifest.js +1 -1
  22. package/standalone/apps/frontend/.next/server/app/[locale]/admin/users/page.js +8 -8
  23. package/standalone/apps/frontend/.next/server/app/[locale]/admin/users/page.js.nft.json +1 -1
  24. package/standalone/apps/frontend/.next/server/app/[locale]/admin/users/page_client-reference-manifest.js +1 -1
  25. package/standalone/apps/frontend/.next/server/app/[locale]/auth/error/page.js +3 -3
  26. package/standalone/apps/frontend/.next/server/app/[locale]/auth/error/page.js.nft.json +1 -1
  27. package/standalone/apps/frontend/.next/server/app/[locale]/auth/error/page_client-reference-manifest.js +1 -1
  28. package/standalone/apps/frontend/.next/server/app/[locale]/auth/mcp-setup/route.js +1 -1
  29. package/standalone/apps/frontend/.next/server/app/[locale]/auth/mcp-setup/route.js.nft.json +1 -1
  30. package/standalone/apps/frontend/.next/server/app/[locale]/auth/mcp-setup/route_client-reference-manifest.js +1 -1
  31. package/standalone/apps/frontend/.next/server/app/[locale]/auth/signin/page.js +3 -3
  32. package/standalone/apps/frontend/.next/server/app/[locale]/auth/signin/page.js.nft.json +1 -1
  33. package/standalone/apps/frontend/.next/server/app/[locale]/auth/signin/page_client-reference-manifest.js +1 -1
  34. package/standalone/apps/frontend/.next/server/app/[locale]/auth/signup/page.js +3 -3
  35. package/standalone/apps/frontend/.next/server/app/[locale]/auth/signup/page.js.nft.json +1 -1
  36. package/standalone/apps/frontend/.next/server/app/[locale]/auth/signup/page_client-reference-manifest.js +1 -1
  37. package/standalone/apps/frontend/.next/server/app/[locale]/auth/welcome/page.js +3 -3
  38. package/standalone/apps/frontend/.next/server/app/[locale]/auth/welcome/page.js.nft.json +1 -1
  39. package/standalone/apps/frontend/.next/server/app/[locale]/auth/welcome/page_client-reference-manifest.js +1 -1
  40. package/standalone/apps/frontend/.next/server/app/[locale]/know/compose/page.js +6 -6
  41. package/standalone/apps/frontend/.next/server/app/[locale]/know/compose/page.js.nft.json +1 -1
  42. package/standalone/apps/frontend/.next/server/app/[locale]/know/compose/page_client-reference-manifest.js +1 -1
  43. package/standalone/apps/frontend/.next/server/app/[locale]/know/discover/page.js +5 -5
  44. package/standalone/apps/frontend/.next/server/app/[locale]/know/discover/page.js.nft.json +1 -1
  45. package/standalone/apps/frontend/.next/server/app/[locale]/know/discover/page_client-reference-manifest.js +1 -1
  46. package/standalone/apps/frontend/.next/server/app/[locale]/know/page.js +1 -1
  47. package/standalone/apps/frontend/.next/server/app/[locale]/know/page.js.nft.json +1 -1
  48. package/standalone/apps/frontend/.next/server/app/[locale]/know/page_client-reference-manifest.js +1 -1
  49. package/standalone/apps/frontend/.next/server/app/[locale]/know/resource/[id]/page.js +5 -5
  50. package/standalone/apps/frontend/.next/server/app/[locale]/know/resource/[id]/page.js.nft.json +1 -1
  51. package/standalone/apps/frontend/.next/server/app/[locale]/know/resource/[id]/page_client-reference-manifest.js +1 -1
  52. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/entity-tags/page.js +8 -8
  53. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/entity-tags/page.js.nft.json +1 -1
  54. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/entity-tags/page_client-reference-manifest.js +1 -1
  55. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/linked-data/page.js +8 -8
  56. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/linked-data/page.js.nft.json +1 -1
  57. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/linked-data/page_client-reference-manifest.js +1 -1
  58. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/page.js +3 -3
  59. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/page.js.nft.json +1 -1
  60. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/page_client-reference-manifest.js +1 -1
  61. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/recent/page.js +9 -9
  62. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/recent/page.js.nft.json +1 -1
  63. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/recent/page_client-reference-manifest.js +1 -1
  64. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/tag-schemas/page.js +9 -9
  65. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/tag-schemas/page.js.nft.json +1 -1
  66. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/tag-schemas/page_client-reference-manifest.js +1 -1
  67. package/standalone/apps/frontend/.next/server/app/[locale]/page.js +3 -3
  68. package/standalone/apps/frontend/.next/server/app/[locale]/page.js.nft.json +1 -1
  69. package/standalone/apps/frontend/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
  70. package/standalone/apps/frontend/.next/server/app/[locale]/privacy/page.js +2 -2
  71. package/standalone/apps/frontend/.next/server/app/[locale]/privacy/page.js.nft.json +1 -1
  72. package/standalone/apps/frontend/.next/server/app/[locale]/privacy/page_client-reference-manifest.js +1 -1
  73. package/standalone/apps/frontend/.next/server/app/[locale]/terms/page.js +2 -2
  74. package/standalone/apps/frontend/.next/server/app/[locale]/terms/page.js.nft.json +1 -1
  75. package/standalone/apps/frontend/.next/server/app/[locale]/terms/page_client-reference-manifest.js +1 -1
  76. package/standalone/apps/frontend/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  77. package/standalone/apps/frontend/.next/server/app/_global-error.html +1 -1
  78. package/standalone/apps/frontend/.next/server/app/_global-error.rsc +1 -1
  79. package/standalone/apps/frontend/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  80. package/standalone/apps/frontend/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  81. package/standalone/apps/frontend/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  82. package/standalone/apps/frontend/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  83. package/standalone/apps/frontend/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  84. package/standalone/apps/frontend/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  85. package/standalone/apps/frontend/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  86. package/standalone/apps/frontend/.next/server/app/_not-found.html +1 -1
  87. package/standalone/apps/frontend/.next/server/app/_not-found.rsc +1 -1
  88. package/standalone/apps/frontend/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  89. package/standalone/apps/frontend/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  90. package/standalone/apps/frontend/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  91. package/standalone/apps/frontend/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  92. package/standalone/apps/frontend/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  93. package/standalone/apps/frontend/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  94. package/standalone/apps/frontend/.next/server/app/api/auth/[...nextauth]/route.js +1 -1
  95. package/standalone/apps/frontend/.next/server/app/api/auth/[...nextauth]/route.js.nft.json +1 -1
  96. package/standalone/apps/frontend/.next/server/app/api/auth/[...nextauth]/route_client-reference-manifest.js +1 -1
  97. package/standalone/apps/frontend/.next/server/app/api/cookies/consent/route.js +1 -1
  98. package/standalone/apps/frontend/.next/server/app/api/cookies/consent/route.js.nft.json +1 -1
  99. package/standalone/apps/frontend/.next/server/app/api/cookies/consent/route_client-reference-manifest.js +1 -1
  100. package/standalone/apps/frontend/.next/server/app/api/cookies/export/route.js +1 -1
  101. package/standalone/apps/frontend/.next/server/app/api/cookies/export/route.js.nft.json +1 -1
  102. package/standalone/apps/frontend/.next/server/app/api/cookies/export/route_client-reference-manifest.js +1 -1
  103. package/standalone/apps/frontend/.next/server/app/api/resources/[id]/route.js +1 -1
  104. package/standalone/apps/frontend/.next/server/app/api/resources/[id]/route.js.nft.json +1 -1
  105. package/standalone/apps/frontend/.next/server/app/api/resources/[id]/route_client-reference-manifest.js +1 -1
  106. package/standalone/apps/frontend/.next/server/app-paths-manifest.json +3 -3
  107. package/standalone/apps/frontend/.next/server/chunks/{6327.js → 355.js} +10 -10
  108. package/standalone/apps/frontend/.next/server/chunks/5015.js +10 -5
  109. package/standalone/apps/frontend/.next/server/chunks/{3144.js → 5440.js} +717 -522
  110. package/standalone/apps/frontend/.next/server/chunks/730.js +144 -33
  111. package/standalone/apps/frontend/.next/server/chunks/8255.js +8 -8
  112. package/standalone/apps/frontend/.next/server/chunks/8394.js +6 -6
  113. package/standalone/apps/frontend/.next/server/middleware-build-manifest.js +1 -1
  114. package/standalone/apps/frontend/.next/server/middleware-react-loadable-manifest.js +1 -1
  115. package/standalone/apps/frontend/.next/server/pages/404.html +1 -1
  116. package/standalone/apps/frontend/.next/server/pages/500.html +1 -1
  117. package/standalone/apps/frontend/.next/server/server-reference-manifest.json +1 -1
  118. package/standalone/apps/frontend/.next/static/chunks/7249.90de9d0b8e58d1fd.js +1 -0
  119. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/about/{page-f448fe2c22a946c1.js → page-36a8caa614bb409b.js} +1 -1
  120. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/admin/devops/{page-759a2993a0616e7c.js → page-1ca7ed50ccf09110.js} +1 -1
  121. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/admin/exchange/{page-fceacbb4457e1c03.js → page-88da3ee9c5f3e55c.js} +1 -1
  122. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/admin/security/{page-487c30984759b949.js → page-c0c358dc5a31b239.js} +1 -1
  123. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/admin/users/{page-82a4b872efcab6b8.js → page-242c5ca40d8cfdad.js} +1 -1
  124. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/auth/error/{page-fc22ea61f4a00e6c.js → page-2a3580ff60f5cf8a.js} +1 -1
  125. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/auth/signin/{page-e12ce5271ba819c5.js → page-3103f17b15f4a29f.js} +1 -1
  126. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/auth/signup/{page-3a5e7d3f22fc1d14.js → page-f4ee887c37f6c7a1.js} +1 -1
  127. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/auth/welcome/{page-a8f482436dcd92cb.js → page-17b751308fcc346c.js} +1 -1
  128. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/compose/{page-b4e3b18b2e3563e6.js → page-d377d7773b34d2b6.js} +1 -1
  129. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/discover/{page-45f5b3b1e8c8ed2b.js → page-7546934ec25d0e54.js} +1 -1
  130. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/layout-8da5f1382c82517a.js +1 -0
  131. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/resource/[id]/{page-78dff169b8aa5aff.js → page-880c1814b7e76270.js} +1 -1
  132. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/{layout-c072ce8c7aeaa92e.js → layout-b1a244782c4e0bd5.js} +1 -1
  133. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/moderate/entity-tags/{page-4979a2b203414acb.js → page-27daa3fe9c00977c.js} +1 -1
  134. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/moderate/linked-data/{page-082f47c5d22192bb.js → page-aa3d5c362260d076.js} +1 -1
  135. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/moderate/recent/{page-c1f29e875e929262.js → page-b1695fc503599d6f.js} +1 -1
  136. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/moderate/tag-schemas/{page-55ddad6874ae7011.js → page-35187d6da8884290.js} +1 -1
  137. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/{page-88c8b5ca4fe882a8.js → page-1fb566c126836253.js} +1 -1
  138. package/standalone/apps/frontend/.next/static/chunks/common-755716aba1c6723a.js +63 -0
  139. package/standalone/apps/frontend/.next/static/chunks/{webpack-a0284d55d288650f.js → webpack-5c05c98a53141f15.js} +1 -1
  140. package/standalone/apps/frontend/package.json +3 -4
  141. package/standalone/package.json +1 -1
  142. package/standalone/packages/core/package.json +2 -4
  143. package/standalone/apps/frontend/.next/static/chunks/1315.3f76aa23520d903e.js +0 -1
  144. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/layout-47d133bae7c3824a.js +0 -1
  145. package/standalone/apps/frontend/.next/static/chunks/common-1cf094fd8459017a.js +0 -63
  146. /package/standalone/apps/frontend/.next/static/{Mu3aayrKh7TvJ0Olmpr0T → 7fwzlNjbcq2vtnM6QhHnm}/_buildManifest.js +0 -0
  147. /package/standalone/apps/frontend/.next/static/{Mu3aayrKh7TvJ0Olmpr0T → 7fwzlNjbcq2vtnM6QhHnm}/_ssgManifest.js +0 -0
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- exports.id = 3144;
3
- exports.ids = [3144];
2
+ exports.id = 5440;
3
+ exports.ids = [5440];
4
4
  exports.modules = {
5
5
 
6
6
  /***/ 4698:
@@ -1385,24 +1385,58 @@ var en_default = {
1385
1385
 
1386
1386
  /***/ }),
1387
1387
 
1388
- /***/ 35228:
1388
+ /***/ 43869:
1389
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1390
+
1391
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1392
+ /* harmony export */ f9: () => (/* reexport safe */ _home_runner_work_semiont_semiont_packages_api_client_dist_index_js__WEBPACK_IMPORTED_MODULE_0__.f9)
1393
+ /* harmony export */ });
1394
+ /* harmony import */ var _home_runner_work_semiont_semiont_packages_api_client_dist_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(88887);
1395
+
1396
+
1397
+
1398
+ /***/ }),
1399
+
1400
+ /***/ 44389:
1389
1401
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1390
1402
 
1391
1403
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1392
1404
  /* harmony export */ C$: () => (/* binding */ useEventSubscriptions),
1405
+ /* harmony export */ L4: () => (/* binding */ useAuthToken),
1393
1406
  /* harmony export */ Oo: () => (/* binding */ useHoverEmitter),
1394
1407
  /* harmony export */ QY: () => (/* binding */ useBeckonFlow),
1408
+ /* harmony export */ W5: () => (/* binding */ useAttentionStream),
1395
1409
  /* harmony export */ aT: () => (/* binding */ HOVER_DELAY_MS),
1410
+ /* harmony export */ ff: () => (/* binding */ AuthTokenProvider),
1396
1411
  /* harmony export */ i0: () => (/* binding */ createHoverHandlers),
1397
1412
  /* harmony export */ xm: () => (/* binding */ useEventSubscription)
1398
1413
  /* harmony export */ });
1399
- /* harmony import */ var _chunk_2HGWOLVN_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62919);
1414
+ /* harmony import */ var _chunk_5JZFKRLW_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51700);
1400
1415
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71277);
1401
- /* __next_internal_client_entry_do_not_use__ useEventSubscription,useEventSubscriptions,useBeckonFlow,HOVER_DELAY_MS,createHoverHandlers,useHoverEmitter auto */
1416
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92692);
1417
+ /* harmony import */ var _semiont_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4698);
1418
+ /* __next_internal_client_entry_do_not_use__ AuthTokenProvider,useAuthToken,useEventSubscription,useEventSubscriptions,useBeckonFlow,HOVER_DELAY_MS,createHoverHandlers,useHoverEmitter,useAttentionStream auto */
1419
+ // src/contexts/AuthTokenContext.tsx
1420
+
1421
+
1422
+ var AuthTokenContext = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)(void 0);
1423
+ function AuthTokenProvider({ token, children }) {
1424
+ return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(AuthTokenContext.Provider, {
1425
+ value: token,
1426
+ children
1427
+ });
1428
+ }
1429
+ function useAuthToken() {
1430
+ const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(AuthTokenContext);
1431
+ if (context === void 0) {
1432
+ throw new Error("useAuthToken must be used within an AuthTokenProvider");
1433
+ }
1434
+ return context;
1435
+ }
1402
1436
  // src/contexts/useEventSubscription.ts
1403
1437
 
1404
1438
  function useEventSubscription(eventName, handler) {
1405
- const eventBus = (0,_chunk_2HGWOLVN_mjs__WEBPACK_IMPORTED_MODULE_0__/* .useEventBus */ .iX)();
1439
+ const eventBus = (0,_chunk_5JZFKRLW_mjs__WEBPACK_IMPORTED_MODULE_0__/* .useEventBus */ .iX)();
1406
1440
  const handlerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(handler);
1407
1441
  process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{
1408
1442
  handlerRef.current = handler;
@@ -1421,7 +1455,7 @@ function useEventSubscription(eventName, handler) {
1421
1455
  ]);
1422
1456
  }
1423
1457
  function useEventSubscriptions(subscriptions) {
1424
- const eventBus = (0,_chunk_2HGWOLVN_mjs__WEBPACK_IMPORTED_MODULE_0__/* .useEventBus */ .iX)();
1458
+ const eventBus = (0,_chunk_5JZFKRLW_mjs__WEBPACK_IMPORTED_MODULE_0__/* .useEventBus */ .iX)();
1425
1459
  const handlersRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(subscriptions);
1426
1460
  process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{
1427
1461
  handlersRef.current = subscriptions;
@@ -1456,8 +1490,9 @@ function useEventSubscriptions(subscriptions) {
1456
1490
  }
1457
1491
  // src/hooks/useBeckonFlow.ts
1458
1492
 
1493
+
1459
1494
  function useBeckonFlow() {
1460
- const eventBus = (0,_chunk_2HGWOLVN_mjs__WEBPACK_IMPORTED_MODULE_0__/* .useEventBus */ .iX)();
1495
+ const eventBus = (0,_chunk_5JZFKRLW_mjs__WEBPACK_IMPORTED_MODULE_0__/* .useEventBus */ .iX)();
1461
1496
  const [hoveredAnnotationId, setHoveredAnnotationId] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);
1462
1497
  const handleAnnotationHover = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(({ annotationId })=>{
1463
1498
  setHoveredAnnotationId(annotationId);
@@ -1513,7 +1548,7 @@ function createHoverHandlers(emit, delayMs) {
1513
1548
  };
1514
1549
  }
1515
1550
  function useHoverEmitter(annotationId, hoverDelayMs = HOVER_DELAY_MS) {
1516
- const eventBus = (0,_chunk_2HGWOLVN_mjs__WEBPACK_IMPORTED_MODULE_0__/* .useEventBus */ .iX)();
1551
+ const eventBus = (0,_chunk_5JZFKRLW_mjs__WEBPACK_IMPORTED_MODULE_0__/* .useEventBus */ .iX)();
1517
1552
  const currentHoverRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1518
1553
  const timerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1519
1554
  const onMouseEnter = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{
@@ -1557,20 +1592,147 @@ function useHoverEmitter(annotationId, hoverDelayMs = HOVER_DELAY_MS) {
1557
1592
  onMouseLeave
1558
1593
  };
1559
1594
  }
1560
- //# sourceMappingURL=chunk-ZPV43WN2.mjs.map
1595
+ function useAttentionStream() {
1596
+ const client = (0,_chunk_5JZFKRLW_mjs__WEBPACK_IMPORTED_MODULE_0__/* .useApiClient */ .RH)();
1597
+ const token = useAuthToken();
1598
+ const eventBus = (0,_chunk_5JZFKRLW_mjs__WEBPACK_IMPORTED_MODULE_0__/* .useEventBus */ .iX)();
1599
+ const [status, setStatus] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)("disconnected");
1600
+ const streamRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1601
+ const connectingRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
1602
+ const connect = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async ()=>{
1603
+ if (connectingRef.current || streamRef.current) return;
1604
+ connectingRef.current = true;
1605
+ if (!client) {
1606
+ setStatus("error");
1607
+ connectingRef.current = false;
1608
+ return;
1609
+ }
1610
+ setStatus("connecting");
1611
+ try {
1612
+ const stream = client.sse.attentionStream({
1613
+ ...token ? {
1614
+ auth: (0,_semiont_core__WEBPACK_IMPORTED_MODULE_3__/* .accessToken */ .aS)(token)
1615
+ } : {},
1616
+ eventBus
1617
+ });
1618
+ streamRef.current = stream;
1619
+ setStatus("connected");
1620
+ connectingRef.current = false;
1621
+ } catch (error) {
1622
+ console.error("[AttentionStream] Failed to connect:", error);
1623
+ setStatus("error");
1624
+ connectingRef.current = false;
1625
+ }
1626
+ }, [
1627
+ client,
1628
+ token,
1629
+ eventBus
1630
+ ]);
1631
+ const disconnect = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{
1632
+ if (streamRef.current) {
1633
+ streamRef.current.close();
1634
+ streamRef.current = null;
1635
+ }
1636
+ setStatus("disconnected");
1637
+ connectingRef.current = false;
1638
+ }, []);
1639
+ process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{
1640
+ if (client) {
1641
+ connect();
1642
+ }
1643
+ return ()=>disconnect();
1644
+ }, [
1645
+ client
1646
+ ]);
1647
+ return {
1648
+ status
1649
+ };
1650
+ }
1651
+ //# sourceMappingURL=chunk-XMCUHQ2Y.mjs.map
1561
1652
 
1562
1653
 
1563
1654
  /***/ }),
1564
1655
 
1565
- /***/ 43869:
1566
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1656
+ /***/ 51700:
1657
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1658
+
1659
+
1660
+ // EXPORTS
1661
+ __webpack_require__.d(__webpack_exports__, {
1662
+ pq: () => (/* binding */ ApiClientProvider),
1663
+ M_: () => (/* binding */ EventBusProvider),
1664
+ b8: () => (/* binding */ resetEventBusForTesting),
1665
+ RH: () => (/* binding */ useApiClient),
1666
+ iX: () => (/* binding */ useEventBus)
1667
+ });
1668
+
1669
+ // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js
1670
+ var react = __webpack_require__(71277);
1671
+ // EXTERNAL MODULE: ../../packages/core/dist/index.js
1672
+ var dist = __webpack_require__(4698);
1673
+ // EXTERNAL MODULE: ../../packages/api-client/dist/index.js
1674
+ var api_client_dist = __webpack_require__(88887);
1675
+ ;// __barrel_optimize__?names=SemiontApiClient!=!../../packages/api-client/dist/index.js
1676
+
1677
+
1678
+ // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js
1679
+ var react_jsx_runtime = __webpack_require__(92692);
1680
+ ;// ../../packages/react-ui/dist/chunk-5JZFKRLW.mjs
1681
+ /* __next_internal_client_entry_do_not_use__ ApiClientProvider,useApiClient,resetEventBusForTesting,EventBusProvider,useEventBus auto */ // src/contexts/ApiClientContext.tsx
1682
+
1683
+
1684
+
1685
+
1686
+ var ApiClientContext = /*#__PURE__*/ (0,react.createContext)(void 0);
1687
+ function ApiClientProvider({ baseUrl: url, children }) {
1688
+ const client = (0,react.useMemo)(()=>new api_client_dist/* SemiontApiClient */.NE({
1689
+ baseUrl: (0,dist/* baseUrl */.pc)(url),
1690
+ // Use no timeout in test environment to avoid AbortController issues with ky + vitest
1691
+ ... true && {
1692
+ timeout: 3e4
1693
+ }
1694
+ }), [
1695
+ url
1696
+ ]);
1697
+ return /* @__PURE__ */ (0,react_jsx_runtime.jsx)(ApiClientContext.Provider, {
1698
+ value: client,
1699
+ children
1700
+ });
1701
+ }
1702
+ function useApiClient() {
1703
+ const context = (0,react.useContext)(ApiClientContext);
1704
+ if (context === void 0) {
1705
+ throw new Error("useApiClient must be used within an ApiClientProvider");
1706
+ }
1707
+ return context;
1708
+ }
1709
+ // src/contexts/EventBusContext.tsx
1567
1710
 
1568
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1569
- /* harmony export */ f9: () => (/* reexport safe */ _home_runner_work_semiont_semiont_packages_api_client_dist_index_js__WEBPACK_IMPORTED_MODULE_0__.f9)
1570
- /* harmony export */ });
1571
- /* harmony import */ var _home_runner_work_semiont_semiont_packages_api_client_dist_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(88887);
1572
1711
 
1573
1712
 
1713
+ var EventBusContext = /*#__PURE__*/ (0,react.createContext)(null);
1714
+ var globalEventBus = new dist/* EventBus */.l7();
1715
+ function resetEventBusForTesting() {
1716
+ globalEventBus.destroy();
1717
+ globalEventBus = new dist/* EventBus */.l7();
1718
+ return globalEventBus;
1719
+ }
1720
+ function EventBusProvider({ children }) {
1721
+ const eventBus = (0,react.useMemo)(()=>globalEventBus, []);
1722
+ return /* @__PURE__ */ (0,react_jsx_runtime.jsx)(EventBusContext.Provider, {
1723
+ value: eventBus,
1724
+ children
1725
+ });
1726
+ }
1727
+ function useEventBus() {
1728
+ const eventBus = (0,react.useContext)(EventBusContext);
1729
+ if (!eventBus) {
1730
+ throw new Error("useEventBus must be used within EventBusProvider");
1731
+ }
1732
+ return eventBus;
1733
+ }
1734
+ //# sourceMappingURL=chunk-5JZFKRLW.mjs.map
1735
+
1574
1736
 
1575
1737
  /***/ }),
1576
1738
 
@@ -1727,6 +1889,7 @@ __webpack_require__.r(__webpack_exports__);
1727
1889
  /* harmony export */ useAnnotationManager: () => (/* binding */ useAnnotationManager),
1728
1890
  /* harmony export */ useAnnotations: () => (/* binding */ useAnnotations),
1729
1891
  /* harmony export */ useApiClient: () => (/* binding */ useApiClient),
1892
+ /* harmony export */ useAttentionStream: () => (/* binding */ useAttentionStream),
1730
1893
  /* harmony export */ useAuthApi: () => (/* binding */ useAuthApi),
1731
1894
  /* harmony export */ useAuthToken: () => (/* binding */ useAuthToken),
1732
1895
  /* harmony export */ useBeckonFlow: () => (/* binding */ useBeckonFlow),
@@ -2371,6 +2534,10 @@ function() { throw new Error("Attempted to call useAnnotations() from the server
2371
2534
  function() { throw new Error("Attempted to call useApiClient() from the server but useApiClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); },
2372
2535
  "/home/runner/work/semiont/semiont/packages/react-ui/dist/index.mjs",
2373
2536
  "useApiClient",
2537
+ );const useAttentionStream = (0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)(
2538
+ function() { throw new Error("Attempted to call useAttentionStream() from the server but useAttentionStream is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); },
2539
+ "/home/runner/work/semiont/semiont/packages/react-ui/dist/index.mjs",
2540
+ "useAttentionStream",
2374
2541
  );const useAuthApi = (0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)(
2375
2542
  function() { throw new Error("Attempted to call useAuthApi() from the server but useAuthApi is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); },
2376
2543
  "/home/runner/work/semiont/semiont/packages/react-ui/dist/index.mjs",
@@ -2602,101 +2769,7 @@ function getAllowedDomains() {
2602
2769
 
2603
2770
  /***/ }),
2604
2771
 
2605
- /***/ 62919:
2606
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2607
-
2608
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2609
- /* harmony export */ M_: () => (/* binding */ EventBusProvider),
2610
- /* harmony export */ b8: () => (/* binding */ resetEventBusForTesting),
2611
- /* harmony export */ iX: () => (/* binding */ useEventBus)
2612
- /* harmony export */ });
2613
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71277);
2614
- /* harmony import */ var _semiont_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4698);
2615
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92692);
2616
- /* __next_internal_client_entry_do_not_use__ resetEventBusForTesting,EventBusProvider,useEventBus auto */ // src/contexts/EventBusContext.tsx
2617
-
2618
-
2619
-
2620
- var EventBusContext = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
2621
- var globalEventBus = new _semiont_core__WEBPACK_IMPORTED_MODULE_2__/* .EventBus */ .l7();
2622
- function resetEventBusForTesting() {
2623
- globalEventBus.destroy();
2624
- globalEventBus = new _semiont_core__WEBPACK_IMPORTED_MODULE_2__/* .EventBus */ .l7();
2625
- return globalEventBus;
2626
- }
2627
- function EventBusProvider({ children }) {
2628
- const eventBus = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>globalEventBus, []);
2629
- return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(EventBusContext.Provider, {
2630
- value: eventBus,
2631
- children
2632
- });
2633
- }
2634
- function useEventBus() {
2635
- const eventBus = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(EventBusContext);
2636
- if (!eventBus) {
2637
- throw new Error("useEventBus must be used within EventBusProvider");
2638
- }
2639
- return eventBus;
2640
- }
2641
- //# sourceMappingURL=chunk-2HGWOLVN.mjs.map
2642
-
2643
-
2644
- /***/ }),
2645
-
2646
- /***/ 74166:
2647
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2648
-
2649
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2650
- /* harmony export */ P$: () => (/* binding */ __commonJS),
2651
- /* harmony export */ VA: () => (/* binding */ __export),
2652
- /* harmony export */ f1: () => (/* binding */ __toESM),
2653
- /* harmony export */ fd: () => (/* binding */ __glob)
2654
- /* harmony export */ });
2655
- /* __next_internal_client_entry_do_not_use__ __glob,__commonJS,__export,__toESM auto */ var __create = Object.create;
2656
- var __defProp = Object.defineProperty;
2657
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2658
- var __getOwnPropNames = Object.getOwnPropertyNames;
2659
- var __getProtoOf = Object.getPrototypeOf;
2660
- var __hasOwnProp = Object.prototype.hasOwnProperty;
2661
- var __glob = (map)=>(path)=>{
2662
- var fn = map[path];
2663
- if (fn) return fn();
2664
- throw new Error("Module not found in bundle: " + path);
2665
- };
2666
- var __commonJS = (cb, mod)=>function __require() {
2667
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
2668
- exports: {}
2669
- }).exports, mod), mod.exports;
2670
- };
2671
- var __export = (target, all)=>{
2672
- for(var name in all)__defProp(target, name, {
2673
- get: all[name],
2674
- enumerable: true
2675
- });
2676
- };
2677
- var __copyProps = (to, from, except, desc)=>{
2678
- if (from && typeof from === "object" || typeof from === "function") {
2679
- for (let key of __getOwnPropNames(from))if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
2680
- get: ()=>from[key],
2681
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
2682
- });
2683
- }
2684
- return to;
2685
- };
2686
- var __toESM = (mod, isNodeMode, target)=>(target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
2687
- // file that has been converted to a CommonJS file using a Babel-
2688
- // compatible transform (i.e. "__esModule" has not been set), then set
2689
- // "default" to the CommonJS "module.exports" for node compatibility.
2690
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
2691
- value: mod,
2692
- enumerable: true
2693
- }) : target, mod));
2694
- //# sourceMappingURL=chunk-D4GAAQMM.mjs.map
2695
-
2696
-
2697
- /***/ }),
2698
-
2699
- /***/ 76552:
2772
+ /***/ 69792:
2700
2773
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2701
2774
 
2702
2775
  // ESM COMPAT FLAG
@@ -2717,13 +2790,13 @@ __webpack_require__.d(__webpack_exports__, {
2717
2790
  AnnotationHistory: () => (/* binding */ AnnotationHistory),
2718
2791
  AnnotationOverlay: () => (/* binding */ AnnotationOverlay),
2719
2792
  AnnotationProvider: () => (/* binding */ AnnotationProvider),
2720
- ApiClientProvider: () => (/* reexport */ ApiClientProvider),
2793
+ ApiClientProvider: () => (/* reexport */ chunk_5JZFKRLW/* ApiClientProvider */.pq),
2721
2794
  AssessmentEntry: () => (/* binding */ AssessmentEntry),
2722
2795
  AssessmentPanel: () => (/* binding */ AssessmentPanel),
2723
2796
  AssistSection: () => (/* binding */ AssistSection),
2724
2797
  AsyncErrorBoundary: () => (/* binding */ AsyncErrorBoundary),
2725
2798
  AuthErrorDisplay: () => (/* binding */ AuthErrorDisplay),
2726
- AuthTokenProvider: () => (/* binding */ AuthTokenProvider),
2799
+ AuthTokenProvider: () => (/* reexport */ chunk_XMCUHQ2Y/* AuthTokenProvider */.ff),
2727
2800
  BrowseView: () => (/* binding */ BrowseView),
2728
2801
  Button: () => (/* binding */ Button),
2729
2802
  ButtonGroup: () => (/* binding */ ButtonGroup),
@@ -2738,10 +2811,10 @@ __webpack_require__.d(__webpack_exports__, {
2738
2811
  EntityTagsPage: () => (/* binding */ EntityTagsPage),
2739
2812
  EntityTypeBadges: () => (/* binding */ EntityTypeBadges),
2740
2813
  ErrorBoundary: () => (/* binding */ ErrorBoundary),
2741
- EventBusProvider: () => (/* reexport */ chunk_2HGWOLVN/* EventBusProvider */.M_),
2814
+ EventBusProvider: () => (/* reexport */ chunk_5JZFKRLW/* EventBusProvider */.M_),
2742
2815
  ExportCard: () => (/* binding */ ExportCard),
2743
2816
  Footer: () => (/* binding */ Footer),
2744
- HOVER_DELAY_MS: () => (/* reexport */ chunk_ZPV43WN2/* HOVER_DELAY_MS */.aT),
2817
+ HOVER_DELAY_MS: () => (/* reexport */ chunk_XMCUHQ2Y/* HOVER_DELAY_MS */.aT),
2745
2818
  HighlightEntry: () => (/* binding */ HighlightEntry),
2746
2819
  HighlightPanel: () => (/* binding */ HighlightPanel),
2747
2820
  HistoryEvent: () => (/* binding */ HistoryEvent),
@@ -2817,7 +2890,7 @@ __webpack_require__.d(__webpack_exports__, {
2817
2890
  buildTextNodeIndex: () => (/* binding */ buildTextNodeIndex),
2818
2891
  buttonStyles: () => (/* binding */ buttonStyles),
2819
2892
  clearHighlights: () => (/* binding */ clearHighlights),
2820
- createHoverHandlers: () => (/* reexport */ chunk_ZPV43WN2/* createHoverHandlers */.i0),
2893
+ createHoverHandlers: () => (/* reexport */ chunk_XMCUHQ2Y/* createHoverHandlers */.i0),
2821
2894
  cssVariables: () => (/* binding */ cssVariables),
2822
2895
  dispatch401Error: () => (/* binding */ dispatch401Error),
2823
2896
  dispatch403Error: () => (/* binding */ dispatch403Error),
@@ -2840,7 +2913,7 @@ __webpack_require__.d(__webpack_exports__, {
2840
2913
  jsonLightHighlightStyle: () => (/* binding */ jsonLightHighlightStyle),
2841
2914
  jsonLightTheme: () => (/* binding */ jsonLightTheme),
2842
2915
  onAuthEvent: () => (/* binding */ onAuthEvent),
2843
- resetEventBusForTesting: () => (/* reexport */ chunk_2HGWOLVN/* resetEventBusForTesting */.b8),
2916
+ resetEventBusForTesting: () => (/* reexport */ chunk_5JZFKRLW/* resetEventBusForTesting */.b8),
2844
2917
  resolveAnnotationRanges: () => (/* binding */ resolveAnnotationRanges),
2845
2918
  sanitizeImageURL: () => (/* binding */ sanitizeImageURL),
2846
2919
  saveSelectedShapeForSelectorType: () => (/* binding */ saveSelectedShapeForSelectorType),
@@ -2851,10 +2924,11 @@ __webpack_require__.d(__webpack_exports__, {
2851
2924
  useAdmin: () => (/* binding */ useAdmin),
2852
2925
  useAnnotationManager: () => (/* binding */ useAnnotationManager),
2853
2926
  useAnnotations: () => (/* binding */ useAnnotations),
2854
- useApiClient: () => (/* reexport */ useApiClient),
2927
+ useApiClient: () => (/* reexport */ chunk_5JZFKRLW/* useApiClient */.RH),
2928
+ useAttentionStream: () => (/* reexport */ chunk_XMCUHQ2Y/* useAttentionStream */.W5),
2855
2929
  useAuthApi: () => (/* binding */ useAuthApi),
2856
- useAuthToken: () => (/* binding */ useAuthToken),
2857
- useBeckonFlow: () => (/* reexport */ chunk_ZPV43WN2/* useBeckonFlow */.QY),
2930
+ useAuthToken: () => (/* reexport */ chunk_XMCUHQ2Y/* useAuthToken */.L4),
2931
+ useBeckonFlow: () => (/* reexport */ chunk_XMCUHQ2Y/* useBeckonFlow */.QY),
2858
2932
  useBindFlow: () => (/* binding */ useBindFlow),
2859
2933
  useCacheManager: () => (/* binding */ useCacheManager),
2860
2934
  useContextGatherFlow: () => (/* binding */ useContextGatherFlow),
@@ -2864,14 +2938,14 @@ __webpack_require__.d(__webpack_exports__, {
2864
2938
  useDoubleKeyPress: () => (/* binding */ useDoubleKeyPress),
2865
2939
  useDropdown: () => (/* binding */ useDropdown),
2866
2940
  useEntityTypes: () => (/* binding */ useEntityTypes),
2867
- useEventBus: () => (/* reexport */ chunk_2HGWOLVN/* useEventBus */.iX),
2868
- useEventSubscription: () => (/* reexport */ chunk_ZPV43WN2/* useEventSubscription */.xm),
2869
- useEventSubscriptions: () => (/* reexport */ chunk_ZPV43WN2/* useEventSubscriptions */.C$),
2941
+ useEventBus: () => (/* reexport */ chunk_5JZFKRLW/* useEventBus */.iX),
2942
+ useEventSubscription: () => (/* reexport */ chunk_XMCUHQ2Y/* useEventSubscription */.xm),
2943
+ useEventSubscriptions: () => (/* reexport */ chunk_XMCUHQ2Y/* useEventSubscriptions */.C$),
2870
2944
  useFormAnnouncements: () => (/* binding */ useFormAnnouncements),
2871
2945
  useGlobalEvents: () => (/* binding */ useGlobalEvents),
2872
2946
  useHealth: () => (/* binding */ useHealth),
2873
2947
  useHoverDelay: () => (/* binding */ useHoverDelay),
2874
- useHoverEmitter: () => (/* reexport */ chunk_ZPV43WN2/* useHoverEmitter */.Oo),
2948
+ useHoverEmitter: () => (/* reexport */ chunk_XMCUHQ2Y/* useHoverEmitter */.Oo),
2875
2949
  useIsTyping: () => (/* binding */ useIsTyping),
2876
2950
  useKeyboardShortcuts: () => (/* binding */ useKeyboardShortcuts),
2877
2951
  useLanguageChangeAnnouncements: () => (/* binding */ useLanguageChangeAnnouncements),
@@ -2902,8 +2976,8 @@ __webpack_require__.d(__webpack_exports__, {
2902
2976
  useYieldFlow: () => (/* binding */ useYieldFlow)
2903
2977
  });
2904
2978
 
2905
- // EXTERNAL MODULE: ../../packages/react-ui/dist/chunk-ZPV43WN2.mjs
2906
- var chunk_ZPV43WN2 = __webpack_require__(35228);
2979
+ // EXTERNAL MODULE: ../../packages/react-ui/dist/chunk-XMCUHQ2Y.mjs
2980
+ var chunk_XMCUHQ2Y = __webpack_require__(44389);
2907
2981
  // EXTERNAL MODULE: ../../packages/react-ui/dist/chunk-VVCCMJS7.mjs
2908
2982
  var chunk_VVCCMJS7 = __webpack_require__(10107);
2909
2983
  // EXTERNAL MODULE: ../../packages/react-ui/dist/chunk-D4GAAQMM.mjs
@@ -2911,48 +2985,13 @@ var chunk_D4GAAQMM = __webpack_require__(74166);
2911
2985
  // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js
2912
2986
  var react = __webpack_require__(71277);
2913
2987
  var react_namespaceObject = /*#__PURE__*/__webpack_require__.t(react, 2);
2914
- // EXTERNAL MODULE: ../../packages/core/dist/index.js
2915
- var dist = __webpack_require__(4698);
2916
- // EXTERNAL MODULE: ../../packages/api-client/dist/index.js
2917
- var api_client_dist = __webpack_require__(88887);
2918
- ;// __barrel_optimize__?names=SemiontApiClient!=!../../packages/api-client/dist/index.js
2919
-
2920
-
2921
2988
  // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js
2922
2989
  var react_jsx_runtime = __webpack_require__(92692);
2923
2990
  // EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom.js
2924
2991
  var react_dom = __webpack_require__(56192);
2925
- ;// ../../packages/react-ui/dist/chunk-PFQYNPQJ.mjs
2926
- /* __next_internal_client_entry_do_not_use__ ApiClientProvider,useApiClient,SessionProvider,useSessionContext,ToastContainer,ToastProvider,useToast,OpenResourcesProvider,useOpenResources,AVAILABLE_LOCALES,TranslationProvider,useTranslations,usePreloadTranslations auto */
2927
-
2928
- // src/contexts/ApiClientContext.tsx
2929
-
2930
-
2931
-
2992
+ ;// ../../packages/react-ui/dist/chunk-F74ZQJMA.mjs
2993
+ /* __next_internal_client_entry_do_not_use__ SessionProvider,useSessionContext,ToastContainer,ToastProvider,useToast,OpenResourcesProvider,useOpenResources,AVAILABLE_LOCALES,TranslationProvider,useTranslations,usePreloadTranslations auto */
2932
2994
 
2933
- var ApiClientContext = /*#__PURE__*/ (0,react.createContext)(void 0);
2934
- function ApiClientProvider({ baseUrl: url, children }) {
2935
- const client = (0,react.useMemo)(()=>new api_client_dist/* SemiontApiClient */.NE({
2936
- baseUrl: (0,dist/* baseUrl */.pc)(url),
2937
- // Use no timeout in test environment to avoid AbortController issues with ky + vitest
2938
- ... true && {
2939
- timeout: 3e4
2940
- }
2941
- }), [
2942
- url
2943
- ]);
2944
- return /* @__PURE__ */ (0,react_jsx_runtime.jsx)(ApiClientContext.Provider, {
2945
- value: client,
2946
- children
2947
- });
2948
- }
2949
- function useApiClient() {
2950
- const context = (0,react.useContext)(ApiClientContext);
2951
- if (context === void 0) {
2952
- throw new Error("useApiClient must be used within an ApiClientProvider");
2953
- }
2954
- return context;
2955
- }
2956
2995
  // src/contexts/SessionContext.tsx
2957
2996
 
2958
2997
 
@@ -3445,10 +3484,12 @@ function usePreloadTranslations() {
3445
3484
  isLoaded: (locale)=>translationCache.has(locale)
3446
3485
  };
3447
3486
  }
3448
- //# sourceMappingURL=chunk-PFQYNPQJ.mjs.map
3487
+ //# sourceMappingURL=chunk-F74ZQJMA.mjs.map
3449
3488
 
3450
- // EXTERNAL MODULE: ../../packages/react-ui/dist/chunk-2HGWOLVN.mjs
3451
- var chunk_2HGWOLVN = __webpack_require__(62919);
3489
+ // EXTERNAL MODULE: ../../packages/react-ui/dist/chunk-5JZFKRLW.mjs + 1 modules
3490
+ var chunk_5JZFKRLW = __webpack_require__(51700);
3491
+ // EXTERNAL MODULE: ../../packages/api-client/dist/index.js
3492
+ var dist = __webpack_require__(88887);
3452
3493
  ;// __barrel_optimize__?names=isComment,isHighlight,isReference,isTag!=!../../packages/api-client/dist/index.js
3453
3494
 
3454
3495
 
@@ -3458,8 +3499,10 @@ var QueryClientProvider = __webpack_require__(53970);
3458
3499
  var useQuery = __webpack_require__(85799);
3459
3500
  // EXTERNAL MODULE: ../../node_modules/@tanstack/react-query/build/modern/useMutation.js + 1 modules
3460
3501
  var useMutation = __webpack_require__(33114);
3502
+ // EXTERNAL MODULE: ../../packages/core/dist/index.js
3503
+ var core_dist = __webpack_require__(4698);
3461
3504
  // EXTERNAL MODULE: __barrel_optimize__?names=decodeWithCharset!=!../../packages/api-client/dist/index.js
3462
- var _barrel_optimize_names_decodeWithCharset_packages_api_client_dist = __webpack_require__(24737);
3505
+ var api_client_dist = __webpack_require__(24737);
3463
3506
  ;// __barrel_optimize__?names=getBodySource,isResolvedReference!=!../../packages/api-client/dist/index.js
3464
3507
 
3465
3508
 
@@ -3543,7 +3586,7 @@ var external_url_ = __webpack_require__(79551);
3543
3586
 
3544
3587
 
3545
3588
  ;// ../../packages/react-ui/dist/index.mjs
3546
- /* __next_internal_client_entry_do_not_use__ ANNOTATORS,AUTH_EVENTS,AVAILABLE_LOCALES,AdminDevOpsPage,AdminExchangePage,AdminSecurityPage,AdminUsersPage,AnnotateReferencesProgressWidget,AnnotateToolbar,AnnotateView,AnnotationHistory,AnnotationOverlay,AnnotationProvider,ApiClientProvider,AssessmentEntry,AssessmentPanel,AssistSection,AsyncErrorBoundary,AuthErrorDisplay,AuthTokenProvider,BrowseView,Button,ButtonGroup,COMMON_PANELS,CacheProvider,CodeMirrorRenderer,CollaborationPanel,CollapsibleResourceNavigation,CommentEntry,CommentsPanel,ComposeLoadingState,EntityTagsPage,EntityTypeBadges,ErrorBoundary,EventBusProvider,ExportCard,Footer,HOVER_DELAY_MS,HighlightEntry,HighlightPanel,HistoryEvent,ImageURLSchema,ImageViewer,ImportCard,ImportProgress,JsonLdPanel,JsonLdView,KeyboardShortcutsHelpModal,LeftSidebar,LinkedDataPage,LiveRegionProvider,NavigationMenu,OAuthUserSchema,ObservableLink,OpenResourcesProvider,PageLayout,PanelHeader,PopupContainer,PopupHeader,ProposeEntitiesModal,QUERY_KEYS,RESOURCE_PANELS,RecentDocumentsPage,ReferenceEntry,ReferenceResolutionWidget,ReferenceWizardModal,ReferencesPanel,ResizeHandle,ResourceAnnotationsProvider,ResourceCard,ResourceComposePage,ResourceDiscoveryPage,ResourceErrorState,ResourceInfoPanel,ResourceLoadingState,ResourceSearchModal,ResourceTagsInline,ResourceViewer,ResourceViewerPage,SearchModal,SelectedTextDisplay,SemiontBranding,SemiontFavicon,SessionExpiryBanner,SessionProvider,SessionTimer,SettingsPanel,SignInForm,SignUpForm,SimpleNavigation,SkipLinks,SortableResourceTab,StatisticsPanel,StatusDisplay,SvgDrawingCanvas,TAG_SCHEMAS,TagEntry,TagSchemasPage,TaggingPanel,ThemeProvider,ToastContainer,ToastProvider,Toolbar,TranslationProvider,UnifiedAnnotationsPanel,UnifiedHeader,UserMenuSkeleton,WelcomePage,applyHighlights,buildSourceToRenderedMap,buildTextNodeIndex,buttonStyles,clearHighlights,createHoverHandlers,cssVariables,dispatch401Error,dispatch403Error,dispatchAuthEvent,faviconPaths,formatTime,generateCSSVariables,getAllTagSchemas,getResourceIcon,getSelectedShapeForSelectorType,getSelectorType,getShortcutDisplay,getSupportedShapes,getTagCategory,getTagSchema,getTagSchemasByDomain,hideWidgetPreview,isShapeSupported,isValidCategory,jsonLightHighlightStyle,jsonLightTheme,onAuthEvent,resetEventBusForTesting,resolveAnnotationRanges,sanitizeImageURL,saveSelectedShapeForSelectorType,showWidgetPreview,supportsDetection,toOverlayAnnotations,tokens,useAdmin,useAnnotationManager,useAnnotations,useApiClient,useAuthApi,useAuthToken,useBeckonFlow,useBindFlow,useCacheManager,useContextGatherFlow,useDebounce,useDebouncedCallback,useDocumentAnnouncements,useDoubleKeyPress,useDropdown,useEntityTypes,useEventBus,useEventSubscription,useEventSubscriptions,useFormAnnouncements,useGlobalEvents,useHealth,useHoverDelay,useHoverEmitter,useIsTyping,useKeyboardShortcuts,useLanguageChangeAnnouncements,useLineNumbers,useLiveRegion,useLoadingState,useLocalStorage,useMarkFlow,useModeration,useObservableExternalNavigation,useObservableRouter,useOpenResources,usePanelBrowse,usePanelWidth,usePreloadTranslations,useResourceAnnotations,useResourceContent,useResourceEvents,useResourceLoadingAnnouncements,useResources,useRovingTabIndex,useSearchAnnouncements,useSessionContext,useSessionExpiry,useTheme,useToast,useTranslations,useYieldFlow auto */
3589
+ /* __next_internal_client_entry_do_not_use__ ANNOTATORS,AUTH_EVENTS,AVAILABLE_LOCALES,AdminDevOpsPage,AdminExchangePage,AdminSecurityPage,AdminUsersPage,AnnotateReferencesProgressWidget,AnnotateToolbar,AnnotateView,AnnotationHistory,AnnotationOverlay,AnnotationProvider,ApiClientProvider,AssessmentEntry,AssessmentPanel,AssistSection,AsyncErrorBoundary,AuthErrorDisplay,AuthTokenProvider,BrowseView,Button,ButtonGroup,COMMON_PANELS,CacheProvider,CodeMirrorRenderer,CollaborationPanel,CollapsibleResourceNavigation,CommentEntry,CommentsPanel,ComposeLoadingState,EntityTagsPage,EntityTypeBadges,ErrorBoundary,EventBusProvider,ExportCard,Footer,HOVER_DELAY_MS,HighlightEntry,HighlightPanel,HistoryEvent,ImageURLSchema,ImageViewer,ImportCard,ImportProgress,JsonLdPanel,JsonLdView,KeyboardShortcutsHelpModal,LeftSidebar,LinkedDataPage,LiveRegionProvider,NavigationMenu,OAuthUserSchema,ObservableLink,OpenResourcesProvider,PageLayout,PanelHeader,PopupContainer,PopupHeader,ProposeEntitiesModal,QUERY_KEYS,RESOURCE_PANELS,RecentDocumentsPage,ReferenceEntry,ReferenceResolutionWidget,ReferenceWizardModal,ReferencesPanel,ResizeHandle,ResourceAnnotationsProvider,ResourceCard,ResourceComposePage,ResourceDiscoveryPage,ResourceErrorState,ResourceInfoPanel,ResourceLoadingState,ResourceSearchModal,ResourceTagsInline,ResourceViewer,ResourceViewerPage,SearchModal,SelectedTextDisplay,SemiontBranding,SemiontFavicon,SessionExpiryBanner,SessionProvider,SessionTimer,SettingsPanel,SignInForm,SignUpForm,SimpleNavigation,SkipLinks,SortableResourceTab,StatisticsPanel,StatusDisplay,SvgDrawingCanvas,TAG_SCHEMAS,TagEntry,TagSchemasPage,TaggingPanel,ThemeProvider,ToastContainer,ToastProvider,Toolbar,TranslationProvider,UnifiedAnnotationsPanel,UnifiedHeader,UserMenuSkeleton,WelcomePage,applyHighlights,buildSourceToRenderedMap,buildTextNodeIndex,buttonStyles,clearHighlights,createHoverHandlers,cssVariables,dispatch401Error,dispatch403Error,dispatchAuthEvent,faviconPaths,formatTime,generateCSSVariables,getAllTagSchemas,getResourceIcon,getSelectedShapeForSelectorType,getSelectorType,getShortcutDisplay,getSupportedShapes,getTagCategory,getTagSchema,getTagSchemasByDomain,hideWidgetPreview,isShapeSupported,isValidCategory,jsonLightHighlightStyle,jsonLightTheme,onAuthEvent,resetEventBusForTesting,resolveAnnotationRanges,sanitizeImageURL,saveSelectedShapeForSelectorType,showWidgetPreview,supportsDetection,toOverlayAnnotations,tokens,useAdmin,useAnnotationManager,useAnnotations,useApiClient,useAttentionStream,useAuthApi,useAuthToken,useBeckonFlow,useBindFlow,useCacheManager,useContextGatherFlow,useDebounce,useDebouncedCallback,useDocumentAnnouncements,useDoubleKeyPress,useDropdown,useEntityTypes,useEventBus,useEventSubscription,useEventSubscriptions,useFormAnnouncements,useGlobalEvents,useHealth,useHoverDelay,useHoverEmitter,useIsTyping,useKeyboardShortcuts,useLanguageChangeAnnouncements,useLineNumbers,useLiveRegion,useLoadingState,useLocalStorage,useMarkFlow,useModeration,useObservableExternalNavigation,useObservableRouter,useOpenResources,usePanelBrowse,usePanelWidth,usePreloadTranslations,useResourceAnnotations,useResourceContent,useResourceEvents,useResourceLoadingAnnouncements,useResources,useRovingTabIndex,useSearchAnnouncements,useSessionContext,useSessionExpiry,useTheme,useToast,useTranslations,useYieldFlow auto */
3547
3590
 
3548
3591
 
3549
3592
 
@@ -3902,7 +3945,7 @@ var ANNOTATORS = {
3902
3945
  isClickable: true,
3903
3946
  hasHoverInteraction: true,
3904
3947
  hasSidePanel: true,
3905
- matchesAnnotation: (ann)=>(0,api_client_dist/* isHighlight */.dJ)(ann),
3948
+ matchesAnnotation: (ann)=>(0,dist/* isHighlight */.dJ)(ann),
3906
3949
  announceOnCreate: "Highlight created",
3907
3950
  create: {
3908
3951
  bodyBuilder: "empty",
@@ -3937,7 +3980,7 @@ var ANNOTATORS = {
3937
3980
  isClickable: true,
3938
3981
  hasHoverInteraction: true,
3939
3982
  hasSidePanel: true,
3940
- matchesAnnotation: (ann)=>(0,api_client_dist/* isComment */.Cn)(ann),
3983
+ matchesAnnotation: (ann)=>(0,dist/* isComment */.Cn)(ann),
3941
3984
  announceOnCreate: "Comment created",
3942
3985
  create: {
3943
3986
  bodyBuilder: "text",
@@ -4015,7 +4058,7 @@ var ANNOTATORS = {
4015
4058
  isClickable: true,
4016
4059
  hasHoverInteraction: true,
4017
4060
  hasSidePanel: true,
4018
- matchesAnnotation: (ann)=>(0,api_client_dist/* isReference */.A_)(ann),
4061
+ matchesAnnotation: (ann)=>(0,dist/* isReference */.A_)(ann),
4019
4062
  announceOnCreate: "Reference created",
4020
4063
  create: {
4021
4064
  bodyBuilder: "entityTag",
@@ -4055,7 +4098,7 @@ var ANNOTATORS = {
4055
4098
  isClickable: true,
4056
4099
  hasHoverInteraction: true,
4057
4100
  hasSidePanel: true,
4058
- matchesAnnotation: (ann)=>(0,api_client_dist/* isTag */.dz)(ann),
4101
+ matchesAnnotation: (ann)=>(0,dist/* isTag */.dz)(ann),
4059
4102
  announceOnCreate: "Tag created",
4060
4103
  create: {
4061
4104
  bodyBuilder: "dualTag",
@@ -4200,36 +4243,19 @@ var QUERY_KEYS = {
4200
4243
  }
4201
4244
  }
4202
4245
  };
4203
- // src/contexts/AuthTokenContext.tsx
4204
-
4205
-
4206
- var AuthTokenContext = /*#__PURE__*/ (0,react.createContext)(void 0);
4207
- function AuthTokenProvider({ token, children }) {
4208
- return /* @__PURE__ */ (0,react_jsx_runtime.jsx)(AuthTokenContext.Provider, {
4209
- value: token,
4210
- children
4211
- });
4212
- }
4213
- function useAuthToken() {
4214
- const context = (0,react.useContext)(AuthTokenContext);
4215
- if (context === void 0) {
4216
- throw new Error("useAuthToken must be used within an AuthTokenProvider");
4217
- }
4218
- return context;
4219
- }
4220
4246
  // src/lib/api-hooks.ts
4221
4247
  function toAccessToken(token) {
4222
- return token ? (0,dist/* accessToken */.aS)(token) : void 0;
4248
+ return token ? (0,core_dist/* accessToken */.aS)(token) : void 0;
4223
4249
  }
4224
4250
  function useResources() {
4225
- const client = useApiClient();
4251
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
4226
4252
  const queryClient = (0,QueryClientProvider/* useQueryClient */.jE)();
4227
- const token = useAuthToken();
4253
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4228
4254
  return {
4229
4255
  list: {
4230
4256
  useQuery: (options)=>(0,useQuery/* useQuery */.I)({
4231
4257
  queryKey: QUERY_KEYS.resources.all(options?.limit, options?.archived),
4232
- queryFn: ()=>client.listResources(options?.limit, options?.archived, options?.query ? (0,dist/* searchQuery */.ZF)(options.query) : void 0, {
4258
+ queryFn: ()=>client.browseResources(options?.limit, options?.archived, options?.query ? (0,core_dist/* searchQuery */.ZF)(options.query) : void 0, {
4233
4259
  auth: toAccessToken(token)
4234
4260
  }),
4235
4261
  enabled: !!client
@@ -4238,7 +4264,7 @@ function useResources() {
4238
4264
  get: {
4239
4265
  useQuery: (id2, options)=>(0,useQuery/* useQuery */.I)({
4240
4266
  queryKey: QUERY_KEYS.resources.detail(id2),
4241
- queryFn: ()=>client.getResource(id2, {
4267
+ queryFn: ()=>client.browseResource(id2, {
4242
4268
  auth: toAccessToken(token)
4243
4269
  }),
4244
4270
  enabled: !!client && !!id2,
@@ -4257,7 +4283,7 @@ function useResources() {
4257
4283
  annotations: {
4258
4284
  useQuery: (id2)=>(0,useQuery/* useQuery */.I)({
4259
4285
  queryKey: QUERY_KEYS.resources.annotations(id2),
4260
- queryFn: ()=>client.getResourceAnnotations(id2, {
4286
+ queryFn: ()=>client.browseAnnotations(id2, void 0, {
4261
4287
  auth: toAccessToken(token)
4262
4288
  }),
4263
4289
  enabled: !!client && !!id2
@@ -4266,7 +4292,7 @@ function useResources() {
4266
4292
  referencedBy: {
4267
4293
  useQuery: (id2)=>(0,useQuery/* useQuery */.I)({
4268
4294
  queryKey: QUERY_KEYS.resources.referencedBy(id2),
4269
- queryFn: ()=>client.getResourceReferencedBy(id2, {
4295
+ queryFn: ()=>client.browseReferences(id2, {
4270
4296
  auth: toAccessToken(token)
4271
4297
  }),
4272
4298
  enabled: !!client && !!id2
@@ -4280,7 +4306,7 @@ function useResources() {
4280
4306
  accept: mediaType,
4281
4307
  auth: toAccessToken(token)
4282
4308
  });
4283
- return (0,_barrel_optimize_names_decodeWithCharset_packages_api_client_dist/* decodeWithCharset */.rv)(data2, mediaType);
4309
+ return (0,api_client_dist/* decodeWithCharset */.rv)(data2, mediaType);
4284
4310
  },
4285
4311
  enabled: !!client && !!id2 && !!mediaType
4286
4312
  })
@@ -4288,7 +4314,7 @@ function useResources() {
4288
4314
  search: {
4289
4315
  useQuery: (query, limit)=>(0,useQuery/* useQuery */.I)({
4290
4316
  queryKey: QUERY_KEYS.resources.search(query, limit),
4291
- queryFn: ()=>client.listResources(limit, void 0, (0,dist/* searchQuery */.ZF)(query), {
4317
+ queryFn: ()=>client.browseResources(limit, void 0, (0,core_dist/* searchQuery */.ZF)(query), {
4292
4318
  auth: toAccessToken(token)
4293
4319
  }),
4294
4320
  enabled: !!client && !!query
@@ -4296,13 +4322,13 @@ function useResources() {
4296
4322
  },
4297
4323
  create: {
4298
4324
  useMutation: ()=>{
4299
- const token2 = useAuthToken();
4325
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4300
4326
  return (0,useMutation/* useMutation */.n)({
4301
4327
  mutationFn: (data2)=>{
4302
4328
  if (!client) {
4303
4329
  throw new Error("Not authenticated - please sign in to create resources");
4304
4330
  }
4305
- return client.createResource(data2, {
4331
+ return client.yieldResource(data2, {
4306
4332
  auth: toAccessToken(token2)
4307
4333
  });
4308
4334
  },
@@ -4318,7 +4344,7 @@ function useResources() {
4318
4344
  },
4319
4345
  update: {
4320
4346
  useMutation: ()=>{
4321
- const token2 = useAuthToken();
4347
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4322
4348
  return (0,useMutation/* useMutation */.n)({
4323
4349
  mutationFn: ({ id: id2, data: data2 })=>{
4324
4350
  if (!client) throw new Error("Not authenticated");
@@ -4341,7 +4367,7 @@ function useResources() {
4341
4367
  },
4342
4368
  generateCloneToken: {
4343
4369
  useMutation: ()=>{
4344
- const token2 = useAuthToken();
4370
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4345
4371
  return (0,useMutation/* useMutation */.n)({
4346
4372
  mutationFn: (id2)=>{
4347
4373
  if (!client) throw new Error("Not authenticated");
@@ -4354,14 +4380,14 @@ function useResources() {
4354
4380
  },
4355
4381
  getByToken: {
4356
4382
  useQuery: (cloneTokenStr)=>{
4357
- const authToken = useAuthToken();
4383
+ const authToken = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4358
4384
  return (0,useQuery/* useQuery */.I)({
4359
4385
  queryKey: [
4360
4386
  "resources",
4361
4387
  "token",
4362
4388
  cloneTokenStr
4363
4389
  ],
4364
- queryFn: ()=>client.getResourceByToken((0,dist/* cloneToken */.zI)(cloneTokenStr), {
4390
+ queryFn: ()=>client.getResourceByToken((0,core_dist/* cloneToken */.zI)(cloneTokenStr), {
4365
4391
  auth: toAccessToken(authToken)
4366
4392
  }),
4367
4393
  enabled: !!client && !!cloneTokenStr
@@ -4370,7 +4396,7 @@ function useResources() {
4370
4396
  },
4371
4397
  createFromToken: {
4372
4398
  useMutation: ()=>{
4373
- const token2 = useAuthToken();
4399
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4374
4400
  return (0,useMutation/* useMutation */.n)({
4375
4401
  mutationFn: (data2)=>{
4376
4402
  if (!client) throw new Error("Not authenticated");
@@ -4391,9 +4417,9 @@ function useResources() {
4391
4417
  };
4392
4418
  }
4393
4419
  function useAnnotations() {
4394
- const client = useApiClient();
4420
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
4395
4421
  const queryClient = (0,QueryClientProvider/* useQueryClient */.jE)();
4396
- const token = useAuthToken();
4422
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4397
4423
  return {
4398
4424
  get: {
4399
4425
  useQuery: (id2)=>(0,useQuery/* useQuery */.I)({
@@ -4407,14 +4433,14 @@ function useAnnotations() {
4407
4433
  enabled: !!client && !!id2
4408
4434
  })
4409
4435
  },
4410
- getResourceAnnotation: {
4436
+ browseAnnotation: {
4411
4437
  useQuery: (resourceId2, annotationId4)=>(0,useQuery/* useQuery */.I)({
4412
4438
  queryKey: [
4413
4439
  "annotations",
4414
4440
  resourceId2,
4415
4441
  annotationId4
4416
4442
  ],
4417
- queryFn: ()=>client.getResourceAnnotation(resourceId2, annotationId4, {
4443
+ queryFn: ()=>client.browseAnnotation(resourceId2, annotationId4, {
4418
4444
  auth: toAccessToken(token)
4419
4445
  }),
4420
4446
  enabled: !!client && !!resourceId2 && !!annotationId4
@@ -4431,11 +4457,11 @@ function useAnnotations() {
4431
4457
  },
4432
4458
  create: {
4433
4459
  useMutation: ()=>{
4434
- const token2 = useAuthToken();
4460
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4435
4461
  return (0,useMutation/* useMutation */.n)({
4436
4462
  mutationFn: ({ resourceId: resourceId2, data: data2 })=>{
4437
4463
  if (!client) throw new Error("Not authenticated");
4438
- return client.createAnnotation(resourceId2, data2, {
4464
+ return client.markAnnotation(resourceId2, data2, {
4439
4465
  auth: toAccessToken(token2)
4440
4466
  });
4441
4467
  },
@@ -4452,7 +4478,7 @@ function useAnnotations() {
4452
4478
  },
4453
4479
  delete: {
4454
4480
  useMutation: ()=>{
4455
- const token2 = useAuthToken();
4481
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4456
4482
  return (0,useMutation/* useMutation */.n)({
4457
4483
  mutationFn: (variables)=>{
4458
4484
  if (!client) throw new Error("Not authenticated");
@@ -4488,11 +4514,11 @@ function useAnnotations() {
4488
4514
  },
4489
4515
  updateBody: {
4490
4516
  useMutation: ()=>{
4491
- const token2 = useAuthToken();
4517
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4492
4518
  return (0,useMutation/* useMutation */.n)({
4493
4519
  mutationFn: ({ resourceId: resourceId2, annotationId: annotationId4, data: data2 })=>{
4494
4520
  if (!client) throw new Error("Not authenticated");
4495
- return client.updateAnnotationBody(resourceId2, annotationId4, data2, {
4521
+ return client.bindAnnotation(resourceId2, annotationId4, data2, {
4496
4522
  auth: toAccessToken(token2)
4497
4523
  });
4498
4524
  },
@@ -4528,7 +4554,7 @@ function useAnnotations() {
4528
4554
  llmContext: {
4529
4555
  useQuery: (resourceId2, annotationId4, options)=>(0,useQuery/* useQuery */.I)({
4530
4556
  queryKey: QUERY_KEYS.annotations.llmContext(resourceId2, annotationId4),
4531
- queryFn: ()=>client.getAnnotationLLMContext(resourceId2, annotationId4, {
4557
+ queryFn: ()=>client.gatherAnnotation(resourceId2, annotationId4, {
4532
4558
  ...options,
4533
4559
  auth: toAccessToken(token)
4534
4560
  }),
@@ -4539,9 +4565,9 @@ function useAnnotations() {
4539
4565
  };
4540
4566
  }
4541
4567
  function useEntityTypes() {
4542
- const client = useApiClient();
4568
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
4543
4569
  const queryClient = (0,QueryClientProvider/* useQueryClient */.jE)();
4544
- const token = useAuthToken();
4570
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4545
4571
  return {
4546
4572
  list: {
4547
4573
  useQuery: (options)=>(0,useQuery/* useQuery */.I)({
@@ -4555,11 +4581,11 @@ function useEntityTypes() {
4555
4581
  },
4556
4582
  add: {
4557
4583
  useMutation: ()=>{
4558
- const token2 = useAuthToken();
4584
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4559
4585
  return (0,useMutation/* useMutation */.n)({
4560
4586
  mutationFn: (type)=>{
4561
4587
  if (!client) throw new Error("Not authenticated");
4562
- return client.addEntityType((0,dist/* entityType */.EW)(type), {
4588
+ return client.addEntityType((0,core_dist/* entityType */.EW)(type), {
4563
4589
  auth: toAccessToken(token2)
4564
4590
  });
4565
4591
  },
@@ -4573,11 +4599,11 @@ function useEntityTypes() {
4573
4599
  },
4574
4600
  addBulk: {
4575
4601
  useMutation: ()=>{
4576
- const token2 = useAuthToken();
4602
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4577
4603
  return (0,useMutation/* useMutation */.n)({
4578
4604
  mutationFn: (types2)=>{
4579
4605
  if (!client) throw new Error("Not authenticated");
4580
- return client.addEntityTypesBulk(types2.map(dist/* entityType */.EW), {
4606
+ return client.addEntityTypesBulk(types2.map(core_dist/* entityType */.EW), {
4581
4607
  auth: toAccessToken(token2)
4582
4608
  });
4583
4609
  },
@@ -4592,9 +4618,9 @@ function useEntityTypes() {
4592
4618
  };
4593
4619
  }
4594
4620
  function useAdmin() {
4595
- const client = useApiClient();
4621
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
4596
4622
  const queryClient = (0,QueryClientProvider/* useQueryClient */.jE)();
4597
- const token = useAuthToken();
4623
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4598
4624
  return {
4599
4625
  users: {
4600
4626
  list: {
@@ -4617,11 +4643,11 @@ function useAdmin() {
4617
4643
  },
4618
4644
  update: {
4619
4645
  useMutation: ()=>{
4620
- const token2 = useAuthToken();
4646
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4621
4647
  return (0,useMutation/* useMutation */.n)({
4622
4648
  mutationFn: ({ id: id2, data: data2 })=>{
4623
4649
  if (!client) throw new Error("Not authenticated");
4624
- return client.updateUser((0,dist/* userDID */.fC)(id2), data2, {
4650
+ return client.updateUser((0,core_dist/* userDID */.fC)(id2), data2, {
4625
4651
  auth: toAccessToken(token2)
4626
4652
  });
4627
4653
  },
@@ -4690,8 +4716,8 @@ function useAdmin() {
4690
4716
  };
4691
4717
  }
4692
4718
  function useModeration() {
4693
- const client = useApiClient();
4694
- const token = useAuthToken();
4719
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
4720
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4695
4721
  return {
4696
4722
  exchange: {
4697
4723
  export: {
@@ -4735,9 +4761,9 @@ function useModeration() {
4735
4761
  };
4736
4762
  }
4737
4763
  function useAuthApi() {
4738
- const client = useApiClient();
4764
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
4739
4765
  const queryClient = (0,QueryClientProvider/* useQueryClient */.jE)();
4740
- const token = useAuthToken();
4766
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4741
4767
  return {
4742
4768
  me: {
4743
4769
  useQuery: ()=>(0,useQuery/* useQuery */.I)({
@@ -4750,7 +4776,7 @@ function useAuthApi() {
4750
4776
  },
4751
4777
  acceptTerms: {
4752
4778
  useMutation: ()=>{
4753
- const token2 = useAuthToken();
4779
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4754
4780
  return (0,useMutation/* useMutation */.n)({
4755
4781
  mutationFn: ()=>{
4756
4782
  if (!client) throw new Error("Not authenticated");
@@ -4768,7 +4794,7 @@ function useAuthApi() {
4768
4794
  },
4769
4795
  generateMCPToken: {
4770
4796
  useMutation: ()=>{
4771
- const token2 = useAuthToken();
4797
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4772
4798
  return (0,useMutation/* useMutation */.n)({
4773
4799
  mutationFn: ()=>{
4774
4800
  if (!client) throw new Error("Not authenticated");
@@ -4781,7 +4807,7 @@ function useAuthApi() {
4781
4807
  },
4782
4808
  logout: {
4783
4809
  useMutation: ()=>{
4784
- const token2 = useAuthToken();
4810
+ const token2 = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4785
4811
  return (0,useMutation/* useMutation */.n)({
4786
4812
  mutationFn: ()=>{
4787
4813
  if (!client) throw new Error("Not authenticated");
@@ -4798,8 +4824,8 @@ function useAuthApi() {
4798
4824
  };
4799
4825
  }
4800
4826
  function useHealth() {
4801
- const client = useApiClient();
4802
- const token = useAuthToken();
4827
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
4828
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
4803
4829
  return {
4804
4830
  check: {
4805
4831
  useQuery: ()=>(0,useQuery/* useQuery */.I)({
@@ -19935,8 +19961,8 @@ var ReferenceResolutionWidget = class extends WidgetType {
19935
19961
  this.isGenerating = isGenerating;
19936
19962
  }
19937
19963
  eq(other) {
19938
- const thisSource = (0,api_client_dist/* getBodySource */.gm)(this.annotation.body);
19939
- const otherSource = (0,api_client_dist/* getBodySource */.gm)(other.annotation.body);
19964
+ const thisSource = (0,dist/* getBodySource */.gm)(this.annotation.body);
19965
+ const otherSource = (0,dist/* getBodySource */.gm)(other.annotation.body);
19940
19966
  return other.annotation.id === this.annotation.id && otherSource === thisSource && other.targetDocumentName === this.targetDocumentName && other.isGenerating === this.isGenerating;
19941
19967
  }
19942
19968
  toDOM() {
@@ -19948,8 +19974,8 @@ var ReferenceResolutionWidget = class extends WidgetType {
19948
19974
  margin-left: 4px;
19949
19975
  position: relative;
19950
19976
  `;
19951
- const isResolved = (0,api_client_dist/* isResolvedReference */.qD)(this.annotation);
19952
- const bodySource = (0,api_client_dist/* getBodySource */.gm)(this.annotation.body);
19977
+ const isResolved = (0,dist/* isResolvedReference */.qD)(this.annotation);
19978
+ const bodySource = (0,dist/* getBodySource */.gm)(this.annotation.body);
19953
19979
  container.dataset.widgetAnnotationId = this.annotation.id;
19954
19980
  container.dataset.widgetMotivation = this.annotation.motivation;
19955
19981
  container.dataset.widgetResolved = isResolved ? "true" : "false";
@@ -20066,7 +20092,7 @@ function getSupportedShapes(mediaType) {
20066
20092
  "polygon"
20067
20093
  ];
20068
20094
  }
20069
- if ((0,api_client_dist/* isPdfMimeType */.F)(mediaType)) {
20095
+ if ((0,dist/* isPdfMimeType */.F)(mediaType)) {
20070
20096
  return [
20071
20097
  "rectangle"
20072
20098
  ];
@@ -20091,7 +20117,7 @@ function getSelectorType(mediaType) {
20091
20117
  if (!mediaType) {
20092
20118
  return "text";
20093
20119
  }
20094
- if ((0,api_client_dist/* isPdfMimeType */.F)(mediaType)) {
20120
+ if ((0,dist/* isPdfMimeType */.F)(mediaType)) {
20095
20121
  return "fragment";
20096
20122
  }
20097
20123
  if (mediaType.startsWith("image/")) {
@@ -20252,18 +20278,18 @@ function clearHighlights(container) {
20252
20278
  }
20253
20279
  function toOverlayAnnotations(annotations) {
20254
20280
  return annotations.map((ann)=>{
20255
- const targetSelector = (0,api_client_dist/* getTargetSelector */.hH)(ann.target);
20256
- const posSelector = (0,api_client_dist/* getTextPositionSelector */.Eu)(targetSelector);
20281
+ const targetSelector = (0,dist/* getTargetSelector */.hH)(ann.target);
20282
+ const posSelector = (0,dist/* getTextPositionSelector */.Eu)(targetSelector);
20257
20283
  const start2 = posSelector?.start ?? 0;
20258
20284
  const end = posSelector?.end ?? 0;
20259
20285
  const type = Object.values(ANNOTATORS).find((a15)=>a15.matchesAnnotation(ann))?.internalType || "highlight";
20260
20286
  return {
20261
20287
  id: ann.id,
20262
- exact: (0,api_client_dist/* getExactText */.lo)(targetSelector),
20288
+ exact: (0,dist/* getExactText */.lo)(targetSelector),
20263
20289
  offset: start2,
20264
20290
  length: end - start2,
20265
20291
  type,
20266
- source: (0,api_client_dist/* getBodySource */.gm)(ann.body)
20292
+ source: (0,dist/* getBodySource */.gm)(ann.body)
20267
20293
  };
20268
20294
  });
20269
20295
  }
@@ -20563,7 +20589,7 @@ var OAuthUserSchema = {
20563
20589
  if (typeof user.id !== "string" || user.id.length === 0) {
20564
20590
  throw new Error("User ID is required");
20565
20591
  }
20566
- if (typeof user.email !== "string" || !(0,api_client_dist/* isValidEmail */.B9)(user.email)) {
20592
+ if (typeof user.email !== "string" || !(0,dist/* isValidEmail */.B9)(user.email)) {
20567
20593
  throw new Error("Valid email address is required");
20568
20594
  }
20569
20595
  if (typeof user.domain !== "string" || user.domain.length === 0) {
@@ -20809,7 +20835,7 @@ function useLineNumbers() {
20809
20835
  function useHoverDelay() {
20810
20836
  const [hoverDelayMs, setHoverDelayMsState] = (0,react.useState)(()=>{
20811
20837
  if (false) {}
20812
- return chunk_ZPV43WN2/* HOVER_DELAY_MS */.aT;
20838
+ return chunk_XMCUHQ2Y/* HOVER_DELAY_MS */.aT;
20813
20839
  });
20814
20840
  const setHoverDelayMs = (0,react.useCallback)((delayMs)=>{
20815
20841
  setHoverDelayMsState(delayMs);
@@ -20823,7 +20849,7 @@ function useHoverDelay() {
20823
20849
  // src/hooks/useObservableBrowse.tsx
20824
20850
 
20825
20851
  function useObservableRouter(baseRouter) {
20826
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
20852
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
20827
20853
  const push2 = (0,react.useCallback)((path2, options)=>{
20828
20854
  eventBus.get("browse:router-push").next({
20829
20855
  path: path2,
@@ -20848,7 +20874,7 @@ function useObservableRouter(baseRouter) {
20848
20874
  };
20849
20875
  }
20850
20876
  function useObservableExternalNavigation() {
20851
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
20877
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
20852
20878
  return (0,react.useCallback)((url, metadata)=>{
20853
20879
  const fallbackTimer = setTimeout(()=>{
20854
20880
  console.warn("[Observable Navigation] No handler cancelled browse:external-navigate fallback. Falling back to window.location.href. For better UX, subscribe to this event in your app, call cancelFallback(), and use client-side routing.");
@@ -20901,9 +20927,9 @@ storageKey = "semiont-panel-width" } = {}) {
20901
20927
 
20902
20928
 
20903
20929
  function useResourceEvents({ rUri, onEvent, onAnnotationAdded, onAnnotationRemoved, onAnnotationBodyUpdated, onEntityTagAdded, onEntityTagRemoved, onDocumentArchived, onDocumentUnarchived, onError, autoConnect = true }) {
20904
- const client = useApiClient();
20905
- const token = useAuthToken();
20906
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
20930
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
20931
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
20932
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
20907
20933
  const [status, setStatus] = (0,react.useState)("disconnected");
20908
20934
  const [lastEvent, setLastEvent] = (0,react.useState)(null);
20909
20935
  const [eventCount, setEventCount] = (0,react.useState)(0);
@@ -20988,7 +21014,7 @@ function useResourceEvents({ rUri, onEvent, onAnnotationAdded, onAnnotationRemov
20988
21014
  try {
20989
21015
  const sseOptions = {
20990
21016
  ...token ? {
20991
- auth: (0,dist/* accessToken */.aS)(token)
21017
+ auth: (0,core_dist/* accessToken */.aS)(token)
20992
21018
  } : {},
20993
21019
  eventBus
20994
21020
  };
@@ -21047,9 +21073,9 @@ function useResourceEvents({ rUri, onEvent, onAnnotationAdded, onAnnotationRemov
21047
21073
 
21048
21074
 
21049
21075
  function useGlobalEvents({ autoConnect = true } = {}) {
21050
- const client = useApiClient();
21051
- const token = useAuthToken();
21052
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
21076
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
21077
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
21078
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
21053
21079
  const queryClient = (0,QueryClientProvider/* useQueryClient */.jE)();
21054
21080
  const [status, setStatus] = (0,react.useState)("disconnected");
21055
21081
  const streamRef = (0,react.useRef)(null);
@@ -21086,7 +21112,7 @@ function useGlobalEvents({ autoConnect = true } = {}) {
21086
21112
  try {
21087
21113
  const stream = client.sse.globalEvents({
21088
21114
  ...token ? {
21089
- auth: (0,dist/* accessToken */.aS)(token)
21115
+ auth: (0,core_dist/* accessToken */.aS)(token)
21090
21116
  } : {},
21091
21117
  eventBus
21092
21118
  });
@@ -21693,8 +21719,8 @@ function ResourceAnnotationsProvider({ children }) {
21693
21719
  const [newAnnotationIds, setNewAnnotationIds] = (0,react.useState)(/* @__PURE__ */ new Set());
21694
21720
  const { announce } = useLiveRegion();
21695
21721
  const annotations = useAnnotations();
21696
- const createAnnotationMutation = annotations.create.useMutation();
21697
- const createAnnotation = (0,react.useCallback)(async (rUri, motivation, selector, body = [])=>{
21722
+ const markAnnotationMutation = annotations.create.useMutation();
21723
+ const markAnnotation = (0,react.useCallback)(async (rUri, motivation, selector, body = [])=>{
21698
21724
  try {
21699
21725
  const createData = {
21700
21726
  motivation,
@@ -21704,7 +21730,7 @@ function ResourceAnnotationsProvider({ children }) {
21704
21730
  },
21705
21731
  body
21706
21732
  };
21707
- const result = await createAnnotationMutation.mutateAsync({
21733
+ const result = await markAnnotationMutation.mutateAsync({
21708
21734
  resourceId: rUri,
21709
21735
  data: createData
21710
21736
  });
@@ -21726,7 +21752,7 @@ function ResourceAnnotationsProvider({ children }) {
21726
21752
  throw err;
21727
21753
  }
21728
21754
  }, [
21729
- createAnnotationMutation,
21755
+ markAnnotationMutation,
21730
21756
  announce
21731
21757
  ]);
21732
21758
  const clearNewAnnotationId = (0,react.useCallback)((id2)=>{
@@ -21748,12 +21774,12 @@ function ResourceAnnotationsProvider({ children }) {
21748
21774
  }, []);
21749
21775
  const contextValue = (0,react.useMemo)(()=>({
21750
21776
  newAnnotationIds,
21751
- createAnnotation,
21777
+ markAnnotation,
21752
21778
  clearNewAnnotationId,
21753
21779
  triggerSparkleAnimation
21754
21780
  }), [
21755
21781
  newAnnotationIds,
21756
- createAnnotation,
21782
+ markAnnotation,
21757
21783
  clearNewAnnotationId,
21758
21784
  triggerSparkleAnimation
21759
21785
  ]);
@@ -27476,7 +27502,7 @@ var operatorToken = new ExternalTokenizer((input, stack)=>{
27476
27502
  function identifierChar(ch, start2) {
27477
27503
  return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch == 95 || ch >= 192 || !start2 && ch >= 48 && ch <= 57;
27478
27504
  }
27479
- var jsx7 = new ExternalTokenizer((input, stack)=>{
27505
+ var jsx6 = new ExternalTokenizer((input, stack)=>{
27480
27506
  if (input.next != lt || !stack.dialectEnabled(Dialect_jsx)) return;
27481
27507
  input.advance();
27482
27508
  if (input.next == slash2) return;
@@ -27821,7 +27847,7 @@ var parser4 = LRParser.deserialize({
27821
27847
  noSemicolon,
27822
27848
  noSemicolonType,
27823
27849
  operatorToken,
27824
- jsx7,
27850
+ jsx6,
27825
27851
  2,
27826
27852
  3,
27827
27853
  4,
@@ -30055,12 +30081,12 @@ function convertSegmentPositions(segments, content4) {
30055
30081
  }));
30056
30082
  }
30057
30083
  function getAnnotationTooltip(annotation) {
30058
- const isCommentAnn = (0,api_client_dist/* isComment */.Cn)(annotation);
30059
- const isHighlightAnn = (0,api_client_dist/* isHighlight */.dJ)(annotation);
30060
- const isAssessmentAnn = (0,api_client_dist/* isAssessment */.Bt)(annotation);
30061
- const isTagAnn = (0,api_client_dist/* isTag */.dz)(annotation);
30062
- const isReferenceAnn = (0,api_client_dist/* isReference */.A_)(annotation);
30063
- const isResolvedRef = (0,api_client_dist/* isResolvedReference */.qD)(annotation);
30084
+ const isCommentAnn = (0,dist/* isComment */.Cn)(annotation);
30085
+ const isHighlightAnn = (0,dist/* isHighlight */.dJ)(annotation);
30086
+ const isAssessmentAnn = (0,dist/* isAssessment */.Bt)(annotation);
30087
+ const isTagAnn = (0,dist/* isTag */.dz)(annotation);
30088
+ const isReferenceAnn = (0,dist/* isReference */.A_)(annotation);
30089
+ const isResolvedRef = (0,dist/* isResolvedReference */.qD)(annotation);
30064
30090
  if (isCommentAnn) {
30065
30091
  return "Comment";
30066
30092
  } else if (isHighlightAnn) {
@@ -30079,11 +30105,11 @@ function getAnnotationTooltip(annotation) {
30079
30105
  function getAnnotationDecorationMeta(annotation, isNew) {
30080
30106
  const baseClassName = Object.values(ANNOTATORS).find((a15)=>a15.matchesAnnotation(annotation))?.className || "annotation-highlight";
30081
30107
  const className = isNew ? `${baseClassName} annotation-sparkle` : baseClassName;
30082
- const isHighlightAnn = (0,api_client_dist/* isHighlight */.dJ)(annotation);
30083
- const isReferenceAnn = (0,api_client_dist/* isReference */.A_)(annotation);
30084
- const isCommentAnn = (0,api_client_dist/* isComment */.Cn)(annotation);
30085
- const isAssessmentAnn = (0,api_client_dist/* isAssessment */.Bt)(annotation);
30086
- const isTagAnn = (0,api_client_dist/* isTag */.dz)(annotation);
30108
+ const isHighlightAnn = (0,dist/* isHighlight */.dJ)(annotation);
30109
+ const isReferenceAnn = (0,dist/* isReference */.A_)(annotation);
30110
+ const isCommentAnn = (0,dist/* isComment */.Cn)(annotation);
30111
+ const isAssessmentAnn = (0,dist/* isAssessment */.Bt)(annotation);
30112
+ const isTagAnn = (0,dist/* isTag */.dz)(annotation);
30087
30113
  let annotationType = "highlight";
30088
30114
  if (isCommentAnn) annotationType = "comment";
30089
30115
  else if (isReferenceAnn) annotationType = "reference";
@@ -30109,9 +30135,9 @@ function computeAnnotationDecorations(segments, newAnnotationIds) {
30109
30135
  });
30110
30136
  }
30111
30137
  function computeWidgetDecorations(segments, generatingReferenceId, getTargetDocumentName) {
30112
- return segments.filter((s11)=>s11.annotation && (0,api_client_dist/* isReference */.A_)(s11.annotation)).sort((a15, b8)=>a15.end - b8.end).map((segment)=>{
30138
+ return segments.filter((s11)=>s11.annotation && (0,dist/* isReference */.A_)(s11.annotation)).sort((a15, b8)=>a15.end - b8.end).map((segment)=>{
30113
30139
  const annotation = segment.annotation;
30114
- const bodySource = (0,api_client_dist/* getBodySource */.gm)(annotation.body);
30140
+ const bodySource = (0,dist/* getBodySource */.gm)(annotation.body);
30115
30141
  const targetName = bodySource ? getTargetDocumentName?.(bodySource) : void 0;
30116
30142
  const isGenerating = generatingReferenceId ? annotation.id === generatingReferenceId : false;
30117
30143
  return {
@@ -30262,7 +30288,7 @@ function buildWidgetDecorations(_content, segments, generatingReferenceId, getTa
30262
30288
  const widgetMetas = computeWidgetDecorations(segments, generatingReferenceId, getTargetDocumentName);
30263
30289
  const annotationsByEnd = /* @__PURE__ */ new Map();
30264
30290
  for (const s11 of segments){
30265
- if (s11.annotation && (0,api_client_dist/* isReference */.A_)(s11.annotation)) {
30291
+ if (s11.annotation && (0,dist/* isReference */.A_)(s11.annotation)) {
30266
30292
  annotationsByEnd.set(s11.end, s11);
30267
30293
  }
30268
30294
  }
@@ -30390,7 +30416,7 @@ function CodeMirrorRenderer({ content: content4, segments = [], onChange, editab
30390
30416
  contentRef.current = content4;
30391
30417
  containerRef.current.__cmView = view;
30392
30418
  const container = view.dom;
30393
- const { handleMouseEnter, handleMouseLeave, cleanup: cleanupHover } = (0,chunk_ZPV43WN2/* createHoverHandlers */.i0)((annotationId4)=>eventBusRef.current?.get("beckon:hover").next({
30419
+ const { handleMouseEnter, handleMouseLeave, cleanup: cleanupHover } = (0,chunk_XMCUHQ2Y/* createHoverHandlers */.i0)((annotationId4)=>eventBusRef.current?.get("beckon:hover").next({
30394
30420
  annotationId: annotationId4
30395
30421
  }), hoverDelayMs);
30396
30422
  const handleMouseOver = (e6)=>{
@@ -30550,7 +30576,7 @@ function CodeMirrorRenderer({ content: content4, segments = [], onChange, editab
30550
30576
 
30551
30577
  function AnnotateReferencesProgressWidget({ progress, annotationType = "reference" }) {
30552
30578
  const t12 = useTranslations("ReferencesPanel");
30553
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
30579
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
30554
30580
  const handleCancel = ()=>{
30555
30581
  eventBus.get("job:cancel-requested").next({
30556
30582
  jobType: "annotation"
@@ -30935,7 +30961,7 @@ function ResourceTagsInline({ tags: tags3 }) {
30935
30961
 
30936
30962
  function Toolbar({ context, activePanel, isArchived = false }) {
30937
30963
  const t12 = useTranslations("Toolbar");
30938
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
30964
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
30939
30965
  const handlePanelToggle = (panel)=>{
30940
30966
  eventBus.get("browse:panel-toggle").next({
30941
30967
  panel
@@ -31056,11 +31082,11 @@ function Toolbar({ context, activePanel, isArchived = false }) {
31056
31082
 
31057
31083
  function SettingsPanel({ showLineNumbers, theme: theme2, locale, isPendingLocaleChange = false, hoverDelayMs }) {
31058
31084
  const t12 = useTranslations("Settings");
31059
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
31085
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
31060
31086
  const { announceLanguageChanging, announceLanguageChanged } = useLanguageChangeAnnouncements();
31061
31087
  const [previousLocale, setPreviousLocale] = react.useState(locale);
31062
31088
  const handleLocaleChange = (newLocale)=>{
31063
- const localeName = api_client_dist/* LOCALES */.YZ.find((l10)=>l10.code === newLocale)?.nativeName || newLocale;
31089
+ const localeName = dist/* LOCALES */.YZ.find((l10)=>l10.code === newLocale)?.nativeName || newLocale;
31064
31090
  announceLanguageChanging(localeName);
31065
31091
  eventBus.get("settings:locale-changed").next({
31066
31092
  locale: newLocale
@@ -31068,7 +31094,7 @@ function SettingsPanel({ showLineNumbers, theme: theme2, locale, isPendingLocale
31068
31094
  };
31069
31095
  process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{
31070
31096
  if (locale !== previousLocale && !isPendingLocaleChange) {
31071
- const localeName = api_client_dist/* LOCALES */.YZ.find((l10)=>l10.code === locale)?.nativeName || locale;
31097
+ const localeName = dist/* LOCALES */.YZ.find((l10)=>l10.code === locale)?.nativeName || locale;
31072
31098
  announceLanguageChanged(localeName);
31073
31099
  setPreviousLocale(locale);
31074
31100
  }
@@ -31185,7 +31211,7 @@ function SettingsPanel({ showLineNumbers, theme: theme2, locale, isPendingLocale
31185
31211
  className: "semiont-select",
31186
31212
  "aria-busy": isPendingLocaleChange,
31187
31213
  "aria-describedby": "language-hint",
31188
- children: api_client_dist/* LOCALES */.YZ.map((lang)=>/* @__PURE__ */ (0,react_jsx_runtime.jsx)("option", {
31214
+ children: dist/* LOCALES */.YZ.map((lang)=>/* @__PURE__ */ (0,react_jsx_runtime.jsx)("option", {
31189
31215
  value: lang.code,
31190
31216
  children: lang.nativeName
31191
31217
  }, lang.code))
@@ -31298,7 +31324,7 @@ function DropdownGroup({ label, collapsedContent, expandedContent, isExpanded, o
31298
31324
  }
31299
31325
  function AnnotateToolbar({ selectedMotivation, selectedClick, showSelectionGroup = true, showDeleteButton = true, showShapeGroup = false, selectedShape = "rectangle", mediaType, annotateMode = false, annotators }) {
31300
31326
  const t12 = useTranslations("AnnotateToolbar");
31301
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
31327
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
31302
31328
  const getMotivationEmoji = (motivation)=>{
31303
31329
  const annotator = Object.values(annotators).find((a15)=>a15.motivation === motivation);
31304
31330
  return annotator?.iconEmoji || "\u2753";
@@ -34316,27 +34342,27 @@ function PopupContainer({ children, position: position3, onClose, isOpen, wide =
34316
34342
 
34317
34343
 
34318
34344
  function getAnnotationColor(annotation) {
34319
- if ((0,api_client_dist/* isHighlight */.dJ)(annotation)) {
34345
+ if ((0,dist/* isHighlight */.dJ)(annotation)) {
34320
34346
  return {
34321
34347
  stroke: "rgb(250, 204, 21)",
34322
34348
  fill: "rgba(250, 204, 21, 0.2)"
34323
34349
  };
34324
- } else if ((0,api_client_dist/* isReference */.A_)(annotation)) {
34350
+ } else if ((0,dist/* isReference */.A_)(annotation)) {
34325
34351
  return {
34326
34352
  stroke: "rgb(59, 130, 246)",
34327
34353
  fill: "rgba(59, 130, 246, 0.2)"
34328
34354
  };
34329
- } else if ((0,api_client_dist/* isAssessment */.Bt)(annotation)) {
34355
+ } else if ((0,dist/* isAssessment */.Bt)(annotation)) {
34330
34356
  return {
34331
34357
  stroke: "rgb(239, 68, 68)",
34332
34358
  fill: "rgba(239, 68, 68, 0.2)"
34333
34359
  };
34334
- } else if ((0,api_client_dist/* isComment */.Cn)(annotation)) {
34360
+ } else if ((0,dist/* isComment */.Cn)(annotation)) {
34335
34361
  return {
34336
34362
  stroke: "rgb(255, 255, 255)",
34337
34363
  fill: "rgba(255, 255, 255, 0.2)"
34338
34364
  };
34339
- } else if ((0,api_client_dist/* isTag */.dz)(annotation)) {
34365
+ } else if ((0,dist/* isTag */.dz)(annotation)) {
34340
34366
  return {
34341
34367
  stroke: "rgb(234, 88, 12)",
34342
34368
  fill: "rgba(234, 88, 12, 0.2)"
@@ -34348,17 +34374,17 @@ function getAnnotationColor(annotation) {
34348
34374
  };
34349
34375
  }
34350
34376
  function getAnnotationTooltip2(annotation) {
34351
- if ((0,api_client_dist/* isComment */.Cn)(annotation)) {
34377
+ if ((0,dist/* isComment */.Cn)(annotation)) {
34352
34378
  return "Comment";
34353
- } else if ((0,api_client_dist/* isHighlight */.dJ)(annotation)) {
34379
+ } else if ((0,dist/* isHighlight */.dJ)(annotation)) {
34354
34380
  return "Highlight";
34355
- } else if ((0,api_client_dist/* isAssessment */.Bt)(annotation)) {
34381
+ } else if ((0,dist/* isAssessment */.Bt)(annotation)) {
34356
34382
  return "Assessment";
34357
- } else if ((0,api_client_dist/* isTag */.dz)(annotation)) {
34383
+ } else if ((0,dist/* isTag */.dz)(annotation)) {
34358
34384
  return "Tag";
34359
- } else if ((0,api_client_dist/* isResolvedReference */.qD)(annotation)) {
34385
+ } else if ((0,dist/* isResolvedReference */.qD)(annotation)) {
34360
34386
  return "Resolved Reference";
34361
- } else if ((0,api_client_dist/* isReference */.A_)(annotation)) {
34387
+ } else if ((0,dist/* isReference */.A_)(annotation)) {
34362
34388
  return "Unresolved Reference";
34363
34389
  }
34364
34390
  return "Annotation";
@@ -34366,7 +34392,7 @@ function getAnnotationTooltip2(annotation) {
34366
34392
  function AnnotationOverlay({ annotations, imageWidth, imageHeight, displayWidth, displayHeight, eventBus, hoveredAnnotationId, selectedAnnotationId, hoverDelayMs }) {
34367
34393
  const scaleX = displayWidth / imageWidth;
34368
34394
  const scaleY = displayHeight / imageHeight;
34369
- const { handleMouseEnter, handleMouseLeave } = (0,react.useMemo)(()=>(0,chunk_ZPV43WN2/* createHoverHandlers */.i0)((annotationId4)=>eventBus?.get("beckon:hover").next({
34395
+ const { handleMouseEnter, handleMouseLeave } = (0,react.useMemo)(()=>(0,chunk_XMCUHQ2Y/* createHoverHandlers */.i0)((annotationId4)=>eventBus?.get("beckon:hover").next({
34370
34396
  annotationId: annotationId4
34371
34397
  }), hoverDelayMs), [
34372
34398
  eventBus,
@@ -34380,15 +34406,15 @@ function AnnotationOverlay({ annotations, imageWidth, imageHeight, displayWidth,
34380
34406
  },
34381
34407
  children: annotations.map((annotation)=>{
34382
34408
  if (typeof annotation.target === "string") return null;
34383
- const svgSelector = (0,api_client_dist/* getSvgSelector */.UO)(annotation.target.selector);
34409
+ const svgSelector = (0,dist/* getSvgSelector */.UO)(annotation.target.selector);
34384
34410
  if (!svgSelector) return null;
34385
- const parsed = (0,api_client_dist/* parseSvgSelector */.vy)(svgSelector.value);
34411
+ const parsed = (0,dist/* parseSvgSelector */.vy)(svgSelector.value);
34386
34412
  if (!parsed) return null;
34387
34413
  const isHovered = annotation.id === hoveredAnnotationId;
34388
34414
  const isSelected = annotation.id === selectedAnnotationId;
34389
34415
  const colors = getAnnotationColor(annotation);
34390
- const isRef = (0,api_client_dist/* isReference */.A_)(annotation);
34391
- const isResolved = isRef && (0,api_client_dist/* isBodyResolved */.bf)(annotation.body);
34416
+ const isRef = (0,dist/* isReference */.A_)(annotation);
34417
+ const isResolved = isRef && (0,dist/* isBodyResolved */.bf)(annotation.body);
34392
34418
  const statusEmoji = isRef ? isResolved ? "\uD83D\uDD17" : "\u2753" : null;
34393
34419
  switch(parsed.type){
34394
34420
  case "rect":
@@ -34703,7 +34729,7 @@ function SvgDrawingCanvas({ resourceUri, existingAnnotations = [], drawingMode,
34703
34729
  ];
34704
34730
  const svgSel = selectors.find((s11)=>s11.type === "SvgSelector");
34705
34731
  if (!svgSel || svgSel.type !== "SvgSelector") return false;
34706
- const parsed = (0,api_client_dist/* parseSvgSelector */.vy)(svgSel.value);
34732
+ const parsed = (0,dist/* parseSvgSelector */.vy)(svgSel.value);
34707
34733
  if (!parsed) return false;
34708
34734
  const scaleX = displayDimensions.width / imageDimensions.width;
34709
34735
  const scaleY = displayDimensions.height / imageDimensions.height;
@@ -34738,7 +34764,7 @@ function SvgDrawingCanvas({ resourceUri, existingAnnotations = [], drawingMode,
34738
34764
  case "circle":
34739
34765
  {
34740
34766
  const radius = Math.sqrt(Math.pow(endPoint.x - startPoint.x, 2) + Math.pow(endPoint.y - startPoint.y, 2));
34741
- displaySvg = (0,api_client_dist/* createCircleSvg */.t6)(startPoint, radius);
34767
+ displaySvg = (0,dist/* createCircleSvg */.t6)(startPoint, radius);
34742
34768
  break;
34743
34769
  }
34744
34770
  case "polygon":
@@ -34768,15 +34794,15 @@ function SvgDrawingCanvas({ resourceUri, existingAnnotations = [], drawingMode,
34768
34794
  y: centerY
34769
34795
  }
34770
34796
  ];
34771
- displaySvg = (0,api_client_dist/* createPolygonSvg */.xe)(points);
34797
+ displaySvg = (0,dist/* createPolygonSvg */.xe)(points);
34772
34798
  break;
34773
34799
  }
34774
34800
  case "rectangle":
34775
34801
  default:
34776
- displaySvg = (0,api_client_dist/* createRectangleSvg */.O_)(startPoint, endPoint);
34802
+ displaySvg = (0,dist/* createRectangleSvg */.O_)(startPoint, endPoint);
34777
34803
  break;
34778
34804
  }
34779
- const nativeSvg = (0,api_client_dist/* scaleSvgToNative */.Bl)(displaySvg, displayDimensions.width, displayDimensions.height, imageDimensions.width, imageDimensions.height);
34805
+ const nativeSvg = (0,dist/* scaleSvgToNative */.Bl)(displaySvg, displayDimensions.width, displayDimensions.height, imageDimensions.width, imageDimensions.height);
34780
34806
  if (eventBus && selectedMotivation) {
34781
34807
  eventBus.get("mark:requested").next({
34782
34808
  selector: {
@@ -35483,14 +35509,14 @@ function segmentTextWithAnnotations(content4, annotations) {
35483
35509
  }
35484
35510
  ];
35485
35511
  }
35486
- const cache2 = (0,api_client_dist/* buildContentCache */.sK)(content4);
35512
+ const cache2 = (0,dist/* buildContentCache */.sK)(content4);
35487
35513
  const normalizedAnnotations = annotations.map((ann)=>{
35488
- const targetSelector = (0,api_client_dist/* getTargetSelector */.hH)(ann.target);
35489
- const posSelector = (0,api_client_dist/* getTextPositionSelector */.Eu)(targetSelector);
35490
- const quoteSelector = targetSelector ? (0,api_client_dist/* getTextQuoteSelector */.xc)(targetSelector) : null;
35514
+ const targetSelector = (0,dist/* getTargetSelector */.hH)(ann.target);
35515
+ const posSelector = (0,dist/* getTextPositionSelector */.Eu)(targetSelector);
35516
+ const quoteSelector = targetSelector ? (0,dist/* getTextQuoteSelector */.xc)(targetSelector) : null;
35491
35517
  let position4;
35492
35518
  if (quoteSelector) {
35493
- position4 = (0,api_client_dist/* findTextWithContext */.cJ)(content4, quoteSelector.exact, quoteSelector.prefix, quoteSelector.suffix, posSelector?.start, cache2);
35519
+ position4 = (0,dist/* findTextWithContext */.cJ)(content4, quoteSelector.exact, quoteSelector.prefix, quoteSelector.suffix, posSelector?.start, cache2);
35494
35520
  }
35495
35521
  const start2 = position4?.start ?? posSelector?.start ?? 0;
35496
35522
  const end = position4?.end ?? posSelector?.end ?? 0;
@@ -35543,7 +35569,7 @@ function buildTextSelectors(content4, selectedText, start2, end) {
35543
35569
  if (!selectedText || start2 < 0 || end <= start2 || end > content4.length) {
35544
35570
  return null;
35545
35571
  }
35546
- const context = (0,api_client_dist/* extractContext */.BW)(content4, start2, end);
35572
+ const context = (0,dist/* extractContext */.BW)(content4, start2, end);
35547
35573
  return [
35548
35574
  {
35549
35575
  type: "TextPositionSelector",
@@ -35572,14 +35598,14 @@ function fallbackTextPosition(content4, selectedText) {
35572
35598
  }
35573
35599
  // src/components/resource/AnnotateView.tsx
35574
35600
 
35575
- var PdfAnnotationCanvas = /*#__PURE__*/ (0,react.lazy)(()=>__webpack_require__.e(/* import() */ 6327).then(__webpack_require__.bind(__webpack_require__, 26327)).then((mod)=>({
35601
+ var PdfAnnotationCanvas = /*#__PURE__*/ (0,react.lazy)(()=>__webpack_require__.e(/* import() */ 355).then(__webpack_require__.bind(__webpack_require__, 50355)).then((mod)=>({
35576
35602
  default: mod.PdfAnnotationCanvas
35577
35603
  })));
35578
35604
  function AnnotateView({ content: content4, mimeType = "text/plain", resourceUri, annotations, uiState, onUIStateChange, enableWidgets = false, getTargetDocumentName, generatingReferenceId, showLineNumbers = false, hoverDelayMs = 150, annotateMode }) {
35579
35605
  const { newAnnotationIds } = useResourceAnnotations();
35580
35606
  const containerRef = (0,react.useRef)(null);
35581
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
35582
- const category = (0,api_client_dist/* getMimeCategory */.tD)(mimeType);
35607
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
35608
+ const category = (0,dist/* getMimeCategory */.tD)(mimeType);
35583
35609
  const { highlights, references, assessments, comments, tags: tags3 } = annotations;
35584
35610
  const allAnnotations = [
35585
35611
  ...highlights,
@@ -35612,7 +35638,7 @@ function AnnotateView({ content: content4, mimeType = "text/plain", resourceUri,
35612
35638
  hoveredAnnotationId: annotationId4
35613
35639
  });
35614
35640
  }, []);
35615
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
35641
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
35616
35642
  "mark:selection-changed": handleToolbarSelectionChanged,
35617
35643
  "mark:click-changed": handleToolbarClickChanged,
35618
35644
  "mark:shape-changed": handleToolbarShapeChanged,
@@ -35720,7 +35746,7 @@ function AnnotateView({ content: content4, mimeType = "text/plain", resourceUri,
35720
35746
  ]
35721
35747
  });
35722
35748
  case "image":
35723
- if ((0,api_client_dist/* isPdfMimeType */.F)(mimeType)) {
35749
+ if ((0,dist/* isPdfMimeType */.F)(mimeType)) {
35724
35750
  return /* @__PURE__ */ (0,react_jsx_runtime.jsxs)("div", {
35725
35751
  className: "semiont-annotate-view",
35726
35752
  "data-mime-type": "pdf",
@@ -35743,7 +35769,7 @@ function AnnotateView({ content: content4, mimeType = "text/plain", resourceUri,
35743
35769
  children: "Loading PDF viewer..."
35744
35770
  }),
35745
35771
  children: /* @__PURE__ */ (0,react_jsx_runtime.jsx)(PdfAnnotationCanvas, {
35746
- resourceUri: (0,dist/* resourceId */.a)(resourceUri),
35772
+ resourceUri: (0,core_dist/* resourceId */.a)(resourceUri),
35747
35773
  existingAnnotations: allAnnotations,
35748
35774
  drawingMode: selectedMotivation ? selectedShape : null,
35749
35775
  selectedMotivation,
@@ -35773,7 +35799,7 @@ function AnnotateView({ content: content4, mimeType = "text/plain", resourceUri,
35773
35799
  /* @__PURE__ */ (0,react_jsx_runtime.jsx)("div", {
35774
35800
  className: "semiont-annotate-view__content",
35775
35801
  children: resourceUri && /* @__PURE__ */ (0,react_jsx_runtime.jsx)(SvgDrawingCanvas, {
35776
- resourceUri: (0,dist/* resourceId */.a)(resourceUri),
35802
+ resourceUri: (0,core_dist/* resourceId */.a)(resourceUri),
35777
35803
  existingAnnotations: allAnnotations,
35778
35804
  drawingMode: selectedMotivation ? selectedShape : null,
35779
35805
  selectedMotivation,
@@ -35945,8 +35971,8 @@ function getEventDisplayContent(event, annotations, allEvents) {
35945
35971
  const annotation = annotations.find((a15)=>a15.id.endsWith(`/annotations/${eventData.payload.annotationId}`));
35946
35972
  if (annotation?.target) {
35947
35973
  try {
35948
- const targetSelector = (0,api_client_dist/* getTargetSelector */.hH)(annotation.target);
35949
- const exact = (0,api_client_dist/* getExactText */.lo)(targetSelector);
35974
+ const targetSelector = (0,dist/* getTargetSelector */.hH)(annotation.target);
35975
+ const exact = (0,dist/* getExactText */.lo)(targetSelector);
35950
35976
  if (exact) {
35951
35977
  return {
35952
35978
  exact: truncateText(exact),
@@ -35965,7 +35991,7 @@ function getEventDisplayContent(event, annotations, allEvents) {
35965
35991
  try {
35966
35992
  const target = addedEvent.event.payload.annotation.target;
35967
35993
  if (typeof target !== "string" && target.selector) {
35968
- const exact = (0,api_client_dist/* getExactText */.lo)(target.selector);
35994
+ const exact = (0,dist/* getExactText */.lo)(target.selector);
35969
35995
  if (exact) {
35970
35996
  return {
35971
35997
  exact: truncateText(exact),
@@ -35983,7 +36009,7 @@ function getEventDisplayContent(event, annotations, allEvents) {
35983
36009
  try {
35984
36010
  const target = eventData.payload.annotation.target;
35985
36011
  if (typeof target !== "string" && target.selector) {
35986
- const exact = (0,api_client_dist/* getExactText */.lo)(target.selector);
36012
+ const exact = (0,dist/* getExactText */.lo)(target.selector);
35987
36013
  if (exact) {
35988
36014
  return {
35989
36015
  exact: truncateText(exact),
@@ -36010,8 +36036,8 @@ function getEventDisplayContent(event, annotations, allEvents) {
36010
36036
  const annotation = annotations.find((a15)=>a15.id === eventData.payload.annotationUri);
36011
36037
  if (annotation?.target) {
36012
36038
  try {
36013
- const targetSelector = (0,api_client_dist/* getTargetSelector */.hH)(annotation.target);
36014
- const exact = (0,api_client_dist/* getExactText */.lo)(targetSelector);
36039
+ const targetSelector = (0,dist/* getTargetSelector */.hH)(annotation.target);
36040
+ const exact = (0,dist/* getExactText */.lo)(targetSelector);
36015
36041
  if (exact) {
36016
36042
  return {
36017
36043
  exact: truncateText(exact),
@@ -36071,7 +36097,7 @@ function getResourceCreationDetails(event) {
36071
36097
 
36072
36098
  function HistoryEvent({ event, annotations, allEvents, isRelated, t: t12, Link, routes, onEventRef, onEventClick, onEventHover }) {
36073
36099
  const displayContent = getEventDisplayContent(event, annotations, allEvents);
36074
- const annotationUri = (0,dist/* getAnnotationUriFromEvent */.AL)(event);
36100
+ const annotationUri = (0,core_dist/* getAnnotationUriFromEvent */.AL)(event);
36075
36101
  const creationDetails = getResourceCreationDetails(event);
36076
36102
  const entityTypes = getEventEntityTypes(event);
36077
36103
  const hoverTimeoutRef = (0,react.useRef)(null);
@@ -36277,7 +36303,7 @@ function AnnotationHistory({ rUri, hoveredAnnotationId, onEventHover, onEventCli
36277
36303
  className: "semiont-history-panel__list",
36278
36304
  children: events2.map((stored)=>{
36279
36305
  const isRelated = hoveredAnnotationId ? (()=>{
36280
- const eventUri = (0,dist/* getAnnotationUriFromEvent */.AL)(stored);
36306
+ const eventUri = (0,core_dist/* getAnnotationUriFromEvent */.AL)(stored);
36281
36307
  if (!eventUri) return false;
36282
36308
  return eventUri === hoveredAnnotationId;
36283
36309
  })() : false;
@@ -37928,11 +37954,11 @@ function addChildren(props, children) {
37928
37954
  }
37929
37955
  }
37930
37956
  }
37931
- function productionCreate(_4, jsx91, jsxs79) {
37957
+ function productionCreate(_4, jsx90, jsxs79) {
37932
37958
  return create2;
37933
37959
  function create2(_5, type, props, key) {
37934
37960
  const isStaticChildren = Array.isArray(props.children);
37935
- const fn = isStaticChildren ? jsxs79 : jsx91;
37961
+ const fn = isStaticChildren ? jsxs79 : jsx90;
37936
37962
  return key ? fn(type, props, key) : fn(type, props);
37937
37963
  }
37938
37964
  }
@@ -51259,7 +51285,7 @@ function ImageViewer({ resourceUri, alt = "Resource image" }) {
51259
51285
  }
51260
51286
  // src/components/resource/BrowseView.tsx
51261
51287
 
51262
- var PdfAnnotationCanvas2 = /*#__PURE__*/ (0,react.lazy)(()=>__webpack_require__.e(/* import() */ 6327).then(__webpack_require__.bind(__webpack_require__, 26327)).then((mod)=>({
51288
+ var PdfAnnotationCanvas2 = /*#__PURE__*/ (0,react.lazy)(()=>__webpack_require__.e(/* import() */ 355).then(__webpack_require__.bind(__webpack_require__, 50355)).then((mod)=>({
51263
51289
  default: mod.PdfAnnotationCanvas
51264
51290
  })));
51265
51291
  var MemoizedMarkdown = /*#__PURE__*/ (0,react.memo)(function MemoizedMarkdown2({ content: content4 }) {
@@ -51272,9 +51298,9 @@ var MemoizedMarkdown = /*#__PURE__*/ (0,react.memo)(function MemoizedMarkdown2({
51272
51298
  });
51273
51299
  var BrowseView = /*#__PURE__*/ (0,react.memo)(function BrowseView2({ content: content4, mimeType, resourceUri, annotations, selectedClick = "detail", annotateMode, hoverDelayMs = 150 }) {
51274
51300
  const { newAnnotationIds } = useResourceAnnotations();
51275
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
51301
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
51276
51302
  const containerRef = (0,react.useRef)(null);
51277
- const category = (0,api_client_dist/* getMimeCategory */.tD)(mimeType);
51303
+ const category = (0,dist/* getMimeCategory */.tD)(mimeType);
51278
51304
  const { highlights, references, assessments, comments, tags: tags3 } = annotations;
51279
51305
  const allAnnotations = (0,react.useMemo)(()=>[
51280
51306
  ...highlights,
@@ -51328,7 +51354,7 @@ var BrowseView = /*#__PURE__*/ (0,react.memo)(function BrowseView2({ content: co
51328
51354
  }
51329
51355
  }
51330
51356
  };
51331
- const { handleMouseEnter, handleMouseLeave, cleanup: cleanupHover } = (0,chunk_ZPV43WN2/* createHoverHandlers */.i0)((annotationId4)=>eventBus.get("beckon:hover").next({
51357
+ const { handleMouseEnter, handleMouseLeave, cleanup: cleanupHover } = (0,chunk_XMCUHQ2Y/* createHoverHandlers */.i0)((annotationId4)=>eventBus.get("beckon:hover").next({
51332
51358
  annotationId: annotationId4
51333
51359
  }), hoverDelayMs);
51334
51360
  const handleMouseOver = (e6)=>{
@@ -51378,11 +51404,11 @@ var BrowseView = /*#__PURE__*/ (0,react.memo)(function BrowseView2({ content: co
51378
51404
  scrollToAnnotation
51379
51405
  ]);
51380
51406
  const handleAnnotationFocus = (0,react.useCallback)(({ annotationId: annotationId4 })=>{
51381
- scrollToAnnotation(annotationId4, true);
51407
+ scrollToAnnotation(annotationId4 ?? null, true);
51382
51408
  }, [
51383
51409
  scrollToAnnotation
51384
51410
  ]);
51385
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
51411
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
51386
51412
  "beckon:hover": handleAnnotationHover,
51387
51413
  "beckon:focus": handleAnnotationFocus
51388
51414
  });
@@ -51410,7 +51436,7 @@ var BrowseView = /*#__PURE__*/ (0,react.memo)(function BrowseView2({ content: co
51410
51436
  ]
51411
51437
  });
51412
51438
  case "image":
51413
- if ((0,api_client_dist/* isPdfMimeType */.F)(mimeType)) {
51439
+ if ((0,dist/* isPdfMimeType */.F)(mimeType)) {
51414
51440
  return /* @__PURE__ */ (0,react_jsx_runtime.jsxs)("div", {
51415
51441
  className: "semiont-browse-view",
51416
51442
  "data-mime-type": "pdf",
@@ -51432,7 +51458,7 @@ var BrowseView = /*#__PURE__*/ (0,react.memo)(function BrowseView2({ content: co
51432
51458
  children: "Loading PDF viewer..."
51433
51459
  }),
51434
51460
  children: /* @__PURE__ */ (0,react_jsx_runtime.jsx)(PdfAnnotationCanvas2, {
51435
- resourceUri: (0,dist/* resourceId */.a)(resourceUri),
51461
+ resourceUri: (0,core_dist/* resourceId */.a)(resourceUri),
51436
51462
  existingAnnotations: allAnnotations,
51437
51463
  drawingMode: null,
51438
51464
  selectedMotivation: null
@@ -51458,7 +51484,7 @@ var BrowseView = /*#__PURE__*/ (0,react.memo)(function BrowseView2({ content: co
51458
51484
  ref: containerRef,
51459
51485
  className: "semiont-browse-view__content",
51460
51486
  children: /* @__PURE__ */ (0,react_jsx_runtime.jsx)(ImageViewer, {
51461
- resourceUri: (0,dist/* resourceId */.a)(resourceUri),
51487
+ resourceUri: (0,core_dist/* resourceId */.a)(resourceUri),
51462
51488
  mimeType,
51463
51489
  alt: "Resource content"
51464
51490
  })
@@ -51499,13 +51525,13 @@ var BrowseView = /*#__PURE__*/ (0,react.memo)(function BrowseView2({ content: co
51499
51525
  function ResourceViewer({ resource, annotations, generatingReferenceId, showLineNumbers = false, hoverDelayMs, hoveredAnnotationId: hoveredAnnotationIdProp }) {
51500
51526
  const t12 = useTranslations("ResourceViewer");
51501
51527
  const documentViewerRef = (0,react.useRef)(null);
51502
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
51528
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
51503
51529
  const navigate = useObservableExternalNavigation();
51504
51530
  const { highlights, references, assessments, comments, tags: tags3 } = annotations;
51505
51531
  if (!resource["@id"]) {
51506
51532
  throw new Error("Resource has no @id");
51507
51533
  }
51508
- const rUri = (0,dist/* resourceId */.a)(resource["@id"]);
51534
+ const rUri = (0,core_dist/* resourceId */.a)(resource["@id"]);
51509
51535
  const getMimeType = ()=>{
51510
51536
  const reps = resource.representations;
51511
51537
  if (Array.isArray(reps) && reps.length > 0 && reps[0]) {
@@ -51626,7 +51652,7 @@ function ResourceViewer({ resource, annotations, generatingReferenceId, showLine
51626
51652
  };
51627
51653
  const handleDeleteAnnotation = (0,react.useCallback)((id2)=>{
51628
51654
  eventBus.get("mark:delete").next({
51629
- annotationId: (0,dist/* annotationId */.Hn)(id2)
51655
+ annotationId: (0,core_dist/* annotationId */.Hn)(id2)
51630
51656
  });
51631
51657
  }, []);
51632
51658
  const handleAnnotationClick2 = (0,react.useCallback)((annotation, event)=>{
@@ -51640,9 +51666,9 @@ function ResourceViewer({ resource, annotations, generatingReferenceId, showLine
51640
51666
  return;
51641
51667
  }
51642
51668
  }
51643
- const isSimpleAnnotation = (0,api_client_dist/* isHighlight */.dJ)(annotation) || (0,api_client_dist/* isAssessment */.Bt)(annotation) || (0,api_client_dist/* isComment */.Cn)(annotation) || (0,api_client_dist/* isReference */.A_)(annotation) || (0,api_client_dist/* isTag */.dz)(annotation);
51644
- if (selectedClick === "follow" && (0,api_client_dist/* isReference */.A_)(annotation)) {
51645
- const bodySource = (0,api_client_dist/* getBodySource */.gm)(annotation.body);
51669
+ const isSimpleAnnotation = (0,dist/* isHighlight */.dJ)(annotation) || (0,dist/* isAssessment */.Bt)(annotation) || (0,dist/* isComment */.Cn)(annotation) || (0,dist/* isReference */.A_)(annotation) || (0,dist/* isTag */.dz)(annotation);
51670
+ if (selectedClick === "follow" && (0,dist/* isReference */.A_)(annotation)) {
51671
+ const bodySource = (0,dist/* getBodySource */.gm)(annotation.body);
51646
51672
  if (bodySource) {
51647
51673
  navigate(`/know/resource/${bodySource}`, {
51648
51674
  resourceId: bodySource
@@ -51721,7 +51747,7 @@ function ResourceViewer({ resource, annotations, generatingReferenceId, showLine
51721
51747
  handleAnnotationClick2,
51722
51748
  selectedClick
51723
51749
  ]);
51724
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
51750
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
51725
51751
  // View mode
51726
51752
  "mark:mode-toggled": handleViewModeToggle,
51727
51753
  // Annotation cache invalidation
@@ -51756,8 +51782,8 @@ function ResourceViewer({ resource, annotations, generatingReferenceId, showLine
51756
51782
  scrollToAnnotationId
51757
51783
  };
51758
51784
  const getTargetDocumentName = (0,react.useCallback)((documentId)=>{
51759
- const referencedResource = references.find((a15)=>(0,api_client_dist/* getBodySource */.gm)(a15.body) === documentId);
51760
- return referencedResource ? (0,api_client_dist/* getExactText */.lo)((0,api_client_dist/* getTargetSelector */.hH)(referencedResource.target)) : void 0;
51785
+ const referencedResource = references.find((a15)=>(0,dist/* getBodySource */.gm)(a15.body) === documentId);
51786
+ return referencedResource ? (0,dist/* getExactText */.lo)((0,dist/* getTargetSelector */.hH)(referencedResource.target)) : void 0;
51761
51787
  }, [
51762
51788
  references
51763
51789
  ]);
@@ -51809,8 +51835,8 @@ function ResourceViewer({ resource, annotations, generatingReferenceId, showLine
51809
51835
  deleteConfirmation && (()=>{
51810
51836
  const annotation = deleteConfirmation.annotation;
51811
51837
  const metadata = Object.values(ANNOTATORS).find((a15)=>a15.matchesAnnotation(annotation));
51812
- const targetSelector = (0,api_client_dist/* getTargetSelector */.hH)(annotation.target);
51813
- const selectedText = (0,api_client_dist/* getExactText */.lo)(targetSelector);
51838
+ const targetSelector = (0,dist/* getTargetSelector */.hH)(annotation.target);
51839
+ const selectedText = (0,dist/* getExactText */.lo)(targetSelector);
51814
51840
  const motivationEmoji = metadata?.iconEmoji || "\uD83D\uDCDD";
51815
51841
  return /* @__PURE__ */ (0,react_jsx_runtime.jsx)(PopupContainer, {
51816
51842
  isOpen: !!deleteConfirmation,
@@ -51904,9 +51930,9 @@ function getAssessmentText(annotation) {
51904
51930
  return null;
51905
51931
  }
51906
51932
  function AssessmentEntry({ assessment, isFocused, isHovered = false, ref }) {
51907
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
51908
- const hoverProps = (0,chunk_ZPV43WN2/* useHoverEmitter */.Oo)(assessment.id);
51909
- const selectedText = (0,api_client_dist/* getAnnotationExactText */.a9)(assessment);
51933
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
51934
+ const hoverProps = (0,chunk_XMCUHQ2Y/* useHoverEmitter */.Oo)(assessment.id);
51935
+ const selectedText = (0,dist/* getAnnotationExactText */.a9)(assessment);
51910
51936
  const assessmentText = getAssessmentText(assessment);
51911
51937
  return /* @__PURE__ */ (0,react_jsx_runtime.jsxs)("div", {
51912
51938
  ref,
@@ -51964,7 +51990,7 @@ function AssessmentEntry({ assessment, isFocused, isHovered = false, ref }) {
51964
51990
  function AssistSection({ annotationType, isAssisting, progress }) {
51965
51991
  const panelName = annotationType === "highlight" ? "HighlightPanel" : annotationType === "assessment" ? "AssessmentPanel" : "CommentsPanel";
51966
51992
  const t12 = useTranslations(panelName);
51967
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
51993
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
51968
51994
  const [instructions, setInstructions] = (0,react.useState)("");
51969
51995
  const [tone, setTone] = (0,react.useState)("");
51970
51996
  const defaultDensity = annotationType === "comment" ? 5 : annotationType === "assessment" ? 4 : annotationType === "highlight" ? 5 : 5;
@@ -52295,7 +52321,7 @@ function getSelectorDisplayText(selector) {
52295
52321
  }
52296
52322
  function AssessmentPanel({ annotations, pendingAnnotation, isAssisting = false, progress, annotateMode = true, scrollToAnnotationId, onScrollCompleted, hoveredAnnotationId }) {
52297
52323
  const t12 = useTranslations("AssessmentPanel");
52298
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
52324
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
52299
52325
  const [newAssessmentText, setNewAssessmentText] = (0,react.useState)("");
52300
52326
  const [focusedAnnotationId, setFocusedAnnotationId] = (0,react.useState)(null);
52301
52327
  const containerRef = (0,react.useRef)(null);
@@ -52304,8 +52330,8 @@ function AssessmentPanel({ annotations, pendingAnnotation, isAssisting = false,
52304
52330
  return [
52305
52331
  ...annotations
52306
52332
  ].sort((a15, b8)=>{
52307
- const aSelector = (0,api_client_dist/* getTextPositionSelector */.Eu)((0,api_client_dist/* getTargetSelector */.hH)(a15.target));
52308
- const bSelector = (0,api_client_dist/* getTextPositionSelector */.Eu)((0,api_client_dist/* getTargetSelector */.hH)(b8.target));
52333
+ const aSelector = (0,dist/* getTextPositionSelector */.Eu)((0,dist/* getTargetSelector */.hH)(a15.target));
52334
+ const bSelector = (0,dist/* getTextPositionSelector */.Eu)((0,dist/* getTargetSelector */.hH)(b8.target));
52309
52335
  if (!aSelector || !bSelector) return 0;
52310
52336
  return aSelector.start - bSelector.start;
52311
52337
  });
@@ -52394,7 +52420,7 @@ function AssessmentPanel({ annotations, pendingAnnotation, isAssisting = false,
52394
52420
  setFocusedAnnotationId(annotationId4);
52395
52421
  setTimeout(()=>setFocusedAnnotationId(null), 3e3);
52396
52422
  }, []);
52397
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
52423
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
52398
52424
  "browse:click": handleAnnotationClick2
52399
52425
  });
52400
52426
  return /* @__PURE__ */ (0,react_jsx_runtime.jsxs)("div", {
@@ -52623,14 +52649,14 @@ function formatRelativeTime3(isoString) {
52623
52649
  }
52624
52650
  function CommentEntry({ comment: comment2, isFocused, isHovered = false, annotateMode = true, ref }) {
52625
52651
  const t12 = useTranslations("CommentsPanel");
52626
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
52627
- const hoverProps = (0,chunk_ZPV43WN2/* useHoverEmitter */.Oo)(comment2.id);
52652
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
52653
+ const hoverProps = (0,chunk_XMCUHQ2Y/* useHoverEmitter */.Oo)(comment2.id);
52628
52654
  const [isEditing, setIsEditing] = (0,react.useState)(false);
52629
52655
  const [editText, setEditText] = (0,react.useState)("");
52630
52656
  const internalRef = (0,react.useRef)(null);
52631
52657
  (0,react.useImperativeHandle)(ref, ()=>internalRef.current);
52632
- const commentText = (0,api_client_dist/* getCommentText */.rw)(comment2) || "";
52633
- const selectedText = (0,api_client_dist/* getAnnotationExactText */.a9)(comment2);
52658
+ const commentText = (0,dist/* getCommentText */.rw)(comment2) || "";
52659
+ const selectedText = (0,dist/* getAnnotationExactText */.a9)(comment2);
52634
52660
  process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{
52635
52661
  if (isFocused && internalRef.current) {
52636
52662
  internalRef.current.scrollIntoView({
@@ -52773,7 +52799,7 @@ function getSelectorDisplayText2(selector) {
52773
52799
  }
52774
52800
  function CommentsPanel({ annotations, pendingAnnotation, annotateMode = true, isAssisting = false, progress, scrollToAnnotationId, onScrollCompleted, hoveredAnnotationId }) {
52775
52801
  const t12 = useTranslations("CommentsPanel");
52776
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
52802
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
52777
52803
  const [newCommentText, setNewCommentText] = (0,react.useState)("");
52778
52804
  const [focusedAnnotationId, setFocusedAnnotationId] = (0,react.useState)(null);
52779
52805
  const containerRef = (0,react.useRef)(null);
@@ -52782,8 +52808,8 @@ function CommentsPanel({ annotations, pendingAnnotation, annotateMode = true, is
52782
52808
  return [
52783
52809
  ...annotations
52784
52810
  ].sort((a15, b8)=>{
52785
- const aSelector = (0,api_client_dist/* getTextPositionSelector */.Eu)((0,api_client_dist/* getTargetSelector */.hH)(a15.target));
52786
- const bSelector = (0,api_client_dist/* getTextPositionSelector */.Eu)((0,api_client_dist/* getTargetSelector */.hH)(b8.target));
52811
+ const aSelector = (0,dist/* getTextPositionSelector */.Eu)((0,dist/* getTargetSelector */.hH)(a15.target));
52812
+ const bSelector = (0,dist/* getTextPositionSelector */.Eu)((0,dist/* getTargetSelector */.hH)(b8.target));
52787
52813
  if (!aSelector || !bSelector) return 0;
52788
52814
  return aSelector.start - bSelector.start;
52789
52815
  });
@@ -52844,7 +52870,7 @@ function CommentsPanel({ annotations, pendingAnnotation, annotateMode = true, is
52844
52870
  setFocusedAnnotationId(annotationId4);
52845
52871
  setTimeout(()=>setFocusedAnnotationId(null), 3e3);
52846
52872
  }, []);
52847
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
52873
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
52848
52874
  "browse:click": handleAnnotationClick2
52849
52875
  });
52850
52876
  const handleSaveNewComment = ()=>{
@@ -52987,9 +53013,9 @@ function formatRelativeTime4(isoString) {
52987
53013
  return date.toLocaleDateString();
52988
53014
  }
52989
53015
  function HighlightEntry({ highlight, isFocused, isHovered = false, ref }) {
52990
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
52991
- const hoverProps = (0,chunk_ZPV43WN2/* useHoverEmitter */.Oo)(highlight.id);
52992
- const selectedText = (0,api_client_dist/* getAnnotationExactText */.a9)(highlight);
53016
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
53017
+ const hoverProps = (0,chunk_XMCUHQ2Y/* useHoverEmitter */.Oo)(highlight.id);
53018
+ const selectedText = (0,dist/* getAnnotationExactText */.a9)(highlight);
52993
53019
  return /* @__PURE__ */ (0,react_jsx_runtime.jsxs)("div", {
52994
53020
  ref,
52995
53021
  className: `semiont-annotation-entry${isHovered ? " semiont-annotation-pulse" : ""}`,
@@ -53038,7 +53064,7 @@ function HighlightEntry({ highlight, isFocused, isHovered = false, ref }) {
53038
53064
 
53039
53065
  function HighlightPanel({ annotations, pendingAnnotation, isAssisting = false, progress, annotateMode = true, scrollToAnnotationId, onScrollCompleted, hoveredAnnotationId }) {
53040
53066
  const t12 = useTranslations("HighlightPanel");
53041
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
53067
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
53042
53068
  const [focusedAnnotationId, setFocusedAnnotationId] = (0,react.useState)(null);
53043
53069
  const containerRef = (0,react.useRef)(null);
53044
53070
  const entryRefs = (0,react.useRef)(/* @__PURE__ */ new Map());
@@ -53046,8 +53072,8 @@ function HighlightPanel({ annotations, pendingAnnotation, isAssisting = false, p
53046
53072
  return [
53047
53073
  ...annotations
53048
53074
  ].sort((a15, b8)=>{
53049
- const aSelector = (0,api_client_dist/* getTextPositionSelector */.Eu)((0,api_client_dist/* getTargetSelector */.hH)(a15.target));
53050
- const bSelector = (0,api_client_dist/* getTextPositionSelector */.Eu)((0,api_client_dist/* getTargetSelector */.hH)(b8.target));
53075
+ const aSelector = (0,dist/* getTextPositionSelector */.Eu)((0,dist/* getTargetSelector */.hH)(a15.target));
53076
+ const bSelector = (0,dist/* getTextPositionSelector */.Eu)((0,dist/* getTargetSelector */.hH)(b8.target));
53051
53077
  if (!aSelector || !bSelector) return 0;
53052
53078
  return aSelector.start - bSelector.start;
53053
53079
  });
@@ -53106,7 +53132,7 @@ function HighlightPanel({ annotations, pendingAnnotation, isAssisting = false, p
53106
53132
  setFocusedAnnotationId(annotationId4);
53107
53133
  setTimeout(()=>setFocusedAnnotationId(null), 3e3);
53108
53134
  }, []);
53109
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
53135
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
53110
53136
  "browse:click": handleAnnotationClick2
53111
53137
  });
53112
53138
  process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{
@@ -53234,16 +53260,16 @@ function JsonLdPanel({ resource: semiontResource }) {
53234
53260
 
53235
53261
  function ReferenceEntry({ reference, isFocused, isHovered = false, routes, annotateMode = true, isGenerating = false, ref }) {
53236
53262
  const t12 = useTranslations("ReferencesPanel");
53237
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
53263
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
53238
53264
  const navigate = useObservableExternalNavigation();
53239
- const hoverProps = (0,chunk_ZPV43WN2/* useHoverEmitter */.Oo)(reference.id);
53240
- const selectedText = (0,api_client_dist/* getAnnotationExactText */.a9)(reference) || "";
53241
- const isResolved = (0,api_client_dist/* isBodyResolved */.bf)(reference.body);
53242
- const resolvedResourceUri = isResolved ? (0,api_client_dist/* getBodySource */.gm)(reference.body) : null;
53265
+ const hoverProps = (0,chunk_XMCUHQ2Y/* useHoverEmitter */.Oo)(reference.id);
53266
+ const selectedText = (0,dist/* getAnnotationExactText */.a9)(reference) || "";
53267
+ const isResolved = (0,dist/* isBodyResolved */.bf)(reference.body);
53268
+ const resolvedResourceUri = isResolved ? (0,dist/* getBodySource */.gm)(reference.body) : null;
53243
53269
  const entityTypes = getEntityTypes(reference);
53244
- const selector = (0,api_client_dist/* getTargetSelector */.hH)(reference.target);
53245
- const hasFragmentSelector = (0,api_client_dist/* getFragmentSelector */.q$)(selector);
53246
- const hasSvgSelector = (0,api_client_dist/* getSvgSelector */.UO)(selector);
53270
+ const selector = (0,dist/* getTargetSelector */.hH)(reference.target);
53271
+ const hasFragmentSelector = (0,dist/* getFragmentSelector */.q$)(selector);
53272
+ const hasSvgSelector = (0,dist/* getSvgSelector */.UO)(selector);
53247
53273
  const annotationType = hasFragmentSelector ? "Fragment annotation" : hasSvgSelector ? "Image annotation" : "Annotation";
53248
53274
  const enrichedReference = reference;
53249
53275
  const resolvedDocumentName = enrichedReference._resolvedDocumentName;
@@ -53260,8 +53286,8 @@ function ReferenceEntry({ reference, isFocused, isHovered = false, routes, annot
53260
53286
  const handleUnlink = ()=>{
53261
53287
  if (source && resolvedResourceUri) {
53262
53288
  eventBus.get("bind:update-body").next({
53263
- annotationId: (0,dist/* annotationId */.Hn)(reference.id),
53264
- resourceId: (0,dist/* resourceId */.a)(source),
53289
+ annotationId: (0,core_dist/* annotationId */.Hn)(reference.id),
53290
+ resourceId: (0,core_dist/* resourceId */.a)(source),
53265
53291
  operations: [
53266
53292
  {
53267
53293
  op: "remove",
@@ -53276,8 +53302,8 @@ function ReferenceEntry({ reference, isFocused, isHovered = false, routes, annot
53276
53302
  };
53277
53303
  const handleInitiateWizard = ()=>{
53278
53304
  eventBus.get("bind:initiate").next({
53279
- annotationId: (0,dist/* annotationId */.Hn)(reference.id),
53280
- resourceId: (0,dist/* resourceId */.a)(source),
53305
+ annotationId: (0,core_dist/* annotationId */.Hn)(reference.id),
53306
+ resourceId: (0,core_dist/* resourceId */.a)(source),
53281
53307
  defaultTitle: selectedText,
53282
53308
  entityTypes
53283
53309
  });
@@ -53398,7 +53424,7 @@ function getSelectorDisplayText3(selector) {
53398
53424
  }
53399
53425
  function ReferencesPanel({ annotations = [], isAssisting, progress, annotateMode = true, Link, routes, allEntityTypes, generatingReferenceId, referencedBy = [], referencedByLoading = false, pendingAnnotation, scrollToAnnotationId, onScrollCompleted, hoveredAnnotationId }) {
53400
53426
  const t12 = useTranslations("ReferencesPanel");
53401
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
53427
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
53402
53428
  const [selectedEntityTypes, setSelectedEntityTypes] = (0,react.useState)([]);
53403
53429
  const [lastAnnotationLog, setLastDetectionLog] = (0,react.useState)(null);
53404
53430
  const [pendingEntityTypes, setPendingEntityTypes] = (0,react.useState)([]);
@@ -53421,8 +53447,8 @@ function ReferencesPanel({ annotations = [], isAssisting, progress, annotateMode
53421
53447
  return [
53422
53448
  ...annotations
53423
53449
  ].sort((a15, b8)=>{
53424
- const aSelector = (0,api_client_dist/* getTextPositionSelector */.Eu)((0,api_client_dist/* getTargetSelector */.hH)(a15.target));
53425
- const bSelector = (0,api_client_dist/* getTextPositionSelector */.Eu)((0,api_client_dist/* getTargetSelector */.hH)(b8.target));
53450
+ const aSelector = (0,dist/* getTextPositionSelector */.Eu)((0,dist/* getTargetSelector */.hH)(a15.target));
53451
+ const bSelector = (0,dist/* getTextPositionSelector */.Eu)((0,dist/* getTargetSelector */.hH)(b8.target));
53426
53452
  if (!aSelector || !bSelector) return 0;
53427
53453
  return aSelector.start - bSelector.start;
53428
53454
  });
@@ -53485,7 +53511,7 @@ function ReferencesPanel({ annotations = [], isAssisting, progress, annotateMode
53485
53511
  setFocusedAnnotationId(annotationId4);
53486
53512
  setTimeout(()=>setFocusedAnnotationId(null), 3e3);
53487
53513
  }, []);
53488
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
53514
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
53489
53515
  "browse:click": handleAnnotationClick2
53490
53516
  });
53491
53517
  const handleAssist = ()=>{
@@ -53861,7 +53887,7 @@ function ReferencesPanel({ annotations = [], isAssisting, progress, annotateMode
53861
53887
 
53862
53888
  function ResourceInfoPanel({ documentEntityTypes, documentLocale, primaryMediaType, primaryByteSize, isArchived = false }) {
53863
53889
  const t12 = useTranslations("ResourceInfoPanel");
53864
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
53890
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
53865
53891
  return /* @__PURE__ */ (0,react_jsx_runtime.jsxs)("div", {
53866
53892
  className: "semiont-resource-info-panel",
53867
53893
  children: [
@@ -53878,7 +53904,7 @@ function ResourceInfoPanel({ documentEntityTypes, documentLocale, primaryMediaTy
53878
53904
  }),
53879
53905
  documentLocale ? /* @__PURE__ */ (0,react_jsx_runtime.jsx)("div", {
53880
53906
  className: "semiont-resource-info-panel__value",
53881
- children: (0,api_client_dist/* formatLocaleDisplay */.av)(documentLocale)
53907
+ children: (0,dist/* formatLocaleDisplay */.av)(documentLocale)
53882
53908
  }) : /* @__PURE__ */ (0,react_jsx_runtime.jsx)("div", {
53883
53909
  className: "semiont-resource-info-panel__value semiont-resource-info-panel__value--empty",
53884
53910
  children: t12("notSpecified")
@@ -54002,8 +54028,8 @@ function ResourceInfoPanel({ documentEntityTypes, documentLocale, primaryMediaTy
54002
54028
 
54003
54029
  function StatisticsPanel({ highlights, comments, assessments, references, tags: tags3 }) {
54004
54030
  const t12 = useTranslations("StatisticsPanel");
54005
- const stubCount = references.filter((r14)=>!(0,api_client_dist/* isBodyResolved */.bf)(r14.body)).length;
54006
- const resolvedCount = references.filter((r14)=>(0,api_client_dist/* isBodyResolved */.bf)(r14.body)).length;
54031
+ const stubCount = references.filter((r14)=>!(0,dist/* isBodyResolved */.bf)(r14.body)).length;
54032
+ const resolvedCount = references.filter((r14)=>(0,dist/* isBodyResolved */.bf)(r14.body)).length;
54007
54033
  const entityTypeCounts = /* @__PURE__ */ new Map();
54008
54034
  references.forEach((ref)=>{
54009
54035
  const entityTypes = getEntityTypes(ref);
@@ -54156,9 +54182,9 @@ function StatisticsPanel({ highlights, comments, assessments, references, tags:
54156
54182
 
54157
54183
 
54158
54184
  function TagEntry({ tag, isFocused, isHovered = false, ref }) {
54159
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
54160
- const hoverProps = (0,chunk_ZPV43WN2/* useHoverEmitter */.Oo)(tag.id);
54161
- const selectedText = (0,api_client_dist/* getAnnotationExactText */.a9)(tag);
54185
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
54186
+ const hoverProps = (0,chunk_XMCUHQ2Y/* useHoverEmitter */.Oo)(tag.id);
54187
+ const selectedText = (0,dist/* getAnnotationExactText */.a9)(tag);
54162
54188
  const category = getTagCategory(tag);
54163
54189
  const schemaId = getTagSchemaId(tag);
54164
54190
  const schema = schemaId ? getTagSchema(schemaId) : null;
@@ -54228,7 +54254,7 @@ function getSelectorDisplayText4(selector) {
54228
54254
  }
54229
54255
  function TaggingPanel({ annotations, annotateMode = true, isAssisting = false, progress, pendingAnnotation, scrollToAnnotationId, onScrollCompleted, hoveredAnnotationId }) {
54230
54256
  const t12 = useTranslations("TaggingPanel");
54231
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
54257
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
54232
54258
  const [selectedSchemaId, setSelectedSchemaId] = (0,react.useState)("legal-irac");
54233
54259
  const [selectedCategories, setSelectedCategories] = (0,react.useState)(/* @__PURE__ */ new Set());
54234
54260
  const [focusedAnnotationId, setFocusedAnnotationId] = (0,react.useState)(null);
@@ -54248,7 +54274,7 @@ function TaggingPanel({ annotations, annotateMode = true, isAssisting = false, p
54248
54274
  setFocusedAnnotationId(annotationId4);
54249
54275
  setTimeout(()=>setFocusedAnnotationId(null), 3e3);
54250
54276
  }, []);
54251
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
54277
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
54252
54278
  "browse:click": handleAnnotationClick2
54253
54279
  });
54254
54280
  const entryRefs = (0,react.useRef)(/* @__PURE__ */ new Map());
@@ -54256,8 +54282,8 @@ function TaggingPanel({ annotations, annotateMode = true, isAssisting = false, p
54256
54282
  return [
54257
54283
  ...annotations
54258
54284
  ].sort((a15, b8)=>{
54259
- const aSelector = (0,api_client_dist/* getTextPositionSelector */.Eu)((0,api_client_dist/* getTargetSelector */.hH)(a15.target));
54260
- const bSelector = (0,api_client_dist/* getTextPositionSelector */.Eu)((0,api_client_dist/* getTargetSelector */.hH)(b8.target));
54285
+ const aSelector = (0,dist/* getTextPositionSelector */.Eu)((0,dist/* getTargetSelector */.hH)(a15.target));
54286
+ const bSelector = (0,dist/* getTextPositionSelector */.Eu)((0,dist/* getTargetSelector */.hH)(b8.target));
54261
54287
  if (!aSelector || !bSelector) return 0;
54262
54288
  return aSelector.start - bSelector.start;
54263
54289
  });
@@ -55038,7 +55064,7 @@ function NavigationMenu({ Link, routes, t: t12, isAdmin = false, isModerator = f
55038
55064
 
55039
55065
 
55040
55066
  function ObservableLink({ href, label, onClick, children, ...anchorProps }) {
55041
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
55067
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
55042
55068
  const onClickRef = (0,react.useRef)(onClick);
55043
55069
  process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{
55044
55070
  onClickRef.current = onClick;
@@ -55068,7 +55094,7 @@ function SimpleNavigation({ title, items, currentPath, LinkComponent, dropdownCo
55068
55094
  const BarsIcon = icons.bars;
55069
55095
  const [isDropdownOpen, setIsDropdownOpen] = (0,react.useState)(false);
55070
55096
  const dropdownRef = (0,react.useRef)(null);
55071
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
55097
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
55072
55098
  const toggleDropdown = ()=>setIsDropdownOpen(!isDropdownOpen);
55073
55099
  const closeDropdown = ()=>setIsDropdownOpen(false);
55074
55100
  process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{
@@ -59060,7 +59086,7 @@ function CollapsibleResourceNavigation({ fixedItems, resources, isCollapsed, cur
59060
59086
  const dropdownRef = (0,react.useRef)(null);
59061
59087
  const { announcePickup, announceDrop, announceKeyboardReorder, announceCannotMove } = useDragAnnouncements();
59062
59088
  const t12 = useTranslations("CollapsibleResourceNavigation");
59063
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
59089
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
59064
59090
  const mergedTranslations = {
59065
59091
  title: translations?.title || t12("title"),
59066
59092
  collapseSidebar: translations?.collapseSidebar || t12("collapseSidebar"),
@@ -59794,7 +59820,7 @@ function ConfigureGenerationStep({ defaultTitle, locale, context, onBack, onCanc
59794
59820
  value: language2,
59795
59821
  onChange: (e6)=>setLanguage(e6.target.value),
59796
59822
  className: "semiont-select",
59797
- children: api_client_dist/* LOCALES */.YZ.map((lang)=>/* @__PURE__ */ (0,react_jsx_runtime.jsx)("option", {
59823
+ children: dist/* LOCALES */.YZ.map((lang)=>/* @__PURE__ */ (0,react_jsx_runtime.jsx)("option", {
59798
59824
  value: lang.code,
59799
59825
  children: lang.nativeName
59800
59826
  }, lang.code))
@@ -60495,9 +60521,9 @@ function SearchModal({ isOpen, onClose, onNavigate, translations = {} }) {
60495
60521
  if (loading) {
60496
60522
  announceSearching();
60497
60523
  } else if (searchData) {
60498
- const resourceResults = (searchData.resources || []).filter((resource)=>(0,api_client_dist/* getResourceId */.mv)(resource) !== void 0).map((resource)=>({
60524
+ const resourceResults = (searchData.resources || []).filter((resource)=>(0,dist/* getResourceId */.mv)(resource) !== void 0).map((resource)=>({
60499
60525
  type: "resource",
60500
- id: (0,api_client_dist/* getResourceId */.mv)(resource),
60526
+ id: (0,dist/* getResourceId */.mv)(resource),
60501
60527
  name: resource.name,
60502
60528
  content: resource.content?.substring(0, 150)
60503
60529
  }));
@@ -62274,7 +62300,7 @@ function usePanelBrowse() {
62274
62300
  const handlePanelClose = (0,react.useCallback)(()=>{
62275
62301
  setActivePanel(null);
62276
62302
  }, []);
62277
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
62303
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
62278
62304
  "browse:panel-toggle": handlePanelToggle,
62279
62305
  "browse:panel-open": handlePanelOpen,
62280
62306
  "browse:panel-close": handlePanelClose
@@ -64608,7 +64634,7 @@ function ResourceComposePage({ mode, cloneData, referenceData, gatheredContext,
64608
64634
  const nameWithoutExt = file.name.replace(/\.[^/.]+$/, "");
64609
64635
  setNewResourceName(nameWithoutExt);
64610
64636
  }
64611
- if ((0,api_client_dist/* isImageMimeType */.u3)(file.type) || (0,api_client_dist/* isPdfMimeType */.F)(file.type)) {
64637
+ if ((0,dist/* isImageMimeType */.u3)(file.type) || (0,dist/* isPdfMimeType */.F)(file.type)) {
64612
64638
  const previewUrl = URL.createObjectURL(file);
64613
64639
  setFilePreviewUrl(previewUrl);
64614
64640
  } else {
@@ -64918,7 +64944,7 @@ function ResourceComposePage({ mode, cloneData, referenceData, gatheredContext,
64918
64944
  onChange: (e6)=>setSelectedLanguage(e6.target.value),
64919
64945
  disabled: isCreating,
64920
64946
  className: "semiont-select",
64921
- children: api_client_dist/* LOCALES */.YZ.map((lang)=>/* @__PURE__ */ (0,react_jsx_runtime.jsx)("option", {
64947
+ children: dist/* LOCALES */.YZ.map((lang)=>/* @__PURE__ */ (0,react_jsx_runtime.jsx)("option", {
64922
64948
  value: lang.code,
64923
64949
  children: lang.nativeName
64924
64950
  }, lang.code))
@@ -65056,7 +65082,7 @@ function ResourceComposePage({ mode, cloneData, referenceData, gatheredContext,
65056
65082
  })
65057
65083
  ]
65058
65084
  }),
65059
- uploadedFile && filePreviewUrl && (0,api_client_dist/* isImageMimeType */.u3)(fileMimeType) && /* @__PURE__ */ (0,react_jsx_runtime.jsxs)("div", {
65085
+ uploadedFile && filePreviewUrl && (0,dist/* isImageMimeType */.u3)(fileMimeType) && /* @__PURE__ */ (0,react_jsx_runtime.jsxs)("div", {
65060
65086
  className: "semiont-form__image-preview",
65061
65087
  children: [
65062
65088
  /* @__PURE__ */ (0,react_jsx_runtime.jsx)("p", {
@@ -65317,7 +65343,7 @@ function ResourceDiscoveryPage({ recentDocuments, searchDocuments, entityTypes,
65317
65343
  setSelectedEntityType(entityType3);
65318
65344
  }, []);
65319
65345
  const openResource = (0,react.useCallback)((resource)=>{
65320
- const resourceId2 = (0,api_client_dist/* getResourceId */.mv)(resource);
65346
+ const resourceId2 = (0,dist/* getResourceId */.mv)(resource);
65321
65347
  if (resourceId2) {
65322
65348
  onNavigateToResourceRef.current(resourceId2);
65323
65349
  }
@@ -65440,7 +65466,7 @@ function ResourceDiscoveryPage({ recentDocuments, searchDocuments, entityTypes,
65440
65466
  tabIndex: index2 === 0 ? 0 : -1,
65441
65467
  archivedLabel: t12.archived,
65442
65468
  createdLabel: t12.created
65443
- }, (0,api_client_dist/* getResourceId */.mv)(resource)))
65469
+ }, (0,dist/* getResourceId */.mv)(resource)))
65444
65470
  }) : /* @__PURE__ */ (0,react_jsx_runtime.jsxs)("div", {
65445
65471
  className: "semiont-card__empty",
65446
65472
  children: [
@@ -65487,12 +65513,12 @@ function ResourceDiscoveryPage({ recentDocuments, searchDocuments, entityTypes,
65487
65513
 
65488
65514
 
65489
65515
  function toAccessToken2(token) {
65490
- return token ? (0,dist/* accessToken */.aS)(token) : void 0;
65516
+ return token ? (0,core_dist/* accessToken */.aS)(token) : void 0;
65491
65517
  }
65492
65518
  function useBindFlow(rUri) {
65493
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
65494
- const client = useApiClient();
65495
- const token = useAuthToken();
65519
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
65520
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
65521
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
65496
65522
  const { showError } = useToast();
65497
65523
  const rUriRef = (0,react.useRef)(rUri);
65498
65524
  process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{
@@ -65507,23 +65533,31 @@ function useBindFlow(rUri) {
65507
65533
  tokenRef.current = token;
65508
65534
  });
65509
65535
  process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{
65510
- const handleAnnotationUpdateBody = async (event)=>{
65511
- try {
65512
- await clientRef.current.updateAnnotationBody(rUriRef.current, event.annotationId, {
65513
- resourceId: event.resourceId,
65514
- operations: event.operations
65515
- }, {
65516
- auth: toAccessToken2(tokenRef.current)
65517
- });
65536
+ const handleAnnotationUpdateBody = (event)=>{
65537
+ const annotationId4 = event.annotationId;
65538
+ const finishedSub = eventBus.get("bind:finished").subscribe((finishedEvent)=>{
65539
+ if (finishedEvent.annotationId !== annotationId4) return;
65540
+ finishedSub.unsubscribe();
65541
+ failedSub.unsubscribe();
65518
65542
  eventBus.get("bind:body-updated").next({
65519
- annotationId: event.annotationId
65543
+ annotationId: annotationId4
65520
65544
  });
65521
- } catch (error) {
65522
- console.error("Failed to update annotation body:", error);
65545
+ });
65546
+ const failedSub = eventBus.get("bind:failed").subscribe((failedEvent)=>{
65547
+ finishedSub.unsubscribe();
65548
+ failedSub.unsubscribe();
65549
+ console.error("Failed to update annotation body:", failedEvent.error);
65523
65550
  eventBus.get("bind:body-update-failed").next({
65524
- error
65551
+ error: failedEvent.error ?? new Error("Bind failed")
65525
65552
  });
65526
- }
65553
+ });
65554
+ clientRef.current.sse.bindAnnotation(rUriRef.current, annotationId4, {
65555
+ resourceId: event.resourceId,
65556
+ operations: event.operations
65557
+ }, {
65558
+ auth: toAccessToken2(tokenRef.current),
65559
+ eventBus
65560
+ });
65527
65561
  };
65528
65562
  const handleSearchRequested = (event)=>{
65529
65563
  clientRef.current.sse.bindSearch(rUriRef.current, {
@@ -65545,7 +65579,7 @@ function useBindFlow(rUri) {
65545
65579
  }, [
65546
65580
  eventBus
65547
65581
  ]);
65548
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
65582
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
65549
65583
  "bind:body-update-failed": ({ error })=>showError(`Failed to update reference: ${error.message}`)
65550
65584
  });
65551
65585
  }
@@ -65553,12 +65587,12 @@ function useBindFlow(rUri) {
65553
65587
 
65554
65588
 
65555
65589
  function toAccessToken3(token) {
65556
- return token ? (0,dist/* accessToken */.aS)(token) : void 0;
65590
+ return token ? (0,core_dist/* accessToken */.aS)(token) : void 0;
65557
65591
  }
65558
65592
  function useMarkFlow(rUri) {
65559
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
65560
- const client = useApiClient();
65561
- const token = useAuthToken();
65593
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
65594
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
65595
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
65562
65596
  const { showSuccess, showError, showInfo } = useToast();
65563
65597
  const clientRef = (0,react.useRef)(client);
65564
65598
  const rUriRef = (0,react.useRef)(rUri);
@@ -65579,15 +65613,7 @@ function useMarkFlow(rUri) {
65579
65613
  commenting: "annotations",
65580
65614
  assessing: "annotations",
65581
65615
  tagging: "annotations",
65582
- linking: "annotations",
65583
- bookmarking: "annotations",
65584
- classifying: "annotations",
65585
- describing: "annotations",
65586
- editing: "annotations",
65587
- identifying: "annotations",
65588
- moderating: "annotations",
65589
- questioning: "annotations",
65590
- replying: "annotations"
65616
+ linking: "annotations"
65591
65617
  };
65592
65618
  eventBus.get("browse:panel-open").next({
65593
65619
  panel: MOTIVATION_TO_TAB[pending.motivation] || "annotations"
@@ -65723,7 +65749,7 @@ function useMarkFlow(rUri) {
65723
65749
  const currentRUri = rUriRef.current;
65724
65750
  if (!currentClient || !currentRUri) return;
65725
65751
  try {
65726
- const result = await currentClient.createAnnotation(currentRUri, {
65752
+ const result = await currentClient.markAnnotation(currentRUri, {
65727
65753
  motivation: event.motivation,
65728
65754
  target: {
65729
65755
  source: currentRUri,
@@ -65735,7 +65761,7 @@ function useMarkFlow(rUri) {
65735
65761
  });
65736
65762
  setPendingAnnotation(null);
65737
65763
  eventBus.get("mark:created").next({
65738
- annotationId: (0,dist/* annotationId */.Hn)(result.annotationId)
65764
+ annotationId: (0,core_dist/* annotationId */.Hn)(result.annotationId)
65739
65765
  });
65740
65766
  } catch (error) {
65741
65767
  console.error("Failed to create annotation:", error);
@@ -65784,7 +65810,7 @@ function useMarkFlow(rUri) {
65784
65810
  if (!schemaId || !categories || categories.length === 0) {
65785
65811
  throw new Error("Tag assist requires schemaId and categories");
65786
65812
  }
65787
- currentClient.sse.annotateTags(currentRUri, {
65813
+ currentClient.sse.markTags(currentRUri, {
65788
65814
  schemaId,
65789
65815
  categories
65790
65816
  }, sseOptions);
@@ -65793,23 +65819,23 @@ function useMarkFlow(rUri) {
65793
65819
  if (!entityTypes || entityTypes.length === 0) {
65794
65820
  throw new Error("Reference assist requires entityTypes");
65795
65821
  }
65796
- currentClient.sse.annotateReferences(currentRUri, {
65797
- entityTypes: entityTypes.map((et)=>(0,dist/* entityType */.EW)(et)),
65822
+ currentClient.sse.markReferences(currentRUri, {
65823
+ entityTypes: entityTypes.map((et)=>(0,core_dist/* entityType */.EW)(et)),
65798
65824
  includeDescriptiveReferences: includeDescriptiveReferences || false
65799
65825
  }, sseOptions);
65800
65826
  } else if (event.motivation === "highlighting") {
65801
- currentClient.sse.annotateHighlights(currentRUri, {
65827
+ currentClient.sse.markHighlights(currentRUri, {
65802
65828
  instructions: event.options.instructions,
65803
65829
  density: event.options.density
65804
65830
  }, sseOptions);
65805
65831
  } else if (event.motivation === "assessing") {
65806
- currentClient.sse.annotateAssessments(currentRUri, {
65832
+ currentClient.sse.markAssessments(currentRUri, {
65807
65833
  instructions: event.options.instructions,
65808
65834
  tone: event.options.tone,
65809
65835
  density: event.options.density
65810
65836
  }, sseOptions);
65811
65837
  } else if (event.motivation === "commenting") {
65812
- currentClient.sse.annotateComments(currentRUri, {
65838
+ currentClient.sse.markComments(currentRUri, {
65813
65839
  instructions: event.options.instructions,
65814
65840
  tone: event.options.tone,
65815
65841
  density: event.options.density
@@ -65845,7 +65871,7 @@ function useMarkFlow(rUri) {
65845
65871
  }, [
65846
65872
  eventBus
65847
65873
  ]);
65848
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
65874
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
65849
65875
  // Manual annotation
65850
65876
  "mark:requested": handleAnnotationRequested,
65851
65877
  "mark:select-comment": handleCommentRequested,
@@ -65881,12 +65907,12 @@ function useMarkFlow(rUri) {
65881
65907
 
65882
65908
 
65883
65909
  function toAccessToken4(token) {
65884
- return token ? (0,dist/* accessToken */.aS)(token) : void 0;
65910
+ return token ? (0,core_dist/* accessToken */.aS)(token) : void 0;
65885
65911
  }
65886
65912
  function useYieldFlow(locale, resourceId2, clearNewAnnotationId) {
65887
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
65888
- const client = useApiClient();
65889
- const token = useAuthToken();
65913
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
65914
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
65915
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
65890
65916
  const { showSuccess, showError } = useToast();
65891
65917
  const clientRef = (0,react.useRef)(client);
65892
65918
  const tokenRef = (0,react.useRef)(token);
@@ -65907,10 +65933,10 @@ function useYieldFlow(locale, resourceId2, clearNewAnnotationId) {
65907
65933
  setYieldProgress(null);
65908
65934
  }, []);
65909
65935
  const handleGenerateDocument = (0,react.useCallback)((referenceId, options)=>{
65910
- clearNewAnnotationId((0,dist/* annotationId */.Hn)(referenceId));
65936
+ clearNewAnnotationId((0,core_dist/* annotationId */.Hn)(referenceId));
65911
65937
  eventBus.get("yield:request").next({
65912
- annotationId: (0,dist/* annotationId */.Hn)(referenceId),
65913
- resourceId: (0,dist/* resourceId */.a)(resourceId2),
65938
+ annotationId: (0,core_dist/* annotationId */.Hn)(referenceId),
65939
+ resourceId: (0,core_dist/* resourceId */.a)(resourceId2),
65914
65940
  options: {
65915
65941
  ...options,
65916
65942
  language: options.language || locale,
@@ -65952,7 +65978,7 @@ function useYieldFlow(locale, resourceId2, clearNewAnnotationId) {
65952
65978
  auth: toAccessToken4(tokenRef.current),
65953
65979
  eventBus
65954
65980
  };
65955
- clientRef.current.sse.yieldResourceFromAnnotation(event.resourceId, event.annotationId, event.options, sseOptions);
65981
+ clientRef.current.sse.yieldResource(event.resourceId, event.annotationId, event.options, sseOptions);
65956
65982
  } catch (error) {
65957
65983
  if (error.name !== "AbortError") {
65958
65984
  console.error("[useYieldFlow] Generation failed:", error);
@@ -65978,7 +66004,7 @@ function useYieldFlow(locale, resourceId2, clearNewAnnotationId) {
65978
66004
  }, [
65979
66005
  eventBus
65980
66006
  ]);
65981
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
66007
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
65982
66008
  "yield:progress": handleProgressEvent,
65983
66009
  "yield:finished": handleGenerationComplete,
65984
66010
  "yield:failed": handleGenerationFailed
@@ -65993,10 +66019,10 @@ function useYieldFlow(locale, resourceId2, clearNewAnnotationId) {
65993
66019
 
65994
66020
 
65995
66021
  function toAccessToken5(token) {
65996
- return token ? (0,dist/* accessToken */.aS)(token) : void 0;
66022
+ return token ? (0,core_dist/* accessToken */.aS)(token) : void 0;
65997
66023
  }
65998
66024
  function useContextGatherFlow(eventBus, config) {
65999
- const token = useAuthToken();
66025
+ const token = (0,chunk_XMCUHQ2Y/* useAuthToken */.L4)();
66000
66026
  const [gatherContext, setCorrelationContext] = (0,react.useState)(null);
66001
66027
  const [gatherLoading, setCorrelationLoading] = (0,react.useState)(false);
66002
66028
  const [gatherError, setCorrelationError] = (0,react.useState)(null);
@@ -66010,33 +66036,38 @@ function useContextGatherFlow(eventBus, config) {
66010
66036
  tokenRef.current = token;
66011
66037
  });
66012
66038
  process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{
66013
- const handleGatherRequested = async (event)=>{
66039
+ const handleGatherRequested = (event)=>{
66014
66040
  setCorrelationLoading(true);
66015
66041
  setCorrelationError(null);
66016
66042
  setCorrelationContext(null);
66017
66043
  setCorrelationAnnotationId(event.annotationId);
66018
- try {
66019
- const { client, resourceId: resourceId2 } = configRef.current;
66020
- const response = await client.getAnnotationLLMContext(resourceId2, event.annotationId, {
66021
- contextWindow: 2e3,
66022
- auth: toAccessToken5(tokenRef.current)
66023
- });
66024
- const context = response.context ?? null;
66044
+ const { client, resourceId: resourceId2 } = configRef.current;
66045
+ const contextWindow = event.options?.contextWindow ?? 2e3;
66046
+ const finishedSub = eventBus.get("gather:annotation-finished").subscribe((finishedEvent)=>{
66047
+ if (finishedEvent.annotationId !== event.annotationId) return;
66048
+ finishedSub.unsubscribe();
66049
+ failedSub.unsubscribe();
66050
+ const context = finishedEvent.response.context ?? null;
66025
66051
  setCorrelationContext(context);
66026
66052
  setCorrelationLoading(false);
66027
66053
  eventBus.get("gather:complete").next({
66028
- annotationId: event.annotationId,
66029
- response
66054
+ annotationId: finishedEvent.annotationId,
66055
+ response: finishedEvent.response
66030
66056
  });
66031
- } catch (error) {
66032
- const err = error;
66033
- setCorrelationError(err);
66057
+ });
66058
+ const failedSub = eventBus.get("gather:failed").subscribe((failedEvent)=>{
66059
+ if (failedEvent.annotationId !== event.annotationId) return;
66060
+ finishedSub.unsubscribe();
66061
+ failedSub.unsubscribe();
66062
+ setCorrelationError(failedEvent.error);
66034
66063
  setCorrelationLoading(false);
66035
- eventBus.get("gather:failed").next({
66036
- annotationId: event.annotationId,
66037
- error: err
66038
- });
66039
- }
66064
+ });
66065
+ client.sse.gatherAnnotation(resourceId2, event.annotationId, {
66066
+ contextWindow
66067
+ }, {
66068
+ auth: toAccessToken5(tokenRef.current),
66069
+ eventBus
66070
+ });
66040
66071
  };
66041
66072
  const subscription = eventBus.get("gather:requested").subscribe(handleGatherRequested);
66042
66073
  return ()=>subscription.unsubscribe();
@@ -66054,8 +66085,8 @@ function useContextGatherFlow(eventBus, config) {
66054
66085
 
66055
66086
  function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanels, refetchDocument }) {
66056
66087
  const tw = useTranslations("ReferenceWizard");
66057
- const eventBus = (0,chunk_2HGWOLVN/* useEventBus */.iX)();
66058
- const client = useApiClient();
66088
+ const eventBus = (0,chunk_5JZFKRLW/* useEventBus */.iX)();
66089
+ const client = (0,chunk_5JZFKRLW/* useApiClient */.RH)();
66059
66090
  const queryClient = (0,QueryClientProvider/* useQueryClient */.jE)();
66060
66091
  const { showError, showSuccess } = useToast();
66061
66092
  const { theme: theme2, setTheme } = useTheme();
@@ -66074,7 +66105,7 @@ function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanel
66074
66105
  const referencedBy = referencedByData?.referencedBy || [];
66075
66106
  const { data: entityTypesData } = entityTypesAPI.list.useQuery();
66076
66107
  const allEntityTypes = entityTypesData?.entityTypes || [];
66077
- const { hoveredAnnotationId } = (0,chunk_ZPV43WN2/* useBeckonFlow */.QY)();
66108
+ const { hoveredAnnotationId } = (0,chunk_XMCUHQ2Y/* useBeckonFlow */.QY)();
66078
66109
  const { assistingMotivation, progress, pendingAnnotation } = useMarkFlow(rUri);
66079
66110
  const { activePanel, scrollToAnnotationId, panelInitialTab, onScrollCompleted } = usePanelBrowse();
66080
66111
  useBindFlow(rUri);
@@ -66122,7 +66153,7 @@ function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanel
66122
66153
  ]);
66123
66154
  const handleWizardLinkResource = (0,react.useCallback)((referenceId, targetResourceId)=>{
66124
66155
  eventBus.get("bind:update-body").next({
66125
- annotationId: (0,dist/* annotationId */.Hn)(referenceId),
66156
+ annotationId: (0,core_dist/* annotationId */.Hn)(referenceId),
66126
66157
  resourceId: rUri,
66127
66158
  operations: [
66128
66159
  {
@@ -66163,7 +66194,7 @@ function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanel
66163
66194
  }, 500);
66164
66195
  (0,react.useEffect)(()=>{
66165
66196
  if (resource && rUri) {
66166
- const mediaType = (0,api_client_dist/* getPrimaryMediaType */.f9)(resource);
66197
+ const mediaType = (0,dist/* getPrimaryMediaType */.f9)(resource);
66167
66198
  addResource(rUri, resource.name, mediaType || void 0, resource.storageUri);
66168
66199
  if (typeof localStorage !== "undefined") {
66169
66200
  localStorage.setItem("lastViewedDocumentId", rUri);
@@ -66395,7 +66426,7 @@ function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanel
66395
66426
  const handleModeToggled = (0,react.useCallback)(()=>{
66396
66427
  setAnnotateMode((prev)=>!prev);
66397
66428
  }, []);
66398
- (0,chunk_ZPV43WN2/* useEventSubscriptions */.C$)({
66429
+ (0,chunk_XMCUHQ2Y/* useEventSubscriptions */.C$)({
66399
66430
  "mark:mode-toggled": handleModeToggled,
66400
66431
  "mark:archive": handleResourceArchive,
66401
66432
  "mark:unarchive": handleResourceUnarchive,
@@ -66431,7 +66462,7 @@ function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanel
66431
66462
  announceResourceLoaded
66432
66463
  ]);
66433
66464
  const documentEntityTypes = resource.entityTypes || [];
66434
- const primaryRep = (0,api_client_dist/* getPrimaryRepresentation */.CR)(resource);
66465
+ const primaryRep = (0,dist/* getPrimaryRepresentation */.CR)(resource);
66435
66466
  const primaryMediaType = primaryRep?.mediaType;
66436
66467
  const primaryByteSize = primaryRep?.byteSize;
66437
66468
  const [annotateMode, setAnnotateMode] = (0,react.useState)(()=>{
@@ -66492,7 +66523,7 @@ function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanel
66492
66523
  }),
66493
66524
  /* @__PURE__ */ (0,react_jsx_runtime.jsx)("div", {
66494
66525
  className: "semiont-document-viewer__scrollable-body",
66495
- lang: (0,api_client_dist/* getLanguage */.Z0)(resource) || void 0,
66526
+ lang: (0,dist/* getLanguage */.Z0)(resource) || void 0,
66496
66527
  children: /* @__PURE__ */ (0,react_jsx_runtime.jsx)(ErrorBoundary, {
66497
66528
  fallback: (error, reset)=>/* @__PURE__ */ (0,react_jsx_runtime.jsxs)("div", {
66498
66529
  className: "semiont-document-viewer__error",
@@ -66573,7 +66604,7 @@ function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanel
66573
66604
  }),
66574
66605
  activePanel === "info" && /* @__PURE__ */ (0,react_jsx_runtime.jsx)(ResourceInfoPanel, {
66575
66606
  documentEntityTypes,
66576
- documentLocale: (0,api_client_dist/* getLanguage */.Z0)(resource),
66607
+ documentLocale: (0,dist/* getLanguage */.Z0)(resource),
66577
66608
  primaryMediaType,
66578
66609
  primaryByteSize,
66579
66610
  isArchived: resource.archived ?? false
@@ -66660,6 +66691,59 @@ function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanel
66660
66691
  //# sourceMappingURL=index.mjs.map
66661
66692
 
66662
66693
 
66694
+ /***/ }),
66695
+
66696
+ /***/ 74166:
66697
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
66698
+
66699
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
66700
+ /* harmony export */ P$: () => (/* binding */ __commonJS),
66701
+ /* harmony export */ VA: () => (/* binding */ __export),
66702
+ /* harmony export */ f1: () => (/* binding */ __toESM),
66703
+ /* harmony export */ fd: () => (/* binding */ __glob)
66704
+ /* harmony export */ });
66705
+ /* __next_internal_client_entry_do_not_use__ __glob,__commonJS,__export,__toESM auto */ var __create = Object.create;
66706
+ var __defProp = Object.defineProperty;
66707
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
66708
+ var __getOwnPropNames = Object.getOwnPropertyNames;
66709
+ var __getProtoOf = Object.getPrototypeOf;
66710
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
66711
+ var __glob = (map)=>(path)=>{
66712
+ var fn = map[path];
66713
+ if (fn) return fn();
66714
+ throw new Error("Module not found in bundle: " + path);
66715
+ };
66716
+ var __commonJS = (cb, mod)=>function __require() {
66717
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
66718
+ exports: {}
66719
+ }).exports, mod), mod.exports;
66720
+ };
66721
+ var __export = (target, all)=>{
66722
+ for(var name in all)__defProp(target, name, {
66723
+ get: all[name],
66724
+ enumerable: true
66725
+ });
66726
+ };
66727
+ var __copyProps = (to, from, except, desc)=>{
66728
+ if (from && typeof from === "object" || typeof from === "function") {
66729
+ for (let key of __getOwnPropNames(from))if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
66730
+ get: ()=>from[key],
66731
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
66732
+ });
66733
+ }
66734
+ return to;
66735
+ };
66736
+ var __toESM = (mod, isNodeMode, target)=>(target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
66737
+ // file that has been converted to a CommonJS file using a Babel-
66738
+ // compatible transform (i.e. "__esModule" has not been set), then set
66739
+ // "default" to the CommonJS "module.exports" for node compatibility.
66740
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
66741
+ value: mod,
66742
+ enumerable: true
66743
+ }) : target, mod));
66744
+ //# sourceMappingURL=chunk-D4GAAQMM.mjs.map
66745
+
66746
+
66663
66747
  /***/ }),
66664
66748
 
66665
66749
  /***/ 88887:
@@ -66886,7 +66970,7 @@ var SSEClient = class {
66886
66970
  *
66887
66971
  * @example
66888
66972
  * ```typescript
66889
- * const stream = sseClient.annotateReferences(
66973
+ * const stream = sseClient.markReferences(
66890
66974
  * 'http://localhost:4000/resources/doc-123',
66891
66975
  * { entityTypes: ['Person', 'Organization'] },
66892
66976
  * { auth: 'your-token' }
@@ -66908,7 +66992,7 @@ var SSEClient = class {
66908
66992
  * // Cleanup when done
66909
66993
  * stream.close();
66910
66994
  * ```
66911
- */ annotateReferences(resourceId, request, options) {
66995
+ */ markReferences(resourceId, request, options) {
66912
66996
  const url = `${this.baseUrl}/resources/${resourceId}/annotate-references-stream`;
66913
66997
  return createSSEStream(url, {
66914
66998
  method: "POST",
@@ -66937,7 +67021,7 @@ var SSEClient = class {
66937
67021
  *
66938
67022
  * @example
66939
67023
  * ```typescript
66940
- * const stream = sseClient.yieldResourceFromAnnotation(
67024
+ * const stream = sseClient.yieldResource(
66941
67025
  * 'http://localhost:4000/resources/doc-123',
66942
67026
  * 'http://localhost:4000/annotations/ann-456',
66943
67027
  * { language: 'es', title: 'Spanish Summary' },
@@ -66960,7 +67044,7 @@ var SSEClient = class {
66960
67044
  * // Cleanup when done
66961
67045
  * stream.close();
66962
67046
  * ```
66963
- */ yieldResourceFromAnnotation(resourceId, annotationId, request, options) {
67047
+ */ yieldResource(resourceId, annotationId, request, options) {
66964
67048
  const url = `${this.baseUrl}/resources/${resourceId}/annotations/${annotationId}/yield-resource-stream`;
66965
67049
  return createSSEStream(url, {
66966
67050
  method: "POST",
@@ -66988,7 +67072,7 @@ var SSEClient = class {
66988
67072
  *
66989
67073
  * @example
66990
67074
  * ```typescript
66991
- * const stream = sseClient.annotateHighlights(
67075
+ * const stream = sseClient.markHighlights(
66992
67076
  * 'http://localhost:4000/resources/doc-123',
66993
67077
  * { instructions: 'Focus on key technical points' },
66994
67078
  * { auth: 'your-token' }
@@ -67010,7 +67094,7 @@ var SSEClient = class {
67010
67094
  * // Cleanup when done
67011
67095
  * stream.close();
67012
67096
  * ```
67013
- */ annotateHighlights(resourceId, request = {}, options) {
67097
+ */ markHighlights(resourceId, request = {}, options) {
67014
67098
  const url = `${this.baseUrl}/resources/${resourceId}/annotate-highlights-stream`;
67015
67099
  return createSSEStream(url, {
67016
67100
  method: "POST",
@@ -67038,7 +67122,7 @@ var SSEClient = class {
67038
67122
  *
67039
67123
  * @example
67040
67124
  * ```typescript
67041
- * const stream = sseClient.annotateAssessments(
67125
+ * const stream = sseClient.markAssessments(
67042
67126
  * 'http://localhost:4000/resources/doc-123',
67043
67127
  * { instructions: 'Evaluate claims for accuracy' },
67044
67128
  * { auth: 'your-token' }
@@ -67060,7 +67144,7 @@ var SSEClient = class {
67060
67144
  * // Cleanup when done
67061
67145
  * stream.close();
67062
67146
  * ```
67063
- */ annotateAssessments(resourceId, request = {}, options) {
67147
+ */ markAssessments(resourceId, request = {}, options) {
67064
67148
  const url = `${this.baseUrl}/resources/${resourceId}/annotate-assessments-stream`;
67065
67149
  return createSSEStream(url, {
67066
67150
  method: "POST",
@@ -67090,7 +67174,7 @@ var SSEClient = class {
67090
67174
  *
67091
67175
  * @example
67092
67176
  * ```typescript
67093
- * const stream = sseClient.annotateComments(
67177
+ * const stream = sseClient.markComments(
67094
67178
  * 'http://localhost:4000/resources/doc-123',
67095
67179
  * {
67096
67180
  * instructions: 'Focus on technical terminology',
@@ -67114,7 +67198,7 @@ var SSEClient = class {
67114
67198
  * // Cleanup when done
67115
67199
  * stream.close();
67116
67200
  * ```
67117
- */ annotateComments(resourceId, request = {}, options) {
67201
+ */ markComments(resourceId, request = {}, options) {
67118
67202
  const url = `${this.baseUrl}/resources/${resourceId}/annotate-comments-stream`;
67119
67203
  return createSSEStream(url, {
67120
67204
  method: "POST",
@@ -67144,7 +67228,7 @@ var SSEClient = class {
67144
67228
  *
67145
67229
  * @example
67146
67230
  * ```typescript
67147
- * const stream = sseClient.annotateTags(
67231
+ * const stream = sseClient.markTags(
67148
67232
  * 'http://localhost:4000/resources/doc-123',
67149
67233
  * {
67150
67234
  * schemaId: 'legal-irac',
@@ -67169,7 +67253,7 @@ var SSEClient = class {
67169
67253
  * // Cleanup when done
67170
67254
  * stream.close();
67171
67255
  * ```
67172
- */ annotateTags(resourceId, request, options) {
67256
+ */ markTags(resourceId, request, options) {
67173
67257
  const url = `${this.baseUrl}/resources/${resourceId}/annotate-tags-stream`;
67174
67258
  return createSSEStream(url, {
67175
67259
  method: "POST",
@@ -67186,6 +67270,81 @@ var SSEClient = class {
67186
67270
  }, this.logger);
67187
67271
  }
67188
67272
  /**
67273
+ * Gather LLM context for a resource (streaming)
67274
+ *
67275
+ * Streams resource LLM context gathering progress via Server-Sent Events.
67276
+ *
67277
+ * @param resourceId - Resource URI or ID
67278
+ * @param request - Gather configuration (depth, maxResources, includeContent, includeSummary)
67279
+ * @param options - Request options (auth token, eventBus)
67280
+ * @returns SSE stream controller with progress/complete/error callbacks
67281
+ */ gatherResource(resourceId, request, options) {
67282
+ const url = `${this.baseUrl}/resources/${resourceId}/gather-resource-stream`;
67283
+ return createSSEStream(url, {
67284
+ method: "POST",
67285
+ headers: this.getHeaders(options.auth),
67286
+ body: JSON.stringify(request)
67287
+ }, {
67288
+ progressEvents: [
67289
+ "gather:progress"
67290
+ ],
67291
+ completeEvent: "gather:finished",
67292
+ errorEvent: "gather:failed",
67293
+ eventBus: options.eventBus,
67294
+ eventPrefix: void 0
67295
+ }, this.logger);
67296
+ }
67297
+ /**
67298
+ * Gather LLM context for an annotation (streaming)
67299
+ *
67300
+ * Streams annotation LLM context gathering progress via Server-Sent Events.
67301
+ *
67302
+ * @param resourceId - Resource URI or ID
67303
+ * @param annotationId - Annotation URI or ID
67304
+ * @param request - Gather configuration (contextWindow)
67305
+ * @param options - Request options (auth token, eventBus)
67306
+ * @returns SSE stream controller with progress/complete/error callbacks
67307
+ */ gatherAnnotation(resourceId, annotationId, request, options) {
67308
+ const url = `${this.baseUrl}/resources/${resourceId}/annotations/${annotationId}/gather-annotation-stream`;
67309
+ return createSSEStream(url, {
67310
+ method: "POST",
67311
+ headers: this.getHeaders(options.auth),
67312
+ body: JSON.stringify(request)
67313
+ }, {
67314
+ progressEvents: [
67315
+ "gather:annotation-progress"
67316
+ ],
67317
+ completeEvent: "gather:annotation-finished",
67318
+ errorEvent: "gather:failed",
67319
+ eventBus: options.eventBus,
67320
+ eventPrefix: void 0
67321
+ }, this.logger);
67322
+ }
67323
+ /**
67324
+ * Bind annotation body (streaming)
67325
+ *
67326
+ * Applies annotation body operations and streams completion via Server-Sent Events.
67327
+ *
67328
+ * @param resourceId - Resource URI or ID
67329
+ * @param annotationId - Annotation URI or ID
67330
+ * @param request - Bind operations (resourceId + operations array)
67331
+ * @param options - Request options (auth token, eventBus)
67332
+ * @returns SSE stream controller with complete/error callbacks
67333
+ */ bindAnnotation(resourceId, annotationId, request, options) {
67334
+ const url = `${this.baseUrl}/resources/${resourceId}/annotations/${annotationId}/bind-stream`;
67335
+ return createSSEStream(url, {
67336
+ method: "POST",
67337
+ headers: this.getHeaders(options.auth),
67338
+ body: JSON.stringify(request)
67339
+ }, {
67340
+ progressEvents: [],
67341
+ completeEvent: "bind:finished",
67342
+ errorEvent: "bind:failed",
67343
+ eventBus: options.eventBus,
67344
+ eventPrefix: void 0
67345
+ }, this.logger);
67346
+ }
67347
+ /**
67189
67348
  * Search for binding candidates (streaming)
67190
67349
  *
67191
67350
  * Bridges bind:search-requested to the backend Matcher actor via SSE.
@@ -67309,6 +67468,38 @@ var SSEClient = class {
67309
67468
  }
67310
67469
  return stream;
67311
67470
  }
67471
+ /**
67472
+ * Subscribe to participant attention stream (long-lived stream)
67473
+ *
67474
+ * Opens a participant-scoped SSE connection to receive cross-participant
67475
+ * beckon signals. Signals are delivered as 'beckon:focus' events routed
67476
+ * to the EventBus — the existing scroll/highlight machinery handles them.
67477
+ *
67478
+ * Signals are ephemeral — delivered if connected, dropped if not.
67479
+ *
67480
+ * @param options - Request options (auth token, eventBus)
67481
+ * @returns SSE stream controller
67482
+ */ attentionStream(options) {
67483
+ const url = `${this.baseUrl}/api/participants/me/attention-stream`;
67484
+ const stream = createSSEStream(url, {
67485
+ method: "GET",
67486
+ headers: this.getHeaders(options.auth)
67487
+ }, {
67488
+ progressEvents: [
67489
+ "*"
67490
+ ],
67491
+ completeEvent: null,
67492
+ errorEvent: null,
67493
+ eventBus: options.eventBus
67494
+ }, this.logger);
67495
+ if (options.onConnected) {
67496
+ const sub = options.eventBus.get(SSE_STREAM_CONNECTED).subscribe(()=>{
67497
+ options.onConnected();
67498
+ sub.unsubscribe();
67499
+ });
67500
+ }
67501
+ return stream;
67502
+ }
67312
67503
  };
67313
67504
  // src/client.ts
67314
67505
  var APIError = class extends Error {
@@ -67461,7 +67652,7 @@ var SemiontApiClient = class {
67461
67652
  * @param data.sourceAnnotationId - Optional source annotation ID
67462
67653
  * @param data.sourceResourceId - Optional source resource ID
67463
67654
  * @param options - Request options including auth
67464
- */ async createResource(data, options) {
67655
+ */ async yieldResource(data, options) {
67465
67656
  const formData = new FormData();
67466
67657
  formData.append("name", data.name);
67467
67658
  formData.append("format", data.format);
@@ -67499,7 +67690,7 @@ var SemiontApiClient = class {
67499
67690
  auth: options?.auth
67500
67691
  }).json();
67501
67692
  }
67502
- async getResource(id, options) {
67693
+ async browseResource(id, options) {
67503
67694
  return this.http.get(`${this.baseUrl}/resources/${id}`, {
67504
67695
  ...options,
67505
67696
  auth: options?.auth
@@ -67591,7 +67782,7 @@ var SemiontApiClient = class {
67591
67782
  contentType
67592
67783
  };
67593
67784
  }
67594
- async listResources(limit, archived, query, options) {
67785
+ async browseResources(limit, archived, query, options) {
67595
67786
  const searchParams = new URLSearchParams();
67596
67787
  if (limit) searchParams.append("limit", limit.toString());
67597
67788
  if (archived !== void 0) searchParams.append("archived", archived.toString());
@@ -67615,13 +67806,7 @@ var SemiontApiClient = class {
67615
67806
  auth: options?.auth
67616
67807
  }).json();
67617
67808
  }
67618
- async getResourceAnnotations(id, options) {
67619
- return this.http.get(`${this.baseUrl}/resources/${id}/annotations`, {
67620
- ...options,
67621
- auth: options?.auth
67622
- }).json();
67623
- }
67624
- async getAnnotationLLMContext(resourceId, annotationId, options) {
67809
+ async gatherAnnotation(resourceId, annotationId, options) {
67625
67810
  const searchParams = new URLSearchParams();
67626
67811
  if (options?.contextWindow) {
67627
67812
  searchParams.append("contextWindow", options.contextWindow.toString());
@@ -67631,7 +67816,7 @@ var SemiontApiClient = class {
67631
67816
  auth: options?.auth
67632
67817
  }).json();
67633
67818
  }
67634
- async getResourceReferencedBy(id, options) {
67819
+ async browseReferences(id, options) {
67635
67820
  return this.http.get(`${this.baseUrl}/resources/${id}/referenced-by`, {
67636
67821
  ...options,
67637
67822
  auth: options?.auth
@@ -67659,7 +67844,7 @@ var SemiontApiClient = class {
67659
67844
  // ============================================================================
67660
67845
  // ANNOTATIONS
67661
67846
  // ============================================================================
67662
- async createAnnotation(id, data, options) {
67847
+ async markAnnotation(id, data, options) {
67663
67848
  return this.http.post(`${this.baseUrl}/resources/${id}/annotations`, {
67664
67849
  json: data,
67665
67850
  ...options,
@@ -67672,13 +67857,13 @@ var SemiontApiClient = class {
67672
67857
  auth: options?.auth
67673
67858
  }).json();
67674
67859
  }
67675
- async getResourceAnnotation(resourceId, annotationId, options) {
67860
+ async browseAnnotation(resourceId, annotationId, options) {
67676
67861
  return this.http.get(`${this.baseUrl}/resources/${resourceId}/annotations/${annotationId}`, {
67677
67862
  ...options,
67678
67863
  auth: options?.auth
67679
67864
  }).json();
67680
67865
  }
67681
- async listAnnotations(id, motivation, options) {
67866
+ async browseAnnotations(id, motivation, options) {
67682
67867
  const searchParams = new URLSearchParams();
67683
67868
  if (motivation) searchParams.append("motivation", motivation);
67684
67869
  return this.http.get(`${this.baseUrl}/resources/${id}/annotations`, {
@@ -67693,7 +67878,7 @@ var SemiontApiClient = class {
67693
67878
  auth: options?.auth
67694
67879
  });
67695
67880
  }
67696
- async updateAnnotationBody(resourceId, annotationId, data, options) {
67881
+ async bindAnnotation(resourceId, annotationId, data, options) {
67697
67882
  await this.http.put(`${this.baseUrl}/resources/${resourceId}/annotations/${annotationId}/body`, {
67698
67883
  json: data,
67699
67884
  ...options,
@@ -67735,6 +67920,16 @@ var SemiontApiClient = class {
67735
67920
  }).json();
67736
67921
  }
67737
67922
  // ============================================================================
67923
+ // PARTICIPANTS
67924
+ // ============================================================================
67925
+ async beckonAttention(participantId, data, options) {
67926
+ return this.http.post(`${this.baseUrl}/api/participants/${participantId}/attention`, {
67927
+ json: data,
67928
+ ...options,
67929
+ auth: options?.auth
67930
+ }).json();
67931
+ }
67932
+ // ============================================================================
67738
67933
  // ADMIN
67739
67934
  // ============================================================================
67740
67935
  async listUsers(options) {
@@ -67921,7 +68116,7 @@ var SemiontApiClient = class {
67921
68116
  // ============================================================================
67922
68117
  // LLM CONTEXT
67923
68118
  // ============================================================================
67924
- async getResourceLLMContext(id, options) {
68119
+ async gatherResource(id, options) {
67925
68120
  const searchParams = new URLSearchParams();
67926
68121
  if (options?.depth !== void 0) searchParams.append("depth", options.depth.toString());
67927
68122
  if (options?.maxResources !== void 0) searchParams.append("maxResources", options.maxResources.toString());
@@ -67973,13 +68168,13 @@ var EventBusClient = class {
67973
68168
  // ========================================================================
67974
68169
  // Browse Flow — Resource reads
67975
68170
  // ========================================================================
67976
- async getResource(resourceId) {
68171
+ async browseResource(resourceId) {
67977
68172
  return eventBusRequest(this.eventBus, "browse:resource-requested", {
67978
68173
  correlationId: crypto.randomUUID(),
67979
68174
  resourceId
67980
68175
  }, "browse:resource-result", "browse:resource-failed", this.timeoutMs);
67981
68176
  }
67982
- async listResources(options) {
68177
+ async browseResources(options) {
67983
68178
  return eventBusRequest(this.eventBus, "browse:resources-requested", {
67984
68179
  correlationId: crypto.randomUUID(),
67985
68180
  ...options
@@ -68075,7 +68270,7 @@ var EventBusClient = class {
68075
68270
  // ========================================================================
68076
68271
  // Gather Flow — LLM context
68077
68272
  // ========================================================================
68078
- async getAnnotationLLMContext(annotationId, resourceId, options) {
68273
+ async gatherAnnotation(annotationId, resourceId, options) {
68079
68274
  const correlationId = crypto.randomUUID();
68080
68275
  const result$ = merge(this.eventBus.get("gather:complete").pipe(filter((e)=>e.correlationId === correlationId), map((e)=>({
68081
68276
  ok: true,
@@ -68097,7 +68292,7 @@ var EventBusClient = class {
68097
68292
  }
68098
68293
  return result.response;
68099
68294
  }
68100
- async getResourceLLMContext(resourceId, options) {
68295
+ async gatherResource(resourceId, options) {
68101
68296
  const correlationId = crypto.randomUUID();
68102
68297
  const result$ = merge(this.eventBus.get("gather:resource-complete").pipe(filter((e)=>e.correlationId === correlationId), map((e)=>({
68103
68298
  ok: true,