abstra 3.23.6__py3-none-any.whl → 3.23.8__py3-none-any.whl

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 (252) hide show
  1. {abstra-3.23.6.dist-info → abstra-3.23.8.dist-info}/METADATA +1 -1
  2. {abstra-3.23.6.dist-info → abstra-3.23.8.dist-info}/RECORD +191 -189
  3. abstra_internals/consts/filepaths.py +1 -1
  4. abstra_internals/contracts_generated.py +3791 -3236
  5. abstra_internals/controllers/codebase.py +9 -18
  6. abstra_internals/controllers/codebase_events.py +6 -4
  7. abstra_internals/controllers/main.py +56 -67
  8. abstra_internals/interface/cli/deploy.py +1 -3
  9. abstra_internals/repositories/linter/repository.py +9 -40
  10. abstra_internals/repositories/linter/rules/__init__.py +2 -0
  11. abstra_internals/repositories/linter/rules/big_py_files.py +40 -0
  12. abstra_internals/repositories/linter/rules/big_py_files_test.py +93 -0
  13. abstra_internals/repositories/linter/rules/duplicate_package_in_requirements.py +16 -4
  14. abstra_internals/repositories/linter/rules/duplicate_package_in_requirements_test.py +24 -3
  15. abstra_internals/repositories/linter/rules/env_in_bundle.py +3 -6
  16. abstra_internals/repositories/linter/rules/env_in_bundle_test.py +4 -3
  17. abstra_internals/repositories/linter/rules/missing_packages_in_requirements.py +12 -1
  18. abstra_internals/repositories/linter/rules/syntax_errors.py +2 -19
  19. abstra_internals/repositories/linter/rules/venv_in_bundle.py +3 -2
  20. abstra_internals/server/routes/requirements.py +7 -3
  21. abstra_internals/server/routes/workspace.py +0 -10
  22. abstra_internals/services/fs.py +144 -99
  23. abstra_internals/services/fs_test.py +303 -8
  24. abstra_internals/services/requirements.py +271 -81
  25. abstra_internals/services/requirements_test.py +528 -164
  26. abstra_internals/templates/__init__.py +3 -1
  27. abstra_statics/dist/assets/AbstraButton.vue_vue_type_script_setup_true_lang.205eb76e.js +2 -0
  28. abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.32a17b0c.js +2 -0
  29. abstra_statics/dist/assets/{ApiKeys.05b5ab9a.js → ApiKeys.7fefafb4.js} +2 -2
  30. abstra_statics/dist/assets/App.c29df54f.js +2 -0
  31. abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.efd9d3fa.js +2 -0
  32. abstra_statics/dist/assets/BaseLayout.b60c33b8.js +2 -0
  33. abstra_statics/dist/assets/Billing.b9f77b65.js +2 -0
  34. abstra_statics/dist/assets/{Breadcrumb.6179cdce.js → Breadcrumb.d0cc2c91.js} +2 -2
  35. abstra_statics/dist/assets/{Builds.43df5473.js → Builds.18e4ba1a.js} +2 -2
  36. abstra_statics/dist/assets/{Card.bf61638b.js → Card.957a87b2.js} +2 -2
  37. abstra_statics/dist/assets/{CircularLoading.e6d19d98.js → CircularLoading.3e4ddd6d.js} +2 -2
  38. abstra_statics/dist/assets/CloseCircleOutlined.4e05b917.js +2 -0
  39. abstra_statics/dist/assets/{ConnectorsView.5cef13aa.css → ConnectorsView.17764dde.css} +1 -1
  40. abstra_statics/dist/assets/ConnectorsView.562a5007.js +2 -0
  41. abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.1d09cfdd.js +2 -0
  42. abstra_statics/dist/assets/ContentLayout.7d5c9f09.js +2 -0
  43. abstra_statics/dist/assets/{CrudView.bbc83763.js → CrudView.8fb84eac.js} +2 -2
  44. abstra_statics/dist/assets/{DocsButton.vue_vue_type_script_setup_true_lang.0796f440.js → DocsButton.vue_vue_type_script_setup_true_lang.0555d923.js} +2 -2
  45. abstra_statics/dist/assets/{EditorLogin.d00bf0ff.js → EditorLogin.02eb6050.js} +2 -2
  46. abstra_statics/dist/assets/{EditorsView.99ba9c06.js → EditorsView.f0ea00fc.js} +2 -2
  47. abstra_statics/dist/assets/EnvVars.063644bb.js +2 -0
  48. abstra_statics/dist/assets/Error.a81122c4.js +2 -0
  49. abstra_statics/dist/assets/ExclamationCircleOutlined.d410fb9a.js +2 -0
  50. abstra_statics/dist/assets/Files.f23b9c53.js +2 -0
  51. abstra_statics/dist/assets/Form.bfea5673.js +2 -0
  52. abstra_statics/dist/assets/{FormRunner.714ce2c1.css → FormRunner.46f6426d.css} +1 -1
  53. abstra_statics/dist/assets/FormRunner.8bbe841e.js +2 -0
  54. abstra_statics/dist/assets/Home.3bf2f131.js +2 -0
  55. abstra_statics/dist/assets/Home.42964d5b.js +2 -0
  56. abstra_statics/dist/assets/{Live.50f8f3ee.js → Live.5dc821b6.js} +2 -2
  57. abstra_statics/dist/assets/LoadingContainer.6e72d482.js +2 -0
  58. abstra_statics/dist/assets/LoadingOutlined.ee72932a.js +2 -0
  59. abstra_statics/dist/assets/Login.0b618d09.js +2 -0
  60. abstra_statics/dist/assets/{Login.35337e9b.js → Login.c702642b.js} +2 -2
  61. abstra_statics/dist/assets/Login.vue_vue_type_script_setup_true_lang.a92a80d0.js +2 -0
  62. abstra_statics/dist/assets/Logo.83b476a4.js +2 -0
  63. abstra_statics/dist/assets/{Logs.412b505f.js → Logs.eebc0504.js} +2 -2
  64. abstra_statics/dist/assets/{LogsController.770e0220.js → LogsController.eb1b811d.js} +2 -2
  65. abstra_statics/dist/assets/Main.88719eb3.js +2 -0
  66. abstra_statics/dist/assets/MockForm.c3318be9.js +2 -0
  67. abstra_statics/dist/assets/Navbar.abf206e9.js +2 -0
  68. abstra_statics/dist/assets/{NewEditor.8f32e814.css → NewEditor.0044878f.css} +1 -1
  69. abstra_statics/dist/assets/NewEditor.5650f697.js +8 -0
  70. abstra_statics/dist/assets/OidcLoginCallback.df2bdeb0.js +2 -0
  71. abstra_statics/dist/assets/OidcLogoutCallback.2ba5316d.js +2 -0
  72. abstra_statics/dist/assets/{OmniChat.7660057c.css → OmniChat.8a35a659.css} +1 -1
  73. abstra_statics/dist/assets/{OmniChat.cb7c5f10.js → OmniChat.de828c54.js} +4 -4
  74. abstra_statics/dist/assets/{OnboardingView.611e451f.js → OnboardingView.1c034f0d.js} +2 -2
  75. abstra_statics/dist/assets/{Organization.16168e9f.js → Organization.855f95a9.js} +2 -2
  76. abstra_statics/dist/assets/Organizations.3db82ab2.js +2 -0
  77. abstra_statics/dist/assets/{PhArrowCounterClockwise.vue.3f439d6d.js → PhArrowCounterClockwise.vue.76c9e146.js} +2 -2
  78. abstra_statics/dist/assets/{PhArrowSquareOut.vue.73431843.js → PhArrowSquareOut.vue.ecfa9cb2.js} +2 -2
  79. abstra_statics/dist/assets/{PhBookBookmark.vue.f5df4397.js → PhBookBookmark.vue.f8f803d9.js} +2 -2
  80. abstra_statics/dist/assets/{PhChats.vue.20c511b5.js → PhChats.vue.dfda946c.js} +2 -2
  81. abstra_statics/dist/assets/{PhClockCounterClockwise.vue.21ab2795.js → PhClockCounterClockwise.vue.cd77fd26.js} +2 -2
  82. abstra_statics/dist/assets/{PhCopy.vue.f0a6fc0c.js → PhCopy.vue.a63b48dd.js} +2 -2
  83. abstra_statics/dist/assets/{PhCopySimple.vue.f585b051.js → PhCopySimple.vue.ecffb042.js} +2 -2
  84. abstra_statics/dist/assets/{PhCube.vue.c7b0863a.js → PhCube.vue.b5b96a33.js} +2 -2
  85. abstra_statics/dist/assets/{PhDotsThreeVertical.vue.c1812ea8.js → PhDotsThreeVertical.vue.2db678ef.js} +2 -2
  86. abstra_statics/dist/assets/{PhDownloadSimple.vue.24466182.js → PhDownloadSimple.vue.cbca4f9b.js} +2 -2
  87. abstra_statics/dist/assets/{PhFolderPlus.vue.0cd449af.js → PhFolderPlus.vue.dfb9b117.js} +2 -2
  88. abstra_statics/dist/assets/{PhGear.vue.24fe28a2.js → PhGear.vue.6e1aeed0.js} +2 -2
  89. abstra_statics/dist/assets/{PhKey.vue.39ca7afb.js → PhKey.vue.50d82bb5.js} +2 -2
  90. abstra_statics/dist/assets/{PhPencil.vue.a86916ee.js → PhPencil.vue.ae2943da.js} +2 -2
  91. abstra_statics/dist/assets/{PhPencilSimple.vue.80a4282f.js → PhPencilSimple.vue.9042e169.js} +2 -2
  92. abstra_statics/dist/assets/{PhPencilSimpleLine.vue.a1883531.js → PhPencilSimpleLine.vue.f840cf0d.js} +2 -2
  93. abstra_statics/dist/assets/{PhRocket.vue.acacaa11.js → PhRocket.vue.3b5927aa.js} +2 -2
  94. abstra_statics/dist/assets/{PhSignOut.vue.3cb7cd40.js → PhSignOut.vue.d00d3657.js} +2 -2
  95. abstra_statics/dist/assets/{PhSparkle.vue.8e334c6d.js → PhSparkle.vue.8a94f3a0.js} +2 -2
  96. abstra_statics/dist/assets/{PhUserList.vue.38f46bf2.js → PhUserList.vue.3791cb59.js} +2 -2
  97. abstra_statics/dist/assets/{PhUsersThree.vue.f3486eeb.js → PhUsersThree.vue.ef0376b6.js} +2 -2
  98. abstra_statics/dist/assets/{PhWebhooksLogo.vue.3f80aef6.js → PhWebhooksLogo.vue.fe81fb65.js} +2 -2
  99. abstra_statics/dist/assets/{PlayerConfigProvider.0ec5f598.js → PlayerConfigProvider.2acd3a77.js} +2 -2
  100. abstra_statics/dist/assets/PlayerNavbar.13876ce7.js +2 -0
  101. abstra_statics/dist/assets/Project.0277535f.js +2 -0
  102. abstra_statics/dist/assets/ProjectLogin.46d5036b.js +2 -0
  103. abstra_statics/dist/assets/{ProjectSettings.17a585e6.js → ProjectSettings.652a838b.js} +2 -2
  104. abstra_statics/dist/assets/{ProjectsView.3f2dabb4.js → ProjectsView.c5ec993b.js} +2 -2
  105. abstra_statics/dist/assets/{SaveButton.57d5b00a.js → SaveButton.ac38b361.js} +2 -2
  106. abstra_statics/dist/assets/{files.b6e46123.js → ScrollArea.vue_vue_type_script_setup_true_lang.a58564d3.js} +2 -2
  107. abstra_statics/dist/assets/{Sidebar.3bc6e6c7.js → Sidebar.56e51ab5.js} +2 -2
  108. abstra_statics/dist/assets/Sql.3cdc910a.css +1 -0
  109. abstra_statics/dist/assets/Sql.6961306b.js +5 -0
  110. abstra_statics/dist/assets/Steps.f820fb18.js +2 -0
  111. abstra_statics/dist/assets/{TableEditor.791324c3.js → TableEditor.df6a4852.js} +2 -2
  112. abstra_statics/dist/assets/Tables.198b84c5.js +2 -0
  113. abstra_statics/dist/assets/{TablesDiagram.d27523e8.js → TablesDiagram.811d464d.js} +2 -2
  114. abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.e6074880.js +2 -0
  115. abstra_statics/dist/assets/{Tasks.9f66e5d4.js → Tasks.df69d20e.js} +2 -2
  116. abstra_statics/dist/assets/{UploadOutlined.1e2f50aa.js → UploadOutlined.b601a592.js} +2 -2
  117. abstra_statics/dist/assets/{View.2b0dde2c.js → View.7a2ccc33.js} +2 -2
  118. abstra_statics/dist/assets/View.vue_vue_type_script_setup_true_lang.424410a2.js +2 -0
  119. abstra_statics/dist/assets/Watermark.40c8c47e.js +2 -0
  120. abstra_statics/dist/assets/{WebEditor.cdb4d362.js → WebEditor.82a3accf.js} +2 -2
  121. abstra_statics/dist/assets/{WidgetPreview.73776456.js → WidgetPreview.0f938200.js} +2 -2
  122. abstra_statics/dist/assets/ant-design.544de4a0.js +2 -0
  123. abstra_statics/dist/assets/apiKey.95126643.js +2 -0
  124. abstra_statics/dist/assets/asyncComputed.1b787534.js +2 -0
  125. abstra_statics/dist/assets/{build.36ea33ce.js → build.997fec15.js} +2 -2
  126. abstra_statics/dist/assets/{colorHelpers.f396fe13.js → colorHelpers.d4f3f275.js} +2 -2
  127. abstra_statics/dist/assets/{console.d7a64eef.js → console.54ab975c.js} +2 -2
  128. abstra_statics/dist/assets/constants.36bf7d70.js +2 -0
  129. abstra_statics/dist/assets/{cssMode.a2f505eb.js → cssMode.c1aa21d7.js} +2 -2
  130. abstra_statics/dist/assets/datetime.adc0acc4.js +2 -0
  131. abstra_statics/dist/assets/dayjs.a6bd0ee0.js +2 -0
  132. abstra_statics/dist/assets/editor.0ce52658.js +2 -0
  133. abstra_statics/dist/assets/editor.main.353e9a8f.js +2 -0
  134. abstra_statics/dist/assets/fetch.83d89bdc.js +2 -0
  135. abstra_statics/dist/assets/{folder.8e3a1b23.js → folder.41d37eb7.js} +2 -2
  136. abstra_statics/dist/assets/{freemarker2.48cf9094.js → freemarker2.40778f3f.js} +2 -2
  137. abstra_statics/dist/assets/{handlebars.b7185455.js → handlebars.92d4ff2a.js} +3 -3
  138. abstra_statics/dist/assets/{html.9eecf18a.js → html.b3c0c53a.js} +3 -3
  139. abstra_statics/dist/assets/{htmlMode.1b022721.js → htmlMode.1212da49.js} +2 -2
  140. abstra_statics/dist/assets/{index.2f04e3f6.js → index.36d8b30a.js} +5 -5
  141. abstra_statics/dist/assets/{index.bbe55f1a.js → index.37c46161.js} +2 -2
  142. abstra_statics/dist/assets/index.3d2a7b6d.js +2 -0
  143. abstra_statics/dist/assets/{index.25898d95.js → index.3e7471f4.js} +2 -2
  144. abstra_statics/dist/assets/{index.2d59a444.js → index.3ff1c0be.js} +3 -3
  145. abstra_statics/dist/assets/index.5e22e010.js +2 -0
  146. abstra_statics/dist/assets/{index.36aedb48.js → index.9e0166fe.js} +2 -2
  147. abstra_statics/dist/assets/{index.726d6111.js → index.a7b8e25e.js} +2 -2
  148. abstra_statics/dist/assets/{index.aca944a5.js → index.d181a22c.js} +2 -2
  149. abstra_statics/dist/assets/{javascript.84f7229f.js → javascript.f9710043.js} +3 -3
  150. abstra_statics/dist/assets/{jsonMode.1d488dc1.js → jsonMode.16d00c0d.js} +2 -2
  151. abstra_statics/dist/assets/{jwt-decode.esm.28320b05.js → jwt-decode.esm.992666e9.js} +8 -8
  152. abstra_statics/dist/assets/linters.3c5f0c83.js +2 -0
  153. abstra_statics/dist/assets/{liquid.5b33b8cc.js → liquid.9a777e1a.js} +3 -3
  154. abstra_statics/dist/assets/{member.73d141d7.js → member.6b2b3438.js} +2 -2
  155. abstra_statics/dist/assets/{metadata.8c8d4b20.js → metadata.cfad5458.js} +2 -2
  156. abstra_statics/dist/assets/omniChatStore.2b85c342.js +8 -0
  157. abstra_statics/dist/assets/{organization.7d79a3c7.js → organization.53636095.js} +2 -2
  158. abstra_statics/dist/assets/player.5b7eaa25.js +2 -0
  159. abstra_statics/dist/assets/{plotly.min.bc8ddded.js → plotly.min.9b8bef5c.js} +2 -2
  160. abstra_statics/dist/assets/polling.88a266b3.js +2 -0
  161. abstra_statics/dist/assets/{project.c76d644e.js → project.76f0af14.js} +2 -2
  162. abstra_statics/dist/assets/{python.1a326b7a.js → python.ae8270c8.js} +2 -2
  163. abstra_statics/dist/assets/{razor.3d5f09e6.js → razor.4f24e19e.js} +3 -3
  164. abstra_statics/dist/assets/{record.1b6df81e.js → record.87ef3b68.js} +2 -2
  165. abstra_statics/dist/assets/redirect.2fa4f8cf.js +2 -0
  166. abstra_statics/dist/assets/{repository.37d2927a.js → repository.9d5310b6.js} +2 -2
  167. abstra_statics/dist/assets/{repository.cc27afed.js → repository.af418855.js} +2 -2
  168. abstra_statics/dist/assets/{router.858e1af2.js → router.1324a1a9.js} +3 -3
  169. abstra_statics/dist/assets/router.55c0ff56.js +2 -0
  170. abstra_statics/dist/assets/{string.4c218fd1.js → string.f6a7565f.js} +2 -2
  171. abstra_statics/dist/assets/{tables.337a9b65.js → tables.c26107a1.js} +2 -2
  172. abstra_statics/dist/assets/{tasksController.a06fd7d3.js → tasksController.22584849.js} +2 -2
  173. abstra_statics/dist/assets/{toggleHighContrast.62d05446.js → toggleHighContrast.fc60753d.js} +7 -7
  174. abstra_statics/dist/assets/{tsMode.cacd2597.js → tsMode.a4b9b524.js} +2 -2
  175. abstra_statics/dist/assets/{typescript.a2a6a629.js → typescript.ab90fd1d.js} +3 -3
  176. abstra_statics/dist/assets/url.f490879d.js +2 -0
  177. abstra_statics/dist/assets/userStore.9e7a540a.js +2 -0
  178. abstra_statics/dist/assets/uuid.9161765c.js +2 -0
  179. abstra_statics/dist/assets/{vue-flow-background.d047c675.js → vue-flow-background.8e4c22c3.js} +2 -2
  180. abstra_statics/dist/assets/{vue-quill.esm-bundler.772b3404.js → vue-quill.esm-bundler.64c5837f.js} +2 -2
  181. abstra_statics/dist/assets/workspaceStore.4f0c433f.js +2 -0
  182. abstra_statics/dist/assets/{xml.e6a1736d.js → xml.3541c340.js} +2 -2
  183. abstra_statics/dist/assets/{yaml.47c8c844.js → yaml.314312d8.js} +3 -3
  184. abstra_statics/dist/console.html +15 -15
  185. abstra_statics/dist/editor.html +11 -11
  186. abstra_statics/dist/player.html +9 -9
  187. tests/e2e/test_crud_files.py +0 -1
  188. tests/e2e/test_requirements.py +41 -4
  189. abstra_statics/dist/assets/AbstraButton.vue_vue_type_script_setup_true_lang.5ac4912e.js +0 -2
  190. abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.9fc63b70.js +0 -2
  191. abstra_statics/dist/assets/App.c04b86c0.js +0 -2
  192. abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.4abdaaf3.js +0 -2
  193. abstra_statics/dist/assets/BaseLayout.d7e7e9fe.js +0 -2
  194. abstra_statics/dist/assets/Billing.57e2ca6b.js +0 -2
  195. abstra_statics/dist/assets/CloseCircleOutlined.5183baf0.js +0 -2
  196. abstra_statics/dist/assets/ConnectorsView.c29b5831.js +0 -2
  197. abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.c7982f0e.js +0 -2
  198. abstra_statics/dist/assets/ContentLayout.d3e84c3e.js +0 -2
  199. abstra_statics/dist/assets/EnvVars.3223d4dd.js +0 -2
  200. abstra_statics/dist/assets/Error.73539d40.js +0 -2
  201. abstra_statics/dist/assets/ExclamationCircleOutlined.5ed9d71f.js +0 -2
  202. abstra_statics/dist/assets/Files.7358e813.js +0 -2
  203. abstra_statics/dist/assets/Form.7b7f61dd.js +0 -2
  204. abstra_statics/dist/assets/FormRunner.617659c3.js +0 -2
  205. abstra_statics/dist/assets/Home.50e3cb44.js +0 -2
  206. abstra_statics/dist/assets/Home.e051b43c.js +0 -2
  207. abstra_statics/dist/assets/LoadingContainer.af0e1ba2.js +0 -2
  208. abstra_statics/dist/assets/LoadingOutlined.6ed83a08.js +0 -2
  209. abstra_statics/dist/assets/Login.99bd4c40.js +0 -2
  210. abstra_statics/dist/assets/Login.vue_vue_type_script_setup_true_lang.d3c2d47f.js +0 -2
  211. abstra_statics/dist/assets/Logo.e3649776.js +0 -2
  212. abstra_statics/dist/assets/Main.738990b8.js +0 -2
  213. abstra_statics/dist/assets/MockForm.4ead504b.js +0 -2
  214. abstra_statics/dist/assets/Navbar.50988594.js +0 -2
  215. abstra_statics/dist/assets/NewEditor.13d26823.js +0 -8
  216. abstra_statics/dist/assets/OidcLoginCallback.4982d0fb.js +0 -2
  217. abstra_statics/dist/assets/OidcLogoutCallback.717d758c.js +0 -2
  218. abstra_statics/dist/assets/Organizations.68ef6411.js +0 -2
  219. abstra_statics/dist/assets/PlayerNavbar.24544fa8.js +0 -2
  220. abstra_statics/dist/assets/Project.997d68f7.js +0 -2
  221. abstra_statics/dist/assets/ProjectLogin.311c2cd8.js +0 -2
  222. abstra_statics/dist/assets/Sql.1afe0bac.css +0 -1
  223. abstra_statics/dist/assets/Sql.c74977b7.js +0 -5
  224. abstra_statics/dist/assets/Steps.79eea5ae.js +0 -2
  225. abstra_statics/dist/assets/Tables.5cfd01db.js +0 -2
  226. abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.82db1c2e.js +0 -2
  227. abstra_statics/dist/assets/View.vue_vue_type_script_setup_true_lang.34afb660.js +0 -2
  228. abstra_statics/dist/assets/Watermark.047823a2.js +0 -2
  229. abstra_statics/dist/assets/ant-design.dc326d34.js +0 -2
  230. abstra_statics/dist/assets/apiKey.d428e427.js +0 -2
  231. abstra_statics/dist/assets/asyncComputed.decbe125.js +0 -2
  232. abstra_statics/dist/assets/constants.54f5dbb0.js +0 -2
  233. abstra_statics/dist/assets/datetime.27912eb6.js +0 -2
  234. abstra_statics/dist/assets/dayjs.9a51c922.js +0 -2
  235. abstra_statics/dist/assets/editor.ac3f0982.js +0 -2
  236. abstra_statics/dist/assets/editor.main.39fc3e9d.js +0 -2
  237. abstra_statics/dist/assets/fetch.9946ecfe.js +0 -2
  238. abstra_statics/dist/assets/index.3a2ab2d2.js +0 -2
  239. abstra_statics/dist/assets/index.b0181193.js +0 -2
  240. abstra_statics/dist/assets/index.e21caff3.js +0 -2
  241. abstra_statics/dist/assets/linters.ed377d41.js +0 -2
  242. abstra_statics/dist/assets/omniChatStore.b7128bc4.js +0 -10
  243. abstra_statics/dist/assets/player.027b4a53.js +0 -2
  244. abstra_statics/dist/assets/polling.0bb90faf.js +0 -2
  245. abstra_statics/dist/assets/redirect.d8affe75.js +0 -2
  246. abstra_statics/dist/assets/url.e7d14364.js +0 -2
  247. abstra_statics/dist/assets/userStore.c0562f9d.js +0 -2
  248. abstra_statics/dist/assets/uuid.fe529613.js +0 -2
  249. abstra_statics/dist/assets/workspaceStore.20104d6a.js +0 -2
  250. {abstra-3.23.6.dist-info → abstra-3.23.8.dist-info}/WHEEL +0 -0
  251. {abstra-3.23.6.dist-info → abstra-3.23.8.dist-info}/entry_points.txt +0 -0
  252. {abstra-3.23.6.dist-info → abstra-3.23.8.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2 @@
1
+ import{f as c,e7 as d,eY as o}from"./jwt-decode.esm.992666e9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d03a1514-6ed0-4b9d-a1c1-8caf35c4e7ad",e._sentryDebugIdIdentifier="sentry-dbid-d03a1514-6ed0-4b9d-a1c1-8caf35c4e7ad")}catch{}})();function l(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable}))),n.forEach(function(a){u(e,a,r[a])})}return e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=function(t,r){var n=l({},t,r.attrs);return c(d,l({},n,{icon:o}),null)};i.displayName="CloseCircleOutlined";i.inheritAttrs=!1;const s=i;export{s as C};
2
+ //# sourceMappingURL=CloseCircleOutlined.4e05b917.js.map
@@ -1 +1 @@
1
- .connector-card[data-v-f5866f99]{cursor:pointer;transition:all .3s;&[data-v-f5866f99]:hover{box-shadow:0 0 15px #0000001a}&.unavailable[data-v-f5866f99]{opacity:.7;&[data-v-f5866f99]:hover{box-shadow:none}}}.connectors-grid[data-v-54173699]{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px}
1
+ .connector-card[data-v-f5866f99]{cursor:pointer;transition:all .3s;&[data-v-f5866f99]:hover{box-shadow:0 0 15px #0000001a}&.unavailable[data-v-f5866f99]{opacity:.7;&[data-v-f5866f99]:hover{box-shadow:none}}}.connectors-grid[data-v-7616c928]{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px}
@@ -0,0 +1,2 @@
1
+ var ee=Object.defineProperty;var ne=(u,e,a)=>e in u?ee(u,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):u[e]=a;var S=(u,e,a)=>(ne(u,typeof e!="symbol"?e+"":e,a),a);import{_ as te}from"./DocsButton.vue_vue_type_script_setup_true_lang.0555d923.js";import{_ as q}from"./AbstraButton.vue_vue_type_script_setup_true_lang.205eb76e.js";import{d as L,am as Z,c as $,o as d,a5 as m,a7 as W,h as H,e6 as Y,e as _,r as E,M as x,a as C,b as c,f as r,u as t,de as b,d4 as ae,g as f,da as M,ed as F,ea as oe,_ as J,w as G,ec as P,cz as le,bJ as D,cE as se,db as ie,aR as U,cy as ce,d9 as K,cW as re,eb as de,A as B,bP as ue,bx as pe,bw as O,eG as he,er as ge,es as ve}from"./jwt-decode.esm.992666e9.js";import{G as ye}from"./PhDotsThreeVertical.vue.2db678ef.js";import{h as N,l as me}from"./router.1324a1a9.js";import{G as fe}from"./PhWebhooksLogo.vue.fe81fb65.js";import{A as Q}from"./index.9e0166fe.js";import{C as X}from"./Card.957a87b2.js";import{U as Ce}from"./UploadOutlined.b601a592.js";import{_ as ke}from"./AbstraLogo.vue_vue_type_script_setup_true_lang.32a17b0c.js";import{L as we}from"./Logo.83b476a4.js";import{A as be}from"./index.3d2a7b6d.js";import"./constants.36bf7d70.js";import"./index.d181a22c.js";(function(){try{var u=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(u._sentryDebugIds=u._sentryDebugIds||{},u._sentryDebugIds[e]="b528b603-7add-4195-b1ae-29728de99af3",u._sentryDebugIdIdentifier="sentry-dbid-b528b603-7add-4195-b1ae-29728de99af3")}catch{}})();const _e=["width","height","fill","transform"],He={key:0},Ve=_("path",{d:"M216.49,184.49l-32,32a12,12,0,0,1-17-17L179,188H48a12,12,0,0,1,0-24H179l-11.52-11.51a12,12,0,0,1,17-17l32,32A12,12,0,0,1,216.49,184.49Zm-145-64a12,12,0,0,0,17-17L77,92H208a12,12,0,0,0,0-24H77L88.49,56.49a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17Z"},null,-1),Ae=[Ve],$e={key:1},Ie=_("path",{d:"M208,80v96H48V80Z",opacity:"0.2"},null,-1),Te=_("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"},null,-1),Se=[Ie,Te],Ue={key:2},Me=_("path",{d:"M42.34,85.66a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,88,48V72H208a8,8,0,0,1,0,16H88v24a8,8,0,0,1-13.66,5.66Zm171.32,84.68-32-32A8,8,0,0,0,168,144v24H48a8,8,0,0,0,0,16H168v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,213.66,170.34Z"},null,-1),je=[Me],Ne={key:3},Ze=_("path",{d:"M212.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L193.51,182H48a6,6,0,0,1,0-12H193.51l-21.75-21.76a6,6,0,0,1,8.48-8.48ZM75.76,116.24a6,6,0,0,0,8.48-8.48L62.49,86H208a6,6,0,0,0,0-12H62.49L84.24,52.24a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48Z"},null,-1),Fe=[Ze],Le={key:4},Ee=_("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"},null,-1),ze=[Ee],Ke={key:5},xe=_("path",{d:"M210.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L198.34,180H48a4,4,0,0,1,0-8H198.34l-25.17-25.17a4,4,0,0,1,5.66-5.66ZM77.17,114.83a4,4,0,0,0,5.66-5.66L57.66,84H208a4,4,0,0,0,0-8H57.66L82.83,50.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66Z"},null,-1),Pe=[xe],De={name:"PhArrowsLeftRight"},Be=L({...De,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(u){const e=u,a=Z("weight","regular"),n=Z("size","1em"),o=Z("color","currentColor"),h=Z("mirrored",!1),g=$(()=>{var l;return(l=e.weight)!=null?l:a}),k=$(()=>{var l;return(l=e.size)!=null?l:n}),V=$(()=>{var l;return(l=e.color)!=null?l:o}),T=$(()=>e.mirrored!==void 0?e.mirrored?"scale(-1, 1)":void 0:h?"scale(-1, 1)":void 0);return(l,i)=>(d(),m("svg",Y({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:k.value,height:k.value,fill:V.value,transform:T.value},l.$attrs),[W(l.$slots,"default"),g.value==="bold"?(d(),m("g",He,Ae)):g.value==="duotone"?(d(),m("g",$e,Se)):g.value==="fill"?(d(),m("g",Ue,je)):g.value==="light"?(d(),m("g",Ne,Fe)):g.value==="regular"?(d(),m("g",Le,ze)):g.value==="thin"?(d(),m("g",Ke,Pe)):H("",!0)],16,_e))}}),Re=["width","height","fill","transform"],qe={key:0},Ge=_("path",{d:"M224,64H180V56a28,28,0,0,0-28-28H104A28,28,0,0,0,76,56v8H32A20,20,0,0,0,12,84V192a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V84A20,20,0,0,0,224,64ZM100,56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4v8H100ZM220,88v32H196v-4a12,12,0,0,0-24,0v4H84v-4a12,12,0,0,0-24,0v4H36V88ZM36,188V144H60v4a12,12,0,0,0,24,0v-4h88v4a12,12,0,0,0,24,0v-4h24v44Z"},null,-1),Oe=[Ge],We={key:1},Ye=_("path",{d:"M232,120v72a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V120Z",opacity:"0.2"},null,-1),Je=_("path",{d:"M224,64H176V56a24,24,0,0,0-24-24H104A24,24,0,0,0,80,56v8H32A16,16,0,0,0,16,80V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V80A16,16,0,0,0,224,64ZM96,56a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96ZM32,80H224v32H192v-8a8,8,0,0,0-16,0v8H80v-8a8,8,0,0,0-16,0v8H32ZM224,192H32V128H64v8a8,8,0,0,0,16,0v-8h96v8a8,8,0,0,0,16,0v-8h32v64Z"},null,-1),Qe=[Ye,Je],Xe={key:2},en=_("path",{d:"M224,64H176V56a24,24,0,0,0-24-24H104A24,24,0,0,0,80,56v8H32A16,16,0,0,0,16,80v28a4,4,0,0,0,4,4H64V96.27A8.17,8.17,0,0,1,71.47,88,8,8,0,0,1,80,96v16h96V96.27A8.17,8.17,0,0,1,183.47,88,8,8,0,0,1,192,96v16h44a4,4,0,0,0,4-4V80A16,16,0,0,0,224,64Zm-64,0H96V56a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm80,68v60a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V132a4,4,0,0,1,4-4H64v16a8,8,0,0,0,8.53,8A8.17,8.17,0,0,0,80,143.73V128h96v16a8,8,0,0,0,8.53,8,8.17,8.17,0,0,0,7.47-8.25V128h44A4,4,0,0,1,240,132Z"},null,-1),nn=[en],tn={key:3},an=_("path",{d:"M224,66H174V56a22,22,0,0,0-22-22H104A22,22,0,0,0,82,56V66H32A14,14,0,0,0,18,80V192a14,14,0,0,0,14,14H224a14,14,0,0,0,14-14V80A14,14,0,0,0,224,66ZM94,56a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V66H94ZM32,78H224a2,2,0,0,1,2,2v34H190V104a6,6,0,0,0-12,0v10H78V104a6,6,0,0,0-12,0v10H30V80A2,2,0,0,1,32,78ZM224,194H32a2,2,0,0,1-2-2V126H66v10a6,6,0,0,0,12,0V126H178v10a6,6,0,0,0,12,0V126h36v66A2,2,0,0,1,224,194Z"},null,-1),on=[an],ln={key:4},sn=_("path",{d:"M224,64H176V56a24,24,0,0,0-24-24H104A24,24,0,0,0,80,56v8H32A16,16,0,0,0,16,80V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V80A16,16,0,0,0,224,64ZM96,56a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96ZM224,80v32H192v-8a8,8,0,0,0-16,0v8H80v-8a8,8,0,0,0-16,0v8H32V80Zm0,112H32V128H64v8a8,8,0,0,0,16,0v-8h96v8a8,8,0,0,0,16,0v-8h32v64Z"},null,-1),cn=[sn],rn={key:5},dn=_("path",{d:"M224,68H172V56a20,20,0,0,0-20-20H104A20,20,0,0,0,84,56V68H32A12,12,0,0,0,20,80V192a12,12,0,0,0,12,12H224a12,12,0,0,0,12-12V80A12,12,0,0,0,224,68ZM92,56a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V68H92ZM32,76H224a4,4,0,0,1,4,4v36H188V104a4,4,0,0,0-8,0v12H76V104a4,4,0,0,0-8,0v12H28V80A4,4,0,0,1,32,76ZM224,196H32a4,4,0,0,1-4-4V124H68v12a4,4,0,0,0,8,0V124H180v12a4,4,0,0,0,8,0V124h40v68A4,4,0,0,1,224,196Z"},null,-1),un=[dn],pn={name:"PhToolbox"},hn=L({...pn,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(u){const e=u,a=Z("weight","regular"),n=Z("size","1em"),o=Z("color","currentColor"),h=Z("mirrored",!1),g=$(()=>{var l;return(l=e.weight)!=null?l:a}),k=$(()=>{var l;return(l=e.size)!=null?l:n}),V=$(()=>{var l;return(l=e.color)!=null?l:o}),T=$(()=>e.mirrored!==void 0?e.mirrored?"scale(-1, 1)":void 0:h?"scale(-1, 1)":void 0);return(l,i)=>(d(),m("svg",Y({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:k.value,height:k.value,fill:V.value,transform:T.value},l.$attrs),[W(l.$slots,"default"),g.value==="bold"?(d(),m("g",qe,Oe)):g.value==="duotone"?(d(),m("g",We,Qe)):g.value==="fill"?(d(),m("g",Xe,nn)):g.value==="light"?(d(),m("g",tn,on)):g.value==="regular"?(d(),m("g",ln,cn)):g.value==="thin"?(d(),m("g",rn,un)):H("",!0)],16,Re))}});class gn{async generateEcdsaKey(e){const{projectId:a,connectionName:n,connectorType:o}=e;return N.post(`projects/${a}/connectors/${o}/connections/${n}/ecdsa-key`,{})}async createEcdsaConnection(e){const{projectId:a,connectionName:n,connectorType:o,publicKey:h,privateKey:g,accessId:k}=e;return N.post(`projects/${a}/connectors/${o}/connections/${n}/create-ecdsa`,{publicKey:h,privateKey:g,accessId:k})}async getLoginUrl(e,a,n,o,h){return N.get(`projects/${e}/connectors/${n}/connections/${a}/login-url`,{scopeIds:o.join(","),...h})}async listConnectors(e){return N.get(`projects/${e}/connectors`)}async createTokenConnection(e){const{projectId:a,connectionName:n,connectorType:o,tokens:h}=e,g={type:"tokens",tokens:h};return N.post(`projects/${a}/connectors/${o}/connections/${n}`,g)}async listConnections(e){return N.get(`projects/${e}/connections`)}async deleteConnection(e){const{projectId:a,connectionName:n,connectorType:o}=e;return N.delete(`projects/${a}/connectors/${o}/connections/${n}`)}async renameConnection(e){const{projectId:a,connectionName:n,connectorType:o,newConnectionName:h}=e;return N.patch(`projects/${a}/connectors/${o}/connections/${n}`,{newConnectionName:h})}}class vn{constructor(e,a){S(this,"state");S(this,"hasChanges",$(()=>!!this.state.value.editingConnection&&this.state.value.editingConnection.name!==this.state.value.editingConnection.newName));S(this,"handleDeletionClick",async e=>{x.confirm({title:"Delete connection",content:"Are you sure you want to delete this connection?",onOk:()=>this.handleDeleteConnection(e)})});S(this,"handleDeleteConnection",async e=>{await this.api.deleteConnection({projectId:this.projectId,connectionName:e.name,connectorType:e.connectorType}),this.state.value.editingConnection=null,await this.refetchConnections()});S(this,"handleAddConnectionSubmit",async()=>{var h,g,k,V;const e=(h=this.state.value.addingConnection)==null?void 0:h.connector.metadata.key,a=(g=this.state.value.addingConnection)==null?void 0:g.selectedScopeIds,n=(V=(k=this.state.value.addingConnection)==null?void 0:k.tokenValues)!=null?V:{};if(!e||!a)throw new Error("No connector or scope selected");const{url:o}=await this.getLoginUrl(e,this.getUniqueName(e),a,n);window.location.href=o});S(this,"handleAddTokenConnectionSubmit",async()=>{const e=this.state.value.addingConnection;if(!e)throw new Error("No connection is being added");const a=e.connector.metadata.key,n=this.getUniqueName(a);await this.api.createTokenConnection({projectId:this.projectId,connectionName:n,connectorType:a,tokens:e.tokenValues}),this.state.value.addingConnection=null,await this.refetchConnections()});S(this,"handleAddEcdsaConnectionSubmit",async(e,a)=>{const n=this.state.value.addingConnection;if(!n||!e||!a)throw new Error("No connection is being added, public key or project ID is missing");if(!n.connectionName||!n.ecdsaKeys)throw new Error("Keys or connection name not found");await this.api.createEcdsaConnection({projectId:this.projectId,connectionName:n.connectionName,connectorType:n.connector.metadata.key,publicKey:n.ecdsaKeys.publicKey,privateKey:n.ecdsaKeys.privateKey,accessId:a}),this.state.value.addingConnection=null,await this.refetchConnections()});S(this,"renameConnection",async()=>{const{editingConnection:e}=this.state.value;if(!e)throw new Error("No connection is being edited");const a=async()=>{await this.api.renameConnection({projectId:this.projectId,connectionName:e.name,connectorType:e.connectorType,newConnectionName:e.newName}),await this.refetchConnections(),this.state.value.editingConnection=null};x.confirm({title:"Rename connection",content:"Are you sure you want to rename this connection? This will break any existing references to the old name.",onOk:a})});S(this,"showAddConfirmationModal",e=>{this.state.value.addingConnection={selectedScopeIds:e.auth.type==="oauth2"?e.auth.scopes.map(a=>a.key):[],connector:e,tokenValues:{}}});S(this,"handleScopeToggle",(e,a)=>{a?this.state.value.addingConnection.selectedScopeIds.push(e):this.state.value.addingConnection.selectedScopeIds=this.state.value.addingConnection.selectedScopeIds.filter(n=>n!==e)});this.projectId=e,this.api=a,this.state=E({connectors:[],connections:[],addingConnection:null,editingConnection:null})}async fetchConnectors(){this.state.value.connectors=await this.api.listConnectors(this.projectId)}async fetchInitialState(){await this.fetchConnectors(),await this.refetchConnections()}async refetchConnections(){this.state.value.connections=(await this.api.listConnections(this.projectId)).map(e=>{const a=this.state.value.connectors.find(n=>n.metadata.key===e.connectionType);if(!a)throw new Error(`Unknown connector type: ${e.connectionType}`);return{name:e.name,connectorTitle:a.metadata.label,connectorType:e.connectionType,icon:a.metadata.logoUrl}})}handleEditConnectionClick(e){this.state.value.editingConnection={...e,newName:e.name}}async getLoginUrl(e,a,n,o){return this.api.getLoginUrl(this.projectId,a,e,n,o)}slugify(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-")}getUniqueName(e){const a=this.state.value.connections.filter(n=>n.connectorType===e).length;return a===0?e:`${e}-${a}`}async generateEcdsaKey(){const e=this.state.value.addingConnection;if(!e)throw new Error("No connection is being added");const a=e.connector.metadata.key,n=this.getUniqueName(a),o=await this.api.generateEcdsaKey({projectId:this.projectId,connectionName:n,connectorType:a});return this.state.value.addingConnection&&(this.state.value.addingConnection.connectionName=n,this.state.value.addingConnection.ecdsaKeys=o),o.publicKey}}const yn=L({__name:"ConnectorCard",props:{title:{},logoUrl:{},description:{},unavailable:{type:Boolean},connector:{}},setup(u){const e=u,a=$(()=>{var o;return((o=e.connector)==null?void 0:o.triggers)&&e.connector.triggers.length>0}),n=$(()=>{var o;return((o=e.connector)==null?void 0:o.actions)&&e.connector.actions.length>0});return(o,h)=>(d(),C(t(X),{class:oe({"connector-card":!0,unavailable:o.unavailable})},{default:c(()=>[r(t(b),{style:{width:"100%"},vertical:"",gap:12},{default:c(()=>[r(t(b),{justify:"space-between"},{default:c(()=>[r(t(Q),{src:o.logoUrl,shape:"square",size:"large"},null,8,["src"]),r(t(b),{gap:8},{default:c(()=>[a.value?(d(),C(t(fe),{key:0,size:16})):H("",!0),n.value?(d(),C(t(hn),{key:1,size:16})):H("",!0),o.unavailable?(d(),C(t(ae),{key:2,style:{height:"fit-content"}},{default:c(()=>[f("Talk to us")]),_:1})):H("",!0)]),_:1})]),_:1}),r(t(b),{vertical:""},{default:c(()=>[r(t(M),{strong:""},{default:c(()=>[f(F(o.title),1)]),_:1}),r(t(M),{type:"secondary"},{default:c(()=>[f(F(o.description),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["class"]))}});const mn=J(yn,[["__scopeId","data-v-f5866f99"]]);function fn(u){return new Promise((e,a)=>{const n=new FileReader;n.onload=()=>{const h=n.result.split(",")[1];e(h)},n.onerror=()=>a(n.error),n.readAsDataURL(u)})}const Cn={key:4,style:{"margin-top":"16px"}},R=L({__name:"AuthFormFields",props:{tokens:{},tokenValues:{},uploadedFiles:{default:()=>({})}},emits:["update:tokenValues","update:uploadedFiles","tokenChange"],setup(u,{emit:e}){const a=u,n=E(a.uploadedFiles||{}),o=E({...a.tokenValues});G(()=>a.tokenValues,l=>{o.value={...l}},{deep:!0}),G(()=>a.uploadedFiles,l=>{n.value=l||{}},{deep:!0});function h(l,i){o.value[l]=i;const s={...o.value};e("update:tokenValues",s),e("tokenChange")}function g(l){var s,w;const i=[];return l.key&&i.push({required:!0,message:`${l.label||l.key} is required`}),(s=l.input)!=null&&s.minSize&&i.push({min:l.input.minSize,message:`Minimum length is ${l.input.minSize}`}),(w=l.input)!=null&&w.maxSize&&i.push({max:l.input.maxSize,message:`Maximum length is ${l.input.maxSize}`}),i}async function k(l,i){try{const s=await fn(l),w={...n.value,[i]:{file:l,base64:s}};n.value=w,e("update:uploadedFiles",w),o.value[i]=s;const p={...o.value};e("update:tokenValues",p),e("tokenChange")}catch(s){console.error("Error converting file to base64:",s)}return!1}function V(l){const i={...n.value};delete i[l],n.value=i,e("update:uploadedFiles",i),o.value[l]="";const s={...o.value};e("update:tokenValues",s),e("tokenChange")}function T(l){const i=n.value[l];return i?[{uid:l,name:i.file.name,status:"done",size:i.file.size}]:[]}return(l,i)=>(d(),C(t(ce),{model:o.value,layout:"vertical"},{default:c(()=>[(d(!0),m(U,null,P(l.tokens,s=>(d(),C(t(le),{key:s.key,label:s.label,name:s.key,rules:g(s)},{default:c(()=>{var w,p,y,A,v,I,z;return[((w=s.input)==null?void 0:w.type)==="small-string"?(d(),C(t(D),{key:0,value:o.value[s.key],"onUpdate:value":j=>o.value[s.key]=j,placeholder:s.description,maxlength:(p=s.input)==null?void 0:p.maxSize,minlength:(y=s.input)==null?void 0:y.minSize,type:"password",onInput:()=>h(s.key,o.value[s.key]||"")},null,8,["value","onUpdate:value","placeholder","maxlength","minlength","onInput"])):((A=s.input)==null?void 0:A.type)==="large-text"?(d(),C(t(se),{key:1,value:o.value[s.key],"onUpdate:value":j=>o.value[s.key]=j,placeholder:s.description,maxlength:(v=s.input)==null?void 0:v.maxSize,minlength:(I=s.input)==null?void 0:I.minSize,rows:4,onInput:()=>h(s.key,o.value[s.key]||"")},null,8,["value","onUpdate:value","placeholder","maxlength","minlength","onInput"])):((z=s.input)==null?void 0:z.type)==="file"?(d(),C(t(ie),{key:2,"file-list":T(s.key),"before-upload":j=>k(j,s.key),"max-count":1,"show-upload-list":!0,onRemove:()=>V(s.key)},{default:c(()=>[r(q,null,{default:c(()=>[r(t(Ce)),f(" Upload File ")]),_:1})]),_:2},1032,["file-list","before-upload","onRemove"])):(d(),C(t(D),{key:3,value:o.value[s.key],"onUpdate:value":j=>o.value[s.key]=j,placeholder:s.description,type:"password",onInput:()=>h(s.key,o.value[s.key]||"")},null,8,["value","onUpdate:value","placeholder","onInput"])),s.instructions?(d(),m("div",Cn,[r(t(M),{type:"secondary",style:{"white-space":"pre-line","font-size":"14px"}},{default:c(()=>[f(F(s.instructions),1)]),_:2},1024)])):H("",!0),s.description&&!s.instructions?(d(),C(t(M),{key:5,type:"secondary",style:{"font-size":"12px","margin-top":"8px"}},{default:c(()=>[f(F(s.description),1)]),_:2},1024)):H("",!0)]}),_:2},1032,["label","name","rules"]))),128))]),_:1},8,["model"]))}}),kn=L({__name:"ConnectionHeader",props:{connectorLogoUrl:{},connectorLabel:{}},setup(u){return(e,a)=>(d(),C(t(b),{justify:"center",align:"center",gap:20,style:{"margin-bottom":"24px",padding:"20px 0"}},{default:c(()=>[r(ke,{"hide-text":"",size:"large"}),r(t(Be),{size:24}),r(we,{"image-url":e.connectorLogoUrl,"brand-name":e.connectorLabel,size:"medium","hide-text":""},null,8,["image-url","brand-name"])]),_:1}))}}),wn=L({__name:"ConnectionModal",props:{addingConnection:{},ecdsaPublicKey:{},ecdsaKeyLoading:{type:Boolean},uploadedFiles:{}},emits:["cancel","submit","scope-toggle","generate-ecdsa-key","update:token-values","update:uploaded-files","token-change"],setup(u,{emit:e}){const a=u,n=$(()=>{var s,w,p;switch((s=a.addingConnection)==null?void 0:s.connector.auth.type){case"oauth2":return"Authorize";case"tokens":return"Create Connection";case"ecdsa":{if(!a.ecdsaPublicKey)return"OK";const y=((w=a.addingConnection)==null?void 0:w.connector.auth.params)||[],A=((p=a.addingConnection)==null?void 0:p.tokenValues)||{};return y.every(I=>A[I.key]&&A[I.key].trim().length>0)?"Create Connection":"Create Connection (Required fields missing)"}default:return"OK"}});function o(){e("cancel")}function h(){e("submit")}function g(i,s){e("scope-toggle",i,s)}function k(){e("generate-ecdsa-key")}function V(i){e("update:token-values",i)}function T(i){e("update:uploaded-files",i)}function l(){e("token-change")}return(i,s)=>{var w;return d(),C(t(x),{open:!!i.addingConnection,title:`Add ${(w=i.addingConnection)==null?void 0:w.connector.metadata.label} Connection`,"ok-text":n.value,"ok-button-props":{disabled:n.value.includes("Required")},"wrap-class-name":"full-modal",onCancel:o,onOk:h},{default:c(()=>[i.addingConnection?(d(),m(U,{key:0},[r(kn,{"connector-logo-url":i.addingConnection.connector.metadata.logoUrl,"connector-label":i.addingConnection.connector.metadata.label},null,8,["connector-logo-url","connector-label"]),i.addingConnection.connector.auth.type==="oauth2"?(d(),m(U,{key:0},[r(t(K),null,{default:c(()=>[f(" Please select the scopes you want to authorize for this connection. You can change these later by deleting and re-adding the connection. ")]),_:1}),r(t(b),{vertical:"",gap:"10",style:{margin:"30px 0px"}},{default:c(()=>{var p;return[(d(!0),m(U,null,P(i.addingConnection.connector.auth.scopes,y=>(d(),C(t(b),{key:y.key,justify:"space-between",align:"center"},{default:c(()=>[r(t(b),{vertical:""},{default:c(()=>[r(t(M),null,{default:c(()=>[f(F(y.description),1)]),_:2},1024),r(t(M),{type:"secondary"},{default:c(()=>[f(F(y.key),1)]),_:2},1024)]),_:2},1024),r(t(re),{checked:i.addingConnection.selectedScopeIds.includes(y.key),onChange:A=>g(y.key,A)},null,8,["checked","onChange"])]),_:2},1024))),128)),(p=i.addingConnection.connector.auth.params)!=null&&p.length?(d(),C(R,{key:0,tokens:i.addingConnection.connector.auth.params,"token-values":i.addingConnection.tokenValues,"uploaded-files":i.uploadedFiles,"onUpdate:tokenValues":V,"onUpdate:uploadedFiles":T,onTokenChange:l},null,8,["tokens","token-values","uploaded-files"])):H("",!0)]}),_:1})],64)):H("",!0),i.addingConnection.connector.auth.type==="tokens"?(d(),m(U,{key:1},[r(t(K),null,{default:c(()=>[f(" Please provide the required tokens/credentials for this connection. ")]),_:1}),r(R,{tokens:i.addingConnection.connector.auth.tokens,"token-values":i.addingConnection.tokenValues,"uploaded-files":i.uploadedFiles,"onUpdate:tokenValues":V,"onUpdate:uploadedFiles":T,onTokenChange:l},null,8,["tokens","token-values","uploaded-files"])],64)):H("",!0),i.addingConnection.connector.auth.type==="ecdsa"?(d(),m(U,{key:2},[i.ecdsaPublicKey?(d(),C(t(b),{key:1,vertical:"",gap:"16"},{default:c(()=>[r(t(M),{strong:""},{default:c(()=>[f("Chaves geradas! Agora siga os pr\xF3ximos passos:")]),_:1}),r(t(M),{strong:""},{default:c(()=>[f("1. Copie sua chave p\xFAblica:")]),_:1}),r(t(D),{value:i.ecdsaPublicKey,readonly:"",copyable:"",code:""},null,8,["value"]),r(R,{tokens:i.addingConnection.connector.auth.params,"token-values":i.addingConnection.tokenValues,"uploaded-files":i.uploadedFiles,"onUpdate:tokenValues":V,"onUpdate:uploadedFiles":T,onTokenChange:l},null,8,["tokens","token-values","uploaded-files"])]),_:1})):(d(),m(U,{key:0},[r(t(K),null,{default:c(()=>[f(" Primeiro vamos gerar um par de chaves ECDSA para estabelecer a conex\xE3o segura. ")]),_:1}),r(t(b),{vertical:"",gap:"16"},{default:c(()=>[r(q,{loading:i.ecdsaKeyLoading,onClick:k},{default:c(()=>[f(" Gerar chaves ECDSA ")]),_:1},8,["loading"])]),_:1})],64))],64)):H("",!0)],64)):H("",!0)]),_:1},8,["open","title","ok-text","ok-button-props"])}}}),bn=u=>(ge("data-v-7616c928"),u=u(),ve(),u),_n=bn(()=>_("div",{style:{"flex-grow":"1"}},null,-1)),Hn={class:"connectors-grid"},Vn=L({__name:"ConnectorsView",setup(u){const a=de().params.projectId,n=new vn(a,new gn),o=E(null),h=E(!1),g=E({}),k=$(()=>[...n.state.value.connectors.filter(p=>p.auth.type==="oauth2"),...n.state.value.connectors.filter(p=>p.auth.type==="tokens"),...n.state.value.connectors.filter(p=>p.auth.type==="ecdsa"),...n.state.value.connectors.filter(p=>p.auth.type==="manual")]);n.fetchInitialState();function V(p){n.state.value.addingConnection&&(n.state.value.addingConnection.tokenValues=p)}function T(p){g.value=p}function l(){o.value=null,h.value=!1,g.value={}}async function i(){h.value=!0;try{const y=(await n.generateEcdsaKey()).replace("-----BEGIN PUBLIC KEY-----","").replace("-----END PUBLIC KEY-----","").replace(/\s/g,"");o.value=y}finally{h.value=!1}}async function s(){var y,A,v;switch((y=n.state.value.addingConnection)==null?void 0:y.connector.auth.type){case"oauth2":return n.handleAddConnectionSubmit();case"tokens":return n.handleAddTokenConnectionSubmit();case"ecdsa":{const I=((A=n.state.value.addingConnection)==null?void 0:A.tokenValues)||{};let z="";((v=n.state.value.addingConnection)==null?void 0:v.connector.metadata.key)==="starkbank"&&(z=I.projectId||"");const j=await n.handleAddEcdsaConnectionSubmit(o.value,z);return l(),j}}}function w(p){p.auth.type==="manual"?me.showNewMessage(he.translate("i18n_connectors_ask_for_access",null,p.metadata.label)):n.showAddConfirmationModal(p)}return(p,y)=>{var A;return d(),m(U,null,[r(t(be),{direction:"vertical",style:{width:"100%","margin-bottom":"30px"}},{default:c(()=>[r(t(b),{align:"center",justify:"space-between"},{default:c(()=>[r(t(B),null,{default:c(()=>[f("Connectors")]),_:1})]),_:1}),r(t(K),null,{default:c(()=>[f(" Add and manage external integrations to your project. "),r(te)]),_:1}),t(n).state.value.connections.length?(d(),C(t(b),{key:0,vertical:""},{default:c(()=>[r(t(B),{level:2},{default:c(()=>[f("Installed")]),_:1}),r(t(b),{vertical:"",gap:10},{default:c(()=>[(d(!0),m(U,null,P(t(n).state.value.connections,v=>(d(),C(t(X),{key:v.name},{default:c(()=>[r(t(b),{align:"center",gap:20},{default:c(()=>[r(t(Q),{src:v.icon,height:"40px",shape:"square"},null,8,["src"]),r(t(M),{strong:""},{default:c(()=>[f(F(v.connectorTitle),1)]),_:2},1024),_n,r(t(M),{content:v.name,copyable:"",code:""},null,8,["content"]),r(t(ue),null,{overlay:c(()=>[r(t(pe),null,{default:c(()=>[r(t(O),{onClick:I=>t(n).handleEditConnectionClick(v)},{default:c(()=>[f(" Rename ")]),_:2},1032,["onClick"]),r(t(O),{danger:"",onClick:I=>t(n).handleDeletionClick(v)},{default:c(()=>[f(" Delete ")]),_:2},1032,["onClick"])]),_:2},1024)]),default:c(()=>[r(t(ye))]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})):H("",!0),r(t(b),{vertical:""},{default:c(()=>[t(n).state.value.connections.length?(d(),C(t(B),{key:0,level:2},{default:c(()=>[f("Available")]),_:1})):H("",!0),_("div",Hn,[(d(!0),m(U,null,P(k.value,v=>(d(),C(mn,{key:v.metadata.key,title:v.metadata.label,"logo-url":v.metadata.logoUrl,description:v.metadata.description,unavailable:v.auth.type==="manual",connector:v,onClick:I=>w(v)},null,8,["title","logo-url","description","unavailable","connector","onClick"]))),128))])]),_:1})]),_:1}),r(t(x),{open:!!t(n).state.value.editingConnection,title:`${(A=t(n).state.value.editingConnection)==null?void 0:A.connectorTitle} Connection`,onCancel:y[2]||(y[2]=v=>t(n).state.value.editingConnection=null)},{footer:c(()=>[r(t(b),{justify:"end"},{default:c(()=>[r(q,{disabled:!t(n).hasChanges.value,onClick:y[1]||(y[1]=v=>t(n).renameConnection())},{default:c(()=>[f(" Save ")]),_:1},8,["disabled"])]),_:1})]),default:c(()=>[t(n).state.value.editingConnection?(d(),C(t(D),{key:0,value:t(n).state.value.editingConnection.newName,"onUpdate:value":y[0]||(y[0]=v=>t(n).state.value.editingConnection.newName=v)},null,8,["value"])):H("",!0)]),_:1},8,["open","title"]),r(wn,{"adding-connection":t(n).state.value.addingConnection,"ecdsa-public-key":o.value,"ecdsa-key-loading":h.value,"uploaded-files":g.value,onCancel:y[3]||(y[3]=()=>{t(n).state.value.addingConnection=null,l()}),onSubmit:s,onScopeToggle:y[4]||(y[4]=(v,I)=>t(n).handleScopeToggle(v,I)),onGenerateEcdsaKey:i,"onUpdate:tokenValues":V,"onUpdate:uploadedFiles":T},null,8,["adding-connection","ecdsa-public-key","ecdsa-key-loading","uploaded-files"])],64)}}});const xn=J(Vn,[["__scopeId","data-v-7616c928"]]);export{xn as default};
2
+ //# sourceMappingURL=ConnectorsView.562a5007.js.map
@@ -0,0 +1,2 @@
1
+ import{O as s}from"./OmniChat.de828c54.js";import{u as c}from"./omniChatStore.2b85c342.js";import{d as a,eb as i,u as t,o as d,a as l,h as u}from"./jwt-decode.esm.992666e9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="096ce522-13cb-4269-91a0-3ebc73874c4a",e._sentryDebugIdIdentifier="sentry-dbid-096ce522-13cb-4269-91a0-3ebc73874c4a")}catch{}})();const b=a({__name:"ConsoleOmniChat",setup(e){const n=i().params.projectId,o=c();return o.init("console",n),(p,m)=>t(o).controller&&t(o).repository?(d(),l(s,{key:0,"ai-chat-repository":t(o).repository,controller:t(o).controller,environment:{origin:"console",projectId:t(n)}},null,8,["ai-chat-repository","controller","environment"])):u("",!0)}});export{b as _};
2
+ //# sourceMappingURL=ConsoleOmniChat.vue_vue_type_script_setup_true_lang.1d09cfdd.js.map
@@ -0,0 +1,2 @@
1
+ import{d as o,o as d,a5 as s,e as l,a7 as r,ea as n,_ as c}from"./jwt-decode.esm.992666e9.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="bb38bcfa-284a-4ca3-874d-c3d9a95e17e4",t._sentryDebugIdIdentifier="sentry-dbid-bb38bcfa-284a-4ca3-874d-c3d9a95e17e4")}catch{}})();const f=o({__name:"ContentLayout",props:{fullWidth:{type:Boolean},noPadding:{type:Boolean}},setup(t){return(e,a)=>(d(),s("div",{class:n(["content-layout",{"no-padding":e.noPadding}])},[l("div",{class:n(["centered-layout",{"full-width":e.fullWidth}])},[r(e.$slots,"default",{},void 0,!0)],2)],2))}});const u=c(f,[["__scopeId","data-v-fb4d67f9"]]);export{u as C};
2
+ //# sourceMappingURL=ContentLayout.7d5c9f09.js.map
@@ -1,2 +1,2 @@
1
- import{B as L,a as M,f as O,r as j}from"./router.858e1af2.js";import{_ as G}from"./DocsButton.vue_vue_type_script_setup_true_lang.0796f440.js";import{i as J}from"./url.e7d14364.js";import{G as X}from"./PhDotsThreeVertical.vue.c1812ea8.js";import{d as E,ae as q,r as N,a as r,b as l,u as n,cL as H,o as s,f as d,a5 as B,ec as T,cz as Q,bJ as W,cE as Y,aB as Z,aR as x,cT as K,g as y,ed as f,h as g,cy as ee,M as te,c as ae,m as le,de as D,A as ne,a7 as A,d9 as F,bR as se,cX as oe,a6 as ue,da as C,d4 as R,bP as re,bx as pe,bw as ie,cN as U,e as ce,ef as P,S as de,_ as ye}from"./jwt-decode.esm.28320b05.js";import{A as z}from"./index.3a2ab2d2.js";(function(){try{var b=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},m=new Error().stack;m&&(b._sentryDebugIds=b._sentryDebugIds||{},b._sentryDebugIds[m]="0da6f467-f0d4-4841-9735-42e64415057d",b._sentryDebugIdIdentifier="sentry-dbid-0da6f467-f0d4-4841-9735-42e64415057d")}catch{}})();const fe=E({__name:"CreationModal",props:{entityName:{},fields:{},create:{type:Function}},setup(b,{expose:m}){const _=b,I=`Create ${_.entityName}`,c=q({inputValue:{}}),w=N(!1),k=()=>w.value=!0,V=()=>{w.value=!1,c.inputValue={}},S=async()=>{try{await _.create(c.inputValue),V()}catch(i){i instanceof Error&&H.error({message:"Failed to create",description:i.message})}},t=(i,u)=>{const e=i.target.value,a=_.fields.find(o=>o.key===u);a!=null&&a.format?c.inputValue[u]=a.format(e):c.inputValue[u]=e},v=(i,u)=>{const e=i.target.value,a=_.fields.find(o=>o.key===u);a!=null&&a.blur?c.inputValue[u]=a.blur(e):c.inputValue[u]=e};return m({open:k,close:V}),(i,u)=>(s(),r(n(te),{open:w.value,title:I,onCancel:V,onOk:S},{default:l(()=>[d(n(ee),{layout:"vertical"},{default:l(()=>[(s(!0),B(x,null,T(i.fields,e=>{var a;return s(),r(n(Q),{key:e.key,label:e.label,help:(a=e.hint)==null?void 0:a.call(e,c.inputValue[e.key]),tooltip:e.tooltip},{default:l(()=>{var o,h,$;return[!e.type||e.type==="text"||e.type==="password"?(s(),r(n(W),{key:0,value:c.inputValue[e.key],"onUpdate:value":p=>c.inputValue[e.key]=p,placeholder:(o=e.placeholder)!=null?o:"",type:(h=e.type)!=null?h:"text",onInput:p=>t(p,e.key),onBlur:p=>v(p,e.key)},null,8,["value","onUpdate:value","placeholder","type","onInput","onBlur"])):e.type==="multiline-text"?(s(),r(n(Y),{key:1,value:c.inputValue[e.key],"onUpdate:value":p=>c.inputValue[e.key]=p,placeholder:($=e.placeholder)!=null?$:"",onInput:p=>t(p,e.key),onBlur:p=>v(p,e.key)},null,8,["value","onUpdate:value","placeholder","onInput","onBlur"])):e.type==="select"?(s(),r(n(Z),{key:2,value:c.inputValue[e.key],"onUpdate:value":p=>c.inputValue[e.key]=p,mode:e.mode},{default:l(()=>[(s(!0),B(x,null,T(e.options,p=>(s(),r(n(K),{key:typeof p=="string"?p:p.value,value:typeof p=="string"?p:p.value},{default:l(()=>[y(f(typeof p=="string"?p:p.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["value","onUpdate:value","mode"])):g("",!0)]}),_:2},1032,["label","help","tooltip"])}),128))]),_:1})]),_:1},8,["open"]))}}),me={class:"action-warning"},ve=E({__name:"CrudView",props:{table:{},loading:{type:Boolean},title:{},emptyTitle:{},entityName:{},description:{},create:{type:Function},createButtonText:{},docsPath:{},live:{type:Boolean},fields:{}},setup(b){const m=b,_=N(null),I=(t,v)=>{var u;const i=(u=m.table.rows[0])==null?void 0:u.cells[v].type;if(!(i==="actions"||i==="slot"))return(e,a)=>c(e,a,v)},c=(t,v,i)=>{const u=t.cells[i],e=v.cells[i];return u.type==="text"&&e.type==="text"||u.type==="tag"&&e.type==="tag"?u.text.localeCompare(e.text):u.type==="tags"&&e.type==="tags"?u.tags[0].text.localeCompare(e.tags[0].text):u.type==="secret"&&e.type==="secret"||u.type==="link"&&e.type==="link"?u.text.localeCompare(e.text):(u.type==="actions"&&e.type==="actions",0)},w=async()=>{var t;m.fields?(t=_.value)==null||t.open():m.create&&await m.create({})},k=N(!1);async function V(t,v){if(!k.value){k.value=!0;try{"onClick"in t?await t.onClick({key:v.key}):"link"in t&&(typeof t.link=="string"&&J(t.link)?open(t.link,"_blank"):j.push(t.link))}finally{k.value=!1}}}const S=ae(()=>({"--columnCount":`${m.table.columns.length}`}));return(t,v)=>{const i=le("RouterLink");return s(),B(x,null,[d(n(z),{direction:"vertical",class:"crud-view"},{default:l(()=>{var u;return[d(n(D),{align:"center",justify:"space-between"},{default:l(()=>[t.title?(s(),r(n(ne),{key:0},{default:l(()=>[y(f(t.title),1)]),_:1})):g("",!0),A(t.$slots,"more",{},void 0,!0)]),_:3}),t.description?(s(),r(n(F),{key:0},{default:l(()=>[y(f(t.description)+" ",1),A(t.$slots,"description",{},void 0,!0),t.docsPath?(s(),r(G,{key:0,path:t.docsPath},null,8,["path"])):g("",!0)]),_:3})):g("",!0),d(n(D),{gap:"middle"},{default:l(()=>[t.createButtonText?(s(),r(n(se),{key:0,type:"primary",onClick:w},{default:l(()=>[y(f(t.createButtonText),1)]),_:1})):g("",!0),A(t.$slots,"secondary",{},void 0,!0)]),_:3}),A(t.$slots,"extra",{},void 0,!0),d(n(oe),{"filter-dropdown":!0,size:"small",style:ue(S.value),"data-source":t.table.rows,loading:k.value||t.loading&&!t.live,height:400,columns:(u=t.table.columns)==null?void 0:u.map((e,a)=>{var o;return{...e,key:a,filtered:!0,align:(o=e.align)!=null?o:"center",sorter:I(e,a)}})},{emptyText:l(()=>[y(f(t.emptyTitle),1)]),headerCell:l(e=>[y(f(e.title),1)]),bodyCell:l(({column:{key:e},record:a})=>[a.cells[e].type==="slot"?A(t.$slots,a.cells[e].key,{key:0,payload:a.cells[e].payload},void 0,!0):(s(),r(n(U),{key:1,open:a.cells[e].hover?void 0:!1},{content:l(()=>[d(n(F),{style:{width:"300px",overflow:"auto","font-family":"monospace"},copyable:"",content:a.cells[e].hover},null,8,["content"])]),default:l(()=>[a.cells[e].type==="text"?(s(),r(n(C),{key:0,secondary:a.cells[e].secondary,code:a.cells[e].code},{default:l(()=>[d(n(L),{dot:a.cells[e].contentType==="warning",color:"#faad14"},{default:l(()=>[y(f(a.cells[e].text),1)]),_:2},1032,["dot"])]),_:2},1032,["secondary","code"])):a.cells[e].type==="secret"?(s(),r(n(C),{key:1,copyable:{text:a.cells[e].text}},{default:l(()=>[y(" ******** ")]),_:2},1032,["copyable"])):a.cells[e].type==="tag"?(s(),r(n(R),{key:2,color:a.cells[e].tagColor},{default:l(()=>[y(f(a.cells[e].text),1)]),_:2},1032,["color"])):a.cells[e].type==="tags"?(s(),r(n(z),{key:3},{default:l(()=>[(s(!0),B(x,null,T(a.cells[e].tags,(o,h)=>(s(),r(n(R),{key:h,color:o.color},{default:l(()=>[y(f(o.text),1)]),_:2},1032,["color"]))),128))]),_:2},1024)):a.cells[e].type==="link"?(s(),r(i,{key:4,to:a.cells[e].to},{default:l(()=>[y(f(a.cells[e].text),1)]),_:2},1032,["to"])):a.cells[e].type==="actions"?(s(),r(n(re),{key:5},{overlay:l(()=>[d(n(pe),{disabled:k.value},{default:l(()=>[(s(!0),B(x,null,T(a.cells[e].actions.filter(o=>!o.hide),(o,h)=>(s(),r(n(ie),{key:h,danger:o.dangerous,onClick:$=>V(o,a)},{default:l(()=>[o.popoverMessage?(s(),r(n(U),{key:0,placement:"left"},{content:l(()=>[ce("div",me,[d(n(C),null,{default:l(()=>[y(f(o.popoverMessage),1)]),_:2},1024)])]),default:l(()=>[d(n(C),{disabled:o.disabled,class:"action-item"},{default:l(()=>[o.icon?(s(),r(P(o.icon),{key:0})):g("",!0),y(" "+f(o.label),1)]),_:2},1032,["disabled"])]),_:2},1024)):(s(),r(n(C),{key:1,disabled:o.disabled,class:"action-item"},{default:l(()=>[o.icon?(s(),r(P(o.icon),{key:0})):g("",!0),y(" "+f(o.label),1)]),_:2},1032,["disabled"]))]),_:2},1032,["danger","onClick"]))),128))]),_:2},1032,["disabled"])]),default:l(()=>[d(n(X),{style:{cursor:"pointer"},size:"25px"})]),_:2},1024)):g("",!0)]),_:2},1032,["open"]))]),footer:l(()=>[t.live?(s(),r(n(O),{key:0,justify:"end",gutter:10},{default:l(()=>[d(n(M),null,{default:l(()=>[d(n(de),{size:"small"})]),_:1}),d(n(M),null,{default:l(()=>[d(n(C),null,{default:l(()=>[y(" auto updating ")]),_:1})]),_:1})]),_:1})):g("",!0)]),_:3},8,["style","data-source","loading","columns"])]}),_:3}),t.fields&&t.create?(s(),r(fe,{key:0,ref_key:"modalRef",ref:_,fields:t.fields,"entity-name":t.entityName,create:t.create},null,8,["fields","entity-name","create"])):g("",!0)],64)}}});const we=ye(ve,[["__scopeId","data-v-edc1e74b"]]);export{we as C};
2
- //# sourceMappingURL=CrudView.bbc83763.js.map
1
+ import{B as L,a as M,f as O,r as j}from"./router.1324a1a9.js";import{_ as G}from"./DocsButton.vue_vue_type_script_setup_true_lang.0555d923.js";import{i as J}from"./url.f490879d.js";import{G as X}from"./PhDotsThreeVertical.vue.2db678ef.js";import{d as E,ae as q,r as N,a as r,b as l,u as n,cL as H,o as s,f as d,a5 as B,ec as T,cz as Q,bJ as W,cE as Y,aB as Z,aR as x,cT as K,g as y,ed as f,h as g,cy as ee,M as te,c as ae,m as le,de as D,A as ne,a7 as A,d9 as F,bR as se,cX as oe,a6 as ue,da as C,d4 as R,bP as re,bx as ce,bw as pe,cN as U,e as ie,ef as P,S as de,_ as ye}from"./jwt-decode.esm.992666e9.js";import{A as z}from"./index.3d2a7b6d.js";(function(){try{var b=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},m=new Error().stack;m&&(b._sentryDebugIds=b._sentryDebugIds||{},b._sentryDebugIds[m]="c3d99b58-3ca7-44a9-8664-a0cec01446c0",b._sentryDebugIdIdentifier="sentry-dbid-c3d99b58-3ca7-44a9-8664-a0cec01446c0")}catch{}})();const fe=E({__name:"CreationModal",props:{entityName:{},fields:{},create:{type:Function}},setup(b,{expose:m}){const _=b,I=`Create ${_.entityName}`,i=q({inputValue:{}}),w=N(!1),k=()=>w.value=!0,V=()=>{w.value=!1,i.inputValue={}},S=async()=>{try{await _.create(i.inputValue),V()}catch(p){p instanceof Error&&H.error({message:"Failed to create",description:p.message})}},t=(p,u)=>{const e=p.target.value,a=_.fields.find(o=>o.key===u);a!=null&&a.format?i.inputValue[u]=a.format(e):i.inputValue[u]=e},v=(p,u)=>{const e=p.target.value,a=_.fields.find(o=>o.key===u);a!=null&&a.blur?i.inputValue[u]=a.blur(e):i.inputValue[u]=e};return m({open:k,close:V}),(p,u)=>(s(),r(n(te),{open:w.value,title:I,onCancel:V,onOk:S},{default:l(()=>[d(n(ee),{layout:"vertical"},{default:l(()=>[(s(!0),B(x,null,T(p.fields,e=>{var a;return s(),r(n(Q),{key:e.key,label:e.label,help:(a=e.hint)==null?void 0:a.call(e,i.inputValue[e.key]),tooltip:e.tooltip},{default:l(()=>{var o,h,$;return[!e.type||e.type==="text"||e.type==="password"?(s(),r(n(W),{key:0,value:i.inputValue[e.key],"onUpdate:value":c=>i.inputValue[e.key]=c,placeholder:(o=e.placeholder)!=null?o:"",type:(h=e.type)!=null?h:"text",onInput:c=>t(c,e.key),onBlur:c=>v(c,e.key)},null,8,["value","onUpdate:value","placeholder","type","onInput","onBlur"])):e.type==="multiline-text"?(s(),r(n(Y),{key:1,value:i.inputValue[e.key],"onUpdate:value":c=>i.inputValue[e.key]=c,placeholder:($=e.placeholder)!=null?$:"",onInput:c=>t(c,e.key),onBlur:c=>v(c,e.key)},null,8,["value","onUpdate:value","placeholder","onInput","onBlur"])):e.type==="select"?(s(),r(n(Z),{key:2,value:i.inputValue[e.key],"onUpdate:value":c=>i.inputValue[e.key]=c,mode:e.mode},{default:l(()=>[(s(!0),B(x,null,T(e.options,c=>(s(),r(n(K),{key:typeof c=="string"?c:c.value,value:typeof c=="string"?c:c.value},{default:l(()=>[y(f(typeof c=="string"?c:c.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["value","onUpdate:value","mode"])):g("",!0)]}),_:2},1032,["label","help","tooltip"])}),128))]),_:1})]),_:1},8,["open"]))}}),me={class:"action-warning"},ve=E({__name:"CrudView",props:{table:{},loading:{type:Boolean},title:{},emptyTitle:{},entityName:{},description:{},create:{type:Function},createButtonText:{},docsPath:{},live:{type:Boolean},fields:{}},setup(b){const m=b,_=N(null),I=(t,v)=>{var u;const p=(u=m.table.rows[0])==null?void 0:u.cells[v].type;if(!(p==="actions"||p==="slot"))return(e,a)=>i(e,a,v)},i=(t,v,p)=>{const u=t.cells[p],e=v.cells[p];return u.type==="text"&&e.type==="text"||u.type==="tag"&&e.type==="tag"?u.text.localeCompare(e.text):u.type==="tags"&&e.type==="tags"?u.tags[0].text.localeCompare(e.tags[0].text):u.type==="secret"&&e.type==="secret"||u.type==="link"&&e.type==="link"?u.text.localeCompare(e.text):(u.type==="actions"&&e.type==="actions",0)},w=async()=>{var t;m.fields?(t=_.value)==null||t.open():m.create&&await m.create({})},k=N(!1);async function V(t,v){if(!k.value){k.value=!0;try{"onClick"in t?await t.onClick({key:v.key}):"link"in t&&(typeof t.link=="string"&&J(t.link)?open(t.link,"_blank"):j.push(t.link))}finally{k.value=!1}}}const S=ae(()=>({"--columnCount":`${m.table.columns.length}`}));return(t,v)=>{const p=le("RouterLink");return s(),B(x,null,[d(n(z),{direction:"vertical",class:"crud-view"},{default:l(()=>{var u;return[d(n(D),{align:"center",justify:"space-between"},{default:l(()=>[t.title?(s(),r(n(ne),{key:0},{default:l(()=>[y(f(t.title),1)]),_:1})):g("",!0),A(t.$slots,"more",{},void 0,!0)]),_:3}),t.description?(s(),r(n(F),{key:0},{default:l(()=>[y(f(t.description)+" ",1),A(t.$slots,"description",{},void 0,!0),t.docsPath?(s(),r(G,{key:0,path:t.docsPath},null,8,["path"])):g("",!0)]),_:3})):g("",!0),d(n(D),{gap:"middle"},{default:l(()=>[t.createButtonText?(s(),r(n(se),{key:0,type:"primary",onClick:w},{default:l(()=>[y(f(t.createButtonText),1)]),_:1})):g("",!0),A(t.$slots,"secondary",{},void 0,!0)]),_:3}),A(t.$slots,"extra",{},void 0,!0),d(n(oe),{"filter-dropdown":!0,size:"small",style:ue(S.value),"data-source":t.table.rows,loading:k.value||t.loading&&!t.live,height:400,columns:(u=t.table.columns)==null?void 0:u.map((e,a)=>{var o;return{...e,key:a,filtered:!0,align:(o=e.align)!=null?o:"center",sorter:I(e,a)}})},{emptyText:l(()=>[y(f(t.emptyTitle),1)]),headerCell:l(e=>[y(f(e.title),1)]),bodyCell:l(({column:{key:e},record:a})=>[a.cells[e].type==="slot"?A(t.$slots,a.cells[e].key,{key:0,payload:a.cells[e].payload},void 0,!0):(s(),r(n(U),{key:1,open:a.cells[e].hover?void 0:!1},{content:l(()=>[d(n(F),{style:{width:"300px",overflow:"auto","font-family":"monospace"},copyable:"",content:a.cells[e].hover},null,8,["content"])]),default:l(()=>[a.cells[e].type==="text"?(s(),r(n(C),{key:0,secondary:a.cells[e].secondary,code:a.cells[e].code},{default:l(()=>[d(n(L),{dot:a.cells[e].contentType==="warning",color:"#faad14"},{default:l(()=>[y(f(a.cells[e].text),1)]),_:2},1032,["dot"])]),_:2},1032,["secondary","code"])):a.cells[e].type==="secret"?(s(),r(n(C),{key:1,copyable:{text:a.cells[e].text}},{default:l(()=>[y(" ******** ")]),_:2},1032,["copyable"])):a.cells[e].type==="tag"?(s(),r(n(R),{key:2,color:a.cells[e].tagColor},{default:l(()=>[y(f(a.cells[e].text),1)]),_:2},1032,["color"])):a.cells[e].type==="tags"?(s(),r(n(z),{key:3},{default:l(()=>[(s(!0),B(x,null,T(a.cells[e].tags,(o,h)=>(s(),r(n(R),{key:h,color:o.color},{default:l(()=>[y(f(o.text),1)]),_:2},1032,["color"]))),128))]),_:2},1024)):a.cells[e].type==="link"?(s(),r(p,{key:4,to:a.cells[e].to},{default:l(()=>[y(f(a.cells[e].text),1)]),_:2},1032,["to"])):a.cells[e].type==="actions"?(s(),r(n(re),{key:5},{overlay:l(()=>[d(n(ce),{disabled:k.value},{default:l(()=>[(s(!0),B(x,null,T(a.cells[e].actions.filter(o=>!o.hide),(o,h)=>(s(),r(n(pe),{key:h,danger:o.dangerous,onClick:$=>V(o,a)},{default:l(()=>[o.popoverMessage?(s(),r(n(U),{key:0,placement:"left"},{content:l(()=>[ie("div",me,[d(n(C),null,{default:l(()=>[y(f(o.popoverMessage),1)]),_:2},1024)])]),default:l(()=>[d(n(C),{disabled:o.disabled,class:"action-item"},{default:l(()=>[o.icon?(s(),r(P(o.icon),{key:0})):g("",!0),y(" "+f(o.label),1)]),_:2},1032,["disabled"])]),_:2},1024)):(s(),r(n(C),{key:1,disabled:o.disabled,class:"action-item"},{default:l(()=>[o.icon?(s(),r(P(o.icon),{key:0})):g("",!0),y(" "+f(o.label),1)]),_:2},1032,["disabled"]))]),_:2},1032,["danger","onClick"]))),128))]),_:2},1032,["disabled"])]),default:l(()=>[d(n(X),{style:{cursor:"pointer"},size:"25px"})]),_:2},1024)):g("",!0)]),_:2},1032,["open"]))]),footer:l(()=>[t.live?(s(),r(n(O),{key:0,justify:"end",gutter:10},{default:l(()=>[d(n(M),null,{default:l(()=>[d(n(de),{size:"small"})]),_:1}),d(n(M),null,{default:l(()=>[d(n(C),null,{default:l(()=>[y(" auto updating ")]),_:1})]),_:1})]),_:1})):g("",!0)]),_:3},8,["style","data-source","loading","columns"])]}),_:3}),t.fields&&t.create?(s(),r(fe,{key:0,ref_key:"modalRef",ref:_,fields:t.fields,"entity-name":t.entityName,create:t.create},null,8,["fields","entity-name","create"])):g("",!0)],64)}}});const we=ye(ve,[["__scopeId","data-v-edc1e74b"]]);export{we as C};
2
+ //# sourceMappingURL=CrudView.8fb84eac.js.map
@@ -1,2 +1,2 @@
1
- import{b as d}from"./constants.54f5dbb0.js";import{f as u,e7 as i,d as b,o as l,a as p,b as c,u as o,a7 as m,a5 as g,g as h,aR as y,bR as O}from"./jwt-decode.esm.28320b05.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e3f0bd29-a2fd-4725-b540-73faee10f358",t._sentryDebugIdIdentifier="sentry-dbid-e3f0bd29-a2fd-4725-b540-73faee10f358")}catch{}})();var v={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"};const _=v;function f(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),r.forEach(function(a){k(t,a,n[a])})}return t}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=function(e,n){var r=f({},e,n.attrs);return u(i,f({},r,{icon:_}),null)};s.displayName="BookOutlined";s.inheritAttrs=!1;const B=s,I=b({__name:"DocsButton",props:{path:{}},setup(t){return(e,n)=>(l(),p(o(O),{class:"docs-button",href:o(d)(e.path),target:"_blank",type:"text",size:"small"},{icon:c(()=>[u(o(B))]),default:c(()=>[e.$slots.default?m(e.$slots,"default",{key:0}):(l(),g(y,{key:1},[h("Docs")],64))]),_:3},8,["href"]))}});export{I as _};
2
- //# sourceMappingURL=DocsButton.vue_vue_type_script_setup_true_lang.0796f440.js.map
1
+ import{b as f}from"./constants.36bf7d70.js";import{f as u,e7 as i,d as b,o as c,a as p,b as l,u as o,a7 as m,a5 as g,g as h,aR as y,bR as O}from"./jwt-decode.esm.992666e9.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="9dc5735d-323b-442b-a10f-75d2434a0df7",t._sentryDebugIdIdentifier="sentry-dbid-9dc5735d-323b-442b-a10f-75d2434a0df7")}catch{}})();var v={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"};const _=v;function d(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),r.forEach(function(a){k(t,a,n[a])})}return t}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=function(e,n){var r=d({},e,n.attrs);return u(i,d({},r,{icon:_}),null)};s.displayName="BookOutlined";s.inheritAttrs=!1;const B=s,I=b({__name:"DocsButton",props:{path:{}},setup(t){return(e,n)=>(c(),p(o(O),{class:"docs-button",href:o(f)(e.path),target:"_blank",type:"text",size:"small"},{icon:l(()=>[u(o(B))]),default:l(()=>[e.$slots.default?m(e.$slots,"default",{key:0}):(c(),g(y,{key:1},[h("Docs")],64))]),_:3},8,["href"]))}});export{I as _};
2
+ //# sourceMappingURL=DocsButton.vue_vue_type_script_setup_true_lang.0555d923.js.map
@@ -1,2 +1,2 @@
1
- import{N as pe}from"./Navbar.50988594.js";import{a as P}from"./asyncComputed.decbe125.js";import{m as fe}from"./url.e7d14364.js";import{d as ge,c as _,r as x,eb as _e,a5 as E,f as u,e as ve,u as a,a as s,b as l,o,S as Z,g as f,ed as g,eG as i,A as ye,aB as F,cS as y,cT as m,aR as M,ec as K,h as c,cz as v,bJ as C,eg as me,bR as we,cy as ze,_ as Ie}from"./jwt-decode.esm.28320b05.js";import{A as be}from"./apiKey.d428e427.js";import{j as Q}from"./router.858e1af2.js";import{M as je}from"./member.73d141d7.js";import{O as he}from"./organization.7d79a3c7.js";import{P as Ne}from"./project.c76d644e.js";import"./tables.337a9b65.js";import{F as ke}from"./folder.8e3a1b23.js";import"./AbstraButton.vue_vue_type_script_setup_true_lang.5ac4912e.js";import"./constants.54f5dbb0.js";import"./PhChats.vue.20c511b5.js";import"./PhSignOut.vue.3cb7cd40.js";import"./index.3a2ab2d2.js";import"./index.36aedb48.js";import"./omniChatStore.b7128bc4.js";import"./record.1b6df81e.js";import"./uuid.fe529613.js";import"./PhCopySimple.vue.f585b051.js";import"./PhBookBookmark.vue.f5df4397.js";import"./PhSparkle.vue.8e334c6d.js";import"./index.e21caff3.js";import"./Breadcrumb.6179cdce.js";import"./index.aca944a5.js";import"./string.4c218fd1.js";(function(){try{var w=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},p=new Error().stack;p&&(w._sentryDebugIds=w._sentryDebugIds||{},w._sentryDebugIds[p]="efe037cd-8101-401d-9bfd-843eabe694fd",w._sentryDebugIdIdentifier="sentry-dbid-efe037cd-8101-401d-9bfd-843eabe694fd")}catch{}})();const Ee={class:"container"},Se={class:"content"},S="NEW_ORGANIZATION_KEY",R="NEW_FOLDER_KEY",D="NEW_PROJECT_KEY",Ae=ge({__name:"EditorLogin",setup(w){var q;const p=new ke,A=new he,z=new Ne,L=new je,H=(q=Q.getAuthor())==null?void 0:q.claims.email,{result:U,loading:X}=P(async()=>{const t=await A.list();return G(t.length>0?t[0].id:S),t}),{result:I,loading:b,refetch:J}=P(async()=>e.value.type==="loading-organizations"||e.value.type==="new-organization"?[]:z.list(e.value.organizationId)),{result:T,loading:V,refetch:ee}=P(async()=>e.value.type==="loading-organizations"||e.value.type==="new-organization"?[]:p.list(e.value.organizationId)),B=_(()=>{var t,n;return(n=(t=U.value)==null?void 0:t.map(r=>({key:r.id,label:r.name})))!=null?n:[]}),W=_(()=>I.value?I.value.filter(t=>{switch(e.value.type){case"new-project":return t.folderId===e.value.folderId;case"selected-project":return t.folderId===e.value.folderId;case"loading-folder":return t.folderId===e.value.folderId;default:return!1}}).map(t=>({key:t.id,label:t.name})):[]),Y=_(()=>{var t,n;return(n=(t=T.value)==null?void 0:t.map(r=>({value:r.id,label:r.name})))!=null?n:[]}),ae=_(()=>{switch(e.value.type){case"new-organization":return!e.value.organizationName;case"new-folder":return!e.value.folderName;case"new-project":return!e.value.projectName||!e.value.folderId;case"selected-project":return!1;case"loading-organization":case"loading-folder":return!0;default:throw new Error(`Invalid state ${JSON.stringify(e.value)}`)}}),j=async t=>await be.create({projectId:t,name:"default"}),e=x({type:"loading-organizations"}),te=_(()=>e.value.type==="new-organization"||e.value.type==="loading-organizations"?S:e.value.organizationId),re=_(()=>{if(e.value.type==="new-organization"||e.value.type==="new-folder"||e.value.type==="new-project"||e.value.type==="loading-organization"||e.value.type==="loading-folder"||e.value.type==="loading-organizations")return D;if(e.value.type==="selected-project")return e.value.projectId;throw new Error(`Invalid state ${JSON.stringify(e.value)}`)}),ne=_(()=>e.value.type==="new-project"||e.value.type==="selected-project"?e.value.folderId:R);function le(t){return t.split("@")[1].split(".")[0]}async function G(t){var n,r;if(t===S)e.value={type:"new-organization",organizationName:le(Q.getAuthor().claims.email),folderName:"My team folder",projectName:"My project"};else{e.value={type:"loading-organization",organizationId:String(t)},await Promise.all([J(),ee()]);const d=(n=T.value)==null?void 0:n.find(O=>O.organizationId===String(t)),k=(r=I.value)==null?void 0:r.find(O=>O.folderId===(d==null?void 0:d.id));d?k?e.value={type:"selected-project",organizationId:String(t),folderId:d.id,projectId:k.id}:e.value={type:"new-project",organizationId:String(t),folderId:d.id,projectName:"My project"}:e.value={type:"new-folder",organizationId:String(t),folderName:"My team folder",projectName:"My project"}}}function oe(t){if(e.value.type==="new-organization"||e.value.type==="new-folder"||e.value.type==="loading-organization"||e.value.type==="loading-folder"||e.value.type==="loading-organizations")throw new Error(`Invalid state ${JSON.stringify(e.value)}`);t===D?e.value={type:"new-project",organizationId:e.value.organizationId,folderId:e.value.folderId,projectName:"New project"}:e.value={type:"selected-project",organizationId:e.value.organizationId,folderId:e.value.folderId,projectId:String(t)}}async function ie(t){var n;if(e.value.type==="new-organization"||e.value.type==="loading-organizations")throw new Error(`Invalid state ${JSON.stringify(e.value)}`);if(t===R)e.value={type:"new-folder",organizationId:e.value.organizationId,folderName:"New folder",projectName:"New project"};else{e.value={type:"loading-folder",organizationId:e.value.organizationId,folderId:String(t)},await J();const r=(n=I.value)==null?void 0:n.find(d=>d.folderId===String(t));r?e.value={type:"selected-project",organizationId:e.value.organizationId,folderId:String(t),projectId:r.id}:e.value={type:"new-project",organizationId:e.value.organizationId,folderId:String(t),projectName:"New project"}}}async function de(t){const r=(await L.list(t)).find(d=>d.email===H);if(!r)throw new Error("Member not found");return r.id}async function se(t){const n=await L.list(t);return(await p.list(t)).length===0&&await p.create({name:"Default Folder",organizationId:t,memberIds:[...n.map(k=>k.id)]}),(await p.list(t))[0]}const h=x(!1);async function ue(){if(!h.value){h.value=!0;try{if(e.value.type==="new-organization"){const t=await A.create({name:e.value.organizationName}),n=await se(t.id),r=await z.create({name:e.value.projectName,organizationId:t.id,folderId:n.id}),d=await j(r.id);d.value&&N(d.value)}else if(e.value.type==="new-folder"){const t=await de(e.value.organizationId),n=await p.create({name:e.value.folderName,organizationId:e.value.organizationId,memberIds:[t]}),r=await z.create({name:e.value.projectName,organizationId:e.value.organizationId,folderId:n.id}),d=await j(r.id);d.value&&N(d.value)}else if(e.value.type==="new-project"){const t=await z.create({name:e.value.projectName,organizationId:e.value.organizationId,folderId:e.value.folderId}),n=await j(t.id);n.value&&N(n.value)}else if(e.value.type==="selected-project"){const t=await j(e.value.projectId);t.value&&N(t.value)}}finally{h.value=!1}}}const $=_e(),ce=x(null);async function N(t){if($.query.redirect){const n=$.query.redirect;if(!n.match(/http:\/\/localhost:\d+/))throw new Error("Invalid redirect");const r=decodeURIComponent(n);location.href=fe(r,{"api-key":t})}else ce.value=t}return(t,n)=>(o(),E("div",Ee,[u(pe),ve("div",Se,[a(X)||!a(U)?(o(),s(a(Z),{key:0})):(o(),s(a(ze),{key:1,layout:"vertical",class:"card"},{default:l(()=>[u(a(ye),{level:3,style:{padding:"0px",margin:"0px","margin-bottom":"30px"}},{default:l(()=>[f(g(a(i).translate("i18n_create_or_choose_project")),1)]),_:1}),u(a(v),{label:a(i).translate("i18n_get_api_key_organization")},{default:l(()=>[u(a(F),{style:{width:"100%"},placeholder:a(i).translate("i18n_get_api_key_choose_organization"),size:"large",value:te.value,"onUpdate:value":G},{default:l(()=>[u(a(y),{label:a(i).translate("i18n_get_api_key_new_organization")},{default:l(()=>[(o(),s(a(m),{key:S},{default:l(()=>[f(g(a(i).translate("i18n_get_api_key_create_new_organization")),1)]),_:1}))]),_:1},8,["label"]),B.value.length>0?(o(),s(a(y),{key:0,label:a(i).translate("i18n_get_api_key_existing_organizations")},{default:l(()=>[(o(!0),E(M,null,K(B.value,r=>(o(),s(a(m),{key:r.key},{default:l(()=>[f(g(r.label),1)]),_:2},1024))),128))]),_:1},8,["label"])):c("",!0)]),_:1},8,["placeholder","value"])]),_:1},8,["label"]),e.value.type=="new-organization"?(o(),s(a(v),{key:0,label:a(i).translate("i18n_get_api_key_organization_name")},{default:l(()=>[u(a(C),{value:e.value.organizationName,"onUpdate:value":n[0]||(n[0]=r=>e.value.organizationName=r),placeholder:a(i).translate("i18n_get_api_key_choose_organization_name"),size:"large"},null,8,["value","placeholder"])]),_:1},8,["label"])):c("",!0),e.value.type!=="new-organization"?(o(),s(a(v),{key:1,label:a(i).translate("i18n_get_api_key_folder")},{default:l(()=>[u(a(F),{disabled:a(V),value:ne.value,loading:a(V),size:"large","onUpdate:value":ie},{default:l(()=>[u(a(y),{label:a(i).translate("i18n_get_api_key_new_folder")},{default:l(()=>[(o(),s(a(m),{key:R},{default:l(()=>[f(g(a(i).translate("i18n_get_api_key_create_new_folder")),1)]),_:1}))]),_:1},8,["label"]),Y.value.length>0?(o(),s(a(y),{key:0,label:a(i).translate("i18n_get_api_key_existing_folders")},{default:l(()=>[(o(!0),E(M,null,K(Y.value,r=>(o(),s(a(m),{key:r.value},{default:l(()=>[f(g(r.label),1)]),_:2},1024))),128))]),_:1},8,["label"])):c("",!0)]),_:1},8,["disabled","value","loading"])]),_:1},8,["label"])):c("",!0),e.value.type==="new-organization"||e.value.type==="new-folder"?(o(),s(a(v),{key:2,label:a(i).translate("i18n_get_api_key_folder_name")},{default:l(()=>[u(a(C),{value:e.value.folderName,"onUpdate:value":n[1]||(n[1]=r=>e.value.folderName=r),placeholder:a(i).translate("i18n_get_api_key_choose_folder_name"),size:"large"},null,8,["value","placeholder"])]),_:1},8,["label"])):c("",!0),e.value.type!=="new-organization"&&e.value.type!=="new-folder"?(o(),s(a(v),{key:3,label:a(i).translate("i18n_get_api_key_project")},{default:l(()=>[u(a(F),{style:{width:"100%"},disabled:a(b),placeholder:a(i).translate("i18n_get_api_key_choose_project"),size:"large",value:re.value,"onUpdate:value":oe},me({default:l(()=>[a(b)?c("",!0):(o(),s(a(y),{key:0,label:a(i).translate("i18n_get_api_key_new_project")},{default:l(()=>[(o(),s(a(m),{key:D},{default:l(()=>[f(g(a(i).translate("i18n_get_api_key_create_new_project")),1)]),_:1}))]),_:1},8,["label"])),W.value.length>0&&!a(b)?(o(),s(a(y),{key:1,label:a(i).translate("i18n_get_api_key_existing_projects")},{default:l(()=>[(o(!0),E(M,null,K(W.value,r=>(o(),s(a(m),{key:r.key},{default:l(()=>[f(g(r.label),1)]),_:2},1024))),128))]),_:1},8,["label"])):c("",!0)]),_:2},[a(b)?{name:"notFoundContent",fn:l(()=>[u(a(Z),{size:"small"})]),key:"0"}:void 0]),1032,["disabled","placeholder","value"])]),_:1},8,["label"])):c("",!0),e.value.type==="new-organization"||e.value.type==="new-folder"||e.value.type==="new-project"?(o(),s(a(v),{key:4,label:"Project name"},{default:l(()=>[u(a(C),{value:e.value.projectName,"onUpdate:value":n[2]||(n[2]=r=>e.value.projectName=r),placeholder:a(i).translate("i18n_get_api_key_choose_project_name"),size:"large"},null,8,["value","placeholder"])]),_:1})):c("",!0),u(a(v),{style:{"margin-top":"40px"}},{default:l(()=>[u(a(we),{type:"primary",disabled:ae.value,loading:h.value,style:{width:"100%"},onClick:ue},{default:l(()=>[f(g(a(i).translate("i18n_login_with_this_project")),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1}))])]))}});const ra=Ie(Ae,[["__scopeId","data-v-cafd5a5e"]]);export{ra as default};
2
- //# sourceMappingURL=EditorLogin.d00bf0ff.js.map
1
+ import{N as pe}from"./Navbar.abf206e9.js";import{a as P}from"./asyncComputed.1b787534.js";import{m as fe}from"./url.f490879d.js";import{d as ge,c as _,r as x,eb as _e,a5 as E,f as u,e as ve,u as a,a as s,b as l,o,S as Z,g as f,ed as g,eG as i,A as ye,aB as F,cS as y,cT as m,aR as M,ec as K,h as c,cz as v,bJ as C,eg as me,bR as we,cy as ze,_ as Ie}from"./jwt-decode.esm.992666e9.js";import{A as be}from"./apiKey.95126643.js";import{j as Q}from"./router.1324a1a9.js";import{M as je}from"./member.6b2b3438.js";import{O as he}from"./organization.53636095.js";import{P as Ne}from"./project.76f0af14.js";import"./tables.c26107a1.js";import{F as ke}from"./folder.41d37eb7.js";import"./AbstraButton.vue_vue_type_script_setup_true_lang.205eb76e.js";import"./constants.36bf7d70.js";import"./PhChats.vue.dfda946c.js";import"./PhSignOut.vue.d00d3657.js";import"./index.3d2a7b6d.js";import"./index.9e0166fe.js";import"./omniChatStore.2b85c342.js";import"./record.87ef3b68.js";import"./uuid.9161765c.js";import"./PhCopySimple.vue.ecffb042.js";import"./PhBookBookmark.vue.f8f803d9.js";import"./PhSparkle.vue.8a94f3a0.js";import"./index.5e22e010.js";import"./Breadcrumb.d0cc2c91.js";import"./index.d181a22c.js";import"./string.f6a7565f.js";(function(){try{var w=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},p=new Error().stack;p&&(w._sentryDebugIds=w._sentryDebugIds||{},w._sentryDebugIds[p]="1f743b9d-82e7-433d-8ba4-53a7bd6d73d0",w._sentryDebugIdIdentifier="sentry-dbid-1f743b9d-82e7-433d-8ba4-53a7bd6d73d0")}catch{}})();const Ee={class:"container"},Se={class:"content"},S="NEW_ORGANIZATION_KEY",R="NEW_FOLDER_KEY",D="NEW_PROJECT_KEY",Ae=ge({__name:"EditorLogin",setup(w){var q;const p=new ke,A=new he,z=new Ne,L=new je,H=(q=Q.getAuthor())==null?void 0:q.claims.email,{result:U,loading:X}=P(async()=>{const t=await A.list();return G(t.length>0?t[0].id:S),t}),{result:I,loading:b,refetch:J}=P(async()=>e.value.type==="loading-organizations"||e.value.type==="new-organization"?[]:z.list(e.value.organizationId)),{result:T,loading:V,refetch:ee}=P(async()=>e.value.type==="loading-organizations"||e.value.type==="new-organization"?[]:p.list(e.value.organizationId)),B=_(()=>{var t,n;return(n=(t=U.value)==null?void 0:t.map(r=>({key:r.id,label:r.name})))!=null?n:[]}),W=_(()=>I.value?I.value.filter(t=>{switch(e.value.type){case"new-project":return t.folderId===e.value.folderId;case"selected-project":return t.folderId===e.value.folderId;case"loading-folder":return t.folderId===e.value.folderId;default:return!1}}).map(t=>({key:t.id,label:t.name})):[]),Y=_(()=>{var t,n;return(n=(t=T.value)==null?void 0:t.map(r=>({value:r.id,label:r.name})))!=null?n:[]}),ae=_(()=>{switch(e.value.type){case"new-organization":return!e.value.organizationName;case"new-folder":return!e.value.folderName;case"new-project":return!e.value.projectName||!e.value.folderId;case"selected-project":return!1;case"loading-organization":case"loading-folder":return!0;default:throw new Error(`Invalid state ${JSON.stringify(e.value)}`)}}),j=async t=>await be.create({projectId:t,name:"default"}),e=x({type:"loading-organizations"}),te=_(()=>e.value.type==="new-organization"||e.value.type==="loading-organizations"?S:e.value.organizationId),re=_(()=>{if(e.value.type==="new-organization"||e.value.type==="new-folder"||e.value.type==="new-project"||e.value.type==="loading-organization"||e.value.type==="loading-folder"||e.value.type==="loading-organizations")return D;if(e.value.type==="selected-project")return e.value.projectId;throw new Error(`Invalid state ${JSON.stringify(e.value)}`)}),ne=_(()=>e.value.type==="new-project"||e.value.type==="selected-project"?e.value.folderId:R);function le(t){return t.split("@")[1].split(".")[0]}async function G(t){var n,r;if(t===S)e.value={type:"new-organization",organizationName:le(Q.getAuthor().claims.email),folderName:"My team folder",projectName:"My project"};else{e.value={type:"loading-organization",organizationId:String(t)},await Promise.all([J(),ee()]);const d=(n=T.value)==null?void 0:n.find(O=>O.organizationId===String(t)),k=(r=I.value)==null?void 0:r.find(O=>O.folderId===(d==null?void 0:d.id));d?k?e.value={type:"selected-project",organizationId:String(t),folderId:d.id,projectId:k.id}:e.value={type:"new-project",organizationId:String(t),folderId:d.id,projectName:"My project"}:e.value={type:"new-folder",organizationId:String(t),folderName:"My team folder",projectName:"My project"}}}function oe(t){if(e.value.type==="new-organization"||e.value.type==="new-folder"||e.value.type==="loading-organization"||e.value.type==="loading-folder"||e.value.type==="loading-organizations")throw new Error(`Invalid state ${JSON.stringify(e.value)}`);t===D?e.value={type:"new-project",organizationId:e.value.organizationId,folderId:e.value.folderId,projectName:"New project"}:e.value={type:"selected-project",organizationId:e.value.organizationId,folderId:e.value.folderId,projectId:String(t)}}async function ie(t){var n;if(e.value.type==="new-organization"||e.value.type==="loading-organizations")throw new Error(`Invalid state ${JSON.stringify(e.value)}`);if(t===R)e.value={type:"new-folder",organizationId:e.value.organizationId,folderName:"New folder",projectName:"New project"};else{e.value={type:"loading-folder",organizationId:e.value.organizationId,folderId:String(t)},await J();const r=(n=I.value)==null?void 0:n.find(d=>d.folderId===String(t));r?e.value={type:"selected-project",organizationId:e.value.organizationId,folderId:String(t),projectId:r.id}:e.value={type:"new-project",organizationId:e.value.organizationId,folderId:String(t),projectName:"New project"}}}async function de(t){const r=(await L.list(t)).find(d=>d.email===H);if(!r)throw new Error("Member not found");return r.id}async function se(t){const n=await L.list(t);return(await p.list(t)).length===0&&await p.create({name:"Default Folder",organizationId:t,memberIds:[...n.map(k=>k.id)]}),(await p.list(t))[0]}const h=x(!1);async function ue(){if(!h.value){h.value=!0;try{if(e.value.type==="new-organization"){const t=await A.create({name:e.value.organizationName}),n=await se(t.id),r=await z.create({name:e.value.projectName,organizationId:t.id,folderId:n.id}),d=await j(r.id);d.value&&N(d.value)}else if(e.value.type==="new-folder"){const t=await de(e.value.organizationId),n=await p.create({name:e.value.folderName,organizationId:e.value.organizationId,memberIds:[t]}),r=await z.create({name:e.value.projectName,organizationId:e.value.organizationId,folderId:n.id}),d=await j(r.id);d.value&&N(d.value)}else if(e.value.type==="new-project"){const t=await z.create({name:e.value.projectName,organizationId:e.value.organizationId,folderId:e.value.folderId}),n=await j(t.id);n.value&&N(n.value)}else if(e.value.type==="selected-project"){const t=await j(e.value.projectId);t.value&&N(t.value)}}finally{h.value=!1}}}const $=_e(),ce=x(null);async function N(t){if($.query.redirect){const n=$.query.redirect;if(!n.match(/http:\/\/localhost:\d+/))throw new Error("Invalid redirect");const r=decodeURIComponent(n);location.href=fe(r,{"api-key":t})}else ce.value=t}return(t,n)=>(o(),E("div",Ee,[u(pe),ve("div",Se,[a(X)||!a(U)?(o(),s(a(Z),{key:0})):(o(),s(a(ze),{key:1,layout:"vertical",class:"card"},{default:l(()=>[u(a(ye),{level:3,style:{padding:"0px",margin:"0px","margin-bottom":"30px"}},{default:l(()=>[f(g(a(i).translate("i18n_create_or_choose_project")),1)]),_:1}),u(a(v),{label:a(i).translate("i18n_get_api_key_organization")},{default:l(()=>[u(a(F),{style:{width:"100%"},placeholder:a(i).translate("i18n_get_api_key_choose_organization"),size:"large",value:te.value,"onUpdate:value":G},{default:l(()=>[u(a(y),{label:a(i).translate("i18n_get_api_key_new_organization")},{default:l(()=>[(o(),s(a(m),{key:S},{default:l(()=>[f(g(a(i).translate("i18n_get_api_key_create_new_organization")),1)]),_:1}))]),_:1},8,["label"]),B.value.length>0?(o(),s(a(y),{key:0,label:a(i).translate("i18n_get_api_key_existing_organizations")},{default:l(()=>[(o(!0),E(M,null,K(B.value,r=>(o(),s(a(m),{key:r.key},{default:l(()=>[f(g(r.label),1)]),_:2},1024))),128))]),_:1},8,["label"])):c("",!0)]),_:1},8,["placeholder","value"])]),_:1},8,["label"]),e.value.type=="new-organization"?(o(),s(a(v),{key:0,label:a(i).translate("i18n_get_api_key_organization_name")},{default:l(()=>[u(a(C),{value:e.value.organizationName,"onUpdate:value":n[0]||(n[0]=r=>e.value.organizationName=r),placeholder:a(i).translate("i18n_get_api_key_choose_organization_name"),size:"large"},null,8,["value","placeholder"])]),_:1},8,["label"])):c("",!0),e.value.type!=="new-organization"?(o(),s(a(v),{key:1,label:a(i).translate("i18n_get_api_key_folder")},{default:l(()=>[u(a(F),{disabled:a(V),value:ne.value,loading:a(V),size:"large","onUpdate:value":ie},{default:l(()=>[u(a(y),{label:a(i).translate("i18n_get_api_key_new_folder")},{default:l(()=>[(o(),s(a(m),{key:R},{default:l(()=>[f(g(a(i).translate("i18n_get_api_key_create_new_folder")),1)]),_:1}))]),_:1},8,["label"]),Y.value.length>0?(o(),s(a(y),{key:0,label:a(i).translate("i18n_get_api_key_existing_folders")},{default:l(()=>[(o(!0),E(M,null,K(Y.value,r=>(o(),s(a(m),{key:r.value},{default:l(()=>[f(g(r.label),1)]),_:2},1024))),128))]),_:1},8,["label"])):c("",!0)]),_:1},8,["disabled","value","loading"])]),_:1},8,["label"])):c("",!0),e.value.type==="new-organization"||e.value.type==="new-folder"?(o(),s(a(v),{key:2,label:a(i).translate("i18n_get_api_key_folder_name")},{default:l(()=>[u(a(C),{value:e.value.folderName,"onUpdate:value":n[1]||(n[1]=r=>e.value.folderName=r),placeholder:a(i).translate("i18n_get_api_key_choose_folder_name"),size:"large"},null,8,["value","placeholder"])]),_:1},8,["label"])):c("",!0),e.value.type!=="new-organization"&&e.value.type!=="new-folder"?(o(),s(a(v),{key:3,label:a(i).translate("i18n_get_api_key_project")},{default:l(()=>[u(a(F),{style:{width:"100%"},disabled:a(b),placeholder:a(i).translate("i18n_get_api_key_choose_project"),size:"large",value:re.value,"onUpdate:value":oe},me({default:l(()=>[a(b)?c("",!0):(o(),s(a(y),{key:0,label:a(i).translate("i18n_get_api_key_new_project")},{default:l(()=>[(o(),s(a(m),{key:D},{default:l(()=>[f(g(a(i).translate("i18n_get_api_key_create_new_project")),1)]),_:1}))]),_:1},8,["label"])),W.value.length>0&&!a(b)?(o(),s(a(y),{key:1,label:a(i).translate("i18n_get_api_key_existing_projects")},{default:l(()=>[(o(!0),E(M,null,K(W.value,r=>(o(),s(a(m),{key:r.key},{default:l(()=>[f(g(r.label),1)]),_:2},1024))),128))]),_:1},8,["label"])):c("",!0)]),_:2},[a(b)?{name:"notFoundContent",fn:l(()=>[u(a(Z),{size:"small"})]),key:"0"}:void 0]),1032,["disabled","placeholder","value"])]),_:1},8,["label"])):c("",!0),e.value.type==="new-organization"||e.value.type==="new-folder"||e.value.type==="new-project"?(o(),s(a(v),{key:4,label:"Project name"},{default:l(()=>[u(a(C),{value:e.value.projectName,"onUpdate:value":n[2]||(n[2]=r=>e.value.projectName=r),placeholder:a(i).translate("i18n_get_api_key_choose_project_name"),size:"large"},null,8,["value","placeholder"])]),_:1})):c("",!0),u(a(v),{style:{"margin-top":"40px"}},{default:l(()=>[u(a(we),{type:"primary",disabled:ae.value,loading:h.value,style:{width:"100%"},onClick:ue},{default:l(()=>[f(g(a(i).translate("i18n_login_with_this_project")),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1}))])]))}});const ra=Ie(Ae,[["__scopeId","data-v-cafd5a5e"]]);export{ra as default};
2
+ //# sourceMappingURL=EditorLogin.02eb6050.js.map
@@ -1,2 +1,2 @@
1
- var h=Object.defineProperty;var p=(a,e,t)=>e in a?h(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var i=(a,e,t)=>(p(a,typeof e!="symbol"?e+"":e,t),t);import{C as b}from"./CrudView.bbc83763.js";import{r as l,c as g,ep as w,d as y,eb as I,e5 as v,k as z,a as M,u as d,o as k}from"./jwt-decode.esm.28320b05.js";import{j as f}from"./router.858e1af2.js";import{M as C}from"./member.73d141d7.js";import"./tables.337a9b65.js";import{F as E}from"./folder.8e3a1b23.js";import{a as u}from"./ant-design.dc326d34.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.0796f440.js";import"./constants.54f5dbb0.js";import"./url.e7d14364.js";import"./PhDotsThreeVertical.vue.c1812ea8.js";import"./index.3a2ab2d2.js";import"./index.aca944a5.js";import"./record.1b6df81e.js";import"./string.4c218fd1.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="b9dd39eb-f697-4f0e-993c-0d95c6f602c5",a._sentryDebugIdIdentifier="sentry-dbid-b9dd39eb-f697-4f0e-993c-0d95c6f602c5")}catch{}})();class _{constructor({authorEmail:e,organizationId:t,api:o,handlers:r}){i(this,"members",l([]));i(this,"selectedMember",l(null));i(this,"draftMember",l(null));i(this,"table",g(()=>this.makeCrudViewTable()));i(this,"loading",l(!1));i(this,"creationFields",l(null));i(this,"authorEmail");i(this,"organizationId");i(this,"api");i(this,"handlers");i(this,"currentMember",l(null));i(this,"confirmAddMember",async e=>{var r;const t=await this.api.member.create({organizationId:this.organizationId,email:e.email.trim(),teams:e.teams}),o=await this.api.folder.list(this.organizationId);for(const n of o)e.folders.includes(n.id)&&await this.api.folder.update(this.organizationId,{id:n.id,name:n.name,memberIds:((r=n.memberIds)!=null?r:[]).concat(t.id),organizationId:this.organizationId});await this.fetchState()});this.authorEmail=e,this.organizationId=t,this.api=o,this.handlers=r}async fetchState(){this.loading.value=!0,await this.fetchMembers(),await this.fetchCreationFields(),this.setCurrentMember(),this.loading.value=!1}setCurrentMember(){var e;this.currentMember.value=(e=this.members.value.find(t=>t.email===this.authorEmail))!=null?e:null}async fetchMembers(){this.members.value=await this.api.member.list(this.organizationId)}async fetchCreationFields(){const e=await this.api.folder.list(this.organizationId),t=[{key:"email",label:"Email",type:"text"},{key:"folders",label:"Folders",type:"select",mode:"multiple",tooltip:"Select folders this member can access",options:e.map(o=>({label:o.name,value:o.id}))}];this.creationFields.value=t}async removeMember(e){var o;if(((o=f.getAuthor())==null?void 0:o.claims.email)===e.email){await u("Removing your own access will block you from this organization. Are you sure?",{okText:"Remove",cancelText:"Cancel"})&&(await this.api.member.delete({organizationId:this.organizationId,authorId:e.authorId}),this.handlers.onSelfRemove());return}await u(`Are you sure you want to remove ${e.email} access?`,{okText:"Remove",cancelText:"Cancel"})&&(await this.api.member.delete({organizationId:this.organizationId,authorId:e.authorId}),await this.fetchMembers())}makeCrudViewTable(){return{columns:[{title:"Email",align:"center"},{title:"",align:"right"}],rows:this.members.value.map(e=>({key:e.email,cells:[{type:"text",text:e.email},{type:"actions",actions:[{icon:w,label:"Remove access",onClick:()=>this.removeMember(e),dangerous:!0}]}]}))}}}const L=y({__name:"EditorsView",setup(a){var c;const e=I(),t=v(),o=e.params.organizationId,r=new C,n=new E,m=(c=f.getAuthor())==null?void 0:c.claims.email;if(!m)throw new Error("Author email is not available");const s=new _({organizationId:o,api:{member:r,folder:n},authorEmail:m,handlers:{onSelfRemove:()=>{t.push("organizations")}}});return z(async()=>{await s.fetchState()}),s.fetchState(),(A,x)=>(k(),M(b,{"entity-name":"editor",loading:d(s).loading.value,title:"Editors",description:"Manage people who can edit projects within your organization","empty-title":"No editors yet",table:d(s).table.value,"create-button-text":"Invite Editor",fields:d(s).creationFields.value||void 0,create:d(s).confirmAddMember},null,8,["loading","table","fields","create"]))}});export{L as default};
2
- //# sourceMappingURL=EditorsView.99ba9c06.js.map
1
+ var f=Object.defineProperty;var p=(i,e,t)=>e in i?f(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var a=(i,e,t)=>(p(i,typeof e!="symbol"?e+"":e,t),t);import{C as b}from"./CrudView.8fb84eac.js";import{r as l,c as g,eq as w,d as y,eb as I,e5 as v,k as z,a as M,u as d,o as k}from"./jwt-decode.esm.992666e9.js";import{j as h}from"./router.1324a1a9.js";import{M as C}from"./member.6b2b3438.js";import"./tables.c26107a1.js";import{F as E}from"./folder.41d37eb7.js";import{a as u}from"./ant-design.544de4a0.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.0555d923.js";import"./constants.36bf7d70.js";import"./url.f490879d.js";import"./PhDotsThreeVertical.vue.2db678ef.js";import"./index.3d2a7b6d.js";import"./index.d181a22c.js";import"./record.87ef3b68.js";import"./string.f6a7565f.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[e]="da3c5871-c0ba-4e76-921a-3d2e6c9499b1",i._sentryDebugIdIdentifier="sentry-dbid-da3c5871-c0ba-4e76-921a-3d2e6c9499b1")}catch{}})();class _{constructor({authorEmail:e,organizationId:t,api:o,handlers:r}){a(this,"members",l([]));a(this,"selectedMember",l(null));a(this,"draftMember",l(null));a(this,"table",g(()=>this.makeCrudViewTable()));a(this,"loading",l(!1));a(this,"creationFields",l(null));a(this,"authorEmail");a(this,"organizationId");a(this,"api");a(this,"handlers");a(this,"currentMember",l(null));a(this,"confirmAddMember",async e=>{var r;const t=await this.api.member.create({organizationId:this.organizationId,email:e.email.trim(),teams:e.teams}),o=await this.api.folder.list(this.organizationId);for(const n of o)e.folders.includes(n.id)&&await this.api.folder.update(this.organizationId,{id:n.id,name:n.name,memberIds:((r=n.memberIds)!=null?r:[]).concat(t.id),organizationId:this.organizationId});await this.fetchState()});this.authorEmail=e,this.organizationId=t,this.api=o,this.handlers=r}async fetchState(){this.loading.value=!0,await this.fetchMembers(),await this.fetchCreationFields(),this.setCurrentMember(),this.loading.value=!1}setCurrentMember(){var e;this.currentMember.value=(e=this.members.value.find(t=>t.email===this.authorEmail))!=null?e:null}async fetchMembers(){this.members.value=await this.api.member.list(this.organizationId)}async fetchCreationFields(){const e=await this.api.folder.list(this.organizationId),t=[{key:"email",label:"Email",type:"text"},{key:"folders",label:"Folders",type:"select",mode:"multiple",tooltip:"Select folders this member can access",options:e.map(o=>({label:o.name,value:o.id}))}];this.creationFields.value=t}async removeMember(e){var o;if(((o=h.getAuthor())==null?void 0:o.claims.email)===e.email){await u("Removing your own access will block you from this organization. Are you sure?",{okText:"Remove",cancelText:"Cancel"})&&(await this.api.member.delete({organizationId:this.organizationId,authorId:e.authorId}),this.handlers.onSelfRemove());return}await u(`Are you sure you want to remove ${e.email} access?`,{okText:"Remove",cancelText:"Cancel"})&&(await this.api.member.delete({organizationId:this.organizationId,authorId:e.authorId}),await this.fetchMembers())}makeCrudViewTable(){return{columns:[{title:"Email",align:"center"},{title:"",align:"right"}],rows:this.members.value.map(e=>({key:e.email,cells:[{type:"text",text:e.email},{type:"actions",actions:[{icon:w,label:"Remove access",onClick:()=>this.removeMember(e),dangerous:!0}]}]}))}}}const L=y({__name:"EditorsView",setup(i){var c;const e=I(),t=v(),o=e.params.organizationId,r=new C,n=new E,m=(c=h.getAuthor())==null?void 0:c.claims.email;if(!m)throw new Error("Author email is not available");const s=new _({organizationId:o,api:{member:r,folder:n},authorEmail:m,handlers:{onSelfRemove:()=>{t.push("organizations")}}});return z(async()=>{await s.fetchState()}),s.fetchState(),(A,x)=>(k(),M(b,{"entity-name":"editor",loading:d(s).loading.value,title:"Editors",description:"Manage people who can edit projects within your organization","empty-title":"No editors yet",table:d(s).table.value,"create-button-text":"Invite Editor",fields:d(s).creationFields.value||void 0,create:d(s).confirmAddMember},null,8,["loading","table","fields","create"]))}});export{L as default};
2
+ //# sourceMappingURL=EditorsView.f0ea00fc.js.map
@@ -0,0 +1,2 @@
1
+ import{_ as n,C as p}from"./View.vue_vue_type_script_setup_true_lang.424410a2.js";import{d as i,eb as s,a as m,u as d,o as a}from"./jwt-decode.esm.992666e9.js";import"./router.1324a1a9.js";import"./index.d181a22c.js";import"./fetch.83d89bdc.js";import"./record.87ef3b68.js";import"./SaveButton.ac38b361.js";import"./ExclamationCircleOutlined.d410fb9a.js";import"./CrudView.8fb84eac.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.0555d923.js";import"./constants.36bf7d70.js";import"./url.f490879d.js";import"./PhDotsThreeVertical.vue.2db678ef.js";import"./index.3d2a7b6d.js";import"./asyncComputed.1b787534.js";import"./polling.88a266b3.js";import"./omniChatStore.2b85c342.js";import"./uuid.9161765c.js";import"./PhCopySimple.vue.ecffb042.js";import"./PhPencil.vue.ae2943da.js";import"./index.3ff1c0be.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[r]="d2c64c7b-8bfb-4373-8bfb-b9fd8d116b2b",o._sentryDebugIdIdentifier="sentry-dbid-d2c64c7b-8bfb-4373-8bfb-b9fd8d116b2b")}catch{}})();const z=i({__name:"EnvVars",setup(o){const t=s().params.projectId,e=new p(t);return(b,c)=>(a(),m(n,{"env-var-repository":d(e),mode:"console"},null,8,["env-var-repository"]))}});export{z as default};
2
+ //# sourceMappingURL=EnvVars.063644bb.js.map
@@ -0,0 +1,2 @@
1
+ import{_ as k}from"./AbstraLogo.vue_vue_type_script_setup_true_lang.32a17b0c.js";import{A as v}from"./constants.36bf7d70.js";import{d as A,eb as x,e5 as I,c as h,a5 as T,f as c,b as a,u as e,a as f,h as p,o as i,g as s,ed as l,A as B,T as m,bR as C,e as E,d8 as N,eG as o,_ as D}from"./jwt-decode.esm.992666e9.js";import{u as R}from"./workspaceStore.4f0c433f.js";import{C as S}from"./Card.957a87b2.js";import"./Logo.83b476a4.js";import"./userStore.9e7a540a.js";import"./url.f490879d.js";import"./colorHelpers.d4f3f275.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new L().stack;d&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[d]="eaf9ca20-e470-406f-9418-729abb991c81",r._sentryDebugIdIdentifier="sentry-dbid-eaf9ca20-e470-406f-9418-729abb991c81")}catch{}})();const V={class:"inner-content"},G={class:"card-content"},H=A({__name:"Error",setup(r){const d=x(),g=I(),u=R(),y=h(()=>{var t,_,b;return(b=(t=u.state.workspace)==null?void 0:t.name)!=null?b:(_=u.state.workspace)==null?void 0:_.brandName}),n=h(()=>{const{status:t}=d.params;switch(t){case"404":return{status:t,title:o.translate("i18n_page_not_found"),message:o.translate("i18n_page_not_found_message"),showAd:!1};case"403":return{status:t,title:o.translate("i18n_access_denied"),message:o.translate("i18n_access_denied_message"),action:"Go back to home",showAd:!0};default:return{status:"500",title:o.translate("i18n_internal_error"),message:o.translate("i18n_internal_error_message"),showAd:!1}}}),w=()=>{g.push({name:"playerHome"})};return(t,_)=>(i(),T("div",V,[c(e(B),null,{default:a(()=>[s(l(n.value.title),1)]),_:1}),c(e(m),{class:"message"},{default:a(()=>[s(l(n.value.message),1)]),_:1}),n.value.action?(i(),f(e(C),{key:0,type:"link",onClick:w},{default:a(()=>[s(l(n.value.action),1)]),_:1})):p("",!0),n.value.showAd?(i(),f(e(S),{key:1,bordered:!1,class:"card"},{default:a(()=>[E("div",G,[c(k,{style:{"margin-bottom":"10px"}}),c(e(m),null,{default:a(()=>[s("This page is part of "+l(y.value?`the ${y.value}`:"a")+" workflow, built with Abstra.",1)]),_:1}),e(u).state.workspace?(i(),f(e(m),{key:0},{default:a(()=>[s("Automate your own processes by getting started "),c(e(N),{href:e(v).HOMEPAGE},{default:a(()=>[s("here")]),_:1},8,["href"]),s(".")]),_:1})):p("",!0)])]),_:1})):p("",!0)]))}});const L=D(H,[["__scopeId","data-v-522ad0d4"]]);export{L as default};
2
+ //# sourceMappingURL=Error.a81122c4.js.map
@@ -0,0 +1,2 @@
1
+ import{f as c,e7 as o,eZ as u}from"./jwt-decode.esm.992666e9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="08152e12-0145-470d-a898-8f62422e50ec",e._sentryDebugIdIdentifier="sentry-dbid-08152e12-0145-470d-a898-8f62422e50ec")}catch{}})();function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){f(e,i,n[i])})}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(t,n){var r=l({},t,n.attrs);return c(o,l({},r,{icon:u}),null)};a.displayName="ExclamationCircleOutlined";a.inheritAttrs=!1;const s=a;export{s as E};
2
+ //# sourceMappingURL=ExclamationCircleOutlined.d410fb9a.js.map
@@ -0,0 +1,2 @@
1
+ import{_ as ge}from"./DocsButton.vue_vue_type_script_setup_true_lang.0555d923.js";import{f as c,e7 as T,f3 as ye,d as re,r as I,ae as V,w as L,c as S,o as p,a5 as k,e as w,b as u,u as o,aR as be,ec as _e,a as g,ed as z,de as $,g as C,ct as Y,h as j,cD as we,bM as Z,ef as Oe,ej as Ce,cx as Pe,bO as Ie,bJ as je,M as Se,H as x,_ as le,eb as ze,A as $e,d9 as xe}from"./jwt-decode.esm.992666e9.js";import{h as O,e as Fe,d as ke,p as Ae}from"./router.1324a1a9.js";import{a as Ue}from"./asyncComputed.1b787534.js";import{f as K}from"./string.f6a7565f.js";import{a as De,I as He,_ as Me}from"./ScrollArea.vue_vue_type_script_setup_true_lang.a58564d3.js";import{a as Ve,G as Le}from"./PhFolderPlus.vue.dfb9b117.js";import{_ as F}from"./AbstraButton.vue_vue_type_script_setup_true_lang.205eb76e.js";import{B as Te,A as ee}from"./Breadcrumb.d0cc2c91.js";import{U as Ee}from"./UploadOutlined.b601a592.js";import"./tables.c26107a1.js";import{C as Re}from"./Card.957a87b2.js";import"./constants.36bf7d70.js";import"./index.d181a22c.js";import"./record.87ef3b68.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="142d6e0b-550c-44ae-b3f4-03268ffba30d",s._sentryDebugIdIdentifier="sentry-dbid-142d6e0b-550c-44ae-b3f4-03268ffba30d")}catch{}})();var Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder-add",theme:"outlined"};const Ne=Be;var Ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"}}]},name:"home",theme:"outlined"};const qe=Ge;function te(s){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable}))),i.forEach(function(l){Je(s,l,n[l])})}return s}function Je(s,e,n){return e in s?Object.defineProperty(s,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):s[e]=n,s}var E=function(e,n){var i=te({},e,n.attrs);return c(T,te({},i,{icon:ye}),null)};E.displayName="DeleteOutlined";E.inheritAttrs=!1;const Qe=E;function ae(s){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable}))),i.forEach(function(l){We(s,l,n[l])})}return s}function We(s,e,n){return e in s?Object.defineProperty(s,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):s[e]=n,s}var R=function(e,n){var i=ae({},e,n.attrs);return c(T,ae({},i,{icon:Ne}),null)};R.displayName="FolderAddOutlined";R.inheritAttrs=!1;const Xe=R;function ne(s){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable}))),i.forEach(function(l){Ye(s,l,n[l])})}return s}function Ye(s,e,n){return e in s?Object.defineProperty(s,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):s[e]=n,s}var B=function(e,n){var i=ne({},e,n.attrs);return c(T,ne({},i,{icon:qe}),null)};B.displayName="HomeOutlined";B.inheritAttrs=!1;const Ze=B;class N{constructor(e){this.projectId=e}static fromProjectId(e){return new N(e)}async list(e,n,i,l){const m=new URLSearchParams;m.set("limit",e.toString()),m.set("offset",n.toString()),i&&i.trim()&&m.set("search",i.trim()),l&&l.trim()&&m.set("path",l.trim());const A=m.toString(),d=`projects/${this.projectId}/files?${A}`,f=await O.get(d);return{items:f.items,totalCount:f.totalCount}}async upload(e,n){const i={"Content-Type":"multipart/form-data"},l=new File([n||new Uint8Array],De(e));return O.post(`projects/${this.projectId}/files/upload?path=${encodeURIComponent(e)}`,l,i)}async download(e){return O.getBlob(`projects/${this.projectId}/files/download?path=${encodeURIComponent(e)}`)}async delete(e){return O.delete(`projects/${this.projectId}/files?path=${encodeURIComponent(e)}`)}async move(e,n){return O.patch(`projects/${this.projectId}/files?path=${encodeURIComponent(e)}&newPath=${encodeURIComponent(n)}`,{})}async createFolder(e){return O.post(`projects/${this.projectId}/files/create-folder`,{path:e})}}const Ke={class:"files-navigator"},et={class:"header-container",style:{"margin-bottom":"8px"}},tt=["onClick"],at={class:"list-header"},nt=["onClick"],rt={class:"file-name"},lt={key:2,class:"file-size"},ot=re({__name:"FilesNavigator",props:{filesModel:{}},setup(s){const e=s,n=I(!1),i=I(""),l=I(new Set),m=I(!1),A=a=>{if(!y.searchTerm.trim())return x("span",a);const t=K(y.searchTerm,a);return t?x("span",a.split("").map((r,h)=>t.includes(h)?x("span",{class:"char-match"},r):r)):x("span",a)},d=V({currentIndex:1,pageSize:20,totalCount:0}),f=V({currentPath:"",breadcrumbs:[]}),y=V({searchTerm:"",isSearching:!1}),{loading:U,result:P,refetch:_}=Ue(async()=>{const a=await e.filesModel.list(d.pageSize,(d.currentIndex-1)*d.pageSize,y.searchTerm||void 0,f.currentPath||void 0);return d.totalCount=a.totalCount,a});L([()=>d.currentIndex,()=>d.pageSize],()=>{_()}),L(()=>y.searchTerm,()=>{console.log("Search term changed:",y.searchTerm),d.currentIndex=1,_()}),L(()=>f.currentPath,()=>{_()});const D=S(()=>P.value?P.value.items:[]);async function oe(a,t){const r=a.join("/");await e.filesModel.upload(r,t),await _()}async function G(a){a.forEach(async t=>{const r=await e.filesModel.download(t),h=URL.createObjectURL(r),b=document.createElement("a");b.href=h,b.download=t.split("/").pop()||"download",document.body.appendChild(b),b.click(),document.body.removeChild(b),URL.revokeObjectURL(h)})}function H(a){f.currentPath=a,f.breadcrumbs=a?a.split("/").filter(t=>t.length>0):[],d.currentIndex=1,_()}async function se(a){for(const t of a)await e.filesModel.delete(t.path);l.value.clear(),await _()}const ie=a=>a.type==="directory"?"":a.type==="file"?a.sizeHuman:"",v=S(()=>D.value?y.searchTerm.trim()?D.value.filter(a=>K(y.searchTerm,a.name)):D.value:[]),ce=S(()=>v.value?v.value.filter(a=>l.value.has(a.path)):[]);function ue(a){a.type==="directory"?(l.value.clear(),m.value=!1,H(a.path)):G([a.path])}const q=I(!1);function de(a){if(a&&a.type==="file")return;const t=document.createElement("input");t.type="file",t.onchange=async()=>{var b,Q,W;const r=(b=t.files)==null?void 0:b[0],h=await(r==null?void 0:r.arrayBuffer());if(!!r)try{q.value=!0;const X=(Q=a==null?void 0:a.path.split("/").filter(M=>M.length>0))!=null?Q:f.currentPath?f.currentPath.split("/").filter(M=>M.length>0):[];await oe([...X,(W=r.name)!=null?W:"Untitled file"],h?new Uint8Array(h):void 0),await _()}catch{Ae("Failed to upload file","File already exists")}finally{q.value=!1}},t.click()}const fe=S(()=>`Search files in ${f.currentPath?`/${f.currentPath}`:"/"}`);function pe(a){const t=a.path;l.value.has(t)?l.value.delete(t):l.value.add(t),he()}function me(){var a;m.value?l.value.clear():(a=v.value)==null||a.forEach(t=>{l.value.add(t.path)}),m.value=!m.value}function he(){var r;const a=((r=v.value)==null?void 0:r.length)||0,t=l.value.size;m.value=a>0&&t===a}function ve(){i.value="",n.value=!0}async function J(){if(i.value.trim()){const a=f.currentPath,t=i.value,r=a?`${a}/${t}`:t;await e.filesModel.createFolder(r),await _(),n.value=!1,i.value=""}}return(a,t)=>(p(),k("div",Ke,[w("div",et,[c(o($),{justify:"space-between",align:"center",gap:"small"},{default:u(()=>[c(o(Te),null,{default:u(()=>[c(o(ee),null,{default:u(()=>[w("a",{onClick:t[0]||(t[0]=r=>H(""))},[c(o(Ze))])]),_:1}),(p(!0),k(be,null,_e(f.breadcrumbs,(r,h)=>(p(),g(o(ee),{key:h},{default:u(()=>[w("a",{onClick:b=>H(f.breadcrumbs.slice(0,h+1).join("/"))},z(r),9,tt)]),_:2},1024))),128))]),_:1}),c(o($),{gap:"small"},{default:u(()=>[o(U)?j("",!0):(p(),g(o(Y),{key:0},{default:u(()=>[c(F,{size:"small",onClick:t[1]||(t[1]=()=>de())},{default:u(()=>[c(o(Ee)),C(" Upload File ")]),_:1}),c(F,{size:"small",onClick:t[2]||(t[2]=()=>ve())},{default:u(()=>[c(o(Xe)),C(" New Folder ")]),_:1})]),_:1})),l.value.size>0?(p(),g(o(Y),{key:1},{default:u(()=>[c(F,{size:"small",onClick:t[3]||(t[3]=()=>G(Array.from(l.value)))},{default:u(()=>[c(o(Ve),{size:"18"}),C(" Download ("+z(l.value.size)+") ",1)]),_:1}),c(F,{size:"small",danger:"",onClick:t[4]||(t[4]=()=>se(ce.value))},{default:u(()=>[c(o(Qe)),C(" Delete ("+z(l.value.size)+") ",1)]),_:1})]),_:1})):j("",!0)]),_:1})]),_:1})]),c(Me,{class:"scroll-area","outer-style":{flexGrow:"1"}},{default:u(()=>[w("div",at,[c(o($),{justify:"space-between",align:"center",gap:"small",style:{"margin-bottom":"8px"}},{default:u(()=>[c(o(we),{value:y.searchTerm,"onUpdate:value":t[5]||(t[5]=r=>y.searchTerm=r),loading:o(U),placeholder:fe.value,style:{"max-width":"300px"},size:"small"},null,8,["value","loading","placeholder"]),v.value&&v.value.length>0?(p(),g(o(Z),{key:0,checked:m.value,indeterminate:l.value.size>0&&l.value.size<v.value.length,class:"select-all-checkbox",onChange:me},null,8,["checked","indeterminate"])):j("",!0)]),_:1})]),v.value&&v.value.length>0?(p(),g(o(ke),{key:0,class:"files-list","data-source":v.value},{renderItem:u(({item:r})=>[c(o(Fe),{class:"compact-list-item"},{default:u(()=>[c(o($),{align:"center",justify:"space-between",style:{width:"100%"}},{default:u(()=>[w("div",{style:{display:"flex","align-items":"center",gap:"8px",flex:"1",cursor:"pointer","min-width":"0"},onClick:h=>ue(r)},[r.type==="directory"?(p(),g(o(Le),{key:0,size:"18px"})):(p(),g(o(He),{key:1,size:"18px"})),w("span",rt,[(p(),g(Oe(A(r.name))))]),r.type==="file"?(p(),k("span",lt,z(ie(r)),1)):j("",!0)],8,nt),c(o(Z),{checked:l.value.has(r.path),onChange:()=>pe(r),onClick:t[6]||(t[6]=Ce(()=>{},["stop"]))},null,8,["checked","onChange"])]),_:2},1024)]),_:2},1024)]),_:1},8,["data-source"])):(p(),g(o(Pe),{key:1,description:o(U)?"Loading...":"No files"},null,8,["description"]))]),_:1}),o(P)&&o(P).totalCount>d.pageSize?(p(),g(o(Ie),{key:0,current:d.currentIndex,"onUpdate:current":t[7]||(t[7]=r=>d.currentIndex=r),"page-size":d.pageSize,"onUpdate:pageSize":t[8]||(t[8]=r=>d.pageSize=r),total:o(P).totalCount,"show-total":r=>`${r} items`,"show-size-changer":"","page-size-options":["10","20","50","100"],style:{"margin-top":"20px","text-align":"center"}},null,8,["current","page-size","total","show-total"])):j("",!0),c(o(Se),{open:n.value,"onUpdate:open":t[10]||(t[10]=r=>n.value=r),title:"Create Folder",onOk:J,onCancel:t[11]||(t[11]=r=>n.value=!1)},{default:u(()=>[c(o(je),{value:i.value,"onUpdate:value":t[9]||(t[9]=r=>i.value=r),placeholder:"Enter folder name",onPressEnter:J},null,8,["value"])]),_:1},8,["open"])]))}});const st=le(ot,[["__scopeId","data-v-2be8fa34"]]),it={class:"files-container"},ct=re({__name:"Files",setup(s){const n=ze().params.projectId,i=N.fromProjectId(n);return(l,m)=>(p(),k("div",it,[c(o($e),null,{default:u(()=>[C("Files")]),_:1}),c(o(xe),null,{default:u(()=>[C(" Manage files located in your project's persistent directory "),c(ge,{path:"tools/files"})]),_:1}),c(o(Re),{class:"files-card"},{default:u(()=>[c(st,{"files-model":o(i)},null,8,["files-model"])]),_:1})]))}});const It=le(ct,[["__scopeId","data-v-d42eb84d"]]);export{It as default};
2
+ //# sourceMappingURL=Files.f23b9c53.js.map
@@ -0,0 +1,2 @@
1
+ import{u as D}from"./userStore.9e7a540a.js";import{b as E,c as C,d as k}from"./FormRunner.8bbe841e.js";import{d as R,eb as S,e5 as F,ae as U,r as A,w as I,c as L,aK as W,k as V,j as x,u as o,a5 as K,f as B,a as M,h as N,o as y,_ as T}from"./jwt-decode.esm.992666e9.js";import{r as j}from"./redirect.2fa4f8cf.js";import{a as q}from"./asyncComputed.1b787534.js";import{u as h}from"./uuid.9161765c.js";import{L as G}from"./CircularLoading.3e4ddd6d.js";import{f as P}from"./workspaceStore.4f0c433f.js";import"./Login.vue_vue_type_script_setup_true_lang.a92a80d0.js";import"./Logo.83b476a4.js";import"./string.f6a7565f.js";import"./index.3ff1c0be.js";import"./Steps.f820fb18.js";import"./index.a7b8e25e.js";import"./Watermark.40c8c47e.js";import"./constants.36bf7d70.js";import"./url.f490879d.js";import"./colorHelpers.d4f3f275.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[a]="9b5f30a1-98d5-4e93-841f-59aa2649e0cb",l._sentryDebugIdIdentifier="sentry-dbid-9b5f30a1-98d5-4e93-841f-59aa2649e0cb")}catch{}})();const z={key:0,class:"loading"},H=R({__name:"Form",setup(l){const a=S(),c=F(),f=U({playerKey:h()}),g=D(),i=A(null);I(a,()=>{a.name==="form"&&w()});const{loading:d,result:t,error:p,refetch:w}=q(async()=>{f.playerKey=h();const r=a.path.slice(1),e=await P(r);if(!e){c.push({name:"error",params:{status:"404"}});return}const n=new C({formRunnerData:e,logService:null,connectionManager:new k(e.id,"player",a.query),onRedirect:_,onFormStart:()=>{},onFormEnd:()=>{},onStackTraceUpdate:null,onStateUpdate:u=>i.value=u}),s=n.getState();return i.value=s.formState,{runnerData:e,controller:n}}),b=L(()=>{const r=!d,e=!!p,n=!t||i.value===null;return r&&(e||n)});W(()=>{var r,e,n,s,u;b.value&&c.push({name:"error",params:{status:"500"}}),!!((r=t.value)!=null&&r.runnerData)&&(e=t.value)!=null&&e.runnerData&&(document.title=(u=(n=t.value)==null?void 0:n.runnerData.welcomeTitle)!=null?u:(s=t.value)==null?void 0:s.runnerData.title)});function _(r,e){window.removeEventListener("beforeunload",m),j("player",c,r,e)}V(async()=>{window.addEventListener("beforeunload",m)}),x(()=>{window.removeEventListener("beforeunload",m)});const m=r=>{var e;if((e=t.value)!=null&&e.controller.handleCloseAttempt())return r.preventDefault(),""};return(r,e)=>{var n,s,u,v;return o(d)?(y(),K("div",z,[B(G)])):o(t)&&o(t).runnerData&&i.value&&!o(p)&&!o(d)?(y(),M(E,{key:f.playerKey,"form-runner-data":o(t).runnerData,"form-state":i.value,"is-preview":!1,"user-email":o(g).email,onRedirect:_,onActionClicked:(n=o(t))==null?void 0:n.controller.handleActionClick,onUpdateWidgetErrors:(s=o(t))==null?void 0:s.controller.updateWidgetFrontendErrors,onUpdateWidgetValue:(u=o(t))==null?void 0:u.controller.updateWidgetValue,onAuthComplete:(v=o(t))==null?void 0:v.controller.handleAuthComplete},null,8,["form-runner-data","form-state","user-email","onActionClicked","onUpdateWidgetErrors","onUpdateWidgetValue","onAuthComplete"])):N("",!0)}}});const de=T(H,[["__scopeId","data-v-972fe12c"]]);export{de as default};
2
+ //# sourceMappingURL=Form.bfea5673.js.map
@@ -1 +1 @@
1
- .outline-button[data-v-2d3b9e41]{cursor:pointer;display:flex;justify-content:center;align-items:center;padding:4px 8px;gap:8px;border-radius:4px;border:1px solid #d14056;font-weight:500;font-size:12px;color:#d14056;flex-shrink:0;box-shadow:1px 1px 3px #0000000f;background-color:transparent;box-sizing:border-box;height:26px}.outline-button .icon[data-v-2d3b9e41]{height:16px;width:16px}.outline-button .icon[data-v-2d3b9e41] path{fill:#d14056}.outline-button[data-v-2d3b9e41]:hover{background:#f9fafb}.outline-button[data-v-2d3b9e41]:active{background:#f9fafb;box-shadow:inset 1px 1px 2px #0000001a;border-color:transparent}.outline-button.disabled[data-v-2d3b9e41]{cursor:unset;background:#f3f4f6;border:1px solid #bdc3cc;color:#bdc3cc}.outline-button.disabled[data-v-2d3b9e41]:hover,.outline-button.disabled[data-v-2d3b9e41]:active{background:#f3f4f6;box-shadow:none}.outline-button.disabled .icon[data-v-2d3b9e41] path{fill:#bdc3cc}[data-v-b7a3a5ee]:root{--main-font-family: DM Sans, sans-serif}[data-v-b7a3a5ee]:root{--abstra-main-color-dark: #343b46}.p-dropdown[data-v-b7a3a5ee]{border-radius:8px;border:1px solid #343b46;background-color:#fff;height:37px;padding:0 10px;align-items:center}.p-dropdown-panel[data-v-b7a3a5ee]{background-color:#fff;padding:10px}.form-auto-fill-btn[data-v-b7a3a5ee]{background-color:#fff!important}[data-v-f2714c8a]:root{--main-font-family: DM Sans, sans-serif}[data-v-f2714c8a]:root{--abstra-main-color-dark: #343b46}.p-dropdown[data-v-f2714c8a]{border-radius:8px;border:1px solid #343b46;background-color:#fff;height:37px;padding:0 10px;align-items:center}.p-dropdown-panel[data-v-f2714c8a]{background-color:#fff;padding:10px}header[data-v-f2714c8a]{display:flex;width:100%;box-sizing:border-box;color:var(--font-color, #000)}.span-error[data-v-f2714c8a]{color:red}.disabled[data-v-f2714c8a]{filter:blur(8px);pointer-events:none;background-color:#e8e8e8}.unsaved-changes[data-v-f2714c8a]{position:absolute;z-index:1}.center[data-v-f2714c8a]{width:100%;height:100%;display:flex;position:relative;flex-direction:column;align-items:center;justify-content:center}.widget[data-v-f2714c8a]{position:relative}.widget .hint[data-v-f2714c8a]{position:relative;top:0;right:0}.buttons[data-v-f2714c8a]{display:flex;flex-direction:row;gap:1rem;justify-content:flex-end;align-items:center;width:100%;flex-wrap:wrap}.buttons .disabled[data-v-f2714c8a]{opacity:.5;cursor:not-allowed}.loading-wrapper[data-v-f2714c8a]{display:flex;flex-grow:1;justify-content:center;align-items:center;height:100%;width:100%}.auto-fill-btn[data-v-f2714c8a]{position:absolute;bottom:20px;left:20px}
1
+ .outline-button[data-v-2d3b9e41]{cursor:pointer;display:flex;justify-content:center;align-items:center;padding:4px 8px;gap:8px;border-radius:4px;border:1px solid #d14056;font-weight:500;font-size:12px;color:#d14056;flex-shrink:0;box-shadow:1px 1px 3px #0000000f;background-color:transparent;box-sizing:border-box;height:26px}.outline-button .icon[data-v-2d3b9e41]{height:16px;width:16px}.outline-button .icon[data-v-2d3b9e41] path{fill:#d14056}.outline-button[data-v-2d3b9e41]:hover{background:#f9fafb}.outline-button[data-v-2d3b9e41]:active{background:#f9fafb;box-shadow:inset 1px 1px 2px #0000001a;border-color:transparent}.outline-button.disabled[data-v-2d3b9e41]{cursor:unset;background:#f3f4f6;border:1px solid #bdc3cc;color:#bdc3cc}.outline-button.disabled[data-v-2d3b9e41]:hover,.outline-button.disabled[data-v-2d3b9e41]:active{background:#f3f4f6;box-shadow:none}.outline-button.disabled .icon[data-v-2d3b9e41] path{fill:#bdc3cc}[data-v-b7a3a5ee]:root{--main-font-family: DM Sans, sans-serif}[data-v-b7a3a5ee]:root{--abstra-main-color-dark: #343b46}.p-dropdown[data-v-b7a3a5ee]{border-radius:8px;border:1px solid #343b46;background-color:#fff;height:37px;padding:0 10px;align-items:center}.p-dropdown-panel[data-v-b7a3a5ee]{background-color:#fff;padding:10px}.form-auto-fill-btn[data-v-b7a3a5ee]{background-color:#fff!important}[data-v-4266401f]:root{--main-font-family: DM Sans, sans-serif}[data-v-4266401f]:root{--abstra-main-color-dark: #343b46}.p-dropdown[data-v-4266401f]{border-radius:8px;border:1px solid #343b46;background-color:#fff;height:37px;padding:0 10px;align-items:center}.p-dropdown-panel[data-v-4266401f]{background-color:#fff;padding:10px}header[data-v-4266401f]{display:flex;width:100%;box-sizing:border-box;color:var(--font-color, #000)}.span-error[data-v-4266401f]{color:red}.disabled[data-v-4266401f]{filter:blur(8px);pointer-events:none;background-color:#e8e8e8}.unsaved-changes[data-v-4266401f]{position:absolute;z-index:1}.center[data-v-4266401f]{width:100%;height:100%;display:flex;position:relative;flex-direction:column;align-items:center;justify-content:center}.widget[data-v-4266401f]{position:relative}.widget .hint[data-v-4266401f]{position:relative;top:0;right:0}.buttons[data-v-4266401f]{display:flex;flex-direction:row;gap:1rem;justify-content:flex-end;align-items:center;width:100%;flex-wrap:wrap}.buttons .disabled[data-v-4266401f]{opacity:.5;cursor:not-allowed}.loading-wrapper[data-v-4266401f]{display:flex;flex-grow:1;justify-content:center;align-items:center;height:100%;width:100%}.auto-fill-btn[data-v-4266401f]{position:absolute;bottom:20px;left:20px}
@@ -0,0 +1,2 @@
1
+ var se=Object.defineProperty;var ie=(r,e,t)=>e in r?se(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var n=(r,e,t)=>(ie(r,typeof e!="symbol"?e+"":e,t),t);import{u as useUserStore}from"./userStore.9e7a540a.js";import{d as defineComponent,am as inject,c as computed,o as openBlock,a5 as createElementBlock,a7 as renderSlot,h as createCommentVNode,e6 as mergeProps,e as createBaseVNode,em as lodash,eG as i18nProvider,a as createBlock,ef as resolveDynamicComponent,_ as _export_sfc,b as withCtx,u as unref,g as createTextVNode,r as ref,w as watch,f as createVNode,ea as normalizeClass,eT as StartWidget,eU as EndWidget,eV as ErrorWidget,aR as Fragment,ec as renderList,ed as toDisplayString,eW as StyleProvider,eF as withKeys,bR as Button}from"./jwt-decode.esm.992666e9.js";import{_ as _sfc_main$3}from"./Login.vue_vue_type_script_setup_true_lang.a92a80d0.js";import{u as useWorkspaceStore}from"./workspaceStore.4f0c433f.js";import{L as LoadingIndicator}from"./CircularLoading.3e4ddd6d.js";import{S as Steps}from"./Steps.f820fb18.js";import{W as Watermark}from"./Watermark.40c8c47e.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="cef4a14a-4b88-41d2-a66a-338aaa306308",r._sentryDebugIdIdentifier="sentry-dbid-cef4a14a-4b88-41d2-a66a-338aaa306308")}catch{}})();const Z=["width","height","fill","transform"],g={key:0},m=createBaseVNode("path",{d:"M112,36a12,12,0,0,0-12,12V60H24A20,20,0,0,0,4,80v96a20,20,0,0,0,20,20h76v12a12,12,0,0,0,24,0V48A12,12,0,0,0,112,36ZM28,172V84h72v88ZM252,80v96a20,20,0,0,1-20,20H152a12,12,0,0,1,0-24h76V84H152a12,12,0,0,1,0-24h80A20,20,0,0,1,252,80ZM88,112a12,12,0,0,1-12,12v20a12,12,0,0,1-24,0V124a12,12,0,0,1,0-24H76A12,12,0,0,1,88,112Z"},null,-1),y=[m],f={key:1},w=createBaseVNode("path",{d:"M240,80v96a8,8,0,0,1-8,8H24a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H232A8,8,0,0,1,240,80Z",opacity:"0.2"},null,-1),k=createBaseVNode("path",{d:"M112,40a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80v96a16,16,0,0,0,16,16h80v16a8,8,0,0,0,16,0V48A8,8,0,0,0,112,40ZM24,176V80h80v96ZM248,80v96a16,16,0,0,1-16,16H144a8,8,0,0,1,0-16h88V80H144a8,8,0,0,1,0-16h88A16,16,0,0,1,248,80ZM88,112a8,8,0,0,1-8,8H72v24a8,8,0,0,1-16,0V120H48a8,8,0,0,1,0-16H80A8,8,0,0,1,88,112Z"},null,-1),x=[w,k],S={key:2},z=createBaseVNode("path",{d:"M248,80v96a16,16,0,0,1-16,16H140a4,4,0,0,1-4-4V68a4,4,0,0,1,4-4h92A16,16,0,0,1,248,80ZM120,48V208a8,8,0,0,1-16,0V192H24A16,16,0,0,1,8,176V80A16,16,0,0,1,24,64h80V48a8,8,0,0,1,16,0ZM88,112a8,8,0,0,0-8-8H48a8,8,0,0,0,0,16h8v24a8,8,0,0,0,16,0V120h8A8,8,0,0,0,88,112Z"},null,-1),C=[z],B={key:3},b=createBaseVNode("path",{d:"M112,42a6,6,0,0,0-6,6V66H24A14,14,0,0,0,10,80v96a14,14,0,0,0,14,14h82v18a6,6,0,0,0,12,0V48A6,6,0,0,0,112,42ZM24,178a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h82V178ZM246,80v96a14,14,0,0,1-14,14H144a6,6,0,0,1,0-12h88a2,2,0,0,0,2-2V80a2,2,0,0,0-2-2H144a6,6,0,0,1,0-12h88A14,14,0,0,1,246,80ZM86,112a6,6,0,0,1-6,6H70v26a6,6,0,0,1-12,0V118H48a6,6,0,0,1,0-12H80A6,6,0,0,1,86,112Z"},null,-1),N=[b],E={key:4},P=createBaseVNode("path",{d:"M112,40a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80v96a16,16,0,0,0,16,16h80v16a8,8,0,0,0,16,0V48A8,8,0,0,0,112,40ZM24,176V80h80v96ZM248,80v96a16,16,0,0,1-16,16H144a8,8,0,0,1,0-16h88V80H144a8,8,0,0,1,0-16h88A16,16,0,0,1,248,80ZM88,112a8,8,0,0,1-8,8H72v24a8,8,0,0,1-16,0V120H48a8,8,0,0,1,0-16H80A8,8,0,0,1,88,112Z"},null,-1),W=[P],$={key:5},j=createBaseVNode("path",{d:"M112,44a4,4,0,0,0-4,4V68H24A12,12,0,0,0,12,80v96a12,12,0,0,0,12,12h84v20a4,4,0,0,0,8,0V48A4,4,0,0,0,112,44ZM24,180a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h84V180ZM244,80v96a12,12,0,0,1-12,12H144a4,4,0,0,1,0-8h88a4,4,0,0,0,4-4V80a4,4,0,0,0-4-4H144a4,4,0,0,1,0-8h88A12,12,0,0,1,244,80ZM84,112a4,4,0,0,1-4,4H68v28a4,4,0,0,1-8,0V116H48a4,4,0,0,1,0-8H80A4,4,0,0,1,84,112Z"},null,-1),T=[j],q={name:"PhTextbox"},G=defineComponent({...q,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(r){const e=r,t=inject("weight","regular"),a=inject("size","1em"),s=inject("color","currentColor"),i=inject("mirrored",!1),u=computed(()=>{var d;return(d=e.weight)!=null?d:t}),v=computed(()=>{var d;return(d=e.size)!=null?d:a}),_=computed(()=>{var d;return(d=e.color)!=null?d:s}),p=computed(()=>e.mirrored!==void 0?e.mirrored?"scale(-1, 1)":void 0:i?"scale(-1, 1)":void 0);return(d,F)=>(openBlock(),createElementBlock("svg",mergeProps({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:v.value,height:v.value,fill:_.value,transform:p.value},d.$attrs),[renderSlot(d.$slots,"default"),u.value==="bold"?(openBlock(),createElementBlock("g",g,y)):u.value==="duotone"?(openBlock(),createElementBlock("g",f,x)):u.value==="fill"?(openBlock(),createElementBlock("g",S,C)):u.value==="light"?(openBlock(),createElementBlock("g",B,N)):u.value==="regular"?(openBlock(),createElementBlock("g",E,W)):u.value==="thin"?(openBlock(),createElementBlock("g",$,T)):createCommentVNode("",!0)],16,Z))}}),WS_CLOSING_STATES=[WebSocket.CLOSING,WebSocket.CLOSED],WS_CUSTOM_CLOSING_REASONS={FRONTEND_FORM_RESTART:4e3};class FormConnectionManager{constructor(e,t,a){n(this,"ws",null);n(this,"heartbeatInterval");n(this,"onOpen",null);n(this,"onMessage",null);n(this,"onClose",null);this.formId=e,this.environment=t,this.userQueryParams=a}get url(){const e=location.protocol==="https:"?"wss:":"ws:",t=this.environment=="editor"?"_editor/api/forms/socket":"_socket",a=new URLSearchParams({id:this.formId,...this.userQueryParams});return`${e}//${location.host}/${t}?${a}`}handleOpen(e){if(!this.onOpen)throw new Error("onOpen is not set");this.onOpen(),e()}handleClose(e){(e.code===1006||!e.wasClean)&&clearInterval(this.heartbeatInterval),this.onClose&&this.onClose(e)}handleMessage(e){if(!this.onMessage)throw new Error("onMessage is not set");const t=JSON.parse(e.data);this.onMessage(t)}sendHeartbeat(){!this.ws||this.ws.readyState!==this.ws.OPEN||this.send({type:"execution:heartbeat"})}async waitForConnection(e=5e3){const t=Date.now();for(;;){if(Date.now()-t>e)throw new Error("WebSocket connection timeout");if(!this.ws)throw new Error("WebSocket connection lost");if(this.ws.readyState===WebSocket.OPEN)return;if(this.ws.readyState===WebSocket.CLOSED||this.ws.readyState===WebSocket.CLOSING)throw new Error("WebSocket connection failed");await new Promise(a=>setTimeout(a,100))}}async send(e){if(!this.ws)throw new Error(`[FormRunnerController] failed sending msg ${e.type}: websocket is not connected`);if(WS_CLOSING_STATES.includes(this.ws.readyState)&&await this.newConnection(),this.ws.readyState===WebSocket.CONNECTING&&await this.waitForConnection(),this.ws&&this.ws.readyState===WebSocket.OPEN)this.ws.send(JSON.stringify(e));else throw new Error(`[FormRunnerController] failed sending msg ${e.type}: websocket is not in open state`)}async close(e){this.ws&&this.ws.close(WS_CUSTOM_CLOSING_REASONS[e],e)}async newConnection(e=3,t){if(e!=0)return new Promise(a=>{clearInterval(this.heartbeatInterval),this.ws=new WebSocket(this.url,t),this.ws.onopen=()=>this.handleOpen(a),this.ws.onclose=s=>this.handleClose(s),this.ws.onmessage=s=>this.handleMessage(s),this.heartbeatInterval=setInterval(()=>this.sendHeartbeat(),2e3)}).catch(()=>{this.newConnection(e-1)})}isEditorConnection(){return this.environment==="editor"}}function isInputWidget(r){return"key"in r&&"value"in r&&"errors"in r}const executeCode=($context,code)=>{let evaluatedCode;try{evaluatedCode=eval(code)}catch(r){throw console.error(`[Error: execute_js]: ${r.message}, context: ${$context}`),r}return isSerializable(evaluatedCode)?evaluatedCode:null};async function executeJs(r){return{type:"execute-js:response",value:await executeCode(r.context,r.code)}}const isSerializable=r=>{try{return JSON.stringify(r),!0}catch{return!1}},FORM_END_STATES=["default-end","page-end","error"],FORM_RUNNING_STATES=["authenticating","page","loading"];class FormRunnerController{constructor({formRunnerData:e,logService:t,connectionManager:a,onFormStart:s,onFormEnd:i,onRedirect:u,onStateUpdate:v,onStackTraceUpdate:_}){n(this,"connectionManager");n(this,"logService");n(this,"formRunnerData");n(this,"formState");n(this,"touchedWidgets",{});n(this,"messageSeq",0);n(this,"executionId",null);n(this,"onFormStart");n(this,"onFormEnd");n(this,"onRedirect");n(this,"onStackTraceUpdate");n(this,"onStateUpdate");n(this,"userStore");n(this,"responseHistory",[]);n(this,"lastResponseHistory",[]);n(this,"handlers",{"execution:started":[e=>this.handleExecutionStartedMessage(e)],"execution:ended":[e=>this.handleExecutionEndedMessage(e)],"form:render":[e=>this.handleRenderMessage(e)],"form:mount-page":[e=>this.handleMountPageMessage(e)],"form:update-page":[e=>this.handleUpdatePageMessage(e)],"auth:require-info":[e=>this.handleAuthRequireInfoMessage(e)],"auth:invalid-jwt":[e=>this.handleAuthInvalidJWTMessage(e)],"auth:valid-jwt":[e=>this.handleAuthValidTokenMessage(e)],"redirect:request":[e=>this.handleRedirectRequestMessage(e)],"execute-js:request":[e=>this.handleExecuteJSRequestMessage(e)]});n(this,"start",async()=>{this.setFormState({type:"loading"}),await this.connectionManager.newConnection(3,this.userStore.wsAuthHeaders)});n(this,"resetForm",async()=>{var e;(e=this.logService)==null||e.log({type:"stdout",log:"[Form reloaded]"}),await this.connectionManager.close("FRONTEND_FORM_RESTART"),this.resetState()});n(this,"reconnect",async()=>{this.resetState(),await this.start()});n(this,"resetState",()=>{this.messageSeq=0,this.setFormState({type:"waiting",actions:[this.getStartAction()]})});n(this,"debouncedFinishPageLoading",lodash.exports.debounce(()=>{if(this.formState.type!=="page")throw new Error("Can't start loading while not in render-page state");this.setFormState({...this.formState,actions:this.formState.actions.map(e=>({...e,loading:!1}))})},500));n(this,"getStartAction",()=>this.actionFromMessage({key:"start",label:this.formRunnerData.startButtonText||i18nProvider.translateIfFound("i18n_start_action",this.formRunnerData.language)}));n(this,"getEndStateActions",()=>{const e=this.formRunnerData.restartButtonText||i18nProvider.translateIfFound("i18n_restart_action",this.formRunnerData.language);return this.formRunnerData.allowRestart?[this.actionFromMessage({key:"i18n_restart_action",label:e})]:[]});n(this,"getState",()=>({formState:this.formState}));n(this,"handleConnectionOpen",()=>{this.connectionManager.send({type:"execution:start"})});n(this,"widgetFromMessage",(e,t)=>{if(isInputWidget(e)){"value"in e&&e.value&&(this.touchedWidgets[e.key]=!0);const a=e.errors.map(s=>i18nProvider.translateIfFound(s,this.formRunnerData.language,e));return{...e,input:!0,_pythonErrors:a,errors:a}}return{...e,input:!1,_pythonErrors:[],errors:[],key:e.type+t}});n(this,"actionFromMessage",({key:e,label:t})=>({key:e,label:i18nProvider.translateIfFound(t,this.formRunnerData.language,this.formRunnerData),disabled:!1,loading:!1}));n(this,"getAutofillVisibilty",e=>this.lastResponseHistory.length===0?!1:this.lastResponseHistory[0].some(t=>e.find(a=>a.key===t.key&&a.type===t.type&&"value"in a)));n(this,"handleAutofillClick",()=>{!this.lastResponseHistory[0]||this.formState.type==="page"&&(this.lastResponseHistory[0].forEach(t=>{!("widgets"in this.formState&&this.formState.widgets.find(s=>s.key===t.key&&s.type===t.type))||"value"in t&&this.updateWidgetValue(t.key,t.value)}),this.setFormState({...this.formState,showAutofill:!1}))});n(this,"handleAuthComplete",e=>{e&&this.formState.type==="authenticating"&&this.sendAuthSavedJWT(e)});n(this,"handleMessageReceived",e=>{const t=this.handlers[e.type];if(!t)throw new Error(`No handler for message type ${e.type}`);if(t.forEach(a=>a(e)),e.debug&&this.onStackTraceUpdate){const a=e.type==="execution:ended";this.onStackTraceUpdate(e.debug.stack,a)}});n(this,"handleActionClick",async e=>{if(this.formState.type==="waiting")return this.start();if(this.formState.type==="page"){const t=e.key==="i18n_back_action";return this.hasErrors()&&!t?void 0:(this.setFormState({...this.formState,actions:this.formState.actions.map(a=>a.label===e.label?{...a,loading:!0}:a)}),this.lastResponseHistory.shift(),this.responseHistory.push(this.formState.widgets),this.sendFormNavigation(this.getWidgetValues(),e))}if(this.formState.type==="default-end"||this.formState.type==="page-end"){await this.resetForm(),await this.start();return}});n(this,"updateWidgetValue",(e,t)=>{if(this.formState.type!=="page")return;const a=this.formState.widgets.find(i=>"key"in i&&i.key===e);if(!a||!isInputWidget(a))return;this.touchedWidgets[e]=!0;const s=this.formState.widgets.map(i=>i.key===e?{...i,value:t}:i);this.setFormState({...this.formState,widgets:s}),this.sendInput(this.getWidgetValues(),this.getSecrets())});n(this,"updateWidgetFrontendErrors",(e,t)=>{if(this.formState.type!=="page"||!this.formState.widgets.find(i=>i.key===e))return;const s=this.formState.widgets.map(i=>i.key===e?{...i,errors:i._pythonErrors.concat(t.map(u=>i18nProvider.translateIfFound(u,this.formRunnerData.language,i)))}:i);this.setFormState({...this.formState,widgets:s})});if(this.formRunnerData=e,this.logService=t,this.connectionManager=a,this.onFormStart=s,this.onFormEnd=i,this.onRedirect=u,this.onStateUpdate=v,this.onStackTraceUpdate=_,this.userStore=useUserStore(),this.connectionManager.onOpen=()=>this.handleConnectionOpen(),this.connectionManager.onMessage=p=>this.handleMessageReceived(p),this.connectionManager.onClose=p=>this.handleConnectionClose(p),this.formRunnerData.autoStart&&!this.connectionManager.isEditorConnection()){this.formState={type:"loading"},this.start();return}this.formState={type:"waiting",actions:[this.getStartAction()]}}get publicLogService(){return this.logService}fullWidthFromMessage(e){return e.some(t=>"fullWidth"in t&&t.fullWidth)}async handleExecutionStartedMessage(e){this.executionId=e.executionId,this.onFormStart()}handleRenderMessage(e){if(e.seq!==this.messageSeq)return;const t=e.widgets.map(this.widgetFromMessage);if(e.endPage){this.setFormState({...this.formState,type:"page-end",actions:this.getEndStateActions(),widgets:t,fullWidth:this.fullWidthFromMessage(e.widgets),stepsInfo:e.stepsInfo,refreshKey:e.stepsInfo.current.toString(),showAutofill:this.getAutofillVisibilty(t)});return}let a=[{key:"back",label:"i18n_back_action"},{key:"next",label:"i18n_next_action"}];e.actions&&(a=e.actions),this.setFormState({type:"page",widgets:t,actions:a.map(this.actionFromMessage),fullWidth:this.fullWidthFromMessage(e.widgets),stepsInfo:e.stepsInfo,refreshKey:e.stepsInfo.current.toString(),showAutofill:this.getAutofillVisibilty(t)})}async handleExecuteJSRequestMessage(e){const t=await executeJs(e);this.connectionManager.send(t)}async handleAuthRequireInfoMessage(e){const{jwt:t,isJWTValid:a}=this.userStore;if(t&&a()&&!e.refresh){this.sendAuthSavedJWT(t);return}this.setFormState({type:"authenticating"})}async handleAuthInvalidJWTMessage(e){this.setFormState({type:"authenticating"})}async handleAuthValidTokenMessage(e){}async handleRedirectRequestMessage(e){this.onRedirect(e.url,e.queryParams)}handleMountPageMessage(e){var a,s;const t=e.widgets.map(this.widgetFromMessage);if(e.endProgram){this.setFormState({type:"page-end",actions:this.getEndStateActions(),widgets:t,fullWidth:this.fullWidthFromMessage(e.widgets),stepsInfo:e.steps,refreshKey:Date.now().toString(),showAutofill:this.getAutofillVisibilty(t),legacy:!0});return}this.setFormState({type:"page",widgets:t,actions:(s=(a=e.actions)==null?void 0:a.map(i=>this.actionFromMessage({key:i,label:i})))!=null?s:[],fullWidth:this.fullWidthFromMessage(e.widgets),stepsInfo:e.steps,refreshKey:Date.now().toString(),showAutofill:this.getAutofillVisibilty(t),legacy:!0})}async handleUpdatePageMessage(e){if(e.seq===this.messageSeq){if(this.formState.type!=="page")throw new Error("Received form:update-page message while not in render-page state");this.setFormState({...this.formState,error:{message:e.validation.message,status:e.validation.status},widgets:e.widgets.map(this.widgetFromMessage),actions:this.formState.actions.map(t=>({...t,disabled:this.shouldDisableAction(t,e)}))}),this.debouncedFinishPageLoading()}}shouldDisableAction(e,t){if(e.key==="i18n_back_action"||this.formState.type!=="page")return!1;const s=t.widgets.map(this.widgetFromMessage).some(u=>u.errors.length>0),i=t.validation.status===!1||Boolean(t.validation.message);return s||i}async handleExecutionEndedMessage(e){var t;this.lastResponseHistory=[...this.responseHistory],this.responseHistory=[],!FORM_END_STATES.includes(this.formState.type)&&(e.exitStatus==="SUCCESS"&&(this.setFormState({type:"default-end",actions:this.getEndStateActions()}),(t=this.logService)==null||t.log({type:"stdout",log:"[Form run finished]"})),e.exitStatus==="EXCEPTION"&&this.setFormState({type:"error",message:e.exception,executionId:this.executionId}),this.onFormEnd())}sendFormNavigation(e,t,a){this.connectionManager.send({type:"form:navigation",payload:e,secrets:a,action:t==null?void 0:t.key,seq:++this.messageSeq})}sendInput(e,t){this.connectionManager.send({type:"form:input",payload:e,secrets:t,seq:++this.messageSeq})}sendAuthSavedJWT(e){this.connectionManager.send({type:"auth:saved-jwt",jwt:e})}handleCloseAttempt(){return FORM_END_STATES.includes(this.formState.type)||this.formState.type==="waiting"?!1:(this.connectionManager.send({type:"debug:close-attempt"}),!0)}handleConnectionClose(e){e.code!==WS_CUSTOM_CLOSING_REASONS.FRONTEND_FORM_RESTART&&FORM_RUNNING_STATES.includes(this.formState.type)&&this.reconnect()}setFormState(e){this.formState=Object.freeze(e),this.onStateUpdate(e)}getSecrets(){return this.formState.type!=="page"?[]:this.formState.widgets.filter(e=>"secret"in e).reduce((e,t)=>"key"in t&&"secret"in t?[...e,{key:t.key,secret:t.secret}]:e,[])}setWidgetValidationFunction(e,t){if(this.formState.type!=="page")return;const a=this.formState.widgets.find(s=>"key"in s&&s.key===e);!a||!isInputWidget(a)||(a.validationFunction=t)}hasErrors(){var e;return this.formState.type!=="page"?!1:((e=this.formState.error)==null?void 0:e.status)===!1||this.formState.widgets.some(t=>t.errors.length>0)}getWidgetValue(e){if(this.formState.type!=="page")return null;const t=this.formState.widgets.find(a=>"key"in a&&a.key===e);if(!t||!isInputWidget(t))return null}getWidgetValues(){return this.formState.type!=="page"?{}:this.formState.widgets.reduce((e,t)=>("value"in t&&(this.touchedWidgets[t.key]||this.formState.legacy)&&(e[t.key]=t.value),e),{})}}const _hoisted_1$1={class:"outline-button"},_sfc_main$2=defineComponent({__name:"OutlineButton",props:{icon:{},noShadow:{type:Boolean},status:{}},setup(r){return(e,t)=>(openBlock(),createElementBlock("button",_hoisted_1$1,[e.icon?(openBlock(),createBlock(resolveDynamicComponent(e.icon),{key:0,class:"icon",color:"#fff"})):createCommentVNode("",!0),renderSlot(e.$slots,"default",{},void 0,!0)]))}}),OutlineButton_vue_vue_type_style_index_0_scoped_2d3b9e41_lang="",OutlineButton=_export_sfc(_sfc_main$2,[["__scopeId","data-v-2d3b9e41"]]),_sfc_main$1=defineComponent({__name:"FormAutoFill",emits:["click"],setup(r,{emit:e}){return(t,a)=>(openBlock(),createBlock(OutlineButton,{icon:unref(G),class:"form-auto-fill-btn",onClick:a[0]||(a[0]=s=>e("click"))},{default:withCtx(()=>[createTextVNode(" Repeat last answer ")]),_:1},8,["icon"]))}}),FormAutoFill_vue_vue_type_style_index_0_scoped_b7a3a5ee_lang="",FormAutoFill=_export_sfc(_sfc_main$1,[["__scopeId","data-v-b7a3a5ee"]]),_hoisted_1={class:"center"},_hoisted_2={key:0,class:"loading-wrapper"},_hoisted_3={class:"form-wrapper"},_hoisted_4=["id"],_hoisted_5={key:4,class:"span-error"},_hoisted_6={key:0,class:"buttons"},_sfc_main=defineComponent({__name:"FormRunner",props:{formRunnerData:{},formState:{},isPreview:{type:Boolean},disabled:{type:Boolean}},emits:["action-clicked","auto-fill-clicked","update-widget-value","update-widget-errors","auth-complete"],setup(r,{emit:e}){const t=r,a=useWorkspaceStore(),s=computed(()=>{var o;return((o=a.state.workspace)==null?void 0:o.logoUrl)||""}),i=ref(null),u=ref({}),v=computed(()=>!t.formState||t.formState.type==="loading"),_=computed(()=>{var o;return((o=t.formState)==null?void 0:o.type)==="authenticating"}),p=computed(()=>{var o;return((o=t.formState)==null?void 0:o.type)==="waiting"}),d=computed(()=>{var o;return((o=t.formState)==null?void 0:o.type)==="default-end"}),F=computed(()=>{var o;return((o=t.formState)==null?void 0:o.type)==="error"}),I=computed(()=>{var o;return t.isPreview&&((o=t.formState)==null?void 0:o.type)==="page"&&t.formState.showAutofill}),D=computed(()=>{var o,l;return((o=t.formState)==null?void 0:o.type)==="page"&&"stepsInfo"in t.formState&&!((l=t.formState.stepsInfo)!=null&&l.disabled)}),H=computed(()=>{var o;if(((o=t.formState)==null?void 0:o.type)==="page"&&"stepsInfo"in t.formState)return t.formState.stepsInfo}),O=computed(()=>{var o;return((o=t.formState)==null?void 0:o.type)==="error"&&"executionId"in t.formState?t.formState.executionId:null}),R=computed(()=>{var o;return((o=t.formState)==null?void 0:o.type)==="page"&&t.formState.error&&t.formState.error.status===!1}),U=computed(()=>!t.formState||!("widgets"in t.formState)?[]:t.formState.widgets),L=computed(()=>!t.formState||!("actions"in t.formState)?[]:t.formState.actions),K=computed(()=>t.formState&&"actions"in t.formState),J=computed(()=>!R.value||!("error"in t.formState)||!t.formState.error?"":t.formState.error.message||i18nProvider.translateIfFound("i18n_generic_validation_error",t.formRunnerData.language)),Q=computed(()=>({"full-width":Y()})),X=()=>{!i.value||(i.value.scrollTop=0)},Y=()=>{var o,l;return((o=t.formState)==null?void 0:o.type)==="page"?t.formState.fullWidth:((l=t.formState)==null?void 0:l.type)==="page-end"?t.formState.fullWidth&&t.formState.widgets.length>0:!1},ee=(o,l)=>"key"in o?o.key:o.type+l,te=o=>{const l="refreshKey"in t.formState?t.formState.refreshKey:0;return"key"in o?o.key+"_"+l:o.type+"_"+l},oe=o=>isInputWidget(o)&&o.value,ae=(o,l)=>{"key"in o&&(u.value[o.key]=l)},ne=o=>({"next-button__disabled":o.disabled||o.loading}),re=o=>o.disabled||o.loading;return watch(()=>t.formState,(o,l)=>{o.type==="page"&&(l==null?void 0:l.type)==="page"&&o.refreshKey!==l.refreshKey&&X()}),(o,l)=>{var A,V;return openBlock(),createElementBlock("div",_hoisted_1,[I.value?(openBlock(),createBlock(FormAutoFill,{key:0,class:"auto-fill-btn",form:o.formRunnerData,style:{"z-index":1},onClick:l[0]||(l[0]=c=>e("auto-fill-clicked"))},null,8,["form"])):createCommentVNode("",!0),D.value?(openBlock(),createBlock(Steps,{key:1,"steps-info":H.value,"is-preview":o.isPreview},null,8,["steps-info","is-preview"])):createCommentVNode("",!0),createBaseVNode("main",{ref_key:"scrollableContainer",ref:i,class:normalizeClass([{disabled:o.disabled}]),style:{padding:"50px 0px","box-sizing":"border-box"}},[v.value?(openBlock(),createElementBlock("div",_hoisted_2,[createVNode(LoadingIndicator)])):_.value?(openBlock(),createBlock(_sfc_main$3,{key:1,locale:o.formRunnerData.language,"logo-url":(A=s.value)!=null?A:void 0,"brand-name":(V=o.formRunnerData.brandName)!=null?V:void 0,onDone:l[1]||(l[1]=c=>e("auth-complete",c))},null,8,["locale","logo-url","brand-name"])):(openBlock(),createElementBlock("div",{key:2,class:normalizeClass(["form",Q.value])},[createBaseVNode("div",_hoisted_3,[p.value?(openBlock(),createBlock(StartWidget,{key:0,form:o.formRunnerData},null,8,["form"])):d.value?(openBlock(),createBlock(EndWidget,{key:1,"end-message":o.formRunnerData.endMessage,locale:o.formRunnerData.language},null,8,["end-message","locale"])):F.value?(openBlock(),createBlock(ErrorWidget,{key:2,"error-message":o.formRunnerData.errorMessage,"execution-id":O.value,locale:o.formRunnerData.language},null,8,["error-message","execution-id","locale"])):(openBlock(!0),createElementBlock(Fragment,{key:3},renderList(U.value,(c,M)=>(openBlock(),createElementBlock("div",{id:c.type+M,key:ee(c,M),class:"widget"},[(openBlock(),createBlock(resolveDynamicComponent(c.type),{ref_for:!0,ref:h=>ae(c,h),key:te(c),value:oe(c),errors:c.errors,"user-props":c,legacy:o.formState.legacy,locale:o.formRunnerData.language,"onUpdate:value":h=>e("update-widget-value",c.key,h),"onUpdate:errors":h=>e("update-widget-errors",c.key,h)},null,40,["value","errors","user-props","legacy","locale","onUpdate:value","onUpdate:errors"])),(openBlock(!0),createElementBlock(Fragment,null,renderList(c.errors,h=>(openBlock(),createElementBlock("span",{key:h,class:"span-error"},toDisplayString(h),1))),128))],8,_hoisted_4))),128)),R.value?(openBlock(),createElementBlock("span",_hoisted_5,toDisplayString(J.value),1)):createCommentVNode("",!0)]),K.value?(openBlock(),createElementBlock("div",_hoisted_6,[createVNode(unref(StyleProvider),null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(L.value,c=>(openBlock(),createBlock(unref(Button),{key:c.key,class:normalizeClass(["next-button",ne(c)]),loading:c.loading,disabled:re(c),onClick:M=>e("action-clicked",c),onKeydown:withKeys(M=>e("action-clicked",c),["enter"])},{default:withCtx(()=>[createTextVNode(toDisplayString(c.label),1)]),_:2},1032,["class","loading","disabled","onClick","onKeydown"]))),128))]),_:1})])):createCommentVNode("",!0)],2))],2),createVNode(Watermark,{"page-id":o.formRunnerData.id,locale:o.formRunnerData.language},null,8,["page-id","locale"])])}}}),FormRunner_vue_vue_type_style_index_0_scoped_4266401f_lang="",FormRunner=_export_sfc(_sfc_main,[["__scopeId","data-v-4266401f"]]);export{FORM_END_STATES as F,FORM_RUNNING_STATES as a,FormRunner as b,FormRunnerController as c,FormConnectionManager as d};
2
+ //# sourceMappingURL=FormRunner.8bbe841e.js.map
@@ -0,0 +1,2 @@
1
+ import{r as u,d as m,e5 as h,k as b,j as y,m as w,a as g,o as v,_ as I}from"./jwt-decode.esm.992666e9.js";import{l as d}from"./fetch.83d89bdc.js";import{u as k}from"./polling.88a266b3.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="bf2762be-706d-4268-b71d-e949c409cfbe",t._sentryDebugIdIdentifier="sentry-dbid-bf2762be-706d-4268-b71d-e949c409cfbe")}catch{}})();const _=4,C=t=>{const n=t.router,r=u(""),s=u(Array(_).fill(!0));let a=0;const l=async()=>{try{const e=new AbortController,o=setTimeout(()=>e.abort(),1e3),f=await d("/_healthcheck",{method:"GET",signal:e.signal,headers:{"Content-Type":"application/json","Cache-Control":"no-cache"}});clearTimeout(o),s.value[a]=f.status===200}catch{s.value[a]=!1}if(a=(a+1)%_,s.value.every(e=>!e)&&r.value){const e=n.currentRoute.value.path,o=new URLSearchParams;o.set("redirect",e),window.location.href=r.value+"?"+o.toString()}},{startPolling:c,endPolling:p}=k({task:l,interval:2e3}),i=async()=>{const e=await d("/_editor/api/web-editor/",{method:"GET"});if(!e.ok){setTimeout(()=>{i()},1e3);return}const o=await e.json();o.waitingRoomUrl&&(r.value=o.waitingRoomUrl,c())};return{setup:i,cleanUp:p}},H=m({__name:"Home",setup(t){const n=h(),{setup:r,cleanUp:s}=C({router:n});return b(()=>{r()}),y(()=>{s()}),(a,l)=>{const c=w("RouterView");return v(),g(c,{class:"router"})}}});const U=I(H,[["__scopeId","data-v-3737a9c1"]]);export{U as default};
2
+ //# sourceMappingURL=Home.3bf2f131.js.map
@@ -0,0 +1,2 @@
1
+ import{i as h}from"./metadata.cfad5458.js";import{W as k}from"./Watermark.40c8c47e.js";import{F as b}from"./PhArrowSquareOut.vue.ecfa9cb2.js";import{d as v,e5 as w,c as x,r as C,u as e,a5 as u,f as d,b as r,h as D,o as a,a as n,g as m,T as y,aR as I,ec as z,de as _,ef as T,ed as F,ea as B,_ as H}from"./jwt-decode.esm.992666e9.js";import{u as L}from"./workspaceStore.4f0c433f.js";import"./index.3e7471f4.js";import{L as N}from"./LoadingOutlined.ee72932a.js";import{C as S}from"./Card.957a87b2.js";import"./PhUserList.vue.3791cb59.js";import"./PhWebhooksLogo.vue.fe81fb65.js";import"./constants.36bf7d70.js";import"./userStore.9e7a540a.js";import"./url.f490879d.js";import"./colorHelpers.d4f3f275.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[i]="e3bb6365-93e8-426b-8414-5ccf4a961eff",o._sentryDebugIdIdentifier="sentry-dbid-e3bb6365-93e8-426b-8414-5ccf4a961eff")}catch{}})();const V={key:0,class:"home-container"},W=v({__name:"Home",setup(o){const i=w(),l=L(),f=x(()=>{var s;return((s=l.state.workspace)==null?void 0:s.sidebar.filter(p=>p.id!=="home"))||[]}),c=C(null),g=async(s,p)=>{c.value=p,await i.push({path:`/${s}`}),c.value=null};return(s,p)=>e(l).state.workspace?(a(),u("div",V,[d(e(_),{vertical:"",gap:"large",class:"cards-container"},{default:r(()=>[f.value.length===0?(a(),n(e(y),{key:0,type:"secondary",style:{"font-size":"18px"}},{default:r(()=>[m(" There are no forms available for you. ")]),_:1})):(a(!0),u(I,{key:1},z(f.value,t=>(a(),n(e(S),{key:t.id,class:B(["form-card",{loading:c.value===t.id}]),"body-style":{cursor:"pointer"},onClick:E=>g(t.path,t.id)},{default:r(()=>[d(e(_),{gap:"large",align:"center",justify:"space-between"},{default:r(()=>[(a(),n(T(e(h)(t.type)),{style:{"flex-shrink":"0",width:"22px",height:"18px"}})),d(e(y),{style:{"font-size":"18px","font-weight":"500"}},{default:r(()=>[m(F(t.name),1)]),_:2},1024),c.value!==t.id?(a(),n(e(b),{key:0,size:"20"})):(a(),n(e(N),{key:1,style:{"font-size":"20px"}}))]),_:2},1024)]),_:2},1032,["class","onClick"]))),128))]),_:1}),d(k,{class:"watermark","page-id":"home",locale:e(l).state.workspace.language},null,8,["locale"])])):D("",!0)}});const Y=H(W,[["__scopeId","data-v-060376d1"]]);export{Y as default};
2
+ //# sourceMappingURL=Home.42964d5b.js.map
@@ -1,2 +1,2 @@
1
- var ee=Object.defineProperty;var te=(d,s,o)=>s in d?ee(d,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):d[s]=o;var q=(d,s,o)=>(te(d,typeof s!="symbol"?s+"":s,o),o);import{C as ae}from"./CrudView.bbc83763.js";import{a as H}from"./asyncComputed.decbe125.js";import{A as G}from"./constants.54f5dbb0.js";import{d as F,am as B,c as C,o as p,a5 as m,a7 as se,h as J,e6 as le,e as w,k as oe,aq as ie,u as e,aR as re,ec as ne,a as A,b as a,f as l,g as i,ed as I,d9 as y,cN as de,S as ce,_ as K,eb as ue,bR as T,de as $,da as D,d8 as z,d4 as pe,A as E,eq as ge,er as fe,cH as me,ex as he,f0 as ye}from"./jwt-decode.esm.28320b05.js";import{h as N,l as O,r as W}from"./router.858e1af2.js";import{a as _e,B as be}from"./build.36ea33ce.js";import{a as ve}from"./organization.7d79a3c7.js";import{a as we}from"./project.c76d644e.js";import"./tables.337a9b65.js";import{g as ke}from"./datetime.27912eb6.js";import{u as Le}from"./polling.0bb90faf.js";import{_ as Se,R as Ae}from"./repository.37d2927a.js";import{G as Ce}from"./PhArrowCounterClockwise.vue.3f439d6d.js";import{F as Ie}from"./PhArrowSquareOut.vue.73431843.js";import{G as Y}from"./PhChats.vue.20c511b5.js";import{I as Me}from"./PhCopySimple.vue.f585b051.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.0796f440.js";import"./url.e7d14364.js";import"./PhDotsThreeVertical.vue.c1812ea8.js";import"./index.3a2ab2d2.js";import"./index.aca944a5.js";import"./record.1b6df81e.js";import"./string.4c218fd1.js";import"./LoadingOutlined.6ed83a08.js";(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[s]="63019d56-b86a-4ab9-a9fc-8020941422a1",d._sentryDebugIdIdentifier="sentry-dbid-63019d56-b86a-4ab9-a9fc-8020941422a1")}catch{}})();const Ze=["width","height","fill","transform"],xe={key:0},je=w("path",{d:"M227.85,46.89a20,20,0,0,0-18.74-18.74c-13.13-.77-46.65.42-74.48,28.24L131,60H74.36a19.83,19.83,0,0,0-14.14,5.86L25.87,100.19a20,20,0,0,0,11.35,33.95l37.14,5.18,42.32,42.32,5.19,37.18A19.88,19.88,0,0,0,135.34,235a20.13,20.13,0,0,0,6.37,1,19.9,19.9,0,0,0,14.1-5.87l34.34-34.35A19.85,19.85,0,0,0,196,181.64V125l3.6-3.59C227.43,93.54,228.62,60,227.85,46.89ZM76,84h31L75.75,115.28l-27.23-3.8ZM151.6,73.37A72.27,72.27,0,0,1,204,52a72.17,72.17,0,0,1-21.38,52.41L128,159,97,128ZM172,180l-27.49,27.49-3.8-27.23L172,149Zm-72,22c-8.71,11.85-26.19,26-60,26a12,12,0,0,1-12-12c0-33.84,14.12-51.32,26-60A12,12,0,1,1,68.18,175.3C62.3,179.63,55.51,187.8,53,203c15.21-2.51,23.37-9.3,27.7-15.18A12,12,0,1,1,100,202Z"},null,-1),$e=[je],De={key:1},Re=w("path",{d:"M184,120v61.65a8,8,0,0,1-2.34,5.65l-34.35,34.35a8,8,0,0,1-13.57-4.53L128,176ZM136,72H74.35a8,8,0,0,0-5.65,2.34L34.35,108.69a8,8,0,0,0,4.53,13.57L80,128ZM40,216c37.65,0,50.69-19.69,54.56-28.18L68.18,161.44C59.69,165.31,40,178.35,40,216Z",opacity:"0.2"},null,-1),Ve=w("path",{d:"M223.85,47.12a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.41,27.07L132.69,64H74.36A15.91,15.91,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A15.91,15.91,0,0,0,192,181.64V123.31l4.77-4.77C223.45,91.86,224.6,59.71,223.85,47.12ZM74.36,80h42.33L77.16,119.52,40,114.34Zm74.41-9.45a76.65,76.65,0,0,1,59.11-22.47,76.46,76.46,0,0,1-22.42,59.16L128,164.68,91.32,128ZM176,181.64,141.67,216l-5.19-37.17L176,139.31Zm-74.16,9.5C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Z"},null,-1),Be=[Re,Ve],Te={key:2},ze=w("path",{d:"M101.85,191.14C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Zm122-144a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.4,27.07h0L88,108.7A8,8,0,0,1,76.67,97.39l26.56-26.57A4,4,0,0,0,100.41,64H74.35A15.9,15.9,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A16,16,0,0,0,192,181.65V155.59a4,4,0,0,0-6.83-2.82l-26.57,26.56a8,8,0,0,1-11.71-.42,8.2,8.2,0,0,1,.6-11.1l49.27-49.27h0C223.45,91.86,224.6,59.71,223.85,47.12Z"},null,-1),Ee=[ze],Ne={key:3},Pe=w("path",{d:"M221.86,47.24a14,14,0,0,0-13.11-13.1c-12.31-.73-43.77.39-69.88,26.5L133.52,66H74.35a13.9,13.9,0,0,0-9.89,4.1L30.11,104.44a14,14,0,0,0,7.94,23.76l39.13,5.46,45.16,45.16L127.8,218a14,14,0,0,0,23.76,7.92l34.35-34.35a13.91,13.91,0,0,0,4.1-9.89V122.48l5.35-5.35h0C221.46,91,222.59,59.56,221.86,47.24ZM38.11,115a2,2,0,0,1,.49-2L72.94,78.58A2,2,0,0,1,74.35,78h47.17L77.87,121.64l-38.14-5.32A1.93,1.93,0,0,1,38.11,115ZM178,181.65a2,2,0,0,1-.59,1.41L143.08,217.4a2,2,0,0,1-3.4-1.11l-5.32-38.16L178,134.48Zm8.87-73h0L128,167.51,88.49,128l58.87-58.88a78.47,78.47,0,0,1,60.69-23A2,2,0,0,1,209.88,48,78.47,78.47,0,0,1,186.88,108.64ZM100,190.31C95.68,199.84,81.13,222,40,222a6,6,0,0,1-6-6c0-41.13,22.16-55.68,31.69-60a6,6,0,1,1,5,10.92c-7,3.17-22.53,13.52-24.47,42.91,29.39-1.94,39.74-17.52,42.91-24.47a6,6,0,1,1,10.92,5Z"},null,-1),He=[Pe],Fe={key:4},Ue=w("path",{d:"M223.85,47.12a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.41,27.07L132.69,64H74.36A15.91,15.91,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A15.91,15.91,0,0,0,192,181.64V123.31l4.77-4.77C223.45,91.86,224.6,59.71,223.85,47.12ZM74.36,80h42.33L77.16,119.52,40,114.34Zm74.41-9.45a76.65,76.65,0,0,1,59.11-22.47,76.46,76.46,0,0,1-22.42,59.16L128,164.68,91.32,128ZM176,181.64,141.67,216l-5.19-37.17L176,139.31Zm-74.16,9.5C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Z"},null,-1),qe=[Ue],Ge={key:5},Oe=w("path",{d:"M219.86,47.36a12,12,0,0,0-11.22-11.22c-12-.71-42.82.38-68.35,25.91L134.35,68h-60a11.9,11.9,0,0,0-8.48,3.52L31.52,105.85a12,12,0,0,0,6.81,20.37l39.79,5.55,46.11,46.11,5.55,39.81a12,12,0,0,0,20.37,6.79l34.34-34.35a11.9,11.9,0,0,0,3.52-8.48v-60l5.94-5.94C219.48,90.18,220.57,59.41,219.86,47.36ZM36.21,115.6a3.94,3.94,0,0,1,1-4.09L71.53,77.17A4,4,0,0,1,74.35,76h52L78.58,123.76,39.44,118.3A3.94,3.94,0,0,1,36.21,115.6ZM180,181.65a4,4,0,0,1-1.17,2.83l-34.35,34.34a4,4,0,0,1-6.79-2.25l-5.46-39.15L180,129.65Zm-52-11.31L85.66,128l60.28-60.29c23.24-23.24,51.25-24.23,62.22-23.58a3.93,3.93,0,0,1,3.71,3.71c.65,11-.35,39-23.58,62.22ZM98.21,189.48C94,198.66,80,220,40,220a4,4,0,0,1-4-4c0-40,21.34-54,30.52-58.21a4,4,0,0,1,3.32,7.28c-7.46,3.41-24.43,14.66-25.76,46.85,32.19-1.33,43.44-18.3,46.85-25.76a4,4,0,1,1,7.28,3.32Z"},null,-1),We=[Oe],Ye={name:"PhRocketLaunch"},Je=F({...Ye,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(d){const s=d,o=B("weight","regular"),L=B("size","1em"),S=B("color","currentColor"),M=B("mirrored",!1),h=C(()=>{var g;return(g=s.weight)!=null?g:o}),f=C(()=>{var g;return(g=s.size)!=null?g:L}),Z=C(()=>{var g;return(g=s.color)!=null?g:S}),x=C(()=>s.mirrored!==void 0?s.mirrored?"scale(-1, 1)":void 0:M?"scale(-1, 1)":void 0);return(g,_)=>(p(),m("svg",le({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:f.value,height:f.value,fill:Z.value,transform:x.value},g.$attrs),[se(g.$slots,"default"),h.value==="bold"?(p(),m("g",xe,$e)):h.value==="duotone"?(p(),m("g",De,Be)):h.value==="fill"?(p(),m("g",Te,Ee)):h.value==="light"?(p(),m("g",Ne,He)):h.value==="regular"?(p(),m("g",Fe,qe)):h.value==="thin"?(p(),m("g",Ge,We)):J("",!0)],16,Ze))}}),Ke={key:0,class:"flex-row"},Qe={key:1,class:"flex-row"},Xe={key:2,class:"flex-row"},e1=F({__name:"ExecutionsShort",props:{stageId:{},projectId:{}},emits:["select"],setup(d,{emit:s}){const o=d,L=new Ae,{result:S,refetch:M,loading:h}=H(async()=>{const{executions:_}=await L.list({projectId:o.projectId,stageId:o.stageId,limit:6});return _}),f=_=>{s("select",_)},Z=_=>ke(_,{weekday:void 0}),{startPolling:x,endPolling:g}=Le({task:M,interval:15e3});return oe(()=>x()),ie(()=>g()),(_,j)=>e(S)?(p(),m("div",Ke,[(p(!0),m(re,null,ne(e(S),b=>(p(),A(e(de),{key:b.id,title:Z(b.createdAt),onClick:U=>f(b)},{content:a(()=>[l(e(y),null,{default:a(()=>[i("Status: "+I(b.status),1)]),_:2},1024),l(e(y),null,{default:a(()=>[i("Duration: "+I(b.duration_seconds),1)]),_:2},1024),l(e(y),null,{default:a(()=>[i("Version: "+I(b.buildId.slice(0,6)),1)]),_:2},1024)]),default:a(()=>[l(Se,{status:b.status},null,8,["status"])]),_:2},1032,["title","onClick"]))),128))])):e(h)?(p(),m("div",Qe,[l(e(ce))])):(p(),m("div",Xe,"None"))}});const t1=K(e1,[["__scopeId","data-v-2d6f668a"]]);class a1{async list(s){return N.get(`projects/${s}/disabled-stages`)}async disableStage({projectId:s,stageId:o}){return N.patch(`projects/${s}/disabled-stages/${o}`,{enable:!1})}async enableStage({projectId:s,stageId:o}){return N.patch(`projects/${s}/disabled-stages/${o}`,{enable:!0})}}const P=new a1;class R{constructor(s){q(this,"id");this.dto=s,this.id=s}static async list(s){return(await P.list(s)).map(L=>new R(L))}static async disableStage({projectId:s,stageId:o}){return P.disableStage({projectId:s,stageId:o})}static async enableStage({projectId:s,stageId:o}){return P.enableStage({projectId:s,stageId:o})}}const s1=d=>(ge("data-v-4df7cd61"),d=d(),fe(),d),l1={style:{"max-width":"250px",overflow:"hidden","text-overflow":"ellipsis ellipsis","white-space":"nowrap"}},o1={key:1},i1=s1(()=>w("br",null,null,-1)),r1=F({__name:"Live",setup(d){const o=ue().params.projectId,L=()=>{var r;const t=(r=f.value)==null?void 0:r.project.getUrl();t&&window.open(t,"_blank")},S=C(()=>{var t;return(t=f==null?void 0:f.value)==null?void 0:t.organization.featureFlags.WEB_EDITOR}),M=t=>{W.push({name:"logs",params:{projectId:o},query:{stageId:t.stageId,executionId:t.id}})},{loading:h,result:f}=H(async()=>{const[t,r]=await Promise.all([we.get(o),_e.list(o)]),u=r.find(c=>c.latest),[n,v]=await Promise.all([u&&be.get(u.id),ve.get(t.organizationId)]);return{buildSpec:n,project:t,organization:v}}),Z=t=>{var n;if(!("path"in t)||!t.path)return;const r=t.type==="form"?`/${t.path}`:`/_hooks/${t.path}`,u=(n=f.value)==null?void 0:n.project.getUrl(r);!u||(navigator.clipboard.writeText(u),me.success("Copied URL to clipboard"))},x=t=>t.type=="form"?`/${t.path}`:t.type=="hook"?`/_hooks/${t.path}`:t.type=="job"?`${t.schedule}`:"",{result:g,refetch:_}=H(async()=>(await R.list(o)).filter(r=>r)),j=t=>{var r;return(r=g.value)==null?void 0:r.map(u=>u.id).includes(t.id)},b=async t=>{j(t)?await R.enableStage({projectId:o,stageId:t.id}):await R.disableStage({projectId:o,stageId:t.id}),await _()},U=(t,r)=>{const[u,n,v]=t.split(".").map(Number),[c,k,V]=r.split(".").map(Number);return u>c?!0:u<c?!1:n>k?!0:n<k?!1:v>=V},Q=t=>{var k,V;const r=j(t),u=r?he:ye,n=r?"Enable stage":"Disable stage",v="3.18.0",c=!U(((V=(k=f.value)==null?void 0:k.buildSpec)==null?void 0:V.abstraVersion)||"0.0.0",v);return{icon:u,label:n,onClick:()=>c?void 0:b(t),disabled:c,popoverMessage:c?`The Disable Stages feature is supported from version ${v} onward. Make sure to deploy your app in the latest version to use this feature.`:""}},X=C(()=>{var u;const t=[{title:"Type",align:"left"},{title:"Title",align:"left"},{title:"Trigger",align:"left"},{title:"Last Runs"},{title:"",align:"right"}],r=(u=f.value)==null?void 0:u.buildSpec;return r?{columns:t,rows:r.runtimes.map(n=>({key:n.id,cells:[{type:"tag",text:n.type==="script"?"Tasklet":n.type.charAt(0).toUpperCase()+n.type.slice(1),tagColor:"default"},{type:"slot",key:"title",payload:{runtime:n}},{type:"slot",key:"trigger",payload:{runtime:n}},{type:"slot",key:"last-runs",payload:{runtime:n}},{type:"actions",actions:[{icon:Ce,label:"View script logs",onClick:()=>W.push({name:"logs",params:{projectId:o},query:{stageId:n.id}})},{icon:Me,label:"Copy URL",onClick:()=>Z(n),hide:!["form","hook"].includes(n.type)},Q(n)]}]}))}:{columns:t,rows:[]}});return(t,r)=>{var u,n,v;return e(h)||((v=(n=(u=e(f))==null?void 0:u.buildSpec)==null?void 0:n.runtimes.length)!=null?v:0)>0?(p(),A(ae,{key:0,"empty-title":"","entity-name":"build",description:"Access and monitor your project's current scripts here.",table:X.value,loading:e(h),title:"Live View"},{description:a(()=>[l(e($),{gap:"middle",style:{"margin-top":"12px"}},{default:a(()=>[l(e(T),{onClick:L},{default:a(()=>[i(" Home"),l(e(Ie),{class:"icon",size:16})]),_:1})]),_:1})]),title:a(({payload:c})=>{var k;return[w("div",l1,[c.runtime.type!="form"?(p(),A(e(D),{key:0,disabled:j(c.runtime)},{default:a(()=>[i(I(c.runtime.title),1)]),_:2},1032,["disabled"])):c.runtime.type=="form"?(p(),A(e(z),{key:1,href:(k=e(f))==null?void 0:k.project.getUrl(c.runtime.path),target:"_blank",disabled:j(c.runtime)},{default:a(()=>[i(I(c.runtime.title),1)]),_:2},1032,["href","disabled"])):J("",!0)])]}),"last-runs":a(({payload:c})=>[l(t1,{"stage-id":c.runtime.id,"project-id":e(o),onSelect:M},null,8,["stage-id","project-id"])]),trigger:a(({payload:c})=>[l(e(pe),{color:"default",class:"ellipsis"},{default:a(()=>[i(I(x(c.runtime)),1)]),_:2},1024)]),_:1},8,["table","loading"])):(p(),m("section",o1,[l(e($),{gap:"middle",align:"center",justify:"center",vertical:!0,style:{height:"100%"}},{default:a(()=>[l(e(E),{style:{display:"flex","align-items":"center",gap:"5px"},level:2},{default:a(()=>[l(e(Je),{size:"42",color:"#d14056"}),i(" Waiting for your first deploy! ")]),_:1}),l(e(y),null,{default:a(()=>[i(" Your live stages will appear here once you make your first deploy ")]),_:1})]),_:1}),S.value?(p(),A(e($),{key:0,gap:"middle",align:"center",justify:"center",vertical:!0,style:{height:"100%"}},{default:a(()=>[l(e($),{vertical:"",gap:"small",align:"center",style:{width:"80%"}},{default:a(()=>[l(e(E),{level:5},{default:a(()=>[i(" Start with Abstra on your computer")]),_:1}),l(e(y),null,{default:a(()=>[i(" Install the editor using pip: "),l(e(D),{code:"",copyable:""},{default:a(()=>[i("pip install abstra")]),_:1})]),_:1}),l(e(y),null,{default:a(()=>[i(" Run the editor: "),l(e(D),{code:"",copyable:""},{default:a(()=>[i("abstra editor my-new-project")]),_:1})]),_:1})]),_:1}),l(e(y),null,{default:a(()=>[i(" Check out the documentation: "),l(e(z),{href:e(G).DOCS,target:"_blank"},{default:a(()=>[i("Abstra Docs")]),_:1},8,["href"])]),_:1}),l(e(y),null,{default:a(()=>[i(" Feeling lost? "),l(e(T),{target:"_blank",type:"default",size:"small",onClick:r[0]||(r[0]=()=>e(O).showNewMessage("I need help getting started with Abstra"))},{default:a(()=>[l(e(Y))]),_:1})]),_:1})]),_:1})):(p(),A(e($),{key:1,gap:"middle",align:"center",justify:"center",vertical:!0,style:{height:"100%"}},{default:a(()=>[l(e(E),{style:{display:"flex","align-items":"center",gap:"5px"},level:4},{default:a(()=>[i(" Set up your local environment ")]),_:1}),l(e(y),null,{default:a(()=>[i(" Install the editor using pip: "),l(e(D),{code:"",copyable:""},{default:a(()=>[i("pip install abstra")]),_:1}),i1,i(" Run the editor: "),l(e(D),{code:"",copyable:""},{default:a(()=>[i("abstra editor my-new-project")]),_:1})]),_:1}),l(e(y),null,{default:a(()=>[i(" Check out the documentation: "),l(e(z),{href:e(G).DOCS,target:"_blank"},{default:a(()=>[i("Abstra Docs")]),_:1},8,["href"])]),_:1}),l(e(y),null,{default:a(()=>[i(" Feeling lost? "),l(e(T),{target:"_blank",type:"default",size:"small",onClick:r[1]||(r[1]=()=>e(O).showNewMessage("I need help getting started with Abstra"))},{default:a(()=>[l(e(Y))]),_:1})]),_:1})]),_:1}))]))}}});const D1=K(r1,[["__scopeId","data-v-4df7cd61"]]);export{D1 as default};
2
- //# sourceMappingURL=Live.50f8f3ee.js.map
1
+ var ee=Object.defineProperty;var te=(d,s,o)=>s in d?ee(d,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):d[s]=o;var q=(d,s,o)=>(te(d,typeof s!="symbol"?s+"":s,o),o);import{C as ae}from"./CrudView.8fb84eac.js";import{a as H}from"./asyncComputed.1b787534.js";import{A as G}from"./constants.36bf7d70.js";import{d as F,am as B,c as C,o as p,a5 as m,a7 as se,h as J,e6 as le,e as w,k as oe,aq as ie,u as e,aR as re,ec as ne,a as A,b as a,f as l,g as i,ed as I,d9 as y,cN as de,S as ce,_ as K,eb as ue,bR as T,de as $,da as D,d8 as z,d4 as pe,A as E,er as ge,es as fe,cH as me,ex as he,f0 as ye}from"./jwt-decode.esm.992666e9.js";import{h as N,l as O,r as W}from"./router.1324a1a9.js";import{a as _e,B as be}from"./build.997fec15.js";import{a as ve}from"./organization.53636095.js";import{a as we}from"./project.76f0af14.js";import"./tables.c26107a1.js";import{g as ke}from"./datetime.adc0acc4.js";import{u as Le}from"./polling.88a266b3.js";import{_ as Se,R as Ae}from"./repository.9d5310b6.js";import{G as Ce}from"./PhArrowCounterClockwise.vue.76c9e146.js";import{F as Ie}from"./PhArrowSquareOut.vue.ecfa9cb2.js";import{G as Y}from"./PhChats.vue.dfda946c.js";import{I as Me}from"./PhCopySimple.vue.ecffb042.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.0555d923.js";import"./url.f490879d.js";import"./PhDotsThreeVertical.vue.2db678ef.js";import"./index.3d2a7b6d.js";import"./index.d181a22c.js";import"./record.87ef3b68.js";import"./string.f6a7565f.js";import"./LoadingOutlined.ee72932a.js";(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[s]="0a44b62c-87cd-444c-a555-dae0677a1a67",d._sentryDebugIdIdentifier="sentry-dbid-0a44b62c-87cd-444c-a555-dae0677a1a67")}catch{}})();const Ze=["width","height","fill","transform"],xe={key:0},je=w("path",{d:"M227.85,46.89a20,20,0,0,0-18.74-18.74c-13.13-.77-46.65.42-74.48,28.24L131,60H74.36a19.83,19.83,0,0,0-14.14,5.86L25.87,100.19a20,20,0,0,0,11.35,33.95l37.14,5.18,42.32,42.32,5.19,37.18A19.88,19.88,0,0,0,135.34,235a20.13,20.13,0,0,0,6.37,1,19.9,19.9,0,0,0,14.1-5.87l34.34-34.35A19.85,19.85,0,0,0,196,181.64V125l3.6-3.59C227.43,93.54,228.62,60,227.85,46.89ZM76,84h31L75.75,115.28l-27.23-3.8ZM151.6,73.37A72.27,72.27,0,0,1,204,52a72.17,72.17,0,0,1-21.38,52.41L128,159,97,128ZM172,180l-27.49,27.49-3.8-27.23L172,149Zm-72,22c-8.71,11.85-26.19,26-60,26a12,12,0,0,1-12-12c0-33.84,14.12-51.32,26-60A12,12,0,1,1,68.18,175.3C62.3,179.63,55.51,187.8,53,203c15.21-2.51,23.37-9.3,27.7-15.18A12,12,0,1,1,100,202Z"},null,-1),$e=[je],De={key:1},Re=w("path",{d:"M184,120v61.65a8,8,0,0,1-2.34,5.65l-34.35,34.35a8,8,0,0,1-13.57-4.53L128,176ZM136,72H74.35a8,8,0,0,0-5.65,2.34L34.35,108.69a8,8,0,0,0,4.53,13.57L80,128ZM40,216c37.65,0,50.69-19.69,54.56-28.18L68.18,161.44C59.69,165.31,40,178.35,40,216Z",opacity:"0.2"},null,-1),Ve=w("path",{d:"M223.85,47.12a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.41,27.07L132.69,64H74.36A15.91,15.91,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A15.91,15.91,0,0,0,192,181.64V123.31l4.77-4.77C223.45,91.86,224.6,59.71,223.85,47.12ZM74.36,80h42.33L77.16,119.52,40,114.34Zm74.41-9.45a76.65,76.65,0,0,1,59.11-22.47,76.46,76.46,0,0,1-22.42,59.16L128,164.68,91.32,128ZM176,181.64,141.67,216l-5.19-37.17L176,139.31Zm-74.16,9.5C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Z"},null,-1),Be=[Re,Ve],Te={key:2},ze=w("path",{d:"M101.85,191.14C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Zm122-144a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.4,27.07h0L88,108.7A8,8,0,0,1,76.67,97.39l26.56-26.57A4,4,0,0,0,100.41,64H74.35A15.9,15.9,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A16,16,0,0,0,192,181.65V155.59a4,4,0,0,0-6.83-2.82l-26.57,26.56a8,8,0,0,1-11.71-.42,8.2,8.2,0,0,1,.6-11.1l49.27-49.27h0C223.45,91.86,224.6,59.71,223.85,47.12Z"},null,-1),Ee=[ze],Ne={key:3},Pe=w("path",{d:"M221.86,47.24a14,14,0,0,0-13.11-13.1c-12.31-.73-43.77.39-69.88,26.5L133.52,66H74.35a13.9,13.9,0,0,0-9.89,4.1L30.11,104.44a14,14,0,0,0,7.94,23.76l39.13,5.46,45.16,45.16L127.8,218a14,14,0,0,0,23.76,7.92l34.35-34.35a13.91,13.91,0,0,0,4.1-9.89V122.48l5.35-5.35h0C221.46,91,222.59,59.56,221.86,47.24ZM38.11,115a2,2,0,0,1,.49-2L72.94,78.58A2,2,0,0,1,74.35,78h47.17L77.87,121.64l-38.14-5.32A1.93,1.93,0,0,1,38.11,115ZM178,181.65a2,2,0,0,1-.59,1.41L143.08,217.4a2,2,0,0,1-3.4-1.11l-5.32-38.16L178,134.48Zm8.87-73h0L128,167.51,88.49,128l58.87-58.88a78.47,78.47,0,0,1,60.69-23A2,2,0,0,1,209.88,48,78.47,78.47,0,0,1,186.88,108.64ZM100,190.31C95.68,199.84,81.13,222,40,222a6,6,0,0,1-6-6c0-41.13,22.16-55.68,31.69-60a6,6,0,1,1,5,10.92c-7,3.17-22.53,13.52-24.47,42.91,29.39-1.94,39.74-17.52,42.91-24.47a6,6,0,1,1,10.92,5Z"},null,-1),He=[Pe],Fe={key:4},Ue=w("path",{d:"M223.85,47.12a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.41,27.07L132.69,64H74.36A15.91,15.91,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A15.91,15.91,0,0,0,192,181.64V123.31l4.77-4.77C223.45,91.86,224.6,59.71,223.85,47.12ZM74.36,80h42.33L77.16,119.52,40,114.34Zm74.41-9.45a76.65,76.65,0,0,1,59.11-22.47,76.46,76.46,0,0,1-22.42,59.16L128,164.68,91.32,128ZM176,181.64,141.67,216l-5.19-37.17L176,139.31Zm-74.16,9.5C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Z"},null,-1),qe=[Ue],Ge={key:5},Oe=w("path",{d:"M219.86,47.36a12,12,0,0,0-11.22-11.22c-12-.71-42.82.38-68.35,25.91L134.35,68h-60a11.9,11.9,0,0,0-8.48,3.52L31.52,105.85a12,12,0,0,0,6.81,20.37l39.79,5.55,46.11,46.11,5.55,39.81a12,12,0,0,0,20.37,6.79l34.34-34.35a11.9,11.9,0,0,0,3.52-8.48v-60l5.94-5.94C219.48,90.18,220.57,59.41,219.86,47.36ZM36.21,115.6a3.94,3.94,0,0,1,1-4.09L71.53,77.17A4,4,0,0,1,74.35,76h52L78.58,123.76,39.44,118.3A3.94,3.94,0,0,1,36.21,115.6ZM180,181.65a4,4,0,0,1-1.17,2.83l-34.35,34.34a4,4,0,0,1-6.79-2.25l-5.46-39.15L180,129.65Zm-52-11.31L85.66,128l60.28-60.29c23.24-23.24,51.25-24.23,62.22-23.58a3.93,3.93,0,0,1,3.71,3.71c.65,11-.35,39-23.58,62.22ZM98.21,189.48C94,198.66,80,220,40,220a4,4,0,0,1-4-4c0-40,21.34-54,30.52-58.21a4,4,0,0,1,3.32,7.28c-7.46,3.41-24.43,14.66-25.76,46.85,32.19-1.33,43.44-18.3,46.85-25.76a4,4,0,1,1,7.28,3.32Z"},null,-1),We=[Oe],Ye={name:"PhRocketLaunch"},Je=F({...Ye,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(d){const s=d,o=B("weight","regular"),L=B("size","1em"),S=B("color","currentColor"),M=B("mirrored",!1),h=C(()=>{var g;return(g=s.weight)!=null?g:o}),f=C(()=>{var g;return(g=s.size)!=null?g:L}),Z=C(()=>{var g;return(g=s.color)!=null?g:S}),x=C(()=>s.mirrored!==void 0?s.mirrored?"scale(-1, 1)":void 0:M?"scale(-1, 1)":void 0);return(g,_)=>(p(),m("svg",le({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:f.value,height:f.value,fill:Z.value,transform:x.value},g.$attrs),[se(g.$slots,"default"),h.value==="bold"?(p(),m("g",xe,$e)):h.value==="duotone"?(p(),m("g",De,Be)):h.value==="fill"?(p(),m("g",Te,Ee)):h.value==="light"?(p(),m("g",Ne,He)):h.value==="regular"?(p(),m("g",Fe,qe)):h.value==="thin"?(p(),m("g",Ge,We)):J("",!0)],16,Ze))}}),Ke={key:0,class:"flex-row"},Qe={key:1,class:"flex-row"},Xe={key:2,class:"flex-row"},e1=F({__name:"ExecutionsShort",props:{stageId:{},projectId:{}},emits:["select"],setup(d,{emit:s}){const o=d,L=new Ae,{result:S,refetch:M,loading:h}=H(async()=>{const{executions:_}=await L.list({projectId:o.projectId,stageId:o.stageId,limit:6});return _}),f=_=>{s("select",_)},Z=_=>ke(_,{weekday:void 0}),{startPolling:x,endPolling:g}=Le({task:M,interval:15e3});return oe(()=>x()),ie(()=>g()),(_,j)=>e(S)?(p(),m("div",Ke,[(p(!0),m(re,null,ne(e(S),b=>(p(),A(e(de),{key:b.id,title:Z(b.createdAt),onClick:U=>f(b)},{content:a(()=>[l(e(y),null,{default:a(()=>[i("Status: "+I(b.status),1)]),_:2},1024),l(e(y),null,{default:a(()=>[i("Duration: "+I(b.duration_seconds),1)]),_:2},1024),l(e(y),null,{default:a(()=>[i("Version: "+I(b.buildId.slice(0,6)),1)]),_:2},1024)]),default:a(()=>[l(Se,{status:b.status},null,8,["status"])]),_:2},1032,["title","onClick"]))),128))])):e(h)?(p(),m("div",Qe,[l(e(ce))])):(p(),m("div",Xe,"None"))}});const t1=K(e1,[["__scopeId","data-v-2d6f668a"]]);class a1{async list(s){return N.get(`projects/${s}/disabled-stages`)}async disableStage({projectId:s,stageId:o}){return N.patch(`projects/${s}/disabled-stages/${o}`,{enable:!1})}async enableStage({projectId:s,stageId:o}){return N.patch(`projects/${s}/disabled-stages/${o}`,{enable:!0})}}const P=new a1;class R{constructor(s){q(this,"id");this.dto=s,this.id=s}static async list(s){return(await P.list(s)).map(L=>new R(L))}static async disableStage({projectId:s,stageId:o}){return P.disableStage({projectId:s,stageId:o})}static async enableStage({projectId:s,stageId:o}){return P.enableStage({projectId:s,stageId:o})}}const s1=d=>(ge("data-v-4df7cd61"),d=d(),fe(),d),l1={style:{"max-width":"250px",overflow:"hidden","text-overflow":"ellipsis ellipsis","white-space":"nowrap"}},o1={key:1},i1=s1(()=>w("br",null,null,-1)),r1=F({__name:"Live",setup(d){const o=ue().params.projectId,L=()=>{var r;const t=(r=f.value)==null?void 0:r.project.getUrl();t&&window.open(t,"_blank")},S=C(()=>{var t;return(t=f==null?void 0:f.value)==null?void 0:t.organization.featureFlags.WEB_EDITOR}),M=t=>{W.push({name:"logs",params:{projectId:o},query:{stageId:t.stageId,executionId:t.id}})},{loading:h,result:f}=H(async()=>{const[t,r]=await Promise.all([we.get(o),_e.list(o)]),u=r.find(c=>c.latest),[n,v]=await Promise.all([u&&be.get(u.id),ve.get(t.organizationId)]);return{buildSpec:n,project:t,organization:v}}),Z=t=>{var n;if(!("path"in t)||!t.path)return;const r=t.type==="form"?`/${t.path}`:`/_hooks/${t.path}`,u=(n=f.value)==null?void 0:n.project.getUrl(r);!u||(navigator.clipboard.writeText(u),me.success("Copied URL to clipboard"))},x=t=>t.type=="form"?`/${t.path}`:t.type=="hook"?`/_hooks/${t.path}`:t.type=="job"?`${t.schedule}`:"",{result:g,refetch:_}=H(async()=>(await R.list(o)).filter(r=>r)),j=t=>{var r;return(r=g.value)==null?void 0:r.map(u=>u.id).includes(t.id)},b=async t=>{j(t)?await R.enableStage({projectId:o,stageId:t.id}):await R.disableStage({projectId:o,stageId:t.id}),await _()},U=(t,r)=>{const[u,n,v]=t.split(".").map(Number),[c,k,V]=r.split(".").map(Number);return u>c?!0:u<c?!1:n>k?!0:n<k?!1:v>=V},Q=t=>{var k,V;const r=j(t),u=r?he:ye,n=r?"Enable stage":"Disable stage",v="3.18.0",c=!U(((V=(k=f.value)==null?void 0:k.buildSpec)==null?void 0:V.abstraVersion)||"0.0.0",v);return{icon:u,label:n,onClick:()=>c?void 0:b(t),disabled:c,popoverMessage:c?`The Disable Stages feature is supported from version ${v} onward. Make sure to deploy your app in the latest version to use this feature.`:""}},X=C(()=>{var u;const t=[{title:"Type",align:"left"},{title:"Title",align:"left"},{title:"Trigger",align:"left"},{title:"Last Runs"},{title:"",align:"right"}],r=(u=f.value)==null?void 0:u.buildSpec;return r?{columns:t,rows:r.runtimes.map(n=>({key:n.id,cells:[{type:"tag",text:n.type==="script"?"Tasklet":n.type.charAt(0).toUpperCase()+n.type.slice(1),tagColor:"default"},{type:"slot",key:"title",payload:{runtime:n}},{type:"slot",key:"trigger",payload:{runtime:n}},{type:"slot",key:"last-runs",payload:{runtime:n}},{type:"actions",actions:[{icon:Ce,label:"View script logs",onClick:()=>W.push({name:"logs",params:{projectId:o},query:{stageId:n.id}})},{icon:Me,label:"Copy URL",onClick:()=>Z(n),hide:!["form","hook"].includes(n.type)},Q(n)]}]}))}:{columns:t,rows:[]}});return(t,r)=>{var u,n,v;return e(h)||((v=(n=(u=e(f))==null?void 0:u.buildSpec)==null?void 0:n.runtimes.length)!=null?v:0)>0?(p(),A(ae,{key:0,"empty-title":"","entity-name":"build",description:"Access and monitor your project's current scripts here.",table:X.value,loading:e(h),title:"Live View"},{description:a(()=>[l(e($),{gap:"middle",style:{"margin-top":"12px"}},{default:a(()=>[l(e(T),{onClick:L},{default:a(()=>[i(" Home"),l(e(Ie),{class:"icon",size:16})]),_:1})]),_:1})]),title:a(({payload:c})=>{var k;return[w("div",l1,[c.runtime.type!="form"?(p(),A(e(D),{key:0,disabled:j(c.runtime)},{default:a(()=>[i(I(c.runtime.title),1)]),_:2},1032,["disabled"])):c.runtime.type=="form"?(p(),A(e(z),{key:1,href:(k=e(f))==null?void 0:k.project.getUrl(c.runtime.path),target:"_blank",disabled:j(c.runtime)},{default:a(()=>[i(I(c.runtime.title),1)]),_:2},1032,["href","disabled"])):J("",!0)])]}),"last-runs":a(({payload:c})=>[l(t1,{"stage-id":c.runtime.id,"project-id":e(o),onSelect:M},null,8,["stage-id","project-id"])]),trigger:a(({payload:c})=>[l(e(pe),{color:"default",class:"ellipsis"},{default:a(()=>[i(I(x(c.runtime)),1)]),_:2},1024)]),_:1},8,["table","loading"])):(p(),m("section",o1,[l(e($),{gap:"middle",align:"center",justify:"center",vertical:!0,style:{height:"100%"}},{default:a(()=>[l(e(E),{style:{display:"flex","align-items":"center",gap:"5px"},level:2},{default:a(()=>[l(e(Je),{size:"42",color:"#d14056"}),i(" Waiting for your first deploy! ")]),_:1}),l(e(y),null,{default:a(()=>[i(" Your live stages will appear here once you make your first deploy ")]),_:1})]),_:1}),S.value?(p(),A(e($),{key:0,gap:"middle",align:"center",justify:"center",vertical:!0,style:{height:"100%"}},{default:a(()=>[l(e($),{vertical:"",gap:"small",align:"center",style:{width:"80%"}},{default:a(()=>[l(e(E),{level:5},{default:a(()=>[i(" Start with Abstra on your computer")]),_:1}),l(e(y),null,{default:a(()=>[i(" Install the editor using pip: "),l(e(D),{code:"",copyable:""},{default:a(()=>[i("pip install abstra")]),_:1})]),_:1}),l(e(y),null,{default:a(()=>[i(" Run the editor: "),l(e(D),{code:"",copyable:""},{default:a(()=>[i("abstra editor my-new-project")]),_:1})]),_:1})]),_:1}),l(e(y),null,{default:a(()=>[i(" Check out the documentation: "),l(e(z),{href:e(G).DOCS,target:"_blank"},{default:a(()=>[i("Abstra Docs")]),_:1},8,["href"])]),_:1}),l(e(y),null,{default:a(()=>[i(" Feeling lost? "),l(e(T),{target:"_blank",type:"default",size:"small",onClick:r[0]||(r[0]=()=>e(O).showNewMessage("I need help getting started with Abstra"))},{default:a(()=>[l(e(Y))]),_:1})]),_:1})]),_:1})):(p(),A(e($),{key:1,gap:"middle",align:"center",justify:"center",vertical:!0,style:{height:"100%"}},{default:a(()=>[l(e(E),{style:{display:"flex","align-items":"center",gap:"5px"},level:4},{default:a(()=>[i(" Set up your local environment ")]),_:1}),l(e(y),null,{default:a(()=>[i(" Install the editor using pip: "),l(e(D),{code:"",copyable:""},{default:a(()=>[i("pip install abstra")]),_:1}),i1,i(" Run the editor: "),l(e(D),{code:"",copyable:""},{default:a(()=>[i("abstra editor my-new-project")]),_:1})]),_:1}),l(e(y),null,{default:a(()=>[i(" Check out the documentation: "),l(e(z),{href:e(G).DOCS,target:"_blank"},{default:a(()=>[i("Abstra Docs")]),_:1},8,["href"])]),_:1}),l(e(y),null,{default:a(()=>[i(" Feeling lost? "),l(e(T),{target:"_blank",type:"default",size:"small",onClick:r[1]||(r[1]=()=>e(O).showNewMessage("I need help getting started with Abstra"))},{default:a(()=>[l(e(Y))]),_:1})]),_:1})]),_:1}))]))}}});const D1=K(r1,[["__scopeId","data-v-4df7cd61"]]);export{D1 as default};
2
+ //# sourceMappingURL=Live.5dc821b6.js.map
@@ -0,0 +1,2 @@
1
+ import{d as o,o as s,a5 as a,f as d,u as _,S as c,_ as r}from"./jwt-decode.esm.992666e9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cb89c36f-1e44-4365-9f5c-d0172f8935b7",e._sentryDebugIdIdentifier="sentry-dbid-cb89c36f-1e44-4365-9f5c-d0172f8935b7")}catch{}})();const f={class:"centered"},i=o({__name:"LoadingContainer",setup(e){return(n,t)=>(s(),a("div",f,[d(_(c))]))}});const u=r(i,[["__scopeId","data-v-52e6209a"]]);export{u as L};
2
+ //# sourceMappingURL=LoadingContainer.6e72d482.js.map
@@ -0,0 +1,2 @@
1
+ import{f as o,e7 as u,eX as f}from"./jwt-decode.esm.992666e9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a8b58073-e77a-4a47-b884-86d9cb233a13",e._sentryDebugIdIdentifier="sentry-dbid-a8b58073-e77a-4a47-b884-86d9cb233a13")}catch{}})();function d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),r.forEach(function(a){l(e,a,n[a])})}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=function(t,n){var r=d({},t,n.attrs);return o(u,d({},r,{icon:f}),null)};i.displayName="LoadingOutlined";i.inheritAttrs=!1;const b=i;export{b as L};
2
+ //# sourceMappingURL=LoadingOutlined.ee72932a.js.map
@@ -0,0 +1,2 @@
1
+ import{_ as l}from"./Login.vue_vue_type_script_setup_true_lang.a92a80d0.js";import{d as f,e5 as m,eb as b,a5 as g,f as y,u as n,o as w,_ as k}from"./jwt-decode.esm.992666e9.js";import{u as h}from"./workspaceStore.4f0c433f.js";import"./CircularLoading.3e4ddd6d.js";import"./Logo.83b476a4.js";import"./string.f6a7565f.js";import"./index.3ff1c0be.js";import"./userStore.9e7a540a.js";import"./url.f490879d.js";import"./colorHelpers.d4f3f275.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="c0bac719-28f8-4f77-8a28-1b449ca73ebd",e._sentryDebugIdIdentifier="sentry-dbid-c0bac719-28f8-4f77-8a28-1b449ca73ebd")}catch{}})();const v={class:"runner"},I=f({__name:"Login",setup(e){const o=m(),t=b(),a=h(),_=async()=>{const{redirect:r,...s}=t.query;if(r){await o.push({path:r,query:s,params:t.params});return}o.push({name:"playerHome",query:s})};return(r,s)=>{var c,p,u,d,i;return w(),g("div",v,[y(l,{"logo-url":(p=(c=n(a).state.workspace)==null?void 0:c.logoUrl)!=null?p:void 0,"brand-name":(u=n(a).state.workspace)==null?void 0:u.brandName,locale:(i=(d=n(a).state.workspace)==null?void 0:d.language)!=null?i:"en",onDone:_},null,8,["logo-url","brand-name","locale"])])}}});const H=k(I,[["__scopeId","data-v-12c690e1"]]);export{H as default};
2
+ //# sourceMappingURL=Login.0b618d09.js.map