@pstdio/ui 0.15.0 → 0.16.0

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 (216) hide show
  1. package/dist/{MermaidComponent-DBJsTOmj.js → MermaidComponent-BCMQqPqu.js} +11 -11
  2. package/dist/{MermaidComponent-DBJsTOmj.js.map → MermaidComponent-BCMQqPqu.js.map} +1 -1
  3. package/dist/browser-storage-BinyFNJX.js +40 -0
  4. package/dist/browser-storage-BinyFNJX.js.map +1 -0
  5. package/dist/chat-ui.js +1188 -1147
  6. package/dist/chat-ui.js.map +1 -1
  7. package/dist/checkbox-D5AzFRlb.js +70 -0
  8. package/dist/checkbox-D5AzFRlb.js.map +1 -0
  9. package/dist/components/chat-ui/components/ai-conversation.d.ts +1 -1
  10. package/dist/components/chat-ui/components/ai-message.d.ts +1 -1
  11. package/dist/components/chat-ui/components/ai-response.d.ts +0 -1
  12. package/dist/components/chat-ui/components/attachment-list.d.ts +1 -1
  13. package/dist/components/chat-ui/components/auto-scroll.d.ts +27 -0
  14. package/dist/components/chat-ui/components/chat-message-animation.d.ts +22 -0
  15. package/dist/components/chat-ui/components/timeline.d.ts +0 -2
  16. package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +0 -1
  17. package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -12
  18. package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
  19. package/dist/components/chat-ui/tool-rendering/types.d.ts +1 -2
  20. package/dist/components/command-palette/index.d.ts +4 -0
  21. package/dist/components/data-renderer/data-renderer-board.d.ts +1 -1
  22. package/dist/components/data-renderer/data-renderer-card.d.ts +1 -1
  23. package/dist/components/data-renderer/data-renderer-list.d.ts +1 -1
  24. package/dist/components/data-renderer/data-renderer.d.ts +1 -1
  25. package/dist/components/data-renderer/index.d.ts +18 -0
  26. package/dist/components/data-renderer/types.d.ts +0 -6
  27. package/dist/components/diff-viewer/diff-card.d.ts +1 -0
  28. package/dist/components/diff-viewer/diff-drawer-scroll.d.ts +0 -19
  29. package/dist/components/diff-viewer/diff-drawer.d.ts +1 -0
  30. package/dist/components/diff-viewer/index.d.ts +2 -0
  31. package/dist/components/diff-viewer/use-selected-diff-scroll.d.ts +7 -3
  32. package/dist/components/internal/style-guide.d.ts +14 -0
  33. package/dist/components/internal/token-editor-controls.d.ts +8 -0
  34. package/dist/components/internal/token-editor-data.d.ts +40 -0
  35. package/dist/components/internal/token-editor-state.d.ts +22 -0
  36. package/dist/components/layout/index.d.ts +6 -0
  37. package/dist/components/list-row/list-row.types.d.ts +1 -1
  38. package/dist/components/overlays/index.d.ts +12 -0
  39. package/dist/components/{search-modal-content.d.ts → overlays/search-modal-content.d.ts} +1 -1
  40. package/dist/components/{searchable-menu.d.ts → overlays/searchable-menu.d.ts} +1 -1
  41. package/dist/components/param-editor/index.d.ts +23 -0
  42. package/dist/components/param-editor/inputs/action-input.d.ts +13 -0
  43. package/dist/components/param-editor/inputs/anchor-grid-input.d.ts +12 -0
  44. package/dist/components/param-editor/inputs/anchor-grid.d.ts +4 -0
  45. package/dist/components/param-editor/inputs/file-accept.d.ts +22 -0
  46. package/dist/components/param-editor/inputs/file-drop-input.d.ts +14 -0
  47. package/dist/components/param-editor/inputs/numeric-value.d.ts +6 -0
  48. package/dist/components/param-editor/inputs/range-input.d.ts +17 -0
  49. package/dist/components/param-editor/inputs/range-value.d.ts +5 -0
  50. package/dist/components/param-editor/inputs/resource-input-chips.d.ts +15 -0
  51. package/dist/components/param-editor/inputs/resource-input.d.ts +18 -0
  52. package/dist/components/param-editor/inputs/segmented-input.d.ts +14 -0
  53. package/dist/components/param-editor/inputs/slider-marks.d.ts +5 -0
  54. package/dist/components/param-editor/inputs/vector-input.d.ts +17 -0
  55. package/dist/components/param-editor/inputs/vector-value.d.ts +7 -0
  56. package/dist/components/param-editor/param-editor-control-item.d.ts +15 -0
  57. package/dist/components/param-editor/param-editor-control-list.d.ts +5 -0
  58. package/dist/components/param-editor/param-editor-field-label.d.ts +1 -0
  59. package/dist/components/param-editor/param-editor-field.d.ts +11 -0
  60. package/dist/components/param-editor/param-editor-inline-group.d.ts +5 -0
  61. package/dist/components/param-editor/param-editor-section.d.ts +16 -0
  62. package/dist/components/param-editor/param-editor.d.ts +2 -1
  63. package/dist/components/param-editor/param-editor.types.d.ts +101 -19
  64. package/dist/components/{breadcrumb.d.ts → primitives/breadcrumb.d.ts} +1 -1
  65. package/dist/components/primitives/index.d.ts +28 -0
  66. package/dist/components/{number-input.d.ts → primitives/number-input.d.ts} +0 -2
  67. package/dist/components/{session-indicator.d.ts → primitives/session-indicator.d.ts} +2 -1
  68. package/dist/components/{tooltip.d.ts → primitives/tooltip.d.ts} +0 -1
  69. package/dist/components/rich-text/prompt-input/commands.d.ts +0 -17
  70. package/dist/components/rich-text/prompt-input/events.d.ts +0 -13
  71. package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +1 -2
  72. package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +1 -2
  73. package/dist/components/rich-text/prompt-input/utils.d.ts +1 -2
  74. package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +0 -1
  75. package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
  76. package/dist/components/sidebar/sidebar.types.d.ts +1 -1
  77. package/dist/components/tab-strip/tab-visibility-filter.d.ts +1 -1
  78. package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
  79. package/dist/components/tag-editor/tag-editor.types.d.ts +1 -1
  80. package/dist/components/terminal/bind-session.d.ts +33 -0
  81. package/dist/components/terminal/index.d.ts +6 -0
  82. package/dist/components/terminal/scripted-bridge.d.ts +35 -0
  83. package/dist/components/terminal/terminal-contract.d.ts +22 -0
  84. package/dist/components/terminal/terminal-theme.d.ts +12 -0
  85. package/dist/components/terminal/terminal.d.ts +45 -0
  86. package/dist/components/terminal/types.d.ts +35 -0
  87. package/dist/components/terminal/use-terminal-session.d.ts +21 -0
  88. package/dist/components/tree-list/tree-list-order-filter.d.ts +1 -2
  89. package/dist/components/tree-list/tree-list-visibility-filter.d.ts +1 -1
  90. package/dist/components/tree-list/tree-list.d.ts +1 -1
  91. package/dist/data-renderer.js +1669 -0
  92. package/dist/data-renderer.js.map +1 -0
  93. package/dist/diff-editor-BnfV8cYB.js +182 -0
  94. package/dist/diff-editor-BnfV8cYB.js.map +1 -0
  95. package/dist/diff.js +1313 -0
  96. package/dist/diff.js.map +1 -0
  97. package/dist/empty-state-Bo4HVrgr.js +34 -0
  98. package/dist/empty-state-Bo4HVrgr.js.map +1 -0
  99. package/dist/foundations/gallery/gallery-frame.d.ts +21 -0
  100. package/dist/foundations/gallery/sections/badges-section.d.ts +1 -0
  101. package/dist/foundations/gallery/sections/buttons-section.d.ts +1 -0
  102. package/dist/foundations/gallery/sections/composite-chat-section.d.ts +1 -0
  103. package/dist/foundations/gallery/sections/composites-section.d.ts +1 -0
  104. package/dist/foundations/gallery/sections/feedback-section.d.ts +1 -0
  105. package/dist/foundations/gallery/sections/input-authoring-card.d.ts +1 -0
  106. package/dist/foundations/gallery/sections/inputs-section.d.ts +1 -0
  107. package/dist/foundations/gallery/sections/layout-section.d.ts +1 -0
  108. package/dist/foundations/gallery/sections/navigation-identity-section.d.ts +1 -0
  109. package/dist/foundations/gallery/sections/overlays-section.d.ts +1 -0
  110. package/dist/foundations/gallery/sections/panels-section.d.ts +1 -0
  111. package/dist/foundations/gallery/sections/param-editor-composite-card.d.ts +1 -0
  112. package/dist/foundations/gallery/sections/settings-composite-cards.d.ts +1 -0
  113. package/dist/index.d.ts +11 -84
  114. package/dist/index.js +3570 -7569
  115. package/dist/index.js.map +1 -1
  116. package/dist/list-row-mi3Hn-Um.js +740 -0
  117. package/dist/list-row-mi3Hn-Um.js.map +1 -0
  118. package/dist/mermaid-renderer-DZo3qj6D.js +425 -0
  119. package/dist/mermaid-renderer-DZo3qj6D.js.map +1 -0
  120. package/dist/mermaid.js +5 -0
  121. package/dist/mermaid.js.map +1 -0
  122. package/dist/radio-cLMEBBZk.js +76 -0
  123. package/dist/radio-cLMEBBZk.js.map +1 -0
  124. package/dist/resource-badge-qCWHP-wQ.js +99 -0
  125. package/dist/resource-badge-qCWHP-wQ.js.map +1 -0
  126. package/dist/{rich-message-DNSEhxXh.js → rich-message-DBf_5YlW.js} +462 -481
  127. package/dist/rich-message-DBf_5YlW.js.map +1 -0
  128. package/dist/rich-text.js +300 -299
  129. package/dist/rich-text.js.map +1 -1
  130. package/dist/scroll-area-BMbg1WcD.js +91 -0
  131. package/dist/scroll-area-BMbg1WcD.js.map +1 -0
  132. package/dist/style.css +1 -1
  133. package/dist/terminal.js +339 -0
  134. package/dist/terminal.js.map +1 -0
  135. package/dist/theme/global.d.ts +3 -0
  136. package/dist/theme/recipes/badge.d.ts +50 -0
  137. package/dist/theme/recipes/button.d.ts +24 -19
  138. package/dist/theme/recipes/color-picker.d.ts +1 -0
  139. package/dist/theme/recipes/dialog.d.ts +1 -1
  140. package/dist/theme/recipes/drawer.d.ts +1 -1
  141. package/dist/theme/recipes/input.d.ts +55 -0
  142. package/dist/theme/recipes/number-input.d.ts +98 -0
  143. package/dist/theme/recipes/tabs.d.ts +49 -28
  144. package/dist/theme/recipes/textarea.d.ts +62 -1
  145. package/dist/theme/recipes/timeline.d.ts +74 -0
  146. package/dist/theme/tokens/borders.d.ts +0 -3
  147. package/dist/theme/tokens/colors.d.ts +100 -70
  148. package/dist/{theme-25P7ij4C.js → theme-CJBYBJaA.js} +1194 -315
  149. package/dist/theme-CJBYBJaA.js.map +1 -0
  150. package/dist/theme-preference-DOzHx64J.js +123 -0
  151. package/dist/theme-preference-DOzHx64J.js.map +1 -0
  152. package/dist/theme.js +1 -1
  153. package/dist/tree-list-CcuZMLS5.js +930 -0
  154. package/dist/tree-list-CcuZMLS5.js.map +1 -0
  155. package/dist/workspace-badge-Fuo-1zPj.js +314 -0
  156. package/dist/workspace-badge-Fuo-1zPj.js.map +1 -0
  157. package/package.json +23 -3
  158. package/dist/components/file-tree-helpers.d.ts +0 -8
  159. package/dist/components/open-source-notices-screen.d.ts +0 -20
  160. package/dist/components/param-editor/input-group.d.ts +0 -10
  161. package/dist/components/rich-text/shared/plugins/MermaidPlugin/index.d.ts +0 -1
  162. package/dist/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +0 -5
  163. package/dist/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +0 -2
  164. package/dist/components/rich-text/theme/report-theme.d.ts +0 -3
  165. package/dist/components/style-guide-data.d.ts +0 -40
  166. package/dist/components/style-guide.d.ts +0 -1
  167. package/dist/mermaid-renderer-CPGj6vsb.js +0 -570
  168. package/dist/mermaid-renderer-CPGj6vsb.js.map +0 -1
  169. package/dist/radio-DJtQY9po.js +0 -286
  170. package/dist/radio-DJtQY9po.js.map +0 -1
  171. package/dist/resource-badge-CeJTOn8F.js +0 -188
  172. package/dist/resource-badge-CeJTOn8F.js.map +0 -1
  173. package/dist/rich-message-DNSEhxXh.js.map +0 -1
  174. package/dist/theme-25P7ij4C.js.map +0 -1
  175. package/dist/utils/formats.d.ts +0 -7
  176. /package/dist/components/{palette-filter.d.ts → command-palette/palette-filter.d.ts} +0 -0
  177. /package/dist/components/{palette-list.d.ts → command-palette/palette-list.d.ts} +0 -0
  178. /package/dist/components/{palette-shortcut.d.ts → command-palette/palette-shortcut.d.ts} +0 -0
  179. /package/dist/components/{palette.d.ts → command-palette/palette.d.ts} +0 -0
  180. /package/dist/components/{code-editor.d.ts → diff-viewer/code-editor.d.ts} +0 -0
  181. /package/dist/components/{column-file-browser.d.ts → file-browser/column-file-browser.d.ts} +0 -0
  182. /package/dist/components/{performance-panel.d.ts → internal/performance-panel.d.ts} +0 -0
  183. /package/dist/components/{header.d.ts → layout/header.d.ts} +0 -0
  184. /package/dist/components/{horizontal-menu-stack.d.ts → layout/horizontal-menu-stack.d.ts} +0 -0
  185. /package/dist/components/{item-section.d.ts → layout/item-section.d.ts} +0 -0
  186. /package/dist/components/{panel-header.constants.d.ts → layout/panel-header.constants.d.ts} +0 -0
  187. /package/dist/components/{resizable-split-layout.d.ts → layout/resizable-split-layout.d.ts} +0 -0
  188. /package/dist/components/{resizable-split-layout.handle.d.ts → layout/resizable-split-layout.handle.d.ts} +0 -0
  189. /package/dist/components/{attached-panel.d.ts → overlays/attached-panel.d.ts} +0 -0
  190. /package/dist/components/{bubble-button.d.ts → overlays/bubble-button.d.ts} +0 -0
  191. /package/dist/components/{bubble-panel.d.ts → overlays/bubble-panel.d.ts} +0 -0
  192. /package/dist/components/{delete-confirmation-modal.d.ts → overlays/delete-confirmation-modal.d.ts} +0 -0
  193. /package/dist/components/{repo-picker-dialog.d.ts → overlays/repo-picker-dialog.d.ts} +0 -0
  194. /package/dist/components/{resource-context-menu.d.ts → overlays/resource-context-menu.d.ts} +0 -0
  195. /package/dist/components/param-editor/{color-input.d.ts → inputs/color-input.d.ts} +0 -0
  196. /package/dist/components/param-editor/{date-input.d.ts → inputs/date-input.d.ts} +0 -0
  197. /package/dist/components/param-editor/{horizontal-text-input.d.ts → inputs/horizontal-text-input.d.ts} +0 -0
  198. /package/dist/components/param-editor/{number-input.d.ts → inputs/number-input.d.ts} +0 -0
  199. /package/dist/components/param-editor/{selection-input.d.ts → inputs/selection-input.d.ts} +0 -0
  200. /package/dist/components/param-editor/{text-input.d.ts → inputs/text-input.d.ts} +0 -0
  201. /package/dist/components/{alert.d.ts → primitives/alert.d.ts} +0 -0
  202. /package/dist/components/{checkbox.d.ts → primitives/checkbox.d.ts} +0 -0
  203. /package/dist/components/{content-placeholder.d.ts → primitives/content-placeholder.d.ts} +0 -0
  204. /package/dist/components/{empty-state.d.ts → primitives/empty-state.d.ts} +0 -0
  205. /package/dist/components/{error-boundary.d.ts → primitives/error-boundary.d.ts} +0 -0
  206. /package/dist/components/{icon-color-picker.d.ts → primitives/icon-color-picker.d.ts} +0 -0
  207. /package/dist/components/{info-card.d.ts → primitives/info-card.d.ts} +0 -0
  208. /package/dist/components/{integration-card.d.ts → primitives/integration-card.d.ts} +0 -0
  209. /package/dist/components/{radio.d.ts → primitives/radio.d.ts} +0 -0
  210. /package/dist/components/{resource-badge.d.ts → primitives/resource-badge.d.ts} +0 -0
  211. /package/dist/components/{scroll-area.d.ts → primitives/scroll-area.d.ts} +0 -0
  212. /package/dist/components/{simple-card.d.ts → primitives/simple-card.d.ts} +0 -0
  213. /package/dist/components/{slider.d.ts → primitives/slider.d.ts} +0 -0
  214. /package/dist/components/{switch.d.ts → primitives/switch.d.ts} +0 -0
  215. /package/dist/components/{toaster.d.ts → primitives/toaster.d.ts} +0 -0
  216. /package/dist/components/{workspace-badge.d.ts → primitives/workspace-badge.d.ts} +0 -0
