zenml-nightly 0.84.2.dev20250826__py3-none-any.whl → 0.84.3.dev20250828__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 (121) hide show
  1. zenml/VERSION +1 -1
  2. zenml/cli/login.py +30 -19
  3. zenml/cli/server.py +6 -10
  4. zenml/login/credentials.py +27 -0
  5. zenml/login/credentials_store.py +80 -80
  6. zenml/login/pro/client.py +74 -54
  7. zenml/login/pro/utils.py +1 -3
  8. zenml/utils/package_utils.py +1 -1
  9. zenml/zen_server/dashboard/assets/{404-CMbwR10f.js → 404-JcbBcNWG.js} +1 -1
  10. zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-BpLj419i.js → AlertDialogDropdownItem-DuTp8JFP.js} +1 -1
  11. zenml/zen_server/dashboard/assets/{ButtonGroup-DVhzbQxV.js → ButtonGroup-B9_gfcC-.js} +1 -1
  12. zenml/zen_server/dashboard/assets/{CodeSnippet-B7Wd4R8u.js → CodeSnippet-D7OZMz7I.js} +1 -1
  13. zenml/zen_server/dashboard/assets/{CollapsibleCard-DSZzbjx5.js → CollapsibleCard-Aqd_AiGn.js} +1 -1
  14. zenml/zen_server/dashboard/assets/{ComponentBadge-MVT08kBV.js → ComponentBadge-BVRb7wgm.js} +1 -1
  15. zenml/zen_server/dashboard/assets/{ComponentIcon-C9AY8usJ.js → ComponentIcon-CWDJZO4Q.js} +1 -1
  16. zenml/zen_server/dashboard/assets/{DeleteAlertDialog-CzhTVQaC.js → DeleteAlertDialog-C5z9RupH.js} +1 -1
  17. zenml/zen_server/dashboard/assets/{DialogItem-DD_7v3UY.js → DialogItem-Ce3ugDgT.js} +1 -1
  18. zenml/zen_server/dashboard/assets/{Error-Cakgjexo.js → Error-BGej6F2q.js} +1 -1
  19. zenml/zen_server/dashboard/assets/{ExecutionStatus-CQbWovhV.js → ExecutionStatus-BhDlfndt.js} +1 -1
  20. zenml/zen_server/dashboard/assets/{Helpbox-7FZpmsHB.js → Helpbox-CQjyNo0n.js} +1 -1
  21. zenml/zen_server/dashboard/assets/{Infobox-DnduZjNU.js → Infobox-CXOIY92f.js} +1 -1
  22. zenml/zen_server/dashboard/assets/{LeftSideMenu-D5UEs4vB.js → LeftSideMenu-DGICatl7.js} +1 -1
  23. zenml/zen_server/dashboard/assets/{NestedCollapsible-0yviIfaA.js → NestedCollapsible-DmryIMwk.js} +1 -1
  24. zenml/zen_server/dashboard/assets/{NumberBox-C2Pju4PR.js → NumberBox-7OIA56xe.js} +1 -1
  25. zenml/zen_server/dashboard/assets/{Pagination-C1sE5Nzn.js → Pagination-CVYIgR9l.js} +1 -1
  26. zenml/zen_server/dashboard/assets/{Partials-DosysQMU.js → Partials-NicibWrh.js} +1 -1
  27. zenml/zen_server/dashboard/assets/{ProCta-CUkpV3PJ.js → ProCta-DspRnbtD.js} +1 -1
  28. zenml/zen_server/dashboard/assets/{ProviderIcon-aQjTuTRX.js → ProviderIcon-DwKsXziU.js} +1 -1
  29. zenml/zen_server/dashboard/assets/{ProviderRadio-C6pLVNxC.js → ProviderRadio-BixXi4GC.js} +1 -1
  30. zenml/zen_server/dashboard/assets/{RunsBody-CZAiSxYK.js → RunsBody-BSOSIxRG.js} +1 -1
  31. zenml/zen_server/dashboard/assets/{SearchField-Byv1PtST.js → SearchField-BbwrusMV.js} +1 -1
  32. zenml/zen_server/dashboard/assets/{SecretTooltip-CErfhVgF.js → SecretTooltip-BsFul9Oe.js} +1 -1
  33. zenml/zen_server/dashboard/assets/{SetPassword-C4OH-cn1.js → SetPassword-D-V7D0OR.js} +1 -1
  34. zenml/zen_server/dashboard/assets/{SheetHeader-Bb3v9rha.js → SheetHeader-xumE4haD.js} +1 -1
  35. zenml/zen_server/dashboard/assets/{StackComponentList-D85oab98.js → StackComponentList-CLnkE6-6.js} +1 -1
  36. zenml/zen_server/dashboard/assets/{StackList-DSAjbVb5.js → StackList-DhsbaNva.js} +1 -1
  37. zenml/zen_server/dashboard/assets/{Tabs-2uwqXsdL.js → Tabs-CkY3GwhK.js} +1 -1
  38. zenml/zen_server/dashboard/assets/{Tick-BQ7_xDBl.js → Tick-Bo7jwBjb.js} +1 -1
  39. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DNkYgzN6.js → UpdatePasswordSchemas-BP4hg95A.js} +1 -1
  40. zenml/zen_server/dashboard/assets/{Wizard-2FIi8JNY.js → Wizard-0nbnAM1R.js} +1 -1
  41. zenml/zen_server/dashboard/assets/{WizardFooter-DQEnlDmZ.js → WizardFooter-CLPi4VBo.js} +1 -1
  42. zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-CdvWtiAY.js → all-pipeline-runs-query-mPYeJsKz.js} +1 -1
  43. zenml/zen_server/dashboard/assets/{bulk-delete-wdObjfps.js → bulk-delete-Bgf_MsSj.js} +1 -1
  44. zenml/zen_server/dashboard/assets/{configuration-form-BbcNBQTO.js → configuration-form-Bnyw4-V5.js} +1 -1
  45. zenml/zen_server/dashboard/assets/{constants-DfvsDtcH.js → constants-Ddhz1mpL.js} +1 -1
  46. zenml/zen_server/dashboard/assets/{create-stack-D4Sf7QpF.js → create-stack-BpTy7-E4.js} +1 -1
  47. zenml/zen_server/dashboard/assets/{delete-run-XSre8ru-.js → delete-run-MHYb1wuH.js} +1 -1
  48. zenml/zen_server/dashboard/assets/form-VRON3-kT.js +1 -0
  49. zenml/zen_server/dashboard/assets/{form-schemas-BjWDRvGd.js → form-schemas-CpTCEVoG.js} +1 -1
  50. zenml/zen_server/dashboard/assets/{index-BYHxFvoG.js → index-BYCBKUXk.js} +1 -1
  51. zenml/zen_server/dashboard/assets/{index-CO6UN3UX.js → index-Ci5z7q6x.js} +2 -2
  52. zenml/zen_server/dashboard/assets/{index-d_QrPL-8.js → index-D_-iUPTg.js} +1 -1
  53. zenml/zen_server/dashboard/assets/{index-BYzR7YrM.js → index-rnWXXblA.js} +1 -1
  54. zenml/zen_server/dashboard/assets/{layout-Cyc-V16c.js → layout-DhFllShI.js} +1 -1
  55. zenml/zen_server/dashboard/assets/{login-mutation-CDgTlQBD.js → login-mutation-DOxF97JV.js} +1 -1
  56. zenml/zen_server/dashboard/assets/{page-Bncp08FW.js → page-62MHYKGv.js} +1 -1
  57. zenml/zen_server/dashboard/assets/{page-CMvcoaSZ.js → page-6YPAQ0BU.js} +1 -1
  58. zenml/zen_server/dashboard/assets/{page-CEHZzQ1Q.js → page-8ZbMMHB-.js} +1 -1
  59. zenml/zen_server/dashboard/assets/{page-D654xHWd.js → page-AWVW_lra.js} +1 -1
  60. zenml/zen_server/dashboard/assets/{page-BnZEAhNn.js → page-B1rTgWkQ.js} +1 -1
  61. zenml/zen_server/dashboard/assets/{page-BbsvGfyi.js → page-B5YCjh4t.js} +1 -1
  62. zenml/zen_server/dashboard/assets/{page-DgOEl3Bc.js → page-BDawWKR9.js} +1 -1
  63. zenml/zen_server/dashboard/assets/{page-DOnAInjC.js → page-BFzVhfws.js} +1 -1
  64. zenml/zen_server/dashboard/assets/page-BaQw51KO.js +1 -0
  65. zenml/zen_server/dashboard/assets/{page-C4Jnp1qP.js → page-Bh4TFAum.js} +1 -1
  66. zenml/zen_server/dashboard/assets/{page-CGtll3Jk.js → page-BjuIRasU.js} +1 -1
  67. zenml/zen_server/dashboard/assets/{page-43SWdz4k.js → page-BoQ_Wheb.js} +1 -1
  68. zenml/zen_server/dashboard/assets/{page-Du6bFZTS.js → page-Bs6NTqHo.js} +1 -1
  69. zenml/zen_server/dashboard/assets/{page-B4QBxV0B.js → page-Bsiqb0ZN.js} +1 -1
  70. zenml/zen_server/dashboard/assets/{page-AOVMuHDc.js → page-C09_xoEs.js} +1 -1
  71. zenml/zen_server/dashboard/assets/{page-O5xnz_nW.js → page-CI0U7nE4.js} +1 -1
  72. zenml/zen_server/dashboard/assets/{page-C9IsnFid.js → page-CId8DuKX.js} +1 -1
  73. zenml/zen_server/dashboard/assets/{page-CzDjN1wE.js → page-CJSSCJ58.js} +1 -1
  74. zenml/zen_server/dashboard/assets/{page-B8ict_cR.js → page-CJXxkmGx.js} +1 -1
  75. zenml/zen_server/dashboard/assets/{page-DgblJuXC.js → page-CS3tgRFg.js} +1 -1
  76. zenml/zen_server/dashboard/assets/page-Cd8VCEYG.js +1 -0
  77. zenml/zen_server/dashboard/assets/{page-DsFXol8x.js → page-CicaAxfg.js} +1 -1
  78. zenml/zen_server/dashboard/assets/page-CkFIY_Cg.js +1 -0
  79. zenml/zen_server/dashboard/assets/{page-BnAMyQZb.js → page-CkX3R4er.js} +1 -1
  80. zenml/zen_server/dashboard/assets/{page-DerIbaqa.js → page-Cu-ZYOrj.js} +1 -1
  81. zenml/zen_server/dashboard/assets/page-CyID6Sp5.js +1 -0
  82. zenml/zen_server/dashboard/assets/{page-DZ5hcS1o.js → page-D0Z9wEBf.js} +1 -1
  83. zenml/zen_server/dashboard/assets/{page-hX7NkNdA.js → page-D83H0IPX.js} +1 -1
  84. zenml/zen_server/dashboard/assets/{page-DgSu4pTE.js → page-DAF5ySum.js} +1 -1
  85. zenml/zen_server/dashboard/assets/{page-ClqRvz_V.js → page-DMiWibIV.js} +1 -1
  86. zenml/zen_server/dashboard/assets/{page-Bi4I23Hs.js → page-DMtUDzEY.js} +1 -1
  87. zenml/zen_server/dashboard/assets/{page-BDre_qCO.js → page-DNLxVFH7.js} +1 -1
  88. zenml/zen_server/dashboard/assets/{page-DLrYW-Dn.js → page-Dfaj9bx6.js} +1 -1
  89. zenml/zen_server/dashboard/assets/{page-DznxxpKA.js → page-DhlhT_XT.js} +1 -1
  90. zenml/zen_server/dashboard/assets/{page-CKPkbOoE.js → page-DqXw1YhM.js} +1 -1
  91. zenml/zen_server/dashboard/assets/{page-E9Mx9_rn.js → page-DtjangP-.js} +1 -1
  92. zenml/zen_server/dashboard/assets/{page-DQncGJeH.js → page-GJ63jkFi.js} +1 -1
  93. zenml/zen_server/dashboard/assets/{page-DSn1Jcvs.js → page-RtFcujP8.js} +1 -1
  94. zenml/zen_server/dashboard/assets/{page-HrebZOAM.js → page-T1JEtrlC.js} +1 -1
  95. zenml/zen_server/dashboard/assets/{page-DQzNmXk3.js → page-cS5O9iLC.js} +1 -1
  96. zenml/zen_server/dashboard/assets/{page-Dpw-xP4q.js → page-s1bm6Xid.js} +1 -1
  97. zenml/zen_server/dashboard/assets/{persist-Dkbp9MFP.js → persist-C98EYq5I.js} +1 -1
  98. zenml/zen_server/dashboard/assets/{persist-B3Hb8HDW.js → persist-FuiGbvJD.js} +1 -1
  99. zenml/zen_server/dashboard/assets/{primary-role-CjkpP9fL.js → primary-role-Bsu7s76U.js} +1 -1
  100. zenml/zen_server/dashboard/assets/{resource-tyes-list-CugyWUAE.js → resource-tyes-list-C7I0VL8e.js} +1 -1
  101. zenml/zen_server/dashboard/assets/{resource-type-tooltip-V-zdiLKz.js → resource-type-tooltip-2vjL6Wh9.js} +1 -1
  102. zenml/zen_server/dashboard/assets/{service-FjqYTmBw.js → service-BPdLzxxT.js} +1 -1
  103. zenml/zen_server/dashboard/assets/{service-connectors-nF4-OXB9.js → service-connectors-BkE8Ol4i.js} +1 -1
  104. zenml/zen_server/dashboard/assets/{sharedSchema-Br1JPr8d.js → sharedSchema-CKFbjwmg.js} +1 -1
  105. zenml/zen_server/dashboard/assets/{stack-detail-query-DnyMCdVE.js → stack-detail-query-JsrqFo3U.js} +1 -1
  106. zenml/zen_server/dashboard/assets/{update-current-user-mutation-B3Dpv3u6.js → update-current-user-mutation-C4CPf7vG.js} +1 -1
  107. zenml/zen_server/dashboard/assets/{update-server-settings-mutation-s7tlHN8s.js → update-server-settings-mutation-BYfIU-xU.js} +1 -1
  108. zenml/zen_server/dashboard/index.html +2 -2
  109. zenml/zen_server/routers/service_accounts_endpoints.py +24 -0
  110. zenml/zen_stores/migrations/versions/0.84.3_release.py +23 -0
  111. zenml/zen_stores/rest_zen_store.py +16 -5
  112. {zenml_nightly-0.84.2.dev20250826.dist-info → zenml_nightly-0.84.3.dev20250828.dist-info}/METADATA +2 -2
  113. {zenml_nightly-0.84.2.dev20250826.dist-info → zenml_nightly-0.84.3.dev20250828.dist-info}/RECORD +116 -115
  114. zenml/zen_server/dashboard/assets/form-C1jJgRy1.js +0 -1
  115. zenml/zen_server/dashboard/assets/page-1DXG7hp8.js +0 -1
  116. zenml/zen_server/dashboard/assets/page-C7Z2sDHE.js +0 -1
  117. zenml/zen_server/dashboard/assets/page-C8t9qLdV.js +0 -1
  118. zenml/zen_server/dashboard/assets/page-CVwTAlzd.js +0 -1
  119. {zenml_nightly-0.84.2.dev20250826.dist-info → zenml_nightly-0.84.3.dev20250828.dist-info}/LICENSE +0 -0
  120. {zenml_nightly-0.84.2.dev20250826.dist-info → zenml_nightly-0.84.3.dev20250828.dist-info}/WHEEL +0 -0
  121. {zenml_nightly-0.84.2.dev20250826.dist-info → zenml_nightly-0.84.3.dev20250828.dist-info}/entry_points.txt +0 -0
