zenml-nightly 0.63.0.dev20240801__py3-none-any.whl → 0.64.0.dev20240811__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.
Files changed (198) hide show
  1. README.md +2 -2
  2. RELEASE_NOTES.md +79 -0
  3. zenml/VERSION +1 -1
  4. zenml/__init__.py +0 -4
  5. zenml/analytics/enums.py +0 -6
  6. zenml/cli/__init__.py +0 -61
  7. zenml/cli/base.py +1 -1
  8. zenml/cli/web_login.py +8 -0
  9. zenml/client.py +0 -4
  10. zenml/config/build_configuration.py +43 -17
  11. zenml/config/docker_settings.py +80 -57
  12. zenml/config/source.py +58 -0
  13. zenml/constants.py +9 -2
  14. zenml/entrypoints/base_entrypoint_configuration.py +53 -8
  15. zenml/enums.py +1 -1
  16. zenml/environment.py +25 -9
  17. zenml/image_builders/base_image_builder.py +1 -1
  18. zenml/image_builders/build_context.py +25 -72
  19. zenml/integrations/azure/__init__.py +4 -0
  20. zenml/integrations/azure/flavors/__init__.py +11 -0
  21. zenml/integrations/azure/flavors/azureml_orchestrator_flavor.py +263 -0
  22. zenml/{_hub → integrations/azure/orchestrators}/__init__.py +7 -2
  23. zenml/integrations/azure/orchestrators/azureml_orchestrator.py +544 -0
  24. zenml/integrations/azure/orchestrators/azureml_orchestrator_entrypoint_config.py +86 -0
  25. zenml/integrations/azure/step_operators/azureml_step_operator.py +3 -0
  26. zenml/integrations/databricks/flavors/databricks_orchestrator_flavor.py +9 -0
  27. zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +7 -2
  28. zenml/integrations/gcp/service_connectors/gcp_service_connector.py +123 -6
  29. zenml/integrations/kaniko/image_builders/kaniko_image_builder.py +1 -1
  30. zenml/integrations/mlflow/__init__.py +1 -1
  31. zenml/integrations/mlflow/experiment_trackers/mlflow_experiment_tracker.py +3 -1
  32. zenml/integrations/mlflow/flavors/mlflow_experiment_tracker_flavor.py +3 -0
  33. zenml/logger.py +13 -0
  34. zenml/models/__init__.py +0 -12
  35. zenml/models/v2/core/pipeline_deployment.py +21 -29
  36. zenml/models/v2/core/pipeline_run.py +13 -0
  37. zenml/models/v2/core/server_settings.py +12 -0
  38. zenml/models/v2/core/user.py +0 -21
  39. zenml/models/v2/misc/server_models.py +7 -1
  40. zenml/models/v2/misc/user_auth.py +0 -7
  41. zenml/new/pipelines/build_utils.py +193 -38
  42. zenml/new/pipelines/code_archive.py +157 -0
  43. zenml/new/pipelines/pipeline.py +29 -2
  44. zenml/new/pipelines/run_utils.py +67 -1
  45. zenml/service_connectors/service_connector_utils.py +14 -0
  46. zenml/stack_deployments/aws_stack_deployment.py +26 -3
  47. zenml/stack_deployments/azure_stack_deployment.py +11 -6
  48. zenml/stack_deployments/gcp_stack_deployment.py +24 -2
  49. zenml/stack_deployments/stack_deployment.py +17 -2
  50. zenml/steps/base_step.py +3 -0
  51. zenml/utils/archivable.py +149 -0
  52. zenml/utils/code_utils.py +244 -0
  53. zenml/utils/notebook_utils.py +122 -0
  54. zenml/utils/pipeline_docker_image_builder.py +3 -96
  55. zenml/utils/source_utils.py +109 -1
  56. zenml/zen_server/dashboard/assets/{404-CI13wQp4.js → 404-CRAA_Lew.js} +1 -1
  57. zenml/zen_server/dashboard/assets/@radix-BXWm7HOa.js +85 -0
  58. zenml/zen_server/dashboard/assets/{@react-router-CO-OsFwI.js → @react-router-l3lMcXA2.js} +1 -1
  59. zenml/zen_server/dashboard/assets/{@reactflow-DIYUhKYX.js → @reactflow-CeVxyqYT.js} +2 -2
  60. zenml/zen_server/dashboard/assets/{@tanstack-k96lU_C-.js → @tanstack-FmcYZMuX.js} +4 -4
  61. zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-ErO9aOgK.js +1 -0
  62. zenml/zen_server/dashboard/assets/{AwarenessChannel-BNg5uWgI.js → AwarenessChannel-CLXo5rKM.js} +1 -1
  63. zenml/zen_server/dashboard/assets/{CodeSnippet-Cyp7f4dM.js → CodeSnippet-D0VLxT2A.js} +1 -1
  64. zenml/zen_server/dashboard/assets/{CollapsibleCard-Cu_A9W57.js → CollapsibleCard-BaUPiVg0.js} +1 -1
  65. zenml/zen_server/dashboard/assets/{Commands-DmQwTXjj.js → Commands-JrcZK-3j.js} +1 -1
  66. zenml/zen_server/dashboard/assets/CopyButton-Dbo52T1K.js +2 -0
  67. zenml/zen_server/dashboard/assets/{CsvVizualization-BvqItd-O.js → CsvVizualization-D3kAypDj.js} +3 -3
  68. zenml/zen_server/dashboard/assets/DisplayDate-DizbSeT-.js +1 -0
  69. zenml/zen_server/dashboard/assets/EditSecretDialog-Bd7mFLS4.js +1 -0
  70. zenml/zen_server/dashboard/assets/{EmptyState-BMLnFVlB.js → EmptyState-BHblM39I.js} +1 -1
  71. zenml/zen_server/dashboard/assets/{Error-DbXCTGua.js → Error-C6LeJSER.js} +1 -1
  72. zenml/zen_server/dashboard/assets/{ExecutionStatus-9zM7eaLh.js → ExecutionStatus-jH4OrWBq.js} +1 -1
  73. zenml/zen_server/dashboard/assets/{Helpbox-BIiNc-uH.js → Helpbox-aAB2XP-z.js} +1 -1
  74. zenml/zen_server/dashboard/assets/{Infobox-iv1Nu1A0.js → Infobox-BQ0aty32.js} +1 -1
  75. zenml/zen_server/dashboard/assets/{InlineAvatar-BvBtO2Dp.js → InlineAvatar-DpTLgM3Q.js} +1 -1
  76. zenml/zen_server/dashboard/assets/Lock-CNyJvf2r.js +1 -0
  77. zenml/zen_server/dashboard/assets/{MarkdownVisualization-xp3hhULl.js → MarkdownVisualization-Bajxn0HY.js} +1 -1
  78. zenml/zen_server/dashboard/assets/NumberBox-BmKE0qnO.js +1 -0
  79. zenml/zen_server/dashboard/assets/{PasswordChecker-DUveqlva.js → PasswordChecker-yGGoJSB-.js} +1 -1
  80. zenml/zen_server/dashboard/assets/{ProviderRadio-pSAvrGRS.js → ProviderRadio-BBqkIuTd.js} +1 -1
  81. zenml/zen_server/dashboard/assets/RadioItem-xLhXoiFV.js +1 -0
  82. zenml/zen_server/dashboard/assets/SearchField-C9R0mdaX.js +1 -0
  83. zenml/zen_server/dashboard/assets/{SetPassword-BOxpgh6N.js → SetPassword-52sNxNiO.js} +1 -1
  84. zenml/zen_server/dashboard/assets/{SuccessStep-CTSKN2lp.js → SuccessStep-DlkItqYG.js} +1 -1
  85. zenml/zen_server/dashboard/assets/{Tick-Bnr2TpW6.js → Tick-uxv80Q6a.js} +1 -1
  86. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-BeCeaRW5.js → UpdatePasswordSchemas-oN4G3sKz.js} +1 -1
  87. zenml/zen_server/dashboard/assets/{aws-BgKTfTfx.js → aws-0_3UsPif.js} +1 -1
  88. zenml/zen_server/dashboard/assets/{check-circle-i56092KI.js → check-circle-1_I207rW.js} +1 -1
  89. zenml/zen_server/dashboard/assets/{chevron-down-D_ZlKMqH.js → chevron-down-BpaF8JqM.js} +1 -1
  90. zenml/zen_server/dashboard/assets/{chevron-right-double-CZBOf6JM.js → chevron-right-double-Dk8e2L99.js} +1 -1
  91. zenml/zen_server/dashboard/assets/{cloud-only-qelmY92E.js → cloud-only-BkUuI0lZ.js} +1 -1
  92. zenml/zen_server/dashboard/assets/components-Br2ezRib.js +1 -0
  93. zenml/zen_server/dashboard/assets/{copy-BXNk6BjL.js → copy-f3XGPPxt.js} +1 -1
  94. zenml/zen_server/dashboard/assets/{database-1xWSgZfO.js → database-cXYNX9tt.js} +1 -1
  95. zenml/zen_server/dashboard/assets/{docker-CQMVm_4d.js → docker-8uj__HHK.js} +1 -1
  96. zenml/zen_server/dashboard/assets/{dots-horizontal-BObFzD5l.js → dots-horizontal-sKQlWEni.js} +1 -1
  97. zenml/zen_server/dashboard/assets/edit-C0MVvPD2.js +1 -0
  98. zenml/zen_server/dashboard/assets/{file-text-CqD_iu6l.js → file-text-B9JibxTs.js} +1 -1
  99. zenml/zen_server/dashboard/assets/{help-bu_DgLKI.js → help-FuHlZwn0.js} +1 -1
  100. zenml/zen_server/dashboard/assets/index-Bd1xgUQG.js +1 -0
  101. zenml/zen_server/dashboard/assets/index-DaGknux4.css +1 -0
  102. zenml/zen_server/dashboard/assets/{index-KsTz2dHG.js → index-DhIZtpxB.js} +5 -5
  103. zenml/zen_server/dashboard/assets/{index.esm-CbHNSeVw.js → index.esm-DT4uyn2i.js} +1 -1
  104. zenml/zen_server/dashboard/assets/layout-D6oiSbfd.js +1 -0
  105. zenml/zen_server/dashboard/assets/{login-mutation-DRpbESS7.js → login-mutation-13A_JSVA.js} +1 -1
  106. zenml/zen_server/dashboard/assets/{logs-D8k8BVFf.js → logs-CgeE2vZP.js} +1 -1
  107. zenml/zen_server/dashboard/assets/{not-found-Dfx9hfkf.js → not-found-B0Mmb90p.js} +1 -1
  108. zenml/zen_server/dashboard/assets/{package-ClbU3KUi.js → package-DdkziX79.js} +1 -1
  109. zenml/zen_server/dashboard/assets/page-7-v2OBm-.js +1 -0
  110. zenml/zen_server/dashboard/assets/{page-f3jBVI5Z.js → page-B3ozwdD1.js} +1 -1
  111. zenml/zen_server/dashboard/assets/{page-DYBNGxJt.js → page-BGwA9B1M.js} +1 -1
  112. zenml/zen_server/dashboard/assets/{page-C176KxyB.js → page-BkjAUyTA.js} +1 -1
  113. zenml/zen_server/dashboard/assets/page-BnacgBiy.js +1 -0
  114. zenml/zen_server/dashboard/assets/{page-CzucfYPo.js → page-BxF_KMQ3.js} +2 -2
  115. zenml/zen_server/dashboard/assets/page-C4POHC0K.js +1 -0
  116. zenml/zen_server/dashboard/assets/page-C9kudd44.js +9 -0
  117. zenml/zen_server/dashboard/assets/page-CA1j3GpJ.js +1 -0
  118. zenml/zen_server/dashboard/assets/page-CCY6yfmu.js +1 -0
  119. zenml/zen_server/dashboard/assets/page-CgTe7Bme.js +1 -0
  120. zenml/zen_server/dashboard/assets/{page-DtpwnNXq.js → page-Cgn-6v2Y.js} +1 -1
  121. zenml/zen_server/dashboard/assets/page-CxQmQqDw.js +1 -0
  122. zenml/zen_server/dashboard/assets/page-D2Goey3H.js +1 -0
  123. zenml/zen_server/dashboard/assets/page-DLpOnf7u.js +1 -0
  124. zenml/zen_server/dashboard/assets/{page-DVPxY5fT.js → page-DSTQnBk-.js} +1 -1
  125. zenml/zen_server/dashboard/assets/{page-BoFtUD9H.js → page-DTysUGOy.js} +1 -1
  126. zenml/zen_server/dashboard/assets/{page-p2hLJdS2.js → page-D_EXUFJb.js} +1 -1
  127. zenml/zen_server/dashboard/assets/page-Db15QzsM.js +1 -0
  128. zenml/zen_server/dashboard/assets/{page-Btu39x7k.js → page-DugsjcQ_.js} +1 -1
  129. zenml/zen_server/dashboard/assets/{page-CZe9GEBF.js → page-OFKSPyN7.js} +1 -1
  130. zenml/zen_server/dashboard/assets/{page-CDgZmwxP.js → page-RnG-qhv9.js} +1 -1
  131. zenml/zen_server/dashboard/assets/{page-Cjn97HMv.js → page-T2BtjwPl.js} +1 -1
  132. zenml/zen_server/dashboard/assets/page-TXe1Eo3Z.js +1 -0
  133. zenml/zen_server/dashboard/assets/{page-BxiWdeyg.js → page-YiF_fNbe.js} +1 -1
  134. zenml/zen_server/dashboard/assets/{page-399pVZHU.js → page-hQaiQXfg.js} +1 -1
  135. zenml/zen_server/dashboard/assets/persist-3-5nOJ6m.js +1 -0
  136. zenml/zen_server/dashboard/assets/{play-circle-CNtZKDnW.js → play-circle-XSkLR12B.js} +1 -1
  137. zenml/zen_server/dashboard/assets/{plus-DOeLmm7C.js → plus-FB9-lEq_.js} +1 -1
  138. zenml/zen_server/dashboard/assets/refresh-COb6KYDi.js +1 -0
  139. zenml/zen_server/dashboard/assets/sharedSchema-BoYx_B_L.js +14 -0
  140. zenml/zen_server/dashboard/assets/{stack-detail-query-Ck7j7BP_.js → stack-detail-query-B-US_-wa.js} +1 -1
  141. zenml/zen_server/dashboard/assets/{terminal-By9cErXc.js → terminal-grtjrIEJ.js} +1 -1
  142. zenml/zen_server/dashboard/assets/trash-Cd5CSFqA.js +1 -0
  143. zenml/zen_server/dashboard/assets/{update-server-settings-mutation-f3ZT7psb.js → update-server-settings-mutation-B8GB_ubU.js} +1 -1
  144. zenml/zen_server/dashboard/assets/{url-rGEp5Umh.js → url-hcMJkz8p.js} +1 -1
  145. zenml/zen_server/dashboard/assets/{zod-BtSyGx4C.js → zod-CnykDKJj.js} +1 -1
  146. zenml/zen_server/dashboard/index.html +7 -7
  147. zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
  148. zenml/zen_server/dashboard_legacy/index.html +1 -1
  149. zenml/zen_server/dashboard_legacy/{precache-manifest.2fa6e528a6e7447caaf35dadfe7514bb.js → precache-manifest.9c473c96a43298343a7ce1256183123b.js} +4 -4
  150. zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
  151. zenml/zen_server/dashboard_legacy/static/js/{main.4aab7e98.chunk.js → main.463c90b9.chunk.js} +2 -2
  152. zenml/zen_server/dashboard_legacy/static/js/{main.4aab7e98.chunk.js.map → main.463c90b9.chunk.js.map} +1 -1
  153. zenml/zen_server/deploy/helm/Chart.yaml +1 -1
  154. zenml/zen_server/deploy/helm/README.md +2 -2
  155. zenml/zen_server/routers/stack_deployment_endpoints.py +6 -0
  156. zenml/zen_server/routers/users_endpoints.py +0 -7
  157. zenml/zen_server/utils.py +75 -0
  158. zenml/zen_server/zen_server_api.py +52 -1
  159. zenml/zen_stores/base_zen_store.py +7 -1
  160. zenml/zen_stores/migrations/versions/0.64.0_release.py +23 -0
  161. zenml/zen_stores/migrations/versions/026d4577b6a0_add_code_path.py +39 -0
  162. zenml/zen_stores/migrations/versions/3dcc5d20e82f_add_last_user_activity.py +51 -0
  163. zenml/zen_stores/migrations/versions/909550c7c4da_remove_user_hub_token.py +36 -0
  164. zenml/zen_stores/rest_zen_store.py +5 -3
  165. zenml/zen_stores/schemas/pipeline_deployment_schemas.py +3 -0
  166. zenml/zen_stores/schemas/pipeline_run_schemas.py +3 -0
  167. zenml/zen_stores/schemas/server_settings_schemas.py +2 -0
  168. zenml/zen_stores/schemas/user_schemas.py +0 -2
  169. zenml/zen_stores/sql_zen_store.py +25 -1
  170. {zenml_nightly-0.63.0.dev20240801.dist-info → zenml_nightly-0.64.0.dev20240811.dist-info}/METADATA +3 -3
  171. {zenml_nightly-0.63.0.dev20240801.dist-info → zenml_nightly-0.64.0.dev20240811.dist-info}/RECORD +174 -157
  172. zenml/_hub/client.py +0 -289
  173. zenml/_hub/constants.py +0 -21
  174. zenml/_hub/utils.py +0 -79
  175. zenml/cli/hub.py +0 -1116
  176. zenml/models/v2/misc/hub_plugin_models.py +0 -79
  177. zenml/zen_server/dashboard/assets/@radix-CFOkMR_E.js +0 -85
  178. zenml/zen_server/dashboard/assets/CopyButton-B3sWVJ4Z.js +0 -2
  179. zenml/zen_server/dashboard/assets/DisplayDate-DYgIjlDF.js +0 -1
  180. zenml/zen_server/dashboard/assets/SearchField-CXoBknpt.js +0 -1
  181. zenml/zen_server/dashboard/assets/components-DWe4cTjS.js +0 -1
  182. zenml/zen_server/dashboard/assets/index-vfjX_fJV.css +0 -1
  183. zenml/zen_server/dashboard/assets/page-C6tXXjnK.js +0 -1
  184. zenml/zen_server/dashboard/assets/page-CP9obrnG.js +0 -1
  185. zenml/zen_server/dashboard/assets/page-CaTOsNNw.js +0 -1
  186. zenml/zen_server/dashboard/assets/page-CmXmB_5i.js +0 -1
  187. zenml/zen_server/dashboard/assets/page-CvGAOfad.js +0 -1
  188. zenml/zen_server/dashboard/assets/page-D0bbc-qr.js +0 -5
  189. zenml/zen_server/dashboard/assets/page-DLEtD2ex.js +0 -1
  190. zenml/zen_server/dashboard/assets/page-DupV0aBd.js +0 -1
  191. zenml/zen_server/dashboard/assets/page-EweAR81y.js +0 -1
  192. zenml/zen_server/dashboard/assets/page-w-YaL77M.js +0 -9
  193. zenml/zen_server/dashboard/assets/persist-BReKApOc.js +0 -14
  194. zenml/zen_server/dashboard/assets/secrets-video-OBJ6irhH.svg +0 -21
  195. zenml/zen_server/dashboard/assets/stacks-video-7gfxpAq4.svg +0 -21
  196. {zenml_nightly-0.63.0.dev20240801.dist-info → zenml_nightly-0.64.0.dev20240811.dist-info}/LICENSE +0 -0
  197. {zenml_nightly-0.63.0.dev20240801.dist-info → zenml_nightly-0.64.0.dev20240811.dist-info}/WHEEL +0 -0
  198. {zenml_nightly-0.63.0.dev20240801.dist-info → zenml_nightly-0.64.0.dev20240811.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,9 @@
1
+ const __vite__fileDeps=["assets/CsvVizualization-D3kAypDj.js","assets/@radix-BXWm7HOa.js","assets/index-DhIZtpxB.js","assets/@tanstack-FmcYZMuX.js","assets/@react-router-l3lMcXA2.js","assets/@reactflow-CeVxyqYT.js","assets/@reactflow-C26Olbza.css","assets/index-DaGknux4.css","assets/MarkdownVisualization-Bajxn0HY.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ var nr=Object.defineProperty;var sr=(e,t,r)=>t in e?nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var w=(e,t,r)=>(sr(e,typeof t!="symbol"?t+"":t,r),r);import{r as p,j as s,g as ar}from"./@radix-BXWm7HOa.js";import{p as Ve,j as X,n as he,F as $,k as G,l as B,q as e1,S as C,r as le,T as E,m as $e,s as ir,t as or,v as lr,w as dr,x as t1,_ as r1,i as je,h as P,y as Re,C as n1,E as te,G as Ae,H as De,J as F,K as Fe,L as z,M as s1,N as a1,O as i1,Q as fe,R as re,U as me,V as pe,W as cr,X as ur,Y as kt,Z as hr,o as fr,P as mr,z as Lt,c as pr,$ as xr}from"./index-DhIZtpxB.js";import{S as Cr}from"./database-cXYNX9tt.js";import{H as St,P as Ot,u as ze,a as gr,g as br,p as vr,S as wr,b as o1,c as yr,d as jr,e as Er}from"./@reactflow-CeVxyqYT.js";import{F as l1}from"./chevron-right-double-Dk8e2L99.js";import{a as Z,c as Nr}from"./@tanstack-FmcYZMuX.js";import{E as Y}from"./Error-C6LeJSER.js";import{D as de}from"./DisplayDate-DizbSeT-.js";import{a as ve,E as ne,b as d1,g as _r}from"./ExecutionStatus-jH4OrWBq.js";import{I as He}from"./InlineAvatar-DpTLgM3Q.js";import{L as ce,g as K,c as c1,b as u1}from"./@react-router-l3lMcXA2.js";import{C as I}from"./CodeSnippet-D0VLxT2A.js";import{C as k}from"./CollapsibleCard-BaUPiVg0.js";import{E as Q}from"./EmptyState-BHblM39I.js";import{s as kr}from"./url-hcMJkz8p.js";import{I as Lr}from"./Infobox-BQ0aty32.js";import{S as xe}from"./chevron-down-BpaF8JqM.js";import{S as Sr}from"./docker-8uj__HHK.js";import{C as W}from"./CopyButton-Dbo52T1K.js";import{S as h1}from"./logs-CgeE2vZP.js";import{u as Or}from"./stack-detail-query-B-US_-wa.js";import{S as Tr}from"./plus-FB9-lEq_.js";import{R as Pr}from"./refresh-COb6KYDi.js";import{S as Ir}from"./terminal-grtjrIEJ.js";import"./check-circle-1_I207rW.js";import"./copy-f3XGPPxt.js";const Mr=e=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 2C3.55228 2 4 2.44772 4 3V21C4 21.5523 3.55228 22 3 22C2.44772 22 2 21.5523 2 21V3C2 2.44772 2.44772 2 3 2ZM14.7071 4.29289C15.0976 4.68342 15.0976 5.31658 14.7071 5.70711L9.41421 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H9.41421L14.7071 18.2929C15.0976 18.6834 15.0976 19.3166 14.7071 19.7071C14.3166 20.0976 13.6834 20.0976 13.2929 19.7071L6.29289 12.7071C5.90237 12.3166 5.90237 11.6834 6.29289 11.2929L13.2929 4.29289C13.6834 3.90237 14.3166 3.90237 14.7071 4.29289Z"})),Vr=e=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5971 1.18505C11.8629 1.13038 12.1371 1.13038 12.4029 1.18505C12.7102 1.24824 12.9848 1.40207 13.2032 1.52436C13.2235 1.53575 13.2433 1.54687 13.2627 1.55761L12.7846 2.41823L13.2627 1.55761L20.6627 5.66872C20.6831 5.68009 20.7042 5.6917 20.7258 5.70359C20.9569 5.8309 21.2476 5.99097 21.4707 6.23315L21.1563 6.52296L21.4707 6.23315C21.6637 6.44253 21.8097 6.6907 21.899 6.96105C22.0024 7.27375 22.0011 7.60553 22.0002 7.8694C22.0001 7.89406 22 7.91813 22 7.94153V12.0001C22 12.5524 21.5523 13.0001 21 13.0001C20.4477 13.0001 20 12.5524 20 12.0001V8.69955L17.0029 10.3646C16.992 10.3709 16.9811 10.377 16.9701 10.3829L13 12.5885L13 20.4443C13.3511 20.4447 13.6916 20.6302 13.8742 20.9589C14.1424 21.4417 13.9684 22.0505 13.4856 22.3187L13.2627 22.4426C13.2433 22.4533 13.2235 22.4644 13.2032 22.4758C12.9848 22.5981 12.7102 22.7519 12.4029 22.8151C12.1371 22.8698 11.8629 22.8698 11.5971 22.8151C11.2898 22.7519 11.0152 22.5981 10.7968 22.4758C10.7765 22.4644 10.7567 22.4533 10.7373 22.4426L3.33733 18.3314C3.31688 18.3201 3.2958 18.3085 3.27421 18.2966C3.04308 18.1693 2.75245 18.0092 2.52927 17.767C2.33632 17.5576 2.1903 17.3095 2.10097 17.0391C1.99765 16.7264 1.99886 16.3946 1.99982 16.1308C1.99991 16.1061 2 16.082 2 16.0586V7.94153C2 7.91813 1.99991 7.89406 1.99982 7.8694C1.99886 7.60553 1.99765 7.27375 2.10097 6.96105C2.1903 6.69069 2.33632 6.44253 2.52927 6.23315C2.75244 5.99098 3.04306 5.8309 3.27419 5.7036C3.29579 5.6917 3.31687 5.68009 3.33733 5.66872L3.33733 5.66872L6.99904 3.63444C7.00862 3.62891 7.01828 3.62354 7.02802 3.61834L10.7373 1.55761C10.7567 1.54687 10.7765 1.53575 10.7968 1.52437C11.0152 1.40207 11.2898 1.24824 11.5971 1.18505ZM7.5 5.64404L5.05914 7.00008L12 10.8561L14.4408 9.50006L7.5 5.64404ZM16.5 8.3561L9.55913 4.50008L11.7086 3.30592C11.8602 3.22174 11.9375 3.1792 11.9952 3.15136C11.9969 3.15056 11.9985 3.1498 12 3.14907C12.0015 3.1498 12.0031 3.15056 12.0048 3.15136C12.0625 3.1792 12.1398 3.22173 12.2914 3.30592L18.9408 7.00006L16.5 8.3561ZM11 12.5885L4 8.69959V16.0586C4 16.2416 4.00042 16.3353 4.0045 16.4031C4.00462 16.4051 4.00475 16.407 4.00487 16.4088C4.0064 16.4098 4.00802 16.4108 4.00971 16.4119C4.067 16.4484 4.14867 16.4943 4.30862 16.5831L3.82297 17.4573L4.30862 16.5831L11 20.3006L11 12.5885ZM19 16.0001C17.8954 16.0001 17 16.8955 17 18.0001C17 19.1047 17.8954 20.0001 19 20.0001C20.1046 20.0001 21 19.1047 21 18.0001C21 16.8955 20.1046 16.0001 19 16.0001ZM15 18.0001C15 15.7909 16.7909 14.0001 19 14.0001C21.2091 14.0001 23 15.7909 23 18.0001C23 18.8713 22.7215 19.6775 22.2486 20.3344L22.7071 20.793C23.0976 21.1835 23.0976 21.8167 22.7071 22.2072C22.3166 22.5977 21.6834 22.5977 21.2929 22.2072L20.7052 21.6195C20.1879 21.8636 19.6099 22.0001 19 22.0001C16.7909 22.0001 15 20.2092 15 18.0001Z"})),$r=e=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.77687 1.00001C2.78469 1.00001 2.79241 1.00001 2.80001 1.00001H6.20001C6.20762 1.00001 6.21533 1.00001 6.22315 1.00001C6.34227 0.999961 6.48452 0.999906 6.60984 1.01015C6.75506 1.02201 6.96305 1.05245 7.181 1.1635C7.46324 1.30731 7.69271 1.53678 7.83652 1.81903C7.94757 2.03697 7.97801 2.24496 7.98988 2.39018C8.00012 2.5155 8.00006 2.65776 8.00002 2.77687C8.00001 2.78469 8.00001 2.79241 8.00001 2.80001V6.20001C8.00001 6.20762 8.00001 6.21533 8.00002 6.22315C8.00006 6.34227 8.00012 6.48452 7.98988 6.60984C7.97801 6.75506 7.94757 6.96305 7.83652 7.181C7.69271 7.46324 7.46324 7.69271 7.181 7.83652C6.96305 7.94757 6.75506 7.97801 6.60984 7.98988C6.48452 8.00012 6.34227 8.00006 6.22315 8.00002C6.21533 8.00001 6.20762 8.00001 6.20001 8.00001H2.80001C2.79241 8.00001 2.78469 8.00001 2.77687 8.00002C2.65776 8.00006 2.5155 8.00012 2.39018 7.98988C2.24496 7.97801 2.03697 7.94757 1.81903 7.83652C1.53678 7.69271 1.30731 7.46324 1.1635 7.181C1.05245 6.96305 1.02201 6.75506 1.01015 6.60984C0.999906 6.48452 0.999961 6.34227 1.00001 6.22315C1.00001 6.21533 1.00001 6.20762 1.00001 6.20001V2.80001C1.00001 2.79241 1.00001 2.78469 1.00001 2.77687C0.999961 2.65776 0.999906 2.5155 1.01015 2.39018C1.02201 2.24496 1.05245 2.03697 1.1635 1.81903C1.30731 1.53678 1.53678 1.30731 1.81903 1.1635C2.03697 1.05245 2.24496 1.02201 2.39018 1.01015C2.5155 0.999906 2.65776 0.999961 2.77687 1.00001ZM3.00001 3.00001V6.00001H6.00001V3.00001H3.00001ZM19.5322 5.52394C19.2488 5.50079 18.8766 5.50001 18.3 5.50001H11C10.4477 5.50001 10 5.0523 10 4.50001C10 3.94773 10.4477 3.50001 11 3.50001L18.3386 3.50001C18.8657 3.49999 19.3205 3.49998 19.695 3.53058C20.0904 3.56288 20.4836 3.6342 20.862 3.82699C21.4265 4.11461 21.8854 4.57356 22.173 5.13804C22.3658 5.51642 22.4371 5.90964 22.4694 6.30498C22.5 6.67955 22.5 7.13431 22.5 7.66145V9.032C22.5 9.47065 22.5 9.84914 22.4787 10.1624C22.4562 10.4922 22.4067 10.8221 22.2717 11.1481C21.9672 11.8832 21.3831 12.4672 20.6481 12.7717C20.3221 12.9067 19.9922 12.9562 19.6624 12.9787C19.3491 13 18.9706 13 18.532 13H18.5C17.9477 13 17.5 12.5523 17.5 12C17.5 11.4477 17.9477 11 18.5 11C18.9796 11 19.2893 10.9995 19.5263 10.9833C19.7542 10.9677 19.8411 10.9411 19.8827 10.9239C20.1277 10.8224 20.3224 10.6277 20.4239 10.3827C20.4411 10.3411 20.4677 10.2543 20.4833 10.0263C20.4995 9.78927 20.5 9.47964 20.5 9.00001V7.70001C20.5 7.12346 20.4992 6.75118 20.4761 6.46785C20.4539 6.19618 20.4162 6.09547 20.391 6.04602C20.2951 5.85786 20.1422 5.70488 19.954 5.60901C19.9046 5.58381 19.8038 5.54613 19.5322 5.52394ZM10.2769 8.50001C10.2847 8.50001 10.2924 8.50001 10.3 8.50001H13.7C13.7076 8.50001 13.7153 8.50001 13.7232 8.50001C13.8423 8.49996 13.9845 8.49991 14.1098 8.51015C14.2551 8.52201 14.4631 8.55245 14.681 8.6635C14.9632 8.80731 15.1927 9.03678 15.3365 9.31903C15.4476 9.53697 15.478 9.74496 15.4899 9.89018C15.5001 10.0155 15.5001 10.1578 15.5 10.2769C15.5 10.2847 15.5 10.2924 15.5 10.3V13.7C15.5 13.7076 15.5 13.7153 15.5 13.7231C15.5001 13.8423 15.5001 13.9845 15.4899 14.1098C15.478 14.2551 15.4476 14.4631 15.3365 14.681C15.1927 14.9632 14.9632 15.1927 14.681 15.3365C14.4631 15.4476 14.2551 15.478 14.1098 15.4899C13.9845 15.5001 13.8423 15.5001 13.7231 15.5C13.7153 15.5 13.7076 15.5 13.7 15.5H10.3C10.2924 15.5 10.2847 15.5 10.2769 15.5C10.1578 15.5001 10.0155 15.5001 9.89018 15.4899C9.74496 15.478 9.53697 15.4476 9.31903 15.3365C9.03678 15.1927 8.80731 14.9632 8.6635 14.681C8.55245 14.4631 8.52201 14.2551 8.51015 14.1098C8.49991 13.9845 8.49996 13.8423 8.50001 13.7232C8.50001 13.7153 8.50001 13.7076 8.50001 13.7V10.3C8.50001 10.2924 8.50001 10.2847 8.50001 10.2769C8.49996 10.1578 8.49991 10.0155 8.51015 9.89018C8.52201 9.74496 8.55245 9.53697 8.6635 9.31903C8.80731 9.03678 9.03678 8.80731 9.31903 8.6635C9.53697 8.55245 9.74496 8.52201 9.89018 8.51015C10.0155 8.49991 10.1578 8.49996 10.2769 8.50001ZM10.5 10.5V13.5H13.5V10.5H10.5ZM5.46802 11H5.50001C6.0523 11 6.50001 11.4477 6.50001 12C6.50001 12.5523 6.0523 13 5.50001 13C5.02039 13 4.71075 13.0006 4.47377 13.0167C4.24577 13.0323 4.15894 13.0589 4.11733 13.0761C3.8723 13.1776 3.67763 13.3723 3.57613 13.6173C3.5589 13.6589 3.53228 13.7458 3.51672 13.9738C3.50055 14.2108 3.50001 14.5204 3.50001 15V16.3C3.50001 16.8766 3.50079 17.2488 3.52394 17.5322C3.54614 17.8038 3.58381 17.9046 3.60901 17.954C3.70488 18.1422 3.85786 18.2951 4.04602 18.391C4.09547 18.4162 4.19618 18.4539 4.46785 18.4761C4.75119 18.4992 5.12346 18.5 5.70001 18.5H13C13.5523 18.5 14 18.9477 14 19.5C14 20.0523 13.5523 20.5 13 20.5H5.66145C5.13431 20.5 4.67955 20.5 4.30498 20.4694C3.90964 20.4371 3.51642 20.3658 3.13804 20.173C2.57356 19.8854 2.11461 19.4265 1.82699 18.862C1.6342 18.4836 1.56288 18.0904 1.53058 17.695C1.49998 17.3205 1.49999 16.8657 1.50001 16.3386L1.50001 14.968C1.5 14.5294 1.49999 14.1509 1.52136 13.8376C1.54387 13.5078 1.59337 13.1779 1.72837 12.852C2.03286 12.1169 2.61688 11.5329 3.35196 11.2284C3.67789 11.0934 4.0078 11.0439 4.33763 11.0214C4.65089 11 5.02937 11 5.46802 11ZM17.7769 16H21.2231C21.3423 16 21.4845 15.9999 21.6098 16.0101C21.7551 16.022 21.9631 16.0525 22.181 16.1635C22.4632 16.3073 22.6927 16.5368 22.8365 16.819C22.9476 17.037 22.978 17.245 22.9899 17.3902C23.0001 17.5155 23.0001 17.6577 23 17.7769C23 17.7847 23 17.7924 23 17.8V21.2C23 21.2076 23 21.2153 23 21.2232C23.0001 21.3423 23.0001 21.4845 22.9899 21.6098C22.978 21.7551 22.9476 21.9631 22.8365 22.181C22.6927 22.4632 22.4632 22.6927 22.181 22.8365C21.9631 22.9476 21.7551 22.978 21.6098 22.9899C21.4845 23.0001 21.3423 23.0001 21.2232 23C21.2153 23 21.2076 23 21.2 23H17.8C17.7924 23 17.7847 23 17.7769 23C17.6577 23.0001 17.5155 23.0001 17.3902 22.9899C17.245 22.978 17.037 22.9476 16.819 22.8365C16.5368 22.6927 16.3073 22.4632 16.1635 22.181C16.0525 21.9631 16.022 21.7551 16.0101 21.6098C15.9999 21.4845 16 21.3423 16 21.2231V17.7769C16 17.6578 15.9999 17.5155 16.0101 17.3902C16.022 17.245 16.0525 17.037 16.1635 16.819C16.3073 16.5368 16.5368 16.3073 16.819 16.1635C17.037 16.0525 17.245 16.022 17.3902 16.0101C17.5155 15.9999 17.6578 16 17.7769 16ZM18 18V21H21V18H18Z"})),Rr=e=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 3C3.89543 3 3 3.89543 3 5C3 6.10457 3.89543 7 5 7C6.10457 7 7 6.10457 7 5C7 3.89543 6.10457 3 5 3ZM1 5C1 2.79086 2.79086 1 5 1C7.20914 1 9 2.79086 9 5C9 7.20914 7.20914 9 5 9C2.79086 9 1 7.20914 1 5ZM15.3531 6.06506C14.5699 6.00083 13.4768 6 11.9344 6H11.5C10.9477 6 10.5 5.55228 10.5 5C10.5 4.44772 10.9477 4 11.5 4L11.9846 4C13.4658 3.99999 14.6415 3.99998 15.5166 4.07176C15.9623 4.10831 16.3749 4.16645 16.736 4.26872C17.0962 4.37071 17.4673 4.53362 17.771 4.82093C18.5209 5.53055 18.8532 6.57592 18.6507 7.58832C18.5688 7.99821 18.3599 8.34552 18.1247 8.63678C17.8889 8.92882 17.5856 9.21455 17.2429 9.50177C16.5699 10.0657 15.61 10.7447 14.4007 11.6L10.2952 14.5039C9.0359 15.3946 8.14402 16.0264 7.54167 16.5312C7.24297 16.7815 7.0505 16.9721 6.9314 17.1196C6.83281 17.2417 6.81191 17.3009 6.80978 17.3071C6.74385 17.6425 6.8538 17.9884 7.1013 18.2241C7.10663 18.2279 7.15787 18.2642 7.30887 18.3069C7.49129 18.3586 7.75849 18.4031 8.1469 18.4349C8.93013 18.4992 10.0232 18.5 11.5656 18.5H12.5C13.0523 18.5 13.5 18.9477 13.5 19.5C13.5 20.0523 13.0523 20.5 12.5 20.5H11.5154C10.0343 20.5 8.85853 20.5 7.98341 20.4282C7.53771 20.3917 7.12511 20.3335 6.76395 20.2313C6.40378 20.1293 6.03267 19.9664 5.72904 19.6791C4.97912 18.9694 4.64679 17.9241 4.84925 16.9117C4.93123 16.5018 5.14013 16.1545 5.37529 15.8632C5.61108 15.5712 5.91437 15.2854 6.25714 14.9982C6.93015 14.4343 7.89004 13.7553 9.09927 12.9L13.2048 9.99611C14.4641 9.1054 15.356 8.47355 15.9583 7.96881C16.257 7.71851 16.4495 7.5279 16.5686 7.38039C16.6672 7.25833 16.6881 7.19915 16.6902 7.1929C16.7562 6.85751 16.6462 6.51165 16.3987 6.2759C16.3934 6.27206 16.3421 6.23581 16.1911 6.19305C16.0087 6.1414 15.7415 6.09692 15.3531 6.06506ZM19 17C17.8954 17 17 17.8954 17 19C17 20.1046 17.8954 21 19 21C20.1046 21 21 20.1046 21 19C21 17.8954 20.1046 17 19 17ZM15 19C15 16.7909 16.7909 15 19 15C21.2091 15 23 16.7909 23 19C23 21.2091 21.2091 23 19 23C16.7909 23 15 21.2091 15 19Z"})),Tt=e=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.16146 2H17.8385C18.3657 1.99998 18.8205 1.99997 19.195 2.03057C19.5904 2.06287 19.9836 2.13419 20.362 2.32698C20.9265 2.6146 21.3854 3.07354 21.673 3.63803C21.8658 4.01641 21.9371 4.40963 21.9694 4.80497C22 5.17954 22 5.6343 22 6.16144V17.8386C22 18.3657 22 18.8205 21.9694 19.195C21.9371 19.5904 21.8658 19.9836 21.673 20.362C21.3854 20.9265 20.9265 21.3854 20.362 21.673C19.9836 21.8658 19.5904 21.9371 19.195 21.9694C18.8205 22 18.3657 22 17.8386 22H6.16144C5.6343 22 5.17954 22 4.80497 21.9694C4.40963 21.9371 4.01641 21.8658 3.63803 21.673C3.07354 21.3854 2.6146 20.9265 2.32698 20.362C2.13419 19.9836 2.06287 19.5904 2.03057 19.195C1.99997 18.8205 1.99998 18.3657 2 17.8385V6.16146C1.99998 5.63431 1.99997 5.17955 2.03057 4.80497C2.06287 4.40963 2.13419 4.01641 2.32698 3.63803C2.6146 3.07354 3.07354 2.6146 3.63803 2.32698C4.01641 2.13419 4.40963 2.06287 4.80497 2.03057C5.17955 1.99997 5.63431 1.99998 6.16146 2ZM4 10.4649V17.8C4 18.3766 4.00078 18.7488 4.02393 19.0322C4.04612 19.3038 4.0838 19.4045 4.109 19.454C4.20487 19.6422 4.35785 19.7951 4.54601 19.891C4.59546 19.9162 4.69617 19.9539 4.96784 19.9761C5.25117 19.9992 5.62345 20 6.2 20H8L8 15.5681C7.99997 15.3157 7.99994 15.0699 8.01695 14.8618C8.03562 14.6332 8.07969 14.3634 8.21799 14.092C8.40974 13.7157 8.7157 13.4097 9.09202 13.218C9.36344 13.0797 9.63318 13.0356 9.86177 13.0169C10.0699 12.9999 10.3157 13 10.5681 13H13.4319C13.6843 13 13.9301 12.9999 14.1382 13.0169C14.3668 13.0356 14.6366 13.0797 14.908 13.218C15.2843 13.4097 15.5903 13.7157 15.782 14.092C15.9203 14.3634 15.9644 14.6332 15.9831 14.8618C16.0001 15.0699 16 15.3157 16 15.5681L16 20H17.8C18.3766 20 18.7488 19.9992 19.0322 19.9761C19.3038 19.9539 19.4045 19.9162 19.454 19.891C19.6422 19.7951 19.7951 19.6422 19.891 19.454C19.9162 19.4045 19.9539 19.3038 19.9761 19.0322C19.9992 18.7488 20 18.3766 20 17.8V10.4649C19.4117 10.8052 18.7286 11 18 11C16.8053 11 15.7329 10.4762 15 9.64583C14.2671 10.4762 13.1947 11 12 11C10.8053 11 9.73295 10.4762 9 9.64582C8.26706 10.4762 7.19469 11 6 11C5.27143 11 4.58835 10.8052 4 10.4649ZM10 7C10 8.10457 10.8954 9 12 9C13.1046 9 14 8.10457 14 7C14 6.44772 14.4477 6 15 6C15.5523 6 16 6.44772 16 7C16 8.10457 16.8954 9 18 9C19.1046 9 20 8.10457 20 7V6.2C20 5.62345 19.9992 5.25118 19.9761 4.96784C19.9539 4.69617 19.9162 4.59546 19.891 4.54601C19.7951 4.35785 19.6422 4.20487 19.454 4.109C19.4045 4.0838 19.3038 4.04612 19.0322 4.02393C18.7488 4.00078 18.3766 4 17.8 4H6.2C5.62345 4 5.25117 4.00078 4.96784 4.02393C4.69617 4.04612 4.59546 4.0838 4.54601 4.109C4.35785 4.20487 4.20487 4.35785 4.109 4.54601C4.0838 4.59546 4.04612 4.69617 4.02393 4.96784C4.00078 5.25117 4 5.62345 4 6.2V7C4 8.10457 4.89543 9 6 9C7.10457 9 8 8.10457 8 7C8 6.44772 8.44772 6 9 6C9.55229 6 10 6.44772 10 7ZM14 20V15.6C14 15.3035 13.9992 15.1412 13.9897 15.0246C13.9893 15.02 13.9889 15.0156 13.9886 15.0115C13.9844 15.0111 13.98 15.0107 13.9754 15.0103C13.8588 15.0008 13.6965 15 13.4 15H10.6C10.3035 15 10.1412 15.0008 10.0246 15.0103C10.02 15.0107 10.0156 15.0111 10.0114 15.0115C10.0111 15.0156 10.0107 15.02 10.0103 15.0246C10.0008 15.1412 10 15.3035 10 15.6V20H14Z"}));function f1({artifactType:e,className:t}){switch(e){case"DataAnalysisArtifact":return s.jsx(Vr,{className:t});case"DataArtifact":return s.jsx(Cr,{className:t});case"ModelArtifact":return s.jsx($r,{className:t});case"SchemaArtifact":return s.jsx(Rr,{className:t});case"ServiceArtifact":return s.jsx(Tt,{className:t});case"StatisticsArtifact":return s.jsx(Tt,{className:t});default:return s.jsx(Ve,{className:t})}}function m1({children:e}){return s.jsxs(s.Fragment,{children:[s.jsx(St,{style:{border:"transparent",top:0,background:"transparent",width:0,height:0},type:"target",position:Ot.Top}),s.jsx("div",{className:"flex w-[300px] items-center justify-center",children:e}),s.jsx(St,{isConnectable:!1,type:"source",style:{border:"transparent",bottom:0,background:"transparent",width:0,height:0},position:Ot.Bottom})]})}const Te=e=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM12 6C12.5523 6 13 6.44772 13 7V17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17V7C11 6.44772 11.4477 6 12 6ZM16 10C16.5523 10 17 10.4477 17 11V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V11C15 10.4477 15.4477 10 16 10ZM8 12C8.55229 12 9 12.4477 9 13V17C9 17.5523 8.55229 18 8 18C7.44772 18 7 17.5523 7 17V13C7 12.4477 7.44772 12 8 12Z"})),Ar=e=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM10.2071 8.29289C10.5976 8.68342 10.5976 9.31658 10.2071 9.70711L7.91421 12L10.2071 14.2929C10.5976 14.6834 10.5976 15.3166 10.2071 15.7071C9.81658 16.0976 9.18342 16.0976 8.79289 15.7071L5.79289 12.7071C5.40237 12.3166 5.40237 11.6834 5.79289 11.2929L8.79289 8.29289C9.18342 7.90237 9.81658 7.90237 10.2071 8.29289ZM13.7929 8.29289C14.1834 7.90237 14.8166 7.90237 15.2071 8.29289L18.2071 11.2929C18.5976 11.6834 18.5976 12.3166 18.2071 12.7071L15.2071 15.7071C14.8166 16.0976 14.1834 16.0976 13.7929 15.7071C13.4024 15.3166 13.4024 14.6834 13.7929 14.2929L16.0858 12L13.7929 9.70711C13.4024 9.31658 13.4024 8.68342 13.7929 8.29289Z"})),p1=p.createContext(null);function Dr({children:e}){const[t,r]=p.useState(!1);return s.jsx(p1.Provider,{value:{isVisualizationConfirmed:t,setVisualizationConfirmed:r},children:e})}function Fr(){const e=p.useContext(p1);if(!e)throw new Error("useArtifactLoadConfirmationContext must be used within a VisualizationConfirmProvider");return e}function zr({versionId:e}){return["artifact_versions",e]}async function Hr({versionId:e}){const t=G(B.artifactVersions.detail(e)),r=await X(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&he(),!r.ok)throw new $({message:`Error while fetching artifact version ${e}`,status:r.status,statusText:r.statusText});return r.json()}function se(e,t){return Z({queryKey:zr(e),queryFn:()=>Hr(e),...t})}const Gr=e=>p.createElement("svg",{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 2.22222C5.70445 2.22222 2.22222 5.70445 2.22222 10C2.22222 14.2955 5.70445 17.7778 10 17.7778C14.2955 17.7778 17.7778 14.2955 17.7778 10C17.7778 5.70445 14.2955 2.22222 10 2.22222ZM0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10Z",fill:"#D1D5DB"}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.7778 10C17.7778 5.70445 14.2955 2.22222 10 2.22222V0C15.5228 0 20 4.47715 20 10H17.7778Z",fill:"#7A3EF4"})),Br=e=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM6.29289 8.29289C6.68342 7.90237 7.31658 7.90237 7.70711 8.29289L10.7071 11.2929C11.0976 11.6834 11.0976 12.3166 10.7071 12.7071L7.70711 15.7071C7.31658 16.0976 6.68342 16.0976 6.29289 15.7071C5.90237 15.3166 5.90237 14.6834 6.29289 14.2929L8.58579 12L6.29289 9.70711C5.90237 9.31658 5.90237 8.68342 6.29289 8.29289ZM12 15C12 14.4477 12.4477 14 13 14H17C17.5523 14 18 14.4477 18 15C18 15.5523 17.5523 16 17 16H13C12.4477 16 12 15.5523 12 15Z"}));function A({children:e,className:t,...r}){return s.jsx("dt",{...r,className:e1("col-span-1 flex min-w-0 items-center truncate text-theme-text-secondary",t),children:e})}function D({children:e,className:t,...r}){return s.jsx("dd",{...r,className:e1("col-span-2 flex h-6 w-full min-w-0 items-center truncate text-neutral-700",t),children:e})}function g({label:e,value:t}){return s.jsxs(s.Fragment,{children:[s.jsx(A,{children:e}),s.jsx(D,{children:t})]})}function Zr({componentId:e}){return["components",e]}async function qr({componentId:e}){const t=G(B.components.detail(e)),r=await X(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&he(),!r.ok)throw new $({message:`Error while fetching component ${e}`,status:r.status,statusText:r.statusText});return r.json()}function Yr(e,t){return Z({queryKey:Zr(e),queryFn:()=>qr(e),...t})}function Kr({runId:e}){return["runs",e]}async function Ur({runId:e}){const t=G(B.runs.detail(e)),r=await X(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&he(),!r.ok)throw new $({message:`Error while fetching pipeline run ${e}`,status:r.status,statusText:r.statusText});return r.json()}function q(e,t){return Z({queryKey:Kr(e),queryFn:()=>Ur(e),...t})}function Wr({stepId:e}){return["steps",e]}async function Qr({stepId:e}){const t=G(B.steps.detail(e)),r=await X(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&he(),!r.ok)throw new $({message:`Error while fetching step ${e}`,status:r.status,statusText:r.statusText});return r.json()}function Ce(e,t){return Z({queryKey:Wr(e),queryFn:()=>Qr(e),...t})}function Xr({artifactVersionId:e}){var o,l,d,c,u,h,f,m,x,b,v,j,L,S,O,R,N,V,T;const t=se({versionId:e}),r=(l=(o=t.data)==null?void 0:o.body)==null?void 0:l.producer_pipeline_run_id,n=q({runId:r},{throwOnError:!0,enabled:!!r}),a=(c=(d=t.data)==null?void 0:d.metadata)==null?void 0:c.producer_step_run_id,i=Ce({stepId:a},{enabled:!!a});return t.isPending||n.isPending?s.jsx(C,{className:"h-[500px] w-full"}):t.isError||n.isError?s.jsx(Y,{err:t.error||n.error}):s.jsx(k,{initialOpen:!0,title:"Details",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(g,{label:"Pipeline",value:s.jsx(ce,{to:le.pipelines.namespace(encodeURIComponent((h=(u=n.data.body)==null?void 0:u.pipeline)==null?void 0:h.name)),children:s.jsxs(E,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx($e,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(m=(f=n.data.body)==null?void 0:f.pipeline)==null?void 0:m.name]})})}),((x=t.data.body)==null?void 0:x.producer_pipeline_run_id)&&((b=n.data.body)==null?void 0:b.status)&&s.jsx(g,{label:"Producer Run",value:s.jsx(ce,{to:le.runs.detail((v=t.data.body)==null?void 0:v.producer_pipeline_run_id),children:s.jsxs(E,{color:ve((j=n.data.body)==null?void 0:j.status),className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[((L=n.data.body)==null?void 0:L.status)==="running"?s.jsx(Gr,{className:"mr-1 h-4 w-4 border-[2px]"}):s.jsx(Br,{className:"mr-1 h-4 w-4 fill-current"}),(S=t.data.body)==null?void 0:S.producer_pipeline_run_id]})})}),((O=t.data.body)==null?void 0:O.artifact.id)&&s.jsx(g,{label:"Producer Step",value:s.jsx(s.Fragment,{children:i.data?s.jsxs(E,{color:ve("completed"),className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx(ne,{className:"mr-1 fill-current",status:"completed"}),i.data.name]}):s.jsx(C,{className:"h-full w-[150px]"})})}),s.jsx(g,{label:"Type",value:(R=t.data.body)==null?void 0:R.type}),s.jsx(g,{label:"Author",value:s.jsx("div",{className:"inline-flex items-center gap-1",children:s.jsx(He,{username:((V=(N=t.data.body)==null?void 0:N.user)==null?void 0:V.name)||""})})}),s.jsx(g,{label:"Updated",value:s.jsx(de,{dateString:((T=t.data.body)==null?void 0:T.updated)||""})})]})})}function Jr({artifactVersionId:e}){var d,c,u,h,f,m;const{data:t,isPending:r,isError:n,error:a}=se({versionId:e}),i=(d=t==null?void 0:t.metadata)==null?void 0:d.artifact_store_id,{data:o,isSuccess:l}=Yr({componentId:i},{enabled:!!i});return n?s.jsx(Y,{err:a}):r?s.jsx(C,{className:"h-[500px] w-full"}):s.jsx(k,{initialOpen:!0,title:"Data",children:s.jsxs("dl",{className:"grid w-full grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(A,{className:"col-span-3",children:"URI"}),s.jsx(D,{className:"col-span-3 h-auto",children:s.jsx(I,{fullWidth:!0,codeClasses:"truncate",code:((c=t.body)==null?void 0:c.uri)||""})}),((u=t.metadata)==null?void 0:u.artifact_store_id)&&s.jsx(g,{label:"Artifact Store",value:s.jsx(s.Fragment,{children:l?s.jsx(E,{emphasis:"subtle",rounded:!1,color:"grey",className:"text-theme-text-primary",children:o==null?void 0:o.name}):s.jsx(C,{className:"h-6 w-12"})})}),s.jsx(g,{label:"Data Type",value:s.jsx(E,{className:"flex w-fit items-center text-theme-text-primary",color:"grey",emphasis:"subtle",rounded:!1,children:s.jsx(ir,{children:s.jsxs(or,{children:[s.jsx(lr,{className:"cursor-auto",children:(h=t.body)==null?void 0:h.data_type.attribute}),s.jsxs(dr,{children:[(f=t.body)==null?void 0:f.data_type.module,".",(m=t.body)==null?void 0:m.data_type.attribute," "]})]})})})})]})})}function en({artifactVersionId:e}){function t(r){return`from zenml.client import Client
3
+
4
+ artifact = Client().get_artifact_version('${r}')
5
+ loaded_artifact = artifact.load()`}return s.jsx(k,{initialOpen:!0,title:"Code",children:s.jsx(I,{fullWidth:!0,highlightCode:!0,wrap:!0,code:t(e)})})}function tn({artifactVersionId:e}){const{data:t,isError:r,error:n}=se({versionId:e});return r?s.jsx(Y,{err:n}):s.jsxs("div",{className:"space-y-5",children:[t?s.jsx(Xr,{artifactVersionId:t.id}):s.jsx(C,{className:"h-[500px] rounded-md lg:col-span-2"}),t?s.jsx(Jr,{artifactVersionId:t.id}):s.jsx(C,{className:"h-[500px] rounded-md lg:col-span-2"}),t?s.jsx(en,{artifactVersionId:t.id}):s.jsx(C,{className:"h-[500px] rounded-md lg:col-span-2"})]})}function H({title:e,data:t,intent:r="primary",isInitialOpen:n=!1,contentClassName:a,className:i}){const o={},l={},d={},c=/^<class\s+'.*'>$/;for(const[h,f]of Object.entries(t||{}))typeof f=="object"&&!Array.isArray(f)?o[h]=f:Array.isArray(f)?d[h]=f:l[h]=f;if(Object.keys(t||{}).length===0)return null;const u=Object.entries(l);return u.sort((h,f)=>h[0].localeCompare(f[0])),s.jsx(k,{contentClassName:a,className:i,initialOpen:n,intent:r,title:e,children:s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:u.map(([h,f])=>s.jsx(g,{label:h,value:s.jsx(s.Fragment,{children:typeof f=="boolean"?s.jsx("div",{className:"py-1",children:JSON.stringify(f)}):c.test(f)?s.jsx(I,{className:"py-1",highlightCode:!0,code:f}):s.jsx("div",{className:"overflow-x-auto py-1",children:f})})},h))}),Object.entries(d).map(([h,f])=>s.jsx(rn,{title:h,value:f},h)),Object.entries(o).map(([h,f])=>s.jsx(H,{intent:"secondary",title:h,data:f},h))]})})}function rn({title:e,value:t}){const r=t.filter(a=>!Array.isArray(a)&&typeof a!="object"||a===null),n=t.filter(a=>Array.isArray(a)||typeof a=="object");return s.jsx(s.Fragment,{children:s.jsxs(k,{intent:"secondary",title:e,children:[r.length>0&&s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 truncate md:grid-cols-3 md:gap-y-4",children:Object.entries(r).map(([a,i])=>s.jsx(g,{label:a,value:s.jsx("div",{className:"py-1",children:t1(i)})},a))}),n.length>0&&s.jsx("ul",{className:"space-y-4",children:n.map((a,i)=>s.jsx("li",{children:s.jsx(H,{intent:"secondary",title:i,data:a},i)},i))})]},e)})}function nn(){return s.jsx(k,{initialOpen:!0,title:"Metadata",children:s.jsx(Q,{icon:s.jsx(Ve,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available."})]})})})}function x1({metadata:e}){const t=Object.values(e||{}).filter(r=>r.body.type==="dict");return s.jsx(s.Fragment,{children:t.map(r=>s.jsx(H,{data:r.body.value,title:r.body.key},r.id))})}function Ge({metadata:e,title:t}){const r=Object.entries(e||{}),n=/^<class\s+'.*'>$/,a=r.filter(([o,l])=>l.body.type!=="dict");if(a.length===0)return null;a.sort((o,l)=>o[0].localeCompare(l[0]));const i=o=>o<1024?o+" bytes":o<Math.pow(1024,2)?(o/1024).toFixed(2)+" KB":o<Math.pow(1024,3)?(o/Math.pow(1024,2)).toFixed(2)+" MB":(o/Math.pow(1024,3)).toFixed(2)+" GB";return s.jsx("div",{children:s.jsx(k,{initialOpen:!0,title:t||"Uncategorized",children:s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:a.map(([o,l])=>s.jsx(g,{label:l.body.key,value:s.jsx(s.Fragment,{children:n.test(l.body.value)?s.jsx(I,{className:"py-1",highlightCode:!0,code:l.body.value}):l.body.type==="StorageSize"?s.jsx("div",{className:"py-1",children:i(l.body.value)}):l.body.type==="Uri"?s.jsx("a",{className:"py-1 underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:l.body.value,children:l.body.value}):s.jsx("div",{className:"py-1",children:l.body.value})})},l.id))})})})}function sn({artifactVersionId:e}){var a,i;const{data:t,isError:r,error:n}=se({versionId:e});return r?s.jsx(Y,{err:n}):t!=null&&t.metadata?s.jsxs("div",{className:"flex flex-col gap-5",children:[t?s.jsx(Ge,{metadata:(a=t.metadata)==null?void 0:a.run_metadata}):s.jsx(C,{className:"h-9 w-full"}),t?s.jsx(x1,{metadata:(i=t.metadata)==null?void 0:i.run_metadata}):s.jsx(C,{className:"h-9 w-full"})]}):s.jsx(Q,{icon:s.jsx(Ve,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsx("div",{className:"text-center",children:s.jsx("h1",{className:"mb-2 text-display-xs font-semibold",children:"No Metadata Found for this Artifact"})})})}function C1({versionId:e}){return["artifact_versions",e,"visualize"]}async function an({versionId:e},t){const r=G(B.artifactVersions.visualize(e)),n=await X(r,{method:"GET",headers:{"Content-Type":"application/json"},signal:t});if(n.status===404){const a=await n.json().then(i=>i.detail).catch(()=>["","Failed to fetch artifact visualization"]);throw new $({message:a[1]||"Failed to fetch artifact visualization",status:n.status,statusText:n.statusText})}if(!n.ok)throw new $({message:`Error while fetching artifact visualization for version ${e}`,status:n.status,statusText:n.statusText});return n.json()}function on(e,t){return Z({queryKey:C1(e),queryFn:({signal:r})=>an(e,r),...t})}function ln({content:e}){const t=p.useRef(null),r=()=>{var n;if(t.current){const a=(n=t.current.contentWindow)==null?void 0:n.document.documentElement.scrollHeight;t.current.height=a?`${a}px`:"100%"}};return p.useEffect(()=>(r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}),[]),s.jsx("div",{children:s.jsx("iframe",{className:"w-full",title:"Secure HTML Content",ref:t,srcDoc:e,onLoad:r})})}function dn({content:e}){return s.jsx("div",{className:"flex items-center justify-center",children:s.jsx("img",{src:kr("data:image/png;base64,"+e),alt:"Visualization for artifact"})})}const cn=p.lazy(()=>r1(()=>import("./CsvVizualization-D3kAypDj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),un=p.lazy(()=>r1(()=>import("./MarkdownVisualization-Bajxn0HY.js"),__vite__mapDeps([8,1])));function hn({artifactVersionId:e,artifactName:t}){const[r,n]=p.useState(!1),{isVisualizationConfirmed:a,setVisualizationConfirmed:i}=Fr(),o=Nr(),{data:l,isError:d,error:c,isPending:u}=on({versionId:e},{retry:!1,enabled:!r});return r?s.jsx(Q,{icon:s.jsx(je,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"flex flex-col items-center text-center",children:[s.jsx("p",{className:"mb-5 text-text-lg text-theme-text-secondary",children:"Loading the visualization cancelled"}),s.jsx(P,{size:"md",onClick:()=>n(!1),children:"Load Visualization"})]})}):d?c.status===501?s.jsxs(Q,{icon:s.jsx(je,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:[s.jsx("p",{children:"This artifact cannot be visualized because it cannot be loaded from the artifact store. This might happen if your ZenML server does not have the artifact stores dependencies installed or if the server is not authenticated to access it. For more information, see our"}),s.jsx("a",{rel:"noopener noreferrer",target:"_blank",href:"https://docs.zenml.io/stack-components/artifact-stores/custom",children:"docs"})]}):s.jsx(Q,{icon:s.jsx(je,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsx("div",{className:"text-center",children:s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:c.message})})}):u?s.jsxs("div",{className:"flex flex-col items-center gap-7 py-12",children:[s.jsx(Re,{}),s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("p",{className:"mb-5 text-display-xs",children:"Loading Visualization"}),s.jsx(P,{onClick:()=>{o.cancelQueries({queryKey:C1({versionId:e})}),n(!0)},intent:"secondary",size:"md",children:"Cancel"})]})]}):a?s.jsxs("div",{children:[s.jsx("div",{className:"flex justify-end",children:s.jsx(g1,{artifactName:t,...l})}),s.jsxs("div",{children:[l.type==="image"&&s.jsx(dn,{content:l.value}),l.type==="html"&&s.jsx(ln,{content:l.value}),l.type==="markdown"&&s.jsx(un,{content:l.value}),l.type==="csv"&&s.jsx(cn,{content:l.value})]})]}):s.jsx(fn,{artifactName:t,setConfirmed:i,...l})}function fn({artifactName:e,setConfirmed:t,...r}){return s.jsxs("div",{className:"flex flex-col items-center justify-center gap-8",children:[s.jsx(Lr,{children:"This preview may contain harmful code. Only proceed if you trust the source. Loading content from untrusted sources can pose risks. If unsure, avoid loading."}),s.jsxs("div",{className:"flex justify-center gap-4",children:[s.jsx(P,{size:"md",onClick:()=>t(!0),children:"Load Preview"}),s.jsx(g1,{...r,buttonIntent:"secondary",artifactName:e})]})]})}function g1({type:e,value:t,artifactName:r,buttonIntent:n="primary"}){const a={image:"png",html:"html",markdown:"md",csv:"csv"},i={image:"image/png",html:"text/html",markdown:"text/markdown",csv:"text/csv"};function o(){const d=atob(t),c=new Array(d.length);for(let h=0;h<d.length;h++)c[h]=d.charCodeAt(h);return new Uint8Array(c)}function l(){try{const d=new Blob([e==="image"?o():t],{type:i[e]}),c=window.URL.createObjectURL(d),u=document.createElement("a");u.href=c,u.download=`${r}.`+a[e],u.click()}catch(d){console.error(d)}}return s.jsx(P,{intent:n,size:"md",className:"mb-4",onClick:l,children:"Download"})}const mn=5*1024*1024;function pn({artifactVersionId:e}){var d,c,u,h,f,m;const[t,r]=p.useState(!1),{data:n,isPending:a,isError:i,error:o}=se({versionId:e});if(i)return s.jsx(Q,{icon:s.jsx(Te,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsx("div",{className:"text-center",children:s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:o.message})})});if(a)return s.jsx(C,{className:"h-[300px] w-full"});const l=(h=(u=(c=(d=n.metadata)==null?void 0:d.run_metadata)==null?void 0:c.storage_size)==null?void 0:u.body)==null?void 0:h.value;return(f=n.metadata)!=null&&f.visualizations&&n.metadata.visualizations.length<1?s.jsx(Q,{icon:s.jsx(Te,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No visualizations found"}),s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no visualizations available for this artifact version."})]})}):s.jsx("div",{children:l<mn||t?s.jsx(hn,{artifactName:((m=n.body)==null?void 0:m.artifact.name)||"artifact",artifactVersionId:e}):s.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center",children:[s.jsx("p",{className:"mb-4",children:"Artifact Visualization is larger than 5MB. Confirm to proceed:"}),s.jsx(P,{onClick:()=>r(!0),size:"md",children:"Confirm"})]})})}function xn({artifactVersionId:e}){var n,a,i;const{data:t}=se({versionId:e}),r=(n=t==null?void 0:t.body)==null?void 0:n.version;return s.jsxs("div",{children:[s.jsx("div",{className:"flex h-9 items-center border-b border-theme-border-moderate bg-theme-surface-primary px-4 py-3",children:s.jsxs(n1,{className:"focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(l1,{className:"h-5 w-5 fill-neutral-500"}),s.jsx("span",{className:"sr-only",children:"Close"})]})}),s.jsxs("div",{className:"border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:[t?s.jsx("p",{className:"mb-0.5 text-text-sm text-theme-text-secondary",children:e}):s.jsx(C,{className:"w-9"}),t?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(f1,{artifactType:((a=t.body)==null?void 0:a.type)||"BaseArtifact",className:"h-5 w-5 fill-theme-surface-strong"}),s.jsx("h2",{className:"text-display-xs font-semibold",children:(i=t.body)==null?void 0:i.artifact.name}),s.jsx(te,{color:r?"light-purple":"light-grey",rounded:!1,children:r||"None"})]}):s.jsx(C,{className:"h-6 w-7"})]}),s.jsx("div",{className:"p-5",children:s.jsx(Dr,{children:s.jsxs(Ae,{defaultValue:"overview",children:[s.jsxs(De,{children:[s.jsxs(F,{className:"flex items-center gap-2 text-text-md",value:"overview",children:[s.jsx(Fe,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Overview"})]}),s.jsxs(F,{className:"flex items-center gap-2 truncate text-text-md",value:"metadata",children:[s.jsx(Ar,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Metadata"})]}),s.jsxs(F,{className:"flex items-center gap-2 text-text-md",value:"visualization",children:[s.jsx(Te,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Visualization"})]})]}),s.jsx(z,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:s.jsx(tn,{artifactVersionId:e})}),s.jsx(z,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:s.jsx(sn,{artifactVersionId:e})}),s.jsx(z,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"visualization",children:s.jsx(pn,{artifactVersionId:e})})]})})})]})}function Cn({children:e,artifactVersionId:t,onOpenChange:r}){return s.jsxs(s1,{onOpenChange:r,children:[s.jsx(a1,{asChild:!0,children:e}),s.jsx(i1,{className:"w-[1000px] overflow-y-auto",children:s.jsx(xn,{artifactVersionId:t})})]})}function gn({data:e,selected:t}){const{unselectNodesAndEdges:r}=ze(a=>({unselectNodesAndEdges:a.unselectNodesAndEdges}));function n(a){a||setTimeout(()=>{r()},100)}return s.jsx(m1,{children:s.jsx(Cn,{onOpenChange:n,artifactVersionId:e.execution_id,children:s.jsxs("button",{"data-selected":!!t,className:"group flex h-[50px] min-w-0 max-w-[300px] items-center justify-center gap-1 rounded-rounded border border-primary-100 bg-primary-25 py-1 pl-1 pr-2 transition-all duration-200 hover:border-primary-400 data-[selected=true]:border-primary-500 data-[selected=true]:bg-primary-500",children:[s.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5 group-data-[selected=true]:bg-white/20",children:s.jsx(f1,{className:"h-4 w-4 fill-primary-400 group-data-[selected=true]:fill-theme-text-negative",artifactType:e.artifact_type})}),s.jsxs("div",{className:"min-w-0 text-left",children:[s.jsx("p",{className:"truncate text-text-sm font-semibold text-theme-text-brand group-data-[selected=true]:text-theme-text-negative",children:e.name}),s.jsx("p",{className:"truncate text-text-xs text-theme-text-secondary group-data-[selected=true]:text-white/70",children:e.artifact_data_type})]})]})})})}const Pt=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function bn(e,t,r,n){const a=Math.min(Pt(e,t)/2,Pt(t,r)/2,n),{x:i,y:o}=t;if(e.x===i&&i===r.x||e.y===o&&o===r.y)return`L${i} ${o}`;if(e.y===o){const c=e.x<r.x?-1:1,u=e.y<r.y?1:-1;return`L ${i+a*c},${o}Q ${i},${o} ${i},${o+a*u}`}const l=e.x<r.x?1:-1,d=e.y<r.y?-1:1;return`L ${i},${o+a*d}Q ${i},${o} ${i+a*l},${o}`}function Ee(e){return{x:e[0],y:e[1]}}const vn=e=>(t,r,n)=>{const a=e.borderRadius;let i=`M ${t.x}, ${t.y} `;const o=n.reduce((l,d,c)=>{let u="";if(c>0&&c<n.length-1)u=bn(Ee(n[c-1]),Ee(d),Ee(n[c+1]),a);else{const[h,f]=d;u=`${c===0?"M":"L"}${h} ${f}`}return l+=u,l},"");return i+=o,i+=`L ${r.x}, ${r.y} `,i};function wn(e){const t=gr(),r=br({nodes:t,sourcePosition:e.sourcePosition,targetPosition:e.targetPosition,sourceX:e.sourceX,sourceY:e.sourceY,targetX:e.targetX,targetY:e.targetY,options:{drawEdge:vn({borderRadius:10}),generatePath:vr,gridRatio:t.length>20?6:t.length>10?3:2}});return r===null?s.jsx(wr,{...e}):s.jsx(s.Fragment,{children:s.jsx("path",{className:"react-flow__edge-path",d:r.svgPathString,markerEnd:e.markerEnd,markerStart:e.markerStart})})}const yn=e=>p.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.75871 2L17.2413 2C18.0463 1.99999 18.7106 1.99998 19.2518 2.0442C19.8139 2.09012 20.3306 2.18869 20.816 2.43598C21.5686 2.81947 22.1805 3.43139 22.564 4.18404C22.8113 4.66938 22.9099 5.18608 22.9558 5.74818C23 6.28937 23 6.95372 23 7.75868V16.2413C23 17.0463 23 17.7106 22.9558 18.2518C22.9099 18.8139 22.8113 19.3306 22.564 19.816C22.1805 20.5686 21.5686 21.1805 20.816 21.564C20.3306 21.8113 19.8139 21.9099 19.2518 21.9558C18.7106 22 18.0463 22 17.2413 22H6.75877C5.95377 22 5.28939 22 4.74817 21.9558C4.18608 21.9099 3.66937 21.8113 3.18404 21.564C2.43139 21.1805 1.81947 20.5686 1.43597 19.816C1.18868 19.3306 1.09012 18.8139 1.04419 18.2518C0.999977 17.7106 0.999988 17.0463 1 16.2413L1 9.00066C1 9.00088 1 9.00044 1 9.00066C1 9.00044 1 8.99956 1 8.99934L1 7.7587C0.999988 6.95373 0.999977 6.28937 1.04419 5.74818C1.09012 5.18608 1.18868 4.66937 1.43598 4.18404C1.81947 3.43139 2.43139 2.81947 3.18404 2.43597C3.66938 2.18868 4.18608 2.09012 4.74818 2.04419C5.28937 1.99998 5.95374 1.99999 6.75871 2ZM3 10V16.2C3 17.0566 3.00078 17.6389 3.03755 18.089C3.07337 18.5274 3.1383 18.7516 3.21799 18.908C3.40973 19.2843 3.7157 19.5903 4.09202 19.782C4.24842 19.8617 4.47262 19.9266 4.91104 19.9624C5.36113 19.9992 5.94342 20 6.8 20H17.2C18.0566 20 18.6389 19.9992 19.089 19.9625C19.5274 19.9266 19.7516 19.8617 19.908 19.782C20.2843 19.5903 20.5903 19.2843 20.782 18.908C20.8617 18.7516 20.9266 18.5274 20.9625 18.089C20.9992 17.6389 21 17.0566 21 16.2V10H3ZM21 8H3V7.8C3 6.94342 3.00078 6.36113 3.03755 5.91104C3.07337 5.47262 3.1383 5.24842 3.21799 5.09202C3.40974 4.7157 3.7157 4.40973 4.09202 4.21799C4.24842 4.1383 4.47262 4.07337 4.91104 4.03755C5.36113 4.00078 5.94342 4 6.8 4L17.2 4C18.0566 4 18.6389 4.00078 19.089 4.03755C19.5274 4.07337 19.7516 4.1383 19.908 4.21799C20.2843 4.40974 20.5903 4.7157 20.782 5.09202C20.8617 5.24842 20.9266 5.47262 20.9625 5.91104C20.9992 6.36113 21 6.94342 21 7.8V8ZM10.7071 11.7929C11.0976 12.1834 11.0976 12.8166 10.7071 13.2071L8.91422 15L10.7071 16.7929C11.0976 17.1834 11.0976 17.8166 10.7071 18.2071C10.3166 18.5976 9.68342 18.5976 9.2929 18.2071L6.7929 15.7071C6.40237 15.3166 6.40237 14.6834 6.7929 14.2929L9.2929 11.7929C9.68342 11.4024 10.3166 11.4024 10.7071 11.7929ZM13.2929 11.7929C13.6834 11.4024 14.3166 11.4024 14.7071 11.7929L17.2071 14.2929C17.5976 14.6834 17.5976 15.3166 17.2071 15.7071L14.7071 18.2071C14.3166 18.5976 13.6834 18.5976 13.2929 18.2071C12.9024 17.8166 12.9024 17.1834 13.2929 16.7929L15.0858 15L13.2929 13.2071C12.9024 12.8166 12.9024 12.1834 13.2929 11.7929Z"})),b1=e=>p.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.29292 1.29292C2.56075 1.02509 2.95692 0.931566 3.31625 1.05134L6.31626 2.05134C6.7246 2.18746 7.00003 2.5696 7.00003 3.00003V5.58581L10.11 8.69574C10.0377 8.30745 10 7.9077 10 7.50003C10 3.91018 12.9102 1.00003 16.5 1.00003C17.6867 1.00003 18.8019 1.31894 19.7614 1.87638C20.0298 2.03232 20.2105 2.30406 20.2506 2.61187C20.2907 2.91968 20.1856 3.22865 19.9661 3.44815L17.3385 6.07576C17.1288 6.28544 17.0146 6.40072 16.9389 6.48989C16.9359 6.49344 16.9331 6.49682 16.9304 6.50003C16.9331 6.50323 16.9359 6.50661 16.9389 6.51016C17.0146 6.59933 17.1288 6.71461 17.3385 6.92429L17.5758 7.16155C17.7854 7.37123 17.9007 7.48541 17.9899 7.56111C17.9934 7.56412 17.9968 7.56696 18 7.56962C18.0032 7.56696 18.0066 7.56412 18.0102 7.56111C18.0993 7.48541 18.2146 7.37123 18.4243 7.16155L20.8822 4.70364C21.1187 4.46713 21.4578 4.36452 21.7858 4.43023C22.1137 4.49594 22.3871 4.72126 22.5142 5.03063C22.8277 5.7933 23 6.62779 23 7.50003C23 10.5046 20.9614 13.0331 18.1919 13.7777L21.2071 16.7928C22.4261 18.0117 22.4261 19.9881 21.2071 21.207C19.9882 22.426 18.0119 22.426 16.7929 21.207L12.0001 16.4142L7.20713 21.2071C5.98818 22.4261 4.01187 22.4261 2.79292 21.2071C1.57397 19.9882 1.57397 18.0119 2.79292 16.7929L9.08581 10.5L5.58581 7.00003H3.00003C2.5696 7.00003 2.18746 6.7246 2.05134 6.31626L1.05134 3.31625C0.931566 2.95692 1.02509 2.56075 1.29292 2.29292L2.29292 1.29292ZM5.00003 5.00003V3.72079L3.27012 3.14415L3.14415 3.27012L3.72079 5.00003H5.00003ZM11.2062 11.2081L4.20714 18.2071C3.76923 18.645 3.76923 19.355 4.20714 19.7929C4.64504 20.2308 5.35502 20.2308 5.79292 19.7929L12.9499 12.6359C12.9689 12.617 12.9882 12.5975 13.0079 12.5776C13.0487 12.5366 13.0913 12.4937 13.1355 12.4504L13.2326 12.3533C13.3452 12.2406 13.4665 12.1456 13.5937 12.0668C13.6314 12.0423 13.6697 12.0194 13.7087 11.9985C13.8064 11.9462 13.9249 11.8887 14.0691 11.8448C14.2133 11.8009 14.3438 11.7827 14.4541 11.7718C14.4756 11.7696 14.497 11.768 14.5184 11.7668C14.7885 11.7445 15.0574 11.7719 15.3055 11.84C15.4095 11.8686 15.515 11.8935 15.622 11.9146C15.6224 11.9147 15.6228 11.9148 15.6233 11.9149C15.6427 11.9187 15.6621 11.9224 15.6816 11.926C15.8091 11.9493 15.9384 11.9674 16.0696 11.9798C16.211 11.9932 16.3546 12 16.5 12C18.9853 12 21 9.98531 21 7.50003C21 7.47163 20.9998 7.44329 20.9992 7.41502L19.816 8.5983C19.6375 8.77679 19.4637 8.95062 19.3045 9.08579C19.1297 9.23422 18.9078 9.39379 18.6181 9.48793C18.2164 9.61844 17.7837 9.61844 17.382 9.48793C17.0923 9.39379 16.8704 9.23422 16.6955 9.08579C16.5363 8.95062 16.3625 8.7768 16.1841 8.59832L15.9017 8.31596C15.7233 8.13751 15.5494 7.96373 15.4143 7.80452C15.2658 7.62967 15.1063 7.40778 15.0121 7.11806C14.8816 6.71637 14.8816 6.28368 15.0121 5.88199C15.1063 5.59228 15.2658 5.37038 15.4143 5.19554C15.5494 5.03633 15.7232 4.86255 15.9017 4.68412L17.4792 3.10665C17.1643 3.03685 16.8367 3.00003 16.5 3.00003C14.0147 3.00003 12 5.01475 12 7.50003C12 7.80093 12.0294 8.09398 12.0852 8.37677L12.0888 8.39527C12.1337 8.62253 12.1727 8.82052 12.1978 8.97939C12.2214 9.12834 12.2493 9.33506 12.2283 9.54599C12.2173 9.65623 12.1991 9.78675 12.1552 9.93093C12.1114 10.0751 12.0538 10.1937 12.0015 10.2913C11.8581 10.5594 11.6197 10.7962 11.4224 10.9921C11.4025 11.0119 11.3831 11.0312 11.3642 11.0501L11.2081 11.2062C11.2078 11.2065 11.2074 11.2068 11.2071 11.2071C11.2068 11.2074 11.2065 11.2078 11.2062 11.2081ZM13.4143 15L18.2071 19.7928C18.645 20.2307 19.355 20.2307 19.7929 19.7928C20.2308 19.3549 20.2308 18.6449 19.7929 18.207L15.5109 13.9251C15.4187 13.911 15.3272 13.895 15.2363 13.8771C14.9852 13.8275 14.825 13.7961 14.7082 13.7777C14.6855 13.7741 14.667 13.7714 14.652 13.7694C14.6484 13.7726 14.6444 13.7762 14.64 13.7802C14.5816 13.8331 14.5053 13.9089 14.3727 14.0416C14.3699 14.0444 14.367 14.0472 14.3642 14.0501L13.4143 15Z"}));function jn({stepId:e}){var i;const{data:t,isPending:r,isError:n,error:a}=Ce({stepId:e});return n?s.jsx(Y,{err:a}):r?s.jsx(C,{className:"h-[300px] w-full"}):s.jsx(k,{initialOpen:!0,title:"Code",children:s.jsx(I,{fullWidth:!0,highlightCode:!0,wrap:!0,code:((i=t==null?void 0:t.metadata)==null?void 0:i.source_code)||""})})}const En=e=>p.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.7587 4.31292e-07L8 9.08129e-07C8.55229 9.08129e-07 9 0.447716 9 1C9 1.55229 8.55229 2 8 2H5.8C4.94342 2 4.36113 2.00078 3.91104 2.03755C3.47262 2.07337 3.24842 2.1383 3.09202 2.21799C2.7157 2.40973 2.40973 2.7157 2.21799 3.09202C2.1383 3.24842 2.07337 3.47262 2.03755 3.91104C2.00078 4.36113 2 4.94342 2 5.8V14.2C2 15.0566 2.00078 15.6389 2.03755 16.089C2.07337 16.5274 2.1383 16.7516 2.21799 16.908C2.40973 17.2843 2.7157 17.5903 3.09202 17.782C3.24842 17.8617 3.47262 17.9266 3.91104 17.9624C4.36113 17.9992 4.94342 18 5.8 18H14.2C15.0566 18 15.6389 17.9992 16.089 17.9624C16.5274 17.9266 16.7516 17.8617 16.908 17.782C17.2843 17.5903 17.5903 17.2843 17.782 16.908C17.8617 16.7516 17.9266 16.5274 17.9624 16.089C17.9992 15.6389 18 15.0566 18 14.2V12C18 11.4477 18.4477 11 19 11C19.5523 11 20 11.4477 20 12V14.2413C20 15.0463 20 15.7106 19.9558 16.2518C19.9099 16.8139 19.8113 17.3306 19.564 17.816C19.1805 18.5686 18.5686 19.1805 17.816 19.564C17.3306 19.8113 16.8139 19.9099 16.2518 19.9558C15.7106 20 15.0463 20 14.2413 20H5.75868C4.95372 20 4.28936 20 3.74817 19.9558C3.18608 19.9099 2.66937 19.8113 2.18404 19.564C1.43139 19.1805 0.819468 18.5686 0.435975 17.816C0.188684 17.3306 0.0901197 16.8139 0.0441945 16.2518C-2.28137e-05 15.7106 -1.23241e-05 15.0463 4.31292e-07 14.2413V5.7587C-1.23241e-05 4.95373 -2.28137e-05 4.28937 0.0441945 3.74817C0.0901197 3.18608 0.188684 2.66937 0.435975 2.18404C0.819468 1.43139 1.43139 0.819468 2.18404 0.435975C2.66937 0.188684 3.18608 0.0901197 3.74817 0.0441945C4.28937 -2.28137e-05 4.95373 -1.23241e-05 5.7587 4.31292e-07ZM12 1.00001C12 0.447726 12.4477 1.04449e-05 13 1.04449e-05H19C19.5523 1.04449e-05 20 0.447725 20 1.00001L20 7.00001C20 7.55229 19.5523 8.00001 19 8.00001C18.4477 8.00001 18 7.5523 18 7.00001L18 3.41422L10.7071 10.7071C10.3166 11.0976 9.68342 11.0976 9.29289 10.7071C8.90237 10.3166 8.90237 9.68342 9.29289 9.29289L16.5858 2.00001H13C12.4477 2.00001 12 1.5523 12 1.00001Z"}));function v1({data:e}){const[t,r]=p.useState(!0);return s.jsxs(fe,{open:t,onOpenChange:r,children:[s.jsx(re,{intent:"primary",className:"flex items-center gap-[10px]",children:s.jsxs(me,{className:"flex w-full items-center gap-[10px]",children:[s.jsx(xe,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Docker Image"]})}),s.jsxs(pe,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(g,{label:"Docker Image",value:s.jsxs("div",{className:"flex justify-between",children:[s.jsxs(E,{className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx(Sr,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),cr(e.image)]}),s.jsxs("div",{className:"align-center mr-1 flex",children:[s.jsx("a",{className:"cursor-pointer",rel:"noopener noreferrer",target:"_blank",href:`https://${e.image}`,children:s.jsx(En,{className:"mr-1 mt-0.5 h-5 w-5 fill-theme-text-tertiary"})}),s.jsx(W,{copyText:e.image,isVisible:!0,copyTitle:"Copy url"})]})]})}),s.jsx(g,{label:"Contains Code",value:s.jsx(E,{color:e.contains_code?"green":"grey",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:e.contains_code?"Available":"None"})})]}),e.dockerfile&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Dockerfile"}),s.jsx(I,{fullWidth:!0,wrap:!0,code:e.dockerfile})]}),e.requirements&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Requirements"}),s.jsx(I,{fullWidth:!0,wrap:!0,code:e.requirements})]})]})]})}function Nn({buildId:e}){return["pipeline-builds",e]}async function _n({buildId:e},t){const r=G(B.runs.detail(e)),n=await fetch(r,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...t&&{Authorization:`Bearer ${t}`}}});if(!n.ok)throw new $({message:`Error while fetching pipeline build ${e}`,status:n.status,statusText:n.statusText});return n.json()}function w1(e,t){return Z({queryKey:Nn(e),queryFn:()=>_n(e),...t})}function kn({stepId:e}){var f,m,x,b,v,j,L,S,O,R,N,V;const{data:t,isPending:r,isError:n,error:a}=Ce({stepId:e}),i=Object.values(((m=(f=t==null?void 0:t.metadata)==null?void 0:f.config)==null?void 0:m.extra)||{}),{runId:o}=K(),{data:l}=q({runId:o},{throwOnError:!0,enabled:!!o}),{data:d}=w1({buildId:(b=(x=l==null?void 0:l.body)==null?void 0:x.build)==null?void 0:b.id},{enabled:!!((j=(v=l==null?void 0:l.body)==null?void 0:v.build)!=null&&j.id)}),u=(()=>{var ae;const T=(ae=d==null?void 0:d.metadata)==null?void 0:ae.images;if(!T)return null;if(Object.keys(T).length===1&&Object.keys(T)[0]!=="orchestrator")return Object.keys(T)[0];for(const ee in T)if(ee!=="orchestrator"&&ee.split(".")[1]!=="orchestrator")return ee;return"orchestrator"})(),h=u&&((S=(L=d==null?void 0:d.metadata)==null?void 0:L.images)==null?void 0:S[u]);return n?s.jsx(Y,{err:a}):r?s.jsxs("div",{className:"space-y-5",children:[s.jsx(C,{className:"h-[200]"}),s.jsx(C,{className:"h-[200px]"}),s.jsx(C,{className:"h-[200px]"})]}):s.jsxs("div",{className:"space-y-5",children:[((O=t.metadata)==null?void 0:O.run_metadata)&&s.jsx(Ge,{title:"Metadata",metadata:(R=t.metadata)==null?void 0:R.run_metadata}),s.jsx(It,{data:(V=(N=t.metadata)==null?void 0:N.config)==null?void 0:V.parameters,title:"Parameters"}),h?s.jsx(v1,{data:h}):null,s.jsx(Ln,{id:t.id}),i.length>0?s.jsx(It,{data:i,title:"Extra"}):null]})}function It({data:e,title:t}){return s.jsx(k,{initialOpen:!0,title:t,children:s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:Object.entries(e).map(([r,n])=>typeof n!="object"&&s.jsx(g,{label:r,value:s.jsx("div",{children:t1(n)})},r))})})}function Ln({id:e}){function t(r){return`from zenml.client import Client
6
+ artifact = Client().get_pipeline_run('${r}')
7
+ config = run.config()`}return s.jsxs(k,{initialOpen:!0,title:"Code",children:[s.jsx("h2",{className:"mb-2 text-text-md text-theme-text-secondary",children:"Get config programmatically"}),s.jsx(I,{fullWidth:!0,highlightCode:!0,wrap:!0,code:t(e)})]})}const Sn=e=>p.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0083 2C6.47396 2 2 6.58331 2 12.2535C2 16.786 4.86662 20.6226 8.84338 21.9805C9.34058 22.0826 9.5227 21.7599 9.5227 21.4885C9.5227 21.2508 9.50631 20.436 9.50631 19.587C6.72225 20.1983 6.14249 18.3647 6.14249 18.3647C5.69508 17.1764 5.03215 16.871 5.03215 16.871C4.12092 16.2429 5.09852 16.2429 5.09852 16.2429C6.1093 16.3108 6.63969 17.2954 6.63969 17.2954C7.53432 18.857 8.97592 18.4158 9.55588 18.1441C9.63865 17.482 9.90394 17.0237 10.1856 16.7691C7.96514 16.5314 5.62891 15.6487 5.62891 11.7102C5.62891 10.5898 6.02634 9.67309 6.65608 8.96018C6.55672 8.7056 6.20866 7.65289 6.75564 6.24394C6.75564 6.24394 7.60069 5.97228 9.5061 7.29644C10.3219 7.07199 11.1632 6.95782 12.0083 6.95685C12.8533 6.95685 13.7148 7.07581 14.5102 7.29644C16.4159 5.97228 17.2609 6.24394 17.2609 6.24394C17.8079 7.65289 17.4596 8.7056 17.3603 8.96018C18.0066 9.67309 18.3876 10.5898 18.3876 11.7102C18.3876 15.6487 16.0514 16.5143 13.8143 16.7691C14.179 17.0916 14.4936 17.7026 14.4936 18.6703C14.4936 20.0453 14.4773 21.1489 14.4773 21.4883C14.4773 21.7599 14.6596 22.0826 15.1566 21.9808C19.1333 20.6224 22 16.786 22 12.2535C22.0163 6.58331 17.526 2 12.0083 2Z",fill:"#0D061D"}));function On({repositoryId:e}){return["code_repositories",e]}async function Tn({repositoryId:e}){const t=G(B.code_repositories.detail(e)),r=await fetch(t,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(r.status===404&&he(),!r.ok)throw new $({message:`Error while fetching code repository ${e}`,status:r.status,statusText:r.statusText});return r.json()}function Pn(e,t){return Z({queryKey:On(e),queryFn:()=>Tn(e),...t})}function In(e,t){if(!e||!t)return"";const r=new Date(e),n=new Date(t);if(isNaN(r.getTime())||isNaN(n.getTime()))return"";const a=Math.abs(n.getTime()-r.getTime()),i=Math.floor(a/(1e3*60)),o=Math.floor(a%(1e3*60)/1e3);return`${i}min ${o}s`}function Mn({stepId:e,runId:t}){var v,j,L,S,O,R,N,V,T,ae,ee,Ue,We,Qe,Xe,Je,et,tt,rt,nt,st,at,it,ot,lt,dt,ct,ut,ht,ft,mt,pt,xt,Ct,gt,bt,vt,wt,yt;const{data:r,isError:n,isPending:a,error:i}=Ce({stepId:e}),{data:o}=q({runId:t}),l=(L=(j=(v=o==null?void 0:o.body)==null?void 0:v.code_reference)==null?void 0:j.body)==null?void 0:L.code_repository,{data:d}=Pn({repositoryId:l==null?void 0:l.id},{throwOnError:!0,enabled:!!(l!=null&&l.id)}),c=(S=d==null?void 0:d.metadata)==null?void 0:S.config;if(n)return s.jsx(Y,{err:i});if(a)return s.jsx(C,{className:"h-[300px] w-full"});const u=(R=(O=r.metadata)==null?void 0:O.config)==null?void 0:R.enable_cache,h=(N=o==null?void 0:o.metadata)==null?void 0:N.orchestrator_url,f=(V=o==null?void 0:o.metadata)==null?void 0:V.orchestrator_run_id,m=(ae=(T=r.metadata)==null?void 0:T.config)==null?void 0:ae.enable_artifact_metadata,x=(Ue=(ee=r.metadata)==null?void 0:ee.config)==null?void 0:Ue.enable_artifact_visualization,b=()=>{var jt,Et,Nt,_t;let ie=l==null?void 0:l.name,ge="";return((Et=(jt=l==null?void 0:l.body)==null?void 0:jt.source)==null?void 0:Et.attribute)==="GitHubCodeRepository"?(ie=`${c==null?void 0:c.owner}/${c==null?void 0:c.repository}`,ge=`https://www.github.com/${ie}`):((_t=(Nt=l==null?void 0:l.body)==null?void 0:Nt.source)==null?void 0:_t.attribute)==="GitLabCodeRepository"&&(ie=`${c==null?void 0:c.group}/${c==null?void 0:c.project}`,ge=`https://www.gitlab.com/${ie}`),s.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:`flex items-center ${ge?"":"pointer-events-none"}`,onClick:rr=>rr.stopPropagation(),href:ge,children:[s.jsx(Sn,{className:"mr-1 h-5 w-5 fill-theme-text-brand"}),ie]})};return s.jsx(k,{initialOpen:!0,title:"Details",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(g,{label:"Orchestrator url",value:h?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[h,s.jsx(W,{copyText:h})]}):"Not available"}),s.jsx(g,{label:"Orchestrator run Id",value:f?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[f,s.jsx(W,{copyText:f})]}):"Not available"}),s.jsx(g,{label:"Id",value:s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[r.id,s.jsx(W,{copyText:r.id})]})}),s.jsx(g,{label:"Status",value:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxs(E,{color:ve((We=r.body)==null?void 0:We.status),rounded:!0,emphasis:"subtle",className:"flex w-fit items-center gap-1 capitalize",children:[s.jsx(ne,{className:"fill-current",status:(Qe=r.body)==null?void 0:Qe.status}),(Xe=r.body)==null?void 0:Xe.status]}),typeof u=="boolean"&&s.jsx(te,{size:"sm",color:u?"green":"grey",children:u?"Enable cache":"Disabled cache"})]})}),o?s.jsxs(s.Fragment,{children:[s.jsx(g,{label:"Pipeline",value:s.jsx(ce,{to:le.pipelines.namespace(encodeURIComponent((et=(Je=o.body)==null?void 0:Je.pipeline)==null?void 0:et.name)),children:s.jsxs(E,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx($e,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(rt=(tt=o.body)==null?void 0:tt.pipeline)==null?void 0:rt.name]})})}),((nt=o.body)==null?void 0:nt.code_reference)&&c&&s.jsx(g,{label:"Repository/Commit",value:s.jsxs("div",{className:"group/copybutton mr-1",children:[s.jsxs(E,{color:"grey",className:"inline-flex items-center font-semibold text-neutral-900",rounded:!1,emphasis:"subtle",children:[b(),s.jsx("div",{className:"ml-1 rounded-sm bg-neutral-200 px-1 py-0.25",children:ur((it=(at=(st=o==null?void 0:o.body)==null?void 0:st.code_reference)==null?void 0:at.body)==null?void 0:it.commit,10)})]}),s.jsx(W,{copyText:(dt=(lt=(ot=o==null?void 0:o.body)==null?void 0:ot.code_reference)==null?void 0:lt.body)==null?void 0:dt.commit})]})}),s.jsx(A,{className:(ct=o.metadata)!=null&&ct.code_path?"col-span-3":"",children:"Code Path"}),s.jsx(D,{className:(ut=o.metadata)!=null&&ut.code_path?"col-span-3 h-auto":"",children:(ht=o.metadata)!=null&&ht.code_path?s.jsx(I,{code:o.metadata.code_path}):"Not available"})]}):s.jsx(C,{className:"h-6 w-full"}),s.jsx(g,{label:"Cache key",value:s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[(ft=r.metadata)==null?void 0:ft.cache_key,s.jsx(W,{copyText:(mt=r.metadata)==null?void 0:mt.cache_key})]})}),s.jsx(g,{label:"Author",value:s.jsx("div",{className:"inline-flex items-center gap-1",children:s.jsx(He,{username:(xt=(pt=r.body)==null?void 0:pt.user)==null?void 0:xt.name})})}),s.jsx(g,{label:"Start Time",value:(Ct=r.metadata)!=null&&Ct.start_time?s.jsx(de,{dateString:(gt=r.metadata)==null?void 0:gt.start_time}):"Not available"}),s.jsx(g,{label:"End Time",value:(bt=r.metadata)!=null&&bt.end_time?s.jsx(de,{dateString:(vt=r.metadata)==null?void 0:vt.end_time}):"Not available"}),s.jsx(g,{label:"Duration",value:In(((wt=r.metadata)==null?void 0:wt.start_time)||"",((yt=r.metadata)==null?void 0:yt.end_time)||"")}),s.jsx(g,{label:"Artifact metadata",value:s.jsx(te,{size:"sm",color:m?"green":"grey",children:m?"Enable":"Disabled"})}),s.jsx(g,{label:"Artifact visualization",value:s.jsx(te,{size:"sm",color:x?"green":"grey",children:x?"Enable":"Disabled"})})]})})}function Vn({stepId:e}){return["logs",e]}async function $n({stepId:e}){const t=G(B.steps.logs(e)),r=await X(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){const n=await r.json().catch(()=>({}));throw new $({message:n.detail[1].includes("File")&&n.detail[1]||`The logs for step ${e} cannot be fetched or this pipeline run ran locally and logs were not tracked`,status:r.status,statusText:r.statusText})}return r.json()}function Rn(e,t){return Z({queryKey:Vn(e),queryFn:()=>$n(e),...t})}const An=()=>s.jsx("section",{className:"flex h-[calc(100vh_-_270px)] items-center justify-center",children:s.jsxs("div",{className:"flex flex-col items-center justify-center",children:[s.jsxs("div",{className:"relative mb-2 flex items-center justify-center",children:[s.jsx(Re,{className:"h-[120px] w-[120px]"}),s.jsx(Fn,{})]}),s.jsx("h2",{className:"my-3 text-center text-display-xs font-semibold",children:"Loading the Logs"}),s.jsxs("p",{className:"text-center text-text-lg text-theme-text-secondary",children:["It can take up to a few minutes. ",s.jsx("br",{})," Please wait while we fetch logs from the artifact store."]})]})});function Dn({stepId:e,stepDetail:t}){var l,d;const r=(d=(l=t==null?void 0:t.metadata)==null?void 0:l.config)==null?void 0:d.enable_step_logs,{data:n,isPending:a,isError:i,error:o}=Rn({stepId:e});return i?s.jsx(Y,{err:o}):a?s.jsx(An,{}):s.jsx(k,{initialOpen:!0,title:"Logs",children:typeof r=="boolean"&&r===!1?s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:s.jsx(g,{label:"Enable logs",value:"Disabled"})}):s.jsx(I,{codeClasses:"whitespace-pre-line",fullWidth:!0,wrap:!0,code:n||""})})}function Fn(){return s.jsx("div",{className:"absolute rounded-rounded bg-primary-25 p-3",children:s.jsx(h1,{className:"h-7 w-7 fill-primary-400"})})}function zn({component:e,run:t}){var a,i,o,l,d,c;const r=`${(a=e.body)==null?void 0:a.type}.${(i=e.body)==null?void 0:i.flavor}`,n=((l=(o=t.metadata)==null?void 0:o.config.settings)==null?void 0:l[r])??"";return!n||Object.keys(n).length===0?s.jsxs(re,{intent:"secondary",className:"grid w-full grid-cols-2 gap-2 rounded-md border border-theme-border-moderate pl-[60px]",children:[s.jsx("span",{children:kt((d=e.body)==null?void 0:d.type)}),s.jsx("div",{children:e.name})]}):s.jsx(H,{intent:"secondary",contentClassName:"pl-[60px]",className:"w-full",isInitialOpen:!1,data:n,title:s.jsxs("div",{className:"grid w-full grid-cols-2 gap-2 text-left",children:[s.jsx("span",{children:kt((c=e.body)==null?void 0:c.type)}),s.jsx("div",{children:e.name})]})})}function y1(){var l,d,c,u;const[e,t]=p.useState(!0),{runId:r}=K(),{data:n,isError:a,isPending:i}=q({runId:r},{throwOnError:!0}),o=(d=(l=n==null?void 0:n.body)==null?void 0:l.stack)==null?void 0:d.id;return i?s.jsx(C,{className:"h-[250px] w-full"}):a?null:s.jsxs(fe,{open:e,onOpenChange:t,children:[s.jsxs(re,{className:"flex justify-between",children:[s.jsx(me,{className:" flex w-full items-center justify-between",children:s.jsxs("div",{className:"flex items-center gap-[10px]",children:[s.jsx(xe,{className:` ${e?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Stack"]})}),s.jsx(ce,{to:le.stacks.overview,children:s.jsxs(E,{rounded:!1,className:"inline-flex items-center gap-0.5",color:"turquoise",emphasis:"subtle",children:[s.jsx(hr,{className:"h-4 w-4 fill-current"}),s.jsx("span",{children:(u=(c=n==null?void 0:n.body)==null?void 0:c.stack)==null?void 0:u.name})]})})]}),s.jsx(pe,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:s.jsx(Hn,{stackId:o,run:n})})]})}function Hn({stackId:e,run:t}){var i;const{data:r,isError:n,isPending:a}=Or({stackId:e});return n?null:a?s.jsx("div",{className:"space-y-5",children:Array.from({length:3}).map((o,l)=>s.jsx(C,{className:"h-8 w-full"},l))}):s.jsx("ul",{className:"space-y-5",children:Object.values(((i=r==null?void 0:r.metadata)==null?void 0:i.components)||{}).map(o=>s.jsx("li",{className:"flex w-full items-center justify-between",children:s.jsx(zn,{component:o[0],run:t})},o[0].id))})}function Gn(e){if(!e)return"light-grey";switch(e){case"completed":return"green";default:return"light-grey"}}function Bn({stepId:e}){var i,o,l;const{runId:t}=K(),{data:r}=Ce({stepId:e}),n=(i=r==null?void 0:r.body)==null?void 0:i.status,a=(l=(o=r==null?void 0:r.metadata)==null?void 0:o.config)==null?void 0:l.enable_cache;return s.jsxs("div",{children:[s.jsx("div",{className:"flex h-9 items-center border-b border-theme-border-moderate bg-theme-surface-primary px-4 py-3",children:s.jsxs(n1,{className:"focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(l1,{className:"h-5 w-5 fill-neutral-500"}),s.jsx("span",{className:"sr-only",children:"Close"})]})}),s.jsx("div",{className:"flex justify-between border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:s.jsx("div",{children:r?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:`rounded-sm p-0.5 ${d1(n)}`,children:s.jsx(ne,{status:n,className:"h-4 w-4"})}),s.jsx("h2",{className:"text-display-xs font-semibold",children:r.name}),s.jsx(te,{size:"sm",color:Gn(n),children:n||"None"}),typeof a=="boolean"&&s.jsx(te,{size:"sm",color:a?"green":"grey",children:a?"Enable cache":"Disabled cache"})]}):s.jsx(C,{className:"h-6 w-7"})})}),s.jsx("div",{className:"p-5",children:s.jsxs(Ae,{defaultValue:"overview",children:[s.jsxs(De,{children:[s.jsxs(F,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[s.jsx(Fe,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Overview"})]}),s.jsxs(F,{className:"flex items-center gap-2 truncate text-text-md",value:"code",children:[s.jsx(yn,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Code"})]}),s.jsxs(F,{className:"flex items-center gap-2 truncate text-text-md",value:"logs",children:[s.jsx(h1,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Logs"})]}),s.jsxs(F,{className:"flex items-center gap-2 truncate text-text-md",value:"config",children:[s.jsx(b1,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Configuration"})]})]}),s.jsxs(z,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:[s.jsx(Mn,{runId:t,stepId:e}),s.jsx("div",{className:"mt-5",children:s.jsx(y1,{})})]}),s.jsx(z,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"code",children:s.jsx(jn,{stepId:e})}),s.jsx(z,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"logs",children:s.jsx(Dn,{stepId:e,stepDetail:r})}),s.jsx(z,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"config",children:s.jsx(kn,{stepId:e})})]})})]})}function Zn({children:e,stepId:t,onOpenChange:r}){return s.jsxs(s1,{onOpenChange:r,children:[s.jsx(a1,{asChild:!0,children:e}),s.jsx(i1,{className:"w-[1000px] overflow-y-auto",children:s.jsx(Bn,{stepId:t})})]})}const qn=e=>({unselectAll:e.unselectNodesAndEdges});function Yn({data:e,selected:t}){const{unselectAll:r}=ze(qn);function n(a){a||setTimeout(()=>{r()},100)}return s.jsx(m1,{children:s.jsx(Zn,{onOpenChange:n,stepId:e.execution_id,children:s.jsx("button",{"data-selected":!!t,className:"h-[44px] max-w-[300px] overflow-hidden rounded-md border border-theme-border-moderate bg-theme-surface-primary transition-all duration-200 hover:border-neutral-400 hover:shadow-md data-[selected=true]:border-theme-border-bold data-[selected=true]:shadow-md",children:s.jsxs("div",{className:"flex items-center gap-1 py-1 pl-1 pr-2",children:[s.jsx("div",{className:`rounded-sm p-0.5 ${d1(e.status)}`,children:s.jsx(ne,{status:e.status,className:"h-4 w-4"})}),s.jsx("p",{className:"truncate font-semibold",children:e.name})]})})})})}var Kn="\0",U="\0",Mt="";let Un=class{constructor(t){w(this,"_isDirected",!0);w(this,"_isMultigraph",!1);w(this,"_isCompound",!1);w(this,"_label");w(this,"_defaultNodeLabelFn",()=>{});w(this,"_defaultEdgeLabelFn",()=>{});w(this,"_nodes",{});w(this,"_in",{});w(this,"_preds",{});w(this,"_out",{});w(this,"_sucs",{});w(this,"_edgeObjs",{});w(this,"_edgeLabels",{});w(this,"_nodeCount",0);w(this,"_edgeCount",0);w(this,"_parent");w(this,"_children");t&&(this._isDirected=t.hasOwnProperty("directed")?t.directed:!0,this._isMultigraph=t.hasOwnProperty("multigraph")?t.multigraph:!1,this._isCompound=t.hasOwnProperty("compound")?t.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[U]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,typeof t!="function"&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter(r=>Object.keys(t._in[r]).length===0)}sinks(){var t=this;return this.nodes().filter(r=>Object.keys(t._out[r]).length===0)}setNodes(t,r){var n=arguments,a=this;return t.forEach(function(i){n.length>1?a.setNode(i,r):a.setNode(i)}),this}setNode(t,r){return this._nodes.hasOwnProperty(t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=U,this._children[t]={},this._children[U][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return this._nodes.hasOwnProperty(t)}removeNode(t){var r=this;if(this._nodes.hasOwnProperty(t)){var n=a=>r.removeEdge(r._edgeObjs[a]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach(function(a){r.setParent(a)}),delete this._children[t]),Object.keys(this._in[t]).forEach(n),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r===void 0)r=U;else{r+="";for(var n=r;n!==void 0;n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==U)return r}}children(t=U){if(this._isCompound){var r=this._children[t];if(r)return Object.keys(r)}else{if(t===U)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Object.keys(r)}successors(t){var r=this._sucs[t];if(r)return Object.keys(r)}neighbors(t){var r=this.predecessors(t);if(r){const a=new Set(r);for(var n of this.successors(t))a.add(n);return Array.from(a.values())}}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([o,l]){t(o)&&r.setNode(o,l)}),Object.values(this._edgeObjs).forEach(function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,n.edge(o))});var a={};function i(o){var l=n.parent(o);return l===void 0||r.hasNode(l)?(a[o]=l,l):l in a?a[l]:i(l)}return this._isCompound&&r.nodes().forEach(o=>r.setParent(o,i(o))),r}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,typeof t!="function"&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,r){var n=this,a=arguments;return t.reduce(function(i,o){return a.length>1?n.setEdge(i,o,r):n.setEdge(i,o),o}),this}setEdge(){var t,r,n,a,i=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,n=o.name,arguments.length===2&&(a=arguments[1],i=!0)):(t=o,r=arguments[1],n=arguments[3],arguments.length>2&&(a=arguments[2],i=!0)),t=""+t,r=""+r,n!==void 0&&(n=""+n);var l=oe(this._isDirected,t,r,n);if(this._edgeLabels.hasOwnProperty(l))return i&&(this._edgeLabels[l]=a),this;if(n!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[l]=i?a:this._defaultEdgeLabelFn(t,r,n);var d=Wn(this._isDirected,t,r,n);return t=d.v,r=d.w,Object.freeze(d),this._edgeObjs[l]=d,Vt(this._preds[r],t),Vt(this._sucs[t],r),this._in[r][l]=d,this._out[t][l]=d,this._edgeCount++,this}edge(t,r,n){var a=arguments.length===1?Ne(this._isDirected,arguments[0]):oe(this._isDirected,t,r,n);return this._edgeLabels[a]}edgeAsObj(){const t=this.edge(...arguments);return typeof t!="object"?{label:t}:t}hasEdge(t,r,n){var a=arguments.length===1?Ne(this._isDirected,arguments[0]):oe(this._isDirected,t,r,n);return this._edgeLabels.hasOwnProperty(a)}removeEdge(t,r,n){var a=arguments.length===1?Ne(this._isDirected,arguments[0]):oe(this._isDirected,t,r,n),i=this._edgeObjs[a];return i&&(t=i.v,r=i.w,delete this._edgeLabels[a],delete this._edgeObjs[a],$t(this._preds[r],t),$t(this._sucs[t],r),delete this._in[r][a],delete this._out[t][a],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var a=Object.values(n);return r?a.filter(i=>i.v===r):a}}outEdges(t,r){var n=this._out[t];if(n){var a=Object.values(n);return r?a.filter(i=>i.w===r):a}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}};function Vt(e,t){e[t]?e[t]++:e[t]=1}function $t(e,t){--e[t]||delete e[t]}function oe(e,t,r,n){var a=""+t,i=""+r;if(!e&&a>i){var o=a;a=i,i=o}return a+Mt+i+Mt+(n===void 0?Kn:n)}function Wn(e,t,r,n){var a=""+t,i=""+r;if(!e&&a>i){var o=a;a=i,i=o}var l={v:a,w:i};return n&&(l.name=n),l}function Ne(e,t){return oe(e,t.v,t.w,t.name)}var Be=Un,Qn="2.2.2",Xn={Graph:Be,version:Qn},Jn=Be,es={write:ts,read:ss};function ts(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:rs(e),edges:ns(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function rs(e){return e.nodes().map(function(t){var r=e.node(t),n=e.parent(t),a={v:t};return r!==void 0&&(a.value=r),n!==void 0&&(a.parent=n),a})}function ns(e){return e.edges().map(function(t){var r=e.edge(t),n={v:t.v,w:t.w};return t.name!==void 0&&(n.name=t.name),r!==void 0&&(n.value=r),n})}function ss(e){var t=new Jn(e.options).setGraph(e.value);return e.nodes.forEach(function(r){t.setNode(r.v,r.value),r.parent&&t.setParent(r.v,r.parent)}),e.edges.forEach(function(r){t.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),t}var as=is;function is(e){var t={},r=[],n;function a(i){t.hasOwnProperty(i)||(t[i]=!0,n.push(i),e.successors(i).forEach(a),e.predecessors(i).forEach(a))}return e.nodes().forEach(function(i){n=[],a(i),n.length&&r.push(n)}),r}let os=class{constructor(){w(this,"_arr",[]);w(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(t){return t.key})}has(t){return this._keyIndices.hasOwnProperty(t)}priority(t){var r=this._keyIndices[t];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(t,r){var n=this._keyIndices;if(t=String(t),!n.hasOwnProperty(t)){var a=this._arr,i=a.length;return n[t]=i,a.push({key:t,priority:r}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(t,r){var n=this._keyIndices[t];if(r>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+r);this._arr[n].priority=r,this._decrease(n)}_heapify(t){var r=this._arr,n=2*t,a=n+1,i=t;n<r.length&&(i=r[n].priority<r[i].priority?n:i,a<r.length&&(i=r[a].priority<r[i].priority?a:i),i!==t&&(this._swap(t,i),this._heapify(i)))}_decrease(t){for(var r=this._arr,n=r[t].priority,a;t!==0&&(a=t>>1,!(r[a].priority<n));)this._swap(t,a),t=a}_swap(t,r){var n=this._arr,a=this._keyIndices,i=n[t],o=n[r];n[t]=o,n[r]=i,a[o.key]=t,a[i.key]=r}};var j1=os,ls=j1,E1=cs,ds=()=>1;function cs(e,t,r,n){return us(e,String(t),r||ds,n||function(a){return e.outEdges(a)})}function us(e,t,r,n){var a={},i=new ls,o,l,d=function(c){var u=c.v!==o?c.v:c.w,h=a[u],f=r(c),m=l.distance+f;if(f<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+c+" Weight: "+f);m<h.distance&&(h.distance=m,h.predecessor=o,i.decrease(u,m))};for(e.nodes().forEach(function(c){var u=c===t?0:Number.POSITIVE_INFINITY;a[c]={distance:u},i.add(c,u)});i.size()>0&&(o=i.removeMin(),l=a[o],l.distance!==Number.POSITIVE_INFINITY);)n(o).forEach(d);return a}var hs=E1,fs=ms;function ms(e,t,r){return e.nodes().reduce(function(n,a){return n[a]=hs(e,a,t,r),n},{})}var N1=ps;function ps(e){var t=0,r=[],n={},a=[];function i(o){var l=n[o]={onStack:!0,lowlink:t,index:t++};if(r.push(o),e.successors(o).forEach(function(u){n.hasOwnProperty(u)?n[u].onStack&&(l.lowlink=Math.min(l.lowlink,n[u].index)):(i(u),l.lowlink=Math.min(l.lowlink,n[u].lowlink))}),l.lowlink===l.index){var d=[],c;do c=r.pop(),n[c].onStack=!1,d.push(c);while(o!==c);a.push(d)}}return e.nodes().forEach(function(o){n.hasOwnProperty(o)||i(o)}),a}var xs=N1,Cs=gs;function gs(e){return xs(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var bs=ws,vs=()=>1;function ws(e,t,r){return ys(e,t||vs,r||function(n){return e.outEdges(n)})}function ys(e,t,r){var n={},a=e.nodes();return a.forEach(function(i){n[i]={},n[i][i]={distance:0},a.forEach(function(o){i!==o&&(n[i][o]={distance:Number.POSITIVE_INFINITY})}),r(i).forEach(function(o){var l=o.v===i?o.w:o.v,d=t(o);n[i][l]={distance:d,predecessor:i}})}),a.forEach(function(i){var o=n[i];a.forEach(function(l){var d=n[l];a.forEach(function(c){var u=d[i],h=o[c],f=d[c],m=u.distance+h.distance;m<f.distance&&(f.distance=m,f.predecessor=h.predecessor)})})}),n}function _1(e){var t={},r={},n=[];function a(i){if(r.hasOwnProperty(i))throw new Pe;t.hasOwnProperty(i)||(r[i]=!0,t[i]=!0,e.predecessors(i).forEach(a),delete r[i],n.push(i))}if(e.sinks().forEach(a),Object.keys(t).length!==e.nodeCount())throw new Pe;return n}class Pe extends Error{constructor(){super(...arguments)}}var k1=_1;_1.CycleException=Pe;var Rt=k1,js=Es;function Es(e){try{Rt(e)}catch(t){if(t instanceof Rt.CycleException)return!1;throw t}return!0}var L1=Ns;function Ns(e,t,r){Array.isArray(t)||(t=[t]);var n=e.isDirected()?l=>e.successors(l):l=>e.neighbors(l),a=r==="post"?_s:ks,i=[],o={};return t.forEach(l=>{if(!e.hasNode(l))throw new Error("Graph does not have node: "+l);a(l,n,o,i)}),i}function _s(e,t,r,n){for(var a=[[e,!1]];a.length>0;){var i=a.pop();i[1]?n.push(i[0]):r.hasOwnProperty(i[0])||(r[i[0]]=!0,a.push([i[0],!0]),S1(t(i[0]),o=>a.push([o,!1])))}}function ks(e,t,r,n){for(var a=[e];a.length>0;){var i=a.pop();r.hasOwnProperty(i)||(r[i]=!0,n.push(i),S1(t(i),o=>a.push(o)))}}function S1(e,t){for(var r=e.length;r--;)t(e[r],r,e);return e}var Ls=L1,Ss=Os;function Os(e,t){return Ls(e,t,"post")}var Ts=L1,Ps=Is;function Is(e,t){return Ts(e,t,"pre")}var Ms=Be,Vs=j1,$s=Rs;function Rs(e,t){var r=new Ms,n={},a=new Vs,i;function o(d){var c=d.v===i?d.w:d.v,u=a.priority(c);if(u!==void 0){var h=t(d);h<u&&(n[c]=i,a.decrease(c,h))}}if(e.nodeCount()===0)return r;e.nodes().forEach(function(d){a.add(d,Number.POSITIVE_INFINITY),r.setNode(d)}),a.decrease(e.nodes()[0],0);for(var l=!1;a.size()>0;){if(i=a.removeMin(),n.hasOwnProperty(i))r.setEdge(i,n[i]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(i).forEach(o)}return r}var As={components:as,dijkstra:E1,dijkstraAll:fs,findCycles:Cs,floydWarshall:bs,isAcyclic:js,postorder:Ss,preorder:Ps,prim:$s,tarjan:N1,topsort:k1},At=Xn,M={Graph:At.Graph,json:es,alg:As,version:At.version};let Ds=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,r=t._prev;if(r!==t)return Dt(r),r}enqueue(t){let r=this._sentinel;t._prev&&t._next&&Dt(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){let t=[],r=this._sentinel,n=r._prev;for(;n!==r;)t.push(JSON.stringify(n,Fs)),n=n._prev;return"["+t.join(", ")+"]"}};function Dt(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Fs(e,t){if(e!=="_next"&&e!=="_prev")return t}var zs=Ds;let Hs=M.Graph,Gs=zs;var Bs=qs;let Zs=()=>1;function qs(e,t){if(e.nodeCount()<=1)return[];let r=Ks(e,t||Zs);return Ys(r.graph,r.buckets,r.zeroIdx).flatMap(a=>e.outEdges(a.v,a.w))}function Ys(e,t,r){let n=[],a=t[t.length-1],i=t[0],o;for(;e.nodeCount();){for(;o=i.dequeue();)_e(e,t,r,o);for(;o=a.dequeue();)_e(e,t,r,o);if(e.nodeCount()){for(let l=t.length-2;l>0;--l)if(o=t[l].dequeue(),o){n=n.concat(_e(e,t,r,o,!0));break}}}return n}function _e(e,t,r,n,a){let i=a?[]:void 0;return e.inEdges(n.v).forEach(o=>{let l=e.edge(o),d=e.node(o.v);a&&i.push({v:o.v,w:o.w}),d.out-=l,Ie(t,r,d)}),e.outEdges(n.v).forEach(o=>{let l=e.edge(o),d=o.w,c=e.node(d);c.in-=l,Ie(t,r,c)}),e.removeNode(n.v),i}function Ks(e,t){let r=new Hs,n=0,a=0;e.nodes().forEach(l=>{r.setNode(l,{v:l,in:0,out:0})}),e.edges().forEach(l=>{let d=r.edge(l.v,l.w)||0,c=t(l),u=d+c;r.setEdge(l.v,l.w,u),a=Math.max(a,r.node(l.v).out+=c),n=Math.max(n,r.node(l.w).in+=c)});let i=Us(a+n+3).map(()=>new Gs),o=n+1;return r.nodes().forEach(l=>{Ie(i,o,r.node(l))}),{graph:r,buckets:i,zeroIdx:o}}function Ie(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Us(e){const t=[];for(let r=0;r<e;r++)t.push(r);return t}let O1=M.Graph;var y={addBorderNode:sa,addDummyNode:T1,asNonCompoundGraph:Qs,buildLayerMatrix:ta,intersectRect:ea,mapValues:ca,maxRank:P1,normalizeRanks:ra,notime:oa,partition:aa,pick:da,predecessorWeights:Js,range:M1,removeEmptyRanks:na,simplify:Ws,successorWeights:Xs,time:ia,uniqueId:I1,zipObject:Ze};function T1(e,t,r,n){let a;do a=I1(n);while(e.hasNode(a));return r.dummy=t,e.setNode(a,r),a}function Ws(e){let t=new O1().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+a.weight,minlen:Math.max(n.minlen,a.minlen)})}),t}function Qs(e){let t=new O1({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r))}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r))}),t}function Xs(e){let t=e.nodes().map(r=>{let n={};return e.outEdges(r).forEach(a=>{n[a.w]=(n[a.w]||0)+e.edge(a).weight}),n});return Ze(e.nodes(),t)}function Js(e){let t=e.nodes().map(r=>{let n={};return e.inEdges(r).forEach(a=>{n[a.v]=(n[a.v]||0)+e.edge(a).weight}),n});return Ze(e.nodes(),t)}function ea(e,t){let r=e.x,n=e.y,a=t.x-r,i=t.y-n,o=e.width/2,l=e.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");let d,c;return Math.abs(i)*o>Math.abs(a)*l?(i<0&&(l=-l),d=l*a/i,c=l):(a<0&&(o=-o),d=o,c=o*i/a),{x:r+d,y:n+c}}function ta(e){let t=M1(P1(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),a=n.rank;a!==void 0&&(t[a][n.order]=r)}),t}function ra(e){let t=Math.min(...e.nodes().map(r=>{let n=e.node(r).rank;return n===void 0?Number.MAX_VALUE:n}));e.nodes().forEach(r=>{let n=e.node(r);n.hasOwnProperty("rank")&&(n.rank-=t)})}function na(e){let t=Math.min(...e.nodes().map(i=>e.node(i).rank)),r=[];e.nodes().forEach(i=>{let o=e.node(i).rank-t;r[o]||(r[o]=[]),r[o].push(i)});let n=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((i,o)=>{i===void 0&&o%a!==0?--n:i!==void 0&&n&&i.forEach(l=>e.node(l).rank+=n)})}function sa(e,t,r,n){let a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=n),T1(e,"border",a,t)}function P1(e){return Math.max(...e.nodes().map(t=>{let r=e.node(t).rank;return r===void 0?Number.MIN_VALUE:r}))}function aa(e,t){let r={lhs:[],rhs:[]};return e.forEach(n=>{t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function ia(e,t){let r=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-r)+"ms")}}function oa(e,t){return t()}let la=0;function I1(e){var t=++la;return toString(e)+t}function M1(e,t,r=1){t==null&&(t=e,e=0);let n=i=>i<t;r<0&&(n=i=>t<i);const a=[];for(let i=e;n(i);i+=r)a.push(i);return a}function da(e,t){const r={};for(const n of t)e[n]!==void 0&&(r[n]=e[n]);return r}function ca(e,t){let r=t;return typeof t=="string"&&(r=n=>n[t]),Object.entries(e).reduce((n,[a,i])=>(n[a]=r(i,a),n),{})}function Ze(e,t){return e.reduce((r,n,a)=>(r[n]=t[a],r),{})}let ua=Bs,ha=y.uniqueId;var fa={run:ma,undo:xa};function ma(e){(e.graph().acyclicer==="greedy"?ua(e,r(e)):pa(e)).forEach(n=>{let a=e.edge(n);e.removeEdge(n),a.forwardName=n.name,a.reversed=!0,e.setEdge(n.w,n.v,a,ha("rev"))});function r(n){return a=>n.edge(a).weight}}function pa(e){let t=[],r={},n={};function a(i){n.hasOwnProperty(i)||(n[i]=!0,r[i]=!0,e.outEdges(i).forEach(o=>{r.hasOwnProperty(o.w)?t.push(o):a(o.w)}),delete r[i])}return e.nodes().forEach(a),t}function xa(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}let Ca=y;var ga={run:ba,undo:wa};function ba(e){e.graph().dummyChains=[],e.edges().forEach(t=>va(e,t))}function va(e,t){let r=t.v,n=e.node(r).rank,a=t.w,i=e.node(a).rank,o=t.name,l=e.edge(t),d=l.labelRank;if(i===n+1)return;e.removeEdge(t);let c,u,h;for(h=0,++n;n<i;++h,++n)l.points=[],u={width:0,height:0,edgeLabel:l,edgeObj:t,rank:n},c=Ca.addDummyNode(e,"edge",u,"_d"),n===d&&(u.width=l.width,u.height=l.height,u.dummy="edge-label",u.labelpos=l.labelpos),e.setEdge(r,c,{weight:l.weight},o),h===0&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,a,{weight:l.weight},o)}function wa(e){e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeLabel,a;for(e.setEdge(r.edgeObj,n);r.dummy;)a=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=a,r=e.node(t)})}var ye={longestPath:ya,slack:ja};function ya(e){var t={};function r(n){var a=e.node(n);if(t.hasOwnProperty(n))return a.rank;t[n]=!0;var i=Math.min(...e.outEdges(n).map(o=>o==null?Number.POSITIVE_INFINITY:r(o.w)-e.edge(o).minlen));return i===Number.POSITIVE_INFINITY&&(i=0),a.rank=i}e.sources().forEach(r)}function ja(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var Ea=M.Graph,we=ye.slack,V1=Na;function Na(e){var t=new Ea({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var a,i;_a(t,e)<n;)a=ka(t,e),i=t.hasNode(a.v)?we(e,a):-we(e,a),La(t,e,i);return t}function _a(e,t){function r(n){t.nodeEdges(n).forEach(a=>{var i=a.v,o=n===i?a.w:i;!e.hasNode(o)&&!we(t,a)&&(e.setNode(o,{}),e.setEdge(n,o,{}),r(o))})}return e.nodes().forEach(r),e.nodeCount()}function ka(e,t){return t.edges().reduce((n,a)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(a.v)!==e.hasNode(a.w)&&(i=we(t,a)),i<n[0]?[i,a]:n},[Number.POSITIVE_INFINITY,null])[1]}function La(e,t,r){e.nodes().forEach(n=>t.node(n).rank+=r)}var Sa=V1,Ft=ye.slack,Oa=ye.longestPath,Ta=M.alg.preorder,Pa=M.alg.postorder,Ia=y.simplify,Ma=J;J.initLowLimValues=Ye;J.initCutValues=qe;J.calcCutValue=$1;J.leaveEdge=A1;J.enterEdge=D1;J.exchangeEdges=F1;function J(e){e=Ia(e),Oa(e);var t=Sa(e);Ye(t),qe(t,e);for(var r,n;r=A1(t);)n=D1(t,e,r),F1(t,e,r,n)}function qe(e,t){var r=Pa(e,e.nodes());r=r.slice(0,r.length-1),r.forEach(n=>Va(e,t,n))}function Va(e,t,r){var n=e.node(r),a=n.parent;e.edge(r,a).cutvalue=$1(e,t,r)}function $1(e,t,r){var n=e.node(r),a=n.parent,i=!0,o=t.edge(r,a),l=0;return o||(i=!1,o=t.edge(a,r)),l=o.weight,t.nodeEdges(r).forEach(d=>{var c=d.v===r,u=c?d.w:d.v;if(u!==a){var h=c===i,f=t.edge(d).weight;if(l+=h?f:-f,Ra(e,r,u)){var m=e.edge(r,u).cutvalue;l+=h?-m:m}}}),l}function Ye(e,t){arguments.length<2&&(t=e.nodes()[0]),R1(e,{},1,t)}function R1(e,t,r,n,a){var i=r,o=e.node(n);return t[n]=!0,e.neighbors(n).forEach(l=>{t.hasOwnProperty(l)||(r=R1(e,t,r,l,n))}),o.low=i,o.lim=r++,a?o.parent=a:delete o.parent,r}function A1(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function D1(e,t,r){var n=r.v,a=r.w;t.hasEdge(n,a)||(n=r.w,a=r.v);var i=e.node(n),o=e.node(a),l=i,d=!1;i.lim>o.lim&&(l=o,d=!0);var c=t.edges().filter(u=>d===zt(e,e.node(u.v),l)&&d!==zt(e,e.node(u.w),l));return c.reduce((u,h)=>Ft(t,h)<Ft(t,u)?h:u)}function F1(e,t,r,n){var a=r.v,i=r.w;e.removeEdge(a,i),e.setEdge(n.v,n.w,{}),Ye(e),qe(e,t),$a(e,t)}function $a(e,t){var r=e.nodes().find(a=>!t.node(a).parent),n=Ta(e,r);n=n.slice(1),n.forEach(a=>{var i=e.node(a).parent,o=t.edge(a,i),l=!1;o||(o=t.edge(i,a),l=!0),t.node(a).rank=t.node(i).rank+(l?o.minlen:-o.minlen)})}function Ra(e,t,r){return e.hasEdge(t,r)}function zt(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var Aa=ye,z1=Aa.longestPath,Da=V1,Fa=Ma,za=Ha;function Ha(e){switch(e.graph().ranker){case"network-simplex":Ht(e);break;case"tight-tree":Ba(e);break;case"longest-path":Ga(e);break;default:Ht(e)}}var Ga=z1;function Ba(e){z1(e),Da(e)}function Ht(e){Fa(e)}var Za=qa;function qa(e){let t=Ka(e);e.graph().dummyChains.forEach(r=>{let n=e.node(r),a=n.edgeObj,i=Ya(e,t,a.v,a.w),o=i.path,l=i.lca,d=0,c=o[d],u=!0;for(;r!==a.w;){if(n=e.node(r),u){for(;(c=o[d])!==l&&e.node(c).maxRank<n.rank;)d++;c===l&&(u=!1)}if(!u){for(;d<o.length-1&&e.node(c=o[d+1]).minRank<=n.rank;)d++;c=o[d]}e.setParent(r,c),r=e.successors(r)[0]}})}function Ya(e,t,r,n){let a=[],i=[],o=Math.min(t[r].low,t[n].low),l=Math.max(t[r].lim,t[n].lim),d,c;d=r;do d=e.parent(d),a.push(d);while(d&&(t[d].low>o||l>t[d].lim));for(c=d,d=n;(d=e.parent(d))!==c;)i.push(d);return{path:a.concat(i.reverse()),lca:c}}function Ka(e){let t={},r=0;function n(a){let i=r;e.children(a).forEach(n),t[a]={low:i,lim:r++}}return e.children().forEach(n),t}let Me=y;var Ua={run:Wa,cleanup:Ja};function Wa(e){let t=Me.addDummyNode(e,"root",{},"_root"),r=Qa(e),n=Math.max(...Object.values(r))-1,a=2*n+1;e.graph().nestingRoot=t,e.edges().forEach(o=>e.edge(o).minlen*=a);let i=Xa(e)+1;e.children().forEach(o=>H1(e,t,a,i,n,r,o)),e.graph().nodeRankFactor=a}function H1(e,t,r,n,a,i,o){let l=e.children(o);if(!l.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:r});return}let d=Me.addBorderNode(e,"_bt"),c=Me.addBorderNode(e,"_bb"),u=e.node(o);e.setParent(d,o),u.borderTop=d,e.setParent(c,o),u.borderBottom=c,l.forEach(h=>{H1(e,t,r,n,a,i,h);let f=e.node(h),m=f.borderTop?f.borderTop:h,x=f.borderBottom?f.borderBottom:h,b=f.borderTop?n:2*n,v=m!==x?1:a-i[o]+1;e.setEdge(d,m,{weight:b,minlen:v,nestingEdge:!0}),e.setEdge(x,c,{weight:b,minlen:v,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,d,{weight:0,minlen:a+i[o]})}function Qa(e){var t={};function r(n,a){var i=e.children(n);i&&i.length&&i.forEach(o=>r(o,a+1)),t[n]=a}return e.children().forEach(n=>r(n,1)),t}function Xa(e){return e.edges().reduce((t,r)=>t+e.edge(r).weight,0)}function Ja(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(r=>{var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}let ei=y;var ti=ri;function ri(e){function t(r){let n=e.children(r),a=e.node(r);if(n.length&&n.forEach(t),a.hasOwnProperty("minRank")){a.borderLeft=[],a.borderRight=[];for(let i=a.minRank,o=a.maxRank+1;i<o;++i)Gt(e,"borderLeft","_bl",r,a,i),Gt(e,"borderRight","_br",r,a,i)}}e.children().forEach(t)}function Gt(e,t,r,n,a,i){let o={width:0,height:0,rank:i,borderType:t},l=a[t][i-1],d=ei.addDummyNode(e,"border",o,r);a[t][i]=d,e.setParent(d,n),l&&e.setEdge(l,d,{weight:1})}var ni={adjust:si,undo:ai};function si(e){let t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&G1(e)}function ai(e){let t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&ii(e),(t==="lr"||t==="rl")&&(oi(e),G1(e))}function G1(e){e.nodes().forEach(t=>Bt(e.node(t))),e.edges().forEach(t=>Bt(e.edge(t)))}function Bt(e){let t=e.width;e.width=e.height,e.height=t}function ii(e){e.nodes().forEach(t=>ke(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);r.points.forEach(ke),r.hasOwnProperty("y")&&ke(r)})}function ke(e){e.y=-e.y}function oi(e){e.nodes().forEach(t=>Le(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);r.points.forEach(Le),r.hasOwnProperty("x")&&Le(r)})}function Le(e){let t=e.x;e.x=e.y,e.y=t}let li=y;var di=ci;function ci(e){let t={},r=e.nodes().filter(l=>!e.children(l).length),n=Math.max(...r.map(l=>e.node(l).rank)),a=li.range(n+1).map(()=>[]);function i(l){if(t[l])return;t[l]=!0;let d=e.node(l);a[d.rank].push(l),e.successors(l).forEach(i)}return r.sort((l,d)=>e.node(l).rank-e.node(d).rank).forEach(i),a}let ui=y.zipObject;var hi=fi;function fi(e,t){let r=0;for(let n=1;n<t.length;++n)r+=mi(e,t[n-1],t[n]);return r}function mi(e,t,r){let n=ui(r,r.map((c,u)=>u)),a=t.flatMap(c=>e.outEdges(c).map(u=>({pos:n[u.w],weight:e.edge(u).weight})).sort((u,h)=>u.pos-h.pos)),i=1;for(;i<r.length;)i<<=1;let o=2*i-1;i-=1;let l=new Array(o).fill(0),d=0;return a.forEach(c=>{let u=c.pos+i;l[u]+=c.weight;let h=0;for(;u>0;)u%2&&(h+=l[u+1]),u=u-1>>1,l[u]+=c.weight;d+=c.weight*h}),d}var pi=xi;function xi(e,t=[]){return t.map(r=>{let n=e.inEdges(r);if(n.length){let a=n.reduce((i,o)=>{let l=e.edge(o),d=e.node(o.v);return{sum:i.sum+l.weight*d.order,weight:i.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}let Ci=y;var gi=bi;function bi(e,t){let r={};e.forEach((a,i)=>{let o=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};a.barycenter!==void 0&&(o.barycenter=a.barycenter,o.weight=a.weight)}),t.edges().forEach(a=>{let i=r[a.v],o=r[a.w];i!==void 0&&o!==void 0&&(o.indegree++,i.out.push(r[a.w]))});let n=Object.values(r).filter(a=>!a.indegree);return vi(n)}function vi(e){let t=[];function r(a){return i=>{i.merged||(i.barycenter===void 0||a.barycenter===void 0||i.barycenter>=a.barycenter)&&wi(a,i)}}function n(a){return i=>{i.in.push(a),--i.indegree===0&&e.push(i)}}for(;e.length;){let a=e.pop();t.push(a),a.in.reverse().forEach(r(a)),a.out.forEach(n(a))}return t.filter(a=>!a.merged).map(a=>Ci.pick(a,["vs","i","barycenter","weight"]))}function wi(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}let yi=y;var ji=Ei;function Ei(e,t){let r=yi.partition(e,u=>u.hasOwnProperty("barycenter")),n=r.lhs,a=r.rhs.sort((u,h)=>h.i-u.i),i=[],o=0,l=0,d=0;n.sort(Ni(!!t)),d=Zt(i,a,d),n.forEach(u=>{d+=u.vs.length,i.push(u.vs),o+=u.barycenter*u.weight,l+=u.weight,d=Zt(i,a,d)});let c={vs:i.flat(!0)};return l&&(c.barycenter=o/l,c.weight=l),c}function Zt(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}function Ni(e){return(t,r)=>t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}let _i=pi,ki=gi,Li=ji;var Si=B1;function B1(e,t,r,n){let a=e.children(t),i=e.node(t),o=i?i.borderLeft:void 0,l=i?i.borderRight:void 0,d={};o&&(a=a.filter(f=>f!==o&&f!==l));let c=_i(e,a);c.forEach(f=>{if(e.children(f.v).length){let m=B1(e,f.v,r,n);d[f.v]=m,m.hasOwnProperty("barycenter")&&Ti(f,m)}});let u=ki(c,r);Oi(u,d);let h=Li(u,n);if(o&&(h.vs=[o,h.vs,l].flat(!0),e.predecessors(o).length)){let f=e.node(e.predecessors(o)[0]),m=e.node(e.predecessors(l)[0]);h.hasOwnProperty("barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+f.order+m.order)/(h.weight+2),h.weight+=2}return h}function Oi(e,t){e.forEach(r=>{r.vs=r.vs.flatMap(n=>t[n]?t[n].vs:n)})}function Ti(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}let Pi=M.Graph,Ii=y;var Mi=Vi;function Vi(e,t,r){let n=$i(e),a=new Pi({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(i=>e.node(i));return e.nodes().forEach(i=>{let o=e.node(i),l=e.parent(i);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(a.setNode(i),a.setParent(i,l||n),e[r](i).forEach(d=>{let c=d.v===i?d.w:d.v,u=a.edge(c,i),h=u!==void 0?u.weight:0;a.setEdge(c,i,{weight:e.edge(d).weight+h})}),o.hasOwnProperty("minRank")&&a.setNode(i,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),a}function $i(e){for(var t;e.hasNode(t=Ii.uniqueId("_root")););return t}var Ri=Ai;function Ai(e,t,r){let n={},a;r.forEach(i=>{let o=e.parent(i),l,d;for(;o;){if(l=e.parent(o),l?(d=n[l],n[l]=o):(d=a,a=o),d&&d!==o){t.setEdge(d,o);return}o=l}})}let Di=di,Fi=hi,zi=Si,Hi=Mi,Gi=Ri,Bi=M.Graph,be=y;var Zi=Z1;function Z1(e,t){if(t&&typeof t.customOrder=="function"){t.customOrder(e,Z1);return}let r=be.maxRank(e),n=qt(e,be.range(1,r+1),"inEdges"),a=qt(e,be.range(r-1,-1,-1),"outEdges"),i=Di(e);if(Yt(e,i),t&&t.disableOptimalOrderHeuristic)return;let o=Number.POSITIVE_INFINITY,l;for(let d=0,c=0;c<4;++d,++c){qi(d%2?n:a,d%4>=2),i=be.buildLayerMatrix(e);let u=Fi(e,i);u<o&&(c=0,l=Object.assign({},i),o=u)}Yt(e,l)}function qt(e,t,r){return t.map(function(n){return Hi(e,n,r)})}function qi(e,t){let r=new Bi;e.forEach(function(n){let a=n.graph().root,i=zi(n,a,r,t);i.vs.forEach((o,l)=>n.node(o).order=l),Gi(n,r,i.vs)})}function Yt(e,t){Object.values(t).forEach(r=>r.forEach((n,a)=>e.node(n).order=a))}let Yi=M.Graph,ue=y;var Ki={positionX:Qi,findType1Conflicts:q1,findType2Conflicts:Y1,addConflict:Ke,hasConflict:K1,verticalAlignment:U1,horizontalCompaction:W1,alignCoordinates:X1,findSmallestWidthAlignment:Q1,balance:J1};function q1(e,t){let r={};function n(a,i){let o=0,l=0,d=a.length,c=i[i.length-1];return i.forEach((u,h)=>{let f=Ui(e,u),m=f?e.node(f).order:d;(f||u===c)&&(i.slice(l,h+1).forEach(x=>{e.predecessors(x).forEach(b=>{let v=e.node(b),j=v.order;(j<o||m<j)&&!(v.dummy&&e.node(x).dummy)&&Ke(r,b,x)})}),l=h+1,o=m)}),i}return t.length&&t.reduce(n),r}function Y1(e,t){let r={};function n(i,o,l,d,c){let u;ue.range(o,l).forEach(h=>{u=i[h],e.node(u).dummy&&e.predecessors(u).forEach(f=>{let m=e.node(f);m.dummy&&(m.order<d||m.order>c)&&Ke(r,f,u)})})}function a(i,o){let l=-1,d,c=0;return o.forEach((u,h)=>{if(e.node(u).dummy==="border"){let f=e.predecessors(u);f.length&&(d=e.node(f[0]).order,n(o,c,h,l,d),c=h,l=d)}n(o,c,o.length,d,i.length)}),o}return t.length&&t.reduce(a),r}function Ui(e,t){if(e.node(t).dummy)return e.predecessors(t).find(r=>e.node(r).dummy)}function Ke(e,t,r){if(t>r){let a=t;t=r,r=a}let n=e[t];n||(e[t]=n={}),n[r]=!0}function K1(e,t,r){if(t>r){let n=t;t=r,r=n}return!!e[t]&&e[t].hasOwnProperty(r)}function U1(e,t,r,n){let a={},i={},o={};return t.forEach(l=>{l.forEach((d,c)=>{a[d]=d,i[d]=d,o[d]=c})}),t.forEach(l=>{let d=-1;l.forEach(c=>{let u=n(c);if(u.length){u=u.sort((f,m)=>o[f]-o[m]);let h=(u.length-1)/2;for(let f=Math.floor(h),m=Math.ceil(h);f<=m;++f){let x=u[f];i[c]===c&&d<o[x]&&!K1(r,c,x)&&(i[x]=c,i[c]=a[c]=a[x],d=o[x])}}})}),{root:a,align:i}}function W1(e,t,r,n,a){let i={},o=Wi(e,t,r,a),l=a?"borderLeft":"borderRight";function d(h,f){let m=o.nodes(),x=m.pop(),b={};for(;x;)b[x]?h(x):(b[x]=!0,m.push(x),m=m.concat(f(x))),x=m.pop()}function c(h){i[h]=o.inEdges(h).reduce((f,m)=>Math.max(f,i[m.v]+o.edge(m)),0)}function u(h){let f=o.outEdges(h).reduce((x,b)=>Math.min(x,i[b.w]-o.edge(b)),Number.POSITIVE_INFINITY),m=e.node(h);f!==Number.POSITIVE_INFINITY&&m.borderType!==l&&(i[h]=Math.max(i[h],f))}return d(c,o.predecessors.bind(o)),d(u,o.successors.bind(o)),Object.keys(n).forEach(h=>i[h]=i[r[h]]),i}function Wi(e,t,r,n){let a=new Yi,i=e.graph(),o=Xi(i.nodesep,i.edgesep,n);return t.forEach(l=>{let d;l.forEach(c=>{let u=r[c];if(a.setNode(u),d){var h=r[d],f=a.edge(h,u);a.setEdge(h,u,Math.max(o(e,c,d),f||0))}d=c})}),a}function Q1(e,t){return Object.values(t).reduce((r,n)=>{let a=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(n).forEach(([l,d])=>{let c=Ji(e,l)/2;a=Math.max(d+c,a),i=Math.min(d-c,i)});const o=a-i;return o<r[0]&&(r=[o,n]),r},[Number.POSITIVE_INFINITY,null])[1]}function X1(e,t){let r=Object.values(t),n=Math.min(...r),a=Math.max(...r);["u","d"].forEach(i=>{["l","r"].forEach(o=>{let l=i+o,d=e[l];if(d===t)return;let c=Object.values(d),u=n-Math.min(...c);o!=="l"&&(u=a-Math.max(...c)),u&&(e[l]=ue.mapValues(d,h=>h+u))})})}function J1(e,t){return ue.mapValues(e.ul,(r,n)=>{if(t)return e[t.toLowerCase()][n];{let a=Object.values(e).map(i=>i[n]).sort((i,o)=>i-o);return(a[1]+a[2])/2}})}function Qi(e){let t=ue.buildLayerMatrix(e),r=Object.assign(q1(e,t),Y1(e,t)),n={},a;["u","d"].forEach(o=>{a=o==="u"?t:Object.values(t).reverse(),["l","r"].forEach(l=>{l==="r"&&(a=a.map(h=>Object.values(h).reverse()));let d=(o==="u"?e.predecessors:e.successors).bind(e),c=U1(e,a,r,d),u=W1(e,a,c.root,c.align,l==="r");l==="r"&&(u=ue.mapValues(u,h=>-h)),n[o+l]=u})});let i=Q1(e,n);return X1(n,i),J1(n,e.graph().align)}function Xi(e,t,r){return(n,a,i)=>{let o=n.node(a),l=n.node(i),d=0,c;if(d+=o.width/2,o.hasOwnProperty("labelpos"))switch(o.labelpos.toLowerCase()){case"l":c=-o.width/2;break;case"r":c=o.width/2;break}if(c&&(d+=r?c:-c),c=0,d+=(o.dummy?t:e)/2,d+=(l.dummy?t:e)/2,d+=l.width/2,l.hasOwnProperty("labelpos"))switch(l.labelpos.toLowerCase()){case"l":c=l.width/2;break;case"r":c=-l.width/2;break}return c&&(d+=r?c:-c),c=0,d}}function Ji(e,t){return e.node(t).width}let er=y,e2=Ki.positionX;var t2=r2;function r2(e){e=er.asNonCompoundGraph(e),n2(e),Object.entries(e2(e)).forEach(([t,r])=>e.node(t).x=r)}function n2(e){let t=er.buildLayerMatrix(e),r=e.graph().ranksep,n=0;t.forEach(a=>{const i=a.reduce((o,l)=>{const d=e.node(l).height;return o>d?o:d},0);a.forEach(o=>e.node(o).y=n+i/2),n+=i+r})}let Kt=fa,Ut=ga,s2=za,a2=y.normalizeRanks,i2=Za,o2=y.removeEmptyRanks,Wt=Ua,l2=ti,Qt=ni,d2=Zi,c2=t2,_=y,u2=M.Graph;var h2=f2;function f2(e,t){let r=t&&t.debugTiming?_.time:_.notime;r("layout",()=>{let n=r(" buildLayoutGraph",()=>j2(e));r(" runLayout",()=>m2(n,r)),r(" updateInputGraph",()=>p2(e,n))})}function m2(e,t){t(" makeSpaceForEdgeLabels",()=>E2(e)),t(" removeSelfEdges",()=>I2(e)),t(" acyclic",()=>Kt.run(e)),t(" nestingGraph.run",()=>Wt.run(e)),t(" rank",()=>s2(_.asNonCompoundGraph(e))),t(" injectEdgeLabelProxies",()=>N2(e)),t(" removeEmptyRanks",()=>o2(e)),t(" nestingGraph.cleanup",()=>Wt.cleanup(e)),t(" normalizeRanks",()=>a2(e)),t(" assignRankMinMax",()=>_2(e)),t(" removeEdgeLabelProxies",()=>k2(e)),t(" normalize.run",()=>Ut.run(e)),t(" parentDummyChains",()=>i2(e)),t(" addBorderSegments",()=>l2(e)),t(" order",()=>d2(e)),t(" insertSelfEdges",()=>M2(e)),t(" adjustCoordinateSystem",()=>Qt.adjust(e)),t(" position",()=>c2(e)),t(" positionSelfEdges",()=>V2(e)),t(" removeBorderNodes",()=>P2(e)),t(" normalize.undo",()=>Ut.undo(e)),t(" fixupEdgeLabelCoords",()=>O2(e)),t(" undoCoordinateSystem",()=>Qt.undo(e)),t(" translateGraph",()=>L2(e)),t(" assignNodeIntersects",()=>S2(e)),t(" reversePoints",()=>T2(e)),t(" acyclic.undo",()=>Kt.undo(e))}function p2(e,t){e.nodes().forEach(r=>{let n=e.node(r),a=t.node(r);n&&(n.x=a.x,n.y=a.y,n.rank=a.rank,t.children(r).length&&(n.width=a.width,n.height=a.height))}),e.edges().forEach(r=>{let n=e.edge(r),a=t.edge(r);n.points=a.points,a.hasOwnProperty("x")&&(n.x=a.x,n.y=a.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}let x2=["nodesep","edgesep","ranksep","marginx","marginy"],C2={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},g2=["acyclicer","ranker","rankdir","align"],b2=["width","height"],Xt={width:0,height:0},v2=["minlen","weight","width","height","labeloffset"],w2={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},y2=["labelpos"];function j2(e){let t=new u2({multigraph:!0,compound:!0}),r=Oe(e.graph());return t.setGraph(Object.assign({},C2,Se(r,x2),_.pick(r,g2))),e.nodes().forEach(n=>{let a=Oe(e.node(n));const i=Se(a,b2);Object.keys(Xt).forEach(o=>{i[o]===void 0&&(i[o]=Xt[o])}),t.setNode(n,i),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let a=Oe(e.edge(n));t.setEdge(n,Object.assign({},w2,Se(a,v2),_.pick(a,y2)))}),t}function E2(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(r=>{let n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function N2(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.width&&r.height){let n=e.node(t.v),i={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};_.addDummyNode(e,"edge-proxy",i,"_ep")}})}function _2(e){let t=0;e.nodes().forEach(r=>{let n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Math.max(t,n.maxRank))}),e.graph().maxRank=t}function k2(e){e.nodes().forEach(t=>{let r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function L2(e){let t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,a=0,i=e.graph(),o=i.marginx||0,l=i.marginy||0;function d(c){let u=c.x,h=c.y,f=c.width,m=c.height;t=Math.min(t,u-f/2),r=Math.max(r,u+f/2),n=Math.min(n,h-m/2),a=Math.max(a,h+m/2)}e.nodes().forEach(c=>d(e.node(c))),e.edges().forEach(c=>{let u=e.edge(c);u.hasOwnProperty("x")&&d(u)}),t-=o,n-=l,e.nodes().forEach(c=>{let u=e.node(c);u.x-=t,u.y-=n}),e.edges().forEach(c=>{let u=e.edge(c);u.points.forEach(h=>{h.x-=t,h.y-=n}),u.hasOwnProperty("x")&&(u.x-=t),u.hasOwnProperty("y")&&(u.y-=n)}),i.width=r-t+o,i.height=a-n+l}function S2(e){e.edges().forEach(t=>{let r=e.edge(t),n=e.node(t.v),a=e.node(t.w),i,o;r.points?(i=r.points[0],o=r.points[r.points.length-1]):(r.points=[],i=a,o=n),r.points.unshift(_.intersectRect(n,i)),r.points.push(_.intersectRect(a,o))})}function O2(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.hasOwnProperty("x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function T2(e){e.edges().forEach(t=>{let r=e.edge(t);r.reversed&&r.points.reverse()})}function P2(e){e.nodes().forEach(t=>{if(e.children(t).length){let r=e.node(t),n=e.node(r.borderTop),a=e.node(r.borderBottom),i=e.node(r.borderLeft[r.borderLeft.length-1]),o=e.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(o.x-i.x),r.height=Math.abs(a.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function I2(e){e.edges().forEach(t=>{if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function M2(e){var t=_.buildLayerMatrix(e);t.forEach(r=>{var n=0;r.forEach((a,i)=>{var o=e.node(a);o.order=i+n,(o.selfEdges||[]).forEach(l=>{_.addDummyNode(e,"selfedge",{width:l.label.width,height:l.label.height,rank:o.rank,order:i+ ++n,e:l.e,label:l.label},"_se")}),delete o.selfEdges})})}function V2(e){e.nodes().forEach(t=>{var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),a=n.x+n.width/2,i=n.y,o=r.x-a,l=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:a+2*o/3,y:i-l},{x:a+5*o/6,y:i-l},{x:a+o,y:i},{x:a+5*o/6,y:i+l},{x:a+2*o/3,y:i+l}],r.label.x=r.x,r.label.y=r.y}})}function Se(e,t){return _.mapValues(_.pick(e,t),Number)}function Oe(e){var t={};return e&&Object.entries(e).forEach(([r,n])=>{typeof r=="string"&&(r=r.toLowerCase()),t[r]=n}),t}let $2=y,R2=M.Graph;var A2={debugOrdering:D2};function D2(e){let t=$2.buildLayerMatrix(e),r=new R2({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(n=>{r.setNode(n,{label:n}),r.setParent(n,"layer"+e.node(n).rank)}),e.edges().forEach(n=>r.setEdge(n.v,n.w,{},n.name)),t.forEach((n,a)=>{let i="layer"+a;r.setNode(i,{rank:"same"}),n.reduce((o,l)=>(r.setEdge(o,l,{style:"invis"}),l))}),r}var F2="1.1.2",z2={graphlib:M,layout:h2,debug:A2,util:{time:y.time,notime:y.notime},version:F2};const Jt=ar(z2),H2=300,G2=44,B2=50;function Z2(e,t){const r=new Jt.graphlib.Graph().setDefaultEdgeLabel(()=>({}));return r.setGraph({rankdir:"TB",ranksep:35,nodesep:5}),!e||!t?{nodes:[],edges:[]}:e.length<1?{nodes:[],edges:[]}:(t.forEach(n=>{r.setEdge(n.source,n.target)}),e.forEach(n=>{r.setNode(n.id,{width:H2,height:n.type==="step"?B2:G2})}),Jt.layout(r),{nodes:e.map(n=>{const{x:a,y:i}=r.node(n.id);return{...n,position:{x:a,y:i}}}),edges:t.map(n=>({...n,type:e.length>30?"smoothstep":"smart"}))})}function q2({runId:e}){return["runs",e,"graph"]}async function Y2({runId:e}){const t=G(B.runs.graph(e)),r=await X(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok)throw new $({message:`Error while fetching pipeline run graph for ${e}`,status:r.status,statusText:r.statusText});return r.json()}function tr(e,t){return Z({queryKey:q2(e),queryFn:()=>Y2(e),...t})}const K2=e=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z"})),U2=e=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2L8 2C8.55229 2 9 2.44772 9 3C9 3.55229 8.55229 4 8 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V8C4 8.55229 3.55229 9 3 9C2.44772 9 2 8.55229 2 8L2 7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H16C15.4477 4 15 3.55229 15 3C15 2.44772 15.4477 2 16 2L16.2413 2C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43598C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V8C22 8.55229 21.5523 9 21 9C20.4477 9 20 8.55229 20 8V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755ZM3 15C3.55229 15 4 15.4477 4 16V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H8C8.55229 20 9 20.4477 9 21C9 21.5523 8.55229 22 8 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413L2 16C2 15.4477 2.44772 15 3 15ZM21 15C21.5523 15 22 15.4477 22 16V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H16C15.4477 22 15 21.5523 15 21C15 20.4477 15.4477 20 16 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V16C20 15.4477 20.4477 15 21 15Z"}));function W2({runId:e}){const{fitView:t,zoomIn:r,zoomOut:n}=o1(),a=q({runId:e}),i=tr({runId:e});return s.jsxs("div",{"aria-label":"Dag Controls",className:"absolute left-4 top-4 z-10 flex flex-col gap-1",children:[s.jsxs("div",{className:"divide-y divide-neutral-300 overflow-hidden rounded-md border border-neutral-300",children:[s.jsx("div",{children:s.jsx(P,{onClick:()=>r(),emphasis:"subtle",className:"rounded-sharp border-none p-0.5",intent:"secondary",children:s.jsx(Tr,{className:"h-5 w-5 bg-theme-surface-primary fill-theme-text-primary"})})}),s.jsx("div",{children:s.jsx(P,{onClick:()=>n(),emphasis:"subtle",className:"rounded-sharp border-none bg-theme-surface-primary p-0.5",intent:"secondary",children:s.jsx(K2,{className:"h-5 w-5 fill-theme-text-primary"})})})]}),s.jsx(P,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>t(),emphasis:"subtle",intent:"secondary",children:s.jsx(U2,{className:"h-5 w-5 fill-theme-text-primary"})}),s.jsxs(P,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>{a.refetch(),i.refetch()},emphasis:"subtle",intent:"secondary",children:[s.jsx("span",{className:"sr-only",children:"Refresh"}),s.jsx(Pr,{className:"h-5 w-5 fill-theme-text-primary"})]})]})}const Q2={step:Yn,artifact:gn},X2={smart:wn};function J2(){const{runId:e}=K(),{data:t,isPending:r,isError:n}=tr({runId:e}),{fitView:a}=o1(),{width:i,height:o}=ze(x=>({width:x.width,height:x.height})),[l,d,c]=yr([]),[u,h,f]=jr([]),m=p.useCallback(()=>{const x=Z2(t==null?void 0:t.nodes,t==null?void 0:t.edges);d([...x.nodes]),h([...x.edges]),window.requestAnimationFrame(()=>{a()})},[t==null?void 0:t.nodes,t==null?void 0:t.edges]);return p.useEffect(()=>{a()},[i,o]),p.useEffect(()=>{const x=setTimeout(()=>{a({duration:200})},100);return()=>{clearTimeout(x)}},[t]),p.useLayoutEffect(()=>{m()},[t==null?void 0:t.nodes,t==null?void 0:t.edges,m]),n?null:r?s.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[s.jsx(Re,{}),s.jsx("div",{className:"mt-4 flex flex-col items-center",children:s.jsx("p",{className:"mb-5 text-display-xs",children:"Loading DAG Visualization"})})]}):s.jsx(Er,{minZoom:-2,connectOnClick:!1,nodesDraggable:!1,nodesConnectable:!1,edgeTypes:X2,nodeTypes:Q2,nodes:l,edges:u,edgesFocusable:!1,multiSelectionKeyCode:null,onNodesChange:c,onEdgesChange:f,fitView:!0,children:s.jsx(W2,{runId:e})})}function eo(){var a,i;const{runId:e}=K(),{setCurrentBreadcrumbData:t}=fr(),{data:r,isSuccess:n}=q({runId:e},{throwOnError:!0});return p.useEffect(()=>{r&&t({segment:"runs",data:r})},[r]),s.jsx(mr,{children:s.jsx("div",{className:"flex items-center gap-1",children:n?s.jsxs(s.Fragment,{children:[s.jsx(Ir,{className:`h-5 w-5 shrink-0 ${_r((a=r==null?void 0:r.body)==null?void 0:a.status)}`}),s.jsx("h1",{className:"min-w-0 truncate text-display-xs font-semibold",children:r==null?void 0:r.name}),s.jsx(ne,{className:"h-5 w-5 shrink-0",status:(i=r==null?void 0:r.body)==null?void 0:i.status})]}):s.jsxs(s.Fragment,{children:[s.jsx(C,{className:"h-5 w-5"}),s.jsx(C,{className:"h-6 w-[250px]"}),s.jsx(C,{className:"h-5 w-5"})]})})})}const to=e=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 2C21.5523 2 22 2.44772 22 3V21C22 21.5523 21.5523 22 21 22C20.4477 22 20 21.5523 20 21V3C20 2.44772 20.4477 2 21 2ZM9.29289 4.29289C9.68342 3.90237 10.3166 3.90237 10.7071 4.29289L17.7071 11.2929C17.8946 11.4804 18 11.7348 18 12C18 12.2652 17.8946 12.5196 17.7071 12.7071L10.7071 19.7071C10.3166 20.0976 9.68342 20.0976 9.29289 19.7071C8.90237 19.3166 8.90237 18.6834 9.29289 18.2929L14.5858 13H3C2.44772 13 2 12.5523 2 12C2 11.4477 2.44772 11 3 11H14.5858L9.29289 5.70711C8.90237 5.31658 8.90237 4.68342 9.29289 4.29289Z"}));function ro({runId:e}){const[t,r]=p.useState(!1),n=`from zenml.client import Client
8
+ run = Client().get_pipeline_run('${e}')
9
+ config = run.config`;return s.jsxs(fe,{open:t,onOpenChange:r,children:[s.jsx(re,{className:"flex items-center gap-[10px]",children:s.jsxs(me,{className:"flex w-full items-center gap-[10px]",children:[s.jsx(xe,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Code"]})}),s.jsxs(pe,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[s.jsx("p",{className:"mb-2 text-theme-text-secondary",children:"Get config programmatically"}),s.jsx(I,{fullWidth:!0,highlightCode:!0,wrap:!0,code:n})]})]})}function no({run:e}){var n,a;const[t,r]=p.useState(!1);return s.jsxs(fe,{open:t,onOpenChange:r,children:[s.jsx(re,{intent:"primary",className:"flex items-center gap-[10px]",children:s.jsxs(me,{className:"flex w-full items-center gap-[10px]",children:[s.jsx(xe,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Environment"]})}),s.jsxs(pe,{className:"space-y-3 border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[s.jsx(H,{isInitialOpen:!0,intent:"secondary",title:"Client Environment",data:(n=e.metadata)==null?void 0:n.client_environment}),s.jsx(H,{isInitialOpen:!0,intent:"secondary",title:"Orchestrator Environment",data:(a=e.metadata)==null?void 0:a.orchestrator_environment})]})]})}function so(){var i,o,l,d,c,u,h,f,m,x,b,v;const{runId:e}=K(),{data:t,isError:r,isPending:n}=q({runId:e},{throwOnError:!0}),{data:a}=w1({buildId:(o=(i=t==null?void 0:t.body)==null?void 0:i.build)==null?void 0:o.id},{enabled:!!((d=(l=t==null?void 0:t.body)==null?void 0:l.build)!=null&&d.id)});return r?null:n?s.jsxs("div",{className:"space-y-5",children:[s.jsx(C,{className:"h-[56px] w-full"}),s.jsx(C,{className:"h-[56px] w-full"}),s.jsx(C,{className:"h-[56px] w-full"}),s.jsx(C,{className:"h-[56px] w-full"})]}):s.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[s.jsx(H,{title:"Parameters",data:((c=t.metadata)==null?void 0:c.config.parameters)??void 0}),((h=(u=a==null?void 0:a.metadata)==null?void 0:u.images)==null?void 0:h.orchestrator)&&s.jsx(v1,{data:(m=(f=a==null?void 0:a.metadata)==null?void 0:f.images)==null?void 0:m.orchestrator}),s.jsx(ro,{runId:e}),s.jsx(no,{run:t}),s.jsx(H,{title:"Extra",data:(x=t.metadata)==null?void 0:x.config.extra}),s.jsx(H,{title:"Resources",data:((v=(b=t.metadata)==null?void 0:b.config.settings)==null?void 0:v.resources)||{}})]})}function ao(){var d,c,u,h,f,m,x,b,v,j,L,S,O;const{runId:e}=K(),[t,r]=p.useState(!0),[n]=c1(),a=u1(),{data:i,isError:o,isPending:l}=q({runId:e},{throwOnError:!0});return p.useEffect(()=>{if(!n.get("tab")){const N=new URL(window.location.href);N.searchParams.set("tab","overview");const V=`${N.pathname}${N.search}`;a(V,{replace:!0})}},[n,a]),o?null:l?s.jsx(C,{className:"h-[200px] w-full"}):s.jsxs(fe,{open:t,onOpenChange:r,children:[s.jsx(re,{className:"flex items-center gap-[10px]",children:s.jsxs(me,{className:"flex w-full items-center gap-[10px]",children:[s.jsx(xe,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),s.jsx("span",{children:"Details"})]})}),s.jsx(pe,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(A,{children:"Id"}),s.jsx(D,{children:s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[i.id,s.jsx(W,{copyText:i.id})]})}),s.jsx(A,{children:"Status"}),s.jsx(D,{children:s.jsxs(E,{className:"inline-flex items-center gap-0.5",emphasis:"subtle",color:ve((d=i.body)==null?void 0:d.status),children:[s.jsx(ne,{className:"fill-current",status:(c=i.body)==null?void 0:c.status}),(u=i.body)==null?void 0:u.status]})}),s.jsx(A,{children:"Pipeline"}),s.jsx(D,{children:s.jsx(ce,{to:le.pipelines.namespace(encodeURIComponent((f=(h=i.body)==null?void 0:h.pipeline)==null?void 0:f.name)),children:s.jsxs(E,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx($e,{className:"h-4 w-4 fill-theme-text-brand"}),(x=(m=i.body)==null?void 0:m.pipeline)==null?void 0:x.name]})})}),s.jsx(A,{children:"Author"}),s.jsx(D,{children:s.jsx("div",{className:"inline-flex items-center gap-1",children:s.jsx(He,{username:((v=(b=i.body)==null?void 0:b.user)==null?void 0:v.name)||""})})}),s.jsx(A,{children:"Start Time"}),s.jsx(D,{children:(j=i.metadata)!=null&&j.start_time?s.jsx(de,{dateString:(L=i.metadata)==null?void 0:L.start_time}):"Not available"}),s.jsx(A,{children:"End Time"}),s.jsx(D,{children:(S=i.metadata)!=null&&S.end_time?s.jsx(de,{dateString:(O=i.metadata)==null?void 0:O.end_time}):"Not available"})]})})]})}function io(){var a,i,o;const{runId:e}=K(),{data:t,isError:r,isPending:n}=q({runId:e},{throwOnError:!0});return r?null:n?s.jsx(C,{className:"h-[200px] w-full"}):!((a=t.metadata)!=null&&a.run_metadata)||Object.keys(t.metadata.run_metadata).length===0?s.jsx(nn,{}):s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(Ge,{metadata:(i=t.metadata)==null?void 0:i.run_metadata}),s.jsx(x1,{metadata:(o=t.metadata)==null?void 0:o.run_metadata})]})}function oo(){return s.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[s.jsx(ao,{}),s.jsx(y1,{}),s.jsx(io,{})]})}const lo=Lt.object({tab:Lt.enum(["overview","configuration"]).optional().default("overview").catch("overview")});function co(){const[e]=c1(),{tab:t}=lo.parse({tab:e.get("tab")||void 0});return t}function uo({setIsPanelOpen:e}){return s.jsxs("div",{className:"flex items-center gap-4 border-b border-theme-border-moderate bg-theme-surface-primary px-5 py-4",children:[s.jsx(P,{className:"flex h-6 w-6 items-center justify-center bg-transparent p-0.5",intent:"secondary",onClick:()=>e(!1),children:s.jsx(to,{className:"h-5 w-5 fill-theme-text-secondary"})}),s.jsx("span",{className:"text-text-xl",children:"Run Insights"})]})}function ho(){const e=co(),t=u1();function r(n){const a=new URLSearchParams;a.set("tab",n),t(`?${a.toString()}`)}return s.jsx("div",{className:"flex flex-col gap-5 p-5",children:s.jsxs(Ae,{value:e,onValueChange:r,children:[s.jsxs(De,{children:[s.jsxs(F,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[s.jsx(Fe,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Overview"})]}),s.jsxs(F,{className:"flex items-center gap-2 truncate text-text-md",value:"configuration",children:[s.jsx(b1,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Configuration"})]})]}),s.jsx(z,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:s.jsx(oo,{})}),s.jsx(z,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"configuration",children:s.jsx(so,{})})]})})}function Bo(){var a;const e=pr(),t=xr(((a=e.data)==null?void 0:a.deployment_type)||"other"),[r,n]=p.useState(!0);return s.jsxs("div",{children:[s.jsx(eo,{}),s.jsxs("div",{className:`flex ${t?"h-[calc(100vh_-_4rem_-_4rem_-_4rem_-_2px)]":"h-[calc(100vh_-_4rem_-_4rem_-_2px)]"} w-full`,children:[s.jsxs("div",{className:`relative bg-white/40 transition-all duration-500 ${r?"w-1/2":"w-full"}`,children:[s.jsx(J2,{}),s.jsx(fo,{isPanelOpen:r,setIsPanelOpen:n})]}),s.jsxs("div",{"aria-hidden":!r,className:`h-full min-w-0 overflow-x-hidden text-ellipsis whitespace-nowrap bg-theme-surface-secondary transition-all duration-500 ${r?"w-1/2 border-l border-theme-border-moderate":"w-0 overflow-x-hidden border-transparent"}`,children:[s.jsx(uo,{setIsPanelOpen:n}),s.jsx(ho,{})]})]})]})}function fo({isPanelOpen:e,setIsPanelOpen:t}){return s.jsx(P,{intent:"secondary",className:`absolute right-4 top-4 h-7 w-7 items-center justify-center border border-neutral-300 bg-transparent p-0.5 ${e?"hidden":"flex"}`,onClick:()=>t(!0),children:s.jsx(Mr,{className:"h-5 w-5 fill-theme-text-primary"})})}export{Bo as default};
@@ -0,0 +1 @@
1
+ import{r,j as e}from"./@radix-BXWm7HOa.js";import{u as f,a as y,S as D,E as v}from"./EditSecretDialog-Bd7mFLS4.js";import{a9 as S,as as b,a0 as w,a1 as N,h as C,a2 as E,a3 as k,a4 as O,I as g,a7 as V,a8 as L,af as T,ag as K,ah as M,aj as H,D as R,B as A}from"./index-DhIZtpxB.js";import{S as F}from"./dots-horizontal-sKQlWEni.js";import{A as I}from"./AlertDialogDropdownItem-ErO9aOgK.js";import{S as q}from"./trash-Cd5CSFqA.js";import{c as z}from"./@tanstack-FmcYZMuX.js";import{g as B}from"./@react-router-l3lMcXA2.js";import"./plus-FB9-lEq_.js";import"./index.esm-DT4uyn2i.js";import"./zod-CnykDKJj.js";import"./@reactflow-CeVxyqYT.js";const P=t=>r.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99995 9C7.99995 5.13401 11.134 2 14.9999 2C18.8659 2 21.9999 5.13401 21.9999 9C21.9999 12.866 18.8659 16 14.9999 16C14.6816 16 14.3677 15.9787 14.0597 15.9373C13.8347 15.907 13.6939 15.8883 13.5912 15.8784C13.5729 15.8766 13.5579 15.8753 13.5458 15.8745C13.5428 15.8771 13.5395 15.8801 13.5359 15.8833C13.4825 15.9321 13.4121 16.0021 13.2862 16.128L11.7071 17.7071C11.5195 17.8946 11.2652 18 10.9999 18H9.99995V19C9.99995 19.5523 9.55223 20 8.99995 20H7.99995V21C7.99995 21.5523 7.55223 22 6.99995 22L4.56803 22C4.31565 22 4.06987 22.0001 3.86172 21.9831C3.63312 21.9644 3.36339 21.9203 3.09197 21.782C2.71564 21.5903 2.40968 21.2843 2.21793 20.908C2.07964 20.6366 2.03557 20.3668 2.01689 20.1382C1.99988 19.9301 1.99991 19.6843 1.99994 19.4319L1.99995 17.6627C1.99995 17.6462 1.9999 17.6291 1.99985 17.6117C1.99935 17.4218 1.99871 17.1827 2.05521 16.9473C2.1042 16.7432 2.18501 16.5482 2.29467 16.3692C2.42112 16.1629 2.59067 15.9942 2.72532 15.8603C2.73768 15.848 2.74975 15.836 2.76147 15.8243L7.87197 10.7138C7.99789 10.5878 8.06789 10.5175 8.1166 10.464C8.11984 10.4604 8.1228 10.4572 8.12549 10.4541C8.12461 10.442 8.12336 10.427 8.12159 10.4087C8.11168 10.3061 8.09292 10.1653 8.06267 9.94028C8.02127 9.63227 7.99995 9.31836 7.99995 9ZM7.99995 18V17C7.99995 16.4477 8.44766 16 8.99995 16H10.5857L11.872 14.7138C11.889 14.6967 11.9065 14.6791 11.9244 14.6611C12.1036 14.4807 12.3216 14.2613 12.5701 14.1224C12.8036 13.9919 12.9981 13.9262 13.2628 13.8884C13.4562 13.8607 13.6445 13.8742 13.7834 13.8876C13.928 13.9016 14.1065 13.9256 14.3084 13.9527L14.3262 13.9551C14.5461 13.9847 14.771 14 14.9999 14C17.7614 14 19.9999 11.7614 19.9999 9C19.9999 6.23858 17.7614 4 14.9999 4C12.2385 4 9.99995 6.23858 9.99995 9C9.99995 9.22899 10.0153 9.45388 10.0448 9.67379L10.0472 9.6916C10.0744 9.89344 10.0984 10.072 10.1123 10.2165C10.1258 10.3555 10.1393 10.5438 10.1116 10.7372C10.0737 11.0019 10.008 11.1964 9.87753 11.4298C9.73863 11.6783 9.5192 11.8963 9.33879 12.0756C9.32083 12.0934 9.30326 12.1109 9.28619 12.128L4.17568 17.2385C4.08305 17.3311 4.03699 17.3775 4.00494 17.4126C4.0041 17.4135 4.0033 17.4144 4.00253 17.4153C4.00247 17.4164 4.00241 17.4176 4.00236 17.4189C4.00019 17.4664 3.99995 17.5317 3.99995 17.6627V19.4C3.99995 19.6965 4.00072 19.8588 4.01025 19.9754C4.01063 19.98 4.01101 19.9844 4.01139 19.9885C4.01554 19.9889 4.01994 19.9893 4.02458 19.9897C4.14117 19.9992 4.30342 20 4.59995 20H5.99995V19C5.99995 18.4477 6.44766 18 6.99995 18H7.99995ZM13.9999 7C13.9999 6.44772 14.4477 6 14.9999 6C15.7662 6 16.5357 6.29309 17.1213 6.87868C17.7068 7.46425 17.9999 8.23372 17.9999 8.99991C18 9.5522 17.5523 9.99993 17 9.99994C16.4477 9.99996 16 9.55226 15.9999 8.99997C15.9999 8.74251 15.9025 8.48834 15.7071 8.29289C15.5116 8.09743 15.2574 8 14.9999 8C14.4477 8 13.9999 7.55229 13.9999 7Z"}));function Q({secretId:t,isOpen:n,onClose:s,keyName:l}){const{data:o,isLoading:a,isError:d}=f(t),u=z(),{mutate:i}=y({onError(m){S(m)&&b({status:"error",emphasis:"subtle",description:m.message,rounded:!0})},onSuccess(){u.invalidateQueries({queryKey:["secrets"]}),u.invalidateQueries({queryKey:["secretDetail",t]}),s()}}),[x,p]=r.useState(""),c=()=>{if(o){const m={...o.body.values};delete m[l];const j={name:o.secretName,scope:"workspace",values:m};i({id:t,body:j})}};function h(m){p(m.target.value)}return a?e.jsx("div",{children:"Loading..."}):d?e.jsx("div",{children:"Error loading secret details"}):e.jsxs(w,{open:n,onOpenChange:s,children:[e.jsx(N,{asChild:!0,children:e.jsx(C,{className:"shrink-0",intent:"primary",children:"Delete Secret"})}),e.jsxs(E,{children:[e.jsx(k,{children:e.jsx(O,{children:"Delete Key"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this eky?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(g,{name:"key",onChange:h,className:"w-full",required:!0,value:x})]}),e.jsxs(V,{className:"gap-[10px]",children:[e.jsx(L,{asChild:!0,children:e.jsx(C,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(C,{intent:"danger",type:"button",onClick:c,disabled:x!=="DELETE",children:"Delete"})]})]})]})}function Z({secretId:t,keyName:n}){const[s,l]=r.useState(!1),[o,a]=r.useState(!1),[d]=r.useState(!1),u=r.useRef(null),i=r.useRef(null);function x(){i.current=u.current}function p(){a(!0)}return e.jsxs(T,{onOpenChange:l,open:s,children:[e.jsx(K,{ref:u,children:e.jsx(F,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(M,{hidden:d,onCloseAutoFocus:c=>{i.current&&(i.current.focus(),i.current=null,c.preventDefault())},align:"end",sideOffset:7,children:e.jsx(I,{onSelect:x,onOpenChange:p,triggerChildren:"Delete ",icon:e.jsx(q,{}),children:e.jsx(Q,{isOpen:o,onClose:()=>{l(!1),a(!1)},secretId:t,keyName:n})})})]})}const G=({value:t})=>{const[n,s]=r.useState(!1),l=typeof t=="string"?t:"",o="•".repeat(l.length);return e.jsxs("div",{className:"flex items-center gap-2 space-x-2",children:[e.jsx(D,{onClick:()=>s(!n),className:"h-4 w-4 flex-shrink-0 cursor-pointer"}),e.jsx("span",{children:n?l:o})]})};function U(t){return[{id:"key",header:"Key",accessorKey:"key",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(P,{className:"h-4 w-4 flex-shrink-0 cursor-pointer"}),e.jsx("div",{className:"flex flex-col",children:e.jsx("div",{className:"flex flex-row space-x-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:s.getValue("key")})})})]})},{id:"value",header:"Value",accessorKey:"value",cell:({row:s})=>e.jsx(G,{value:s.getValue("value")})},{id:"actions",header:"",cell:({row:s})=>e.jsx(Z,{secretId:t,keyName:s.getValue("key")})}]}function _({secretId:t}){var p;const[n,s]=r.useState(!1),[l,o]=r.useState(""),{data:a}=f(t),{data:d}=H(),u=(p=d==null?void 0:d.body)==null?void 0:p.is_admin,i=r.useMemo(()=>a?Object.entries(a.body.values).map(([c,h])=>({id:a.id,name:a.name,key:c,value:h,scope:a.body.scope,created:a.body.created,updated:a.body.updated,user:a.body.user})):[],[a]),x=r.useMemo(()=>l?i.filter(c=>c.key.toLowerCase().includes(l.toLowerCase())):i,[l,i]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[e.jsx(g,{type:"text",placeholder:"Search by key...",value:l,onChange:c=>o(c.target.value),inputSize:"md"}),e.jsx(C,{size:"sm",intent:"primary",onClick:()=>s(!0),children:"Edit Keys"})]}),u&&e.jsx(v,{secretId:t,isOpen:n,onClose:()=>s(!1),isSecretNameEditable:!1,dialogTitle:"Edit keys"}),e.jsx("div",{className:"w-full",children:a&&e.jsx(R,{columns:U(t),data:x})})]})}function ie(){const{secretId:t}=B()||"",{data:n}=f(t||"");return e.jsx(e.Fragment,{children:e.jsxs(A,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:n==null?void 0:n.name}),e.jsx("span",{className:"text-sm text-gray-500",children:t==null?void 0:t.slice(0,8)}),e.jsx(_,{secretId:t||""})]})})}export{ie as default};
@@ -0,0 +1 @@
1
+ import{j as a,r as f}from"./@radix-BXWm7HOa.js";import{P as j,m as g,z as o,k as y,l as b,j as P,n as N,F as v,r as i,T as u,h as S,D as k,S as p,o as R}from"./index-DhIZtpxB.js";import{c as T,L as c,g as h}from"./@react-router-l3lMcXA2.js";import{R as E}from"./refresh-COb6KYDi.js";import{a as C}from"./@tanstack-FmcYZMuX.js";import{o as F}from"./url-hcMJkz8p.js";import{S as _,P as w}from"./SearchField-C9R0mdaX.js";import{S as D}from"./terminal-grtjrIEJ.js";import{C as x}from"./CopyButton-Dbo52T1K.js";import{D as A}from"./DisplayDate-DizbSeT-.js";import{g as I,E as B}from"./ExecutionStatus-jH4OrWBq.js";import{I as q}from"./InlineAvatar-DpTLgM3Q.js";import"./@reactflow-CeVxyqYT.js";import"./dots-horizontal-sKQlWEni.js";import"./chevron-right-double-Dk8e2L99.js";import"./index-Bd1xgUQG.js";import"./copy-f3XGPPxt.js";import"./check-circle-1_I207rW.js";function L({namespace:e}){return a.jsx(j,{children:a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(g,{className:"h-5 w-5 fill-neutral-400"}),a.jsx("h1",{className:"text-display-xs font-semibold",children:decodeURIComponent(e)})]})})}const l=1,U=o.object({page:o.coerce.number().min(l).optional().default(l).catch(l),name:o.string().optional(),operator:o.enum(["and","or"]).optional()});function z(){const[e]=T(),{page:s,name:t,operator:r}=U.parse({page:e.get("page")||void 0,name:e.get("name")||void 0});return{page:s,name:t,logical_operator:r}}function G({params:e}){return["runs",e]}async function H({params:e}){const s=y(b.runs.all+"?"+F(e)),t=await P(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&N(),!t.ok)throw new v({message:"Error while fetching pipeline runs",status:t.status,statusText:t.statusText});return t.json()}function K(e,s){return C({queryKey:G(e),queryFn:()=>H(e),...s})}function Q(){return[{id:"run",header:"Run",accessorFn:e=>{var s;return{name:e.name,id:e.id,status:(s=e.body)==null?void 0:s.status}},cell:({getValue:e})=>{const{name:s,status:t,id:r}=e();return a.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[a.jsx(D,{className:`h-5 w-5 shrink-0 ${I(t)}`}),a.jsxs("div",{children:[a.jsxs(c,{to:i.runs.detail(r),className:"flex items-center gap-1",children:[a.jsx("h2",{className:"text-text-md font-semibold",children:s}),a.jsx(B,{status:t}),a.jsx(x,{copyText:s})]}),a.jsxs(c,{to:i.runs.detail(r),className:"flex items-center gap-1",children:[a.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:r.split("-")[0]}),a.jsx(x,{copyText:r})]})]})]})}},{id:"stack",header:"Stack",accessorFn:e=>{var s,t,r,n;return{name:(t=(s=e.body)==null?void 0:s.stack)==null?void 0:t.name,id:(n=(r=e.body)==null?void 0:r.stack)==null?void 0:n.id}},cell:({getValue:e})=>{const{name:s,id:t}=e();return!s||!t?null:a.jsx(c,{to:i.stacks.overview,children:a.jsx(u,{rounded:!1,className:"inline-block",color:"turquoise",emphasis:"subtle",children:s})})}},{id:"repository",header:"Repository",accessorFn:e=>{var s,t,r,n,m,d;return{name:(r=(t=(s=e.body)==null?void 0:s.code_reference)==null?void 0:t.body)==null?void 0:r.code_repository.name,id:(d=(m=(n=e.body)==null?void 0:n.code_reference)==null?void 0:m.body)==null?void 0:d.code_repository.id}},cell:({getValue:e})=>{const{name:s,id:t}=e();return!s||!t?null:a.jsx("div",{children:a.jsx(u,{rounded:!1,className:"inline-block",color:"grey",emphasis:"subtle",children:s})})}},{id:"created",header:"Created at",accessorFn:e=>{var s;return(s=e.body)==null?void 0:s.created},cell:({getValue:e})=>a.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:a.jsx(A,{dateString:e()})})},{id:"author",header:"Author",accessorFn:e=>{var s;return{author:(s=e.body)==null?void 0:s.user}},cell:({getValue:e})=>{const{author:s}=e();return a.jsx(q,{username:s.name})}}]}function O(){const{namespace:e}=h(),s=z(),t=Q(),{data:r,refetch:n}=K({params:{pipeline_name:decodeURIComponent(e),...s,sort_by:"desc:updated"}},{throwOnError:!0});return a.jsxs("div",{className:"flex flex-col gap-5 p-5",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(_,{searchParams:s}),a.jsxs(S,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>n(),children:[a.jsx(E,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})]}),a.jsxs("div",{className:"flex flex-col items-center gap-5",children:[a.jsx("div",{className:"w-full",children:r?a.jsx(k,{columns:t,data:r.items}):a.jsx(p,{className:"h-[500px] w-full"})}),r?r.total_pages>1&&a.jsx(w,{searchParams:s,paginate:r}):a.jsx(p,{className:"h-[36px] w-[300px]"})]})]})}function me(){const{namespace:e}=h(),{setCurrentBreadcrumbData:s}=R();return f.useEffect(()=>{e&&s({segment:"pipeline_detail",data:{name:e}})},[e]),a.jsxs("div",{children:[a.jsx(L,{namespace:e}),a.jsx(O,{})]})}export{me as default};
@@ -0,0 +1 @@
1
+ import{r as x,j as e}from"./@radix-BXWm7HOa.js";import{C as N,S as ne,u as D,a as P,P as L,b as de,W as ue,L as xe}from"./ProviderRadio-BBqkIuTd.js";import{p as U,C as p,s as me,a as he,c as X,b as pe}from"./persist-3-5nOJ6m.js";import{aC as fe,aD as ge,aE as je,aF as ee,S as j,y as z,A as R,b as I,h as te,B,am as Ce,an as ve,ao as ye,ap as be,aq as we,aG as Ne,r as J}from"./index-DhIZtpxB.js";import{c as ke,b as Se}from"./@react-router-l3lMcXA2.js";import{I as C}from"./Infobox-BQ0aty32.js";import{t as re}from"./zod-CnykDKJj.js";import{b as se,C as ze,u as ae,F as Me}from"./index.esm-DT4uyn2i.js";import{T as M}from"./Tick-uxv80Q6a.js";import{s as v}from"./sharedSchema-BoYx_B_L.js";import{a as y}from"./@tanstack-FmcYZMuX.js";import{S as ie}from"./logs-CgeE2vZP.js";import{C as k}from"./CodeSnippet-D0VLxT2A.js";import{N as E}from"./NumberBox-BmKE0qnO.js";import{S as Ae}from"./package-DdkziX79.js";import"./aws-0_3UsPif.js";import"./@reactflow-CeVxyqYT.js";import"./url-hcMJkz8p.js";import"./stack-detail-query-B-US_-wa.js";import"./database-cXYNX9tt.js";import"./layout-D6oiSbfd.js";import"./copy-f3XGPPxt.js";const le=x.createContext(null);function Pe({children:r}){const{success:s,data:a}=U(),[t,i]=x.useState(!1),[c,l]=x.useState(!!s),[o,d]=x.useState(s?{location:a.location,provider:a.provider,stackName:a.stackName}:{}),[n,u]=x.useState(s?a.timestamp:""),h=x.useRef(null);return e.jsx(le.Provider,{value:{isNextButtonDisabled:t,setIsNextButtonDisabled:i,data:o,setData:d,isLoading:c,setIsLoading:l,formRef:h,timestamp:n,setTimestamp:u},children:r})}function m(){const r=x.useContext(le);if(r===null)throw new Error("useNewInfraFormContext must be used within an AuthProvider");return r}const Le=r=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...r},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM12 4.5C12.5523 4.5 13 4.94772 13 5.5V6H13.1667C15.0076 6 16.5 7.49238 16.5 9.33333C16.5 9.88562 16.0523 10.3333 15.5 10.3333C14.9477 10.3333 14.5 9.88562 14.5 9.33333C14.5 8.59695 13.903 8 13.1667 8H11C10.1716 8 9.5 8.67157 9.5 9.5C9.5 10.3284 10.1716 11 11 11H13C14.933 11 16.5 12.567 16.5 14.5C16.5 16.433 14.933 18 13 18V18.5C13 19.0523 12.5523 19.5 12 19.5C11.4477 19.5 11 19.0523 11 18.5V18H10.8333C8.99238 18 7.5 16.5076 7.5 14.6667C7.5 14.1144 7.94772 13.6667 8.5 13.6667C9.05228 13.6667 9.5 14.1144 9.5 14.6667C9.5 15.403 10.097 16 10.8333 16H13C13.8284 16 14.5 15.3284 14.5 14.5C14.5 13.6716 13.8284 13 13 13H11C9.067 13 7.5 11.433 7.5 9.5C7.5 7.567 9.067 6 11 6V5.5C11 4.94772 11.4477 4.5 12 4.5Z"})),De=r=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...r},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.16145 4L18.8385 4C19.3657 3.99998 19.8205 3.99997 20.195 4.03057C20.5904 4.06287 20.9836 4.13419 21.362 4.32698C21.9265 4.6146 22.3854 5.07354 22.673 5.63803C22.8658 6.01641 22.9371 6.40963 22.9694 6.80498C23 7.17954 23 7.6343 23 8.16144V15.8386C23 16.3657 23 16.8205 22.9694 17.195C22.9371 17.5904 22.8658 17.9836 22.673 18.362C22.3854 18.9265 21.9265 19.3854 21.362 19.673C20.9836 19.8658 20.5904 19.9371 20.195 19.9694C19.8205 20 19.3657 20 18.8386 20L5.16148 20C4.63432 20 4.17955 20 3.80497 19.9694C3.40963 19.9371 3.01641 19.8658 2.63803 19.673C2.07354 19.3854 1.6146 18.9265 1.32698 18.362C1.13419 17.9836 1.06287 17.5904 1.03057 17.195C0.999967 16.8205 0.999983 16.3657 1 15.8385L1 10.0006C1 10.0004 1 10.0008 1 10.0006C1 10.0004 1 9.99958 1 9.99937L1 8.16146C0.999983 7.63431 0.999968 7.17955 1.03057 6.80497C1.06287 6.40963 1.13419 6.01641 1.32698 5.63803C1.6146 5.07354 2.07354 4.6146 2.63803 4.32698C3.01641 4.13419 3.40963 4.06287 3.80497 4.03057C4.17955 3.99997 4.63431 3.99998 5.16145 4ZM3 11V15.8C3 16.3766 3.00078 16.7488 3.02393 17.0322C3.04612 17.3038 3.0838 17.4045 3.109 17.454C3.20487 17.6422 3.35785 17.7951 3.54601 17.891C3.59546 17.9162 3.69617 17.9539 3.96784 17.9761C4.25117 17.9992 4.62345 18 5.2 18L18.8 18C19.3766 18 19.7488 17.9992 20.0322 17.9761C20.3038 17.9539 20.4045 17.9162 20.454 17.891C20.6422 17.7951 20.7951 17.6422 20.891 17.454C20.9162 17.4045 20.9539 17.3038 20.9761 17.0322C20.9992 16.7488 21 16.3766 21 15.8V11H3ZM21 9H3V8.2C3 7.62345 3.00078 7.25117 3.02393 6.96784C3.04612 6.69617 3.0838 6.59546 3.109 6.54601C3.20487 6.35785 3.35785 6.20487 3.54601 6.109C3.59546 6.0838 3.69617 6.04612 3.96784 6.02393C4.25118 6.00078 4.62345 6 5.2 6L18.8 6C19.3766 6 19.7488 6.00078 20.0322 6.02393C20.3038 6.04613 20.4045 6.0838 20.454 6.109C20.6422 6.20487 20.7951 6.35785 20.891 6.54601C20.9162 6.59546 20.9539 6.69617 20.9761 6.96784C20.9992 7.25118 21 7.62345 21 8.2V9ZM5 14C5 13.4477 5.44772 13 6 13H11C11.5523 13 12 13.4477 12 14C12 14.5523 11.5523 15 11 15H6C5.44772 15 5 14.5523 5 14Z"}));function _(){const{data:r}=m();return e.jsxs(fe,{children:[e.jsx(ge,{className:"block",children:e.jsxs(C,{intent:"warning",children:["This will give ZenML permissions and create secret keys for secure ZenML -",">"," ",e.jsx("span",{className:"capitalize",children:r.provider||"Provider"})," communication. You can revoke these permissions at any time."]})}),e.jsx(je,{sideOffset:0,className:"w-auto p-5",children:e.jsx(ee,{viewportClassName:"max-h-[300px]",children:e.jsx(Re,{})})})]})}function Re(){const{data:r}=m(),{isPending:s,isError:a,error:t,data:i}=y(v.stackDeploymentInfo({provider:r.provider}));if(s)return e.jsx(j,{className:"h-[100px] w-full"});if(a)return e.jsx("p",{children:t.message});const c=Object.entries(i.permissions);return e.jsx("ul",{className:"space-y-2 pr-3 text-text-sm",children:c.map(([l,o])=>e.jsxs("li",{className:"flex flex-col gap-1",children:[e.jsx("p",{children:l}),e.jsx("ul",{className:"list-inside list-[square] pl-4 text-neutral-400 marker:text-primary-200",children:o.map((d,n)=>e.jsx("li",{children:d},n))})]},l))})}function Ie({stackName:r,isLoading:s,isSuccess:a,components:t,displayPermissions:i=!1}){var c,l,o,d,n,u,h,g;return e.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 text-text-lg font-semibold",children:[s&&e.jsx(z,{className:"h-5 w-5 shrink-0 border-[3px]"}),a&&e.jsx(M,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),e.jsx(R,{type:"square",size:"lg",children:e.jsx(I,{size:"lg",children:r[0]})}),r]}),e.jsxs("div",{className:"space-y-1 py-3 pl-9 pr-5",children:[e.jsx(f,{title:((c=t==null?void 0:t.connector)==null?void 0:c.name)||"IAM Role",isLoading:s,isSuccess:a,subtitle:((l=t==null?void 0:t.connector)==null?void 0:l.id)||"Manage access to AWS resources",badge:e.jsx(p,{type:"annotator",children:"Service Connector"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/service_connector/iam.webp",alt:"IAM logo"}}),i&&e.jsx(_,{})]}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(f,{title:((o=t==null?void 0:t.artifactStore)==null?void 0:o.name)||"S3 Bucket",subtitle:((d=t==null?void 0:t.artifactStore)==null?void 0:d.id)||"Artifact storage for ML pipelines",badge:e.jsx(p,{type:"artifact_store",children:"Artifact Store"}),isLoading:s,isSuccess:a,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/artifact_store/aws.png",alt:"S3 logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(f,{title:((n=t==null?void 0:t.registry)==null?void 0:n.name)||"ECR Repository",subtitle:((u=t==null?void 0:t.registry)==null?void 0:u.id)||"Container image storage",badge:e.jsx(p,{type:"container_registry",children:"Container Registry"}),isLoading:s,isSuccess:a,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/container_registry/aws.png",alt:"ECR logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(f,{title:((h=t==null?void 0:t.orchestrator)==null?void 0:h.name)||"SageMaker",isLoading:s,isSuccess:a,subtitle:((g=t==null?void 0:t.orchestrator)==null?void 0:g.id)||"ML Workflow orchestration",badge:e.jsx(p,{type:"orchestrator",children:"Orchestrator"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/orchestrator/sagemaker.png",alt:"Sagemaker logo"}})})]})}function Be({stackName:r,isLoading:s,isSuccess:a,components:t,displayPermissions:i=!1}){var c,l,o,d,n,u,h,g,b,w;return e.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 text-text-lg font-semibold",children:[s&&e.jsx(z,{className:"h-5 w-5 shrink-0 border-[3px]"}),a&&e.jsx(M,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),e.jsx(R,{type:"square",size:"lg",children:e.jsx(I,{size:"lg",children:r[0]})}),r]}),e.jsxs("div",{className:"space-y-1 py-3 pl-9 pr-5",children:[e.jsx(f,{title:((c=t==null?void 0:t.connector)==null?void 0:c.name)||"Service Account",isLoading:s,isSuccess:a,subtitle:((l=t==null?void 0:t.connector)==null?void 0:l.id)||"Manage access to GCP resources",badge:e.jsx(p,{type:"annotator",children:"Service Connector"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/service_connector/gcp-iam.webp",alt:"Service Account logo"}}),i&&e.jsx(_,{})]}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(f,{title:((o=t==null?void 0:t.artifactStore)==null?void 0:o.name)||"GCS Bucket",subtitle:((d=t==null?void 0:t.artifactStore)==null?void 0:d.id)||"Artifact storage for ML pipelines",badge:e.jsx(p,{type:"artifact_store",children:"Artifact Store"}),isLoading:s,isSuccess:a,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/artifact_store/gcp.png",alt:"GCS logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(f,{title:((n=t==null?void 0:t.registry)==null?void 0:n.name)||"Google Artifact Registry",subtitle:((u=t==null?void 0:t.registry)==null?void 0:u.id)||"Container image storage",badge:e.jsx(p,{type:"container_registry",children:"Container Registry"}),isLoading:s,isSuccess:a,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/container_registry/gcp.png",alt:"Google Artifact Registry logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(f,{title:((h=t==null?void 0:t.orchestrator)==null?void 0:h.name)||"Vertex AI",isLoading:s,isSuccess:a,subtitle:((g=t==null?void 0:t.orchestrator)==null?void 0:g.id)||"ML Workflow orchestration",badge:e.jsx(p,{type:"orchestrator",children:"Orchestrator"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/orchestrator/vertexai.png",alt:"VertexAI logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(f,{title:((b=t==null?void 0:t.imageBuilder)==null?void 0:b.name)||"Cloud Build",isLoading:s,isSuccess:a,subtitle:((w=t==null?void 0:t.imageBuilder)==null?void 0:w.id)||"Build, test, and deploy images",badge:e.jsx(p,{type:"image_builder",children:"Image Builder"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/image_builder/gcp.png",alt:"Cloud Build logo"}})})]})}function Ee(){return e.jsx(C,{className:"border-warning-300 bg-warning-50",intent:"warning",children:'The Cloud Shell session will warn you that the ZenML GitHub repository is untrusted. We recommend that you review the contents of the repository and then check the "Trust repo" checkbox to proceed with the deployment, otherwise the Cloud Shell session will not be authenticated to access your GCP projects.'})}function oe(){const{data:r}=m(),s=y({...v.stackDeploymentConfig({provider:"gcp",stack_name:r.stackName,location:r.location})});return s.isError?null:s.isPending?e.jsx(j,{className:"h-[200px] w-full"}):e.jsxs("section",{className:"space-y-5 border-t border-theme-border-moderate pt-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(ie,{className:"h-5 w-5 fill-primary-400"}),"Configuration"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"You will be asked to provide the following configuration values during the deployment process."})]}),e.jsx(k,{fullWidth:!0,highlightCode:!0,codeClasses:"whitespace-pre-wrap word-break-all",wrap:!0,code:s.data.configuration||""})]})}const _e=r=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...r},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2L10 2C10.5523 2 11 2.44772 11 3C11 3.55229 10.5523 4 10 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V14C20 13.4477 20.4477 13 21 13C21.5523 13 22 13.4477 22 14V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43598 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM14 3.00001C14 2.44773 14.4477 2.00001 15 2.00001H21C21.5523 2.00001 22 2.44773 22 3.00001L22 9.00001C22 9.55229 21.5523 10 21 10C20.4477 10 20 9.5523 20 9.00001L20 5.41422L12.7071 12.7071C12.3166 13.0976 11.6834 13.0976 11.2929 12.7071C10.9024 12.3166 10.9024 11.6834 11.2929 11.2929L18.5858 4.00001H15C14.4477 4.00001 14 3.5523 14 3.00001Z"}));function Ze(){const{data:r}=m();return e.jsxs("div",{className:"space-y-5",children:[e.jsx(C,{children:"This will provision and register a basic ZenML stack with all the necessary resources and credentials required to run pipelines."}),r.provider!=="azure"&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx(N,{provider:r.provider,className:"h-5 w-5"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Deploy the Stack"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Deploy the stack from your browser by clicking the button below:"})]}),r.provider==="gcp"&&e.jsx(Ee,{}),r.provider!=="azure"&&e.jsx(S,{setTimestampBool:!0}),r.provider==="gcp"&&e.jsx(oe,{}),r.provider==="azure"&&e.jsx(ce,{displayInfobox:!0})]})}function S({setTimestampBool:r,children:s}){const{data:a,setTimestamp:t,setIsLoading:i}=m(),c=y({...v.stackDeploymentConfig({provider:a.provider,location:a.location,stack_name:a.stackName})});if(c.isError)return null;if(c.isPending)return e.jsx(j,{className:"h-[48px] w-[100px]"});function l(){const o=new Date().toISOString().slice(0,-1);r&&t(o),me({location:a.location||"",provider:a.provider||"aws",stackName:a.stackName,timestamp:o}),i(!0)}return e.jsx(te,{asChild:!0,className:"w-fit gap-3 whitespace-nowrap",size:"lg",onClick:()=>l(),children:e.jsxs("a",{href:c.data.deployment_url,target:"_blank",rel:"noopener noreferrer",children:[s||e.jsxs("div",{children:["Deploy in ",e.jsx("span",{className:"uppercase",children:a.provider})]}),e.jsx(_e,{className:"h-5 w-5 shrink-0 fill-white"})]})})}function Te({stackName:r,isLoading:s,isSuccess:a,components:t,displayPermissions:i=!1}){var c,l,o,d,n,u,h,g;return e.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 text-text-lg font-semibold",children:[s&&e.jsx(z,{className:"h-5 w-5 shrink-0 border-[3px]"}),a&&e.jsx(M,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),e.jsx(R,{type:"square",size:"lg",children:e.jsx(I,{size:"lg",children:r[0]})}),r]}),e.jsxs("div",{className:"space-y-1 py-3 pl-9 pr-5",children:[e.jsx(f,{title:((c=t==null?void 0:t.connector)==null?void 0:c.name)||"Azure Service Principal",isLoading:s,isSuccess:a,subtitle:((l=t==null?void 0:t.connector)==null?void 0:l.id)||"Manage access to Azure resources",badge:e.jsx(p,{type:"annotator",children:"Service Connector"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/service_connector/azure-service-principal.webp",alt:"Service Principal logo"}}),i&&e.jsx(_,{})]}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(f,{title:((o=t==null?void 0:t.artifactStore)==null?void 0:o.name)||"Azure Blob Storage",subtitle:((d=t==null?void 0:t.artifactStore)==null?void 0:d.id)||"Artifact storage for ML pipelines",badge:e.jsx(p,{type:"artifact_store",children:"Artifact Store"}),isLoading:s,isSuccess:a,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/artifact_store/azure.png",alt:"Blob Storage logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(f,{title:((n=t==null?void 0:t.registry)==null?void 0:n.name)||"Azure Container Registry",subtitle:((u=t==null?void 0:t.registry)==null?void 0:u.id)||"Container image storage",badge:e.jsx(p,{type:"container_registry",children:"Container Registry"}),isLoading:s,isSuccess:a,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/container_registry/azure.png",alt:"Azure Container Registry logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(f,{title:((h=t==null?void 0:t.orchestrator)==null?void 0:h.name)||"Azure Skypilot Orchestrator",isLoading:s,isSuccess:a,subtitle:((g=t==null?void 0:t.orchestrator)==null?void 0:g.id)||"ML Workflow orchestration",badge:e.jsx(p,{type:"orchestrator",children:"Orchestrator"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/orchestrator/azure-skypilot.png",alt:"Azure Skypilot logo"}})})]})}function ce({displayInfobox:r=!1}){return e.jsxs("section",{className:"space-y-5",children:[e.jsx(Fe,{}),e.jsx(Ve,{displayInfobox:r}),e.jsx(He,{}),e.jsx(We,{})]})}function Ve({displayInfobox:r=!1}){return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{children:"1"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Open the Azure Cloud Shell Console"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Deploy the stack using the Azure Cloud Shell console."})]}),e.jsx(S,{setTimestampBool:!0,children:e.jsx("span",{className:"text-text-lg font-semibold",children:"Open the Azure Cloud Shell"})}),r&&e.jsx(C,{className:"border-warning-300 bg-warning-50",intent:"warning",children:"After the Terraform deployment is complete, you can close the Cloud Shell session and return to the dashboard to view details about the associated ZenML stack automatically registered with ZenML."})]})}function He(){return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{children:"2"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Create a file with the following configuration"})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Create a file named ",e.jsx("code",{className:"font-mono text-primary-400",children:"main.tf"})," in the Cloud Shell and copy and paste the Terraform configuration below into it."]})]}),e.jsx(Oe,{})]})}function We(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"space-y-1",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{children:"3"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Run the following commands"})]})}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Initialize the Terraform configuration."}),e.jsx(k,{code:"terraform init --upgrade"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Run terraform apply to deploy the ZenML stack to Azure."}),e.jsx(k,{code:"terraform apply"})]})]})}function Oe(){const{data:r}=m(),s=y({...v.stackDeploymentConfig({provider:"azure",stack_name:r.stackName,location:r.location}),enabled:!!r.stackName});return s.isError?null:s.isPending?e.jsx(j,{className:"h-[200px] w-full"}):e.jsx(k,{fullWidth:!0,highlightCode:!0,codeClasses:"whitespace-pre-wrap word-break-all",wrap:!0,code:s.data.configuration||""})}function Fe(){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(ie,{className:"h-5 w-5 fill-primary-400"}),"Configuration"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"You will be asked to provide the following configuration values during the deployment process."})]})}function Z({componentProps:r,type:s}){switch(s){case"aws":return e.jsx(Ie,{...r});case"gcp":return e.jsx(Be,{...r});case"azure":return e.jsx(Te,{...r})}}function f({img:r,title:s,subtitle:a,badge:t,isSuccess:i,isLoading:c}){return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[c&&e.jsx(z,{className:"h-5 w-5 shrink-0 border-[3px]"}),i&&e.jsx(M,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),e.jsx("img",{width:"40",height:"40",alt:r.alt,src:r.src}),e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg font-semibold",children:s}),e.jsx("p",{className:"text-theme-text-secondary",children:a})]})]}),t]})}function Ge(){const{data:r}=m();function s(){let a="#";switch(r.provider){case"aws":a="https://calculator.aws/#/";break;case"gcp":a="https://cloud.google.com/products/calculator";break;case"azure":a="https://azure.microsoft.com/en-us/pricing/calculator/";break}return e.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"link",children:"official pricing calculator"})}return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(Le,{className:"h-5 w-5 fill-primary-400"}),"Estimated Cost"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"These are rough estimates and actual costs may vary based on your usage."})]}),e.jsxs(B,{className:"flex items-start gap-[10px] p-3",children:[e.jsx("div",{className:"content-center rounded-sm bg-blue-25 p-1",children:e.jsx(De,{className:"h-5 w-5 fill-blue-400"})}),e.jsxs("div",{children:[e.jsxs("p",{children:["A small training job would cost around:"," ",e.jsx("span",{className:"font-semibold text-theme-text-success",children:"$0.60"})]}),e.jsxs("p",{className:"text-text-xs text-theme-text-secondary",children:["Please use the ",e.jsx(s,{})," for a detailed estimate"]})]})]})]})}const Ye=r=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...r},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3C8.13401 3 5 6.13401 5 10C5 11.8921 5.85317 13.678 7.29228 15.5467C8.50741 17.1245 10.0627 18.6673 11.7323 20.3233C11.8212 20.4115 11.9105 20.5 12 20.5889C12.0895 20.5 12.1788 20.4115 12.2677 20.3233C13.9373 18.6673 15.4926 17.1245 16.7077 15.5467C18.1468 13.678 19 11.8921 19 10C19 6.13401 15.866 3 12 3ZM3 10C3 5.02944 7.02944 1 12 1C16.9706 1 21 5.02944 21 10C21 12.5262 19.8532 14.7402 18.2923 16.767C16.988 18.4607 15.3185 20.1156 13.6508 21.7689C13.3354 22.0816 13.02 22.3943 12.7071 22.7071C12.3166 23.0976 11.6834 23.0976 11.2929 22.7071C10.98 22.3943 10.6646 22.0816 10.3492 21.7689C8.68147 20.1156 7.01205 18.4607 5.70772 16.767C4.14683 14.7402 3 12.5262 3 10ZM12 8C10.8954 8 10 8.89543 10 10C10 11.1046 10.8954 12 12 12C13.1046 12 14 11.1046 14 10C14 8.89543 13.1046 8 12 8ZM8 10C8 7.79086 9.79086 6 12 6C14.2091 6 16 7.79086 16 10C16 12.2091 14.2091 14 12 14C9.79086 14 8 12.2091 8 10Z"}));function qe(){const{control:r}=se(),{data:s}=m(),{isPending:a,isError:t,data:i}=y({...v.stackDeploymentInfo({provider:s.provider})});if(t)return null;if(a)return e.jsx(j,{className:"h-[40px] w-[100px]"});const c=Object.entries(i.locations);return e.jsx(ze,{control:r,name:"region",render:({field:{onChange:l,ref:o,...d}})=>e.jsxs(Ce,{...d,onValueChange:l,children:[e.jsx(ve,{className:"border border-neutral-300 text-left text-text-md",children:e.jsx(ye,{className:"flex items-center gap-2",placeholder:"Select your Location"})}),e.jsx(be,{children:e.jsx(ee,{viewportClassName:"max-h-[300px]",children:c.map(([n,u])=>e.jsxs(we,{value:u,children:[n," - ",e.jsx("span",{className:"text-theme-text-secondary",children:u})]},n))})})]})})}function Qe(){return e.jsxs("div",{className:"space-y-5 border-b border-theme-border-moderate pb-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(Ye,{className:"h-5 w-5 fill-primary-400"}),"Choose Your Location"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select where you want to deploy your cloud infrastructure for optimal performance and compliance."})]}),e.jsx(qe,{})]})}function $e(){const{data:r}=m(),{watch:s}=se();return e.jsxs("div",{className:"space-y-5 border-b border-theme-border-moderate pb-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(Ae,{className:"h-5 w-5 fill-primary-400"}),"Review Your Stack Components"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"The following components will be created for your ZenML stack."})]}),e.jsx(Z,{type:r.provider,componentProps:{displayPermissions:!0,stackName:s("stackName")}}),e.jsx(C,{children:"These resources create a basic ZenML stack for ML workflow management. ZenML supports highly flexible stacks. You can build advanced stacks at any time, combining your preferred tools and components for more complex MLOps."})]})}function Je(){const{formRef:r,setIsNextButtonDisabled:s,setData:a,data:t}=m(),i=ae({resolver:re(he),mode:"onChange",defaultValues:{region:t.location,stackName:t.stackName||""}});x.useEffect(()=>{s(!i.formState.isValid)},[i.formState.isValid,s]);function c(l){a(o=>({...o,location:l.region,stackName:l.stackName}))}return e.jsx(A,{title:"Review Stack Configuration",children:e.jsx(Me,{...i,children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs(C,{className:"text-text-sm",children:[e.jsx("p",{className:"font-semibold",children:"Important"}),e.jsx("p",{children:"This will create new resources in your account. Ensure you have the necessary permissions and are aware of any potential costs."})]}),e.jsxs("form",{onSubmit:i.handleSubmit(c),ref:r,className:"space-y-5",children:[e.jsx(Qe,{}),e.jsx(ne,{})]}),e.jsx($e,{}),e.jsx(Ge,{})]})})})}function Ke(){const{data:r,timestamp:s,setIsNextButtonDisabled:a}=m(),{setCurrentStep:t}=D(),{isPending:i,isError:c,data:l}=y({...v.stackDeploymentStack({provider:r.provider,stack_name:r.stackName,date_start:s}),refetchInterval:5e3,throwOnError:!0});return x.useEffect(()=>{l&&(X(),t(o=>o+1),a(!1))},[l]),i?e.jsx(j,{className:"h-[200px] w-full"}):c?null:e.jsxs("div",{className:"space-y-5",children:[e.jsx(Ue,{}),e.jsx(Xe,{stack:l})]})}function Ue(){const{data:r}=m();return e.jsxs("section",{className:"space-y-5 border-b border-theme-border-moderate pb-5",children:[e.jsxs(B,{className:"flex items-center justify-between gap-4 px-6 py-5",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(N,{provider:r.provider,className:"h-6 w-6 shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Deploying the Stack..."}),e.jsx("p",{className:"text-theme-text-secondary",children:"Follow the steps in your Cloud console to finish the setup. You can come back to check once your components are deployed."})]})]}),r.provider==="azure"?e.jsx(S,{children:e.jsx("span",{children:"Deploy in Azure"})}):e.jsx(S,{})]}),r.provider==="gcp"&&e.jsx(oe,{}),r.provider==="azure"&&e.jsx(ce,{})]})}function Xe({stack:r}){const s=!!r;return e.jsxs("div",{className:"space-y-5",children:[!s&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(Ne,{className:"h-5 w-5 fill-primary-400"}),"Creating your stack and components..."]}),e.jsx("p",{className:"text-theme-text-secondary",children:"We are creating your stack and stack components based on your configuration. Once you finish the setup, come back to check your brand new stack and components ready."})]}),e.jsx(tt,{isReady:s}),e.jsx(et,{stack:r})]})}function et({stack:r}){const s=!!r,{data:a}=m();return e.jsxs("div",{className:"relative overflow-hidden rounded-md",children:[!s&&e.jsx("div",{className:"absolute z-50 h-full w-full bg-neutral-50/50"}),e.jsx(Z,{type:a.provider,componentProps:{isLoading:!s,isSuccess:s,stackName:a.stackName}})]})}function tt({isReady:r}){const[s,a]=x.useState(!1);return x.useEffect(()=>{const t=setTimeout(()=>{a(!0)},3e5);return()=>clearTimeout(t)},[]),!s||r?null:e.jsx(C,{children:"Your stack is taking longer than usual to deploy. Please check your Cloud console, or the stacks list in ZenML."})}function rt(){return e.jsx(A,{title:"Deploy ZenML Stack",children:e.jsx(st,{})})}function st(){const{setIsNextButtonDisabled:r,isLoading:s}=m();return x.useEffect(()=>{r(!0)},[]),s?e.jsx(Ke,{}):e.jsx(Ze,{})}function at(){const{formRef:r,setIsNextButtonDisabled:s,setData:a,data:t}=m(),{register:i,handleSubmit:c,formState:{isValid:l}}=ae({resolver:re(pe),defaultValues:{provider:t.provider}});x.useEffect(()=>{s(!l)},[l,s]);function o(d){a(n=>({...n,provider:d.provider}))}return e.jsx(A,{title:"New Cloud Infrastructure",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where your want to create your infrastructure and deploy your ZenML models. You will be able to remove the ZenML stack at any time."})]}),e.jsxs("form",{id:"provider-form",onSubmit:c(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",ref:r,children:[e.jsx(P,{id:"aws-provider",...i("provider"),value:"aws",children:e.jsx(L,{icon:e.jsx(N,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"ZenML stack with S3, ECR, and SageMaker integration"})}),e.jsx(P,{id:"gcp-provider",...i("provider"),value:"gcp",children:e.jsx(L,{icon:e.jsx(N,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Create ZenML infrastructure using GCS, Artifact Registry, and Vertex AI"})}),e.jsx(P,{id:"azure-provider",...i("provider"),value:"azure",children:e.jsx(L,{icon:e.jsx(N,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Set up ZenML with Azure Storage, Container Registry, and ML services"})})]})]})})}function it(){const{setIsNextButtonDisabled:r}=m();return r(!1),e.jsx(A,{title:"Your Stack",children:e.jsxs("div",{className:"space-y-5",children:[e.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),e.jsx(lt,{})]})})}function lt(){var h,g,b,w,T,V,H,W,O,F,G,Y,q,Q,$;const{timestamp:r,data:s}=m(),{isPending:a,isError:t,data:i}=y({...v.stackDeploymentStack({provider:s.provider,stack_name:s.stackName,date_start:r}),throwOnError:!0});if(a)return e.jsx(j,{className:"h-[200px] w-full"});if(t)return null;const c=i.stack.name,l=(h=i.stack.metadata)==null?void 0:h.components.orchestrator,o=(g=i.stack.metadata)==null?void 0:g.components.artifact_store,d=(b=i.stack.metadata)==null?void 0:b.components.container_registry,n=(w=i.stack.metadata)==null?void 0:w.components.image_builder,u={orchestrator:{name:((T=l==null?void 0:l[0])==null?void 0:T.name)??"Orchestrator",id:((V=l==null?void 0:l[0])==null?void 0:V.id.split("-")[0])??""},artifactStore:{name:((H=o==null?void 0:o[0])==null?void 0:H.name)??"Artifact Store",id:((W=o==null?void 0:o[0])==null?void 0:W.id.split("-")[0])??""},registry:{name:((O=d==null?void 0:d[0])==null?void 0:O.name)??"Container Registry",id:((F=d==null?void 0:d[0])==null?void 0:F.id.split("-")[0])??""},connector:{name:(G=i.service_connector)==null?void 0:G.name,id:((q=(Y=i.service_connector)==null?void 0:Y.id)==null?void 0:q.split("-")[0])??""},imageBuilder:{name:((Q=n==null?void 0:n[0])==null?void 0:Q.name)??"Image Builder",id:(($=n==null?void 0:n[0])==null?void 0:$.id.split("-")[0])??""}};return e.jsx(Z,{type:s.provider,componentProps:{components:u,isSuccess:!0,stackName:c}})}function ot(){const{currentStep:r}=D();if(r===1)return e.jsx(at,{});if(r===2)return e.jsx(Je,{});if(r===3)return e.jsx(rt,{});if(r===4)return e.jsx(it,{})}function ct(){var n;const[s]=ke(),{setCurrentStep:a,currentStep:t}=D(),{formRef:i,isNextButtonDisabled:c}=m(),l=Se(),o=s.get("origin")==="onboarding";async function d(){i.current&&(i.current.requestSubmit(),await new Promise(u=>setTimeout(u,20))),a(u=>u<4?u+1:u),t===4&&(X(),l(o?J.onboarding:J.stacks.overview))}return e.jsx(te,{form:(n=i.current)==null?void 0:n.id,disabled:c,onClick:()=>d(),size:"md",children:t===4?"Finish":"Next"})}function A({children:r,title:s}){return e.jsxs(B,{className:"w-full",children:[e.jsx("div",{className:"border-b border-theme-border-moderate px-5 py-3 text-display-xs font-semibold",children:s}),e.jsx("div",{className:"p-5",children:r}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-theme-border-moderate p-5",children:[e.jsx(de,{}),e.jsx(ct,{})]})]})}const K=["Infrastructure Type","Cloud Provider","Review Configuration","Deploy Stack"];function Lt(){const{success:r}=U();return e.jsx(ue,{maxSteps:K.length,initialStep:r?3:1,children:e.jsx(Pe,{children:e.jsxs("section",{className:"layout-container flex flex-col gap-5 p-5 xl:flex-row",children:[e.jsx(xe,{entries:K}),e.jsx("div",{className:"w-full overflow-y-hidden",children:e.jsx(ot,{})})]})})})}export{Lt as default};
@@ -1 +1 @@
1
- import{r as l,j as s}from"./@radix-CFOkMR_E.js";import{a0 as D,a1 as E,h as f,a2 as k,a3 as z,a4 as M,f as C,ao as P,a9 as b,i as S,I as o,a7 as A,a8 as T,z as a,an as B,B as L,S as v,A as q,b as Q,am as R}from"./index-KsTz2dHG.js";import{c as V}from"./@tanstack-k96lU_C-.js";import{u as F}from"./index.esm-CbHNSeVw.js";import{t as U}from"./zod-BtSyGx4C.js";import{P as Z}from"./PasswordChecker-DUveqlva.js";import{u as _}from"./UpdatePasswordSchemas-BeCeaRW5.js";import{D as K}from"./DisplayDate-DYgIjlDF.js";import"./@react-router-CO-OsFwI.js";import"./@reactflow-DIYUhKYX.js";const O=e=>l.createElement("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28 5.5C15.5736 5.5 5.5 15.5736 5.5 28C5.5 40.4264 15.5736 50.5 28 50.5C40.4264 50.5 50.5 40.4264 50.5 28C50.5 15.5736 40.4264 5.5 28 5.5ZM0.5 28C0.5 12.8122 12.8122 0.5 28 0.5C43.1878 0.5 55.5 12.8122 55.5 28C55.5 43.1878 43.1878 55.5 28 55.5C12.8122 55.5 0.5 43.1878 0.5 28ZM41.0178 18.7322C41.9941 19.7085 41.9941 21.2915 41.0178 22.2678L26.0178 37.2678C25.0415 38.2441 23.4585 38.2441 22.4822 37.2678L14.9822 29.7678C14.0059 28.7915 14.0059 27.2085 14.9822 26.2322C15.9585 25.2559 17.5415 25.2559 18.5178 26.2322L24.25 31.9645L37.4822 18.7322C38.4585 17.7559 40.0415 17.7559 41.0178 18.7322Z"}));function H(){const[e,t]=l.useState(!1);return s.jsxs(D,{onOpenChange:()=>{t(!1)},children:[s.jsx(E,{asChild:!0,children:s.jsx(f,{size:"md",className:"shrink-0",intent:"primary",emphasis:"subtle",children:"Change Password"})}),s.jsxs(k,{children:[s.jsx(z,{children:s.jsx(M,{children:" Update Credentials"})}),e?s.jsx(J,{}):s.jsx(G,{setSuccess:t})]})]})}function G({setSuccess:e}){var u;const t=l.useId(),n=l.useId(),d=l.useId(),{toast:x}=C(),{mutate:p,isPending:j}=P({onSuccess(){e(!0)},onError(i){b(i)&&x({status:"error",emphasis:"subtle",icon:s.jsx(S,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}}),{register:c,handleSubmit:m,watch:w,formState:{isValid:N,errors:g}}=F({resolver:U(_),mode:"onChange",criteriaMode:"all"});function y(i){p({old_password:i.oldPassword,password:i.newPassword})}const h=(u=g.newPassword)==null?void 0:u.types;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-5 p-7",children:[s.jsx("form",{id:"update-password-form",onSubmit:m(y),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:t,className:"text-text-sm",children:"Old Password"}),s.jsx(o,{...c("oldPassword"),type:"password",id:t,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"New Password"}),s.jsx(o,{...c("newPassword"),type:"password",id:n,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:d,className:"text-text-sm",children:"Confirm Password"}),s.jsx(o,{...c("confirmPassword"),type:"password",id:d,className:"w-full"})]})]})}),s.jsx(Z,{val:w("newPassword"),errors:h||[]})]}),s.jsxs(A,{className:"gap-[10px]",children:[s.jsx(T,{asChild:!0,children:s.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),s.jsx(f,{disabled:!N||j,form:"update-password-form",size:"sm",children:"Update Password"})]})]})}function J(){return s.jsxs("div",{className:"space-y-5 p-7 text-center",children:[s.jsx(O,{className:"mx-auto h-[110px] w-[110px] fill-success-500"}),s.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:"The password was updated successfully!"})]})}const W=a.object({fullName:a.union([a.string(),a.literal("")]),username:a.union([a.string(),a.literal("")]),email:a.union([a.string().email(),a.literal("")])}).refine(e=>e.fullName!==""||e.username!==""||e.email!=="");function X({user:e}){var h,u,i;const t=V(),{toast:n}=C(),d=l.useId(),x=l.useId(),p=l.useId(),{isPending:j,mutate:c}=P({onError(r){b(r)&&n({status:"error",emphasis:"subtle",icon:s.jsx(S,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:r.message,rounded:!0})},onSuccess:()=>{t.invalidateQueries({queryKey:["current-user"]}),t.invalidateQueries({queryKey:["users"]}),w(),n({status:"success",emphasis:"subtle",rounded:!0,description:"User updated successfully"})}}),{register:m,reset:w,handleSubmit:N,formState:{isValid:g}}=F({resolver:U(W),defaultValues:{email:void 0,fullName:void 0,username:void 0}});function y(r){const I={...r.fullName&&{full_name:r.fullName},...r.username&&{name:r.username},...r.email&&{email:r.email}};c(I)}return s.jsxs("div",{className:"w-full max-w-[600px]",children:[s.jsx("form",{onSubmit:N(y),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:d,className:"text-text-sm",children:"Full Name"}),s.jsx(o,{placeholder:(h=e.body)==null?void 0:h.full_name,...m("fullName"),id:d,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:x,className:"text-text-sm",children:"Username"}),s.jsx(o,{...m("username"),placeholder:e.name,id:x,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:p,className:"text-text-sm",children:"Email"}),s.jsx(o,{placeholder:((u=e.metadata)==null?void 0:u.email)??void 0,...m("email"),id:p,className:"w-full"})]}),s.jsx("div",{className:"flex justify-end",children:s.jsx(f,{disabled:j||!g,size:"md",intent:"primary",children:"Update"})})]})}),s.jsx(H,{}),s.jsxs("p",{className:"mt-5 text-text-sm text-theme-text-secondary",children:["Created on ",s.jsx(K,{dateString:((i=e.body)==null?void 0:i.created)||""})]})]})}function ns(){const{data:e}=B();return s.jsxs(L,{className:"flex flex-col gap-5 p-5",children:[s.jsx("h1",{className:"text-text-xl font-semibold",children:"Profile"}),s.jsxs("div",{className:"flex justify-between",children:[e?s.jsx(X,{user:e}):s.jsx(v,{className:"h-[350px] w-full"}),e?s.jsx(q,{size:"xxl",className:"ml-5 h-[140px] w-[140px]",type:"rounded",children:s.jsx(Q,{className:"text-display-lg",size:"xxl",children:R(e)[0]})}):s.jsx(v,{className:"h-[140px] w-[140px] rounded-rounded"})]})]})}export{ns as default};
1
+ import{r as l,j as s}from"./@radix-BXWm7HOa.js";import{a0 as D,a1 as E,h as f,a2 as k,a3 as z,a4 as M,f as C,ak as P,a9 as b,i as S,I as o,a7 as A,a8 as T,z as a,aj as B,B as L,S as v,A as q,b as Q,ai as R}from"./index-DhIZtpxB.js";import{c as V}from"./@tanstack-FmcYZMuX.js";import{u as F}from"./index.esm-DT4uyn2i.js";import{t as U}from"./zod-CnykDKJj.js";import{P as Z}from"./PasswordChecker-yGGoJSB-.js";import{u as _}from"./UpdatePasswordSchemas-oN4G3sKz.js";import{D as K}from"./DisplayDate-DizbSeT-.js";import"./@react-router-l3lMcXA2.js";import"./@reactflow-CeVxyqYT.js";const O=e=>l.createElement("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28 5.5C15.5736 5.5 5.5 15.5736 5.5 28C5.5 40.4264 15.5736 50.5 28 50.5C40.4264 50.5 50.5 40.4264 50.5 28C50.5 15.5736 40.4264 5.5 28 5.5ZM0.5 28C0.5 12.8122 12.8122 0.5 28 0.5C43.1878 0.5 55.5 12.8122 55.5 28C55.5 43.1878 43.1878 55.5 28 55.5C12.8122 55.5 0.5 43.1878 0.5 28ZM41.0178 18.7322C41.9941 19.7085 41.9941 21.2915 41.0178 22.2678L26.0178 37.2678C25.0415 38.2441 23.4585 38.2441 22.4822 37.2678L14.9822 29.7678C14.0059 28.7915 14.0059 27.2085 14.9822 26.2322C15.9585 25.2559 17.5415 25.2559 18.5178 26.2322L24.25 31.9645L37.4822 18.7322C38.4585 17.7559 40.0415 17.7559 41.0178 18.7322Z"}));function H(){const[e,t]=l.useState(!1);return s.jsxs(D,{onOpenChange:()=>{t(!1)},children:[s.jsx(E,{asChild:!0,children:s.jsx(f,{size:"md",className:"shrink-0",intent:"primary",emphasis:"subtle",children:"Change Password"})}),s.jsxs(k,{children:[s.jsx(z,{children:s.jsx(M,{children:" Update Credentials"})}),e?s.jsx(J,{}):s.jsx(G,{setSuccess:t})]})]})}function G({setSuccess:e}){var u;const t=l.useId(),d=l.useId(),n=l.useId(),{toast:x}=C(),{mutate:p,isPending:j}=P({onSuccess(){e(!0)},onError(i){b(i)&&x({status:"error",emphasis:"subtle",icon:s.jsx(S,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}}),{register:c,handleSubmit:m,watch:w,formState:{isValid:N,errors:g}}=F({resolver:U(_),mode:"onChange",criteriaMode:"all"});function y(i){p({old_password:i.oldPassword,password:i.newPassword})}const h=(u=g.newPassword)==null?void 0:u.types;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-5 p-7",children:[s.jsx("form",{id:"update-password-form",onSubmit:m(y),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:t,className:"text-text-sm",children:"Old Password"}),s.jsx(o,{...c("oldPassword"),type:"password",id:t,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:d,className:"text-text-sm",children:"New Password"}),s.jsx(o,{...c("newPassword"),type:"password",id:d,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"Confirm Password"}),s.jsx(o,{...c("confirmPassword"),type:"password",id:n,className:"w-full"})]})]})}),s.jsx(Z,{val:w("newPassword"),errors:h||[]})]}),s.jsxs(A,{className:"gap-[10px]",children:[s.jsx(T,{asChild:!0,children:s.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),s.jsx(f,{disabled:!N||j,form:"update-password-form",size:"sm",children:"Update Password"})]})]})}function J(){return s.jsxs("div",{className:"space-y-5 p-7 text-center",children:[s.jsx(O,{className:"mx-auto h-[110px] w-[110px] fill-success-500"}),s.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:"The password was updated successfully!"})]})}const W=a.object({fullName:a.union([a.string(),a.literal("")]),username:a.union([a.string(),a.literal("")]),email:a.union([a.string().email(),a.literal("")])}).refine(e=>e.fullName!==""||e.username!==""||e.email!=="");function X({user:e}){var h,u,i;const t=V(),{toast:d}=C(),n=l.useId(),x=l.useId(),p=l.useId(),{isPending:j,mutate:c}=P({onError(r){b(r)&&d({status:"error",emphasis:"subtle",icon:s.jsx(S,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:r.message,rounded:!0})},onSuccess:()=>{t.invalidateQueries({queryKey:["current-user"]}),t.invalidateQueries({queryKey:["users"]}),w(),d({status:"success",emphasis:"subtle",rounded:!0,description:"User updated successfully"})}}),{register:m,reset:w,handleSubmit:N,formState:{isValid:g}}=F({resolver:U(W),defaultValues:{email:void 0,fullName:void 0,username:void 0}});function y(r){const I={...r.fullName&&{full_name:r.fullName},...r.username&&{name:r.username},...r.email&&{email:r.email}};c(I)}return s.jsxs("div",{className:"w-full max-w-[600px]",children:[s.jsx("form",{onSubmit:N(y),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"Full Name"}),s.jsx(o,{placeholder:(h=e.body)==null?void 0:h.full_name,...m("fullName"),id:n,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:x,className:"text-text-sm",children:"Username"}),s.jsx(o,{...m("username"),placeholder:e.name,id:x,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:p,className:"text-text-sm",children:"Email"}),s.jsx(o,{placeholder:((u=e.metadata)==null?void 0:u.email)??void 0,...m("email"),id:p,className:"w-full"})]}),s.jsx("div",{className:"flex justify-end",children:s.jsx(f,{disabled:j||!g,size:"md",intent:"primary",children:"Update"})})]})}),s.jsx(H,{}),s.jsxs("p",{className:"mt-5 text-text-sm text-theme-text-secondary",children:["Created on ",s.jsx(K,{dateString:((i=e.body)==null?void 0:i.created)||""})]})]})}function ds(){const{data:e}=B();return s.jsxs(L,{className:"flex flex-col gap-5 p-5",children:[s.jsx("h1",{className:"text-text-xl font-semibold",children:"Profile"}),s.jsxs("div",{className:"flex justify-between",children:[e?s.jsx(X,{user:e}):s.jsx(v,{className:"h-[350px] w-full"}),e?s.jsx(q,{size:"xxl",className:"ml-5 h-[140px] w-[140px]",type:"rounded",children:s.jsx(Q,{className:"text-display-lg",size:"xxl",children:R(e)[0]})}):s.jsx(v,{className:"h-[140px] w-[140px] rounded-rounded"})]})]})}export{ds as default};
@@ -0,0 +1 @@
1
+ import{r as o,j as e}from"./@radix-BXWm7HOa.js";import{k as j,l as C,j as y,n as M,F as b,a0 as T,a1 as E,h,a2 as F,a3 as P,a4 as U,a5 as k,z as m,f as v,I as O,a6 as I,a7 as R,a8 as _,a9 as H,i as D,aa as q,ab as z,ac as Z,ad as B,ae as K,af as Q,ag as V,ah as L,E as w,ai as G,aj as J,S as f,D as $,B as W}from"./index-DhIZtpxB.js";import{S as X,P as Y}from"./SearchField-C9R0mdaX.js";import{a as ee,b as N,c as A}from"./@tanstack-FmcYZMuX.js";import{o as se}from"./url-hcMJkz8p.js";import{C as te}from"./CodeSnippet-D0VLxT2A.js";import{u as ae}from"./index.esm-DT4uyn2i.js";import{D as re}from"./DisplayDate-DizbSeT-.js";import{I as ne}from"./InlineAvatar-DpTLgM3Q.js";import{S as ie}from"./dots-horizontal-sKQlWEni.js";import{A as oe}from"./AlertDialogDropdownItem-ErO9aOgK.js";import{c as le}from"./@react-router-l3lMcXA2.js";import"./@reactflow-CeVxyqYT.js";import"./chevron-right-double-Dk8e2L99.js";import"./index-Bd1xgUQG.js";import"./copy-f3XGPPxt.js";function ce({params:a}){return["users",a]}async function de({params:a}){const s=j(C.users.all+"?"+se(a)),t=await y(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&M(),!t.ok)throw new b({message:"Error while fetching users",status:t.status,statusText:t.statusText});return t.json()}function ue(a,s){return ee({queryKey:ce(a),queryFn:()=>de(a),...s})}const me=a=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 4C8.06703 4 6.50002 5.567 6.50002 7.5C6.50002 9.433 8.06703 11 10 11C11.933 11 13.5 9.433 13.5 7.5C13.5 5.567 11.933 4 10 4ZM4.50002 7.5C4.50002 4.46243 6.96246 2 10 2C13.0376 2 15.5 4.46243 15.5 7.5C15.5 10.5376 13.0376 13 10 13C6.96246 13 4.50002 10.5376 4.50002 7.5ZM19 14C19.5523 14 20 14.4477 20 15V17H22C22.5523 17 23 17.4477 23 18C23 18.5523 22.5523 19 22 19H20V21C20 21.5523 19.5523 22 19 22C18.4477 22 18 21.5523 18 21V19H16C15.4477 19 15 18.5523 15 18C15 17.4477 15.4477 17 16 17H18V15C18 14.4477 18.4477 14 19 14ZM7.32629 14.5C7.38335 14.5 7.44125 14.5 7.50003 14.5H12C12.5523 14.5 13 14.9477 13 15.5C13 16.0523 12.5523 16.5 12 16.5H7.50003C6.03171 16.5 5.51923 16.5109 5.12917 16.6292C4.17036 16.92 3.42005 17.6703 3.1292 18.6291C3.01088 19.0192 3.00002 19.5317 3.00002 21C3.00002 21.5523 2.55231 22 2.00002 22C1.44774 22 1.00002 21.5523 1.00002 21C1.00002 20.9412 1 20.8833 0.99998 20.8263C0.999526 19.599 0.999216 18.761 1.21532 18.0486C1.70007 16.4506 2.95059 15.2 4.54859 14.7153C5.261 14.4992 6.09902 14.4995 7.32629 14.5Z"}));async function he(a){const s=j(C.users.all),t=await y(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>"Failed to create User");throw new b({status:t.status,statusText:t.statusText,message:r})}return t.json()}function xe(a){return N({mutationFn:async s=>he(s),...a})}function pe(){const[a,s]=o.useState(!1),[t,r]=o.useState(null);return e.jsxs(T,{open:a,onOpenChange:n=>{s(n),r(null)},children:[e.jsx(E,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add Member"})}),e.jsxs(F,{className:"",children:[e.jsx(P,{children:e.jsx(U,{children:" Add a New Member"})}),t?e.jsx(ge,{name:t.name,token:k(t)}):e.jsx(fe,{setSuccessMember:r})]})]})}m.object({username:m.string(),isAdmin:m.boolean()});function fe({setSuccessMember:a}){const{toast:s}=v(),t=A(),{mutate:r,isPending:n}=xe({onError(d){H(d)&&s({status:"error",emphasis:"subtle",icon:e.jsx(D,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess(d){a(d),t.invalidateQueries({queryKey:["users"]})}}),c=o.useId(),l=o.useId(),{register:i,handleSubmit:x,watch:p,setValue:u}=ae();function S(d){r({is_admin:d.isAdmin,name:d.username})}return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-user-form",onSubmit:x(S),className:"space-y-5 p-7",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:c,className:"text-text-sm",children:"Username"}),e.jsx(O,{...i("username"),id:c,className:"w-full"})]}),e.jsxs("div",{className:"flex gap-5",children:[e.jsx("label",{htmlFor:l,className:"text-text-md",children:"Add user as an Admin"}),e.jsx(I,{onCheckedChange:d=>u("isAdmin",!!d),...i("isAdmin",{value:!1}),id:l})]})]})}),e.jsxs(R,{className:"gap-[10px]",children:[e.jsx(_,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{disabled:!p("username")||n,form:"create-user-form",size:"sm",children:"Generate Token"})]})]})}function ge({token:a,name:s}){return e.jsxs("div",{className:"space-y-5 overflow-hidden p-7 text-center",children:[e.jsx(me,{className:"m-auto mb-5 h-[110px] w-[110px] fill-success-500"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:`The user ${s} was created successfully!`}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Share the invitation link with the user to complete the registration."})]}),e.jsx(te,{className:"mx-auto",code:a})]})}const je=a=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.9681 6.38231C3.73647 7.92199 3 9.87499 3 12C3 16.9706 7.02944 21 12 21C14.125 21 16.078 20.2635 17.6177 19.0319L4.9681 6.38231ZM6.38231 4.9681L19.0319 17.6177C20.2635 16.078 21 14.125 21 12C21 7.02944 16.9706 3 12 3C9.87499 3 7.92199 3.73647 6.38231 4.9681ZM1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12Z"}));async function Ce(a){const s=j(C.users.detail(a)),t=await y(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>"Failed to delete User");throw new b({status:t.status,statusText:t.statusText,message:r})}return t.json()}function ye(a){return N({mutationFn:async s=>Ce(s),...a})}function be({userId:a,name:s}){const{toast:t}=v(),r=A(),{isPending:n,mutate:c}=ye({onSuccess(){r.invalidateQueries({queryKey:["users"]})},onError:i=>{i instanceof Error&&t({status:"error",emphasis:"subtle",icon:e.jsx(D,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}});function l(){c(a)}return e.jsxs(q,{className:"p-0",children:[e.jsx(z,{className:"py-2 pl-5 pr-3 text-text-lg font-semibold",children:"Delete Member"}),e.jsx("div",{className:"border-y border-theme-border-moderate px-5 py-5",children:e.jsxs(Z,{children:["Deleting ",e.jsx("strong",{children:s})," cannot be undone."]})}),e.jsxs("div",{className:"flex justify-end gap-3 px-5 py-3",children:[e.jsx(B,{asChild:!0,children:e.jsx(h,{intent:"secondary",children:"Cancel"})}),e.jsx(K,{asChild:!0,children:e.jsx(h,{onClick:l,disabled:n,intent:"danger",children:"Delete"})})]})]})}function we({userId:a,name:s}){const[t,r]=o.useState(!1),[n,c]=o.useState(!1),l=o.useRef(null),i=o.useRef(null);function x(){i.current=l.current}function p(u){if(u===!1){c(!1),setTimeout(()=>{r(u)},200);return}r(u)}return e.jsxs(Q,{onOpenChange:c,open:n,children:[e.jsx(V,{ref:l,children:e.jsx(ie,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(L,{hidden:t,onCloseAutoFocus:u=>{i.current&&(i.current.focus(),i.current=null,u.preventDefault())},align:"end",sideOffset:7,children:e.jsx(oe,{onSelect:x,onOpenChange:p,triggerChildren:"Remove Member",icon:e.jsx(je,{fill:"red"}),children:e.jsx(be,{name:s,userId:a})})})]})}function ve({isAdmin:a}){return[{id:"name",accessorFn:s=>{var t;return{name:s.name,is_admin:!!((t=s.body)!=null&&t.is_admin)}},cell:({getValue:s})=>{const{name:t,is_admin:r}=s();return e.jsxs("div",{className:"flex",children:[e.jsx(ne,{username:t}),r&&e.jsx("div",{children:e.jsx(w,{className:"ml-2 capitalize",size:"xs",color:"purple",children:"Admin"})})]})},header:"User"},{accessorKey:"status",header:"Status",accessorFn:s=>{var t;return{status:(t=s.body)==null?void 0:t.active}},cell:({getValue:s})=>{const{status:t}=s();return e.jsx(w,{className:"capitalize",color:t?"green":"grey",children:t?"Active":"Inactive"})}},{id:"created",header:"Created",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(re,{dateString:s()})})},...a?[{id:"actions",header:"",accessorFn:s=>({id:s.id,name:G(s)}),meta:{width:"5%"},cell:({getValue:s})=>{const{id:t,name:r}=s();return e.jsx(we,{name:r,userId:t})}}]:[]]}const g=1,De=m.object({page:m.coerce.number().min(g).optional().default(g).catch(g),name:m.string().optional(),operator:m.enum(["and","or"]).optional()});function Ne(){const[a]=le(),{page:s,name:t,operator:r}=De.parse({page:a.get("page")||void 0,name:a.get("name")||void 0,operator:a.get("operator")||void 0});return{page:s,name:t,logical_operator:r}}function Ae(){var l,i;const a=Ne(),{data:s,isError:t}=ue({params:{...a,sort_by:"desc:created"}},{throwOnError:!0}),{data:r,isPending:n,isError:c}=J();return t||c?null:n?e.jsx(f,{className:"h-[350px]"}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(X,{searchParams:a}),((l=r.body)==null?void 0:l.is_admin)&&e.jsx(pe,{})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:s?e.jsx($,{columns:ve({isAdmin:(i=r.body)==null?void 0:i.is_admin}),data:s.items}):e.jsx(f,{className:"h-[250px] w-full"})}),s?s.total_pages>1&&e.jsx(Y,{searchParams:a,paginate:s}):e.jsx(f,{className:"h-[36px] w-[300px]"})]})]})}function Be(){return e.jsxs(W,{className:"flex flex-col gap-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Members"}),e.jsx(Ae,{})]})}export{Be as default};