From a106f1c4895ab7bccf9ea063b91c411f7d896157 Mon Sep 17 00:00:00 2001 From: welpo Date: Mon, 9 Sep 2024 15:39:46 +0200 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20chore(deps):=20upgrade=20m?= =?UTF-8?q?ermaid=20to=20v11.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.2.0 Source: https://cdn.jsdelivr.net/npm/mermaid@11.2.0/dist/mermaid.min.js --- static/js/mermaid.min.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/js/mermaid.min.js b/static/js/mermaid.min.js index d6a8b06..d64c2c5 100644 --- a/static/js/mermaid.min.js +++ b/static/js/mermaid.min.js @@ -1024,7 +1024,7 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l fill: ${t.titleColor||t.textColor}; font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); } -`,"getStyles"),ppt=dpt}),ypt={};J(ypt,{diagram:()=>vpt});var vpt,xpt,bpt,wpt,kpt,Tpt,Ept,_pt,Cpt,Spt=t(()=>{Pdt(),gpt(),fpt(),mpt(),vpt={parser:Ddt,db:ipt,renderer:upt,styles:ppt}}),Apt=t(()=>{cut(),e(),xpt={parse:Ae(async t=>{t=await aut("info",t),R.debug(t)},"parse")}}),Lpt=t(()=>{bpt="11.1.1"}),Npt=t(()=>{Lpt(),wpt={version:bpt},kpt=Ae(()=>wpt.version,"getVersion"),Tpt={getVersion:kpt}}),Ipt=t(()=>{Q3(),i(),Ept=Ae(t=>{let e=D().securityLevel,r=O("body");var n;return"sandbox"===e&&(n=O("#i"+t).node()?.contentDocument??document,r=O(n.body)),r.select("#"+t)},"selectSvgElement")}),Mpt=t(()=>{e(),Ipt(),ec(),_pt=Ae((t,e,r)=>{R.debug(`rendering info diagram +`,"getStyles"),ppt=dpt}),ypt={};J(ypt,{diagram:()=>vpt});var vpt,xpt,bpt,wpt,kpt,Tpt,Ept,_pt,Cpt,Spt=t(()=>{Pdt(),gpt(),fpt(),mpt(),vpt={parser:Ddt,db:ipt,renderer:upt,styles:ppt}}),Apt=t(()=>{cut(),e(),xpt={parse:Ae(async t=>{t=await aut("info",t),R.debug(t)},"parse")}}),Lpt=t(()=>{bpt="11.2.0"}),Npt=t(()=>{Lpt(),wpt={version:bpt},kpt=Ae(()=>wpt.version,"getVersion"),Tpt={getVersion:kpt}}),Ipt=t(()=>{Q3(),i(),Ept=Ae(t=>{let e=D().securityLevel,r=O("body");var n;return"sandbox"===e&&(n=O("#i"+t).node()?.contentDocument??document,r=O(n.body)),r.select("#"+t)},"selectSvgElement")}),Mpt=t(()=>{e(),Ipt(),ec(),_pt=Ae((t,e,r)=>{R.debug(`rendering info diagram `+t),t=Ept(e),Vl(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text("v"+r)},"draw"),Cpt={draw:_pt}}),Rpt={};J(Rpt,{diagram:()=>Dpt});var Dpt,Opt,Ppt,Bpt,Fpt,$pt,zpt,Gpt,Upt,qpt,Ypt,jpt,Hpt,Wpt,Vpt,Xpt,Kpt,Zpt,Qpt,Jpt=t(()=>{Apt(),Npt(),Mpt(),Dpt={parser:xpt,db:Tpt,renderer:Cpt}}),t1t=t(()=>{e(),fh(),Nn(),$pt=xr.pie,Opt={sections:new Map,showData:!1,config:$pt},Ppt=Opt.sections,Bpt=Opt.showData,Fpt=structuredClone($pt),$pt=Ae(()=>structuredClone(Fpt),"getConfig"),zpt=Ae(()=>{Ppt=new Map,Bpt=Opt.showData,lc()},"clear"),Gpt=Ae(({label:t,value:e})=>{Ppt.has(t)||(Ppt.set(t,e),R.debug(`added new section: ${t}, with value: `+e))},"addSection"),Upt=Ae(()=>Ppt,"getSections"),qpt=Ae(t=>{Bpt=t},"setShowData"),Ypt=Ae(()=>Bpt,"getShowData"),jpt={getConfig:$pt,clear:zpt,setDiagramTitle:pc,getDiagramTitle:gc,setAccTitle:cc,getAccTitle:hc,setAccDescription:uc,getAccDescription:dc,addSection:Gpt,getSections:Upt,setShowData:qpt,getShowData:Ypt}}),e1t=t(()=>{cut(),e(),put(),t1t(),Hpt=Ae((t,e)=>{hut(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),Wpt={parse:Ae(async t=>{t=await aut("pie",t),R.debug(t),Hpt(t,jpt)},"parse")}}),r1t=t(()=>{Vpt=Ae(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; @@ -2097,8 +2097,8 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l -webkit-box-orient: vertical; } `,"getStyles"),yMt=mMt}),SMt=jMt((r,n)=>{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function n(){}Ae(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){var n,i=r(2),a=r(8),o=r(9);function s(t,e,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(n in Ae(s,"LEdge"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){function n(t){this.vGraphObject=t}Ae(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),o=r(13),s=r(0),l=r(16),c=r(5);function h(t,e,r,n){i.call(this,n=null==r&&null==n?e:n),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new o(e.x,e.y,r.width,r.height):new o}for(n in Ae(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.target==e){if(t.source!=n)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.source!=n&&t.target!=n)throw"Incorrect edge source and/or target";t.target!=e&&t.source!=e||r.push(t)}),r},h.prototype.getNeighborsList=function(){var e=new Set,r=this;return r.edges.forEach(function(t){if(t.source==r)e.add(t.target);else{if(t.target!=r)throw"Incorrect incidency!";e.add(t.source)}}),e},h.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),r=0;rt?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(t+this.labelWidth)),this.labelHeight)&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(e+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>e?(this.rect.y-=(this.labelHeight-e)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(e+this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY),(r=this.rect.y)>s.WORLD_BOUNDARY?r=s.WORLD_BOUNDARY:r<-s.WORLD_BOUNDARY&&(r=-s.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);this.setLocation(r.x,r.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=h},function(t,e,r){var n,i=r(0);function a(){}for(n in Ae(a,"FDLayoutConstants"),i)a[n]=i[n];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT=3*(a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=a},function(t,e,r){function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}Ae(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,r){var n,i=r(2),d=r(10),a=r(0),o=r(7),s=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(t,e,r){i.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof o?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(n in Ae(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(t,e,r){if(null==e&&null==r){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,i.forEach(function(t){t.owner==e&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,r){var c,h=r(1);function n(t){c=r(6),this.layout=t,this.graphs=[],this.edges=[]}Ae(n,"LGraphManager"),n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},n.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()))),e=(a=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:a)*r[0],t=r[1]/a;r[0]p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-p.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(t-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*(1-p.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),r=0;rthis.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||s>=a[0].length))for(var l=0;l=this.s[u+1]);){var R=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=R,uMath.abs(e)?(r=e/t,Math.abs(t)*Math.sqrt(1+r*r)):0!=e?(r=t/e,Math.abs(e)*Math.sqrt(1+r*r)):0},t.exports=At},function(t,e,r){var n,i;function a(t,e){for(var r=0;r{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(SMt()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(SMt()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(e){return n={45:(t,e,r)=>{var n={};n.layoutBase=r(551),n.CoSEConstants=r(806),n.CoSEEdge=r(767),n.CoSEGraph=r(880),n.CoSEGraphManager=r(578),n.CoSELayout=r(765),n.CoSENode=r(991),n.ConstraintHandler=r(902),t.exports=n},806:(t,e,r)=>{var n,i=r(551).FDLayoutConstants;function a(){}for(n in Ae(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,t.exports=a},767:(t,e,r)=>{var n,i=r(551).FDLayoutEdge;function a(t,e,r){i.call(this,t,e,r)}for(n in Ae(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},880:(t,e,r)=>{var n,i=r(551).LGraph;function a(t,e,r){i.call(this,t,e,r)}for(n in Ae(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},578:(t,e,r)=>{var n,i=r(551).LGraphManager;function a(t){i.call(this,t)}for(n in Ae(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},765:(t,e,r)=>{var n,i=r(551).FDLayout,a=r(578),o=r(880),h=r(991),s=r(767),f=r(806),l=r(902),m=r(551).FDLayoutConstants,u=r(551).LayoutConstants,d=r(551).Point,p=r(551).PointD,c=r(551).DimensionD,g=r(551).Layout,y=r(551).Integer,v=r(551).IGeometry,x=r(551).LGraph,b=r(551).Transform,w=r(551).LinkedList;function k(){i.call(this),this.toBeTiled={},this.constraints={}}for(n in Ae(k,"CoSELayout"),k.prototype=Object.create(i.prototype),i)k[n]=i[n];k.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t},k.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},k.prototype.newNode=function(t){return new h(this.graphManager,t)},k.prototype.newEdge=function(t){return new s(null,null,t)},k.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(f.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=f.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=f.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=m.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=m.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},k.prototype.initSpringEmbedder=function(){i.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},k.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},k.prototype.classicLayout=function(){var t,e,r;return this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental?f.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(t=this.getFlatForest()).length?this.positionNodesRadially(t):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),0=2*t.length/3;n--)e=Math.floor(Math.random()*(n+1)),r=t[n],t[n]=t[e],t[e]=r;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.right,o.nodesInRelativeHorizontal.includes(r)||(o.nodesInRelativeHorizontal.push(r),o.nodeToRelativeConstraintMapHorizontal.set(r,[]),o.dummyToNodeForVerticalAlignment.has(r)?o.nodeToTempPositionMapHorizontal.set(r,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(r,o.idToNodeMap.get(r).getCenterX())),o.nodesInRelativeHorizontal.includes(e)||(o.nodesInRelativeHorizontal.push(e),o.nodeToRelativeConstraintMapHorizontal.set(e,[]),o.dummyToNodeForVerticalAlignment.has(e)?o.nodeToTempPositionMapHorizontal.set(e,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(e)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(e,o.idToNodeMap.get(e).getCenterX())),o.nodeToRelativeConstraintMapHorizontal.get(r).push({right:e,gap:t.gap}),o.nodeToRelativeConstraintMapHorizontal.get(e).push({left:r,gap:t.gap})):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,o.nodesInRelativeVertical.includes(e)||(o.nodesInRelativeVertical.push(e),o.nodeToRelativeConstraintMapVertical.set(e,[]),o.dummyToNodeForHorizontalAlignment.has(e)?o.nodeToTempPositionMapVertical.set(e,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(e)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(e,o.idToNodeMap.get(e).getCenterY())),o.nodesInRelativeVertical.includes(r)||(o.nodesInRelativeVertical.push(r),o.nodeToRelativeConstraintMapVertical.set(r,[]),o.dummyToNodeForHorizontalAlignment.has(r)?o.nodeToTempPositionMapVertical.set(r,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(r,o.idToNodeMap.get(r).getCenterY())),o.nodeToRelativeConstraintMapVertical.get(e).push({bottom:r,gap:t.gap}),o.nodeToRelativeConstraintMapVertical.get(r).push({top:e,gap:t.gap}))})):(a=new Map,s=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.right,a.has(r)?a.get(r).push(e):a.set(r,[e]),a.has(e)?a.get(e).push(r):a.set(e,[r])):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,s.has(e)?s.get(e).push(r):s.set(e,[r]),s.has(r)?s.get(r).push(e):s.set(r,[e]))}),c=(l=Ae(function(n,i){var a=[],o=[],s=new w,l=new Set,c=0;return n.forEach(function(t,e){if(!l.has(e)){for(a[c]=[],o[c]=!1,s.push(r=e),l.add(r),a[c].push(r);0!=s.length;){var r=s.shift();i.has(r)&&(o[c]=!0),n.get(r).forEach(function(t){l.has(t)||(s.push(t),l.add(t),a[c].push(t))})}c++}}),{components:a,isFixed:o}},"constructComponents"))(a,o.fixedNodesOnHorizontal),this.componentsOnHorizontal=c.components,this.fixedComponentsOnHorizontal=c.isFixed,c=l(s,o.fixedNodesOnVertical),this.componentsOnVertical=c.components,this.fixedComponentsOnVertical=c.isFixed)}},k.prototype.updateDisplacements=function(){var i=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){(t=i.idToNodeMap.get(t.nodeId)).displacementX=0,t.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,e=0;en&&(n=Math.floor(o.y)),a=Math.floor(o.x+f.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-o.x/2,u.WORLD_CENTER_Y-o.y/2))},k.radialLayout=function(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),f.DEFAULT_RADIAL_SEPARATION),e=(k.branchRadialLayout(e,null,0,359,0,n),x.calculateBounds(t)),i=new b;i.setDeviceOrgX(e.getMinX()),i.setDeviceOrgY(e.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;at?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;0<=t;t--){var e=this.compoundOrder[t],r=e.id,n=e.paddingLeft,i=e.paddingTop,a=e.labelMarginLeft,o=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,n,i,a,o)}},k.prototype.repopulateZeroDegreeMembers=function(){var o=this,s=this.tiledZeroDegreePack;Object.keys(s).forEach(function(t){var e=o.idToDummyNode[t],r=e.paddingLeft,n=e.paddingTop,i=e.labelMarginLeft,a=e.labelMarginTop;o.adjustLocations(s[t],e.rect.x,e.rect.y,r,n,i,a)})},k.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];if(null==(t=t.getChild()))return this.toBeTiled[e]=!1;for(var r=t.getNodes(),n=0;nh&&(h=d.rect.height)}r+=h+t.verticalPadding}},k.prototype.tileCompoundMembers=function(n,i){var a=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(t){var e,r=i[t];a.tiledMemberPack[t]=a.tileNodes(n[t],r.paddingLeft+r.paddingRight),r.rect.width=a.tiledMemberPack[t].width,r.rect.height=a.tiledMemberPack[t].height,r.setCenter(a.tiledMemberPack[t].centerX,a.tiledMemberPack[t].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(t=r.rect.width,e=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(t+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>t?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.tileNodes=function(t,e){var r=this.tileNodesByFavoringDim(t,e,!0),t=this.tileNodesByFavoringDim(t,e,!1),e=this.getOrgRatio(r);return this.getOrgRatio(t)l&&(l=t.getWidth())}),o/a),c=s/a,c=Math.pow(n-i,2)+4*(t+i)*(c+n)*a,a=(i-n+Math.sqrt(c))/(2*(t+i));return e?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((n=r*(t+i)-i)t.rowHeight[r]&&(i=t.rowHeight[r],t.rowHeight[r]=n,i=t.rowHeight[r]-i),t.height+=i,t.rows[r].push(e)},k.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;nr&&(e=n,r=t.rowWidth[n]);return e},k.prototype.canAddHorizontal=function(t,e,r){var n,i,a;return t.idealRowWidth?(i=t.rows.length-1,t.rowWidth[i]+e+t.horizontalPadding<=t.idealRowWidth):(i=this.getShortestRowIndex(t))<0||(a=t.rowWidth[i])+t.horizontalPadding+e<=t.width||(n=0,t.rowHeight[i]=e+t.horizontalPadding?(t.height+n)/(a+e+t.horizontalPadding):(t.height+n)/t.width,n=r+t.verticalPadding,(i=i<1?1/i:i)<((a=t.widtha&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var o=Number.MIN_VALUE,s=0;so&&(o=n[s].height);0{var n,i=r(551).FDLayoutNode,a=r(551).IMath;function o(t,e,r,n){i.call(this,t,e,r,n)}for(n in Ae(o,"CoSENode"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];o.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&0{function Pt(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);eX&&(X=m[w].length,K=w);X{t.exports=e}},i={},Ae(r,"__webpack_require__"),r(45);function r(t){var e=i[t];return void 0===e&&(e=i[t]={exports:{}},n[t](e,e.exports,r)),e.exports}var n,i})}),LMt=jMt((r,n)=>{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(AMt()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeFcose=e(AMt()):t.cytoscapeFcose=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(e){return n={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(r){for(var t=arguments.length,e=Array(1{Ae(_,"sliceIterator");var n=r(140).layoutBase.LinkedList;function _(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}t.exports=r={getTopMostNodes:function(t){for(var n={},e=0;e{var v=r(548),s=r(140).CoSELayout,x=r(140).CoSENode,b=r(140).layoutBase.PointD,w=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,u=r(140).layoutBase.FDLayoutConstants,k=r(140).CoSEConstants,r=Ae(function(c,t){var e=c.cy,r=(i=c.eles).nodes(),n=i.edges(),d=void 0,p=void 0,g=void 0,f={},h=(c.randomize&&(d=t.nodeIndexes,p=t.xCoords,g=t.yCoords),Ae(function(t){return"function"==typeof t},"isFn")),m=Ae(function(t,e){return h(t)?t(e):t},"optFn"),y=v.calcParentsWithoutChildren(e,i),t=Ae(function t(e,r,n,i){for(var a=r.length,o=0;o{function n(t,e){for(var r=0;r{var G=r(548),U=r(140).layoutBase.Matrix,q=r(140).layoutBase.SVD,r=Ae(function(t){var i=t.cy,a=t.eles,e=a.nodes(),r=a.nodes(":parent"),o=new Map,m=new Map,s=new Map,y=[],g=[],f=[],h=[],v=[],x=[],u=[],b=[],w=void 0,k=t.piTol,n=t.samplingType,T=t.nodeSeparation,d=void 0,P=Ae(function(){for(var t=0,e=!1;t{var n=r(212),r=Ae(function(t){t&&t("layout","fcose",n)},"register");typeof cytoscape<"u"&&r(cytoscape),t.exports=r},140:t=>{t.exports=e}},i={},Ae(r,"__webpack_require__"),r(579);function r(t){var e=i[t];return void 0===e&&(e=i[t]={exports:{}},n[t](e,e.exports,r)),e.exports}var n,i})}),NMt=t(()=>{jt(),vMt=Ae(t=>`${t}`,"wrapIcon"),xMt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:vMt('')},server:{body:vMt('')},disk:{body:vMt('')},internet:{body:vMt('')},cloud:{body:vMt('')},unknown:Dt,blank:{body:vMt("")}}}}),IMt=t(()=>{jt(),i(),KC(),EMt(),NMt(),XIt(),bMt=Ae(async function(w,t){let k=KIt("padding"),e=KIt("iconSize"),T=e/2,E=e/6,_=E/2;await Promise.all(t.edges().map(async t=>{let{source:e,sourceDir:r,sourceArrow:n,sourceGroup:i,target:a,targetDir:o,targetArrow:s,targetGroup:l,label:c}=HIt(t),{x:h,y:u}=t[0].sourceEndpoint(),{x:d,y:p}=t[0].midpoint(),{x:g,y:f}=t[0].targetEndpoint(),m=k+4;var y,v,x,b;i&&(PIt(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(PIt(o)?g+="L"===o?-m:m:f+="T"===o?-m:m+18),i||"junction"!==pMt.getNode(e)?.type||(PIt(r)?h+="L"===r?T:-T:u+="T"===r?T:-T),l||"junction"!==pMt.getNode(a)?.type||(PIt(o)?g+="L"===o?T:-T:f+="T"===o?T:-T),t[0]._private.rscratch&&((t=w.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge"),n&&(b=PIt(r)?RIt[r](h,E):h-_,y=BIt(r)?RIt[r](u,E):u-_,t.insert("polygon").attr("points",MIt[r](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),s&&(b=PIt(o)?RIt[o](g,E):g-_,y=BIt(o)?RIt[o](f,E):f-_,t.insert("polygon").attr("points",MIt[o](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(x=FIt(r,o)?"XY":PIt(r)?"X":"Y")?Math.abs(h-g):"Y"==x?Math.abs(u-f)/1.5:Math.abs(h-g)/2,b=t.append("g"),await XC(b,c,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},D()),b.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"==x?b.attr("transform","translate("+d+", "+p+")"):"Y"==x?b.attr("transform","translate("+d+", "+p+") rotate(-90)"):"XY"==x&&(y=GIt(r,o))&&$It(y)&&(t=b.node().getBoundingClientRect(),[y,v]=qIt(y),b.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),x=b.node().getBoundingClientRect(),b.attr("transform",` - translate(${d}, ${p-t.height/2}) - translate(${y*x.width/2}, ${v*x.height/2}) + translate(${d}, ${p-t.height/2}) + translate(${y*x.width/2}, ${v*x.height/2}) rotate(${-1*y*v*45}, 0, ${t.height/2}) `)))}))},"drawEdges"),wMt=Ae(async function(l,t){let c=.75*KIt("padding"),h=KIt("fontSize"),u=KIt("iconSize")/2;await Promise.all(t.nodes().map(async n=>{var i=WIt(n);if("group"===i.type){var{h:n,w:a,x1:o,y1:s}=n.boundingBox();l.append("rect").attr("x",o+u).attr("y",s+u).attr("width",a).attr("height",n).attr("class","node-bkg");let t=l.append("g"),e=o,r=s;i.icon&&((n=t.append("g")).html(`${await $t(i.icon,{height:c,width:c,fallbackPrefix:xMt.prefix})}`),n.attr("transform","translate("+(e+u+1)+", "+(r+u+1)+")"),e+=c,r+=h/2-1-2),i.label&&(o=t.append("g"),await XC(o,i.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},D()),o.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),o.attr("transform","translate("+(e+u+4)+", "+(r+u+2)+")"))}}))},"drawGroups"),kMt=Ae(async function(t,e,r){for(var n of r){var i=e.append("g"),a=KIt("iconSize"),o=(n.title&&(o=i.append("g"),await XC(o,n.title,{useHtmlLabels:!1,width:1.5*a,classes:"architecture-service-label"},D()),o.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),o.attr("transform","translate("+a/2+", "+a+")")),i.append("g")),{width:s,height:l}=(n.icon?o.html(`${await $t(n.icon,{height:a,width:a,fallbackPrefix:xMt.prefix})}`):n.iconText?(o.html(`${await $t("blank",{height:a,width:a,fallbackPrefix:xMt.prefix})}`),s=o.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(n.iconText),l=parseInt(window.getComputedStyle(s.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,s.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/l)};`)):o.append("path").attr("class","node-bkg").attr("id","node-"+n.id).attr("d",`M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`),i.attr("class","architecture-service"),i._groups[0][0].getBBox());n.width=s,n.height=l,t.setElementForId(n.id,i)}return 0},"drawServices"),TMt=Ae(function(i,a,t){t.forEach(t=>{var e=a.append("g"),r=KIt("iconSize"),{width:r,height:n}=(e.append("g").append("rect").attr("id","node-"+t.id).attr("fill-opacity","0").attr("width",r).attr("height",r),e.attr("class","architecture-junction"),e._groups[0][0].getBBox());e.width=r,e.height=n,i.setElementForId(t.id,e)})},"drawJunctions")});function MMt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:KIt("iconSize"),height:KIt("iconSize")},classes:"node-service"})})}function RMt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:KIt("iconSize"),height:KIt("iconSize")},classes:"node-junction"})})}function DMt(r,t){t.nodes().map(t=>{var e=WIt(t);"group"!==e.type&&(e.x=t.position().x,e.y=t.position().y,r.getElementById(e.id).attr("transform","translate("+(e.x||0)+","+(e.y||0)+")"))})}function OMt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function PMt(t,h){t.forEach(t=>{var{lhsId:e,rhsId:r,lhsInto:n,lhsGroup:i,rhsInto:a,lhsDir:o,rhsDir:s,rhsGroup:l,title:c}=t,t=FIt(t.lhsDir,t.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:e+"-"+r,label:c,source:e,sourceDir:o,sourceArrow:n,sourceGroup:i,sourceEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%",target:r,targetDir:s,targetArrow:a,targetGroup:l,targetEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%"},classes:t})})}function BMt(t){var[t,e]=t.map(t=>{let n={},i={};return Object.entries(t).forEach(([t,[e,r]])=>{n[r]||(n[r]=[]),i[e]||(i[e]=[]),n[r].push(t),i[e].push(t)}),{horiz:Object.values(n).filter(t=>11[[...t,...r],[...e,...n]],[[],[]]);return{horizontal:t,vertical:e}}function FMt(t){let l=[],c=Ae(t=>t[0]+","+t[1],"posToStr"),h=Ae(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{let a=Object.fromEntries(Object.entries(t).map(([t,e])=>[c(e),t])),o=[c([0,0])],s={},e={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;0{var e=c([n[0]+e[0],n[1]+e[1]]),r=a[e];r&&!s[e]&&(o.push(e),l.push({[IIt[t]]:r,[IIt[DIt(t)]]:i,gap:1.5*KIt("iconSize")}))})}}}}),l}function $Mt(i,a,l,c,{spatialMaps:h}){return new Promise(e=>{let t=O("body").append("div").attr("id","cy").attr("style","display:none"),o=t9t({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":KIt("fontSize")+"px"}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:KIt("padding")+"px"}}]}),r=(t.remove(),OMt(l,o),MMt(i,o),RMt(a,o),PMt(c,o),BMt(h)),n=FMt(h),s=o.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){var[t,e]=t.connectedNodes();return(t=WIt(t).parent)===WIt(e).parent?1.5*KIt("iconSize"):.5*KIt("iconSize")},edgeElasticity(t){var[t,e]=t.connectedNodes();return(t=WIt(t).parent)===WIt(e).parent?.45:.001},alignmentConstraint:r,relativePlacementConstraint:n});s.one("layoutstop",()=>{function t(t,e,r,n){var{x:t,y:i}=t,{x:e,y:a}=e,o=(n-i+(t-r)*(i-a)/(t-e))/Math.sqrt(1+Math.pow((i-a)/(t-e),2)),s=Math.sqrt(Math.pow(n-i,2)+Math.pow(r-t,2)-Math.pow(o,2));s/=Math.sqrt(Math.pow(e-t,2)+Math.pow(a-i,2));let l=(e-t)*(n-i)-(a-i)*(r-t);switch(!0){case 0<=l:l=1;break;case l<0:l=-1}let c=(e-t)*(r-t)+(a-i)*(n-i);switch(!0){case 0<=c:c=1;break;case c<0:c=-1}return{distances:Math.abs(o)*l,weights:s*=c}}Ae(t,"getSegmentWeights"),o.startBatch();for(var e of Object.values(o.edges())){var r,n,i,a;e.data?.()&&({x:i,y:n}=e.source().position(),{x:a,y:r}=e.target().position(),i!==a)&&n!==r&&(i=e.sourceEndpoint(),a=e.targetEndpoint(),n=HIt(e).sourceDir,[r,n]=BIt(n)?[i.x,a.y]:[a.x,i.y],{weights:i,distances:a}=t(i,a,r,n),e.style("segment-distances",a),e.style("segment-weights",i))}o.endBatch(),s.run()}),s.run(),o.ready(t=>{R.info("Ready",t),e(o)})})}var zMt,GMt,UMt=t(()=>{jt(),e9t(),zMt=rt(LMt(),1),Q3(),e(),Ipt(),ec(),EMt(),NMt(),XIt(),IMt(),Bt([{name:xMt.prefix,icons:xMt}]),t9t.use(zMt.default),Ae(MMt,"addServices"),Ae(RMt,"addJunctions"),Ae(DMt,"positionNodes"),Ae(OMt,"addGroups"),Ae(PMt,"addEdges"),Ae(BMt,"getAlignments"),Ae(FMt,"getRelativeConstraints"),Ae($Mt,"layoutArchitecture"),zMt=Ae(async(t,e,r,n)=>{var i=(n=n.db).getServices(),a=n.getJunctions(),o=n.getGroups(),s=n.getEdges(),l=n.getDataStructures(),c=(e=Ept(e)).append("g"),h=(c.attr("class","architecture-edges"),(u=e.append("g")).attr("class","architecture-services"),e.append("g")),u=(h.attr("class","architecture-groups"),await kMt(n,u,i),TMt(n,u,a),await $Mt(i,a,o,s,l));await bMt(c,u),await wMt(h,u),DMt(n,u),Xl(void 0,e,KIt("padding"),KIt("useMaxWidth"))},"draw"),GMt={draw:zMt}}),qMt={};J(qMt,{diagram:()=>YMt});var YMt,jMt,HMt=t(()=>{_Mt(),EMt(),CMt(),UMt(),YMt={parser:fMt,db:pMt,renderer:GMt,styles:yMt}}),WMt=(J(jMt={},{default:()=>nFt}),jt(),Gr(),Yr(),{id:"c4",detector:Ae(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:Ae(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(TE(),wE))).diagram}),"loader")}),VMt={id:"flowchart",detector:Ae((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:Ae(async()=>({id:"flowchart",diagram:(await Promise.resolve().then(()=>(SH(),lH))).diagram}),"loader")},XMt="flowchart-v2",t=Ae((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),J=Ae(async()=>{var t=(await Promise.resolve().then(()=>(SH(),lH))).diagram;return{id:XMt,diagram:t}},"loader"),KMt={id:XMt,detector:t,loader:J},ZMt={id:"er",detector:Ae(t=>/^\s*erDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(TW(),wW))).diagram}),"loader")},QMt={id:"gitGraph",detector:Ae(t=>/^\s*gitGraph/.test(t),"detector"),loader:Ae(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(Odt(),Idt))).diagram}),"loader")},JMt={id:"gantt",detector:Ae(t=>/^\s*gantt/.test(t),"detector"),loader:Ae(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(Spt(),ypt))).diagram}),"loader")},tRt={id:"info",detector:Ae(t=>/^\s*info/.test(t),"detector"),loader:Ae(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(Jpt(),Rpt))).diagram}),"loader")},eRt={id:"pie",detector:Ae(t=>/^\s*pie/.test(t),"detector"),loader:Ae(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(h1t(),i1t))).diagram}),"loader")},rRt="quadrantChart",t=Ae(t=>/^\s*quadrantChart/.test(t),"detector"),J=Ae(async()=>{var t=(await Promise.resolve().then(()=>(j1t(),G1t))).diagram;return{id:rRt,diagram:t}},"loader"),nRt={id:rRt,detector:t,loader:J},iRt={id:"xychart",detector:Ae(t=>/^\s*xychart-beta/.test(t),"detector"),loader:Ae(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(Hft(),tft))).diagram}),"loader")},aRt="requirement",t=Ae(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),J=Ae(async()=>{var t=(await Promise.resolve().then(()=>(rmt(),Qft))).diagram;return{id:aRt,diagram:t}},"loader"),oRt={id:aRt,detector:t,loader:J},sRt={id:"sequence",detector:Ae(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(rvt(),Wyt))).diagram}),"loader")},lRt={id:"class",detector:Ae((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"class",diagram:(await Promise.resolve().then(()=>(Vvt(),cvt))).diagram}),"loader")},cRt="classDiagram",t=Ae((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),J=Ae(async()=>{var t=(await Promise.resolve().then(()=>(cbt(),Ext))).diagram;return{id:cRt,diagram:t}},"loader"),hRt={id:cRt,detector:t,loader:J},uRt={id:"state",detector:Ae((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"state",diagram:(await Promise.resolve().then(()=>(J4t(),Z4t))).diagram}),"loader")},dRt="stateDiagram",t=Ae((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&"dagre-wrapper"===e?.state?.defaultRenderer),"detector"),J=Ae(async()=>{var t=(await Promise.resolve().then(()=>(M3t(),t3t))).diagram;return{id:dRt,diagram:t}},"loader"),pRt={id:dRt,detector:t,loader:J},gRt={id:"journey",detector:Ae(t=>/^\s*journey/.test(t),"detector"),loader:Ae(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(J3t(),X3t))).diagram}),"loader")},fRt=(e(),Ipt(),ec(),t={draw:Ae((t,e,r)=>{R.debug(`rendering svg for syntax error `);var n=(e=Ept(e)).append("g");e.attr("viewBox","0 0 2412 512"),Vl(e,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r)},"draw")}),mRt={db:{},renderer:t,parser:{parse:Ae(()=>{},"parse")}},yRt="flowchart-elk",J=Ae((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),t=Ae(async()=>{var t=(await Promise.resolve().then(()=>(SH(),lH))).diagram;return{id:yRt,diagram:t}},"loader"),vRt={id:yRt,detector:J,loader:t},xRt={id:"timeline",detector:Ae(t=>/^\s*timeline/.test(t),"detector"),loader:Ae(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(u6t(),H5t))).diagram}),"loader")},bRt={id:"mindmap",detector:Ae(t=>/^\s*mindmap/.test(t),"detector"),loader:Ae(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(Y9t(),A9t))).diagram}),"loader")},wRt={id:"sankey",detector:Ae(t=>/^\s*sankey-beta/.test(t),"detector"),loader:Ae(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(xNt(),tNt))).diagram}),"loader")},kRt={id:"packet",detector:Ae(t=>/^\s*packet-beta/.test(t),"detector"),loader:Ae(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(ANt(),ENt))).diagram}),"loader")},TRt={id:"block",detector:Ae(t=>/^\s*block-beta/.test(t),"detector"),loader:Ae(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(VIt(),LIt))).diagram}),"loader")},ERt="architecture",J=Ae(t=>/^\s*architecture/.test(t),"detector"),t=Ae(async()=>{var t=(await Promise.resolve().then(()=>(HMt(),qMt))).diagram;return{id:ERt,diagram:t}},"loader"),_Rt={id:ERt,detector:J,loader:t},CRt=(Yr(),i(),!1),SRt=Ae(()=>{CRt||(CRt=!0,Tc("error",mRt,t=>"error"===t.toLowerCase().trim()),Tc("---",{db:{clear:Ae(()=>{},"clear")},styles:{},renderer:{draw:Ae(()=>{},"draw")},parser:{parse:Ae(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:Ae(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Jt(WMt,hRt,lRt,ZMt,JMt,tRt,eRt,oRt,sRt,vRt,KMt,VMt,bRt,xRt,QMt,pRt,uRt,gRt,nRt,wRt,kRt,iRt,TRt,_Rt))},"addDiagrams"),ARt=(e(),Yr(),i(),Ae(async()=>{R.debug("Loading registered diagrams");var t=(await Promise.allSettled(Object.entries(Zt).map(async([t,{detector:e,loader:r}])=>{if(r)try{Ec(t)}catch{try{var{diagram:n,id:i}=await r();Tc(i,n,e)}catch(e){throw R.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Zt[t],e}}}))).filter(t=>"rejected"===t.status);if(0e&&a tag resolver accepts not "'+a+'" style');n=i.represent[a](e,a)}t.dump=n}return!0}return!1}function bBt(t,e,r,n,i,a,o){t.tag=null,t.dump=r,xBt(t,r,!1)||xBt(t,r,!0);var s,l,c=OPt.call(t.dump),h=n,u=(n=n&&(t.flowLevel<0||t.flowLevel>e),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(s=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||l||2!==t.indent&&0",t.dump=r+" "+t.dump)}return!0}function wBt(t,e){var r,n,i=[],a=[];for(kBt(t,i,a),r=0,n=a.length;rt.replace(/\r\n?/g,` -`).replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ABt=Ae(t=>{var{text:t,metadata:e}=CBt(t),{displayMode:e,title:r,config:n={}}=e;return e&&(n.gantt||(n.gantt={}),n.gantt.displayMode=e),{title:r,config:n,text:t}},"processFrontmatter"),LBt=Ae(t=>{var e=H8.detectInit(t)??{},r=H8.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:S8(t),directive:e}},"processDirectives");function NBt(t){var e=SBt(t),e=ABt(e),r=LBt(e.text),n=b8(e.config,r.directive);return{code:t=wDt(r.text),title:e.title,config:n}}function IBt(t){return t=(new TextEncoder).encode(t),t=Array.from(t,t=>String.fromCodePoint(t)).join(""),btoa(t)}Ae(NBt,"preprocessDiagram"),rc(),An(),K8(),Ae(IBt,"toBase64");var MBt=["foreignobject"],RBt=["dominant-baseline"];function DBt(t){return t=NBt(t),Pr(),Or(t.config??{}),t}async function OBt(t,e){SRt();try{var r=DBt(t).code;return{diagramType:(await jBt(r)).type}}catch(t){if(e?.suppressErrors)return!1;throw t}}Ae(DBt,"processAndSetConfigs"),Ae(OBt,"parse");var PBt=Ae((t,e,r=[])=>` +`).replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ABt=Ae(t=>{var{text:t,metadata:e}=CBt(t),{displayMode:e,title:r,config:n={}}=e;return e&&(n.gantt||(n.gantt={}),n.gantt.displayMode=e),{title:r,config:n,text:t}},"processFrontmatter"),LBt=Ae(t=>{var e=H8.detectInit(t)??{},r=H8.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:S8(t),directive:e}},"processDirectives");function NBt(t){var e=SBt(t),e=ABt(e),r=LBt(e.text),n=b8(e.config,r.directive);return{code:t=wDt(r.text),title:e.title,config:n}}function IBt(t){return t=(new TextEncoder).encode(t),t=Array.from(t,t=>String.fromCodePoint(t)).join(""),btoa(t)}Ae(NBt,"preprocessDiagram"),rc(),An(),K8(),Ae(IBt,"toBase64");var MBt=["foreignobject"],RBt=["dominant-baseline"];function DBt(t){return t=NBt(t),Pr(),Or(t.config??{}),t}async function OBt(t,e){SRt();try{var{code:r,config:n}=DBt(t);return{diagramType:(await jBt(r)).type,config:n}}catch(t){if(e?.suppressErrors)return!1;throw t}}Ae(DBt,"processAndSetConfigs"),Ae(OBt,"parse");var PBt=Ae((t,e,r=[])=>` .${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),BBt=Ae((e,r=new Map)=>{let n="";if(void 0!==e.themeCSS&&(n+=` `+e.themeCSS),void 0!==e.fontFamily&&(n+=` :root { --mermaid-font-family: ${e.fontFamily}}`),void 0!==e.altFontFamily&&(n+=`