@@ -1,4 +1,4 @@
1
- import{r as p,j as e,c as rs,g as Js}from"./@radix-B1sy0Lhr.js";import{a as tt,R as he,U as me,V as pe,c as Ys,W as fe,m as bt,I as wt,k as vt,B as z,S as Xs,x as Ae,F as ge,_ as st,G as be,H as je,d as T,C as Ke,o as Ge,p as We,q as Qe,T as xe,a3 as er,X as ve,Z as rt,a4 as tr,r as Re,a2 as Nt,a5 as ct,a6 as ze,a7 as kt,a8 as ns,a9 as sr,s as as,aa as rr,A as nr,f as ar,b as St,w as Ve,ab as _t,ac as Et,ad as de,ae as ue,v as pt,af as ir,ag as or,ah as lr,ai as qt,aj as cr,ak as dr,al as ur,am as is,an as os,ao as ls,ap as cs,aq as ds,ar as us,as as hs,at as ms,au as ps,h as hr,j as mr,av as pr,L as dt,M as Lt,O as Tt,aw as ut,$ as fr,a0 as xr,ax as gr,J as fs,ay as jr,N as yr,az as Cr,aA as br,aB as wr,aC as vr,aD as Nr,aE as kr,a1 as Sr,z as Bt,E as _r,aF as Er,aG as Lr}from"./index-CO6UN3UX.js";import{g as xs,a as gs,b as Tr}from"./code-snippets-CqONne41.js";import{S as Or,a as Rr,C as Ar}from"./ComponentIcon-C9AY8usJ.js";import{S as Pr,a as ht}from"./dataflow-2-BLkaTH0Q.js";import{H as Ut,P as Zt,u as js,B as Ir,a as Dr,b as Mr,c as zr,d as Fr}from"./@reactflow-gbyyU3kq.js";import{S as $r}from"./plus-DOrkJCmy.js";import{S as ys}from"./refresh-C8BXS3Fb.js";import{S as mt}from"./arrow-left-BFB2mgJo.js";import{a as Vr,S as Hr}from"./SearchField-Byv1PtST.js";import{d as qr}from"./index-g7wOyc86.js";import{S as Br}from"./code-browser-CzWvJ4S6.js";import{S as Cs,a as Ot,M as Ur}from"./index-B4ZeIaPd.js";import{S as He}from"./info-CI2szPUG.js";import{S as nt}from"./logs-lNLbZqHL.js";import{S as bs}from"./SheetHeader-Bb3v9rha.js";import{C as _e}from"./CodeSnippet-B7Wd4R8u.js";import{C as Fe,a as Zr}from"./CollapsibleCard-DSZzbjx5.js";import{b as Ee,c as Rt,h as at,q as Kr}from"./@tanstack-Dwlisomv.js";import{E as Pe}from"./Error-Cakgjexo.js";import{S as Ie}from"./chevron-down-Bl7WwQAL.js";import{K as B,N as ye,a as ke,V as Se,b as Gr}from"./NestedCollapsible-0yviIfaA.js";import{a as le,L as qe,c as At,f as ws}from"./@react-router-CHjLNlgw.js";import{S as Pt}from"./pipeline-CDJSAXrb.js";import{c as vs,s as Wr}from"./dates-Buh6SMo7.js";import{D as et}from"./DisplayDate-57lUNS79.js";import{S as Qr,I as ft}from"./Infobox-DnduZjNU.js";import{a as xt,E as $e,b as Ns,c as Jr,S as Kt,g as Yr}from"./ExecutionStatus-CQbWovhV.js";import{E as Ce}from"./EmptyState-BMA34iVR.js";import{S as Xr}from"./expand-full-C8p_0jQv.js";import{C as en}from"./ComponentBadge-MVT08kBV.js";import{u as ks}from"./stack-detail-query-DnyMCdVE.js";import{E as Ss}from"./react-error-boundary.esm-DgOYA0wh.js";import{S as tn}from"./terminal-square-C2tAF2XG.js";import{S as _s}from"./check-C9Nye5lR.js";import{S as sn}from"./terminal-C2tAF2XG.js";import{S as rn}from"./trash-D9LA4VFD.js";import{D as nn,a as an}from"./DeleteAlertDialog-CzhTVQaC.js";import{u as on}from"./delete-run-XSre8ru-.js";import"./bar-chart-square-check-_m-oYysN.js";import"./layout-GIiNvS10.js";import"./transform-S7omcvTm.js";import"./chevron-right-double-CbMG1dOM.js";import"./check-circle-CG6XAdk-.js";import"./eye-BXcQevds.js";import"./help-CRPfbPTO.js";import"./zod-D48zuELD.js";import"./index.esm-SBF9nn_P.js";const ln=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},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"})),cn=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},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"})),Gt=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},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 Es({artifactType:t,className:s}){switch(t){case"DataAnalysisArtifact":return e.jsx(cn,{className:s});case"DataArtifact":return e.jsx(Rr,{className:s});case"ModelArtifact":return e.jsx(Pr,{className:s});case"SchemaArtifact":return e.jsx(Or,{className:s});case"ServiceArtifact":return e.jsx(Gt,{className:s});case"StatisticsArtifact":return e.jsx(Gt,{className:s});default:return e.jsx(tt,{className:s})}}function gt({children:t}){return e.jsxs(e.Fragment,{children:[e.jsx(Ut,{style:{border:"transparent",top:0,background:"transparent",width:0,height:0},type:"target",position:Zt.Top}),e.jsx("div",{className:"flex w-[300px] items-center justify-center",children:t}),e.jsx(Ut,{isConnectable:!1,type:"source",style:{border:"transparent",bottom:0,background:"transparent",width:0,height:0},position:Zt.Bottom})]})}function Ls({className:t,code:s,type:r,...n}){const[i,a]=p.useState(!1),[o,d]=p.useState(!1);function h(u){navigator.clipboard&&(navigator.clipboard.writeText(u),a(!0),d(!0),setTimeout(()=>{d(!1),a(!1)},2e3))}return e.jsx(he,{children:e.jsxs(me,{open:o,onOpenChange:d,children:[e.jsx(pe,{asChild:!0,children:e.jsx("div",{...n,className:Ys("hidden cursor-pointer items-center justify-center transition-all group-hover:flex",t),onClick:u=>{u.stopPropagation(),h(s)}})}),e.jsx(fe,{className:"w-full max-w-md whitespace-normal transition-opacity",children:i?"Copied!":`Copy code to load ${r}`})]})})}const Ts=p.createContext(null);function dn({children:t}){const[s,r]=p.useState({isOpen:!1,lastContent:null}),n=p.useCallback(d=>{r({isOpen:!0,lastContent:{type:"step",id:d}})},[]),i=p.useCallback(d=>{r({isOpen:!0,lastContent:{type:"artifact",id:d}})},[]),a=p.useCallback(()=>{r(d=>({...d,isOpen:!1}))},[]),o=p.useMemo(()=>({sheetState:s,openStepSheet:n,openArtifactSheet:i,closeSheet:a}),[s,n,i,a]);return e.jsx(Ts.Provider,{value:o,children:t})}function It(){const t=p.useContext(Ts);if(!t)throw new Error("useSheetContext must be used within a SheetProvider");return t}function un({data:t,selected:s}){const{openArtifactSheet:r}=It();function n(a){const o=a.split(".");return o[o.length-1]}function i(){r(t.artifact_id)}return e.jsx(gt,{children:e.jsxs("button",{onClick:i,"data-selected":!!s,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:[e.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5 group-data-[selected=true]:bg-white/20",children:e.jsx(Es,{className:"h-4 w-4 fill-primary-400 group-data-[selected=true]:fill-theme-text-negative",artifactType:t.type})}),e.jsxs("div",{className:"min-w-0 text-left",children:[e.jsx("p",{className:"truncate text-text-sm font-semibold text-theme-text-brand group-data-[selected=true]:text-theme-text-negative",children:t.artifact_name}),e.jsx("p",{className:"truncate text-text-xs text-theme-text-secondary group-data-[selected=true]:text-white/70",children:n(t.data_type)})]}),e.jsxs(Ls,{className:"h-4 w-4 shrink-0 rounded-sm hover:bg-primary-100 active:bg-primary-200",code:xs(t.artifact_id),type:"artifact",children:[e.jsx(bt,{className:"h-3 w-3 fill-primary-400"}),e.jsx("div",{className:"sr-only",children:"Copy code to load artifact"})]})]})})}const hn=p.memo(un),mn=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},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"})),Dt=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},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"}));function pn(){const{getNodes:t,fitView:s,setViewport:r}=js(),[n,i]=p.useState(""),[a,o]=p.useState(null),[d,h]=p.useState([]),u=p.useCallback(x=>{s({nodes:[x],maxZoom:1.2})},[s]);p.useEffect(()=>{if(!n){o(null),h([]);return}const j=t().filter(f=>{var g,v,E,A,_,M;return((v=(g=f.data)==null?void 0:g.step_name)==null?void 0:v.toLowerCase().includes(n.toLowerCase()))||((A=(E=f.data)==null?void 0:E.artifact_name)==null?void 0:A.toLowerCase().includes(n.toLowerCase()))||((M=(_=f.data)==null?void 0:_.node_name)==null?void 0:M.toLowerCase().includes(n.toLowerCase()))}).sort((f,g)=>{const v=f.position.y-g.position.y;return v!==0?v:f.position.x-g.position.x});h(j),o(null)},[n,t,r]);function y(){if(d.length===0)return;const x=(a??-1)+1;x>=d.length?o(0):o(x);const j=d[x>=d.length?0:x];u(j)}function w(){if(d.length===0)return;const x=(a??d.length)-1;x<0?o(d.length-1):o(x);const j=d[x<0?d.length-1:x];u(j)}return{search:n,setSearch:i,currentIndex:a,filteredNodes:d,zoomNext:y,zoomPrevious:w}}function fn(t){p.useEffect(()=>{const s=r=>{(navigator.userAgent.toUpperCase().indexOf("MAC")!==-1?r.metaKey:r.ctrlKey)&&r.key.toLowerCase()==="k"&&(r.preventDefault(),t(a=>!a))};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}})}const Os=p.forwardRef(({debounceMs:t=300,value:s,onChange:r,...n},i)=>{const[a,o]=p.useState(s);p.useEffect(()=>{o(s)},[s]);const d=p.useMemo(()=>qr(u=>{r==null||r(u)},t),[r,t]);p.useEffect(()=>()=>{d.cancel()},[d]);const h=p.useCallback(u=>{const y=u.target.value;o(y),d(y)},[d]);return e.jsx(wt,{...n,ref:i,value:a,onChange:h})});Os.displayName="DebouncedInput";function xn(){const[t,s]=p.useState(!1),r=p.useRef(null);fn(s);const{search:n,setSearch:i,currentIndex:a,filteredNodes:o,zoomNext:d,zoomPrevious:h}=pn();p.useEffect(()=>{if(t&&r.current){const y=setTimeout(()=>{var w;(w=r.current)==null||w.focus()},200);return()=>clearTimeout(y)}},[t]);function u(y){y.preventDefault(),d()}return e.jsxs(vt,{"data-state":t?"open":"closed",className:"flex h-7 w-7 items-center gap-1 overflow-hidden rounded-md border-neutral-300 transition-all duration-200 data-[state=open]:w-[350px]",children:[e.jsx(z,{intent:"secondary",emphasis:"subtle",onClick:()=>s(!t),className:"flex aspect-square h-full items-center justify-center border-none border-transparent bg-theme-surface-primary",children:e.jsx(Vr,{className:"size-4 shrink-0 fill-theme-text-primary"})}),t&&e.jsxs(e.Fragment,{children:[e.jsxs("form",{onSubmit:u,className:"relative",children:[e.jsx(Os,{ref:r,className:"h-5 w-[150px] rounded-sm p-1 pr-5 text-text-xs",placeholder:"Search",value:n,onChange:y=>i(y)}),e.jsxs(z,{type:"button",onClick:()=>i(""),intent:"secondary",emphasis:"subtle",className:"absolute right-0.5 top-1/2 flex aspect-square size-3 -translate-y-1/2 items-center justify-center rounded-sm border-none p-0",children:[e.jsx("span",{className:"sr-only",children:"Clear search"}),e.jsx(Xs,{className:"size-3 shrink-0 fill-theme-text-tertiary group-disabled:fill-theme-text-tertiary/40"})]})]}),e.jsx("p",{className:"whitespace-nowrap text-text-xs text-theme-text-secondary",children:o.length>0?a===null?`${o.length} ${o.length===1?"match":"matches"}`:`${a+1} of ${o.length}`:"No matches"}),e.jsxs("div",{className:"ml-auto flex items-center gap-1 pr-1",children:[e.jsx(z,{disabled:o.length===0,intent:"secondary",size:"sm",className:"group flex aspect-square size-3 items-center justify-center rounded-sm bg-theme-surface-primary",onClick:h,children:e.jsx(mt,{className:"size-3 shrink-0 rotate-90 fill-theme-text-tertiary group-disabled:fill-theme-text-tertiary/40"})}),e.jsx(z,{disabled:o.length===0,intent:"secondary",size:"sm",className:"group flex aspect-square size-3 items-center justify-center rounded-sm bg-theme-surface-primary",onClick:d,children:e.jsx(mt,{className:"size-3 shrink-0 -rotate-90 fill-theme-text-tertiary group-disabled:fill-theme-text-tertiary/40"})})]})]})]})}function gn({refetch:t}){const{fitView:s,zoomIn:r,zoomOut:n}=js();return e.jsxs("div",{"aria-label":"Dag Controls",className:"absolute left-4 top-4 z-10 flex flex-col gap-1",children:[e.jsx(xn,{}),e.jsxs("div",{className:"w-fit divide-y divide-neutral-300 overflow-hidden rounded-md border border-neutral-300 bg-theme-surface-primary",children:[e.jsx("div",{children:e.jsx(z,{onClick:()=>r(),emphasis:"subtle",className:"rounded-sharp border-none p-0.5",intent:"secondary",children:e.jsx($r,{className:"h-5 w-5 fill-theme-text-primary"})})}),e.jsx("div",{children:e.jsx(z,{onClick:()=>n(),emphasis:"subtle",className:"rounded-sharp border-none bg-theme-surface-primary p-0.5",intent:"secondary",children:e.jsx(Dt,{className:"h-5 w-5 fill-theme-text-primary"})})})]}),e.jsx(z,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>s(),emphasis:"subtle",intent:"secondary",children:e.jsx(mn,{className:"h-5 w-5 fill-theme-text-primary"})}),e.jsxs(z,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>{t()},emphasis:"subtle",intent:"secondary",children:[e.jsx("span",{className:"sr-only",children:"Refresh"}),e.jsx(ys,{className:"h-5 w-5 fill-theme-text-primary"})]})]})}const jn=4;function yn(t){var n;const s=p.useMemo(()=>{var i;return((i=t.data)==null?void 0:i.points)??[]},[(n=t.data)==null?void 0:n.points]),r=p.useMemo(()=>s.reduce((i,a,o)=>{if(o===0)return`M ${a.x},${a.y}`;if(o===s.length-1)return`${i} L ${a.x},${a.y}`;{const d=s[o-1],h=s[o+1],u=a.x-d.x,y=a.y-d.y,w=h.x-a.x,x=h.y-a.y,j=Math.sqrt(u*u+y*y),f=Math.sqrt(w*w+x*x),g=Math.min(jn,j/2,f/2),v=a.x-u/j*g,E=a.y-y/j*g,A=a.x+w/f*g,_=a.y+x/f*g;return`${i} L ${v},${E} Q ${a.x},${a.y} ${A},${_}`}},""),[s]);return s.length?e.jsx(Ir,{...t,path:r}):null}const Rs=t=>p.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},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 Cn({stepId:t}){return["steps",t]}async function bn({stepId:t}){const s=ge(je.steps.detail(t)),r=await Ae(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&st(),!r.ok)throw new be({message:`Error while fetching step ${t}`,status:r.status,statusText:r.statusText});return r.json()}function Be(t,s){return Ee({queryKey:Cn(t),queryFn:()=>bn(t),...s})}function wn({stepId:t}){var a;const{data:s,isPending:r,isError:n,error:i}=Be({stepId:t});return n?e.jsx(Pe,{err:i}):r?e.jsx(T,{className:"h-[300px] w-full"}):e.jsx(Fe,{initialOpen:!0,title:"Code",children:e.jsx(_e,{fullWidth:!0,highlightCode:!0,wrap:!0,code:((a=s==null?void 0:s.metadata)==null?void 0:a.source_code)||""})})}const vn=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},p.createElement("path",{d:"M21.6613 9.95778C21.6071 9.9147 21.1007 9.53236 20.0329 9.53236C19.7509 9.53359 19.4695 9.55777 19.1914 9.60469C18.9848 8.18806 17.8136 7.49738 17.761 7.46639L17.4743 7.30103L17.2857 7.57317C17.0495 7.93875 16.8771 8.34175 16.7759 8.76504C16.5847 9.5737 16.7009 10.3332 17.1117 10.9826C16.6157 11.259 15.82 11.3271 15.6589 11.3331H2.48463C2.14053 11.3335 1.8613 11.6116 1.85942 11.9557C1.84406 13.1098 2.03959 14.2571 2.43641 15.341C2.89024 16.5311 3.56541 17.4078 4.44382 17.9443C5.42815 18.5472 7.02735 18.8916 8.84013 18.8916C9.65906 18.8942 10.4765 18.8201 11.2816 18.6703C12.4008 18.4648 13.4778 18.0736 14.4679 17.5129C15.2838 17.0404 16.0181 16.4393 16.6424 15.7328C17.6862 14.5513 18.308 13.2354 18.7704 12.0659C18.8324 12.0659 18.8944 12.0659 18.9547 12.0659C20.0975 12.0659 20.8002 11.6086 21.1877 11.2254C21.4453 10.981 21.6463 10.6833 21.7768 10.3531L21.8586 10.1137L21.6613 9.95778Z",fill:"#0091E2"}),p.createElement("path",{d:"M3.70578 10.9474H5.47119C5.55634 10.9474 5.62533 10.8783 5.62533 10.7932V9.22068C5.62581 9.13554 5.55717 9.06615 5.47206 9.06567C5.47178 9.06567 5.47147 9.06567 5.47119 9.06567H3.70578C3.62063 9.06567 3.55164 9.1347 3.55164 9.21981C3.55164 9.22009 3.55164 9.2204 3.55164 9.22068V10.7932C3.55164 10.8783 3.62063 10.9474 3.70578 10.9474Z",fill:"#0091E2"}),p.createElement("path",{d:"M6.13862 10.9474H7.90403C7.98918 10.9474 8.05817 10.8783 8.05817 10.7932V9.22068C8.05865 9.13554 7.99002 9.06615 7.90487 9.06567C7.90459 9.06567 7.90428 9.06567 7.904 9.06567H6.13859C6.05297 9.06567 5.98358 9.13506 5.98358 9.22068V10.7932C5.98409 10.8785 6.05333 10.9474 6.13862 10.9474Z",fill:"#0091E2"}),p.createElement("path",{d:"M8.60845 10.9474H10.3739C10.459 10.9474 10.528 10.8783 10.528 10.7932V9.22068C10.5285 9.13554 10.4599 9.06615 10.3747 9.06567C10.3744 9.06567 10.3741 9.06567 10.3738 9.06567H8.60843C8.52328 9.06567 8.45428 9.1347 8.45428 9.21981C8.45428 9.22009 8.45428 9.2204 8.45428 9.22068V10.7932C8.45431 10.8783 8.52334 10.9474 8.60845 10.9474Z",fill:"#0091E2"}),p.createElement("path",{d:"M11.049 10.9474H12.8145C12.8997 10.9474 12.969 10.8785 12.9695 10.7932V9.22068C12.9695 9.13506 12.9001 9.06567 12.8145 9.06567H11.049C10.9639 9.06567 10.8949 9.1347 10.8949 9.21981C10.8949 9.22009 10.8949 9.2204 10.8949 9.22068V10.7932C10.8949 10.8783 10.9639 10.9474 11.049 10.9474Z",fill:"#0091E2"}),p.createElement("path",{d:"M6.13859 8.685H7.904C7.98926 8.68452 8.05814 8.61525 8.05814 8.52999V6.95749C8.05814 6.87234 7.98912 6.80334 7.904 6.80334H6.13859C6.05333 6.80334 5.98406 6.8722 5.98358 6.95749V8.52999C5.98406 8.61542 6.05316 8.68452 6.13859 8.685Z",fill:"#0091E2"}),p.createElement("path",{d:"M8.60849 8.685H10.3739C10.4592 8.68452 10.528 8.61525 10.528 8.52999V6.95749C10.528 6.87234 10.459 6.80334 10.3739 6.80334H8.60849C8.52334 6.80334 8.45435 6.87237 8.45435 6.95749V8.52999C8.45435 8.61525 8.52323 8.68452 8.60849 8.685Z",fill:"#0091E2"}),p.createElement("path",{d:"M11.049 8.685H12.8145C12.8999 8.68452 12.969 8.61542 12.9695 8.52999V6.95749C12.969 6.8722 12.8997 6.80334 12.8145 6.80334H11.049C10.9639 6.80334 10.8949 6.87237 10.8949 6.95749V8.52999C10.8949 8.61525 10.9638 8.68452 11.049 8.685Z",fill:"#0091E2"}),p.createElement("path",{d:"M11.049 6.42184H12.8145C12.8997 6.42184 12.969 6.35296 12.9695 6.2677V4.6943C12.969 4.60902 12.8997 4.54016 12.8145 4.54016H11.049C10.9639 4.54016 10.8949 4.60916 10.8949 4.6943V6.26768C10.8949 6.35282 10.9639 6.42184 11.049 6.42184Z",fill:"#0091E2"}),p.createElement("path",{d:"M13.5111 10.9474H15.2765C15.3618 10.9474 15.4311 10.8785 15.4316 10.7932V9.22068C15.4316 9.13506 15.3622 9.06567 15.2765 9.06567H13.5111C13.426 9.06567 13.357 9.1347 13.357 9.21981C13.357 9.22009 13.357 9.2204 13.357 9.22068V10.7932C13.357 10.8783 13.426 10.9474 13.5111 10.9474Z",fill:"#0091E2"})),Nn=t=>p.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},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 As({data:t}){const[s,r]=p.useState(!0);return e.jsxs(Ke,{open:s,onOpenChange:r,children:[e.jsx(Ge,{intent:"primary",className:"flex items-center gap-[10px]",children:e.jsxs(We,{className:"flex w-full items-center gap-[10px]",children:[e.jsx(Ie,{className:` ${s?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Docker Image"]})}),e.jsxs(Qe,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsx(B,{label:"Docker Image",value:e.jsxs("div",{className:"flex justify-between",children:[e.jsxs(xe,{className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(vn,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),er(t.image)]}),e.jsxs("div",{className:"align-center mr-1 flex",children:[e.jsx("a",{className:"cursor-pointer",rel:"noopener noreferrer",target:"_blank",href:`https://${t.image}`,children:e.jsx(Nn,{className:"mr-1 mt-0.5 h-5 w-5 fill-theme-text-tertiary"})}),e.jsx(ve,{copyText:t.image,isVisible:!0,copyTitle:"Copy url"})]})]})}),e.jsx(B,{label:"Contains Code",value:e.jsx(xe,{color:t.contains_code?"green":"grey",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:t.contains_code?"Available":"None"})})]}),t.dockerfile&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Dockerfile"}),e.jsx(_e,{fullWidth:!0,wrap:!0,code:t.dockerfile})]}),t.requirements&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Requirements"}),e.jsx(_e,{fullWidth:!0,wrap:!0,code:t.requirements})]})]})]})}function kn({buildId:t}){return["pipeline-builds",t]}async function Sn({buildId:t},s){const r=ge(je.runs.detail(t)),n=await fetch(r,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...s}});if(!n.ok)throw new be({message:`Error while fetching pipeline build ${t}`,status:n.status,statusText:n.statusText});return n.json()}function Ps(t,s){return Ee({queryKey:kn(t),queryFn:()=>Sn(t),...s})}function _n({runId:t,queryParams:s={}}){return["runs",t,s]}async function En({runId:t,queryParams:s={}}){const r=rt(s),n=ge(je.runs.detail(t))+(r?`?${r}`:""),i=await Ae(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(i.status===404&&st(),!i.ok)throw new be({message:`Error while fetching pipeline run ${t}`,status:i.status,statusText:i.statusText});return i.json()}function oe(t,s){return Ee({queryKey:_n(t),queryFn:()=>En(t),...s})}function Ln({stepId:t}){var x,j,f,g,v,E,A,_,M,V,H,R;const{data:s,isPending:r,isError:n,error:i}=Be({stepId:t}),{runId:a}=le(),{data:o}=oe({runId:a},{throwOnError:!0,enabled:!!a}),{data:d}=Ps({buildId:(j=(x=o==null?void 0:o.body)==null?void 0:x.build)==null?void 0:j.id},{enabled:!!((g=(f=o==null?void 0:o.body)==null?void 0:f.build)!=null&&g.id)}),h=s==null?void 0:s.name,y=(()=>{var c;const l=(c=d==null?void 0:d.metadata)==null?void 0:c.images;if(!l)return null;if(h){for(const m in l)if(m.startsWith(`${h}.`))return m;if(l[h])return h}return l.orchestrator?"orchestrator":null})(),w=y&&((E=(v=d==null?void 0:d.metadata)==null?void 0:v.images)==null?void 0:E[y]);return n?e.jsx(Pe,{err:i}):r?e.jsxs("div",{className:"space-y-5",children:[e.jsx(T,{className:"h-[200]"}),e.jsx(T,{className:"h-[200px]"}),e.jsx(T,{className:"h-[200px]"})]}):e.jsxs("div",{className:"space-y-5",children:[e.jsx(ye,{isInitialOpen:!0,data:(_=(A=s.metadata)==null?void 0:A.config)==null?void 0:_.parameters,title:"Parameters"}),w?e.jsx(As,{data:w}):null,e.jsx(Tn,{id:s.id}),e.jsx(ye,{isInitialOpen:!0,title:"Resources",data:((V=(M=s.metadata)==null?void 0:M.config.settings)==null?void 0:V.resources)||{}}),e.jsx(ye,{isInitialOpen:!0,title:"Substitutions",data:(H=s.metadata)==null?void 0:H.config.substitutions}),e.jsx(ye,{isInitialOpen:!0,title:"Extra",data:(R=s.metadata)==null?void 0:R.config.extra})]})}function Tn({id:t}){return e.jsxs(Fe,{initialOpen:!0,title:"Code",children:[e.jsx("h2",{className:"mb-2 text-text-md text-theme-text-secondary",children:"Get config programmatically"}),e.jsx(_e,{fullWidth:!0,highlightCode:!0,wrap:!0,code:gs(t)})]})}function Mt(t,s){return["initializing","running"].includes(t)&&s==="failed"}const On=t=>p.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},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"})),Rn=t=>p.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},p.createElement("path",{d:"M11.9993 21.4496L15.6838 10.0985H8.32019L11.9993 21.4496Z",fill:"#E24329"}),p.createElement("path",{d:"M3.1594 10.0985L2.03738 13.5471C1.93585 13.8603 2.0455 14.2059 2.31349 14.4011L11.9993 21.4496L3.1594 10.0985Z",fill:"#FCA326"}),p.createElement("path",{d:"M3.15942 10.0985H8.32019L6.09914 3.26231C5.98547 2.91256 5.49006 2.91256 5.3723 3.26231L3.15942 10.0985Z",fill:"#E24329"}),p.createElement("path",{d:"M20.8446 10.0985L21.9626 13.5471C22.0641 13.8603 21.9545 14.2059 21.6865 14.4011L11.9993 21.4496L20.8446 10.0985Z",fill:"#FCA326"}),p.createElement("path",{d:"M20.8446 10.0985H15.6838L17.9008 3.26231C18.0145 2.91256 18.5099 2.91256 18.6276 3.26231L20.8446 10.0985Z",fill:"#E24329"}),p.createElement("path",{d:"M11.9993 21.4496L15.6838 10.0985H20.8446L11.9993 21.4496Z",fill:"#FC6D26"}),p.createElement("path",{d:"M11.9993 21.4496L3.15942 10.0985H8.32019L11.9993 21.4496Z",fill:"#FC6D26"}));function An({repositoryId:t}){return["code_repositories",t]}async function Pn({repositoryId:t}){const s=ge(je.code_repositories.detail(t)),r=await fetch(s,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(r.status===404&&st(),!r.ok)throw new be({message:`Error while fetching code repository ${t}`,status:r.status,statusText:r.statusText});return r.json()}function In(t,s){return Ee({queryKey:An(t),queryFn:()=>Pn(t),...s})}function Is({repositoryId:t,commit:s}){var d;const{data:r,isPending:n,isError:i}=In({repositoryId:t},{enabled:!!t});if(!t||!s)return e.jsx("p",{children:"Not available"});if(n)return e.jsx(T,{className:"h-6"});if(i)return null;const a=(d=r.metadata)==null?void 0:d.config,o=()=>{var w,x,j,f;let h=null,u=r==null?void 0:r.name,y;return((x=(w=r==null?void 0:r.body)==null?void 0:w.source)==null?void 0:x.attribute)==="GitHubCodeRepository"?(h=On,u=`${a==null?void 0:a.owner}/${a==null?void 0:a.repository}`,y=`https://www.${(typeof(a==null?void 0:a.host)=="string"?a.host:"github.com").replace(/\/$/,"")}/${u}`+(s?`/commit/${s}`:"")):((f=(j=r==null?void 0:r.body)==null?void 0:j.source)==null?void 0:f.attribute)==="GitLabCodeRepository"&&(h=Rn,u=`${a==null?void 0:a.group}/${a==null?void 0:a.project}`,y=`https://www.${(typeof(a==null?void 0:a.host)=="string"?a.host:"gitlab.com").replace(/\/$/,"")}/${u}`+(s?`/commit/${s}`:"")),e.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:`flex items-center ${y?"":"pointer-events-none"}`,onClick:g=>g.stopPropagation(),href:y,children:[h&&e.jsx(h,{className:"mr-1 h-5 w-5 fill-theme-text-brand"}),u]})};return e.jsxs("div",{className:"group/copybutton mr-1",children:[e.jsxs(xe,{color:"grey",className:"inline-flex items-center font-semibold text-neutral-900",rounded:!1,emphasis:"subtle",children:[o(),e.jsx("div",{className:"ml-1 rounded-sm bg-neutral-200 px-1 py-0.25",children:tr(s,10)})]}),e.jsx(ve,{copyText:s})]})}function Ds(){return e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(pe,{children:e.jsxs(xe,{color:"yellow",className:"flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(Qr,{className:"h-4 w-4 shrink-0 fill-current"}),"Login Required"]})}),e.jsx(fe,{children:e.jsxs("p",{children:["You must be logged in for this link to work.",e.jsx("br",{}),"Please ensure you're signed in before accessing."]})})]})})}function Dn({stepStatus:t,isStatusUnknown:s}){function r(){return e.jsxs(xe,{color:xt(s?"unknown":t),rounded:!0,emphasis:"subtle",className:"flex w-fit items-center gap-1 capitalize",children:[e.jsx($e,{className:"fill-current",status:s?"unknown":t}),s?"Unknown - Last reported: "+t:t]})}return s?e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(pe,{className:"z-10 cursor-default",children:e.jsx(r,{})}),e.jsxs(fe,{className:"text-center",children:["Last reported as ",e.jsx("b",{children:t})," but current status unknown due to pipeline failure.",e.jsx("br",{}),"Communication may be lost."]})]})}):e.jsx(r,{})}function Mn({stepId:t,runId:s}){var w,x,j,f,g,v,E,A,_,M,V,H,R,l,c,m,C,b,S,W,se,re,P,U,k,J,L,I,N,K;const{data:r,isError:n,isPending:i,error:a}=Be({stepId:t}),{data:o}=oe({runId:s}),d=(j=(x=(w=o==null?void 0:o.body)==null?void 0:w.code_reference)==null?void 0:x.body)==null?void 0:j.code_repository;if(n)return e.jsx(Pe,{err:a});if(i)return e.jsx(T,{className:"h-[300px] w-full"});const h=(g=(f=r.metadata)==null?void 0:f.config)==null?void 0:g.enable_artifact_metadata,u=(E=(v=r.metadata)==null?void 0:v.config)==null?void 0:E.enable_artifact_visualization,y=Mt(((A=r.body)==null?void 0:A.status)??"running",((_=o==null?void 0:o.body)==null?void 0:_.status)??"running");return e.jsx(Fe,{initialOpen:!0,title:"Details",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsx(B,{label:"Id",value:e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[r.id,e.jsx(ve,{copyText:r.id})]})}),e.jsx(B,{label:"Status",value:e.jsx("div",{className:"flex items-center gap-0.5 overflow-x-auto",children:e.jsx(Dn,{stepStatus:((M=r.body)==null?void 0:M.status)??"running",isStatusUnknown:y})})}),o?e.jsxs(e.Fragment,{children:[e.jsx(B,{label:"Pipeline",value:e.jsx(qe,{to:Re.projects.pipelines.namespace(encodeURIComponent((H=(V=o.body)==null?void 0:V.pipeline)==null?void 0:H.name)),children:e.jsxs(xe,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(Pt,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(l=(R=o.body)==null?void 0:R.pipeline)==null?void 0:l.name]})})}),e.jsx(ke,{children:e.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[e.jsx("span",{className:"truncate",children:"Repository/Commit"}),e.jsx(he,{children:e.jsxs(me,{children:[e.jsxs(pe,{className:"cursor-default",children:[e.jsx(He,{className:"h-3 w-3 fill-theme-text-secondary"}),e.jsx("span",{className:"sr-only",children:"Info"})]}),e.jsx(fe,{className:"w-full max-w-md whitespace-normal",children:"Git hash of code repository. Only set if pipeline was run in a clean git repository connected to your ZenML server."})]})})]})}),e.jsx(Se,{className:"h-auto",children:(c=o.body)!=null&&c.code_reference?e.jsx(Is,{repositoryId:d==null?void 0:d.id,commit:(m=o.body.code_reference.body)==null?void 0:m.commit}):"Not available"}),e.jsx(ke,{className:(C=o.metadata)!=null&&C.code_path?"col-span-3":"",children:e.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[e.jsx("span",{children:"Code Path"}),e.jsx(he,{children:e.jsxs(me,{children:[e.jsxs(pe,{className:"cursor-default",children:[e.jsx(He,{className:"h-3 w-3 fill-theme-text-secondary"}),e.jsx("span",{className:"sr-only",children:"Info"})]}),e.jsx(fe,{className:"w-full max-w-md whitespace-normal",children:"Path to where code was uploaded in the artifact store. Only set on a pipeline with a non-local orchestrator and if Repository/Commit is not set"})]})})]})}),e.jsx(Se,{className:(b=o.metadata)!=null&&b.code_path?"col-span-3 h-auto":"",children:(S=o.metadata)!=null&&S.code_path?e.jsx(_e,{code:o.metadata.code_path}):"Not available"})]}):e.jsx(T,{className:"h-6 w-full"}),e.jsx(B,{label:"Cache key",value:e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[(W=r.metadata)==null?void 0:W.cache_key,e.jsx(ve,{copyText:(se=r.metadata)==null?void 0:se.cache_key})]})}),(re=r.resources)!=null&&re.user?e.jsx(B,{label:"Author",value:e.jsx("div",{className:"inline-flex items-center gap-1",children:e.jsx(Nt,{avatarUrl:((P=r.resources.user.body)==null?void 0:P.avatar_url)??void 0,username:r.resources.user.name,isServiceAccount:!!((U=r.resources.user.body)!=null&&U.is_service_account)})})}):"Not available",e.jsx(B,{label:"Start Time",value:(k=r.body)!=null&&k.start_time?e.jsx(et,{dateString:(J=r.body)==null?void 0:J.start_time}):"Not available"}),e.jsx(B,{label:"End Time",value:(L=r.body)!=null&&L.end_time?e.jsx(et,{dateString:(I=r.body)==null?void 0:I.end_time}):"Not available"}),e.jsx(B,{label:"Duration",value:vs(((N=r.body)==null?void 0:N.start_time)||"",((K=r.body)==null?void 0:K.end_time)||"")}),e.jsx(B,{label:"Artifact metadata",value:e.jsx(ct,{size:"sm",color:h?"green":"grey",children:h?"Enable":"Disabled"})}),e.jsx(B,{label:"Artifact visualization",value:e.jsx(ct,{size:"sm",color:u?"green":"grey",children:u?"Enable":"Disabled"})})]})})}function zn({className:t}){var h,u,y,w,x;const{runId:s}=le(),{data:r,isPending:n,isError:i}=oe({runId:s},{throwOnError:!0}),a=(u=(h=r==null?void 0:r.metadata)==null?void 0:h.run_metadata)==null?void 0:u.orchestrator_url,o=(w=(y=r==null?void 0:r.metadata)==null?void 0:y.run_metadata)==null?void 0:w.orchestrator_logs_url,d=(x=r==null?void 0:r.metadata)==null?void 0:x.orchestrator_run_id;return i?e.jsx("p",{children:"Failed to fetch Orchestrator Card"}):n?e.jsx(T,{className:"h-[150px] w-full"}):e.jsx(Fe,{className:t,initialOpen:!0,title:"Orchestrator",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsx(B,{label:"Orchestrator URL",value:a&&ze(a)?e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[e.jsx("a",{className:"truncate underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:a,children:a}),e.jsx(ve,{copyText:a})]}):"Not available"}),e.jsx(B,{label:"Orchestrator Logs",value:o&&ze(o)?e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ds,{}),e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[e.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:o,children:o}),e.jsx(ve,{copyText:o})]})]}):"Not available"}),e.jsx(B,{label:"Orchestrator Run ID",value:d?e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[d,e.jsx(ve,{copyText:d})]}):"Not available"})]})})}function it({title:t,subtitle:s}){return e.jsx(Ce,{icon:e.jsx(nt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mb-2 text-display-xs font-semibold",children:t}),e.jsx("p",{className:"text-lg text-theme-text-secondary",children:s})]})})}const Fn=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},p.createElement("path",{d:"M4 14H10M10 14V20M10 14L3 21M20 10H14M14 10V4M14 10L21 3",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),$n=t=>{switch(t){case"INFO":return"bg-blue-500";case"ERROR":return"bg-error-500";case"WARN":return"bg-warning-500";case"DEBUG":return"bg-neutral-400";case"CRITICAL":return"bg-error-700";default:return"bg-neutral-400"}},Vn=t=>new Date(t).toISOString().replace("T"," ").slice(0,19);function Hn({entry:t,searchTerm:s,isCurrentMatch:r,textWrapEnabled:n,highlightedMessage:i}){const{timestamp:a,level:o,message:d,originalEntry:h}=t,u=a?Vn(a):"",y=$n(o),w=x=>{if(!s)return x;const j=new RegExp(`(${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");return x.split(j).map((g,v)=>g.toLowerCase()===s.toLowerCase()?e.jsx("span",{className:`${r?"bg-warning-200 text-warning-900":"bg-warning-100 text-warning-800"} inline-block rounded-sm px-1`,children:g},v):g)};return e.jsxs("div",{className:"group/copybutton flex w-full items-start space-x-3 border-b border-theme-border-minimal px-4 py-1 font-mono text-text-sm transition-colors hover:bg-theme-surface-secondary",children:[e.jsxs("div",{className:"flex max-h-6 w-8 flex-shrink-0 items-center",children:[e.jsx("div",{className:`h-4 w-[2px] rounded-sm ${y} mr-2`}),e.jsx("span",{className:"text-xs font-medium text-theme-text-tertiary",children:o})]}),e.jsx("div",{className:"w-[178px] flex-shrink-0 text-theme-text-secondary",children:u}),e.jsx("div",{className:`flex-1 text-theme-text-primary ${n?"min-w-0 whitespace-pre-wrap break-words":"whitespace-nowrap"}`,children:i||w(d)}),e.jsx("div",{className:"flex flex-shrink-0 items-center",children:e.jsx(ve,{copyText:h,copyTitle:"Copy log line"})})]})}function Wt({onSearchChange:t,onCopyAll:s,onDownload:r,searchQuery:n="",currentMatchIndex:i=0,totalMatches:a=0,onPreviousMatch:o,onNextMatch:d}){return e.jsx(e.Fragment,{children:e.jsx("div",{className:"bg-theme-surface-secondary",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Hr,{searchParams:{},inMemoryHandler:t,placeholder:"Search logs..."}),n&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-sm text-theme-text-secondary",children:a>0?`${i+1} of ${a}`:"No matches"}),e.jsx(z,{size:"sm",emphasis:"minimal",onClick:o,disabled:a===0,title:"Previous match",children:e.jsx(mt,{className:"h-4 w-4 shrink-0 rotate-90 fill-theme-text-tertiary"})}),e.jsx(z,{size:"sm",emphasis:"minimal",onClick:d,disabled:a===0,title:"Next match",children:e.jsx(mt,{className:"h-4 w-4 shrink-0 -rotate-90 fill-theme-text-tertiary"})})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(z,{size:"md",emphasis:"subtle",intent:"secondary",onClick:s,title:"Copy all displayed logs",className:"bg-theme-surface-primary",children:[e.jsx(bt,{className:"mr-1 h-4 w-4 fill-theme-text-secondary"}),"Copy All"]}),e.jsxs(z,{size:"md",emphasis:"subtle",intent:"secondary",onClick:r,title:"Download logs as file",className:"bg-theme-surface-primary",children:[e.jsx(Cs,{className:"mr-1 h-5 w-5 fill-theme-text-tertiary"}),"Download"]})]})]})})})}function qn(t){const[s,r]=p.useState(""),[n,i]=p.useState(!1),[a,o]=p.useState(0),{filteredLogs:d,matches:h}=p.useMemo(()=>{if(!s.trim())return{filteredLogs:t,matches:[]};const f=n?s:s.toLowerCase(),g=[],v=[];return t.forEach(E=>{const A=n?E.message:E.message.toLowerCase(),_=[];let M=0;for(;M<A.length;){const V=A.indexOf(f,M);if(V===-1)break;_.push(V),M=V+1}_.length>0&&(g.push(E),_.forEach((V,H)=>{v.push({logIndex:g.length-1,matchIndex:H,startIndex:V,endIndex:V+f.length})}))}),{filteredLogs:g,matches:v}},[t,s,n]);p.useMemo(()=>{o(0)},[]);const u=h.length,y=p.useCallback(()=>{u>0&&o(f=>(f+1)%u)},[u]),w=p.useCallback(()=>{u>0&&o(f=>(f-1+u)%u)},[u]),x=p.useCallback(()=>{r(""),o(0)},[]),j=p.useCallback((f,g)=>{if(!s.trim())return f;const v=[];let E=0;return h.filter(_=>_.logIndex===g).forEach((_,M)=>{_.startIndex>E&&v.push(f.slice(E,_.startIndex));const H=h.findIndex(R=>R.logIndex===_.logIndex&&R.matchIndex===_.matchIndex)===a?"bg-warning-200 text-warning-900":"bg-warning-100 text-warning-800";v.push(rs.createElement("span",{key:`match-${g}-${M}`,className:`${H} inline-block rounded-sm px-1`},f.slice(_.startIndex,_.endIndex))),E=_.endIndex}),E<f.length&&v.push(f.slice(E)),v.length>0?v:f},[s,h,a]);return{searchQuery:s,setSearchQuery:r,caseSensitive:n,setCaseSensitive:i,filteredLogs:d,matches:h,currentMatchIndex:a,totalMatches:u,goToNextMatch:y,goToPreviousMatch:w,clearSearch:x,highlightText:j}}const Bn=100;function Ms({logs:t,itemsPerPage:s=Bn}){const[r,n]=p.useState(1),[i,a]=p.useState(!0),{searchQuery:o,setSearchQuery:d,filteredLogs:h,currentMatchIndex:u,totalMatches:y,goToNextMatch:w,goToPreviousMatch:x,highlightText:j}=qn(t),f=h;rs.useEffect(()=>{n(1)},[o]);const g=Math.ceil(f.length/s),v=(r-1)*s,E=v+s,A=f.slice(v,E),_=()=>{n(m=>Math.max(m-1,1))},M=()=>{n(m=>Math.min(m+1,g))},V=()=>{n(1)},H=()=>{n(g)},R=()=>{const m=Qt(f);navigator.clipboard.writeText(m).catch(C=>{console.error("Failed to copy logs:",C)})},l=()=>{const m=Qt(f),C=new Blob([m],{type:"text/plain"}),b=URL.createObjectURL(C),S=document.createElement("a");S.href=b,S.download=`logs-${new Date().toISOString().split("T")[0]}.txt`,document.body.appendChild(S),S.click(),document.body.removeChild(S),URL.revokeObjectURL(b)},c=()=>{a(m=>!m)};return t?e.jsxs("div",{className:"flex h-full flex-col space-y-5",children:[e.jsx(Wt,{onSearchChange:d,onCopyAll:R,onDownload:l,searchQuery:o,currentMatchIndex:u,totalMatches:y,onPreviousMatch:x,onNextMatch:w}),e.jsxs("div",{className:"flex-1 overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"sticky top-0 z-10 bg-theme-surface-tertiary",children:e.jsxs("div",{className:"flex w-full min-w-[600px] space-x-3 bg-theme-surface-tertiary px-4 py-1 font-medium text-theme-text-secondary",children:[e.jsx("div",{className:"flex w-8 flex-shrink-0 items-center",children:e.jsx("span",{className:"text-text-sm font-semibold",children:"Type"})}),e.jsx("div",{className:"w-[178px] flex-shrink-0",children:e.jsx("span",{className:"text-text-sm font-semibold",children:"Time"})}),e.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-between",children:e.jsx("span",{className:"text-text-sm font-semibold",children:"Event"})}),e.jsxs("div",{className:"flex flex-shrink-0 items-center",children:[" ",e.jsx(z,{onClick:c,size:"sm",emphasis:"subtle",intent:"secondary",className:"ml-2 h-5 w-5 rounded-sm bg-theme-surface-primary p-0.25",title:i?"Collapse text":"Expand text",children:i?e.jsx(Fn,{className:"h-4 w-4 shrink-0 text-theme-text-tertiary hover:text-theme-text-secondary"}):e.jsx(Xr,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary hover:fill-theme-text-secondary"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-auto",children:e.jsx("div",{className:i?"min-w-full":"flex w-full min-w-full",children:e.jsx("div",{className:"flex-1 bg-theme-surface-primary",children:A.map((m,C)=>{const b=v+C;return e.jsx(Hn,{entry:m,searchTerm:o,textWrapEnabled:i,highlightedMessage:j(m.message,b)},m.id)})})})}),g>1&&e.jsx("div",{className:"border-t border-theme-border-minimal bg-theme-surface-secondary px-4 py-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-sm text-theme-text-secondary",children:["Showing ",v+1," to"," ",Math.min(v+s,f.length)," of"," ",f.length," logs"]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(z,{className:"bg-theme-surface-primary",size:"md",intent:"secondary",emphasis:"subtle",onClick:V,disabled:r===1,children:"First"}),e.jsx(z,{className:"bg-theme-surface-primary",size:"md",intent:"secondary",emphasis:"subtle",onClick:_,disabled:r===1,children:"Previous"}),e.jsxs("span",{className:"text-sm text-theme-text-secondary",children:["Page ",r," of ",g]}),e.jsx(z,{className:"bg-theme-surface-primary",size:"md",intent:"secondary",emphasis:"subtle",onClick:M,disabled:r===g,children:"Next"}),e.jsx(z,{className:"bg-theme-surface-primary",size:"md",intent:"secondary",emphasis:"subtle",onClick:H,disabled:r===g,children:"Last"})]})]})})]})]}):e.jsxs("div",{className:"flex h-full flex-col space-y-5",children:[e.jsx(Wt,{onSearchChange:d,onCopyAll:R,onDownload:l,searchQuery:o,currentMatchIndex:u,totalMatches:y,onPreviousMatch:x,onNextMatch:w}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx(it,{title:"No logs found",subtitle:"No logs available to display."})})]})}function Qt(t){return t.map(s=>s.originalEntry).join(`
1
+ import{r as p,j as e,c as rs,g as Js}from"./@radix-B1sy0Lhr.js";import{a as tt,R as he,U as me,V as pe,c as Ys,W as fe,m as bt,I as wt,k as vt,B as z,S as Xs,x as Ae,F as ge,_ as st,G as be,H as je,d as T,C as Ke,o as Ge,p as We,q as Qe,T as xe,a3 as er,X as ve,Z as rt,a4 as tr,r as Re,a2 as Nt,a5 as ct,a6 as ze,a7 as kt,a8 as ns,a9 as sr,s as as,aa as rr,A as nr,f as ar,b as St,w as Ve,ab as _t,ac as Et,ad as de,ae as ue,v as pt,af as ir,ag as or,ah as lr,ai as qt,aj as cr,ak as dr,al as ur,am as is,an as os,ao as ls,ap as cs,aq as ds,ar as us,as as hs,at as ms,au as ps,h as hr,j as mr,av as pr,L as dt,M as Lt,O as Tt,aw as ut,$ as fr,a0 as xr,ax as gr,J as fs,ay as jr,N as yr,az as Cr,aA as br,aB as wr,aC as vr,aD as Nr,aE as kr,a1 as Sr,z as Bt,E as _r,aF as Er,aG as Lr}from"./index-Ci5z7q6x.js";import{g as xs,a as gs,b as Tr}from"./code-snippets-CqONne41.js";import{S as Or,a as Rr,C as Ar}from"./ComponentIcon-CWDJZO4Q.js";import{S as Pr,a as ht}from"./dataflow-2-BLkaTH0Q.js";import{H as Ut,P as Zt,u as js,B as Ir,a as Dr,b as Mr,c as zr,d as Fr}from"./@reactflow-gbyyU3kq.js";import{S as $r}from"./plus-DOrkJCmy.js";import{S as ys}from"./refresh-C8BXS3Fb.js";import{S as mt}from"./arrow-left-BFB2mgJo.js";import{a as Vr,S as Hr}from"./SearchField-BbwrusMV.js";import{d as qr}from"./index-g7wOyc86.js";import{S as Br}from"./code-browser-CzWvJ4S6.js";import{S as Cs,a as Ot,M as Ur}from"./index-B4ZeIaPd.js";import{S as He}from"./info-CI2szPUG.js";import{S as nt}from"./logs-lNLbZqHL.js";import{S as bs}from"./SheetHeader-xumE4haD.js";import{C as _e}from"./CodeSnippet-D7OZMz7I.js";import{C as Fe,a as Zr}from"./CollapsibleCard-Aqd_AiGn.js";import{b as Ee,c as Rt,h as at,q as Kr}from"./@tanstack-Dwlisomv.js";import{E as Pe}from"./Error-BGej6F2q.js";import{S as Ie}from"./chevron-down-Bl7WwQAL.js";import{K as B,N as ye,a as ke,V as Se,b as Gr}from"./NestedCollapsible-DmryIMwk.js";import{a as le,L as qe,c as At,f as ws}from"./@react-router-CHjLNlgw.js";import{S as Pt}from"./pipeline-CDJSAXrb.js";import{c as vs,s as Wr}from"./dates-Buh6SMo7.js";import{D as et}from"./DisplayDate-57lUNS79.js";import{S as Qr,I as ft}from"./Infobox-CXOIY92f.js";import{a as xt,E as $e,b as Ns,c as Jr,S as Kt,g as Yr}from"./ExecutionStatus-BhDlfndt.js";import{E as Ce}from"./EmptyState-BMA34iVR.js";import{S as Xr}from"./expand-full-C8p_0jQv.js";import{C as en}from"./ComponentBadge-BVRb7wgm.js";import{u as ks}from"./stack-detail-query-JsrqFo3U.js";import{E as Ss}from"./react-error-boundary.esm-DgOYA0wh.js";import{S as tn}from"./terminal-square-C2tAF2XG.js";import{S as _s}from"./check-C9Nye5lR.js";import{S as sn}from"./terminal-C2tAF2XG.js";import{S as rn}from"./trash-D9LA4VFD.js";import{D as nn,a as an}from"./DeleteAlertDialog-C5z9RupH.js";import{u as on}from"./delete-run-MHYb1wuH.js";import"./bar-chart-square-check-_m-oYysN.js";import"./layout-GIiNvS10.js";import"./transform-S7omcvTm.js";import"./chevron-right-double-CbMG1dOM.js";import"./check-circle-CG6XAdk-.js";import"./eye-BXcQevds.js";import"./help-CRPfbPTO.js";import"./zod-D48zuELD.js";import"./index.esm-SBF9nn_P.js";const ln=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},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"})),cn=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},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"})),Gt=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},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 Es({artifactType:t,className:s}){switch(t){case"DataAnalysisArtifact":return e.jsx(cn,{className:s});case"DataArtifact":return e.jsx(Rr,{className:s});case"ModelArtifact":return e.jsx(Pr,{className:s});case"SchemaArtifact":return e.jsx(Or,{className:s});case"ServiceArtifact":return e.jsx(Gt,{className:s});case"StatisticsArtifact":return e.jsx(Gt,{className:s});default:return e.jsx(tt,{className:s})}}function gt({children:t}){return e.jsxs(e.Fragment,{children:[e.jsx(Ut,{style:{border:"transparent",top:0,background:"transparent",width:0,height:0},type:"target",position:Zt.Top}),e.jsx("div",{className:"flex w-[300px] items-center justify-center",children:t}),e.jsx(Ut,{isConnectable:!1,type:"source",style:{border:"transparent",bottom:0,background:"transparent",width:0,height:0},position:Zt.Bottom})]})}function Ls({className:t,code:s,type:r,...n}){const[i,a]=p.useState(!1),[o,d]=p.useState(!1);function h(u){navigator.clipboard&&(navigator.clipboard.writeText(u),a(!0),d(!0),setTimeout(()=>{d(!1),a(!1)},2e3))}return e.jsx(he,{children:e.jsxs(me,{open:o,onOpenChange:d,children:[e.jsx(pe,{asChild:!0,children:e.jsx("div",{...n,className:Ys("hidden cursor-pointer items-center justify-center transition-all group-hover:flex",t),onClick:u=>{u.stopPropagation(),h(s)}})}),e.jsx(fe,{className:"w-full max-w-md whitespace-normal transition-opacity",children:i?"Copied!":`Copy code to load ${r}`})]})})}const Ts=p.createContext(null);function dn({children:t}){const[s,r]=p.useState({isOpen:!1,lastContent:null}),n=p.useCallback(d=>{r({isOpen:!0,lastContent:{type:"step",id:d}})},[]),i=p.useCallback(d=>{r({isOpen:!0,lastContent:{type:"artifact",id:d}})},[]),a=p.useCallback(()=>{r(d=>({...d,isOpen:!1}))},[]),o=p.useMemo(()=>({sheetState:s,openStepSheet:n,openArtifactSheet:i,closeSheet:a}),[s,n,i,a]);return e.jsx(Ts.Provider,{value:o,children:t})}function It(){const t=p.useContext(Ts);if(!t)throw new Error("useSheetContext must be used within a SheetProvider");return t}function un({data:t,selected:s}){const{openArtifactSheet:r}=It();function n(a){const o=a.split(".");return o[o.length-1]}function i(){r(t.artifact_id)}return e.jsx(gt,{children:e.jsxs("button",{onClick:i,"data-selected":!!s,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:[e.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5 group-data-[selected=true]:bg-white/20",children:e.jsx(Es,{className:"h-4 w-4 fill-primary-400 group-data-[selected=true]:fill-theme-text-negative",artifactType:t.type})}),e.jsxs("div",{className:"min-w-0 text-left",children:[e.jsx("p",{className:"truncate text-text-sm font-semibold text-theme-text-brand group-data-[selected=true]:text-theme-text-negative",children:t.artifact_name}),e.jsx("p",{className:"truncate text-text-xs text-theme-text-secondary group-data-[selected=true]:text-white/70",children:n(t.data_type)})]}),e.jsxs(Ls,{className:"h-4 w-4 shrink-0 rounded-sm hover:bg-primary-100 active:bg-primary-200",code:xs(t.artifact_id),type:"artifact",children:[e.jsx(bt,{className:"h-3 w-3 fill-primary-400"}),e.jsx("div",{className:"sr-only",children:"Copy code to load artifact"})]})]})})}const hn=p.memo(un),mn=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},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"})),Dt=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},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"}));function pn(){const{getNodes:t,fitView:s,setViewport:r}=js(),[n,i]=p.useState(""),[a,o]=p.useState(null),[d,h]=p.useState([]),u=p.useCallback(x=>{s({nodes:[x],maxZoom:1.2})},[s]);p.useEffect(()=>{if(!n){o(null),h([]);return}const j=t().filter(f=>{var g,v,E,A,_,M;return((v=(g=f.data)==null?void 0:g.step_name)==null?void 0:v.toLowerCase().includes(n.toLowerCase()))||((A=(E=f.data)==null?void 0:E.artifact_name)==null?void 0:A.toLowerCase().includes(n.toLowerCase()))||((M=(_=f.data)==null?void 0:_.node_name)==null?void 0:M.toLowerCase().includes(n.toLowerCase()))}).sort((f,g)=>{const v=f.position.y-g.position.y;return v!==0?v:f.position.x-g.position.x});h(j),o(null)},[n,t,r]);function y(){if(d.length===0)return;const x=(a??-1)+1;x>=d.length?o(0):o(x);const j=d[x>=d.length?0:x];u(j)}function w(){if(d.length===0)return;const x=(a??d.length)-1;x<0?o(d.length-1):o(x);const j=d[x<0?d.length-1:x];u(j)}return{search:n,setSearch:i,currentIndex:a,filteredNodes:d,zoomNext:y,zoomPrevious:w}}function fn(t){p.useEffect(()=>{const s=r=>{(navigator.userAgent.toUpperCase().indexOf("MAC")!==-1?r.metaKey:r.ctrlKey)&&r.key.toLowerCase()==="k"&&(r.preventDefault(),t(a=>!a))};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}})}const Os=p.forwardRef(({debounceMs:t=300,value:s,onChange:r,...n},i)=>{const[a,o]=p.useState(s);p.useEffect(()=>{o(s)},[s]);const d=p.useMemo(()=>qr(u=>{r==null||r(u)},t),[r,t]);p.useEffect(()=>()=>{d.cancel()},[d]);const h=p.useCallback(u=>{const y=u.target.value;o(y),d(y)},[d]);return e.jsx(wt,{...n,ref:i,value:a,onChange:h})});Os.displayName="DebouncedInput";function xn(){const[t,s]=p.useState(!1),r=p.useRef(null);fn(s);const{search:n,setSearch:i,currentIndex:a,filteredNodes:o,zoomNext:d,zoomPrevious:h}=pn();p.useEffect(()=>{if(t&&r.current){const y=setTimeout(()=>{var w;(w=r.current)==null||w.focus()},200);return()=>clearTimeout(y)}},[t]);function u(y){y.preventDefault(),d()}return e.jsxs(vt,{"data-state":t?"open":"closed",className:"flex h-7 w-7 items-center gap-1 overflow-hidden rounded-md border-neutral-300 transition-all duration-200 data-[state=open]:w-[350px]",children:[e.jsx(z,{intent:"secondary",emphasis:"subtle",onClick:()=>s(!t),className:"flex aspect-square h-full items-center justify-center border-none border-transparent bg-theme-surface-primary",children:e.jsx(Vr,{className:"size-4 shrink-0 fill-theme-text-primary"})}),t&&e.jsxs(e.Fragment,{children:[e.jsxs("form",{onSubmit:u,className:"relative",children:[e.jsx(Os,{ref:r,className:"h-5 w-[150px] rounded-sm p-1 pr-5 text-text-xs",placeholder:"Search",value:n,onChange:y=>i(y)}),e.jsxs(z,{type:"button",onClick:()=>i(""),intent:"secondary",emphasis:"subtle",className:"absolute right-0.5 top-1/2 flex aspect-square size-3 -translate-y-1/2 items-center justify-center rounded-sm border-none p-0",children:[e.jsx("span",{className:"sr-only",children:"Clear search"}),e.jsx(Xs,{className:"size-3 shrink-0 fill-theme-text-tertiary group-disabled:fill-theme-text-tertiary/40"})]})]}),e.jsx("p",{className:"whitespace-nowrap text-text-xs text-theme-text-secondary",children:o.length>0?a===null?`${o.length} ${o.length===1?"match":"matches"}`:`${a+1} of ${o.length}`:"No matches"}),e.jsxs("div",{className:"ml-auto flex items-center gap-1 pr-1",children:[e.jsx(z,{disabled:o.length===0,intent:"secondary",size:"sm",className:"group flex aspect-square size-3 items-center justify-center rounded-sm bg-theme-surface-primary",onClick:h,children:e.jsx(mt,{className:"size-3 shrink-0 rotate-90 fill-theme-text-tertiary group-disabled:fill-theme-text-tertiary/40"})}),e.jsx(z,{disabled:o.length===0,intent:"secondary",size:"sm",className:"group flex aspect-square size-3 items-center justify-center rounded-sm bg-theme-surface-primary",onClick:d,children:e.jsx(mt,{className:"size-3 shrink-0 -rotate-90 fill-theme-text-tertiary group-disabled:fill-theme-text-tertiary/40"})})]})]})]})}function gn({refetch:t}){const{fitView:s,zoomIn:r,zoomOut:n}=js();return e.jsxs("div",{"aria-label":"Dag Controls",className:"absolute left-4 top-4 z-10 flex flex-col gap-1",children:[e.jsx(xn,{}),e.jsxs("div",{className:"w-fit divide-y divide-neutral-300 overflow-hidden rounded-md border border-neutral-300 bg-theme-surface-primary",children:[e.jsx("div",{children:e.jsx(z,{onClick:()=>r(),emphasis:"subtle",className:"rounded-sharp border-none p-0.5",intent:"secondary",children:e.jsx($r,{className:"h-5 w-5 fill-theme-text-primary"})})}),e.jsx("div",{children:e.jsx(z,{onClick:()=>n(),emphasis:"subtle",className:"rounded-sharp border-none bg-theme-surface-primary p-0.5",intent:"secondary",children:e.jsx(Dt,{className:"h-5 w-5 fill-theme-text-primary"})})})]}),e.jsx(z,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>s(),emphasis:"subtle",intent:"secondary",children:e.jsx(mn,{className:"h-5 w-5 fill-theme-text-primary"})}),e.jsxs(z,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>{t()},emphasis:"subtle",intent:"secondary",children:[e.jsx("span",{className:"sr-only",children:"Refresh"}),e.jsx(ys,{className:"h-5 w-5 fill-theme-text-primary"})]})]})}const jn=4;function yn(t){var n;const s=p.useMemo(()=>{var i;return((i=t.data)==null?void 0:i.points)??[]},[(n=t.data)==null?void 0:n.points]),r=p.useMemo(()=>s.reduce((i,a,o)=>{if(o===0)return`M ${a.x},${a.y}`;if(o===s.length-1)return`${i} L ${a.x},${a.y}`;{const d=s[o-1],h=s[o+1],u=a.x-d.x,y=a.y-d.y,w=h.x-a.x,x=h.y-a.y,j=Math.sqrt(u*u+y*y),f=Math.sqrt(w*w+x*x),g=Math.min(jn,j/2,f/2),v=a.x-u/j*g,E=a.y-y/j*g,A=a.x+w/f*g,_=a.y+x/f*g;return`${i} L ${v},${E} Q ${a.x},${a.y} ${A},${_}`}},""),[s]);return s.length?e.jsx(Ir,{...t,path:r}):null}const Rs=t=>p.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},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 Cn({stepId:t}){return["steps",t]}async function bn({stepId:t}){const s=ge(je.steps.detail(t)),r=await Ae(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&st(),!r.ok)throw new be({message:`Error while fetching step ${t}`,status:r.status,statusText:r.statusText});return r.json()}function Be(t,s){return Ee({queryKey:Cn(t),queryFn:()=>bn(t),...s})}function wn({stepId:t}){var a;const{data:s,isPending:r,isError:n,error:i}=Be({stepId:t});return n?e.jsx(Pe,{err:i}):r?e.jsx(T,{className:"h-[300px] w-full"}):e.jsx(Fe,{initialOpen:!0,title:"Code",children:e.jsx(_e,{fullWidth:!0,highlightCode:!0,wrap:!0,code:((a=s==null?void 0:s.metadata)==null?void 0:a.source_code)||""})})}const vn=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},p.createElement("path",{d:"M21.6613 9.95778C21.6071 9.9147 21.1007 9.53236 20.0329 9.53236C19.7509 9.53359 19.4695 9.55777 19.1914 9.60469C18.9848 8.18806 17.8136 7.49738 17.761 7.46639L17.4743 7.30103L17.2857 7.57317C17.0495 7.93875 16.8771 8.34175 16.7759 8.76504C16.5847 9.5737 16.7009 10.3332 17.1117 10.9826C16.6157 11.259 15.82 11.3271 15.6589 11.3331H2.48463C2.14053 11.3335 1.8613 11.6116 1.85942 11.9557C1.84406 13.1098 2.03959 14.2571 2.43641 15.341C2.89024 16.5311 3.56541 17.4078 4.44382 17.9443C5.42815 18.5472 7.02735 18.8916 8.84013 18.8916C9.65906 18.8942 10.4765 18.8201 11.2816 18.6703C12.4008 18.4648 13.4778 18.0736 14.4679 17.5129C15.2838 17.0404 16.0181 16.4393 16.6424 15.7328C17.6862 14.5513 18.308 13.2354 18.7704 12.0659C18.8324 12.0659 18.8944 12.0659 18.9547 12.0659C20.0975 12.0659 20.8002 11.6086 21.1877 11.2254C21.4453 10.981 21.6463 10.6833 21.7768 10.3531L21.8586 10.1137L21.6613 9.95778Z",fill:"#0091E2"}),p.createElement("path",{d:"M3.70578 10.9474H5.47119C5.55634 10.9474 5.62533 10.8783 5.62533 10.7932V9.22068C5.62581 9.13554 5.55717 9.06615 5.47206 9.06567C5.47178 9.06567 5.47147 9.06567 5.47119 9.06567H3.70578C3.62063 9.06567 3.55164 9.1347 3.55164 9.21981C3.55164 9.22009 3.55164 9.2204 3.55164 9.22068V10.7932C3.55164 10.8783 3.62063 10.9474 3.70578 10.9474Z",fill:"#0091E2"}),p.createElement("path",{d:"M6.13862 10.9474H7.90403C7.98918 10.9474 8.05817 10.8783 8.05817 10.7932V9.22068C8.05865 9.13554 7.99002 9.06615 7.90487 9.06567C7.90459 9.06567 7.90428 9.06567 7.904 9.06567H6.13859C6.05297 9.06567 5.98358 9.13506 5.98358 9.22068V10.7932C5.98409 10.8785 6.05333 10.9474 6.13862 10.9474Z",fill:"#0091E2"}),p.createElement("path",{d:"M8.60845 10.9474H10.3739C10.459 10.9474 10.528 10.8783 10.528 10.7932V9.22068C10.5285 9.13554 10.4599 9.06615 10.3747 9.06567C10.3744 9.06567 10.3741 9.06567 10.3738 9.06567H8.60843C8.52328 9.06567 8.45428 9.1347 8.45428 9.21981C8.45428 9.22009 8.45428 9.2204 8.45428 9.22068V10.7932C8.45431 10.8783 8.52334 10.9474 8.60845 10.9474Z",fill:"#0091E2"}),p.createElement("path",{d:"M11.049 10.9474H12.8145C12.8997 10.9474 12.969 10.8785 12.9695 10.7932V9.22068C12.9695 9.13506 12.9001 9.06567 12.8145 9.06567H11.049C10.9639 9.06567 10.8949 9.1347 10.8949 9.21981C10.8949 9.22009 10.8949 9.2204 10.8949 9.22068V10.7932C10.8949 10.8783 10.9639 10.9474 11.049 10.9474Z",fill:"#0091E2"}),p.createElement("path",{d:"M6.13859 8.685H7.904C7.98926 8.68452 8.05814 8.61525 8.05814 8.52999V6.95749C8.05814 6.87234 7.98912 6.80334 7.904 6.80334H6.13859C6.05333 6.80334 5.98406 6.8722 5.98358 6.95749V8.52999C5.98406 8.61542 6.05316 8.68452 6.13859 8.685Z",fill:"#0091E2"}),p.createElement("path",{d:"M8.60849 8.685H10.3739C10.4592 8.68452 10.528 8.61525 10.528 8.52999V6.95749C10.528 6.87234 10.459 6.80334 10.3739 6.80334H8.60849C8.52334 6.80334 8.45435 6.87237 8.45435 6.95749V8.52999C8.45435 8.61525 8.52323 8.68452 8.60849 8.685Z",fill:"#0091E2"}),p.createElement("path",{d:"M11.049 8.685H12.8145C12.8999 8.68452 12.969 8.61542 12.9695 8.52999V6.95749C12.969 6.8722 12.8997 6.80334 12.8145 6.80334H11.049C10.9639 6.80334 10.8949 6.87237 10.8949 6.95749V8.52999C10.8949 8.61525 10.9638 8.68452 11.049 8.685Z",fill:"#0091E2"}),p.createElement("path",{d:"M11.049 6.42184H12.8145C12.8997 6.42184 12.969 6.35296 12.9695 6.2677V4.6943C12.969 4.60902 12.8997 4.54016 12.8145 4.54016H11.049C10.9639 4.54016 10.8949 4.60916 10.8949 4.6943V6.26768C10.8949 6.35282 10.9639 6.42184 11.049 6.42184Z",fill:"#0091E2"}),p.createElement("path",{d:"M13.5111 10.9474H15.2765C15.3618 10.9474 15.4311 10.8785 15.4316 10.7932V9.22068C15.4316 9.13506 15.3622 9.06567 15.2765 9.06567H13.5111C13.426 9.06567 13.357 9.1347 13.357 9.21981C13.357 9.22009 13.357 9.2204 13.357 9.22068V10.7932C13.357 10.8783 13.426 10.9474 13.5111 10.9474Z",fill:"#0091E2"})),Nn=t=>p.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},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 As({data:t}){const[s,r]=p.useState(!0);return e.jsxs(Ke,{open:s,onOpenChange:r,children:[e.jsx(Ge,{intent:"primary",className:"flex items-center gap-[10px]",children:e.jsxs(We,{className:"flex w-full items-center gap-[10px]",children:[e.jsx(Ie,{className:` ${s?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Docker Image"]})}),e.jsxs(Qe,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsx(B,{label:"Docker Image",value:e.jsxs("div",{className:"flex justify-between",children:[e.jsxs(xe,{className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(vn,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),er(t.image)]}),e.jsxs("div",{className:"align-center mr-1 flex",children:[e.jsx("a",{className:"cursor-pointer",rel:"noopener noreferrer",target:"_blank",href:`https://${t.image}`,children:e.jsx(Nn,{className:"mr-1 mt-0.5 h-5 w-5 fill-theme-text-tertiary"})}),e.jsx(ve,{copyText:t.image,isVisible:!0,copyTitle:"Copy url"})]})]})}),e.jsx(B,{label:"Contains Code",value:e.jsx(xe,{color:t.contains_code?"green":"grey",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:t.contains_code?"Available":"None"})})]}),t.dockerfile&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Dockerfile"}),e.jsx(_e,{fullWidth:!0,wrap:!0,code:t.dockerfile})]}),t.requirements&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Requirements"}),e.jsx(_e,{fullWidth:!0,wrap:!0,code:t.requirements})]})]})]})}function kn({buildId:t}){return["pipeline-builds",t]}async function Sn({buildId:t},s){const r=ge(je.runs.detail(t)),n=await fetch(r,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...s}});if(!n.ok)throw new be({message:`Error while fetching pipeline build ${t}`,status:n.status,statusText:n.statusText});return n.json()}function Ps(t,s){return Ee({queryKey:kn(t),queryFn:()=>Sn(t),...s})}function _n({runId:t,queryParams:s={}}){return["runs",t,s]}async function En({runId:t,queryParams:s={}}){const r=rt(s),n=ge(je.runs.detail(t))+(r?`?${r}`:""),i=await Ae(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(i.status===404&&st(),!i.ok)throw new be({message:`Error while fetching pipeline run ${t}`,status:i.status,statusText:i.statusText});return i.json()}function oe(t,s){return Ee({queryKey:_n(t),queryFn:()=>En(t),...s})}function Ln({stepId:t}){var x,j,f,g,v,E,A,_,M,V,H,R;const{data:s,isPending:r,isError:n,error:i}=Be({stepId:t}),{runId:a}=le(),{data:o}=oe({runId:a},{throwOnError:!0,enabled:!!a}),{data:d}=Ps({buildId:(j=(x=o==null?void 0:o.body)==null?void 0:x.build)==null?void 0:j.id},{enabled:!!((g=(f=o==null?void 0:o.body)==null?void 0:f.build)!=null&&g.id)}),h=s==null?void 0:s.name,y=(()=>{var c;const l=(c=d==null?void 0:d.metadata)==null?void 0:c.images;if(!l)return null;if(h){for(const m in l)if(m.startsWith(`${h}.`))return m;if(l[h])return h}return l.orchestrator?"orchestrator":null})(),w=y&&((E=(v=d==null?void 0:d.metadata)==null?void 0:v.images)==null?void 0:E[y]);return n?e.jsx(Pe,{err:i}):r?e.jsxs("div",{className:"space-y-5",children:[e.jsx(T,{className:"h-[200]"}),e.jsx(T,{className:"h-[200px]"}),e.jsx(T,{className:"h-[200px]"})]}):e.jsxs("div",{className:"space-y-5",children:[e.jsx(ye,{isInitialOpen:!0,data:(_=(A=s.metadata)==null?void 0:A.config)==null?void 0:_.parameters,title:"Parameters"}),w?e.jsx(As,{data:w}):null,e.jsx(Tn,{id:s.id}),e.jsx(ye,{isInitialOpen:!0,title:"Resources",data:((V=(M=s.metadata)==null?void 0:M.config.settings)==null?void 0:V.resources)||{}}),e.jsx(ye,{isInitialOpen:!0,title:"Substitutions",data:(H=s.metadata)==null?void 0:H.config.substitutions}),e.jsx(ye,{isInitialOpen:!0,title:"Extra",data:(R=s.metadata)==null?void 0:R.config.extra})]})}function Tn({id:t}){return e.jsxs(Fe,{initialOpen:!0,title:"Code",children:[e.jsx("h2",{className:"mb-2 text-text-md text-theme-text-secondary",children:"Get config programmatically"}),e.jsx(_e,{fullWidth:!0,highlightCode:!0,wrap:!0,code:gs(t)})]})}function Mt(t,s){return["initializing","running"].includes(t)&&s==="failed"}const On=t=>p.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},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"})),Rn=t=>p.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},p.createElement("path",{d:"M11.9993 21.4496L15.6838 10.0985H8.32019L11.9993 21.4496Z",fill:"#E24329"}),p.createElement("path",{d:"M3.1594 10.0985L2.03738 13.5471C1.93585 13.8603 2.0455 14.2059 2.31349 14.4011L11.9993 21.4496L3.1594 10.0985Z",fill:"#FCA326"}),p.createElement("path",{d:"M3.15942 10.0985H8.32019L6.09914 3.26231C5.98547 2.91256 5.49006 2.91256 5.3723 3.26231L3.15942 10.0985Z",fill:"#E24329"}),p.createElement("path",{d:"M20.8446 10.0985L21.9626 13.5471C22.0641 13.8603 21.9545 14.2059 21.6865 14.4011L11.9993 21.4496L20.8446 10.0985Z",fill:"#FCA326"}),p.createElement("path",{d:"M20.8446 10.0985H15.6838L17.9008 3.26231C18.0145 2.91256 18.5099 2.91256 18.6276 3.26231L20.8446 10.0985Z",fill:"#E24329"}),p.createElement("path",{d:"M11.9993 21.4496L15.6838 10.0985H20.8446L11.9993 21.4496Z",fill:"#FC6D26"}),p.createElement("path",{d:"M11.9993 21.4496L3.15942 10.0985H8.32019L11.9993 21.4496Z",fill:"#FC6D26"}));function An({repositoryId:t}){return["code_repositories",t]}async function Pn({repositoryId:t}){const s=ge(je.code_repositories.detail(t)),r=await fetch(s,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(r.status===404&&st(),!r.ok)throw new be({message:`Error while fetching code repository ${t}`,status:r.status,statusText:r.statusText});return r.json()}function In(t,s){return Ee({queryKey:An(t),queryFn:()=>Pn(t),...s})}function Is({repositoryId:t,commit:s}){var d;const{data:r,isPending:n,isError:i}=In({repositoryId:t},{enabled:!!t});if(!t||!s)return e.jsx("p",{children:"Not available"});if(n)return e.jsx(T,{className:"h-6"});if(i)return null;const a=(d=r.metadata)==null?void 0:d.config,o=()=>{var w,x,j,f;let h=null,u=r==null?void 0:r.name,y;return((x=(w=r==null?void 0:r.body)==null?void 0:w.source)==null?void 0:x.attribute)==="GitHubCodeRepository"?(h=On,u=`${a==null?void 0:a.owner}/${a==null?void 0:a.repository}`,y=`https://www.${(typeof(a==null?void 0:a.host)=="string"?a.host:"github.com").replace(/\/$/,"")}/${u}`+(s?`/commit/${s}`:"")):((f=(j=r==null?void 0:r.body)==null?void 0:j.source)==null?void 0:f.attribute)==="GitLabCodeRepository"&&(h=Rn,u=`${a==null?void 0:a.group}/${a==null?void 0:a.project}`,y=`https://www.${(typeof(a==null?void 0:a.host)=="string"?a.host:"gitlab.com").replace(/\/$/,"")}/${u}`+(s?`/commit/${s}`:"")),e.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:`flex items-center ${y?"":"pointer-events-none"}`,onClick:g=>g.stopPropagation(),href:y,children:[h&&e.jsx(h,{className:"mr-1 h-5 w-5 fill-theme-text-brand"}),u]})};return e.jsxs("div",{className:"group/copybutton mr-1",children:[e.jsxs(xe,{color:"grey",className:"inline-flex items-center font-semibold text-neutral-900",rounded:!1,emphasis:"subtle",children:[o(),e.jsx("div",{className:"ml-1 rounded-sm bg-neutral-200 px-1 py-0.25",children:tr(s,10)})]}),e.jsx(ve,{copyText:s})]})}function Ds(){return e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(pe,{children:e.jsxs(xe,{color:"yellow",className:"flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(Qr,{className:"h-4 w-4 shrink-0 fill-current"}),"Login Required"]})}),e.jsx(fe,{children:e.jsxs("p",{children:["You must be logged in for this link to work.",e.jsx("br",{}),"Please ensure you're signed in before accessing."]})})]})})}function Dn({stepStatus:t,isStatusUnknown:s}){function r(){return e.jsxs(xe,{color:xt(s?"unknown":t),rounded:!0,emphasis:"subtle",className:"flex w-fit items-center gap-1 capitalize",children:[e.jsx($e,{className:"fill-current",status:s?"unknown":t}),s?"Unknown - Last reported: "+t:t]})}return s?e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(pe,{className:"z-10 cursor-default",children:e.jsx(r,{})}),e.jsxs(fe,{className:"text-center",children:["Last reported as ",e.jsx("b",{children:t})," but current status unknown due to pipeline failure.",e.jsx("br",{}),"Communication may be lost."]})]})}):e.jsx(r,{})}function Mn({stepId:t,runId:s}){var w,x,j,f,g,v,E,A,_,M,V,H,R,l,c,m,C,b,S,W,se,re,P,U,k,J,L,I,N,K;const{data:r,isError:n,isPending:i,error:a}=Be({stepId:t}),{data:o}=oe({runId:s}),d=(j=(x=(w=o==null?void 0:o.body)==null?void 0:w.code_reference)==null?void 0:x.body)==null?void 0:j.code_repository;if(n)return e.jsx(Pe,{err:a});if(i)return e.jsx(T,{className:"h-[300px] w-full"});const h=(g=(f=r.metadata)==null?void 0:f.config)==null?void 0:g.enable_artifact_metadata,u=(E=(v=r.metadata)==null?void 0:v.config)==null?void 0:E.enable_artifact_visualization,y=Mt(((A=r.body)==null?void 0:A.status)??"running",((_=o==null?void 0:o.body)==null?void 0:_.status)??"running");return e.jsx(Fe,{initialOpen:!0,title:"Details",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsx(B,{label:"Id",value:e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[r.id,e.jsx(ve,{copyText:r.id})]})}),e.jsx(B,{label:"Status",value:e.jsx("div",{className:"flex items-center gap-0.5 overflow-x-auto",children:e.jsx(Dn,{stepStatus:((M=r.body)==null?void 0:M.status)??"running",isStatusUnknown:y})})}),o?e.jsxs(e.Fragment,{children:[e.jsx(B,{label:"Pipeline",value:e.jsx(qe,{to:Re.projects.pipelines.namespace(encodeURIComponent((H=(V=o.body)==null?void 0:V.pipeline)==null?void 0:H.name)),children:e.jsxs(xe,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(Pt,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(l=(R=o.body)==null?void 0:R.pipeline)==null?void 0:l.name]})})}),e.jsx(ke,{children:e.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[e.jsx("span",{className:"truncate",children:"Repository/Commit"}),e.jsx(he,{children:e.jsxs(me,{children:[e.jsxs(pe,{className:"cursor-default",children:[e.jsx(He,{className:"h-3 w-3 fill-theme-text-secondary"}),e.jsx("span",{className:"sr-only",children:"Info"})]}),e.jsx(fe,{className:"w-full max-w-md whitespace-normal",children:"Git hash of code repository. Only set if pipeline was run in a clean git repository connected to your ZenML server."})]})})]})}),e.jsx(Se,{className:"h-auto",children:(c=o.body)!=null&&c.code_reference?e.jsx(Is,{repositoryId:d==null?void 0:d.id,commit:(m=o.body.code_reference.body)==null?void 0:m.commit}):"Not available"}),e.jsx(ke,{className:(C=o.metadata)!=null&&C.code_path?"col-span-3":"",children:e.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[e.jsx("span",{children:"Code Path"}),e.jsx(he,{children:e.jsxs(me,{children:[e.jsxs(pe,{className:"cursor-default",children:[e.jsx(He,{className:"h-3 w-3 fill-theme-text-secondary"}),e.jsx("span",{className:"sr-only",children:"Info"})]}),e.jsx(fe,{className:"w-full max-w-md whitespace-normal",children:"Path to where code was uploaded in the artifact store. Only set on a pipeline with a non-local orchestrator and if Repository/Commit is not set"})]})})]})}),e.jsx(Se,{className:(b=o.metadata)!=null&&b.code_path?"col-span-3 h-auto":"",children:(S=o.metadata)!=null&&S.code_path?e.jsx(_e,{code:o.metadata.code_path}):"Not available"})]}):e.jsx(T,{className:"h-6 w-full"}),e.jsx(B,{label:"Cache key",value:e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[(W=r.metadata)==null?void 0:W.cache_key,e.jsx(ve,{copyText:(se=r.metadata)==null?void 0:se.cache_key})]})}),(re=r.resources)!=null&&re.user?e.jsx(B,{label:"Author",value:e.jsx("div",{className:"inline-flex items-center gap-1",children:e.jsx(Nt,{avatarUrl:((P=r.resources.user.body)==null?void 0:P.avatar_url)??void 0,username:r.resources.user.name,isServiceAccount:!!((U=r.resources.user.body)!=null&&U.is_service_account)})})}):"Not available",e.jsx(B,{label:"Start Time",value:(k=r.body)!=null&&k.start_time?e.jsx(et,{dateString:(J=r.body)==null?void 0:J.start_time}):"Not available"}),e.jsx(B,{label:"End Time",value:(L=r.body)!=null&&L.end_time?e.jsx(et,{dateString:(I=r.body)==null?void 0:I.end_time}):"Not available"}),e.jsx(B,{label:"Duration",value:vs(((N=r.body)==null?void 0:N.start_time)||"",((K=r.body)==null?void 0:K.end_time)||"")}),e.jsx(B,{label:"Artifact metadata",value:e.jsx(ct,{size:"sm",color:h?"green":"grey",children:h?"Enable":"Disabled"})}),e.jsx(B,{label:"Artifact visualization",value:e.jsx(ct,{size:"sm",color:u?"green":"grey",children:u?"Enable":"Disabled"})})]})})}function zn({className:t}){var h,u,y,w,x;const{runId:s}=le(),{data:r,isPending:n,isError:i}=oe({runId:s},{throwOnError:!0}),a=(u=(h=r==null?void 0:r.metadata)==null?void 0:h.run_metadata)==null?void 0:u.orchestrator_url,o=(w=(y=r==null?void 0:r.metadata)==null?void 0:y.run_metadata)==null?void 0:w.orchestrator_logs_url,d=(x=r==null?void 0:r.metadata)==null?void 0:x.orchestrator_run_id;return i?e.jsx("p",{children:"Failed to fetch Orchestrator Card"}):n?e.jsx(T,{className:"h-[150px] w-full"}):e.jsx(Fe,{className:t,initialOpen:!0,title:"Orchestrator",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsx(B,{label:"Orchestrator URL",value:a&&ze(a)?e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[e.jsx("a",{className:"truncate underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:a,children:a}),e.jsx(ve,{copyText:a})]}):"Not available"}),e.jsx(B,{label:"Orchestrator Logs",value:o&&ze(o)?e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ds,{}),e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[e.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:o,children:o}),e.jsx(ve,{copyText:o})]})]}):"Not available"}),e.jsx(B,{label:"Orchestrator Run ID",value:d?e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[d,e.jsx(ve,{copyText:d})]}):"Not available"})]})})}function it({title:t,subtitle:s}){return e.jsx(Ce,{icon:e.jsx(nt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mb-2 text-display-xs font-semibold",children:t}),e.jsx("p",{className:"text-lg text-theme-text-secondary",children:s})]})})}const Fn=t=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},p.createElement("path",{d:"M4 14H10M10 14V20M10 14L3 21M20 10H14M14 10V4M14 10L21 3",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),$n=t=>{switch(t){case"INFO":return"bg-blue-500";case"ERROR":return"bg-error-500";case"WARN":return"bg-warning-500";case"DEBUG":return"bg-neutral-400";case"CRITICAL":return"bg-error-700";default:return"bg-neutral-400"}},Vn=t=>new Date(t).toISOString().replace("T"," ").slice(0,19);function Hn({entry:t,searchTerm:s,isCurrentMatch:r,textWrapEnabled:n,highlightedMessage:i}){const{timestamp:a,level:o,message:d,originalEntry:h}=t,u=a?Vn(a):"",y=$n(o),w=x=>{if(!s)return x;const j=new RegExp(`(${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");return x.split(j).map((g,v)=>g.toLowerCase()===s.toLowerCase()?e.jsx("span",{className:`${r?"bg-warning-200 text-warning-900":"bg-warning-100 text-warning-800"} inline-block rounded-sm px-1`,children:g},v):g)};return e.jsxs("div",{className:"group/copybutton flex w-full items-start space-x-3 border-b border-theme-border-minimal px-4 py-1 font-mono text-text-sm transition-colors hover:bg-theme-surface-secondary",children:[e.jsxs("div",{className:"flex max-h-6 w-8 flex-shrink-0 items-center",children:[e.jsx("div",{className:`h-4 w-[2px] rounded-sm ${y} mr-2`}),e.jsx("span",{className:"text-xs font-medium text-theme-text-tertiary",children:o})]}),e.jsx("div",{className:"w-[178px] flex-shrink-0 text-theme-text-secondary",children:u}),e.jsx("div",{className:`flex-1 text-theme-text-primary ${n?"min-w-0 whitespace-pre-wrap break-words":"whitespace-nowrap"}`,children:i||w(d)}),e.jsx("div",{className:"flex flex-shrink-0 items-center",children:e.jsx(ve,{copyText:h,copyTitle:"Copy log line"})})]})}function Wt({onSearchChange:t,onCopyAll:s,onDownload:r,searchQuery:n="",currentMatchIndex:i=0,totalMatches:a=0,onPreviousMatch:o,onNextMatch:d}){return e.jsx(e.Fragment,{children:e.jsx("div",{className:"bg-theme-surface-secondary",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Hr,{searchParams:{},inMemoryHandler:t,placeholder:"Search logs..."}),n&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-sm text-theme-text-secondary",children:a>0?`${i+1} of ${a}`:"No matches"}),e.jsx(z,{size:"sm",emphasis:"minimal",onClick:o,disabled:a===0,title:"Previous match",children:e.jsx(mt,{className:"h-4 w-4 shrink-0 rotate-90 fill-theme-text-tertiary"})}),e.jsx(z,{size:"sm",emphasis:"minimal",onClick:d,disabled:a===0,title:"Next match",children:e.jsx(mt,{className:"h-4 w-4 shrink-0 -rotate-90 fill-theme-text-tertiary"})})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(z,{size:"md",emphasis:"subtle",intent:"secondary",onClick:s,title:"Copy all displayed logs",className:"bg-theme-surface-primary",children:[e.jsx(bt,{className:"mr-1 h-4 w-4 fill-theme-text-secondary"}),"Copy All"]}),e.jsxs(z,{size:"md",emphasis:"subtle",intent:"secondary",onClick:r,title:"Download logs as file",className:"bg-theme-surface-primary",children:[e.jsx(Cs,{className:"mr-1 h-5 w-5 fill-theme-text-tertiary"}),"Download"]})]})]})})})}function qn(t){const[s,r]=p.useState(""),[n,i]=p.useState(!1),[a,o]=p.useState(0),{filteredLogs:d,matches:h}=p.useMemo(()=>{if(!s.trim())return{filteredLogs:t,matches:[]};const f=n?s:s.toLowerCase(),g=[],v=[];return t.forEach(E=>{const A=n?E.message:E.message.toLowerCase(),_=[];let M=0;for(;M<A.length;){const V=A.indexOf(f,M);if(V===-1)break;_.push(V),M=V+1}_.length>0&&(g.push(E),_.forEach((V,H)=>{v.push({logIndex:g.length-1,matchIndex:H,startIndex:V,endIndex:V+f.length})}))}),{filteredLogs:g,matches:v}},[t,s,n]);p.useMemo(()=>{o(0)},[]);const u=h.length,y=p.useCallback(()=>{u>0&&o(f=>(f+1)%u)},[u]),w=p.useCallback(()=>{u>0&&o(f=>(f-1+u)%u)},[u]),x=p.useCallback(()=>{r(""),o(0)},[]),j=p.useCallback((f,g)=>{if(!s.trim())return f;const v=[];let E=0;return h.filter(_=>_.logIndex===g).forEach((_,M)=>{_.startIndex>E&&v.push(f.slice(E,_.startIndex));const H=h.findIndex(R=>R.logIndex===_.logIndex&&R.matchIndex===_.matchIndex)===a?"bg-warning-200 text-warning-900":"bg-warning-100 text-warning-800";v.push(rs.createElement("span",{key:`match-${g}-${M}`,className:`${H} inline-block rounded-sm px-1`},f.slice(_.startIndex,_.endIndex))),E=_.endIndex}),E<f.length&&v.push(f.slice(E)),v.length>0?v:f},[s,h,a]);return{searchQuery:s,setSearchQuery:r,caseSensitive:n,setCaseSensitive:i,filteredLogs:d,matches:h,currentMatchIndex:a,totalMatches:u,goToNextMatch:y,goToPreviousMatch:w,clearSearch:x,highlightText:j}}const Bn=100;function Ms({logs:t,itemsPerPage:s=Bn}){const[r,n]=p.useState(1),[i,a]=p.useState(!0),{searchQuery:o,setSearchQuery:d,filteredLogs:h,currentMatchIndex:u,totalMatches:y,goToNextMatch:w,goToPreviousMatch:x,highlightText:j}=qn(t),f=h;rs.useEffect(()=>{n(1)},[o]);const g=Math.ceil(f.length/s),v=(r-1)*s,E=v+s,A=f.slice(v,E),_=()=>{n(m=>Math.max(m-1,1))},M=()=>{n(m=>Math.min(m+1,g))},V=()=>{n(1)},H=()=>{n(g)},R=()=>{const m=Qt(f);navigator.clipboard.writeText(m).catch(C=>{console.error("Failed to copy logs:",C)})},l=()=>{const m=Qt(f),C=new Blob([m],{type:"text/plain"}),b=URL.createObjectURL(C),S=document.createElement("a");S.href=b,S.download=`logs-${new Date().toISOString().split("T")[0]}.txt`,document.body.appendChild(S),S.click(),document.body.removeChild(S),URL.revokeObjectURL(b)},c=()=>{a(m=>!m)};return t?e.jsxs("div",{className:"flex h-full flex-col space-y-5",children:[e.jsx(Wt,{onSearchChange:d,onCopyAll:R,onDownload:l,searchQuery:o,currentMatchIndex:u,totalMatches:y,onPreviousMatch:x,onNextMatch:w}),e.jsxs("div",{className:"flex-1 overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"sticky top-0 z-10 bg-theme-surface-tertiary",children:e.jsxs("div",{className:"flex w-full min-w-[600px] space-x-3 bg-theme-surface-tertiary px-4 py-1 font-medium text-theme-text-secondary",children:[e.jsx("div",{className:"flex w-8 flex-shrink-0 items-center",children:e.jsx("span",{className:"text-text-sm font-semibold",children:"Type"})}),e.jsx("div",{className:"w-[178px] flex-shrink-0",children:e.jsx("span",{className:"text-text-sm font-semibold",children:"Time"})}),e.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-between",children:e.jsx("span",{className:"text-text-sm font-semibold",children:"Event"})}),e.jsxs("div",{className:"flex flex-shrink-0 items-center",children:[" ",e.jsx(z,{onClick:c,size:"sm",emphasis:"subtle",intent:"secondary",className:"ml-2 h-5 w-5 rounded-sm bg-theme-surface-primary p-0.25",title:i?"Collapse text":"Expand text",children:i?e.jsx(Fn,{className:"h-4 w-4 shrink-0 text-theme-text-tertiary hover:text-theme-text-secondary"}):e.jsx(Xr,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary hover:fill-theme-text-secondary"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-auto",children:e.jsx("div",{className:i?"min-w-full":"flex w-full min-w-full",children:e.jsx("div",{className:"flex-1 bg-theme-surface-primary",children:A.map((m,C)=>{const b=v+C;return e.jsx(Hn,{entry:m,searchTerm:o,textWrapEnabled:i,highlightedMessage:j(m.message,b)},m.id)})})})}),g>1&&e.jsx("div",{className:"border-t border-theme-border-minimal bg-theme-surface-secondary px-4 py-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-sm text-theme-text-secondary",children:["Showing ",v+1," to"," ",Math.min(v+s,f.length)," of"," ",f.length," logs"]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(z,{className:"bg-theme-surface-primary",size:"md",intent:"secondary",emphasis:"subtle",onClick:V,disabled:r===1,children:"First"}),e.jsx(z,{className:"bg-theme-surface-primary",size:"md",intent:"secondary",emphasis:"subtle",onClick:_,disabled:r===1,children:"Previous"}),e.jsxs("span",{className:"text-sm text-theme-text-secondary",children:["Page ",r," of ",g]}),e.jsx(z,{className:"bg-theme-surface-primary",size:"md",intent:"secondary",emphasis:"subtle",onClick:M,disabled:r===g,children:"Next"}),e.jsx(z,{className:"bg-theme-surface-primary",size:"md",intent:"secondary",emphasis:"subtle",onClick:H,disabled:r===g,children:"Last"})]})]})})]})]}):e.jsxs("div",{className:"flex h-full flex-col space-y-5",children:[e.jsx(Wt,{onSearchChange:d,onCopyAll:R,onDownload:l,searchQuery:o,currentMatchIndex:u,totalMatches:y,onPreviousMatch:x,onNextMatch:w}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx(it,{title:"No logs found",subtitle:"No logs available to display."})})]})}function Qt(t){return t.map(s=>s.originalEntry).join(`
2
2
  `)}function zs(){return e.jsx("section",{className:"flex h-[calc(100vh_-_270px)] items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center justify-center",children:[e.jsxs("div",{className:"relative mb-2 flex items-center justify-center",children:[e.jsx(kt,{className:"h-[120px] w-[120px]"}),e.jsx(Un,{})]}),e.jsx("h2",{className:"my-3 text-center text-display-xs font-semibold",children:"Loading the Logs"}),e.jsxs("p",{className:"text-center text-text-lg text-theme-text-secondary",children:["It can take up to a few minutes. ",e.jsx("br",{})," Please wait while we fetch logs from the artifact store."]})]})})}function Un(){return e.jsx("div",{className:"absolute rounded-rounded bg-primary-25 p-3",children:e.jsx(nt,{className:"h-7 w-7 fill-primary-400"})})}function Zn({stepId:t}){return["logs",t]}async function Kn({stepId:t}){const s=ge(je.steps.logs(t)),r=await Ae(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){const n=await r.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>`Error while fetching logs for step ${t}`);throw new be({status:r.status,statusText:r.statusText,message:n})}return r.json()}function Gn(t,s){return Ee({queryKey:Zn(t),queryFn:()=>Kn(t),...s})}function Fs(t){if(!t||typeof t!="string")return[];const s=t.split(`
3
3
  `).filter(n=>n.trim()!==""),r=[];return s.forEach((n,i)=>{const a=Wn(n,i);a&&a.message.trim()!==""&&r.push(a)}),r}function Wn(t,s){if(!t.trim())return null;const r=[/^\[(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s+UTC\]\s*(.*)$/,/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s*\[(\w+)\]\s*(.*)$/,/^(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}(?:\.\d{3})?)\s+(\w+)\s+(.*)$/,/^(\w+)\s+(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s+(.*)$/,/^\[(\w+)\]\s+(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s+(.*)$/,/^(\w+):\s*(.*)$/,/^\[(\w+)\]\s*(.*)$/];let n=null,i="INFO",a=t;for(const d of r){const h=t.match(d);if(h){if(d.source.includes("UTC")){n=h[1].replace(" ","T")+"Z",i="INFO",a=h[2]||"";break}else d.source.includes("\\d{4}-\\d{2}-\\d{2}")?h[1]&&Jt(h[1])?(n=h[1],i=yt(h[2]),a=h[3]||""):h[2]&&Jt(h[2])&&(i=yt(h[1]),n=h[2],a=h[3]||""):(i=yt(h[1]),a=h[2]||h[1]||"");break}}const o=a.trim();return o?{originalEntry:t,id:`log-${s}-${Date.now()}`,timestamp:n,level:i,message:o}:null}function Jt(t){return/^\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}\s+UTC$/.test(t)||/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(t)||/^\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}/.test(t)?!isNaN(Date.parse(t)):!1}function yt(t){if(!t)return"INFO";const s=t.toUpperCase().trim();switch(s){case"ERROR":case"ERR":return"ERROR";case"WARN":case"WARNING":return"WARN";case"INFO":case"INFORMATION":return"INFO";case"DEBUG":case"DBG":return"DEBUG";case"CRITICAL":case"CRIT":return"CRITICAL";default:return/^[A-Z]{3,8}$/.test(s),"INFO"}}function Qn({stepId:t}){const{data:s,isPending:r,isError:n,error:i}=Gn({stepId:t}),a=p.useMemo(()=>s?Fs(s):[],[s]);return n?e.jsx(Pe,{err:i}):r?e.jsx(zs,{}):a.length===0?e.jsx(it,{title:"This step has no logs",subtitle:"It looks like there are no logs associated with this step"}):e.jsx("div",{className:"space-y-5",children:e.jsx(Ms,{logs:a})})}function zt({metadata:t}){const s=Object.entries(t||{}).filter(([r,n])=>ns(n));return e.jsx(e.Fragment,{children:s.map(([r,n],i)=>e.jsx(ye,{data:n,title:r},i))})}function Ft({metadata:t,title:s}){const r=/^<class\s+'.*'>$/,n=Object.entries(t).filter(([a,o])=>!ns(o));if(n.length===0)return null;n.sort((a,o)=>a[0].localeCompare(o[0]));const i=n.reduce((a,[o,d])=>(a[o]=d,a),{});return e.jsx("div",{children:e.jsx(Fe,{headerClassName:"flex items-center gap-2",headerChildren:e.jsx(Zr,{copyText:JSON.stringify(i)}),initialOpen:!0,title:s||"Uncategorized",children:e.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:n.map(([a,o],d)=>e.jsx(B,{label:e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(pe,{className:"cursor-default truncate",children:a}),e.jsx(fe,{className:"max-w-[480px]",children:a})]})}),value:e.jsx(e.Fragment,{children:ze(o)&&r.test(o)?e.jsx(_e,{className:"py-1",highlightCode:!0,code:o}):ze(o)&&sr(o)?e.jsx("a",{className:"underline transition-all duration-200 hover:decoration-transparent",href:o,target:"_blank",rel:"noopener noreferrer",children:o}):e.jsx("div",{className:"whitespace-normal",children:ze(o)?o:JSON.stringify(o)})})},d))})})})}function Jn({stepId:t}){var a;const{data:s,isPending:r,isError:n,error:i}=Be({stepId:t});return r?e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsx(T,{className:"h-9 w-full"}),e.jsx(T,{className:"h-9 w-full"})]}):n?e.jsx(Pe,{err:i}):!((a=s.metadata)!=null&&a.run_metadata)||Object.keys(s.metadata.run_metadata).length===0?e.jsx(Ce,{icon:e.jsx(tt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available for this step."})]})}):e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsx(Ft,{metadata:s.metadata.run_metadata}),e.jsx(zt,{metadata:s.metadata.run_metadata})]})}function Yn({component:t,objectConfig:s}){var i,a;const r=`${(i=t.body)==null?void 0:i.type}.${(a=t.body)==null?void 0:a.flavor_name}`,n=(s==null?void 0:s[r])??void 0;return!n||Object.keys(n).length===0?e.jsx(qe,{to:Re.components.detail(t.id),children:e.jsx(vt,{className:"flex w-full items-center justify-between gap-3 px-5 py-3 text-left",children:e.jsx(Yt,{component:t})})}):e.jsx(ye,{intent:"primary",contentClassName:"pl-[60px]",className:"w-full",isInitialOpen:!1,title:e.jsx("div",{className:"flex w-full items-center justify-between gap-3 text-left",children:e.jsx(Yt,{component:t})}),data:n,children:e.jsx(z,{asChild:!0,intent:"secondary",emphasis:"subtle",className:"mx-auto flex w-fit justify-center text-text-sm text-theme-text-secondary",children:e.jsx(qe,{to:Re.components.detail(t.id),children:"See Component Details"})})})}function Yt({component:t}){var s,r,n,i;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{width:32,height:32,alt:`${(s=t.body)==null?void 0:s.flavor_name} logo`,src:as(((r=t.body)==null?void 0:r.logo_url)||"")}),e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg",children:t.name}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:t.id.split("-")[0]})]})]}),e.jsx(en,{type:((n=t.body)==null?void 0:n.type)||"orchestrator",children:rr(((i=t.body)==null?void 0:i.type)||"")})]})}function Xn({stack:t}){return e.jsxs(vt,{className:"flex items-center justify-between gap-3 px-5 py-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(nr,{type:"square",size:"md",children:e.jsx(ar,{size:"md",children:t.name[0]})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg",children:t.name}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:t.id.split("-")[0]})]})]}),e.jsxs(xe,{rounded:!1,className:"inline-flex shrink items-center gap-0.5 truncate",color:"turquoise",emphasis:"subtle",children:[e.jsx(St,{className:"h-4 w-4 shrink-0 fill-current"}),e.jsx("div",{className:"truncate",children:"Stack"})]})]})}function $s({stack:t,objectConfig:s}){var r;return e.jsxs("div",{className:"space-y-5",children:[e.jsx(ea,{}),e.jsx(Xn,{stack:t}),e.jsx("ul",{className:"space-y-5",children:Object.values(((r=t.metadata)==null?void 0:r.components)||{}).map(n=>e.jsx("li",{className:"w-full",children:e.jsx(Yn,{component:n[0],objectConfig:s})},n[0].id))})]})}function ea(){return e.jsx(ft,{className:"truncate",children:e.jsx("p",{className:"truncate",children:"Current run-specific stack settings. Click on a component for full default settings."})})}function ta({stepId:t}){var o,d,h,u;const{runId:s}=le(),r=oe({runId:s}),n=Be({stepId:t});if(r.isPending||n.isPending)return e.jsx(T,{className:"h-[250px] w-full"});if(r.isError||n.isError)return e.jsx("p",{children:"Something went wrong fetching the run"});const i=(h=(d=(o=r.data)==null?void 0:o.body)==null?void 0:d.stack)==null?void 0:h.id,a=((u=n.data.metadata)==null?void 0:u.config.settings)||{};return i?e.jsx(sa,{objectConfig:a,stackId:i}):e.jsx(Ce,{icon:e.jsx(Ve,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"No Stack"}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There is no stack associated with this run."})]})})}function sa({stackId:t,objectConfig:s}){const{data:r,isError:n,isPending:i}=ks({stackId:t});return i?e.jsx(T,{className:"h-[250px] w-full"}):n?e.jsx("p",{children:"Failed to fetch Stack"}):e.jsx($s,{stack:r,objectConfig:s})}function ra({stepId:t}){var d,h;const{runId:s}=le(),r=Be({stepId:t}),n=oe({runId:s});if(r.isPending||n.isPending)return e.jsx(T,{className:"h-6 w-[200px]"});if(r.error||n.error)return null;const i=(d=r.data.body)==null?void 0:d.status,a=(h=n.data.body)==null?void 0:h.status,o=Mt(i??"running",a??"running");return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:`rounded-sm p-0.5 ${o?"bg-blue-50":Ns(i)}`,children:e.jsx($e,{status:o?"unknown":i,className:"h-4 w-4 shrink-0"})}),e.jsx("h2",{className:"text-display-xs font-semibold",children:r.data.name}),e.jsx(ct,{size:"sm",className:"capitalize",color:Jr(o?"unknown":i),children:o?`Unknown - Last reported: ${i}`:i||"None"})]})}function na({stepId:t}){const{runId:s}=le();return e.jsxs("div",{children:[e.jsx(bs,{}),e.jsx("div",{className:"flex justify-between border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:e.jsx(ra,{stepId:t})}),e.jsx("div",{className:"p-5",children:e.jsxs(_t,{defaultValue:"overview",children:[e.jsxs(Et,{children:[e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[e.jsx(He,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Overview"})]}),e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"stack",children:[e.jsx(St,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Stack"})]}),e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"code",children:[e.jsx(Br,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Code"})]}),e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"logs",children:[e.jsx(nt,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Logs"})]}),e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"config",children:[e.jsx(Rs,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Configuration"})]}),e.jsxs(de,{className:"flex items-center gap-2 text-text-md",value:"metadata",children:[e.jsx(Ot,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Metadata"})]})]}),e.jsxs(ue,{className:"m-0 mt-5 space-y-5 border-0 bg-transparent p-0",value:"overview",children:[e.jsx(Mn,{runId:s,stepId:t}),e.jsx(zn,{})]}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"stack",children:e.jsx(ta,{stepId:t})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"code",children:e.jsx(wn,{stepId:t})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"logs",children:e.jsx(Qn,{stepId:t})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"config",children:e.jsx(Ln,{stepId:t})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:e.jsx(Jn,{stepId:t})})]})})]})}const Vs=p.createContext(null);function aa({children:t}){const[s,r]=p.useState(new Set),n=a=>s.has(a),i=a=>{r(o=>{const d=new Set(o);return d.add(a),d})};return e.jsx(Vs.Provider,{value:{confirmedVisualizations:s,isVisualizationConfirmed:n,confirmVisualization:i},children:t})}function Hs(){const t=p.useContext(Vs);if(!t)throw new Error("useArtifactLoadConfirmationContext must be used within a VisualizationConfirmProvider");return t}function ia({versionId:t}){return["artifact_versions",t]}async function oa({versionId:t}){const s=ge(je.artifactVersions.detail(t)),r=await Ae(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&st(),!r.ok)throw new be({message:`Error while fetching artifact version ${t}`,status:r.status,statusText:r.statusText});return r.json()}function Je(t,s){return Ee({queryKey:ia(t),queryFn:()=>oa(t),...s})}async function la({artifactVersionId:t}){const s=ge(je.artifactVersions.downloadToken(t)),r=await Ae(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){const n=await r.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>"Error while fetching artifact download token");throw new be({status:r.status,statusText:r.statusText,message:n})}return r.json()}function ca(t){return Rt({...t,mutationFn:async s=>la(s)})}function da({artifactVersionId:t}){const{toast:s}=pt(),r=ge(je.artifactVersions.data(t)),{mutate:n,isPending:i}=ca({onSuccess:o=>{window.open(`${r}?${new URLSearchParams({token:o})}`,"_blank")},onError:o=>{s({status:"error",emphasis:"subtle",rounded:!0,description:o.message})}});function a(){n({artifactVersionId:t})}return e.jsx(z,{onClick:a,disabled:i,type:"button",children:"Download"})}function ua({artifactVersionId:t}){var i,a,o,d,h,u,y,w,x,j,f,g;const s=Je({versionId:t}),r=(a=(i=s.data)==null?void 0:i.resources)==null?void 0:a.producer_pipeline_run_id,n=(d=(o=s.data)==null?void 0:o.resources)==null?void 0:d.producer_step_run_id;return s.isPending?e.jsx(T,{className:"h-[500px] w-full"}):s.isError?e.jsx(Pe,{err:s.error}):e.jsx(Fe,{initialOpen:!0,title:"Details",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[r&&e.jsx(ma,{producerRunId:r}),n&&e.jsx(ha,{producerStepId:n}),e.jsx(B,{label:"Materializer",value:e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(pe,{className:"cursor-default",children:(h=s.data.body)==null?void 0:h.materializer.attribute}),e.jsxs(fe,{align:"start",children:[(u=s.data.body)==null?void 0:u.materializer.module,".",(y=s.data.body)==null?void 0:y.materializer.attribute]})]})})}),e.jsx(B,{label:"Type",value:(w=s.data.body)==null?void 0:w.type}),((x=s.data.resources)==null?void 0:x.user)&&e.jsx(B,{label:"Author",value:e.jsx("div",{className:"inline-flex items-center gap-1",children:e.jsx(Nt,{avatarUrl:((j=s.data.resources.user.body)==null?void 0:j.avatar_url)??void 0,username:s.data.resources.user.name,isServiceAccount:!!((f=s.data.resources.user.body)!=null&&f.is_service_account)})})}),e.jsx(B,{label:"Updated",value:e.jsx(et,{dateString:((g=s.data.body)==null?void 0:g.updated)||""})})]})})}function ha({producerStepId:t}){const s=Be({stepId:t});return s.isPending?e.jsx(B,{label:"Producer Step",value:e.jsx(T,{className:"h-5 w-full"})}):s.isError?null:e.jsx(B,{label:"Producer Step",value:e.jsx(e.Fragment,{children:s.data?e.jsxs(xe,{color:xt("completed"),className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx($e,{className:"mr-1 fill-current",status:"completed"}),s.data.name]}):e.jsx(T,{className:"h-full w-[150px]"})})})}function ma({producerRunId:t}){var r,n,i,a,o;const s=oe({runId:t});return s.isPending?e.jsx(B,{label:e.jsx(T,{className:"h-5 w-full"}),value:e.jsx(T,{className:"h-5 w-full"})}):s.isError?null:e.jsxs(e.Fragment,{children:[e.jsx(B,{label:"Pipeline",value:e.jsx(qe,{to:Re.projects.pipelines.namespace(encodeURIComponent((n=(r=s.data.body)==null?void 0:r.pipeline)==null?void 0:n.name)),children:e.jsxs(xe,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(Pt,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(a=(i=s.data.body)==null?void 0:i.pipeline)==null?void 0:a.name]})})}),e.jsx(B,{label:"Producer Run",value:t?e.jsx(qe,{to:Re.projects.runs.detail(t),children:e.jsxs(xe,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:xt((o=s.data.body)==null?void 0:o.status),children:[e.jsx(tn,{className:"mr-1 h-4 w-4 fill-current"}),t.split("-")[0]]})}):"Not available"})]})}function pa({artifactVersionId:t}){var o,d,h,u;const{data:s,isPending:r,isError:n,error:i}=Je({versionId:t}),a=(o=s==null?void 0:s.body)==null?void 0:o.artifact_store_id;return n?e.jsx(Pe,{err:i}):r?e.jsx(T,{className:"h-[500px] w-full"}):e.jsx(Fe,{initialOpen:!0,title:"Data",children:e.jsxs("dl",{className:"grid w-full grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsxs("dt",{className:"col-span-3 flex items-center justify-between text-theme-text-secondary",children:["Uri",e.jsx(da,{artifactVersionId:t})]}),e.jsx("dd",{className:"col-span-3 w-full truncate text-neutral-700",children:e.jsx("div",{className:"pb-2",children:e.jsx(_e,{fullWidth:!0,code:s.body.uri})})}),a&&e.jsx(B,{label:"Artifact Store",value:e.jsx(xa,{artifactStoreId:a})}),e.jsx(B,{label:"Data Type",value:e.jsx(xe,{className:"flex w-fit items-center text-theme-text-primary",color:"grey",emphasis:"subtle",rounded:!1,children:e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(pe,{className:"cursor-auto",children:(d=s.body)==null?void 0:d.data_type.attribute}),e.jsxs(fe,{children:[(h=s.body)==null?void 0:h.data_type.module,".",(u=s.body)==null?void 0:u.data_type.attribute," "]})]})})})})]})})}function fa({artifactVersionId:t}){return e.jsx(Fe,{initialOpen:!0,title:"Code",children:e.jsx(_e,{fullWidth:!0,highlightCode:!0,wrap:!0,code:xs(t)})})}function xa({artifactStoreId:t}){var o,d;const s=Ee({...ir.componentDetail(t)});if(s.isPending)return e.jsx(T,{className:"h-6 w-12"});if(s.isError)return e.jsx("p",{children:"Error loading artifact store"});const r=s.data,n=Re.components.detail(t),i=((o=r.body)==null?void 0:o.type)||"orchestrator",a=(d=r.body)==null?void 0:d.logo_url;return e.jsx(qe,{to:n,children:e.jsxs(xe,{emphasis:"subtle",rounded:!1,className:"flex w-fit items-center gap-0.5 text-theme-text-primary",color:"grey",children:[a?e.jsx("img",{alt:r.name,width:20,height:20,className:"shrink-0 object-contain",src:a}):e.jsx(Ar,{className:"aspect-square h-4 w-4 fill-primary-400 object-contain",type:i}),r.name]})})}function ga({artifactVersionId:t}){const{data:s,isError:r,error:n}=Je({versionId:t});return r?e.jsx(Pe,{err:n}):e.jsxs("div",{className:"space-y-5",children:[s?e.jsx(ua,{artifactVersionId:s.id}):e.jsx(T,{className:"h-[500px] rounded-md lg:col-span-2"}),s?e.jsx(pa,{artifactVersionId:s.id}):e.jsx(T,{className:"h-[500px] rounded-md lg:col-span-2"}),s?e.jsx(fa,{artifactVersionId:s.id}):e.jsx(T,{className:"h-[500px] rounded-md lg:col-span-2"})]})}function ja({artifactVersionId:t}){var i,a,o;const{data:s,isError:r,error:n}=Je({versionId:t});return r?e.jsx(Pe,{err:n}):!((i=s==null?void 0:s.metadata)!=null&&i.run_metadata)||Object.keys(s.metadata.run_metadata).length===0?e.jsx(Ce,{icon:e.jsx(tt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available for this artifact."})]})}):e.jsxs("div",{className:"flex flex-col gap-5",children:[s?e.jsx(Ft,{metadata:(a=s.metadata)==null?void 0:a.run_metadata}):e.jsx(T,{className:"h-9 w-full"}),s?e.jsx(zt,{metadata:(o=s.metadata)==null?void 0:o.run_metadata}):e.jsx(T,{className:"h-9 w-full"})]})}function qs({versionId:t,params:s}){return["artifact_versions",t,"visualize",s]}async function ya({versionId:t,params:s={}},r){const n=rt(s).toString(),i=ge(je.artifactVersions.visualize(t)+(n?`?${n}`:"")),a=await Ae(i,{method:"GET",headers:{"Content-Type":"application/json"},signal:r});if(!a.ok){const o=await a.json().then(d=>Array.isArray(d.detail)?d.detail[1]:d.detail).catch(()=>`Error while fetching artifact visualization for ${t}`);throw new be({status:a.status,statusText:a.statusText,message:o})}return a.json()}function Bs(t,s){return Ee({queryKey:qs(t),queryFn:({signal:r})=>ya(t,r),...s})}function Ca({content:t}){const s=p.useRef(null),r=()=>{var n;if(s.current){const i=(n=s.current.contentWindow)==null?void 0:n.document.documentElement.scrollHeight;s.current.height=i?`${i}px`:"100%"}};return p.useEffect(()=>(r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}),[]),e.jsx("div",{children:e.jsx("iframe",{className:"w-full",title:"Secure HTML Content",ref:s,srcDoc:t,onLoad:r})})}function ba({content:t}){return e.jsx("div",{className:"flex items-center justify-center",children:e.jsx("img",{src:as("data:image/png;base64,"+t),alt:"Visualization for artifact"})})}function wa({content:t}){const s=va(t);return e.jsx(_e,{fullWidth:!0,highlightCode:!0,code:ze(s)?s:JSON.stringify(s,null,2)})}function va(t){try{return JSON.parse(t)}catch{return t}}const Na={image:"png",html:"html",markdown:"md",csv:"csv",json:"json"},ka={image:"image/png",html:"text/html",markdown:"text/markdown",csv:"text/csv",json:"application/json"};function Us({artifactVersionId:t,visualizationIndex:s,artifactName:r}){const n={index:s},{data:i,isSuccess:a}=Bs({versionId:t,params:n},{retry:!1});if(!a)return null;const{type:o,value:d}=i;function h(){const y=atob(d),w=new Array(y.length);for(let j=0;j<y.length;j++)w[j]=y.charCodeAt(j);return new Uint8Array(w)}function u(){try{const y=new Blob([o==="image"?h():d],{type:ka[o]}),w=window.URL.createObjectURL(y),x=document.createElement("a");x.href=w,x.download=`${r}_${s}.`+Na[o],x.click()}catch(y){console.error(y)}}return e.jsxs(z,{intent:"secondary",emphasis:"subtle",size:"md",className:"flex items-center gap-1 bg-theme-surface-primary",onClick:u,children:[e.jsx(Cs,{width:24,height:24,className:"shrink-0 fill-theme-text-primary"}),"Download"]})}function Sa({content:t}){return e.jsx(Ur,{className:"!prose !max-w-none",children:t})}var lt={exports:{}};/* @license
4
4
  Papa Parse
@@ -1 +1 @@
1
- import{r as c,j as e}from"./@radix-B1sy0Lhr.js";import{u as l,S as x,a as y,b as f}from"./form-schemas-BjWDRvGd.js";import{A as h,a as v,P as j,S as _}from"./primary-role-CjkpP9fL.js";import{v as g,w as C,bg as b,u as U,d as w}from"./index-CO6UN3UX.js";import{u as P}from"./update-current-user-mutation-B3Dpv3u6.js";import{h as A}from"./@tanstack-Dwlisomv.js";import"./check-circle-CG6XAdk-.js";import"./@react-router-CHjLNlgw.js";import"./UpdatePasswordSchemas-DNkYgzN6.js";import"./zod-D48zuELD.js";import"./index.esm-SBF9nn_P.js";import"./bar-chart-square-check-_m-oYysN.js";import"./dataflow-2-BLkaTH0Q.js";import"./credit-card-DfBA6dBb.js";import"./eye-BXcQevds.js";import"./file-text-TdPXNd7s.js";import"./layout-GIiNvS10.js";import"./message-chat-square-C3CRCQvD.js";import"./slash-circle-B0xMh8q6.js";import"./transform-S7omcvTm.js";import"./@reactflow-gbyyU3kq.js";const d=c.createContext(null);function E({children:t,initialUser:s}){const[n,r]=c.useState(s||{});return e.jsx(d.Provider,{value:{user:n,setUser:r},children:t})}function p(){const t=c.useContext(d);if(t===null)throw new Error("useSurveyUserContext must be used within an SurveyUserProvider");return t}function k({user:t}){var o,u;const{setSurveyStep:s}=l(),{setUser:n}=p();function r({fullName:a,getUpdates:m,email:i}){n(S=>({...S,...i?{email:i}:{email:null},full_name:a,email_opted_in:m})),s(2)}return e.jsx(h,{email:(o=t.metadata)==null?void 0:o.email,fullName:(u=t.body)==null?void 0:u.full_name,submitHandler:r})}function D(){const{user:t}=p(),{setSurveyStep:s}=l(),{toast:n}=g(),r=A(),{mutate:o}=P({onSuccess:async()=>{await r.invalidateQueries({queryKey:b()}),s(a=>a+1)},onError:a=>{a instanceof Error&&n({status:"error",emphasis:"subtle",icon:e.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:a.message,rounded:!0})}});function u({biggestChallenge:a,aiTypes:m}){const i={ai_types_working_with:m,biggest_ai_challenges:a,finished_onboarding_survey:!0};o({...t,user_metadata:{...t.user_metadata,...i}})}return e.jsx(v,{submitHandler:u})}function F({user:t}){const{setSurveyStep:s}=l(),{setUser:n}=p();function r({primaryRole:o,otherVal:u}){const m={primary_role:o==="other"?u:o};n(i=>({...i,user_metadata:{...i.user_metadata,...m}})),s(3)}return e.jsx(j,{user:t,submitHandler:r})}function H(){const{data:t,isPending:s,isError:n}=U({throwOnError:!0}),{surveyStep:r}=l();return n?null:s?e.jsx(w,{className:"h-[300px]"}):e.jsx(e.Fragment,{children:e.jsxs(E,{children:[e.jsx(x,{stepAmount:4}),r===1&&e.jsx(k,{user:t}),r===2&&e.jsx(F,{user:t}),r===3&&e.jsx(D,{}),r===4&&e.jsx(_,{}),r===5&&e.jsx(y,{subHeader:"Your ZenML account is now updated",displayBody:!1,username:t.name})]})})}function te(){return e.jsx("div",{children:e.jsx(f,{children:e.jsx(H,{})})})}export{te as default};
1
+ import{r as c,j as e}from"./@radix-B1sy0Lhr.js";import{u as l,S as x,a as y,b as f}from"./form-schemas-CpTCEVoG.js";import{A as h,a as v,P as j,S as _}from"./primary-role-Bsu7s76U.js";import{v as g,w as C,bg as b,u as U,d as w}from"./index-Ci5z7q6x.js";import{u as P}from"./update-current-user-mutation-C4CPf7vG.js";import{h as A}from"./@tanstack-Dwlisomv.js";import"./check-circle-CG6XAdk-.js";import"./@react-router-CHjLNlgw.js";import"./UpdatePasswordSchemas-BP4hg95A.js";import"./zod-D48zuELD.js";import"./index.esm-SBF9nn_P.js";import"./bar-chart-square-check-_m-oYysN.js";import"./dataflow-2-BLkaTH0Q.js";import"./credit-card-DfBA6dBb.js";import"./eye-BXcQevds.js";import"./file-text-TdPXNd7s.js";import"./layout-GIiNvS10.js";import"./message-chat-square-C3CRCQvD.js";import"./slash-circle-B0xMh8q6.js";import"./transform-S7omcvTm.js";import"./@reactflow-gbyyU3kq.js";const d=c.createContext(null);function E({children:t,initialUser:s}){const[n,r]=c.useState(s||{});return e.jsx(d.Provider,{value:{user:n,setUser:r},children:t})}function p(){const t=c.useContext(d);if(t===null)throw new Error("useSurveyUserContext must be used within an SurveyUserProvider");return t}function k({user:t}){var o,u;const{setSurveyStep:s}=l(),{setUser:n}=p();function r({fullName:a,getUpdates:m,email:i}){n(S=>({...S,...i?{email:i}:{email:null},full_name:a,email_opted_in:m})),s(2)}return e.jsx(h,{email:(o=t.metadata)==null?void 0:o.email,fullName:(u=t.body)==null?void 0:u.full_name,submitHandler:r})}function D(){const{user:t}=p(),{setSurveyStep:s}=l(),{toast:n}=g(),r=A(),{mutate:o}=P({onSuccess:async()=>{await r.invalidateQueries({queryKey:b()}),s(a=>a+1)},onError:a=>{a instanceof Error&&n({status:"error",emphasis:"subtle",icon:e.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:a.message,rounded:!0})}});function u({biggestChallenge:a,aiTypes:m}){const i={ai_types_working_with:m,biggest_ai_challenges:a,finished_onboarding_survey:!0};o({...t,user_metadata:{...t.user_metadata,...i}})}return e.jsx(v,{submitHandler:u})}function F({user:t}){const{setSurveyStep:s}=l(),{setUser:n}=p();function r({primaryRole:o,otherVal:u}){const m={primary_role:o==="other"?u:o};n(i=>({...i,user_metadata:{...i.user_metadata,...m}})),s(3)}return e.jsx(j,{user:t,submitHandler:r})}function H(){const{data:t,isPending:s,isError:n}=U({throwOnError:!0}),{surveyStep:r}=l();return n?null:s?e.jsx(w,{className:"h-[300px]"}):e.jsx(e.Fragment,{children:e.jsxs(E,{children:[e.jsx(x,{stepAmount:4}),r===1&&e.jsx(k,{user:t}),r===2&&e.jsx(F,{user:t}),r===3&&e.jsx(D,{}),r===4&&e.jsx(_,{}),r===5&&e.jsx(y,{subHeader:"Your ZenML account is now updated",displayBody:!1,username:t.name})]})})}function te(){return e.jsx("div",{children:e.jsx(f,{children:e.jsx(H,{})})})}export{te as default};
@@ -1 +1 @@
1
- import{r as p,j as e}from"./@radix-B1sy0Lhr.js";import{S as j}from"./chevron-down-Bl7WwQAL.js";import{D as i}from"./DisplayDate-57lUNS79.js";import{aZ as l,d as c,C as h,o as f,p as g,q as y,T as u,a2 as v}from"./index-CO6UN3UX.js";import{K as o,a as b,V as N,N as C}from"./NestedCollapsible-0yviIfaA.js";import{a as d,e as E,R as T,E as w}from"./service-connectors-nF4-OXB9.js";import{R}from"./resource-tyes-list-CugyWUAE.js";import{b as m}from"./@tanstack-Dwlisomv.js";import{a as x}from"./@react-router-CHjLNlgw.js";import"./@reactflow-gbyyU3kq.js";import"./eye-BXcQevds.js";import"./CollapsibleCard-DSZzbjx5.js";import"./check-circle-CG6XAdk-.js";import"./CodeSnippet-B7Wd4R8u.js";function P(){const[a,r]=p.useState(!0),{connectorId:s}=x(),n=m({...l.serviceConnectorDetail(s),throwOnError:!0});if(n.isPending)return e.jsx(c,{className:"h-[300px] w-full"});if(n.isError)return e.jsx("div",{children:"Error"});const t=n.data;return e.jsxs(h,{open:a,onOpenChange:r,children:[e.jsx(f,{className:"flex items-center gap-[10px]",children:e.jsxs(g,{className:"flex w-full items-center gap-[10px] text-text-lg",children:[e.jsx(j,{className:` ${a?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Basic Parameters"]})}),e.jsx(y,{className:"space-y-5 border-t border-theme-border-moderate bg-theme-surface-primary p-5",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:gap-y-4 lg:grid-cols-3",children:[e.jsx(o,{label:"Name",value:t.name}),e.jsx(_,{connector:t}),e.jsx(A,{connector:t}),e.jsx(D,{connector:t}),e.jsx(S,{connector:t}),e.jsx(O,{connector:t}),e.jsx(I,{connector:t}),e.jsx(Q,{connector:t}),e.jsx(K,{connector:t})]})})]})}function _({connector:a}){var s;const r=(s=a.body)==null?void 0:s.connector_type;return!r||typeof r=="string"?null:e.jsx(o,{label:"Type",value:e.jsxs(u,{size:"sm",rounded:!1,emphasis:"minimal",className:"w-fit gap-0.5 text-theme-text-primary",color:"grey",children:[e.jsx("img",{src:r.logo_url??"",className:"h-4 w-4 shrink-0",alt:r.name}),e.jsx("span",{children:r.name})]})})}function A({connector:a}){var s;const r=d(a);return e.jsx(o,{label:"Auth Method",value:r===void 0?null:e.jsx(u,{size:"sm",rounded:!1,emphasis:"minimal",className:"w-fit text-theme-text-primary",color:"grey",children:e.jsx("span",{children:r.name||((s=a.body)==null?void 0:s.auth_method)})})})}function D({connector:a}){const r=E(a);return e.jsxs(e.Fragment,{children:[e.jsx(b,{children:"Resrouce Types"}),e.jsx(N,{className:"h-auto",children:e.jsx(R,{resourceTypes:r})})]})}function S({connector:a}){return e.jsx(o,{label:"Resource Name",value:e.jsx(T,{connector:a})})}function O({connector:a}){var s,n,t;const r=(s=a.resources)==null?void 0:s.user;return e.jsx(o,{label:"Author",value:r?e.jsx(v,{avatarUrl:((n=r.body)==null?void 0:n.avatar_url)??void 0,username:r.name,isServiceAccount:!!((t=r.body)!=null&&t.is_service_account)}):null})}function I({connector:a}){var s;const r=(s=a.body)==null?void 0:s.expires_at;return e.jsx(o,{label:"Expires in",value:r?e.jsx(w,{expires:r}):"Never"})}function Q({connector:a}){var s;const r=(s=a.body)==null?void 0:s.created;return e.jsx(o,{label:"Created",value:r?e.jsx("span",{className:"truncate",children:e.jsx(i,{dateString:r})}):null})}function K({connector:a}){var s;const r=(s=a.body)==null?void 0:s.updated;return e.jsx(o,{label:"Updated",value:r?e.jsx("span",{className:"truncate",children:e.jsx(i,{dateString:r})}):null})}function M(){var t;const{connectorId:a}=x(),r=m({...l.serviceConnectorDetail(a),throwOnError:!0});if(r.isPending)return e.jsx(c,{className:"h-[300px] w-full"});if(r.isError)return e.jsx("div",{children:"Error"});const s=r.data,n=d(s);return e.jsx(C,{schema:n==null?void 0:n.config_schema,title:e.jsx("p",{className:"text-text-xl",children:"Configuration"}),data:(t=s.metadata)==null?void 0:t.configuration,isInitialOpen:!0})}function X(){return e.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[e.jsx("div",{children:e.jsx(P,{})}),e.jsx("div",{className:"space-y-5",children:e.jsx(M,{})})]})}export{X as default};
1
+ import{r as p,j as e}from"./@radix-B1sy0Lhr.js";import{S as j}from"./chevron-down-Bl7WwQAL.js";import{D as i}from"./DisplayDate-57lUNS79.js";import{aZ as l,d as c,C as h,o as f,p as g,q as y,T as u,a2 as v}from"./index-Ci5z7q6x.js";import{K as o,a as b,V as N,N as C}from"./NestedCollapsible-DmryIMwk.js";import{a as d,e as E,R as T,E as w}from"./service-connectors-BkE8Ol4i.js";import{R}from"./resource-tyes-list-C7I0VL8e.js";import{b as m}from"./@tanstack-Dwlisomv.js";import{a as x}from"./@react-router-CHjLNlgw.js";import"./@reactflow-gbyyU3kq.js";import"./eye-BXcQevds.js";import"./CollapsibleCard-Aqd_AiGn.js";import"./check-circle-CG6XAdk-.js";import"./CodeSnippet-D7OZMz7I.js";function P(){const[a,r]=p.useState(!0),{connectorId:s}=x(),n=m({...l.serviceConnectorDetail(s),throwOnError:!0});if(n.isPending)return e.jsx(c,{className:"h-[300px] w-full"});if(n.isError)return e.jsx("div",{children:"Error"});const t=n.data;return e.jsxs(h,{open:a,onOpenChange:r,children:[e.jsx(f,{className:"flex items-center gap-[10px]",children:e.jsxs(g,{className:"flex w-full items-center gap-[10px] text-text-lg",children:[e.jsx(j,{className:` ${a?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Basic Parameters"]})}),e.jsx(y,{className:"space-y-5 border-t border-theme-border-moderate bg-theme-surface-primary p-5",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:gap-y-4 lg:grid-cols-3",children:[e.jsx(o,{label:"Name",value:t.name}),e.jsx(_,{connector:t}),e.jsx(A,{connector:t}),e.jsx(D,{connector:t}),e.jsx(S,{connector:t}),e.jsx(O,{connector:t}),e.jsx(I,{connector:t}),e.jsx(Q,{connector:t}),e.jsx(K,{connector:t})]})})]})}function _({connector:a}){var s;const r=(s=a.body)==null?void 0:s.connector_type;return!r||typeof r=="string"?null:e.jsx(o,{label:"Type",value:e.jsxs(u,{size:"sm",rounded:!1,emphasis:"minimal",className:"w-fit gap-0.5 text-theme-text-primary",color:"grey",children:[e.jsx("img",{src:r.logo_url??"",className:"h-4 w-4 shrink-0",alt:r.name}),e.jsx("span",{children:r.name})]})})}function A({connector:a}){var s;const r=d(a);return e.jsx(o,{label:"Auth Method",value:r===void 0?null:e.jsx(u,{size:"sm",rounded:!1,emphasis:"minimal",className:"w-fit text-theme-text-primary",color:"grey",children:e.jsx("span",{children:r.name||((s=a.body)==null?void 0:s.auth_method)})})})}function D({connector:a}){const r=E(a);return e.jsxs(e.Fragment,{children:[e.jsx(b,{children:"Resrouce Types"}),e.jsx(N,{className:"h-auto",children:e.jsx(R,{resourceTypes:r})})]})}function S({connector:a}){return e.jsx(o,{label:"Resource Name",value:e.jsx(T,{connector:a})})}function O({connector:a}){var s,n,t;const r=(s=a.resources)==null?void 0:s.user;return e.jsx(o,{label:"Author",value:r?e.jsx(v,{avatarUrl:((n=r.body)==null?void 0:n.avatar_url)??void 0,username:r.name,isServiceAccount:!!((t=r.body)!=null&&t.is_service_account)}):null})}function I({connector:a}){var s;const r=(s=a.body)==null?void 0:s.expires_at;return e.jsx(o,{label:"Expires in",value:r?e.jsx(w,{expires:r}):"Never"})}function Q({connector:a}){var s;const r=(s=a.body)==null?void 0:s.created;return e.jsx(o,{label:"Created",value:r?e.jsx("span",{className:"truncate",children:e.jsx(i,{dateString:r})}):null})}function K({connector:a}){var s;const r=(s=a.body)==null?void 0:s.updated;return e.jsx(o,{label:"Updated",value:r?e.jsx("span",{className:"truncate",children:e.jsx(i,{dateString:r})}):null})}function M(){var t;const{connectorId:a}=x(),r=m({...l.serviceConnectorDetail(a),throwOnError:!0});if(r.isPending)return e.jsx(c,{className:"h-[300px] w-full"});if(r.isError)return e.jsx("div",{children:"Error"});const s=r.data,n=d(s);return e.jsx(C,{schema:n==null?void 0:n.config_schema,title:e.jsx("p",{className:"text-text-xl",children:"Configuration"}),data:(t=s.metadata)==null?void 0:t.configuration,isInitialOpen:!0})}function X(){return e.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[e.jsx("div",{children:e.jsx(P,{})}),e.jsx("div",{className:"space-y-5",children:e.jsx(M,{})})]})}export{X as default};
@@ -0,0 +1 @@
1
+ import{j as o}from"./@radix-B1sy0Lhr.js";import{S as r}from"./Tabs-CkY3GwhK.js";import{R as m}from"./RunsBody-BSOSIxRG.js";import{b as i}from"./ButtonGroup-B9_gfcC-.js";import{S as p}from"./StackList-DhsbaNva.js";import{a as s}from"./@react-router-CHjLNlgw.js";import"./index-Ci5z7q6x.js";import"./@tanstack-Dwlisomv.js";import"./@reactflow-gbyyU3kq.js";import"./terminal-C2tAF2XG.js";import"./chevron-down-Bl7WwQAL.js";import"./transform-S7omcvTm.js";import"./DisplayDate-57lUNS79.js";import"./NestedCollapsible-DmryIMwk.js";import"./eye-BXcQevds.js";import"./CollapsibleCard-Aqd_AiGn.js";import"./check-circle-CG6XAdk-.js";import"./CodeSnippet-D7OZMz7I.js";import"./refresh-C8BXS3Fb.js";import"./Pagination-CVYIgR9l.js";import"./chevron-right-double-CbMG1dOM.js";import"./SearchField-BbwrusMV.js";import"./index-g7wOyc86.js";import"./all-pipeline-runs-query-mPYeJsKz.js";import"./ExecutionStatus-BhDlfndt.js";import"./help-CRPfbPTO.js";import"./trash-D9LA4VFD.js";import"./AlertDialogDropdownItem-DuTp8JFP.js";import"./DeleteAlertDialog-C5z9RupH.js";import"./zod-D48zuELD.js";import"./index.esm-SBF9nn_P.js";import"./bulk-delete-Bgf_MsSj.js";import"./delete-run-MHYb1wuH.js";import"./plus-DOrkJCmy.js";import"./index-BYCBKUXk.js";import"./stack-detail-query-JsrqFo3U.js";import"./SheetHeader-xumE4haD.js";import"./components-Br2ezRib.js";import"./NumberBox-7OIA56xe.js";import"./ComponentBadge-BVRb7wgm.js";import"./ComponentIcon-CWDJZO4Q.js";import"./bar-chart-square-check-_m-oYysN.js";import"./layout-GIiNvS10.js";import"./Infobox-CXOIY92f.js";import"./info-CI2szPUG.js";import"./DialogItem-Ce3ugDgT.js";function $(){const{componentId:t}=s();return o.jsx("div",{className:"@container",children:o.jsx(r,{isPanel:!1,stacksTabContent:o.jsx(p,{fixedQueryParams:{component_id:t}}),runsTabContent:o.jsx(i,{children:o.jsx(m,{fixedQueryParams:{stack_component:t}})}),componentId:t})})}export{$ as default};
@@ -1 +1 @@
1
- import{r as c,j as e}from"./@radix-B1sy0Lhr.js";import{c as N,u as R}from"./bulk-delete-wdObjfps.js";import{p as D}from"./index-BYzR7YrM.js";import{F as k,G as A,H as _,J as O,K as E,B as C,L as I,M as F,N as B,O as L,Q as f,r as p,R as z,U as $,V as M,W as H,X as g,T as U,z as d,Y as G,d as j}from"./index-CO6UN3UX.js";import{c as Q,b as q}from"./@tanstack-Dwlisomv.js";import{S as K}from"./refresh-C8BXS3Fb.js";import{P as J}from"./Pagination-C1sE5Nzn.js";import{S as V}from"./SearchField-Byv1PtST.js";import{S as P}from"./trash-D9LA4VFD.js";import{D as S,a as v}from"./DeleteAlertDialog-CzhTVQaC.js";import{S as W}from"./pipeline-CDJSAXrb.js";import{S as X}from"./terminal-C2tAF2XG.js";import{g as Y,E as Z,a as ee}from"./ExecutionStatus-CQbWovhV.js";import{L as m,f as te}from"./@react-router-CHjLNlgw.js";import{A as se}from"./AlertDialogDropdownItem-BpLj419i.js";import"./@reactflow-gbyyU3kq.js";import"./chevron-right-double-CbMG1dOM.js";import"./index-g7wOyc86.js";import"./zod-D48zuELD.js";import"./index.esm-SBF9nn_P.js";import"./check-circle-CG6XAdk-.js";import"./help-CRPfbPTO.js";async function ne({pipelineId:t}){const s=k(_.pipelines.detail(t)),n=await fetch(s,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!n.ok){const a=await n.json().then(r=>r.detail).catch(()=>`Failed to delete pipeline ${t}`);throw new A({status:n.status,statusText:n.statusText,message:a})}return n.json()}function ae(t){return Q({mutationFn:ne,...t})}const{ContextProvider:re,useContext:u}=N();function w(){const{setRowSelection:t}=u(),{mutateAsync:s}=ae();async function n(a){await s({pipelineId:a})}return R({deleteFn:n,queryKeyToInvalidate:D.all,setRowSelection:t})}function ie(){const[t,s]=c.useState(!1),{selectedRowCount:n,selectedRowIDs:a}=u(),{bulkDelete:r}=w();async function i(){await r(a),s(!1)}return e.jsxs(O,{open:t,onOpenChange:s,children:[e.jsx(E,{asChild:!0,children:e.jsxs(C,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(P,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(S,{title:`Delete Pipeline${n>=2?"s":""}`,handleDelete:i,children:e.jsxs(v,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function oe(){const{selectedRowCount:t}=u();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${t} Pipeline${t>1?"s":""} selected`}),e.jsx(ie,{})]})}function le({id:t}){const[s,n]=c.useState(!1),[a,r]=c.useState(!1),i=c.useRef(null),o=c.useRef(null),{bulkDelete:y}=w();async function b(){await y([t]),x(!1)}function T(){o.current=i.current}function x(l){if(l===!1){r(!1),setTimeout(()=>{n(l)},200);return}n(l)}return e.jsxs(I,{onOpenChange:r,open:a,children:[e.jsx(F,{ref:i,children:e.jsx(B,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(L,{hidden:s,onCloseAutoFocus:l=>{o.current&&(o.current.focus(),o.current=null,l.preventDefault())},align:"end",sideOffset:7,children:e.jsx(se,{onSelect:T,open:s,onOpenChange:x,triggerChildren:"Delete",icon:e.jsx(P,{fill:"red"}),children:e.jsx(S,{title:"Delete Pipeline",handleDelete:b,children:e.jsxs(v,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}function ce(){return[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(f,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:s=>t.toggleAllRowsSelected(s==="indeterminate"?!0:s)}),cell:({row:t})=>e.jsx(f,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"name",header:"Pipeline",cell:({row:t})=>{var s,n,a;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(W,{className:`h-5 w-5 ${Y((s=t.original.resources)==null?void 0:s.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(m,{to:p.projects.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.original.name})}),e.jsx(z,{children:e.jsxs($,{children:[e.jsx(M,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(Z,{status:(n=t.original.resources)==null?void 0:n.latest_run_status})}),e.jsx(H,{className:"z-20 capitalize",children:(a=t.original.resources)==null?void 0:a.latest_run_status})]})}),e.jsx(g,{copyText:t.original.name})]}),e.jsxs(m,{to:p.projects.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:t.original.id.split("-")[0]}),e.jsx(g,{copyText:t.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:t=>{var s,n;return{status:(s=t.resources)==null?void 0:s.latest_run_status,runId:(n=t.resources)==null?void 0:n.latest_run_id}},cell:({getValue:t})=>{const{runId:s,status:n}=t();return!s||!n?e.jsx("div",{children:"No run"}):e.jsx(m,{to:p.projects.runs.detail(s),children:e.jsxs(U,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:ee(n),children:[e.jsx(X,{className:"h-3 w-3 fill-current"}),s==null?void 0:s.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:t})=>e.jsx(le,{id:t.original.id})}]}const h=1,de=d.object({page:d.coerce.number().min(h).optional().default(h).catch(h),name:d.string().optional(),operator:d.enum(["and","or"]).optional()});function ue(){const[t]=te(),{page:s,name:n,operator:a}=de.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0});return{page:s,name:n,logical_operator:a}}function pe(){const t=ue(),{selectedRowCount:s,rowSelection:n,setRowSelection:a}=u(),{data:r,refetch:i}=q({...D.pipelineList({...t,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5 pt-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[s?e.jsx(oe,{}):e.jsx(V,{searchParams:t}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(C,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>i(),children:[e.jsx(K,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:r?e.jsx(G,{rowSelection:n,onRowSelectionChange:a,getRowId:o=>o.id,columns:ce(),data:r.items}):e.jsx(j,{className:"h-[500px] w-full"})}),r?r.total_pages>1&&e.jsx(J,{searchParams:t,paginate:r}):e.jsx(j,{className:"h-[36px] w-[300px]"})]})]})}function Ie(){return e.jsx(re,{children:e.jsx(pe,{})})}export{Ie as default};
1
+ import{r as c,j as e}from"./@radix-B1sy0Lhr.js";import{c as N,u as R}from"./bulk-delete-Bgf_MsSj.js";import{p as D}from"./index-rnWXXblA.js";import{F as k,G as A,H as _,J as O,K as E,B as C,L as I,M as F,N as B,O as L,Q as f,r as p,R as z,U as $,V as M,W as H,X as g,T as U,z as d,Y as G,d as j}from"./index-Ci5z7q6x.js";import{c as Q,b as q}from"./@tanstack-Dwlisomv.js";import{S as K}from"./refresh-C8BXS3Fb.js";import{P as J}from"./Pagination-CVYIgR9l.js";import{S as V}from"./SearchField-BbwrusMV.js";import{S as P}from"./trash-D9LA4VFD.js";import{D as S,a as v}from"./DeleteAlertDialog-C5z9RupH.js";import{S as W}from"./pipeline-CDJSAXrb.js";import{S as X}from"./terminal-C2tAF2XG.js";import{g as Y,E as Z,a as ee}from"./ExecutionStatus-BhDlfndt.js";import{L as m,f as te}from"./@react-router-CHjLNlgw.js";import{A as se}from"./AlertDialogDropdownItem-DuTp8JFP.js";import"./@reactflow-gbyyU3kq.js";import"./chevron-right-double-CbMG1dOM.js";import"./index-g7wOyc86.js";import"./zod-D48zuELD.js";import"./index.esm-SBF9nn_P.js";import"./check-circle-CG6XAdk-.js";import"./help-CRPfbPTO.js";async function ne({pipelineId:t}){const s=k(_.pipelines.detail(t)),n=await fetch(s,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!n.ok){const a=await n.json().then(r=>r.detail).catch(()=>`Failed to delete pipeline ${t}`);throw new A({status:n.status,statusText:n.statusText,message:a})}return n.json()}function ae(t){return Q({mutationFn:ne,...t})}const{ContextProvider:re,useContext:u}=N();function w(){const{setRowSelection:t}=u(),{mutateAsync:s}=ae();async function n(a){await s({pipelineId:a})}return R({deleteFn:n,queryKeyToInvalidate:D.all,setRowSelection:t})}function ie(){const[t,s]=c.useState(!1),{selectedRowCount:n,selectedRowIDs:a}=u(),{bulkDelete:r}=w();async function i(){await r(a),s(!1)}return e.jsxs(O,{open:t,onOpenChange:s,children:[e.jsx(E,{asChild:!0,children:e.jsxs(C,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(P,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(S,{title:`Delete Pipeline${n>=2?"s":""}`,handleDelete:i,children:e.jsxs(v,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function oe(){const{selectedRowCount:t}=u();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${t} Pipeline${t>1?"s":""} selected`}),e.jsx(ie,{})]})}function le({id:t}){const[s,n]=c.useState(!1),[a,r]=c.useState(!1),i=c.useRef(null),o=c.useRef(null),{bulkDelete:y}=w();async function b(){await y([t]),x(!1)}function T(){o.current=i.current}function x(l){if(l===!1){r(!1),setTimeout(()=>{n(l)},200);return}n(l)}return e.jsxs(I,{onOpenChange:r,open:a,children:[e.jsx(F,{ref:i,children:e.jsx(B,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(L,{hidden:s,onCloseAutoFocus:l=>{o.current&&(o.current.focus(),o.current=null,l.preventDefault())},align:"end",sideOffset:7,children:e.jsx(se,{onSelect:T,open:s,onOpenChange:x,triggerChildren:"Delete",icon:e.jsx(P,{fill:"red"}),children:e.jsx(S,{title:"Delete Pipeline",handleDelete:b,children:e.jsxs(v,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}function ce(){return[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(f,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:s=>t.toggleAllRowsSelected(s==="indeterminate"?!0:s)}),cell:({row:t})=>e.jsx(f,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"name",header:"Pipeline",cell:({row:t})=>{var s,n,a;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(W,{className:`h-5 w-5 ${Y((s=t.original.resources)==null?void 0:s.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(m,{to:p.projects.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.original.name})}),e.jsx(z,{children:e.jsxs($,{children:[e.jsx(M,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(Z,{status:(n=t.original.resources)==null?void 0:n.latest_run_status})}),e.jsx(H,{className:"z-20 capitalize",children:(a=t.original.resources)==null?void 0:a.latest_run_status})]})}),e.jsx(g,{copyText:t.original.name})]}),e.jsxs(m,{to:p.projects.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:t.original.id.split("-")[0]}),e.jsx(g,{copyText:t.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:t=>{var s,n;return{status:(s=t.resources)==null?void 0:s.latest_run_status,runId:(n=t.resources)==null?void 0:n.latest_run_id}},cell:({getValue:t})=>{const{runId:s,status:n}=t();return!s||!n?e.jsx("div",{children:"No run"}):e.jsx(m,{to:p.projects.runs.detail(s),children:e.jsxs(U,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:ee(n),children:[e.jsx(X,{className:"h-3 w-3 fill-current"}),s==null?void 0:s.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:t})=>e.jsx(le,{id:t.original.id})}]}const h=1,de=d.object({page:d.coerce.number().min(h).optional().default(h).catch(h),name:d.string().optional(),operator:d.enum(["and","or"]).optional()});function ue(){const[t]=te(),{page:s,name:n,operator:a}=de.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0});return{page:s,name:n,logical_operator:a}}function pe(){const t=ue(),{selectedRowCount:s,rowSelection:n,setRowSelection:a}=u(),{data:r,refetch:i}=q({...D.pipelineList({...t,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5 pt-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[s?e.jsx(oe,{}):e.jsx(V,{searchParams:t}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(C,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>i(),children:[e.jsx(K,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:r?e.jsx(G,{rowSelection:n,onRowSelectionChange:a,getRowId:o=>o.id,columns:ce(),data:r.items}):e.jsx(j,{className:"h-[500px] w-full"})}),r?r.total_pages>1&&e.jsx(J,{searchParams:t,paginate:r}):e.jsx(j,{className:"h-[36px] w-[300px]"})]})]})}function Ie(){return e.jsx(re,{children:e.jsx(pe,{})})}export{Ie as default};
@@ -1 +1 @@
1
- import{r as a,j as e}from"./@radix-B1sy0Lhr.js";import{$ as g,bn as C,r as p,a1 as b,b7 as y,B as i,aa as c}from"./index-CO6UN3UX.js";import{H as u,B as x,F as v,W as N}from"./Wizard-2FIi8JNY.js";import{S as f}from"./arrow-left-BFB2mgJo.js";import{C as S}from"./configuration-form-BbcNBQTO.js";import{c as k,L as F}from"./@react-router-CHjLNlgw.js";import{S as B,s as w}from"./constants-DfvsDtcH.js";import{C as T}from"./ComponentIcon-C9AY8usJ.js";import"./@tanstack-Dwlisomv.js";import"./@reactflow-gbyyU3kq.js";import"./index-d_QrPL-8.js";import"./form-C1jJgRy1.js";import"./plus-DOrkJCmy.js";import"./trash-D9LA4VFD.js";import"./index.esm-SBF9nn_P.js";import"./info-CI2szPUG.js";import"./zod-D48zuELD.js";import"./transform-S7omcvTm.js";import"./check-C9Nye5lR.js";import"./CodeSnippet-B7Wd4R8u.js";import"./file-text-TdPXNd7s.js";import"./terminal-square-C2tAF2XG.js";import"./bar-chart-square-check-_m-oYysN.js";import"./layout-GIiNvS10.js";function z(){const{setBreadcrumbs:s}=g();a.useEffect(()=>{s([C,{label:"Create",href:p.components.create}])},[s])}function H(){return z(),e.jsx(b,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(y,{className:"h-5 w-5 fill-turquoise-400"}),e.jsx("h1",{className:"text-display-xs font-semibold",children:"Register new Component"})]})})}function I({flavor:s,type:t,handleBack:r}){const l=a.useId(),o=k();function m(d){o(p.components.detail(d))}return e.jsxs(e.Fragment,{children:[e.jsxs(u,{className:"flex items-center gap-2",children:[e.jsxs(i,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(f,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs("span",{children:["Configure your ",c(s.name)," ",c(t)]})]}),e.jsx(x,{className:"p-0",children:e.jsx(S,{flavorId:s.id,formId:l,successHandler:m,FooterComponent:L})})]})}function L({formId:s,isPending:t}){return e.jsxs(v,{children:[e.jsx(i,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(F,{to:p.components.overview,children:"Cancel"})}),e.jsxs(i,{size:"md",disabled:t,type:"submit",form:s,children:[t&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Component"]})]})}function R({type:s,handleFlavorSelect:t,handleBack:r}){return e.jsxs(e.Fragment,{children:[e.jsxs(u,{className:"flex items-center gap-2",children:[e.jsxs(i,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(f,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs("span",{children:["Select your ",c(s)," Flavor"]})," "]}),e.jsx(x,{children:e.jsx(B,{type:s,setSelectedFlavor:t})})]})}function q({selectTypeHandler:s}){return e.jsxs(e.Fragment,{children:[e.jsx(u,{children:"Select your Component Type"}),e.jsx(x,{children:e.jsx("ul",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:w.map(t=>e.jsx(E,{type:t,selectTypeHandler:s},t))})})]})}function E({type:s,selectTypeHandler:t}){return e.jsxs("button",{onClick:()=>t(s),className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm",children:[e.jsx(T,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:s}),e.jsx("span",{children:c(s)})]})}function W(){const[s,t]=a.useState(0),[r,l]=a.useState(null),[o,m]=a.useState();function d(n){l(n),t(1)}function j(n){m(n),t(2)}function h(){t(n=>n-1)}return e.jsxs(N,{children:[s===0&&e.jsx(q,{selectTypeHandler:d}),s===1&&r&&e.jsx(R,{type:r,handleFlavorSelect:j,handleBack:h}),s===2&&o&&r&&e.jsx(I,{flavor:o,type:r,handleBack:h})]})}function ce(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx(H,{}),e.jsx("section",{className:"layout-container pb-5",children:e.jsx(W,{})})]})}export{ce as default};
1
+ import{r as a,j as e}from"./@radix-B1sy0Lhr.js";import{$ as g,bn as C,r as p,a1 as b,b7 as y,B as i,aa as c}from"./index-Ci5z7q6x.js";import{H as u,B as x,F as v,W as N}from"./Wizard-0nbnAM1R.js";import{S as f}from"./arrow-left-BFB2mgJo.js";import{C as S}from"./configuration-form-Bnyw4-V5.js";import{c as k,L as F}from"./@react-router-CHjLNlgw.js";import{S as B,s as w}from"./constants-Ddhz1mpL.js";import{C as T}from"./ComponentIcon-CWDJZO4Q.js";import"./@tanstack-Dwlisomv.js";import"./@reactflow-gbyyU3kq.js";import"./index-D_-iUPTg.js";import"./form-VRON3-kT.js";import"./plus-DOrkJCmy.js";import"./trash-D9LA4VFD.js";import"./index.esm-SBF9nn_P.js";import"./info-CI2szPUG.js";import"./zod-D48zuELD.js";import"./transform-S7omcvTm.js";import"./check-C9Nye5lR.js";import"./CodeSnippet-D7OZMz7I.js";import"./file-text-TdPXNd7s.js";import"./terminal-square-C2tAF2XG.js";import"./bar-chart-square-check-_m-oYysN.js";import"./layout-GIiNvS10.js";function z(){const{setBreadcrumbs:s}=g();a.useEffect(()=>{s([C,{label:"Create",href:p.components.create}])},[s])}function H(){return z(),e.jsx(b,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(y,{className:"h-5 w-5 fill-turquoise-400"}),e.jsx("h1",{className:"text-display-xs font-semibold",children:"Register new Component"})]})})}function I({flavor:s,type:t,handleBack:r}){const l=a.useId(),o=k();function m(d){o(p.components.detail(d))}return e.jsxs(e.Fragment,{children:[e.jsxs(u,{className:"flex items-center gap-2",children:[e.jsxs(i,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(f,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs("span",{children:["Configure your ",c(s.name)," ",c(t)]})]}),e.jsx(x,{className:"p-0",children:e.jsx(S,{flavorId:s.id,formId:l,successHandler:m,FooterComponent:L})})]})}function L({formId:s,isPending:t}){return e.jsxs(v,{children:[e.jsx(i,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(F,{to:p.components.overview,children:"Cancel"})}),e.jsxs(i,{size:"md",disabled:t,type:"submit",form:s,children:[t&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Component"]})]})}function R({type:s,handleFlavorSelect:t,handleBack:r}){return e.jsxs(e.Fragment,{children:[e.jsxs(u,{className:"flex items-center gap-2",children:[e.jsxs(i,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(f,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs("span",{children:["Select your ",c(s)," Flavor"]})," "]}),e.jsx(x,{children:e.jsx(B,{type:s,setSelectedFlavor:t})})]})}function q({selectTypeHandler:s}){return e.jsxs(e.Fragment,{children:[e.jsx(u,{children:"Select your Component Type"}),e.jsx(x,{children:e.jsx("ul",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:w.map(t=>e.jsx(E,{type:t,selectTypeHandler:s},t))})})]})}function E({type:s,selectTypeHandler:t}){return e.jsxs("button",{onClick:()=>t(s),className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm",children:[e.jsx(T,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:s}),e.jsx("span",{children:c(s)})]})}function W(){const[s,t]=a.useState(0),[r,l]=a.useState(null),[o,m]=a.useState();function d(n){l(n),t(1)}function j(n){m(n),t(2)}function h(){t(n=>n-1)}return e.jsxs(N,{children:[s===0&&e.jsx(q,{selectTypeHandler:d}),s===1&&r&&e.jsx(R,{type:r,handleFlavorSelect:j,handleBack:h}),s===2&&o&&r&&e.jsx(I,{flavor:o,type:r,handleBack:h})]})}function ce(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx(H,{}),e.jsx("section",{className:"layout-container pb-5",children:e.jsx(W,{})})]})}export{ce as default};
@@ -1 +1 @@
1
- import{r as u,j as r}from"./@radix-B1sy0Lhr.js";import{B as f,F as x,W as h}from"./Wizard-2FIi8JNY.js";import{af as j,d as C,B as a,r as m}from"./index-CO6UN3UX.js";import{c as b,a as p,L as v}from"./@react-router-CHjLNlgw.js";import{b as g}from"./@tanstack-Dwlisomv.js";import{C as E}from"./configuration-form-BbcNBQTO.js";import"./@reactflow-gbyyU3kq.js";import"./index-d_QrPL-8.js";import"./form-C1jJgRy1.js";import"./plus-DOrkJCmy.js";import"./trash-D9LA4VFD.js";import"./index.esm-SBF9nn_P.js";import"./info-CI2szPUG.js";import"./zod-D48zuELD.js";import"./transform-S7omcvTm.js";import"./check-C9Nye5lR.js";import"./CodeSnippet-B7Wd4R8u.js";import"./file-text-TdPXNd7s.js";import"./terminal-square-C2tAF2XG.js";import"./ComponentIcon-C9AY8usJ.js";import"./bar-chart-square-check-_m-oYysN.js";import"./layout-GIiNvS10.js";function y(){var s,i;const e=b(),{componentId:t}=p(),o=g({...j.componentDetail(t),throwOnError:!0});function d(l){e(m.components.detail(l))}const c=u.useId();if(o.isPending)return r.jsx(C,{className:"h-[300px] w-full"});if(o.isError)return r.jsx("div",{children:"Error"});const n=(i=(s=o.data.resources)==null?void 0:s.flavor)==null?void 0:i.id;return n?r.jsx(r.Fragment,{children:r.jsx(f,{className:"p-0",children:r.jsx(E,{component:o.data,flavorId:n,formId:c,isCreate:!1,successHandler:d,FooterComponent:N})})}):r.jsx("div",{children:"No flavor found"})}function N({formId:e,isPending:t}){const o=p();return r.jsxs(x,{children:[r.jsx(a,{asChild:!0,intent:"secondary",size:"md",children:r.jsx(v,{to:m.components.detail(o.componentId),children:"Cancel"})}),r.jsxs(a,{size:"md",disabled:t,type:"submit",form:e,children:[t&&r.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Update Component"]})]})}function T(){return r.jsx("section",{className:"layout-container mt-5 pb-5",children:r.jsx(h,{children:r.jsx(y,{})})})}export{T as default};
1
+ import{r as u,j as r}from"./@radix-B1sy0Lhr.js";import{B as f,F as x,W as h}from"./Wizard-0nbnAM1R.js";import{af as j,d as C,B as a,r as m}from"./index-Ci5z7q6x.js";import{c as b,a as p,L as v}from"./@react-router-CHjLNlgw.js";import{b as g}from"./@tanstack-Dwlisomv.js";import{C as E}from"./configuration-form-Bnyw4-V5.js";import"./@reactflow-gbyyU3kq.js";import"./index-D_-iUPTg.js";import"./form-VRON3-kT.js";import"./plus-DOrkJCmy.js";import"./trash-D9LA4VFD.js";import"./index.esm-SBF9nn_P.js";import"./info-CI2szPUG.js";import"./zod-D48zuELD.js";import"./transform-S7omcvTm.js";import"./check-C9Nye5lR.js";import"./CodeSnippet-D7OZMz7I.js";import"./file-text-TdPXNd7s.js";import"./terminal-square-C2tAF2XG.js";import"./ComponentIcon-CWDJZO4Q.js";import"./bar-chart-square-check-_m-oYysN.js";import"./layout-GIiNvS10.js";function y(){var s,i;const e=b(),{componentId:t}=p(),o=g({...j.componentDetail(t),throwOnError:!0});function d(l){e(m.components.detail(l))}const c=u.useId();if(o.isPending)return r.jsx(C,{className:"h-[300px] w-full"});if(o.isError)return r.jsx("div",{children:"Error"});const n=(i=(s=o.data.resources)==null?void 0:s.flavor)==null?void 0:i.id;return n?r.jsx(r.Fragment,{children:r.jsx(f,{className:"p-0",children:r.jsx(E,{component:o.data,flavorId:n,formId:c,isCreate:!1,successHandler:d,FooterComponent:N})})}):r.jsx("div",{children:"No flavor found"})}function N({formId:e,isPending:t}){const o=p();return r.jsxs(x,{children:[r.jsx(a,{asChild:!0,intent:"secondary",size:"md",children:r.jsx(v,{to:m.components.detail(o.componentId),children:"Cancel"})}),r.jsxs(a,{size:"md",disabled:t,type:"submit",form:e,children:[t&&r.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Update Component"]})]})}function T(){return r.jsx("section",{className:"layout-container mt-5 pb-5",children:r.jsx(h,{children:r.jsx(y,{})})})}export{T as default};