mage-ai 0.9.32__py3-none-any.whl → 0.9.34__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 (365) hide show
  1. mage_ai/api/constants.py +37 -2
  2. mage_ai/api/errors.py +9 -5
  3. mage_ai/api/middleware.py +2 -2
  4. mage_ai/api/mixins/__init__.py +0 -0
  5. mage_ai/api/mixins/result_set.py +65 -0
  6. mage_ai/api/operations/base.py +41 -11
  7. mage_ai/api/operations/constants.py +7 -6
  8. mage_ai/api/parsers/BaseParser.py +6 -4
  9. mage_ai/api/parsers/PipelineScheduleParser.py +36 -2
  10. mage_ai/api/policies/BackfillPolicy.py +1 -0
  11. mage_ai/api/policies/BasePolicy.py +229 -40
  12. mage_ai/api/policies/PermissionPolicy.py +17 -0
  13. mage_ai/api/policies/PipelineSchedulePolicy.py +18 -2
  14. mage_ai/api/policies/RolePermissionPolicy.py +2 -1
  15. mage_ai/api/policies/RolePolicy.py +3 -0
  16. mage_ai/api/policies/SessionPolicy.py +36 -1
  17. mage_ai/api/policies/StatusPolicy.py +46 -3
  18. mage_ai/api/policies/UserPolicy.py +25 -2
  19. mage_ai/api/policies/mixins/__init__.py +0 -0
  20. mage_ai/api/policies/mixins/user_permissions.py +241 -0
  21. mage_ai/api/presenters/PermissionPresenter.py +35 -8
  22. mage_ai/api/presenters/RolePresenter.py +29 -12
  23. mage_ai/api/presenters/StatusPresenter.py +11 -0
  24. mage_ai/api/presenters/UserPresenter.py +21 -24
  25. mage_ai/api/resources/BaseResource.py +24 -9
  26. mage_ai/api/resources/BlockResource.py +3 -2
  27. mage_ai/api/resources/DatabaseResource.py +2 -2
  28. mage_ai/api/resources/PermissionResource.py +65 -3
  29. mage_ai/api/resources/Resource.py +8 -1
  30. mage_ai/api/resources/RolePermissionResource.py +23 -0
  31. mage_ai/api/resources/RoleResource.py +75 -4
  32. mage_ai/api/resources/StatusResource.py +34 -0
  33. mage_ai/api/resources/UserResource.py +35 -4
  34. mage_ai/api/result_set.py +8 -1
  35. mage_ai/authentication/permissions/constants.py +78 -0
  36. mage_ai/data_integrations/destinations/constants.py +1 -0
  37. mage_ai/data_integrations/utils/config.py +9 -0
  38. mage_ai/data_integrations/utils/scheduler.py +16 -7
  39. mage_ai/data_preparation/models/block/__init__.py +56 -16
  40. mage_ai/data_preparation/models/block/data_integration/mixins.py +92 -1
  41. mage_ai/data_preparation/models/block/data_integration/utils.py +5 -5
  42. mage_ai/data_preparation/models/block/integration/__init__.py +12 -7
  43. mage_ai/data_preparation/models/block/sql/__init__.py +5 -2
  44. mage_ai/data_preparation/models/block/sql/utils/shared.py +15 -1
  45. mage_ai/data_preparation/models/pipelines/interactions.py +15 -0
  46. mage_ai/data_preparation/shared/secrets.py +7 -17
  47. mage_ai/data_preparation/templates/data_exporters/streaming/google_cloud_pubsub.yaml +5 -0
  48. mage_ai/data_preparation/templates/repo/metadata.yaml +5 -0
  49. mage_ai/io/druid.py +9 -5
  50. mage_ai/io/mssql.py +52 -30
  51. mage_ai/io/postgres.py +1 -0
  52. mage_ai/io/sql.py +15 -1
  53. mage_ai/orchestration/db/models/oauth.py +181 -17
  54. mage_ai/orchestration/db/models/schedules.py +11 -0
  55. mage_ai/presenters/interactions/constants.py +1 -0
  56. mage_ai/presenters/pages/loaders/pipeline_schedules.py +9 -3
  57. mage_ai/server/api/base.py +16 -6
  58. mage_ai/server/api/v1.py +2 -1
  59. mage_ai/server/constants.py +1 -1
  60. mage_ai/server/frontend_dist/404.html +2 -2
  61. mage_ai/server/frontend_dist/_next/static/PBVuphyo_muEAj347ZP_b/_buildManifest.js +1 -0
  62. mage_ai/server/frontend_dist/_next/static/chunks/1124-d8fc76201b83b376.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/{1749-9ec0f4709f5a9284.js → 1749-a6bdce4ee8a09bce.js} +1 -1
  64. mage_ai/server/frontend_dist/_next/static/chunks/1769-613e23e361eb5bce.js +1 -0
  65. mage_ai/server/frontend_dist/_next/static/chunks/1821-953efd0da290d25f.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/2327-1a797c758f8b064a.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/2677-a85c5a72bb695304.js +1 -0
  68. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3419-6c8ec8db8c398c12.js → frontend_dist/_next/static/chunks/3419-0df6c5ef72f2e672.js} +1 -1
  69. mage_ai/server/frontend_dist/_next/static/chunks/3684-e1a713b7c16f0151.js +1 -0
  70. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3859-3501cdba0a33f9f2.js → frontend_dist/_next/static/chunks/3859-ba594d21a1260cd2.js} +1 -1
  71. mage_ai/server/frontend_dist/_next/static/chunks/4636-84f545d1d238df13.js +1 -0
  72. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4839-963da65cea58054f.js → frontend_dist/_next/static/chunks/4839-e5fe343a369734bc.js} +1 -1
  73. mage_ai/server/frontend_dist/_next/static/chunks/5457-97433bc45b42a88a.js +1 -0
  74. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5499-63667ad5a785dba5.js → frontend_dist/_next/static/chunks/5499-b74459f6be5f9229.js} +1 -1
  75. mage_ai/server/frontend_dist/_next/static/chunks/6043-6ea109833b88eb1d.js +1 -0
  76. mage_ai/server/frontend_dist/_next/static/chunks/6333-ca4cd6a73a597a40.js +1 -0
  77. mage_ai/server/frontend_dist/_next/static/chunks/7022-80d082a1d7fd1234.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/7361-25f211ef377e5958.js +1 -0
  79. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/8013-1d6b1f7c13264cb4.js → frontend_dist/_next/static/chunks/8013-e67c71ddea072a20.js} +1 -1
  80. mage_ai/server/frontend_dist/_next/static/chunks/8146-941c5155c3bfcc35.js +1 -0
  81. mage_ai/server/frontend_dist/_next/static/chunks/9161-837b653aa849a76f.js +1 -0
  82. mage_ai/server/frontend_dist/_next/static/chunks/9264-5730e4e059db40a8.js +1 -0
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-752d991f239a128f.js +1 -0
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/{block-layout-a624972d126a3dbd.js → block-layout-a27a28d2a615e364.js} +1 -1
  85. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-98e27a4d7bd0da47.js +1 -0
  86. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-a95787fe1695f493.js → [...slug]-9eb5dad57da13efd.js} +1 -1
  87. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-0d55711df91a78d0.js → global-data-products-26909dec66f00231.js} +1 -1
  88. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-b9eea6abc676ca81.js +1 -0
  89. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-11c601c6ef07fe86.js +1 -0
  90. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-ae6083077c9c1c41.js +1 -0
  91. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-bfce0ee677d57206.js +1 -0
  92. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-476c921d62f565fc.js +1 -0
  93. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/overview-9bc34ef66d84330a.js → frontend_dist/_next/static/chunks/pages/overview-2ec6b17e45a52be8.js} +1 -1
  94. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-605918f3a5c1aac4.js +1 -0
  95. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-84ec3ab0770bcd68.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ee65a62ed166bd85.js} +1 -1
  96. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-2402004a19a6ad53.js +1 -0
  97. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-9a5b4768a640cd68.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-8781db69f19759a1.js} +1 -1
  98. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-d7fd4857579e2b00.js +1 -0
  99. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-bd4bd009146bab36.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-234007c99efdccf6.js} +1 -1
  100. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-8405a83adeaa8ff5.js → block-runs-da7510d4b277e47b.js} +1 -1
  101. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runtime-98aa0840a00cc661.js → block-runtime-eae853ff34b09481.js} +1 -1
  102. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-0fb48e1cc51f78b2.js → monitors-a057b17847b82468.js} +1 -1
  103. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-845c1f010d5ec380.js → [run]-99d11c86f8b15369.js} +1 -1
  104. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-9255f85760e1f57a.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-3f0980d8810a540b.js} +1 -1
  105. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-187ac359020704e1.js → settings-9edf75d03460aaeb.js} +1 -1
  106. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-c52d0c49439ec620.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-e7692e54979f037d.js} +1 -1
  107. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-7b3b57523b226a0e.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-cb6a3bcaf4fa1a81.js} +1 -1
  108. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-5eff96c149584e87.js +1 -0
  109. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipelines-efc080913a247e99.js → pipelines-270b912e1ac189b5.js} +1 -1
  110. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-2058d022972cdea4.js +1 -0
  111. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/[...slug]-1a95628ea8d0d846.js +1 -0
  112. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions-cb1cdf5f8e5bf9c5.js +1 -0
  113. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-58978256db4efbda.js +1 -0
  114. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/[...slug]-9ddd7eb842d5a911.js +1 -0
  115. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-1694c5eb1acbcf30.js +1 -0
  116. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-6850e854fbedbb61.js +1 -0
  117. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/[...slug]-5061c073e1c0de07.js +1 -0
  118. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-f551c5665bfd3494.js +1 -0
  119. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-6fe3657070f98aca.js → frontend_dist/_next/static/chunks/pages/sign-in-e779dbab123e626e.js} +1 -1
  120. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-935113d252ada806.js +1 -0
  121. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates-25b6d24cfa81c306.js → frontend_dist/_next/static/chunks/pages/templates-7079d637e396f2a8.js} +1 -1
  122. mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-67fdb4a3be93aa14.js +1 -0
  123. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-9c0374c7c783b34a.js +1 -0
  124. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-ea3a0d48e5822b42.js +1 -0
  125. mage_ai/server/frontend_dist/block-layout.html +2 -2
  126. mage_ai/server/frontend_dist/files.html +2 -2
  127. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  128. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  129. mage_ai/server/frontend_dist/index.html +2 -2
  130. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  131. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  132. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  133. mage_ai/server/frontend_dist/manage/users.html +2 -2
  134. mage_ai/server/frontend_dist/manage.html +2 -2
  135. mage_ai/server/frontend_dist/overview.html +2 -2
  136. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  137. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  138. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  139. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
  140. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  141. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  142. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  143. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  144. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  145. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  146. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  147. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  148. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  149. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  150. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  151. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  152. mage_ai/server/frontend_dist/pipelines.html +2 -2
  153. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  154. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +24 -0
  155. mage_ai/server/frontend_dist/settings/workspace/permissions.html +24 -0
  156. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  157. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +24 -0
  158. mage_ai/server/frontend_dist/settings/workspace/roles.html +24 -0
  159. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  160. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +24 -0
  161. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  162. mage_ai/server/frontend_dist/settings.html +2 -2
  163. mage_ai/server/frontend_dist/sign-in.html +5 -5
  164. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  165. mage_ai/server/frontend_dist/templates.html +2 -2
  166. mage_ai/server/frontend_dist/terminal.html +2 -2
  167. mage_ai/server/frontend_dist/test.html +2 -2
  168. mage_ai/server/frontend_dist/triggers.html +2 -2
  169. mage_ai/server/frontend_dist/version-control.html +2 -2
  170. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  171. mage_ai/server/frontend_dist_base_path_template/_next/static/L-IKw5_bRZUs-wyjnpN_j/_buildManifest.js +1 -0
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1124-d8fc76201b83b376.js +1 -0
  173. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1749-9ec0f4709f5a9284.js → 1749-a6bdce4ee8a09bce.js} +1 -1
  174. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1769-613e23e361eb5bce.js +1 -0
  175. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1821-953efd0da290d25f.js +1 -0
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2327-1a797c758f8b064a.js +1 -0
  177. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2677-a85c5a72bb695304.js +1 -0
  178. mage_ai/server/{frontend_dist/_next/static/chunks/3419-6c8ec8db8c398c12.js → frontend_dist_base_path_template/_next/static/chunks/3419-0df6c5ef72f2e672.js} +1 -1
  179. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3684-e1a713b7c16f0151.js +1 -0
  180. mage_ai/server/{frontend_dist/_next/static/chunks/3859-3501cdba0a33f9f2.js → frontend_dist_base_path_template/_next/static/chunks/3859-ba594d21a1260cd2.js} +1 -1
  181. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4636-84f545d1d238df13.js +1 -0
  182. mage_ai/server/{frontend_dist/_next/static/chunks/4839-963da65cea58054f.js → frontend_dist_base_path_template/_next/static/chunks/4839-e5fe343a369734bc.js} +1 -1
  183. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-97433bc45b42a88a.js +1 -0
  184. mage_ai/server/{frontend_dist/_next/static/chunks/5499-63667ad5a785dba5.js → frontend_dist_base_path_template/_next/static/chunks/5499-b74459f6be5f9229.js} +1 -1
  185. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6043-6ea109833b88eb1d.js +1 -0
  186. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-ca4cd6a73a597a40.js +1 -0
  187. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-80d082a1d7fd1234.js +1 -0
  188. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-25f211ef377e5958.js +1 -0
  189. mage_ai/server/{frontend_dist/_next/static/chunks/8013-1d6b1f7c13264cb4.js → frontend_dist_base_path_template/_next/static/chunks/8013-e67c71ddea072a20.js} +1 -1
  190. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-941c5155c3bfcc35.js +1 -0
  191. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9161-837b653aa849a76f.js +1 -0
  192. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-5730e4e059db40a8.js +1 -0
  193. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-752d991f239a128f.js +1 -0
  194. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{block-layout-a624972d126a3dbd.js → block-layout-a27a28d2a615e364.js} +1 -1
  195. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-98e27a4d7bd0da47.js +1 -0
  196. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-a95787fe1695f493.js → [...slug]-9eb5dad57da13efd.js} +1 -1
  197. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-0d55711df91a78d0.js → global-data-products-26909dec66f00231.js} +1 -1
  198. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-b9eea6abc676ca81.js +1 -0
  199. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-11c601c6ef07fe86.js +1 -0
  200. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-ae6083077c9c1c41.js +1 -0
  201. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-bfce0ee677d57206.js +1 -0
  202. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-476c921d62f565fc.js +1 -0
  203. mage_ai/server/{frontend_dist/_next/static/chunks/pages/overview-9bc34ef66d84330a.js → frontend_dist_base_path_template/_next/static/chunks/pages/overview-2ec6b17e45a52be8.js} +1 -1
  204. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-605918f3a5c1aac4.js +1 -0
  205. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-84ec3ab0770bcd68.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ee65a62ed166bd85.js} +1 -1
  206. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-2402004a19a6ad53.js +1 -0
  207. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-9a5b4768a640cd68.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-8781db69f19759a1.js} +1 -1
  208. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-d7fd4857579e2b00.js +1 -0
  209. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-bd4bd009146bab36.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-234007c99efdccf6.js} +1 -1
  210. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-8405a83adeaa8ff5.js → block-runs-da7510d4b277e47b.js} +1 -1
  211. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runtime-98aa0840a00cc661.js → block-runtime-eae853ff34b09481.js} +1 -1
  212. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-0fb48e1cc51f78b2.js → monitors-a057b17847b82468.js} +1 -1
  213. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-845c1f010d5ec380.js → [run]-99d11c86f8b15369.js} +1 -1
  214. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-9255f85760e1f57a.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-3f0980d8810a540b.js} +1 -1
  215. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{settings-187ac359020704e1.js → settings-9edf75d03460aaeb.js} +1 -1
  216. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-c52d0c49439ec620.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-e7692e54979f037d.js} +1 -1
  217. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-7b3b57523b226a0e.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-cb6a3bcaf4fa1a81.js} +1 -1
  218. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-5eff96c149584e87.js +1 -0
  219. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipelines-efc080913a247e99.js → pipelines-270b912e1ac189b5.js} +1 -1
  220. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-2058d022972cdea4.js +1 -0
  221. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/[...slug]-1a95628ea8d0d846.js +1 -0
  222. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions-cb1cdf5f8e5bf9c5.js +1 -0
  223. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-58978256db4efbda.js +1 -0
  224. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/[...slug]-9ddd7eb842d5a911.js +1 -0
  225. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-1694c5eb1acbcf30.js +1 -0
  226. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-6850e854fbedbb61.js +1 -0
  227. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/[...slug]-5061c073e1c0de07.js +1 -0
  228. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-f551c5665bfd3494.js +1 -0
  229. mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-6fe3657070f98aca.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-e779dbab123e626e.js} +1 -1
  230. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-935113d252ada806.js +1 -0
  231. mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates-25b6d24cfa81c306.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates-7079d637e396f2a8.js} +1 -1
  232. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-67fdb4a3be93aa14.js +1 -0
  233. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9c0374c7c783b34a.js +1 -0
  234. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-ea3a0d48e5822b42.js +1 -0
  235. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  236. mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
  237. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
  238. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
  239. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  240. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
  241. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
  242. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
  243. mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
  244. mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
  245. mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
  246. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
  247. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  248. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
  249. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
  250. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  251. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
  252. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  253. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  254. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
  255. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
  256. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
  257. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
  258. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
  259. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  260. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
  261. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  262. mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
  263. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
  264. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +24 -0
  265. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +24 -0
  266. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
  267. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +24 -0
  268. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +24 -0
  269. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
  270. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +24 -0
  271. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
  272. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  273. mage_ai/server/frontend_dist_base_path_template/sign-in.html +13 -13
  274. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
  275. mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
  276. mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
  277. mage_ai/server/frontend_dist_base_path_template/test.html +4 -4
  278. mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
  279. mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
  280. mage_ai/server/server.py +37 -2
  281. mage_ai/services/aws/__init__.py +19 -8
  282. mage_ai/services/spark/config.py +5 -1
  283. mage_ai/services/spark/spark.py +5 -4
  284. mage_ai/settings/__init__.py +2 -0
  285. mage_ai/streaming/constants.py +1 -0
  286. mage_ai/streaming/sinks/google_cloud_pubsub.py +66 -0
  287. mage_ai/streaming/sinks/sink_factory.py +6 -0
  288. mage_ai/tests/api/operations/test_operations.py +8 -2
  289. mage_ai/tests/api/operations/test_pipeline_schedules.py +3 -0
  290. mage_ai/tests/data_preparation/models/block/sql/utils/test_shared.py +130 -5
  291. mage_ai/tests/factory.py +2 -0
  292. mage_ai/tests/orchestration/test_pipeline_scheduler.py +20 -3
  293. mage_ai/tests/streaming/sinks/test_google_cloud_pubsub.py +28 -0
  294. mage_ai/usage_statistics/logger.py +4 -1
  295. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/METADATA +1 -1
  296. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/RECORD +302 -268
  297. mage_ai/api/policies/utils.py +0 -14
  298. mage_ai/server/frontend_dist/_next/static/cbN7L4Ms6UUPoANozEh9w/_buildManifest.js +0 -1
  299. mage_ai/server/frontend_dist/_next/static/chunks/1769-e2efd4df8d09481f.js +0 -1
  300. mage_ai/server/frontend_dist/_next/static/chunks/2327-2d8a1555605cf4af.js +0 -1
  301. mage_ai/server/frontend_dist/_next/static/chunks/2369-cb9cd97052e18d27.js +0 -1
  302. mage_ai/server/frontend_dist/_next/static/chunks/2677-aea54e655c4a727f.js +0 -1
  303. mage_ai/server/frontend_dist/_next/static/chunks/5457-994e1044953f1425.js +0 -1
  304. mage_ai/server/frontend_dist/_next/static/chunks/5597-c034402ee26af3b4.js +0 -1
  305. mage_ai/server/frontend_dist/_next/static/chunks/6333-d1f8db4e7d9656a5.js +0 -1
  306. mage_ai/server/frontend_dist/_next/static/chunks/6648-9bd31397f1d1b551.js +0 -1
  307. mage_ai/server/frontend_dist/_next/static/chunks/9161-0101571a3635a938.js +0 -1
  308. mage_ai/server/frontend_dist/_next/static/chunks/9264-7c4fcfed1200046a.js +0 -1
  309. mage_ai/server/frontend_dist/_next/static/chunks/9696-3e8ab7786f0e3a0e.js +0 -1
  310. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-976b488b8aea327f.js +0 -1
  311. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-1a6c6654bfc953ac.js +0 -1
  312. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-49004d918b04c866.js +0 -1
  313. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-97177740fbb6eb9f.js +0 -1
  314. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-5b6411c9eb8c4ba4.js +0 -1
  315. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-0a7a746cc0998608.js +0 -1
  316. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-606012a580245001.js +0 -1
  317. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-0801de3c9a2976ea.js +0 -1
  318. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0a5865d4cf012127.js +0 -1
  319. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-87b1a0601c4236cd.js +0 -1
  320. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-77ffaa2d721a0a4e.js +0 -1
  321. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-4e72d40881ac0605.js +0 -1
  322. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-8da8f8e2fdb1c99f.js +0 -1
  323. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-be029347e99fcea2.js +0 -1
  324. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-d4b07df78b3d6037.js +0 -1
  325. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-87c492e9edc6064e.js +0 -1
  326. mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-2ab9f3d0c50cce81.js +0 -1
  327. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-0ba40243a030ddf4.js +0 -1
  328. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-28a3a43d65074394.js +0 -1
  329. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1769-e2efd4df8d09481f.js +0 -1
  330. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2327-2d8a1555605cf4af.js +0 -1
  331. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2369-cb9cd97052e18d27.js +0 -1
  332. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2677-aea54e655c4a727f.js +0 -1
  333. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-994e1044953f1425.js +0 -1
  334. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5597-c034402ee26af3b4.js +0 -1
  335. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-d1f8db4e7d9656a5.js +0 -1
  336. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6648-9bd31397f1d1b551.js +0 -1
  337. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9161-0101571a3635a938.js +0 -1
  338. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-7c4fcfed1200046a.js +0 -1
  339. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9696-3e8ab7786f0e3a0e.js +0 -1
  340. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-976b488b8aea327f.js +0 -1
  341. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-1a6c6654bfc953ac.js +0 -1
  342. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-49004d918b04c866.js +0 -1
  343. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-97177740fbb6eb9f.js +0 -1
  344. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-5b6411c9eb8c4ba4.js +0 -1
  345. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-0a7a746cc0998608.js +0 -1
  346. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-606012a580245001.js +0 -1
  347. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-0801de3c9a2976ea.js +0 -1
  348. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0a5865d4cf012127.js +0 -1
  349. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-87b1a0601c4236cd.js +0 -1
  350. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-77ffaa2d721a0a4e.js +0 -1
  351. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-4e72d40881ac0605.js +0 -1
  352. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-8da8f8e2fdb1c99f.js +0 -1
  353. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-be029347e99fcea2.js +0 -1
  354. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-d4b07df78b3d6037.js +0 -1
  355. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-87c492e9edc6064e.js +0 -1
  356. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-2ab9f3d0c50cce81.js +0 -1
  357. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-0ba40243a030ddf4.js +0 -1
  358. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-28a3a43d65074394.js +0 -1
  359. mage_ai/server/frontend_dist_base_path_template/_next/static/o_Yc57jh8Te2SI-VoipGQ/_buildManifest.js +0 -1
  360. /mage_ai/server/frontend_dist/_next/static/{cbN7L4Ms6UUPoANozEh9w → PBVuphyo_muEAj347ZP_b}/_ssgManifest.js +0 -0
  361. /mage_ai/server/frontend_dist_base_path_template/_next/static/{o_Yc57jh8Te2SI-VoipGQ → L-IKw5_bRZUs-wyjnpN_j}/_ssgManifest.js +0 -0
  362. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/LICENSE +0 -0
  363. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/WHEEL +0 -0
  364. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/entry_points.txt +0 -0
  365. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{16488:function(e,n,t){"use strict";t.d(n,{IJ:function(){return v},M8:function(){return w},Vx:function(){return O},XM:function(){return P},_U:function(){return h},eI:function(){return x},gU:function(){return y},lO:function(){return S},ri:function(){return b},tL:function(){return j},vJ:function(){return Z},xH:function(){return m}});var r,i=t(82394),o=t(92083),u=t.n(o),c=t(3917),l=t(4383),a=t(30229),s=t(42122),d=t(86735);function p(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 f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var h=function(e){return!!e&&!Object.values(a.U5).includes(e)};function v(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,o=n.started_at,c=n.status,l=null;o&&r&&(l=u()(r).valueOf()-u()(o).valueOf());return f(f({},e),{},(0,i.Z)({},t,{runtime:l,status:c}))}),{})}var g,b=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:a.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return e?n.slice(0,1):n};function m(e){var n=(0,s.gR)(e,[a.gm.INTERVAL,a.gm.TYPE]),t=e[a.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var r=e[a.gm.TYPE];return r&&(n["schedule_type[]"]=r),n}function x(e){if(!e)return null;var n=new Date(u()(e).valueOf()),t=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());return new Date(t)}function O(e){return"string"!==typeof e?e:x(e.split("+")[0]).toISOString().split(".")[0]}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(g||(g={}));var j=(r={},(0,i.Z)(r,g.DAY,86400),(0,i.Z)(r,g.HOUR,3600),(0,i.Z)(r,g.MINUTE,60),(0,i.Z)(r,g.SECOND,1),r);function y(e){var n=g.SECOND,t=e;return e%86400===0?(t/=86400,n=g.DAY):e%3600===0?(t/=3600,n=g.HOUR):e%60===0&&(t/=60,n=g.MINUTE),{time:t,unit:n}}function Z(e,n){return e*j[n]}function P(e,n,t){var r="".concat(e.toISOString().split("T")[0]," ").concat(null===n||void 0===n?void 0:n.hour,":").concat(null===n||void 0===n?void 0:n.minute);if(null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone){var i=u()(e);i.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),i.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),i.set("second",0),r=i.format(c.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,c.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))}return r}function w(e){var n,t="";return t="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(t="".concat(t,"/").concat(e.token)),(n=window.location.port)&&(t=t.replace(n,l.QT)),t}function _(e,n,t){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,t){var r=t.indexOf(e),i=0;if(n<0)for(var o=0;o>n;o--)0===r?(r=t.length-1,i-=1):r-=1;else if(n>0)for(var u=0;u<n;u++)r===t.length-1?(r=0,i+=1):r+=1;return{additionalOffset:i,cronValue:String(t[r]||e)}}(+e,n,t)}var k=(0,d.m5)(60),C=(0,d.m5)(24),I=(0,c.Cs)();function S(e,n){if(!e)return e;var t=u()().local().format("Z"),r=t.split(":"),i="-"===t[0],o=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),c=Number(r[1]);(i&&!n||!i&&n)&&(o=-o,c=-c);var l=e.split(" "),a=l[0],s=l[1],d=l[2],p=_(a,c,k),f=_(s,o+p.additionalOffset,C);if(l[0]=p.cronValue,l[1]=f.cronValue,0!==(null===f||void 0===f?void 0:f.additionalOffset)){var h=_(d,f.additionalOffset,I);l[2]=h.cronValue}return l.join(" ")}},81066:function(e,n,t){"use strict";t.d(n,{B:function(){return p}});var r=t(82394),i=t(46732),o=t(93369),u=t(72473),c=t(8059),l=t(70515),a=t(28598);function s(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 d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var p={bold:!0,greyBorder:!0,paddingBottom:9,paddingTop:9};n.Z=function(e){var n=e.addButtonMenuOpen,t=e.addButtonMenuRef,r=e.isLoading,s=e.label,f=e.menuItems,h=e.onClick,v=e.onClickCallback;return(0,a.jsx)(i.Z,{disableKeyboardShortcuts:!0,items:f,onClickCallback:v,onClickOutside:v,open:n,parentRef:t,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/NewItemMenu",children:(0,a.jsx)(o.ZP,d(d({},p),{},{background:c.eW,beforeElement:(0,a.jsx)(u.mm,{size:2.5*l.iI}),loading:r,onClick:function(e){e.preventDefault(),null===h||void 0===h||h()},uuid:"shared/AddButton/index",children:s}))})}},44265:function(e,n,t){"use strict";t.d(n,{Az:function(){return l},BF:function(){return c},Do:function(){return s},IK:function(){return u},VO:function(){return o},sZ:function(){return a}});var r,i=t(82394),o=t(41143).V,u=[o.FAILED,o.COMPLETED,o.RUNNING,o.CANCELLED,o.INITIAL],c=[o.INITIAL,o.RUNNING],l=[o.CANCELLED,o.COMPLETED,o.FAILED],a="__mage_variables",s=(r={},(0,i.Z)(r,o.CANCELLED,"Cancelled"),(0,i.Z)(r,o.COMPLETED,"Done"),(0,i.Z)(r,o.FAILED,"Failed"),(0,i.Z)(r,o.INITIAL,"Ready"),(0,i.Z)(r,o.RUNNING,"Running"),r)},46732:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(50724)),u=t(70374),c=t(28598),l=["children","items","open","onClickCallback","onClickOutside","parentRef","uuid","zIndex"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.items,r=e.open,a=e.onClickCallback,d=e.onClickOutside,p=e.parentRef,f=e.uuid,h=e.zIndex,v=(0,i.Z)(e,l),g=(0,c.jsxs)("div",{style:{position:"relative",zIndex:(d?3:2)+(h||0)},children:[(0,c.jsx)("div",{ref:p,children:n}),(0,c.jsx)(u.Z,s(s({},v),{},{items:t,onClickCallback:a,open:r,parentRef:p,uuid:f}))]});return d?(0,c.jsx)(o.Z,{onClickOutside:d,open:!0,children:g}):g}},65956:function(e,n,t){"use strict";var r=t(38626),i=t(55485),o=t(38276),u=t(30160),c=t(44897),l=t(42631),a=t(47041),s=t(70515),d=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||c.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||c.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||c.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||c.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||c.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||c.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||c.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),v=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),g=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,c=e.contentContainerRef,l=e.dark,a=e.footer,s=e.fullHeight,p=void 0===s||s,b=e.fullWidth,m=void 0===b||b,x=e.header,O=e.headerHeight,j=e.headerIcon,y=e.headerPaddingVertical,Z=e.headerTitle,P=e.maxHeight,w=e.maxWidth,_=e.minWidth,k=e.noPadding,C=e.overflowVisible,I=e.subtitle,S=e.success;return(0,d.jsxs)(f,{borderless:n,dark:l,fullHeight:p,fullWidth:m,maxHeight:P,maxWidth:w,minWidth:_,overflowVisible:C,ref:r,success:S,children:[(x||Z)&&(0,d.jsxs)(h,{headerPaddingVertical:y,height:O,children:[x&&x,Z&&(0,d.jsx)(i.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(i.ZP,{alignItems:"center",children:[j&&j,(0,d.jsx)(o.Z,{ml:j?1:0,children:(0,d.jsx)(u.ZP,{bold:!0,default:!0,children:Z})})]})})]}),(0,d.jsxs)(v,{maxHeight:P,noPadding:k,overflowVisible:C,ref:c,children:[I&&(0,d.jsx)(o.Z,{mb:2,children:(0,d.jsx)(u.ZP,{default:!0,children:I})}),t]}),a&&(0,d.jsx)(g,{children:a})]})}},72191:function(e,n,t){"use strict";t.d(n,{_k:function(){return o},bL:function(){return i},l2:function(){return u}});var r=t(70515),i=(r.iI,2*r.iI),o=2.5*r.iI,u=3*r.iI},23706:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return me}});var r=t(77837),i=t(75582),o=t(82394),u=t(38860),c=t.n(u),l=t(12691),a=t.n(l),s=t(82684),d=t(69864),p=t(34376),f=t(17586),h=t(15338),v=t(93369),g=t(48670),b=t(55072),m=t(75457),x=t(30229),O=t(93808),j=t(82359),y=t(71180),Z=t(55485),P=t(85854),w=t(65956),_=t(38276),k=t(75499),C=t(30160),I=t(35576),S=t(17488),E=t(69650),N=t(44897),D=t(38626),T=t(42631),M=t(70515),L=D.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*M.iI,2*M.iI,T.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||N.Z).borders.light,";\n background-color: ").concat((e.theme||N.Z).background.popup,";\n ")})),R=t(81728),V=t(8916),A=t(28598);function H(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function F(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var U="".concat(M.iI,"px ").concat(3*M.iI,"px");var W=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,r=e.onSuccess,u=e.variables,c=(0,s.useState)(!1),l=c[0],a=c[1],d=(0,s.useState)({}),p=d[0],f=d[1],h=(0,s.useState)(u||{}),v=h[0],g=h[1],b=(0,s.useMemo)((function(){return F(F({},n),{},{name:(0,R.Y6)(),variables:l?(0,V.e7)(v):null})}),[n,l,v]),m=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),g((function(t){return F(F({},t),{},(0,o.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,A.jsx)(I.Z,F(F({},t),{},{rows:1,value:n})):(0,A.jsx)(S.Z,F({},t))};return(0,s.useEffect)((function(){var e=Object.entries(v).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],u=t[1],c=(0,R.Pb)(u)&&"object"===typeof JSON.parse(u)&&!Array.isArray(JSON.parse(u))&&null!==JSON.parse(u);return F(F({},e),{},(0,o.Z)({},r,c))}),{});f(e)}),[]),(0,A.jsxs)(w.Z,{footer:(0,A.jsxs)(Z.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,A.jsx)(y.Z,{onClick:function(){r({pipeline_schedule:b}),t()},padding:U,primaryAlternate:!0,children:"Run now"}),(0,A.jsx)(_.Z,{mr:1}),(0,A.jsx)(y.Z,{borderColor:N.Z.background.page,onClick:t,padding:U,secondary:!0,children:"Cancel"})]}),header:(0,A.jsx)(P.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*M.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,A.jsx)(L,{children:(0,A.jsxs)(Z.ZP,{alignItems:"center",children:[(0,A.jsx)(_.Z,{mr:2,children:(0,A.jsx)(E.Z,{checked:l,onCheck:a})}),(0,A.jsx)(C.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),l&&v&&Object.entries(v).length>0&&(0,A.jsx)(_.Z,{mt:2,children:(0,A.jsx)(k.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(v).map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return[(0,A.jsx)(C.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),m(t,r)]}))})})]})},B=t(47041),Y=D.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],N.Z.borders.medium,M.tr),G=D.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],B.w5),Q=D.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],N.Z.background.output,T.n_,M.iI,M.tr),X=t(79633);var z=function(e){var n=e.hasOverride,t=e.scheduleType,r=e.variables,o=e.variablesOverride,u=[];return Object.entries(r).forEach((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1],c=null===o||void 0===o?void 0:o[t];u.push({uuid:t,value:(0,V.FS)(c||r)})})),(0,V.JZ)(u,t),(0,A.jsxs)(Y,{children:[(0,A.jsx)(_.Z,{mb:2,children:(0,A.jsxs)(C.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,A.jsx)(G,{noScrollbarTrackBackground:!0,children:r&&u.map((function(e){var n=e.uuid,t=e.value;return(0,A.jsxs)(Q,{children:[(0,A.jsx)(C.ZP,{monospace:!0,small:!0,children:n}),(0,A.jsx)(C.ZP,{color:X.Or,monospace:!0,small:!0,children:(0,V.FS)(t)})]})}))})]})},J=t(4190),q=t(12717),K=t(85544),$=t(31743),ee=t(35686),ne=t(83784),te=t(72473),re=t(28795),ie=t(81066),oe=t(24944),ue=t(3917),ce=t(69419),le=t(16488),ae=t(86735),se=t(42122),de=t(50178),pe=t(72619),fe=t(70320),he=t(89538);function ve(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?ve(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ve(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function be(e){var n=e.pipeline,t=(0,p.useRouter)(),r=(0,de.Ct)(),u=n.uuid,c=(0,s.useState)(null),l=c[0],O=c[1],y=(0,s.useState)(!1),Z=y[0],P=y[1],w=ee.ZP.projects.list().data,k=(0,s.useMemo)((function(){var e;return null===w||void 0===w||null===(e=w.projects)||void 0===e?void 0:e[0]}),[w]),I=((0,s.useMemo)((function(){var e;return(0,fe.h)(null===k||void 0===k||null===(e=k.features)||void 0===e?void 0:e[j.d.LOCAL_TIMEZONE])}),[null===k||void 0===k?void 0:k.features]),ee.ZP.client_pages.detail("pipeline_schedule:create",{"pipelines[]":[u],"pipeline_schedules[]":[]},{},{key:"Triggers/Edit/".concat(u)}).data),S=(0,s.useMemo)((function(){return null===I||void 0===I?void 0:I.client_page}),[I]),E=(0,s.useMemo)((function(){var e,n;return null===S||void 0===S||null===(e=S.components)||void 0===e||null===(n=e.find((function(e){return"create_with_interactions_component"===e.uuid})))||void 0===n?void 0:n.enabled}),[S]),N=(0,s.useMemo)((function(){return null===S||void 0===S?void 0:S.disabled}),[S]),D=ee.ZP.variables.pipelines.list(u,{global_only:!0},{revalidateOnFocus:!1}).data,T=null===D||void 0===D?void 0:D.variables,L=(0,ce.iV)(),H=(0,ce.DQ)(L,[x.gm.INTERVAL,x.gm.STATUS,x.gm.TAG,x.gm.TYPE]),F=(0,le.xH)(H),U=null!==L&&void 0!==L&&L.page?L.page:0,B=ee.ZP.pipeline_schedules.pipelines.list(u,ge(ge({},F),{},{_limit:b.Q,_offset:(null!==L&&void 0!==L&&L.page?L.page:0)*b.Q}),{refreshInterval:7500}),Y=B.data,G=B.mutate,Q=(0,s.useMemo)((function(){return(null===Y||void 0===Y?void 0:Y.pipeline_schedules)||[]}),[Y]),X=function(e){return(0,d.Db)(ee.ZP.pipeline_schedules.pipelines.useCreate(u),{onSuccess:function(n){return(0,pe.wD)(n,{callback:function(n){var t=n.pipeline_schedule.id;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}})},ve=X((function(e){return t.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===n||void 0===n?void 0:n.uuid,"/triggers/").concat(e,"/edit"))})),be=(0,i.Z)(ve,2),me=be[0],xe=be[1].isLoading,Oe=X(G),je=(0,i.Z)(Oe,2),ye=je[0],Ze=je[1].isLoading,Pe=(0,s.useMemo)((function(){var e;return null===(e=(0,V.wx)(T,(function(e){return e.uuid===ne.C})))||void 0===e?void 0:e.reduce((function(e,n){var t=n.uuid,r=n.value;return ge(ge({},e),{},(0,o.Z)({},t,r))}),{})}),[T]),we=(0,R.Y6)(),_e=(0,s.useMemo)((function(){return{name:we,schedule_interval:x.U5.ONCE,schedule_type:x.Xm.TIME,start_time:(0,ue.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:x.fq.ACTIVE}}),[we]),ke=(0,he.dd)((function(){return(0,A.jsx)(W,{initialPipelineSchedulePayload:_e,onCancel:Se,onSuccess:ye,variables:Pe})}),{},[T,Pe],{background:!0,uuid:"run_pipeline_now_popup"}),Ce=(0,i.Z)(ke,2),Ie=Ce[0],Se=Ce[1],Ee=(0,s.useState)(),Ne=Ee[0],De=Ee[1],Te=(0,s.useMemo)((function(){var e=null===Ne||void 0===Ne?void 0:Ne.variables,n=!(0,se.Qr)(e),t=n?null===Ne||void 0===Ne?void 0:Ne.variables:(0,se.Qr)(Pe)?null:Pe;return function(i){var o=i.height-(t?151:80);return(0,A.jsxs)(A.Fragment,{children:[t&&(0,A.jsx)(z,{hasOverride:n,scheduleType:null===Ne||void 0===Ne?void 0:Ne.schedule_type,variables:Pe,variablesOverride:e}),!t&&(0,A.jsxs)(_.Z,{p:M.cd,children:[(0,A.jsx)(C.ZP,{children:"This pipeline has no runtime variables."}),!r&&(0,A.jsxs)(_.Z,{mt:1,children:[(0,A.jsx)(a(),{as:"/pipelines/".concat(u,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,A.jsx)(g.Z,{primary:!0,children:"Click here"})})," ",(0,A.jsx)(C.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,A.jsx)(f.Z,ge(ge({},i),{},{height:o,noStatus:!0}))]})}}),[r,u,null===Ne||void 0===Ne?void 0:Ne.schedule_type,null===Ne||void 0===Ne?void 0:Ne.variables,Pe]),Me=(0,s.useMemo)((function(){var e;return(null===Y||void 0===Y||null===(e=Y.metadata)||void 0===e?void 0:e.count)||[]}),[Y]),Le=ee.ZP.pipeline_triggers.pipelines.list(u).data,Re=(0,s.useMemo)((function(){return(0,ae.HK)((null===Le||void 0===Le?void 0:Le.pipeline_triggers)||[],(function(e){return e.name}))}),[Le]),Ve=ee.ZP.tags.list().data,Ae=(0,s.useMemo)((function(){return(0,ae.YC)((null===Ve||void 0===Ve?void 0:Ve.tags)||[],(function(e){return e.uuid}))}),[Ve]),He=ee.ZP.pipeline_interactions.detail(E&&u,{filter_for_permissions:1}),Fe=He.data,Ue=(He.mutate,ee.ZP.interactions.pipeline_interactions.list(E&&u)),We=Ue.data,Be=(Ue.mutate,ee.ZP.pipelines.detail(E&&u).data),Ye=(0,s.useMemo)((function(){return(null===Fe||void 0===Fe?void 0:Fe.pipeline_interaction)||{}}),[Fe]),Ge=((0,s.useMemo)((function(){return(null===We||void 0===We?void 0:We.interactions)||[]}),[We]),(0,s.useMemo)((function(){var e;return E&&(null===(e=Object.keys((null===Ye||void 0===Ye?void 0:Ye.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[E,Ye])),Qe=(0,s.useMemo)((function(){return Ge&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(_.Z,{ml:"12px"}),(0,A.jsx)(oe.lZ,{}),(0,A.jsx)(_.Z,{ml:"12px"}),(0,A.jsx)(v.ZP,ge(ge({},ie.B),{},{Icon:te.yd,inline:!0,onClick:function(){return P(!0)},uuid:"Create trigger with no-code",children:"Create trigger with no-code"}))]})}),[Ge,P]),Xe=(0,s.useMemo)((function(){return(0,A.jsx)(K.Z,{addButtonProps:!N&&{isLoading:xe,label:"New trigger",onClick:function(){return me({pipeline_schedule:{name:(0,R.Y6)()}})}},filterOptions:{frequency:Object.values(x.U5),status:Object.values(x.fq),tag:Ae.map((function(e){return e.uuid})),type:Object.values(x.Xm)},filterValueLabelMapping:{tag:Ae.reduce((function(e,n){var t=n.uuid;return ge(ge({},e),{},(0,o.Z)({},t,t))}),{}),type:x.Z4},onClickFilterDefaults:function(){t.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(u,"/triggers"))},query:H,secondaryButtonProps:!N&&{disabled:r,isLoading:Ze,label:"Run @once",onClick:(0,se.Qr)(Pe)?function(){return ye({pipeline_schedule:_e})}:Ie,tooltip:"Creates an @once trigger and runs pipeline immediately"},showDivider:!N,children:Qe})}),[me,ye,N,xe,Ze,r,Qe,_e,u,H,t,Ie,Ae,Pe]),ze=(0,s.useMemo)((function(){var e=[];return Z?e.push.apply(e,[{label:function(){return"Triggers"},onClick:function(){return P(!1)}},{bold:!0,label:function(){return"New trigger"}}]):e.push({label:function(){return"Triggers"}}),e}),[Z,P]);return(0,A.jsxs)(m.Z,{breadcrumbs:ze,buildSidekick:!Z&&Te,errors:l,pageName:re.M.TRIGGERS,pipeline:n,setErrors:O,subheader:!Z&&Xe,title:function(e){var n=e.name;return"".concat(n," triggers")},uuid:"".concat(re.M.TRIGGERS,"_").concat(u),children:[Z&&(0,A.jsx)(q.Z,{creatingWithLimitation:!0,errors:l,onCancel:function(){return P(!1)},pipeline:null===Be||void 0===Be?void 0:Be.pipeline,project:k,setErrors:O,useCreateScheduleMutation:X}),!Z&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(h.Z,{light:!0}),Y?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)($.Z,{fetchPipelineSchedules:G,pipeline:n,pipelineSchedules:Q,pipelineTriggersByName:Re,selectedSchedule:Ne,setErrors:O,setSelectedSchedule:De}),(0,A.jsx)(_.Z,{p:2,children:(0,A.jsx)(b.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),r=ge(ge({},L),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(u,"/triggers?").concat((0,ce.uM)(r)))},page:Number(U),totalPages:Math.ceil(Me/b.Q)})})]}):(0,A.jsx)(_.Z,{m:2,children:(0,A.jsx)(J.Z,{inverted:!0})})]})]})}be.getInitialProps=function(){var e=(0,r.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 me=(0,O.Z)(be)},40183:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return t(23706)}])}},function(e){e.O(0,[844,2083,2851,2369,341,9161,4495,9302,8013,600,9696,8264,4666,5499,4839,5457,7055,1769,1743,6333,3951,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6308],{74395:function(e,n,t){"use strict";t.d(n,{M:function(){return c},W:function(){return o}});var i=t(38626),r=t(46684),o=34*t(70515).iI,c=i.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],r.Mz)},92066:function(e,n,t){"use strict";t.d(n,{DQ:function(){return u},HY:function(){return c},SA:function(){return s},WH:function(){return o},eC:function(){return d},fF:function(){return a},tC:function(){return l}});var i=t(19452),r=t(50178),o="Workspace",c="Preferences",a="Git settings",d="Users",l="Account",u="Profile",s=function(e){var n=e.owner,t=e.roles,s=e.project_access,f=[{linkProps:{href:"/settings/workspace/preferences"},uuid:c}];(n||t===i.No.ADMIN||0!==(2&s))&&f.push({linkProps:{href:"/settings/workspace/users"},uuid:d}),(!(0,r.YB)()||t<=i.No.EDITOR)&&f.push({linkProps:{href:"/settings/workspace/sync-data"},uuid:a});var h=[{items:f,uuid:o}];return(0,r.YB)()?h.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:u}],uuid:l}]):h}},28274:function(e,n,t){"use strict";t.d(n,{Z:function(){return I}});var i=t(94629),r=t(82394),o=t(12691),c=t.n(o),a=t(48670),d=t(38276),l=t(30160),u=t(38626),s=t(44897),f=t(70515),h=t(91437),p=(f.iI,u.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*f.iI,2.5*f.iI)),m=u.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,h.eR)(),1.5*f.iI,2.5*f.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||s.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||s.Z.background).codeTextarea,";\n ")})),g=t(28598),b=t(82684);function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var v=function(e){var n=e.isItemSelected,t=e.sections;return(0,g.jsx)(d.Z,{py:f.Gg,children:null===t||void 0===t?void 0:t.map((function(e){var t=e.items,i=e.title,r=e.uuid;return(0,g.jsxs)(d.Z,{children:[(0,g.jsx)(p,{children:(0,g.jsx)(l.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:i?i():r})}),null===t||void 0===t?void 0:t.map((function(e){var t=e.label,i=e.linkProps,o=e.onClick,d=e.uuid,l=t?t():d,u=(0,g.jsx)(m,{selected:null===n||void 0===n?void 0:n(y(y({},e),{},{uuidWorkspace:r})),children:l});return i?(0,b.createElement)(c(),y(y({},i),{},{key:d,passHref:!0}),(0,g.jsx)(a.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:u})):(0,g.jsx)(a.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:o,preventDefault:!0,sameColorAsText:!0,children:u},d)}))]},r)}))})},w=t(74395),j=t(92066),k=t(50178);var I=function(e){var n=e.after,t=e.afterHidden,r=e.children,o=e.uuidItemSelected,c=e.uuidWorkspaceSelected,a=(0,k.PR)()||{};return(0,g.jsx)(i.Z,{after:n,afterHidden:!n||t,afterWidth:n?50*f.iI:0,afterWidthOverride:!0,before:(0,g.jsx)(w.M,{children:(0,g.jsx)(v,{isItemSelected:function(e){var n=e.uuid,t=e.uuidWorkspace;return c===t&&o===n},sections:(0,j.SA)(a)})}),beforeWidth:w.W,title:"Settings",uuid:"settings/index",children:r})}},65956:function(e,n,t){"use strict";var i=t(38626),r=t(55485),o=t(38276),c=t(30160),a=t(44897),d=t(42631),l=t(47041),u=t(70515),s=t(28598),f=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*u.iI,1.5*u.iI,1.5*u.iI),h=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],d.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||a.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||a.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||a.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||a.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),p=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],d.n_,d.n_,(function(e){return"\n background-color: ".concat((e.theme.background||a.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),m=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*u.iI,l.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*u.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),g=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],d.M8,d.YF,1.75*u.iI);n.Z=function(e){var n=e.borderless,t=e.children,i=e.containerRef,a=e.contentContainerRef,d=e.dark,l=e.footer,u=e.fullHeight,f=void 0===u||u,b=e.fullWidth,x=void 0===b||b,y=e.header,v=e.headerHeight,w=e.headerIcon,j=e.headerPaddingVertical,k=e.headerTitle,I=e.maxHeight,P=e.maxWidth,_=e.minWidth,Z=e.noPadding,S=e.overflowVisible,O=e.subtitle,H=e.success;return(0,s.jsxs)(h,{borderless:n,dark:d,fullHeight:f,fullWidth:x,maxHeight:I,maxWidth:P,minWidth:_,overflowVisible:S,ref:i,success:H,children:[(y||k)&&(0,s.jsxs)(p,{headerPaddingVertical:j,height:v,children:[y&&y,k&&(0,s.jsx)(r.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(r.ZP,{alignItems:"center",children:[w&&w,(0,s.jsx)(o.Z,{ml:w?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:k})})]})})]}),(0,s.jsxs)(m,{maxHeight:I,noPadding:Z,overflowVisible:S,ref:a,children:[O&&(0,s.jsx)(o.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:O})}),t]}),l&&(0,s.jsx)(g,{children:l})]})}},85854:function(e,n,t){"use strict";var i,r,o,c,a,d,l,u,s=t(82394),f=t(26304),h=t(26653),p=t(38626),m=t(33591),g=t(44897),b=t(95363),x=t(61896),y=t(30160),v=t(70515),w=t(38276),j=t(28598),k=["children","condensed","inline","level","marketing","spacingBelow"];function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?I(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=(0,p.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],y.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||g.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(b.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(b.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(b.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),Z=p.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||g.Z.content).active,";\n ")})),S=p.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,m.media.md(i||(i=(0,h.Z)(["\n ","\n "])),x.aQ),m.media.lg(r||(r=(0,h.Z)(["\n ","\n "])),x.aQ),m.media.xl(o||(o=(0,h.Z)(["\n ","\n "])),x.aQ)),O=p.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,x.MJ),H=p.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,m.media.xs(c||(c=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),m.media.sm(a||(a=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),m.media.md(d||(d=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),m.media.lg(l||(l=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),m.media.xl(u||(u=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI)),N=p.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,x.BL),C=p.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),W=p.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),z=p.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),D=p.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(x.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(x.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),E=function(e){var n,t=e.children,i=e.condensed,r=e.inline,o=e.level,c=e.marketing,a=e.spacingBelow,d=(0,f.Z)(e,k);r?n=D:0===Number(o)?n=S:1===Number(o)?n=c?H:O:2===Number(o)?n=N:3===Number(o)?n=C:4===Number(o)?n=W:5===Number(o)&&(n=z);var l=(0,j.jsxs)(n,P(P({},d),{},{level:o,children:[a&&(0,j.jsx)(w.Z,{mb:i?2:3,children:t}),!a&&t]}));return r?l:(0,j.jsx)(Z,{children:l})};E.defaultProps={level:3,weightStyle:6},n.Z=E},86627:function(e,n,t){"use strict";t.r(n);var i=t(77837),r=t(38860),o=t.n(r),c=t(65956),a=t(93808),d=t(28274),l=t(38276),u=t(36043),s=t(35686),f=t(70515),h=t(92066),p=t(50178),m=t(28598);function g(){var e=((0,p.PR)()||{}).id,n=s.ZP.users.detail(e),t=n.data,i=n.mutate,r=null===t||void 0===t?void 0:t.user;return(0,m.jsx)(d.Z,{uuidItemSelected:h.DQ,uuidWorkspaceSelected:h.tC,children:(0,m.jsx)(l.Z,{p:f.cd,children:(0,m.jsx)(c.Z,{children:(0,m.jsx)(u.Z,{disabledFields:["roles"],onSaveSuccess:i,user:r})})})})}g.getInitialProps=(0,i.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,a.Z)(g)},10736:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/account/profile",function(){return t(86627)}])}},function(e){e.O(0,[844,8013,600,9696,8264,5597,9774,2888,179],(function(){return n=10736,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return _}});var r=t(82394),i=t(21831),o=t(82684),c=t(50724),u=t(82555),l=t(97618),a=t(70613),s=t(59696),d=t(68899),f=t(28598);function p(e,n){var t=e.children,r=e.noPadding;return(0,f.jsx)(d.HS,{noPadding:r,ref:n,children:t})}var h=o.forwardRef(p),m=t(62547),g=t(82571),b=t(35686),j=t(98464),v=t(46684),y=t(70515),x=t(53808),O=t(19183);function w(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?w(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function P(e,n){var t,r=e.addProjectBreadcrumbToCustomBreadcrumbs,p=e.after,w=e.afterHidden,P=e.afterWidth,_=e.afterWidthOverride,k=e.before,I=e.beforeWidth,C=e.breadcrumbs,S=e.children,N=e.errors,H=e.headerMenuItems,E=e.headerOffset,D=e.mainContainerHeader,A=e.navigationItems,W=e.setErrors,z=e.subheaderChildren,M=e.subheaderNoPadding,T=e.title,L=e.uuid,B=(0,O.i)().width,R="dashboard_after_width_".concat(L),V="dashboard_before_width_".concat(L),F=(0,o.useRef)(null),U=(0,o.useState)(_?P:(0,x.U2)(R,P)),Y=U[0],Q=U[1],X=(0,o.useState)(!1),G=X[0],q=X[1],J=(0,o.useState)(k?Math.max((0,x.U2)(V,I),13*y.iI):null),K=J[0],$=J[1],ee=(0,o.useState)(!1),ne=ee[0],te=ee[1],re=(0,o.useState)(null)[1],ie=b.ZP.projects.list({},{revalidateOnFocus:!1}).data,oe=null===ie||void 0===ie?void 0:ie.projects,ce={label:function(){var e;return null===oe||void 0===oe||null===(e=oe[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},ue=[];C?(r&&ue.push(ce),ue.push.apply(ue,(0,i.Z)(C))):(null===oe||void 0===oe?void 0:oe.length)>=1&&ue.push.apply(ue,[ce,{bold:!0,label:function(){return T}}]),(0,o.useEffect)((function(){null===F||void 0===F||!F.current||G||ne||null===re||void 0===re||re(F.current.getBoundingClientRect().width)}),[G,Y,ne,K,F,re,B]),(0,o.useEffect)((function(){G||(0,x.t8)(R,Y)}),[w,G,Y,R]),(0,o.useEffect)((function(){ne||(0,x.t8)(V,K)}),[ne,K,V]);var le=(0,j.Z)(P);return(0,o.useEffect)((function(){_&&le!==P&&Q(P)}),[_,P,le]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{title:T}),(0,f.jsx)(s.Z,{breadcrumbs:ue,menuItems:H,project:null===oe||void 0===oe?void 0:oe[0],version:null===oe||void 0===oe||null===(t=oe[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{ref:n,children:[0!==(null===A||void 0===A?void 0:A.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(g.Z,{navigationItems:A,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(m.Z,{after:p,afterHeightOffset:v.Mz,afterHidden:w,afterMousedownActive:G,afterWidth:Y,before:k,beforeHeightOffset:v.Mz,beforeMousedownActive:ne,beforeWidth:d.k1+(k?K:0),headerOffset:E,hideAfterCompletely:!0,leftOffset:k?d.k1:null,mainContainerHeader:D,mainContainerRef:F,setAfterMousedownActive:q,setAfterWidth:Q,setBeforeMousedownActive:te,setBeforeWidth:$,children:[z&&(0,f.jsx)(h,{noPadding:M,children:z}),S]})})]}),N&&(0,f.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===W||void 0===W?void 0:W(null)},children:(0,f.jsx)(u.Z,Z(Z({},N),{},{onClose:function(){return null===W||void 0===W?void 0:W(null)}}))})]})}var _=o.forwardRef(P)},74395:function(e,n,t){"use strict";t.d(n,{M:function(){return c},W:function(){return o}});var r=t(38626),i=t(46684),o=34*t(70515).iI,c=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},92066:function(e,n,t){"use strict";t.d(n,{DQ:function(){return s},HY:function(){return c},SA:function(){return d},WH:function(){return o},eC:function(){return l},fF:function(){return u},tC:function(){return a}});var r=t(19452),i=t(50178),o="Workspace",c="Preferences",u="Git settings",l="Users",a="Account",s="Profile",d=function(e){var n=e.owner,t=e.roles,d=e.project_access,f=[{linkProps:{href:"/settings/workspace/preferences"},uuid:c}];(n||t===r.No.ADMIN||0!==(2&d))&&f.push({linkProps:{href:"/settings/workspace/users"},uuid:l}),(!(0,i.YB)()||t<=r.No.EDITOR)&&f.push({linkProps:{href:"/settings/workspace/sync-data"},uuid:u});var p=[{items:f,uuid:o}];return(0,i.YB)()?p.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:s}],uuid:a}]):p}},28274:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var r=t(94629),i=t(82394),o=t(12691),c=t.n(o),u=t(48670),l=t(38276),a=t(30160),s=t(38626),d=t(44897),f=t(70515),p=t(91437),h=(f.iI,s.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*f.iI,2.5*f.iI)),m=s.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,p.eR)(),1.5*f.iI,2.5*f.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||d.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||d.Z.background).codeTextarea,";\n ")})),g=t(28598),b=t(82684);function j(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var y=function(e){var n=e.isItemSelected,t=e.sections;return(0,g.jsx)(l.Z,{py:f.Gg,children:null===t||void 0===t?void 0:t.map((function(e){var t=e.items,r=e.title,i=e.uuid;return(0,g.jsxs)(l.Z,{children:[(0,g.jsx)(h,{children:(0,g.jsx)(a.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:r?r():i})}),null===t||void 0===t?void 0:t.map((function(e){var t=e.label,r=e.linkProps,o=e.onClick,l=e.uuid,a=t?t():l,s=(0,g.jsx)(m,{selected:null===n||void 0===n?void 0:n(v(v({},e),{},{uuidWorkspace:i})),children:a});return r?(0,b.createElement)(c(),v(v({},r),{},{key:l,passHref:!0}),(0,g.jsx)(u.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:s})):(0,g.jsx)(u.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:o,preventDefault:!0,sameColorAsText:!0,children:s},l)}))]},i)}))})},x=t(74395),O=t(92066),w=t(50178);var Z=function(e){var n=e.after,t=e.afterHidden,i=e.children,o=e.uuidItemSelected,c=e.uuidWorkspaceSelected,u=(0,w.PR)()||{};return(0,g.jsx)(r.Z,{after:n,afterHidden:!n||t,afterWidth:n?50*f.iI:0,afterWidthOverride:!0,before:(0,g.jsx)(x.M,{children:(0,g.jsx)(y,{isItemSelected:function(e){var n=e.uuid,t=e.uuidWorkspace;return c===t&&o===n},sections:(0,O.SA)(u)})}),beforeWidth:x.W,title:"Settings",uuid:"settings/index",children:i})}},55729:function(e,n,t){"use strict";t.d(n,{Z:function(){return D}});var r=t(82394),i=t(75582),o=t(82684),c=t(69864),u=t(71180),l=t(15338),a=t(97618),s=t(55485),d=t(85854),f=t(48670),p=t(65956),h=t(82359),m=t(38276),g=t(30160),b=t(17488),j=t(69650),v=t(12468),y=t(35686),x=t(38626),O=t(44897),w=t(42631),Z=t(70515),P=x.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],w.n_,Z.cd*Z.iI,(function(e){return"\n background-color: ".concat((e.theme.background||O.Z.background).codeArea,";\n ")})),_=t(72473),k=t(72191),I=t(72619),C=t(70320),S=t(23780),N=t(28598);function H(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var D=function(e){var n=e.cancelButtonText,t=e.contained,x=e.header,O=e.onCancel,w=e.onSaveSuccess,H=(0,S.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),D=(0,i.Z)(H,1)[0],A=(0,o.useState)(null),W=A[0],z=A[1],M=(0,o.useState)(!1),T=M[0],L=M[1],B=y.ZP.projects.list(),R=B.data,V=B.mutate,F=(0,o.useMemo)((function(){var e;return null===R||void 0===R||null===(e=R.projects)||void 0===e?void 0:e[0]}),[R]),U=F||{},Y=U.name,Q=U.openai_api_key,X=U.project_uuid,G=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){W||z(F)}),[F,W]);var q=(0,c.Db)(y.ZP.projects.useUpdate(Y),{onSuccess:function(e){return(0,I.wD)(e,{callback:function(e){var n,t=e.project;V(),z(t),L(!1),(0,C.h)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[h.d.LOCAL_TIMEZONE]),w&&(null===w||void 0===w||w(t))},onErrorCallback:function(e,n){return D({errors:n,response:e})}})}}),J=(0,i.Z)(q,2),K=J[0],$=J[1].isLoading,ee=(0,o.useCallback)((function(e){return K({project:e})}),[K]),ne=(0,N.jsxs)(N.Fragment,{children:[x,(0,N.jsxs)(p.Z,{noPadding:!0,children:[(0,N.jsxs)(m.Z,{p:Z.cd,children:[(0,N.jsx)(m.Z,{mb:1,children:(0,N.jsx)(d.Z,{level:5,children:"Project name"})}),(0,N.jsx)(g.ZP,{default:!0,monospace:!0,children:Y})]}),(0,N.jsx)(l.Z,{light:!0}),(0,N.jsxs)(m.Z,{p:Z.cd,children:[(0,N.jsx)(m.Z,{mb:1,children:(0,N.jsx)(d.Z,{level:5,children:"Project UUID"})}),(0,N.jsx)(g.ZP,{default:!!X,monospace:!0,muted:!X,children:X||"Not required"})]}),(0,N.jsx)(l.Z,{light:!0}),(0,N.jsx)(m.Z,{p:Z.cd,children:(0,N.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,N.jsxs)(a.Z,{flexDirection:"column",children:[(0,N.jsx)(m.Z,{mb:1,children:(0,N.jsx)(d.Z,{level:5,children:"Help improve Mage"})}),(0,N.jsxs)(g.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,N.jsx)(f.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,N.jsx)(m.Z,{mr:Z.cd}),(0,N.jsx)(j.Z,{compact:!0,checked:null===W||void 0===W?void 0:W.help_improve_mage,onCheck:function(){return z((function(e){return E(E({},e),{},{help_improve_mage:!(null!==W&&void 0!==W&&W.help_improve_mage)})}))}})]})})]}),(0,N.jsx)(m.Z,{mt:Z.HN}),(0,N.jsx)(p.Z,{noPadding:!0,overflowVisible:!0,children:(0,N.jsxs)(m.Z,{p:Z.cd,children:[(0,N.jsx)(m.Z,{mb:1,children:(0,N.jsx)(d.Z,{level:5,children:"Features"})}),Object.entries((null===W||void 0===W?void 0:W.features)||{}).map((function(e,n){var t=(0,i.Z)(e,2),o=t[0],c=t[1];return(0,N.jsx)(m.Z,{mt:0===n?0:"4px",children:(0,N.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,N.jsxs)(a.Z,{children:[(0,N.jsx)(g.ZP,{default:!0,monospace:!0,children:o}),o===h.d.LOCAL_TIMEZONE&&(0,N.jsx)(m.Z,{ml:1,children:(0,N.jsx)(v.Z,{block:!0,description:"Display dates in local timezone. Please note that certain pages (e.g. Monitor page) or components (e.g. Pipeline run bar charts) may still be in UTC time. Dates in local time will have a timezone offset in the timestamp (e.g. -07:00).",lightBackground:!0,muted:!0,size:k._k})})]}),(0,N.jsx)(m.Z,{mr:Z.cd}),(0,N.jsx)(j.Z,{checked:!!c,onCheck:function(){return z((function(e){return E(E({},e),{},{features:E(E({},null===W||void 0===W?void 0:W.features),{},(0,r.Z)({},o,!c))})}))}})]})},o)}))]})}),(0,N.jsx)(m.Z,{mt:Z.HN}),(0,N.jsx)(p.Z,{noPadding:!0,children:(0,N.jsxs)(m.Z,{p:Z.cd,children:[(0,N.jsx)(m.Z,{mb:1,children:(0,N.jsx)(d.Z,{level:5,children:"OpenAI"})}),Q&&!T?(0,N.jsxs)(s.ZP,E(E({},s.A0),{},{children:[(0,N.jsx)(g.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,N.jsx)(u.Z,{iconOnly:!0,onClick:function(){return L(!0)},secondary:!0,title:"Edit",children:(0,N.jsx)(_.I8,{size:k.bL})})]})):(0,N.jsx)(b.Z,{disabled:G,label:G?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return z((function(n){return E(E({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===W||void 0===W?void 0:W.openai_api_key)||""})]})}),(0,N.jsx)(m.Z,{mt:Z.HN}),(0,N.jsxs)(s.ZP,{alignItems:"center",children:[(0,N.jsx)(u.Z,{loading:$,onClick:function(){ee({features:null===W||void 0===W?void 0:W.features,help_improve_mage:null===W||void 0===W?void 0:W.help_improve_mage,openai_api_key:null===W||void 0===W?void 0:W.openai_api_key})},primary:!0,children:"Save project settings"}),O&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(m.Z,{mr:Z.cd}),(0,N.jsx)(u.Z,{onClick:O,secondary:!0,children:n||"Cancel"})]})]})]});return t?(0,N.jsx)(P,{children:ne}):ne}},70320:function(e,n,t){"use strict";t.d(n,{h:function(){return c},q:function(){return o}});var r=t(78419),i=t(53808);function o(){return(0,i.U2)(r.am,null)||!1}function c(e){return"undefined"!==typeof e&&(0,i.t8)(r.am,e),e}},46568:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(33591)),c=t(28598),u=["children","fullHeight","gutter","style"];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 a(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,r.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}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,l=e.style,s=void 0===l?{}:l,d=(0,i.Z)(e,u),f=a({},s);return r&&(f.paddingLeft=r,f.paddingRight=f.paddingLeft),t&&(f.height="100%"),(0,c.jsx)(o.Col,a(a({},d),{},{style:f,children:n}))}},82682:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(33591),u=t(28598),l=["children","fullHeight","gutter","justifyContent","style"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,a=e.justifyContent,d=e.style,f=void 0===d?{}:d,p=(0,i.Z)(e,l),h=s({},f);return r&&(h.marginLeft=-1*r,h.marginRight=h.marginLeft),t&&(h.height="100%"),(0,u.jsx)(c.Row,s(s({},p),{},{justifyContent:a,style:h,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:r,key:n})}))}))}},82359:function(e,n,t){"use strict";var r,i;t.d(n,{d:function(){return r},k:function(){return i}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2",e.DATA_INTEGRATION_IN_BATCH_PIPELINE="data_integration_in_batch_pipeline",e.INTERACTIONS="interactions",e.LOCAL_TIMEZONE="display_local_timezone",e.OPERATION_HISTORY="operation_history"}(r||(r={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(i||(i={}))},65956:function(e,n,t){"use strict";var r=t(38626),i=t(55485),o=t(38276),c=t(30160),u=t(44897),l=t(42631),a=t(47041),s=t(70515),d=t(28598),f=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),p=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||u.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),m=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),g=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,l=e.dark,a=e.footer,s=e.fullHeight,f=void 0===s||s,b=e.fullWidth,j=void 0===b||b,v=e.header,y=e.headerHeight,x=e.headerIcon,O=e.headerPaddingVertical,w=e.headerTitle,Z=e.maxHeight,P=e.maxWidth,_=e.minWidth,k=e.noPadding,I=e.overflowVisible,C=e.subtitle,S=e.success;return(0,d.jsxs)(p,{borderless:n,dark:l,fullHeight:f,fullWidth:j,maxHeight:Z,maxWidth:P,minWidth:_,overflowVisible:I,ref:r,success:S,children:[(v||w)&&(0,d.jsxs)(h,{headerPaddingVertical:O,height:y,children:[v&&v,w&&(0,d.jsx)(i.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(i.ZP,{alignItems:"center",children:[x&&x,(0,d.jsx)(o.Z,{ml:x?1:0,children:(0,d.jsx)(c.ZP,{bold:!0,default:!0,children:w})})]})})]}),(0,d.jsxs)(m,{maxHeight:Z,noPadding:k,overflowVisible:I,ref:u,children:[C&&(0,d.jsx)(o.Z,{mb:2,children:(0,d.jsx)(c.ZP,{default:!0,children:C})}),t]}),a&&(0,d.jsx)(g,{children:a})]})}},85854:function(e,n,t){"use strict";var r,i,o,c,u,l,a,s,d=t(82394),f=t(26304),p=t(26653),h=t(38626),m=t(33591),g=t(44897),b=t(95363),j=t(61896),v=t(30160),y=t(70515),x=t(38276),O=t(28598),w=["children","condensed","inline","level","marketing","spacingBelow"];function Z(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 P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],v.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||g.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(b.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(b.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(b.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),k=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||g.Z.content).active,";\n ")})),I=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,m.media.md(r||(r=(0,p.Z)(["\n ","\n "])),j.aQ),m.media.lg(i||(i=(0,p.Z)(["\n ","\n "])),j.aQ),m.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),j.aQ)),C=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,j.MJ),S=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,m.media.xs(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.sm(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.md(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.lg(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.xl(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI)),N=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,j.BL),H=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),E=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),D=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),A=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(j.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(j.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),W=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,c=e.marketing,u=e.spacingBelow,l=(0,f.Z)(e,w);i?n=A:0===Number(o)?n=I:1===Number(o)?n=c?S:C:2===Number(o)?n=N:3===Number(o)?n=H:4===Number(o)?n=E:5===Number(o)&&(n=D);var a=(0,O.jsxs)(n,P(P({},l),{},{level:o,children:[u&&(0,O.jsx)(x.Z,{mb:r?2:3,children:t}),!u&&t]}));return i?a:(0,O.jsx)(k,{children:a})};W.defaultProps={level:3,weightStyle:6},n.Z=W},72191:function(e,n,t){"use strict";t.d(n,{_k:function(){return o},bL:function(){return i},l2:function(){return c}});var r=t(70515),i=(r.iI,2*r.iI),o=2.5*r.iI,c=3*r.iI},61316:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(38860),o=t.n(i),c=t(46568),u=t(55729),l=t(93808),a=t(82682),s=t(28274),d=t(38276),f=t(70515),p=t(92066),h=t(28598);function m(){return(0,h.jsx)(s.Z,{uuidItemSelected:p.HY,uuidWorkspaceSelected:p.WH,children:(0,h.jsx)(d.Z,{p:f.cd,children:(0,h.jsx)(a.Z,{justifyContent:"center",children:(0,h.jsx)(c.Z,{xl:8,xxl:6,children:(0,h.jsx)(u.Z,{})})})})})}m.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,l.Z)(m)},33323:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return t(61316)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},99177:function(e,n,t){"use strict";function r(e,n){return r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},r(e,n)}function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&r(e,n)}t.d(n,{Z:function(){return i}})},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[844,8013,600,9696,8264,9774,2888,179],(function(){return n=33323,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2403],{94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var r=t(82394),i=t(21831),o=t(82684),c=t(50724),s=t(82555),l=t(97618),u=t(70613),a=t(59696),d=t(68899),f=t(28598);function p(e,n){var t=e.children,r=e.noPadding;return(0,f.jsx)(d.HS,{noPadding:r,ref:n,children:t})}var h=o.forwardRef(p),m=t(62547),y=t(82571),b=t(35686),v=t(98464),g=t(46684),j=t(70515),x=t(53808),Z=t(19183);function w(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function _(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function O(e,n){var t,r=e.addProjectBreadcrumbToCustomBreadcrumbs,p=e.after,w=e.afterHidden,O=e.afterWidth,P=e.afterWidthOverride,k=e.before,S=e.beforeWidth,C=e.breadcrumbs,I=e.children,H=e.errors,N=e.headerMenuItems,T=e.headerOffset,M=e.mainContainerHeader,D=e.navigationItems,A=e.setErrors,E=e.subheaderChildren,z=e.subheaderNoPadding,W=e.title,q=e.uuid,R=(0,Z.i)().width,B="dashboard_after_width_".concat(q),G="dashboard_before_width_".concat(q),F=(0,o.useRef)(null),U=(0,o.useState)(P?O:(0,x.U2)(B,O)),L=U[0],Y=U[1],Q=(0,o.useState)(!1),X=Q[0],J=Q[1],K=(0,o.useState)(k?Math.max((0,x.U2)(G,S),13*j.iI):null),V=K[0],$=K[1],ee=(0,o.useState)(!1),ne=ee[0],te=ee[1],re=(0,o.useState)(null)[1],ie=b.ZP.projects.list({},{revalidateOnFocus:!1}).data,oe=null===ie||void 0===ie?void 0:ie.projects,ce={label:function(){var e;return null===oe||void 0===oe||null===(e=oe[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},se=[];C?(r&&se.push(ce),se.push.apply(se,(0,i.Z)(C))):(null===oe||void 0===oe?void 0:oe.length)>=1&&se.push.apply(se,[ce,{bold:!0,label:function(){return W}}]),(0,o.useEffect)((function(){null===F||void 0===F||!F.current||X||ne||null===re||void 0===re||re(F.current.getBoundingClientRect().width)}),[X,L,ne,V,F,re,R]),(0,o.useEffect)((function(){X||(0,x.t8)(B,L)}),[w,X,L,B]),(0,o.useEffect)((function(){ne||(0,x.t8)(G,V)}),[ne,V,G]);var le=(0,v.Z)(O);return(0,o.useEffect)((function(){P&&le!==O&&Y(O)}),[P,O,le]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Z,{title:W}),(0,f.jsx)(a.Z,{breadcrumbs:se,menuItems:N,project:null===oe||void 0===oe?void 0:oe[0],version:null===oe||void 0===oe||null===(t=oe[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{ref:n,children:[0!==(null===D||void 0===D?void 0:D.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(y.Z,{navigationItems:D,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(m.Z,{after:p,afterHeightOffset:g.Mz,afterHidden:w,afterMousedownActive:X,afterWidth:L,before:k,beforeHeightOffset:g.Mz,beforeMousedownActive:ne,beforeWidth:d.k1+(k?V:0),headerOffset:T,hideAfterCompletely:!0,leftOffset:k?d.k1:null,mainContainerHeader:M,mainContainerRef:F,setAfterMousedownActive:J,setAfterWidth:Y,setBeforeMousedownActive:te,setBeforeWidth:$,children:[E&&(0,f.jsx)(h,{noPadding:z,children:E}),I]})})]}),H&&(0,f.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===A||void 0===A?void 0:A(null)},children:(0,f.jsx)(s.Z,_(_({},H),{},{onClose:function(){return null===A||void 0===A?void 0:A(null)}}))})]})}var P=o.forwardRef(O)},74395:function(e,n,t){"use strict";t.d(n,{M:function(){return c},W:function(){return o}});var r=t(38626),i=t(46684),o=34*t(70515).iI,c=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},92066:function(e,n,t){"use strict";t.d(n,{DQ:function(){return a},HY:function(){return c},SA:function(){return d},WH:function(){return o},eC:function(){return l},fF:function(){return s},tC:function(){return u}});var r=t(19452),i=t(50178),o="Workspace",c="Preferences",s="Git settings",l="Users",u="Account",a="Profile",d=function(e){var n=e.owner,t=e.roles,d=e.project_access,f=[{linkProps:{href:"/settings/workspace/preferences"},uuid:c}];(n||t===r.No.ADMIN||0!==(2&d))&&f.push({linkProps:{href:"/settings/workspace/users"},uuid:l}),(!(0,i.YB)()||t<=r.No.EDITOR)&&f.push({linkProps:{href:"/settings/workspace/sync-data"},uuid:s});var p=[{items:f,uuid:o}];return(0,i.YB)()?p.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:a}],uuid:u}]):p}},28274:function(e,n,t){"use strict";t.d(n,{Z:function(){return _}});var r=t(94629),i=t(82394),o=t(12691),c=t.n(o),s=t(48670),l=t(38276),u=t(30160),a=t(38626),d=t(44897),f=t(70515),p=t(91437),h=(f.iI,a.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*f.iI,2.5*f.iI)),m=a.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,p.eR)(),1.5*f.iI,2.5*f.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||d.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||d.Z.background).codeTextarea,";\n ")})),y=t(28598),b=t(82684);function v(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 g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j=function(e){var n=e.isItemSelected,t=e.sections;return(0,y.jsx)(l.Z,{py:f.Gg,children:null===t||void 0===t?void 0:t.map((function(e){var t=e.items,r=e.title,i=e.uuid;return(0,y.jsxs)(l.Z,{children:[(0,y.jsx)(h,{children:(0,y.jsx)(u.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:r?r():i})}),null===t||void 0===t?void 0:t.map((function(e){var t=e.label,r=e.linkProps,o=e.onClick,l=e.uuid,u=t?t():l,a=(0,y.jsx)(m,{selected:null===n||void 0===n?void 0:n(g(g({},e),{},{uuidWorkspace:i})),children:u});return r?(0,b.createElement)(c(),g(g({},r),{},{key:l,passHref:!0}),(0,y.jsx)(s.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:a})):(0,y.jsx)(s.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:o,preventDefault:!0,sameColorAsText:!0,children:a},l)}))]},i)}))})},x=t(74395),Z=t(92066),w=t(50178);var _=function(e){var n=e.after,t=e.afterHidden,i=e.children,o=e.uuidItemSelected,c=e.uuidWorkspaceSelected,s=(0,w.PR)()||{};return(0,y.jsx)(r.Z,{after:n,afterHidden:!n||t,afterWidth:n?50*f.iI:0,afterWidthOverride:!0,before:(0,y.jsx)(x.M,{children:(0,y.jsx)(j,{isItemSelected:function(e){var n=e.uuid,t=e.uuidWorkspace;return c===t&&o===n},sections:(0,Z.SA)(s)})}),beforeWidth:x.W,title:"Settings",uuid:"settings/index",children:i})}},85854:function(e,n,t){"use strict";var r,i,o,c,s,l,u,a,d=t(82394),f=t(26304),p=t(26653),h=t(38626),m=t(33591),y=t(44897),b=t(95363),v=t(61896),g=t(30160),j=t(70515),x=t(38276),Z=t(28598),w=["children","condensed","inline","level","marketing","spacingBelow"];function _(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var P=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],g.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||y.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(b.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(b.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(b.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),k=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||y.Z.content).active,";\n ")})),S=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],P,m.media.md(r||(r=(0,p.Z)(["\n ","\n "])),v.aQ),m.media.lg(i||(i=(0,p.Z)(["\n ","\n "])),v.aQ),m.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),v.aQ)),C=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],P,v.MJ),I=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],P,m.media.xs(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),m.media.sm(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),m.media.md(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),m.media.lg(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),m.media.xl(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI)),H=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],P,v.BL),N=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],P),T=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],P),M=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],P),D=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],P,(function(e){return 1===e.level&&"\n ".concat(v.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(v.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),A=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,c=e.marketing,s=e.spacingBelow,l=(0,f.Z)(e,w);i?n=D:0===Number(o)?n=S:1===Number(o)?n=c?I:C:2===Number(o)?n=H:3===Number(o)?n=N:4===Number(o)?n=T:5===Number(o)&&(n=M);var u=(0,Z.jsxs)(n,O(O({},l),{},{level:o,children:[s&&(0,Z.jsx)(x.Z,{mb:r?2:3,children:t}),!s&&t]}));return i?u:(0,Z.jsx)(k,{children:u})};A.defaultProps={level:3,weightStyle:6},n.Z=A},60480:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return E}});var r,i=t(77837),o=t(82394),c=t(75582),s=t(38860),l=t.n(s),u=t(82684),a=t(12691),d=t.n(a),f=t(21764),p=t(69864),h=t(71180),m=t(70652),y=t(55485),b=t(85854),v=t(48670),g=t(93808),j=t(44085),x=t(28274),Z=t(38276);!function(e){e.SSH="ssh",e.HTTPS="https"}(r||(r={}));var w=[{autoComplete:"remote_repo_link",label:"Remote repo url",required:!0,uuid:"remote_repo_link"},{autoComplete:"repo_path",label:"Local directory path",labelDescription:"Defaults to Python's os.getcwd() if omitted. Mage will create this local directory if it doesn't already exist.",uuid:"repo_path"}],_=[{autoComplete:"username",label:"Username",uuid:"username"},{autoComplete:"email",label:"Email",uuid:"email"},{autoComplete:"ssh_public_key",label:"SSH public key in base64",type:"password",uuid:"ssh_public_key"},{autoComplete:"ssh_private_key",label:"SSH private key in base64",type:"password",uuid:"ssh_private_key"}],O=[{autoComplete:"username",label:"Username",required:!0,uuid:"username"},{autoComplete:"email",label:"Email",required:!0,uuid:"email"},{autoComplete:"access_token",label:"Access token",labelDescription:"Add your Git access token to authenticate with your provided username. The access token will be stored as a Mage secret.",required:!0,type:"password",uuid:"access_token"}],P=[{autoComplete:"branch",label:"Branch name",required:!0,uuid:"branch"}],k=t(30160),S=t(17488),C=t(35686),I=t(70515),H=t(92066),N=t(72619),T=t(28598);function M(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function D(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?M(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):M(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function A(){var e=C.ZP.syncs.list().data,n=(0,u.useState)(null),t=n[0],i=n[1],s=(0,u.useState)(null),l=s[0],a=s[1],g=(0,u.useState)(null),M=g[0],A=g[1],E=(0,u.useState)(null),z=E[0],W=E[1];(0,u.useEffect)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];a(null===t||void 0===t?void 0:t.user_git_settings),i(t),W(!(null===t||void 0===t||!t.branch))}}),[e]);var q=(0,u.useMemo)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];return!(null===t||void 0===t||!t.branch)}return!1}),[e]),R=(0,p.Db)(C.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(e){var n=e.sync;n&&(i(n),window.location.reload(),f.Am.success("Sync saved",{position:f.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"}))},onErrorCallback:function(e){var n=e.error.exception;return A(n)}})}}),B=(0,c.Z)(R,2),G=B[0],F=B[1].isLoading,U=(0,p.Db)(C.ZP.syncs.useUpdate("git"),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(e){e.sync&&f.Am.success("Success!",{position:f.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"})},onErrorCallback:function(e){var n=e.error.exception;return A(n)}})}}),L=(0,c.Z)(U,2),Y=L[0],Q=L[1].isLoading,X=(0,u.useMemo)((function(){return(null===t||void 0===t?void 0:t.auth_type)||r.SSH}),[null===t||void 0===t?void 0:t.auth_type]),J=(0,u.useMemo)((function(){return X===r.HTTPS?O:_}),[X]),K=C.ZP.statuses.list().data,V=(0,u.useMemo)((function(){var e,n;return null===K||void 0===K||null===(e=K.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.require_user_authentication}),[K]),$=(0,u.useMemo)((function(){var e=i,n=t;return!z&&V&&(e=a,n=l),(0,T.jsx)("form",{children:J.map((function(t){var r,i,c=t.autoComplete,s=t.disabled,l=t.label,u=t.labelDescription,a=t.required,d=t.type,p=t.uuid;return i="ssh_public_key"===p?(0,T.jsx)(Z.Z,{mb:1,children:(0,T.jsxs)(k.ZP,{small:!0,children:["Run ",(0,T.jsx)(v.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n | echo"),f.Am.success("Successfully copied to clipboard.",{position:f.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n | echo"})," in terminal to get base64 encoded public key and paste the result here. The key will be stored as a Mage secret."]})}):"ssh_private_key"===p?(0,T.jsx)(Z.Z,{mb:1,children:(0,T.jsxs)(k.ZP,{small:!0,children:["Follow same steps as the public key, but run ",(0,T.jsx)(v.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"),f.Am.success("Successfully copied to clipboard.",{position:f.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"})," instead. The key will be stored as a Mage secret."]})}):u&&(0,T.jsx)(Z.Z,{mb:1,children:(0,T.jsx)(k.ZP,{small:!0,children:u})}),(0,T.jsxs)(Z.Z,{mt:2,children:[i,(0,T.jsx)(S.Z,{autoComplete:c,disabled:s,label:l,onChange:function(n){e((function(e){return D(D({},e),{},(0,o.Z)({},p,n.target.value))}))},primary:!0,required:a,setContentOnMount:!0,type:d,value:(null===(r=n)||void 0===r?void 0:r[p])||""})]},p)}))})}),[J,V,a,i,z,t,l]);return(0,T.jsx)(x.Z,{uuidItemSelected:H.fF,uuidWorkspaceSelected:H.WH,children:(0,T.jsxs)(Z.Z,{p:I.cd,style:{width:"600px"},children:[(0,T.jsx)(b.Z,{children:"Git repository settings"}),(0,T.jsxs)(k.ZP,{children:["If you are using Github and want to use a more feature rich integration, you can check out the ",(0,T.jsx)(d(),{as:"/version-control",href:"/version-control",children:(0,T.jsx)(v.Z,{inline:!0,children:"version control app"})}),"."]}),(0,T.jsx)(v.Z,{}),(0,T.jsx)(Z.Z,{mt:1,children:(0,T.jsx)(k.ZP,{bold:!0,children:"Authentication type"})}),(0,T.jsx)(Z.Z,{mt:1,children:(0,T.jsx)(j.Z,{compact:!0,label:"Authentication type",onChange:function(e){var n=e.target.value;i((function(e){return D(D({},e),{},{auth_type:n})}))},value:X,children:Object.entries(r).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return(0,T.jsx)("option",{value:r,children:t},r)}))})}),(0,T.jsx)(Z.Z,{mt:I.Mq,children:X===r.SSH&&(0,T.jsxs)(k.ZP,{bold:!0,children:["You will need to ",(0,T.jsx)(v.Z,{href:"https://docs.mage.ai/development/git/generate-an-ssh-token",openNewWindow:!0,children:"set up your SSH key"})," if you have not done so already."]})}),(0,T.jsx)("form",{children:w.map((function(e){var n=e.autoComplete,r=e.disabled,c=e.label,s=e.labelDescription,l=e.required,u=e.type,a=e.uuid;return(0,T.jsxs)(Z.Z,{mt:2,children:[s&&(0,T.jsx)(Z.Z,{mb:1,children:(0,T.jsx)(k.ZP,{small:!0,children:s})}),(0,T.jsx)(S.Z,{autoComplete:n,disabled:r,label:c,onChange:function(e){i((function(n){return D(D({},n),{},(0,o.Z)({},a,e.target.value))}))},primary:!0,required:l,setContentOnMount:!0,type:u,value:(null===t||void 0===t?void 0:t[a])||""})]},a)}))}),(0,T.jsx)(Z.Z,{mt:I.Mq,children:(0,T.jsxs)(y.ZP,{alignItems:"center",children:[(0,T.jsx)(Z.Z,{mr:1,children:(0,T.jsx)(m.Z,{checked:!!z,onClick:function(){return W((function(e){var n=!e;return n||i((function(e){return D(D({},e),{},{branch:null,sync_on_pipeline_run:!1,sync_on_start:!1})})),n}))}})}),(0,T.jsxs)(k.ZP,{bold:!0,children:["Use ",(0,T.jsx)(v.Z,{bold:!0,href:"https://docs.mage.ai/production/data-sync/git-sync",openNewWindow:!0,children:"One-way git sync"})," (Click link for more info)"]})]})}),z?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Z.Z,{mt:I.Mq,children:(0,T.jsx)(k.ZP,{bold:!0,children:"Sync with a specified branch. These settings will be saved at the project level."})}),(0,T.jsx)("form",{children:P.map((function(e){var n=e.autoComplete,r=e.disabled,c=e.label,s=e.required,l=e.type,u=e.uuid;return(0,T.jsx)(Z.Z,{mt:2,children:(0,T.jsx)(S.Z,{autoComplete:n,disabled:r,label:c,onChange:function(e){i((function(n){return D(D({},n),{},(0,o.Z)({},u,e.target.value))}))},primary:!0,required:s,setContentOnMount:!0,type:l,value:(null===t||void 0===t?void 0:t[u])||""})},u)}))}),(0,T.jsx)(y.ZP,{alignItems:"center",children:(0,T.jsx)(Z.Z,{mt:2,children:(0,T.jsx)(m.Z,{checked:null===t||void 0===t?void 0:t.sync_submodules,label:"Include submodules",onClick:function(){i((function(e){return D(D({},e),{},{sync_submodules:!(null!==t&&void 0!==t&&t.sync_submodules)})}))}})})}),(0,T.jsx)(Z.Z,{mt:2,children:(0,T.jsx)(b.Z,{level:5,children:"Additional sync settings"})}),(0,T.jsx)(y.ZP,{alignItems:"center",children:(0,T.jsx)(Z.Z,{mt:2,children:(0,T.jsx)(m.Z,{checked:null===t||void 0===t?void 0:t.sync_on_pipeline_run,label:"Sync before each trigger run",onClick:function(){i((function(e){return D(D({},e),{},{sync_on_pipeline_run:!(null!==t&&void 0!==t&&t.sync_on_pipeline_run)})}))}})})}),(0,T.jsx)(y.ZP,{alignItems:"center",children:(0,T.jsx)(Z.Z,{mt:2,children:(0,T.jsx)(m.Z,{checked:null===t||void 0===t?void 0:t.sync_on_start,label:"Sync on server start up",onClick:function(){i((function(e){return D(D({},e),{},{sync_on_start:!(null!==t&&void 0!==t&&t.sync_on_start)})}))}})})}),(0,T.jsx)(Z.Z,{mt:I.Mq,children:(0,T.jsx)(k.ZP,{bold:!0,children:"Configure the Git authentication credentials that will be used to sync with the specified Git repository."})}),$]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Z.Z,{mt:I.Mq,children:(0,T.jsx)(k.ZP,{bold:!0,children:"These fields are required to help Mage configure your Git settings. These settings will be specific to your user."})}),$]}),(0,T.jsx)(Z.Z,{mt:2,children:(0,T.jsx)(h.Z,{loading:F,onClick:function(){return G({sync:D(D({},t),{},{user_git_settings:l})})},primary:!0,children:"Save repository settings"})}),M&&(0,T.jsx)(Z.Z,{mt:1,children:(0,T.jsx)(k.ZP,{danger:!0,children:M})}),q&&(0,T.jsxs)(Z.Z,{mt:I.HN,children:[(0,T.jsx)(b.Z,{children:"Synchronize code from remote repository"}),(0,T.jsxs)(Z.Z,{mt:1,children:[(0,T.jsxs)(k.ZP,{children:["Running the sync from this page will run a one time sync with the remote repository.",(0,T.jsx)("br",{}),"This may ",(0,T.jsx)(k.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," your existing data, so make sure you\u2019ve committed or backed up your current changes."]}),(0,T.jsx)(Z.Z,{mt:2}),(0,T.jsxs)(k.ZP,{children:["Reset will tell Mage to try to clone your repository from remote. This will also ",(0,T.jsx)(k.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," all your local changes and reset any settings you may have configured for your local Git repo. This may be helpful if you are having issues syncing your repository."]})]}),(0,T.jsx)(Z.Z,{mt:2,children:(0,T.jsxs)(y.ZP,{children:[(0,T.jsx)(h.Z,{loading:Q,onClick:function(){return Y({sync:{action_type:"sync_data"}})},warning:!0,children:"Synchronize code"}),(0,T.jsx)(Z.Z,{ml:2}),(0,T.jsx)(h.Z,{danger:!0,loading:Q,onClick:function(){return Y({sync:{action_type:"reset"}})},children:"Reset repository"})]})})]})]})})}A.getInitialProps=(0,i.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var E=(0,g.Z)(A)},37056:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/sync-data",function(){return t(60480)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},99177:function(e,n,t){"use strict";function r(e,n){return r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},r(e,n)}function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&r(e,n)}t.d(n,{Z:function(){return i}})},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[844,8013,600,9696,8264,9774,2888,179],(function(){return n=37056,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2287],{74395:function(e,n,r){"use strict";r.d(n,{M:function(){return o},W:function(){return u}});var t=r(38626),i=r(46684),u=34*r(70515).iI,o=t.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},92066:function(e,n,r){"use strict";r.d(n,{DQ:function(){return l},HY:function(){return o},SA:function(){return a},WH:function(){return u},eC:function(){return c},fF:function(){return s},tC:function(){return d}});var t=r(19452),i=r(50178),u="Workspace",o="Preferences",s="Git settings",c="Users",d="Account",l="Profile",a=function(e){var n=e.owner,r=e.roles,a=e.project_access,f=[{linkProps:{href:"/settings/workspace/preferences"},uuid:o}];(n||r===t.No.ADMIN||0!==(2&a))&&f.push({linkProps:{href:"/settings/workspace/users"},uuid:c}),(!(0,i.YB)()||r<=t.No.EDITOR)&&f.push({linkProps:{href:"/settings/workspace/sync-data"},uuid:s});var p=[{items:f,uuid:u}];return(0,i.YB)()?p.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:l}],uuid:d}]):p}},28274:function(e,n,r){"use strict";r.d(n,{Z:function(){return x}});var t=r(94629),i=r(82394),u=r(12691),o=r.n(u),s=r(48670),c=r(38276),d=r(30160),l=r(38626),a=r(44897),f=r(70515),p=r(91437),v=(f.iI,l.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*f.iI,2.5*f.iI)),h=l.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,p.eR)(),1.5*f.iI,2.5*f.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||a.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||a.Z.background).codeTextarea,";\n ")})),_=r(28598),m=r(82684);function j(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 b(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?j(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var w=function(e){var n=e.isItemSelected,r=e.sections;return(0,_.jsx)(c.Z,{py:f.Gg,children:null===r||void 0===r?void 0:r.map((function(e){var r=e.items,t=e.title,i=e.uuid;return(0,_.jsxs)(c.Z,{children:[(0,_.jsx)(v,{children:(0,_.jsx)(d.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:t?t():i})}),null===r||void 0===r?void 0:r.map((function(e){var r=e.label,t=e.linkProps,u=e.onClick,c=e.uuid,d=r?r():c,l=(0,_.jsx)(h,{selected:null===n||void 0===n?void 0:n(b(b({},e),{},{uuidWorkspace:i})),children:d});return t?(0,m.createElement)(o(),b(b({},t),{},{key:c,passHref:!0}),(0,_.jsx)(s.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:l})):(0,_.jsx)(s.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:u,preventDefault:!0,sameColorAsText:!0,children:l},c)}))]},i)}))})},O=r(74395),y=r(92066),g=r(50178);var x=function(e){var n=e.after,r=e.afterHidden,i=e.children,u=e.uuidItemSelected,o=e.uuidWorkspaceSelected,s=(0,g.PR)()||{};return(0,_.jsx)(t.Z,{after:n,afterHidden:!n||r,afterWidth:n?50*f.iI:0,afterWidthOverride:!0,before:(0,_.jsx)(O.M,{children:(0,_.jsx)(w,{isItemSelected:function(e){var n=e.uuid,r=e.uuidWorkspace;return o===r&&u===n},sections:(0,y.SA)(s)})}),beforeWidth:O.W,title:"Settings",uuid:"settings/index",children:i})}},87992:function(e,n,r){"use strict";r.r(n);var t=r(77837),i=r(82394),u=r(38860),o=r.n(u),s=r(82684),c=r(34376),d=r(71180),l=r(85854),a=r(93808),f=r(28274),p=r(38276),v=r(75499),h=r(30160),_=r(36043),m=r(35686),j=r(98464),b=r(72473),w=r(70515),O=r(92066),y=r(14875),g=r(50178),x=r(15610),k=r(42122),P=r(69419),Z=r(28598);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 I(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}function C(){var e=(0,c.useRouter)(),n=(0,g.PR)()||{},r=n.id,t=n.owner,i=(0,s.useState)(null),u=i[0],o=i[1],a=m.ZP.users.list({},{revalidateOnFocus:!1}),S=a.data,C=a.mutate,D=(0,s.useMemo)((function(){return(null===S||void 0===S?void 0:S.users)||[]}),[null===S||void 0===S?void 0:S.users]),E=m.ZP.users.detail(null===u||void 0===u?void 0:u.user_id,{},{revalidateOnFocus:!1}),W=E.data,N=E.mutate,A=null===W||void 0===W?void 0:W.user,H=(0,P.iV)(),R=(0,j.Z)(H);(0,s.useEffect)((function(){var e=H.add_new_user,n=H.user_id;if(!(0,k.Xy)(H,R)){var r=I(I({},R),H);n?r.user_id=n:delete r.user_id,e?r.add_new_user=e:delete r.add_new_user,o(r)}}),[H,R]);var T=null===u||void 0===u?void 0:u.add_new_user,M=(0,s.useMemo)((function(){return T?(0,Z.jsx)(p.Z,{p:w.cd,children:(0,Z.jsx)(_.Z,{newUser:!0,onSaveSuccess:function(){(0,x.u7)({add_new_user:null,user_id:null}),C()},title:"Add new user",user:{}})}):A?(0,Z.jsx)(p.Z,{p:w.cd,children:(0,Z.jsx)(_.Z,{hideFields:[y.s7],onDeleteSuccess:function(){(0,x.u7)({add_new_user:null,user_id:null}),C()},onSaveSuccess:function(){(0,x.u7)({add_new_user:null,user_id:null}),N(),C()},showDelete:!0,title:"Edit user",user:A})}):null}),[N,C,T,A]);return(0,Z.jsxs)(f.Z,{after:M,afterHidden:!A&&!T,uuidItemSelected:O.eC,uuidWorkspaceSelected:O.WH,children:[t&&(0,Z.jsx)(p.Z,{p:w.cd,children:(0,Z.jsx)(d.Z,{beforeIcon:(0,Z.jsx)(b.mm,{}),onClick:function(){return(0,x.u7)({add_new_user:1,user_id:null})},primary:!0,children:"Add new user"})}),(0,Z.jsx)(p.Z,{p:w.cd,children:(0,Z.jsx)(l.Z,{children:"Users"})}),(0,Z.jsx)(v.Z,{columnFlex:[1,1,1],columns:[{uuid:"Username"},{uuid:"Email"},{uuid:"Role"}],isSelectedRow:function(e){var n;return(null===(n=D[e])||void 0===n?void 0:n.id)===(null===A||void 0===A?void 0:A.id)},onClickRow:function(n){var t,i=null===(t=D[n])||void 0===t?void 0:t.id;i===r?e.push("/settings/account/profile"):+(null===u||void 0===u?void 0:u.user_id)===i?(0,x.u7)({user_id:null}):(0,x.u7)({add_new_user:null,user_id:i})},rows:D.map((function(e){var n=e.email,r=e.roles_display,t=e.roles_new,i=e.username,u=t||[];return u.sort((function(e,n){return e.id-n.id})),[(0,Z.jsx)(h.ZP,{bold:!0,children:i},"username"),(0,Z.jsx)(h.ZP,{default:!0,children:n},"email"),(0,Z.jsx)(h.ZP,{default:!0,children:u.length>0?u[0].name:r},"roles")]})),uuid:"pipeline-runs"})]})}C.getInitialProps=(0,t.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,a.Z)(C)},48673:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/users",function(){return r(87992)}])}},function(e){e.O(0,[844,2083,8013,600,9696,8264,4666,5499,5597,9774,2888,179],(function(){return n=48673,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6568],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return P}});var n=r(82394),o=r(21831),i=r(82684),u=r(50724),s=r(82555),l=r(97618),a=r(70613),c=r(59696),d=r(68899),f=r(28598);function p(e,t){var r=e.children,n=e.noPadding;return(0,f.jsx)(d.HS,{noPadding:n,ref:t,children:r})}var h=i.forwardRef(p),v=r(62547),b=r(82571),j=r(35686),m=r(98464),O=r(46684),g=r(70515),w=r(53808),_=r(19183);function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Z(e,t){var r,n=e.addProjectBreadcrumbToCustomBreadcrumbs,p=e.after,x=e.afterHidden,Z=e.afterWidth,P=e.afterWidthOverride,C=e.before,k=e.beforeWidth,E=e.breadcrumbs,M=e.children,S=e.errors,R=e.headerMenuItems,T=e.headerOffset,A=e.mainContainerHeader,B=e.navigationItems,H=e.setErrors,I=e.subheaderChildren,N=e.subheaderNoPadding,W=e.title,D=e.uuid,F=(0,_.i)().width,U="dashboard_after_width_".concat(D),z="dashboard_before_width_".concat(D),X=(0,i.useRef)(null),q=(0,i.useState)(P?Z:(0,w.U2)(U,Z)),V=q[0],G=q[1],J=(0,i.useState)(!1),K=J[0],L=J[1],Q=(0,i.useState)(C?Math.max((0,w.U2)(z,k),13*g.iI):null),Y=Q[0],$=Q[1],ee=(0,i.useState)(!1),te=ee[0],re=ee[1],ne=(0,i.useState)(null)[1],oe=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,ie=null===oe||void 0===oe?void 0:oe.projects,ue={label:function(){var e;return null===ie||void 0===ie||null===(e=ie[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},se=[];E?(n&&se.push(ue),se.push.apply(se,(0,o.Z)(E))):(null===ie||void 0===ie?void 0:ie.length)>=1&&se.push.apply(se,[ue,{bold:!0,label:function(){return W}}]),(0,i.useEffect)((function(){null===X||void 0===X||!X.current||K||te||null===ne||void 0===ne||ne(X.current.getBoundingClientRect().width)}),[K,V,te,Y,X,ne,F]),(0,i.useEffect)((function(){K||(0,w.t8)(U,V)}),[x,K,V,U]),(0,i.useEffect)((function(){te||(0,w.t8)(z,Y)}),[te,Y,z]);var le=(0,m.Z)(Z);return(0,i.useEffect)((function(){P&&le!==Z&&G(Z)}),[P,Z,le]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{title:W}),(0,f.jsx)(c.Z,{breadcrumbs:se,menuItems:R,project:null===ie||void 0===ie?void 0:ie[0],version:null===ie||void 0===ie||null===(r=ie[0])||void 0===r?void 0:r.version}),(0,f.jsxs)(d.Nk,{ref:t,children:[0!==(null===B||void 0===B?void 0:B.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:B,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(v.Z,{after:p,afterHeightOffset:O.Mz,afterHidden:x,afterMousedownActive:K,afterWidth:V,before:C,beforeHeightOffset:O.Mz,beforeMousedownActive:te,beforeWidth:d.k1+(C?Y:0),headerOffset:T,hideAfterCompletely:!0,leftOffset:C?d.k1:null,mainContainerHeader:A,mainContainerRef:X,setAfterMousedownActive:L,setAfterWidth:G,setBeforeMousedownActive:re,setBeforeWidth:$,children:[I&&(0,f.jsx)(h,{noPadding:N,children:I}),M]})})]}),S&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===H||void 0===H?void 0:H(null)},children:(0,f.jsx)(s.Z,y(y({},S),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}var P=i.forwardRef(Z)},14759:function(e,t,r){"use strict";r.r(t);var n=r(77837),o=r(38860),i=r.n(o),u=r(82684),s=r(44898),l=r(94629),a=r(88328),c=r(93808),d=r(38276),f=r(4190),p=r(5755),h=r(35686),v=r(70515),b=r(69419),j=r(28598);function m(e){var t,r=e.objectType,n=e.slug,o=(0,b.iV)().object_type,i=(0,u.useState)(null),c=i[0],m=i[1],O=o||r||s.Z,g=s.R===O,w=h.ZP.custom_templates.detail(n&&encodeURIComponent(n),{object_type:O}).data;return(0,u.useEffect)((function(){w&&m(null===w||void 0===w?void 0:w.custom_template)}),[w]),(0,j.jsxs)(l.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Templates"},linkProps:{href:g?"/templates?object_type=".concat(s.R):"/templates"}},{bold:!0,label:function(){return n}}],title:n,uuid:"TemplatesDetail/index",children:[!w&&(0,j.jsx)(d.Z,{p:v.cd,children:(0,j.jsx)(f.Z,{inverted:!0})}),c&&(0,j.jsxs)(j.Fragment,{children:[(!O||s.Z===O)&&(0,j.jsx)(p.Z,{template:c},null===c||void 0===c||null===(t=c.content)||void 0===t?void 0:t.slice(0,40)),g&&(0,j.jsx)(a.Z,{template:c})]})]})}m.getInitialProps=function(){var e=(0,n.Z)(i().mark((function e(t){var r,n,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.query,n=r.object_type,o=r.slug,e.abrupt("return",{objectType:n,slug:o});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.default=(0,c.Z)(m)},45082:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates/[...slug]",function(){return r(14759)}])}},function(e){e.O(0,[844,2083,2851,2369,341,8789,4913,6648,8013,600,9696,8264,4666,5499,4839,7055,5810,1769,3859,9264,9774,2888,179],(function(){return t=45082,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4841],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return x}});var n=r(82394),o=r(21831),i=r(82684),u=r(50724),s=r(82555),c=r(97618),f=r(70613),a=r(59696),d=r(68899),l=r(28598);function h(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(d.HS,{noPadding:n,ref:t,children:r})}var p=i.forwardRef(h),v=r(62547),b=r(82571),O=r(35686),j=r(98464),w=r(46684),m=r(70515),g=r(53808),y=r(19183);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Z(e,t){var r,n=e.addProjectBreadcrumbToCustomBreadcrumbs,h=e.after,_=e.afterHidden,Z=e.afterWidth,x=e.afterWidthOverride,E=e.before,M=e.beforeWidth,k=e.breadcrumbs,C=e.children,S=e.errors,R=e.headerMenuItems,A=e.headerOffset,H=e.mainContainerHeader,I=e.navigationItems,N=e.setErrors,W=e.subheaderChildren,D=e.subheaderNoPadding,T=e.title,B=e.uuid,z=(0,y.i)().width,F="dashboard_after_width_".concat(B),U="dashboard_before_width_".concat(B),X=(0,i.useRef)(null),q=(0,i.useState)(x?Z:(0,g.U2)(F,Z)),G=q[0],J=q[1],K=(0,i.useState)(!1),L=K[0],Q=K[1],V=(0,i.useState)(E?Math.max((0,g.U2)(U,M),13*m.iI):null),Y=V[0],$=V[1],ee=(0,i.useState)(!1),te=ee[0],re=ee[1],ne=(0,i.useState)(null)[1],oe=O.ZP.projects.list({},{revalidateOnFocus:!1}).data,ie=null===oe||void 0===oe?void 0:oe.projects,ue={label:function(){var e;return null===ie||void 0===ie||null===(e=ie[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},se=[];k?(n&&se.push(ue),se.push.apply(se,(0,o.Z)(k))):(null===ie||void 0===ie?void 0:ie.length)>=1&&se.push.apply(se,[ue,{bold:!0,label:function(){return T}}]),(0,i.useEffect)((function(){null===X||void 0===X||!X.current||L||te||null===ne||void 0===ne||ne(X.current.getBoundingClientRect().width)}),[L,G,te,Y,X,ne,z]),(0,i.useEffect)((function(){L||(0,g.t8)(F,G)}),[_,L,G,F]),(0,i.useEffect)((function(){te||(0,g.t8)(U,Y)}),[te,Y,U]);var ce=(0,j.Z)(Z);return(0,i.useEffect)((function(){x&&ce!==Z&&J(Z)}),[x,Z,ce]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f.Z,{title:T}),(0,l.jsx)(a.Z,{breadcrumbs:se,menuItems:R,project:null===ie||void 0===ie?void 0:ie[0],version:null===ie||void 0===ie||null===(r=ie[0])||void 0===r?void 0:r.version}),(0,l.jsxs)(d.Nk,{ref:t,children:[0!==(null===I||void 0===I?void 0:I.length)&&(0,l.jsx)(d.lm,{showMore:!0,children:(0,l.jsx)(b.Z,{navigationItems:I,showMore:!0})}),(0,l.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(v.Z,{after:h,afterHeightOffset:w.Mz,afterHidden:_,afterMousedownActive:L,afterWidth:G,before:E,beforeHeightOffset:w.Mz,beforeMousedownActive:te,beforeWidth:d.k1+(E?Y:0),headerOffset:A,hideAfterCompletely:!0,leftOffset:E?d.k1:null,mainContainerHeader:H,mainContainerRef:X,setAfterMousedownActive:Q,setAfterWidth:J,setBeforeMousedownActive:re,setBeforeWidth:$,children:[W&&(0,l.jsx)(p,{noPadding:D,children:W}),C]})})]}),S&&(0,l.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===N||void 0===N?void 0:N(null)},children:(0,l.jsx)(s.Z,P(P({},S),{},{onClose:function(){return null===N||void 0===N?void 0:N(null)}}))})]})}var x=i.forwardRef(Z)},74805:function(e,t,r){"use strict";r.r(t);var n=r(77837),o=r(38860),i=r.n(o),u=(r(82684),r(56085)),s=r(94629),c=r(93808),f=r(28026),a=r(4383),d=r(50178),l=r(28598);function h(){var e=(0,d.PR)()||{},t=(0,u.ZP)((0,a.Ib)("terminal"),{queryParams:{term_name:null===e||void 0===e?void 0:e.id},shouldReconnect:function(){return!0}}),r=t.lastMessage,n=t.sendMessage;return(0,l.jsx)(s.Z,{title:"Terminal",uuid:"terminal/index",children:(0,l.jsx)(f.Z,{lastMessage:r,sendMessage:n})})}h.getInitialProps=(0,n.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,c.Z)(h)},27271:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/terminal",function(){return r(74805)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},99177:function(e,t,r){"use strict";function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}r.d(t,{Z:function(){return o}})},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[844,8013,600,9696,8264,9774,2888,179],(function(){return t=27271,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[585],{94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return I}});var r=t(82394),i=t(21831),o=t(82684),u=t(50724),c=t(82555),l=t(97618),a=t(70613),s=t(59696),d=t(68899),f=t(28598);function v(e,n){var t=e.children,r=e.noPadding;return(0,f.jsx)(d.HS,{noPadding:r,ref:n,children:t})}var p=o.forwardRef(v),h=t(62547),O=t(82571),b=t(35686),g=t(98464),m=t(46684),j=t(70515),E=t(53808),_=t(19183);function P(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 y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function T(e,n){var t,r=e.addProjectBreadcrumbToCustomBreadcrumbs,v=e.after,P=e.afterHidden,T=e.afterWidth,I=e.afterWidthOverride,Z=e.before,A=e.beforeWidth,w=e.breadcrumbs,N=e.children,x=e.errors,C=e.headerMenuItems,k=e.headerOffset,S=e.mainContainerHeader,D=e.navigationItems,M=e.setErrors,L=e.subheaderChildren,R=e.subheaderNoPadding,U=e.title,H=e.uuid,Y=(0,_.i)().width,V="dashboard_after_width_".concat(H),B="dashboard_before_width_".concat(H),W=(0,o.useRef)(null),F=(0,o.useState)(I?T:(0,E.U2)(V,T)),X=F[0],z=F[1],J=(0,o.useState)(!1),Q=J[0],K=J[1],q=(0,o.useState)(Z?Math.max((0,E.U2)(B,A),13*j.iI):null),G=q[0],$=q[1],ee=(0,o.useState)(!1),ne=ee[0],te=ee[1],re=(0,o.useState)(null)[1],ie=b.ZP.projects.list({},{revalidateOnFocus:!1}).data,oe=null===ie||void 0===ie?void 0:ie.projects,ue={label:function(){var e;return null===oe||void 0===oe||null===(e=oe[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},ce=[];w?(r&&ce.push(ue),ce.push.apply(ce,(0,i.Z)(w))):(null===oe||void 0===oe?void 0:oe.length)>=1&&ce.push.apply(ce,[ue,{bold:!0,label:function(){return U}}]),(0,o.useEffect)((function(){null===W||void 0===W||!W.current||Q||ne||null===re||void 0===re||re(W.current.getBoundingClientRect().width)}),[Q,X,ne,G,W,re,Y]),(0,o.useEffect)((function(){Q||(0,E.t8)(V,X)}),[P,Q,X,V]),(0,o.useEffect)((function(){ne||(0,E.t8)(B,G)}),[ne,G,B]);var le=(0,g.Z)(T);return(0,o.useEffect)((function(){I&&le!==T&&z(T)}),[I,T,le]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{title:U}),(0,f.jsx)(s.Z,{breadcrumbs:ce,menuItems:C,project:null===oe||void 0===oe?void 0:oe[0],version:null===oe||void 0===oe||null===(t=oe[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{ref:n,children:[0!==(null===D||void 0===D?void 0:D.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(O.Z,{navigationItems:D,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(h.Z,{after:v,afterHeightOffset:m.Mz,afterHidden:P,afterMousedownActive:Q,afterWidth:X,before:Z,beforeHeightOffset:m.Mz,beforeMousedownActive:ne,beforeWidth:d.k1+(Z?G:0),headerOffset:k,hideAfterCompletely:!0,leftOffset:Z?d.k1:null,mainContainerHeader:S,mainContainerRef:W,setAfterMousedownActive:K,setAfterWidth:z,setBeforeMousedownActive:te,setBeforeWidth:$,children:[L&&(0,f.jsx)(p,{noPadding:R,children:L}),N]})})]}),x&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===M||void 0===M?void 0:M(null)},children:(0,f.jsx)(c.Z,y(y({},x),{},{onClose:function(){return null===M||void 0===M?void 0:M(null)}}))})]})}var I=o.forwardRef(T)},16488:function(e,n,t){"use strict";t.d(n,{IJ:function(){return h},M8:function(){return T},Vx:function(){return j},XM:function(){return y},_U:function(){return p},eI:function(){return m},gU:function(){return _},lO:function(){return N},ri:function(){return b},tL:function(){return E},vJ:function(){return P},xH:function(){return g}});var r,i=t(82394),o=t(92083),u=t.n(o),c=t(3917),l=t(4383),a=t(30229),s=t(42122),d=t(86735);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 v(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,i.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}var p=function(e){return!!e&&!Object.values(a.U5).includes(e)};function h(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,o=n.started_at,c=n.status,l=null;o&&r&&(l=u()(r).valueOf()-u()(o).valueOf());return v(v({},e),{},(0,i.Z)({},t,{runtime:l,status:c}))}),{})}var O,b=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:a.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return e?n.slice(0,1):n};function g(e){var n=(0,s.gR)(e,[a.gm.INTERVAL,a.gm.TYPE]),t=e[a.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var r=e[a.gm.TYPE];return r&&(n["schedule_type[]"]=r),n}function m(e){if(!e)return null;var n=new Date(u()(e).valueOf()),t=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());return new Date(t)}function j(e){return"string"!==typeof e?e:m(e.split("+")[0]).toISOString().split(".")[0]}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(O||(O={}));var E=(r={},(0,i.Z)(r,O.DAY,86400),(0,i.Z)(r,O.HOUR,3600),(0,i.Z)(r,O.MINUTE,60),(0,i.Z)(r,O.SECOND,1),r);function _(e){var n=O.SECOND,t=e;return e%86400===0?(t/=86400,n=O.DAY):e%3600===0?(t/=3600,n=O.HOUR):e%60===0&&(t/=60,n=O.MINUTE),{time:t,unit:n}}function P(e,n){return e*E[n]}function y(e,n,t){var r="".concat(e.toISOString().split("T")[0]," ").concat(null===n||void 0===n?void 0:n.hour,":").concat(null===n||void 0===n?void 0:n.minute);if(null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone){var i=u()(e);i.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),i.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),i.set("second",0),r=i.format(c.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,c.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))}return r}function T(e){var n,t="";return t="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(t="".concat(t,"/").concat(e.token)),(n=window.location.port)&&(t=t.replace(n,l.QT)),t}function I(e,n,t){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,t){var r=t.indexOf(e),i=0;if(n<0)for(var o=0;o>n;o--)0===r?(r=t.length-1,i-=1):r-=1;else if(n>0)for(var u=0;u<n;u++)r===t.length-1?(r=0,i+=1):r+=1;return{additionalOffset:i,cronValue:String(t[r]||e)}}(+e,n,t)}var Z=(0,d.m5)(60),A=(0,d.m5)(24),w=(0,c.Cs)();function N(e,n){if(!e)return e;var t=u()().local().format("Z"),r=t.split(":"),i="-"===t[0],o=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),c=Number(r[1]);(i&&!n||!i&&n)&&(o=-o,c=-c);var l=e.split(" "),a=l[0],s=l[1],d=l[2],f=I(a,c,Z),v=I(s,o+f.additionalOffset,A);if(l[0]=f.cronValue,l[1]=v.cronValue,0!==(null===v||void 0===v?void 0:v.additionalOffset)){var p=I(d,v.additionalOffset,w);l[2]=p.cronValue}return l.join(" ")}},70320:function(e,n,t){"use strict";t.d(n,{h:function(){return u},q:function(){return o}});var r=t(78419),i=t(53808);function o(){return(0,i.U2)(r.am,null)||!1}function u(e){return"undefined"!==typeof e&&(0,i.t8)(r.am,e),e}},55072:function(e,n,t){"use strict";t.d(n,{Et:function(){return f},Q:function(){return d}});t(82684);var r=t(71180),i=t(55485),o=t(38276),u=t(31748),c=t(72473),l=t(79633),a=t(70515),s=t(28598),d=30,f=9;n.ZP=function(e){var n=e.page,t=e.maxPages,d=e.onUpdate,f=e.totalPages,v=[],p=t;if(p>f)v=Array.from({length:f},(function(e,n){return n}));else{var h=Math.floor(p/2),O=n-h;n+h>=f?(O=f-p+2,p-=2):n-h<=0?(O=0,p-=2):(p-=4,O=n-Math.floor(p/2)),v=Array.from({length:p},(function(e,n){return n+O}))}return(0,s.jsx)(s.Fragment,{children:f>0&&(0,s.jsxs)(i.ZP,{alignItems:"center",children:[(0,s.jsx)(r.Z,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,s.jsx)(c.Hd,{size:1.5*a.iI,stroke:u.Av})}),!v.includes(0)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!v.includes(1)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),v.map((function(e){return(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{backgroundColor:e===n&&l.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!v.includes(f-1)&&(0,s.jsxs)(s.Fragment,{children:[!v.includes(f-2)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{borderLess:!0,noBackground:!0,onClick:function(){return d(f-1)},children:f})},f-1)]}),(0,s.jsx)(o.Z,{ml:1}),(0,s.jsx)(r.Z,{disabled:n===f-1,onClick:function(){return d(n+1)},children:(0,s.jsx)(c.Kw,{size:1.5*a.iI,stroke:u.Av})})]})})}},41143:function(e,n,t){"use strict";var r;t.d(n,{V:function(){return r}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(r||(r={}))},30229:function(e,n,t){"use strict";t.d(n,{TR:function(){return v},U5:function(){return l},Wb:function(){return f},Xm:function(){return o},Z4:function(){return a},fq:function(){return c},gm:function(){return s},kJ:function(){return d}});var r,i,o,u=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var c,l,a=(r={},(0,u.Z)(r,o.API,(function(){return"API"})),(0,u.Z)(r,o.EVENT,(function(){return"event"})),(0,u.Z)(r,o.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(c||(c={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly",e.ALWAYS_ON="@always_on"}(l||(l={}));var s,d,f=[l.ONCE,l.HOURLY,l.DAILY,l.WEEKLY,l.MONTHLY];!function(e){e.INTERVAL="frequency[]",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(s||(s={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(d||(d={}));var v=(i={},(0,u.Z)(i,d.CREATED_AT,"Created at"),(0,u.Z)(i,d.NAME,"Name"),(0,u.Z)(i,d.PIPELINE,"Pipeline"),(0,u.Z)(i,d.STATUS,"Active"),(0,u.Z)(i,d.TYPE,"Type"),i)},82359:function(e,n,t){"use strict";var r,i;t.d(n,{d:function(){return r},k:function(){return i}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2",e.DATA_INTEGRATION_IN_BATCH_PIPELINE="data_integration_in_batch_pipeline",e.INTERACTIONS="interactions",e.LOCAL_TIMEZONE="display_local_timezone",e.OPERATION_HISTORY="operation_history"}(r||(r={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(i||(i={}))},72191:function(e,n,t){"use strict";t.d(n,{_k:function(){return o},bL:function(){return i},l2:function(){return u}});var r=t(70515),i=(r.iI,2*r.iI),o=2.5*r.iI,u=3*r.iI},77174:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(82394),o=t(75582),u=t(38860),c=t.n(u),l=t(82684),a=t(34376),s=t(94629),d=t(55485),f=t(55072),v=t(93808),p=t(82359),h=t(44085),O=t(38276),b=t(30160),g=t(31743),m=t(35686),j=t(30229),E=t(70515),_=t(15610),P=t(69419),y=t(70320),T=t(28598);function I(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?I(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function A(){var e=(0,a.useRouter)(),n=(0,P.iV)(),t=null!==n&&void 0!==n&&n.page?n.page:0,r=(null===n||void 0===n?void 0:n.order_by)||j.kJ.CREATED_AT,i=m.ZP.projects.list().data,u=(0,l.useMemo)((function(){var e;return null===i||void 0===i||null===(e=i.projects)||void 0===e?void 0:e[0]}),[i]),c=((0,l.useMemo)((function(){var e;return(0,y.h)(null===u||void 0===u||null===(e=u.features)||void 0===e?void 0:e[p.d.LOCAL_TIMEZONE])}),[null===u||void 0===u?void 0:u.features]),{_limit:f.Q,_offset:t*f.Q,order_by:r}),v=m.ZP.pipeline_schedules.list(c,{refreshInterval:7500,revalidateOnFocus:!0}),I=v.data,A=v.mutate,w=(0,l.useMemo)((function(){return(null===I||void 0===I?void 0:I.pipeline_schedules)||[]}),[I]),N=(0,l.useMemo)((function(){var e;return(null===I||void 0===I||null===(e=I.metadata)||void 0===e?void 0:e.count)||[]}),[I]);return(0,T.jsxs)(s.Z,{title:"Triggers",uuid:"triggers/index",children:[(0,T.jsx)(O.Z,{mx:2,my:1,children:(0,T.jsxs)(d.ZP,{alignItems:"center",children:[(0,T.jsx)(b.ZP,{bold:!0,default:!0,large:!0,children:"Sort runs by:"}),(0,T.jsx)(O.Z,{mr:1}),(0,T.jsx)(h.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(e){e.preventDefault(),(0,_.u7)({order_by:e.target.value,page:0})},paddingRight:4*E.iI,placeholder:"Select column",value:r||j.kJ.CREATED_AT,children:Object.entries(j.TR).map((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1];return(0,T.jsx)("option",{value:t,children:r},t)}))})]})}),(0,T.jsx)(g.Z,{fetchPipelineSchedules:A,highlightRowOnHover:!0,includeCreatedAtColumn:!0,includePipelineColumn:!0,pipelineSchedules:w,stickyHeader:!0}),(0,T.jsx)(O.Z,{p:2,children:(0,T.jsx)(f.ZP,{maxPages:9,onUpdate:function(t){var r=Number(t),i=Z(Z({},n),{},{page:r>=0?r:0});e.push("/triggers","/triggers?".concat((0,P.uM)(i)))},page:Number(t),totalPages:Math.ceil(N/f.Q)})})]})}A.getInitialProps=(0,r.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,v.Z)(A)},59733:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/triggers",function(){return t(77174)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},99177:function(e,n,t){"use strict";function r(e,n){return r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},r(e,n)}function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&r(e,n)}t.d(n,{Z:function(){return i}})},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[844,2083,8013,600,9696,8264,4666,5499,1743,9774,2888,179],(function(){return n=59733,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2858],{94629:function(e,n,r){"use strict";r.d(n,{Z:function(){return w}});var t=r(82394),o=r(21831),i=r(82684),l=r(50724),c=r(82555),s=r(97618),u=r(70613),a=r(59696),d=r(68899),h=r(28598);function f(e,n){var r=e.children,t=e.noPadding;return(0,h.jsx)(d.HS,{noPadding:t,ref:n,children:r})}var m=i.forwardRef(f),v=r(62547),b=r(82571),g=r(35686),p=r(98464),x=r(46684),j=r(70515),Z=r(53808),_=r(19183);function P(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?P(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function C(e,n){var r,t=e.addProjectBreadcrumbToCustomBreadcrumbs,f=e.after,P=e.afterHidden,C=e.afterWidth,w=e.afterWidthOverride,k=e.before,I=e.beforeWidth,S=e.breadcrumbs,O=e.children,T=e.errors,E=e.headerMenuItems,N=e.headerOffset,A=e.mainContainerHeader,R=e.navigationItems,M=e.setErrors,D=e.subheaderChildren,B=e.subheaderNoPadding,L=e.title,H=e.uuid,F=(0,_.i)().width,G="dashboard_after_width_".concat(H),V="dashboard_before_width_".concat(H),U=(0,i.useRef)(null),Y=(0,i.useState)(w?C:(0,Z.U2)(G,C)),W=Y[0],q=Y[1],z=(0,i.useState)(!1),K=z[0],Q=z[1],X=(0,i.useState)(k?Math.max((0,Z.U2)(V,I),13*j.iI):null),J=X[0],$=X[1],ee=(0,i.useState)(!1),ne=ee[0],re=ee[1],te=(0,i.useState)(null)[1],oe=g.ZP.projects.list({},{revalidateOnFocus:!1}).data,ie=null===oe||void 0===oe?void 0:oe.projects,le={label:function(){var e;return null===ie||void 0===ie||null===(e=ie[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},ce=[];S?(t&&ce.push(le),ce.push.apply(ce,(0,o.Z)(S))):(null===ie||void 0===ie?void 0:ie.length)>=1&&ce.push.apply(ce,[le,{bold:!0,label:function(){return L}}]),(0,i.useEffect)((function(){null===U||void 0===U||!U.current||K||ne||null===te||void 0===te||te(U.current.getBoundingClientRect().width)}),[K,W,ne,J,U,te,F]),(0,i.useEffect)((function(){K||(0,Z.t8)(G,W)}),[P,K,W,G]),(0,i.useEffect)((function(){ne||(0,Z.t8)(V,J)}),[ne,J,V]);var se=(0,p.Z)(C);return(0,i.useEffect)((function(){w&&se!==C&&q(C)}),[w,C,se]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u.Z,{title:L}),(0,h.jsx)(a.Z,{breadcrumbs:ce,menuItems:E,project:null===ie||void 0===ie?void 0:ie[0],version:null===ie||void 0===ie||null===(r=ie[0])||void 0===r?void 0:r.version}),(0,h.jsxs)(d.Nk,{ref:n,children:[0!==(null===R||void 0===R?void 0:R.length)&&(0,h.jsx)(d.lm,{showMore:!0,children:(0,h.jsx)(b.Z,{navigationItems:R,showMore:!0})}),(0,h.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,h.jsxs)(v.Z,{after:f,afterHeightOffset:x.Mz,afterHidden:P,afterMousedownActive:K,afterWidth:W,before:k,beforeHeightOffset:x.Mz,beforeMousedownActive:ne,beforeWidth:d.k1+(k?J:0),headerOffset:N,hideAfterCompletely:!0,leftOffset:k?d.k1:null,mainContainerHeader:A,mainContainerRef:U,setAfterMousedownActive:Q,setAfterWidth:q,setBeforeMousedownActive:re,setBeforeWidth:$,children:[D&&(0,h.jsx)(m,{noPadding:B,children:D}),O]})})]}),T&&(0,h.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===M||void 0===M?void 0:M(null)},children:(0,h.jsx)(c.Z,y(y({},T),{},{onClose:function(){return null===M||void 0===M?void 0:M(null)}}))})]})}var w=i.forwardRef(C)},85385:function(e,n,r){"use strict";r.d(n,{Qq:function(){return f},Z7:function(){return m},cH:function(){return o},du:function(){return d},fp:function(){return a},j5:function(){return h},uM:function(){return u}});var t,o,i=r(82394),l=r(82359),c=r(72473),s=r(86735),u="sideview",a=90;!function(e){e.ADDON_BLOCKS="addon_blocks",e.BLOCK_SETTINGS="block_settings",e.CALLBACKS="callbacks",e.CHARTS="charts",e.DATA="data",e.EXTENSIONS="power_ups",e.FILE_VERSIONS="file_versions",e.GRAPHS="graphs",e.INTERACTIONS="interactions",e.REPORTS="reports",e.SECRETS="secrets",e.SETTINGS="settings",e.TERMINAL="terminal",e.TREE="tree",e.VARIABLES="variables"}(o||(o={}));o.BLOCK_SETTINGS,o.CALLBACKS,o.CHARTS,o.DATA,o.EXTENSIONS,o.TREE;var d=[o.DATA];function h(e){var n,r,t=[{key:o.TREE,label:"Tree"},{buildLabel:function(e){var n=(e.pipeline||{}).widgets,r=void 0===n?[]:n;return(null===r||void 0===r?void 0:r.length)>=1?"Charts (".concat(r.length,")"):"Charts"},key:o.CHARTS},{buildLabel:function(e){var n=e.variables;return(null===n||void 0===n?void 0:n.length)>=1?"Variables (".concat(n.length,")"):"Variables"},key:o.VARIABLES},{buildLabel:function(e){var n=e.secrets;return(null===n||void 0===n?void 0:n.length)>=1?"Secrets (".concat(n.length,")"):"Secrets"},key:o.SECRETS},{buildLabel:function(e){e.pipeline;return"Add-on blocks"},key:o.ADDON_BLOCKS},{buildLabel:function(e){var n=(e.pipeline||{}).extensions,r=void 0===n?{}:n,t=0;return Object.values(r).forEach((function(e){var n=e.blocks;t+=(null===n||void 0===n?void 0:n.length)||0})),t>=1?"Power ups (".concat(t,")"):"Power ups"},key:o.EXTENSIONS},{key:o.DATA,label:"Data"},{key:o.TERMINAL,label:"Terminal"},{key:o.BLOCK_SETTINGS,label:"Block settings"}];return null!==e&&void 0!==e&&null!==(n=e.project)&&void 0!==n&&null!==(r=n.features)&&void 0!==r&&r[l.d.INTERACTIONS]&&t.push({key:o.INTERACTIONS,label:"Interactions"}),t}function f(e){return(0,s.HK)(h(e),(function(e){return e.key}))}var m=(t={},(0,i.Z)(t,o.ADDON_BLOCKS,c.EJ),(0,i.Z)(t,o.BLOCK_SETTINGS,c.JG),(0,i.Z)(t,o.CALLBACKS,c.AQ),(0,i.Z)(t,o.CHARTS,c.GQ),(0,i.Z)(t,o.DATA,c.iA),(0,i.Z)(t,o.EXTENSIONS,c.Bf),(0,i.Z)(t,o.INTERACTIONS,c.yd),(0,i.Z)(t,o.SECRETS,c.Yo),(0,i.Z)(t,o.SETTINGS,c.Zr),(0,i.Z)(t,o.TERMINAL,c.oI),(0,i.Z)(t,o.TREE,c.mp),(0,i.Z)(t,o.VARIABLES,c.LO),t)},15135:function(e,n,r){"use strict";r.d(n,{JD:function(){return v},Lu:function(){return i},PF:function(){return h},dT:function(){return l},n6:function(){return u},nB:function(){return m},oy:function(){return f},xF:function(){return d}});var t,o,i,l,c=r(82394),s=r(44425);!function(e){e.CSV="csv",e.JSON="json",e.MD="md",e.PY="py",e.R="r",e.SQL="sql",e.TXT="txt",e.YAML="yaml",e.YML="yml"}(i||(i={})),function(e){e.INIT_PY="__init__.py",e.METADATA_YAML="metadata.yaml",e.REQS_TXT="requirements.txt"}(l||(l={}));var u=[i.PY,i.SQL],a=[i.JSON,i.MD,i.PY,i.R,i.SQL,i.TXT,i.YAML,i.YML],d=new RegExp(a.map((function(e){return".".concat(e,"$")})).join("|")),h=(new RegExp(a.map((function(e){return".".concat(e,"$")})).join("|")),"charts"),f="pipelines",m=(t={},(0,c.Z)(t,i.MD,s.t6.MARKDOWN),(0,c.Z)(t,i.JSON,i.JSON),(0,c.Z)(t,i.PY,s.t6.PYTHON),(0,c.Z)(t,i.R,s.t6.R),(0,c.Z)(t,i.SQL,s.t6.SQL),(0,c.Z)(t,i.TXT,"text"),(0,c.Z)(t,i.YAML,s.t6.YAML),(0,c.Z)(t,i.YML,s.t6.YAML),t),v=(o={},(0,c.Z)(o,s.t6.MARKDOWN,i.MD),(0,c.Z)(o,s.t6.PYTHON,i.PY),(0,c.Z)(o,s.t6.R,i.R),(0,c.Z)(o,s.t6.SQL,i.SQL),(0,c.Z)(o,s.t6.YAML,i.YAML),(0,c.Z)(o,"text",i.TXT),o)},26314:function(e,n,r){"use strict";var t;r.d(n,{G:function(){return t}}),function(e){e.ACTIVE_DIRECTORY="active_directory",e.GITHUB="github"}(t||(t={}))},57653:function(e,n,r){"use strict";r.d(n,{$1:function(){return a},G7:function(){return h},LM:function(){return f},Mj:function(){return m},QK:function(){return u},a_:function(){return b},kA:function(){return v},qL:function(){return l},r0:function(){return d}});var t,o,i,l,c=r(82394),s=r(72473);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(l||(l={}));var u,a,d,h=(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),f="all",m=(l.PYTHON,l.INTEGRATION,l.STREAMING,o={},(0,c.Z)(o,f,s.ie),(0,c.Z)(o,l.INTEGRATION,s.YC),(0,c.Z)(o,l.PYTHON,s.El),(0,c.Z)(o,l.STREAMING,s.dB),o);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules",e.RETRY="retry",e.RETRY_INCOMPLETE_BLOCK_RUNS="retry_incomplete_block_runs"}(u||(u={})),function(e){e.GROUP="group_by",e.HISTORY_DAYS="from_history_days",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 v=[u.ACTIVE,u.INACTIVE,u.NO_SCHEDULES],b=(i={},(0,c.Z)(i,l.PYTHON,"python3"),(0,c.Z)(i,l.PYSPARK,"pysparkkernel"),i)},82359:function(e,n,r){"use strict";var t,o;r.d(n,{d:function(){return t},k:function(){return o}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2",e.DATA_INTEGRATION_IN_BATCH_PIPELINE="data_integration_in_batch_pipeline",e.INTERACTIONS="interactions",e.LOCAL_TIMEZONE="display_local_timezone",e.OPERATION_HISTORY="operation_history"}(t||(t={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(o||(o={}))},65956:function(e,n,r){"use strict";var t=r(38626),o=r(55485),i=r(38276),l=r(30160),c=r(44897),s=r(42631),u=r(47041),a=r(70515),d=r(28598),h=(0,t.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*a.iI,1.5*a.iI,1.5*a.iI),f=t.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],s.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||c.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||c.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||c.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||c.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||c.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),m=t.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],s.n_,s.n_,(function(e){return"\n background-color: ".concat((e.theme.background||c.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||c.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),h,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),v=t.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*a.iI,u.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*a.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),b=t.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],s.M8,s.YF,1.75*a.iI);n.Z=function(e){var n=e.borderless,r=e.children,t=e.containerRef,c=e.contentContainerRef,s=e.dark,u=e.footer,a=e.fullHeight,h=void 0===a||a,g=e.fullWidth,p=void 0===g||g,x=e.header,j=e.headerHeight,Z=e.headerIcon,_=e.headerPaddingVertical,P=e.headerTitle,y=e.maxHeight,C=e.maxWidth,w=e.minWidth,k=e.noPadding,I=e.overflowVisible,S=e.subtitle,O=e.success;return(0,d.jsxs)(f,{borderless:n,dark:s,fullHeight:h,fullWidth:p,maxHeight:y,maxWidth:C,minWidth:w,overflowVisible:I,ref:t,success:O,children:[(x||P)&&(0,d.jsxs)(m,{headerPaddingVertical:_,height:j,children:[x&&x,P&&(0,d.jsx)(o.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(o.ZP,{alignItems:"center",children:[Z&&Z,(0,d.jsx)(i.Z,{ml:Z?1:0,children:(0,d.jsx)(l.ZP,{bold:!0,default:!0,children:P})})]})})]}),(0,d.jsxs)(v,{maxHeight:y,noPadding:k,overflowVisible:I,ref:c,children:[S&&(0,d.jsx)(i.Z,{mb:2,children:(0,d.jsx)(l.ZP,{default:!0,children:S})}),r]}),u&&(0,d.jsx)(b,{children:u})]})}},35185:function(e,n,r){"use strict";var t=r(82394),o=r(91835),i=(r(82684),r(38626)),l=r(44897),c=r(42631),s=r(70515),u=r(28598);function a(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 d(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?a(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var h=i.default.div.withConfig({displayName:"ProgressBar__ProgressBarContainerStyle",componentId:"sc-10x9ojc-0"})(["border-radius:","px;height:","px;overflow:hidden;position:relative;width:100%;",""],c.BG,.75*s.iI,(function(e){return"\n background-color: ".concat((e.theme.monotone||l.Z.monotone).grey200,";\n ")})),f=i.default.div.withConfig({displayName:"ProgressBar__ProgressBarStyle",componentId:"sc-10x9ojc-1"})(["height:inherit;position:absolute;"," "," "," ",""],(function(e){return!e.danger&&"\n background-color: ".concat((e.theme.progress||l.Z.progress).positive,";\n ")}),(function(e){return e.progress&&"\n width: ".concat(e.progress,"%;\n ")}),(function(e){return e.danger&&"\n background-color: ".concat((e.theme.progress||l.Z.progress).negative,";\n ")}),(function(e){return e.animateProgress&&"\n animation: animate-progress ".concat(e.animateProgress.duration,"ms linear forwards;\n\n @keyframes animate-progress {\n 0% {\n width: ").concat(e.animateProgress.start,"%;\n }\n\n 100% {\n width: ").concat(e.animateProgress.end,"%;\n }\n }\n ")}));n.Z=function(e){var n=(0,o.Z)({},e);return(0,u.jsx)(h,d(d({},n),{},{children:(0,u.jsx)(f,d({},n))}))}},90299:function(e,n,r){"use strict";r.d(n,{Z:function(){return p}});var t=r(82684),o=r(71180),i=r(55485),l=r(64888),c=r(38276),s=r(30160),u=r(8059),a=r(38626),d=r(44897),h=r(70515),f=r(47041),m=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],h.cd*h.iI,h.cd*h.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),f.w5),v=a.default.div.withConfig({displayName:"indexstyle__SelectedUnderlineStyle",componentId:"sc-segf7l-1"})(["border-radius:6px;height:","px;"," "," ",""],2,(function(e){return!e.selected&&"\n background-color: transparent;\n "}),(function(e){return e.selected&&!e.backgroundColor&&"\n background-color: ".concat((e.theme||d.Z).borders.darkLight,";\n ")}),(function(e){return e.selected&&e.backgroundColor&&"\n background-color: ".concat(e.backgroundColor,";\n ")})),b=r(3314),g=r(28598);var p=function(e){var n=e.allowScroll,r=e.compact,a=e.contained,d=e.noPadding,f=e.onClickTab,p=e.regularSizeText,x=e.selectedTabUUID,j=e.small,Z=e.tabs,_=e.underlineColor,P=e.underlineStyle,y=(0,t.useMemo)((function(){var e=Z.length,n=[];return Z.forEach((function(t,a){var d=t.Icon,m=t.IconSelected,Z=t.label,y=t.uuid,C=y===x,w=C&&m||d,k=Z?Z():y,I=(0,g.jsxs)(i.ZP,{alignItems:"center",children:[w&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(w,{default:!C,size:2*h.iI}),(0,g.jsx)(c.Z,{mr:1})]}),(0,g.jsx)(s.ZP,{bold:!0,default:!C,noWrapping:!0,small:!p,children:k})]});a>=1&&e>=2&&n.push((0,g.jsx)("div",{style:{marginLeft:(p?2:1.5)*h.iI}},"spacing-".concat(y))),C&&!P?n.push((0,g.jsx)(l.Z,{backgroundGradient:u.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:r||j,onClick:function(e){(0,b.j)(e),f(t)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:j,children:I},y)):n.push((0,g.jsxs)(i.ZP,{flexDirection:"column",style:{paddingLeft:2,paddingRight:2,paddingBottom:P?0:2,paddingTop:P?0:2},children:[(0,g.jsxs)(o.Z,{borderLess:!0,compact:r||j,default:!0,noBackground:P,noPadding:P,onClick:function(e){(0,b.j)(e),f(t)},outline:!P,small:j,children:[!P&&I,P&&(0,g.jsx)("div",{style:{paddingBottom:(r||j?h.iI/2:h.iI)+2,paddingTop:(r||j?h.iI/2:h.iI)+2+2},children:I})]}),P&&(0,g.jsx)(v,{backgroundColor:_,selected:C})]},"button-tab-".concat(y)))})),n}),[r,f,x,j,Z,P]),C=(0,g.jsx)(i.ZP,{alignItems:"center",children:y});return a?C:(0,g.jsx)(m,{allowScroll:n,noPadding:d,children:C})}},58024:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return ke}});var t=r(77837),o=r(38860),i=r.n(o),l=r(93808),c=r(82394),s=r(75582),u=r(54407),a=r.n(u),d=r(82684),h=r(69864),f=r(71180),m=r(15338),v=r(55485),b=r(85854),g=r(44085),p=r(38276),x=r(4190),j=r(30160),Z=r(35576),_=r(17488),P=r(12468),y=r(35686),C=r(72473),w="delete",k="fetch",I="merge",S="pull",O="push",T="rebase",E="git_remote_name",N="git_repository_name",A={uuid:"Branches"},R={uuid:"Files"},M={uuid:"Push"},D={uuid:"Setup"},B=[D,A,R,M],L=r(70515),H=r(81728),F=r(72619),G=r(28598);var V=function(e){var n=e.actionRemoteName,r=e.branch,t=e.branches,o=e.fetchBranch,i=e.fetchBranches,l=e.remotes,u=e.setActionRemoteName,a=e.showError,k=(0,d.useState)(""),S=k[0],O=k[1],E=(0,d.useState)(null),N=E[0],A=E[1],M=(0,d.useState)(null),B=M[0],V=M[1],U=(0,d.useState)(null),Y=U[0],W=U[1],q=(0,d.useState)(""),z=q[0],K=q[1],Q=(0,d.useMemo)((function(){return null===l||void 0===l?void 0:l.find((function(e){return e.name===n}))}),[n,l]),X=(0,d.useMemo)((function(){return(null===t||void 0===t?void 0:t.concat((null===Q||void 0===Q?void 0:Q.refs)||[]))||[]}),[t,Q]),J=(0,h.Db)(y.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){o(),i(),K("")},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),$=(0,s.Z)(J,2),ee=$[0],ne=$[1].isLoading,re=(0,h.Db)(y.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){o()},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),te=(0,s.Z)(re,2),oe=te[0],ie=te[1].isLoading,le=(0,h.Db)(y.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.git_custom_branch.progress;o(),O(""),A(""),V(n),W("")},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),ce=(0,s.Z)(le,2),se=ce[0],ue=ce[1].isLoading;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(p.Z,{mb:L.HN,children:[(0,G.jsxs)(b.Z,{children:["Branches",t?" (".concat(null===t||void 0===t?void 0:t.length,")"):""]}),(0,G.jsx)(p.Z,{mt:L.Mq,children:(0,G.jsxs)(v.ZP,{children:[(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Remote"})}),(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.VW,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return u(e.target.value)},placeholder:"Choose a remote",value:n||"",children:null===l||void 0===l?void 0:l.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(0,G.jsxs)(v.ZP,{alignItems:"center",children:[(0,G.jsx)(P.Z,{fullSize:!0,label:"Choose a different branch to switch branches",widthFitContent:!0,children:(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.I0,{muted:!1}),beforeIconSize:2*L.iI,monospace:!0,onChange:function(e){return oe({git_custom_branch:{name:e.target.value}})},value:null===r||void 0===r?void 0:r.name,children:(null===r||void 0===r?void 0:r.name)&&(null===t||void 0===t?void 0:t.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)})))})}),(0,G.jsx)(p.Z,{mr:L.cd}),ie&&(0,G.jsx)(x.Z,{inverted:!0})]})]})]})}),(0,G.jsx)(p.Z,{mt:L.Mq,children:(0,G.jsxs)(v.ZP,{alignItems:"center",children:[(0,G.jsx)(_.Z,{label:"New branch name",monospace:!0,onChange:function(e){var n;return K(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:z||""}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.mm,{size:2*L.iI}),disabled:!z,loading:ne,onClick:function(){ee({git_custom_branch:{name:z}})},primary:!0,children:"Create new branch"})]})})]}),(0,G.jsxs)(p.Z,{mb:L.HN,children:[(0,G.jsx)(b.Z,{children:"Actions"}),(0,G.jsxs)(p.Z,{mt:L.Mq,children:[(0,G.jsxs)(p.Z,{mb:L.Mq,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),(null===r||void 0===r?void 0:r.name)&&(0,G.jsx)(j.ZP,{monospace:!0,children:null===r||void 0===r?void 0:r.name})]}),(0,G.jsxs)(v.ZP,{alignItems:"center",children:[(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Base branch"})}),(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.I0,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return W(e.target.value)},placeholder:"Choose a branch",value:Y,children:null===X||void 0===X?void 0:X.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Action"})}),(0,G.jsxs)(g.Z,{onChange:function(e){return A(e.target.value)},placeholder:"Choose action",value:N||"",children:[(0,G.jsx)("option",{value:I,children:(0,H.vg)(I)}),(0,G.jsx)("option",{value:T,children:(0,H.vg)(T)}),(0,G.jsx)("option",{value:w,children:(0,H.vg)(w)})]})]})]}),N&&[I,T].includes(N)&&(0,G.jsxs)(p.Z,{mt:L.cd,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsxs)(j.ZP,{bold:!0,muted:!0,children:["Message for ",N]})}),(0,G.jsx)(Z.Z,{monospace:!0,onChange:function(e){return O(e.target.value)},value:S||""})]}),(0,G.jsxs)(p.Z,{mt:L.cd,children:[(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.Bf,{size:2*L.iI}),disabled:!N||!Y,loading:ue,onClick:function(){(w!==N||"undefined"!==typeof location&&window.confirm("Are you sure you want to delete branch ".concat(Y,"?")))&&se({git_custom_branch:(0,c.Z)({action_type:N,message:S},N,{base_branch:Y})})},primary:!0,children:N?(0,H.vg)(N):"Execute action"}),B&&(0,G.jsx)(p.Z,{mt:L.cd,children:(0,G.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,children:B})})]})]})]}),(0,G.jsxs)(p.Z,{mb:L.HN,children:[(0,G.jsx)(p.Z,{mb:L.HN,children:(0,G.jsx)(m.Z,{light:!0})}),(0,G.jsxs)(v.ZP,{children:[(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.Hd,{}),linkProps:{href:"/version-control?tab=".concat(D.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:D.uuid}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)(f.Z,{afterIcon:(0,G.jsx)(C.Kw,{}),linkProps:{href:"/version-control?tab=".concat(R.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",R.uuid]})]})]})]})},U=r(90299),Y=r(32013),W=r(98777),q=r(48670),z=r(75499);function K(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 Q(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?K(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var X={base_branch:null,body:null,compare_branch:null,repository:null,title:null};var J=function(e){var n=e.actionRemoteName,r=e.branch,t=e.branches,o=e.fetchBranch,i=e.loading,l=e.remotes,u=e.repositories,a=e.repositoryName,P=e.setActionRemoteName,w=e.setRepositoryName,k=e.showError,I=(0,d.useState)((null===r||void 0===r?void 0:r.name)||""),S=I[0],T=I[1],E=(0,d.useState)(null),N=E[0],A=E[1],M=(0,d.useState)(null),D=M[0],B=M[1],V=(0,d.useState)(X),U=V[0],K=V[1],J=(0,h.Db)(y.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.git_custom_branch,r=n.error,t=n.progress;r?(A(r),B(null)):(o(),A(null),B(t))},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}}),$=(0,s.Z)(J,2),ee=$[0],ne=$[1].isLoading,re=y.ZP.pull_requests.list({repository:a},{},{pauseFetch:!a}),te=re.data,oe=re.mutate,ie=(0,d.useMemo)((function(){return(null===te||void 0===te?void 0:te.pull_requests)||[]}),[te]),le=(0,d.useMemo)((function(){return(0,G.jsx)(z.Z,{columnFlex:[null,null,null,null],columns:[{uuid:"Title"},{uuid:"Author"},{uuid:"Created"},{uuid:"Last modified"}],onClickRow:function(e){var n,r=null===ie||void 0===ie||null===(n=ie[e])||void 0===n?void 0:n.url;r&&window.open(r,"_blank")},rows:null===ie||void 0===ie?void 0:ie.map((function(e){var n=e.created_at,r=e.last_modified,t=e.title,o=e.url,i=e.user;return[(0,G.jsx)(q.Z,{default:!0,href:o,monospace:!0,openNewWindow:!0,small:!0,children:t},"title"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:i},"user"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:n},"createdAt"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:r||"-"},"lastModified")]})),uuid:"pull-requests"})}),[ie]),ce=y.ZP.git_custom_branches.list({repository:a},{},{pauseFetch:!a}).data,se=(0,d.useMemo)((function(){return(null===ce||void 0===ce?void 0:ce.git_custom_branches)||[]}),[ce]);(0,d.useEffect)((function(){null!==U&&void 0!==U&&U.compare_branch||null===se||void 0===se||!se.find((function(e){return e.name===(null===r||void 0===r?void 0:r.name)}))||K((function(e){return Q(Q({},e),{},{compare_branch:null===r||void 0===r?void 0:r.name})}))}),[r,se,U]);var ue=(0,h.Db)(y.ZP.pull_requests.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){oe(),K(X)},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}}),ae=(0,s.Z)(ue,2),de=ae[0],he=ae[1].isLoading;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(p.Z,{mb:L.HN,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(b.Z,{children:(0,H.vg)(O)})}),(0,G.jsxs)(p.Z,{mt:L.Mq,children:[(0,G.jsxs)(v.ZP,{children:[(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Remote"})}),i&&(0,G.jsx)(x.Z,{inverted:!0}),!i&&(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.VW,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return P(e.target.value)},placeholder:"Choose remote",value:n||"",children:null===l||void 0===l?void 0:l.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Branch"})}),(0,G.jsxs)(g.Z,{beforeIcon:(0,G.jsx)(C.I0,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return T(e.target.value)},placeholder:"Choose branch",value:S||"",children:[(0,G.jsx)("option",{value:""}),null===t||void 0===t?void 0:t.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,G.jsx)(p.Z,{mt:L.cd,children:(0,G.jsxs)(f.Z,{beforeIcon:(0,G.jsx)(C.Bf,{size:2*L.iI}),disabled:!n||!S,loading:ne,onClick:function(){B(null),ee({git_custom_branch:(0,c.Z)({action_type:O},O,{branch:S,remote:n})})},primary:!0,children:[(0,H.vg)(O)," ",n," ",n&&S]})}),(D||N)&&(0,G.jsx)(p.Z,{mt:L.cd,children:(0,G.jsx)(j.ZP,{danger:!!N,default:!!D,monospace:!0,preWrap:!0,children:D||N})})]})]}),(0,G.jsxs)(p.Z,{mb:L.HN,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(b.Z,{children:"Create pull request"})}),(0,G.jsxs)(p.Z,{mt:L.Mq,children:[i&&(0,G.jsx)(x.Z,{inverted:!0}),!i&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(v.ZP,{children:[(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Repository"})}),(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.fy,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return w(e.target.value)},placeholder:"Choose repository",value:a||"",children:null===u||void 0===u?void 0:u.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Base branch"})}),a&&!ce&&(0,G.jsx)(x.Z,{inverted:!0}),(!a||ce)&&(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.I0,{}),beforeIconSize:1.5*L.iI,disabled:!a,monospace:!0,onChange:function(e){return K((function(n){return Q(Q({},n),{},{base_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===U||void 0===U?void 0:U.base_branch)||"",children:null===se||void 0===se?void 0:se.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)("div",{children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),a&&!ce&&(0,G.jsx)(x.Z,{inverted:!0}),(!a||ce||(null===U||void 0===U?void 0:U.compare_branch))&&(0,G.jsxs)(g.Z,{beforeIcon:(0,G.jsx)(C.I0,{}),beforeIconSize:1.5*L.iI,disabled:!a,monospace:!0,onChange:function(e){return K((function(n){return Q(Q({},n),{},{compare_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===U||void 0===U?void 0:U.compare_branch)||"",children:[!(null!==se&&void 0!==se&&se.length)&&(null===U||void 0===U?void 0:U.compare_branch)&&(0,G.jsx)("option",{value:null===U||void 0===U?void 0:U.compare_branch,children:null===U||void 0===U?void 0:U.compare_branch}),null===se||void 0===se?void 0:se.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,G.jsx)(p.Z,{mt:1,children:(0,G.jsx)(_.Z,{label:"Title",monospace:!0,onChange:function(e){return K((function(n){return Q(Q({},n),{},{title:e.target.value})}))},value:(null===U||void 0===U?void 0:U.title)||""})}),(0,G.jsx)(p.Z,{mt:1,children:(0,G.jsx)(Z.Z,{label:"Description",monospace:!0,onChange:function(e){return K((function(n){return Q(Q({},n),{},{body:e.target.value})}))},value:(null===U||void 0===U?void 0:U.body)||""})}),(0,G.jsx)(p.Z,{mt:L.cd,children:(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.Bf,{size:2*L.iI}),disabled:!a||!(null!==U&&void 0!==U&&U.title)||!(null!==U&&void 0!==U&&U.base_branch)||!(null!==U&&void 0!==U&&U.compare_branch),loading:he,onClick:function(){de({pull_request:Q(Q({},U),{},{repository:a})})},primary:!0,children:"Create new pull request"})})]})]}),(0,G.jsx)(p.Z,{mt:L.Mq,children:(0,G.jsx)(Y.Z,{visibleMapping:{0:!a},children:(0,G.jsxs)(W.Z,{noPaddingContent:!0,title:te?"Pull requests (".concat(null===ie||void 0===ie?void 0:ie.length,")"):"Pull requests",children:[!a&&(0,G.jsx)(p.Z,{p:L.cd,children:(0,G.jsx)(j.ZP,{muted:!0,children:"Please select a repository to view open pull requests."})}),a&&(0,G.jsxs)(G.Fragment,{children:[!te&&(0,G.jsx)(p.Z,{p:L.cd,children:(0,G.jsx)(x.Z,{inverted:!0})}),te&&le]})]})})})]}),(0,G.jsxs)(p.Z,{mb:L.HN,children:[(0,G.jsx)(p.Z,{mb:L.HN,children:(0,G.jsx)(m.Z,{light:!0})}),(0,G.jsx)(v.ZP,{children:(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.Hd,{}),linkProps:{href:"/version-control?tab=".concat(R.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:R.uuid})})]})]})},$=r(94629),ee=r(10553),ne=r(70652),re=r(97618),te=r(38626),oe=te.default.div.withConfig({displayName:"indexstyle__SpacingStyle",componentId:"sc-el09vr-0"})(["margin-top:","px;"],.5*L.iI),ie=r(42122);function le(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 ce(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?le(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var se=function(e){var n=e.branch,r=e.fetchBranch,t=e.modifiedFiles,o=e.setSelectedFilePath,i=e.showError,l=e.stagedFiles,c=e.untrackedFiles,u=(0,d.useRef)(null),a=(0,d.useState)(""),g=a[0],_=a[1],P=(0,d.useState)({}),w=P[0],k=P[1],I=(0,d.useState)({}),S=I[0],O=I[1],T=(0,d.useMemo)((function(){return Object.keys(t).concat(Object.keys(c)).sort()}),[t,c]),E=(0,d.useMemo)((function(){return Object.keys(l||{})}),[l]),N=(0,d.useMemo)((function(){return E.length}),[E]),R=(0,d.useMemo)((function(){return Object.keys(w).length===(null===T||void 0===T?void 0:T.length)}),[w,T]),D=(0,d.useMemo)((function(){return Object.keys(S).length===(null===E||void 0===E?void 0:E.length)}),[S,E]),B=(0,d.useMemo)((function(){return{onErrorCallback:function(e,n){return i({errors:n,response:e})}}}),[i]),V=(0,d.useMemo)((function(){return{onSuccess:function(e){return(0,F.wD)(e,ce({callback:function(){r(),k({})}},B))}}}),[r,B]),U=(0,d.useMemo)((function(){return y.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name)}),[n]),K=(0,h.Db)(U,V),Q=(0,s.Z)(K,2),X=Q[0],J=Q[1].isLoading,$=(0,h.Db)(U,V),ee=(0,s.Z)($,2),te=ee[0],le=ee[1].isLoading,se=(0,h.Db)(U,{onSuccess:function(e){return(0,F.wD)(e,ce({callback:function(){r(),O({})}},B))}}),ue=(0,s.Z)(se,2),ae=ue[0],de=ue[1].isLoading,he=(0,d.useCallback)((function(e,n,r,t,o){var i=(null===e||void 0===e?void 0:e.length)>=1;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(q.Z,{block:!0,noHoverUnderline:!0,onClick:function(){r(o?{}:t)},preventDefault:!0,children:(0,G.jsxs)(v.ZP,{alignItems:"center",flexDirection:"row",children:[(0,G.jsx)(ne.Z,{checked:i&&o,disabled:!i}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(j.ZP,{bold:!0,children:i&&o?"Unselect all":"Select all"})]})}),e.map((function(e){return(0,G.jsx)(oe,{children:(0,G.jsx)(q.Z,{block:!0,noHoverUnderline:!0,onClick:function(){return r((function(n){var r=ce({},n);return!(null!==r&&void 0!==r&&r[e])?r[e]=!0:delete r[e],r}))},preventDefault:!0,children:(0,G.jsxs)(v.ZP,{alignItems:"center",flexDirection:"row",children:[(0,G.jsx)(ne.Z,{checked:!(null===n||void 0===n||!n[e])}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,children:e})]})})},e)}))]})}),[]),fe=(0,d.useMemo)((function(){return(0,ie.Qr)(w)}),[w]),me=y.ZP.git_custom_branches.detail("with_logs",{_format:"with_logs"}),ve=me.data,be=me.mutate,ge=(0,d.useMemo)((function(){var e;return(null===ve||void 0===ve||null===(e=ve.git_custom_branch)||void 0===e?void 0:e.logs)||[]}),[ve]),pe=(0,h.Db)(y.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){be(),r(),_("")},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),xe=(0,s.Z)(pe,2),je=xe[0],Ze=xe[1].isLoading,_e=(0,d.useMemo)((function(){return(0,G.jsx)(z.Z,{columnFlex:[1,1,1],columns:[{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:ge.map((function(e){var n=e.author,r=e.date,t=e.message;return[(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:null===n||void 0===n?void 0:n.name},"author"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:r},"date"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:t},"message")]})),uuid:"git-branch-logs"})}),[ge]);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(p.Z,{mb:L.HN,children:(0,G.jsxs)(v.ZP,{children:[(0,G.jsxs)(re.Z,{flex:1,flexDirection:"column",children:[(0,G.jsxs)(b.Z,{children:["Not staged ",(null===T||void 0===T?void 0:T.length)>=1&&"(".concat(null===T||void 0===T?void 0:T.length,")")]}),(0,G.jsx)(p.Z,{my:L.cd,children:(0,G.jsx)(m.Z,{light:!0})}),(0,G.jsx)(p.Z,{mb:L.cd,children:(0,G.jsxs)(v.ZP,{flexDirection:"row",children:[(0,G.jsx)(f.Z,{compact:!0,disabled:fe||de||le,loading:J,onClick:function(){X({git_custom_branch:{action_type:"add",files:Object.keys(w)}}).then((function(e){var n,r=e.data;null!==r&&void 0!==r&&r.git_custom_branch&&(null===u||void 0===u||null===(n=u.current)||void 0===n||n.focus())}))},primary:!0,children:"Add files"}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(f.Z,{compact:!0,disabled:fe||J||de,loading:le,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to undo all changes in the selected files?")&&te({git_custom_branch:{action_type:"checkout",files:Object.keys(w)}})},children:"Checkout files"})]})}),he(T,w,k,ce(ce({},t),c),R)]}),(0,G.jsx)(p.Z,{mr:L.cd}),(0,G.jsxs)(re.Z,{flex:1,flexDirection:"column",children:[(0,G.jsxs)(b.Z,{children:["Staged files ",(null===E||void 0===E?void 0:E.length)>=1&&"(".concat(null===E||void 0===E?void 0:E.length,")")]}),(0,G.jsx)(p.Z,{my:L.cd,children:(0,G.jsx)(m.Z,{light:!0})}),(0,G.jsx)(p.Z,{mb:L.cd,children:(0,G.jsx)(v.ZP,{flexDirection:"row",children:(0,G.jsx)(f.Z,{compact:!0,disabled:(0,ie.Qr)(S)||J||le,loading:de,onClick:function(){ae({git_custom_branch:{action_type:"reset",files:Object.keys(S)}})},secondary:!0,children:"Reset files"})})}),he(E,S,O,l,D)]})]})}),(0,G.jsxs)(p.Z,{mb:L.HN,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(b.Z,{children:"Commit"})}),(0,G.jsx)(p.Z,{mb:L.cd,children:(0,G.jsx)(Y.Z,{children:(0,G.jsx)(W.Z,{noPaddingContent:!0,title:N>=1?"Staged files (".concat(N,")"):"No staged files",children:null===E||void 0===E?void 0:E.map((function(e){return(0,G.jsx)(p.Z,{my:1,px:L.cd,children:(0,G.jsxs)(v.ZP,{justifyContent:"space-between",children:[(0,G.jsx)(q.Z,{default:!0,monospace:!0,onClick:function(){return o((function(n){return n===e?null:e}))},warning:null===t||void 0===t?void 0:t[e],children:e}),(0,G.jsx)(p.Z,{mr:1}),(null===t||void 0===t?void 0:t[e])&&(0,G.jsx)(j.ZP,{warning:!0,children:"Modified after staging"})]})},e)}))})})}),(0,G.jsx)(Z.Z,{label:"Commit message",monospace:!0,onChange:function(e){return _(e.target.value)},ref:u,value:g||""}),(0,G.jsx)(p.Z,{mt:L.cd,children:(0,G.jsxs)(v.ZP,{alignItems:"center",children:[(0,G.jsxs)(f.Z,{disabled:0===N||!((null===g||void 0===g?void 0:g.length)>=1),loading:Ze,onClick:function(){je({git_custom_branch:{action_type:"commit",message:g}})},primary:!0,children:["Commit ",(0,H._6)("file",N,!0)," with message"]}),0===N&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(j.ZP,{danger:!0,small:!0,children:"Please stage at least 1 file before committing."})]})]})})]}),(0,G.jsx)(p.Z,{mb:L.HN,children:(0,G.jsx)(Y.Z,{children:(0,G.jsxs)(W.Z,{noPaddingContent:!0,title:"Logs",children:[!ve&&(0,G.jsx)(p.Z,{p:L.cd,children:(0,G.jsx)(x.Z,{inverted:!0})}),ve&&_e]})})}),(0,G.jsxs)(p.Z,{mb:L.HN,children:[(0,G.jsx)(p.Z,{mb:L.HN,children:(0,G.jsx)(m.Z,{light:!0})}),(0,G.jsxs)(v.ZP,{children:[(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.Hd,{}),linkProps:{href:"/version-control?tab=".concat(A.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:A.uuid}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)(f.Z,{afterIcon:(0,G.jsx)(C.Kw,{}),linkProps:fe?{href:"/version-control?tab=".concat(M.uuid)}:null,noHoverUnderline:!0,primary:fe,sameColorAsText:!0,secondary:!fe,children:["Next: ",M.uuid]})]})]})]})},ue=r(12691),ae=r.n(ue),de=r(34376),he=r(26314),fe=r(69419);var me=function(e){var n=e.actionRemoteName,r=e.branch,t=e.fetchBranch,o=e.loading,i=e.remotes,l=e.setActionRemoteName,u=e.showError,a=(0,de.useRouter)(),Z=(0,d.useRef)(null),P=(0,d.useState)(null),w=P[0],I=P[1],O=(0,d.useState)(null),T=O[0],E=O[1],N=(0,d.useState)(null),R=N[0],M=N[1],D=(0,d.useState)(null),B=D[0],V=D[1],U=(0,d.useState)(!1),K=U[0],Q=U[1],X=(0,d.useState)(null),J=X[0],$=X[1],ee=(0,d.useState)(""),ne=ee[0],te=ee[1],oe=(0,d.useState)(""),ie=oe[0],le=oe[1],ce=(0,d.useState)(null),se=ce[0],ue=ce[1],me=(0,d.useMemo)((function(){return!(null===r||void 0===r||!r.name)}),[r]);(0,d.useEffect)((function(){var e,n;null!==r&&void 0!==r&&null!==(e=r.sync_config)&&void 0!==e&&e.repo_path&&null===se&&ue(null===r||void 0===r||null===(n=r.sync_config)||void 0===n?void 0:n.repo_path)}),[r,se]);var ve=(0,d.useMemo)((function(){var e,r;return null===i||void 0===i||null===(e=i.find((function(e){return e.name===n})))||void 0===e||null===(r=e.refs)||void 0===r?void 0:r.map((function(e){var n=e.name.split("/");return{name:n[n.length-1]}}))}),[n,i]),be=(0,h.Db)(y.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){t(),Q(!1)},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),ge=(0,s.Z)(be,2),pe=ge[0],xe=ge[1].isLoading,je=(0,h.Db)(y.ZP.oauths.useUpdate("github"),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){return window.location.href=window.location.href.split("?")[0]},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),Ze=(0,s.Z)(je,2),_e=Ze[0],Pe=Ze[1].isLoading,ye=(0,h.Db)(y.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.git_custom_branch,r=n.error,o=n.progress;r?(E(r),V(null)):(t(),I(null),E(null),M(null),V(o))},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),Ce=(0,s.Z)(ye,2),we=Ce[0],ke=Ce[1].isLoading,Ie=(0,h.Db)(y.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){t(),te(""),le("")},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),Se=(0,s.Z)(Ie,2),Oe=Se[0],Te=Se[1].isLoading,Ee=(0,h.Db)(y.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){t(),$(null)},onErrorCallback:function(e,n){$(null),u({errors:n,response:e})}})}}),Ne=(0,s.Z)(Ee,2),Ae=Ne[0],Re=Ne[1].isLoading,Me=y.ZP.oauths.detail(he.G.GITHUB,{redirect_uri:encodeURIComponent(window.location.href)}),De=Me.data,Be=Me.mutate,Le=(0,d.useMemo)((function(){return(null===De||void 0===De?void 0:De.oauth)||{}}),[De]),He=(0,h.Db)(y.ZP.oauths.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){Be()},onErrorCallback:function(e,n){u({errors:n,response:e})}})}}),Fe=(0,s.Z)(He,2),Ge=Fe[0],Ve=Fe[1].isLoading,Ue=((0,fe.iV)()||{}).access_token;(0,d.useEffect)((function(){!Le||null!==Le&&void 0!==Le&&Le.authenticated||!Ue||Ge({oauth:{provider:he.G.GITHUB,token:Ue}})}),[Ue,Ge,Le]);var Ye=(0,d.useMemo)((function(){return null===i||void 0===i?void 0:i.map((function(e){var r=e.name,t=e.refs,o=e.urls;return(0,G.jsxs)(p.Z,{mt:L.Mq,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,G.jsxs)(re.Z,{alignItems:"center",children:[(0,G.jsx)(j.ZP,{bold:!0,children:r}),(0,G.jsx)(p.Z,{mx:1,children:(0,G.jsx)(C._Q,{muted:!0})}),null===o||void 0===o?void 0:o.map((function(e){return(0,G.jsx)(p.Z,{mr:1,children:(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:e})},e)}))]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(f.Z,{compact:!0,disabled:Re&&J!==r,iconOnly:!0,loading:Re&&J===r,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to remove remote ".concat(r,"?"))&&($(r),Ae({git_custom_branch:{action_type:"remove_remote",remote:{name:r}}}).then((function(){n===r&&l(null)})))},small:!0,title:"Remote remote ".concat(r),children:(0,G.jsx)(C.rF,{})})]})}),(0,G.jsx)(Y.Z,{children:(0,G.jsxs)(W.Z,{noPaddingContent:!0,smallTitle:!0,title:"Refs (".concat(null===t||void 0===t?void 0:t.length,")"),children:[0===(null===t||void 0===t?void 0:t.length)&&(0,G.jsx)(p.Z,{p:L.cd,children:(0,G.jsx)(j.ZP,{muted:!0,children:"This remote has no refs."})}),(null===t||void 0===t?void 0:t.length)>=1&&(0,G.jsx)(z.Z,{columnFlex:[1,1,1],columns:[{uuid:"Ref"},{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:t.map((function(e){var n,r=e.commit,t=e.name;return[(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:t},"ref-name"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r||null===(n=r.author)||void 0===n?void 0:n.name},"author"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r?void 0:r.date},"date"),(0,G.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r?void 0:r.message},"message")]})),uuid:"git-branch-remotes-refs"})]})}),(0,G.jsx)(p.Z,{mt:L.Mq,children:(0,G.jsx)(m.Z,{light:!0})})]},r)}))}),[Re,J,i,Ae]);return(0,G.jsxs)(G.Fragment,{children:[De&&(0,G.jsxs)(p.Z,{mb:L.HN,children:[(null===Le||void 0===Le?void 0:Le.authenticated)&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.fy,{size:2*L.iI}),disabled:!0,children:"Successfully authenticated with GitHub"}),(0,G.jsx)(p.Z,{my:1,children:(0,G.jsx)(j.ZP,{muted:!0,children:"You can pull, push, and create pull requests on GitHub."})}),(0,G.jsx)(f.Z,{loading:Pe,onClick:function(){return _e({oauth:{action_type:"reset"}})},warning:!0,children:"Reset GitHub authentication"})]}),!(null!==Le&&void 0!==Le&&Le.authenticated)&&(null===Le||void 0===Le?void 0:Le.url)&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.fy,{size:2*L.iI}),loading:Ve,onClick:function(){return a.push(null===Le||void 0===Le?void 0:Le.url)},primary:!0,children:"Authenticate with GitHub"}),(0,G.jsx)(p.Z,{mt:1,children:(0,G.jsx)(j.ZP,{muted:!0,children:"Authenticating with GitHub will allow you to pull, push, and create pull requests on GitHub."})})]})]}),(0,G.jsxs)(p.Z,{mb:L.HN,children:[(0,G.jsx)(b.Z,{children:"Setup"}),(0,G.jsxs)(p.Z,{mt:L.Mq,children:[(0,G.jsxs)(p.Z,{mb:1,children:[(0,G.jsx)(j.ZP,{bold:!0,large:!0,children:me?"Git init directory":"Initialize Git directory"}),!me&&(0,G.jsxs)(j.ZP,{muted:!0,children:["Enter the directory you want to initialize git in. For example, ",(0,G.jsx)(j.ZP,{bold:!0,inline:!0,monospace:!0,muted:!0,children:"/home/src/default_repo"}),"."]}),me&&(0,G.jsxs)(j.ZP,{muted:!0,children:["If the directory below is blank, then the current working directory will be used to initialize git.",(0,G.jsx)("br",{}),"If git hasn\u2019t been initialized in the directory below, Mage will automatically run git init for you."]})]}),(0,G.jsxs)(v.ZP,{alignItems:"center",children:[(0,G.jsx)(_.Z,{disabled:me&&!K,label:"Git directory",monospace:!0,onChange:function(e){return ue(e.target.value)},ref:Z,value:se||""}),(0,G.jsx)(p.Z,{mr:1}),(!me||K)&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(f.Z,{compact:!0,disabled:!me&&!se,loading:xe,onClick:function(){pe({sync:{repo_path:se}})},primary:!0,small:!0,children:"Save"}),me&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(q.Z,{onClick:function(){return Q(!1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Cancel"})]})]}),me&&!K&&(0,G.jsx)(q.Z,{onClick:function(){Q(!0),setTimeout((function(){var e;return null===Z||void 0===Z||null===(e=Z.current)||void 0===e?void 0:e.focus()}),1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Edit"})]})]})]}),me&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(p.Z,{mb:L.HN,children:[(0,G.jsxs)(b.Z,{children:["Remotes",!o&&i?" (".concat(null===i||void 0===i?void 0:i.length,")"):""]}),o&&(0,G.jsx)(p.Z,{mt:L.Mq,children:(0,G.jsx)(x.Z,{inverted:!0})}),!o&&Ye,(0,G.jsx)(p.Z,{mt:L.Mq,children:(0,G.jsxs)(v.ZP,{alignItems:"flex-start",children:[(0,G.jsx)(_.Z,{label:"New remote name",monospace:!0,onChange:function(e){var n;return te(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:ne||""}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsxs)(v.ZP,{flexDirection:"column",children:[(0,G.jsx)(_.Z,{label:"Remote URL",monospace:!0,onChange:function(e){var n;return le(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:ie||""}),(0,G.jsx)(p.Z,{mt:1,children:(0,G.jsxs)(j.ZP,{muted:!0,small:!0,children:["Use the https URL if you",(0,G.jsx)("br",{}),"authenticated with GitHub above."]})})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.mm,{size:2*L.iI}),disabled:!ne||!ie,loading:Te,onClick:function(){Oe({git_custom_branch:{action_type:"add_remote",remote:{name:ne,url:ie}}})},primary:!0,children:"Create new remote"})]})})]}),(0,G.jsxs)(p.Z,{mb:L.HN,children:[(0,G.jsx)(b.Z,{children:"Actions"}),(0,G.jsxs)(p.Z,{mt:L.Mq,children:[(0,G.jsxs)(p.Z,{mb:L.Mq,children:[(0,G.jsx)(p.Z,{mb:1,children:(0,G.jsx)(j.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(null===r||void 0===r?void 0:r.name)&&(0,G.jsxs)(v.ZP,{alignItems:"center",children:[(0,G.jsx)(j.ZP,{monospace:!0,children:null===r||void 0===r?void 0:r.name}),(0,G.jsx)(p.Z,{mr:L.cd}),(0,G.jsx)(ae(),{href:"/version-control?tab=".concat(A.uuid),passHref:!0,children:(0,G.jsx)(q.Z,{small:!0,children:"Switch branch"})})]})]}),(0,G.jsxs)(v.ZP,{children:[(0,G.jsxs)(g.Z,{onChange:function(e){return M(e.target.value)},placeholder:"Action",value:R||"",children:[(0,G.jsx)("option",{value:k,children:(0,H.vg)(k)}),(0,G.jsx)("option",{value:S,children:(0,H.vg)(S)}),(0,G.jsx)("option",{value:"reset",children:(0,H.vg)("reset --hard")})]}),(0,G.jsx)(p.Z,{mr:1}),(0,G.jsx)(g.Z,{beforeIcon:(0,G.jsx)(C.VW,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return l(e.target.value)},placeholder:"Remote",value:n||"",children:null===i||void 0===i?void 0:i.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))}),R!==k&&(0,G.jsx)(p.Z,{ml:1,children:(0,G.jsxs)(g.Z,{beforeIcon:(0,G.jsx)(C.I0,{}),beforeIconSize:1.5*L.iI,monospace:!0,onChange:function(e){return I(e.target.value)},value:w||"",children:[(0,G.jsx)("option",{value:"",children:"All branches"}),null===ve||void 0===ve?void 0:ve.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))]})})]}),(0,G.jsxs)(p.Z,{mt:L.cd,children:[(0,G.jsx)(f.Z,{beforeIcon:(0,G.jsx)(C.Bf,{size:2*L.iI}),disabled:!R||!n,loading:ke,onClick:function(){V(null),we({git_custom_branch:(0,c.Z)({action_type:R},R,{branch:w,remote:n})})},primary:!0,children:R?(0,H.vg)(R):"Execute action"}),(B||T)&&(0,G.jsx)(p.Z,{mt:L.cd,children:(0,G.jsx)(j.ZP,{danger:!!T,default:!!B,monospace:!0,preWrap:!0,children:B||T})})]})]})]}),(0,G.jsxs)(p.Z,{mb:L.HN,children:[(0,G.jsx)(p.Z,{mb:L.HN,children:(0,G.jsx)(m.Z,{light:!0})}),(0,G.jsx)(v.ZP,{children:(0,G.jsxs)(f.Z,{afterIcon:(0,G.jsx)(C.Kw,{}),linkProps:{href:"/version-control?tab=".concat(A.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",A.uuid]})})]})]})]})},ve=r(95363),be=te.default.div.withConfig({displayName:"indexstyle__DiffContainerStyle",componentId:"sc-1fo4nus-0"})(["pre{font-family:",";}"],ve.Vp),ge={codeFoldGutter:{},content:{},contentText:{},diffAdded:{},diffContainer:{},diffRemoved:{},emptyGutter:{},emptyLine:{},gutter:{},highlightedGutter:{},highlightedLine:{},line:{},lineNumber:{},marker:{},splitView:{},titleBlock:{},variables:{dark:{addedBackground:"#044B53",addedColor:"white",addedGutterBackground:"#034148",addedGutterColor:"#8c8c8c",codeFoldBackground:"#262831",codeFoldContentColor:"#555a7b",codeFoldGutterBackground:"#21232b",diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",diffViewerTitleBackground:"#2f323e",diffViewerTitleBorderColor:"#353846",diffViewerTitleColor:"#555a7b",emptyLineBackground:"#363946",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",gutterColor:"#464c67",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",removedBackground:"#632F34",removedColor:"white",removedGutterBackground:"#632b30",removedGutterColor:"#8c8c8c",wordAddedBackground:"#055d67",wordRemovedBackground:"#7d383f"},light:{addedBackground:"#e6ffed",addedColor:"#24292e",addedGutterBackground:"#cdffd8",addedGutterColor:"#212529",codeFoldBackground:"#f1f8ff",codeFoldContentColor:"#212529",codeFoldGutterBackground:"#dbedff",diffViewerBackground:"#fff",diffViewerColor:"212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleBorderColor:"#eee",diffViewerTitleColor:"#212529",emptyLineBackground:"#fafbfc",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",gutterColor:"#212529",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",removedBackground:"#ffeef0",removedColor:"#24292e",removedGutterBackground:"#ffdce0",removedGutterColor:"#212529",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0"}},wordAdded:{},wordDiff:{},wordRemoved:{}},pe=r(53808),xe=r(53005),je=r(15610),Ze=r(86735),_e=r(23780);function Pe(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 ye(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var Ce=function(){var e=(0,d.useRef)(null),n=(0,d.useRef)(null),r=(0,_e.VI)(null,{},[],{uuid:"VersionControlPage"}),t=(0,s.Z)(r,1)[0],o=(0,d.useState)(null),i=o[0],l=o[1],h=(0,d.useState)(null),f=h[0],v=h[1],b=(0,d.useState)(B[0]),Z=b[0],_=b[1],C=(0,fe.iV)();(0,d.useEffect)((function(){null!==C&&void 0!==C&&C.tab&&_(B.find((function(e){return e.uuid===(null===C||void 0===C?void 0:C.tab)})))}),[C]);var w=y.ZP.git_custom_branches.list({include_remote_branches:1}),k=w.data,I=w.mutate,S=(0,d.useMemo)((function(){return null===k||void 0===k?void 0:k.git_custom_branches}),[k]),O=y.ZP.git_custom_branches.detail("current",{_format:"with_files"}),T=O.data,H=O.mutate,F=(0,d.useMemo)((function(){return(null===T||void 0===T?void 0:T.git_custom_branch)||{}}),[T]),Y=(0,d.useMemo)((function(){return(null===F||void 0===F?void 0:F.files)||[]}),[F]),W=y.ZP.git_custom_branches.detail("with_remotes",{_format:"with_remotes"}),q=W.data,z=W.mutate,K=(0,d.useMemo)((function(){return null===q||void 0===q?void 0:q.git_custom_branch}),[q]),Q=(0,d.useMemo)((function(){return(null===K||void 0===K?void 0:K.remotes)||[]}),[K]),X=(0,d.useState)(null),ne=X[0],re=X[1],te=(0,d.useCallback)((function(e){(0,pe.t8)(E,e),re(e)}),[]);(0,d.useEffect)((function(){var e=(0,pe.U2)(E,null);if(q&&e){var n=null===Q||void 0===Q?void 0:Q.find((function(n){return n.name===e}));te(n?null===n||void 0===n?void 0:n.name:null)}}),[q,Q,te]);var oe=(0,d.useState)((0,pe.U2)(N,"")),le=oe[0],ce=oe[1],ue=(0,d.useCallback)((function(e){(0,pe.t8)(N,e),ce(e)}),[]),ae=(0,d.useMemo)((function(){return(0,Ze.Tw)(Q.reduce((function(e,n){var r;return e.concat((null===n||void 0===n||null===(r=n.repository_names)||void 0===r?void 0:r.map((function(e){var r;return{name:e,url:null===n||void 0===n||null===(r=n.urls)||void 0===r?void 0:r[0]}})))||[])}),[]),(function(e){return e.name}))}),[Q]);(0,d.useEffect)((function(){var e=(0,pe.U2)(N,null);if(q&&e){var n=null===ae||void 0===ae?void 0:ae.find((function(n){return n.name===e}));ue(n?null===n||void 0===n?void 0:n.name:null)}}),[q,ae,ue]);var de=y.ZP.git_files.detail(f?encodeURIComponent(f):null,{base_branch:i}),he=de.data,ve=de.mutate,Pe=(0,d.useMemo)((function(){return null===he||void 0===he?void 0:he.git_file}),[he]);(0,d.useEffect)((function(){i&&ve()}),[i,ve]),(0,d.useEffect)((function(){null!==he&&void 0!==he&&he.error&&t({errors:null===he||void 0===he?void 0:he.error,response:he})}),[he,t]);var Ce=(0,d.useMemo)((function(){var e,n,r;return{modifiedFiles:null===F||void 0===F||null===(e=F.modified_files)||void 0===e?void 0:e.reduce((function(e,n){return ye(ye({},e),{},(0,c.Z)({},n,!0))}),{}),stagedFiles:null===F||void 0===F||null===(n=F.staged_files)||void 0===n?void 0:n.reduce((function(e,n){return ye(ye({},e),{},(0,c.Z)({},n,!0))}),{}),untrackedFiles:null===F||void 0===F||null===(r=F.untracked_files)||void 0===r?void 0:r.reduce((function(e,n){return ye(ye({},e),{},(0,c.Z)({},n,!0))}),{})}}),[F]),we=Ce.modifiedFiles,ke=void 0===we?{}:we,Ie=Ce.stagedFiles,Se=void 0===Ie?{}:Ie,Oe=Ce.untrackedFiles,Te=void 0===Oe?{}:Oe;(0,d.useEffect)((function(){f&&(0,ie.Qr)(ke)&&(0,ie.Qr)(Se)&&(0,ie.Qr)(Te)&&v(null)}),[ke,f,Se,Te]);var Ee=(0,d.useMemo)((function(){return(null===Y||void 0===Y?void 0:Y.length)>=1?(0,G.jsx)(ee.Z,{allowEmptyFolders:!0,disableContextMenu:!0,fetchFileTree:H,files:Y,isFileDisabled:function(){return!1},onClickFile:function(e){v((function(r){if(!r||r!==e){var t;if(!i)null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus();return e}return null}))},ref:e,renderAfterContent:function(e){var n,r,t=e.children,o=(null===t||void 0===t?void 0:t.length)>=1,i=(0,xe.a9)(e);o&&(i="".concat(i,"/"));var l={};return null!==ke&&void 0!==ke&&ke[i]?(n="M",r="Modified",l.warning=!0):null!==Te&&void 0!==Te&&Te[i]?(n="U",r="Untracked",l.danger=!0):null!==Se&&void 0!==Se&&Se[i]&&(n="S",r="Staged",l.success=!0),o&&!n?null:(0,G.jsx)(p.Z,{mx:1,children:(0,G.jsx)(P.Z,{appearBefore:!0,label:r,widthFitContent:!0,children:(0,G.jsx)(j.ZP,ye(ye({},l),{},{monospace:!0,rightAligned:!0,small:!0,children:n}))})})},useRootFolder:!0}):(0,G.jsx)(p.Z,{p:L.cd,children:(0,G.jsx)(j.ZP,{monospace:!0,muted:!0,children:"No files modified"})})}),[i,H,e,Y,ke,n,v,Se,Te]),Ne=(0,d.useMemo)((function(){return!he||!Pe||f&&(null===Pe||void 0===Pe?void 0:Pe.filename)!==f}),[he,Pe,f]),Ae=(0,d.useMemo)((function(){if(!f)return null;var e=Pe||{},n=e.content,r=e.content_from_base;return(0,G.jsxs)(be,{children:[!i&&(0,G.jsx)(p.Z,{p:L.cd,children:(0,G.jsx)(j.ZP,{muted:!0,children:"Please select a base branch to see the file diffs."})}),(null===Pe||void 0===Pe?void 0:Pe.error)&&(0,G.jsx)(p.Z,{p:L.cd,children:(0,G.jsx)(j.ZP,{danger:!0,monospace:!0,preWrap:!0,children:null===Pe||void 0===Pe?void 0:Pe.error})}),i&&!(null!==Pe&&void 0!==Pe&&Pe.error)&&(0,G.jsxs)(G.Fragment,{children:[Ne&&(0,G.jsx)(p.Z,{p:L.cd,children:(0,G.jsx)(x.Z,{inverted:!0})}),!Ne&&(0,G.jsx)(a(),{compareMethod:u.DiffMethod.WORDS,newValue:n||"",oldValue:r||"",renderContent:function(e){return(0,G.jsx)(j.ZP,{monospace:!0,children:e})},splitView:!0,styles:ge,useDarkTheme:!0})]})]})}),[i,Pe,Ne,f]),Re=(0,d.useMemo)((function(){return T&&null!==F&&void 0!==F&&F.name?B:B.slice(0,1)}),[F,T]),Me=(0,d.useMemo)((function(){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)("div",{style:{marginBottom:.5*L.iI,marginTop:.5*L.iI},children:(0,G.jsx)(U.Z,{compact:!0,onClickTab:function(e){var n=e.uuid;(0,je.u7)({tab:n})},selectedTabUUID:null===Z||void 0===Z?void 0:Z.uuid,tabs:Re})}),(0,G.jsx)(m.Z,{light:!0})]})}),[Z,Re]),De=(0,d.useMemo)((function(){return(0,G.jsx)(me,{actionRemoteName:ne,branch:F,fetchBranch:function(){H(),z()},loading:!q,remotes:Q,setActionRemoteName:te,showError:t})}),[ne,F,q,H,z,Q,te,t]),Be=(0,d.useMemo)((function(){return(0,G.jsx)(V,{actionRemoteName:ne,branch:F,branches:S,fetchBranch:H,fetchBranches:I,remotes:Q,setActionRemoteName:te,showError:t})}),[ne,F,S,H,I,Q,te,t]),Le=(0,d.useMemo)((function(){return(0,G.jsx)(se,{branch:F,fetchBranch:H,modifiedFiles:ke,setSelectedFilePath:v,showError:t,stagedFiles:Se,untrackedFiles:Te})}),[F,H,ke,v,t,Se,Te]),He=(0,d.useMemo)((function(){return(0,G.jsx)(J,{actionRemoteName:ne,branch:F,branches:S,fetchBranch:H,loading:!q,modifiedFiles:ke,remotes:Q,repositories:ae,repositoryName:le,setActionRemoteName:te,setRepositoryName:ue,showError:t,stagedFiles:Se})}),[ne,F,S,q,H,ke,Q,ae,le,te,ue,t,Se]);return(0,G.jsx)($.Z,{after:Ae,afterHidden:!f,afterWidth:40*L.iI,before:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(p.Z,{p:1,children:(0,G.jsx)(g.Z,{compact:!0,label:"Base branch",onChange:function(e){return l(e.target.value)},ref:n,small:!0,value:i||"",children:null===S||void 0===S?void 0:S.map((function(e){var n=e.name;return(0,G.jsx)("option",{value:n,children:n},n)}))})}),Ee]}),mainContainerHeader:Me,title:"Version control",uuid:"Version control/index",children:(0,G.jsxs)(p.Z,{p:L.cd,children:[!T&&(0,G.jsx)(x.Z,{inverted:!0}),T&&(0,G.jsxs)(G.Fragment,{children:[D.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&De,A.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&Be,R.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&Le,M.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&He]})]})})};function we(){return(0,G.jsx)(Ce,{})}we.getInitialProps=(0,t.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var ke=(0,l.Z)(we)},75302:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/version-control",function(){return r(58024)}])}},function(e){e.O(0,[844,2083,7011,8478,8013,600,9696,8264,4666,5499,4839,553,9774,2888,179],(function(){return n=75302,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1769],{81769:function(n,e,t){t.d(e,{Z:function(){return rn}});var i=t(82394),r=t(82684),l=t(85854),o=t(21831),c=t(65701),u=t(1254),a=t(97618),s=t(55485),d=t(70652),v=t(54193),f=t(44085),h=t(38276),j=t(30160),p=t(35576),x=t(17488),m=t(69650),b=t(70515),Z=t(28598);function g(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 y(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?g(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var w=function(n){var e=n.interaction,t=n.setVariables,l=n.showVariableUUID,o=n.variables,c=e||{inputs:{},layout:[],variables:{}},u=c.inputs,g=c.layout,w=c.variables,P=(0,r.useMemo)((function(){var n=[];return null===g||void 0===g||g.forEach((function(e,c){var g=[];null===e||void 0===e||e.forEach((function(n,e){var c,P=n.variable,I=(n.width,(null===w||void 0===w?void 0:w[P])||{uuid:P}),O=I.description,C=I.input,k=I.name,D=I.required,E=(null===u||void 0===u?void 0:u[C])||{options:[],style:null,type:null},M=E.options,S=E.style,R=E.type,B="".concat(P,"-").concat(R),T={required:D},_=[],N="undefined"!==typeof o?null===o||void 0===o?void 0:o[P]:void 0;if(v.bB.CHECKBOX===R)_.push((0,Z.jsx)(s.ZP,{alignItems:"center",children:null===M||void 0===M?void 0:M.map((function(n){var e=n.label,r=n.value,l=(null===o||void 0===o?void 0:o[P])||{},c=null===l||void 0===l?void 0:l[r];return(0,Z.jsx)(h.Z,{mr:b.cd,children:(0,Z.jsx)(d.Z,y(y({},T),{},{label:e,checked:!!c,onClick:function(){return t((function(n){return y(y({},n),{},(0,i.Z)({},P,y(y({},l),{},(0,i.Z)({},r,!c))))}))}}))},String(r||e))}))},"".concat(B,"-").concat(R)));else if(v.bB.TEXT_FIELD===R)_.push((0,Z.jsx)(s.ZP,{flexDirection:"column",children:null!==S&&void 0!==S&&S.multiline?(0,r.createElement)(p.Z,y(y({},T),{},{key:"".concat(B,"-").concat(R),onChange:function(n){return t((function(e){return y(y({},e),{},(0,i.Z)({},P,n.target.value))}))},value:N})):(0,r.createElement)(x.Z,y(y({},T),{},{key:"".concat(B,"-").concat(R),onChange:function(n){return t((function(e){return y(y({},e),{},(0,i.Z)({},P,n.target.value))}))},type:(null===S||void 0===S?void 0:S.input_type)||null,value:N}))},"".concat(B,"-").concat(R)));else if(v.bB.DROPDOWN_MENU===R)_.push((0,r.createElement)(f.Z,y(y({},T),{},{key:"".concat(B,"-").concat(R),onChange:function(n){return t((function(e){return y(y({},e),{},(0,i.Z)({},P,n.target.value))}))},value:N}),(0,Z.jsx)("option",{value:""}),null===M||void 0===M?void 0:M.map((function(n){var e=n.label,t=n.value;return(0,Z.jsx)("option",{value:String(t||e),children:String(e||t)},String(t||e))}))));else if(v.bB.SWITCH===R){var U;g.push((0,Z.jsx)(h.Z,{mt:e>=1?b.cd:0,children:(0,Z.jsxs)(s.ZP,{alignItems:"center",fullWidth:!0,children:[(0,r.createElement)(m.Z,y(y({},T),{},{checked:N,compact:!0,key:"".concat(B,"-").concat(R),onCheck:function(n){return t((function(e){return y(y({},e),{},(0,i.Z)({},P,n(N)))}))}})),(k||O)&&(0,Z.jsx)(h.Z,{ml:b.cd}),(k||O||l)&&(0,Z.jsxs)(s.ZP,{alignItems:"flex-start",flexDirection:"row",fullWidth:!0,justifyContent:"space-between",children:[(k||O)&&(0,Z.jsxs)(a.Z,{flex:1,flexDirection:"column",children:[k&&(0,Z.jsx)(j.ZP,{bold:!0,large:!0,success:!0,children:k}),O&&(null===O||void 0===O||null===(U=O.split("\n"))||void 0===U?void 0:U.map((function(n){return(0,Z.jsx)(j.ZP,{default:!0,children:n},n)})))]}),l&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(h.Z,{mr:b.cd}),(0,Z.jsx)(j.ZP,{monospace:!0,muted:!0,small:!0,children:P})]})]})]})},B))}(null===_||void 0===_?void 0:_.length)>=1&&g.push((0,Z.jsxs)(h.Z,{mt:e>=1?b.cd:0,children:[(k||O||l)&&(0,Z.jsxs)(s.ZP,{alignItems:"flex-start",justifyContent:"space-between",children:[(0,Z.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,Z.jsxs)(h.Z,{mb:1,children:[k&&(0,Z.jsx)(j.ZP,{bold:!0,large:!0,success:!0,children:k}),O&&(null===O||void 0===O||null===(c=O.split("\n"))||void 0===c?void 0:c.map((function(n){return(0,Z.jsx)(j.ZP,{default:!0,children:n},n)})))]})}),(0,Z.jsx)(h.Z,{mr:b.cd}),l&&(0,Z.jsx)(j.ZP,{monospace:!0,muted:!0,small:!0,children:P})]}),_]},B))})),n.push((0,Z.jsx)(h.Z,{mt:c>=1?b.Mq:0,children:g},"row-".concat(c)))})),n}),[u,g,t,l,w,o]);return(0,Z.jsx)(Z.Fragment,{children:P})},P=t(72473),I=t(38626),O=t(44897),C=t(42631),k=t(55283),D=(b.iI,I.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ry80xj-0"})([""," border-radius:","px;position:relative;border-style:solid;border-width:1px;overflow:hidden;",""],k.Kf,C.n_,(function(n){return"\n background-color: ".concat((n.theme.background||O.Z.background).panel,";\n ")}))),E=I.default.div.withConfig({displayName:"indexstyle__HeadlineStyle",componentId:"sc-1ry80xj-1"})(["",""],(function(n){return"\n background-color: ".concat((n.theme.background||O.Z.background).chartBlock,";\n ")})),M=I.default.div.withConfig({displayName:"indexstyle__DottedLineStyle",componentId:"sc-1ry80xj-2"})(["",""],(function(n){return"\n border: 1px dashed ".concat((n.theme.borders||O.Z.borders).light,";\n ")})),S=I.default.div.withConfig({displayName:"indexstyle__LayoutItemStyle",componentId:"sc-1ry80xj-3"})(["",""],(function(n){return!n.disableDrag&&"\n &:hover {\n cursor: move;\n }\n "}));var R=function(n){var e=n.columnLayoutSettings,t=n.drag,r=n.drop,l=n.input,o=n.setVariables,c=n.showVariableUUID,u=n.variable,a=n.variables,s=n.width,d=null===u||void 0===u?void 0:u.input,v=null===e||void 0===e?void 0:e.variable;return(0,Z.jsx)(S,{disableDrag:!t,ref:r,style:{width:s},children:(0,Z.jsx)(D,{ref:t,style:{marginLeft:b.iI,marginRight:b.iI},children:(0,Z.jsxs)(h.Z,{p:b.cd,children:[!!t&&(0,Z.jsx)(h.Z,{mb:1,children:(0,Z.jsx)(P.o0,{default:!0,size:2*b.iI})}),(0,Z.jsx)(w,{interaction:{inputs:(0,i.Z)({},d,l),layout:[[{variable:v,width:1}]],variables:(0,i.Z)({},v,u)},setVariables:o,showVariableUUID:c,variables:a})]})})})},B=t(75582),T=t(26304),_=t(10975),N=t(14567),U=["columnIndex","columnsInRow","onDrop","rowIndex"];function L(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 V(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?L(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var F=function(n){var e=n.columnIndex,t=(n.columnsInRow,n.onDrop),i=n.rowIndex,r=(0,T.Z)(n,U),l=(0,_.c)((function(){return{collect:function(n){return{isDragging:!!n.isDragging()}},item:{columnIndex:e,rowIndex:i},type:"InteractionLayoutItem"}}),[e,i]),o=(0,B.Z)(l,2),c=(o[0],o[1]),u=(0,N.L)((function(){return{accept:"InteractionLayoutItem",drop:function(n){return null===t||void 0===t?void 0:t(n)}}}),[t]),a=(0,B.Z)(u,2)[1];return(0,Z.jsx)(R,V(V({},r),{},{drag:c,drop:a}))};var A=function(n){var e=n.children,t=n.onDrop,i=n.width,r=(0,N.L)((function(){return{accept:"InteractionLayoutItem",drop:function(n){return null===t||void 0===t?void 0:t(n)}}}),[t]),l=(0,B.Z)(r,2)[1];return(0,Z.jsx)("div",{ref:l,style:{width:i},children:(0,Z.jsxs)(h.Z,{p:b.cd,children:[e,(0,Z.jsx)(M,{})]})})},W=t(86735),q=t(19183);var X=function(n){var e=n.containerRef,t=n.containerWidth,i=n.interaction,l=n.setVariables,d=n.showVariableUUID,v=n.updateLayout,f=n.variables,j=(0,q.i)(),p=(0,r.useState)(null),x=p[0],m=p[1];(0,r.useEffect)((function(){var n;null!==e&&void 0!==e&&e.current&&m(null===e||void 0===e||null===(n=e.current)||void 0===n?void 0:n.getBoundingClientRect())}),[t,e,j]);var b=(0,r.useMemo)((function(){return{inputs:null===i||void 0===i?void 0:i.inputs,layout:null===i||void 0===i?void 0:i.layout,variables:null===i||void 0===i?void 0:i.variables}}),[i]),g=b.inputs,y=b.layout,w=b.variables,P=(0,r.useCallback)((function(n,e,t,i,r){var l=(0,o.Z)(y||[]),c=l[n]||[],u=c[e];if(null!==r&&void 0!==r&&r.newRow){var a,s=(0,W.oM)(c,e);return l[n]=s,-1===t?l.unshift([u]):t>=(null===(a=l)||void 0===a?void 0:a.length)?l.push([u]):l=(0,W.VS)([u],t,l),0===(null===s||void 0===s?void 0:s.length)&&(l=(0,W.oM)(l,t<n?n+1:n)),void(null===v||void 0===v||v(l))}if(n===t&&e!==i){var d=(0,W.oM)(c,e);l[n]=(0,W.Hk)(u,i>e?i:i-1,d)}else{var f=(0,W.oM)(c,e);l[n]=f;var h=(0,W.Hk)(u,i,l[t]);l[t]=h,0===(null===f||void 0===f?void 0:f.length)&&(l=(0,W.oM)(l,n))}n===t&&e===i||null===v||void 0===v||v(l)}),[y,v]),I=(0,r.useMemo)((function(){return(null===y||void 0===y?void 0:y.length)||0}),[y]),O=(0,r.useMemo)((function(){var n=[];return null===y||void 0===y||y.forEach((function(e,t){var i=(null===e||void 0===e?void 0:e.length)||0,r=[],o=(0,W.Sm)(null===e||void 0===e?void 0:e.map((function(n){return n.width||0}))),c=(null===e||void 0===e?void 0:e.length)||0,u=null===x||void 0===x?void 0:x.width;null===e||void 0===e||e.forEach((function(n,e){var s=n||{variable:null,width:0},h=s.variable,j=s.max_width_percentage,p=s.width,x=null===w||void 0===w?void 0:w[h],m=null===g||void 0===g?void 0:g[null===x||void 0===x?void 0:x.input],b="undefined"!==typeof j&&null!==j?j>=0?j/100:j:null,y=p/o,I=b&&y>b?b:y,O=v?F:R,C=Math.floor(I*u)-(v?Math.round(24/i):Math.round(50/i));r.push((0,Z.jsx)(a.Z,{flexBasis:"".concat(Math.floor(100*I),"%"),children:(0,Z.jsx)(O,{columnIndex:e,columnLayoutSettings:n,columnsInRow:c,disableDrag:!!v,first:0===e,input:m,onDrop:function(n){var i=n.columnIndex,r=n.rowIndex;P(r,i,t,e)},rowIndex:t,setVariables:l,showVariableUUID:d,variable:x,variables:f,width:C})},"row-".concat(t,"-column-").concat(e,"-").concat(h)))})),0===t&&v&&n.push((0,Z.jsx)(A,{onDrop:function(n){var e=n.columnIndex,i=n.rowIndex;P(i,e,t-1,0,{newRow:!0})}},"layout-divider-".concat(t,"-top"))),n.push((0,Z.jsx)(s.ZP,{children:r},"row-".concat(t))),v?n.push((0,Z.jsx)(A,{onDrop:function(n){var e=n.columnIndex,i=n.rowIndex;P(i,e,t+1,0,{newRow:!0})}},"layout-divider-".concat(t,"-bottom"))):t<I-1&&n.push((0,Z.jsx)(h.Z,{py:2},"layout-divider-".concat(t,"-bottom")))})),n}),[x,g,y,P,I,l,d,v,w,f]);return v?(0,Z.jsx)(c.W,{backend:u.PD,children:O}):(0,Z.jsx)(Z.Fragment,{children:O})},H=t(32013),K=t(98777),Y=t(71180),G=t(15338),z=t(81728),J=t(3314);function Q(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 $(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Q(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var nn=function(n){var e,t,c,u,g=n.children,y=n.interaction,I=n.removeBlockInteraction,O=n.updateInteraction,C=(0,r.useRef)(null),k=(0,r.useRef)(null),M=(0,r.useRef)(null),S=(0,r.useRef)(null),R=(0,r.useRef)(null),T=(0,r.useState)(!1),_=T[0],N=T[1],U=(0,r.useState)(!1),L=U[0],V=U[1],F=(0,r.useState)(null),A=F[0],q=F[1],Q=(0,r.useState)(null),nn=Q[0],en=Q[1],tn=(0,r.useState)(null),rn=tn[0],ln=tn[1],on=(0,r.useState)(null),cn=on[0],un=on[1],an=(0,r.useState)(null),sn=an[0],dn=an[1],vn=(0,r.useState)({}),fn=vn[0],hn=vn[1],jn=y||{layout:null,variables:null,uuid:null},pn=jn.inputs,xn=jn.layout,mn=jn.uuid,bn=jn.variables,Zn=(0,r.useCallback)((function(n){return O($($({},y),n))}),[y,O]),gn=(0,r.useCallback)((function(n,e){var t=$({},bn),i=$({},pn);return!e?(delete i[n],Object.entries(t||{}).forEach((function(e){var i=(0,B.Z)(e,2),r=i[0],l=i[1];n===(null===l||void 0===l?void 0:l.input)&&(t[r]=$($({},l),{},{input:null}))}))):i[n]=$($({},null===i||void 0===i?void 0:i[n]),e),Zn({inputs:i})}),[pn,Zn,bn]),yn=(0,r.useCallback)((function(n,e){var t=[],i=$({},bn),r=!e;return r?delete i[n]:i[n]=$($({},null===i||void 0===i?void 0:i[n]),e),null===xn||void 0===xn||xn.forEach((function(e){var i=[];null===e||void 0===e||e.forEach((function(e){r&&n===(null===e||void 0===e?void 0:e.variable)||i.push(e)})),(null===i||void 0===i?void 0:i.length)>=1&&t.push(i)})),Zn({layout:t,variables:i})}),[xn,Zn,bn]),wn=(0,r.useMemo)((function(){return Object.entries(pn||{}).map((function(n,e){var t=(0,B.Z)(n,2),i=t[0],r=t[1]||{options:[],style:null,type:null},l=r.options,o=r.style,c=r.type;return(0,Z.jsx)(h.Z,{mt:e>=1?b.cd:0,children:(0,Z.jsxs)(D,{ref:A===i?k:null,children:[(0,Z.jsx)(E,{children:(0,Z.jsx)(h.Z,{p:b.cd,children:(0,Z.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,Z.jsx)(j.ZP,{large:!0,monospace:!0,children:i}),(0,Z.jsx)(h.Z,{mr:b.cd}),(0,Z.jsx)(Y.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return gn(i,null)},children:(0,Z.jsx)(P.x8,{default:!0})})]})})}),(0,Z.jsx)(G.Z,{muted:!0}),(0,Z.jsx)(h.Z,{p:b.cd,children:(0,Z.jsxs)(s.ZP,{fullWidth:!0,children:[(0,Z.jsxs)(a.Z,{flex:1,flexDirection:"column",children:[(0,Z.jsx)(h.Z,{mb:1,children:(0,Z.jsx)(j.ZP,{bold:!0,default:!0,children:"Type"})}),(0,Z.jsx)(f.Z,{onChange:function(n){return gn(i,{type:n.target.value})},placeholder:"Choose a type of input",value:c,children:v.qS.map((function(n){return(0,Z.jsx)("option",{value:n,children:(0,z.vg)(n)},n)}))})]}),(0,Z.jsx)(h.Z,{mr:b.Mq}),(0,Z.jsxs)(a.Z,{flex:1,flexDirection:"column",children:[v.bB.TEXT_FIELD===c&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(h.Z,{mb:b.cd,children:[(0,Z.jsx)(h.Z,{mb:1,children:(0,Z.jsxs)(j.ZP,{bold:!0,default:!0,children:["Style ",(0,z.J3)(c)]})}),(0,Z.jsx)(d.Z,{checked:null===o||void 0===o?void 0:o.multiline,label:"Allow writing multiple lines",onClick:function(){return gn(i,{style:$($({},o),{},{multiline:!(null!==o&&void 0!==o&&o.multiline)})})}})]}),(0,Z.jsxs)("div",{children:[(0,Z.jsxs)(h.Z,{mb:1,children:[(0,Z.jsx)(j.ZP,{bold:!0,default:!0,children:"Text field type"}),(null===o||void 0===o?void 0:o.multiline)&&(0,Z.jsx)(j.ZP,{muted:!0,small:!0,children:"Not available for multiline text field."})]}),(0,Z.jsx)(d.Z,{checked:v.al.NUMBER===(null===o||void 0===o?void 0:o.input_type),disabled:!(null===o||void 0===o||!o.multiline),label:"Numbers only",onClick:function(){return gn(i,{style:$($({},o),{},{input_type:v.al.NUMBER===(null===o||void 0===o?void 0:o.input_type)?null:v.al.NUMBER})})}})]})]}),[v.bB.CHECKBOX,v.bB.DROPDOWN_MENU].includes(c)&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(h.Z,{mb:1,children:(0,Z.jsxs)(j.ZP,{bold:!0,default:!0,children:["Options for ",(0,z.J3)(c)]})}),null===l||void 0===l?void 0:l.map((function(n,e){var t=n.label,r=n.value;return(0,Z.jsx)(h.Z,{mt:e>=1?1:0,children:(0,Z.jsxs)(s.ZP,{alignItems:"center",flexDirection:"row",children:[(0,Z.jsx)(Y.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,onClick:function(){return gn(i,{options:(0,W.oM)(l,e)})},children:(0,Z.jsx)(P.x8,{})}),(0,Z.jsx)(h.Z,{mr:b.cd}),(0,Z.jsx)(j.ZP,{default:!0,children:"Label"}),(0,Z.jsx)(h.Z,{mr:1}),(0,Z.jsx)(x.Z,{compact:!0,onChange:function(n){var t;return gn(i,{options:null===(t=l||[])||void 0===t?void 0:t.map((function(t,i){return e===i?$($({},t),{},{label:n.target.value}):t}))})},value:t||""}),(0,Z.jsx)(h.Z,{mr:b.cd}),(0,Z.jsx)(j.ZP,{default:!0,children:"Value"}),(0,Z.jsx)(h.Z,{mr:1}),(0,Z.jsx)(x.Z,{compact:!0,onChange:function(n){var t;return gn(i,{options:null===(t=l||[])||void 0===t?void 0:t.map((function(t,i){return e===i?$($({},t),{},{value:n.target.value}):t}))})},value:r||""})]})},"".concat(i,"-option-").concat(e))})),(0,Z.jsx)(h.Z,{mt:1,children:(0,Z.jsx)(Y.Z,{beforeIcon:(0,Z.jsx)(P.mm,{}),compact:!0,onClick:function(){return gn(i,{options:(l||[]).concat({label:"",value:""})})},secondary:!0,children:"Add option"})})]})]})]})})]})},"".concat(i,"-").concat(e))}))}),[pn,A,k,gn]),Pn=(0,r.useMemo)((function(){return Object.entries(bn||{}).map((function(n,e){var t,r=(0,B.Z)(n,2),l=r[0],o=r[1],c=o||{description:"",name:"",required:!1,types:[]},u=c.description,g=c.input,y=c.name,I=c.required,O=c.types,C=null===pn||void 0===pn?void 0:pn[g];return(0,Z.jsx)(h.Z,{mt:e>=1?b.cd:0,children:(0,Z.jsxs)(D,{ref:nn===l?M:null,children:[(0,Z.jsx)(E,{children:(0,Z.jsx)(h.Z,{p:b.cd,children:(0,Z.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,Z.jsxs)(s.ZP,{alignItems:"center",flexDirection:"row",children:[(0,Z.jsx)(j.ZP,{large:!0,monospace:!0,children:l}),(0,Z.jsx)(h.Z,{mr:b.cd}),(0,Z.jsxs)(s.ZP,{alignItems:"center",children:[(0,Z.jsx)(m.Z,{checked:I,compact:!0,onCheck:function(n){return yn(l,{required:n(I)})}}),(0,Z.jsx)(h.Z,{mr:1}),(0,Z.jsx)(j.ZP,{muted:!I,success:I,children:"Required"})]})]}),(0,Z.jsx)(h.Z,{mr:b.cd}),(0,Z.jsx)(Y.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return yn(l,null)},children:(0,Z.jsx)(P.x8,{default:!0})})]})})}),(0,Z.jsx)(G.Z,{muted:!0}),(0,Z.jsxs)(h.Z,{p:b.cd,children:[(0,Z.jsxs)(s.ZP,{fullWidth:!0,children:[(0,Z.jsxs)(a.Z,{flex:1,flexDirection:"column",children:[(0,Z.jsx)(h.Z,{mb:1,children:(0,Z.jsx)(j.ZP,{bold:!0,default:!0,children:"Label"})}),(0,Z.jsx)(x.Z,{onChange:function(n){return yn(l,{name:n.target.value})},value:y}),(0,Z.jsxs)(h.Z,{mt:b.Mq,children:[(0,Z.jsx)(h.Z,{mb:1,children:(0,Z.jsx)(j.ZP,{bold:!0,default:!0,children:"Valid data types"})}),(0,Z.jsx)(s.ZP,{alignItems:"center",flexWrap:"wrap",children:v.n8.map((function(n){var e=null===O||void 0===O?void 0:O.includes(n);return(0,Z.jsx)(h.Z,{mr:b.cd,children:(0,Z.jsx)(d.Z,{checked:e,label:(0,z.vg)(n),onClick:function(){return yn(l,{types:e?null===O||void 0===O?void 0:O.filter((function(e){return e!==n})):(O||[]).concat(n)})}})},n)}))})]})]}),(0,Z.jsx)(h.Z,{mr:b.Mq}),(0,Z.jsxs)(a.Z,{flex:1,flexDirection:"column",children:[(0,Z.jsx)(h.Z,{mb:1,children:(0,Z.jsx)(j.ZP,{bold:!0,default:!0,children:"Description"})}),(0,Z.jsx)(p.Z,{onChange:function(n){return yn(l,{description:n.target.value})},rows:Math.max(3,null===u||void 0===u||null===(t=u.split("\n"))||void 0===t?void 0:t.length),value:u})]})]}),(0,Z.jsxs)(h.Z,{mt:b.Mq,children:[(0,Z.jsx)(s.ZP,{alignContent:"center",flexDirection:"row",justifyContent:"space-between",children:(0,Z.jsxs)(s.ZP,{flexDirection:"column",children:[(0,Z.jsx)(j.ZP,{bold:!0,default:!0,children:"Input"}),(0,Z.jsx)(j.ZP,{muted:!0,children:"Associate an existing input to this variable or create a new input and then associate it to this variable."})]})}),(0,Z.jsx)(h.Z,{mt:1,children:(0,Z.jsxs)(f.Z,{monospace:!0,onChange:function(n){var e=n.target.value;"+ Add a new input"===e?(V(!0),ln(l),setTimeout((function(){var n;return null===S||void 0===S||null===(n=S.current)||void 0===n?void 0:n.focus()}),1)):yn(l,{input:e})},placeholder:"Select an existing input",value:g,children:[(0,Z.jsx)("option",{value:""}),(0,Z.jsx)("option",{value:"+ Add a new input",children:"+ Add a new input"}),Object.keys(pn||{}).map((function(n){return(0,Z.jsx)("option",{value:n,children:n},n)}))]})})]})]}),g&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(G.Z,{muted:!0}),(0,Z.jsxs)(h.Z,{p:b.cd,children:[(0,Z.jsx)(h.Z,{mb:1,children:(0,Z.jsx)(j.ZP,{muted:!0,rightAligned:!0,small:!0,uppercase:!0,children:"Preview"})}),!(null!==C&&void 0!==C&&C.type)&&(0,Z.jsxs)(j.ZP,{muted:!0,children:["Select an input style for ",g," before seeing a preview."]}),(null===C||void 0===C?void 0:C.type)&&(0,Z.jsx)(w,{interaction:{inputs:(0,i.Z)({},g,null===pn||void 0===pn?void 0:pn[g]),layout:[[{variable:l,width:1}]],variables:(0,i.Z)({},l,o)}})]})]})]})},"".concat(l,"-").concat(e))}))}),[pn,nn,M,ln,yn,bn]),In=(0,r.useMemo)((function(){return!(null===bn||void 0===bn||!bn[sn])}),[sn,bn]),On=(0,r.useMemo)((function(){return!(null===pn||void 0===pn||!pn[cn])}),[pn,cn]),Cn=(0,r.useMemo)((function(){return(0,Z.jsx)(X,{containerRef:C,interaction:y,showVariableUUID:!0,updateLayout:function(n){return Zn({layout:n})}})}),[C,y,Zn]),kn=(0,r.useMemo)((function(){return(0,Z.jsxs)(s.ZP,{alignItems:"center",children:[!_&&(0,Z.jsx)(Y.Z,{beforeIcon:(0,Z.jsx)(P.mm,{}),compact:!0,onClick:function(n){(0,J.j)(n),N(!0),setTimeout((function(){var n;return null===R||void 0===R||null===(n=R.current)||void 0===n?void 0:n.focus()}),1)},secondary:!0,small:!0,children:"Add new variable"}),_&&(0,Z.jsxs)(Z.Fragment,{children:[In&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(j.ZP,{danger:!0,small:!0,children:"Variable already exists"}),(0,Z.jsx)(h.Z,{mr:1})]}),(0,Z.jsx)(x.Z,{compact:!0,meta:{touched:!!In,error:String(In)},monospace:!0,onChange:function(n){(0,J.j)(n),dn(n.target.value)},onClick:function(n){return(0,J.j)(n)},ref:R,small:!0,value:sn||""}),(0,Z.jsx)(h.Z,{mr:1}),(0,Z.jsx)(Y.Z,{disabled:In,compact:!0,onClick:function(n){if((0,J.j)(n),!In){var e=(0,o.Z)(xn||[]);e.push([{width:1,variable:sn}]),Zn($($({},y),{},{layout:e,variables:$($({},bn),{},(0,i.Z)({},sn,{}))})),N(!1),en(sn),dn(null),hn({0:!0}),setTimeout((function(){var n;null===M||void 0===M||null===(n=M.current)||void 0===n||n.scrollIntoView(),hn({})}),K.e+100)}},primary:!0,small:!0,children:"Create variable"}),(0,Z.jsx)(h.Z,{mr:1}),(0,Z.jsx)(Y.Z,{compact:!0,onClick:function(n){(0,J.j)(n),N(!1),dn(null)},secondary:!0,small:!0,children:"Cancel"})]})]})}),[_,xn,sn,M,R,N,en,dn,hn,Zn,In,bn]),Dn=(0,r.useMemo)((function(){return(0,Z.jsxs)(s.ZP,{alignItems:"center",children:[!L&&(0,Z.jsx)(Y.Z,{beforeIcon:(0,Z.jsx)(P.mm,{}),compact:!0,onClick:function(n){(0,J.j)(n),V(!0),setTimeout((function(){var n;return null===S||void 0===S||null===(n=S.current)||void 0===n?void 0:n.focus()}),1)},secondary:!0,small:!0,children:"Add new input"}),L&&(0,Z.jsxs)(Z.Fragment,{children:[On&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(j.ZP,{danger:!0,small:!0,children:"Input already exists"}),(0,Z.jsx)(h.Z,{mr:1})]}),(0,Z.jsx)(x.Z,{compact:!0,meta:{touched:!!On,error:String(On)},monospace:!0,onClick:function(n){return(0,J.j)(n)},onChange:function(n){(0,J.j)(n),un(n.target.value)},ref:S,small:!0,value:cn||""}),(0,Z.jsx)(h.Z,{mr:1}),(0,Z.jsx)(Y.Z,{disabled:On,compact:!0,onClick:function(n){(0,J.j)(n),On||(rn?Zn($($({},y),{},{inputs:$($({},pn),{},(0,i.Z)({},cn,{})),variables:$($({},bn),{},(0,i.Z)({},rn,$($({},null===bn||void 0===bn?void 0:bn[rn]),{},{input:cn})))})):gn(cn,{}),V(!1),q(cn),ln(null),un(null),hn({1:!0}),setTimeout((function(){var n;null===k||void 0===k||null===(n=k.current)||void 0===n||n.scrollIntoView(),hn({})}),K.e+100))},primary:!0,small:!0,children:"Create input"}),(0,Z.jsx)(h.Z,{mr:1}),(0,Z.jsx)(Y.Z,{compact:!0,onClick:function(n){(0,J.j)(n),V(!1),un(null)},secondary:!0,small:!0,children:"Cancel"})]})]})}),[On,pn,y,L,rn,cn,k,S,V,q,ln,un,hn,gn,bn]);return(0,Z.jsxs)(D,{ref:C,children:[(0,Z.jsx)(E,{children:(0,Z.jsx)(h.Z,{p:b.cd,children:(0,Z.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,Z.jsx)(j.ZP,{default:!0,large:!0,monospace:!0,children:mn}),I&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(h.Z,{mr:b.cd}),(0,Z.jsx)(Y.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return I()},children:(0,Z.jsx)(P.x8,{default:!0})})]})]})})}),(0,Z.jsx)(G.Z,{muted:!0}),g,(0,Z.jsxs)(H.Z,{noBorder:!0,visibleMapping:{0:!0,1:!0,2:!0},visibleMappingForced:fn,children:[(0,Z.jsx)(K.Z,{noBorderRadius:!0,noPaddingContent:!0,onClick:function(){hn({})},titleXPadding:b.cd*b.iI,titleYPadding:b.iI,title:(0,Z.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,Z.jsx)(h.Z,{mr:b.cd,py:1,children:(0,Z.jsx)(l.Z,{level:5,children:"Variables"})}),(null===(e=Object.keys(bn||{}))||void 0===e?void 0:e.length)>=1&&kn]}),children:(0,Z.jsxs)(h.Z,{p:b.cd,children:[Pn,!(null!==(t=Object.keys(bn||{}))&&void 0!==t&&t.length)&&kn]})}),(0,Z.jsx)(K.Z,{noBorderRadius:!0,noPaddingContent:!0,onClick:function(){hn({})},titleXPadding:b.cd*b.iI,titleYPadding:b.iI,title:(0,Z.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,Z.jsx)(h.Z,{mr:b.cd,py:1,children:(0,Z.jsx)(l.Z,{level:5,children:"Inputs"})}),(null===(c=Object.keys(pn||{}))||void 0===c?void 0:c.length)>=1&&Dn]}),children:(0,Z.jsxs)(h.Z,{p:b.cd,children:[wn,!(null!==(u=Object.keys(pn||{}))&&void 0!==u&&u.length)&&Dn]})}),(0,Z.jsxs)(K.Z,{noBorderRadius:!0,noPaddingContent:!0,onClick:function(){hn({})},titleXPadding:b.cd*b.iI,titleYPadding:b.iI,title:(0,Z.jsx)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,Z.jsx)(h.Z,{mr:b.cd,py:1,children:(0,Z.jsx)(l.Z,{level:5,children:"Interaction layout"})})}),children:[(0,Z.jsx)(h.Z,{p:1,children:Cn}),!(null!==xn&&void 0!==xn&&xn.length)&&(0,Z.jsx)(h.Z,{px:b.cd,pb:b.cd,children:(0,Z.jsx)(j.ZP,{muted:!0,children:"Add at least 1 variable and associate an input to it and see a preview."})})]})]})]})};function en(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 tn(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?en(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):en(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var rn=function(n){var e=n.blockInteraction,t=n.children,o=n.contained,c=n.containerRef,u=n.containerWidth,a=n.interaction,s=n.isEditing,d=n.removeBlockInteraction,v=n.setInteractionsMapping,f=n.setVariables,p=n.showVariableUUID,x=n.variables,m=(0,r.useMemo)((function(){return e||{description:null,name:null}}),[e]),g=m.description,y=m.name,w=(0,r.useCallback)((function(n){return null===v||void 0===v?void 0:v((function(e){return tn(tn({},e),{},(0,i.Z)({},null===n||void 0===n?void 0:n.uuid,tn(tn({},a),n)))}))}),[a,v]),P=(0,r.useMemo)((function(){var n;return(0,Z.jsxs)(Z.Fragment,{children:[y&&(0,Z.jsxs)(h.Z,{mb:b.cd,pt:b.cd,px:b.cd,children:[(0,Z.jsx)(l.Z,{level:5,children:y}),g&&(null===g||void 0===g||null===(n=g.split("\n"))||void 0===n?void 0:n.map((function(n){return(0,Z.jsx)(j.ZP,{default:!0,children:n},n)})))]}),(0,Z.jsx)(h.Z,{pb:b.Mq,px:1,children:(0,Z.jsx)(X,{containerRef:c,containerWidth:u,interaction:a,setVariables:f,showVariableUUID:p,variables:x})})]})}),[g,y,c,u,a,f,p,x]);return(0,Z.jsxs)("div",{children:[s&&(0,Z.jsx)(nn,{interaction:a,removeBlockInteraction:d,updateInteraction:w,children:t}),!s&&(0,Z.jsxs)(Z.Fragment,{children:[o&&P,!o&&(0,Z.jsx)(D,{children:P})]})]})}},54193:function(n,e,t){var i;t.d(e,{al:function(){return o},bB:function(){return i},n8:function(){return c},qS:function(){return l},zj:function(){return r}}),function(n){n.CHECKBOX="checkbox",n.DROPDOWN_MENU="dropdown_menu",n.SWITCH="switch",n.TEXT_FIELD="text_field"}(i||(i={}));var r,l=[i.CHECKBOX,i.DROPDOWN_MENU,i.SWITCH,i.TEXT_FIELD];!function(n){n.DATE="date",n.DATETIME="datetime",n.DICTIONARY="dictionary",n.FLOAT="float",n.INTEGER="integer",n.LIST="list",n.STRING="string"}(r||(r={}));var o,c=[r.DATE,r.DATETIME,r.DICTIONARY,r.FLOAT,r.INTEGER,r.LIST,r.STRING];!function(n){n.NUMBER="number"}(o||(o={}))}}]);