@tecture/core 0.0.6 → 0.0.7
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.
- package/CHANGELOG.md +12 -0
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/public/assets/{_baseUniq-Dhw8ANLN.js → _baseUniq-CUITAAZ7.js} +2 -2
- package/dist/public/assets/{_baseUniq-Dhw8ANLN.js.map → _baseUniq-CUITAAZ7.js.map} +1 -1
- package/dist/public/assets/{arc-DHr716eG.js → arc-DyFMcdgg.js} +2 -2
- package/dist/public/assets/{arc-DHr716eG.js.map → arc-DyFMcdgg.js.map} +1 -1
- package/dist/public/assets/{architectureDiagram-Q4EWVU46-CiupZxBl.js → architectureDiagram-Q4EWVU46-DZTi6y6q.js} +2 -2
- package/dist/public/assets/{architectureDiagram-Q4EWVU46-CiupZxBl.js.map → architectureDiagram-Q4EWVU46-DZTi6y6q.js.map} +1 -1
- package/dist/public/assets/{blockDiagram-DXYQGD6D-CZsYmXdZ.js → blockDiagram-DXYQGD6D-C5DgUxsA.js} +2 -2
- package/dist/public/assets/{blockDiagram-DXYQGD6D-CZsYmXdZ.js.map → blockDiagram-DXYQGD6D-C5DgUxsA.js.map} +1 -1
- package/dist/public/assets/{c4Diagram-AHTNJAMY-oYpz_hY-.js → c4Diagram-AHTNJAMY-BF_SaG8K.js} +2 -2
- package/dist/public/assets/{c4Diagram-AHTNJAMY-oYpz_hY-.js.map → c4Diagram-AHTNJAMY-BF_SaG8K.js.map} +1 -1
- package/dist/public/assets/channel-Chx65KuQ.js +2 -0
- package/dist/public/assets/{channel-D4DHyqBz.js.map → channel-Chx65KuQ.js.map} +1 -1
- package/dist/public/assets/{chunk-4BX2VUAB-BJASz7t9.js → chunk-4BX2VUAB-JU2t15qH.js} +2 -2
- package/dist/public/assets/{chunk-4BX2VUAB-BJASz7t9.js.map → chunk-4BX2VUAB-JU2t15qH.js.map} +1 -1
- package/dist/public/assets/{chunk-4TB4RGXK-BmBuFub9.js → chunk-4TB4RGXK-BqjiENIB.js} +2 -2
- package/dist/public/assets/{chunk-4TB4RGXK-BmBuFub9.js.map → chunk-4TB4RGXK-BqjiENIB.js.map} +1 -1
- package/dist/public/assets/chunk-55IACEB6-CwPOewiq.js +2 -0
- package/dist/public/assets/{chunk-55IACEB6-DpRX_xgZ.js.map → chunk-55IACEB6-CwPOewiq.js.map} +1 -1
- package/dist/public/assets/{chunk-EDXVE4YY-CjyvbsHL.js → chunk-EDXVE4YY-CeAdKClT.js} +2 -2
- package/dist/public/assets/{chunk-EDXVE4YY-CjyvbsHL.js.map → chunk-EDXVE4YY-CeAdKClT.js.map} +1 -1
- package/dist/public/assets/{chunk-FMBD7UC4-CopKIX9d.js → chunk-FMBD7UC4-BmV52drU.js} +2 -2
- package/dist/public/assets/{chunk-FMBD7UC4-CopKIX9d.js.map → chunk-FMBD7UC4-BmV52drU.js.map} +1 -1
- package/dist/public/assets/{chunk-OYMX7WX6-Qy94MD6F.js → chunk-OYMX7WX6-DMQ6OBmH.js} +2 -2
- package/dist/public/assets/{chunk-OYMX7WX6-Qy94MD6F.js.map → chunk-OYMX7WX6-DMQ6OBmH.js.map} +1 -1
- package/dist/public/assets/{chunk-QZHKN3VN-q0VhU4fD.js → chunk-QZHKN3VN-BbECxIVF.js} +2 -2
- package/dist/public/assets/{chunk-QZHKN3VN-q0VhU4fD.js.map → chunk-QZHKN3VN-BbECxIVF.js.map} +1 -1
- package/dist/public/assets/{chunk-YZCP3GAM-CLHu-ytS.js → chunk-YZCP3GAM-LV4b5o7A.js} +2 -2
- package/dist/public/assets/{chunk-YZCP3GAM-CLHu-ytS.js.map → chunk-YZCP3GAM-LV4b5o7A.js.map} +1 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-CuGjbxVu.js +2 -0
- package/dist/public/assets/{classDiagram-6PBFFD2Q-C_GcL8CY.js.map → classDiagram-6PBFFD2Q-CuGjbxVu.js.map} +1 -1
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-CuGjbxVu.js +2 -0
- package/dist/public/assets/{classDiagram-v2-HSJHXN6E-C_GcL8CY.js.map → classDiagram-v2-HSJHXN6E-CuGjbxVu.js.map} +1 -1
- package/dist/public/assets/clone-B5zl9853.js +2 -0
- package/dist/public/assets/{clone-Cpn4E8-V.js.map → clone-B5zl9853.js.map} +1 -1
- package/dist/public/assets/{cose-bilkent-S5V4N54A-BCNrUYFS.js → cose-bilkent-S5V4N54A-NxYN3t_X.js} +2 -2
- package/dist/public/assets/{cose-bilkent-S5V4N54A-BCNrUYFS.js.map → cose-bilkent-S5V4N54A-NxYN3t_X.js.map} +1 -1
- package/dist/public/assets/{dagre-KV5264BT-BVapQShq.js → dagre-KV5264BT-DTQ94K2e.js} +2 -2
- package/dist/public/assets/{dagre-KV5264BT-BVapQShq.js.map → dagre-KV5264BT-DTQ94K2e.js.map} +1 -1
- package/dist/public/assets/{diagram-5BDNPKRD-D6B3PE9C.js → diagram-5BDNPKRD-BI7YTuYk.js} +2 -2
- package/dist/public/assets/{diagram-5BDNPKRD-D6B3PE9C.js.map → diagram-5BDNPKRD-BI7YTuYk.js.map} +1 -1
- package/dist/public/assets/{diagram-G4DWMVQ6-BaWJIFI_.js → diagram-G4DWMVQ6-CRfC6IFe.js} +2 -2
- package/dist/public/assets/{diagram-G4DWMVQ6-BaWJIFI_.js.map → diagram-G4DWMVQ6-CRfC6IFe.js.map} +1 -1
- package/dist/public/assets/{diagram-MMDJMWI5-CCy9j0cK.js → diagram-MMDJMWI5-CfWU0Xcy.js} +2 -2
- package/dist/public/assets/{diagram-MMDJMWI5-CCy9j0cK.js.map → diagram-MMDJMWI5-CfWU0Xcy.js.map} +1 -1
- package/dist/public/assets/{diagram-TYMM5635-Dlu7NmTQ.js → diagram-TYMM5635-DUUA764g.js} +2 -2
- package/dist/public/assets/{diagram-TYMM5635-Dlu7NmTQ.js.map → diagram-TYMM5635-DUUA764g.js.map} +1 -1
- package/dist/public/assets/{erDiagram-SMLLAGMA-X6FgEuRR.js → erDiagram-SMLLAGMA-CC6HpSJv.js} +2 -2
- package/dist/public/assets/{erDiagram-SMLLAGMA-X6FgEuRR.js.map → erDiagram-SMLLAGMA-CC6HpSJv.js.map} +1 -1
- package/dist/public/assets/{flowDiagram-DWJPFMVM-Bu3JFQlu.js → flowDiagram-DWJPFMVM-BcUwc3Qv.js} +2 -2
- package/dist/public/assets/{flowDiagram-DWJPFMVM-Bu3JFQlu.js.map → flowDiagram-DWJPFMVM-BcUwc3Qv.js.map} +1 -1
- package/dist/public/assets/{ganttDiagram-T4ZO3ILL-n168zCl5.js → ganttDiagram-T4ZO3ILL-BQ0OUFDb.js} +2 -2
- package/dist/public/assets/{ganttDiagram-T4ZO3ILL-n168zCl5.js.map → ganttDiagram-T4ZO3ILL-BQ0OUFDb.js.map} +1 -1
- package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-DArjnyo2.js → gitGraphDiagram-UUTBAWPF-BMtxQA7c.js} +2 -2
- package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-DArjnyo2.js.map → gitGraphDiagram-UUTBAWPF-BMtxQA7c.js.map} +1 -1
- package/dist/public/assets/{graph-Bfm3kqd3.js → graph-D-_LAAxI.js} +2 -2
- package/dist/public/assets/{graph-Bfm3kqd3.js.map → graph-D-_LAAxI.js.map} +1 -1
- package/dist/public/assets/{index-DMY07AUl.js → index-B08bCLVX.js} +3 -3
- package/dist/public/assets/{index-DMY07AUl.js.map → index-B08bCLVX.js.map} +1 -1
- package/dist/public/assets/{infoDiagram-42DDH7IO-pBrtdPq_.js → infoDiagram-42DDH7IO-Bamzqbzk.js} +2 -2
- package/dist/public/assets/{infoDiagram-42DDH7IO-pBrtdPq_.js.map → infoDiagram-42DDH7IO-Bamzqbzk.js.map} +1 -1
- package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-BDIZnWTx.js → ishikawaDiagram-UXIWVN3A-zKsJsf_v.js} +2 -2
- package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-BDIZnWTx.js.map → ishikawaDiagram-UXIWVN3A-zKsJsf_v.js.map} +1 -1
- package/dist/public/assets/{journeyDiagram-VCZTEJTY-DmSjb-PU.js → journeyDiagram-VCZTEJTY-C-6pvS6y.js} +2 -2
- package/dist/public/assets/{journeyDiagram-VCZTEJTY-DmSjb-PU.js.map → journeyDiagram-VCZTEJTY-C-6pvS6y.js.map} +1 -1
- package/dist/public/assets/{kanban-definition-6JOO6SKY-C8FgUjbs.js → kanban-definition-6JOO6SKY-DS7zW-ig.js} +2 -2
- package/dist/public/assets/{kanban-definition-6JOO6SKY-C8FgUjbs.js.map → kanban-definition-6JOO6SKY-DS7zW-ig.js.map} +1 -1
- package/dist/public/assets/{layout-DJh2njKG.js → layout-CVDJjYNO.js} +2 -2
- package/dist/public/assets/{layout-DJh2njKG.js.map → layout-CVDJjYNO.js.map} +1 -1
- package/dist/public/assets/{linear-kYTx6SLx.js → linear-lUY0N4kd.js} +2 -2
- package/dist/public/assets/{linear-kYTx6SLx.js.map → linear-lUY0N4kd.js.map} +1 -1
- package/dist/public/assets/{mermaid.core-sEG8CMeA.js → mermaid.core-H7Dmb05b.js} +5 -5
- package/dist/public/assets/{mermaid.core-sEG8CMeA.js.map → mermaid.core-H7Dmb05b.js.map} +1 -1
- package/dist/public/assets/{min-Cxji_8ZQ.js → min-CXznxZeM.js} +2 -2
- package/dist/public/assets/{min-Cxji_8ZQ.js.map → min-CXznxZeM.js.map} +1 -1
- package/dist/public/assets/{mindmap-definition-QFDTVHPH-B0-J9mrb.js → mindmap-definition-QFDTVHPH-jXt705eB.js} +2 -2
- package/dist/public/assets/{mindmap-definition-QFDTVHPH-B0-J9mrb.js.map → mindmap-definition-QFDTVHPH-jXt705eB.js.map} +1 -1
- package/dist/public/assets/{pieDiagram-DEJITSTG-CDZHsOGg.js → pieDiagram-DEJITSTG-Cs44d6OE.js} +2 -2
- package/dist/public/assets/{pieDiagram-DEJITSTG-CDZHsOGg.js.map → pieDiagram-DEJITSTG-Cs44d6OE.js.map} +1 -1
- package/dist/public/assets/{quadrantDiagram-34T5L4WZ-Cr3XLn8k.js → quadrantDiagram-34T5L4WZ-CpymTeDv.js} +2 -2
- package/dist/public/assets/{quadrantDiagram-34T5L4WZ-Cr3XLn8k.js.map → quadrantDiagram-34T5L4WZ-CpymTeDv.js.map} +1 -1
- package/dist/public/assets/{requirementDiagram-MS252O5E-DhckNPK2.js → requirementDiagram-MS252O5E-RyLqPw4W.js} +2 -2
- package/dist/public/assets/{requirementDiagram-MS252O5E-DhckNPK2.js.map → requirementDiagram-MS252O5E-RyLqPw4W.js.map} +1 -1
- package/dist/public/assets/{sankeyDiagram-XADWPNL6-Cst7lZQ5.js → sankeyDiagram-XADWPNL6-DamuB2BV.js} +2 -2
- package/dist/public/assets/{sankeyDiagram-XADWPNL6-Cst7lZQ5.js.map → sankeyDiagram-XADWPNL6-DamuB2BV.js.map} +1 -1
- package/dist/public/assets/{sequenceDiagram-FGHM5R23-BSz6hk1R.js → sequenceDiagram-FGHM5R23-6-TOylZP.js} +2 -2
- package/dist/public/assets/{sequenceDiagram-FGHM5R23-BSz6hk1R.js.map → sequenceDiagram-FGHM5R23-6-TOylZP.js.map} +1 -1
- package/dist/public/assets/{stateDiagram-FHFEXIEX-racSpEdx.js → stateDiagram-FHFEXIEX-B6cKPsIC.js} +2 -2
- package/dist/public/assets/{stateDiagram-FHFEXIEX-racSpEdx.js.map → stateDiagram-FHFEXIEX-B6cKPsIC.js.map} +1 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-CXb0Znc0.js +2 -0
- package/dist/public/assets/{stateDiagram-v2-QKLJ7IA2-C8oha-gC.js.map → stateDiagram-v2-QKLJ7IA2-CXb0Znc0.js.map} +1 -1
- package/dist/public/assets/{timeline-definition-GMOUNBTQ-pBR5gxYm.js → timeline-definition-GMOUNBTQ-CdeBXF6y.js} +2 -2
- package/dist/public/assets/{timeline-definition-GMOUNBTQ-pBR5gxYm.js.map → timeline-definition-GMOUNBTQ-CdeBXF6y.js.map} +1 -1
- package/dist/public/assets/{vennDiagram-DHZGUBPP-OCE87T_5.js → vennDiagram-DHZGUBPP-D8DqpbrW.js} +2 -2
- package/dist/public/assets/{vennDiagram-DHZGUBPP-OCE87T_5.js.map → vennDiagram-DHZGUBPP-D8DqpbrW.js.map} +1 -1
- package/dist/public/assets/{wardley-RL74JXVD-691yvuUx.js → wardley-RL74JXVD-B1MU-JlC.js} +2 -2
- package/dist/public/assets/{wardley-RL74JXVD-691yvuUx.js.map → wardley-RL74JXVD-B1MU-JlC.js.map} +1 -1
- package/dist/public/assets/{wardleyDiagram-NUSXRM2D-CewxpYfR.js → wardleyDiagram-NUSXRM2D-MYKM6CF8.js} +2 -2
- package/dist/public/assets/{wardleyDiagram-NUSXRM2D-CewxpYfR.js.map → wardleyDiagram-NUSXRM2D-MYKM6CF8.js.map} +1 -1
- package/dist/public/assets/{xychartDiagram-5P7HB3ND-C_kdNFR1.js → xychartDiagram-5P7HB3ND-Brec7d4F.js} +2 -2
- package/dist/public/assets/{xychartDiagram-5P7HB3ND-C_kdNFR1.js.map → xychartDiagram-5P7HB3ND-Brec7d4F.js.map} +1 -1
- package/dist/public/index.html +1 -1
- package/package.json +1 -1
- package/dist/public/assets/channel-D4DHyqBz.js +0 -2
- package/dist/public/assets/chunk-55IACEB6-DpRX_xgZ.js +0 -2
- package/dist/public/assets/classDiagram-6PBFFD2Q-C_GcL8CY.js +0 -2
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-C_GcL8CY.js +0 -2
- package/dist/public/assets/clone-Cpn4E8-V.js +0 -2
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-C8oha-gC.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{_ as X,as as F,at as Y,au as _,av as H,l as i,c as V,aw as z,ax as U,af as $,al as q,ag as P,ae as K,ay as Q,az as W,aA as Z}from"./mermaid.core-
|
|
1
|
+
import{_ as X,as as F,at as Y,au as _,av as H,l as i,c as V,aw as z,ax as U,af as $,al as q,ag as P,ae as K,ay as Q,az as W,aA as Z}from"./mermaid.core-H7Dmb05b.js";import{i as x,G as A}from"./graph-D-_LAAxI.js";import{l as I}from"./layout-CVDJjYNO.js";import{c as L}from"./clone-B5zl9853.js";import{m as B}from"./min-CXznxZeM.js";import"./index-B08bCLVX.js";import"./_baseUniq-CUITAAZ7.js";function E(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return x(e.graph())||(t.value=L(e.graph())),t}function ee(e){return B(e.nodes(),function(t){var n=e.node(t),o=e.parent(t),c={v:t};return x(n)||(c.value=n),x(o)||(c.parent=o),c})}function ne(e){return B(e.edges(),function(t){var n=e.edge(t),o={v:t.v,w:t.w};return x(t.name)||(o.name=t.name),x(n)||(o.value=n),o})}var f=new Map,b=new Map,J=new Map,te=X(()=>{b.clear(),J.clear(),f.clear()},"clear"),O=X((e,t)=>{const n=b.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=X((e,t)=>{const n=b.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=X((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const r=t.node(a);i.info("cp ",a," to ",o," with parent ",e),n.setNode(a,r),o!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);i.debug("Copying Edges",u),u.forEach(l=>{i.info("Edge",l);const h=t.edge(l.v,l.w,l.name);i.info("Edge data",h,o);try{se(l,o)?(i.info("Copying as ",l.v,l.w,h,l.name),n.setEdge(l.v,l.w,h,l.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",a),t.removeNode(a)})},"copy"),R=X((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)J.set(c,e),o=[...o,...R(c,t)];return o},"extractDescendants"),ie=X((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>r.some(h=>l.v===h.v&&l.w===h.w))},"findCommonEdges"),D=X((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const r=D(a,t,n),u=ie(t,n,r);if(r)if(u.length>0)c=r;else return r}return c},"findNonClusterChild"),k=X(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),re=X((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),b.set(n,R(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(i.debug("Cluster identified",n,b),c.forEach(a=>{const r=O(a.v,n),u=O(a.w,n);r^u&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",b.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,b)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let c=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const r=e.parent(c);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),i.warn("Adjusted Graph",E(e)),T(e,0),i.trace(f)},"adjustClustersAndEdges"),T=X((e,t)=>{var c,a;if(i.warn("extractor - ",t,E(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),o=!1;for(const r of n){const u=e.children(r);o=o||u.length>0}if(!o){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,f,f.has(r)&&!f.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!f.has(r))i.debug("Not a cluster",r,t);else if(!f.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(c=f.get(r))==null?void 0:c.clusterData)!=null&&a.dir&&(l=f.get(r).clusterData.dir,i.warn("Fixing dir",f.get(r).clusterData.dir,l));const h=new A({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",E(e)),G(r,e,h,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:f.get(r).clusterData,label:f.get(r).label,graph:h}),i.warn("New graph after copy node: (",r,")",E(h)),i.debug("Old graph after copy",E(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!f.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const u=e.node(r);i.warn(" Now next level",r,u),u!=null&&u.clusterNode&&T(u.graph,t+1)}},"extractor"),M=X((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const c=e.children(o),a=M(e,c);n=[...n,...a]}),n},"sorter"),oe=X(e=>M(e,e.children()),"sortNodesByHierarchy"),j=X(async(e,t,n,o,c,a)=>{i.warn("Graph in recursive render:XAX",E(t),c);const r=t.graph().rankdir;i.trace("Dir in recursive render - dir:",r);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),h=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),g=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(d){const s=t.node(d);if(c!==void 0){const w=JSON.parse(JSON.stringify(c.clusterData));i.trace(`Setting data for parent cluster XXX
|
|
2
2
|
Node.id = `,d,`
|
|
3
3
|
data=`,w.height,`
|
|
4
4
|
Parent cluster`,c.height),t.setNode(c.id,w),t.parent(d)||(i.trace("Setting parent",d,c.id),t.setParent(d,c.id,w))}if(i.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),s!=null&&s.clusterNode){i.info("Cluster identified XBX",d,s.width,t.node(d));const{ranksep:w,nodesep:m}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:w+25,nodesep:m});const N=await j(g,s.graph,n,o,t.node(d),a),S=N.elem;z(s,S),s.diff=N.diff||0,i.info("New compound node after recursive render XAX",d,"width",s.width,"height",s.height),U(S,s)}else t.children(d).length>0?(i.trace("Cluster - the non recursive path XBX",d,s.id,s,s.width,"Graph:",t),i.trace(D(s.id,t)),f.set(s.id,{id:D(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",d,g,t.node(d),r),await $(g,t.node(d),{config:a,dir:r}))})),await X(async()=>{const d=t.edges().map(async function(s){const w=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",f,"ids:",s.v,s.w,"Translating: ",f.get(s.v),f.get(s.w)),await Z(C,w)});await Promise.all(d)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(E(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(E(t)));let p=0,{subGraphTitleTotalMargin:y}=q(a);return await Promise.all(oe(t).map(async function(d){var w;const s=t.node(d);if(i.info("Position XBX => "+d+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=y,i.info("A tainted cluster node XBX1",d,s.id,s.width,s.height,s.x,s.y,t.parent(d)),f.get(s.id).node=s,P(s);else if(t.children(d).length>0){i.info("A pure cluster node XBX1",d,s.id,s.x,s.y,s.width,s.height,t.parent(d)),s.height+=y,t.node(s.parentId);const m=(s==null?void 0:s.padding)/2||0,N=((w=s==null?void 0:s.labelBBox)==null?void 0:w.height)||0,S=N-m||0;i.debug("OffsetY",S,"labelHeight",N,"halfPadding",m),await K(l,s),f.get(s.id).node=s}else{const m=t.node(s.parentId);s.y+=y/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",m,m==null?void 0:m.offsetY,s),P(s)}})),t.edges().forEach(function(d){const s=t.edge(d);i.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(s),s),s.points.forEach(S=>S.y+=y/2);const w=t.node(d.v);var m=t.node(d.w);const N=Q(h,s,f,n,w,m,o);W(s,N)}),t.nodes().forEach(function(d){const s=t.node(d);i.info(d,s.type,s.diff),s.isGroup&&(p=s.diff)}),i.warn("Returning from recursive render XAX",u,p),{elem:u,diff:p}},"recursiveRender"),we=X(async(e,t)=>{var a,r,u,l,h,C;const n=new A({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((a=e.config)==null?void 0:a.nodeSpacing)||((u=(r=e.config)==null?void 0:r.flowchart)==null?void 0:u.nodeSpacing)||e.nodeSpacing,ranksep:((l=e.config)==null?void 0:l.rankSpacing)||((C=(h=e.config)==null?void 0:h.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=t.select("g");F(o,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(g=>{n.setNode(g.id,{...g}),g.parentId&&n.setParent(g.id,g.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(g=>{if(g.start===g.end){const v=g.start,p=v+"---"+v+"---1",y=v+"---"+v+"---2",d=n.node(v);n.setNode(p,{domId:p,id:p,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(p,d.parentId),n.setNode(y,{domId:y,id:y,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(y,d.parentId);const s=structuredClone(g),w=structuredClone(g),m=structuredClone(g);s.label="",s.arrowTypeEnd="none",s.id=v+"-cyclic-special-1",w.arrowTypeStart="none",w.arrowTypeEnd="none",w.id=v+"-cyclic-special-mid",m.label="",d.isGroup&&(s.fromCluster=v,m.toCluster=v),m.id=v+"-cyclic-special-2",m.arrowTypeStart="none",n.setEdge(v,p,s,v+"-cyclic-special-0"),n.setEdge(p,y,w,v+"-cyclic-special-1"),n.setEdge(y,v,m,v+"-cyc<lic-special-2")}else n.setEdge(g.start,g.end,{...g},g.id)}),i.warn("Graph at first:",JSON.stringify(E(n))),re(n),i.warn("Graph after XAX:",JSON.stringify(E(n)));const c=V();await j(o,n,e.type,e.diagramId,void 0,c)},"render");export{we as render};
|
|
5
|
-
//# sourceMappingURL=dagre-KV5264BT-
|
|
5
|
+
//# sourceMappingURL=dagre-KV5264BT-DTQ94K2e.js.map
|
package/dist/public/assets/{dagre-KV5264BT-BVapQShq.js.map → dagre-KV5264BT-DTQ94K2e.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dagre-KV5264BT-BVapQShq.js","sources":["../../../../node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/graphlib/json.js","../../../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/dagre-KV5264BT.mjs"],"sourcesContent":["import * as _ from 'lodash-es';\nimport { Graph } from './graph.js';\n\n/**\n * @import { NodeID, EdgeObj, GraphOptions } from './graph.js';\n */\n\nexport { write, read };\n\n/**\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n *\n * @typedef {object} GraphJSON\n * @property {Required<GraphOptions>} options - The options used to create the graph.\n * @property {Array<{ v: NodeID; value?: NodeLabel; parent?: NodeID }>} nodes - The nodes in the graph.\n * @property {Array<EdgeObj & { value?: EdgeLabel }>} edges - The edges in the graph.\n * @property {GraphLabel} [value] - The graph's value, if any.\n */\n\n/**\n * Creates a JSON representation of the graph that can be serialized to a\n * string with\n * [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).\n * The graph can later be restored using {@link read}.\n *\n * @example\n *\n * ```js\n * var g = new graphlib.Graph();\n * g.setNode(\"a\", { label: \"node a\" });\n * g.setNode(\"b\", { label: \"node b\" });\n * g.setEdge(\"a\", \"b\", { label: \"edge a->b\" });\n * graphlib.json.write(g);\n * // Returns the object:\n * //\n * // {\n * // \"options\": {\n * // \"directed\": true,\n * // \"multigraph\": false,\n * // \"compound\": false\n * // },\n * // \"nodes\": [\n * // { \"v\": \"a\", \"value\": { \"label\": \"node a\" } },\n * // { \"v\": \"b\", \"value\": { \"label\": \"node b\" } }\n * // ],\n * // \"edges\": [\n * // { \"v\": \"a\", \"w\": \"b\", \"value\": { \"label\": \"edge a->b\" } }\n * // ]\n * // }\n * ```\n *\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n * @param {Graph<GraphLabel, NodeLabel, EdgeLabel>} g - The graph to serialize.\n * @returns {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} The JSON representation of the graph.\n */\nfunction write(g) {\n /** @type {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} */\n var json = {\n options: {\n directed: g.isDirected(),\n multigraph: g.isMultigraph(),\n compound: g.isCompound(),\n },\n nodes: writeNodes(g),\n edges: writeEdges(g),\n };\n if (!_.isUndefined(g.graph())) {\n json.value = _.clone(g.graph());\n }\n return json;\n}\n\n/**\n * @template NodeLabel - Label of a node.\n *\n * @param {Graph<unknown, NodeLabel, unknown>} g - The graph to serialize.\n * @returns {Array<{ v: NodeID; value?: NodeLabel; parent?: NodeID }>} The nodes in the graph.\n */\nfunction writeNodes(g) {\n return _.map(g.nodes(), function (v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\n /** @type {{ v: NodeID; value?: NodeLabel; parent?: NodeID }} */\n var node = { v: v };\n if (!_.isUndefined(nodeValue)) {\n node.value = nodeValue;\n }\n if (!_.isUndefined(parent)) {\n node.parent = parent;\n }\n return node;\n });\n}\n\n/**\n * @template EdgeLabel - Label of a node.\n *\n * @param {Graph<unknown, unknown, EdgeLabel>} g - The graph to serialize.\n * @returns {Array<EdgeObj & { value?: EdgeLabel }>} The edges in the graph.\n */\nfunction writeEdges(g) {\n return _.map(g.edges(), function (e) {\n var edgeValue = g.edge(e);\n /** @type {EdgeObj & { value?: EdgeLabel }} */\n var edge = { v: e.v, w: e.w };\n if (!_.isUndefined(e.name)) {\n edge.name = e.name;\n }\n if (!_.isUndefined(edgeValue)) {\n edge.value = edgeValue;\n }\n return edge;\n });\n}\n\n/**\n * Takes JSON as input and returns the graph representation.\n *\n * @example\n *\n * For example, if we have serialized the graph in {@link write}\n * to a string named `str`, we can restore it to a graph as follows:\n *\n * ```js\n * var g2 = graphlib.json.read(JSON.parse(str));\n * // or, in order to copy the graph\n * var g3 = graphlib.json.read(graphlib.json.write(g))\n *\n * g2.nodes();\n * // ['a', 'b']\n * g2.edges()\n * // [ { v: 'a', w: 'b' } ]\n * ```\n *\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n * @param {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} json - The JSON representation of the graph.\n * @returns {Graph<GraphLabel, NodeLabel, EdgeLabel>} The restored graph.\n */\nfunction read(json) {\n var g = new Graph(json.options).setGraph(json.value);\n _.each(json.nodes, function (entry) {\n g.setNode(entry.v, entry.value);\n if (entry.parent) {\n g.setParent(entry.v, entry.parent);\n }\n });\n _.each(json.edges, function (entry) {\n g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);\n });\n return g;\n}\n","import {\n clear as clear2,\n insertEdge,\n insertEdgeLabel,\n markers_default,\n positionEdgeLabel\n} from \"./chunk-ENJZ2VHE.mjs\";\nimport \"./chunk-BSJP7CBP.mjs\";\nimport {\n clear,\n clear2 as clear3,\n insertCluster,\n insertNode,\n positionNode,\n setNodeElem,\n updateNodeBounds\n} from \"./chunk-5FUZZQ4R.mjs\";\nimport {\n getSubGraphTitleMargins\n} from \"./chunk-ZZ45TVLE.mjs\";\nimport \"./chunk-X2U36JSP.mjs\";\nimport \"./chunk-U2HBQHQK.mjs\";\nimport \"./chunk-5PVQY5BW.mjs\";\nimport {\n getConfig2 as getConfig\n} from \"./chunk-ICPOFSXX.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/rendering-util/layout-algorithms/dagre/index.js\nimport { layout as dagreLayout } from \"dagre-d3-es/src/dagre/index.js\";\nimport * as graphlibJson2 from \"dagre-d3-es/src/graphlib/json.js\";\nimport * as graphlib2 from \"dagre-d3-es/src/graphlib/index.js\";\n\n// src/rendering-util/layout-algorithms/dagre/mermaid-graphlib.js\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\nimport * as graphlibJson from \"dagre-d3-es/src/graphlib/json.js\";\nvar clusterDb = /* @__PURE__ */ new Map();\nvar descendants = /* @__PURE__ */ new Map();\nvar parents = /* @__PURE__ */ new Map();\nvar clear4 = /* @__PURE__ */ __name(() => {\n descendants.clear();\n parents.clear();\n clusterDb.clear();\n}, \"clear\");\nvar isDescendant = /* @__PURE__ */ __name((id, ancestorId) => {\n const ancestorDescendants = descendants.get(ancestorId) || [];\n log.trace(\"In isDescendant\", ancestorId, \" \", id, \" = \", ancestorDescendants.includes(id));\n return ancestorDescendants.includes(id);\n}, \"isDescendant\");\nvar edgeInCluster = /* @__PURE__ */ __name((edge, clusterId) => {\n const clusterDescendants = descendants.get(clusterId) || [];\n log.info(\"Descendants of \", clusterId, \" is \", clusterDescendants);\n log.info(\"Edge is \", edge);\n if (edge.v === clusterId || edge.w === clusterId) {\n return false;\n }\n if (!clusterDescendants) {\n log.debug(\"Tilt, \", clusterId, \",not in descendants\");\n return false;\n }\n return clusterDescendants.includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || clusterDescendants.includes(edge.w);\n}, \"edgeInCluster\");\nvar copy = /* @__PURE__ */ __name((clusterId, graph, newGraph, rootId) => {\n log.warn(\n \"Copying children of \",\n clusterId,\n \"root\",\n rootId,\n \"data\",\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n log.warn(\"Copying (nodes) clusterId\", clusterId, \"nodes\", nodes);\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info(\"cp \", node, \" to \", rootId, \" with parent \", clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn(\"Setting parent\", node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n if (clusterId !== rootId && node !== clusterId) {\n log.debug(\"Setting parent\", node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info(\"In copy \", clusterId, \"root\", rootId, \"data\", graph.node(clusterId), rootId);\n log.debug(\n \"Not Setting parent for node=\",\n node,\n \"cluster!==rootId\",\n clusterId !== rootId,\n \"node!==clusterId\",\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug(\"Copying Edges\", edges);\n edges.forEach((edge) => {\n log.info(\"Edge\", edge);\n const data2 = graph.edge(edge.v, edge.w, edge.name);\n log.info(\"Edge data\", data2, rootId);\n try {\n if (edgeInCluster(edge, rootId)) {\n log.info(\"Copying as \", edge.v, edge.w, data2, edge.name);\n newGraph.setEdge(edge.v, edge.w, data2, edge.name);\n log.info(\"newGraph edges \", newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n \"Skipping copy of edge \",\n edge.v,\n \"-->\",\n edge.w,\n \" rootId: \",\n rootId,\n \" clusterId:\",\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug(\"Removing node\", node);\n graph.removeNode(node);\n });\n}, \"copy\");\nvar extractDescendants = /* @__PURE__ */ __name((id, graph) => {\n const children = graph.children(id);\n let res = [...children];\n for (const child of children) {\n parents.set(child, id);\n res = [...res, ...extractDescendants(child, graph)];\n }\n return res;\n}, \"extractDescendants\");\nvar findCommonEdges = /* @__PURE__ */ __name((graph, id1, id2) => {\n const edges1 = graph.edges().filter((edge) => edge.v === id1 || edge.w === id1);\n const edges2 = graph.edges().filter((edge) => edge.v === id2 || edge.w === id2);\n const edges1Prim = edges1.map((edge) => {\n return { v: edge.v === id1 ? id2 : edge.v, w: edge.w === id1 ? id1 : edge.w };\n });\n const edges2Prim = edges2.map((edge) => {\n return { v: edge.v, w: edge.w };\n });\n const result = edges1Prim.filter((edgeIn1) => {\n return edges2Prim.some((edge) => edgeIn1.v === edge.v && edgeIn1.w === edge.w);\n });\n return result;\n}, \"findCommonEdges\");\nvar findNonClusterChild = /* @__PURE__ */ __name((id, graph, clusterId) => {\n const children = graph.children(id);\n log.trace(\"Searching children of id \", id, children);\n if (children.length < 1) {\n return id;\n }\n let reserve;\n for (const child of children) {\n const _id = findNonClusterChild(child, graph, clusterId);\n const commonEdges = findCommonEdges(graph, clusterId, _id);\n if (_id) {\n if (commonEdges.length > 0) {\n reserve = _id;\n } else {\n return _id;\n }\n }\n }\n return reserve;\n}, \"findNonClusterChild\");\nvar getAnchorId = /* @__PURE__ */ __name((id) => {\n if (!clusterDb.has(id)) {\n return id;\n }\n if (!clusterDb.get(id).externalConnections) {\n return id;\n }\n if (clusterDb.has(id)) {\n return clusterDb.get(id).id;\n }\n return id;\n}, \"getAnchorId\");\nvar adjustClustersAndEdges = /* @__PURE__ */ __name((graph, depth) => {\n if (!graph || depth > 10) {\n log.debug(\"Opting out, no graph \");\n return;\n } else {\n log.debug(\"Opting in, graph \");\n }\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n \"Cluster identified\",\n id,\n \" Replacement id in edges: \",\n findNonClusterChild(id, graph, id)\n );\n descendants.set(id, extractDescendants(id, graph));\n clusterDb.set(id, { id: findNonClusterChild(id, graph, id), clusterData: graph.node(id) });\n }\n });\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug(\"Cluster identified\", id, descendants);\n edges.forEach((edge) => {\n const d1 = isDescendant(edge.v, id);\n const d2 = isDescendant(edge.w, id);\n if (d1 ^ d2) {\n log.warn(\"Edge: \", edge, \" leaves cluster \", id);\n log.warn(\"Descendants of XXX \", id, \": \", descendants.get(id));\n clusterDb.get(id).externalConnections = true;\n }\n });\n } else {\n log.debug(\"Not a cluster \", id, descendants);\n }\n });\n for (let id of clusterDb.keys()) {\n const nonClusterChild = clusterDb.get(id).id;\n const parent = graph.parent(nonClusterChild);\n if (parent !== id && clusterDb.has(parent) && !clusterDb.get(parent).externalConnections) {\n clusterDb.get(id).id = parent;\n }\n }\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(graph.edge(e)));\n let v = e.v;\n let w = e.w;\n log.warn(\n \"Fix XXX\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb.get(e.v),\n \" --- \",\n clusterDb.get(e.w)\n );\n if (clusterDb.get(e.v) || clusterDb.get(e.w)) {\n log.warn(\"Fixing and trying - removing XXX\", e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) {\n const parent = graph.parent(v);\n clusterDb.get(parent).externalConnections = true;\n edge.fromCluster = e.v;\n }\n if (w !== e.w) {\n const parent = graph.parent(w);\n clusterDb.get(parent).externalConnections = true;\n edge.toCluster = e.w;\n }\n log.warn(\"Fix Replacing with XXX\", v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn(\"Adjusted Graph\", graphlibJson.write(graph));\n extractor(graph, 0);\n log.trace(clusterDb);\n}, \"adjustClustersAndEdges\");\nvar extractor = /* @__PURE__ */ __name((graph, depth) => {\n log.warn(\"extractor - \", depth, graphlibJson.write(graph), graph.children(\"D\"));\n if (depth > 10) {\n log.error(\"Bailing out\");\n return;\n }\n let nodes = graph.nodes();\n let hasChildren = false;\n for (const node of nodes) {\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n if (!hasChildren) {\n log.debug(\"Done, no node has children\", graph.nodes());\n return;\n }\n log.debug(\"Nodes = \", nodes, depth);\n for (const node of nodes) {\n log.debug(\n \"Extracting node\",\n node,\n clusterDb,\n clusterDb.has(node) && !clusterDb.get(node).externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children(\"D\"),\n \" Depth \",\n depth\n );\n if (!clusterDb.has(node)) {\n log.debug(\"Not a cluster\", node, depth);\n } else if (!clusterDb.get(node).externalConnections && graph.children(node) && graph.children(node).length > 0) {\n log.warn(\n \"Cluster without external connections, without a parent and with children\",\n node,\n depth\n );\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === \"TB\" ? \"LR\" : \"TB\";\n if (clusterDb.get(node)?.clusterData?.dir) {\n dir = clusterDb.get(node).clusterData.dir;\n log.warn(\"Fixing dir\", clusterDb.get(node).clusterData.dir, dir);\n }\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: dir,\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n log.warn(\"Old graph before copy\", graphlibJson.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb.get(node).clusterData,\n label: clusterDb.get(node).label,\n graph: clusterGraph\n });\n log.warn(\"New graph after copy node: (\", node, \")\", graphlibJson.write(clusterGraph));\n log.debug(\"Old graph after copy\", graphlibJson.write(graph));\n } else {\n log.warn(\n \"Cluster ** \",\n node,\n \" **not meeting the criteria !externalConnections:\",\n !clusterDb.get(node).externalConnections,\n \" no parent: \",\n !graph.parent(node),\n \" children \",\n graph.children(node) && graph.children(node).length > 0,\n graph.children(\"D\"),\n depth\n );\n log.debug(clusterDb);\n }\n }\n nodes = graph.nodes();\n log.warn(\"New list of nodes\", nodes);\n for (const node of nodes) {\n const data = graph.node(node);\n log.warn(\" Now next level\", node, data);\n if (data?.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n}, \"extractor\");\nvar sorter = /* @__PURE__ */ __name((graph, nodes) => {\n if (nodes.length === 0) {\n return [];\n }\n let result = Object.assign([], nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = [...result, ...sorted];\n });\n return result;\n}, \"sorter\");\nvar sortNodesByHierarchy = /* @__PURE__ */ __name((graph) => sorter(graph, graph.children()), \"sortNodesByHierarchy\");\n\n// src/rendering-util/layout-algorithms/dagre/index.js\nvar recursiveRender = /* @__PURE__ */ __name(async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {\n log.warn(\"Graph in recursive render:XAX\", graphlibJson2.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace(\"Dir in recursive render - dir:\", dir);\n const elem = _elem.insert(\"g\").attr(\"class\", \"root\");\n if (!graph.nodes()) {\n log.info(\"No nodes found for\", graph);\n } else {\n log.info(\"Recursive render XXX\", graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.info(\"Recursive edges\", graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert(\"g\").attr(\"class\", \"clusters\");\n const edgePaths = elem.insert(\"g\").attr(\"class\", \"edgePaths\");\n const edgeLabels = elem.insert(\"g\").attr(\"class\", \"edgeLabels\");\n const nodes = elem.insert(\"g\").attr(\"class\", \"nodes\");\n await Promise.all(\n graph.nodes().map(async function(v) {\n const node = graph.node(v);\n if (parentCluster !== void 0) {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n log.trace(\n \"Setting data for parent cluster XXX\\n Node.id = \",\n v,\n \"\\n data=\",\n data.height,\n \"\\nParent cluster\",\n parentCluster.height\n );\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace(\"Setting parent\", v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info(\"(Insert) Node XXX\" + v + \": \" + JSON.stringify(graph.node(v)));\n if (node?.clusterNode) {\n log.info(\"Cluster identified XBX\", v, node.width, graph.node(v));\n const { ranksep, nodesep } = graph.graph();\n node.graph.setGraph({\n ...node.graph.graph(),\n ranksep: ranksep + 25,\n nodesep\n });\n const o = await recursiveRender(\n nodes,\n node.graph,\n diagramType,\n id,\n graph.node(v),\n siteConfig\n );\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n node.diff = o.diff || 0;\n log.info(\n \"New compound node after recursive render XAX\",\n v,\n \"width\",\n // node,\n node.width,\n \"height\",\n node.height\n // node.x,\n // node.y\n );\n setNodeElem(newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n log.trace(\n \"Cluster - the non recursive path XBX\",\n v,\n node.id,\n node,\n node.width,\n \"Graph:\",\n graph\n );\n log.trace(findNonClusterChild(node.id, graph));\n clusterDb.set(node.id, { id: findNonClusterChild(node.id, graph), node });\n } else {\n log.trace(\"Node - the non recursive path XAX\", v, nodes, graph.node(v), dir);\n await insertNode(nodes, graph.node(v), { config: siteConfig, dir });\n }\n }\n })\n );\n const processEdges = /* @__PURE__ */ __name(async () => {\n const edgePromises = graph.edges().map(async function(e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \", e, \" \", JSON.stringify(graph.edge(e)));\n log.info(\n \"Fix\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb.get(e.v),\n clusterDb.get(e.w)\n );\n await insertEdgeLabel(edgeLabels, edge);\n });\n await Promise.all(edgePromises);\n }, \"processEdges\");\n await processEdges();\n log.info(\"Graph before layout:\", JSON.stringify(graphlibJson2.write(graph)));\n log.info(\"############################################# XXX\");\n log.info(\"### Layout ### XXX\");\n log.info(\"############################################# XXX\");\n dagreLayout(graph);\n log.info(\"Graph after layout:\", JSON.stringify(graphlibJson2.write(graph)));\n let diff = 0;\n let { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n await Promise.all(\n sortNodesByHierarchy(graph).map(async function(v) {\n const node = graph.node(v);\n log.info(\n \"Position XBX => \" + v + \": (\" + node.x,\n \",\" + node.y,\n \") width: \",\n node.width,\n \" height: \",\n node.height\n );\n if (node?.clusterNode) {\n node.y += subGraphTitleTotalMargin;\n log.info(\n \"A tainted cluster node XBX1\",\n v,\n node.id,\n node.width,\n node.height,\n node.x,\n node.y,\n graph.parent(v)\n );\n clusterDb.get(node.id).node = node;\n positionNode(node);\n } else {\n if (graph.children(v).length > 0) {\n log.info(\n \"A pure cluster node XBX1\",\n v,\n node.id,\n node.x,\n node.y,\n node.width,\n node.height,\n graph.parent(v)\n );\n node.height += subGraphTitleTotalMargin;\n graph.node(node.parentId);\n const halfPadding = node?.padding / 2 || 0;\n const labelHeight = node?.labelBBox?.height || 0;\n const offsetY = labelHeight - halfPadding || 0;\n log.debug(\"OffsetY\", offsetY, \"labelHeight\", labelHeight, \"halfPadding\", halfPadding);\n await insertCluster(clusters, node);\n clusterDb.get(node.id).node = node;\n } else {\n const parent = graph.node(node.parentId);\n node.y += subGraphTitleTotalMargin / 2;\n log.info(\n \"A regular node XBX1 - using the padding\",\n node.id,\n \"parent\",\n node.parentId,\n node.width,\n node.height,\n node.x,\n node.y,\n \"offsetY\",\n node.offsetY,\n \"parent\",\n parent,\n parent?.offsetY,\n node\n );\n positionNode(node);\n }\n }\n })\n );\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(edge), edge);\n edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2);\n const startNode = graph.node(e.v);\n var endNode = graph.node(e.w);\n const paths = insertEdge(edgePaths, edge, clusterDb, diagramType, startNode, endNode, id);\n positionEdgeLabel(edge, paths);\n });\n graph.nodes().forEach(function(v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.isGroup) {\n diff = n.diff;\n }\n });\n log.warn(\"Returning from recursive render XAX\", elem, diff);\n return { elem, diff };\n}, \"recursiveRender\");\nvar render = /* @__PURE__ */ __name(async (data4Layout, svg) => {\n const graph = new graphlib2.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: data4Layout.direction,\n nodesep: data4Layout.config?.nodeSpacing || data4Layout.config?.flowchart?.nodeSpacing || data4Layout.nodeSpacing,\n ranksep: data4Layout.config?.rankSpacing || data4Layout.config?.flowchart?.rankSpacing || data4Layout.rankSpacing,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n const element = svg.select(\"g\");\n markers_default(element, data4Layout.markers, data4Layout.type, data4Layout.diagramId);\n clear3();\n clear2();\n clear();\n clear4();\n data4Layout.nodes.forEach((node) => {\n graph.setNode(node.id, { ...node });\n if (node.parentId) {\n graph.setParent(node.id, node.parentId);\n }\n });\n log.debug(\"Edges:\", data4Layout.edges);\n data4Layout.edges.forEach((edge) => {\n if (edge.start === edge.end) {\n const nodeId = edge.start;\n const specialId1 = nodeId + \"---\" + nodeId + \"---1\";\n const specialId2 = nodeId + \"---\" + nodeId + \"---2\";\n const node = graph.node(nodeId);\n graph.setNode(specialId1, {\n domId: specialId1,\n id: specialId1,\n parentId: node.parentId,\n labelStyle: \"\",\n label: \"\",\n padding: 0,\n shape: \"labelRect\",\n // shape: 'rect',\n style: \"\",\n width: 10,\n height: 10\n });\n graph.setParent(specialId1, node.parentId);\n graph.setNode(specialId2, {\n domId: specialId2,\n id: specialId2,\n parentId: node.parentId,\n labelStyle: \"\",\n padding: 0,\n // shape: 'rect',\n shape: \"labelRect\",\n label: \"\",\n style: \"\",\n width: 10,\n height: 10\n });\n graph.setParent(specialId2, node.parentId);\n const edge1 = structuredClone(edge);\n const edgeMid = structuredClone(edge);\n const edge2 = structuredClone(edge);\n edge1.label = \"\";\n edge1.arrowTypeEnd = \"none\";\n edge1.id = nodeId + \"-cyclic-special-1\";\n edgeMid.arrowTypeStart = \"none\";\n edgeMid.arrowTypeEnd = \"none\";\n edgeMid.id = nodeId + \"-cyclic-special-mid\";\n edge2.label = \"\";\n if (node.isGroup) {\n edge1.fromCluster = nodeId;\n edge2.toCluster = nodeId;\n }\n edge2.id = nodeId + \"-cyclic-special-2\";\n edge2.arrowTypeStart = \"none\";\n graph.setEdge(nodeId, specialId1, edge1, nodeId + \"-cyclic-special-0\");\n graph.setEdge(specialId1, specialId2, edgeMid, nodeId + \"-cyclic-special-1\");\n graph.setEdge(specialId2, nodeId, edge2, nodeId + \"-cyc<lic-special-2\");\n } else {\n graph.setEdge(edge.start, edge.end, { ...edge }, edge.id);\n }\n });\n log.warn(\"Graph at first:\", JSON.stringify(graphlibJson2.write(graph)));\n adjustClustersAndEdges(graph);\n log.warn(\"Graph after XAX:\", JSON.stringify(graphlibJson2.write(graph)));\n const siteConfig = getConfig();\n await recursiveRender(\n element,\n graph,\n data4Layout.type,\n data4Layout.diagramId,\n void 0,\n siteConfig\n );\n}, \"render\");\nexport {\n render\n};\n"],"names":["write","g","json","writeNodes","writeEdges","_.isUndefined","_.clone","_.map","v","nodeValue","parent","node","e","edgeValue","edge","clusterDb","descendants","parents","clear4","__name","isDescendant","id","ancestorId","ancestorDescendants","log","edgeInCluster","clusterId","clusterDescendants","copy","graph","newGraph","rootId","nodes","data","edges","data2","extractDescendants","children","res","child","findCommonEdges","id1","id2","edges1","edges2","edges1Prim","edges2Prim","edgeIn1","findNonClusterChild","reserve","_id","commonEdges","getAnchorId","adjustClustersAndEdges","depth","d1","d2","nonClusterChild","w","graphlibJson.write","extractor","hasChildren","dir","_b","_a","clusterGraph","graphlib.Graph","sorter","result","sorted","sortNodesByHierarchy","recursiveRender","_elem","diagramType","parentCluster","siteConfig","graphlibJson2.write","elem","clusters","edgePaths","edgeLabels","ranksep","nodesep","o","newEl","updateNodeBounds","setNodeElem","insertNode","edgePromises","insertEdgeLabel","dagreLayout","diff","subGraphTitleTotalMargin","getSubGraphTitleMargins","positionNode","halfPadding","labelHeight","offsetY","insertCluster","point","startNode","endNode","paths","insertEdge","positionEdgeLabel","n","render","data4Layout","svg","graphlib2.Graph","_c","_d","_f","_e","element","markers_default","clear3","clear2","clear","nodeId","specialId1","specialId2","edge1","edgeMid","edge2","getConfig"],"mappings":"uYA2DA,SAASA,EAAMC,EAAG,CAEhB,IAAIC,EAAO,CACT,QAAS,CACP,SAAUD,EAAE,WAAU,EACtB,WAAYA,EAAE,aAAY,EAC1B,SAAUA,EAAE,WAAU,CAC5B,EACI,MAAOE,GAAWF,CAAC,EACnB,MAAOG,GAAWH,CAAC,CACvB,EACE,OAAKI,EAAcJ,EAAE,MAAK,CAAE,IAC1BC,EAAK,MAAQI,EAAQL,EAAE,MAAK,CAAE,GAEzBC,CACT,CAQA,SAASC,GAAWF,EAAG,CACrB,OAAOM,EAAMN,EAAE,MAAK,EAAI,SAAUO,EAAG,CACnC,IAAIC,EAAYR,EAAE,KAAKO,CAAC,EACpBE,EAAST,EAAE,OAAOO,CAAC,EAEnBG,EAAO,CAAE,EAAGH,CAAC,EACjB,OAAKH,EAAcI,CAAS,IAC1BE,EAAK,MAAQF,GAEVJ,EAAcK,CAAM,IACvBC,EAAK,OAASD,GAETC,CACT,CAAC,CACH,CAQA,SAASP,GAAWH,EAAG,CACrB,OAAOM,EAAMN,EAAE,MAAK,EAAI,SAAUW,EAAG,CACnC,IAAIC,EAAYZ,EAAE,KAAKW,CAAC,EAEpBE,EAAO,CAAE,EAAGF,EAAE,EAAG,EAAGA,EAAE,CAAC,EAC3B,OAAKP,EAAcO,EAAE,IAAI,IACvBE,EAAK,KAAOF,EAAE,MAEXP,EAAcQ,CAAS,IAC1BC,EAAK,MAAQD,GAERC,CACT,CAAC,CACH,CC9EA,IAAIC,EAA4B,IAAI,IAChCC,EAA8B,IAAI,IAClCC,EAA0B,IAAI,IAC9BC,GAAyBC,EAAO,IAAM,CACxCH,EAAY,MAAK,EACjBC,EAAQ,MAAK,EACbF,EAAU,MAAK,CACjB,EAAG,OAAO,EACNK,EAA+BD,EAAO,CAACE,EAAIC,IAAe,CA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EAClC4G,EAAM,MAAQ,GACdA,EAAM,aAAe,OACrBA,EAAM,GAAKH,EAAS,oBACpBI,EAAQ,eAAiB,OACzBA,EAAQ,aAAe,OACvBA,EAAQ,GAAKJ,EAAS,sBACtBK,EAAM,MAAQ,GACVjH,EAAK,UACP+G,EAAM,YAAcH,EACpBK,EAAM,UAAYL,GAEpBK,EAAM,GAAKL,EAAS,oBACpBK,EAAM,eAAiB,OACvB/F,EAAM,QAAQ0F,EAAQC,EAAYE,EAAOH,EAAS,mBAAmB,EACrE1F,EAAM,QAAQ2F,EAAYC,EAAYE,EAASJ,EAAS,mBAAmB,EAC3E1F,EAAM,QAAQ4F,EAAYF,EAAQK,EAAOL,EAAS,oBAAoB,CACxE,MACE1F,EAAM,QAAQf,EAAK,MAAOA,EAAK,IAAK,CAAE,GAAGA,CAAI,EAAIA,EAAK,EAAE,CAE5D,CAAC,EACDU,EAAI,KAAK,kBAAmB,KAAK,UAAUoD,EAAoB/C,CAAK,CAAC,CAAC,EACtEwB,GAAuBxB,CAAK,EAC5BL,EAAI,KAAK,mBAAoB,KAAK,UAAUoD,EAAoB/C,CAAK,CAAC,CAAC,EACvE,MAAM8C,EAAakD,EAAS,EAC5B,MAAMtD,EACJ2C,EACArF,EACA8E,EAAY,KACZA,EAAY,UACZ,OACAhC,CACJ,CACA,EAAG,QAAQ","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"dagre-KV5264BT-DTQ94K2e.js","sources":["../../../../node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/graphlib/json.js","../../../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/dagre-KV5264BT.mjs"],"sourcesContent":["import * as _ from 'lodash-es';\nimport { Graph } from './graph.js';\n\n/**\n * @import { NodeID, EdgeObj, GraphOptions } from './graph.js';\n */\n\nexport { write, read };\n\n/**\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n *\n * @typedef {object} GraphJSON\n * @property {Required<GraphOptions>} options - The options used to create the graph.\n * @property {Array<{ v: NodeID; value?: NodeLabel; parent?: NodeID }>} nodes - The nodes in the graph.\n * @property {Array<EdgeObj & { value?: EdgeLabel }>} edges - The edges in the graph.\n * @property {GraphLabel} [value] - The graph's value, if any.\n */\n\n/**\n * Creates a JSON representation of the graph that can be serialized to a\n * string with\n * [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).\n * The graph can later be restored using {@link read}.\n *\n * @example\n *\n * ```js\n * var g = new graphlib.Graph();\n * g.setNode(\"a\", { label: \"node a\" });\n * g.setNode(\"b\", { label: \"node b\" });\n * g.setEdge(\"a\", \"b\", { label: \"edge a->b\" });\n * graphlib.json.write(g);\n * // Returns the object:\n * //\n * // {\n * // \"options\": {\n * // \"directed\": true,\n * // \"multigraph\": false,\n * // \"compound\": false\n * // },\n * // \"nodes\": [\n * // { \"v\": \"a\", \"value\": { \"label\": \"node a\" } },\n * // { \"v\": \"b\", \"value\": { \"label\": \"node b\" } }\n * // ],\n * // \"edges\": [\n * // { \"v\": \"a\", \"w\": \"b\", \"value\": { \"label\": \"edge a->b\" } }\n * // ]\n * // }\n * ```\n *\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n * @param {Graph<GraphLabel, NodeLabel, EdgeLabel>} g - The graph to serialize.\n * @returns {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} The JSON representation of the graph.\n */\nfunction write(g) {\n /** @type {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} */\n var json = {\n options: {\n directed: g.isDirected(),\n multigraph: g.isMultigraph(),\n compound: g.isCompound(),\n },\n nodes: writeNodes(g),\n edges: writeEdges(g),\n };\n if (!_.isUndefined(g.graph())) {\n json.value = _.clone(g.graph());\n }\n return json;\n}\n\n/**\n * @template NodeLabel - Label of a node.\n *\n * @param {Graph<unknown, NodeLabel, unknown>} g - The graph to serialize.\n * @returns {Array<{ v: NodeID; value?: NodeLabel; parent?: NodeID }>} The nodes in the graph.\n */\nfunction writeNodes(g) {\n return _.map(g.nodes(), function (v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\n /** @type {{ v: NodeID; value?: NodeLabel; parent?: NodeID }} */\n var node = { v: v };\n if (!_.isUndefined(nodeValue)) {\n node.value = nodeValue;\n }\n if (!_.isUndefined(parent)) {\n node.parent = parent;\n }\n return node;\n });\n}\n\n/**\n * @template EdgeLabel - Label of a node.\n *\n * @param {Graph<unknown, unknown, EdgeLabel>} g - The graph to serialize.\n * @returns {Array<EdgeObj & { value?: EdgeLabel }>} The edges in the graph.\n */\nfunction writeEdges(g) {\n return _.map(g.edges(), function (e) {\n var edgeValue = g.edge(e);\n /** @type {EdgeObj & { value?: EdgeLabel }} */\n var edge = { v: e.v, w: e.w };\n if (!_.isUndefined(e.name)) {\n edge.name = e.name;\n }\n if (!_.isUndefined(edgeValue)) {\n edge.value = edgeValue;\n }\n return edge;\n });\n}\n\n/**\n * Takes JSON as input and returns the graph representation.\n *\n * @example\n *\n * For example, if we have serialized the graph in {@link write}\n * to a string named `str`, we can restore it to a graph as follows:\n *\n * ```js\n * var g2 = graphlib.json.read(JSON.parse(str));\n * // or, in order to copy the graph\n * var g3 = graphlib.json.read(graphlib.json.write(g))\n *\n * g2.nodes();\n * // ['a', 'b']\n * g2.edges()\n * // [ { v: 'a', w: 'b' } ]\n * ```\n *\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n * @param {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} json - The JSON representation of the graph.\n * @returns {Graph<GraphLabel, NodeLabel, EdgeLabel>} The restored graph.\n */\nfunction read(json) {\n var g = new Graph(json.options).setGraph(json.value);\n _.each(json.nodes, function (entry) {\n g.setNode(entry.v, entry.value);\n if (entry.parent) {\n g.setParent(entry.v, entry.parent);\n }\n });\n _.each(json.edges, function (entry) {\n g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);\n });\n return g;\n}\n","import {\n clear as clear2,\n insertEdge,\n insertEdgeLabel,\n markers_default,\n positionEdgeLabel\n} from \"./chunk-ENJZ2VHE.mjs\";\nimport \"./chunk-BSJP7CBP.mjs\";\nimport {\n clear,\n clear2 as clear3,\n insertCluster,\n insertNode,\n positionNode,\n setNodeElem,\n updateNodeBounds\n} from \"./chunk-5FUZZQ4R.mjs\";\nimport {\n getSubGraphTitleMargins\n} from \"./chunk-ZZ45TVLE.mjs\";\nimport \"./chunk-X2U36JSP.mjs\";\nimport \"./chunk-U2HBQHQK.mjs\";\nimport \"./chunk-5PVQY5BW.mjs\";\nimport {\n getConfig2 as getConfig\n} from \"./chunk-ICPOFSXX.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/rendering-util/layout-algorithms/dagre/index.js\nimport { layout as dagreLayout } from \"dagre-d3-es/src/dagre/index.js\";\nimport * as graphlibJson2 from \"dagre-d3-es/src/graphlib/json.js\";\nimport * as graphlib2 from \"dagre-d3-es/src/graphlib/index.js\";\n\n// src/rendering-util/layout-algorithms/dagre/mermaid-graphlib.js\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\nimport * as graphlibJson from \"dagre-d3-es/src/graphlib/json.js\";\nvar clusterDb = /* @__PURE__ */ new Map();\nvar descendants = /* @__PURE__ */ new Map();\nvar parents = /* @__PURE__ */ new Map();\nvar clear4 = /* @__PURE__ */ __name(() => {\n descendants.clear();\n parents.clear();\n clusterDb.clear();\n}, \"clear\");\nvar isDescendant = /* @__PURE__ */ __name((id, ancestorId) => {\n const ancestorDescendants = descendants.get(ancestorId) || [];\n log.trace(\"In isDescendant\", ancestorId, \" \", id, \" = \", ancestorDescendants.includes(id));\n return ancestorDescendants.includes(id);\n}, \"isDescendant\");\nvar edgeInCluster = /* @__PURE__ */ __name((edge, clusterId) => {\n const clusterDescendants = descendants.get(clusterId) || [];\n log.info(\"Descendants of \", clusterId, \" is \", clusterDescendants);\n log.info(\"Edge is \", edge);\n if (edge.v === clusterId || edge.w === clusterId) {\n return false;\n }\n if (!clusterDescendants) {\n log.debug(\"Tilt, \", clusterId, \",not in descendants\");\n return false;\n }\n return clusterDescendants.includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || clusterDescendants.includes(edge.w);\n}, \"edgeInCluster\");\nvar copy = /* @__PURE__ */ __name((clusterId, graph, newGraph, rootId) => {\n log.warn(\n \"Copying children of \",\n clusterId,\n \"root\",\n rootId,\n \"data\",\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n log.warn(\"Copying (nodes) clusterId\", clusterId, \"nodes\", nodes);\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info(\"cp \", node, \" to \", rootId, \" with parent \", clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn(\"Setting parent\", node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n if (clusterId !== rootId && node !== clusterId) {\n log.debug(\"Setting parent\", node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info(\"In copy \", clusterId, \"root\", rootId, \"data\", graph.node(clusterId), rootId);\n log.debug(\n \"Not Setting parent for node=\",\n node,\n \"cluster!==rootId\",\n clusterId !== rootId,\n \"node!==clusterId\",\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug(\"Copying Edges\", edges);\n edges.forEach((edge) => {\n log.info(\"Edge\", edge);\n const data2 = graph.edge(edge.v, edge.w, edge.name);\n log.info(\"Edge data\", data2, rootId);\n try {\n if (edgeInCluster(edge, rootId)) {\n log.info(\"Copying as \", edge.v, edge.w, data2, edge.name);\n newGraph.setEdge(edge.v, edge.w, data2, edge.name);\n log.info(\"newGraph edges \", newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n \"Skipping copy of edge \",\n edge.v,\n \"-->\",\n edge.w,\n \" rootId: \",\n rootId,\n \" clusterId:\",\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug(\"Removing node\", node);\n graph.removeNode(node);\n });\n}, \"copy\");\nvar extractDescendants = /* @__PURE__ */ __name((id, graph) => {\n const children = graph.children(id);\n let res = [...children];\n for (const child of children) {\n parents.set(child, id);\n res = [...res, ...extractDescendants(child, graph)];\n }\n return res;\n}, \"extractDescendants\");\nvar findCommonEdges = /* @__PURE__ */ __name((graph, id1, id2) => {\n const edges1 = graph.edges().filter((edge) => edge.v === id1 || edge.w === id1);\n const edges2 = graph.edges().filter((edge) => edge.v === id2 || edge.w === id2);\n const edges1Prim = edges1.map((edge) => {\n return { v: edge.v === id1 ? id2 : edge.v, w: edge.w === id1 ? id1 : edge.w };\n });\n const edges2Prim = edges2.map((edge) => {\n return { v: edge.v, w: edge.w };\n });\n const result = edges1Prim.filter((edgeIn1) => {\n return edges2Prim.some((edge) => edgeIn1.v === edge.v && edgeIn1.w === edge.w);\n });\n return result;\n}, \"findCommonEdges\");\nvar findNonClusterChild = /* @__PURE__ */ __name((id, graph, clusterId) => {\n const children = graph.children(id);\n log.trace(\"Searching children of id \", id, children);\n if (children.length < 1) {\n return id;\n }\n let reserve;\n for (const child of children) {\n const _id = findNonClusterChild(child, graph, clusterId);\n const commonEdges = findCommonEdges(graph, clusterId, _id);\n if (_id) {\n if (commonEdges.length > 0) {\n reserve = _id;\n } else {\n return _id;\n }\n }\n }\n return reserve;\n}, \"findNonClusterChild\");\nvar getAnchorId = /* @__PURE__ */ __name((id) => {\n if (!clusterDb.has(id)) {\n return id;\n }\n if (!clusterDb.get(id).externalConnections) {\n return id;\n }\n if (clusterDb.has(id)) {\n return clusterDb.get(id).id;\n }\n return id;\n}, \"getAnchorId\");\nvar adjustClustersAndEdges = /* @__PURE__ */ __name((graph, depth) => {\n if (!graph || depth > 10) {\n log.debug(\"Opting out, no graph \");\n return;\n } else {\n log.debug(\"Opting in, graph \");\n }\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n \"Cluster identified\",\n id,\n \" Replacement id in edges: \",\n findNonClusterChild(id, graph, id)\n );\n descendants.set(id, extractDescendants(id, graph));\n clusterDb.set(id, { id: findNonClusterChild(id, graph, id), clusterData: graph.node(id) });\n }\n });\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug(\"Cluster identified\", id, descendants);\n edges.forEach((edge) => {\n const d1 = isDescendant(edge.v, id);\n const d2 = isDescendant(edge.w, id);\n if (d1 ^ d2) {\n log.warn(\"Edge: \", edge, \" leaves cluster \", id);\n log.warn(\"Descendants of XXX \", id, \": \", descendants.get(id));\n clusterDb.get(id).externalConnections = true;\n }\n });\n } else {\n log.debug(\"Not a cluster \", id, descendants);\n }\n });\n for (let id of clusterDb.keys()) {\n const nonClusterChild = clusterDb.get(id).id;\n const parent = graph.parent(nonClusterChild);\n if (parent !== id && clusterDb.has(parent) && !clusterDb.get(parent).externalConnections) {\n clusterDb.get(id).id = parent;\n }\n }\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(graph.edge(e)));\n let v = e.v;\n let w = e.w;\n log.warn(\n \"Fix XXX\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb.get(e.v),\n \" --- \",\n clusterDb.get(e.w)\n );\n if (clusterDb.get(e.v) || clusterDb.get(e.w)) {\n log.warn(\"Fixing and trying - removing XXX\", e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) {\n const parent = graph.parent(v);\n clusterDb.get(parent).externalConnections = true;\n edge.fromCluster = e.v;\n }\n if (w !== e.w) {\n const parent = graph.parent(w);\n clusterDb.get(parent).externalConnections = true;\n edge.toCluster = e.w;\n }\n log.warn(\"Fix Replacing with XXX\", v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn(\"Adjusted Graph\", graphlibJson.write(graph));\n extractor(graph, 0);\n log.trace(clusterDb);\n}, \"adjustClustersAndEdges\");\nvar extractor = /* @__PURE__ */ __name((graph, depth) => {\n log.warn(\"extractor - \", depth, graphlibJson.write(graph), graph.children(\"D\"));\n if (depth > 10) {\n log.error(\"Bailing out\");\n return;\n }\n let nodes = graph.nodes();\n let hasChildren = false;\n for (const node of nodes) {\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n if (!hasChildren) {\n log.debug(\"Done, no node has children\", graph.nodes());\n return;\n }\n log.debug(\"Nodes = \", nodes, depth);\n for (const node of nodes) {\n log.debug(\n \"Extracting node\",\n node,\n clusterDb,\n clusterDb.has(node) && !clusterDb.get(node).externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children(\"D\"),\n \" Depth \",\n depth\n );\n if (!clusterDb.has(node)) {\n log.debug(\"Not a cluster\", node, depth);\n } else if (!clusterDb.get(node).externalConnections && graph.children(node) && graph.children(node).length > 0) {\n log.warn(\n \"Cluster without external connections, without a parent and with children\",\n node,\n depth\n );\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === \"TB\" ? \"LR\" : \"TB\";\n if (clusterDb.get(node)?.clusterData?.dir) {\n dir = clusterDb.get(node).clusterData.dir;\n log.warn(\"Fixing dir\", clusterDb.get(node).clusterData.dir, dir);\n }\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: dir,\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n log.warn(\"Old graph before copy\", graphlibJson.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb.get(node).clusterData,\n label: clusterDb.get(node).label,\n graph: clusterGraph\n });\n log.warn(\"New graph after copy node: (\", node, \")\", graphlibJson.write(clusterGraph));\n log.debug(\"Old graph after copy\", graphlibJson.write(graph));\n } else {\n log.warn(\n \"Cluster ** \",\n node,\n \" **not meeting the criteria !externalConnections:\",\n !clusterDb.get(node).externalConnections,\n \" no parent: \",\n !graph.parent(node),\n \" children \",\n graph.children(node) && graph.children(node).length > 0,\n graph.children(\"D\"),\n depth\n );\n log.debug(clusterDb);\n }\n }\n nodes = graph.nodes();\n log.warn(\"New list of nodes\", nodes);\n for (const node of nodes) {\n const data = graph.node(node);\n log.warn(\" Now next level\", node, data);\n if (data?.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n}, \"extractor\");\nvar sorter = /* @__PURE__ */ __name((graph, nodes) => {\n if (nodes.length === 0) {\n return [];\n }\n let result = Object.assign([], nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = [...result, ...sorted];\n });\n return result;\n}, \"sorter\");\nvar sortNodesByHierarchy = /* @__PURE__ */ __name((graph) => sorter(graph, graph.children()), \"sortNodesByHierarchy\");\n\n// src/rendering-util/layout-algorithms/dagre/index.js\nvar recursiveRender = /* @__PURE__ */ __name(async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {\n log.warn(\"Graph in recursive render:XAX\", graphlibJson2.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace(\"Dir in recursive render - dir:\", dir);\n const elem = _elem.insert(\"g\").attr(\"class\", \"root\");\n if (!graph.nodes()) {\n log.info(\"No nodes found for\", graph);\n } else {\n log.info(\"Recursive render XXX\", graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.info(\"Recursive edges\", graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert(\"g\").attr(\"class\", \"clusters\");\n const edgePaths = elem.insert(\"g\").attr(\"class\", \"edgePaths\");\n const edgeLabels = elem.insert(\"g\").attr(\"class\", \"edgeLabels\");\n const nodes = elem.insert(\"g\").attr(\"class\", \"nodes\");\n await Promise.all(\n graph.nodes().map(async function(v) {\n const node = graph.node(v);\n if (parentCluster !== void 0) {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n log.trace(\n \"Setting data for parent cluster XXX\\n Node.id = \",\n v,\n \"\\n data=\",\n data.height,\n \"\\nParent cluster\",\n parentCluster.height\n );\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace(\"Setting parent\", v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info(\"(Insert) Node XXX\" + v + \": \" + JSON.stringify(graph.node(v)));\n if (node?.clusterNode) {\n log.info(\"Cluster identified XBX\", v, node.width, graph.node(v));\n const { ranksep, nodesep } = graph.graph();\n node.graph.setGraph({\n ...node.graph.graph(),\n ranksep: ranksep + 25,\n nodesep\n });\n const o = await recursiveRender(\n nodes,\n node.graph,\n diagramType,\n id,\n graph.node(v),\n siteConfig\n );\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n node.diff = o.diff || 0;\n log.info(\n \"New compound node after recursive render XAX\",\n v,\n \"width\",\n // node,\n node.width,\n \"height\",\n node.height\n // node.x,\n // node.y\n );\n setNodeElem(newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n log.trace(\n \"Cluster - the non recursive path XBX\",\n v,\n node.id,\n node,\n node.width,\n \"Graph:\",\n graph\n );\n log.trace(findNonClusterChild(node.id, graph));\n clusterDb.set(node.id, { id: findNonClusterChild(node.id, graph), node });\n } else {\n log.trace(\"Node - the non recursive path XAX\", v, nodes, graph.node(v), dir);\n await insertNode(nodes, graph.node(v), { config: siteConfig, dir });\n }\n }\n })\n );\n const processEdges = /* @__PURE__ */ __name(async () => {\n const edgePromises = graph.edges().map(async function(e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \", e, \" \", JSON.stringify(graph.edge(e)));\n log.info(\n \"Fix\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb.get(e.v),\n clusterDb.get(e.w)\n );\n await insertEdgeLabel(edgeLabels, edge);\n });\n await Promise.all(edgePromises);\n }, \"processEdges\");\n await processEdges();\n log.info(\"Graph before layout:\", JSON.stringify(graphlibJson2.write(graph)));\n log.info(\"############################################# XXX\");\n log.info(\"### Layout ### XXX\");\n log.info(\"############################################# XXX\");\n dagreLayout(graph);\n log.info(\"Graph after layout:\", JSON.stringify(graphlibJson2.write(graph)));\n let diff = 0;\n let { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n await Promise.all(\n sortNodesByHierarchy(graph).map(async function(v) {\n const node = graph.node(v);\n log.info(\n \"Position XBX => \" + v + \": (\" + node.x,\n \",\" + node.y,\n \") width: \",\n node.width,\n \" height: \",\n node.height\n );\n if (node?.clusterNode) {\n node.y += subGraphTitleTotalMargin;\n log.info(\n \"A tainted cluster node XBX1\",\n v,\n node.id,\n node.width,\n node.height,\n node.x,\n node.y,\n graph.parent(v)\n );\n clusterDb.get(node.id).node = node;\n positionNode(node);\n } else {\n if (graph.children(v).length > 0) {\n log.info(\n \"A pure cluster node XBX1\",\n v,\n node.id,\n node.x,\n node.y,\n node.width,\n node.height,\n graph.parent(v)\n );\n node.height += subGraphTitleTotalMargin;\n graph.node(node.parentId);\n const halfPadding = node?.padding / 2 || 0;\n const labelHeight = node?.labelBBox?.height || 0;\n const offsetY = labelHeight - halfPadding || 0;\n log.debug(\"OffsetY\", offsetY, \"labelHeight\", labelHeight, \"halfPadding\", halfPadding);\n await insertCluster(clusters, node);\n clusterDb.get(node.id).node = node;\n } else {\n const parent = graph.node(node.parentId);\n node.y += subGraphTitleTotalMargin / 2;\n log.info(\n \"A regular node XBX1 - using the padding\",\n node.id,\n \"parent\",\n node.parentId,\n node.width,\n node.height,\n node.x,\n node.y,\n \"offsetY\",\n node.offsetY,\n \"parent\",\n parent,\n parent?.offsetY,\n node\n );\n positionNode(node);\n }\n }\n })\n );\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(edge), edge);\n edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2);\n const startNode = graph.node(e.v);\n var endNode = graph.node(e.w);\n const paths = insertEdge(edgePaths, edge, clusterDb, diagramType, startNode, endNode, id);\n positionEdgeLabel(edge, paths);\n });\n graph.nodes().forEach(function(v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.isGroup) {\n diff = n.diff;\n }\n });\n log.warn(\"Returning from recursive render XAX\", elem, diff);\n return { elem, diff };\n}, \"recursiveRender\");\nvar render = /* @__PURE__ */ __name(async (data4Layout, svg) => {\n const graph = new graphlib2.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: data4Layout.direction,\n nodesep: data4Layout.config?.nodeSpacing || data4Layout.config?.flowchart?.nodeSpacing || data4Layout.nodeSpacing,\n ranksep: data4Layout.config?.rankSpacing || data4Layout.config?.flowchart?.rankSpacing || data4Layout.rankSpacing,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n const element = svg.select(\"g\");\n markers_default(element, data4Layout.markers, data4Layout.type, data4Layout.diagramId);\n clear3();\n clear2();\n clear();\n clear4();\n data4Layout.nodes.forEach((node) => {\n graph.setNode(node.id, { ...node });\n if (node.parentId) {\n graph.setParent(node.id, node.parentId);\n }\n });\n log.debug(\"Edges:\", data4Layout.edges);\n data4Layout.edges.forEach((edge) => {\n if (edge.start === edge.end) {\n const nodeId = edge.start;\n const specialId1 = nodeId + \"---\" + nodeId + \"---1\";\n const specialId2 = nodeId + \"---\" + nodeId + \"---2\";\n const node = graph.node(nodeId);\n graph.setNode(specialId1, {\n domId: specialId1,\n id: specialId1,\n parentId: node.parentId,\n labelStyle: \"\",\n label: \"\",\n padding: 0,\n shape: \"labelRect\",\n // shape: 'rect',\n style: \"\",\n width: 10,\n height: 10\n });\n graph.setParent(specialId1, node.parentId);\n graph.setNode(specialId2, {\n domId: specialId2,\n id: specialId2,\n parentId: node.parentId,\n labelStyle: \"\",\n padding: 0,\n // shape: 'rect',\n shape: \"labelRect\",\n label: \"\",\n style: \"\",\n width: 10,\n height: 10\n });\n graph.setParent(specialId2, node.parentId);\n const edge1 = structuredClone(edge);\n const edgeMid = structuredClone(edge);\n const edge2 = structuredClone(edge);\n edge1.label = \"\";\n edge1.arrowTypeEnd = \"none\";\n edge1.id = nodeId + \"-cyclic-special-1\";\n edgeMid.arrowTypeStart = \"none\";\n edgeMid.arrowTypeEnd = \"none\";\n edgeMid.id = nodeId + \"-cyclic-special-mid\";\n edge2.label = \"\";\n if (node.isGroup) {\n edge1.fromCluster = nodeId;\n edge2.toCluster = nodeId;\n }\n edge2.id = nodeId + \"-cyclic-special-2\";\n edge2.arrowTypeStart = \"none\";\n graph.setEdge(nodeId, specialId1, edge1, nodeId + \"-cyclic-special-0\");\n graph.setEdge(specialId1, specialId2, edgeMid, nodeId + \"-cyclic-special-1\");\n graph.setEdge(specialId2, nodeId, edge2, nodeId + \"-cyc<lic-special-2\");\n } else {\n graph.setEdge(edge.start, edge.end, { ...edge }, edge.id);\n }\n });\n log.warn(\"Graph at first:\", JSON.stringify(graphlibJson2.write(graph)));\n adjustClustersAndEdges(graph);\n log.warn(\"Graph after XAX:\", JSON.stringify(graphlibJson2.write(graph)));\n const siteConfig = getConfig();\n await recursiveRender(\n element,\n graph,\n data4Layout.type,\n data4Layout.diagramId,\n void 0,\n siteConfig\n );\n}, \"render\");\nexport {\n render\n};\n"],"names":["write","g","json","writeNodes","writeEdges","_.isUndefined","_.clone","_.map","v","nodeValue","parent","node","e","edgeValue","edge","clusterDb","descendants","parents","clear4","__name","isDescendant","id","ancestorId","ancestorDescendants","log","edgeInCluster","clusterId","clusterDescendants","copy","graph","newGraph","rootId","nodes","data","edges","data2","extractDescendants","children","res","child","findCommonEdges","id1","id2","edges1","edges2","edges1Prim","edges2Prim","edgeIn1","findNonClusterChild","reserve","_id","commonEdges","getAnchorId","adjustClustersAndEdges","depth","d1","d2","nonClusterChild","w","graphlibJson.write","extractor","hasChildren","dir","_b","_a","clusterGraph","graphlib.Graph","sorter","result","sorted","sortNodesByHierarchy","recursiveRender","_elem","diagramType","parentCluster","siteConfig","graphlibJson2.write","elem","clusters","edgePaths","edgeLabels","ranksep","nodesep","o","newEl","updateNodeBounds","setNodeElem","insertNode","edgePromises","insertEdgeLabel","dagreLayout","diff","subGraphTitleTotalMargin","getSubGraphTitleMargins","positionNode","halfPadding","labelHeight","offsetY","insertCluster","point","startNode","endNode","paths","insertEdge","positionEdgeLabel","n","render","data4Layout","svg","graphlib2.Graph","_c","_d","_f","_e","element","markers_default","clear3","clear2","clear","nodeId","specialId1","specialId2","edge1","edgeMid","edge2","getConfig"],"mappings":"uYA2DA,SAASA,EAAMC,EAAG,CAEhB,IAAIC,EAAO,CACT,QAAS,CACP,SAAUD,EAAE,WAAU,EACtB,WAAYA,EAAE,aAAY,EAC1B,SAAUA,EAAE,WAAU,CAC5B,EACI,MAAOE,GAAWF,CAAC,EACnB,MAAOG,GAAWH,CAAC,CACvB,EACE,OAAKI,EAAcJ,EAAE,MAAK,CAAE,IAC1BC,EAAK,MAAQI,EAAQL,EAAE,MAAK,CAAE,GAEzBC,CACT,CAQA,SAASC,GAAWF,EAAG,CACrB,OAAOM,EAAMN,EAAE,MAAK,EAAI,SAAUO,EAAG,CACnC,IAAIC,EAAYR,EAAE,KAAKO,CAAC,EACpBE,EAAST,EAAE,OAAOO,CAAC,EAEnBG,EAAO,CAAE,EAAGH,CAAC,EACjB,OAAKH,EAAcI,CAAS,IAC1BE,EAAK,MAAQF,GAEVJ,EAAcK,CAAM,IACvBC,EAAK,OAASD,GA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AAK,CAAC,CAAC,EACvE,MAAM8C,EAAakD,EAAS,EAC5B,MAAMtD,EACJ2C,EACArF,EACA8E,EAAY,KACZA,EAAY,UACZ,OACAhC,CACJ,CACA,EAAG,QAAQ","x_google_ignoreList":[0,1]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as x,b as C,s as f,p as y,g as B,a as T,_ as s,E as u,l as k,H as V,d as _,C as N,F as S,y as D}from"./mermaid.core-
|
|
1
|
+
import{o as x,b as C,s as f,p as y,g as B,a as T,_ as s,E as u,l as k,H as V,d as _,C as N,F as S,y as D}from"./mermaid.core-H7Dmb05b.js";import{p as $}from"./chunk-4BX2VUAB-JU2t15qH.js";import{I as A}from"./chunk-QZHKN3VN-BbECxIVF.js";import{p as H}from"./wardley-RL74JXVD-B1MU-JlC.js";import"./index-B08bCLVX.js";import"./min-CXznxZeM.js";import"./_baseUniq-CUITAAZ7.js";var l=new A(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),I=s(()=>{l.reset(),D()},"clear"),X=s(()=>l.records.stack[0],"getRoot"),z=s(()=>l.records.cnt,"getCount"),E=S.treeView,L=s(()=>u(E,N().treeView),"getConfig"),R=s((e,t)=>{for(;e<=l.records.stack[l.records.stack.length-1].level;)l.records.stack.pop();const a={id:l.records.cnt++,level:e,name:t,children:[]};l.records.stack[l.records.stack.length-1].children.push(a),l.records.stack.push(a)},"addNode"),W={clear:I,addNode:R,getRoot:X,getCount:z,getConfig:L,getAccTitle:T,getAccDescription:B,getDiagramTitle:y,setAccDescription:f,setAccTitle:C,setDiagramTitle:x},w=W,F=s(e=>{$(e,w),e.nodes.map(t=>w.addNode(t.indent?parseInt(t.indent):0,t.name))},"populate"),M={parse:s(async e=>{const t=await H("treeView",e);k.debug(t),F(t)},"parse")},Y=s((e,t,a,n,o)=>{const c=n.append("text").text(a.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:p,width:r}=c.node().getBBox(),d=p+o.paddingY*2,i=r+o.paddingX*2;c.attr("x",e+o.paddingX),c.attr("y",t+d/2),a.BBox={x:e,y:t,width:i,height:d}},"positionLabel"),b=s((e,t,a,n,o,c)=>e.append("line").attr("x1",t).attr("y1",a).attr("x2",n).attr("y2",o).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),j=s((e,t,a)=>{let n=0,o=0;const c=s((r,d,i,h)=>{const v=h*(i.rowIndent+i.paddingX);Y(v,n,d,r,i);const{height:g,width:m}=d.BBox;b(r,v-i.rowIndent,n+g/2,v,n+g/2,i.lineThickness),o=Math.max(o,v+m),n+=g},"drawNode"),p=s((r,d=0)=>{c(e,r,a,d),r.children.forEach(g=>{p(g,d+1)});const{x:i,y:h,height:v}=r.BBox;if(r.children.length){const{y:g,height:m}=r.children[r.children.length-1].BBox;b(e,i+a.paddingX,h+v,i+a.paddingX,g+m/2+a.lineThickness/2,a.lineThickness)}},"processNode");return p(t),{totalHeight:n,totalWidth:o}},"drawTree"),q=s((e,t,a,n)=>{k.debug(`Rendering treeView diagram
|
|
2
2
|
`+e);const o=n.db,c=o.getRoot(),p=o.getConfig(),r=V(t),d=r.append("g");d.attr("class","tree-view");const{totalHeight:i,totalWidth:h}=j(d,c,p);r.attr("viewBox",`-${p.lineThickness/2} 0 ${h} ${i}`),_(r,i,h,p.useMaxWidth)},"draw"),G={draw:q},J=G,K={labelFontSize:"16px",labelColor:"black",lineColor:"black"},O=s(({treeView:e})=>{const{labelFontSize:t,labelColor:a,lineColor:n}=u(K,e);return`
|
|
3
3
|
.treeView-node-label {
|
|
4
4
|
font-size: ${t};
|
|
@@ -8,4 +8,4 @@ import{o as x,b as C,s as f,p as y,g as B,a as T,_ as s,E as u,l as k,H as V,d a
|
|
|
8
8
|
stroke: ${n};
|
|
9
9
|
}
|
|
10
10
|
`},"styles"),P=O,se={db:w,renderer:J,parser:M,styles:P};export{se as diagram};
|
|
11
|
-
//# sourceMappingURL=diagram-5BDNPKRD-
|
|
11
|
+
//# sourceMappingURL=diagram-5BDNPKRD-BI7YTuYk.js.map
|
package/dist/public/assets/{diagram-5BDNPKRD-D6B3PE9C.js.map → diagram-5BDNPKRD-BI7YTuYk.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagram-5BDNPKRD-D6B3PE9C.js","sources":["../../../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5BDNPKRD.mjs"],"sourcesContent":["import {\n selectSvgElement\n} from \"./chunk-426QAEUC.mjs\";\nimport {\n populateCommonDb\n} from \"./chunk-4BX2VUAB.mjs\";\nimport {\n ImperativeState\n} from \"./chunk-QZHKN3VN.mjs\";\nimport {\n cleanAndMerge\n} from \"./chunk-5PVQY5BW.mjs\";\nimport {\n clear,\n configureSvgSize,\n defaultConfig_default,\n getAccDescription,\n getAccTitle,\n getConfig,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-ICPOFSXX.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/treeView/db.ts\nvar state = new ImperativeState(() => ({\n cnt: 1,\n stack: [\n {\n id: 0,\n level: -1,\n name: \"/\",\n children: []\n }\n ]\n}));\nvar clear2 = /* @__PURE__ */ __name(() => {\n state.reset();\n clear();\n}, \"clear\");\nvar getRoot = /* @__PURE__ */ __name(() => {\n return state.records.stack[0];\n}, \"getRoot\");\nvar getCount = /* @__PURE__ */ __name(() => state.records.cnt, \"getCount\");\nvar defaultConfig = defaultConfig_default.treeView;\nvar getConfig2 = /* @__PURE__ */ __name(() => {\n return cleanAndMerge(defaultConfig, getConfig().treeView);\n}, \"getConfig\");\nvar addNode = /* @__PURE__ */ __name((level, name) => {\n while (level <= state.records.stack[state.records.stack.length - 1].level) {\n state.records.stack.pop();\n }\n const node = {\n id: state.records.cnt++,\n level,\n name,\n children: []\n };\n state.records.stack[state.records.stack.length - 1].children.push(node);\n state.records.stack.push(node);\n}, \"addNode\");\nvar db = {\n clear: clear2,\n addNode,\n getRoot,\n getCount,\n getConfig: getConfig2,\n getAccTitle,\n getAccDescription,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n};\nvar db_default = db;\n\n// src/diagrams/treeView/parser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar populate = /* @__PURE__ */ __name((ast) => {\n populateCommonDb(ast, db_default);\n ast.nodes.map((node) => db_default.addNode(node.indent ? parseInt(node.indent) : 0, node.name));\n}, \"populate\");\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"treeView\", input);\n log.debug(ast);\n populate(ast);\n }, \"parse\")\n};\n\n// src/diagrams/treeView/renderer.ts\nvar positionLabel = /* @__PURE__ */ __name((x, y, node, domElem, config) => {\n const label = domElem.append(\"text\").text(node.name).attr(\"dominant-baseline\", \"middle\").attr(\"class\", \"treeView-node-label\");\n const { height: labelHeight, width: labelWidth } = label.node().getBBox();\n const height = labelHeight + config.paddingY * 2;\n const width = labelWidth + config.paddingX * 2;\n label.attr(\"x\", x + config.paddingX);\n label.attr(\"y\", y + height / 2);\n node.BBox = {\n x,\n y,\n width,\n height\n };\n}, \"positionLabel\");\nvar positionLine = /* @__PURE__ */ __name((domElem, x1, y1, x2, y2, lineThickness) => {\n return domElem.append(\"line\").attr(\"x1\", x1).attr(\"y1\", y1).attr(\"x2\", x2).attr(\"y2\", y2).attr(\"stroke-width\", lineThickness).attr(\"class\", \"treeView-node-line\");\n}, \"positionLine\");\nvar drawTree = /* @__PURE__ */ __name((elem, root, config) => {\n let totalHeight = 0;\n let totalWidth = 0;\n const drawNode = /* @__PURE__ */ __name((elem2, node, config2, depth) => {\n const indent = depth * (config2.rowIndent + config2.paddingX);\n positionLabel(indent, totalHeight, node, elem2, config2);\n const { height, width } = node.BBox;\n positionLine(\n elem2,\n indent - config2.rowIndent,\n totalHeight + height / 2,\n indent,\n totalHeight + height / 2,\n config2.lineThickness\n );\n totalWidth = Math.max(totalWidth, indent + width);\n totalHeight += height;\n }, \"drawNode\");\n const processNode = /* @__PURE__ */ __name((node, depth = 0) => {\n drawNode(elem, node, config, depth);\n node.children.forEach((child) => {\n processNode(child, depth + 1);\n });\n const { x, y, height } = node.BBox;\n if (node.children.length) {\n const { y: endY, height: endHeight } = node.children[node.children.length - 1].BBox;\n positionLine(\n elem,\n x + config.paddingX,\n y + height,\n x + config.paddingX,\n endY + endHeight / 2 + config.lineThickness / 2,\n config.lineThickness\n );\n }\n }, \"processNode\");\n processNode(root);\n return { totalHeight, totalWidth };\n}, \"drawTree\");\nvar draw = /* @__PURE__ */ __name((text, id, _ver, diagObj) => {\n log.debug(\"Rendering treeView diagram\\n\" + text);\n const db2 = diagObj.db;\n const root = db2.getRoot();\n const config = db2.getConfig();\n const svg = selectSvgElement(id);\n const treeElem = svg.append(\"g\");\n treeElem.attr(\"class\", \"tree-view\");\n const { totalHeight, totalWidth } = drawTree(treeElem, root, config);\n svg.attr(\"viewBox\", `-${config.lineThickness / 2} 0 ${totalWidth} ${totalHeight}`);\n configureSvgSize(svg, totalHeight, totalWidth, config.useMaxWidth);\n}, \"draw\");\nvar renderer = {\n draw\n};\nvar renderer_default = renderer;\n\n// src/diagrams/treeView/styles.ts\nvar defaultTreeViewDiagramStyles = {\n labelFontSize: \"16px\",\n labelColor: \"black\",\n lineColor: \"black\"\n};\nvar styles = /* @__PURE__ */ __name(({\n treeView\n}) => {\n const { labelFontSize, labelColor, lineColor } = cleanAndMerge(\n defaultTreeViewDiagramStyles,\n treeView\n );\n return `\n .treeView-node-label {\n font-size: ${labelFontSize};\n fill: ${labelColor};\n }\n .treeView-node-line {\n stroke: ${lineColor};\n }\n `;\n}, \"styles\");\nvar styles_default = styles;\n\n// src/diagrams/treeView/diagram.ts\nvar diagram = {\n db: db_default,\n renderer: renderer_default,\n parser,\n styles: styles_default\n};\nexport {\n diagram\n};\n"],"names":["state","ImperativeState","clear2","__name","clear","getRoot","getCount","defaultConfig","defaultConfig_default","getConfig2","cleanAndMerge","getConfig","addNode","level","name","node","db","getAccTitle","getAccDescription","getDiagramTitle","setAccDescription","setAccTitle","setDiagramTitle","db_default","populate","ast","populateCommonDb","parser","input","parse","log","positionLabel","x","y","domElem","config","label","labelHeight","labelWidth","height","width","positionLine","x1","y1","x2","y2","lineThickness","drawTree","elem","root","totalHeight","totalWidth","drawNode","elem2","config2","depth","indent","processNode","child","endY","endHeight","draw","text","id","_ver","diagObj","db2","svg","selectSvgElement","treeElem","configureSvgSize","renderer","renderer_default","defaultTreeViewDiagramStyles","styles","treeView","labelFontSize","labelColor","lineColor","styles_default","diagram"],"mappings":"qXA8BA,IAAIA,EAAQ,IAAIC,EAAgB,KAAO,CACrC,IAAK,EACL,MAAO,CACL,CACE,GAAI,EACJ,MAAO,GACP,KAAM,IACN,SAAU,CAAA,CAChB,CACA,CACA,EAAE,EACEC,EAAyBC,EAAO,IAAM,CACxCH,EAAM,MAAK,EACXI,EAAK,CACP,EAAG,OAAO,EACNC,EAA0BF,EAAO,IAC5BH,EAAM,QAAQ,MAAM,CAAC,EAC3B,SAAS,EACRM,EAA2BH,EAAO,IAAMH,EAAM,QAAQ,IAAK,UAAU,EACrEO,EAAgBC,EAAsB,SACtCC,EAA6BN,EAAO,IAC/BO,EAAcH,EAAeI,EAAS,EAAG,QAAQ,EACvD,WAAW,EACVC,EAA0BT,EAAO,CAACU,EAAOC,IAAS,CACpD,KAAOD,GAASb,EAAM,QAAQ,MAAMA,EAAM,QAAQ,MAAM,OAAS,CAAC,EAAE,OAClEA,EAAM,QAAQ,MAAM,IAAG,EAEzB,MAAMe,EAAO,CACX,GAAIf,EAAM,QAAQ,MAClB,MAAAa,EACA,KAAAC,EACA,SAAU,CAAA,CACd,EACEd,EAAM,QAAQ,MAAMA,EAAM,QAAQ,MAAM,OAAS,CAAC,EAAE,SAAS,KAAKe,CAAI,EACtEf,EAAM,QAAQ,MAAM,KAAKe,CAAI,CAC/B,EAAG,SAAS,EACRC,EAAK,CACP,MAAOd,EACP,QAAA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C,CAAI,EAC/C,MAAMI,EAAMD,EAAQ,GACdhB,EAAOiB,EAAI,QAAO,EAClB/B,EAAS+B,EAAI,UAAS,EACtBC,EAAMC,EAAiBL,CAAE,EACzBM,EAAWF,EAAI,OAAO,GAAG,EAC/BE,EAAS,KAAK,QAAS,WAAW,EAClC,KAAM,CAAE,YAAAnB,EAAa,WAAAC,CAAU,EAAKJ,EAASsB,EAAUpB,EAAMd,CAAM,EACnEgC,EAAI,KAAK,UAAW,IAAIhC,EAAO,cAAgB,CAAC,MAAMgB,CAAU,IAAID,CAAW,EAAE,EACjFoB,EAAiBH,EAAKjB,EAAaC,EAAYhB,EAAO,WAAW,CACnE,EAAG,MAAM,EACLoC,EAAW,CACb,KAAAV,CACF,EACIW,EAAmBD,EAGnBE,EAA+B,CACjC,cAAe,OACf,WAAY,QACZ,UAAW,OACb,EACIC,EAAyBvE,EAAO,CAAC,CACnC,SAAAwE,CACF,IAAM,CACJ,KAAM,CAAE,cAAAC,EAAe,WAAAC,EAAY,UAAAC,CAAS,EAAKpE,EAC/C+D,EACAE,CACJ,EACE,MAAO;AAAA;AAAA,qBAEYC,CAAa;AAAA,gBAClBC,CAAU;AAAA;AAAA;AAAA,kBAGRC,CAAS;AAAA;AAAA,KAG3B,EAAG,QAAQ,EACPC,EAAiBL,EAGjBM,GAAU,CACZ,GAAIzD,EACJ,SAAUiD,EACV,OAAA7C,EACA,OAAQoD,CACV","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"diagram-5BDNPKRD-BI7YTuYk.js","sources":["../../../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5BDNPKRD.mjs"],"sourcesContent":["import {\n selectSvgElement\n} from \"./chunk-426QAEUC.mjs\";\nimport {\n populateCommonDb\n} from \"./chunk-4BX2VUAB.mjs\";\nimport {\n ImperativeState\n} from \"./chunk-QZHKN3VN.mjs\";\nimport {\n cleanAndMerge\n} from \"./chunk-5PVQY5BW.mjs\";\nimport {\n clear,\n configureSvgSize,\n defaultConfig_default,\n getAccDescription,\n getAccTitle,\n getConfig,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-ICPOFSXX.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/treeView/db.ts\nvar state = new ImperativeState(() => ({\n cnt: 1,\n stack: [\n {\n id: 0,\n level: -1,\n name: \"/\",\n children: []\n }\n ]\n}));\nvar clear2 = /* @__PURE__ */ __name(() => {\n state.reset();\n clear();\n}, \"clear\");\nvar getRoot = /* @__PURE__ */ __name(() => {\n return state.records.stack[0];\n}, \"getRoot\");\nvar getCount = /* @__PURE__ */ __name(() => state.records.cnt, \"getCount\");\nvar defaultConfig = defaultConfig_default.treeView;\nvar getConfig2 = /* @__PURE__ */ __name(() => {\n return cleanAndMerge(defaultConfig, getConfig().treeView);\n}, \"getConfig\");\nvar addNode = /* @__PURE__ */ __name((level, name) => {\n while (level <= state.records.stack[state.records.stack.length - 1].level) {\n state.records.stack.pop();\n }\n const node = {\n id: state.records.cnt++,\n level,\n name,\n children: []\n };\n state.records.stack[state.records.stack.length - 1].children.push(node);\n state.records.stack.push(node);\n}, \"addNode\");\nvar db = {\n clear: clear2,\n addNode,\n getRoot,\n getCount,\n getConfig: getConfig2,\n getAccTitle,\n getAccDescription,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n};\nvar db_default = db;\n\n// src/diagrams/treeView/parser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar populate = /* @__PURE__ */ __name((ast) => {\n populateCommonDb(ast, db_default);\n ast.nodes.map((node) => db_default.addNode(node.indent ? parseInt(node.indent) : 0, node.name));\n}, \"populate\");\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"treeView\", input);\n log.debug(ast);\n populate(ast);\n }, \"parse\")\n};\n\n// src/diagrams/treeView/renderer.ts\nvar positionLabel = /* @__PURE__ */ __name((x, y, node, domElem, config) => {\n const label = domElem.append(\"text\").text(node.name).attr(\"dominant-baseline\", \"middle\").attr(\"class\", \"treeView-node-label\");\n const { height: labelHeight, width: labelWidth } = label.node().getBBox();\n const height = labelHeight + config.paddingY * 2;\n const width = labelWidth + config.paddingX * 2;\n label.attr(\"x\", x + config.paddingX);\n label.attr(\"y\", y + height / 2);\n node.BBox = {\n x,\n y,\n width,\n height\n };\n}, \"positionLabel\");\nvar positionLine = /* @__PURE__ */ __name((domElem, x1, y1, x2, y2, lineThickness) => {\n return domElem.append(\"line\").attr(\"x1\", x1).attr(\"y1\", y1).attr(\"x2\", x2).attr(\"y2\", y2).attr(\"stroke-width\", lineThickness).attr(\"class\", \"treeView-node-line\");\n}, \"positionLine\");\nvar drawTree = /* @__PURE__ */ __name((elem, root, config) => {\n let totalHeight = 0;\n let totalWidth = 0;\n const drawNode = /* @__PURE__ */ __name((elem2, node, config2, depth) => {\n const indent = depth * (config2.rowIndent + config2.paddingX);\n positionLabel(indent, totalHeight, node, elem2, config2);\n const { height, width } = node.BBox;\n positionLine(\n elem2,\n indent - config2.rowIndent,\n totalHeight + height / 2,\n indent,\n totalHeight + height / 2,\n config2.lineThickness\n );\n totalWidth = Math.max(totalWidth, indent + width);\n totalHeight += height;\n }, \"drawNode\");\n const processNode = /* @__PURE__ */ __name((node, depth = 0) => {\n drawNode(elem, node, config, depth);\n node.children.forEach((child) => {\n processNode(child, depth + 1);\n });\n const { x, y, height } = node.BBox;\n if (node.children.length) {\n const { y: endY, height: endHeight } = node.children[node.children.length - 1].BBox;\n positionLine(\n elem,\n x + config.paddingX,\n y + height,\n x + config.paddingX,\n endY + endHeight / 2 + config.lineThickness / 2,\n config.lineThickness\n );\n }\n }, \"processNode\");\n processNode(root);\n return { totalHeight, totalWidth };\n}, \"drawTree\");\nvar draw = /* @__PURE__ */ __name((text, id, _ver, diagObj) => {\n log.debug(\"Rendering treeView diagram\\n\" + text);\n const db2 = diagObj.db;\n const root = db2.getRoot();\n const config = db2.getConfig();\n const svg = selectSvgElement(id);\n const treeElem = svg.append(\"g\");\n treeElem.attr(\"class\", \"tree-view\");\n const { totalHeight, totalWidth } = drawTree(treeElem, root, config);\n svg.attr(\"viewBox\", `-${config.lineThickness / 2} 0 ${totalWidth} ${totalHeight}`);\n configureSvgSize(svg, totalHeight, totalWidth, config.useMaxWidth);\n}, \"draw\");\nvar renderer = {\n draw\n};\nvar renderer_default = renderer;\n\n// src/diagrams/treeView/styles.ts\nvar defaultTreeViewDiagramStyles = {\n labelFontSize: \"16px\",\n labelColor: \"black\",\n lineColor: \"black\"\n};\nvar styles = /* @__PURE__ */ __name(({\n treeView\n}) => {\n const { labelFontSize, labelColor, lineColor } = cleanAndMerge(\n defaultTreeViewDiagramStyles,\n treeView\n );\n return `\n .treeView-node-label {\n font-size: ${labelFontSize};\n fill: ${labelColor};\n }\n .treeView-node-line {\n stroke: ${lineColor};\n }\n `;\n}, \"styles\");\nvar styles_default = styles;\n\n// src/diagrams/treeView/diagram.ts\nvar diagram = {\n db: db_default,\n renderer: renderer_default,\n parser,\n styles: styles_default\n};\nexport {\n diagram\n};\n"],"names":["state","ImperativeState","clear2","__name","clear","getRoot","getCount","defaultConfig","defaultConfig_default","getConfig2","cleanAndMerge","getConfig","addNode","level","name","node","db","getAccTitle","getAccDescription","getDiagramTitle","setAccDescription","setAccTitle","setDiagramTitle","db_default","populate","ast","populateCommonDb","parser","input","parse","log","positionLabel","x","y","domElem","config","label","labelHeight","labelWidth","height","width","positionLine","x1","y1","x2","y2","lineThickness","drawTree","elem","root","totalHeight","totalWidth","drawNode","elem2","config2","depth","indent","processNode","child","endY","endHeight","draw","text","id","_ver","diagObj","db2","svg","selectSvgElement","treeElem","configureSvgSize","renderer","renderer_default","defaultTreeViewDiagramStyles","styles","treeView","labelFontSize","labelColor","lineColor","styles_default","diagram"],"mappings":"qXA8BA,IAAIA,EAAQ,IAAIC,EAAgB,KAAO,CACrC,IAAK,EACL,MAAO,CACL,CACE,GA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F,EACIW,EAAmBD,EAGnBE,EAA+B,CACjC,cAAe,OACf,WAAY,QACZ,UAAW,OACb,EACIC,EAAyBvE,EAAO,CAAC,CACnC,SAAAwE,CACF,IAAM,CACJ,KAAM,CAAE,cAAAC,EAAe,WAAAC,EAAY,UAAAC,CAAS,EAAKpE,EAC/C+D,EACAE,CACJ,EACE,MAAO;AAAA;AAAA,qBAEYC,CAAa;AAAA,gBAClBC,CAAU;AAAA;AAAA;AAAA,kBAGRC,CAAS;AAAA;AAAA,KAG3B,EAAG,QAAQ,EACPC,EAAiBL,EAGjBM,GAAU,CACZ,GAAIzD,EACJ,SAAUiD,EACV,OAAA7C,EACA,OAAQoD,CACV","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as w,I as he,C as ee,E as K,H as ue,d as pe,l as Q,b5 as P,b as fe,a as ge,o as me,p as ye,g as Se,s as ve,F as xe,b6 as be,y as we}from"./mermaid.core-sEG8CMeA.js";import{s as Ce}from"./chunk-EDXVE4YY-CjyvbsHL.js";import{p as Te}from"./chunk-4BX2VUAB-BJASz7t9.js";import{p as Le}from"./wardley-RL74JXVD-691yvuUx.js";import{s as j}from"./index-DMY07AUl.js";import{b as O}from"./defaultLocale-DX6XiGOO.js";import{o as J}from"./ordinal-Cboi1Yqb.js";import"./min-Cxji_8ZQ.js";import"./_baseUniq-Dhw8ANLN.js";import"./init-Gi6I4Gst.js";function $e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function Ae(){return this.eachAfter($e)}function Fe(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ne(t,a){for(var l=this,n=[l],r,s,d=-1;l=n.pop();)if(t.call(a,l,++d,this),r=l.children)for(s=r.length-1;s>=0;--s)n.push(r[s]);return this}function Me(t,a){for(var l=this,n=[l],r=[],s,d,h,g=-1;l=n.pop();)if(r.push(l),s=l.children)for(d=0,h=s.length;d<h;++d)n.push(s[d]);for(;l=r.pop();)t.call(a,l,++g,this);return this}function Ve(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function _e(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function ke(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=De(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function De(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function Pe(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Be(){return Array.from(this)}function Ee(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Re(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*We(){var t=this,a,l=[t],n,r,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,s=n.length;r<s;++r)l.push(n[r]);while(l.length)}function te(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Oe)):a===void 0&&(a=Ie);for(var l=new U(t),n,r=[l],s,d,h,g;n=r.pop();)if((d=a(n.data))&&(g=(d=Array.from(d)).length))for(n.children=d,h=g-1;h>=0;--h)r.push(s=d[h]=new U(d[h])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(qe)}function He(){return te(this).eachBefore(Ge)}function Ie(t){return t.children}function Oe(t){return Array.isArray(t)?t[1]:null}function Ge(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qe(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function U(t){this.data=t,this.depth=this.height=0,this.parent=null}U.prototype=te.prototype={constructor:U,count:Ae,each:Fe,eachAfter:Me,eachBefore:Ne,find:Ve,sum:_e,sort:ke,path:ze,ancestors:Pe,descendants:Be,leaves:Ee,links:Re,copy:He,[Symbol.iterator]:We};function Xe(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function q(t){return function(){return t}}function Ye(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,r){for(var s=t.children,d,h=-1,g=s.length,c=t.value&&(n-a)/t.value;++h<g;)d=s[h],d.y0=l,d.y1=r,d.x0=a,d.x1=a+=d.value*c}function Ue(t,a,l,n,r){for(var s=t.children,d,h=-1,g=s.length,c=t.value&&(r-l)/t.value;++h<g;)d=s[h],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var Ze=(1+Math.sqrt(5))/2;function Je(t,a,l,n,r,s){for(var d=[],h=a.children,g,c,u=0,b=0,i=h.length,x,S,v=a.value,p,m,M,N,z,R,V;u<i;){x=r-l,S=s-n;do p=h[b++].value;while(!p&&b<i);for(m=M=p,R=Math.max(S/x,x/S)/(v*t),V=p*p*R,z=Math.max(M/V,V/m);b<i;++b){if(p+=c=h[b].value,c<m&&(m=c),c>M&&(M=c),V=p*p*R,N=Math.max(M/V,V/m),N>z){p-=c;break}z=N}d.push(g={value:p,dice:x<S,children:h.slice(u,b)}),g.dice?je(g,l,n,r,v?n+=S*p/v:s):Ue(g,l,n,v?l+=x*p/v:r,s),v-=p,u=b}return d}const Ke=function t(a){function l(n,r,s,d,h){Je(a,n,r,s,d,h)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l}(Ze);function Qe(){var t=Ke,a=!1,l=1,n=1,r=[0],s=G,d=G,h=G,g=G,c=G;function u(i){return i.x0=i.y0=0,i.x1=l,i.y1=n,i.eachBefore(b),r=[0],a&&i.eachBefore(Ye),i}function b(i){var x=r[i.depth],S=i.x0+x,v=i.y0+x,p=i.x1-x,m=i.y1-x;p<S&&(S=p=(S+p)/2),m<v&&(v=m=(v+m)/2),i.x0=S,i.y0=v,i.x1=p,i.y1=m,i.children&&(x=r[i.depth+1]=s(i)/2,S+=c(i)-x,v+=d(i)-x,p-=h(i)-x,m-=g(i)-x,p<S&&(S=p=(S+p)/2),m<v&&(v=m=(v+m)/2),t(i,S,v,p,m))}return u.round=function(i){return arguments.length?(a=!!i,u):a},u.size=function(i){return arguments.length?(l=+i[0],n=+i[1],u):[l,n]},u.tile=function(i){return arguments.length?(t=Xe(i),u):t},u.padding=function(i){return arguments.length?u.paddingInner(i).paddingOuter(i):u.paddingInner()},u.paddingInner=function(i){return arguments.length?(s=typeof i=="function"?i:q(+i),u):s},u.paddingOuter=function(i){return arguments.length?u.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):u.paddingTop()},u.paddingTop=function(i){return arguments.length?(d=typeof i=="function"?i:q(+i),u):d},u.paddingRight=function(i){return arguments.length?(h=typeof i=="function"?i:q(+i),u):h},u.paddingBottom=function(i){return arguments.length?(g=typeof i=="function"?i:q(+i),u):g},u.paddingLeft=function(i){return arguments.length?(c=typeof i=="function"?i:q(+i),u):c},u}var E,ne=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=fe,this.getAccTitle=ge,this.setDiagramTitle=me,this.getDiagramTitle=ye,this.getAccDescription=Se,this.setAccDescription=ve}getNodes(){return this.nodes}getConfig(){const a=xe,l=ee();return K({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??(this.root=a))}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(s=>{be(s)&&(n!=null&&n.textStyles?n.textStyles.push(s):n.textStyles=[s]),n!=null&&n.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){var l;return((l=this.classes.get(a))==null?void 0:l.styles)??[]}clear(){we(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(E,"TreeMapDB"),E);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n==null?void 0:n.classSelector,n!=null&&n.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const s=l[l.length-1].node;s.children?s.children.push(r):s.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(le,"buildHierarchy");var et=w((t,a)=>{Te(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,g=tt(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],u=c.length>0?c:void 0,b={level:h,name:g,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:u};l.push(b)}const n=le(l),r=w((s,d)=>{for(const h of s)a.addNode(h,d),h.children&&h.children.length>0&&r(h.children,d+1)},"addNodesRecursively");r(n,0)},"populate"),tt=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{var a;try{const n=await Le("treemap",t);Q.debug("Treemap AST:",n);const r=(a=re.parser)==null?void 0:a.yy;if(!(r instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");et(n,r)}catch(l){throw Q.error("Error parsing treemap:",l),l}},"parse")},at=10,B=10,X=25,nt=w((t,a,l,n)=>{const r=n.db,s=r.getConfig(),d=s.padding??at,h=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=ee();if(!g)return;const u=h?30:0,b=ue(a),i=s.nodeWidth?s.nodeWidth*B:960,x=s.nodeHeight?s.nodeHeight*B:500,S=i,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),pe(b,v,S,s.useMaxWidth);let p;try{const e=s.valueFormat||",";if(e==="$0,0")p=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);p=w(f=>"$"+O(o||"")(f),"valueFormat")}else p=O(e)}catch(e){Q.error("Error creating format function:",e),p=O(",")}const m=J().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=J().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),N=J().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const z=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=te(g).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),ae=Qe().size([i,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(R),se=ae.descendants().filter(e=>e.children&&e.children.length>0),W=z.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>m(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>M(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=P({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+N(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=j(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,$=6;let A;s.showValues!==!1&&e.value?A=C-10-30-10-$:A=C-$-6;const F=Math.max(15,A),y=o.node();if(y.getComputedTextLength()>F){const T="...";let L=f;for(;L.length>0;){if(L=f.substring(0,L.length-1),L.length===0){o.text(T),y.getComputedTextLength()>F&&o.text("");break}if(o.text(L+T),y.getComputedTextLength()<=F)break}}}),s.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+N(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const ie=ae.leaves(),Y=z.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);Y.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?m(e.parent.data.name):m(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?m(e.parent.data.name):m(e.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+N(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=j(this),f=e.x1-e.x0,C=e.y1-e.y0,$=o.node(),A=4,D=f-2*A,F=C-2*A;if(D<10||F<10){o.style("display","none");return}let y=parseInt(o.style("font-size"),10);const _=8,T=28,L=.6,k=6,H=2;for(;$.getComputedTextLength()>D&&y>_;)y--,o.style("font-size",`${y}px`);let I=Math.max(k,Math.min(T,Math.round(y*L))),Z=y+H+I;for(;Z>F&&y>_&&(y--,I=Math.max(k,Math.min(T,Math.round(y*L))),!(I<k&&y===_));)o.style("font-size",`${y}px`),Z=y+H+I;o.style("font-size",`${y}px`),($.getComputedTextLength()>D||y<_||F<y)&&o.style("display","none")}),s.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+N(o.data.name)+";",C=P({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?p(o.value):"").each(function(o){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const $=j(C).select(".treemapLabel");if($.empty()||$.style("display")==="none"){f.style("display","none");return}const A=parseFloat($.style("font-size")),D=28,F=.6,y=6,_=2,T=Math.max(y,Math.min(D,Math.round(A*F)));f.style("font-size",`${T}px`);const k=(o.y1-o.y0)/2+A/2+_;f.attr("y",k);const H=o.x1-o.x0,ce=o.y1-o.y0-4,de=H-2*4;f.node().getComputedTextLength()>de||k+T>ce||T<y?f.style("display","none"):f.style("display",null)});const oe=s.diagramPadding??8;Ce(b,oe,"flowchart",(s==null?void 0:s.useMaxWidth)||!1)},"draw"),lt=w(function(t,a){return a.db.getClasses()},"getClasses"),rt={draw:nt,getClasses:lt},st={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},it=w(({treemap:t}={})=>{const a=he(),l=ee(),n=K(a,l.themeVariables),r=K(st,t),s=r.titleColor??n.titleColor,d=r.labelColor??n.textColor,h=r.valueColor??n.textColor;return`
|
|
1
|
+
import{_ as w,I as he,C as ee,E as K,H as ue,d as pe,l as Q,b5 as P,b as fe,a as ge,o as me,p as ye,g as Se,s as ve,F as xe,b6 as be,y as we}from"./mermaid.core-H7Dmb05b.js";import{s as Ce}from"./chunk-EDXVE4YY-CeAdKClT.js";import{p as Te}from"./chunk-4BX2VUAB-JU2t15qH.js";import{p as Le}from"./wardley-RL74JXVD-B1MU-JlC.js";import{s as j}from"./index-B08bCLVX.js";import{b as O}from"./defaultLocale-DX6XiGOO.js";import{o as J}from"./ordinal-Cboi1Yqb.js";import"./min-CXznxZeM.js";import"./_baseUniq-CUITAAZ7.js";import"./init-Gi6I4Gst.js";function $e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function Ae(){return this.eachAfter($e)}function Fe(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ne(t,a){for(var l=this,n=[l],r,s,d=-1;l=n.pop();)if(t.call(a,l,++d,this),r=l.children)for(s=r.length-1;s>=0;--s)n.push(r[s]);return this}function Me(t,a){for(var l=this,n=[l],r=[],s,d,h,g=-1;l=n.pop();)if(r.push(l),s=l.children)for(d=0,h=s.length;d<h;++d)n.push(s[d]);for(;l=r.pop();)t.call(a,l,++g,this);return this}function Ve(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function _e(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function ke(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=De(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function De(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function Pe(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Be(){return Array.from(this)}function Ee(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Re(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*We(){var t=this,a,l=[t],n,r,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,s=n.length;r<s;++r)l.push(n[r]);while(l.length)}function te(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Oe)):a===void 0&&(a=Ie);for(var l=new U(t),n,r=[l],s,d,h,g;n=r.pop();)if((d=a(n.data))&&(g=(d=Array.from(d)).length))for(n.children=d,h=g-1;h>=0;--h)r.push(s=d[h]=new U(d[h])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(qe)}function He(){return te(this).eachBefore(Ge)}function Ie(t){return t.children}function Oe(t){return Array.isArray(t)?t[1]:null}function Ge(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qe(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function U(t){this.data=t,this.depth=this.height=0,this.parent=null}U.prototype=te.prototype={constructor:U,count:Ae,each:Fe,eachAfter:Me,eachBefore:Ne,find:Ve,sum:_e,sort:ke,path:ze,ancestors:Pe,descendants:Be,leaves:Ee,links:Re,copy:He,[Symbol.iterator]:We};function Xe(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function q(t){return function(){return t}}function Ye(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,r){for(var s=t.children,d,h=-1,g=s.length,c=t.value&&(n-a)/t.value;++h<g;)d=s[h],d.y0=l,d.y1=r,d.x0=a,d.x1=a+=d.value*c}function Ue(t,a,l,n,r){for(var s=t.children,d,h=-1,g=s.length,c=t.value&&(r-l)/t.value;++h<g;)d=s[h],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var Ze=(1+Math.sqrt(5))/2;function Je(t,a,l,n,r,s){for(var d=[],h=a.children,g,c,u=0,b=0,i=h.length,x,S,v=a.value,p,m,M,N,z,R,V;u<i;){x=r-l,S=s-n;do p=h[b++].value;while(!p&&b<i);for(m=M=p,R=Math.max(S/x,x/S)/(v*t),V=p*p*R,z=Math.max(M/V,V/m);b<i;++b){if(p+=c=h[b].value,c<m&&(m=c),c>M&&(M=c),V=p*p*R,N=Math.max(M/V,V/m),N>z){p-=c;break}z=N}d.push(g={value:p,dice:x<S,children:h.slice(u,b)}),g.dice?je(g,l,n,r,v?n+=S*p/v:s):Ue(g,l,n,v?l+=x*p/v:r,s),v-=p,u=b}return d}const Ke=function t(a){function l(n,r,s,d,h){Je(a,n,r,s,d,h)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l}(Ze);function Qe(){var t=Ke,a=!1,l=1,n=1,r=[0],s=G,d=G,h=G,g=G,c=G;function u(i){return i.x0=i.y0=0,i.x1=l,i.y1=n,i.eachBefore(b),r=[0],a&&i.eachBefore(Ye),i}function b(i){var x=r[i.depth],S=i.x0+x,v=i.y0+x,p=i.x1-x,m=i.y1-x;p<S&&(S=p=(S+p)/2),m<v&&(v=m=(v+m)/2),i.x0=S,i.y0=v,i.x1=p,i.y1=m,i.children&&(x=r[i.depth+1]=s(i)/2,S+=c(i)-x,v+=d(i)-x,p-=h(i)-x,m-=g(i)-x,p<S&&(S=p=(S+p)/2),m<v&&(v=m=(v+m)/2),t(i,S,v,p,m))}return u.round=function(i){return arguments.length?(a=!!i,u):a},u.size=function(i){return arguments.length?(l=+i[0],n=+i[1],u):[l,n]},u.tile=function(i){return arguments.length?(t=Xe(i),u):t},u.padding=function(i){return arguments.length?u.paddingInner(i).paddingOuter(i):u.paddingInner()},u.paddingInner=function(i){return arguments.length?(s=typeof i=="function"?i:q(+i),u):s},u.paddingOuter=function(i){return arguments.length?u.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):u.paddingTop()},u.paddingTop=function(i){return arguments.length?(d=typeof i=="function"?i:q(+i),u):d},u.paddingRight=function(i){return arguments.length?(h=typeof i=="function"?i:q(+i),u):h},u.paddingBottom=function(i){return arguments.length?(g=typeof i=="function"?i:q(+i),u):g},u.paddingLeft=function(i){return arguments.length?(c=typeof i=="function"?i:q(+i),u):c},u}var E,ne=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=fe,this.getAccTitle=ge,this.setDiagramTitle=me,this.getDiagramTitle=ye,this.getAccDescription=Se,this.setAccDescription=ve}getNodes(){return this.nodes}getConfig(){const a=xe,l=ee();return K({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??(this.root=a))}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(s=>{be(s)&&(n!=null&&n.textStyles?n.textStyles.push(s):n.textStyles=[s]),n!=null&&n.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){var l;return((l=this.classes.get(a))==null?void 0:l.styles)??[]}clear(){we(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(E,"TreeMapDB"),E);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n==null?void 0:n.classSelector,n!=null&&n.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const s=l[l.length-1].node;s.children?s.children.push(r):s.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(le,"buildHierarchy");var et=w((t,a)=>{Te(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,g=tt(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],u=c.length>0?c:void 0,b={level:h,name:g,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:u};l.push(b)}const n=le(l),r=w((s,d)=>{for(const h of s)a.addNode(h,d),h.children&&h.children.length>0&&r(h.children,d+1)},"addNodesRecursively");r(n,0)},"populate"),tt=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{var a;try{const n=await Le("treemap",t);Q.debug("Treemap AST:",n);const r=(a=re.parser)==null?void 0:a.yy;if(!(r instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");et(n,r)}catch(l){throw Q.error("Error parsing treemap:",l),l}},"parse")},at=10,B=10,X=25,nt=w((t,a,l,n)=>{const r=n.db,s=r.getConfig(),d=s.padding??at,h=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=ee();if(!g)return;const u=h?30:0,b=ue(a),i=s.nodeWidth?s.nodeWidth*B:960,x=s.nodeHeight?s.nodeHeight*B:500,S=i,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),pe(b,v,S,s.useMaxWidth);let p;try{const e=s.valueFormat||",";if(e==="$0,0")p=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);p=w(f=>"$"+O(o||"")(f),"valueFormat")}else p=O(e)}catch(e){Q.error("Error creating format function:",e),p=O(",")}const m=J().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=J().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),N=J().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const z=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=te(g).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),ae=Qe().size([i,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(R),se=ae.descendants().filter(e=>e.children&&e.children.length>0),W=z.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>m(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>M(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=P({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+N(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=j(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,$=6;let A;s.showValues!==!1&&e.value?A=C-10-30-10-$:A=C-$-6;const F=Math.max(15,A),y=o.node();if(y.getComputedTextLength()>F){const T="...";let L=f;for(;L.length>0;){if(L=f.substring(0,L.length-1),L.length===0){o.text(T),y.getComputedTextLength()>F&&o.text("");break}if(o.text(L+T),y.getComputedTextLength()<=F)break}}}),s.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+N(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const ie=ae.leaves(),Y=z.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);Y.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?m(e.parent.data.name):m(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?m(e.parent.data.name):m(e.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+N(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=j(this),f=e.x1-e.x0,C=e.y1-e.y0,$=o.node(),A=4,D=f-2*A,F=C-2*A;if(D<10||F<10){o.style("display","none");return}let y=parseInt(o.style("font-size"),10);const _=8,T=28,L=.6,k=6,H=2;for(;$.getComputedTextLength()>D&&y>_;)y--,o.style("font-size",`${y}px`);let I=Math.max(k,Math.min(T,Math.round(y*L))),Z=y+H+I;for(;Z>F&&y>_&&(y--,I=Math.max(k,Math.min(T,Math.round(y*L))),!(I<k&&y===_));)o.style("font-size",`${y}px`),Z=y+H+I;o.style("font-size",`${y}px`),($.getComputedTextLength()>D||y<_||F<y)&&o.style("display","none")}),s.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+N(o.data.name)+";",C=P({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?p(o.value):"").each(function(o){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const $=j(C).select(".treemapLabel");if($.empty()||$.style("display")==="none"){f.style("display","none");return}const A=parseFloat($.style("font-size")),D=28,F=.6,y=6,_=2,T=Math.max(y,Math.min(D,Math.round(A*F)));f.style("font-size",`${T}px`);const k=(o.y1-o.y0)/2+A/2+_;f.attr("y",k);const H=o.x1-o.x0,ce=o.y1-o.y0-4,de=H-2*4;f.node().getComputedTextLength()>de||k+T>ce||T<y?f.style("display","none"):f.style("display",null)});const oe=s.diagramPadding??8;Ce(b,oe,"flowchart",(s==null?void 0:s.useMaxWidth)||!1)},"draw"),lt=w(function(t,a){return a.db.getClasses()},"getClasses"),rt={draw:nt,getClasses:lt},st={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},it=w(({treemap:t}={})=>{const a=he(),l=ee(),n=K(a,l.themeVariables),r=K(st,t),s=r.titleColor??n.titleColor,d=r.labelColor??n.textColor,h=r.valueColor??n.textColor;return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${r.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${r.sectionStrokeWidth};
|
|
@@ -22,4 +22,4 @@ import{_ as w,I as he,C as ee,E as K,H as ue,d as pe,l as Q,b5 as P,b as fe,a as
|
|
|
22
22
|
font-size: ${r.titleFontSize};
|
|
23
23
|
}
|
|
24
24
|
`},"getStyles"),ot=it,xt={parser:re,get db(){return new ne},renderer:rt,styles:ot};export{xt as diagram};
|
|
25
|
-
//# sourceMappingURL=diagram-G4DWMVQ6-
|
|
25
|
+
//# sourceMappingURL=diagram-G4DWMVQ6-CRfC6IFe.js.map
|