@@ -1,68 +1,68 @@
1
- import { DecoratorNode as Z, $applyNodeReplacement as ut, ElementNode as $e, TextNode as re, $createTextNode as X, $nodesOfType as mt, createCommand as k, isHTMLElement as ft, $createParagraphNode as ae, COMMAND_PRIORITY_LOW as Oe, $getSelection as pt, $isRangeSelection as ht, $isElementNode as _t, KEY_DOWN_COMMAND as gt, COMMAND_PRIORITY_HIGH as Et, $getRoot as Le } from "lexical";
2
- import { jsx as l, jsxs as H, Fragment as be } from "react/jsx-runtime";
3
- import { c as C } from "react/compiler-runtime";
4
- import { chakra as xt, Box as A, Table as W, Text as D, Textarea as bt, Tooltip as ne, Flex as fe, Kbd as Tt } from "@chakra-ui/react";
5
- import { MarkNode as Rt } from "@lexical/mark";
6
- import { LexicalComposer as Pe } from "@lexical/react/LexicalComposer";
7
- import { LexicalErrorBoundary as we } from "@lexical/react/LexicalErrorBoundary";
8
- import { HistoryPlugin as Nt } from "@lexical/react/LexicalHistoryPlugin";
9
- import { OnChangePlugin as Me } from "@lexical/react/LexicalOnChangePlugin";
10
- import { RichTextPlugin as ve } from "@lexical/react/LexicalRichTextPlugin";
11
- import * as yt from "react";
12
- import { Suspense as Ae, lazy as St, useEffect as B, useImperativeHandle as Ct, useState as kt, forwardRef as It, useRef as $t } from "react";
13
- import { useLexicalComposerContext as F } from "@lexical/react/LexicalComposerContext";
14
- import { $setBlocksType as Ot } from "@lexical/selection";
15
- import { addClassNamesToElement as De, mergeRegister as pe } from "@lexical/utils";
16
- import { LexicalTypeaheadMenuPlugin as Lt } from "@lexical/react/LexicalTypeaheadMenuPlugin";
17
- import * as Pt from "react-dom";
18
- import { S as ie, R as Fe } from "./resource-badge-CeJTOn8F.js";
19
- import { LinkNode as he, AutoLinkNode as _e, $createLinkNode as wt, $isLinkNode as Mt, $isAutoLinkNode as He, $createAutoLinkNode as vt } from "@lexical/link";
20
- import { ListNode as Be, ListItemNode as Ue } from "@lexical/list";
21
- import { CHECK_LIST as At, TRANSFORMERS as Dt, LINK as Ft, $convertFromMarkdownString as qe, $convertToMarkdownString as Ht } from "@lexical/markdown";
22
- import { ClickableLinkPlugin as Bt } from "@lexical/react/LexicalClickableLinkPlugin";
23
- import { HorizontalRulePlugin as Ut } from "@lexical/react/LexicalHorizontalRulePlugin";
24
- import { LinkPlugin as qt } from "@lexical/react/LexicalLinkPlugin";
25
- import { ListPlugin as Wt } from "@lexical/react/LexicalListPlugin";
26
- import { TabIndentationPlugin as zt } from "@lexical/react/LexicalTabIndentationPlugin";
1
+ import { jsx as l, jsxs as F, Fragment as be } from "react/jsx-runtime";
2
+ import { c as N } from "react/compiler-runtime";
3
+ import { chakra as ut, Box as A, Table as W, Text as P, Textarea as ft, Tooltip as te, Flex as fe, Kbd as mt } from "@chakra-ui/react";
4
+ import { MarkNode as pt } from "@lexical/mark";
5
+ import { LexicalComposer as Re } from "@lexical/react/LexicalComposer";
6
+ import { LexicalErrorBoundary as Ie } from "@lexical/react/LexicalErrorBoundary";
7
+ import { HistoryPlugin as ht } from "@lexical/react/LexicalHistoryPlugin";
8
+ import { OnChangePlugin as we } from "@lexical/react/LexicalOnChangePlugin";
9
+ import { RichTextPlugin as Oe } from "@lexical/react/LexicalRichTextPlugin";
10
+ import { DecoratorNode as Q, $applyNodeReplacement as _t, ElementNode as ve, TextNode as ne, $createTextNode as V, $nodesOfType as gt, createCommand as Le, isHTMLElement as xt, $createParagraphNode as ce, COMMAND_PRIORITY_LOW as Me, $getSelection as bt, $isRangeSelection as Et, $isElementNode as yt, KEY_DOWN_COMMAND as St, COMMAND_PRIORITY_HIGH as Tt, $getRoot as Ae } from "lexical";
11
+ import * as kt from "react";
12
+ import { Suspense as Pe, lazy as Ct, useEffect as B, useImperativeHandle as Nt, useState as $t, forwardRef as Rt, useRef as It } from "react";
13
+ import { useLexicalComposerContext as D } from "@lexical/react/LexicalComposerContext";
14
+ import { $setBlocksType as wt } from "@lexical/selection";
15
+ import { addClassNamesToElement as De, mergeRegister as me } from "@lexical/utils";
16
+ import { LexicalTypeaheadMenuPlugin as Ot } from "@lexical/react/LexicalTypeaheadMenuPlugin";
17
+ import * as vt from "react-dom";
18
+ import { S as oe } from "./scroll-area-BMbg1WcD.js";
19
+ import { LinkNode as pe, AutoLinkNode as he, $createLinkNode as Lt, $isLinkNode as Mt, $isAutoLinkNode as Fe, $createAutoLinkNode as At } from "@lexical/link";
20
+ import { ListNode as Be, ListItemNode as qe } from "@lexical/list";
21
+ import { CHECK_LIST as Pt, TRANSFORMERS as Dt, LINK as Ft, $convertFromMarkdownString as He, $convertToMarkdownString as Bt } from "@lexical/markdown";
22
+ import { ClickableLinkPlugin as qt } from "@lexical/react/LexicalClickableLinkPlugin";
23
+ import { HorizontalRulePlugin as Ht } from "@lexical/react/LexicalHorizontalRulePlugin";
24
+ import { LinkPlugin as Wt } from "@lexical/react/LexicalLinkPlugin";
25
+ import { ListPlugin as zt } from "@lexical/react/LexicalListPlugin";
26
+ import { TabIndentationPlugin as Jt } from "@lexical/react/LexicalTabIndentationPlugin";
27
27
  import { QuoteNode as We, HeadingNode as ze } from "@lexical/rich-text";
28
- import { ContentEditable as Jt } from "@lexical/react/LexicalContentEditable";
29
- import jt from "prismjs";
30
- import { CodeNode as ge, CodeHighlightNode as Je, registerCodeHighlighting as Kt } from "@lexical/code";
31
- import Gt from "katex";
32
- import { TreeView as Vt } from "@lexical/react/LexicalTreeView";
33
- const Xt = xt(Jt);
34
- function je(n) {
35
- const e = C(11), {
28
+ import { ContentEditable as jt } from "@lexical/react/LexicalContentEditable";
29
+ import { CodeNode as _e, CodeHighlightNode as Je, registerCodeHighlighting as Ut } from "@lexical/code";
30
+ import Kt from "katex";
31
+ import { R as je } from "./resource-badge-qCWHP-wQ.js";
32
+ import { TreeView as Gt } from "@lexical/react/LexicalTreeView";
33
+ const Vt = ut(jt);
34
+ function Ue(n) {
35
+ const e = N(11), {
36
36
  onRef: t,
37
37
  fullWidth: r,
38
38
  padding: o,
39
39
  isRichMessage: i,
40
40
  scrollable: s
41
- } = n, c = r === void 0 ? !1 : r, a = i === void 0 ? !1 : i, f = s === void 0 ? !0 : s, u = c ? "100%" : "45rem", h = c ? "0" : "auto";
42
- let m;
43
- e[0] !== u || e[1] !== h ? (m = /* @__PURE__ */ l(Xt, { "data-testid": "content-editable", height: "fit-content", minH: "100%", width: "100%", maxWidth: u, marginInline: h, textStyle: "paragraph/M/regular", fontSize: "calc(var(--chakra-font-sizes-md) * var(--rich-text-font-scale))", position: "relative", outline: "none" }), e[0] = u, e[1] = h, e[2] = m) : m = e[2];
41
+ } = n, c = r === void 0 ? !1 : r, a = i === void 0 ? !1 : i, m = s === void 0 ? !0 : s, u = c ? "100%" : "45rem", h = c ? "0" : "auto";
42
+ let f;
43
+ e[0] !== u || e[1] !== h ? (f = /* @__PURE__ */ l(Vt, { "data-testid": "content-editable", height: "fit-content", minH: "100%", width: "100%", maxWidth: u, marginInline: h, textStyle: "paragraph/M/regular", fontSize: "calc(var(--chakra-font-sizes-md) * var(--rich-text-font-scale))", position: "relative", outline: "none" }), e[0] = u, e[1] = h, e[2] = f) : f = e[2];
44
44
  let d;
45
- e[3] !== t || e[4] !== o || e[5] !== m ? (d = /* @__PURE__ */ l(A, { ref: t, width: "100%", minH: "100%", padding: o, children: m }), e[3] = t, e[4] = o, e[5] = m, e[6] = d) : d = e[6];
45
+ e[3] !== t || e[4] !== o || e[5] !== f ? (d = /* @__PURE__ */ l(A, { ref: t, width: "100%", minH: "100%", padding: o, children: f }), e[3] = t, e[4] = o, e[5] = f, e[6] = d) : d = e[6];
46
46
  const p = d;
47
- if (!f)
47
+ if (!m)
48
48
  return p;
49
49
  const _ = a ? "true" : void 0;
50
- let x;
51
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = {
50
+ let b;
51
+ e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
52
52
  width: "100%",
53
53
  minH: "100%"
54
- }, e[7] = x) : x = e[7];
54
+ }, e[7] = b) : b = e[7];
55
55
  let g;
56
- return e[8] !== p || e[9] !== _ ? (g = /* @__PURE__ */ l(ie, { className: "rich-text", "data-rich-message": _, height: "100%", minH: "0", position: "relative", contentProps: x, children: p }), e[8] = p, e[9] = _, e[10] = g) : g = e[10], g;
56
+ return e[8] !== p || e[9] !== _ ? (g = /* @__PURE__ */ l(oe, { className: "rich-text", "data-rich-message": _, height: "100%", minH: "0", position: "relative", contentProps: b, children: p }), e[8] = p, e[9] = _, e[10] = g) : g = e[10], g;
57
57
  }
