mage-ai 0.9.12__py3-none-any.whl → 0.9.14__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 (325) hide show
  1. mage_ai/ai/generator.py +1 -1
  2. mage_ai/ai/generator_cmds.py +1 -1
  3. mage_ai/ai/llm_pipeline_wizard.py +31 -17
  4. mage_ai/api/policies/BlockPolicy.py +1 -0
  5. mage_ai/api/policies/PipelineRunPolicy.py +1 -0
  6. mage_ai/api/policies/PipelineSchedulePolicy.py +12 -0
  7. mage_ai/api/policies/TagPolicy.py +18 -0
  8. mage_ai/api/presenters/BlockRunPresenter.py +4 -1
  9. mage_ai/api/presenters/PipelineRunPresenter.py +2 -0
  10. mage_ai/api/presenters/PipelineSchedulePresenter.py +9 -2
  11. mage_ai/api/presenters/TagPresenter.py +3 -0
  12. mage_ai/api/resources/BackfillResource.py +6 -3
  13. mage_ai/api/resources/BlockResource.py +2 -0
  14. mage_ai/api/resources/BlockRunResource.py +18 -12
  15. mage_ai/api/resources/DatabaseResource.py +23 -0
  16. mage_ai/api/resources/GitBranchResource.py +8 -1
  17. mage_ai/api/resources/GlobalDataProductResource.py +5 -2
  18. mage_ai/api/resources/PipelineResource.py +30 -14
  19. mage_ai/api/resources/PipelineScheduleResource.py +157 -1
  20. mage_ai/api/resources/SearchResultResource.py +1 -0
  21. mage_ai/api/resources/TagResource.py +16 -3
  22. mage_ai/data_integrations/sources/constants.py +1 -0
  23. mage_ai/data_preparation/git/__init__.py +18 -0
  24. mage_ai/data_preparation/models/block/__init__.py +34 -11
  25. mage_ai/data_preparation/models/block/dbt/utils/__init__.py +37 -10
  26. mage_ai/data_preparation/models/block/integration/__init__.py +1 -1
  27. mage_ai/data_preparation/models/block/sql/__init__.py +44 -2
  28. mage_ai/data_preparation/models/custom_templates/utils.py +14 -4
  29. mage_ai/data_preparation/models/global_data_product/__init__.py +8 -0
  30. mage_ai/data_preparation/models/pipeline.py +4 -0
  31. mage_ai/data_preparation/models/variable.py +5 -2
  32. mage_ai/data_preparation/repo_manager.py +28 -16
  33. mage_ai/io/clickhouse.py +9 -6
  34. mage_ai/io/redshift.py +9 -10
  35. mage_ai/io/utils.py +3 -1
  36. mage_ai/orchestration/db/migrations/README.md +39 -2
  37. mage_ai/orchestration/db/migrations/env.py +1 -0
  38. mage_ai/orchestration/db/migrations/versions/386bcfebd48d_create_tag_and_tagassociation_tables.py +59 -0
  39. mage_ai/orchestration/db/models/schedules.py +29 -2
  40. mage_ai/orchestration/db/models/tags.py +57 -0
  41. mage_ai/orchestration/pipeline_scheduler.py +7 -7
  42. mage_ai/orchestration/triggers/global_data_product.py +41 -40
  43. mage_ai/orchestration/triggers/utils.py +11 -1
  44. mage_ai/server/constants.py +1 -1
  45. mage_ai/server/frontend_dist/404.html +2 -2
  46. mage_ai/server/frontend_dist/404.html.html +2 -2
  47. mage_ai/server/frontend_dist/_next/static/CNjkRIWPaAu1yJUmIaX_q/_buildManifest.js +1 -0
  48. mage_ai/server/frontend_dist/_next/static/chunks/1005-a2f0e3ee378ef02b.js +1 -0
  49. mage_ai/server/frontend_dist/_next/static/chunks/1424-fca78f21a81a7183.js +1 -0
  50. mage_ai/server/frontend_dist/_next/static/chunks/1484-87d4d4a698ac63dc.js +1 -0
  51. mage_ai/server/frontend_dist/_next/static/chunks/2485-39885e5335888821.js +1 -0
  52. mage_ai/server/frontend_dist/_next/static/chunks/2786-f71862671f66d948.js +1 -0
  53. mage_ai/server/frontend_dist/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +1 -0
  54. mage_ai/server/frontend_dist/_next/static/chunks/3881-131cf690e54c23a3.js +1 -0
  55. mage_ai/server/frontend_dist/_next/static/chunks/437-331193bd9b2fe777.js +1 -0
  56. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4822-045cc7cdd7c95163.js → frontend_dist/_next/static/chunks/4822-ee62acb1927c8150.js} +1 -1
  57. mage_ai/server/frontend_dist/_next/static/chunks/547-bd961ea93f3eb98b.js +1 -0
  58. mage_ai/server/frontend_dist/_next/static/chunks/6299-fcb702d0f3d3291b.js +1 -0
  59. mage_ai/server/frontend_dist/_next/static/chunks/6422-0cdd6e596dcd43b6.js +1 -0
  60. mage_ai/server/frontend_dist/_next/static/chunks/{6786-77c7e36678abb2c6.js → 6786-55e1bca3c897d5ee.js} +1 -1
  61. mage_ai/server/frontend_dist/_next/static/chunks/7496-7e4dd11e3f3b8e79.js +1 -0
  62. mage_ai/server/frontend_dist/_next/static/chunks/7722-76c724a66240561b.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/7815-8b68b0eb665fcd2d.js +1 -0
  64. mage_ai/server/frontend_dist/_next/static/chunks/8190-d38ed1133030797d.js +1 -0
  65. mage_ai/server/frontend_dist/_next/static/chunks/8952-9d6fa18fa9378989.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/9605-9332e1686c46da7d.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-9dae6fa5126cf001.js +1 -0
  68. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +1 -0
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-6d3d53624debede6.js +1 -0
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-2756fe6d9decae4a.js +1 -0
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +1 -0
  72. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-6815a3ece7dc1678.js +1 -0
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-7f790238fe70d9ab.js +1 -0
  74. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-33c7f2550add0719.js +1 -0
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-07e4a3a674e83578.js +1 -0
  76. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-b8b4bed1e8e50068.js +1 -0
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-54cb4936accdd2d9.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +1 -0
  79. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-d87d0c21758a2d7c.js +1 -0
  80. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-68e1b861ef4fc0d7.js +1 -0
  81. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-9fa0c4ce1c921a41.js +1 -0
  82. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-d5ef19ca1f9931de.js +1 -0
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js +1 -0
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-8872a6e00280f58c.js +1 -0
  85. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-484581ae34a1c596.js +1 -0
  86. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ce11db27e4af7869.js +1 -0
  87. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-624a2d7cbe6303b4.js +1 -0
  88. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-1169f4eecf752033.js +1 -0
  89. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-d2224a447987fa69.js → frontend_dist/_next/static/chunks/pages/settings/account/profile-c3ff06a12baa40a2.js} +1 -1
  90. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-60b4398d7ae00206.js +1 -0
  91. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-dd827816bf4a7908.js → frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-05b53444f0e7449b.js} +1 -1
  92. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-097aa0bef1e34cdb.js → frontend_dist/_next/static/chunks/pages/sign-in-a5e9561a6c0d2e38.js} +1 -1
  93. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/{[...slug]-78a07e7fe8973811.js → [...slug]-c21b269750441494.js} +1 -1
  94. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates-19df643f52679d5a.js → frontend_dist/_next/static/chunks/pages/templates-ce2a29d477a6ce94.js} +1 -1
  95. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-71bbb30dd9b57f80.js +1 -0
  96. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-1dc780d52fbd1573.js +1 -0
  97. mage_ai/server/frontend_dist/files.html +2 -2
  98. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  99. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  100. mage_ai/server/frontend_dist/index.html +2 -2
  101. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  102. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  103. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  104. mage_ai/server/frontend_dist/manage/users.html +2 -2
  105. mage_ai/server/frontend_dist/manage.html +2 -2
  106. mage_ai/server/frontend_dist/overview.html +2 -2
  107. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  108. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  109. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  110. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  111. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  112. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  113. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  114. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  115. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  116. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  117. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  118. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  119. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  120. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  121. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  122. mage_ai/server/frontend_dist/pipelines.html +2 -2
  123. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  124. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  125. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  126. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  127. mage_ai/server/frontend_dist/settings.html +2 -2
  128. mage_ai/server/frontend_dist/sign-in.html +11 -11
  129. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  130. mage_ai/server/frontend_dist/templates.html +2 -2
  131. mage_ai/server/frontend_dist/terminal.html +2 -2
  132. mage_ai/server/frontend_dist/test.html +3 -3
  133. mage_ai/server/frontend_dist/triggers.html +2 -2
  134. mage_ai/server/frontend_dist/version-control.html +2 -2
  135. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  136. mage_ai/server/frontend_dist_base_path_template/404.html.html +2 -2
  137. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1005-a2f0e3ee378ef02b.js +1 -0
  138. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1424-fca78f21a81a7183.js +1 -0
  139. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1484-87d4d4a698ac63dc.js +1 -0
  140. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2485-39885e5335888821.js +1 -0
  141. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2786-f71862671f66d948.js +1 -0
  142. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +1 -0
  143. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3881-131cf690e54c23a3.js +1 -0
  144. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/437-331193bd9b2fe777.js +1 -0
  145. mage_ai/server/{frontend_dist/_next/static/chunks/4822-045cc7cdd7c95163.js → frontend_dist_base_path_template/_next/static/chunks/4822-ee62acb1927c8150.js} +1 -1
  146. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/547-bd961ea93f3eb98b.js +1 -0
  147. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-fcb702d0f3d3291b.js +1 -0
  148. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6422-0cdd6e596dcd43b6.js +1 -0
  149. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{6786-77c7e36678abb2c6.js → 6786-55e1bca3c897d5ee.js} +1 -1
  150. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7496-7e4dd11e3f3b8e79.js +1 -0
  151. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7722-76c724a66240561b.js +1 -0
  152. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7815-8b68b0eb665fcd2d.js +1 -0
  153. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8190-d38ed1133030797d.js +1 -0
  154. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-9d6fa18fa9378989.js +1 -0
  155. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9605-9332e1686c46da7d.js +1 -0
  156. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-9dae6fa5126cf001.js +1 -0
  157. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +1 -0
  158. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-6d3d53624debede6.js +1 -0
  159. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-2756fe6d9decae4a.js +1 -0
  160. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +1 -0
  161. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-6815a3ece7dc1678.js +1 -0
  162. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-7f790238fe70d9ab.js +1 -0
  163. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-33c7f2550add0719.js +1 -0
  164. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-07e4a3a674e83578.js +1 -0
  165. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-b8b4bed1e8e50068.js +1 -0
  166. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-54cb4936accdd2d9.js +1 -0
  167. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +1 -0
  168. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-d87d0c21758a2d7c.js +1 -0
  169. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-68e1b861ef4fc0d7.js +1 -0
  170. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-9fa0c4ce1c921a41.js +1 -0
  171. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-d5ef19ca1f9931de.js +1 -0
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js +1 -0
  173. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-8872a6e00280f58c.js +1 -0
  174. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-484581ae34a1c596.js +1 -0
  175. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ce11db27e4af7869.js +1 -0
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-624a2d7cbe6303b4.js +1 -0
  177. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-1169f4eecf752033.js +1 -0
  178. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/account/profile-d2224a447987fa69.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-c3ff06a12baa40a2.js} +1 -1
  179. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-60b4398d7ae00206.js +1 -0
  180. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-dd827816bf4a7908.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-05b53444f0e7449b.js} +1 -1
  181. mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-097aa0bef1e34cdb.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-a5e9561a6c0d2e38.js} +1 -1
  182. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/{[...slug]-78a07e7fe8973811.js → [...slug]-c21b269750441494.js} +1 -1
  183. mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates-19df643f52679d5a.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates-ce2a29d477a6ce94.js} +1 -1
  184. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-71bbb30dd9b57f80.js +1 -0
  185. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-1dc780d52fbd1573.js +1 -0
  186. mage_ai/server/frontend_dist_base_path_template/_next/static/yJvL-3bfsNF3WCStZ10Dm/_buildManifest.js +1 -0
  187. mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
  188. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
  189. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
  190. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  191. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
  192. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
  193. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
  194. mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
  195. mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
  196. mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
  197. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
  198. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  199. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
  200. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  201. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
  202. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  203. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  204. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
  205. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
  206. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
  207. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
  208. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
  209. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  210. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
  211. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  212. mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
  213. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
  214. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
  215. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
  216. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
  217. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  218. mage_ai/server/frontend_dist_base_path_template/sign-in.html +11 -11
  219. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
  220. mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
  221. mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
  222. mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
  223. mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
  224. mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
  225. mage_ai/server/server.py +53 -27
  226. mage_ai/services/spark/spark.py +75 -2
  227. mage_ai/streaming/constants.py +1 -0
  228. mage_ai/streaming/sources/kafka.py +17 -9
  229. mage_ai/tests/data_preparation/models/custom_templates/__init__.py +0 -0
  230. mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +36 -0
  231. mage_ai/tests/data_preparation/models/test_block.py +48 -0
  232. mage_ai/tests/data_preparation/test_repo_manager.py +19 -1
  233. mage_ai/tests/server/test_server.py +20 -2
  234. mage_ai/tests/services/spark/__init__.py +0 -0
  235. mage_ai/tests/services/spark/test_spark.py +52 -0
  236. {mage_ai-0.9.12.dist-info → mage_ai-0.9.14.dist-info}/METADATA +1 -1
  237. {mage_ai-0.9.12.dist-info → mage_ai-0.9.14.dist-info}/RECORD +245 -233
  238. mage_ai/server/frontend_dist/_next/static/RdDEYzOW6lfmOEilKsz4V/_buildManifest.js +0 -1
  239. mage_ai/server/frontend_dist/_next/static/chunks/1005-2f8ef0e28c917767.js +0 -1
  240. mage_ai/server/frontend_dist/_next/static/chunks/1424-a2cd1bfc708a323b.js +0 -1
  241. mage_ai/server/frontend_dist/_next/static/chunks/1484-a07f74ae5c40141c.js +0 -1
  242. mage_ai/server/frontend_dist/_next/static/chunks/2485-b569baad92049d6b.js +0 -1
  243. mage_ai/server/frontend_dist/_next/static/chunks/2786-acce6ea0d9b4898e.js +0 -1
  244. mage_ai/server/frontend_dist/_next/static/chunks/3654-14ee3eacc42b118a.js +0 -1
  245. mage_ai/server/frontend_dist/_next/static/chunks/3881-0eb04f7f7a244347.js +0 -1
  246. mage_ai/server/frontend_dist/_next/static/chunks/437-d43ccff3a064a528.js +0 -1
  247. mage_ai/server/frontend_dist/_next/static/chunks/547-4ad2cdae967055b6.js +0 -1
  248. mage_ai/server/frontend_dist/_next/static/chunks/6299-cf188c1b7a1bc33c.js +0 -1
  249. mage_ai/server/frontend_dist/_next/static/chunks/7496-ab1be388ae09d362.js +0 -1
  250. mage_ai/server/frontend_dist/_next/static/chunks/7722-a74e6f977993e75e.js +0 -1
  251. mage_ai/server/frontend_dist/_next/static/chunks/7815-fbd99c8f259d9e8b.js +0 -1
  252. mage_ai/server/frontend_dist/_next/static/chunks/8952-98e54b14c1af492f.js +0 -1
  253. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-74805cf1296fd50f.js +0 -1
  254. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-bcdaa82adcca891d.js +0 -1
  255. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-abdbda772d94c386.js +0 -1
  256. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-01f8ef10e87ec236.js +0 -1
  257. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-950fbcb72961eb3c.js +0 -1
  258. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-c6fd44191c812edf.js +0 -1
  259. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-6e46ed84cf3f4e9d.js +0 -1
  260. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-1d52bba72442c53f.js +0 -1
  261. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-8c33956a28fb4fa8.js +0 -1
  262. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-b28d151c32c2a469.js +0 -1
  263. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1708e5576cd26d1.js +0 -1
  264. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-0f3468d52020dcbf.js +0 -1
  265. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-489d02937d5f4695.js +0 -1
  266. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-544475d8e841638f.js +0 -1
  267. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e117a99f334b6022.js +0 -1
  268. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-f1ef481c7beb8aef.js +0 -1
  269. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-ab52e3174c3dcf64.js +0 -1
  270. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-3e290f7d76c68b3f.js +0 -1
  271. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-1ac4dc91ec394c6d.js +0 -1
  272. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-4753de69f7e366c5.js +0 -1
  273. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-cf285c43759e9b2a.js +0 -1
  274. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3f86e7f1c8d63beb.js +0 -1
  275. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-b2354688508b0755.js +0 -1
  276. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-cacb24e3632cfdfc.js +0 -1
  277. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5a6e3a62fef551f1.js +0 -1
  278. mage_ai/server/frontend_dist_base_path_template/_next/static/4dbzHNz2XwS_s6Z0qsIGO/_buildManifest.js +0 -1
  279. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1005-2f8ef0e28c917767.js +0 -1
  280. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1424-a2cd1bfc708a323b.js +0 -1
  281. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1484-a07f74ae5c40141c.js +0 -1
  282. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2485-b569baad92049d6b.js +0 -1
  283. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2786-acce6ea0d9b4898e.js +0 -1
  284. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3654-14ee3eacc42b118a.js +0 -1
  285. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3881-0eb04f7f7a244347.js +0 -1
  286. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/437-d43ccff3a064a528.js +0 -1
  287. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/547-4ad2cdae967055b6.js +0 -1
  288. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-cf188c1b7a1bc33c.js +0 -1
  289. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7496-ab1be388ae09d362.js +0 -1
  290. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7722-a74e6f977993e75e.js +0 -1
  291. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7815-fbd99c8f259d9e8b.js +0 -1
  292. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-98e54b14c1af492f.js +0 -1
  293. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-74805cf1296fd50f.js +0 -1
  294. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-bcdaa82adcca891d.js +0 -1
  295. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-abdbda772d94c386.js +0 -1
  296. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-01f8ef10e87ec236.js +0 -1
  297. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-950fbcb72961eb3c.js +0 -1
  298. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-c6fd44191c812edf.js +0 -1
  299. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-6e46ed84cf3f4e9d.js +0 -1
  300. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-1d52bba72442c53f.js +0 -1
  301. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-8c33956a28fb4fa8.js +0 -1
  302. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-b28d151c32c2a469.js +0 -1
  303. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1708e5576cd26d1.js +0 -1
  304. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-0f3468d52020dcbf.js +0 -1
  305. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-489d02937d5f4695.js +0 -1
  306. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-544475d8e841638f.js +0 -1
  307. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e117a99f334b6022.js +0 -1
  308. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-f1ef481c7beb8aef.js +0 -1
  309. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-ab52e3174c3dcf64.js +0 -1
  310. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-3e290f7d76c68b3f.js +0 -1
  311. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-1ac4dc91ec394c6d.js +0 -1
  312. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-4753de69f7e366c5.js +0 -1
  313. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-cf285c43759e9b2a.js +0 -1
  314. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3f86e7f1c8d63beb.js +0 -1
  315. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-b2354688508b0755.js +0 -1
  316. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-cacb24e3632cfdfc.js +0 -1
  317. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5a6e3a62fef551f1.js +0 -1
  318. /mage_ai/server/frontend_dist/_next/static/{RdDEYzOW6lfmOEilKsz4V → CNjkRIWPaAu1yJUmIaX_q}/_middlewareManifest.js +0 -0
  319. /mage_ai/server/frontend_dist/_next/static/{RdDEYzOW6lfmOEilKsz4V → CNjkRIWPaAu1yJUmIaX_q}/_ssgManifest.js +0 -0
  320. /mage_ai/server/frontend_dist_base_path_template/_next/static/{4dbzHNz2XwS_s6Z0qsIGO → yJvL-3bfsNF3WCStZ10Dm}/_middlewareManifest.js +0 -0
  321. /mage_ai/server/frontend_dist_base_path_template/_next/static/{4dbzHNz2XwS_s6Z0qsIGO → yJvL-3bfsNF3WCStZ10Dm}/_ssgManifest.js +0 -0
  322. {mage_ai-0.9.12.dist-info → mage_ai-0.9.14.dist-info}/LICENSE +0 -0
  323. {mage_ai-0.9.12.dist-info → mage_ai-0.9.14.dist-info}/WHEEL +0 -0
  324. {mage_ai-0.9.12.dist-info → mage_ai-0.9.14.dist-info}/entry_points.txt +0 -0
  325. {mage_ai-0.9.12.dist-info → mage_ai-0.9.14.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7869],{48591:function(e,n,t){"use strict";var i=t(21831),r=t(75582),o=t(82684),u=t(37958);n.Z=function(e){var n=e.children,t=e.uuid,l=e.uuids,c=void 0===l?[]:l,s=(0,u.j)("apiReloads"),a=(0,r.Z)(s,1)[0],d=(0,i.Z)(c);t&&d.push(t);var f=d.map((function(e){return String(a[e])||"-"})).join("_");return o.cloneElement(n,{key:f})}},1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var i=t(82394),r=t(21831),o=t(82684),u=t(47999),l=t(49894),c=t(93461),s=t(57384),a=t(41424),d=t(72454),f=t(28598);function v(e,n){var t=e.children;return(0,f.jsx)(d.HS,{ref:n,children:t})}var p=o.forwardRef(v),h=t(32063),b=t(85019),m=t(82531),g=t(66166),j=t(3055),O=t(49125),y=t(91427),x=t(24141);function w(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 C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n,t=e.addProjectBreadcrumbToCustomBreadcrumbs,i=e.after,v=e.afterHidden,w=e.afterWidth,Z=e.afterWidthOverride,P=e.before,S=e.beforeWidth,k=e.breadcrumbs,D=e.children,M=e.errors,E=e.headerMenuItems,_=e.headerOffset,I=e.mainContainerHeader,R=e.navigationItems,T=e.setErrors,F=e.subheaderChildren,A=e.title,N=e.uuid,H=(0,x.i)().width,U="dashboard_after_width_".concat(N),W="dashboard_before_width_".concat(N),Y=(0,o.useRef)(null),V=(0,o.useState)(Z?w:(0,y.U2)(U,w)),z=V[0],L=V[1],B=(0,o.useState)(!1),K=B[0],X=B[1],G=(0,o.useState)(P?Math.max((0,y.U2)(W,S),13*O.iI):null),J=G[0],Q=G[1],q=(0,o.useState)(!1),$=q[0],ee=q[1],ne=(0,o.useState)(null)[1],te=m.ZP.projects.list({},{revalidateOnFocus:!1}).data,ie=null===te||void 0===te?void 0:te.projects,re={label:function(){var e;return null===ie||void 0===ie||null===(e=ie[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];k?(t&&oe.push(re),oe.push.apply(oe,(0,r.Z)(k))):(null===ie||void 0===ie?void 0:ie.length)>=1&&oe.push.apply(oe,[re,{bold:!0,label:function(){return A}}]),(0,o.useEffect)((function(){null===Y||void 0===Y||!Y.current||K||$||null===ne||void 0===ne||ne(Y.current.getBoundingClientRect().width)}),[K,z,$,J,Y,ne,H]),(0,o.useEffect)((function(){K||(0,y.t8)(U,z)}),[v,K,z,U]),(0,o.useEffect)((function(){$||(0,y.t8)(W,J)}),[$,J,W]);var ue=(0,g.Z)(w);return(0,o.useEffect)((function(){Z&&ue!==w&&L(w)}),[Z,w,ue]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.Z,{title:A}),(0,f.jsx)(a.Z,{breadcrumbs:oe,menuItems:E,project:null===ie||void 0===ie?void 0:ie[0],version:null===ie||void 0===ie||null===(n=ie[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===R||void 0===R?void 0:R.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:R,showMore:!0})}),(0,f.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(h.Z,{after:i,afterHeightOffset:j.Mz,afterHidden:v,afterMousedownActive:K,afterWidth:z,before:P,beforeHeightOffset:j.Mz,beforeMousedownActive:$,beforeWidth:d.k1+(P?J:0),headerOffset:_,hideAfterCompletely:!0,leftOffset:P?d.k1:null,mainContainerHeader:I,mainContainerRef:Y,setAfterMousedownActive:X,setAfterWidth:L,setBeforeMousedownActive:ee,setBeforeWidth:Q,children:[F&&(0,f.jsx)(p,{children:F}),D]})})]}),M&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===T||void 0===T?void 0:T(null)},children:(0,f.jsx)(l.Z,C(C({},M),{},{onClose:function(){return null===T||void 0===T?void 0:T(null)}}))})]})}},91207:function(e,n,t){"use strict";t.d(n,{Z:function(){return A}});var i=t(82394),r=t(75582),o=t(17717),u=t(82684),l=t(37958),c=t(83455),s=t(35490),a=t(86422),d=t(60328),f=t(38626),v=t(93461),p=t(67971),h=t(28598),b=f.default.div.withConfig({displayName:"ButtonGroup__ButtonGroupStyle",componentId:"sc-15vbmc8-0"})([""]),m=f.default.div.withConfig({displayName:"ButtonGroup__VerticalDivider",componentId:"sc-15vbmc8-1"})(["width:1px;"]),g=function(e){var n=e.children,t=e.divider,i=u.Children.toArray(n).length;return(0,h.jsx)(b,{children:(0,h.jsx)(p.ZP,{children:u.Children.map(n,(function(e,n){return e&&(0,h.jsxs)(v.Z,{children:[n>=1&&t&&(0,h.jsx)(m,{}),u.cloneElement(e,{borderRadiusLeft:i>=2&&0===n,borderRadiusRight:i>=2&&n===i-1,halfPaddingLeft:i>=2&&0!==n,halfPaddingRight:i>=2&&n!==i-1,noBorder:i>=2&&n>0&&n<i-1,noBorderRight:i>=2&&n!==i-1})]},"button-group-child-".concat(n))}))})})},j=t(57722),O=t(73828),y=t(11135),x=t(98781),w=t(86673),C=t(82531),Z=t(16115),P=t(94353),S=t(60701),k=t(55512),D=t(24224),M=t(32821),E=t(90211),_=t(96510),I=t(51504),R=t(41150);function T(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?T(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var A=function(e){var n=e.active,t=e.addNewBlock,f=e.disableRefreshWarning,v=e.fetchPipeline,b=e.fetchVariables,m=e.filePath,T=e.hideHeaderButtons,A=e.onContentChange,N=e.openSidekickView,H=e.pipeline,U=e.saveFile,W=e.selectedFilePath,Y=e.sendTerminalMessage,V=e.setDisableShortcuts,z=e.setErrors,L=e.setFilesTouched,B=e.setSelectedBlock,K=(0,l.j)("apiReloads"),X=(0,r.Z)(K,2)[1],G=(0,u.useState)(null),J=G[0],Q=G[1],q=(0,u.useState)(!1),$=q[0],ee=(q[1],(0,u.useRef)(null)),ne=(0,u.useMemo)((function(){return new s.Z}),[]),te=(0,u.useMemo)((function(){return{api_key:P.l,token:ne.decodedToken.token}}),[ne]),ie=C.ZP.statuses.list().data,re=(0,u.useMemo)((function(){var e,n;return null===ie||void 0===ie||null===(e=ie.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.repo_path}),[ie]),oe=C.ZP.file_contents.detail(m).data;(0,u.useEffect)((function(){null!==oe&&void 0!==oe&&oe.file_content&&Q(oe.file_content)}),[oe]);var ue=(0,u.useState)(null===J||void 0===J?void 0:J.content),le=ue[0],ce=ue[1],se=(0,u.useCallback)((function(e){ce(e),A&&(null===A||void 0===A||A(e))}),[A]),ae=(0,u.useState)(!1),de=ae[0],fe=ae[1];(0,u.useEffect)((function(){n&&V&&(null===V||void 0===V||V(!0))}),[n,V]),(0,u.useEffect)((function(){var e;W&&(null===ee||void 0===ee||null===(e=ee.current)||void 0===e||e.scrollIntoView())}),[W]);var ve=(0,c.Db)(C.ZP.file_contents.useUpdate((null===J||void 0===J?void 0:J.path)&&encodeURIComponent(null===J||void 0===J?void 0:J.path)),{onSuccess:function(e){return(0,_.wD)(e,{callback:function(){X((function(e){return F(F({},e),{},(0,i.Z)({},"FileVersions/".concat(null===J||void 0===J?void 0:J.path),Number(new Date)))}))},onErrorCallback:function(e,n){return null===z||void 0===z?void 0:z({errors:n,response:e})}})}}),pe=(0,r.Z)(ve,1)[0],he=(0,u.useCallback)((function(e,n){if(U)return U(e,n);pe({file_content:F(F({},n),{},{content:e})}).then((function(){decodeURIComponent(m).split(o.sep).pop()===O.dT.METADATA_YAML&&b&&(null===b||void 0===b||b())})),L((function(e){return F(F({},e),{},(0,i.Z)({},null===n||void 0===n?void 0:n.path,!1))})),fe(!1)}),[b,m,U,L,pe]),be=(0,u.useMemo)((function(){return(0,k.lU)()}),[]),me=(0,u.useMemo)((function(){var e,n,t,i;return null===(null===J||void 0===J||null===(e=J.path)||void 0===e?void 0:e.match(be))?O.Lu.TXT:null===J||void 0===J||null===(n=J.path)||void 0===n||null===(t=n.match(be))||void 0===t||null===(i=t[0])||void 0===i?void 0:i.split(".")[1]}),[be,J]),ge=(0,u.useMemo)((function(){if(null!==J&&void 0!==J&&J.path)return(0,h.jsx)(j.Z,{autoHeight:!0,language:O.nB[me],onChange:function(e){se(e),L((function(e){return F(F({},e),{},(0,i.Z)({},null===J||void 0===J?void 0:J.path,!0))})),fe(!0)},onSave:function(e){he(e,J)},selected:!0,textareaFocused:!0,value:(0,E.Pb)(null===J||void 0===J?void 0:J.content)?JSON.stringify(JSON.parse(null===J||void 0===J?void 0:J.content),null,2):null===J||void 0===J?void 0:J.content,width:"100%"})}),[J,me,he,se,L]),je=null!==H&&void 0!==H&&H.blocks?(0,D.sE)(null===H||void 0===H?void 0:H.blocks,(function(e){var n=e.type;return a.tf.DATA_EXPORTER===n})):null,Oe=(0,c.Db)(C.ZP.blocks.pipelines.useUpdate(null===H||void 0===H?void 0:H.uuid,null===je||void 0===je?void 0:je.uuid),{onSuccess:function(e){return(0,_.wD)(e,{callback:function(){null===v||void 0===v||v()}})}}),ye=(0,r.Z)(Oe,1)[0],xe=t&&H&&(me===O.Lu.PY||me===O.Lu.SQL||(me===O.Lu.YAML||me===O.Lu.R)&&(0,M.V3)(J,null===J||void 0===J?void 0:J.path))&&(0,k.ck)(J.path.split(o.sep))!==a.tf.SCRATCHPAD&&(0,M.lr)(J)&&(0,h.jsx)(d.Z,{onClick:function(){var e=(null===H||void 0===H?void 0:H.type)===x.qL.INTEGRATION,n=(0,k.TU)(J,re,H);t(n,(function(n){e&&je&&ye({block:F(F({},je),{},{upstream_blocks:[n.uuid]})}),null===B||void 0===B||B(n)}))},primary:!0,children:"Add to current pipeline"}),we=Y&&(0,h.jsx)(w.Z,{m:2,children:(0,h.jsx)(y.ZP,{disabled:!re,inline:!0,loading:$,onClick:function(){null===N||void 0===N||N(S.cH.TERMINAL),null===Y||void 0===Y||Y(JSON.stringify(F(F({},te),{},{command:["stdin","pip install -r ".concat(re,"/requirements.txt\r")]})))},title:re?"Pip install packages from your saved requirements.txt file (\u2318+S to save).":"Please use right panel terminal to install packages.",uuid:"FileEditor/InstallPackages",children:"Install packages"})}),Ce="FileEditor/".concat(null===J||void 0===J?void 0:J.path),Ze=(0,R.y)(),Pe=Ze.registerOnKeyDown,Se=Ze.unregisterOnKeyDown;return(0,u.useEffect)((function(){return function(){Se(Ce)}}),[Se,Ce]),Pe(Ce,(function(e,t){if(n&&!f)if((0,I.y)([Z.zX,Z.Um],t)||(0,I.y)([Z.PQ,Z.Um],t))e.preventDefault(),he(le,J);else if(de&&(0,I.y)([Z.zX,Z.hS],t)){e.preventDefault();var i="".concat(J.path," has changes that are unsaved. ")+"Click cancel and save your changes before reloading page.";"undefined"!==typeof location&&window.confirm(i)&&location.reload()}}),[n,le,f,J,he,de]),(0,h.jsxs)("div",{ref:ee,children:[!T&&(0,h.jsx)(w.Z,{p:2,children:(0,h.jsxs)(p.ZP,{justifyContent:"space-between",children:[(0,h.jsxs)(g,{children:[xe,(0,h.jsx)(d.Z,{disabled:!le,onClick:function(e){e.preventDefault(),he(le,J)},title:le?null:"No changes have been made to this file.",children:"Save file content"})]}),N&&(0,h.jsx)(g,{children:(0,h.jsx)(d.Z,{compact:!0,onClick:function(){N(S.cH.FILE_VERSIONS)},small:!0,title:"View previous changes to this file.",children:"Show versions"})})]})}),ge,m===O.dT.REQS_TXT&&we]})}},23351:function(e,n,t){"use strict";var i=t(82394),r=t(75582),o=t(17717),u=t(37958),l=t(82684),c=t(83455),s=t(60328),a=t(57722),d=t(73828),f=t(93461),v=t(67971),p=t(87372),h=t(86673),b=t(54283),m=t(87815),g=t(19711),j=t(82531),O=t(49125),y=t(55512),x=t(42305),w=t(90211),C=t(96510),Z=t(66653),P=t(24224),S=t(28598);function k(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 D(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.onActionCallback,t=e.selectedBlock,k=e.selectedFilePath,M=e.setErrors,E=e.width,_=(0,u.j)("apiReloads"),I=(0,r.Z)(_,2)[1],R=j.ZP.file_versions.files.list(k&&encodeURIComponent(k)),T=R.data,F=R.mutate,A=(0,l.useMemo)((function(){return(null===T||void 0===T?void 0:T.file_versions)||[]}),[T]),N=(0,l.useState)(null),H=N[0],U=N[1],W=(0,l.useMemo)((function(){return null===A||void 0===A?void 0:A[H]}),[H,A]),Y=j.ZP.file_contents.detail(W?encodeURIComponent(W.path):null).data,V=(0,l.useMemo)((function(){return null===Y||void 0===Y?void 0:Y.file_content}),[Y]),z=(0,l.useMemo)((function(){return(0,y.lU)()}),[]),L=(0,l.useMemo)((function(){var e,n,t;return null===k||void 0===k||null===(e=k.match(z))||void 0===e||null===(n=e[0])||void 0===n||null===(t=n.split("."))||void 0===t?void 0:t[1]}),[k,z]),B=(0,c.Db)(j.ZP.file_contents.useUpdate(k&&encodeURIComponent(k)),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(e){var t;k&&F();var r=null===e||void 0===e||null===(t=e.file_content)||void 0===t?void 0:t.path,u="FileEditor/".concat(r);if(r){var l=r.split(o.sep);if("pipelines"===l[0]){var c=l.slice(1,l.length-1).join(o.sep);u="PipelineDetail/".concat(c)}}I((function(e){return D(D({},e),{},(0,i.Z)({},u,Number(new Date)))})),U((function(e){return e+1})),null===n||void 0===n||n(e)},onErrorCallback:function(e,n){return M({errors:n,response:e})}})}}),K=(0,r.Z)(B,2),X=K[0],G=K[1].isLoading,J=(0,l.useMemo)((function(){var e=A.map((function(e){var n=e.name,t=e.path;return[(0,S.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,S.jsxs)(f.Z,{flex:1,children:[(0,S.jsx)(g.ZP,{default:!0,monospace:!0,children:(0,x.JX)(n,{withSeconds:!0})}),(0,S.jsx)(h.Z,{px:2*O.cd,children:(0,S.jsx)(g.ZP,{monospace:!0,children:n})})]}),W&&(null===W||void 0===W?void 0:W.path)===t&&(0,S.jsx)(s.Z,{compact:!0,loading:G,onClick:function(e){(0,Z.j)(e),X({file_content:{version:n}})},small:!0,children:"Replace with this version"})]},n)]}));if(W){var n=(0,S.jsx)(h.Z,{p:O.cd,children:(0,S.jsx)(b.Z,{},"spinner")});if(V&&(null===V||void 0===V?void 0:V.path)===(null===W||void 0===W?void 0:W.path)){var t=V.content,i=void 0===t?"":t;n=(0,S.jsx)(a.Z,{autoHeight:!0,language:d.nB[L],padding:!0,readOnly:!0,value:(0,w.Pb)(i)?JSON.stringify(JSON.parse(i),null,2):i,width:E})}e=(0,P.Hk)([n],H+1,e)}return e}),[V,L,A,G,W,H,X,E]);return(0,S.jsxs)("div",{style:{width:E},children:[(0,S.jsxs)(h.Z,{p:O.cd,children:[(0,S.jsx)(p.Z,{level:5,children:"File versions"}),(0,S.jsx)(g.ZP,{inline:!0,monospace:!0,children:k?decodeURIComponent(k):null===t||void 0===t?void 0:t.uuid})]}),(0,S.jsx)(m.Z,{buildRowProps:function(e){if(W&&H+1===e)return{renderCell:function(e){return e},renderRow:function(e){return e}}},columnFlex:[1],columns:[{uuid:"Version"}],isSelectedRow:function(e){var n;return(null===(n=A[e])||void 0===n?void 0:n.name)===(null===W||void 0===W?void 0:W.name)},onClickRow:function(e){W?e===H?U(null):e<H?U(e):e>H+1&&U(e-1):U(e)},rows:J})]})}},38488:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var i=t(82394),r=t(26304),o=t(82684),u=t(38626),l=t(16634),c=t(67971),s=t(10919),a=t(86673),d=t(19711),f=t(46261),v=t(23831),p=t(22341),h=t(28347),b=t(49125),m=t(33766),g=t(66653),j=t(28598);var O=function(e){var n=e.filePath,t=e.filesTouched,i=void 0===t?{}:t,r=e.isLast,u=e.onClickTab,O=e.onClickTabClose,y=e.renderTabTitle,x=e.savePipelineContent,w=e.selected,C=e.themeContext,Z=(0,o.useState)(!1),P=Z[0],S=Z[1];return(0,j.jsx)(c.ZP,{flexDirection:"column",fullHeight:!0,onClick:function(e){e.preventDefault(),w||(u?u(n):(null===x||void 0===x||x(),(0,m.u7)({file_path:encodeURIComponent(n)})))},onMouseEnter:function(){return S(!0)},onMouseLeave:function(){return S(!1)},children:(0,j.jsx)(h.Gb,{last:r,selected:w,children:(0,j.jsxs)(c.ZP,{alignItems:"center",fullHeight:!0,children:[(0,j.jsx)(f.Z,{appearAbove:!0,appearBefore:!0,label:n,size:null,widthFitContent:!0,children:(0,j.jsxs)(c.ZP,{alignItems:"center",fullHeight:!0,children:[!i[n]&&(0,j.jsx)(p.iU,{muted:!w,size:1.5*b.iI}),i[n]&&(0,j.jsx)(f.Z,{label:"Unsaved changes",size:null,widthFitContent:!0,children:(0,j.jsx)("div",{style:{padding:1},children:(0,j.jsx)(l.Z,{borderColor:(C||v.Z).borders.danger,size:1.25*b.iI})})}),(0,j.jsx)(a.Z,{mr:1}),(0,j.jsx)(d.ZP,{muted:!w,children:y?y(n):n})]})}),(0,j.jsx)(a.Z,{mr:2}),(0,j.jsx)(f.Z,{label:"Close",size:null,widthFitContent:!0,children:(0,j.jsxs)(s.Z,{autoHeight:!0,block:!0,noHoverUnderline:!0,noOutline:!0,onClick:function(e){(0,g.j)(e),null===O||void 0===O||O(n)},preventDefault:!0,children:[(P||w)&&(0,j.jsx)(p.x8,{muted:!w,size:1.25*b.iI}),!P&&!w&&(0,j.jsx)("div",{style:{width:1.25*b.iI}})]})})]})})})},y=t(24224),x=["filePaths","isSelectedFilePath","onClickTabClose","selectedFilePath"];function w(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 C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n=e.filePaths,t=e.isSelectedFilePath,i=e.onClickTabClose,l=e.selectedFilePath,s=(0,r.Z)(e,x),a=(0,o.useContext)(u.ThemeContext),d=(0,o.useMemo)((function(){return n.map((function(e){return decodeURIComponent(e)}))}),[n]),f=(0,o.useMemo)((function(){return null===d||void 0===d?void 0:d.length}),[d]);return(0,j.jsx)(c.ZP,{alignItems:"center",justifyContent:"flex-start",children:null===d||void 0===d?void 0:d.map((function(e,n){var r=t?t(e,l):l===encodeURIComponent(e);return(0,o.createElement)(O,C(C({},s),{},{filePath:e,isLast:n===f-1,key:e,onClickTabClose:function(e){if(i)i(e);else{var n=(0,y.Od)(d,(function(n){return n===e})).map((function(e){return encodeURIComponent(e)}));(0,m.u7)({file_path:n[n.length-1]||null,"file_paths[]":n},{pushHistory:!0})}},selected:r,themeContext:a}))}))})}},28347:function(e,n,t){"use strict";t.d(n,{Gb:function(){return f},fm:function(){return a},lO:function(){return s},rK:function(){return d},zn:function(){return c}});var i=t(38626),r=t(23831),o=t(82386),u=t(49125),l=t(37391),c=300,s=i.default.div.withConfig({displayName:"indexstyle__PipelineContainerStyle",componentId:"sc-1sv9513-0"})([".pipeline-detail-enter-active{opacity:1;transition:opacity ","ms linear;}.pipeline-detail-enter-done{opacity:0;transition:opacity ","ms linear;}"],c,c),a=i.default.div.withConfig({displayName:"indexstyle__OverlayStyle",componentId:"sc-1sv9513-1"})(["height:100vh;opacity:1;position:fixed;width:100vw;z-index:9999;",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")})),d=i.default.div.withConfig({displayName:"indexstyle__PipelineHeaderStyle",componentId:"sc-1sv9513-2"})(["height:","px;position:sticky;top:","px;width:100%;z-index:5;"," "," "," ",""],o.Wi,o.Wi,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom: 1px solid ").concat((e.theme.borders||r.Z.borders).medium,";\n ")}),(function(e){return e.relativePosition&&"\n position: relative;\n "}),(function(e){return e.secondary&&"\n height: ".concat(37,"px;\n top: ").concat(o.Wi,"px;\n overflow-x: auto;\n z-index: 3;\n ")}),(0,l.y$)()),f=i.default.div.withConfig({displayName:"indexstyle__FileTabStyle",componentId:"sc-1sv9513-3"})(["border-right:1px solid transparent;height:100%;padding:","px ","px;"," "," ",""],u.iI,u.cd*u.iI,(function(e){return"\n &:hover {\n cursor: default;\n\n p {\n color: ".concat((e.theme.content||r.Z.content).active," !important;\n cursor: default;\n }\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||r.Z.interactive).hoverBackground,";\n ")}),(function(e){return!e.selected&&!e.last&&"\n border-color: ".concat((e.theme.borders||r.Z.borders).light," !important;\n ")}))},55389:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Q}});var i=t(77837),r=t(38860),o=t.n(r),u=t(82394),l=t(75582),c=t(17717),s=t(82684),a=t(37958),d=t(83455),f=t(48591),v=t(1210),p=t(46299),h=t(91207),b=t(47999),m=t(67971),g=t(62084),j=t(19711),O=t(16115),y=t(64318),x=t(54405),w=t(41150),C=t(28598);var Z=function(e){var n=e.children,t=e.fileVersionsVisible,i=e.onSave,r=e.setFilesVersionsVisible,o=(0,s.useState)(null),u=o[0],l=o[1],c=(0,s.useRef)(null),a=(0,s.useRef)(null),d=(0,s.useMemo)((function(){return[{disabled:!i,keyTextGroups:[[(0,x.V5)()?O.RJ:O.hE,O.SS]],label:function(){return"Save"},onClick:function(){return i?i():null},uuid:"save"}]}),[i]),f=(0,s.useMemo)((function(){return[{label:function(){return t?"Hide versions":"Show versions"},onClick:function(){return r(!t)},uuid:"versions"}]}),[t,r]),v="FileHeaderMenu/index",p=(0,w.y)(),h=p.registerOnKeyDown,Z=p.unregisterOnKeyDown;return(0,s.useEffect)((function(){return function(){Z(v)}}),[Z,v]),h(v,(function(e,n){null!==u&&(n[O.QK]?l((function(e){return 0===e?2:e-1})):n[O.DY]&&l((function(e){return 2===e?0:e+1})))}),[u,l]),(0,C.jsx)(b.Z,{onClickOutside:function(){return l(null)},open:!0,style:{position:"relative"},children:(0,C.jsxs)(m.ZP,{children:[(0,C.jsxs)("div",{style:{position:"relative"},children:[(0,C.jsx)(y.u,{highlighted:0===u,onClick:function(){return l((function(e){return 0===e?null:0}))},onMouseEnter:function(){return l((function(e){return null!==e?0:null}))},ref:c,children:(0,C.jsx)(j.ZP,{children:"File"})}),(0,C.jsx)(g.Z,{items:d,onClickCallback:function(){return l(null)},open:0===u,parentRef:c,uuid:"FileHeaderMenu/file"})]}),(0,C.jsxs)("div",{style:{position:"relative"},children:[(0,C.jsx)(y.u,{highlighted:1===u,onClick:function(){return l((function(e){return 1===e?null:1}))},onMouseEnter:function(){return l((function(e){return null!==e?1:null}))},ref:a,children:(0,C.jsx)(j.ZP,{children:"Edit"})}),(0,C.jsx)(g.Z,{items:f,onClickCallback:function(){return l(null)},open:1===u,parentRef:a,uuid:"FileHeaderMenu/edit"})]}),n]})})},P=t(38488),S=t(23351),k=t(82531),D=t(38626),M=t(23831),E=t(82386),_=t(3055),I=t(37391),R=72-E.uX+_.Mz,T=D.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-11pty4f-0"})(["height:","px;top:","px;z-index:3;",""],72,_.Mz,(function(e){return"\n background-color: ".concat((e.theme.background||M.Z.background).codeArea,";\n ")})),F=D.default.div.withConfig({displayName:"indexstyle__MenuStyle",componentId:"sc-11pty4f-1"})(["height:","px;position:relative;z-index:1;",""],36,(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||M.Z.borders).medium,";\n ")})),A=D.default.div.withConfig({displayName:"indexstyle__TabsStyle",componentId:"sc-11pty4f-2"})([""," height:","px;overflow-x:auto;position:sticky;width:100%;z-index:0;"],(0,I.y$)(),36),N=t(91427),H=t(24224),U="open_files";function W(e){(0,N.t8)(U,e)}var Y=t(96510),V=t(51504),z=t(9728);function L(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 B(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function K(e){var n=e.split(c.sep);return n[n.length-1]}var X=function(){var e=(0,a.j)("apiReloads"),n=(0,l.Z)(e,2)[1],t=(0,s.useRef)(null),i=(0,s.useRef)(null),r=(0,s.useCallback)((function(e){i.current||(i.current={}),i.current=B(B({},i.current),e)}),[i]),o=(0,s.useState)([]),c=o[0],b=o[1],m=(0,s.useState)(null),g=m[0],j=m[1],y=(0,s.useState)({}),x=y[0],D=y[1],M=(0,s.useState)(!1),E=M[0],_=M[1],I=(0,s.useMemo)((function(){return c.reduce((function(e,n){var t=K(n);return e[t]||(e[t]=[]),e[t].push(n),e}),{})}),[c]),L=(0,s.useCallback)((function(e){W(e),b(e)}),[]),X=(0,s.useCallback)((function(e){L(function(e){var n=(0,N.U2)(U,[]);return n.includes(e)||n.push(e),W(n),n}(e))}),[L]),G=(0,s.useCallback)((function(e){r((0,u.Z)({},e,null)),D((function(n){return B(B({},n),{},(0,u.Z)({},e,!1))}));var n=function(e){var n=(0,N.U2)(U,[]),t=(0,H.Od)(n,(function(n){return n===e}));return W(t),t}(e);L(n),g===e&&(null===n||void 0===n?void 0:n.length)>=1&&j(n[n.length-1]),0===(null===n||void 0===n?void 0:n.length)&&j(null)}),[g,r,L]),J=(0,s.useCallback)((function(e,n){n||(X(e),j(e))}),[X]);(0,s.useEffect)((function(){var e=(0,N.U2)(U,[]);L(e),j((function(n){return!n&&(null===e||void 0===e?void 0:e.length)>=1?e[0]:n}))}),[L]);var Q=k.ZP.files.list(),q=Q.data,$=Q.mutate,ee=(0,s.useMemo)((function(){return(null===q||void 0===q?void 0:q.files)||[]}),[q]),ne=(0,z.VI)(null,{},[],{uuid:"FilesPage"}),te=(0,l.Z)(ne,1)[0],ie="Files/index",re=(0,w.y)(),oe=(re.disableGlobalKeyboardShortcuts,re.registerOnKeyDown),ue=re.unregisterOnKeyDown;(0,s.useEffect)((function(){return function(){ue(ie)}}),[ue,ie]),oe(ie,(function(e,n){var t=Object.entries(x).reduce((function(e,n){var t=(0,l.Z)(n,2),i=t[0];return t[1]?e.concat(i):e}),[]);if((0,V.y)([O.zX,O.hS],n)&&(null===t||void 0===t?void 0:t.length)>=1){e.preventDefault();var i="You have changes that are unsaved: ".concat(t.join(", "),". ")+"Click cancel and save your changes before reloading page.";"undefined"!==typeof location&&window.confirm(i)&&location.reload()}}),[x]);var le=(0,s.useMemo)((function(){return(0,C.jsx)(P.Z,{filePaths:c,filesTouched:x,isSelectedFilePath:function(e,n){return e===n},onClickTab:function(e){return j(e)},onClickTabClose:function(e){return G(e)},renderTabTitle:function(e){var n=K(e),t=I[n];return t&&(null===t||void 0===t?void 0:t.length)>=2?e:n},selectedFilePath:g})}),[x,c,I,G,g]),ce=(0,s.useMemo)((function(){return(0,C.jsx)(p.Z,{fetchFileTree:$,files:ee,onClickFile:function(e){return J(e)},onClickFolder:function(e){return J(e,!0)},onCreateFile:function(e){var n=e.path;return J(n)},ref:t,setErrors:te})}),[$,t,ee,J,te]),se=(0,d.Db)((function(e){return k.ZP.file_contents.useUpdate((null===e||void 0===e?void 0:e.path)&&encodeURIComponent(null===e||void 0===e?void 0:e.path))({file_content:e})}),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(e){var t=e.file_content;n((function(e){return B(B({},e),{},(0,u.Z)({},"FileVersions/".concat(null===t||void 0===t?void 0:t.path),Number(new Date)))})),r((0,u.Z)({},null===t||void 0===t?void 0:t.path,null))},onErrorCallback:function(e,n){return te({errors:n,response:e})}})}}),ae=(0,l.Z)(se,1)[0],de=(0,s.useCallback)((function(e,n){ae(B(B({},n),{},{content:e})),D((function(e){return B(B({},e),{},(0,u.Z)({},null===n||void 0===n?void 0:n.path,!1))}))}),[D,ae]),fe=(0,s.useMemo)((function(){return null===c||void 0===c?void 0:c.map((function(e){return(0,C.jsx)("div",{style:{display:g===e?null:"none"},children:(0,C.jsx)(f.Z,{uuid:"FileEditor/".concat(decodeURIComponent(e)),children:(0,C.jsx)(h.Z,{active:g===e,disableRefreshWarning:!0,filePath:e?encodeURIComponent(e):null,hideHeaderButtons:!0,onContentChange:function(n){return r((0,u.Z)({},e,n))},saveFile:de,selectedFilePath:g,setErrors:te,setFilesTouched:D})})},e)}))}),[c,de,g,r,te]),ve=(0,s.useMemo)((function(){return(0,C.jsx)(Z,{fileVersionsVisible:E,onSave:function(){var e,n;(null===i||void 0===i||null===(e=i.current)||void 0===e||null===(n=e[g])||void 0===n?void 0:n.length)>=1&&de(i.current[g],{path:g})},setFilesVersionsVisible:_})}),[i,E,de,g,_]);return(0,C.jsx)(v.Z,{after:(0,C.jsx)(f.Z,{uuid:"FileVersions/".concat(g?decodeURIComponent(g):""),children:(0,C.jsx)(S.Z,{selectedFilePath:g,setErrors:te})}),afterHidden:!(E&&g),before:ce,headerOffset:R,mainContainerHeader:(null===c||void 0===c?void 0:c.length)>=1&&(0,C.jsxs)(T,{children:[(0,C.jsx)(F,{children:ve}),(0,C.jsx)(A,{children:le})]}),title:"Files",uuid:"Files/index",children:fe})},G=t(41788);function J(){return(0,C.jsx)(X,{})}J.getInitialProps=(0,i.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var Q=(0,G.Z)(J)},37958:function(e,n,t){"use strict";t.d(n,{j:function(){return i}});var i=(0,t(44152).r)({apiReloads:{}}).useGlobalState},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return j},AY:function(){return O},BP:function(){return g},JX:function(){return m},OC:function(){return d},Pc:function(){return y},Ro:function(){return x},Tz:function(){return b},Y_:function(){return C},d$:function(){return h},jV:function(){return w},lJ:function(){return Z},n1:function(){return v},s8:function(){return s},vk:function(){return o},yD:function(){return a}});var i,r,o,u=t(82394),l=t(92083),c=t.n(l);!function(e){e.TODAY="today",e.WEEK="week",e.MONTH="month"}(o||(o={}));var s=(i={},(0,u.Z)(i,o.TODAY,"today"),(0,u.Z)(i,o.WEEK,"last 7 days"),(0,u.Z)(i,o.MONTH,"last 30 days"),i),a=(r={},(0,u.Z)(r,o.TODAY,0),(0,u.Z)(r,o.WEEK,6),(0,u.Z)(r,o.MONTH,29),r),d="YYYY-MM-DD HH:mm:ss",f="YYYY-MM-DD HH:mm",v="YYYY-MM-DD",p="MMMM D, YYYY";function h(e,n){var t=n.dayAgo,i=n.includeSeconds,r=n.utcFormat,o=c()(e),u=f;return r&&(o=o.utc()),t&&(o=o.subtract(1,"days")),i&&(u=d),o.format(u)}function b(e){var n=h((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function m(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?d:f)}function g(e,n,t){return c()(e).utc().hours(+n).minutes(+t).format()}function j(e){return c()(e).unix()}function O(e,n,t,i){var r="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return i?"".concat(r,":").concat(i):r}function y(e){var n=c().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function x(e,n){var t=c().utc(),i=c().utc();null!==n&&void 0!==n&&n.localTime&&(t=c()().local(),i=c()().local());var r=(t=t.subtract(e,"days")).format(p),o=i.format(p);return null!==n&&void 0!==n&&n.endDateOnly?o:"".concat(r," - ").concat(o)}function w(e,n){var t=null!==n&&void 0!==n&&n.localTime?c()().local():c().utc();if(e===o.WEEK){var i=a[o.WEEK];t=t.subtract(i,"days")}else if(e===o.MONTH){var r=a[o.MONTH];t=t.subtract(r,"days")}return null!==n&&void 0!==n&&n.isoString?t.startOf("day").toISOString():t.startOf("day").format(d)}function C(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90,n=new Date,t=[],i=0;i<e;i++)t.unshift(n.toISOString().split("T")[0]),n.setDate(n.getDate()-1);return t}function Z(e){return e.padStart(2,"0")}},54405:function(e,n,t){"use strict";var i;t.d(n,{V5:function(){return o}}),function(e){e.ANDROID="Android",e.CHROME_OS="ChromeOS",e.IOS="iOS",e.LINUX="Linux",e.MAC="macOS",e.WINDOWS="Windows"}(i||(i={}));var r=i;function o(){return function(){var e,n,t,i,o,u,l,c=r.MAC,s=null===(e=window)||void 0===e||null===(n=e.navigator)||void 0===n?void 0:n.userAgent,a=(null===(t=window)||void 0===t||null===(i=t.navigator)||void 0===i||null===(o=i.userAgentData)||void 0===o?void 0:o.platform)||(null===(u=window)||void 0===u||null===(l=u.navigator)||void 0===l?void 0:l.platform);return a?["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(a)?c=r.MAC:["Win32","Win64","Windows","WinCE"].includes(a)?c=r.WINDOWS:["iPhone","iPad","iPod"].includes(a)&&(c=r.IOS):s&&(s.includes("Macintosh")?c=r.MAC:s.includes("Windows")?c=r.WINDOWS:s.includes("Linux")&&s.includes("X11")?c=r.LINUX:/(iPhone|iPad)/.test(s)?c=r.IOS:s.includes("Android")&&s.includes("Mobi")?c=r.ANDROID:s.includes("CrOS")&&(c=r.CHROME_OS)),c}()===r.MAC}},99017:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/files",function(){return t(55389)}])}},function(e){e.O(0,[844,9902,8789,7011,5643,1424,1005,7815,6422,7722,3391,6299,9774,2888,179],(function(){return n=99017,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5882],{28551:function(t,n,r){"use strict";r.r(n);var u=r(77837),a=r(38860),o=r.n(a),e=r(82684),l=r(1210),i=r(7952),c=r(41788),d=r(86673),s=r(54283),f=r(82531),p=r(49125),b=r(28598);function v(t){var n=t.slug,r=f.ZP.global_data_products.detail(n).data,u=(0,e.useMemo)((function(){return null===r||void 0===r?void 0:r.global_data_product}),[r]),a=(0,e.useMemo)((function(){return(null===n||void 0===n?void 0:n.length)>=21?"".concat(null===n||void 0===n?void 0:n.slice(0,21),"..."):n}),[n]);return(0,b.jsxs)(l.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Global data products"},linkProps:{href:"/global-data-products"}},{bold:!0,label:function(){return a}}],title:n,uuid:"GlobalDataProductDetail/index",children:[!r&&(0,b.jsx)(d.Z,{p:p.cd,children:(0,b.jsx)(s.Z,{inverted:!0})}),u&&(0,b.jsx)(i.Z,{globalDataProduct:u})]})}v.getInitialProps=function(){var t=(0,u.Z)(o().mark((function t(n){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.query.slug,t.abrupt("return",{slug:null===r||void 0===r?void 0:r[0]});case 2:case"end":return t.stop()}}),t)})));return function(n){return t.apply(this,arguments)}}(),n.default=(0,c.Z)(v)},49794:function(t,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/global-data-products/[...slug]",function(){return r(28551)}])}},function(t){t.O(0,[844,9902,1424,1005,7815,7496,9605,9774,2888,179],(function(){return n=49794,t(t.s=n);var n}));var n=t.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3928],{65232:function(e,t,u){"use strict";var n=u(12691),o=u.n(n),l=u(82684),r=u(34376),a=u(30119),d=u(10919),i=u(86673),c=u(54283),s=u(87815),p=u(19711),b=u(82531),f=u(49125),h=u(66653),j=u(28598);t.Z=function(e){var t=e.globalDataProducts,u=e.onClickRow,n=(0,r.useRouter)(),v=b.ZP.global_data_products.list({},{},{pauseFetch:!!t}).data,_=(0,l.useMemo)((function(){return t||(null===v||void 0===v?void 0:v.global_data_products)||[]}),[v,t]);return v||t?v&&0===(null===_||void 0===_?void 0:_.length)?(0,j.jsx)(i.Z,{p:f.cd,children:(0,j.jsx)(p.ZP,{children:"There are currently no global data products registered."})}):(0,j.jsx)(s.Z,{columnFlex:[1,null,null],columns:[{uuid:"UUID"},{uuid:"Object type"},{uuid:"Object UUID"}],onClickRow:function(e){var t=null===_||void 0===_?void 0:_[e];t&&(u?null===u||void 0===u||u(t):n.push("/global-data-products/[...slug]","/global-data-products/".concat(null===t||void 0===t?void 0:t.uuid)))},rows:null===_||void 0===_?void 0:_.map((function(e){var t=e.object_type,u=e.object_uuid,l=e.uuid,r={as:null,href:null};return a.b.PIPELINE===t&&(r.as="/pipelines/".concat(u,"/edit"),r.href="/pipelines/[pipeline]/edit"),[(0,j.jsx)(p.ZP,{monospace:!0,children:l},"uuid"),(0,j.jsx)(p.ZP,{default:!0,monospace:!0,children:t},"objectType"),(0,j.jsx)(o(),{as:null===r||void 0===r?void 0:r.as,href:(null===r||void 0===r?void 0:r.href)||"",passHref:!0,children:(0,j.jsx)(d.Z,{default:!0,monospace:!0,onClick:function(e){(0,h.j)(e),n.push(r.href,r.as)},preventDefault:!0,children:u})},"objectUUID")]})),uuid:"global-data-products"}):(0,j.jsx)(i.Z,{p:f.cd,children:(0,j.jsx)(c.Z,{})})}},75107:function(e,t,u){"use strict";u.r(t);var n=u(77837),o=u(38860),l=u.n(o),r=u(82684),a=u(60328),d=u(1210),i=u(7952),c=u(65232),s=u(41788),p=u(86673),b=u(22341),f=u(49125),h=u(59e3),j=u(28598);function v(){var e=(0,r.useState)(!1),t=e[0],u=e[1],n=(0,r.useState)(null),o=n[0],l=n[1],s=(0,r.useState)(null),v=s[0],_=s[1],x=(0,h.iV)();return(0,r.useEffect)((function(){var e=x.new,t=x.object_type,n=x.object_uuid;t&&_(t),n&&l(n),u(!!e)}),[x]),(0,j.jsxs)(d.Z,{addProjectBreadcrumbToCustomBreadcrumbs:t,breadcrumbs:t?[{label:function(){return"Global data products"},linkProps:{href:"/global-data-products"}},{bold:!0,label:function(){return"New"}}]:null,title:"Global data products",uuid:"GlobalDataProducts/index",children:[(0,j.jsx)(p.Z,{p:f.cd,children:(0,j.jsx)(a.Z,{beforeIcon:(0,j.jsx)(b.mm,{size:2.5*f.iI}),inline:!0,linkProps:{as:"/global-data-products?new=1",href:"/global-data-products"},noHoverUnderline:!0,primary:!0,sameColorAsText:!0,children:"New global data product"})}),t&&(0,j.jsx)(i.Z,{globalDataProduct:{object_type:v||null,object_uuid:o},isNew:t}),!t&&(0,j.jsx)(c.Z,{})]})}v.getInitialProps=(0,n.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,s.Z)(v)},42692:function(e,t,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/global-data-products",function(){return u(75107)}])}},function(e){e.O(0,[844,9902,1424,1005,7815,7496,9605,9774,2888,179],(function(){return t=42692,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3512],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var r=t(82394),i=t(21831),o=t(82684),u=t(47999),l=t(49894),c=t(93461),a=t(57384),s=t(41424),d=t(72454),f=t(28598);function p(e,n){var t=e.children;return(0,f.jsx)(d.HS,{ref:n,children:t})}var v=o.forwardRef(p),h=t(32063),b=t(85019),g=t(82531),m=t(66166),S=t(3055),O=t(49125),j=t(91427),T=t(24141);function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var P=function(e){var n,t=e.addProjectBreadcrumbToCustomBreadcrumbs,r=e.after,p=e.afterHidden,y=e.afterWidth,P=e.afterWidthOverride,k=e.before,w=e.beforeWidth,Z=e.breadcrumbs,R=e.children,_=e.errors,L=e.headerMenuItems,x=e.headerOffset,M=e.mainContainerHeader,A=e.navigationItems,D=e.setErrors,C=e.subheaderChildren,N=e.title,I=e.uuid,B=(0,T.i)().width,Y="dashboard_after_width_".concat(I),U="dashboard_before_width_".concat(I),W=(0,o.useRef)(null),F=(0,o.useState)(P?y:(0,j.U2)(Y,y)),H=F[0],Q=F[1],X=(0,o.useState)(!1),V=X[0],G=X[1],J=(0,o.useState)(k?Math.max((0,j.U2)(U,w),13*O.iI):null),$=J[0],K=J[1],q=(0,o.useState)(!1),z=q[0],ee=q[1],ne=(0,o.useState)(null)[1],te=g.ZP.projects.list({},{revalidateOnFocus:!1}).data,re=null===te||void 0===te?void 0:te.projects,ie={label:function(){var e;return null===re||void 0===re||null===(e=re[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];Z?(t&&oe.push(ie),oe.push.apply(oe,(0,i.Z)(Z))):(null===re||void 0===re?void 0:re.length)>=1&&oe.push.apply(oe,[ie,{bold:!0,label:function(){return N}}]),(0,o.useEffect)((function(){null===W||void 0===W||!W.current||V||z||null===ne||void 0===ne||ne(W.current.getBoundingClientRect().width)}),[V,H,z,$,W,ne,B]),(0,o.useEffect)((function(){V||(0,j.t8)(Y,H)}),[p,V,H,Y]),(0,o.useEffect)((function(){z||(0,j.t8)(U,$)}),[z,$,U]);var ue=(0,m.Z)(y);return(0,o.useEffect)((function(){P&&ue!==y&&Q(y)}),[P,y,ue]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{title:N}),(0,f.jsx)(s.Z,{breadcrumbs:oe,menuItems:L,project:null===re||void 0===re?void 0:re[0],version:null===re||void 0===re||null===(n=re[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===A||void 0===A?void 0:A.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:A,showMore:!0})}),(0,f.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(h.Z,{after:r,afterHeightOffset:S.Mz,afterHidden:p,afterMousedownActive:V,afterWidth:H,before:k,beforeHeightOffset:S.Mz,beforeMousedownActive:z,beforeWidth:d.k1+(k?$:0),headerOffset:x,hideAfterCompletely:!0,leftOffset:k?d.k1:null,mainContainerHeader:M,mainContainerRef:W,setAfterMousedownActive:G,setAfterWidth:Q,setBeforeMousedownActive:ee,setBeforeWidth:K,children:[C&&(0,f.jsx)(v,{children:C}),R]})})]}),_&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===D||void 0===D?void 0:D(null)},children:(0,f.jsx)(l.Z,E(E({},_),{},{onClose:function(){return null===D||void 0===D?void 0:D(null)}}))})]})}},32821:function(e,n,t){"use strict";t.d(n,{IO:function(){return p},V3:function(){return d},a9:function(){return l},dq:function(){return f},jN:function(){return a},lr:function(){return s},u$:function(){return v}});var r=t(17717),i=t(86422),o=t(73828),u=t(90211);function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=n||(t?null:null===e||void 0===e?void 0:e.name);if(null!==e&&void 0!==e&&e.parent){var o=[e.parent.name];return(null===i||void 0===i?void 0:i.length)>=1&&o.push(i),l(e.parent,o.join(r.sep))}return i}function c(e){return null===e||void 0===e?void 0:e.split(r.sep).slice(1).join(r.sep)}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=l(e,n,t);return c(r)}function s(e){var n,t,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=l(e,c).split(r.sep);if(!s)return null;if(1===s.length)(s=null===e||void 0===e||null===(t=e.path)||void 0===t?void 0:t.split(r.sep))&&(n=s[0]===i.tf.CUSTOM?s[0]:(0,u.C5)(s[0]||""));else if(s[1]===i.tf.CUSTOM)n=s[1];else{var d=s[1];n=i.tf.DBT===d?d:(0,u.C5)(d||"")}if(!s||i.tf.DBT===n)return null;var f="";f=s.length>=3?s.slice(2,s.length).join(r.sep):s[s.length-1];var p=["\\.".concat(o.Lu.PY),"\\.".concat(o.Lu.R),"\\.".concat(o.Lu.SQL),"\\.".concat(o.Lu.YAML),"\\.".concat(o.Lu.YML)].join("|"),v=new RegExp("".concat(p,"$")),h=a?i.Q3:i.$W;if(h.concat(i.tf.DBT).includes(n)&&f.match(v)){var b=f.lastIndexOf("."),g=f.slice(b+1);return{language:o.nB[g],type:n,uuid:f.slice(0,b)}}}function d(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=l(e,n).split(r.sep);if(t[1]){var c=(0,u.C5)(t[n?0:1]);t[1]===i.tf.DBT&&(c=i.tf.DBT);var a=t[t.length-1],s=new RegExp(".".concat(o.Lu.YAML,"$")),d=new RegExp(".".concat(o.Lu.R,"$")),f=new RegExp(".".concat(o.Lu.SQL,"$")),p=new RegExp(".".concat(o.Lu.MD,"$"));if(a.match(s)&&i.VZ.includes(c))return{type:c,uuid:a.replace(s,"")};if(a.match(d)&&i.J8.includes(c))return{type:c,uuid:a.replace(d,"")};if(a.match(f)&&i.HX.includes(c)){var v=a.replace(/[.]/g,"_"),h=c===i.tf.DBT?t.slice(2,-1).join("_").concat("_".concat(v)):a.replace(f,"");return{type:c,uuid:h}}return a.match(p)&&c===i.tf.MARKDOWN?{type:c,uuid:a.replace(p,"")}:void 0}}function f(e){var n=e.name.split("."),t=n[n.length-1];return o.n6.includes(t)&&n.pop(),n.join("")}function p(e,n){var t=e.split("."),i=t[t.length-1];o.n6.includes(i)&&t.pop();var u=t.join("").split(r.sep),l=u.slice(1,u.length).join("");return n.find((function(e){return e.uuid===l}))}function v(e){var n=e||{},t=n.language,r=n.name,l=n.type;if(r&&t&&l){var c=l===i.tf.CUSTOM?l:"".concat(l,"s"),a=o.JD[t],s=(0,u.kE)(r);return"".concat(c,"/").concat(s,".").concat(a)}}},91207:function(e,n,t){"use strict";t.d(n,{Z:function(){return N}});var r=t(82394),i=t(75582),o=t(17717),u=t(82684),l=t(37958),c=t(83455),a=t(35490),s=t(86422),d=t(60328),f=t(38626),p=t(93461),v=t(67971),h=t(28598),b=f.default.div.withConfig({displayName:"ButtonGroup__ButtonGroupStyle",componentId:"sc-15vbmc8-0"})([""]),g=f.default.div.withConfig({displayName:"ButtonGroup__VerticalDivider",componentId:"sc-15vbmc8-1"})(["width:1px;"]),m=function(e){var n=e.children,t=e.divider,r=u.Children.toArray(n).length;return(0,h.jsx)(b,{children:(0,h.jsx)(v.ZP,{children:u.Children.map(n,(function(e,n){return e&&(0,h.jsxs)(p.Z,{children:[n>=1&&t&&(0,h.jsx)(g,{}),u.cloneElement(e,{borderRadiusLeft:r>=2&&0===n,borderRadiusRight:r>=2&&n===r-1,halfPaddingLeft:r>=2&&0!==n,halfPaddingRight:r>=2&&n!==r-1,noBorder:r>=2&&n>0&&n<r-1,noBorderRight:r>=2&&n!==r-1})]},"button-group-child-".concat(n))}))})})},S=t(57722),O=t(73828),j=t(11135),T=t(98781),y=t(86673),E=t(82531),P=t(16115),k=t(94353),w=t(60701),Z=t(55512),R=t(24224),_=t(32821),L=t(90211),x=t(96510),M=t(51504),A=t(41150);function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var N=function(e){var n=e.active,t=e.addNewBlock,f=e.disableRefreshWarning,p=e.fetchPipeline,b=e.fetchVariables,g=e.filePath,D=e.hideHeaderButtons,N=e.onContentChange,I=e.openSidekickView,B=e.pipeline,Y=e.saveFile,U=e.selectedFilePath,W=e.sendTerminalMessage,F=e.setDisableShortcuts,H=e.setErrors,Q=e.setFilesTouched,X=e.setSelectedBlock,V=(0,l.j)("apiReloads"),G=(0,i.Z)(V,2)[1],J=(0,u.useState)(null),$=J[0],K=J[1],q=(0,u.useState)(!1),z=q[0],ee=(q[1],(0,u.useRef)(null)),ne=(0,u.useMemo)((function(){return new a.Z}),[]),te=(0,u.useMemo)((function(){return{api_key:k.l,token:ne.decodedToken.token}}),[ne]),re=E.ZP.statuses.list().data,ie=(0,u.useMemo)((function(){var e,n;return null===re||void 0===re||null===(e=re.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.repo_path}),[re]),oe=E.ZP.file_contents.detail(g).data;(0,u.useEffect)((function(){null!==oe&&void 0!==oe&&oe.file_content&&K(oe.file_content)}),[oe]);var ue=(0,u.useState)(null===$||void 0===$?void 0:$.content),le=ue[0],ce=ue[1],ae=(0,u.useCallback)((function(e){ce(e),N&&(null===N||void 0===N||N(e))}),[N]),se=(0,u.useState)(!1),de=se[0],fe=se[1];(0,u.useEffect)((function(){n&&F&&(null===F||void 0===F||F(!0))}),[n,F]),(0,u.useEffect)((function(){var e;U&&(null===ee||void 0===ee||null===(e=ee.current)||void 0===e||e.scrollIntoView())}),[U]);var pe=(0,c.Db)(E.ZP.file_contents.useUpdate((null===$||void 0===$?void 0:$.path)&&encodeURIComponent(null===$||void 0===$?void 0:$.path)),{onSuccess:function(e){return(0,x.wD)(e,{callback:function(){G((function(e){return C(C({},e),{},(0,r.Z)({},"FileVersions/".concat(null===$||void 0===$?void 0:$.path),Number(new Date)))}))},onErrorCallback:function(e,n){return null===H||void 0===H?void 0:H({errors:n,response:e})}})}}),ve=(0,i.Z)(pe,1)[0],he=(0,u.useCallback)((function(e,n){if(Y)return Y(e,n);ve({file_content:C(C({},n),{},{content:e})}).then((function(){decodeURIComponent(g).split(o.sep).pop()===O.dT.METADATA_YAML&&b&&(null===b||void 0===b||b())})),Q((function(e){return C(C({},e),{},(0,r.Z)({},null===n||void 0===n?void 0:n.path,!1))})),fe(!1)}),[b,g,Y,Q,ve]),be=(0,u.useMemo)((function(){return(0,Z.lU)()}),[]),ge=(0,u.useMemo)((function(){var e,n,t,r;return null===(null===$||void 0===$||null===(e=$.path)||void 0===e?void 0:e.match(be))?O.Lu.TXT:null===$||void 0===$||null===(n=$.path)||void 0===n||null===(t=n.match(be))||void 0===t||null===(r=t[0])||void 0===r?void 0:r.split(".")[1]}),[be,$]),me=(0,u.useMemo)((function(){if(null!==$&&void 0!==$&&$.path)return(0,h.jsx)(S.Z,{autoHeight:!0,language:O.nB[ge],onChange:function(e){ae(e),Q((function(e){return C(C({},e),{},(0,r.Z)({},null===$||void 0===$?void 0:$.path,!0))})),fe(!0)},onSave:function(e){he(e,$)},selected:!0,textareaFocused:!0,value:(0,L.Pb)(null===$||void 0===$?void 0:$.content)?JSON.stringify(JSON.parse(null===$||void 0===$?void 0:$.content),null,2):null===$||void 0===$?void 0:$.content,width:"100%"})}),[$,ge,he,ae,Q]),Se=null!==B&&void 0!==B&&B.blocks?(0,R.sE)(null===B||void 0===B?void 0:B.blocks,(function(e){var n=e.type;return s.tf.DATA_EXPORTER===n})):null,Oe=(0,c.Db)(E.ZP.blocks.pipelines.useUpdate(null===B||void 0===B?void 0:B.uuid,null===Se||void 0===Se?void 0:Se.uuid),{onSuccess:function(e){return(0,x.wD)(e,{callback:function(){null===p||void 0===p||p()}})}}),je=(0,i.Z)(Oe,1)[0],Te=t&&B&&(ge===O.Lu.PY||ge===O.Lu.SQL||(ge===O.Lu.YAML||ge===O.Lu.R)&&(0,_.V3)($,null===$||void 0===$?void 0:$.path))&&(0,Z.ck)($.path.split(o.sep))!==s.tf.SCRATCHPAD&&(0,_.lr)($)&&(0,h.jsx)(d.Z,{onClick:function(){var e=(null===B||void 0===B?void 0:B.type)===T.qL.INTEGRATION,n=(0,Z.TU)($,ie,B);t(n,(function(n){e&&Se&&je({block:C(C({},Se),{},{upstream_blocks:[n.uuid]})}),null===X||void 0===X||X(n)}))},primary:!0,children:"Add to current pipeline"}),ye=W&&(0,h.jsx)(y.Z,{m:2,children:(0,h.jsx)(j.ZP,{disabled:!ie,inline:!0,loading:z,onClick:function(){null===I||void 0===I||I(w.cH.TERMINAL),null===W||void 0===W||W(JSON.stringify(C(C({},te),{},{command:["stdin","pip install -r ".concat(ie,"/requirements.txt\r")]})))},title:ie?"Pip install packages from your saved requirements.txt file (\u2318+S to save).":"Please use right panel terminal to install packages.",uuid:"FileEditor/InstallPackages",children:"Install packages"})}),Ee="FileEditor/".concat(null===$||void 0===$?void 0:$.path),Pe=(0,A.y)(),ke=Pe.registerOnKeyDown,we=Pe.unregisterOnKeyDown;return(0,u.useEffect)((function(){return function(){we(Ee)}}),[we,Ee]),ke(Ee,(function(e,t){if(n&&!f)if((0,M.y)([P.zX,P.Um],t)||(0,M.y)([P.PQ,P.Um],t))e.preventDefault(),he(le,$);else if(de&&(0,M.y)([P.zX,P.hS],t)){e.preventDefault();var r="".concat($.path," has changes that are unsaved. ")+"Click cancel and save your changes before reloading page.";"undefined"!==typeof location&&window.confirm(r)&&location.reload()}}),[n,le,f,$,he,de]),(0,h.jsxs)("div",{ref:ee,children:[!D&&(0,h.jsx)(y.Z,{p:2,children:(0,h.jsxs)(v.ZP,{justifyContent:"space-between",children:[(0,h.jsxs)(m,{children:[Te,(0,h.jsx)(d.Z,{disabled:!le,onClick:function(e){e.preventDefault(),he(le,$)},title:le?null:"No changes have been made to this file.",children:"Save file content"})]}),I&&(0,h.jsx)(m,{children:(0,h.jsx)(d.Z,{compact:!0,onClick:function(){I(w.cH.FILE_VERSIONS)},small:!0,title:"View previous changes to this file.",children:"Show versions"})})]})}),me,g===O.dT.REQS_TXT&&ye]})}},55512:function(e,n,t){"use strict";t.d(n,{TU:function(){return f},ck:function(){return s},lU:function(){return d}});var r=t(21831),i=t(17717),o=t(86422),u=t(98781),l=t(73828),c=t(24224),a=t(90211),s=function(e){var n=e[0];return n===o.tf.DBT||n===o.tf.CUSTOM?n:e[0].slice(0,-1)};function d(){return new RegExp(Object.keys(l.nB).map((function(e){return".(".concat(e,")$")})).join("|"))}function f(e,n,t){var f,p,v=null===e||void 0===e||null===(f=e.path.match(d())[0])||void 0===f?void 0:f.split(".")[1],h=t.type===u.qL.INTEGRATION,b=(0,c.sE)(null===t||void 0===t?void 0:t.blocks,(function(e){var n=e.type;return o.tf.DATA_EXPORTER===n})),g=e.path.replace(n,"").split(i.sep),m=e.path.split(i.sep)[0]===o.tf.DBT,S=(p=g)[0]===o.tf.DBT?p.slice(1).join(i.sep):function(e){return e.at(-1)}(p).split(".")[0];if(g.length>=3&&!m){var O=g.slice(1,g.length-1).join(i.sep);S="".concat(O,"/").concat(S)}var j=s(e.path.split(i.sep)),T={configuration:{file_path:m?S:null},language:l.nB[v],name:(0,a.wE)(S),type:j};if(j===o.tf.CUSTOM&&(T.color=o.Lq.TEAL),h){var y=(0,c.sE)(t.blocks,(function(e){var n=e.type;return o.tf.DATA_LOADER===n})),E=(0,c.sE)(t.blocks,(function(e){var n=e.type;return o.tf.TRANSFORMER===n})),P=[];E?P.push(E.uuid):null!==b&&void 0!==b&&b.upstream_blocks?P.push.apply(P,(0,r.Z)(b.upstream_blocks)):y&&P.push(y.uuid),T.upstream_blocks=P}return T}},84392:function(e,n,t){"use strict";t.d(n,{HF:function(){return u},L6:function(){return r}});var r,i=t(46336),o=t(22341);function u(e,n,t){var u=e.owner,l=(e.roles,[{Icon:o.Vz,id:r.WORKSPACES,isSelected:function(){return r.WORKSPACES===t},label:function(){return"Workspaces"},linkProps:{href:"/manage"}}]);return u&&l.push({Icon:o.NO,id:r.USERS,isSelected:function(){return r.USERS===t},label:function(){return"Users"},linkProps:{href:"/manage/users"}}),n==i.k.MAIN&&l.push({Icon:o.Zr,id:r.SETTINGS,isSelected:function(){return r.SETTINGS===t},label:function(){return"Settings"},linkProps:{href:"/manage/settings"}}),l}!function(e){e.WORKSPACES="workspaces",e.USERS="users",e.SETTINGS="settings"}(r||(r={}))},3849:function(e,n,t){"use strict";var r=t(82684),i=t(1210),o=t(82531),u=t(49125),l=t(84392),c=t(9736),a=t(28598);n.Z=function(e){var n=e.before,t=e.breadcrumbs,s=void 0===t?[]:t,d=e.children,f=e.errors,p=e.pageName,v=e.subheaderChildren,h=o.ZP.statuses.list().data,b=(0,r.useMemo)((function(){var e,n;return null===h||void 0===h||null===(e=h.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.project_type}),[h]),g=(0,c.PR)()||{};return(0,a.jsx)(i.Z,{before:n,beforeWidth:n?50*u.iI:0,breadcrumbs:s,errors:f,navigationItems:(0,l.HF)(g,b,p),subheaderChildren:v,title:"Workspaces",uuid:"workspaces/index",children:d})}},73828:function(e,n,t){"use strict";t.d(n,{JD:function(){return b},Lu:function(){return o},PF:function(){return p},d2:function(){return f},dT:function(){return u},n6:function(){return a},nB:function(){return h},oy:function(){return v},xF:function(){return d}});var r,i,o,u,l=t(82394),c=t(86422);!function(e){e.CSV="csv",e.JSON="json",e.MD="md",e.PY="py",e.R="r",e.SQL="sql",e.TXT="txt",e.YAML="yaml",e.YML="yml"}(o||(o={})),function(e){e.INIT_PY="__init__.py",e.METADATA_YAML="metadata.yaml",e.REQS_TXT="requirements.txt"}(u||(u={}));var a=[o.PY,o.SQL],s=[o.JSON,o.MD,o.PY,o.R,o.SQL,o.TXT,o.YAML,o.YML],d=new RegExp(s.map((function(e){return".".concat(e,"$")})).join("|")),f=new RegExp(s.map((function(e){return".".concat(e,"$")})).join("|")),p="charts",v="pipelines",h=(r={},(0,l.Z)(r,o.MD,c.t6.MARKDOWN),(0,l.Z)(r,o.JSON,o.JSON),(0,l.Z)(r,o.PY,c.t6.PYTHON),(0,l.Z)(r,o.R,c.t6.R),(0,l.Z)(r,o.SQL,c.t6.SQL),(0,l.Z)(r,o.TXT,"text"),(0,l.Z)(r,o.YAML,c.t6.YAML),(0,l.Z)(r,o.YML,c.t6.YAML),r),b=(i={},(0,l.Z)(i,c.t6.MARKDOWN,o.MD),(0,l.Z)(i,c.t6.PYTHON,o.PY),(0,l.Z)(i,c.t6.R,o.R),(0,l.Z)(i,c.t6.SQL,o.SQL),(0,l.Z)(i,c.t6.YAML,o.YAML),(0,l.Z)(i,"text",o.TXT),i)},46336:function(e,n,t){"use strict";var r,i;t.d(n,{d:function(){return r},k:function(){return i}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2"}(r||(r={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(i||(i={}))},3938:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(38860),o=t.n(i),u=t(82684),l=t(91207),c=t(41788),a=t(3849),s=t(84392),d=t(28598);function f(){var e=(0,u.useState)(null),n=e[0];e[1];return(0,d.jsx)(a.Z,{breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{bold:!0,label:function(){return"Settings"}}],errors:n,pageName:s.L6.SETTINGS,children:(0,d.jsx)(l.Z,{active:!0,filePath:"metadata.yaml",selectedFilePath:"metadata.yaml",setFilesTouched:function(){return null}})})}f.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,c.Z)(f)},37958:function(e,n,t){"use strict";t.d(n,{j:function(){return r}});var r=(0,t(44152).r)({apiReloads:{}}).useGlobalState},1116:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/settings",function(){return t(3938)}])}},function(e){e.O(0,[844,9902,8789,4398,1424,1005,6422,7722,9774,2888,179],(function(){return n=1116,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8867],{17717:function(e,n,t){var r=t(554);!function(){"use strict";var n={977:function(e){function n(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function t(e,n){for(var t,r="",i=0,o=-1,c=0,a=0;a<=e.length;++a){if(a<e.length)t=e.charCodeAt(a);else{if(47===t)break;t=47}if(47===t){if(o===a-1||1===c);else if(o!==a-1&&2===c){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){-1===s?(r="",i=0):i=(r=r.slice(0,s)).length-1-r.lastIndexOf("/"),o=a,c=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=a,c=0;continue}n&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),i=a-o-1;o=a,c=0}else 46===t&&-1!==c?++c:c=-1}return r}var i={resolve:function(){for(var e,i="",o=!1,c=arguments.length-1;c>=-1&&!o;c--){var a;c>=0?a=arguments[c]:(void 0===e&&(e=r.cwd()),a=e),n(a),0!==a.length&&(i=a+"/"+i,o=47===a.charCodeAt(0))}return i=t(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(n(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=t(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];n(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var o=e.length,c=o-r,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var s=t.length-a,l=c<s?c:s,u=-1,d=0;d<=l;++d){if(d===l){if(s>l){if(47===t.charCodeAt(a+d))return t.slice(a+d+1);if(0===d)return t.slice(a+d)}else c>l&&(47===e.charCodeAt(r+d)?u=d:0===d&&(u=0));break}var f=e.charCodeAt(r+d);if(f!==t.charCodeAt(a+d))break;47===f&&(u=d)}var h="";for(d=r+u+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+t.slice(a+u):(a+=u,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,i=-1,o=!0,c=e.length-1;c>=1;--c)if(47===(t=e.charCodeAt(c))){if(!o){i=c;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');n(e);var r,i=0,o=-1,c=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,s=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!c){i=r+1;break}}else-1===s&&(c=!1,s=r+1),a>=0&&(l===t.charCodeAt(a)?-1===--a&&(o=r):(a=-1,o=s))}return i===o?o=s:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!c){i=r+1;break}}else-1===o&&(c=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){n(e);for(var t=-1,r=0,i=-1,o=!0,c=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===i&&(o=!1,i=a+1),46===s?-1===t?t=a:1!==c&&(c=1):-1!==t&&(c=-1);else if(!o){r=a+1;break}}return-1===t||-1===i||0===c||1===c&&t===i-1&&t===r+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,n){var t=n.dir||n.root,r=n.base||(n.name||"")+(n.ext||"");return t?t===n.root?t+r:t+e+r:r}("/",e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,i=e.charCodeAt(0),o=47===i;o?(t.root="/",r=1):r=0;for(var c=-1,a=0,s=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===s&&(l=!1,s=u+1),46===i?-1===c?c=u:1!==d&&(d=1):-1!==c&&(d=-1);else if(!l){a=u+1;break}return-1===c||-1===s||0===d||1===d&&c===s-1&&c===a+1?-1!==s&&(t.base=t.name=0===a&&o?e.slice(1,s):e.slice(a,s)):(0===a&&o?(t.name=e.slice(1,c),t.base=e.slice(1,s)):(t.name=e.slice(a,c),t.base=e.slice(a,s)),t.ext=e.slice(c,s)),a>0?t.dir=e.slice(0,a-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},t={};function i(e){var r=t[e];if(void 0!==r)return r.exports;var o=t[e]={exports:{}},c=!0;try{n[e](o,o.exports,i),c=!1}finally{c&&delete t[e]}return o.exports}i.ab="//";var o=i(977);e.exports=o}()},59739:function(e,n,t){"use strict";var r=t(56669);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,n,t,i,o,c){if(c!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:o,resetWarningCache:i};return t.PropTypes=t,t}},47329:function(e,n,t){e.exports=t(59739)()},56669:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),a=t(49894),s=t(93461),l=t(57384),u=t(41424),d=t(72454),f=t(28598);function h(e,n){var t=e.children;return(0,f.jsx)(d.HS,{ref:n,children:t})}var p=o.forwardRef(h),m=t(32063),g=t(85019),b=t(82531),v=t(66166),x=t(3055),y=t(49125),j=t(91427),w=t(24141);function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var O=function(e){var n,t=e.addProjectBreadcrumbToCustomBreadcrumbs,r=e.after,h=e.afterHidden,k=e.afterWidth,O=e.afterWidthOverride,_=e.before,Z=e.beforeWidth,S=e.breadcrumbs,P=e.children,I=e.errors,N=e.headerMenuItems,E=e.headerOffset,A=e.mainContainerHeader,H=e.navigationItems,T=e.setErrors,z=e.subheaderChildren,D=e.title,R=e.uuid,W=(0,w.i)().width,M="dashboard_after_width_".concat(R),F="dashboard_before_width_".concat(R),B=(0,o.useRef)(null),L=(0,o.useState)(O?k:(0,j.U2)(M,k)),U=L[0],q=L[1],G=(0,o.useState)(!1),K=G[0],V=G[1],Y=(0,o.useState)(_?Math.max((0,j.U2)(F,Z),13*y.iI):null),X=Y[0],J=Y[1],Q=(0,o.useState)(!1),$=Q[0],ee=Q[1],ne=(0,o.useState)(null)[1],te=b.ZP.projects.list({},{revalidateOnFocus:!1}).data,re=null===te||void 0===te?void 0:te.projects,ie={label:function(){var e;return null===re||void 0===re||null===(e=re[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];S?(t&&oe.push(ie),oe.push.apply(oe,(0,i.Z)(S))):(null===re||void 0===re?void 0:re.length)>=1&&oe.push.apply(oe,[ie,{bold:!0,label:function(){return D}}]),(0,o.useEffect)((function(){null===B||void 0===B||!B.current||K||$||null===ne||void 0===ne||ne(B.current.getBoundingClientRect().width)}),[K,U,$,X,B,ne,W]),(0,o.useEffect)((function(){K||(0,j.t8)(M,U)}),[h,K,U,M]),(0,o.useEffect)((function(){$||(0,j.t8)(F,X)}),[$,X,F]);var ce=(0,v.Z)(k);return(0,o.useEffect)((function(){O&&ce!==k&&q(k)}),[O,k,ce]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(l.Z,{title:D}),(0,f.jsx)(u.Z,{breadcrumbs:oe,menuItems:N,project:null===re||void 0===re?void 0:re[0],version:null===re||void 0===re||null===(n=re[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===H||void 0===H?void 0:H.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(g.Z,{navigationItems:H,showMore:!0})}),(0,f.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(m.Z,{after:r,afterHeightOffset:x.Mz,afterHidden:h,afterMousedownActive:K,afterWidth:U,before:_,beforeHeightOffset:x.Mz,beforeMousedownActive:$,beforeWidth:d.k1+(_?X:0),headerOffset:E,hideAfterCompletely:!0,leftOffset:_?d.k1:null,mainContainerHeader:A,mainContainerRef:B,setAfterMousedownActive:V,setAfterWidth:q,setBeforeMousedownActive:ee,setBeforeWidth:J,children:[z&&(0,f.jsx)(p,{children:z}),P]})})]}),I&&(0,f.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===T||void 0===T?void 0:T(null)},children:(0,f.jsx)(a.Z,C(C({},I),{},{onClose:function(){return null===T||void 0===T?void 0:T(null)}}))})]})}},85307:function(e,n,t){"use strict";t.d(n,{$W:function(){return l},cl:function(){return u},cv:function(){return d},dE:function(){return s}});var r=t(38626),i=t(23831),o=t(73942),c=t(49125),a=t(37391),s=r.default.div.withConfig({displayName:"indexstyle__SectionStyle",componentId:"sc-7a1uhf-0"})(["border-radius:","px;padding:","px;",""],o.n_,c.cd*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).popup,";\n ")})),l=r.default.div.withConfig({displayName:"indexstyle__CodeEditorStyle",componentId:"sc-7a1uhf-1"})(["padding-top:","px;",""],c.cd*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).codeTextarea,";\n ")})),u=r.default.div.withConfig({displayName:"indexstyle__TableContainerStyle",componentId:"sc-7a1uhf-2"})(["overflow:auto;max-height:90vh;width:100%;"," "," "," "," ",""],a.w5,(function(e){return e.hideHorizontalScrollbar&&"\n overflow-x: hidden;\n "}),(function(e){return e.width&&"\n width: ".concat(e.width,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,";\n ")}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")})),d=r.default.div.withConfig({displayName:"indexstyle__HeaderRowStyle",componentId:"sc-7a1uhf-3"})(["padding:","px;"," "," ",""],2*c.iI,(function(e){return"\n background-color: ".concat((e.theme||i.Z).interactive.defaultBackground,";\n border-bottom: ").concat(o.YF,"px ").concat(o.M8," ").concat((e.theme||i.Z).borders.medium,";\n ")}),(function(e){return e.padding&&"\n padding: ".concat(e.padding,"px;\n ")}),(function(e){return e.rounded&&"\n border-top-left-radius: ".concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n ")}))},65597:function(e,n,t){"use strict";t.d(n,{f:function(){return a}});var r=t(38626),i=t(23831),o=t(49125),c=t(73942),a=r.default.div.withConfig({displayName:"Tablestyle__PopupContainerStyle",componentId:"sc-8ammqd-0"})(["position:absolute;max-height:","px;z-index:10;border-radius:","px;padding:","px;"," "," "," ",""],58*o.iI,c.TR,2*o.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||i.Z.shadow).popup,";\n background-color: ").concat((e.theme.interactive||i.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 ")}))},84392:function(e,n,t){"use strict";t.d(n,{HF:function(){return c},L6:function(){return r}});var r,i=t(46336),o=t(22341);function c(e,n,t){var c=e.owner,a=(e.roles,[{Icon:o.Vz,id:r.WORKSPACES,isSelected:function(){return r.WORKSPACES===t},label:function(){return"Workspaces"},linkProps:{href:"/manage"}}]);return c&&a.push({Icon:o.NO,id:r.USERS,isSelected:function(){return r.USERS===t},label:function(){return"Users"},linkProps:{href:"/manage/users"}}),n==i.k.MAIN&&a.push({Icon:o.Zr,id:r.SETTINGS,isSelected:function(){return r.SETTINGS===t},label:function(){return"Settings"},linkProps:{href:"/manage/settings"}}),a}!function(e){e.WORKSPACES="workspaces",e.USERS="users",e.SETTINGS="settings"}(r||(r={}))},3849:function(e,n,t){"use strict";var r=t(82684),i=t(1210),o=t(82531),c=t(49125),a=t(84392),s=t(9736),l=t(28598);n.Z=function(e){var n=e.before,t=e.breadcrumbs,u=void 0===t?[]:t,d=e.children,f=e.errors,h=e.pageName,p=e.subheaderChildren,m=o.ZP.statuses.list().data,g=(0,r.useMemo)((function(){var e,n;return null===m||void 0===m||null===(e=m.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.project_type}),[m]),b=(0,s.PR)()||{};return(0,l.jsx)(i.Z,{before:n,beforeWidth:n?50*c.iI:0,breadcrumbs:u,errors:f,navigationItems:(0,a.HF)(b,g,h),subheaderChildren:p,title:"Workspaces",uuid:"workspaces/index",children:d})}},46336:function(e,n,t){"use strict";var r,i;t.d(n,{d:function(){return r},k:function(){return i}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2"}(r||(r={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(i||(i={}))},18776:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var r=t(38626),i=t(23831),o=t(73942),c=r.default.div.withConfig({displayName:"indexstyle__PanelStyle",componentId:"sc-1rfr5wd-0"})(["border-radius:","px;"," ",""],o.n_,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).panel,";\n ")}),(function(e){return e.fullWidth&&"\n width: 100%;\n "})),a=t(28598);var s=function(e){var n=e.children,t=e.fullWidth,r=void 0===t||t;return(0,a.jsx)(c,{fullWidth:r,children:n})}},87372:function(e,n,t){"use strict";var r,i,o,c,a,s,l,u,d=t(82394),f=t(26304),h=t(26653),p=t(38626),m=t(33591),g=t(23831),b=t(2005),v=t(31012),x=t(19711),y=t(49125),j=t(86673),w=t(28598),k=["children","condensed","inline","level","marketing","spacingBelow"];function C(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?C(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=(0,p.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],x.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||g.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(b.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(b.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(b.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),Z=p.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||g.Z.content).active,";\n ")})),S=p.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,m.media.md(r||(r=(0,h.Z)(["\n ","\n "])),v.aQ),m.media.lg(i||(i=(0,h.Z)(["\n ","\n "])),v.aQ),m.media.xl(o||(o=(0,h.Z)(["\n ","\n "])),v.aQ)),P=p.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,v.MJ),I=p.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,m.media.xs(c||(c=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.sm(a||(a=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.md(s||(s=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.lg(l||(l=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.xl(u||(u=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI)),N=p.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,v.BL),E=p.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),A=p.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),H=p.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),T=p.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(v.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(v.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),z=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,c=e.marketing,a=e.spacingBelow,s=(0,f.Z)(e,k);i?n=T:0===Number(o)?n=S:1===Number(o)?n=c?I:P:2===Number(o)?n=N:3===Number(o)?n=E:4===Number(o)?n=A:5===Number(o)&&(n=H);var l=(0,w.jsxs)(n,O(O({},s),{},{level:o,children:[a&&(0,w.jsx)(j.Z,{mb:r?2:3,children:t}),!a&&t]}));return i?l:(0,w.jsx)(Z,{children:l})};z.defaultProps={level:3,weightStyle:6},n.Z=z},27664:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Y}});var r,i=t(77837),o=t(75582),c=t(38860),a=t.n(c),s=t(82684),l=t(83455),u=t(60328),d=t(47999),f=t(82394),h=t(57722),p=t(67971),m=t(87372),g=t(11135),b=t(18776),v=t(55378),x=t(86673),y=t(19711),j=t(82944),w=t(70902),k=t(82531),C=["ReadWriteOnce","ReadWriteMany","ReadOnlyMany"],O=[{label:"Workspace name",required:!0,uuid:"name"}],_=[{label:"Service account name",uuid:"service_account_name"},{label:"Ingress name",labelDescription:"If you want to add the workspace to an existing ingress, enter the name of the ingress here. Otherwise, the workspace can be accessed through the service.",uuid:"ingress_name"},{label:"Storage class name",labelDescription:"Volume claim parameters",uuid:"storage_class_name"},{label:"Storage request size (in GB)",type:"number",uuid:"storage_request_size"}],Z=t(86422);!function(e){e.K8S="k8s",e.ECS="ecs",e.CLOUD_RUN="cloud_run",e.EMR="emr"}(r||(r={}));var S=t(73899),P=t(85307),I=t(96510),N=t(90211),E=t(28598);function A(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function H(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?A(Object(t),!0).forEach((function(n){(0,f.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):A(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var T=function(e){var n=e.clusterType,t=e.onCancel,i=e.onCreate,c=(0,s.useState)(),a=c[0],u=c[1],d=(0,s.useState)(),A=d[0],T=d[1],z=(0,s.useState)(null),D=z[0],R=z[1],W=(0,l.Db)(k.ZP.workspaces.useCreate(),{onSuccess:function(e){return(0,I.wD)(e,{callback:function(e){e.error_message?u(e.error_message):i()},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;u(r),console.log(t,r)}})}}),M=(0,o.Z)(W,2),F=M[0],B=M[1].isLoading,L=(0,s.useMemo)((function(){return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(m.Z,{level:5,children:"Kubernetes settings (optional)"}),_.map((function(e){var n=e.autoComplete,t=e.disabled,r=e.label,i=e.labelDescription,o=e.required,c=e.type,a=e.uuid;return(0,E.jsxs)(x.Z,{mt:1,children:[i&&(0,E.jsx)(x.Z,{mb:1,children:(0,E.jsx)(y.ZP,{small:!0,children:i})}),(0,E.jsx)(j.Z,{autoComplete:n,disabled:t,label:r,onChange:function(e){R((function(n){return H(H({},n),{},(0,f.Z)({},a,e.target.value))}))},primary:!0,required:o,setContentOnMount:!0,type:c,value:(null===D||void 0===D?void 0:D[a])||""})]},a)})),(0,E.jsx)(x.Z,{mt:1,children:(0,E.jsx)(v.Z,{label:"Access mode",onChange:function(e){e.preventDefault(),R((function(n){return H(H({},n),{},{storage_access_mode:e.target.value})}))},placeholder:"Access mode",value:null===D||void 0===D?void 0:D.storage_access_mode,children:C.map((function(e){return(0,E.jsx)("option",{value:e,children:e},e)}))})}),(0,E.jsx)(x.Z,{mt:2,children:(0,E.jsxs)(p.ZP,{alignItems:"center",children:[(0,E.jsx)(y.ZP,{default:!0,monospace:!0,small:!0,children:"Configure container"}),(0,E.jsx)(x.Z,{ml:1}),(0,E.jsx)(w.Z,{checked:A,onCheck:function(){return T((function(e){return!e}))}})]})}),A&&(0,E.jsx)(x.Z,{mt:1,children:(0,E.jsx)(P.$W,{children:(0,E.jsx)(h.Z,{autoHeight:!0,fontSize:12,language:Z.t6.YAML,onChange:function(e){R((function(n){return H(H({},n),{},{container_config:e})}))},tabSize:2,value:null===D||void 0===D?void 0:D.container_config,width:"100%"})})})]})}),[A,D]);return(0,E.jsx)(b.Z,{children:(0,E.jsx)("div",{style:{width:"500px"},children:(0,E.jsxs)(x.Z,{p:2,children:[(0,E.jsx)(p.ZP,{justifyContent:"center",children:(0,E.jsx)(m.Z,{level:4,children:"Create new workspace"})}),(0,E.jsxs)("form",{children:[O.map((function(e){var n=e.autoComplete,t=e.disabled,r=e.label,i=e.required,o=e.type,c=e.uuid;return(0,E.jsx)(x.Z,{mt:2,children:(0,E.jsx)(j.Z,{autoComplete:n,disabled:t,label:r,onChange:function(e){R((function(n){return H(H({},n),{},(0,f.Z)({},c,e.target.value))}))},primary:!0,required:i,setContentOnMount:!0,type:o,value:(null===D||void 0===D?void 0:D[c])||""})},c)})),n===r.K8S&&(0,E.jsx)(x.Z,{mt:2,children:L})]}),B&&(0,E.jsx)(x.Z,{mt:1,children:(0,E.jsx)(y.ZP,{small:!0,warning:!0,children:"This may take up to a few minutes... Once the service is created, it may take another 5-10 minutes for the service to be accessible."})}),!B&&a&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(x.Z,{mt:1,children:(0,E.jsx)(y.ZP,{danger:!0,small:!0,children:"Failed to create instance, see error below."})}),(0,E.jsx)(x.Z,{mt:1,children:(0,E.jsx)(y.ZP,{danger:!0,small:!0,children:a})})]}),(0,E.jsx)(x.Z,{my:2,children:(0,E.jsxs)(p.ZP,{children:[(0,E.jsx)(g.ZP,{background:S.a$,bold:!0,inline:!0,loading:B,onClick:function(){var e=D||{},t=e.name,r=e.container_config;if(t){var i=H({},D);i.name=function(e){return"ecs"===n?(0,N.We)(e,"_"):(0,N.We)(e,"-")}(t),i.container_config=A&&r,F({workspace:H(H({},i),{},{cluster_type:n})})}else u("Please enter a valid name!")},uuid:"workspaces/create",children:"Create"}),(0,E.jsx)(x.Z,{ml:1}),(0,E.jsx)(g.ZP,{bold:!0,inline:!0,onClick:t,uuid:"workspaces/cancel",children:"Cancel"})]})})]})})})},z=t(62084),D=t(41788),R=t(87815),W=t(3849),M=t(22341),F=t(73942),B=t(99994),L=t(65597),U=t(49125),q=t(84392),G=t(99497);function K(e){var n=e.fetchWorkspaces,t=e.instance,r=e.clusterType,i=(0,s.useRef)(null),c=(0,s.useState)(),a=c[0],f=c[1],h=(0,s.useState)(),m=h[0],g=h[1],b=t.name,v=(t.task_arn,{cluster_type:r}),j=(0,l.Db)(k.ZP.workspaces.useUpdate(b,v),{onSuccess:function(e){return(0,I.wD)(e,{callback:function(){n(),f(!1)},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),w=(0,o.Z)(j,1)[0],C=(0,l.Db)(k.ZP.workspaces.useDelete(b,v),{onSuccess:function(e){return(0,I.wD)(e,{callback:function(){n(),f(!1)},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),O=(0,o.Z)(C,1)[0],_=(0,s.useMemo)((function(){var e=t.status,n=[{label:function(){return(0,E.jsx)(y.ZP,{children:"Delete workspace"})},onClick:function(){return g(!0)},uuid:"delete_workspace"}];return"ecs"===r&&("STOPPED"===e?n.unshift({label:function(){return(0,E.jsx)(y.ZP,{children:"Resume instance"})},onClick:function(){return w({workspace:{action:"resume",cluster_type:r,name:t.name,task_arn:t.task_arn}})},uuid:"resume_instance"}):"RUNNING"===e&&n.unshift({label:function(){return(0,E.jsx)(y.ZP,{children:"Stop instance"})},onClick:function(){return w({workspace:{action:"stop",cluster_type:r,name:t.name,task_arn:t.task_arn}})},uuid:"stop_instance"})),n}),[r,t,w]);return(0,E.jsx)(E.Fragment,{children:["ecs","k8s"].includes(r)&&(0,E.jsxs)("div",{ref:i,style:{position:"relative",zIndex:"1"},children:[(0,E.jsx)(u.Z,{iconOnly:!0,onClick:function(){return f(!a)},children:(0,E.jsx)(M.mH,{size:2*U.iI})}),(0,E.jsx)(d.Z,{disableEscape:!0,onClickOutside:function(){f(!1),g(!1)},open:a,children:m?(0,E.jsxs)(L.f,{leftOffset:30*-U.iI,topOffset:3*-U.iI,width:30*U.iI,children:[(0,E.jsx)(y.ZP,{children:"Are you sure you want to delete"}),(0,E.jsx)(y.ZP,{children:"this instance? You may not be"}),(0,E.jsx)(y.ZP,{children:"able to recover your data."}),(0,E.jsx)(x.Z,{mt:1}),(0,E.jsxs)(p.ZP,{children:[(0,E.jsx)(u.Z,{danger:!0,onClick:O,children:"Confirm"}),(0,E.jsx)(x.Z,{ml:1}),(0,E.jsx)(u.Z,{default:!0,onClick:function(){return g(!1)},children:"Cancel"})]})]}):(0,E.jsx)(z.Z,{items:_,left:25*-U.iI,open:a,parentRef:i,topOffset:3*-U.iI,uuid:"workspaces/more_actions",width:25*U.iI})})]})})}function V(){var e=k.ZP.statuses.list().data,n=(0,s.useMemo)((function(){var n,t;return(null===e||void 0===e||null===(n=e.statuses)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.instance_type)||"ecs"}),[e]),t=k.ZP.workspaces.list({cluster_type:n},{refreshInterval:1e4,revalidateOnFocus:!0}),r=t.data,i=t.mutate,c=(0,s.useMemo)((function(){var e;return null===r||void 0===r||null===(e=r.workspaces)||void 0===e?void 0:e.filter((function(e){return e.name}))}),[r]),a=(0,G.dd)((function(){return(0,E.jsx)(T,{clusterType:n,onCancel:f,onCreate:function(){i(),f()}})}),{},[n,i],{background:!0,uuid:"configure_workspace"}),l=(0,o.Z)(a,2),d=l[0],f=l[1];return(0,E.jsx)(W.Z,{breadcrumbs:[{bold:!0,label:function(){return"Workspaces"}}],pageName:q.L6.WORKSPACES,subheaderChildren:(0,E.jsx)(g.ZP,{background:B.eW,beforeElement:(0,E.jsx)(M.mm,{size:2.5*U.iI}),bold:!0,inline:!0,onClick:function(){return d()},uuid:"workspaces/new",children:"Create new workspace"}),children:(0,E.jsx)(R.Z,{columnFlex:[2,4,2,3,1,null],columns:[{uuid:"Status"},{uuid:"Instance Name"},{uuid:"Type"},{uuid:"Public IP address"},{uuid:"Open"},{label:function(){return""},uuid:"Actions"}],rows:null===c||void 0===c?void 0:c.map((function(e){var t=e.instance,r=t.ip,o=t.name,c=t.status,a=t.type,s="http://".concat(r);return"ecs"===n&&(s="http://".concat(r,":6789")),[(0,E.jsx)(u.Z,{borderRadius:F.D7,danger:"STOPPED"===c,default:"PROVISIONING"===c,notClickable:!0,padding:"6px",primary:"RUNNING"===c,warning:"PENDING"===c,children:(0,N.vg)(c)},"status"),(0,E.jsx)(y.ZP,{children:o},"name"),(0,E.jsx)(y.ZP,{children:(0,N.vg)(a)},"type"),(0,E.jsx)(y.ZP,{children:r},"ip"),(0,E.jsx)(u.Z,{disabled:!r,iconOnly:!0,onClick:function(){return window.open(s)},children:(0,E.jsx)(M.M0,{size:2*U.iI})},"open_button"),(0,E.jsx)(K,{clusterType:n,fetchWorkspaces:i,instance:t},"more_actions")]}))})})}V.getInitialProps=(0,i.Z)(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var Y=(0,D.Z)(V)},13157:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage",function(){return t(27664)}])}},function(e){e.O(0,[844,9902,8789,1424,1005,7815,6422,7722,9774,2888,179],(function(){return n=13157,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1709],{98677:function(n,e,t){"use strict";function r(n,e,t){n=+n,e=+e,t=(i=arguments.length)<2?(e=n,n=0,1):i<3?1:+t;for(var r=-1,i=0|Math.max(0,Math.ceil((e-n)/t)),o=new Array(i);++r<i;)o[r]=n+r*t;return o}t.d(e,{Z:function(){return a}});var i=t(8208),o=t(8162);function u(){var n,e,t=(0,o.Z)().unknown(void 0),c=t.domain,a=t.range,l=0,s=1,d=!1,f=0,p=0,h=.5;function m(){var t=c().length,i=s<l,o=i?s:l,u=i?l:s;n=(u-o)/Math.max(1,t-f+2*p),d&&(n=Math.floor(n)),o+=(u-o-n*(t-f))*h,e=n*(1-f),d&&(o=Math.round(o),e=Math.round(e));var m=r(t).map((function(e){return o+n*e}));return a(i?m.reverse():m)}return delete t.unknown,t.domain=function(n){return arguments.length?(c(n),m()):c()},t.range=function(n){return arguments.length?([l,s]=n,l=+l,s=+s,m()):[l,s]},t.rangeRound=function(n){return[l,s]=n,l=+l,s=+s,d=!0,m()},t.bandwidth=function(){return e},t.step=function(){return n},t.round=function(n){return arguments.length?(d=!!n,m()):d},t.padding=function(n){return arguments.length?(f=Math.min(1,p=+n),m()):f},t.paddingInner=function(n){return arguments.length?(f=Math.min(1,n),m()):f},t.paddingOuter=function(n){return arguments.length?(p=+n,m()):p},t.align=function(n){return arguments.length?(h=Math.max(0,Math.min(1,n)),m()):h},t.copy=function(){return u(c(),[l,s]).round(d).paddingInner(f).paddingOuter(p).align(h)},i.o.apply(m(),arguments)}var c=(0,t(93342).Z)("domain","range","reverse","align","padding","round");function a(n){return c(u(),n)}},81354:function(n,e,t){"use strict";t.d(e,{Z:function(){return v}});var r=t(82684),i=t(63588),o=t.n(i),u=t(75823),c=t(29989),a=t(62072),l=t(53989),s=t(13004),d=t(18246),f=t(59309),p=t(65743),h=["data","className","top","left","x","y0","y1","xScale","yScale","color","keys","value","order","offset","children"];function m(){return m=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},m.apply(this,arguments)}function v(n){var e=n.data,t=n.className,i=n.top,v=n.left,g=n.x,b=n.y0,x=void 0===b?a.l8:b,Z=n.y1,j=void 0===Z?a.xf:Z,y=n.xScale,w=n.yScale,O=n.color,k=n.keys,P=n.value,_=n.order,C=n.offset,I=n.children,M=function(n,e){if(null==n)return{};var t,r,i={},o=Object.keys(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||(i[t]=n[t]);return i}(n,h),T=(0,u.Z)();k&&T.keys(k),P&&(0,s.Z)(T.value,P),_&&T.order((0,d.ZP)(_)),C&&T.offset((0,f.ZP)(C));var S=T(e),N=(0,l.Z)(y),B=S.map((function(n,e){var t=n.key;return{index:e,key:t,bars:n.map((function(e,r){var i=(w(x(e))||0)-(w(j(e))||0),o=w(j(e)),u="bandwidth"in y?y(g(e.data)):Math.max((y(g(e.data))||0)-N/2);return{bar:e,key:t,index:r,height:i,width:N,x:u||0,y:o||0,color:O(n.key,r)}}))}}));return I?r.createElement(r.Fragment,null,I(B)):r.createElement(c.Z,{className:o()("visx-bar-stack",t),top:i,left:v},B.map((function(n){return n.bars.map((function(e){return r.createElement(p.Z,m({key:"bar-stack-"+n.index+"-"+e.index,x:e.x,y:e.y,height:e.height,width:e.width,fill:e.color},M))}))})))}},62072:function(n,e,t){"use strict";function r(n){return null==n?void 0:n[0]}function i(n){return null==n?void 0:n[1]}t.d(e,{l8:function(){return r},xf:function(){return i}})},53989:function(n,e,t){"use strict";function r(n){if("bandwidth"in n)return n.bandwidth();var e=n.range(),t=n.domain();return Math.abs(e[e.length-1]-e[0])/t.length}t.d(e,{Z:function(){return r}})},59309:function(n,e,t){"use strict";t.d(e,{ZP:function(){return l}});var r=t(12759),i=t(27500),o=t(82610),u=t(34812),c=t(77944),a={expand:r.Z,diverging:i.Z,none:o.Z,silhouette:u.Z,wiggle:c.Z};Object.keys(a);function l(n){return n&&a[n]||a.none}},18246:function(n,e,t){"use strict";t.d(e,{ZP:function(){return l}});var r=t(39586),i=t(25516),o=t(54164),u=t(8512),c=t(2010),a={ascending:r.Z,descending:i.Z,insideout:o.Z,none:u.Z,reverse:c.Z};Object.keys(a);function l(n){return n&&a[n]||a.none}},13946:function(n,e,t){"use strict";t.d(e,{t:function(){return r}});var r=Array.prototype.slice},27500:function(n,e,t){"use strict";function r(n,e){if((c=n.length)>0)for(var t,r,i,o,u,c,a=0,l=n[e[0]].length;a<l;++a)for(o=u=0,t=0;t<c;++t)(i=(r=n[e[t]][a])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=u,r[0]=u+=i):(r[0]=0,r[1]=i)}t.d(e,{Z:function(){return r}})},12759:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(82610);function i(n,e){if((i=n.length)>0){for(var t,i,o,u=0,c=n[0].length;u<c;++u){for(o=t=0;t<i;++t)o+=n[t][u][1]||0;if(o)for(t=0;t<i;++t)n[t][u][1]/=o}(0,r.Z)(n,e)}}},82610:function(n,e,t){"use strict";function r(n,e){if((i=n.length)>1)for(var t,r,i,o=1,u=n[e[0]],c=u.length;o<i;++o)for(r=u,u=n[e[o]],t=0;t<c;++t)u[t][1]+=u[t][0]=isNaN(r[t][1])?r[t][0]:r[t][1]}t.d(e,{Z:function(){return r}})},34812:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(82610);function i(n,e){if((t=n.length)>0){for(var t,i=0,o=n[e[0]],u=o.length;i<u;++i){for(var c=0,a=0;c<t;++c)a+=n[c][i][1]||0;o[i][1]+=o[i][0]=-a/2}(0,r.Z)(n,e)}}},77944:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(82610);function i(n,e){if((o=n.length)>0&&(i=(t=n[e[0]]).length)>0){for(var t,i,o,u=0,c=1;c<i;++c){for(var a=0,l=0,s=0;a<o;++a){for(var d=n[e[a]],f=d[c][1]||0,p=(f-(d[c-1][1]||0))/2,h=0;h<a;++h){var m=n[e[h]];p+=(m[c][1]||0)-(m[c-1][1]||0)}l+=f,s+=p*f}t[c-1][1]+=t[c-1][0]=u,l&&(u-=s/l)}t[c-1][1]+=t[c-1][0]=u,(0,r.Z)(n,e)}}},34128:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(8512);function i(n){var e=n.map(o);return(0,r.Z)(n).sort((function(n,t){return e[n]-e[t]}))}function o(n){for(var e,t=-1,r=0,i=n.length,o=-1/0;++t<i;)(e=+n[t][1])>o&&(o=e,r=t);return r}},39586:function(n,e,t){"use strict";t.d(e,{S:function(){return o},Z:function(){return i}});var r=t(8512);function i(n){var e=n.map(o);return(0,r.Z)(n).sort((function(n,t){return e[n]-e[t]}))}function o(n){for(var e,t=0,r=-1,i=n.length;++r<i;)(e=+n[r][1])&&(t+=e);return t}},25516:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(39586);function i(n){return(0,r.Z)(n).reverse()}},54164:function(n,e,t){"use strict";t.d(e,{Z:function(){return o}});var r=t(34128),i=t(39586);function o(n){var e,t,o=n.length,u=n.map(i.S),c=(0,r.Z)(n),a=0,l=0,s=[],d=[];for(e=0;e<o;++e)t=c[e],a<l?(a+=u[t],s.push(t)):(l+=u[t],d.push(t));return d.reverse().concat(s)}},8512:function(n,e,t){"use strict";function r(n){for(var e=n.length,t=new Array(e);--e>=0;)t[e]=e;return t}t.d(e,{Z:function(){return r}})},2010:function(n,e,t){"use strict";t.d(e,{Z:function(){return i}});var r=t(8512);function i(n){return(0,r.Z)(n).reverse()}},75823:function(n,e,t){"use strict";t.d(e,{Z:function(){return a}});var r=t(13946),i=t(90875),o=t(82610),u=t(8512);function c(n,e){return n[e]}function a(){var n=(0,i.Z)([]),e=u.Z,t=o.Z,a=c;function l(r){var i,o,u=n.apply(this,arguments),c=r.length,l=u.length,s=new Array(l);for(i=0;i<l;++i){for(var d,f=u[i],p=s[i]=new Array(c),h=0;h<c;++h)p[h]=d=[0,+a(r[h],f,h,r)],d.data=r[h];p.key=f}for(i=0,o=e(s);i<l;++i)s[o[i]].index=i;return t(s,o),s}return l.keys=function(e){return arguments.length?(n="function"===typeof e?e:(0,i.Z)(r.t.call(e)),l):n},l.value=function(n){return arguments.length?(a="function"===typeof n?n:(0,i.Z)(+n),l):a},l.order=function(n){return arguments.length?(e=null==n?u.Z:"function"===typeof n?n:(0,i.Z)(r.t.call(n)),l):e},l.offset=function(n){return arguments.length?(t=null==n?o.Z:n,l):t},l}},1210:function(n,e,t){"use strict";t.d(e,{Z:function(){return k}});var r=t(82394),i=t(21831),o=t(82684),u=t(47999),c=t(49894),a=t(93461),l=t(57384),s=t(41424),d=t(72454),f=t(28598);function p(n,e){var t=n.children;return(0,f.jsx)(d.HS,{ref:e,children:t})}var h=o.forwardRef(p),m=t(32063),v=t(85019),g=t(82531),b=t(66166),x=t(3055),Z=t(49125),j=t(91427),y=t(24141);function w(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function O(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?w(Object(t),!0).forEach((function(e){(0,r.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var k=function(n){var e,t=n.addProjectBreadcrumbToCustomBreadcrumbs,r=n.after,p=n.afterHidden,w=n.afterWidth,k=n.afterWidthOverride,P=n.before,_=n.beforeWidth,C=n.breadcrumbs,I=n.children,M=n.errors,T=n.headerMenuItems,S=n.headerOffset,N=n.mainContainerHeader,B=n.navigationItems,E=n.setErrors,D=n.subheaderChildren,R=n.title,A=n.uuid,H=(0,y.i)().width,L="dashboard_after_width_".concat(A),Y="dashboard_before_width_".concat(A),F=(0,o.useRef)(null),W=(0,o.useState)(k?w:(0,j.U2)(L,w)),z=W[0],q=W[1],G=(0,o.useState)(!1),U=G[0],V=G[1],X=(0,o.useState)(P?Math.max((0,j.U2)(Y,_),13*Z.iI):null),K=X[0],J=X[1],Q=(0,o.useState)(!1),$=Q[0],nn=Q[1],en=(0,o.useState)(null)[1],tn=g.ZP.projects.list({},{revalidateOnFocus:!1}).data,rn=null===tn||void 0===tn?void 0:tn.projects,on={label:function(){var n;return null===rn||void 0===rn||null===(n=rn[0])||void 0===n?void 0:n.name},linkProps:{href:"/"}},un=[];C?(t&&un.push(on),un.push.apply(un,(0,i.Z)(C))):(null===rn||void 0===rn?void 0:rn.length)>=1&&un.push.apply(un,[on,{bold:!0,label:function(){return R}}]),(0,o.useEffect)((function(){null===F||void 0===F||!F.current||U||$||null===en||void 0===en||en(F.current.getBoundingClientRect().width)}),[U,z,$,K,F,en,H]),(0,o.useEffect)((function(){U||(0,j.t8)(L,z)}),[p,U,z,L]),(0,o.useEffect)((function(){$||(0,j.t8)(Y,K)}),[$,K,Y]);var cn=(0,b.Z)(w);return(0,o.useEffect)((function(){k&&cn!==w&&q(w)}),[k,w,cn]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(l.Z,{title:R}),(0,f.jsx)(s.Z,{breadcrumbs:un,menuItems:T,project:null===rn||void 0===rn?void 0:rn[0],version:null===rn||void 0===rn||null===(e=rn[0])||void 0===e?void 0:e.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===B||void 0===B?void 0:B.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(v.Z,{navigationItems:B,showMore:!0})}),(0,f.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(m.Z,{after:r,afterHeightOffset:x.Mz,afterHidden:p,afterMousedownActive:U,afterWidth:z,before:P,beforeHeightOffset:x.Mz,beforeMousedownActive:$,beforeWidth:d.k1+(P?K:0),headerOffset:S,hideAfterCompletely:!0,leftOffset:P?d.k1:null,mainContainerHeader:N,mainContainerRef:F,setAfterMousedownActive:V,setAfterWidth:q,setBeforeMousedownActive:nn,setBeforeWidth:J,children:[D&&(0,f.jsx)(h,{children:D}),I]})})]}),M&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===E||void 0===E?void 0:E(null)},children:(0,f.jsx)(c.Z,O(O({},M),{},{onClose:function(){return null===E||void 0===E?void 0:E(null)}}))})]})}},21390:function(n,e,t){"use strict";t.d(e,{d:function(){return s}});var r=t(75090),i=t(22341),o=t(98781),u=t(49125),c=t(90211),a=t(28598),l=1.5*u.iI,s=function(n,e){var t=[{beforeIcon:(0,a.jsx)(i.X5,{}),label:function(){return"Standard (batch)"},onClick:function(){return n({pipeline:{name:(0,c.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{beforeIcon:(0,a.jsx)(i.ZG,{}),label:function(){return"Data integration"},onClick:function(){return n({pipeline:{name:(0,c.Y6)(),type:o.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{beforeIcon:(0,a.jsx)(r.Z,{size:l}),label:function(){return"Streaming"},onClick:function(){return n({pipeline:{name:(0,c.Y6)(),type:o.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}];return null!==e&&void 0!==e&&e.showBrowseTemplates&&t.push({beforeIcon:(0,a.jsx)(i.zQ,{}),label:function(){return"From a template"},onClick:function(){var n;return null===e||void 0===e||null===(n=e.showBrowseTemplates)||void 0===n?void 0:n.call(e)},uuid:"Pipelines/NewPipelineMenu/custom_template"}),t}},50316:function(n,e,t){"use strict";t.d(e,{B:function(){return f}});var r=t(82394),i=t(30264),o=t(11135),u=t(22341),c=t(99994),a=t(49125),l=t(28598);function s(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function d(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?s(Object(t),!0).forEach((function(e){(0,r.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var f={bold:!0,greyBorder:!0,paddingBottom:9,paddingTop:9};e.Z=function(n){var e=n.addButtonMenuOpen,t=n.addButtonMenuRef,r=n.isLoading,s=n.label,p=n.menuItems,h=n.onClick,m=n.onClickCallback;return(0,l.jsx)(i.Z,{disableKeyboardShortcuts:!0,items:p,onClickCallback:m,onClickOutside:m,open:e,parentRef:t,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/NewItemMenu",children:(0,l.jsx)(o.ZP,d(d({},f),{},{background:c.eW,beforeElement:(0,l.jsx)(u.mm,{size:2.5*a.iI}),loading:r,onClick:function(n){n.preventDefault(),null===h||void 0===h||h()},uuid:"shared/AddButton/index",children:s}))})}},40030:function(n,e,t){"use strict";var r=t(38626),i=t(23831),o=r.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:3;",""],(function(n){return"\n background-color: ".concat(n.backgroundColor||(n.theme.background||i.Z.background).page,";\n border-bottom: 1px solid ").concat((n.theme.borders||i.Z.borders).medium,";\n ")}));e.Z=o},98636:function(n,e,t){"use strict";t.d(e,{g:function(){return g},Z:function(){return b}});var r=t(82684),i=t(38626),o=t(23831),u=t(73942),c=t(37391),a=t(49125),l=1.5*a.iI,s=1.5*a.iI,d=i.default.div.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-13p7y8j-0"})(["border-radius:","px;overflow:hidden;width:100%;"," "," "," ",""],u.n_,(function(n){return n.width&&"\n width: ".concat(n.width,"px;\n ")}),(function(n){return"\n background-color: ".concat((n.theme||o.Z).background.page,";\n border: ").concat(u.YF,"px ").concat(u.M8," ").concat((n.theme||o.Z).interactive.defaultBorder,";\n box-shadow: ").concat((n.theme||o.Z).shadow.frame,";\n ")}),(function(n){return n.noBackground&&"\n background-color: transparent;\n "}),(function(n){return n.noBoxShadow&&"\n box-shadow: none;\n "})),f=i.default.div.withConfig({displayName:"indexstyle__RowContainerStyle",componentId:"sc-13p7y8j-1"})(["overflow:auto;border-bottom-left-radius:","px;border-bottom-right-radius:","px;"," "," "," ",""],u.n_,u.n_,c.w5,(function(n){return n.maxHeight>0&&"\n max-height: ".concat(n.maxHeight,"px;\n ")}),(function(n){return n.minHeight>0&&"\n min-height: ".concat(n.minHeight,"px;\n ")}),(function(n){return n.scrollable&&"\n margin-bottom: ".concat(a.iI,"px;\n overflow-y: auto;\n padding-top: ").concat(3,"px;\n padding-left: ").concat(3,"px;\n padding-right: ").concat(3,"px;\n ")})),p=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-13p7y8j-2"})(["border-top-left-radius:","px;border-top-right-radius:","px;padding:","px ","px;",""],u.n_,u.n_,l,2*a.iI,(function(n){return"\n border-bottom: ".concat(u.YF,"px ").concat(u.M8," ").concat((n.theme.interactive||o.Z.interactive).defaultBorder,";\n ")})),h=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-13p7y8j-3"})(["padding:","px ","px;"," "," "," "," "," ",""],s,2*a.iI,(function(n){return"\n border-bottom: ".concat(u.YF,"px ").concat(u.M8," ").concat((n.theme||o.Z).borders.medium2,";\n ")}),(function(n){return n.sameColorBorders&&"\n border-bottom-color: ".concat((n.theme||o.Z).interactive.defaultBorder,";\n ")}),(function(n){return n.noHorizontalPadding&&"\n padding-left: 0;\n padding-right: 0;\n "}),(function(n){return n.condensed&&"\n padding-top: ".concat(9,"px;\n padding-bottom: ").concat(9,"px;\n ")}),(function(n){return n.secondary&&"\n background-color: ".concat((n.theme.background||o.Z.background).row2,";\n ")}),(function(n){return n.last&&n.noBorder&&"\n border-bottom-left-radius: ".concat(u.n_,"px;\n border-bottom-right-radius: ").concat(u.n_,"px;\n border-bottom: none;\n ")})),m=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-13p7y8j-4"})(["border-bottom-left-radius:","px;border-bottom-right-radius:","px;padding:","px ","px;",""],u.n_,u.n_,l,2*a.iI,(function(n){return"\n border-top: ".concat(u.YF,"px ").concat(u.M8," ").concat((n.theme||o.Z).borders.medium2,";\n ")})),v=t(28598),g=h;var b=function(n){var e=n.alternating,t=n.children,i=n.footer,o=n.header,u=n.maxHeight,c=n.minHeight,a=n.noBackground,l=n.noBoxShadow,s=n.sameColorBorders,h=n.scrollable,g=n.width,b=[].concat(t).filter((function(n){return null!==n}));return(0,v.jsxs)(d,{noBackground:a,noBoxShadow:l,width:g,children:[o&&(0,v.jsx)(p,{children:o}),(0,v.jsx)(f,{maxHeight:u,minHeight:c,scrollable:h,children:r.Children.map(b,(function(n,t){return n&&r.cloneElement(n,{last:t===b.length-1,sameColorBorders:s,secondary:e&&t%2===1})}))}),i&&(0,v.jsx)(m,{children:i})]})}},95820:function(n,e,t){"use strict";t.d(e,{i:function(){return s}});t(82684);var r=t(38626),i=(t(93461),t(67971),t(10919),t(86673),t(47329)),o=t.n(i);o().node,o().node,o().node.isRequired,o().bool,o().string.isRequired;t(19711);var u=t(31969),c=t(2005),a=t(49125),l=t(73942),s=(t(28598),"tab");r.default.div.withConfig({displayName:"Tabs__TabHeaderContainerStyle",componentId:"sc-rojme5-0"})(["",""],(function(n){return n.containerWidthPercentage&&"\n width: ".concat(n.containerWidthPercentage,"%;\n ")})),r.default.div.withConfig({displayName:"Tabs__TabHeader",componentId:"sc-rojme5-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;margin-right:","px;position:relative;z-index:2;"," "," ",""],l.BG,l.BG,6*a.iI,(function(n){return n.noBottomBorder&&"\n border-bottom: none;\n "}),(function(n){return n.active&&"\n border-bottom: ".concat(a.cd,"px solid;\n border-color: ").concat((n.theme.interactive||u.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.fullWidth&&"\n width: 100%;\n "})),r.default.div.withConfig({displayName:"Tabs__LinkStyle",componentId:"sc-rojme5-2"})(["align-items:center;display:flex;"," "," ",""],(function(n){return n.bold&&"\n font-family: ".concat(c.nF,";\n ")}),(function(n){return n.fullWidth&&"\n justify-content: center;\n "}),(function(n){return!n.disabled&&"\n &:hover {\n path {\n fill: ".concat((n.theme.content||u.Z.interactive).linkPrimary," !important;\n }\n }\n ")}))},39352:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return On}});var r=t(77837),i=t(75582),o=t(82394),u=t(38860),c=t.n(u),a=t(83455),l=t(82684),s=t(34376),d=t(92083),f=t.n(d),p=t(50316),h=t(67591),m=t(2485),v=t(32316),g=t(1210),b=t(67971),x=t(87372),Z=t(93461),j=t(86673),y=t(19711),w=t(38626),O=t(23831),k=t(73942),P=t(49125),_=12.5*P.iI,C=8*P.iI,I=5*P.iI,M=3*P.iI,T=w.default.div.withConfig({displayName:"indexstyle__TileContainerStyle",componentId:"sc-c3nc3q-0"})(["padding:","px;border-radius:","px;height:","px;width:","px;"," ",""],2.5*P.iI,k.TR,_,_,(function(n){return"\n background-color: ".concat((n.theme||O.Z).background.chartBlock,";\n ")}),(function(n){return n.compact&&"\n height: ".concat(C,"px;\n width: ").concat(C,"px;\n ")})),S=t(28598);var N=function(n){var e=n.Icon,t=n.compact,r=n.label;return(0,S.jsx)(T,{compact:t,children:(0,S.jsxs)(b.ZP,{alignItems:"center",flexDirection:"column",justifyContent:"center",children:[(0,S.jsx)(e,{size:t?M:I}),(0,S.jsx)(j.Z,{mb:"4px"}),(0,S.jsx)(y.ZP,{bold:!0,small:t,children:r})]})})},B=w.default.div.withConfig({displayName:"indexstyle__MetricsSummaryContainerStyle",componentId:"sc-nu65g1-0"})(["width:100%;padding:","px;border-radius:","px;",""],2*P.iI,k.n_,(function(n){return"\n border: ".concat(k.YF,"px ").concat(k.M8," ").concat((n.theme||O.Z).interactive.defaultBorder,";\n box-shadow: ").concat((n.theme||O.Z).shadow.frame,";\n ")})),E=t(98781),D=t(66050),R=t(90211),A=t(84779),H=t(24224);var L=function(n){var e=n.pipelineRunCountByPipelineType,t=(0,l.useMemo)((function(){if(!e)return[];var n=JSON.parse(JSON.stringify(e)),t=n[E.qL.PYTHON]||{};return Object.entries(n[E.qL.PYSPARK]||{}).forEach((function(n){var e=(0,i.Z)(n,2),r=e[0],o=e[1];t[r]?t[r]+=o:t[r]=o})),n[E.qL.PYTHON]=t,delete n[E.qL.PYSPARK],(0,H.mr)(Object.entries(n).filter((function(n){var e=(0,i.Z)(n,2),t=(e[0],e[1]);return 0!==Object.keys(t).length})))}),[e]);return(0,S.jsxs)(B,{children:[(0,S.jsx)(y.ZP,{bold:!0,large:!0,children:"Pipeline run metrics"}),(0,S.jsx)(j.Z,{mb:2}),(0,S.jsx)(b.ZP,{alignItems:"center",justifyContent:"space-between",children:t.map((function(n,e){var r=(0,i.Z)(n,2),o=r[0],u=r[1];return(0,S.jsxs)(Z.Z,{alignItems:"center",flex:"1",justifyContent:"space-between",style:0!==e?{borderLeft:"1px solid ".concat(O.Z.interactive.defaultBorder)}:null,children:[(0,S.jsx)(j.Z,{pl:0!==e?3:0,children:(0,S.jsx)(N,{Icon:E.Mj[o],label:E.G7[o]})}),(0,H.mr)(Object.entries(u)).map((function(n,e){var t=(0,i.Z)(n,2),r=t[0],o=t[1];return(0,S.jsxs)(Z.Z,{flexDirection:"column",children:[(0,S.jsx)(y.ZP,{children:(0,R.kC)(r)}),(0,S.jsx)(y.ZP,{bold:!0,danger:r===D.V.FAILED&&o>0,xlarge:!0,children:(0,A.uf)(o)})]},"".concat(r,"_").concat(e))})),(0,S.jsx)(j.Z,{pr:e!==t.length-1?2:0})]},"".concat(o,"_metric"))}))})]})},Y=t(40030),F=t(41788),W=t(54283),z=t(12691),q=t.n(z),G=t(60328),U=t(10919),V=t(98636),X=t(72454),K=t(95820),J=t(42305),Q=t(59e3),$=40*P.iI,nn=40*P.iI;var en=function(n){var e=n.pipelineType,t=n.pipelineRuns,r=void 0===t?[]:t,i=(0,s.useRouter)(),o=(0,Q.iV)(),u=(null===o||void 0===o?void 0:o[K.i])||J.vk.TODAY,c=e===E.LM,a=c?E.LM:E.G7[e],l=E.Mj[e],d=r.length,f=0===d?"":"(".concat(d,")");return(0,S.jsx)(V.Z,{footer:(0,S.jsx)(b.ZP,{alignItems:"center",justifyContent:"center",children:(0,S.jsx)(q(),{as:"/pipeline-runs?status=failed",href:"/pipeline-runs",passHref:!0,children:(0,S.jsx)(U.Z,{sameColorAsText:!0,children:"View more"})})}),header:(0,S.jsxs)(b.ZP,{alignItems:"center",children:[(0,S.jsx)(G.Z,{beforeIcon:(0,S.jsx)(l,{size:2.5*P.iI}),compact:!0,notClickable:!0,children:(0,R.kC)(a)}),(0,S.jsx)(j.Z,{ml:2}),(0,S.jsxs)(y.ZP,{bold:!0,children:["Latest ",c?"":"".concat((0,R.wX)(a)," "),"pipeline run failures ",f]})]}),maxHeight:$,minHeight:nn,children:0===d?(0,S.jsx)(b.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"center",children:(0,S.jsx)(j.Z,{px:5,py:10,children:(0,S.jsxs)(b.ZP,{alignItems:"center",flexDirection:"column",children:[(0,S.jsx)(X.Hn,{imageUrl:"".concat(i.basePath,"/images/blocks/grey_block.webp")}),(0,S.jsx)(j.Z,{mb:3}),(0,S.jsxs)(y.ZP,{large:!0,children:["No ",c?"":"".concat((0,R.wX)(a)," "),"pipeline run failures for ",J.s8[u]]})]})})}):r.map((function(n){var e=n.created_at,t=n.id,r=n.pipeline_uuid;return(0,S.jsx)(V.g,{children:(0,S.jsxs)(b.ZP,{alignItems:"center",children:[(0,S.jsx)(q(),{as:"/pipelines/".concat(r),href:"/pipelines/[pipeline]",passHref:!0,children:(0,S.jsx)(U.Z,{monospace:!0,sameColorAsText:!0,small:!0,children:r})}),(0,S.jsx)(y.ZP,{monospace:!0,small:!0,children:"\xa0>\xa0"}),(0,S.jsx)(q(),{as:"/pipelines/".concat(r,"/runs/").concat(t),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,S.jsxs)(U.Z,{danger:!0,monospace:!0,sameColorAsText:!0,small:!0,children:["Run created on ",e]})})]})},"pipeline_run_".concat(t))}))})},tn=t(82531),rn=t(66166),on=t(92953),un=t(9728),cn=t(3645),an=t(57541),ln=t(22341),sn={Icon:ln.LE,label:function(){return(0,R.kC)(J.s8[J.vk.TODAY])},uuid:J.vk.TODAY},dn={Icon:ln.ks,label:function(){return(0,R.kC)(J.s8[J.vk.WEEK])},uuid:J.vk.WEEK},fn={Icon:ln.zE,label:function(){return(0,R.kC)(J.s8[J.vk.MONTH])},uuid:J.vk.MONTH},pn=[sn,dn,fn],hn=t(17150),mn=t(21390),vn=t(33766),gn=t(96510),bn=t(99497);function xn(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function Zn(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?xn(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):xn(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var jn={mt:2,mx:3},yn={refreshInterval:6e4,revalidateOnFocus:!1};function wn(){var n,e=(0,Q.iV)(),t=(0,s.useRouter)(),r=(0,l.useRef)(null),u=(0,l.useState)(sn),c=u[0],d=u[1],Z=(0,l.useState)(!1),w=Z[0],k=Z[1],P=(0,l.useState)(null),_=P[0],C=P[1],I=null===c||void 0===c?void 0:c.uuid,M=(0,rn.Z)(c);(0,l.useEffect)((function(){var n=e[K.i];n&&d(pn.find((function(e){return e.uuid===n})))}),[e,c,M]);var T=(0,l.useMemo)((function(){return(0,J.jV)(I,{isoString:!0})}),[I]),N=(0,l.useMemo)((function(){return{group_by_pipeline_type:1,start_time:T}}),[T]),B=tn.ZP.monitor_stats.detail(cn.h.PIPELINE_RUN_COUNT,N,Zn({},yn)),A=B.data,F=B.isValidating,z=B.mutate,q=tn.ZP.pipeline_runs.list({_limit:50,include_pipeline_type:1,"order_by[]":"created_at desc",start_timestamp:(0,J.A5)(T),status:D.V.FAILED},Zn({},yn)).data,G=(0,l.useMemo)((function(){return((null===q||void 0===q?void 0:q.pipeline_runs)||[]).filter((function(n){return null!==n.pipeline_type}))}),[null===q||void 0===q?void 0:q.pipeline_runs]),U=(0,l.useMemo)((function(){return(0,H.vM)(G,(function(n){return n.pipeline_type}))}),[G]),V=U.integration,X=void 0===V?[]:V,$=U.python,nn=void 0===$?[]:$,ln=U.streaming,dn=void 0===ln?[]:ln;(0,l.useEffect)((function(){M&&(null===c||void 0===c?void 0:c.uuid)!==(null===M||void 0===M?void 0:M.uuid)&&z()}),[z,c,M]);var fn,xn=(0,l.useMemo)((function(){return(0,J.Y_)(J.yD[I]+1)}),[I]),wn=(0,l.useMemo)((function(){var n,e=(null===A||void 0===A||null===(n=A.monitor_stat)||void 0===n?void 0:n.stats)||{};return(0,hn.i)(e,xn)}),[null===A||void 0===A||null===(n=A.monitor_stat)||void 0===n?void 0:n.stats,xn]),On=wn.pipelineRunCountByPipelineType,kn=wn.totalPipelineRunCount,Pn=wn.ungroupedPipelineRunData,_n=(0,l.useMemo)((function(){return(0,J.Ro)(J.yD[I],{endDateOnly:I===J.vk.TODAY})}),[I]),Cn=(fn=function(n){return t.push("/pipelines/[pipeline]/edit","/pipelines/".concat(n,"/edit"))},(0,a.Db)(tn.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,gn.wD)(n,{callback:function(n){var e=n.pipeline.uuid;null===fn||void 0===fn||fn(e)},onErrorCallback:function(n,e){return C({errors:e,response:n})}})}})),In=(0,i.Z)(Cn,2),Mn=In[0],Tn=In[1].isLoading,Sn=(0,bn.dd)((function(){return(0,S.jsx)(un.BC,{children:(0,S.jsx)(m.Z,{contained:!0,onClickCustomTemplate:function(n){Mn({pipeline:{custom_template_uuid:null===n||void 0===n?void 0:n.template_uuid,name:(0,R.Y6)()}}).then((function(){En()}))},showBreadcrumbs:!0,tabs:[an.A2]})})}),{},[],{background:!0,uuid:"browse_templates"}),Nn=(0,i.Z)(Sn,2),Bn=Nn[0],En=Nn[1],Dn=(0,l.useMemo)((function(){return(0,mn.d)(Mn,{showBrowseTemplates:Bn})}),[Mn,Bn]),Rn=(0,l.useMemo)((function(){return(0,S.jsx)(p.Z,{addButtonMenuOpen:w,addButtonMenuRef:r,isLoading:Tn,label:"New pipeline",menuItems:Dn,onClick:function(){return k((function(n){return!n}))},onClickCallback:function(){return k(!1)}})}),[w,Tn,Dn]);return(0,S.jsxs)(g.Z,{errors:_,setErrors:C,title:"Overview",uuid:"overview/index",children:[(0,S.jsx)(Y.Z,{backgroundColor:O.Z.background.panel,children:(0,S.jsx)(j.Z,{py:2,children:(0,S.jsxs)(b.ZP,{alignItems:"center",children:[(0,S.jsx)(j.Z,{ml:3,children:Rn}),(0,S.jsx)(v.Z,{onClickTab:function(n){var e=n.uuid;(0,vn.u7)((0,o.Z)({},K.i,e),{replaceParams:!0})},regularSizeText:!0,selectedTabUUID:I,tabs:pn})]})})}),(0,S.jsxs)(j.Z,{mx:3,my:2,children:[(0,S.jsxs)(x.Z,{level:4,children:[I===J.vk.TODAY&&"".concat((0,R.kC)(J.vk.TODAY),": ").concat(_n),I!==J.vk.TODAY&&"".concat((0,R.kC)(J.s8[I]),": ").concat(_n)]}),(0,S.jsx)(j.Z,{mt:2,children:F?(0,S.jsx)(j.Z,{mx:2,my:11,children:(0,S.jsx)(W.Z,{inverted:!0})}):(0,S.jsx)(L,{pipelineRunCountByPipelineType:On})}),(0,S.jsxs)(j.Z,{mt:2,children:[(0,S.jsx)(j.Z,{ml:2,children:(0,S.jsxs)(y.ZP,{bold:!0,large:!0,children:[F?"--":kn," total pipeline runs"]})}),(0,S.jsx)(j.Z,{mt:1,children:(0,S.jsx)(h.Z,{backgroundColor:O.Z.background.panel,colors:on.NU,data:Pn,getXValue:function(n){return n.date},height:200,keys:on.hu,margin:{bottom:30,left:35,right:0,top:10},tooltipLeftOffset:on.CD,xLabelFormat:function(n){return f()(n).format("MMM DD")}})})]})]}),(0,S.jsx)(j.Z,Zn(Zn({},jn),{},{children:(0,S.jsxs)(b.ZP,{alignItems:"center",justifyContent:"center",children:[(0,S.jsx)(en,{pipelineRuns:G,pipelineType:E.LM}),(0,S.jsx)(j.Z,{ml:2}),(0,S.jsx)(en,{pipelineRuns:nn,pipelineType:E.qL.PYTHON})]})})),(0,S.jsx)(j.Z,Zn(Zn({},jn),{},{children:(0,S.jsxs)(b.ZP,{alignItems:"center",justifyContent:"center",children:[(0,S.jsx)(en,{pipelineRuns:X,pipelineType:E.qL.INTEGRATION}),(0,S.jsx)(j.Z,{ml:2}),(0,S.jsx)(en,{pipelineRuns:dn,pipelineType:E.qL.STREAMING})]})})),(0,S.jsx)(j.Z,{mb:2})]})}wn.getInitialProps=(0,r.Z)(c().mark((function n(){return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{});case 1:case"end":return n.stop()}}),n)})));var On=(0,F.Z)(wn)},84779:function(n,e,t){"use strict";t.d(e,{JI:function(){return o},uf:function(){return i}});var r=t(75582),i=function(n){var e=String(n).split("."),t=(0,r.Z)(e,2),i=t[0],o=t[1];return"".concat(i.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(o?".".concat(o):"")};function o(n){var e=Math.floor(Date.now()/1e3);return n>0?e-n:e}},56655:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overview",function(){return t(39352)}])}},function(n){n.O(0,[844,9902,426,1774,8792,8789,4259,5896,9055,2714,1424,1005,7815,6422,8952,7722,4822,3391,1484,2485,6786,9774,2888,179],(function(){return e=56655,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1009],{1210:function(e,t,r){"use strict";r.d(t,{Z:function(){return w}});var n=r(82394),i=r(21831),o=r(82684),s=r(47999),u=r(49894),c=r(93461),a=r(57384),l=r(41424),d=r(72454),f=r(28598);function p(e,t){var r=e.children;return(0,f.jsx)(d.HS,{ref:t,children:r})}var h=o.forwardRef(p),v=r(32063),b=r(85019),j=r(82531),O=r(66166),g=r(3055),m=r(49125),x=r(91427),P=r(24141);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 Z(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,n.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 w=function(e){var t,r=e.addProjectBreadcrumbToCustomBreadcrumbs,n=e.after,p=e.afterHidden,y=e.afterWidth,w=e.afterWidthOverride,E=e.before,_=e.beforeWidth,k=e.breadcrumbs,C=e.children,A=e.errors,I=e.headerMenuItems,D=e.headerOffset,M=e.mainContainerHeader,S=e.navigationItems,N=e.setErrors,L=e.subheaderChildren,H=e.title,B=e.uuid,F=(0,P.i)().width,R="dashboard_after_width_".concat(B),W="dashboard_before_width_".concat(B),T=(0,o.useRef)(null),U=(0,o.useState)(w?y:(0,x.U2)(R,y)),z=U[0],Q=U[1],V=(0,o.useState)(!1),K=V[0],X=V[1],G=(0,o.useState)(E?Math.max((0,x.U2)(W,_),13*m.iI):null),$=G[0],q=G[1],J=(0,o.useState)(!1),Y=J[0],ee=J[1],te=(0,o.useState)(null)[1],re=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,ne=null===re||void 0===re?void 0:re.projects,ie={label:function(){var e;return null===ne||void 0===ne||null===(e=ne[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];k?(r&&oe.push(ie),oe.push.apply(oe,(0,i.Z)(k))):(null===ne||void 0===ne?void 0:ne.length)>=1&&oe.push.apply(oe,[ie,{bold:!0,label:function(){return H}}]),(0,o.useEffect)((function(){null===T||void 0===T||!T.current||K||Y||null===te||void 0===te||te(T.current.getBoundingClientRect().width)}),[K,z,Y,$,T,te,F]),(0,o.useEffect)((function(){K||(0,x.t8)(R,z)}),[p,K,z,R]),(0,o.useEffect)((function(){Y||(0,x.t8)(W,$)}),[Y,$,W]);var se=(0,O.Z)(y);return(0,o.useEffect)((function(){w&&se!==y&&Q(y)}),[w,y,se]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{title:H}),(0,f.jsx)(l.Z,{breadcrumbs:oe,menuItems:I,project:null===ne||void 0===ne?void 0:ne[0],version:null===ne||void 0===ne||null===(t=ne[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===S||void 0===S?void 0:S.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:S,showMore:!0})}),(0,f.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(v.Z,{after:n,afterHeightOffset:g.Mz,afterHidden:p,afterMousedownActive:K,afterWidth:z,before:E,beforeHeightOffset:g.Mz,beforeMousedownActive:Y,beforeWidth:d.k1+(E?$:0),headerOffset:D,hideAfterCompletely:!0,leftOffset:E?d.k1:null,mainContainerHeader:M,mainContainerRef:T,setAfterMousedownActive:X,setAfterWidth:Q,setBeforeMousedownActive:ee,setBeforeWidth:q,children:[L&&(0,f.jsx)(h,{children:L}),C]})})]}),A&&(0,f.jsx)(s.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===N||void 0===N?void 0:N(null)},children:(0,f.jsx)(u.Z,Z(Z({},A),{},{onClose:function(){return null===N||void 0===N?void 0:N(null)}}))})]})}},51099:function(e,t,r){"use strict";r.d(t,{Q:function(){return l}});r(82684);var n=r(60328),i=r(67971),o=r(86673),s=r(22341),u=r(73899),c=r(49125),a=r(28598),l=22;t.Z=function(e){var t=e.page,r=e.maxPages,l=e.onUpdate,d=e.totalPages,f=[],p=r;if(p>d)f=Array.from({length:d},(function(e,t){return t}));else{var h=Math.floor(p/2),v=t-h;t+h>=d?(v=d-p+2,p-=2):t-h<=0?(v=0,p-=2):(p-=4,v=t-Math.floor(p/2)),f=Array.from({length:p},(function(e,t){return t+v}))}return(0,a.jsx)(a.Fragment,{children:d>0&&(0,a.jsxs)(i.ZP,{alignItems:"center",children:[(0,a.jsx)(n.Z,{disabled:0===t,onClick:function(){return l(t-1)},children:(0,a.jsx)(s.Hd,{size:1.5*c.iI,stroke:"#AEAEAE"})}),!f.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(n.Z,{onClick:function(){return l(0)},borderLess:!0,noBackground:!0,children:1})},0),!f.includes(1)&&(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(n.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),f.map((function(e){return(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(n.Z,{onClick:function(){e!==t&&l(e)},notClickable:e===t,backgroundColor:e===t&&u.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!f.includes(d-1)&&(0,a.jsxs)(a.Fragment,{children:[!f.includes(d-2)&&(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(n.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(n.Z,{onClick:function(){return l(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,a.jsx)(o.Z,{ml:1}),(0,a.jsx)(n.Z,{disabled:t===d-1,onClick:function(){return l(t+1)},children:(0,a.jsx)(s.Kw,{size:1.5*c.iI,stroke:"#AEAEAE"})})]})})}},66050:function(e,t,r){"use strict";var n;r.d(t,{V:function(){return n}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(n||(n={}))},92597:function(e,t,r){"use strict";r.r(t);var n=r(77837),i=r(82394),o=r(38860),s=r.n(o),u=r(82684),c=r(34376),a=r(1210),l=r(67971),d=r(51099),f=r(97496),p=r(41788),h=r(55378),v=r(86673),b=r(19711),j=r(82531),O=r(47409),g=r(49125),m=r(33766),x=r(59e3),P=r(28598);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 Z(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,i.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}function w(){var e=(0,c.useRouter)(),t=(0,u.useState)(null),r=t[0],n=t[1],i=(0,x.iV)(),o=null!==i&&void 0!==i&&i.page?i.page:0,s={_limit:d.Q,_offset:o*d.Q};null!==i&&void 0!==i&&i.status&&(s.status=i.status);var p=j.ZP.pipeline_runs.list(s,{refreshInterval:3e3,revalidateOnFocus:!0}),y=p.data,w=p.mutate,E=(0,u.useMemo)((function(){return(null===y||void 0===y?void 0:y.pipeline_runs)||[]}),[y]),_=(0,u.useMemo)((function(){var e;return(null===y||void 0===y||null===(e=y.metadata)||void 0===e?void 0:e.count)||[]}),[y]);return(0,P.jsxs)(a.Z,{errors:r,setErrors:n,title:"Pipeline runs",uuid:"pipeline_runs/index",children:[(0,P.jsx)(v.Z,{mx:2,my:1,children:(0,P.jsxs)(l.ZP,{alignItems:"center",children:[(0,P.jsx)(b.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsxs)(h.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(t){t.preventDefault(),"all"===t.target.value?e.push("/pipeline-runs"):(0,m.u7)({page:0,status:t.target.value})},paddingRight:4*g.iI,placeholder:"Select run status",value:(null===i||void 0===i?void 0:i.status)||"all",children:[(0,P.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),O.IK.map((function(e){return(0,P.jsx)("option",{value:e,children:O.Do[e]},e)}))]})]})}),(0,P.jsx)(f.Z,{fetchPipelineRuns:w,pipelineRuns:E,setErrors:n}),(0,P.jsx)(v.Z,{p:2,children:(0,P.jsx)(d.Z,{maxPages:9,onUpdate:function(t){var r=Number(t),n=Z(Z({},i),{},{page:r>=0?r:0});e.push("/pipeline-runs","/pipeline-runs?".concat((0,x.uM)(n)))},page:Number(o),totalPages:Math.ceil(_/d.Q)})})]})}w.getInitialProps=(0,n.Z)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,p.Z)(w)},33766:function(e,t,r){"use strict";r.d(t,{O2:function(){return d},g_:function(){return p},u7:function(){return f}});var n=r(75582),i=r(82394),o=r(34376),s=r.n(o),u=r(59e3),c=r(24224);function a(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){(0,i.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d="_offset";function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.preserveParams,i=t.pushHistory,o=t.replaceParams,c=(0,u.iV)(),a={};r&&r.forEach((function(e){c[e]&&(a[e]=c[e])}));var d,f=o?a:c;d=window.location.pathname;var p=i?s().push:s().replace,h=l(l({},f),e);Object.entries(e).forEach((function(e){var t=(0,n.Z)(e,2),r=t[0],i=t[1];"undefined"!==typeof i&&null!==i||delete h[r]}));var v=(0,u.uM)(h);v.length>=1&&(v="?".concat(v));var b="".concat(d.split("?")[0]).concat(v),j=s().router.basePath;return j&&b.startsWith(j)&&(b=b.replace(j,"")),p(s().router.pathname,b,{shallow:!0})}function p(e,t,r){var i=r.addingMultipleValues,o=r.isList,s=r.itemsPerPage,u=r.pushHistory,a=void 0!==u&&u,p=r.resetLimitParams,h=l({},e);i?Object.entries(t).forEach((function(e){var t=(0,n.Z)(e,2),r=t[0],i=t[1];if(Array.isArray(i)){var o="".concat(r,"[]");h[o]=i.map(String)}})):o?Object.entries(t).forEach((function(e){var t=(0,n.Z)(e,2),r=t[0],i=t[1],o=String(i),s="".concat(r,"[]"),u=h[s];u&&Array.isArray(u)?(u=u.map(String)).includes(o)?h[s]=(0,c.Od)(u,(function(e){return e===o})):h[s]=u.concat(o):h[s]=[o]})):h=l(l({},h),t),p&&(h._limit=s||20,h[d]=0),f(h,{pushHistory:a})}},60710:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipeline-runs",function(){return r(92597)}])}},function(e){e.O(0,[844,9902,1424,1005,7815,7496,9774,2888,179],(function(){return t=60710,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6780],{2850:function(e,n,t){"use strict";t.d(n,{M:function(){return c},W:function(){return l}});var r=t(38626),i=t(3055),l=34*t(49125).iI,c=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},56681:function(e,n,t){"use strict";t.d(n,{G7:function(){return P},ZP:function(){return y},u$:function(){return x}});var r=t(75582),i=t(82394),l=t(26304),c=t(32316),a=t(22673),s=t(48952),o=t(86673),u=t(19711),d=t(87815),p=t(49125),f=t(19395),h=t(7715),b=t(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=76,g={uuid:"Run details"},Z={uuid:"Dependency tree"},P=[Z,g];function y(e){var n=e.height,t=e.heightOffset,i=e.pipeline,m=e.selectedRun,y=e.selectedTab,k=e.setSelectedTab,O=j({},(0,l.Z)(e,v));m?O.blockStatus=(0,f.IJ)(null===m||void 0===m?void 0:m.block_runs):O.noStatus=!0;var _=(0,h.Kn)(null===m||void 0===m?void 0:m.variables)?j({},null===m||void 0===m?void 0:m.variables):(null===m||void 0===m?void 0:m.variables)||{},I=null===m||void 0===m?void 0:m.event_variables;if(I&&(0,h.Kn)(I)&&!(0,h.Qr)(I))if((0,h.Kn)(_)&&_.hasOwnProperty("event")){var w=(0,h.Kn)(_.event)?_.event:{};_.event=j(j({},w),I)}else _.event=j({},I);var S=[];_&&JSON.stringify(_,null,2).split("\n").forEach((function(e){S.push(" ".concat(e))}));var E=m&&[["Run ID",null===m||void 0===m?void 0:m.id],["Variables",(0,b.jsx)(a.Z,{language:"json",small:!0,source:S.join("\n")},"variable_value")]],C=m&&(0,b.jsx)(o.Z,{pb:p.cd,px:p.cd,children:(0,b.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:E.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],l=t[1];return[(0,b.jsx)(u.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,b.jsx)(u.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),D=y&&k;return(0,b.jsxs)(b.Fragment,{children:[D&&(0,b.jsx)(o.Z,{py:p.cd,children:(0,b.jsx)(c.Z,{onClickTab:k,selectedTabUUID:null===y||void 0===y?void 0:y.uuid,tabs:P})}),(!D||Z.uuid===(null===y||void 0===y?void 0:y.uuid))&&(0,b.jsx)(s.Z,j(j({},O),{},{height:n,heightOffset:(t||0)+(D?x:0),pipeline:i})),g.uuid===(null===y||void 0===y?void 0:y.uuid)&&C]})}},58122:function(e,n,t){"use strict";t.d(n,{FS:function(){return s},JZ:function(){return u},e7:function(){return d},wx:function(){return o}});var r=t(75582),i=t(82394),l=t(93348);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){return"string"===typeof e?e:JSON.stringify(e)}function o(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return a(a({},e),{},{value:s(n)})}))}function u(e,n){return n===l.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===l.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function d(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),l=t[0],c=t[1],s=c;try{s=JSON.parse(c)}catch(o){}return a(a({},e),{},(0,i.Z)({},l,s))}),{}):e}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return a}});var r=t(38626),i=t(23831),l=t(73942),c=t(49125),a=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*c.iI,c.cd*c.iI,c.cd*c.iI,40*c.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,c.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*c.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*c.iI,"px;\n ")}))},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return u}});t(82684);var r=t(60328),i=t(67971),l=t(86673),c=t(22341),a=t(73899),s=t(49125),o=t(28598),u=22;n.Z=function(e){var n=e.page,t=e.maxPages,u=e.onUpdate,d=e.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(f/2),b=n-h;n+h>=d?(b=d-f+2,f-=2):n-h<=0?(b=0,f-=2):(f-=4,b=n-Math.floor(f/2)),p=Array.from({length:f},(function(e,n){return n+b}))}return(0,o.jsx)(o.Fragment,{children:d>0&&(0,o.jsxs)(i.ZP,{alignItems:"center",children:[(0,o.jsx)(r.Z,{disabled:0===n,onClick:function(){return u(n-1)},children:(0,o.jsx)(c.Hd,{size:1.5*s.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.Z,{onClick:function(){return u(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(e){return(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.Z,{onClick:function(){e!==n&&u(e)},notClickable:e===n,backgroundColor:e===n&&a.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!p.includes(d-1)&&(0,o.jsxs)(o.Fragment,{children:[!p.includes(d-2)&&(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.Z,{onClick:function(){return u(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,o.jsx)(l.Z,{ml:1}),(0,o.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return u(n+1)},children:(0,o.jsx)(c.Kw,{size:1.5*s.iI,stroke:"#AEAEAE"})})]})})}},43526:function(e,n,t){"use strict";t.d(n,{I7:function(){return r},IB:function(){return s},VV:function(){return l},_7:function(){return c},rn:function(){return a}});var r,i=t(66050),l="datetime",c="code",a=i.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(r||(r={}));var s=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR,r.CUSTOM]},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),l=t(67971),c=t(55378),a=t(86673),s=t(19711),o=t(18025),u=t(49125),d=t(24224),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,b=e.topPosition;return(0,p.jsxs)(o.J,{absolute:!0,topPosition:b,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(a.Z,{mb:2}),(0,p.jsxs)(l.ZP,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(a.Z,{pr:2}),(0,p.jsx)(c.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*u.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(a.Z,{px:1,children:(0,p.jsx)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(c.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*u.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},22673:function(e,n,t){"use strict";var r=t(82684),i=t(68792),l=t(31811),c=t(38626),a=t(65292),s=t(23831),o=t(2005),u=t(49125),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,h=e.source,b=e.wrapLines,v=(0,r.useContext)(c.ThemeContext);function m(e){var r=e.value;return(0,d.jsx)(l.Z,{customStyle:{backgroundColor:(v.background||s.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:o.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*u.iI,paddingTop:2*u.iI},language:n,lineNumberStyle:{color:(v.content||s.Z.content).muted},showLineNumbers:p,style:a._4,useInlineStyles:!0,wrapLines:b,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(m,{value:n})}},children:h})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var r=t(82684),i=t(60328),l=t(67971),c=t(882),a=t(86673),s=t(19711),o=t(99994),u=t(38626),d=t(49125),p=t(37391),f=u.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],d.cd*d.iI,d.cd*d.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),p.w5),h=t(66653),b=t(28598);var v=function(e){var n=e.allowScroll,t=e.compact,u=e.contained,p=e.noPadding,v=e.onClickTab,m=e.regularSizeText,j=e.selectedTabUUID,x=e.small,g=e.tabs,Z=(0,r.useMemo)((function(){var e=g.length,n=[];return g.forEach((function(r,u){var p=r.Icon,f=r.IconSelected,g=r.label,Z=r.uuid,P=Z===j,y=P&&f||p,k=g?g():Z,O=(0,b.jsxs)(l.ZP,{alignItems:"center",children:[y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(y,{default:!P,size:2*d.iI}),(0,b.jsx)(a.Z,{mr:1})]}),(0,b.jsx)(s.ZP,{bold:!0,default:!P,noWrapping:!0,small:!m,children:k})]});u>=1&&e>=2&&n.push((0,b.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(Z))),P?n.push((0,b.jsx)(c.Z,{backgroundGradient:o.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||x,onClick:function(e){(0,h.j)(e),v(r)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:x,children:O},Z)):n.push((0,b.jsx)("div",{style:{padding:2},children:(0,b.jsx)(i.Z,{borderLess:!0,compact:t||x,default:!0,onClick:function(e){(0,h.j)(e),v(r)},outline:!0,small:x,children:O})},"button-tab-".concat(Z)))})),n}),[t,v,j,x,g]),P=(0,b.jsx)(l.ZP,{alignItems:"center",children:Z});return u?P:(0,b.jsx)(f,{allowScroll:n,noPadding:p,children:P})}},12625:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ie}});var r=t(75582),i=t(77837),l=t(82394),c=t(38860),a=t.n(c),s=t(82684),o=t(83455),u=t(34376),d=t(43526),p=t(60328),f=t(34744),h=t(67971),b=t(87372),v=t(51099),m=t(60547),j=t(97496),x=t(47409),g=t(52769),Z=t(55378),P=t(86673),y=t(54283),k=t(87815),O=t(19711),_=t(82531),I=t(56681),w=t(22341),S=t(2850),E=t(49125),C=t(59920),D=t(90211),T=t(58122),N=t(19395),M=t(33766),L=t(7715),A=t(9736),F=t(96510),U=t(66653),R=t(59e3),B=t(28598);function H(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function V(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,c=e.setErrors,a=e.variables,H=(0,A.Ct)(),z=(0,u.useRouter)(),Y=n||{},K=Y.block_uuid,W=Y.end_datetime,J=Y.id,G=Y.interval_type,X=Y.interval_units,q=Y.name,Q=Y.pipeline_run_dates,$=Y.start_datetime,ee=Y.status,ne=Y.total_run_count,te=Y.variables,re=void 0===te?{}:te,ie=l.uuid,le=(0,R.iV)(),ce={_limit:40,_offset:40*(null!==le&&void 0!==le&&le.page?le.page:0)};null!==le&&void 0!==le&&le.status&&(ce.status=le.status);var ae=_.ZP.pipeline_runs.list(V(V({},ce),{},{backfill_id:J}),{refreshInterval:3e3,revalidateOnFocus:!0},{pauseFetch:!J}),se=ae.data,oe=ae.mutate,ue=!($&&W&&G&&X),de=!ee,pe=(0,s.useMemo)((function(){return(de?Q:null===se||void 0===se?void 0:se.pipeline_runs)||[]}),[se,Q,de]),fe=(0,s.useMemo)((function(){var e;return(null===se||void 0===se||null===(e=se.metadata)||void 0===e?void 0:e.count)||[]}),[se]),he=(0,s.useState)(null),be=he[0],ve=he[1],me=(0,s.useMemo)((function(){var e=null!==le&&void 0!==le&&le.page?le.page:0;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(j.Z,{disableRowSelect:de,emptyMessage:null!==le&&void 0!==le&&le.status?"No runs available":'No runs available. Please complete backfill configuration by clicking "Edit backfill" above.',fetchPipelineRuns:oe,onClickRow:function(e){return ve((function(n){var t=pe[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:pe,selectedRun:be,setErrors:c}),(0,B.jsx)(P.Z,{p:2,children:(0,B.jsx)(v.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),t=V(V({},le),{},{page:n>=0?n:0});z.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(ie,"/backfills/").concat(J,"?").concat((0,R.uM)(t)))},page:Number(e),totalPages:Math.ceil(fe/40)})})]})}),[oe,J,pe,ie,le,z,be,de,fe]),je=(0,s.useState)(I.G7[0]),xe=je[0],ge=je[1],Ze=(0,o.Db)(_.ZP.backfills.useUpdate(J),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){i(),oe()},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),Pe=(0,r.Z)(Ze,2),ye=Pe[0],ke=Pe[1].isLoading,Oe=(0,s.useMemo)((function(){return!!ee&&(d.rn.CANCELLED!==ee&&d.rn.FAILED!==ee)}),[ee]),_e=(0,s.useMemo)((function(){return ee&&d.rn.CANCELLED!==ee&&d.rn.FAILED!==ee&&d.rn.INITIAL!==ee&&d.rn.RUNNING!==ee}),[ee]),Ie=(0,s.useMemo)((function(){var e={default:!0,size:1.5*E.iI},n=[[(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(w.VW,V({},e)),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,children:"Backfill type"})]},"backfill_type_label"),(0,B.jsx)(O.ZP,{monospace:!0,children:K?d._7:d.VV},"backfill_type")],[(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(w.rs,V({},e)),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,children:"Status"})]},"backfill_status_label"),(0,B.jsx)(O.ZP,{danger:d.rn.CANCELLED===ee||d.rn.FAILED==ee,default:d.rn.INITIAL===ee,monospace:!0,muted:!ee,success:d.rn.RUNNING===ee||d.rn.COMPLETED===ee,children:ee||"inactive"},"backfill_status")]];return K||n.push.apply(n,[[(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(w.aw,V({},e)),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"backfill_start_date_label"),(0,B.jsx)(O.ZP,{monospace:!0,children:(0,N.Vx)($)},"backfill_start_date")],[(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(w.aw,V({},e)),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,children:"End date and time"})]},"backfill_end_date_label"),(0,B.jsx)(O.ZP,{monospace:!0,children:(0,N.Vx)(W)},"backfill_end_date")],[(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(w.Pf,V({},e)),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,children:"Interval type"})]},"interval_type_label"),(0,B.jsx)(O.ZP,{monospace:!0,children:G&&(0,D.kC)(G)},"interval_type")],[(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(w.Pf,V({},e)),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,children:"Interval units"})]},"interval_units_label"),(0,B.jsx)(O.ZP,{monospace:!0,children:X},"interval_units")],[(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(w.qZ,V({},e)),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,children:"Total runs"})]},"total_runs_label"),(0,B.jsx)(O.ZP,{monospace:!0,children:ne},"total_runs")]]),(0,B.jsx)(k.Z,{columnFlex:[null,1],rows:n})}),[K,W,G,X,$,ee,ne]),we=(0,s.useMemo)((function(){return re||{}}),[re]),Se=(0,s.useMemo)((function(){var e,n=[];return(0,L.Qr)(we)?n=(0,T.wx)(a,(function(e){return e.uuid===g.C})):Object.entries(we).forEach((function(e){var t=(0,r.Z)(e,2),i=t[0],l=t[1];n.push({uuid:i,value:(0,T.FS)(l)})})),"undefined"!==typeof n&&null!==(e=n)&&void 0!==e&&e.length?(0,B.jsx)(k.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,B.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,B.jsx)(O.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[we,a]);return(0,B.jsx)(B.Fragment,{children:(0,B.jsxs)(m.Z,{afterHidden:!be,before:(0,B.jsxs)(S.M,{children:[(0,B.jsxs)(P.Z,{mb:E.HN,pt:E.cd,px:E.cd,children:[(0,B.jsx)(P.Z,{mb:E.cd,children:(0,B.jsx)(w.yg,{size:5*E.iI})}),(0,B.jsx)(b.Z,{children:q})]}),(0,B.jsx)(P.Z,{px:E.cd,children:(0,B.jsx)(b.Z,{level:5,children:"Settings"})}),(0,B.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ie,Se&&(0,B.jsxs)(P.Z,{my:E.HN,children:[(0,B.jsx)(P.Z,{px:E.cd,children:(0,B.jsx)(b.Z,{level:5,children:"Runtime variables"})}),(0,B.jsx)(f.Z,{light:!0,mt:1,short:!0}),Se]})]}),beforeWidth:34*E.iI,breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(ie,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return q},linkProps:{as:"/pipelines/".concat(ie,"/backfills/").concat(J),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],buildSidekick:function(e){return(0,I.ZP)(V(V({},e),{},{selectedRun:be,selectedTab:xe,setSelectedTab:ge}))},errors:t,pageName:C.M.BACKFILLS,pipeline:l,setErrors:c,subheader:(0,B.jsxs)(h.ZP,{alignItems:"center",children:[!_e&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(p.Z,{beforeIcon:Oe?(0,B.jsx)(w.dz,{size:2*E.iI}):(0,B.jsx)(w.Py,{inverted:!(d.rn.CANCELLED===ee||d.rn.FAILED===ee),size:2*E.iI}),danger:Oe,disabled:ue,loading:ke,onClick:function(e){(0,U.j)(e),ye({backfill:{status:Oe?d.rn.CANCELLED:d.rn.INITIAL}})},outline:!0,success:!Oe&&!(d.rn.CANCELLED===ee||d.rn.FAILED===ee)&&!ue,children:Oe?"Cancel backfill":d.rn.CANCELLED===ee||d.rn.FAILED===ee?"Retry backfill":"Start backfill"}),(0,B.jsx)(P.Z,{mr:E.cd})]}),!H&&(0,B.jsxs)(B.Fragment,{children:[ee===x.VO.COMPLETED?(0,B.jsx)(O.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}):(0,B.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(ie,"/backfills/").concat(J,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit backfill"}),(0,B.jsx)(P.Z,{mr:E.cd})]}),!de&&(0,B.jsxs)(Z.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?z.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(ie,"/backfills/").concat(J)):(0,M.u7)({page:0,status:e.target.value})},paddingRight:4*E.iI,placeholder:"Select run status",value:(null===le||void 0===le?void 0:le.status)||"all",children:[(0,B.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),x.IK.map((function(e){return(0,B.jsx)("option",{value:e,children:x.Do[e]},e)}))]})]}),title:function(){return q},uuid:"backfill/detail",children:[(0,B.jsx)(P.Z,{mt:E.cd,px:E.cd,children:(0,B.jsx)(b.Z,{level:5,children:"Runs for this backfill"})}),(0,B.jsx)(f.Z,{light:!0,mt:E.cd,short:!0}),se?me:(0,B.jsx)(P.Z,{m:2,children:(0,B.jsx)(y.Z,{inverted:!0})})]})})},Y=t(2713),K=t(47999),W=t(93461),J=t(82944),G=[{label:function(){return"Date and time window"},description:function(){return"Backfill between a date and time range."},uuid:d.VV}],X=t(18025);function q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Q(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var $=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,c=e.setErrors,a=(e.variables,(0,u.useRouter)()),v=(0,s.useState)(),j=v[0],x=v[1],g=j||{},y=g.block_uuid,I=g.id,S=g.interval_type,M=g.interval_units,A=(g.end_datetime,g.start_datetime,g.name),U=l.uuid,R=(0,s.useState)({}),H=R[0],V=(R[1],(0,s.useState)(y?d._7:d.VV)),z=V[0],q=V[1],$=(0,s.useState)(!1),ee=$[0],ne=$[1],te=(0,s.useState)(!1),re=te[0],ie=te[1],le=(0,s.useState)(null),ce=le[0],ae=le[1],se=(0,s.useState)(null),oe=se[0],ue=se[1],de=(0,s.useState)({hour:"00",minute:"00"}),pe=de[0],fe=de[1],he=(0,s.useState)({hour:"00",minute:"00"}),be=he[0],ve=he[1];(0,s.useEffect)((function(){if(n){x(n);var e=n.start_datetime;if(e){var t=e.split(" ")[1];ue((0,N.eI)(e)),ve({hour:t.substring(0,2),minute:t.substring(3,5)})}var r=n.end_datetime;if(r){var i=r.split(" ")[1];ae((0,N.eI)(r)),fe({hour:i.substring(0,2),minute:i.substring(3,5)})}}}),[n]);var me=(0,s.useMemo)((function(){var e=[[(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(w.KJ,{default:!0,size:1.5*E.iI}),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,children:"Backfill name"})]},"model_name_detail"),(0,B.jsx)(J.Z,{monospace:!0,onChange:function(e){e.preventDefault(),x((function(n){return Q(Q({},n),{},{name:e.target.value})}))},placeholder:"Name this backfill",value:A},"model_name_input_detail")]];return d.VV===z&&e.push.apply(e,[[(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(w.aw,{default:!0,size:1.5*E.iI}),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,B.jsxs)("div",{style:{minHeight:"".concat(5.75*E.iI,"px")},children:[!ee&&(0,B.jsx)(J.Z,{monospace:!0,onClick:function(){return ne((function(e){return!e}))},onFocus:function(){return ne(!0)},placeholder:"YYYY-MM-DD HH:MM",value:oe?"".concat(oe.toISOString().split("T")[0]," ").concat(null===be||void 0===be?void 0:be.hour,":").concat(null===be||void 0===be?void 0:be.minute):""}),(0,B.jsx)("div",{style:{width:"400px"},children:(0,B.jsx)(K.Z,{disableEscape:!0,onClickOutside:function(){return ne(!1)},open:ee,style:{position:"relative"},children:(0,B.jsx)(Y.Z,{selectedDate:oe,selectedTime:be,setSelectedDate:ue,setSelectedTime:ve,topPosition:!0})})})]},"start_time_input")],[(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(w.aw,{default:!0,size:1.5*E.iI}),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,children:"End date and time"})]},"end_time"),(0,B.jsxs)("div",{style:{minHeight:"".concat(5.75*E.iI,"px")},children:[!re&&(0,B.jsx)(J.Z,{monospace:!0,onClick:function(){return ie((function(e){return!e}))},onFocus:function(){return ie(!0)},placeholder:"YYYY-MM-DD HH:MM",value:ce?"".concat(ce.toISOString().split("T")[0]," ").concat(null===pe||void 0===pe?void 0:pe.hour,":").concat(null===pe||void 0===pe?void 0:pe.minute):""}),(0,B.jsx)("div",{style:{width:"400px"},children:(0,B.jsx)(K.Z,{disableEscape:!0,onClickOutside:function(){return ie(!1)},open:re,style:{position:"relative"},children:(0,B.jsx)(Y.Z,{selectedDate:ce,selectedTime:pe,setSelectedDate:ae,setSelectedTime:fe,topPosition:!0})})})]},"end_time_input")],[(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(w.Pf,{default:!0,size:1.5*E.iI}),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,children:"Interval type"})]},"interval_type"),(0,B.jsx)(Z.Z,{monospace:!0,onChange:function(e){e.preventDefault(),x((function(n){return Q(Q({},n),{},{interval_type:e.target.value})}))},placeholder:"Time spacing between each backfill",value:S,children:d.IB.map((function(e){return(0,B.jsx)("option",{value:e,children:(0,D.kC)(e)},e)}))},"interval_type_input")],[(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(w.Pf,{default:!0,size:1.5*E.iI}),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,children:"Interval units"})]},"interval_units"),(0,B.jsx)(J.Z,{disabled:!S,monospace:!0,onChange:function(e){e.preventDefault(),x((function(n){return Q(Q({},n),{},{interval_units:e.target.value})}))},placeholder:S?"Number of ".concat(S).concat(S!==d.I7.CUSTOM?"s":""," between each backfill"):"Interval type is required",type:"number",value:M},"interval_unit_input")]]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(P.Z,{mb:2,px:E.cd,children:(0,B.jsx)(b.Z,{children:"Settings"})}),(0,B.jsx)(f.Z,{light:!0,short:!0}),(0,B.jsx)(k.Z,{columnFlex:[null,1],rows:e})]})}),[ce,oe,S,M,A,z,ee,re,pe,be]),je=(0,o.Db)(_.ZP.backfills.useUpdate(I),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){i(),a.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(U,"/backfills/").concat(I))},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),xe=(0,r.Z)(je,2),ge=xe[0],Ze=xe[1].isLoading,Pe=(0,s.useCallback)((function(){var e=Q(Q({},(0,L.GL)(j,["name"])),{},{end_datetime:null,interval_type:null,interval_units:null,start_datetime:null,variables:(0,T.e7)(H)});return d._7===z||(e.interval_type=S,e.interval_units=M,e.end_datetime=ce&&null!==pe&&void 0!==pe&&pe.hour&&null!==pe&&void 0!==pe&&pe.minute?"".concat(ce.toISOString().split("T")[0]," ").concat(null===pe||void 0===pe?void 0:pe.hour,":").concat(null===pe||void 0===pe?void 0:pe.minute,":00"):null,e.start_datetime=oe&&null!==be&&void 0!==be&&be.hour&&null!==be&&void 0!==be&&be.minute?"".concat(oe.toISOString().split("T")[0]," ").concat(null===be||void 0===be?void 0:be.hour,":").concat(null===be||void 0===be?void 0:be.minute,":00"):null),ge({backfill:e})}),[ce,oe,S,M,j,H,z,pe,be]),ye=(0,s.useMemo)((function(){return d._7===z?!y:!(ce&&oe&&S&&M)}),[y,ce,oe,S,M,z,pe,be]);return(0,B.jsxs)(m.Z,{breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(U,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return null===j||void 0===j?void 0:j.name},linkProps:{as:"/pipelines/".concat(U,"/backfills/").concat(I),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],errors:t,pageName:C.M.BACKFILLS,pipeline:l,setErrors:c,subheader:(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(p.Z,{disabled:ye,loading:Ze,onClick:Pe,outline:!0,primary:!0,children:"Save changes"}),(0,B.jsx)(P.Z,{mr:1}),(0,B.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/backfills/[...slug]",as:"/pipelines/".concat(U,"/backfills/").concat(I)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===j||void 0===j?void 0:j.name)},uuid:"backfill/edit",children:[(0,B.jsxs)(P.Z,{p:E.cd,children:[(0,B.jsxs)(P.Z,{mb:2,children:[(0,B.jsx)(b.Z,{children:"Backfill type"}),(0,B.jsx)(O.ZP,{muted:!0,children:"How would you like this pipeline to be backfilled?"})]}),(0,B.jsx)(h.ZP,{children:G.map((function(e){var n=e.label,t=e.description,r=e.uuid,i=z===r,l=z&&!i;return(0,B.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){q(r)},children:(0,B.jsx)(X.U,{selected:i,children:(0,B.jsxs)(h.ZP,{alignItems:"center",children:[(0,B.jsx)(W.Z,{children:(0,B.jsx)("input",{checked:i,type:"radio"})}),(0,B.jsx)(P.Z,{mr:E.cd}),(0,B.jsxs)(W.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,B.jsx)(b.Z,{bold:!0,default:!i&&!l,level:5,muted:!i&&l,children:n()}),(0,B.jsx)(O.ZP,{default:!i&&!l,leftAligned:!0,muted:l,children:t()})]})]})})},r)}))})]}),(0,B.jsx)(P.Z,{mt:5,children:me})]})},ee=t(41788);function ne(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function te(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ne(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ne(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function re(e){var n=e.backfillId,t=e.pipelineUUID,r=e.subpath,i=(0,s.useState)(null),l=i[0],c=i[1],a=_.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,o=(0,s.useMemo)((function(){return null===a||void 0===a?void 0:a.variables}),[a]),u=_.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,d=(0,s.useMemo)((function(){return te(te({},null===u||void 0===u?void 0:u.pipeline),{},{uuid:t})}),[u,t]),p=_.ZP.backfills.detail(n,{include_preview_runs:!0}),f=p.data,h=p.mutate,b=(0,s.useMemo)((function(){return null===f||void 0===f?void 0:f.backfill}),[f]);return"edit"===r?(0,B.jsx)($,{backfill:b,errors:l,fetchBackfill:h,pipeline:d,setErrors:c,variables:o}):(0,B.jsx)(z,{backfill:b,errors:l,fetchBackfill:h,pipeline:d,setErrors:c,variables:o})}re.getInitialProps=function(){var e=(0,i.Z)(a().mark((function e(n){var t,i,l,c,s,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,i=t.pipeline,l=t.slug,!Array.isArray(l)){e.next=4;break}return c=(0,r.Z)(l,2),s=c[0],o=c[1],e.abrupt("return",{backfillId:s,pipelineUUID:i,subpath:o});case 4:return e.abrupt("return",{pipelineUUID:i});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var ie=(0,ee.Z)(re)},53664:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills/[...slug]",function(){return t(12625)}])}},function(e){e.O(0,[844,9902,426,1774,8792,7849,4495,1424,1005,7815,6422,547,8952,7496,9774,2888,179],(function(){return n=53664,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8450],{17717:function(e,n,t){var r=t(554);!function(){"use strict";var n={977:function(e){function n(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function t(e,n){for(var t,r="",i=0,o=-1,u=0,c=0;c<=e.length;++c){if(c<e.length)t=e.charCodeAt(c);else{if(47===t)break;t=47}if(47===t){if(o===c-1||1===u);else if(o!==c-1&&2===u){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),o=c,u=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=c,u=0;continue}n&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,c):r=e.slice(o+1,c),i=c-o-1;o=c,u=0}else 46===t&&-1!==u?++u:u=-1}return r}var i={resolve:function(){for(var e,i="",o=!1,u=arguments.length-1;u>=-1&&!o;u--){var c;u>=0?c=arguments[u]:(void 0===e&&(e=r.cwd()),c=e),n(c),0!==c.length&&(i=c+"/"+i,o=47===c.charCodeAt(0))}return i=t(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(n(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=t(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];n(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var o=e.length,u=o-r,c=1;c<t.length&&47===t.charCodeAt(c);++c);for(var l=t.length-c,a=u<l?u:l,s=-1,f=0;f<=a;++f){if(f===a){if(l>a){if(47===t.charCodeAt(c+f))return t.slice(c+f+1);if(0===f)return t.slice(c+f)}else u>a&&(47===e.charCodeAt(r+f)?s=f:0===f&&(s=0));break}var d=e.charCodeAt(r+f);if(d!==t.charCodeAt(c+f))break;47===d&&(s=f)}var p="";for(f=r+s+1;f<=o;++f)f!==o&&47!==e.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(c+s):(c+=s,47===t.charCodeAt(c)&&++c,t.slice(c))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,i=-1,o=!0,u=e.length-1;u>=1;--u)if(47===(t=e.charCodeAt(u))){if(!o){i=u;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');n(e);var r,i=0,o=-1,u=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var c=t.length-1,l=-1;for(r=e.length-1;r>=0;--r){var a=e.charCodeAt(r);if(47===a){if(!u){i=r+1;break}}else-1===l&&(u=!1,l=r+1),c>=0&&(a===t.charCodeAt(c)?-1===--c&&(o=r):(c=-1,o=l))}return i===o?o=l:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!u){i=r+1;break}}else-1===o&&(u=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){n(e);for(var t=-1,r=0,i=-1,o=!0,u=0,c=e.length-1;c>=0;--c){var l=e.charCodeAt(c);if(47!==l)-1===i&&(o=!1,i=c+1),46===l?-1===t?t=c:1!==u&&(u=1):-1!==t&&(u=-1);else if(!o){r=c+1;break}}return-1===t||-1===i||0===u||1===u&&t===i-1&&t===r+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,n){var t=n.dir||n.root,r=n.base||(n.name||"")+(n.ext||"");return t?t===n.root?t+r:t+e+r:r}("/",e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,i=e.charCodeAt(0),o=47===i;o?(t.root="/",r=1):r=0;for(var u=-1,c=0,l=-1,a=!0,s=e.length-1,f=0;s>=r;--s)if(47!==(i=e.charCodeAt(s)))-1===l&&(a=!1,l=s+1),46===i?-1===u?u=s:1!==f&&(f=1):-1!==u&&(f=-1);else if(!a){c=s+1;break}return-1===u||-1===l||0===f||1===f&&u===l-1&&u===c+1?-1!==l&&(t.base=t.name=0===c&&o?e.slice(1,l):e.slice(c,l)):(0===c&&o?(t.name=e.slice(1,u),t.base=e.slice(1,l)):(t.name=e.slice(c,u),t.base=e.slice(c,l)),t.ext=e.slice(u,l)),c>0?t.dir=e.slice(0,c-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},t={};function i(e){var r=t[e];if(void 0!==r)return r.exports;var o=t[e]={exports:{}},u=!0;try{n[e](o,o.exports,i),u=!1}finally{u&&delete t[e]}return o.exports}i.ab="//";var o=i(977);e.exports=o}()},19395:function(e,n,t){"use strict";t.d(n,{IJ:function(){return f},M8:function(){return b},Vx:function(){return p},eI:function(){return d},gU:function(){return v},tL:function(){return h},vJ:function(){return g}});var r,i,o=t(82394),u=t(92083),c=t.n(u),l=t(28799);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function f(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,i=n.started_at,u=n.status,l=null;i&&r&&(l=c()(r).valueOf()-c()(i).valueOf());return s(s({},e),{},(0,o.Z)({},t,{runtime:l,status:u}))}),{})}function d(e){if(!e)return null;var n=new Date(c()(e).valueOf()),t=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());return new Date(t)}function p(e){return"string"!==typeof e?e:d(e.split("+")[0]).toISOString().split(".")[0]}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(i||(i={}));var h=(r={},(0,o.Z)(r,i.DAY,86400),(0,o.Z)(r,i.HOUR,3600),(0,o.Z)(r,i.MINUTE,60),(0,o.Z)(r,i.SECOND,1),r);function v(e){var n=i.SECOND,t=e;return e%86400===0?(t/=86400,n=i.DAY):e%3600===0?(t/=3600,n=i.HOUR):e%60===0&&(t/=60,n=i.MINUTE),{time:t,unit:n}}function g(e,n){return e*h[n]}function b(e){var n,t="";return t="".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&&(t="".concat(t,"/").concat(e.token)),(n=window.location.port)&&(t=t.replace(n,l.QT)),t}},43526:function(e,n,t){"use strict";t.d(n,{I7:function(){return r},IB:function(){return l},VV:function(){return o},_7:function(){return u},rn:function(){return c}});var r,i=t(66050),o="datetime",u="code",c=i.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(r||(r={}));var l=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR,r.CUSTOM]},66050:function(e,n,t){"use strict";var r;t.d(n,{V:function(){return r}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(r||(r={}))},47409:function(e,n,t){"use strict";t.d(n,{Az:function(){return l},BF:function(){return c},Do:function(){return s},IK:function(){return u},VO:function(){return o},sZ:function(){return a}});var r,i=t(82394),o=t(66050).V,u=[o.FAILED,o.COMPLETED,o.RUNNING,o.CANCELLED,o.INITIAL],c=[o.INITIAL,o.RUNNING],l=[o.CANCELLED,o.COMPLETED,o.FAILED],a="__mage_variables",s=(r={},(0,i.Z)(r,o.CANCELLED,"Cancelled"),(0,i.Z)(r,o.COMPLETED,"Done"),(0,i.Z)(r,o.FAILED,"Failed"),(0,i.Z)(r,o.INITIAL,"Ready"),(0,i.Z)(r,o.RUNNING,"Running"),r)},98781:function(e,n,t){"use strict";t.d(n,{$1:function(){return s},G7:function(){return d},LM:function(){return p},Mj:function(){return h},QK:function(){return a},a_:function(){return v},qL:function(){return u},r0:function(){return f}});var r,i,o,u,c=t(82394),l=t(22341);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(u||(u={}));var a,s,f,d=(r={},(0,c.Z)(r,u.INTEGRATION,"Integration"),(0,c.Z)(r,u.PYTHON,"Standard"),(0,c.Z)(r,u.PYSPARK,"PySpark"),(0,c.Z)(r,u.STREAMING,"Streaming"),r),p="all",h=(u.PYTHON,u.INTEGRATION,u.STREAMING,i={},(0,c.Z)(i,p,l.ie),(0,c.Z)(i,u.INTEGRATION,l.YC),(0,c.Z)(i,u.PYTHON,l.El),(0,c.Z)(i,u.STREAMING,l.dB),i);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules",e.RETRY="retry"}(a||(a={})),function(e){e.GROUP="group_by",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(s||(s={})),function(e){e.STATUS="status",e.TAG="tag",e.TYPE="type"}(f||(f={}));var v=(o={},(0,c.Z)(o,u.PYTHON,"python3"),(0,c.Z)(o,u.PYSPARK,"pysparkkernel"),o)},30206:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return D}});var r=t(77837),i=t(75582),o=t(38860),u=t.n(o),c=t(82684),l=t(83455),a=t(34376),s=t(12691),f=t.n(s),d=t(43526),p=t(60328),h=t(10919),v=t(87815),g=t(19711),b=t(22341),m=t(47409),y=t(49125),O=t(19395),w=t(9736),E=t(28598);var A=function(e){var n=e.models,t=e.onClickRow,r=e.pipeline,i=e.selectedRow,o=(0,w.Ct)(),u=null===r||void 0===r?void 0:r.uuid,c=[{uuid:"Status"},{uuid:"Name"},{uuid:"Type"},{uuid:"Runs"},{uuid:"Backfill"},{uuid:"Started at"},{uuid:"Completed at"}];return o||c.push({label:function(){return""},uuid:"edit"}),(0,E.jsx)(v.Z,{columnFlex:[null,1,null,null,null,1,1,null],columns:c,isSelectedRow:function(e){return n[e].id===(null===i||void 0===i?void 0:i.id)},onClickRow:function(e){return t(n[e])},rows:n.map((function(e,n){var t=e.block_uuid,r=e.completed_at,i=e.end_datetime,c=e.id,l=e.name,a=e.start_datetime,s=e.started_at,v=e.status,w=e.total_run_count,A=[(0,E.jsx)(g.ZP,{default:!0,monospace:!0,children:v||"inactive"},"status"),(0,E.jsx)(f(),{as:"/pipelines/".concat(u,"/backfills/").concat(c),href:"/pipelines/[pipeline]/backfills/[...slug]",passHref:!0,children:(0,E.jsx)(h.Z,{bold:!0,sameColorAsText:!0,children:l})},"name"),(0,E.jsx)(g.ZP,{default:!0,monospace:!0,children:t?d._7:d.VV},"type"),(0,E.jsx)(g.ZP,{default:!0,monospace:!0,children:w||0},"runs"),(0,E.jsxs)(g.ZP,{default:!0,monospace:!0,children:[a&&i&&(0,E.jsxs)(E.Fragment,{children:[(0,O.Vx)(a),"\xa0-\xa0",(0,O.Vx)(i)]}),!(a&&i)&&"-"]},"backfill"),(0,E.jsx)(g.ZP,{default:!0,monospace:!0,children:s?(0,O.Vx)(s):"-"},"started_at"),(0,E.jsx)(g.ZP,{default:!0,monospace:!0,children:r?(0,O.Vx)(r):"-"},"completed_at")];return o||A.push((0,E.jsx)(p.Z,{default:!0,disabled:v===m.VO.COMPLETED,iconOnly:!0,linkProps:{as:"/pipelines/".concat(u,"/backfills/").concat(c,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noBackground:!0,title:"Edit",children:(0,E.jsx)(b.I8,{default:!0,size:2*y.iI})},"".concat(n,"_edit_button"))),A})),uuid:"pipeline-runs"})},k=t(11135),C=t(60547),N=t(41788),P=t(86673),_=t(82531),I=t(59920),T=t(33766),j=t(96510),Z=t(59e3),S=t(90211);function x(e){var n=e.pipeline,t=(0,a.useRouter)(),r=n.uuid,o=_.ZP.backfills.list({_limit:20,_offset:0,include_run_count:!0,pipeline_uuid:r},{refreshInterval:6e4}),u=o.data,s=(o.mutate,(0,c.useMemo)((function(){return(null===u||void 0===u?void 0:u.backfills)||[]}),[u])),f=(0,Z.iV)(),d=(0,c.useState)(null),p=d[0],h=d[1],v=(0,c.useState)(null),m=v[0],O=v[1];(0,c.useEffect)((function(){null!==f&&void 0!==f&&f.backfill_id?h(null===s||void 0===s?void 0:s.find((function(e){return e.id===Number(f.backfill_id)}))):p&&h(null)}),[s,f,p]);var w=(0,c.useMemo)((function(){var e="/pipelines/".concat(r,"/backfills"),n=[{label:function(){return"Backfills"},linkProps:p?{as:e,href:"/pipelines/[pipeline]/backfills"}:null}];return p&&n.push({label:function(){return p.name}}),n}),[p]),N=(0,l.Db)(_.ZP.backfills.pipelines.useCreate(r),{onSuccess:function(e){return(0,j.wD)(e,{callback:function(e){var n=e.backfill.id;t.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(r,"/backfills/").concat(n,"/edit"))},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}}),x=(0,i.Z)(N,2),D=x[0],R=x[1].isLoading;return(0,E.jsxs)(C.Z,{breadcrumbs:w,errors:m,pageName:I.M.BACKFILLS,pipeline:n,setErrors:O,title:function(e){var n=e.name;return"".concat(n," backfills")},uuid:"".concat(I.M.BACKFILLS,"_").concat(r),children:[(0,E.jsx)(P.Z,{p:y.cd,children:(0,E.jsx)(k.ZP,{beforeElement:(0,E.jsx)(b.mm,{size:2.5*y.iI}),blackBorder:!0,inline:!0,loading:R,noHoverUnderline:!0,onClick:function(){return D({backfill:{name:(0,S.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/Backfills/add_new_backfill",children:"Create new backfill"})}),s&&0===s.length&&(0,E.jsx)(P.Z,{p:y.cd,children:(0,E.jsx)(g.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No backfills available"})}),(null===s||void 0===s?void 0:s.length)>=1&&(0,E.jsx)(A,{models:s,onClickRow:function(e){var n=e.id;return(0,T.u7)({backfill_id:n})},pipeline:n,selectedRow:p})]})}x.getInitialProps=function(){var e=(0,r.Z)(u().mark((function e(n){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var D=(0,N.Z)(x)},33766:function(e,n,t){"use strict";t.d(n,{O2:function(){return f},g_:function(){return p},u7:function(){return d}});var r=t(75582),i=t(82394),o=t(34376),u=t.n(o),c=t(59e3),l=t(24224);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f="_offset";function d(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.preserveParams,i=n.pushHistory,o=n.replaceParams,l=(0,c.iV)(),a={};t&&t.forEach((function(e){l[e]&&(a[e]=l[e])}));var f,d=o?a:l;f=window.location.pathname;var p=i?u().push:u().replace,h=s(s({},d),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete h[t]}));var v=(0,c.uM)(h);v.length>=1&&(v="?".concat(v));var g="".concat(f.split("?")[0]).concat(v),b=u().router.basePath;return b&&g.startsWith(b)&&(g=g.replace(b,"")),p(u().router.pathname,g,{shallow:!0})}function p(e,n,t){var i=t.addingMultipleValues,o=t.isList,u=t.itemsPerPage,c=t.pushHistory,a=void 0!==c&&c,p=t.resetLimitParams,h=s({},e);i?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(t,"[]");h[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1],o=String(i),u="".concat(t,"[]"),c=h[u];c&&Array.isArray(c)?(c=c.map(String)).includes(o)?h[u]=(0,l.Od)(c,(function(e){return e===o})):h[u]=c.concat(o):h[u]=[o]})):h=s(s({},h),n),p&&(h._limit=u||20,h[f]=0),d(h,{pushHistory:a})}},90211:function(e,n,t){"use strict";t.d(n,{RA:function(){return s},kC:function(){return f},vg:function(){return m},kE:function(){return A},Mp:function(){return d},Pb:function(){return l},HW:function(){return O},wX:function(){return p},x6:function(){return h},_6:function(){return v},zf:function(){return y},Y6:function(){return E},wE:function(){return k},J3:function(){return g},We:function(){return a},QV:function(){return w},C5:function(){return b}});var r=t(75582),i=t(17717),o=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],u=(t(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),c=t(24224);function l(e){if(!e)return!1;try{JSON.parse(e)}catch(n){return!1}return!0}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.split(" ").join(n)}function s(e){return e.split(" ").join("_")}function f(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*e)}function p(e){return e.charAt(0).toLowerCase()+e.slice(1)}function h(e){if(null===e||"undefined"===typeof e)return"";var n=e.toString().split("."),t=(0,r.Z)(n,2),i=t[0],o=t[1],u=i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return o?"".concat(u,".").concat(o):u}function v(e,n){var t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=n,o=void 0!==i&&null!==i;if(o||(i=2),1===i)t=e;else{var u=e.length,c=e[u-1];t="y"===c&&"day"!==e?"".concat(e.slice(0,u-1),"ies"):"".concat(e,"s"===c?"es":"s")}if(o){var l=r?h(i):i;return"".concat(l," ").concat(t)}return t}function g(e){return null===e||void 0===e?void 0:e.replace(/_/g," ")}function b(e){var n=e.length;return"ies"===e.slice(n-3,n)?"".concat(e.slice(0,n-3),"y"):"es"===e.slice(n-2,n)&&"ces"!==e.slice(n-3,n)?e.slice(0,n-2):e.slice(0,n-1)}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return f(g(e.toLowerCase()))}function y(e){var n,t=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return t.forEach((function(i,o){if(!n){var u=(0,r.Z)(i,2),c=u[0],l=u[1],a=t.slice(0,o).reduce((function(e,n){return e*Number(n[1])}),1);e<Number(l)*a&&(n=v(c,Math.round(e/a)))}})),n}function O(e){return"undefined"!==typeof e&&null!==e&&!isNaN(e)}function w(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t=Math.pow(10,n);return Math.round((e||0)*t)/t}function E(){return"".concat((0,c.mp)(o)," ").concat((0,c.mp)(u))}function A(e){return null===e||void 0===e?void 0:e.toLowerCase().replace(/\W+/g,"_")}function k(e){var n,t=e.split(i.sep),r=t[t.length-1].split(".");return n=1===r.length?r[0]:r.slice(0,-1).join("."),t.slice(0,t.length-1).concat(n).join(i.sep)}},37459:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills",function(){return t(30206)}])}},function(e){e.O(0,[844,9902,1424,1005,7815,547,9774,2888,179],(function(){return n=37459,e(e.s=n);var n}));var n=e.O();_N_E=n}]);