mage-ai 0.9.13__py3-none-any.whl → 0.9.15__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 (187) 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/PipelineRunPolicy.py +1 -0
  5. mage_ai/api/presenters/BlockRunPresenter.py +4 -1
  6. mage_ai/api/presenters/PipelineRunPresenter.py +2 -0
  7. mage_ai/api/resources/BlockRunResource.py +18 -12
  8. mage_ai/api/resources/GitBranchResource.py +8 -1
  9. mage_ai/api/resources/PipelineResource.py +30 -14
  10. mage_ai/api/resources/PipelineRunResource.py +8 -5
  11. mage_ai/data_integrations/sources/constants.py +1 -0
  12. mage_ai/data_preparation/executors/block_executor.py +5 -7
  13. mage_ai/data_preparation/git/__init__.py +18 -0
  14. mage_ai/data_preparation/models/block/__init__.py +13 -1
  15. mage_ai/data_preparation/models/block/dbt/utils/__init__.py +5 -2
  16. mage_ai/data_preparation/models/block/integration/__init__.py +1 -1
  17. mage_ai/data_preparation/models/custom_templates/utils.py +14 -4
  18. mage_ai/data_preparation/models/variable.py +5 -2
  19. mage_ai/data_preparation/templates/constants.py +16 -0
  20. mage_ai/data_preparation/templates/data_exporters/mssql.py +32 -0
  21. mage_ai/data_preparation/templates/data_loaders/mssql.py +27 -0
  22. mage_ai/io/base.py +5 -0
  23. mage_ai/io/mssql.py +1 -0
  24. mage_ai/orchestration/db/models/base.py +15 -15
  25. mage_ai/orchestration/db/models/oauth.py +35 -4
  26. mage_ai/orchestration/db/models/schedules.py +4 -0
  27. mage_ai/orchestration/pipeline_scheduler.py +12 -6
  28. mage_ai/server/constants.py +1 -1
  29. mage_ai/server/frontend_dist/404.html +2 -2
  30. mage_ai/server/frontend_dist/404.html.html +2 -2
  31. mage_ai/server/frontend_dist/_next/static/chunks/{1005-ee665ba499795660.js → 1005-a2f0e3ee378ef02b.js} +1 -1
  32. mage_ai/server/frontend_dist/_next/static/chunks/1424-fca78f21a81a7183.js +1 -0
  33. mage_ai/server/frontend_dist/_next/static/chunks/2786-756b3834d10b8711.js +1 -0
  34. mage_ai/server/frontend_dist/_next/static/chunks/3391-e1578fe1bdb5a557.js +1 -0
  35. mage_ai/server/frontend_dist/_next/static/chunks/6299-9b785c07dacf22b3.js +1 -0
  36. mage_ai/server/frontend_dist/_next/static/chunks/7496-7e4dd11e3f3b8e79.js +1 -0
  37. mage_ai/server/frontend_dist/_next/static/chunks/8952-050e60a8b1eaa32a.js +1 -0
  38. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/9605-e40d076d9fc36d83.js → frontend_dist/_next/static/chunks/9605-9332e1686c46da7d.js} +1 -1
  39. mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-ccc78f4c29a2a431.js → _app-9dae6fa5126cf001.js} +1 -1
  40. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-03841b6dd7d240f6.js +1 -0
  41. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-6e2c0e3f818fd4de.js +1 -0
  42. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-6e59dc4e57dd2680.js +1 -0
  43. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-02295848c811e26a.js +1 -0
  44. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js +1 -0
  45. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-ddaca2c267def72a.js → syncs-484581ae34a1c596.js} +1 -1
  46. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ce11db27e4af7869.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-91889109af36a793.js} +1 -1
  47. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-ff1faac7a72b1af1.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-624a2d7cbe6303b4.js} +1 -1
  48. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/triggers-eee16a91f281f92d.js → frontend_dist/_next/static/chunks/pages/triggers-71bbb30dd9b57f80.js} +1 -1
  49. mage_ai/server/{frontend_dist_base_path_template/_next/static/gJQ7p6K0VGDZzX1HXtRED → frontend_dist/_next/static/h5mR3pjfn_EQy348CZ_ok}/_buildManifest.js +1 -1
  50. mage_ai/server/frontend_dist/files.html +2 -2
  51. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  52. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  53. mage_ai/server/frontend_dist/index.html +2 -2
  54. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  55. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  56. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  57. mage_ai/server/frontend_dist/manage/users.html +2 -2
  58. mage_ai/server/frontend_dist/manage.html +2 -2
  59. mage_ai/server/frontend_dist/overview.html +2 -2
  60. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  61. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  62. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  63. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  64. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  65. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  66. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  67. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  68. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  69. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  70. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  71. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  72. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  73. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  74. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  75. mage_ai/server/frontend_dist/pipelines.html +2 -2
  76. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  77. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  78. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  79. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  80. mage_ai/server/frontend_dist/settings.html +2 -2
  81. mage_ai/server/frontend_dist/sign-in.html +11 -11
  82. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  83. mage_ai/server/frontend_dist/templates.html +2 -2
  84. mage_ai/server/frontend_dist/terminal.html +2 -2
  85. mage_ai/server/frontend_dist/test.html +3 -3
  86. mage_ai/server/frontend_dist/triggers.html +2 -2
  87. mage_ai/server/frontend_dist/version-control.html +2 -2
  88. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  89. mage_ai/server/frontend_dist_base_path_template/404.html.html +2 -2
  90. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1005-ee665ba499795660.js → 1005-a2f0e3ee378ef02b.js} +1 -1
  91. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1424-fca78f21a81a7183.js +1 -0
  92. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2786-756b3834d10b8711.js +1 -0
  93. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3391-e1578fe1bdb5a557.js +1 -0
  94. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-9b785c07dacf22b3.js +1 -0
  95. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7496-7e4dd11e3f3b8e79.js +1 -0
  96. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-050e60a8b1eaa32a.js +1 -0
  97. mage_ai/server/{frontend_dist/_next/static/chunks/9605-e40d076d9fc36d83.js → frontend_dist_base_path_template/_next/static/chunks/9605-9332e1686c46da7d.js} +1 -1
  98. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-ccc78f4c29a2a431.js → _app-9dae6fa5126cf001.js} +1 -1
  99. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-03841b6dd7d240f6.js +1 -0
  100. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-6e2c0e3f818fd4de.js +1 -0
  101. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-6e59dc4e57dd2680.js +1 -0
  102. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-02295848c811e26a.js +1 -0
  103. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js +1 -0
  104. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-ddaca2c267def72a.js → syncs-484581ae34a1c596.js} +1 -1
  105. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ce11db27e4af7869.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-91889109af36a793.js} +1 -1
  106. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-ff1faac7a72b1af1.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-624a2d7cbe6303b4.js} +1 -1
  107. mage_ai/server/{frontend_dist/_next/static/chunks/pages/triggers-eee16a91f281f92d.js → frontend_dist_base_path_template/_next/static/chunks/pages/triggers-71bbb30dd9b57f80.js} +1 -1
  108. mage_ai/server/{frontend_dist/_next/static/O4HzlRY2U3Q47jF8s3D-E → frontend_dist_base_path_template/_next/static/xykYLW_ARw5SevdiponLI}/_buildManifest.js +1 -1
  109. mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
  110. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
  111. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
  112. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  113. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
  114. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
  115. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
  116. mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
  117. mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
  118. mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
  119. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
  120. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  121. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
  122. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  123. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
  124. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  125. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  126. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
  127. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
  128. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
  129. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
  130. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
  131. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  132. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
  133. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  134. mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
  135. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
  136. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
  137. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
  138. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
  139. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  140. mage_ai/server/frontend_dist_base_path_template/sign-in.html +11 -11
  141. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
  142. mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
  143. mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
  144. mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
  145. mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
  146. mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
  147. mage_ai/server/server.py +12 -1
  148. mage_ai/services/spark/spark.py +75 -2
  149. mage_ai/shared/retry.py +1 -1
  150. mage_ai/tests/data_preparation/models/custom_templates/__init__.py +0 -0
  151. mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +36 -0
  152. mage_ai/tests/data_preparation/models/test_block.py +48 -0
  153. mage_ai/tests/services/spark/__init__.py +0 -0
  154. mage_ai/tests/services/spark/test_spark.py +52 -0
  155. {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/METADATA +1 -1
  156. {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/RECORD +164 -159
  157. mage_ai/server/frontend_dist/_next/static/chunks/1424-846b754e84e6eac1.js +0 -1
  158. mage_ai/server/frontend_dist/_next/static/chunks/2786-ba6f486fcaf52ba0.js +0 -1
  159. mage_ai/server/frontend_dist/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +0 -1
  160. mage_ai/server/frontend_dist/_next/static/chunks/6299-fcb702d0f3d3291b.js +0 -1
  161. mage_ai/server/frontend_dist/_next/static/chunks/7496-7d0f9adf0b333801.js +0 -1
  162. mage_ai/server/frontend_dist/_next/static/chunks/8952-9d6fa18fa9378989.js +0 -1
  163. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +0 -1
  164. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +0 -1
  165. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-615ab9e61f0f39ed.js +0 -1
  166. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +0 -1
  167. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-df014ddb14ebcef4.js +0 -1
  168. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1424-846b754e84e6eac1.js +0 -1
  169. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2786-ba6f486fcaf52ba0.js +0 -1
  170. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +0 -1
  171. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-fcb702d0f3d3291b.js +0 -1
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7496-7d0f9adf0b333801.js +0 -1
  173. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-9d6fa18fa9378989.js +0 -1
  174. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +0 -1
  175. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +0 -1
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-615ab9e61f0f39ed.js +0 -1
  177. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +0 -1
  178. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-df014ddb14ebcef4.js +0 -1
  179. mage_ai/tests/orchestration/db/test_models.py +0 -710
  180. /mage_ai/server/frontend_dist/_next/static/{O4HzlRY2U3Q47jF8s3D-E → h5mR3pjfn_EQy348CZ_ok}/_middlewareManifest.js +0 -0
  181. /mage_ai/server/frontend_dist/_next/static/{O4HzlRY2U3Q47jF8s3D-E → h5mR3pjfn_EQy348CZ_ok}/_ssgManifest.js +0 -0
  182. /mage_ai/server/frontend_dist_base_path_template/_next/static/{gJQ7p6K0VGDZzX1HXtRED → xykYLW_ARw5SevdiponLI}/_middlewareManifest.js +0 -0
  183. /mage_ai/server/frontend_dist_base_path_template/_next/static/{gJQ7p6K0VGDZzX1HXtRED → xykYLW_ARw5SevdiponLI}/_ssgManifest.js +0 -0
  184. {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/LICENSE +0 -0
  185. {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/WHEEL +0 -0
  186. {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/entry_points.txt +0 -0
  187. {mage_ai-0.9.13.dist-info → mage_ai-0.9.15.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7496],{65597:function(e,n,i){i.d(n,{f:function(){return l}});var t=i(38626),r=i(23831),u=i(49125),o=i(73942),l=t.default.div.withConfig({displayName:"Tablestyle__PopupContainerStyle",componentId:"sc-8ammqd-0"})(["position:absolute;max-height:","px;z-index:10;border-radius:","px;padding:","px;"," "," "," ",""],58*u.iI,o.TR,2*u.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||r.Z.shadow).popup,";\n background-color: ").concat((e.theme.interactive||r.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 ")}))},97496:function(e,n,i){var t=i(82394),r=i(75582),u=i(12691),o=i.n(u),l=i(34376),c=i.n(l),s=i(82684),d=i(83455),a=i(60328),p=i(38341),f=i(47999),h=i(93461),_=i(67971),v=i(10919),b=i(47409),x=i(86673),j=i(54283),g=i(87815),O=i(19711),C=i(82531),E=i(23831),I=i(73942),Z=i(22341),m=i(65597),w=i(93348),y=i(45838),P=i(49125),N=i(19395),D=i(24224),k=i(9736),L=i(96510),T=i(28598);function A(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function R(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?A(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function S(e){var n=e.cancelingRunId,i=e.disabled,t=e.isLoadingCancelPipeline,u=e.onCancel,o=e.onSuccess,l=e.pipelineRun,c=e.setCancelingRunId,p=e.setErrors,h=e.setShowConfirmationId,v=e.showConfirmationId,g=(0,k.Ct)(),y=l||{},N=y.id,D=y.pipeline_schedule_id,A=y.pipeline_schedule_token,R=y.pipeline_schedule_type,S=y.status,V=t&&N===n&&b.VO.RUNNING===S,U=(0,d.Db)(w.Xm.API===R&&A?C.ZP.pipeline_runs.pipeline_schedules.useCreateWithParent(D,A):C.ZP.pipeline_runs.pipeline_schedules.useCreate(D),{onSuccess:function(e){return(0,L.wD)(e,{callback:function(){o()},onErrorCallback:function(e,n){return null===p||void 0===p?void 0:p({errors:n,response:e})}})}}),M=(0,r.Z)(U,1)[0],F=(0,s.useCallback)((function(){h(null),M({pipeline_run:{backfill_id:null===l||void 0===l?void 0:l.backfill_id,event_variables:(null===l||void 0===l?void 0:l.event_variables)||{},execution_date:null===l||void 0===l?void 0:l.execution_date,pipeline_schedule_id:null===l||void 0===l?void 0:l.pipeline_schedule_id,pipeline_uuid:null===l||void 0===l?void 0:l.pipeline_uuid,variables:(null===l||void 0===l?void 0:l.variables)||{}}})}),[M,l,h]),H=(0,s.useCallback)((function(){h(null),c(N),u({id:N,status:b.VO.CANCELLED})}),[u,N,c,h]);return(0,T.jsxs)("div",{style:{position:"relative"},children:[(0,T.jsx)(a.Z,{backgroundColor:V&&E.Z.accent.yellow,beforeIcon:b.VO.INITIAL!==S&&!i&&(0,T.jsxs)(T.Fragment,{children:[b.VO.COMPLETED===S&&(0,T.jsx)(Z.Jr,{size:2*P.iI}),[b.VO.FAILED,b.VO.CANCELLED].includes(S)&&(0,T.jsx)(Z.Py,{inverted:b.VO.CANCELLED===S&&!g,size:2*P.iI}),[b.VO.RUNNING].includes(S)&&(0,T.jsx)(j.Z,{color:V?E.Z.status.negative:E.Z.monotone.white,small:!0})]}),borderRadius:I.D7,danger:b.VO.FAILED===S&&!g,default:b.VO.INITIAL===S,disabled:i||g,loading:!l,onClick:function(){return h(N)},padding:"6px",primary:b.VO.RUNNING===S&&!V&&!g,warning:b.VO.CANCELLED===S&&!g,children:i?"Ready":V?"Canceling":b.Do[S]}),(0,T.jsx)(f.Z,{onClickOutside:function(){return h(null)},open:v===N,children:(0,T.jsxs)(m.f,{children:[[b.VO.RUNNING,b.VO.INITIAL].includes(S)&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(O.ZP,{bold:!0,color:"#9ECBFF",children:"Run is in progress"}),(0,T.jsx)(x.Z,{mb:1}),(0,T.jsxs)(O.ZP,{children:["This pipeline run is currently ongoing. Retrying will cancel",(0,T.jsx)("br",{}),"the current pipeline run."]}),(0,T.jsx)(O.ZP,{}),(0,T.jsx)(x.Z,{mt:1,children:(0,T.jsxs)(_.ZP,{children:[(0,T.jsx)(a.Z,{onClick:function(){H(),F()},children:"Retry run"}),(0,T.jsx)(x.Z,{ml:1}),(0,T.jsx)(a.Z,{onClick:H,children:"Cancel run"})]})})]}),[b.VO.CANCELLED,b.VO.FAILED,b.VO.COMPLETED].includes(S)&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(O.ZP,{bold:!0,color:"#9ECBFF",children:["Run ",S]}),(0,T.jsx)(x.Z,{mb:1}),(0,T.jsx)(O.ZP,{children:"Retry the run with changes you have made to the pipeline."}),(0,T.jsx)(x.Z,{mb:1}),(0,T.jsx)(a.Z,{onClick:F,children:"Retry run"})]})]})})]})}n.Z=function(e){var n=e.allowBulkSelect,i=e.disableRowSelect,u=e.emptyMessage,l=void 0===u?"No runs available":u,f=e.fetchPipelineRuns,j=e.hideTriggerColumn,E=e.onClickRow,m=e.pipelineRuns,w=e.selectedRun,k=e.selectedRuns,A=e.setSelectedRuns,V=e.setErrors,U=(0,s.useState)(null),M=U[0],F=U[1],H=(0,s.useState)(null),B=H[0],Y=H[1],z=(0,d.Db)((function(e){var n=e.id,i=e.status;return C.ZP.pipeline_runs.useUpdate(n)({pipeline_run:{status:i}})}),{onSuccess:function(e){return(0,L.wD)(e,{callback:function(){F(null),null===f||void 0===f||f()},onErrorCallback:function(e,n){F(null),null===V||void 0===V||V({errors:n,response:e})}})}}),G=(0,r.Z)(z,2),J=G[0],K=G[1].isLoading,q=[null,1,2],Q=[{uuid:"Status"},{uuid:"Pipeline UUID"},{uuid:"Date"}];j||(q.push(1),Q.push({uuid:"Trigger"})),q.push.apply(q,[1,null,null]),Q.push.apply(Q,[{uuid:"Block runs"},{uuid:"Completed"},{uuid:"Logs"}]);var W=(0,s.useMemo)((function(){return m.every((function(e){var n=e.id;return!(null===k||void 0===k||!k[n])}))}),[m,k]);return n&&(q.unshift(null),Q.unshift({label:function(){return(0,T.jsx)(p.Z,{checked:W,onClick:function(){var e=(0,D.HK)(m||[],(function(e){return e.id}));A(W?{}:e)}})},uuid:"Selected"})),!i&&E&&(q.push(null),Q.push({label:function(){return""},uuid:"action"})),(0,T.jsx)(y.cl,{minHeight:30*P.iI,overflowVisible:!!B,children:0===(null===m||void 0===m?void 0:m.length)?(0,T.jsx)(x.Z,{px:3,py:1,children:(0,T.jsx)(O.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:l})}):(0,T.jsx)(g.Z,{columnFlex:q,columns:Q,isSelectedRow:function(e){return!i&&m[e].id===(null===w||void 0===w?void 0:w.id)},onClickRow:i?null:E,rowVerticalPadding:6,rows:null===m||void 0===m?void 0:m.map((function(e,r){var u,l,s=e.block_runs_count,d=e.completed_at,g=e.execution_date,C=e.id,w=e.pipeline_schedule_id,y=e.pipeline_schedule_name,D=e.pipeline_uuid,L=e.status,U=!C&&!L,H=[];r>0&&m[r-1].execution_date===e.execution_date&&m[r-1].pipeline_schedule_id===e.pipeline_schedule_id?(H=[(0,T.jsx)(x.Z,{ml:1,children:(0,T.jsxs)(_.ZP,{alignItems:"center",children:[(0,T.jsx)(Z.TT,{size:2*P.iI,useStroke:!0}),(0,T.jsx)(a.Z,{borderRadius:I.D7,notClickable:!0,padding:"6px",children:(0,T.jsx)(O.ZP,{muted:!0,children:b.Do[L]})})]})},"row_status"),(0,T.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:D},"row_pipeline_uuid"),(0,T.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_date_retry")],j||H.push((0,T.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_trigger_retry")),(u=H).push.apply(u,[(0,T.jsx)(o(),{as:"/pipelines/".concat(D,"/runs/").concat(C),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,T.jsx)(v.Z,{bold:!0,muted:!0,children:"See block runs (".concat(s,")")})},"row_block_runs"),(0,T.jsx)(O.ZP,{monospace:!0,muted:!0,children:d&&(0,N.Vx)(d)||"-"},"row_completed"),(0,T.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return c().push("/pipelines/".concat(D,"/logs?pipeline_run_id[]=").concat(C))},children:(0,T.jsx)(Z.B4,{default:!0,size:2*P.iI})},"row_logs")])):(H=[(0,T.jsx)(S,{cancelingRunId:M,disabled:U,isLoadingCancelPipeline:K,onCancel:J,onSuccess:f,pipelineRun:e,setCancelingRunId:F,setErrors:V,setShowConfirmationId:Y,showConfirmationId:B},"row_retry_button"),(0,T.jsx)(O.ZP,{default:!0,monospace:!0,children:D},"row_pipeline_uuid"),(0,T.jsx)(O.ZP,{default:!0,monospace:!0,children:g&&(0,N.Vx)(g)||"-"},"row_date")],j||H.push((0,T.jsx)(o(),{as:"/pipelines/".concat(D,"/triggers/").concat(w),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,T.jsx)(v.Z,{bold:!0,sameColorAsText:!0,children:y})},"row_trigger")),(l=H).push.apply(l,[(0,T.jsx)(o(),{as:"/pipelines/".concat(D,"/runs/").concat(C),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,T.jsx)(v.Z,{bold:!0,disabled:U,sameColorAsText:!0,children:U?"":"See block runs (".concat(s,")")})},"row_block_runs"),(0,T.jsx)(O.ZP,{default:!0,monospace:!0,children:d&&(0,N.Vx)(d)||"-"},"row_completed"),(0,T.jsx)(a.Z,{default:!0,disabled:U,iconOnly:!0,noBackground:!0,onClick:function(){return c().push("/pipelines/".concat(D,"/logs?pipeline_run_id[]=").concat(C))},children:(0,T.jsx)(Z.B4,{default:!0,size:2*P.iI})},"row_item_13")]));if(n){var z=!(null===k||void 0===k||!k[C]);H.unshift((0,T.jsx)(p.Z,{checked:z,onClick:function(){A((function(n){return R(R({},n),{},(0,t.Z)({},C,z?null:e))}))}},"selected-pipeline-run-".concat(C)))}return!i&&E&&H.push((0,T.jsx)(h.Z,{flex:1,justifyContent:"flex-end",children:(0,T.jsx)(Z._Q,{default:!0,size:2*P.iI})})),H})),uuid:"pipeline-runs"})})}},19395:function(e,n,i){i.d(n,{IJ:function(){return a},M8:function(){return b},Vx:function(){return f},eI:function(){return p},gU:function(){return _},tL:function(){return h},vJ:function(){return v}});var t,r,u=i(82394),o=i(92083),l=i.n(o),c=i(28799);function s(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function d(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?s(Object(i),!0).forEach((function(n){(0,u.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function a(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var i=n.block_uuid,t=n.completed_at,r=n.started_at,o=n.status,c=null;r&&t&&(c=l()(t).valueOf()-l()(r).valueOf());return d(d({},e),{},(0,u.Z)({},i,{runtime:c,status:o}))}),{})}function p(e){if(!e)return null;var n=new Date(l()(e).valueOf()),i=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());return new Date(i)}function f(e){return"string"!==typeof e?e:p(e.split("+")[0]).toISOString().split(".")[0]}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(r||(r={}));var h=(t={},(0,u.Z)(t,r.DAY,86400),(0,u.Z)(t,r.HOUR,3600),(0,u.Z)(t,r.MINUTE,60),(0,u.Z)(t,r.SECOND,1),t);function _(e){var n=r.SECOND,i=e;return e%86400===0?(i/=86400,n=r.DAY):e%3600===0?(i/=3600,n=r.HOUR):e%60===0&&(i/=60,n=r.MINUTE),{time:i,unit:n}}function v(e,n){return e*h[n]}function b(e){var n,i="";return i="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(i="".concat(i,"/").concat(e.token)),(n=window.location.port)&&(i=i.replace(n,c.QT)),i}},47409:function(e,n,i){i.d(n,{Az:function(){return c},BF:function(){return l},Do:function(){return d},IK:function(){return o},VO:function(){return u},sZ:function(){return s}});var t,r=i(82394),u=i(66050).V,o=[u.FAILED,u.COMPLETED,u.RUNNING,u.CANCELLED,u.INITIAL],l=[u.INITIAL,u.RUNNING],c=[u.CANCELLED,u.COMPLETED,u.FAILED],s="__mage_variables",d=(t={},(0,r.Z)(t,u.CANCELLED,"Cancelled"),(0,r.Z)(t,u.COMPLETED,"Done"),(0,r.Z)(t,u.FAILED,"Failed"),(0,r.Z)(t,u.INITIAL,"Ready"),(0,r.Z)(t,u.RUNNING,"Running"),t)},93348:function(e,n,i){i.d(n,{TR:function(){return a},U5:function(){return c},Xm:function(){return u},Z4:function(){return d},fq:function(){return l},kJ:function(){return s}});var t,r,u,o=i(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(u||(u={}));var l,c,s,d=(t={},(0,o.Z)(t,u.API,(function(){return"API"})),(0,o.Z)(t,u.EVENT,(function(){return"event"})),(0,o.Z)(t,u.TIME,(function(){return"schedule"})),t);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(l||(l={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(c||(c={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(s||(s={}));var a=(r={},(0,o.Z)(r,s.CREATED_AT,"Created at"),(0,o.Z)(r,s.NAME,"Name"),(0,o.Z)(r,s.PIPELINE,"Pipeline"),(0,o.Z)(r,s.STATUS,"Status"),(0,o.Z)(r,s.TYPE,"Type"),r)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8952],{35438:function(n,e,o){o.d(e,{Ai:function(){return l},Jo:function(){return r},bJ:function(){return c},rl:function(){return t}});var t,i=o(86422),r=(o(49125).iI,1e4),l={compact:!0},c={height:10,width:10};i.tf.DATA_EXPORTER,i.tf.SENSOR,i.Lq.GREY,i.Lq.PINK,i.Lq.TEAL,i.Lq.YELLOW;!function(n){n.NORTH="NORTH",n.SOUTH="SOUTH"}(t||(t={}))},48952:function(n,e,o){o.d(e,{Z:function(){return yn}});var t=o(75582),i=o(21831),r=o(82394),l=o(26304),c=o(77837),u=o(38860),d=o.n(u),a=o(51774),s=o.n(a),v=o(38626),f=o(4804),p=o(82684),h=o(83455),b=o(18283),m=o(86422),k=o(16634),g=o(93461),x=o(67971),y=o(86673),O=o(54283),C=o(19711),j=o(23831),E=o(22341),I=o(73942),T=o(49125),Z=3*T.iI,w=v.default.div.withConfig({displayName:"indexstyle__NodeStyle",componentId:"sc-kc7274-0"})(["border-radius:","px;border:1px solid transparent;min-width:fit-content;overflow:hidden;"," "," "," "," "," "," "," ",""],I.n_,(function(n){return"\n background-color: ".concat((n.theme.background||j.Z.background).codeTextarea,";\n ")}),(function(n){return n.borderColor&&"\n border-color: ".concat(n.borderColor,";\n ")}),(function(n){return n.selected&&"\n border-color: ".concat((n.theme.content||j.Z.content).active,";\n ")}),(function(n){return(n.isCancelled||n.disabled)&&"\n // opacity doesn\u2019t work on Safari\n border-color: ".concat((n.theme.content||j.Z.content).muted,";\n border-style: dotted;\n cursor: not-allowed;\n opacity: 0.5;\n ")}),(function(n){return n.isConditionFailed&&"\n background-color: ".concat((n.theme.content||j.Z.content).disabled,";\n cursor: not-allowed;\n ")}),(function(n){return n.isConditionFailed&&"\n background-color: ".concat((n.theme.content||j.Z.content).disabled,";\n cursor: not-allowed;\n ")}),(function(n){return n.disabled&&"\n &:hover {\n cursor: not-allowed;\n }\n "}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")})),_=v.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-kc7274-1"})(["height:","px;width:","px;"],2*T.iI,2*T.iI),A=v.default.div.withConfig({displayName:"indexstyle__IconStyle",componentId:"sc-kc7274-2"})(["align-items:center;border-radius:","px;border:2px solid transparent;display:flex;height:","px;justify-content:center;width:","px;"," ",""],I.BG,5*T.iI,5*T.iI,(function(n){return n.backgroundColor&&"\n background-color: ".concat(n.backgroundColor,";\n border-color: ").concat(n.backgroundColor,";\n ")}),(function(n){return n.borderColor&&"\n border-color: ".concat(n.borderColor,";\n ")})),D=v.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-kc7274-3"})(["padding:","px;",""],1*T.iI,(function(n){return"\n background-color: ".concat((n.theme.background||j.Z.background).dashboard,";\n ")})),S=v.default.div.withConfig({displayName:"indexstyle__BodyStyle",componentId:"sc-kc7274-4"})(["padding-left:","px;padding-right:","px;"],1*T.iI,1*T.iI),R=(v.default.div.withConfig({displayName:"indexstyle__RuntimeStyle",componentId:"sc-kc7274-5"})(["margin-right:","px;padding:12px 4px;height:100%;width:50px;background:rgba(0,0,0,0.2);background-blend-mode:soft-light;"],2*T.iI),o(98781)),P=o(75968),N=o(25958),B=T.cd,L=T.cd*T.iI,M=2*T.iI,F=7.43,H=2*T.iI+5*T.iI,U=2*T.iI+5*T.iI+L+L+M,G=30*T.iI;function V(n){var e=(0,P.MS)(n);if((null===e||void 0===e?void 0:e.length)>=1)return(null===e||void 0===e?void 0:e.map((function(n){return n.title})).join(", "))||"";if(m.tf.GLOBAL_DATA_PRODUCT===(null===n||void 0===n?void 0:n.type)){var o,t=null===n||void 0===n||null===(o=n.configuration)||void 0===o?void 0:o.global_data_product;if(null!==t&&void 0!==t&&t.uuid)return null===t||void 0===t?void 0:t.uuid}return m.dO[null===n||void 0===n?void 0:n.language]||""}function q(n,e){var o,t=n.type,i=(null===m.V4||void 0===m.V4?void 0:m.V4[t])||t;if(R.qL.INTEGRATION===(null===e||void 0===e?void 0:e.type)&&m.tf.TRANSFORMER!==n.type){var r,l={};if(m.t6.YAML===n.language&&(l=(0,f.Qc)(n.content)),m.tf.DATA_LOADER===n.type)o="".concat(n.uuid,": ").concat(null===(r=l)||void 0===r?void 0:r.source);else if(m.tf.DATA_EXPORTER===n.type){var c;o="".concat(n.uuid,": ").concat(null===(c=l)||void 0===c?void 0:c.destination)}}else if(m.tf.DBT===n.type&&m.t6.SQL===n.language){var u=(0,N.IU)(n),d=u.name,a=u.project;o=d,i="".concat(i,"/").concat(a)}return null!==n&&void 0!==n&&n.replicated_block&&(o=null===n||void 0===n?void 0:n.replicated_block,i=null===n||void 0===n?void 0:n.uuid),o||(o=n.uuid),{displayText:o,subtitle:i}}function J(n,e){return q(n,e).displayText||""}function X(n,e){return q(n,e).subtitle||""}function z(n){var e=0;return null===n||void 0===n||n.forEach((function(n,o){var t=n.uuid;e+=4+t.length*F,o>=1&&(e+=4)})),e}function Q(n,e,o){var t,i=0,r=2+H,l=W(n,e,o)-(2+2*T.iI),c=V(n),u=(null===c||void 0===c?void 0:c.length)*F;if(u>=1){var d=1;u>l&&(d=Math.ceil(u/l)),i+=1,r+=18*d}var a=o||{},s=a.blockStatus;return[a.callbackBlocks,a.conditionalBlocks,a.extensionBlocks].forEach((function(n){if((null===n||void 0===n?void 0:n.length)>=1){var e=z(n),o=1;e>l&&(o=Math.ceil(e/l)),i+=1,r+=18.5*o+4*(o-1)}})),"undefined"!==typeof(null===s||void 0===s||null===(t=s[n.uuid])||void 0===t?void 0:t.runtime)&&(r+=18,i+=1),r+=(i+=1)*(1*T.iI)}function W(n,e,o){var t,r,l=Math.max(8.62*(null===(t=J(n,e))||void 0===t?void 0:t.length),(null===(r=X(n,e))||void 0===r?void 0:r.length)*F),c=V(n),u=(null===c||void 0===c?void 0:c.length)*F,d=o||{},a=d.callbackBlocks,s=d.conditionalBlocks,v=d.extensionBlocks,f=Math.max.apply(Math,(0,i.Z)([a,s,v].map((function(n){return z(n)})).concat(u)));return f>l&&(l=Math.min(G,f)),2+U+l}var K,Y=o(44162),$=o(35438),nn=o(90211),en=function(n){var e=n/1e3,o=4-Math.floor(e).toString().length,t=(0,nn.QV)(e,o>=0?o:0),i="s";return t>1e3&&(t=(0,nn.QV)(t/60,0),i="m"),"".concat(t).concat(i)},on=function(n,e){var o=n||{},t=o.id,i=o.side,r=null===e||void 0===e?void 0:e.id;return i===$.rl.NORTH?null===t||void 0===t?void 0:t.endsWith("".concat(r,"-to")):i===$.rl.SOUTH&&(null===t||void 0===t?void 0:t.startsWith(r))},tn=o(28598),rn=(K={},(0,r.Z)(K,m.tf.DATA_EXPORTER,E.zS),(0,r.Z)(K,m.tf.DATA_LOADER,E.rH),(0,r.Z)(K,m.tf.DBT,E.xE),(0,r.Z)(K,m.tf.GLOBAL_DATA_PRODUCT,E.ie),(0,r.Z)(K,m.tf.SENSOR,E.LM),(0,r.Z)(K,m.tf.TRANSFORMER,E.Sv),K);var ln=function(n){var e=n.block,o=n.callbackBlocks,t=n.conditionalBlocks,i=n.disabled,r=n.extensionBlocks,l=n.height,c=n.hideStatus,u=n.pipeline,d=n.selected,a=n.hasFailed,s=n.isCancelled,f=n.isConditionFailed,h=n.isInProgress,I=n.isQueued,T=n.isSuccessful,R=n.runtime,P=(0,p.useContext)(v.ThemeContext),N=!(h||I||a||T||s||f),L=a&&!(h||I),F=!L&&T&&!(h||I),H="";N?H="No status":F?H="Successful execution":L?H="Failed execution":h?H="Currently executiing":s&&(H="Cancelled execution");var U=e.color,G=e.type,q=(0,Y.qn)(G,{blockColor:U,theme:P}).accent,z=(0,p.useMemo)((function(){return V(e)}),[e]),Q=(0,p.useMemo)((function(){var n,e,o=rn[G]||E.EJ,t=!1;return[m.tf.CALLBACK,m.tf.CHART,m.tf.CONDITIONAL,m.tf.CUSTOM,m.tf.DATA_EXPORTER,m.tf.DATA_LOADER,m.tf.EXTENSION,m.tf.SCRATCHPAD,m.tf.SENSOR,m.tf.MARKDOWN,m.tf.TRANSFORMER].includes(G)?n=q:[m.tf.DBT].includes(G)&&(e=q),[m.tf.DATA_EXPORTER].includes(G)&&(t=!0),(0,tn.jsx)(A,{backgroundColor:n,borderColor:e,children:(0,tn.jsx)("div",{style:{height:Z,width:Z},children:(0,tn.jsx)(o,{inverted:t,size:Z})})})}),[q,G]);return(0,tn.jsxs)(w,{borderColor:q,disabled:i,height:l,isCancelled:s,isConditionFailed:f,selected:d,children:[(0,tn.jsx)(D,{children:(0,tn.jsxs)(x.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,tn.jsxs)(g.Z,{flex:1,children:[Q,(0,tn.jsx)(y.Z,{mr:B}),(0,tn.jsxs)(g.Z,{flexDirection:"column",children:[(0,tn.jsx)(C.ZP,{bold:!0,monospace:!0,children:J(e,u)}),(0,tn.jsx)(C.ZP,{default:!0,monospace:!0,small:!0,children:X(e,u)})]})]}),(0,tn.jsx)(y.Z,{mr:"15px"}),(0,tn.jsx)(_,{title:H,children:!c&&(0,tn.jsxs)(tn.Fragment,{children:[h&&(0,tn.jsx)(O.Z,{color:(P||j.Z).content.active,small:!0}),F&&(0,tn.jsx)(E.Jr,{size:M,success:!0}),L&&(0,tn.jsx)(E.x8,{danger:!0,size:M}),N&&(0,tn.jsx)(k.Z,{borderSize:1,muted:!0,size:M})]})})]})}),(0,tn.jsxs)(S,{children:[(null===z||void 0===z?void 0:z.length)>=1&&(0,tn.jsx)(y.Z,{mt:1,children:(0,tn.jsx)(C.ZP,{default:!0,monospace:!0,small:!0,children:z})}),[t,o,r].map((function(n,e){if((null===n||void 0===n?void 0:n.length)>=1)return(0,tn.jsx)("div",{style:{marginTop:4},children:(0,tn.jsx)(x.ZP,{alignItems:"center",flexWrap:"wrap",children:n.reduce((function(n,e,o){return o>=1&&n.push((0,tn.jsx)("div",{style:{width:4}},"space-".concat(e.uuid))),n.push((0,tn.jsx)("div",{style:{marginTop:4},children:(0,tn.jsx)(b.Z,{color:(0,Y.qn)(e.type,{blockColor:e.color,theme:P}).accentLight,monospace:!0,small:!0,children:e.uuid})},"badge-".concat(e.uuid))),n}),[])})},"badge-blocks-".concat(e))})),R&&(0,tn.jsx)(y.Z,{mt:1,children:(0,tn.jsx)(C.ZP,{monospace:!0,muted:!0,small:!0,children:en(R)})})]})]})},cn=o(11135),un=o(82531),dn=o(37391),an=v.default.div.withConfig({displayName:"indexstyle__GraphContainerStyle",componentId:"sc-bc2ei5-0"})(["div{","}",""],dn.w5,(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")})),sn=(v.default.div.withConfig({displayName:"indexstyle__NodeStyle",componentId:"sc-bc2ei5-1"})(["border-radius:","px;border:1px solid transparent;min-width:fit-content;"," "," "," "," "," ",""],I.BG,(function(n){return n.selected&&"\n border-color: ".concat((n.theme.content||j.Z.content).active,";\n ")}),(function(n){return n.backgroundColor&&"\n background-color: ".concat(n.backgroundColor,";\n ")}),(function(n){return(n.isCancelled||n.disabled)&&"\n // opacity doesn\u2019t work on Safari\n border-color: ".concat((n.theme.content||j.Z.content).active,";\n border-style: dashed;\n cursor: not-allowed;\n ")}),(function(n){return n.isConditionFailed&&"\n background-color: ".concat((n.theme.content||j.Z.content).disabled,";\n cursor: not-allowed;\n ")}),(function(n){return n.disabled&&"\n &:hover {\n cursor: not-allowed;\n }\n "}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")})),v.default.div.withConfig({displayName:"indexstyle__RuntimeStyle",componentId:"sc-bc2ei5-2"})(["margin-right:","px;padding:12px 4px;height:100%;width:50px;background:rgba(0,0,0,0.2);background-blend-mode:soft-light;"],2*T.iI),o(66050)),vn=o(24224);var fn=o(96510),pn=["forwardedRef"];function hn(n,e){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.push.apply(o,t)}return o}function bn(n){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?hn(Object(o),!0).forEach((function(e){(0,r.Z)(n,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):hn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var mn=s()((0,c.Z)(d().mark((function n(){var e,t;return d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([o.e(4434),o.e(5987),o.e(2920)]).then(o.t.bind(o,74529,23));case 2:return e=n.sent,t=e.Canvas,n.abrupt("return",(function(n){var e=n.forwardedRef,o=(0,l.Z)(n,pn);return(0,tn.jsx)(t,bn({ref:e},o))}));case 5:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),kn=s()((0,c.Z)(d().mark((function n(){var e;return d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([o.e(4434),o.e(5987),o.e(2920)]).then(o.t.bind(o,74529,23));case 2:return e=n.sent,n.abrupt("return",e.Node);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),gn=s()((0,c.Z)(d().mark((function n(){var e;return d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([o.e(4434),o.e(5987),o.e(2920)]).then(o.t.bind(o,74529,23));case 2:return e=n.sent,n.abrupt("return",e.Edge);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),xn=s()((0,c.Z)(d().mark((function n(){var e;return d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([o.e(4434),o.e(5987),o.e(2920)]).then(o.t.bind(o,74529,23));case 2:return e=n.sent,n.abrupt("return",e.Port);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}});var yn=function(n){var e=n.blockRefs,o=n.blockStatus,r=n.blocks,l=n.disabled,c=n.editingBlock,u=n.enablePorts,d=void 0!==u&&u,a=n.fetchPipeline,s=n.height,b=n.heightOffset,k=void 0===b?10*T.iI:b,g=n.messages,O=n.noStatus,j=n.onClickNode,E=n.pannable,I=void 0===E||E,Z=n.pipeline,w=n.runningBlocks,_=void 0===w?[]:w,A=n.selectedBlock,D=n.setEditingBlock,S=n.setErrors,B=n.setSelectedBlock,L=n.setZoom,M=n.showDynamicBlocks,F=void 0!==M&&M,H=n.treeRef,U=n.zoomable,G=void 0===U||U,V=(0,p.useContext)(v.ThemeContext),q=(0,p.useRef)(null),J=H||q,X=(0,p.useState)([]),z=X[0],K=X[1],nn=(0,p.useState)(!1),en=nn[0],rn=nn[1],dn=(0,p.useState)(null),pn=dn[0],hn=dn[1],yn=d&&en,On=(null===c||void 0===c?void 0:c.upstreamBlocks)||{},Cn=On.block,jn=On.values,En=void 0===jn?[]:jn,In=(0,p.useMemo)((function(){return En.length}),[En]),Tn=(0,p.useMemo)((function(){var n;return(null===Z||void 0===Z||null===(n=Z.blocks)||void 0===n?void 0:n.filter((function(n){var e=n.type;return!m.iZ.includes(e)})))||[]}),[null===Z||void 0===Z?void 0:Z.blocks]),Zn=(0,p.useMemo)((function(){return Tn}),[Tn,F]),wn=(0,p.useMemo)((function(){if(r)return r;if(Z){var n={},e=[];return e.push.apply(e,(0,i.Z)(null===Z||void 0===Z?void 0:Z.blocks)),e.push.apply(e,(0,i.Z)(null===Z||void 0===Z?void 0:Z.callbacks)),e.push.apply(e,(0,i.Z)(null===Z||void 0===Z?void 0:Z.conditionals)),Object.values(null===Z||void 0===Z?void 0:Z.extensions).forEach((function(n){var o=n.blocks;e.push.apply(e,(0,i.Z)(o))})),e.reduce((function(e,o){return n[o.uuid]||e.push(o),e}),[])}return[]}),[r,Z]),_n=(0,p.useMemo)((function(){return(0,vn.HK)(wn||[],(function(n){return n.uuid}))}),[wn]),An=(0,p.useMemo)((function(){var n={};return null===Zn||void 0===Zn||Zn.map((function(e){var o;n[e.uuid]=null===e||void 0===e||null===(o=e.callback_blocks)||void 0===o?void 0:o.reduce((function(n,e){var o=null===_n||void 0===_n?void 0:_n[e];return o?n.concat(o):n}),[])})),n}),[Zn,_n]),Dn=(0,p.useMemo)((function(){var n={};return null===Zn||void 0===Zn||Zn.map((function(e){var o;n[e.uuid]=null===e||void 0===e||null===(o=e.conditional_blocks)||void 0===o?void 0:o.reduce((function(n,e){var o=null===_n||void 0===_n?void 0:_n[e];return o?n.concat(o):n}),[])})),n}),[Zn,_n]),Sn=(0,p.useMemo)((function(){var n={};return null===Zn||void 0===Zn||Zn.map((function(e){var o,i=[];null===(o=Object.entries((null===Z||void 0===Z?void 0:Z.extensions)||{}))||void 0===o||o.forEach((function(n){var o=(0,t.Z)(n,2),r=o[0],l=o[1].blocks;null===l||void 0===l||l.forEach((function(n){var o=n.upstream_blocks,t=n.uuid;if(null!==o&&void 0!==o&&o.includes(null===e||void 0===e?void 0:e.uuid)){var l=null===_n||void 0===_n?void 0:_n[t];l&&i.push(bn(bn({},l),{},{extension_uuid:r}))}}))})),n[e.uuid]=i})),n}),[Zn,_n,Z]),Rn=(0,p.useMemo)((function(){return(0,vn.HK)(_,(function(n){return n.uuid}))}),[_]),Pn=(0,h.Db)(un.ZP.blocks.pipelines.useUpdate(null===Z||void 0===Z?void 0:Z.uuid,encodeURIComponent(null===Cn||void 0===Cn?void 0:Cn.uuid)),{onSuccess:function(n){return(0,fn.wD)(n,{callback:function(){D({upstreamBlocks:null}),null===a||void 0===a||a()},onErrorCallback:function(n,e){return null===S||void 0===S?void 0:S({errors:e,response:n})}})}}),Nn=(0,t.Z)(Pn,2),Bn=Nn[0],Ln=Nn[1].isLoading,Mn=(0,h.Db)((function(n){var e=n.fromBlock,o=n.portSide,t=n.toBlock,i=n.removeDependency,r=t,l=t.upstream_blocks.concat(e.uuid);return i||o!==$.rl.NORTH||(r=e,l=e.upstream_blocks.concat(t.uuid)),un.ZP.blocks.pipelines.useUpdate(null===Z||void 0===Z?void 0:Z.uuid,encodeURIComponent(r.uuid))({block:bn(bn({},r),{},{upstream_blocks:i?t.upstream_blocks.filter((function(n){return n!==e.uuid})):l})})}),{onSuccess:function(n){return(0,fn.wD)(n,{callback:function(){null===a||void 0===a||a()},onErrorCallback:function(n,e){return null===S||void 0===S?void 0:S({errors:e,response:n})}})}}),Fn=(0,t.Z)(Mn,1)[0],Hn=(0,p.useCallback)((function(n){var o=n.type,t=n.uuid;if(null===B||void 0===B||B(n),K([]),null!==e&&void 0!==e&&e.current){var i,r=e.current["".concat(o,"s/").concat(t,".py")];null===r||void 0===r||null===(i=r.current)||void 0===i||i.scrollIntoView()}}),[e,B]),Un=(0,p.useCallback)((function(n){K([]),D((function(e){var o=e.upstreamBlocks.values||[],t=o.findIndex((function(e){var o=e.uuid;return n.uuid===o}));return bn(bn({},e),{},{upstreamBlocks:bn(bn({},e.upstreamBlocks),{},{values:t>=0?(0,vn.oM)(o,t):o.concat(n)})})}))}),[D]),Gn=(0,p.useMemo)((function(){var n={};return Zn.forEach((function(e){e.upstream_blocks.forEach((function(o){n[o]||(n[o]=[]),n[o].push(e)}))})),n}),[Zn]),Vn=(0,p.useCallback)((function(n){var e,o;if(R.qL.INTEGRATION===(null===Z||void 0===Z?void 0:Z.type)&&m.tf.TRANSFORMER!==n.type){var t,i={};if(m.t6.YAML===n.language&&(i=(0,f.Qc)(n.content)),m.tf.DATA_LOADER===n.type)e="".concat(n.uuid,": ").concat(null===(t=i)||void 0===t?void 0:t.source);else if(m.tf.DATA_EXPORTER===n.type){var r;e="".concat(n.uuid,": ").concat(null===(r=i)||void 0===r?void 0:r.destination)}}else if(m.tf.DBT===n.type&&m.t6.SQL===n.language){var l=(0,N.IU)(n);e=l.name,o=l.project}return null!==n&&void 0!==n&&n.replicated_block&&(e=null===n||void 0===n?void 0:n.replicated_block,o=null===n||void 0===n?void 0:n.uuid),e||(e=n.uuid),{displayText:e,kicker:o,subtitle:undefined}}),[Z]),qn=(0,p.useMemo)((function(){var n=[],e=[];return Zn.forEach((function(t){var r=Vn(t),l=r.displayText,c=r.kicker,u=r.subtitle,d=t.tags,a=void 0===d?[]:d,s=t.upstream_blocks,v=void 0===s?[]:s,f=t.uuid,p=Gn[f],h=[];p?h.push.apply(h,(0,i.Z)(p.map((function(n){return bn(bn({},$.bJ),{},{id:"".concat(f,"-").concat(n.uuid,"-from"),side:$.rl.SOUTH})})))):h.push(bn(bn({},$.bJ),{},{id:"".concat(f,"-from"),side:$.rl.SOUTH})),0===v.length&&h.push(bn(bn({},$.bJ),{},{id:"".concat(f,"-to"),side:$.rl.NORTH})),null===v||void 0===v||v.forEach((function(n){h.push(bn(bn({},$.bJ),{},{id:"".concat(n,"-").concat(f,"-to"),side:$.rl.NORTH})),e.push({from:n,fromPort:"".concat(n,"-").concat(f,"-from"),id:"".concat(n,"-").concat(f),to:f,toPort:"".concat(n,"-").concat(f,"-to")})}));(null===a||void 0===a?void 0:a.length)>=1&&T.iI,c&&T.iI,u&&T.iI;var b=l;[c,u].forEach((function(n){n&&n.length>b.length&&(b=n)}));var m=null===An||void 0===An?void 0:An[null===t||void 0===t?void 0:t.uuid],k=null===Dn||void 0===Dn?void 0:Dn[null===t||void 0===t?void 0:t.uuid],g=null===Sn||void 0===Sn?void 0:Sn[null===t||void 0===t?void 0:t.uuid];n.push({data:{block:t},height:Q(t,Z,{blockStatus:o,callbackBlocks:m,conditionalBlocks:k,extensionBlocks:g}),id:f,ports:h,width:W(t,Z,{blockStatus:o,callbackBlocks:m,conditionalBlocks:k,extensionBlocks:g})})})),{edges:e,nodes:n}}),[o,Zn,An,Dn,Vn,Gn,Sn,Z]),Jn=qn.edges,Xn=qn.nodes,zn=(0,p.useCallback)((function(n){if(O)return{};if(o){var e=o[function(n){var e=n.uuid,o=n.replicated_block;return o?"".concat(e,":").concat(o):e}(n)]||{},t=e.status,i=e.runtime;return{hasFailed:sn.V.FAILED===t,isCancelled:sn.V.CANCELLED===t,isConditionFailed:sn.V.CONDITION_FAILED===t,isInProgress:sn.V.RUNNING===t,isQueued:sn.V.INITIAL===t,isSuccessful:sn.V.COMPLETED===t,runtime:i}}var r,l=(0,P.h5)((null===g||void 0===g?void 0:g[n.uuid])||[]),c=(0,P.oI)(l),u=c.hasError,d=c.hasOutput,a=Rn[n.uuid];return{hasFailed:!a&&(u||m.DA.FAILED===n.status),isInProgress:a,isQueued:a&&(null===(r=_[0])||void 0===r?void 0:r.uuid)!==n.uuid,isSuccessful:!a&&(!u&&d||m.DA.EXECUTED===n.status)}}),[o,g,O,_,Rn]),Qn=(0,p.useMemo)((function(){var n=0;return s&&(n+=s),k&&(n-=k),Math.max(0,n)}),[s,k]);return(0,tn.jsxs)(tn.Fragment,{children:[Cn&&(0,tn.jsxs)(y.Z,{my:3,px:T.cd,children:[(0,tn.jsxs)(y.Z,{mb:T.cd,children:[(0,tn.jsxs)(C.ZP,{children:["Select parent block(s) for ",(0,tn.jsx)(C.ZP,{color:(0,Y.qn)(Cn.type,{blockColor:Cn.color,theme:V}).accent,inline:!0,monospace:!0,children:Cn.uuid}),":"]}),(0,tn.jsx)(y.Z,{mt:1,children:En.map((function(n,e){var o,t,i=n.uuid;return(0,tn.jsxs)(C.ZP,{color:(0,Y.qn)(null===(o=_n[i])||void 0===o?void 0:o.type,{blockColor:null===(t=_n[i])||void 0===t?void 0:t.type,theme:V}).accent,inline:!0,monospace:!0,children:[i,In>=2&&e<=In-2?(0,tn.jsx)(C.ZP,{inline:!0,children:",\xa0"}):null]},i)}))})]}),(0,tn.jsxs)(x.ZP,{alignItems:"center",children:[(0,tn.jsx)(cn.ZP,{compact:!0,inline:!0,loading:Ln,onClick:function(){return Bn({block:bn(bn({},Cn),{},{upstream_blocks:En.map((function(n){return n.uuid}))})})},uuid:"DependencyGraph/save_parents",children:"Save dependencies"}),(0,tn.jsx)(y.Z,{ml:1}),(0,tn.jsx)(cn.ZP,{compact:!0,inline:!0,noBackground:!0,onClick:function(){K([]),D({upstreamBlocks:null})},uuid:"DependencyGraph/cancel_save_parents",children:"Cancel"})]})]}),(0,tn.jsx)(an,{height:Qn,onDoubleClick:function(){var n,e;return null===J||void 0===J||null===(n=J.current)||void 0===n||null===(e=n.fitCanvas)||void 0===e?void 0:e.call(n)},children:(0,tn.jsx)(mn,{arrow:null,disabled:l,edge:function(n){var e,o=_n[n.source];return(0,tn.jsx)(gn,bn(bn({},n),{},{onClick:function(n,e){hn(null),K([e.id])},onRemove:function(n,e){var o=_n[e.from],t=_n[e.to];Fn({fromBlock:o,removeDependency:!0,toBlock:t}),K([])},removable:d&&!(null!==c&&void 0!==c&&c.upstreamBlocks),style:{stroke:null===(e=(0,Y.qn)(null===o||void 0===o?void 0:o.type,{blockColor:null===o||void 0===o?void 0:o.color,theme:V}))||void 0===e?void 0:e.accent}}))},edges:Jn,fit:!0,forwardedRef:J,maxHeight:$.Jo,maxWidth:$.Jo,maxZoom:1,minZoom:-.7,node:function(n){var e,o,t,i,r,u;return(0,tn.jsx)(kn,bn(bn({},n),{},{dragType:"port",linkable:!0,onClick:function(n,e){var o=e.data.block;hn(null),(null===Cn||void 0===Cn?void 0:Cn.uuid)===o.uuid||(Cn?Un(o):(null===j||void 0===j||j({block:o}),setTimeout((function(){Hn(o)}),1)))},onEnter:function(){null!==c&&void 0!==c&&c.upstreamBlocks||rn(!0)},onLeave:function(){return rn(!1)},port:yn&&(null===pn||on(pn,n))?(0,tn.jsx)(xn,{onDrag:function(){return rn(!0)},onDragEnd:function(){rn(!1),hn(null)},onDragStart:function(n,e,o){var t=null===o||void 0===o?void 0:o.side;hn({id:null===o||void 0===o?void 0:o.id,side:t})},onEnter:function(){return rn(!0)},rx:10,ry:10,style:{fill:(0,Y.qn)(null===n||void 0===n||null===(e=n.properties)||void 0===e||null===(o=e.data)||void 0===o||null===(t=o.block)||void 0===t?void 0:t.type,{blockColor:null===n||void 0===n||null===(i=n.properties)||void 0===i||null===(r=i.data)||void 0===r||null===(u=r.block)||void 0===u?void 0:u.color,theme:V}).accent,stroke:"white",strokeWidth:"1px"}}):null,style:{fill:"transparent",stroke:"transparent",strokeWidth:0},children:function(n){var e=n.height,o=n.node.data.block,t=zn(o),i=Vn(o);i.displayText,i.kicker,i.subtitle;return(0,tn.jsx)("foreignObject",{height:e,style:{pointerEvents:"none"},width:n.width,x:0,y:0,children:(0,tn.jsx)(ln,bn({block:o,callbackBlocks:null===An||void 0===An?void 0:An[null===o||void 0===o?void 0:o.uuid],conditionalBlocks:null===Dn||void 0===Dn?void 0:Dn[null===o||void 0===o?void 0:o.uuid],disabled:(null===Cn||void 0===Cn?void 0:Cn.uuid)===o.uuid,extensionBlocks:null===Sn||void 0===Sn?void 0:Sn[null===o||void 0===o?void 0:o.uuid],height:e,hideStatus:l||O,pipeline:Z,selected:Cn?!!(0,vn.sE)(En,(function(n){return n.uuid===o.uuid})):(null===A||void 0===A?void 0:A.uuid)===o.uuid},t),o.uuid)})}}))},nodes:Xn,onNodeLink:function(n,e,o,t){var i,r=_n[e.id],l=_n[o.id],c=(null===Z||void 0===Z?void 0:Z.type)===R.qL.INTEGRATION&&((null===r||void 0===r?void 0:r.type)===m.tf.DATA_EXPORTER||(null===r||void 0===r?void 0:r.type)===m.tf.DATA_LOADER&&(null===l||void 0===l?void 0:l.type)===m.tf.DATA_EXPORTER);if(!(null!==r&&void 0!==r&&null!==(i=r.upstream_blocks)&&void 0!==i&&i.includes(l.uuid)||e.id===o.id||c)){var u=null===t||void 0===t?void 0:t.side;Fn({fromBlock:r,portSide:u||$.rl.SOUTH,toBlock:l})}},onNodeLinkCheck:function(n,e,o){return!Jn.some((function(n){return n.from===e.id&&n.to===o.id}))},onZoomChange:function(n){return null===L||void 0===L?void 0:L(n)},pannable:I,selections:z,zoomable:G})})]})}},66050:function(n,e,o){var t;o.d(e,{V:function(){return t}}),function(n){n.CANCELLED="cancelled",n.COMPLETED="completed",n.FAILED="failed",n.INITIAL="initial",n.RUNNING="running",n.UPSTREAM_FAILED="upstream_failed",n.CONDITION_FAILED="condition_failed"}(t||(t={}))},18283:function(n,e,o){var t=o(82394),i=o(26304),r=(o(82684),o(38626)),l=o(23831),c=o(73942),u=o(2005),d=o(49125),a=o(31012),s=o(28598),v=["children"];function f(n,e){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.push.apply(o,t)}return o}function p(n){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?f(Object(o),!0).forEach((function(e){(0,t.Z)(n,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var h=r.default.p.withConfig({displayName:"Badge__BadgeStyle",componentId:"sc-tfqsp0-0"})(["border-radius:","px;display:inline;font-family:",";margin:0;white-space:nowrap;",";"," "," ",";",";"," "," "," "," "," "," "," ",""],c.BG,u.ry,a.iD,(function(n){return n.small&&"\n ".concat(a.HC,";\n ")}),(function(n){return n.xxsmall&&"\n font-size: ".concat(a.VK,"px;\n line-height: ").concat(a.VK,"px;\n ")}),(function(n){return!n.regular&&"\n padding: 2px 4px;\n "}),(function(n){return n.regular&&"\n padding: ".concat(1*d.iI,"px ").concat(1.25*d.iI,"px;\n ")}),(function(n){return n.noVerticalPadding&&"\n padding-bottom: 0;\n padding-top: 0;\n "}),(function(n){return!n.disabled&&!n.inverted&&"\n background-color: ".concat((n.theme||l.Z).background.row,";\n color: ").concat((n.theme||l.Z).content.default,";\n ")}),(function(n){return!n.disabled&&n.inverted&&"\n background-color: ".concat((n.theme||l.Z).background.dark,";\n color: ").concat((n.theme||l.Z).content.inverted,";\n ")}),(function(n){return n.cyan&&"\n background-color: ".concat((n.theme||l.Z).accent.cyan,";\n color: ").concat((n.theme||l.Z).monotone.black,";\n ")}),(function(n){return n.disabled&&"\n background-color: ".concat((n.theme||l.Z).feature.disabled,";\n color: ").concat((n.theme||l.Z).content.disabled,";\n ")}),(function(n){return n.color&&"\n background-color: ".concat(n.color," !important;\n color: ").concat((n.theme||l.Z).content.active,";\n ")}),(function(n){return n.quantifier&&"\n border-radius: 34px;\n line-height: 10px;\n padding: 4px 6px;\n "}),(function(n){return n.monospace&&"\n font-family: ".concat(u.Vp,";\n word-break: break-all;\n ")}));e.Z=function(n){var e=n.children,o=(0,i.Z)(n,v);return(0,s.jsx)(h,p(p({},o),{},{children:e}))}},25958:function(n,e,o){o.d(e,{$1:function(){return r},Dy:function(){return i},IU:function(){return l}});var t=o(17717),i="--full-refresh";function r(n,e){var o,i=null===e||void 0===e?void 0:e.fullPath,r=null===n||void 0===n||null===(o=n.configuration)||void 0===o?void 0:o.file_path;if(i)return null===n||void 0===n?void 0:n.uuid;if(r){var l=r.split(t.sep),c=l[l.length-1].split(".");return c.pop(),c.join(".")}}function l(n){var e,o=null===n||void 0===n||null===(e=n.configuration)||void 0===e?void 0:e.file_path;if(o){var i=o.split(t.sep),r=i[0],l=i[i.length-1].split(".");return l.pop(),{directory:i.slice(1,i.length-1).join(t.sep),filePath:o,name:l.join("."),project:r}}return{filePath:o}}}}]);
@@ -1 +0,0 @@
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}]);
@@ -1 +0,0 @@
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}]);