ction(){}},main:function(b,a,h,d,x,u){Bridge.Console.log=console.log;Bridge.Console.error=console.error;Bridge.Console.debug=console.debug;RPOrgChart.graph=b;RPOrgChart.parent=a;RPOrgChart.dx=0;RPOrgChart.dy=0;"group"==a.style&&a.geometry&&(RPOrgChart.dx=a.geometry.x,RPOrgChart.dy=a.geometry.y);RPOrgChart.branchOptimizer=h;RPOrgChart.correctY=u;RPOrgChart.parentChildSpacing=parseInt(d);RPOrgChart.siblingSpacing=parseInt(x);RPOrgChart.buildChart(!0)},
diagram:{},dataSource:{},buildChart:function(b){b&&RPOrgChart.initDiagram();RPOrgChart.positionBoxes()},collapseAllBoxes:function(b,a){for(b=b.getBoxesById().getValues().getEnumerator();b.moveNext();){var h=b.getCurrent();h.IsSpecial||(h.IsCollapsed=a)}},generateData:function(){for(var b=new OrgChart.Test.TestDataSource,a=RPOrgChart.graph,h=a.getChildVertices(RPOrgChart.parent),d=0;d<h.length;d++){var x=h[d];if(null!=x.geometry&&x.vertex&&x.parent==RPOrgChart.parent){var u=null,f=a.getIncomingEdges(x)[0];
null!=f&&null!=f.source&&(u=f.source.id);f=new OrgChart.Test.TestDataItem;f.Id=x.id;f.ParentId=u;b.Items.add(f.getId(),f)}}return b},initDiagram:function(){var b=RPOrgChart.generateData();RPOrgChart.dataSource=b;var a=new OrgChart.Layout.BoxContainer.$ctor1(b);RPOrgChart.diagram=new OrgChart.Layout.Diagram;b=RPOrgChart.diagram;b.setBoxes(a);a=new OrgChart.Layout.LinearLayoutStrategy;a.ParentAlignment=OrgChart.Layout.BranchParentAlignment.Center;a.ParentChildSpacing=RPOrgChart.parentChildSpacing;a.SiblingSpacing=
RPOrgChart.siblingSpacing;b.LayoutSettings.LayoutStrategies.add("linear",a);a=new OrgChart.Layout.MultiLineHangerLayoutStrategy;a.ParentAlignment=OrgChart.Layout.BranchParentAlignment.Center;a.MaxSiblingsPerRow=2;a.ParentChildSpacing=RPOrgChart.parentChildSpacing;a.SiblingSpacing=RPOrgChart.siblingSpacing;b.LayoutSettings.LayoutStrategies.add("hanger2",a);a=new OrgChart.Layout.MultiLineHangerLayoutStrategy;a.ParentAlignment=OrgChart.Layout.BranchParentAlignment.Center;a.MaxSiblingsPerRow=4;a.ParentChildSpacing=
RPOrgChart.parentChildSpacing;a.SiblingSpacing=RPOrgChart.siblingSpacing;b.LayoutSettings.LayoutStrategies.add("hanger4",a);a=new OrgChart.Layout.SingleColumnLayoutStrategy;a.ParentAlignment=OrgChart.Layout.BranchParentAlignment.Right;a.ParentChildSpacing=RPOrgChart.parentChildSpacing;a.SiblingSpacing=RPOrgChart.siblingSpacing;b.LayoutSettings.LayoutStrategies.add("singleColumnRight",a);a=new OrgChart.Layout.SingleColumnLayoutStrategy;a.ParentAlignment=OrgChart.Layout.BranchParentAlignment.Left;a.ParentChildSpacing=
RPOrgChart.parentChildSpacing;a.SiblingSpacing=RPOrgChart.siblingSpacing;b.LayoutSettings.LayoutStrategies.add("singleColumnLeft",a);a=new OrgChart.Layout.MultiLineFishboneLayoutStrategy;a.ParentAlignment=OrgChart.Layout.BranchParentAlignment.Center;a.MaxGroups=1;a.ParentChildSpacing=RPOrgChart.parentChildSpacing;a.SiblingSpacing=RPOrgChart.siblingSpacing;b.LayoutSettings.LayoutStrategies.add("fishbone1",a);a=new OrgChart.Layout.MultiLineFishboneLayoutStrategy;a.ParentAlignment=OrgChart.Layout.BranchParentAlignment.Center;
a.MaxGroups=2;a.ParentChildSpacing=RPOrgChart.parentChildSpacing;a.SiblingSpacing=RPOrgChart.siblingSpacing;b.LayoutSettings.LayoutStrategies.add("fishbone2",a);a=new OrgChart.Layout.StackingLayoutStrategy;a.ParentAlignment=OrgChart.Layout.BranchParentAlignment.InvalidValue;a.Orientation=OrgChart.Layout.StackOrientation.SingleRowHorizontal;a.ParentChildSpacing=RPOrgChart.parentChildSpacing;a.SiblingSpacing=RPOrgChart.siblingSpacing;b.LayoutSettings.LayoutStrategies.add("hstack",a);a=new OrgChart.Layout.StackingLayoutStrategy;
a.ParentAlignment=OrgChart.Layout.BranchParentAlignment.InvalidValue;a.Orientation=OrgChart.Layout.StackOrientation.SingleColumnVertical;a.ParentChildSpacing=RPOrgChart.parentChildSpacing;a.SiblingSpacing=RPOrgChart.siblingSpacing;b.LayoutSettings.LayoutStrategies.add("vstack",a);a=new OrgChart.Layout.StackingLayoutStrategy;a.ParentAlignment=OrgChart.Layout.BranchParentAlignment.InvalidValue;a.Orientation=OrgChart.Layout.StackOrientation.SingleColumnVertical;a.ParentChildSpacing=RPOrgChart.parentChildSpacing;
a.SiblingSpacing=RPOrgChart.siblingSpacing;b.LayoutSettings.LayoutStrategies.add("vstackMiddle",a);a=new OrgChart.Layout.StackingLayoutStrategy;a.ParentAlignment=OrgChart.Layout.BranchParentAlignment.InvalidValue;a.Orientation=OrgChart.Layout.StackOrientation.SingleColumnVertical;a.ParentChildSpacing=RPOrgChart.parentChildSpacing;a.SiblingSpacing=RPOrgChart.siblingSpacing;b.LayoutSettings.LayoutStrategies.add("vstackTop",a);a=new OrgChart.Layout.FishboneAssistantsLayoutStrategy;a.ParentAlignment=
OrgChart.Layout.BranchParentAlignment.Center;a.ParentChildSpacing=RPOrgChart.parentChildSpacing;a.SiblingSpacing=RPOrgChart.siblingSpacing;b.LayoutSettings.LayoutStrategies.add("assistants",a);b.LayoutSettings.DefaultLayoutStrategyId="vstack";b.LayoutSettings.DefaultAssistantLayoutStrategyId="assistants"},getBoxLevel:function(b,a){for(var h=0,d={};0<a.ParentId&&b.getBoxesById().tryGetValue(a.ParentId,d);)a=d.v,h++;return h},onLayoutStateChanged:function(b,a){a.State.getCurrentOperation()===OrgChart.Layout.LayoutState.Operation.PreprocessVisualTree&&
RPOrgChart.renderBoxes()},renderBoxes:function(){RPOrgChart.diagram.getVisualTree().IterateParentFirst(function(b){var a=b.Element;if(a.getIsDataBound()){if(b.State.IsHidden)return!0;a.Size=RPOrgChart.getBoxElementSize(a.DataId)}return!0})},getBranchOptimizerFunc:function(){return RPOrgChart[RPOrgChart.branchOptimizer]},branchOptimizerAllLinear:function(b){return b.getIsAssistantRoot()?null:"linear"},branchOptimizerAllHanger2:function(b){return b.getIsAssistantRoot()?null:"hanger2"},branchOptimizerAllHanger4:function(b){return b.getIsAssistantRoot()?
null:"hanger4"},branchOptimizerAllFishbone1:function(b){return b.getIsAssistantRoot()?null:"fishbone1"},branchOptimizerAllFishbone2:function(b){return b.getIsAssistantRoot()?null:"fishbone2"},branchOptimizerAllSingleColumnLeft:function(b){return b.getIsAssistantRoot()?null:"singleColumnRight"},branchOptimizerAllSingleColumnRight:function(b){return b.getIsAssistantRoot()?null:"singleColumnLeft"},branchOptimizerStackers:function(b){return b.getIsAssistantRoot()?null:0===b.Level?"vstackTop":1===b.Level?
"vstackMiddle":"hstack"},branchOptimizerSmart:function(b){if(b.getIsAssistantRoot())return null;var a=b.getChildCount();if(1>=a)return"vstack";for(var h=0,d=0;d<a;d++)0<b.Children.getItem(d).getChildCount()&&h++;return 1>=h?4>=a?"vstack":8>=a?"fishbone1":"fishbone2":"hanger4"},boxSizeFunc:function(b){b=RPOrgChart.diagram.getBoxes().getBoxesByDataId().getItem(b).Id;return RPOrgChart.diagram.getBoxes().getBoxesById().getItem(b).Size},getBoxElementSize:function(b){b=RPOrgChart.graph.model.cells[b].geometry;
return new OrgChart.Layout.Size.$ctor1(b.width,b.height)},positionBoxes:function(){var b=RPOrgChart.diagram,a=new OrgChart.Layout.LayoutState(b);a.addOperationChanged(RPOrgChart.onLayoutStateChanged);a.BoxSizeFunc=Bridge.fn.bind(this,RPOrgChart.boxSizeFunc,null,!0);a.LayoutOptimizerFunc=Bridge.fn.bind(this,RPOrgChart.getBranchOptimizerFunc(),null,!0);OrgChart.Layout.LayoutAlgorithm.Apply(a);a=OrgChart.Layout.LayoutAlgorithm.ComputeBranchVisualBoundingRect(b.getVisualTree());var h=-a.getLeft()+a.getTop(),
d=RPOrgChart.graph,x=d.model.cells,u=[];b.getVisualTree().IterateParentFirst(function(f){if(f.State.IsHidden)return!1;var B=f.Element;if(B.getIsDataBound()){B=x[B.DataId];var C=B.geometry.clone();C.x=f.State.TopLeft.X+h;C.y=f.State.TopLeft.Y;d.model.setGeometry(B,C)}return!0});b.getVisualTree().IterateParentFirst(function(f){var B=RPOrgChart.correctY?Math.min(0,-(RPOrgChart.parentChildSpacing/2)+5):0;if(null!=f.State.Connector){var C=function(l,m){for(var v=l.geometry.clone(),D=0;m&&D<m.length;D++)m[D].corrected||
(m[D].y+=B,m[D].corrected=!0);v.points=m;d.model.setGeometry(l,v);d.setCellStyles("entryX",null,[l]);d.setCellStyles("entryY",null,[l]);d.setCellStyles("exitX",null,[l]);d.setCellStyles("exitY",null,[l]);d.setCellStyles("edgeStyle","orthogonalEdgeStyle",[l])},I=function(l,m){return m.x>=l.x&&m.x<=l.x+l.width&&m.y>=l.y&&m.y<=l.y+l.height},n=x[f.Element.DataId],k=d.getOutgoingEdges(n);k={};for(var r=0;r<f.State.Connector.Segments.length;r++){var c=f.State.Connector.Segments[r];c.mark=1<<r;c.From.X+=
h;c.To.X+=h;var p=c.From.X,t=c.From.Y,z=c.To.X,A=c.To.Y;if(p==z&&t>A||t==A&&p>z){var e=c.From;c.From=c.To;c.To=e}}for(r=0;r<f.State.Connector.Segments.length;r++){c=f.State.Connector.Segments[r];p=c.From.X;t=c.From.Y;z=c.To.X;A=c.To.Y;e=new mxPoint(p,t);u.push(e);e.mark=c.mark;var g=k[p+","+t];null!=g?g.mark|=e.mark:k[p+","+t]=e;e=new mxPoint(z,A);u.push(e);e.mark=c.mark;g=k[z+","+A];null!=g?g.mark|=e.mark:k[z+","+A]=e;for(e=r+1;e<f.State.Connector.Segments.length;e++){g=f.State.Connector.Segments[e];
var E=g.From.X,F=g.From.Y,w=g.To.X,J=g.To.Y;p==z&&t<=F&&A>=F&&E<=p&&w>=p?(w=new mxPoint(p,F),u.push(w),w.mark=c.mark|g.mark,g=k[p+","+F],null!=g?g.mark|=w.mark:k[p+","+F]=w):t==A&&p<=E&&z>=E&&F<=t&&J>=t&&(w=new mxPoint(E,t),u.push(w),w.mark=c.mark|g.mark,g=k[E+","+t],null!=g?g.mark|=w.mark:k[E+","+t]=w)}}var y=[],q;for(q in k)y.push(k[q]);y.sort(function(l,m){var v=l.y-m.y;return 0==v?l.x-m.x:v});k=d.getOutgoingEdges(n);if(2==y.length&&1==k.length)C(k[0],y);else{f=function(l){for(var m=0;m<y.length;m++){var v=
y[m];if(!H[v.x+","+v.y]&&v.mark&l.mark)return H[v.x+","+v.y]=!0,v}};e=n.geometry;for(q=0;q<y.length;q++)if(I(e,y[q])){var G=y[q];break}for(e=0;e<k.length;e++)if(null!=k[e].target){var H={};H[G.x+","+G.y]=!0;q=k[e].target.geometry;n=[G];r=G;for(c=0;1E3>c;)if(c++,p=f(r),null==p)n.pop(),r=n[n.length-1];else if(n.push(p),r=p,I(q,p))break;if(2<n.length)for(r=n[0].x,c=n[n.length-1].x,q=n.length-2;0<q;q--)(r>c&&n[q].x<c||r<c&&n[q].x<r)&&n.splice(q,1);q=k[e].geometry.clone();q.points=n;RPOrgChart.graph.model.setGeometry(k[e],
q);C(k[e],n)}}}return!0});for(b=0;b<u.length;b++)delete u[b].mark,delete u[b].corrected}}});Bridge.init();
mxMermaidToDrawio=function(A,z,y){function r(a,c){if(null==a)return"";if(Array.isArray(a)){c=[];for(var f=0;f<a.length;f++)c.push(r(a[f]));return c.join("\n")}return(a?a.replace(/\\n/g,"\n").replace(/<br\s*\/?>/gi,"\n").replace(/~(.+)~/g,"<$1>"):"")+(c?"<"+c+">":"")}function q(a,c,f,b,e,g,k,d,l,h){return a.insertVertex(c,f,b,Math.round(e),Math.round(g),Math.round(k),Math.round(d),l,h)}function p(a,c,f,b){return q(b,f,null,r(c.labelText),c.x,c.y,c.width,c.height,a)}function x(a,c,f,b){b||(a.x-=a.width/
2,a.y-=a.height/2);a.clusterNode&&(a.shape=a.clusterData.shape,a.labelText=a.clusterData.labelText,a.type=a.clusterData.type);switch(a.shape){case "class_box":var e=a.classData.members,g=a.classData.methods,k=a.classData.annotations||[];var d="";for(b=0;b<k.length;b++)d+="<<"+r(k[b])+">>\n";b=1+k.length/2+Math.max(e.length,.5)+Math.max(g.length,.5);var l=(a.height-8)/b;d=q(f,c,null,d+r(a.labelText,a.type),a.x,a.y,a.width,a.height,"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize="+
l*(1+k.length/2)+";horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;");k=l+(0==e.length?l/2:0);for(b=0;b<e.length;b++)q(f,d,null,r(e[b]),0,k,a.width,l,"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),k+=l;q(f,d,null,null,0,k,a.width,0==g.length?l/2:8,"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;");
k+=8;for(b=0;b<g.length;b++)q(f,d,null,r(g[b]),0,k,a.width,l,"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),k+=l;break;case "note":d=p("align=left;spacingLeft=4;",a,c,f);break;case "rect":d=p(("round"==a.type||F?"rounded=1;absoluteArcSize=1;arcSize=14;":"")+"whiteSpace=wrap;strokeWidth=2;"+("group"==a.type?"verticalAlign=top;":""),a,c,f);break;case "question":case "choice":"choice"==
a.shape&&(a.labelText="");d=p("rhombus;strokeWidth=2;whiteSpace=wrap;",a,c,f);break;case "stadium":d=p("rounded=1;whiteSpace=wrap;arcSize=50;strokeWidth=2;",a,c,f);break;case "subroutine":d=p("strokeWidth=2;shape=process;whiteSpace=wrap;size=0.04;",a,c,f);break;case "cylinder":d=p("shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=10;strokeWidth=2;whiteSpace=wrap;",a,c,f);break;case "circle":d=p("ellipse;aspect=fixed;strokeWidth=2;whiteSpace=wrap;",a,c,f);break;case "rect_left_inv_arrow":d=p("shape=mxgraph.arrows2.arrow;dy=0;dx=0;notch=20;strokeWidth=2;whiteSpace=wrap;",
a,c,f);break;case "trapezoid":d=p("shape=trapezoid;perimeter=trapezoidPerimeter;fixedSize=1;strokeWidth=2;whiteSpace=wrap;",a,c,f);break;case "inv_trapezoid":d=p("shape=trapezoid;perimeter=trapezoidPerimeter;fixedSize=1;strokeWidth=2;whiteSpace=wrap;flipV=1;",a,c,f);break;case "lean_right":d=p("shape=parallelogram;perimeter=parallelogramPerimeter;fixedSize=1;strokeWidth=2;whiteSpace=wrap;",a,c,f);break;case "lean_left":d=p("shape=parallelogram;perimeter=parallelogramPerimeter;fixedSize=1;strokeWidth=2;whiteSpace=wrap;flipH=1;",
a,c,f);break;case "doublecircle":d=p("ellipse;shape=doubleEllipse;aspect=fixed;strokeWidth=2;whiteSpace=wrap;",a,c,f);break;case "hexagon":d=p("shape=hexagon;perimeter=hexagonPerimeter2;fixedSize=1;strokeWidth=2;whiteSpace=wrap;",a,c,f);break;case "start":a.labelText="";d=p("ellipse;fillColor=strokeColor;",a,c,f);break;case "end":a.labelText="";d=p("ellipse;shape=endState;fillColor=strokeColor;",a,c,f);break;case "roundedWithTitle":d=p("swimlane;fontStyle=1;align=center;verticalAlign=middle;startSize=25;container=0;collapsible=0;rounded=1;arcSize=14;dropTarget=0;",
a,c,f);break;case "fork":case "join":a.labelText="";d=p("shape=line;strokeWidth="+(a.height-5)+";",a,c,f);break;case "divider":a.labelText="";d=p("fillColor=#F7F7F7;dashed=1;dashPattern=12 12;",a,c,f);break;case "lifeline":case "actorLifeline":a.labelText=a.description;d=p('shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;container=1;dropTarget=0;collapsible=0;recursiveResize=0;outlineConnect=0;portConstraint=eastwest;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","elbow":"vertical","curved":0,"rounded":0};'+
("actor"==a.type?"participant=umlActor;verticalAlign=bottom;labelPosition=center;verticalLabelPosition=top;align=center;":"")+"size="+a.size+";",a,c,f);break;case "activation":d=p('points=[];perimeter=orthogonalPerimeter;outlineConnect=0;targetShapes=umlLifeline;portConstraint=eastwest;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","elbow":"vertical","curved":0,"rounded":0}',a,c,f);break;case "seqNote":a.labelText=a.message;d=p("fillColor=#ffff88;strokeColor=#9E916F;",a,c,f);break;case "loop":a.labelText=
a.type||"";b=a.type?10*a.type.length:0;d=p("shape=umlFrame;dashed=1;pointerEvents=0;dropTarget=0;strokeColor=#B3B3B3;height=20;width="+b,a,c,f);q(f,d,null,r(a.title),b,0,a.width-b,20,"text;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;");for(b=0;null!=a.sections&&b<a.sections.length;b++)c=a.sections[b],q(f,d,null,r(a.sectionTitles[b].message),0,c.y-a.y,a.width,c.height,"shape=line;dashed=1;whiteSpace=wrap;verticalAlign=top;labelPosition=center;verticalLabelPosition=middle;align=center;strokeColor=#B3B3B3;");
break;case "erdEntity":e=a.entityData.attributes;b=e.length;k=l=(a.height-25)/b;var h=g=0,m=0,n=0;for(b=0;b<e.length;b++)g=Math.max(g,6*e[b].attributeType.length),h=Math.max(h,6*e[b].attributeName.length),m=Math.max(m,e[b].attributeKeyType?10*e[b].attributeKeyType.length:0),n=Math.max(n,e[b].attributeComment?6*e[b].attributeComment.length:0);d=q(f,c,null,r(a.labelText),a.x,a.y,Math.max(h+g+m+n,a.width),a.height,"shape=table;startSize="+(0==e.length?a.height:25)+";container=1;collapsible=0;childLayout=tableLayout;fixedRows=1;rowLines=1;fontStyle=1;align=center;resizeLast=1;");
for(b=0;b<e.length;b++)c=q(f,d,null,null,0,k,a.width,l,"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;"),q(f,c,null,r(e[b].attributeType),0,0,g,l,"shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=2;overflow=hidden;fontSize=11;"),q(f,c,null,r(e[b].attributeName),0,0,Math.max(h,a.width-g-m-n),l,"shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=2;overflow=hidden;fontSize=11;"),
0<m&&q(f,c,null,r(e[b].attributeKeyType),0,0,m,l,"shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=2;overflow=hidden;fontSize=11;"),0<n&&q(f,c,null,r(e[b].attributeComment),0,0,n,l,"shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=2;overflow=hidden;fontSize=11;"),k+=l;break;case "element":case "requirement":b="element"==a.shape;d="<<"+(b?"Element":a.data.type)+">>\n";d=q(f,c,null,d+r(a.data.name),
a.x,a.y,a.width,a.height,"swimlane;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=40;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=1;collapsible=0;marginBottom=0;");q(f,d,null,r(b?"Type: "+a.data.type+"\nDoc Ref: "+(a.data.docRef||"None"):"Id: "+a.data.id+"\nText: "+a.data.text+"\nRisk: "+a.data.risk+"\nVerification: "+a.data.verifyMethod),0,40,a.width,a.height-40,"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacing=6;overflow=hidden;rotatable=0;connectable=0;");
break;case "rectCloud":d=p("shape=mxgraph.basic.cloud_rect;strokeWidth=2;",a,c,f);break;case "cloud":d=p("ellipse;shape=cloud;strokeWidth=2;",a,c,f);break;case "roundedRect":d=p("rounded=1;arcSize=40;strokeWidth=2",a,c,f);break;case "smilingFace":d=p("shape=image;imageAspect=0;aspect=fixed;image=https://cdn1.iconfinder.com/data/icons/hawcons/32/699734-icon-6-smiling-face-128.png;imageBackground=default;",a,c,f);break;case "sadFace":d=p("shape=image;imageAspect=0;aspect=fixed;image=https://cdn1.iconfinder.com/data/icons/hawcons/32/699741-icon-7-sad-face-128.png;imageBackground=default;",
a,c,f);break;case "neutralFace":d=p("shape=image;imageAspect=0;aspect=fixed;image=https://cdn1.iconfinder.com/data/icons/hawcons/32/699721-icon-5-neutral-face-128.png;imageBackground=default;",a,c,f);break;case "gitBranch":d=p("line;dashed=1;strokeWidth=1;labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;spacingRight=35;spacingTop=0;spacing=0;backgroundOutline=0;html=1;"+(a.isHidden?"strokeColor=none;":"labelBackgroundColor="+a.color[1]+";fontColor="+a.color[0]+";"),
a,c,f);break;case "gitCommit":d="";switch(a.type){case 0:case 1:d="strokeColor="+a.color[1]+";fillColor="+a.color[1];break;case 2:d="strokeColor=none;fillColor=none";break;case 3:a.labelText="";d="strokeColor="+a.color[1]+";fillColor=#efefef";break;case 4:a.labelText="",d="strokeColor=#efefef;fillColor=#efefef"}d=p("ellipse;verticalAlign=middle;labelPosition=left;verticalLabelPosition=middle;align=right;rotation=300;spacingRight=4;labelBackgroundColor=default;strokeWidth=5;"+d+";",a,c,f);switch(a.type){case 1:q(f,
d,null,"",5,5,a.width-10,a.height-10,"shape=umlDestroy;strokeWidth=3;strokeColor=#efefef;");break;case 2:q(f,d,null,"",0,0,a.width,a.height,"strokeWidth=5;strokeColor=#1c1c1c;fillColor=#efefef;");break;case 4:q(f,d,null,"",2,2,a.width-5,a.height-5,"shape=image;imageAspect=0;aspect=fixed;image=https://cdn3.iconfinder.com/data/icons/essential-pack/32/68-Cherry-128.png")}a.tag&&(c=6*a.tag.length+20,q(f,d,null,r(a.tag),0,-c/2-a.width/2-5,a.height,c,"shape=loopLimit;size=8;rotation=90;horizontal=0;flipV=1;fillColor=#efefef;strokeColor=#DEDEDE;"))}a.link&&
f.setAttributeForCell(d,"link",a.link);a.linkTarget&&f.setAttributeForCell(d,"linkTarget",a.linkTarget);a.tooltip&&f.setAttributeForCell(d,"tooltip",a.tooltip);return d}function B(a,c){switch(a){case "extension":return c+"Arrow=block;"+c+"Size=16;"+c+"Fill=0";case "composition":return c+"Arrow=diamondThin;"+c+"Size=14;"+c+"Fill=1";case "aggregation":return c+"Arrow=diamondThin;"+c+"Size=14;"+c+"Fill=0";case "dependency":return c+"Arrow=open;"+c+"Size=12";case "arrow_point":return c+"Arrow=block";
case "arrow_open":case "none":case void 0:return c+"Arrow=none";case "arrow_circle":return c+"Arrow=oval;"+c+"Size=10;"+c+"Fill=1";case "arrow_cross":return c+"Arrow=cross";case "ZERO_OR_MORE":return c+"Arrow=ERmany;"+c+"Size=10;";case "ONLY_ONE":return c+"Arrow=ERmandOne;"+c+"Size=10;";case "ONE_OR_MORE":return c+"Arrow=ERoneToMany;"+c+"Size=10;";case "ZERO_OR_ONE":return c+"Arrow=ERzeroToOne;"+c+"Size=10;";case "circlePlus":return c+"Arrow=circlePlus;"+c+"Size=10;"+c+"Fill=0"}}function C(a,c,f){f=
a[f];for(var b in c)if(-1!=b.indexOf("a")){var e=parseInt(b.substring(0,b.length-1));if(!(20<Math.abs(e-f))){e=c[b];for(var g=0;g<e.length;g++){var k=e[g].geometry;if(k.y<=a.stopy&&k.y+k.height>=a.stopy)return e[g]}}}for(b in c)if(!(-1<b.indexOf("a"))&&(e=parseInt(b),20>=Math.abs(e-f)))return c[b];return null}function G(a,c,f){var b="";switch(a.type){case 1:b="dashed=1;dashPattern=2 3;";break;case 3:b="endArrow=cross;";break;case 4:b="endArrow=cross;dashed=1;dashPattern=2 3;";break;case 5:b="endArrow=none;";
break;case 6:b="endArrow=none;dashed=1;dashPattern=2 3;";break;case 24:b="endArrow=classic;endSize=10;";break;case 25:b="endArrow=classic;dashed=1;dashPattern=2 3;endSize=10;"}var e=C(a,c,"startx"),g=C(a,c,"stopx");c=e==g;f=f.insertEdge(null,null,r(a.message),e,g,(c?"curved=1;":"verticalAlign=bottom;endArrow=block;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;")+b);f.geometry.points=c?[new mxPoint(Math.round(a.startx+50),Math.round(a.stopy-30)),new mxPoint(Math.round(a.startx+50),Math.round(a.stopy))]:
[new mxPoint(Math.round(Math.min(a.startx,a.stopx)+a.width/2),Math.round(a.stopy))];return f}function H(a,c){for(var f={},b=0;b<a.actors.length;b++){var e=a.actors[b];if(!f[e.name]){e.shape="actor"==e.type?"actorLifeline":"lifeline";e.size=e.height;e.height=a.verticalPos;e.y=0;var g=x(e,null,c,!0);f[e.x+e.width/2]=g;f[e.name]=g}}var k=[];for(b=0;b<a.messages.length;b++)k.push(a.messages[b].stopy);k.sort(function(m,n){return m-n});a.activations.sort(function(m,n){return m.starty-n.starty});var d=0;
for(b=0;b<a.activations.length;b++){var l=function(m,n){null==f[m]&&(f[m]=[]);f[m].push(n)},h=a.activations[b];e=f[h.actor];for(g=e.geometry;d<k.length&&k[d]<h.starty;)d++;h.x=h.startx-g.x;h.y=k[d-1];h.width=h.stopx-h.startx;h.height=h.stopy-k[d-1];h.shape="activation";g=x(h,e,c,!0);l(h.startx+"a",g);l(h.stopx+"a",g)}for(b=0;b<a.loops.length;b++)e=a.loops[b],e.x=e.startx,e.y=e.starty,e.width=e.stopx-e.startx,e.height=e.stopy-e.starty,e.shape="loop",x(e,null,c,!0);for(b=0;b<a.messages.length;b++)G(a.messages[b],
f,c);for(b=0;b<a.notes.length;b++)e=a.notes[b],e.shape="seqNote",e.x=e.startx,e.y=e.starty,x(e,null,c,!0);for(b=0;b<a.actors.length;b++)if(e=a.actors[b],"actor"==e.type&&!e.secondPass){g=f[e.name];for(d=0;g.children&&d<g.children.length;d++)g.children[d].geometry.x-=(g.geometry.width-35)/2;g.geometry.width=35;e.secondPass=!0}}function D(a,c,f){var b=a._nodes,e={},g=a._edgeObjs;a=a._edgeLabels;for(var k in b)e[k]=x(b[k],c,f),b[k].clusterNode&&(delete b[k].graph._nodes[k],D(b[k].graph,e[k],f));for(k in g){var d=
g[k];b=a[k];var l=f,h=e[b.fromCluster||d.v];d=e[b.toCluster||d.w];var m=b.label;b.relationship&&(m=b.relationship.type?"<<"+b.relationship.type+">>":b.relationship.roleA);var n=l,u=n.insertEdge;m=r(m);var t=b;var w=["curved=1"];if(t.relationship){var v=t.relationship.type;t.relationship.relSpec?(v=t.relationship.relSpec,t.arrowTypeStart=v.cardB,t.arrowTypeEnd=v.cardA,t.pattern="NON_IDENTIFYING"==v.relType?"dashed":"solid"):v&&(v="contains"==v,t.pattern=v?"solid":"bigDashed",t.arrowTypeStart=v?"circlePlus":
"none",t.arrowTypeEnd=v?"none":"dependency")}switch(t.pattern){case "dotted":w.push("dashed=1;dashPattern=2 3");break;case "dashed":w.push("dashed=1");break;case "bigDashed":w.push("dashed=1;dashPattern=8 8")}t.classes&&-1!=t.classes.indexOf("note-edge")&&w.push("dashed=1");w.push(B(t.arrowTypeStart,"start"));w.push(B(t.arrowTypeEnd,"end"));"thick"==t.thickness&&w.push("strokeWidth=3");t=w.join(";")+";";n=u.call(n,c,null,m,h,d,t);b.startLabelRight&&(u=q(l,n,null,r(b.startLabelRight),-1,0,0,0,"edgeLabel;resizable=0;align=left;verticalAlign=top;"),
u.geometry.relative=!0);b.endLabelLeft&&(u=q(l,n,null,r(b.endLabelLeft),.5,0,0,0,"edgeLabel;resizable=0;align=right;verticalAlign=top;"),u.geometry.relative=!0);n.geometry.points=[];if(b.fromCluster||b.toCluster)b.points=null;if(b.points&&2<=b.points.length)for(u=b.points.shift(),l=b.points.pop(),h=h.geometry,d=d.geometry,n.style+="exitX="+(u.x-h.x)/h.width+";exitY="+(u.y-h.y)/h.height+";entryX="+(l.x-d.x)/d.width+";entryY="+(l.y-d.y)/d.height+";",h=u,d=0;d<b.points.length;d++)if(u=b.points[d],m=
b.points[d+1]||l,h.x!=u.x&&h.y!=u.y||null==m||m.x!=u.x&&m.y!=u.y)h=u,n.geometry.points.push(new mxPoint(Math.round(u.x),Math.round(u.y)))}}function I(a){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;if("gitgraph"==z){var f={},b=0,e=0;for(l in a.commitPos)b=Math.max(b,a.commitPos[l].x);for(var g in a.branchPos){var k=a.branchPos[g];k.shape="gitBranch";k.labelText=g;k.y=k.pos;k.x=0;k.width=b+50;k.height=
1;k.isHidden=!a.gitGraphConfig.showBranches;var d=E[e++%E.length];k.color=d;var l=x(k,null,c,!0);l.value=a.gitGraphConfig.showBranches?'<p style="line-height: 50%;">&nbsp;&nbsp;'+mxUtils.htmlEntities(l.value)+"&nbsp;&nbsp;</p>":"";f[k.pos]={node:l,color:d}}b={};e=[];for(g in a.commitPos)for(l=a.commitPos[g],Object.assign(l,a.commits[g]),k=f[l.y],l.shape="gitCommit",l.pos=l.y,l.y=0,l.width=20,l.height=20,l.labelText=a.gitGraphConfig.showCommitLabel?g:"",l.color=k.color,l.type=l.customType||l.type,
b[g]=x(l,k.node,c),k.commitList=k.commitList||[],k.commitList.push(l.x),d=0;d<l.parents.length;d++){var h=l.parents[d],m=a.commitPos[h];parentPos=null!=m.pos?m.pos:m.y;e.push({source:h,target:g,color:l.pos>=parentPos?k.color:f[parentPos].color,clr2:k.color})}for(d=0;d<e.length;d++){a=e[d];g=b[a.source];l=b[a.target];k=c.insertEdge(null,null,null,g,l,"rounded=1;endArrow=none;endFill=0;strokeWidth=8;");h=g.parent.geometry.y;var n=l.parent.geometry.y;m=!1;if(h!=n){for(var u=f[n],t=0,w=0;w<u.commitList.length;w++){var v=
u.commitList[w];v>g.geometry.x&&v<l.geometry.x&&t++}0<t?(h=(h+n)/2,k.geometry.points=[new mxPoint(Math.round(g.geometry.x+g.geometry.width/2),Math.round(h)),new mxPoint(Math.round(l.geometry.x+l.geometry.width/2),Math.round(h))],m=!0):(n=Math.max(h,n),k.geometry.points=[new mxPoint(h==n?Math.round(l.geometry.x+l.geometry.width/2):Math.round(g.geometry.x+g.geometry.width/2),Math.round(n))])}k.style=m?k.style+("strokeColor="+a.clr2[1]+";"):k.style+("strokeColor="+a.color[1]+";")}}else if("journey"==
z){g=a.tasks;l=null;b=Number.MAX_SAFE_INTEGER;e=0;d=Number.MAX_SAFE_INTEGER;for(k=0;k<g.length;k++){h=g[k];h.shape="lifeline";h.description=h.task;h.size=3*h.height;h.width*=3;h.height=300;b=Math.min(b,h.x);e=Math.max(e,h.x+h.width);d=Math.min(d,h.y+h.size);m=x(h,null,c,!0);x({shape:3>h.score?"sadFace":3<h.score?"smilingFace":"neutralFace",x:h.width/2-15,y:270-25*h.score,width:30,height:30},m,c,!0);n=0;for(f in h.actors)q(c,m,null,null,5+8*n++,-6,12,12,"ellipse;aspect=fixed;fillColor="+h.actors[f].color);
l!=h.section&&(l=h.section,h.labelText=h.section,h.shape="rect",h.height=h.size,h.y-=h.height+10,x(h,null,c,!0))}g=c.insertEdge(null,null,null,null,null,"endArrow=block;strokeWidth=3;endFill=1;");g.geometry.setTerminalPoint(new mxPoint(Math.round(b),Math.round(d+50)),!0);g.geometry.setTerminalPoint(new mxPoint(Math.round(e+50),Math.round(d+50)),!1);g.geometry.relative=!0;a.title&&q(c,null,null,r(a.title),b,0,12*a.title.length,40,"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;fontSize=20;fontStyle=1");
for(f in a.actors)b=a.actors[f],q(c,null,null,f,10,70+20*b.position,12,12,"ellipse;aspect=fixed;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=10;fillColor="+b.color)}else if("Mindmap"==z){e=a._private.elements;a={};f={};for(d=0;d<e.length;d++){g=e[d]._private.data;switch(g.type){case 1:g.shape="roundedRect";break;case 2:g.shape="rect";break;case 3:g.shape="circle";g.width=Math.max(g.height,g.width);g.height=g.width;break;case 4:g.shape="cloud";break;
case 5:g.shape="rectCloud";break;case 6:g.shape="hexagon";break;default:g.shape="rect",g.type="round"}isNaN(g.x)||isNaN(g.y)||(a[g.id]=x(g,null,c));g=e[d]._private.edges;for(l=0;l<g.length;l++)k=g[l]._private.data,f[k.id]=k}for(b in f)e=f[b],c.insertEdge(null,null,null,a[e.source],a[e.target],"endArrow=none")}else if("sequenceDiagram"==z)H(a,c);else{if("ERD"==z){for(e in y)y[e].title=e,y[e.replace(/-|_/g,"")]=y[e];for(e in a._nodes)f=y[e.split("-")[1]],b=a._nodes[e],b.shape="erdEntity",b.labelText=
f.title,b.entityData=f}else if("requirements"==z)for(e in a._nodes)b=a._nodes[e],b.shape=y.elements[e]?"element":"requirement",b.data=y.elements[e]||y.requirements[e];D(a,null,c)}b=(new mxCodec).encode(c.getModel());c=mxUtils.getXml(b);for(a=0;a<mxMermaidToDrawio.listeners.length;a++)mxMermaidToDrawio.listeners[a](c);"1"!=urlParams.mermaidToDrawioTest&&(mxMermaidToDrawio.listeners=[])}if(0!=mxMermaidToDrawio.listeners.length){var E=[["#000","#b4b4b4"],["#fff","#555"],["#000","#bbb"],["#fff","#777"],
["#000","#999"],["#000","#ddd"],["#000","#fff"],["#000","#ddd"]],F="statediagram"==z;try{return I(A)}catch(a){console.log("mermaidToDrawio",a)}}};mxMermaidToDrawio.listeners=[];mxMermaidToDrawio.addListener=function(A){mxMermaidToDrawio.listeners.push(A)};
ØA
—Eoúô