zenml-nightly 0.83.0.dev20250623__py3-none-any.whl → 0.83.1.dev20250625__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 (158) hide show
  1. zenml/VERSION +1 -1
  2. zenml/cli/login.py +21 -3
  3. zenml/config/__init__.py +13 -2
  4. zenml/constants.py +0 -1
  5. zenml/exceptions.py +16 -0
  6. zenml/integrations/airflow/orchestrators/airflow_orchestrator.py +15 -6
  7. zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +54 -58
  8. zenml/integrations/azure/orchestrators/azureml_orchestrator.py +28 -19
  9. zenml/integrations/databricks/orchestrators/databricks_orchestrator.py +19 -63
  10. zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +36 -61
  11. zenml/integrations/hyperai/orchestrators/hyperai_orchestrator.py +19 -22
  12. zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +28 -31
  13. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +33 -20
  14. zenml/integrations/lightning/orchestrators/lightning_orchestrator.py +25 -100
  15. zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +19 -8
  16. zenml/integrations/skypilot/utils.py +17 -13
  17. zenml/integrations/tekton/orchestrators/tekton_orchestrator.py +28 -12
  18. zenml/models/v2/core/step_run.py +1 -0
  19. zenml/orchestrators/__init__.py +2 -0
  20. zenml/orchestrators/base_orchestrator.py +137 -66
  21. zenml/orchestrators/input_utils.py +5 -13
  22. zenml/orchestrators/local/local_orchestrator.py +19 -9
  23. zenml/orchestrators/local_docker/local_docker_orchestrator.py +15 -5
  24. zenml/orchestrators/publish_utils.py +24 -0
  25. zenml/orchestrators/step_run_utils.py +1 -2
  26. zenml/pipelines/run_utils.py +12 -7
  27. zenml/step_operators/step_operator_entrypoint_configuration.py +1 -1
  28. zenml/zen_server/dashboard/assets/{404-DmJUgorp.js → 404-B5eko6XL.js} +1 -1
  29. zenml/zen_server/dashboard/assets/{@reactflow-8OCk19Fi.js → @reactflow-B_iCtR7X.js} +1 -1
  30. zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-CZW4QyWn.js → AlertDialogDropdownItem-DsOmO1FH.js} +1 -1
  31. zenml/zen_server/dashboard/assets/{ButtonGroup-DFWWFGUE.js → ButtonGroup-4sPZDv70.js} +1 -1
  32. zenml/zen_server/dashboard/assets/{CodeSnippet-D2HkkAGr.js → CodeSnippet-Ctplhzdc.js} +1 -1
  33. zenml/zen_server/dashboard/assets/{CollapsibleCard-CnS09ljw.js → CollapsibleCard-CBKenz9f.js} +1 -1
  34. zenml/zen_server/dashboard/assets/{ComponentBadge-CDgdd0Ks.js → ComponentBadge-Cnecw3qz.js} +1 -1
  35. zenml/zen_server/dashboard/assets/{ComponentIcon-CbbOc7lb.js → ComponentIcon-CMiVW-O6.js} +1 -1
  36. zenml/zen_server/dashboard/assets/{DeleteAlertDialog-VIOMDLmx.js → DeleteAlertDialog-DEI0YDzP.js} +1 -1
  37. zenml/zen_server/dashboard/assets/{DialogItem-ClFCqxEp.js → DialogItem-CRCDpYU6.js} +1 -1
  38. zenml/zen_server/dashboard/assets/{Error-CQzjbDcN.js → Error-BG6f_WRd.js} +1 -1
  39. zenml/zen_server/dashboard/assets/{ExecutionStatus-CWreILP0.js → ExecutionStatus-BuhNAE9w.js} +1 -1
  40. zenml/zen_server/dashboard/assets/{Helpbox-CiKxG5_X.js → Helpbox-DtUG2Bf_.js} +1 -1
  41. zenml/zen_server/dashboard/assets/{Infobox-CGxFvqzi.js → Infobox-CSBRrM6r.js} +1 -1
  42. zenml/zen_server/dashboard/assets/{LeftSideMenu-DCsKdIjC.js → LeftSideMenu-DPsCCK3z.js} +1 -1
  43. zenml/zen_server/dashboard/assets/{NestedCollapsible-3M4llYtH.js → NestedCollapsible-CMuDIJlp.js} +1 -1
  44. zenml/zen_server/dashboard/assets/{NumberBox-C0mQktmV.js → NumberBox-DtCv7jh3.js} +1 -1
  45. zenml/zen_server/dashboard/assets/Pagination-CWnEpSpN.js +1 -0
  46. zenml/zen_server/dashboard/assets/{Partials-DSjkttlz.js → Partials-CfHD6OH5.js} +1 -1
  47. zenml/zen_server/dashboard/assets/{ProCta-Dm5cWKpS.js → ProCta-CNyp04C8.js} +1 -1
  48. zenml/zen_server/dashboard/assets/{ProviderIcon-DPwMR6nF.js → ProviderIcon-DHejyg7C.js} +1 -1
  49. zenml/zen_server/dashboard/assets/{ProviderRadio-DEDNRgAb.js → ProviderRadio-tGtie8Gc.js} +1 -1
  50. zenml/zen_server/dashboard/assets/RunsBody-mYwMcWWj.js +1 -0
  51. zenml/zen_server/dashboard/assets/SearchField-BtUi6cYl.js +1 -0
  52. zenml/zen_server/dashboard/assets/{SecretTooltip-CZTRnaCV.js → SecretTooltip-B5u1UsQ9.js} +1 -1
  53. zenml/zen_server/dashboard/assets/{SetPassword-BjNGDC5e.js → SetPassword-BmbgL_ed.js} +1 -1
  54. zenml/zen_server/dashboard/assets/{SheetHeader-CASpN2Lz.js → SheetHeader-DkH7aG9K.js} +1 -1
  55. zenml/zen_server/dashboard/assets/StackComponentList-Bi8BKqCu.js +1 -0
  56. zenml/zen_server/dashboard/assets/StackList-Cvxapo0p.js +1 -0
  57. zenml/zen_server/dashboard/assets/{StackName-ojLC6xdl.js → StackName-CFSZL8ec.js} +1 -1
  58. zenml/zen_server/dashboard/assets/Tabs-D4dv48ry.js +1 -0
  59. zenml/zen_server/dashboard/assets/{Tick-BPrWnNlN.js → Tick-Qquvr4P3.js} +1 -1
  60. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-CNfKDo2Q.js → UpdatePasswordSchemas-D_DCETSO.js} +1 -1
  61. zenml/zen_server/dashboard/assets/{UsageReason-Cb-mpV8M.js → UsageReason-DhiUV1bu.js} +1 -1
  62. zenml/zen_server/dashboard/assets/{Wizard-Dg8Pmn5A.js → Wizard-BHvY75u_.js} +1 -1
  63. zenml/zen_server/dashboard/assets/{WizardFooter-BcNDIvlQ.js → WizardFooter-FQm8y-jP.js} +1 -1
  64. zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-DCdax7I5.js → all-pipeline-runs-query-DpKw9WL9.js} +1 -1
  65. zenml/zen_server/dashboard/assets/{bulk-delete-C_kpIB9A.js → bulk-delete-CzYA--cC.js} +1 -1
  66. zenml/zen_server/dashboard/assets/{configuration-form-B2hmKGnF.js → configuration-form-DSoMMiPE.js} +1 -1
  67. zenml/zen_server/dashboard/assets/{constants-1EZZxtay.js → constants-DTfsIqHy.js} +1 -1
  68. zenml/zen_server/dashboard/assets/{create-stack-TKmMtrkQ.js → create-stack-BpZrmKDu.js} +1 -1
  69. zenml/zen_server/dashboard/assets/{delete-run-CCR9md_s.js → delete-run-BkyDsKQc.js} +1 -1
  70. zenml/zen_server/dashboard/assets/elk-worker.min-BdOC9sib.js +6263 -0
  71. zenml/zen_server/dashboard/assets/expand-full-BPiXpch2.js +1 -0
  72. zenml/zen_server/dashboard/assets/{form-DFJkaFDX.js → form-BgtamtJm.js} +1 -1
  73. zenml/zen_server/dashboard/assets/{form-schemas-CrznJVzA.js → form-schemas-dyDkAxXP.js} +1 -1
  74. zenml/zen_server/dashboard/assets/{index-BjUu1mP4.js → index-BBt0LDtR.js} +1 -1
  75. zenml/zen_server/dashboard/assets/index-BfNISy0X.css +1 -0
  76. zenml/zen_server/dashboard/assets/{index-BFqbGSck.js → index-BgEfQ3_G.js} +4 -4
  77. zenml/zen_server/dashboard/assets/{index-U992soPJ.js → index-eoDB_1XX.js} +1 -1
  78. zenml/zen_server/dashboard/assets/{layout-Do9YI4QX.js → layout-o1x87a3q.js} +1 -1
  79. zenml/zen_server/dashboard/assets/{login-mutation-D3tFP6Wm.js → login-mutation-C1hvP_cX.js} +1 -1
  80. zenml/zen_server/dashboard/assets/page-4xUZpMN0.js +31 -0
  81. zenml/zen_server/dashboard/assets/page-4zc4xPv2.js +2 -0
  82. zenml/zen_server/dashboard/assets/page-B0104V6C.js +1 -0
  83. zenml/zen_server/dashboard/assets/page-BNJsjvof.js +1 -0
  84. zenml/zen_server/dashboard/assets/{page-sJjNT9xA.js → page-BPQ66vR-.js} +1 -1
  85. zenml/zen_server/dashboard/assets/{page-CAJ8B0vb.js → page-BQgSZ2nH.js} +1 -1
  86. zenml/zen_server/dashboard/assets/page-BXl2ZX6J.js +1 -0
  87. zenml/zen_server/dashboard/assets/{page-CtiuMP_r.js → page-BxeZrG_t.js} +1 -1
  88. zenml/zen_server/dashboard/assets/{page-Cal6XQ4U.js → page-C2A-2Cj_.js} +1 -1
  89. zenml/zen_server/dashboard/assets/page-C2i-C7jv.js +1 -0
  90. zenml/zen_server/dashboard/assets/{page-DJIGaUQ9.js → page-C3JfJxuR.js} +1 -1
  91. zenml/zen_server/dashboard/assets/{page-ChGcZI_6.js → page-CESEqC2L.js} +1 -1
  92. zenml/zen_server/dashboard/assets/{page-DCcuPZ8P.js → page-CF8cTZ7l.js} +1 -1
  93. zenml/zen_server/dashboard/assets/page-CKjsimVu.js +1 -0
  94. zenml/zen_server/dashboard/assets/{page-DNjKHjnH.js → page-COLzBwff.js} +1 -1
  95. zenml/zen_server/dashboard/assets/page-COifg5fa.js +1 -0
  96. zenml/zen_server/dashboard/assets/{page-CnbIYE80.js → page-CQeJuA8T.js} +1 -1
  97. zenml/zen_server/dashboard/assets/{page-DKK6ulgy.js → page-CcjWEjre.js} +1 -1
  98. zenml/zen_server/dashboard/assets/{page-9RjCitFH.js → page-CefGLeWy.js} +1 -1
  99. zenml/zen_server/dashboard/assets/{page-DUKbOhaD.js → page-CfxpV3j4.js} +1 -1
  100. zenml/zen_server/dashboard/assets/{page-D9Hfx6GV.js → page-ClcUzawe.js} +1 -1
  101. zenml/zen_server/dashboard/assets/page-Ct_LB3zo.js +1 -0
  102. zenml/zen_server/dashboard/assets/page-D-ZWUMYY.js +1 -0
  103. zenml/zen_server/dashboard/assets/{page-CUaMMoPG.js → page-D-tJ_Y0a.js} +1 -1
  104. zenml/zen_server/dashboard/assets/{page-CdZCmszX.js → page-DHrvih9u.js} +1 -1
  105. zenml/zen_server/dashboard/assets/{page-DUK0Nd_1.js → page-DMhaHZDw.js} +1 -1
  106. zenml/zen_server/dashboard/assets/{page-CAUYrfui.js → page-DOCOmmKn.js} +1 -1
  107. zenml/zen_server/dashboard/assets/{page-akLcPcKw.js → page-DcQmxKLp.js} +1 -1
  108. zenml/zen_server/dashboard/assets/page-Dh4GRWw5.js +1 -0
  109. zenml/zen_server/dashboard/assets/{page-DwVPpCFg.js → page-DiHZK-1w.js} +1 -1
  110. zenml/zen_server/dashboard/assets/page-Dn7ZNapg.js +1 -0
  111. zenml/zen_server/dashboard/assets/page-Dy4vSQY7.js +1 -0
  112. zenml/zen_server/dashboard/assets/{page-CN7lkvXr.js → page-QrvWQwZb.js} +1 -1
  113. zenml/zen_server/dashboard/assets/{page-BrT0_zSJ.js → page-RF3Fup0q.js} +1 -1
  114. zenml/zen_server/dashboard/assets/page-WuvCrN47.js +1 -0
  115. zenml/zen_server/dashboard/assets/{page-Be3R2uYn.js → page-_WnHBI1F.js} +1 -1
  116. zenml/zen_server/dashboard/assets/{page-C210HcBA.js → page-ghjVNgVE.js} +1 -1
  117. zenml/zen_server/dashboard/assets/{page-BCrKmYIZ.js → page-iDsDiDXw.js} +1 -1
  118. zenml/zen_server/dashboard/assets/{page-ClvmVesa.js → page-rVhXI5ZO.js} +1 -1
  119. zenml/zen_server/dashboard/assets/{page-DEohTSz6.js → page-uxjMX8Iq.js} +1 -1
  120. zenml/zen_server/dashboard/assets/{persist-Dec_w7aB.js → persist-BsdEtCkd.js} +1 -1
  121. zenml/zen_server/dashboard/assets/{persist-DWMWVP-y.js → persist-CFPbMcJX.js} +1 -1
  122. zenml/zen_server/dashboard/assets/{resource-tyes-list-o2LXiMay.js → resource-tyes-list-79FqS3LY.js} +1 -1
  123. zenml/zen_server/dashboard/assets/{resource-type-tooltip-DwHrJstL.js → resource-type-tooltip-BL9ZTRKi.js} +1 -1
  124. zenml/zen_server/dashboard/assets/{service-connectors-DSEMwJ5A.js → service-connectors-Q8h7-_rG.js} +1 -1
  125. zenml/zen_server/dashboard/assets/{service-jxtvgks0.js → service-k-9Vsb30.js} +1 -1
  126. zenml/zen_server/dashboard/assets/{sharedSchema-BXzg0EZz.js → sharedSchema-C_HkejsG.js} +1 -1
  127. zenml/zen_server/dashboard/assets/{stack-detail-query-Cm0fsgo-.js → stack-detail-query-CNmVZ0Bo.js} +1 -1
  128. zenml/zen_server/dashboard/assets/{update-current-user-mutation-D5MjcQ6F.js → update-current-user-mutation-Ca-Lmwuj.js} +1 -1
  129. zenml/zen_server/dashboard/assets/{update-server-settings-mutation-CmnxdxiK.js → update-server-settings-mutation-Bwe3gUt4.js} +1 -1
  130. zenml/zen_server/dashboard/index.html +4 -4
  131. zenml/zen_stores/migrations/versions/0.83.1_release.py +23 -0
  132. zenml/zen_stores/rest_zen_store.py +147 -128
  133. zenml/zen_stores/sql_zen_store.py +27 -17
  134. {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250625.dist-info}/METADATA +5 -9
  135. {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250625.dist-info}/RECORD +138 -134
  136. zenml/zen_server/dashboard/assets/RunsBody-BRBn1e2O.js +0 -1
  137. zenml/zen_server/dashboard/assets/SearchField-DY6-UbRT.js +0 -1
  138. zenml/zen_server/dashboard/assets/StackComponentList-Be1pQt9m.js +0 -1
  139. zenml/zen_server/dashboard/assets/StackList-BdiR5DvR.js +0 -1
  140. zenml/zen_server/dashboard/assets/Tabs-DNSKblCM.js +0 -1
  141. zenml/zen_server/dashboard/assets/index-DuhuqTCI.css +0 -1
  142. zenml/zen_server/dashboard/assets/page-B0PsXWiT.js +0 -1
  143. zenml/zen_server/dashboard/assets/page-BcRI3-aR.js +0 -29
  144. zenml/zen_server/dashboard/assets/page-BgknnddT.js +0 -1
  145. zenml/zen_server/dashboard/assets/page-Bs3W2FDi.js +0 -1
  146. zenml/zen_server/dashboard/assets/page-C6KaiZ_W.js +0 -1
  147. zenml/zen_server/dashboard/assets/page-CHxVhF3x.js +0 -1
  148. zenml/zen_server/dashboard/assets/page-CktmtZ8Z.js +0 -1
  149. zenml/zen_server/dashboard/assets/page-CoXzjeEY.js +0 -1
  150. zenml/zen_server/dashboard/assets/page-D9iuB88h.js +0 -1
  151. zenml/zen_server/dashboard/assets/page-DYOucPtA.js +0 -1
  152. zenml/zen_server/dashboard/assets/page-DpqRelAy.js +0 -1
  153. zenml/zen_server/dashboard/assets/page-XURWnYZP.js +0 -1
  154. zenml/zen_server/dashboard/assets/page-abw-2oeW.js +0 -1
  155. zenml/zen_server/dashboard/assets/page-n9ejQ2V3.js +0 -2
  156. {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250625.dist-info}/LICENSE +0 -0
  157. {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250625.dist-info}/WHEEL +0 -0
  158. {zenml_nightly-0.83.0.dev20250623.dist-info → zenml_nightly-0.83.1.dev20250625.dist-info}/entry_points.txt +0 -0
