aitu-app 0.6.13 → 0.6.14
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/README.md +3 -3
- package/assets/{ChatMessagesArea-Btxhq7Z2.js → ChatMessagesArea-BQ33OSbv.js} +4 -4
- package/assets/DialogTaskList-D8vkITTk.js +1 -0
- package/assets/KnowledgeBaseContent-iIzzEUb9.js +143 -0
- package/assets/{ToolboxDrawer-CFAgOmIa.js → ToolboxDrawer-BUixzCAh.js} +14 -14
- package/assets/{ai-analyze-CXbDwr-F.js → ai-analyze-BSLl2uAK.js} +1 -1
- package/assets/ai-image-generation-DvTfL5Pf.js +1 -0
- package/assets/ai-video-generation-mgvQmDxU.js +5 -0
- package/assets/{arc-BVpYfX8u.js → arc-7VZa8sld.js} +1 -1
- package/assets/{arc-Vb6QIvRI.js → arc-CPYfXPW2.js} +1 -1
- package/assets/{batch-image-generation-rvn9zCP-.js → batch-image-generation-C7g9dTtb.js} +5 -5
- package/assets/{blockDiagram-38ab4fdb-CbbmIvT5.js → blockDiagram-38ab4fdb-9wKjan3w.js} +1 -1
- package/assets/{blockDiagram-38ab4fdb-CbUExfWH.js → blockDiagram-38ab4fdb-BfYiey8T.js} +1 -1
- package/assets/{c4Diagram-3d4e48cf-Db1GHdmL.js → c4Diagram-3d4e48cf-Cl1CeBZ9.js} +1 -1
- package/assets/{c4Diagram-3d4e48cf-Dw_8bcgE.js → c4Diagram-3d4e48cf-CvDzfWGg.js} +1 -1
- package/assets/channel-Dq0dBTpp.js +1 -0
- package/assets/channel-QRfYJ0c8.js +1 -0
- package/assets/{classDiagram-70f12bd4-CXXAHxeU.js → classDiagram-70f12bd4-7hx7i_r9.js} +1 -1
- package/assets/{classDiagram-70f12bd4-_p3Dnvx6.js → classDiagram-70f12bd4-C4dqbFYb.js} +1 -1
- package/assets/{classDiagram-v2-f2320105-B-9myg44.js → classDiagram-v2-f2320105-BE6EhyIR.js} +1 -1
- package/assets/{classDiagram-v2-f2320105-ChK1LfBX.js → classDiagram-v2-f2320105-BKvCao98.js} +1 -1
- package/assets/{clipper-CJLNPhZM.js → clipper-DMBYubGg.js} +1 -1
- package/assets/clone-8iorvsVH.js +1 -0
- package/assets/clone-CcaoZaCt.js +1 -0
- package/assets/{createText-2e5e7dd3-BCbwgqBS.js → createText-2e5e7dd3-B5bm44t-.js} +1 -1
- package/assets/{createText-2e5e7dd3-BGRSuPih.js → createText-2e5e7dd3-ClED10Yd.js} +1 -1
- package/assets/{edges-e0da2a9e-BoQQRKl3.js → edges-e0da2a9e-CxYbDWHf.js} +1 -1
- package/assets/{edges-e0da2a9e-1EAOsAGW.js → edges-e0da2a9e-D83AKoY_.js} +1 -1
- package/assets/{erDiagram-9861fffd-DrPXJadW.js → erDiagram-9861fffd-By6KGQIp.js} +1 -1
- package/assets/{erDiagram-9861fffd-DIqIVsjO.js → erDiagram-9861fffd-DklWxrea.js} +1 -1
- package/assets/{flowDb-956e92f1-DKdojl1Z.js → flowDb-956e92f1-B5waKznT.js} +1 -1
- package/assets/{flowDb-956e92f1-_yAXk9b2.js → flowDb-956e92f1-zlQFiVfE.js} +1 -1
- package/assets/{flowDiagram-66a62f08-Cn3BWcxJ.js → flowDiagram-66a62f08-Be1TW-l_.js} +1 -1
- package/assets/{flowDiagram-66a62f08-BSNSE1vH.js → flowDiagram-66a62f08-DN-7_2yD.js} +1 -1
- package/assets/flowDiagram-v2-96b9c2cf-Brfi4xIj.js +1 -0
- package/assets/flowDiagram-v2-96b9c2cf-CPIzTRuX.js +1 -0
- package/assets/{flowchart-elk-definition-4a651766-CkhkUOMa.js → flowchart-elk-definition-4a651766-N0AfQRnQ.js} +1 -1
- package/assets/{flowchart-elk-definition-4a651766-CtRYHypS.js → flowchart-elk-definition-4a651766-r-PtKbtF.js} +1 -1
- package/assets/{ganttDiagram-c361ad54-C-olbHti.js → ganttDiagram-c361ad54-Bht9glx_.js} +1 -1
- package/assets/{ganttDiagram-c361ad54-DWZxEumf.js → ganttDiagram-c361ad54-C2_MLBXD.js} +1 -1
- package/assets/{gitGraphDiagram-72cf32ee-DFI0WJ7k.js → gitGraphDiagram-72cf32ee-2be20W2P.js} +1 -1
- package/assets/{gitGraphDiagram-72cf32ee-Dz3X9B4S.js → gitGraphDiagram-72cf32ee-DbRkmH2_.js} +1 -1
- package/assets/{graph-BbAdRpyG.js → graph-B8wbK8JG.js} +1 -1
- package/assets/{graph-CG3zmXkL.js → graph-Cz6eZWdE.js} +1 -1
- package/assets/{grid-image-CahEQ7p7.js → grid-image-BjBUsyzw.js} +1 -1
- package/assets/{has-Cq7YuzG9.js → has-xmSj69Ai.js} +1 -1
- package/assets/{hasIn-4hPyOh4r.js → hasIn-BEuiXUL_.js} +1 -1
- package/assets/{index-3862675e-D_PJ0qZE.js → index-3862675e-B-TzDFUV.js} +1 -1
- package/assets/{index-3862675e-Cy2LJr-t.js → index-3862675e-DUv0NNEX.js} +1 -1
- package/assets/{index-pt9oZHeu.js → index-BFKE1SDS.js} +1 -1
- package/assets/{index-WyqXHNHN.js → index-BGhQ9HiC.js} +10 -10
- package/assets/{index-C1tgh8XV.js → index-BJPn-Z4H.js} +1 -1
- package/assets/{index-CqEazMaK.js → index-BJt4za3u.js} +1 -1
- package/assets/{index-D9rMZcAy.js → index-BYIrI0Fv.js} +52 -49
- package/assets/index-Bf4QGnyR.css +9 -0
- package/assets/{index-DHrV9sCt.js → index-Bi-3shgC.js} +1 -1
- package/assets/{index-BiCrE7Ci.js → index-Biha89Ph.js} +1 -1
- package/assets/{index-BDnSt0a8.js → index-C7Vp0sfc.js} +1 -1
- package/assets/{index-DtNyBFxZ.js → index-CM5A34wJ.js} +1 -1
- package/assets/{index-XoOCAjmC.js → index-CMqABmj9.js} +1 -1
- package/assets/{index-BOZ3fCzl.js → index-CURBM_KW.js} +1 -1
- package/assets/{index-B4IEsL3l.js → index-CZI4rQ66.js} +1 -1
- package/assets/{index-CYf1zrx4.js → index-Cg0P1L1n.js} +1 -1
- package/assets/{index-B9uNbnfa.js → index-Cg4DzaGJ.js} +1 -1
- package/assets/{index-BZIcMnMw.js → index-Cr7eFaRi.js} +1 -1
- package/assets/{index-7WzIC7_D.js → index-CvvgEQLL.js} +557 -519
- package/assets/index-Cz1tSwF3.css +1 -0
- package/assets/{index-Cx19IgV-.js → index-D35EPyAQ.js} +5 -5
- package/assets/{index-Dv8yvI8G.js → index-D55hpwi0.js} +1 -1
- package/assets/{index-CciPE8zM.js → index-D8hBvwzc.js} +1 -1
- package/assets/{index-BkRTZMZM.js → index-DCPnuU9X.js} +1 -1
- package/assets/{index-Bad6y32x.js → index-DFKy--AY.js} +1 -1
- package/assets/{index-Bco0OAak.js → index-DGrNJ_p2.js} +1 -1
- package/assets/{index-DUgUd4bR.js → index-DZUnWUAx.js} +1 -1
- package/assets/{index-BU3nDlFy.js → index-DergpCoU.js} +1 -1
- package/assets/{index-DBCwQvu4.js → index-Dgpls_LJ.js} +1 -1
- package/assets/{index-jHCkpoWQ.js → index-Dh9OAfqP.js} +1 -1
- package/assets/{index-Dqi7TZna.js → index-DoC8-4hw.js} +2 -2
- package/assets/{index-BQS_8NU3.js → index-DoNZZrMr.js} +1 -1
- package/assets/{index-Bfs6Q-lQ.js → index-Dwd3fQIs.js} +1 -1
- package/assets/{index-BE7n-LiY.js → index-H9okbyq7.js} +1 -1
- package/assets/{index-BOHFUhjZ.js → index-iNzLrLfW.js} +1 -1
- package/assets/index-pQpy2-r1.js +1 -0
- package/assets/{index-ICFaM7Tx.js → index-ukQeGfpm.js} +1 -1
- package/assets/{infoDiagram-f8f76790-D8T-erO4.js → infoDiagram-f8f76790-Ds4mXkkB.js} +1 -1
- package/assets/{infoDiagram-f8f76790-C0TYyx3w.js → infoDiagram-f8f76790-Xs3wpNj_.js} +1 -1
- package/assets/{inspiration-board-CiL8hKbX.js → inspiration-board-aPQmVaUX.js} +1 -1
- package/assets/{isEmpty-BoFRUVaJ.js → isEmpty-BQn8FtDD.js} +1 -1
- package/assets/{journeyDiagram-49397b02-CkmFUv6i.js → journeyDiagram-49397b02-CMj7sdKi.js} +1 -1
- package/assets/{journeyDiagram-49397b02-BHw2LUDu.js → journeyDiagram-49397b02-DAcDgbqb.js} +1 -1
- package/assets/{layers-CaY2-pH6.js → layers-D6Y5pCwe.js} +1 -1
- package/assets/{layout-CSua1dGC.js → layout-DFY48Wfc.js} +1 -1
- package/assets/{layout-D_agYVJ_.js → layout-xjQVmyNt.js} +1 -1
- package/assets/{line-CN9rNlXr.js → line-CS-j1kBY.js} +1 -1
- package/assets/{line-CxGDlzoc.js → line-CnJU8oQA.js} +1 -1
- package/assets/{linear-DKP7SWoM.js → linear-8yUIDV7f.js} +1 -1
- package/assets/{linear-CvStv2Ny.js → linear-BNtDceQW.js} +1 -1
- package/assets/{mermaid.core-DawxQi4y.js → mermaid.core-Bse-qmGl.js} +5 -5
- package/assets/{mindmap-definition-fc14e90a-BWrsnm3I.js → mindmap-definition-fc14e90a-B5pHBBH0.js} +1 -1
- package/assets/{mindmap-definition-fc14e90a-Dmo2lz3K.js → mindmap-definition-fc14e90a-BZEj0_V2.js} +1 -1
- package/assets/{photo-wall-splitter-B_WR4Rl2.js → photo-wall-splitter-DNhSfZ1J.js} +1 -1
- package/assets/pick-Bz9u-Vgl.js +1 -0
- package/assets/{pieDiagram-8a3498a8-DhrponMk.js → pieDiagram-8a3498a8-BX6EY38S.js} +1 -1
- package/assets/{pieDiagram-8a3498a8-CmbWJAb7.js → pieDiagram-8a3498a8-C2SKAWPu.js} +1 -1
- package/assets/{quadrantDiagram-120e2f19-CgIF-y-_.js → quadrantDiagram-120e2f19-C_pOTOg2.js} +1 -1
- package/assets/{quadrantDiagram-120e2f19-DOKwrvFF.js → quadrantDiagram-120e2f19-_4F-o39n.js} +1 -1
- package/assets/{requirementDiagram-deff3bca-BqbqHjdU.js → requirementDiagram-deff3bca-CZBh345Y.js} +1 -1
- package/assets/{requirementDiagram-deff3bca-CIXltTSE.js → requirementDiagram-deff3bca-DUvc5b49.js} +1 -1
- package/assets/{sankeyDiagram-04a897e0-DcPermhl.js → sankeyDiagram-04a897e0-DgwQWZaB.js} +1 -1
- package/assets/{sankeyDiagram-04a897e0-DGiABLdx.js → sankeyDiagram-04a897e0-HlGDp0fm.js} +1 -1
- package/assets/{sequenceDiagram-704730f1-piXYTUjh.js → sequenceDiagram-704730f1-CZleNxPQ.js} +1 -1
- package/assets/{sequenceDiagram-704730f1-BUXJ6XVH.js → sequenceDiagram-704730f1-HXnccUr4.js} +1 -1
- package/assets/{settings-dialog-A3AH7O45.css → settings-dialog-Bf8ExAlc.css} +1 -1
- package/assets/settings-dialog-FIIbAUlz.js +11 -0
- package/assets/{shard-sync-service-BCo2qKEA.js → shard-sync-service-BmLCs0-9.js} +1 -1
- package/assets/{stateDiagram-587899a1-Dnd2X4K4.js → stateDiagram-587899a1-BgbU_RYJ.js} +1 -1
- package/assets/{stateDiagram-587899a1-Cdfs3rRO.js → stateDiagram-587899a1-wcO67Z9P.js} +1 -1
- package/assets/{stateDiagram-v2-d93cdb3a-DtC5XSWV.js → stateDiagram-v2-d93cdb3a-CyibEwON.js} +1 -1
- package/assets/{stateDiagram-v2-d93cdb3a-lOfkWHnS.js → stateDiagram-v2-d93cdb3a-D6v0mGya.js} +1 -1
- package/assets/{styles-6aaf32cf-B_EWv7Bz.js → styles-6aaf32cf-CuwtY8aD.js} +1 -1
- package/assets/{styles-6aaf32cf-BTv8Dnxa.js → styles-6aaf32cf-DPVcUAPG.js} +1 -1
- package/assets/{styles-9a916d00-C4vTAlbK.js → styles-9a916d00-5sadXKIs.js} +1 -1
- package/assets/{styles-9a916d00-BNkP2BU4.js → styles-9a916d00-BlcdlroT.js} +1 -1
- package/assets/{styles-c10674c1-BcxLBYaC.js → styles-c10674c1-DMY3sr0M.js} +1 -1
- package/assets/{styles-c10674c1-Dp5J5JrP.js → styles-c10674c1-fyvfh0rz.js} +2 -2
- package/assets/{svgDrawCommon-08f97a94-CalbTy9V.js → svgDrawCommon-08f97a94-D99zFeK3.js} +1 -1
- package/assets/{svgDrawCommon-08f97a94-5_vuhhyn.js → svgDrawCommon-08f97a94-DCKNxHs0.js} +1 -1
- package/assets/{timeline-definition-85554ec2-DBiJ4h6g.js → timeline-definition-85554ec2-B-Hua8_V.js} +1 -1
- package/assets/{timeline-definition-85554ec2-ByBsrbAq.js → timeline-definition-85554ec2-BJFySUyi.js} +1 -1
- package/assets/{ttd-dialog-C9noZsTQ.js → ttd-dialog-D_LEovv1.js} +4 -4
- package/assets/{upload-DP5n1PVz.js → upload-DPuHWdr4.js} +1 -1
- package/assets/{video-recovery-service-DY01FcHI.js → video-recovery-service-BUo0pCsG.js} +1 -1
- package/assets/{xychartDiagram-e933f94c-CJ1NxG0K.js → xychartDiagram-e933f94c-Cf5Uc503.js} +1 -1
- package/assets/{xychartDiagram-e933f94c-CEXcS3Lw.js → xychartDiagram-e933f94c-Cu1l8Kcq.js} +1 -1
- package/changelog.json +42 -0
- package/package.json +1 -1
- package/precache-manifest.json +279 -279
- package/sw.js +4 -4
- package/version.json +29 -3
- package/assets/DialogTaskList-0I91BD1p.js +0 -1
- package/assets/KnowledgeBaseContent-CSEr1paK.js +0 -153
- package/assets/ai-image-generation-CvUX_vnh.js +0 -1
- package/assets/ai-video-generation-BgDcotXE.js +0 -5
- package/assets/channel-ChluHQU5.js +0 -1
- package/assets/channel-DQ0ggWsj.js +0 -1
- package/assets/clone-BscGHP5K.js +0 -1
- package/assets/clone-CTdvgy2F.js +0 -1
- package/assets/flowDiagram-v2-96b9c2cf-BmoA7Lrr.js +0 -1
- package/assets/flowDiagram-v2-96b9c2cf-Du5Aycbt.js +0 -1
- package/assets/index-C_Ed2LrM.js +0 -1
- package/assets/index-V8UiJyjb.css +0 -1
- package/assets/index-qP_w2VHW.css +0 -9
- package/assets/pick-C1hcXSqm.js +0 -1
- package/assets/settings-dialog-D1OnKj0y.js +0 -11
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as A,d as S,p as G}from"./styles-9a916d00-
|
|
1
|
+
import{s as A,d as S,p as G}from"./styles-9a916d00-5sadXKIs.js";import{g as v,l as y,d as B,e as W,t as $,u as M,Y as I}from"./mermaid.core-Bse-qmGl.js";import{G as Y}from"./graph-B8wbK8JG.js";import{l as O}from"./layout-DFY48Wfc.js";import{l as P}from"./line-CS-j1kBY.js";import"./index-CvvgEQLL.js";import"./array-B5oSNiGi.js";import"./path-CY0bYimO.js";let H=0;const X=function(i,a,t,o,p){const g=function(e){switch(e){case p.db.relationType.AGGREGATION:return"aggregation";case p.db.relationType.EXTENSION:return"extension";case p.db.relationType.COMPOSITION:return"composition";case p.db.relationType.DEPENDENCY:return"dependency";case p.db.relationType.LOLLIPOP:return"lollipop"}};a.points=a.points.filter(e=>!Number.isNaN(e.y));const s=a.points,c=P().x(function(e){return e.x}).y(function(e){return e.y}).curve($),n=i.append("path").attr("d",c(s)).attr("id","edge"+H).attr("class","relation");let r="";o.arrowMarkerAbsolute&&(r=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,r=r.replace(/\(/g,"\\("),r=r.replace(/\)/g,"\\)")),t.relation.lineType==1&&n.attr("class","relation dashed-line"),t.relation.lineType==10&&n.attr("class","relation dotted-line"),t.relation.type1!=="none"&&n.attr("marker-start","url("+r+"#"+g(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&n.attr("marker-end","url("+r+"#"+g(t.relation.type2)+"End)");let f,h;const x=a.points.length;let b=M.calcLabelPosition(a.points);f=b.x,h=b.y;let u,m,w,k;if(x%2!==0&&x>1){let e=M.calcCardinalityPosition(t.relation.type1!=="none",a.points,a.points[0]),d=M.calcCardinalityPosition(t.relation.type2!=="none",a.points,a.points[x-1]);y.debug("cardinality_1_point "+JSON.stringify(e)),y.debug("cardinality_2_point "+JSON.stringify(d)),u=e.x,m=e.y,w=d.x,k=d.y}if(t.title!==void 0){const e=i.append("g").attr("class","classLabel"),d=e.append("text").attr("class","label").attr("x",f).attr("y",h).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=d;const l=d.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",l.x-o.padding/2).attr("y",l.y-o.padding/2).attr("width",l.width+o.padding).attr("height",l.height+o.padding)}y.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",u).attr("y",m).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",w).attr("y",k).attr("fill","black").attr("font-size","6").text(t.relationTitle2),H++},J=function(i,a,t,o){y.debug("Rendering class ",a,t);const p=a.id,g={id:p,label:a.id,width:0,height:0},s=i.append("g").attr("id",o.db.lookUpDomId(p)).attr("class","classGroup");let c;a.link?c=s.append("svg:a").attr("xlink:href",a.link).attr("target",a.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):c=s.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let n=!0;a.annotations.forEach(function(d){const l=c.append("tspan").text("«"+d+"»");n||l.attr("dy",t.textHeight),n=!1});let r=C(a);const f=c.append("tspan").text(r).attr("class","title");n||f.attr("dy",t.textHeight);const h=c.node().getBBox().height;let x,b,u;if(a.members.length>0){x=s.append("line").attr("x1",0).attr("y1",t.padding+h+t.dividerMargin/2).attr("y2",t.padding+h+t.dividerMargin/2);const d=s.append("text").attr("x",t.padding).attr("y",h+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");n=!0,a.members.forEach(function(l){_(d,l,n,t),n=!1}),b=d.node().getBBox()}if(a.methods.length>0){u=s.append("line").attr("x1",0).attr("y1",t.padding+h+t.dividerMargin+b.height).attr("y2",t.padding+h+t.dividerMargin+b.height);const d=s.append("text").attr("x",t.padding).attr("y",h+2*t.dividerMargin+b.height+t.textHeight).attr("fill","white").attr("class","classText");n=!0,a.methods.forEach(function(l){_(d,l,n,t),n=!1})}const m=s.node().getBBox();var w=" ";a.cssClasses.length>0&&(w=w+a.cssClasses.join(" "));const e=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*t.padding).attr("height",m.height+t.padding+.5*t.dividerMargin).attr("class",w).node().getBBox().width;return c.node().childNodes.forEach(function(d){d.setAttribute("x",(e-d.getBBox().width)/2)}),a.tooltip&&c.insert("title").text(a.tooltip),x&&x.attr("x2",e),u&&u.attr("x2",e),g.width=e,g.height=m.height+t.padding+.5*t.dividerMargin,g},C=function(i){let a=i.id;return i.type&&(a+="<"+I(i.type)+">"),a},Z=function(i,a,t,o){y.debug("Rendering note ",a,t);const p=a.id,g={id:p,text:a.text,width:0,height:0},s=i.append("g").attr("id",p).attr("class","classGroup");let c=s.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const n=JSON.parse(`"${a.text}"`).split(`
|
|
2
2
|
`);n.forEach(function(x){y.debug(`Adding line: ${x}`),c.append("tspan").text(x).attr("class","title").attr("dy",t.textHeight)});const r=s.node().getBBox(),h=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",r.width+2*t.padding).attr("height",r.height+n.length*t.textHeight+t.padding+.5*t.dividerMargin).node().getBBox().width;return c.node().childNodes.forEach(function(x){x.setAttribute("x",(h-x.getBBox().width)/2)}),g.width=h,g.height=r.height+n.length*t.textHeight+t.padding+.5*t.dividerMargin,g},_=function(i,a,t,o){const{displayText:p,cssStyle:g}=a.getDisplayDetails(),s=i.append("tspan").attr("x",o.padding).text(p);g!==""&&s.attr("style",a.cssStyle),t||s.attr("dy",o.textHeight)},N={getClassTitleString:C,drawClass:J,drawEdge:X,drawNote:Z};let T={};const E=20,L=function(i){const a=Object.entries(T).find(t=>t[1].label===i);if(a)return a[0]},R=function(i){i.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),i.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},F=function(i,a,t,o){const p=v().class;T={},y.info("Rendering diagram "+i);const g=v().securityLevel;let s;g==="sandbox"&&(s=B("#i"+a));const c=g==="sandbox"?B(s.nodes()[0].contentDocument.body):B("body"),n=c.select(`[id='${a}']`);R(n);const r=new Y({multigraph:!0});r.setGraph({isMultiGraph:!0}),r.setDefaultEdgeLabel(function(){return{}});const f=o.db.getClasses(),h=Object.keys(f);for(const e of h){const d=f[e],l=N.drawClass(n,d,p,o);T[l.id]=l,r.setNode(l.id,l),y.info("Org height: "+l.height)}o.db.getRelations().forEach(function(e){y.info("tjoho"+L(e.id1)+L(e.id2)+JSON.stringify(e)),r.setEdge(L(e.id1),L(e.id2),{relation:e},e.title||"DEFAULT")}),o.db.getNotes().forEach(function(e){y.debug(`Adding note: ${JSON.stringify(e)}`);const d=N.drawNote(n,e,p,o);T[d.id]=d,r.setNode(d.id,d),e.class&&e.class in f&&r.setEdge(e.id,L(e.class),{relation:{id1:e.id,id2:e.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),O(r),r.nodes().forEach(function(e){e!==void 0&&r.node(e)!==void 0&&(y.debug("Node "+e+": "+JSON.stringify(r.node(e))),c.select("#"+(o.db.lookUpDomId(e)||e)).attr("transform","translate("+(r.node(e).x-r.node(e).width/2)+","+(r.node(e).y-r.node(e).height/2)+" )"))}),r.edges().forEach(function(e){e!==void 0&&r.edge(e)!==void 0&&(y.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(r.edge(e))),N.drawEdge(n,r.edge(e),r.edge(e).relation,p,o))});const u=n.node().getBBox(),m=u.width+E*2,w=u.height+E*2;W(n,w,m,p.useMaxWidth);const k=`${u.x-E} ${u.y-E} ${m} ${w}`;y.debug(`viewBox ${k}`),n.attr("viewBox",k)},U={draw:F},et={parser:G,db:S,renderer:U,styles:A,init:i=>{i.class||(i.class={}),i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute,S.clear()}};export{et as diagram};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as A,d as S,p as G}from"./styles-9a916d00-
|
|
1
|
+
import{s as A,d as S,p as G}from"./styles-9a916d00-BlcdlroT.js";import{g as v,l as y,d as B,e as W,t as $,u as M,_ as I}from"./index-D35EPyAQ.js";import{G as O}from"./graph-Cz6eZWdE.js";import{l as P}from"./layout-xjQVmyNt.js";import{l as X}from"./line-CnJU8oQA.js";import"./index-CvvgEQLL.js";import"./isEmpty-BQn8FtDD.js";import"./has-xmSj69Ai.js";import"./hasIn-BEuiXUL_.js";import"./pick-Bz9u-Vgl.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";let H=0;const Y=function(i,a,t,o,p){const g=function(e){switch(e){case p.db.relationType.AGGREGATION:return"aggregation";case p.db.relationType.EXTENSION:return"extension";case p.db.relationType.COMPOSITION:return"composition";case p.db.relationType.DEPENDENCY:return"dependency";case p.db.relationType.LOLLIPOP:return"lollipop"}};a.points=a.points.filter(e=>!Number.isNaN(e.y));const s=a.points,c=X().x(function(e){return e.x}).y(function(e){return e.y}).curve($),n=i.append("path").attr("d",c(s)).attr("id","edge"+H).attr("class","relation");let r="";o.arrowMarkerAbsolute&&(r=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,r=r.replace(/\(/g,"\\("),r=r.replace(/\)/g,"\\)")),t.relation.lineType==1&&n.attr("class","relation dashed-line"),t.relation.lineType==10&&n.attr("class","relation dotted-line"),t.relation.type1!=="none"&&n.attr("marker-start","url("+r+"#"+g(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&n.attr("marker-end","url("+r+"#"+g(t.relation.type2)+"End)");let f,h;const x=a.points.length;let b=M.calcLabelPosition(a.points);f=b.x,h=b.y;let u,m,w,k;if(x%2!==0&&x>1){let e=M.calcCardinalityPosition(t.relation.type1!=="none",a.points,a.points[0]),d=M.calcCardinalityPosition(t.relation.type2!=="none",a.points,a.points[x-1]);y.debug("cardinality_1_point "+JSON.stringify(e)),y.debug("cardinality_2_point "+JSON.stringify(d)),u=e.x,m=e.y,w=d.x,k=d.y}if(t.title!==void 0){const e=i.append("g").attr("class","classLabel"),d=e.append("text").attr("class","label").attr("x",f).attr("y",h).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=d;const l=d.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",l.x-o.padding/2).attr("y",l.y-o.padding/2).attr("width",l.width+o.padding).attr("height",l.height+o.padding)}y.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",u).attr("y",m).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",w).attr("y",k).attr("fill","black").attr("font-size","6").text(t.relationTitle2),H++},J=function(i,a,t,o){y.debug("Rendering class ",a,t);const p=a.id,g={id:p,label:a.id,width:0,height:0},s=i.append("g").attr("id",o.db.lookUpDomId(p)).attr("class","classGroup");let c;a.link?c=s.append("svg:a").attr("xlink:href",a.link).attr("target",a.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):c=s.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let n=!0;a.annotations.forEach(function(d){const l=c.append("tspan").text("«"+d+"»");n||l.attr("dy",t.textHeight),n=!1});let r=C(a);const f=c.append("tspan").text(r).attr("class","title");n||f.attr("dy",t.textHeight);const h=c.node().getBBox().height;let x,b,u;if(a.members.length>0){x=s.append("line").attr("x1",0).attr("y1",t.padding+h+t.dividerMargin/2).attr("y2",t.padding+h+t.dividerMargin/2);const d=s.append("text").attr("x",t.padding).attr("y",h+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");n=!0,a.members.forEach(function(l){_(d,l,n,t),n=!1}),b=d.node().getBBox()}if(a.methods.length>0){u=s.append("line").attr("x1",0).attr("y1",t.padding+h+t.dividerMargin+b.height).attr("y2",t.padding+h+t.dividerMargin+b.height);const d=s.append("text").attr("x",t.padding).attr("y",h+2*t.dividerMargin+b.height+t.textHeight).attr("fill","white").attr("class","classText");n=!0,a.methods.forEach(function(l){_(d,l,n,t),n=!1})}const m=s.node().getBBox();var w=" ";a.cssClasses.length>0&&(w=w+a.cssClasses.join(" "));const e=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*t.padding).attr("height",m.height+t.padding+.5*t.dividerMargin).attr("class",w).node().getBBox().width;return c.node().childNodes.forEach(function(d){d.setAttribute("x",(e-d.getBBox().width)/2)}),a.tooltip&&c.insert("title").text(a.tooltip),x&&x.attr("x2",e),u&&u.attr("x2",e),g.width=e,g.height=m.height+t.padding+.5*t.dividerMargin,g},C=function(i){let a=i.id;return i.type&&(a+="<"+I(i.type)+">"),a},Z=function(i,a,t,o){y.debug("Rendering note ",a,t);const p=a.id,g={id:p,text:a.text,width:0,height:0},s=i.append("g").attr("id",p).attr("class","classGroup");let c=s.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const n=JSON.parse(`"${a.text}"`).split(`
|
|
2
2
|
`);n.forEach(function(x){y.debug(`Adding line: ${x}`),c.append("tspan").text(x).attr("class","title").attr("dy",t.textHeight)});const r=s.node().getBBox(),h=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",r.width+2*t.padding).attr("height",r.height+n.length*t.textHeight+t.padding+.5*t.dividerMargin).node().getBBox().width;return c.node().childNodes.forEach(function(x){x.setAttribute("x",(h-x.getBBox().width)/2)}),g.width=h,g.height=r.height+n.length*t.textHeight+t.padding+.5*t.dividerMargin,g},_=function(i,a,t,o){const{displayText:p,cssStyle:g}=a.getDisplayDetails(),s=i.append("tspan").attr("x",o.padding).text(p);g!==""&&s.attr("style",a.cssStyle),t||s.attr("dy",o.textHeight)},N={getClassTitleString:C,drawClass:J,drawEdge:Y,drawNote:Z};let T={};const E=20,L=function(i){const a=Object.entries(T).find(t=>t[1].label===i);if(a)return a[0]},R=function(i){i.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),i.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},F=function(i,a,t,o){const p=v().class;T={},y.info("Rendering diagram "+i);const g=v().securityLevel;let s;g==="sandbox"&&(s=B("#i"+a));const c=g==="sandbox"?B(s.nodes()[0].contentDocument.body):B("body"),n=c.select(`[id='${a}']`);R(n);const r=new O({multigraph:!0});r.setGraph({isMultiGraph:!0}),r.setDefaultEdgeLabel(function(){return{}});const f=o.db.getClasses(),h=Object.keys(f);for(const e of h){const d=f[e],l=N.drawClass(n,d,p,o);T[l.id]=l,r.setNode(l.id,l),y.info("Org height: "+l.height)}o.db.getRelations().forEach(function(e){y.info("tjoho"+L(e.id1)+L(e.id2)+JSON.stringify(e)),r.setEdge(L(e.id1),L(e.id2),{relation:e},e.title||"DEFAULT")}),o.db.getNotes().forEach(function(e){y.debug(`Adding note: ${JSON.stringify(e)}`);const d=N.drawNote(n,e,p,o);T[d.id]=d,r.setNode(d.id,d),e.class&&e.class in f&&r.setEdge(e.id,L(e.class),{relation:{id1:e.id,id2:e.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),P(r),r.nodes().forEach(function(e){e!==void 0&&r.node(e)!==void 0&&(y.debug("Node "+e+": "+JSON.stringify(r.node(e))),c.select("#"+(o.db.lookUpDomId(e)||e)).attr("transform","translate("+(r.node(e).x-r.node(e).width/2)+","+(r.node(e).y-r.node(e).height/2)+" )"))}),r.edges().forEach(function(e){e!==void 0&&r.edge(e)!==void 0&&(y.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(r.edge(e))),N.drawEdge(n,r.edge(e),r.edge(e).relation,p,o))});const u=n.node().getBBox(),m=u.width+E*2,w=u.height+E*2;W(n,w,m,p.useMaxWidth);const k=`${u.x-E} ${u.y-E} ${m} ${w}`;y.debug(`viewBox ${k}`),n.attr("viewBox",k)},U={draw:F},nt={parser:G,db:S,renderer:U,styles:A,init:i=>{i.class||(i.class={}),i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute,S.clear()}};export{nt as diagram};
|
package/assets/{classDiagram-v2-f2320105-B-9myg44.js → classDiagram-v2-f2320105-BE6EhyIR.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as M,d as _,p as R}from"./styles-9a916d00-
|
|
1
|
+
import{s as M,d as _,p as R}from"./styles-9a916d00-5sadXKIs.js";import{l as d,g as c,d as w,u as B,_ as G,k as D,$ as E,a0 as C,a1 as $}from"./mermaid.core-Bse-qmGl.js";import{G as z}from"./graph-B8wbK8JG.js";import{r as P}from"./index-3862675e-DUv0NNEX.js";import"./layout-DFY48Wfc.js";import"./index-CvvgEQLL.js";import"./clone-8iorvsVH.js";import"./edges-e0da2a9e-CxYbDWHf.js";import"./createText-2e5e7dd3-B5bm44t-.js";import"./line-CS-j1kBY.js";import"./array-B5oSNiGi.js";import"./path-CY0bYimO.js";const S=s=>D.sanitizeText(s,c());let k={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const q=function(s,t,y,a){const e=Object.keys(s);d.info("keys:",e),d.info(s),e.forEach(function(i){var o,r;const l=s[i],p={shape:"rect",id:l.id,domId:l.domId,labelText:S(l.id),labelStyle:"",style:"fill: none; stroke: black",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};t.setNode(l.id,p),A(l.classes,t,y,a,l.id),d.info("setNode",p)})},A=function(s,t,y,a,e){const i=Object.keys(s);d.info("keys:",i),d.info(s),i.filter(o=>s[o].parent==e).forEach(function(o){var r,l;const n=s[o],p=n.cssClasses.join(" "),f=E(n.styles),m=n.label??n.id,u=0,b={labelStyle:f.labelStyle,shape:"class_box",labelText:S(m),classData:n,rx:u,ry:u,class:p,style:f.style,id:n.id,domId:n.domId,tooltip:a.db.getTooltip(n.id,e)||"",haveCallback:n.haveCallback,link:n.link,width:n.type==="group"?500:void 0,type:n.type,padding:((r=c().flowchart)==null?void 0:r.padding)??((l=c().class)==null?void 0:l.padding)};t.setNode(n.id,b),e&&t.setParent(n.id,e),d.info("setNode",b)})},F=function(s,t,y,a){d.info(s),s.forEach(function(e,i){var o,r;const l=e,n="",p={labelStyle:"",style:""},f=l.text,m=0,h={labelStyle:p.labelStyle,shape:"note",labelText:S(f),noteData:l,rx:m,ry:m,class:n,style:p.style,id:l.id,domId:l.id,tooltip:"",type:"note",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};if(t.setNode(l.id,h),d.info("setNode",h),!l.class||!(l.class in a))return;const b=y+i,x={id:`edgeNote${b}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:C(k.curve,$)};t.setEdge(l.id,l.class,x,b)})},H=function(s,t){const y=c().flowchart;let a=0;s.forEach(function(e){var i;a++;const o={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${a}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:N(e.relation.type1),arrowTypeEnd:N(e.relation.type2),style:"fill:none",labelStyle:"",curve:C(y==null?void 0:y.curve,$)};if(d.info(o,e),e.style!==void 0){const r=E(e.style);o.style=r.style,o.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",((i=c().flowchart)==null?void 0:i.htmlLabels)??c().htmlLabels?(o.labelType="html",o.label='<span class="edgeLabel">'+e.text+"</span>"):(o.labelType="text",o.label=e.text.replace(D.lineBreakRegex,`
|
|
2
2
|
`),e.style===void 0&&(o.style=o.style||"stroke: #333; stroke-width: 1.5px;fill:none"),o.labelStyle=o.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,o,a)})},V=function(s){k={...k,...s}},W=async function(s,t,y,a){d.info("Drawing class - ",t);const e=c().flowchart??c().class,i=c().securityLevel;d.info("config:",e);const o=(e==null?void 0:e.nodeSpacing)??50,r=(e==null?void 0:e.rankSpacing)??50,l=new z({multigraph:!0,compound:!0}).setGraph({rankdir:a.db.getDirection(),nodesep:o,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=a.db.getNamespaces(),p=a.db.getClasses(),f=a.db.getRelations(),m=a.db.getNotes();d.info(f),q(n,l,t,a),A(p,l,t,a),H(f,l),F(m,l,f.length+1,p);let u;i==="sandbox"&&(u=w("#i"+t));const h=i==="sandbox"?w(u.nodes()[0].contentDocument.body):w("body"),b=h.select(`[id="${t}"]`),x=h.select("#"+t+" g");if(await P(x,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),B.insertTitle(b,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,a.db.getDiagramTitle()),G(l,b,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const T=i==="sandbox"?u.nodes()[0].contentDocument:document,I=T.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const g of I){const L=g.getBBox(),v=T.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",L.width),v.setAttribute("height",L.height),g.insertBefore(v,g.firstChild)}}};function N(s){let t;switch(s){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}const J={setConf:V,draw:W},se={parser:R,db:_,renderer:J,styles:M,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,_.clear()}};export{se as diagram};
|
package/assets/{classDiagram-v2-f2320105-ChK1LfBX.js → classDiagram-v2-f2320105-BKvCao98.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as M,d as _,p as R}from"./styles-9a916d00-
|
|
1
|
+
import{s as M,d as _,p as R}from"./styles-9a916d00-BlcdlroT.js";import{l as d,g as c,d as w,u as B,$ as G,k as D,a0 as E,a1 as C,a2 as $}from"./index-D35EPyAQ.js";import{G as z}from"./graph-Cz6eZWdE.js";import{r as P}from"./index-3862675e-B-TzDFUV.js";import"./layout-xjQVmyNt.js";import"./index-CvvgEQLL.js";import"./isEmpty-BQn8FtDD.js";import"./has-xmSj69Ai.js";import"./hasIn-BEuiXUL_.js";import"./clone-CcaoZaCt.js";import"./edges-e0da2a9e-D83AKoY_.js";import"./createText-2e5e7dd3-ClED10Yd.js";import"./index-CURBM_KW.js";import"./line-CnJU8oQA.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./pick-Bz9u-Vgl.js";const S=s=>D.sanitizeText(s,c());let k={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const q=function(s,e,y,a){const t=Object.keys(s);d.info("keys:",t),d.info(s),t.forEach(function(i){var o,r;const l=s[i],p={shape:"rect",id:l.id,domId:l.domId,labelText:S(l.id),labelStyle:"",style:"fill: none; stroke: black",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};e.setNode(l.id,p),A(l.classes,e,y,a,l.id),d.info("setNode",p)})},A=function(s,e,y,a,t){const i=Object.keys(s);d.info("keys:",i),d.info(s),i.filter(o=>s[o].parent==t).forEach(function(o){var r,l;const n=s[o],p=n.cssClasses.join(" "),f=E(n.styles),m=n.label??n.id,u=0,b={labelStyle:f.labelStyle,shape:"class_box",labelText:S(m),classData:n,rx:u,ry:u,class:p,style:f.style,id:n.id,domId:n.domId,tooltip:a.db.getTooltip(n.id,t)||"",haveCallback:n.haveCallback,link:n.link,width:n.type==="group"?500:void 0,type:n.type,padding:((r=c().flowchart)==null?void 0:r.padding)??((l=c().class)==null?void 0:l.padding)};e.setNode(n.id,b),t&&e.setParent(n.id,t),d.info("setNode",b)})},F=function(s,e,y,a){d.info(s),s.forEach(function(t,i){var o,r;const l=t,n="",p={labelStyle:"",style:""},f=l.text,m=0,h={labelStyle:p.labelStyle,shape:"note",labelText:S(f),noteData:l,rx:m,ry:m,class:n,style:p.style,id:l.id,domId:l.id,tooltip:"",type:"note",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};if(e.setNode(l.id,h),d.info("setNode",h),!l.class||!(l.class in a))return;const b=y+i,x={id:`edgeNote${b}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:C(k.curve,$)};e.setEdge(l.id,l.class,x,b)})},H=function(s,e){const y=c().flowchart;let a=0;s.forEach(function(t){var i;a++;const o={classes:"relation",pattern:t.relation.lineType==1?"dashed":"solid",id:`id_${t.id1}_${t.id2}_${a}`,arrowhead:t.type==="arrow_open"?"none":"normal",startLabelRight:t.relationTitle1==="none"?"":t.relationTitle1,endLabelLeft:t.relationTitle2==="none"?"":t.relationTitle2,arrowTypeStart:N(t.relation.type1),arrowTypeEnd:N(t.relation.type2),style:"fill:none",labelStyle:"",curve:C(y==null?void 0:y.curve,$)};if(d.info(o,t),t.style!==void 0){const r=E(t.style);o.style=r.style,o.labelStyle=r.labelStyle}t.text=t.title,t.text===void 0?t.style!==void 0&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",((i=c().flowchart)==null?void 0:i.htmlLabels)??c().htmlLabels?(o.labelType="html",o.label='<span class="edgeLabel">'+t.text+"</span>"):(o.labelType="text",o.label=t.text.replace(D.lineBreakRegex,`
|
|
2
2
|
`),t.style===void 0&&(o.style=o.style||"stroke: #333; stroke-width: 1.5px;fill:none"),o.labelStyle=o.labelStyle.replace("color:","fill:"))),e.setEdge(t.id1,t.id2,o,a)})},V=function(s){k={...k,...s}},W=async function(s,e,y,a){d.info("Drawing class - ",e);const t=c().flowchart??c().class,i=c().securityLevel;d.info("config:",t);const o=(t==null?void 0:t.nodeSpacing)??50,r=(t==null?void 0:t.rankSpacing)??50,l=new z({multigraph:!0,compound:!0}).setGraph({rankdir:a.db.getDirection(),nodesep:o,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=a.db.getNamespaces(),p=a.db.getClasses(),f=a.db.getRelations(),m=a.db.getNotes();d.info(f),q(n,l,e,a),A(p,l,e,a),H(f,l),F(m,l,f.length+1,p);let u;i==="sandbox"&&(u=w("#i"+e));const h=i==="sandbox"?w(u.nodes()[0].contentDocument.body):w("body"),b=h.select(`[id="${e}"]`),x=h.select("#"+e+" g");if(await P(x,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),B.insertTitle(b,"classTitleText",(t==null?void 0:t.titleTopMargin)??5,a.db.getDiagramTitle()),G(l,b,t==null?void 0:t.diagramPadding,t==null?void 0:t.useMaxWidth),!(t!=null&&t.htmlLabels)){const T=i==="sandbox"?u.nodes()[0].contentDocument:document,I=T.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const g of I){const L=g.getBBox(),v=T.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",L.width),v.setAttribute("height",L.height),g.insertBefore(v,g.firstChild)}}};function N(s){let e;switch(s){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}const J={setConf:V,draw:W},ct={parser:R,db:_,renderer:J,styles:M,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,_.clear()}};export{ct as diagram};
|