@trilogy-data/trilogy-studio-components 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (581) hide show
  1. package/README.md +6 -0
  2. package/dist/ChatCreatorModal-DTcvWDQi.js +192 -0
  3. package/dist/Dashboard-C8re96eZ.js +5104 -0
  4. package/dist/DashboardCreatorInline-Do-CDJgS.js +150 -0
  5. package/dist/DashboardMobile-BOrq0rBy.js +310 -0
  6. package/dist/LLMConnectionList-DVM5t-P2.js +4692 -0
  7. package/dist/LLMView-lUTKOMbr.js +558 -0
  8. package/dist/Manager-CXJNoqU2.js +4 -0
  9. package/dist/ResultComponent-C4EGIBY0.js +155 -0
  10. package/dist/Sidebar-BGKtM2n0.js +1841 -0
  11. package/dist/TutorialPage-CGjDXmYk.js +482 -0
  12. package/dist/WelcomePage-C6obXIyG.js +75 -0
  13. package/dist/abap-D0Neqhq6.js +1404 -0
  14. package/dist/apex-B5LhxkeG.js +332 -0
  15. package/dist/azcli-BrBH0QTU.js +74 -0
  16. package/dist/bat-BfzAov64.js +106 -0
  17. package/dist/bicep-C3bCSWel.js +108 -0
  18. package/dist/cameligo-sFL5plcd.js +180 -0
  19. package/dist/chats/chat.d.ts +63 -0
  20. package/dist/chats/chat.d.ts.map +1 -0
  21. package/dist/chats/index.d.ts +3 -0
  22. package/dist/chats/index.d.ts.map +1 -0
  23. package/dist/clojure-CfeExRz0.js +767 -0
  24. package/dist/coffee-Xws5K0WL.js +238 -0
  25. package/dist/components/AssetAutoImporter.vue.d.ts +10 -0
  26. package/dist/components/AssetAutoImporter.vue.d.ts.map +1 -0
  27. package/dist/components/ChartControlPanel.vue.d.ts +54 -0
  28. package/dist/components/ChartControlPanel.vue.d.ts.map +1 -0
  29. package/dist/components/CodeBlock.vue.d.ts +39 -0
  30. package/dist/components/CodeBlock.vue.d.ts.map +1 -0
  31. package/dist/components/ConceptTable.vue.d.ts +16 -0
  32. package/dist/components/ConceptTable.vue.d.ts.map +1 -0
  33. package/dist/components/ContextMenu.vue.d.ts +67 -0
  34. package/dist/components/ContextMenu.vue.d.ts.map +1 -0
  35. package/dist/components/DataTable.vue.d.ts +204 -0
  36. package/dist/components/DataTable.vue.d.ts.map +1 -0
  37. package/dist/components/DrilldownPane.vue.d.ts +94 -0
  38. package/dist/components/DrilldownPane.vue.d.ts.map +1 -0
  39. package/dist/components/EditableTitle.vue.d.ts +32 -0
  40. package/dist/components/EditableTitle.vue.d.ts.map +1 -0
  41. package/dist/components/ErrorMessage.vue.d.ts +20 -0
  42. package/dist/components/ErrorMessage.vue.d.ts.map +1 -0
  43. package/dist/components/HighlightComponent.vue.d.ts +21 -0
  44. package/dist/components/HighlightComponent.vue.d.ts.map +1 -0
  45. package/dist/components/HintComponent.vue.d.ts +12 -0
  46. package/dist/components/HintComponent.vue.d.ts.map +1 -0
  47. package/dist/components/InlineErrorMessage.vue.d.ts +3 -0
  48. package/dist/components/InlineErrorMessage.vue.d.ts.map +1 -0
  49. package/dist/components/LoadingButton.vue.d.ts +121 -0
  50. package/dist/components/LoadingButton.vue.d.ts.map +1 -0
  51. package/dist/components/LoadingView.vue.d.ts +21 -0
  52. package/dist/components/LoadingView.vue.d.ts.map +1 -0
  53. package/dist/components/MarkdownRenderer.vue.d.ts +39 -0
  54. package/dist/components/MarkdownRenderer.vue.d.ts.map +1 -0
  55. package/dist/components/PopupModal.vue.d.ts +50 -0
  56. package/dist/components/PopupModal.vue.d.ts.map +1 -0
  57. package/dist/components/SimpleEditor.vue.d.ts +246 -0
  58. package/dist/components/SimpleEditor.vue.d.ts.map +1 -0
  59. package/dist/components/StatusIcon.vue.d.ts +9 -0
  60. package/dist/components/StatusIcon.vue.d.ts.map +1 -0
  61. package/dist/components/SymbolsPane.vue.d.ts +96 -0
  62. package/dist/components/SymbolsPane.vue.d.ts.map +1 -0
  63. package/dist/components/Tooltip.vue.d.ts +40 -0
  64. package/dist/components/Tooltip.vue.d.ts.map +1 -0
  65. package/dist/components/VegaLiteChart.vue.d.ts +183 -0
  66. package/dist/components/VegaLiteChart.vue.d.ts.map +1 -0
  67. package/dist/components/chartControlsManager.d.ts +50 -0
  68. package/dist/components/chartControlsManager.d.ts.map +1 -0
  69. package/dist/components/chartHelpers.d.ts +51 -0
  70. package/dist/components/chartHelpers.d.ts.map +1 -0
  71. package/dist/components/chartOperationsManager.d.ts +10 -0
  72. package/dist/components/chartOperationsManager.d.ts.map +1 -0
  73. package/dist/components/chartRenderManager.d.ts +26 -0
  74. package/dist/components/chartRenderManager.d.ts.map +1 -0
  75. package/dist/components/community/AddStoreModal.vue.d.ts +35 -0
  76. package/dist/components/community/AddStoreModal.vue.d.ts.map +1 -0
  77. package/dist/components/community/CommunityModelCard.vue.d.ts +33 -0
  78. package/dist/components/community/CommunityModelCard.vue.d.ts.map +1 -0
  79. package/dist/components/community/CommunityModelHeader.vue.d.ts +22 -0
  80. package/dist/components/community/CommunityModelHeader.vue.d.ts.map +1 -0
  81. package/dist/components/community/CommunityModels.vue.d.ts +19 -0
  82. package/dist/components/community/CommunityModels.vue.d.ts.map +1 -0
  83. package/dist/components/community/CommunityRemote.vue.d.ts +33 -0
  84. package/dist/components/community/CommunityRemote.vue.d.ts.map +1 -0
  85. package/dist/components/connection/ConnectionDatabase.vue.d.ts +153 -0
  86. package/dist/components/connection/ConnectionDatabase.vue.d.ts.map +1 -0
  87. package/dist/components/connection/ConnectionHistory.vue.d.ts +13 -0
  88. package/dist/components/connection/ConnectionHistory.vue.d.ts.map +1 -0
  89. package/dist/components/connection/ConnectionSchema.vue.d.ts +35 -0
  90. package/dist/components/connection/ConnectionSchema.vue.d.ts.map +1 -0
  91. package/dist/components/connection/ConnectionTable.vue.d.ts +251 -0
  92. package/dist/components/connection/ConnectionTable.vue.d.ts.map +1 -0
  93. package/dist/components/connection/DatasourceTable.vue.d.ts +16 -0
  94. package/dist/components/connection/DatasourceTable.vue.d.ts.map +1 -0
  95. package/dist/components/dashboard/Dashboard.vue.d.ts +13 -0
  96. package/dist/components/dashboard/Dashboard.vue.d.ts.map +1 -0
  97. package/dist/components/dashboard/DashboardAddItemModal.vue.d.ts +13 -0
  98. package/dist/components/dashboard/DashboardAddItemModal.vue.d.ts.map +1 -0
  99. package/dist/components/dashboard/DashboardCTA.vue.d.ts +12 -0
  100. package/dist/components/dashboard/DashboardCTA.vue.d.ts.map +1 -0
  101. package/dist/components/dashboard/DashboardChart.vue.d.ts +427 -0
  102. package/dist/components/dashboard/DashboardChart.vue.d.ts.map +1 -0
  103. package/dist/components/dashboard/DashboardChartEditor.vue.d.ts +325 -0
  104. package/dist/components/dashboard/DashboardChartEditor.vue.d.ts.map +1 -0
  105. package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts +52 -0
  106. package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts.map +1 -0
  107. package/dist/components/dashboard/DashboardCreatorInline.vue.d.ts +36 -0
  108. package/dist/components/dashboard/DashboardCreatorInline.vue.d.ts.map +1 -0
  109. package/dist/components/dashboard/DashboardDataSelector.vue.d.ts +221 -0
  110. package/dist/components/dashboard/DashboardDataSelector.vue.d.ts.map +1 -0
  111. package/dist/components/dashboard/DashboardFilter.vue.d.ts +346 -0
  112. package/dist/components/dashboard/DashboardFilter.vue.d.ts.map +1 -0
  113. package/dist/components/dashboard/DashboardFilterAutocomplete.vue.d.ts +38 -0
  114. package/dist/components/dashboard/DashboardFilterAutocomplete.vue.d.ts.map +1 -0
  115. package/dist/components/dashboard/DashboardGridItem.vue.d.ts +31 -0
  116. package/dist/components/dashboard/DashboardGridItem.vue.d.ts.map +1 -0
  117. package/dist/components/dashboard/DashboardHeader.vue.d.ts +71 -0
  118. package/dist/components/dashboard/DashboardHeader.vue.d.ts.map +1 -0
  119. package/dist/components/dashboard/DashboardHeaderFilterInput.vue.d.ts +50 -0
  120. package/dist/components/dashboard/DashboardHeaderFilterInput.vue.d.ts.map +1 -0
  121. package/dist/components/dashboard/DashboardImportPopup.vue.d.ts +12 -0
  122. package/dist/components/dashboard/DashboardImportPopup.vue.d.ts.map +1 -0
  123. package/dist/components/dashboard/DashboardImportSelector.vue.d.ts +14 -0
  124. package/dist/components/dashboard/DashboardImportSelector.vue.d.ts.map +1 -0
  125. package/dist/components/dashboard/DashboardMarkdown.vue.d.ts +175 -0
  126. package/dist/components/dashboard/DashboardMarkdown.vue.d.ts.map +1 -0
  127. package/dist/components/dashboard/DashboardMarkdownEditor.vue.d.ts +325 -0
  128. package/dist/components/dashboard/DashboardMarkdownEditor.vue.d.ts.map +1 -0
  129. package/dist/components/dashboard/DashboardMobile.vue.d.ts +8 -0
  130. package/dist/components/dashboard/DashboardMobile.vue.d.ts.map +1 -0
  131. package/dist/components/dashboard/DashboardSharePopup.vue.d.ts +14 -0
  132. package/dist/components/dashboard/DashboardSharePopup.vue.d.ts.map +1 -0
  133. package/dist/components/dashboard/DashboardTable.vue.d.ts +332 -0
  134. package/dist/components/dashboard/DashboardTable.vue.d.ts.map +1 -0
  135. package/dist/components/dashboard/useDashboard.d.ts +96 -0
  136. package/dist/components/dashboard/useDashboard.d.ts.map +1 -0
  137. package/dist/components/editor/Editor.vue.d.ts +816 -0
  138. package/dist/components/editor/Editor.vue.d.ts.map +1 -0
  139. package/dist/components/editor/EditorCode.vue.d.ts +49 -0
  140. package/dist/components/editor/EditorCode.vue.d.ts.map +1 -0
  141. package/dist/components/editor/EditorCreatorIcon.vue.d.ts +61 -0
  142. package/dist/components/editor/EditorCreatorIcon.vue.d.ts.map +1 -0
  143. package/dist/components/editor/EditorCreatorInline.vue.d.ts +95 -0
  144. package/dist/components/editor/EditorCreatorInline.vue.d.ts.map +1 -0
  145. package/dist/components/editor/EditorHeader.vue.d.ts +185 -0
  146. package/dist/components/editor/EditorHeader.vue.d.ts.map +1 -0
  147. package/dist/components/editor/ResultComponent.vue.d.ts +1095 -0
  148. package/dist/components/editor/ResultComponent.vue.d.ts.map +1 -0
  149. package/dist/components/editor/Results.vue.d.ts +755 -0
  150. package/dist/components/editor/Results.vue.d.ts.map +1 -0
  151. package/dist/components/editor/editorHelpers.d.ts +45 -0
  152. package/dist/components/editor/editorHelpers.d.ts.map +1 -0
  153. package/dist/components/editor/events.d.ts +4 -0
  154. package/dist/components/editor/events.d.ts.map +1 -0
  155. package/dist/components/index.d.ts +2 -0
  156. package/dist/components/index.d.ts.map +1 -0
  157. package/dist/components/layout/MobileSidebarLayout.vue.d.ts +48 -0
  158. package/dist/components/layout/MobileSidebarLayout.vue.d.ts.map +1 -0
  159. package/dist/components/layout/SidebarLayout.vue.d.ts +20 -0
  160. package/dist/components/layout/SidebarLayout.vue.d.ts.map +1 -0
  161. package/dist/components/layout/TabDropdownItem.vue.d.ts +73 -0
  162. package/dist/components/layout/TabDropdownItem.vue.d.ts.map +1 -0
  163. package/dist/components/layout/TabbedBrowser.vue.d.ts +42 -0
  164. package/dist/components/layout/TabbedBrowser.vue.d.ts.map +1 -0
  165. package/dist/components/layout/TabbedLayout.vue.d.ts +5 -0
  166. package/dist/components/layout/TabbedLayout.vue.d.ts.map +1 -0
  167. package/dist/components/layout/VerticalSplitLayout.vue.d.ts +13 -0
  168. package/dist/components/layout/VerticalSplitLayout.vue.d.ts.map +1 -0
  169. package/dist/components/llm/ChatArtifact.vue.d.ts +470 -0
  170. package/dist/components/llm/ChatArtifact.vue.d.ts.map +1 -0
  171. package/dist/components/llm/ChatCreatorModal.vue.d.ts +87 -0
  172. package/dist/components/llm/ChatCreatorModal.vue.d.ts.map +1 -0
  173. package/dist/components/llm/LLMChat.vue.d.ts +260 -0
  174. package/dist/components/llm/LLMChat.vue.d.ts.map +1 -0
  175. package/dist/components/llm/LLMChatRefinement.vue.d.ts +135 -0
  176. package/dist/components/llm/LLMChatRefinement.vue.d.ts.map +1 -0
  177. package/dist/components/llm/LLMChatSplitView.vue.d.ts +2029 -0
  178. package/dist/components/llm/LLMChatSplitView.vue.d.ts.map +1 -0
  179. package/dist/components/llm/LLMValidationView.vue.d.ts +106 -0
  180. package/dist/components/llm/LLMValidationView.vue.d.ts.map +1 -0
  181. package/dist/components/llm/index.d.ts +6 -0
  182. package/dist/components/llm/index.d.ts.map +1 -0
  183. package/dist/components/model/ModelCard.vue.d.ts +1113 -0
  184. package/dist/components/model/ModelCard.vue.d.ts.map +1 -0
  185. package/dist/components/model/ModelConcept.vue.d.ts +14 -0
  186. package/dist/components/model/ModelConcept.vue.d.ts.map +1 -0
  187. package/dist/components/model/ModelCreator.vue.d.ts +241 -0
  188. package/dist/components/model/ModelCreator.vue.d.ts.map +1 -0
  189. package/dist/components/model/ModelSelector.vue.d.ts +9 -0
  190. package/dist/components/model/ModelSelector.vue.d.ts.map +1 -0
  191. package/dist/components/sidebar/CommunityModelListItem.vue.d.ts +26 -0
  192. package/dist/components/sidebar/CommunityModelListItem.vue.d.ts.map +1 -0
  193. package/dist/components/sidebar/ConnectionCreatorInline.vue.d.ts +68 -0
  194. package/dist/components/sidebar/ConnectionCreatorInline.vue.d.ts.map +1 -0
  195. package/dist/components/sidebar/ConnectionIcon.vue.d.ts +6 -0
  196. package/dist/components/sidebar/ConnectionIcon.vue.d.ts.map +1 -0
  197. package/dist/components/sidebar/ConnectionList.vue.d.ts +714 -0
  198. package/dist/components/sidebar/ConnectionList.vue.d.ts.map +1 -0
  199. package/dist/components/sidebar/ConnectionListItem.vue.d.ts +317 -0
  200. package/dist/components/sidebar/ConnectionListItem.vue.d.ts.map +1 -0
  201. package/dist/components/sidebar/ConnectionRefresh.vue.d.ts +15 -0
  202. package/dist/components/sidebar/ConnectionRefresh.vue.d.ts.map +1 -0
  203. package/dist/components/sidebar/ConnectionStatusIcon.vue.d.ts +11 -0
  204. package/dist/components/sidebar/ConnectionStatusIcon.vue.d.ts.map +1 -0
  205. package/dist/components/sidebar/CreateEditorFromDatasourcePopup.vue.d.ts +15 -0
  206. package/dist/components/sidebar/CreateEditorFromDatasourcePopup.vue.d.ts.map +1 -0
  207. package/dist/components/sidebar/DashboardList.vue.d.ts +684 -0
  208. package/dist/components/sidebar/DashboardList.vue.d.ts.map +1 -0
  209. package/dist/components/sidebar/DashboardListItem.vue.d.ts +343 -0
  210. package/dist/components/sidebar/DashboardListItem.vue.d.ts.map +1 -0
  211. package/dist/components/sidebar/DuckDBImporter.vue.d.ts +24 -0
  212. package/dist/components/sidebar/DuckDBImporter.vue.d.ts.map +1 -0
  213. package/dist/components/sidebar/EditorList.vue.d.ts +590 -0
  214. package/dist/components/sidebar/EditorList.vue.d.ts.map +1 -0
  215. package/dist/components/sidebar/EditorListItem.vue.d.ts +260 -0
  216. package/dist/components/sidebar/EditorListItem.vue.d.ts.map +1 -0
  217. package/dist/components/sidebar/GenericSidebarItem.vue.d.ts +91 -0
  218. package/dist/components/sidebar/GenericSidebarItem.vue.d.ts.map +1 -0
  219. package/dist/components/sidebar/LLMConnectionCreator.vue.d.ts +178 -0
  220. package/dist/components/sidebar/LLMConnectionCreator.vue.d.ts.map +1 -0
  221. package/dist/components/sidebar/LLMConnectionList.vue.d.ts +978 -0
  222. package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -0
  223. package/dist/components/sidebar/LLMConnectionListItem.vue.d.ts +404 -0
  224. package/dist/components/sidebar/LLMConnectionListItem.vue.d.ts.map +1 -0
  225. package/dist/components/sidebar/LLMProviderIcon.vue.d.ts +13 -0
  226. package/dist/components/sidebar/LLMProviderIcon.vue.d.ts.map +1 -0
  227. package/dist/components/sidebar/ModelSidebar.vue.d.ts +558 -0
  228. package/dist/components/sidebar/ModelSidebar.vue.d.ts.map +1 -0
  229. package/dist/components/sidebar/SidebarList.vue.d.ts +16 -0
  230. package/dist/components/sidebar/SidebarList.vue.d.ts.map +1 -0
  231. package/dist/components/sidebar/TutorialSidebar.vue.d.ts +134 -0
  232. package/dist/components/sidebar/TutorialSidebar.vue.d.ts.map +1 -0
  233. package/dist/components/tutorial/TutorialFunction.vue.d.ts +38 -0
  234. package/dist/components/tutorial/TutorialFunction.vue.d.ts.map +1 -0
  235. package/dist/components/tutorial/TutorialPrompt.vue.d.ts +2002 -0
  236. package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -0
  237. package/dist/components/user/UserProfile.vue.d.ts +11 -0
  238. package/dist/components/user/UserProfile.vue.d.ts.map +1 -0
  239. package/dist/components/user/UserSettings.vue.d.ts +129 -0
  240. package/dist/components/user/UserSettings.vue.d.ts.map +1 -0
  241. package/dist/composables/ResizeHandles.vue.d.ts +6 -0
  242. package/dist/composables/ResizeHandles.vue.d.ts.map +1 -0
  243. package/dist/composables/useChatWithTools.d.ts +62 -0
  244. package/dist/composables/useChatWithTools.d.ts.map +1 -0
  245. package/dist/composables/useResizableDialog.d.ts +30 -0
  246. package/dist/composables/useResizableDialog.d.ts.map +1 -0
  247. package/dist/composables/useTrilogyChat.d.ts +61 -0
  248. package/dist/composables/useTrilogyChat.d.ts.map +1 -0
  249. package/dist/composables/useTrilogyCore.d.ts +51 -0
  250. package/dist/composables/useTrilogyCore.d.ts.map +1 -0
  251. package/dist/connections/base.d.ts +86 -0
  252. package/dist/connections/base.d.ts.map +1 -0
  253. package/dist/connections/bigquery_oauth.d.ts +35 -0
  254. package/dist/connections/bigquery_oauth.d.ts.map +1 -0
  255. package/dist/connections/bigquery_sa.d.ts +2 -0
  256. package/dist/connections/bigquery_sa.d.ts.map +1 -0
  257. package/dist/connections/constants.d.ts +2 -0
  258. package/dist/connections/constants.d.ts.map +1 -0
  259. package/dist/connections/duckdb.d.ts +43 -0
  260. package/dist/connections/duckdb.d.ts.map +1 -0
  261. package/dist/connections/helpers.d.ts +30 -0
  262. package/dist/connections/helpers.d.ts.map +1 -0
  263. package/dist/connections/index.d.ts +7 -0
  264. package/dist/connections/index.d.ts.map +1 -0
  265. package/dist/connections/motherduck.d.ts +19 -0
  266. package/dist/connections/motherduck.d.ts.map +1 -0
  267. package/dist/connections/snowflake.d.ts +94 -0
  268. package/dist/connections/snowflake.d.ts.map +1 -0
  269. package/dist/connections/sql_server.d.ts +2 -0
  270. package/dist/connections/sql_server.d.ts.map +1 -0
  271. package/dist/cpp-CqOUEpxN.js +395 -0
  272. package/dist/csharp-DVLiBOZb.js +332 -0
  273. package/dist/csp-DVFp9bw5.js +59 -0
  274. package/dist/css-DwARn2R6.js +193 -0
  275. package/dist/cssMode-Cr0iq_nL.js +1577 -0
  276. package/dist/cypher-uY0Mffat.js +269 -0
  277. package/dist/dart-D27H-mX_.js +287 -0
  278. package/dist/dashboards/barChartSpec.d.ts +28 -0
  279. package/dist/dashboards/barChartSpec.d.ts.map +1 -0
  280. package/dist/dashboards/barHChartSpec.d.ts +28 -0
  281. package/dist/dashboards/barHChartSpec.d.ts.map +1 -0
  282. package/dist/dashboards/base.d.ts +176 -0
  283. package/dist/dashboards/base.d.ts.map +1 -0
  284. package/dist/dashboards/beeSwarmSpec.d.ts +150 -0
  285. package/dist/dashboards/beeSwarmSpec.d.ts.map +1 -0
  286. package/dist/dashboards/conditions.d.ts +8 -0
  287. package/dist/dashboards/conditions.d.ts.map +1 -0
  288. package/dist/dashboards/conditionsParameters.d.ts +11 -0
  289. package/dist/dashboards/conditionsParameters.d.ts.map +1 -0
  290. package/dist/dashboards/constants.d.ts +22 -0
  291. package/dist/dashboards/constants.d.ts.map +1 -0
  292. package/dist/dashboards/countryLookup.d.ts +15 -0
  293. package/dist/dashboards/countryLookup.d.ts.map +1 -0
  294. package/dist/dashboards/d3utility.d.ts +7 -0
  295. package/dist/dashboards/d3utility.d.ts.map +1 -0
  296. package/dist/dashboards/dashboardQueryExecutor.d.ts +142 -0
  297. package/dist/dashboards/dashboardQueryExecutor.d.ts.map +1 -0
  298. package/dist/dashboards/donutSpec.d.ts +74 -0
  299. package/dist/dashboards/donutSpec.d.ts.map +1 -0
  300. package/dist/dashboards/formatting.d.ts +11 -0
  301. package/dist/dashboards/formatting.d.ts.map +1 -0
  302. package/dist/dashboards/headlineSpec.d.ts +23 -0
  303. package/dist/dashboards/headlineSpec.d.ts.map +1 -0
  304. package/dist/dashboards/heatmapSpec.d.ts +30 -0
  305. package/dist/dashboards/heatmapSpec.d.ts.map +1 -0
  306. package/dist/dashboards/helpers.d.ts +73 -0
  307. package/dist/dashboards/helpers.d.ts.map +1 -0
  308. package/dist/dashboards/index.d.ts +3 -0
  309. package/dist/dashboards/index.d.ts.map +1 -0
  310. package/dist/dashboards/lineAreaSpec.d.ts +177 -0
  311. package/dist/dashboards/lineAreaSpec.d.ts.map +1 -0
  312. package/dist/dashboards/mapSpec.d.ts +431 -0
  313. package/dist/dashboards/mapSpec.d.ts.map +1 -0
  314. package/dist/dashboards/pointSpec.d.ts +27 -0
  315. package/dist/dashboards/pointSpec.d.ts.map +1 -0
  316. package/dist/dashboards/prompts.d.ts +31 -0
  317. package/dist/dashboards/prompts.d.ts.map +1 -0
  318. package/dist/dashboards/spec.d.ts +19 -0
  319. package/dist/dashboards/spec.d.ts.map +1 -0
  320. package/dist/dashboards/treeSpec.d.ts +3 -0
  321. package/dist/dashboards/treeSpec.d.ts.map +1 -0
  322. package/dist/dashboards/types.d.ts +70 -0
  323. package/dist/dashboards/types.d.ts.map +1 -0
  324. package/dist/data/connectionHistoryStorage.d.ts +25 -0
  325. package/dist/data/connectionHistoryStorage.d.ts.map +1 -0
  326. package/dist/data/constants.d.ts +4 -0
  327. package/dist/data/constants.d.ts.map +1 -0
  328. package/dist/data/credentialHelpers.d.ts +30 -0
  329. package/dist/data/credentialHelpers.d.ts.map +1 -0
  330. package/dist/data/credentialService.d.ts +80 -0
  331. package/dist/data/credentialService.d.ts.map +1 -0
  332. package/dist/data/githubStorage.d.ts +54 -0
  333. package/dist/data/githubStorage.d.ts.map +1 -0
  334. package/dist/data/index.d.ts +3 -0
  335. package/dist/data/index.d.ts.map +1 -0
  336. package/dist/data/localStorage.d.ts +48 -0
  337. package/dist/data/localStorage.d.ts.map +1 -0
  338. package/dist/data/storage.d.ts +33 -0
  339. package/dist/data/storage.d.ts.map +1 -0
  340. package/dist/data/tips.d.ts +12 -0
  341. package/dist/data/tips.d.ts.map +1 -0
  342. package/dist/data/tutorial/builtinFunctions.d.ts +3 -0
  343. package/dist/data/tutorial/builtinFunctions.d.ts.map +1 -0
  344. package/dist/data/tutorial/dashboardTutorial.d.ts +3 -0
  345. package/dist/data/tutorial/dashboardTutorial.d.ts.map +1 -0
  346. package/dist/data/tutorial/demoSetup.d.ts +6 -0
  347. package/dist/data/tutorial/demoSetup.d.ts.map +1 -0
  348. package/dist/data/tutorial/docTypes.d.ts +37 -0
  349. package/dist/data/tutorial/docTypes.d.ts.map +1 -0
  350. package/dist/data/tutorial/documentation.d.ts +3 -0
  351. package/dist/data/tutorial/documentation.d.ts.map +1 -0
  352. package/dist/data/tutorial/functionsReference.d.ts +3 -0
  353. package/dist/data/tutorial/functionsReference.d.ts.map +1 -0
  354. package/dist/data/tutorial/introTutorial.d.ts +3 -0
  355. package/dist/data/tutorial/introTutorial.d.ts.map +1 -0
  356. package/dist/data/tutorial/llmTutorial.d.ts +3 -0
  357. package/dist/data/tutorial/llmTutorial.d.ts.map +1 -0
  358. package/dist/data/tutorial/modelReference.d.ts +3 -0
  359. package/dist/data/tutorial/modelReference.d.ts.map +1 -0
  360. package/dist/data/tutorial/modelTutorial.d.ts +3 -0
  361. package/dist/data/tutorial/modelTutorial.d.ts.map +1 -0
  362. package/dist/data/tutorial/reference.d.ts +3 -0
  363. package/dist/data/tutorial/reference.d.ts.map +1 -0
  364. package/dist/data/tutorial/terms_of_service.d.ts +3 -0
  365. package/dist/data/tutorial/terms_of_service.d.ts.map +1 -0
  366. package/dist/data/tutorial/windowFunctionsReference.d.ts +3 -0
  367. package/dist/data/tutorial/windowFunctionsReference.d.ts.map +1 -0
  368. package/dist/dockerfile-CmV85WZK.js +136 -0
  369. package/dist/ecl--fKn7yzB.js +462 -0
  370. package/dist/editors/editor.d.ts +82 -0
  371. package/dist/editors/editor.d.ts.map +1 -0
  372. package/dist/editors/helpers.d.ts +12 -0
  373. package/dist/editors/helpers.d.ts.map +1 -0
  374. package/dist/editors/index.d.ts +3 -0
  375. package/dist/editors/index.d.ts.map +1 -0
  376. package/dist/editors/results.d.ts +61 -0
  377. package/dist/editors/results.d.ts.map +1 -0
  378. package/dist/elixir-DUhH17ON.js +575 -0
  379. package/dist/events/display.d.ts +9 -0
  380. package/dist/events/display.d.ts.map +1 -0
  381. package/dist/flow9-B3Dx2LLe.js +148 -0
  382. package/dist/freemarker2-de_cA50e.js +995 -0
  383. package/dist/fsharp-SyqBfUAR.js +223 -0
  384. package/dist/go-BbMR2tdT.js +224 -0
  385. package/dist/graphql-DDJE6tIl.js +157 -0
  386. package/dist/handlebars-C8f44E5O.js +425 -0
  387. package/dist/hcl-YBvpaUqf.js +189 -0
  388. package/dist/html-qaggIh0W.js +314 -0
  389. package/dist/html2canvas.esm-dgT_1dIT.js +4871 -0
  390. package/dist/htmlMode-xYurYOLw.js +1587 -0
  391. package/dist/ini-Ct73dBtM.js +77 -0
  392. package/dist/java-C_jlkwoG.js +238 -0
  393. package/dist/javascript-DeLkSgQX.js +76 -0
  394. package/dist/jsonMode-BM-L8w8F.js +2002 -0
  395. package/dist/julia-D8WE5U1e.js +517 -0
  396. package/dist/kotlin-Zy9aq5yB.js +259 -0
  397. package/dist/language/constants.d.ts +6 -0
  398. package/dist/language/constants.d.ts.map +1 -0
  399. package/dist/language/index.d.ts +2 -0
  400. package/dist/language/index.d.ts.map +1 -0
  401. package/dist/less-sZ0iHtE8.js +168 -0
  402. package/dist/lexon-CsdNL29A.js +163 -0
  403. package/dist/liquid-DLNUrc5y.js +246 -0
  404. package/dist/llm/anthropic.d.ts +13 -0
  405. package/dist/llm/anthropic.d.ts.map +1 -0
  406. package/dist/llm/base.d.ts +63 -0
  407. package/dist/llm/base.d.ts.map +1 -0
  408. package/dist/llm/chatAgentPrompt.d.ts +166 -0
  409. package/dist/llm/chatAgentPrompt.d.ts.map +1 -0
  410. package/dist/llm/chatHelpers.d.ts +23 -0
  411. package/dist/llm/chatHelpers.d.ts.map +1 -0
  412. package/dist/llm/chatToolExecutor.d.ts +39 -0
  413. package/dist/llm/chatToolExecutor.d.ts.map +1 -0
  414. package/dist/llm/consts.d.ts +3 -0
  415. package/dist/llm/consts.d.ts.map +1 -0
  416. package/dist/llm/data/constants.d.ts +5 -0
  417. package/dist/llm/data/constants.d.ts.map +1 -0
  418. package/dist/llm/data/models.d.ts +8 -0
  419. package/dist/llm/data/models.d.ts.map +1 -0
  420. package/dist/llm/data/prompts.d.ts +7 -0
  421. package/dist/llm/data/prompts.d.ts.map +1 -0
  422. package/dist/llm/data/testCases.d.ts +13 -0
  423. package/dist/llm/data/testCases.d.ts.map +1 -0
  424. package/dist/llm/googlev2.d.ts +15 -0
  425. package/dist/llm/googlev2.d.ts.map +1 -0
  426. package/dist/llm/index.d.ts +11 -0
  427. package/dist/llm/index.d.ts.map +1 -0
  428. package/dist/llm/mistral.d.ts +11 -0
  429. package/dist/llm/mistral.d.ts.map +1 -0
  430. package/dist/llm/models.d.ts +8 -0
  431. package/dist/llm/models.d.ts.map +1 -0
  432. package/dist/llm/openAI.d.ts +13 -0
  433. package/dist/llm/openAI.d.ts.map +1 -0
  434. package/dist/llm/utils.d.ts +50 -0
  435. package/dist/llm/utils.d.ts.map +1 -0
  436. package/dist/lua-C2YJo0zw.js +168 -0
  437. package/dist/m3-CPLP40SG.js +216 -0
  438. package/dist/main-oVvKtGNk.js +203688 -0
  439. package/dist/main.css +1 -0
  440. package/dist/main.d.ts +23 -0
  441. package/dist/main.d.ts.map +1 -0
  442. package/dist/main.js +22 -0
  443. package/dist/main.umd.cjs +2885 -0
  444. package/dist/markdown-B1mf5e0R.js +235 -0
  445. package/dist/mdx-BmG1effK.js +171 -0
  446. package/dist/mips-DA33BZX1.js +204 -0
  447. package/dist/models/helpers.d.ts +59 -0
  448. package/dist/models/helpers.d.ts.map +1 -0
  449. package/dist/models/import.d.ts +18 -0
  450. package/dist/models/import.d.ts.map +1 -0
  451. package/dist/models/index.d.ts +3 -0
  452. package/dist/models/index.d.ts.map +1 -0
  453. package/dist/models/model.d.ts +241 -0
  454. package/dist/models/model.d.ts.map +1 -0
  455. package/dist/monaco/editorHelpers.d.ts +32 -0
  456. package/dist/monaco/editorHelpers.d.ts.map +1 -0
  457. package/dist/monaco/index.d.ts +2 -0
  458. package/dist/monaco/index.d.ts.map +1 -0
  459. package/dist/monaco/setup.d.ts +2 -0
  460. package/dist/monaco/setup.d.ts.map +1 -0
  461. package/dist/msdax-CCYFIQsP.js +381 -0
  462. package/dist/mysql-hjmIjL-D.js +884 -0
  463. package/dist/objective-c-RRCpEmqC.js +189 -0
  464. package/dist/pascal-CeV8XfxB.js +257 -0
  465. package/dist/pascaligo-IEEGVJAJ.js +170 -0
  466. package/dist/perl-B5-QbHq_.js +632 -0
  467. package/dist/pgsql-s6kqEJmi.js +857 -0
  468. package/dist/php-CWWqzOo8.js +506 -0
  469. package/dist/pla-FSvb_YP_.js +143 -0
  470. package/dist/postiats-DQdscQXO.js +913 -0
  471. package/dist/powerquery-CtA5JA1I.js +896 -0
  472. package/dist/powershell-DglEq96N.js +245 -0
  473. package/dist/prism-sql-8Y2-THrf.js +33 -0
  474. package/dist/protobuf-BSepub3e.js +426 -0
  475. package/dist/pug-B1847F4G.js +408 -0
  476. package/dist/python-BLXKu9hO.js +307 -0
  477. package/dist/qsharp-D4i0Nqg9.js +307 -0
  478. package/dist/r-cdRigKxa.js +249 -0
  479. package/dist/razor-DSEd6veI.js +556 -0
  480. package/dist/redis-D9MFxvE8.js +308 -0
  481. package/dist/redshift-CmCnsvL-.js +815 -0
  482. package/dist/remotes/constants.d.ts +2 -0
  483. package/dist/remotes/constants.d.ts.map +1 -0
  484. package/dist/remotes/displayHelpers.d.ts +67 -0
  485. package/dist/remotes/displayHelpers.d.ts.map +1 -0
  486. package/dist/remotes/modelApiService.d.ts +38 -0
  487. package/dist/remotes/modelApiService.d.ts.map +1 -0
  488. package/dist/remotes/models.d.ts +48 -0
  489. package/dist/remotes/models.d.ts.map +1 -0
  490. package/dist/remotes/storeService.d.ts +42 -0
  491. package/dist/remotes/storeService.d.ts.map +1 -0
  492. package/dist/restructuredtext-CWy8J51t.js +180 -0
  493. package/dist/ruby-WP-c36m5.js +517 -0
  494. package/dist/rust-Q9FLdYpu.js +349 -0
  495. package/dist/sb-C54-JBGT.js +121 -0
  496. package/dist/scala-CzbFImc5.js +376 -0
  497. package/dist/scheme-BhfDmYN3.js +114 -0
  498. package/dist/scss-CEmiBXpS.js +268 -0
  499. package/dist/shell-Bmc1VhG0.js +227 -0
  500. package/dist/solidity-C9Q2I8Hh.js +1373 -0
  501. package/dist/sophia-jWa1UyKz.js +205 -0
  502. package/dist/sparql-CM7jctbc.js +207 -0
  503. package/dist/sql-WzihTkbg.js +859 -0
  504. package/dist/st-6y7_3aup.js +422 -0
  505. package/dist/stores/CredentialManager.vue.d.ts +50 -0
  506. package/dist/stores/CredentialManager.vue.d.ts.map +1 -0
  507. package/dist/stores/Manager.vue.d.ts +100 -0
  508. package/dist/stores/Manager.vue.d.ts.map +1 -0
  509. package/dist/stores/analyticsStore.d.ts +42 -0
  510. package/dist/stores/analyticsStore.d.ts.map +1 -0
  511. package/dist/stores/chatStore.d.ts +153 -0
  512. package/dist/stores/chatStore.d.ts.map +1 -0
  513. package/dist/stores/communityApiStore.d.ts +206 -0
  514. package/dist/stores/communityApiStore.d.ts.map +1 -0
  515. package/dist/stores/connectionHistoryStore.d.ts +24 -0
  516. package/dist/stores/connectionHistoryStore.d.ts.map +1 -0
  517. package/dist/stores/connectionStore.d.ts +31 -0
  518. package/dist/stores/connectionStore.d.ts.map +1 -0
  519. package/dist/stores/dashboardStore.d.ts +122 -0
  520. package/dist/stores/dashboardStore.d.ts.map +1 -0
  521. package/dist/stores/editorStore.d.ts +44 -0
  522. package/dist/stores/editorStore.d.ts.map +1 -0
  523. package/dist/stores/index.d.ts +14 -0
  524. package/dist/stores/index.d.ts.map +1 -0
  525. package/dist/stores/llmStore.d.ts +90 -0
  526. package/dist/stores/llmStore.d.ts.map +1 -0
  527. package/dist/stores/modelStore.d.ts +29 -0
  528. package/dist/stores/modelStore.d.ts.map +1 -0
  529. package/dist/stores/queryExecutionService.d.ts +60 -0
  530. package/dist/stores/queryExecutionService.d.ts.map +1 -0
  531. package/dist/stores/resolver.d.ts +91 -0
  532. package/dist/stores/resolver.d.ts.map +1 -0
  533. package/dist/stores/urlStore.d.ts +6 -0
  534. package/dist/stores/urlStore.d.ts.map +1 -0
  535. package/dist/stores/useScreenNavigation.d.ts +53 -0
  536. package/dist/stores/useScreenNavigation.d.ts.map +1 -0
  537. package/dist/stores/userSettingsStore.d.ts +133 -0
  538. package/dist/stores/userSettingsStore.d.ts.map +1 -0
  539. package/dist/swift-k-0zxG_D.js +318 -0
  540. package/dist/systemverilog-Pnr5_rIP.js +582 -0
  541. package/dist/tcl-fNPXval8.js +238 -0
  542. package/dist/tsMode-CdypNzs1.js +895 -0
  543. package/dist/twig-L2MkztkV.js +398 -0
  544. package/dist/typescript-DZ5G39rT.js +349 -0
  545. package/dist/typespec-Cqqo-3Pt.js +123 -0
  546. package/dist/useDashboard-CPI83oAm.js +3352 -0
  547. package/dist/utility/debounce.d.ts +12 -0
  548. package/dist/utility/debounce.d.ts.map +1 -0
  549. package/dist/utility/markdownRenderer.d.ts +34 -0
  550. package/dist/utility/markdownRenderer.d.ts.map +1 -0
  551. package/dist/utility/testHelpers.d.ts +2 -0
  552. package/dist/utility/testHelpers.d.ts.map +1 -0
  553. package/dist/vb-B5YC2xN9.js +378 -0
  554. package/dist/views/ConnectionView.vue.d.ts +522 -0
  555. package/dist/views/ConnectionView.vue.d.ts.map +1 -0
  556. package/dist/views/CredentialBackgroundPage.vue.d.ts +3 -0
  557. package/dist/views/CredentialBackgroundPage.vue.d.ts.map +1 -0
  558. package/dist/views/IDEPlaceholder.vue.d.ts +3 -0
  559. package/dist/views/IDEPlaceholder.vue.d.ts.map +1 -0
  560. package/dist/views/LLMView.vue.d.ts +7758 -0
  561. package/dist/views/LLMView.vue.d.ts.map +1 -0
  562. package/dist/views/MobileIDEPlaceholder.vue.d.ts +3 -0
  563. package/dist/views/MobileIDEPlaceholder.vue.d.ts.map +1 -0
  564. package/dist/views/ModelView.vue.d.ts +2170 -0
  565. package/dist/views/ModelView.vue.d.ts.map +1 -0
  566. package/dist/views/ResponsiveIDE.vue.d.ts +3 -0
  567. package/dist/views/ResponsiveIDE.vue.d.ts.map +1 -0
  568. package/dist/views/TutorialPage.vue.d.ts +7835 -0
  569. package/dist/views/TutorialPage.vue.d.ts.map +1 -0
  570. package/dist/views/WelcomePage.vue.d.ts +13 -0
  571. package/dist/views/WelcomePage.vue.d.ts.map +1 -0
  572. package/dist/views/index.d.ts +3 -0
  573. package/dist/views/index.d.ts.map +1 -0
  574. package/dist/vite.config.d.ts +3 -0
  575. package/dist/vite.config.d.ts.map +1 -0
  576. package/dist/vitest.config.d.ts +3 -0
  577. package/dist/vitest.config.d.ts.map +1 -0
  578. package/dist/wgsl-B-_uRex7.js +445 -0
  579. package/dist/xml-DsUsyRQY.js +101 -0
  580. package/dist/yaml-BpA1BNpS.js +212 -0
  581. package/package.json +55 -0