58
- let se = class de extends Z {
58
+ let ie = class ae extends Q {
59
59
  __href;
60
60
  __label;
61
61
  static getType() {
62
62
  return "reference-link";
63
63
  }
64
64
  static clone(e) {
65
- return new de(e.__href, e.__label, e.__key);
65
+ return new ae(e.__href, e.__label, e.__key);
66
66
  }
67
67
  constructor(e, t, r) {
68
68
  super(r), this.__href = e, this.__label = t;
@@ -78,7 +78,7 @@ let se = class de extends Z {
78
78
  }
79
79
  exportJSON() {
80
80
  return {
81
- type: de.getType(),
81
+ type: ae.getType(),
82
82
  version: 1,
83
83
  href: this.__href,
84
84
  label: this.__label
@@ -89,42 +89,42 @@ let se = class de extends Z {
89
89
  }
90
90
  decorate(e, t) {
91
91
  const r = this.__href, i = r.split("/").pop() || "unknown", s = /^https?:\/\//i.test(r), c = /^#?\$PROJECT\//i.test(r);
92
- return /* @__PURE__ */ l(A, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ l(Fe, { fileName: i, onSelect: () => {
92
+ return /* @__PURE__ */ l(A, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ l(je, { fileName: i, onSelect: () => {
93
93
  if (s)
94
94
  window.open(r, "_blank", "noopener,noreferrer");
95
95
  else if (c) {
96
- const a = r.replace(/^#?\$PROJECT\//i, ""), f = new CustomEvent("ui:open-project-file", {
96
+ const a = r.replace(/^#?\$PROJECT\//i, ""), m = new CustomEvent("ui:open-project-file", {
97
97
  detail: a
98
98
  });
99
- window.dispatchEvent(f);
99
+ window.dispatchEvent(m);
100
100
  } else
101
101
  window.location.assign(r);
102
102
  } }) });
103
103
  }
104
104
  };
105
105
  function Ke(n, e) {
106
- return new se(n, e);
106
+ return new ie(n, e);
107
107
  }
108
- function Yt(n) {
109
- return n instanceof se;
108
+ function Xt(n) {
109
+ return n instanceof ie;
110
110
  }
111
- const Te = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Qt = {
112
- dependencies: [se],
111
+ const Ee = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Yt = {
112
+ dependencies: [ie],
113
113
  export: (n) => {
114
- if (Yt(n)) {
114
+ if (Xt(n)) {
115
115
  const e = n.__href, t = n.__label ?? e;
116
116
  return t ? `{{link('${t}')}}` : `{{link('${e}')}}`;
117
117
  }
118
118
  return null;
119
119
  },
120
- regExp: Te,
121
- importRegExp: Te,
120
+ regExp: Ee,
121
+ importRegExp: Ee,
122
122
  replace: (n, e) => {
123
123
  const t = e[2], o = /^(https?:\/\/|\/)/i.test(t) ? t : `#${t}`, i = t;
124
124
  n.replace(Ke(o, i));
125
125
  },
126
126
  type: "text-match"
127
- }, Ee = {
127
+ }, ge = {
128
128
  code: "rich-text__code",
129
129
  codeHighlight: {
130
130
  atrule: "rich-text__tokenAttr",
@@ -198,33 +198,31 @@ const Te = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Qt = {
198
198
  row: "rich-text__row",
199
199
  content: "rich-text__content"
200
200
  }
201
- }, Zt = globalThis;
202
- Zt.Prism ??= jt;
203
- const Y = "calc(var(--chakra-font-sizes-sm) * var(--rich-text-font-scale))", en = (n) => n == null ? "-" : typeof n == "string" ? n.length ? n : "-" : typeof n == "number" || typeof n == "boolean" ? String(n).toUpperCase() : n instanceof Date ? n.toISOString() : JSON.stringify(n), po = (n) => {
204
- const e = C(8), {
201
+ }, X = "calc(var(--chakra-font-sizes-sm) * var(--rich-text-font-scale))", Qt = (n) => n == null ? "-" : typeof n == "string" ? n.length ? n : "-" : typeof n == "number" || typeof n == "boolean" ? String(n).toUpperCase() : n instanceof Date ? n.toISOString() : JSON.stringify(n), Yr = (n) => {
202
+ const e = N(8), {
205
203
  defaultCode: t,
206
204
  isEditable: r,
207
205
  showLineNumbers: o,
208
206
  disableScroll: i
209
- } = n, s = t === void 0 ? "" : t, c = r === void 0 ? !1 : r, a = o === void 0 ? !1 : o, f = i === void 0 ? !1 : i;
207
+ } = n, s = t === void 0 ? "" : t, c = r === void 0 ? !1 : r, a = o === void 0 ? !1 : o, m = i === void 0 ? !1 : i;
210
208
  if (c) {
211
209
  let d;
212
- return e[0] !== s ? (d = /* @__PURE__ */ l(bt, { defaultValue: s, fontFamily: "mono", fontSize: Y, resize: "vertical", minHeight: "100%" }), e[0] = s, e[1] = d) : d = e[1], d;
210
+ return e[0] !== s ? (d = /* @__PURE__ */ l(ft, { defaultValue: s, fontFamily: "mono", fontSize: X, resize: "vertical", minHeight: "100%" }), e[0] = s, e[1] = d) : d = e[1], d;
213
211
  }
214
212
  let u;
215
- if (e[2] !== s || e[3] !== f || e[4] !== a) {
213
+ if (e[2] !== s || e[3] !== m || e[4] !== a) {
216
214
  const d = a ? s.split(`
217
215
  `) : [s];
218
- u = /* @__PURE__ */ l(A, { as: "pre", margin: 0, padding: "sm", fontFamily: "mono", fontSize: Y, lineHeight: "1.5", background: "bg.code", borderRadius: "md", width: "100%", overflowY: f ? "hidden" : void 0, children: a ? /* @__PURE__ */ l(A, { as: "code", display: "grid", gridTemplateColumns: "auto 1fr", columnGap: "sm", children: d.map(nn) }) : /* @__PURE__ */ l(A, { as: "code", children: s }) }), e[2] = s, e[3] = f, e[4] = a, e[5] = u;
216
+ u = /* @__PURE__ */ l(A, { as: "pre", margin: 0, padding: "sm", fontFamily: "mono", fontSize: X, lineHeight: "1.5", background: "bg.code", borderRadius: "md", width: "100%", overflowY: m ? "hidden" : void 0, children: a ? /* @__PURE__ */ l(A, { as: "code", display: "grid", gridTemplateColumns: "auto 1fr", columnGap: "sm", children: d.map(en) }) : /* @__PURE__ */ l(A, { as: "code", children: s }) }), e[2] = s, e[3] = m, e[4] = a, e[5] = u;
219
217
  } else
220
218
  u = e[5];
221
219
  const h = u;
222
- if (f)
220
+ if (m)
223
221
  return h;
224
- let m;
225
- return e[6] !== h ? (m = /* @__PURE__ */ l(ie, { width: "100%", background: "bg.code", borderRadius: "md", showHorizontalScrollbar: !0, children: h }), e[6] = h, e[7] = m) : m = e[7], m;
226
- }, tn = (n) => {
227
- const e = C(26), {
222
+ let f;
223
+ return e[6] !== h ? (f = /* @__PURE__ */ l(oe, { width: "100%", background: "bg.code", borderRadius: "md", showHorizontalScrollbar: !0, children: h }), e[6] = h, e[7] = f) : f = e[7], f;
224
+ }, Zt = (n) => {
225
+ const e = N(26), {
228
226
  data: t,
229
227
  fullWidth: r,
230
228
  noBorder: o,
@@ -232,48 +230,48 @@ const Y = "calc(var(--chakra-font-sizes-sm) * var(--rich-text-font-scale))", en
232
230
  } = n, s = r === void 0 ? !1 : r, c = o === void 0 ? !1 : o;
233
231
  let a;
234
232
  e[0] !== i ? (a = i === void 0 ? [] : i, e[0] = i, e[1] = a) : a = e[1];
235
- const f = a;
233
+ const m = a;
236
234
  if (!t.length) {
237
- const T = c ? "0" : "1px";
235
+ const y = c ? "0" : "1px";
236
+ let C;
237
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ l(P, { textStyle: "label/S/regular", fontSize: X, color: "fg.muted", children: "No data" }), e[2] = C) : C = e[2];
238
238
  let S;
239
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ l(D, { textStyle: "label/S/regular", fontSize: Y, color: "fg.muted", children: "No data" }), e[2] = S) : S = e[2];
240
- let R;
241
- return e[3] !== T ? (R = /* @__PURE__ */ l(A, { padding: "sm", borderWidth: T, borderColor: "border.muted", children: S }), e[3] = T, e[4] = R) : R = e[4], R;
239
+ return e[3] !== y ? (S = /* @__PURE__ */ l(A, { padding: "sm", borderWidth: y, borderColor: "border.subtle", children: C }), e[3] = y, e[4] = S) : S = e[4], S;
242
240
  }
243
241
  let u;
244
- e[5] !== f ? (u = new Set(f), e[5] = f, e[6] = u) : u = e[6];
242
+ e[5] !== m ? (u = new Set(m), e[5] = m, e[6] = u) : u = e[6];
245
243
  const h = u;
246
- let m;
247
- e[7] !== t[0] ? (m = Object.keys(t[0] ?? {}), e[7] = t[0], e[8] = m) : m = e[8];
244
+ let f;
245
+ e[7] !== t[0] ? (f = Object.keys(t[0] ?? {}), e[7] = t[0], e[8] = f) : f = e[8];
248
246
  let d;
249
- e[9] !== h || e[10] !== m ? (d = m.filter((T) => !h.has(T)), e[9] = h, e[10] = m, e[11] = d) : d = e[11];
250
- const p = d, _ = s ? "100%" : "fit-content", x = c ? "0" : "1px";
247
+ e[9] !== h || e[10] !== f ? (d = f.filter((y) => !h.has(y)), e[9] = h, e[10] = f, e[11] = d) : d = e[11];
248
+ const p = d, _ = s ? "100%" : "fit-content", b = c ? "0" : "1px";
251
249
  let g;
252
- e[12] !== p ? (g = /* @__PURE__ */ l(W.Header, { children: /* @__PURE__ */ l(W.Row, { background: "bg.muted", children: p.map(rn) }) }), e[12] = p, e[13] = g) : g = e[13];
253
- let N;
250
+ e[12] !== p ? (g = /* @__PURE__ */ l(W.Header, { children: /* @__PURE__ */ l(W.Row, { background: "bg.muted", children: p.map(tn) }) }), e[12] = p, e[13] = g) : g = e[13];
251
+ let T;
254
252
  if (e[14] !== p || e[15] !== t) {
255
- let T;
256
- e[17] !== p ? (T = (S, R) => /* @__PURE__ */ l(W.Row, { children: p.map((E) => /* @__PURE__ */ l(W.Cell, { paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ l(D, { textStyle: "paragraph/S/regular", fontSize: Y, children: en(S[E]) }) }, `${R}-${E}`)) }, `${R}-${p.join("-")}`), e[17] = p, e[18] = T) : T = e[18], N = t.map(T), e[14] = p, e[15] = t, e[16] = N;
253
+ let y;
254
+ e[17] !== p ? (y = (C, S) => /* @__PURE__ */ l(W.Row, { children: p.map((x) => /* @__PURE__ */ l(W.Cell, { paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ l(P, { textStyle: "paragraph/S/regular", fontSize: X, children: Qt(C[x]) }) }, `${S}-${x}`)) }, `${S}-${p.join("-")}`), e[17] = p, e[18] = y) : y = e[18], T = t.map(y), e[14] = p, e[15] = t, e[16] = T;
257
255
  } else
258
- N = e[16];
259
- let b;
260
- e[19] !== N ? (b = /* @__PURE__ */ l(W.Body, { children: N }), e[19] = N, e[20] = b) : b = e[20];
261
- let y;
262
- return e[21] !== b || e[22] !== _ || e[23] !== x || e[24] !== g ? (y = /* @__PURE__ */ l(ie, { maxWidth: "100%", showHorizontalScrollbar: !0, showVerticalScrollbar: !1, children: /* @__PURE__ */ H(W.Root, { size: "sm", width: _, borderWidth: x, borderColor: "border.muted", children: [
256
+ T = e[16];
257
+ let E;
258
+ e[19] !== T ? (E = /* @__PURE__ */ l(W.Body, { children: T }), e[19] = T, e[20] = E) : E = e[20];
259
+ let k;
260
+ return e[21] !== E || e[22] !== _ || e[23] !== b || e[24] !== g ? (k = /* @__PURE__ */ l(oe, { maxWidth: "100%", showHorizontalScrollbar: !0, showVerticalScrollbar: !1, children: /* @__PURE__ */ F(W.Root, { size: "sm", width: _, borderWidth: b, borderColor: "border.subtle", children: [
263
261
  g,
264
- b
265
- ] }) }), e[21] = b, e[22] = _, e[23] = x, e[24] = g, e[25] = y) : y = e[25], y;
262
+ E
263
+ ] }) }), e[21] = E, e[22] = _, e[23] = b, e[24] = g, e[25] = k) : k = e[25], k;
266
264
  };
267
- function nn(n, e) {
268
- return /* @__PURE__ */ H(A, { as: "span", display: "contents", children: [
269
- /* @__PURE__ */ l(D, { as: "span", color: "fg.muted", textAlign: "right", fontSize: "inherit", children: e + 1 }),
270
- /* @__PURE__ */ l(D, { as: "span", fontSize: "inherit", children: n.length ? n : " " })
265
+ function en(n, e) {
266
+ return /* @__PURE__ */ F(A, { as: "span", display: "contents", children: [
267
+ /* @__PURE__ */ l(P, { as: "span", color: "fg.muted", textAlign: "right", fontSize: "inherit", children: e + 1 }),
268
+ /* @__PURE__ */ l(P, { as: "span", fontSize: "inherit", children: n.length ? n : " " })
271
269
  ] }, `${e}-${n}`);
272
270
  }
273
- function rn(n) {
274
- return /* @__PURE__ */ l(W.ColumnHeader, { textTransform: "none", paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ l(D, { textStyle: "label/S/medium", fontSize: Y, children: n }) }, n);
271
+ function tn(n) {
272
+ return /* @__PURE__ */ l(W.ColumnHeader, { textTransform: "none", paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ l(P, { textStyle: "label/S/medium", fontSize: X, children: n }) }, n);
275
273
  }
276
- class z extends Z {
274
+ class z extends Q {
277
275
  __data;
278
276
  static getType() {
279
277
  return "data_table";
@@ -294,7 +292,7 @@ class z extends Z {
294
292
  return !1;
295
293
  }
296
294
  decorate() {
297
- return /* @__PURE__ */ l(tn, { fullWidth: !0, isReadOnly: !0, data: this.__data });
295
+ return /* @__PURE__ */ l(Zt, { fullWidth: !0, isReadOnly: !0, data: this.__data });
298
296
  }
299
297
  exportJSON() {
300
298
  return {
@@ -313,34 +311,34 @@ class z extends Z {
313
311
  `);
314
312
  }
315
313
  }
316
- function Re(n) {
314
+ function ye(n) {
317
315
  return new z(n);
318
316
  }
319
- function Ne(n) {
317
+ function Se(n) {
320
318
  return n instanceof z;
321
319
  }
322
- const on = yt.lazy(() => import("./EquationComponent-DeDYHvqY.js"));
323
- function ye(n) {
320
+ const nn = kt.lazy(() => import("./EquationComponent-DeDYHvqY.js"));
321
+ function Te(n) {
324
322
  let e = n.getAttribute("data-lexical-equation");
325
323
  const t = n.getAttribute("data-lexical-inline") === "true";
326
324
  return e = atob(e || ""), e ? {
327
- node: le(e, t)
325
+ node: se(e, t)
328
326
  } : null;
329
327
  }
330
- class q extends Z {
328
+ class H extends Q {
331
329
  __equation;
332
330
  __inline;
333
331
  static getType() {
334
332
  return "equation";
335
333
  }
336
334
  static clone(e) {
337
- return new q(e.__equation, e.__inline, e.__key);
335
+ return new H(e.__equation, e.__inline, e.__key);
338
336
  }
339
337
  constructor(e, t, r) {
340
338
  super(r), this.__equation = e, this.__inline = t ?? !1;
341
339
  }
342
340
  static importJSON(e) {
343
- return le(e.equation, e.inline);
341
+ return se(e.equation, e.inline);
344
342
  }
345
343
  exportJSON() {
346
344
  return {
@@ -356,7 +354,7 @@ class q extends Z {
356
354
  }
357
355
  exportDOM() {
358
356
  const e = document.createElement(this.__inline ? "span" : "div"), t = btoa(this.__equation);
359
- return e.setAttribute("data-lexical-equation", t), e.setAttribute("data-lexical-inline", `${this.__inline}`), Gt.render(this.__equation, e, {
357
+ return e.setAttribute("data-lexical-equation", t), e.setAttribute("data-lexical-inline", `${this.__inline}`), Kt.render(this.__equation, e, {
360
358
  displayMode: !this.__inline,
361
359
  // true === block display //
362
360
  errorColor: "#cc0000",
@@ -371,11 +369,11 @@ class q extends Z {
371
369
  static importDOM() {
372
370
  return {
373
371
  div: (e) => e.hasAttribute("data-lexical-equation") ? {
374
- conversion: ye,
372
+ conversion: Te,
375
373
  priority: 2
376
374
  } : null,
377
375
  span: (e) => e.hasAttribute("data-lexical-equation") ? {
378
- conversion: ye,
376
+ conversion: Te,
379
377
  priority: 1
380
378
  } : null
381
379
  };
@@ -397,43 +395,43 @@ class q extends Z {
397
395
  return this.__inline;
398
396
  }
399
397
  decorate() {
400
- return /* @__PURE__ */ l(Ae, { fallback: null, children: /* @__PURE__ */ l(on, { equation: this.__equation, inline: this.__inline }) });
398
+ return /* @__PURE__ */ l(Pe, { fallback: null, children: /* @__PURE__ */ l(nn, { equation: this.__equation, inline: this.__inline }) });
401
399
  }
402
400
  }
403
- function le(n = "", e = !1) {
404
- const t = new q(n, e);
405
- return ut(t);
401
+ function se(n = "", e = !1) {
402
+ const t = new H(n, e);
403
+ return _t(t);
406
404
  }
407
405
  function Ge(n) {
408
- return n instanceof q;
406
+ return n instanceof H;
409
407
  }
410
- const sn = {
411
- dependencies: [q],
408
+ const rn = {
409
+ dependencies: [H],
412
410
  export: (n) => Ge(n) && n.isInline() ? `\\( ${n.getEquation().trim()} \\)` : null,
413
411
  importRegExp: /\\\((.*?)\\\)/,
414
412
  regExp: /\\\((.*?)\\\)/,
415
413
  replace: (n, e) => {
416
- const t = le(e[1].trim(), !0);
414
+ const t = se(e[1].trim(), !0);
417
415
  n.replace(t);
418
416
  },
419
417
  type: "text-match"
420
- }, ln = {
421
- dependencies: [q],
418
+ }, on = {
419
+ dependencies: [H],
422
420
  regExpStart: /\\\[/,
423
421
  regExpEnd: /\\]/,
424
422
  export: (n) => Ge(n) && !n.isInline() ? `\\[ ${n.getEquation().trim()} \\]` : null,
425
- replace: (n, e, t, r, o) => o ? (n.append(le(o.join(" "), !1)), !0) : !1,
423
+ replace: (n, e, t, r, o) => o ? (n.append(se(o.join(" "), !1)), !0) : !1,
426
424
  type: "multiline-element"
427
425
  };
428
- function cn() {
426
+ function sn() {
429
427
  return null;
430
428
  }
431
- class K extends $e {
429
+ class U extends ve {
432
430
  static getType() {
433
431
  return "hr";
434
432
  }
435
433
  static clone(e) {
436
- return new K(e?.__key);
434
+ return new U(e?.__key);
437
435
  }
438
436
  static importJSON(e) {
439
437
  return Ve();
@@ -455,13 +453,13 @@ class K extends $e {
455
453
  }
456
454
  }
457
455
  function Ve() {
458
- return new K();
456
+ return new U();
459
457
  }
460
- function an(n) {
461
- return n instanceof K;
458
+ function ln(n) {
459
+ return n instanceof U;
462
460
  }
463
- const dn = St(() => import("./MermaidComponent-DBJsTOmj.js"));
464
- class J extends Z {
461
+ const cn = Ct(() => import("./MermaidComponent-BCMQqPqu.js"));
462
+ class J extends Q {
465
463
  __code;
466
464
  static getType() {
467
465
  return "mermaid";
@@ -501,25 +499,25 @@ ${this.__code}
501
499
  t.__code = e;
502
500
  }
503
501
  decorate() {
504
- return /* @__PURE__ */ l(Ae, { fallback: null, children: /* @__PURE__ */ l(dn, { code: this.__code, nodeKey: this.__key }) });
502
+ return /* @__PURE__ */ l(Pe, { fallback: null, children: /* @__PURE__ */ l(cn, { code: this.__code, nodeKey: this.__key }) });
505
503
  }
506
504
  }
507
- function ho(n) {
505
+ function Qr(n) {
508
506
  return n instanceof J;
509
507
  }
510
- const un = {
511
- dependencies: [K],
512
- export: (n) => an(n) ? "***" : null,
508
+ const an = {
509
+ dependencies: [U],
510
+ export: (n) => ln(n) ? "***" : null,
513
511
  regExp: /^(---|\*\*\*|___)\s?$/,
514
512
  replace: (n) => {
515
513
  const e = Ve();
516
514
  n.replace(e);
517
515
  },
518
516
  type: "element"
519
- }, mn = {
517
+ }, dn = {
520
518
  dependencies: [],
521
519
  export: (n, e) => {
522
- if (Ne(n)) {
520
+ if (Se(n)) {
523
521
  const t = n.getData();
524
522
  if (!t.length) return "";
525
523
  const r = Object.keys(t[0]), o = r.join(" | "), i = r.map(() => "---").join(" | "), s = t.map((c) => r.map((a) => String(c[a] || "")).join(" | "));
@@ -536,28 +534,28 @@ const un = {
536
534
  return;
537
535
  }
538
536
  const s = t[0].split("|").slice(1, -1).map((c) => c.trim());
539
- if (o?.getType() === "data_table" && Ne(o)) {
540
- const c = o.getData(), a = {}, f = c.length === 1 && Object.values(c[0]).every((d) => d === ""), u = c.length > 0 ? Object.keys(c[0]) : s.map((d, p) => `col_${p}`);
537
+ if (o?.getType() === "data_table" && Se(o)) {
538
+ const c = o.getData(), a = {}, m = c.length === 1 && Object.values(c[0]).every((d) => d === ""), u = c.length > 0 ? Object.keys(c[0]) : s.map((d, p) => `col_${p}`);
541
539
  s.forEach((d, p) => {
542
540
  const _ = u[p] || `col_${p}`;
543
541
  a[_] = d;
544
542
  });
545
- const h = f ? [a] : [...c, a], m = Re(h);
546
- o.replace(m), n.remove();
543
+ const h = m ? [a] : [...c, a], f = ye(h);
544
+ o.replace(f), n.remove();
547
545
  } else {
548
546
  const c = {};
549
- s.forEach((f, u) => {
550
- c[f || `col_${u}`] = "";
547
+ s.forEach((m, u) => {
548
+ c[m || `col_${u}`] = "";
551
549
  });
552
- const a = Re([c]);
550
+ const a = ye([c]);
553
551
  n.replace(a);
554
552
  }
555
553
  },
556
554
  type: "element"
557
- }, fn = {
558
- dependencies: [re],
555
+ }, un = {
556
+ dependencies: [ne],
559
557
  export: (n, e) => {
560
- if (n instanceof re) {
558
+ if (n instanceof ne) {
561
559
  let t = n.getTextContent();
562
560
  if (n.hasFormat("bold"))
563
561
  t = `**${t}**`;
@@ -574,107 +572,106 @@ const un = {
574
572
  regExp: /<ins>(.*)<\/ins>/,
575
573
  importRegExp: /<ins>(.*)<\/ins>/,
576
574
  replace: (n, e) => {
577
- const t = X(e[1]);
575
+ const t = V(e[1]);
578
576
  t.toggleFormat("underline"), n.replace(t);
579
577
  },
580
578
  type: "text-match"
581
- }, pn = {
582
- dependencies: [re],
579
+ }, fn = {
580
+ dependencies: [ne],
583
581
  export: (n, e) => null,
584
582
  regExp: /<u>(.*)<\/u>/,
585
583
  importRegExp: /<u>(.*)<\/u>/,
586
584
  replace: (n, e) => {
587
- const t = X(e[1]);
585
+ const t = V(e[1]);
588
586
  t.toggleFormat("underline"), n.replace(t);
589
587
  },
590
588
  type: "text-match"
591
- }, Se = /https?:\/\/[^\s<>"']*[^\s<>"'.,:;"')\]}]/, V = (n) => n.replace(/\\([*_`~\\])/g, "$1"), hn = (n) => n.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), _n = (n) => n?.replace(/\\(["\\])/g, "$1"), Xe = (n, e, t) => {
589
+ }, ke = /https?:\/\/[^\s<>"']*[^\s<>"'.,:;"')\]}]/, G = (n) => n.replace(/\\([*_`~\\])/g, "$1"), mn = (n) => n.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), pn = (n) => n?.replace(/\\(["\\])/g, "$1"), Xe = (n, e, t) => {
592
590
  if (n !== e)
593
591
  return t;
594
592
  const r = e.replace(/([*_`~\\])/g, "\\$1");
595
593
  return t.replace(r, e);
596
- }, gn = {
597
- dependencies: [he],
594
+ }, hn = {
595
+ dependencies: [pe],
598
596
  export: (n, e) => {
599
- if (!Mt(n) || He(n))
597
+ if (!Mt(n) || Fe(n))
600
598
  return null;
601
- const t = n.getTitle(), r = V(n.getURL()), o = Xe(n.getTextContent(), r, e(n));
602
- return t != null ? `[${o}](${r} "${hn(t)}")` : `[${o}](${r})`;
599
+ const t = n.getTitle(), r = G(n.getURL()), o = Xe(n.getTextContent(), r, e(n));
600
+ return t != null ? `[${o}](${r} "${mn(t)}")` : `[${o}](${r})`;
603
601
  },
604
602
  importRegExp: /(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,
605
603
  regExp: /(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,
606
604
  replace: (n, e) => {
607
- const [, t, r, o] = e, i = V(r), s = wt(i, {
608
- title: _n(o)
605
+ const [, t, r, o] = e, i = G(r), s = Lt(i, {
606
+ title: pn(o)
609
607
  }), c = t.split("[").length - 1, a = t.split("]").length - 1;
610
- let f = t, u = "";
608
+ let m = t, u = "";
611
609
  if (c < a)
612
610
  return;
613
611
  if (c > a) {
614
612
  const d = t.split("[");
615
- u = `[${d[0]}`, f = d.slice(1).join("[");
613
+ u = `[${d[0]}`, m = d.slice(1).join("[");
616
614
  }
617
- const h = V(f), m = X(h === i ? i : h);
618
- return m.setFormat(n.getFormat()), s.append(m), n.replace(s), u && s.insertBefore(X(u)), m;
615
+ const h = G(m), f = V(h === i ? i : h);
616
+ return f.setFormat(n.getFormat()), s.append(f), n.replace(s), u && s.insertBefore(V(u)), f;
619
617
  },
620
618
  trigger: ")",
621
619
  type: "text-match"
622
- }, En = {
623
- dependencies: [_e],
620
+ }, _n = {
621
+ dependencies: [he],
624
622
  export: (n, e) => {
625
- if (!He(n))
623
+ if (!Fe(n))
626
624
  return null;
627
- const t = V(n.getURL());
625
+ const t = G(n.getURL());
628
626
  return Xe(n.getTextContent(), t, e(n));
629
627
  },
630
- regExp: Se,
631
- importRegExp: Se,
628
+ regExp: ke,
629
+ importRegExp: ke,
632
630
  replace: (n, e) => {
633
- const t = V(e[0]), r = vt(t), o = X(t);
631
+ const t = G(e[0]), r = At(t), o = V(t);
634
632
  o.setFormat(n.getFormat()), r.append(o), n.replace(r);
635
633
  },
636
634
  type: "text-match"
637
- }, xn = [mn, un, fn, pn, gn, En], _o = [We, he, _e, z, ze, Be, Ue, ge, Je, J, q, K, se], Ye = [At, ...Dt.filter((n) => n !== Ft), ...xn, sn, ln], go = [...Ye, Qt], Eo = Ee;
638
- function bn(n) {
635
+ }, gn = [dn, an, un, fn, hn, _n], Zr = [We, pe, he, z, ze, Be, qe, _e, Je, J, H, U, ie], Ye = [Pt, ...Dt.filter((n) => n !== Ft), ...gn, rn, on], eo = [...Ye, Yt], to = ge;
636
+ function xn(n) {
639
637
  return n.trim().toLowerCase() === "mermaid";
640
638
  }
641
- function Tn(n) {
639
+ function bn(n) {
642
640
  const e = n.getLanguage() ?? "plaintext";
643
- return bn(e) ? (n.replace(new J(n.getTextContent())), !0) : !1;
641
+ return xn(e) ? (n.replace(new J(n.getTextContent())), !0) : !1;
644
642
  }
645
- function Rn() {
646
- const n = C(3), [e] = F();
643
+ function En() {
644
+ const n = N(3), [e] = D();
647
645
  let t, r;
648
646
  return n[0] !== e ? (t = () => {
649
- e.update(Nn);
647
+ e.update(yn);
650
648
  }, r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), B(t, r), null;
651
649
  }
652
- function Nn() {
653
- const n = mt(ge);
650
+ function yn() {
651
+ const n = gt(_e);
654
652
  for (const e of n)
655
- Tn(e);
653
+ bn(e);
656
654
  }
657
- function yn() {
658
- const n = C(3), [e] = F();
655
+ function Sn() {
656
+ const n = N(3), [e] = D();
659
657
  let t, r;
660
- return n[0] !== e ? (t = () => Kt(e), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), B(t, r), null;
658
+ return n[0] !== e ? (t = () => Ut(e), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), B(t, r), null;
661
659
  }
662
- const xo = k("TOGGLE_LINK_EDIT_MODE_COMMAND");
663
660
  function Qe(n) {
664
- const e = C(4), {
661
+ const e = N(4), {
665
662
  isEditable: t
666
- } = n, [r] = F();
663
+ } = n, [r] = D();
667
664
  let o, i;
668
665
  return e[0] !== r || e[1] !== t ? (o = () => {
669
666
  r.setEditable(t);
670
667
  }, i = [t, r], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), B(o, i), null;
671
668
  }
672
669
  function Ze() {
673
- const n = C(2), [e] = F();
670
+ const n = N(2), [e] = D();
674
671
  let t;
675
- return n[0] !== e ? (t = /* @__PURE__ */ l(A, { fontSize: "xs", color: "fg.muted", padding: "4", children: /* @__PURE__ */ l(Vt, { treeTypeButtonClassName: "debug-treetype-button", timeTravelButtonClassName: "debug-timetravel-button", timeTravelPanelButtonClassName: "debug-timetravel-button", timeTravelPanelClassName: "debug-timetravel-panel", timeTravelPanelSliderClassName: "debug-timetravel-slider", viewClassName: "tree-view-output", editor: e }) }), n[0] = e, n[1] = t) : t = n[1], t;
672
+ return n[0] !== e ? (t = /* @__PURE__ */ l(A, { fontSize: "xs", color: "fg.muted", padding: "4", children: /* @__PURE__ */ l(Gt, { treeTypeButtonClassName: "debug-treetype-button", timeTravelButtonClassName: "debug-timetravel-button", timeTravelPanelButtonClassName: "debug-timetravel-button", timeTravelPanelClassName: "debug-timetravel-panel", timeTravelPanelSliderClassName: "debug-timetravel-slider", viewClassName: "tree-view-output", editor: e }) }), n[0] = e, n[1] = t) : t = n[1], t;
676
673
  }
677
- const Sn = /^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/, Cn = /^```/, kn = /^([ \t]*)((?:[-*+])|(?:\d+\.))\s+/, In = /^([ \t]+)/;
674
+ const Tn = /^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/, kn = /^```/, Cn = /^([ \t]*)((?:[-*+])|(?:\d+\.))\s+/, Nn = /^([ \t]+)/;
678
675
  function et(n) {
679
676
  let e = 0;
680
677
  for (const t of n)
@@ -684,38 +681,38 @@ function et(n) {
684
681
  function $n(n, e) {
685
682
  return [...n].reverse().find((t) => t.sourceIndentWidth < e);
686
683
  }
687
- function ue(n, e, t) {
684
+ function de(n, e, t) {
688
685
  return e === t && !n.includes(" ") ? n : " ".repeat(e);
689
686
  }
690
- function On(n, e) {
691
- const t = n.match(In);
687
+ function Rn(n, e) {
688
+ const t = n.match(Nn);
692
689
  if (!t)
693
690
  return n.trim() !== "" && (e.length = 0), n;
694
691
  const r = et(t[1]), o = $n(e, r);
695
692
  if (!o) return n;
696
- const i = r + (o.normalizedIndentWidth - o.sourceIndentWidth), s = ue(t[1], i, r);
693
+ const i = r + (o.normalizedIndentWidth - o.sourceIndentWidth), s = de(t[1], i, r);
697
694
  return s === t[1] ? n : `${s}${n.slice(t[1].length)}`;
698
695
  }
699
- function Ln(n, e, t) {
696
+ function In(n, e, t) {
700
697
  const r = et(e[1]);
701
698
  for (; t.length && t.at(-1).sourceIndentWidth > r; )
702
699
  t.pop();
703
700
  const o = t.at(-1);
704
701
  if (o?.sourceIndentWidth === r)
705
- return `${ue(e[1], o.normalizedIndentWidth, r)}${n.slice(e[1].length)}`;
702
+ return `${de(e[1], o.normalizedIndentWidth, r)}${n.slice(e[1].length)}`;
706
703
  const i = t.at(-1), s = r - (i?.sourceIndentWidth ?? 0);
707
704
  let c = r;
708
705
  return i && s === 2 && !e[1].includes(" ") && (c = i.normalizedIndentWidth + 4), t.push({
709
706
  normalizedIndentWidth: c,
710
707
  sourceIndentWidth: r
711
- }), `${ue(e[1], c, r)}${n.slice(e[1].length)}`;
708
+ }), `${de(e[1], c, r)}${n.slice(e[1].length)}`;
712
709
  }
713
- function Pn(n, e) {
714
- if (Cn.test(n.trimStart()))
710
+ function wn(n, e) {
711
+ if (kn.test(n.trimStart()))
715
712
  return e.isInCodeFence = !e.isInCodeFence, n;
716
713
  if (e.isInCodeFence) return n;
717
- const t = n.match(kn);
718
- return t ? Ln(n, t, e.activeListIndents) : On(n, e.activeListIndents);
714
+ const t = n.match(Cn);
715
+ return t ? In(n, t, e.activeListIndents) : Rn(n, e.activeListIndents);
719
716
  }
720
717
  function tt(n) {
721
718
  const e = n.split(`
@@ -723,11 +720,11 @@ function tt(n) {
723
720
  isInCodeFence: !1,
724
721
  activeListIndents: []
725
722
  };
726
- return e.map((r) => Pn(r, t)).join(`
723
+ return e.map((r) => wn(r, t)).join(`
727
724
  `);
728
725
  }
729
- function wn(n) {
730
- const e = n.match(Sn);
726
+ function On(n) {
727
+ const e = n.match(Tn);
731
728
  return e ? {
732
729
  frontmatter: e[0],
733
730
  body: n.slice(e[0].length)
@@ -736,34 +733,19 @@ function wn(n) {
736
733
  body: n
737
734
  };
738
735
  }
739
- const Mn = "UPLOAD_FILE", vn = "OPEN_CONTEXT", An = "RUN_PROMPT", Dn = "UPDATE_FORMAT", Fn = "UPDATE_BEHAVIOR", Hn = "INSERT_PROMPT", Bn = "RENAME_PROMPT", Un = "DUPLICATE_PROMPT", qn = "DELETE_PROMPT", Wn = "DELETE_REFERENCES", zn = "RENAME_REFERENCES", Jn = "INSERT_REFERENCE", jn = "INSERT_BLOCK";
740
- k(Mn);
741
- k(vn);
742
- k(An);
743
- k(Dn);
744
- k(Fn);
745
- k(Hn);
746
- k(Bn);
747
- k(Un);
748
- k(qn);
749
- k(Wn);
750
- k(zn);
751
- const nt = k(Jn), Kn = k(jn), Gn = "INSERT_NEW_FILE_PLACEHOLDER", Vn = "INSERT_NEW_TEXT_PLACEHOLDER", Xn = "INSERT_PLACEHOLDER_REFERENCE";
752
- k(Gn);
753
- k(Vn);
754
- k(Xn);
755
- function Yn(n) {
756
- const e = oe();
736
+ const vn = "INSERT_REFERENCE", Ln = "INSERT_BLOCK", nt = Le(vn), Mn = Le(Ln);
737
+ function An(n) {
738
+ const e = re();
757
739
  return n.style !== null && e.setFormat(n.style.textAlign), {
758
740
  node: e
759
741
  };
760
742
  }
761
- class ee extends $e {
743
+ class Z extends ve {
762
744
  static getType() {
763
745
  return "comment";
764
746
  }
765
747
  static clone(e) {
766
- return new ee(e.__key);
748
+ return new Z(e.__key);
767
749
  }
768
750
  createDOM(e) {
769
751
  const t = document.createElement("blockquote");
@@ -775,7 +757,7 @@ class ee extends $e {
775
757
  static importDOM() {
776
758
  return {
777
759
  blockquote: () => ({
778
- conversion: Yn,
760
+ conversion: An,
779
761
  priority: 0
780
762
  })
781
763
  };
@@ -784,7 +766,7 @@ class ee extends $e {
784
766
  const {
785
767
  element: t
786
768
  } = super.exportDOM(e);
787
- if (t && ft(t)) {
769
+ if (t && xt(t)) {
788
770
  this.isEmpty() && t.append(document.createElement("br"));
789
771
  const r = this.getFormatType();
790
772
  t.style.textAlign = r;
@@ -796,7 +778,7 @@ class ee extends $e {
796
778
  };
797
779
  }
798
780
  static importJSON(e) {
799
- const t = oe();
781
+ const t = re();
800
782
  return t.setFormat(e.format), t.setIndent(e.indent), t.setDirection(e.direction), t;
801
783
  }
802
784
  exportJSON() {
@@ -810,71 +792,71 @@ class ee extends $e {
810
792
  }
811
793
  // mutation
812
794
  insertNewAfter(e, t) {
813
- const r = ae(), o = this.getDirection();
795
+ const r = ce(), o = this.getDirection();
814
796
  return r.setDirection(o), this.insertAfter(r, t), r;
815
797
  }
816
798
  collapseAtStart() {
817
- const e = ae();
799
+ const e = ce();
818
800
  return this.getChildren().forEach((r) => {
819
801
  e.append(r);
820
802
  }), this.replace(e), !0;
821
803
  }
822
804
  }
823
- function oe() {
824
- return new ee();
805
+ function re() {
806
+ return new Z();
825
807
  }
826
- const Qn = (n, e) => {
827
- const t = pt(), r = oe();
808
+ const Pn = (n, e) => {
809
+ const t = bt(), r = re();
828
810
  if (e) {
829
811
  e.getParent()?.replace(r, !0), e.remove(), r.selectEnd();
830
812
  return;
831
813
  }
832
- ht(t) && Ot(t, oe);
814
+ Et(t) && wt(t, re);
833
815
  };
834
- function Zn() {
835
- const n = C(3), [e] = F();
816
+ function Dn() {
817
+ const n = N(3), [e] = D();
836
818
  let t, r;
837
- return n[0] !== e ? (t = () => pe(e.registerCommand(Kn, er, Oe)), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), B(t, r), null;
819
+ return n[0] !== e ? (t = () => me(e.registerCommand(Mn, Fn, Me)), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), B(t, r), null;
838
820
  }
839
- function er(n) {
821
+ function Fn(n) {
840
822
  const {
841
823
  optionId: e,
842
824
  nodeToReplace: t
843
825
  } = n;
844
- return Qn(e, t), !1;
826
+ return Pn(e, t), !1;
845
827
  }
846
- const tr = () => {
847
- const n = C(3), [e] = F();
828
+ const Bn = () => {
829
+ const n = N(3), [e] = D();
848
830
  let t, r;
849
- n[0] !== e ? (t = () => pe(e.registerNodeTransform(ee, (o) => {
850
- const s = o.getChildren().filter(nr);
831
+ n[0] !== e ? (t = () => me(e.registerNodeTransform(Z, (o) => {
832
+ const s = o.getChildren().filter(qn);
851
833
  s.length > 0 && e.update(() => {
852
- s.forEach(rr);
834
+ s.forEach(Hn);
853
835
  });
854
836
  })), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), B(t, r);
855
837
  };
856
- function nr(n) {
838
+ function qn(n) {
857
839
  return n.getType() === "comment";
858
840
  }
859
- function rr(n) {
860
- n.replace(ae(), !0);
841
+ function Hn(n) {
842
+ n.replace(ce(), !0);
861
843
  }
862
- function or() {
863
- return tr(), Zn(), null;
844
+ function Wn() {
845
+ return Bn(), Dn(), null;
864
846
  }
865
- const ir = (n) => {
847
+ const zn = (n) => {
866
848
  let e = "";
867
849
  const t = n.getChildren(), r = t.length;
868
850
  for (let o = 0; o < r; o++) {
869
851
  const i = t[o];
870
- e += i.getTextContent(), _t(i) && o !== r - 1 && !i.isInline() && (e += `
852
+ e += i.getTextContent(), yt(i) && o !== r - 1 && !i.isInline() && (e += `
871
853
  `);
872
854
  }
873
855
  return e;
874
- }, sr = (n) => n.type !== "reference" ? null : `#${n.name ?? n.referenceId ?? ""}`, lr = (n) => n.type === "paragraph" && !!n.children?.length, rt = (n) => {
856
+ }, Jn = (n) => n.type !== "reference" ? null : `#${n.name ?? n.referenceId ?? ""}`, jn = (n) => n.type === "paragraph" && !!n.children?.length, rt = (n) => {
875
857
  if (n.type === "comment")
876
858
  return "";
877
- const e = sr(n);
859
+ const e = Jn(n);
878
860
  if (e !== null)
879
861
  return e;
880
862
  let t = typeof n.text == "string" ? n.text : "";
@@ -888,7 +870,7 @@ const ir = (n) => {
888
870
  `);
889
871
  continue;
890
872
  }
891
- t += rt(s), lr(s) && (t += `
873
+ t += rt(s), jn(s) && (t += `
892
874
  `);
893
875
  }
894
876
  return t;
@@ -899,7 +881,7 @@ const ir = (n) => {
899
881
  } catch {
900
882
  return "";
901
883
  }
902
- }, cr = {
884
+ }, Un = {
903
885
  root: {
904
886
  direction: "ltr",
905
887
  format: "",
@@ -917,7 +899,7 @@ const ir = (n) => {
917
899
  }]
918
900
  }
919
901
  };
920
- function ar(n = "") {
902
+ function Kn(n = "") {
921
903
  return n.trim() ? {
922
904
  root: {
923
905
  direction: "ltr",
@@ -943,40 +925,40 @@ function ar(n = "") {
943
925
  }] : []
944
926
  }))
945
927
  }
946
- } : JSON.parse(JSON.stringify(cr));
928
+ } : JSON.parse(JSON.stringify(Un));
947
929
  }
948
- function dr(n) {
949
- const e = C(4), {
930
+ function Gn(n) {
931
+ const e = N(4), {
950
932
  editorRef: t,
951
933
  previousTextRef: r
952
- } = n, [o] = F();
934
+ } = n, [o] = D();
953
935
  let i, s;
954
936
  return e[0] !== o || e[1] !== r ? (i = () => ({
955
937
  setEditorValue: (c) => {
956
- const a = o.parseEditorState(JSON.stringify(ar(c)));
938
+ const a = o.parseEditorState(JSON.stringify(Kn(c)));
957
939
  o.setEditorState(a), r.current = ot(c), o.focus(void 0, {
958
940
  defaultSelection: "rootEnd"
959
941
  });
960
942
  }
961
- }), s = [o, r], e[0] = o, e[1] = r, e[2] = i, e[3] = s) : (i = e[2], s = e[3]), Ct(t, i, s), null;
943
+ }), s = [o, r], e[0] = o, e[1] = r, e[2] = i, e[3] = s) : (i = e[2], s = e[3]), Nt(t, i, s), null;
962
944
  }
963
- const ur = (n) => n.key !== "Enter" ? !1 : !n.ctrlKey && !n.metaKey && !n.shiftKey && !n.altKey;
964
- function mr(n) {
965
- const e = C(4), {
945
+ const Vn = (n) => n.key !== "Enter" ? !1 : !n.ctrlKey && !n.metaKey && !n.shiftKey && !n.altKey;
946
+ function Xn(n) {
947
+ const e = N(4), {
966
948
  onSubmit: t
967
- } = n, [r] = F();
949
+ } = n, [r] = D();
968
950
  let o, i;
969
- return e[0] !== r || e[1] !== t ? (o = () => r.registerCommand(gt, (s) => ur(s) ? (s.preventDefault(), t?.(), !0) : !1, Et), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), B(o, i), null;
951
+ return e[0] !== r || e[1] !== t ? (o = () => r.registerCommand(St, (s) => Vn(s) ? (s.preventDefault(), t?.(), !0) : !1, Tt), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), B(o, i), null;
970
952
  }
971
- const Ce = ["table", "connector"], fr = (n) => n.sort((r, o) => Ce.indexOf(r.group) - Ce.indexOf(o.group)).map((r, o) => ({
953
+ const Ce = ["table", "connector"], Yn = (n) => n.sort((r, o) => Ce.indexOf(r.group) - Ce.indexOf(o.group)).map((r, o) => ({
972
954
  ...r,
973
955
  index: o
974
956
  })).reduce((r, o) => {
975
957
  const i = r[o.group] ?? [];
976
958
  return i.push(o), r[o.group] = i, r;
977
959
  }, {});
978
- function ke(n) {
979
- const e = C(22), {
960
+ function Ne(n) {
961
+ const e = N(22), {
980
962
  id: t,
981
963
  isSelected: r,
982
964
  onClick: o,
@@ -984,31 +966,31 @@ function ke(n) {
984
966
  setRefElement: s,
985
967
  secondaryLabel: c,
986
968
  primaryLabel: a,
987
- tabIndex: f
988
- } = n, u = f === void 0 ? -1 : f, h = r ? "bg.active" : "transparent", m = r ? "bg.active" : "bg.hover";
969
+ tabIndex: m
970
+ } = n, u = m === void 0 ? -1 : m, h = r ? "bg.active" : "transparent", f = r ? "bg.active" : "bg.hover";
989
971
  let d;
990
- e[0] !== m ? (d = {
991
- bg: m
992
- }, e[0] = m, e[1] = d) : d = e[1];
972
+ e[0] !== f ? (d = {
973
+ bg: f
974
+ }, e[0] = f, e[1] = d) : d = e[1];
993
975
  let p;
994
- e[2] !== a ? (p = /* @__PURE__ */ l(ne.Trigger, { children: /* @__PURE__ */ l(D, { mt: "1px", lineClamp: 1, textOverflow: "ellipsis", textStyle: "label/M/regular", children: a }) }), e[2] = a, e[3] = p) : p = e[3];
976
+ e[2] !== a ? (p = /* @__PURE__ */ l(te.Trigger, { children: /* @__PURE__ */ l(P, { mt: "1px", lineClamp: 1, textOverflow: "ellipsis", textStyle: "label/M/regular", children: a }) }), e[2] = a, e[3] = p) : p = e[3];
995
977
  let _;
996
- e[4] !== a ? (_ = /* @__PURE__ */ l(ne.Positioner, { children: /* @__PURE__ */ l(ne.Content, { children: a }) }), e[4] = a, e[5] = _) : _ = e[5];
997
- let x;
998
- e[6] !== p || e[7] !== _ ? (x = /* @__PURE__ */ H(ne.Root, { children: [
978
+ e[4] !== a ? (_ = /* @__PURE__ */ l(te.Positioner, { children: /* @__PURE__ */ l(te.Content, { children: a }) }), e[4] = a, e[5] = _) : _ = e[5];
979
+ let b;
980
+ e[6] !== p || e[7] !== _ ? (b = /* @__PURE__ */ F(te.Root, { children: [
999
981
  p,
1000
982
  _
1001
- ] }), e[6] = p, e[7] = _, e[8] = x) : x = e[8];
983
+ ] }), e[6] = p, e[7] = _, e[8] = b) : b = e[8];
1002
984
  let g;
1003
- e[9] !== c ? (g = c && /* @__PURE__ */ l(D, { lineClamp: 2, textOverflow: "ellipsis", textStyle: "label/S/regular", color: "fg.muted", children: c }), e[9] = c, e[10] = g) : g = e[10];
1004
- let N;
1005
- return e[11] !== t || e[12] !== r || e[13] !== o || e[14] !== i || e[15] !== s || e[16] !== h || e[17] !== d || e[18] !== x || e[19] !== g || e[20] !== u ? (N = /* @__PURE__ */ H(fe, { direction: "column", cursor: "pointer", gap: "2xs", padding: "2xs", paddingX: "sm", bg: h, _hover: d, tabIndex: u, ref: s, role: "option", "aria-selected": r, id: t, onMouseEnter: i, onClick: o, children: [
1006
- x,
985
+ e[9] !== c ? (g = c && /* @__PURE__ */ l(P, { lineClamp: 2, textOverflow: "ellipsis", textStyle: "label/S/regular", color: "fg.muted", children: c }), e[9] = c, e[10] = g) : g = e[10];
986
+ let T;
987
+ return e[11] !== t || e[12] !== r || e[13] !== o || e[14] !== i || e[15] !== s || e[16] !== h || e[17] !== d || e[18] !== b || e[19] !== g || e[20] !== u ? (T = /* @__PURE__ */ F(fe, { direction: "column", cursor: "pointer", gap: "2xs", padding: "2xs", paddingX: "sm", bg: h, _hover: d, tabIndex: u, ref: s, role: "option", "aria-selected": r, id: t, onMouseEnter: i, onClick: o, children: [
988
+ b,
1007
989
  g
1008
- ] }), e[11] = t, e[12] = r, e[13] = o, e[14] = i, e[15] = s, e[16] = h, e[17] = d, e[18] = x, e[19] = g, e[20] = u, e[21] = N) : N = e[21], N;
990
+ ] }), e[11] = t, e[12] = r, e[13] = o, e[14] = i, e[15] = s, e[16] = h, e[17] = d, e[18] = b, e[19] = g, e[20] = u, e[21] = T) : T = e[21], T;
1009
991
  }
1010
- const pr = (n) => {
1011
- const e = C(12), {
992
+ const Qn = (n) => {
993
+ const e = N(12), {
1012
994
  options: t,
1013
995
  selectedIndex: r,
1014
996
  onSelectItem: o,
@@ -1016,37 +998,37 @@ const pr = (n) => {
1016
998
  } = n, {
1017
999
  table: s,
1018
1000
  connector: c
1019
- } = fr(t), a = s === void 0 ? [] : s, f = c === void 0 ? [] : c, u = [...a, ...f].length;
1020
- let h, m;
1001
+ } = Yn(t), a = s === void 0 ? [] : s, m = c === void 0 ? [] : c, u = [...a, ...m].length;
1002
+ let h, f;
1021
1003
  e[0] !== r ? (h = () => {
1022
1004
  document.getElementById(`typeahead-item-${r}`)?.scrollIntoView({
1023
1005
  behavior: "instant",
1024
1006
  block: "nearest"
1025
1007
  });
1026
- }, m = [r], e[0] = r, e[1] = h, e[2] = m) : (h = e[1], m = e[2]), B(h, m);
1027
- const d = ie, p = "1000", _ = "absolute", x = "modal", g = "24rem", N = !1;
1028
- let b;
1029
- e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
1008
+ }, f = [r], e[0] = r, e[1] = h, e[2] = f) : (h = e[1], f = e[2]), B(h, f);
1009
+ const d = oe, p = "1000", _ = "absolute", b = "modal", g = "24rem", T = !1;
1010
+ let E;
1011
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = {
1030
1012
  base: "100vw",
1031
1013
  md: "264px"
1032
- }, e[3] = b) : b = e[3];
1033
- let y;
1034
- e[4] !== u ? (y = !u && /* @__PURE__ */ l(D, { children: "No results" }), e[4] = u, e[5] = y) : y = e[5];
1035
- const T = !!a.length && /* @__PURE__ */ H(be, { children: [
1036
- /* @__PURE__ */ l(D, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Tables" }),
1037
- /* @__PURE__ */ l(A, { children: a.map((E) => /* @__PURE__ */ l(ke, { id: `typeahead-item-${E.index}`, isSelected: r === E.index, onClick: () => o(E, E.index), onMouseEnter: () => i(E.index), primaryLabel: E.name, secondaryLabel: E.description, setRefElement: E.setRefElement, tabIndex: -1 }, E.id)) })
1038
- ] }), S = !!f.length && /* @__PURE__ */ H(be, { children: [
1039
- /* @__PURE__ */ l(D, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Data Sources" }),
1040
- /* @__PURE__ */ l(A, { children: f.map((E) => /* @__PURE__ */ l(ke, { id: `typeahead-item-${E.index}`, isSelected: r === E.index, onClick: () => o(E, E.index), onMouseEnter: () => i(E.index), primaryLabel: E.name, secondaryLabel: E.description, setRefElement: E.setRefElement, tabIndex: -1 }, E.id)) })
1014
+ }, e[3] = E) : E = e[3];
1015
+ let k;
1016
+ e[4] !== u ? (k = !u && /* @__PURE__ */ l(P, { children: "No results" }), e[4] = u, e[5] = k) : k = e[5];
1017
+ const y = !!a.length && /* @__PURE__ */ F(be, { children: [
1018
+ /* @__PURE__ */ l(P, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Tables" }),
1019
+ /* @__PURE__ */ l(A, { children: a.map((x) => /* @__PURE__ */ l(Ne, { id: `typeahead-item-${x.index}`, isSelected: r === x.index, onClick: () => o(x, x.index), onMouseEnter: () => i(x.index), primaryLabel: x.name, secondaryLabel: x.description, setRefElement: x.setRefElement, tabIndex: -1 }, x.id)) })
1020
+ ] }), C = !!m.length && /* @__PURE__ */ F(be, { children: [
1021
+ /* @__PURE__ */ l(P, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Data Sources" }),
1022
+ /* @__PURE__ */ l(A, { children: m.map((x) => /* @__PURE__ */ l(Ne, { id: `typeahead-item-${x.index}`, isSelected: r === x.index, onClick: () => o(x, x.index), onMouseEnter: () => i(x.index), primaryLabel: x.name, secondaryLabel: x.description, setRefElement: x.setRefElement, tabIndex: -1 }, x.id)) })
1041
1023
  ] });
1042
- let R;
1043
- return e[6] !== d || e[7] !== y || e[8] !== T || e[9] !== S || e[10] !== b ? (R = /* @__PURE__ */ H(d, { zIndex: p, position: _, layerStyle: x, maxHeight: g, showHorizontalScrollbar: N, minWidth: b, children: [
1024
+ let S;
1025
+ return e[6] !== d || e[7] !== k || e[8] !== y || e[9] !== C || e[10] !== E ? (S = /* @__PURE__ */ F(d, { zIndex: p, position: _, layerStyle: b, maxHeight: g, showHorizontalScrollbar: T, minWidth: E, children: [
1026
+ k,
1044
1027
  y,
1045
- T,
1046
- S
1047
- ] }), e[6] = d, e[7] = y, e[8] = T, e[9] = S, e[10] = b, e[11] = R) : R = e[11], R;
1048
- }, hr = (n, e) => n.filter((t) => t.name.replace(/ /g, "_").toLowerCase().includes(e.toLowerCase()));
1049
- function _r(n, e = []) {
1028
+ C
1029
+ ] }), e[6] = d, e[7] = k, e[8] = y, e[9] = C, e[10] = E, e[11] = S) : S = e[11], S;
1030
+ }, Zn = (n, e) => n.filter((t) => t.name.replace(/ /g, "_").toLowerCase().includes(e.toLowerCase()));
1031
+ function er(n, e = []) {
1050
1032
  const t = e.map((r, o) => ({
1051
1033
  id: r.resourceId,
1052
1034
  key: r.resourceId,
@@ -1057,12 +1039,12 @@ function _r(n, e = []) {
1057
1039
  setRefElement: () => {
1058
1040
  }
1059
1041
  }));
1060
- return n == null || n === "" ? t : hr(t, n);
1042
+ return n == null || n === "" ? t : Zn(t, n);
1061
1043
  }
1062
- const it = "\\.\\-<>_:", xe = ["#"].join(""), st = `[^${xe}${it}\\s]`, gr = `(?:[${it}]|)`, lt = 75, Er = new RegExp(`(^|\\s|\\()([${xe}]((?:${st}${gr}){0,${lt}}))$`), xr = new RegExp(`(^|\\s|\\()([${xe}]((?:${st}){0,${lt}}))$`);
1063
- function br(n, e) {
1064
- let t = Er.exec(n);
1065
- if (t === null && (t = xr.exec(n)), t !== null) {
1044
+ const it = "\\.\\-<>_:", xe = ["#"].join(""), st = `[^${xe}${it}\\s]`, tr = `(?:[${it}]|)`, lt = 75, nr = new RegExp(`(^|\\s|\\()([${xe}]((?:${st}${tr}){0,${lt}}))$`), rr = new RegExp(`(^|\\s|\\()([${xe}]((?:${st}){0,${lt}}))$`);
1045
+ function or(n, e) {
1046
+ let t = nr.exec(n);
1047
+ if (t === null && (t = rr.exec(n)), t !== null) {
1066
1048
  const r = t[1], o = t[3];
1067
1049
  if (o.length >= e)
1068
1050
  return {
@@ -1073,56 +1055,56 @@ function br(n, e) {
1073
1055
  }
1074
1056
  return null;
1075
1057
  }
1076
- const Tr = 20;
1077
- function Rr(n) {
1078
- const e = C(9), {
1058
+ const ir = 20;
1059
+ function sr(n) {
1060
+ const e = N(9), {
1079
1061
  items: t
1080
1062
  } = n;
1081
1063
  let r;
1082
1064
  e[0] !== t ? (r = t === void 0 ? [] : t, e[0] = t, e[1] = r) : r = e[1];
1083
- const o = r, [i, s] = kt(null), [c] = F(), a = _r(i, o);
1084
- let f;
1085
- e[2] !== c ? (f = (_, x, g) => {
1065
+ const o = r, [i, s] = $t(null), [c] = D(), a = er(i, o);
1066
+ let m;
1067
+ e[2] !== c ? (m = (_, b, g) => {
1086
1068
  c.update(() => {
1087
- x && (c.dispatchCommand(nt, {
1069
+ b && (c.dispatchCommand(nt, {
1088
1070
  resourceId: _.id,
1089
1071
  resourceType: _.group,
1090
1072
  name: _.name,
1091
- nodeToReplace: x
1073
+ nodeToReplace: b
1092
1074
  }), g());
1093
1075
  });
1094
- }, e[2] = c, e[3] = f) : f = e[3];
1095
- const u = f, h = yr;
1096
- let m;
1097
- e[4] !== a ? (m = a.slice(0, Tr), e[4] = a, e[5] = m) : m = e[5];
1098
- const d = m;
1076
+ }, e[2] = c, e[3] = m) : m = e[3];
1077
+ const u = m, h = cr;
1078
+ let f;
1079
+ e[4] !== a ? (f = a.slice(0, ir), e[4] = a, e[5] = f) : f = e[5];
1080
+ const d = f;
1099
1081
  let p;
1100
- return e[6] !== d || e[7] !== u ? (p = /* @__PURE__ */ l(Lt, { onQueryChange: s, onSelectOption: u, triggerFn: h, options: d, menuRenderFn: Nr }), e[6] = d, e[7] = u, e[8] = p) : p = e[8], p;
1082
+ return e[6] !== d || e[7] !== u ? (p = /* @__PURE__ */ l(Ot, { onQueryChange: s, onSelectOption: u, triggerFn: h, options: d, menuRenderFn: lr }), e[6] = d, e[7] = u, e[8] = p) : p = e[8], p;
1101
1083
  }
1102
- function Nr(n, e) {
1084
+ function lr(n, e) {
1103
1085
  const {
1104
1086
  options: t,
1105
1087
  selectedIndex: r,
1106
1088
  selectOptionAndCleanUp: o,
1107
1089
  setHighlightedIndex: i
1108
1090
  } = e;
1109
- return n.current ? Pt.createPortal(/* @__PURE__ */ l(pr, { options: t, selectedIndex: r, onSelectItem: (s, c) => {
1091
+ return n.current ? vt.createPortal(/* @__PURE__ */ l(Qn, { options: t, selectedIndex: r, onSelectItem: (s, c) => {
1110
1092
  i(c), o(s);
1111
1093
  }, onMouseEnterItem: (s) => {
1112
1094
  i(s);
1113
1095
  } }), n.current) : null;
1114
1096
  }
1115
- function yr(n) {
1116
- return br(n, 0);
1097
+ function cr(n) {
1098
+ return or(n, 0);
1117
1099
  }
1118
- class Q extends re {
1100
+ class Y extends ne {
1119
1101
  __referenceId;
1120
1102
  __name;
1121
1103
  static getType() {
1122
1104
  return "reference";
1123
1105
  }
1124
1106
  static clone(e) {
1125
- return new Q(e.__referenceId, e.__name, e.__key);
1107
+ return new Y(e.__referenceId, e.__name, e.__key);
1126
1108
  }
1127
1109
  constructor(e, t, r) {
1128
1110
  super(t, r), this.__referenceId = e, this.__name = t;
@@ -1155,13 +1137,13 @@ class Q extends re {
1155
1137
  static importDOM() {
1156
1138
  return {
1157
1139
  span: (e) => !e.hasAttribute("data-reference-id") || !e.hasAttribute("data-name") ? null : {
1158
- conversion: Sr,
1140
+ conversion: ar,
1159
1141
  priority: 1
1160
1142
  }
1161
1143
  };
1162
1144
  }
1163
1145
  static importJSON(e) {
1164
- return new Q(e.referenceId, e.name);
1146
+ return new Y(e.referenceId, e.name);
1165
1147
  }
1166
1148
  exportJSON() {
1167
1149
  return {
@@ -1175,127 +1157,127 @@ class Q extends re {
1175
1157
  return `#${this.__name}`;
1176
1158
  }
1177
1159
  }
1178
- function Sr(n) {
1160
+ function ar(n) {
1179
1161
  const e = n.getAttribute("data-reference-id"), t = n.getAttribute("data-name");
1180
1162
  return !e || !t ? null : {
1181
1163
  node: ct(e, t)
1182
1164
  };
1183
1165
  }
1184
1166
  function ct(n, e) {
1185
- return new Q(n, e);
1167
+ return new Y(n, e);
1186
1168
  }
1187
- const Cr = (n, e, t) => {
1169
+ const dr = (n, e, t) => {
1188
1170
  const r = ct(e, t);
1189
1171
  if (n) {
1190
1172
  n?.replace(r), n.remove(), r.selectEnd();
1191
1173
  return;
1192
1174
  }
1193
1175
  };
1194
- function kr(n) {
1195
- const e = C(4), {
1176
+ function ur(n) {
1177
+ const e = N(4), {
1196
1178
  onAddReference: t
1197
- } = n, [r] = F();
1179
+ } = n, [r] = D();
1198
1180
  let o, i;
1199
- return e[0] !== r || e[1] !== t ? (o = () => pe(r.registerCommand(nt, (s) => {
1181
+ return e[0] !== r || e[1] !== t ? (o = () => me(r.registerCommand(nt, (s) => {
1200
1182
  const {
1201
1183
  resourceId: c,
1202
1184
  resourceType: a,
1203
- name: f,
1185
+ name: m,
1204
1186
  nodeToReplace: u
1205
1187
  } = s;
1206
1188
  return r.update(() => {
1207
- Cr(u, c, f);
1189
+ dr(u, c, m);
1208
1190
  }), t?.(c, a), !0;
1209
- }, Oe)), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), B(o, i), null;
1191
+ }, Me)), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), B(o, i), null;
1210
1192
  }
1211
- const Ir = {
1212
- ...Ee,
1193
+ const fr = {
1194
+ ...ge,
1213
1195
  // Override paragraph class to remove margins specifically for prompt input
1214
1196
  paragraph: "rich-text__p rich-text__p--no-margin"
1215
- }, $r = [ee, Rt, Q], Or = (n, e) => {
1216
- const t = C(39), {
1197
+ }, mr = [Z, pt, Y], pr = (n, e) => {
1198
+ const t = N(39), {
1217
1199
  defaultState: r,
1218
1200
  debug: o,
1219
1201
  isEditable: i,
1220
1202
  placeholder: s
1221
1203
  } = n, c = o === void 0 ? !1 : o, a = i === void 0 ? !0 : i, {
1222
- onChange: f,
1204
+ onChange: m,
1223
1205
  onError: u,
1224
1206
  onSubmit: h,
1225
- references: m,
1207
+ references: f,
1226
1208
  onAddReference: d
1227
- } = n, p = u === void 0 ? Lr : u;
1209
+ } = n, p = u === void 0 ? hr : u;
1228
1210
  let _;
1229
- t[0] !== m ? (_ = m === void 0 ? [] : m, t[0] = m, t[1] = _) : _ = t[1];
1230
- const x = _;
1211
+ t[0] !== f ? (_ = f === void 0 ? [] : f, t[0] = f, t[1] = _) : _ = t[1];
1212
+ const b = _;
1231
1213
  let g;
1232
1214
  t[2] !== r || t[3] !== a || t[4] !== p ? (g = {
1233
1215
  namespace: "PROMPT_EDITOR",
1234
- nodes: $r,
1216
+ nodes: mr,
1235
1217
  editorState: r,
1236
1218
  editable: a,
1237
1219
  onError: p,
1238
- theme: Ir
1220
+ theme: fr
1239
1221
  }, t[2] = r, t[3] = a, t[4] = p, t[5] = g) : g = t[5];
1240
- const N = g;
1241
- let b;
1242
- t[6] !== r ? (b = ot(r), t[6] = r, t[7] = b) : b = t[7];
1243
- const y = $t(b);
1244
- let T;
1245
- t[8] !== s ? (T = s ?? /* @__PURE__ */ H(D, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: [
1222
+ const T = g;
1223
+ let E;
1224
+ t[6] !== r ? (E = ot(r), t[6] = r, t[7] = E) : E = t[7];
1225
+ const k = It(E);
1226
+ let y;
1227
+ t[8] !== s ? (y = s ?? /* @__PURE__ */ F(P, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: [
1246
1228
  "Type your query here or press ",
1247
- /* @__PURE__ */ l(Tt, { color: "fg.subtle", children: "#" }),
1229
+ /* @__PURE__ */ l(mt, { color: "fg.subtle", children: "#" }),
1248
1230
  " to add a reference."
1249
- ] }), t[8] = s, t[9] = T) : T = t[9];
1250
- const S = T;
1251
- let R;
1252
- t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ l(Nt, {}), t[10] = R) : R = t[10];
1253
- let E;
1254
- t[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ l(je, { fullWidth: !0 }), t[11] = E) : E = t[11];
1255
- let L;
1256
- t[12] !== S ? (L = /* @__PURE__ */ l(ve, { contentEditable: E, placeholder: S, ErrorBoundary: we }), t[12] = S, t[13] = L) : L = t[13];
1257
- let P;
1258
- t[14] !== f ? (P = /* @__PURE__ */ l(Me, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (te) => {
1259
- te.read(() => {
1260
- const dt = Le(), ce = ir(dt);
1261
- ce !== y.current && (y.current = ce, f?.(ce, te.toJSON()));
1262
- });
1263
- } }), t[14] = f, t[15] = P) : P = t[15];
1231
+ ] }), t[8] = s, t[9] = y) : y = t[9];
1232
+ const C = y;
1233
+ let S;
1234
+ t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ l(ht, {}), t[10] = S) : S = t[10];
1235
+ let x;
1236
+ t[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ l(Ue, { fullWidth: !0 }), t[11] = x) : x = t[11];
1264
1237
  let w;
1265
- t[16] !== e ? (w = /* @__PURE__ */ l(dr, { editorRef: e, previousTextRef: y }), t[16] = e, t[17] = w) : w = t[17];
1266
- let I;
1267
- t[18] !== a ? (I = /* @__PURE__ */ l(Qe, { isEditable: a }), t[18] = a, t[19] = I) : I = t[19];
1268
- let M;
1269
- t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ l(or, {}), t[20] = M) : M = t[20];
1270
- let $;
1271
- t[21] !== h ? ($ = /* @__PURE__ */ l(mr, { onSubmit: h }), t[21] = h, t[22] = $) : $ = t[22];
1238
+ t[12] !== C ? (w = /* @__PURE__ */ l(Oe, { contentEditable: x, placeholder: C, ErrorBoundary: Ie }), t[12] = C, t[13] = w) : w = t[13];
1272
1239
  let O;
1273
- t[23] !== x ? (O = /* @__PURE__ */ l(Rr, { items: x }), t[23] = x, t[24] = O) : O = t[24];
1240
+ t[14] !== m ? (O = /* @__PURE__ */ l(we, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (ee) => {
1241
+ ee.read(() => {
1242
+ const dt = Ae(), le = zn(dt);
1243
+ le !== k.current && (k.current = le, m?.(le, ee.toJSON()));
1244
+ });
1245
+ } }), t[14] = m, t[15] = O) : O = t[15];
1274
1246
  let v;
1275
- t[25] !== d ? (v = /* @__PURE__ */ l(kr, { onAddReference: d }), t[25] = d, t[26] = v) : v = t[26];
1276
- let U;
1277
- t[27] !== c ? (U = c ? /* @__PURE__ */ l(Ze, {}) : "", t[27] = c, t[28] = U) : U = t[28];
1278
- let G;
1279
- return t[29] !== N || t[30] !== L || t[31] !== P || t[32] !== w || t[33] !== I || t[34] !== $ || t[35] !== O || t[36] !== v || t[37] !== U ? (G = /* @__PURE__ */ l(fe, { direction: "column", justifyContent: "space-between", width: "100%", position: "relative", children: /* @__PURE__ */ H(Pe, { initialConfig: N, children: [
1280
- R,
1281
- L,
1282
- P,
1247
+ t[16] !== e ? (v = /* @__PURE__ */ l(Gn, { editorRef: e, previousTextRef: k }), t[16] = e, t[17] = v) : v = t[17];
1248
+ let $;
1249
+ t[18] !== a ? ($ = /* @__PURE__ */ l(Qe, { isEditable: a }), t[18] = a, t[19] = $) : $ = t[19];
1250
+ let L;
1251
+ t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ l(Wn, {}), t[20] = L) : L = t[20];
1252
+ let R;
1253
+ t[21] !== h ? (R = /* @__PURE__ */ l(Xn, { onSubmit: h }), t[21] = h, t[22] = R) : R = t[22];
1254
+ let I;
1255
+ t[23] !== b ? (I = /* @__PURE__ */ l(sr, { items: b }), t[23] = b, t[24] = I) : I = t[24];
1256
+ let M;
1257
+ t[25] !== d ? (M = /* @__PURE__ */ l(ur, { onAddReference: d }), t[25] = d, t[26] = M) : M = t[26];
1258
+ let q;
1259
+ t[27] !== c ? (q = c ? /* @__PURE__ */ l(Ze, {}) : "", t[27] = c, t[28] = q) : q = t[28];
1260
+ let K;
1261
+ return t[29] !== T || t[30] !== w || t[31] !== O || t[32] !== v || t[33] !== $ || t[34] !== R || t[35] !== I || t[36] !== M || t[37] !== q ? (K = /* @__PURE__ */ l(fe, { direction: "column", justifyContent: "space-between", width: "100%", position: "relative", children: /* @__PURE__ */ F(Re, { initialConfig: T, children: [
1262
+ S,
1283
1263
  w,
1284
- I,
1285
- M,
1286
- $,
1287
1264
  O,
1288
1265
  v,
1289
- U
1290
- ] }) }), t[29] = N, t[30] = L, t[31] = P, t[32] = w, t[33] = I, t[34] = $, t[35] = O, t[36] = v, t[37] = U, t[38] = G) : G = t[38], G;
1291
- }, bo = It(Or);
1292
- function Lr() {
1266
+ $,
1267
+ L,
1268
+ R,
1269
+ I,
1270
+ M,
1271
+ q
1272
+ ] }) }), t[29] = T, t[30] = w, t[31] = O, t[32] = v, t[33] = $, t[34] = R, t[35] = I, t[36] = M, t[37] = q, t[38] = K) : K = t[38], K;
1273
+ }, no = Rt(pr);
1274
+ function hr() {
1293
1275
  }
1294
- function Pr(n) {
1295
- const e = C(5), {
1276
+ function _r(n) {
1277
+ const e = N(5), {
1296
1278
  value: t,
1297
1279
  onUpdate: r
1298
- } = n, [o] = F();
1280
+ } = n, [o] = D();
1299
1281
  let i, s;
1300
1282
  return e[0] !== o || e[1] !== r || e[2] !== t ? (i = () => {
1301
1283
  o && o.update(() => r(t), {
@@ -1303,7 +1285,7 @@ function Pr(n) {
1303
1285
  });
1304
1286
  }, s = [t, o, r], e[0] = o, e[1] = r, e[2] = t, e[3] = i, e[4] = s) : (i = e[3], s = e[4]), B(i, s), null;
1305
1287
  }
1306
- class j extends Z {
1288
+ class j extends Q {
1307
1289
  __href;
1308
1290
  __label;
1309
1291
  static getType() {
@@ -1337,14 +1319,14 @@ class j extends Z {
1337
1319
  }
1338
1320
  decorate(e, t) {
1339
1321
  const r = this.__href, i = r.split("/").pop() || "unknown", s = /^https?:\/\//i.test(r), c = /^#?\$PROJECT\//i.test(r);
1340
- return /* @__PURE__ */ l(A, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ l(Fe, { fileName: i, onSelect: () => {
1322
+ return /* @__PURE__ */ l(A, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ l(je, { fileName: i, onSelect: () => {
1341
1323
  if (s)
1342
1324
  window.open(r, "_blank", "noopener,noreferrer");
1343
1325
  else if (c) {
1344
- const a = r.replace(/^#?\$PROJECT\//i, ""), f = new CustomEvent("ui:open-project-file", {
1326
+ const a = r.replace(/^#?\$PROJECT\//i, ""), m = new CustomEvent("ui:open-project-file", {
1345
1327
  detail: a
1346
1328
  });
1347
- window.dispatchEvent(f);
1329
+ window.dispatchEvent(m);
1348
1330
  } else
1349
1331
  window.location.assign(r);
1350
1332
  } }) });
@@ -1353,117 +1335,116 @@ class j extends Z {
1353
1335
  function at(n, e) {
1354
1336
  return new j(n, e);
1355
1337
  }
1356
- function wr(n) {
1338
+ function gr(n) {
1357
1339
  return n instanceof j;
1358
1340
  }
1359
- const Ie = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Mr = {
1341
+ const $e = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, xr = {
1360
1342
  dependencies: [j],
1361
1343
  export: (n) => {
1362
- if (wr(n)) {
1344
+ if (gr(n)) {
1363
1345
  const e = n.__href, t = n.__label ?? e;
1364
1346
  return t ? `{{link('${t}')}}` : `{{link('${e}')}}`;
1365
1347
  }
1366
1348
  return null;
1367
1349
  },
1368
- regExp: Ie,
1369
- importRegExp: Ie,
1350
+ regExp: $e,
1351
+ importRegExp: $e,
1370
1352
  replace: (n, e) => {
1371
1353
  const t = e[2], o = /^(https?:\/\/|\/)/i.test(t) ? t : `#${t}`, i = t;
1372
1354
  n.replace(at(o, i));
1373
1355
  },
1374
1356
  type: "text-match"
1375
- }, me = [...Ye, Mr];
1376
- function To(n) {
1377
- const e = C(37), {
1357
+ }, ue = [...Ye, xr];
1358
+ function ro(n) {
1359
+ const e = N(37), {
1378
1360
  debug: t,
1379
1361
  defaultState: r,
1380
1362
  fullWidth: o,
1381
1363
  isEditable: i,
1382
1364
  onChange: s
1383
- } = n, c = t === void 0 ? !1 : t, a = r === void 0 ? "" : r, f = o === void 0 ? !1 : o, u = i === void 0 ? !1 : i;
1365
+ } = n, c = t === void 0 ? !1 : t, a = r === void 0 ? "" : r, m = o === void 0 ? !1 : o, u = i === void 0 ? !1 : i;
1384
1366
  let h;
1385
- e[0] !== a ? (h = wn(a), e[0] = a, e[1] = h) : h = e[1];
1367
+ e[0] !== a ? (h = On(a), e[0] = a, e[1] = h) : h = e[1];
1386
1368
  const {
1387
- frontmatter: m,
1369
+ frontmatter: f,
1388
1370
  body: d
1389
1371
  } = h, p = u && !!s;
1390
1372
  let _;
1391
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = [We, he, _e, z, ze, Be, Ue, ge, Je, J, q, K, j], e[2] = _) : _ = e[2];
1392
- let x;
1393
- e[3] !== d ? (x = () => qe(tt(d), me, void 0, !1), e[3] = d, e[4] = x) : x = e[4];
1373
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = [We, pe, he, z, ze, Be, qe, _e, Je, J, H, U, j], e[2] = _) : _ = e[2];
1374
+ let b;
1375
+ e[3] !== d ? (b = () => He(tt(d), ue, void 0, !1), e[3] = d, e[4] = b) : b = e[4];
1394
1376
  let g;
1395
- e[5] !== u || e[6] !== x ? (g = {
1377
+ e[5] !== u || e[6] !== b ? (g = {
1396
1378
  namespace: "RICH_MESSAGE",
1397
1379
  nodes: _,
1398
- editorState: x,
1399
- onError: Ar,
1380
+ editorState: b,
1381
+ onError: Er,
1400
1382
  editable: u,
1401
- theme: Ee
1402
- }, e[5] = u, e[6] = x, e[7] = g) : g = e[7];
1403
- const N = g;
1404
- let b;
1405
- e[8] !== d ? (b = /* @__PURE__ */ l(Pr, { value: d, onUpdate: vr }), e[8] = d, e[9] = b) : b = e[9];
1406
- let y, T, S;
1407
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ l(qt, {}), y = /* @__PURE__ */ l(Bt, { newTab: !0 }), T = /* @__PURE__ */ l(Wt, {}), e[10] = y, e[11] = T, e[12] = S) : (y = e[10], T = e[11], S = e[12]);
1383
+ theme: ge
1384
+ }, e[5] = u, e[6] = b, e[7] = g) : g = e[7];
1385
+ const T = g;
1386
+ let E;
1387
+ e[8] !== d ? (E = /* @__PURE__ */ l(_r, { value: d, onUpdate: br }), e[8] = d, e[9] = E) : E = e[9];
1388
+ let k, y, C;
1389
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ l(Wt, {}), k = /* @__PURE__ */ l(qt, { newTab: !0 }), y = /* @__PURE__ */ l(zt, {}), e[10] = k, e[11] = y, e[12] = C) : (k = e[10], y = e[11], C = e[12]);
1390
+ let S;
1391
+ e[13] !== u ? (S = u ? /* @__PURE__ */ l(Jt, { maxIndent: 7 }) : null, e[13] = u, e[14] = S) : S = e[14];
1392
+ let x, w, O, v;
1393
+ e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ l(Ht, {}), w = /* @__PURE__ */ l(Sn, {}), O = /* @__PURE__ */ l(En, {}), v = /* @__PURE__ */ l(sn, {}), e[15] = x, e[16] = w, e[17] = O, e[18] = v) : (x = e[15], w = e[16], O = e[17], v = e[18]);
1394
+ let $;
1395
+ e[19] !== m ? ($ = /* @__PURE__ */ l(Oe, { contentEditable: /* @__PURE__ */ l(Ue, { fullWidth: m, isRichMessage: !0 }), ErrorBoundary: Ie }), e[19] = m, e[20] = $) : $ = e[20];
1396
+ let L;
1397
+ e[21] !== f || e[22] !== s || e[23] !== p ? (L = p ? /* @__PURE__ */ l(we, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (q) => {
1398
+ q.read(() => {
1399
+ const K = Ae(), ee = Bt(ue, K);
1400
+ s?.(f + ee);
1401
+ });
1402
+ } }) : null, e[21] = f, e[22] = s, e[23] = p, e[24] = L) : L = e[24];
1408
1403
  let R;
1409
- e[13] !== u ? (R = u ? /* @__PURE__ */ l(zt, { maxIndent: 7 }) : null, e[13] = u, e[14] = R) : R = e[14];
1410
- let E, L, P, w;
1411
- e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ l(Ut, {}), L = /* @__PURE__ */ l(yn, {}), P = /* @__PURE__ */ l(Rn, {}), w = /* @__PURE__ */ l(cn, {}), e[15] = E, e[16] = L, e[17] = P, e[18] = w) : (E = e[15], L = e[16], P = e[17], w = e[18]);
1404
+ e[25] !== u ? (R = /* @__PURE__ */ l(Qe, { isEditable: u }), e[25] = u, e[26] = R) : R = e[26];
1412
1405
  let I;
1413
- e[19] !== f ? (I = /* @__PURE__ */ l(ve, { contentEditable: /* @__PURE__ */ l(je, { fullWidth: f, isRichMessage: !0 }), ErrorBoundary: we }), e[19] = f, e[20] = I) : I = e[20];
1406
+ e[27] !== c ? (I = c && /* @__PURE__ */ l(Ze, {}), e[27] = c, e[28] = I) : I = e[28];
1414
1407
  let M;
1415
- e[21] !== m || e[22] !== s || e[23] !== p ? (M = p ? /* @__PURE__ */ l(Me, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (U) => {
1416
- U.read(() => {
1417
- const G = Le(), te = Ht(me, G);
1418
- s?.(m + te);
1419
- });
1420
- } }) : null, e[21] = m, e[22] = s, e[23] = p, e[24] = M) : M = e[24];
1421
- let $;
1422
- e[25] !== u ? ($ = /* @__PURE__ */ l(Qe, { isEditable: u }), e[25] = u, e[26] = $) : $ = e[26];
1423
- let O;
1424
- e[27] !== c ? (O = c && /* @__PURE__ */ l(Ze, {}), e[27] = c, e[28] = O) : O = e[28];
1425
- let v;
1426
- return e[29] !== N || e[30] !== R || e[31] !== I || e[32] !== M || e[33] !== $ || e[34] !== O || e[35] !== b ? (v = /* @__PURE__ */ l(fe, { className: "rich-text", "data-rich-message": "true", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "hidden", children: /* @__PURE__ */ H(Pe, { initialConfig: N, children: [
1427
- b,
1428
- S,
1429
- y,
1430
- T,
1431
- R,
1408
+ return e[29] !== T || e[30] !== S || e[31] !== $ || e[32] !== L || e[33] !== R || e[34] !== I || e[35] !== E ? (M = /* @__PURE__ */ l(fe, { className: "rich-text", "data-rich-message": "true", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "hidden", children: /* @__PURE__ */ F(Re, { initialConfig: T, children: [
1432
1409
  E,
1433
- L,
1434
- P,
1410
+ C,
1411
+ k,
1412
+ y,
1413
+ S,
1414
+ x,
1435
1415
  w,
1436
- I,
1437
- M,
1416
+ O,
1417
+ v,
1438
1418
  $,
1439
- O
1440
- ] }) }), e[29] = N, e[30] = R, e[31] = I, e[32] = M, e[33] = $, e[34] = O, e[35] = b, e[36] = v) : v = e[36], v;
1419
+ L,
1420
+ R,
1421
+ I
1422
+ ] }) }), e[29] = T, e[30] = S, e[31] = $, e[32] = L, e[33] = R, e[34] = I, e[35] = E, e[36] = M) : M = e[36], M;
1441
1423
  }
1442
- function vr(n) {
1443
- qe(tt(n), me, void 0, !1);
1424
+ function br(n) {
1425
+ He(tt(n), ue, void 0, !1);
1444
1426
  }
1445
- function Ar(n) {
1427
+ function Er(n) {
1446
1428
  return console.error(n);
1447
1429
  }
1448
1430
  export {
1449
- ho as $,
1450
- yn as C,
1451
- po as D,
1452
- cn as E,
1453
- Rn as I,
1454
- bo as P,
1455
- To as R,
1456
- xo as T,
1457
- _o as a,
1458
- je as b,
1459
- go as c,
1460
- Qe as d,
1461
- Eo as e,
1462
- Ze as f,
1463
- tn as g,
1464
- ar as h,
1465
- ot as i,
1431
+ Qr as $,
1432
+ Sn as C,
1433
+ Yr as D,
1434
+ sn as E,
1435
+ En as I,
1436
+ no as P,
1437
+ ro as R,
1438
+ Qe as T,
1439
+ Zr as a,
1440
+ Ue as b,
1441
+ eo as c,
1442
+ Ze as d,
1443
+ to as e,
1444
+ Zt as f,
1445
+ Kn as g,
1446
+ ot as h,
1466
1447
  tt as n,
1467
- wn as s
1448
+ On as s
1468
1449
  };
1469
- //# sourceMappingURL=rich-message-DNSEhxXh.js.map
1450
+ //# sourceMappingURL=rich-message-DBf_5YlW.js.map