@vertesia/ui 0.81.0 → 0.81.2-dev.20260204.135023Z

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 (1499) hide show
  1. package/package.json +6 -10
  2. package/src/core/components/InputList.tsx +1 -1
  3. package/src/core/components/Overlay.tsx +1 -1
  4. package/src/core/components/SidePanel.tsx +25 -13
  5. package/src/core/components/index.ts +0 -8
  6. package/src/core/components/{Panel.tsx → shadcn/Panel.tsx} +1 -1
  7. package/src/core/components/{Badge.tsx → shadcn/badge.tsx} +1 -1
  8. package/src/core/components/shadcn/calendar.tsx +2 -2
  9. package/src/core/components/shadcn/command.tsx +1 -1
  10. package/src/core/components/shadcn/filters/index.ts +1 -1
  11. package/src/core/components/shadcn/index.ts +5 -3
  12. package/src/core/components/{ConfirmModal.tsx → shadcn/modal/ConfirmModal.tsx} +8 -8
  13. package/src/core/components/{DeleteModal.tsx → shadcn/modal/DeleteModal.tsx} +1 -1
  14. package/src/core/components/shadcn/{dialog.tsx → modal/dialog.tsx} +41 -32
  15. package/src/core/components/shadcn/modal/index.ts +3 -0
  16. package/src/core/components/shadcn/popover.tsx +4 -2
  17. package/src/core/components/shadcn/selectBox.tsx +14 -12
  18. package/src/core/components/shadcn/tabs.tsx +16 -7
  19. package/src/core/components/shadcn/tooltip.tsx +20 -16
  20. package/src/features/agent/PayloadBuilder.tsx +28 -0
  21. package/src/features/agent/chat/ModernAgentConversation.tsx +13 -111
  22. package/src/features/agent/chat/ModernAgentOutput/Header.tsx +1 -1
  23. package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +7 -7
  24. package/src/features/facets/AgentRunnerFacetsNav.tsx +125 -0
  25. package/src/features/facets/index.ts +1 -0
  26. package/src/features/store/collections/CreateCollection.tsx +9 -9
  27. package/src/features/store/collections/EditCollectionView.tsx +11 -9
  28. package/src/features/store/objects/components/ContentOverview.tsx +8 -8
  29. package/src/features/store/objects/components/PropertiesEditorModal.tsx +35 -51
  30. package/src/features/store/objects/components/SelectDocumentModal.tsx +6 -6
  31. package/src/features/store/objects/components/useContentPanelHooks.ts +3 -3
  32. package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +13 -13
  33. package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +8 -8
  34. package/src/features/store/objects/upload/DocumentUploadModal.tsx +25 -25
  35. package/src/features/store/types/ObjectSchemaEditor.tsx +30 -27
  36. package/src/features/store/types/SelectContentType.tsx +3 -3
  37. package/src/features/store/types/TableLayoutEditor.tsx +13 -17
  38. package/src/layout/AppLayout.tsx +16 -44
  39. package/src/layout/Sidebar.tsx +1 -1
  40. package/src/session/auth/auth-flow.md +1094 -0
  41. package/src/session/index.ts +1 -0
  42. package/src/shell/apps/AppProjectSelector.tsx +2 -2
  43. package/src/shell/login/InviteAcceptModal.tsx +6 -6
  44. package/src/shell/login/SignInModal.tsx +1 -1
  45. package/src/shell/login/SignupForm.tsx +3 -3
  46. package/src/shell/login/UserInfo.tsx +5 -5
  47. package/src/widgets/index.ts +1 -1
  48. package/src/widgets/json-view/JSONCode.tsx +28 -172
  49. package/src/widgets/json-view/JSONDisplay.tsx +1 -1
  50. package/src/widgets/{codemirror → monacoEditor}/MonacoEditor.tsx +16 -11
  51. package/src/widgets/monacoEditor/index.ts +3 -0
  52. package/src/widgets/schema-editor/editor/PropertyEditor.tsx +5 -5
  53. package/lib/esm/core/components/Avatar.js +0 -31
  54. package/lib/esm/core/components/Avatar.js.map +0 -1
  55. package/lib/esm/core/components/Badge.js +0 -62
  56. package/lib/esm/core/components/Badge.js.map +0 -1
  57. package/lib/esm/core/components/Button.js +0 -32
  58. package/lib/esm/core/components/Button.js.map +0 -1
  59. package/lib/esm/core/components/Center.js +0 -6
  60. package/lib/esm/core/components/Center.js.map +0 -1
  61. package/lib/esm/core/components/ComboBox.js +0 -356
  62. package/lib/esm/core/components/ComboBox.js.map +0 -1
  63. package/lib/esm/core/components/ConfirmModal.js +0 -10
  64. package/lib/esm/core/components/ConfirmModal.js.map +0 -1
  65. package/lib/esm/core/components/DeleteModal.js +0 -28
  66. package/lib/esm/core/components/DeleteModal.js.map +0 -1
  67. package/lib/esm/core/components/Divider.js +0 -6
  68. package/lib/esm/core/components/Divider.js.map +0 -1
  69. package/lib/esm/core/components/Dropdown.js +0 -16
  70. package/lib/esm/core/components/Dropdown.js.map +0 -1
  71. package/lib/esm/core/components/DropdownList.js +0 -9
  72. package/lib/esm/core/components/DropdownList.js.map +0 -1
  73. package/lib/esm/core/components/EmptyCollection.js +0 -7
  74. package/lib/esm/core/components/EmptyCollection.js.map +0 -1
  75. package/lib/esm/core/components/FileUpload.js +0 -119
  76. package/lib/esm/core/components/FileUpload.js.map +0 -1
  77. package/lib/esm/core/components/FormItem.js +0 -9
  78. package/lib/esm/core/components/FormItem.js.map +0 -1
  79. package/lib/esm/core/components/InputList.js +0 -61
  80. package/lib/esm/core/components/InputList.js.map +0 -1
  81. package/lib/esm/core/components/Link.js +0 -13
  82. package/lib/esm/core/components/Link.js.map +0 -1
  83. package/lib/esm/core/components/MenuList.js +0 -20
  84. package/lib/esm/core/components/MenuList.js.map +0 -1
  85. package/lib/esm/core/components/MessageBox.js +0 -66
  86. package/lib/esm/core/components/MessageBox.js.map +0 -1
  87. package/lib/esm/core/components/Modal.js +0 -26
  88. package/lib/esm/core/components/Modal.js.map +0 -1
  89. package/lib/esm/core/components/NumberInput.js +0 -43
  90. package/lib/esm/core/components/NumberInput.js.map +0 -1
  91. package/lib/esm/core/components/Overlay.js +0 -57
  92. package/lib/esm/core/components/Overlay.js.map +0 -1
  93. package/lib/esm/core/components/Panel.js +0 -8
  94. package/lib/esm/core/components/Panel.js.map +0 -1
  95. package/lib/esm/core/components/Portal.js +0 -28
  96. package/lib/esm/core/components/Portal.js.map +0 -1
  97. package/lib/esm/core/components/RadioGroup.js +0 -34
  98. package/lib/esm/core/components/RadioGroup.js.map +0 -1
  99. package/lib/esm/core/components/SelectBox.js +0 -67
  100. package/lib/esm/core/components/SelectBox.js.map +0 -1
  101. package/lib/esm/core/components/SelectList.js +0 -52
  102. package/lib/esm/core/components/SelectList.js.map +0 -1
  103. package/lib/esm/core/components/SelectStack.js +0 -8
  104. package/lib/esm/core/components/SelectStack.js.map +0 -1
  105. package/lib/esm/core/components/SidePanel.js +0 -33
  106. package/lib/esm/core/components/SidePanel.js.map +0 -1
  107. package/lib/esm/core/components/Spinner.js +0 -18
  108. package/lib/esm/core/components/Spinner.js.map +0 -1
  109. package/lib/esm/core/components/Switch.js +0 -12
  110. package/lib/esm/core/components/Switch.js.map +0 -1
  111. package/lib/esm/core/components/TagsInput.js +0 -194
  112. package/lib/esm/core/components/TagsInput.js.map +0 -1
  113. package/lib/esm/core/components/index.js +0 -36
  114. package/lib/esm/core/components/index.js.map +0 -1
  115. package/lib/esm/core/components/libs/utils.js +0 -6
  116. package/lib/esm/core/components/libs/utils.js.map +0 -1
  117. package/lib/esm/core/components/libs/visuallyHidden.js +0 -16
  118. package/lib/esm/core/components/libs/visuallyHidden.js.map +0 -1
  119. package/lib/esm/core/components/popup/Popup.js +0 -60
  120. package/lib/esm/core/components/popup/Popup.js.map +0 -1
  121. package/lib/esm/core/components/popup/PopupController.js +0 -149
  122. package/lib/esm/core/components/popup/PopupController.js.map +0 -1
  123. package/lib/esm/core/components/popup/index.js +0 -4
  124. package/lib/esm/core/components/popup/index.js.map +0 -1
  125. package/lib/esm/core/components/popup/position.js +0 -221
  126. package/lib/esm/core/components/popup/position.js.map +0 -1
  127. package/lib/esm/core/components/popup/utils.js +0 -74
  128. package/lib/esm/core/components/popup/utils.js.map +0 -1
  129. package/lib/esm/core/components/shadcn/breadcrumb.js +0 -51
  130. package/lib/esm/core/components/shadcn/breadcrumb.js.map +0 -1
  131. package/lib/esm/core/components/shadcn/button.js +0 -76
  132. package/lib/esm/core/components/shadcn/button.js.map +0 -1
  133. package/lib/esm/core/components/shadcn/calendar.js +0 -13
  134. package/lib/esm/core/components/shadcn/calendar.js.map +0 -1
  135. package/lib/esm/core/components/shadcn/card.js +0 -17
  136. package/lib/esm/core/components/shadcn/card.js.map +0 -1
  137. package/lib/esm/core/components/shadcn/checkbox.js +0 -9
  138. package/lib/esm/core/components/shadcn/checkbox.js.map +0 -1
  139. package/lib/esm/core/components/shadcn/command.js +0 -29
  140. package/lib/esm/core/components/shadcn/command.js.map +0 -1
  141. package/lib/esm/core/components/shadcn/dialog.js +0 -74
  142. package/lib/esm/core/components/shadcn/dialog.js.map +0 -1
  143. package/lib/esm/core/components/shadcn/filters/DynamicLabel.js +0 -38
  144. package/lib/esm/core/components/shadcn/filters/DynamicLabel.js.map +0 -1
  145. package/lib/esm/core/components/shadcn/filters/animateChangeInHeight.js +0 -23
  146. package/lib/esm/core/components/shadcn/filters/animateChangeInHeight.js.map +0 -1
  147. package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js +0 -129
  148. package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js.map +0 -1
  149. package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js +0 -46
  150. package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js.map +0 -1
  151. package/lib/esm/core/components/shadcn/filters/comboBox/StringListCombobox.js +0 -23
  152. package/lib/esm/core/components/shadcn/filters/comboBox/StringListCombobox.js.map +0 -1
  153. package/lib/esm/core/components/shadcn/filters/comboBox/TextCombobox.js +0 -28
  154. package/lib/esm/core/components/shadcn/filters/comboBox/TextCombobox.js.map +0 -1
  155. package/lib/esm/core/components/shadcn/filters/comboBox/comboBox.js +0 -5
  156. package/lib/esm/core/components/shadcn/filters/comboBox/comboBox.js.map +0 -1
  157. package/lib/esm/core/components/shadcn/filters/filter/SelectFilter.js +0 -98
  158. package/lib/esm/core/components/shadcn/filters/filter/SelectFilter.js.map +0 -1
  159. package/lib/esm/core/components/shadcn/filters/filter/StringListFilter.js +0 -24
  160. package/lib/esm/core/components/shadcn/filters/filter/StringListFilter.js.map +0 -1
  161. package/lib/esm/core/components/shadcn/filters/filter/TextFilter.js +0 -21
  162. package/lib/esm/core/components/shadcn/filters/filter/TextFilter.js.map +0 -1
  163. package/lib/esm/core/components/shadcn/filters/filter/dateFilter.js +0 -161
  164. package/lib/esm/core/components/shadcn/filters/filter/dateFilter.js.map +0 -1
  165. package/lib/esm/core/components/shadcn/filters/filter-styles.js +0 -88
  166. package/lib/esm/core/components/shadcn/filters/filter-styles.js.map +0 -1
  167. package/lib/esm/core/components/shadcn/filters/filterBar.js +0 -242
  168. package/lib/esm/core/components/shadcn/filters/filterBar.js.map +0 -1
  169. package/lib/esm/core/components/shadcn/filters/filters.js +0 -57
  170. package/lib/esm/core/components/shadcn/filters/filters.js.map +0 -1
  171. package/lib/esm/core/components/shadcn/filters/index.js +0 -6
  172. package/lib/esm/core/components/shadcn/filters/index.js.map +0 -1
  173. package/lib/esm/core/components/shadcn/filters/types.js +0 -10
  174. package/lib/esm/core/components/shadcn/filters/types.js.map +0 -1
  175. package/lib/esm/core/components/shadcn/heading.js +0 -17
  176. package/lib/esm/core/components/shadcn/heading.js.map +0 -1
  177. package/lib/esm/core/components/shadcn/index.js +0 -23
  178. package/lib/esm/core/components/shadcn/index.js.map +0 -1
  179. package/lib/esm/core/components/shadcn/input.js +0 -41
  180. package/lib/esm/core/components/shadcn/input.js.map +0 -1
  181. package/lib/esm/core/components/shadcn/label.js +0 -10
  182. package/lib/esm/core/components/shadcn/label.js.map +0 -1
  183. package/lib/esm/core/components/shadcn/popover.js +0 -50
  184. package/lib/esm/core/components/shadcn/popover.js.map +0 -1
  185. package/lib/esm/core/components/shadcn/resizeable.js +0 -15
  186. package/lib/esm/core/components/shadcn/resizeable.js.map +0 -1
  187. package/lib/esm/core/components/shadcn/selectBox.js +0 -152
  188. package/lib/esm/core/components/shadcn/selectBox.js.map +0 -1
  189. package/lib/esm/core/components/shadcn/separator.js +0 -8
  190. package/lib/esm/core/components/shadcn/separator.js.map +0 -1
  191. package/lib/esm/core/components/shadcn/tabs.js +0 -132
  192. package/lib/esm/core/components/shadcn/tabs.js.map +0 -1
  193. package/lib/esm/core/components/shadcn/text.js +0 -30
  194. package/lib/esm/core/components/shadcn/text.js.map +0 -1
  195. package/lib/esm/core/components/shadcn/textarea.js +0 -7
  196. package/lib/esm/core/components/shadcn/textarea.js.map +0 -1
  197. package/lib/esm/core/components/shadcn/theme/ThemeProvider.js +0 -39
  198. package/lib/esm/core/components/shadcn/theme/ThemeProvider.js.map +0 -1
  199. package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js +0 -13
  200. package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js.map +0 -1
  201. package/lib/esm/core/components/shadcn/tooltip.js +0 -14
  202. package/lib/esm/core/components/shadcn/tooltip.js.map +0 -1
  203. package/lib/esm/core/components/styles.js +0 -10
  204. package/lib/esm/core/components/styles.js.map +0 -1
  205. package/lib/esm/core/components/table/index.js +0 -24
  206. package/lib/esm/core/components/table/index.js.map +0 -1
  207. package/lib/esm/core/components/tabs/Tabs.js +0 -78
  208. package/lib/esm/core/components/tabs/Tabs.js.map +0 -1
  209. package/lib/esm/core/components/tabs/TabsContext.js +0 -7
  210. package/lib/esm/core/components/tabs/TabsContext.js.map +0 -1
  211. package/lib/esm/core/components/tabs/index.js +0 -3
  212. package/lib/esm/core/components/tabs/index.js.map +0 -1
  213. package/lib/esm/core/components/toast/NotificationPanel.js +0 -43
  214. package/lib/esm/core/components/toast/NotificationPanel.js.map +0 -1
  215. package/lib/esm/core/components/toast/ToastContext.js +0 -7
  216. package/lib/esm/core/components/toast/ToastContext.js.map +0 -1
  217. package/lib/esm/core/components/toast/ToastProps.js +0 -2
  218. package/lib/esm/core/components/toast/ToastProps.js.map +0 -1
  219. package/lib/esm/core/components/toast/ToastProvider.js +0 -13
  220. package/lib/esm/core/components/toast/ToastProvider.js.map +0 -1
  221. package/lib/esm/core/components/toast/index.js +0 -3
  222. package/lib/esm/core/components/toast/index.js.map +0 -1
  223. package/lib/esm/core/hooks/CompositeState.js +0 -256
  224. package/lib/esm/core/hooks/CompositeState.js.map +0 -1
  225. package/lib/esm/core/hooks/PortalContainerProvider.js +0 -42
  226. package/lib/esm/core/hooks/PortalContainerProvider.js.map +0 -1
  227. package/lib/esm/core/hooks/SharedState.js +0 -64
  228. package/lib/esm/core/hooks/SharedState.js.map +0 -1
  229. package/lib/esm/core/hooks/index.js +0 -16
  230. package/lib/esm/core/hooks/index.js.map +0 -1
  231. package/lib/esm/core/hooks/useClickOutside.js +0 -29
  232. package/lib/esm/core/hooks/useClickOutside.js.map +0 -1
  233. package/lib/esm/core/hooks/useCopyToClipboard.js +0 -23
  234. package/lib/esm/core/hooks/useCopyToClipboard.js.map +0 -1
  235. package/lib/esm/core/hooks/useDarkMode.js +0 -11
  236. package/lib/esm/core/hooks/useDarkMode.js.map +0 -1
  237. package/lib/esm/core/hooks/useDebounce.js +0 -14
  238. package/lib/esm/core/hooks/useDebounce.js.map +0 -1
  239. package/lib/esm/core/hooks/useEventSource.js +0 -31
  240. package/lib/esm/core/hooks/useEventSource.js.map +0 -1
  241. package/lib/esm/core/hooks/useFetch.js +0 -40
  242. package/lib/esm/core/hooks/useFetch.js.map +0 -1
  243. package/lib/esm/core/hooks/useFlag.js +0 -13
  244. package/lib/esm/core/hooks/useFlag.js.map +0 -1
  245. package/lib/esm/core/hooks/useIntersectionObserver.js +0 -34
  246. package/lib/esm/core/hooks/useIntersectionObserver.js.map +0 -1
  247. package/lib/esm/core/hooks/useIsFistRendering.js +0 -14
  248. package/lib/esm/core/hooks/useIsFistRendering.js.map +0 -1
  249. package/lib/esm/core/hooks/useSafeLayoutEffect.js +0 -4
  250. package/lib/esm/core/hooks/useSafeLayoutEffect.js.map +0 -1
  251. package/lib/esm/core/hooks/useScrollableSearch.js +0 -92
  252. package/lib/esm/core/hooks/useScrollableSearch.js.map +0 -1
  253. package/lib/esm/core/hooks/useSharedValue.js +0 -21
  254. package/lib/esm/core/hooks/useSharedValue.js.map +0 -1
  255. package/lib/esm/core/index.js +0 -4
  256. package/lib/esm/core/index.js.map +0 -1
  257. package/lib/esm/core/utils/cn.js +0 -6
  258. package/lib/esm/core/utils/cn.js.map +0 -1
  259. package/lib/esm/core/utils/index.js +0 -2
  260. package/lib/esm/core/utils/index.js.map +0 -1
  261. package/lib/esm/env/index.js +0 -75
  262. package/lib/esm/env/index.js.map +0 -1
  263. package/lib/esm/features/activity-doc/ActivityDoc.js +0 -71
  264. package/lib/esm/features/activity-doc/ActivityDoc.js.map +0 -1
  265. package/lib/esm/features/activity-doc/index.js +0 -2
  266. package/lib/esm/features/activity-doc/index.js.map +0 -1
  267. package/lib/esm/features/agent/PayloadBuilder.js +0 -266
  268. package/lib/esm/features/agent/PayloadBuilder.js.map +0 -1
  269. package/lib/esm/features/agent/chat/AgentChart.js +0 -184
  270. package/lib/esm/features/agent/chat/AgentChart.js.map +0 -1
  271. package/lib/esm/features/agent/chat/AnimatedThinkingDots.js +0 -207
  272. package/lib/esm/features/agent/chat/AnimatedThinkingDots.js.map +0 -1
  273. package/lib/esm/features/agent/chat/JumpingDots.js +0 -6
  274. package/lib/esm/features/agent/chat/JumpingDots.js.map +0 -1
  275. package/lib/esm/features/agent/chat/ModernAgentConversation.js +0 -490
  276. package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +0 -1
  277. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +0 -133
  278. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +0 -1
  279. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +0 -62
  280. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +0 -1
  281. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js +0 -29
  282. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js.map +0 -1
  283. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +0 -95
  284. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +0 -1
  285. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +0 -54
  286. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +0 -1
  287. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +0 -368
  288. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +0 -1
  289. package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js +0 -20
  290. package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js.map +0 -1
  291. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +0 -63
  292. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +0 -1
  293. package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js +0 -23
  294. package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +0 -1
  295. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js +0 -52
  296. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +0 -1
  297. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +0 -82
  298. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +0 -1
  299. package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js +0 -13
  300. package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js.map +0 -1
  301. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +0 -105
  302. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +0 -1
  303. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +0 -160
  304. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +0 -1
  305. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +0 -266
  306. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +0 -1
  307. package/lib/esm/features/agent/chat/WaitingMessages.js +0 -60
  308. package/lib/esm/features/agent/chat/WaitingMessages.js.map +0 -1
  309. package/lib/esm/features/agent/chat/index.js +0 -6
  310. package/lib/esm/features/agent/chat/index.js.map +0 -1
  311. package/lib/esm/features/agent/createChartTool.js +0 -354
  312. package/lib/esm/features/agent/createChartTool.js.map +0 -1
  313. package/lib/esm/features/agent/examples.js +0 -295
  314. package/lib/esm/features/agent/examples.js.map +0 -1
  315. package/lib/esm/features/agent/index.js +0 -5
  316. package/lib/esm/features/agent/index.js.map +0 -1
  317. package/lib/esm/features/agent/visualization.js +0 -165
  318. package/lib/esm/features/agent/visualization.js.map +0 -1
  319. package/lib/esm/features/errors/PanelErrorBoundary.js +0 -11
  320. package/lib/esm/features/errors/PanelErrorBoundary.js.map +0 -1
  321. package/lib/esm/features/errors/RowErrorBoundary.js +0 -9
  322. package/lib/esm/features/errors/RowErrorBoundary.js.map +0 -1
  323. package/lib/esm/features/errors/VertesiaErrorBoundary.js +0 -15
  324. package/lib/esm/features/errors/VertesiaErrorBoundary.js.map +0 -1
  325. package/lib/esm/features/errors/WidgetErrorBoundary.js +0 -11
  326. package/lib/esm/features/errors/WidgetErrorBoundary.js.map +0 -1
  327. package/lib/esm/features/errors/index.js +0 -5
  328. package/lib/esm/features/errors/index.js.map +0 -1
  329. package/lib/esm/features/facets/CollectionsFacetsNav.js +0 -89
  330. package/lib/esm/features/facets/CollectionsFacetsNav.js.map +0 -1
  331. package/lib/esm/features/facets/DocumentsFacetsNav.js +0 -147
  332. package/lib/esm/features/facets/DocumentsFacetsNav.js.map +0 -1
  333. package/lib/esm/features/facets/EnvironmentFacet.js +0 -39
  334. package/lib/esm/features/facets/EnvironmentFacet.js.map +0 -1
  335. package/lib/esm/features/facets/InteractionsFacetsNav.js +0 -88
  336. package/lib/esm/features/facets/InteractionsFacetsNav.js.map +0 -1
  337. package/lib/esm/features/facets/PromptsFacetsNav.js +0 -80
  338. package/lib/esm/features/facets/PromptsFacetsNav.js.map +0 -1
  339. package/lib/esm/features/facets/RunsFacetsNav.js +0 -157
  340. package/lib/esm/features/facets/RunsFacetsNav.js.map +0 -1
  341. package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js +0 -100
  342. package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js.map +0 -1
  343. package/lib/esm/features/facets/index.js +0 -15
  344. package/lib/esm/features/facets/index.js.map +0 -1
  345. package/lib/esm/features/facets/utils/SearchInterface.js +0 -2
  346. package/lib/esm/features/facets/utils/SearchInterface.js.map +0 -1
  347. package/lib/esm/features/facets/utils/StringFacet.js +0 -12
  348. package/lib/esm/features/facets/utils/StringFacet.js.map +0 -1
  349. package/lib/esm/features/facets/utils/StringListFacet.js +0 -11
  350. package/lib/esm/features/facets/utils/StringListFacet.js.map +0 -1
  351. package/lib/esm/features/facets/utils/TypeFacet.js +0 -42
  352. package/lib/esm/features/facets/utils/TypeFacet.js.map +0 -1
  353. package/lib/esm/features/facets/utils/VEnvironmentFacet.js +0 -25
  354. package/lib/esm/features/facets/utils/VEnvironmentFacet.js.map +0 -1
  355. package/lib/esm/features/facets/utils/VInteractionFacet.js +0 -45
  356. package/lib/esm/features/facets/utils/VInteractionFacet.js.map +0 -1
  357. package/lib/esm/features/facets/utils/VStringFacet.js +0 -20
  358. package/lib/esm/features/facets/utils/VStringFacet.js.map +0 -1
  359. package/lib/esm/features/facets/utils/VTypeFacet.js +0 -61
  360. package/lib/esm/features/facets/utils/VTypeFacet.js.map +0 -1
  361. package/lib/esm/features/facets/utils/VUserFacet.js +0 -31
  362. package/lib/esm/features/facets/utils/VUserFacet.js.map +0 -1
  363. package/lib/esm/features/facets/utils/utils.js +0 -7
  364. package/lib/esm/features/facets/utils/utils.js.map +0 -1
  365. package/lib/esm/features/index.js +0 -12
  366. package/lib/esm/features/index.js.map +0 -1
  367. package/lib/esm/features/layout/GenericPageNavHeader.js +0 -74
  368. package/lib/esm/features/layout/GenericPageNavHeader.js.map +0 -1
  369. package/lib/esm/features/layout/NotFoundView.js +0 -5
  370. package/lib/esm/features/layout/NotFoundView.js.map +0 -1
  371. package/lib/esm/features/layout/index.js +0 -3
  372. package/lib/esm/features/layout/index.js.map +0 -1
  373. package/lib/esm/features/magic-pdf/AnnotatedImageSlider.js +0 -268
  374. package/lib/esm/features/magic-pdf/AnnotatedImageSlider.js.map +0 -1
  375. package/lib/esm/features/magic-pdf/DownloadPopover.js +0 -28
  376. package/lib/esm/features/magic-pdf/DownloadPopover.js.map +0 -1
  377. package/lib/esm/features/magic-pdf/ExtractedContentView.js +0 -77
  378. package/lib/esm/features/magic-pdf/ExtractedContentView.js.map +0 -1
  379. package/lib/esm/features/magic-pdf/MagicPdfProvider.js +0 -242
  380. package/lib/esm/features/magic-pdf/MagicPdfProvider.js.map +0 -1
  381. package/lib/esm/features/magic-pdf/MagicPdfView.js +0 -61
  382. package/lib/esm/features/magic-pdf/MagicPdfView.js.map +0 -1
  383. package/lib/esm/features/magic-pdf/index.js +0 -2
  384. package/lib/esm/features/magic-pdf/index.js.map +0 -1
  385. package/lib/esm/features/magic-pdf/types.js +0 -2
  386. package/lib/esm/features/magic-pdf/types.js.map +0 -1
  387. package/lib/esm/features/pdf-viewer/PdfPageRenderer.js +0 -261
  388. package/lib/esm/features/pdf-viewer/PdfPageRenderer.js.map +0 -1
  389. package/lib/esm/features/pdf-viewer/PdfPageSlider.js +0 -276
  390. package/lib/esm/features/pdf-viewer/PdfPageSlider.js.map +0 -1
  391. package/lib/esm/features/pdf-viewer/SimplePdfViewer.js +0 -71
  392. package/lib/esm/features/pdf-viewer/SimplePdfViewer.js.map +0 -1
  393. package/lib/esm/features/pdf-viewer/index.js +0 -4
  394. package/lib/esm/features/pdf-viewer/index.js.map +0 -1
  395. package/lib/esm/features/permissions/SecureButton.js +0 -13
  396. package/lib/esm/features/permissions/SecureButton.js.map +0 -1
  397. package/lib/esm/features/permissions/SecureSidebarItem.js +0 -14
  398. package/lib/esm/features/permissions/SecureSidebarItem.js.map +0 -1
  399. package/lib/esm/features/permissions/UserPermissionsProvider.js +0 -87
  400. package/lib/esm/features/permissions/UserPermissionsProvider.js.map +0 -1
  401. package/lib/esm/features/permissions/helpers.js +0 -12
  402. package/lib/esm/features/permissions/helpers.js.map +0 -1
  403. package/lib/esm/features/permissions/index.js +0 -5
  404. package/lib/esm/features/permissions/index.js.map +0 -1
  405. package/lib/esm/features/store/collections/BrowseCollectionView.js +0 -40
  406. package/lib/esm/features/store/collections/BrowseCollectionView.js.map +0 -1
  407. package/lib/esm/features/store/collections/CollectionsTable.js +0 -64
  408. package/lib/esm/features/store/collections/CollectionsTable.js.map +0 -1
  409. package/lib/esm/features/store/collections/CreateCollection.js +0 -87
  410. package/lib/esm/features/store/collections/CreateCollection.js.map +0 -1
  411. package/lib/esm/features/store/collections/EditCollectionView.js +0 -183
  412. package/lib/esm/features/store/collections/EditCollectionView.js.map +0 -1
  413. package/lib/esm/features/store/collections/SelectCollection.js +0 -119
  414. package/lib/esm/features/store/collections/SelectCollection.js.map +0 -1
  415. package/lib/esm/features/store/collections/SharedPropsEditor.js +0 -39
  416. package/lib/esm/features/store/collections/SharedPropsEditor.js.map +0 -1
  417. package/lib/esm/features/store/collections/SyncMemberHeadsToggle.js +0 -35
  418. package/lib/esm/features/store/collections/SyncMemberHeadsToggle.js.map +0 -1
  419. package/lib/esm/features/store/collections/index.js +0 -8
  420. package/lib/esm/features/store/collections/index.js.map +0 -1
  421. package/lib/esm/features/store/index.js +0 -4
  422. package/lib/esm/features/store/index.js.map +0 -1
  423. package/lib/esm/features/store/objects/DocumentPreviewPanel.js +0 -147
  424. package/lib/esm/features/store/objects/DocumentPreviewPanel.js.map +0 -1
  425. package/lib/esm/features/store/objects/DocumentSearchResults.js +0 -204
  426. package/lib/esm/features/store/objects/DocumentSearchResults.js.map +0 -1
  427. package/lib/esm/features/store/objects/DocumentSelectionProvider.js +0 -81
  428. package/lib/esm/features/store/objects/DocumentSelectionProvider.js.map +0 -1
  429. package/lib/esm/features/store/objects/DocumentTable.js +0 -278
  430. package/lib/esm/features/store/objects/DocumentTable.js.map +0 -1
  431. package/lib/esm/features/store/objects/ExportPropertiesModal.js +0 -31
  432. package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +0 -1
  433. package/lib/esm/features/store/objects/components/ContentDispositionButton.js +0 -31
  434. package/lib/esm/features/store/objects/components/ContentDispositionButton.js.map +0 -1
  435. package/lib/esm/features/store/objects/components/ContentOverview.js +0 -520
  436. package/lib/esm/features/store/objects/components/ContentOverview.js.map +0 -1
  437. package/lib/esm/features/store/objects/components/DocumentIcon.js +0 -33
  438. package/lib/esm/features/store/objects/components/DocumentIcon.js.map +0 -1
  439. package/lib/esm/features/store/objects/components/DocumentInput.js +0 -51
  440. package/lib/esm/features/store/objects/components/DocumentInput.js.map +0 -1
  441. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +0 -171
  442. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +0 -1
  443. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +0 -53
  444. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +0 -1
  445. package/lib/esm/features/store/objects/components/SelectDocument.js +0 -55
  446. package/lib/esm/features/store/objects/components/SelectDocument.js.map +0 -1
  447. package/lib/esm/features/store/objects/components/SelectDocumentModal.js +0 -7
  448. package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +0 -1
  449. package/lib/esm/features/store/objects/components/VectorSearchWidget.js +0 -90
  450. package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +0 -1
  451. package/lib/esm/features/store/objects/components/index.js +0 -10
  452. package/lib/esm/features/store/objects/components/index.js.map +0 -1
  453. package/lib/esm/features/store/objects/components/useContentPanelHooks.js +0 -153
  454. package/lib/esm/features/store/objects/components/useContentPanelHooks.js.map +0 -1
  455. package/lib/esm/features/store/objects/components/useDownloadObject.js +0 -21
  456. package/lib/esm/features/store/objects/components/useDownloadObject.js.map +0 -1
  457. package/lib/esm/features/store/objects/index.js +0 -11
  458. package/lib/esm/features/store/objects/index.js.map +0 -1
  459. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +0 -86
  460. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +0 -1
  461. package/lib/esm/features/store/objects/layout/documentLayout.js +0 -15
  462. package/lib/esm/features/store/objects/layout/documentLayout.js.map +0 -1
  463. package/lib/esm/features/store/objects/layout/index.js +0 -3
  464. package/lib/esm/features/store/objects/layout/index.js.map +0 -1
  465. package/lib/esm/features/store/objects/layout/renderers.js +0 -157
  466. package/lib/esm/features/store/objects/layout/renderers.js.map +0 -1
  467. package/lib/esm/features/store/objects/search/DocumentSearchContext.js +0 -175
  468. package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +0 -1
  469. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +0 -39
  470. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +0 -1
  471. package/lib/esm/features/store/objects/search/index.js +0 -3
  472. package/lib/esm/features/store/objects/search/index.js.map +0 -1
  473. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +0 -150
  474. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +0 -1
  475. package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js +0 -2
  476. package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js.map +0 -1
  477. package/lib/esm/features/store/objects/selection/SelectionActions.js +0 -69
  478. package/lib/esm/features/store/objects/selection/SelectionActions.js.map +0 -1
  479. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +0 -81
  480. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +0 -1
  481. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +0 -53
  482. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +0 -1
  483. package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js +0 -30
  484. package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js.map +0 -1
  485. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +0 -84
  486. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +0 -1
  487. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +0 -106
  488. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +0 -1
  489. package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js +0 -64
  490. package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js.map +0 -1
  491. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +0 -72
  492. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +0 -1
  493. package/lib/esm/features/store/objects/selection/actions/index.js +0 -8
  494. package/lib/esm/features/store/objects/selection/actions/index.js.map +0 -1
  495. package/lib/esm/features/store/objects/selection/index.js +0 -5
  496. package/lib/esm/features/store/objects/selection/index.js.map +0 -1
  497. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +0 -519
  498. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +0 -1
  499. package/lib/esm/features/store/objects/upload/index.js +0 -4
  500. package/lib/esm/features/store/objects/upload/index.js.map +0 -1
  501. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +0 -195
  502. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +0 -1
  503. package/lib/esm/features/store/objects/upload/useUploadHandler.js +0 -230
  504. package/lib/esm/features/store/objects/upload/useUploadHandler.js.map +0 -1
  505. package/lib/esm/features/store/types/ContentObjectTypesSearch.js +0 -81
  506. package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +0 -1
  507. package/lib/esm/features/store/types/ContentObjectTypesTable.js +0 -11
  508. package/lib/esm/features/store/types/ContentObjectTypesTable.js.map +0 -1
  509. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +0 -26
  510. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +0 -1
  511. package/lib/esm/features/store/types/ObjectSchemaEditor.js +0 -103
  512. package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +0 -1
  513. package/lib/esm/features/store/types/SelectContentType.js +0 -43
  514. package/lib/esm/features/store/types/SelectContentType.js.map +0 -1
  515. package/lib/esm/features/store/types/SelectContentTypeModal.js +0 -28
  516. package/lib/esm/features/store/types/SelectContentTypeModal.js.map +0 -1
  517. package/lib/esm/features/store/types/TableLayoutEditor.js +0 -78
  518. package/lib/esm/features/store/types/TableLayoutEditor.js.map +0 -1
  519. package/lib/esm/features/store/types/index.js +0 -9
  520. package/lib/esm/features/store/types/index.js.map +0 -1
  521. package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js +0 -98
  522. package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js.map +0 -1
  523. package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js +0 -15
  524. package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js.map +0 -1
  525. package/lib/esm/features/store/types/search/index.js +0 -3
  526. package/lib/esm/features/store/types/search/index.js.map +0 -1
  527. package/lib/esm/features/user/UserAvatar.js +0 -18
  528. package/lib/esm/features/user/UserAvatar.js.map +0 -1
  529. package/lib/esm/features/user/UserInfo.js +0 -121
  530. package/lib/esm/features/user/UserInfo.js.map +0 -1
  531. package/lib/esm/features/user/index.js +0 -3
  532. package/lib/esm/features/user/index.js.map +0 -1
  533. package/lib/esm/features/utils/index.js +0 -6
  534. package/lib/esm/features/utils/index.js.map +0 -1
  535. package/lib/esm/features/utils/mimeType.js +0 -17
  536. package/lib/esm/features/utils/mimeType.js.map +0 -1
  537. package/lib/esm/features/utils/print.js +0 -181
  538. package/lib/esm/features/utils/print.js.map +0 -1
  539. package/lib/esm/features/utils/rendition.js +0 -67
  540. package/lib/esm/features/utils/rendition.js.map +0 -1
  541. package/lib/esm/features/utils/text.js +0 -10
  542. package/lib/esm/features/utils/text.js.map +0 -1
  543. package/lib/esm/features/utils/workflowStatus.js +0 -43
  544. package/lib/esm/features/utils/workflowStatus.js.map +0 -1
  545. package/lib/esm/layout/AppLayout.js +0 -46
  546. package/lib/esm/layout/AppLayout.js.map +0 -1
  547. package/lib/esm/layout/FullHeightLayout.js +0 -18
  548. package/lib/esm/layout/FullHeightLayout.js.map +0 -1
  549. package/lib/esm/layout/Navbar.js +0 -40
  550. package/lib/esm/layout/Navbar.js.map +0 -1
  551. package/lib/esm/layout/Sidebar.js +0 -45
  552. package/lib/esm/layout/Sidebar.js.map +0 -1
  553. package/lib/esm/layout/SidebarContext.js +0 -10
  554. package/lib/esm/layout/SidebarContext.js.map +0 -1
  555. package/lib/esm/layout/TitleBar.js +0 -5
  556. package/lib/esm/layout/TitleBar.js.map +0 -1
  557. package/lib/esm/layout/index.js +0 -7
  558. package/lib/esm/layout/index.js.map +0 -1
  559. package/lib/esm/router/FixLinks.js +0 -23
  560. package/lib/esm/router/FixLinks.js.map +0 -1
  561. package/lib/esm/router/HistoryNavigator.js +0 -192
  562. package/lib/esm/router/HistoryNavigator.js.map +0 -1
  563. package/lib/esm/router/Nav.js +0 -26
  564. package/lib/esm/router/Nav.js.map +0 -1
  565. package/lib/esm/router/NestedNavigationContext.js +0 -19
  566. package/lib/esm/router/NestedNavigationContext.js.map +0 -1
  567. package/lib/esm/router/NestedRouterProvider.js +0 -44
  568. package/lib/esm/router/NestedRouterProvider.js.map +0 -1
  569. package/lib/esm/router/PathMatcher.js +0 -159
  570. package/lib/esm/router/PathMatcher.js.map +0 -1
  571. package/lib/esm/router/PathWithParams.js +0 -34
  572. package/lib/esm/router/PathWithParams.js.map +0 -1
  573. package/lib/esm/router/Route404.js +0 -18
  574. package/lib/esm/router/Route404.js.map +0 -1
  575. package/lib/esm/router/RouteComponent.js +0 -32
  576. package/lib/esm/router/RouteComponent.js.map +0 -1
  577. package/lib/esm/router/Router.js +0 -161
  578. package/lib/esm/router/Router.js.map +0 -1
  579. package/lib/esm/router/RouterProvider.js +0 -41
  580. package/lib/esm/router/RouterProvider.js.map +0 -1
  581. package/lib/esm/router/index.js +0 -11
  582. package/lib/esm/router/index.js.map +0 -1
  583. package/lib/esm/router/path.js +0 -140
  584. package/lib/esm/router/path.js.map +0 -1
  585. package/lib/esm/session/TypeRegistry.js +0 -24
  586. package/lib/esm/session/TypeRegistry.js.map +0 -1
  587. package/lib/esm/session/UserSession.js +0 -192
  588. package/lib/esm/session/UserSession.js.map +0 -1
  589. package/lib/esm/session/UserSessionProvider.js +0 -179
  590. package/lib/esm/session/UserSessionProvider.js.map +0 -1
  591. package/lib/esm/session/auth/composable.js +0 -255
  592. package/lib/esm/session/auth/composable.js.map +0 -1
  593. package/lib/esm/session/auth/firebase.js +0 -158
  594. package/lib/esm/session/auth/firebase.js.map +0 -1
  595. package/lib/esm/session/auth/useAuthState.js +0 -46
  596. package/lib/esm/session/auth/useAuthState.js.map +0 -1
  597. package/lib/esm/session/auth/useCurrentTenant.js +0 -63
  598. package/lib/esm/session/auth/useCurrentTenant.js.map +0 -1
  599. package/lib/esm/session/constants.js +0 -3
  600. package/lib/esm/session/constants.js.map +0 -1
  601. package/lib/esm/session/index.js +0 -8
  602. package/lib/esm/session/index.js.map +0 -1
  603. package/lib/esm/session/useUXTracking.js +0 -29
  604. package/lib/esm/session/useUXTracking.js.map +0 -1
  605. package/lib/esm/shell/SplashScreen.js +0 -26
  606. package/lib/esm/shell/SplashScreen.js.map +0 -1
  607. package/lib/esm/shell/VertesiaShell.js +0 -10
  608. package/lib/esm/shell/VertesiaShell.js.map +0 -1
  609. package/lib/esm/shell/apps/AppInstallationProvider.js +0 -13
  610. package/lib/esm/shell/apps/AppInstallationProvider.js.map +0 -1
  611. package/lib/esm/shell/apps/AppProjectSelector.js +0 -36
  612. package/lib/esm/shell/apps/AppProjectSelector.js.map +0 -1
  613. package/lib/esm/shell/apps/StandaloneApp.js +0 -60
  614. package/lib/esm/shell/apps/StandaloneApp.js.map +0 -1
  615. package/lib/esm/shell/apps/index.js +0 -4
  616. package/lib/esm/shell/apps/index.js.map +0 -1
  617. package/lib/esm/shell/index.js +0 -8
  618. package/lib/esm/shell/index.js.map +0 -1
  619. package/lib/esm/shell/login/EnterpriseSigninButton.js +0 -84
  620. package/lib/esm/shell/login/EnterpriseSigninButton.js.map +0 -1
  621. package/lib/esm/shell/login/GitHubSignInButton.js +0 -24
  622. package/lib/esm/shell/login/GitHubSignInButton.js.map +0 -1
  623. package/lib/esm/shell/login/GoogleSignInButton.js +0 -25
  624. package/lib/esm/shell/login/GoogleSignInButton.js.map +0 -1
  625. package/lib/esm/shell/login/InviteAcceptModal.js +0 -62
  626. package/lib/esm/shell/login/InviteAcceptModal.js.map +0 -1
  627. package/lib/esm/shell/login/MicrosoftSigninButton.js +0 -19
  628. package/lib/esm/shell/login/MicrosoftSigninButton.js.map +0 -1
  629. package/lib/esm/shell/login/PreviewIcon.js +0 -23
  630. package/lib/esm/shell/login/PreviewIcon.js.map +0 -1
  631. package/lib/esm/shell/login/SignInModal.js +0 -9
  632. package/lib/esm/shell/login/SignInModal.js.map +0 -1
  633. package/lib/esm/shell/login/SigninScreen.js +0 -64
  634. package/lib/esm/shell/login/SigninScreen.js.map +0 -1
  635. package/lib/esm/shell/login/SignupForm.js +0 -91
  636. package/lib/esm/shell/login/SignupForm.js.map +0 -1
  637. package/lib/esm/shell/login/TerminalLogin.js +0 -179
  638. package/lib/esm/shell/login/TerminalLogin.js.map +0 -1
  639. package/lib/esm/shell/login/UserInfo.js +0 -41
  640. package/lib/esm/shell/login/UserInfo.js.map +0 -1
  641. package/lib/esm/shell/login/UserSessionMenu.js +0 -37
  642. package/lib/esm/shell/login/UserSessionMenu.js.map +0 -1
  643. package/lib/esm/shell/utils.js +0 -6
  644. package/lib/esm/shell/utils.js.map +0 -1
  645. package/lib/esm/widgets/Progress.js +0 -5
  646. package/lib/esm/widgets/Progress.js.map +0 -1
  647. package/lib/esm/widgets/SvgIcon.js +0 -36
  648. package/lib/esm/widgets/SvgIcon.js.map +0 -1
  649. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js +0 -103
  650. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js.map +0 -1
  651. package/lib/esm/widgets/codemirror/CodemirrorStateSingleton.js +0 -33
  652. package/lib/esm/widgets/codemirror/CodemirrorStateSingleton.js.map +0 -1
  653. package/lib/esm/widgets/codemirror/MonacoEditor.js +0 -128
  654. package/lib/esm/widgets/codemirror/MonacoEditor.js.map +0 -1
  655. package/lib/esm/widgets/codemirror/index.js +0 -3
  656. package/lib/esm/widgets/codemirror/index.js.map +0 -1
  657. package/lib/esm/widgets/form/Form.js +0 -100
  658. package/lib/esm/widgets/form/Form.js.map +0 -1
  659. package/lib/esm/widgets/form/FormContext.js +0 -31
  660. package/lib/esm/widgets/form/FormContext.js.map +0 -1
  661. package/lib/esm/widgets/form/ManagedObject.js +0 -287
  662. package/lib/esm/widgets/form/ManagedObject.js.map +0 -1
  663. package/lib/esm/widgets/form/fields.js +0 -12
  664. package/lib/esm/widgets/form/fields.js.map +0 -1
  665. package/lib/esm/widgets/form/index.js +0 -7
  666. package/lib/esm/widgets/form/index.js.map +0 -1
  667. package/lib/esm/widgets/form/inputs.js +0 -38
  668. package/lib/esm/widgets/form/inputs.js.map +0 -1
  669. package/lib/esm/widgets/form/schema.js +0 -197
  670. package/lib/esm/widgets/form/schema.js.map +0 -1
  671. package/lib/esm/widgets/index.js +0 -12
  672. package/lib/esm/widgets/index.js.map +0 -1
  673. package/lib/esm/widgets/json-view/JSONCode.js +0 -157
  674. package/lib/esm/widgets/json-view/JSONCode.js.map +0 -1
  675. package/lib/esm/widgets/json-view/JSONDisplay.js +0 -10
  676. package/lib/esm/widgets/json-view/JSONDisplay.js.map +0 -1
  677. package/lib/esm/widgets/json-view/JSONView.js +0 -106
  678. package/lib/esm/widgets/json-view/JSONView.js.map +0 -1
  679. package/lib/esm/widgets/json-view/index.js +0 -4
  680. package/lib/esm/widgets/json-view/index.js.map +0 -1
  681. package/lib/esm/widgets/json-view/types.js +0 -2
  682. package/lib/esm/widgets/json-view/types.js.map +0 -1
  683. package/lib/esm/widgets/markdown/MarkdownRenderer.js +0 -246
  684. package/lib/esm/widgets/markdown/MarkdownRenderer.js.map +0 -1
  685. package/lib/esm/widgets/markdown/index.js +0 -2
  686. package/lib/esm/widgets/markdown/index.js.map +0 -1
  687. package/lib/esm/widgets/popover/Popover.js +0 -73
  688. package/lib/esm/widgets/popover/Popover.js.map +0 -1
  689. package/lib/esm/widgets/popover/context.js +0 -7
  690. package/lib/esm/widgets/popover/context.js.map +0 -1
  691. package/lib/esm/widgets/popover/index.js +0 -3
  692. package/lib/esm/widgets/popover/index.js.map +0 -1
  693. package/lib/esm/widgets/popover/slots.js +0 -22
  694. package/lib/esm/widgets/popover/slots.js.map +0 -1
  695. package/lib/esm/widgets/properties/PropertiesView.js +0 -8
  696. package/lib/esm/widgets/properties/PropertiesView.js.map +0 -1
  697. package/lib/esm/widgets/properties/index.js +0 -2
  698. package/lib/esm/widgets/properties/index.js.map +0 -1
  699. package/lib/esm/widgets/schema-editor/ManagedSchema.js +0 -300
  700. package/lib/esm/widgets/schema-editor/ManagedSchema.js.map +0 -1
  701. package/lib/esm/widgets/schema-editor/editor/Editable.js +0 -110
  702. package/lib/esm/widgets/schema-editor/editor/Editable.js.map +0 -1
  703. package/lib/esm/widgets/schema-editor/editor/EditableSchemaProperty.js +0 -8
  704. package/lib/esm/widgets/schema-editor/editor/EditableSchemaProperty.js.map +0 -1
  705. package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js +0 -81
  706. package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js.map +0 -1
  707. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js +0 -7
  708. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js.map +0 -1
  709. package/lib/esm/widgets/schema-editor/editor/SchemaContext.js +0 -9
  710. package/lib/esm/widgets/schema-editor/editor/SchemaContext.js.map +0 -1
  711. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +0 -84
  712. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +0 -1
  713. package/lib/esm/widgets/schema-editor/index.js +0 -7
  714. package/lib/esm/widgets/schema-editor/index.js.map +0 -1
  715. package/lib/esm/widgets/schema-editor/json-schema4-utils.js +0 -188
  716. package/lib/esm/widgets/schema-editor/json-schema4-utils.js.map +0 -1
  717. package/lib/esm/widgets/schema-editor/type-signature.js +0 -30
  718. package/lib/esm/widgets/schema-editor/type-signature.js.map +0 -1
  719. package/lib/esm/widgets/upload/DropZone.js +0 -175
  720. package/lib/esm/widgets/upload/DropZone.js.map +0 -1
  721. package/lib/esm/widgets/upload/UploadResultCategory.js +0 -19
  722. package/lib/esm/widgets/upload/UploadResultCategory.js.map +0 -1
  723. package/lib/esm/widgets/upload/UploadSummary.js +0 -30
  724. package/lib/esm/widgets/upload/UploadSummary.js.map +0 -1
  725. package/lib/esm/widgets/upload/index.js +0 -4
  726. package/lib/esm/widgets/upload/index.js.map +0 -1
  727. package/lib/esm/widgets/xml-viewer/components/Attributes/index.js +0 -11
  728. package/lib/esm/widgets/xml-viewer/components/Attributes/index.js.map +0 -1
  729. package/lib/esm/widgets/xml-viewer/components/CDataTag/index.js +0 -8
  730. package/lib/esm/widgets/xml-viewer/components/CDataTag/index.js.map +0 -1
  731. package/lib/esm/widgets/xml-viewer/components/CollapseIcon/index.js +0 -11
  732. package/lib/esm/widgets/xml-viewer/components/CollapseIcon/index.js.map +0 -1
  733. package/lib/esm/widgets/xml-viewer/components/CommentTag/index.js +0 -11
  734. package/lib/esm/widgets/xml-viewer/components/CommentTag/index.js.map +0 -1
  735. package/lib/esm/widgets/xml-viewer/components/DeclarationTag/index.js +0 -9
  736. package/lib/esm/widgets/xml-viewer/components/DeclarationTag/index.js.map +0 -1
  737. package/lib/esm/widgets/xml-viewer/components/Elements/index.js +0 -36
  738. package/lib/esm/widgets/xml-viewer/components/Elements/index.js.map +0 -1
  739. package/lib/esm/widgets/xml-viewer/components/InvalidXml/index.js +0 -5
  740. package/lib/esm/widgets/xml-viewer/components/InvalidXml/index.js.map +0 -1
  741. package/lib/esm/widgets/xml-viewer/components/Tag/index.js +0 -13
  742. package/lib/esm/widgets/xml-viewer/components/Tag/index.js.map +0 -1
  743. package/lib/esm/widgets/xml-viewer/components/TextElement/index.js +0 -13
  744. package/lib/esm/widgets/xml-viewer/components/TextElement/index.js.map +0 -1
  745. package/lib/esm/widgets/xml-viewer/components/XMLViewer.js +0 -39
  746. package/lib/esm/widgets/xml-viewer/components/XMLViewer.js.map +0 -1
  747. package/lib/esm/widgets/xml-viewer/components/types.js +0 -2
  748. package/lib/esm/widgets/xml-viewer/components/types.js.map +0 -1
  749. package/lib/esm/widgets/xml-viewer/constants/index.js +0 -27
  750. package/lib/esm/widgets/xml-viewer/constants/index.js.map +0 -1
  751. package/lib/esm/widgets/xml-viewer/context/xml-viewer-context.js +0 -10
  752. package/lib/esm/widgets/xml-viewer/context/xml-viewer-context.js.map +0 -1
  753. package/lib/esm/widgets/xml-viewer/helpers/index.js +0 -40
  754. package/lib/esm/widgets/xml-viewer/helpers/index.js.map +0 -1
  755. package/lib/esm/widgets/xml-viewer/hooks/useCollapsible.js +0 -22
  756. package/lib/esm/widgets/xml-viewer/hooks/useCollapsible.js.map +0 -1
  757. package/lib/esm/widgets/xml-viewer/hooks/useXMLViewer.js +0 -31
  758. package/lib/esm/widgets/xml-viewer/hooks/useXMLViewer.js.map +0 -1
  759. package/lib/esm/widgets/xml-viewer/index.js +0 -3
  760. package/lib/esm/widgets/xml-viewer/index.js.map +0 -1
  761. package/lib/esm/widgets/xml-viewer/types/index.js +0 -2
  762. package/lib/esm/widgets/xml-viewer/types/index.js.map +0 -1
  763. package/lib/tsconfig.tsbuildinfo +0 -1
  764. package/lib/types/core/components/Avatar.d.ts +0 -16
  765. package/lib/types/core/components/Avatar.d.ts.map +0 -1
  766. package/lib/types/core/components/Badge.d.ts +0 -21
  767. package/lib/types/core/components/Badge.d.ts.map +0 -1
  768. package/lib/types/core/components/Button.d.ts +0 -14
  769. package/lib/types/core/components/Button.d.ts.map +0 -1
  770. package/lib/types/core/components/Center.d.ts +0 -8
  771. package/lib/types/core/components/Center.d.ts.map +0 -1
  772. package/lib/types/core/components/ComboBox.d.ts +0 -124
  773. package/lib/types/core/components/ComboBox.d.ts.map +0 -1
  774. package/lib/types/core/components/ConfirmModal.d.ts +0 -11
  775. package/lib/types/core/components/ConfirmModal.d.ts.map +0 -1
  776. package/lib/types/core/components/DeleteModal.d.ts +0 -11
  777. package/lib/types/core/components/DeleteModal.d.ts.map +0 -1
  778. package/lib/types/core/components/Divider.d.ts +0 -6
  779. package/lib/types/core/components/Divider.d.ts.map +0 -1
  780. package/lib/types/core/components/Dropdown.d.ts +0 -15
  781. package/lib/types/core/components/Dropdown.d.ts.map +0 -1
  782. package/lib/types/core/components/DropdownList.d.ts +0 -13
  783. package/lib/types/core/components/DropdownList.d.ts.map +0 -1
  784. package/lib/types/core/components/EmptyCollection.d.ts +0 -9
  785. package/lib/types/core/components/EmptyCollection.d.ts.map +0 -1
  786. package/lib/types/core/components/FileUpload.d.ts +0 -29
  787. package/lib/types/core/components/FileUpload.d.ts.map +0 -1
  788. package/lib/types/core/components/FormItem.d.ts +0 -13
  789. package/lib/types/core/components/FormItem.d.ts.map +0 -1
  790. package/lib/types/core/components/InputList.d.ts +0 -12
  791. package/lib/types/core/components/InputList.d.ts.map +0 -1
  792. package/lib/types/core/components/Link.d.ts +0 -7
  793. package/lib/types/core/components/Link.d.ts.map +0 -1
  794. package/lib/types/core/components/MenuList.d.ts +0 -14
  795. package/lib/types/core/components/MenuList.d.ts.map +0 -1
  796. package/lib/types/core/components/MessageBox.d.ts +0 -36
  797. package/lib/types/core/components/MessageBox.d.ts.map +0 -1
  798. package/lib/types/core/components/Modal.d.ts +0 -30
  799. package/lib/types/core/components/Modal.d.ts.map +0 -1
  800. package/lib/types/core/components/NumberInput.d.ts +0 -16
  801. package/lib/types/core/components/NumberInput.d.ts.map +0 -1
  802. package/lib/types/core/components/Overlay.d.ts +0 -25
  803. package/lib/types/core/components/Overlay.d.ts.map +0 -1
  804. package/lib/types/core/components/Panel.d.ts +0 -11
  805. package/lib/types/core/components/Panel.d.ts.map +0 -1
  806. package/lib/types/core/components/Portal.d.ts +0 -6
  807. package/lib/types/core/components/Portal.d.ts.map +0 -1
  808. package/lib/types/core/components/RadioGroup.d.ts +0 -26
  809. package/lib/types/core/components/RadioGroup.d.ts.map +0 -1
  810. package/lib/types/core/components/SelectBox.d.ts +0 -36
  811. package/lib/types/core/components/SelectBox.d.ts.map +0 -1
  812. package/lib/types/core/components/SelectList.d.ts +0 -19
  813. package/lib/types/core/components/SelectList.d.ts.map +0 -1
  814. package/lib/types/core/components/SelectStack.d.ts +0 -13
  815. package/lib/types/core/components/SelectStack.d.ts.map +0 -1
  816. package/lib/types/core/components/SidePanel.d.ts +0 -11
  817. package/lib/types/core/components/SidePanel.d.ts.map +0 -1
  818. package/lib/types/core/components/Spinner.d.ts +0 -7
  819. package/lib/types/core/components/Spinner.d.ts.map +0 -1
  820. package/lib/types/core/components/Switch.d.ts +0 -11
  821. package/lib/types/core/components/Switch.d.ts.map +0 -1
  822. package/lib/types/core/components/TagsInput.d.ts +0 -16
  823. package/lib/types/core/components/TagsInput.d.ts.map +0 -1
  824. package/lib/types/core/components/index.d.ts +0 -40
  825. package/lib/types/core/components/index.d.ts.map +0 -1
  826. package/lib/types/core/components/libs/utils.d.ts +0 -3
  827. package/lib/types/core/components/libs/utils.d.ts.map +0 -1
  828. package/lib/types/core/components/libs/visuallyHidden.d.ts +0 -7
  829. package/lib/types/core/components/libs/visuallyHidden.d.ts.map +0 -1
  830. package/lib/types/core/components/popup/Popup.d.ts +0 -26
  831. package/lib/types/core/components/popup/Popup.d.ts.map +0 -1
  832. package/lib/types/core/components/popup/PopupController.d.ts +0 -41
  833. package/lib/types/core/components/popup/PopupController.d.ts.map +0 -1
  834. package/lib/types/core/components/popup/index.d.ts +0 -4
  835. package/lib/types/core/components/popup/index.d.ts.map +0 -1
  836. package/lib/types/core/components/popup/position.d.ts +0 -59
  837. package/lib/types/core/components/popup/position.d.ts.map +0 -1
  838. package/lib/types/core/components/popup/utils.d.ts +0 -30
  839. package/lib/types/core/components/popup/utils.d.ts.map +0 -1
  840. package/lib/types/core/components/shadcn/breadcrumb.d.ts +0 -15
  841. package/lib/types/core/components/shadcn/breadcrumb.d.ts.map +0 -1
  842. package/lib/types/core/components/shadcn/button.d.ts +0 -27
  843. package/lib/types/core/components/shadcn/button.d.ts.map +0 -1
  844. package/lib/types/core/components/shadcn/calendar.d.ts +0 -11
  845. package/lib/types/core/components/shadcn/calendar.d.ts.map +0 -1
  846. package/lib/types/core/components/shadcn/card.d.ts +0 -9
  847. package/lib/types/core/components/shadcn/card.d.ts.map +0 -1
  848. package/lib/types/core/components/shadcn/checkbox.d.ts +0 -5
  849. package/lib/types/core/components/shadcn/checkbox.d.ts.map +0 -1
  850. package/lib/types/core/components/shadcn/command.d.ts +0 -17
  851. package/lib/types/core/components/shadcn/command.d.ts.map +0 -1
  852. package/lib/types/core/components/shadcn/dialog.d.ts +0 -38
  853. package/lib/types/core/components/shadcn/dialog.d.ts.map +0 -1
  854. package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts +0 -9
  855. package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts.map +0 -1
  856. package/lib/types/core/components/shadcn/filters/animateChangeInHeight.d.ts +0 -7
  857. package/lib/types/core/components/shadcn/filters/animateChangeInHeight.d.ts.map +0 -1
  858. package/lib/types/core/components/shadcn/filters/comboBox/DateCombobox.d.ts +0 -6
  859. package/lib/types/core/components/shadcn/filters/comboBox/DateCombobox.d.ts.map +0 -1
  860. package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts +0 -9
  861. package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts.map +0 -1
  862. package/lib/types/core/components/shadcn/filters/comboBox/StringListCombobox.d.ts +0 -6
  863. package/lib/types/core/components/shadcn/filters/comboBox/StringListCombobox.d.ts.map +0 -1
  864. package/lib/types/core/components/shadcn/filters/comboBox/TextCombobox.d.ts +0 -6
  865. package/lib/types/core/components/shadcn/filters/comboBox/TextCombobox.d.ts.map +0 -1
  866. package/lib/types/core/components/shadcn/filters/comboBox/comboBox.d.ts +0 -5
  867. package/lib/types/core/components/shadcn/filters/comboBox/comboBox.d.ts.map +0 -1
  868. package/lib/types/core/components/shadcn/filters/filter/SelectFilter.d.ts +0 -12
  869. package/lib/types/core/components/shadcn/filters/filter/SelectFilter.d.ts.map +0 -1
  870. package/lib/types/core/components/shadcn/filters/filter/StringListFilter.d.ts +0 -11
  871. package/lib/types/core/components/shadcn/filters/filter/StringListFilter.d.ts.map +0 -1
  872. package/lib/types/core/components/shadcn/filters/filter/TextFilter.d.ts +0 -13
  873. package/lib/types/core/components/shadcn/filters/filter/TextFilter.d.ts.map +0 -1
  874. package/lib/types/core/components/shadcn/filters/filter/dateFilter.d.ts +0 -14
  875. package/lib/types/core/components/shadcn/filters/filter/dateFilter.d.ts.map +0 -1
  876. package/lib/types/core/components/shadcn/filters/filter-styles.d.ts +0 -2
  877. package/lib/types/core/components/shadcn/filters/filter-styles.d.ts.map +0 -1
  878. package/lib/types/core/components/shadcn/filters/filterBar.d.ts +0 -20
  879. package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +0 -1
  880. package/lib/types/core/components/shadcn/filters/filters.d.ts +0 -10
  881. package/lib/types/core/components/shadcn/filters/filters.d.ts.map +0 -1
  882. package/lib/types/core/components/shadcn/filters/index.d.ts +0 -6
  883. package/lib/types/core/components/shadcn/filters/index.d.ts.map +0 -1
  884. package/lib/types/core/components/shadcn/filters/types.d.ts +0 -35
  885. package/lib/types/core/components/shadcn/filters/types.d.ts.map +0 -1
  886. package/lib/types/core/components/shadcn/heading.d.ts +0 -6
  887. package/lib/types/core/components/shadcn/heading.d.ts.map +0 -1
  888. package/lib/types/core/components/shadcn/index.d.ts +0 -23
  889. package/lib/types/core/components/shadcn/index.d.ts.map +0 -1
  890. package/lib/types/core/components/shadcn/input.d.ts +0 -17
  891. package/lib/types/core/components/shadcn/input.d.ts.map +0 -1
  892. package/lib/types/core/components/shadcn/label.d.ts +0 -8
  893. package/lib/types/core/components/shadcn/label.d.ts.map +0 -1
  894. package/lib/types/core/components/shadcn/popover.d.ts +0 -24
  895. package/lib/types/core/components/shadcn/popover.d.ts.map +0 -1
  896. package/lib/types/core/components/shadcn/resizeable.d.ts +0 -9
  897. package/lib/types/core/components/shadcn/resizeable.d.ts.map +0 -1
  898. package/lib/types/core/components/shadcn/selectBox.d.ts +0 -36
  899. package/lib/types/core/components/shadcn/selectBox.d.ts.map +0 -1
  900. package/lib/types/core/components/shadcn/separator.d.ts +0 -5
  901. package/lib/types/core/components/shadcn/separator.d.ts.map +0 -1
  902. package/lib/types/core/components/shadcn/tabs.d.ts +0 -33
  903. package/lib/types/core/components/shadcn/tabs.d.ts.map +0 -1
  904. package/lib/types/core/components/shadcn/text.d.ts +0 -11
  905. package/lib/types/core/components/shadcn/text.d.ts.map +0 -1
  906. package/lib/types/core/components/shadcn/textarea.d.ts +0 -4
  907. package/lib/types/core/components/shadcn/textarea.d.ts.map +0 -1
  908. package/lib/types/core/components/shadcn/theme/ThemeProvider.d.ts +0 -15
  909. package/lib/types/core/components/shadcn/theme/ThemeProvider.d.ts.map +0 -1
  910. package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts +0 -10
  911. package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts.map +0 -1
  912. package/lib/types/core/components/shadcn/tooltip.d.ts +0 -20
  913. package/lib/types/core/components/shadcn/tooltip.d.ts.map +0 -1
  914. package/lib/types/core/components/styles.d.ts +0 -7
  915. package/lib/types/core/components/styles.d.ts.map +0 -1
  916. package/lib/types/core/components/table/index.d.ts +0 -19
  917. package/lib/types/core/components/table/index.d.ts.map +0 -1
  918. package/lib/types/core/components/tabs/Tabs.d.ts +0 -25
  919. package/lib/types/core/components/tabs/Tabs.d.ts.map +0 -1
  920. package/lib/types/core/components/tabs/TabsContext.d.ts +0 -17
  921. package/lib/types/core/components/tabs/TabsContext.d.ts.map +0 -1
  922. package/lib/types/core/components/tabs/index.d.ts +0 -3
  923. package/lib/types/core/components/tabs/index.d.ts.map +0 -1
  924. package/lib/types/core/components/toast/NotificationPanel.d.ts +0 -8
  925. package/lib/types/core/components/toast/NotificationPanel.d.ts.map +0 -1
  926. package/lib/types/core/components/toast/ToastContext.d.ts +0 -6
  927. package/lib/types/core/components/toast/ToastContext.d.ts.map +0 -1
  928. package/lib/types/core/components/toast/ToastProps.d.ts +0 -7
  929. package/lib/types/core/components/toast/ToastProps.d.ts.map +0 -1
  930. package/lib/types/core/components/toast/ToastProvider.d.ts +0 -6
  931. package/lib/types/core/components/toast/ToastProvider.d.ts.map +0 -1
  932. package/lib/types/core/components/toast/index.d.ts +0 -3
  933. package/lib/types/core/components/toast/index.d.ts.map +0 -1
  934. package/lib/types/core/hooks/CompositeState.d.ts +0 -137
  935. package/lib/types/core/hooks/CompositeState.d.ts.map +0 -1
  936. package/lib/types/core/hooks/PortalContainerProvider.d.ts +0 -7
  937. package/lib/types/core/hooks/PortalContainerProvider.d.ts.map +0 -1
  938. package/lib/types/core/hooks/SharedState.d.ts +0 -10
  939. package/lib/types/core/hooks/SharedState.d.ts.map +0 -1
  940. package/lib/types/core/hooks/index.d.ts +0 -16
  941. package/lib/types/core/hooks/index.d.ts.map +0 -1
  942. package/lib/types/core/hooks/useClickOutside.d.ts +0 -8
  943. package/lib/types/core/hooks/useClickOutside.d.ts.map +0 -1
  944. package/lib/types/core/hooks/useCopyToClipboard.d.ts +0 -5
  945. package/lib/types/core/hooks/useCopyToClipboard.d.ts.map +0 -1
  946. package/lib/types/core/hooks/useDarkMode.d.ts +0 -2
  947. package/lib/types/core/hooks/useDarkMode.d.ts.map +0 -1
  948. package/lib/types/core/hooks/useDebounce.d.ts +0 -2
  949. package/lib/types/core/hooks/useDebounce.d.ts.map +0 -1
  950. package/lib/types/core/hooks/useEventSource.d.ts +0 -2
  951. package/lib/types/core/hooks/useEventSource.d.ts.map +0 -1
  952. package/lib/types/core/hooks/useFetch.d.ts +0 -24
  953. package/lib/types/core/hooks/useFetch.d.ts.map +0 -1
  954. package/lib/types/core/hooks/useFlag.d.ts +0 -9
  955. package/lib/types/core/hooks/useFlag.d.ts.map +0 -1
  956. package/lib/types/core/hooks/useIntersectionObserver.d.ts +0 -14
  957. package/lib/types/core/hooks/useIntersectionObserver.d.ts.map +0 -1
  958. package/lib/types/core/hooks/useIsFistRendering.d.ts +0 -2
  959. package/lib/types/core/hooks/useIsFistRendering.d.ts.map +0 -1
  960. package/lib/types/core/hooks/useSafeLayoutEffect.d.ts +0 -4
  961. package/lib/types/core/hooks/useSafeLayoutEffect.d.ts.map +0 -1
  962. package/lib/types/core/hooks/useScrollableSearch.d.ts +0 -82
  963. package/lib/types/core/hooks/useScrollableSearch.d.ts.map +0 -1
  964. package/lib/types/core/hooks/useSharedValue.d.ts +0 -12
  965. package/lib/types/core/hooks/useSharedValue.d.ts.map +0 -1
  966. package/lib/types/core/index.d.ts +0 -4
  967. package/lib/types/core/index.d.ts.map +0 -1
  968. package/lib/types/core/utils/cn.d.ts +0 -3
  969. package/lib/types/core/utils/cn.d.ts.map +0 -1
  970. package/lib/types/core/utils/index.d.ts +0 -2
  971. package/lib/types/core/utils/index.d.ts.map +0 -1
  972. package/lib/types/env/index.d.ts +0 -76
  973. package/lib/types/env/index.d.ts.map +0 -1
  974. package/lib/types/features/activity-doc/ActivityDoc.d.ts +0 -14
  975. package/lib/types/features/activity-doc/ActivityDoc.d.ts.map +0 -1
  976. package/lib/types/features/activity-doc/index.d.ts +0 -2
  977. package/lib/types/features/activity-doc/index.d.ts.map +0 -1
  978. package/lib/types/features/agent/PayloadBuilder.d.ts +0 -65
  979. package/lib/types/features/agent/PayloadBuilder.d.ts.map +0 -1
  980. package/lib/types/features/agent/chat/AgentChart.d.ts +0 -48
  981. package/lib/types/features/agent/chat/AgentChart.d.ts.map +0 -1
  982. package/lib/types/features/agent/chat/AnimatedThinkingDots.d.ts +0 -38
  983. package/lib/types/features/agent/chat/AnimatedThinkingDots.d.ts.map +0 -1
  984. package/lib/types/features/agent/chat/JumpingDots.d.ts +0 -7
  985. package/lib/types/features/agent/chat/JumpingDots.d.ts.map +0 -1
  986. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +0 -25
  987. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +0 -1
  988. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +0 -23
  989. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +0 -1
  990. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +0 -20
  991. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +0 -1
  992. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.d.ts +0 -11
  993. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.d.ts.map +0 -1
  994. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts +0 -18
  995. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts.map +0 -1
  996. package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +0 -11
  997. package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +0 -1
  998. package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +0 -8
  999. package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +0 -1
  1000. package/lib/types/features/agent/chat/ModernAgentOutput/MessagesContainer.d.ts +0 -10
  1001. package/lib/types/features/agent/chat/ModernAgentOutput/MessagesContainer.d.ts.map +0 -1
  1002. package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts +0 -9
  1003. package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +0 -1
  1004. package/lib/types/features/agent/chat/ModernAgentOutput/SlideInPanel.d.ts +0 -11
  1005. package/lib/types/features/agent/chat/ModernAgentOutput/SlideInPanel.d.ts.map +0 -1
  1006. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts +0 -8
  1007. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts.map +0 -1
  1008. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts +0 -10
  1009. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts.map +0 -1
  1010. package/lib/types/features/agent/chat/ModernAgentOutput/StackedMessages.d.ts +0 -8
  1011. package/lib/types/features/agent/chat/ModernAgentOutput/StackedMessages.d.ts.map +0 -1
  1012. package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts +0 -22
  1013. package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +0 -1
  1014. package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +0 -25
  1015. package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts.map +0 -1
  1016. package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts +0 -18
  1017. package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts.map +0 -1
  1018. package/lib/types/features/agent/chat/WaitingMessages.d.ts +0 -2
  1019. package/lib/types/features/agent/chat/WaitingMessages.d.ts.map +0 -1
  1020. package/lib/types/features/agent/chat/index.d.ts +0 -6
  1021. package/lib/types/features/agent/chat/index.d.ts.map +0 -1
  1022. package/lib/types/features/agent/createChartTool.d.ts +0 -178
  1023. package/lib/types/features/agent/createChartTool.d.ts.map +0 -1
  1024. package/lib/types/features/agent/examples.d.ts +0 -59
  1025. package/lib/types/features/agent/examples.d.ts.map +0 -1
  1026. package/lib/types/features/agent/index.d.ts +0 -5
  1027. package/lib/types/features/agent/index.d.ts.map +0 -1
  1028. package/lib/types/features/agent/visualization.d.ts +0 -95
  1029. package/lib/types/features/agent/visualization.d.ts.map +0 -1
  1030. package/lib/types/features/errors/PanelErrorBoundary.d.ts +0 -5
  1031. package/lib/types/features/errors/PanelErrorBoundary.d.ts.map +0 -1
  1032. package/lib/types/features/errors/RowErrorBoundary.d.ts +0 -8
  1033. package/lib/types/features/errors/RowErrorBoundary.d.ts.map +0 -1
  1034. package/lib/types/features/errors/VertesiaErrorBoundary.d.ts +0 -12
  1035. package/lib/types/features/errors/VertesiaErrorBoundary.d.ts.map +0 -1
  1036. package/lib/types/features/errors/WidgetErrorBoundary.d.ts +0 -5
  1037. package/lib/types/features/errors/WidgetErrorBoundary.d.ts.map +0 -1
  1038. package/lib/types/features/errors/index.d.ts +0 -5
  1039. package/lib/types/features/errors/index.d.ts.map +0 -1
  1040. package/lib/types/features/facets/CollectionsFacetsNav.d.ts +0 -14
  1041. package/lib/types/features/facets/CollectionsFacetsNav.d.ts.map +0 -1
  1042. package/lib/types/features/facets/DocumentsFacetsNav.d.ts +0 -17
  1043. package/lib/types/features/facets/DocumentsFacetsNav.d.ts.map +0 -1
  1044. package/lib/types/features/facets/EnvironmentFacet.d.ts +0 -10
  1045. package/lib/types/features/facets/EnvironmentFacet.d.ts.map +0 -1
  1046. package/lib/types/features/facets/InteractionsFacetsNav.d.ts +0 -14
  1047. package/lib/types/features/facets/InteractionsFacetsNav.d.ts.map +0 -1
  1048. package/lib/types/features/facets/PromptsFacetsNav.d.ts +0 -15
  1049. package/lib/types/features/facets/PromptsFacetsNav.d.ts.map +0 -1
  1050. package/lib/types/features/facets/RunsFacetsNav.d.ts +0 -20
  1051. package/lib/types/features/facets/RunsFacetsNav.d.ts.map +0 -1
  1052. package/lib/types/features/facets/WorkflowExecutionsFacetsNav.d.ts +0 -14
  1053. package/lib/types/features/facets/WorkflowExecutionsFacetsNav.d.ts.map +0 -1
  1054. package/lib/types/features/facets/index.d.ts +0 -15
  1055. package/lib/types/features/facets/index.d.ts.map +0 -1
  1056. package/lib/types/features/facets/utils/SearchInterface.d.ts +0 -14
  1057. package/lib/types/features/facets/utils/SearchInterface.d.ts.map +0 -1
  1058. package/lib/types/features/facets/utils/StringFacet.d.ts +0 -11
  1059. package/lib/types/features/facets/utils/StringFacet.d.ts.map +0 -1
  1060. package/lib/types/features/facets/utils/StringListFacet.d.ts +0 -11
  1061. package/lib/types/features/facets/utils/StringListFacet.d.ts.map +0 -1
  1062. package/lib/types/features/facets/utils/TypeFacet.d.ts +0 -16
  1063. package/lib/types/features/facets/utils/TypeFacet.d.ts.map +0 -1
  1064. package/lib/types/features/facets/utils/VEnvironmentFacet.d.ts +0 -12
  1065. package/lib/types/features/facets/utils/VEnvironmentFacet.d.ts.map +0 -1
  1066. package/lib/types/features/facets/utils/VInteractionFacet.d.ts +0 -15
  1067. package/lib/types/features/facets/utils/VInteractionFacet.d.ts.map +0 -1
  1068. package/lib/types/features/facets/utils/VStringFacet.d.ts +0 -21
  1069. package/lib/types/features/facets/utils/VStringFacet.d.ts.map +0 -1
  1070. package/lib/types/features/facets/utils/VTypeFacet.d.ts +0 -12
  1071. package/lib/types/features/facets/utils/VTypeFacet.d.ts.map +0 -1
  1072. package/lib/types/features/facets/utils/VUserFacet.d.ts +0 -11
  1073. package/lib/types/features/facets/utils/VUserFacet.d.ts.map +0 -1
  1074. package/lib/types/features/facets/utils/utils.d.ts +0 -4
  1075. package/lib/types/features/facets/utils/utils.d.ts.map +0 -1
  1076. package/lib/types/features/index.d.ts +0 -12
  1077. package/lib/types/features/index.d.ts.map +0 -1
  1078. package/lib/types/features/layout/GenericPageNavHeader.d.ts +0 -14
  1079. package/lib/types/features/layout/GenericPageNavHeader.d.ts.map +0 -1
  1080. package/lib/types/features/layout/NotFoundView.d.ts +0 -5
  1081. package/lib/types/features/layout/NotFoundView.d.ts.map +0 -1
  1082. package/lib/types/features/layout/index.d.ts +0 -3
  1083. package/lib/types/features/layout/index.d.ts.map +0 -1
  1084. package/lib/types/features/magic-pdf/AnnotatedImageSlider.d.ts +0 -13
  1085. package/lib/types/features/magic-pdf/AnnotatedImageSlider.d.ts.map +0 -1
  1086. package/lib/types/features/magic-pdf/DownloadPopover.d.ts +0 -7
  1087. package/lib/types/features/magic-pdf/DownloadPopover.d.ts.map +0 -1
  1088. package/lib/types/features/magic-pdf/ExtractedContentView.d.ts +0 -8
  1089. package/lib/types/features/magic-pdf/ExtractedContentView.d.ts.map +0 -1
  1090. package/lib/types/features/magic-pdf/MagicPdfProvider.d.ts +0 -58
  1091. package/lib/types/features/magic-pdf/MagicPdfProvider.d.ts.map +0 -1
  1092. package/lib/types/features/magic-pdf/MagicPdfView.d.ts +0 -7
  1093. package/lib/types/features/magic-pdf/MagicPdfView.d.ts.map +0 -1
  1094. package/lib/types/features/magic-pdf/index.d.ts +0 -2
  1095. package/lib/types/features/magic-pdf/index.d.ts.map +0 -1
  1096. package/lib/types/features/magic-pdf/types.d.ts +0 -2
  1097. package/lib/types/features/magic-pdf/types.d.ts.map +0 -1
  1098. package/lib/types/features/pdf-viewer/PdfPageRenderer.d.ts +0 -83
  1099. package/lib/types/features/pdf-viewer/PdfPageRenderer.d.ts.map +0 -1
  1100. package/lib/types/features/pdf-viewer/PdfPageSlider.d.ts +0 -29
  1101. package/lib/types/features/pdf-viewer/PdfPageSlider.d.ts.map +0 -1
  1102. package/lib/types/features/pdf-viewer/SimplePdfViewer.d.ts +0 -19
  1103. package/lib/types/features/pdf-viewer/SimplePdfViewer.d.ts.map +0 -1
  1104. package/lib/types/features/pdf-viewer/index.d.ts +0 -4
  1105. package/lib/types/features/pdf-viewer/index.d.ts.map +0 -1
  1106. package/lib/types/features/permissions/SecureButton.d.ts +0 -8
  1107. package/lib/types/features/permissions/SecureButton.d.ts.map +0 -1
  1108. package/lib/types/features/permissions/SecureSidebarItem.d.ts +0 -8
  1109. package/lib/types/features/permissions/SecureSidebarItem.d.ts.map +0 -1
  1110. package/lib/types/features/permissions/UserPermissionsProvider.d.ts +0 -21
  1111. package/lib/types/features/permissions/UserPermissionsProvider.d.ts.map +0 -1
  1112. package/lib/types/features/permissions/helpers.d.ts +0 -5
  1113. package/lib/types/features/permissions/helpers.d.ts.map +0 -1
  1114. package/lib/types/features/permissions/index.d.ts +0 -5
  1115. package/lib/types/features/permissions/index.d.ts.map +0 -1
  1116. package/lib/types/features/store/collections/BrowseCollectionView.d.ts +0 -7
  1117. package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +0 -1
  1118. package/lib/types/features/store/collections/CollectionsTable.d.ts +0 -6
  1119. package/lib/types/features/store/collections/CollectionsTable.d.ts.map +0 -1
  1120. package/lib/types/features/store/collections/CreateCollection.d.ts +0 -13
  1121. package/lib/types/features/store/collections/CreateCollection.d.ts.map +0 -1
  1122. package/lib/types/features/store/collections/EditCollectionView.d.ts +0 -8
  1123. package/lib/types/features/store/collections/EditCollectionView.d.ts.map +0 -1
  1124. package/lib/types/features/store/collections/SelectCollection.d.ts +0 -20
  1125. package/lib/types/features/store/collections/SelectCollection.d.ts.map +0 -1
  1126. package/lib/types/features/store/collections/SharedPropsEditor.d.ts +0 -7
  1127. package/lib/types/features/store/collections/SharedPropsEditor.d.ts.map +0 -1
  1128. package/lib/types/features/store/collections/SyncMemberHeadsToggle.d.ts +0 -7
  1129. package/lib/types/features/store/collections/SyncMemberHeadsToggle.d.ts.map +0 -1
  1130. package/lib/types/features/store/collections/index.d.ts +0 -8
  1131. package/lib/types/features/store/collections/index.d.ts.map +0 -1
  1132. package/lib/types/features/store/index.d.ts +0 -4
  1133. package/lib/types/features/store/index.d.ts.map +0 -1
  1134. package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts +0 -8
  1135. package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts.map +0 -1
  1136. package/lib/types/features/store/objects/DocumentSearchResults.d.ts +0 -20
  1137. package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +0 -1
  1138. package/lib/types/features/store/objects/DocumentSelectionProvider.d.ts +0 -33
  1139. package/lib/types/features/store/objects/DocumentSelectionProvider.d.ts.map +0 -1
  1140. package/lib/types/features/store/objects/DocumentTable.d.ts +0 -25
  1141. package/lib/types/features/store/objects/DocumentTable.d.ts.map +0 -1
  1142. package/lib/types/features/store/objects/ExportPropertiesModal.d.ts +0 -12
  1143. package/lib/types/features/store/objects/ExportPropertiesModal.d.ts.map +0 -1
  1144. package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts +0 -9
  1145. package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts.map +0 -1
  1146. package/lib/types/features/store/objects/components/ContentOverview.d.ts +0 -9
  1147. package/lib/types/features/store/objects/components/ContentOverview.d.ts.map +0 -1
  1148. package/lib/types/features/store/objects/components/DocumentIcon.d.ts +0 -18
  1149. package/lib/types/features/store/objects/components/DocumentIcon.d.ts.map +0 -1
  1150. package/lib/types/features/store/objects/components/DocumentInput.d.ts +0 -8
  1151. package/lib/types/features/store/objects/components/DocumentInput.d.ts.map +0 -1
  1152. package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts +0 -9
  1153. package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts.map +0 -1
  1154. package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts +0 -9
  1155. package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts.map +0 -1
  1156. package/lib/types/features/store/objects/components/SelectDocument.d.ts +0 -9
  1157. package/lib/types/features/store/objects/components/SelectDocument.d.ts.map +0 -1
  1158. package/lib/types/features/store/objects/components/SelectDocumentModal.d.ts +0 -9
  1159. package/lib/types/features/store/objects/components/SelectDocumentModal.d.ts.map +0 -1
  1160. package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts +0 -12
  1161. package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts.map +0 -1
  1162. package/lib/types/features/store/objects/components/index.d.ts +0 -10
  1163. package/lib/types/features/store/objects/components/index.d.ts.map +0 -1
  1164. package/lib/types/features/store/objects/components/useContentPanelHooks.d.ts +0 -30
  1165. package/lib/types/features/store/objects/components/useContentPanelHooks.d.ts.map +0 -1
  1166. package/lib/types/features/store/objects/components/useDownloadObject.d.ts +0 -4
  1167. package/lib/types/features/store/objects/components/useDownloadObject.d.ts.map +0 -1
  1168. package/lib/types/features/store/objects/index.d.ts +0 -11
  1169. package/lib/types/features/store/objects/index.d.ts.map +0 -1
  1170. package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +0 -18
  1171. package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts.map +0 -1
  1172. package/lib/types/features/store/objects/layout/documentLayout.d.ts +0 -20
  1173. package/lib/types/features/store/objects/layout/documentLayout.d.ts.map +0 -1
  1174. package/lib/types/features/store/objects/layout/index.d.ts +0 -3
  1175. package/lib/types/features/store/objects/layout/index.d.ts.map +0 -1
  1176. package/lib/types/features/store/objects/layout/renderers.d.ts +0 -3
  1177. package/lib/types/features/store/objects/layout/renderers.d.ts.map +0 -1
  1178. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +0 -52
  1179. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +0 -1
  1180. package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts +0 -14
  1181. package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts.map +0 -1
  1182. package/lib/types/features/store/objects/search/index.d.ts +0 -3
  1183. package/lib/types/features/store/objects/search/index.d.ts.map +0 -1
  1184. package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +0 -26
  1185. package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts.map +0 -1
  1186. package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +0 -28
  1187. package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts.map +0 -1
  1188. package/lib/types/features/store/objects/selection/SelectionActions.d.ts +0 -6
  1189. package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +0 -1
  1190. package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts +0 -4
  1191. package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts.map +0 -1
  1192. package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts +0 -4
  1193. package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts.map +0 -1
  1194. package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts +0 -16
  1195. package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts.map +0 -1
  1196. package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +0 -5
  1197. package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts.map +0 -1
  1198. package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts +0 -4
  1199. package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts.map +0 -1
  1200. package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts +0 -4
  1201. package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts.map +0 -1
  1202. package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts +0 -4
  1203. package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts.map +0 -1
  1204. package/lib/types/features/store/objects/selection/actions/index.d.ts +0 -8
  1205. package/lib/types/features/store/objects/selection/actions/index.d.ts.map +0 -1
  1206. package/lib/types/features/store/objects/selection/index.d.ts +0 -5
  1207. package/lib/types/features/store/objects/selection/index.d.ts.map +0 -1
  1208. package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts +0 -39
  1209. package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts.map +0 -1
  1210. package/lib/types/features/store/objects/upload/index.d.ts +0 -4
  1211. package/lib/types/features/store/objects/upload/index.d.ts.map +0 -1
  1212. package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts +0 -30
  1213. package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +0 -1
  1214. package/lib/types/features/store/objects/upload/useUploadHandler.d.ts +0 -50
  1215. package/lib/types/features/store/objects/upload/useUploadHandler.d.ts.map +0 -1
  1216. package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts +0 -6
  1217. package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts.map +0 -1
  1218. package/lib/types/features/store/types/ContentObjectTypesTable.d.ts +0 -8
  1219. package/lib/types/features/store/types/ContentObjectTypesTable.d.ts.map +0 -1
  1220. package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts +0 -15
  1221. package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts.map +0 -1
  1222. package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +0 -8
  1223. package/lib/types/features/store/types/ObjectSchemaEditor.d.ts.map +0 -1
  1224. package/lib/types/features/store/types/SelectContentType.d.ts +0 -11
  1225. package/lib/types/features/store/types/SelectContentType.d.ts.map +0 -1
  1226. package/lib/types/features/store/types/SelectContentTypeModal.d.ts +0 -33
  1227. package/lib/types/features/store/types/SelectContentTypeModal.d.ts.map +0 -1
  1228. package/lib/types/features/store/types/TableLayoutEditor.d.ts +0 -9
  1229. package/lib/types/features/store/types/TableLayoutEditor.d.ts.map +0 -1
  1230. package/lib/types/features/store/types/index.d.ts +0 -9
  1231. package/lib/types/features/store/types/index.d.ts.map +0 -1
  1232. package/lib/types/features/store/types/search/ObjectTypeSearchContext.d.ts +0 -36
  1233. package/lib/types/features/store/types/search/ObjectTypeSearchContext.d.ts.map +0 -1
  1234. package/lib/types/features/store/types/search/ObjectTypeSearchProvider.d.ts +0 -11
  1235. package/lib/types/features/store/types/search/ObjectTypeSearchProvider.d.ts.map +0 -1
  1236. package/lib/types/features/store/types/search/index.d.ts +0 -3
  1237. package/lib/types/features/store/types/search/index.d.ts.map +0 -1
  1238. package/lib/types/features/user/UserAvatar.d.ts +0 -9
  1239. package/lib/types/features/user/UserAvatar.d.ts.map +0 -1
  1240. package/lib/types/features/user/UserInfo.d.ts +0 -48
  1241. package/lib/types/features/user/UserInfo.d.ts.map +0 -1
  1242. package/lib/types/features/user/index.d.ts +0 -3
  1243. package/lib/types/features/user/index.d.ts.map +0 -1
  1244. package/lib/types/features/utils/index.d.ts +0 -6
  1245. package/lib/types/features/utils/index.d.ts.map +0 -1
  1246. package/lib/types/features/utils/mimeType.d.ts +0 -6
  1247. package/lib/types/features/utils/mimeType.d.ts.map +0 -1
  1248. package/lib/types/features/utils/print.d.ts +0 -10
  1249. package/lib/types/features/utils/print.d.ts.map +0 -1
  1250. package/lib/types/features/utils/rendition.d.ts +0 -4
  1251. package/lib/types/features/utils/rendition.d.ts.map +0 -1
  1252. package/lib/types/features/utils/text.d.ts +0 -3
  1253. package/lib/types/features/utils/text.d.ts.map +0 -1
  1254. package/lib/types/features/utils/workflowStatus.d.ts +0 -10
  1255. package/lib/types/features/utils/workflowStatus.d.ts.map +0 -1
  1256. package/lib/types/layout/AppLayout.d.ts +0 -13
  1257. package/lib/types/layout/AppLayout.d.ts.map +0 -1
  1258. package/lib/types/layout/FullHeightLayout.d.ts +0 -27
  1259. package/lib/types/layout/FullHeightLayout.d.ts.map +0 -1
  1260. package/lib/types/layout/Navbar.d.ts +0 -33
  1261. package/lib/types/layout/Navbar.d.ts.map +0 -1
  1262. package/lib/types/layout/Sidebar.d.ts +0 -31
  1263. package/lib/types/layout/Sidebar.d.ts.map +0 -1
  1264. package/lib/types/layout/SidebarContext.d.ts +0 -9
  1265. package/lib/types/layout/SidebarContext.d.ts.map +0 -1
  1266. package/lib/types/layout/TitleBar.d.ts +0 -6
  1267. package/lib/types/layout/TitleBar.d.ts.map +0 -1
  1268. package/lib/types/layout/index.d.ts +0 -7
  1269. package/lib/types/layout/index.d.ts.map +0 -1
  1270. package/lib/types/router/FixLinks.d.ts +0 -7
  1271. package/lib/types/router/FixLinks.d.ts.map +0 -1
  1272. package/lib/types/router/HistoryNavigator.d.ts +0 -59
  1273. package/lib/types/router/HistoryNavigator.d.ts.map +0 -1
  1274. package/lib/types/router/Nav.d.ts +0 -30
  1275. package/lib/types/router/Nav.d.ts.map +0 -1
  1276. package/lib/types/router/NestedNavigationContext.d.ts +0 -9
  1277. package/lib/types/router/NestedNavigationContext.d.ts.map +0 -1
  1278. package/lib/types/router/NestedRouterProvider.d.ts +0 -14
  1279. package/lib/types/router/NestedRouterProvider.d.ts.map +0 -1
  1280. package/lib/types/router/PathMatcher.d.ts +0 -36
  1281. package/lib/types/router/PathMatcher.d.ts.map +0 -1
  1282. package/lib/types/router/PathWithParams.d.ts +0 -9
  1283. package/lib/types/router/PathWithParams.d.ts.map +0 -1
  1284. package/lib/types/router/Route404.d.ts +0 -4
  1285. package/lib/types/router/Route404.d.ts.map +0 -1
  1286. package/lib/types/router/RouteComponent.d.ts +0 -6
  1287. package/lib/types/router/RouteComponent.d.ts.map +0 -1
  1288. package/lib/types/router/Router.d.ts +0 -74
  1289. package/lib/types/router/Router.d.ts.map +0 -1
  1290. package/lib/types/router/RouterProvider.d.ts +0 -15
  1291. package/lib/types/router/RouterProvider.d.ts.map +0 -1
  1292. package/lib/types/router/index.d.ts +0 -11
  1293. package/lib/types/router/index.d.ts.map +0 -1
  1294. package/lib/types/router/path.d.ts +0 -8
  1295. package/lib/types/router/path.d.ts.map +0 -1
  1296. package/lib/types/session/TypeRegistry.d.ts +0 -10
  1297. package/lib/types/session/TypeRegistry.d.ts.map +0 -1
  1298. package/lib/types/session/UserSession.d.ts +0 -40
  1299. package/lib/types/session/UserSession.d.ts.map +0 -1
  1300. package/lib/types/session/UserSessionProvider.d.ts +0 -7
  1301. package/lib/types/session/UserSessionProvider.d.ts.map +0 -1
  1302. package/lib/types/session/auth/composable.d.ts +0 -26
  1303. package/lib/types/session/auth/composable.d.ts.map +0 -1
  1304. package/lib/types/session/auth/firebase.d.ts +0 -10
  1305. package/lib/types/session/auth/firebase.d.ts.map +0 -1
  1306. package/lib/types/session/auth/useAuthState.d.ts +0 -10
  1307. package/lib/types/session/auth/useAuthState.d.ts.map +0 -1
  1308. package/lib/types/session/auth/useCurrentTenant.d.ts +0 -15
  1309. package/lib/types/session/auth/useCurrentTenant.d.ts.map +0 -1
  1310. package/lib/types/session/constants.d.ts +0 -3
  1311. package/lib/types/session/constants.d.ts.map +0 -1
  1312. package/lib/types/session/index.d.ts +0 -8
  1313. package/lib/types/session/index.d.ts.map +0 -1
  1314. package/lib/types/session/useUXTracking.d.ts +0 -6
  1315. package/lib/types/session/useUXTracking.d.ts.map +0 -1
  1316. package/lib/types/shell/SplashScreen.d.ts +0 -7
  1317. package/lib/types/shell/SplashScreen.d.ts.map +0 -1
  1318. package/lib/types/shell/VertesiaShell.d.ts +0 -10
  1319. package/lib/types/shell/VertesiaShell.d.ts.map +0 -1
  1320. package/lib/types/shell/apps/AppInstallationProvider.d.ts +0 -12
  1321. package/lib/types/shell/apps/AppInstallationProvider.d.ts.map +0 -1
  1322. package/lib/types/shell/apps/AppProjectSelector.d.ts +0 -12
  1323. package/lib/types/shell/apps/AppProjectSelector.d.ts.map +0 -1
  1324. package/lib/types/shell/apps/StandaloneApp.d.ts +0 -23
  1325. package/lib/types/shell/apps/StandaloneApp.d.ts.map +0 -1
  1326. package/lib/types/shell/apps/index.d.ts +0 -4
  1327. package/lib/types/shell/apps/index.d.ts.map +0 -1
  1328. package/lib/types/shell/index.d.ts +0 -8
  1329. package/lib/types/shell/index.d.ts.map +0 -1
  1330. package/lib/types/shell/login/EnterpriseSigninButton.d.ts +0 -6
  1331. package/lib/types/shell/login/EnterpriseSigninButton.d.ts.map +0 -1
  1332. package/lib/types/shell/login/GitHubSignInButton.d.ts +0 -6
  1333. package/lib/types/shell/login/GitHubSignInButton.d.ts.map +0 -1
  1334. package/lib/types/shell/login/GoogleSignInButton.d.ts +0 -6
  1335. package/lib/types/shell/login/GoogleSignInButton.d.ts.map +0 -1
  1336. package/lib/types/shell/login/InviteAcceptModal.d.ts +0 -2
  1337. package/lib/types/shell/login/InviteAcceptModal.d.ts.map +0 -1
  1338. package/lib/types/shell/login/MicrosoftSigninButton.d.ts +0 -6
  1339. package/lib/types/shell/login/MicrosoftSigninButton.d.ts.map +0 -1
  1340. package/lib/types/shell/login/PreviewIcon.d.ts +0 -6
  1341. package/lib/types/shell/login/PreviewIcon.d.ts.map +0 -1
  1342. package/lib/types/shell/login/SignInModal.d.ts +0 -7
  1343. package/lib/types/shell/login/SignInModal.d.ts.map +0 -1
  1344. package/lib/types/shell/login/SigninScreen.d.ts +0 -9
  1345. package/lib/types/shell/login/SigninScreen.d.ts.map +0 -1
  1346. package/lib/types/shell/login/SignupForm.d.ts +0 -8
  1347. package/lib/types/shell/login/SignupForm.d.ts.map +0 -1
  1348. package/lib/types/shell/login/TerminalLogin.d.ts +0 -2
  1349. package/lib/types/shell/login/TerminalLogin.d.ts.map +0 -1
  1350. package/lib/types/shell/login/UserInfo.d.ts +0 -6
  1351. package/lib/types/shell/login/UserInfo.d.ts.map +0 -1
  1352. package/lib/types/shell/login/UserSessionMenu.d.ts +0 -9
  1353. package/lib/types/shell/login/UserSessionMenu.d.ts.map +0 -1
  1354. package/lib/types/shell/utils.d.ts +0 -2
  1355. package/lib/types/shell/utils.d.ts.map +0 -1
  1356. package/lib/types/widgets/Progress.d.ts +0 -6
  1357. package/lib/types/widgets/Progress.d.ts.map +0 -1
  1358. package/lib/types/widgets/SvgIcon.d.ts +0 -7
  1359. package/lib/types/widgets/SvgIcon.d.ts.map +0 -1
  1360. package/lib/types/widgets/codemirror/CodeMirrorEditor.d.ts +0 -24
  1361. package/lib/types/widgets/codemirror/CodeMirrorEditor.d.ts.map +0 -1
  1362. package/lib/types/widgets/codemirror/CodemirrorStateSingleton.d.ts +0 -15
  1363. package/lib/types/widgets/codemirror/CodemirrorStateSingleton.d.ts.map +0 -1
  1364. package/lib/types/widgets/codemirror/MonacoEditor.d.ts +0 -38
  1365. package/lib/types/widgets/codemirror/MonacoEditor.d.ts.map +0 -1
  1366. package/lib/types/widgets/codemirror/index.d.ts +0 -5
  1367. package/lib/types/widgets/codemirror/index.d.ts.map +0 -1
  1368. package/lib/types/widgets/form/Form.d.ts +0 -22
  1369. package/lib/types/widgets/form/Form.d.ts.map +0 -1
  1370. package/lib/types/widgets/form/FormContext.d.ts +0 -20
  1371. package/lib/types/widgets/form/FormContext.d.ts.map +0 -1
  1372. package/lib/types/widgets/form/ManagedObject.d.ts +0 -82
  1373. package/lib/types/widgets/form/ManagedObject.d.ts.map +0 -1
  1374. package/lib/types/widgets/form/fields.d.ts +0 -16
  1375. package/lib/types/widgets/form/fields.d.ts.map +0 -1
  1376. package/lib/types/widgets/form/index.d.ts +0 -7
  1377. package/lib/types/widgets/form/index.d.ts.map +0 -1
  1378. package/lib/types/widgets/form/inputs.d.ts +0 -8
  1379. package/lib/types/widgets/form/inputs.d.ts.map +0 -1
  1380. package/lib/types/widgets/form/schema.d.ts +0 -47
  1381. package/lib/types/widgets/form/schema.d.ts.map +0 -1
  1382. package/lib/types/widgets/index.d.ts +0 -12
  1383. package/lib/types/widgets/index.d.ts.map +0 -1
  1384. package/lib/types/widgets/json-view/JSONCode.d.ts +0 -22
  1385. package/lib/types/widgets/json-view/JSONCode.d.ts.map +0 -1
  1386. package/lib/types/widgets/json-view/JSONDisplay.d.ts +0 -8
  1387. package/lib/types/widgets/json-view/JSONDisplay.d.ts.map +0 -1
  1388. package/lib/types/widgets/json-view/JSONView.d.ts +0 -7
  1389. package/lib/types/widgets/json-view/JSONView.d.ts.map +0 -1
  1390. package/lib/types/widgets/json-view/index.d.ts +0 -5
  1391. package/lib/types/widgets/json-view/index.d.ts.map +0 -1
  1392. package/lib/types/widgets/json-view/types.d.ts +0 -8
  1393. package/lib/types/widgets/json-view/types.d.ts.map +0 -1
  1394. package/lib/types/widgets/markdown/MarkdownRenderer.d.ts +0 -13
  1395. package/lib/types/widgets/markdown/MarkdownRenderer.d.ts.map +0 -1
  1396. package/lib/types/widgets/markdown/index.d.ts +0 -2
  1397. package/lib/types/widgets/markdown/index.d.ts.map +0 -1
  1398. package/lib/types/widgets/popover/Popover.d.ts +0 -38
  1399. package/lib/types/widgets/popover/Popover.d.ts.map +0 -1
  1400. package/lib/types/widgets/popover/context.d.ts +0 -8
  1401. package/lib/types/widgets/popover/context.d.ts.map +0 -1
  1402. package/lib/types/widgets/popover/index.d.ts +0 -3
  1403. package/lib/types/widgets/popover/index.d.ts.map +0 -1
  1404. package/lib/types/widgets/popover/slots.d.ts +0 -5
  1405. package/lib/types/widgets/popover/slots.d.ts.map +0 -1
  1406. package/lib/types/widgets/properties/PropertiesView.d.ts +0 -11
  1407. package/lib/types/widgets/properties/PropertiesView.d.ts.map +0 -1
  1408. package/lib/types/widgets/properties/index.d.ts +0 -2
  1409. package/lib/types/widgets/properties/index.d.ts.map +0 -1
  1410. package/lib/types/widgets/schema-editor/ManagedSchema.d.ts +0 -75
  1411. package/lib/types/widgets/schema-editor/ManagedSchema.d.ts.map +0 -1
  1412. package/lib/types/widgets/schema-editor/editor/Editable.d.ts +0 -40
  1413. package/lib/types/widgets/schema-editor/editor/Editable.d.ts.map +0 -1
  1414. package/lib/types/widgets/schema-editor/editor/EditableSchemaProperty.d.ts +0 -8
  1415. package/lib/types/widgets/schema-editor/editor/EditableSchemaProperty.d.ts.map +0 -1
  1416. package/lib/types/widgets/schema-editor/editor/PropertyEditor.d.ts +0 -5
  1417. package/lib/types/widgets/schema-editor/editor/PropertyEditor.d.ts.map +0 -1
  1418. package/lib/types/widgets/schema-editor/editor/PropertyViewer.d.ts +0 -4
  1419. package/lib/types/widgets/schema-editor/editor/PropertyViewer.d.ts.map +0 -1
  1420. package/lib/types/widgets/schema-editor/editor/SchemaContext.d.ts +0 -3
  1421. package/lib/types/widgets/schema-editor/editor/SchemaContext.d.ts.map +0 -1
  1422. package/lib/types/widgets/schema-editor/editor/SchemaEditor.d.ts +0 -9
  1423. package/lib/types/widgets/schema-editor/editor/SchemaEditor.d.ts.map +0 -1
  1424. package/lib/types/widgets/schema-editor/index.d.ts +0 -7
  1425. package/lib/types/widgets/schema-editor/index.d.ts.map +0 -1
  1426. package/lib/types/widgets/schema-editor/json-schema4-utils.d.ts +0 -16
  1427. package/lib/types/widgets/schema-editor/json-schema4-utils.d.ts.map +0 -1
  1428. package/lib/types/widgets/schema-editor/type-signature.d.ts +0 -19
  1429. package/lib/types/widgets/schema-editor/type-signature.d.ts.map +0 -1
  1430. package/lib/types/widgets/upload/DropZone.d.ts +0 -41
  1431. package/lib/types/widgets/upload/DropZone.d.ts.map +0 -1
  1432. package/lib/types/widgets/upload/UploadResultCategory.d.ts +0 -26
  1433. package/lib/types/widgets/upload/UploadResultCategory.d.ts.map +0 -1
  1434. package/lib/types/widgets/upload/UploadSummary.d.ts +0 -38
  1435. package/lib/types/widgets/upload/UploadSummary.d.ts.map +0 -1
  1436. package/lib/types/widgets/upload/index.d.ts +0 -4
  1437. package/lib/types/widgets/upload/index.d.ts.map +0 -1
  1438. package/lib/types/widgets/xml-viewer/components/Attributes/index.d.ts +0 -6
  1439. package/lib/types/widgets/xml-viewer/components/Attributes/index.d.ts.map +0 -1
  1440. package/lib/types/widgets/xml-viewer/components/CDataTag/index.d.ts +0 -8
  1441. package/lib/types/widgets/xml-viewer/components/CDataTag/index.d.ts.map +0 -1
  1442. package/lib/types/widgets/xml-viewer/components/CollapseIcon/index.d.ts +0 -5
  1443. package/lib/types/widgets/xml-viewer/components/CollapseIcon/index.d.ts.map +0 -1
  1444. package/lib/types/widgets/xml-viewer/components/CommentTag/index.d.ts +0 -9
  1445. package/lib/types/widgets/xml-viewer/components/CommentTag/index.d.ts.map +0 -1
  1446. package/lib/types/widgets/xml-viewer/components/DeclarationTag/index.d.ts +0 -8
  1447. package/lib/types/widgets/xml-viewer/components/DeclarationTag/index.d.ts.map +0 -1
  1448. package/lib/types/widgets/xml-viewer/components/Elements/index.d.ts +0 -8
  1449. package/lib/types/widgets/xml-viewer/components/Elements/index.d.ts.map +0 -1
  1450. package/lib/types/widgets/xml-viewer/components/InvalidXml/index.d.ts +0 -2
  1451. package/lib/types/widgets/xml-viewer/components/InvalidXml/index.d.ts.map +0 -1
  1452. package/lib/types/widgets/xml-viewer/components/Tag/index.d.ts +0 -13
  1453. package/lib/types/widgets/xml-viewer/components/Tag/index.d.ts.map +0 -1
  1454. package/lib/types/widgets/xml-viewer/components/TextElement/index.d.ts +0 -8
  1455. package/lib/types/widgets/xml-viewer/components/TextElement/index.d.ts.map +0 -1
  1456. package/lib/types/widgets/xml-viewer/components/XMLViewer.d.ts +0 -3
  1457. package/lib/types/widgets/xml-viewer/components/XMLViewer.d.ts.map +0 -1
  1458. package/lib/types/widgets/xml-viewer/components/types.d.ts +0 -104
  1459. package/lib/types/widgets/xml-viewer/components/types.d.ts.map +0 -1
  1460. package/lib/types/widgets/xml-viewer/constants/index.d.ts +0 -27
  1461. package/lib/types/widgets/xml-viewer/constants/index.d.ts.map +0 -1
  1462. package/lib/types/widgets/xml-viewer/context/xml-viewer-context.d.ts +0 -4
  1463. package/lib/types/widgets/xml-viewer/context/xml-viewer-context.d.ts.map +0 -1
  1464. package/lib/types/widgets/xml-viewer/helpers/index.d.ts +0 -13
  1465. package/lib/types/widgets/xml-viewer/helpers/index.d.ts.map +0 -1
  1466. package/lib/types/widgets/xml-viewer/hooks/useCollapsible.d.ts +0 -15
  1467. package/lib/types/widgets/xml-viewer/hooks/useCollapsible.d.ts.map +0 -1
  1468. package/lib/types/widgets/xml-viewer/hooks/useXMLViewer.d.ts +0 -10
  1469. package/lib/types/widgets/xml-viewer/hooks/useXMLViewer.d.ts.map +0 -1
  1470. package/lib/types/widgets/xml-viewer/index.d.ts +0 -3
  1471. package/lib/types/widgets/xml-viewer/index.d.ts.map +0 -1
  1472. package/lib/types/widgets/xml-viewer/types/index.d.ts +0 -16
  1473. package/lib/types/widgets/xml-viewer/types/index.d.ts.map +0 -1
  1474. package/lib/vertesia-ui-core.js +0 -2
  1475. package/lib/vertesia-ui-core.js.map +0 -1
  1476. package/lib/vertesia-ui-env.js +0 -2
  1477. package/lib/vertesia-ui-env.js.map +0 -1
  1478. package/lib/vertesia-ui-features.js +0 -2
  1479. package/lib/vertesia-ui-features.js.map +0 -1
  1480. package/lib/vertesia-ui-layout.js +0 -2
  1481. package/lib/vertesia-ui-layout.js.map +0 -1
  1482. package/lib/vertesia-ui-router.js +0 -2
  1483. package/lib/vertesia-ui-router.js.map +0 -1
  1484. package/lib/vertesia-ui-session.js +0 -2
  1485. package/lib/vertesia-ui-session.js.map +0 -1
  1486. package/lib/vertesia-ui-shell.js +0 -2
  1487. package/lib/vertesia-ui-shell.js.map +0 -1
  1488. package/lib/vertesia-ui-widgets.js +0 -2
  1489. package/lib/vertesia-ui-widgets.js.map +0 -1
  1490. package/src/core/components/Button.tsx +0 -63
  1491. package/src/core/components/Modal.tsx +0 -144
  1492. package/src/core/components/SelectBox.tsx +0 -188
  1493. package/src/core/components/tabs/Tabs.tsx +0 -132
  1494. package/src/core/components/tabs/TabsContext.ts +0 -25
  1495. package/src/core/components/tabs/index.ts +0 -2
  1496. package/src/widgets/codemirror/CodeMirrorEditor.tsx +0 -122
  1497. package/src/widgets/codemirror/CodemirrorStateSingleton.tsx +0 -39
  1498. package/src/widgets/codemirror/index.ts +0 -6
  1499. /package/src/core/components/{MessageBox.tsx → shadcn/MessageBox.tsx} +0 -0
@@ -1,2 +0,0 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import r,{clsx as i}from"clsx";import{AnimatePresence as a,motion as s}from"motion/react";import l,{useMemo as o,useState as c,useEffect as d,createContext as u,useContext as m,useRef as h,useCallback as p,Component as f,memo as g}from"react";import{cn as y,useToast as b,Badge as v,Button as x,Popover as w,PopoverTrigger as N,PopoverContent as k,Command as C,CommandList as S,CommandGroup as P,CommandItem as j,Modal as _,ModalTitle as T,ModalBody as I,RadioGroup as A,FormItem as z,Input as E,ModalFooter as F,RadioOptionAdapter as D,Center as $,VTooltip as L,useFetch as O,ErrorBox as R,ResizablePanelGroup as U,ResizablePanel as M,ResizableHandle as V,Spinner as K,Portal as q,VModal as B,VModalTitle as W,VModalBody as G,VModalFooter as H,Card as J,Separator as Y,CardContent as Z,SelectBox as Q,InputList as X,Avatar as ee,Table as te,FilterProvider as ne,FilterBtn as re,FilterBar as ie,FilterClear as ae,TBody as se,SharedState as le,useWatchSharedState as oe,MessageBox as ce,VSelectBox as de,useIntersectionObserver as ue,useFlag as me,Styles as he,Checkbox as pe,NumberInput as fe,SidePanel as ge,Divider as ye,Textarea as be,Switch as ve,TR as xe,EmptyCollection as we,ConfirmModal as Ne,THead as ke,useDebounce as Ce,Panel as Se,CommandInput as Pe,CommandEmpty as je,TagsInput as _e,SelectList as Te,DialogDescription as Ie,Heading as Ae,VTabs as ze,VTabsBar as Ee,VTabsPanel as Fe,Breadcrumbs as De}from"@vertesia/ui/core";import{CopyIcon as $e,Bot as Le,MessageSquare as Oe,Info as Re,AlertCircle as Ue,User as Me,CheckCircle as Ve,Clock as Ke,ClipboardList as qe,XIcon as Be,MoreVertical as We,ExternalLink as Ge,DownloadCloudIcon as He,TableProperties as Je,LayoutGrid as Ye,Loader2 as Ze,ChevronsUp as Qe,ChevronsDown as Xe,Minus as et,Plus as tt,Maximize as nt,Image as rt,ScanSearch as it,Download as at,X as st,Maximize2 as lt,AlertTriangle as ot,Copy as ct,SquarePen as dt,FileSearch as ut,Eye as mt,Users as ht,RefreshCw as pt,UploadIcon as ft,CheckCircleIcon as gt,AlertCircleIcon as yt,FileIcon as bt,XCircleIcon as vt,FolderIcon as xt,ChevronsUpDown as wt,FileText as Nt,ChevronRight as kt,Settings as Ct,Trash2 as St,Search as Pt,FolderClosed as jt,Check as _t,EllipsisVertical as Tt,PaperclipIcon as It,SendIcon as At,Activity as zt,Circle as Et,Cpu as Ft}from"lucide-react";import{useUserSession as Dt}from"@vertesia/ui/session";import{AgentMessageType as $t,AgentSearchScope as Lt,mergeInCodePromptSchemas as Ot,supportsToolUse as Rt,ImageRenditionFormat as Ut,WorkflowExecutionStatus as Mt,PDF_RENDITION_NAME as Vt,MarkdownRenditionFormat as Kt,ContentObjectStatus as qt,ContentNature as Bt,POSTER_RENDITION_NAME as Wt,PrincipalType as Gt,InteractionStatus as Ht,SearchTypes as Jt,SupportedEmbeddingTypes as Yt}from"@vertesia/common";import{NavLink as Zt,useNavigate as Qt}from"@vertesia/ui/router";import{MarkdownRenderer as Xt,Popover as en,XMLViewer as tn,JSONCode as nn,JSONDisplay as rn,Progress as an,DropZone as sn,UploadSummary as ln,useSchema as on,CodeMirrorEditor as cn,SchemaEditor as dn,ManagedObject as un,GeneratedForm as mn}from"@vertesia/ui/widgets";import hn from"dayjs";import pn,{Ajv as fn}from"ajv";import gn from"@monaco-editor/react";import{pdfjs as yn,Document as bn,Page as vn}from"react-pdf";import xn from"dayjs/plugin/localizedFormat";import wn from"dayjs/plugin/relativeTime";import{Md5 as Nn}from"ts-md5";import{json as kn}from"@codemirror/lang-json";import{UserInfo as Cn,SyncMemberHeadsToggle as Sn,SharedPropsEditor as Pn}from"@vertesia/ui/features";import{basicSetup as jn}from"codemirror";import{toPng as _n}from"html-to-image";import{XAxis as Tn,YAxis as In,CartesianGrid as An,Tooltip as zn,Legend as En,ReferenceLine as Fn,ResponsiveContainer as Dn,ComposedChart as $n,AreaChart as Ln,LineChart as On,BarChart as Rn,Line as Un,Area as Mn,Bar as Vn,PieChart as Kn,Pie as qn,Cell as Bn,ScatterChart as Wn,Scatter as Gn,RadarChart as Hn,PolarGrid as Jn,PolarAngleAxis as Yn,PolarRadiusAxis as Zn,Radar as Qn,RadialBarChart as Xn,RadialBar as er,FunnelChart as tr,Funnel as nr,LabelList as rr,Treemap as ir}from"recharts";import{ErrorBoundary as ar}from"react-error-boundary";import{capitalize as sr}from"lodash-es";import{SidebarItem as lr}from"@vertesia/ui/layout";function or({children:t,secondary:n=!1}){return e("span",{className:n?"bg-secondary text-primary":"text-foreground bg-muted",children:t})}function cr(e){return e?"array"===e.name?cr(e.innerType):e:void 0}function dr({property:n}){return t("div",{className:"flex items-center gap-x-2",children:[e("div",{className:"font-semibold text-gray-600",children:n.name}),n.optional&&e(or,{children:"optional"}),e(or,{children:n.type.value})]})}function ur({activities:t}){return e("div",{className:"flex flex-col gap-y-4 divide-y divide-gray-200",children:t.map(t=>e(hr,{activity:t},t.name))})}function mr({code:n,children:r}){return t("div",{className:"flex gap-2 items-center border-b border-b-gray-200 mb-2",children:[e("div",{className:"text-lg font-medium text-gray-900 py-2 ",children:r}),n&&e("div",{children:e(or,{children:n})})]})}function hr({activity:n,headingClass:r,headingRef:i}){return t("div",{className:r,id:n.name,ref:i,children:[e("div",{className:"text-xl font-semibold pt-8",children:n.title}),e("div",{className:"pb-4",children:e(or,{children:n.name})}),n.doc&&e("div",{className:"text-gray-700 pb-2",children:n.doc}),t("div",{className:"pb-4",children:[e(mr,{code:n.paramsType,children:"Parameters"}),e("div",{className:"divide-y divide-gray-100",children:n.params.map(t=>e(pr,{property:t},t.name))})]}),t("div",{className:"pb-4",children:[e(mr,{children:"Returns"}),e("div",{children:n.returnType?n.returnType.value:"void"})]})]})}function pr({property:n,className:i}){const a=o(()=>{const t=cr(n.type.innerType)??n.type;return"object"===t.name&&t.members?e(gr,{members:t.members}):"enum"===t.name&&t.enum?e(fr,{values:t.enum}):null},[n.type.innerType]);return t("div",{className:r("py-2",i),children:[e(dr,{property:n}),n.doc&&e("div",{className:"text-gray-700 text-sm pt-2",children:n.doc}),a&&e("div",{className:"my-2 overflow-hidden",children:a})]})}function fr({values:t}){return e("div",{className:"flex flex-wrap items-center gap-2",children:t.map((t,n)=>e(or,{secondary:!0,children:t},n))})}function gr({members:n}){return e(br,{className:"rounded-md border border-gray-200",button:n=>t("div",{className:"px-4 py-2 flex items-center gap-x-2 text-sm font-medium hover:text-blue-600",children:[e(vr,{isOpen:n}),e("div",n?{children:"Hide child properties"}:{children:"Show child properties"})]}),body:e(yr,{properties:n})})}function yr({properties:t}){return e("div",{className:"border-l-2 border-l-blue-200 flex flex-col divide-y divide-gray-100 border-t border-t-gray-200",children:t.map(t=>e(pr,{property:t,className:"px-4 py-2"},t.name))})}function br({button:n,body:i,className:l,isInitiallyOpen:o}){const[d,u]=c(o||!1);return t("div",{className:r(d?"block":"inline-block",l),children:[e("button",{className:"p-0 m-0 bg-transparent",onClick:()=>u(!d),children:e(a,{children:n(d)})}),e(a,{children:d&&e(s.div,{className:"overflow-hidden",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:"easeOut"},children:i})})]})}function vr({isOpen:t}){return e(a,{propagate:!0,mode:"wait",children:e(s.div,{className:"font-mono font-semibold text-gray-400 text-lg",initial:{rotate:0},animate:{rotate:t?45:0},transition:{duration:.2},children:"+"},"closeIcon")})}function xr({className:n,inline:r=!1}){return t("div",{className:y("flex items-center gap-1",r?"inline-flex":"",n),children:[e("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-[jumping_1s_infinite_ease-in-out] hover:bg-blue-600",style:{transform:"translateY(0)",animationRange:"0px -8px"}}),e("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-[jumping_1s_0.3s_infinite_ease-in-out] hover:bg-blue-600",style:{transform:"translateY(0)",animationRange:"0px -8px"}}),e("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-[jumping_1s_0.6s_infinite_ease-in-out] hover:bg-blue-600",style:{transform:"translateY(0)",animationRange:"0px -8px"}})]})}function wr({className:n,inline:r=!1,color:i="blue"}){const a={blue:"from-blue-400 to-indigo-500 dark:from-blue-500 dark:to-indigo-400",purple:"from-purple-400 to-violet-500 dark:from-purple-500 dark:to-violet-400",teal:"from-teal-400 to-emerald-500 dark:from-teal-500 dark:to-emerald-400",green:"from-green-400 to-emerald-500 dark:from-green-500 dark:to-emerald-400",amber:"from-amber-400 to-orange-500 dark:from-amber-500 dark:to-orange-400"}[i];return t("div",{className:y("flex items-center gap-1.5",r?"inline-flex":"",n),children:[e("div",{className:`w-2 h-2 bg-gradient-to-r ${a} rounded-full animate-[bounce_1.2s_ease-in-out_infinite]`}),e("div",{className:`w-2 h-2 bg-gradient-to-r ${a} rounded-full animate-[bounce_1.2s_ease-in-out_0.2s_infinite]`}),e("div",{className:`w-2 h-2 bg-gradient-to-r ${a} rounded-full animate-[bounce_1.2s_ease-in-out_0.4s_infinite]`})]})}function Nr({className:n,size:r="md",color:i="blue"}){const a={blue:"bg-blue-500 dark:bg-blue-400",purple:"bg-purple-500 dark:bg-purple-400",teal:"bg-teal-500 dark:bg-teal-400",green:"bg-green-500 dark:bg-green-400",amber:"bg-amber-500 dark:bg-amber-400"};return t("span",{className:y("relative flex",n),children:[e("span",{className:y("animate-ping absolute inline-flex h-full w-full rounded-full opacity-60",a[i])}),e("span",{className:y("animate-pulse absolute inline-flex h-[80%] w-[80%] rounded-full opacity-80",a[i]),style:{left:"10%",top:"10%",animationDuration:"2s"}}),e("span",{className:y("relative inline-flex rounded-full",a[i],{sm:"w-3 h-3",md:"w-5 h-5",lg:"w-7 h-7"}[r])})]})}function kr({className:t,color:n="blue"}){const[r,i]=c(".");return d(()=>{const e=setInterval(()=>{i(e=>"."===e?"..":".."===e?"...":".")},500);return()=>clearInterval(e)},[]),e("span",{className:y({blue:"text-blue-600 dark:text-blue-400",purple:"text-purple-600 dark:text-purple-400",teal:"text-teal-600 dark:text-teal-400",green:"text-green-600 dark:text-green-400",amber:"text-amber-600 dark:text-amber-400"}[n],"font-bold",t),children:r})}function Cr({message:n,className:r,color:i="blue"}){const a={blue:{dot:"bg-blue-500 dark:bg-blue-400",text:"text-blue-700 dark:text-blue-300"},purple:{dot:"bg-purple-500 dark:bg-purple-400",text:"text-purple-700 dark:text-purple-300"},teal:{dot:"bg-teal-500 dark:bg-teal-400",text:"text-teal-700 dark:text-teal-300"},green:{dot:"bg-green-500 dark:bg-green-400",text:"text-green-700 dark:text-green-300"},amber:{dot:"bg-amber-500 dark:bg-amber-400",text:"text-amber-700 dark:text-amber-300"}};return t("div",{className:y("flex items-center gap-2 py-1",r),children:[t("div",{className:"flex space-x-1",children:[e("div",{className:`w-1.5 h-1.5 ${a[i].dot} rounded-full animate-bounce`}),e("div",{className:`w-1.5 h-1.5 ${a[i].dot} rounded-full animate-bounce`,style:{animationDelay:"0.2s"}}),e("div",{className:`w-1.5 h-1.5 ${a[i].dot} rounded-full animate-bounce`,style:{animationDelay:"0.4s"}})]}),e("div",{className:`${a[i].text} font-medium text-xs`,children:n})]})}function Sr({className:n,color:r="blue",width:i="md",message:a}){const[s,l]=c(15),[o,u]=c("increasing"),[m,h]=c(.4);return d(()=>{let e,t=Date.now();const n=()=>{const r=Date.now(),i=r-t;t=r,l(e=>{const t=m*(i/16);let n="increasing"===o?e+t:e-t;return n>=85?(u("decreasing"),h(.3+.2*Math.random()),85):n<=15?(u("increasing"),h(.3+.2*Math.random()),15):(Math.random()>.99&&h(e=>Math.max(.2,Math.min(.5,e+(.1*Math.random()-.05)))),n)}),e=requestAnimationFrame(n)};return e=requestAnimationFrame(n),()=>{cancelAnimationFrame(e)}},[o,m]),t("div",{className:y("flex flex-col gap-1",n),children:[a&&e("div",{className:`text-xs font-medium ${{blue:"text-blue-700 dark:text-blue-300",purple:"text-purple-700 dark:text-purple-300",teal:"text-teal-700 dark:text-teal-300",green:"text-green-700 dark:text-green-300",amber:"text-amber-700 dark:text-amber-300"}[r]} mb-1`,children:a}),e("div",{className:y("h-1.5 rounded-full overflow-hidden shadow-inner",{blue:"bg-blue-200 dark:bg-blue-900/30",purple:"bg-purple-200 dark:bg-purple-900/30",teal:"bg-teal-200 dark:bg-teal-900/30",green:"bg-green-200 dark:bg-green-900/30",amber:"bg-amber-200 dark:bg-amber-900/30"}[r],{sm:"w-24",md:"w-32",lg:"w-48",xl:"w-64",full:"w-full"}[i]),children:e("div",{className:y("h-full rounded-full",{blue:"bg-gradient-to-r from-blue-400 to-blue-500 dark:from-blue-500 dark:to-blue-400",purple:"bg-gradient-to-r from-purple-400 to-purple-500 dark:from-purple-500 dark:to-purple-400",teal:"bg-gradient-to-r from-teal-400 to-teal-500 dark:from-teal-500 dark:to-teal-400",green:"bg-gradient-to-r from-green-400 to-green-500 dark:from-green-500 dark:to-green-400",amber:"bg-gradient-to-r from-amber-400 to-amber-500 dark:from-amber-500 dark:to-amber-400"}[r]),style:{width:`${s}%`,transition:"width 150ms cubic-bezier(0.4, 0.0, 0.2, 1)"}})})]})}function Pr({className:t,color:n="blue",size:r="md"}){const[i,a]=c(Array(7).fill(50)),s={sm:{width:"w-16",height:"h-4",barWidth:"w-0.5",gap:"gap-[2px]"},md:{width:"w-20",height:"h-5",barWidth:"w-1",gap:"gap-[3px]"},lg:{width:"w-24",height:"h-6",barWidth:"w-1.5",gap:"gap-1"}},l={blue:"bg-gradient-to-b from-blue-400 to-blue-500 dark:from-blue-400 dark:to-blue-500",purple:"bg-gradient-to-b from-purple-400 to-purple-500 dark:from-purple-400 dark:to-purple-500",teal:"bg-gradient-to-b from-teal-400 to-teal-500 dark:from-teal-400 dark:to-teal-500",green:"bg-gradient-to-b from-green-400 to-green-500 dark:from-green-400 dark:to-green-500",amber:"bg-gradient-to-b from-amber-400 to-amber-500 dark:from-amber-400 dark:to-amber-500"};return d(()=>{let e;const t=[1.2,1,1.5,.8,1.3,.9,1.1],n=[0,.5,1,1.5,2,2.5,3];let r=0;const s=()=>{r+=.02;const l=i.map((e,i)=>10+40*(Math.sin(r*t[i]+n[i])+1));a(l),e=requestAnimationFrame(s)};return e=requestAnimationFrame(s),()=>{cancelAnimationFrame(e)}},[]),e("div",{className:y("flex items-end justify-center",s[r].width,s[r].height,s[r].gap,t),children:i.map((t,i)=>e("div",{className:y(s[r].barWidth,"rounded-full transform-gpu",l[n]),style:{height:`${t}%`,transition:"height 100ms cubic-bezier(0.4, 0.0, 0.2, 1)",opacity:.9}},i))})}const jr=["Brewing some code magic...","Doing the robot dance...","Cooking up something good...","Working my gears...","Parsing the possibilities...","Crunching the numbers...","Connecting the digital dots...","Processing at maximum capacity...","Searching through my circuits...","Running advanced algorithms...","Computing optimal solutions...","Loading brilliance.exe...","Scanning the knowledge base...","Optimizing response protocols...","Having a quick brainstorm...","Thinking cap firmly on...","Pondering the digital universe...","Consulting my silicon wisdom...","Untangling the logic knots...","Assembling clever responses...","Mixing thoughtful ingredients...","Polishing the perfect answer...","Taking a momentary mind sprint...","Connecting virtual synapses...","Baking fresh ideas...","Stirring the thought pot...","Simmering solutions slowly...","Whipping up a smart response...","Adding a dash of intelligence...","Preparing a gourmet answer...","Growing brilliant ideas...","Cultivating the perfect response...","Gathering digital nectar...","Planting seeds of solutions...","Exploring the data landscape...","Mapping the solution path...","Navigating through possibilities...","Charting the course to answers...","Embarking on a thought expedition...","Sketching out concepts...","Painting with digital brushstrokes...","Composing my response symphony...","Crafting precision answers...","Weaving threads of information...","Just a moment of processing...","Taking a quick thinking break...","Almost there, final touches...","Putting the pieces together...","Making progress, hold tight..."];const _r=[$t.COMPLETE,$t.IDLE,$t.REQUEST_INPUT,$t.TERMINATED];function Tr(e){return e.workstream_id?(e.type===$t.COMPLETE&&console.log("[getWorkstreamId] COMPLETE message with workstream_id:",e.workstream_id),e.workstream_id):(e.type===$t.COMPLETE&&console.log("[getWorkstreamId] COMPLETE message without workstream_id, defaulting to 'main'"),"main")}function Ir({message:n,showPulsatingCircle:r=!1}){const[i,a]=c(!1),[s,l]=c(""),[o,u]=c(!1),{client:m}=Dt(),h=b(),p=(()=>{const t={containerClass:"bg-white border-l-4 border-l-muted/30 shadow-sm",iconComponent:e(Le,{className:"size-4 text-muted"}),sender:""};switch(n.type){case $t.ANSWER:return{...t,containerClass:"bg-white border-l-4 border-l-muted/30 shadow-sm",iconComponent:e(Le,{className:"size-4 text-muted"}),sender:"Agent"};case $t.COMPLETE:return{...t,containerClass:"bg-white border-l-4 border-l-success shadow-sm",iconComponent:e(Ve,{className:"size-4 text-success"}),sender:"Completed"};case $t.TERMINATED:return{...t,containerClass:"bg-white border-l-4 border-l-attention shadow-sm",iconComponent:e(Ve,{className:"size-4 text-attention"}),sender:"Terminated"};case $t.QUESTION:return{...t,iconComponent:e(Me,{className:"size-4 text-muted"}),sender:"User"};case $t.THOUGHT:return{...t,iconComponent:r?e(Nr,{size:"sm",color:"blue"}):e(Le,{className:"size-4 text-muted"}),sender:"Agent"};case $t.ERROR:return{...t,iconComponent:e(Ue,{className:"size-4 text-muted"}),sender:"System"};case $t.UPDATE:return{...t,containerClass:"bg-white border-l-4 border-success shadow-sm",iconComponent:e(Re,{className:"size-4 text-success"}),sender:"Update"};case $t.PLAN:return{...t,iconComponent:e(Oe,{className:"size-4 text-muted"}),sender:"Agent"};default:return{...t,sender:"Agent"}}})(),f=()=>{let e="";if(n.message&&(e="object"==typeof n.message?JSON.stringify(n.message,null,2):n.message.trim?n.message.trim():String(n.message)),"string"==typeof e&&e.includes("%thinking_message%")){const t=Math.floor(Math.random()*jr.length);e=e.replace(/%thinking_message%/g,jr[t])}return e},g=t=>{if("object"==typeof t)return e("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto bg-gray-100 dark:bg-gray-800 p-2 rounded text-gray-700 ",children:JSON.stringify(t,null,2)});const r=n.workflow_run_id;return e("div",{className:"vprose prose-sm",children:e(Xt,{artifactRunId:r,components:{a:({node:t,ref:n,...r})=>{const i=r.href||"";return i.includes("/store/objects")?e(Zt,{href:i,topLevelNav:!0,children:r.children}):e("a",{...r,target:"_blank",rel:"noopener noreferrer"})},img:({node:t,ref:n,...r})=>e("img",{...r,className:"max-w-full h-auto rounded-lg shadow-md my-3 cursor-pointer hover:shadow-lg transition-shadow",loading:"lazy",onClick:()=>r.src&&window.open(r.src,"_blank")})},children:t})})},y=f(),[w,N]=c([]);d(()=>{(async()=>{const e=n.workflow_run_id,t=n.details,r=t&&t.outputFiles;if(e&&Array.isArray(r)&&0!==r.length)try{const t=await Promise.all(r.map(async t=>{if("string"!=typeof t||!t.trim())return null;const n=t.trim(),r=n.startsWith("out/")||n.startsWith("files/")||n.startsWith("scripts/")?n:`out/${n}`,i=r.split(".").pop()?.toLowerCase()||"",a=new Set(["png","jpg","jpeg","gif","webp","bmp","svg"]).has(i);try{const t=a?"inline":"attachment",{url:i}=await m.files.getArtifactDownloadUrl(e,r,t);return{displayName:n,artifactPath:r,url:i,isImage:a}}catch(e){return console.error(`Failed to resolve artifact URL for ${r}`,e),null}}));N(t.filter(e=>!!e))}catch(e){console.error("Error loading artifact URLs from message details",e),N([])}else N([])})()},[n.details,n.timestamp,m]),d(()=>{(async()=>{if(y){u(!0);try{const e=await(async e=>e)((e=>{if("string"!=typeof e)return e;if(n.type===$t.THOUGHT||"string"==typeof n.message&&(n.message.toLowerCase().includes("thinking about")||n.message.toLowerCase().includes("i'm thinking")||n.message.toLowerCase().includes("💭"))){let t=e;return/\d+\.\s+.+/.test(t)&&(t=t.replace(/(\d+\.\s+.+?)(?=\s+\d+\.\s+|$)/g,"$1\n\n"),t=t.replace(/(\d+\.\s+.+\n)([^\d\n][^:])/g,"$1 $2")),t.includes(":")&&!t.includes("\n\n")&&(t=t.replace(/\b(First|Next|Then|Finally|Lastly|Additionally|Step \d+):\s+/gi,"\n\n$&")),t.includes(" - ")&&(t=t.replace(/\s+-\s+/g,"\n- ")),t}return/\d+\.\s+.+/.test(e)&&!e.includes("\n\n")?e.replace(/(\d+\.\s+.+?)(?=\s+\d+\.\s+|$)/g,"$1\n\n"):e})(y));l(e)}catch(e){console.error("Error processing message content:",e),l(y)}finally{u(!1)}}})()},[y,m]);const k=Tr(n),C=(()=>{switch(n.type){case $t.ANSWER:return"border-l-info bg-info";case $t.COMPLETE:return"border-l-success bg-success";case $t.IDLE:return"border-l-muted bg-muted";case $t.REQUEST_INPUT:return"border-l-attention bg-attention";case $t.QUESTION:return"border-l-muted bg-muted";case $t.THOUGHT:return"border-l-accent dark:border-l-purple-500 bg-purple-50/50 dark:bg-purple-900/10";case $t.ERROR:return"border-l-destructive bg-destructive";case $t.UPDATE:return"border-l-success bg-success";case $t.PLAN:return"border-l-attention bg-attention";case $t.TERMINATED:return"border-l-muted bg-muted";default:return"border-l-indigo-500 dark:border-l-indigo-400 bg-indigo-50/50 dark:bg-indigo-900/10"}})();return t("div",{className:`border-l-4 shadow-md overflow-hidden bg-white dark:bg-gray-900 mb-5 ${C}`,"data-workstream-id":k,children:[t("div",{className:"flex items-center justify-between px-4 py-2 border-b border-gray-100/80 dark:border-gray-800/80 bg-white/50 dark:bg-gray-900/50 backdrop-blur-sm",children:[t("div",{className:"flex items-center gap-2",children:[e("div",{className:r?"animate-fadeIn":"",children:(()=>{const t=(()=>{switch(n.type){case $t.ANSWER:return"text-info";case $t.COMPLETE:return"text-success";case $t.IDLE:return"text-muted";case $t.REQUEST_INPUT:return"text-attention";case $t.QUESTION:return"text-muted";case $t.THOUGHT:return"text-purple-600 dark:text-purple-400";case $t.ERROR:return"text-destructive";case $t.UPDATE:return"text-success";case $t.PLAN:return"text-attention";default:return"text-muted"}})(),i=t=>("number"==typeof n.timestamp?n.timestamp:new Date(n.timestamp).getTime())%2==0?e(Nr,{size:"sm",color:t}):e(wr,{color:t});switch(n.type){case $t.ANSWER:return r?i("blue"):e(Le,{className:`size-4 ${t}`});case $t.COMPLETE:case $t.TERMINATED:return e(Ve,{className:`size-4 ${t}`});case $t.IDLE:return e(Ke,{className:`size-4 ${t}`});case $t.REQUEST_INPUT:case $t.QUESTION:return e(Me,{className:`size-4 ${t}`});case $t.THOUGHT:return r?i("purple"):e(Le,{className:`size-4 ${t}`});case $t.ERROR:return e(Ue,{className:`size-4 ${t}`});case $t.UPDATE:return r?i("green"):e(Re,{className:`size-4 ${t}`});case $t.PLAN:return r?i("amber"):e(Oe,{className:`size-4 ${t}`});default:return r?i("blue"):e(Le,{className:`size-4 ${t}`})}})()}),e("span",{className:"text-xs font-medium text-muted ",children:p.sender}),"main"!==k&&"all"!==k&&e(v,{variant:"default",className:"text-xs text-muted",children:k})]}),t("div",{className:"flex items-center gap-2 print:hidden",children:[e("span",{className:"text-xs text-muted",children:hn(n.timestamp).format("HH:mm:ss")}),e(x,{variant:"ghost",size:"xs",onClick:()=>{const e=f()||"",t="string"==typeof n.details?n.details:n.details?JSON.stringify(n.details,null,2):"",r=[e,t?"\n\nDetails:\n"+t:""].join("").trim();navigator.clipboard.writeText(r).then(()=>{h({status:"success",title:"Copied to clipboard",duration:2e3})})},className:"text-muted",title:"Copy message",children:e($e,{className:"size-3"})})]})]}),t("div",{className:"px-4 py-3 bg-white dark:bg-gray-900",children:[y&&e("div",{className:"message-content",children:o?t("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[e(wr,{color:"blue"}),e("span",{children:"Loading images..."})]}):g(s||y)}),w.length>0&&t("div",{className:"mt-3 text-xs",children:[e("div",{className:"font-medium text-muted mb-1",children:"Artifacts"}),w.some(e=>e.isImage)&&e("div",{className:"mb-2 flex flex-wrap gap-3",children:w.filter(e=>e.isImage).map(({displayName:n,artifactPath:r,url:i})=>t("div",{className:"max-w-xs cursor-pointer",onClick:()=>window.open(i,"_blank"),children:[e("img",{src:i,alt:n,className:"max-w-full h-auto rounded-lg shadow-sm hover:shadow-md transition-shadow"}),e("div",{className:"mt-1 text-[11px] text-muted truncate",children:n})]},`${r}-preview`))}),e("div",{className:"flex flex-wrap gap-2 print:hidden",children:w.map(({displayName:t,artifactPath:n,url:r})=>e(x,{variant:"outline",size:"xs",className:"px-2 py-1 text-xs",onClick:()=>window.open(r,"_blank"),title:n,children:t},n+r))})]}),n.details&&t("div",{className:"mt-2 print:hidden",children:[t("button",{onClick:()=>a(!i),className:"text-xs text-muted flex items-center",children:[i?"Hide":"Show"," details",e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 ml-1 transition-transform "+(i?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),i&&e("div",{className:"mt-2 p-2 bg-muted border border-mixer-muted/40 rounded text-sm",children:"string"==typeof n.details?g(n.details):e("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto bg-muted p-2 rounded text-muted ",children:JSON.stringify(n.details,null,2)})})]})]})]})}function Ar({workstreams:n,activeWorkstream:r,onSelectWorkstream:i,count:a,completionStatus:s}){const l=new Map;l.set("all","All Messages"),l.set("main","Main"),n.forEach((e,t)=>{"all"!==t&&"main"!==t&&"research_france"!==t&&"statistics"!==t&&l.set(t,e)}),n=l;const o=Array.from(n.entries()).sort(([e],[t])=>"all"===e?-1:"all"===t?1:"main"===e?-1:"main"===t?1:e.localeCompare(t)),c=o.length>2;return e("div",c?{className:"flex overflow-x-auto space-x-1 mb-2 bg-muted border-b-2 border-muted/20 sticky top-0 z-10",children:o.map(([n,l])=>t("button",{className:"px-2 py-1 text-xs font-medium whitespace-nowrap transition-colors flex items-center gap-1.5\n "+(r===n?"bg-info text-info border-b-2 border-info":"text-muted hover:bg-muted border-b-2 border-transparent"),onClick:()=>i(n),title:l.length>20?l:void 0,children:[l.length>20?l.substring(0,18)+"...":l,a&&a.has(n)&&a.get(n)>0&&t("div",{className:"flex items-center space-x-1",children:[e("span",{className:"inline-flex items-center justify-center p-1 text-xs rounded-full\n "+(r===n?"bg-info text-info":"bg-muted text-muted"),children:a.get(n)}),s&&"all"!==n&&(s.get(n)?e(Ve,{className:"size-3 text-success"}):e(Ke,{className:"size-3 text-attention"}))]})]},n))}:{className:"py-1"})}function zr(e,t){return"all"===t?[...e]:"main"===t?e.filter(e=>"main"===Tr(e)):e.filter(e=>Tr(e)===t)}const Er=l.memo(function({messages:r,bottomRef:i,viewMode:a="stacked",isCompleted:s=!1}){const u=l.useRef(null),[m,h]=c("all");d(()=>{i.current&&i.current.scrollIntoView({behavior:"smooth"})},[r,i]);const p=l.useMemo(()=>[...r].sort((e,t)=>("number"==typeof e.timestamp?e.timestamp:new Date(e.timestamp).getTime())-("number"==typeof t.timestamp?t.timestamp:new Date(t.timestamp).getTime())),[r]),f=l.useMemo(()=>{const e=function(e){const t=new Map;return t.set("all","All Messages"),t.set("main","Main"),e.forEach(e=>{e.workstream_id&&"main"!==e.workstream_id&&"all"!==e.workstream_id&&!t.has(e.workstream_id)&&(t.set(e.workstream_id,e.workstream_id),console.log(`Found workstream: ${e.workstream_id}`))}),t.size<=2&&!t.has("main")&&t.set("main","Main"),console.log("Final workstreams map:",t),t}(p);return e},[p]),g=l.useMemo(()=>{const e=new Map;e.set("all",p.length);const t=zr(p,"main");return e.set("main",t.length),p.forEach(t=>{const n=Tr(t);"main"!==n&&e.set(n,(e.get(n)||0)+1)}),e},[p]),y=l.useMemo(()=>"all"===m?p:zr(p,m),[p,m]),b=o(()=>{const e=new Map,t=new Map;p.forEach(e=>{const n=Tr(e);t.has(n)||t.set(n,[]),t.get(n).push(e)});for(const[n,r]of t.entries())if(r.length>0){const t=r[r.length-1];e.set(n,[$t.COMPLETE,$t.IDLE,$t.REQUEST_INPUT,$t.TERMINATED].includes(t.type))}return e},[p]);return t("div",{ref:u,className:"flex-1 min-h-0 h-full overflow-y-auto px-4 sm:px-2 lg:px-4 flex flex-col relative","data-testid":"all-messages-mixed",children:[e("div",{className:"sticky top-0 z-10",children:e(Ar,{workstreams:f,activeWorkstream:m,onSelectWorkstream:h,count:g,completionStatus:b})}),0===y.length?e("div",{className:"flex items-center justify-center h-full text-center py-8",children:e("div",{className:"flex items-center px-4 py-3 text-muted",children:"all"===m?"Waiting for agent response...":"No messages in this workstream yet..."})}):t("div",{className:"flex-1 flex flex-col justify-start pb-4 space-y-2",children:["stacked"===a?y.map((t,n)=>{const r=!s&&n===y.length-1&&!_r.includes(t.type);return e(Ir,{message:t,showPulsatingCircle:r},`${t.timestamp}-${n}`)}):e(n,{children:(()=>{const t=y.filter(e=>e.type===$t.ANSWER||e.type===$t.QUESTION||e.type===$t.COMPLETE||e.type===$t.IDLE||e.type===$t.REQUEST_INPUT||e.type===$t.TERMINATED),n=s?null:y.filter(e=>e.type===$t.THOUGHT||e.type===$t.UPDATE||e.type===$t.PLAN).sort((e,t)=>{const n="number"==typeof e.timestamp?e.timestamp:new Date(e.timestamp).getTime();return("number"==typeof t.timestamp?t.timestamp:new Date(t.timestamp).getTime())-n})[0],r=[...t];return n&&r.push(n),r.sort((e,t)=>("number"==typeof e.timestamp?e.timestamp:new Date(e.timestamp).getTime())-("number"==typeof t.timestamp?t.timestamp:new Date(t.timestamp).getTime())),r.map((t,n)=>{const i=!s&&n===r.length-1&&!_r.includes(t.type);return e(Ir,{message:t,showPulsatingCircle:i},`${t.timestamp}-${n}`)})})()}),e("div",{ref:i,className:"h-4"})]})]})});class Fr{vertesia;updateState;_interactive=!0;_debug_mode=!1;_collection;_start=!1;_preserveRunValues=!1;_interaction;_environment;_model="";_tool_names=[];_data;_interactionParamsSchema;_inputValidator;constructor(e,t){this.vertesia=e,this.updateState=t}onStateChanged(){const e=this.clone();this.updateState(e)}clone(){const e=new Fr(this.vertesia,this.updateState);return e._interactionParamsSchema=this._interactionParamsSchema,e._interaction=this._interaction,e._data=this._data,e._environment=this._environment,e._model=this._model,e._tool_names=[...this._tool_names],e._interactive=this._interactive,e._debug_mode=this._debug_mode,e._inputValidator=this._inputValidator,e._start=this._start,e._collection=this._collection,e._preserveRunValues=this._preserveRunValues,e}get interactive(){return this._interactive}set interactive(e){e!==this._interactive&&(this._interactive=e,this.onStateChanged())}get debug_mode(){return this._debug_mode}set debug_mode(e){e!==this._debug_mode&&(this._debug_mode=e,this.onStateChanged())}get collection(){return this._collection}set collection(e){e!==this._collection&&(this._collection=e,this.onStateChanged())}get search_scope(){return this._collection?Lt.Collection:void 0}async restoreConversation(e){let t=e.interaction;if(e.version){/^[a-fA-F0-9]{24}$/.test(t)||(t=`${t}@${e.version}`)}const n=await this.vertesia.interactions.catalog.resolve(t),r=n.runtime?.environment||e.config?.environment,i=e.config?.model,a=await(r?this.vertesia.environments.retrieve(e.config?.environment):Promise.resolve(void 0));this.interactionParamsSchema=e.interactionParamsSchema??null,this.interaction=n,this._tool_names=e.tool_names||[],this._data=e.data,this._interactive=e.interactive,this._debug_mode=e.debug_mode??!1,this.collection=e.collection_id??void 0,this.environment=a,i&&(this._model=i),this.onStateChanged()}get interaction(){return this._interaction}set interaction(e){if(e?.id!==this._interaction?.id){if(this._interaction=e,this.interactionParamsSchema=e?Ot(e.prompts):void 0,this._inputValidator=void 0,e&&!this._preserveRunValues&&e.runtime?.environment){const t=e.runtime.environment;this.vertesia.environments.retrieve(t).then(e=>this.environment=e)}this.onStateChanged()}}get environment(){return this._environment}set environment(e){if(e?.id!==this._environment?.id){if(this._environment=e,!this._preserveRunValues){const t=this.interaction?.runtime?.model;t&&e&&Rt(t,e.provider)?this._model=t:this._model=e?.default_model&&Rt(e.default_model,e.provider)?e.default_model:""}this.onStateChanged()}}get model(){return this._model}set model(e){e!==this._model&&(this._model=e||"",this.onStateChanged())}get tool_names(){return this._tool_names}set tool_names(e){this._tool_names=e,this.onStateChanged()}get data(){return this._data}set data(e){this._data=e,this.onStateChanged()}set run(e){console.log("run",e),this.onStateChanged()}set start(e){this._start!==e&&(this._start=e,this.onStateChanged())}get start(){return this._start}get preserveRunValues(){return this._preserveRunValues}set preserveRunValues(e){this._preserveRunValues=e}get interactionParamsSchema(){return this._interactionParamsSchema}set interactionParamsSchema(e){this._interactionParamsSchema!==e&&(this._interactionParamsSchema=e,this.onStateChanged())}reset(){if(this._start=!1,this._interactive=!0,this._debug_mode=!1,this._collection=void 0,this._preserveRunValues=!1,this._model="",this._environment=void 0,this._tool_names=[],this._interaction=void 0,this._data=void 0,this._interactionParamsSchema=null,this._inputValidator=void 0,this.model=void 0,this.environment=void 0,this.onStateChanged(),location.hash){const e=window.location.origin+window.location.pathname+window.location.search;history.replaceState(null,"",e),location.hash=""}}validateInput(){if(!this._interactionParamsSchema)return{isValid:!0};if(!this._inputValidator||this._inputValidator.schema!==this._interactionParamsSchema){const e=new pn({strict:!1});this._inputValidator={validate:e.compile(this._interactionParamsSchema),schema:this._interactionParamsSchema}}const e=this._data||{};if(!this._inputValidator.validate(e)){return{isValid:!1,errorMessage:this._inputValidator.validate.errors?this._inputValidator.validate.errors.map(e=>`${e.instancePath}: ${e.message}`).join(", "):"Invalid payload data"}}return{isValid:!0}}}const Dr=u(void 0);function $r({children:t}){const{client:n}=Dt(),[r,i]=c();return d(()=>{i(new Fr(n,i))},[]),r&&e(Dr.Provider,{value:r,children:t})}function Lr(){const e=m(Dr);if(!e)throw new Error("usePayloadBuilder must be used within a PayloadProvider");return e}function Or({title:n,onClose:r,isModal:i,run:a,viewMode:s,onViewModeChange:l,showPlanPanel:o,hasPlan:c=!1,onTogglePlanPanel:d,onDownload:u,onCopyRunId:m,resetWorkflow:h,onExportPdf:p}){return e($r,{children:t("div",{className:"flex flex-wrap items-end justify-between py-1.5 px-2 border-b shadow-sm flex-shrink-0",children:[t("div",{className:"flex flex-wrap items-center space-x-2",children:[t("div",{className:"flex items-center space-x-1",children:[e(Le,{className:"size-5 text-muted"}),e("span",{className:"font-medium",children:n})]}),t("span",{className:"text-xs text-muted ml-1",children:["(Run ID: ",a.runId.substring(0,8),"...)"]})]}),t("div",{className:"flex justify-end items-center space-x-2 ml-auto",children:[t("div",{className:"flex items-center space-x-1 bg-muted rounded p-0.5",children:[e(x,{variant:"stacked"===s?"outline":"ghost",size:"xs",className:"rounded-l-md",onClick:()=>l("stacked"),children:"Details"}),e(x,{variant:"sliding"===s?"outline":"ghost",size:"xs",className:"rounded-l-md",onClick:()=>l("sliding"),children:"Most Important"})]}),t("div",{className:"relative",children:[c&&!o&&e("span",{className:"absolute -top-1 -right-1 w-2.5 h-2.5 bg-primary rounded-full border border-border z-10"}),t(x,{size:"sm",variant:o?"primary":"secondary",onClick:d,className:"transition-all duration-200 rounded-md",title:"Toggle plan panel",children:[e(qe,{className:"size-4 mr-1.5"}),e("span",{className:"font-medium text-xs",children:o?"Hide Plan":"Show Plan"})]})]}),e(Rr,{run:a,isModal:i,onClose:r,onDownload:u,onCopyRunId:m,resetWorkflow:h,onExportPdf:p}),r&&!i&&e(x,{size:"xs",variant:"ghost",onClick:r,children:e(Be,{className:"size-4"})})]})]})})}function Rr({run:n,isModal:r,onClose:i,onDownload:a,onCopyRunId:s,resetWorkflow:l,onExportPdf:o}){const c=b(),{client:d}=Dt(),u=Lr();return t(w,{hover:!0,children:[e(N,{children:e(x,{size:"xs",variant:"ghost",title:"More actions",children:e(We,{className:"size-4"})})}),e(k,{className:"w-48",align:"end",children:e("div",{className:"rounded-md shadow-lg z-50",children:e("div",{className:"py-1 min-w-36",children:e(C,{children:e(S,{children:t(P,{children:[e("div",{className:"flex items-center px-3 py-1.5 text-xs text-gray-700 dark:text-gray-300",children:e("span",{className:"text-muted",children:"Actions"})}),r&&t(j,{className:"text-xs",onSelect:()=>{return e=`/store/agent-runner?agentId=${n.runId}__${n.workflowId}`,window.open(e,"_blank"),e;var e},children:[e(Ge,{className:"size-3.5 mr-2 text-muted"})," Open in new tab"]}),t(j,{className:"text-xs",onSelect:()=>{s?s():(navigator.clipboard.writeText(n.runId),c({status:"success",title:"Run ID copied",duration:2e3}))},children:[e($e,{className:"size-3.5 mr-2 text-muted"})," Copy Run ID"]}),t(j,{className:"text-xs",onSelect:()=>{a?a():async function(e,t){return e.files.getDownloadUrl(`agents/${t}/conversation.json`).then(e=>e.url)}(d,n.runId).then(e=>window.open(e,"_blank"))},children:[e(He,{className:"size-3.5 mr-2 text-muted"})," Download Conversation"]}),o&&t(j,{className:"text-xs",onSelect:o,children:[e(He,{className:"size-3.5 mr-2 text-muted"})," Export as PDF"]}),i&&r&&t(j,{className:"text-xs",onSelect:i,children:[e(Be,{className:"size-3.5 mr-2 text-muted"})," Close"]}),t(j,{className:"text-xs text-destructive",onSelect:()=>{(async e=>{try{return await d.store.workflows.terminate(e.workflowId,e.runId,"cancel"),c({status:"success",title:"Workflow cancelled",duration:2e3}),u.reset(),l?.(),!0}catch(e){return c({status:"error",title:"Failed to cancel workflow",duration:2e3}),!1}})(n)},children:[e(Be,{className:"size-3.5 mr-2 text-destructive"})," Cancel Workflow"]})]})})})})})})]})}const Ur="vertesia.content_store.lastDisplayedView";function Mr({onUpdate:t}){const[n,r]=c("grid"===localStorage.getItem(Ur)),i=()=>{localStorage.setItem(Ur,"grid"),r(!0),t(!0)},a=()=>{localStorage.setItem(Ur,"table"),r(!1),t(!1)};return e(x,{variant:"outline",onClick:()=>{n?a():i()},alt:n?"Table View":"Thumbnail View",children:e(n?Je:Ye,{})})}function Vr(e,t=7){return e?"~"+e.slice(-t):""}function Kr(e,t){return e.length>t?e.substring(0,t)+"...":e}Mr.LAST_DISPLAYED_VIEW=Ur;const qr="text/csv",Br="image/",Wr="application/pdf",Gr="video/",Hr=["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-powerpoint"],Jr=e=>e===qr||qr.includes(e),Yr=e=>e.startsWith(Br)||Br.includes(e),Zr=e=>e===Wr||Wr.includes(e),Qr=e=>e.startsWith(Gr)||Gr.includes(e),Xr=e=>Hr.includes(e),ei=import.meta.env,ti={max_hw:ei?.VITE_RENDITION_HW||256,format:Ut.jpeg,generate_if_missing:!0},ni="vertesia.content_store.renditionId";async function ri(e,t,n,r,i){if(!t?.content?.type||!(Yr(t.content.type)||Qr(t.content.type)||Zr(t.content.type)))return void i("No preview available");i("Preparing preview...");const a=(new Date).getTime()/1e3,s=localStorage.getItem(`${ni}_${t.id}_${ti.max_hw}`),l=localStorage.getItem(`${ni}_${t.id}_${ti.max_hw}_time`);if(s?.length&&l&&Math.abs(a-parseInt(l))<=900)return n(s),r(`${t.name} Rendition`),i("ready"),s;i("Preparing preview..."),e.objects.getRendition(t.id,ti).then(a=>{if("generating"===a.status)i("Preparing preview..."),n(""),r(""),setTimeout(()=>ri(e,t,n,r,i),6e4);else{if("failed"===a.status)return i("No preview available"),n(""),void r("");{if(!a?.renditions?.length)return i("No preview available"),n(""),void r("");const e=a.renditions[0];localStorage.setItem(`${ni}_${t.id}_${ti.max_hw}`,e),localStorage.setItem(`${ni}_${t.id}_${ti.max_hw}_time`,((new Date).getTime()/1e3).toString()),n(e),r(`${t.name} Rendition`),i("ready"),console.log(`Rendition for document ${t.id} retrieved successfully: ${e}`)}}}).catch(e=>{i("No preview available"),console.warn("Failed to retrieve rendition:",e),n(""),r("")})}function ii(e,t){if("undefined"==typeof window||"undefined"==typeof document)return!1;const n=document.createElement("iframe");n.style.position="fixed",n.style.right="0",n.style.bottom="0",n.style.width="0",n.style.height="0",n.style.border="0",n.style.visibility="hidden",document.body.appendChild(n);const r=n.contentWindow;if(!r)return n.parentNode?.removeChild(n),!1;const i=r.document;i.open(),i.write(`<!doctype html><html><head><title>${t}</title></head><body></body></html>`),i.close(),i.title=t;document.querySelectorAll('link[rel="stylesheet"], style').forEach(e=>{i.head.appendChild(e.cloneNode(!0))});const a=i.createElement("style");return a.textContent='\n@media print {\n body {\n margin: 24px;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #111827;\n background-color: #ffffff;\n }\n\n .vprose {\n max-width: 800px;\n margin: 0 auto;\n }\n\n .vprose h1 {\n font-size: 24px;\n font-weight: 700;\n margin: 1.5rem 0 0.75rem;\n }\n\n .vprose h2 {\n font-size: 20px;\n font-weight: 600;\n margin: 1.25rem 0 0.75rem;\n }\n\n .vprose h3 {\n font-size: 18px;\n font-weight: 600;\n margin: 1rem 0 0.5rem;\n }\n\n .vprose p {\n margin: 0 0 0.5rem;\n }\n\n .vprose ul,\n .vprose ol {\n margin: 0.5rem 0 0.5rem 1.5rem;\n padding: 0;\n }\n\n .vprose li {\n margin: 0.25rem 0;\n }\n\n .vprose table {\n width: 100%;\n border-collapse: collapse;\n margin: 1rem 0;\n }\n\n .vprose th,\n .vprose td {\n border: 1px solid #d1d5db;\n padding: 0.5rem 0.75rem;\n vertical-align: top;\n }\n\n .vprose thead th {\n background-color: #f3f4f6;\n font-weight: 600;\n }\n\n .vprose pre,\n .vprose code {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;\n font-size: 12px;\n }\n\n .vprose pre {\n padding: 0.75rem;\n border-radius: 4px;\n border: 1px solid #e5e7eb;\n background-color: #f9fafb;\n white-space: pre-wrap;\n word-break: break-word;\n }\n\n /* Hide chart action buttons when printing */\n .chart-actions {\n display: none !important;\n }\n\n /* Hide interactive elements in agent conversation when printing */\n .print-hidden,\n [class*="print:hidden"],\n button[title="Copy message"],\n button[title="Copy to clipboard"],\n button[title="Export as PNG"],\n .message-actions {\n display: none !important;\n }\n\n /* Prevent page breaks inside elements */\n .vprose table,\n .vprose pre,\n .vprose blockquote,\n .vprose figure,\n .vprose img,\n .recharts-wrapper,\n [class*="chart"],\n [class*="Chart"] {\n break-inside: avoid;\n page-break-inside: avoid;\n }\n\n /* Keep headings with following content */\n .vprose h1,\n .vprose h2,\n .vprose h3,\n .vprose h4,\n .vprose h5,\n .vprose h6 {\n break-after: avoid;\n page-break-after: avoid;\n }\n\n /* Keep list items together when possible */\n .vprose li {\n break-inside: avoid;\n page-break-inside: avoid;\n }\n}\n',i.head.appendChild(a),i.body.innerHTML=e.innerHTML,r.focus(),r.print(),setTimeout(()=>{n.parentNode?.removeChild(n)},1e3),!0}function ai(e){switch(e){case Mt.RUNNING:return"text-info";case Mt.COMPLETED:return"text-success";case Mt.FAILED:return"text-destructive";case Mt.TERMINATED:case Mt.CANCELED:return"text-attention";default:return"text-muted"}}function si(e){switch(e){case Mt.RUNNING:return"Running";case Mt.COMPLETED:return"Completed";case Mt.FAILED:return"Failed";case Mt.CONTINUED_AS_NEW:return"Continued As New";case Mt.TERMINATED:return"Terminated";case Mt.TIMED_OUT:return"Timed Out";case Mt.CANCELED:return"Canceled";default:return"Unknown"}}class li extends D{labelOf(e){return e.label}idOf(e){return e.id}renderOption(n){return t("div",{children:[e("div",{className:"font-medium",children:n.label}),e("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:n.description})]})}}function oi({isOpen:n,onClose:r,onConfirm:i,isLoading:a,uploadedFileName:s}){const l=[{id:"update",label:"Update current version",description:s?"Replace the content file and modify properties directly in the current revision.":"Modify the properties directly in the current revision."},{id:"new-version",label:"Create new version",description:s?"Create a new revision with the replacement file while preserving the original.":"Create a new revision with these property changes while preserving the original."}],o=s?l[1]:l[0],[u,m]=c(o),[h,p]=c(""),f=new li;d(()=>{n&&(m(o),p(""))},[n,s]);const g="new-version"===u?.id;return t(_,{isOpen:n,onClose:r,className:"sm:max-w-md",children:[e(T,{children:"Save Changes"}),e(I,{children:t("div",{className:"space-y-4",children:[s&&e("div",{className:"mb-4 p-3 bg-blue-50 dark:bg-blue-900/20 rounded-md",children:t("p",{className:"text-sm text-blue-700 dark:text-blue-300 font-medium",children:["You're about to replace the content file with: ",e("span",{className:"font-bold",children:s})]})}),e("p",{className:"text-sm text-mixer-muted/5",children:"How would you like to save these changes?"}),e(A,{adapter:f,options:l,value:u,onChange:e=>{m(e)},gap:"gap-4"}),g&&e(z,{label:"Version Label (Optional)",description:"Optional label for the new version.",className:"mt-3 pl-8",children:e(E,{value:h,onChange:p,placeholder:"e.g., v1.2, approved, post-review",className:"w-full"})})]})}),t(F,{children:[e(x,{variant:"secondary",onClick:r,disabled:a,children:"Cancel"}),e(x,{variant:"primary",onClick:async()=>{await i(g,g?h:void 0)},isLoading:a,children:"Save"})]})]})}function ci({isOpen:r,onClose:i,object:a,refetch:s}){const{client:l,store:o}=Dt(),u=b(),m=Qt(),[p,f]=c(!1),[g,y]=c(""),[v,w]=c(!1),[N,k]=c(null),C=h(null),S=h(null),[P,j]=c(null),[A,z]=c(null);function E(e,t){e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:[{uri:"http://myserver/object-schema.json",fileMatch:["*"],schema:t}]})}return d(()=>{r&&(y(JSON.stringify(a.properties||{},null,2)),a.type?.id&&async function(e){try{const t=await o.types.retrieve(e);t.object_schema&&(j(t.object_schema),S.current&&E(S.current,t.object_schema))}catch(e){console.error("Failed to fetch JSON schema:",e)}}(a.type.id))},[r,a]),t(n,{children:[t(_,{isOpen:r,onClose:i,className:"sm:max-w-[90%] md:max-w-[80%] lg:max-w-[75%] xl:max-w-[70%]",children:[e(T,{children:"Edit Properties"}),t(I,{children:[t("div",{className:"mb-2 text-sm text-gray-500",children:[a.type?.name?t("span",{children:["Editing properties for object type: ",e("strong",{children:a.type.name})]}):e("span",{children:"Editing properties for generic document"}),P&&e("span",{className:"ml-2 text-green-600",children:"(JSON schema validation enabled)"})]}),e("div",{className:"h-[75vh] border border-gray-300 dark:border-gray-700 rounded-md",children:e(gn,{height:"100%",language:"json",value:g,onChange:e=>y(e||""),onMount:function(e,t){C.current=e,S.current=t,P&&E(t,P)},options:{minimap:{enabled:!1},scrollBeyondLastLine:!1,formatOnPaste:!0,formatOnType:!0,automaticLayout:!0,wordWrap:"on"}})})]}),t(F,{children:[e(x,{variant:"secondary",onClick:i,children:"Cancel"}),e(x,{variant:"primary",onClick:function(){if(!C.current)return;const e=C.current.getValue();try{const t=JSON.parse(e);k(t),w(!0)}catch(e){u({status:"error",title:"Invalid JSON",description:"Please fix the JSON syntax errors before saving.",duration:5e3})}},children:"Save Changes"})]})]}),e(oi,{isOpen:v,onClose:function(){w(!1)},onConfirm:async function(e,t){try{f(!0);const n=N||JSON.parse(g);if(e){const e=await l.objects.update(a.id,{properties:n},{createRevision:!0,revisionLabel:t});e.id!==a.id&&z(e.id),u({status:"success",title:"New version created",description:"A new version with updated properties has been created.",duration:2e3}),w(!1),i(),e.id!==a.id&&setTimeout(()=>{m(`/objects/${e.id}`),u({status:"info",title:"Viewing New Version",description:t?`Now viewing version '${t}'`:"Now viewing the new version",duration:3e3})},100)}else await o.objects.update(a.id,{properties:n}),u({status:"success",title:"Properties updated",description:"The object properties have been updated successfully.",duration:2e3}),s&&await s(),w(!1),i()}catch(e){u({status:"error",title:"Error updating properties",description:e.message||"An error occurred while updating the properties.",duration:5e3}),f(!1)}},isLoading:p})]})}function di({className:t,size:n="md"}){return e("div",{className:`flex items-center justify-center ${t||""}`,children:e(Ze,{className:`${{sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"}[n]} animate-spin text-muted-foreground`})})}function ui({pdfUrl:n,pageNumber:r,width:i,className:a,renderTextLayer:s=!1,renderAnnotationLayer:l=!1,onLoadSuccess:o,onError:d}){const[u,m]=c(!0),[h,p]=c(null);return h?e("div",{className:`flex items-center justify-center text-destructive text-sm ${a||""}`,children:"Failed to load PDF"}):t("div",{className:a,children:[u&&e(di,{className:"py-4",size:"md"}),e(bn,{file:n,onLoadSuccess:({numPages:e})=>{m(!1),o?.(e)},onLoadError:e=>{m(!1),p(e),d?.(e)},loading:null,children:e(vn,{pageNumber:r,width:i,renderTextLayer:s,renderAnnotationLayer:l,loading:e(di,{className:"py-4",size:"sm"})})})]})}yn.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${yn.version}/build/pdf.worker.min.mjs`;const mi=u(null);function hi({pdfUrl:t,urlLoading:n=!1,children:r,onLoadSuccess:i}){const[a,s]=c(0),[l,o]=c(!0),[d,u]=c(null),[m,h]=c(null),p={pdfUrl:t,numPages:a,loading:n||!t||l,error:d,pageDimensions:m};return d?e("div",{className:"flex items-center justify-center text-destructive text-sm py-4",children:"Failed to load PDF"}):e(mi.Provider,{value:p,children:t?e(bn,{file:t,onLoadSuccess:async e=>{s(e.numPages),i?.(e.numPages);try{const t=(await e.getPage(1)).getViewport({scale:1});h({width:t.width,height:t.height,aspectRatio:t.width/t.height})}catch(e){console.error("Failed to get page dimensions:",e)}o(!1)},onLoadError:e=>{o(!1),u(e)},loading:e(di,{className:"py-4",size:"md"}),children:r((t,n)=>e(vn,{pageNumber:t,width:n,renderTextLayer:!1,renderAnnotationLayer:!1,loading:e(di,{className:"py-4",size:"sm"})},t))}):e(di,{className:"py-4",size:"md"})})}function pi(){return m(mi)}const fi=210/297;function gi({pageNumber:t,width:n,className:r}){const i=pi(),a=i?.pageDimensions?.aspectRatio??fi,s=n?Math.round(n/a):200;return e("div",i?.loading?{className:`flex items-center justify-center bg-muted ${r||""}`,style:{height:s,width:n||"100%"},children:e(di,{size:"md"})}:{className:r,children:e(vn,{pageNumber:t,width:n,renderTextLayer:!1,renderAnnotationLayer:!1,loading:e(di,{className:"py-4",size:"sm"})})})}function yi({pageNumber:t,width:n,isSelected:r,onSelect:i,renderThumbnail:a,aspectRatio:s=fi,rootMargin:l="200px 0px"}){const o=h(null),[u,m]=c(!1);d(()=>{const e=o.current;if(!e)return;const t=new IntersectionObserver(e=>{const t=e[0];t?.isIntersecting&&m(!0)},{rootMargin:l,threshold:0});return t.observe(e),()=>t.disconnect()},[l]);const p=n?Math.round(n/s):200,f=u?e(vn,{pageNumber:t,width:n,renderTextLayer:!1,renderAnnotationLayer:!1,loading:e("div",{className:"flex items-center justify-center bg-muted",style:{height:p},children:e(di,{size:"sm"})})}):e("div",{className:"flex items-center justify-center bg-muted",style:{height:p,width:n||"100%"},children:e("span",{className:"text-muted-foreground text-xs",children:t})});return e("div",{ref:o,children:a({pageNumber:t,isSelected:r,pageElement:f,onSelect:i})})}function bi({pdfUrl:r,urlLoading:i=!1,pageCount:a,currentPage:s,thumbnailWidth:l,onPageSelect:o,renderThumbnail:u,scrollContainerRef:m,onAspectRatioChange:f,onItemHeightChange:g,calculateItemHeight:y,onPageCountChange:b}){const[v,x]=c(null),[w,N]=c({start:0,end:Math.min(15,a)}),[k,C]=c(null),S=h(null),P=p(e=>{x(e)},[]),j=p(async e=>{b?.(e.numPages);try{const t=(await e.getPage(1)).getViewport({scale:1}),n=t.width/t.height;C(n),f?.(n)}catch(e){console.error("Failed to get page dimensions:",e),C(fi),f?.(fi)}},[f,b]),_=k??fi,T=l?Math.round(l/_):200,I=y?y(T):T+16+24+8;d(()=>{I>0&&null!==k&&g?.(I)},[I,k,g]);if(d(()=>{const e=m?.current||function(e){if(!e)return null;let t=e.parentElement;for(;t;){const e=window.getComputedStyle(t).overflowY;if("auto"===e||"scroll"===e)return t;t=t.parentElement}return null}(S.current);if(!e)return;const t=()=>{const t=e.scrollTop,n=e.clientHeight,r=Math.floor(t/I),i=Math.ceil((t+n)/I),s=Math.max(0,r-5),l=Math.min(a,i+5);N(e=>e.start!==s||e.end!==l?{start:s,end:l}:e)};return t(),e.addEventListener("scroll",t,{passive:!0}),()=>e.removeEventListener("scroll",t)},[I,a,m]),v)return e("div",{className:"flex items-center justify-center text-destructive text-sm py-4",children:"Failed to load PDF"});if(i||!r)return e(di,{className:"py-4",size:"md"});const A=w.start*I,z=(a-w.end)*I,E=null!==k;return e("div",{ref:S,children:e(bn,{file:r,onLoadSuccess:j,onLoadError:P,loading:e(di,{className:"py-4",size:"md"}),children:E?t(n,{children:[A>0&&e("div",{style:{height:A}}),Array.from({length:w.end-w.start},(t,n)=>{const r=w.start+n+1;return e("div",{"data-page-index":r-1,style:{height:I,overflow:"hidden"},children:e(yi,{pageNumber:r,width:l,isSelected:r===s,onSelect:()=>o(r),renderThumbnail:u,aspectRatio:_})},r)}),z>0&&e("div",{style:{height:z}})]}):e(di,{className:"py-4",size:"md"})})})}function vi({pdfUrl:n,pageNumber:r,width:i,height:a,className:s,renderTextLayer:l=!1,renderAnnotationLayer:o=!1,onPageChange:u}){const[m,h]=c(0),[p,f]=c(!0),[g,y]=c(null);d(()=>{m>0&&u?.(r,m)},[r,m,u]);return g?e("div",{className:`flex items-center justify-center text-destructive ${s||""}`,children:t("span",{children:["Failed to load PDF: ",g.message]})}):t("div",{className:s,children:[p&&e(di,{className:"py-8",size:"lg"}),e(bn,{file:n,onLoadSuccess:({numPages:e})=>{h(e),f(!1)},onLoadError:e=>{f(!1),y(e)},loading:null,children:e(vn,{pageNumber:Math.min(r,m||1),width:i,height:a,renderTextLayer:l,renderAnnotationLayer:o,loading:e(di,{className:"py-8",size:"md"})})})]})}const xi=210/297,wi=[50,75,100,125,150,200,300];function Ni({pdfUrl:i,pdfUrlLoading:a=!1,pageCount:s,currentPage:l,onChange:o,onPageCountChange:u,className:m,compact:f=!1,headerExtra:g}){const y=h(null),b=h(null),[v,w]=c(void 0),[N,k]=c(100),[C,S]=c(xi),[P,j]=c(null),_=h(null),T=v?Math.round(v*N/100):void 0,I=p(()=>{let e=wi.findIndex(e=>e>=N);-1===e&&(e=wi.length-1);const t=Math.min(e+1,wi.length-1);k(wi[t])},[N]),A=p(()=>{let e=wi.findIndex(e=>e>=N);-1===e&&(e=wi.length-1);const t=Math.max(e-1,0);k(wi[t])},[N]),z=p(()=>{k(100)},[]),E=p(e=>e+(f?28:48),[f]),F=(e,t)=>{const n=e?Math.round(e/t):200;return E(n)};d(()=>{const e=b.current;if(!e)return;let t=null;const n=()=>e.clientWidth-16-16-4,r=()=>{const t=n();if(t<=0)return;const r=_.current;if(r&&r>0){const n=e.scrollTop,i=Math.round(n/r),a=F(t,C),s=i*a;w(t),requestAnimationFrame(()=>{e.scrollTo({top:s,behavior:"instant"})}),_.current=a}else w(t),_.current=F(t,C)},i=n();i>0&&(w(i),_.current=F(i,C));const a=new ResizeObserver(()=>{t&&clearTimeout(t),t=setTimeout(r,150)});return a.observe(e),()=>{t&&clearTimeout(t),a.disconnect()}},[C]);const D=h(!1),L=h(null),O=h(N);d(()=>{O.current!==N&&(O.current=N,L.current={targetPage:l},D.current=!0)},[N,l]),d(()=>{const e=b.current,t=L.current;if(t&&e&&P){L.current=null;const n=(t.targetPage-1)*P;requestAnimationFrame(()=>{e.scrollTo({top:n,behavior:"instant"}),requestAnimationFrame(()=>{D.current=!1})})}},[P]);const R=h(!1);d(()=>{const e=b.current;if(e&&P&&!R.current)if(l>1){R.current=!0,D.current=!0;const t=(l-1)*P;e.scrollTo({top:t,behavior:"instant"}),requestAnimationFrame(()=>{D.current=!1})}else R.current=!0},[P,l]);const U=h(l);d(()=>{const e=b.current;if(e&&P&&U.current!==l){U.current=l,D.current=!0;const t=(l-1)*P;e.scrollTo({top:t,behavior:"instant"}),requestAnimationFrame(()=>{D.current=!1})}},[l,P]),d(()=>{const e=b.current;if(!e||!P)return;let t=null;const n=()=>{D.current||(t&&clearTimeout(t),t=setTimeout(()=>{const t=e.scrollTop,n=Math.round(t/P)+1,r=Math.max(1,Math.min(n,s));r!==l&&(U.current=r,o(r))},50))};return e.addEventListener("scroll",n,{passive:!0}),()=>{t&&clearTimeout(t),e.removeEventListener("scroll",n)}},[P,s,l,o]);return t("div",{ref:y,className:r("flex flex-col items-stretch",f?"gap-y-1":"gap-y-2",m),children:[t("div",{className:r("relative flex items-center justify-center px-2",f?"h-6":"h-9"),children:[e(x,{variant:"ghost",size:"xs",onClick:()=>{l>1&&o(l-1)},alt:"Previous page",children:e(Qe,{className:"size-4"})}),t("div",{className:"absolute left-2 flex items-center gap-x-1",children:[e(Ci,{zoom:N,onZoomIn:I,onZoomOut:A,onFitToView:z,canZoomIn:N<wi[wi.length-1],canZoomOut:N>wi[0]}),g&&t(n,{children:[e("div",{className:"w-px h-4 bg-border mx-1"}),g]})]}),e("div",{className:"absolute right-2",children:e(ki,{currentPage:l,totalPages:s,onChange:o})})]}),e("div",{ref:b,className:r("flex flex-col items-center flex-1 overflow-y-auto px-2",f?"gap-1":"gap-2"),children:e(bi,{pdfUrl:i,urlLoading:a,pageCount:s,currentPage:l,thumbnailWidth:T,onPageSelect:o,onPageCountChange:u,scrollContainerRef:b,onAspectRatioChange:S,onItemHeightChange:j,calculateItemHeight:E,renderThumbnail:({pageNumber:n,isSelected:i,pageElement:a,onSelect:s})=>t("div",{className:r("hover:bg-muted rounded-md w-full",f?"p-1":"p-2"),children:[e("div",{className:r("relative border-[2px] cursor-pointer overflow-hidden",i?"border-primary":"border-border"),onClick:s,children:a}),e($,{className:r("text-muted-foreground font-semibold",f?"text-xs pt-0.5":"text-sm pt-1"),children:n})]},n)})}),e("div",{className:r("flex items-center justify-center",f?"h-6":"h-9"),children:e(x,{variant:"ghost",size:"xs",onClick:()=>{l<s&&o(l+1)},alt:"Next page",children:e(Xe,{className:"size-4"})})})]})}function ki({currentPage:n,totalPages:r,onChange:i}){const a=h(null),[s,l]=c(String(n));d(()=>{l(String(n))},[n]);const o=()=>{const e=parseInt(s,10);!isNaN(e)&&e>=1&&e<=r?i(e):l(String(n))};return t("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e("span",{children:"Page"}),e("input",{ref:a,type:"text",value:s,onChange:e=>l(e.target.value),onKeyDown:e=>{"Enter"===e.key?(o(),a.current?.blur()):"Escape"===e.key&&(l(String(n)),a.current?.blur())},onBlur:()=>{o()},className:"w-8 h-5 text-center text-xs px-1 py-0 bg-background border border-border rounded focus:outline-none focus:border-primary"}),t("span",{children:["/ ",r]})]})}function Ci({zoom:n,onZoomIn:i,onZoomOut:a,onFitToView:s,canZoomIn:l,canZoomOut:o}){return t("div",{className:"flex items-center gap-x-0.5",children:[e(L,{description:"Zoom out",placement:"bottom",size:"xs",children:e("button",{className:r("p-1 rounded cursor-pointer transition-colors",o?"text-muted-foreground hover:text-foreground hover:bg-muted":"text-muted-foreground/40 cursor-not-allowed"),onClick:a,disabled:!o,children:e(et,{className:"size-4"})})}),t("span",{className:"text-xs text-muted-foreground min-w-[32px] text-center",children:[n,"%"]}),e(L,{description:"Zoom in",placement:"bottom",size:"xs",children:e("button",{className:r("p-1 rounded cursor-pointer transition-colors",l?"text-muted-foreground hover:text-foreground hover:bg-muted":"text-muted-foreground/40 cursor-not-allowed"),onClick:i,disabled:!l,children:e(tt,{className:"size-4"})})}),e(L,{description:"Fit to width",placement:"bottom",size:"xs",children:e("button",{className:r("p-1 rounded cursor-pointer transition-colors",100!==n?"text-muted-foreground hover:text-foreground hover:bg-muted":"text-muted-foreground/40"),onClick:s,children:e(nt,{className:"size-4"})})})]})}const Si="magic-pdf";var Pi;!function(e){e.original="original",e.instrumented="instrumented"}(Pi||(Pi={}));class ji{client;objectId;totalPages;cache=new Map;pending=new Map;constructor(e,t,n){this.client=e,this.objectId=t,this.totalPages=n}getCacheKey(e,t){return`${t}-${e}`}async getPageImageUrl(e,t){const n=this.getCacheKey(e,t),r=this.cache.get(n);if(r)return r;const i=this.pending.get(n);if(i)return i;const a=this.fetchImageUrl(e,t);this.pending.set(n,a);try{const e=await a;return this.cache.set(n,e),e}finally{this.pending.delete(n)}}async fetchImageUrl(e,t){const n=this.getImagePath(e,t);return(await this.client.files.getDownloadUrl(n)).url}getImagePath(e,t){const n=`${Si}/${this.objectId}/pages`;switch(t){case Pi.original:return`${n}/page-${e}.original.jpg`;case Pi.instrumented:return`${n}/page-${e}.instrumented.jpg`}}}class _i{client;objectId;totalPages;cache=new Map;pending=new Map;constructor(e,t,n){this.client=e,this.objectId=t,this.totalPages=n}async getPageLayout(e){const t=this.cache.get(e);if(void 0!==t)return t;const n=this.pending.get(e);if(n)return n;const r=this.fetchPageLayout(e);this.pending.set(e,r);try{const t=await r;return this.cache.set(e,t),t}finally{this.pending.delete(e)}}async fetchPageLayout(e){const t=`${Si}/${this.objectId}/pages/page-${e}.layout.json`,n=await this.client.files.getDownloadUrl(t),r=await fetch(n.url,{method:"GET"});if(!r.ok)throw new Error("Failed to fetch json layout: "+r.statusText);return r.text()}}class Ti{totalPages;pages=[];constructor(e){this.totalPages=e}initFromContent(e){this.pages=function(e,t){const n=new Array(t).fill(""),r=/<!--\s*\{\s*"page"\s*:\s*(\d+)\s*\}\s*-->/g,i=[];let a;for(;null!==(a=r.exec(e));)i.push({page:parseInt(a[1],10),index:a.index+a[0].length});for(let r=0;r<i.length;r++){const a=i[r],s=a.page-1;if(s<0||s>=t)continue;const l=a.index,o=e.slice(l).match(/<!--\s*\{\s*"page"\s*:\s*\d+\s*\}\s*-->/),c=o?l+o.index:e.length;let d=e.slice(l,c).trim();d=d.replace(/\n---\s*$/,"").trim(),n[s]=d}return n}(e,this.totalPages)}async loadUrls(e,t){}async getPageMarkdown(e){const t=e-1;return t<0||t>=this.pages.length?"":this.pages[t]}}const Ii=u(void 0);function Ai({children:t,object:n}){const{client:r}=Dt(),i=n.metadata.page_count||10,a="markdown"===n.metadata?.content_processor?.type,[s,l]=c(()=>{const e=new Ti(i);a&&n.text&&e.initFromContent(n.text);const t=n.text?Fi(n.text):"";return{count:i,layoutProvider:new _i(r,n.id,i),markdownProvider:e,imageProvider:new ji(r,n.id,i),xml:t,xmlPages:n.text?Ei(t):[],pdfUrl:"",pdfUrlLoading:!0}});return d(()=>{if(a){const e=n.metadata,t=e?.renditions?.find(e=>e.name===Vt),i="application/pdf"===n.content?.type,a=t?.content?.source||(i?n.content?.source:void 0);a?r.store.objects.getDownloadUrl(a,void 0,"inline").then(e=>{l(t=>({...t,pdfUrl:e.url,pdfUrlLoading:!1}))}).catch(e=>{console.warn("Failed to get PDF URL:",e),l(e=>({...e,pdfUrlLoading:!1}))}):l(e=>({...e,pdfUrlLoading:!1}))}else l(e=>({...e,pdfUrlLoading:!1}))},[n.id,r,a,i]),e(Ii.Provider,{value:s,children:t})}function zi(){const e=l.useContext(Ii);if(!e)throw new Error("useMagicPdfContext must be used within a MagicPdfProvider");return e}function Ei(e){const t=(new DOMParser).parseFromString(Fi(e),"text/xml").getElementsByTagName("page"),n=new XMLSerializer;return Array.from(t).map(e=>n.serializeToString(e))}function Fi(e){return e.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g,"").replace(/<\?xml.*?\?>/g,"")}const Di=[50,75,100,125,150,200,300],$i=11/8.5;function Li({className:n,currentPage:i,onChange:a}){const[s,l]=c(Pi.instrumented),[o,u]=c($i),[m,f]=c(new Map),[g,y]=c(100),b=h(new Set),v=h(null),w=h(null),N=h(!1),{imageProvider:k,count:C}=zi(),S=p(()=>{let e=Di.findIndex(e=>e>=g);-1===e&&(e=Di.length-1);const t=Math.min(e+1,Di.length-1);y(Di[t])},[g]),P=p(()=>{let e=Di.findIndex(e=>e>=g);-1===e&&(e=Di.length-1);const t=Math.max(e-1,0);y(Di[t])},[g]),j=p(()=>{y(100)},[]);d(()=>{k.getPageImageUrl(1,s).then(e=>{const t=new window.Image;t.onload=()=>{t.width>0&&t.height>0&&u(t.height/t.width)},t.src=e}).catch(()=>{})},[k,s]);const _=h(s);d(()=>{let e=!1;_.current!==s&&(_.current=s,b.current=new Set,f(new Map));const t=function(e,t){const n=[e];let r=1;for(;n.length<t;){const i=e+r,a=e-r;i<=t&&n.push(i),a>=1&&n.push(a),r++}return n}(i,C);return t.forEach(t=>(async t=>{if(!e&&!b.current.has(t))try{const n=await k.getPageImageUrl(t,s);e||(b.current.add(t),f(e=>new Map(e).set(t,n)))}catch{}})(t)),()=>{e=!0}},[i,C,s,k]);const T=h(g);d(()=>{if(T.current!==g&&w.current){T.current=g,N.current=!0;const e=w.current.querySelector(`[data-page="${i}"]`);e?requestAnimationFrame(()=>{e.scrollIntoView({behavior:"instant",block:"center"}),requestAnimationFrame(()=>{N.current=!1})}):N.current=!1}},[g,i]);const I=h(i);d(()=>{if(I.current!==i&&w.current){I.current=i,N.current=!0;const e=w.current.querySelector(`[data-page="${i}"]`);e&&e.scrollIntoView({behavior:"instant",block:"nearest"}),requestAnimationFrame(()=>{N.current=!1})}},[i]),d(()=>{const e=w.current;if(!e)return;let t=null;const n=()=>{N.current||(t&&clearTimeout(t),t=setTimeout(()=>{const t=e.getBoundingClientRect(),n=t.top+t.height/2;let r=i,s=1/0;for(let t=1;t<=C;t++){const i=e.querySelector(`[data-page="${t}"]`);if(i){const e=i.getBoundingClientRect(),a=e.top+e.height/2,l=Math.abs(a-n);l<s&&(s=l,r=t)}}r!==i&&(I.current=r,a(r))},50))};return e.addEventListener("scroll",n,{passive:!0}),()=>{t&&clearTimeout(t),e.removeEventListener("scroll",n)}},[C,i,a]);return t("div",{ref:v,className:r("flex flex-col items-stretch gap-y-2",n),children:[t("div",{className:"relative flex items-center justify-center px-2 h-9",children:[e(x,{variant:"ghost",size:"xs",onClick:()=>{i>1&&a(i-1)},alt:"Previous page",children:e(Qe,{className:"size-4"})}),t("div",{className:"absolute left-2 flex items-center gap-x-1",children:[e(Oi,{type:Pi.original,currentType:s,onClick:()=>l(Pi.original),icon:e(rt,{className:"size-4"}),tooltip:"Original images"}),e(Oi,{type:Pi.instrumented,currentType:s,onClick:()=>l(Pi.instrumented),icon:e(it,{className:"size-4"}),tooltip:"Instrumented images"}),e("div",{className:"w-px h-4 bg-border mx-1"}),e(Ri,{zoom:g,onZoomIn:S,onZoomOut:P,onFitToView:j,canZoomIn:g<Di[Di.length-1],canZoomOut:g>Di[0]})]}),e("div",{className:"absolute right-2",children:e(Mi,{currentPage:i,totalPages:C,onChange:a})})]}),e("div",{ref:w,className:"flex flex-col items-center gap-2 flex-1 overflow-y-auto px-2",children:Array.from({length:C},(t,n)=>e(Ui,{currentPage:i,pageNumber:n+1,aspectRatio:o,zoom:g,url:m.get(n+1),onSelect:()=>a(n+1)},n))}),e("div",{className:"flex items-center justify-center h-9",children:e(x,{variant:"ghost",size:"xs",onClick:()=>{i<C&&a(i+1)},alt:"Next page",children:e(Xe,{className:"size-4"})})})]})}function Oi({type:t,currentType:n,onClick:i,icon:a,tooltip:s}){return e(L,{description:s,placement:"bottom",size:"xs",children:e("button",{className:r("p-1 rounded cursor-pointer transition-colors",t===n?"text-primary bg-primary/10":"text-muted-foreground hover:text-foreground hover:bg-muted"),onClick:i,children:a})})}function Ri({zoom:n,onZoomIn:i,onZoomOut:a,onFitToView:s,canZoomIn:l,canZoomOut:o}){return t("div",{className:"flex items-center gap-x-0.5",children:[e(L,{description:"Zoom out",placement:"bottom",size:"xs",children:e("button",{className:r("p-1 rounded cursor-pointer transition-colors",o?"text-muted-foreground hover:text-foreground hover:bg-muted":"text-muted-foreground/40 cursor-not-allowed"),onClick:a,disabled:!o,children:e(et,{className:"size-4"})})}),t("span",{className:"text-xs text-muted-foreground min-w-[32px] text-center",children:[n,"%"]}),e(L,{description:"Zoom in",placement:"bottom",size:"xs",children:e("button",{className:r("p-1 rounded cursor-pointer transition-colors",l?"text-muted-foreground hover:text-foreground hover:bg-muted":"text-muted-foreground/40 cursor-not-allowed"),onClick:i,disabled:!l,children:e(tt,{className:"size-4"})})}),e(L,{description:"Fit to width",placement:"bottom",size:"xs",children:e("button",{className:r("p-1 rounded cursor-pointer transition-colors",100!==n?"text-muted-foreground hover:text-foreground hover:bg-muted":"text-muted-foreground/40"),onClick:s,children:e(nt,{className:"size-4"})})})]})}function Ui({pageNumber:n,currentPage:i,aspectRatio:a,zoom:s,url:l,onSelect:o}){return t("div",{className:"p-2 hover:bg-muted rounded-md flex flex-col items-center","data-page":n,style:{width:`${s}%`},children:[e("div",{className:r("relative border-[2px] cursor-pointer overflow-hidden flex items-center justify-center bg-muted/50 w-full",n===i?"border-primary":"border-border"),style:{aspectRatio:`1 / ${a}`},onClick:o,children:l?e("img",{src:l,alt:`Page ${n}`,className:"w-full"}):e(Ze,{className:"w-6 h-6 animate-spin text-muted-foreground"})}),e($,{className:"text-sm text-muted-foreground pt-1 font-semibold",children:n})]})}function Mi({currentPage:n,totalPages:r,onChange:i}){const a=h(null),[s,l]=c(String(n));d(()=>{l(String(n))},[n]);const o=()=>{const e=parseInt(s,10);!isNaN(e)&&e>=1&&e<=r?i(e):l(String(n))};return t("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e("span",{children:"Page"}),e("input",{ref:a,type:"text",value:s,onChange:e=>l(e.target.value),onKeyDown:e=>{"Enter"===e.key?(o(),a.current?.blur()):"Escape"===e.key&&(l(String(n)),a.current?.blur())},onBlur:()=>{o()},className:"w-8 h-5 text-center text-xs px-1 py-0 bg-background border border-border rounded focus:outline-none focus:border-primary"}),t("span",{children:["/ ",r]})]})}function Vi({object:n}){const{client:r}=Dt(),i=e=>{(function(e,t,n){return e.files.getDownloadUrl(`${Si}/${t}/${n}`).then(e=>e.url)})(r,n.id,e).then(e=>window.open(e,"_blank"))},a="p-2 cursor-pointer hover:bg-muted text-left text-sm";return"markdown"===(()=>{if("document"===n.metadata?.type){const e=n.metadata;return e.content_processor?.type||"xml"}return"xml"})()?e(x,{variant:"ghost",size:"xs",onClick:()=>i("document.md"),alt:"Download",children:e(at,{className:"size-4"})}):t(en,{strategy:"absolute",placement:"bottom-start",zIndex:100,offset:8,children:[e(en.Trigger,{click:!0,children:e(x,{variant:"ghost",size:"xs",alt:"Download",children:e(at,{className:"size-4"})})}),e(en.Content,{children:t("div",{className:"rounded-md shadow-md border border-border bg-popover min-w-[200px] flex flex-col divide-y divide-border",children:[e("button",{className:a,onClick:()=>i("annotated.pdf"),children:"annotated.pdf"}),e("button",{className:a,onClick:()=>i("document.xml"),children:"document.xml"}),e("button",{className:a,onClick:()=>i("analyzed-pages.json"),children:"analyzed-pages.json"})]})})]})}function Ki({className:t}){return e("div",{className:`flex items-center justify-center ${t||""}`,children:e(Ze,{className:"w-6 h-6 animate-spin text-gray-400"})})}function qi({viewType:t,pageNumber:n}){switch(t){case"json":return e(Wi,{pageNumber:n});case"markdown":return e(Gi,{pageNumber:n});default:return e(Bi,{pageNumber:n})}}function Bi({pageNumber:t}){const{xmlPages:n}=zi();return e("div",{className:"px-4 py-2",children:e(tn,{xml:n[t-1],collapsible:!0})})}function Wi({pageNumber:t}){const[n,r]=c(null),[i,a]=c(!0),[s,l]=c(null),{layoutProvider:o}=zi();return d(()=>{a(!0),l(null),o.getPageLayout(t).then(e=>{r(e?JSON.parse(e):null),a(!1)}).catch(e=>{console.error(e),l(e.message||"Failed to load layout"),a(!1)})},[t,o]),i?e("div",{className:"px-4 py-8",children:e(Ki,{})}):s?e("div",{className:"px-4 py-2 text-red-500 text-sm",children:s}):n?e(nn,{className:"w-full",data:n}):null}function Gi({pageNumber:n}){const[r,i]=c(null),[a,s]=c(!0),[l,o]=c(null),{markdownProvider:u}=zi();return d(()=>{s(!0),o(null),u.getPageMarkdown(n).then(e=>{i(e),s(!1)}).catch(e=>{console.error(e),o(e.message||"Failed to load markdown"),s(!1)})},[n,u]),a?t("div",{className:"h-full flex flex-col items-center justify-center gap-2",children:[e(Ki,{}),e("span",{className:"text-sm text-muted-foreground",children:"Loading..."})]}):e("div",l?{className:"px-4 py-2 text-red-500 text-sm",children:l}:{className:"px-4 py-2 prose prose-sm max-w-none dark:prose-invert",children:r?e(Xt,{children:r}):e("div",{children:"No markdown content available"})})}class Hi extends f{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("PDF View error:",e,t)}render(){return this.state.hasError?e("div",{className:"fixed inset-0 bg-background z-50 flex items-center justify-center",children:t("div",{className:"flex flex-col items-center gap-4 p-8 max-w-md",children:[e(R,{title:"Failed to load PDF viewer",children:this.state.error?.message||"An unexpected error occurred"}),this.props.onClose&&e(x,{variant:"outline",onClick:this.props.onClose,children:"Close"})]})}):this.props.children}}function Ji({objectId:n,onClose:r}){const{client:i}=Dt(),{data:a,error:s}=O(()=>i.store.objects.retrieve(n,"+text"),[n]);return s?e("div",{className:"fixed inset-0 bg-background z-50 flex items-center justify-center",children:t("div",{className:"flex flex-col items-center gap-4 p-8 max-w-md",children:[e(R,{title:"Fetching document failed",children:s.message}),r&&e(x,{variant:"outline",onClick:r,children:"Close"})]})}):a?e(Hi,{onClose:r,children:e("div",{className:"fixed inset-0 bg-background z-50 flex items-center justify-center",children:e(Ai,{object:a,children:e(Yi,{object:a,onClose:r})})})}):t("div",{className:"fixed inset-0 bg-background z-50 flex flex-col",children:[e("div",{className:"flex h-9 items-center justify-end shrink-0 bg-sidebar px-2 border-b border-sidebar-border",children:r&&e(x,{variant:"ghost",size:"xs",onClick:r,alt:"Close",children:e(st,{className:"size-4"})})}),e("div",{className:"flex-1 flex items-center justify-center",children:e("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})]})}function Yi({object:n,onClose:r}){const{count:i,pdfUrl:a,pdfUrlLoading:s}=zi(),[l,o]=c(1),d=(()=>{if("document"===n.metadata?.type){const e=n.metadata,t=e.content_processor?.type;if("markdown"===t)return"markdown"}return"xml"})();return t(U,"xml"===d?{direction:"horizontal",className:"absolute inset-0",children:[e(M,{defaultSize:50,minSize:20,maxSize:80,className:"bg-muted",children:e(Li,{className:"h-full",currentPage:l,onChange:o})}),e(V,{className:"w-[4px] bg-border cursor-ew-resize"}),t(M,{defaultSize:50,minSize:20,className:"flex flex-col",children:[t("div",{className:"flex h-9 items-center justify-between shrink-0 bg-sidebar px-2 border-b border-sidebar-border",children:[e("div",{className:"flex items-center gap-x-2",children:e(Vi,{object:n})}),t("span",{className:"text-xs text-muted-foreground",children:["Page ",l," / ",i]}),e("div",{className:"flex items-center gap-x-2",children:!!r&&e(x,{variant:"ghost",size:"xs",onClick:r,alt:"Close",children:e(st,{className:"size-4"})})})]}),e("div",{className:"flex-1 overflow-auto px-2",children:e(qi,{pageNumber:l,viewType:"xml"})})]})]}:{direction:"horizontal",className:"absolute inset-0",children:[e(M,{defaultSize:50,minSize:20,maxSize:80,className:"bg-muted",children:e(Ni,{pdfUrl:a,pdfUrlLoading:s,pageCount:i,className:"h-full",currentPage:l,onChange:o})}),e(V,{className:"w-[4px] bg-border cursor-ew-resize"}),t(M,{defaultSize:50,minSize:20,className:"flex flex-col",children:[t("div",{className:"flex h-9 items-center justify-between shrink-0 bg-sidebar px-2 border-b border-sidebar-border",children:[e("div",{className:"flex items-center gap-x-2",children:e(Vi,{object:n})}),t("span",{className:"text-xs text-muted-foreground",children:["Page ",l," / ",i]}),e("div",{className:"flex items-center gap-x-2",children:!!r&&e(x,{variant:"ghost",size:"xs",onClick:r,alt:"Close",children:e(st,{className:"size-4"})})})]}),e("div",{className:"flex-1 overflow-auto px-2",children:e(qi,{pageNumber:l,viewType:"markdown"})})]})]})}function Zi({object:n,url:r,source:i,className:a}){const{client:s}=Dt(),[l,o]=c(1),[u,m]=c(r||""),[h,p]=c(!r),[f,g]=c(0),[y,b]=c(!1);d(()=>{if(r)return m(r),void p(!1);const e=i||n?.content?.source;e?(p(!0),s.files.getDownloadUrl(e).then(e=>{m(e.url)}).catch(e=>{console.error("Failed to get PDF URL:",e)}).finally(()=>{p(!1)})):p(!1)},[r,i,n?.content?.source,s]),d(()=>{const e=n?.metadata,t=e?.pages||e?.page_count||0;t>0&&g(t)},[n?.metadata]);const v=e=>{g(e)};return h?e("div",{className:"flex items-center justify-center h-full",children:e(K,{size:"lg"})}):u?y?t("div",{className:"fixed inset-0 bg-background z-50 flex flex-col overflow-hidden",children:[e("div",{className:"flex h-9 items-center justify-end shrink-0 bg-sidebar px-2 border-b border-sidebar-border",children:e(x,{variant:"ghost",size:"xs",onClick:()=>b(!1),alt:"Close fullscreen",children:e(st,{className:"size-4"})})}),e(Ni,{pdfUrl:u,pdfUrlLoading:h,pageCount:f||100,currentPage:l,onChange:o,onPageCountChange:v,className:"flex-1 min-h-0"})]}):e("div",{className:"relative h-full flex flex-col",children:e(Ni,{pdfUrl:u,pdfUrlLoading:h,pageCount:f||100,currentPage:l,onChange:o,onPageCountChange:v,className:a,compact:!0,headerExtra:e(L,{description:"Fullscreen",placement:"bottom",size:"xs",children:e("button",{className:"p-1 rounded cursor-pointer transition-colors text-muted-foreground hover:text-foreground hover:bg-muted",onClick:()=>b(!0),children:e(lt,{className:"size-4"})})})})}):e("div",{className:"flex items-center justify-center h-full text-muted",children:"No PDF available"})}const Qi=131072;const Xi=["image/jpeg","image/jpg","image/png","image/gif","image/webp","image/svg+xml"],ea=["video/mp4","video/webm"],ta="h-[calc(100vh-208px)]",na="h-[calc(100vh-228px)]",ra="h-[calc(100vh-218px)]",ia="max-h-[calc(100vh-268px)]";function aa(e){return e===qt.created||e===qt.processing}function sa(e){return e.metadata?.content_processor?.type}var la;function oa({object:r,loadText:i,refetch:a}){const s=b(),l=async(e,t)=>{try{await navigator.clipboard.writeText(e),s({status:"success",title:("text"===t?"Content":"Properties")+" copied",description:`Successfully copied ${t} to clipboard`,duration:2e3})}catch(e){console.error(`Failed to copy ${t}:`,e),s({status:"error",title:"Copy failed",description:`Failed to copy ${t} to clipboard`,duration:5e3})}};return e(n,{children:t(U,{direction:"horizontal",className:ta,children:[e(M,{className:"min-w-[100px]",children:e(ca,{object:r,refetch:a??(()=>Promise.resolve()),handleCopyContent:l})}),e(V,{withHandle:!0}),e(M,{className:"min-w-[100px]",children:e(da,{object:r,loadText:i??!1,handleCopyContent:l,refetch:a})})]})})}function ca({object:r,refetch:i,handleCopyContent:a}){const[s,l]=c(!1),[o,d]=c(!1);return t(n,{children:[t("div",{className:"flex justify-between items-center px-2",children:[t("div",{className:"flex items-center gap-1 bg-muted mb-2 p-1 rounded",children:[e(x,{variant:""+(s?"ghost":"primary"),size:"sm",alt:"Preview properties",onClick:()=>l(!s),children:"Properties"}),e(x,{variant:""+(s?"primary":"ghost"),size:"sm",alt:"View in JSON format",onClick:()=>l(!s),children:"JSON"})]}),t("div",{className:"flex items-center gap-2",children:[r.properties&&e(x,{variant:"ghost",size:"sm",title:"Copy properties",onClick:()=>a(JSON.stringify(r.properties,null,2),"properties"),children:e(ct,{className:"size-4"})}),e(x,{variant:"ghost",size:"sm",onClick:()=>{d(!0)},title:"Edit properties",className:"flex items-center gap-2",children:e(dt,{className:"size-4"})})]})]}),r.properties?e("div",{className:`${na} overflow-auto px-2`,children:e(rn,{value:r.properties,viewCode:s})}):e("div",{className:`${na} overflow-auto px-2`,children:e("div",{children:"No properties defined"})}),e(ci,{isOpen:o,onClose:()=>{d(!1)},object:r,refetch:i})]})}function da({object:n,loadText:r,handleCopyContent:i,refetch:a}){const s=n?.metadata?.type===Bt.Image,l=n?.metadata?.type===Bt.Video,o="application/pdf"===n?.content?.type,u=!!n?.content?.type&&Xr(n.content.type),m=aa(n?.status),f=n.metadata,g=f?.renditions?.find(e=>e.name===Vt),[y,b]=c(l?la.Video:s?la.Image:la.Text),{fullText:v,displayText:w,isLoading:N,isCropped:k}=function(e,t,n=!1){const{store:r}=Dt(),[i,a]=c(t),[s,l]=c(()=>t&&t.length>Qi?t.substring(0,Qi):t),[o,u]=c(!1),[m,h]=c(()=>!!t&&t.length>Qi),f=p(()=>{u(!0),r.objects.getObjectText(e).then(e=>{a(e.text),e.text.length>Qi?(l(e.text.substring(0,Qi)),h(!0)):(l(e.text),h(!1))}).catch(e=>{console.error("Failed to load text",e)}).finally(()=>{u(!1)})},[e,r]);return d(()=>{n&&!s&&f()},[n,s,f]),{fullText:i,displayText:s,isLoading:o,isCropped:m,loadText:f}}(n.id,n.text,r),C=(o||u)&&m,{progress:S,status:P,outputFormat:j,isComplete:_}=function(e,t){const{client:n}=Dt(),[r,i]=c(),[a,s]=c(),[l,o]=c(),[u,m]=c(!1);return d(()=>{if(!t)return;let r=!1;return function t(){r||n.objects.analyze(e).getStatus().then(e=>{i(e.progress),s(e.status),o(e.output_format??e.progress?.output_format),e.status===Mt.RUNNING?r||setTimeout(t,2e3):m(!0)}).catch(()=>{r||setTimeout(t,1e4)})}(),()=>{r=!0}},[t,e,n]),{progress:r,status:a,outputFormat:l,isComplete:u}}(n.id,C),{pdfUrl:T,isConverting:I,error:A,triggerConversion:z}=function(e,t){const{client:n}=Dt(),[r,i]=c(),[a,s]=c(!1),[l,o]=c(),d=p(async()=>{if(!t||a)return;s(!0),o(void 0);const r=async t=>{try{const a=await n.objects.getRendition(e,{format:Kt.pdf,generate_if_missing:t,sign_url:!0,block_on_generation:!1});"generating"===a.status?setTimeout(()=>r(!1),5e3):"found"===a.status&&a.renditions?.length?(i(a.renditions[0]),s(!1)):"failed"===a.status&&(o("PDF conversion failed"),s(!1))}catch(e){console.error("Failed to convert Office document to PDF:",e),o("Failed to convert to PDF"),s(!1)}};await r(!0)},[e,t,a,n]);return{pdfUrl:r,isConverting:a,error:l,triggerConversion:d}}(n.id,u);d(()=>{_&&P===Mt.COMPLETED&&a?.()},[_,P,a]);const E=(o||u)&&m&&!_&&P===Mt.RUNNING,F=h(null);return t("div",{className:"flex flex-col h-full",children:[t("div",{className:"flex justify-between items-center px-2 shrink-0",children:[t("div",{className:"flex items-center gap-2 mb-2",children:[t("div",{className:"flex items-center gap-1 bg-muted p-1 rounded",children:[s&&e(x,{variant:y===la.Image?"primary":"ghost",size:"sm",alt:"View Image",onClick:()=>b(la.Image),children:"Image"}),l&&e(x,{variant:y===la.Video?"primary":"ghost",size:"sm",alt:"View Video",onClick:()=>b(la.Video),children:"Video"}),e(x,{variant:y===la.Text?"primary":"ghost",size:"sm",alt:"View Text",onClick:()=>b(la.Text),children:"Text"}),o&&e(x,{variant:y===la.Pdf?"primary":"ghost",size:"sm",alt:"View PDF",onClick:()=>b(la.Pdf),children:"PDF"}),u&&e(x,{variant:y===la.Pdf?"primary":"ghost",size:"sm",alt:"View as PDF",onClick:()=>{b(la.Pdf),g||T||I||z()},disabled:I,children:I?e(K,{size:"sm"}):"PDF"})]}),e(fa,{object:n})]}),y===la.Text&&!E&&e(ua,{object:n,text:w,fullText:v,handleCopyContent:i,textContainerRef:F}),y===la.Pdf&&u&&(g||T)&&e(ga,{object:n,pdfRendition:g,officePdfUrl:T})]}),y===la.Image&&e(ha,{object:n}),y===la.Video&&e(pa,{object:n}),y===la.Pdf&&o&&e(ya,{object:n}),y===la.Pdf&&u&&e(ba,{pdfRendition:g,officePdfUrl:T,officePdfConverting:I,officePdfError:A,onConvert:z}),y===la.Text&&E&&e(va,{progress:S,status:P,outputFormat:j}),y===la.Text&&!E&&N&&e("div",{className:"flex justify-center items-center flex-1",children:e(K,{size:"lg"})}),y===la.Text&&!E&&!N&&e(ma,{object:n,text:w,isTextCropped:k,textContainerRef:F})]})}function ua({object:r,text:i,fullText:a,handleCopyContent:s,textContainerRef:l}){const{client:o}=Dt(),d=b(),[u,m]=c(null),[h,p]=c(!1),f=r.content,g=f&&f.type&&"text/markdown"===f.type,y=sa(r),v=async e=>{if(!u){m(e),d({status:"info",title:`Preparing ${e.toUpperCase()}`,description:"Fetching your document...",duration:2e3});try{const t=await o.objects.getRendition(r.id,{format:e,generate_if_missing:!0,sign_url:!0});if("generating"===t.status)return d({status:"info",title:"Generating document",description:`Please wait while we prepare your ${e.toUpperCase()} file...`,duration:5e3}),void setTimeout(()=>v(e),3e3);if("failed"===t.status)throw new Error("Document generation failed");if(t.renditions&&t.renditions.length>0){const n=t.renditions[0];if("pdf"===e);else{const t=document.createElement("a");t.href=n,t.download=`${r.name||"document"}.${e}`,document.body.appendChild(t),t.click(),document.body.removeChild(t),d({status:"success",title:"Document exported",description:`Successfully exported to ${e.toUpperCase()} format`,duration:2e3})}}}catch(t){console.error(`Failed to export document as ${e}:`,t),d({status:"error",title:"Export failed",description:`Failed to export document to ${e.toUpperCase()} format`,duration:5e3})}finally{m(null)}}};return t(n,{children:[e("div",{className:"h-[41px] text-lg font-semibold flex justify-between items-center px-2",children:t("div",{className:"flex items-center gap-2",children:[a&&t(n,{children:[e(x,{variant:"ghost",size:"sm",title:"Copy text",onClick:()=>s(a,"text"),children:e(ct,{className:"size-4"})}),e(x,{variant:"ghost",size:"sm",title:"Download text",onClick:e=>{if(e.preventDefault(),e.stopPropagation(),!a)return;let t="txt",n="text/plain";"xml"===y?(t="xml",n="text/xml"):("markdown"===y||g)&&(t="md",n="text/markdown");const i=new Blob([a],{type:n}),s=URL.createObjectURL(i),l=`${r.name||"document"}.${t}`,o=document.createElement("a");o.href=s,o.download=l,o.style.display="none",setTimeout(()=>{o.click(),URL.revokeObjectURL(s)},0)},children:e(at,{className:"size-4"})})]}),g&&i&&t(n,{children:[t(x,{variant:"ghost",size:"sm",onClick:()=>v("docx"),disabled:null!==u,className:"flex items-center gap-2",children:["docx"===u?e(K,{size:"sm"}):e(at,{className:"size-4"}),"DOCX"]}),t(x,{variant:"ghost",size:"sm",onClick:()=>{l.current?p(!0):d({status:"error",title:"PDF export failed",description:"No content available to export",duration:3e3})},className:"flex items-center gap-2",children:[e(at,{className:"size-4"}),"PDF"]})]})]})}),t(B,{isOpen:h,onClose:()=>p(!1),children:[e(W,{children:"Export document as PDF"}),t(G,{children:[e("p",{className:"mb-2",children:"This will open your browser's print dialog with the current document content."}),e("p",{className:"text-sm text-muted",children:'To save a PDF, choose "Save as PDF" or a similar option in the print dialog.'})]}),t(H,{align:"right",children:[e(x,{variant:"ghost",size:"sm",onClick:()=>p(!1),children:"Cancel"}),e(x,{size:"sm",onClick:()=>{if(!l.current)return void d({status:"error",title:"PDF export failed",description:"No content available to export",duration:3e3});const e=`${r.name||r.id||"document"} - content`;ii(l.current,e)?(d({status:"success",title:"PDF export ready",description:"Use your browser's Print dialog to save as PDF",duration:4e3}),p(!1)):d({status:"error",title:"PDF export failed",description:"Unable to open print preview",duration:4e3})},children:"Open print dialog"})]})]})]})}!function(e){e.Text="text",e.Image="image",e.Video="video",e.Pdf="pdf"}(la||(la={}));const ma=g(({object:r,text:i,isTextCropped:a,textContainerRef:s})=>{const l=r.content,o=aa(r?.status),c="xml"===sa(r),d=l&&l.type&&("text/markdown"===l.type||"text/plain"===l.type),u=!c&&(d||function(e){return!!e&&(e.includes("\n# ")||e.includes("\n## ")||e.includes("\n### ")||e.includes("\n* ")||e.includes("\n- ")||e.includes("\n+ ")||e.includes("![")||e.includes("]("))}(i));return i?t(n,{children:[a&&e("div",{className:"px-2 py-2 bg-attention/10 border-l-4 border-attention mx-2 mb-2 rounded",children:t("div",{className:"flex items-center gap-2 text-attention",children:[e(ot,{className:"size-4"}),e("span",{className:"text-sm font-semibold",children:"Showing first 128K characters only"})]})}),e("div",{className:`max-w-7xl px-2 ${ra} overflow-auto`,ref:s,children:c?e("div",{className:"px-4 py-2",children:e(tn,{xml:i,collapsible:!0})}):u?e("div",{className:"vprose prose-sm p-1",children:e(Xt,{components:{a:({node:t,...n})=>{const r=n.href||"";return r.includes("/store/objects/")?e(Zt,{topLevelNav:!0,href:r,className:"text-info",children:n.children}):e("a",{...n,target:"_blank",rel:"noopener noreferrer"})},p:({node:t,...n})=>e("p",{...n,className:"my-0"}),pre:({node:t,...n})=>e("pre",{...n,className:"my-2 p-2 rounded"}),code:({node:t,className:n,children:r,...i})=>{const a=/language-(\w+)/.exec(n||"");return e("code",{...i,className:a?"text-muted":"px-1.5 py-0.5 rounded",children:r})},h1:({node:t,...n})=>e("h1",{...n,className:"font-bold text-2xl my-2"}),h2:({node:t,...n})=>e("h2",{...n,className:"font-bold text-xl my-2"}),h3:({node:t,...n})=>e("h3",{...n,className:"font-bold text-lg my-2"}),li:({node:t,...n})=>e("li",{...n})},children:i})}):e("pre",{className:"text-wrap bg-muted text-muted p-2",children:i})})]}):e("div",{className:"px-2",children:e("div",{children:o?"Extracting content...":"No content"})})});function ha({object:t}){const{client:n}=Dt(),[r,i]=c(),a=t.content,s=t.metadata&&t.metadata.type===Bt.Image;return d(()=>{if(s){(async()=>{const e=a?.type&&Xi.includes(a.type);try{const r=await n.objects.getRendition(t.id,{format:Ut.jpeg,generate_if_missing:!1,sign_url:!0});if("found"===r.status&&r.renditions?.length)i(r.renditions[0]);else if(e){const e=await n.files.getDownloadUrl(t.content.source);i(e.url)}}catch(r){if(e){const e=await n.files.getDownloadUrl(t.content.source);i(e.url)}}})()}},[]),e("div",{className:"mb-4 px-2",children:r?e("img",{src:r,alt:t.name,className:"w-full object-contain"}):e(K,{size:"md"})})}function pa({object:n}){const{client:r}=Dt(),[i,a]=c(),[s,l]=c(),[o,u]=c(!0),m=n.content,h=n.metadata?.type===Bt.Video,p=n.metadata,f=p?.renditions||[],g=f.find(e=>"video/mp4"===e.content.type)||f.find(e=>"video/webm"===e.content.type),y=m?.type&&ea.includes(m.type),b=f.find(e=>e.name===Wt);return d(()=>{(async()=>{if(b?.content?.source)try{const e=await r.files.getDownloadUrl(b.content.source);l(e.url)}catch(e){console.error("Failed to load poster image",e)}})()},[b,r]),d(()=>{if(h&&(g?.content?.source||y)){(async()=>{try{let e;g?.content?.source?e=await r.files.getDownloadUrl(g.content.source):y&&m?.source&&(e=await r.files.getDownloadUrl(m.source)),e&&a(e.url)}catch(e){console.error("Failed to get video URL",e)}finally{u(!1)}})()}else u(!1)},[h,g,y,m?.source,r]),e("div",{className:"mb-4 px-2",children:g||y?o?e("div",{className:"flex justify-center items-center h-[400px]",children:e(K,{size:"md"})}):i?e("video",{src:i,poster:s,controls:!0,className:`w-full ${ia} object-contain`,children:"Your browser does not support the video tag."}):e("div",{className:"flex justify-center items-center h-[400px] text-muted",children:"Failed to load video"}):e("div",{className:"flex justify-center items-center h-[400px] text-muted",children:t("div",{className:"text-center",children:[e("p",{children:"No web-compatible video rendition available"}),e("p",{className:"text-sm mt-2",children:"MP4 or WebM format required"})]})})})}function fa({object:r}){const[i,a]=c(!1),s=sa(r);return"xml"===s||"markdown"===s?t(n,{children:[e(x,{variant:"ghost",size:"sm",onClick:()=>a(!0),title:"Side by side view",children:e(ut,{className:"size-4"})}),i&&e(q,{children:e(Ji,{objectId:r.id,onClose:()=>a(!1)})})]}):null}function ga({object:t,pdfRendition:n,officePdfUrl:r}){const{client:i}=Dt(),a=b(),[s,l]=c(!1);return e("div",{className:"flex items-center gap-2",children:e(x,{variant:"ghost",size:"sm",onClick:async()=>{l(!0);try{let e=r;if(!e&&n?.content?.source){e=(await i.files.getDownloadUrl(n.content.source,`${t.name||"document"}.pdf`,"attachment")).url}e&&window.open(e,"_blank")}catch(e){console.error("Failed to download PDF:",e),a({status:"error",title:"Download failed",description:"Failed to download the PDF file",duration:5e3})}finally{l(!1)}},disabled:s,title:"Download PDF",children:s?e(K,{size:"sm"}):e(at,{className:"size-4"})})})}function ya({object:t}){return e("div",{className:ra,children:e(Zi,{object:t,className:"h-full"})})}function ba({pdfRendition:n,officePdfUrl:r,officePdfConverting:i,officePdfError:a,onConvert:s}){return i?t("div",{className:"flex flex-col justify-center items-center flex-1 gap-2",children:[e(K,{size:"lg"}),e("span",{className:"text-muted",children:"Converting to PDF..."})]}):a?t("div",{className:"flex flex-col justify-center items-center flex-1 gap-2 text-destructive",children:[e(ot,{className:"size-8"}),e("span",{children:a})]}):e("div",n?.content?.source?{className:ra,children:e(Zi,{source:n.content.source,className:"h-full"})}:r?{className:ra,children:e(Zi,{url:r,className:"h-full"})}:{className:"flex flex-col justify-center items-center flex-1 gap-2",children:e(x,{onClick:s,children:"Convert to PDF"})})}function va({progress:r,status:i,outputFormat:a}){const s=ai(i),l=si(i),o="xml"===a,c=null==r?.percent||isNaN(r.percent)?0:r.percent;return t("div",{className:"px-4 py-4",children:[r&&t("div",{className:"space-y-2",children:[t("div",{className:"flex flex-col gap-1",children:[e(xa,{name:o?"Analyze Layouts":"Analyze Page",progress:r.pages}),o&&t(n,{children:[e(xa,{name:"Extract Tables",progress:r.tables}),e(xa,{name:"Describe Images",progress:r.images}),e(xa,{name:"Process Visually",progress:r.visuals})]})]}),t("div",{className:"pt-2 text-sm text-muted",children:["Progress: ",c,"%",e("span",{className:"px-2",children:"•"}),e("span",{className:s,children:l}),r.started_at&&t(n,{children:[e("span",{className:"px-2",children:"•"}),t("span",{children:[((Date.now()-r.started_at)/1e3).toFixed(0)," sec. elapsed"]})]})]}),e(an,{percent:c})]}),!r&&t("div",{className:"flex items-center gap-2 text-muted",children:[e(K,{size:"sm"}),e("span",{children:"Loading processing status..."})]})]})}function xa({name:e,progress:n}){return t("div",{className:"flex gap-2 text-sm",children:[t("span",{className:"text-muted min-w-36",children:[e,":"]}),t("span",{children:[n.processed," of ",n.total]})]})}function wa({isLoading:n=!1,counts:r=6}){return n?e("div",{className:"flex flex-wrap gap-2 justify-between",children:Array(r).fill(0).map((n,r)=>e("div",{className:"w-[15vw] animate-pulse",children:t(J,{className:"relative flex flex-col border h-fit",children:[e("div",{className:"h-48 bg-muted rounded-t-xl flex items-center justify-center text-muted",children:" "}),e(Y,{className:"bg-muted h-[2px]"}),t(Z,{className:"p-2 flex flex-col",children:[t("div",{className:"flex flex-col overflow-hidden",children:[e("div",{className:"h-5 bg-muted rounded w-3/4 mb-2"}),e("div",{className:"h-4 bg-muted rounded w-1/2"})]}),e("div",{className:"text-xs text-muted w-full flex justify-end mt-2",children:e("div",{className:"h-3 bg-muted rounded w-1/4"})})]})]})},r))}):null}function Na({selection:n,document:r,onSelectionChange:i,onRowClick:a,previewObject:s,selectedObject:l}){const{client:o}=Dt(),[u,m]=c(void 0),[h,p]=c(void 0),[f,g]=c(void 0);return d(()=>{r?.content&&ri(o,r,m,p,g)},[r]),t(J,{className:"relative flex flex-col border h-fit w-full "+(l?.id===r.id?"border-attention border-4":""),onClick:()=>a&&a(r),children:[n&&e("div",{className:"absolute top-2 left-2 z-10 flex flex-col items-center gap-1",children:e("input",{checked:n.isSelected(r.id),type:"checkbox",onChange:e=>{e.stopPropagation(),i(r,e)},onClick:e=>e.stopPropagation()})}),e("div",{className:"absolute top-1 right-1 z-10 flex flex-col items-center",children:e(x,{variant:"ghost",size:"sm",title:"Preivew Object",onClick:e=>{e.stopPropagation(),s?.(r.id)},children:e(mt,{className:"size-4 "+("ready"===f?"text-muted":"text-white")})})}),u&&"ready"==f?e("img",{src:u,alt:h,className:"w-auto h-48 object-cover rounded-t-xl"}):e("div",{className:"h-48 bg-gray-700 rounded-t-xl flex items-center justify-center text-muted",children:f}),e(Y,{className:"bg-gray-200 h-[2px]"}),t(Z,{className:"p-2 flex flex-col",children:[t("div",{className:"flex flex-col overflow-hidden",children:[e(L,{placement:"top",description:r.properties?.title??r.name,children:e("h3",{className:"text-start font-medium leading-none truncate",children:r.properties?.title??r.name})}),r?.type?.name?e(L,{placement:"bottom",size:"xs",description:r?.type?.name,children:e("p",{className:"text-start text-xs text-muted truncate",children:r?.type?.name})}):e("p",{className:"text-xs text-muted",children:" "})]}),r.score&&t("div",{className:"text-xs text-muted w-full flex justify-end",children:["Score: ",r.score.toFixed(4)??"-"]})]})]})}function ka(e){return`${e._id} (${e.count})`}function Ca(e){return`${e.name} (${e.count})`}function Sa({search:t,buckets:n,name:r,placeholder:i,className:a}){const s=t.getFilterValue(r),l=n?.find(e=>JSON.stringify(e._id)===JSON.stringify(s));return e(Q,{filterBy:"_id",className:a,isClearable:!0,optionLabel:ka,options:n,value:l,onChange:e=>{t.setFilterValue(r,e?._id)},by:"_id",placeholder:i})}function Pa({search:t,name:n,placeholder:r,className:i}){const[a,s]=c([]);return d(()=>{t.setFilterValue(n,a)},[a]),e(X,{className:i,value:a,onChange:s,placeholder:r})}function ja(e){return`${e.name} (${e.count})`}function _a({search:t,buckets:n,placeholder:r="Filter by Type",className:i}){const[a,s]=c([]),{typeRegistry:l}=Dt(),o=t.getFilterValue("type");d(()=>{if(l){const e=n.map(e=>{let t;return null==e._id?(e._id="Document",t="Document"):(t=l.getTypeName(e._id),t||(console.warn("Content Object Type not found",e._id),t=e._id)),{...e,name:t}});e.sort((e,t)=>e.name.localeCompare(t.name)),s(e)}},[n,l]);const u=a?.find(e=>e._id===o);return e(Q,{filterBy:"name",className:i,isClearable:!0,optionLabel:ja,options:a,value:u,onChange:e=>{t.setFilterValue("type",e?._id)},by:"_id",placeholder:r})}function Ta({buckets:e,name:t,placeholder:n,type:r,multiple:i}){return function({buckets:e,name:t,placeholder:n,type:r="select",multiple:i=!1}){return{name:t,options:e.map(e=>({label:ka(e),value:e._id})),type:r,multiple:i,placeholder:`${n??`${t.charAt(0).toUpperCase()+t.slice(1)}`}`,allowCreate:!1}}({buckets:e,name:t,placeholder:n,type:r,multiple:i})}function Ia({buckets:n,typeRegistry:r,type:i="select",multiple:a=!1}){const s=new Map;r||console.warn("Type names cannot be resolved"),n.forEach(e=>{let t,n=e._id;null==e._id?(n="Document",t="Document"):(t=r?.getTypeName(e._id),t||(console.warn("Content Object Type not found",e._id),t=e._id)),s.set(n,{name:t,count:e.count})});return{name:"types",placeholder:"Types",type:i,multiple:a,options:n.map(e=>{const t=e._id,n=t||"Document",r=s.get(n);return{value:t,label:r?`${r.name} (${r.count})`:`Unknown (${e.count})`}}),labelRenderer:n=>{const r=s.get(n);return r?t("div",{className:"w-full flex items-center",children:[e("span",{className:"text-sm truncate",children:r.name}),t("span",{className:"ml-2 text-xs",children:["(",r.count,")"]})]}):(console.warn(`Type data not found for ${n}`),n)},filterBy:(e,t)=>{const n=s.get(e);return n?n.name.toLowerCase().includes(t.toLowerCase()):(console.warn(`Type name not found for ${e}`),!1)}}}const Aa={},za={};function Ea(e){const{client:t}=Dt();return O(()=>{let n=Aa[e];return n||(n=t.users.retrieve(e).then(e=>e),Aa[e]=n),n},[e])}function Fa(e){const{client:t}=Dt();return O(()=>{let n=za[e];return n||(n=t.iam.groups.retrieve(e).then(e=>e),za[e]=n),n},[e])}function Da(){return e("div",{className:"size-8"})}function $a({showTitle:n=!1,size:r="md"}){return e(qa,{title:"System User",description:"The system user is used to initialize built-in objects.",children:t("div",{className:"flex gap-2 items-center",children:[e(ee,{src:"/icon.svg",size:r}),n&&e("div",{className:"text-sm font-semibold pl-2",children:"System User"})]})})}function La({accountId:r,showTitle:i=!1,size:a="md"}){const s=t(n,{children:[e("div",{children:"This user is used by robots like workflow workers."}),t("div",{className:"text-gray-800 dark:text-gray-500 text-sm",children:[e("span",{className:"font-semibold",children:"ID:"})," ",r]})]});return e(qa,{title:"Service Account",description:s,children:t("div",{className:"flex flex-row items-center gap-2",children:[e(ee,{src:"/cloud.svg",name:"SA",color:"bg-amber-500",className:"px-[5px] text-white",size:a}),i&&t("div",{className:"text-sm font-semibold pl-2 truncate",children:["Service Account : ",r]})]})})}function Oa({title:t="Error",error:n,showTitle:r=!1,size:i="md"}){return e(Ua,{title:t,message:"string"==typeof n?n:n.message,color:"bg-red-500",showTitle:r,size:i})}function Ra({userRef:t,showTitle:n=!1,size:r="md"}){if(!t)return e(Ua,{title:"Unknown User",message:"User information is not available.",showTitle:n,size:r});const[i,a]=t?t.split(":"):["unknown"];switch(i){case Gt.User:return e(Va,{userId:a,showTitle:n,size:r});case Gt.Group:return e(Ma,{userId:a,showTitle:n,size:r});case"system":return e($a,{showTitle:n,size:r});case Gt.ServiceAccount:case Gt.Agent:return e(La,{accountId:a,showTitle:n,size:r});case Gt.ApiKey:return e(Ka,{keyId:a,size:r,showTitle:n});default:return e(Oa,{title:"Unknown User",error:`Invalid user ref type: ${i}`,showTitle:n,size:r})}}function Ua({title:n,message:r,color:i,size:a="md",showTitle:s=!1}){return e(qa,{title:n,description:r,children:t("div",{className:"flex flex-row items-center gap-2",children:[e(ee,{color:i,size:a}),s&&e("div",{className:"text-sm font-semibold pl-1",children:n})]})})}function Ma({userId:n,showTitle:r=!1,size:i="md"}){const{data:a,error:s}=Fa(n);if(s)return e(Oa,{title:"Failed to fetch group",error:s,showTitle:r,size:i});if(!a)return e(Da,{});const l=t("div",{className:"space-y-1",children:[a.description&&e("div",{className:"text-sm",children:a.description}),t("div",{className:"text-xs text-muted-foreground",children:["Group ID: ",a.id]}),a.tags&&a.tags.length>0&&e("div",{className:"flex flex-wrap gap-1",children:a.tags.map(t=>e("span",{className:"px-1.5 py-0.5 bg-muted rounded text-xs",children:t},t))})]});return e(qa,{title:a.name||"Unnamed Group",description:l,children:t("div",{className:"flex flex-row items-center gap-2",children:[e(ht,{className:"size-6 text-indigo-500",size:i}),r&&e("div",{className:"text-sm font-semibold pl-2",children:a.name||"Unnamed Group"})]})})}function Va({userId:n,showTitle:r=!1,size:i="md"}){const{data:a,error:s}=Ea(n);if(s)return e(Oa,{title:"Failed to fetch user",error:s,showTitle:r,size:i});if(!a)return e(Da,{});const l=e("div",{className:"truncate",title:a.email,children:a.email});return e(qa,{title:a.name||a.email||a.username||"unknown",description:l,children:t("div",{className:"flex flex-row items-center gap-2",children:[e(ee,{src:a.picture,name:a.name,color:"bg-indigo-500",size:i}),r&&e("div",{className:"text-sm font-semibold pl-2",children:a.name||a.email||a.username||"unknown"})]})})}function Ka({keyId:n,showTitle:r=!1,size:i="md"}){const{client:a}=Dt(),{data:s,error:l}=O(()=>a.apikeys.retrieve(n),[]);if(l)return e(Oa,{title:"Failed to fetch the apikey",error:l,showTitle:r,size:i});if(!s)return e(Da,{});const o=e(ee,{name:"PK",color:"bg-pink-500",size:i}),c=t(te,{className:"dark:bg-gray-800 dark:text-gray-200 table-fixed w-full",children:[t("tr",{children:[e("td",{className:"font-semibold w-20",children:"Key:"}),e("td",{className:"truncate max-w-0",children:s?.name})]}),t("tr",{children:[e("td",{className:"font-semibold w-20",children:"Account:"}),e("td",{className:"truncate max-w-0",children:s?.account})]}),t("tr",{children:[e("td",{className:"font-semibold w-20",children:"Project:"}),e("td",{className:"truncate max-w-0",children:s?.project.name})]})]});return e(qa,{title:"Private Key",description:c,children:t("div",{className:"flex flex-row items-center gap-2",children:[o,r&&e("div",{className:"text-sm font-semibold",children:s?.name||s?.account||s?.project.name||"unknown"})]})})}function qa({title:n,description:r,children:i}){return t(w,{hover:!0,children:[e(N,{className:"cursor-pointer flex items-center inline-block",children:e("div",{children:i})}),e(k,{align:"center",sideOffset:8,side:"right",children:t("div",{className:"flex flex-col gap-1 rounded-md shadow-md p-2",children:[e("div",{className:"text-md font-semibold",children:n}),r]})})]})}function Ba({buckets:n,name:r,placeholder:i}){return function({buckets:n,name:r,placeholder:i}){const a=n.map(e=>({value:e._id,label:`(${e.count})`}));return{name:r,placeholder:i||`${r.charAt(0).toUpperCase()+r.slice(1)}`,options:a,labelRenderer:r=>{if("Unknown User"===r||!r){const e=n.find(e=>e._id===r);return`Unknown User (${e?.count||0})`}const i=n.find(e=>e._id===r);return t("div",{className:"flex items-center w-full gap-2",children:[e("div",{className:"flex-1 min-w-0 flex items-center truncate",children:e(Ra,{userRef:r,showTitle:!0,size:"sm"})}),t("span",{className:"text-muted-foreground flex-shrink-0",children:["(",i?.count||0,")"]})]})}}}({buckets:n,name:r,placeholder:i})}function Wa({search:t,buckets:n,placeholder:r="All Environments",className:i}){const{client:a}=Dt(),[s,l]=c([]),o=t.getFilterValue("environment");d(()=>{if(a){const e=n.map(async e=>{let t;return await a.environments.retrieve(e._id).then(e=>{t=e.name}).catch(()=>{t=`${e._id} (deleted)`}),t||(t=e._id),{...e,name:t}});Promise.all(e).then(e=>{e.sort((e,t)=>e.name.localeCompare(t.name)),l(e)})}},[n,a]);const u=s?.find(e=>e._id===o);return e(Q,{filterBy:"name",className:i,isClearable:!0,optionLabel:Ca,options:s,value:u,onChange:e=>{t.setFilterValue("environment",e?._id)},by:"_id",placeholder:r})}function Ga(n){const r=[];if(r.push({name:"run_ids",placeholder:"Run ID",type:"text",multiple:!1}),n.interactions){const i=function({buckets:n,name:r,placeholder:i}){return{name:r,placeholder:i,options:n.map(e=>({label:`(${e.count})`,value:e._id})),type:"select",labelRenderer:r=>{const i=n.find(e=>e._id===r),a=i?.name||r;let s="success";if(i?.status)switch(i.status){case Ht.published:s="success";break;case Ht.archived:s="destructive";break;default:s="attention"}const l=i?.version&&i?.status?`v${i.version} ${i.status}`:i?.status||(i?.version?`v${i.version}`:"");return t("div",{className:"w-full flex items-center justify-between",children:[t("div",{className:"flex flex-row flex-wrap items-center gap-2 min-w-0 flex-1",children:[e("span",{className:"text-sm truncate",children:a}),l&&e(v,{variant:s,className:"text-xs w-fit",children:l})]}),t("span",{className:"ml-2 text-xs shrink-0",children:["(",i?.count||0,")"]})]})},filterBy:(e,t)=>{const r=n.find(t=>t._id===e);return(r?.name||e).toLowerCase().includes(t.toLowerCase())}}}({buckets:n.interactions||[],name:"interaction",placeholder:"Interactions"});r.push(i)}if(n.environments){const i=function({buckets:n,name:r}){const i=n.map(e=>({label:`(${e.count})`,value:e._id}));return{name:"environment",placeholder:r.charAt(0).toUpperCase()+r.slice(1),options:i,type:"select",labelRenderer:r=>{const i=n.find(e=>e._id===r);return t("div",{className:"w-full flex items-center",children:[e("span",{className:"text-sm truncate",children:i?.name||r}),t("span",{className:"ml-2 text-xs",children:["(",i?.count||0,")"]})]})},filterBy:(e,t)=>{const r=n.find(t=>t._id===e);return(r?.name||e).toLowerCase().includes(t.toLowerCase())}}}({buckets:n.environments||[],name:"environments"});r.push(i)}if(r.push({name:"tags",placeholder:"Tags",type:"stringList",multiple:!0}),n.models){const e=Ta({buckets:n.models||[],name:"model"});r.push(e)}if(n.statuses){const e=Ta({buckets:n.statuses||[],name:"status"});r.push(e)}if(n.finish_reason){const e=Ta({buckets:n.finish_reason.map(e=>({...e,_id:null===e._id?"none":e._id})),name:"finish_reason",placeholder:"Finish Reason"});r.push(e)}if(n.created_by){const e=Ba({buckets:n.created_by||[],name:"created_by",placeholder:"Created By"});r.push(e)}r.push({name:"start",placeholder:"Date After",type:"date",multiple:!1});r.push({name:"end",placeholder:"Date Before",type:"date",multiple:!1});return r.push({name:"workflow_run_ids",placeholder:"Workflow Run ID",type:"text",multiple:!1}),r}function Ha(e){return t=>{0!==t.length?(e.clearFilters(!1,!1),t.forEach(t=>{if(t.value&&t.value.length>0){const n=t.name;let r;r="stringList"===t.type?t.value.map(e=>"string"==typeof e?e:e.value):t.multiple?Array.isArray(t.value)?t.value.map(e=>"object"==typeof e&&e.value?e.value:e):["object"==typeof t.value&&t.value.value?t.value.value:t.value]:Array.isArray(t.value)&&t.value[0]&&"object"==typeof t.value[0]?t.value[0].value:Array.isArray(t.value)&&t.value[0]?t.value[0]:t.value,"run_ids"!==n&&"workflow_run_ids"!==n||Array.isArray(r)||(r=[r]),e.query[n]=r}}),e.search()):e.clearFilters(!0,!1)}}function Ja({facets:n,search:r}){const[i,a]=c([]),s=Ga(n),l=Ha(r);return t(ne,{filterGroups:s,filters:i,setFilters:e=>{const t="function"==typeof e?e(i):e;a(t),l(t)},children:[t("div",{className:"flex justify-between mb-1",children:[e(re,{}),e(x,{onClick:()=>{r.search()},variant:"outline",title:"Refresh",children:e(pt,{className:"size-5"})})]}),t("div",{className:"flex gap-2 items-center",children:[e(ie,{}),e(ae,{})]})]})}function Ya(e){const t=[];if(t.push({placeholder:"Workflow or Run ID",name:"name",type:"text",options:[]}),e.status){const n=Ta({buckets:e.status||[],name:"status",placeholder:"Status"});t.push(n)}if(e.initiated_by){const n=Ba({buckets:e.initiated_by||[],name:"initiated_by",placeholder:"Initiated By"});t.push(n)}t.push({name:"start",placeholder:"Date After",type:"date",multiple:!1});return t.push({name:"end",placeholder:"Date Before",type:"date",multiple:!1}),t}function Za(e){return t=>{0!==t.length?(e.clearFilters(!1),t.forEach(t=>{if(t.value&&t.value.length>0){const n=t.name;let r;r="stringList"===t.type?t.value.map(e=>"string"==typeof e?e:e.value):t.multiple?Array.isArray(t.value)?t.value.map(e=>"object"==typeof e&&e.value?e.value:e):["object"==typeof t.value&&t.value.value?t.value.value:t.value]:Array.isArray(t.value)&&t.value[0]&&"object"==typeof t.value[0]?t.value[0].value:Array.isArray(t.value)&&t.value[0]?t.value[0]:t.value,"name"===n?(e.query.search_term=r,e.query.name=r):e.query[n]=r}}),e.search()):e.clearFilters()}}function Qa({facets:n,search:r}){const[i,a]=c([]),s=Ya(n),l=Za(r);return e(ne,{filterGroups:s,filters:i,setFilters:e=>{const t="function"==typeof e?e(i):e;a(t),l(t)},children:t("div",{className:"flex gap-2 items-center",children:[e(re,{}),e(ie,{}),e(ae,{})]})})}function Xa(e){const{typeRegistry:t}=Dt(),n=[];if(n.push({placeholder:"ID",name:"id",type:"text",options:[]}),n.push({placeholder:"Name",name:"name",type:"text",options:[]}),e.type){const r=Ia({buckets:e.type||[],typeRegistry:t,type:"select",multiple:!0});n.push(r)}if(e.status){const t=Ta({buckets:e.status||[],name:"status",placeholder:"Status",type:"select",multiple:!0});n.push(t)}return e.tags&&n.push({name:"tags",placeholder:"Tags",type:"stringList",options:e.tags.map(e=>({label:e,value:e}))}),n.push({name:"created_at",placeholder:"Created Date",type:"date",multiple:!0,options:[]}),n.push({name:"updated_at",placeholder:"Updated Date",type:"date",multiple:!0,options:[]}),n}function es(e){return t=>{0!==t.length?(e.clearFilters(!1),t.forEach(t=>{if(t.value&&t.value.length>0){const n=t.name;let r;if("date"===t.type&&t.multiple){if(Array.isArray(t.value)&&t.value.length>0)if(1===t.value.length){const e="object"==typeof t.value[0]?t.value[0].value:t.value[0];r={gte:e,lte:e}}else if(2===t.value.length){r={gte:"object"==typeof t.value[0]?t.value[0].value:t.value[0],lte:"object"==typeof t.value[1]?t.value[1].value:t.value[1]}}}else if(t.multiple)if(Array.isArray(t.value))r=t.value.map(e=>"object"==typeof e&&e.value?e.value:e);else{r=["object"==typeof t.value&&t.value.value?t.value.value:t.value]}else r=Array.isArray(t.value)&&t.value[0]&&"object"==typeof t.value[0]?t.value[0].value:Array.isArray(t.value)&&t.value[0]?t.value[0]:t.value;"name"===n?e.query.name=r:"id"===n?e.query.id=r:e.query[n]=r}}),e.search()):e.clearFilters()}}function ts({facets:n,search:r}){const[i,a]=c([]),s=Xa(n),l=es(r);return e(ne,{filterGroups:s,filters:i,setFilters:e=>{const t="function"==typeof e?e(i):e;a(t),l(t)},children:t("div",{className:"flex gap-2 items-center",children:[e(re,{}),e(ie,{}),e(ae,{})]})})}function ns(e){const t=[];t.push({name:"name",placeholder:"Name",type:"text",multiple:!1});t.push({name:"prompt",placeholder:"Prompt Name",type:"text",multiple:!1});t.push({name:"model",placeholder:"Model",type:"text",multiple:!1});return t.push({name:"tags",placeholder:"Tags",type:"stringList",multiple:!0}),t}function rs(e){return t=>{0!==t.length?(e.clearFilters(!1,!1),t.forEach(t=>{if(t.value&&t.value.length>0){const n=t.name;let r;r="stringList"===t.type?t.value.map(e=>"string"==typeof e?e:e.value):t.multiple?Array.isArray(t.value)?t.value.map(e=>"object"==typeof e&&e.value?e.value:e):["object"==typeof t.value&&t.value.value?t.value.value:t.value]:Array.isArray(t.value)&&t.value[0]&&"object"==typeof t.value[0]?t.value[0].value:Array.isArray(t.value)&&t.value[0]?t.value[0]:t.value,e.query[n]=r}}),e.search(!0)):e.clearFilters(!0,!0)}}function is({facets:n,search:r}){const[i,a]=c([]),s=ns(),l=rs(r);return e(ne,{filterGroups:s,filters:i,setFilters:e=>{const t="function"==typeof e?e(i):e;a(t),l(t)},children:t("div",{className:"flex gap-2 items-center",children:[e(re,{}),e(ie,{}),e(ae,{})]})})}function as(e){const t=[];if(t.push({name:"name",placeholder:"Name",type:"text",multiple:!1}),e.role&&e.role.length>0){const n={name:"role",placeholder:"Role",type:"select",options:e.role.map(e=>({label:e._id,value:e._id,count:e.count}))};t.push(n)}return t}function ss(e){return t=>{0!==t.length?(e.clearFilters(!1,!1),t.forEach(t=>{if(t.value&&t.value.length>0){const n=t.name;let r;r="stringList"===t.type?t.value.map(e=>"string"==typeof e?e:e.value):t.multiple?Array.isArray(t.value)?t.value.map(e=>"object"==typeof e&&e.value?e.value:e):["object"==typeof t.value&&t.value.value?t.value.value:t.value]:Array.isArray(t.value)&&t.value[0]&&"object"==typeof t.value[0]?t.value[0].value:Array.isArray(t.value)&&t.value[0]?t.value[0]:t.value,e.query[n]=r}}),e.search()):e.clearFilters(!0,!1)}}function ls({facets:n,search:r}){const[i,a]=c([]),s=as(n),l=ss(r);return e(ne,{filterGroups:s,filters:i,setFilters:e=>{const t="function"==typeof e?e(i):e;a(t),l(t)},children:t("div",{className:"flex gap-2 items-center",children:[e(re,{}),e(ie,{}),e(ae,{})]})})}function os(e){const{typeRegistry:t}=Dt(),n=[];if(n.push({name:"name",placeholder:"Name",type:"text",multiple:!1}),t){const e=t.types.map(e=>({label:e.name,value:e.id})),r={name:"types",placeholder:"Type",type:"select",multiple:!0,options:e,filterBy:(t,n)=>{const r=e.find(e=>e.value===t);return r?.label?.toLowerCase().includes(n.toLowerCase())??!1}};n.push(r)}return n}function cs(e){return t=>{0!==t.length?(e.clearFilters(!1),t.forEach(t=>{if(t.value&&t.value.length>0){const n=t.name;let r;r="stringList"===t.type?t.value.map(e=>"string"==typeof e?e:e.value):t.multiple?Array.isArray(t.value)?t.value.map(e=>"object"==typeof e&&e.value?e.value:e):["object"==typeof t.value&&t.value.value?t.value.value:t.value]:Array.isArray(t.value)&&t.value[0]&&"object"==typeof t.value[0]?t.value[0].value:Array.isArray(t.value)&&t.value[0]?t.value[0]:t.value,e.query[n]=r}}),e.search()):e.clearFilters(!0)}}function ds({facets:n,search:r}){const[i,a]=c([]),s=os(),l=cs(r);return e(ne,{filterGroups:s,filters:i,setFilters:e=>{const t="function"==typeof e?e(i):e;a(t),l(t)},children:t("div",{className:"flex gap-2 items-center",children:[e(re,{}),e(ie,{}),e(ae,{})]})})}class us{object;objects;setState;collectionId;singleSelection=!1;constructor(e,t,n,r){this.object=e,this.objects=n,this.setState=r,this.singleSelection=0===Object.keys(this.objects).length,this.collectionId=t}isSingleSelection(){return this.singleSelection}hasSelection(){return void 0!==this.object||0!==this.size()}size(){return Object.keys(this.objects).length}getObjectIds(){return Object.keys(this.objects)}getObjectId(){return this.object?.id}clone(){return new us(this.object,this.collectionId,this.objects,this.setState)}add(e){this.objects[e.id]=e,this.singleSelection=0===Object.keys(this.objects).length,this.setState(this.clone())}remove(e){delete this.objects[e],this.singleSelection=0===Object.keys(this.objects).length,this.setState(this.clone())}addAll(e){for(const t of e)this.objects[t.id]=t;this.setState(this.clone())}isSelected(e){return void 0!==this.objects[e]}removeAll(){this.objects={},this.singleSelection=!0,this.setState(this.clone())}}const ms=u(void 0);function hs(){const e=m(ms);if(!e)throw new Error("useObjectSelection must be used within a ObjectSelectionProvider");return e}function ps(){return m(ms)}function fs({value:t,collectionId:n,children:r}){const[i,a]=c();return d(()=>{const e=new us(t,n,{},a);a(e)},[t]),i&&e(ms.Provider,{value:i,children:r})}hn.extend(wn),hn.extend(xn);const gs={string(t,n){let r=[];if(t){const e=t.get("slice");e&&r.push(t=>t.slice(parseInt(e)));const n=t.get("max_length");n&&r.push(e=>e.slice(0,parseInt(n))),t.has("upper")&&r.push(e=>e.toUpperCase()),t.has("lower")&&r.push(e=>e.toLowerCase()),t.has("capitalize")&&r.push(e=>e[0].toUpperCase()+e.substring(1)),t.has("ellipsis")&&r.push(e=>e+"...")}return(t,n)=>{let i;if(t){if(i=String(t),r.length>0)for(const e of r)i=e(i)}else i="";return e("td",{children:i},n)}},fileSize:(t,n)=>(t,n)=>{let r="";if(t){const e=Number(t);if(isNaN(e))r=String(t);else{const t=["Bytes","KB","MB","GB","TB"];if(0===e)r="0 Bytes";else{const n=Math.floor(Math.log(e)/Math.log(1024));r=`${(e/Math.pow(1024,n)).toFixed(2)} ${t[n]}`}}}return e("td",{children:r},n)},number(t,n){let r,i;t&&(r=t.get("currency")||void 0,i=t.get("decimals")||void 0);const a=i?parseInt(i):2;return(t,n)=>{let i=new Intl.NumberFormat("en-US",{style:r?"currency":"decimal",currency:r,maximumFractionDigits:a}).format(t);return e("td",{children:i},n)}},objectId(n,r){let i=[],a=!1;if(n){const e=n.get("slice");e&&(a=!0,i.push(t=>t.slice(parseInt(e))))}return(n,s)=>{const l=i.reduce((e,t)=>t(e),n.id);return t("td",{className:"flex justify-between items-center gap-2",children:[a?"~":"",l,e(x,{variant:"ghost",alt:"Preview Object",onClick:e=>{e.stopPropagation(),r?.(n.id)},children:e(mt,{className:"size-4"})})]},s)}},objectName(t,n){let r="title";return t&&(r=t.get("title")||"title"),(t,n)=>e("td",{children:t.properties?.[r]||t.name||Vr(t.id)},n)},objectLink(n,r){const i=[];return i.push(e=>e.slice(-7)),(n,a)=>{const s=i.reduce((e,t)=>t(e),n.id);return t("td",{className:"flex justify-between items-center gap-2 max-w-48",children:["~",s,e(x,{variant:"ghost",alt:"Preview Object",onClick:e=>{e.stopPropagation(),r?.(n.id)},children:e(mt,{className:"size-4"})})]},a)}},typeLink:(t,n)=>(t,n)=>e("td",{children:t?.name||"n/a"},n),date(t,n){let r="format",i="LLL";if(t){const e=t.get("localized");if(e)i=e;else{const e=t.get("relative");e&&(r=e,i=void 0)}}return(t,n)=>e("td",{children:hn(t)[r](i)},n)}},ys=gs.string();function bs(e,t){let n=e;if(!n)return;if(!t.length)return n;const r=t.length-1;for(let e=0;e<r;e++)if(n=n[t[e]],!n)return;return n[t[r]]}function vs(e){return e&&"."!==e?e.split("."):[]}class xs{layout;renderer=ys;path;fallbackPath;previewObject;constructor(e,t){if(this.layout=e,this.path=vs(e.field||""),this.fallbackPath=e.fallback?vs(e.fallback):void 0,this.previewObject=t,e.render)this.renderer=(e,t)=>null;else{const t=e.type||"string",n=t.indexOf("?");if(n>0){const e=t.substring(0,n),r=new URLSearchParams(t.substring(n+1));this.renderer=gs[e](r)}else this.renderer=gs[t]()}}get name(){return this.layout.name}resolveValue(e){let t=bs(e,this.path);return void 0===t&&this.fallbackPath&&(t=bs(e,this.fallbackPath)),void 0===t&&(t=this.layout.default),t}render(t,n){if(this.layout.render)return e("td",{className:"whitespace-nowrap px-3 py-4 text-sm",children:this.layout.render(t)},n);const r=this.layout.type||"string",i=r.indexOf("?")>0?r.substring(0,r.indexOf("?")):r;if(("objectId"===i||"objectLink"===i)&&this.previewObject){const e=r.indexOf("?"),a=e>0?new URLSearchParams(r.substring(e+1)):void 0;return gs[i](a,e=>{this.previewObject(t.id)})(t,n)}return this.renderer(this.resolveValue(t),n)}}function ws({objects:n,selection:r,isLoading:i,columns:a,onRowClick:s,selectedObject:l,toggleAll:o,onSelectionChange:c}){return t(te,{className:"w-full border-t",children:[e("thead",{children:t("tr",{children:[r&&e("th",{children:e("input",{type:"checkbox",onChange:o})}),a.map(t=>e("th",{children:t.name},t.name))]})}),t(se,{isLoading:i,columns:a.length+1,children:[n?.map(n=>t("tr",{className:"cursor-pointer hover:bg-muted group "+(l?.id===n.id?"bg-muted":""),onClick:()=>{s&&s(n)},children:[r&&e("td",{onClick:e=>e.stopPropagation(),children:e("input",{checked:r.isSelected(n.id),type:"checkbox",className:""+(r.isSelected(n.id)?"":"hidden group-hover:block"),onChange:e=>c(n,e)})}),a.map((e,t)=>e.render(n,t))]},n.id)),0===n.length&&e("tr",{children:e("td",{colSpan:a.length+(r?1:0),className:"text-center",children:"No objects. Just drag and drop documents or images here to create content objects."})})]})]})}function Ns({objects:r,selection:i,isLoading:a,onSelectionChange:s,onRowClick:l,previewObject:o,selectedObject:c}){return t(n,{children:[e(wa,{isLoading:a}),e("div",{className:"w-full gap-2 grid xs:grid-cols-1 sm:grid-cols-2 md:grid-cols-4 lg:grid-cols-6 @xs:grid-cols-1 @sm:grid-cols-2 @md:grid-cols-3 @lg:grid-cols-4",children:r.map(t=>e(Na,{document:t,selection:i,onSelectionChange:s,onRowClick:l,previewObject:o,selectedObject:c},t.id))})]})}class ks{client;limit;collectionId;facets=new le({});result=new le({objects:[],isLoading:!1});facetSpecs=[];query={};constructor(e,t=100){this.client=e,this.limit=t}withFacets(e){return this.facetSpecs=e,this}get objects(){return this.result.value.objects}get error(){return this.result.value.error}get isRunning(){return this.result.value.isLoading}get hasMore(){return this.result.value.hasMore||!1}getFilterValue(e){return this.query[e]}setFilterValue(e,t){this.query[e]=t,this.search()}setDefaultKeys(e){}clearFilters(e=!0){const{parent:t,full_text:n,vector:r,weights:i,score_aggregation:a,dynamic_scaling:s,limit:l,all_revisions:o}=this.query;this.query={parent:t,...void 0!==n&&{full_text:n},...void 0!==r&&{vector:r},...void 0!==i&&{weights:i},...void 0!==a&&{score_aggregation:a},...void 0!==s&&{dynamic_scaling:s},...void 0!==o&&{all_revisions:o},...void 0!==l&&{limit:l}},e&&this.search()}getFacetBuckets(e){return this.facets.value[e]?.buckets||[]}resetFacets(){this.query={}}reset(e=!1){this.result.value={objects:[],isLoading:e,hasMore:!0}}_updateRunningState(e){const t=this.result.value;this.result.value={objects:t.objects,isLoading:e,error:t.error,hasMore:t.hasMore}}_searchRequest(e,t,n,r=!0){const i={limit:t,offset:n,query:e,facets:r?this.facetSpecs:void 0};return this.collectionId?this.client.collections.searchMembers(this.collectionId,i):this.client.objects.search(i)}_facetsRequest(){const e={facets:this.facetSpecs,query:this.query};return this.collectionId?this.client.collections.computeFacets(this.collectionId,e):this.client.objects.computeFacets(e)}computeFacets(e){this._facetsRequest().then(e=>{this.facets.value=e})}_search(e=!1,t=!1){if(this.isRunning&&e)return Promise.resolve(!1);this.result.value={isLoading:!0,objects:e?this.objects:[],hasMore:!e||this.result.value.hasMore};const n=this.limit,r=e?this.objects.length:0;return this._searchRequest(this.query,n,r,!t).then(async r=>{const i=r.results||[],a=r.facets||{};return this.result.value={isLoading:!1,objects:e?this.objects.concat(i):i,hasMore:i.length===n},!t&&a&&Object.keys(a).length>0&&(this.facets.value=a),!0}).catch(e=>{throw this.result.value={error:e,isLoading:!1,objects:this.objects,hasMore:this.result.value.hasMore},e})}search(e=!1){return this.isRunning&&this.objects.length>0?Promise.resolve(!1):this._search(!1,e)}loadMore(e=!1){return this.isRunning||!this.hasMore||this.query.vector?Promise.resolve(!1):(this.objects.length>0&&(e=!0),this._search(!0,e))}}const Cs=u(void 0);function Ss(){return m(Cs)}function Ps(){return oe(Ss().facets)}function js(){const e=Ss();return{...oe(e.result),search:e}}function _s(){const e=Ss();return oe(e.facets).total}var Ts;async function Is(e){try{const t=await e.arrayBuffer(),n=new Nn;n.appendByteArray(new Uint8Array(t));const r=n.end();return r?.toString()}catch(e){return void console.error("Error calculating file hash:",e)}}function As(){const{client:e}=Dt(),t=b();return{checkDocumentProcessing:async(n,r,i)=>{try{console.log(`Preparing metadata for ${n.length} files...`);const t=await async function(e,t){const n=[];for(let r=0;r<e.length;r+=5){const i=e.slice(r,r+5),a=await Promise.all(i.map(async e=>{let n=t||"/";if(e.webkitRelativePath){const r=e.webkitRelativePath.split("/");if(r.length>1){const e=r.slice(0,-1).join("/");n=t?`${t}/${e}`:e}}return{file:e,hash:await Is(e),name:e.name,size:e.size,location:n}}));n.push(...a)}return n}(n,r),a=async()=>{let n;const r={query:{match:{"content.etag":{$in:t.map(e=>e.hash)}}},select:"id content.etag"};n=i?(await e.store.collections.searchMembers(i,r)).results:(await e.store.objects.search(r)).results;for(const e of n){const n=t.find(t=>t.hash===e.content.etag);n&&(n.existingId=e.id,n.action=Ts.SKIP)}},s=async()=>{const n=t.filter(e=>e.action!==Ts.SKIP),r=n.map(e=>e.location),a=Array.from(new Set(r)),s=[];for(const t of a){const r={"content.name":{$in:n.filter(e=>e.location===t).map(e=>e.name)},location:t||"/"};if(i){const t=e.store.collections.searchMembers(i,{query:{match:r},select:"id content.name location"}).then(e=>e.results);s.push(t)}else{const t=e.store.objects.find({query:r,select:"id content.name location"});s.push(t)}}const l=(await Promise.all(s)).flat();console.log(`Found ${l.length} document to update`,l);for(const e of l){const n=t.find(t=>t.name===e.content.name&&(t.location?t.location===e.location:"/"===e.location));n&&(n.existingId=e.id,n.action=Ts.UPDATE)}console.log(`Reconciled ${t.filter(e=>e.action===Ts.UPDATE).length}`)};return await a(),await s(),t.forEach(e=>{e.action||(e.action=Ts.CREATE)}),console.log("Document processing check results:",{totalFiles:n.length,toCreate:t.filter(e=>e.action===Ts.CREATE).length,toUpdate:t.filter(e=>e.action===Ts.UPDATE).length,toSkip:t.filter(e=>e.action===Ts.SKIP).length}),t}catch(e){throw t({title:"Error in file upload processing check",status:"error",description:e.message}),console.log("Error in file upload processing check",e),new Error("Error in file upload processing check: "+e.message)}}}}function zs({isOpen:r,onClose:i,files:a,collectionId:s,selectedFolder:l,title:u="Upload Files",children:m,onUploadComplete:h,hideFileSelection:p=!1,showTypeSelectionOnly:f=!1,allowFolders:g=!0}){const{client:y,typeRegistry:v}=Dt(),w=b(),[N,k]=c([]),[C,S]=c([]),[P,j]=c(!1),[_,T]=c(null),[I,A]=c([]),[z,E]=c(!1),[F,D]=c(!1),[$,O]=c(0),[R,U]=c(Date.now()),[M,V]=c(void 0),[q,J]=c(null),[Y,Z]=c(u),[Q,X]=c("");d(()=>{s&&y.store.collections.retrieve(s).then(V)},[s]),d(()=>{z?(Z("Uploading Files"),X(`${Math.round($)}% complete`)):F?(Z("Upload Complete"),X("")):P?(Z("File Analysis Results"),X(`${N.length} file${1!==N.length?"s":""}`)):N.length>0?(Z(u),X("Checking for duplicates and updates")):(Z(u),X(""))},[z,F,P,u,$,N.length]);const ee=()=>M||l?t(ce,{className:"mb-4",status:"default",icon:e(xt,{className:"size-5"}),children:[e("div",{className:"flex items-center",children:e("span",{className:"font-medium",children:"Upload Location:"})}),t("div",{className:"text-sm mt-1",children:[M&&t("div",{className:"flex items-center",children:[e("span",{className:"mr-1",children:"Collection:"}),e("span",{className:"font-medium",children:M.name})]}),l&&t("div",{className:"flex items-center mt-1",children:[e("span",{className:"mr-1",children:"Folder:"}),e("span",{className:"font-medium",children:l})]})]})]}):null,[te,ne]=c({toCreate:0,toUpdate:0,toSkip:0}),{checkDocumentProcessing:re}=As(),ie=o(()=>v?.types||[],[v?.types]);d(()=>{r&&(S([]),j(!1),T(null),A([]),E(!1),D(!1),O(0),ne({toCreate:0,toUpdate:0,toSkip:0}),J(null),Z(u),X(""),a&&a.length>0?(k(a),le(a)):k([]),U(Date.now()))},[r,a]);const ae=()=>{k([]),S([]),j(!1),T(null),A([]),E(!1),D(!1),O(0),ne({toCreate:0,toUpdate:0,toSkip:0}),J(null),Z(u),X(""),U(Date.now()),i()},se=e=>{e&&e.length>0&&(k(e),le(e))},le=async e=>{if(e.length)try{console.log(`Processing ${e.length} files to determine required actions...`);const t=await re(e,l,s);S(t);const n=t.filter(e=>e.action===Ts.CREATE).length,r=t.filter(e=>e.action===Ts.UPDATE).length,i=t.filter(e=>e.action===Ts.SKIP).length;ne({toCreate:n,toUpdate:r,toSkip:i}),w({title:"Files analyzed",description:`${e.length} file(s): ${n} new, ${r} to update, ${i} to skip`,status:"info",duration:4e3}),j(!0)}catch(e){console.error("Error processing files:",e),w({title:"Error",description:"There was an error analyzing the files",status:"error",duration:5e3})}},oe=async()=>{if(!C.length)return;const e=_?.id||null,t=C.map(e=>({file:e.file,status:"pending",progress:0,action:e.action===Ts.CREATE?"create":e.action===Ts.UPDATE?"update":"skip"}));A(t),E(!0),D(!1);const n=C.filter(e=>e.action===Ts.SKIP),r=C.filter(e=>e.action===Ts.UPDATE),i=C.filter(e=>e.action===Ts.CREATE),a={success:!0,objectIds:[],uploadedFiles:[],skippedFiles:[],failedFiles:[]};for(const t of n)t.existingId&&(a.objectIds.push(t.existingId),a.skippedFiles.push({id:t.existingId,name:t.name,type:e,status:"skipped",location:t.location}),A(e=>e.map(e=>e.file===t.file?{...e,status:"success",progress:100,id:t.existingId}:e)));const l=async(t,n)=>{const r=[];for(let e=0;e<t.length;e+=50)r.push(t.slice(e,e+50));for(let i=0;i<r.length;i++){const l=r[i];if(console.log(`Processing ${n} batch ${i+1}/${r.length} (${l.length} files)`),t.length>50){w({title:`Processing files (${n})`,description:`Processed ${50*i}/${t.length} files...`,status:"info",duration:2e3})}let o=0;await Promise.all(l.map(async t=>{try{if(A(e=>e.map(e=>e.file===t.file?{...e,status:"uploading",progress:20}:e)),"update"===n&&t.existingId)await y.store.objects.update(t.existingId,{type:e||void 0,content:t.file,location:t.location,name:t.name},{createRevision:!0,revisionLabel:"upload on "+(new Date).toISOString()}),A(e=>e.map(e=>e.file===t.file?{...e,status:"success",progress:100,id:t.existingId}:e)),a.objectIds.push(t.existingId),a.uploadedFiles.push({id:t.existingId,name:t.name,type:e,status:"updated",location:t.location});else{const n=await y.store.objects.create({type:e||void 0,content:t.file,location:t.location||t.file.webkitRelativePath||t.name},{collection_id:s});A(e=>e.map(e=>e.file===t.file?{...e,status:"success",progress:100,id:n.id}:e)),a.objectIds.push(n.id),a.uploadedFiles.push({id:n.id,name:t.name,type:e,status:"created",location:t.location})}}catch(n){console.error(`Failed to process file ${t.name}:`,n),A(e=>e.map(e=>e.file===t.file?{...e,status:"error",progress:100,message:n.message||"Unknown error"}:e)),a.failedFiles.push({name:t.name,error:n.message||"Unknown error",status:"failed",location:t.location,type:e}),a.success=!1}o++,o%5!=0&&o!==l.length||A(e=>{const t=e.filter(e=>"success"===e.status||"error"===e.status).length,n=e.length,r=n>0?Math.round(t/n*100):0;return O(r),e})}))}};r.length>0&&await l(r,"update"),i.length>0&&await l(i,"create"),A(e=>{const t=e.filter(e=>"pending"===e.status).map(e=>({...e,status:"error",progress:100,message:"Upload process interrupted"}));return t.length>0?(t.forEach(e=>{a.failedFiles.push({name:e.file.name,error:"Upload process interrupted",status:"failed",type:_?.id||null})}),a.success=!1,e.map(e=>"pending"===e.status?{...e,status:"error",progress:100,message:"Upload process interrupted"}:e)):e}),E(!1),D(!0);const o=a.uploadedFiles.filter(e=>"created"===e.status).length,c=a.uploadedFiles.filter(e=>"updated"===e.status).length,d=a.skippedFiles.length,u=a.failedFiles.length;let m="";o>0&&(m+=`${o} file${1!==o?"s":""} uploaded`),c>0&&(m+=m?", ":"",m+=`${c} file${1!==c?"s":""} updated`),d>0&&(m+=m?", ":"",m+=`${d} file${1!==d?"s":""} skipped`),u>0&&(m+=m?", ":"",m+=`${u} file${1!==u?"s":""} failed`),w({title:"Upload Complete",description:m,status:u>0?"warning":"success",duration:5e3}),J(a)},ue=()=>t("div",{className:"mb-4",children:[t("label",{className:"block text-sm font-medium mb-2",children:["Content Type ",e("span",{className:"text-muted font-normal",children:"(Optional)"}),e(L,{description:"Select a content type to apply to the uploaded files. If left empty, Vertesia will automatically detect the type based on file content.",placement:"top",size:"xs",children:e(Re,{className:"size-3 ml-2"})})]}),e(de,{options:ie,value:_,optionLabel:e=>e?e.name:"Select a content type",placeholder:"Select a content type or leave empty for automatic detection",onChange:e=>T(void 0===e?null:e),filterBy:"name",isClearable:!0}),_?e(n,{}):e("div",{className:"p-2 rounded-md",children:t("div",{className:"flex items-center text-attention",children:[e(gt,{className:"size-4 mr-1"}),"Automatic Type Detection",e(L,{description:"Vertesia will analyze the content and select the most appropriate type. This is recommended for most uploads and ensures optimal processing.",placement:"top",size:"xs",children:e(Re,{className:"size-3 ml-2"})})]})})]});return t(B,{isOpen:r,onClose:ae,className:"mx-auto",disableCloseOnClickOutside:!0,children:[e(W,{description:Q,children:Y}),f?t(G,{children:[m,ee(),ue()]}):0!==N.length||p?z||F?z?t(G,{children:[ee(),e("div",{className:"mb-4",children:e("div",{className:"h-2 bg-muted/20 rounded-full overflow-hidden",children:e("div",{className:"h-full bg-primary rounded-full",style:{width:`${$}%`}})})}),e("div",{className:"max-h-96 overflow-y-auto",children:I.map((n,r)=>t("div",{className:"flex items-center py-2 border-b border-border last:border-b-0",children:[t("div",{className:"mr-3",children:["pending"===n.status&&e(bt,{className:"size-5 text-muted"}),"uploading"===n.status&&e(K,{size:"sm"}),"success"===n.status&&e(gt,{className:"size-5 text-success"}),"error"===n.status&&e(vt,{className:"size-5 text-destructive"})]}),t("div",{className:"flex-1 min-w-0",children:[e("div",{className:"truncate font-medium",children:n.file.name}),t("div",{className:"text-xs text-muted",children:["pending"===n.status&&"Waiting...","uploading"===n.status&&"Uploading...","success"===n.status&&("create"===n.action?"Created":"update"===n.action?"Updated":"Skipped"),"error"===n.status&&n.message]})]})]},`${n.file.name}-${r}`))})]}):e(G,{children:t("div",{className:"mb-4",children:[ee(),e(ln,{files:I.map(e=>{let t;return t="success"===e.status?"create"===e.action?"success":"update"===e.action?"updated":"skipped":"failed",{name:e.file.name,status:t,error:"error"===e.status?e.message:void 0}}),location:l||void 0,collection:M?.name})]})}):e(G,{children:P?t(n,{children:[ee(),e("div",{className:"mb-4",children:e("div",{className:"p-4 rounded-md mb-4",children:t("div",{className:"grid grid-cols-3 gap-4",children:[t("div",{className:"flex flex-col items-center",children:[t("div",{className:"flex items-center gap-2",children:[e(ft,{className:"size-5 text-primary"}),e("span",{className:"font-medium",children:"New"})]}),e("div",{className:"text-2xl font-semibold",children:te.toCreate})]}),t("div",{className:"flex flex-col items-center",children:[t("div",{className:"flex items-center gap-2",children:[e(gt,{className:"size-5 text-success"}),e("span",{className:"font-medium",children:"Update"})]}),e("div",{className:"text-2xl font-semibold",children:te.toUpdate})]}),t("div",{className:"flex flex-col items-center",children:[t("div",{className:"flex items-center gap-2",children:[e(yt,{className:"size-5 text-mixer-attention/40"}),e("span",{className:"font-medium",children:"Skip"})]}),e("div",{className:"text-2xl font-semibold",children:te.toSkip})]})]})})}),ue(),e(ce,{className:"mb-4",status:"info",children:te.toCreate+te.toUpdate>0?t("div",{className:"space-y-1",children:[t("p",{children:[te.toCreate+te.toUpdate," file",te.toCreate+te.toUpdate>1?"s are":" is"," ready to process"]}),e("p",{children:te.toSkip>0&&`${te.toSkip} file${te.toSkip>1?"s are":" is"} already in the system and will be skipped.`})]}):te.toSkip>0?t("span",{children:["All ",te.toSkip," file(s) already exist in the system and will be skipped. You can proceed to view the results."]}):e("span",{children:"No files to process."})})]}):t("div",{className:"flex flex-col items-center justify-center py-4",children:[e(K,{size:"lg",className:"mb-4"}),e("div",{className:"text-lg font-medium",children:"Analyzing files..."})]})}):t(G,{className:"flex flex-col items-center justify-center p-8",children:[ee(),e(sn,{onDrop:se,message:"Drag and drop files here or click to select",buttonLabel:"Select Files",className:"w-full h-64",allowFolders:g}),m]}),(()=>{if(f)return t(H,{children:[e(x,{variant:"ghost",onClick:ae,children:"Cancel"}),e(x,{onClick:()=>{h&&h({success:!0,objectIds:[],uploadedFiles:[{name:"type-selection",type:_?.id||null,status:"created"}],skippedFiles:[],failedFiles:[]}),ae()},children:_?`Use ${_.name}`:"Use Automatic Type Detection"})]});if(0===N.length&&!p)return e(H,{children:e(x,{variant:"ghost",onClick:ae,children:"Cancel"})});if(!z&&!F){const n=P;return t(H,{children:[e(x,{variant:"ghost",onClick:ae,children:"Cancel"}),e(x,{disabled:!n,onClick:oe,children:te.toCreate+te.toUpdate>0?"Upload":"Continue"})]})}return z?e(H,{children:e(x,{variant:"ghost",disabled:!0,children:"Uploading..."})}):t(H,{children:[e(x,{variant:"ghost",onClick:()=>{k([]),S([]),j(!1),T(null),A([]),E(!1),D(!1),O(0),ne({toCreate:0,toUpdate:0,toSkip:0})},children:"Upload More"}),e(x,{onClick:()=>{h&&q&&h(q),ae()},children:"Close"})]})})()]},R)}function Es(e){const t="function"==typeof e?e:e.onUploadDone,{client:n,project:r,store:i}=Dt(),a=Ss(),s=b(),{checkDocumentProcessing:l}=As();return async(e,o,c)=>{const d={success:!1,objectIds:[],uploadedFiles:[],skippedFiles:[],failedFiles:[]};if(!r)return s({status:"error",title:"No project selected",duration:3e3}),d;if(!e||0===e.length)return s({status:"warning",title:"No files selected",duration:3e3}),d;const u=Array.from(e).filter(e=>e.size>0);if(0===u.length)return s({status:"error",title:"No valid files selected",description:"Please select files with valid content.",duration:5e3}),d;const m=[],h=[],p=[];console.log(`Processing ${u.length} files with smart file processing...`);const f=await l(u,null,c),g=f.filter(e=>e.action===Ts.CREATE).length,y=f.filter(e=>e.action===Ts.UPDATE).length,b=f.filter(e=>e.action===Ts.SKIP).length;s({title:"Files analyzed",description:`${u.length} file(s): ${g} new, ${y} to update, ${b} to skip`,status:"info",duration:4e3});for(const e of f.filter(e=>e.action===Ts.SKIP&&e.existingId))m.push({id:e.existingId,name:e.name,type:o,status:"skipped",location:e.location});const v=f.filter(e=>(e.action===Ts.CREATE||e.action===Ts.UPDATE)&&e.file);if(v.length>0){console.log(`Processing ${v.length} files (${v.filter(e=>e.action===Ts.CREATE).length} create, ${v.filter(e=>e.action===Ts.UPDATE).length} update)...`);const e=50,t=[];for(let n=0;n<v.length;n+=e)t.push(v.slice(n,n+e));for(let r=0;r<t.length;r++){const a=t[r],l=r*e;console.log(`Processing batch ${r+1}/${t.length} (${a.length} files)`),v.length>e&&s({title:"Processing files",description:`Processed ${l}/${v.length} files...`,status:"info",duration:2e3});const u=await Promise.all(a.map(async e=>{try{if(e.action===Ts.UPDATE&&e.existingId){const t=await n.store.objects.update(e.existingId,{type:o||void 0,content:e.file,location:e.location,name:e.name},{createRevision:!0,revisionLabel:"upload on "+(new Date).toISOString()});return h.push({id:e.existingId,name:e.name,type:o,status:"updated",location:e.location}),d.objectIds.push(e.existingId),{success:!0,id:t.id,name:e.name,action:"update"}}{const t=c?{collection_id:c}:void 0,n=await i.objects.create({type:o||void 0,content:e.file,location:e.location||e.file.webkitRelativePath||e.name},t);h.push({id:n.id,name:e.name,type:o,status:"created",location:e.location})}}catch(t){console.error(`Failed to process file ${e.name}:`,t),p.push({name:e.name,error:t.message||"Unknown error",status:"failed",location:e.location,type:o}),s({status:"error",title:`Processing failed for ${e.name}`,description:t.message,duration:4e3})}})),m=h.filter(e=>"created"===e.status),f=h.filter(e=>"updated"===e.status),g=h.filter(e=>"failed"===e.status);console.log(`Batch ${r+1} results:`,{creates:m,updates:f,failures:g,total:u.length})}}const x=h.filter(e=>"created"===e.status).length,w=h.filter(e=>"updated"===e.status).length,N=h.filter(e=>"failed"===e.status).length,k=h.filter(e=>"skipped"===e.status).length;t&&(console.log("Upload complete:",{totalObjectIds:d.objectIds.length,uploadedFiles:x,updatedFiles:w,skippedFiles:k,failedFiles:N}),await t(d.objectIds));let C="";return x>0&&(C+=`${x} file${1!==x?"s":""} uploaded`),w>0&&(C+=C?", ":"",C+=`${w} file${1!==w?"s":""} updated`),k>0&&(C+=C?", ":"",C+=`${k} file${1!==k?"s":""} skipped (already existed)`),N>0&&(C+=C?", ":"",C+=`${N} file${1!==N?"s":""} failed`),C&&s({status:N>0?"warning":"success",title:C,duration:4e3}),a.search(),d}}!function(e){e.CREATE="create",e.SKIP="skip",e.UPDATE="update"}(Ts||(Ts={}));const Fs=[{name:"ID",field:"id",type:"objectId?slice=-7"},{name:"Name",field:".",type:"objectName"},{name:"Type",field:"type.name",type:"string"},{name:"Status",field:"status",type:"string"},{name:"Updated At",field:"updated_at",type:"date"}];function Ds({isGridView:t=!1,onUpload:n,collectionId:r,...i}){return n?e($s,{...i,onUpload:n,isGridView:t,collectionId:r}):e(Ls,{...i,isGridView:t})}function $s({isGridView:n,onUpload:i,collectionId:a,skipTypeModal:s=!1,...l}){const[o,d]=c(!1),[u,m]=c([]),[h,p]=c(!1),[f,g]=c(null),[y,v]=c(!1),x=Ss(),w=b(),{checkDocumentProcessing:N}=As(),k=async(e,t)=>{console.log("Files dropped on ObjectTable:",e.length,t),d(!0);try{if(a){const t=await N(e,null,a);g(t);const n=t.filter(e=>"create"===e.action).length,r=t.filter(e=>"update"===e.action).length,i=t.filter(e=>"skip"===e.action).length;w({title:"Files ready to process",description:`${e.length} file(s): ${n} new, ${r} to update, ${i} to skip`,status:"info",duration:4e3})}else g(null)}catch(e){console.error("Error processing files:",e),w({title:"Error processing files",description:"There was an error checking for duplicate files",status:"error",duration:4e3}),g(null)}finally{if(d(!1),m(e),p(!1),s){console.log("Skipping type modal and calling onUpload directly",{filesLength:e.length,processedFilesLength:f?.length});const t=i(e,null,a);t&&"object"==typeof t&&(t.processedFiles=f)}else console.log("Setting typeSelectionOpen to true",{filesLength:e.length}),v(!0)}},C=e=>{const t=[...u];m([]),g(null),v(!1),t.length>0&&void 0!==e&&(d(!0),console.log("Starting upload with",{typeId:e,filesCount:t.length,hasProcessingResults:!!f,collectionId:a}),i(t,e,a).finally(()=>{d(!1),x.search()}))},S=e=>{e.preventDefault(),e.stopPropagation(),p(!0)};return t("div",{className:"min-h-[400px] relative",onDragOver:S,onDragEnter:S,onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.contains(e.relatedTarget)||p(!1)},onDrop:e=>{if(e.preventDefault(),e.stopPropagation(),p(!1),e.dataTransfer.items){const t=[];for(let n=0;n<e.dataTransfer.items.length;n++){const r=e.dataTransfer.items[n];if("file"===r.kind){const e=r.getAsFile();e&&t.push(e)}}if(t.length>0){const e={count:t.length,message:`Preparing to upload ${t.length} file${1===t.length?"":"s"}...`};k(t,e)}}},children:[e("div",{className:r("bg-white dark:bg-gray-800 opacity-40 absolute inset-0 z-50 flex justify-center items-center",o?"block":"hidden"),children:e(K,{size:"xl"})}),e(Ls,{...l,isGridView:n}),e("div",{className:r("absolute inset-0 pointer-events-none",h?"z-40":"-z-10"),children:e("div",{className:"w-full h-full relative",children:e(sn,{onDrop:k,message:"Drop files or folders here to upload",className:r("absolute inset-0 bg-white/90 dark:bg-gray-800/90 pointer-events-auto",h?"flex":"hidden"),buttonLabel:"Select Files or Folders",allowFolders:!0})})}),e(zs,{isOpen:y&&u.length>0,onClose:()=>{m([]),g(null),v(!1),C(void 0)},files:u,collectionId:a,selectedFolder:null,title:"Upload Files",onUploadComplete:e=>{if(e){if(e.failedFiles&&e.failedFiles.length>0&&w({title:"Upload Issues",description:`${e.failedFiles.length} file(s) failed to upload`,status:"warning",duration:5e3}),e.success){const t=e.uploadedFiles.filter(e=>"created"===e.status).length,n=e.uploadedFiles.filter(e=>"updated"===e.status).length,r=e.skippedFiles.length;(t>0||n>0)&&w({title:"Upload Complete",description:`${t>0?`${t} created`:""}${t>0&&n>0?", ":""}${n>0?`${n} updated`:""}${r>0?`, ${r} skipped`:""}`,status:"success",duration:5e3})}x.search()}m([]),g(null),v(!1),e&&e.success&&e.objectIds.length>0?C(null):C(void 0)}})]})}function Ls({objects:t,layout:n=Fs,isLoading:r,onRowClick:i,onSelectionChange:a,previewObject:s,selectedObject:l,isGridView:c}){const d=ps(),u=(e,n)=>{if(d){const r=n.nativeEvent.shiftKey;if(n.target.checked){if(d.add(e),r){const n=t.findIndex(t=>t.id===e.id),r=function(e,t,n){for(let r=t-1;r>=0;r--)if(n.isSelected(e[r].id))return r;return-1}(t,n,d);if(r>-1&&r<n-1){const e=[];for(let i=r+1;i<n;i++)e.push(t[i]);d.addAll(e)}else{const e=function(e,t,n){const r=e.length;for(let i=t+1;i<r;i++)if(n.isSelected(e[i].id))return i;return-1}(t,n,d);if(e>-1&&e>n+1){const r=[];for(let i=n+1;i<e;i++)r.push(t[i]);d.addAll(r)}}}}else d.remove(e.id);a&&a(d)}},m=e=>{if(d){e.target.checked?d.addAll(t):d.removeAll()}},h=o(()=>(n.length>0?n:Fs).map(e=>new xs(e,s)),[n,s]);return e(c?Ns:ws,{objects:t,isLoading:r,columns:h,onRowClick:i,previewObject:s,selectedObject:l,selection:d,toggleAll:m,onSelectionChange:u})}function Os({children:t,limit:n,parent:r,typeId:i,facets:a,name:s,collectionId:l}){const{store:c}=Dt(),d=o(()=>{let e;a?e=a:(e=[{name:"status",field:"status"},{name:"location",field:"location"}],i||e.unshift({name:"type",field:"type"}));const t=new ks(c,n).withFacets(e);return t.collectionId=l,t.query.type=i,t.query.parent=r,t.query.name=s,t},[i,n,l]);return e(Cs.Provider,{value:d,children:t})}const Rs=[{name:"Name",field:"properties.title",type:"string",fallback:"name"},{name:"Type",field:"type.name",type:"string"},{name:"Status",field:"status",type:"string"},{name:"Created At",field:"created_at",type:"date"}];function Us({onChange:t}){return e(Os,{children:e(Ms,{onRowClick:e=>{t(e||void 0)}})})}function Ms({onRowClick:n}){const[r,a]=c(!1),[s,l]=c("grid"===localStorage.getItem("vertesia.content_store.lastDisplayedView")),{search:o,isLoading:u,error:m,objects:p,hasMore:f}=js(),g=h(null);ue(g,()=>{r&&f&&!u&&(a(!1),o.loadMore(!0).finally(()=>{a(!0)}))},{threshold:.1,deps:[r,f,u]}),d(()=>{o.search().finally(()=>{a(!0)})},[]);const y=Ps(),b=Ss();return m?e(R,{title:"Search failed",children:m.message}):t("div",{className:"flex flex-col gap-2 h-full w-full",children:[t("div",{className:"flex justify-between items-center flex-shrink-0",children:[e(ts,{facets:y,search:b}),t("div",{className:"flex items-center gap-2",children:[e(x,{variant:"outline",onClick:()=>{a(!1),o.search().then(()=>a(!0))},alt:"Refresh",children:e(pt,{size:16})}),e(Mr,{onUpdate:l})]})]}),t("div",{className:"@container flex-1 overflow-y-auto",children:[e(Ds,{objects:p||[],isLoading:!1,layout:Rs,onRowClick:n,isGridView:s}),e("div",{ref:g,className:"h-4 w-full"}),e("div",{className:i("bg-white dark:bg-gray-800 opacity-80 absolute inset-0 z-50 flex justify-center items-center rounded",u?"block":"hidden"),children:e(K,{size:"xl"})})]})]})}function Vs({isOpen:n,onClose:r}){return t(B,{onClose:()=>r(),isOpen:!!n,className:"min-w-[60vw]",children:[e(W,{children:"Select Content"}),e(G,{className:"pt-0 overflow-y-auto max-h-[80vh] min-h-[80vh]",children:n&&e(Us,{onChange:r})})]})}const Ks=/store:([a-f0-9]+)/;function qs({object:n}){const{client:i}=Dt(),{off:a,on:s,isOn:l}=me(),[o,u]=c(null!=n.value?String(n.value):""),[m,h]=c(void 0),p=()=>{u(""),n.value="",h(void 0)};return d(()=>{if(!o||m)return;const e=o.match(Ks);e&&i.objects.get(e[1]).then(e=>{h(e)}).catch(()=>{p()})},[o]),t("div",{children:[t("div",{className:"relative",children:[e("input",{value:o,onChange:e=>{const t=e.target.value;u(t),n.value=t},className:r(he.INPUT,"pr-10 w-full")}),m&&e("div",{className:"absolute inset-y-0 right-10 flex items-center justify-center ",children:e(x,{onClick:p,variant:"unstyled",className:"hover:text-red-500 hover:bg-gray-100 dark:hover:bg-gray-600",children:e(st,{className:"size-5"})})}),e("div",{className:"absolute inset-y-0 right-0 flex items-center justify-center",children:e(x,{onClick:s,variant:"unstyled",className:"hover:bg-gray-100 dark:hover:bg-gray-600",children:e(wt,{className:"size-5"})})}),e(Vs,{value:o,isOpen:l,onClose:e=>{if(e){const t="store:"+e.id;u(t),h(e||void 0),n.value=t}a()}})]}),m&&e("div",{className:"p-1 semibold text-sm text-gray-600 dark:text-slate-300",children:m.properties?.title||m.name})]})}function Bs(e,t,n,r){return()=>{n&&e.files.getDownloadUrlWithOptions({file:n,name:r}).then(e=>{window.open(e.url,"_blank")}).catch(e=>{t({status:"error",title:"Failed to get download URL",description:e.message,duration:5e3})})}}function Ws({objectId:n,isOpen:r,onClose:i}){const a=Qt(),{client:s,store:l}=Dt(),[o,u]=c(null),[m,h]=c(!1),[p,f]=c(!1),[g,y]=c(),[v,w]=c(),[N,k]=c("preview"),C=b();d(()=>{n&&r?(h(!0),l.objects.retrieve(n,"+embeddings").then(e=>{u(e),e.text?y(e.text):S(e.id);const t=e.content;t&&t.source&&t.type&&t.type.startsWith("image/")&&P(e)}).catch(e=>{console.error("Error loading object:",e),C({title:"Error",description:"Failed to load document",status:"error",duration:3e3})}).finally(()=>{h(!1)})):(u(null),y(void 0),w(void 0))},[n,r,l.objects]);const S=async e=>{f(!0);try{const t=await l.objects.getObjectText(e);y(t.text)}catch(e){console.error("Error loading text:",e)}finally{f(!1)}},P=async e=>{try{"found"===(await s.objects.getRendition(e.id,{format:Ut.jpeg,generate_if_missing:!1})).status&&console.log("Found rendition");const t=await s.files.getDownloadUrl(e.content.source);w(t.url)}catch(e){console.error("Error loading image:",e)}},j=()=>{o&&(a(`/legal/objects/${o.id}`),i())},_=g&&(g.startsWith("#")||g.includes("\n#")||g.includes("\n*")),T=o?.content?.type&&o.content.type.startsWith("image/"),I="application/pdf"===o?.content?.type;return r?t("div",{className:"fixed inset-y-0 right-0 w-2/5 dark:bg-slate-900 shadow-xl z-50 flex flex-col transition-transform duration-300 transform "+(r?"translate-x-0":"translate-x-full"),children:[t("div",{className:"flex items-center justify-between px-4 py-3 border-b dark:border-gray-700 bg-gradient-to-r from-indigo-50 to-gray-50 dark:from-gray-800 dark:to-gray-900",children:[t("div",{className:"flex items-center",children:[e(Nt,{className:"h-5 w-5 text-indigo-600 mr-2"}),e("h2",{className:"text-lg font-semibold text-gray-800 dark:text-gray-200 truncate",children:m?"Loading document...":o?.name||"Document Preview"})]}),t("div",{className:"flex items-center space-x-2",children:[t(x,{variant:"ghost",size:"sm",onClick:j,className:"flex items-center gap-1 text-indigo-600 hover:text-indigo-800",children:[e(lt,{className:"h-4 w-4"}),e("span",{children:"Full View"})]}),e(x,{variant:"ghost",size:"sm",onClick:i,className:"flex items-center text-gray-600 hover:text-gray-800 dark:text-gray-300 dark:hover:text-gray-100",children:e(st,{className:"h-5 w-5"})})]})]}),m?e("div",{className:"flex-1 flex items-center justify-center",children:t("div",{className:"text-center",children:[e(K,{size:"lg",className:"text-indigo-600 dark:text-indigo-400 mb-2"}),e("p",{className:"text-gray-600 dark:text-gray-400",children:"Loading document..."})]})}):t("div",{className:"flex-1 flex flex-col h-full",children:[e("div",{className:"border-b",children:t("div",{className:"flex px-4",children:[e("button",{className:"py-2 px-4 font-medium border-b-2 "+("preview"===N?"border-indigo-600 text-indigo-700 dark:text-indigo-300":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"),onClick:()=>k("preview"),children:t("div",{className:"flex items-center gap-1",children:[e(Ye,{className:"h-4 w-4"}),e("span",{children:"Preview"})]})}),e("button",{className:"py-2 px-4 font-medium border-b-2 "+("properties"===N?"border-indigo-600 text-indigo-700 dark:text-indigo-300":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"),onClick:()=>k("properties"),children:t("div",{className:"flex items-center gap-1",children:[e(Re,{className:"h-4 w-4"}),e("span",{children:"Properties"})]})})]})}),t("div",{className:"flex-1 overflow-auto p-4",children:["preview"===N&&t("div",{className:"h-full",children:[p?e("div",{className:"flex items-center justify-center h-40",children:e(K,{size:"md",className:"text-indigo-600 dark:text-indigo-400"})}):g?e("div",{className:"shadow rounded-md p-4 border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800",children:_?e("div",{className:"prose prose-sm max-w-none prose-p:my-2 prose-pre:bg-gray-800 prose-pre:my-2 prose-headings:text-indigo-700 dark:prose-invert dark:prose-headings:text-indigo-300",children:e(Xt,{children:g})}):e("pre",{className:"text-wrap whitespace-pre-wrap dark:text-gray-200",children:g})}):null,T&&e("div",{className:"mt-4",children:e("div",v?{className:"border border-gray-200 dark:border-gray-700 rounded-md p-2 bg-white dark:bg-gray-800",children:e("img",{src:v,alt:o?.name,className:"mx-auto max-h-[70vh] object-contain"})}:{className:"flex items-center justify-center h-40",children:e(K,{size:"md",className:"text-indigo-600 dark:text-indigo-400"})})}),I&&t("div",{className:"flex flex-col items-center justify-center h-64 border border-gray-200 dark:border-gray-700 rounded-md p-4 bg-gray-50 dark:bg-gray-800",children:[e(Nt,{className:"h-16 w-16 text-indigo-300 dark:text-indigo-400 mb-4"}),t("p",{className:"text-gray-600 dark:text-gray-400 text-center mb-4",children:["PDF document preview is available in full view. TODO"," "]}),e(x,{onClick:j,className:"bg-indigo-600 hover:bg-indigo-700 text-white",children:"Open Full Document View"})]}),!T&&!g&&!I&&!p&&t("div",{className:"flex flex-col items-center justify-center h-64 border border-gray-200 dark:border-gray-700 rounded-md p-4 bg-gray-50 dark:bg-gray-800",children:[e(Nt,{className:"h-16 w-16 text-gray-300 dark:text-gray-600 mb-4"}),e("p",{className:"text-gray-600 dark:text-gray-400 text-center",children:"No preview available for this document type."})]})]}),"properties"===N&&o&&t("div",{className:"h-full",children:[o.properties?e("div",{className:"shadow rounded-md p-4 border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800",children:e(rn,{value:o.properties})}):t("div",{className:"flex flex-col items-center justify-center h-64 border border-gray-200 dark:border-gray-700 rounded-md p-4 bg-gray-50 dark:bg-gray-800",children:[e(Re,{className:"h-16 w-16 text-gray-300 dark:text-gray-600 mb-4"}),e("p",{className:"text-gray-600 dark:text-gray-400 text-center",children:"No properties available for this document."})]}),t("div",{className:"mt-4",children:[e("h3",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:"Document Information"}),e("div",{className:"shadow rounded-md p-4 border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800",children:t("div",{className:"grid grid-cols-2 gap-y-2 gap-x-4 text-sm",children:[e("div",{className:"text-gray-500 dark:text-gray-400",children:"ID"}),e("div",{className:"font-medium dark:text-gray-200",children:o.id}),e("div",{className:"text-gray-500 dark:text-gray-400",children:"Type"}),e("div",{className:"font-medium dark:text-gray-200",children:o.type?.name||"Unknown"}),e("div",{className:"text-gray-500 dark:text-gray-400",children:"Content Type"}),e("div",{className:"font-medium dark:text-gray-200",children:o.content?.type||"N/A"}),e("div",{className:"text-gray-500",children:"Size"}),e("div",{className:"font-medium",children:o.content&&"size"in o.content?Gs(o.content.size):"Unknown"}),e("div",{className:"text-gray-500",children:"Created"}),e("div",{className:"font-medium",children:o.created_at?new Date(o.created_at).toLocaleString():"N/A"}),e("div",{className:"text-gray-500",children:"Updated"}),e("div",{className:"font-medium",children:o.updated_at?new Date(o.updated_at).toLocaleString():"N/A"})]})})]})]})]})]}),t("div",{className:"flex items-center justify-between p-4 border-t bg-gray-50 dark:bg-gray-800 dark:border-gray-700",children:[e("div",{children:o?.content?.source&&t(x,{onClick:()=>{o?.content?.source&&s.files.getDownloadUrl(o.content.source).then(e=>{window.open(e.url,"_blank")}).catch(e=>{console.error("Error getting download URL:",e),C({title:"Error",description:"Failed to download file",status:"error",duration:3e3})})},variant:"outline",className:"text-indigo-600 border-indigo-300 hover:bg-indigo-50",children:[e(at,{className:"h-4 w-4 mr-2"}),"Download"]})}),t(x,{onClick:j,className:"bg-indigo-600 hover:bg-indigo-700 text-white",children:["Open Full Document",e(kt,{className:"h-4 w-4 ml-2"})]})]})]}):null}function Gs(e){if(0===e)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB","TB"][t]}const Hs=Object.values(Jt),Js=Object.values(Yt);function Ys({onChange:n,isLoading:r,refresh:i,searchTypes:a}){const{client:s,project:l}=Dt(),o=b(),[u,m]=c(void 0),[h,p]=c(void 0),f=!(!l||!h?.embeddings.text&&!h?.embeddings.image),[g,y]=c(void 0),[v,w]=c(!1),[N,k]=c(a||Hs),[C,S]=c(100);d(()=>{a&&k(a)},[a]);const P={};let j=!1,A=!1;N.forEach(e=>{e===Jt.full_text?j=!0:A=!0,Js.includes(e)&&(P[e]=!0)}),d(()=>{m(void 0),y(void 0)},[i]),d(()=>{l&&s.projects.retrieve(l.id).then(e=>{p(e.configuration)})},[l]),d(()=>{g&&o({title:g,status:"success",duration:2e3})},[g]),d(()=>{u&&0!==u.length||n(void 0)},[u]);const z=()=>{if(!f||!u)return;n({vector:A?{text:u,config:P}:void 0,full_text:j?u:void 0,limit:C}),y("Searching...")},D=e=>t=>{k(t?t=>Array.from(new Set([...t,e])):t=>t.filter(t=>t!==e))};return t("div",{className:"flex gap-1 items-center w-1/2",children:[e(E,{placeholder:"Type what you are looking for, or select a filter",value:u,onChange:m,onKeyDown:e=>{"Enter"===e.key&&z()}}),e(x,{variant:"ghost",onClick:()=>w(!0),alt:"Semantic search settings",className:"ml-1",children:e(Ct,{size:18})}),t(_,{isOpen:v,onClose:()=>w(!1),children:[e(T,{children:"Search Types"}),e(I,{children:t("div",{className:"flex flex-col gap-2",children:[t("label",{className:"flex items-center gap-2",children:[e(pe,{checked:N.includes(Jt.full_text),onCheckedChange:D(Jt.full_text)}),e("span",{children:"Full Text"})]}),e("div",{className:"font-semibold mt-2 mb-1",children:"Embeddings"}),Js.map(n=>t("label",{className:"flex items-center gap-2",children:[e(pe,{checked:N.includes(n),onCheckedChange:D(n)}),e("span",{children:n.charAt(0).toUpperCase()+n.slice(1)})]},n)),t("div",{className:"mt-3",children:[e("span",{className:"mr-2",children:"Limit"}),e(fe,{type:"number",min:1,value:C,onChange:e=>S(Number(e??100)),style:{width:80}})]})]})}),e(F,{children:e(x,{variant:"outline",onClick:()=>w(!1),children:"Close"})})]}),e(x,{variant:"secondary",isLoading:r,onClick:z,isDisabled:!f,alt:"Semantic search",children:"Search"})]})}const Zs=[{name:"ID",field:"id",type:"objectId?slice=-7"},{name:"Name",field:".",type:"objectName"},{name:"Type",field:"type.name",type:"string"},{name:"Status",field:"status",type:"string"},{name:"Updated At",field:"updated_at",type:"date"}];function Qs({onUploadDone:t=async()=>{},layout:n}){const r=Ss(),i=b(),a=Es(async e=>{await t(e),setTimeout(()=>{console.log("Delayed refresh after upload to ensure backend consistency"),r.search().then(()=>{i({title:"Document list refreshed",description:"The document list has been updated with your uploaded files.",status:"info",duration:3e3})}).catch(e=>{console.error("Failed to refresh search results:",e)})},1e3)});return e(Xs,{layout:n,onUpload:(e,t)=>{const n=r.collectionId;return a(e,t,n)}})}function Xs({layout:n,onUpload:r,allowFilter:i=!0,allowSearch:a=!0}){const s=Ss(),[l,o]=c(!1),[u,m]=c(null),{typeRegistry:p}=Dt(),{search:f,isLoading:g,error:y,objects:b,hasMore:v}=js(),[x,w]=c(p?n||(N=p,((k=f.query.type)?N.getTypeLayout(k):Zs)??Zs):Zs);var N,k;const[C,S]=c(0),[P,j]=c(0),[_,T]=c("grid"===localStorage.getItem(Mr.LAST_DISPLAYED_VIEW)),[I,A]=c([]),z=h(null);d(()=>{l||0!==b.length||(j(0),f._updateRunningState(!0),f.search().then(()=>{o(!0)}).catch(e=>{console.error("Initial search failed:",e),f._updateRunningState(!1)}))},[]),d(()=>{b.length<P&&j(b.length)},[b.length,P]),ue(z,()=>{l&&b.length>0&&b.length!=P&&(o(!1),f.loadMore().finally(()=>{j(b.length),o(!0)}))},{deps:[l,b.length]});const E=Ps(),F=Ss(),D=Xa(E),$=es(F),L=new URL(window.location.href),O=L.searchParams.get("filters");if(O)try{const e=O.split(";"),t=e.filter(e=>{const[t]=e.split(":"),n=decodeURIComponent(t);return"start"!==n&&"end"!==n});if(t.length!==e.length){const e=t.length>0?t.join(";"):"";e?L.searchParams.set("filters",e):L.searchParams.delete("filters"),window.history.replaceState(window.history.state||{},"",L.toString())}}catch(y){console.error("Failed to clean start/end filters from URL:",y)}const U=Qt();return t("div",{className:"flex flex-col gap-y-2",children:[e(tl,{object:u,onClose:()=>m(null)}),y&&e(R,{title:"Error",children:y.message}),e(el,{isLoading:g,refreshTrigger:C,allowFilter:i,allowSearch:a,filterGroups:D,filters:I,handleFilterChange:e=>{const t="function"==typeof e?e(I):e;A(t),$(t)},handleVectorSearch:e=>{if(e&&e.vector){if(f.query.vector=e.vector,f.query.full_text=e.full_text,f.query.weights=e.weights,f.query.score_aggregation=e.score_aggregation,f.query.dynamic_scaling=e.dynamic_scaling,void 0!==e.limit&&(f.limit=e.limit,f.query.limit=e.limit),!x.find(e=>"Search Score"===e.name)){const e=[...x,{name:"Search Score",field:"score",render:e=>e.score?.toFixed(4)||"0.0000"}];w(e)}f.search().then(()=>o(!0))}else e&&e.full_text?(f.query.full_text=e.full_text,void 0!==e.limit&&(f.limit=e.limit,f.query.limit=e.limit),f.search().then(()=>o(!0))):void 0===e&&l&&(delete f.query.vector,delete f.query.full_text,f.search().then(()=>o(!0)))},handleRefetch:()=>{f.search().then(()=>o(!0))},setIsGridView:T}),e(Ds,{objects:b,isLoading:!b.length&&g,layout:x,onRowClick:e=>{U(`/objects/${e.id}`)},previewObject:e=>{const t=b.find(t=>t.id===e)||null;m(t)},selectedObject:u,onUpload:r,isGridView:_,collectionId:s.collectionId}),e("div",v?{ref:z,className:"w-full flex justify-center",children:e(K,{size:"xl"})}:{className:"text-muted text-center text-sm py-1",children:`All ${b.length} objects loaded.`})]})}function el(n){const{isLoading:r,refreshTrigger:i,allowFilter:a,allowSearch:s,filterGroups:l,filters:o,handleFilterChange:c,handleVectorSearch:d,handleRefetch:u,setIsGridView:m}=n;return t("div",{className:"sticky top-0 z-10 bg-background py-2",children:[a&&t(ne,{filterGroups:l,filters:o,setFilters:c,children:[t("div",{className:"flex flex-row gap-4 items-center justify-between w-full",children:[t("div",{className:"flex gap-2 items-center w-2/3",children:[s&&e(Ys,{onChange:d,isLoading:r,refresh:i,className:"w-full"}),e(re,{})]}),t("div",{className:"flex gap-1 items-center",children:[e(x,{variant:"outline",onClick:u,alt:"Refresh",children:e(pt,{size:16})}),e(Mr,{onUpdate:m})]})]}),t("div",{className:"flex gap-2 items-center pt-2",children:[e(ie,{}),e(ae,{})]})]}),!a&&t("div",{className:"flex flex-row gap-4 items-center justify-between w-full",children:[e("div",{className:"flex gap-2 items-center w-2/3",children:s&&e(Ys,{onChange:d,isLoading:r,refresh:i})}),t("div",{className:"flex gap-1 items-center",children:[e(x,{variant:"outline",onClick:u,alt:"Refresh",children:e(pt,{size:16})}),e(Mr,{onUpdate:m})]})]})]})}function tl({object:n,onClose:r}){const{store:i}=Dt(),a=b(),s=Qt(),l=Bs(i,a,n?.content?.source,n?.name||n?.content?.name);return n?t(ge,{title:n.properties?.title||n.name,isOpen:!0,onClose:r,children:[t("div",{className:"flex items-center gap-x-2",children:[e(x,{variant:"ghost",size:"sm",title:"Open Object",onClick:()=>s(`/objects/${n.id}`),children:e(Ge,{className:"size-4"})}),n.content?.source&&e(x,{variant:"ghost",size:"sm",title:"Download",onClick:l,children:e(at,{className:"size-4"})})]}),e(ye,{className:"my-2"}),e("div",{className:"pt-2",children:e(oa,{object:n,loadText:!0},n.id)})]}):null}var nl;function rl({isExporting:n,isOpen:r,onClose:i}){return t(_,{onClose:()=>i(void 0),isOpen:r,className:"relative overflow-visible",children:[e(T,{children:"Export Object Properties"}),!n&&e(il,{onClose:i}),n&&e(al,{})]})}function il({onClose:n}){const[r,i]=c(void 0),[a,s]=c(void 0),l=["Export selected objects","Export all objects"];return t(I,{className:"min-h-[104px] pt-0 flex flex-col gap-y-4",children:[e("div",{className:"h-1/3",children:e(Q,{options:l,value:a,onChange:s,placeholder:"Choose what to export",className:"h-full w-full text-sm",filterBy:"name",isClearable:!0})}),t("div",{className:"h-1/2 flex flex-col gap-y-8 content-between",children:[e(Q,{options:Object.values(nl),value:r,onChange:i,placeholder:"Choose a format",className:"h-full w-full text-sm",filterBy:"name",isClearable:!0}),e(x,{className:"w-full",isDisabled:!r||!a,onClick:()=>{n(r,a==l[1])},children:"Export Properties"})]})]})}function al({}){return e(I,{className:"min-h-[84px] pt-0",children:t("div",{className:"h-full grid flex-col gap-y-2 content-between justify-items-center",children:[t("div",{className:"text-sm flex flex-col gap-x-2",children:[e("p",{children:"EXPORT IS IN PROGRESS"}),e("p",{className:"pt-2 grid justify-items-center",children:"PLEASE WAIT"})]}),e(K,{size:"lg"})]})})}function sl({collection:t}){const n=b(),{client:r,typeRegistry:i}=Dt();Ss().query.all_revisions=!0;const a=function(e,t){let n=e.table_layout;if(n&&n.length>0)return n;e.type&&t&&(n=t?.getTypeLayout(e.type.id));return n&&n.length>0?n:void 0}(t,i);return t.dynamic?e(Xs,{layout:a}):e(Qs,{onUploadDone:async e=>{e.length>0&&await r.store.collections.addMembers(t.id,e).catch(e=>{n({title:"Failed to add objects to collection",description:e.message,status:"error"})})},layout:a})}!function(e){e.CSV="CSV",e.JSON="JSON"}(nl||(nl={}));const ll=n=>null===n?"None":t("div",{children:[e("div",{className:"text-sm",children:n.name}),e("div",{className:"text-xs text-gray-500",children:n.description})]});function ol({className:t,defaultValue:n,onChange:r,isClearable:i,multiple:a}){const s=Dt(),[l,o]=c(!1),[u,m]=c(),[h,p]=c([]);d(()=>{if(!l&&(o(!0),s.typeRegistry&&n)){if(a&&Array.isArray(n)){const e=s.typeRegistry.types.filter(e=>n.includes(e.id));p(e)}const e=s.typeRegistry.types.find(e=>e.id===n);e&&m(e)}},[s.typeRegistry,n,a]);const f=e=>{p(e),r(e)};return e("div",a?{className:"flex flex-col gap-4 content-between",children:e(de,{options:s.typeRegistry?.types||[],value:h,onChange:f,placeholder:"Choose Content Types...",optionLabel:ll,className:t||"text-sm bg-background",filterBy:"name",isClearable:i||!1,multiple:!0})}:{className:"flex flex-col gap-4 content-between",children:e(de,{options:s.typeRegistry?.types||[],value:u,onChange:e=>{m(e||void 0),r(e)},placeholder:"Choose a Content Type...",optionLabel:ll,className:t||"text-sm bg-background",filterBy:"name",isClearable:i||!1})})}function cl({onClose:n,redirect:r=!0,onAddToCollection:i}){const a=Qt(),s=b(),[l,o]=c(!1),{client:d}=Dt(),[u,m]=c({dynamic:!1,name:"",description:""});function h(e,t){m({...u,[e]:t})}return t("form",{onSubmit:e=>e.preventDefault(),children:[t(G,{children:[e(z,{label:"Name",required:!0,children:e(E,{type:"text",value:u.name||"",onChange:e=>h("name",e)})}),e(z,{label:"Description",className:"mt-2",children:e(be,{value:u.description||"",onChange:e=>h("description",e)})}),e(z,{label:"Dynamic Collection",className:"mt-2",direction:"row",description:"Dynamically fetch content for the collection based on a query. If not enabled, then content must be added by users or agents.",children:e(ve,{value:u.dynamic||!1,onChange:e=>h("dynamic",e)})}),!u.dynamic&&e(z,{label:"Allowed Content Types",className:"mt-4",description:"Optionally select which content types can be added to the collection. If not set, then all content types are allowed.",children:e(ol,{defaultValue:u.allowed_types||null,onChange:e=>{Array.isArray(e)?h("allowed_types",e.map(e=>e.id)):h("allowed_types",e?[e.id]:[])},isClearable:!0,multiple:!0})}),e(z,{label:"Type",className:"mt-2",description:"Optionally select a content type to assign custom properties and data to the collection.",children:e(ol,{defaultValue:u.type||null,onChange:e=>{Array.isArray(e)?h("type",e.length>0?e[0].id:null):h("type",e?.id||null)},isClearable:!0})})]}),e(H,{children:e(x,{isDisabled:l,onClick:()=>{u?.name&&u.name.trim()?(u.name=u.name.trim(),u.description&&(u.description=u.description.trim()),null==u.dynamic&&(u.dynamic=!1),o(!0),d.store.collections.create(u).then(e=>{n(),s({title:"Collection created",description:`Collection "${e.name}" created successfully`,status:"success",duration:3e3}),r&&a(`/collections/${e.id}`),i&&i(e.id)}).catch(e=>{s({title:"Failed to create collection",description:e.message,status:"error",duration:5e3})}).finally(()=>o(!1))):s({title:"Name is required",description:"Please provide a name for the collection",status:"error",duration:5e3})},children:"Create Collection"})})]})}function dl({isOpen:n,onClose:r}){return t(B,{onClose:r,isOpen:n,children:[e(W,{children:"Create a Collection"}),e(cl,{onClose:r})]})}function ul({}){const{client:r}=Dt(),i=b(),[a,s]=c(),[l,o]=c(!0),[u,m]=c(!1),{data:h,error:p,refetch:f}=O(()=>r.store.collections.search({}),[]);if(d(()=>{(h||p)&&o(!1)},[h,p]),p)return e(R,{title:"Collections fetch failed",children:p.message});return t(n,{children:[h&&(h.length>0?t(te,{className:"w-full",children:[e("thead",{children:t("tr",{children:[e("th",{children:"Name"}),e("th",{children:"Type"}),e("th",{children:"Created"}),e("th",{})]})}),e(se,{columns:4,isLoading:l,children:h.map(n=>t(xe,{children:[e("td",{children:t("div",{className:"flex items-center gap-2",children:[ml(n.dynamic),e(Zt,{href:`/collections/${n.id}`,children:n.name})]})}),e("td",{children:n.type?.name||"-"}),e("td",{children:hn(n.created_at).fromNow()}),e("td",{className:"text-right",children:e(x,{variant:"destructive",size:"sm",onClick:()=>s(n.id),children:e(St,{className:"size-4"})})})]},n.id))})]}):e(we,{title:"No Collections",buttonLabel:"New Collections",onClick:()=>m(!0),children:"Get started by creating a new Collections."})),e(dl,{isOpen:u,onClose:()=>m(!1)}),e(Ne,{isOpen:!!a,title:"Delete Collection",content:"Are you sure you want to delete this collection? This action cannot be undone.",onConfirm:async()=>{if(a)try{await r.store.collections.delete(a),i({title:"Collection deleted",status:"success",duration:3e3}),f()}catch(e){console.error("Failed to delete collection:",e),i({title:"Failed to delete collection",description:e.message||"An error occurred",status:"error",duration:5e3})}finally{s(void 0)}},onCancel:()=>s(void 0)})]})}function ml(t){const n=t?"Dynamic Collection":"Static Collection",r=e(t?Pt:jt,{className:"size-5"});return e(L,{description:n,className:"mr-2",children:r})}function hl({objects:n,isLoading:r}){const i=Qt();return t(te,{className:"w-full",children:[e(ke,{children:t("tr",{children:[e("th",{children:"Name"}),e("th",{children:"Strict Mode"}),e("th",{children:"Semantic Chunking"}),e("th",{children:"Updated At"})]})}),e(se,{isLoading:r&&(!n||0===n.length),columns:4,children:n?.map(n=>t("tr",{onClick:()=>i(`/types/${n.id}`),className:"cursor-pointer hover:bg-muted",children:[e("td",{children:n.name}),e("td",{children:n.strict_mode?"Yes":"No"}),e("td",{children:n.is_chunkable?"Yes":"No"}),e("td",{children:hn(n.updated_at).fromNow()})]},n.id))})]})}hn.extend(wn),hn.extend(wn);class pl{client;limit;result=new le({objects:[],isLoading:!1});query={};constructor(e,t=100){this.client=e,this.limit=t}get objects(){return this.result.value.objects}get error(){return this.result.value.error}get isRunning(){return this.result.value.isLoading}getFilterValue(e){return this.query[e]}setFilterValue(e,t){this.query[e]=t,this.search()}reset(e=!1){this.result.value={objects:[],isLoading:e}}_updateRunningState(e){const t=this.result.value;this.result.value={objects:t.objects,isLoading:e,error:t.error}}async _search(e=!1){if(this.isRunning)return Promise.resolve(!1);this.result.value={isLoading:!0,objects:e?this.objects:[]};const t=this.limit,n=this.objects.length;return this.client.types.list({limit:t,offset:n,query:this.query}).then(async e=>(this.result.value={isLoading:!1,objects:this.objects.concat(e)},!0)).catch(e=>{throw this.result.value={error:e,isLoading:!1,objects:this.objects},e})}search(){return this.isRunning?Promise.resolve(!1):this._search(!1)}loadMore(){return this.isRunning?Promise.resolve(!1):this._search(!0)}}const fl=u(void 0);function gl(){return m(fl)}function yl(){const e=gl();return{...oe(e.result),search:e}}function bl(){return gl().objects.length}function vl({title:n,isOpen:r,onClose:i,okLabel:a,initialPayload:s}){const l=b(),[o,d]=c(s?.name),[u,m]=c(s?.description),[h,p]=c(s?.strict_mode??!1);return t(_,{isOpen:r,onClose:()=>i(),children:[e(T,{children:n}),e(I,{className:"pt-0",children:t("div",{className:"h-full flex flex-col gap-4 content-between",children:[t("div",{children:[e("label",{className:"block text-sm font-medium text-muted",children:"Name"}),e(E,{value:o,onChange:d})]}),t("div",{children:[e("label",{className:"block text-sm font-medium text-muted",children:"Description"}),e(be,{value:u,onChange:e=>m(e.target.value)})]})]})}),e(F,{children:t("div",{className:"flex justify-end gap-4",children:[e(x,{variant:"secondary",onClick:()=>i(),children:"Cancel"}),e(x,{variant:"primary",onClick:()=>(()=>{if(!o)return void l({status:"error",title:"Name is required",duration:5e3});i({name:o,description:u,strict_mode:h}).then(()=>i()),d(void 0),m(void 0),p(!1)})(),children:a})]})})]})}var xl;function wl({isDirty:n=!1}){const r=Dt(),{store:i}=r,a=b(),[s,l]=c(!1),{search:o,isLoading:u,error:m,objects:p}=yl(),[f,g]=c(""),y=Ce(f,500),v=h(null);ue(v,()=>{s&&o.loadMore()},{deps:[s]}),d(()=>{o.search().then(()=>l(!0))},[]),d(()=>{o.query.name=f,o.search().then(()=>l(!0))},[y]);const[x,w]=c(void 0);d(()=>{o.query.chunkable=x?"Yes"==x:void 0,o.search().then(()=>l(!0))},[x]),d(()=>{n&&s&&o.search().then(()=>l(!0))},[n]);const[N,k]=c(!1);if(m)return e(R,{title:"Failed to fetch ObjectTypes",children:m.message});return t("div",{className:"flex flex-col gap-4 h-full",children:[t("div",{className:"flex flex-shrink-0 gap-4",children:[e(E,{placeholder:"Filter by Name",value:f,onChange:g}),e(Q,{className:"w-60",isClearable:!0,options:Object.values(xl),value:x,onChange:e=>{w(e)},placeholder:"Is Chunkable"})]}),t("div",{className:"flex-1 overflow-y-auto",children:[u||0!==p?.length?e(hl,{objects:p,isLoading:u}):e(we,{title:"No Type",buttonLabel:"Create Type",onClick:()=>{k(!0)},children:"Get started by creating a new Type."}),e(vl,{okLabel:"Create",title:"Create Type",isOpen:N,onClose:async e=>e?i.types.create(e).then(async()=>{a({status:"success",title:"Type created",duration:2e3}),r.reloadTypes(),o.search().then(()=>l(!0))}).catch(e=>{a({status:"error",title:"Error creating type",description:e.message,duration:5e3})}):(k(!1),Promise.resolve())})]})]})}!function(e){e.true="Yes",e.false="No"}(xl||(xl={}));const Nl=[jn,kn()];function kl({objectType:n,onSchemaUpdate:r}){const{store:i}=Dt(),a=b(),[s,l]=c(!1),d=on(n.object_schema),u=h(void 0),[m,p]=c(!1),f=o(()=>function(e){if(!e)return"";return JSON.stringify(e,null,2)}(d.schema),[d]),g=()=>{if(u.current){const e=u.current.getValue();try{const t=function(e){if(!e?.trim())return;return JSON.parse(e.trim())}(e);Cl(t),d.replaceSchema(t)}catch(e){return a({status:"error",title:"Invalid JSON Schema",description:e.message,duration:5e3}),!1}}return!0};return t("div",{className:"mx-2 my-2 rounded-2xl border border-solid shadow-md border-spacing-2",children:[t("div",{className:"flex items-center rounded-t-md border-b gap-x-2 py-2 pl-4 pr-2",children:[e("div",{className:"text-base font-semibold",children:"Schema Editor"}),e("div",{children:e(x,{variant:"outline",size:"sm",onClick:()=>{m&&!g()||p(e=>!e)},children:m?"Edit Schema":"Edit Json"})}),e("div",{className:"ml-auto flex gap-x-2",children:e(x,{isLoading:s,variant:"outline",size:"sm",onClick:()=>{m&&!g()||(l(!0),i.types.update(n.id,{object_schema:d.schema}).then(()=>{r(d),a({status:"success",title:"Schema updated",description:"The schema has been updated successfully",duration:2e3})}).catch(e=>{a({status:"error",title:"Failed to update schema",description:e.message,duration:5e3})}).finally(()=>{l(!1)}))},children:"Save Changes"})})]}),e("div",{className:"px-4 py-2",children:m?e(cn,{value:f,extensions:Nl,editorRef:u}):e(dn,{schema:d})})]})}const Cl=e=>{try{new fn({strict:!1}).compile(e)}catch(e){throw new Error(`Invalid JSON Schema definition: ${e.message}`)}};function Sl({children:t,limit:n,name:r,chunkable:i}){const{store:a}=Dt(),s=o(()=>{const e=new pl(a,n);return e.query.name=r,e.query.chunkable=i,e},[n]);return e(fl.Provider,{value:s,children:t})}function Pl({isOpen:n,onClose:r,title:i="Select Content Type",children:a,initialSelectedType:s=null,confirmLabel:l="Select Type",allowNone:o=!0}){const{typeRegistry:d}=Dt(),[u,m]=c(s),h=d?.types||[],p=()=>{r(void 0)};return t(_,{isOpen:n,onClose:p,className:"w-full max-w-xl mx-auto",children:[e(T,{children:i}),t(I,{className:"p-6",children:[a,t("div",{className:"mb-4 mt-4",children:[t("label",{className:"block text-sm font-medium mb-2",children:["Content Type ",o&&e("span",{className:"text-gray-500 font-normal",children:"(Optional)"})]}),e(Q,o?{options:h,value:u,optionLabel:e=>e?e.name:"Select a content type",placeholder:"Select a content type or leave empty for automatic detection",onChange:e=>m(e||null),filterBy:"name",isClearable:!0}:{options:h,value:u,optionLabel:e=>e?e.name:"Select a content type",placeholder:"Select a content type",onChange:e=>m(e||null),filterBy:"name"}),o&&t("div",{className:"mt-2 text-sm text-blue-600 flex items-center",children:[e(gt,{className:"h-4 w-4 mr-1"}),t("span",{children:[e("strong",{children:"Type selection is optional."})," Leave empty to let Vertesia choose the appropriate type"]})]})]}),u?t("div",{className:"text-sm text-gray-500 bg-gray-50 p-3 rounded-md mb-4",children:[e("div",{className:"font-medium",children:u.name}),u.description&&e("div",{className:"mt-1",children:u.description})]}):o&&t("div",{className:"text-sm text-blue-600 bg-blue-50 p-3 rounded-md mb-4",children:[e("div",{className:"font-medium",children:"Automatic Type Detection"}),t("div",{className:"mt-1",children:["Vertesia will analyze each file's content and automatically select the most appropriate type.",e("br",{}),e("span",{className:"mt-1 block font-medium",children:"This is recommended for most uploads."})]})]})]}),t(F,{children:[e(x,{variant:"ghost",onClick:p,children:"Cancel"}),e(x,{onClick:()=>{r(u?.id??null)},children:u?`${l}: ${u.name}`:o?"Let Vertesia Choose":l})]})]})}const jl=[jn,kn()];function _l({objectType:n,onLayoutUpdate:r}){const i=b(),[a,s]=c(!1),{store:l}=Dt(),d=h(void 0),u=o(()=>Tl(n.table_layout),[n.table_layout]),m=(e,t)=>{i({status:"error",title:e,description:t,duration:5e3})};return t("div",{className:"mx-2 my-2 rounded-2xl border border-solid shadow-xs",children:[t("div",{className:"flex items-center rounded-t-md border-b gap-x-2 py-2 pl-4 pr-2",children:[e("div",{className:"text-base font-semibold ",children:"Table Layout Editor"}),e("div",{className:"ml-auto flex gap-x-2",children:e(x,{isLoading:a,variant:"outline",size:"sm",onClick:()=>{if(!d.current)return;const e=d.current.getValue();let t;if(e)try{t=JSON.parse(e)}catch(e){return m("Invalid JSON",e.message)}else t=null;return Array.isArray(t)?t.some(e=>!e||!e.name||!e.field)?m("Invalid JSON","A table layout entry must contain the following properties:] {field, name, converter?}"):(s(!0),void l.types.update(n.id,{table_layout:t}).then(e=>{i({status:"success",title:"Table Layout updated",description:"The table layout has been updated successfully",duration:2e3}),r(e.table_layout)}).catch(e=>{i({status:"error",title:"Failed to update table layout",description:e.message,duration:5e3})}).finally(()=>{s(!1)})):m("Invalid JSON","The table layout must be an array")},children:"Save Changes"})})]}),e("div",{className:"px-4 py-2",children:e(cn,{value:u,extensions:jl,editorRef:d})})]})}function Tl(e){return e?JSON.stringify(e,null,2):"[\n\n]"}const Il=[jn,kn()];function Al({refetch:r,collection:i}){const a=i.type?.id,s=h(void 0),l=b(),{client:d}=Dt(),[u,m]=c(!1),[p,f]=c({name:i.name,description:i.description||"",query:i.query?JSON.stringify(i.query,null,2):"",tags:i.tags||[],type:i.type?.id||"",allowed_types:i.allowed_types||[]}),g=o(()=>Tl(i.table_layout),[i.table_layout]),y=(e,t)=>{f({...p,[e]:t})};return t("div",{className:"flex flex-col gap-4 py-2",children:[t(Se,{title:"Configuration",action:e(x,{size:"lg",isDisabled:u,onClick:()=>{let e;try{e=p.query?JSON.parse(p.query):void 0}catch(e){return void l({title:"Invalid Query JSON",description:e.message,status:"error",duration:5e3})}const t={name:p.name,description:p.description,query:e,tags:p.tags,type:p.type,allowed_types:p.allowed_types};let n;if(t.name||(n="Name is required"),t.type||(t.type=null),n)l({title:"Validation failed",description:n,status:"error",duration:5e3});else{if(s.current){const e=s.current.getValue();if(e)try{t.table_layout=JSON.parse(e)}catch(e){return void l({title:"Invalid Table Layout",description:e.message,status:"error",duration:5e3})}else t.table_layout=null}m(!0),d.store.collections.update(i.id,t).then(()=>{r(),l({title:"Collection updated",description:"Collection has been updated successfully",status:"success",duration:3e3})}).catch(e=>{l({title:"Failed to update collection",description:e.message,status:"error",duration:5e3})}).finally(()=>{m(!1)})}},children:"Save"}),children:[t("div",{className:"flex justify-between mb-2",children:[t("div",{className:"w-1/2 gap-2 flex flex-col",children:[e("div",{className:"text-sm font-medium mb-1",children:"Created By"}),t("div",{className:"gap-2 flex items-center",children:[e(Cn,{userRef:i.created_by,showTitle:!0}),t("span",{children:["at ",hn(i.created_at).format("YYYY-MM-DD HH:mm:ss")]})]})]}),t("div",{className:"w-1/2 gap-2 flex flex-col",children:[e("div",{className:"text-sm font-medium mb-1",children:"Updated By"}),t("div",{className:"gap-2 flex items-center",children:[e(Cn,{userRef:i.updated_by,showTitle:!0}),t("span",{children:["at ",hn(i.updated_at).format("YYYY-MM-DD HH:mm:ss")]})]})]})]}),e(z,{label:"Name",required:!0,children:e(E,{value:p.name,onChange:e=>y("name",e)})}),e(z,{label:"Description",children:e(be,{value:p.description,onChange:e=>y("description",e.target.value)})}),!i.dynamic&&e(z,{label:"Allowed Content Types",description:"Select which content types can be added to the collection. If not set, then all content types are allowed.",children:e(ol,{defaultValue:p.allowed_types||null,onChange:e=>{Array.isArray(e)?y("allowed_types",e.map(e=>e.id)):y("allowed_types",e?[e.id]:[])},isClearable:!0,multiple:!0})}),i.dynamic&&e(z,{label:"Query",description:"Define the query to dynamically fetch content for the collection.",children:e(be,{className:he.INPUT,value:p.query,onChange:e=>y("query",e.target.value)})}),e(z,{label:"Table Layout",description:"Define a custom layout for displaying the collection in tables.",children:e(cn,{className:"border-1 rounded-md border-border",value:g,extensions:Il,editorRef:s})}),e(z,{label:"Type",description:"Select a content type to assign custom properties and data to the collection.",children:e(ol,{defaultValue:p.type||null,onChange:e=>{Array.isArray(e)?y("type",e.length>0?e[0].id:null):y("type",e?.id||null)},isClearable:!0})})]}),a&&e(zl,{typeId:a,collection:i}),!i.dynamic&&t(n,{children:[e(Sn,{collection:i}),e(Pn,{collection:i})]})]})}function zl({typeId:t,collection:n}){const[r,i]=c({}),a=b(),{client:s}=Dt(),[l,d]=c(!1),{data:u,error:m}=O(()=>s.store.types.retrieve(t),[t]),h=u?.object_schema||{},p=o(()=>new un(h,n.properties||{}),[h,n.properties]);if(m)return e(R,{title:"Failed to load type",children:m.message});if(!u)return null;return e(Se,{title:"Properties",action:e(x,{size:"lg",isLoading:l,type:"submit",onClick:()=>(e=>{if(!e||!Object.keys(e).length)return;const t={properties:e||{}};d(!0),s.store.collections.update(n.id,t).then(()=>{a({title:"Collection properties updated",description:"Collection has been updated successfully",status:"success",duration:3e3})}).catch(e=>{a({title:"Failed to update collection properties",description:e.message,status:"error",duration:5e3})}).finally(()=>{d(!1)})})(r),children:"Save"}),children:e(mn,{object:p,onChange:e=>{e instanceof un&&i(e.value)}})})}function El({onChange:n,value:r,disabled:i=!1,placeholder:a="Select a collection",searchPlaceholder:s="Search collections",filterOut:l,allowDynamic:d=!0,multiple:u=!1}){const{client:m}=Dt(),[h,f]=c(""),[g,b]=c(!1),[v,S]=c(!1),_=Ce(h,300),T=p(async e=>{b(!0);const t=e.trim(),n=await m.store.collections.search({dynamic:!!d&&void 0,name:v&&t||void 0});return b(!1),!v&&n.length>=1e3&&S(!0),l&&l.length>0?n.filter(e=>!l.includes(e.id)):n},[m,d,l,v]),{data:I,error:A}=O(()=>T(v?_:""),[v?_:"",T]),z=o(()=>I?u&&Array.isArray(r)?I.filter(e=>r.includes(e.id)):u||"string"!=typeof r?u?[]:void 0:I.find(e=>e.id===r):u?[]:void 0,[I,r,u]),E=p(e=>{if(u){const t=Array.isArray(r)?r:[];if(t.includes(e.id)){const r=t.filter(t=>t!==e.id),i=I?.filter(e=>r.includes(e.id))||[];n(r,i)}else{const r=[...t,e.id],i=I?.filter(e=>r.includes(e.id))||[];n(r,i)}}else n(e.id,e)},[n,r,I,u]),F=p(()=>{n(void 0,void 0)},[n]),D=p(e=>{f(e)},[]),$=h.trim().length>0,L=o(()=>{if(!I)return[];if(v)return I;if(!$)return I;const e=h.toLowerCase();return I.filter(t=>t.name.toLowerCase().includes(e))},[I,v,$,h]),U=z&&$;if(A)return e(R,{title:"Collection fetch failed",children:A.message});return t(w,{children:[e(N,{asChild:!0,children:t(x,{variant:"outline",role:"combobox","aria-haspopup":"listbox",className:y("w-full justify-between min-w-0"),disabled:i,children:[e("span",{className:"truncate flex-1 text-left min-w-0",children:u&&Array.isArray(z)&&z.length>0?1===z.length?z[0].name:`${z.length} collections selected`:u||!z||Array.isArray(z)?a:z.name}),e(wt,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e(k,{className:"mt-2 mb-2 w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:t(C,{shouldFilter:!1,children:[t("div",{className:"flex justify-between items-center border-b px-3","cmdk-input-wrapper":"",children:[e(Pe,{placeholder:s,value:h,onValueChange:D,className:"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),g&&e("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"})]}),e(je,{children:g?"Searching...":$?"No collections found.":"No collections available."}),t(P,{className:"max-h-[300px] overflow-auto",children:[U&&!u&&e(j,{value:"__clear__",onSelect:F,className:"text-muted-foreground",children:"Clear selection"}),L.map(n=>{const i=u&&Array.isArray(r)?r.includes(n.id):r===n.id;return t(j,{value:n.id,onSelect:()=>E(n),className:"flex items-center justify-between",children:[e("span",{className:"truncate",children:n.name}),i&&e(_t,{className:"ml-2 h-4 w-4 shrink-0"})]},n.id)})]})]})})]})}function Fl({collection:t}){const{client:n}=Dt(),[r,i]=c(void 0),[a,s]=c(t.shared_properties||[]),l=b();d(()=>{t.type?.id&&n.store.types.retrieve(t.type.id).then(i)},[t.type?.id]);const o=r?Object.keys(r.object_schema?.properties||{}):[];return e(Se,{title:"Shared Properties",description:"Add properties to share across all members in the collection. This feature requires to enable shared property synchronization on the project.",action:e(x,{size:"lg",isLoading:!1,onClick:()=>{n.store.collections.update(t.id,{shared_properties:a}).then(()=>{l({title:"Updated shared properties",status:"success"})}).catch(e=>{l({title:"Failed to update shared properties",description:e.message,status:"error"})})},children:"Save"}),children:e("div",{className:"",children:e(_e,{value:a,onChange:e=>{s(e)},options:o,placeholder:"Select properties to share"})})})}function Dl({collection:t}){const{client:n}=Dt(),[r,i]=c(t.skip_head_sync??!1),[a,s]=c(!1),l=b();return e(Se,{title:"Synchronize Member Heads",description:"When a new HEAD version of a member is created the colleciton will be updated to point to the new HEAD.",children:e(ve,{disabled:a,value:!r,onChange:e=>{const r=!e;s(!0),n.store.collections.update(t.id,{skip_head_sync:r}).then(()=>{l({title:"Updated skip head sync setting",status:"success"}),i(r)}).catch(e=>{l({title:"Failed to update skip head sync",description:e.message,status:"error"})}).finally(()=>{s(!1)})},children:"Enable synchronizing member heads"})})}function $l({action:n,objectIds:r,children:i}){const{store:a}=Dt(),s=b(),[l,o]=c(!1),d=p(()=>(o(!0),Promise.resolve(!0)),[]);no(n.id,d);return t("div",{children:[i,e(Pl,{isOpen:l,onClose:e=>{o(!1),void 0!==e&&a.runOperation({name:"change_type",ids:r,params:{typeId:e}}).then(e=>{s({status:"success",title:"Change Type",description:`Change the type of ${r.length} objects is ${"in_progress"===e.status?"in progress":"completed"}`,duration:2e3})}).catch(e=>{s({status:"error",title:"Error changing type",description:e.message,duration:5e3})})},title:"Change Content Type",confirmLabel:"Change Type",children:t("div",{className:"text-sm flex flex-col gap-x-2",children:[t("p",{children:["Choose a new Content Type for the selected object",r.length>1?"s":" ","or let the system choose or generate a type based on the content."]}),t("p",{className:"pt-2 text-xs",children:["Note: This action will raise the ",e("code",{children:"change_type"})," event and will trigger the standard intake workflows which may reset the object properties."]})]})})]})}const Ll={id:"changeType",name:"Change Content Type",description:"Change the Content Type of the selected documents",confirm:!1,component:$l};function Ol({action:r,callback:i,children:a}){const[s,l]=c(!1),o=r.confirmationText||`Are you sure you want to ${r.name}?`,d=p(e=>r.confirm?(l(!0),Promise.resolve(!0)):i(e),[r.confirm,i]),u=no(r.id,d);return t(n,{children:[a,e(Ne,{onConfirm:()=>{l(!1),i({...u.params,action:r})},onCancel:()=>l(!1),title:"Are you sure?",content:o,isOpen:s})]})}function Rl({action:t,objectIds:n,children:r}){const i=to(),a=b(),{client:s}=Dt(),l=Ss(),o=Qt(),c=p(()=>{if(!n||!n.length)return a({status:"error",title:"No objects selected",description:"Please select objects to delete",duration:3e3}),Promise.resolve(!1);function e(e,t){if(e.length<=t)return e;const n=e.lastIndexOf("."),r=-1!==n?e.substring(n):"";return`${(-1!==n?e.substring(0,n):e).substring(0,t-r.length-3)}...${r}`}return Promise.all(n.map(e=>s.store.objects.delete(e))).then(t=>{const r=t.length>1?"s":"";if(a({status:"success",title:`${t.length} object${r} deleted`,description:`Objects ${e(t.map(e=>e.id).join(", "),100)} have been deleted`,duration:2e3}),l){i.params?.selection?.removeAll();const e=JSON.parse(JSON.stringify(l.facets));n.length===e._value.total&&l.resetFacets(),l.search()}else o("/objects")}).catch(e=>{a({status:"error",title:"Error deleting objects",description:e.message,duration:5e3})})},[n]);return e(Ol,{action:t,callback:c,children:r})}const Ul={id:"delete",name:"Delete",description:"Delete the selected objects",confirm:!0,confirmationText:"Are you sure you want to delete all the selected objects? This action cannot be undone.",component:Rl,destructive:!0},Ml={id:"deleteFromCollections",name:"Delete Objects",description:"Delete the selected objects",confirm:!0,confirmationText:"Are you sure you want to delete the selected objects?\nThis is not removable from collections.",component:Rl,destructive:!0};function Vl({action:t,objectIds:n}){const{store:r}=Dt(),i=b(),[a,s]=c(!1),[l,o]=c(!1),d=p(()=>(s(!0),Promise.resolve(!0)),[]),u=no(t.id,d);return e("div",{children:e(rl,{isExporting:l,isOpen:a,onClose:(e,t)=>{if(e&&(t||n.length>0)){o(!0);const a=u.params?.search?.query||{},l=u.params?.search?.result?.value?.objects?.map(e=>e.id)||void 0,c=async e=>r.objects.list({query:{parent:e}}).then(e=>e.map(e=>e.id));(async()=>t?l?a.vector?l:[]:0===n.length?[]:(await c(n[0])).concat(n):n)().then(l=>{r.objects.exportProperties({objectIds:l,type:e,query:t&&!a.vector?a:{type:a.type}}).then(r=>{let a;if(e===nl.CSV)a=new Blob([r.data],{type:r.type});else if(e===nl.JSON)a=new Blob([JSON.stringify(r.data)],{type:r.type});else{const e=r.data;a=new Blob([new Uint8Array(e.data)],{type:r.type})}const s=window.URL.createObjectURL(a),l=document.createElement("a");l.download=r.name,l.href=s,l.click(),i({status:"success",title:"Export Properties",description:t?"Export the properties of all objects completed":`Export the properties of ${n.length} object${n.length>1?"s":""} is completed`,duration:2e3})}).catch(e=>{i({status:"error",title:"Error Export Properties",description:e.message,duration:5e3})}).finally(()=>{o(!1),s(!1)})})}else s(!1)}})})}const Kl={id:"exportProperties",name:"Export Properties",description:"Export all Object Properties",confirm:!1,component:Vl};function ql({action:t,objectIds:n,collectionId:r}){const i=to(),a=b(),{client:s}=Dt(),l=Ss(),o=p(()=>n&&n.length?r?s.store.collections.deleteMembers(r,n).then(()=>{const e=n.length>1?"s":"";a({status:"success",title:`${n.length} object${e} removed from collection`,description:"Objects have been removed from the collection",duration:2e3}),l&&(i.params?.selection?.removeAll(),l.search())}).catch(e=>{a({status:"error",title:"Error removing objects from collection",description:e.message,duration:5e3})}):(a({status:"error",title:"No collection context",description:"Cannot remove objects: no collection specified",duration:3e3}),Promise.resolve(!1)):(a({status:"error",title:"No objects selected",description:"Please select objects to remove from collection",duration:3e3}),Promise.resolve(!1)),[n,r]);return e(Ol,{action:t,callback:o})}const Bl={id:"removeFromCollection",name:"Remove from Collection",description:"Remove the selected objects from this collection",confirm:!0,confirmationText:"Are you sure you want to remove the selected objects from this collection?",component:ql,destructive:!0};function Wl({action:t,objectIds:n,collectionId:r}){const i=b(),{client:a}=Dt(),[s,l]=c(!1),o=p(()=>(l(!0),Promise.resolve(!0)),[]);return no(t.id,o),e(Hl,{isOpen:s,onClose:e=>{if(l(!1),e)return a.store.workflows.rules.execute(e,n,{collection_id:r}).then(()=>{i({title:"Workflow started",status:"success",duration:3e3})}).catch(e=>{i({title:"Error starting workflow",status:"error",description:e.message,duration:9e3})})}})}const Gl={id:"startWorkflow",name:"Start Workflow",description:"Start an workflow on the selected objects",confirm:!1,hideInList:!0,component:Wl};function Hl({isOpen:n,onClose:r}){return t(B,{onClose:()=>r(void 0),isOpen:n,className:"",children:[e(W,{children:"Start a Workflow by Rule"}),e(Yl,{onClose:r})]})}function Jl(n){return{label:t("div",{children:[e("div",{children:n.name}),e("div",{className:"text-sm text-muted",children:n.description})]}),reverse:!0}}function Yl({onClose:n}){const[r,i]=c(void 0),a=to();return t("div",{children:[t(G,{children:[e("div",{className:"pb-2",children:"Choose a workflow rule to start:"}),e("div",{className:"max-h-[420px] overflow-y-scroll border-border border rounded-md",children:e(Te,{options:a.wfRules,optionLayout:Jl,onChange:e=>{i(e)},value:r})})]}),t(H,{children:[e(x,{variant:"secondary",onClick:()=>n(),children:"Cancel"}),e(x,{onClick:()=>{r&&n(r.id)},isDisabled:!r,children:"Start"})]})]})}class Zl{params;allActions=[Kl,Ll,Gl,ao,Ul,Bl,Ml];wfRules=[];callbacks={};startWorkflow;constructor(e){this.params=e}get actions(){return!!this.params.selection?.collectionId?this.allActions.filter(e=>"addToCollection"!==e.id&&"delete"!==e.id):this.allActions.filter(e=>"removeFromCollection"!==e.id&&"deleteFromCollections"!==e.id)}async loadWorkflows(){return this.params.client.workflows.rules.list().then(e=>{this.wfRules=e.map(e=>({id:e.id,name:e.name,description:e.description,confirm:!1,isWorkflow:!0,component:Wl})).sort((e,t)=>e.name.localeCompare(t.name))}),this.wfRules}registerCallback(e,t){return this.callbacks[e]=t,()=>{delete this.callbacks[e]}}unregisterCallback(e){delete this.callbacks[e]}findAction(e){let t=this.allActions.find(t=>t.id===e);return t||(t=this.wfRules.find(t=>t.id===e)),t}async run(e){const t=this.findAction(e);if(!t)throw new Error(`Action ${e} not found`);const n={...this.params,action:t},r=this.callbacks[e];if(r)return r(n);throw new Error("No action callback set")}}const Ql=u(void 0);function Xl({children:n}){const r=hs(),i=b(),{client:a}=Dt(),s=Ss(),{data:l,error:c}=O(()=>a.workflows.rules.list().then(e=>e.map(e=>({id:e.id,name:e.name,description:e.description,confirm:!1,isWorkflow:!0,component:Wl})).sort((e,t)=>e.name.localeCompare(t.name))),[]),d=o(()=>{const e=new Zl({selection:r,toast:i,client:a,search:s});return e.wfRules=l,e},[r,l]);return c?e(R,{title:"Failed to fetch workflows",children:c.message}):d&&t(Ql.Provider,{value:d,children:[e(eo,{}),n]})}function eo({}){const t=to(),n=t.params.selection,r=n.getObjectId(),i=n.isSingleSelection()&&r?[r]:n.getObjectIds();return e("div",{style:{display:"none"},children:t.allActions.map(t=>e(t.component,{action:t,objectIds:i,collectionId:n.collectionId},t.id))})}function to(){const e=m(Ql);if(!e)throw new Error("You cannot use useActionContext outside an ActionProvider");return e}function no(e,t){const n=to();return d(()=>n.registerCallback(e,t),[n,e,t]),n}function ro(e){const t=to();return d(()=>(t.startWorkflow=e,()=>{t.startWorkflow=void 0}),[e,t]),t}function io({action:t,objectIds:n}){const[r,i]=c(!1),a=p(()=>(n.length>0&&i(!0),Promise.resolve(!0)),[n]);return no(t.id,a),r&&e(q,{children:e(so,{objectIds:n,isOpen:r,onClose:()=>{i(!1)}})})}const ao={id:"addToCollection",name:"Add to Collection",description:"Add documents to a collection",confirm:!1,component:io};function so({isOpen:n,onClose:r,objectIds:i}){return t(B,{isOpen:n,onClose:r,className:"max-w-lg w-full min-w-0 overflow-hidden",children:[e(W,{className:"flex flex-col min-w-0 overflow-hidden",children:"Add to a Collection"}),e(Ie,{className:"min-w-0 overflow-hidden",children:"Add the selected objects to an existing collection or create a new one."}),e("div",{className:"min-w-0 max-w-full overflow-hidden",children:e(lo,{onClose:r,objectIds:i})})]})}function lo({onClose:n,objectIds:r}){const i=b(),{client:a}=Dt(),[s,l]=c(),o=({collectionId:e})=>{e&&r?.length&&a.store.collections.addMembers(e,r).then(()=>{i({title:"Add to collection success",status:"success",description:`Added ${r.length} objects to the selected collection`,duration:3e3}),n()}).catch(()=>{i({title:"Add to collection failure",status:"error",description:"Failed to add the selected objects to the collection",duration:5e3})})},d=[{name:"select",label:"Select Collection",content:t("div",{className:"p-4 min-w-0 max-w-full overflow-hidden",children:[e(Ae,{level:5,children:"Choose from existing collections"}),e(G,{className:"min-w-0 max-w-full overflow-hidden",children:e("div",{className:"mb-4 min-w-0 max-w-full overflow-hidden",children:e(El,{onChange:(e,t)=>{"string"==typeof e||void 0===e?l(e):Array.isArray(e)&&e.length>0?l(e[0]):l(void 0)},value:s})})}),e(H,{children:e(x,{isDisabled:!s,onClick:()=>s&&o({collectionId:s}),children:"Add to Collection"})})]})},{name:"create",label:"Create new",content:e("div",{className:"p-4",children:e(cl,{onClose:n,onAddToCollection:e=>o({collectionId:e}),redirect:!1})})}];return t(ze,{defaultValue:"select",tabs:d,fullWidth:!0,children:[e(Ee,{}),e(Fe,{})]})}function oo(){const n=hs(),r=n.size(),i=r>1?"s":"",a=n?.hasSelection(),s=n?.isSingleSelection();return e(Xl,{children:t("div",{className:"flex items-center gap-x-2",children:[a&&!s&&t("div",{className:"flex items-center gap-x-1 shrink-0",children:[t("div",{className:"text-sm nowrap",children:[r," document",i," selected"]}),e(x,{title:"Clear selection",variant:"ghost",onClick:()=>{n?.removeAll()},children:e(st,{className:"size-4"})})]}),e(po,{selection:n,children:e(x,{variant:"ghost",alt:"More action",size:"sm",children:e(Tt,{size:16})})}),a&&e(co,{selection:n})]})})}function co({}){return e(mo,{})}function uo({collectionId:r,allowFolders:i=!0}){const[a,s]=c([]),[l,o]=c(!1),d=hs(),u=d?.hasSelection();return!u&&t(n,{children:[e(x,{onClick:()=>o(!0),children:"Upload"}),e(zs,{collectionId:r??"",isOpen:l,onClose:()=>{o(!1),s([])},files:a,title:"Upload Files",onUploadComplete:e=>{e&&e.success&&s([])},allowFolders:i})]})}function mo(){const t=to();return t.params.selection.hasSelection()&&e(x,{onClick:()=>t.run(Gl.id),children:"Start Workflow"})}function ho(e){return{label:e.name,className:r("flex-1 px-2 py-2 hover:bg-accent nowrap",e.destructive?"text-destructive":"")}}function po({selection:n,children:r}){const i=to();return t(w,{hover:!0,children:[e(N,{children:r}),e(k,{className:"p-0 w-50",align:"end",sideOffset:6,children:e(fo,{executeAction:e=>{i.run(e.id)},selection:n})})]})}function fo({executeAction:t,selection:n}){const r=to(),i=n?.hasSelection()?r.actions.filter(e=>!e.hideInList):[Kl];return e("div",{className:"rounded-md shadow-md py-2",children:e("div",{className:"px-1 text-sm",children:e(Te,{options:i,optionLayout:ho,onChange:e=>{t(e)},noCheck:!0})})})}function go({onSend:n,disabled:r=!1,isSending:i=!1,isCompleted:a=!1,activeTaskCount:s=0,placeholder:l="Type your message..."}){const o=h(null),[u,m]=c(""),[p,f]=c(!1);d(()=>{!r&&a&&o.current?.focus()},[r,a]);const g=()=>{const e=u.trim();!e||r||i||(n(e),m(""))};return t("div",{className:"p-3 border-t border-muted flex-shrink-0",style:{minHeight:"90px"},children:[t("div",{className:"flex items-center space-x-2",children:[t("div",{className:"flex flex-1 space-x-1",children:[e(E,{ref:o,value:u,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),g())},onChange:m,disabled:r||i,placeholder:l,className:"pr-12 py-2.5"}),e(x,{variant:"ghost",className:"rounded-full",disabled:!a,onClick:()=>f(!0),alt:"Link Object",children:e(It,{className:"size-4"})})]}),t(x,{onClick:g,disabled:r||i||!u.trim(),className:"px-4 py-2.5",children:[i?e(K,{size:"sm",className:"mr-2"}):e(At,{className:"size-4 mr-2"})," Send"]})]}),e("div",{className:"text-xs text-muted mt-2 text-center",children:s>0?t("div",{className:"flex items-center justify-center",children:[e(zt,{className:"h-3 w-3 mr-1 text-attention"}),t("span",{children:["Agent has ",s," active workstream",1!==s?"s":""," running"]})]}):r?"Agent is processing, you can continue once it completes...":"You can send a message at any time"}),t(B,{isOpen:p,onClose:()=>f(!1),className:"min-w-[60vw]",children:[e(W,{children:"Link Object"}),e(G,{className:"pb-6",children:e(Us,{onChange:e=>{const t=`[${e.properties?.title||e.name||"Object"}](store:${e.id})`,n=u||"",r=o.current?.selectionStart||n.length,i=n.substring(0,r)+t+n.substring(r);m(i),f(!1),setTimeout(()=>{if(o.current){o.current.focus();const e=r+t.length;o.current.setSelectionRange(e,e)}},100)}})})]})]})}const yo=l.memo(function({plan:r,workstreamStatus:i,isOpen:a,onClose:s,plans:l=[],activePlanIndex:o=0,onChangePlan:c=()=>{}}){return a?t("div",{className:"h-full shadow-xl border border-muted/20 overflow-hidden",children:[t("div",{className:"flex items-center justify-between p-3 border-b border-muted/20",children:[e("h3",{className:"font-bold text-base",children:"Plan"}),t(x,{variant:"ghost",onClick:s,children:[e(st,{className:"size-4"}),e("span",{className:"sr-only",children:"Close"})]})]}),t("div",{className:"p-3 overflow-y-auto",style:{height:"calc(100% - 44px)",maxHeight:"calc(100vh - 150px)"},children:[t("div",{className:"mb-3 p-2 bg-info rounded-md border border-info",children:[e("div",{className:"text-xs font-medium text-info mb-1",children:"Task Progress"}),e("div",{className:"flex items-center gap-2",children:(()=>{const a=r.plan||[],s=a.length;let l=0;s>0&&a.forEach(e=>{if(e&&e.id){const t=e.id.toString();"completed"===i.get(t)&&l++}});const o=s>0?Math.round(l/s*100):0;return t(n,{children:[e("div",{className:"w-full bg-muted rounded-full h-2",children:e("div",{className:"bg-background h-2 rounded-full",style:{width:`${o}%`}})}),e("span",{className:"text-xs text-muted",children:s>0?`${l}/${s}`:"0/0"})]})})()})]}),l.length>1&&t("div",{className:"mb-3 flex items-center justify-between",children:[e(x,{variant:"ghost",onClick:()=>c(Math.min(l.length-1,o+1)),disabled:o>=l.length-1,children:"Older Plan"}),e("div",{className:"text-xs text-muted",children:l[o]?.timestamp?new Date(l[o].timestamp).toLocaleTimeString():"Unknown time"}),e(x,{variant:"ghost",onClick:()=>c(Math.max(0,o-1)),disabled:o<=0,children:"Newer Plan"})]}),t("div",{className:"rounded-md border border-muted/30",children:[e("div",{className:"p-2 border-b border-muted/30 bg-muted",children:e("div",{className:"font-medium text-xs",children:"Step-by-Step Plan"})}),e("div",{className:"divide-y divide-muted/20 max-h-[calc(100vh-350px)] overflow-y-auto",children:r.plan&&r.plan.length>0?r.plan.map((n,r)=>{const a=n.id?n.id.toString():`task-${r}`,s=n.goal||`Task ${r+1}`;let l=n.status||"pending";i.has(a)&&(l=i.get(a));let o=Et,c="text-muted";return"in_progress"===l?(o=Ke,c="text-info"):"completed"===l&&(o=Ve,c="text-success"),t("div",{className:"flex p-3 my-1",children:[e("div",{className:"mr-2 mt-0.5 flex-shrink-0 text-muted",children:a}),t("div",{className:"w-full",children:[e("div",{className:"text-sm font-medium mb-2 text-muted",children:s}),t("div",{className:"mt-1 flex justify-end items-center",children:[e("div",{className:`mr-2 mt-0.5 flex-shrink-0 ${c}`,children:e(o,{className:"size-3.5"})}),e(v,{variant:"completed"===l?"success":"in_progress"===l?"info":"default",children:"completed"===l?"Completed":"in_progress"===l?"In Progress":"Pending"})]})]})]},r)}):t("div",{className:"p-3 text-center text-muted italic",children:[e(Ue,{className:"size-4 mx-auto mb-2 text-attention"}),e("p",{className:"text-xs",children:"No plan has been detected yet"}),e("p",{className:"text-xs mt-1",children:"Plans will appear here when the agent creates one"})]})})]}),(()=>{const n=new Set((r.plan||[]).filter(e=>e&&e.id).map(e=>e.id.toString())),a=Array.from(i.entries()).filter(([e])=>"main"!==e&&!n.has(e));return a.length>0?t("div",{className:"mt-3 rounded-md border border-gray-200 dark:border-gray-800",children:[e("div",{className:"p-2 border-b border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/50",children:e("div",{className:"font-medium text-xs",children:"Workstreams"})}),e("div",{className:"p-3",children:e("div",{className:"grid grid-cols-1 gap-2",children:a.map(([n,r])=>{let i=Et,a="text-gray-400",s="bg-gray-100 dark:bg-gray-800",l="Pending";return"in_progress"===r?(i=Ke,a="text-info",s="bg-info/20",l="In Progress"):"completed"===r&&(i=Ve,a="text-success",s="bg-success/20",l="Completed"),t("div",{className:`flex items-center p-1.5 rounded ${s}`,children:[e("div",{className:`mr-1.5 ${a}`,children:e(i,{className:"h-3.5 w-3.5"})}),e("div",{className:"flex-1",children:e("span",{className:"text-xs font-medium text-gray-800 dark:text-gray-300",children:n})}),e("span",{className:"text-xs font-medium",children:l})]},n)})})})]}):null})()]})]}):null});function bo(t){const{run:n,startWorkflow:r}=t;if(n){const r="runId"in n?n:{runId:n.run_id,workflowId:n.workflow_id};return e(wo,{...t,run:r})}return r?e(xo,{...t}):e(vo,{})}function vo(){return t(ce,{status:"info",icon:e(Le,{className:"size-16 text-muted mb-4"}),children:[e("div",{className:"text-base font-medium text-muted",children:"No agent currently running"}),e("div",{className:"mt-3 text-sm text-muted",children:"Select an interaction and click Start to start an agent"})]})}function xo({initialMessage:n,startWorkflow:r,onClose:i,isModal:a=!1,placeholder:s="Type your message...",startButtonText:l="Start Agent",title:o="Start New Conversation"}){const[u,m]=c(""),[p,f]=c(!1),[g,y]=c(),v=b(),w=h(null);d(()=>{w.current&&w.current.focus()},[]);const N=async()=>{if(!r)return;const e=u.trim();if(e&&!p){f(!0);try{sessionStorage.removeItem("plan-panel-shown"),v({title:"Starting agent...",status:"info",duration:3e3});const t=await r(e);t&&(y({runId:t.run_id,workflowId:t.workflow_id}),m(""),v({title:"Agent started",status:"success",duration:3e3}))}catch(e){v({title:"Error starting workflow",status:"error",duration:3e3,description:e instanceof Error?e.message:"Unknown error"})}finally{f(!1)}}};return g?e(wo,{onClose:i,isModal:a,initialMessage:n,placeholder:s,run:g,title:o}):t("div",{className:"flex flex-col h-full bg-white dark:bg-gray-900 overflow-hidden border-0",children:[t("div",{className:"flex items-center justify-between py-2 px-3 border-b border-gray-100 dark:border-gray-800 bg-white dark:bg-gray-900",children:[t("div",{className:"flex items-center space-x-2",children:[e("div",{className:"p-1",children:e(Ft,{className:"size-3.5 text-muted"})}),e("span",{className:"font-medium text-sm text-gray-700 dark:text-gray-300",children:o})]}),i&&!a&&e(x,{size:"xs",variant:"ghost",onClick:i,title:"Close",className:"text-slate-500 hover:text-slate-700",children:e(Be,{className:"size-4"})})]}),t("div",{className:"flex-1 overflow-y-auto px-4 py-6 bg-white dark:bg-gray-900 flex flex-col items-center justify-center",children:[n&&e("div",{className:"px-4 py-3 mb-4 bg-blue-50/80 dark:bg-blue-900/30 border-l-2 border-blue-400 dark:border-blue-500 text-blue-700 dark:text-blue-300 max-w-md",children:n}),t("div",{className:"bg-white dark:bg-slate-800 p-4 max-w-md border-l-2 border-blue-400 dark:border-blue-500",children:[e("div",{className:"text-base text-slate-600 dark:text-slate-300 font-medium",children:"Enter a message to start a conversation"}),t("div",{className:"mt-3 text-sm text-slate-500 dark:text-slate-400",children:["Type your question below and press Enter or click ",l," ","to begin"]})]})]}),t("div",{className:"py-3 px-3 border-t border-gray-100 dark:border-gray-800 bg-white dark:bg-gray-900",children:[t("div",{className:"flex items-center gap-2",children:[e("div",{className:"flex-1",children:e("input",{ref:w,value:u,onChange:e=>m(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),N())},placeholder:s,disabled:p,className:"w-full py-2 px-3 text-sm border border-gray-200 dark:border-gray-700 dark:bg-gray-800 dark:text-white focus:border-gray-300 dark:focus:border-gray-600 focus:ring-0 rounded-md"})}),t(x,{onClick:N,disabled:!u.trim()||p,className:"px-3 py-2 bg-gray-800 dark:bg-gray-700 hover:bg-gray-700 dark:hover:bg-gray-600 text-white text-xs rounded-md transition-colors",children:[p?e(K,{size:"sm",className:"mr-1.5"}):e(At,{className:"size-3.5 mr-1.5"}),l]})]}),e("div",{className:"text-xs text-gray-400 dark:text-gray-500 mt-2 text-center",children:"Type a message to start the conversation"})]})]})}function wo({run:n,title:r,interactive:i=!0,onClose:a,isModal:s=!1,placeholder:l="Type your message...",resetWorkflow:u}){const{client:m}=Dt(),p=h(null),f=h(null),[g,y]=c([]),[v,w]=c(!1),[N,k]=c(!1),[C,S]=c("sliding"),[P,j]=c(!s),[_,T]=c([]),[I,A]=c(0),[z,E]=c(new Map),[F,D]=c(0),$=b(),[L,O]=c(i),[R,U]=c(null),M=o(()=>{const e=_[I]||{plan:{plan:[]},timestamp:0},t=z.get(e.timestamp)||new Map;return{plan:e.plan,workstreamStatus:t}},[_,I,z]);d(()=>{if(!v){const e=setInterval(()=>{D(()=>Math.floor(Math.random()*(jr.length-1)))},4e3);return()=>clearInterval(e)}},[v]);d(()=>(y([]),T([]),A(0),E(new Map),j(!1),U(null),(async()=>{try{const e=await m.store.workflows.getRunDetails(n.runId,n.workflowId);U(e.status)}catch(e){console.error("Failed to check workflow status:",e)}})(),m.store.workflows.streamMessages(n.workflowId,n.runId,e=>{e.message&&y(t=>t.find(t=>t.timestamp===e.timestamp)?t:(function(e,t){const n="number"==typeof t.timestamp?t.timestamp:new Date(t.timestamp).getTime(),r=e.findIndex(e=>("number"==typeof e.timestamp?e.timestamp:new Date(e.timestamp).getTime())>n);-1===r?e.push(t):e.splice(r,0,t)}(t,e),[...t]))}),()=>{y([])}),[n.runId,m.store.workflows]),d(()=>{w(!function(e){if(!e.length)return!0;const t=new Map;if(e.forEach(e=>{const n=Tr(e);t.has(n)||t.set(n,[]),t.get(n).push(e)}),console.log("[isInProgress] Workstreams found:",Array.from(t.keys())),1===t.size&&!t.has("main")){const e=t.keys().next().value||"unknown";console.log(`[isInProgress] Only one workstream found (${e}), treating as main`);const n=t.get(e),r=n[n.length-1];return console.log(`[isInProgress] Last message type in only workstream: ${r.type}`),_r.includes(r.type)?(console.log("[isInProgress] Only workstream is completed"),!1):(console.log("[isInProgress] Only workstream is still in progress"),!0)}if(t.has("main")){const e=t.get("main");if(0===e.length)return console.log("[isInProgress] Main workstream exists but has no messages, still in progress"),!0;const n=e[e.length-1];return console.log(`[isInProgress] Last message type in main workstream: ${n.type}`),_r.includes(n.type)?(console.log("[isInProgress] Main workstream is completed"),!1):(console.log("[isInProgress] Main workstream is still in progress"),!0)}console.log("[isInProgress] Multiple workstreams but no main, checking if any are still active");for(const[e,n]of t.entries())if(n.length>0){const t=n[n.length-1];if(!_r.includes(t.type))return console.log(`[isInProgress] Workstream ${e} is still active`),!0}return console.log("[isInProgress] All workstreams are completed"),!1}(g)),0===_.length&&j(!1)},[g,_.length]),d(()=>{if(1===_.length&&!P&&!sessionStorage.getItem("plan-panel-shown")){const e=setTimeout(()=>{j(!0),sessionStorage.setItem("plan-panel-shown","true")},500);return()=>clearTimeout(e)}g.forEach(e=>{if(e.type===$t.PLAN)try{console.log("PLAN message received:",e.type);let t=null;if(e.details&&"object"==typeof e.details&&e.details.plan&&Array.isArray(e.details.plan)&&(console.log("Valid plan array found in message.details.plan"),t={plan:e.details.plan}),t){const n="number"==typeof e.timestamp?e.timestamp:new Date(e.timestamp).getTime();if(-1===_.findIndex(e=>e.timestamp===n)&&t){console.log("Adding new plan to plans array");const e={plan:t,timestamp:n};console.log("Adding plan to plans array:",e),T(t=>{const n=[e,...t];return console.log("New plans array:",n),n}),A(0),console.log("Setting showSlidingPanel to true"),j(!0);const r=new Map;r.set("main","in_progress"),Array.isArray(t.plan)&&t.plan.forEach(e=>{if(e&&"object"==typeof e&&e.id){const t=e.id.toString();r.set(t,e.status||"pending")}}),E(e=>{const t=new Map(e);return t.set(n,r),t})}}}catch(e){console.error("Failed to parse plan from message:",e)}e.type===$t.UPDATE&&e.details&&e.details.updates&&Array.isArray(e.details.updates)&&console.log("Ignoring UPDATE message with details.updates - waiting for PLAN message with full plan")});const e=g[g.length-1];e&&(e.type===$t.TERMINATED?(O(!1),U("TERMINATED")):O(!!i||e.type===$t.REQUEST_INPUT))},[g,_,I]);const V=r||n.workflowId.split(":")[2]||"Agent Conversation",[K,q]=c(!1);return t("div",{className:"flex gap-2 h-full",children:[t("div",{ref:f,className:"flex flex-col h-full min-h-0 border-0 "+(P?"lg:w-2/3 flex-1":"flex-1 mx-auto "+(s?"":"max-w-4xl")),children:[e(Or,{title:V,isCompleted:v,onClose:a,isModal:s,run:n,viewMode:C,onViewModeChange:S,showPlanPanel:P,hasPlan:_.length>0,onTogglePlanPanel:()=>{j(!P),P||sessionStorage.setItem("plan-panel-shown","true")},onDownload:async()=>{try{const e=await async function(e,t){return e.files.getDownloadUrl(`agents/${t}/conversation.json`).then(e=>e.url)}(m,n.runId);e&&window.open(e,"_blank")}catch(e){console.error("Failed to download conversation",e),$({status:"error",title:"Failed to download conversation",duration:3e3})}},onCopyRunId:()=>{navigator.clipboard.writeText(n.runId),$({status:"success",title:"Run ID copied",duration:2e3})},resetWorkflow:u,onExportPdf:()=>{f.current?q(!0):$({status:"error",title:"PDF export failed",description:"No conversation content available to export",duration:3e3})}}),0!==g.length||v?e(Er,{messages:g,bottomRef:p,viewMode:C,isCompleted:v,plan:M.plan,workstreamStatus:M.workstreamStatus,showPlanPanel:P,onTogglePlanPanel:()=>{console.log("Toggle plan panel called, current state:",P),j(!P)},plans:_,activePlanIndex:I,onChangePlan:e=>A(e),taskLabels:M.plan.plan?.reduce((e,t)=>(t.id&&t.goal&&e.set(t.id.toString(),t.goal),e),new Map)}):e("div",{className:"flex-1 flex flex-col items-center justify-center h-full text-center py-6",children:t("div",{className:"p-5 max-w-md border border-info rounded-lg shadow-sm",children:[t("div",{className:"flex items-center space-x-3 mb-3",children:[e(Nr,{size:"sm",color:"blue"}),e("div",{className:"text-sm text-muted font-medium",children:jr[F]})]}),e("div",{className:"mt-4 flex justify-center",children:e(wr,{color:"blue",className:"mt-1"})})]})}),R&&("RUNNING"!==R?t(ce,{status:"COMPLETED"===R?"success":"done",icon:null,className:"flex-shrink-0 m-2",children:["This Workflow is ",R]}):L&&e(go,{onSend:e=>{const t=e.trim();t&&!N&&(k(!0),m.store.workflows.sendSignal(n.workflowId,n.runId,"UserInput",{message:t}).then(()=>{w(!1),$({status:"success",title:"Message Sent",duration:2e3})}).catch(e=>{$({status:"error",title:"Failed to Send Message",description:e instanceof Error?e.message:"Unknown error",duration:3e3})}).finally(()=>{k(!1)}))},disabled:!1,isSending:N,isCompleted:v,activeTaskCount:(()=>{if(!g.length)return 0;const e=new Map;g.forEach(t=>{const n=Tr(t);"main"!==n&&"all"!==n&&(e.has(n)||e.set(n,[]),e.get(n).push(t))});let t=0;for(const[n,r]of e.entries())if(r.length>0){const e=r[r.length-1];[$t.COMPLETE,$t.IDLE].includes(e.type)||t++}return t})(),placeholder:l}))]}),P&&e("div",{className:"h-full lg:w-1/3 border-l",children:e(yo,{plan:M.plan,workstreamStatus:M.workstreamStatus,isOpen:P,onClose:()=>j(!1),plans:_,activePlanIndex:I,onChangePlan:A})}),t(B,{isOpen:K,onClose:()=>q(!1),children:[e(W,{children:"Export conversation as PDF"}),t(G,{children:[e("p",{className:"mb-2",children:"This will open your browser's print dialog with the current conversation."}),e("p",{className:"text-sm text-muted",children:'To save a PDF, choose "Save as PDF" or a similar option in the print dialog.'})]}),t(H,{align:"right",children:[e(x,{variant:"ghost",size:"sm",onClick:()=>q(!1),children:"Cancel"}),e(x,{size:"sm",onClick:()=>{if(!f.current)return void $({status:"error",title:"PDF export failed",description:"No conversation content available to export",duration:3e3});const e=`${V} - ${n.runId}`,t=function(e,t){if("undefined"==typeof window||"undefined"==typeof document)return!1;const n=document.createElement("iframe");n.style.position="fixed",n.style.right="0",n.style.bottom="0",n.style.width="0",n.style.height="0",n.style.border="0",n.style.visibility="hidden",document.body.appendChild(n);const r=n.contentWindow;if(!r)return n.parentNode?.removeChild(n),!1;const i=r.document;return i.open(),i.write(`<!doctype html><html><head><title>${t}</title></head><body></body></html>`),i.close(),i.title=t,document.querySelectorAll('link[rel="stylesheet"], style').forEach(e=>{i.head.appendChild(e.cloneNode(!0))}),i.body.innerHTML=e.innerHTML,r.focus(),r.print(),setTimeout(()=>{n.parentNode?.removeChild(n)},1e3),!0}(f.current,e);t?($({status:"success",title:"PDF export ready",description:"Use your browser's Print dialog to save as PDF",duration:4e3}),q(!1)):$({status:"error",title:"PDF export failed",description:"Unable to open print preview",duration:4e3})},children:"Open print dialog"})]})]})]})}const No=["#4f46e5","#06b6d4","#22c55e","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6"];class ko extends f{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`Chart rendering error (${this.props.chartType}):`,e,t)}render(){return this.state.hasError?e("div",{className:"flex items-center justify-center h-full bg-red-50 dark:bg-red-950 rounded-md p-4",children:t("div",{className:"text-center",children:[t("p",{className:"text-sm font-medium text-red-600 dark:text-red-400",children:["Cannot render ",this.props.chartType," chart"]}),e("p",{className:"text-xs text-red-500 dark:text-red-500 mt-1 max-w-xs truncate",children:this.state.error?.message||"Unknown error"})]})}):this.props.children}}function Co(e){if(!isFinite(e))return String(e);const t=Math.abs(e);return t>=1e9?(e/1e9).toFixed(1)+"B":t>=1e6?(e/1e6).toFixed(1)+"M":t>=1e3?(e/1e3).toFixed(1)+"K":e.toLocaleString()}const So=g(function({spec:r}){const{chart:i,title:a,description:s,data:l,xKey:o,series:d,yAxis:u,options:m,nameKey:f,valueKey:g,yKey:y,zKey:b,axisKey:v,dataKey:x}=r,[w,N]=c(!1),[k,C]=c(!1),S=h(null),P=p(async()=>{if(S.current&&!k)try{const e=await _n(S.current,{backgroundColor:"#ffffff",pixelRatio:2}),t=await fetch(e),n=await t.blob();await navigator.clipboard.write([new ClipboardItem({"image/png":n})]),C(!0),setTimeout(()=>C(!1),2e3)}catch(e){console.error("Failed to copy chart:",e)}},[k]),j=p(async()=>{if(S.current&&!w){N(!0);try{const e=await _n(S.current,{backgroundColor:"#ffffff",pixelRatio:2}),t=document.createElement("a");t.download=`${a||"chart"}.png`,t.href=e,t.click()}catch(e){console.error("Failed to export chart:",e)}finally{N(!1)}}},[a,w]),_=d||[],T=l||[],I=t(n,{children:[e(Tn,{dataKey:o,tick:{fontSize:12}}),e(In,{yAxisId:"left",tickFormatter:Co,label:u?.left?.label?{value:u.left.label,angle:-90,position:"insideLeft"}:void 0}),_.some(e=>"right"===e.yAxisId)&&e(In,{yAxisId:"right",orientation:"right",tickFormatter:Co,label:u?.right?.label?{value:u.right.label,angle:-90,position:"insideRight"}:void 0})]}),A=t(n,{children:[e(An,{strokeDasharray:"3 3"}),e(zn,{formatter:e=>"number"==typeof e?Co(e):String(e)}),e(En,{}),m?.referenceZero&&e(Fn,{y:0,stroke:"#999",strokeDasharray:"3 3"})]}),z=()=>_.map((t,n)=>{const r=t.color||No[n%No.length],a=t.yAxisId||"left";return"line"===i?e(Un,{type:"monotone",dataKey:t.key,name:t.label||t.key,stroke:r,dot:t.dot??!1,yAxisId:a},t.key):"area"===i?e(Mn,{type:"monotone",dataKey:t.key,name:t.label||t.key,stroke:r,fill:r,fillOpacity:.3,stackId:m?.stacked?t.stackId||"stack":void 0,yAxisId:a},t.key):"bar"===i||"bar"===t.type?e(Vn,{dataKey:t.key,name:t.label||t.key,fill:r,stackId:m?.stacked?t.stackId||"stack":void 0,yAxisId:a},t.key):"area"===t.type?e(Mn,{type:"monotone",dataKey:t.key,name:t.label||t.key,stroke:r,fill:r,fillOpacity:.3,stackId:m?.stacked?t.stackId||"stack":void 0,yAxisId:a},t.key):e(Un,{type:"monotone",dataKey:t.key,name:t.label||t.key,stroke:r,dot:t.dot??!1,yAxisId:a},t.key)});return e("div",{className:"bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 shadow-sm",children:t("div",{className:"flex flex-col gap-2 p-3",children:[t("div",{className:"flex items-center justify-between",children:[e("span",{className:"font-medium text-sm text-gray-900 dark:text-gray-100",children:a||"Chart"}),t("div",{className:"flex items-center gap-2 print:hidden chart-actions",children:[t("button",{onClick:P,disabled:k,className:"text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50 flex items-center gap-1",title:"Copy to clipboard",children:[e(k?_t:ct,{className:"w-3 h-3"}),k?"Copied":"Copy"]}),t("button",{onClick:j,disabled:w,className:"text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1",title:"Export as PNG",children:[e(at,{className:"w-3 h-3"}),w?"Exporting...":"Export"]})]})]}),s&&e("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:s}),e("div",{ref:S,className:"bg-white dark:bg-gray-900 rounded",style:{width:"100%",height:280,minWidth:0},children:e(ko,{chartType:i,children:e(Dn,{width:"100%",height:"100%",children:(()=>{switch(i){case"bar":return t(Rn,{data:T,children:[I,A,z()]});case"line":return t(On,{data:T,children:[I,A,z()]});case"area":return t(Ln,{data:T,children:[I,A,z()]});case"composed":default:return t($n,{data:T,children:[I,A,z()]});case"pie":return t(Kn,{children:[e(qn,{data:T,dataKey:g||"value",nameKey:f||"name",cx:"50%",cy:"50%",innerRadius:m?.innerRadius||0,outerRadius:100,label:!1!==m?.showLabels,children:T.map((t,n)=>e(Bn,{fill:No[n%No.length]},`cell-${n}`))}),e(zn,{formatter:e=>"number"==typeof e?Co(e):String(e)}),e(En,{})]});case"scatter":return(()=>{const n=o,r=y||"y";return t(Wn,{children:[e(An,{strokeDasharray:"3 3"}),e(Tn,{dataKey:n,name:n,tick:{fontSize:12}}),e(In,{dataKey:r,name:r,tickFormatter:Co}),e(zn,{formatter:e=>"number"==typeof e?Co(e):String(e)}),e(En,{}),_.length>0?_.map((t,n)=>e(Gn,{name:t.label||t.key,data:T,fill:t.color||No[n%No.length]},t.key)):e(Gn,{name:"Data",data:T,fill:No[0]})]})})();case"radar":return(()=>{const n=v||o||"axis";return t(Hn,{cx:"50%",cy:"50%",outerRadius:100,data:T,children:[e(Jn,{}),e(Yn,{dataKey:n,tick:{fontSize:11}}),e(Zn,{tickFormatter:Co}),_.map((t,n)=>e(Qn,{name:t.label||t.key,dataKey:t.key,stroke:t.color||No[n%No.length],fill:t.color||No[n%No.length],fillOpacity:.3},t.key)),e(zn,{formatter:e=>"number"==typeof e?Co(e):String(e)}),e(En,{})]})})();case"radialBar":return(()=>{const n=f||"name",r=g||"value",i=m?.startAngle??180,a=m?.endAngle??0;return t(Xn,{cx:"50%",cy:"50%",innerRadius:m?.innerRadius??30,outerRadius:100,barSize:15,data:T,startAngle:i,endAngle:a,children:[e(er,{label:{position:"insideStart",fill:"#fff",fontSize:11},background:!0,dataKey:r,children:T.map((t,n)=>e(Bn,{fill:No[n%No.length]},`cell-${n}`))}),e(zn,{formatter:e=>"number"==typeof e?Co(e):String(e)}),e(En,{iconSize:10,layout:"vertical",verticalAlign:"middle",align:"right",formatter:(e,t)=>{const i=T.find(i=>i[n]===e||i[r]===t.payload?.value);return i?i[n]:e}})]})})();case"funnel":return(()=>{const n=f||"name",r=g||"value";return t(tr,{children:[e(zn,{formatter:e=>"number"==typeof e?Co(e):String(e)}),t(nr,{dataKey:r,data:T,isAnimationActive:!0,children:[T.map((t,n)=>e(Bn,{fill:No[n%No.length]},`cell-${n}`)),!1!==m?.showLabels&&e(rr,{position:"center",fill:"#fff",stroke:"none",dataKey:n})]})]})})();case"treemap":return e(ir,{data:T,dataKey:x||g||"value",aspectRatio:4/3,stroke:"#fff",fill:"#4f46e5",content:({x:r,y:i,width:a,height:s,name:l,value:o,index:c})=>t("g",{children:[e("rect",{x:r,y:i,width:a,height:s,style:{fill:No[c%No.length],stroke:"#fff",strokeWidth:2}}),a>50&&s>30&&t(n,{children:[e("text",{x:r+a/2,y:i+s/2-7,textAnchor:"middle",fill:"#fff",fontSize:12,children:l}),e("text",{x:r+a/2,y:i+s/2+10,textAnchor:"middle",fill:"#fff",fontSize:11,children:Co(o)})]})]})})}})()})})})]})})},(e,t)=>JSON.stringify(e.spec)===JSON.stringify(t.spec));function Po(e){const{title:t,leftLabel:n,rightLabel:r,metrics:i,description:a,collapseInitially:s}=e;return{version:"1.0",library:"recharts",chart:"bar",title:t||"Scenario Comparison",description:a,data:i.map(e=>({label:e.label,left:e.left,right:e.right})),xKey:"label",series:[{key:"left",label:n,type:"bar"},{key:"right",label:r,type:"bar"}],yAxis:{left:{label:"Value"}},options:{stacked:!1,referenceZero:!1,collapseInitially:s}}}function jo(e){const{title:t,metrics:n,description:r,collapseInitially:i}=e;return{version:"1.0",library:"recharts",chart:"bar",title:t||"Change vs. Baseline (%)",description:r,data:n.map(e=>({label:e.label,deltaPct:0!==e.left?(e.right-e.left)/e.left*100:0})),xKey:"label",series:[{key:"deltaPct",label:"% Change",type:"bar"}],yAxis:{left:{label:"% Change"}},options:{stacked:!1,referenceZero:!0,collapseInitially:i}}}function _o(e){return["```chart",JSON.stringify(e,null,2),"```"].join("\n")}function To(e){const{title:t,description:n,rows:r,collapseInitially:i}=e;return{version:"1.0",library:"recharts",chart:"composed",title:t||"Cashflow Timeline",description:n,data:r.map(e=>({period:e.period,calls:e.calls,distributions:e.distributions,netCashflow:e.netCashflow??e.distributions-e.calls})),xKey:"period",series:[{key:"calls",label:"Calls",type:"bar",color:"#ef4444"},{key:"distributions",label:"Distributions",type:"bar",color:"#22c55e"},{key:"netCashflow",label:"Net Cashflow",type:"line",color:"#0ea5e9",yAxisId:"right",dot:!1}],yAxis:{left:{label:"Amount"},right:{label:"Net"}},options:{stacked:!1,referenceZero:!0,collapseInitially:i}}}function Io(e){const{title:t,description:n,rows:r,collapseInitially:i}=e;return{version:"1.0",library:"recharts",chart:"line",title:t||"Performance (J‑Curve)",description:n,data:r.map(e=>({period:e.period,tvpi:e.tvpi??null,dpi:e.dpi??null,rvpi:e.rvpi??null})),xKey:"period",series:[{key:"tvpi",label:"TVPI",type:"line",color:"#4f46e5",dot:!1},{key:"dpi",label:"DPI",type:"line",color:"#16a34a",dot:!1},{key:"rvpi",label:"RVPI",type:"line",color:"#f59e0b",dot:!1}],yAxis:{left:{label:"Multiple (x)"}},options:{stacked:!1,referenceZero:!0,collapseInitially:i}}}function Ao(e){const{title:t,description:n,rows:r,leftLabel:i,rightLabel:a,collapseInitially:s}=e;return{version:"1.0",library:"recharts",chart:"line",title:t||"TVPI Over Time",description:n,data:r,xKey:"period",series:[{key:"tvpi_left",label:`TVPI – ${i}`,type:"line",color:"#4f46e5",dot:!1},{key:"tvpi_right",label:`TVPI – ${a}`,type:"line",color:"#6366f1",dot:!1}],yAxis:{left:{label:"Multiple (x)"}},options:{stacked:!1,referenceZero:!0,collapseInitially:s}}}function zo(e){const{title:t,description:n,rows:r,collapseInitially:i}=e;return{version:"1.0",library:"recharts",chart:"line",title:t||"NAV Over Time",description:n,data:r.map(e=>({period:e.period,nav:e.nav})),xKey:"period",series:[{key:"nav",label:"NAV",type:"line",color:"#0ea5e9",dot:!1}],yAxis:{left:{label:"NAV"}},options:{stacked:!1,referenceZero:!0,collapseInitially:i}}}const Eo={name:"create_chart",description:'Create an interactive chart visualization that will be rendered in the UI.\n\nIMPORTANT: You don\'t actually "call" this tool. Instead, you include a markdown code block with language "chart" in your response.\n\nCharts are created using JSON specifications in markdown code blocks:\n\n```chart\n{\n "chart": "bar|line|area|composed|pie|scatter|radar|radialBar|funnel|treemap",\n "title": "Chart Title",\n "data": [...],\n ...\n}\n```\n\n## CHART TYPES & WHEN TO USE\n\n| Type | Use Case | Data Shape |\n|------|----------|------------|\n| bar | Category comparisons | `[{x, y1, y2}]` |\n| line | Trends over time | `[{x, y1, y2}]` |\n| area | Trends with volume emphasis | `[{x, y1, y2}]` |\n| composed | Mix bars + lines | `[{x, y1, y2}]` with series.type |\n| pie | Part-to-whole (%) | `[{name, value}]` |\n| scatter | Correlation analysis | `[{x, y}]` |\n| radar | Multi-dimensional comparison | `[{axis, A, B}]` |\n| radialBar | Progress/gauges | `[{name, value}]` |\n| funnel | Conversion stages | `[{name, value}]` |\n| treemap | Hierarchical proportions | `[{name, value}]` |\n\n## EXAMPLES\n\n### Bar Chart\n```chart\n{"chart":"bar","title":"Revenue by Quarter","data":[{"quarter":"Q1","revenue":100000},{"quarter":"Q2","revenue":150000}],"xKey":"quarter","series":[{"key":"revenue","label":"Revenue"}]}\n```\n\n### Line Chart\n```chart\n{"chart":"line","title":"Performance","data":[{"period":"Q1","tvpi":1.2},{"period":"Q2","tvpi":1.5}],"xKey":"period","series":[{"key":"tvpi","label":"TVPI","color":"#4f46e5"}]}\n```\n\n### Area Chart\n```chart\n{"chart":"area","title":"Sales Volume","data":[{"month":"Jan","sales":1000},{"month":"Feb","sales":1500}],"xKey":"month","series":[{"key":"sales","label":"Sales"}],"options":{"stacked":true}}\n```\n\n### Composed Chart (Bar + Line)\n```chart\n{"chart":"composed","title":"Cashflow","data":[{"period":"Q1","calls":1000000,"net":-500000}],"xKey":"period","series":[{"key":"calls","type":"bar","color":"#ef4444"},{"key":"net","type":"line","yAxisId":"right"}],"yAxis":{"left":{"label":"Amount"},"right":{"label":"Net"}}}\n```\n\n### Pie Chart\n```chart\n{"chart":"pie","title":"Market Share","data":[{"name":"Product A","value":400},{"name":"Product B","value":300},{"name":"Product C","value":200}],"nameKey":"name","valueKey":"value"}\n```\n\n### Donut Chart (Pie with innerRadius)\n```chart\n{"chart":"pie","title":"Revenue Split","data":[{"name":"Services","value":60},{"name":"Products","value":40}],"nameKey":"name","valueKey":"value","options":{"innerRadius":50}}\n```\n\n### Scatter Chart\n```chart\n{"chart":"scatter","title":"Price vs Volume","data":[{"price":100,"volume":500},{"price":150,"volume":400}],"xKey":"price","yKey":"volume","series":[{"key":"data","label":"Products"}]}\n```\n\n### Radar Chart\n```chart\n{"chart":"radar","title":"Skills Comparison","data":[{"skill":"Speed","A":120,"B":110},{"skill":"Power","A":98,"B":130}],"axisKey":"skill","series":[{"key":"A","label":"Team A"},{"key":"B","label":"Team B"}]}\n```\n\n### RadialBar Chart (Progress)\n```chart\n{"chart":"radialBar","title":"Goal Progress","data":[{"name":"Sales","value":80},{"name":"Users","value":65}],"nameKey":"name","valueKey":"value"}\n```\n\n### Funnel Chart\n```chart\n{"chart":"funnel","title":"Conversion Funnel","data":[{"name":"Visits","value":5000},{"name":"Cart","value":2500},{"name":"Purchase","value":1000}],"nameKey":"name","valueKey":"value"}\n```\n\n### Treemap\n```chart\n{"chart":"treemap","title":"Budget Allocation","data":[{"name":"Engineering","value":500000},{"name":"Marketing","value":200000},{"name":"Sales","value":300000}],"nameKey":"name","dataKey":"value"}\n```\n\n## CONFIGURATION\n\n### Series (for bar/line/area/composed/radar)\n- key: (required) Field name in data\n- label: Display name\n- type: "bar"|"line"|"area" (composed only)\n- color: Hex color\n- yAxisId: "left"|"right"\n- dot: Show dots on lines\n\n### Keys (for pie/scatter/radar/funnel/treemap)\n- nameKey: Field for labels (default: "name")\n- valueKey: Field for values (default: "value")\n- xKey/yKey: For scatter charts\n- axisKey: For radar axis labels\n- dataKey: For treemap values\n\n### Options\n- stacked: Stack bars/areas\n- referenceZero: Show y=0 line\n- innerRadius: For donut charts (0-100)\n- showLabels: Show value labels\n- startAngle/endAngle: For radialBar\n\n## COLORS\n- Blue #4f46e5 - Primary\n- Cyan #06b6d4 - Secondary\n- Green #22c55e - Positive\n- Amber #f59e0b - Warning\n- Red #ef4444 - Negative\n- Purple #8b5cf6 - Accent\n- Pink #ec4899 - Highlight\n- Teal #14b8a6 - Alternative\n\nNumbers auto-format: 1K, 1M, 1B',input_schema:{type:"object",properties:{chart:{type:"string",enum:["bar","line","area","composed","pie","scatter","radar","radialBar","funnel","treemap"],description:"Type of chart to create"},title:{type:"string",description:"Chart title"},description:{type:"string",description:"Optional description shown below the title"},data:{type:"array",description:"Array of data objects",items:{type:"object",additionalProperties:!0}},xKey:{type:"string",description:"Field name to use for X-axis (for bar/line/area/composed/scatter)"},yKey:{type:"string",description:"Field name for Y values (for scatter charts)"},nameKey:{type:"string",description:'Field name for labels (for pie/funnel/radialBar/treemap, default: "name")'},valueKey:{type:"string",description:'Field name for values (for pie/funnel/radialBar, default: "value")'},axisKey:{type:"string",description:"Field name for radar axis labels"},dataKey:{type:"string",description:"Field name for treemap values"},series:{type:"array",description:"Array of series to plot (for bar/line/area/composed/radar)",items:{type:"object",properties:{key:{type:"string",description:"Field name in data"},label:{type:"string",description:"Display name"},type:{type:"string",enum:["bar","line","area"],description:"Series type (for composed charts)"},color:{type:"string",description:"Hex color code"},yAxisId:{type:"string",enum:["left","right"],description:"Which Y-axis to use"},dot:{type:"boolean",description:"Show dots on line (default: false)"}},required:["key"]}},yAxis:{type:"object",description:"Y-axis configuration",properties:{left:{type:"object",properties:{label:{type:"string"}}},right:{type:"object",properties:{label:{type:"string"}}}}},options:{type:"object",description:"Chart options",properties:{stacked:{type:"boolean",description:"Stack bars/areas"},referenceZero:{type:"boolean",description:"Show reference line at y=0"},collapsible:{type:"boolean",description:"Allow user to collapse chart"},collapseInitially:{type:"boolean",description:"Start collapsed"},innerRadius:{type:"number",description:"Inner radius for donut/radialBar charts (0-100)"},showLabels:{type:"boolean",description:"Show value labels on pie/funnel"},startAngle:{type:"number",description:"Start angle for radialBar (default: 180)"},endAngle:{type:"number",description:"End angle for radialBar (default: 0)"}}}},required:["chart","data"]}},Fo='\n# Chart Visualization Capability\n\nYou can create interactive charts by including markdown code blocks with the language "chart".\n\n## Chart Types\n\n| Type | Use Case | Required Fields |\n|------|----------|-----------------|\n| bar | Category comparisons | xKey, series |\n| line | Trends over time | xKey, series |\n| area | Trends with volume | xKey, series |\n| composed | Mix bars + lines | xKey, series with type |\n| pie | Part-to-whole | nameKey, valueKey |\n| scatter | Correlation | xKey, yKey |\n| radar | Multi-dimensional | axisKey, series |\n| radialBar | Progress/gauges | nameKey, valueKey |\n| funnel | Conversion stages | nameKey, valueKey |\n| treemap | Hierarchical data | nameKey, dataKey |\n\n## Quick Examples\n\nBar: `{"chart":"bar","data":[{"x":"A","y":10}],"xKey":"x","series":[{"key":"y"}]}`\nPie: `{"chart":"pie","data":[{"name":"A","value":60},{"name":"B","value":40}]}`\nScatter: `{"chart":"scatter","data":[{"x":1,"y":2}],"xKey":"x","yKey":"y"}`\n\nUse charts when:\n- User requests visualization\n- 3+ data points to display\n- Visual form clarifies comparisons/trends\n\nColors: Blue #4f46e5 (primary), Green #22c55e (positive), Red #ef4444 (negative)\n';function Do(e){if(!(e.chart&&e.data&&e.xKey&&e.series))throw new Error("Invalid chart spec: missing required fields (chart, data, xKey, series)");if(!Array.isArray(e.data))throw new Error("Invalid chart spec: data must be an array");if(!Array.isArray(e.series)||0===e.series.length)throw new Error("Invalid chart spec: series must be a non-empty array");return`\`\`\`chart\n${JSON.stringify(e,null,2)}\n\`\`\``}function $o(e){const t=/```chart\s*\n([\s\S]*?)\n```/g,n=[];let r;for(;null!==(r=t.exec(e));)try{const e=JSON.parse(r[1]);n.push(e)}catch(e){console.warn("Failed to parse chart spec:",e)}return n}function Lo({children:t,fallback:n}){return Oo?e(Oo,{fallback:n,children:t}):e(ar,{FallbackComponent:n,children:t})}let Oo=null;function Ro(e){Oo=e}function Uo({children:t}){return e(Lo,{fallback:Mo,children:t})}function Mo({error:n}){return t(ce,{status:"error",title:"Sorry, something went wrong...",children:[t("div",{className:"mb-4",children:["Our team has been notified and will be quickly working on resolving it. If you'd like to escalate or simply contact us, please email us at ",e("a",{className:"text-info",href:"mailto:support@vertesiahq.com",children:"support@vertesiahq.com"}),"."]}),n?.message&&e("code",{className:"w-full mt-4 text-sm text-muted break-words",children:n.message})]})}function Vo({children:t}){return e(Lo,{fallback:Ko,children:t})}function Ko({error:n}){return e("tr",{children:t("td",{colSpan:100,children:[e("span",{className:"text-xs",children:" Cannot display row"}),e("br",{}),e("span",{className:"bg-gray-400",children:n?.message})]})})}function qo({children:t}){return e(Lo,{fallback:Bo,children:t})}function Bo({error:n}){return console.log("WidgetError",n),t("div",{className:"text-sm",children:["Sorry, this area cannot be loaded or rendered.",n?.message&&e("pre",{children:n.message})]})}function Wo({className:n,children:i,title:a,description:s,actions:l,breadcrumbs:o,isCompact:c=!1,useDynamicBreadcrumbs:d=!0}){const u=Qt();function m(e){return e.replace(/[-_]/g," ").split(" ").map(e=>sr(e)).join(" ")}const h=e=>{const t=e?.href||"";if(!t)return"Page";const n=t.split("#")[0].split("?")[0].split("/").filter(e=>e.length>0);if(3===n.length){if(e.title!==document.title&&e.title)return e.title;return`${m(n[1])} Detail (...${n[2].slice(-6)})`}return n.length>=2?m(n[n.length-1]):1===n.length?m(n[0]):"Page"},p=(()=>{const e=[];if(d&&"undefined"!=typeof window&&window.history.state?.historyChain){const t=window.history.state.historyChain;t.forEach((n,r)=>{const i=t.length-r;e.push({label:h(n),href:n.href,onClick:()=>u(n.href,{stepsBack:i})})})}return o&&o.length>0&&o.forEach(t=>{const n="string"==typeof t?.props?.children?t.props.children:"Page";e.push(t?.props?.href?{href:t?.props?.href,label:n,onClick:()=>u(t.props.href,{replace:t.props.clearBreadcrumbs})}:{label:n})}),e})();return t("div",{className:r(c?"pb-0":"pb-2","p-4 flex flex-col",n),children:[t("div",{className:"flex items-start gap-4",children:[t("div",{className:"w-full flex place-content-between h-auto min-h-8 flex-col items-start",children:[e("nav",{className:"flex-1 flex justify-start text-xs",children:p.length>0&&e(De,{path:p,separator:e(kt,{className:"w-3.5 h-3.5"}),maxItems:4})}),t("div",{className:"flex gap-2 items-center",children:[e("h1",{className:"text-xl font-semibold break-all",children:a}),s&&e(L,{description:s,children:e(Re,{className:"size-4 text-muted"})})]})]}),e("div",{className:"flex gap-x-2 shrink-0",children:l})]}),i&&e("div",{className:"w-full flex items-center",children:i})]})}function Go({}){return t("div",{className:"text-center pt-32",children:[e("h1",{className:"text-3xl font-bold text-red-500",children:"404"}),e("p",{className:"text-2xl",children:"Page Not Found"})]})}function Ho(...e){const t=Array.from(e);return t.__AnyOf__=!0,t}function Jo(...e){return Array.from(e)}function Yo(e){return!0===e.__AnyOf__}class Zo{system_roles;roles;permissions;constructor(e,t){if(!e.authToken)throw new Error("No auth token found in user session");this.system_roles=t;const n=new Set(e.authToken.account_roles||[]);if(e.authToken.project_roles)for(const t of e.authToken.project_roles)n.add(t);this.roles=n;const r={};for(const e of t)r[e.name]=e.permissions;const i=new Set;for(const e of n){const t=r[e];if(t)for(const e of t)i.add(e)}this.permissions=i}hasPermission(e){if("string"==typeof e)return this.permissions.has(e);if(Yo(e))return e.some(e=>this.permissions.has(e));for(const t of e)if(!this.permissions.has(t))return!1;return!0}}const Qo=u(void 0);function Xo(){const e=m(Qo);if(!e)throw new Error("UserPermissionContext cannot be used outside UserPermissionProvider");return e}function ec({children:t}){const n=Dt(),{data:r,error:i,isLoading:a}=O(()=>n.user?n.client.iam.roles.list():Promise.resolve(void 0),[n.user]),s=o(()=>n.authToken&&r&&!a?new Zo(n,r):void 0,[n,r,a]);return i?e(R,{title:"Failed to fetch role mappings",children:i.message}):s&&e(Qo.Provider,{value:s,children:t})}function tc({permission:t,isDisabled:n,title:r,children:i,...a}){return Xo().hasPermission(t)||(n=!0,r="You do not have permission to perform this action"),e(x,{isDisabled:n,title:r,...a,children:i})}function nc({permission:t,...n}){return Xo().hasPermission(t)?e(lr,{...n}):null}function rc({user:n}){return t("div",{className:"flex items-center",children:[e("div",{className:"w-9 h-9",children:(()=>{if(n.picture)return e("img",{className:"inline-block h-9 w-9 rounded-full",src:n.picture,alt:n.name});{const t=n.name.split(" ").map(e=>e[0]).join("");return e("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full bg-indigo-600",children:e("span",{className:"text-sm font-medium leading-none text-white",children:t})})}})()}),t("div",{className:"ml-3",children:[e("p",{className:"text-sm font-medium text-gray-700 dark:text-slate-50 group-hover:text-gray-900",children:n.name??"Deleted User"}),e("p",{className:"text-xs font-medium text-gray-500 dark:text-slate-300 group-hover:text-gray-700",children:n.email??"Deleted User"})]})]})}export{ur as ActivitiesDoc,hr as ActivityDoc,ao as AddToCollectionAction,io as AddToCollectionActionComponent,So as AgentChart,Jo as AllOf,wr as AnimatedThinkingDots,Ho as AnyOf,Ka as ApiKeyAvatar,sl as BrowseCollectionView,Ll as ChangeTypeAction,$l as ChangeTypeActionComponent,ds as CollectionsFacetsNav,ul as CollectionsTable,Mr as ContentDispositionButton,wl as ContentObjectTypesSearch,hl as ContentObjectTypesTable,oa as ContentOverview,cl as CreateCollectionForm,dl as CreateCollectionModal,vl as CreateOrUpdateTypeModal,Ul as DeleteObjectsAction,Rl as DeleteObjectsActionComponent,Ml as DeleteObjectsFromCollectionsAction,Ns as DocumentGridView,Na as DocumentIcon,wa as DocumentIconSkeleton,qs as DocumentInput,Ws as DocumentPreviewPanel,ks as DocumentSearch,Os as DocumentSearchProvider,Xs as DocumentSearchResults,Qs as DocumentSearchResultsWithDropZone,us as DocumentSelection,fs as DocumentSelectionProvider,Ds as DocumentTable,xs as DocumentTableColumn,ws as DocumentTableView,zs as DocumentUploadModal,ts as DocumentsFacetsNav,Al as EditCollectionView,Wa as EnvironmentFacet,Kl as ExportPropertiesAction,Vl as ExportPropertiesComponent,rl as ExportPropertiesModal,nl as ExportTypes,Ts as FileUploadAction,Wo as GenericPageNavHeader,is as InteractionsFacetsNav,xr as JumpingDots,Ji as MagicPdfView,bo as ModernAgentConversation,Go as NotFoundView,kl as ObjectSchemaEditor,pl as ObjectTypeSearch,fl as ObjectTypeSearchContext,Sl as ObjectTypeSearchProvider,Zl as ObjectsActionContext,Xl as ObjectsActionContextProvider,Uo as PanelErrorBoundary,Fr as PayloadBuilder,$r as PayloadBuilderProvider,Dr as PayloadContext,vi as PdfDocumentRenderer,ui as PdfPageRenderer,Ni as PdfPageSlider,bi as PdfThumbnailList,ls as PromptsFacetsNav,ci as PropertiesEditorModal,Nr as PulsatingCircle,Cr as PulsingMessageLoader,Bl as RemoveFromCollectionAction,ql as RemoveFromCollectionActionComponent,Vo as RowErrorBoundary,Ja as RunsFacetsNav,oi as SaveVersionConfirmModal,Cs as SearchContext,tc as SecureButton,nc as SecureSidebarItem,El as SelectCollection,ol as SelectContentType,Pl as SelectContentTypeModal,Us as SelectDocument,Vs as SelectDocumentModal,oo as SelectionActions,hi as SharedPdfProvider,Fl as SharedPropsEditor,gi as SimplePdfPage,Zi as SimplePdfViewer,Gl as StartWorkflowAction,Wl as StartWorkflowComponent,Sa as StringFacet,Pa as StringListFacet,Dl as SyncMemberHeadsToggle,_l as TableLayoutEditor,Sr as ThinkingBar,jr as ThinkingMessages,_a as TypeFacet,kr as TypedDots,uo as UploadObjectsButton,rc as UserAvatar,Ra as UserInfo,ec as UserPermissionProvider,Zo as UserPermissions,Qo as UserPermissionsContext,Ta as VStringFacet,Ia as VTypeFacet,Ba as VUserFacet,Lo as VertesiaErrorBoundary,Pr as WavyThinking,qo as WidgetErrorBoundary,Qa as WorkflowExecutionsFacetsNav,To as buildCashflowComposedChart,Do as buildChartSpec,zo as buildNavLineChart,Io as buildPerformanceLineChart,Po as buildScenarioComparisonBarChart,jo as buildScenarioDeltaPercentChart,Ao as buildTvpiOverlayChart,Fo as chartSystemPromptAddition,ml as collectionIcon,Eo as createChartToolDefinition,$o as extractChartSpecs,ai as getWorkflowStatusColor,si as getWorkflowStatusName,Yo as isAnyOf,Jr as isCsv,Yr as isImage,Zr as isPdf,Xr as isPreviewableAsPdf,Qr as isVideo,ii as printElementToPdf,ri as retrieveRendition,Ro as setErrorBoundaryComponent,Vr as shortId,Kr as shortenString,Tl as stringifyTableLayout,_o as toChartMarkdown,os as useCollectionsFilterGroups,cs as useCollectionsFilterHandler,Xa as useDocumentFilterGroups,es as useDocumentFilterHandler,Ss as useDocumentSearch,_s as useDocumentSearchCount,hs as useDocumentSelection,Es as useDocumentUploadHandler,Bs as useDownloadDocument,Fa as useFetchGroupInfo,Ea as useFetchUserInfo,ns as useInteractionsFilterGroups,rs as useInteractionsFilterHandler,no as useObjectsActionCallback,to as useObjectsActionContext,ps as useOptionalDocumentSelection,Lr as usePayloadBuilder,as as usePromptsFilterGroups,ss as usePromptsFilterHandler,Ga as useRunsFilterGroups,Ha as useRunsFilterHandler,gl as useSearch,bl as useSearchCount,pi as useSharedPdf,As as useSmartFileUploadProcessing,ro as useStartWorkflowCallback,Xo as useUserPermissions,Ps as useWatchDocumentSearchFacets,js as useWatchDocumentSearchResult,yl as useWatchSearchResult,Ya as useWorkflowExecutionsFilterGroups,Za as useWorkflowExecutionsFilterHandler};
2
- //# sourceMappingURL=vertesia-ui-features.js.map