@@ -0,0 +1,1841 @@
1
+ import { inject as A, ref as g, onMounted as x, computed as G, resolveComponent as D, createBlock as L, openBlock as r, withCtx as k, createElementBlock as y, Fragment as V, renderList as J, createElementVNode as o, createCommentVNode as S, createVNode as N, normalizeClass as U, toDisplayString as K, createTextVNode as H, defineComponent as X, withDirectives as T, vModelText as P, unref as ie, vModelSelect as te, withModifiers as B, watch as le, normalizeStyle as de, vShow as W } from "vue";
2
+ import { S as Y, e as Z, g as q, K as E, a as F, T as Q, L as oe, f as re, u as ne, t as ce, D as ue, h as se, i as ae, j as me, d as ve, k as pe } from "./main-oVvKtGNk.js";
3
+ import { d as ee, a as be, L as ye, C as he } from "./LLMConnectionList-DVM5t-P2.js";
4
+ import { D as fe } from "./DashboardCreatorInline-Do-CDJgS.js";
5
+ const ge = {
6
+ name: "DocumentationSidebar",
7
+ props: {
8
+ activeDocumentationKey: {
9
+ type: String,
10
+ default: "",
11
+ optional: !0
12
+ }
13
+ },
14
+ setup(e) {
15
+ if (!A("editorStore"))
16
+ throw new Error("Editor store is not provided!");
17
+ const s = q("documentationKey") || "", n = g({});
18
+ return x(() => {
19
+ const c = s.split(E)[1];
20
+ let u = `documentation${E}${c}`;
21
+ ee.forEach((a) => {
22
+ const m = `documentation${E}${a.title}`;
23
+ n.value[m] = !u.startsWith(m);
24
+ });
25
+ }), {
26
+ documentationNodes: G(() => {
27
+ const p = [];
28
+ return ee.forEach((c) => {
29
+ const u = `documentation${E}${c.title}`;
30
+ p.push({
31
+ id: u,
32
+ name: c.title,
33
+ indent: 0,
34
+ count: c.articles.length,
35
+ type: "documentation"
36
+ }), n.value[u] || c.articles.forEach((a) => {
37
+ p.push({
38
+ id: `article${E}${c.title}${E}${a.title}`,
39
+ name: a.displayName || a.title,
40
+ indent: 1,
41
+ count: a.paragraphs.length,
42
+ type: "article"
43
+ });
44
+ });
45
+ }), p;
46
+ }),
47
+ toggleCollapse: (p) => {
48
+ n.value[p] = !n.value[p];
49
+ },
50
+ collapsed: n,
51
+ isActiveNode: (p) => p === e.activeDocumentationKey
52
+ };
53
+ },
54
+ methods: {
55
+ handleClick(e) {
56
+ this.$emit("documentation-key-selected", e);
57
+ }
58
+ },
59
+ components: {
60
+ SidebarList: Z,
61
+ SidebarItem: Y
62
+ }
63
+ };
64
+ function Se(e, t, s, n, v, b) {
65
+ const d = D("sidebar-item"), p = D("sidebar-list");
66
+ return r(), L(p, { title: "Documentation" }, {
67
+ actions: k(() => [...t[0] || (t[0] = [])]),
68
+ default: k(() => [
69
+ (r(!0), y(V, null, J(n.documentationNodes, (c) => (r(), L(d, {
70
+ key: c.id,
71
+ "item-id": c.id,
72
+ name: c.name,
73
+ indent: c.indent,
74
+ "is-selected": n.isActiveNode(c.id),
75
+ "is-collapsible": c.type === "documentation",
76
+ "is-collapsed": n.collapsed[c.id],
77
+ icon: c.type === "article" ? "mdi-text-box-outline" : "",
78
+ "extra-info": c.type === "documentation" ? c.count : "",
79
+ itemType: "documentation",
80
+ onClick: b.handleClick,
81
+ onToggle: n.toggleCollapse
82
+ }, null, 8, ["item-id", "name", "indent", "is-selected", "is-collapsible", "is-collapsed", "icon", "extra-info", "onClick", "onToggle"]))), 128))
83
+ ]),
84
+ _: 1
85
+ });
86
+ }
87
+ const ke = /* @__PURE__ */ F(ge, [["render", Se], ["__scopeId", "data-v-7d844a72"]]), Ce = {
88
+ name: "ModelList",
89
+ props: {
90
+ activeModelKey: String,
91
+ testTag: {
92
+ type: String,
93
+ default: ""
94
+ }
95
+ },
96
+ setup() {
97
+ const e = A("modelStore"), t = A("saveModels"), s = A("editorStore"), n = A("trilogyResolver"), v = ne(), b = g(!1), d = v.activeModelKey.value || q("model") || "", p = d.split(E)[0];
98
+ let c = "", u = "", a = d.split(E);
99
+ if (p === "model" ? c = a[1] : (p === "source" || p === "datasource" || p === "concept") && (c = a[1], u = a[2]), !e || !t || !s || !n)
100
+ throw new Error("Model store is not provided!");
101
+ let m = {};
102
+ Object.values(e.models).forEach((l) => {
103
+ let $ = ["model", l.name].join(E);
104
+ l.name !== c && (m[$] = !0), l.sources.forEach((w) => {
105
+ let _ = ["source", l.name, w.alias].join(E);
106
+ (l.name !== c || w.alias !== u) && (m[_] = !0), w.datasources.forEach((R) => {
107
+ let I = ["datasource", l.name, w.alias, R.name].join(E);
108
+ m[I] = !0;
109
+ });
110
+ });
111
+ });
112
+ const f = g(m), j = G(() => {
113
+ const l = [];
114
+ return Object.values(e.models).sort((w, _) => w.name.localeCompare(_.name)).forEach((w) => {
115
+ if (w.deleted) return;
116
+ let _ = ["model", w.name].join(E);
117
+ l.push({
118
+ id: _,
119
+ name: w.name,
120
+ indent: 0,
121
+ count: w.sources.length,
122
+ type: "model",
123
+ concept: null
124
+ }), f.value[_] || w.sources.forEach((R) => {
125
+ let I = ["source", w.name, R.alias].join(E);
126
+ l.push({
127
+ id: I,
128
+ name: R.alias,
129
+ indent: 1,
130
+ count: R.concepts.length,
131
+ type: "source",
132
+ concept: null
133
+ }), f.value[I] || (R.concepts.forEach((i) => {
134
+ l.push({
135
+ id: ["concept", w.name, R.alias, i.namespace, i.name].join(
136
+ E
137
+ ),
138
+ name: i.namespace === "local" ? i.name : i.namespace + "." + i.name,
139
+ indent: 2,
140
+ count: 0,
141
+ type: "concept",
142
+ concept: i
143
+ });
144
+ }), R.datasources.forEach((i) => {
145
+ let C = ["datasource", w.name, R.alias, i.name].join(E);
146
+ l.push({
147
+ id: C,
148
+ name: i.name,
149
+ indent: 2,
150
+ count: i.concepts.length,
151
+ type: "datasource",
152
+ concept: null
153
+ }), f.value[C] || i.concepts.forEach((z) => {
154
+ l.push({
155
+ id: [
156
+ "concept",
157
+ w.name,
158
+ R.alias,
159
+ i.name,
160
+ z.namespace,
161
+ z.name
162
+ ].join(E),
163
+ name: z.namespace === "local" ? z.name : z.namespace + "." + z.name,
164
+ indent: 3,
165
+ count: 0,
166
+ type: "concept",
167
+ concept: z
168
+ });
169
+ });
170
+ }));
171
+ });
172
+ }), l;
173
+ });
174
+ return {
175
+ creatorVisible: b,
176
+ flatList: j,
177
+ collapsed: f,
178
+ saveModels: t,
179
+ fetchParseResults: (l) => n.resolveModel(
180
+ l,
181
+ e.models[l].sources.map(($) => ({
182
+ alias: $.alias,
183
+ contents: (s.editors[$.editor] || { contents: "" }).contents
184
+ }))
185
+ ).then(($) => {
186
+ e.setModelConfigParseResults(l, $);
187
+ }).catch(($) => {
188
+ e.setModelParseError(l, $.message), console.error("Failed to fetch parse results:", $);
189
+ }),
190
+ trilogyIcon: ce,
191
+ navigationStore: v,
192
+ handleClick: (l) => {
193
+ const $ = l.lastIndexOf(E), w = $ !== -1 ? l.substring($ + 1) : l;
194
+ v.openTab("models", w, l);
195
+ },
196
+ handleToggle: (l) => {
197
+ f.value[l] = !f.value[l];
198
+ },
199
+ modelStore: e
200
+ };
201
+ },
202
+ components: {
203
+ SidebarList: Z,
204
+ SidebarItem: Y,
205
+ ModelCreator: re,
206
+ LoadingButton: oe,
207
+ Tooltip: Q
208
+ }
209
+ }, De = { class: "button-container" }, we = ["data-testid"], Me = ["src"], $e = {
210
+ key: 2,
211
+ class: "mdi mdi-table node-icon"
212
+ }, Ie = { class: "right-container hover-icon" }, Te = ["onClick"];
213
+ function Ke(e, t, s, n, v, b) {
214
+ const d = D("loading-button"), p = D("model-creator"), c = D("tooltip"), u = D("sidebar-item"), a = D("sidebar-list");
215
+ return r(), L(a, { title: "Models" }, {
216
+ actions: k(() => [
217
+ o("div", De, [
218
+ o("button", {
219
+ onClick: t[0] || (t[0] = (m) => n.creatorVisible = !n.creatorVisible),
220
+ "data-testid": s.testTag ? `model-creator-add-${s.testTag}` : "model-creator-add"
221
+ }, K(n.creatorVisible ? "Hide" : "New"), 9, we),
222
+ N(d, {
223
+ action: n.saveModels,
224
+ "key-combination": ["control", "s"]
225
+ }, {
226
+ default: k(() => [...t[2] || (t[2] = [
227
+ H(" Save ", -1)
228
+ ])]),
229
+ _: 1
230
+ }, 8, ["action"])
231
+ ]),
232
+ N(p, {
233
+ visible: n.creatorVisible,
234
+ onClose: t[1] || (t[1] = (m) => n.creatorVisible = !n.creatorVisible)
235
+ }, null, 8, ["visible"])
236
+ ]),
237
+ default: k(() => [
238
+ (r(!0), y(V, null, J(n.flatList, (m) => (r(), L(u, {
239
+ key: m.id,
240
+ "item-id": m.id,
241
+ name: m.name,
242
+ indent: m.indent,
243
+ "is-selected": s.activeModelKey === m.id,
244
+ "is-collapsible": ["model"].includes(m.type) || ["source", "datasource"].includes(m.type) && m.count > 0,
245
+ "is-collapsed": n.collapsed[m.id],
246
+ onClick: n.handleClick,
247
+ onToggle: n.handleToggle
248
+ }, {
249
+ icon: k(() => [
250
+ m.type === "source" ? (r(), y("img", {
251
+ key: 0,
252
+ src: n.trilogyIcon,
253
+ class: "trilogy-icon"
254
+ }, null, 8, Me)) : m.type === "concept" ? (r(), y("span", {
255
+ key: 1,
256
+ class: U(`purpose-${m.concept.purpose.toLowerCase()}`)
257
+ }, K(m.concept.purpose.charAt(0).toUpperCase()), 3)) : m.type === "datasource" ? (r(), y("i", $e)) : S("", !0)
258
+ ]),
259
+ "extra-content": k(() => [
260
+ o("span", Ie, [
261
+ m.type === "model" ? (r(), L(c, {
262
+ key: 0,
263
+ content: "Refresh Model",
264
+ position: "left"
265
+ }, {
266
+ default: k(() => [
267
+ N(d, {
268
+ action: () => n.fetchParseResults(m.name)
269
+ }, {
270
+ default: k(() => [...t[3] || (t[3] = [
271
+ o("i", { class: "mdi mdi-cog-refresh-outline" }, null, -1)
272
+ ])]),
273
+ _: 1
274
+ }, 8, ["action"])
275
+ ]),
276
+ _: 2
277
+ }, 1024)) : S("", !0),
278
+ m.type === "model" ? (r(), L(c, {
279
+ key: 1,
280
+ content: "Delete Model",
281
+ position: "left"
282
+ }, {
283
+ default: k(() => [
284
+ o("i", {
285
+ class: "mdi mdi-delete-outline",
286
+ onClick: () => n.modelStore.removeModelConfig(m.name)
287
+ }, null, 8, Te)
288
+ ]),
289
+ _: 2
290
+ }, 1024)) : S("", !0)
291
+ ])
292
+ ]),
293
+ _: 2
294
+ }, 1032, ["item-id", "name", "indent", "is-selected", "is-collapsible", "is-collapsed", "onClick", "onToggle"]))), 128))
295
+ ]),
296
+ _: 1
297
+ });
298
+ }
299
+ const Le = /* @__PURE__ */ F(Ce, [["render", Ke], ["__scopeId", "data-v-a71c2207"]]), Ee = { class: "popup-header" }, Ne = { class: "popup-body" }, Ae = { class: "import-mode-selector" }, Ve = {
300
+ key: 0,
301
+ class: "input-group"
302
+ }, je = {
303
+ key: 0,
304
+ class: "error-message"
305
+ }, Ue = {
306
+ key: 1,
307
+ class: "input-group"
308
+ }, Pe = { class: "url-input-container" }, Oe = ["disabled"], Re = {
309
+ key: 0,
310
+ class: "error-message"
311
+ }, _e = {
312
+ key: 1,
313
+ class: "preview-container"
314
+ }, qe = { class: "json-preview" }, Be = { class: "connection-selector" }, Fe = { class: "form-row" }, He = ["value"], Je = {
315
+ key: 0,
316
+ class: "form-row"
317
+ }, ze = {
318
+ key: 1,
319
+ class: "form-row"
320
+ }, We = { class: "form-row" }, Ge = { class: "form-row" }, Qe = { class: "form-row" }, Xe = { class: "popup-footer" }, Ye = ["disabled"], Ze = /* @__PURE__ */ X({
321
+ __name: "DashboardImportPopup",
322
+ props: {
323
+ isOpen: { type: Boolean }
324
+ },
325
+ emits: ["close"],
326
+ setup(e, { emit: t }) {
327
+ const s = t, n = A("dashboardStore"), v = A("connectionStore"), b = A("saveDashboards"), d = A("saveAll");
328
+ if (!n || !v || !b || !d)
329
+ throw new Error("Required stores not provided");
330
+ const p = g(""), c = g(""), u = g(null), a = g(!1), m = g(""), f = g("paste"), j = g(null), h = g({
331
+ mdToken: "",
332
+ projectId: "",
333
+ username: "",
334
+ password: "",
335
+ account: "",
336
+ sshPrivateKey: ""
337
+ }), O = g(!0);
338
+ function M() {
339
+ if (!c.value) {
340
+ O.value = !1;
341
+ return;
342
+ }
343
+ if (c.value === "new-motherduck" && !h.value.mdToken) {
344
+ O.value = !1;
345
+ return;
346
+ }
347
+ if (c.value === "new-bigquery-oauth" && !h.value.projectId) {
348
+ O.value = !1;
349
+ return;
350
+ }
351
+ if (c.value === "new-snowflake" && (!h.value.username || !h.value.account || !h.value.sshPrivateKey)) {
352
+ O.value = !1;
353
+ return;
354
+ }
355
+ O.value = !0;
356
+ }
357
+ const l = async () => {
358
+ if (!m.value) {
359
+ j.value = "Please enter a URL", setTimeout(() => {
360
+ j.value = null;
361
+ }, 3e3);
362
+ return;
363
+ }
364
+ a.value = !0, j.value = null;
365
+ try {
366
+ const I = await fetch(m.value);
367
+ if (!I.ok)
368
+ throw new Error(`HTTP error! Status: ${I.status}`);
369
+ const i = await I.text();
370
+ p.value = i, a.value = !1;
371
+ } catch (I) {
372
+ console.error("Error fetching dashboard:", I), j.value = `Failed to fetch from URL: ${I instanceof Error ? I.message : "Unknown error"}`, a.value = !1, setTimeout(() => {
373
+ j.value = null;
374
+ }, 5e3);
375
+ }
376
+ }, $ = async () => {
377
+ try {
378
+ const I = ue.fromSerialized(JSON.parse(p.value));
379
+ I.storage = "local";
380
+ let i = c.value;
381
+ if (i.startsWith("new-")) {
382
+ let C = i.replace("new-", "");
383
+ i = `dashboard-${I.name || "imported"}-connection`, v.connections[i] || v.newConnection(i, C, {
384
+ mdToken: h.value.mdToken,
385
+ projectId: h.value.projectId,
386
+ username: h.value.username,
387
+ password: h.value.password,
388
+ account: h.value.account,
389
+ privateKey: h.value.sshPrivateKey
390
+ });
391
+ }
392
+ I.connection = i, I.id = Math.random().toString(36).substring(2, 15), n.addDashboard(I), w.value = !0, p.value = "", m.value = "", h.value = {
393
+ mdToken: "",
394
+ projectId: "",
395
+ username: "",
396
+ password: "",
397
+ account: "",
398
+ sshPrivateKey: ""
399
+ }, await d(), setTimeout(() => {
400
+ w.value = !1, s("close");
401
+ }, 1500);
402
+ } catch {
403
+ u.value = "Invalid JSON format", setTimeout(() => {
404
+ u.value = null;
405
+ }, 3e3);
406
+ }
407
+ }, w = g(!1), _ = g(null), R = (I) => {
408
+ _.value && !_.value.contains(I.target) && s("close");
409
+ };
410
+ return M(), (I, i) => e.isOpen ? (r(), y("div", {
411
+ key: 0,
412
+ class: "popup-overlay",
413
+ onClick: R
414
+ }, [
415
+ o("div", {
416
+ class: "popup-content",
417
+ ref_key: "popupContent",
418
+ ref: _,
419
+ "data-testid": "dashboard-import-popup"
420
+ }, [
421
+ o("div", Ee, [
422
+ i[11] || (i[11] = o("h3", null, "Import Dashboard", -1)),
423
+ o("button", {
424
+ onClick: i[0] || (i[0] = (C) => s("close")),
425
+ class: "close-button",
426
+ "data-testid": "close-popup-button"
427
+ }, " ✕ ")
428
+ ]),
429
+ o("div", Ne, [
430
+ o("div", Ae, [
431
+ o("button", {
432
+ class: U(["mode-button", { active: f.value === "paste" }]),
433
+ onClick: i[1] || (i[1] = (C) => f.value = "paste"),
434
+ "data-testid": "paste-mode-button"
435
+ }, " Paste JSON ", 2),
436
+ o("button", {
437
+ class: U(["mode-button", { active: f.value === "url" }]),
438
+ onClick: i[2] || (i[2] = (C) => f.value = "url"),
439
+ "data-testid": "url-mode-button"
440
+ }, " From URL ", 2)
441
+ ]),
442
+ f.value === "paste" ? (r(), y("div", Ve, [
443
+ i[12] || (i[12] = o("label", { for: "dashboard-json" }, "Paste Dashboard JSON", -1)),
444
+ T(o("textarea", {
445
+ id: "dashboard-json",
446
+ "onUpdate:modelValue": i[3] || (i[3] = (C) => p.value = C),
447
+ placeholder: "Paste your dashboard JSON here",
448
+ rows: "16",
449
+ class: "dashboard-textarea",
450
+ "data-testid": "dashboard-json-input"
451
+ }, null, 512), [
452
+ [P, p.value]
453
+ ]),
454
+ u.value ? (r(), y("div", je, K(u.value), 1)) : S("", !0)
455
+ ])) : S("", !0),
456
+ f.value === "url" ? (r(), y("div", Ue, [
457
+ i[14] || (i[14] = o("label", { for: "dashboard-url" }, "Dashboard URL", -1)),
458
+ o("div", Pe, [
459
+ T(o("input", {
460
+ type: "text",
461
+ id: "dashboard-url",
462
+ "onUpdate:modelValue": i[4] || (i[4] = (C) => m.value = C),
463
+ placeholder: "https://example.com/dashboard.json",
464
+ class: "url-input",
465
+ "data-testid": "dashboard-url-input"
466
+ }, null, 512), [
467
+ [P, m.value]
468
+ ]),
469
+ o("button", {
470
+ onClick: l,
471
+ class: "fetch-button",
472
+ disabled: a.value,
473
+ "data-testid": "fetch-url-button"
474
+ }, K(a.value ? "Loading..." : "Fetch"), 9, Oe)
475
+ ]),
476
+ j.value ? (r(), y("div", Re, K(j.value), 1)) : S("", !0),
477
+ p.value && f.value === "url" ? (r(), y("div", _e, [
478
+ i[13] || (i[13] = o("label", null, "Dashboard JSON Preview", -1)),
479
+ o("div", qe, [
480
+ o("pre", null, K(p.value.length > 500 ? p.value.substring(0, 500) + "..." : p.value), 1)
481
+ ])
482
+ ])) : S("", !0)
483
+ ])) : S("", !0)
484
+ ]),
485
+ o("div", Be, [
486
+ o("div", Fe, [
487
+ i[20] || (i[20] = o("label", { for: "connection-select" }, "Assign To Connection", -1)),
488
+ T(o("select", {
489
+ id: "connection-select",
490
+ "onUpdate:modelValue": i[5] || (i[5] = (C) => c.value = C),
491
+ class: "connection-dropdown",
492
+ "data-testid": "connection-select",
493
+ onChange: M
494
+ }, [
495
+ i[15] || (i[15] = o("option", {
496
+ value: "",
497
+ disabled: ""
498
+ }, "-- Select Connection --", -1)),
499
+ (r(!0), y(V, null, J(ie(v).connections, (C) => (r(), y("option", {
500
+ key: C.name,
501
+ value: C.name
502
+ }, K(C.name), 9, He))), 128)),
503
+ i[16] || (i[16] = o("option", { value: "new-duckdb" }, "New DuckDB", -1)),
504
+ i[17] || (i[17] = o("option", { value: "new-motherduck" }, "New MotherDuck", -1)),
505
+ i[18] || (i[18] = o("option", { value: "new-bigquery-oauth" }, "New Bigquery Oauth", -1)),
506
+ i[19] || (i[19] = o("option", { value: "new-snowflake" }, "New Snowflake", -1))
507
+ ], 544), [
508
+ [te, c.value]
509
+ ])
510
+ ]),
511
+ c.value === "new-motherduck" ? (r(), y("div", Je, [
512
+ i[21] || (i[21] = o("label", { for: "md-token" }, "MotherDuck Token", -1)),
513
+ T(o("input", {
514
+ type: "text",
515
+ "onUpdate:modelValue": i[6] || (i[6] = (C) => h.value.mdToken = C),
516
+ id: "md-token",
517
+ placeholder: "MotherDuck Token",
518
+ class: "connection-input",
519
+ onInput: M
520
+ }, null, 544), [
521
+ [
522
+ P,
523
+ h.value.mdToken,
524
+ void 0,
525
+ { trim: !0 }
526
+ ]
527
+ ])
528
+ ])) : S("", !0),
529
+ c.value === "new-bigquery-oauth" ? (r(), y("div", ze, [
530
+ i[22] || (i[22] = o("label", { for: "project-id" }, "BigQuery Project ID", -1)),
531
+ T(o("input", {
532
+ type: "text",
533
+ "onUpdate:modelValue": i[7] || (i[7] = (C) => h.value.projectId = C),
534
+ id: "project-id",
535
+ placeholder: "Billing Project ID",
536
+ class: "connection-input",
537
+ onInput: M
538
+ }, null, 544), [
539
+ [
540
+ P,
541
+ h.value.projectId,
542
+ void 0,
543
+ { trim: !0 }
544
+ ]
545
+ ])
546
+ ])) : S("", !0),
547
+ c.value === "new-snowflake" ? (r(), y(V, { key: 2 }, [
548
+ o("div", We, [
549
+ i[23] || (i[23] = o("label", { for: "snowflake-username" }, "Username", -1)),
550
+ T(o("input", {
551
+ type: "text",
552
+ "onUpdate:modelValue": i[8] || (i[8] = (C) => h.value.username = C),
553
+ id: "snowflake-username",
554
+ placeholder: "Snowflake Username",
555
+ class: "connection-input",
556
+ onInput: M
557
+ }, null, 544), [
558
+ [
559
+ P,
560
+ h.value.username,
561
+ void 0,
562
+ { trim: !0 }
563
+ ]
564
+ ])
565
+ ]),
566
+ o("div", Ge, [
567
+ i[24] || (i[24] = o("label", { for: "snowflake-account" }, "Account", -1)),
568
+ T(o("input", {
569
+ type: "text",
570
+ "onUpdate:modelValue": i[9] || (i[9] = (C) => h.value.account = C),
571
+ id: "snowflake-account",
572
+ placeholder: "Snowflake Account",
573
+ class: "connection-input",
574
+ onInput: M
575
+ }, null, 544), [
576
+ [
577
+ P,
578
+ h.value.account,
579
+ void 0,
580
+ { trim: !0 }
581
+ ]
582
+ ])
583
+ ]),
584
+ o("div", Qe, [
585
+ i[25] || (i[25] = o("label", { for: "snowflake-ssh-private-key" }, "Private Key", -1)),
586
+ T(o("input", {
587
+ type: "text",
588
+ "onUpdate:modelValue": i[10] || (i[10] = (C) => h.value.sshPrivateKey = C),
589
+ id: "snowflake-ssh-private-key",
590
+ placeholder: "Private Key",
591
+ class: "connection-input",
592
+ onInput: M
593
+ }, null, 544), [
594
+ [
595
+ P,
596
+ h.value.sshPrivateKey,
597
+ void 0,
598
+ { trim: !0 }
599
+ ]
600
+ ])
601
+ ])
602
+ ], 64)) : S("", !0)
603
+ ]),
604
+ o("div", Xe, [
605
+ o("button", {
606
+ onClick: $,
607
+ class: "copy-button",
608
+ "data-testid": "import-dashboard-button",
609
+ disabled: !p.value || !c.value || a.value || !O.value
610
+ }, K(w.value ? "Imported!" : "Import"), 9, Ye)
611
+ ])
612
+ ], 512)
613
+ ])) : S("", !0);
614
+ }
615
+ }), xe = /* @__PURE__ */ F(Ze, [["__scopeId", "data-v-f89b7efa"]]), et = {
616
+ name: "DashboardCreatorIcon",
617
+ components: {
618
+ Tooltip: Q
619
+ },
620
+ props: {
621
+ connection: {
622
+ type: String,
623
+ required: !0
624
+ },
625
+ title: {
626
+ type: String,
627
+ default: "New Dashboard"
628
+ }
629
+ },
630
+ setup(e) {
631
+ const t = A("dashboardStore");
632
+ if (!t)
633
+ throw new Error("Dashboard store is not provided!");
634
+ return {
635
+ createDashboard: () => {
636
+ const n = `${e.connection} Dashboard ${Date.now().toString().slice(-4)}`;
637
+ try {
638
+ const v = t.newDashboard(n, e.connection);
639
+ t.setActiveDashboard(v.id);
640
+ } catch (v) {
641
+ console.error("Failed to create dashboard:", v), alert(`Error creating dashboard: ${v instanceof Error ? v.message : String(v)}`);
642
+ }
643
+ }
644
+ };
645
+ }
646
+ };
647
+ function tt(e, t, s, n, v, b) {
648
+ const d = D("tooltip");
649
+ return r(), L(d, {
650
+ content: s.title,
651
+ position: "left"
652
+ }, {
653
+ default: k(() => [
654
+ o("span", {
655
+ onClick: t[0] || (t[0] = B((...p) => n.createDashboard && n.createDashboard(...p), ["stop"])),
656
+ class: "dashboard-creator-icon"
657
+ }, [...t[1] || (t[1] = [
658
+ o("i", { class: "mdi mdi-table-plus" }, null, -1)
659
+ ])])
660
+ ]),
661
+ _: 1
662
+ }, 8, ["content"]);
663
+ }
664
+ const ot = /* @__PURE__ */ F(et, [["render", tt], ["__scopeId", "data-v-783ac96e"]]), nt = {
665
+ name: "DashboardListItem",
666
+ props: {
667
+ item: {
668
+ type: Object,
669
+ required: !0
670
+ },
671
+ isActive: {
672
+ type: Boolean,
673
+ default: !1
674
+ },
675
+ isCollapsed: {
676
+ type: Boolean,
677
+ default: !1
678
+ }
679
+ },
680
+ emits: ["click", "delete", "clone", "toggle"],
681
+ setup(e) {
682
+ const t = A("connectionStore"), s = A("dashboardStore"), n = A("isMobile", !1);
683
+ if (!t || !s)
684
+ throw new Error("Connection/Dashboard stores is not provided!");
685
+ const v = G(() => e.item.type === "connection" && t.connections[e.item.label] || null), b = G(() => {
686
+ const d = v.value;
687
+ return d ? d.running ? "running" : d.connected ? "connected" : "disabled" : "disabled";
688
+ });
689
+ return {
690
+ isMobile: n,
691
+ dashboardStore: s,
692
+ connectionInfo: v,
693
+ connectionStatus: b
694
+ };
695
+ },
696
+ methods: {
697
+ handleClick() {
698
+ this.$emit("click", this.item);
699
+ },
700
+ handleToggle() {
701
+ this.$emit("click", this.item);
702
+ },
703
+ handleDelete() {
704
+ this.$emit("delete", this.item.dashboard);
705
+ },
706
+ handleClone() {
707
+ this.dashboardStore.cloneDashboard(this.item.id);
708
+ }
709
+ },
710
+ components: {
711
+ SidebarItem: Y,
712
+ DashboardCreatorIcon: ot,
713
+ Tooltip: Q,
714
+ StatusIcon: se
715
+ }
716
+ }, st = {
717
+ key: 0,
718
+ class: "text-light connection-model"
719
+ }, at = { class: "dashboard-actions" }, it = { class: "tag-container hover-icon" }, lt = ["data-testid"], dt = ["data-testid"], rt = ["data-testid"];
720
+ function ct(e, t, s, n, v, b) {
721
+ const d = D("tooltip"), p = D("dashboard-creator-icon"), c = D("status-icon"), u = D("sidebar-item");
722
+ return s.item.type !== "creator" ? (r(), L(u, {
723
+ key: 0,
724
+ "item-id": s.item.key,
725
+ name: s.item.label,
726
+ indent: s.item.indent,
727
+ "is-selected": s.isActive,
728
+ "is-collapsible": !["dashboard", "creator"].includes(s.item.type),
729
+ "is-collapsed": s.isCollapsed,
730
+ itemType: "dashboard",
731
+ onClick: b.handleClick,
732
+ onToggle: b.handleToggle
733
+ }, {
734
+ icon: k(() => [
735
+ s.item.type === "dashboard" ? (r(), L(d, {
736
+ key: 0,
737
+ content: "Dashboard",
738
+ position: "right"
739
+ }, {
740
+ default: k(() => [...t[3] || (t[3] = [
741
+ o("i", { class: "mdi mdi-view-dashboard node-icon" }, null, -1)
742
+ ])]),
743
+ _: 1
744
+ })) : S("", !0)
745
+ ]),
746
+ name: k(() => {
747
+ var a, m;
748
+ return [
749
+ H(K(s.item.label) + " ", 1),
750
+ s.item.type === "connection" ? (r(), y("span", st, " (" + K((a = n.connectionInfo) != null && a.model ? (m = n.connectionInfo) == null ? void 0 : m.model : "No Model Set") + ") ", 1)) : S("", !0)
751
+ ];
752
+ }),
753
+ "extra-content": k(() => [
754
+ o("div", at, [
755
+ s.item.type === "connection" ? (r(), y(V, { key: 0 }, [
756
+ o("span", it, [
757
+ N(p, {
758
+ connection: s.item.label,
759
+ title: "New Dashboard"
760
+ }, null, 8, ["connection"])
761
+ ]),
762
+ N(c, { status: n.connectionStatus }, null, 8, ["status"])
763
+ ], 64)) : S("", !0),
764
+ s.item.type === "dashboard" ? (r(), y(V, { key: 1 }, [
765
+ N(d, {
766
+ content: "Clone Dashboard",
767
+ position: "left"
768
+ }, {
769
+ default: k(() => [
770
+ o("span", {
771
+ class: "clone-btn hover-icon",
772
+ onClick: t[0] || (t[0] = B((...a) => b.handleClone && b.handleClone(...a), ["stop"])),
773
+ "data-testid": `clone-dashboard-${s.item.label}`
774
+ }, [...t[4] || (t[4] = [
775
+ o("i", { class: "mdi mdi-content-copy" }, null, -1)
776
+ ])], 8, lt)
777
+ ]),
778
+ _: 1
779
+ }),
780
+ N(d, {
781
+ content: "Delete Dashboard",
782
+ position: "left"
783
+ }, {
784
+ default: k(() => [
785
+ o("span", {
786
+ class: "remove-btn hover-icon",
787
+ onClick: t[1] || (t[1] = B((...a) => b.handleDelete && b.handleDelete(...a), ["stop"])),
788
+ "data-testid": `delete-dashboard-${s.item.label}`
789
+ }, [...t[5] || (t[5] = [
790
+ o("i", { class: "mdi mdi-trash-can-outline" }, null, -1)
791
+ ])], 8, dt)
792
+ ]),
793
+ _: 1
794
+ })
795
+ ], 64)) : S("", !0)
796
+ ])
797
+ ]),
798
+ _: 1
799
+ }, 8, ["item-id", "name", "indent", "is-selected", "is-collapsible", "is-collapsed", "onClick", "onToggle"])) : (r(), y("div", {
800
+ key: 1,
801
+ "data-testid": `dashboard-list-id-${s.item.key}`,
802
+ class: "creator-item",
803
+ onClick: t[2] || (t[2] = (...a) => b.handleClick && b.handleClick(...a))
804
+ }, K(s.item.label), 9, rt));
805
+ }
806
+ const ut = /* @__PURE__ */ F(nt, [["render", ct], ["__scopeId", "data-v-9e23d2b5"]]);
807
+ function mt(e, t) {
808
+ const s = [], n = {};
809
+ return e.forEach((v) => {
810
+ const b = v.storage || "local";
811
+ v.deleted || (n[b] || (n[b] = []), n[b].push(v));
812
+ }), Object.entries(n).forEach(([v, b]) => {
813
+ const d = `s-${v}`;
814
+ if (s.push({
815
+ type: "storage",
816
+ label: v === "local" ? "Browser Storage" : "Remote Storage",
817
+ key: d,
818
+ id: d,
819
+ indent: 0
820
+ }), !t[d]) {
821
+ const p = {};
822
+ b.forEach((c) => {
823
+ const u = c.connection || "default";
824
+ p[u] || (p[u] = []), p[u].push(c);
825
+ }), Object.entries(p).forEach(([c, u]) => {
826
+ const a = `c-${v}-${c}`;
827
+ s.push({
828
+ type: "connection",
829
+ id: a,
830
+ label: c,
831
+ key: a,
832
+ indent: 1
833
+ }), t[a] || u.forEach((m) => {
834
+ s.push({
835
+ type: "dashboard",
836
+ label: m.name,
837
+ id: m.id,
838
+ key: `d-${m.id}`,
839
+ indent: 2,
840
+ dashboard: m
841
+ });
842
+ });
843
+ });
844
+ }
845
+ }), s;
846
+ }
847
+ const vt = {
848
+ name: "DashboardList",
849
+ props: {
850
+ activeDashboardKey: String,
851
+ testTag: {
852
+ type: String,
853
+ default: ""
854
+ }
855
+ },
856
+ setup() {
857
+ const e = A("dashboardStore"), t = A("connectionStore"), s = A("saveDashboards");
858
+ if (!e || !t || !s)
859
+ throw new Error("Dashboard or connection store is not provided!");
860
+ const n = g({}), v = g(!1), b = g(!1), d = (u) => {
861
+ n.value[u] === void 0 && (n.value[u] = !1), n.value[u] = !n.value[u];
862
+ }, p = q("dashboard") || "";
863
+ x(() => {
864
+ if (Object.values(e.dashboards).forEach((u) => {
865
+ let a = `s-${u.storage}`, m = `c-${u.storage}-${u.connection}`;
866
+ p === u.id ? (n.value[a] = !1, n.value[m] = !1) : (n.value[a] === void 0 ? n.value[a] = !0 : n.value[a] === !1 && (n.value[a] = !1), n.value[m] === void 0 ? n.value[m] = !0 : n.value[m] === !1 && (n.value[m] = !1));
867
+ }), Object.keys(e.dashboards).length > 0) {
868
+ const u = Object.values(e.dashboards)[0];
869
+ n.value[`s-${u.storage}`] = !1;
870
+ }
871
+ });
872
+ const c = G(() => mt(Object.values(e.dashboards), n.value));
873
+ return {
874
+ connectionStore: t,
875
+ dashboardStore: e,
876
+ contentList: c,
877
+ toggleCollapse: d,
878
+ collapsed: n,
879
+ creatorVisible: v,
880
+ importPopupVisible: b,
881
+ saveDashboards: s
882
+ };
883
+ },
884
+ data() {
885
+ return {
886
+ showDeleteConfirmationState: !1,
887
+ dashboardToDelete: null
888
+ };
889
+ },
890
+ methods: {
891
+ showDeleteConfirmation(e) {
892
+ this.dashboardToDelete = e.id, this.showDeleteConfirmationState = !0;
893
+ },
894
+ cancelDelete() {
895
+ this.showDeleteConfirmationState = !1, this.dashboardToDelete = null;
896
+ },
897
+ confirmDelete() {
898
+ this.dashboardToDelete && this.dashboardStore.dashboards[this.dashboardToDelete] && this.dashboardStore.dashboards[this.dashboardToDelete].delete(), this.showDeleteConfirmationState = !1, this.dashboardToDelete = null;
899
+ },
900
+ dashboardCreated(e) {
901
+ console.log("Dashboard created event received:", e), this.$emit("dashboard-key-selected", e);
902
+ },
903
+ clickAction(e) {
904
+ e.type === "dashboard" ? this.$emit("dashboard-key-selected", e.id) : this.toggleCollapse(e.key);
905
+ }
906
+ },
907
+ components: {
908
+ DashboardCreatorInline: fe,
909
+ DashboardImportPopup: xe,
910
+ DashboardListItem: ut,
911
+ SidebarList: Z,
912
+ LoadingButton: oe
913
+ }
914
+ }, pt = { class: "button-container" }, bt = ["data-testid"], yt = { class: "confirmation-dialog" }, ht = { class: "dialog-actions" };
915
+ function ft(e, t, s, n, v, b) {
916
+ const d = D("dashboard-creator-inline"), p = D("dashboard-import-popup"), c = D("dashboard-list-item"), u = D("sidebar-list");
917
+ return r(), L(u, { title: "Dashboards" }, {
918
+ actions: k(() => [
919
+ o("div", pt, [
920
+ o("button", {
921
+ onClick: t[0] || (t[0] = (a) => n.creatorVisible = !n.creatorVisible),
922
+ "data-testid": s.testTag ? `dashboard-creator-add-${s.testTag}` : "dashboard-creator-add"
923
+ }, K(n.creatorVisible ? "Hide" : "New"), 9, bt),
924
+ o("button", {
925
+ onClick: t[1] || (t[1] = (a) => n.importPopupVisible = !0),
926
+ "data-testid": "dashboard-import-button"
927
+ }, " Import ")
928
+ ]),
929
+ N(d, {
930
+ visible: n.creatorVisible,
931
+ onClose: t[2] || (t[2] = (a) => n.creatorVisible = !n.creatorVisible),
932
+ testTag: s.testTag,
933
+ onDashboardCreated: b.dashboardCreated
934
+ }, null, 8, ["visible", "testTag", "onDashboardCreated"]),
935
+ N(p, {
936
+ isOpen: n.importPopupVisible,
937
+ onClose: t[3] || (t[3] = (a) => n.importPopupVisible = !1)
938
+ }, null, 8, ["isOpen"])
939
+ ]),
940
+ default: k(() => [
941
+ (r(!0), y(V, null, J(n.contentList, (a) => (r(), L(c, {
942
+ key: a.key,
943
+ item: a,
944
+ "is-active": s.activeDashboardKey === a.id,
945
+ "is-collapsed": n.collapsed[a.key],
946
+ onClick: (m) => b.clickAction(a),
947
+ onDelete: b.showDeleteConfirmation
948
+ }, null, 8, ["item", "is-active", "is-collapsed", "onClick", "onDelete"]))), 128)),
949
+ v.showDeleteConfirmationState ? (r(), y("div", {
950
+ key: 0,
951
+ class: "confirmation-overlay",
952
+ onClick: t[6] || (t[6] = B((...a) => b.cancelDelete && b.cancelDelete(...a), ["self"]))
953
+ }, [
954
+ o("div", yt, [
955
+ t[7] || (t[7] = o("h3", null, "Confirm Deletion", -1)),
956
+ t[8] || (t[8] = o("p", null, "Are you sure you want to delete this dashboard? Contents cannot be recovered.", -1)),
957
+ o("div", ht, [
958
+ o("button", {
959
+ class: "cancel-btn",
960
+ "data-testid": "cancel-dashboard-deletion",
961
+ onClick: t[4] || (t[4] = (...a) => b.cancelDelete && b.cancelDelete(...a))
962
+ }, " Cancel "),
963
+ o("button", {
964
+ class: "confirm-btn",
965
+ "data-testid": "confirm-dashboard-deletion",
966
+ onClick: t[5] || (t[5] = (...a) => b.confirmDelete && b.confirmDelete(...a))
967
+ }, " Delete ")
968
+ ])
969
+ ])
970
+ ])) : S("", !0)
971
+ ]),
972
+ _: 1
973
+ });
974
+ }
975
+ const gt = /* @__PURE__ */ F(vt, [["render", ft], ["__scopeId", "data-v-311270bc"]]), St = {
976
+ key: 0,
977
+ class: "mdi mdi-source-repository sidebar-icon"
978
+ }, kt = {
979
+ key: 1,
980
+ class: "right-pad"
981
+ }, Ct = {
982
+ key: 0,
983
+ class: "tag-container"
984
+ }, Dt = {
985
+ key: 1,
986
+ class: "tag-container hover-icon"
987
+ }, wt = {
988
+ key: 2,
989
+ class: "tag-container"
990
+ }, Mt = ["data-testid"], $t = /* @__PURE__ */ X({
991
+ __name: "CommunityModelListItem",
992
+ props: {
993
+ item: {},
994
+ activeModel: { default: "" },
995
+ isCollapsed: { type: Boolean, default: !1 },
996
+ isMobile: { type: Boolean, default: !1 }
997
+ },
998
+ emits: ["item-click", "model-selected", "model-details", "item-toggle", "delete-store"],
999
+ setup(e, { emit: t }) {
1000
+ const s = e, n = t, v = ae(), b = () => {
1001
+ s.item.type === "model" ? n("model-selected", s.item.model, s.item.key, s.item.modelRoot) : n("item-click", s.item.type, s.item.key, s.item.modelRoot);
1002
+ }, d = () => {
1003
+ ["model"].includes(s.item.type) || n("item-toggle", s.item.type, s.item.key, s.item.modelRoot);
1004
+ }, p = () => "", c = (m) => m.id === me.id, u = (m) => v.getStoreStatus(m.id), a = (m) => {
1005
+ const f = v.errors[m.id];
1006
+ if (f)
1007
+ return `Connection failed: ${f}`;
1008
+ if (v.getStoreStatus(m.id) === "connected")
1009
+ return "Connected";
1010
+ };
1011
+ return (m, f) => (r(), L(Y, {
1012
+ "item-id": e.item.key,
1013
+ name: e.item.label,
1014
+ indent: e.item.indent,
1015
+ "is-selected": e.activeModel === e.item.key,
1016
+ "is-collapsible": !["model"].includes(e.item.type),
1017
+ "is-collapsed": e.isCollapsed,
1018
+ icon: p(),
1019
+ itemType: "community",
1020
+ onClick: b,
1021
+ onToggle: d
1022
+ }, {
1023
+ icon: k(() => [
1024
+ e.item.type === "root" ? (r(), y("i", St)) : e.item.type === "engine" ? (r(), y("span", kt, [
1025
+ N(be, {
1026
+ "connection-type": e.item.label
1027
+ }, null, 8, ["connection-type"])
1028
+ ])) : S("", !0)
1029
+ ]),
1030
+ "extra-content": k(() => {
1031
+ var j;
1032
+ return [
1033
+ e.item.type === "model" ? (r(), y("span", Ct, [
1034
+ (r(!0), y(V, null, J(((j = e.item.model) == null ? void 0 : j.tags) || [], (h) => (r(), y("span", {
1035
+ key: h,
1036
+ class: "tag"
1037
+ }, K(h), 1))), 128))
1038
+ ])) : e.item.type === "engine" ? (r(), y("span", Dt)) : e.item.type === "root" ? (r(), y("span", wt, [
1039
+ e.item.store && !c(e.item.store) ? (r(), L(Q, {
1040
+ key: 0,
1041
+ content: "Remove Store",
1042
+ position: "left"
1043
+ }, {
1044
+ default: k(() => [
1045
+ o("span", {
1046
+ class: "remove-btn hover-icon",
1047
+ onClick: f[0] || (f[0] = B((h) => n("delete-store", e.item.store), ["stop"])),
1048
+ "data-testid": `delete-store-${e.item.store.id}`
1049
+ }, [...f[1] || (f[1] = [
1050
+ o("i", { class: "mdi mdi-trash-can-outline" }, null, -1)
1051
+ ])], 8, Mt)
1052
+ ]),
1053
+ _: 1
1054
+ })) : S("", !0),
1055
+ e.item.store ? (r(), L(se, {
1056
+ key: 1,
1057
+ status: u(e.item.store),
1058
+ message: a(e.item.store),
1059
+ "test-name": e.item.store.id
1060
+ }, null, 8, ["status", "message", "test-name"])) : S("", !0)
1061
+ ])) : S("", !0)
1062
+ ];
1063
+ }),
1064
+ _: 1
1065
+ }, 8, ["item-id", "name", "indent", "is-selected", "is-collapsible", "is-collapsed", "icon"]));
1066
+ }
1067
+ }), It = /* @__PURE__ */ F($t, [["__scopeId", "data-v-e6a70fb6"]]), Tt = {
1068
+ name: "AddStoreModal",
1069
+ props: {
1070
+ show: {
1071
+ type: Boolean,
1072
+ required: !0
1073
+ },
1074
+ loading: {
1075
+ type: Boolean,
1076
+ default: !1
1077
+ }
1078
+ },
1079
+ emits: ["close", "add"],
1080
+ setup(e, { emit: t }) {
1081
+ const s = g("generic"), n = g(""), v = g(""), b = g(""), d = g(""), p = g("main"), c = g(null);
1082
+ return le(
1083
+ () => e.show,
1084
+ (a) => {
1085
+ a && (s.value = "generic", n.value = "", v.value = "", b.value = "", d.value = "", p.value = "main", c.value = null);
1086
+ }
1087
+ ), {
1088
+ storeType: s,
1089
+ storeName: n,
1090
+ baseUrl: v,
1091
+ owner: b,
1092
+ repo: d,
1093
+ branch: p,
1094
+ error: c,
1095
+ handleSubmit: async () => {
1096
+ c.value = null;
1097
+ try {
1098
+ if (s.value === "generic") {
1099
+ if (!n.value || !v.value) {
1100
+ c.value = "Please fill in all required fields";
1101
+ return;
1102
+ }
1103
+ const m = {
1104
+ type: "generic",
1105
+ id: v.value.replace(/^https?:\/\//, "").replace(/\//g, "-"),
1106
+ name: n.value,
1107
+ baseUrl: v.value.replace(/\/$/, "")
1108
+ // Remove trailing slash
1109
+ };
1110
+ t("add", m);
1111
+ } else {
1112
+ if (!n.value || !b.value || !d.value || !p.value) {
1113
+ c.value = "Please fill in all required fields";
1114
+ return;
1115
+ }
1116
+ const m = {
1117
+ type: "github",
1118
+ id: `${b.value}-${d.value}-${p.value}`,
1119
+ name: n.value,
1120
+ owner: b.value,
1121
+ repo: d.value,
1122
+ branch: p.value
1123
+ };
1124
+ t("add", m);
1125
+ }
1126
+ } catch (a) {
1127
+ c.value = a instanceof Error ? a.message : "Failed to add store";
1128
+ }
1129
+ }
1130
+ };
1131
+ }
1132
+ }, Kt = { class: "form-group" }, Lt = { class: "form-group" }, Et = { class: "form-group" }, Nt = { class: "form-group" }, At = { class: "form-group" }, Vt = { class: "form-group" }, jt = { class: "form-group" }, Ut = {
1133
+ key: 2,
1134
+ class: "form-error",
1135
+ "data-testid": "add-store-error"
1136
+ }, Pt = { class: "dialog-actions" }, Ot = ["disabled"];
1137
+ function Rt(e, t, s, n, v, b) {
1138
+ return s.show ? (r(), y("div", {
1139
+ key: 0,
1140
+ class: "confirmation-overlay",
1141
+ onClick: t[10] || (t[10] = (d) => e.$emit("close"))
1142
+ }, [
1143
+ o("div", {
1144
+ class: "confirmation-dialog",
1145
+ "data-testid": "add-store-modal",
1146
+ onClick: t[9] || (t[9] = B(() => {
1147
+ }, ["stop"]))
1148
+ }, [
1149
+ t[20] || (t[20] = o("h3", null, "Add Model Store", -1)),
1150
+ o("form", {
1151
+ onSubmit: t[8] || (t[8] = B((...d) => n.handleSubmit && n.handleSubmit(...d), ["prevent"]))
1152
+ }, [
1153
+ o("div", Kt, [
1154
+ t[12] || (t[12] = o("label", null, [
1155
+ H("Store Type: "),
1156
+ o("span", { class: "required" }, "*")
1157
+ ], -1)),
1158
+ T(o("select", {
1159
+ "onUpdate:modelValue": t[0] || (t[0] = (d) => n.storeType = d),
1160
+ "data-testid": "store-type-select"
1161
+ }, [...t[11] || (t[11] = [
1162
+ o("option", { value: "generic" }, "Generic", -1),
1163
+ o("option", { value: "github" }, "GitHub Repository", -1)
1164
+ ])], 512), [
1165
+ [te, n.storeType]
1166
+ ])
1167
+ ]),
1168
+ n.storeType === "generic" ? (r(), y(V, { key: 0 }, [
1169
+ o("div", Lt, [
1170
+ t[13] || (t[13] = o("label", null, [
1171
+ H("Store Name: "),
1172
+ o("span", { class: "required" }, "*")
1173
+ ], -1)),
1174
+ T(o("input", {
1175
+ "onUpdate:modelValue": t[1] || (t[1] = (d) => n.storeName = d),
1176
+ type: "text",
1177
+ placeholder: "e.g., Local Dev Store",
1178
+ "data-testid": "store-name-input",
1179
+ required: ""
1180
+ }, null, 512), [
1181
+ [P, n.storeName]
1182
+ ])
1183
+ ]),
1184
+ o("div", Et, [
1185
+ t[14] || (t[14] = o("label", null, [
1186
+ H("Base URL: "),
1187
+ o("span", { class: "required" }, "*")
1188
+ ], -1)),
1189
+ T(o("input", {
1190
+ "onUpdate:modelValue": t[2] || (t[2] = (d) => n.baseUrl = d),
1191
+ type: "url",
1192
+ placeholder: "e.g., http://localhost:8000",
1193
+ "data-testid": "store-url-input",
1194
+ required: ""
1195
+ }, null, 512), [
1196
+ [P, n.baseUrl]
1197
+ ]),
1198
+ t[15] || (t[15] = o("small", null, "URL should serve an index.json file at /index.json", -1))
1199
+ ])
1200
+ ], 64)) : S("", !0),
1201
+ n.storeType === "github" ? (r(), y(V, { key: 1 }, [
1202
+ o("div", Nt, [
1203
+ t[16] || (t[16] = o("label", null, [
1204
+ H("Display Name: "),
1205
+ o("span", { class: "required" }, "*")
1206
+ ], -1)),
1207
+ T(o("input", {
1208
+ "onUpdate:modelValue": t[3] || (t[3] = (d) => n.storeName = d),
1209
+ type: "text",
1210
+ placeholder: "e.g., My Custom Models",
1211
+ "data-testid": "store-name-input",
1212
+ required: ""
1213
+ }, null, 512), [
1214
+ [P, n.storeName]
1215
+ ])
1216
+ ]),
1217
+ o("div", At, [
1218
+ t[17] || (t[17] = o("label", null, [
1219
+ H("Repository Owner: "),
1220
+ o("span", { class: "required" }, "*")
1221
+ ], -1)),
1222
+ T(o("input", {
1223
+ "onUpdate:modelValue": t[4] || (t[4] = (d) => n.owner = d),
1224
+ type: "text",
1225
+ placeholder: "e.g., trilogy-data",
1226
+ "data-testid": "github-owner-input",
1227
+ required: ""
1228
+ }, null, 512), [
1229
+ [P, n.owner]
1230
+ ])
1231
+ ]),
1232
+ o("div", Vt, [
1233
+ t[18] || (t[18] = o("label", null, [
1234
+ H("Repository Name: "),
1235
+ o("span", { class: "required" }, "*")
1236
+ ], -1)),
1237
+ T(o("input", {
1238
+ "onUpdate:modelValue": t[5] || (t[5] = (d) => n.repo = d),
1239
+ type: "text",
1240
+ placeholder: "e.g., trilogy-public-models",
1241
+ "data-testid": "github-repo-input",
1242
+ required: ""
1243
+ }, null, 512), [
1244
+ [P, n.repo]
1245
+ ])
1246
+ ]),
1247
+ o("div", jt, [
1248
+ t[19] || (t[19] = o("label", null, [
1249
+ H("Branch: "),
1250
+ o("span", { class: "required" }, "*")
1251
+ ], -1)),
1252
+ T(o("input", {
1253
+ "onUpdate:modelValue": t[6] || (t[6] = (d) => n.branch = d),
1254
+ type: "text",
1255
+ placeholder: "e.g., main",
1256
+ "data-testid": "github-branch-input",
1257
+ required: ""
1258
+ }, null, 512), [
1259
+ [P, n.branch]
1260
+ ])
1261
+ ])
1262
+ ], 64)) : S("", !0),
1263
+ n.error ? (r(), y("div", Ut, K(n.error), 1)) : S("", !0),
1264
+ o("div", Pt, [
1265
+ o("button", {
1266
+ type: "button",
1267
+ class: "cancel-btn",
1268
+ "data-testid": "add-store-cancel",
1269
+ onClick: t[7] || (t[7] = (d) => e.$emit("close"))
1270
+ }, " Cancel "),
1271
+ o("button", {
1272
+ type: "submit",
1273
+ class: "confirm-btn",
1274
+ "data-testid": "add-store-submit",
1275
+ disabled: s.loading
1276
+ }, K(s.loading ? "Adding..." : "Add Store"), 9, Ot)
1277
+ ])
1278
+ ], 32)
1279
+ ])
1280
+ ])) : S("", !0);
1281
+ }
1282
+ const _t = /* @__PURE__ */ F(Tt, [["render", Rt], ["__scopeId", "data-v-089b365c"]]), qt = (e = {}, t = [], s = {}) => {
1283
+ const n = [];
1284
+ return t.forEach((v) => {
1285
+ const b = v.id, d = v.name, p = {
1286
+ owner: v.type === "github" ? v.owner : "",
1287
+ repo: v.type === "github" ? v.repo : "",
1288
+ branch: v.type === "github" ? v.branch : "main",
1289
+ displayName: d
1290
+ };
1291
+ if (n.push({
1292
+ type: "root",
1293
+ label: d,
1294
+ key: b,
1295
+ indent: 0,
1296
+ modelRoot: p,
1297
+ store: v
1298
+ }), !e[b]) {
1299
+ const c = s[b] || [], u = {};
1300
+ c.forEach((a) => {
1301
+ u[a.engine] || (u[a.engine] = []), u[a.engine].push(a);
1302
+ }), Object.keys(u).sort().forEach((a) => {
1303
+ const m = `${b}${E}${a}`;
1304
+ n.push({
1305
+ type: "engine",
1306
+ label: a,
1307
+ key: m,
1308
+ indent: 1,
1309
+ modelRoot: p,
1310
+ store: v
1311
+ }), e[m] || u[a].forEach((f) => {
1312
+ n.push({
1313
+ type: "model",
1314
+ label: f.name,
1315
+ key: `${m}${E}${f.name}`,
1316
+ indent: 2,
1317
+ model: f,
1318
+ modelRoot: p,
1319
+ store: v
1320
+ });
1321
+ });
1322
+ });
1323
+ }
1324
+ }), n;
1325
+ }, Bt = X({
1326
+ name: "CommunityModelList",
1327
+ setup() {
1328
+ const e = ae(), t = ne(), s = g({}), n = t.activeCommunityModelKey.value || "", v = (M) => {
1329
+ const l = M.split("+");
1330
+ if (l.length > 0 && (s.value[l[0]] = !1, l.length > 1)) {
1331
+ const $ = `${l[0]}+${l[1]}`;
1332
+ s.value[$] = !1;
1333
+ }
1334
+ };
1335
+ for (const M of e.stores)
1336
+ s.value[M.id] = !0;
1337
+ n ? v(n) : e.stores.length > 0 && (s.value[e.stores[0].id] = !1);
1338
+ const b = g(null), d = g(!1), p = g(null), c = async (M) => {
1339
+ b.value = null;
1340
+ try {
1341
+ await e.addStore(M), e.closeAddStoreModal();
1342
+ } catch (l) {
1343
+ b.value = l instanceof Error ? l.message : "Failed to add store";
1344
+ }
1345
+ }, u = (M) => {
1346
+ p.value = M, d.value = !0;
1347
+ }, a = () => {
1348
+ d.value = !1, p.value = null;
1349
+ }, m = () => {
1350
+ p.value && e.removeStore(p.value.id), d.value = !1, p.value = null;
1351
+ }, f = (M, l, $) => {
1352
+ t.openTab("community-models", M.name, l), console.log("Selected model:", M.name, "from root:", $);
1353
+ }, j = (M, l, $) => {
1354
+ t.openTab("community-models", null, l);
1355
+ }, h = (M, l, $) => {
1356
+ s.value[l] = !s.value[l];
1357
+ }, O = G(() => qt(
1358
+ s.value,
1359
+ e.stores,
1360
+ e.filesByStore
1361
+ ));
1362
+ return x(async () => {
1363
+ await e.initialize();
1364
+ }), {
1365
+ communityStore: e,
1366
+ navigationStore: t,
1367
+ addError: b,
1368
+ handleAddStoreSubmit: c,
1369
+ showDeleteStoreConfirmation: u,
1370
+ cancelDeleteStore: a,
1371
+ confirmDeleteStore: m,
1372
+ showDeleteConfirmationState: d,
1373
+ handleModelSelected: f,
1374
+ handleItemClick: j,
1375
+ handleItemToggle: h,
1376
+ collapsed: s,
1377
+ displayTree: O
1378
+ };
1379
+ },
1380
+ components: {
1381
+ SidebarList: Z,
1382
+ CommunityModelListItem: It,
1383
+ AddStoreModal: _t
1384
+ }
1385
+ }), Ft = { class: "button-container" }, Ht = ["disabled"], Jt = ["disabled"], zt = {
1386
+ key: 0,
1387
+ class: "error-container"
1388
+ }, Wt = { class: "error-text" }, Gt = ["onClick"], Qt = { class: "confirmation-dialog" }, Xt = { class: "dialog-actions" };
1389
+ function Yt(e, t, s, n, v, b) {
1390
+ const d = D("CommunityModelListItem"), p = D("AddStoreModal"), c = D("sidebar-list");
1391
+ return r(), L(c, { title: "Community Models" }, {
1392
+ actions: k(() => [
1393
+ o("div", Ft, [
1394
+ o("button", {
1395
+ onClick: t[0] || (t[0] = (u) => e.communityStore.refreshData()),
1396
+ disabled: e.communityStore.loading
1397
+ }, K(e.communityStore.loading ? "Refreshing..." : "Refresh"), 9, Ht),
1398
+ o("button", {
1399
+ onClick: t[1] || (t[1] = (u) => e.communityStore.openAddStoreModal()),
1400
+ disabled: e.communityStore.loading
1401
+ }, " Add Store ", 8, Jt)
1402
+ ])
1403
+ ]),
1404
+ default: k(() => [
1405
+ e.communityStore.hasErrors ? (r(), y("div", zt, [
1406
+ (r(!0), y(V, null, J(e.communityStore.errorList, (u) => (r(), y("div", {
1407
+ key: u.root,
1408
+ class: "error-item"
1409
+ }, [
1410
+ o("span", Wt, K(u.name) + ": " + K(u.error), 1),
1411
+ o("button", {
1412
+ onClick: (a) => e.communityStore.clearStoreError(u.root),
1413
+ class: "clear-error"
1414
+ }, "×", 8, Gt)
1415
+ ]))), 128))
1416
+ ])) : S("", !0),
1417
+ (r(!0), y(V, null, J(e.displayTree, (u) => (r(), L(d, {
1418
+ key: u.key,
1419
+ item: u,
1420
+ "is-collapsed": e.collapsed[u.key],
1421
+ "active-model": e.navigationStore.activeCommunityModelKey.value,
1422
+ onItemClick: e.handleItemClick,
1423
+ onItemToggle: e.handleItemToggle,
1424
+ onModelSelected: e.handleModelSelected,
1425
+ onDeleteStore: e.showDeleteStoreConfirmation
1426
+ }, null, 8, ["item", "is-collapsed", "active-model", "onItemClick", "onItemToggle", "onModelSelected", "onDeleteStore"]))), 128)),
1427
+ N(p, {
1428
+ show: e.communityStore.showAddStoreModal,
1429
+ loading: e.communityStore.addingStore,
1430
+ onClose: t[2] || (t[2] = (u) => e.communityStore.closeAddStoreModal()),
1431
+ onAdd: e.handleAddStoreSubmit
1432
+ }, null, 8, ["show", "loading", "onAdd"]),
1433
+ e.showDeleteConfirmationState ? (r(), y("div", {
1434
+ key: 1,
1435
+ class: "confirmation-overlay",
1436
+ onClick: t[5] || (t[5] = B((...u) => e.cancelDeleteStore && e.cancelDeleteStore(...u), ["self"]))
1437
+ }, [
1438
+ o("div", Qt, [
1439
+ t[6] || (t[6] = o("h3", null, "Confirm Store Removal", -1)),
1440
+ t[7] || (t[7] = o("p", null, "Are you sure you want to remove this store? This will not delete any imported models.", -1)),
1441
+ o("div", Xt, [
1442
+ o("button", {
1443
+ class: "cancel-btn",
1444
+ "data-testid": "cancel-store-deletion",
1445
+ onClick: t[3] || (t[3] = (...u) => e.cancelDeleteStore && e.cancelDeleteStore(...u))
1446
+ }, " Cancel "),
1447
+ o("button", {
1448
+ class: "confirm-btn",
1449
+ "data-testid": "confirm-store-deletion",
1450
+ onClick: t[4] || (t[4] = (...u) => e.confirmDeleteStore && e.confirmDeleteStore(...u))
1451
+ }, " Remove ")
1452
+ ])
1453
+ ])
1454
+ ])) : S("", !0)
1455
+ ]),
1456
+ _: 1
1457
+ });
1458
+ }
1459
+ const Zt = /* @__PURE__ */ F(Bt, [["render", Yt], ["__scopeId", "data-v-d28daf94"]]), xt = X({
1460
+ name: "Sidebar",
1461
+ props: {
1462
+ active: {
1463
+ type: String,
1464
+ default: q("screen")
1465
+ },
1466
+ activeEditor: {
1467
+ type: String,
1468
+ default: q("editor")
1469
+ },
1470
+ activeModelKey: {
1471
+ type: String,
1472
+ default: q("model")
1473
+ },
1474
+ activeDocumentationKey: {
1475
+ type: String,
1476
+ default: q("documentationKey")
1477
+ },
1478
+ activeConnectionKey: {
1479
+ type: String,
1480
+ default: q("connection")
1481
+ },
1482
+ activeLLMKey: {
1483
+ type: String,
1484
+ default: q("llm")
1485
+ },
1486
+ activeDashboardKey: {
1487
+ type: String,
1488
+ default: q("dashboard")
1489
+ },
1490
+ containerWidth: {
1491
+ type: Number,
1492
+ default: 200
1493
+ }
1494
+ },
1495
+ setup() {
1496
+ const e = g(!1), t = g(null);
1497
+ return {
1498
+ isSaving: e,
1499
+ previousUnSaved: t
1500
+ };
1501
+ },
1502
+ data() {
1503
+ let e = [
1504
+ {
1505
+ name: "dashboard",
1506
+ tooltip: "Chart",
1507
+ icon: "mdi mdi-chart-multiple",
1508
+ screen: "dashboard"
1509
+ },
1510
+ {
1511
+ name: "models",
1512
+ tooltip: "Model",
1513
+ icon: "mdi mdi-set-center",
1514
+ screen: "models"
1515
+ },
1516
+ {
1517
+ name: "community-models",
1518
+ tooltip: "Share & Explore",
1519
+ icon: "mdi mdi-library-outline",
1520
+ screen: "community-models"
1521
+ },
1522
+ {
1523
+ name: "help",
1524
+ tooltip: "Help",
1525
+ icon: "mdi mdi-help",
1526
+ screen: "tutorial"
1527
+ }
1528
+ ], t = [
1529
+ {
1530
+ name: "edit",
1531
+ tooltip: "Query",
1532
+ icon: "mdi mdi-file-document-edit-outline",
1533
+ screen: "editors"
1534
+ },
1535
+ {
1536
+ name: "database",
1537
+ tooltip: "Connect",
1538
+ icon: "mdi mdi-database-outline",
1539
+ screen: "connections"
1540
+ },
1541
+ {
1542
+ name: "llm",
1543
+ tooltip: "AI",
1544
+ icon: "mdi mdi-creation-outline",
1545
+ screen: "llms"
1546
+ }
1547
+ // {
1548
+ // name: "Extensions",
1549
+ // iconClass: "fas fa-puzzle-piece",
1550
+ // component: "Extensions", // Replace with your actual component
1551
+ // },
1552
+ ], s = A("isMobile"), n = A("saveAll"), v = A("unSaved") || 0;
1553
+ if (!s || !n)
1554
+ throw new Error("isMobile is not provided");
1555
+ return {
1556
+ // index of the sidebarItem where the screen == active
1557
+ // selectedIndex: sideBarItems.findIndex((item) => item.screen === active) || 0,
1558
+ trilogyIcon: pe,
1559
+ sidebarItems: t,
1560
+ sidebarFeatureItems: e,
1561
+ isMobile: s,
1562
+ unSaved: v,
1563
+ saveAll: n,
1564
+ notMobile: !s
1565
+ };
1566
+ },
1567
+ components: {
1568
+ EditorList: ve,
1569
+ ConnectionList: he,
1570
+ Tooltip: Q,
1571
+ TutorialSidebar: ke,
1572
+ ModelSidebar: Le,
1573
+ LLMConnectionList: ye,
1574
+ DashboardList: gt,
1575
+ CommunityModelList: Zt
1576
+ },
1577
+ watch: {
1578
+ unSaved: {
1579
+ handler(e, t) {
1580
+ t > 0 && e === 0 && !this.isSaving && this.triggerSaveAnimation(), this.previousUnSaved = e;
1581
+ },
1582
+ immediate: !0
1583
+ }
1584
+ },
1585
+ methods: {
1586
+ triggerSaveAnimation() {
1587
+ this.isSaving = !0, setTimeout(() => {
1588
+ this.isSaving = !1;
1589
+ }, 500);
1590
+ },
1591
+ async handleSave() {
1592
+ this.isSaving = !0, await this.saveAll(), setTimeout(() => {
1593
+ this.isSaving = !1;
1594
+ }, 500);
1595
+ },
1596
+ selectItem(e) {
1597
+ this.$emit("screen-selected", e);
1598
+ },
1599
+ editorSelected(e) {
1600
+ this.$emit("editor-selected", e);
1601
+ },
1602
+ modelKeySelected(e) {
1603
+ this.$emit("model-key-selected", e);
1604
+ },
1605
+ documentationKeySelected(e) {
1606
+ this.$emit("documentation-key-selected", e);
1607
+ },
1608
+ connectionKeySelected(e) {
1609
+ this.$emit("connection-key-selected", e);
1610
+ },
1611
+ dashboardKeySelected(e) {
1612
+ this.$emit("dashboard-key-selected", e);
1613
+ },
1614
+ toggleMobileMenu() {
1615
+ this.$emit("toggle-mobile-menu");
1616
+ },
1617
+ llmKeySelected(e) {
1618
+ this.$emit("llm-key-selected", e);
1619
+ },
1620
+ llmOpenView(e, t, s) {
1621
+ this.$emit("llm-open-view", e, t, s);
1622
+ },
1623
+ createNewChat(e) {
1624
+ this.$emit("create-new-chat", e);
1625
+ },
1626
+ saveEditors() {
1627
+ this.$emit("save-editors");
1628
+ },
1629
+ saveDashboards() {
1630
+ this.$emit("save-dashboards");
1631
+ },
1632
+ openSettings() {
1633
+ console.log("Settings clicked");
1634
+ },
1635
+ openProfile() {
1636
+ console.log("Profile clicked");
1637
+ },
1638
+ getUrl(e) {
1639
+ const t = new URLSearchParams(window.location.search);
1640
+ return t.set("sidebarScreen", e), `#${t.toString()}`;
1641
+ }
1642
+ }
1643
+ }), eo = { class: "sidebar-container" }, to = {
1644
+ class: "sidebar-icons",
1645
+ "data-testid": "sidebar-icons"
1646
+ }, oo = { class: "trilogy-icon" }, no = { class: "trilogy-icon-wrapper" }, so = ["src"], ao = ["title"], io = {
1647
+ key: 0,
1648
+ class: "sidebar-divider"
1649
+ }, lo = ["onClick", "data-testid"], ro = ["onClick", "href", "data-testid"], co = ["data-testid"], uo = {
1650
+ key: 1,
1651
+ class: "sidebar-divider"
1652
+ }, mo = ["onClick", "data-testid"], vo = ["onClick", "href", "data-testid"], po = ["data-testid"];
1653
+ function bo(e, t, s, n, v, b) {
1654
+ var h, O, M;
1655
+ const d = D("tooltip"), p = D("EditorList"), c = D("ConnectionList"), u = D("LLMConnectionList"), a = D("ModelSidebar"), m = D("TutorialSidebar"), f = D("DashboardList"), j = D("CommunityModelList");
1656
+ return r(), y("div", eo, [
1657
+ o("div", to, [
1658
+ o("div", oo, [
1659
+ o("div", no, [
1660
+ N(d, {
1661
+ content: e.unSaved ? `Save ${e.unSaved} ${(((h = e.unSaved) == null ? void 0 : h.valueOf()) || 0) > 1 ? "changes" : "change"}` : "All changes saved!"
1662
+ }, {
1663
+ default: k(() => [
1664
+ o("img", {
1665
+ class: U(["trilogy-icon", { spinning: e.isSaving }]),
1666
+ onClick: t[0] || (t[0] = (...l) => e.handleSave && e.handleSave(...l)),
1667
+ src: e.trilogyIcon,
1668
+ "data-testid": "trilogy-icon"
1669
+ }, null, 10, so)
1670
+ ]),
1671
+ _: 1
1672
+ }, 8, ["content"]),
1673
+ (((O = e.unSaved) == null ? void 0 : O.valueOf()) || 0) > 0 ? (r(), y("div", {
1674
+ key: 0,
1675
+ class: "unsaved-badge",
1676
+ title: `${e.unSaved} unsaved ${(((M = e.unSaved) == null ? void 0 : M.valueOf()) || 0) > 1 ? "changes" : "change"}`
1677
+ }, K(e.unSaved), 9, ao)) : S("", !0)
1678
+ ])
1679
+ ]),
1680
+ t[9] || (t[9] = o("div", { class: "trilogy-icon-padding" }, null, -1)),
1681
+ e.isMobile ? S("", !0) : (r(), y("div", io)),
1682
+ (r(!0), y(V, null, J(e.sidebarItems, (l, $) => (r(), y("div", {
1683
+ key: l.name,
1684
+ class: U(["sidebar-icon", { selected: e.active == l.screen, "sidebar-icon-margin": !e.isMobile }]),
1685
+ onClick: (w) => e.selectItem(l.screen),
1686
+ "data-testid": `sidebar-icon-${l.screen}`
1687
+ }, [
1688
+ e.isMobile ? (r(), y(V, { key: 1 }, [
1689
+ o("i", {
1690
+ class: U(l.icon),
1691
+ "data-testid": `sidebar-link-${l.screen}`
1692
+ }, null, 10, co),
1693
+ o("div", null, K(l.tooltip), 1)
1694
+ ], 64)) : (r(), L(d, {
1695
+ key: 0,
1696
+ content: l.tooltip
1697
+ }, {
1698
+ default: k(() => [
1699
+ o("a", {
1700
+ onClick: B((w) => e.selectItem(l.screen), ["prevent"]),
1701
+ href: e.getUrl(l.screen),
1702
+ target: "_blank",
1703
+ "data-testid": `sidebar-link-${l.screen}`
1704
+ }, [
1705
+ o("i", {
1706
+ class: U(l.icon)
1707
+ }, null, 2)
1708
+ ], 8, ro)
1709
+ ]),
1710
+ _: 2
1711
+ }, 1032, ["content"]))
1712
+ ], 10, lo))), 128)),
1713
+ e.isMobile ? S("", !0) : (r(), y("div", uo)),
1714
+ (r(!0), y(V, null, J(e.sidebarFeatureItems, (l, $) => (r(), y("div", {
1715
+ key: l.name,
1716
+ class: U(["sidebar-icon", { selected: e.active == l.screen, "sidebar-icon-margin": !e.isMobile }]),
1717
+ onClick: (w) => e.selectItem(l.screen),
1718
+ "data-testid": `sidebar-icon-${l.screen}`
1719
+ }, [
1720
+ e.isMobile ? (r(), y(V, { key: 1 }, [
1721
+ o("i", {
1722
+ class: U(l.icon),
1723
+ "data-testid": `sidebar-link-${l.screen}`
1724
+ }, null, 10, po),
1725
+ o("div", null, K(l.tooltip), 1)
1726
+ ], 64)) : (r(), L(d, {
1727
+ key: 0,
1728
+ content: l.tooltip
1729
+ }, {
1730
+ default: k(() => [
1731
+ o("a", {
1732
+ onClick: B((w) => e.selectItem(l.screen), ["prevent"]),
1733
+ href: e.getUrl(l.screen),
1734
+ target: "_blank",
1735
+ "data-testid": `sidebar-link-${l.screen}`
1736
+ }, [
1737
+ o("i", {
1738
+ class: U(l.icon)
1739
+ }, null, 2)
1740
+ ], 8, vo)
1741
+ ]),
1742
+ _: 2
1743
+ }, 1032, ["content"]))
1744
+ ], 10, mo))), 128)),
1745
+ o("div", {
1746
+ class: U(["sidebar-bottom-icons", { "sidebar-bottom-icons-mobile": e.isMobile }])
1747
+ }, [
1748
+ o("div", {
1749
+ class: U(["sidebar-icon", { selected: e.active == "settings", "sidebar-icon-margin": !e.isMobile }]),
1750
+ onClick: t[1] || (t[1] = (l) => e.selectItem("settings")),
1751
+ "data-testid": "sidebar-icon-settings"
1752
+ }, [
1753
+ e.isMobile ? (r(), y(V, { key: 1 }, [
1754
+ t[4] || (t[4] = o("i", { class: "mdi mdi-cog-outline" }, null, -1)),
1755
+ t[5] || (t[5] = o("div", null, "Settings", -1))
1756
+ ], 64)) : (r(), L(d, {
1757
+ key: 0,
1758
+ content: "Settings"
1759
+ }, {
1760
+ default: k(() => [...t[3] || (t[3] = [
1761
+ o("i", { class: "mdi mdi-cog-outline" }, null, -1)
1762
+ ])]),
1763
+ _: 1
1764
+ }))
1765
+ ], 2),
1766
+ o("div", {
1767
+ class: U(["sidebar-icon", { selected: e.active == "profile", "sidebar-icon-margin": !e.isMobile }]),
1768
+ "data-testid": "sidebar-icon-profile",
1769
+ onClick: t[2] || (t[2] = (l) => e.selectItem("profile"))
1770
+ }, [
1771
+ e.isMobile ? (r(), y(V, { key: 1 }, [
1772
+ t[7] || (t[7] = o("i", { class: "mdi mdi-account-outline" }, null, -1)),
1773
+ t[8] || (t[8] = o("div", null, "Profile", -1))
1774
+ ], 64)) : (r(), L(d, {
1775
+ key: 0,
1776
+ content: "Profile"
1777
+ }, {
1778
+ default: k(() => [...t[6] || (t[6] = [
1779
+ o("i", { class: "mdi mdi-account-outline" }, null, -1)
1780
+ ])]),
1781
+ _: 1
1782
+ }))
1783
+ ], 2)
1784
+ ], 2)
1785
+ ]),
1786
+ o("div", {
1787
+ class: "sidebar-content",
1788
+ style: de({ width: e.containerWidth - 40 + "px" })
1789
+ }, [
1790
+ T(N(p, {
1791
+ activeEditor: e.activeEditor,
1792
+ onEditorSelected: e.editorSelected,
1793
+ onSaveEditors: e.saveEditors
1794
+ }, null, 8, ["activeEditor", "onEditorSelected", "onSaveEditors"]), [
1795
+ [W, e.active === "editors"]
1796
+ ]),
1797
+ T(N(c, {
1798
+ onConnectionKeySelected: e.connectionKeySelected,
1799
+ onToggleMobileMenu: e.toggleMobileMenu,
1800
+ activeConnectionKey: e.activeConnectionKey
1801
+ }, null, 8, ["onConnectionKeySelected", "onToggleMobileMenu", "activeConnectionKey"]), [
1802
+ [W, e.active === "connections"]
1803
+ ]),
1804
+ T(N(u, {
1805
+ onLlmConnectionKeySelected: e.llmKeySelected,
1806
+ onLlmOpenView: e.llmOpenView,
1807
+ onCreateNewChat: e.createNewChat,
1808
+ activeLLMKey: e.activeLLMKey
1809
+ }, null, 8, ["onLlmConnectionKeySelected", "onLlmOpenView", "onCreateNewChat", "activeLLMKey"]), [
1810
+ [W, e.active === "llms"]
1811
+ ]),
1812
+ T(N(a, {
1813
+ onModelKeySelected: e.modelKeySelected,
1814
+ activeModelKey: e.activeModelKey
1815
+ }, null, 8, ["onModelKeySelected", "activeModelKey"]), [
1816
+ [W, e.active === "models"]
1817
+ ]),
1818
+ T(N(m, {
1819
+ onDocumentationKeySelected: e.documentationKeySelected,
1820
+ activeDocumentationKey: e.activeDocumentationKey
1821
+ }, null, 8, ["onDocumentationKeySelected", "activeDocumentationKey"]), [
1822
+ [W, e.active === "tutorial"]
1823
+ ]),
1824
+ T(N(f, {
1825
+ onDashboardKeySelected: e.dashboardKeySelected,
1826
+ onSaveEditors: e.saveDashboards,
1827
+ activeDashboardKey: e.activeDashboardKey,
1828
+ onToggleMobileMenu: e.toggleMobileMenu
1829
+ }, null, 8, ["onDashboardKeySelected", "onSaveEditors", "activeDashboardKey", "onToggleMobileMenu"]), [
1830
+ [W, e.active === "dashboard"]
1831
+ ]),
1832
+ T(N(j, null, null, 512), [
1833
+ [W, e.active === "community-models"]
1834
+ ])
1835
+ ], 4)
1836
+ ]);
1837
+ }
1838
+ const So = /* @__PURE__ */ F(xt, [["render", bo], ["__scopeId", "data-v-5d3f6b46"]]);
1839
+ export {
1840
+ So as default
1841
+ };