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
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4794],{59739:function(e,n,t){"use strict";var r=t(56669);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,n,t,i,o,l){if(l!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:o,resetWarningCache:i};return t.PropTypes=t,t}},47329:function(e,n,t){e.exports=t(59739)()},56669:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return o}});var r=t(38626),i=t(3055),o=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return u},U:function(){return c}});var r=t(38626),i=t(23831),o=t(73942),l=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],o.TR,14*l.iI,l.cd*l.iI,l.cd*l.iI,40*l.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),u=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],o.n_,l.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*l.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*l.iI,"px;\n ")}))},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(67971),l=t(55378),c=t(86673),u=t(19711),a=t(18025),s=t(49125),d=t(24224),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,v=e.topPosition;return(0,p.jsxs)(a.J,{absolute:!0,topPosition:v,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.ZP,{alignItems:"center",children:[(0,p.jsx)(u.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*s.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(u.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*s.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},91780:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return an}});var r,i=t(77837),o=t(82394),l=t(38860),c=t.n(l),u=t(38626),a=t(4804),s=t(82684),d=t(86422),p=t(34744),f=t(60328),h=t(38341),v=t(16634),m=t(67971),g=t(86673),j=t(19711),b=t(2850),x=t(49125),_=u.default.div.withConfig({displayName:"indexstyle__FilterRowStyle",componentId:"sc-kvapsi-0"})(["padding-bottom:","px;padding-top:","px;"],x.iI/2,x.iI/2);!function(e){e.CRITICAL="CRITICAL",e.DEBUG="DEBUG",e.ERROR="ERROR",e.EXCEPTION="EXCEPTION",e.INFO="INFO",e.LOG="LOG",e.WARNING="WARNING"}(r||(r={}));var y,O=[r.CRITICAL,r.DEBUG,r.ERROR,r.EXCEPTION,r.INFO,r.LOG,r.WARNING];!function(e){e.LAST_HOUR="Last hour",e.LAST_DAY="Last day",e.LAST_WEEK="Last week",e.LAST_30_DAYS="Last 30 days",e.CUSTOM_RANGE="Custom range"}(y||(y={}));var Z=t(73942),P=t(73899);var S,k=(0,u.css)(["",""],(function(e){return"\n background-color: ".concat(function(e){var n=e.critical,t=e.debug,r=e.error,i=e.exception,o=e.info,l=e.log,c=e.warning;return n?P.Zl:t?P.EG:r?P.hl:i?P.hM:o?P.gN:l?P.Wd:c?P.$R:"transparent"}(e),";\n ")})),I=u.default.div.withConfig({displayName:"indexstyle__LogLevelIndicatorStyle",componentId:"sc-1e2zh7m-0"})([""," border-radius:","px;height:12px;width:5px;"],k,Z.n_),w=t(90211),C=t(44162),E=t(33766),D=t(28598);function L(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 T(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,o.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(e){e.BLOCK_RUN_ID="block_run_id[]",e.BLOCK_TYPE="block_type[]",e.BLOCK_UUID="block_uuid[]",e.LEVEL="level[]",e.PIPELINE_RUN_ID="pipeline_run_id[]",e.PIPELINE_SCHEDULE_ID="pipeline_schedule_id[]"}(S||(S={}));var A=function(e){var n=e.blocks,t=e.query,r=(0,s.useContext)(u.ThemeContext),i=(0,s.useMemo)((function(){return t[S.LEVEL]}),[t]),l=(0,s.useMemo)((function(){return t[S.BLOCK_TYPE]}),[t]),c=(0,s.useMemo)((function(){return t[S.BLOCK_UUID]}),[t]),a=(0,s.useMemo)((function(){return t[S.PIPELINE_SCHEDULE_ID]}),[t]),p=(0,s.useMemo)((function(){return t[S.PIPELINE_RUN_ID]}),[t]),y=(0,s.useMemo)((function(){return t[S.BLOCK_RUN_ID]}),[t]);return(0,D.jsx)(b.M,{children:(0,D.jsxs)(g.Z,{p:x.cd,children:[(0,D.jsxs)(g.Z,{mb:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Log level"})}),O.map((function(e){return(0,D.jsx)(f.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,E.g_)(t,{level:e},{isList:!0})},children:(0,D.jsx)(_,{children:(0,D.jsxs)(m.ZP,{alignItems:"center",children:[(0,D.jsx)(h.Z,{checked:Array.isArray(i)&&(null===i||void 0===i?void 0:i.includes(String(e)))}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(I,T({},(0,o.Z)({},e.toLowerCase(),!0))),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(j.ZP,{disableWordBreak:!0,children:(0,w.kC)(e.toLowerCase())})]})})},e)}))]}),(0,D.jsxs)(g.Z,{mb:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Block type"})}),[d.tf.DATA_LOADER,d.tf.TRANSFORMER,d.tf.DATA_EXPORTER].map((function(e){return(0,D.jsx)(f.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,E.g_)(t,{block_type:e},{isList:!0})},children:(0,D.jsx)(_,{children:(0,D.jsxs)(m.ZP,{alignItems:"center",children:[(0,D.jsx)(h.Z,{checked:Array.isArray(l)&&(null===l||void 0===l?void 0:l.includes(String(e)))}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(v.Z,{color:(0,C.qn)(e,{theme:r}).accent,size:1.5*x.iI,square:!0}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(j.ZP,{disableWordBreak:!0,muted:!0,monospace:!0,children:e})]})})},e)}))]}),(0,D.jsxs)(g.Z,{mb:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Block"})}),n.filter((function(e){var n=e.type;return d.tf.SCRATCHPAD!==n})).map((function(e){return(0,D.jsx)(f.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,E.g_)(t,{block_uuid:e.uuid},{isList:!0,resetLimitParams:!0})},children:(0,D.jsx)(_,{children:(0,D.jsxs)(m.ZP,{alignItems:"center",children:[(0,D.jsx)(h.Z,{checked:Array.isArray(c)&&(null===c||void 0===c?void 0:c.includes(String(e.uuid)))}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(v.Z,{color:(0,C.qn)(e.type,{blockColor:e.color,theme:r}).accent,size:1.5*x.iI,square:!0}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,muted:!0,children:e.uuid})]})})},e.uuid)}))]}),(null===a||void 0===a?void 0:a.length)&&(0,D.jsxs)(g.Z,{mb:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Trigger"})}),a.map((function(e){return(0,D.jsx)(f.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,E.g_)(t,{pipeline_schedule_id:e},{isList:!0})},children:(0,D.jsx)(_,{children:(0,D.jsxs)(m.ZP,{alignItems:"center",children:[(0,D.jsx)(h.Z,{checked:Array.isArray(a)&&(null===a||void 0===a?void 0:a.includes(e))}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-schedule-".concat(e))}))]}),(null===p||void 0===p?void 0:p.length)&&(0,D.jsxs)(g.Z,{mb:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline run"})}),p.map((function(e){return(0,D.jsx)(f.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,E.g_)(t,{pipeline_run_id:e},{isList:!0})},children:(0,D.jsx)(_,{children:(0,D.jsxs)(m.ZP,{alignItems:"center",children:[(0,D.jsx)(h.Z,{checked:Array.isArray(p)&&(null===p||void 0===p?void 0:p.includes(e))}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-run-".concat(e))}))]}),(null===y||void 0===y?void 0:y.length)&&(0,D.jsxs)(g.Z,{mb:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Block run"})}),y.map((function(e){return(0,D.jsx)(f.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,E.g_)(t,{block_run_id:e},{isList:!0})},children:(0,D.jsx)(_,{children:(0,D.jsxs)(m.ZP,{alignItems:"center",children:[(0,D.jsx)(h.Z,{checked:Array.isArray(y)&&(null===y||void 0===y?void 0:y.includes(e))}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"block-run-".concat(e))}))]})]})})},R=t(93461),N=t(11135),M=t(75582),B=t(32316),Y=t(10919),U=t(87815),W=u.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1r43sbu-0"})([""," height:","px;width:100%;"],k,.5*x.iI),H=u.default.div.withConfig({displayName:"indexstyle__BadgeStyle",componentId:"sc-1r43sbu-1"})([""," border-radius:","px;display:inline-block;padding:","px ","px;"],k,Z.BG,.25*x.iI,.5*x.iI),J=t(22341),K=t(92083),G=t.n(K);function q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var F=/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/,V=/([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}) (.+)/;function X(e){var n=e.content.trim().split(V),t=[],r=[];return n.forEach((function(e){var n=e.trim();F.test(e)?(r.length>=1&&t.push(r.join(" ").trim()),r=[e]):r.filter((function(e){return e})).length<=1&&n&&r.push(n)})),t.push(r.join(" ").trim()),t.map((function(n){return function(e){var n=e.content.trim().match(V),t=null===n||void 0===n?void 0:n[1],r=null===n||void 0===n?void 0:n[2],i={};return r&&(0,w.Pb)(r)&&(i=JSON.parse(r)),z(z({},e),{},{createdAt:t,data:i})}(z(z({},e),{},{content:n}))}))}function Q(e){return e&&G().unix(e).utc().format("YYYY-MM-DD HH:mm:ss.SSS")}var $=t(24224);function ee(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 ne(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var te=["error","error_stack","error_stacktrace"],re={uuid:"Details"},ie={uuid:"Errors"};var oe=function(e){var n=e.log,t=e.onClose,r=e.selectedTab,i=e.setSelectedTab,l=(0,s.useState)(!1),c=l[0],u=l[1],a=n.data,d=n.name,h=n.path,v=a||{},b=v.error,_=v.error_stack,y=v.error_stacktrace,O=v.level,Z=v.timestamp,P=(0,o.Z)({},O.toLowerCase(),!0),S=(0,s.useMemo)((function(){var e=[["file name",d],["file path",h]];return Object.entries(a).forEach((function(n){var t=(0,M.Z)(n,2),r=t[0],i=t[1];te.includes(r)||e.push([r,i])})),y&&e.push(["error",y]),(0,$.YC)(e,(function(e){var n=(0,M.Z)(e,2),t=n[0];n[1];return t}))}),[a,y,d,h]),k=(0,s.useMemo)((function(){var e=[re];return b&&e.push(ie),(0,D.jsx)(B.Z,{onClickTab:i,selectedTabUUID:null===r||void 0===r?void 0:r.uuid,tabs:e})}),[b,r,i]);return(0,D.jsxs)("div",{children:[(0,D.jsx)(W,ne({},P)),(0,D.jsx)(g.Z,{p:x.cd,children:(0,D.jsxs)(m.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,D.jsxs)(R.Z,{alignItems:"center",children:[(0,D.jsx)(H,ne(ne({},P),{},{children:(0,D.jsx)(j.ZP,{bold:!0,inverted:!0,monospace:!0,small:!0,children:O})})),(0,D.jsx)(g.Z,{mr:x.cd}),(0,D.jsx)(j.ZP,{monospace:!0,children:Q(Z)})]}),(0,D.jsx)(f.Z,{iconOnly:!0,noBackground:!0,onClick:function(){return t()},children:(0,D.jsx)(J.x8,{size:1.5*x.iI})})]})}),(0,D.jsx)(p.Z,{medium:!0}),(0,D.jsx)(g.Z,{py:x.cd,children:k}),re.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,D.jsx)(U.Z,{columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:null===S||void 0===S?void 0:S.map((function(e,n){var t=(0,M.Z)(e,2),r=t[0],i=t[1],o="message"===r,l="tags"===r,a=i,s=i;return l?s=a=(0,w.Pb)(i)?JSON.parse(JSON.stringify(i,null,2)):JSON.stringify(i,null,2):o&&c&&(0,w.Pb)(i)&&(s=JSON.stringify(JSON.parse(i),null,2),a=(0,D.jsx)("pre",{children:s})),"object"===typeof a&&(a=JSON.stringify(a,null,2),a=(0,D.jsx)("pre",{children:a})),"object"===typeof s&&(s=JSON.stringify(s)),[(0,D.jsx)(j.ZP,{monospace:!0,muted:!0,children:r},"".concat(r,"_").concat(n,"_key")),(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(j.ZP,{monospace:!0,textOverflow:!0,title:s,whiteSpaceNormal:o&&c||l,wordBreak:o&&c||l,children:[!l&&a,l&&(0,D.jsx)("pre",{children:a})]},"".concat(r,"_").concat(n,"_val")),o&&(0,D.jsx)(Y.Z,{muted:!0,onClick:function(){return u((function(e){return!e}))},children:c?"Click to hide log":"Click to show full log message"})]})]})),uuid:"LogDetail"}),ie.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,D.jsxs)(g.Z,{mb:5,px:x.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,children:"Error"})}),null===b||void 0===b?void 0:b.map((function(e){return e.split("\n").map((function(e){return e.split("\\n").map((function(e){return(0,D.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))})),_&&(0,D.jsxs)(g.Z,{mt:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,children:"Stack trace"})}),null===_||void 0===_?void 0:_.map((function(e){return null===e||void 0===e?void 0:e.map((function(e){return(0,D.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))]})]})]})},le=t(21831),ce=t(89565),ue=t.n(ce),ae=t(12691),se=t.n(ae),de=t(72487),pe=t(98781),fe=t(66166),he=t(3055),ve=t(23831),me=t(37391),ge=u.default.div.withConfig({displayName:"indexstyle__TableContainer",componentId:"sc-16j4vp6-0"})([".table_row > div{margin:","px ","px;}div{","}"],.5*x.iI,x.iI,me.w5),je=u.default.div.withConfig({displayName:"indexstyle__TableHeadStyle",componentId:"sc-16j4vp6-1"})(["display:flex;align-items:center;overflow:hidden;",""],(function(e){return"\n border-bottom: 1px solid ".concat((e.theme||ve.Z).borders.medium2,";\n ")})),be=u.default.div.withConfig({displayName:"indexstyle__TableRowStyle",componentId:"sc-16j4vp6-2"})(["display:flex;align-items:center;"," "," ",""],(function(e){return"\n border-bottom: 1px solid ".concat((e.theme||ve.Z).borders.light,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return!e.selected&&"\n &:hover {\n background: ".concat((e.theme.interactive||ve.Z.interactive).rowHoverBackground,";\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||ve.Z.interactive).activeBorder,";\n ")})),xe=t(62976),_e=t(91427),ye=t(59e3),Oe=function(e){var n=(0,ye.iV)(),t=((null===n||void 0===n?void 0:n[S.PIPELINE_SCHEDULE_ID])||[]).join(",");return"".concat(e,"/logs/triggers/").concat(t)},Ze=t(24141);function Pe(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 Se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke="log_uuid";var Ie,we,Ce,Ee=function(e){var n=e.autoScrollLogs,t=e.blocksByUUID,r=e.tableInnerRef,i=e.logs,l=e.onRowClick,c=e.pipeline,u=e.query,a=e.saveScrollPosition,d=e.setSelectedLog,p=e.themeContext,f=(0,Ze.i)().height,h=(0,s.useRef)(null),b=(0,s.useMemo)((function(){return pe.qL.INTEGRATION===(null===c||void 0===c?void 0:c.type)}),[c.type]),_=(0,fe.Z)(i);(0,s.useEffect)((function(){var e;n&&(_||[]).length!==(i||[]).length&&(null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView(!1))}),[n,i,_,r]);var y=(0,s.useMemo)((function(){return Oe(null===c||void 0===c?void 0:c.uuid)}),[null===c||void 0===c?void 0:c.uuid]);(0,s.useEffect)((function(){var e;a&&(null===h||void 0===h||null===(e=h.current)||void 0===e||e.scrollTo((0,_e.U2)(y,0)))}),[a,y]);var O=Object.keys(t||{});if(b){var Z,P,S=((null===c||void 0===c||null===(Z=c.data_integration)||void 0===Z||null===(P=Z.catalog)||void 0===P?void 0:P.streams)||[]).map((function(e){return e.tap_stream_id})),k=new Set;O.forEach((function(e){S.forEach((function(n){return k.add("".concat(e,":").concat(n,":0"))}))})),O=Array.from(k)}var w=Math.max.apply(Math,(0,le.Z)(O.map((function(e){return e.length})))),L=Math.min(w*xe.r+12+8,50*x.iI),T=[{uuid:"_",width:28},{uuid:"Date",width:214},{uuid:"Block",width:L+16},{uuid:"Message"},{uuid:"_"}],A=(0,s.useCallback)((function(e){var n,t,r,i=e.data,c=e.index,a=e.style,s=i.blocksByUUID,p=i.logs,f=i.themeContext,h=p[c],_=h.content,y=h.data,O=h.name,Z=y||{},P=Z.block_uuid,S=Z.level,k=Z.message,w=Z.pipeline_uuid,T=Z.timestamp,A=Z.uuid,N=P||O.split(".log")[0],M=N.split(":");b&&(N=M[0],t=M[1],r=M[2]);var B=s[N];if(B||(B=s[M[0]]),B){var U=(0,C.qn)(B.type,{blockColor:B.color,theme:f}).accent;n=(0,D.jsx)(m.ZP,{alignItems:"center",children:(0,D.jsx)(se(),{as:"/pipelines/".concat(w,"/edit?block_uuid=").concat(N),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,D.jsxs)(Y.Z,{block:!0,fullWidth:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,D.jsx)(v.Z,{color:U,size:1.5*x.iI,square:!0}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsxs)(j.ZP,{disableWordBreak:!0,monospace:!0,noWrapping:!0,title:P,width:L-16,children:[N,t&&":",t&&(0,D.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,children:t}),r>=0&&":",r>=0&&(0,D.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,children:r})]})]})})})}return(0,D.jsxs)(be,{className:"table_row",onClick:function(){var e,n,t=p[c],r=null===(e=t.data)||void 0===e?void 0:e.uuid;u.log_uuid===r&&(r=null),null!==(n=t.data)&&void 0!==n&&n.error?null===l||void 0===l||l(ie):null===l||void 0===l||l(re),(0,E.u7)((0,o.Z)({},ke,r)),d(r?t:null)},selected:(null===u||void 0===u?void 0:u.log_uuid)&&(null===u||void 0===u?void 0:u.log_uuid)===A,style:Se({},a),children:[(0,D.jsx)(R.Z,{alignItems:"center",justifyContent:"center",children:(0,D.jsx)(I,Se({},(0,o.Z)({},null===S||void 0===S?void 0:S.toLowerCase(),!0)))},"log_type"),(0,D.jsx)(R.Z,{children:(0,D.jsx)(j.ZP,{default:!0,monospace:!0,noWrapping:!0,children:Q(T)},"log_timestamp")}),(0,D.jsx)(R.Z,{style:{minWidth:L,width:L},children:n}),(0,D.jsx)(R.Z,{style:{overflow:"auto"},children:(0,D.jsx)(j.ZP,{monospace:!0,textOverflow:!0,title:k||_,children:(0,D.jsx)(ue(),{children:k||_})},"log_message")}),(0,D.jsx)(R.Z,{flex:"1",justifyContent:"flex-end",children:(0,D.jsx)(J._Q,{default:!0,size:2*x.iI})},"chevron_right_icon")]})}),[L,b,l,u,d]);return(0,D.jsxs)(ge,{children:[(0,D.jsx)(je,{children:T.map((function(e,n){return(0,D.jsx)(R.Z,{alignItems:"center",style:{height:4*x.iI,minWidth:e.width||null,width:e.width||null},children:"_"!==e.uuid&&(0,D.jsx)(j.ZP,{bold:!0,leftAligned:!0,monospace:!0,muted:!0,children:e.uuid})},"".concat(e,"_").concat(n))}))}),(0,D.jsx)(de.t7,{height:f-he.Mz-86-34-58,innerRef:r,itemCount:i.length,itemData:{blocksByUUID:t,logs:i,pipeline:c,themeContext:p},itemSize:3.75*x.iI,onScroll:function(e){var n=e.scrollOffset,t=e.scrollDirection;!a||"forward"===t&&0===n||(0,_e.t8)(y,n)},ref:h,width:"100%",children:A})]})},De=t(34376),Le=t(2713),Te=t(47999),Ae=t(55378),Re=t(82944),Ne="_limit",Me="_offset",Be=20,Ye=[y.LAST_HOUR,y.LAST_DAY,y.LAST_WEEK,y.LAST_30_DAYS],Ue=(Ie={},(0,o.Z)(Ie,y.LAST_HOUR,3600),(0,o.Z)(Ie,y.LAST_DAY,86400),(0,o.Z)(Ie,y.LAST_WEEK,604800),(0,o.Z)(Ie,y.LAST_30_DAYS,2592e3),Ie),We=t(84779),He=t(42305),Je=t(7715);function Ke(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 Ge(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ke(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ke(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!function(e){e.START="start_timestamp",e.END="end_timestamp"}(Ce||(Ce={}));var qe=(we={},(0,o.Z)(we,Ne,Be),(0,o.Z)(we,Me,0),we),ze={blackBorder:!0,inline:!0,paddingBottom:.75*x.iI,paddingTop:.75*x.iI};var Fe=function(e){var n=e.allPastLogsLoaded,t=e.loadNewerLogInterval,r=e.loadPastLogInterval,i=e.saveScrollPosition,l=e.selectedRange,c=e.setSelectedRange,u=(0,s.useState)(null),a=u[0],d=u[1],p=(0,s.useState)(null),h=p[0],v=p[1],b=(0,s.useState)({hour:"00",minute:"00"}),_=b[0],O=b[1],Z=(0,s.useState)(new Date),P=Z[0],S=Z[1],k=(0,s.useState)({hour:(0,He.lJ)(String((new Date).getUTCHours())),minute:(0,He.lJ)(String((new Date).getUTCMinutes()))}),I=k[0],w=k[1],C=(0,De.useRouter)().query.pipeline,L=(0,ye.iV)(),T=(0,fe.Z)(L);(0,s.useEffect)((function(){if(!(0,Je.Xy)(L,T)){var e=L.start_timestamp,n=L.end_timestamp;if(e){var t=(0,He.Pc)(e),r=t.date,i=t.hour,o=t.minute;v(r),O({hour:(0,He.lJ)(i),minute:(0,He.lJ)(o)});var l=Math.ceil(Date.now()/1e3)-e;Math.abs(l-Ue[y.LAST_DAY])<=60&&c(y.LAST_DAY)}if(n){var u=(0,He.Pc)(n),a=u.date,s=u.hour,d=u.minute;S(a),w({hour:(0,He.lJ)(s),minute:(0,He.lJ)(d)})}}}),[L,T]);var A=(0,s.useCallback)((function(){if(i){var e=Oe(C);(0,_e.t8)(e,0)}}),[C,i]);return(0,D.jsx)(g.Z,{py:1,children:(0,D.jsxs)(m.ZP,{alignItems:"center",children:[(0,D.jsx)(N.ZP,Ge(Ge({},ze),{},{disabled:n,onClick:function(){A(),r()},uuid:"logs/load_older_logs",children:n?"All past logs within range loaded":"Load older logs"})),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(N.ZP,Ge(Ge({},ze),{},{disabled:(null===L||void 0===L?void 0:L._offset)<=0,onClick:function(){A(),t()},uuid:"logs/load_newer_logs",children:"Load newer logs"})),(0,D.jsx)(g.Z,{mr:2}),(0,D.jsx)(Ae.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault();var n=e.target.value;if(A(),c(n),Ye.includes(n)){var t,r=(0,We.JI)(Ue[n]);(0,E.u7)(Ge((t={},(0,o.Z)(t,Ce.START,r),(0,o.Z)(t,Ce.END,null),t),qe))}},paddingRight:4*x.iI,placeholder:"Select time range",value:l,children:Object.values(y).map((function(e){return(0,D.jsx)("option",{value:e,children:e},e)}))}),(0,D.jsx)(g.Z,{mr:1}),l===y.CUSTOM_RANGE&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Re.Z,{compact:!0,defaultColor:!0,onClick:function(){return d(0)},paddingRight:0,placeholder:"Start",value:h?(0,He.AY)(h,null===_||void 0===_?void 0:_.hour,null===_||void 0===_?void 0:_.minute):""}),(0,D.jsx)(Te.Z,{onClickOutside:function(){return d(null)},open:0===a,style:{position:"relative"},children:(0,D.jsx)(Le.Z,{selectedDate:h,selectedTime:_,setSelectedDate:v,setSelectedTime:O})}),(0,D.jsx)(g.Z,{px:1,children:(0,D.jsx)(j.ZP,{children:"to"})}),(0,D.jsx)(Re.Z,{compact:!0,defaultColor:!0,onClick:function(){return d(1)},paddingRight:0,placeholder:"End",value:P?(0,He.AY)(P,null===I||void 0===I?void 0:I.hour,null===I||void 0===I?void 0:I.minute):""}),(0,D.jsx)(Te.Z,{onClickOutside:function(){return d(null)},open:1===a,style:{position:"relative"},children:(0,D.jsx)(Le.Z,{selectedDate:P,selectedTime:I,setSelectedDate:S,setSelectedTime:w})}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(f.Z,{borderRadius:x.iI/2,onClick:function(){var e;A();var n=(0,He.BP)(h,_.hour,_.minute),t=(0,He.BP)(P,I.hour,I.minute);(0,E.u7)(Ge((e={},(0,o.Z)(e,Ce.START,(0,He.A5)(n)),(0,o.Z)(e,Ce.END,(0,He.A5)(t)),e),qe))},padding:"".concat(x.iI/2,"px"),primary:!0,children:"Search"})]})]})})},Ve=t(60547),Xe=t(41788),Qe=t(54283),$e=t(70902),en=t(82531),nn=t(11366),tn=t(59920);function rn(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 on(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rn(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ln="pipeline_run_id[]",cn="block_run_id[]";function un(e){var n=e.pipeline,t=(0,s.useContext)(u.ThemeContext),r=(0,s.useRef)(null),i=n.uuid,l=(0,s.useState)(null),c=l[0],f=l[1],h=(0,s.useState)(null),v=h[0],b=h[1],_=(0,s.useState)(null),O=_[0],Z=_[1],P=(0,s.useState)(null),k=P[0],I=P[1],C=(0,s.useState)(re),L=C[0],T=C[1],M=(0,s.useState)((0,_e.U2)(nn.Tz,!0)),B=M[0],Y=M[1],U=en.ZP.pipelines.detail(i,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,W=(0,s.useMemo)((function(){return on(on({},null===U||void 0===U?void 0:U.pipeline),{},{uuid:i})}),[U,i]),H=(null===W||void 0===W?void 0:W.type)===pe.qL.INTEGRATION,J=(0,s.useMemo)((function(){return W.blocks||[]}),[W]),K=(0,s.useMemo)((function(){var e=(0,$.HK)(J,(function(e){return e.uuid}));if(H){var n,t=(0,$.sE)(J,(function(e){var n=e.type;return d.tf.DATA_LOADER===n})),r=t?(0,a.Qc)(t.content):{},i=((null===r||void 0===r||null===(n=r.catalog)||void 0===n?void 0:n.streams)||[]).reduce((function(e,n){var t=n.tap_stream_id,r={};return J.forEach((function(e){var n=e.uuid,i=e.type,o="".concat(n,":").concat(t);r[o]={type:i}})),on(on({},e),r)}),{});e=on(on({},i),e)}return e}),[J,H]),G=(0,ye.iV)(),q=(0,s.useMemo)((function(){return(null===G||void 0===G?void 0:G.hasOwnProperty(S.PIPELINE_SCHEDULE_ID))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(S.LEVEL))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(S.BLOCK_TYPE))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(S.BLOCK_UUID))}),[G]),z=!(null!==G&&void 0!==G&&G.start_timestamp)&&!(null!==G&&void 0!==G&&G.hasOwnProperty(ln)||null!==G&&void 0!==G&&G.hasOwnProperty(cn)),F=(0,We.JI)(Ue[y.LAST_DAY]),V=en.ZP.logs.pipelines.list(c?i:null,(0,Je.gR)(z?on(on({},c),{},{start_timestamp:F}):c,[ke]),{refreshInterval:5e3}),Q=V.data,ee=V.mutate,ne=!Q,te=(0,s.useMemo)((function(){var e;if(null!==Q&&void 0!==Q&&null!==(e=Q.logs)&&void 0!==e&&e[0]){var n,t=(null===(n=Q.logs)||void 0===n?void 0:n[0])||{};return{blockRunLogs:t.block_run_logs,pipelineRunLogs:t.pipeline_run_logs,totalBlockRunLogCount:t.total_block_run_log_count,totalPipelineRunLogCount:t.total_pipeline_run_log_count}}return{blockRunLogs:[],pipelineRunLogs:[],totalBlockRunLogCount:0,totalPipelineRunLogCount:0}}),[Q]),ie=te.blockRunLogs,le=te.pipelineRunLogs,ce=te.totalBlockRunLogCount,ue=te.totalPipelineRunLogCount,ae=+(null===G||void 0===G?void 0:G._limit)>=ce&&+(null===G||void 0===G?void 0:G._limit)>=ue,se=(0,s.useMemo)((function(){return(0,$.YC)(ie.concat(le).reduce((function(e,n){return e.concat(X(n))}),[]),(function(e){var n=e.data;return(null===n||void 0===n?void 0:n.timestamp)||0}))}),[ie,le]),de=(0,s.useMemo)((function(){return se.filter((function(e){var n=e.data,t=[];if(!c)return!0;if(t.push(!(0,Je.Qr)(n)),c["level[]"]&&t.push(c["level[]"].includes(null===n||void 0===n?void 0:n.level)),c["block_type[]"]){var r,i,o=null===n||void 0===n?void 0:n.block_uuid;if(H)o=null===n||void 0===n||null===(i=n.block_uuid)||void 0===i?void 0:i.split(":").slice(0,2).join(":");t.push(c["block_type[]"].includes(null===(r=K[o])||void 0===r?void 0:r.type))}if(c["pipeline_run_id[]"]){var l=null===n||void 0===n?void 0:n.pipeline_run_id;t.push(c["pipeline_run_id[]"].includes(String(l)))}if(c["block_run_id[]"]){var u=null===n||void 0===n?void 0:n.block_run_id;t.push(c["block_run_id[]"].includes(String(u)))}return t.every((function(e){return e}))}))}),[K,H,se,c]),he=de.length,me=(0,fe.Z)(G);(0,s.useEffect)((function(){var e;z&&(0,E.u7)((e={},(0,o.Z)(e,Ne,Be),(0,o.Z)(e,Me,0),(0,o.Z)(e,"start_timestamp",F),e))}),[z]),(0,s.useEffect)((function(){(0,Je.Xy)(G,me)||f(G)}),[G,me]);var ge=(0,fe.Z)(v);(0,s.useEffect)((function(){var e=G.log_uuid;!e||v||ge||b(se.find((function(n){var t=n.data;return(null===t||void 0===t?void 0:t.uuid)===e})))}),[se,G,v,ge]);var je=G._limit,be=G._offset,xe=+(je||0),Oe=+(be||0),Ze=Math.max(ce,ue),Pe=(0,s.useCallback)((function(){var e,n=xe,t=Oe;(ce>xe||ue>xe)&&(n=Math.min(Ze,xe+Be),t=Math.min(Oe+Be,Ze-Ze%Be),(0,E.u7)(on(on({},G),{},(e={},(0,o.Z)(e,Ne,n),(0,o.Z)(e,Me,t),e))))}),[Ze,xe,Oe,G,ce,ue]),Se=(0,s.useCallback)((function(){var e,n=xe,t=Oe;xe>=Be&&(n=Math.max(Be,xe-Be),xe>=Ze&&Ze%Be!==0&&(n=Ze-Ze%Be),t=Math.max(0,Oe-Be),(0,E.u7)(on(on({},G),{},(e={},(0,o.Z)(e,Ne,n),(0,o.Z)(e,Me,t),e))))}),[Ze,xe,Oe,G]),Ie=(0,s.useCallback)((function(){var e=!B;Y(e),(0,_e.t8)(nn.Tz,e)}),[B]),we=(0,s.useMemo)((function(){return(0,D.jsx)(Ee,{autoScrollLogs:B,blocksByUUID:K,logs:de,onRowClick:T,pipeline:W,query:c,saveScrollPosition:q,setSelectedLog:b,tableInnerRef:r,themeContext:t})}),[B,K,de,W,c,q,t]);return(0,D.jsxs)(Ve.Z,{after:v&&(0,D.jsx)(oe,{log:v,onClose:function(){(0,E.u7)((0,o.Z)({},ke,null)),b(null)},selectedTab:L,setSelectedTab:T}),afterHidden:!v,afterWidth:80*x.iI,before:(0,D.jsx)(A,{blocks:J,query:c}),beforeWidth:20*x.iI,breadcrumbs:[{label:function(){return"Logs"}}],errors:k,pageName:tn.M.PIPELINE_LOGS,pipeline:W,setErrors:I,subheader:null,title:function(e){var n=e.name;return"".concat(n," logs")},uuid:"pipeline/logs",children:[(0,D.jsx)(g.Z,{px:x.cd,py:1,children:(0,D.jsxs)(j.ZP,{children:[!ne&&(0,D.jsxs)(D.Fragment,{children:[(0,w.x6)(he)," logs found",(0,D.jsx)(Fe,{allPastLogsLoaded:ae,loadNewerLogInterval:Se,loadPastLogInterval:Pe,saveScrollPosition:q,selectedRange:O,setSelectedRange:Z})]}),ne&&"Searching..."]})}),(0,D.jsx)(p.Z,{light:!0}),ne&&(0,D.jsx)(g.Z,{p:x.cd,children:(0,D.jsx)(Qe.Z,{})}),!ne&&de.length>=1&&we,(0,D.jsx)(g.Z,{p:"".concat(1.5*x.iI,"px"),children:(0,D.jsxs)(m.ZP,{alignItems:"center",children:[(0,D.jsx)(N.ZP,on(on({},ze),{},{onClick:function(){"0"===(null===G||void 0===G?void 0:G._offset)&&(null===G||void 0===G?void 0:G._limit)===String(Be)?ee(null):(0,E.u7)({_limit:Be,_offset:0})},uuid:"logs/toolbar/load_newest",children:"Load latest logs"})),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(N.ZP,on(on({},ze),{},{backgroundColor:ve.Z.background.page,onClick:function(){var e;null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},uuid:"logs/toolbar/scroll_to_bottomt",children:"Scroll to bottom"})),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsxs)(R.Z,{children:[(0,D.jsx)(j.ZP,{noWrapping:!0,children:"Auto-scroll to new logs"}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)($e.Z,{checked:B,compact:!0,onCheck:Ie})]})]})})]})}un.getInitialProps=function(){var e=(0,i.Z)(c().mark((function e(n){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var an=(0,Xe.Z)(un)},11366:function(e,n,t){"use strict";t.d(n,{Ch:function(){return l},H8:function(){return r},Tz:function(){return c},g6:function(){return i},vF:function(){return o}});var r="pipeline_edit_before_tab_selected",i="pipeline_edit_hidden_blocks",o="pipeline_edit_block_output_logs",l="setup_ai_later",c="auto_scroll_logs"},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return b},AY:function(){return x},BP:function(){return j},JX:function(){return g},OC:function(){return d},Pc:function(){return _},Ro:function(){return y},Tz:function(){return m},Y_:function(){return Z},d$:function(){return v},jV:function(){return O},lJ:function(){return P},n1:function(){return f},s8:function(){return a},vk:function(){return o},yD:function(){return s}});var r,i,o,l=t(82394),c=t(92083),u=t.n(c);!function(e){e.TODAY="today",e.WEEK="week",e.MONTH="month"}(o||(o={}));var a=(r={},(0,l.Z)(r,o.TODAY,"today"),(0,l.Z)(r,o.WEEK,"last 7 days"),(0,l.Z)(r,o.MONTH,"last 30 days"),r),s=(i={},(0,l.Z)(i,o.TODAY,0),(0,l.Z)(i,o.WEEK,6),(0,l.Z)(i,o.MONTH,29),i),d="YYYY-MM-DD HH:mm:ss",p="YYYY-MM-DD HH:mm",f="YYYY-MM-DD",h="MMMM D, YYYY";function v(e,n){var t=n.dayAgo,r=n.includeSeconds,i=n.utcFormat,o=u()(e),l=p;return i&&(o=o.utc()),t&&(o=o.subtract(1,"days")),r&&(l=d),o.format(l)}function m(e){var n=v((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function g(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?d:p)}function j(e,n,t){return u()(e).utc().hours(+n).minutes(+t).format()}function b(e){return u()(e).unix()}function x(e,n,t,r){var i="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return r?"".concat(i,":").concat(r):i}function _(e){var n=u().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function y(e,n){var t=u().utc(),r=u().utc();null!==n&&void 0!==n&&n.localTime&&(t=u()().local(),r=u()().local());var i=(t=t.subtract(e,"days")).format(h),o=r.format(h);return null!==n&&void 0!==n&&n.endDateOnly?o:"".concat(i," - ").concat(o)}function O(e,n){var t=null!==n&&void 0!==n&&n.localTime?u()().local():u().utc();if(e===o.WEEK){var r=s[o.WEEK];t=t.subtract(r,"days")}else if(e===o.MONTH){var i=s[o.MONTH];t=t.subtract(i,"days")}return null!==n&&void 0!==n&&n.isoString?t.startOf("day").toISOString():t.startOf("day").format(d)}function Z(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90,n=new Date,t=[],r=0;r<e;r++)t.unshift(n.toISOString().split("T")[0]),n.setDate(n.getDate()-1);return t}function P(e){return e.padStart(2,"0")}},84779:function(e,n,t){"use strict";t.d(n,{JI:function(){return o},uf:function(){return i}});var r=t(75582),i=function(e){var n=String(e).split("."),t=(0,r.Z)(n,2),i=t[0],o=t[1];return"".concat(i.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(o?".".concat(o):"")};function o(e){var n=Math.floor(Date.now()/1e3);return e>0?n-e:n}},62453:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/logs",function(){return t(91780)}])}},function(e){e.O(0,[844,9902,426,4259,4495,1424,1005,7815,6422,547,4822,9774,2888,179],(function(){return n=62453,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[244],{51099:function(n,e,t){"use strict";t.d(e,{Q:function(){return a}});t(82684);var i=t(60328),r=t(67971),o=t(86673),u=t(22341),l=t(73899),c=t(49125),s=t(28598),a=22;e.Z=function(n){var e=n.page,t=n.maxPages,a=n.onUpdate,d=n.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(n,e){return e}));else{var h=Math.floor(f/2),v=e-h;e+h>=d?(v=d-f+2,f-=2):e-h<=0?(v=0,f-=2):(f-=4,v=e-Math.floor(f/2)),p=Array.from({length:f},(function(n,e){return e+v}))}return(0,s.jsx)(s.Fragment,{children:d>0&&(0,s.jsxs)(r.ZP,{alignItems:"center",children:[(0,s.jsx)(i.Z,{disabled:0===e,onClick:function(){return a(e-1)},children:(0,s.jsx)(u.Hd,{size:1.5*c.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(i.Z,{onClick:function(){return a(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(i.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(n){return(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(i.Z,{onClick:function(){n!==e&&a(n)},notClickable:n===e,backgroundColor:n===e&&l.a$,borderLess:!0,noBackground:!0,children:n+1})},n)})),!p.includes(d-1)&&(0,s.jsxs)(s.Fragment,{children:[!p.includes(d-2)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(i.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(i.Z,{onClick:function(){return a(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,s.jsx)(o.Z,{ml:1}),(0,s.jsx)(i.Z,{disabled:e===d-1,onClick:function(){return a(e+1)},children:(0,s.jsx)(u.Kw,{size:1.5*c.iI,stroke:"#AEAEAE"})})]})})}},40030:function(n,e,t){"use strict";var i=t(38626),r=t(23831),o=i.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:3;",""],(function(n){return"\n background-color: ".concat(n.backgroundColor||(n.theme.background||r.Z.background).page,";\n border-bottom: 1px solid ").concat((n.theme.borders||r.Z.borders).medium,";\n ")}));e.Z=o},22673:function(n,e,t){"use strict";var i=t(82684),r=t(68792),o=t(31811),u=t(38626),l=t(65292),c=t(23831),s=t(2005),a=t(49125),d=t(28598);e.Z=function(n){var e=n.language,t=n.maxWidth,p=n.showLineNumbers,f=n.small,h=n.source,v=n.wrapLines,g=(0,i.useContext)(u.ThemeContext);function m(n){var i=n.value;return(0,d.jsx)(o.Z,{customStyle:{backgroundColor:(g.background||c.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:s.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:e,lineNumberStyle:{color:(g.content||c.Z.content).muted},showLineNumbers:p,style:l._4,useInlineStyles:!0,wrapLines:v,children:i})}return(0,d.jsx)(r.D,{components:{code:function(n){var e=n.children;return(0,d.jsx)(m,{value:e})}},children:h})}},30264:function(n,e,t){"use strict";var i=t(82394),r=t(26304),o=(t(82684),t(47999)),u=t(62084),l=t(28598),c=["children","items","open","onClickCallback","onClickOutside","parentRef","uuid"];function s(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?s(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}e.Z=function(n){var e=n.children,t=n.items,i=n.open,s=n.onClickCallback,d=n.onClickOutside,p=n.parentRef,f=n.uuid,h=(0,r.Z)(n,c),v=(0,l.jsxs)("div",{style:{position:"relative",zIndex:d?3:2},children:[(0,l.jsx)("div",{ref:p,children:e}),(0,l.jsx)(u.Z,a(a({},h),{},{items:t,onClickCallback:s,open:i,parentRef:p,uuid:f}))]});return d?(0,l.jsx)(o.Z,{onClickOutside:d,open:!0,children:v}):v}},32316:function(n,e,t){"use strict";t.d(e,{Z:function(){return g}});var i=t(82684),r=t(60328),o=t(67971),u=t(882),l=t(86673),c=t(19711),s=t(99994),a=t(38626),d=t(49125),p=t(37391),f=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],d.cd*d.iI,d.cd*d.iI,(function(n){return n.noPadding&&"\n padding: 0;\n "}),(function(n){return n.allowScroll&&"\n overflow: auto;\n "}),p.w5),h=t(66653),v=t(28598);var g=function(n){var e=n.allowScroll,t=n.compact,a=n.contained,p=n.noPadding,g=n.onClickTab,m=n.regularSizeText,b=n.selectedTabUUID,x=n.small,j=n.tabs,C=(0,i.useMemo)((function(){var n=j.length,e=[];return j.forEach((function(i,a){var p=i.Icon,f=i.IconSelected,j=i.label,C=i.uuid,Z=C===b,k=Z&&f||p,y=j?j():C,_=(0,v.jsxs)(o.ZP,{alignItems:"center",children:[k&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(k,{default:!Z,size:2*d.iI}),(0,v.jsx)(l.Z,{mr:1})]}),(0,v.jsx)(c.ZP,{bold:!0,default:!Z,noWrapping:!0,small:!m,children:y})]});a>=1&&n>=2&&e.push((0,v.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(C))),Z?e.push((0,v.jsx)(u.Z,{backgroundGradient:s.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||x,onClick:function(n){(0,h.j)(n),g(i)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:x,children:_},C)):e.push((0,v.jsx)("div",{style:{padding:2},children:(0,v.jsx)(r.Z,{borderLess:!0,compact:t||x,default:!0,onClick:function(n){(0,h.j)(n),g(i)},outline:!0,small:x,children:_})},"button-tab-".concat(C)))})),e}),[t,g,b,x,j]),Z=(0,v.jsx)(o.ZP,{alignItems:"center",children:C});return a?Z:(0,v.jsx)(f,{allowScroll:e,noPadding:p,children:Z})}},95820:function(n,e,t){"use strict";t.d(e,{i:function(){return a}});t(82684);var i=t(38626),r=(t(93461),t(67971),t(10919),t(86673),t(47329)),o=t.n(r);o().node,o().node,o().node.isRequired,o().bool,o().string.isRequired;t(19711);var u=t(31969),l=t(2005),c=t(49125),s=t(73942),a=(t(28598),"tab");i.default.div.withConfig({displayName:"Tabs__TabHeaderContainerStyle",componentId:"sc-rojme5-0"})(["",""],(function(n){return n.containerWidthPercentage&&"\n width: ".concat(n.containerWidthPercentage,"%;\n ")})),i.default.div.withConfig({displayName:"Tabs__TabHeader",componentId:"sc-rojme5-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;margin-right:","px;position:relative;z-index:2;"," "," ",""],s.BG,s.BG,6*c.iI,(function(n){return n.noBottomBorder&&"\n border-bottom: none;\n "}),(function(n){return n.active&&"\n border-bottom: ".concat(c.cd,"px solid;\n border-color: ").concat((n.theme.interactive||u.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.fullWidth&&"\n width: 100%;\n "})),i.default.div.withConfig({displayName:"Tabs__LinkStyle",componentId:"sc-rojme5-2"})(["align-items:center;display:flex;"," "," ",""],(function(n){return n.bold&&"\n font-family: ".concat(l.nF,";\n ")}),(function(n){return n.fullWidth&&"\n justify-content: center;\n "}),(function(n){return!n.disabled&&"\n &:hover {\n path {\n fill: ".concat((n.theme.content||u.Z.interactive).linkPrimary," !important;\n }\n }\n ")}))},77492:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return Q}});var i=t(77837),r=t(75582),o=t(82394),u=t(38860),l=t.n(u),c=t(82684),s=t(83455),a=t(34376),d=t(28598);var p=function(n){var e=n.size;return(0,d.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 8.5H15.5V3.5H20.5V8.5ZM14 9V3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55229 21.5523 10 21 10H15C14.4477 10 14 9.55229 14 9ZM2 5V12.5V14V21.5C2 22.0523 2.44772 22.5 3 22.5H10.5H12H19.5C20.0523 22.5 20.5 22.0523 20.5 21.5V13.5C20.5 12.9477 20.0523 12.5 19.5 12.5H12V5C12 4.44772 11.5523 4 11 4H3C2.44772 4 2 4.44772 2 5ZM10.5 14V21H3.5V14H10.5ZM19 14V21H12V14H19ZM10.5 5.5V12.5H3.5V5.5H10.5Z",fill:"url(#paint0_linear_2842_55048)"}),(0,d.jsx)("defs",{children:(0,d.jsxs)("linearGradient",{id:"paint0_linear_2842_55048",x1:"2",y1:"12.25",x2:"22",y2:"12.25",gradientUnits:"userSpaceOnUse",children:[(0,d.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,d.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},f=t(27125),h=t(60328),v=t(32316),g=t(47999),m=t(67971),b=t(30264),x=t(40030),j=t(51099);var C=function(n){var e=n.size;return(0,d.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("g",{clipPath:"url(#clip0_3007_70027)",children:(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75 6.6859C1.75 3.95988 3.95988 1.75 6.6859 1.75h.98788c-.23022.41608-.36128.89466-.36128 1.40385s.13106.98777.36128 1.40384h-.71224c-1.32761 0-2.40385 1.07624-2.40385 2.40385 0 1.32761 1.07624 2.40385 2.40385 2.40385H15.609c3.3916 0 6.141 2.74941 6.141 6.14101 0 3.3916-2.7494 6.141-6.141 6.141H9.55584c.23019-.416.36123-.8946.36123-1.4037 0-.5092-.13108-.9879-.36134-1.404H15.609c1.8409 0 3.3333-1.4923 3.3333-3.3333 0-1.8409-1.4924-3.3333-3.3333-3.3333H6.96154C4.08329 12.1731 1.75 9.83979 1.75 6.96154V6.6859zM10.2163.25H6.6859C3.13145.25.25 3.13145.25 6.6859v.27564c0 3.70666 3.00486 6.71156 6.71154 6.71156H15.609c1.0125 0 1.8333.8208 1.8333 1.8333s-.8208 1.8333-1.8333 1.8333H7.01282c-1.60375 0-2.90385 1.3001-2.90385 2.9039 0 1.3248.88713 2.4423 2.09974 2.7911.06039.0173.12158.0328.18352.0463.20007.0436.40785.0665.62099.0665l.02449-.0001H15.609c4.22 0 7.641-3.421 7.641-7.641 0-4.22-3.421-7.64101-7.641-7.64101H6.96154c-.49918 0-.90385-.40467-.90385-.90385 0-.49918.40467-.90385.90385-.90385h3.25636c1.6038 0 2.9039-1.30009 2.9039-2.90384 0-1.60375-1.3001-2.903849-2.9039-2.90385h-.0016zm0 4.30769c-.77528 0-1.4038-.62852-1.4038-1.40384 0-.77505.62808-1.4034 1.403-1.40385h.0017c.7749.00045 1.403.6288 1.403 1.40385 0 .77532-.6285 1.40384-1.4039 1.40384zM7.01282 21.6474c-.10108 0-.19967-.0106-.29469-.0309-.03025-.0065-.06014-.0139-.08963-.0223-.58829-.1673-1.01912-.7086-1.01912-1.3505 0-.7753.62852-1.4039 1.40384-1.4039s1.40385.6286 1.40385 1.4039c0 .7696-.61935 1.3946-1.38683 1.4037h-.01742z",fill:"url(#paint0_linear_3007_70027)"})}),(0,d.jsxs)("defs",{children:[(0,d.jsxs)("linearGradient",{id:"paint0_linear_3007_70027",x1:"11.75",y1:".250001",x2:"11.75",y2:"23.1475",gradientUnits:"userSpaceOnUse",children:[(0,d.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,d.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]}),(0,d.jsx)("clipPath",{id:"clip0_3007_70027",children:(0,d.jsx)("path",{fill:"#fff",transform:"matrix(0 1 1 0 0 0)",d:"M0 0h24v24H0z"})})]})]})},Z=t(60547),k=t(47409),y=t(97496),_=t(62609),w=t(41788),P=t(55378),O=t(86673),I=t(54283),S=t(82531),R=t(56681),E=t(66166),H=t(22341),M=t(33766),N=t(59920),T=t(98781),V=t(66050),D=t(95820),A=t(49125),B=t(13740),L=t(7715),z=t(96510),U=t(59e3);function F(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function G(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?F(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var W={Icon:H.Nt,IconSelected:C,label:function(){return"Pipeline runs"},uuid:"pipeline_runs"},q={Icon:H.Re,IconSelected:p,label:function(){return"Block runs"},uuid:"block_runs"},K=[W,q];function X(n){var e,t,i=n.pipeline,o=(0,a.useRouter)(),u=(0,c.useRef)(null),l=(0,c.useState)(null),p=l[0],C=l[1],w=(0,c.useState)(W),F=w[0],X=w[1],Q=(0,c.useState)(R.G7[0]),Y=Q[0],$=Q[1],J=(0,c.useState)({}),nn=J[0],en=J[1],tn=(0,c.useState)(!1),rn=tn[0],on=tn[1],un=(0,c.useState)(!1),ln=un[0],cn=un[1],sn=(0,c.useState)(null),an=sn[0],dn=sn[1],pn=(0,c.useState)(null),fn=pn[0],hn=pn[1],vn=(0,c.useMemo)((function(){return W.uuid===(null===F||void 0===F?void 0:F.uuid)}),[null===F||void 0===F?void 0:F.uuid]),gn=i.uuid,mn=S.ZP.pipelines.detail(gn,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,bn=(0,c.useMemo)((function(){return G(G({},null===mn||void 0===mn?void 0:mn.pipeline),{},{uuid:gn})}),[mn,gn]),xn=(0,c.useState)(),jn=xn[0],Cn=xn[1],Zn=(0,U.iV)(),kn=(0,E.Z)(Zn),yn=null!==Zn&&void 0!==Zn&&Zn.page?Zn.page:0;(0,c.useEffect)((function(){var n=Zn.pipeline_run_id,e=Zn.status;if(!(0,L.Xy)(Zn,kn)){var t=G(G({},kn),Zn);n?t.pipeline_run_id=n:t.pipeline_uuid=gn,e?t.status=e:delete t.status,hn(t),en({})}}),[gn,Zn,kn]);var _n={_limit:30,_offset:30*yn,pipeline_uuid:gn},wn=(0,L.gR)(G(G({},fn),_n),[D.i,"page"]);vn&&(wn=(0,L.gR)(wn,[M.O2]));var Pn=S.ZP.block_runs.list(wn,{},{pauseFetch:!fn}).data,On=(0,c.useMemo)((function(){return(null===Pn||void 0===Pn?void 0:Pn.block_runs)||[]}),[Pn]),In=G({},_n);null!==Zn&&void 0!==Zn&&Zn.status&&(In.status=Zn.status),vn||(In=(0,L.gR)(In,[M.O2]));var Sn=S.ZP.pipeline_runs.list(In,{refreshInterval:5e3},{pauseFetch:!gn}),Rn=Sn.data,En=Sn.mutate,Hn=(0,c.useMemo)((function(){return(null===Rn||void 0===Rn?void 0:Rn.pipeline_runs)||[]}),[Rn]),Mn=(0,c.useMemo)((function(){var n,e;return vn?(null===Rn||void 0===Rn||null===(n=Rn.metadata)||void 0===n?void 0:n.count)||[]:(null===Pn||void 0===Pn||null===(e=Pn.metadata)||void 0===e?void 0:e.count)||[]}),[null===Pn||void 0===Pn||null===(e=Pn.metadata)||void 0===e?void 0:e.count,null===Rn||void 0===Rn||null===(t=Rn.metadata)||void 0===t?void 0:t.count,vn]),Nn=(0,c.useMemo)((function(){return Hn.some((function(n){var e=n.status;return e===V.V.INITIAL||e===V.V.RUNNING}))}),[Hn]),Tn=(0,c.useMemo)((function(){return Object.values(nn||{}).filter((function(n){return null!==n}))}),[nn]),Vn=Tn.length,Dn=(0,c.useMemo)((function(){return Object.values(nn||{}).filter((function(n){return null!==n&&k.BF.includes(null===n||void 0===n?void 0:n.status)}))}),[nn]),An=Dn.length,Bn=(0,s.Db)(S.ZP.pipelines.useUpdate(gn),{onSuccess:function(n){return(0,z.wD)(n,{callback:function(){en({}),En()},onErrorCallback:function(n,e){return C({errors:e,response:n})}})}}),Ln=(0,r.Z)(Bn,2),zn=Ln[0],Un=(Ln[1].isLoading,(0,E.Z)(F));(0,c.useEffect)((function(){var n=Zn[D.i];n&&X(K.find((function(e){return e.uuid===n})))}),[Zn,F,Un]);var Fn=(0,c.useMemo)((function(){return[{isGroupingTitle:!0,label:function(){return"".concat(Vn," selected")},uuid:"runs_selected_count"},{beforeIcon:(0,d.jsx)(H.hY,{muted:0===Vn}),disabled:0===Vn,label:function(){return"Retry selected (".concat(Vn,")")},onClick:function(){return zn({pipeline:{pipeline_runs:Tn,status:T.QK.RETRY}})},uuid:"retry_selected"},{beforeIcon:(0,d.jsx)(H.uy,{muted:0===An}),disabled:0===An,label:function(){return"Cancel selected running (".concat(An,")")},onClick:function(){return zn({pipeline:{pipeline_runs:Dn,status:V.V.CANCELLED}})},uuid:"cancel_selected_running"},{beforeIcon:(0,d.jsx)(H.uy,{muted:!(Nn&&vn)}),disabled:!(Nn&&vn),label:function(){return"Cancel all running"},onClick:function(){return zn({pipeline:{status:V.V.CANCELLED}})},openConfirmationDialogue:!0,uuid:"cancel_all_running"}]}),[Nn,vn,Dn,An,Tn,Vn,zn]),Gn=(0,c.useMemo)((function(){return(0,d.jsx)(O.Z,{p:2,children:(0,d.jsx)(j.Z,{maxPages:9,onUpdate:function(n){var e=Number(n),t=G(G({},Zn),{},{page:e>=0?e:0});o.push("/pipelines/[pipeline]/runs","/pipelines/".concat(gn,"/runs?").concat((0,U.uM)(t)))},page:Number(yn),totalPages:Math.ceil(Mn/30)})})}),[yn,gn,Zn,o,Mn]),Wn=(0,c.useMemo)((function(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(y.Z,{allowBulkSelect:(null===bn||void 0===bn?void 0:bn.type)!==T.qL.STREAMING,fetchPipelineRuns:En,onClickRow:function(n){return Cn((function(e){var t=Hn[n];return(null===e||void 0===e?void 0:e.id)!==t.id?t:null}))},pipelineRuns:Hn,selectedRun:jn,selectedRuns:nn,setErrors:C,setSelectedRuns:en}),Gn]})}),[En,Gn,null===bn||void 0===bn?void 0:bn.type,Hn,jn,nn]),qn=(0,c.useMemo)((function(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.Z,{blockRuns:On,pipeline:bn}),Gn]})}),[On,Gn,bn]);return(0,d.jsxs)(Z.Z,{afterHidden:vn&&!jn,breadcrumbs:[{label:function(){return"Runs"}}],buildSidekick:vn?function(n){return(0,R.ZP)(G(G({},n),{},{selectedRun:jn,selectedTab:Y,setSelectedTab:$}))}:function(n){return(0,R.ZP)(n)},errors:p,pageName:N.M.RUNS,pipeline:bn,setErrors:C,title:function(n){var e=n.name;return"".concat(e," runs")},uuid:"".concat(N.M.RUNS,"_").concat(gn),children:[(0,d.jsx)(x.Z,{children:(0,d.jsx)(O.Z,{pr:1,py:1,children:(0,d.jsxs)(m.ZP,{alignItems:"center",children:[(0,d.jsx)(v.Z,{onClickTab:function(n){var e=n.uuid;hn(null),(0,M.u7)({tab:e},{replaceParams:!0})},selectedTabUUID:null===F||void 0===F?void 0:F.uuid,tabs:K}),(0,d.jsx)(B.lZ,{right:1}),(0,d.jsxs)(O.Z,{px:2,children:[(0,d.jsx)(b.Z,{items:Fn,onClickCallback:function(){return on(!1)},onClickOutside:function(){return on(!1)},open:rn,parentRef:u,roundedStyle:!0,setConfirmationAction:dn,setConfirmationDialogueOpen:cn,topOffset:4,uuid:"PipelineRuns/ActionsMenu",children:(0,d.jsx)(h.Z,{afterIcon:(0,d.jsx)(H.K5,{}),onClick:function(){return on((function(n){return!n}))},outline:!0,padding:"6px 12px",children:"Actions"})}),(0,d.jsx)(g.Z,{onClickOutside:function(){return cn(!1)},open:ln,children:(0,d.jsx)(_.Z,{danger:!0,onCancel:function(){return cn(!1)},onClick:function(){null===an||void 0===an||an(),cn(!1)},subtitle:"This includes runs on other pages as well, not just the current page.",title:"Are you sure you want to cancel all pipeline runs in progress?",width:40*A.iI})})]}),vn&&(0,d.jsxs)(P.Z,{compact:!0,defaultColor:!0,onChange:function(n){n.preventDefault(),"all"===n.target.value?(hn(null),(0,M.u7)({tab:W.uuid},{replaceParams:!0})):(0,M.u7)({page:0,status:n.target.value})},paddingRight:4*A.iI,placeholder:"Select run status",value:null===fn||void 0===fn?void 0:fn.status,children:[(0,d.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),k.IK.map((function(n){return(0,d.jsx)("option",{value:n,children:k.Do[n]},n)}))]})]})})}),Rn||Pn?(0,d.jsxs)(d.Fragment,{children:[vn&&Wn,q.uuid===(null===F||void 0===F?void 0:F.uuid)&&qn]}):(0,d.jsx)(O.Z,{m:3,children:(0,d.jsx)(I.Z,{inverted:!0})})]})}X.getInitialProps=function(){var n=(0,i.Z)(l().mark((function n(e){var t;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.query.pipeline,n.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();var Q=(0,w.Z)(X)},79897:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs",function(){return t(77492)}])}},function(n){n.O(0,[844,9902,426,1774,8792,7849,1424,1005,7815,6422,547,8952,7496,2786,9774,2888,179],(function(){return e=79897,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{17717:function(e,n,r){var t=r(554);!function(){"use strict";var n={977:function(e){function n(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,n){for(var r,t="",i=0,o=-1,l=0,c=0;c<=e.length;++c){if(c<e.length)r=e.charCodeAt(c);else{if(47===r)break;r=47}if(47===r){if(o===c-1||1===l);else if(o!==c-1&&2===l){if(t.length<2||2!==i||46!==t.charCodeAt(t.length-1)||46!==t.charCodeAt(t.length-2))if(t.length>2){var u=t.lastIndexOf("/");if(u!==t.length-1){-1===u?(t="",i=0):i=(t=t.slice(0,u)).length-1-t.lastIndexOf("/"),o=c,l=0;continue}}else if(2===t.length||1===t.length){t="",i=0,o=c,l=0;continue}n&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+="/"+e.slice(o+1,c):t=e.slice(o+1,c),i=c-o-1;o=c,l=0}else 46===r&&-1!==l?++l:l=-1}return t}var i={resolve:function(){for(var e,i="",o=!1,l=arguments.length-1;l>=-1&&!o;l--){var c;l>=0?c=arguments[l]:(void 0===e&&(e=t.cwd()),c=e),n(c),0!==c.length&&(i=c+"/"+i,o=47===c.charCodeAt(0))}return i=r(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var t=arguments[r];n(t),t.length>0&&(void 0===e?e=t:e+="/"+t)}return void 0===e?".":i.normalize(e)},relative:function(e,r){if(n(e),n(r),e===r)return"";if((e=i.resolve(e))===(r=i.resolve(r)))return"";for(var t=1;t<e.length&&47===e.charCodeAt(t);++t);for(var o=e.length,l=o-t,c=1;c<r.length&&47===r.charCodeAt(c);++c);for(var u=r.length-c,s=l<u?l:u,a=-1,d=0;d<=s;++d){if(d===s){if(u>s){if(47===r.charCodeAt(c+d))return r.slice(c+d+1);if(0===d)return r.slice(c+d)}else l>s&&(47===e.charCodeAt(t+d)?a=d:0===d&&(a=0));break}var f=e.charCodeAt(t+d);if(f!==r.charCodeAt(c+d))break;47===f&&(a=d)}var v="";for(d=t+a+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===v.length?v+="..":v+="/..");return v.length>0?v+r.slice(c+a):(c+=a,47===r.charCodeAt(c)&&++c,r.slice(c))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var r=e.charCodeAt(0),t=47===r,i=-1,o=!0,l=e.length-1;l>=1;--l)if(47===(r=e.charCodeAt(l))){if(!o){i=l;break}}else o=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!==typeof r)throw new TypeError('"ext" argument must be a string');n(e);var t,i=0,o=-1,l=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var c=r.length-1,u=-1;for(t=e.length-1;t>=0;--t){var s=e.charCodeAt(t);if(47===s){if(!l){i=t+1;break}}else-1===u&&(l=!1,u=t+1),c>=0&&(s===r.charCodeAt(c)?-1===--c&&(o=t):(c=-1,o=u))}return i===o?o=u:-1===o&&(o=e.length),e.slice(i,o)}for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!l){i=t+1;break}}else-1===o&&(l=!1,o=t+1);return-1===o?"":e.slice(i,o)},extname:function(e){n(e);for(var r=-1,t=0,i=-1,o=!0,l=0,c=e.length-1;c>=0;--c){var u=e.charCodeAt(c);if(47!==u)-1===i&&(o=!1,i=c+1),46===u?-1===r?r=c:1!==l&&(l=1):-1!==r&&(l=-1);else if(!o){t=c+1;break}}return-1===r||-1===i||0===l||1===l&&r===i-1&&r===t+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,n){var r=n.dir||n.root,t=n.base||(n.name||"")+(n.ext||"");return r?r===n.root?r+t:r+e+t:t}("/",e)},parse:function(e){n(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var t,i=e.charCodeAt(0),o=47===i;o?(r.root="/",t=1):t=0;for(var l=-1,c=0,u=-1,s=!0,a=e.length-1,d=0;a>=t;--a)if(47!==(i=e.charCodeAt(a)))-1===u&&(s=!1,u=a+1),46===i?-1===l?l=a:1!==d&&(d=1):-1!==l&&(d=-1);else if(!s){c=a+1;break}return-1===l||-1===u||0===d||1===d&&l===u-1&&l===c+1?-1!==u&&(r.base=r.name=0===c&&o?e.slice(1,u):e.slice(c,u)):(0===c&&o?(r.name=e.slice(1,l),r.base=e.slice(1,u)):(r.name=e.slice(c,l),r.base=e.slice(c,u)),r.ext=e.slice(l,u)),c>0?r.dir=e.slice(0,c-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}},l=!0;try{n[e](o,o.exports,i),l=!1}finally{l&&delete r[e]}return o.exports}i.ab="//";var o=i(977);e.exports=o}()},66050:function(e,n,r){"use strict";var t;r.d(n,{V:function(){return t}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(t||(t={}))},47409:function(e,n,r){"use strict";r.d(n,{Az:function(){return u},BF:function(){return c},Do:function(){return a},IK:function(){return l},VO:function(){return o},sZ:function(){return s}});var t,i=r(82394),o=r(66050).V,l=[o.FAILED,o.COMPLETED,o.RUNNING,o.CANCELLED,o.INITIAL],c=[o.INITIAL,o.RUNNING],u=[o.CANCELLED,o.COMPLETED,o.FAILED],s="__mage_variables",a=(t={},(0,i.Z)(t,o.CANCELLED,"Cancelled"),(0,i.Z)(t,o.COMPLETED,"Done"),(0,i.Z)(t,o.FAILED,"Failed"),(0,i.Z)(t,o.INITIAL,"Ready"),(0,i.Z)(t,o.RUNNING,"Running"),t)},98781:function(e,n,r){"use strict";r.d(n,{$1:function(){return a},G7:function(){return f},LM:function(){return v},Mj:function(){return p},QK:function(){return s},a_:function(){return h},qL:function(){return l},r0:function(){return d}});var t,i,o,l,c=r(82394),u=r(22341);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(l||(l={}));var s,a,d,f=(t={},(0,c.Z)(t,l.INTEGRATION,"Integration"),(0,c.Z)(t,l.PYTHON,"Standard"),(0,c.Z)(t,l.PYSPARK,"PySpark"),(0,c.Z)(t,l.STREAMING,"Streaming"),t),v="all",p=(l.PYTHON,l.INTEGRATION,l.STREAMING,i={},(0,c.Z)(i,v,u.ie),(0,c.Z)(i,l.INTEGRATION,u.YC),(0,c.Z)(i,l.PYTHON,u.El),(0,c.Z)(i,l.STREAMING,u.dB),i);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules",e.RETRY="retry"}(s||(s={})),function(e){e.GROUP="group_by",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(a||(a={})),function(e){e.STATUS="status",e.TAG="tag",e.TYPE="type"}(d||(d={}));var h=(o={},(0,c.Z)(o,l.PYTHON,"python3"),(0,c.Z)(o,l.PYSPARK,"pysparkkernel"),o)},89745:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return oe}});var t=r(77837),i=r(38860),o=r.n(i),l=r(82684),c=r(60547),u=r(41788),s=r(75582),a=r(82394),d=r(93461),f=r(67971),v=r(87372),p=r(47409),h=r(86673),m=r(54283),g=r(19711),b=r(23831),x=r(22341),j=r(38626),Z=r(73942),y=r(2005),I=r(49125),N=r(31012),O=j.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,I.cd*I.iI,(function(e){return"\n background-color: ".concat((e.theme.background||b.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||b.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.selected&&e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.selected&&e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.selected&&e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.selected&&e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")}),(function(e){return e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),k=(0,j.css)([""," "," "," "," ",""],(function(e){return e.danger&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),P=j.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],k,N.iD,Z.D7,y.ry,(function(e){return e.danger&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return e.primary&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return(e.default||e.success)&&"\n "}),(function(e){return e.default&&"\n color: ".concat((e.theme.content||b.Z.content).default,";\n ")}),(function(e){return e.success&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")}),(function(e){return e.warning&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")})),_=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],k,(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")})),E=r(90211),w=r(92083),A=r.n(w),C=r(66050),T=r(24224);function S(e){var n;return Object.keys((null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{}).sort()}function M(e){var n,r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null,o=null,l=null,c=null,u={},a=(null===e||void 0===e?void 0:e.block_runs)||[],d=(null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{},f=(null===e||void 0===e||null===(r=e.metrics)||void 0===r?void 0:r.pipeline)||{},v=L(e);return Object.entries(d).forEach((function(e){var n,r=(0,s.Z)(e,2),a=r[0],d=r[1];if(!t||t===a){var p,h=d||{},m=h.destinations,g=void 0===m?{records_affected:null,records_inserted:null,records_updated:null}:m,b=h.sources,x=void 0===b?{records:null}:b,j=v[a]||[];if(t&&t===a&&j.every((function(e){var n=e.status;return C.V.COMPLETED===n}))&&null===i&&(i=0),null!==f&&void 0!==f&&null!==(n=f[a])&&void 0!==n&&n.record_counts)null===i&&(i=0),i+=Number(null===f||void 0===f||null===(p=f[a])||void 0===p?void 0:p.record_counts);else null!==x&&void 0!==x&&x.records&&(null===i&&(i=0),i+=Number(x.records));null!==g&&void 0!==g&&g.records_updated?(null===l&&(l=0),l+=Number(g.records_updated),null===c&&(c=0),c+=Number(g.records_updated)):null!==g&&void 0!==g&&g.records_inserted?(null===l&&(l=0),l+=Number(g.records_inserted),null===o&&(o=0),o+=Number(g.records_inserted)):null!==g&&void 0!==g&&g.records_affected&&(null===l&&(l=0),l+=Number(g.records_affected)),["destinations","sources"].forEach((function(e){var n=d[e]||{};null!==n&&void 0!==n&&n.error&&(u[a]||(u[a]={}),u[a][e]={error:null===n||void 0===n?void 0:n.error,errors:null===n||void 0===n?void 0:n.errors,message:null===n||void 0===n?void 0:n.message})}))}})),null===a||void 0===a||a.forEach((function(e){var n=e.block_uuid,r=e.metrics,t=e.status;if(C.V.FAILED===t&&null!==r&&void 0!==r&&r.error&&n){var i=n.split(":"),o=(0,s.Z)(i,3),l=(o[0],o[1]);o[2];u[l]||(u[l]={}),u[l][""]=r.error}})),{errors:u,records:i,recordsInserted:o,recordsProcessed:l,recordsUpdated:c}}function L(e){var n=e.block_runs,r={};return null===n||void 0===n||n.forEach((function(e){var n=e.block_uuid.split(":"),t=(0,s.Z)(n,3),i=(t[0],t[1]);t[2];r[i]||(r[i]=[]),r[i].push(e)})),r}function D(e){var n=L(e),r={};return Object.entries(n).forEach((function(e){var n=(0,s.Z)(e,2),t=n[0],i=n[1],o=i.filter((function(e){var n=e.status;return C.V.COMPLETED===n})),l=o.map((function(e){var n=e.completed_at,r=e.started_at,t=A().utc(n),i=A().utc(r);return t.diff(i,"second")})),c=o.length,u=i.length;r[t]={completed:c,runtime:l.length>=1?(0,T.Sm)(l)/l.length:null,total:u}})),r}function R(e){var n=e.block_runs,r=(null===n||void 0===n?void 0:n.length)||1,t=function(e){var n=(null===e||void 0===e?void 0:e.block_runs)||[];return null===n||void 0===n?void 0:n.filter((function(e){var n=e.status;return C.V.COMPLETED===n}))}(e).length||0;return t/r}function V(e){var n=e.completed_at,r=e.block_runs,t=void 0===r?[]:r,i=e.status;if(null===t||void 0===t||!t.length)return 0;var o=A().utc();if(n)o=A().utc(n);else if([p.VO.CANCELLED,p.VO.FAILED].includes(i)){var l=(0,T.YC)(t,(function(e){return e.started_at}),{ascending:!1})[0];o=A().utc(l.updated_at)}var c=A().utc(e.created_at);return o.diff(c,"second")}function G(e,n){var r,t,i,o,l,c=L(e),u=D(e),s=(null===e||void 0===e?void 0:e.metrics)||{blocks:null,pipeline:null},a=s.blocks||{},d=s.pipeline||{},f=(a[n],d[n],u[n]||{completed:null,total:null}),v=f.completed,p=f.total,h=v&&p?v/p:0,m=c[n]||[],g=m.every((function(e){var n=e.status;return C.V.COMPLETED===n})),b=(0,T.YC)(m,(function(e){return e.updated_at}),{ascending:!1})[0],x=null===(r=(0,T.YC)(m,(function(e){return e.started_at}),{ascending:!0})[0])||void 0===r?void 0:r.started_at;g?t=null===(l=(0,T.YC)(m,(function(e){return e.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:b&&(o=null===b||void 0===b?void 0:b.updated_at);var j=g?A().utc(t||o):A().utc(),Z=A().utc(x);return{completed:v,completedAt:t,done:g,progress:h,runtime:i=j.diff(Z,"second"),startedAt:x,status:null===b||void 0===b?void 0:b.status,timeText:(0,E.zf)(i),total:p,updatedAt:o}}var U=r(28598);function F(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function Y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?F(Object(r),!0).forEach((function(n){(0,a.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var z=function(e){var n=e.onSelect,r=e.pipelineRun,t=e.selected,i=(r.block_runs,r.created_at),o=r.status,c=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[r]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),a=c.destination,j=c.source,Z=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),y=(0,l.useMemo)((function(){return M(r)}),[r]),N=y.errors,k=y.records,w=y.recordsProcessed,A=(0,l.useMemo)((function(){return R(r)}),[r]),C=(0,l.useMemo)((function(){return[p.VO.COMPLETED].includes(o)}),[o]),T=(0,l.useMemo)((function(){return{danger:p.VO.FAILED===o,default:p.VO.INITIAL===o,primary:p.VO.RUNNING===o,success:C,warning:p.VO.CANCELLED===o}}),[C,o]),S=(0,l.useMemo)((function(){if(r){var e=V(r);return(0,E.zf)(e)}}),[r]);return(0,U.jsx)(O,Y(Y({},T),{},{onClick:function(){return n(t?null:r.id)},selected:t,children:(0,U.jsxs)(f.ZP,{fullHeight:!0,justifyContent:"space-between",children:[(0,U.jsx)(_,Y({},T)),(0,U.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(h.Z,{ml:3,py:3,children:[(0,U.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:i}),(0,U.jsx)(h.Z,{fullWidth:!1,mt:2,children:(0,U.jsx)(P,Y(Y({},T),{},{children:(0,U.jsxs)(f.ZP,{alignItems:"center",children:[C&&(0,U.jsx)(x.Jr,{inverted:!0,size:2*I.iI}),[p.VO.INITIAL,p.VO.RUNNING].includes(o)&&(0,U.jsx)(m.Z,{color:p.VO.INITIAL!==o?b.Z.monotone.white:null,inverted:p.VO.INITIAL===o,small:!0}),"\xa0",p.VO.RUNNING===o&&(0,U.jsxs)(U.Fragment,{children:["\xa0",Math.round(100*A),"%"]}),![p.VO.INITIAL,p.VO.RUNNING].includes(o)&&p.Do[o],p.VO.INITIAL===o&&"Starting"]})}))}),Object.values(N).length>=1&&(0,U.jsx)(h.Z,{mt:1,children:Object.entries(N).map((function(e,n){var r=(0,s.Z)(e,2),t=r[0];r[1];return(0,U.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,U.jsxs)(d.Z,{flex:1,children:[(0,U.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(h.Z,{ml:3,py:3,children:[(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,U.jsx)(g.ZP,{monospace:!0,children:w>=1?(0,E.x6)(w):"-"})]}),(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,U.jsx)(g.ZP,{monospace:!0,children:k>=1&&k>=w?(0,E.x6)(k-w):"-"})]}),p.VO.RUNNING!==o&&(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,U.jsx)(g.ZP,{monospace:!0,children:S})]})]})}),(0,U.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(h.Z,{ml:3,py:3,children:[(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,U.jsx)(g.ZP,{monospace:!0,children:j||"-"})]}),(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,U.jsx)(g.ZP,{monospace:!0,children:a||"-"})]}),(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,U.jsx)(g.ZP,{monospace:!0,children:Z>=1?(0,E.x6)(Z):"-"})]})]})})]})]})}))},B=r(89565),H=r.n(B),W=r(34376),J=r(60328),K=r(10919),X=r(87815),q=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(e){return e.even&&e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyan,";\n ")}),(function(e){return e.even&&!e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyanTransparent,";\n ")}),(function(e){return"\n height: ".concat((e.small?1:2)*I.iI,"px;\n ")})),Q=r(66653);var $=function(e){var n=e.onClickRow,r=e.pipelineRun,t=e.selectedStream,i=(0,W.useRouter)(),o=(0,l.useState)(null),c=o[0],u=o[1],a=(0,l.useState)(null),d=a[0],m=a[1],b=(0,l.useMemo)((function(){return r?L(r):{}}),[r]),j=(0,l.useMemo)((function(){return r?D(r):{}}),[r]),Z=(0,l.useMemo)((function(){var e=0,n=[],r=[];if(Object.entries(j).forEach((function(t){var i=(0,s.Z)(t,2),o=(i[0],i[1]),l=o.completed,c=o.runtime,u=o.total;null===c?r.push(o):(n.push(c),e+=c*(u-l))})),0===n.length)return null;var t=(0,T.Sm)(n)/n.length;return r.forEach((function(n){var r=n.completed,i=n.total;e+=t*(i-r)})),e}),[j]),y=(0,l.useMemo)((function(){return t?j[t]:null}),[j,t]),N=(0,l.useMemo)((function(){if(t&&j){var e=j[t]||{},n=e.completed,i=e.total;if(i>=1)return n/i}else if(r)return R(r);return 0}),[y,r,t]),O=(0,l.useMemo)((function(){return(0,U.jsx)(f.ZP,{children:(0,T.w6)(101).map((function(e,n){return(0,U.jsx)(q,{even:n%2===0,fill:N>0&&Math.round(100*N)>=n},n)}))})}),[N]),k=(0,l.useMemo)((function(){if(t){var e=b[t]||[],n=e.every((function(e){var n=e.status;return C.V.COMPLETED===n})),i=(0,T.YC)(e,(function(e){return e.updated_at}),{ascending:!1})[0],o=null===i||void 0===i?void 0:i.status,l=y||{},c=l.completed,u=l.runtime,s=l.total;if(n)return"Sync complete for ".concat(t);if([C.V.CANCELLED,C.V.FAILED].includes(o))return p.Do[o];if(u&&s>=1){var a=Math.ceil(u*(s-c)/60);return"".concat((0,E._6)("minute",a,!0)," to completion")}return"Estimating time remaining for stream..."}if(p.VO.COMPLETED===(null===r||void 0===r?void 0:r.status))return"Sync complete";if(r){if([p.VO.CANCELLED,p.VO.FAILED].includes(null===r||void 0===r?void 0:r.status))return p.Do[null===r||void 0===r?void 0:r.status];if(p.VO.INITIAL===(null===r||void 0===r?void 0:r.status))return"Initializing sync (this can take several minutes)";if(null===Z)return"Estimating time remaining...";var d=Math.ceil(Z/60);return"".concat((0,E._6)("minute",d,!0)," to completion")}return"Select a sync"}),[b,Z,y,r,t]),P=(0,l.useMemo)((function(){return r&&t?G(r,t):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[r,t]);(0,l.useEffect)((function(){var e;if(r){var n=V(r);u(n),e=setInterval((function(){return u((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r]),(0,l.useEffect)((function(){var e;if(r&&t&&P){var n=(null===P||void 0===P?void 0:P.runtime)||0;m(n),e=setInterval((function(){return m((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r,t,P]);var _=(0,l.useMemo)((function(){if(r){if(t)return null===P||void 0===P?void 0:P.timeText;var e=V(r);return(0,E.zf)(e)}}),[r,t,P]),w=(0,l.useMemo)((function(){var e=Math.floor(c%86400/3600),n=Math.floor(c%3600/60),r=Math.floor(c%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[c]),A=(0,l.useMemo)((function(){var e=Math.floor(d%86400/3600),n=Math.floor(d%3600/60),r=Math.floor(d%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[d]),F=(0,l.useMemo)((function(){return r?M(r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r]),Y=F.errors,z=F.records,B=F.recordsInserted,$=F.recordsProcessed,ee=F.recordsUpdated,ne=(0,l.useMemo)((function(){return r&&t?M(r,t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r,t]),re=(0,l.useMemo)((function(){var e=t?null===ne||void 0===ne?void 0:ne.records:z,n=t?null===ne||void 0===ne?void 0:ne.recordsInserted:B,r=t?null===ne||void 0===ne?void 0:ne.recordsProcessed:$,i=t?null===ne||void 0===ne?void 0:ne.recordsUpdated:ee,o=[{label:"Rows fetched",value:null===e?"-":(0,E.x6)(e)}];return null===n&&null===i?o.push({label:"Rows processed",value:null===r?"-":(0,E.x6)(r)}):null!==n?o.push({label:"Rows inserted",value:(0,E.x6)(n)}):null!==i&&o.push({label:"Rows updated",value:(0,E.x6)(i)}),o.map((function(e){var n=e.label,r=e.value;return(0,U.jsxs)("div",{children:[(0,U.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:n}),(0,U.jsx)(g.ZP,{headline:!0,children:r})]},n)}))}),[z,ne,B,$,ee,_,w,status]),te=(0,l.useMemo)((function(){if(!r)return(0,U.jsx)("div",{});var e=S(r);return(0,U.jsx)(X.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(n){return t&&t===e[n]},onClickRow:n,rows:e.map((function(e){var n=G(r,e),t=(n.completed,n.completedAt),o=n.done,l=n.progress,c=n.startedAt,u=n.status,s=n.timeText,a=(n.total,!!Y[e]);return[(0,U.jsx)(g.ZP,{danger:a,default:!a,monospace:!0,children:e},"stream"),(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:t?t.split(".")[0]:"-"},"completed_at"),(0,U.jsx)(g.ZP,{default:!0,children:[C.V.INITIAL,C.V.RUNNING].includes(u)?"-":s},"runtime"),(0,U.jsxs)("div",{children:[o&&(0,U.jsx)(x.Jr,{default:!0,size:2*I.iI}),!o&&(0,U.jsx)(f.ZP,{children:(0,T.w6)(51).map((function(e,n){return(0,U.jsx)(q,{fill:l>0&&Math.round(50*l)>=n,even:n%2===0,small:!0},n)}))})]},"progress"),(0,U.jsx)(J.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){i.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id)),(0,Q.j)(e)},children:(0,U.jsx)(x.B4,{default:!0,size:2*I.iI})},"logs")]})),uuid:"".concat(null===r||void 0===r?void 0:r.id,"-streams-table")})}),[Y,j,r,t]),ie=(0,l.useMemo)((function(){var e,n,i,o,l,c,u,a;if(r&&t){var d=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===d||void 0===d||null===(e=d.pipeline)||void 0===e||null===(n=e[t])||void 0===n||null===(i=n.bookmarks)||void 0===i?void 0:i[t],v=null===d||void 0===d||null===(o=d.blocks)||void 0===o||null===(l=o[t])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(a=u.bookmarks)||void 0===a?void 0:a[t];if(f||v){var p=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),h=[];p.forEach((function(e){var n=[(0,U.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[f,v].forEach((function(r,t){r&&n.push((0,U.jsx)(g.ZP,{monospace:!0,small:!0,children:r[e]},"".concat(e,"-").concat(t)))})),h.push(n)}));var m=[{label:function(){return""},uuid:"column"}];return[[null===d||void 0===d?void 0:d.source,"source",f],[null===d||void 0===d?void 0:d.destination,"destination",v]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&m.push({uuid:"".concat(r," (").concat(t,")")})})),(0,U.jsx)(X.Z,{columnFlex:[null,1,1],columns:m,rows:h,uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),oe=(0,l.useMemo)((function(){var e,n,i,o,l,c;if(r&&t){var u=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},a=null===u||void 0===u||null===(e=u.blocks)||void 0===e||null===(n=e[t])||void 0===n||null===(i=n.sources)||void 0===i?void 0:i.record,d=null===u||void 0===u||null===(o=u.blocks)||void 0===o||null===(l=o[t])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(a||d){var f=Object.keys(d||a||{}).sort(),v=[];f.forEach((function(e){var n=[(0,U.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[a,d].forEach((function(r,t){if(r){var i=r[e],o="object"===typeof i;n.push((0,U.jsxs)(g.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[o&&(0,U.jsx)("pre",{children:JSON.stringify(i,null,2)}),!o&&i]},"".concat(e,"-").concat(t)))}})),v.push(n)}));var p=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",a],[null===u||void 0===u?void 0:u.destination,"destination",d]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&p.push({uuid:"".concat(r," (").concat(t,")")})})),(0,U.jsx)(X.Z,{columnFlex:[null,1,1],columns:p,rows:v.map((function(e){return e.map((function(e){return(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:e},e)}))})),uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),le=(0,l.useMemo)((function(){var e,n,i,o,l,c,u=null===r||void 0===r||null===(e=r.metrics)||void 0===e||null===(n=e.blocks)||void 0===n?void 0:n[t];return(null===u||void 0===u||null===(i=u.sources)||void 0===i||null===(o=i.block_tags)||void 0===o?void 0:o.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[r,t]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(h.Z,{p:3,children:[t&&(0,U.jsx)(h.Z,{mb:3,children:(0,U.jsxs)(f.ZP,{alignItems:"center",children:[(0,U.jsx)(K.Z,{block:!0,onClick:function(){return i.push("/pipelines/".concat(r.pipeline_uuid,"/syncs?pipeline_run_id=").concat(r.id))},preventDefault:!0,children:(0,U.jsxs)(f.ZP,{alignItems:"center",children:[(0,U.jsx)(x.Xd,{default:!0,size:1.5*I.iI}),(0,U.jsx)(h.Z,{mr:1}),(0,U.jsx)(g.ZP,{default:!0,children:"Syncs"})]})}),(0,U.jsx)(h.Z,{mx:1,children:(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:"/"})}),(0,U.jsx)(g.ZP,{bold:!0,monospace:!0,children:t})]})}),(0,U.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,U.jsx)(h.Z,{mr:2,my:1,children:(0,U.jsx)(v.Z,{level:5,muted:!r,children:k})}),r&&(0,U.jsx)(J.Z,{onClick:function(){return i.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id))},small:!0,children:"Logs"})]}),(0,U.jsx)(h.Z,{mt:2,children:O}),r&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(h.Z,{mt:3,children:(0,U.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,U.jsxs)("div",{children:[(0,U.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,U.jsxs)(g.ZP,{headline:!0,children:[t&&[C.V.INITIAL,C.V.RUNNING].includes(null===P||void 0===P?void 0:P.status)&&A,t&&![C.V.INITIAL,C.V.RUNNING].includes(null===P||void 0===P?void 0:P.status)&&(null===P||void 0===P?void 0:P.timeText),!t&&[p.VO.INITIAL,p.VO.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&w,!t&&![p.VO.INITIAL,p.VO.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&_]})]}),re]})}),Object.values(Y).length>=1&&(0,U.jsxs)(h.Z,{mt:3,children:[(0,U.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(Y).map((function(e,n){var r=(0,s.Z)(e,2),i=r[0],o=r[1];return(!t||t===i)&&(0,U.jsx)(h.Z,{mt:n>=1?1:0,children:Object.entries(o).map((function(e){var n=(0,s.Z)(e,2),r=n[0],t=n[1],o=t.error,l=t.errors,c=t.message,u=Array.isArray(o)?o.join(" "):o;return(0,U.jsxs)("div",{children:[(0,U.jsx)(h.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,U.jsxs)(g.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[i,!!r&&(0,U.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",r,")"]}),": ",(0,U.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,U.jsx)(H(),{children:u})})]})}),(0,U.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(e){return(0,U.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))]},"".concat(i,"-").concat(r))}))},i)}))]})]})]}),r&&!t&&(0,U.jsx)(h.Z,{my:3,children:te}),r&&t&&(0,U.jsxs)(U.Fragment,{children:[le&&(0,U.jsx)(h.Z,{my:3,children:(0,U.jsxs)(h.Z,{px:3,children:[(0,U.jsx)(v.Z,{level:5,children:"Table name"}),(0,U.jsx)(h.Z,{mt:1,children:(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:le})})]})}),ie&&(0,U.jsxs)(h.Z,{my:3,children:[(0,U.jsx)(h.Z,{px:3,children:(0,U.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,U.jsx)(h.Z,{px:1,children:ie})]}),oe&&(0,U.jsxs)(h.Z,{my:3,children:[(0,U.jsx)(h.Z,{px:3,children:(0,U.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,U.jsx)(h.Z,{px:1,children:oe})]})]})]})},ee=r(82531),ne=r(59920),re=r(33766),te=r(59e3);function ie(e){var n=e.pipeline,r=n.uuid,t=ee.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:r},{refreshInterval:5e3}).data,i=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.pipeline_runs)||[]}),[t]),o=(0,te.iV)(),u=(0,l.useState)(null),s=u[0],a=u[1],d=(0,l.useState)(null),f=d[0],v=d[1],p=(0,l.useState)(null),h=p[0],m=p[1];(0,l.useEffect)((function(){null!==o&&void 0!==o&&o.pipeline_run_id?m(null===i||void 0===i?void 0:i.find((function(e){return e.id===Number(o.pipeline_run_id)}))):h&&m(null),null!==o&&void 0!==o&&o.stream?v(o.stream):f&&v(null)}),[i,o,h,f]);var g=(0,l.useCallback)((function(){var e=h?S(h):[];return(0,U.jsx)($,{onClickRow:function(n){var r=e[n];(0,re.u7)({stream:f===r?null:r})},pipelineRun:h,selectedStream:f})}),[h,f]),b=(0,l.useMemo)((function(){var e="/pipelines/".concat(r,"/syncs");h&&(e="".concat(e,"?pipeline_run_id=").concat(h.id));var n=[{label:function(){return"Syncs"},linkProps:f?{as:e,href:"/pipelines/[pipeline]/syncs"}:null}];return f&&n.push({label:function(){return f}}),n}),[r,h,f]);return(0,U.jsx)(c.Z,{breadcrumbs:b,buildSidekick:g,errors:s,pageName:ne.M.SYNCS,pipeline:n,setErrors:a,title:function(e){var n=e.name;return"".concat(n," syncs")},uuid:"".concat(ne.M.SYNCS,"_").concat(r),children:i.map((function(e){var n=(null===h||void 0===h?void 0:h.id)===e.id;return(0,U.jsx)(z,{onSelect:function(e){return(0,re.u7)({pipeline_run_id:e,stream:null})},pipelineRun:e,selected:n},e.id)}))})}ie.getInitialProps=function(){var e=(0,t.Z)(o().mark((function e(n){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var oe=(0,u.Z)(ie)},33766:function(e,n,r){"use strict";r.d(n,{O2:function(){return d},g_:function(){return v},u7:function(){return f}});var t=r(75582),i=r(82394),o=r(34376),l=r.n(o),c=r(59e3),u=r(24224);function s(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function a(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?s(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var d="_offset";function f(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.preserveParams,i=n.pushHistory,o=n.replaceParams,u=(0,c.iV)(),s={};r&&r.forEach((function(e){u[e]&&(s[e]=u[e])}));var d,f=o?s:u;d=window.location.pathname;var v=i?l().push:l().replace,p=a(a({},f),e);Object.entries(e).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete p[r]}));var h=(0,c.uM)(p);h.length>=1&&(h="?".concat(h));var m="".concat(d.split("?")[0]).concat(h),g=l().router.basePath;return g&&m.startsWith(g)&&(m=m.replace(g,"")),v(l().router.pathname,m,{shallow:!0})}function v(e,n,r){var i=r.addingMultipleValues,o=r.isList,l=r.itemsPerPage,c=r.pushHistory,s=void 0!==c&&c,v=r.resetLimitParams,p=a({},e);i?Object.entries(n).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(r,"[]");p[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1],o=String(i),l="".concat(r,"[]"),c=p[l];c&&Array.isArray(c)?(c=c.map(String)).includes(o)?p[l]=(0,u.Od)(c,(function(e){return e===o})):p[l]=c.concat(o):p[l]=[o]})):p=a(a({},p),n),v&&(p._limit=l||20,p[d]=0),f(p,{pushHistory:s})}},90211:function(e,n,r){"use strict";r.d(n,{RA:function(){return a},kC:function(){return d},vg:function(){return b},kE:function(){return I},Mp:function(){return f},Pb:function(){return u},HW:function(){return j},wX:function(){return v},x6:function(){return p},_6:function(){return h},zf:function(){return x},Y6:function(){return y},wE:function(){return N},J3:function(){return m},We:function(){return s},QV:function(){return Z},C5:function(){return g}});var t=r(75582),i=r(17717),o=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],l=(r(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),c=r(24224);function u(e){if(!e)return!1;try{JSON.parse(e)}catch(n){return!1}return!0}function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.split(" ").join(n)}function a(e){return e.split(" ").join("_")}function d(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*e)}function v(e){return e.charAt(0).toLowerCase()+e.slice(1)}function p(e){if(null===e||"undefined"===typeof e)return"";var n=e.toString().split("."),r=(0,t.Z)(n,2),i=r[0],o=r[1],l=i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return o?"".concat(l,".").concat(o):l}function h(e,n){var r,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=n,o=void 0!==i&&null!==i;if(o||(i=2),1===i)r=e;else{var l=e.length,c=e[l-1];r="y"===c&&"day"!==e?"".concat(e.slice(0,l-1),"ies"):"".concat(e,"s"===c?"es":"s")}if(o){var u=t?p(i):i;return"".concat(u," ").concat(r)}return r}function m(e){return null===e||void 0===e?void 0:e.replace(/_/g," ")}function g(e){var n=e.length;return"ies"===e.slice(n-3,n)?"".concat(e.slice(0,n-3),"y"):"es"===e.slice(n-2,n)&&"ces"!==e.slice(n-3,n)?e.slice(0,n-2):e.slice(0,n-1)}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return d(m(e.toLowerCase()))}function x(e){var n,r=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return r.forEach((function(i,o){if(!n){var l=(0,t.Z)(i,2),c=l[0],u=l[1],s=r.slice(0,o).reduce((function(e,n){return e*Number(n[1])}),1);e<Number(u)*s&&(n=h(c,Math.round(e/s)))}})),n}function j(e){return"undefined"!==typeof e&&null!==e&&!isNaN(e)}function Z(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=Math.pow(10,n);return Math.round((e||0)*r)/r}function y(){return"".concat((0,c.mp)(o)," ").concat((0,c.mp)(l))}function I(e){return null===e||void 0===e?void 0:e.toLowerCase().replace(/\W+/g,"_")}function N(e){var n,r=e.split(i.sep),t=r[r.length-1].split(".");return n=1===t.length?t[0]:t.slice(0,-1).join("."),r.slice(0,r.length-1).concat(n).join(i.sep)}},59416:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return r(89745)}])}},function(e){e.O(0,[844,9902,1424,1005,7815,547,9774,2888,179],(function(){return n=59416,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{17717:function(e,n,r){var t=r(554);!function(){"use strict";var n={977:function(e){function n(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,n){for(var r,t="",i=0,o=-1,l=0,c=0;c<=e.length;++c){if(c<e.length)r=e.charCodeAt(c);else{if(47===r)break;r=47}if(47===r){if(o===c-1||1===l);else if(o!==c-1&&2===l){if(t.length<2||2!==i||46!==t.charCodeAt(t.length-1)||46!==t.charCodeAt(t.length-2))if(t.length>2){var u=t.lastIndexOf("/");if(u!==t.length-1){-1===u?(t="",i=0):i=(t=t.slice(0,u)).length-1-t.lastIndexOf("/"),o=c,l=0;continue}}else if(2===t.length||1===t.length){t="",i=0,o=c,l=0;continue}n&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+="/"+e.slice(o+1,c):t=e.slice(o+1,c),i=c-o-1;o=c,l=0}else 46===r&&-1!==l?++l:l=-1}return t}var i={resolve:function(){for(var e,i="",o=!1,l=arguments.length-1;l>=-1&&!o;l--){var c;l>=0?c=arguments[l]:(void 0===e&&(e=t.cwd()),c=e),n(c),0!==c.length&&(i=c+"/"+i,o=47===c.charCodeAt(0))}return i=r(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var t=arguments[r];n(t),t.length>0&&(void 0===e?e=t:e+="/"+t)}return void 0===e?".":i.normalize(e)},relative:function(e,r){if(n(e),n(r),e===r)return"";if((e=i.resolve(e))===(r=i.resolve(r)))return"";for(var t=1;t<e.length&&47===e.charCodeAt(t);++t);for(var o=e.length,l=o-t,c=1;c<r.length&&47===r.charCodeAt(c);++c);for(var u=r.length-c,s=l<u?l:u,a=-1,d=0;d<=s;++d){if(d===s){if(u>s){if(47===r.charCodeAt(c+d))return r.slice(c+d+1);if(0===d)return r.slice(c+d)}else l>s&&(47===e.charCodeAt(t+d)?a=d:0===d&&(a=0));break}var f=e.charCodeAt(t+d);if(f!==r.charCodeAt(c+d))break;47===f&&(a=d)}var v="";for(d=t+a+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===v.length?v+="..":v+="/..");return v.length>0?v+r.slice(c+a):(c+=a,47===r.charCodeAt(c)&&++c,r.slice(c))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var r=e.charCodeAt(0),t=47===r,i=-1,o=!0,l=e.length-1;l>=1;--l)if(47===(r=e.charCodeAt(l))){if(!o){i=l;break}}else o=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!==typeof r)throw new TypeError('"ext" argument must be a string');n(e);var t,i=0,o=-1,l=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var c=r.length-1,u=-1;for(t=e.length-1;t>=0;--t){var s=e.charCodeAt(t);if(47===s){if(!l){i=t+1;break}}else-1===u&&(l=!1,u=t+1),c>=0&&(s===r.charCodeAt(c)?-1===--c&&(o=t):(c=-1,o=u))}return i===o?o=u:-1===o&&(o=e.length),e.slice(i,o)}for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!l){i=t+1;break}}else-1===o&&(l=!1,o=t+1);return-1===o?"":e.slice(i,o)},extname:function(e){n(e);for(var r=-1,t=0,i=-1,o=!0,l=0,c=e.length-1;c>=0;--c){var u=e.charCodeAt(c);if(47!==u)-1===i&&(o=!1,i=c+1),46===u?-1===r?r=c:1!==l&&(l=1):-1!==r&&(l=-1);else if(!o){t=c+1;break}}return-1===r||-1===i||0===l||1===l&&r===i-1&&r===t+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,n){var r=n.dir||n.root,t=n.base||(n.name||"")+(n.ext||"");return r?r===n.root?r+t:r+e+t:t}("/",e)},parse:function(e){n(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var t,i=e.charCodeAt(0),o=47===i;o?(r.root="/",t=1):t=0;for(var l=-1,c=0,u=-1,s=!0,a=e.length-1,d=0;a>=t;--a)if(47!==(i=e.charCodeAt(a)))-1===u&&(s=!1,u=a+1),46===i?-1===l?l=a:1!==d&&(d=1):-1!==l&&(d=-1);else if(!s){c=a+1;break}return-1===l||-1===u||0===d||1===d&&l===u-1&&l===c+1?-1!==u&&(r.base=r.name=0===c&&o?e.slice(1,u):e.slice(c,u)):(0===c&&o?(r.name=e.slice(1,l),r.base=e.slice(1,u)):(r.name=e.slice(c,l),r.base=e.slice(c,u)),r.ext=e.slice(l,u)),c>0?r.dir=e.slice(0,c-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}},l=!0;try{n[e](o,o.exports,i),l=!1}finally{l&&delete r[e]}return o.exports}i.ab="//";var o=i(977);e.exports=o}()},66050:function(e,n,r){"use strict";var t;r.d(n,{V:function(){return t}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(t||(t={}))},47409:function(e,n,r){"use strict";r.d(n,{Az:function(){return u},BF:function(){return c},Do:function(){return a},IK:function(){return l},VO:function(){return o},sZ:function(){return s}});var t,i=r(82394),o=r(66050).V,l=[o.FAILED,o.COMPLETED,o.RUNNING,o.CANCELLED,o.INITIAL],c=[o.INITIAL,o.RUNNING],u=[o.CANCELLED,o.COMPLETED,o.FAILED],s="__mage_variables",a=(t={},(0,i.Z)(t,o.CANCELLED,"Cancelled"),(0,i.Z)(t,o.COMPLETED,"Done"),(0,i.Z)(t,o.FAILED,"Failed"),(0,i.Z)(t,o.INITIAL,"Ready"),(0,i.Z)(t,o.RUNNING,"Running"),t)},98781:function(e,n,r){"use strict";r.d(n,{$1:function(){return a},G7:function(){return f},LM:function(){return v},Mj:function(){return p},QK:function(){return s},a_:function(){return h},qL:function(){return l},r0:function(){return d}});var t,i,o,l,c=r(82394),u=r(22341);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(l||(l={}));var s,a,d,f=(t={},(0,c.Z)(t,l.INTEGRATION,"Integration"),(0,c.Z)(t,l.PYTHON,"Standard"),(0,c.Z)(t,l.PYSPARK,"PySpark"),(0,c.Z)(t,l.STREAMING,"Streaming"),t),v="all",p=(l.PYTHON,l.INTEGRATION,l.STREAMING,i={},(0,c.Z)(i,v,u.ie),(0,c.Z)(i,l.INTEGRATION,u.YC),(0,c.Z)(i,l.PYTHON,u.El),(0,c.Z)(i,l.STREAMING,u.dB),i);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules",e.RETRY="retry"}(s||(s={})),function(e){e.GROUP="group_by",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(a||(a={})),function(e){e.STATUS="status",e.TAG="tag",e.TYPE="type"}(d||(d={}));var h=(o={},(0,c.Z)(o,l.PYTHON,"python3"),(0,c.Z)(o,l.PYSPARK,"pysparkkernel"),o)},89745:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return oe}});var t=r(77837),i=r(38860),o=r.n(i),l=r(82684),c=r(60547),u=r(41788),s=r(75582),a=r(82394),d=r(93461),f=r(67971),v=r(87372),p=r(47409),h=r(86673),m=r(54283),g=r(19711),b=r(23831),x=r(22341),j=r(38626),Z=r(73942),y=r(2005),I=r(49125),N=r(31012),O=j.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,I.cd*I.iI,(function(e){return"\n background-color: ".concat((e.theme.background||b.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||b.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.selected&&e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.selected&&e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.selected&&e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.selected&&e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")}),(function(e){return e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),k=(0,j.css)([""," "," "," "," ",""],(function(e){return e.danger&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),P=j.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],k,N.iD,Z.D7,y.ry,(function(e){return e.danger&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return e.primary&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return(e.default||e.success)&&"\n "}),(function(e){return e.default&&"\n color: ".concat((e.theme.content||b.Z.content).default,";\n ")}),(function(e){return e.success&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")}),(function(e){return e.warning&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")})),_=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],k,(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")})),E=r(90211),w=r(92083),A=r.n(w),C=r(66050),T=r(24224);function S(e){var n;return Object.keys((null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{}).sort()}function L(e){var n,r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null,o=null,l=null,c=null,u={},a=(null===e||void 0===e?void 0:e.block_runs)||[],d=(null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{},f=(null===e||void 0===e||null===(r=e.metrics)||void 0===r?void 0:r.pipeline)||{},v=M(e);return Object.entries(d).forEach((function(e){var n,r=(0,s.Z)(e,2),a=r[0],d=r[1];if(!t||t===a){var p,h=d||{},m=h.destinations,g=void 0===m?{records_affected:null,records_inserted:null,records_updated:null}:m,b=h.sources,x=void 0===b?{records:null}:b,j=v[a]||[];if(t&&t===a&&j.every((function(e){var n=e.status;return C.V.COMPLETED===n}))&&null===i&&(i=0),null!==f&&void 0!==f&&null!==(n=f[a])&&void 0!==n&&n.record_counts)null===i&&(i=0),i+=Number(null===f||void 0===f||null===(p=f[a])||void 0===p?void 0:p.record_counts);else null!==x&&void 0!==x&&x.records&&(null===i&&(i=0),i+=Number(x.records));null!==g&&void 0!==g&&g.records_updated?(null===l&&(l=0),l+=Number(g.records_updated),null===c&&(c=0),c+=Number(g.records_updated)):null!==g&&void 0!==g&&g.records_inserted?(null===l&&(l=0),l+=Number(g.records_inserted),null===o&&(o=0),o+=Number(g.records_inserted)):null!==g&&void 0!==g&&g.records_affected&&(null===l&&(l=0),l+=Number(g.records_affected)),["destinations","sources"].forEach((function(e){var n=d[e]||{};null!==n&&void 0!==n&&n.error&&(u[a]||(u[a]={}),u[a][e]={error:null===n||void 0===n?void 0:n.error,errors:null===n||void 0===n?void 0:n.errors,message:null===n||void 0===n?void 0:n.message})}))}})),null===a||void 0===a||a.forEach((function(e){var n=e.block_uuid,r=e.metrics,t=e.status;if(C.V.FAILED===t&&null!==r&&void 0!==r&&r.error&&n){var i=n.split(":"),o=(0,s.Z)(i,3),l=(o[0],o[1]);o[2];u[l]||(u[l]={}),u[l][""]=r.error}})),{errors:u,records:i,recordsInserted:o,recordsProcessed:l,recordsUpdated:c}}function M(e){var n=e.block_runs,r={};return null===n||void 0===n||n.forEach((function(e){var n=e.block_uuid.split(":"),t=(0,s.Z)(n,3),i=(t[0],t[1]);t[2];r[i]||(r[i]=[]),r[i].push(e)})),r}function D(e){var n=M(e),r={};return Object.entries(n).forEach((function(e){var n=(0,s.Z)(e,2),t=n[0],i=n[1],o=i.filter((function(e){var n=e.status;return C.V.COMPLETED===n})),l=o.map((function(e){var n=e.completed_at,r=e.started_at,t=A().utc(n),i=A().utc(r);return t.diff(i,"second")})),c=o.length,u=i.length;r[t]={completed:c,runtime:l.length>=1?(0,T.Sm)(l)/l.length:null,total:u}})),r}function R(e){var n=e.block_runs,r=(null===n||void 0===n?void 0:n.length)||1,t=function(e){var n=(null===e||void 0===e?void 0:e.block_runs)||[];return null===n||void 0===n?void 0:n.filter((function(e){var n=e.status;return C.V.COMPLETED===n}))}(e).length||0;return t/r}function V(e){var n=e.completed_at,r=e.block_runs,t=void 0===r?[]:r,i=e.status;if(null===t||void 0===t||!t.length)return 0;var o=A().utc();if(n)o=A().utc(n);else if([p.VO.CANCELLED,p.VO.FAILED].includes(i)){var l=(0,T.YC)(t,(function(e){return e.started_at}),{ascending:!1})[0];o=A().utc(l.updated_at)}var c=A().utc(e.created_at);return o.diff(c,"second")}function G(e,n){var r,t,i,o,l,c=M(e),u=D(e),s=(null===e||void 0===e?void 0:e.metrics)||{blocks:null,pipeline:null},a=s.blocks||{},d=s.pipeline||{},f=(a[n],d[n],u[n]||{completed:null,total:null}),v=f.completed,p=f.total,h=v&&p?v/p:0,m=c[n]||[],g=m.every((function(e){var n=e.status;return C.V.COMPLETED===n})),b=(0,T.YC)(m,(function(e){return e.updated_at}),{ascending:!1})[0],x=null===(r=(0,T.YC)(m,(function(e){return e.started_at}),{ascending:!0})[0])||void 0===r?void 0:r.started_at;g?t=null===(l=(0,T.YC)(m,(function(e){return e.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:b&&(o=null===b||void 0===b?void 0:b.updated_at);var j=g?A().utc(t||o):A().utc(),Z=A().utc(x);return{completed:v,completedAt:t,done:g,progress:h,runtime:i=j.diff(Z,"second"),startedAt:x,status:null===b||void 0===b?void 0:b.status,timeText:(0,E.zf)(i),total:p,updatedAt:o}}var U=r(28598);function F(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function Y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?F(Object(r),!0).forEach((function(n){(0,a.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var z=function(e){var n=e.onSelect,r=e.pipelineRun,t=e.selected,i=(r.block_runs,r.created_at),o=r.status,c=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[r]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),a=c.destination,j=c.source,Z=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),y=(0,l.useMemo)((function(){return L(r)}),[r]),N=y.errors,k=y.records,w=y.recordsProcessed,A=(0,l.useMemo)((function(){return R(r)}),[r]),C=(0,l.useMemo)((function(){return[p.VO.COMPLETED].includes(o)}),[o]),T=(0,l.useMemo)((function(){return{danger:p.VO.FAILED===o,default:p.VO.INITIAL===o,primary:p.VO.RUNNING===o,success:C,warning:p.VO.CANCELLED===o}}),[C,o]),S=(0,l.useMemo)((function(){if(r){var e=V(r);return(0,E.zf)(e)}}),[r]);return(0,U.jsx)(O,Y(Y({},T),{},{onClick:function(){return n(t?null:r.id)},selected:t,children:(0,U.jsxs)(f.ZP,{fullHeight:!0,justifyContent:"space-between",children:[(0,U.jsx)(_,Y({},T)),(0,U.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(h.Z,{ml:3,py:3,children:[(0,U.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:i}),(0,U.jsx)(h.Z,{fullWidth:!1,mt:2,children:(0,U.jsx)(P,Y(Y({},T),{},{children:(0,U.jsxs)(f.ZP,{alignItems:"center",children:[C&&(0,U.jsx)(x.Jr,{inverted:!0,size:2*I.iI}),[p.VO.INITIAL,p.VO.RUNNING].includes(o)&&(0,U.jsx)(m.Z,{color:p.VO.INITIAL!==o?b.Z.monotone.white:null,inverted:p.VO.INITIAL===o,small:!0}),"\xa0",p.VO.RUNNING===o&&(0,U.jsxs)(U.Fragment,{children:["\xa0",Math.round(100*A),"%"]}),![p.VO.INITIAL,p.VO.RUNNING].includes(o)&&p.Do[o],p.VO.INITIAL===o&&"Starting"]})}))}),Object.values(N).length>=1&&(0,U.jsx)(h.Z,{mt:1,children:Object.entries(N).map((function(e,n){var r=(0,s.Z)(e,2),t=r[0];r[1];return(0,U.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,U.jsxs)(d.Z,{flex:1,children:[(0,U.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(h.Z,{ml:3,py:3,children:[(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,U.jsx)(g.ZP,{monospace:!0,children:w>=1?(0,E.x6)(w):"-"})]}),(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,U.jsx)(g.ZP,{monospace:!0,children:k>=1&&k>=w?(0,E.x6)(k-w):"-"})]}),p.VO.RUNNING!==o&&(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,U.jsx)(g.ZP,{monospace:!0,children:S})]})]})}),(0,U.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(h.Z,{ml:3,py:3,children:[(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,U.jsx)(g.ZP,{monospace:!0,children:j||"-"})]}),(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,U.jsx)(g.ZP,{monospace:!0,children:a||"-"})]}),(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,U.jsx)(g.ZP,{monospace:!0,children:Z>=1?(0,E.x6)(Z):"-"})]})]})})]})]})}))},B=r(89565),H=r.n(B),W=r(34376),J=r(60328),K=r(10919),X=r(87815),q=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(e){return e.even&&e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyan,";\n ")}),(function(e){return e.even&&!e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyanTransparent,";\n ")}),(function(e){return"\n height: ".concat((e.small?1:2)*I.iI,"px;\n ")})),Q=r(66653);var $=function(e){var n=e.onClickRow,r=e.pipelineRun,t=e.selectedStream,i=(0,W.useRouter)(),o=(0,l.useState)(null),c=o[0],u=o[1],a=(0,l.useState)(null),d=a[0],m=a[1],b=(0,l.useMemo)((function(){return r?M(r):{}}),[r]),j=(0,l.useMemo)((function(){return r?D(r):{}}),[r]),Z=(0,l.useMemo)((function(){var e=0,n=[],r=[];if(Object.entries(j).forEach((function(t){var i=(0,s.Z)(t,2),o=(i[0],i[1]),l=o.completed,c=o.runtime,u=o.total;null===c?r.push(o):(n.push(c),e+=c*(u-l))})),0===n.length)return null;var t=(0,T.Sm)(n)/n.length;return r.forEach((function(n){var r=n.completed,i=n.total;e+=t*(i-r)})),e}),[j]),y=(0,l.useMemo)((function(){return t?j[t]:null}),[j,t]),N=(0,l.useMemo)((function(){if(t&&j){var e=j[t]||{},n=e.completed,i=e.total;if(i>=1)return n/i}else if(r)return R(r);return 0}),[y,r,t]),O=(0,l.useMemo)((function(){return(0,U.jsx)(f.ZP,{children:(0,T.w6)(101).map((function(e,n){return(0,U.jsx)(q,{even:n%2===0,fill:N>0&&Math.round(100*N)>=n},n)}))})}),[N]),k=(0,l.useMemo)((function(){if(t){var e=b[t]||[],n=e.every((function(e){var n=e.status;return C.V.COMPLETED===n})),i=(0,T.YC)(e,(function(e){return e.updated_at}),{ascending:!1})[0],o=null===i||void 0===i?void 0:i.status,l=y||{},c=l.completed,u=l.runtime,s=l.total;if(n)return"Sync complete for ".concat(t);if([C.V.CANCELLED,C.V.FAILED].includes(o))return p.Do[o];if(u&&s>=1){var a=Math.ceil(u*(s-c)/60);return"".concat((0,E._6)("minute",a,!0)," to completion")}return"Estimating time remaining for stream..."}if(p.VO.COMPLETED===(null===r||void 0===r?void 0:r.status))return"Sync complete";if(r){if([p.VO.CANCELLED,p.VO.FAILED].includes(null===r||void 0===r?void 0:r.status))return p.Do[null===r||void 0===r?void 0:r.status];if(p.VO.INITIAL===(null===r||void 0===r?void 0:r.status))return"Initializing sync (this can take several minutes)";if(null===Z)return"Estimating time remaining...";var d=Math.ceil(Z/60);return"".concat((0,E._6)("minute",d,!0)," to completion")}return"Select a sync"}),[b,Z,y,r,t]),P=(0,l.useMemo)((function(){return r&&t?G(r,t):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[r,t]);(0,l.useEffect)((function(){var e;if(r){var n=V(r);u(n),e=setInterval((function(){return u((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r]),(0,l.useEffect)((function(){var e;if(r&&t&&P){var n=(null===P||void 0===P?void 0:P.runtime)||0;m(n),e=setInterval((function(){return m((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r,t,P]);var _=(0,l.useMemo)((function(){if(r){if(t)return null===P||void 0===P?void 0:P.timeText;var e=V(r);return(0,E.zf)(e)}}),[r,t,P]),w=(0,l.useMemo)((function(){var e=Math.floor(c%86400/3600),n=Math.floor(c%3600/60),r=Math.floor(c%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[c]),A=(0,l.useMemo)((function(){var e=Math.floor(d%86400/3600),n=Math.floor(d%3600/60),r=Math.floor(d%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[d]),F=(0,l.useMemo)((function(){return r?L(r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r]),Y=F.errors,z=F.records,B=F.recordsInserted,$=F.recordsProcessed,ee=F.recordsUpdated,ne=(0,l.useMemo)((function(){return r&&t?L(r,t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r,t]),re=(0,l.useMemo)((function(){var e=t?null===ne||void 0===ne?void 0:ne.records:z,n=t?null===ne||void 0===ne?void 0:ne.recordsInserted:B,r=t?null===ne||void 0===ne?void 0:ne.recordsProcessed:$,i=t?null===ne||void 0===ne?void 0:ne.recordsUpdated:ee,o=[{label:"Rows fetched",value:null===e?"-":(0,E.x6)(e)}];return null===n&&null===i?o.push({label:"Rows processed",value:null===r?"-":(0,E.x6)(r)}):null!==n?o.push({label:"Rows inserted",value:(0,E.x6)(n)}):null!==i&&o.push({label:"Rows updated",value:(0,E.x6)(i)}),o.map((function(e){var n=e.label,r=e.value;return(0,U.jsxs)("div",{children:[(0,U.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:n}),(0,U.jsx)(g.ZP,{headline:!0,children:r})]},n)}))}),[z,ne,B,$,ee,_,w,status]),te=(0,l.useMemo)((function(){if(!r)return(0,U.jsx)("div",{});var e=S(r);return(0,U.jsx)(X.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(n){return t&&t===e[n]},onClickRow:n,rows:e.map((function(e){var n=G(r,e),t=(n.completed,n.completedAt),o=n.done,l=n.progress,c=n.startedAt,u=n.status,s=n.timeText,a=(n.total,!!Y[e]);return[(0,U.jsx)(g.ZP,{danger:a,default:!a,monospace:!0,children:e},"stream"),(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:t?t.split(".")[0]:"-"},"completed_at"),(0,U.jsx)(g.ZP,{default:!0,children:[C.V.INITIAL,C.V.RUNNING].includes(u)?"-":s},"runtime"),(0,U.jsxs)("div",{children:[o&&(0,U.jsx)(x.Jr,{default:!0,size:2*I.iI}),!o&&(0,U.jsx)(f.ZP,{children:(0,T.w6)(51).map((function(e,n){return(0,U.jsx)(q,{fill:l>0&&Math.round(50*l)>=n,even:n%2===0,small:!0},n)}))})]},"progress"),(0,U.jsx)(J.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){i.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id)),(0,Q.j)(e)},children:(0,U.jsx)(x.UL,{default:!0,size:2*I.iI})},"logs")]})),uuid:"".concat(null===r||void 0===r?void 0:r.id,"-streams-table")})}),[Y,j,r,t]),ie=(0,l.useMemo)((function(){var e,n,i,o,l,c,u,a;if(r&&t){var d=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===d||void 0===d||null===(e=d.pipeline)||void 0===e||null===(n=e[t])||void 0===n||null===(i=n.bookmarks)||void 0===i?void 0:i[t],v=null===d||void 0===d||null===(o=d.blocks)||void 0===o||null===(l=o[t])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(a=u.bookmarks)||void 0===a?void 0:a[t];if(f||v){var p=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),h=[];p.forEach((function(e){var n=[(0,U.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[f,v].forEach((function(r,t){r&&n.push((0,U.jsx)(g.ZP,{monospace:!0,small:!0,children:r[e]},"".concat(e,"-").concat(t)))})),h.push(n)}));var m=[{label:function(){return""},uuid:"column"}];return[[null===d||void 0===d?void 0:d.source,"source",f],[null===d||void 0===d?void 0:d.destination,"destination",v]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&m.push({uuid:"".concat(r," (").concat(t,")")})})),(0,U.jsx)(X.Z,{columnFlex:[null,1,1],columns:m,rows:h,uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),oe=(0,l.useMemo)((function(){var e,n,i,o,l,c;if(r&&t){var u=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},a=null===u||void 0===u||null===(e=u.blocks)||void 0===e||null===(n=e[t])||void 0===n||null===(i=n.sources)||void 0===i?void 0:i.record,d=null===u||void 0===u||null===(o=u.blocks)||void 0===o||null===(l=o[t])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(a||d){var f=Object.keys(d||a||{}).sort(),v=[];f.forEach((function(e){var n=[(0,U.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[a,d].forEach((function(r,t){if(r){var i=r[e],o="object"===typeof i;n.push((0,U.jsxs)(g.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[o&&(0,U.jsx)("pre",{children:JSON.stringify(i,null,2)}),!o&&i]},"".concat(e,"-").concat(t)))}})),v.push(n)}));var p=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",a],[null===u||void 0===u?void 0:u.destination,"destination",d]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&p.push({uuid:"".concat(r," (").concat(t,")")})})),(0,U.jsx)(X.Z,{columnFlex:[null,1,1],columns:p,rows:v.map((function(e){return e.map((function(e){return(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:e},e)}))})),uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),le=(0,l.useMemo)((function(){var e,n,i,o,l,c,u=null===r||void 0===r||null===(e=r.metrics)||void 0===e||null===(n=e.blocks)||void 0===n?void 0:n[t];return(null===u||void 0===u||null===(i=u.sources)||void 0===i||null===(o=i.block_tags)||void 0===o?void 0:o.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[r,t]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(h.Z,{p:3,children:[t&&(0,U.jsx)(h.Z,{mb:3,children:(0,U.jsxs)(f.ZP,{alignItems:"center",children:[(0,U.jsx)(K.Z,{block:!0,onClick:function(){return i.push("/pipelines/".concat(r.pipeline_uuid,"/syncs?pipeline_run_id=").concat(r.id))},preventDefault:!0,children:(0,U.jsxs)(f.ZP,{alignItems:"center",children:[(0,U.jsx)(x.Xd,{default:!0,size:1.5*I.iI}),(0,U.jsx)(h.Z,{mr:1}),(0,U.jsx)(g.ZP,{default:!0,children:"Syncs"})]})}),(0,U.jsx)(h.Z,{mx:1,children:(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:"/"})}),(0,U.jsx)(g.ZP,{bold:!0,monospace:!0,children:t})]})}),(0,U.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,U.jsx)(h.Z,{mr:2,my:1,children:(0,U.jsx)(v.Z,{level:5,muted:!r,children:k})}),r&&(0,U.jsx)(J.Z,{onClick:function(){return i.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id))},small:!0,children:"Logs"})]}),(0,U.jsx)(h.Z,{mt:2,children:O}),r&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(h.Z,{mt:3,children:(0,U.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,U.jsxs)("div",{children:[(0,U.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,U.jsxs)(g.ZP,{headline:!0,children:[t&&[C.V.INITIAL,C.V.RUNNING].includes(null===P||void 0===P?void 0:P.status)&&A,t&&![C.V.INITIAL,C.V.RUNNING].includes(null===P||void 0===P?void 0:P.status)&&(null===P||void 0===P?void 0:P.timeText),!t&&[p.VO.INITIAL,p.VO.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&w,!t&&![p.VO.INITIAL,p.VO.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&_]})]}),re]})}),Object.values(Y).length>=1&&(0,U.jsxs)(h.Z,{mt:3,children:[(0,U.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(Y).map((function(e,n){var r=(0,s.Z)(e,2),i=r[0],o=r[1];return(!t||t===i)&&(0,U.jsx)(h.Z,{mt:n>=1?1:0,children:Object.entries(o).map((function(e){var n=(0,s.Z)(e,2),r=n[0],t=n[1],o=t.error,l=t.errors,c=t.message,u=Array.isArray(o)?o.join(" "):o;return(0,U.jsxs)("div",{children:[(0,U.jsx)(h.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,U.jsxs)(g.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[i,!!r&&(0,U.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",r,")"]}),": ",(0,U.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,U.jsx)(H(),{children:u})})]})}),(0,U.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(e){return(0,U.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))]},"".concat(i,"-").concat(r))}))},i)}))]})]})]}),r&&!t&&(0,U.jsx)(h.Z,{my:3,children:te}),r&&t&&(0,U.jsxs)(U.Fragment,{children:[le&&(0,U.jsx)(h.Z,{my:3,children:(0,U.jsxs)(h.Z,{px:3,children:[(0,U.jsx)(v.Z,{level:5,children:"Table name"}),(0,U.jsx)(h.Z,{mt:1,children:(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:le})})]})}),ie&&(0,U.jsxs)(h.Z,{my:3,children:[(0,U.jsx)(h.Z,{px:3,children:(0,U.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,U.jsx)(h.Z,{px:1,children:ie})]}),oe&&(0,U.jsxs)(h.Z,{my:3,children:[(0,U.jsx)(h.Z,{px:3,children:(0,U.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,U.jsx)(h.Z,{px:1,children:oe})]})]})]})},ee=r(82531),ne=r(59920),re=r(33766),te=r(59e3);function ie(e){var n=e.pipeline,r=n.uuid,t=ee.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:r},{refreshInterval:5e3}).data,i=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.pipeline_runs)||[]}),[t]),o=(0,te.iV)(),u=(0,l.useState)(null),s=u[0],a=u[1],d=(0,l.useState)(null),f=d[0],v=d[1],p=(0,l.useState)(null),h=p[0],m=p[1];(0,l.useEffect)((function(){null!==o&&void 0!==o&&o.pipeline_run_id?m(null===i||void 0===i?void 0:i.find((function(e){return e.id===Number(o.pipeline_run_id)}))):h&&m(null),null!==o&&void 0!==o&&o.stream?v(o.stream):f&&v(null)}),[i,o,h,f]);var g=(0,l.useCallback)((function(){var e=h?S(h):[];return(0,U.jsx)($,{onClickRow:function(n){var r=e[n];(0,re.u7)({stream:f===r?null:r})},pipelineRun:h,selectedStream:f})}),[h,f]),b=(0,l.useMemo)((function(){var e="/pipelines/".concat(r,"/syncs");h&&(e="".concat(e,"?pipeline_run_id=").concat(h.id));var n=[{label:function(){return"Syncs"},linkProps:f?{as:e,href:"/pipelines/[pipeline]/syncs"}:null}];return f&&n.push({label:function(){return f}}),n}),[r,h,f]);return(0,U.jsx)(c.Z,{breadcrumbs:b,buildSidekick:g,errors:s,pageName:ne.M.SYNCS,pipeline:n,setErrors:a,title:function(e){var n=e.name;return"".concat(n," syncs")},uuid:"".concat(ne.M.SYNCS,"_").concat(r),children:i.map((function(e){var n=(null===h||void 0===h?void 0:h.id)===e.id;return(0,U.jsx)(z,{onSelect:function(e){return(0,re.u7)({pipeline_run_id:e,stream:null})},pipelineRun:e,selected:n},e.id)}))})}ie.getInitialProps=function(){var e=(0,t.Z)(o().mark((function e(n){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var oe=(0,u.Z)(ie)},33766:function(e,n,r){"use strict";r.d(n,{O2:function(){return d},g_:function(){return v},u7:function(){return f}});var t=r(75582),i=r(82394),o=r(34376),l=r.n(o),c=r(59e3),u=r(24224);function s(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function a(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?s(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var d="_offset";function f(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.preserveParams,i=n.pushHistory,o=n.replaceParams,u=(0,c.iV)(),s={};r&&r.forEach((function(e){u[e]&&(s[e]=u[e])}));var d,f=o?s:u;d=window.location.pathname;var v=i?l().push:l().replace,p=a(a({},f),e);Object.entries(e).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete p[r]}));var h=(0,c.uM)(p);h.length>=1&&(h="?".concat(h));var m="".concat(d.split("?")[0]).concat(h),g=l().router.basePath;return g&&m.startsWith(g)&&(m=m.replace(g,"")),v(l().router.pathname,m,{shallow:!0})}function v(e,n,r){var i=r.addingMultipleValues,o=r.isList,l=r.itemsPerPage,c=r.pushHistory,s=void 0!==c&&c,v=r.resetLimitParams,p=a({},e);i?Object.entries(n).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(r,"[]");p[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1],o=String(i),l="".concat(r,"[]"),c=p[l];c&&Array.isArray(c)?(c=c.map(String)).includes(o)?p[l]=(0,u.Od)(c,(function(e){return e===o})):p[l]=c.concat(o):p[l]=[o]})):p=a(a({},p),n),v&&(p._limit=l||20,p[d]=0),f(p,{pushHistory:s})}},90211:function(e,n,r){"use strict";r.d(n,{RA:function(){return a},kC:function(){return d},vg:function(){return b},kE:function(){return I},Mp:function(){return f},Pb:function(){return u},HW:function(){return j},wX:function(){return v},x6:function(){return p},_6:function(){return h},zf:function(){return x},Y6:function(){return y},wE:function(){return N},J3:function(){return m},We:function(){return s},QV:function(){return Z},C5:function(){return g}});var t=r(75582),i=r(17717),o=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],l=(r(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),c=r(24224);function u(e){if(!e)return!1;try{JSON.parse(e)}catch(n){return!1}return!0}function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.split(" ").join(n)}function a(e){return e.split(" ").join("_")}function d(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*e)}function v(e){return e.charAt(0).toLowerCase()+e.slice(1)}function p(e){if(null===e||"undefined"===typeof e)return"";var n=e.toString().split("."),r=(0,t.Z)(n,2),i=r[0],o=r[1],l=i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return o?"".concat(l,".").concat(o):l}function h(e,n){var r,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=n,o=void 0!==i&&null!==i;if(o||(i=2),1===i)r=e;else{var l=e.length,c=e[l-1];r="y"===c&&"day"!==e?"".concat(e.slice(0,l-1),"ies"):"".concat(e,"s"===c?"es":"s")}if(o){var u=t?p(i):i;return"".concat(u," ").concat(r)}return r}function m(e){return null===e||void 0===e?void 0:e.replace(/_/g," ")}function g(e){var n=e.length;return"ies"===e.slice(n-3,n)?"".concat(e.slice(0,n-3),"y"):"es"===e.slice(n-2,n)&&"ces"!==e.slice(n-3,n)?e.slice(0,n-2):e.slice(0,n-1)}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return d(m(e.toLowerCase()))}function x(e){var n,r=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return r.forEach((function(i,o){if(!n){var l=(0,t.Z)(i,2),c=l[0],u=l[1],s=r.slice(0,o).reduce((function(e,n){return e*Number(n[1])}),1);e<Number(u)*s&&(n=h(c,Math.round(e/s)))}})),n}function j(e){return"undefined"!==typeof e&&null!==e&&!isNaN(e)}function Z(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=Math.pow(10,n);return Math.round((e||0)*r)/r}function y(){return"".concat((0,c.mp)(o)," ").concat((0,c.mp)(l))}function I(e){return null===e||void 0===e?void 0:e.toLowerCase().replace(/\W+/g,"_")}function N(e){var n,r=e.split(i.sep),t=r[r.length-1].split(".");return n=1===t.length?t[0]:t.slice(0,-1).join("."),r.slice(0,r.length-1).concat(n).join(i.sep)}},59416:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return r(89745)}])}},function(e){e.O(0,[844,9902,1424,1005,7815,547,9774,2888,179],(function(){return n=59416,e(e.s=n);var n}));var n=e.O();_N_E=n}]);