@@ -1,29 +0,0 @@
1
- var _o=Object.defineProperty;var Ao=(e,t,n)=>t in e?_o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xe=(e,t,n)=>Ao(e,typeof t!="symbol"?t+"":t,n);import{r as q,j as o,g as li}from"./@radix-Cdvw4jJ8.js";import{H as $t,f as jt,i as Xe,n as Gt,F as Ke,j as et,o as tl,a as oi,B as ve,g as re,T as Se,q as _e,s as Ae,t as Oe,G as ui,w as Le,r as it,J as Oo,K as Lo,L as nl,M as Io,N as To,O as qi,Q as Po,R as Mo,U as Ro,S as vt,V as ci,W as Do,X as Fo,Y as zo,Z as Bo,_ as qo,I as Vo,$ as Ho,a0 as Wo,a1 as Uo,a2 as $o,a3 as sn,a4 as di,a5 as hi,a6 as De,a7 as Fe,a8 as rl,a9 as il,aa as al,h as Go,ab as sl,ac as Pt,ad as Mt,ae as Rt,af as Dt,ag as Zo,v as Qe,ah as Jo,b as ll,ai as Qo,aj as Ko,ak as Yo,al as fi,am as Xo,D as Qr,l as ol,p as ul,an as cl,y as eu,E as tu,ao as nu,A as ru,ap as iu,m as au,P as su,z as Vi,d as lu,aq as ou,ar as uu}from"./index-BFqbGSck.js";import{g as dl,a as hl,b as cu}from"./code-snippets-CqONne41.js";import{S as du,a as hu,C as fu}from"./ComponentIcon-CbbOc7lb.js";import{S as Ct}from"./info-QkbQz4QU.js";import{b as st,c as fl,h as hn,q as pu}from"./@tanstack-5gTMR7G2.js";import{E as mu}from"./react-error-boundary.esm-7_MuhCay.js";import{S as pl}from"./SheetHeader-CASpN2Lz.js";import{E as ut}from"./Error-CQzjbDcN.js";import{S as pi}from"./pipeline-CSUlkd50.js";import{S as gu}from"./terminal-square-XFL_4QN-.js";import{D as Wt}from"./DisplayDate-8RESqe5H.js";import{a as fn,E as gt,b as ml,c as xu,S as yu,g as bu}from"./ExecutionStatus-CWreILP0.js";import{K as de,N as He,a as Ze,V as Je,b as wu}from"./NestedCollapsible-3M4llYtH.js";import{L as kt,a as Ie,c as mi,f as gl}from"./@react-router-DeDfXbUF.js";import{C as Ue}from"./CodeSnippet-D2HkkAGr.js";import{C as ct,a as vu}from"./CollapsibleCard-CnS09ljw.js";import{E as We}from"./EmptyState-CjrgDtVk.js";import{i as xl,a as mt}from"./type-guards-CNgPYg8l.js";import{I as pn,S as Cu}from"./Infobox-CGxFvqzi.js";import{S as ku}from"./check-B9QMTa3f.js";import{S as xt}from"./chevron-down-jbbQh82s.js";import{H as Hi,P as Wi,u as gi,a as yl,b as ju,S as Nu,B as Eu,c as Su,d as _u,e as Au}from"./@reactflow-8OCk19Fi.js";import{S as Ou}from"./plus-Cl0_rCVF.js";import{S as bl}from"./refresh-BcTM09NW.js";import{S as Lu}from"./code-browser-CiD8qkBx.js";import{S as wl}from"./logs-CQKlJjo0.js";import{c as vl,s as Iu}from"./dates-Buh6SMo7.js";import{C as Tu}from"./ComponentBadge-CDgdd0Ks.js";import{u as Cl}from"./stack-detail-query-Cm0fsgo-.js";import{S as Pu}from"./terminal-XFL_4QN-.js";import{S as Mu}from"./trash-DP6Tpp_E.js";import{D as Ru,a as Du}from"./DeleteAlertDialog-VIOMDLmx.js";import{u as Fu}from"./delete-run-CCR9md_s.js";import"./layout-DBbfEFBe.js";import"./transform-CeZdrxDZ.js";import"./chevron-right-double-Dgp_gEsp.js";import"./check-circle-C4tYvbtw.js";import"./help-Co6aedki.js";import"./eye-CbVlAYty.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";const zu=e=>q.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},q.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"})),Bu=e=>q.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},q.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"})),qu=e=>q.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},q.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.77687 1.00001C2.78469 1.00001 2.79241 1.00001 2.80001 1.00001H6.20001C6.20762 1.00001 6.21533 1.00001 6.22315 1.00001C6.34227 0.999961 6.48452 0.999906 6.60984 1.01015C6.75506 1.02201 6.96305 1.05245 7.181 1.1635C7.46324 1.30731 7.69271 1.53678 7.83652 1.81903C7.94757 2.03697 7.97801 2.24496 7.98988 2.39018C8.00012 2.5155 8.00006 2.65776 8.00002 2.77687C8.00001 2.78469 8.00001 2.79241 8.00001 2.80001V6.20001C8.00001 6.20762 8.00001 6.21533 8.00002 6.22315C8.00006 6.34227 8.00012 6.48452 7.98988 6.60984C7.97801 6.75506 7.94757 6.96305 7.83652 7.181C7.69271 7.46324 7.46324 7.69271 7.181 7.83652C6.96305 7.94757 6.75506 7.97801 6.60984 7.98988C6.48452 8.00012 6.34227 8.00006 6.22315 8.00002C6.21533 8.00001 6.20762 8.00001 6.20001 8.00001H2.80001C2.79241 8.00001 2.78469 8.00001 2.77687 8.00002C2.65776 8.00006 2.5155 8.00012 2.39018 7.98988C2.24496 7.97801 2.03697 7.94757 1.81903 7.83652C1.53678 7.69271 1.30731 7.46324 1.1635 7.181C1.05245 6.96305 1.02201 6.75506 1.01015 6.60984C0.999906 6.48452 0.999961 6.34227 1.00001 6.22315C1.00001 6.21533 1.00001 6.20762 1.00001 6.20001V2.80001C1.00001 2.79241 1.00001 2.78469 1.00001 2.77687C0.999961 2.65776 0.999906 2.5155 1.01015 2.39018C1.02201 2.24496 1.05245 2.03697 1.1635 1.81903C1.30731 1.53678 1.53678 1.30731 1.81903 1.1635C2.03697 1.05245 2.24496 1.02201 2.39018 1.01015C2.5155 0.999906 2.65776 0.999961 2.77687 1.00001ZM3.00001 3.00001V6.00001H6.00001V3.00001H3.00001ZM19.5322 5.52394C19.2488 5.50079 18.8766 5.50001 18.3 5.50001H11C10.4477 5.50001 10 5.0523 10 4.50001C10 3.94773 10.4477 3.50001 11 3.50001L18.3386 3.50001C18.8657 3.49999 19.3205 3.49998 19.695 3.53058C20.0904 3.56288 20.4836 3.6342 20.862 3.82699C21.4265 4.11461 21.8854 4.57356 22.173 5.13804C22.3658 5.51642 22.4371 5.90964 22.4694 6.30498C22.5 6.67955 22.5 7.13431 22.5 7.66145V9.032C22.5 9.47065 22.5 9.84914 22.4787 10.1624C22.4562 10.4922 22.4067 10.8221 22.2717 11.1481C21.9672 11.8832 21.3831 12.4672 20.6481 12.7717C20.3221 12.9067 19.9922 12.9562 19.6624 12.9787C19.3491 13 18.9706 13 18.532 13H18.5C17.9477 13 17.5 12.5523 17.5 12C17.5 11.4477 17.9477 11 18.5 11C18.9796 11 19.2893 10.9995 19.5263 10.9833C19.7542 10.9677 19.8411 10.9411 19.8827 10.9239C20.1277 10.8224 20.3224 10.6277 20.4239 10.3827C20.4411 10.3411 20.4677 10.2543 20.4833 10.0263C20.4995 9.78927 20.5 9.47964 20.5 9.00001V7.70001C20.5 7.12346 20.4992 6.75118 20.4761 6.46785C20.4539 6.19618 20.4162 6.09547 20.391 6.04602C20.2951 5.85786 20.1422 5.70488 19.954 5.60901C19.9046 5.58381 19.8038 5.54613 19.5322 5.52394ZM10.2769 8.50001C10.2847 8.50001 10.2924 8.50001 10.3 8.50001H13.7C13.7076 8.50001 13.7153 8.50001 13.7232 8.50001C13.8423 8.49996 13.9845 8.49991 14.1098 8.51015C14.2551 8.52201 14.4631 8.55245 14.681 8.6635C14.9632 8.80731 15.1927 9.03678 15.3365 9.31903C15.4476 9.53697 15.478 9.74496 15.4899 9.89018C15.5001 10.0155 15.5001 10.1578 15.5 10.2769C15.5 10.2847 15.5 10.2924 15.5 10.3V13.7C15.5 13.7076 15.5 13.7153 15.5 13.7231C15.5001 13.8423 15.5001 13.9845 15.4899 14.1098C15.478 14.2551 15.4476 14.4631 15.3365 14.681C15.1927 14.9632 14.9632 15.1927 14.681 15.3365C14.4631 15.4476 14.2551 15.478 14.1098 15.4899C13.9845 15.5001 13.8423 15.5001 13.7231 15.5C13.7153 15.5 13.7076 15.5 13.7 15.5H10.3C10.2924 15.5 10.2847 15.5 10.2769 15.5C10.1578 15.5001 10.0155 15.5001 9.89018 15.4899C9.74496 15.478 9.53697 15.4476 9.31903 15.3365C9.03678 15.1927 8.80731 14.9632 8.6635 14.681C8.55245 14.4631 8.52201 14.2551 8.51015 14.1098C8.49991 13.9845 8.49996 13.8423 8.50001 13.7232C8.50001 13.7153 8.50001 13.7076 8.50001 13.7V10.3C8.50001 10.2924 8.50001 10.2847 8.50001 10.2769C8.49996 10.1578 8.49991 10.0155 8.51015 9.89018C8.52201 9.74496 8.55245 9.53697 8.6635 9.31903C8.80731 9.03678 9.03678 8.80731 9.31903 8.6635C9.53697 8.55245 9.74496 8.52201 9.89018 8.51015C10.0155 8.49991 10.1578 8.49996 10.2769 8.50001ZM10.5 10.5V13.5H13.5V10.5H10.5ZM5.46802 11H5.50001C6.0523 11 6.50001 11.4477 6.50001 12C6.50001 12.5523 6.0523 13 5.50001 13C5.02039 13 4.71075 13.0006 4.47377 13.0167C4.24577 13.0323 4.15894 13.0589 4.11733 13.0761C3.8723 13.1776 3.67763 13.3723 3.57613 13.6173C3.5589 13.6589 3.53228 13.7458 3.51672 13.9738C3.50055 14.2108 3.50001 14.5204 3.50001 15V16.3C3.50001 16.8766 3.50079 17.2488 3.52394 17.5322C3.54614 17.8038 3.58381 17.9046 3.60901 17.954C3.70488 18.1422 3.85786 18.2951 4.04602 18.391C4.09547 18.4162 4.19618 18.4539 4.46785 18.4761C4.75119 18.4992 5.12346 18.5 5.70001 18.5H13C13.5523 18.5 14 18.9477 14 19.5C14 20.0523 13.5523 20.5 13 20.5H5.66145C5.13431 20.5 4.67955 20.5 4.30498 20.4694C3.90964 20.4371 3.51642 20.3658 3.13804 20.173C2.57356 19.8854 2.11461 19.4265 1.82699 18.862C1.6342 18.4836 1.56288 18.0904 1.53058 17.695C1.49998 17.3205 1.49999 16.8657 1.50001 16.3386L1.50001 14.968C1.5 14.5294 1.49999 14.1509 1.52136 13.8376C1.54387 13.5078 1.59337 13.1779 1.72837 12.852C2.03286 12.1169 2.61688 11.5329 3.35196 11.2284C3.67789 11.0934 4.0078 11.0439 4.33763 11.0214C4.65089 11 5.02937 11 5.46802 11ZM17.7769 16H21.2231C21.3423 16 21.4845 15.9999 21.6098 16.0101C21.7551 16.022 21.9631 16.0525 22.181 16.1635C22.4632 16.3073 22.6927 16.5368 22.8365 16.819C22.9476 17.037 22.978 17.245 22.9899 17.3902C23.0001 17.5155 23.0001 17.6577 23 17.7769C23 17.7847 23 17.7924 23 17.8V21.2C23 21.2076 23 21.2153 23 21.2232C23.0001 21.3423 23.0001 21.4845 22.9899 21.6098C22.978 21.7551 22.9476 21.9631 22.8365 22.181C22.6927 22.4632 22.4632 22.6927 22.181 22.8365C21.9631 22.9476 21.7551 22.978 21.6098 22.9899C21.4845 23.0001 21.3423 23.0001 21.2232 23C21.2153 23 21.2076 23 21.2 23H17.8C17.7924 23 17.7847 23 17.7769 23C17.6577 23.0001 17.5155 23.0001 17.3902 22.9899C17.245 22.978 17.037 22.9476 16.819 22.8365C16.5368 22.6927 16.3073 22.4632 16.1635 22.181C16.0525 21.9631 16.022 21.7551 16.0101 21.6098C15.9999 21.4845 16 21.3423 16 21.2231V17.7769C16 17.6578 15.9999 17.5155 16.0101 17.3902C16.022 17.245 16.0525 17.037 16.1635 16.819C16.3073 16.5368 16.5368 16.3073 16.819 16.1635C17.037 16.0525 17.245 16.022 17.3902 16.0101C17.5155 15.9999 17.6578 16 17.7769 16ZM18 18V21H21V18H18Z"})),Ui=e=>q.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},q.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 kl({artifactType:e,className:t}){switch(e){case"DataAnalysisArtifact":return o.jsx(Bu,{className:t});case"DataArtifact":return o.jsx(hu,{className:t});case"ModelArtifact":return o.jsx(qu,{className:t});case"SchemaArtifact":return o.jsx(du,{className:t});case"ServiceArtifact":return o.jsx(Ui,{className:t});case"StatisticsArtifact":return o.jsx(Ui,{className:t});default:return o.jsx($t,{className:t})}}const ln=e=>q.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},q.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM12 6C12.5523 6 13 6.44772 13 7V17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17V7C11 6.44772 11.4477 6 12 6ZM16 10C16.5523 10 17 10.4477 17 11V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V11C15 10.4477 15.4477 10 16 10ZM8 12C8.55229 12 9 12.4477 9 13V17C9 17.5523 8.55229 18 8 18C7.44772 18 7 17.5523 7 17V13C7 12.4477 7.44772 12 8 12Z"})),xi=e=>q.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},q.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM10.2071 8.29289C10.5976 8.68342 10.5976 9.31658 10.2071 9.70711L7.91421 12L10.2071 14.2929C10.5976 14.6834 10.5976 15.3166 10.2071 15.7071C9.81658 16.0976 9.18342 16.0976 8.79289 15.7071L5.79289 12.7071C5.40237 12.3166 5.40237 11.6834 5.79289 11.2929L8.79289 8.29289C9.18342 7.90237 9.81658 7.90237 10.2071 8.29289ZM13.7929 8.29289C14.1834 7.90237 14.8166 7.90237 15.2071 8.29289L18.2071 11.2929C18.5976 11.6834 18.5976 12.3166 18.2071 12.7071L15.2071 15.7071C14.8166 16.0976 14.1834 16.0976 13.7929 15.7071C13.4024 15.3166 13.4024 14.6834 13.7929 14.2929L16.0858 12L13.7929 9.70711C13.4024 9.31658 13.4024 8.68342 13.7929 8.29289Z"})),jl=q.createContext(null);function Vu({children:e}){const[t,n]=q.useState(new Set),r=a=>t.has(a),i=a=>{n(s=>{const l=new Set(s);return l.add(a),l})};return o.jsx(jl.Provider,{value:{confirmedVisualizations:t,isVisualizationConfirmed:r,confirmVisualization:i},children:e})}function Nl(){const e=q.useContext(jl);if(!e)throw new Error("useArtifactLoadConfirmationContext must be used within a VisualizationConfirmProvider");return e}function Hu({versionId:e}){return["artifact_versions",e]}async function Wu({versionId:e}){const t=Xe(et.artifactVersions.detail(e)),n=await jt(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(n.status===404&&Gt(),!n.ok)throw new Ke({message:`Error while fetching artifact version ${e}`,status:n.status,statusText:n.statusText});return n.json()}function Ft(e,t){return st({queryKey:Hu(e),queryFn:()=>Wu(e),...t})}function Uu({runId:e,queryParams:t={}}){return["runs",e,t]}async function El({runId:e,queryParams:t={}}){const n=tl(t),r=Xe(et.runs.detail(e))+(n?`?${n}`:""),i=await jt(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(i.status===404&&Gt(),!i.ok)throw new Ke({message:`Error while fetching pipeline run ${e}`,status:i.status,statusText:i.statusText});return i.json()}function Te(e,t){return st({queryKey:Uu(e),queryFn:()=>El(e),...t})}function $u({stepId:e}){return["steps",e]}async function Gu({stepId:e}){const t=Xe(et.steps.detail(e)),n=await jt(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(n.status===404&&Gt(),!n.ok)throw new Ke({message:`Error while fetching step ${e}`,status:n.status,statusText:n.statusText});return n.json()}function yt(e,t){return st({queryKey:$u(e),queryFn:()=>Gu(e),...t})}async function Zu({artifactVersionId:e}){const t=Xe(et.artifactVersions.downloadToken(e)),n=await jt(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!n.ok){const r=await n.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>"Error while fetching artifact download token");throw new Ke({status:n.status,statusText:n.statusText,message:r})}return n.json()}function Ju(e){return fl({...e,mutationFn:async t=>Zu(t)})}function Qu({artifactVersionId:e}){const{toast:t}=oi(),n=Xe(et.artifactVersions.data(e)),{mutate:r,isPending:i}=Ju({onSuccess:s=>{window.open(`${n}?${new URLSearchParams({token:s})}`,"_blank")},onError:s=>{t({status:"error",emphasis:"subtle",rounded:!0,description:s.message})}});function a(){r({artifactVersionId:e})}return o.jsx(ve,{onClick:a,disabled:i,type:"button",children:"Download"})}function Ku({artifactVersionId:e}){var i,a,s,l,u,c,d,h,f,p,v;const t=Ft({versionId:e}),n=(a=(i=t.data)==null?void 0:i.resources)==null?void 0:a.producer_pipeline_run_id,r=(l=(s=t.data)==null?void 0:s.resources)==null?void 0:l.producer_step_run_id;return t.isPending?o.jsx(re,{className:"h-[500px] w-full"}):t.isError?o.jsx(ut,{err:t.error}):o.jsx(ct,{initialOpen:!0,title:"Details",children:o.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[n&&o.jsx(Xu,{producerRunId:n}),r&&o.jsx(Yu,{producerStepId:r}),o.jsx(de,{label:"Materializer",value:o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsx(Ae,{className:"cursor-default",children:(u=t.data.body)==null?void 0:u.materializer.attribute}),o.jsxs(Oe,{align:"start",children:[(c=t.data.body)==null?void 0:c.materializer.module,".",(d=t.data.body)==null?void 0:d.materializer.attribute]})]})})}),o.jsx(de,{label:"Type",value:(h=t.data.body)==null?void 0:h.type}),o.jsx(de,{label:"Author",value:o.jsx("div",{className:"inline-flex items-center gap-1",children:o.jsx(ui,{username:((p=(f=t.data.resources)==null?void 0:f.user)==null?void 0:p.name)||""})})}),o.jsx(de,{label:"Updated",value:o.jsx(Wt,{dateString:((v=t.data.body)==null?void 0:v.updated)||""})})]})})}function Yu({producerStepId:e}){const t=yt({stepId:e});return t.isPending?o.jsx(de,{label:"Producer Step",value:o.jsx(re,{className:"h-5 w-full"})}):t.isError?null:o.jsx(de,{label:"Producer Step",value:o.jsx(o.Fragment,{children:t.data?o.jsxs(Le,{color:fn("completed"),className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[o.jsx(gt,{className:"mr-1 fill-current",status:"completed"}),t.data.name]}):o.jsx(re,{className:"h-full w-[150px]"})})})}function Xu({producerRunId:e}){var n,r,i,a,s;const t=Te({runId:e});return t.isPending?o.jsx(de,{label:o.jsx(re,{className:"h-5 w-full"}),value:o.jsx(re,{className:"h-5 w-full"})}):t.isError?null:o.jsxs(o.Fragment,{children:[o.jsx(de,{label:"Pipeline",value:o.jsx(kt,{to:it.projects.pipelines.namespace(encodeURIComponent((r=(n=t.data.body)==null?void 0:n.pipeline)==null?void 0:r.name)),children:o.jsxs(Le,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[o.jsx(pi,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(a=(i=t.data.body)==null?void 0:i.pipeline)==null?void 0:a.name]})})}),o.jsx(de,{label:"Producer Run",value:o.jsx(kt,{to:it.projects.runs.detail(e),children:o.jsxs(Le,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:fn((s=t.data.body)==null?void 0:s.status),children:[o.jsx(gu,{className:"mr-1 h-4 w-4 fill-current"}),e.split("-")[0]]})})})]})}function ec({artifactVersionId:e}){var s,l,u,c;const{data:t,isPending:n,isError:r,error:i}=Ft({versionId:e}),a=(s=t==null?void 0:t.body)==null?void 0:s.artifact_store_id;return r?o.jsx(ut,{err:i}):n?o.jsx(re,{className:"h-[500px] w-full"}):o.jsx(ct,{initialOpen:!0,title:"Data",children:o.jsxs("dl",{className:"grid w-full grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[o.jsxs("dt",{className:"col-span-3 flex items-center justify-between text-theme-text-secondary",children:["Uri",o.jsx(Qu,{artifactVersionId:e})]}),o.jsx("dd",{className:"col-span-3 w-full truncate text-neutral-700",children:o.jsx("div",{className:"pb-2",children:o.jsx(Ue,{fullWidth:!0,code:t.body.uri})})}),a&&o.jsx(de,{label:"Artifact Store",value:o.jsx(nc,{artifactStoreId:a})}),o.jsx(de,{label:"Data Type",value:o.jsx(Le,{className:"flex w-fit items-center text-theme-text-primary",color:"grey",emphasis:"subtle",rounded:!1,children:o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsx(Ae,{className:"cursor-auto",children:(l=t.body)==null?void 0:l.data_type.attribute}),o.jsxs(Oe,{children:[(u=t.body)==null?void 0:u.data_type.module,".",(c=t.body)==null?void 0:c.data_type.attribute," "]})]})})})})]})})}function tc({artifactVersionId:e}){return o.jsx(ct,{initialOpen:!0,title:"Code",children:o.jsx(Ue,{fullWidth:!0,highlightCode:!0,wrap:!0,code:dl(e)})})}function nc({artifactStoreId:e}){var s,l;const t=st({...Oo.componentDetail(e)});if(t.isPending)return o.jsx(re,{className:"h-6 w-12"});if(t.isError)return o.jsx("p",{children:"Error loading artifact store"});const n=t.data,r=it.components.detail(e),i=((s=n.body)==null?void 0:s.type)||"orchestrator",a=(l=n.body)==null?void 0:l.logo_url;return o.jsx(kt,{to:r,children:o.jsxs(Le,{emphasis:"subtle",rounded:!1,className:"flex w-fit items-center gap-0.5 text-theme-text-primary",color:"grey",children:[a?o.jsx("img",{alt:n.name,width:20,height:20,className:"shrink-0 object-contain",src:a}):o.jsx(fu,{className:"aspect-square h-4 w-4 fill-primary-400 object-contain",type:i}),n.name]})})}function rc({artifactVersionId:e}){const{data:t,isError:n,error:r}=Ft({versionId:e});return n?o.jsx(ut,{err:r}):o.jsxs("div",{className:"space-y-5",children:[t?o.jsx(Ku,{artifactVersionId:t.id}):o.jsx(re,{className:"h-[500px] rounded-md lg:col-span-2"}),t?o.jsx(ec,{artifactVersionId:t.id}):o.jsx(re,{className:"h-[500px] rounded-md lg:col-span-2"}),t?o.jsx(tc,{artifactVersionId:t.id}):o.jsx(re,{className:"h-[500px] rounded-md lg:col-span-2"})]})}function yi({metadata:e}){const t=Object.entries(e||{}).filter(([n,r])=>xl(r));return o.jsx(o.Fragment,{children:t.map(([n,r],i)=>o.jsx(He,{data:r,title:n},i))})}function bi({metadata:e,title:t}){const n=/^<class\s+'.*'>$/,r=Object.entries(e).filter(([a,s])=>!xl(s));if(r.length===0)return null;r.sort((a,s)=>a[0].localeCompare(s[0]));const i=r.reduce((a,[s,l])=>(a[s]=l,a),{});return o.jsx("div",{children:o.jsx(ct,{headerClassName:"flex items-center gap-2",headerChildren:o.jsx(vu,{copyText:JSON.stringify(i)}),initialOpen:!0,title:t||"Uncategorized",children:o.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:r.map(([a,s],l)=>o.jsx(de,{label:o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsx(Ae,{className:"cursor-default truncate",children:a}),o.jsx(Oe,{className:"max-w-[480px]",children:a})]})}),value:o.jsx(o.Fragment,{children:mt(s)&&n.test(s)?o.jsx(Ue,{className:"py-1",highlightCode:!0,code:s}):mt(s)&&Lo(s)?o.jsx("a",{className:"underline transition-all duration-200 hover:decoration-transparent",href:s,target:"_blank",rel:"noopener noreferrer",children:s}):o.jsx("div",{className:"whitespace-normal",children:mt(s)?s:JSON.stringify(s)})})},l))})})})}function ic({artifactVersionId:e}){var i,a,s;const{data:t,isError:n,error:r}=Ft({versionId:e});return n?o.jsx(ut,{err:r}):!((i=t==null?void 0:t.metadata)!=null&&i.run_metadata)||Object.keys(t.metadata.run_metadata).length===0?o.jsx(We,{icon:o.jsx($t,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),o.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available for this artifact."})]})}):o.jsxs("div",{className:"flex flex-col gap-5",children:[t?o.jsx(bi,{metadata:(a=t.metadata)==null?void 0:a.run_metadata}):o.jsx(re,{className:"h-9 w-full"}),t?o.jsx(yi,{metadata:(s=t.metadata)==null?void 0:s.run_metadata}):o.jsx(re,{className:"h-9 w-full"})]})}function Sl({versionId:e,params:t}){return["artifact_versions",e,"visualize",t]}async function ac({versionId:e,params:t={}},n){const r=tl(t).toString(),i=Xe(et.artifactVersions.visualize(e)+(r?`?${r}`:"")),a=await jt(i,{method:"GET",headers:{"Content-Type":"application/json"},signal:n});if(a.status===404){const s=await a.json().then(l=>l.detail).catch(()=>["","Failed to fetch artifact visualization"]);throw new Ke({message:s[1]||"Failed to fetch artifact visualization",status:a.status,statusText:a.statusText})}if(!a.ok)throw new Ke({message:`Error while fetching artifact visualization for version ${e}`,status:a.status,statusText:a.statusText});return a.json()}function _l(e,t){return st({queryKey:Sl(e),queryFn:({signal:n})=>ac(e,n),...t})}function sc({content:e}){const t=q.useRef(null),n=()=>{var r;if(t.current){const i=(r=t.current.contentWindow)==null?void 0:r.document.documentElement.scrollHeight;t.current.height=i?`${i}px`:"100%"}};return q.useEffect(()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[]),o.jsx("div",{children:o.jsx("iframe",{className:"w-full",title:"Secure HTML Content",ref:t,srcDoc:e,onLoad:n})})}function lc({content:e}){return o.jsx("div",{className:"flex items-center justify-center",children:o.jsx("img",{src:nl("data:image/png;base64,"+e),alt:"Visualization for artifact"})})}function oc({content:e}){const t=uc(e);return o.jsx(Ue,{fullWidth:!0,highlightCode:!0,code:mt(t)?t:JSON.stringify(t,null,2)})}function uc(e){try{return JSON.parse(e)}catch{return e}}const cc=e=>q.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},q.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C12.5523 2 13 2.44772 13 3V12.5858L16.2929 9.29289C16.6834 8.90237 17.3166 8.90237 17.7071 9.29289C18.0976 9.68342 18.0976 10.3166 17.7071 10.7071L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L6.29289 10.7071C5.90237 10.3166 5.90237 9.68342 6.29289 9.29289C6.68342 8.90237 7.31658 8.90237 7.70711 9.29289L11 12.5858V3C11 2.44772 11.4477 2 12 2ZM3 14C3.55229 14 4 14.4477 4 15V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V15C20 14.4477 20.4477 14 21 14C21.5523 14 22 14.4477 22 15V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413L2 15C2 14.4477 2.44772 14 3 14Z"})),dc={image:"png",html:"html",markdown:"md",csv:"csv",json:"json"},hc={image:"image/png",html:"text/html",markdown:"text/markdown",csv:"text/csv",json:"application/json"};function Al({artifactVersionId:e,visualizationIndex:t,artifactName:n}){const r={index:t},{data:i,isSuccess:a}=_l({versionId:e,params:r},{retry:!1});if(!a)return null;const{type:s,value:l}=i;function u(){const d=atob(l),h=new Array(d.length);for(let p=0;p<d.length;p++)h[p]=d.charCodeAt(p);return new Uint8Array(h)}function c(){try{const d=new Blob([s==="image"?u():l],{type:hc[s]}),h=window.URL.createObjectURL(d),f=document.createElement("a");f.href=h,f.download=`${n}_${t}.`+dc[s],f.click()}catch(d){console.error(d)}}return o.jsxs(ve,{intent:"secondary",emphasis:"subtle",size:"md",className:"flex items-center gap-1 bg-theme-surface-primary",onClick:c,children:[o.jsx(cc,{width:24,height:24,className:"shrink-0 fill-theme-text-primary"}),"Download"]})}function fc(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const pc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gc={};function $i(e,t){return(gc.jsx?mc:pc).test(e)}const xc=/[ \t\n\f\r]/g;function yc(e){return typeof e=="object"?e.type==="text"?Gi(e.value):!1:Gi(e)}function Gi(e){return e.replace(xc,"")===""}class Zt{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Zt.prototype.property={};Zt.prototype.normal={};Zt.prototype.space=null;function Ol(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Zt(n,r,t)}function Kr(e){return e.toLowerCase()}class $e{constructor(t,n){this.property=t,this.attribute=n}}$e.prototype.space=null;$e.prototype.boolean=!1;$e.prototype.booleanish=!1;$e.prototype.overloadedBoolean=!1;$e.prototype.number=!1;$e.prototype.commaSeparated=!1;$e.prototype.spaceSeparated=!1;$e.prototype.commaOrSpaceSeparated=!1;$e.prototype.mustUseProperty=!1;$e.prototype.defined=!1;let bc=0;const ie=Nt(),ye=Nt(),Ll=Nt(),B=Nt(),pe=Nt(),Lt=Nt(),Re=Nt();function Nt(){return 2**++bc}const Yr=Object.freeze(Object.defineProperty({__proto__:null,boolean:ie,booleanish:ye,commaOrSpaceSeparated:Re,commaSeparated:Lt,number:B,overloadedBoolean:Ll,spaceSeparated:pe},Symbol.toStringTag,{value:"Module"})),vn=Object.keys(Yr);class wi extends $e{constructor(t,n,r,i){let a=-1;if(super(t,n),Zi(this,"space",i),typeof r=="number")for(;++a<vn.length;){const s=vn[a];Zi(this,vn[a],(r&Yr[s])===Yr[s])}}}wi.prototype.defined=!0;function Zi(e,t,n){n&&(e[t]=n)}const wc={}.hasOwnProperty;function zt(e){const t={},n={};let r;for(r in e.properties)if(wc.call(e.properties,r)){const i=e.properties[r],a=new wi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Kr(r)]=r,n[Kr(a.attribute)]=r}return new Zt(t,n,e.space)}const Il=zt({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Tl=zt({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Pl(e,t){return t in e?e[t]:t}function Ml(e,t){return Pl(e,t.toLowerCase())}const Rl=zt({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ml,properties:{xmlns:null,xmlnsXLink:null}}),Dl=zt({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:ye,ariaAutoComplete:null,ariaBusy:ye,ariaChecked:ye,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:pe,ariaCurrent:null,ariaDescribedBy:pe,ariaDetails:null,ariaDisabled:ye,ariaDropEffect:pe,ariaErrorMessage:null,ariaExpanded:ye,ariaFlowTo:pe,ariaGrabbed:ye,ariaHasPopup:null,ariaHidden:ye,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pe,ariaLevel:B,ariaLive:null,ariaModal:ye,ariaMultiLine:ye,ariaMultiSelectable:ye,ariaOrientation:null,ariaOwns:pe,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:ye,ariaReadOnly:ye,ariaRelevant:null,ariaRequired:ye,ariaRoleDescription:pe,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:ye,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null}}),vc=zt({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ml,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Lt,acceptCharset:pe,accessKey:pe,action:null,allow:null,allowFullScreen:ie,allowPaymentRequest:ie,allowUserMedia:ie,alt:null,as:null,async:ie,autoCapitalize:null,autoComplete:pe,autoFocus:ie,autoPlay:ie,blocking:pe,capture:null,charSet:null,checked:ie,cite:null,className:pe,cols:B,colSpan:null,content:null,contentEditable:ye,controls:ie,controlsList:pe,coords:B|Lt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ie,defer:ie,dir:null,dirName:null,disabled:ie,download:Ll,draggable:ye,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ie,formTarget:null,headers:pe,height:B,hidden:ie,high:B,href:null,hrefLang:null,htmlFor:pe,httpEquiv:pe,id:null,imageSizes:null,imageSrcSet:null,inert:ie,inputMode:null,integrity:null,is:null,isMap:ie,itemId:null,itemProp:pe,itemRef:pe,itemScope:ie,itemType:pe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ie,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:ie,muted:ie,name:null,nonce:null,noModule:ie,noValidate:ie,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ie,optimum:B,pattern:null,ping:pe,placeholder:null,playsInline:ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ie,referrerPolicy:null,rel:pe,required:ie,reversed:ie,rows:B,rowSpan:B,sandbox:pe,scope:null,scoped:ie,seamless:ie,selected:ie,shadowRootClonable:ie,shadowRootDelegatesFocus:ie,shadowRootMode:null,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:ye,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:ie,useMap:null,value:ye,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pe,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ie,declare:ie,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:ie,noHref:ie,noShade:ie,noWrap:ie,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:ye,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ie,disableRemotePlayback:ie,prefix:null,property:null,results:B,security:null,unselectable:null}}),Cc=zt({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Pl,properties:{about:Re,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:pe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Lt,g2:Lt,glyphName:Lt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:Re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:B,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Re,rev:Re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Re,requiredFeatures:Re,requiredFonts:Re,requiredFormats:Re,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:Re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Re,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),kc=/^data[-\w.:]+$/i,Ji=/-[a-z]/g,jc=/[A-Z]/g;function Nc(e,t){const n=Kr(t);let r=t,i=$e;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&kc.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ji,Sc);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ji.test(a)){let s=a.replace(jc,Ec);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=wi}return new i(r,t)}function Ec(e){return"-"+e.toLowerCase()}function Sc(e){return e.charAt(1).toUpperCase()}const _c={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Ac=Ol([Tl,Il,Rl,Dl,vc],"html"),vi=Ol([Tl,Il,Rl,Dl,Cc],"svg");function Oc(e){return e.join(" ").trim()}var _t={},Cn,Qi;function Lc(){if(Qi)return Cn;Qi=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
2
- `,c="/",d="*",h="",f="comment",p="declaration";Cn=function(j,x){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];x=x||{};var w=1,b=1;function k(I){var P=I.match(t);P&&(w+=P.length);var z=I.lastIndexOf(u);b=~z?I.length-z:b+I.length}function E(){var I={line:w,column:b};return function(P){return P.position=new O(I),g(),P}}function O(I){this.start=I,this.end={line:w,column:b},this.source=x.source}O.prototype.content=j;function C(I){var P=new Error(x.source+":"+w+":"+b+": "+I);if(P.reason=I,P.filename=x.source,P.line=w,P.column=b,P.source=j,!x.silent)throw P}function L(I){var P=I.exec(j);if(P){var z=P[0];return k(z),j=j.slice(z.length),P}}function g(){L(n)}function y(I){var P;for(I=I||[];P=N();)P!==!1&&I.push(P);return I}function N(){var I=E();if(!(c!=j.charAt(0)||d!=j.charAt(1))){for(var P=2;h!=j.charAt(P)&&(d!=j.charAt(P)||c!=j.charAt(P+1));)++P;if(P+=2,h===j.charAt(P-1))return C("End of comment missing");var z=j.slice(2,P-2);return b+=2,k(z),j=j.slice(P),b+=2,I({type:f,comment:z})}}function S(){var I=E(),P=L(r);if(P){if(N(),!L(i))return C("property missing ':'");var z=L(a),K=I({type:p,property:v(P[0].replace(e,h)),value:z?v(z[0].replace(e,h)):h});return L(s),K}}function A(){var I=[];y(I);for(var P;P=S();)P!==!1&&(I.push(P),y(I));return I}return g(),A()};function v(j){return j?j.replace(l,h):h}return Cn}var Ki;function Ic(){if(Ki)return _t;Ki=1;var e=_t&&_t.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_t,"__esModule",{value:!0});var t=e(Lc());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),l=typeof i=="function";return s.forEach(function(u){if(u.type==="declaration"){var c=u.property,d=u.value;l?i(c,d,u):d&&(a=a||{},a[c]=d)}}),a}return _t.default=n,_t}var Tc=Ic();const Yi=li(Tc),Pc=Yi.default||Yi,Fl=zl("end"),Ci=zl("start");function zl(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Mc(e){const t=Ci(e),n=Fl(e);if(t&&n)return{start:t,end:n}}function Vt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Xi(e.position):"start"in e||"end"in e?Xi(e):"line"in e||"column"in e?Xr(e):""}function Xr(e){return ea(e&&e.line)+":"+ea(e&&e.column)}function Xi(e){return Xr(e&&e.start)+"-"+Xr(e&&e.end)}function ea(e){return e&&typeof e=="number"?e:1}class Ce extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=l?l.line:void 0,this.name=Vt(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ce.prototype.file="";Ce.prototype.name="";Ce.prototype.reason="";Ce.prototype.message="";Ce.prototype.stack="";Ce.prototype.column=void 0;Ce.prototype.line=void 0;Ce.prototype.ancestors=void 0;Ce.prototype.cause=void 0;Ce.prototype.fatal=void 0;Ce.prototype.place=void 0;Ce.prototype.ruleId=void 0;Ce.prototype.source=void 0;const ki={}.hasOwnProperty,Rc=new Map,Dc=/[A-Z]/g,Fc=/-([a-z])/g,zc=new Set(["table","tbody","thead","tfoot","tr"]),Bc=new Set(["td","th"]),Bl="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qc(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Jc(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Zc(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?vi:Ac,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ql(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ql(e,t,n){if(t.type==="element")return Vc(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Hc(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Uc(e,t,n);if(t.type==="mdxjsEsm")return Wc(e,t);if(t.type==="root")return $c(e,t,n);if(t.type==="text")return Gc(e,t)}function Vc(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=vi,e.schema=i),e.ancestors.push(t);const a=Hl(e,t.tagName,!1),s=Qc(e,t);let l=Ni(e,t);return zc.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!yc(u):!0})),Vl(e,s,a,t),ji(s,l),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Hc(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ut(e,t.position)}function Wc(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ut(e,t.position)}function Uc(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=vi,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Hl(e,t.name,!0),s=Kc(e,t),l=Ni(e,t);return Vl(e,s,a,t),ji(s,l),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function $c(e,t,n){const r={};return ji(r,Ni(e,t)),e.create(t,e.Fragment,r,n)}function Gc(e,t){return t.value}function Vl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ji(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Zc(e,t,n){return r;function r(i,a,s,l){const c=Array.isArray(s.children)?n:t;return l?c(a,s,l):c(a,s)}}function Jc(e,t){return n;function n(r,i,a,s){const l=Array.isArray(a.children),u=Ci(r);return t(i,a,s,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Qc(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ki.call(t.properties,i)){const a=Yc(e,i,t.properties[i]);if(a){const[s,l]=a;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&Bc.has(t.tagName)?r=l:n[s]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Kc(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Ut(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Ut(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Ni(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Rc;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const c=i.get(u)||0;s=u+"-"+c,i.set(u,c+1)}}const l=ql(e,a,s);l!==void 0&&n.push(l)}return n}function Yc(e,t,n){const r=Nc(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?fc(n):Oc(n)),r.property==="style"){let i=typeof n=="object"?n:Xc(e,String(n));return e.stylePropertyNameCase==="css"&&(i=e1(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?_c[r.property]||r.property:r.attribute,n]}}function Xc(e,t){const n={};try{Pc(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,s=new Ce("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Bl+"#cannot-parse-style-attribute",s}}return n;function r(i,a){let s=i;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(Fc,n1)),n[s]=a}}function Hl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const l=$i(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=s}else r=$i(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return ki.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ut(e)}function Ut(e,t){const n=new Ce("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Bl+"#cannot-handle-mdx-estrees-without-createevaluater",n}function e1(e){const t={};let n;for(n in e)ki.call(e,n)&&(t[t1(n)]=e[n]);return t}function t1(e){let t=e.replace(Dc,r1);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function n1(e,t){return t.toUpperCase()}function r1(e){return"-"+e.toLowerCase()}const kn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},i1={};function a1(e,t){const n=i1,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Wl(e,r,i)}function Wl(e,t,n){if(s1(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ta(e.children,t,n)}return Array.isArray(e)?ta(e,t,n):""}function ta(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Wl(e[i],t,n);return r.join("")}function s1(e){return!!(e&&typeof e=="object")}const na=document.createElement("i");function Ei(e){const t="&"+e+";";na.innerHTML=t;const n=na.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function at(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Ve(e,t){return e.length>0?(at(e,e.length,0,t),e):t}const ra={}.hasOwnProperty;function l1(e){const t={};let n=-1;for(;++n<e.length;)o1(t,e[n]);return t}function o1(e,t){let n;for(n in t){const i=(ra.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){ra.call(i,s)||(i[s]=[]);const l=a[s];u1(i[s],Array.isArray(l)?l:l?[l]:[])}}}function u1(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);at(e,0,0,r)}function Ul(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function It(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const rt=bt(/[A-Za-z]/),ze=bt(/[\dA-Za-z]/),c1=bt(/[#-'*+\--9=?A-Z^-~]/);function ei(e){return e!==null&&(e<32||e===127)}const ti=bt(/\d/),d1=bt(/[\dA-Fa-f]/),h1=bt(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function Ee(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}const f1=bt(new RegExp("\\p{P}|\\p{S}","u")),p1=bt(/\s/);function bt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&ze(e.charCodeAt(n+1))&&ze(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(s=String.fromCharCode(a,l),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function me(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return he(u)?(e.enter(n),l(u)):t(u)}function l(u){return he(u)&&a++<i?(e.consume(u),l):(e.exit(n),t(u))}}const m1={tokenize:g1};function g1(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),me(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Y(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),s)}}const x1={tokenize:y1},ia={tokenize:b1};function y1(e){const t=this,n=[];let r=0,i,a,s;return l;function l(k){if(r<n.length){const E=n[r];return t.containerState=E[1],e.attempt(E[0].continuation,u,c)(k)}return c(k)}function u(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const E=t.events.length;let O=E,C;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){C=t.events[O][1].end;break}w(r);let L=E;for(;L<t.events.length;)t.events[L][1].end=Object.assign({},C),L++;return at(t.events,O+1,0,t.events.slice(E)),t.events.length=L,c(k)}return l(k)}function c(k){if(r===n.length){if(!i)return f(k);if(i.currentConstruct&&i.currentConstruct.concrete)return v(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ia,d,h)(k)}function d(k){return i&&b(),w(r),f(k)}function h(k){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,v(k)}function f(k){return t.containerState={},e.attempt(ia,p,v)(k)}function p(k){return r++,n.push([t.currentConstruct,t.containerState]),f(k)}function v(k){if(k===null){i&&b(),w(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),j(k)}function j(k){if(k===null){x(e.exit("chunkFlow"),!0),w(0),e.consume(k);return}return Y(k)?(e.consume(k),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(k),j)}function x(k,E){const O=t.sliceStream(k);if(E&&O.push(null),k.previous=a,a&&(a.next=k),a=k,i.defineSkip(k.start),i.write(O),t.parser.lazy[k.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<s&&(!i.events[C][1].end||i.events[C][1].end.offset>s))return;const L=t.events.length;let g=L,y,N;for(;g--;)if(t.events[g][0]==="exit"&&t.events[g][1].type==="chunkFlow"){if(y){N=t.events[g][1].end;break}y=!0}for(w(r),C=L;C<t.events.length;)t.events[C][1].end=Object.assign({},N),C++;at(t.events,g+1,0,t.events.slice(L)),t.events.length=C}}function w(k){let E=n.length;for(;E-- >k;){const O=n[E];t.containerState=O[1],O[0].exit.call(t,e)}n.length=k}function b(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function b1(e,t,n){return me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function aa(e){if(e===null||Ee(e)||p1(e))return 1;if(f1(e))return 2}function Si(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const ni={name:"attention",tokenize:v1,resolveAll:w1};function w1(e,t){let n=-1,r,i,a,s,l,u,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h=Object.assign({},e[r][1].end),f=Object.assign({},e[n][1].start);sa(h,-u),sa(f,u),s={type:u>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[r][1].end)},l={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:f},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},l.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},l.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Ve(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Ve(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=Ve(c,Si(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Ve(c,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=Ve(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,at(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function v1(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=aa(r);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),l(u)}function l(u){if(u===a)return e.consume(u),l;const c=e.exit("attentionSequence"),d=aa(u),h=!d||d===2&&i||n.includes(u),f=!i||i===2&&d||n.includes(r);return c._open=!!(a===42?h:h&&(i||!f)),c._close=!!(a===42?f:f&&(d||!h)),t(u)}}function sa(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const C1={name:"autolink",tokenize:k1};function k1(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return rt(p)?(e.consume(p),s):c(p)}function s(p){return p===43||p===45||p===46||ze(p)?(r=1,l(p)):c(p)}function l(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||ze(p))&&r++<32?(e.consume(p),l):(r=0,c(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ei(p)?n(p):(e.consume(p),u)}function c(p){return p===64?(e.consume(p),d):c1(p)?(e.consume(p),c):n(p)}function d(p){return ze(p)?h(p):n(p)}function h(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||ze(p))&&r++<63){const v=p===45?f:h;return e.consume(p),v}return n(p)}}const mn={tokenize:j1,partial:!0};function j1(e,t,n){return r;function r(a){return he(a)?me(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Y(a)?t(a):n(a)}}const $l={name:"blockQuote",tokenize:N1,continuation:{tokenize:E1},exit:S1};function N1(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return he(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function E1(e,t,n){const r=this;return i;function i(s){return he(s)?me(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt($l,t,n)(s)}}function S1(e){e.exit("blockQuote")}const Gl={name:"characterEscape",tokenize:_1};function _1(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return h1(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Zl={name:"characterReference",tokenize:A1};function A1(e,t,n){const r=this;let i=0,a,s;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),u}function u(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=ze,d(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=d1,d):(e.enter("characterReferenceValue"),a=7,s=ti,d(h))}function d(h){if(h===59&&i){const f=e.exit("characterReferenceValue");return s===ze&&!Ei(r.sliceSerialize(f))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(h)&&i++<a?(e.consume(h),d):n(h)}}const la={tokenize:L1,partial:!0},oa={name:"codeFenced",tokenize:O1,concrete:!0};function O1(e,t,n){const r=this,i={tokenize:O,partial:!0};let a=0,s=0,l;return u;function u(C){return c(C)}function c(C){const L=r.events[r.events.length-1];return a=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,l=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(C)}function d(C){return C===l?(s++,e.consume(C),d):s<3?n(C):(e.exit("codeFencedFenceSequence"),he(C)?me(e,h,"whitespace")(C):h(C))}function h(C){return C===null||Y(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(la,j,E)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(C))}function f(C){return C===null||Y(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(C)):he(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),me(e,p,"whitespace")(C)):C===96&&C===l?n(C):(e.consume(C),f)}function p(C){return C===null||Y(C)?h(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(C))}function v(C){return C===null||Y(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(C)):C===96&&C===l?n(C):(e.consume(C),v)}function j(C){return e.attempt(i,E,x)(C)}function x(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),w}function w(C){return a>0&&he(C)?me(e,b,"linePrefix",a+1)(C):b(C)}function b(C){return C===null||Y(C)?e.check(la,j,E)(C):(e.enter("codeFlowValue"),k(C))}function k(C){return C===null||Y(C)?(e.exit("codeFlowValue"),b(C)):(e.consume(C),k)}function E(C){return e.exit("codeFenced"),t(C)}function O(C,L,g){let y=0;return N;function N(z){return C.enter("lineEnding"),C.consume(z),C.exit("lineEnding"),S}function S(z){return C.enter("codeFencedFence"),he(z)?me(C,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):A(z)}function A(z){return z===l?(C.enter("codeFencedFenceSequence"),I(z)):g(z)}function I(z){return z===l?(y++,C.consume(z),I):y>=s?(C.exit("codeFencedFenceSequence"),he(z)?me(C,P,"whitespace")(z):P(z)):g(z)}function P(z){return z===null||Y(z)?(C.exit("codeFencedFence"),L(z)):g(z)}}}function L1(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const jn={name:"codeIndented",tokenize:T1},I1={tokenize:P1,partial:!0};function T1(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),me(e,a,"linePrefix",5)(c)}function a(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?u(c):Y(c)?e.attempt(I1,s,u)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||Y(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),l)}function u(c){return e.exit("codeIndented"),t(c)}}function P1(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Y(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):me(e,a,"linePrefix",5)(s)}function a(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):Y(s)?i(s):n(s)}}const M1={name:"codeText",tokenize:F1,resolve:R1,previous:D1};function R1(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function D1(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function F1(e,t,n){let r=0,i,a;return s;function s(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),r++,l):(e.exit("codeTextSequence"),u(h))}function u(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),u):h===96?(a=e.enter("codeTextSequence"),i=0,d(h)):Y(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||Y(h)?(e.exit("codeTextData"),u(h)):(e.consume(h),c)}function d(h){return h===96?(e.consume(h),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",c(h))}}function Jl(e){const t={};let n=-1,r,i,a,s,l,u,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,z1(e,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(s=e[a],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},e[i][1].start),l=e.slice(i,n),l.unshift(r),at(e,i,n-i+1,l))}}return!c}function z1(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const a=[],s=n._tokenizer||r.parser[n.contentType](n.start),l=s.events,u=[],c={};let d,h,f=-1,p=n,v=0,j=0;const x=[j];for(;p;){for(;e[++i][1]!==p;);a.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),h&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(j=f+1,x.push(j),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):x.pop(),f=x.length;f--;){const w=l.slice(x[f],x[f+1]),b=a.pop();u.unshift([b,b+w.length-1]),at(e,b,2,w)}for(f=-1;++f<u.length;)c[v+u[f][0]]=v+u[f][1],v+=u[f][1]-u[f][0]-1;return c}const B1={tokenize:H1,resolve:V1},q1={tokenize:W1,partial:!0};function V1(e){return Jl(e),e}function H1(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):Y(l)?e.check(q1,s,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function W1(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),me(e,a,"linePrefix")}function a(s){if(s===null||Y(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Ql(e,t,n,r,i,a,s,l,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return h;function h(w){return w===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(w),e.exit(a),f):w===null||w===32||w===41||ei(w)?n(w):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),j(w))}function f(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(e.exit("chunkString"),e.exit(l),f(w)):w===null||w===60||Y(w)?n(w):(e.consume(w),w===92?v:p)}function v(w){return w===60||w===62||w===92?(e.consume(w),p):p(w)}function j(w){return!d&&(w===null||w===41||Ee(w))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(w)):d<c&&w===40?(e.consume(w),d++,j):w===41?(e.consume(w),d--,j):w===null||w===32||w===40||ei(w)?n(w):(e.consume(w),w===92?x:j)}function x(w){return w===40||w===41||w===92?(e.consume(w),j):j(w)}}function Kl(e,t,n,r,i,a){const s=this;let l=0,u;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),d}function d(p){return l>999||p===null||p===91||p===93&&!u||p===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Y(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||Y(p)||l++>999?(e.exit("chunkString"),d(p)):(e.consume(p),u||(u=!he(p)),p===92?f:h)}function f(p){return p===91||p===92||p===93?(e.consume(p),l++,h):h(p)}}function Yl(e,t,n,r,i,a){let s;return l;function l(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,u):n(f)}function u(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(a),c(f))}function c(f){return f===s?(e.exit(a),u(s)):f===null?n(f):Y(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),me(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===s||f===null||Y(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?h:d)}function h(f){return f===s||f===92?(e.consume(f),d):d(f)}}function Ht(e,t){let n;return r;function r(i){return Y(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):he(i)?me(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const U1={name:"definition",tokenize:G1},$1={tokenize:Z1,partial:!0};function G1(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),s(p)}function s(p){return Kl.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return i=It(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return Ee(p)?Ht(e,c)(p):c(p)}function c(p){return Ql(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt($1,h,h)(p)}function h(p){return he(p)?me(e,f,"whitespace")(p):f(p)}function f(p){return p===null||Y(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Z1(e,t,n){return r;function r(l){return Ee(l)?Ht(e,i)(l):n(l)}function i(l){return Yl(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return he(l)?me(e,s,"whitespace")(l):s(l)}function s(l){return l===null||Y(l)?t(l):n(l)}}const J1={name:"hardBreakEscape",tokenize:Q1};function Q1(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Y(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const K1={name:"headingAtx",tokenize:X1,resolve:Y1};function Y1(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},at(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function X1(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||Ee(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||Y(d)?(e.exit("atxHeading"),t(d)):he(d)?me(e,l,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),l(d))}function c(d){return d===null||d===35||Ee(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),c)}}const ed=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ua=["pre","script","style","textarea"],td={name:"htmlFlow",tokenize:ad,resolveTo:id,concrete:!0},nd={tokenize:ld,partial:!0},rd={tokenize:sd,partial:!0};function id(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ad(e,t,n){const r=this;let i,a,s,l,u;return c;function c(m){return d(m)}function d(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),h}function h(m){return m===33?(e.consume(m),f):m===47?(e.consume(m),a=!0,j):m===63?(e.consume(m),i=3,r.interrupt?t:_):rt(m)?(e.consume(m),s=String.fromCharCode(m),x):n(m)}function f(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,l=0,v):rt(m)?(e.consume(m),i=4,r.interrupt?t:_):n(m)}function p(m){return m===45?(e.consume(m),r.interrupt?t:_):n(m)}function v(m){const T="CDATA[";return m===T.charCodeAt(l++)?(e.consume(m),l===T.length?r.interrupt?t:A:v):n(m)}function j(m){return rt(m)?(e.consume(m),s=String.fromCharCode(m),x):n(m)}function x(m){if(m===null||m===47||m===62||Ee(m)){const T=m===47,R=s.toLowerCase();return!T&&!a&&ua.includes(R)?(i=1,r.interrupt?t(m):A(m)):ed.includes(s.toLowerCase())?(i=6,T?(e.consume(m),w):r.interrupt?t(m):A(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(m):a?b(m):k(m))}return m===45||ze(m)?(e.consume(m),s+=String.fromCharCode(m),x):n(m)}function w(m){return m===62?(e.consume(m),r.interrupt?t:A):n(m)}function b(m){return he(m)?(e.consume(m),b):N(m)}function k(m){return m===47?(e.consume(m),N):m===58||m===95||rt(m)?(e.consume(m),E):he(m)?(e.consume(m),k):N(m)}function E(m){return m===45||m===46||m===58||m===95||ze(m)?(e.consume(m),E):O(m)}function O(m){return m===61?(e.consume(m),C):he(m)?(e.consume(m),O):k(m)}function C(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),u=m,L):he(m)?(e.consume(m),C):g(m)}function L(m){return m===u?(e.consume(m),u=null,y):m===null||Y(m)?n(m):(e.consume(m),L)}function g(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||Ee(m)?O(m):(e.consume(m),g)}function y(m){return m===47||m===62||he(m)?k(m):n(m)}function N(m){return m===62?(e.consume(m),S):n(m)}function S(m){return m===null||Y(m)?A(m):he(m)?(e.consume(m),S):n(m)}function A(m){return m===45&&i===2?(e.consume(m),K):m===60&&i===1?(e.consume(m),H):m===62&&i===4?(e.consume(m),$):m===63&&i===3?(e.consume(m),_):m===93&&i===5?(e.consume(m),W):Y(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(nd,Z,I)(m)):m===null||Y(m)?(e.exit("htmlFlowData"),I(m)):(e.consume(m),A)}function I(m){return e.check(rd,P,Z)(m)}function P(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),z}function z(m){return m===null||Y(m)?I(m):(e.enter("htmlFlowData"),A(m))}function K(m){return m===45?(e.consume(m),_):A(m)}function H(m){return m===47?(e.consume(m),s="",X):A(m)}function X(m){if(m===62){const T=s.toLowerCase();return ua.includes(T)?(e.consume(m),$):A(m)}return rt(m)&&s.length<8?(e.consume(m),s+=String.fromCharCode(m),X):A(m)}function W(m){return m===93?(e.consume(m),_):A(m)}function _(m){return m===62?(e.consume(m),$):m===45&&i===2?(e.consume(m),_):A(m)}function $(m){return m===null||Y(m)?(e.exit("htmlFlowData"),Z(m)):(e.consume(m),$)}function Z(m){return e.exit("htmlFlow"),t(m)}}function sd(e,t,n){const r=this;return i;function i(s){return Y(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function ld(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(mn,t,n)}}const od={name:"htmlText",tokenize:ud};function ud(e,t,n){const r=this;let i,a,s;return l;function l(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),u}function u(_){return _===33?(e.consume(_),c):_===47?(e.consume(_),O):_===63?(e.consume(_),k):rt(_)?(e.consume(_),g):n(_)}function c(_){return _===45?(e.consume(_),d):_===91?(e.consume(_),a=0,v):rt(_)?(e.consume(_),b):n(_)}function d(_){return _===45?(e.consume(_),p):n(_)}function h(_){return _===null?n(_):_===45?(e.consume(_),f):Y(_)?(s=h,H(_)):(e.consume(_),h)}function f(_){return _===45?(e.consume(_),p):h(_)}function p(_){return _===62?K(_):_===45?f(_):h(_)}function v(_){const $="CDATA[";return _===$.charCodeAt(a++)?(e.consume(_),a===$.length?j:v):n(_)}function j(_){return _===null?n(_):_===93?(e.consume(_),x):Y(_)?(s=j,H(_)):(e.consume(_),j)}function x(_){return _===93?(e.consume(_),w):j(_)}function w(_){return _===62?K(_):_===93?(e.consume(_),w):j(_)}function b(_){return _===null||_===62?K(_):Y(_)?(s=b,H(_)):(e.consume(_),b)}function k(_){return _===null?n(_):_===63?(e.consume(_),E):Y(_)?(s=k,H(_)):(e.consume(_),k)}function E(_){return _===62?K(_):k(_)}function O(_){return rt(_)?(e.consume(_),C):n(_)}function C(_){return _===45||ze(_)?(e.consume(_),C):L(_)}function L(_){return Y(_)?(s=L,H(_)):he(_)?(e.consume(_),L):K(_)}function g(_){return _===45||ze(_)?(e.consume(_),g):_===47||_===62||Ee(_)?y(_):n(_)}function y(_){return _===47?(e.consume(_),K):_===58||_===95||rt(_)?(e.consume(_),N):Y(_)?(s=y,H(_)):he(_)?(e.consume(_),y):K(_)}function N(_){return _===45||_===46||_===58||_===95||ze(_)?(e.consume(_),N):S(_)}function S(_){return _===61?(e.consume(_),A):Y(_)?(s=S,H(_)):he(_)?(e.consume(_),S):y(_)}function A(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),i=_,I):Y(_)?(s=A,H(_)):he(_)?(e.consume(_),A):(e.consume(_),P)}function I(_){return _===i?(e.consume(_),i=void 0,z):_===null?n(_):Y(_)?(s=I,H(_)):(e.consume(_),I)}function P(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||Ee(_)?y(_):(e.consume(_),P)}function z(_){return _===47||_===62||Ee(_)?y(_):n(_)}function K(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function H(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),X}function X(_){return he(_)?me(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):W(_)}function W(_){return e.enter("htmlTextData"),s(_)}}const _i={name:"labelEnd",tokenize:md,resolveTo:pd,resolveAll:fd},cd={tokenize:gd},dd={tokenize:xd},hd={tokenize:yd};function fd(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function pd(e,t){let n=e.length,r=0,i,a,s,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[s][1].end)},d={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return l=[["enter",u,t],["enter",c,t]],l=Ve(l,e.slice(a+1,a+r+3)),l=Ve(l,[["enter",d,t]]),l=Ve(l,Si(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),l=Ve(l,[["exit",d,t],e[s-2],e[s-1],["exit",c,t]]),l=Ve(l,e.slice(s+1)),l=Ve(l,[["exit",u,t]]),at(e,a,e.length,l),e}function md(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(f){return a?a._inactive?h(f):(s=r.parser.defined.includes(It(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),u):n(f)}function u(f){return f===40?e.attempt(cd,d,s?d:h)(f):f===91?e.attempt(dd,d,s?c:h)(f):s?d(f):h(f)}function c(f){return e.attempt(hd,d,h)(f)}function d(f){return t(f)}function h(f){return a._balanced=!0,n(f)}}function gd(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Ee(h)?Ht(e,a)(h):a(h)}function a(h){return h===41?d(h):Ql(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return Ee(h)?Ht(e,u)(h):d(h)}function l(h){return n(h)}function u(h){return h===34||h===39||h===40?Yl(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function c(h){return Ee(h)?Ht(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function xd(e,t,n){const r=this;return i;function i(l){return Kl.call(r,e,a,s,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(It(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function yd(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const bd={name:"labelStartImage",tokenize:wd,resolveAll:_i.resolveAll};function wd(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const vd={name:"labelStartLink",tokenize:Cd,resolveAll:_i.resolveAll};function Cd(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Nn={name:"lineEnding",tokenize:kd};function kd(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),me(e,t,"linePrefix")}}const nn={name:"thematicBreak",tokenize:jd};function jd(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,l(c)}function l(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||Y(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),he(c)?me(e,l,"whitespace")(c):l(c))}}const Ne={name:"list",tokenize:Sd,continuation:{tokenize:_d},exit:Od},Nd={tokenize:Ld,partial:!0},Ed={tokenize:Ad,partial:!0};function Sd(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(p){const v=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ti(p)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(nn,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return ti(p)&&++s<10?(e.consume(p),u):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(mn,r.interrupt?n:d,e.attempt(Nd,f,h))}function d(p){return r.containerState.initialBlankLine=!0,a++,f(p)}function h(p){return he(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function _d(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(mn,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,me(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!he(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ed,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,me(e,e.attempt(Ne,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Ad(e,t,n){const r=this;return me(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function Od(e){e.exit(this.containerState.type)}function Ld(e,t,n){const r=this;return me(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!he(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ca={name:"setextUnderline",tokenize:Td,resolveTo:Id};function Id(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function Td(e,t,n){const r=this;let i;return a;function a(c){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),he(c)?me(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||Y(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Pd={tokenize:Md};function Md(e){const t=this,n=e.attempt(mn,r,e.attempt(this.parser.constructs.flowInitial,i,me(e,e.attempt(this.parser.constructs.flow,i,e.attempt(B1,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Rd={resolveAll:eo()},Dd=Xl("string"),Fd=Xl("text");function Xl(e){return{tokenize:t,resolveAll:eo(e==="text"?zd:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,l);return s;function s(d){return c(d)?a(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const h=i[d];let f=-1;if(h)for(;++f<h.length;){const p=h[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function eo(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function zd(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,l=0,u;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(c===-2)u=!0,l++;else if(c!==-1){a++;break}}if(l){const c={type:n===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-l,offset:r.end.offset-l,_index:r.start._index+a,_bufferIndex:a?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function Bd(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let s=[],l=[];const u={consume:b,enter:k,exit:E,attempt:L(O),check:L(C),interrupt:L(C,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:f,now:v,defineSkip:j,write:h};let d=t.tokenize.call(c,u);return t.resolveAll&&a.push(t),c;function h(S){return s=Ve(s,S),x(),s[s.length-1]!==null?[]:(g(t,0),c.events=Si(a,c.events,c),c.events)}function f(S,A){return Vd(p(S),A)}function p(S){return qd(s,S)}function v(){const{line:S,column:A,offset:I,_index:P,_bufferIndex:z}=r;return{line:S,column:A,offset:I,_index:P,_bufferIndex:z}}function j(S){i[S.line]=S.column,N()}function x(){let S;for(;r._index<s.length;){const A=s[r._index];if(typeof A=="string")for(S=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===S&&r._bufferIndex<A.length;)w(A.charCodeAt(r._bufferIndex));else w(A)}}function w(S){d=d(S)}function b(S){Y(S)?(r.line++,r.column=1,r.offset+=S===-3?2:1,N()):S!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=S}function k(S,A){const I=A||{};return I.type=S,I.start=v(),c.events.push(["enter",I,c]),l.push(I),I}function E(S){const A=l.pop();return A.end=v(),c.events.push(["exit",A,c]),A}function O(S,A){g(S,A.from)}function C(S,A){A.restore()}function L(S,A){return I;function I(P,z,K){let H,X,W,_;return Array.isArray(P)?Z(P):"tokenize"in P?Z([P]):$(P);function $(D){return J;function J(V){const U=V!==null&&D[V],te=V!==null&&D.null,Q=[...Array.isArray(U)?U:U?[U]:[],...Array.isArray(te)?te:te?[te]:[]];return Z(Q)(V)}}function Z(D){return H=D,X=0,D.length===0?K:m(D[X])}function m(D){return J;function J(V){return _=y(),W=D,D.partial||(c.currentConstruct=D),D.name&&c.parser.constructs.disable.null.includes(D.name)?R():D.tokenize.call(A?Object.assign(Object.create(c),A):c,u,T,R)(V)}}function T(D){return S(W,_),z}function R(D){return _.restore(),++X<H.length?m(H[X]):K}}}function g(S,A){S.resolveAll&&!a.includes(S)&&a.push(S),S.resolve&&at(c.events,A,c.events.length-A,S.resolve(c.events.slice(A),c)),S.resolveTo&&(c.events=S.resolveTo(c.events,c))}function y(){const S=v(),A=c.previous,I=c.currentConstruct,P=c.events.length,z=Array.from(l);return{restore:K,from:P};function K(){r=S,c.previous=A,c.currentConstruct=I,c.events.length=P,l=z,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function qd(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function Vd(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
3
- `;break}case-3:{s=`\r
4
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}const Hd={42:Ne,43:Ne,45:Ne,48:Ne,49:Ne,50:Ne,51:Ne,52:Ne,53:Ne,54:Ne,55:Ne,56:Ne,57:Ne,62:$l},Wd={91:U1},Ud={[-2]:jn,[-1]:jn,32:jn},$d={35:K1,42:nn,45:[ca,nn],60:td,61:ca,95:nn,96:oa,126:oa},Gd={38:Zl,92:Gl},Zd={[-5]:Nn,[-4]:Nn,[-3]:Nn,33:bd,38:Zl,42:ni,60:[C1,od],91:vd,92:[J1,Gl],93:_i,95:ni,96:M1},Jd={null:[ni,Rd]},Qd={null:[42,95]},Kd={null:[]},Yd=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Qd,contentInitial:Wd,disable:Kd,document:Hd,flow:$d,flowInitial:Ud,insideSpan:Jd,string:Gd,text:Zd},Symbol.toStringTag,{value:"Module"}));function Xd(e){const n=l1([Yd,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(m1),document:i(x1),flow:i(Pd),string:i(Dd),text:i(Fd)};return r;function i(a){return s;function s(l){return Bd(r,a,l)}}}function eh(e){for(;!Jl(e););return e}const da=/[\0\t\n\r]/g;function th(){let e=1,t="",n=!0,r;return i;function i(a,s,l){const u=[];let c,d,h,f,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),h=0,t="",n&&(a.charCodeAt(0)===65279&&h++,n=void 0);h<a.length;){if(da.lastIndex=h,c=da.exec(a),f=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(f),!c){t=a.slice(h);break}if(p===10&&h===f&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),h<f&&(u.push(a.slice(h,f)),e+=f-h),p){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}h=f+1}return l&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const nh=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rh(e){return e.replace(nh,ih)}function ih(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Ul(n.slice(a?2:1),a?16:10)}return Ei(n)||e}const to={}.hasOwnProperty;function ah(e,t,n){return typeof t!="string"&&(n=t,t=void 0),sh(n)(eh(Xd(n).document().write(th()(e,t,!0))))}function sh(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ne),autolinkProtocol:y,autolinkEmail:y,atxHeading:a(oe),blockQuote:a(U),characterEscape:y,characterReference:y,codeFenced:a(te),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(te,s),codeText:a(Q,s),codeTextData:y,data:y,codeFlowValue:y,definition:a(se),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(le),hardBreakEscape:a(ue),hardBreakTrailing:a(ue),htmlFlow:a(ae,s),htmlFlowData:y,htmlText:a(ae,s),htmlTextData:y,image:a(Pe),label:s,link:a(ne),listItem:a(tt),listItemValue:f,listOrdered:a(fe,h),listUnordered:a(fe),paragraph:a(dt),reference:m,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(oe),strong:a(qe),thematicBreak:a(we)},exit:{atxHeading:u(),atxHeadingSequence:O,autolink:u(),autolinkEmail:V,autolinkProtocol:J,blockQuote:u(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:R,characterReferenceMarkerNumeric:R,characterReferenceValue:D,codeFenced:u(x),codeFencedFence:j,codeFencedFenceInfo:p,codeFencedFenceMeta:v,codeFlowValue:N,codeIndented:u(w),codeText:u(z),codeTextData:N,data:N,definition:u(),definitionDestinationString:E,definitionLabelString:b,definitionTitleString:k,emphasis:u(),hardBreakEscape:u(A),hardBreakTrailing:u(A),htmlFlow:u(I),htmlFlowData:N,htmlText:u(P),htmlTextData:N,image:u(H),label:W,labelText:X,lineEnding:S,link:u(K),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:T,resourceDestinationString:_,resourceTitleString:$,resource:Z,setextHeading:u(g),setextHeadingLineSequence:L,setextHeadingText:C,strong:u(),thematicBreak:u()}};no(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(M){let F={type:"root",children:[]};const G={stack:[F],tokenStack:[],config:t,enter:l,exit:c,buffer:s,resume:d,data:n},ee=[];let ce=-1;for(;++ce<M.length;)if(M[ce][1].type==="listOrdered"||M[ce][1].type==="listUnordered")if(M[ce][0]==="enter")ee.push(ce);else{const ke=ee.pop();ce=i(M,ke,ce)}for(ce=-1;++ce<M.length;){const ke=t[M[ce][0]];to.call(ke,M[ce][1].type)&&ke[M[ce][1].type].call(Object.assign({sliceSerialize:M[ce][2].sliceSerialize},G),M[ce][1])}if(G.tokenStack.length>0){const ke=G.tokenStack[G.tokenStack.length-1];(ke[1]||ha).call(G,void 0,ke[0])}for(F.position={start:ft(M.length>0?M[0][1].start:{line:1,column:1,offset:0}),end:ft(M.length>0?M[M.length-2][1].end:{line:1,column:1,offset:0})},ce=-1;++ce<t.transforms.length;)F=t.transforms[ce](F)||F;return F}function i(M,F,G){let ee=F-1,ce=-1,ke=!1,je,ge,Ge,ht;for(;++ee<=G;){const Me=M[ee];switch(Me[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Me[0]==="enter"?ce++:ce--,ht=void 0;break}case"lineEndingBlank":{Me[0]==="enter"&&(je&&!ht&&!ce&&!Ge&&(Ge=ee),ht=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ht=void 0}if(!ce&&Me[0]==="enter"&&Me[1].type==="listItemPrefix"||ce===-1&&Me[0]==="exit"&&(Me[1].type==="listUnordered"||Me[1].type==="listOrdered")){if(je){let St=ee;for(ge=void 0;St--;){const lt=M[St];if(lt[1].type==="lineEnding"||lt[1].type==="lineEndingBlank"){if(lt[0]==="exit")continue;ge&&(M[ge][1].type="lineEndingBlank",ke=!0),lt[1].type="lineEnding",ge=St}else if(!(lt[1].type==="linePrefix"||lt[1].type==="blockQuotePrefix"||lt[1].type==="blockQuotePrefixWhitespace"||lt[1].type==="blockQuoteMarker"||lt[1].type==="listItemIndent"))break}Ge&&(!ge||Ge<ge)&&(je._spread=!0),je.end=Object.assign({},ge?M[ge][1].start:Me[1].end),M.splice(ge||ee,0,["exit",je,Me[2]]),ee++,G++}if(Me[1].type==="listItemPrefix"){const St={type:"listItem",_spread:!1,start:Object.assign({},Me[1].start),end:void 0};je=St,M.splice(ee,0,["enter",St,Me[2]]),ee++,G++,Ge=void 0,ht=!0}}}return M[F][1]._spread=ke,G}function a(M,F){return G;function G(ee){l.call(this,M(ee),ee),F&&F.call(this,ee)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(M,F,G){this.stack[this.stack.length-1].children.push(M),this.stack.push(M),this.tokenStack.push([F,G]),M.position={start:ft(F.start),end:void 0}}function u(M){return F;function F(G){M&&M.call(this,G),c.call(this,G)}}function c(M,F){const G=this.stack.pop(),ee=this.tokenStack.pop();if(ee)ee[0].type!==M.type&&(F?F.call(this,M,ee[0]):(ee[1]||ha).call(this,M,ee[0]));else throw new Error("Cannot close `"+M.type+"` ("+Vt({start:M.start,end:M.end})+"): it’s not open");G.position.end=ft(M.end)}function d(){return a1(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function f(M){if(this.data.expectingFirstListItemValue){const F=this.stack[this.stack.length-2];F.start=Number.parseInt(this.sliceSerialize(M),10),this.data.expectingFirstListItemValue=void 0}}function p(){const M=this.resume(),F=this.stack[this.stack.length-1];F.lang=M}function v(){const M=this.resume(),F=this.stack[this.stack.length-1];F.meta=M}function j(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const M=this.resume(),F=this.stack[this.stack.length-1];F.value=M.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const M=this.resume(),F=this.stack[this.stack.length-1];F.value=M.replace(/(\r?\n|\r)$/g,"")}function b(M){const F=this.resume(),G=this.stack[this.stack.length-1];G.label=F,G.identifier=It(this.sliceSerialize(M)).toLowerCase()}function k(){const M=this.resume(),F=this.stack[this.stack.length-1];F.title=M}function E(){const M=this.resume(),F=this.stack[this.stack.length-1];F.url=M}function O(M){const F=this.stack[this.stack.length-1];if(!F.depth){const G=this.sliceSerialize(M).length;F.depth=G}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function L(M){const F=this.stack[this.stack.length-1];F.depth=this.sliceSerialize(M).codePointAt(0)===61?1:2}function g(){this.data.setextHeadingSlurpLineEnding=void 0}function y(M){const G=this.stack[this.stack.length-1].children;let ee=G[G.length-1];(!ee||ee.type!=="text")&&(ee=wt(),ee.position={start:ft(M.start),end:void 0},G.push(ee)),this.stack.push(ee)}function N(M){const F=this.stack.pop();F.value+=this.sliceSerialize(M),F.position.end=ft(M.end)}function S(M){const F=this.stack[this.stack.length-1];if(this.data.atHardBreak){const G=F.children[F.children.length-1];G.position.end=ft(M.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(F.type)&&(y.call(this,M),N.call(this,M))}function A(){this.data.atHardBreak=!0}function I(){const M=this.resume(),F=this.stack[this.stack.length-1];F.value=M}function P(){const M=this.resume(),F=this.stack[this.stack.length-1];F.value=M}function z(){const M=this.resume(),F=this.stack[this.stack.length-1];F.value=M}function K(){const M=this.stack[this.stack.length-1];if(this.data.inReference){const F=this.data.referenceType||"shortcut";M.type+="Reference",M.referenceType=F,delete M.url,delete M.title}else delete M.identifier,delete M.label;this.data.referenceType=void 0}function H(){const M=this.stack[this.stack.length-1];if(this.data.inReference){const F=this.data.referenceType||"shortcut";M.type+="Reference",M.referenceType=F,delete M.url,delete M.title}else delete M.identifier,delete M.label;this.data.referenceType=void 0}function X(M){const F=this.sliceSerialize(M),G=this.stack[this.stack.length-2];G.label=rh(F),G.identifier=It(F).toLowerCase()}function W(){const M=this.stack[this.stack.length-1],F=this.resume(),G=this.stack[this.stack.length-1];if(this.data.inReference=!0,G.type==="link"){const ee=M.children;G.children=ee}else G.alt=F}function _(){const M=this.resume(),F=this.stack[this.stack.length-1];F.url=M}function $(){const M=this.resume(),F=this.stack[this.stack.length-1];F.title=M}function Z(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function T(M){const F=this.resume(),G=this.stack[this.stack.length-1];G.label=F,G.identifier=It(this.sliceSerialize(M)).toLowerCase(),this.data.referenceType="full"}function R(M){this.data.characterReferenceType=M.type}function D(M){const F=this.sliceSerialize(M),G=this.data.characterReferenceType;let ee;G?(ee=Ul(F,G==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ee=Ei(F);const ce=this.stack.pop();ce.value+=ee,ce.position.end=ft(M.end)}function J(M){N.call(this,M);const F=this.stack[this.stack.length-1];F.url=this.sliceSerialize(M)}function V(M){N.call(this,M);const F=this.stack[this.stack.length-1];F.url="mailto:"+this.sliceSerialize(M)}function U(){return{type:"blockquote",children:[]}}function te(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function se(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function le(){return{type:"emphasis",children:[]}}function oe(){return{type:"heading",depth:0,children:[]}}function ue(){return{type:"break"}}function ae(){return{type:"html",value:""}}function Pe(){return{type:"image",title:null,url:"",alt:null}}function ne(){return{type:"link",title:null,url:"",children:[]}}function fe(M){return{type:"list",ordered:M.type==="listOrdered",start:null,spread:M._spread,children:[]}}function tt(M){return{type:"listItem",spread:M._spread,checked:null,children:[]}}function dt(){return{type:"paragraph",children:[]}}function qe(){return{type:"strong",children:[]}}function wt(){return{type:"text",value:""}}function we(){return{type:"thematicBreak"}}}function ft(e){return{line:e.line,column:e.column,offset:e.offset}}function no(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?no(e,r):lh(e,r)}}function lh(e,t){let n;for(n in t)if(to.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ha(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Vt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Vt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Vt({start:t.start,end:t.end})+") is still open")}function oh(e){const t=this;t.parser=n;function n(r){return ah(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function uh(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ch(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
- `}]}function dh(e,t){const n=t.value?t.value+`
6
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function hh(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fh(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ph(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Bt(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,l+=1,e.footnoteCounts.set(r,l);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function mh(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gh(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ro(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function xh(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ro(e,t);const i={src:Bt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function yh(e,t){const n={src:Bt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function bh(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function wh(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ro(e,t);const i={href:Bt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function vh(e,t){const n={href:Bt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ch(e,t,n){const r=e.all(t),i=n?kh(n):io(t),a={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(i||l!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
7
- `}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
8
- `});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function kh(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=io(n[r])}return t}function io(e){const t=e.spread;return t??e.children.length>1}function jh(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Nh(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Eh(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Sh(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _h(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Ci(t.children[1]),u=Fl(t.children[t.children.length-1]);l&&u&&(s.position={start:l,end:u}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Ah(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let u=-1;const c=[];for(;++u<l;){const h=t.children[u],f={},p=s?s[u]:void 0;p&&(f.align=p);let v={type:"element",tagName:a,properties:f,children:[]};h&&(v.children=e.all(h),e.patch(h,v),v=e.applyData(h,v)),c.push(v)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function Oh(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const fa=9,pa=32;function Lh(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(ma(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(ma(t.slice(i),i>0,!1)),a.join("")}function ma(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===fa||a===pa;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===fa||a===pa;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ih(e,t){const n={type:"text",value:Lh(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Th(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Ph={blockquote:uh,break:ch,code:dh,delete:hh,emphasis:fh,footnoteReference:ph,heading:mh,html:gh,imageReference:xh,image:yh,inlineCode:bh,linkReference:wh,link:vh,listItem:Ch,list:jh,paragraph:Nh,root:Eh,strong:Sh,table:_h,tableCell:Oh,tableRow:Ah,text:Ih,thematicBreak:Th,toml:Kt,yaml:Kt,definition:Kt,footnoteDefinition:Kt};function Kt(){}const ao=-1,gn=0,on=1,un=2,Ai=3,Oi=4,Li=5,Ii=6,so=7,lo=8,ga=typeof self=="object"?self:globalThis,Mh=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case gn:case ao:return n(s,i);case on:{const l=n([],i);for(const u of s)l.push(r(u));return l}case un:{const l=n({},i);for(const[u,c]of s)l[r(u)]=r(c);return l}case Ai:return n(new Date(s),i);case Oi:{const{source:l,flags:u}=s;return n(new RegExp(l,u),i)}case Li:{const l=n(new Map,i);for(const[u,c]of s)l.set(r(u),r(c));return l}case Ii:{const l=n(new Set,i);for(const u of s)l.add(r(u));return l}case so:{const{name:l,message:u}=s;return n(new ga[l](u),i)}case lo:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new ga[a](s),i)};return r},xa=e=>Mh(new Map,e)(0),At="",{toString:Rh}={},{keys:Dh}=Object,qt=e=>{const t=typeof e;if(t!=="object"||!e)return[gn,t];const n=Rh.call(e).slice(8,-1);switch(n){case"Array":return[on,At];case"Object":return[un,At];case"Date":return[Ai,At];case"RegExp":return[Oi,At];case"Map":return[Li,At];case"Set":return[Ii,At]}return n.includes("Array")?[on,n]:n.includes("Error")?[so,n]:[un,n]},Yt=([e,t])=>e===gn&&(t==="function"||t==="symbol"),Fh=(e,t,n,r)=>{const i=(s,l)=>{const u=r.push(s)-1;return n.set(l,u),u},a=s=>{if(n.has(s))return n.get(s);let[l,u]=qt(s);switch(l){case gn:{let d=s;switch(u){case"bigint":l=lo,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([ao],s)}return i([l,d],s)}case on:{if(u)return i([u,[...s]],s);const d=[],h=i([l,d],s);for(const f of s)d.push(a(f));return h}case un:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],h=i([l,d],s);for(const f of Dh(s))(e||!Yt(qt(s[f])))&&d.push([a(f),a(s[f])]);return h}case Ai:return i([l,s.toISOString()],s);case Oi:{const{source:d,flags:h}=s;return i([l,{source:d,flags:h}],s)}case Li:{const d=[],h=i([l,d],s);for(const[f,p]of s)(e||!(Yt(qt(f))||Yt(qt(p))))&&d.push([a(f),a(p)]);return h}case Ii:{const d=[],h=i([l,d],s);for(const f of s)(e||!Yt(qt(f)))&&d.push(a(f));return h}}const{message:c}=s;return i([l,{name:u,message:c}],s)};return a},ya=(e,{json:t,lossy:n}={})=>{const r=[];return Fh(!(t||n),!!t,new Map,r)(e),r},cn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?xa(ya(e,t)):structuredClone(e):(e,t)=>xa(ya(e,t));function zh(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Bh(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qh(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||zh,r=e.options.footnoteBackLabel||Bh,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=e.all(c),h=String(c.identifier).toUpperCase(),f=Bt(h.toLowerCase());let p=0;const v=[],j=e.footnoteCounts.get(h);for(;j!==void 0&&++p<=j;){v.length>0&&v.push({type:"text",value:" "});let b=typeof n=="string"?n:n(u,p);typeof b=="string"&&(b={type:"text",value:b}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const x=d[d.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const b=x.children[x.children.length-1];b&&b.type==="text"?b.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...v)}else d.push(...v);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(d,!0)};e.patch(c,w),l.push(w)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...cn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
9
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
10
- `}]}}const oo=function(e){if(e==null)return Uh;if(typeof e=="function")return xn(e);if(typeof e=="object")return Array.isArray(e)?Vh(e):Hh(e);if(typeof e=="string")return Wh(e);throw new Error("Expected function, string, or object as test")};function Vh(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=oo(e[n]);return xn(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Hh(e){const t=e;return xn(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Wh(e){return xn(t);function t(n){return n&&n.type===e}}function xn(e){return t;function t(n,r,i){return!!($h(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Uh(){return!0}function $h(e){return e!==null&&typeof e=="object"&&"type"in e}const uo=[],Gh=!0,ba=!1,Zh="skip";function Jh(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=oo(i),s=r?-1:1;l(e,void 0,[])();function l(u,c,d){const h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=uo,v,j,x;if((!t||a(u,c,d[d.length-1]||void 0))&&(p=Qh(n(u,d)),p[0]===ba))return p;if("children"in u&&u.children){const w=u;if(w.children&&p[0]!==Zh)for(j=(r?w.children.length:-1)+s,x=d.concat(w);j>-1&&j<w.children.length;){const b=w.children[j];if(v=l(b,j,x)(),v[0]===ba)return v;j=typeof v[1]=="number"?v[1]:j+s}}return p}}}function Qh(e){return Array.isArray(e)?e:typeof e=="number"?[Gh,e]:e==null?uo:[e]}function co(e,t,n,r){let i,a,s;typeof t=="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Jh(e,a,l,i);function l(u,c){const d=c[c.length-1],h=d?d.children.indexOf(u):void 0;return s(u,h,d)}}const ri={}.hasOwnProperty,Kh={};function Yh(e,t){const n=t||Kh,r=new Map,i=new Map,a=new Map,s={...Ph,...n.handlers},l={all:c,applyData:ef,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:u,options:n,patch:Xh,wrap:nf};return co(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:i,f=String(d.identifier).toUpperCase();h.has(f)||h.set(f,d)}}),l;function u(d,h){const f=d.type,p=l.handlers[f];if(ri.call(l.handlers,f)&&p)return p(l,d,h);if(l.options.passThrough&&l.options.passThrough.includes(f)){if("children"in d){const{children:j,...x}=d,w=cn(x);return w.children=l.all(d),w}return cn(d)}return(l.options.unknownHandler||tf)(l,d,h)}function c(d){const h=[];if("children"in d){const f=d.children;let p=-1;for(;++p<f.length;){const v=l.one(f[p],d);if(v){if(p&&f[p-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=wa(v.value)),!Array.isArray(v)&&v.type==="element")){const j=v.children[0];j&&j.type==="text"&&(j.value=wa(j.value))}Array.isArray(v)?h.push(...v):h.push(v)}}}return h}}function Xh(e,t){e.position&&(t.position=Mc(e))}function ef(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,cn(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function tf(e,t){const n=t.data||{},r="value"in t&&!(ri.call(n,"hProperties")||ri.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function nf(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
11
- `});++r<e.length;)r&&n.push({type:"text",value:`
12
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
13
- `}),n}function wa(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function va(e,t){const n=Yh(e,t),r=n.one(e,void 0),i=qh(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
14
- `},i),a}function rf(e,t){return e&&"run"in e?async function(n,r){const i=va(n,{file:r,...t});await e.run(i,r)}:function(n,r){return va(n,{file:r,...t||e})}}function Ca(e){if(e)throw e}var En,ka;function af(){if(ka)return En;ka=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!h)return!1;var f;for(f in c);return typeof f>"u"||e.call(c,f)},s=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},l=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return En=function u(){var c,d,h,f,p,v,j=arguments[0],x=1,w=arguments.length,b=!1;for(typeof j=="boolean"&&(b=j,j=arguments[1]||{},x=2),(j==null||typeof j!="object"&&typeof j!="function")&&(j={});x<w;++x)if(c=arguments[x],c!=null)for(d in c)h=l(j,d),f=l(c,d),j!==f&&(b&&f&&(a(f)||(p=i(f)))?(p?(p=!1,v=h&&i(h)?h:[]):v=h&&a(h)?h:{},s(j,{name:d,newValue:u(b,v,f)})):typeof f<"u"&&s(j,{name:d,newValue:f}));return j},En}var sf=af();const Sn=li(sf);function ii(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function lf(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(u,...c){const d=e[++a];let h=-1;if(u){s(u);return}for(;++h<i.length;)(c[h]===null||c[h]===void 0)&&(c[h]=i[h]);i=c,d?of(d,l)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function of(e,t){let n;return r;function r(...s){const l=e.length>s.length;let u;l&&s.push(i);try{u=e.apply(this,s)}catch(c){const d=c;if(l&&n)throw d;return i(d)}l||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...l){n||(n=!0,t(s,...l))}function a(s){i(null,s)}}const nt={basename:uf,dirname:cf,extname:df,join:hf,sep:"/"};function uf(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Jt(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function cf(e){if(Jt(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function df(e){Jt(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function hf(...e){let t=-1,n;for(;++t<e.length;)Jt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":ff(n)}function ff(e){Jt(e);const t=e.codePointAt(0)===47;let n=pf(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function pf(e,t){let n="",r=0,i=-1,a=0,s=-1,l,u;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else l===46&&a>-1?a++:a=-1}return n}function Jt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const mf={cwd:gf};function gf(){return"/"}function ai(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function xf(e){if(typeof e=="string")e=new URL(e);else if(!ai(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return yf(e)}function yf(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const _n=["history","path","basename","stem","extname","dirname"];class ho{constructor(t){let n;t?ai(t)?n={path:t}:typeof t=="string"||bf(t)?n={value:t}:n=t:n={},this.cwd=mf.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<_n.length;){const a=_n[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)_n.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?nt.basename(this.path):void 0}set basename(t){On(t,"basename"),An(t,"basename"),this.path=nt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?nt.dirname(this.path):void 0}set dirname(t){ja(this.basename,"dirname"),this.path=nt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?nt.extname(this.path):void 0}set extname(t){if(An(t,"extname"),ja(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=nt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ai(t)&&(t=xf(t)),On(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?nt.basename(this.path,this.extname):void 0}set stem(t){On(t,"stem"),An(t,"stem"),this.path=nt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ce(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function An(e,t){if(e&&e.includes(nt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+nt.sep+"`")}function On(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ja(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function bf(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const wf=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};Object.setPrototypeOf(a,r);const s=Object.getOwnPropertyNames(i);for(const l of s){const u=Object.getOwnPropertyDescriptor(i,l);u&&Object.defineProperty(a,l,u)}return a},vf={}.hasOwnProperty;class Ti extends wf{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=lf()}copy(){const t=new Ti;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Sn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Tn("data",this.frozen),this.namespace[t]=n,this):vf.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Tn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Xt(t),r=this.parser||this.Parser;return Ln("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ln("process",this.parser||this.Parser),In("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const l=Xt(t),u=r.parse(l);r.run(u,l,function(d,h,f){if(d||!h||!f)return c(d);const p=h,v=r.stringify(p,f);jf(v)?f.value=v:f.result=v,c(d,f)});function c(d,h){d||!h?s(d):a?a(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),Ln("processSync",this.parser||this.Parser),In("processSync",this.compiler||this.Compiler),this.process(t,i),Ea("processSync","process",n),r;function i(a,s){n=!0,Ca(a),r=s}}run(t,n,r){Na(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,l){const u=Xt(n);i.run(t,u,c);function c(d,h,f){const p=h||t;d?l(d):s?s(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Ea("runSync","run",r),i;function a(s,l){Ca(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Xt(n),i=this.compiler||this.Compiler;return In("stringify",i),Na(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Tn("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...h]=c;u(d,h)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(i.settings=Sn(!0,i.settings,c.settings))}function l(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const h=c[d];a(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let h=-1,f=-1;for(;++h<r.length;)if(r[h][0]===c){f=h;break}if(f===-1)r.push([c,...d]);else if(d.length>0){let[p,...v]=d;const j=r[f][1];ii(j)&&ii(p)&&(p=Sn(!0,j,p)),r[f]=[c,p,...v]}}}}const Cf=new Ti().freeze();function Ln(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function In(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Tn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Na(e){if(!ii(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ea(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xt(e){return kf(e)?e:new ho(e)}function kf(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function jf(e){return typeof e=="string"||Nf(e)}function Nf(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ef="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Sa=[],_a={allowDangerousHtml:!0},Sf=/^(https?|ircs?|mailto|xmpp)$/i,_f=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Af(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,s=e.disallowedElements,l=e.rehypePlugins||Sa,u=e.remarkPlugins||Sa,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,..._a}:_a,d=e.skipHtml,h=e.unwrapDisallowed,f=e.urlTransform||Of,p=Cf().use(oh).use(u).use(rf,c).use(l),v=new ho;typeof r=="string"&&(v.value=r);for(const b of _f)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+Ef+b.id,void 0);const j=p.parse(v);let x=p.runSync(j,v);return i&&(x={type:"element",tagName:"div",properties:{className:i},children:x.type==="root"?x.children:[x]}),co(x,w),qc(x,{Fragment:o.Fragment,components:a,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function w(b,k,E){if(b.type==="raw"&&E&&typeof k=="number")return d?E.children.splice(k,1):E.children[k]={type:"text",value:b.value},k;if(b.type==="element"){let O;for(O in kn)if(Object.hasOwn(kn,O)&&Object.hasOwn(b.properties,O)){const C=b.properties[O],L=kn[O];(L===null||L.includes(b.tagName))&&(b.properties[O]=f(String(C||""),O,b))}}if(b.type==="element"){let O=t?!t.includes(b.tagName):s?s.includes(b.tagName):!1;if(!O&&n&&typeof k=="number"&&(O=!n(b,k,E)),O&&E&&typeof k=="number")return h&&b.children?E.children.splice(k,1,...b.children):E.children.splice(k,1),k}}}function Of(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Sf.test(e.slice(0,t))?e:""}function Lf({content:e}){return o.jsx(Af,{className:"!prose !max-w-none",children:e})}var rn={exports:{}};/* @license
15
- Papa Parse
16
- v5.5.2
17
- https://github.com/mholt/PapaParse
18
- License: MIT
19
- */var If=rn.exports,Aa;function Tf(){return Aa||(Aa=1,function(e,t){((n,r)=>{e.exports=r()})(If,function n(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},i,a=!r.document&&!!r.postMessage,s=r.IS_PAPA_WORKER||!1,l={},u=0,c={};function d(g){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(y){var N=O(y);N.chunkSize=parseInt(N.chunkSize),y.step||y.chunk||(N.chunkSize=null),this._handle=new j(N),(this._handle.streamer=this)._config=N}).call(this,g),this.parseChunk=function(y,N){var S=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<S){let I=this._config.newline;I||(A=this._config.quoteChar||'"',I=this._handle.guessLineEndings(y,A)),y=[...y.split(I).slice(S)].join(I)}this.isFirstChunk&&L(this._config.beforeFirstChunk)&&(A=this._config.beforeFirstChunk(y))!==void 0&&(y=A),this.isFirstChunk=!1,this._halted=!1;var S=this._partialLine+y,A=(this._partialLine="",this._handle.parse(S,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(y=A.meta.cursor,S=(this._finished||(this._partialLine=S.substring(y-this._baseIndex),this._baseIndex=y),A&&A.data&&(this._rowCount+=A.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),s)r.postMessage({results:A,workerId:c.WORKER_ID,finished:S});else if(L(this._config.chunk)&&!N){if(this._config.chunk(A,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=A=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(A.data),this._completeResults.errors=this._completeResults.errors.concat(A.errors),this._completeResults.meta=A.meta),this._completed||!S||!L(this._config.complete)||A&&A.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),S||A&&A.meta.paused||this._nextChunk(),A}this._halted=!0},this._sendError=function(y){L(this._config.error)?this._config.error(y):s&&this._config.error&&r.postMessage({workerId:c.WORKER_ID,error:y,finished:!1})}}function h(g){var y;(g=g||{}).chunkSize||(g.chunkSize=c.RemoteChunkSize),d.call(this,g),this._nextChunk=a?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(N){this._input=N,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(y=new XMLHttpRequest,this._config.withCredentials&&(y.withCredentials=this._config.withCredentials),a||(y.onload=C(this._chunkLoaded,this),y.onerror=C(this._chunkError,this)),y.open(this._config.downloadRequestBody?"POST":"GET",this._input,!a),this._config.downloadRequestHeaders){var N,S=this._config.downloadRequestHeaders;for(N in S)y.setRequestHeader(N,S[N])}var A;this._config.chunkSize&&(A=this._start+this._config.chunkSize-1,y.setRequestHeader("Range","bytes="+this._start+"-"+A));try{y.send(this._config.downloadRequestBody)}catch(I){this._chunkError(I.message)}a&&y.status===0&&this._chunkError()}},this._chunkLoaded=function(){y.readyState===4&&(y.status<200||400<=y.status?this._chunkError():(this._start+=this._config.chunkSize||y.responseText.length,this._finished=!this._config.chunkSize||this._start>=(N=>(N=N.getResponseHeader("Content-Range"))!==null?parseInt(N.substring(N.lastIndexOf("/")+1)):-1)(y),this.parseChunk(y.responseText)))},this._chunkError=function(N){N=y.statusText||N,this._sendError(new Error(N))}}function f(g){(g=g||{}).chunkSize||(g.chunkSize=c.LocalChunkSize),d.call(this,g);var y,N,S=typeof FileReader<"u";this.stream=function(A){this._input=A,N=A.slice||A.webkitSlice||A.mozSlice,S?((y=new FileReader).onload=C(this._chunkLoaded,this),y.onerror=C(this._chunkError,this)):y=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var A=this._input,I=(this._config.chunkSize&&(I=Math.min(this._start+this._config.chunkSize,this._input.size),A=N.call(A,this._start,I)),y.readAsText(A,this._config.encoding));S||this._chunkLoaded({target:{result:I}})},this._chunkLoaded=function(A){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(A.target.result)},this._chunkError=function(){this._sendError(y.error)}}function p(g){var y;d.call(this,g=g||{}),this.stream=function(N){return y=N,this._nextChunk()},this._nextChunk=function(){var N,S;if(!this._finished)return N=this._config.chunkSize,y=N?(S=y.substring(0,N),y.substring(N)):(S=y,""),this._finished=!y,this.parseChunk(S)}}function v(g){d.call(this,g=g||{});var y=[],N=!0,S=!1;this.pause=function(){d.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){d.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(A){this._input=A,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){S&&y.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),y.length?this.parseChunk(y.shift()):N=!0},this._streamData=C(function(A){try{y.push(typeof A=="string"?A:A.toString(this._config.encoding)),N&&(N=!1,this._checkIsFinished(),this.parseChunk(y.shift()))}catch(I){this._streamError(I)}},this),this._streamError=C(function(A){this._streamCleanUp(),this._sendError(A)},this),this._streamEnd=C(function(){this._streamCleanUp(),S=!0,this._streamData("")},this),this._streamCleanUp=C(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function j(g){var y,N,S,A,I=Math.pow(2,53),P=-I,z=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,K=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,H=this,X=0,W=0,_=!1,$=!1,Z=[],m={data:[],errors:[],meta:{}};function T(V){return g.skipEmptyLines==="greedy"?V.join("").trim()==="":V.length===1&&V[0].length===0}function R(){if(m&&S&&(J("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),S=!1),g.skipEmptyLines&&(m.data=m.data.filter(function(Q){return!T(Q)})),D()){let Q=function(se,le){L(g.transformHeader)&&(se=g.transformHeader(se,le)),Z.push(se)};if(m)if(Array.isArray(m.data[0])){for(var V=0;D()&&V<m.data.length;V++)m.data[V].forEach(Q);m.data.splice(0,1)}else m.data.forEach(Q)}function U(Q,se){for(var le=g.header?{}:[],oe=0;oe<Q.length;oe++){var ue=oe,ae=Q[oe],ae=((Pe,ne)=>(fe=>(g.dynamicTypingFunction&&g.dynamicTyping[fe]===void 0&&(g.dynamicTyping[fe]=g.dynamicTypingFunction(fe)),(g.dynamicTyping[fe]||g.dynamicTyping)===!0))(Pe)?ne==="true"||ne==="TRUE"||ne!=="false"&&ne!=="FALSE"&&((fe=>{if(z.test(fe)&&(fe=parseFloat(fe),P<fe&&fe<I))return 1})(ne)?parseFloat(ne):K.test(ne)?new Date(ne):ne===""?null:ne):ne)(ue=g.header?oe>=Z.length?"__parsed_extra":Z[oe]:ue,ae=g.transform?g.transform(ae,ue):ae);ue==="__parsed_extra"?(le[ue]=le[ue]||[],le[ue].push(ae)):le[ue]=ae}return g.header&&(oe>Z.length?J("FieldMismatch","TooManyFields","Too many fields: expected "+Z.length+" fields but parsed "+oe,W+se):oe<Z.length&&J("FieldMismatch","TooFewFields","Too few fields: expected "+Z.length+" fields but parsed "+oe,W+se)),le}var te;m&&(g.header||g.dynamicTyping||g.transform)&&(te=1,!m.data.length||Array.isArray(m.data[0])?(m.data=m.data.map(U),te=m.data.length):m.data=U(m.data,0),g.header&&m.meta&&(m.meta.fields=Z),W+=te)}function D(){return g.header&&Z.length===0}function J(V,U,te,Q){V={type:V,code:U,message:te},Q!==void 0&&(V.row=Q),m.errors.push(V)}L(g.step)&&(A=g.step,g.step=function(V){m=V,D()?R():(R(),m.data.length!==0&&(X+=V.data.length,g.preview&&X>g.preview?N.abort():(m.data=m.data[0],A(m,H))))}),this.parse=function(V,U,te){var Q=g.quoteChar||'"',Q=(g.newline||(g.newline=this.guessLineEndings(V,Q)),S=!1,g.delimiter?L(g.delimiter)&&(g.delimiter=g.delimiter(V),m.meta.delimiter=g.delimiter):((Q=((se,le,oe,ue,ae)=>{var Pe,ne,fe,tt;ae=ae||[","," ","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var dt=0;dt<ae.length;dt++){for(var qe,wt=ae[dt],we=0,M=0,F=0,G=(fe=void 0,new w({comments:ue,delimiter:wt,newline:le,preview:10}).parse(se)),ee=0;ee<G.data.length;ee++)oe&&T(G.data[ee])?F++:(qe=G.data[ee].length,M+=qe,fe===void 0?fe=qe:0<qe&&(we+=Math.abs(qe-fe),fe=qe));0<G.data.length&&(M/=G.data.length-F),(ne===void 0||we<=ne)&&(tt===void 0||tt<M)&&1.99<M&&(ne=we,Pe=wt,tt=M)}return{successful:!!(g.delimiter=Pe),bestDelimiter:Pe}})(V,g.newline,g.skipEmptyLines,g.comments,g.delimitersToGuess)).successful?g.delimiter=Q.bestDelimiter:(S=!0,g.delimiter=c.DefaultDelimiter),m.meta.delimiter=g.delimiter),O(g));return g.preview&&g.header&&Q.preview++,y=V,N=new w(Q),m=N.parse(y,U,te),R(),_?{meta:{paused:!0}}:m||{meta:{paused:!1}}},this.paused=function(){return _},this.pause=function(){_=!0,N.abort(),y=L(g.chunk)?"":y.substring(N.getCharIndex())},this.resume=function(){H.streamer._halted?(_=!1,H.streamer.parseChunk(y,!0)):setTimeout(H.resume,3)},this.aborted=function(){return $},this.abort=function(){$=!0,N.abort(),m.meta.aborted=!0,L(g.complete)&&g.complete(m),y=""},this.guessLineEndings=function(se,Q){se=se.substring(0,1048576);var Q=new RegExp(x(Q)+"([^]*?)"+x(Q),"gm"),te=(se=se.replace(Q,"")).split("\r"),Q=se.split(`
20
- `),se=1<Q.length&&Q[0].length<te[0].length;if(te.length===1||se)return`
21
- `;for(var le=0,oe=0;oe<te.length;oe++)te[oe][0]===`
22
- `&&le++;return le>=te.length/2?`\r
23
- `:"\r"}}function x(g){return g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function w(g){var y=(g=g||{}).delimiter,N=g.newline,S=g.comments,A=g.step,I=g.preview,P=g.fastMode,z=null,K=!1,H=g.quoteChar==null?'"':g.quoteChar,X=H;if(g.escapeChar!==void 0&&(X=g.escapeChar),(typeof y!="string"||-1<c.BAD_DELIMITERS.indexOf(y))&&(y=","),S===y)throw new Error("Comment character same as delimiter");S===!0?S="#":(typeof S!="string"||-1<c.BAD_DELIMITERS.indexOf(S))&&(S=!1),N!==`
24
- `&&N!=="\r"&&N!==`\r
25
- `&&(N=`
26
- `);var W=0,_=!1;this.parse=function($,Z,m){if(typeof $!="string")throw new Error("Input must be a string");var T=$.length,R=y.length,D=N.length,J=S.length,V=L(A),U=[],te=[],Q=[],se=W=0;if(!$)return we();if(P||P!==!1&&$.indexOf(H)===-1){for(var le=$.split(N),oe=0;oe<le.length;oe++){if(Q=le[oe],W+=Q.length,oe!==le.length-1)W+=N.length;else if(m)return we();if(!S||Q.substring(0,J)!==S){if(V){if(U=[],tt(Q.split(y)),M(),_)return we()}else tt(Q.split(y));if(I&&I<=oe)return U=U.slice(0,I),we(!0)}}return we()}for(var ue=$.indexOf(y,W),ae=$.indexOf(N,W),Pe=new RegExp(x(X)+x(H),"g"),ne=$.indexOf(H,W);;)if($[W]===H)for(ne=W,W++;;){if((ne=$.indexOf(H,ne+1))===-1)return m||te.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:U.length,index:W}),qe();if(ne===T-1)return qe($.substring(W,ne).replace(Pe,H));if(H===X&&$[ne+1]===X)ne++;else if(H===X||ne===0||$[ne-1]!==X){ue!==-1&&ue<ne+1&&(ue=$.indexOf(y,ne+1));var fe=dt((ae=ae!==-1&&ae<ne+1?$.indexOf(N,ne+1):ae)===-1?ue:Math.min(ue,ae));if($.substr(ne+1+fe,R)===y){Q.push($.substring(W,ne).replace(Pe,H)),$[W=ne+1+fe+R]!==H&&(ne=$.indexOf(H,W)),ue=$.indexOf(y,W),ae=$.indexOf(N,W);break}if(fe=dt(ae),$.substring(ne+1+fe,ne+1+fe+D)===N){if(Q.push($.substring(W,ne).replace(Pe,H)),wt(ne+1+fe+D),ue=$.indexOf(y,W),ne=$.indexOf(H,W),V&&(M(),_))return we();if(I&&U.length>=I)return we(!0);break}te.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:U.length,index:W}),ne++}}else if(S&&Q.length===0&&$.substring(W,W+J)===S){if(ae===-1)return we();W=ae+D,ae=$.indexOf(N,W),ue=$.indexOf(y,W)}else if(ue!==-1&&(ue<ae||ae===-1))Q.push($.substring(W,ue)),W=ue+R,ue=$.indexOf(y,W);else{if(ae===-1)break;if(Q.push($.substring(W,ae)),wt(ae+D),V&&(M(),_))return we();if(I&&U.length>=I)return we(!0)}return qe();function tt(F){U.push(F),se=W}function dt(F){var G=0;return G=F!==-1&&(F=$.substring(ne+1,F))&&F.trim()===""?F.length:G}function qe(F){return m||(F===void 0&&(F=$.substring(W)),Q.push(F),W=T,tt(Q),V&&M()),we()}function wt(F){W=F,tt(Q),Q=[],ae=$.indexOf(N,W)}function we(F){if(g.header&&!Z&&U.length&&!K){var G=U[0],ee={},ce=new Set(G);let ke=!1;for(let je=0;je<G.length;je++){let ge=G[je];if(ee[ge=L(g.transformHeader)?g.transformHeader(ge,je):ge]){let Ge,ht=ee[ge];for(;Ge=ge+"_"+ht,ht++,ce.has(Ge););ce.add(Ge),G[je]=Ge,ee[ge]++,ke=!0,(z=z===null?{}:z)[Ge]=ge}else ee[ge]=1,G[je]=ge;ce.add(ge)}ke&&console.warn("Duplicate headers found and renamed."),K=!0}return{data:U,errors:te,meta:{delimiter:y,linebreak:N,aborted:_,truncated:!!F,cursor:se+(Z||0),renamedHeaders:z}}}function M(){A(we()),U=[],te=[]}},this.abort=function(){_=!0},this.getCharIndex=function(){return W}}function b(g){var y=g.data,N=l[y.workerId],S=!1;if(y.error)N.userError(y.error,y.file);else if(y.results&&y.results.data){var A={abort:function(){S=!0,k(y.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:E,resume:E};if(L(N.userStep)){for(var I=0;I<y.results.data.length&&(N.userStep({data:y.results.data[I],errors:y.results.errors,meta:y.results.meta},A),!S);I++);delete y.results}else L(N.userChunk)&&(N.userChunk(y.results,A,y.file),delete y.results)}y.finished&&!S&&k(y.workerId,y.results)}function k(g,y){var N=l[g];L(N.userComplete)&&N.userComplete(y),N.terminate(),delete l[g]}function E(){throw new Error("Not implemented.")}function O(g){if(typeof g!="object"||g===null)return g;var y,N=Array.isArray(g)?[]:{};for(y in g)N[y]=O(g[y]);return N}function C(g,y){return function(){g.apply(y,arguments)}}function L(g){return typeof g=="function"}return c.parse=function(g,y){var N=(y=y||{}).dynamicTyping||!1;if(L(N)&&(y.dynamicTypingFunction=N,N={}),y.dynamicTyping=N,y.transform=!!L(y.transform)&&y.transform,!y.worker||!c.WORKERS_SUPPORTED)return N=null,c.NODE_STREAM_INPUT,typeof g=="string"?(g=(S=>S.charCodeAt(0)!==65279?S:S.slice(1))(g),N=new(y.download?h:p)(y)):g.readable===!0&&L(g.read)&&L(g.on)?N=new v(y):(r.File&&g instanceof File||g instanceof Object)&&(N=new f(y)),N.stream(g);(N=(()=>{var S;return!!c.WORKERS_SUPPORTED&&(S=(()=>{var A=r.URL||r.webkitURL||null,I=n.toString();return c.BLOB_URL||(c.BLOB_URL=A.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",I,")();"],{type:"text/javascript"})))})(),(S=new r.Worker(S)).onmessage=b,S.id=u++,l[S.id]=S)})()).userStep=y.step,N.userChunk=y.chunk,N.userComplete=y.complete,N.userError=y.error,y.step=L(y.step),y.chunk=L(y.chunk),y.complete=L(y.complete),y.error=L(y.error),delete y.worker,N.postMessage({input:g,config:y,workerId:N.id})},c.unparse=function(g,y){var N=!1,S=!0,A=",",I=`\r
27
- `,P='"',z=P+P,K=!1,H=null,X=!1,W=((()=>{if(typeof y=="object"){if(typeof y.delimiter!="string"||c.BAD_DELIMITERS.filter(function(Z){return y.delimiter.indexOf(Z)!==-1}).length||(A=y.delimiter),typeof y.quotes!="boolean"&&typeof y.quotes!="function"&&!Array.isArray(y.quotes)||(N=y.quotes),typeof y.skipEmptyLines!="boolean"&&typeof y.skipEmptyLines!="string"||(K=y.skipEmptyLines),typeof y.newline=="string"&&(I=y.newline),typeof y.quoteChar=="string"&&(P=y.quoteChar),typeof y.header=="boolean"&&(S=y.header),Array.isArray(y.columns)){if(y.columns.length===0)throw new Error("Option columns is empty");H=y.columns}y.escapeChar!==void 0&&(z=y.escapeChar+P),y.escapeFormulae instanceof RegExp?X=y.escapeFormulae:typeof y.escapeFormulae=="boolean"&&y.escapeFormulae&&(X=/^[=+\-@\t\r].*$/)}})(),new RegExp(x(P),"g"));if(typeof g=="string"&&(g=JSON.parse(g)),Array.isArray(g)){if(!g.length||Array.isArray(g[0]))return _(null,g,K);if(typeof g[0]=="object")return _(H||Object.keys(g[0]),g,K)}else if(typeof g=="object")return typeof g.data=="string"&&(g.data=JSON.parse(g.data)),Array.isArray(g.data)&&(g.fields||(g.fields=g.meta&&g.meta.fields||H),g.fields||(g.fields=Array.isArray(g.data[0])?g.fields:typeof g.data[0]=="object"?Object.keys(g.data[0]):[]),Array.isArray(g.data[0])||typeof g.data[0]=="object"||(g.data=[g.data])),_(g.fields||[],g.data||[],K);throw new Error("Unable to serialize unrecognized input");function _(Z,m,T){var R="",D=(typeof Z=="string"&&(Z=JSON.parse(Z)),typeof m=="string"&&(m=JSON.parse(m)),Array.isArray(Z)&&0<Z.length),J=!Array.isArray(m[0]);if(D&&S){for(var V=0;V<Z.length;V++)0<V&&(R+=A),R+=$(Z[V],V);0<m.length&&(R+=I)}for(var U=0;U<m.length;U++){var te=(D?Z:m[U]).length,Q=!1,se=D?Object.keys(m[U]).length===0:m[U].length===0;if(T&&!D&&(Q=T==="greedy"?m[U].join("").trim()==="":m[U].length===1&&m[U][0].length===0),T==="greedy"&&D){for(var le=[],oe=0;oe<te;oe++){var ue=J?Z[oe]:oe;le.push(m[U][ue])}Q=le.join("").trim()===""}if(!Q){for(var ae=0;ae<te;ae++){0<ae&&!se&&(R+=A);var Pe=D&&J?Z[ae]:ae;R+=$(m[U][Pe],ae)}U<m.length-1&&(!T||0<te&&!se)&&(R+=I)}}return R}function $(Z,m){var T,R;return Z==null?"":Z.constructor===Date?JSON.stringify(Z).slice(1,25):(R=!1,X&&typeof Z=="string"&&X.test(Z)&&(Z="'"+Z,R=!0),T=Z.toString().replace(W,z),(R=R||N===!0||typeof N=="function"&&N(Z,m)||Array.isArray(N)&&N[m]||((D,J)=>{for(var V=0;V<J.length;V++)if(-1<D.indexOf(J[V]))return!0;return!1})(T,c.BAD_DELIMITERS)||-1<T.indexOf(A)||T.charAt(0)===" "||T.charAt(T.length-1)===" ")?P+T+P:T)}},c.RECORD_SEP="",c.UNIT_SEP="",c.BYTE_ORDER_MARK="\uFEFF",c.BAD_DELIMITERS=["\r",`
28
- `,'"',c.BYTE_ORDER_MARK],c.WORKERS_SUPPORTED=!a&&!!r.Worker,c.NODE_STREAM_INPUT=1,c.LocalChunkSize=10485760,c.RemoteChunkSize=5242880,c.DefaultDelimiter=",",c.Parser=w,c.ParserHandle=j,c.NetworkStreamer=h,c.FileStreamer=f,c.StringStreamer=p,c.ReadableStreamStreamer=v,r.jQuery&&((i=r.jQuery).fn.parse=function(g){var y=g.config||{},N=[];return this.each(function(I){if(!(i(this).prop("tagName").toUpperCase()==="INPUT"&&i(this).attr("type").toLowerCase()==="file"&&r.FileReader)||!this.files||this.files.length===0)return!0;for(var P=0;P<this.files.length;P++)N.push({file:this.files[P],inputElem:this,instanceConfig:i.extend({},y)})}),S(),this;function S(){if(N.length===0)L(g.complete)&&g.complete();else{var I,P,z,K,H=N[0];if(L(g.before)){var X=g.before(H.file,H.inputElem);if(typeof X=="object"){if(X.action==="abort")return I="AbortError",P=H.file,z=H.inputElem,K=X.reason,void(L(g.error)&&g.error({name:I},P,z,K));if(X.action==="skip")return void A();typeof X.config=="object"&&(H.instanceConfig=i.extend(H.instanceConfig,X.config))}else if(X==="skip")return void A()}var W=H.instanceConfig.complete;H.instanceConfig.complete=function(_){L(W)&&W(_,H.file,H.inputElem),A()},c.parse(H.file,H.instanceConfig)}}function A(){N.splice(0,1),S()}}),s&&(r.onmessage=function(g){g=g.data,c.WORKER_ID===void 0&&g&&(c.WORKER_ID=g.workerId),typeof g.input=="string"?r.postMessage({workerId:c.WORKER_ID,results:c.parse(g.input,g.config),finished:!0}):(r.File&&g.input instanceof File||g.input instanceof Object)&&(g=c.parse(g.input,g.config))&&r.postMessage({workerId:c.WORKER_ID,results:g,finished:!0})}),(h.prototype=Object.create(d.prototype)).constructor=h,(f.prototype=Object.create(d.prototype)).constructor=f,(p.prototype=Object.create(p.prototype)).constructor=p,(v.prototype=Object.create(d.prototype)).constructor=v,c})}(rn)),rn.exports}var Pf=Tf();function Mf({content:e}){const[t,n]=q.useState([]),[r,i]=q.useState([]);return q.useEffect(()=>{Pf.parse(e,{header:!0,skipEmptyLines:!0,complete:a=>{const s=[],l=[];a.data.forEach(u=>{s.push(Object.keys(u)),l.push(Object.values(u))}),n(s[0]),i(l)}})},[e]),o.jsx("div",{className:"overflow-hidden overflow-x-auto rounded-md border",children:o.jsxs(Io,{children:[o.jsx(To,{className:"bg-theme-surface-tertiary",children:o.jsx(qi,{children:t.map((a,s)=>o.jsx(Po,{className:"text-theme-text-secondary",children:a},s))})}),o.jsx(Mo,{children:r.map((a,s)=>o.jsx(qi,{children:a.map((l,u)=>o.jsx(Ro,{className:"bg-theme-surface-primary",children:l},u))},s))})]})})}function Rf({artifactVersionId:e,artifactName:t,visualizationIndex:n=0}){const[r,i]=q.useState(!1),a={index:n},{isVisualizationConfirmed:s,confirmVisualization:l}=Nl(),u=hn(),{data:c,isError:d,error:h,isPending:f}=_l({versionId:e,params:a},{retry:!1,enabled:!r});return r?o.jsx(We,{icon:o.jsx(vt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:o.jsxs("div",{className:"flex flex-col items-center text-center",children:[o.jsx("p",{className:"mb-5 text-text-lg text-theme-text-secondary",children:"Loading the visualization cancelled"}),o.jsx(ve,{size:"md",onClick:()=>i(!1),children:"Load Visualization"})]})}):d?h.status===501?o.jsxs(We,{icon:o.jsx(vt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:[o.jsx("p",{children:"This artifact cannot be visualized because it cannot be loaded from the artifact store. This might happen if your ZenML server does not have the artifact stores dependencies installed or if the server is not authenticated to access it. For more information, see our"}),o.jsx("a",{rel:"noopener noreferrer",target:"_blank",href:"https://docs.zenml.io/stack-components/artifact-stores/custom",children:"docs"})]}):o.jsx(We,{icon:o.jsx(vt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:o.jsx("div",{className:"text-center",children:o.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:h.message})})}):f?o.jsxs("div",{className:"flex flex-col items-center gap-7 py-12",children:[o.jsx(ci,{}),o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx("p",{className:"mb-5 text-display-xs",children:"Loading Visualization"}),o.jsx(ve,{onClick:()=>{u.cancelQueries({queryKey:Sl({versionId:e})}),i(!0)},intent:"secondary",size:"md",children:"Cancel"})]})]}):s(n)?o.jsxs("div",{children:[c.type==="image"&&o.jsx(lc,{content:c.value}),c.type==="html"&&o.jsx(sc,{content:c.value}),c.type==="markdown"&&o.jsx(Lf,{content:c.value}),c.type==="csv"&&o.jsx(Mf,{content:c.value}),c.type==="json"&&o.jsx(oc,{content:c.value})]}):o.jsx(Df,{artifactVersionId:e,visualizationIndex:n,artifactName:t,confirmVisualization:()=>l(n),...c})}function Df({artifactName:e,confirmVisualization:t,artifactVersionId:n,visualizationIndex:r}){return o.jsxs("div",{className:"flex flex-col items-center justify-center gap-8",children:[o.jsx(pn,{children:"This preview may contain harmful code. Only proceed if you trust the source. Loading content from untrusted sources can pose risks. If unsure, avoid loading."}),o.jsxs("div",{className:"flex justify-center gap-4",children:[o.jsx(ve,{size:"md",onClick:()=>t(),children:"Load Preview"}),o.jsx(Al,{artifactVersionId:n,visualizationIndex:r,artifactName:e})]})]})}function Ff({setIndex:e,visualizations:t,index:n}){var a;const[r,i]=q.useState(!1);return o.jsxs(Do,{open:r,onOpenChange:i,children:[o.jsx(Fo,{asChild:!0,children:o.jsxs(ve,{intent:"secondary",emphasis:"subtle",className:"flex items-center gap-0.5 bg-theme-surface-primary",size:"md",children:[(a=t[n].body)==null?void 0:a.uri.split("/").pop(),o.jsx(xt,{width:24,height:24,className:"fill-text-primary shrink-0"})]})}),o.jsx(zo,{className:"px-0",align:"start",children:o.jsxs(Bo,{defaultValue:n.toString(),className:"rounded-sharp",children:[o.jsx(qo,{className:"m-0",placeholder:"Search visualizations...",children:o.jsx(Vo,{className:"w-full",inputSize:"sm"})}),o.jsxs(Ho,{children:[o.jsx(Wo,{children:"No visualization found."}),o.jsx(Uo,{className:"max-h-[300px] overflow-y-auto",children:t.map((s,l)=>{var c;const u=(c=s.body)==null?void 0:c.uri.split("/").pop();return o.jsxs($o,{keywords:[u??""],className:"group data-[selected=true]:rounded-sharp",value:l.toString(),onSelect:()=>{e(l),i(!1)},children:[l===n?o.jsx(ku,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary group-data-[selected=true]:fill-theme-text-brand"}):o.jsx($t,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary group-data-[selected=true]:fill-theme-text-brand"}),u]},s.id)})})]})]})})]})}function zf({artifactVersionId:e}){var c,d,h;const[t,n]=q.useState(0),{isVisualizationConfirmed:r}=Nl(),{data:i,isPending:a,isError:s,error:l}=Ft({versionId:e});if(s)return o.jsx(We,{icon:o.jsx(ln,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:o.jsx("div",{className:"text-center",children:o.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:l.message})})});if(a)return o.jsx(re,{className:"h-[300px] w-full"});const u=((c=i.metadata)==null?void 0:c.visualizations)||[];return u.length<1?o.jsx(We,{icon:o.jsx(ln,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No visualizations found"}),o.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no visualizations available for this artifact version."})]})}):o.jsxs("div",{className:"space-y-5",children:[o.jsxs("div",{className:`flex ${u.length>1?"justify-between":"justify-end"}`,children:[u.length>1&&o.jsx(Ff,{setIndex:n,visualizations:u,index:t}),r(t)&&o.jsx(Al,{artifactName:((d=i.body)==null?void 0:d.artifact.name)||"artifact",artifactVersionId:e,visualizationIndex:t})]}),o.jsx(Rf,{artifactName:((h=i.body)==null?void 0:h.artifact.name)||"artifact",visualizationIndex:t,artifactVersionId:e})]})}function Bf({error:e}){return o.jsx(We,{icon:o.jsx(ln,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"Something went wrong"}),o.jsx("p",{className:"text-lg text-theme-text-secondary",children:e.message})]})})}function qf({artifactVersionId:e}){var r,i,a;const{data:t}=Ft({versionId:e}),n=(r=t==null?void 0:t.body)==null?void 0:r.version;return o.jsxs("div",{children:[o.jsx(pl,{}),o.jsxs("div",{className:"border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:[t?o.jsx("p",{className:"mb-0.5 text-text-sm text-theme-text-secondary",children:e}):o.jsx(re,{className:"w-9"}),t?o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(kl,{artifactType:((i=t.body)==null?void 0:i.type)||"BaseArtifact",className:"h-5 w-5 fill-theme-surface-strong"}),o.jsx("h2",{className:"text-display-xs font-semibold",children:(a=t.body)==null?void 0:a.artifact.name}),o.jsx(sn,{color:n?"light-purple":"light-grey",rounded:!1,children:n||"None"})]}):o.jsx(re,{className:"h-6 w-7"})]}),o.jsx("div",{className:"p-5",children:o.jsx(Vu,{children:o.jsxs(di,{defaultValue:"overview",children:[o.jsxs(hi,{children:[o.jsxs(De,{className:"flex items-center gap-2 text-text-md",value:"overview",children:[o.jsx(Ct,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Overview"})]}),o.jsxs(De,{className:"flex items-center gap-2 truncate text-text-md",value:"metadata",children:[o.jsx(xi,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Metadata"})]}),o.jsxs(De,{className:"flex items-center gap-2 text-text-md",value:"visualization",children:[o.jsx(ln,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Visualization"})]})]}),o.jsx(Fe,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:o.jsx(rc,{artifactVersionId:e})}),o.jsx(Fe,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:o.jsx(ic,{artifactVersionId:e})}),o.jsx(Fe,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"visualization",children:o.jsx(mu,{FallbackComponent:Bf,children:o.jsx(zf,{artifactVersionId:e})})})]})})})]})}function Vf({children:e,artifactVersionId:t,onOpenChange:n}){return o.jsxs(rl,{onOpenChange:n,children:[o.jsx(il,{asChild:!0,children:e}),o.jsx(al,{className:"w-[1000px] overflow-y-auto",children:o.jsx(qf,{artifactVersionId:t})})]})}function yn({children:e}){return o.jsxs(o.Fragment,{children:[o.jsx(Hi,{style:{border:"transparent",top:0,background:"transparent",width:0,height:0},type:"target",position:Wi.Top}),o.jsx("div",{className:"flex w-[300px] items-center justify-center",children:e}),o.jsx(Hi,{isConnectable:!1,type:"source",style:{border:"transparent",bottom:0,background:"transparent",width:0,height:0},position:Wi.Bottom})]})}function fo({className:e,code:t,type:n,...r}){const[i,a]=q.useState(!1),[s,l]=q.useState(!1);function u(c){navigator.clipboard&&(navigator.clipboard.writeText(c),a(!0),l(!0),setTimeout(()=>{l(!1),a(!1)},2e3))}return o.jsx(Se,{children:o.jsxs(_e,{open:s,onOpenChange:l,children:[o.jsx(Ae,{asChild:!0,children:o.jsx("div",{...r,className:Go("hidden cursor-pointer items-center justify-center transition-all group-hover:flex",e),onClick:c=>{c.stopPropagation(),u(t)}})}),o.jsx(Oe,{className:"w-full max-w-md whitespace-normal transition-opacity",children:i?"Copied!":`Copy code to load ${n}`})]})})}function Hf({data:e,selected:t}){const{unselectNodesAndEdges:n}=gi(a=>({unselectNodesAndEdges:a.unselectNodesAndEdges}));function r(a){a||setTimeout(()=>{n()},100)}function i(a){const s=a.split(".");return s[s.length-1]}return o.jsx(yn,{children:o.jsx(Vf,{onOpenChange:r,artifactVersionId:e.artifact_id,children:o.jsxs("button",{"data-selected":!!t,className:"group flex h-[50px] min-w-0 max-w-[300px] items-center justify-center gap-1 rounded-rounded border border-primary-100 bg-primary-25 py-1 pl-1 pr-2 transition-all duration-200 hover:border-primary-400 data-[selected=true]:border-primary-500 data-[selected=true]:bg-primary-500",children:[o.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5 group-data-[selected=true]:bg-white/20",children:o.jsx(kl,{className:"h-4 w-4 fill-primary-400 group-data-[selected=true]:fill-theme-text-negative",artifactType:e.type})}),o.jsxs("div",{className:"min-w-0 text-left",children:[o.jsx("p",{className:"truncate text-text-sm font-semibold text-theme-text-brand group-data-[selected=true]:text-theme-text-negative",children:e.artifact_name}),o.jsx("p",{className:"truncate text-text-xs text-theme-text-secondary group-data-[selected=true]:text-white/70",children:i(e.data_type)})]}),o.jsxs(fo,{className:"h-4 w-4 shrink-0 rounded-sm hover:bg-primary-100 active:bg-primary-200",code:dl(e.artifact_id),type:"artifact",children:[o.jsx(sl,{className:"h-3 w-3 fill-primary-400"}),o.jsx("div",{className:"sr-only",children:"Copy code to load artifact"})]})]})})})}const Wf=e=>q.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},q.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"})),Pi=e=>q.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},q.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 Uf({refetch:e}){const{fitView:t,zoomIn:n,zoomOut:r}=yl();return o.jsxs("div",{"aria-label":"Dag Controls",className:"absolute left-4 top-4 z-10 flex flex-col gap-1",children:[o.jsxs("div",{className:"divide-y divide-neutral-300 overflow-hidden rounded-md border border-neutral-300",children:[o.jsx("div",{children:o.jsx(ve,{onClick:()=>n(),emphasis:"subtle",className:"rounded-sharp border-none p-0.5",intent:"secondary",children:o.jsx(Ou,{className:"h-5 w-5 bg-theme-surface-primary fill-theme-text-primary"})})}),o.jsx("div",{children:o.jsx(ve,{onClick:()=>r(),emphasis:"subtle",className:"rounded-sharp border-none bg-theme-surface-primary p-0.5",intent:"secondary",children:o.jsx(Pi,{className:"h-5 w-5 fill-theme-text-primary"})})})]}),o.jsx(ve,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>t(),emphasis:"subtle",intent:"secondary",children:o.jsx(Wf,{className:"h-5 w-5 fill-theme-text-primary"})}),o.jsxs(ve,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>{e()},emphasis:"subtle",intent:"secondary",children:[o.jsx("span",{className:"sr-only",children:"Refresh"}),o.jsx(bl,{className:"h-5 w-5 fill-theme-text-primary"})]})]})}function $f({data:e}){const t=e.runStatus==="failed",n=e.runStatus==="completed";return o.jsx(yn,{children:o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsx(Ae,{children:o.jsxs("div",{className:"flex h-[50px] min-w-0 max-w-[300px] items-center justify-center gap-1 rounded-rounded border border-primary-100 bg-primary-25 p-1 opacity-50",children:[o.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5",children:t?o.jsx(Pi,{className:"h-4 w-4 shrink-0 fill-primary-400"}):o.jsx(gt,{status:n?"completed":"running",className:"h-4 w-4 fill-primary-400"})}),o.jsx("p",{className:"truncate text-text-sm",children:e.node_name})]})}),o.jsx(Oe,{className:"z-20 max-w-xs text-center",children:t?o.jsx(o.Fragment,{children:"This artifact was not generated because of an upstream error"}):o.jsx(o.Fragment,{children:"This artifact is not generated yet. It will not be created if the are upstream errors."})})]})})})}function Gf({data:e}){const t=e.runStatus==="failed",n=e.runStatus==="completed";return o.jsx(yn,{children:o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsx(Ae,{children:o.jsxs("div",{className:"flex h-[50px] max-w-[300px] items-center gap-1 rounded-md border border-theme-border-moderate bg-theme-surface-primary p-1 pr-2 opacity-50",children:[o.jsx("div",{className:`rounded-sm ${t?"bg-blue-50":"bg-warning-50"} p-0.5`,children:t?o.jsx(Pi,{className:"h-4 w-4 shrink-0 fill-blue-500"}):o.jsx(gt,{status:n?"completed":"running",className:"h-4 w-4 fill-theme-text-warning"})}),o.jsx("p",{className:"truncate",children:e.node_name})]})}),o.jsx(Oe,{className:"z-20 max-w-xs text-center",children:t?o.jsx(o.Fragment,{children:"This step will never start because of an upstream error"}):o.jsxs(o.Fragment,{children:["This is a future step with pending execution.",o.jsx("br",{}),"It may not run if there are upstream errors."]})})]})})})}var an={exports:{}},Zf=an.exports,Oa;function Jf(){return Oa||(Oa=1,function(e){(function(){var t,n,r,i,a,s,l,u,c,d,h,f,p,v,j;r=Math.floor,d=Math.min,n=function(x,w){return x<w?-1:x>w?1:0},c=function(x,w,b,k,E){var O;if(b==null&&(b=0),E==null&&(E=n),b<0)throw new Error("lo must be non-negative");for(k==null&&(k=x.length);b<k;)O=r((b+k)/2),E(w,x[O])<0?k=O:b=O+1;return[].splice.apply(x,[b,b-b].concat(w)),w},s=function(x,w,b){return b==null&&(b=n),x.push(w),v(x,0,x.length-1,b)},a=function(x,w){var b,k;return w==null&&(w=n),b=x.pop(),x.length?(k=x[0],x[0]=b,j(x,0,w)):k=b,k},u=function(x,w,b){var k;return b==null&&(b=n),k=x[0],x[0]=w,j(x,0,b),k},l=function(x,w,b){var k;return b==null&&(b=n),x.length&&b(x[0],w)<0&&(k=[x[0],w],w=k[0],x[0]=k[1],j(x,0,b)),w},i=function(x,w){var b,k,E,O,C,L;for(w==null&&(w=n),O=(function(){L=[];for(var g=0,y=r(x.length/2);0<=y?g<y:g>y;0<=y?g++:g--)L.push(g);return L}).apply(this).reverse(),C=[],k=0,E=O.length;k<E;k++)b=O[k],C.push(j(x,b,w));return C},p=function(x,w,b){var k;if(b==null&&(b=n),k=x.indexOf(w),k!==-1)return v(x,0,k,b),j(x,k,b)},h=function(x,w,b){var k,E,O,C,L;if(b==null&&(b=n),E=x.slice(0,w),!E.length)return E;for(i(E,b),L=x.slice(w),O=0,C=L.length;O<C;O++)k=L[O],l(E,k,b);return E.sort(b).reverse()},f=function(x,w,b){var k,E,O,C,L,g,y,N,S;if(b==null&&(b=n),w*10<=x.length){if(O=x.slice(0,w).sort(b),!O.length)return O;for(E=O[O.length-1],y=x.slice(w),C=0,g=y.length;C<g;C++)k=y[C],b(k,E)<0&&(c(O,k,0,null,b),O.pop(),E=O[O.length-1]);return O}for(i(x,b),S=[],L=0,N=d(w,x.length);0<=N?L<N:L>N;0<=N?++L:--L)S.push(a(x,b));return S},v=function(x,w,b,k){var E,O,C;for(k==null&&(k=n),E=x[b];b>w;){if(C=b-1>>1,O=x[C],k(E,O)<0){x[b]=O,b=C;continue}break}return x[b]=E},j=function(x,w,b){var k,E,O,C,L;for(b==null&&(b=n),E=x.length,L=w,O=x[w],k=2*w+1;k<E;)C=k+1,C<E&&!(b(x[k],x[C])<0)&&(k=C),x[w]=x[k],w=k,k=2*w+1;return x[w]=O,v(x,L,w,b)},t=function(){x.push=s,x.pop=a,x.replace=u,x.pushpop=l,x.heapify=i,x.updateItem=p,x.nlargest=h,x.nsmallest=f;function x(w){this.cmp=w??n,this.nodes=[]}return x.prototype.push=function(w){return s(this.nodes,w,this.cmp)},x.prototype.pop=function(){return a(this.nodes,this.cmp)},x.prototype.peek=function(){return this.nodes[0]},x.prototype.contains=function(w){return this.nodes.indexOf(w)!==-1},x.prototype.replace=function(w){return u(this.nodes,w,this.cmp)},x.prototype.pushpop=function(w){return l(this.nodes,w,this.cmp)},x.prototype.heapify=function(){return i(this.nodes,this.cmp)},x.prototype.updateItem=function(w){return p(this.nodes,w,this.cmp)},x.prototype.clear=function(){return this.nodes=[]},x.prototype.empty=function(){return this.nodes.length===0},x.prototype.size=function(){return this.nodes.length},x.prototype.clone=function(){var w;return w=new x,w.nodes=this.nodes.slice(0),w},x.prototype.toArray=function(){return this.nodes.slice(0)},x.prototype.insert=x.prototype.push,x.prototype.top=x.prototype.peek,x.prototype.front=x.prototype.peek,x.prototype.has=x.prototype.contains,x.prototype.copy=x.prototype.clone,x}(),e!==null&&e.exports?e.exports=t:window.Heap=t}).call(Zf)}(an)),an.exports}var Pn,La;function bn(){return La||(La=1,Pn=Jf()),Pn}var Mn,Ia;function Mi(){if(Ia)return Mn;Ia=1;function e(t,n,r){this.x=t,this.y=n,this.walkable=r===void 0?!0:r}return Mn=e,Mn}var Rn,Ta;function Be(){if(Ta)return Rn;Ta=1;var e={Always:1,Never:2,IfAtMostOneObstacle:3,OnlyWhenNoObstacles:4};return Rn=e,Rn}var Dn,Pa;function Qf(){if(Pa)return Dn;Pa=1;var e=Mi(),t=Be();function n(r,i,a){var s;typeof r!="object"?s=r:(i=r.length,s=r[0].length,a=r),this.width=s,this.height=i,this.nodes=this._buildNodes(s,i,a)}return n.prototype._buildNodes=function(r,i,a){var s,l,u=new Array(i);for(s=0;s<i;++s)for(u[s]=new Array(r),l=0;l<r;++l)u[s][l]=new e(l,s);if(a===void 0)return u;if(a.length!==i||a[0].length!==r)throw new Error("Matrix size does not fit");for(s=0;s<i;++s)for(l=0;l<r;++l)a[s][l]&&(u[s][l].walkable=!1);return u},n.prototype.getNodeAt=function(r,i){return this.nodes[i][r]},n.prototype.isWalkableAt=function(r,i){return this.isInside(r,i)&&this.nodes[i][r].walkable},n.prototype.isInside=function(r,i){return r>=0&&r<this.width&&i>=0&&i<this.height},n.prototype.setWalkableAt=function(r,i,a){this.nodes[i][r].walkable=a},n.prototype.getNeighbors=function(r,i){var a=r.x,s=r.y,l=[],u=!1,c=!1,d=!1,h=!1,f=!1,p=!1,v=!1,j=!1,x=this.nodes;if(this.isWalkableAt(a,s-1)&&(l.push(x[s-1][a]),u=!0),this.isWalkableAt(a+1,s)&&(l.push(x[s][a+1]),d=!0),this.isWalkableAt(a,s+1)&&(l.push(x[s+1][a]),f=!0),this.isWalkableAt(a-1,s)&&(l.push(x[s][a-1]),v=!0),i===t.Never)return l;if(i===t.OnlyWhenNoObstacles)c=v&&u,h=u&&d,p=d&&f,j=f&&v;else if(i===t.IfAtMostOneObstacle)c=v||u,h=u||d,p=d||f,j=f||v;else if(i===t.Always)c=!0,h=!0,p=!0,j=!0;else throw new Error("Incorrect value of diagonalMovement");return c&&this.isWalkableAt(a-1,s-1)&&l.push(x[s-1][a-1]),h&&this.isWalkableAt(a+1,s-1)&&l.push(x[s-1][a+1]),p&&this.isWalkableAt(a+1,s+1)&&l.push(x[s+1][a+1]),j&&this.isWalkableAt(a-1,s+1)&&l.push(x[s+1][a-1]),l},n.prototype.clone=function(){var r,i,a=this.width,s=this.height,l=this.nodes,u=new n(a,s),c=new Array(s);for(r=0;r<s;++r)for(c[r]=new Array(a),i=0;i<a;++i)c[r][i]=new e(i,r,l[r][i].walkable);return u.nodes=c,u},Dn=n,Dn}var ot={},Ma;function Et(){if(Ma)return ot;Ma=1;function e(l){for(var u=[[l.x,l.y]];l.parent;)l=l.parent,u.push([l.x,l.y]);return u.reverse()}ot.backtrace=e;function t(l,u){var c=e(l),d=e(u);return c.concat(d.reverse())}ot.biBacktrace=t;function n(l){var u,c=0,d,h,f,p;for(u=1;u<l.length;++u)d=l[u-1],h=l[u],f=d[0]-h[0],p=d[1]-h[1],c+=Math.sqrt(f*f+p*p);return c}ot.pathLength=n;function r(l,u,c,d){var h=Math.abs,f=[],p,v,j,x,w,b;for(j=h(c-l),x=h(d-u),p=l<c?1:-1,v=u<d?1:-1,w=j-x;f.push([l,u]),!(l===c&&u===d);)b=2*w,b>-x&&(w=w-x,l=l+p),b<j&&(w=w+j,u=u+v);return f}ot.interpolate=r;function i(l){var u=[],c=l.length,d,h,f,p,v,j;if(c<2)return u;for(v=0;v<c-1;++v)for(d=l[v],h=l[v+1],f=r(d[0],d[1],h[0],h[1]),p=f.length,j=0;j<p-1;++j)u.push(f[j]);return u.push(l[c-1]),u}ot.expandPath=i;function a(l,u){var c=u.length,d=u[0][0],h=u[0][1],f=u[c-1][0],p=u[c-1][1],v,j,x,w,b,k,E,O,C,L,g;for(v=d,j=h,b=[[v,j]],k=2;k<c;++k){for(O=u[k],x=O[0],w=O[1],C=r(v,j,x,w),g=!1,E=1;E<C.length;++E)if(L=C[E],!l.isWalkableAt(L[0],L[1])){g=!0;break}g&&(lastValidCoord=u[k-1],b.push(lastValidCoord),v=lastValidCoord[0],j=lastValidCoord[1])}return b.push([f,p]),b}ot.smoothenPath=a;function s(l){if(l.length<3)return l;var u=[],c=l[0][0],d=l[0][1],h=l[1][0],f=l[1][1],p=h-c,v=f-d,j,x,w,b,k,E;for(k=Math.sqrt(p*p+v*v),p/=k,v/=k,u.push([c,d]),E=2;E<l.length;E++)j=h,x=f,w=p,b=v,h=l[E][0],f=l[E][1],p=h-j,v=f-x,k=Math.sqrt(p*p+v*v),p/=k,v/=k,(p!==w||v!==b)&&u.push([j,x]);return u.push([h,f]),u}return ot.compressPath=s,ot}var Fn,Ra;function Qt(){return Ra||(Ra=1,Fn={manhattan:function(e,t){return e+t},euclidean:function(e,t){return Math.sqrt(e*e+t*t)},octile:function(e,t){var n=Math.SQRT2-1;return e<t?n*e+t:n*t+e},chebyshev:function(e,t){return Math.max(e,t)}}),Fn}var zn,Da;function Ri(){if(Da)return zn;Da=1;var e=bn(),t=Et(),n=Qt(),r=Be();function i(a){a=a||{},this.allowDiagonal=a.allowDiagonal,this.dontCrossCorners=a.dontCrossCorners,this.heuristic=a.heuristic||n.manhattan,this.weight=a.weight||1,this.diagonalMovement=a.diagonalMovement,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=r.OnlyWhenNoObstacles:this.diagonalMovement=r.IfAtMostOneObstacle:this.diagonalMovement=r.Never),this.diagonalMovement===r.Never?this.heuristic=a.heuristic||n.manhattan:this.heuristic=a.heuristic||n.octile}return i.prototype.findPath=function(a,s,l,u,c){var d=new e(function(N,S){return N.f-S.f}),h=c.getNodeAt(a,s),f=c.getNodeAt(l,u),p=this.heuristic,v=this.diagonalMovement,j=this.weight,x=Math.abs,w=Math.SQRT2,b,k,E,O,C,L,g,y;for(h.g=0,h.f=0,d.push(h),h.opened=!0;!d.empty();){if(b=d.pop(),b.closed=!0,b===f)return t.backtrace(f);for(k=c.getNeighbors(b,v),O=0,C=k.length;O<C;++O)E=k[O],!E.closed&&(L=E.x,g=E.y,y=b.g+(L-b.x===0||g-b.y===0?1:w),(!E.opened||y<E.g)&&(E.g=y,E.h=E.h||j*p(x(L-l),x(g-u)),E.f=E.g+E.h,E.parent=b,E.opened?d.updateItem(E):(d.push(E),E.opened=!0)))}return[]},zn=i,zn}var Bn,Fa;function Kf(){if(Fa)return Bn;Fa=1;var e=Ri();function t(n){e.call(this,n);var r=this.heuristic;this.heuristic=function(i,a){return r(i,a)*1e6}}return t.prototype=new e,t.prototype.constructor=t,Bn=t,Bn}var qn,za;function Yf(){if(za)return qn;za=1;var e=Et(),t=Be();function n(r){r=r||{},this.allowDiagonal=r.allowDiagonal,this.dontCrossCorners=r.dontCrossCorners,this.diagonalMovement=r.diagonalMovement,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=t.OnlyWhenNoObstacles:this.diagonalMovement=t.IfAtMostOneObstacle:this.diagonalMovement=t.Never)}return n.prototype.findPath=function(r,i,a,s,l){var u=[],c=this.diagonalMovement,d=l.getNodeAt(r,i),h=l.getNodeAt(a,s),f,p,v,j,x;for(u.push(d),d.opened=!0;u.length;){if(v=u.shift(),v.closed=!0,v===h)return e.backtrace(h);for(f=l.getNeighbors(v,c),j=0,x=f.length;j<x;++j)p=f[j],!(p.closed||p.opened)&&(u.push(p),p.opened=!0,p.parent=v)}return[]},qn=n,qn}var Vn,Ba;function Xf(){if(Ba)return Vn;Ba=1;var e=Ri();function t(n){e.call(this,n),this.heuristic=function(r,i){return 0}}return t.prototype=new e,t.prototype.constructor=t,Vn=t,Vn}var Hn,qa;function Di(){if(qa)return Hn;qa=1;var e=bn(),t=Et(),n=Qt(),r=Be();function i(a){a=a||{},this.allowDiagonal=a.allowDiagonal,this.dontCrossCorners=a.dontCrossCorners,this.diagonalMovement=a.diagonalMovement,this.heuristic=a.heuristic||n.manhattan,this.weight=a.weight||1,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=r.OnlyWhenNoObstacles:this.diagonalMovement=r.IfAtMostOneObstacle:this.diagonalMovement=r.Never),this.diagonalMovement===r.Never?this.heuristic=a.heuristic||n.manhattan:this.heuristic=a.heuristic||n.octile}return i.prototype.findPath=function(a,s,l,u,c){var d=function(P,z){return P.f-z.f},h=new e(d),f=new e(d),p=c.getNodeAt(a,s),v=c.getNodeAt(l,u),j=this.heuristic,x=this.diagonalMovement,w=this.weight,b=Math.abs,k=Math.SQRT2,E,O,C,L,g,y,N,S,A=1,I=2;for(p.g=0,p.f=0,h.push(p),p.opened=A,v.g=0,v.f=0,f.push(v),v.opened=I;!h.empty()&&!f.empty();){for(E=h.pop(),E.closed=!0,O=c.getNeighbors(E,x),L=0,g=O.length;L<g;++L)if(C=O[L],!C.closed){if(C.opened===I)return t.biBacktrace(E,C);y=C.x,N=C.y,S=E.g+(y-E.x===0||N-E.y===0?1:k),(!C.opened||S<C.g)&&(C.g=S,C.h=C.h||w*j(b(y-l),b(N-u)),C.f=C.g+C.h,C.parent=E,C.opened?h.updateItem(C):(h.push(C),C.opened=A))}for(E=f.pop(),E.closed=!0,O=c.getNeighbors(E,x),L=0,g=O.length;L<g;++L)if(C=O[L],!C.closed){if(C.opened===A)return t.biBacktrace(C,E);y=C.x,N=C.y,S=E.g+(y-E.x===0||N-E.y===0?1:k),(!C.opened||S<C.g)&&(C.g=S,C.h=C.h||w*j(b(y-a),b(N-s)),C.f=C.g+C.h,C.parent=E,C.opened?f.updateItem(C):(f.push(C),C.opened=I))}}return[]},Hn=i,Hn}var Wn,Va;function ep(){if(Va)return Wn;Va=1;var e=Di();function t(n){e.call(this,n);var r=this.heuristic;this.heuristic=function(i,a){return r(i,a)*1e6}}return t.prototype=new e,t.prototype.constructor=t,Wn=t,Wn}var Un,Ha;function tp(){if(Ha)return Un;Ha=1;var e=Et(),t=Be();function n(r){r=r||{},this.allowDiagonal=r.allowDiagonal,this.dontCrossCorners=r.dontCrossCorners,this.diagonalMovement=r.diagonalMovement,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=t.OnlyWhenNoObstacles:this.diagonalMovement=t.IfAtMostOneObstacle:this.diagonalMovement=t.Never)}return n.prototype.findPath=function(r,i,a,s,l){var u=l.getNodeAt(r,i),c=l.getNodeAt(a,s),d=[],h=[],f,p,v,j=this.diagonalMovement,x=0,w=1,b,k;for(d.push(u),u.opened=!0,u.by=x,h.push(c),c.opened=!0,c.by=w;d.length&&h.length;){for(v=d.shift(),v.closed=!0,f=l.getNeighbors(v,j),b=0,k=f.length;b<k;++b)if(p=f[b],!p.closed){if(p.opened){if(p.by===w)return e.biBacktrace(v,p);continue}d.push(p),p.parent=v,p.opened=!0,p.by=x}for(v=h.shift(),v.closed=!0,f=l.getNeighbors(v,j),b=0,k=f.length;b<k;++b)if(p=f[b],!p.closed){if(p.opened){if(p.by===x)return e.biBacktrace(p,v);continue}h.push(p),p.parent=v,p.opened=!0,p.by=w}}return[]},Un=n,Un}var $n,Wa;function np(){if(Wa)return $n;Wa=1;var e=Di();function t(n){e.call(this,n),this.heuristic=function(r,i){return 0}}return t.prototype=new e,t.prototype.constructor=t,$n=t,$n}var Gn,Ua;function rp(){if(Ua)return Gn;Ua=1,Et();var e=Qt(),t=Mi(),n=Be();function r(i){i=i||{},this.allowDiagonal=i.allowDiagonal,this.dontCrossCorners=i.dontCrossCorners,this.diagonalMovement=i.diagonalMovement,this.heuristic=i.heuristic||e.manhattan,this.weight=i.weight||1,this.trackRecursion=i.trackRecursion||!1,this.timeLimit=i.timeLimit||1/0,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=n.OnlyWhenNoObstacles:this.diagonalMovement=n.IfAtMostOneObstacle:this.diagonalMovement=n.Never),this.diagonalMovement===n.Never?this.heuristic=i.heuristic||e.manhattan:this.heuristic=i.heuristic||e.octile}return r.prototype.findPath=function(i,a,s,l,u){var c=new Date().getTime(),d=(function(k,E){return this.heuristic(Math.abs(E.x-k.x),Math.abs(E.y-k.y))}).bind(this),h=function(k,E){return k.x===E.x||k.y===E.y?1:Math.SQRT2},f=(function(k,E,O,C,L){if(this.timeLimit>0&&new Date().getTime()-c>this.timeLimit*1e3)return 1/0;var g=E+d(k,v)*this.weight;if(g>O)return g;if(k==v)return C[L]=[k.x,k.y],k;var y,N,S,A,I=u.getNeighbors(k,this.diagonalMovement);for(S=0,y=1/0;A=I[S];++S){if(this.trackRecursion&&(A.retainCount=A.retainCount+1||1,A.tested!==!0&&(A.tested=!0)),N=f(A,E+h(k,A),O,C,L+1),N instanceof t)return C[L]=[k.x,k.y],N;this.trackRecursion&&--A.retainCount===0&&(A.tested=!1),N<y&&(y=N)}return y}).bind(this),p=u.getNodeAt(i,a),v=u.getNodeAt(s,l),j=d(p,v),x,w,b;for(x=0;;++x){if(w=[],b=f(p,0,j,w,0),b===1/0)return[];if(b instanceof t)return w;j=b}return[]},Gn=r,Gn}var Zn,$a;function wn(){if($a)return Zn;$a=1;var e=bn(),t=Et(),n=Qt();Be();function r(i){i=i||{},this.heuristic=i.heuristic||n.manhattan,this.trackJumpRecursion=i.trackJumpRecursion||!1}return r.prototype.findPath=function(i,a,s,l,u){var c=this.openList=new e(function(p,v){return p.f-v.f}),d=this.startNode=u.getNodeAt(i,a),h=this.endNode=u.getNodeAt(s,l),f;for(this.grid=u,d.g=0,d.f=0,c.push(d),d.opened=!0;!c.empty();){if(f=c.pop(),f.closed=!0,f===h)return t.expandPath(t.backtrace(h));this._identifySuccessors(f)}return[]},r.prototype._identifySuccessors=function(i){var a=this.grid,s=this.heuristic,l=this.openList,u=this.endNode.x,c=this.endNode.y,d,h,f,p,v,j=i.x,x=i.y,w,b,k,E,O,C=Math.abs;for(d=this._findNeighbors(i),p=0,v=d.length;p<v;++p)if(h=d[p],f=this._jump(h[0],h[1],j,x),f){if(w=f[0],b=f[1],O=a.getNodeAt(w,b),O.closed)continue;k=n.octile(C(w-j),C(b-x)),E=i.g+k,(!O.opened||E<O.g)&&(O.g=E,O.h=O.h||s(C(w-u),C(b-c)),O.f=O.g+O.h,O.parent=i,O.opened?l.updateItem(O):(l.push(O),O.opened=!0))}},Zn=r,Zn}var Jn,Ga;function ip(){if(Ga)return Jn;Ga=1;var e=wn(),t=Be();function n(r){e.call(this,r)}return n.prototype=new e,n.prototype.constructor=n,n.prototype._jump=function(r,i,a,s){var l=this.grid,u=r-a,c=i-s;if(!l.isWalkableAt(r,i))return null;if(this.trackJumpRecursion===!0&&(l.getNodeAt(r,i).tested=!0),l.getNodeAt(r,i)===this.endNode)return[r,i];if(u!==0){if(l.isWalkableAt(r,i-1)&&!l.isWalkableAt(r-u,i-1)||l.isWalkableAt(r,i+1)&&!l.isWalkableAt(r-u,i+1))return[r,i]}else if(c!==0){if(l.isWalkableAt(r-1,i)&&!l.isWalkableAt(r-1,i-c)||l.isWalkableAt(r+1,i)&&!l.isWalkableAt(r+1,i-c))return[r,i];if(this._jump(r+1,i,r,i)||this._jump(r-1,i,r,i))return[r,i]}else throw new Error("Only horizontal and vertical movements are allowed");return this._jump(r+u,i+c,r,i)},n.prototype._findNeighbors=function(r){var i=r.parent,a=r.x,s=r.y,l=this.grid,u,c,d,h,f=[],p,v,j,x;if(i)u=i.x,c=i.y,d=(a-u)/Math.max(Math.abs(a-u),1),h=(s-c)/Math.max(Math.abs(s-c),1),d!==0?(l.isWalkableAt(a,s-1)&&f.push([a,s-1]),l.isWalkableAt(a,s+1)&&f.push([a,s+1]),l.isWalkableAt(a+d,s)&&f.push([a+d,s])):h!==0&&(l.isWalkableAt(a-1,s)&&f.push([a-1,s]),l.isWalkableAt(a+1,s)&&f.push([a+1,s]),l.isWalkableAt(a,s+h)&&f.push([a,s+h]));else for(p=l.getNeighbors(r,t.Never),j=0,x=p.length;j<x;++j)v=p[j],f.push([v.x,v.y]);return f},Jn=n,Jn}var Qn,Za;function ap(){if(Za)return Qn;Za=1;var e=wn(),t=Be();function n(r){e.call(this,r)}return n.prototype=new e,n.prototype.constructor=n,n.prototype._jump=function(r,i,a,s){var l=this.grid,u=r-a,c=i-s;if(!l.isWalkableAt(r,i))return null;if(this.trackJumpRecursion===!0&&(l.getNodeAt(r,i).tested=!0),l.getNodeAt(r,i)===this.endNode)return[r,i];if(u!==0&&c!==0){if(l.isWalkableAt(r-u,i+c)&&!l.isWalkableAt(r-u,i)||l.isWalkableAt(r+u,i-c)&&!l.isWalkableAt(r,i-c))return[r,i];if(this._jump(r+u,i,r,i)||this._jump(r,i+c,r,i))return[r,i]}else if(u!==0){if(l.isWalkableAt(r+u,i+1)&&!l.isWalkableAt(r,i+1)||l.isWalkableAt(r+u,i-1)&&!l.isWalkableAt(r,i-1))return[r,i]}else if(l.isWalkableAt(r+1,i+c)&&!l.isWalkableAt(r+1,i)||l.isWalkableAt(r-1,i+c)&&!l.isWalkableAt(r-1,i))return[r,i];return this._jump(r+u,i+c,r,i)},n.prototype._findNeighbors=function(r){var i=r.parent,a=r.x,s=r.y,l=this.grid,u,c,d,h,f=[],p,v,j,x;if(i)u=i.x,c=i.y,d=(a-u)/Math.max(Math.abs(a-u),1),h=(s-c)/Math.max(Math.abs(s-c),1),d!==0&&h!==0?(l.isWalkableAt(a,s+h)&&f.push([a,s+h]),l.isWalkableAt(a+d,s)&&f.push([a+d,s]),l.isWalkableAt(a+d,s+h)&&f.push([a+d,s+h]),l.isWalkableAt(a-d,s)||f.push([a-d,s+h]),l.isWalkableAt(a,s-h)||f.push([a+d,s-h])):d===0?(l.isWalkableAt(a,s+h)&&f.push([a,s+h]),l.isWalkableAt(a+1,s)||f.push([a+1,s+h]),l.isWalkableAt(a-1,s)||f.push([a-1,s+h])):(l.isWalkableAt(a+d,s)&&f.push([a+d,s]),l.isWalkableAt(a,s+1)||f.push([a+d,s+1]),l.isWalkableAt(a,s-1)||f.push([a+d,s-1]));else for(p=l.getNeighbors(r,t.Always),j=0,x=p.length;j<x;++j)v=p[j],f.push([v.x,v.y]);return f},Qn=n,Qn}var Kn,Ja;function sp(){if(Ja)return Kn;Ja=1;var e=wn(),t=Be();function n(r){e.call(this,r)}return n.prototype=new e,n.prototype.constructor=n,n.prototype._jump=function(r,i,a,s){var l=this.grid,u=r-a,c=i-s;if(!l.isWalkableAt(r,i))return null;if(this.trackJumpRecursion===!0&&(l.getNodeAt(r,i).tested=!0),l.getNodeAt(r,i)===this.endNode)return[r,i];if(u!==0&&c!==0){if(this._jump(r+u,i,r,i)||this._jump(r,i+c,r,i))return[r,i]}else if(u!==0){if(l.isWalkableAt(r,i-1)&&!l.isWalkableAt(r-u,i-1)||l.isWalkableAt(r,i+1)&&!l.isWalkableAt(r-u,i+1))return[r,i]}else if(c!==0&&(l.isWalkableAt(r-1,i)&&!l.isWalkableAt(r-1,i-c)||l.isWalkableAt(r+1,i)&&!l.isWalkableAt(r+1,i-c)))return[r,i];return l.isWalkableAt(r+u,i)&&l.isWalkableAt(r,i+c)?this._jump(r+u,i+c,r,i):null},n.prototype._findNeighbors=function(r){var i=r.parent,a=r.x,s=r.y,l=this.grid,u,c,d,h,f=[],p,v,j,x;if(i)if(u=i.x,c=i.y,d=(a-u)/Math.max(Math.abs(a-u),1),h=(s-c)/Math.max(Math.abs(s-c),1),d!==0&&h!==0)l.isWalkableAt(a,s+h)&&f.push([a,s+h]),l.isWalkableAt(a+d,s)&&f.push([a+d,s]),l.isWalkableAt(a,s+h)&&l.isWalkableAt(a+d,s)&&f.push([a+d,s+h]);else{var w;if(d!==0){w=l.isWalkableAt(a+d,s);var b=l.isWalkableAt(a,s+1),k=l.isWalkableAt(a,s-1);w&&(f.push([a+d,s]),b&&f.push([a+d,s+1]),k&&f.push([a+d,s-1])),b&&f.push([a,s+1]),k&&f.push([a,s-1])}else if(h!==0){w=l.isWalkableAt(a,s+h);var E=l.isWalkableAt(a+1,s),O=l.isWalkableAt(a-1,s);w&&(f.push([a,s+h]),E&&f.push([a+1,s+h]),O&&f.push([a-1,s+h])),E&&f.push([a+1,s]),O&&f.push([a-1,s])}}else for(p=l.getNeighbors(r,t.OnlyWhenNoObstacles),j=0,x=p.length;j<x;++j)v=p[j],f.push([v.x,v.y]);return f},Kn=n,Kn}var Yn,Qa;function lp(){if(Qa)return Yn;Qa=1;var e=wn(),t=Be();function n(r){e.call(this,r)}return n.prototype=new e,n.prototype.constructor=n,n.prototype._jump=function(r,i,a,s){var l=this.grid,u=r-a,c=i-s;if(!l.isWalkableAt(r,i))return null;if(this.trackJumpRecursion===!0&&(l.getNodeAt(r,i).tested=!0),l.getNodeAt(r,i)===this.endNode)return[r,i];if(u!==0&&c!==0){if(l.isWalkableAt(r-u,i+c)&&!l.isWalkableAt(r-u,i)||l.isWalkableAt(r+u,i-c)&&!l.isWalkableAt(r,i-c))return[r,i];if(this._jump(r+u,i,r,i)||this._jump(r,i+c,r,i))return[r,i]}else if(u!==0){if(l.isWalkableAt(r+u,i+1)&&!l.isWalkableAt(r,i+1)||l.isWalkableAt(r+u,i-1)&&!l.isWalkableAt(r,i-1))return[r,i]}else if(l.isWalkableAt(r+1,i+c)&&!l.isWalkableAt(r+1,i)||l.isWalkableAt(r-1,i+c)&&!l.isWalkableAt(r-1,i))return[r,i];return l.isWalkableAt(r+u,i)||l.isWalkableAt(r,i+c)?this._jump(r+u,i+c,r,i):null},n.prototype._findNeighbors=function(r){var i=r.parent,a=r.x,s=r.y,l=this.grid,u,c,d,h,f=[],p,v,j,x;if(i)u=i.x,c=i.y,d=(a-u)/Math.max(Math.abs(a-u),1),h=(s-c)/Math.max(Math.abs(s-c),1),d!==0&&h!==0?(l.isWalkableAt(a,s+h)&&f.push([a,s+h]),l.isWalkableAt(a+d,s)&&f.push([a+d,s]),(l.isWalkableAt(a,s+h)||l.isWalkableAt(a+d,s))&&f.push([a+d,s+h]),!l.isWalkableAt(a-d,s)&&l.isWalkableAt(a,s+h)&&f.push([a-d,s+h]),!l.isWalkableAt(a,s-h)&&l.isWalkableAt(a+d,s)&&f.push([a+d,s-h])):d===0?l.isWalkableAt(a,s+h)&&(f.push([a,s+h]),l.isWalkableAt(a+1,s)||f.push([a+1,s+h]),l.isWalkableAt(a-1,s)||f.push([a-1,s+h])):l.isWalkableAt(a+d,s)&&(f.push([a+d,s]),l.isWalkableAt(a,s+1)||f.push([a+d,s+1]),l.isWalkableAt(a,s-1)||f.push([a+d,s-1]));else for(p=l.getNeighbors(r,t.IfAtMostOneObstacle),j=0,x=p.length;j<x;++j)v=p[j],f.push([v.x,v.y]);return f},Yn=n,Yn}var Xn,Ka;function op(){if(Ka)return Xn;Ka=1;var e=Be(),t=ip(),n=ap(),r=sp(),i=lp();function a(s){return s=s||{},s.diagonalMovement===e.Never?new t(s):s.diagonalMovement===e.Always?new n(s):s.diagonalMovement===e.OnlyWhenNoObstacles?new r(s):new i(s)}return Xn=a,Xn}var er,Ya;function up(){return Ya||(Ya=1,er={Heap:bn(),Node:Mi(),Grid:Qf(),Util:Et(),DiagonalMovement:Be(),Heuristic:Qt(),AStarFinder:Ri(),BestFirstFinder:Kf(),BreadthFirstFinder:Yf(),DijkstraFinder:Xf(),BiAStarFinder:Di(),BiBestFirstFinder:ep(),BiBreadthFirstFinder:tp(),BiDijkstraFinder:np(),IDAStarFinder:rp(),JumpPointFinder:op()}),er}var tr,Xa;function cp(){return Xa||(Xa=1,tr=up()),tr}var Tt=cp(),si=function(t,n){switch(n){case"top":return{x:t.x,y:t.y-1};case"bottom":return{x:t.x,y:t.y+1};case"left":return{x:t.x-1,y:t.y};case"right":return{x:t.x+1,y:t.y}}},es=function(t,n,r){for(var i=t.getNodeAt(n.x,n.y);!i.walkable;){t.setWalkableAt(i.x,i.y,!0);var a=si(i,r);i=t.getNodeAt(a.x,a.y)}},en=function(t,n,r,i){var a=t.x/i,s=t.y/i,l=n/i,u=r/i;if(l<1)for(;l!==1;)l++,a++;else if(l>1)for(;l!==1;)l--,a--;if(u<1)for(;u!==1;)u++,s++;else if(u>1)for(;u!==1;)u--,s--;return{x:a,y:s}},ts=function(t,n,r,i){var a=t.x*i,s=t.y*i,l=n,u=r;if(l<i)for(;l!==i;)l=l+i,a=a-i;else if(l>i)for(;l!==i;)l=l-i,a=a+i;if(u<i)for(;u!==i;)u=u+i,s=s-i;else if(u>i)for(;u!==i;)u=u-i,s=s+i;return{x:a,y:s}},tn=function(t,n){return n===void 0&&(n=10),Math.round(t/n)*n},Ot=function(t,n){return n===void 0&&(n=10),Math.floor(t/n)*n},pt=function(t,n){return n===void 0&&(n=10),Math.ceil(t/n)*n},ns=function(t,n){n===void 0&&(n=0);var r=Math.max(Math.round(t),n);return r=Number.isInteger(r)?r:n,r=r>=n?r:n,r},dp=function(t,n,r,i,a){a===void 0&&(a=2);var s=t.xMin,l=t.yMin,u=t.width,c=t.height,d=pt(u,a)/a+1,h=pt(c,a)/a+1,f=new Tt.Grid(d,h);n.forEach(function(k){for(var E=en(k.topLeft,s,l,a),O=en(k.bottomRight,s,l,a),C=E.x;C<O.x;C++)for(var L=E.y;L<O.y;L++)f.setWalkableAt(C,L,!1)});var p=en({x:tn(r.x,a),y:tn(r.y,a)},s,l,a),v=en({x:tn(i.x,a),y:tn(i.y,a)},s,l,a),j=f.getNodeAt(p.x,p.y);es(f,j,r.position);var x=f.getNodeAt(v.x,v.y);es(f,x,i.position);var w=si(j,r.position),b=si(x,i.position);return{grid:f,start:w,end:b}},hp=function(t,n,r){var i=[[t.x,t.y]].concat(r,[[n.x,n.y]]);return fp(i)},fp=function(t){for(var n=0,r=1,i=t[0],a=t[0],s="M"+a[n]+","+a[r]+"M",l=0;l<t.length;l++){var u=t[l],c=pp(i[n],i[r],u[n],u[r]);s+=" "+c[n]+","+c[r],s+="Q"+u[n]+","+u[r],i=u}var d=t[t.length-1];return s+=" "+d[0]+","+d[1],s},pp=function(t,n,r,i){var a=(t-r)/2+r,s=(n-i)/2+i;return[a,s]},mp=function(t,n,r){try{var i=new Tt.AStarFinder({diagonalMovement:Tt.DiagonalMovement.Always}),a=i.findPath(n.x,n.y,r.x,r.y,t),s=Tt.Util.smoothenPath(t,a);return a.length===0||s.length===0?null:{fullPath:a,smoothedPath:s}}catch{return null}},gp=function(t,n,r){try{var i=new Tt.JumpPointFinder({diagonalMovement:Tt.DiagonalMovement.Never}),a=i.findPath(n.x,n.y,r.x,r.y,t),s=a;return a.length===0||s.length===0?null:{fullPath:a,smoothedPath:s}}catch{return null}},xp=function(t,n,r){n===void 0&&(n=2),r===void 0&&(r=2);var i=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,u=t.map(function(w){var b,k,E=Math.max(w.width||0,1),O=Math.max(w.height||0,1),C={x:((b=w.positionAbsolute)==null?void 0:b.x)||0,y:((k=w.positionAbsolute)==null?void 0:k.y)||0},L={x:C.x-n,y:C.y-n},g={x:C.x-n,y:C.y+O+n},y={x:C.x+E+n,y:C.y-n},N={x:C.x+E+n,y:C.y+O+n};return r>0&&(L.x=Ot(L.x,r),L.y=Ot(L.y,r),g.x=Ot(g.x,r),g.y=pt(g.y,r),y.x=pt(y.x,r),y.y=Ot(y.y,r),N.x=pt(N.x,r),N.y=pt(N.y,r)),L.y<l&&(l=L.y),L.x<s&&(s=L.x),N.y>a&&(a=N.y),N.x>i&&(i=N.x),{id:w.id,width:E,height:O,topLeft:L,bottomLeft:g,topRight:y,bottomRight:N}}),c=n*2;i=pt(i+c,r),a=pt(a+c,r),s=Ot(s-c,r),l=Ot(l-c,r);var d={x:s,y:l},h={x:s,y:a},f={x:i,y:l},p={x:i,y:a},v=Math.abs(d.x-f.x),j=Math.abs(d.y-h.y),x={topLeft:d,bottomLeft:h,topRight:f,bottomRight:p,width:v,height:j,xMax:i,yMax:a,xMin:s,yMin:l};return{nodeBoxes:u,graphBox:x}},yp=function(t){var n=t.options,r=n===void 0?{}:n,i=t.nodes,a=i===void 0?[]:i,s=t.sourceX,l=t.sourceY,u=t.targetX,c=t.targetY,d=t.sourcePosition,h=t.targetPosition;try{var f=r.drawEdge,p=f===void 0?hp:f,v=r.generatePath,j=v===void 0?mp:v,x=r.gridRatio,w=x===void 0?10:x,b=r.nodePadding,k=b===void 0?10:b;w=ns(w),k=ns(k);var E=xp(a,k,w),O=E.graphBox,C=E.nodeBoxes,L={x:s,y:l,position:d},g={x:u,y:c,position:h},y=dp(O,C,L,g,w),N=y.grid,S=y.start,A=y.end,I=j(N,S,A);if(I===null)return null;var P=I.fullPath,z=I.smoothedPath,K=z.map(function(R){var D=R[0],J=R[1],V=ts({x:D,y:J},O.xMin,O.yMin,w);return[V.x,V.y]}),H=p(L,g,K),X=Math.floor(P.length/2),W=P[X],_=W[0],$=W[1],Z=ts({x:_,y:$},O.xMin,O.yMin,w),m=Z.x,T=Z.y;return{svgPathString:H,edgeCenterX:m,edgeCenterY:T}}catch{return null}};const rs=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function bp(e,t,n,r){const i=Math.min(rs(e,t)/2,rs(t,n)/2,r),{x:a,y:s}=t;if(e.x===a&&a===n.x||e.y===s&&s===n.y)return`L${a} ${s}`;if(e.y===s){const c=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${a+i*c},${s}Q ${a},${s} ${a},${s+i*d}`}const l=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${a},${s+i*u}Q ${a},${s} ${a+i*l},${s}`}function nr(e){return{x:e[0],y:e[1]}}const wp=e=>(t,n,r)=>{const i=e.borderRadius;let a=`M ${t.x}, ${t.y} `;const s=r.reduce((l,u,c)=>{let d="";if(c>0&&c<r.length-1)d=bp(nr(r[c-1]),nr(u),nr(r[c+1]),i);else{const[h,f]=u;d=`${c===0?"M":"L"}${h} ${f}`}return l+=d,l},"");return a+=s,a+=`L ${n.x}, ${n.y} `,a};function vp(e){const t=ju(),n=yp({nodes:t,sourcePosition:e.sourcePosition,targetPosition:e.targetPosition,sourceX:e.sourceX,sourceY:e.sourceY,targetX:e.targetX,targetY:e.targetY,options:{drawEdge:wp({borderRadius:10}),generatePath:gp,gridRatio:t.length>20?6:t.length>10?3:2}});return n===null?o.jsx(Nu,{...e}):o.jsx(Eu,{...e,path:n.svgPathString})}const po=e=>q.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},q.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 Cp({stepId:e}){var a;const{data:t,isPending:n,isError:r,error:i}=yt({stepId:e});return r?o.jsx(ut,{err:i}):n?o.jsx(re,{className:"h-[300px] w-full"}):o.jsx(ct,{initialOpen:!0,title:"Code",children:o.jsx(Ue,{fullWidth:!0,highlightCode:!0,wrap:!0,code:((a=t==null?void 0:t.metadata)==null?void 0:a.source_code)||""})})}const kp=e=>q.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},q.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"}),q.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"}),q.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"}),q.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"}),q.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"}),q.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"}),q.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"}),q.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"}),q.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"}),q.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"})),jp=e=>q.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},q.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 mo({data:e}){const[t,n]=q.useState(!0);return o.jsxs(Pt,{open:t,onOpenChange:n,children:[o.jsx(Mt,{intent:"primary",className:"flex items-center gap-[10px]",children:o.jsxs(Rt,{className:"flex w-full items-center gap-[10px]",children:[o.jsx(xt,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Docker Image"]})}),o.jsxs(Dt,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[o.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[o.jsx(de,{label:"Docker Image",value:o.jsxs("div",{className:"flex justify-between",children:[o.jsxs(Le,{className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[o.jsx(kp,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),Zo(e.image)]}),o.jsxs("div",{className:"align-center mr-1 flex",children:[o.jsx("a",{className:"cursor-pointer",rel:"noopener noreferrer",target:"_blank",href:`https://${e.image}`,children:o.jsx(jp,{className:"mr-1 mt-0.5 h-5 w-5 fill-theme-text-tertiary"})}),o.jsx(Qe,{copyText:e.image,isVisible:!0,copyTitle:"Copy url"})]})]})}),o.jsx(de,{label:"Contains Code",value:o.jsx(Le,{color:e.contains_code?"green":"grey",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:e.contains_code?"Available":"None"})})]}),e.dockerfile&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Dockerfile"}),o.jsx(Ue,{fullWidth:!0,wrap:!0,code:e.dockerfile})]}),e.requirements&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Requirements"}),o.jsx(Ue,{fullWidth:!0,wrap:!0,code:e.requirements})]})]})]})}function Np({buildId:e}){return["pipeline-builds",e]}async function Ep({buildId:e},t){const n=Xe(et.runs.detail(e)),r=await fetch(n,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...t}});if(!r.ok)throw new Ke({message:`Error while fetching pipeline build ${e}`,status:r.status,statusText:r.statusText});return r.json()}function go(e,t){return st({queryKey:Np(e),queryFn:()=>Ep(e),...t})}function Sp({stepId:e}){var f,p,v,j,x,w,b,k,E,O,C,L;const{data:t,isPending:n,isError:r,error:i}=yt({stepId:e}),{runId:a}=Ie(),{data:s}=Te({runId:a},{throwOnError:!0,enabled:!!a}),{data:l}=go({buildId:(p=(f=s==null?void 0:s.body)==null?void 0:f.build)==null?void 0:p.id},{enabled:!!((j=(v=s==null?void 0:s.body)==null?void 0:v.build)!=null&&j.id)}),u=t==null?void 0:t.name,d=(()=>{var y;const g=(y=l==null?void 0:l.metadata)==null?void 0:y.images;if(!g)return null;if(u){for(const N in g)if(N.startsWith(`${u}.`))return N;if(g[u])return u}return g.orchestrator?"orchestrator":null})(),h=d&&((w=(x=l==null?void 0:l.metadata)==null?void 0:x.images)==null?void 0:w[d]);return r?o.jsx(ut,{err:i}):n?o.jsxs("div",{className:"space-y-5",children:[o.jsx(re,{className:"h-[200]"}),o.jsx(re,{className:"h-[200px]"}),o.jsx(re,{className:"h-[200px]"})]}):o.jsxs("div",{className:"space-y-5",children:[o.jsx(He,{isInitialOpen:!0,data:(k=(b=t.metadata)==null?void 0:b.config)==null?void 0:k.parameters,title:"Parameters"}),h?o.jsx(mo,{data:h}):null,o.jsx(_p,{id:t.id}),o.jsx(He,{isInitialOpen:!0,title:"Resources",data:((O=(E=t.metadata)==null?void 0:E.config.settings)==null?void 0:O.resources)||{}}),o.jsx(He,{isInitialOpen:!0,title:"Substitutions",data:(C=t.metadata)==null?void 0:C.config.substitutions}),o.jsx(He,{isInitialOpen:!0,title:"Extra",data:(L=t.metadata)==null?void 0:L.config.extra})]})}function _p({id:e}){return o.jsxs(ct,{initialOpen:!0,title:"Code",children:[o.jsx("h2",{className:"mb-2 text-text-md text-theme-text-secondary",children:"Get config programmatically"}),o.jsx(Ue,{fullWidth:!0,highlightCode:!0,wrap:!0,code:hl(e)})]})}function Fi(e,t){return["initializing","running"].includes(e)&&t==="failed"}const Ap=e=>q.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},q.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"})),Op=e=>q.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},q.createElement("path",{d:"M11.9993 21.4496L15.6838 10.0985H8.32019L11.9993 21.4496Z",fill:"#E24329"}),q.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"}),q.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"}),q.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"}),q.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"}),q.createElement("path",{d:"M11.9993 21.4496L15.6838 10.0985H20.8446L11.9993 21.4496Z",fill:"#FC6D26"}),q.createElement("path",{d:"M11.9993 21.4496L3.15942 10.0985H8.32019L11.9993 21.4496Z",fill:"#FC6D26"}));function Lp({repositoryId:e}){return["code_repositories",e]}async function Ip({repositoryId:e}){const t=Xe(et.code_repositories.detail(e)),n=await fetch(t,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(n.status===404&&Gt(),!n.ok)throw new Ke({message:`Error while fetching code repository ${e}`,status:n.status,statusText:n.statusText});return n.json()}function Tp(e,t){return st({queryKey:Lp(e),queryFn:()=>Ip(e),...t})}function xo({repositoryId:e,commit:t}){var l;const{data:n,isPending:r,isError:i}=Tp({repositoryId:e},{enabled:!!e});if(!e||!t)return o.jsx("p",{children:"Not available"});if(r)return o.jsx(re,{className:"h-6"});if(i)return null;const a=(l=n.metadata)==null?void 0:l.config,s=()=>{var h,f,p,v;let u=null,c=n==null?void 0:n.name,d;return((f=(h=n==null?void 0:n.body)==null?void 0:h.source)==null?void 0:f.attribute)==="GitHubCodeRepository"?(u=Ap,c=`${a==null?void 0:a.owner}/${a==null?void 0:a.repository}`,d=`https://www.${(typeof(a==null?void 0:a.host)=="string"?a.host:"github.com").replace(/\/$/,"")}/${c}`+(t?`/commit/${t}`:"")):((v=(p=n==null?void 0:n.body)==null?void 0:p.source)==null?void 0:v.attribute)==="GitLabCodeRepository"&&(u=Op,c=`${a==null?void 0:a.group}/${a==null?void 0:a.project}`,d=`https://www.${(typeof(a==null?void 0:a.host)=="string"?a.host:"gitlab.com").replace(/\/$/,"")}/${c}`+(t?`/commit/${t}`:"")),o.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:`flex items-center ${d?"":"pointer-events-none"}`,onClick:j=>j.stopPropagation(),href:d,children:[u&&o.jsx(u,{className:"mr-1 h-5 w-5 fill-theme-text-brand"}),c]})};return o.jsxs("div",{className:"group/copybutton mr-1",children:[o.jsxs(Le,{color:"grey",className:"inline-flex items-center font-semibold text-neutral-900",rounded:!1,emphasis:"subtle",children:[s(),o.jsx("div",{className:"ml-1 rounded-sm bg-neutral-200 px-1 py-0.25",children:Jo(t,10)})]}),o.jsx(Qe,{copyText:t})]})}function yo(){return o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsx(Ae,{children:o.jsxs(Le,{color:"yellow",className:"flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[o.jsx(Cu,{className:"h-4 w-4 shrink-0 fill-current"}),"Login Required"]})}),o.jsx(Oe,{children:o.jsxs("p",{children:["You must be logged in for this link to work.",o.jsx("br",{}),"Please ensure you're signed in before accessing."]})})]})})}function Pp({stepStatus:e,isStatusUnknown:t}){function n(){return o.jsxs(Le,{color:fn(t?"unknown":e),rounded:!0,emphasis:"subtle",className:"flex w-fit items-center gap-1 capitalize",children:[o.jsx(gt,{className:"fill-current",status:t?"unknown":e}),t?"Unknown - Last reported: "+e:e]})}return t?o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsx(Ae,{className:"z-10 cursor-default",children:o.jsx(n,{})}),o.jsxs(Oe,{className:"text-center",children:["Last reported as ",o.jsx("b",{children:e})," but current status unknown due to pipeline failure.",o.jsx("br",{}),"Communication may be lost."]})]})}):o.jsx(n,{})}function Mp({stepId:e,runId:t}){var h,f,p,v,j,x,w,b,k,E,O,C,L,g,y,N,S,A,I,P,z,K,H,X,W,_,$,Z,m;const{data:n,isError:r,isPending:i,error:a}=yt({stepId:e}),{data:s}=Te({runId:t}),l=(p=(f=(h=s==null?void 0:s.body)==null?void 0:h.code_reference)==null?void 0:f.body)==null?void 0:p.code_repository;if(r)return o.jsx(ut,{err:a});if(i)return o.jsx(re,{className:"h-[300px] w-full"});const u=(j=(v=n.metadata)==null?void 0:v.config)==null?void 0:j.enable_artifact_metadata,c=(w=(x=n.metadata)==null?void 0:x.config)==null?void 0:w.enable_artifact_visualization,d=Fi(((b=n.body)==null?void 0:b.status)??"running",((k=s==null?void 0:s.body)==null?void 0:k.status)??"running");return o.jsx(ct,{initialOpen:!0,title:"Details",children:o.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[o.jsx(de,{label:"Id",value:o.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[n.id,o.jsx(Qe,{copyText:n.id})]})}),o.jsx(de,{label:"Status",value:o.jsx("div",{className:"flex items-center gap-0.5 overflow-x-auto",children:o.jsx(Pp,{stepStatus:((E=n.body)==null?void 0:E.status)??"running",isStatusUnknown:d})})}),s?o.jsxs(o.Fragment,{children:[o.jsx(de,{label:"Pipeline",value:o.jsx(kt,{to:it.projects.pipelines.namespace(encodeURIComponent((C=(O=s.body)==null?void 0:O.pipeline)==null?void 0:C.name)),children:o.jsxs(Le,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[o.jsx(pi,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(g=(L=s.body)==null?void 0:L.pipeline)==null?void 0:g.name]})})}),o.jsx(Ze,{children:o.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[o.jsx("span",{className:"truncate",children:"Repository/Commit"}),o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsxs(Ae,{className:"cursor-default",children:[o.jsx(Ct,{className:"h-3 w-3 fill-theme-text-secondary"}),o.jsx("span",{className:"sr-only",children:"Info"})]}),o.jsx(Oe,{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."})]})})]})}),o.jsx(Je,{className:"h-auto",children:(y=s.body)!=null&&y.code_reference?o.jsx(xo,{repositoryId:l==null?void 0:l.id,commit:(N=s.body.code_reference.body)==null?void 0:N.commit}):"Not available"}),o.jsx(Ze,{className:(S=s.metadata)!=null&&S.code_path?"col-span-3":"",children:o.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[o.jsx("span",{children:"Code Path"}),o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsxs(Ae,{className:"cursor-default",children:[o.jsx(Ct,{className:"h-3 w-3 fill-theme-text-secondary"}),o.jsx("span",{className:"sr-only",children:"Info"})]}),o.jsx(Oe,{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"})]})})]})}),o.jsx(Je,{className:(A=s.metadata)!=null&&A.code_path?"col-span-3 h-auto":"",children:(I=s.metadata)!=null&&I.code_path?o.jsx(Ue,{code:s.metadata.code_path}):"Not available"})]}):o.jsx(re,{className:"h-6 w-full"}),o.jsx(de,{label:"Cache key",value:o.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[(P=n.metadata)==null?void 0:P.cache_key,o.jsx(Qe,{copyText:(z=n.metadata)==null?void 0:z.cache_key})]})}),o.jsx(de,{label:"Author",value:o.jsx("div",{className:"inline-flex items-center gap-1",children:o.jsx(ui,{username:(H=(K=n.resources)==null?void 0:K.user)==null?void 0:H.name})})}),o.jsx(de,{label:"Start Time",value:(X=n.body)!=null&&X.start_time?o.jsx(Wt,{dateString:(W=n.body)==null?void 0:W.start_time}):"Not available"}),o.jsx(de,{label:"End Time",value:(_=n.body)!=null&&_.end_time?o.jsx(Wt,{dateString:($=n.body)==null?void 0:$.end_time}):"Not available"}),o.jsx(de,{label:"Duration",value:vl(((Z=n.body)==null?void 0:Z.start_time)||"",((m=n.body)==null?void 0:m.end_time)||"")}),o.jsx(de,{label:"Artifact metadata",value:o.jsx(sn,{size:"sm",color:u?"green":"grey",children:u?"Enable":"Disabled"})}),o.jsx(de,{label:"Artifact visualization",value:o.jsx(sn,{size:"sm",color:c?"green":"grey",children:c?"Enable":"Disabled"})})]})})}function Rp({className:e}){var u,c,d,h,f;const{runId:t}=Ie(),{data:n,isPending:r,isError:i}=Te({runId:t},{throwOnError:!0}),a=(c=(u=n==null?void 0:n.metadata)==null?void 0:u.run_metadata)==null?void 0:c.orchestrator_url,s=(h=(d=n==null?void 0:n.metadata)==null?void 0:d.run_metadata)==null?void 0:h.orchestrator_logs_url,l=(f=n==null?void 0:n.metadata)==null?void 0:f.orchestrator_run_id;return i?o.jsx("p",{children:"Failed to fetch Orchestrator Card"}):r?o.jsx(re,{className:"h-[150px] w-full"}):o.jsx(ct,{className:e,initialOpen:!0,title:"Orchestrator",children:o.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[o.jsx(de,{label:"Orchestrator URL",value:a&&mt(a)?o.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[o.jsx("a",{className:"truncate underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:a,children:a}),o.jsx(Qe,{copyText:a})]}):"Not available"}),o.jsx(de,{label:"Orchestrator Logs",value:s&&mt(s)?o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(yo,{}),o.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[o.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:s,children:s}),o.jsx(Qe,{copyText:s})]})]}):"Not available"}),o.jsx(de,{label:"Orchestrator Run ID",value:l?o.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[l,o.jsx(Qe,{copyText:l})]}):"Not available"})]})})}function Dp({stepId:e}){return["logs",e]}async function Fp({stepId:e}){const t=Xe(et.steps.logs(e)),n=await jt(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Ke({message:r.detail[1].includes("File")&&r.detail[1]||`The logs for step ${e} cannot be fetched or this pipeline run ran locally and logs were not tracked`,status:n.status,statusText:n.statusText})}return n.json()}function zp(e,t){return st({queryKey:Dp(e),queryFn:()=>Fp(e),...t})}const Bp=()=>o.jsx("section",{className:"flex h-[calc(100vh_-_270px)] items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center justify-center",children:[o.jsxs("div",{className:"relative mb-2 flex items-center justify-center",children:[o.jsx(ci,{className:"h-[120px] w-[120px]"}),o.jsx(Vp,{})]}),o.jsx("h2",{className:"my-3 text-center text-display-xs font-semibold",children:"Loading the Logs"}),o.jsxs("p",{className:"text-center text-text-lg text-theme-text-secondary",children:["It can take up to a few minutes. ",o.jsx("br",{})," Please wait while we fetch logs from the artifact store."]})]})});function qp({stepId:e,stepDetail:t}){var l,u;const n=(u=(l=t==null?void 0:t.metadata)==null?void 0:l.config)==null?void 0:u.enable_step_logs,{data:r,isPending:i,isError:a,error:s}=zp({stepId:e});return a?o.jsx(ut,{err:s}):i?o.jsx(Bp,{}):o.jsx(ct,{initialOpen:!0,title:"Logs",children:typeof n=="boolean"&&n===!1?o.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:o.jsx(de,{label:"Enable logs",value:"Disabled"})}):o.jsx(Ue,{codeClasses:"whitespace-pre-line",fullWidth:!0,wrap:!0,code:r||""})})}function Vp(){return o.jsx("div",{className:"absolute rounded-rounded bg-primary-25 p-3",children:o.jsx(wl,{className:"h-7 w-7 fill-primary-400"})})}function Hp({stepId:e}){var a;const{data:t,isPending:n,isError:r,error:i}=yt({stepId:e});return n?o.jsxs("div",{className:"flex flex-col gap-5",children:[o.jsx(re,{className:"h-9 w-full"}),o.jsx(re,{className:"h-9 w-full"})]}):r?o.jsx(ut,{err:i}):!((a=t.metadata)!=null&&a.run_metadata)||Object.keys(t.metadata.run_metadata).length===0?o.jsx(We,{icon:o.jsx($t,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),o.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available for this step."})]})}):o.jsxs("div",{className:"flex flex-col gap-5",children:[o.jsx(bi,{metadata:t.metadata.run_metadata}),o.jsx(yi,{metadata:t.metadata.run_metadata})]})}function Wp({component:e,objectConfig:t}){var i,a;const n=`${(i=e.body)==null?void 0:i.type}.${(a=e.body)==null?void 0:a.flavor_name}`,r=(t==null?void 0:t[n])??void 0;return!r||Object.keys(r).length===0?o.jsx(kt,{to:it.components.detail(e.id),children:o.jsx(ll,{className:"flex w-full items-center justify-between gap-3 px-5 py-3 text-left",children:o.jsx(is,{component:e})})}):o.jsx(He,{intent:"primary",contentClassName:"pl-[60px]",className:"w-full",isInitialOpen:!1,title:o.jsx("div",{className:"flex w-full items-center justify-between gap-3 text-left",children:o.jsx(is,{component:e})}),data:r,children:o.jsx(ve,{asChild:!0,intent:"secondary",emphasis:"subtle",className:"mx-auto flex w-fit justify-center text-text-sm text-theme-text-secondary",children:o.jsx(kt,{to:it.components.detail(e.id),children:"See Component Details"})})})}function is({component:e}){var t,n,r,i;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("img",{width:32,height:32,alt:`${(t=e.body)==null?void 0:t.flavor_name} logo`,src:nl(((n=e.body)==null?void 0:n.logo_url)||"")}),o.jsxs("div",{children:[o.jsx("p",{className:"text-text-lg",children:e.name}),o.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),o.jsx(Tu,{type:((r=e.body)==null?void 0:r.type)||"orchestrator",children:Qo(((i=e.body)==null?void 0:i.type)||"")})]})}function Up({stack:e}){return o.jsxs(ll,{className:"flex items-center justify-between gap-3 px-5 py-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ko,{type:"square",size:"md",children:o.jsx(Yo,{size:"md",children:e.name[0]})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-text-lg",children:e.name}),o.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),o.jsxs(Le,{rounded:!1,className:"inline-flex shrink items-center gap-0.5 truncate",color:"turquoise",emphasis:"subtle",children:[o.jsx(fi,{className:"h-4 w-4 shrink-0 fill-current"}),o.jsx("div",{className:"truncate",children:"Stack"})]})]})}function bo({stack:e,objectConfig:t}){var n;return o.jsxs("div",{className:"space-y-5",children:[o.jsx($p,{}),o.jsx(Up,{stack:e}),o.jsx("ul",{className:"space-y-5",children:Object.values(((n=e.metadata)==null?void 0:n.components)||{}).map(r=>o.jsx("li",{className:"w-full",children:o.jsx(Wp,{component:r[0],objectConfig:t})},r[0].id))})]})}function $p(){return o.jsx(pn,{className:"truncate",children:o.jsx("p",{className:"truncate",children:"Current run-specific stack settings. Click on a component for full default settings."})})}function Gp({stepId:e}){var s,l,u,c;const{runId:t}=Ie(),n=Te({runId:t}),r=yt({stepId:e});if(n.isPending||r.isPending)return o.jsx(re,{className:"h-[250px] w-full"});if(n.isError||r.isError)return o.jsx("p",{children:"Something went wrong fetching the run"});const i=(u=(l=(s=n.data)==null?void 0:s.body)==null?void 0:l.stack)==null?void 0:u.id,a=((c=r.data.metadata)==null?void 0:c.config.settings)||{};return i?o.jsx(Zp,{objectConfig:a,stackId:i}):o.jsx(We,{icon:o.jsx(vt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-display-xs font-semibold",children:"No Stack"}),o.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There is no stack associated with this run."})]})})}function Zp({stackId:e,objectConfig:t}){const{data:n,isError:r,isPending:i}=Cl({stackId:e});return i?o.jsx(re,{className:"h-[250px] w-full"}):r?o.jsx("p",{children:"Failed to fetch Stack"}):o.jsx(bo,{stack:n,objectConfig:t})}function Jp({stepId:e}){var l,u;const{runId:t}=Ie(),n=yt({stepId:e}),r=Te({runId:t});if(n.isPending||r.isPending)return o.jsx(re,{className:"h-6 w-[200px]"});if(n.error||r.error)return null;const i=(l=n.data.body)==null?void 0:l.status,a=(u=r.data.body)==null?void 0:u.status,s=Fi(i??"running",a??"running");return o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("div",{className:`rounded-sm p-0.5 ${s?"bg-blue-50":ml(i)}`,children:o.jsx(gt,{status:s?"unknown":i,className:"h-4 w-4 shrink-0"})}),o.jsx("h2",{className:"text-display-xs font-semibold",children:n.data.name}),o.jsx(sn,{size:"sm",className:"capitalize",color:xu(s?"unknown":i),children:s?`Unknown - Last reported: ${i}`:i||"None"})]})}function Qp({stepId:e}){const{runId:t}=Ie(),{data:n}=yt({stepId:e});return o.jsxs("div",{children:[o.jsx(pl,{}),o.jsx("div",{className:"flex justify-between border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:o.jsx(Jp,{stepId:e})}),o.jsx("div",{className:"p-5",children:o.jsxs(di,{defaultValue:"overview",children:[o.jsxs(hi,{children:[o.jsxs(De,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[o.jsx(Ct,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Overview"})]}),o.jsxs(De,{className:"flex items-center gap-2 truncate text-text-md",value:"stack",children:[o.jsx(fi,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Stack"})]}),o.jsxs(De,{className:"flex items-center gap-2 truncate text-text-md",value:"code",children:[o.jsx(Lu,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Code"})]}),o.jsxs(De,{className:"flex items-center gap-2 truncate text-text-md",value:"logs",children:[o.jsx(wl,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Logs"})]}),o.jsxs(De,{className:"flex items-center gap-2 truncate text-text-md",value:"config",children:[o.jsx(po,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Configuration"})]}),o.jsxs(De,{className:"flex items-center gap-2 text-text-md",value:"metadata",children:[o.jsx(xi,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Metadata"})]})]}),o.jsxs(Fe,{className:"m-0 mt-5 space-y-5 border-0 bg-transparent p-0",value:"overview",children:[o.jsx(Mp,{runId:t,stepId:e}),o.jsx(Rp,{})]}),o.jsx(Fe,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"stack",children:o.jsx(Gp,{stepId:e})}),o.jsx(Fe,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"code",children:o.jsx(Cp,{stepId:e})}),o.jsx(Fe,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"logs",children:o.jsx(qp,{stepId:e,stepDetail:n})}),o.jsx(Fe,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"config",children:o.jsx(Sp,{stepId:e})}),o.jsx(Fe,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:o.jsx(Hp,{stepId:e})})]})})]})}function Kp({children:e,stepId:t,onOpenChange:n}){return o.jsxs(rl,{onOpenChange:n,children:[o.jsx(il,{asChild:!0,children:e}),o.jsx(al,{className:"w-[1000px] overflow-y-auto",children:o.jsx(Qp,{stepId:t})})]})}const Yp=e=>({unselectAll:e.unselectNodesAndEdges});function Xp({data:e,selected:t}){const{unselectAll:n}=gi(Yp),r=e.status==="failed";function i(s){s||setTimeout(()=>{n()},100)}const a=Fi(e.status,e.runStatus);return o.jsx(yn,{children:o.jsx(Kp,{onOpenChange:i,stepId:e.step_id,children:o.jsxs("button",{"data-failed":r,"data-selected":!!t,className:Xo("group max-h-[80px] max-w-[300px] overflow-hidden rounded-md border bg-theme-surface-primary transition-all duration-200 hover:shadow-md data-[selected=true]:shadow-md",{"border-theme-border-moderate hover:border-neutral-400 data-[selected=true]:border-theme-border-bold":!r,"border-error-200":r}),children:[o.jsxs("div",{className:"flex flex-1 items-center gap-1 py-1 pl-1 pr-2",children:[o.jsx("div",{className:`rounded-sm p-0.5 ${ml(a?"unknown":e.status)}`,children:o.jsx(gt,{status:a?"unknown":e.status,className:"h-4 w-4 shrink-0"})}),o.jsx("p",{className:"truncate font-semibold",children:e.step_name}),o.jsxs(fo,{className:"h-4 w-4 shrink-0 rounded-sm hover:bg-theme-surface-secondary active:bg-neutral-300",code:hl(e.step_id),type:"step",children:[o.jsx(sl,{className:"h-3 w-3 fill-theme-text-tertiary"}),o.jsx("div",{className:"sr-only",children:"Copy code to load step"})]})]}),o.jsx("div",{"data-failed":r,className:"flex flex-1 justify-end border-t border-theme-border-moderate bg-theme-surface-tertiary px-2 py-0.5 text-text-xs data-[failed=true]:border-error-200 data-[failed=true]:bg-error-50 data-[failed=true]:text-theme-text-error",children:r?"Execution failed":e.duration===void 0||e.duration===null?"N/A":Iu(e.duration)})]})})})}var rr,as;function zi(){if(as)return rr;as=1;var e="\0",t="\0",n="";class r{constructor(d){xe(this,"_isDirected",!0);xe(this,"_isMultigraph",!1);xe(this,"_isCompound",!1);xe(this,"_label");xe(this,"_defaultNodeLabelFn",()=>{});xe(this,"_defaultEdgeLabelFn",()=>{});xe(this,"_nodes",{});xe(this,"_in",{});xe(this,"_preds",{});xe(this,"_out",{});xe(this,"_sucs",{});xe(this,"_edgeObjs",{});xe(this,"_edgeLabels",{});xe(this,"_nodeCount",0);xe(this,"_edgeCount",0);xe(this,"_parent");xe(this,"_children");d&&(this._isDirected=Object.hasOwn(d,"directed")?d.directed:!0,this._isMultigraph=Object.hasOwn(d,"multigraph")?d.multigraph:!1,this._isCompound=Object.hasOwn(d,"compound")?d.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(d){return this._label=d,this}graph(){return this._label}setDefaultNodeLabel(d){return this._defaultNodeLabelFn=d,typeof d!="function"&&(this._defaultNodeLabelFn=()=>d),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var d=this;return this.nodes().filter(h=>Object.keys(d._in[h]).length===0)}sinks(){var d=this;return this.nodes().filter(h=>Object.keys(d._out[h]).length===0)}setNodes(d,h){var f=arguments,p=this;return d.forEach(function(v){f.length>1?p.setNode(v,h):p.setNode(v)}),this}setNode(d,h){return Object.hasOwn(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=h),this):(this._nodes[d]=arguments.length>1?h:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=t,this._children[d]={},this._children[t][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)}node(d){return this._nodes[d]}hasNode(d){return Object.hasOwn(this._nodes,d)}removeNode(d){var h=this;if(Object.hasOwn(this._nodes,d)){var f=p=>h.removeEdge(h._edgeObjs[p]);delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],this.children(d).forEach(function(p){h.setParent(p)}),delete this._children[d]),Object.keys(this._in[d]).forEach(f),delete this._in[d],delete this._preds[d],Object.keys(this._out[d]).forEach(f),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this}setParent(d,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(h===void 0)h=t;else{h+="";for(var f=h;f!==void 0;f=this.parent(f))if(f===d)throw new Error("Setting "+h+" as parent of "+d+" would create a cycle");this.setNode(h)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=h,this._children[h][d]=!0,this}_removeFromParentsChildList(d){delete this._children[this._parent[d]][d]}parent(d){if(this._isCompound){var h=this._parent[d];if(h!==t)return h}}children(d=t){if(this._isCompound){var h=this._children[d];if(h)return Object.keys(h)}else{if(d===t)return this.nodes();if(this.hasNode(d))return[]}}predecessors(d){var h=this._preds[d];if(h)return Object.keys(h)}successors(d){var h=this._sucs[d];if(h)return Object.keys(h)}neighbors(d){var h=this.predecessors(d);if(h){const p=new Set(h);for(var f of this.successors(d))p.add(f);return Array.from(p.values())}}isLeaf(d){var h;return this.isDirected()?h=this.successors(d):h=this.neighbors(d),h.length===0}filterNodes(d){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var f=this;Object.entries(this._nodes).forEach(function([j,x]){d(j)&&h.setNode(j,x)}),Object.values(this._edgeObjs).forEach(function(j){h.hasNode(j.v)&&h.hasNode(j.w)&&h.setEdge(j,f.edge(j))});var p={};function v(j){var x=f.parent(j);return x===void 0||h.hasNode(x)?(p[j]=x,x):x in p?p[x]:v(x)}return this._isCompound&&h.nodes().forEach(j=>h.setParent(j,v(j))),h}setDefaultEdgeLabel(d){return this._defaultEdgeLabelFn=d,typeof d!="function"&&(this._defaultEdgeLabelFn=()=>d),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(d,h){var f=this,p=arguments;return d.reduce(function(v,j){return p.length>1?f.setEdge(v,j,h):f.setEdge(v,j),j}),this}setEdge(){var d,h,f,p,v=!1,j=arguments[0];typeof j=="object"&&j!==null&&"v"in j?(d=j.v,h=j.w,f=j.name,arguments.length===2&&(p=arguments[1],v=!0)):(d=j,h=arguments[1],f=arguments[3],arguments.length>2&&(p=arguments[2],v=!0)),d=""+d,h=""+h,f!==void 0&&(f=""+f);var x=s(this._isDirected,d,h,f);if(Object.hasOwn(this._edgeLabels,x))return v&&(this._edgeLabels[x]=p),this;if(f!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(h),this._edgeLabels[x]=v?p:this._defaultEdgeLabelFn(d,h,f);var w=l(this._isDirected,d,h,f);return d=w.v,h=w.w,Object.freeze(w),this._edgeObjs[x]=w,i(this._preds[h],d),i(this._sucs[d],h),this._in[h][x]=w,this._out[d][x]=w,this._edgeCount++,this}edge(d,h,f){var p=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,h,f);return this._edgeLabels[p]}edgeAsObj(){const d=this.edge(...arguments);return typeof d!="object"?{label:d}:d}hasEdge(d,h,f){var p=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,h,f);return Object.hasOwn(this._edgeLabels,p)}removeEdge(d,h,f){var p=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,h,f),v=this._edgeObjs[p];return v&&(d=v.v,h=v.w,delete this._edgeLabels[p],delete this._edgeObjs[p],a(this._preds[h],d),a(this._sucs[d],h),delete this._in[h][p],delete this._out[d][p],this._edgeCount--),this}inEdges(d,h){var f=this._in[d];if(f){var p=Object.values(f);return h?p.filter(v=>v.v===h):p}}outEdges(d,h){var f=this._out[d];if(f){var p=Object.values(f);return h?p.filter(v=>v.w===h):p}}nodeEdges(d,h){var f=this.inEdges(d,h);if(f)return f.concat(this.outEdges(d,h))}}function i(c,d){c[d]?c[d]++:c[d]=1}function a(c,d){--c[d]||delete c[d]}function s(c,d,h,f){var p=""+d,v=""+h;if(!c&&p>v){var j=p;p=v,v=j}return p+n+v+n+(f===void 0?e:f)}function l(c,d,h,f){var p=""+d,v=""+h;if(!c&&p>v){var j=p;p=v,v=j}var x={v:p,w:v};return f&&(x.name=f),x}function u(c,d){return s(c,d.v,d.w,d.name)}return rr=r,rr}var ir,ss;function e0(){return ss||(ss=1,ir="2.2.4"),ir}var ar,ls;function t0(){return ls||(ls=1,ar={Graph:zi(),version:e0()}),ar}var sr,os;function n0(){if(os)return sr;os=1;var e=zi();sr={write:t,read:i};function t(a){var s={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:r(a)};return a.graph()!==void 0&&(s.value=structuredClone(a.graph())),s}function n(a){return a.nodes().map(function(s){var l=a.node(s),u=a.parent(s),c={v:s};return l!==void 0&&(c.value=l),u!==void 0&&(c.parent=u),c})}function r(a){return a.edges().map(function(s){var l=a.edge(s),u={v:s.v,w:s.w};return s.name!==void 0&&(u.name=s.name),l!==void 0&&(u.value=l),u})}function i(a){var s=new e(a.options).setGraph(a.value);return a.nodes.forEach(function(l){s.setNode(l.v,l.value),l.parent&&s.setParent(l.v,l.parent)}),a.edges.forEach(function(l){s.setEdge({v:l.v,w:l.w,name:l.name},l.value)}),s}return sr}var lr,us;function r0(){if(us)return lr;us=1,lr=e;function e(t){var n={},r=[],i;function a(s){Object.hasOwn(n,s)||(n[s]=!0,i.push(s),t.successors(s).forEach(a),t.predecessors(s).forEach(a))}return t.nodes().forEach(function(s){i=[],a(s),i.length&&r.push(i)}),r}return lr}var or,cs;function wo(){if(cs)return or;cs=1;class e{constructor(){xe(this,"_arr",[]);xe(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(n){return n.key})}has(n){return Object.hasOwn(this._keyIndices,n)}priority(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(n,r){var i=this._keyIndices;if(n=String(n),!Object.hasOwn(i,n)){var a=this._arr,s=a.length;return i[n]=s,a.push({key:n,priority:r}),this._decrease(s),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key}decrease(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)}_heapify(n){var r=this._arr,i=2*n,a=i+1,s=n;i<r.length&&(s=r[i].priority<r[s].priority?i:s,a<r.length&&(s=r[a].priority<r[s].priority?a:s),s!==n&&(this._swap(n,s),this._heapify(s)))}_decrease(n){for(var r=this._arr,i=r[n].priority,a;n!==0&&(a=n>>1,!(r[a].priority<i));)this._swap(n,a),n=a}_swap(n,r){var i=this._arr,a=this._keyIndices,s=i[n],l=i[r];i[n]=l,i[r]=s,a[l.key]=n,a[s.key]=r}}return or=e,or}var ur,ds;function vo(){if(ds)return ur;ds=1;var e=wo();ur=n;var t=()=>1;function n(i,a,s,l){return r(i,String(a),s||t,l||function(u){return i.outEdges(u)})}function r(i,a,s,l){var u={},c=new e,d,h,f=function(p){var v=p.v!==d?p.v:p.w,j=u[v],x=s(p),w=h.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+p+" Weight: "+x);w<j.distance&&(j.distance=w,j.predecessor=d,c.decrease(v,w))};for(i.nodes().forEach(function(p){var v=p===a?0:Number.POSITIVE_INFINITY;u[p]={distance:v},c.add(p,v)});c.size()>0&&(d=c.removeMin(),h=u[d],h.distance!==Number.POSITIVE_INFINITY);)l(d).forEach(f);return u}return ur}var cr,hs;function i0(){if(hs)return cr;hs=1;var e=vo();cr=t;function t(n,r,i){return n.nodes().reduce(function(a,s){return a[s]=e(n,s,r,i),a},{})}return cr}var dr,fs;function Co(){if(fs)return dr;fs=1,dr=e;function e(t){var n=0,r=[],i={},a=[];function s(l){var u=i[l]={onStack:!0,lowlink:n,index:n++};if(r.push(l),t.successors(l).forEach(function(h){Object.hasOwn(i,h)?i[h].onStack&&(u.lowlink=Math.min(u.lowlink,i[h].index)):(s(h),u.lowlink=Math.min(u.lowlink,i[h].lowlink))}),u.lowlink===u.index){var c=[],d;do d=r.pop(),i[d].onStack=!1,c.push(d);while(l!==d);a.push(c)}}return t.nodes().forEach(function(l){Object.hasOwn(i,l)||s(l)}),a}return dr}var hr,ps;function a0(){if(ps)return hr;ps=1;var e=Co();hr=t;function t(n){return e(n).filter(function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return hr}var fr,ms;function s0(){if(ms)return fr;ms=1,fr=t;var e=()=>1;function t(r,i,a){return n(r,i||e,a||function(s){return r.outEdges(s)})}function n(r,i,a){var s={},l=r.nodes();return l.forEach(function(u){s[u]={},s[u][u]={distance:0},l.forEach(function(c){u!==c&&(s[u][c]={distance:Number.POSITIVE_INFINITY})}),a(u).forEach(function(c){var d=c.v===u?c.w:c.v,h=i(c);s[u][d]={distance:h,predecessor:u}})}),l.forEach(function(u){var c=s[u];l.forEach(function(d){var h=s[d];l.forEach(function(f){var p=h[u],v=c[f],j=h[f],x=p.distance+v.distance;x<j.distance&&(j.distance=x,j.predecessor=v.predecessor)})})}),s}return fr}var pr,gs;function ko(){if(gs)return pr;gs=1;function e(n){var r={},i={},a=[];function s(l){if(Object.hasOwn(i,l))throw new t;Object.hasOwn(r,l)||(i[l]=!0,r[l]=!0,n.predecessors(l).forEach(s),delete i[l],a.push(l))}if(n.sinks().forEach(s),Object.keys(r).length!==n.nodeCount())throw new t;return a}class t extends Error{constructor(){super(...arguments)}}return pr=e,e.CycleException=t,pr}var mr,xs;function l0(){if(xs)return mr;xs=1;var e=ko();mr=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return mr}var gr,ys;function jo(){if(ys)return gr;ys=1,gr=e;function e(i,a,s){Array.isArray(a)||(a=[a]);var l=i.isDirected()?h=>i.successors(h):h=>i.neighbors(h),u=s==="post"?t:n,c=[],d={};return a.forEach(h=>{if(!i.hasNode(h))throw new Error("Graph does not have node: "+h);u(h,l,d,c)}),c}function t(i,a,s,l){for(var u=[[i,!1]];u.length>0;){var c=u.pop();c[1]?l.push(c[0]):Object.hasOwn(s,c[0])||(s[c[0]]=!0,u.push([c[0],!0]),r(a(c[0]),d=>u.push([d,!1])))}}function n(i,a,s,l){for(var u=[i];u.length>0;){var c=u.pop();Object.hasOwn(s,c)||(s[c]=!0,l.push(c),r(a(c),d=>u.push(d)))}}function r(i,a){for(var s=i.length;s--;)a(i[s],s,i);return i}return gr}var xr,bs;function o0(){if(bs)return xr;bs=1;var e=jo();xr=t;function t(n,r){return e(n,r,"post")}return xr}var yr,ws;function u0(){if(ws)return yr;ws=1;var e=jo();yr=t;function t(n,r){return e(n,r,"pre")}return yr}var br,vs;function c0(){if(vs)return br;vs=1;var e=zi(),t=wo();br=n;function n(r,i){var a=new e,s={},l=new t,u;function c(h){var f=h.v===u?h.w:h.v,p=l.priority(f);if(p!==void 0){var v=i(h);v<p&&(s[f]=u,l.decrease(f,v))}}if(r.nodeCount()===0)return a;r.nodes().forEach(function(h){l.add(h,Number.POSITIVE_INFINITY),a.setNode(h)}),l.decrease(r.nodes()[0],0);for(var d=!1;l.size()>0;){if(u=l.removeMin(),Object.hasOwn(s,u))a.setEdge(u,s[u]);else{if(d)throw new Error("Input graph is not connected: "+r);d=!0}r.nodeEdges(u).forEach(c)}return a}return br}var wr,Cs;function d0(){return Cs||(Cs=1,wr={components:r0(),dijkstra:vo(),dijkstraAll:i0(),findCycles:a0(),floydWarshall:s0(),isAcyclic:l0(),postorder:o0(),preorder:u0(),prim:c0(),tarjan:Co(),topsort:ko()}),wr}var vr,ks;function Ye(){if(ks)return vr;ks=1;var e=t0();return vr={Graph:e.Graph,json:n0(),alg:d0(),version:e.version},vr}var Cr,js;function h0(){if(js)return Cr;js=1;class e{constructor(){let i={};i._next=i._prev=i,this._sentinel=i}dequeue(){let i=this._sentinel,a=i._prev;if(a!==i)return t(a),a}enqueue(i){let a=this._sentinel;i._prev&&i._next&&t(i),i._next=a._next,a._next._prev=i,a._next=i,i._prev=a}toString(){let i=[],a=this._sentinel,s=a._prev;for(;s!==a;)i.push(JSON.stringify(s,n)),s=s._prev;return"["+i.join(", ")+"]"}}function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,i){if(r!=="_next"&&r!=="_prev")return i}return Cr=e,Cr}var kr,Ns;function f0(){if(Ns)return kr;Ns=1;let e=Ye().Graph,t=h0();kr=r;let n=()=>1;function r(c,d){if(c.nodeCount()<=1)return[];let h=s(c,d||n);return i(h.graph,h.buckets,h.zeroIdx).flatMap(p=>c.outEdges(p.v,p.w))}function i(c,d,h){let f=[],p=d[d.length-1],v=d[0],j;for(;c.nodeCount();){for(;j=v.dequeue();)a(c,d,h,j);for(;j=p.dequeue();)a(c,d,h,j);if(c.nodeCount()){for(let x=d.length-2;x>0;--x)if(j=d[x].dequeue(),j){f=f.concat(a(c,d,h,j,!0));break}}}return f}function a(c,d,h,f,p){let v=p?[]:void 0;return c.inEdges(f.v).forEach(j=>{let x=c.edge(j),w=c.node(j.v);p&&v.push({v:j.v,w:j.w}),w.out-=x,l(d,h,w)}),c.outEdges(f.v).forEach(j=>{let x=c.edge(j),w=j.w,b=c.node(w);b.in-=x,l(d,h,b)}),c.removeNode(f.v),v}function s(c,d){let h=new e,f=0,p=0;c.nodes().forEach(x=>{h.setNode(x,{v:x,in:0,out:0})}),c.edges().forEach(x=>{let w=h.edge(x.v,x.w)||0,b=d(x),k=w+b;h.setEdge(x.v,x.w,k),p=Math.max(p,h.node(x.v).out+=b),f=Math.max(f,h.node(x.w).in+=b)});let v=u(p+f+3).map(()=>new t),j=f+1;return h.nodes().forEach(x=>{l(v,j,h.node(x))}),{graph:h,buckets:v,zeroIdx:j}}function l(c,d,h){h.out?h.in?c[h.out-h.in+d].enqueue(h):c[c.length-1].enqueue(h):c[0].enqueue(h)}function u(c){const d=[];for(let h=0;h<c;h++)d.push(h);return d}return kr}var jr,Es;function be(){if(Es)return jr;Es=1;let e=Ye().Graph;jr={addBorderNode:d,addDummyNode:t,applyWithChunking:p,asNonCompoundGraph:r,buildLayerMatrix:l,intersectRect:s,mapValues:C,maxRank:v,normalizeRanks:u,notime:w,partition:j,pick:O,predecessorWeights:a,range:E,removeEmptyRanks:c,simplify:n,successorWeights:i,time:x,uniqueId:k,zipObject:L};function t(g,y,N,S){let A;do A=k(S);while(g.hasNode(A));return N.dummy=y,g.setNode(A,N),A}function n(g){let y=new e().setGraph(g.graph());return g.nodes().forEach(N=>y.setNode(N,g.node(N))),g.edges().forEach(N=>{let S=y.edge(N.v,N.w)||{weight:0,minlen:1},A=g.edge(N);y.setEdge(N.v,N.w,{weight:S.weight+A.weight,minlen:Math.max(S.minlen,A.minlen)})}),y}function r(g){let y=new e({multigraph:g.isMultigraph()}).setGraph(g.graph());return g.nodes().forEach(N=>{g.children(N).length||y.setNode(N,g.node(N))}),g.edges().forEach(N=>{y.setEdge(N,g.edge(N))}),y}function i(g){let y=g.nodes().map(N=>{let S={};return g.outEdges(N).forEach(A=>{S[A.w]=(S[A.w]||0)+g.edge(A).weight}),S});return L(g.nodes(),y)}function a(g){let y=g.nodes().map(N=>{let S={};return g.inEdges(N).forEach(A=>{S[A.v]=(S[A.v]||0)+g.edge(A).weight}),S});return L(g.nodes(),y)}function s(g,y){let N=g.x,S=g.y,A=y.x-N,I=y.y-S,P=g.width/2,z=g.height/2;if(!A&&!I)throw new Error("Not possible to find intersection inside of the rectangle");let K,H;return Math.abs(I)*P>Math.abs(A)*z?(I<0&&(z=-z),K=z*A/I,H=z):(A<0&&(P=-P),K=P,H=P*I/A),{x:N+K,y:S+H}}function l(g){let y=E(v(g)+1).map(()=>[]);return g.nodes().forEach(N=>{let S=g.node(N),A=S.rank;A!==void 0&&(y[A][S.order]=N)}),y}function u(g){let y=g.nodes().map(S=>{let A=g.node(S).rank;return A===void 0?Number.MAX_VALUE:A}),N=p(Math.min,y);g.nodes().forEach(S=>{let A=g.node(S);Object.hasOwn(A,"rank")&&(A.rank-=N)})}function c(g){let y=g.nodes().map(P=>g.node(P).rank),N=p(Math.min,y),S=[];g.nodes().forEach(P=>{let z=g.node(P).rank-N;S[z]||(S[z]=[]),S[z].push(P)});let A=0,I=g.graph().nodeRankFactor;Array.from(S).forEach((P,z)=>{P===void 0&&z%I!==0?--A:P!==void 0&&A&&P.forEach(K=>g.node(K).rank+=A)})}function d(g,y,N,S){let A={width:0,height:0};return arguments.length>=4&&(A.rank=N,A.order=S),t(g,"border",A,y)}function h(g,y=f){const N=[];for(let S=0;S<g.length;S+=y){const A=g.slice(S,S+y);N.push(A)}return N}const f=65535;function p(g,y){if(y.length>f){const N=h(y);return g.apply(null,N.map(S=>g.apply(null,S)))}else return g.apply(null,y)}function v(g){const N=g.nodes().map(S=>{let A=g.node(S).rank;return A===void 0?Number.MIN_VALUE:A});return p(Math.max,N)}function j(g,y){let N={lhs:[],rhs:[]};return g.forEach(S=>{y(S)?N.lhs.push(S):N.rhs.push(S)}),N}function x(g,y){let N=Date.now();try{return y()}finally{console.log(g+" time: "+(Date.now()-N)+"ms")}}function w(g,y){return y()}let b=0;function k(g){var y=++b;return toString(g)+y}function E(g,y,N=1){y==null&&(y=g,g=0);let S=I=>I<y;N<0&&(S=I=>y<I);const A=[];for(let I=g;S(I);I+=N)A.push(I);return A}function O(g,y){const N={};for(const S of y)g[S]!==void 0&&(N[S]=g[S]);return N}function C(g,y){let N=y;return typeof y=="string"&&(N=S=>S[y]),Object.entries(g).reduce((S,[A,I])=>(S[A]=N(I,A),S),{})}function L(g,y){return g.reduce((N,S,A)=>(N[S]=y[A],N),{})}return jr}var Nr,Ss;function p0(){if(Ss)return Nr;Ss=1;let e=f0(),t=be().uniqueId;Nr={run:n,undo:i};function n(a){(a.graph().acyclicer==="greedy"?e(a,l(a)):r(a)).forEach(u=>{let c=a.edge(u);a.removeEdge(u),c.forwardName=u.name,c.reversed=!0,a.setEdge(u.w,u.v,c,t("rev"))});function l(u){return c=>u.edge(c).weight}}function r(a){let s=[],l={},u={};function c(d){Object.hasOwn(u,d)||(u[d]=!0,l[d]=!0,a.outEdges(d).forEach(h=>{Object.hasOwn(l,h.w)?s.push(h):c(h.w)}),delete l[d])}return a.nodes().forEach(c),s}function i(a){a.edges().forEach(s=>{let l=a.edge(s);if(l.reversed){a.removeEdge(s);let u=l.forwardName;delete l.reversed,delete l.forwardName,a.setEdge(s.w,s.v,l,u)}})}return Nr}var Er,_s;function m0(){if(_s)return Er;_s=1;let e=be();Er={run:t,undo:r};function t(i){i.graph().dummyChains=[],i.edges().forEach(a=>n(i,a))}function n(i,a){let s=a.v,l=i.node(s).rank,u=a.w,c=i.node(u).rank,d=a.name,h=i.edge(a),f=h.labelRank;if(c===l+1)return;i.removeEdge(a);let p,v,j;for(j=0,++l;l<c;++j,++l)h.points=[],v={width:0,height:0,edgeLabel:h,edgeObj:a,rank:l},p=e.addDummyNode(i,"edge",v,"_d"),l===f&&(v.width=h.width,v.height=h.height,v.dummy="edge-label",v.labelpos=h.labelpos),i.setEdge(s,p,{weight:h.weight},d),j===0&&i.graph().dummyChains.push(p),s=p;i.setEdge(s,u,{weight:h.weight},d)}function r(i){i.graph().dummyChains.forEach(a=>{let s=i.node(a),l=s.edgeLabel,u;for(i.setEdge(s.edgeObj,l);s.dummy;)u=i.successors(a)[0],i.removeNode(a),l.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(l.x=s.x,l.y=s.y,l.width=s.width,l.height=s.height),a=u,s=i.node(a)})}return Er}var Sr,As;function dn(){if(As)return Sr;As=1;const{applyWithChunking:e}=be();Sr={longestPath:t,slack:n};function t(r){var i={};function a(s){var l=r.node(s);if(Object.hasOwn(i,s))return l.rank;i[s]=!0;let u=r.outEdges(s).map(d=>d==null?Number.POSITIVE_INFINITY:a(d.w)-r.edge(d).minlen);var c=e(Math.min,u);return c===Number.POSITIVE_INFINITY&&(c=0),l.rank=c}r.sources().forEach(a)}function n(r,i){return r.node(i.w).rank-r.node(i.v).rank-r.edge(i).minlen}return Sr}var _r,Os;function No(){if(Os)return _r;Os=1;var e=Ye().Graph,t=dn().slack;_r=n;function n(s){var l=new e({directed:!1}),u=s.nodes()[0],c=s.nodeCount();l.setNode(u,{});for(var d,h;r(l,s)<c;)d=i(l,s),h=l.hasNode(d.v)?t(s,d):-t(s,d),a(l,s,h);return l}function r(s,l){function u(c){l.nodeEdges(c).forEach(d=>{var h=d.v,f=c===h?d.w:h;!s.hasNode(f)&&!t(l,d)&&(s.setNode(f,{}),s.setEdge(c,f,{}),u(f))})}return s.nodes().forEach(u),s.nodeCount()}function i(s,l){return l.edges().reduce((c,d)=>{let h=Number.POSITIVE_INFINITY;return s.hasNode(d.v)!==s.hasNode(d.w)&&(h=t(l,d)),h<c[0]?[h,d]:c},[Number.POSITIVE_INFINITY,null])[1]}function a(s,l,u){s.nodes().forEach(c=>l.node(c).rank+=u)}return _r}var Ar,Ls;function g0(){if(Ls)return Ar;Ls=1;var e=No(),t=dn().slack,n=dn().longestPath,r=Ye().alg.preorder,i=Ye().alg.postorder,a=be().simplify;Ar=s,s.initLowLimValues=d,s.initCutValues=l,s.calcCutValue=c,s.leaveEdge=f,s.enterEdge=p,s.exchangeEdges=v;function s(b){b=a(b),n(b);var k=e(b);d(k),l(k,b);for(var E,O;E=f(k);)O=p(k,b,E),v(k,b,E,O)}function l(b,k){var E=i(b,b.nodes());E=E.slice(0,E.length-1),E.forEach(O=>u(b,k,O))}function u(b,k,E){var O=b.node(E),C=O.parent;b.edge(E,C).cutvalue=c(b,k,E)}function c(b,k,E){var O=b.node(E),C=O.parent,L=!0,g=k.edge(E,C),y=0;return g||(L=!1,g=k.edge(C,E)),y=g.weight,k.nodeEdges(E).forEach(N=>{var S=N.v===E,A=S?N.w:N.v;if(A!==C){var I=S===L,P=k.edge(N).weight;if(y+=I?P:-P,x(b,E,A)){var z=b.edge(E,A).cutvalue;y+=I?-z:z}}}),y}function d(b,k){arguments.length<2&&(k=b.nodes()[0]),h(b,{},1,k)}function h(b,k,E,O,C){var L=E,g=b.node(O);return k[O]=!0,b.neighbors(O).forEach(y=>{Object.hasOwn(k,y)||(E=h(b,k,E,y,O))}),g.low=L,g.lim=E++,C?g.parent=C:delete g.parent,E}function f(b){return b.edges().find(k=>b.edge(k).cutvalue<0)}function p(b,k,E){var O=E.v,C=E.w;k.hasEdge(O,C)||(O=E.w,C=E.v);var L=b.node(O),g=b.node(C),y=L,N=!1;L.lim>g.lim&&(y=g,N=!0);var S=k.edges().filter(A=>N===w(b,b.node(A.v),y)&&N!==w(b,b.node(A.w),y));return S.reduce((A,I)=>t(k,I)<t(k,A)?I:A)}function v(b,k,E,O){var C=E.v,L=E.w;b.removeEdge(C,L),b.setEdge(O.v,O.w,{}),d(b),l(b,k),j(b,k)}function j(b,k){var E=b.nodes().find(C=>!k.node(C).parent),O=r(b,E);O=O.slice(1),O.forEach(C=>{var L=b.node(C).parent,g=k.edge(C,L),y=!1;g||(g=k.edge(L,C),y=!0),k.node(C).rank=k.node(L).rank+(y?g.minlen:-g.minlen)})}function x(b,k,E){return b.hasEdge(k,E)}function w(b,k,E){return E.low<=k.lim&&k.lim<=E.lim}return Ar}var Or,Is;function x0(){if(Is)return Or;Is=1;var e=dn(),t=e.longestPath,n=No(),r=g0();Or=i;function i(u){switch(u.graph().ranker){case"network-simplex":l(u);break;case"tight-tree":s(u);break;case"longest-path":a(u);break;default:l(u)}}var a=t;function s(u){t(u),n(u)}function l(u){r(u)}return Or}var Lr,Ts;function y0(){if(Ts)return Lr;Ts=1,Lr=e;function e(r){let i=n(r);r.graph().dummyChains.forEach(a=>{let s=r.node(a),l=s.edgeObj,u=t(r,i,l.v,l.w),c=u.path,d=u.lca,h=0,f=c[h],p=!0;for(;a!==l.w;){if(s=r.node(a),p){for(;(f=c[h])!==d&&r.node(f).maxRank<s.rank;)h++;f===d&&(p=!1)}if(!p){for(;h<c.length-1&&r.node(f=c[h+1]).minRank<=s.rank;)h++;f=c[h]}r.setParent(a,f),a=r.successors(a)[0]}})}function t(r,i,a,s){let l=[],u=[],c=Math.min(i[a].low,i[s].low),d=Math.max(i[a].lim,i[s].lim),h,f;h=a;do h=r.parent(h),l.push(h);while(h&&(i[h].low>c||d>i[h].lim));for(f=h,h=s;(h=r.parent(h))!==f;)u.push(h);return{path:l.concat(u.reverse()),lca:f}}function n(r){let i={},a=0;function s(l){let u=a;r.children(l).forEach(s),i[l]={low:u,lim:a++}}return r.children().forEach(s),i}return Lr}var Ir,Ps;function b0(){if(Ps)return Ir;Ps=1;let e=be();Ir={run:t,cleanup:a};function t(s){let l=e.addDummyNode(s,"root",{},"_root"),u=r(s),c=Object.values(u),d=e.applyWithChunking(Math.max,c)-1,h=2*d+1;s.graph().nestingRoot=l,s.edges().forEach(p=>s.edge(p).minlen*=h);let f=i(s)+1;s.children().forEach(p=>n(s,l,h,f,d,u,p)),s.graph().nodeRankFactor=h}function n(s,l,u,c,d,h,f){let p=s.children(f);if(!p.length){f!==l&&s.setEdge(l,f,{weight:0,minlen:u});return}let v=e.addBorderNode(s,"_bt"),j=e.addBorderNode(s,"_bb"),x=s.node(f);s.setParent(v,f),x.borderTop=v,s.setParent(j,f),x.borderBottom=j,p.forEach(w=>{n(s,l,u,c,d,h,w);let b=s.node(w),k=b.borderTop?b.borderTop:w,E=b.borderBottom?b.borderBottom:w,O=b.borderTop?c:2*c,C=k!==E?1:d-h[f]+1;s.setEdge(v,k,{weight:O,minlen:C,nestingEdge:!0}),s.setEdge(E,j,{weight:O,minlen:C,nestingEdge:!0})}),s.parent(f)||s.setEdge(l,v,{weight:0,minlen:d+h[f]})}function r(s){var l={};function u(c,d){var h=s.children(c);h&&h.length&&h.forEach(f=>u(f,d+1)),l[c]=d}return s.children().forEach(c=>u(c,1)),l}function i(s){return s.edges().reduce((l,u)=>l+s.edge(u).weight,0)}function a(s){var l=s.graph();s.removeNode(l.nestingRoot),delete l.nestingRoot,s.edges().forEach(u=>{var c=s.edge(u);c.nestingEdge&&s.removeEdge(u)})}return Ir}var Tr,Ms;function w0(){if(Ms)return Tr;Ms=1;let e=be();Tr=t;function t(r){function i(a){let s=r.children(a),l=r.node(a);if(s.length&&s.forEach(i),Object.hasOwn(l,"minRank")){l.borderLeft=[],l.borderRight=[];for(let u=l.minRank,c=l.maxRank+1;u<c;++u)n(r,"borderLeft","_bl",a,l,u),n(r,"borderRight","_br",a,l,u)}}r.children().forEach(i)}function n(r,i,a,s,l,u){let c={width:0,height:0,rank:u,borderType:i},d=l[i][u-1],h=e.addDummyNode(r,"border",c,a);l[i][u]=h,r.setParent(h,s),d&&r.setEdge(d,h,{weight:1})}return Tr}var Pr,Rs;function v0(){if(Rs)return Pr;Rs=1,Pr={adjust:e,undo:t};function e(u){let c=u.graph().rankdir.toLowerCase();(c==="lr"||c==="rl")&&n(u)}function t(u){let c=u.graph().rankdir.toLowerCase();(c==="bt"||c==="rl")&&i(u),(c==="lr"||c==="rl")&&(s(u),n(u))}function n(u){u.nodes().forEach(c=>r(u.node(c))),u.edges().forEach(c=>r(u.edge(c)))}function r(u){let c=u.width;u.width=u.height,u.height=c}function i(u){u.nodes().forEach(c=>a(u.node(c))),u.edges().forEach(c=>{let d=u.edge(c);d.points.forEach(a),Object.hasOwn(d,"y")&&a(d)})}function a(u){u.y=-u.y}function s(u){u.nodes().forEach(c=>l(u.node(c))),u.edges().forEach(c=>{let d=u.edge(c);d.points.forEach(l),Object.hasOwn(d,"x")&&l(d)})}function l(u){let c=u.x;u.x=u.y,u.y=c}return Pr}var Mr,Ds;function C0(){if(Ds)return Mr;Ds=1;let e=be();Mr=t;function t(n){let r={},i=n.nodes().filter(d=>!n.children(d).length),a=i.map(d=>n.node(d).rank),s=e.applyWithChunking(Math.max,a),l=e.range(s+1).map(()=>[]);function u(d){if(r[d])return;r[d]=!0;let h=n.node(d);l[h.rank].push(d),n.successors(d).forEach(u)}return i.sort((d,h)=>n.node(d).rank-n.node(h).rank).forEach(u),l}return Mr}var Rr,Fs;function k0(){if(Fs)return Rr;Fs=1;let e=be().zipObject;Rr=t;function t(r,i){let a=0;for(let s=1;s<i.length;++s)a+=n(r,i[s-1],i[s]);return a}function n(r,i,a){let s=e(a,a.map((f,p)=>p)),l=i.flatMap(f=>r.outEdges(f).map(p=>({pos:s[p.w],weight:r.edge(p).weight})).sort((p,v)=>p.pos-v.pos)),u=1;for(;u<a.length;)u<<=1;let c=2*u-1;u-=1;let d=new Array(c).fill(0),h=0;return l.forEach(f=>{let p=f.pos+u;d[p]+=f.weight;let v=0;for(;p>0;)p%2&&(v+=d[p+1]),p=p-1>>1,d[p]+=f.weight;h+=f.weight*v}),h}return Rr}var Dr,zs;function j0(){if(zs)return Dr;zs=1,Dr=e;function e(t,n=[]){return n.map(r=>{let i=t.inEdges(r);if(i.length){let a=i.reduce((s,l)=>{let u=t.edge(l),c=t.node(l.v);return{sum:s.sum+u.weight*c.order,weight:s.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}return Dr}var Fr,Bs;function N0(){if(Bs)return Fr;Bs=1;let e=be();Fr=t;function t(i,a){let s={};i.forEach((u,c)=>{let d=s[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:c};u.barycenter!==void 0&&(d.barycenter=u.barycenter,d.weight=u.weight)}),a.edges().forEach(u=>{let c=s[u.v],d=s[u.w];c!==void 0&&d!==void 0&&(d.indegree++,c.out.push(s[u.w]))});let l=Object.values(s).filter(u=>!u.indegree);return n(l)}function n(i){let a=[];function s(u){return c=>{c.merged||(c.barycenter===void 0||u.barycenter===void 0||c.barycenter>=u.barycenter)&&r(u,c)}}function l(u){return c=>{c.in.push(u),--c.indegree===0&&i.push(c)}}for(;i.length;){let u=i.pop();a.push(u),u.in.reverse().forEach(s(u)),u.out.forEach(l(u))}return a.filter(u=>!u.merged).map(u=>e.pick(u,["vs","i","barycenter","weight"]))}function r(i,a){let s=0,l=0;i.weight&&(s+=i.barycenter*i.weight,l+=i.weight),a.weight&&(s+=a.barycenter*a.weight,l+=a.weight),i.vs=a.vs.concat(i.vs),i.barycenter=s/l,i.weight=l,i.i=Math.min(a.i,i.i),a.merged=!0}return Fr}var zr,qs;function E0(){if(qs)return zr;qs=1;let e=be();zr=t;function t(i,a){let s=e.partition(i,v=>Object.hasOwn(v,"barycenter")),l=s.lhs,u=s.rhs.sort((v,j)=>j.i-v.i),c=[],d=0,h=0,f=0;l.sort(r(!!a)),f=n(c,u,f),l.forEach(v=>{f+=v.vs.length,c.push(v.vs),d+=v.barycenter*v.weight,h+=v.weight,f=n(c,u,f)});let p={vs:c.flat(!0)};return h&&(p.barycenter=d/h,p.weight=h),p}function n(i,a,s){let l;for(;a.length&&(l=a[a.length-1]).i<=s;)a.pop(),i.push(l.vs),s++;return s}function r(i){return(a,s)=>a.barycenter<s.barycenter?-1:a.barycenter>s.barycenter?1:i?s.i-a.i:a.i-s.i}return zr}var Br,Vs;function S0(){if(Vs)return Br;Vs=1;let e=j0(),t=N0(),n=E0();Br=r;function r(s,l,u,c){let d=s.children(l),h=s.node(l),f=h?h.borderLeft:void 0,p=h?h.borderRight:void 0,v={};f&&(d=d.filter(b=>b!==f&&b!==p));let j=e(s,d);j.forEach(b=>{if(s.children(b.v).length){let k=r(s,b.v,u,c);v[b.v]=k,Object.hasOwn(k,"barycenter")&&a(b,k)}});let x=t(j,u);i(x,v);let w=n(x,c);if(f&&(w.vs=[f,w.vs,p].flat(!0),s.predecessors(f).length)){let b=s.node(s.predecessors(f)[0]),k=s.node(s.predecessors(p)[0]);Object.hasOwn(w,"barycenter")||(w.barycenter=0,w.weight=0),w.barycenter=(w.barycenter*w.weight+b.order+k.order)/(w.weight+2),w.weight+=2}return w}function i(s,l){s.forEach(u=>{u.vs=u.vs.flatMap(c=>l[c]?l[c].vs:c)})}function a(s,l){s.barycenter!==void 0?(s.barycenter=(s.barycenter*s.weight+l.barycenter*l.weight)/(s.weight+l.weight),s.weight+=l.weight):(s.barycenter=l.barycenter,s.weight=l.weight)}return Br}var qr,Hs;function _0(){if(Hs)return qr;Hs=1;let e=Ye().Graph,t=be();qr=n;function n(i,a,s){let l=r(i),u=new e({compound:!0}).setGraph({root:l}).setDefaultNodeLabel(c=>i.node(c));return i.nodes().forEach(c=>{let d=i.node(c),h=i.parent(c);(d.rank===a||d.minRank<=a&&a<=d.maxRank)&&(u.setNode(c),u.setParent(c,h||l),i[s](c).forEach(f=>{let p=f.v===c?f.w:f.v,v=u.edge(p,c),j=v!==void 0?v.weight:0;u.setEdge(p,c,{weight:i.edge(f).weight+j})}),Object.hasOwn(d,"minRank")&&u.setNode(c,{borderLeft:d.borderLeft[a],borderRight:d.borderRight[a]}))}),u}function r(i){for(var a;i.hasNode(a=t.uniqueId("_root")););return a}return qr}var Vr,Ws;function A0(){if(Ws)return Vr;Ws=1,Vr=e;function e(t,n,r){let i={},a;r.forEach(s=>{let l=t.parent(s),u,c;for(;l;){if(u=t.parent(l),u?(c=i[u],i[u]=l):(c=a,a=l),c&&c!==l){n.setEdge(c,l);return}l=u}})}return Vr}var Hr,Us;function O0(){if(Us)return Hr;Us=1;let e=C0(),t=k0(),n=S0(),r=_0(),i=A0(),a=Ye().Graph,s=be();Hr=l;function l(h,f){if(f&&typeof f.customOrder=="function"){f.customOrder(h,l);return}let p=s.maxRank(h),v=u(h,s.range(1,p+1),"inEdges"),j=u(h,s.range(p-1,-1,-1),"outEdges"),x=e(h);if(d(h,x),f&&f.disableOptimalOrderHeuristic)return;let w=Number.POSITIVE_INFINITY,b;for(let k=0,E=0;E<4;++k,++E){c(k%2?v:j,k%4>=2),x=s.buildLayerMatrix(h);let O=t(h,x);O<w&&(E=0,b=Object.assign({},x),w=O)}d(h,b)}function u(h,f,p){return f.map(function(v){return r(h,v,p)})}function c(h,f){let p=new a;h.forEach(function(v){let j=v.graph().root,x=n(v,j,p,f);x.vs.forEach((w,b)=>v.node(w).order=b),i(v,p,x.vs)})}function d(h,f){Object.values(f).forEach(p=>p.forEach((v,j)=>h.node(v).order=j))}return Hr}var Wr,$s;function L0(){if($s)return Wr;$s=1;let e=Ye().Graph,t=be();Wr={positionX:p,findType1Conflicts:n,findType2Conflicts:r,addConflict:a,hasConflict:s,verticalAlignment:l,horizontalCompaction:u,alignCoordinates:h,findSmallestWidthAlignment:d,balance:f};function n(x,w){let b={};function k(E,O){let C=0,L=0,g=E.length,y=O[O.length-1];return O.forEach((N,S)=>{let A=i(x,N),I=A?x.node(A).order:g;(A||N===y)&&(O.slice(L,S+1).forEach(P=>{x.predecessors(P).forEach(z=>{let K=x.node(z),H=K.order;(H<C||I<H)&&!(K.dummy&&x.node(P).dummy)&&a(b,z,P)})}),L=S+1,C=I)}),O}return w.length&&w.reduce(k),b}function r(x,w){let b={};function k(O,C,L,g,y){let N;t.range(C,L).forEach(S=>{N=O[S],x.node(N).dummy&&x.predecessors(N).forEach(A=>{let I=x.node(A);I.dummy&&(I.order<g||I.order>y)&&a(b,A,N)})})}function E(O,C){let L=-1,g,y=0;return C.forEach((N,S)=>{if(x.node(N).dummy==="border"){let A=x.predecessors(N);A.length&&(g=x.node(A[0]).order,k(C,y,S,L,g),y=S,L=g)}k(C,y,C.length,g,O.length)}),C}return w.length&&w.reduce(E),b}function i(x,w){if(x.node(w).dummy)return x.predecessors(w).find(b=>x.node(b).dummy)}function a(x,w,b){if(w>b){let E=w;w=b,b=E}let k=x[w];k||(x[w]=k={}),k[b]=!0}function s(x,w,b){if(w>b){let k=w;w=b,b=k}return!!x[w]&&Object.hasOwn(x[w],b)}function l(x,w,b,k){let E={},O={},C={};return w.forEach(L=>{L.forEach((g,y)=>{E[g]=g,O[g]=g,C[g]=y})}),w.forEach(L=>{let g=-1;L.forEach(y=>{let N=k(y);if(N.length){N=N.sort((A,I)=>C[A]-C[I]);let S=(N.length-1)/2;for(let A=Math.floor(S),I=Math.ceil(S);A<=I;++A){let P=N[A];O[y]===y&&g<C[P]&&!s(b,y,P)&&(O[P]=y,O[y]=E[y]=E[P],g=C[P])}}})}),{root:E,align:O}}function u(x,w,b,k,E){let O={},C=c(x,w,b,E),L=E?"borderLeft":"borderRight";function g(S,A){let I=C.nodes(),P=I.pop(),z={};for(;P;)z[P]?S(P):(z[P]=!0,I.push(P),I=I.concat(A(P))),P=I.pop()}function y(S){O[S]=C.inEdges(S).reduce((A,I)=>Math.max(A,O[I.v]+C.edge(I)),0)}function N(S){let A=C.outEdges(S).reduce((P,z)=>Math.min(P,O[z.w]-C.edge(z)),Number.POSITIVE_INFINITY),I=x.node(S);A!==Number.POSITIVE_INFINITY&&I.borderType!==L&&(O[S]=Math.max(O[S],A))}return g(y,C.predecessors.bind(C)),g(N,C.successors.bind(C)),Object.keys(k).forEach(S=>O[S]=O[b[S]]),O}function c(x,w,b,k){let E=new e,O=x.graph(),C=v(O.nodesep,O.edgesep,k);return w.forEach(L=>{let g;L.forEach(y=>{let N=b[y];if(E.setNode(N),g){var S=b[g],A=E.edge(S,N);E.setEdge(S,N,Math.max(C(x,y,g),A||0))}g=y})}),E}function d(x,w){return Object.values(w).reduce((b,k)=>{let E=Number.NEGATIVE_INFINITY,O=Number.POSITIVE_INFINITY;Object.entries(k).forEach(([L,g])=>{let y=j(x,L)/2;E=Math.max(g+y,E),O=Math.min(g-y,O)});const C=E-O;return C<b[0]&&(b=[C,k]),b},[Number.POSITIVE_INFINITY,null])[1]}function h(x,w){let b=Object.values(w),k=t.applyWithChunking(Math.min,b),E=t.applyWithChunking(Math.max,b);["u","d"].forEach(O=>{["l","r"].forEach(C=>{let L=O+C,g=x[L];if(g===w)return;let y=Object.values(g),N=k-t.applyWithChunking(Math.min,y);C!=="l"&&(N=E-t.applyWithChunking(Math.max,y)),N&&(x[L]=t.mapValues(g,S=>S+N))})})}function f(x,w){return t.mapValues(x.ul,(b,k)=>{if(w)return x[w.toLowerCase()][k];{let E=Object.values(x).map(O=>O[k]).sort((O,C)=>O-C);return(E[1]+E[2])/2}})}function p(x){let w=t.buildLayerMatrix(x),b=Object.assign(n(x,w),r(x,w)),k={},E;["u","d"].forEach(C=>{E=C==="u"?w:Object.values(w).reverse(),["l","r"].forEach(L=>{L==="r"&&(E=E.map(S=>Object.values(S).reverse()));let g=(C==="u"?x.predecessors:x.successors).bind(x),y=l(x,E,b,g),N=u(x,E,y.root,y.align,L==="r");L==="r"&&(N=t.mapValues(N,S=>-S)),k[C+L]=N})});let O=d(x,k);return h(k,O),f(k,x.graph().align)}function v(x,w,b){return(k,E,O)=>{let C=k.node(E),L=k.node(O),g=0,y;if(g+=C.width/2,Object.hasOwn(C,"labelpos"))switch(C.labelpos.toLowerCase()){case"l":y=-C.width/2;break;case"r":y=C.width/2;break}if(y&&(g+=b?y:-y),y=0,g+=(C.dummy?w:x)/2,g+=(L.dummy?w:x)/2,g+=L.width/2,Object.hasOwn(L,"labelpos"))switch(L.labelpos.toLowerCase()){case"l":y=L.width/2;break;case"r":y=-L.width/2;break}return y&&(g+=b?y:-y),y=0,g}}function j(x,w){return x.node(w).width}return Wr}var Ur,Gs;function I0(){if(Gs)return Ur;Gs=1;let e=be(),t=L0().positionX;Ur=n;function n(i){i=e.asNonCompoundGraph(i),r(i),Object.entries(t(i)).forEach(([a,s])=>i.node(a).x=s)}function r(i){let a=e.buildLayerMatrix(i),s=i.graph().ranksep,l=0;a.forEach(u=>{const c=u.reduce((d,h)=>{const f=i.node(h).height;return d>f?d:f},0);u.forEach(d=>i.node(d).y=l+c/2),l+=c+s})}return Ur}var $r,Zs;function T0(){if(Zs)return $r;Zs=1;let e=p0(),t=m0(),n=x0(),r=be().normalizeRanks,i=y0(),a=be().removeEmptyRanks,s=b0(),l=w0(),u=v0(),c=O0(),d=I0(),h=be(),f=Ye().Graph;$r=p;function p(m,T){let R=T&&T.debugTiming?h.time:h.notime;R("layout",()=>{let D=R(" buildLayoutGraph",()=>g(m));R(" runLayout",()=>v(D,R,T)),R(" updateInputGraph",()=>j(m,D))})}function v(m,T,R){T(" makeSpaceForEdgeLabels",()=>y(m)),T(" removeSelfEdges",()=>X(m)),T(" acyclic",()=>e.run(m)),T(" nestingGraph.run",()=>s.run(m)),T(" rank",()=>n(h.asNonCompoundGraph(m))),T(" injectEdgeLabelProxies",()=>N(m)),T(" removeEmptyRanks",()=>a(m)),T(" nestingGraph.cleanup",()=>s.cleanup(m)),T(" normalizeRanks",()=>r(m)),T(" assignRankMinMax",()=>S(m)),T(" removeEdgeLabelProxies",()=>A(m)),T(" normalize.run",()=>t.run(m)),T(" parentDummyChains",()=>i(m)),T(" addBorderSegments",()=>l(m)),T(" order",()=>c(m,R)),T(" insertSelfEdges",()=>W(m)),T(" adjustCoordinateSystem",()=>u.adjust(m)),T(" position",()=>d(m)),T(" positionSelfEdges",()=>_(m)),T(" removeBorderNodes",()=>H(m)),T(" normalize.undo",()=>t.undo(m)),T(" fixupEdgeLabelCoords",()=>z(m)),T(" undoCoordinateSystem",()=>u.undo(m)),T(" translateGraph",()=>I(m)),T(" assignNodeIntersects",()=>P(m)),T(" reversePoints",()=>K(m)),T(" acyclic.undo",()=>e.undo(m))}function j(m,T){m.nodes().forEach(R=>{let D=m.node(R),J=T.node(R);D&&(D.x=J.x,D.y=J.y,D.rank=J.rank,T.children(R).length&&(D.width=J.width,D.height=J.height))}),m.edges().forEach(R=>{let D=m.edge(R),J=T.edge(R);D.points=J.points,Object.hasOwn(J,"x")&&(D.x=J.x,D.y=J.y)}),m.graph().width=T.graph().width,m.graph().height=T.graph().height}let x=["nodesep","edgesep","ranksep","marginx","marginy"],w={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],k=["width","height"],E={width:0,height:0},O=["minlen","weight","width","height","labeloffset"],C={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L=["labelpos"];function g(m){let T=new f({multigraph:!0,compound:!0}),R=Z(m.graph());return T.setGraph(Object.assign({},w,$(R,x),h.pick(R,b))),m.nodes().forEach(D=>{let J=Z(m.node(D));const V=$(J,k);Object.keys(E).forEach(U=>{V[U]===void 0&&(V[U]=E[U])}),T.setNode(D,V),T.setParent(D,m.parent(D))}),m.edges().forEach(D=>{let J=Z(m.edge(D));T.setEdge(D,Object.assign({},C,$(J,O),h.pick(J,L)))}),T}function y(m){let T=m.graph();T.ranksep/=2,m.edges().forEach(R=>{let D=m.edge(R);D.minlen*=2,D.labelpos.toLowerCase()!=="c"&&(T.rankdir==="TB"||T.rankdir==="BT"?D.width+=D.labeloffset:D.height+=D.labeloffset)})}function N(m){m.edges().forEach(T=>{let R=m.edge(T);if(R.width&&R.height){let D=m.node(T.v),V={rank:(m.node(T.w).rank-D.rank)/2+D.rank,e:T};h.addDummyNode(m,"edge-proxy",V,"_ep")}})}function S(m){let T=0;m.nodes().forEach(R=>{let D=m.node(R);D.borderTop&&(D.minRank=m.node(D.borderTop).rank,D.maxRank=m.node(D.borderBottom).rank,T=Math.max(T,D.maxRank))}),m.graph().maxRank=T}function A(m){m.nodes().forEach(T=>{let R=m.node(T);R.dummy==="edge-proxy"&&(m.edge(R.e).labelRank=R.rank,m.removeNode(T))})}function I(m){let T=Number.POSITIVE_INFINITY,R=0,D=Number.POSITIVE_INFINITY,J=0,V=m.graph(),U=V.marginx||0,te=V.marginy||0;function Q(se){let le=se.x,oe=se.y,ue=se.width,ae=se.height;T=Math.min(T,le-ue/2),R=Math.max(R,le+ue/2),D=Math.min(D,oe-ae/2),J=Math.max(J,oe+ae/2)}m.nodes().forEach(se=>Q(m.node(se))),m.edges().forEach(se=>{let le=m.edge(se);Object.hasOwn(le,"x")&&Q(le)}),T-=U,D-=te,m.nodes().forEach(se=>{let le=m.node(se);le.x-=T,le.y-=D}),m.edges().forEach(se=>{let le=m.edge(se);le.points.forEach(oe=>{oe.x-=T,oe.y-=D}),Object.hasOwn(le,"x")&&(le.x-=T),Object.hasOwn(le,"y")&&(le.y-=D)}),V.width=R-T+U,V.height=J-D+te}function P(m){m.edges().forEach(T=>{let R=m.edge(T),D=m.node(T.v),J=m.node(T.w),V,U;R.points?(V=R.points[0],U=R.points[R.points.length-1]):(R.points=[],V=J,U=D),R.points.unshift(h.intersectRect(D,V)),R.points.push(h.intersectRect(J,U))})}function z(m){m.edges().forEach(T=>{let R=m.edge(T);if(Object.hasOwn(R,"x"))switch((R.labelpos==="l"||R.labelpos==="r")&&(R.width-=R.labeloffset),R.labelpos){case"l":R.x-=R.width/2+R.labeloffset;break;case"r":R.x+=R.width/2+R.labeloffset;break}})}function K(m){m.edges().forEach(T=>{let R=m.edge(T);R.reversed&&R.points.reverse()})}function H(m){m.nodes().forEach(T=>{if(m.children(T).length){let R=m.node(T),D=m.node(R.borderTop),J=m.node(R.borderBottom),V=m.node(R.borderLeft[R.borderLeft.length-1]),U=m.node(R.borderRight[R.borderRight.length-1]);R.width=Math.abs(U.x-V.x),R.height=Math.abs(J.y-D.y),R.x=V.x+R.width/2,R.y=D.y+R.height/2}}),m.nodes().forEach(T=>{m.node(T).dummy==="border"&&m.removeNode(T)})}function X(m){m.edges().forEach(T=>{if(T.v===T.w){var R=m.node(T.v);R.selfEdges||(R.selfEdges=[]),R.selfEdges.push({e:T,label:m.edge(T)}),m.removeEdge(T)}})}function W(m){var T=h.buildLayerMatrix(m);T.forEach(R=>{var D=0;R.forEach((J,V)=>{var U=m.node(J);U.order=V+D,(U.selfEdges||[]).forEach(te=>{h.addDummyNode(m,"selfedge",{width:te.label.width,height:te.label.height,rank:U.rank,order:V+ ++D,e:te.e,label:te.label},"_se")}),delete U.selfEdges})})}function _(m){m.nodes().forEach(T=>{var R=m.node(T);if(R.dummy==="selfedge"){var D=m.node(R.e.v),J=D.x+D.width/2,V=D.y,U=R.x-J,te=D.height/2;m.setEdge(R.e,R.label),m.removeNode(T),R.label.points=[{x:J+2*U/3,y:V-te},{x:J+5*U/6,y:V-te},{x:J+U,y:V},{x:J+5*U/6,y:V+te},{x:J+2*U/3,y:V+te}],R.label.x=R.x,R.label.y=R.y}})}function $(m,T){return h.mapValues(h.pick(m,T),Number)}function Z(m){var T={};return m&&Object.entries(m).forEach(([R,D])=>{typeof R=="string"&&(R=R.toLowerCase()),T[R]=D}),T}return $r}var Gr,Js;function P0(){if(Js)return Gr;Js=1;let e=be(),t=Ye().Graph;Gr={debugOrdering:n};function n(r){let i=e.buildLayerMatrix(r),a=new t({compound:!0,multigraph:!0}).setGraph({});return r.nodes().forEach(s=>{a.setNode(s,{label:s}),a.setParent(s,"layer"+r.node(s).rank)}),r.edges().forEach(s=>a.setEdge(s.v,s.w,{},s.name)),i.forEach((s,l)=>{let u="layer"+l;a.setNode(u,{rank:"same"}),s.reduce((c,d)=>(a.setEdge(c,d,{style:"invis"}),d))}),a}return Gr}var Zr,Qs;function M0(){return Qs||(Qs=1,Zr="1.1.4"),Zr}var Jr,Ks;function R0(){return Ks||(Ks=1,Jr={graphlib:Ye(),layout:T0(),debug:P0(),util:{time:be().time,notime:be().notime},version:M0()}),Jr}var D0=R0();const Ys=li(D0),F0=300,z0=50,B0=70;function q0(e,t){const n=new Ys.graphlib.Graph().setDefaultEdgeLabel(()=>({}));return n.setGraph({rankdir:"TB",ranksep:50,nodesep:10}),!e||!t?{nodes:[],edges:[]}:e.length<1?{nodes:[],edges:[]}:(t.forEach(r=>{n.setEdge(r.source,r.target)}),e.forEach(r=>{n.setNode(r.id,{width:F0,height:r.type==="step"?B0:z0})}),Ys.layout(n),{nodes:e.map(r=>{const{x:i,y:a}=n.node(r.id);return{...r,position:{x:i,y:a}}}),edges:V0(t,e.length)})}function V0(e,t){const n=new Map,r=t>30?"smoothstep":"smart";for(const i of e){const a=`${i.source}-${i.target}`;n.has(a)||n.set(a,{id:a,source:i.source,target:i.target,type:r})}return Array.from(n.values())}function H0(e,t){const n=W0(e,t),r=U0(e,t),i=$0(e,t);return[...n,...r,...i]}function W0(e,t){return e.filter(Eo).filter(r=>!Bi(r)).map(r=>{const i=r.metadata;return{id:r.node_id,type:"step",data:{...i,step_id:r.id,step_name:r.name,runStatus:t}}})}function U0(e,t){return e.filter(G0).filter(r=>!Bi(r)).map(r=>{const i=r.metadata;return{id:r.node_id,type:"artifact",data:{...i,artifact_id:r.id,artifact_name:r.name,runStatus:t}}})}function $0(e,t){return e.filter(r=>Bi(r)).map(r=>{const i=Eo(r);return{id:r.node_id,type:i?"previewStep":"previewArtifact",data:{node_name:r.name,runStatus:t}}})}function Eo(e){return e.type==="step"}function G0(e){return e.type==="artifact"}function Bi(e){return!e.id}function Z0({runId:e}){return["runs",e,"dag"]}async function J0({runId:e}){const t=Xe(et.runs.dag(e)),n=await jt(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(n.status===404&&Gt(),!n.ok)throw new Ke({message:`Error while fetching pipeline run ${e}`,status:n.status,statusText:n.statusText});return n.json()}function Q0(e,t){return st({queryKey:Z0(e),queryFn:()=>J0(e),...t})}function K0(){const{runId:e}=Ie(),t=q.useRef(null),n=q.useMemo(()=>["runs",e],[e]),r=hn(),i=Q0({runId:e},{refetchInterval:j=>{var x;return((x=j.state.data)==null?void 0:x.status)==="running"?3e3:!1}});q.useEffect(()=>{if(i.data){const j=i.data.status;t.current!==null&&t.current!==j&&r.invalidateQueries({queryKey:n}),t.current=j}},[i.data,r,e,n]);const{fitView:a}=yl(),{width:s,height:l}=gi(j=>({width:j.width,height:j.height})),[u,c,d]=Su([]),[h,f,p]=_u([]),v=q.useCallback(()=>{if(!i.data)return;const j=H0(i.data.nodes,i.data.status),{nodes:x,edges:w}=q0(j,i.data.edges);c(x),f(w)},[i.data,c,f]);return q.useEffect(()=>{a()},[s,l,a]),q.useLayoutEffect(()=>{v()},[v]),{dagQuery:i,nodes:u,edges:h,onNodesChange:d,onEdgesChange:p}}const Y0={smart:vp},X0={step:Xp,artifact:Hf,previewStep:Gf,previewArtifact:$f};function em(){const{dagQuery:e,nodes:t,edges:n,onNodesChange:r,onEdgesChange:i}=K0();return e.isError?o.jsx(We,{icon:o.jsx(vt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:o.jsx("p",{className:"text-center",children:"There was an error loading the DAG visualization."})}):e.isPending?o.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[o.jsx(ci,{}),o.jsx("div",{className:"mt-4 flex flex-col items-center",children:o.jsx("p",{className:"mb-5 text-display-xs",children:"Loading DAG Visualization"})})]}):o.jsx(Au,{minZoom:-2,connectOnClick:!1,nodesDraggable:!1,nodesConnectable:!1,edgeTypes:Y0,nodeTypes:X0,nodes:t,edges:n,edgesFocusable:!1,multiSelectionKeyCode:null,onNodesChange:r,onEdgesChange:i,fitView:!0,children:o.jsx(Uf,{refetch:()=>{e.refetch()}})})}function tm(e){return fl({...e,mutationFn:async({runId:t})=>El({runId:t,queryParams:{refresh_status:!0}})})}function nm(e){const{toast:t}=oi(),n=hn();return tm({onSuccess:async()=>{await n.invalidateQueries({queryKey:["runs"]}),t({rounded:!0,status:"success",emphasis:"subtle",description:"The run has been refreshed successfully"}),e(!1)},onError:i=>{t({rounded:!0,status:"error",emphasis:"subtle",description:i.message}),e(!1)}})}function rm({runId:e}){const[t,n]=q.useState(!1),{isPending:r,mutate:i}=nm(n);return o.jsxs(Qr,{open:t,onOpenChange:n,children:[o.jsx(ol,{asChild:!0,children:o.jsxs(ve,{intent:"primary",emphasis:"subtle",size:"md",className:"flex aspect-square items-center justify-center rounded-l-sharp border-l-0 p-0",children:[o.jsx(xt,{width:24,height:24,className:"size-5 shrink-0"}),o.jsx("span",{className:"sr-only",children:"Open run refresh menu"})]})}),o.jsx(ul,{align:"end",className:"max-w-[100px] lg:max-w-[320px]",children:o.jsx(cl,{className:"hover:cursor-pointer",icon:o.jsx(yu,{width:24,height:24,className:"size-5 shrink-0"}),onSelect:a=>{a.preventDefault(),i({runId:e})},disabled:r,children:o.jsxs("div",{className:"space-y-0.25",children:[o.jsx("p",{children:"Deep Refresh"}),o.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Queries the orchestrator directly. Takes longer but ensures most up-to-date data"})]})})})]})}function im({runId:e}){const{refetch:t}=Te({runId:e});return o.jsxs("div",{className:"flex",children:[o.jsxs(ve,{className:"rounded-r-sharp",intent:"primary",emphasis:"subtle",size:"md",onClick:()=>t(),children:[o.jsx(bl,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]}),o.jsx(rm,{runId:e})]})}function am(e){const{setBreadcrumbs:t}=eu();q.useEffect(()=>{var n;e&&((n=e.body)!=null&&n.pipeline?t([tu,{label:e.body.pipeline.name||"",href:it.projects.pipelines.namespace(encodeURIComponent(e.body.pipeline.name))},{label:e.name||"",href:"#"}]):t([nu,{label:e.name||"",href:it.projects.runs.detail(e.id)}]))},[t,e])}function sm({open:e,setOpen:t}){const{toast:n}=oi(),r=mi(),i=hn(),{runId:a}=Ie(),{mutate:s}=Fu({onSuccess:async()=>{i.invalidateQueries({queryKey:["runs"]}),n({status:"success",emphasis:"subtle",icon:o.jsx(iu,{className:"h-5 w-5 shrink-0 fill-success-700"}),description:"Run deleted successfully",rounded:!0}),t(!1),r(it.projects.pipelines.overview)},onError:u=>{n({status:"error",emphasis:"subtle",icon:o.jsx(vt,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:u.message,rounded:!0})}});async function l(){s({runId:a})}return o.jsx(ru,{open:e,onOpenChange:t,children:o.jsx(Ru,{title:"Delete Run",handleDelete:()=>l(),children:o.jsxs(Du,{children:[o.jsx("p",{children:"Are you sure?"}),o.jsx("p",{children:"This action cannot be undone."}),o.jsx("p",{children:"Deleting a run here does not guarantee that this run will get deleted in the underlying orchestrator."})]})})})}function lm(){const[e,t]=q.useState(!1),[n,r]=q.useState(!1);return o.jsxs(o.Fragment,{children:[o.jsx(sm,{setOpen:t,open:e}),o.jsx(Qr,{modal:n,open:n,onOpenChange:r,children:o.jsxs(Qr,{children:[o.jsx(ol,{asChild:!0,children:o.jsxs(ve,{intent:"secondary",className:"flex aspect-square items-center justify-center p-0",emphasis:"minimal",size:"md",children:[o.jsx(au,{className:"h-5 w-5 shrink-0 fill-theme-text-secondary"}),o.jsx("p",{className:"sr-only",children:"Run Actions"})]})}),o.jsx(ul,{className:"z-10",align:"end",sideOffset:1,children:o.jsxs(cl,{onClick:()=>t(!0),className:"space-x-2",children:[o.jsx(Mu,{className:"h-3 w-3 fill-neutral-400"}),o.jsx("p",{children:"Delete"})]})})]})})]})}function om(){var r,i;const{runId:e}=Ie(),{data:t,isSuccess:n}=Te({runId:e},{throwOnError:!0});return am(t),o.jsxs(su,{className:"flex items-center justify-between",children:[o.jsx("div",{className:"flex items-center gap-1 truncate",children:n?o.jsxs(o.Fragment,{children:[o.jsx(Pu,{className:`h-5 w-5 shrink-0 ${bu((r=t==null?void 0:t.body)==null?void 0:r.status)}`}),o.jsx("h1",{className:"min-w-0 truncate text-display-xs font-semibold",children:t==null?void 0:t.name}),o.jsx(gt,{className:"h-5 w-5 shrink-0",status:(i=t==null?void 0:t.body)==null?void 0:i.status})]}):o.jsxs(o.Fragment,{children:[o.jsx(re,{className:"h-5 w-5"}),o.jsx(re,{className:"h-6 w-[250px]"}),o.jsx(re,{className:"h-5 w-5"})]})}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(im,{runId:e}),o.jsx(lm,{})]})]})}const um=e=>q.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},q.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 2C21.5523 2 22 2.44772 22 3V21C22 21.5523 21.5523 22 21 22C20.4477 22 20 21.5523 20 21V3C20 2.44772 20.4477 2 21 2ZM9.29289 4.29289C9.68342 3.90237 10.3166 3.90237 10.7071 4.29289L17.7071 11.2929C17.8946 11.4804 18 11.7348 18 12C18 12.2652 17.8946 12.5196 17.7071 12.7071L10.7071 19.7071C10.3166 20.0976 9.68342 20.0976 9.29289 19.7071C8.90237 19.3166 8.90237 18.6834 9.29289 18.2929L14.5858 13H3C2.44772 13 2 12.5523 2 12C2 11.4477 2.44772 11 3 11H14.5858L9.29289 5.70711C8.90237 5.31658 8.90237 4.68342 9.29289 4.29289Z"}));function cm({runId:e}){const[t,n]=q.useState(!0),r=cu(e);return o.jsxs(Pt,{open:t,onOpenChange:n,children:[o.jsx(Mt,{className:"flex items-center gap-[10px]",children:o.jsxs(Rt,{className:"flex w-full items-center gap-[10px]",children:[o.jsx(xt,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Code"]})}),o.jsxs(Dt,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[o.jsx("p",{className:"mb-2 text-theme-text-secondary",children:"Get config programmatically"}),o.jsx(Ue,{fullWidth:!0,highlightCode:!0,wrap:!0,code:r})]})]})}const Xs="python_packages";function dm({run:e}){var l,u;const[t,n]=q.useState(!0),r=(l=e.metadata)==null?void 0:l.orchestrator_environment,i=(u=e.metadata)==null?void 0:u.client_environment,a=el(r??{}),s=el(i??{});return o.jsxs(Pt,{open:t,onOpenChange:n,children:[o.jsx(Mt,{intent:"primary",className:"flex items-center gap-[10px]",children:o.jsxs(Rt,{className:"flex w-full items-center gap-[10px]",children:[o.jsx(xt,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Environment"]})}),o.jsxs(Dt,{className:"space-y-3 border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[o.jsx(He,{isInitialOpen:!0,intent:"secondary",title:o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsx(Ae,{asChild:!0,children:o.jsx("span",{children:"Client Environment"})}),o.jsxs(Oe,{className:"max-w-[200px] whitespace-normal xl:max-w-[300px]",children:["Environment where you start your pipeline run by calling the pipeline function."," ",o.jsx("a",{rel:"noopener noreferrer",className:"link",href:"https://docs.zenml.io/user-guides/best-practices/configure-python-environments#client-environment-or-the-runner-environment",target:"_blank",children:"Learn more about client environments"})]})]})}),data:s}),o.jsx(He,{isInitialOpen:!0,intent:"secondary",title:o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsx(Ae,{asChild:!0,children:o.jsx("span",{children:"Execution Environment"})}),o.jsxs(Oe,{className:"max-w-[200px] whitespace-normal xl:max-w-[300px]",children:["Environment where your ZenML steps get executed."," ",o.jsx("a",{rel:"noopener noreferrer",className:"link",href:"https://docs.zenml.io/user-guides/best-practices/configure-python-environments#execution-environments",target:"_blank",children:"Learn more about exectuion environments"})]})]})}),data:a})]})]})}function el(e){const t=e[Xs];return typeof t=="string"?{...e,[Xs]:t.split(`
29
- `).map(n=>n.trim())}:e}async function hm({deploymentId:e},t){const n=Xe(et.pipeline_deployments.detail(e)),r=await fetch(n,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...t}});if(!r.ok){const i=await r.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>`Error while fetching pipeline deployment ${e}`);throw new Ke({status:r.status,statusText:r.statusText,message:i})}return r.json()}const So={all:["pipeline_deployments"],detail:e=>pu({queryKey:[...So.all,e],queryFn:async()=>hm({deploymentId:e})})};function fm({deploymentId:e}){var s,l;const[t,n]=q.useState(!0),{isLoading:r,isError:i,data:a}=st({...So.detail(e),enabled:!!e});return e?r?o.jsx(re,{className:"h-[150px] w-full"}):i?null:o.jsx(He,{isInitialOpen:!0,title:"Pipeline Parameters",data:(l=(s=a==null?void 0:a.metadata)==null?void 0:s.pipeline_spec)==null?void 0:l.parameters}):o.jsxs(Pt,{open:t,onOpenChange:n,children:[o.jsxs(Mt,{intent:"primary",className:"flex items-center gap-[10px]",children:[o.jsx(Rt,{children:o.jsx(xt,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`})}),"Pipeline Parameters"]}),o.jsx(Dt,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:o.jsx(wu,{})})]})}function pm(){var a,s,l,u,c,d,h,f,p,v,j,x,w;const{runId:e}=Ie(),{data:t,isError:n,isPending:r}=Te({runId:e,queryParams:{include_python_packages:!0}},{throwOnError:!0}),{data:i}=go({buildId:(s=(a=t==null?void 0:t.body)==null?void 0:a.build)==null?void 0:s.id},{enabled:!!((u=(l=t==null?void 0:t.body)==null?void 0:l.build)!=null&&u.id)});return n?null:r?o.jsxs("div",{className:"space-y-5",children:[o.jsx(re,{className:"h-[56px] w-full"}),o.jsx(re,{className:"h-[56px] w-full"}),o.jsx(re,{className:"h-[56px] w-full"}),o.jsx(re,{className:"h-[56px] w-full"})]}):o.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[o.jsx(fm,{deploymentId:((c=t.body)==null?void 0:c.deployment_id)??void 0}),((h=(d=i==null?void 0:i.metadata)==null?void 0:d.images)==null?void 0:h.orchestrator)&&o.jsx(mo,{data:(p=(f=i==null?void 0:i.metadata)==null?void 0:f.images)==null?void 0:p.orchestrator}),o.jsx(cm,{runId:e}),o.jsx(dm,{run:t}),o.jsx(He,{isInitialOpen:!0,title:"Resources",data:((j=(v=t.metadata)==null?void 0:v.config.settings)==null?void 0:j.resources)||{}}),o.jsx(He,{isInitialOpen:!0,title:"Substitutions",data:(x=t.metadata)==null?void 0:x.config.substitutions}),o.jsx(He,{isInitialOpen:!0,title:"Extra",data:(w=t.metadata)==null?void 0:w.config.extra})]})}function mm(){var r,i,a;const{runId:e}=Ie(),{data:t,isError:n}=Te({runId:e},{throwOnError:!0});return n?o.jsx("p",{children:"Failed to fetch pipeline run"}):t&&Object.entries(((r=t.metadata)==null?void 0:r.run_metadata)||{}).length<1?o.jsx(We,{icon:o.jsx($t,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),o.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available."})]})}):o.jsxs("section",{className:"flex flex-col gap-5",children:[t?o.jsx(bi,{metadata:(i=t.metadata)==null?void 0:i.run_metadata}):o.jsx(re,{className:"h-[200px] w-full"}),t?o.jsx(yi,{metadata:(a=t.metadata)==null?void 0:a.run_metadata}):o.jsx(re,{className:"h-[200px] w-full"})]})}function gm(){return o.jsx(pn,{className:"truncate",intent:"error",children:o.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[o.jsx("p",{className:"truncate",children:"Pipeline run failed. Check orchestrator logs for error details and troubleshooting steps."}),o.jsx(ve,{intent:"danger",asChild:!0,children:o.jsx("a",{href:"#orchestrator-collapsible",children:"Review"})})]})})}function xm(){return o.jsx(pn,{className:"truncate",children:o.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[o.jsx("p",{children:"Pipeline run initializing. Check orchestrator URL and logs for real-time status updates."}),o.jsx(ve,{asChild:!0,children:o.jsx("a",{href:"#orchestrator-collapsible",children:"Review"})})]})})}function ym(){var l,u,c;const{runId:e}=Ie(),{data:t,isError:n,isPending:r}=Te({runId:e}),i=(l=t==null?void 0:t.metadata)==null?void 0:l.run_metadata,a=i==null?void 0:i.orchestrator_url,s=i==null?void 0:i.orchestrator_logs_url;return n?null:r?o.jsx(re,{className:"h-[100px]"}):((u=t.body)==null?void 0:u.status)==="initializing"&&(s||a)?o.jsx(xm,{}):((c=t.body)==null?void 0:c.status)==="failed"&&s?o.jsx(gm,{}):null}function bm(){var u,c,d,h,f,p,v,j,x,w,b,k,E,O,C,L,g,y,N,S,A,I,P,z,K;const{runId:e}=Ie(),[t,n]=q.useState(!0),[r]=gl(),i=mi(),{data:a,isError:s,isPending:l}=Te({runId:e},{throwOnError:!0});return q.useEffect(()=>{if(!r.get("tab")){const X=new URL(window.location.href);X.searchParams.set("tab","overview");const W=`${X.pathname}${X.search}`;i(W,{replace:!0})}},[r,i]),s?null:l?o.jsx(re,{className:"h-[200px] w-full"}):o.jsxs(Pt,{open:t,onOpenChange:n,children:[o.jsx(Mt,{className:"flex items-center gap-[10px]",children:o.jsxs(Rt,{className:"flex w-full items-center gap-[10px]",children:[o.jsx(xt,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),o.jsx("span",{children:"Details"})]})}),o.jsx(Dt,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:o.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[o.jsx(Ze,{children:"Id"}),o.jsx(Je,{children:o.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[a.id,o.jsx(Qe,{copyText:a.id})]})}),o.jsx(Ze,{children:"Status"}),o.jsx(Je,{children:o.jsxs(Le,{className:"inline-flex items-center gap-0.5",emphasis:"subtle",color:fn((u=a.body)==null?void 0:u.status),children:[o.jsx(gt,{className:"fill-current",status:(c=a.body)==null?void 0:c.status}),(d=a.body)==null?void 0:d.status]})}),o.jsx(Ze,{children:"Pipeline"}),o.jsx(Je,{children:(h=a.body)!=null&&h.pipeline?o.jsx(kt,{to:it.projects.pipelines.namespace(encodeURIComponent((p=(f=a.body)==null?void 0:f.pipeline)==null?void 0:p.name)),children:o.jsxs(Le,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[o.jsx(pi,{className:"h-4 w-4 fill-theme-text-brand"}),(j=(v=a.body)==null?void 0:v.pipeline)==null?void 0:j.name]})}):"Not available"}),o.jsx(Ze,{children:o.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[o.jsx("span",{className:"truncate",children:"Repository/Commit"}),o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsxs(Ae,{className:"cursor-default",children:[o.jsx(Ct,{className:"h-3 w-3 fill-theme-text-secondary"}),o.jsx("span",{className:"sr-only",children:"Info"})]}),o.jsx(Oe,{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."})]})})]})}),o.jsx(Je,{className:"h-auto",children:(x=a.body)!=null&&x.code_reference?o.jsx(xo,{repositoryId:(b=(w=a.body)==null?void 0:w.code_reference.body)==null?void 0:b.code_repository.id,commit:(k=a.body.code_reference.body)==null?void 0:k.commit}):"Not available"}),o.jsx(Ze,{className:(E=a.metadata)!=null&&E.code_path?"col-span-3":"",children:o.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[o.jsx("span",{children:"Code Path"}),o.jsx(Se,{children:o.jsxs(_e,{children:[o.jsxs(Ae,{className:"cursor-default",children:[o.jsx(Ct,{className:"h-3 w-3 fill-theme-text-secondary"}),o.jsx("span",{className:"sr-only",children:"Info"})]}),o.jsx(Oe,{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"})]})})]})}),o.jsx(Je,{className:(O=a.metadata)!=null&&O.code_path?"col-span-3 h-auto":"",children:(C=a.metadata)!=null&&C.code_path?o.jsx(Ue,{code:a.metadata.code_path}):"Not available"}),o.jsx(Ze,{children:"Author"}),o.jsx(Je,{children:o.jsx("div",{className:"inline-flex items-center gap-1",children:o.jsx(ui,{username:((g=(L=a.resources)==null?void 0:L.user)==null?void 0:g.name)||""})})}),o.jsx(Ze,{children:"Start Time"}),o.jsx(Je,{children:(y=a.metadata)!=null&&y.start_time?o.jsx(Wt,{dateString:(N=a.metadata)==null?void 0:N.start_time}):"Not available"}),o.jsx(Ze,{children:"End Time"}),o.jsx(Je,{children:(S=a.metadata)!=null&&S.end_time?o.jsx(Wt,{dateString:(A=a.metadata)==null?void 0:A.end_time}):"Not available"}),o.jsx(Ze,{children:"Duration"}),o.jsx(Je,{children:(I=a.metadata)!=null&&I.start_time&&((P=a.metadata)!=null&&P.end_time)?vl((z=a.metadata)==null?void 0:z.start_time,(K=a.metadata)==null?void 0:K.end_time):"Not available"})]})})]})}function wm(){var d,h;const{runId:e}=Ie(),[t,n]=q.useState(!0),{data:r,isError:i,isPending:a}=Te({runId:e}),s=(d=r==null?void 0:r.metadata)==null?void 0:d.run_metadata,l=s==null?void 0:s.orchestrator_url,u=(h=r==null?void 0:r.metadata)==null?void 0:h.orchestrator_run_id,c=s==null?void 0:s.orchestrator_logs_url;return i?null:a?o.jsx(re,{className:"h-[200px]"}):o.jsxs(Pt,{open:t,onOpenChange:n,children:[o.jsx(Mt,{className:"flex items-center gap-[10px]",children:o.jsxs(Rt,{className:"flex w-full",children:[o.jsx(xt,{className:` ${t?"":"-rotate-90"} mr-2 h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),o.jsx("p",{id:"orchestrator-collapsible",children:"Orchestrator"})]})}),o.jsx(Dt,{className:"space-y-3 border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:o.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[o.jsx(de,{label:"Orchestrator URL",value:l&&mt(l)?o.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[o.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:l,children:l}),o.jsx(Qe,{copyText:l})]}):"Not available"}),o.jsx(de,{label:"Orchestrator Logs",value:c&&mt(c)?o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(yo,{}),o.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[o.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:c,children:c}),o.jsx(Qe,{copyText:c})]})]}):"Not available"}),o.jsx(de,{label:"Orchestrator Run ID",value:u?o.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[u,o.jsx(Qe,{copyText:u})]}):"Not available"})]})})]})}function vm(){return o.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[o.jsx(ym,{}),o.jsx(bm,{}),o.jsx(wm,{})]})}const Cm=Vi.object({tab:Vi.enum(["overview","configuration","metadata","stack"]).optional().default("overview").catch("overview")});function km(){const[e]=gl(),{tab:t}=Cm.parse({tab:e.get("tab")||void 0});return t}function jm(){var r,i,a;const{runId:e}=Ie(),t=Te({runId:e},{throwOnError:!0});if(t.isPending)return o.jsx(re,{className:"h-[250px] w-full"});if(t.isError)return o.jsx("p",{children:"Something went wrong fetching the run"});const n=(a=(i=(r=t.data)==null?void 0:r.body)==null?void 0:i.stack)==null?void 0:a.id;return n?o.jsx(Nm,{run:t.data,stackId:n}):o.jsx(We,{icon:o.jsx(vt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-display-xs font-semibold",children:"No Stack"}),o.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There is no stack associated with this run."})]})})}function Nm({stackId:e,run:t}){var s;const{data:n,isError:r,isPending:i}=Cl({stackId:e});if(i)return o.jsx(re,{className:"h-[250px] w-full"});if(r)return o.jsx("p",{children:"Failed to fetch Stack"});const a=((s=t.metadata)==null?void 0:s.config.settings)||{};return o.jsx(bo,{stack:n,objectConfig:a})}function Em({setIsPanelOpen:e}){return o.jsxs("div",{className:"flex items-center gap-4 border-b border-theme-border-moderate bg-theme-surface-primary px-5 py-4",children:[o.jsx(ve,{className:"flex h-6 w-6 items-center justify-center bg-transparent p-0.5",intent:"secondary",onClick:()=>e(!1),children:o.jsx(um,{className:"h-5 w-5 fill-theme-text-secondary"})}),o.jsx("span",{className:"text-text-xl",children:"Run Insights"})]})}function Sm(){const e=km(),t=mi();function n(r){const i=new URLSearchParams;i.set("tab",r),t(`?${i.toString()}`)}return o.jsx("div",{className:"flex flex-col gap-5 p-5",children:o.jsxs(di,{value:e,onValueChange:n,children:[o.jsxs(hi,{children:[o.jsxs(De,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[o.jsx(Ct,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Overview"})]}),o.jsxs(De,{className:"flex items-center gap-2 truncate text-text-md",value:"stack",children:[o.jsx(fi,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Stack"})]}),o.jsxs(De,{className:"flex items-center gap-2 truncate text-text-md",value:"configuration",children:[o.jsx(po,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Configuration"})]}),o.jsxs(De,{className:"flex items-center gap-2 text-text-md",value:"metadata",children:[o.jsx(xi,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),o.jsx("span",{children:"Metadata"})]})]}),o.jsx(Fe,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:o.jsx(vm,{})}),o.jsx(Fe,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"stack",children:o.jsx(jm,{})}),o.jsx(Fe,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"configuration",children:o.jsx(pm,{})}),o.jsx(Fe,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:o.jsx(mm,{})})]})})}function y2(){var i;const e=lu(),t=ou(((i=e.data)==null?void 0:i.deployment_type)||"other"),[n,r]=q.useState(!0);return o.jsxs("div",{children:[o.jsx(om,{}),o.jsxs("div",{className:`flex ${t?"h-[calc(100vh_-_4rem_-_4rem_-_4rem_-_2px)]":"h-[calc(100vh_-_4rem_-_4rem_-_2px)]"} w-full`,children:[o.jsxs("div",{className:`relative bg-white/40 transition-all duration-500 ${n?"w-1/2":"w-full"}`,children:[o.jsx(em,{}),o.jsx(_m,{isPanelOpen:n,setIsPanelOpen:r})]}),o.jsx("div",{"aria-hidden":!n,className:`h-full min-w-0 overflow-x-hidden text-ellipsis whitespace-nowrap bg-theme-surface-secondary transition-all duration-500 ${n?"w-1/2 border-l border-theme-border-moderate":"w-0 border-transparent"}`,children:o.jsxs(uu,{viewportClassName:"[&>*]:!block",children:[o.jsx(Em,{setIsPanelOpen:r}),o.jsx(Sm,{})]})})]})]})}function _m({isPanelOpen:e,setIsPanelOpen:t}){return o.jsx(ve,{intent:"secondary",className:`absolute right-4 top-4 h-7 w-7 items-center justify-center border border-neutral-300 bg-transparent p-0.5 ${e?"hidden":"flex"}`,onClick:()=>t(!0),children:o.jsx(zu,{className:"h-5 w-5 fill-theme-text-primary"})})}export{y2 as default};