mage-ai 0.9.67__py3-none-any.whl → 0.9.69__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.

Potentially problematic release.


This version of mage-ai might be problematic. Click here for more details.

Files changed (307) hide show
  1. mage_ai/api/monitors/BaseMonitor.py +1 -2
  2. mage_ai/api/policies/PipelinePolicy.py +2 -0
  3. mage_ai/api/resources/BlockLayoutItemResource.py +2 -2
  4. mage_ai/api/resources/BlockResource.py +4 -3
  5. mage_ai/api/resources/CacheItemResource.py +1 -1
  6. mage_ai/api/resources/GitBranchResource.py +3 -5
  7. mage_ai/api/resources/PageBlockLayoutResource.py +2 -2
  8. mage_ai/api/resources/PipelineResource.py +13 -0
  9. mage_ai/api/resources/PipelineRunResource.py +10 -1
  10. mage_ai/api/resources/SeedResource.py +2 -1
  11. mage_ai/api/resources/SessionResource.py +13 -1
  12. mage_ai/authentication/permissions/constants.py +2 -0
  13. mage_ai/authentication/permissions/seed.py +32 -21
  14. mage_ai/authentication/providers/active_directory.py +4 -3
  15. mage_ai/authentication/providers/okta.py +22 -83
  16. mage_ai/cache/tag.py +3 -0
  17. mage_ai/cluster_manager/manage.py +4 -1
  18. mage_ai/data_preparation/executors/k8s_block_executor.py +8 -1
  19. mage_ai/data_preparation/executors/k8s_pipeline_executor.py +12 -1
  20. mage_ai/data_preparation/executors/streaming_pipeline_executor.py +77 -7
  21. mage_ai/data_preparation/logging/gcs_logger_manager.py +7 -4
  22. mage_ai/data_preparation/models/block/__init__.py +28 -71
  23. mage_ai/data_preparation/models/block/block_factory.py +77 -0
  24. mage_ai/data_preparation/models/block/data_integration/mixins.py +16 -5
  25. mage_ai/data_preparation/models/block/dbt/block.py +5 -7
  26. mage_ai/data_preparation/models/block/dynamic/child.py +3 -0
  27. mage_ai/data_preparation/models/block/dynamic/variables.py +2 -2
  28. mage_ai/data_preparation/models/block/extension/utils.py +1 -0
  29. mage_ai/data_preparation/models/block/global_data_product/__init__.py +9 -3
  30. mage_ai/data_preparation/models/block/integration/__init__.py +13 -9
  31. mage_ai/data_preparation/models/block/platform/mixins.py +1 -1
  32. mage_ai/data_preparation/models/block/sql/__init__.py +1 -1
  33. mage_ai/data_preparation/models/pipeline.py +102 -19
  34. mage_ai/data_preparation/models/utils.py +6 -0
  35. mage_ai/data_preparation/models/variable.py +18 -4
  36. mage_ai/data_preparation/repo_manager.py +3 -2
  37. mage_ai/data_preparation/shared/utils.py +1 -1
  38. mage_ai/data_preparation/storage/gcs_storage.py +1 -1
  39. mage_ai/data_preparation/templates/constants.py +7 -0
  40. mage_ai/data_preparation/templates/data_exporters/mysql.py +2 -2
  41. mage_ai/data_preparation/templates/data_exporters/oracledb.py +27 -0
  42. mage_ai/data_preparation/templates/repo/metadata.yaml +1 -0
  43. mage_ai/io/bigquery.py +131 -58
  44. mage_ai/io/export_utils.py +3 -0
  45. mage_ai/io/mysql.py +38 -6
  46. mage_ai/io/oracledb.py +138 -3
  47. mage_ai/io/snowflake.py +152 -29
  48. mage_ai/io/sql.py +4 -0
  49. mage_ai/orchestration/db/__init__.py +2 -2
  50. mage_ai/orchestration/db/models/oauth.py +4 -4
  51. mage_ai/orchestration/db/models/schedules.py +10 -3
  52. mage_ai/orchestration/job_manager.py +6 -0
  53. mage_ai/orchestration/notification/sender.py +8 -0
  54. mage_ai/orchestration/pipeline_scheduler_original.py +26 -7
  55. mage_ai/orchestration/queue/celery_queue.py +8 -1
  56. mage_ai/orchestration/queue/process_queue.py +67 -4
  57. mage_ai/orchestration/queue/queue.py +8 -0
  58. mage_ai/server/constants.py +1 -1
  59. mage_ai/server/frontend_dist/404.html +2 -2
  60. mage_ai/server/{frontend_dist_base_path_template/_next/static/khKiaJtwrslgMmp4YSa1f → frontend_dist/_next/static/_krrrgup_C-dPOpX36S8I}/_buildManifest.js +1 -1
  61. mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.js +1 -0
  62. mage_ai/server/frontend_dist/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/3548-fa0792ddb88f4646.js +1 -0
  64. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4241-ccd0126f5750cc35.js → frontend_dist/_next/static/chunks/4241-4499461184ba0d23.js} +1 -1
  65. mage_ai/server/frontend_dist/_next/static/chunks/5627-237a3de578538022.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
  68. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7966-5c1786fb7e7a48f5.js → frontend_dist/_next/static/chunks/7966-f07b2913f7326b50.js} +1 -1
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-d9c89527266296f7.js +1 -0
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-8bbfa0c19b5e4cb3.js +1 -0
  72. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +1 -0
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-597b74828bf105db.js +1 -0
  74. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-a66b4c7641ae03eb.js → pipeline-runs-3edc6270c5b0e962.js} +1 -1
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +1 -0
  76. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +1 -0
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
  79. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-90abafc7ed61c582.js +1 -0
  80. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-1bdfda8edc9cf4a8.js +1 -0
  81. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
  82. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +1 -0
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +1 -0
  85. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-79a4cf66a623e667.js → frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js} +1 -1
  86. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
  87. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-7d38b2f7c3e918a1.js → frontend_dist/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js} +1 -1
  88. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-9cba3211434a8966.js +1 -0
  89. mage_ai/server/frontend_dist/block-layout.html +2 -2
  90. mage_ai/server/frontend_dist/compute.html +2 -2
  91. mage_ai/server/frontend_dist/files.html +2 -2
  92. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  93. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  94. mage_ai/server/frontend_dist/global-hooks/[...slug].html +2 -2
  95. mage_ai/server/frontend_dist/global-hooks.html +2 -2
  96. mage_ai/server/frontend_dist/index.html +2 -2
  97. mage_ai/server/frontend_dist/manage/files.html +2 -2
  98. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  99. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  100. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  101. mage_ai/server/frontend_dist/manage/users.html +2 -2
  102. mage_ai/server/frontend_dist/manage.html +2 -2
  103. mage_ai/server/frontend_dist/oauth.html +3 -3
  104. mage_ai/server/frontend_dist/overview.html +2 -2
  105. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  106. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  107. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  108. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
  109. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  110. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  111. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  112. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  113. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  114. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  115. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  116. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  117. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  118. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  119. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  120. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  121. mage_ai/server/frontend_dist/pipelines.html +2 -2
  122. mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +2 -2
  123. mage_ai/server/frontend_dist/platform/global-hooks.html +2 -2
  124. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  125. mage_ai/server/frontend_dist/settings/platform/preferences.html +2 -2
  126. mage_ai/server/frontend_dist/settings/platform/settings.html +2 -2
  127. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +2 -2
  128. mage_ai/server/frontend_dist/settings/workspace/permissions.html +2 -2
  129. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  130. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +2 -2
  131. mage_ai/server/frontend_dist/settings/workspace/roles.html +2 -2
  132. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  133. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +2 -2
  134. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  135. mage_ai/server/frontend_dist/settings.html +2 -2
  136. mage_ai/server/frontend_dist/sign-in.html +5 -5
  137. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  138. mage_ai/server/frontend_dist/templates.html +2 -2
  139. mage_ai/server/frontend_dist/terminal.html +2 -2
  140. mage_ai/server/frontend_dist/test.html +2 -2
  141. mage_ai/server/frontend_dist/triggers.html +2 -2
  142. mage_ai/server/frontend_dist/version-control.html +2 -2
  143. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  144. mage_ai/server/{frontend_dist/_next/static/vPsMu6Fi2zrHaf2fRXKRO → frontend_dist_base_path_template/_next/static/KLL5mirre9d7_ZeEpaw3s}/_buildManifest.js +1 -1
  145. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-df144fbd8b2208c3.js +1 -0
  146. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
  147. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-fa0792ddb88f4646.js +1 -0
  148. mage_ai/server/{frontend_dist/_next/static/chunks/4241-ccd0126f5750cc35.js → frontend_dist_base_path_template/_next/static/chunks/4241-4499461184ba0d23.js} +1 -1
  149. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5627-237a3de578538022.js +1 -0
  150. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
  151. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
  152. mage_ai/server/{frontend_dist/_next/static/chunks/7966-5c1786fb7e7a48f5.js → frontend_dist_base_path_template/_next/static/chunks/7966-f07b2913f7326b50.js} +1 -1
  153. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-d9c89527266296f7.js +1 -0
  154. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
  155. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-8bbfa0c19b5e4cb3.js +1 -0
  156. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +1 -0
  157. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-597b74828bf105db.js +1 -0
  158. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipeline-runs-a66b4c7641ae03eb.js → pipeline-runs-3edc6270c5b0e962.js} +1 -1
  159. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +1 -0
  160. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +1 -0
  161. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +1 -0
  162. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
  163. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-90abafc7ed61c582.js +1 -0
  164. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-1bdfda8edc9cf4a8.js +1 -0
  165. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
  166. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +1 -0
  167. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
  168. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +1 -0
  169. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-79a4cf66a623e667.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js} +1 -1
  170. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
  171. mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-7d38b2f7c3e918a1.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js} +1 -1
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9cba3211434a8966.js +1 -0
  173. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  174. mage_ai/server/frontend_dist_base_path_template/compute.html +2 -2
  175. mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
  176. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
  177. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
  178. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
  179. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
  180. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  181. mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
  182. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
  183. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
  184. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
  185. mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
  186. mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
  187. mage_ai/server/frontend_dist_base_path_template/oauth.html +3 -3
  188. mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
  189. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
  190. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  191. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
  192. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +2 -2
  193. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  194. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
  195. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  196. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  197. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
  198. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
  199. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
  200. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
  201. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
  202. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  203. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
  204. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  205. mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
  206. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +2 -2
  207. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +2 -2
  208. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
  209. mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +2 -2
  210. mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +2 -2
  211. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +2 -2
  212. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +2 -2
  213. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
  214. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +2 -2
  215. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +2 -2
  216. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
  217. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +2 -2
  218. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
  219. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  220. mage_ai/server/frontend_dist_base_path_template/sign-in.html +5 -5
  221. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
  222. mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
  223. mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
  224. mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
  225. mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
  226. mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
  227. mage_ai/server/scheduler_manager.py +7 -0
  228. mage_ai/server/server.py +12 -5
  229. mage_ai/server/websocket_server.py +1 -0
  230. mage_ai/services/k8s/job_manager.py +8 -0
  231. mage_ai/services/slack/slack.py +10 -1
  232. mage_ai/services/spark/spark.py +9 -2
  233. mage_ai/settings/backends.py +8 -8
  234. mage_ai/settings/keys/auth.py +2 -0
  235. mage_ai/settings/models/configuration_option.py +10 -9
  236. mage_ai/settings/server.py +1 -1
  237. mage_ai/shared/files.py +19 -1
  238. mage_ai/shared/path_fixer.py +3 -0
  239. mage_ai/streaming/sources/base.py +5 -0
  240. mage_ai/streaming/sources/influxdb.py +2 -0
  241. mage_ai/streaming/sources/kafka.py +2 -1
  242. mage_ai/streaming/sources/mongodb.py +4 -0
  243. mage_ai/tests/api/endpoints/mixins.py +10 -9
  244. mage_ai/tests/api/endpoints/test_seeds.py +24 -0
  245. mage_ai/tests/api/operations/test_sessions.py +53 -2
  246. mage_ai/tests/authentication/providers/test_okta.py +43 -0
  247. mage_ai/tests/data_preparation/models/block/dbt/test_block.py +2 -2
  248. mage_ai/tests/data_preparation/models/block/dbt/test_block_sql.py +1 -1
  249. mage_ai/tests/data_preparation/models/block/dbt/test_block_yaml.py +1 -1
  250. mage_ai/tests/data_preparation/models/test_block.py +2 -1
  251. mage_ai/tests/orchestration/db/models/test_oauth.py +3 -3
  252. mage_ai/tests/orchestration/queue/test_process_queue.py +1 -0
  253. mage_ai/tests/orchestration/test_pipeline_scheduler.py +2 -0
  254. mage_ai/tests/server/test_server.py +8 -4
  255. mage_ai/tests/settings/models/test_configuration_option.py +2 -2
  256. {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/METADATA +6 -6
  257. {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/RECORD +263 -259
  258. mage_ai/server/frontend_dist/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
  259. mage_ai/server/frontend_dist/_next/static/chunks/181-e61915415a976861.js +0 -1
  260. mage_ai/server/frontend_dist/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
  261. mage_ai/server/frontend_dist/_next/static/chunks/3548-13563a1ff815f922.js +0 -1
  262. mage_ai/server/frontend_dist/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
  263. mage_ai/server/frontend_dist/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
  264. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-1c1ffd928f5a00f7.js +0 -1
  265. mage_ai/server/frontend_dist/_next/static/chunks/pages/index-b7b8695a7f9efde2.js +0 -1
  266. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-d3a5fd3119fdb1e4.js +0 -1
  267. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-42789d698d28a92f.js +0 -1
  268. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-d05040edba41b2ac.js +0 -1
  269. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-aaf393c86fc1bda3.js +0 -1
  270. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-36377e679da2cd91.js +0 -1
  271. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1b688d61f8efe07a.js +0 -1
  272. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-ed3331d22d5cff7d.js +0 -1
  273. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-d94e48bad89ba1e0.js +0 -1
  274. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-f508c2f261297724.js +0 -1
  275. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-f99e99aa8f45529c.js +0 -1
  276. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-6826000cdffc36b8.js +0 -1
  277. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
  278. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-dde29a463495cebb.js +0 -1
  279. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-ab98a7b3a678669e.js +0 -1
  280. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
  281. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/181-e61915415a976861.js +0 -1
  282. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
  283. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-13563a1ff815f922.js +0 -1
  284. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
  285. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
  286. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-1c1ffd928f5a00f7.js +0 -1
  287. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-b7b8695a7f9efde2.js +0 -1
  288. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-d3a5fd3119fdb1e4.js +0 -1
  289. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-42789d698d28a92f.js +0 -1
  290. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-d05040edba41b2ac.js +0 -1
  291. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-aaf393c86fc1bda3.js +0 -1
  292. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-36377e679da2cd91.js +0 -1
  293. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1b688d61f8efe07a.js +0 -1
  294. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-ed3331d22d5cff7d.js +0 -1
  295. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-d94e48bad89ba1e0.js +0 -1
  296. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-f508c2f261297724.js +0 -1
  297. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-f99e99aa8f45529c.js +0 -1
  298. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-6826000cdffc36b8.js +0 -1
  299. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
  300. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-dde29a463495cebb.js +0 -1
  301. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-ab98a7b3a678669e.js +0 -1
  302. /mage_ai/server/frontend_dist/_next/static/{vPsMu6Fi2zrHaf2fRXKRO → _krrrgup_C-dPOpX36S8I}/_ssgManifest.js +0 -0
  303. /mage_ai/server/frontend_dist_base_path_template/_next/static/{khKiaJtwrslgMmp4YSa1f → KLL5mirre9d7_ZeEpaw3s}/_ssgManifest.js +0 -0
  304. {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/LICENSE +0 -0
  305. {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/WHEEL +0 -0
  306. {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/entry_points.txt +0 -0
  307. {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5627],{52749:function(e,n,i){var r=i(82394),t=i(82684),l=i(71180),o=i(55485),d=i(68562),s=i(7267),c=i(38276),u=i(30160),a=i(35576),p=i(17488),f=i(72473),h=i(4015),v=i(70515),j=i(81728),g=i(28598);function m(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,r)}return i}function b(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?m(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}n.Z=function(e){var n,i,r,m,x=e.createPipeline,P=e.isLoading,w=e.onClose,Z=(0,t.useRef)(null),O=(0,t.useState)(!1),C=O[0],y=O[1],I=(0,t.useState)({name:(0,j.Y6)()}),k=I[0],A=I[1];return(0,t.useEffect)((function(){var e;null===Z||void 0===Z||null===(e=Z.current)||void 0===e||e.focus()}),[]),(0,g.jsxs)(h.Nk,{children:[(0,g.jsx)(h.I5,{children:(0,g.jsx)(o.ZP,{alignItems:"center",justifyContent:"center",children:(0,g.jsx)(f.AISparkle,{size:5*v.iI,warning:!0})})}),(0,g.jsx)(h.gI,{children:(0,g.jsxs)(c.Z,{py:1,children:[(0,g.jsx)(c.Z,{mb:1,children:(0,g.jsx)(u.ZP,{default:!0,children:"New pipeline"})}),(0,g.jsx)(u.ZP,{textOverflow:!0,children:"Using AI"})]})}),(0,g.jsxs)(h.gI,{children:[(0,g.jsx)(u.ZP,{default:!0,children:"Name"}),(0,g.jsx)(p.Z,{alignRight:!0,noBackground:!0,noBorder:!0,onChange:function(e){return A((function(n){return b(b({},n),{},{name:e.target.value})}))},paddingVertical:v.iI,placeholder:"Enter pipeline name...",value:(null===k||void 0===k?void 0:k.name)||""})]}),(0,g.jsx)(h.gI,{children:(0,g.jsxs)(o.ZP,{flexDirection:"column",fullWidth:!0,children:[(0,g.jsx)(c.Z,{mb:2,pt:1,children:(0,g.jsx)(u.ZP,{default:!0,children:"Describe what the pipeline should do"})}),(0,g.jsxs)(c.Z,{pb:1,pr:v.cd,children:[(0,g.jsx)(a.Z,{fullWidth:!0,onChange:function(e){return A((function(n){return b(b({},n),{},{llm:{request:{pipeline_description:e.target.value},use_case:s.z.GENERATE_PIPELINE_WITH_DESCRIPTION}})}))},placeholder:"Type the pipeline purpose...",ref:Z,rows:8,value:(null===k||void 0===k||null===(n=k.llm)||void 0===n||null===(i=n.request)||void 0===i?void 0:i.pipeline_description)||""}),(P||C)&&(0,g.jsx)(c.Z,{mt:1,children:(0,g.jsx)(u.ZP,{warning:!0,children:"Pipeline is being generated using AI based on your description above..."})})]})]})}),(0,g.jsx)(h.$b,{children:(0,g.jsxs)(o.ZP,{fullWidth:!0,children:[(0,g.jsx)(d.ZP,{bold:!0,centerText:!0,disabled:!(null!==k&&void 0!==k&&k.name)||!(null!==k&&void 0!==k&&null!==(r=k.llm)&&void 0!==r&&null!==(m=r.request)&&void 0!==m&&m.pipeline_description),loading:P||C,onClick:function(){y(!0),x({pipeline:k}).then((function(){return y(!1)}))},primary:!0,tabIndex:0,uuid:"AIControlPanel/CreatePipeline",children:"Create pipeline"}),w&&(0,g.jsx)(c.Z,{ml:1,children:(0,g.jsx)(l.ZP,{onClick:w,tabIndex:0,children:"Cancel"})})]})})]})}},94629:function(e,n,i){i.d(n,{Z:function(){return Z}});var r=i(82394),t=i(21831),l=i(82684),o=i(50724),d=i(1402),s=i(97618),c=i(70613),u=i(31557),a=i(68899),p=i(28598);function f(e,n){var i=e.children,r=e.noPadding;return(0,p.jsx)(a.HS,{noPadding:r,ref:n,children:i})}var h=l.forwardRef(f),v=i(62547),j=i(82571),g=i(77417),m=i(46684),b=i(75375);function x(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,r)}return i}function P(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?x(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function w(e,n){e.addProjectBreadcrumbToCustomBreadcrumbs;var i=e.after,r=e.afterHeader,l=e.afterHidden,f=e.afterWidth,x=e.afterWidthOverride,w=e.appendBreadcrumbs,Z=e.before,O=e.beforeHeader,C=e.beforeWidth,y=e.breadcrumbs,I=e.children,k=e.contained,A=e.errors,M=e.headerMenuItems,E=e.headerOffset,W=e.hideAfterCompletely,T=e.mainContainerHeader,B=e.navigationItems,S=e.setAfterHidden,N=e.setAfterWidth,D=e.setBeforeWidth,H=e.setErrors,R=e.subheaderChildren,_=e.subheaderNoPadding,z=e.title,L=e.uuid,q=(0,b.Z)(L,{beforeResizeOffset:b.H,setWidthAfter:N,setWidthBefore:D,widthAfter:f,widthBefore:C,widthOverrideAfter:x}),Y=q.mainContainerRef,F=q.mousedownActiveAfter,G=q.mousedownActiveBefore,U=q.setMousedownActiveAfter,V=q.setMousedownActiveBefore,$=q.setWidthAfter,K=q.setWidthBefore,Q=q.widthAfter,J=q.widthBefore,X=(0,g.Z)().project,ee=[];return y&&ee.push.apply(ee,(0,t.Z)(y)),null!==y&&void 0!==y&&y.length&&!w||!X||null!==y&&void 0!==y&&y.length||ee.unshift({bold:!w,label:function(){return z}}),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(c.Z,{title:z}),(0,p.jsx)(u.Z,{breadcrumbs:ee,menuItems:M}),(0,p.jsxs)(a.Nk,{ref:n,children:[0!==(null===B||void 0===B?void 0:B.length)&&(0,p.jsx)(a.lm,{showMore:!0,children:(0,p.jsx)(j.Z,{navigationItems:B,showMore:!0})}),(0,p.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:i,afterHeader:r,afterHeightOffset:m.Mz,afterHidden:l,afterMousedownActive:F,afterWidth:Q,before:Z,beforeHeader:O,beforeHeightOffset:m.Mz,beforeMousedownActive:G,beforeWidth:Z?J:a.k1,contained:k,headerOffset:E,hideAfterCompletely:!i||W,leftOffset:Z?a.k1:null,mainContainerHeader:T,mainContainerRef:Y,setAfterHidden:S,setAfterMousedownActive:U,setAfterWidth:$,setBeforeMousedownActive:V,setBeforeWidth:K,children:[R&&(0,p.jsx)(h,{noPadding:_,children:R}),I]})})]}),A&&(0,p.jsx)(o.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===H||void 0===H?void 0:H(null)},children:(0,p.jsx)(d.Z,P(P({},A),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}var Z=l.forwardRef(w)},65458:function(e,n,i){i.d(n,{d:function(){return c}});var r=i(72473),t=i(57653),l=i(70515),o=i(81728),d=i(28598),s=1.5*l.iI,c=function(e,n){var i=[{beforeIcon:(0,d.jsx)(r.BatchPipeline,{}),label:function(){return"Standard (batch)"},onClick:function(){var i;null!==n&&void 0!==n&&n.showCreatePipelineModal?null===n||void 0===n||null===(i=n.showCreatePipelineModal)||void 0===i||i.call(n,{pipelineType:t.qL.PYTHON}):e({pipeline:{name:(0,o.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{beforeIcon:(0,d.jsx)(r.IntegrationPipeline,{}),label:function(){return"Data integration"},onClick:function(){var i;null!==n&&void 0!==n&&n.showCreatePipelineModal?null===n||void 0===n||null===(i=n.showCreatePipelineModal)||void 0===i||i.call(n,{pipelineType:t.qL.INTEGRATION}):e({pipeline:{name:(0,o.Y6)(),type:t.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{beforeIcon:(0,d.jsx)(r.StreamingPipeline,{size:s}),label:function(){return"Streaming"},onClick:function(){var i;null!==n&&void 0!==n&&n.showCreatePipelineModal?null===n||void 0===n||null===(i=n.showCreatePipelineModal)||void 0===i||i.call(n,{pipelineType:t.qL.STREAMING}):e({pipeline:{name:(0,o.Y6)(),type:t.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}];return null!==n&&void 0!==n&&n.showBrowseTemplates&&i.push({beforeIcon:(0,d.jsx)(r.TemplateShapes,{}),label:function(){return"From a template"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showBrowseTemplates)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/custom_template"}),null!==n&&void 0!==n&&n.showImportPipelineModal&&i.push({beforeIcon:(0,d.jsx)(r.Upload,{}),label:function(){return"Import pipeline zip"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showImportPipelineModal)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/upload"}),null!==n&&void 0!==n&&n.showAIModal&&i.push({beforeIcon:(0,d.jsx)(r.AISparkle,{}),label:function(){return"Using AI (beta)"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showAIModal)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/AI_modal"}),i}},76111:function(e,n,i){var r=i(82394),t=i(82684),l=i(71180),o=i(97618),d=i(55485),s=i(68562),c=i(38276),u=i(30160),a=i(35576),p=i(17488),f=i(44897),h=i(4015),v=i(39643),j=i(57653),g=i(70515),m=i(81728),b=i(28598);function x(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,r)}return i}function P(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?x(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}n.Z=function(e){var n=e.onClose,i=e.onSave,r=e.pipelineType,x=j.Mj[r],w=(0,t.useRef)(null),Z=(0,t.useState)({name:(0,m.Y6)()}),O=Z[0],C=Z[1];(0,t.useEffect)((function(){var e;null===w||void 0===w||null===(e=w.current)||void 0===e||e.focus()}),[]);var y=(0,t.useCallback)((function(){var e=null===O||void 0===O?void 0:O.tags,r=[];e&&(r=e.split(",").map((function(e){return e.trim()})).filter((function(e){return!!e}))),i(P(P({},O),{},{name:(null===O||void 0===O?void 0:O.name)||(0,m.Y6)(),tags:r})),null===n||void 0===n||n()}),[O,n,i]);return(0,t.useEffect)((function(){var e,i=function(e){if(e.stopPropagation(),e.key===v.KW)null===n||void 0===n||n();else if(e.key===v.tt){var i=e.target.innerText;i.startsWith("Create")||"Cancel"===i||y()}};return null===(e=document)||void 0===e||e.addEventListener("keydown",i),function(){var e;null===(e=document)||void 0===e||e.removeEventListener("keydown",i)}}),[y,n]),(0,b.jsxs)(h.Nk,{width:55*g.iI,children:[(0,b.jsx)(h.I5,{lightBackground:!0,children:(0,b.jsxs)(d.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,b.jsx)(u.ZP,{bold:!0,cyan:!0,largeLg:!0,children:"".concat(j.G7[r]," pipeline")}),(0,b.jsx)(x,{fill:f.Z.accent.cyan,size:10*g.iI})]})}),(0,b.jsxs)(h.gI,{lightBackground:!0,children:[(0,b.jsx)(u.ZP,{default:!0,children:"Name"}),(0,b.jsx)(p.Z,{alignRight:!0,fullWidth:!0,noBackground:!0,noBorder:!0,onChange:function(e){C((function(n){return P(P({},n),{},{name:e.target.value})}))},paddingVertical:g.iI,placeholder:"Pipeline name...",ref:w,value:(null===O||void 0===O?void 0:O.name)||""})]}),(0,b.jsxs)(h.gI,{lightBackground:!0,children:[(0,b.jsx)(u.ZP,{default:!0,children:"Description"}),(0,b.jsx)(c.Z,{ml:9}),(0,b.jsx)(c.Z,{fullWidth:!0,px:2,py:1,children:(0,b.jsx)(a.Z,{onChange:function(e){C((function(n){return P(P({},n),{},{description:e.target.value})}))},rows:2,value:(null===O||void 0===O?void 0:O.description)||""})})]}),(0,b.jsxs)(h.gI,{lightBackground:!0,children:[(0,b.jsx)(u.ZP,{default:!0,children:"Tags"}),(0,b.jsx)(p.Z,{alignRight:!0,fullWidth:!0,noBackground:!0,noBorder:!0,onChange:function(e){var n=e.target.value;C((function(e){return P(P({},e),{},{tags:n})}))},paddingVertical:g.iI,placeholder:"e.g. tag_1, tag_2",value:(null===O||void 0===O?void 0:O.tags)||""})]}),(0,b.jsx)(h.$b,{topBorder:!0,children:(0,b.jsxs)(d.ZP,{fullWidth:!0,children:[(0,b.jsx)(o.Z,{flex:"1",children:(0,b.jsx)(l.ZP,{fullWidth:!0,onClick:n,children:"Cancel"})}),(0,b.jsx)(c.Z,{ml:1}),(0,b.jsx)(o.Z,{flex:"1",children:(0,b.jsx)(s.ZP,{bold:!0,centerText:!0,disabled:!(null!==O&&void 0!==O&&O.name),fullWidth:!0,onClick:y,primary:!0,uuid:"ConfigurePipeline/CreatePipeline",children:"Create"})})]})})]})}},70026:function(e,n,i){var r=i(75582),t=i(34376),l=i.n(t),o=i(82684),d=i(71180),s=i(84143),c=i(55485),u=i(65956),a=i(89515),p=i(35185),f=i(38276),h=i(75499),v=i(30160),j=i(69650),g=i(65327),m=i(42122),b=i(86735),x=i(70515),P=i(89538),w=i(28598);n.Z=function(e){var n=e.fetchPipelines,i=e.onCancel,t=(0,o.useState)(!1),Z=t[0],O=t[1],C=(0,o.useState)(!1),y=C[0],I=C[1],k=(0,o.useState)({}),A=k[0],M=k[1],E=(0,o.useState)({}),W=E[0],T=E[1],B=!(0,m.Qr)(A),S=(0,P.dd)((function(){var e=Object.values(W)[0],n=null===e||void 0===e?void 0:e.message,r=!!n;return(0,w.jsx)(a.Z,{cancelText:r?null:"Edit ".concat(null===e||void 0===e?void 0:e.name),centerOnScreen:!0,confirmText:"Close",danger:r,neutral:!r,onCancel:r?void 0:function(){return l().push("/pipelines/[pipeline]/edit","/pipelines/".concat(null===e||void 0===e?void 0:e.name,"/edit"))},onClick:function(){return i()},subtitle:r?n:"Pipeline ".concat(null===e||void 0===e?void 0:e.name," successfully imported!"),title:r?"Error on pipeline import.":"Successful import!",width:50*x.iI})}),{},[W],{background:!0,uuid:"confirm_upload"}),N=(0,r.Z)(S,1)[0],D=(0,o.useMemo)((function(){var e=[];return(0,b.YC)(Object.entries(A),(function(e){var n=(0,r.Z)(e,2),i=n[0];n[1];return i})).forEach((function(n){var i=(0,r.Z)(n,2),t=i[0],l=i[1],o=W[t],d=null===o||void 0===o?void 0:o.message;e.push([(0,w.jsxs)("div",{children:[(0,w.jsx)(v.ZP,{overflowWrap:!0,preWrap:!0,children:t}),d&&(0,w.jsx)(f.Z,{mt:1,children:(0,w.jsx)(v.ZP,{danger:!0,small:!0,children:d})})]},"name-".concat(t)),(0,w.jsx)(p.Z,{danger:!!d,progress:100*l},"progress-".concat(t))])})),(0,w.jsx)(h.Z,{columnFlex:[1,4],columns:[{uuid:"Filename"},{uuid:"Upload progress"}],rows:e,uuid:"block-runs"})}),[A,W]);return(0,w.jsxs)(u.Z,{footer:(0,w.jsxs)(c.ZP,{fullWidth:!0,justifyContent:"space-between",children:[(0,w.jsx)(d.ZP,{onClick:function(){return i()},children:"Close"}),(0,w.jsx)(f.Z,{ml:1,children:(0,w.jsxs)(c.ZP,{alignItems:"center",justifyContent:"flex-end",children:[(0,w.jsx)(v.ZP,{children:"Overwrite pipeline files"}),(0,w.jsx)(f.Z,{ml:1}),(0,w.jsx)(j.Z,{checked:Z,onCheck:O})]})})]}),headerTitle:"Import pipeline from .zip file",children:[B&&(0,w.jsx)(g.kA,{children:D}),!B&&(0,w.jsxs)(s.Z,{directoryPath:null,onDragActiveChange:I,overwrite:Z,pipelineZip:!0,setFileUploadProgress:M,setUploadedFiles:function(e){T(e),N(),null===n||void 0===n||n()},children:[(0,w.jsx)(g.es,{children:(0,w.jsxs)(v.ZP,{center:!0,children:[y&&"Drop pipeline zip to import",!y&&"Click or drop pipeline zip to upload"]})}),(0,w.jsx)(f.Z,{mt:2,children:(0,w.jsxs)(v.ZP,{warning:!0,children:["The zip file should include the pipeline\u2019s metadata.yaml file and each",(0,w.jsx)("br",{}),"block\u2019s script file in the root folder."]})})]})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5699],{94629:function(e,t,r){r.d(t,{Z:function(){return w}});var n=r(82394),o=r(21831),i=r(82684),c=r(50724),u=r(1402),s=r(97618),a=r(70613),f=r(31557),d=r(68899),l=r(28598);function p(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(d.HS,{noPadding:n,ref:t,children:r})}var h=i.forwardRef(p),b=r(62547),v=r(82571),m=r(77417),O=r(46684),y=r(75375);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function P(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,i=e.afterHidden,p=e.afterWidth,g=e.afterWidthOverride,P=e.appendBreadcrumbs,w=e.before,k=e.beforeHeader,x=e.beforeWidth,A=e.breadcrumbs,S=e.children,Z=e.contained,I=e.errors,E=e.headerMenuItems,R=e.headerOffset,C=e.hideAfterCompletely,W=e.mainContainerHeader,M=e.navigationItems,H=e.setAfterHidden,B=e.setAfterWidth,_=e.setBeforeWidth,N=e.setErrors,D=e.subheaderChildren,T=e.subheaderNoPadding,U=e.title,G=e.uuid,F=(0,y.Z)(G,{beforeResizeOffset:y.H,setWidthAfter:B,setWidthBefore:_,widthAfter:p,widthBefore:x,widthOverrideAfter:g}),L=F.mainContainerRef,z=F.mousedownActiveAfter,Y=F.mousedownActiveBefore,q=F.setMousedownActiveAfter,J=F.setMousedownActiveBefore,K=F.setWidthAfter,Q=F.setWidthBefore,V=F.widthAfter,X=F.widthBefore,$=(0,m.Z)().project,ee=[];return A&&ee.push.apply(ee,(0,o.Z)(A)),null!==A&&void 0!==A&&A.length&&!P||!$||null!==A&&void 0!==A&&A.length||ee.unshift({bold:!P,label:function(){return U}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.Z,{title:U}),(0,l.jsx)(f.Z,{breadcrumbs:ee,menuItems:E}),(0,l.jsxs)(d.Nk,{ref:t,children:[0!==(null===M||void 0===M?void 0:M.length)&&(0,l.jsx)(d.lm,{showMore:!0,children:(0,l.jsx)(v.Z,{navigationItems:M,showMore:!0})}),(0,l.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(b.Z,{after:r,afterHeader:n,afterHeightOffset:O.Mz,afterHidden:i,afterMousedownActive:z,afterWidth:V,before:w,beforeHeader:k,beforeHeightOffset:O.Mz,beforeMousedownActive:Y,beforeWidth:w?X:d.k1,contained:Z,headerOffset:R,hideAfterCompletely:!r||C,leftOffset:w?d.k1:null,mainContainerHeader:W,mainContainerRef:L,setAfterHidden:H,setAfterMousedownActive:q,setAfterWidth:K,setBeforeMousedownActive:J,setBeforeWidth:Q,children:[D&&(0,l.jsx)(h,{noPadding:T,children:D}),S]})})]}),I&&(0,l.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===N||void 0===N?void 0:N(null)},children:(0,l.jsx)(u.Z,j(j({},I),{},{onClose:function(){return null===N||void 0===N?void 0:N(null)}}))})]})}var w=i.forwardRef(P)},74395:function(e,t,r){r.d(t,{M:function(){return c},W:function(){return i}});var n=r(25976),o=r(46684),i=34*r(70515).iI,c=n.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],o.Mz)},24755:function(e,t,r){r.d(t,{B2:function(){return o},DQ:function(){return l},HY:function(){return a},Pl:function(){return n},SA:function(){return p},WH:function(){return f},fF:function(){return s},tC:function(){return d}});var n,o,i=r(19452),c=r(50178),u=r(72473),s="Git settings",a="Preferences",f="Workspace";!function(e){e.PROJECT_PLATFORM="Platform",e.WORKSPACE="Workspace",e.USER_MANAGEMENT="User management"}(n||(n={})),function(e){e.PERMISSIONS="Permissions",e.PREFERENCES="Preferences",e.ROLES="Roles",e.SETTINGS="Settings",e.USERS="Users"}(o||(o={}));var d="Account",l="Profile",p=function(e,t){var r=e.owner,p=e.roles,h=e.project_access,b=(t||{projectPlatformActivated:!1}).projectPlatformActivated,v=r||p===i.No.ADMIN||0!==(3&h),m=[{items:[{Icon:u.WorkspacesIcon,linkProps:{href:"/settings/workspace/preferences"},uuid:a},{Icon:u.Settings,linkProps:{href:"/settings/workspace/sync-data"},uuid:s}],uuid:f}];if((0,c.YB)()&&v){var O=[{Icon:u.WorkspacesUsersIcon,linkProps:{href:"/settings/workspace/users"},uuid:o.USERS}];(0,c.Bw)()&&O.push.apply(O,[{Icon:u.VisibleEye,linkProps:{href:"/settings/workspace/roles"},uuid:o.ROLES},{Icon:u.Locked,linkProps:{href:"/settings/workspace/permissions"},uuid:o.PERMISSIONS}]),m.push({items:O,uuid:n.USER_MANAGEMENT})}return!b||(0,c.YB)()&&!v||m.push({items:[{Icon:u.BlocksSeparated,linkProps:{href:"/settings/platform/preferences"},uuid:o.PREFERENCES},{Icon:u.SettingsWithKnobs,linkProps:{href:"/settings/platform/settings"},uuid:o.SETTINGS}],uuid:n.PROJECT_PLATFORM}),(0,c.YB)()?m.concat([{items:[{Icon:u.Sun,linkProps:{href:"/settings/account/profile"},uuid:l}],uuid:d}]):m}},28274:function(e,t,r){r.d(t,{Z:function(){return A}});var n=r(94629),o=r(82394),i=r(12691),c=r.n(i),u=r(55485),s=r(48670),a=r(38276),f=r(30160),d=r(25976),l=r(44897),p=r(70515),h=r(91437),b=(p.iI,d.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*p.iI,2.5*p.iI)),v=d.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,h.eR)(),1.5*p.iI,2.5*p.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||l.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||l.Z.background).codeTextarea,";\n ")})),m=r(28598),O=r(82684);function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var j=function(e){var t=e.isItemSelected,r=e.sections;return(0,m.jsx)(a.Z,{py:p.Gg,children:null===r||void 0===r?void 0:r.map((function(e){var r=e.items,n=e.title,o=e.uuid;return(0,m.jsxs)(a.Z,{children:[(0,m.jsx)(b,{children:(0,m.jsx)(f.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:n?n():o})}),null===r||void 0===r?void 0:r.map((function(e){var r=e.Icon,n=e.label,i=e.linkProps,f=e.onClick,d=e.uuid,l=null===t||void 0===t?void 0:t(g(g({},e),{},{uuidWorkspace:o})),h=n?n():d,b=(0,m.jsx)(v,{selected:l,children:(0,m.jsxs)(u.ZP,{alignItems:"center",children:[r&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(r,{default:!l,size:1.75*p.iI}),(0,m.jsx)(a.Z,{mr:1})]}),h]})});return i?(0,O.createElement)(c(),g(g({},i),{},{key:d,passHref:!0}),(0,m.jsx)(s.Z,{block:!0,default:!l,noHoverUnderline:!0,noOutline:!0,sameColorAsText:l,children:b})):(0,m.jsx)(s.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:f,preventDefault:!0,sameColorAsText:!0,children:b},d)}))]},o)}))})},P=r(77417),w=r(74395),k=r(24755),x=r(50178);var A=function(e){var t=e.after,r=e.afterHeader,o=e.afterHidden,i=e.afterWidth,c=e.appendBreadcrumbs,u=e.breadcrumbs,s=e.children,a=e.hideAfterCompletely,f=e.setAfterHidden,d=e.title,l=e.uuidItemSelected,h=e.uuidWorkspaceSelected,b=(0,x.PR)()||{},v=(0,P.Z)().projectPlatformActivated;return(0,m.jsx)(n.Z,{after:t,afterHeader:r,afterHidden:!t||o,afterWidth:t?i||50*p.iI:0,afterWidthOverride:!0,appendBreadcrumbs:c,before:(0,m.jsx)(w.M,{children:(0,m.jsx)(j,{isItemSelected:function(e){var t=e.uuid,r=e.uuidWorkspace;return h===r&&l===t},sections:(0,k.SA)(b,{projectPlatformActivated:v})})}),beforeWidth:w.W,breadcrumbs:u,hideAfterCompletely:a,setAfterHidden:f,title:d||"Settings",uuid:"".concat(d||"settings","/index"),children:s})}},93808:function(e,t,r){r.d(t,{Z:function(){return S}});var n=r(77837),o=r(26304),i=r(62243),c=r(29385),u=r(80022),s=r(13692),a=r(93189),f=r(15544),d=r(82394),l=r(38860),p=r.n(l),h=r(82684),b=r(56663),v=r.n(b),m=r(40761),O=r(34661),y=r(36105),g=r(50178),j=r(69419),P=r(28598),w=["auth"];function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){(0,d.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function A(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.Z)(e);if(t){var o=(0,f.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,a.Z)(this,r)}}function S(e){return function(t){(0,s.Z)(a,t);var r=A(a);function a(){var e;(0,i.Z)(this,a);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=r.call.apply(r,[this].concat(n)),(0,d.Z)((0,u.Z)(e),"state",{auth:new m.Z(e.props.token)}),e}return(0,c.Z)(a,[{key:"componentDidMount",value:function(){this.setState({auth:new m.Z(this.props.token)})}},{key:"render",value:function(){var t=this.props,r=(t.auth,(0,o.Z)(t,w));return(0,P.jsx)(e,x({auth:this.state.auth},r))}}],[{key:"getInitialProps",value:function(){var t=(0,n.Z)(p().mark((function t(r){var n,o,i,c,u,s,a,f,d;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=v()(r),o=(0,g.ex)(r),i=o.id,c=n[O.Mv],u=n[y.qt],s=new m.Z(c),a=x(x({},r),{},{auth:s,currentGroupId:i,theme:u}),(0,g.YB)(r)&&s.isExpired&&(console.log("OAuth token has expired."),f=x(x({},r.query),{},{redirect_url:r.asPath}),(0,j.nL)("/sign-in?".concat((0,j.uM)(f)),r.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(a);case 10:return d=t.sent,t.abrupt("return",x(x({},d),{},{auth:s,currentGroupId:i,theme:u}));case 12:return t.abrupt("return",a);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),a}(h.Component)}},80022:function(e,t,r){function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7361],{37361:function(e,n,r){r.d(n,{X:function(){return k}});var i=r(21831),l=r(75582),s=r(82394),t=r(21764),o=r(82684),d=r(69864),a=r(34376),c=r(71180),u=r(70652),E=r(15338),f=r(97618),v=r(55485),I=r(85854),j=r(65956),m=r(28274),p=r(38276),Z=r(75499),x=r(30160),h=r(17488),g=r(35686),A=r(8193),L=r(72473),_=r(70515),S=r(24755),D=r(3917),R=r(76417),P=r(36717),T=r(50178),O=r(86735),b=r(42122),C=r(72619),B=r(95924),w=r(28598);function N(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,i)}return r}function y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?N(Object(r),!0).forEach((function(n){(0,s.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var k,W=2*_.iI;!function(e){e.PERMISSIONS="Permissions",e.ROLES="Roles"}(k||(k={})),n.Z=function(e){var n,r,s,N=e.contained,M=e.disableFields,U=e.onCancel,H=e.slug,Y=(0,T.PR)()||{},z=Y.id,Q=Y.owner,V=(0,a.useRouter)(),q=(0,o.useState)(!0),F=q[0],G=q[1],K=(0,o.useState)(null),$=K[0],X=K[1],J=(0,o.useState)({}),ee=J[0],ne=J[1],re=(0,o.useState)(null),ie=re[0],le=re[1],se=(0,o.useCallback)((function(e,n,r){le(y(y({},e),{},{rolesMapping:(0,O.HK)(n||[],(function(e){return e.id})),permissionsMapping:(0,O.HK)(r||[],(function(e){return e.id}))}))}),[le]),te=(0,o.useCallback)((function(e){ne((function(n){return y(y({},n),e)})),le((function(n){return y(y({},n),e)}))}),[ne,le]),oe=g.ZP.users.detail(H,{},{revalidateOnFocus:!1}).data,de=(0,o.useMemo)((function(){return null===oe||void 0===oe?void 0:oe.user}),[oe]);(0,o.useEffect)((function(){de&&se(de,null===de||void 0===de?void 0:de.roles_new,null===de||void 0===de?void 0:de.permissions)}),[se,de]);var ae=(0,d.Db)(de?g.ZP.users.useUpdate(H):g.ZP.users.useCreate(),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(e){var n=e.user;ne({}),se(n,null===n||void 0===n?void 0:n.roles_new,null===n||void 0===n?void 0:n.permissions),de||V.push("/settings/workspace/users/".concat(null===n||void 0===n?void 0:n.id)),String(null===n||void 0===n?void 0:n.id)===String(z)&&(0,T.av)(y(y({},(0,T.PR)()),{},{avatar:null===n||void 0===n?void 0:n.avatar,first_name:null===n||void 0===n?void 0:n.first_name,last_name:null===n||void 0===n?void 0:n.last_name,username:null===n||void 0===n?void 0:n.username})),t.Am.success(de?"User profile successfully updated.":"New user created successfully.",{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:"user-update-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,l=n.message,s=n.type;t.Am.error((null===r||void 0===r?void 0:r.error)||i||l,{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),ce=(0,l.Z)(ae,2),ue=ce[0],Ee=ce[1].isLoading,fe=(0,d.Db)(g.ZP.users.useDelete(null===de||void 0===de?void 0:de.id),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(){V.push("/settings/workspace/users"),t.Am.success("User successfully delete.",{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:"user-delete-success-".concat(null===de||void 0===de?void 0:de.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,l=n.message,s=n.type;t.Am.error((null===r||void 0===r?void 0:r.error)||i||l,{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),ve=(0,l.Z)(fe,2),Ie=ve[0],je=ve[1].isLoading,me=g.ZP.roles.list().data,pe=(0,o.useMemo)((function(){return(0,O.YC)((null===me||void 0===me?void 0:me.roles)||[],"name")}),[me]),Ze=(0,o.useMemo)((function(){return(null===ie||void 0===ie?void 0:ie.rolesMapping)||{}}),[ie]),xe=(0,o.useMemo)((function(){return(0,O.YC)(Object.values(Ze),"name")}),[Ze]),he=g.ZP.permissions.list({_limit:1e3}).data,ge=((0,o.useMemo)((function(){return(0,O.YC)((null===he||void 0===he?void 0:he.permissions)||[],"entity_name")}),[he]),(0,o.useMemo)((function(){return(null===ie||void 0===ie?void 0:ie.permissionsMapping)||{}}),[ie])),Ae=(0,o.useMemo)((function(){return(0,O.YC)(Object.values(ge),"entity_name")}),[ge]),Le=(0,o.useMemo)((function(){return(null===xe||void 0===xe?void 0:xe.length)>=1}),[xe]),_e=(0,o.useMemo)((function(){return(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Add,{}),compact:!0,onClick:function(){X(k.ROLES),G(!1)},primary:!Le,secondary:Le,small:!0,children:"Add roles"})}),[Le,X,G]),Se=(0,o.useMemo)((function(){return(null===Ae||void 0===Ae?void 0:Ae.length)>=1}),[Ae]),De=((0,o.useMemo)((function(){return(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Add,{}),compact:!0,onClick:function(){X(k.PERMISSIONS),G(!1)},primary:!Se,secondary:Se,small:!0,children:"Add permission"})}),[Se,X,G]),(0,o.useCallback)((function(e,n,r){return(0,w.jsx)(Z.Z,{columnFlex:[].concat((0,i.Z)(r?[]:[null]),[1]),columns:[].concat((0,i.Z)(r?[]:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===Ze||void 0===Ze?void 0:Ze[n]}));return(0,w.jsx)(u.Z,{checked:n,onClick:function(r){(0,B.j)(r),te(n?{rolesMapping:{}}:{rolesMapping:(0,O.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"}]),[{uuid:"Role"}]),onClickRow:n&&!r?function(n){var r=e[n];r&&window.open("/settings/workspace/roles/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.name,l=e.id,s=!(null===Ze||void 0===Ze||!Ze[l]);return[].concat((0,i.Z)(r?[]:[(0,w.jsx)(u.Z,{checked:s,onClick:function(n){(0,B.j)(n);var r=y({},Ze);s?null===r||void 0===r||delete r[l]:r[l]=e,te({rolesMapping:r})}},"checkbox")]),[(0,w.jsx)(x.ZP,{monospace:!0,children:n},"name")])})),uuid:"roles"})}),[Ze,te])),Re=(0,o.useCallback)((function(e,n,r){return(0,w.jsx)(Z.Z,{columnFlex:[null,2,1,1,6],columns:[{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n&&!r?function(n){var r=e[n];r&&window.open("/settings/workspace/permissions/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,r=e.entity,i=e.entity_id,l=e.entity_name,s=e.entity_type,t=e.id,o=n?(0,P.q)(n):[],d=(null===o||void 0===o?void 0:o.length)||0;return[(0,w.jsx)(x.ZP,{default:!0,monospace:!0,children:t},"id"),(0,w.jsx)(x.ZP,{monospace:!0,children:l||r},"entityName"),(0,w.jsx)(x.ZP,{default:!0,monospace:!!s,children:s||"-"},"entityType"),(0,w.jsx)(x.ZP,{default:!0,monospace:!!i,children:i||"-"},"entityID"),(0,w.jsx)("div",{children:d>=1&&(0,w.jsx)(v.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===o||void 0===o?void 0:o.map((function(e,n){return(0,w.jsx)("div",{children:(0,w.jsxs)(x.ZP,{default:!0,monospace:!0,small:!0,children:[e,d>=2&&n<d-1&&(0,w.jsx)(x.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[]),Pe=(0,o.useMemo)((function(){return De(pe)}),[De,pe]),Te=(0,o.useMemo)((function(){var e;return De(xe,!0,null===(e=M||[])||void 0===e?void 0:e.includes(k.ROLES))}),[De,M,xe]),Oe=(0,o.useMemo)((function(){var e;return Re(Ae,!0,null===(e=M||[])||void 0===e?void 0:e.includes(k.PERMISSIONS))}),[Re,M,Ae]),be=(0,w.jsxs)(A.N,{children:[(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(I.Z,{level:4,children:"Profile"})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Avatar"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({avatar:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Add initials or an emoji",value:(null===ie||void 0===ie?void 0:ie.avatar)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"username"in ee&&!(null!==ie&&void 0!==ie&&ie.username),default:!0,large:!0,children:["Username ","username"in ee&&!(null!==ie&&void 0!==ie&&ie.username)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({username:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Mage Supreme",value:(null===ie||void 0===ie?void 0:ie.username)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"First name"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({first_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Urza",value:(null===ie||void 0===ie?void 0:ie.first_name)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Last name"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({last_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Andromeda",value:(null===ie||void 0===ie?void 0:ie.last_name)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[de&&(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Email"}),!de&&(0,w.jsxs)(x.ZP,{danger:"email"in ee&&!(null!==ie&&void 0!==ie&&ie.email),default:!0,large:!0,children:["Email ","email"in ee&&!(null!==ie&&void 0!==ie&&ie.email)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),de&&(0,w.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(x.ZP,{large:!0,muted:!0,children:null===ie||void 0===ie?void 0:ie.email}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(L.Alphabet,{muted:!0,size:W}),(0,w.jsx)(p.Z,{mr:1})]}),!de&&(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Alphabet,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({email:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. mage@power.com",type:"email",value:(null===ie||void 0===ie?void 0:ie.email)||""})})]})})]}),(0,w.jsx)(p.Z,{mb:_.HN}),(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(I.Z,{level:4,children:"Authentication"})}),(0,w.jsx)(E.Z,{light:!0}),de&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"password_current"in ee&&!(null!==ie&&void 0!==ie&&ie.password_current),default:!0,large:!0,children:["Current password ","password_current"in ee&&!(null!==ie&&void 0!==ie&&ie.password_current)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({password_current:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===ie||void 0===ie?void 0:ie.password_current)||""})})]})}),(0,w.jsx)(E.Z,{light:!0})]}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"password"in ee&&!(null!==ie&&void 0!==ie&&ie.password),default:!0,large:!0,children:[de?"New password":"Password"," ","password"in ee&&!(null!==ie&&void 0!==ie&&ie.password)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({password:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===ie||void 0===ie?void 0:ie.password)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"password_confirmation"in ee&&!(null!==ie&&void 0!==ie&&ie.password_confirmation),default:!0,large:!0,children:["Confirm ",de?"new password":"password"," ","password_confirmation"in ee&&!(null!==ie&&void 0!==ie&&ie.password_confirmation)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({password_confirmation:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===ie||void 0===ie?void 0:ie.password_confirmation)||""})})]})})]}),(0,w.jsx)(p.Z,{mb:_.HN}),de&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,w.jsx)(I.Z,{level:4,children:"Roles"}),(0,w.jsx)(p.Z,{mr:_.cd}),Le&&!(null!==(n=M||[])&&void 0!==n&&n.includes(k.ROLES))&&(0,w.jsx)(v.ZP,{alignItems:"center",children:_e})]})}),(0,w.jsx)(E.Z,{light:!0}),!Le&&!(null!==(r=M||[])&&void 0!==r&&r.includes(k.ROLES))&&(0,w.jsxs)(p.Z,{p:_.cd,children:[(0,w.jsx)(p.Z,{mb:_.cd,children:(0,w.jsx)(x.ZP,{default:!0,children:"This user currently has no roles attached."})}),(0,w.jsx)(v.ZP,{alignItems:"center",children:_e})]}),Le&&(0,w.jsx)(p.Z,{pb:_.Mq,children:Te})]}),(0,w.jsx)(p.Z,{mb:_.HN}),(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,w.jsx)(I.Z,{level:4,children:"Permissions"})})}),(0,w.jsx)(E.Z,{light:!0}),!Se&&(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(x.ZP,{default:!0,children:"This user currently has no permissions."})}),Se&&(0,w.jsx)(p.Z,{pb:_.Mq,children:Oe})]}),(0,w.jsx)(p.Z,{mb:_.HN}),(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(I.Z,{level:4,children:"Metadata"})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Last updated"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(x.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ie||void 0===ie?void 0:ie.updated_at)&&(0,D.d$)(null===ie||void 0===ie?void 0:ie.updated_at,{includeSeconds:!0})}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(L.Schedule,{muted:!0,size:W}),(0,w.jsx)(p.Z,{mr:1})]})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Created at"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(x.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ie||void 0===ie?void 0:ie.created_at)&&(0,D.d$)(null===ie||void 0===ie?void 0:ie.created_at,{includeSeconds:!0})}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(L.Schedule,{muted:!0,size:W}),(0,w.jsx)(p.Z,{mr:1})]})]})})]}),(0,w.jsx)(p.Z,{mb:_.HN})]}),(0,w.jsxs)(v.ZP,{children:[(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Save,{}),disabled:!ee||!(null!==(s=Object.keys(ee))&&void 0!==s&&s.length),loading:Ee,onClick:function(){return ue({user:y(y({},(0,b.GL)(ie,["avatar","first_name","last_name","password","password_confirmation","password_current","username"].concat(de?[]:"email"),{include_blanks:!0})),null!==M&&void 0!==M&&M.includes(k.ROLES)?{}:{role_ids:Object.keys((null===ie||void 0===ie?void 0:ie.rolesMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:de?"Save changes":"Create new user"}),U&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(c.ZP,{onClick:function(){return null===U||void 0===U?void 0:U()},secondary:!0,children:"Cancel and go back"})]}),de&&String(z)!==String(H)&&Q&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Trash,{}),danger:!0,loading:je,onClick:function(){return Ie()},children:"Delete user"})]})]})]});return N?be:(0,w.jsx)(m.Z,{after:Pe,afterHeader:(0,w.jsx)(p.Z,{px:_.cd,children:(0,w.jsx)(x.ZP,{bold:!0,children:$})}),afterHidden:F,afterWidth:60*_.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Users"},linkProps:{href:"/settings/workspace/users"}},{bold:!0,label:function(){return(0,R.s)(ie)}}],setAfterHidden:G,title:de?(0,R.s)(de):"New user",uuidItemSelected:S.B2.USERS,uuidWorkspaceSelected:S.Pl.USER_MANAGEMENT,children:de&&be})}},36288:function(e,n,r){r.d(n,{Fy:function(){return v},G9:function(){return c},H1:function(){return I},K4:function(){return d},ND:function(){return a},Pt:function(){return u},WG:function(){return s},hl:function(){return f},m_:function(){return t},oO:function(){return E}});var i,l,s,t,o=r(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(s||(s={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(t||(t={}));var d=(i={},(0,o.Z)(i,s.OWNER,"Owner"),(0,o.Z)(i,s.ADMIN,"Admin"),(0,o.Z)(i,s.EDITOR,"Editor"),(0,o.Z)(i,s.VIEWER,"Viewer"),(0,o.Z)(i,s.LIST,"List"),(0,o.Z)(i,s.DETAIL,"Detail"),(0,o.Z)(i,s.CREATE,"Create"),(0,o.Z)(i,s.UPDATE,"Update"),(0,o.Z)(i,s.DELETE,"Delete"),(0,o.Z)(i,s.OPERATION_ALL,"All operations"),(0,o.Z)(i,s.QUERY,"Query"),(0,o.Z)(i,s.QUERY_ALL,"Query all attributes"),(0,o.Z)(i,s.READ,"Read"),(0,o.Z)(i,s.READ_ALL,"Read all attributes"),(0,o.Z)(i,s.WRITE,"Write"),(0,o.Z)(i,s.WRITE_ALL,"Write all attributes"),(0,o.Z)(i,s.ALL,"All"),(0,o.Z)(i,s.DISABLE_LIST,"Disable list"),(0,o.Z)(i,s.DISABLE_DETAIL,"Disable detail"),(0,o.Z)(i,s.DISABLE_CREATE,"Disable create"),(0,o.Z)(i,s.DISABLE_UPDATE,"Disable update"),(0,o.Z)(i,s.DISABLE_DELETE,"Disable delete"),(0,o.Z)(i,s.DISABLE_OPERATION_ALL,"Disable all operations"),(0,o.Z)(i,s.DISABLE_QUERY,"Disable query"),(0,o.Z)(i,s.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,o.Z)(i,s.DISABLE_READ,"Disable read"),(0,o.Z)(i,s.DISABLE_READ_ALL,"Disable all read attributes"),(0,o.Z)(i,s.DISABLE_WRITE,"Disable write"),(0,o.Z)(i,s.DISABLE_WRITE_ALL,"Disable all write attributes"),i),a=(l={},(0,o.Z)(l,t.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,o.Z)(l,t.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,o.Z)(l,t.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),l),c=[s.OWNER,s.ADMIN,s.EDITOR,s.VIEWER,s.ALL],u=[s.LIST,s.DETAIL,s.CREATE,s.UPDATE,s.DELETE,s.OPERATION_ALL],E=[s.DISABLE_LIST,s.DISABLE_DETAIL,s.DISABLE_CREATE,s.DISABLE_UPDATE,s.DISABLE_DELETE,s.DISABLE_OPERATION_ALL],f=[s.QUERY,s.QUERY_ALL,s.DISABLE_QUERY,s.DISABLE_QUERY_ALL],v=[s.READ,s.READ_ALL,s.DISABLE_READ,s.DISABLE_READ_ALL],I=[s.WRITE,s.WRITE_ALL,s.DISABLE_WRITE,s.DISABLE_WRITE_ALL]},36717:function(e,n,r){r.d(n,{q:function(){return s}});var i=r(75582),l=r(36288);function s(e){return Object.entries(l.K4).reduce((function(n,r){var l=(0,i.Z)(r,2),s=l[0],t=l[1];return e&Number(s)?n.concat(t):n}),[])}},76417:function(e,n,r){function i(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}r.d(n,{s:function(){return i}})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7966],{27966:function(e,n,t){t.d(n,{Z:function(){return Y}});var i=t(82394),r=t(75582),l=t(12691),u=t.n(l),o=t(69864),c=t(82684),s=t(34376),a=t(71180),d=t(70652),p=t(50724),f=t(97618),h=t(55485),v=t(48670),m=t(44265),g=t(89515),b=t(38276),_=t(4190),x=t(75499),j=t(48381),O=t(30160),w=t(35686),y=t(44897),P=t(42631),Z=t(72473),C=t(81655),k=t(72191),E=t(39643),D=t(25976),I=t(70515),R=D.default.div.withConfig({displayName:"Tablestyle__PopupContainerStyle",componentId:"sc-8ammqd-0"})(["position:absolute;max-height:","px;z-index:10;border-radius:","px;padding:","px;"," "," "," ",""],58*I.iI,P.TR,2*I.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||y.Z.shadow).popup,";\n background-color: ").concat((e.theme.interactive||y.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.leftOffset&&"\n left: ".concat(e.leftOffset,"px;\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),N=t(30229),L=t(31608),S=t(16488),T=t(86735),V=t(50178),F=t(72619),A=t(95924),U=t(69419),B=t(70320),M=t(3917),z=t(44688),H=t(28598);function X(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?X(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var G={monospace:!0,small:!0};function Q(e){var n=e.cancelingRunId,t=e.disabled,i=e.isLoadingCancelPipeline,l=e.onCancel,u=e.onSuccess,s=e.pipelineRun,d=e.setCancelingRunId,f=e.setErrors,v=e.setShowConfirmationId,g=e.showConfirmationId,x=(0,V.Ct)(),j=s||{},C=j.id,E=j.pipeline_schedule_id,D=j.pipeline_schedule_token,I=j.pipeline_schedule_type,L=j.status,S=i&&C===n&&m.VO.RUNNING===L,T=(0,U.iV)(),A=(0,c.useMemo)((function(){return(null!==T&&void 0!==T&&T.page?+T.page:0)>0}),[null===T||void 0===T?void 0:T.page]),B=(0,o.Db)(N.Xm.API===I&&D?w.ZP.pipeline_runs.pipeline_schedules.useCreateWithParent(E,D):w.ZP.pipeline_runs.pipeline_schedules.useCreate(E),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){u()},onErrorCallback:function(e,n){return null===f||void 0===f?void 0:f({errors:n,response:e})}})}}),M=(0,r.Z)(B,1)[0],z=(0,c.useCallback)((function(){v(null),M({pipeline_run:{backfill_id:null===s||void 0===s?void 0:s.backfill_id,event_variables:(null===s||void 0===s?void 0:s.event_variables)||{},execution_date:null===s||void 0===s?void 0:s.execution_date,pipeline_schedule_id:null===s||void 0===s?void 0:s.pipeline_schedule_id,pipeline_uuid:null===s||void 0===s?void 0:s.pipeline_uuid,variables:(null===s||void 0===s?void 0:s.variables)||{}}})}),[M,s,v]),X=(0,c.useCallback)((function(){v(null),d(C),l({id:C,status:m.VO.CANCELLED})}),[l,C,d,v]);return(0,H.jsxs)("div",{style:{position:"relative"},children:[(0,H.jsx)(a.ZP,{backgroundColor:S&&y.Z.accent.yellow,beforeIcon:m.VO.INITIAL!==L&&!t&&(0,H.jsxs)(H.Fragment,{children:[m.VO.COMPLETED===L&&(0,H.jsx)(Z.Check,{size:k.bL}),[m.VO.FAILED,m.VO.CANCELLED].includes(L)&&(0,H.jsx)(Z.PlayButtonFilled,{inverted:m.VO.CANCELLED===L&&!x,size:k.bL}),[m.VO.RUNNING].includes(L)&&(0,H.jsx)(_.Z,{color:S?y.Z.status.negative:y.Z.monotone.white,small:!0})]}),borderRadius:"".concat(P.D7,"px"),danger:m.VO.FAILED===L&&!x,default:m.VO.INITIAL===L,disabled:t||x,loading:!s,onClick:function(e){e.stopPropagation(),v(C)},padding:"6px",primary:m.VO.RUNNING===L&&!S&&!x,warning:m.VO.CANCELLED===L&&!x,children:t?"Ready":S?"Canceling":m.Do[L]}),(0,H.jsx)(p.Z,{onClickOutside:function(){return v(null)},open:g===C,children:(0,H.jsxs)(R,{children:[[m.VO.RUNNING,m.VO.INITIAL].includes(L)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(O.ZP,{bold:!0,color:"#9ECBFF",children:"Run is in progress"}),(0,H.jsx)(b.Z,{mb:1}),(0,H.jsxs)(O.ZP,{children:["This pipeline run is currently ongoing. Retrying will cancel",(0,H.jsx)("br",{}),"the current pipeline run."]}),(0,H.jsx)(O.ZP,{}),(0,H.jsx)(b.Z,{mt:1,children:(0,H.jsxs)(h.ZP,{children:[(0,H.jsx)(a.ZP,{onClick:function(){X(),z()},children:"Retry run"}),(0,H.jsx)(b.Z,{ml:1}),(0,H.jsx)(a.ZP,{onClick:X,children:"Cancel run"})]})})]}),[m.VO.CANCELLED,m.VO.FAILED,m.VO.COMPLETED].includes(L)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(O.ZP,{bold:!0,color:"#9ECBFF",children:["Run ",L]}),(0,H.jsx)(b.Z,{mb:1}),(0,H.jsxs)(O.ZP,{children:["Retry the run with changes you have made to the pipeline.",A?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("br",{}),"Note that the retried run may appear on a previous page."]}):null]}),(0,H.jsx)(b.Z,{mb:1}),(0,H.jsx)(a.ZP,{onClick:z,children:"Retry run"})]})]})})]})}var Y=function(e){var n=e.allowBulkSelect,t=e.allowDelete,l=e.deletePipelineRun,_=e.disableKeyboardNav,y=e.disableRowSelect,D=e.emptyMessage,R=void 0===D?"No runs available":D,N=e.fetchPipelineRuns,U=e.hideTriggerColumn,X=e.includePipelineTags,Y=e.onClickRow,q=e.pipelineRuns,J=e.selectedRun,$=e.selectedRuns,W=e.setSelectedRun,ee=e.setSelectedRuns,ne=e.setErrors,te=(0,s.useRouter)(),ie=(0,V.Ct)(),re=(0,B.qB)(),le=(0,c.useRef)({}),ue=(0,c.useState)(null),oe=ue[0],ce=ue[1],se=(0,c.useState)(null),ae=se[0],de=se[1],pe=(0,c.useState)(null),fe=pe[0],he=pe[1],ve=(0,c.useState)(0),me=ve[0],ge=ve[1],be=(0,c.useState)(0),_e=be[0],xe=be[1],je=(0,o.Db)((function(e){var n=e.id,t=e.status;return w.ZP.pipeline_runs.useUpdate(n)({pipeline_run:{status:t}})}),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){ce(null),null===N||void 0===N||N()},onErrorCallback:function(e,n){ce(null),null===ne||void 0===ne||ne({errors:n,response:e})}})}}),Oe=(0,r.Z)(je,2),we=Oe[0],ye=Oe[1].isLoading,Pe="PipelineDetail/Runs/Table",Ze="pipeline-runs",Ce=(0,c.useCallback)((function(e){if(!e)return null;var n=q.findIndex((function(n){return n.id===e.id}));return n>=0?n:null}),[q]),ke=(0,z.y)(),Ee=ke.registerOnKeyDown,De=ke.unregisterOnKeyDown;(0,c.useEffect)((function(){return function(){De(Pe)}}),[De,Pe]),Ee(Pe,(function(e,n){var t=n[E.Bu],i=n[E.kD];W&&!_&&(t||i)&&W((function(n){var r=Ce(n);if(null!==r){if(e.repeat)return e.preventDefault(),n;if(t){var l=r-1;return l<0&&(l=q.length-1),q[l]}if(i){var u=r+1;return u>=q.length&&(u=0),q[u]}}return n}))}),[q,W]),(0,c.useEffect)((function(){var e=Ce(J);if(null!==e){var n=(0,C.w4)({rowIndex:e,uuid:Ze}),t=document.getElementById(n);t&&t.scrollIntoView({behavior:"smooth",block:"center"})}}),[Ce,J]);var Ie=re?C.O$:{},Re=[null,null,null,null,1],Ne=[{uuid:"Status"},{center:!0,uuid:"Logs"},{center:!0,uuid:"ID"},{uuid:"Block runs"},{uuid:"Pipeline"}];U||(Re.push(1),Ne.push({uuid:"Trigger"})),X&&(Re.push(null),Ne.push({uuid:"Pipeline tags"})),Re.push.apply(Re,[1,1,1,null,null]),Ne.push.apply(Ne,[K(K({},Ie),{},{uuid:"Execution date"}),K(K({},Ie),{},{uuid:"Started at"}),K(K({},Ie),{},{uuid:"Completed at"}),{uuid:"Execution time"}]),t&&!ie&&(Re.push.apply(Re,[null]),Ne.push({label:function(){return""},uuid:"Delete"}));var Le=(0,c.useMemo)((function(){return q.every((function(e){var n=e.id;return!(null===$||void 0===$||!$[n])}))}),[q,$]);n&&(Re.unshift(null),Ne.unshift({label:function(){return(0,H.jsx)(d.Z,{checked:Le,onClick:function(){var e=(0,T.HK)(q||[],(function(e){return e.id}));ee(Le?{}:e)}})},uuid:"Selected"})),!y&&Y&&(Re.push(null),Ne.push({label:function(){return""},uuid:"action"}));var Se=(0,c.useCallback)((function(e,n){if(Y&&ee&&n&&n.metaKey){var t=q[e];ee((function(e){var n=!(null===e||void 0===e||!e[t.id]);return K(K({},e),{},(0,i.Z)({},t.id,n?null:t))}))}else Y&&Y(e)}),[Y,q,ee]);return(0,H.jsx)(L.cl,{minHeight:30*I.iI,overflowVisible:!!ae,children:0===(null===q||void 0===q?void 0:q.length)?(0,H.jsx)(b.Z,{px:3,py:1,children:(0,H.jsx)(O.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:R})}):(0,H.jsx)(x.Z,{columnFlex:Re,columns:Ne,isSelectedRow:function(e){return!y&&q[e].id===(null===J||void 0===J?void 0:J.id)},onClickRow:y?null:Se,rowVerticalPadding:6,rows:null===q||void 0===q?void 0:q.map((function(e,r){var o=e.block_runs_count,s=e.completed_block_runs_count,_=e.completed_at,x=e.execution_date,w=e.id,E=e.pipeline_schedule_id,D=e.pipeline_schedule_name,I=e.pipeline_tags,R=e.pipeline_uuid,L=e.started_at,T=e.status;le.current[w]=(0,c.createRef)();var V,F,B=!w&&!T,z="".concat(s," out of ").concat(o," block runs completed"),J=(0,H.jsx)(j.Z,{tags:null===I||void 0===I?void 0:I.map((function(e){return{uuid:e}}))},"row_pipeline_tags_".concat(r)),W=[];r>0&&q[r-1].execution_date===e.execution_date&&q[r-1].pipeline_schedule_id===e.pipeline_schedule_id?(W=[(0,H.jsx)(b.Z,{ml:1,children:(0,H.jsxs)(h.ZP,{alignItems:"center",children:[(0,H.jsx)(Z.Subitem,{size:k.bL,useStroke:!0}),(0,H.jsx)(a.ZP,{borderRadius:"".concat(P.D7,"px"),notClickable:!0,padding:"6px",children:(0,H.jsx)(O.ZP,{muted:!0,children:m.Do[T]})})]})},"row_status"),(0,H.jsx)(a.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){e.stopPropagation(),te.push("/pipelines/".concat(R,"/logs?pipeline_run_id[]=").concat(w))},children:(0,H.jsx)(Z.Logs,{default:!0,size:k.bL})},"row_logs"),(0,H.jsx)(O.ZP,{center:!0,default:!0,monospace:!0,muted:!0,children:null===e||void 0===e?void 0:e.id},"row_id"),(0,H.jsx)(u(),{as:"/pipelines/".concat(R,"/runs/").concat(w),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,block:!0,centerAlign:!0,muted:!0,title:z,children:"".concat(s," / ").concat(o)})},"row_block_runs"),(0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:R},"row_pipeline_uuid")],U||W.push((0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_trigger_retry")),X&&W.push(J),(V=W).push.apply(V,[(0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_date_retry"),(0,c.createElement)(O.ZP,K(K({},G),{},{key:"row_started_at",muted:!0,title:L?(0,M._6)(L):null}),L?(0,S.Uc)(L,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{key:"row_completed_at",muted:!0,title:_?(0,M._6)(_):null}),_?(0,S.Uc)(_,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_execution_time",title:L&&_?(0,M.Qf)({endDatetime:_,showFullFormat:!0,startDatetime:L}):null}),L&&_?(0,M.Qf)({endDatetime:_,startDatetime:L}):(0,H.jsx)(H.Fragment,{children:"\u2014"}))])):(W=[(0,H.jsx)(Q,{cancelingRunId:oe,disabled:B,isLoadingCancelPipeline:ye,onCancel:we,onSuccess:N,pipelineRun:e,setCancelingRunId:ce,setErrors:ne,setShowConfirmationId:de,showConfirmationId:ae},"row_retry_button"),(0,H.jsx)(a.ZP,{default:!0,disabled:B,iconOnly:!0,noBackground:!0,onClick:function(e){e.stopPropagation(),te.push("/pipelines/".concat(R,"/logs?pipeline_run_id[]=").concat(w))},children:(0,H.jsx)(Z.Logs,{default:!0,size:k.bL})},"row_logs"),(0,H.jsx)(O.ZP,{center:!0,default:!0,monospace:!0,muted:!0,children:null===e||void 0===e?void 0:e.id},"row_id"),(0,H.jsx)(u(),{as:"/pipelines/".concat(R,"/runs/").concat(w),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,block:!0,centerAlign:!0,disabled:B,sky:!0,title:z,children:B?"":"".concat(s," / ").concat(o)})},"row_block_runs"),(0,H.jsx)(O.ZP,{default:!0,monospace:!0,children:R},"row_pipeline_uuid")],U||W.push((0,H.jsx)(u(),{as:"/pipelines/".concat(R,"/triggers/").concat(E),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,sky:!0,children:D})},"row_trigger")),X&&W.push(J),(F=W).push.apply(F,[(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_date",title:x?(0,M._6)(x):null}),x?(0,S.Uc)(x,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_started_at",title:L?(0,M._6)(L):null}),L?(0,S.Uc)(L,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_completed_at",title:_?(0,M._6)(_):null}),_?(0,S.Uc)(_,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_execution_time",title:L&&_?(0,M.Qf)({endDatetime:_,showFullFormat:!0,startDatetime:L}):null}),L&&_?(0,M.Qf)({endDatetime:_,startDatetime:L}):(0,H.jsx)(H.Fragment,{children:"\u2014"}))]));if(t&&!ie&&W.push((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(a.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){var n,t,i,r;(0,A.j)(e),he(w),ge((null===(n=le.current[w])||void 0===n||null===(t=n.current)||void 0===t?void 0:t.offsetTop)||0),xe((null===(i=le.current[w])||void 0===i||null===(r=i.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:le.current[w],title:"Delete",children:(0,H.jsx)(Z.Trash,{default:!0,size:k.bL})}),(0,H.jsx)(p.Z,{onClickOutside:function(){return he(null)},open:fe===w,children:(0,H.jsx)(g.Z,{danger:!0,left:(_e||0)-C.nH,onCancel:function(){return he(null)},onClick:function(){he(null),l(w)},title:"Are you sure you want to delete this run (id ".concat(w,' for trigger "').concat(D,'")?'),top:(me||0)-(r<=1?C.oz:C.OK),width:C.Xx})})]})),n){var ue=!(null===$||void 0===$||!$[w]);W.unshift((0,H.jsx)(d.Z,{checked:ue,onClick:function(n){n.stopPropagation(),ee((function(n){return K(K({},n),{},(0,i.Z)({},w,ue?null:e))}))}},"selected-pipeline-run-".concat(w)))}return!y&&Y&&W.push((0,H.jsx)(f.Z,{flex:1,justifyContent:"flex-end",children:(0,H.jsx)(Z.ChevronRight,{default:!0,size:k.bL})})),W})),uuid:Ze})})}},16488:function(e,n,t){t.d(n,{IJ:function(){return v},M8:function(){return P},Uc:function(){return x},XM:function(){return y},_U:function(){return h},eI:function(){return _},gU:function(){return O},lO:function(){return D},ri:function(){return g},tL:function(){return j},vJ:function(){return w},xH:function(){return b}});var i,r=t(82394),l=t(92083),u=t.n(l),o=t(3917),c=t(4383),s=t(30229),a=t(42122),d=t(86735);function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var h=function(e){return!!e&&!Object.values(s.U5).includes(e)};function v(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,i=n.completed_at,l=n.started_at,o=n.status,c=null;l&&i&&(c=u()(i).valueOf()-u()(l).valueOf());return f(f({},e),{},(0,r.Z)({},t,{runtime:c,status:o}))}),{})}var m,g=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:s.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:s.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:s.Xm.API}];return e?n.slice(0,1):n};function b(e){var n=(0,a.gR)(e,[s.gm.INTERVAL,s.gm.TYPE]),t=e[s.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var i=e[s.gm.TYPE];return i&&(n["schedule_type[]"]=i),n}function _(e){return e?new Date(u()(e).valueOf()):null}function x(e,n){return n?(0,o.XG)(e,n):function(e){if("string"!==typeof e)return e;var n=e.split("+")[0];return u()(_(n)).format(o.Nx)}(e)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(m||(m={}));var j=(i={},(0,r.Z)(i,m.DAY,86400),(0,r.Z)(i,m.HOUR,3600),(0,r.Z)(i,m.MINUTE,60),(0,r.Z)(i,m.SECOND,1),i);function O(e){var n=m.SECOND,t=e;return e%86400===0?(t/=86400,n=m.DAY):e%3600===0?(t/=3600,n=m.HOUR):e%60===0&&(t/=60,n=m.MINUTE),{time:t,unit:n}}function w(e,n){return e*j[n]}function y(e,n,t){var i,r=u()(e);return r.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),r.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),r.set("second",0),i=r.format(o.TD),null!==t&&void 0!==t&&t.includeSeconds&&(i=i.concat(":00")),null!==t&&void 0!==t&&t.localTimezone&&(i=r.format(o.lE),null!==t&&void 0!==t&&t.convertToUtc&&(i=(0,o.d$)(i,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))),i}function P(e){var n,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i="",r=!0;return r&&(t?i="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(i="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(i="".concat(i,"/").concat(e.token)))),r&&(n=window.location.port)&&(i=i.replace(n,c.QT)),i}function Z(e,n,t){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,t){var i=t.indexOf(e),r=0;if(n<0)for(var l=0;l>n;l--)0===i?(i=t.length-1,r-=1):i-=1;else if(n>0)for(var u=0;u<n;u++)i===t.length-1?(i=0,r+=1):i+=1;var o="number"===typeof t[i]?t[i]:e;return{additionalOffset:r,cronValue:String(o)}}(+e,n,t)}var C=(0,d.m5)(60),k=(0,d.m5)(24),E=(0,o.Cs)();function D(e,n){if(!e)return e;var t=u()().local().format("Z"),i=t.split(":"),r="-"===t[0],l=3===i[0].length?Number(i[0].slice(1)):Number(i[0]),o=Number(i[1]);(r&&!n||!r&&n)&&(l=-l,o=-o);var c=e.split(" "),s=c[0],a=c[1],d=c[2],p=Z(s,o,C),f=Z(a,l+p.additionalOffset,k);if(c[0]=p.cronValue,c[1]=f.cronValue,0!==(null===f||void 0===f?void 0:f.additionalOffset)){var h=Z(d,f.additionalOffset,E);c[2]=h.cronValue}return c.join(" ")}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7966],{27966:function(e,n,t){t.d(n,{Z:function(){return Q}});var i=t(82394),r=t(75582),l=t(12691),u=t.n(l),o=t(69864),c=t(82684),s=t(34376),a=t(71180),d=t(70652),p=t(50724),f=t(97618),h=t(55485),v=t(48670),m=t(44265),g=t(89515),b=t(38276),_=t(4190),x=t(75499),j=t(48381),O=t(30160),w=t(35686),y=t(44897),P=t(42631),Z=t(72473),C=t(81655),k=t(72191),E=t(39643),D=t(25976),I=t(70515),R=D.default.div.withConfig({displayName:"Tablestyle__PopupContainerStyle",componentId:"sc-8ammqd-0"})(["position:absolute;max-height:","px;z-index:10;border-radius:","px;padding:","px;"," "," "," ",""],58*I.iI,P.TR,2*I.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||y.Z.shadow).popup,";\n background-color: ").concat((e.theme.interactive||y.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.leftOffset&&"\n left: ".concat(e.leftOffset,"px;\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),N=t(30229),L=t(31608),S=t(16488),V=t(86735),T=t(50178),F=t(72619),A=t(95924),U=t(69419),B=t(70320),M=t(3917),z=t(44688),H=t(28598);function X(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?X(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var G={monospace:!0,small:!0};function Y(e){var n=e.cancelingRunId,t=e.disabled,i=e.isLoadingCancelPipeline,l=e.onCancel,u=e.onSuccess,s=e.pipelineRun,d=e.setCancelingRunId,f=e.setErrors,v=e.setShowConfirmationId,g=e.showConfirmationId,x=(0,T.Ct)(),j=s||{},C=j.id,E=j.pipeline_schedule_id,D=j.pipeline_schedule_token,I=j.pipeline_schedule_type,L=j.status,S=i&&C===n&&m.VO.RUNNING===L,V=(0,U.iV)(),A=(0,c.useMemo)((function(){return(null!==V&&void 0!==V&&V.page?+V.page:0)>0}),[null===V||void 0===V?void 0:V.page]),B=(0,o.Db)(N.Xm.API===I&&D?w.ZP.pipeline_runs.pipeline_schedules.useCreateWithParent(E,D):w.ZP.pipeline_runs.pipeline_schedules.useCreate(E),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){u()},onErrorCallback:function(e,n){return null===f||void 0===f?void 0:f({errors:n,response:e})}})}}),M=(0,r.Z)(B,1)[0],z=(0,c.useCallback)((function(){v(null),M({pipeline_run:{backfill_id:null===s||void 0===s?void 0:s.backfill_id,event_variables:(null===s||void 0===s?void 0:s.event_variables)||{},execution_date:null===s||void 0===s?void 0:s.execution_date,pipeline_schedule_id:null===s||void 0===s?void 0:s.pipeline_schedule_id,pipeline_uuid:null===s||void 0===s?void 0:s.pipeline_uuid,variables:(null===s||void 0===s?void 0:s.variables)||{}}})}),[M,s,v]),X=(0,c.useCallback)((function(){v(null),d(C),l({id:C,status:m.VO.CANCELLED})}),[l,C,d,v]);return(0,H.jsxs)("div",{style:{position:"relative"},children:[(0,H.jsx)(a.ZP,{backgroundColor:S&&y.Z.accent.yellow,beforeIcon:m.VO.INITIAL!==L&&!t&&(0,H.jsxs)(H.Fragment,{children:[m.VO.COMPLETED===L&&(0,H.jsx)(Z.Check,{size:k.bL}),[m.VO.FAILED,m.VO.CANCELLED].includes(L)&&(0,H.jsx)(Z.PlayButtonFilled,{inverted:m.VO.CANCELLED===L&&!x,size:k.bL}),[m.VO.RUNNING].includes(L)&&(0,H.jsx)(_.Z,{color:S?y.Z.status.negative:y.Z.monotone.white,small:!0})]}),borderRadius:"".concat(P.D7,"px"),danger:m.VO.FAILED===L&&!x,default:m.VO.INITIAL===L,disabled:t||x,loading:!s,onClick:function(e){e.stopPropagation(),v(C)},padding:"6px",primary:m.VO.RUNNING===L&&!S&&!x,warning:m.VO.CANCELLED===L&&!x,children:t?"Ready":S?"Canceling":m.Do[L]}),(0,H.jsx)(p.Z,{onClickOutside:function(){return v(null)},open:g===C,children:(0,H.jsxs)(R,{children:[[m.VO.RUNNING,m.VO.INITIAL].includes(L)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(O.ZP,{bold:!0,color:"#9ECBFF",children:"Run is in progress"}),(0,H.jsx)(b.Z,{mb:1}),(0,H.jsxs)(O.ZP,{children:["This pipeline run is currently ongoing. Retrying will cancel",(0,H.jsx)("br",{}),"the current pipeline run."]}),(0,H.jsx)(O.ZP,{}),(0,H.jsx)(b.Z,{mt:1,children:(0,H.jsxs)(h.ZP,{children:[(0,H.jsx)(a.ZP,{onClick:function(){X(),z()},children:"Retry run"}),(0,H.jsx)(b.Z,{ml:1}),(0,H.jsx)(a.ZP,{onClick:X,children:"Cancel run"})]})})]}),[m.VO.CANCELLED,m.VO.FAILED,m.VO.COMPLETED].includes(L)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(O.ZP,{bold:!0,color:"#9ECBFF",children:["Run ",L]}),(0,H.jsx)(b.Z,{mb:1}),(0,H.jsxs)(O.ZP,{children:["Retry the run with changes you have made to the pipeline.",A?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("br",{}),"Note that the retried run may appear on a previous page."]}):null]}),(0,H.jsx)(b.Z,{mb:1}),(0,H.jsx)(a.ZP,{onClick:z,children:"Retry run"})]})]})})]})}var Q=function(e){var n=e.allowBulkSelect,t=e.allowDelete,l=e.deletePipelineRun,_=e.disableKeyboardNav,y=e.disableRowSelect,D=e.emptyMessage,R=void 0===D?"No runs available":D,N=e.fetchPipelineRuns,U=e.hideTriggerColumn,X=e.includePipelineTags,Q=e.onClickRow,q=e.pipelineRuns,J=e.selectedRun,$=e.selectedRuns,W=e.setSelectedRun,ee=e.setSelectedRuns,ne=e.setErrors,te=(0,s.useRouter)(),ie=(0,T.Ct)(),re=(0,B.qB)(),le=(0,c.useRef)({}),ue=(0,c.useState)(null),oe=ue[0],ce=ue[1],se=(0,c.useState)(null),ae=se[0],de=se[1],pe=(0,c.useState)(null),fe=pe[0],he=pe[1],ve=(0,c.useState)(0),me=ve[0],ge=ve[1],be=(0,c.useState)(0),_e=be[0],xe=be[1],je=(0,o.Db)((function(e){var n=e.id,t=e.status;return w.ZP.pipeline_runs.useUpdate(n)({pipeline_run:{status:t}})}),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){ce(null),null===N||void 0===N||N()},onErrorCallback:function(e,n){ce(null),null===ne||void 0===ne||ne({errors:n,response:e})}})}}),Oe=(0,r.Z)(je,2),we=Oe[0],ye=Oe[1].isLoading,Pe="PipelineDetail/Runs/Table",Ze="pipeline-runs",Ce=(0,c.useCallback)((function(e){if(!e)return null;var n=q.findIndex((function(n){return n.id===e.id}));return n>=0?n:null}),[q]),ke=(0,z.y)(),Ee=ke.registerOnKeyDown,De=ke.unregisterOnKeyDown;(0,c.useEffect)((function(){return function(){De(Pe)}}),[De,Pe]),Ee(Pe,(function(e,n){var t=n[E.Bu],i=n[E.kD];W&&!_&&(t||i)&&W((function(n){var r=Ce(n);if(null!==r){if(e.repeat)return e.preventDefault(),n;if(t){var l=r-1;return l<0&&(l=q.length-1),q[l]}if(i){var u=r+1;return u>=q.length&&(u=0),q[u]}}return n}))}),[q,W]),(0,c.useEffect)((function(){var e=Ce(J);if(null!==e){var n=(0,C.w4)({rowIndex:e,uuid:Ze}),t=document.getElementById(n);t&&t.scrollIntoView({behavior:"smooth",block:"center"})}}),[Ce,J]);var Ie=re?C.O$:{},Re=[null,null,null,null,1],Ne=[{uuid:"Status"},{center:!0,uuid:"Logs"},{center:!0,uuid:"ID"},{uuid:"Block runs"},{uuid:"Pipeline"}];U||(Re.push(1),Ne.push({uuid:"Trigger"})),X&&(Re.push(null),Ne.push({uuid:"Pipeline tags"})),Re.push.apply(Re,[1,1,1,null,null]),Ne.push.apply(Ne,[K(K({},Ie),{},{uuid:"Execution date"}),K(K({},Ie),{},{uuid:"Started at"}),K(K({},Ie),{},{uuid:"Completed at"}),{uuid:"Execution time"}]),t&&!ie&&(Re.push.apply(Re,[null]),Ne.push({label:function(){return""},uuid:"Delete"}));var Le=(0,c.useMemo)((function(){return q.every((function(e){var n=e.id;return!(null===$||void 0===$||!$[n])}))}),[q,$]);n&&(Re.unshift(null),Ne.unshift({label:function(){return(0,H.jsx)(d.Z,{checked:Le,onClick:function(){var e=(0,V.HK)(q||[],(function(e){return e.id}));ee(Le?{}:e)}})},uuid:"Selected"})),!y&&Q&&(Re.push(null),Ne.push({label:function(){return""},uuid:"action"}));var Se=(0,c.useCallback)((function(e,n){if(Q&&ee&&n&&n.metaKey){var t=q[e];ee((function(e){var n=!(null===e||void 0===e||!e[t.id]);return K(K({},e),{},(0,i.Z)({},t.id,n?null:t))}))}else Q&&Q(e)}),[Q,q,ee]);return(0,H.jsx)(L.cl,{minHeight:30*I.iI,overflowVisible:!!ae,children:0===(null===q||void 0===q?void 0:q.length)?(0,H.jsx)(b.Z,{px:3,py:1,children:(0,H.jsx)(O.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:R})}):(0,H.jsx)(x.Z,{columnFlex:Re,columns:Ne,isSelectedRow:function(e){return!y&&q[e].id===(null===J||void 0===J?void 0:J.id)},onClickRow:y?null:Se,rowVerticalPadding:6,rows:null===q||void 0===q?void 0:q.map((function(e,r){var o=e.block_runs_count,s=e.completed_block_runs_count,_=e.completed_at,x=e.execution_date,w=e.id,E=e.pipeline_schedule_id,D=e.pipeline_schedule_name,I=e.pipeline_tags,R=e.pipeline_uuid,L=e.started_at,V=e.status;le.current[w]=(0,c.createRef)();var T,F,B=!w&&!V,z="".concat(s," out of ").concat(o," block runs completed"),J=(0,H.jsx)(j.Z,{tags:null===I||void 0===I?void 0:I.map((function(e){return{uuid:e}}))},"row_pipeline_tags_".concat(r)),W=[];r>0&&q[r-1].execution_date===e.execution_date&&q[r-1].pipeline_schedule_id===e.pipeline_schedule_id?(W=[(0,H.jsx)(b.Z,{ml:1,children:(0,H.jsxs)(h.ZP,{alignItems:"center",children:[(0,H.jsx)(Z.Subitem,{size:k.bL,useStroke:!0}),(0,H.jsx)(a.ZP,{borderRadius:"".concat(P.D7,"px"),notClickable:!0,padding:"6px",children:(0,H.jsx)(O.ZP,{muted:!0,children:m.Do[V]})})]})},"row_status"),(0,H.jsx)(a.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){e.stopPropagation(),te.push("/pipelines/".concat(R,"/logs?pipeline_run_id[]=").concat(w))},children:(0,H.jsx)(Z.Logs,{default:!0,size:k.bL})},"row_logs"),(0,H.jsx)(O.ZP,{center:!0,default:!0,monospace:!0,muted:!0,children:null===e||void 0===e?void 0:e.id},"row_id"),(0,H.jsx)(u(),{as:"/pipelines/".concat(R,"/runs/").concat(w),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,block:!0,centerAlign:!0,muted:!0,title:z,children:"".concat(s," / ").concat(o)})},"row_block_runs"),(0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:R},"row_pipeline_uuid")],U||W.push((0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_trigger_retry")),X&&W.push(J),(T=W).push.apply(T,[(0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_date_retry"),(0,c.createElement)(O.ZP,K(K({},G),{},{key:"row_started_at",muted:!0,title:L?(0,M._6)(L):null}),L?(0,S.Uc)(L,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{key:"row_completed_at",muted:!0,title:_?(0,M._6)(_):null}),_?(0,S.Uc)(_,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_execution_time",title:L&&_?(0,M.Qf)({endDatetime:_,showFullFormat:!0,startDatetime:L}):null}),L&&_?(0,M.Qf)({endDatetime:_,startDatetime:L}):(0,H.jsx)(H.Fragment,{children:"\u2014"}))])):(W=[(0,H.jsx)(Y,{cancelingRunId:oe,disabled:B,isLoadingCancelPipeline:ye,onCancel:we,onSuccess:N,pipelineRun:e,setCancelingRunId:ce,setErrors:ne,setShowConfirmationId:de,showConfirmationId:ae},"row_retry_button"),(0,H.jsx)(a.ZP,{default:!0,disabled:B,iconOnly:!0,noBackground:!0,onClick:function(e){e.stopPropagation(),te.push("/pipelines/".concat(R,"/logs?pipeline_run_id[]=").concat(w))},children:(0,H.jsx)(Z.Logs,{default:!0,size:k.bL})},"row_logs"),(0,H.jsx)(O.ZP,{center:!0,default:!0,monospace:!0,muted:!0,children:null===e||void 0===e?void 0:e.id},"row_id"),(0,H.jsx)(u(),{as:"/pipelines/".concat(R,"/runs/").concat(w),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,block:!0,centerAlign:!0,disabled:B,sky:!0,title:z,children:B?"":"".concat(s," / ").concat(o)})},"row_block_runs"),(0,H.jsx)(O.ZP,{default:!0,monospace:!0,children:R},"row_pipeline_uuid")],U||W.push((0,H.jsx)(u(),{as:"/pipelines/".concat(R,"/triggers/").concat(E),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,sky:!0,children:D})},"row_trigger")),X&&W.push(J),(F=W).push.apply(F,[(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_date",title:x?(0,M._6)(x):null}),x?(0,S.Uc)(x,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_started_at",title:L?(0,M._6)(L):null}),L?(0,S.Uc)(L,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_completed_at",title:_?(0,M._6)(_):null}),_?(0,S.Uc)(_,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_execution_time",title:L&&_?(0,M.Qf)({endDatetime:_,showFullFormat:!0,startDatetime:L}):null}),L&&_?(0,M.Qf)({endDatetime:_,startDatetime:L}):(0,H.jsx)(H.Fragment,{children:"\u2014"}))]));if(t&&!ie&&W.push((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(a.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){var n,t,i,r;(0,A.j)(e),he(w),ge((null===(n=le.current[w])||void 0===n||null===(t=n.current)||void 0===t?void 0:t.offsetTop)||0),xe((null===(i=le.current[w])||void 0===i||null===(r=i.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:le.current[w],title:"Delete",children:(0,H.jsx)(Z.Trash,{default:!0,size:k.bL})}),(0,H.jsx)(p.Z,{onClickOutside:function(){return he(null)},open:fe===w,children:(0,H.jsx)(g.Z,{danger:!0,left:(_e||0)-C.nH,onCancel:function(){return he(null)},onClick:function(){he(null),l(w)},title:"Are you sure you want to delete this run (id ".concat(w,' for trigger "').concat(D,'")?'),top:(me||0)-(r<=1?C.oz:C.OK),width:C.Xx})})]})),n){var ue=!(null===$||void 0===$||!$[w]);W.unshift((0,H.jsx)(d.Z,{checked:ue,onClick:function(n){n.stopPropagation(),ee((function(n){return K(K({},n),{},(0,i.Z)({},w,ue?null:e))}))}},"selected-pipeline-run-".concat(w)))}return!y&&Q&&W.push((0,H.jsx)(f.Z,{flex:1,justifyContent:"flex-end",children:(0,H.jsx)(Z.ChevronRight,{default:!0,size:k.bL})})),W})),uuid:Ze})})}},16488:function(e,n,t){t.d(n,{IJ:function(){return v},M8:function(){return P},Uc:function(){return x},XM:function(){return y},_U:function(){return h},eI:function(){return _},gU:function(){return O},lO:function(){return D},ri:function(){return g},tL:function(){return j},vJ:function(){return w},xH:function(){return b}});var i,r=t(82394),l=t(92083),u=t.n(l),o=t(3917),c=t(4383),s=t(30229),a=t(42122),d=t(86735);function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var h=function(e){return!!e&&!Object.values(s.U5).includes(e)};function v(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,i=n.completed_at,l=n.started_at,o=n.status,c=null;l&&i&&(c=u()(i).valueOf()-u()(l).valueOf());return f(f({},e),{},(0,r.Z)({},t,{runtime:c,status:o}))}),{})}var m,g=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:s.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:s.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:s.Xm.API}];return e?n.slice(0,1):n};function b(e){var n=(0,a.gR)(e,[s.gm.INTERVAL,s.gm.TYPE]),t=e[s.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var i=e[s.gm.TYPE];return i&&(n["schedule_type[]"]=i),n}function _(e){return e?new Date(u()(e).valueOf()):null}function x(e,n){return n?(0,o.XG)(e,n):function(e){if("string"!==typeof e)return e;var n=e.split("+")[0];return u()(_(n)).format(o.Nx)}(e)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(m||(m={}));var j=(i={},(0,r.Z)(i,m.DAY,86400),(0,r.Z)(i,m.HOUR,3600),(0,r.Z)(i,m.MINUTE,60),(0,r.Z)(i,m.SECOND,1),i);function O(e){var n=m.SECOND,t=e;return e%86400===0?(t/=86400,n=m.DAY):e%3600===0?(t/=3600,n=m.HOUR):e%60===0&&(t/=60,n=m.MINUTE),{time:t,unit:n}}function w(e,n){return e*j[n]}function y(e,n,t){var i,r=u()(e);return r.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),r.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),r.set("second",0),i=r.format(o.TD),null!==t&&void 0!==t&&t.includeSeconds&&(i=i.concat(":00")),null!==t&&void 0!==t&&t.localTimezone&&(i=r.format(o.lE),null!==t&&void 0!==t&&t.convertToUtc&&(i=(0,o.d$)(i,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))),i}function P(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t="",i=!0;if(i){var r=(0,c.XF)();n?t="".concat(r,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(t="".concat(r,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(t="".concat(t,"/").concat(e.token)))}return t}function Z(e,n,t){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,t){var i=t.indexOf(e),r=0;if(n<0)for(var l=0;l>n;l--)0===i?(i=t.length-1,r-=1):i-=1;else if(n>0)for(var u=0;u<n;u++)i===t.length-1?(i=0,r+=1):i+=1;var o="number"===typeof t[i]?t[i]:e;return{additionalOffset:r,cronValue:String(o)}}(+e,n,t)}var C=(0,d.m5)(60),k=(0,d.m5)(24),E=(0,o.Cs)();function D(e,n){if(!e)return e;var t=u()().local().format("Z"),i=t.split(":"),r="-"===t[0],l=3===i[0].length?Number(i[0].slice(1)):Number(i[0]),o=Number(i[1]);(r&&!n||!r&&n)&&(l=-l,o=-o);var c=e.split(" "),s=c[0],a=c[1],d=c[2],p=Z(s,o,C),f=Z(a,l+p.additionalOffset,k);if(c[0]=p.cronValue,c[1]=f.cronValue,0!==(null===f||void 0===f?void 0:f.additionalOffset)){var h=Z(d,f.additionalOffset,E);c[2]=h.cronValue}return c.join(" ")}}}]);