@intent-hq/web 2.339.0 → 2.340.1

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 (143) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{DdoNwoDc.js → 2zJzFf0n.js} +1 -1
  3. package/web/app/immutable/chunks/{BjVpFYQh.js → 3ihzYB3B.js} +1 -1
  4. package/web/app/immutable/chunks/{Cl5hJcBq.js → 6ttgZXCo.js} +1 -1
  5. package/web/app/immutable/chunks/{DjgC2hXz.js → B0JwRbGv.js} +1 -1
  6. package/web/app/immutable/chunks/{u3DUtYLR.js → B12_oQah.js} +1 -1
  7. package/web/app/immutable/chunks/{VPFPPS8j.js → B2skdn5r.js} +1 -1
  8. package/web/app/immutable/chunks/{0I_7-xCo.js → B629omcp.js} +1 -1
  9. package/web/app/immutable/chunks/{Au0hWtsL.js → B6HDg_5J.js} +1 -1
  10. package/web/app/immutable/chunks/{B2ptswXi.js → B6uczKwF.js} +1 -1
  11. package/web/app/immutable/chunks/{BeWkh8MM.js → BHCa2aqv.js} +1 -1
  12. package/web/app/immutable/chunks/{DSgf6WrM.js → BKKe6SMA.js} +1 -1
  13. package/web/app/immutable/chunks/{DKNImvko.js → BKUbnlfv.js} +1 -1
  14. package/web/app/immutable/chunks/{DeE7Yu-u.js → BKpkQXOc.js} +1 -1
  15. package/web/app/immutable/chunks/{CSbOZFUW.js → BOGwjwyV.js} +9 -9
  16. package/web/app/immutable/chunks/{Dj-qJwHy.js → BOmiP_-J.js} +1 -1
  17. package/web/app/immutable/chunks/{THFf66AG.js → BOtVBIUd.js} +1 -1
  18. package/web/app/immutable/chunks/{DRETniPr.js → BP8RauO6.js} +1 -1
  19. package/web/app/immutable/chunks/{DlHVJdRv.js → BQs4fy4w.js} +1 -1
  20. package/web/app/immutable/chunks/{C470clpb.js → BRiNStAc.js} +1 -1
  21. package/web/app/immutable/chunks/{DqNIHAkl.js → BSUYxR6-.js} +1 -1
  22. package/web/app/immutable/chunks/{CV6ag4Z2.js → BT0AWaPh.js} +3 -3
  23. package/web/app/immutable/chunks/{D-B0TDhB.js → BTJSEmEn.js} +1 -1
  24. package/web/app/immutable/chunks/{DOpgcKBl.js → BV-BZKII.js} +5 -5
  25. package/web/app/immutable/chunks/{D0ng0Qp3.js → BV3g1ev7.js} +1 -1
  26. package/web/app/immutable/chunks/{CdTX9MRt.js → BVFbqz97.js} +1 -1
  27. package/web/app/immutable/chunks/{WFvI6B2R.js → BYs9_cNF.js} +1 -1
  28. package/web/app/immutable/chunks/{BydiG0d-.js → Bd_6HBKD.js} +1 -1
  29. package/web/app/immutable/chunks/{D17l7Hau.js → BkpX4I_T.js} +1 -1
  30. package/web/app/immutable/chunks/{D3jGrF5f.js → Bm0Jd9kY.js} +3 -3
  31. package/web/app/immutable/chunks/{DiuUmAWK.js → BpBwsbt_.js} +1 -1
  32. package/web/app/immutable/chunks/{EBBQIyEf.js → BrvQxJce.js} +1 -1
  33. package/web/app/immutable/chunks/{Bq9XUSeR.js → C1r7a25c.js} +4 -4
  34. package/web/app/immutable/chunks/{Diuox4Sk.js → C4hcrWw4.js} +1 -1
  35. package/web/app/immutable/chunks/{CWVZSsAO.js → CBjTuKEK.js} +1 -1
  36. package/web/app/immutable/chunks/{BXq8MrK-.js → CDOqg_hD.js} +1 -1
  37. package/web/app/immutable/chunks/{BMmnZrRK.js → CDW-i6Fv.js} +1 -1
  38. package/web/app/immutable/chunks/{DyW-BzQH.js → CEUkKgnH.js} +1 -1
  39. package/web/app/immutable/chunks/{DtnhWRE7.js → CFLRL0EB.js} +1 -1
  40. package/web/app/immutable/chunks/{CUdOnH55.js → CJ1Z6bNT.js} +1 -1
  41. package/web/app/immutable/chunks/{BaKsq-M0.js → CJXwbq2U.js} +1 -1
  42. package/web/app/immutable/chunks/{BdexDGZC.js → CN8OUXe_.js} +1 -1
  43. package/web/app/immutable/chunks/{BHKtyyrU.js → CNa7ysF4.js} +1 -1
  44. package/web/app/immutable/chunks/{D3gmaT9B.js → CSUwzpGH.js} +2 -2
  45. package/web/app/immutable/chunks/{CBbjFbMl.js → CTZWroek.js} +1 -1
  46. package/web/app/immutable/chunks/{CefRoQA0.js → CUbDjN6V.js} +2 -2
  47. package/web/app/immutable/chunks/{aS_R0HPI.js → Cb7uUz2R.js} +21 -21
  48. package/web/app/immutable/chunks/{DDPajkKX.js → CclH1YIh.js} +1 -1
  49. package/web/app/immutable/chunks/{CJDL5KAB.js → Cdee4hLo.js} +1 -1
  50. package/web/app/immutable/chunks/{L37ZHoZh.js → Cdt3Os_E.js} +1 -1
  51. package/web/app/immutable/chunks/{BSz7iMh-.js → Ce-M4Yet.js} +1 -1
  52. package/web/app/immutable/chunks/{CM--21b-.js → ChqVaW7F.js} +1 -1
  53. package/web/app/immutable/chunks/{Dok3ev9f.js → Clh-uN2S.js} +1 -1
  54. package/web/app/immutable/chunks/{Cgtq62ns.js → CnsvCPbt.js} +1 -1
  55. package/web/app/immutable/chunks/{DnWiFr9y.js → CoJ-IYbA.js} +1 -1
  56. package/web/app/immutable/chunks/{Bn9hbI2n.js → CoN6faAY.js} +1 -1
  57. package/web/app/immutable/chunks/{C6twmamI.js → Co_CDc_C.js} +1 -1
  58. package/web/app/immutable/chunks/{D4s1qtHE.js → CpVL4p4g.js} +1 -1
  59. package/web/app/immutable/chunks/{DuwE_WBW.js → Ct_jn4oi.js} +4 -4
  60. package/web/app/immutable/chunks/{D0ZiBlxX.js → Ct_wErwu.js} +1 -1
  61. package/web/app/immutable/chunks/{CHHRcO0U.js → Cu6cQ3bz.js} +1 -1
  62. package/web/app/immutable/chunks/{DQeJX3H2.js → Cu9Chmho.js} +1 -1
  63. package/web/app/immutable/chunks/{BQFWbnKX.js → CvCi5Zre.js} +1 -1
  64. package/web/app/immutable/chunks/{CUgHPOMw.js → CxflQmTv.js} +1 -1
  65. package/web/app/immutable/chunks/{C0ty6diA.js → CyZEXqMD.js} +1 -1
  66. package/web/app/immutable/chunks/{bjz7ui-s.js → CzQ1bq5z.js} +1 -1
  67. package/web/app/immutable/chunks/{B3lXfAYB.js → D-FQTs8G.js} +1 -1
  68. package/web/app/immutable/chunks/{Cr7oi_6d.js → D0plQxho.js} +1 -1
  69. package/web/app/immutable/chunks/{DR5dualt.js → D3TakY94.js} +1 -1
  70. package/web/app/immutable/chunks/{BwSUsmgc.js → D69jpRoN.js} +1 -1
  71. package/web/app/immutable/chunks/{BGkX168r.js → D6o1s9ud.js} +1 -1
  72. package/web/app/immutable/chunks/{DReItNQ0.js → DCnpOMJV.js} +1 -1
  73. package/web/app/immutable/chunks/{CWM1MkmG.js → DFWX4KUv.js} +1 -1
  74. package/web/app/immutable/chunks/{C-kqAJdN.js → DFea2F8i.js} +1 -1
  75. package/web/app/immutable/chunks/DIRmnyX1.js +2 -0
  76. package/web/app/immutable/chunks/{CLmtrtu0.js → DIkhRMRo.js} +3 -3
  77. package/web/app/immutable/chunks/{BXI_q7iH.js → DLtPx11_.js} +1 -1
  78. package/web/app/immutable/chunks/{CmRtKL7J.js → DR9Al9U6.js} +2 -2
  79. package/web/app/immutable/chunks/{cLU7lz0Y.js → DTO4GWEs.js} +1 -1
  80. package/web/app/immutable/chunks/{Ul4pEuWS.js → DTm9Cl9J.js} +1 -1
  81. package/web/app/immutable/chunks/{CHp1eiAD.js → DTx3XIeO.js} +1 -1
  82. package/web/app/immutable/chunks/{CRfzx8hN.js → DV1cJQP-.js} +1 -1
  83. package/web/app/immutable/chunks/{DC9Z7l0D.js → DXl8wdfL.js} +1 -1
  84. package/web/app/immutable/chunks/{DWBKmRqH.js → D_FmcpdP.js} +3 -3
  85. package/web/app/immutable/chunks/{DsZcS3OV.js → DaMaUIGp.js} +1 -1
  86. package/web/app/immutable/chunks/{DogMW9-Y.js → Dd16ARRa.js} +1 -1
  87. package/web/app/immutable/chunks/{Dgm9ZcOJ.js → DfaM9xoo.js} +1 -1
  88. package/web/app/immutable/chunks/{afGYXIhs.js → DgbXpArF.js} +1 -1
  89. package/web/app/immutable/chunks/{mXFQPvv9.js → DhU8Eiqq.js} +1 -1
  90. package/web/app/immutable/chunks/{BgxG-ZbY.js → DhdMmVFs.js} +1 -1
  91. package/web/app/immutable/chunks/{HSOdfHfb.js → DhnV1b3I.js} +1 -1
  92. package/web/app/immutable/chunks/{G_2OlhiX.js → DkCfIFHY.js} +1 -1
  93. package/web/app/immutable/chunks/{CXEX3XJ7.js → Dl2U1Wya.js} +1 -1
  94. package/web/app/immutable/chunks/{BoZi94dx.js → DlfmDS1W.js} +1 -1
  95. package/web/app/immutable/chunks/{CSNmB1dB.js → DnHmskem.js} +1 -1
  96. package/web/app/immutable/chunks/{5v9ikv92.js → DrsfHmYl.js} +1 -1
  97. package/web/app/immutable/chunks/{aure5QjZ.js → DvkwbTMH.js} +3 -3
  98. package/web/app/immutable/chunks/{CXqW8uvQ.js → JJppOn81.js} +1 -1
  99. package/web/app/immutable/chunks/{sy_-vAI4.js → LwRH1eka.js} +1 -1
  100. package/web/app/immutable/chunks/{D6t30n2k.js → MI6b3I4g.js} +1 -1
  101. package/web/app/immutable/chunks/{DadKxQy4.js → MZ-Z8Ci1.js} +1 -1
  102. package/web/app/immutable/chunks/{DnReg1PV.js → RcUVizw0.js} +1 -1
  103. package/web/app/immutable/chunks/{C8ZgE3Ef.js → SMiFFPlc.js} +1 -1
  104. package/web/app/immutable/chunks/{B1uiVPQp.js → Wl6R_9KY.js} +2 -2
  105. package/web/app/immutable/chunks/{CUGYrTNR.js → Yfz2ipIe.js} +1 -1
  106. package/web/app/immutable/chunks/{Kb-14YoE.js → _Le3pPaT.js} +1 -1
  107. package/web/app/immutable/chunks/{Bzy3H4Dj.js → apmshPCT.js} +1 -1
  108. package/web/app/immutable/chunks/{B2oKa_KL.js → axQU0SjH.js} +1 -1
  109. package/web/app/immutable/chunks/{b6EhU_ki.js → h3Utj-6O.js} +1 -1
  110. package/web/app/immutable/chunks/{a8iZfK0N.js → kniKaj8l.js} +1 -1
  111. package/web/app/immutable/chunks/{CVvPXkN9.js → lS2ZzWyn.js} +2 -2
  112. package/web/app/immutable/chunks/{BNzcEYAv.js → ljddUkNt.js} +1 -1
  113. package/web/app/immutable/chunks/{C1_Eiy41.js → mGAn30DI.js} +1 -1
  114. package/web/app/immutable/chunks/{DZ9d4A89.js → meW_HLSI.js} +4 -4
  115. package/web/app/immutable/chunks/{D8zipqK_.js → pfpEUetK.js} +1 -1
  116. package/web/app/immutable/chunks/{BppC6mQ0.js → tADzjMIa.js} +1 -1
  117. package/web/app/immutable/chunks/{D_MKhcgw.js → uC2D9YWv.js} +2 -2
  118. package/web/app/immutable/chunks/{B5G6wWuw.js → ua4ooXEO.js} +1 -1
  119. package/web/app/immutable/chunks/{CM5jTQWQ.js → umdNWcd2.js} +1 -1
  120. package/web/app/immutable/chunks/{cfwIe6eK.js → urnpr2FU.js} +1 -1
  121. package/web/app/immutable/chunks/{B_KZeZEK.js → v5cJrXPV.js} +2 -2
  122. package/web/app/immutable/chunks/{QiD34aXw.js → wruYJWvu.js} +1 -1
  123. package/web/app/immutable/chunks/{CtphhU9t.js → zHOhpzbP.js} +1 -1
  124. package/web/app/immutable/entry/{app.B_KnlZ7_.js → app.BUbsETEC.js} +2 -2
  125. package/web/app/immutable/entry/start.BsxeZxKz.js +1 -0
  126. package/web/app/immutable/nodes/{0._RPyfxd1.js → 0.BsmvutDZ.js} +1 -1
  127. package/web/app/immutable/nodes/{1.D8xhl6AX.js → 1.BrUX48T8.js} +1 -1
  128. package/web/app/immutable/nodes/{10.CarKEdYv.js → 10.7J5qVFyy.js} +1 -1
  129. package/web/app/immutable/nodes/{14.CyhsTzXV.js → 14.L6XtNmcg.js} +1 -1
  130. package/web/app/immutable/nodes/{17.DK0wbfgZ.js → 17.l75hM3Fb.js} +2 -2
  131. package/web/app/immutable/nodes/2.D42i0GRA.js +13 -0
  132. package/web/app/immutable/nodes/{3.D-VEkgrC.js → 3.BGRV9LT6.js} +1 -1
  133. package/web/app/immutable/nodes/{4.DIJC3xOT.js → 4.BexAoHjn.js} +1 -1
  134. package/web/app/immutable/nodes/{5.C4j-D4y5.js → 5.Bbv5x2qJ.js} +1 -1
  135. package/web/app/immutable/nodes/{6.BSD5IhCt.js → 6.BzVHiMKE.js} +1 -1
  136. package/web/app/immutable/nodes/{7.VlQW7gKS.js → 7.rwtSWtjx.js} +1 -1
  137. package/web/app/immutable/nodes/{8.BGFmcLEu.js → 8.D6d_r0Eu.js} +4 -4
  138. package/web/app/immutable/nodes/{9.Bam4xxeU.js → 9.aquGW3ae.js} +4 -4
  139. package/web/app/version.json +1 -1
  140. package/web/index.html +9 -9
  141. package/web/app/immutable/chunks/ZRfsqjSU.js +0 -2
  142. package/web/app/immutable/entry/start.CeDpeSwJ.js +0 -1
  143. package/web/app/immutable/nodes/2.7MZhaj2M.js +0 -13
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DC9Z7l0D.js","/app/immutable/chunks/DuwE_WBW.js","/app/immutable/chunks/Cv-W__h8.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/DiuUmAWK.js","/app/immutable/chunks/B10dK85Q.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/DBkMUdAo.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BZeUwBn0.js","/app/immutable/chunks/ClsZrb8B.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/GdlMbZRO.js","/app/immutable/chunks/BKpkoMuv.js","/app/immutable/chunks/D4os-974.js","/app/immutable/chunks/DPvDLGgX.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/BePtUMMB.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/BiLjH_HB.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/1o85IiDb.js","/app/immutable/chunks/j0KL2ItM.js","/app/immutable/chunks/C0ty6diA.js","/app/immutable/chunks/DTDbZc--.js","/app/immutable/chunks/CgCdkhNg.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/CEpchTPD.js","/app/immutable/chunks/ZhmlPELZ.js","/app/immutable/chunks/CUrYTyIw.js","/app/immutable/chunks/BtpuPEaR.js","/app/immutable/chunks/Ct5KmixI.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/D3gmaT9B.js","/app/immutable/chunks/C3BW_tmx.js","/app/immutable/chunks/BahFkvC5.js","/app/immutable/chunks/CVvPXkN9.js","/app/immutable/chunks/CmUwI5cU.js","/app/immutable/chunks/B8IFnCn1.js","/app/immutable/chunks/9s3slwY6.js","/app/immutable/chunks/D2pEu7en.js","/app/immutable/chunks/2_iuLgF6.js","/app/immutable/chunks/BvDMLNjQ.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/DUGj7TPr.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BsieX9dN.js","/app/immutable/assets/observe-overflow.CbDLK6fN.css","/app/immutable/chunks/5hOq5Q77.js","/app/immutable/chunks/Czzc8yNT.js","/app/immutable/chunks/Dj_1qKAG.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/BeP4UORy.js","/app/immutable/chunks/BgcFKXg4.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/CkjMOvWd.js","/app/immutable/chunks/DAZ23kin.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/CM--21b-.js","/app/immutable/chunks/DOpgcKBl.js","/app/immutable/chunks/0I_7-xCo.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/G_2OlhiX.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css","/app/immutable/chunks/DZ9d4A89.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/lkH5RFQO.js","/app/immutable/chunks/DbYY-d08.js","/app/immutable/assets/AttachmentPreview.BCSCCZGm.css","/app/immutable/chunks/Bq9XUSeR.js","/app/immutable/chunks/D3jGrF5f.js","/app/immutable/chunks/D8zipqK_.js","/app/immutable/assets/accessibility.CP-rioAF.css","/app/immutable/assets/DiagramPresentation.Bfi3xHm0.css"])))=>i.map(i=>d[i]);
2
- import{_ as Z}from"./Cv-W__h8.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./DuwE_WBW.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./DC9Z7l0D.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DXl8wdfL.js","/app/immutable/chunks/Ct_jn4oi.js","/app/immutable/chunks/Cv-W__h8.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BpBwsbt_.js","/app/immutable/chunks/B10dK85Q.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/DBkMUdAo.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BZeUwBn0.js","/app/immutable/chunks/ClsZrb8B.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/GdlMbZRO.js","/app/immutable/chunks/BKpkoMuv.js","/app/immutable/chunks/D4os-974.js","/app/immutable/chunks/DPvDLGgX.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/BePtUMMB.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/BiLjH_HB.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/1o85IiDb.js","/app/immutable/chunks/j0KL2ItM.js","/app/immutable/chunks/CyZEXqMD.js","/app/immutable/chunks/DTDbZc--.js","/app/immutable/chunks/CgCdkhNg.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/CEpchTPD.js","/app/immutable/chunks/ZhmlPELZ.js","/app/immutable/chunks/CUrYTyIw.js","/app/immutable/chunks/BtpuPEaR.js","/app/immutable/chunks/Ct5KmixI.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/CSUwzpGH.js","/app/immutable/chunks/C3BW_tmx.js","/app/immutable/chunks/BahFkvC5.js","/app/immutable/chunks/lS2ZzWyn.js","/app/immutable/chunks/CmUwI5cU.js","/app/immutable/chunks/B8IFnCn1.js","/app/immutable/chunks/9s3slwY6.js","/app/immutable/chunks/D2pEu7en.js","/app/immutable/chunks/2_iuLgF6.js","/app/immutable/chunks/BvDMLNjQ.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/DUGj7TPr.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BsieX9dN.js","/app/immutable/assets/observe-overflow.CbDLK6fN.css","/app/immutable/chunks/5hOq5Q77.js","/app/immutable/chunks/Czzc8yNT.js","/app/immutable/chunks/Dj_1qKAG.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/BeP4UORy.js","/app/immutable/chunks/BgcFKXg4.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/CkjMOvWd.js","/app/immutable/chunks/DAZ23kin.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/ChqVaW7F.js","/app/immutable/chunks/BV-BZKII.js","/app/immutable/chunks/B629omcp.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/DkCfIFHY.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css","/app/immutable/chunks/meW_HLSI.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/lkH5RFQO.js","/app/immutable/chunks/DbYY-d08.js","/app/immutable/assets/AttachmentPreview.BCSCCZGm.css","/app/immutable/chunks/C1r7a25c.js","/app/immutable/chunks/Bm0Jd9kY.js","/app/immutable/chunks/pfpEUetK.js","/app/immutable/assets/accessibility.CP-rioAF.css","/app/immutable/assets/DiagramPresentation.Bfi3xHm0.css"])))=>i.map(i=>d[i]);
2
+ import{_ as Z}from"./Cv-W__h8.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./Ct_jn4oi.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./DXl8wdfL.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};