@nocobase/app 1.3.41-beta → 1.3.43-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/client/501.e8db2401.async.js +1 -0
  2. package/dist/client/9210.ece4c1b8.async.js +66 -0
  3. package/dist/client/index.html +1 -1
  4. package/dist/client/index.html.tpl +1 -1
  5. package/dist/client/npm._at_ant-design.8385a159.async.js +111 -0
  6. package/dist/client/npm._at_formily.3ea3d9f9.async.js +101 -0
  7. package/dist/client/npm.antd.a2686812.async.js +475 -0
  8. package/dist/client/npm.buffer.fe16e7ac.async.js +1 -0
  9. package/dist/client/npm.mermaid.4531221b.async.js +1530 -0
  10. package/dist/client/{npm.postcss.368fceaf.async.js → npm.postcss.8cedfdbe.async.js} +2 -2
  11. package/dist/client/{npm.quill.e91b3c12.async.js → npm.quill.6ed38877.async.js} +1 -1
  12. package/dist/client/p__index.7a52cf56.async.js +1509 -0
  13. package/dist/client/{umi.934e1731.js → umi.14065059.js} +2 -2
  14. package/package.json +6 -6
  15. package/dist/client/501.8710a04b.async.js +0 -1
  16. package/dist/client/6718.1e7fe05d.async.js +0 -66
  17. package/dist/client/npm._at_ant-design.4fe52a2f.async.js +0 -110
  18. package/dist/client/npm._at_emotion.0c6b11eb.async.js +0 -2
  19. package/dist/client/npm._at_formily.f9d0b213.async.js +0 -101
  20. package/dist/client/npm.antd-style.47ebbe31.async.js +0 -1
  21. package/dist/client/npm.antd.91188318.async.js +0 -476
  22. package/dist/client/npm.buffer.9cce4593.async.js +0 -1
  23. package/dist/client/npm.html-tokenize.360bb6e8.async.js +0 -1
  24. package/dist/client/npm.mermaid.7057e144.async.js +0 -1530
  25. package/dist/client/npm.readable-stream.41117b5f.async.js +0 -1
  26. package/dist/client/p__index.13c0dbdf.async.js +0 -1509
@@ -0,0 +1,1530 @@
1
+ !(function(){"use strict";var Ab=Object.defineProperty,Lb=Object.defineProperties;var Bb=Object.getOwnPropertyDescriptors;var yd=Object.getOwnPropertySymbols;var Ib=Object.prototype.hasOwnProperty,Db=Object.prototype.propertyIsEnumerable;var md=(Qi,ai,ct)=>ai in Qi?Ab(Qi,ai,{enumerable:!0,configurable:!0,writable:!0,value:ct}):Qi[ai]=ct,Ba=(Qi,ai)=>{for(var ct in ai||(ai={}))Ib.call(ai,ct)&&md(Qi,ct,ai[ct]);if(yd)for(var ct of yd(ai))Db.call(ai,ct)&&md(Qi,ct,ai[ct]);return Qi},Pc=(Qi,ai)=>Lb(Qi,Bb(ai));var br=(Qi,ai,ct)=>new Promise((Pt,Qe)=>{var oi=Ji=>{try{Q(ct.next(Ji))}catch(xr){Qe(xr)}},Vi=Ji=>{try{Q(ct.throw(Ji))}catch(xr){Qe(xr)}},Q=Ji=>Ji.done?Pt(Ji.value):Promise.resolve(Ji.value).then(oi,Vi);Q((ct=ct.apply(Qi,ai)).next())});(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[9517],{19487:function(Qi,ai,ct){ct.d(ai,{diagram:function(){return $i}});var Pt=ct(4737),Qe=ct(23198),oi=ct(43349),Vi=ct(17295),Q=ct.n(Vi),Ji=ct(27484),xr=ct.n(Ji),ot=ct(17967),Ot=ct(77482),de=ct.n(Ot),oe=ct(99791),Xs=ct(45625),Ks=ct(46060),Zo=ct(91518),Vn=ct(59542),Ho=ct.n(Vn),Qs=ct(10285),Yn=ct.n(Qs),Bs=ct(28734),Go=ct.n(Bs);const Is=(vt,Yt,zt)=>{const{parentById:Zt}=zt,te=new Set;let ve=vt;for(;ve;){if(te.add(ve),ve===Yt)return ve;ve=Zt[ve]}for(ve=Yt;ve;){if(te.has(ve))return ve;ve=Zt[ve]}return"root"},Js=new(Q()),hi={},gn={};let Bi={};const us=function(vt,Yt,zt,Zt,te,ve,Ge){const le=zt.select(`[id="${Yt}"]`),ui=le.insert("g").attr("class","nodes");return Object.keys(vt).forEach(function(ge){const ke=vt[ge];let Ui="default";ke.classes.length>0&&(Ui=ke.classes.join(" "));const ki=(0,Pt.a)(ke.styles);let Gt=ke.text!==void 0?ke.text:ke.id,$e;const Je={width:0,height:0};if((0,Pt.e)((0,Pt.g)().flowchart.htmlLabels)){const $={label:Gt.replace(/fa[blrs]?:fa-[\w-]+/g,V=>`<i class='${V.replace(":"," ")}'></i>`)};$e=(0,oi.a)(le,$).node();const ut=$e.getBBox();Je.width=ut.width,Je.height=ut.height,Je.labelNode=$e,$e.parentNode.removeChild($e)}else{const $=Zt.createElementNS("http://www.w3.org/2000/svg","text");$.setAttribute("style",ki.labelStyle.replace("color:","fill:"));const ut=Gt.split(Pt.c.lineBreakRegex);for(const D of ut){const X=Zt.createElementNS("http://www.w3.org/2000/svg","tspan");X.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),X.setAttribute("dy","1em"),X.setAttribute("x","1"),X.textContent=D,$.appendChild(X)}$e=$;const V=$e.getBBox();Je.width=V.width,Je.height=V.height,Je.labelNode=$e}const ti=[{id:ke.id+"-west",layoutOptions:{"port.side":"WEST"}},{id:ke.id+"-east",layoutOptions:{"port.side":"EAST"}},{id:ke.id+"-south",layoutOptions:{"port.side":"SOUTH"}},{id:ke.id+"-north",layoutOptions:{"port.side":"NORTH"}}];let di=0,We="",Zi={};switch(ke.type){case"round":di=5,We="rect";break;case"square":We="rect";break;case"diamond":We="question",Zi={portConstraints:"FIXED_SIDE"};break;case"hexagon":We="hexagon";break;case"odd":We="rect_left_inv_arrow";break;case"lean_right":We="lean_right";break;case"lean_left":We="lean_left";break;case"trapezoid":We="trapezoid";break;case"inv_trapezoid":We="inv_trapezoid";break;case"odd_right":We="rect_left_inv_arrow";break;case"circle":We="circle";break;case"ellipse":We="ellipse";break;case"stadium":We="stadium";break;case"subroutine":We="subroutine";break;case"cylinder":We="cylinder";break;case"group":We="rect";break;case"doublecircle":We="doublecircle";break;default:We="rect"}const Lr={labelStyle:ki.labelStyle,shape:We,labelText:Gt,rx:di,ry:di,class:Ui,style:ki.style,id:ke.id,link:ke.link,linkTarget:ke.linkTarget,tooltip:te.db.getTooltip(ke.id)||"",domId:te.db.lookUpDomId(ke.id),haveCallback:ke.haveCallback,width:ke.type==="group"?500:void 0,dir:ke.dir,type:ke.type,props:ke.props,padding:(0,Pt.g)().flowchart.padding};let Br,or;Lr.type!=="group"&&(or=(0,Pt.b)(ui,Lr,ke.dir),Br=or.node().getBBox());const bt={id:ke.id,ports:ke.type==="diamond"?ti:[],layoutOptions:Zi,labelText:Gt,labelData:Je,domId:te.db.lookUpDomId(ke.id),width:Br==null?void 0:Br.width,height:Br==null?void 0:Br.height,type:ke.type,el:or,parent:ve.parentById[ke.id]};Bi[Lr.id]=bt}),Ge},zi=(vt,Yt,zt)=>{const Zt={TB:{in:{north:"north"},out:{south:"west",west:"east",east:"south"}},LR:{in:{west:"west"},out:{east:"south",south:"north",north:"east"}},RL:{in:{east:"east"},out:{west:"north",north:"south",south:"west"}},BT:{in:{south:"south"},out:{north:"east",east:"west",west:"north"}}};return Zt.TD=Zt.TB,Pt.l.info("abc88",zt,Yt,vt),Zt[zt][Yt][vt]},xi=(vt,Yt,zt)=>{if(Pt.l.info("getNextPort abc88",{node:vt,edgeDirection:Yt,graphDirection:zt}),!hi[vt])switch(zt){case"TB":case"TD":hi[vt]={inPosition:"north",outPosition:"south"};break;case"BT":hi[vt]={inPosition:"south",outPosition:"north"};break;case"RL":hi[vt]={inPosition:"east",outPosition:"west"};break;case"LR":hi[vt]={inPosition:"west",outPosition:"east"};break}const Zt=Yt==="in"?hi[vt].inPosition:hi[vt].outPosition;return Yt==="in"?hi[vt].inPosition=zi(hi[vt].inPosition,Yt,zt):hi[vt].outPosition=zi(hi[vt].outPosition,Yt,zt),Zt},Ds=(vt,Yt)=>{let zt=vt.start,Zt=vt.end;const te=Bi[zt],ve=Bi[Zt];return!te||!ve?{source:zt,target:Zt}:(te.type==="diamond"&&(zt=`${zt}-${xi(zt,"out",Yt)}`),ve.type==="diamond"&&(Zt=`${Zt}-${xi(Zt,"in",Yt)}`),{source:zt,target:Zt})},ds=function(vt,Yt,zt,Zt){Pt.l.info("abc78 edges = ",vt);const te=Zt.insert("g").attr("class","edgeLabels");let ve={},Ge=Yt.db.getDirection(),le,ui;if(vt.defaultStyle!==void 0){const pe=(0,Pt.a)(vt.defaultStyle);le=pe.style,ui=pe.labelStyle}return vt.forEach(function(pe){var ge="L-"+pe.start+"-"+pe.end;ve[ge]===void 0?(ve[ge]=0,Pt.l.info("abc78 new entry",ge,ve[ge])):(ve[ge]++,Pt.l.info("abc78 new entry",ge,ve[ge]));let ke=ge+"-"+ve[ge];Pt.l.info("abc78 new link id to be used is",ge,ke,ve[ge]);var Ui="LS-"+pe.start,ki="LE-"+pe.end;const Gt={style:"",labelStyle:""};switch(Gt.minlen=pe.length||1,pe.type==="arrow_open"?Gt.arrowhead="none":Gt.arrowhead="normal",Gt.arrowTypeStart="arrow_open",Gt.arrowTypeEnd="arrow_open",pe.type){case"double_arrow_cross":Gt.arrowTypeStart="arrow_cross";case"arrow_cross":Gt.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":Gt.arrowTypeStart="arrow_point";case"arrow_point":Gt.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":Gt.arrowTypeStart="arrow_circle";case"arrow_circle":Gt.arrowTypeEnd="arrow_circle";break}let $e="",Je="";switch(pe.stroke){case"normal":$e="fill:none;",le!==void 0&&($e=le),ui!==void 0&&(Je=ui),Gt.thickness="normal",Gt.pattern="solid";break;case"dotted":Gt.thickness="normal",Gt.pattern="dotted",Gt.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":Gt.thickness="thick",Gt.pattern="solid",Gt.style="stroke-width: 3.5px;fill:none;";break}if(pe.style!==void 0){const Zi=(0,Pt.a)(pe.style);$e=Zi.style,Je=Zi.labelStyle}Gt.style=Gt.style+=$e,Gt.labelStyle=Gt.labelStyle+=Je,pe.interpolate!==void 0?Gt.curve=(0,Pt.d)(pe.interpolate,Qe.c_6):vt.defaultInterpolate!==void 0?Gt.curve=(0,Pt.d)(vt.defaultInterpolate,Qe.c_6):Gt.curve=(0,Pt.d)(gn.curve,Qe.c_6),pe.text===void 0?pe.style!==void 0&&(Gt.arrowheadStyle="fill: #333"):(Gt.arrowheadStyle="fill: #333",Gt.labelpos="c"),Gt.labelType="text",Gt.label=pe.text.replace(Pt.c.lineBreakRegex,`
2
+ `),pe.style===void 0&&(Gt.style=Gt.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),Gt.labelStyle=Gt.labelStyle.replace("color:","fill:"),Gt.id=ke,Gt.classes="flowchart-link "+Ui+" "+ki;const ti=(0,Pt.f)(te,Gt),{source:di,target:We}=Ds(pe,Ge);Pt.l.debug("abc78 source and target",di,We),zt.edges.push({id:"e"+pe.start+pe.end,sources:[di],targets:[We],labelEl:ti,labels:[{width:Gt.width,height:Gt.height,orgWidth:Gt.width,orgHeight:Gt.height,text:Gt.label,layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}}],edgeData:Gt})}),zt},$s=function(vt,Yt,zt,Zt){let te="";switch(Zt&&(te=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,te=te.replace(/\(/g,"\\("),te=te.replace(/\)/g,"\\)")),Yt.arrowTypeStart){case"arrow_cross":vt.attr("marker-start","url("+te+"#"+zt+"-crossStart)");break;case"arrow_point":vt.attr("marker-start","url("+te+"#"+zt+"-pointStart)");break;case"arrow_barb":vt.attr("marker-start","url("+te+"#"+zt+"-barbStart)");break;case"arrow_circle":vt.attr("marker-start","url("+te+"#"+zt+"-circleStart)");break;case"aggregation":vt.attr("marker-start","url("+te+"#"+zt+"-aggregationStart)");break;case"extension":vt.attr("marker-start","url("+te+"#"+zt+"-extensionStart)");break;case"composition":vt.attr("marker-start","url("+te+"#"+zt+"-compositionStart)");break;case"dependency":vt.attr("marker-start","url("+te+"#"+zt+"-dependencyStart)");break;case"lollipop":vt.attr("marker-start","url("+te+"#"+zt+"-lollipopStart)");break}switch(Yt.arrowTypeEnd){case"arrow_cross":vt.attr("marker-end","url("+te+"#"+zt+"-crossEnd)");break;case"arrow_point":vt.attr("marker-end","url("+te+"#"+zt+"-pointEnd)");break;case"arrow_barb":vt.attr("marker-end","url("+te+"#"+zt+"-barbEnd)");break;case"arrow_circle":vt.attr("marker-end","url("+te+"#"+zt+"-circleEnd)");break;case"aggregation":vt.attr("marker-end","url("+te+"#"+zt+"-aggregationEnd)");break;case"extension":vt.attr("marker-end","url("+te+"#"+zt+"-extensionEnd)");break;case"composition":vt.attr("marker-end","url("+te+"#"+zt+"-compositionEnd)");break;case"dependency":vt.attr("marker-end","url("+te+"#"+zt+"-dependencyEnd)");break;case"lollipop":vt.attr("marker-end","url("+te+"#"+zt+"-lollipopEnd)");break}},Rs=function(vt,Yt){Pt.l.info("Extracting classes"),Yt.db.clear("ver-2");try{return Yt.parse(vt),Yt.db.getClasses()}catch(zt){return{}}},Ns=function(vt){const Yt={parentById:{},childrenById:{}},zt=vt.getSubGraphs();return Pt.l.info("Subgraphs - ",zt),zt.forEach(function(Zt){Zt.nodes.forEach(function(te){Yt.parentById[te]=Zt.id,Yt.childrenById[Zt.id]===void 0&&(Yt.childrenById[Zt.id]=[]),Yt.childrenById[Zt.id].push(te)})}),zt.forEach(function(Zt){Zt.id,Yt.parentById[Zt.id]!==void 0&&Yt.parentById[Zt.id]}),Yt},ts=function(vt,Yt,zt){const Zt=Is(vt,Yt,zt);if(Zt===void 0||Zt==="root")return{x:0,y:0};const te=Bi[Zt].offset;return{x:te.posX,y:te.posY}},Ze=function(vt,Yt,zt,Zt,te){const ve=ts(Yt.sources[0],Yt.targets[0],te),Ge=Yt.sections[0].startPoint,le=Yt.sections[0].endPoint,pe=(Yt.sections[0].bendPoints?Yt.sections[0].bendPoints:[]).map(Je=>[Je.x+ve.x,Je.y+ve.y]),ge=[[Ge.x+ve.x,Ge.y+ve.y],...pe,[le.x+ve.x,le.y+ve.y]],ke=(0,Qe.jvg)().curve(Qe.c_6),Ui=vt.insert("path").attr("d",ke(ge)).attr("class","path").attr("fill","none"),ki=vt.insert("g").attr("class","edgeLabel"),Gt=(0,Qe.Ys)(ki.node().appendChild(Yt.labelEl)),$e=Gt.node().firstChild.getBoundingClientRect();Gt.attr("width",$e.width),Gt.attr("height",$e.height),ki.attr("transform",`translate(${Yt.labels[0].x+ve.x}, ${Yt.labels[0].y+ve.y})`),$s(Ui,zt,Zt.type,Zt.arrowMarkerAbsolute)},Os=(vt,Yt)=>{vt.forEach(zt=>{zt.children||(zt.children=[]);const Zt=Yt.childrenById[zt.id];Zt&&Zt.forEach(te=>{zt.children.push(Bi[te])}),Os(zt.children,Yt)})},es=function(vt,Yt,zt,Zt){return br(this,null,function*(){var te;Zt.db.clear(),Bi={},Zt.db.setGen("gen-2"),Zt.parser.parse(vt);const ve=(0,Qe.Ys)("body").append("div").attr("style","height:400px").attr("id","cy");let Ge={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","org.eclipse.elk.padding":"[top=100, left=100, bottom=110, right=110]","elk.layered.spacing.edgeNodeBetweenLayers":"30","elk.direction":"DOWN"},children:[],edges:[]};switch(Pt.l.info("Drawing flowchart using v3 renderer",Js),Zt.db.getDirection()){case"BT":Ge.layoutOptions["elk.direction"]="UP";break;case"TB":Ge.layoutOptions["elk.direction"]="DOWN";break;case"LR":Ge.layoutOptions["elk.direction"]="RIGHT";break;case"RL":Ge.layoutOptions["elk.direction"]="LEFT";break}const{securityLevel:ui,flowchart:pe}=(0,Pt.g)();let ge;ui==="sandbox"&&(ge=(0,Qe.Ys)("#i"+Yt));const ke=ui==="sandbox"?(0,Qe.Ys)(ge.nodes()[0].contentDocument.body):(0,Qe.Ys)("body"),Ui=ui==="sandbox"?ge.nodes()[0].contentDocument:document,ki=ke.select(`[id="${Yt}"]`),Gt=["point","circle","cross"];(0,Pt.i)(ki,Gt,Zt.type,Zt.arrowMarkerAbsolute);const $e=Zt.db.getVertices();let Je;const ti=Zt.db.getSubGraphs();Pt.l.info("Subgraphs - ",ti);for(let bt=ti.length-1;bt>=0;bt--)Je=ti[bt],Zt.db.addVertex(Je.id,Je.title,"group",void 0,Je.classes,Je.dir);const di=ki.insert("g").attr("class","subgraphs"),We=Ns(Zt.db);Ge=us($e,Yt,ke,Ui,Zt,We,Ge);const Zi=ki.insert("g").attr("class","edges edgePath"),Lr=Zt.db.getEdges();Ge=ds(Lr,Zt,Ge,ki),Object.keys(Bi).forEach(bt=>{const $=Bi[bt];$.parent||Ge.children.push($),We.childrenById[bt]!==void 0&&($.labels=[{text:$.labelText,layoutOptions:{"nodeLabels.placement":"[H_CENTER, V_TOP, INSIDE]"},width:$.labelData.width,height:$.labelData.height}],delete $.x,delete $.y,delete $.width,delete $.height)}),Os(Ge.children,We),Pt.l.info("after layout",JSON.stringify(Ge,null,2));const or=yield Js.layout(Ge);tn(0,0,or.children,ki,di,Zt,0),Pt.l.info("after layout",or),(te=or.edges)==null||te.map(bt=>{Ze(Zi,bt,bt.edgeData,Zt,We)}),(0,Pt.s)({},ki,pe.diagramPadding,pe.useMaxWidth),ve.remove()})},tn=(vt,Yt,zt,Zt,te,ve,Ge)=>{zt.forEach(function(le){if(le)if(Bi[le.id].offset={posX:le.x+vt,posY:le.y+Yt,x:vt,y:Yt,depth:Ge,width:le.width,height:le.height},le.type==="group"){const ui=te.insert("g").attr("class","subgraph");ui.insert("rect").attr("class","subgraph subgraph-lvl-"+Ge%5+" node").attr("x",le.x+vt).attr("y",le.y+Yt).attr("width",le.width).attr("height",le.height);const pe=ui.insert("g").attr("class","label");pe.attr("transform",`translate(${le.labels[0].x+vt+le.x}, ${le.labels[0].y+Yt+le.y})`),pe.node().appendChild(le.labelData.labelNode),Pt.l.info("Id (UGH)= ",le.type,le.labels)}else Pt.l.info("Id (UGH)= ",le.id),le.el.attr("transform",`translate(${le.x+vt+le.width/2}, ${le.y+Yt+le.height/2})`)}),zt.forEach(function(le){le&&le.type==="group"&&tn(vt+le.x,Yt+le.y,le.children,Zt,te,ve,Ge+1)})},Wi={getClasses:Rs,draw:es},Fs=vt=>{let Yt="";for(let zt=0;zt<5;zt++)Yt+=`
3
+ .subgraph-lvl-${zt} {
4
+ fill: ${vt[`surface${zt}`]};
5
+ stroke: ${vt[`surfacePeer${zt}`]};
6
+ }
7
+ `;return Yt},zr=vt=>`.label {
8
+ font-family: ${vt.fontFamily};
9
+ color: ${vt.nodeTextColor||vt.textColor};
10
+ }
11
+ .cluster-label text {
12
+ fill: ${vt.titleColor};
13
+ }
14
+ .cluster-label span {
15
+ color: ${vt.titleColor};
16
+ }
17
+
18
+ .label text,span {
19
+ fill: ${vt.nodeTextColor||vt.textColor};
20
+ color: ${vt.nodeTextColor||vt.textColor};
21
+ }
22
+
23
+ .node rect,
24
+ .node circle,
25
+ .node ellipse,
26
+ .node polygon,
27
+ .node path {
28
+ fill: ${vt.mainBkg};
29
+ stroke: ${vt.nodeBorder};
30
+ stroke-width: 1px;
31
+ }
32
+
33
+ .node .label {
34
+ text-align: center;
35
+ }
36
+ .node.clickable {
37
+ cursor: pointer;
38
+ }
39
+
40
+ .arrowheadPath {
41
+ fill: ${vt.arrowheadColor};
42
+ }
43
+
44
+ .edgePath .path {
45
+ stroke: ${vt.lineColor};
46
+ stroke-width: 2.0px;
47
+ }
48
+
49
+ .flowchart-link {
50
+ stroke: ${vt.lineColor};
51
+ fill: none;
52
+ }
53
+
54
+ .edgeLabel {
55
+ background-color: ${vt.edgeLabelBackground};
56
+ rect {
57
+ opacity: 0.5;
58
+ background-color: ${vt.edgeLabelBackground};
59
+ fill: ${vt.edgeLabelBackground};
60
+ }
61
+ text-align: center;
62
+ }
63
+
64
+ .cluster rect {
65
+ fill: ${vt.clusterBkg};
66
+ stroke: ${vt.clusterBorder};
67
+ stroke-width: 1px;
68
+ }
69
+
70
+ .cluster text {
71
+ fill: ${vt.titleColor};
72
+ }
73
+
74
+ .cluster span {
75
+ color: ${vt.titleColor};
76
+ }
77
+ /* .cluster div {
78
+ color: ${vt.titleColor};
79
+ } */
80
+
81
+ div.mermaidTooltip {
82
+ position: absolute;
83
+ text-align: center;
84
+ max-width: 200px;
85
+ padding: 2px;
86
+ font-family: ${vt.fontFamily};
87
+ font-size: 12px;
88
+ background: ${vt.tertiaryColor};
89
+ border: 1px solid ${vt.border2};
90
+ border-radius: 2px;
91
+ pointer-events: none;
92
+ z-index: 100;
93
+ }
94
+
95
+ .flowchartTitleText {
96
+ text-anchor: middle;
97
+ font-size: 18px;
98
+ fill: ${vt.textColor};
99
+ }
100
+ .subgraph {
101
+ stroke-width:2;
102
+ rx:3;
103
+ }
104
+ // .subgraph-lvl-1 {
105
+ // fill:#ccc;
106
+ // // stroke:black;
107
+ // }
108
+ ${Fs(vt)}
109
+ `,$i={db:Pt.h,renderer:Wi,parser:Pt.p,styles:zr}},4737:function(Qi,ai,ct){ct.d(ai,{a:function(){return gs},b:function(){return bh},c:function(){return me},d:function(){return Nr},e:function(){return Ti},f:function(){return _h},g:function(){return P},h:function(){return y3},i:function(){return ah},j:function(){return B1},k:function(){return ul},l:function(){return E},m:function(){return ur},n:function(){return Er},o:function(){return Pr},p:function(){return Il},s:function(){return Gn}});var Pt=ct(18464),Qe=ct(27484),oi=ct.n(Qe),Vi=ct(17967),Q=ct(23198),Ji=ct(77482),xr=ct.n(Ji),ot=ct(83314),Ot=ct(44081),de=ct(7201),oe=ct(12281),Xs=ct(51117),Ks=ct(42454),Zo="-ms-",Vn="-moz-",Ho="-webkit-",Qs="comm",Yn="rule",Bs="decl",Go="@page",Is="@media",Js="@import",hi="@charset",gn="@viewport",Bi="@supports",us="@document",zi="@namespace",xi="@keyframes",Ds="@font-face",ds="@counter-style",$s="@font-feature-values",Rs="@layer",Ns=Math.abs,ts=String.fromCharCode,Ze=Object.assign;function Os(t,e){return Ii(t,0)^45?(((e<<2^Ii(t,0))<<2^Ii(t,1))<<2^Ii(t,2))<<2^Ii(t,3):0}function es(t){return t.trim()}function tn(t,e){return(t=e.exec(t))?t[0]:t}function Wi(t,e,i){return t.replace(e,i)}function Fs(t,e){return t.indexOf(e)}function Ii(t,e){return t.charCodeAt(e)|0}function zr(t,e,i){return t.slice(e,i)}function $i(t){return t.length}function vt(t){return t.length}function Yt(t,e){return e.push(t),t}function zt(t,e){return t.map(e).join("")}function Zt(t,e){return t.filter(function(i){return!tn(i,e)})}function te(t,e){for(var i="",r=0;r<t.length;r++)i+=e(t[r],r,t,e)||"";return i}function ve(t,e,i,r){switch(t.type){case Rs:if(t.children.length)break;case Js:case Bs:return t.return=t.return||t.value;case Qs:return"";case xi:return t.return=t.value+"{"+te(t.children,r)+"}";case Yn:if(!$i(t.value=t.props.join(",")))return""}return $i(i=te(t.children,r))?t.return=t.value+"{"+i+"}":""}var Ge=1,le=1,ui=0,pe=0,ge=0,ke="";function Ui(t,e,i,r,s,n,a,o){return{value:t,root:e,parent:i,type:r,props:s,children:n,line:Ge,column:le,length:a,return:"",siblings:o}}function ki(t,e){return assign(Ui("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function Gt(t){for(;t.root;)t=ki(t.root,{children:[t]});append(t,t.siblings)}function $e(){return ge}function Je(){return ge=pe>0?Ii(ke,--pe):0,le--,ge===10&&(le=1,Ge--),ge}function ti(){return ge=pe<ui?Ii(ke,pe++):0,le++,ge===10&&(le=1,Ge++),ge}function di(){return Ii(ke,pe)}function We(){return pe}function Zi(t,e){return zr(ke,t,e)}function Lr(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Br(t){return Ge=le=1,ui=$i(ke=t),pe=0,[]}function or(t){return ke="",t}function bt(t){return es(Zi(pe-1,X(t===91?t+2:t===40?t+1:t)))}function $(t){return or(V(Br(t)))}function ut(t){for(;(ge=di())&&ge<33;)ti();return Lr(t)>2||Lr(ge)>3?"":" "}function V(t){for(;ti();)switch(Lr(ge)){case 0:append(ht(pe-1),t);break;case 2:append(bt(ge),t);break;default:append(from(ge),t)}return t}function D(t,e){for(;--e&&ti()&&!(ge<48||ge>102||ge>57&&ge<65||ge>70&&ge<97););return Zi(t,We()+(e<6&&di()==32&&ti()==32))}function X(t){for(;ti();)switch(ge){case t:return pe;case 34:case 39:t!==34&&t!==39&&X(ge);break;case 40:t===41&&X(t);break;case 92:ti();break}return pe}function pt(t,e){for(;ti()&&t+ge!==47+10;)if(t+ge===42+42&&di()===47)break;return"/*"+Zi(e,pe-1)+"*"+ts(t===47?t:ti())}function ht(t){for(;!Lr(di());)ti();return Zi(t,pe)}function Lt(t){return or(Vt("",null,null,null,[""],t=Br(t),0,[0],t))}function Vt(t,e,i,r,s,n,a,o,l){for(var h=0,u=0,d=a,f=0,p=0,b=0,_=1,T=1,S=1,k=0,I="",z=s,H=n,rt=r,R=I;T;)switch(b=k,k=ti()){case 40:if(b!=108&&Ii(R,d-1)==58){Fs(R+=Wi(bt(k),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:R+=bt(k);break;case 9:case 10:case 13:case 32:R+=ut(b);break;case 92:R+=D(We()-1,7);continue;case 47:switch(di()){case 42:case 47:Yt(ye(pt(ti(),We()),e,i,l),l);break;default:R+="/"}break;case 123*_:o[h++]=$i(R)*S;case 125*_:case 59:case 0:switch(k){case 0:case 125:T=0;case 59+u:S==-1&&(R=Wi(R,/\f/g,"")),p>0&&$i(R)-d&&Yt(p>32?Se(R+";",r,i,d-1,l):Se(Wi(R," ","")+";",r,i,d-2,l),l);break;case 59:R+=";";default:if(Yt(rt=Wt(R,e,i,h,u,s,o,I,z=[],H=[],d,n),n),k===123)if(u===0)Vt(R,e,rt,rt,z,n,d,o,H);else switch(f===99&&Ii(R,3)===110?100:f){case 100:case 108:case 109:case 115:Vt(t,rt,rt,r&&Yt(Wt(t,rt,rt,0,0,s,o,I,s,z=[],d,H),H),s,H,d,o,r?z:H);break;default:Vt(R,rt,rt,rt,[""],H,0,o,H)}}h=u=p=0,_=S=1,I=R="",d=a;break;case 58:d=1+$i(R),p=b;default:if(_<1){if(k==123)--_;else if(k==125&&_++==0&&Je()==125)continue}switch(R+=ts(k),k*_){case 38:S=u>0?1:(R+="\f",-1);break;case 44:o[h++]=($i(R)-1)*S,S=1;break;case 64:di()===45&&(R+=bt(ti())),f=di(),u=d=$i(I=R+=ht(We())),k++;break;case 45:b===45&&$i(R)==2&&(_=0)}}return n}function Wt(t,e,i,r,s,n,a,o,l,h,u,d){for(var f=s-1,p=s===0?n:[""],b=vt(p),_=0,T=0,S=0;_<r;++_)for(var k=0,I=zr(t,f+1,f=Ns(T=a[_])),z=t;k<b;++k)(z=es(T>0?p[k]+" "+I:Wi(I,/&\f/g,p[k])))&&(l[S++]=z);return Ui(t,e,i,s===0?Yn:o,l,h,u,d)}function ye(t,e,i,r){return Ui(t,e,i,Qs,ts($e()),zr(t,2,-2),0,r)}function Se(t,e,i,r,s){return Ui(t,e,i,Bs,zr(t,0,r),zr(t,r+1,-1),r,s)}var be=ct(99791),Be=ct(45625),fe=ct(46060);const _e=[];for(let t=0;t<256;++t)_e.push((t+256).toString(16).slice(1));function Mt(t,e=0){return _e[t[e+0]]+_e[t[e+1]]+_e[t[e+2]]+_e[t[e+3]]+"-"+_e[t[e+4]]+_e[t[e+5]]+"-"+_e[t[e+6]]+_e[t[e+7]]+"-"+_e[t[e+8]]+_e[t[e+9]]+"-"+_e[t[e+10]]+_e[t[e+11]]+_e[t[e+12]]+_e[t[e+13]]+_e[t[e+14]]+_e[t[e+15]]}function Kt(t,e=0){const i=Mt(t,e);if(!validate(i))throw TypeError("Stringified UUID is invalid");return i}var se=null,Ae=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function je(t){return typeof t=="string"&&Ae.test(t)}var Jt=je;function _i(t){if(!Jt(t))throw TypeError("Invalid UUID");let e;const i=new Uint8Array(16);return i[0]=(e=parseInt(t.slice(0,8),16))>>>24,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=e&255,i[4]=(e=parseInt(t.slice(9,13),16))>>>8,i[5]=e&255,i[6]=(e=parseInt(t.slice(14,18),16))>>>8,i[7]=e&255,i[8]=(e=parseInt(t.slice(19,23),16))>>>8,i[9]=e&255,i[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,i[11]=e/4294967296&255,i[12]=e>>>24&255,i[13]=e>>>16&255,i[14]=e>>>8&255,i[15]=e&255,i}var Dt=_i;function Rt(t){t=unescape(encodeURIComponent(t));const e=[];for(let i=0;i<t.length;++i)e.push(t.charCodeAt(i));return e}const Xt="6ba7b810-9dad-11d1-80b4-00c04fd430c8",ce="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function He(t,e,i){function r(s,n,a,o){var l;if(typeof s=="string"&&(s=Rt(s)),typeof n=="string"&&(n=Dt(n)),((l=n)===null||l===void 0?void 0:l.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let h=new Uint8Array(16+s.length);if(h.set(n),h.set(s,n.length),h=i(h),h[6]=h[6]&15|e,h[8]=h[8]&63|128,a){o=o||0;for(let u=0;u<16;++u)a[o+u]=h[u];return a}return Mt(h)}try{r.name=t}catch(s){}return r.DNS=Xt,r.URL=ce,r}function Ht(t,e,i,r){switch(t){case 0:return e&i^~e&r;case 1:return e^i^r;case 2:return e&i^e&r^i&r;case 3:return e^i^r}}function Ue(t,e){return t<<e|t>>>32-e}function Ne(t){const e=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let o=0;o<a.length;++o)t.push(a.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const r=t.length/4+2,s=Math.ceil(r/16),n=new Array(s);for(let a=0;a<s;++a){const o=new Uint32Array(16);for(let l=0;l<16;++l)o[l]=t[a*64+l*4]<<24|t[a*64+l*4+1]<<16|t[a*64+l*4+2]<<8|t[a*64+l*4+3];n[a]=o}n[s-1][14]=(t.length-1)*8/Math.pow(2,32),n[s-1][14]=Math.floor(n[s-1][14]),n[s-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<s;++a){const o=new Uint32Array(80);for(let p=0;p<16;++p)o[p]=n[a][p];for(let p=16;p<80;++p)o[p]=Ue(o[p-3]^o[p-8]^o[p-14]^o[p-16],1);let l=i[0],h=i[1],u=i[2],d=i[3],f=i[4];for(let p=0;p<80;++p){const b=Math.floor(p/20),_=Ue(l,5)+Ht(b,h,u,d)+f+e[b]+o[p]>>>0;f=d,d=u,u=Ue(h,30)>>>0,h=l,l=_}i[0]=i[0]+l>>>0,i[1]=i[1]+h>>>0,i[2]=i[2]+u>>>0,i[3]=i[3]+d>>>0,i[4]=i[4]+f>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,i[0]&255,i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,i[1]&255,i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,i[2]&255,i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,i[3]&255,i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,i[4]&255]}var Ir=Ne,zn=He("v5",80,Ir),yn=ct(91518),Di=ct(96225),Ke=ct(43349),qe=ct(23352),is=ct(22930),Dr=ct(59542),Ms=ct.n(Dr),kr=ct(10285),Ci=ct.n(kr),lr=ct(28734),Ri=ct.n(lr),Ni=ct(79697);const Hi={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},E={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},_r=function(t="fatal"){let e=Hi.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Hi&&(e=Hi[t])):typeof t=="number"&&(e=t),E.trace=()=>{},E.debug=()=>{},E.info=()=>{},E.warn=()=>{},E.error=()=>{},E.fatal=()=>{},e<=Hi.fatal&&(E.fatal=console.error?console.error.bind(console,tr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",tr("FATAL"))),e<=Hi.error&&(E.error=console.error?console.error.bind(console,tr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",tr("ERROR"))),e<=Hi.warn&&(E.warn=console.warn?console.warn.bind(console,tr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",tr("WARN"))),e<=Hi.info&&(E.info=console.info?console.info.bind(console,tr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",tr("INFO"))),e<=Hi.debug&&(E.debug=console.debug?console.debug.bind(console,tr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",tr("DEBUG"))),e<=Hi.trace&&(E.trace=console.debug?console.debug.bind(console,tr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",tr("TRACE")))},tr=t=>`%c${oi()().format("ss.SSS")} : ${t} : `,mn=t=>t?Vc(t).replace(/\\n/g,"#br#").split("#br#"):[""],bn=t=>xr().sanitize(t),Rr=(t,e)=>{var i;if(((i=e.flowchart)==null?void 0:i.htmlLabels)!==!1){const r=e.securityLevel;r==="antiscript"||r==="strict"?t=bn(t):r!=="loose"&&(t=Vc(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=_d(t))}return t},Er=(t,e)=>t&&(e.dompurifyConfig?t=xr().sanitize(Rr(t,e),e.dompurifyConfig).toString():t=xr().sanitize(Rr(t,e),{FORBID_TAGS:["style"]}).toString(),t),bd=(t,e)=>typeof t=="string"?Er(t,e):t.flat().map(i=>Er(i,e)),Ia=/<br\s*\/?>/gi,xd=t=>Ia.test(t),kd=t=>t.split(Ia),_d=t=>t.replace(/#br#/g,"<br/>"),Vc=t=>t.replace(Ia,"#br#"),Ed=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},Ti=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),Ps=function(t){let e=t;if(t.split("~").length-1>=2){let i=e;do e=i,i=e.replace(/~([^\s,:;]+)~/,"<$1>");while(i!=e);return Ps(i)}else return e},me={getRows:mn,sanitizeText:Er,sanitizeTextOrArray:bd,hasBreaks:xd,splitBreaks:kd,lineBreakRegex:Ia,removeScript:bn,getUrl:Ed,evaluate:Ti},er=(t,e)=>e?(0,ot.Z)(t,{s:-40,l:10}):(0,ot.Z)(t,{s:-40,l:-10}),Da="#ffffff",Ra="#f2f2f2";let vd=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||(0,ot.Z)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,ot.Z)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||er(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||er(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||er(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||(0,Ot.Z)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,Ot.Z)(this.tertiaryColor),this.lineColor=this.lineColor||(0,Ot.Z)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,de.Z)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,de.Z)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,Ot.Z)(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,oe.Z)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,ot.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,ot.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,ot.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,ot.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,ot.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,ot.Z)(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||(0,ot.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,ot.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,ot.Z)(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=(0,de.Z)(this["cScale"+i],75);else for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=(0,de.Z)(this["cScale"+i],25);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||(0,Ot.Z)(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this.darkMode?this["cScalePeer"+i]=this["cScalePeer"+i]||(0,oe.Z)(this["cScale"+i],10):this["cScalePeer"+i]=this["cScalePeer"+i]||(0,de.Z)(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=this["cScaleLabel"+i]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||(0,ot.Z)(this.mainBkg,{h:180,s:-15,l:e*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||(0,ot.Z)(this.mainBkg,{h:180,s:-15,l:e*(8+i*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||(0,ot.Z)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||(0,ot.Z)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||(0,ot.Z)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||(0,ot.Z)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||(0,ot.Z)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||(0,ot.Z)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||(0,ot.Z)(this.primaryColor,{l:-10}),this.pie5=this.pie5||(0,ot.Z)(this.secondaryColor,{l:-10}),this.pie6=this.pie6||(0,ot.Z)(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||(0,ot.Z)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||(0,ot.Z)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||(0,ot.Z)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||(0,ot.Z)(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||(0,ot.Z)(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||(0,ot.Z)(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,de.Z)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,ot.Z)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,ot.Z)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,ot.Z)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,ot.Z)(this.primaryColor,{h:60}),this.git7=this.git7||(0,ot.Z)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,oe.Z)(this.git0,25),this.git1=(0,oe.Z)(this.git1,25),this.git2=(0,oe.Z)(this.git2,25),this.git3=(0,oe.Z)(this.git3,25),this.git4=(0,oe.Z)(this.git4,25),this.git5=(0,oe.Z)(this.git5,25),this.git6=(0,oe.Z)(this.git6,25),this.git7=(0,oe.Z)(this.git7,25)):(this.git0=(0,de.Z)(this.git0,25),this.git1=(0,de.Z)(this.git1,25),this.git2=(0,de.Z)(this.git2,25),this.git3=(0,de.Z)(this.git3,25),this.git4=(0,de.Z)(this.git4,25),this.git5=(0,de.Z)(this.git5,25),this.git6=(0,de.Z)(this.git6,25),this.git7=(0,de.Z)(this.git7,25)),this.gitInv0=this.gitInv0||(0,Ot.Z)(this.git0),this.gitInv1=this.gitInv1||(0,Ot.Z)(this.git1),this.gitInv2=this.gitInv2||(0,Ot.Z)(this.git2),this.gitInv3=this.gitInv3||(0,Ot.Z)(this.git3),this.gitInv4=this.gitInv4||(0,Ot.Z)(this.git4),this.gitInv5=this.gitInv5||(0,Ot.Z)(this.git5),this.gitInv6=this.gitInv6||(0,Ot.Z)(this.git6),this.gitInv7=this.gitInv7||(0,Ot.Z)(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Da,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ra}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const Cd=t=>{const e=new vd;return e.calculate(t),e};let Td=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,oe.Z)(this.primaryColor,16),this.tertiaryColor=(0,ot.Z)(this.primaryColor,{h:-160}),this.primaryBorderColor=(0,Ot.Z)(this.background),this.secondaryBorderColor=er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=er(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,Ot.Z)(this.primaryColor),this.secondaryTextColor=(0,Ot.Z)(this.secondaryColor),this.tertiaryTextColor=(0,Ot.Z)(this.tertiaryColor),this.lineColor=(0,Ot.Z)(this.background),this.textColor=(0,Ot.Z)(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,oe.Z)((0,Ot.Z)("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=(0,Xs.Z)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,de.Z)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=(0,Xs.Z)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,Xs.Z)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,oe.Z)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,oe.Z)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,oe.Z)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,ot.Z)(this.primaryColor,{h:64}),this.fillType3=(0,ot.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,ot.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,ot.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,ot.Z)(this.primaryColor,{h:128}),this.fillType7=(0,ot.Z)(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,ot.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,ot.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,ot.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,ot.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,ot.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,ot.Z)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,ot.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,ot.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,ot.Z)(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||(0,Ot.Z)(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||(0,oe.Z)(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,ot.Z)(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,ot.Z)(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,de.Z)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,oe.Z)(this.secondaryColor,20),this.git1=(0,oe.Z)(this.pie2||this.secondaryColor,20),this.git2=(0,oe.Z)(this.pie3||this.tertiaryColor,20),this.git3=(0,oe.Z)(this.pie4||(0,ot.Z)(this.primaryColor,{h:-30}),20),this.git4=(0,oe.Z)(this.pie5||(0,ot.Z)(this.primaryColor,{h:-60}),20),this.git5=(0,oe.Z)(this.pie6||(0,ot.Z)(this.primaryColor,{h:-90}),10),this.git6=(0,oe.Z)(this.pie7||(0,ot.Z)(this.primaryColor,{h:60}),10),this.git7=(0,oe.Z)(this.pie8||(0,ot.Z)(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||(0,Ot.Z)(this.git0),this.gitInv1=this.gitInv1||(0,Ot.Z)(this.git1),this.gitInv2=this.gitInv2||(0,Ot.Z)(this.git2),this.gitInv3=this.gitInv3||(0,Ot.Z)(this.git3),this.gitInv4=this.gitInv4||(0,Ot.Z)(this.git4),this.gitInv5=this.gitInv5||(0,Ot.Z)(this.git5),this.gitInv6=this.gitInv6||(0,Ot.Z)(this.git6),this.gitInv7=this.gitInv7||(0,Ot.Z)(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,oe.Z)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,oe.Z)(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const Sd=t=>{const e=new Td;return e.calculate(t),e};let wd=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=(0,ot.Z)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=(0,ot.Z)(this.primaryColor,{h:-160}),this.primaryBorderColor=er(this.primaryColor,this.darkMode),this.secondaryBorderColor=er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=er(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,Ot.Z)(this.primaryColor),this.secondaryTextColor=(0,Ot.Z)(this.secondaryColor),this.tertiaryTextColor=(0,Ot.Z)(this.tertiaryColor),this.lineColor=(0,Ot.Z)(this.background),this.textColor=(0,Ot.Z)(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=(0,Xs.Z)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,ot.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,ot.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,ot.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,ot.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,ot.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,ot.Z)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,ot.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,ot.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,ot.Z)(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||(0,de.Z)(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||(0,de.Z)(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,de.Z)(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||(0,de.Z)(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||(0,ot.Z)(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,ot.Z)(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,ot.Z)(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||(0,Ot.Z)(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||(0,Ot.Z)(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=(0,oe.Z)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,ot.Z)(this.primaryColor,{h:64}),this.fillType3=(0,ot.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,ot.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,ot.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,ot.Z)(this.primaryColor,{h:128}),this.fillType7=(0,ot.Z)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||(0,ot.Z)(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||(0,ot.Z)(this.primaryColor,{l:-10}),this.pie5=this.pie5||(0,ot.Z)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||(0,ot.Z)(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||(0,ot.Z)(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||(0,ot.Z)(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||(0,ot.Z)(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||(0,ot.Z)(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||(0,ot.Z)(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||(0,ot.Z)(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,ot.Z)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,ot.Z)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,ot.Z)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,ot.Z)(this.primaryColor,{h:60}),this.git7=this.git7||(0,ot.Z)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,oe.Z)(this.git0,25),this.git1=(0,oe.Z)(this.git1,25),this.git2=(0,oe.Z)(this.git2,25),this.git3=(0,oe.Z)(this.git3,25),this.git4=(0,oe.Z)(this.git4,25),this.git5=(0,oe.Z)(this.git5,25),this.git6=(0,oe.Z)(this.git6,25),this.git7=(0,oe.Z)(this.git7,25)):(this.git0=(0,de.Z)(this.git0,25),this.git1=(0,de.Z)(this.git1,25),this.git2=(0,de.Z)(this.git2,25),this.git3=(0,de.Z)(this.git3,25),this.git4=(0,de.Z)(this.git4,25),this.git5=(0,de.Z)(this.git5,25),this.git6=(0,de.Z)(this.git6,25),this.git7=(0,de.Z)(this.git7,25)),this.gitInv0=this.gitInv0||(0,de.Z)((0,Ot.Z)(this.git0),25),this.gitInv1=this.gitInv1||(0,Ot.Z)(this.git1),this.gitInv2=this.gitInv2||(0,Ot.Z)(this.git2),this.gitInv3=this.gitInv3||(0,Ot.Z)(this.git3),this.gitInv4=this.gitInv4||(0,Ot.Z)(this.git4),this.gitInv5=this.gitInv5||(0,Ot.Z)(this.git5),this.gitInv6=this.gitInv6||(0,Ot.Z)(this.git6),this.gitInv7=this.gitInv7||(0,Ot.Z)(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||(0,Ot.Z)(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||(0,Ot.Z)(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Da,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ra}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const Ad=t=>{const e=new wd;return e.calculate(t),e};let Ld=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,oe.Z)("#cde498",10),this.primaryBorderColor=er(this.primaryColor,this.darkMode),this.secondaryBorderColor=er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=er(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,Ot.Z)(this.primaryColor),this.secondaryTextColor=(0,Ot.Z)(this.secondaryColor),this.tertiaryTextColor=(0,Ot.Z)(this.primaryColor),this.lineColor=(0,Ot.Z)(this.background),this.textColor=(0,Ot.Z)(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,ot.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,ot.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,ot.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,ot.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,ot.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,ot.Z)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,ot.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,ot.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,ot.Z)(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||(0,de.Z)(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||(0,de.Z)(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,de.Z)(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||(0,de.Z)(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||(0,ot.Z)(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,ot.Z)(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,ot.Z)(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=(0,de.Z)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,ot.Z)(this.primaryColor,{h:64}),this.fillType3=(0,ot.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,ot.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,ot.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,ot.Z)(this.primaryColor,{h:128}),this.fillType7=(0,ot.Z)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||(0,ot.Z)(this.primaryColor,{l:-30}),this.pie5=this.pie5||(0,ot.Z)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||(0,ot.Z)(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||(0,ot.Z)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||(0,ot.Z)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||(0,ot.Z)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||(0,ot.Z)(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||(0,ot.Z)(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||(0,ot.Z)(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,ot.Z)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,ot.Z)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,ot.Z)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,ot.Z)(this.primaryColor,{h:60}),this.git7=this.git7||(0,ot.Z)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,oe.Z)(this.git0,25),this.git1=(0,oe.Z)(this.git1,25),this.git2=(0,oe.Z)(this.git2,25),this.git3=(0,oe.Z)(this.git3,25),this.git4=(0,oe.Z)(this.git4,25),this.git5=(0,oe.Z)(this.git5,25),this.git6=(0,oe.Z)(this.git6,25),this.git7=(0,oe.Z)(this.git7,25)):(this.git0=(0,de.Z)(this.git0,25),this.git1=(0,de.Z)(this.git1,25),this.git2=(0,de.Z)(this.git2,25),this.git3=(0,de.Z)(this.git3,25),this.git4=(0,de.Z)(this.git4,25),this.git5=(0,de.Z)(this.git5,25),this.git6=(0,de.Z)(this.git6,25),this.git7=(0,de.Z)(this.git7,25)),this.gitInv0=this.gitInv0||(0,Ot.Z)(this.git0),this.gitInv1=this.gitInv1||(0,Ot.Z)(this.git1),this.gitInv2=this.gitInv2||(0,Ot.Z)(this.git2),this.gitInv3=this.gitInv3||(0,Ot.Z)(this.git3),this.gitInv4=this.gitInv4||(0,Ot.Z)(this.git4),this.gitInv5=this.gitInv5||(0,Ot.Z)(this.git5),this.gitInv6=this.gitInv6||(0,Ot.Z)(this.git6),this.gitInv7=this.gitInv7||(0,Ot.Z)(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Da,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ra}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const Bd=t=>{const e=new Ld;return e.calculate(t),e};class Id{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,oe.Z)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=(0,ot.Z)(this.primaryColor,{h:-160}),this.primaryBorderColor=er(this.primaryColor,this.darkMode),this.secondaryBorderColor=er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=er(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,Ot.Z)(this.primaryColor),this.secondaryTextColor=(0,Ot.Z)(this.secondaryColor),this.tertiaryTextColor=(0,Ot.Z)(this.tertiaryColor),this.lineColor=(0,Ot.Z)(this.background),this.textColor=(0,Ot.Z)(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,oe.Z)(this.contrast,55),this.border2=this.contrast,this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||(0,Ot.Z)(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||(0,oe.Z)(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||(0,de.Z)(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,ot.Z)(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,ot.Z)(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=(0,oe.Z)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=(0,oe.Z)(this.contrast,30),this.sectionBkgColor2=(0,oe.Z)(this.contrast,30),this.taskBorderColor=(0,de.Z)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,oe.Z)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,de.Z)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,ot.Z)(this.primaryColor,{h:64}),this.fillType3=(0,ot.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,ot.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,ot.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,ot.Z)(this.primaryColor,{h:128}),this.fillType7=(0,ot.Z)(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,de.Z)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||(0,ot.Z)(this.primaryColor,{h:-30}),this.git4=this.pie5||(0,ot.Z)(this.primaryColor,{h:-60}),this.git5=this.pie6||(0,ot.Z)(this.primaryColor,{h:-90}),this.git6=this.pie7||(0,ot.Z)(this.primaryColor,{h:60}),this.git7=this.pie8||(0,ot.Z)(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||(0,Ot.Z)(this.git0),this.gitInv1=this.gitInv1||(0,Ot.Z)(this.git1),this.gitInv2=this.gitInv2||(0,Ot.Z)(this.git2),this.gitInv3=this.gitInv3||(0,Ot.Z)(this.git3),this.gitInv4=this.gitInv4||(0,Ot.Z)(this.git4),this.gitInv5=this.gitInv5||(0,Ot.Z)(this.git5),this.gitInv6=this.gitInv6||(0,Ot.Z)(this.git6),this.gitInv7=this.gitInv7||(0,Ot.Z)(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Da,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ra}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}}const fs={base:{getThemeVariables:Cd},dark:{getThemeVariables:Sd},default:{getThemeVariables:Ad},forest:{getThemeVariables:Bd},neutral:{getThemeVariables:t=>{const e=new Id;return e.calculate(t),e}}},Vs={theme:"default",themeVariables:fs.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},timeline:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};Vs.class&&(Vs.class.arrowMarkerAbsolute=Vs.arrowMarkerAbsolute),Vs.gitGraph&&(Vs.gitGraph.arrowMarkerAbsolute=Vs.arrowMarkerAbsolute);const Yc=(t,e="")=>Object.keys(t).reduce((i,r)=>Array.isArray(t[r])?i:typeof t[r]=="object"&&t[r]!==null?[...i,e+r,...Yc(t[r],"")]:[...i,e+r],[]),Dd=Yc(Vs,""),Rd=Vs;function zc(t){return typeof t=="undefined"||t===null}function Nd(t){return typeof t=="object"&&t!==null}function Od(t){return Array.isArray(t)?t:zc(t)?[]:[t]}function Fd(t,e){var i,r,s,n;if(e)for(n=Object.keys(e),i=0,r=n.length;i<r;i+=1)s=n[i],t[s]=e[s];return t}function Md(t,e){var i="",r;for(r=0;r<e;r+=1)i+=t;return i}function Pd(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var Vd=zc,Yd=Nd,zd=Od,Wd=Md,Ud=Pd,Zd=Fd,ir={isNothing:Vd,isObject:Yd,toArray:zd,repeat:Wd,isNegativeZero:Ud,extend:Zd};function Wc(t,e){var i="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(i+=`
110
+
111
+ `+t.mark.snippet),r+" "+i):r}function Wn(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Wc(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Wn.prototype=Object.create(Error.prototype),Wn.prototype.constructor=Wn,Wn.prototype.toString=function(e){return this.name+": "+Wc(this,e)};var ps=Wn;function jo(t,e,i,r,s){var n="",a="",o=Math.floor(s/2)-1;return r-e>o&&(n=" ... ",e=r-o+n.length),i-r>o&&(a=" ...",i=r+o-a.length),{str:n+t.slice(e,i).replace(/\t/g,"\u2192")+a,pos:r-e+n.length}}function qo(t,e){return ir.repeat(" ",e-t.length)+t}function Hd(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var i=/\r?\n|\r|\0/g,r=[0],s=[],n,a=-1;n=i.exec(t.buffer);)s.push(n.index),r.push(n.index+n[0].length),t.position<=n.index&&a<0&&(a=r.length-2);a<0&&(a=r.length-1);var o="",l,h,u=Math.min(t.line+e.linesAfter,s.length).toString().length,d=e.maxLength-(e.indent+u+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)h=jo(t.buffer,r[a-l],s[a-l],t.position-(r[a]-r[a-l]),d),o=ir.repeat(" ",e.indent)+qo((t.line-l+1).toString(),u)+" | "+h.str+`
112
+ `+o;for(h=jo(t.buffer,r[a],s[a],t.position,d),o+=ir.repeat(" ",e.indent)+qo((t.line+1).toString(),u)+" | "+h.str+`
113
+ `,o+=ir.repeat("-",e.indent+u+3+h.pos)+`^
114
+ `,l=1;l<=e.linesAfter&&!(a+l>=s.length);l++)h=jo(t.buffer,r[a+l],s[a+l],t.position-(r[a]-r[a+l]),d),o+=ir.repeat(" ",e.indent)+qo((t.line+l+1).toString(),u)+" | "+h.str+`
115
+ `;return o.replace(/\n$/,"")}var Gd=Hd,jd=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],qd=["scalar","sequence","mapping"];function Xd(t){var e={};return t!==null&&Object.keys(t).forEach(function(i){t[i].forEach(function(r){e[String(r)]=i})}),e}function Kd(t,e){if(e=e||{},Object.keys(e).forEach(function(i){if(jd.indexOf(i)===-1)throw new ps('Unknown option "'+i+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(i){return i},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=Xd(e.styleAliases||null),qd.indexOf(this.kind)===-1)throw new ps('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Gi=Kd;function Uc(t,e){var i=[];return t[e].forEach(function(r){var s=i.length;i.forEach(function(n,a){n.tag===r.tag&&n.kind===r.kind&&n.multi===r.multi&&(s=a)}),i[s]=r}),i}function Qd(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,i;function r(s){s.multi?(t.multi[s.kind].push(s),t.multi.fallback.push(s)):t[s.kind][s.tag]=t.fallback[s.tag]=s}for(e=0,i=arguments.length;e<i;e+=1)arguments[e].forEach(r);return t}function Xo(t){return this.extend(t)}Xo.prototype.extend=function(e){var i=[],r=[];if(e instanceof Gi)r.push(e);else if(Array.isArray(e))r=r.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(i=i.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit));else throw new ps("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(n){if(!(n instanceof Gi))throw new ps("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new ps("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(n.multi)throw new ps("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(n){if(!(n instanceof Gi))throw new ps("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Xo.prototype);return s.implicit=(this.implicit||[]).concat(i),s.explicit=(this.explicit||[]).concat(r),s.compiledImplicit=Uc(s,"implicit"),s.compiledExplicit=Uc(s,"explicit"),s.compiledTypeMap=Qd(s.compiledImplicit,s.compiledExplicit),s};var Jd=Xo,$d=new Gi("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),t2=new Gi("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),e2=new Gi("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Zc=new Jd({explicit:[$d,t2,e2]});function i2(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function r2(){return null}function s2(t){return t===null}var n2=new Gi("tag:yaml.org,2002:null",{kind:"scalar",resolve:i2,construct:r2,predicate:s2,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function a2(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function o2(t){return t==="true"||t==="True"||t==="TRUE"}function l2(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var c2=new Gi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:a2,construct:o2,predicate:l2,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function h2(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function u2(t){return 48<=t&&t<=55}function d2(t){return 48<=t&&t<=57}function f2(t){if(t===null)return!1;var e=t.length,i=0,r=!1,s;if(!e)return!1;if(s=t[i],(s==="-"||s==="+")&&(s=t[++i]),s==="0"){if(i+1===e)return!0;if(s=t[++i],s==="b"){for(i++;i<e;i++)if(s=t[i],s!=="_"){if(s!=="0"&&s!=="1")return!1;r=!0}return r&&s!=="_"}if(s==="x"){for(i++;i<e;i++)if(s=t[i],s!=="_"){if(!h2(t.charCodeAt(i)))return!1;r=!0}return r&&s!=="_"}if(s==="o"){for(i++;i<e;i++)if(s=t[i],s!=="_"){if(!u2(t.charCodeAt(i)))return!1;r=!0}return r&&s!=="_"}}if(s==="_")return!1;for(;i<e;i++)if(s=t[i],s!=="_"){if(!d2(t.charCodeAt(i)))return!1;r=!0}return!(!r||s==="_")}function p2(t){var e=t,i=1,r;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),r=e[0],(r==="-"||r==="+")&&(r==="-"&&(i=-1),e=e.slice(1),r=e[0]),e==="0")return 0;if(r==="0"){if(e[1]==="b")return i*parseInt(e.slice(2),2);if(e[1]==="x")return i*parseInt(e.slice(2),16);if(e[1]==="o")return i*parseInt(e.slice(2),8)}return i*parseInt(e,10)}function g2(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!ir.isNegativeZero(t)}var y2=new Gi("tag:yaml.org,2002:int",{kind:"scalar",resolve:f2,construct:p2,predicate:g2,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),m2=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function b2(t){return!(t===null||!m2.test(t)||t[t.length-1]==="_")}function x2(t){var e,i;return e=t.replace(/_/g,"").toLowerCase(),i=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:i*parseFloat(e,10)}var k2=/^[-+]?[0-9]+e/;function _2(t,e){var i;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ir.isNegativeZero(t))return"-0.0";return i=t.toString(10),k2.test(i)?i.replace("e",".e"):i}function E2(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||ir.isNegativeZero(t))}var v2=new Gi("tag:yaml.org,2002:float",{kind:"scalar",resolve:b2,construct:x2,predicate:E2,represent:_2,defaultStyle:"lowercase"}),C2=Zc.extend({implicit:[n2,c2,y2,v2]}),T2=C2,Hc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Gc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function S2(t){return t===null?!1:Hc.exec(t)!==null||Gc.exec(t)!==null}function w2(t){var e,i,r,s,n,a,o,l=0,h=null,u,d,f;if(e=Hc.exec(t),e===null&&(e=Gc.exec(t)),e===null)throw new Error("Date resolve error");if(i=+e[1],r=+e[2]-1,s=+e[3],!e[4])return new Date(Date.UTC(i,r,s));if(n=+e[4],a=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],d=+(e[11]||0),h=(u*60+d)*6e4,e[9]==="-"&&(h=-h)),f=new Date(Date.UTC(i,r,s,n,a,o,l)),h&&f.setTime(f.getTime()-h),f}function A2(t){return t.toISOString()}var L2=new Gi("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:S2,construct:w2,instanceOf:Date,represent:A2});function B2(t){return t==="<<"||t===null}var I2=new Gi("tag:yaml.org,2002:merge",{kind:"scalar",resolve:B2}),Ko=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
116
+ \r`;function D2(t){if(t===null)return!1;var e,i,r=0,s=t.length,n=Ko;for(i=0;i<s;i++)if(e=n.indexOf(t.charAt(i)),!(e>64)){if(e<0)return!1;r+=6}return r%8===0}function R2(t){var e,i,r=t.replace(/[\r\n=]/g,""),s=r.length,n=Ko,a=0,o=[];for(e=0;e<s;e++)e%4===0&&e&&(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)),a=a<<6|n.indexOf(r.charAt(e));return i=s%4*6,i===0?(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)):i===18?(o.push(a>>10&255),o.push(a>>2&255)):i===12&&o.push(a>>4&255),new Uint8Array(o)}function N2(t){var e="",i=0,r,s,n=t.length,a=Ko;for(r=0;r<n;r++)r%3===0&&r&&(e+=a[i>>18&63],e+=a[i>>12&63],e+=a[i>>6&63],e+=a[i&63]),i=(i<<8)+t[r];return s=n%3,s===0?(e+=a[i>>18&63],e+=a[i>>12&63],e+=a[i>>6&63],e+=a[i&63]):s===2?(e+=a[i>>10&63],e+=a[i>>4&63],e+=a[i<<2&63],e+=a[64]):s===1&&(e+=a[i>>2&63],e+=a[i<<4&63],e+=a[64],e+=a[64]),e}function O2(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var F2=new Gi("tag:yaml.org,2002:binary",{kind:"scalar",resolve:D2,construct:R2,predicate:O2,represent:N2}),M2=Object.prototype.hasOwnProperty,P2=Object.prototype.toString;function V2(t){if(t===null)return!0;var e=[],i,r,s,n,a,o=t;for(i=0,r=o.length;i<r;i+=1){if(s=o[i],a=!1,P2.call(s)!=="[object Object]")return!1;for(n in s)if(M2.call(s,n))if(!a)a=!0;else return!1;if(!a)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function Y2(t){return t!==null?t:[]}var z2=new Gi("tag:yaml.org,2002:omap",{kind:"sequence",resolve:V2,construct:Y2}),W2=Object.prototype.toString;function U2(t){if(t===null)return!0;var e,i,r,s,n,a=t;for(n=new Array(a.length),e=0,i=a.length;e<i;e+=1){if(r=a[e],W2.call(r)!=="[object Object]"||(s=Object.keys(r),s.length!==1))return!1;n[e]=[s[0],r[s[0]]]}return!0}function Z2(t){if(t===null)return[];var e,i,r,s,n,a=t;for(n=new Array(a.length),e=0,i=a.length;e<i;e+=1)r=a[e],s=Object.keys(r),n[e]=[s[0],r[s[0]]];return n}var H2=new Gi("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:U2,construct:Z2}),G2=Object.prototype.hasOwnProperty;function j2(t){if(t===null)return!0;var e,i=t;for(e in i)if(G2.call(i,e)&&i[e]!==null)return!1;return!0}function q2(t){return t!==null?t:{}}var X2=new Gi("tag:yaml.org,2002:set",{kind:"mapping",resolve:j2,construct:q2}),K2=T2.extend({implicit:[L2,I2],explicit:[F2,z2,H2,X2]}),Ys=Object.prototype.hasOwnProperty,Na=1,jc=2,qc=3,Oa=4,Qo=1,Q2=2,Xc=3,J2=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,$2=/[\x85\u2028\u2029]/,tf=/[,\[\]\{\}]/,Kc=/^(?:!|!!|![a-z\-]+!)$/i,Qc=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Jc(t){return Object.prototype.toString.call(t)}function rs(t){return t===10||t===13}function rn(t){return t===9||t===32}function cr(t){return t===9||t===32||t===10||t===13}function xn(t){return t===44||t===91||t===93||t===123||t===125}function ef(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function rf(t){return t===120?2:t===117?4:t===85?8:0}function sf(t){return 48<=t&&t<=57?t-48:-1}function $c(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
117
+ `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function nf(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}for(var t1=new Array(256),e1=new Array(256),kn=0;kn<256;kn++)t1[kn]=$c(kn)?1:0,e1[kn]=$c(kn);function af(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||K2,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function i1(t,e){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=Gd(i),new ps(e,i)}function ne(t,e){throw i1(t,e)}function Fa(t,e){t.onWarning&&t.onWarning.call(null,i1(t,e))}var r1={YAML:function(e,i,r){var s,n,a;e.version!==null&&ne(e,"duplication of %YAML directive"),r.length!==1&&ne(e,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),s===null&&ne(e,"ill-formed argument of the YAML directive"),n=parseInt(s[1],10),a=parseInt(s[2],10),n!==1&&ne(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&Fa(e,"unsupported YAML version of the document")},TAG:function(e,i,r){var s,n;r.length!==2&&ne(e,"TAG directive accepts exactly two arguments"),s=r[0],n=r[1],Kc.test(s)||ne(e,"ill-formed tag handle (first argument) of the TAG directive"),Ys.call(e.tagMap,s)&&ne(e,'there is a previously declared suffix for "'+s+'" tag handle'),Qc.test(n)||ne(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(a){ne(e,"tag prefix is malformed: "+n)}e.tagMap[s]=n}};function zs(t,e,i,r){var s,n,a,o;if(e<i){if(o=t.input.slice(e,i),r)for(s=0,n=o.length;s<n;s+=1)a=o.charCodeAt(s),a===9||32<=a&&a<=1114111||ne(t,"expected valid JSON character");else J2.test(o)&&ne(t,"the stream contains non-printable characters");t.result+=o}}function s1(t,e,i,r){var s,n,a,o;for(ir.isObject(i)||ne(t,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(i),a=0,o=s.length;a<o;a+=1)n=s[a],Ys.call(e,n)||(e[n]=i[n],r[n]=!0)}function _n(t,e,i,r,s,n,a,o,l){var h,u;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,u=s.length;h<u;h+=1)Array.isArray(s[h])&&ne(t,"nested arrays are not supported inside keys"),typeof s=="object"&&Jc(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&Jc(s)==="[object Object]"&&(s="[object Object]"),s=String(s),e===null&&(e={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(h=0,u=n.length;h<u;h+=1)s1(t,e,n[h],i);else s1(t,e,n,i);else!t.json&&!Ys.call(i,s)&&Ys.call(e,s)&&(t.line=a||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,ne(t,"duplicated mapping key")),s==="__proto__"?Object.defineProperty(e,s,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[s]=n,delete i[s];return e}function Jo(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):ne(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Ei(t,e,i){for(var r=0,s=t.input.charCodeAt(t.position);s!==0;){for(;rn(s);)s===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),s=t.input.charCodeAt(++t.position);if(e&&s===35)do s=t.input.charCodeAt(++t.position);while(s!==10&&s!==13&&s!==0);if(rs(s))for(Jo(t),s=t.input.charCodeAt(t.position),r++,t.lineIndent=0;s===32;)t.lineIndent++,s=t.input.charCodeAt(++t.position);else break}return i!==-1&&r!==0&&t.lineIndent<i&&Fa(t,"deficient indentation"),r}function Ma(t){var e=t.position,i;return i=t.input.charCodeAt(e),!!((i===45||i===46)&&i===t.input.charCodeAt(e+1)&&i===t.input.charCodeAt(e+2)&&(e+=3,i=t.input.charCodeAt(e),i===0||cr(i)))}function $o(t,e){e===1?t.result+=" ":e>1&&(t.result+=ir.repeat(`
118
+ `,e-1))}function of(t,e,i){var r,s,n,a,o,l,h,u,d=t.kind,f=t.result,p;if(p=t.input.charCodeAt(t.position),cr(p)||xn(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(s=t.input.charCodeAt(t.position+1),cr(s)||i&&xn(s)))return!1;for(t.kind="scalar",t.result="",n=a=t.position,o=!1;p!==0;){if(p===58){if(s=t.input.charCodeAt(t.position+1),cr(s)||i&&xn(s))break}else if(p===35){if(r=t.input.charCodeAt(t.position-1),cr(r))break}else{if(t.position===t.lineStart&&Ma(t)||i&&xn(p))break;if(rs(p))if(l=t.line,h=t.lineStart,u=t.lineIndent,Ei(t,!1,-1),t.lineIndent>=e){o=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=h,t.lineIndent=u;break}}o&&(zs(t,n,a,!1),$o(t,t.line-l),n=a=t.position,o=!1),rn(p)||(a=t.position+1),p=t.input.charCodeAt(++t.position)}return zs(t,n,a,!1),t.result?!0:(t.kind=d,t.result=f,!1)}function lf(t,e){var i,r,s;if(i=t.input.charCodeAt(t.position),i!==39)return!1;for(t.kind="scalar",t.result="",t.position++,r=s=t.position;(i=t.input.charCodeAt(t.position))!==0;)if(i===39)if(zs(t,r,t.position,!0),i=t.input.charCodeAt(++t.position),i===39)r=t.position,t.position++,s=t.position;else return!0;else rs(i)?(zs(t,r,s,!0),$o(t,Ei(t,!1,e)),r=s=t.position):t.position===t.lineStart&&Ma(t)?ne(t,"unexpected end of the document within a single quoted scalar"):(t.position++,s=t.position);ne(t,"unexpected end of the stream within a single quoted scalar")}function cf(t,e){var i,r,s,n,a,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,i=r=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return zs(t,i,t.position,!0),t.position++,!0;if(o===92){if(zs(t,i,t.position,!0),o=t.input.charCodeAt(++t.position),rs(o))Ei(t,!1,e);else if(o<256&&t1[o])t.result+=e1[o],t.position++;else if((a=rf(o))>0){for(s=a,n=0;s>0;s--)o=t.input.charCodeAt(++t.position),(a=ef(o))>=0?n=(n<<4)+a:ne(t,"expected hexadecimal character");t.result+=nf(n),t.position++}else ne(t,"unknown escape sequence");i=r=t.position}else rs(o)?(zs(t,i,r,!0),$o(t,Ei(t,!1,e)),i=r=t.position):t.position===t.lineStart&&Ma(t)?ne(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}ne(t,"unexpected end of the stream within a double quoted scalar")}function hf(t,e){var i=!0,r,s,n,a=t.tag,o,l=t.anchor,h,u,d,f,p,b=Object.create(null),_,T,S,k;if(k=t.input.charCodeAt(t.position),k===91)u=93,p=!1,o=[];else if(k===123)u=125,p=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),k=t.input.charCodeAt(++t.position);k!==0;){if(Ei(t,!0,e),k=t.input.charCodeAt(t.position),k===u)return t.position++,t.tag=a,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=o,!0;i?k===44&&ne(t,"expected the node content, but found ','"):ne(t,"missed comma between flow collection entries"),T=_=S=null,d=f=!1,k===63&&(h=t.input.charCodeAt(t.position+1),cr(h)&&(d=f=!0,t.position++,Ei(t,!0,e))),r=t.line,s=t.lineStart,n=t.position,En(t,e,Na,!1,!0),T=t.tag,_=t.result,Ei(t,!0,e),k=t.input.charCodeAt(t.position),(f||t.line===r)&&k===58&&(d=!0,k=t.input.charCodeAt(++t.position),Ei(t,!0,e),En(t,e,Na,!1,!0),S=t.result),p?_n(t,o,b,T,_,S,r,s,n):d?o.push(_n(t,null,b,T,_,S,r,s,n)):o.push(_),Ei(t,!0,e),k=t.input.charCodeAt(t.position),k===44?(i=!0,k=t.input.charCodeAt(++t.position)):i=!1}ne(t,"unexpected end of the stream within a flow collection")}function uf(t,e){var i,r,s=Qo,n=!1,a=!1,o=e,l=0,h=!1,u,d;if(d=t.input.charCodeAt(t.position),d===124)r=!1;else if(d===62)r=!0;else return!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)Qo===s?s=d===43?Xc:Q2:ne(t,"repeat of a chomping mode identifier");else if((u=sf(d))>=0)u===0?ne(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?ne(t,"repeat of an indentation width identifier"):(o=e+u-1,a=!0);else break;if(rn(d)){do d=t.input.charCodeAt(++t.position);while(rn(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!rs(d)&&d!==0)}for(;d!==0;){for(Jo(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!a||t.lineIndent<o)&&d===32;)t.lineIndent++,d=t.input.charCodeAt(++t.position);if(!a&&t.lineIndent>o&&(o=t.lineIndent),rs(d)){l++;continue}if(t.lineIndent<o){s===Xc?t.result+=ir.repeat(`
119
+ `,n?1+l:l):s===Qo&&n&&(t.result+=`
120
+ `);break}for(r?rn(d)?(h=!0,t.result+=ir.repeat(`
121
+ `,n?1+l:l)):h?(h=!1,t.result+=ir.repeat(`
122
+ `,l+1)):l===0?n&&(t.result+=" "):t.result+=ir.repeat(`
123
+ `,l):t.result+=ir.repeat(`
124
+ `,n?1+l:l),n=!0,a=!0,l=0,i=t.position;!rs(d)&&d!==0;)d=t.input.charCodeAt(++t.position);zs(t,i,t.position,!1)}return!0}function n1(t,e){var i,r=t.tag,s=t.anchor,n=[],a,o=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ne(t,"tab characters must not be used in indentation")),!(l!==45||(a=t.input.charCodeAt(t.position+1),!cr(a))));){if(o=!0,t.position++,Ei(t,!0,-1)&&t.lineIndent<=e){n.push(null),l=t.input.charCodeAt(t.position);continue}if(i=t.line,En(t,e,qc,!1,!0),n.push(t.result),Ei(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>e)&&l!==0)ne(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return o?(t.tag=r,t.anchor=s,t.kind="sequence",t.result=n,!0):!1}function df(t,e,i){var r,s,n,a,o,l,h=t.tag,u=t.anchor,d={},f=Object.create(null),p=null,b=null,_=null,T=!1,S=!1,k;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=d),k=t.input.charCodeAt(t.position);k!==0;){if(!T&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ne(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),n=t.line,(k===63||k===58)&&cr(r))k===63?(T&&(_n(t,d,f,p,b,null,a,o,l),p=b=_=null),S=!0,T=!0,s=!0):T?(T=!1,s=!0):ne(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,k=r;else{if(a=t.line,o=t.lineStart,l=t.position,!En(t,i,jc,!1,!0))break;if(t.line===n){for(k=t.input.charCodeAt(t.position);rn(k);)k=t.input.charCodeAt(++t.position);if(k===58)k=t.input.charCodeAt(++t.position),cr(k)||ne(t,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(_n(t,d,f,p,b,null,a,o,l),p=b=_=null),S=!0,T=!1,s=!1,p=t.tag,b=t.result;else if(S)ne(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=u,!0}else if(S)ne(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=u,!0}if((t.line===n||t.lineIndent>e)&&(T&&(a=t.line,o=t.lineStart,l=t.position),En(t,e,Oa,!0,s)&&(T?b=t.result:_=t.result),T||(_n(t,d,f,p,b,_,a,o,l),p=b=_=null),Ei(t,!0,-1),k=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&k!==0)ne(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return T&&_n(t,d,f,p,b,null,a,o,l),S&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=d),S}function ff(t){var e,i=!1,r=!1,s,n,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&ne(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(i=!0,a=t.input.charCodeAt(++t.position)):a===33?(r=!0,s="!!",a=t.input.charCodeAt(++t.position)):s="!",e=t.position,i){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(n=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):ne(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!cr(a);)a===33&&(r?ne(t,"tag suffix cannot contain exclamation marks"):(s=t.input.slice(e-1,t.position+1),Kc.test(s)||ne(t,"named tag handle cannot contain such characters"),r=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),tf.test(n)&&ne(t,"tag suffix cannot contain flow indicator characters")}n&&!Qc.test(n)&&ne(t,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(o){ne(t,"tag name is malformed: "+n)}return i?t.tag=n:Ys.call(t.tagMap,s)?t.tag=t.tagMap[s]+n:s==="!"?t.tag="!"+n:s==="!!"?t.tag="tag:yaml.org,2002:"+n:ne(t,'undeclared tag handle "'+s+'"'),!0}function pf(t){var e,i;if(i=t.input.charCodeAt(t.position),i!==38)return!1;for(t.anchor!==null&&ne(t,"duplication of an anchor property"),i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!cr(i)&&!xn(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&ne(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function gf(t){var e,i,r;if(r=t.input.charCodeAt(t.position),r!==42)return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!cr(r)&&!xn(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&ne(t,"name of an alias node must contain at least one character"),i=t.input.slice(e,t.position),Ys.call(t.anchorMap,i)||ne(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],Ei(t,!0,-1),!0}function En(t,e,i,r,s){var n,a,o,l=1,h=!1,u=!1,d,f,p,b,_,T;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=a=o=Oa===i||qc===i,r&&Ei(t,!0,-1)&&(h=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;ff(t)||pf(t);)Ei(t,!0,-1)?(h=!0,o=n,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):o=!1;if(o&&(o=h||s),(l===1||Oa===i)&&(Na===i||jc===i?_=e:_=e+1,T=t.position-t.lineStart,l===1?o&&(n1(t,T)||df(t,T,_))||hf(t,_)?u=!0:(a&&uf(t,_)||lf(t,_)||cf(t,_)?u=!0:gf(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&ne(t,"alias node should not have any properties")):of(t,_,Na===i)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=o&&n1(t,T))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&ne(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),d=0,f=t.implicitTypes.length;d<f;d+=1)if(b=t.implicitTypes[d],b.resolve(t.result)){t.result=b.construct(t.result),t.tag=b.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(Ys.call(t.typeMap[t.kind||"fallback"],t.tag))b=t.typeMap[t.kind||"fallback"][t.tag];else for(b=null,p=t.typeMap.multi[t.kind||"fallback"],d=0,f=p.length;d<f;d+=1)if(t.tag.slice(0,p[d].tag.length)===p[d].tag){b=p[d];break}b||ne(t,"unknown tag !<"+t.tag+">"),t.result!==null&&b.kind!==t.kind&&ne(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+b.kind+'", not "'+t.kind+'"'),b.resolve(t.result,t.tag)?(t.result=b.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):ne(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function yf(t){var e=t.position,i,r,s,n=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(Ei(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(n=!0,a=t.input.charCodeAt(++t.position),i=t.position;a!==0&&!cr(a);)a=t.input.charCodeAt(++t.position);for(r=t.input.slice(i,t.position),s=[],r.length<1&&ne(t,"directive name must not be less than one character in length");a!==0;){for(;rn(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!rs(a));break}if(rs(a))break;for(i=t.position;a!==0&&!cr(a);)a=t.input.charCodeAt(++t.position);s.push(t.input.slice(i,t.position))}a!==0&&Jo(t),Ys.call(r1,r)?r1[r](t,r,s):Fa(t,'unknown document directive "'+r+'"')}if(Ei(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Ei(t,!0,-1)):n&&ne(t,"directives end mark is expected"),En(t,t.lineIndent-1,Oa,!1,!0),Ei(t,!0,-1),t.checkLineBreaks&&$2.test(t.input.slice(e,t.position))&&Fa(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Ma(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Ei(t,!0,-1));return}if(t.position<t.length-1)ne(t,"end of the stream or a document separator is expected");else return}function a1(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
125
+ `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var i=new af(t,e),r=t.indexOf("\0");for(r!==-1&&(i.position=r,ne(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)yf(i);return i.documents}function mf(t,e,i){e!==null&&typeof e=="object"&&typeof i=="undefined"&&(i=e,e=null);var r=a1(t,i);if(typeof e!="function")return r;for(var s=0,n=r.length;s<n;s+=1)e(r[s])}function bf(t,e){var i=a1(t,e);if(i.length!==0){if(i.length===1)return i[0];throw new ps("expected a single document in the stream, but found more")}}var xf=mf,kf=bf,_f={loadAll:xf,load:kf},Ef=Zc,vf=_f.load;const o1=new RegExp("^-{3}\\s*[\\n\\r](.*?)[\\n\\r]-{3}\\s*[\\n\\r]+","s");function Cf(t,e){var i;const r=t.match(o1);if(r){const s=vf(r[1],{schema:Ef});return s!=null&&s.title&&((i=e.setDiagramTitle)==null||i.call(e,s.title)),t.slice(r[0].length)}else return t}const Tf=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Sf=/\s*%%.*\n/gm,Pa={},tl=function(t,e){t=t.replace(o1,"").replace(Tf,"").replace(Sf,`
126
+ `);for(const[i,{detector:r}]of Object.entries(Pa))if(r(t,e))return i;throw new Error(`No diagram type detected for text: ${t}`)},l1=(...t)=>{for(const{id:e,detector:i,loader:r}of t)c1(e,i,r)},c1=(t,e,i)=>{Pa[t]?E.error(`Detector with key ${t} already exists`):Pa[t]={detector:e,loader:i},E.debug(`Detector with key ${t} added${i?" with loader":""}`)},wf=t=>Pa[t].loader,el=function(t,e,i){const{depth:r,clobber:s}=Object.assign({depth:2,clobber:!1},i);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(n=>el(t,n,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(n=>{t.includes(n)||t.push(n)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(n=>{typeof e[n]=="object"&&(t[n]===void 0||typeof t[n]=="object")?(t[n]===void 0&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=el(t[n],e[n],{depth:r-1,clobber:s})):(s||typeof t[n]!="object"&&typeof e[n]!="object")&&(t[n]=e[n])}),t)},Oi=el,Af={curveBasis:Q.$0Z,curveBasisClosed:Q.Dts,curveBasisOpen:Q.WQY,curveBumpX:Q.qpX,curveBumpY:Q.u93,curveBundle:Q.tFB,curveCardinalClosed:Q.OvA,curveCardinalOpen:Q.dCK,curveCardinal:Q.YY7,curveCatmullRomClosed:Q.fGX,curveCatmullRomOpen:Q.$m7,curveCatmullRom:Q.zgE,curveLinear:Q.c_6,curveLinearClosed:Q.fxm,curveMonotoneX:Q.FdL,curveMonotoneY:Q.ak_,curveNatural:Q.SxZ,curveStep:Q.eA_,curveStepAfter:Q.jsv,curveStepBefore:Q.iJ},il=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Lf=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Bf=function(t,e){const i=h1(t,/(?:init\b)|(?:initialize\b)/);let r={};if(Array.isArray(i)){const s=i.map(n=>n.args);sn(s),r=Oi(r,[...s])}else r=i.args;if(r){let s=tl(t,e);["config"].forEach(n=>{r[n]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),r[s]=r[n],delete r[n])})}return r},h1=function(t,e=null){try{const i=new RegExp(`[%]{2}(?![{]${Lf.source})(?=[}][%]{2}).*
127
+ `,"ig");t=t.trim().replace(i,"").replace(/'/gm,'"'),E.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let r;const s=[];for(;(r=il.exec(t))!==null;)if(r.index===il.lastIndex&&il.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){const n=r[1]?r[1]:r[2],a=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;s.push({type:n,args:a})}return s.length===0&&s.push({type:t,args:null}),s.length===1?s[0]:s}catch(i){return E.error(`ERROR: ${i.message} - Unable to parse directive
128
+ ${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},If=function(t,e){for(const[i,r]of e.entries())if(r.match(t))return i;return-1};function Nr(t,e){if(!t)return e;const i=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Af[i]||e}function Df(t,e){const i=t.trim();if(i)return e.securityLevel!=="loose"?(0,Vi.Nm)(i):i}const Rf=(t,...e)=>{const i=t.split("."),r=i.length-1,s=i[r];let n=window;for(let a=0;a<r;a++)if(n=n[i[a]],!n)return;n[s](...e)};function Va(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function Nf(t){let e,i=0;t.forEach(n=>{i+=Va(n,e),e=n});let r=i/2,s;return e=void 0,t.forEach(n=>{if(e&&!s){const a=Va(n,e);if(a<r)r-=a;else{const o=r/a;o<=0&&(s=e),o>=1&&(s={x:n.x,y:n.y}),o>0&&o<1&&(s={x:(1-o)*e.x+o*n.x,y:(1-o)*e.y+o*n.y})}}e=n}),s}function Of(t){return t.length===1?t[0]:Nf(t)}const Ff=(t,e,i)=>{let r;E.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());let n=25,a;r=void 0,e.forEach(u=>{if(r&&!a){const d=Va(u,r);if(d<n)n-=d;else{const f=n/d;f<=0&&(a=r),f>=1&&(a={x:u.x,y:u.y}),f>0&&f<1&&(a={x:(1-f)*r.x+f*u.x,y:(1-f)*r.y+f*u.y})}}r=u});const o=t?10:5,l=Math.atan2(e[0].y-a.y,e[0].x-a.x),h={x:0,y:0};return h.x=Math.sin(l)*o+(e[0].x+a.x)/2,h.y=-Math.cos(l)*o+(e[0].y+a.y)/2,h};function Mf(t,e,i){let r=JSON.parse(JSON.stringify(i)),s;E.info("our points",r),e!=="start_left"&&e!=="start_right"&&(r=r.reverse()),r.forEach(d=>{s=d});let a=25+t,o;s=void 0,r.forEach(d=>{if(s&&!o){const f=Va(d,s);if(f<a)a-=f;else{const p=a/f;p<=0&&(o=s),p>=1&&(o={x:d.x,y:d.y}),p>0&&p<1&&(o={x:(1-p)*s.x+p*d.x,y:(1-p)*s.y+p*d.y})}}s=d});const l=10+t*.5,h=Math.atan2(r[0].y-o.y,r[0].x-o.x),u={x:0,y:0};return u.x=Math.sin(h)*l+(r[0].x+o.x)/2,u.y=-Math.cos(h)*l+(r[0].y+o.y)/2,e==="start_left"&&(u.x=Math.sin(h+Math.PI)*l+(r[0].x+o.x)/2,u.y=-Math.cos(h+Math.PI)*l+(r[0].y+o.y)/2),e==="end_right"&&(u.x=Math.sin(h-Math.PI)*l+(r[0].x+o.x)/2-5,u.y=-Math.cos(h-Math.PI)*l+(r[0].y+o.y)/2-5),e==="end_left"&&(u.x=Math.sin(h)*l+(r[0].x+o.x)/2-5,u.y=-Math.cos(h)*l+(r[0].y+o.y)/2-5),u}function gs(t){let e="",i="";for(const r of t)r!==void 0&&(r.startsWith("color:")||r.startsWith("text-align:")?i=i+r+";":e=e+r+";");return{style:e,labelStyle:i}}let u1=0;const d1=()=>(u1++,"id-"+Math.random().toString(36).substr(2,12)+"-"+u1);function Pf(t){let e="";const i="0123456789abcdef",r=i.length;for(let s=0;s<t;s++)e+=i.charAt(Math.floor(Math.random()*r));return e}const f1=t=>Pf(t.length),Vf=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},Yf=function(t,e){const i=e.text.replace(me.lineBreakRegex," "),[,r]=Un(e.fontSize),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.style("text-anchor",e.anchor),s.style("font-family",e.fontFamily),s.style("font-size",r),s.style("font-weight",e.fontWeight),s.attr("fill",e.fill),e.class!==void 0&&s.attr("class",e.class);const n=s.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(i),s},p1=(0,Ks.Z)((t,e,i)=>{if(!t||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),me.lineBreakRegex.test(t)))return t;const r=t.split(" "),s=[];let n="";return r.forEach((a,o)=>{const l=ss(`${a} `,i),h=ss(n,i);if(l>e){const{hyphenatedStrings:f,remainingWord:p}=zf(a,e,"-",i);s.push(n,...f),n=p}else h+l>=e?(s.push(n),n=a):n=[n,a].filter(Boolean).join(" ");o+1===r.length&&s.push(n)}),s.filter(a=>a!=="").join(i.joinWith)},(t,e,i)=>`${t}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),zf=(0,Ks.Z)((t,e,i="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const s=[...t],n=[];let a="";return s.forEach((o,l)=>{const h=`${a}${o}`;if(ss(h,r)>=e){const d=l+1,f=s.length===d,p=`${h}${i}`;n.push(f?h:p),a=""}else a=h}),{hyphenatedStrings:n,remainingWord:a}},(t,e,i="-",r)=>`${t}${e}${i}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function rl(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),sl(t,e).height}function ss(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),sl(t,e).width}const sl=(0,Ks.Z)((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:i,fontFamily:r,fontWeight:s}=e;if(!t)return{width:0,height:0};const[,n]=Un(i),a=["sans-serif",r],o=t.split(me.lineBreakRegex),l=[],h=(0,Q.Ys)("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const f of a){let p=0;const b={width:0,height:0,lineHeight:0};for(const _ of o){const T=Vf();T.text=_;const S=Yf(u,T).style("font-size",n).style("font-weight",s).style("font-family",f),k=(S._groups||S)[0][0].getBBox();b.width=Math.round(Math.max(b.width,k.width)),p=Math.round(k.height),b.height+=p,b.lineHeight=Math.round(Math.max(b.lineHeight,p))}l.push(b)}u.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Wf=class{constructor(e,i){this.deterministic=e,this.seed=i,this.count=i?i.length:0}next(){return this.deterministic?this.count++:Date.now()}};let Ya;const Uf=function(t){return Ya=Ya||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ya.innerHTML=t,unescape(Ya.textContent)},sn=t=>{if(E.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>sn(e)):Object.keys(t).forEach(e=>{E.debug("Checking key",e),e.startsWith("__")&&(E.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(E.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(E.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(E.debug("sanitizing themeCss option"),t[e]=za(t[e])),e.includes("fontFamily")&&(E.debug("sanitizing fontFamily option"),t[e]=za(t[e])),e.includes("altFontFamily")&&(E.debug("sanitizing altFontFamily option"),t[e]=za(t[e])),Dd.includes(e)?typeof t[e]=="object"&&(E.debug("sanitize deleting object",e),sn(t[e])):(E.debug("sanitize deleting option",e),delete t[e])})),t.themeVariables){const e=Object.keys(t.themeVariables);for(const i of e){const r=t.themeVariables[i];r&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[i]="")}}E.debug("After sanitization",t)},za=t=>{let e=0,i=0;for(const r of t){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";r==="{"?e++:r==="}"&&i++}return e!==i?"{ /* ERROR: Unbalanced CSS */ }":t};function nl(t){return"str"in t}function Zf(t){return t instanceof Error?t.message:String(t)}const Hf=(t,e,i,r)=>{if(!r)return;const s=t.node().getBBox();t.append("text").text(r).attr("x",s.x+s.width/2).attr("y",-i).attr("class",e)},Un=t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t,10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},xe={assignWithDepth:Oi,wrapLabel:p1,calculateTextHeight:rl,calculateTextWidth:ss,calculateTextDimensions:sl,detectInit:Bf,detectDirective:h1,isSubstringInArray:If,interpolateToCurve:Nr,calcLabelPosition:Of,calcCardinalityPosition:Ff,calcTerminalLabelPosition:Mf,formatUrl:Df,getStylesFromArray:gs,generateId:d1,random:f1,runFunc:Rf,entityDecode:Uf,initIdGenerator:Wf,directiveSanitizer:sn,sanitizeCss:za,insertTitle:Hf,parseFontSize:Un},Wa="9.4.3",vn=Object.freeze(Rd);let hr=Oi({},vn),g1,Cn=[],Zn=Oi({},vn);const Ua=(t,e)=>{let i=Oi({},t),r={};for(const s of e)b1(s),r=Oi(r,s);if(i=Oi(i,r),r.theme&&r.theme in fs){const s=Oi({},g1),n=Oi(s.themeVariables||{},r.themeVariables);i.theme&&i.theme in fs&&(i.themeVariables=fs[i.theme].getThemeVariables(n))}return Zn=i,_1(Zn),Zn},Gf=t=>(hr=Oi({},vn),hr=Oi(hr,t),t.theme&&fs[t.theme]&&(hr.themeVariables=fs[t.theme].getThemeVariables(t.themeVariables)),Ua(hr,Cn),hr),jf=t=>{g1=Oi({},t)},qf=t=>(hr=Oi(hr,t),Ua(hr,Cn),hr),y1=()=>Oi({},hr),m1=t=>(_1(t),Oi(Zn,t),P()),P=()=>Oi({},Zn),b1=t=>{var e;["secure",...(e=hr.secure)!=null?e:[]].forEach(i=>{t[i]!==void 0&&(E.debug(`Denied attempt to modify a secure key ${i}`,t[i]),delete t[i])}),Object.keys(t).forEach(i=>{i.indexOf("__")===0&&delete t[i]}),Object.keys(t).forEach(i=>{typeof t[i]=="string"&&(t[i].includes("<")||t[i].includes(">")||t[i].includes("url(data:"))&&delete t[i],typeof t[i]=="object"&&b1(t[i])})},al=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),Cn.push(t),Ua(hr,Cn)},Hn=(t=hr)=>{Cn=[],Ua(t,Cn)};var x1=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(x1||{});const k1={},Xf=t=>{k1[t]||(E.warn(x1[t]),k1[t]=!0)},_1=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Xf("LAZY_LOAD_DEPRECATED")},Kf=function(t,e){for(let i of e)t.attr(i[0],i[1])},Qf=function(t,e,i){let r=new Map;return i?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r},Wr=function(t,e,i,r){const s=Qf(e,i,r);Kf(t,s)},Gn=function(t,e,i,r){const s=e.node().getBBox(),n=s.width,a=s.height;E.info(`SVG bounds: ${n}x${a}`,s);let o=0,l=0;E.info(`Graph bounds: ${o}x${l}`,t),o=n+i*2,l=a+i*2,E.info(`Calculated bounds: ${o}x${l}`),Wr(e,l,o,r);const h=`${s.x-i} ${s.y-i} ${s.width+2*i} ${s.height+2*i}`;e.attr("viewBox",h)},jn=t=>`g.classGroup text {
129
+ fill: ${t.nodeBorder};
130
+ fill: ${t.classText};
131
+ stroke: none;
132
+ font-family: ${t.fontFamily};
133
+ font-size: 10px;
134
+
135
+ .title {
136
+ font-weight: bolder;
137
+ }
138
+
139
+ }
140
+
141
+ .nodeLabel, .edgeLabel {
142
+ color: ${t.classText};
143
+ }
144
+ .edgeLabel .label rect {
145
+ fill: ${t.mainBkg};
146
+ }
147
+ .label text {
148
+ fill: ${t.classText};
149
+ }
150
+ .edgeLabel .label span {
151
+ background: ${t.mainBkg};
152
+ }
153
+
154
+ .classTitle {
155
+ font-weight: bolder;
156
+ }
157
+ .node rect,
158
+ .node circle,
159
+ .node ellipse,
160
+ .node polygon,
161
+ .node path {
162
+ fill: ${t.mainBkg};
163
+ stroke: ${t.nodeBorder};
164
+ stroke-width: 1px;
165
+ }
166
+
167
+
168
+ .divider {
169
+ stroke: ${t.nodeBorder};
170
+ stroke: 1;
171
+ }
172
+
173
+ g.clickable {
174
+ cursor: pointer;
175
+ }
176
+
177
+ g.classGroup rect {
178
+ fill: ${t.mainBkg};
179
+ stroke: ${t.nodeBorder};
180
+ }
181
+
182
+ g.classGroup line {
183
+ stroke: ${t.nodeBorder};
184
+ stroke-width: 1;
185
+ }
186
+
187
+ .classLabel .box {
188
+ stroke: none;
189
+ stroke-width: 0;
190
+ fill: ${t.mainBkg};
191
+ opacity: 0.5;
192
+ }
193
+
194
+ .classLabel .label {
195
+ fill: ${t.nodeBorder};
196
+ font-size: 10px;
197
+ }
198
+
199
+ .relation {
200
+ stroke: ${t.lineColor};
201
+ stroke-width: 1;
202
+ fill: none;
203
+ }
204
+
205
+ .dashed-line{
206
+ stroke-dasharray: 3;
207
+ }
208
+
209
+ .dotted-line{
210
+ stroke-dasharray: 1 2;
211
+ }
212
+
213
+ #compositionStart, .composition {
214
+ fill: ${t.lineColor} !important;
215
+ stroke: ${t.lineColor} !important;
216
+ stroke-width: 1;
217
+ }
218
+
219
+ #compositionEnd, .composition {
220
+ fill: ${t.lineColor} !important;
221
+ stroke: ${t.lineColor} !important;
222
+ stroke-width: 1;
223
+ }
224
+
225
+ #dependencyStart, .dependency {
226
+ fill: ${t.lineColor} !important;
227
+ stroke: ${t.lineColor} !important;
228
+ stroke-width: 1;
229
+ }
230
+
231
+ #dependencyStart, .dependency {
232
+ fill: ${t.lineColor} !important;
233
+ stroke: ${t.lineColor} !important;
234
+ stroke-width: 1;
235
+ }
236
+
237
+ #extensionStart, .extension {
238
+ fill: ${t.mainBkg} !important;
239
+ stroke: ${t.lineColor} !important;
240
+ stroke-width: 1;
241
+ }
242
+
243
+ #extensionEnd, .extension {
244
+ fill: ${t.mainBkg} !important;
245
+ stroke: ${t.lineColor} !important;
246
+ stroke-width: 1;
247
+ }
248
+
249
+ #aggregationStart, .aggregation {
250
+ fill: ${t.mainBkg} !important;
251
+ stroke: ${t.lineColor} !important;
252
+ stroke-width: 1;
253
+ }
254
+
255
+ #aggregationEnd, .aggregation {
256
+ fill: ${t.mainBkg} !important;
257
+ stroke: ${t.lineColor} !important;
258
+ stroke-width: 1;
259
+ }
260
+
261
+ #lollipopStart, .lollipop {
262
+ fill: ${t.mainBkg} !important;
263
+ stroke: ${t.lineColor} !important;
264
+ stroke-width: 1;
265
+ }
266
+
267
+ #lollipopEnd, .lollipop {
268
+ fill: ${t.mainBkg} !important;
269
+ stroke: ${t.lineColor} !important;
270
+ stroke-width: 1;
271
+ }
272
+
273
+ .edgeTerminals {
274
+ font-size: 11px;
275
+ }
276
+
277
+ .classTitleText {
278
+ text-anchor: middle;
279
+ font-size: 18px;
280
+ fill: ${t.textColor};
281
+ }
282
+ `,E1=t=>`
283
+ .entityBox {
284
+ fill: ${t.mainBkg};
285
+ stroke: ${t.nodeBorder};
286
+ }
287
+
288
+ .attributeBoxOdd {
289
+ fill: ${t.attributeBackgroundColorOdd};
290
+ stroke: ${t.nodeBorder};
291
+ }
292
+
293
+ .attributeBoxEven {
294
+ fill: ${t.attributeBackgroundColorEven};
295
+ stroke: ${t.nodeBorder};
296
+ }
297
+
298
+ .relationshipLabelBox {
299
+ fill: ${t.tertiaryColor};
300
+ opacity: 0.7;
301
+ background-color: ${t.tertiaryColor};
302
+ rect {
303
+ opacity: 0.5;
304
+ }
305
+ }
306
+
307
+ .relationshipLine {
308
+ stroke: ${t.lineColor};
309
+ }
310
+
311
+ .entityTitleText {
312
+ text-anchor: middle;
313
+ font-size: 18px;
314
+ fill: ${t.textColor};
315
+ }
316
+ `,ol=()=>"",Za=t=>`.label {
317
+ font-family: ${t.fontFamily};
318
+ color: ${t.nodeTextColor||t.textColor};
319
+ }
320
+ .cluster-label text {
321
+ fill: ${t.titleColor};
322
+ }
323
+ .cluster-label span {
324
+ color: ${t.titleColor};
325
+ }
326
+
327
+ .label text,span {
328
+ fill: ${t.nodeTextColor||t.textColor};
329
+ color: ${t.nodeTextColor||t.textColor};
330
+ }
331
+
332
+ .node rect,
333
+ .node circle,
334
+ .node ellipse,
335
+ .node polygon,
336
+ .node path {
337
+ fill: ${t.mainBkg};
338
+ stroke: ${t.nodeBorder};
339
+ stroke-width: 1px;
340
+ }
341
+
342
+ .node .label {
343
+ text-align: center;
344
+ }
345
+ .node.clickable {
346
+ cursor: pointer;
347
+ }
348
+
349
+ .arrowheadPath {
350
+ fill: ${t.arrowheadColor};
351
+ }
352
+
353
+ .edgePath .path {
354
+ stroke: ${t.lineColor};
355
+ stroke-width: 2.0px;
356
+ }
357
+
358
+ .flowchart-link {
359
+ stroke: ${t.lineColor};
360
+ fill: none;
361
+ }
362
+
363
+ .edgeLabel {
364
+ background-color: ${t.edgeLabelBackground};
365
+ rect {
366
+ opacity: 0.5;
367
+ background-color: ${t.edgeLabelBackground};
368
+ fill: ${t.edgeLabelBackground};
369
+ }
370
+ text-align: center;
371
+ }
372
+
373
+ .cluster rect {
374
+ fill: ${t.clusterBkg};
375
+ stroke: ${t.clusterBorder};
376
+ stroke-width: 1px;
377
+ }
378
+
379
+ .cluster text {
380
+ fill: ${t.titleColor};
381
+ }
382
+
383
+ .cluster span {
384
+ color: ${t.titleColor};
385
+ }
386
+ /* .cluster div {
387
+ color: ${t.titleColor};
388
+ } */
389
+
390
+ div.mermaidTooltip {
391
+ position: absolute;
392
+ text-align: center;
393
+ max-width: 200px;
394
+ padding: 2px;
395
+ font-family: ${t.fontFamily};
396
+ font-size: 12px;
397
+ background: ${t.tertiaryColor};
398
+ border: 1px solid ${t.border2};
399
+ border-radius: 2px;
400
+ pointer-events: none;
401
+ z-index: 100;
402
+ }
403
+
404
+ .flowchartTitleText {
405
+ text-anchor: middle;
406
+ font-size: 18px;
407
+ fill: ${t.textColor};
408
+ }
409
+ `,v1=t=>`
410
+ .mermaid-main-font {
411
+ font-family: "trebuchet ms", verdana, arial, sans-serif;
412
+ font-family: var(--mermaid-font-family);
413
+ }
414
+ .exclude-range {
415
+ fill: ${t.excludeBkgColor};
416
+ }
417
+
418
+ .section {
419
+ stroke: none;
420
+ opacity: 0.2;
421
+ }
422
+
423
+ .section0 {
424
+ fill: ${t.sectionBkgColor};
425
+ }
426
+
427
+ .section2 {
428
+ fill: ${t.sectionBkgColor2};
429
+ }
430
+
431
+ .section1,
432
+ .section3 {
433
+ fill: ${t.altSectionBkgColor};
434
+ opacity: 0.2;
435
+ }
436
+
437
+ .sectionTitle0 {
438
+ fill: ${t.titleColor};
439
+ }
440
+
441
+ .sectionTitle1 {
442
+ fill: ${t.titleColor};
443
+ }
444
+
445
+ .sectionTitle2 {
446
+ fill: ${t.titleColor};
447
+ }
448
+
449
+ .sectionTitle3 {
450
+ fill: ${t.titleColor};
451
+ }
452
+
453
+ .sectionTitle {
454
+ text-anchor: start;
455
+ // font-size: ${t.ganttFontSize};
456
+ // text-height: 14px;
457
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
458
+ font-family: var(--mermaid-font-family);
459
+
460
+ }
461
+
462
+
463
+ /* Grid and axis */
464
+
465
+ .grid .tick {
466
+ stroke: ${t.gridColor};
467
+ opacity: 0.8;
468
+ shape-rendering: crispEdges;
469
+ text {
470
+ font-family: ${t.fontFamily};
471
+ fill: ${t.textColor};
472
+ }
473
+ }
474
+
475
+ .grid path {
476
+ stroke-width: 0;
477
+ }
478
+
479
+
480
+ /* Today line */
481
+
482
+ .today {
483
+ fill: none;
484
+ stroke: ${t.todayLineColor};
485
+ stroke-width: 2px;
486
+ }
487
+
488
+
489
+ /* Task styling */
490
+
491
+ /* Default task */
492
+
493
+ .task {
494
+ stroke-width: 2;
495
+ }
496
+
497
+ .taskText {
498
+ text-anchor: middle;
499
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
500
+ font-family: var(--mermaid-font-family);
501
+ }
502
+
503
+ // .taskText:not([font-size]) {
504
+ // font-size: ${t.ganttFontSize};
505
+ // }
506
+
507
+ .taskTextOutsideRight {
508
+ fill: ${t.taskTextDarkColor};
509
+ text-anchor: start;
510
+ // font-size: ${t.ganttFontSize};
511
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
512
+ font-family: var(--mermaid-font-family);
513
+
514
+ }
515
+
516
+ .taskTextOutsideLeft {
517
+ fill: ${t.taskTextDarkColor};
518
+ text-anchor: end;
519
+ // font-size: ${t.ganttFontSize};
520
+ }
521
+
522
+ /* Special case clickable */
523
+ .task.clickable {
524
+ cursor: pointer;
525
+ }
526
+ .taskText.clickable {
527
+ cursor: pointer;
528
+ fill: ${t.taskTextClickableColor} !important;
529
+ font-weight: bold;
530
+ }
531
+
532
+ .taskTextOutsideLeft.clickable {
533
+ cursor: pointer;
534
+ fill: ${t.taskTextClickableColor} !important;
535
+ font-weight: bold;
536
+ }
537
+
538
+ .taskTextOutsideRight.clickable {
539
+ cursor: pointer;
540
+ fill: ${t.taskTextClickableColor} !important;
541
+ font-weight: bold;
542
+ }
543
+
544
+ /* Specific task settings for the sections*/
545
+
546
+ .taskText0,
547
+ .taskText1,
548
+ .taskText2,
549
+ .taskText3 {
550
+ fill: ${t.taskTextColor};
551
+ }
552
+
553
+ .task0,
554
+ .task1,
555
+ .task2,
556
+ .task3 {
557
+ fill: ${t.taskBkgColor};
558
+ stroke: ${t.taskBorderColor};
559
+ }
560
+
561
+ .taskTextOutside0,
562
+ .taskTextOutside2
563
+ {
564
+ fill: ${t.taskTextOutsideColor};
565
+ }
566
+
567
+ .taskTextOutside1,
568
+ .taskTextOutside3 {
569
+ fill: ${t.taskTextOutsideColor};
570
+ }
571
+
572
+
573
+ /* Active task */
574
+
575
+ .active0,
576
+ .active1,
577
+ .active2,
578
+ .active3 {
579
+ fill: ${t.activeTaskBkgColor};
580
+ stroke: ${t.activeTaskBorderColor};
581
+ }
582
+
583
+ .activeText0,
584
+ .activeText1,
585
+ .activeText2,
586
+ .activeText3 {
587
+ fill: ${t.taskTextDarkColor} !important;
588
+ }
589
+
590
+
591
+ /* Completed task */
592
+
593
+ .done0,
594
+ .done1,
595
+ .done2,
596
+ .done3 {
597
+ stroke: ${t.doneTaskBorderColor};
598
+ fill: ${t.doneTaskBkgColor};
599
+ stroke-width: 2;
600
+ }
601
+
602
+ .doneText0,
603
+ .doneText1,
604
+ .doneText2,
605
+ .doneText3 {
606
+ fill: ${t.taskTextDarkColor} !important;
607
+ }
608
+
609
+
610
+ /* Tasks on the critical line */
611
+
612
+ .crit0,
613
+ .crit1,
614
+ .crit2,
615
+ .crit3 {
616
+ stroke: ${t.critBorderColor};
617
+ fill: ${t.critBkgColor};
618
+ stroke-width: 2;
619
+ }
620
+
621
+ .activeCrit0,
622
+ .activeCrit1,
623
+ .activeCrit2,
624
+ .activeCrit3 {
625
+ stroke: ${t.critBorderColor};
626
+ fill: ${t.activeTaskBkgColor};
627
+ stroke-width: 2;
628
+ }
629
+
630
+ .doneCrit0,
631
+ .doneCrit1,
632
+ .doneCrit2,
633
+ .doneCrit3 {
634
+ stroke: ${t.critBorderColor};
635
+ fill: ${t.doneTaskBkgColor};
636
+ stroke-width: 2;
637
+ cursor: pointer;
638
+ shape-rendering: crispEdges;
639
+ }
640
+
641
+ .milestone {
642
+ transform: rotate(45deg) scale(0.8,0.8);
643
+ }
644
+
645
+ .milestoneText {
646
+ font-style: italic;
647
+ }
648
+ .doneCritText0,
649
+ .doneCritText1,
650
+ .doneCritText2,
651
+ .doneCritText3 {
652
+ fill: ${t.taskTextDarkColor} !important;
653
+ }
654
+
655
+ .activeCritText0,
656
+ .activeCritText1,
657
+ .activeCritText2,
658
+ .activeCritText3 {
659
+ fill: ${t.taskTextDarkColor} !important;
660
+ }
661
+
662
+ .titleText {
663
+ text-anchor: middle;
664
+ font-size: 18px;
665
+ fill: ${t.textColor} ;
666
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
667
+ font-family: var(--mermaid-font-family);
668
+ }
669
+ `,C1=()=>"",T1=t=>`
670
+ .pieCircle{
671
+ stroke: ${t.pieStrokeColor};
672
+ stroke-width : ${t.pieStrokeWidth};
673
+ opacity : ${t.pieOpacity};
674
+ }
675
+ .pieTitleText {
676
+ text-anchor: middle;
677
+ font-size: ${t.pieTitleTextSize};
678
+ fill: ${t.pieTitleTextColor};
679
+ font-family: ${t.fontFamily};
680
+ }
681
+ .slice {
682
+ font-family: ${t.fontFamily};
683
+ fill: ${t.pieSectionTextColor};
684
+ font-size:${t.pieSectionTextSize};
685
+ // fill: white;
686
+ }
687
+ .legend text {
688
+ fill: ${t.pieLegendTextColor};
689
+ font-family: ${t.fontFamily};
690
+ font-size: ${t.pieLegendTextSize};
691
+ }
692
+ `,S1=t=>`
693
+
694
+ marker {
695
+ fill: ${t.relationColor};
696
+ stroke: ${t.relationColor};
697
+ }
698
+
699
+ marker.cross {
700
+ stroke: ${t.lineColor};
701
+ }
702
+
703
+ svg {
704
+ font-family: ${t.fontFamily};
705
+ font-size: ${t.fontSize};
706
+ }
707
+
708
+ .reqBox {
709
+ fill: ${t.requirementBackground};
710
+ fill-opacity: 100%;
711
+ stroke: ${t.requirementBorderColor};
712
+ stroke-width: ${t.requirementBorderSize};
713
+ }
714
+
715
+ .reqTitle, .reqLabel{
716
+ fill: ${t.requirementTextColor};
717
+ }
718
+ .reqLabelBox {
719
+ fill: ${t.relationLabelBackground};
720
+ fill-opacity: 100%;
721
+ }
722
+
723
+ .req-title-line {
724
+ stroke: ${t.requirementBorderColor};
725
+ stroke-width: ${t.requirementBorderSize};
726
+ }
727
+ .relationshipLine {
728
+ stroke: ${t.relationColor};
729
+ stroke-width: 1;
730
+ }
731
+ .relationshipLabel {
732
+ fill: ${t.relationLabelColor};
733
+ }
734
+
735
+ `,w1=t=>`.actor {
736
+ stroke: ${t.actorBorder};
737
+ fill: ${t.actorBkg};
738
+ }
739
+
740
+ text.actor > tspan {
741
+ fill: ${t.actorTextColor};
742
+ stroke: none;
743
+ }
744
+
745
+ .actor-line {
746
+ stroke: ${t.actorLineColor};
747
+ }
748
+
749
+ .messageLine0 {
750
+ stroke-width: 1.5;
751
+ stroke-dasharray: none;
752
+ stroke: ${t.signalColor};
753
+ }
754
+
755
+ .messageLine1 {
756
+ stroke-width: 1.5;
757
+ stroke-dasharray: 2, 2;
758
+ stroke: ${t.signalColor};
759
+ }
760
+
761
+ #arrowhead path {
762
+ fill: ${t.signalColor};
763
+ stroke: ${t.signalColor};
764
+ }
765
+
766
+ .sequenceNumber {
767
+ fill: ${t.sequenceNumberColor};
768
+ }
769
+
770
+ #sequencenumber {
771
+ fill: ${t.signalColor};
772
+ }
773
+
774
+ #crosshead path {
775
+ fill: ${t.signalColor};
776
+ stroke: ${t.signalColor};
777
+ }
778
+
779
+ .messageText {
780
+ fill: ${t.signalTextColor};
781
+ stroke: none;
782
+ }
783
+
784
+ .labelBox {
785
+ stroke: ${t.labelBoxBorderColor};
786
+ fill: ${t.labelBoxBkgColor};
787
+ }
788
+
789
+ .labelText, .labelText > tspan {
790
+ fill: ${t.labelTextColor};
791
+ stroke: none;
792
+ }
793
+
794
+ .loopText, .loopText > tspan {
795
+ fill: ${t.loopTextColor};
796
+ stroke: none;
797
+ }
798
+
799
+ .loopLine {
800
+ stroke-width: 2px;
801
+ stroke-dasharray: 2, 2;
802
+ stroke: ${t.labelBoxBorderColor};
803
+ fill: ${t.labelBoxBorderColor};
804
+ }
805
+
806
+ .note {
807
+ //stroke: #decc93;
808
+ stroke: ${t.noteBorderColor};
809
+ fill: ${t.noteBkgColor};
810
+ }
811
+
812
+ .noteText, .noteText > tspan {
813
+ fill: ${t.noteTextColor};
814
+ stroke: none;
815
+ }
816
+
817
+ .activation0 {
818
+ fill: ${t.activationBkgColor};
819
+ stroke: ${t.activationBorderColor};
820
+ }
821
+
822
+ .activation1 {
823
+ fill: ${t.activationBkgColor};
824
+ stroke: ${t.activationBorderColor};
825
+ }
826
+
827
+ .activation2 {
828
+ fill: ${t.activationBkgColor};
829
+ stroke: ${t.activationBorderColor};
830
+ }
831
+
832
+ .actorPopupMenu {
833
+ position: absolute;
834
+ }
835
+
836
+ .actorPopupMenuPanel {
837
+ position: absolute;
838
+ fill: ${t.actorBkg};
839
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
840
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
841
+ }
842
+ .actor-man line {
843
+ stroke: ${t.actorBorder};
844
+ fill: ${t.actorBkg};
845
+ }
846
+ .actor-man circle, line {
847
+ stroke: ${t.actorBorder};
848
+ fill: ${t.actorBkg};
849
+ stroke-width: 2px;
850
+ }
851
+ `,Ha=t=>`
852
+ defs #statediagram-barbEnd {
853
+ fill: ${t.transitionColor};
854
+ stroke: ${t.transitionColor};
855
+ }
856
+ g.stateGroup text {
857
+ fill: ${t.nodeBorder};
858
+ stroke: none;
859
+ font-size: 10px;
860
+ }
861
+ g.stateGroup text {
862
+ fill: ${t.textColor};
863
+ stroke: none;
864
+ font-size: 10px;
865
+
866
+ }
867
+ g.stateGroup .state-title {
868
+ font-weight: bolder;
869
+ fill: ${t.stateLabelColor};
870
+ }
871
+
872
+ g.stateGroup rect {
873
+ fill: ${t.mainBkg};
874
+ stroke: ${t.nodeBorder};
875
+ }
876
+
877
+ g.stateGroup line {
878
+ stroke: ${t.lineColor};
879
+ stroke-width: 1;
880
+ }
881
+
882
+ .transition {
883
+ stroke: ${t.transitionColor};
884
+ stroke-width: 1;
885
+ fill: none;
886
+ }
887
+
888
+ .stateGroup .composit {
889
+ fill: ${t.background};
890
+ border-bottom: 1px
891
+ }
892
+
893
+ .stateGroup .alt-composit {
894
+ fill: #e0e0e0;
895
+ border-bottom: 1px
896
+ }
897
+
898
+ .state-note {
899
+ stroke: ${t.noteBorderColor};
900
+ fill: ${t.noteBkgColor};
901
+
902
+ text {
903
+ fill: ${t.noteTextColor};
904
+ stroke: none;
905
+ font-size: 10px;
906
+ }
907
+ }
908
+
909
+ .stateLabel .box {
910
+ stroke: none;
911
+ stroke-width: 0;
912
+ fill: ${t.mainBkg};
913
+ opacity: 0.5;
914
+ }
915
+
916
+ .edgeLabel .label rect {
917
+ fill: ${t.labelBackgroundColor};
918
+ opacity: 0.5;
919
+ }
920
+ .edgeLabel .label text {
921
+ fill: ${t.transitionLabelColor||t.tertiaryTextColor};
922
+ }
923
+ .label div .edgeLabel {
924
+ color: ${t.transitionLabelColor||t.tertiaryTextColor};
925
+ }
926
+
927
+ .stateLabel text {
928
+ fill: ${t.stateLabelColor};
929
+ font-size: 10px;
930
+ font-weight: bold;
931
+ }
932
+
933
+ .node circle.state-start {
934
+ fill: ${t.specialStateColor};
935
+ stroke: ${t.specialStateColor};
936
+ }
937
+
938
+ .node .fork-join {
939
+ fill: ${t.specialStateColor};
940
+ stroke: ${t.specialStateColor};
941
+ }
942
+
943
+ .node circle.state-end {
944
+ fill: ${t.innerEndBackground};
945
+ stroke: ${t.background};
946
+ stroke-width: 1.5
947
+ }
948
+ .end-state-inner {
949
+ fill: ${t.compositeBackground||t.background};
950
+ // stroke: ${t.background};
951
+ stroke-width: 1.5
952
+ }
953
+
954
+ .node rect {
955
+ fill: ${t.stateBkg||t.mainBkg};
956
+ stroke: ${t.stateBorder||t.nodeBorder};
957
+ stroke-width: 1px;
958
+ }
959
+ .node polygon {
960
+ fill: ${t.mainBkg};
961
+ stroke: ${t.stateBorder||t.nodeBorder};;
962
+ stroke-width: 1px;
963
+ }
964
+ #statediagram-barbEnd {
965
+ fill: ${t.lineColor};
966
+ }
967
+
968
+ .statediagram-cluster rect {
969
+ fill: ${t.compositeTitleBackground};
970
+ stroke: ${t.stateBorder||t.nodeBorder};
971
+ stroke-width: 1px;
972
+ }
973
+
974
+ .cluster-label, .nodeLabel {
975
+ color: ${t.stateLabelColor};
976
+ }
977
+
978
+ .statediagram-cluster rect.outer {
979
+ rx: 5px;
980
+ ry: 5px;
981
+ }
982
+ .statediagram-state .divider {
983
+ stroke: ${t.stateBorder||t.nodeBorder};
984
+ }
985
+
986
+ .statediagram-state .title-state {
987
+ rx: 5px;
988
+ ry: 5px;
989
+ }
990
+ .statediagram-cluster.statediagram-cluster .inner {
991
+ fill: ${t.compositeBackground||t.background};
992
+ }
993
+ .statediagram-cluster.statediagram-cluster-alt .inner {
994
+ fill: ${t.altBackground?t.altBackground:"#efefef"};
995
+ }
996
+
997
+ .statediagram-cluster .inner {
998
+ rx:0;
999
+ ry:0;
1000
+ }
1001
+
1002
+ .statediagram-state rect.basic {
1003
+ rx: 5px;
1004
+ ry: 5px;
1005
+ }
1006
+ .statediagram-state rect.divider {
1007
+ stroke-dasharray: 10,10;
1008
+ fill: ${t.altBackground?t.altBackground:"#efefef"};
1009
+ }
1010
+
1011
+ .note-edge {
1012
+ stroke-dasharray: 5;
1013
+ }
1014
+
1015
+ .statediagram-note rect {
1016
+ fill: ${t.noteBkgColor};
1017
+ stroke: ${t.noteBorderColor};
1018
+ stroke-width: 1px;
1019
+ rx: 0;
1020
+ ry: 0;
1021
+ }
1022
+ .statediagram-note rect {
1023
+ fill: ${t.noteBkgColor};
1024
+ stroke: ${t.noteBorderColor};
1025
+ stroke-width: 1px;
1026
+ rx: 0;
1027
+ ry: 0;
1028
+ }
1029
+
1030
+ .statediagram-note text {
1031
+ fill: ${t.noteTextColor};
1032
+ }
1033
+
1034
+ .statediagram-note .nodeLabel {
1035
+ color: ${t.noteTextColor};
1036
+ }
1037
+ .statediagram .edgeLabel {
1038
+ color: red; // ${t.noteTextColor};
1039
+ }
1040
+
1041
+ #dependencyStart, #dependencyEnd {
1042
+ fill: ${t.lineColor};
1043
+ stroke: ${t.lineColor};
1044
+ stroke-width: 1;
1045
+ }
1046
+
1047
+ .statediagramTitleText {
1048
+ text-anchor: middle;
1049
+ font-size: 18px;
1050
+ fill: ${t.textColor};
1051
+ }
1052
+ `,A1=t=>`.label {
1053
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
1054
+ font-family: var(--mermaid-font-family);
1055
+ color: ${t.textColor};
1056
+ }
1057
+ .mouth {
1058
+ stroke: #666;
1059
+ }
1060
+
1061
+ line {
1062
+ stroke: ${t.textColor}
1063
+ }
1064
+
1065
+ .legend {
1066
+ fill: ${t.textColor};
1067
+ }
1068
+
1069
+ .label text {
1070
+ fill: #333;
1071
+ }
1072
+ .label {
1073
+ color: ${t.textColor}
1074
+ }
1075
+
1076
+ .face {
1077
+ ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
1078
+ stroke: #999;
1079
+ }
1080
+
1081
+ .node rect,
1082
+ .node circle,
1083
+ .node ellipse,
1084
+ .node polygon,
1085
+ .node path {
1086
+ fill: ${t.mainBkg};
1087
+ stroke: ${t.nodeBorder};
1088
+ stroke-width: 1px;
1089
+ }
1090
+
1091
+ .node .label {
1092
+ text-align: center;
1093
+ }
1094
+ .node.clickable {
1095
+ cursor: pointer;
1096
+ }
1097
+
1098
+ .arrowheadPath {
1099
+ fill: ${t.arrowheadColor};
1100
+ }
1101
+
1102
+ .edgePath .path {
1103
+ stroke: ${t.lineColor};
1104
+ stroke-width: 1.5px;
1105
+ }
1106
+
1107
+ .flowchart-link {
1108
+ stroke: ${t.lineColor};
1109
+ fill: none;
1110
+ }
1111
+
1112
+ .edgeLabel {
1113
+ background-color: ${t.edgeLabelBackground};
1114
+ rect {
1115
+ opacity: 0.5;
1116
+ }
1117
+ text-align: center;
1118
+ }
1119
+
1120
+ .cluster rect {
1121
+ }
1122
+
1123
+ .cluster text {
1124
+ fill: ${t.titleColor};
1125
+ }
1126
+
1127
+ div.mermaidTooltip {
1128
+ position: absolute;
1129
+ text-align: center;
1130
+ max-width: 200px;
1131
+ padding: 2px;
1132
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
1133
+ font-family: var(--mermaid-font-family);
1134
+ font-size: 12px;
1135
+ background: ${t.tertiaryColor};
1136
+ border: 1px solid ${t.border2};
1137
+ border-radius: 2px;
1138
+ pointer-events: none;
1139
+ z-index: 100;
1140
+ }
1141
+
1142
+ .task-type-0, .section-type-0 {
1143
+ ${t.fillType0?`fill: ${t.fillType0}`:""};
1144
+ }
1145
+ .task-type-1, .section-type-1 {
1146
+ ${t.fillType0?`fill: ${t.fillType1}`:""};
1147
+ }
1148
+ .task-type-2, .section-type-2 {
1149
+ ${t.fillType0?`fill: ${t.fillType2}`:""};
1150
+ }
1151
+ .task-type-3, .section-type-3 {
1152
+ ${t.fillType0?`fill: ${t.fillType3}`:""};
1153
+ }
1154
+ .task-type-4, .section-type-4 {
1155
+ ${t.fillType0?`fill: ${t.fillType4}`:""};
1156
+ }
1157
+ .task-type-5, .section-type-5 {
1158
+ ${t.fillType0?`fill: ${t.fillType5}`:""};
1159
+ }
1160
+ .task-type-6, .section-type-6 {
1161
+ ${t.fillType0?`fill: ${t.fillType6}`:""};
1162
+ }
1163
+ .task-type-7, .section-type-7 {
1164
+ ${t.fillType0?`fill: ${t.fillType7}`:""};
1165
+ }
1166
+
1167
+ .actor-0 {
1168
+ ${t.actor0?`fill: ${t.actor0}`:""};
1169
+ }
1170
+ .actor-1 {
1171
+ ${t.actor1?`fill: ${t.actor1}`:""};
1172
+ }
1173
+ .actor-2 {
1174
+ ${t.actor2?`fill: ${t.actor2}`:""};
1175
+ }
1176
+ .actor-3 {
1177
+ ${t.actor3?`fill: ${t.actor3}`:""};
1178
+ }
1179
+ .actor-4 {
1180
+ ${t.actor4?`fill: ${t.actor4}`:""};
1181
+ }
1182
+ .actor-5 {
1183
+ ${t.actor5?`fill: ${t.actor5}`:""};
1184
+ }
1185
+ `,L1=t=>`.person {
1186
+ stroke: ${t.personBorder};
1187
+ fill: ${t.personBkg};
1188
+ }
1189
+ `,Ga={flowchart:Za,"flowchart-v2":Za,sequence:w1,gantt:v1,classDiagram:jn,"classDiagram-v2":jn,class:jn,stateDiagram:Ha,state:Ha,info:C1,pie:T1,er:E1,error:ol,journey:A1,requirement:S1,c4:L1},Jf=(t,e,i)=>{let r="";return t in Ga&&Ga[t]?r=Ga[t](i):E.warn(`No theme found for ${t}`),` & {
1190
+ font-family: ${i.fontFamily};
1191
+ font-size: ${i.fontSize};
1192
+ fill: ${i.textColor}
1193
+ }
1194
+
1195
+ /* Classes common for multiple diagrams */
1196
+
1197
+ & .error-icon {
1198
+ fill: ${i.errorBkgColor};
1199
+ }
1200
+ & .error-text {
1201
+ fill: ${i.errorTextColor};
1202
+ stroke: ${i.errorTextColor};
1203
+ }
1204
+
1205
+ & .edge-thickness-normal {
1206
+ stroke-width: 2px;
1207
+ }
1208
+ & .edge-thickness-thick {
1209
+ stroke-width: 3.5px
1210
+ }
1211
+ & .edge-pattern-solid {
1212
+ stroke-dasharray: 0;
1213
+ }
1214
+
1215
+ & .edge-pattern-dashed{
1216
+ stroke-dasharray: 3;
1217
+ }
1218
+ .edge-pattern-dotted {
1219
+ stroke-dasharray: 2;
1220
+ }
1221
+
1222
+ & .marker {
1223
+ fill: ${i.lineColor};
1224
+ stroke: ${i.lineColor};
1225
+ }
1226
+ & .marker.cross {
1227
+ stroke: ${i.lineColor};
1228
+ }
1229
+
1230
+ & svg {
1231
+ font-family: ${i.fontFamily};
1232
+ font-size: ${i.fontSize};
1233
+ }
1234
+
1235
+ ${r}
1236
+
1237
+ ${e}
1238
+ `},$f=(t,e)=>{Ga[t]=e},tp=Jf;let ll="",ja="",cl="";const hl=t=>Er(t,P()),ur=function(){ll="",cl="",ja=""},dr=function(t){ll=hl(t).replace(/^\s+/g,"")},vr=function(){return ll||ja},Cr=function(t){cl=hl(t).replace(/\n\s+/g,`
1239
+ `)},Tr=function(){return cl},Ur=function(t){ja=hl(t)},Zr=function(){return ja},B1=Object.freeze(Object.defineProperty({__proto__:null,clear:ur,default:{setAccTitle:dr,getAccTitle:vr,setDiagramTitle:Ur,getDiagramTitle:Zr,getAccDescription:Tr,setAccDescription:Cr,clear:ur},getAccDescription:Tr,getAccTitle:vr,getDiagramTitle:Zr,setAccDescription:Cr,setAccTitle:dr,setDiagramTitle:Ur},Symbol.toStringTag,{value:"Module"}));let nn={};const ul=function(t,e,i,r){E.debug("parseDirective is being called",e,i,r);try{if(e!==void 0)switch(e=e.trim(),i){case"open_directive":nn={};break;case"type_directive":if(!nn)throw new Error("currentDirective is undefined");nn.type=e.toLowerCase();break;case"arg_directive":if(!nn)throw new Error("currentDirective is undefined");nn.args=JSON.parse(e);break;case"close_directive":ep(t,nn,r),nn=void 0;break}}catch(s){E.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${i}`),E.error(s.message)}},ep=function(t,e,i){switch(E.info(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(r=>{e.args[r]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),e.args[i]=e.args[r],delete e.args[r])}),E.info("sanitize in handleDirective",e.args),sn(e.args),E.info("sanitize in handleDirective (done)",e.args),al(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":E.warn("themeCss encountered");break;default:E.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}},ip=E,rp=_r,qn=P,sp=t=>Er(t,qn()),I1=Gn,np=()=>B1,ap=(t,e,i,r)=>ul(t,e,i,r),qa={},Si=(t,e,i)=>{if(qa[t])throw new Error(`Diagram ${t} already registered.`);qa[t]=e,i&&c1(t,i),$f(t,e.styles),e.injectUtils&&e.injectUtils(ip,rp,qn,sp,I1,np(),ap)},D1=t=>{if(t in qa)return qa[t];throw new Error(`Diagram ${t} not found.`)};var dl=function(){var t=function(F,v,L,w){for(L=L||{},w=F.length;w--;L[F[w]]=v);return L},e=[1,4],i=[1,7],r=[1,5],s=[1,9],n=[1,6],a=[2,6],o=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],h=[8,14,20,22,24,25,27,29,32,37,40],u=[8,13,14,20,22,24,25,27,29,32,37,40],d=[1,26],f=[6,8,14,50,55],p=[8,14,55],b=[1,53],_=[1,52],T=[8,14,30,33,35,38,55],S=[1,67],k=[1,68],I=[1,69],z=[8,14,33,35,42,55],H={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function(v,L,w,m,B,g,O){var y=g.length-1;switch(B){case 3:return g[y];case 4:return g[y-1];case 5:return m.setDirection(g[y-3]),g[y-1];case 7:m.setOptions(g[y-1]),this.$=g[y];break;case 8:g[y-1]+=g[y],this.$=g[y-1];break;case 10:this.$=[];break;case 11:g[y-1].push(g[y]),this.$=g[y-1];break;case 12:this.$=g[y-1];break;case 17:this.$=g[y].trim(),m.setAccTitle(this.$);break;case 18:case 19:this.$=g[y].trim(),m.setAccDescription(this.$);break;case 20:m.addSection(g[y].substr(8)),this.$=g[y].substr(8);break;case 22:m.checkout(g[y]);break;case 23:m.branch(g[y]);break;case 24:m.branch(g[y-2],g[y]);break;case 25:m.cherryPick(g[y],"",void 0);break;case 26:m.cherryPick(g[y-2],"",g[y]);break;case 27:case 29:m.cherryPick(g[y-2],"","");break;case 28:m.cherryPick(g[y],"",g[y-2]);break;case 30:m.merge(g[y],"","","");break;case 31:m.merge(g[y-2],g[y],"","");break;case 32:m.merge(g[y-2],"",g[y],"");break;case 33:m.merge(g[y-2],"","",g[y]);break;case 34:m.merge(g[y-4],g[y],"",g[y-2]);break;case 35:m.merge(g[y-4],"",g[y],g[y-2]);break;case 36:m.merge(g[y-4],"",g[y-2],g[y]);break;case 37:m.merge(g[y-4],g[y-2],g[y],"");break;case 38:m.merge(g[y-4],g[y-2],"",g[y]);break;case 39:m.merge(g[y-4],g[y],g[y-2],"");break;case 40:m.merge(g[y-6],g[y-4],g[y-2],g[y]);break;case 41:m.merge(g[y-6],g[y],g[y-4],g[y-2]);break;case 42:m.merge(g[y-6],g[y-4],g[y],g[y-2]);break;case 43:m.merge(g[y-6],g[y-2],g[y-4],g[y]);break;case 44:m.merge(g[y-6],g[y],g[y-2],g[y-4]);break;case 45:m.merge(g[y-6],g[y-2],g[y],g[y-4]);break;case 46:m.commit(g[y]);break;case 47:m.commit("","",m.commitType.NORMAL,g[y]);break;case 48:m.commit("","",g[y],"");break;case 49:m.commit("","",g[y],g[y-2]);break;case 50:m.commit("","",g[y-2],g[y]);break;case 51:m.commit("",g[y],m.commitType.NORMAL,"");break;case 52:m.commit("",g[y-2],m.commitType.NORMAL,g[y]);break;case 53:m.commit("",g[y],m.commitType.NORMAL,g[y-2]);break;case 54:m.commit("",g[y-2],g[y],"");break;case 55:m.commit("",g[y],g[y-2],"");break;case 56:m.commit("",g[y-4],g[y-2],g[y]);break;case 57:m.commit("",g[y-4],g[y],g[y-2]);break;case 58:m.commit("",g[y-2],g[y-4],g[y]);break;case 59:m.commit("",g[y],g[y-4],g[y-2]);break;case 60:m.commit("",g[y],g[y-2],g[y-4]);break;case 61:m.commit("",g[y-2],g[y],g[y-4]);break;case 62:m.commit(g[y],"",m.commitType.NORMAL,"");break;case 63:m.commit(g[y],"",m.commitType.NORMAL,g[y-2]);break;case 64:m.commit(g[y-2],"",m.commitType.NORMAL,g[y]);break;case 65:m.commit(g[y-2],"",g[y],"");break;case 66:m.commit(g[y],"",g[y-2],"");break;case 67:m.commit(g[y],g[y-2],m.commitType.NORMAL,"");break;case 68:m.commit(g[y-2],g[y],m.commitType.NORMAL,"");break;case 69:m.commit(g[y-4],"",g[y-2],g[y]);break;case 70:m.commit(g[y-4],"",g[y],g[y-2]);break;case 71:m.commit(g[y-2],"",g[y-4],g[y]);break;case 72:m.commit(g[y],"",g[y-4],g[y-2]);break;case 73:m.commit(g[y],"",g[y-2],g[y-4]);break;case 74:m.commit(g[y-2],"",g[y],g[y-4]);break;case 75:m.commit(g[y-4],g[y],g[y-2],"");break;case 76:m.commit(g[y-4],g[y-2],g[y],"");break;case 77:m.commit(g[y-2],g[y],g[y-4],"");break;case 78:m.commit(g[y],g[y-2],g[y-4],"");break;case 79:m.commit(g[y],g[y-4],g[y-2],"");break;case 80:m.commit(g[y-2],g[y-4],g[y],"");break;case 81:m.commit(g[y-4],g[y],m.commitType.NORMAL,g[y-2]);break;case 82:m.commit(g[y-4],g[y-2],m.commitType.NORMAL,g[y]);break;case 83:m.commit(g[y-2],g[y],m.commitType.NORMAL,g[y-4]);break;case 84:m.commit(g[y],g[y-2],m.commitType.NORMAL,g[y-4]);break;case 85:m.commit(g[y],g[y-4],m.commitType.NORMAL,g[y-2]);break;case 86:m.commit(g[y-2],g[y-4],m.commitType.NORMAL,g[y]);break;case 87:m.commit(g[y-6],g[y-4],g[y-2],g[y]);break;case 88:m.commit(g[y-6],g[y-4],g[y],g[y-2]);break;case 89:m.commit(g[y-6],g[y-2],g[y-4],g[y]);break;case 90:m.commit(g[y-6],g[y],g[y-4],g[y-2]);break;case 91:m.commit(g[y-6],g[y-2],g[y],g[y-4]);break;case 92:m.commit(g[y-6],g[y],g[y-2],g[y-4]);break;case 93:m.commit(g[y-4],g[y-6],g[y-2],g[y]);break;case 94:m.commit(g[y-4],g[y-6],g[y],g[y-2]);break;case 95:m.commit(g[y-2],g[y-6],g[y-4],g[y]);break;case 96:m.commit(g[y],g[y-6],g[y-4],g[y-2]);break;case 97:m.commit(g[y-2],g[y-6],g[y],g[y-4]);break;case 98:m.commit(g[y],g[y-6],g[y-2],g[y-4]);break;case 99:m.commit(g[y],g[y-4],g[y-2],g[y-6]);break;case 100:m.commit(g[y-2],g[y-4],g[y],g[y-6]);break;case 101:m.commit(g[y],g[y-2],g[y-4],g[y-6]);break;case 102:m.commit(g[y-2],g[y],g[y-4],g[y-6]);break;case 103:m.commit(g[y-4],g[y-2],g[y],g[y-6]);break;case 104:m.commit(g[y-4],g[y],g[y-2],g[y-6]);break;case 105:m.commit(g[y-2],g[y-4],g[y-6],g[y]);break;case 106:m.commit(g[y],g[y-4],g[y-6],g[y-2]);break;case 107:m.commit(g[y-2],g[y],g[y-6],g[y-4]);break;case 108:m.commit(g[y],g[y-2],g[y-6],g[y-4]);break;case 109:m.commit(g[y-4],g[y-2],g[y-6],g[y]);break;case 110:m.commit(g[y-4],g[y],g[y-6],g[y-2]);break;case 111:this.$="";break;case 112:this.$=g[y];break;case 113:this.$=m.commitType.NORMAL;break;case 114:this.$=m.commitType.REVERSE;break;case 115:this.$=m.commitType.HIGHLIGHT;break;case 118:m.parseDirective("%%{","open_directive");break;case 119:m.parseDirective(g[y],"type_directive");break;case 120:g[y]=g[y].trim().replace(/'/g,'"'),m.parseDirective(g[y],"arg_directive");break;case 121:m.parseDirective("}%%","close_directive","gitGraph");break}},table:[{3:1,4:2,5:3,6:e,8:i,14:r,46:8,50:s,55:n},{1:[3]},{3:10,4:2,5:3,6:e,8:i,14:r,46:8,50:s,55:n},{3:11,4:2,5:3,6:e,8:i,14:r,46:8,50:s,55:n},{7:12,8:a,9:[1,13],10:[1,14],11:15,14:o},t(l,[2,124]),t(l,[2,125]),t(l,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:a,11:15,14:o},{9:[1,21]},t(h,[2,10],{12:22,13:[1,23]}),t(u,[2,9]),{9:[1,25],48:24,53:d},t([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:a,11:15,14:o},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},t(u,[2,8]),t(f,[2,116]),{49:45,52:[1,46]},t(f,[2,121]),{1:[2,4]},{8:[1,47]},t(h,[2,11]),{4:48,8:i,14:r,55:n},t(h,[2,13]),t(p,[2,14]),t(p,[2,15]),t(p,[2,16]),{21:[1,49]},{23:[1,50]},t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),{28:51,34:b,54:_},t(p,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:b,54:_},{33:[1,61],35:[1,62]},{28:63,34:b,54:_},{48:64,53:d},{53:[2,120]},{1:[2,5]},t(h,[2,12]),t(p,[2,17]),t(p,[2,18]),t(p,[2,22]),t(T,[2,122]),t(T,[2,123]),t(p,[2,46]),{34:[1,65]},{39:66,43:S,44:k,45:I},{34:[1,70]},{34:[1,71]},t(p,[2,112]),t(p,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},t(p,[2,23],{30:[1,78]}),t(f,[2,117]),t(p,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),t(p,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),t(z,[2,113]),t(z,[2,114]),t(z,[2,115]),t(p,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),t(p,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:S,44:k,45:I},{34:[1,93]},t(p,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:S,44:k,45:I},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:S,44:k,45:I},{34:[1,106]},{34:[1,107]},{39:108,43:S,44:k,45:I},{34:[1,109]},t(p,[2,31],{35:[1,111],38:[1,110]}),t(p,[2,32],{33:[1,113],35:[1,112]}),t(p,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},t(p,[2,24]),t(p,[2,49],{33:[1,120],42:[1,121]}),t(p,[2,53],{38:[1,122],42:[1,123]}),t(p,[2,63],{33:[1,125],38:[1,124]}),t(p,[2,50],{33:[1,126],42:[1,127]}),t(p,[2,55],{35:[1,128],42:[1,129]}),t(p,[2,66],{33:[1,131],35:[1,130]}),t(p,[2,52],{38:[1,132],42:[1,133]}),t(p,[2,54],{35:[1,134],42:[1,135]}),t(p,[2,67],{35:[1,137],38:[1,136]}),t(p,[2,64],{33:[1,139],38:[1,138]}),t(p,[2,65],{33:[1,141],35:[1,140]}),t(p,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:S,44:k,45:I},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:S,44:k,45:I},t(p,[2,26]),t(p,[2,27]),t(p,[2,28]),t(p,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:S,44:k,45:I},{34:[1,153]},{39:154,43:S,44:k,45:I},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:S,44:k,45:I},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:S,44:k,45:I},{34:[1,167]},{39:168,43:S,44:k,45:I},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:S,44:k,45:I},{34:[1,173]},t(p,[2,37],{35:[1,174]}),t(p,[2,38],{38:[1,175]}),t(p,[2,36],{33:[1,176]}),t(p,[2,39],{35:[1,177]}),t(p,[2,34],{38:[1,178]}),t(p,[2,35],{33:[1,179]}),t(p,[2,60],{42:[1,180]}),t(p,[2,73],{33:[1,181]}),t(p,[2,61],{42:[1,182]}),t(p,[2,84],{38:[1,183]}),t(p,[2,74],{33:[1,184]}),t(p,[2,83],{38:[1,185]}),t(p,[2,59],{42:[1,186]}),t(p,[2,72],{33:[1,187]}),t(p,[2,58],{42:[1,188]}),t(p,[2,78],{35:[1,189]}),t(p,[2,71],{33:[1,190]}),t(p,[2,77],{35:[1,191]}),t(p,[2,57],{42:[1,192]}),t(p,[2,85],{38:[1,193]}),t(p,[2,56],{42:[1,194]}),t(p,[2,79],{35:[1,195]}),t(p,[2,80],{35:[1,196]}),t(p,[2,86],{38:[1,197]}),t(p,[2,70],{33:[1,198]}),t(p,[2,81],{38:[1,199]}),t(p,[2,69],{33:[1,200]}),t(p,[2,75],{35:[1,201]}),t(p,[2,76],{35:[1,202]}),t(p,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:S,44:k,45:I},{34:[1,206]},{34:[1,207]},{39:208,43:S,44:k,45:I},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:S,44:k,45:I},{34:[1,214]},{39:215,43:S,44:k,45:I},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:S,44:k,45:I},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:S,44:k,45:I},{34:[1,228]},{39:229,43:S,44:k,45:I},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:S,44:k,45:I},t(p,[2,40]),t(p,[2,42]),t(p,[2,41]),t(p,[2,43]),t(p,[2,45]),t(p,[2,44]),t(p,[2,101]),t(p,[2,102]),t(p,[2,99]),t(p,[2,100]),t(p,[2,104]),t(p,[2,103]),t(p,[2,108]),t(p,[2,107]),t(p,[2,106]),t(p,[2,105]),t(p,[2,110]),t(p,[2,109]),t(p,[2,98]),t(p,[2,97]),t(p,[2,96]),t(p,[2,95]),t(p,[2,93]),t(p,[2,94]),t(p,[2,92]),t(p,[2,91]),t(p,[2,90]),t(p,[2,89]),t(p,[2,87]),t(p,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(v,L){if(L.recoverable)this.trace(v);else{var w=new Error(v);throw w.hash=L,w}},parse:function(v){var L=this,w=[0],m=[],B=[null],g=[],O=this.table,y="",Y=0,Bt=0,J=2,nt=1,at=g.slice.call(arguments,1),it=Object.create(this.lexer),et={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(et.yy[Tt]=this.yy[Tt]);it.setInput(v,et.yy),et.yy.lexer=it,et.yy.parser=this,typeof it.yylloc=="undefined"&&(it.yylloc={});var xt=it.yylloc;g.push(xt);var Z=it.options&&it.options.ranges;typeof et.yy.parseError=="function"?this.parseError=et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function jt(){var Qt;return Qt=m.pop()||it.lex()||nt,typeof Qt!="number"&&(Qt instanceof Array&&(m=Qt,Qt=m.pop()),Qt=L.symbols_[Qt]||Qt),Qt}for(var U,gt,tt,K,N={},A,G,C,ft;;){if(gt=w[w.length-1],this.defaultActions[gt]?tt=this.defaultActions[gt]:((U===null||typeof U=="undefined")&&(U=jt()),tt=O[gt]&&O[gt][U]),typeof tt=="undefined"||!tt.length||!tt[0]){var x="";ft=[];for(A in O[gt])this.terminals_[A]&&A>J&&ft.push("'"+this.terminals_[A]+"'");it.showPosition?x="Parse error on line "+(Y+1)+`:
1240
+ `+it.showPosition()+`
1241
+ Expecting `+ft.join(", ")+", got '"+(this.terminals_[U]||U)+"'":x="Parse error on line "+(Y+1)+": Unexpected "+(U==nt?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(x,{text:it.match,token:this.terminals_[U]||U,line:it.yylineno,loc:xt,expected:ft})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+U);switch(tt[0]){case 1:w.push(U),B.push(it.yytext),g.push(it.yylloc),w.push(tt[1]),U=null,Bt=it.yyleng,y=it.yytext,Y=it.yylineno,xt=it.yylloc;break;case 2:if(G=this.productions_[tt[1]][1],N.$=B[B.length-G],N._$={first_line:g[g.length-(G||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(G||1)].first_column,last_column:g[g.length-1].last_column},Z&&(N._$.range=[g[g.length-(G||1)].range[0],g[g.length-1].range[1]]),K=this.performAction.apply(N,[y,Bt,Y,et.yy,tt[1],B,g].concat(at)),typeof K!="undefined")return K;G&&(w=w.slice(0,-1*G*2),B=B.slice(0,-1*G),g=g.slice(0,-1*G)),w.push(this.productions_[tt[1]][0]),B.push(N.$),g.push(N._$),C=O[w[w.length-2]][w[w.length-1]],w.push(C);break;case 3:return!0}}return!0}},rt=function(){var F={EOF:1,parseError:function(L,w){if(this.yy.parser)this.yy.parser.parseError(L,w);else throw new Error(L)},setInput:function(v,L){return this.yy=L||this.yy||{},this._input=v,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var L=v.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),v},unput:function(v){var L=v.length,w=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),w.length-1&&(this.yylineno-=w.length-1);var B=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:w?(w.length===m.length?this.yylloc.first_column:0)+m[m.length-w.length].length-w[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1242
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(v){this.unput(this.match.slice(v))},pastInput:function(){var v=this.matched.substr(0,this.matched.length-this.match.length);return(v.length>20?"...":"")+v.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var v=this.match;return v.length<20&&(v+=this._input.substr(0,20-v.length)),(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var v=this.pastInput(),L=new Array(v.length+1).join("-");return v+this.upcomingInput()+`
1243
+ `+L+"^"},test_match:function(v,L){var w,m,B;if(this.options.backtrack_lexer&&(B={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(B.yylloc.range=this.yylloc.range.slice(0))),m=v[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+v[0].length},this.yytext+=v[0],this.match+=v[0],this.matches=v,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(v[0].length),this.matched+=v[0],w=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),w)return w;if(this._backtrack){for(var g in B)this[g]=B[g];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var v,L,w,m;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),g=0;g<B.length;g++)if(w=this._input.match(this.rules[B[g]]),w&&(!L||w[0].length>L[0].length)){if(L=w,m=g,this.options.backtrack_lexer){if(v=this.test_match(w,B[g]),v!==!1)return v;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(v=this.test_match(L,B[m]),v!==!1?v:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1244
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var L=this.next();return L||this.lex()},begin:function(L){this.conditionStack.push(L)},popState:function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},pushState:function(L){this.begin(L)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(L,w,m,B){switch(m){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return F}();H.lexer=rt;function R(){this.yy={}}return R.prototype=H,H.Parser=R,new R}();dl.parser=dl;const op=dl,lp=t=>t.match(/^\s*gitGraph/)!==null;let Xa=P().gitGraph.mainBranchName,cp=P().gitGraph.mainBranchOrder,wi={},rr=null,Xn={};Xn[Xa]={name:Xa,order:cp};let vi={};vi[Xa]=rr;let Fi=Xa,R1="LR",an=0;function fl(){return f1({length:7})}const hp=function(t,e,i){ii.parseDirective(this,t,e,i)};function up(t,e){const i=Object.create(null);return t.reduce((r,s)=>{const n=e(s);return i[n]||(i[n]=!0,r.push(s)),r},[])}const dp=function(t){R1=t};let N1={};const fp=function(t){E.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{N1=JSON.parse(t)}catch(e){E.error("error while parsing gitGraph options",e.message)}},pp=function(){return N1},gp=function(t,e,i,r){E.debug("Entering commit:",t,e,i,r),e=me.sanitizeText(e,P()),t=me.sanitizeText(t,P()),r=me.sanitizeText(r,P());const s={id:e||an+"-"+fl(),message:t,seq:an++,type:i||Kn.NORMAL,tag:r||"",parents:rr==null?[]:[rr.id],branch:Fi};rr=s,wi[s.id]=s,vi[Fi]=s.id,E.debug("in pushCommit "+s.id)},yp=function(t,e){if(t=me.sanitizeText(t,P()),vi[t]===void 0)vi[t]=rr!=null?rr.id:null,Xn[t]={name:t,order:e?parseInt(e,10):null},O1(t),E.debug("in createBranch");else{let i=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw i.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},i}},mp=function(t,e,i,r){t=me.sanitizeText(t,P()),e=me.sanitizeText(e,P());const s=wi[vi[Fi]],n=wi[vi[t]];if(Fi===t){let o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(s===void 0||!s){let o=new Error('Incorrect usage of "merge". Current branch ('+Fi+")has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},o}else if(vi[t]===void 0){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},o}else if(n===void 0||!n){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},o}else if(s===n){let o=new Error('Incorrect usage of "merge". Both branches have same head');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(e&&wi[e]!==void 0){let o=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw o.hash={text:"merge "+t+e+i+r,token:"merge "+t+e+i+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+i+" "+r]},o}const a={id:e||an+"-"+fl(),message:"merged branch "+t+" into "+Fi,seq:an++,parents:[rr==null?null:rr.id,vi[t]],branch:Fi,type:Kn.MERGE,customType:i,customId:!!e,tag:r||""};rr=a,wi[a.id]=a,vi[Fi]=a.id,E.debug(vi),E.debug("in mergeBranch")},bp=function(t,e,i){if(E.debug("Entering cherryPick:",t,e,i),t=me.sanitizeText(t,P()),e=me.sanitizeText(e,P()),i=me.sanitizeText(i,P()),!t||wi[t]===void 0){let n=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}let r=wi[t],s=r.branch;if(r.type===Kn.MERGE){let n=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}if(!e||wi[e]===void 0){if(s===Fi){let o=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const n=wi[vi[Fi]];if(n===void 0||!n){let o=new Error('Incorrect usage of "cherry-pick". Current branch ('+Fi+")has no commits");throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const a={id:an+"-"+fl(),message:"cherry-picked "+r+" into "+Fi,seq:an++,parents:[rr==null?null:rr.id,r.id],branch:Fi,type:Kn.CHERRY_PICK,tag:i!=null?i:"cherry-pick:"+r.id};rr=a,wi[a.id]=a,vi[Fi]=a.id,E.debug(vi),E.debug("in cherryPick")}},O1=function(t){if(t=me.sanitizeText(t,P()),vi[t]===void 0){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}else{Fi=t;const e=vi[Fi];rr=wi[e]}};function F1(t,e,i){const r=t.indexOf(e);r===-1?t.push(i):t.splice(r,1,i)}function M1(t){const e=t.reduce((s,n)=>s.seq>n.seq?s:n,t[0]);let i="";t.forEach(function(s){s===e?i+=" *":i+=" |"});const r=[i,e.id,e.seq];for(let s in vi)vi[s]===e.id&&r.push(s);if(E.debug(r.join(" ")),e.parents&&e.parents.length==2){const s=wi[e.parents[0]];F1(t,e,s),t.push(wi[e.parents[1]])}else{if(e.parents.length==0)return;{const s=wi[e.parents];F1(t,e,s)}}t=up(t,s=>s.id),M1(t)}const xp=function(){E.debug(wi);const t=P1()[0];M1([t])},kp=function(){wi={},rr=null;let t=P().gitGraph.mainBranchName,e=P().gitGraph.mainBranchOrder;vi={},vi[t]=null,Xn={},Xn[t]={name:t,order:e},Fi=t,an=0,ur()},_p=function(){return Object.values(Xn).map((e,i)=>e.order!==null?e:Pc(Ba({},e),{order:parseFloat(`0.${i}`,10)})).sort((e,i)=>e.order-i.order).map(({name:e})=>({name:e}))},Ep=function(){return vi},vp=function(){return wi},P1=function(){const t=Object.keys(wi).map(function(e){return wi[e]});return t.forEach(function(e){E.debug(e.id)}),t.sort((e,i)=>e.seq-i.seq),t},Cp=function(){return Fi},Tp=function(){return R1},Sp=function(){return rr},Kn={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},wp={parseDirective:hp,getConfig:()=>P().gitGraph,setDirection:dp,setOptions:fp,getOptions:pp,commit:gp,branch:yp,merge:mp,cherryPick:bp,checkout:O1,prettyPrint:xp,clear:kp,getBranchesAsObjArray:_p,getBranches:Ep,getCommits:vp,getCommitsArray:P1,getCurrentBranch:Cp,getDirection:Tp,getHead:Sp,setAccTitle:dr,getAccTitle:vr,getAccDescription:Tr,setAccDescription:Cr,setDiagramTitle:Ur,getDiagramTitle:Zr,commitType:Kn};let Qn={};const Sr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},on=8;let fr={},Ka={},Qa=[],Ja=0;const Ap=()=>{fr={},Ka={},Qn={},Ja=0,Qa=[]},Lp=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let i=[];typeof t=="string"?i=t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?i=t:i=[];for(const r of i){const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=r.trim(),e.appendChild(s)}return e},V1=(t,e,i)=>{const r=qn().gitGraph,s=t.append("g").attr("class","commit-bullets"),n=t.append("g").attr("class","commit-labels");let a=0;Object.keys(e).sort((h,u)=>e[h].seq-e[u].seq).forEach(h=>{const u=e[h],d=fr[u.branch].pos,f=a+10;if(i){let p,b=u.customType!==void 0&&u.customType!==""?u.customType:u.type;switch(b){case Sr.NORMAL:p="commit-normal";break;case Sr.REVERSE:p="commit-reverse";break;case Sr.HIGHLIGHT:p="commit-highlight";break;case Sr.MERGE:p="commit-merge";break;case Sr.CHERRY_PICK:p="commit-cherry-pick";break;default:p="commit-normal"}if(b===Sr.HIGHLIGHT){const _=s.append("rect");_.attr("x",f-10),_.attr("y",d-10),_.attr("height",20),_.attr("width",20),_.attr("class",`commit ${u.id} commit-highlight${fr[u.branch].index%on} ${p}-outer`),s.append("rect").attr("x",f-6).attr("y",d-6).attr("height",12).attr("width",12).attr("class",`commit ${u.id} commit${fr[u.branch].index%on} ${p}-inner`)}else if(b===Sr.CHERRY_PICK)s.append("circle").attr("cx",f).attr("cy",d).attr("r",10).attr("class",`commit ${u.id} ${p}`),s.append("circle").attr("cx",f-3).attr("cy",d+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${u.id} ${p}`),s.append("circle").attr("cx",f+3).attr("cy",d+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${u.id} ${p}`),s.append("line").attr("x1",f+3).attr("y1",d+1).attr("x2",f).attr("y2",d-5).attr("stroke","#fff").attr("class",`commit ${u.id} ${p}`),s.append("line").attr("x1",f-3).attr("y1",d+1).attr("x2",f).attr("y2",d-5).attr("stroke","#fff").attr("class",`commit ${u.id} ${p}`);else{const _=s.append("circle");if(_.attr("cx",f),_.attr("cy",d),_.attr("r",u.type===Sr.MERGE?9:10),_.attr("class",`commit ${u.id} commit${fr[u.branch].index%on}`),b===Sr.MERGE){const T=s.append("circle");T.attr("cx",f),T.attr("cy",d),T.attr("r",6),T.attr("class",`commit ${p} ${u.id} commit${fr[u.branch].index%on}`)}b===Sr.REVERSE&&s.append("path").attr("d",`M ${f-5},${d-5}L${f+5},${d+5}M${f-5},${d+5}L${f+5},${d-5}`).attr("class",`commit ${p} ${u.id} commit${fr[u.branch].index%on}`)}}if(Ka[u.id]={x:a+10,y:d},i){if(u.type!==Sr.CHERRY_PICK&&(u.customId&&u.type===Sr.MERGE||u.type!==Sr.MERGE)&&r.showCommitLabel){const _=n.append("g"),T=_.insert("rect").attr("class","commit-label-bkg"),S=_.append("text").attr("x",a).attr("y",d+25).attr("class","commit-label").text(u.id);let k=S.node().getBBox();if(T.attr("x",a+10-k.width/2-2).attr("y",d+13.5).attr("width",k.width+2*2).attr("height",k.height+2*2),S.attr("x",a+10-k.width/2),r.rotateCommitLabel){let I=-7.5-(k.width+10)/25*9.5,z=10+k.width/25*8.5;_.attr("transform","translate("+I+", "+z+") rotate(-45, "+a+", "+d+")")}}if(u.tag){const _=n.insert("polygon"),T=n.append("circle"),S=n.append("text").attr("y",d-16).attr("class","tag-label").text(u.tag);let k=S.node().getBBox();S.attr("x",a+10-k.width/2);const I=k.height/2,z=d-19.2;_.attr("class","tag-label-bkg").attr("points",`
1245
+ ${a-k.width/2-4/2},${z+2}
1246
+ ${a-k.width/2-4/2},${z-2}
1247
+ ${a+10-k.width/2-4},${z-I-2}
1248
+ ${a+10+k.width/2+4},${z-I-2}
1249
+ ${a+10+k.width/2+4},${z+I+2}
1250
+ ${a+10-k.width/2-4},${z+I+2}`),T.attr("cx",a-k.width/2+4/2).attr("cy",z).attr("r",1.5).attr("class","tag-hole")}}a+=50,a>Ja&&(Ja=a)})},Bp=(t,e,i)=>Object.keys(i).filter(n=>i[n].branch===e.branch&&i[n].seq>t.seq&&i[n].seq<e.seq).length>0,pl=(t,e,i=0)=>{const r=t+Math.abs(t-e)/2;if(i>5)return r;if(Qa.every(a=>Math.abs(a-r)>=10))return Qa.push(r),r;const n=Math.abs(t-e);return pl(t,e-n/5,i+1)},Ip=(t,e,i,r)=>{const s=Ka[e.id],n=Ka[i.id],a=Bp(e,i,r);let o="",l="",h=0,u=0,d=fr[i.branch].index,f;if(a){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,u=10,d=fr[i.branch].index;const p=s.y<n.y?pl(s.y,n.y):pl(n.y,s.y);s.y<n.y?f=`M ${s.x} ${s.y} L ${s.x} ${p-h} ${o} ${s.x+u} ${p} L ${n.x-h} ${p} ${l} ${n.x} ${p+u} L ${n.x} ${n.y}`:f=`M ${s.x} ${s.y} L ${s.x} ${p+h} ${l} ${s.x+u} ${p} L ${n.x-h} ${p} ${o} ${n.x} ${p-u} L ${n.x} ${n.y}`}else s.y<n.y&&(o="A 20 20, 0, 0, 0,",h=20,u=20,d=fr[i.branch].index,f=`M ${s.x} ${s.y} L ${s.x} ${n.y-h} ${o} ${s.x+u} ${n.y} L ${n.x} ${n.y}`),s.y>n.y&&(o="A 20 20, 0, 0, 0,",h=20,u=20,d=fr[e.branch].index,f=`M ${s.x} ${s.y} L ${n.x-h} ${s.y} ${o} ${n.x} ${s.y-u} L ${n.x} ${n.y}`),s.y===n.y&&(d=fr[e.branch].index,f=`M ${s.x} ${s.y} L ${s.x} ${n.y-h} ${o} ${s.x+u} ${n.y} L ${n.x} ${n.y}`);t.append("path").attr("d",f).attr("class","arrow arrow"+d%on)},Dp=(t,e)=>{const i=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach(r=>{const s=e[r];s.parents&&s.parents.length>0&&s.parents.forEach(n=>{Ip(i,e[n],s,e)})})},Rp=(t,e)=>{const i=qn().gitGraph,r=t.append("g");e.forEach((s,n)=>{const a=n%on,o=fr[s.name].pos,l=r.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",Ja),l.attr("y2",o),l.attr("class","branch branch"+a),Qa.push(o);let h=s.name;const u=Lp(h),d=r.insert("rect"),p=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);p.node().appendChild(u);let b=u.getBBox();d.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-b.width-4-(i.rotateCommitLabel===!0?30:0)).attr("y",-b.height/2+8).attr("width",b.width+18).attr("height",b.height+4),p.attr("transform","translate("+(-b.width-14-(i.rotateCommitLabel===!0?30:0))+", "+(o-b.height/2-1)+")"),d.attr("transform","translate(-19, "+(o-b.height/2)+")")})},Np={draw:function(t,e,i,r){var h;Ap();const s=qn(),n=s.gitGraph;E.debug("in gitgraph renderer",t+`
1251
+ `,"id:",e,i),Qn=r.db.getCommits();const a=r.db.getBranchesAsObjArray();let o=0;a.forEach((u,d)=>{fr[u.name]={pos:o,index:d},o+=50+(n.rotateCommitLabel?40:0)});const l=(0,Q.Ys)(`[id="${e}"]`);V1(l,Qn,!1),n.showBranches&&Rp(l,a),Dp(l,Qn),V1(l,Qn,!0),xe.insertTitle(l,"gitTitleText",n.titleTopMargin,r.db.getDiagramTitle()),I1(void 0,l,n.diagramPadding,(h=n.useMaxWidth)!=null?h:s.useMaxWidth)}},Op=t=>`
1252
+ .commit-id,
1253
+ .commit-msg,
1254
+ .branch-label {
1255
+ fill: lightgrey;
1256
+ color: lightgrey;
1257
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
1258
+ font-family: var(--mermaid-font-family);
1259
+ }
1260
+ ${[0,1,2,3,4,5,6,7].map(e=>`
1261
+ .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }
1262
+ .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }
1263
+ .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }
1264
+ .label${e} { fill: ${t["git"+e]}; }
1265
+ .arrow${e} { stroke: ${t["git"+e]}; }
1266
+ `).join(`
1267
+ `)}
1268
+
1269
+ .branch {
1270
+ stroke-width: 1;
1271
+ stroke: ${t.lineColor};
1272
+ stroke-dasharray: 2;
1273
+ }
1274
+ .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
1275
+ .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
1276
+ .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
1277
+ .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
1278
+ .tag-hole { fill: ${t.textColor}; }
1279
+
1280
+ .commit-merge {
1281
+ stroke: ${t.primaryColor};
1282
+ fill: ${t.primaryColor};
1283
+ }
1284
+ .commit-reverse {
1285
+ stroke: ${t.primaryColor};
1286
+ fill: ${t.primaryColor};
1287
+ stroke-width: 3;
1288
+ }
1289
+ .commit-highlight-outer {
1290
+ }
1291
+ .commit-highlight-inner {
1292
+ stroke: ${t.primaryColor};
1293
+ fill: ${t.primaryColor};
1294
+ }
1295
+
1296
+ .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
1297
+ .gitTitleText {
1298
+ text-anchor: middle;
1299
+ font-size: 18px;
1300
+ fill: ${t.textColor};
1301
+ }
1302
+ }
1303
+ `;var $a=function(){var t=function(Ut,St,Et,It){for(Et=Et||{},It=Ut.length;It--;Et[Ut[It]]=St);return Et},e=[1,6],i=[1,7],r=[1,8],s=[1,9],n=[1,16],a=[1,11],o=[1,12],l=[1,13],h=[1,14],u=[1,15],d=[1,27],f=[1,33],p=[1,34],b=[1,35],_=[1,36],T=[1,37],S=[1,72],k=[1,73],I=[1,74],z=[1,75],H=[1,76],rt=[1,77],R=[1,78],F=[1,38],v=[1,39],L=[1,40],w=[1,41],m=[1,42],B=[1,43],g=[1,44],O=[1,45],y=[1,46],Y=[1,47],Bt=[1,48],J=[1,49],nt=[1,50],at=[1,51],it=[1,52],et=[1,53],Tt=[1,54],xt=[1,55],Z=[1,56],jt=[1,57],U=[1,59],gt=[1,60],tt=[1,61],K=[1,62],N=[1,63],A=[1,64],G=[1,65],C=[1,66],ft=[1,67],x=[1,68],Qt=[1,69],j=[24,52],Nt=[24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],wt=[15,24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],kt=[1,94],yt=[1,95],_t=[1,96],mt=[1,97],Ct=[15,24,52],Xe=[7,8,9,10,18,22,25,26,27,28],Oe=[15,24,43,52],ie=[15,24,43,52,86,87,89,90],ee=[15,43],Le=[44,46,47,48,49,50,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],ri={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function(St,Et,It,dt,qt,st,we){var lt=st.length-1;switch(qt){case 4:dt.setDirection("TB");break;case 5:dt.setDirection("BT");break;case 6:dt.setDirection("RL");break;case 7:dt.setDirection("LR");break;case 11:dt.parseDirective("%%{","open_directive");break;case 12:break;case 13:st[lt]=st[lt].trim().replace(/'/g,'"'),dt.parseDirective(st[lt],"arg_directive");break;case 14:dt.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:dt.setC4Type(st[lt-3]);break;case 26:dt.setTitle(st[lt].substring(6)),this.$=st[lt].substring(6);break;case 27:dt.setAccDescription(st[lt].substring(15)),this.$=st[lt].substring(15);break;case 28:this.$=st[lt].trim(),dt.setTitle(this.$);break;case 29:case 30:this.$=st[lt].trim(),dt.setAccDescription(this.$);break;case 35:case 36:st[lt].splice(2,0,"ENTERPRISE"),dt.addPersonOrSystemBoundary(...st[lt]),this.$=st[lt];break;case 37:dt.addPersonOrSystemBoundary(...st[lt]),this.$=st[lt];break;case 38:st[lt].splice(2,0,"CONTAINER"),dt.addContainerBoundary(...st[lt]),this.$=st[lt];break;case 39:dt.addDeploymentNode("node",...st[lt]),this.$=st[lt];break;case 40:dt.addDeploymentNode("nodeL",...st[lt]),this.$=st[lt];break;case 41:dt.addDeploymentNode("nodeR",...st[lt]),this.$=st[lt];break;case 42:dt.popBoundaryParseStack();break;case 46:dt.addPersonOrSystem("person",...st[lt]),this.$=st[lt];break;case 47:dt.addPersonOrSystem("external_person",...st[lt]),this.$=st[lt];break;case 48:dt.addPersonOrSystem("system",...st[lt]),this.$=st[lt];break;case 49:dt.addPersonOrSystem("system_db",...st[lt]),this.$=st[lt];break;case 50:dt.addPersonOrSystem("system_queue",...st[lt]),this.$=st[lt];break;case 51:dt.addPersonOrSystem("external_system",...st[lt]),this.$=st[lt];break;case 52:dt.addPersonOrSystem("external_system_db",...st[lt]),this.$=st[lt];break;case 53:dt.addPersonOrSystem("external_system_queue",...st[lt]),this.$=st[lt];break;case 54:dt.addContainer("container",...st[lt]),this.$=st[lt];break;case 55:dt.addContainer("container_db",...st[lt]),this.$=st[lt];break;case 56:dt.addContainer("container_queue",...st[lt]),this.$=st[lt];break;case 57:dt.addContainer("external_container",...st[lt]),this.$=st[lt];break;case 58:dt.addContainer("external_container_db",...st[lt]),this.$=st[lt];break;case 59:dt.addContainer("external_container_queue",...st[lt]),this.$=st[lt];break;case 60:dt.addComponent("component",...st[lt]),this.$=st[lt];break;case 61:dt.addComponent("component_db",...st[lt]),this.$=st[lt];break;case 62:dt.addComponent("component_queue",...st[lt]),this.$=st[lt];break;case 63:dt.addComponent("external_component",...st[lt]),this.$=st[lt];break;case 64:dt.addComponent("external_component_db",...st[lt]),this.$=st[lt];break;case 65:dt.addComponent("external_component_queue",...st[lt]),this.$=st[lt];break;case 67:dt.addRel("rel",...st[lt]),this.$=st[lt];break;case 68:dt.addRel("birel",...st[lt]),this.$=st[lt];break;case 69:dt.addRel("rel_u",...st[lt]),this.$=st[lt];break;case 70:dt.addRel("rel_d",...st[lt]),this.$=st[lt];break;case 71:dt.addRel("rel_l",...st[lt]),this.$=st[lt];break;case 72:dt.addRel("rel_r",...st[lt]),this.$=st[lt];break;case 73:dt.addRel("rel_b",...st[lt]),this.$=st[lt];break;case 74:st[lt].splice(0,1),dt.addRel("rel",...st[lt]),this.$=st[lt];break;case 75:dt.updateElStyle("update_el_style",...st[lt]),this.$=st[lt];break;case 76:dt.updateRelStyle("update_rel_style",...st[lt]),this.$=st[lt];break;case 77:dt.updateLayoutConfig("update_layout_config",...st[lt]),this.$=st[lt];break;case 78:this.$=[st[lt]];break;case 79:st[lt].unshift(st[lt-1]),this.$=st[lt];break;case 80:case 82:this.$=st[lt].trim();break;case 81:let Ce={};Ce[st[lt-1].trim()]=st[lt].trim(),this.$=Ce;break;case 83:this.$="";break}},table:[{3:1,4:2,5:3,6:4,7:e,8:i,9:r,10:s,11:5,12:10,18:n,22:a,25:o,26:l,27:h,28:u},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:e,8:i,9:r,10:s,11:5,12:10,18:n,22:a,25:o,26:l,27:h,28:u},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:d},t([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:f,33:p,34:b,36:_,38:T,39:58,40:70,42:71,44:S,46:k,47:I,48:z,49:H,50:rt,51:R,53:32,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:Bt,65:J,66:nt,67:at,68:it,69:et,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:tt,77:K,78:N,79:A,80:G,81:C,82:ft,83:x,84:Qt},{23:79,29:29,30:30,31:31,32:f,33:p,34:b,36:_,38:T,39:58,40:70,42:71,44:S,46:k,47:I,48:z,49:H,50:rt,51:R,53:32,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:Bt,65:J,66:nt,67:at,68:it,69:et,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:tt,77:K,78:N,79:A,80:G,81:C,82:ft,83:x,84:Qt},{23:80,29:29,30:30,31:31,32:f,33:p,34:b,36:_,38:T,39:58,40:70,42:71,44:S,46:k,47:I,48:z,49:H,50:rt,51:R,53:32,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:Bt,65:J,66:nt,67:at,68:it,69:et,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:tt,77:K,78:N,79:A,80:G,81:C,82:ft,83:x,84:Qt},{23:81,29:29,30:30,31:31,32:f,33:p,34:b,36:_,38:T,39:58,40:70,42:71,44:S,46:k,47:I,48:z,49:H,50:rt,51:R,53:32,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:Bt,65:J,66:nt,67:at,68:it,69:et,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:tt,77:K,78:N,79:A,80:G,81:C,82:ft,83:x,84:Qt},{23:82,29:29,30:30,31:31,32:f,33:p,34:b,36:_,38:T,39:58,40:70,42:71,44:S,46:k,47:I,48:z,49:H,50:rt,51:R,53:32,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:Bt,65:J,66:nt,67:at,68:it,69:et,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:tt,77:K,78:N,79:A,80:G,81:C,82:ft,83:x,84:Qt},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},t(j,[2,20],{53:32,39:58,40:70,42:71,30:87,44:S,46:k,47:I,48:z,49:H,50:rt,51:R,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:Bt,65:J,66:nt,67:at,68:it,69:et,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:tt,77:K,78:N,79:A,80:G,81:C,82:ft,83:x,84:Qt}),t(j,[2,21]),t(Nt,[2,23],{15:[1,88]}),t(j,[2,43],{15:[1,89]}),t(wt,[2,26]),t(wt,[2,27]),{35:[1,90]},{37:[1,91]},t(wt,[2,30]),{45:92,85:93,86:kt,87:yt,89:_t,90:mt},{45:98,85:93,86:kt,87:yt,89:_t,90:mt},{45:99,85:93,86:kt,87:yt,89:_t,90:mt},{45:100,85:93,86:kt,87:yt,89:_t,90:mt},{45:101,85:93,86:kt,87:yt,89:_t,90:mt},{45:102,85:93,86:kt,87:yt,89:_t,90:mt},{45:103,85:93,86:kt,87:yt,89:_t,90:mt},{45:104,85:93,86:kt,87:yt,89:_t,90:mt},{45:105,85:93,86:kt,87:yt,89:_t,90:mt},{45:106,85:93,86:kt,87:yt,89:_t,90:mt},{45:107,85:93,86:kt,87:yt,89:_t,90:mt},{45:108,85:93,86:kt,87:yt,89:_t,90:mt},{45:109,85:93,86:kt,87:yt,89:_t,90:mt},{45:110,85:93,86:kt,87:yt,89:_t,90:mt},{45:111,85:93,86:kt,87:yt,89:_t,90:mt},{45:112,85:93,86:kt,87:yt,89:_t,90:mt},{45:113,85:93,86:kt,87:yt,89:_t,90:mt},{45:114,85:93,86:kt,87:yt,89:_t,90:mt},{45:115,85:93,86:kt,87:yt,89:_t,90:mt},{45:116,85:93,86:kt,87:yt,89:_t,90:mt},t(Ct,[2,66]),{45:117,85:93,86:kt,87:yt,89:_t,90:mt},{45:118,85:93,86:kt,87:yt,89:_t,90:mt},{45:119,85:93,86:kt,87:yt,89:_t,90:mt},{45:120,85:93,86:kt,87:yt,89:_t,90:mt},{45:121,85:93,86:kt,87:yt,89:_t,90:mt},{45:122,85:93,86:kt,87:yt,89:_t,90:mt},{45:123,85:93,86:kt,87:yt,89:_t,90:mt},{45:124,85:93,86:kt,87:yt,89:_t,90:mt},{45:125,85:93,86:kt,87:yt,89:_t,90:mt},{45:126,85:93,86:kt,87:yt,89:_t,90:mt},{45:127,85:93,86:kt,87:yt,89:_t,90:mt},{30:128,39:58,40:70,42:71,44:S,46:k,47:I,48:z,49:H,50:rt,51:R,53:32,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:Bt,65:J,66:nt,67:at,68:it,69:et,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:tt,77:K,78:N,79:A,80:G,81:C,82:ft,83:x,84:Qt},{15:[1,130],43:[1,129]},{45:131,85:93,86:kt,87:yt,89:_t,90:mt},{45:132,85:93,86:kt,87:yt,89:_t,90:mt},{45:133,85:93,86:kt,87:yt,89:_t,90:mt},{45:134,85:93,86:kt,87:yt,89:_t,90:mt},{45:135,85:93,86:kt,87:yt,89:_t,90:mt},{45:136,85:93,86:kt,87:yt,89:_t,90:mt},{45:137,85:93,86:kt,87:yt,89:_t,90:mt},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},t(Xe,[2,9]),{14:142,21:d},{21:[2,13]},{1:[2,15]},t(j,[2,22]),t(Nt,[2,24],{31:31,29:143,32:f,33:p,34:b,36:_,38:T}),t(j,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:f,33:p,34:b,36:_,38:T,44:S,46:k,47:I,48:z,49:H,50:rt,51:R,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:Bt,65:J,66:nt,67:at,68:it,69:et,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:tt,77:K,78:N,79:A,80:G,81:C,82:ft,83:x,84:Qt}),t(wt,[2,28]),t(wt,[2,29]),t(Ct,[2,46]),t(Oe,[2,78],{85:93,45:145,86:kt,87:yt,89:_t,90:mt}),t(ie,[2,80]),{88:[1,146]},t(ie,[2,82]),t(ie,[2,83]),t(Ct,[2,47]),t(Ct,[2,48]),t(Ct,[2,49]),t(Ct,[2,50]),t(Ct,[2,51]),t(Ct,[2,52]),t(Ct,[2,53]),t(Ct,[2,54]),t(Ct,[2,55]),t(Ct,[2,56]),t(Ct,[2,57]),t(Ct,[2,58]),t(Ct,[2,59]),t(Ct,[2,60]),t(Ct,[2,61]),t(Ct,[2,62]),t(Ct,[2,63]),t(Ct,[2,64]),t(Ct,[2,65]),t(Ct,[2,67]),t(Ct,[2,68]),t(Ct,[2,69]),t(Ct,[2,70]),t(Ct,[2,71]),t(Ct,[2,72]),t(Ct,[2,73]),t(Ct,[2,74]),t(Ct,[2,75]),t(Ct,[2,76]),t(Ct,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},t(ee,[2,35]),t(ee,[2,36]),t(ee,[2,37]),t(ee,[2,38]),t(ee,[2,39]),t(ee,[2,40]),t(ee,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},t(Nt,[2,25]),t(j,[2,45]),t(Oe,[2,79]),t(ie,[2,81]),t(Ct,[2,31]),t(Ct,[2,42]),t(Le,[2,32]),t(Le,[2,33],{15:[1,152]}),t(Xe,[2,10]),t(Le,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function(St,Et){if(Et.recoverable)this.trace(St);else{var It=new Error(St);throw It.hash=Et,It}},parse:function(St){var Et=this,It=[0],dt=[],qt=[null],st=[],we=this.table,lt="",Ce=0,Fe=0,Pe=2,Me=1,Ve=st.slice.call(arguments,1),ae=Object.create(this.lexer),Te={yy:{}};for(var Ie in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ie)&&(Te.yy[Ie]=this.yy[Ie]);ae.setInput(St,Te.yy),Te.yy.lexer=ae,Te.yy.parser=this,typeof ae.yylloc=="undefined"&&(ae.yylloc={});var De=ae.yylloc;st.push(De);var Aa=ae.options&&ae.options.ranges;typeof Te.yy.parseError=="function"?this.parseError=Te.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zo(){var bi;return bi=dt.pop()||ae.lex()||Me,typeof bi!="number"&&(bi instanceof Array&&(dt=bi,bi=dt.pop()),bi=Et.symbols_[bi]||bi),bi}for(var yi,Ee,nr,Mn,Mi={},Xi,mi,yr,Ki;;){if(Ee=It[It.length-1],this.defaultActions[Ee]?nr=this.defaultActions[Ee]:((yi===null||typeof yi=="undefined")&&(yi=zo()),nr=we[Ee]&&we[Ee][yi]),typeof nr=="undefined"||!nr.length||!nr[0]){var ar="";Ki=[];for(Xi in we[Ee])this.terminals_[Xi]&&Xi>Pe&&Ki.push("'"+this.terminals_[Xi]+"'");ae.showPosition?ar="Parse error on line "+(Ce+1)+`:
1304
+ `+ae.showPosition()+`
1305
+ Expecting `+Ki.join(", ")+", got '"+(this.terminals_[yi]||yi)+"'":ar="Parse error on line "+(Ce+1)+": Unexpected "+(yi==Me?"end of input":"'"+(this.terminals_[yi]||yi)+"'"),this.parseError(ar,{text:ae.match,token:this.terminals_[yi]||yi,line:ae.yylineno,loc:De,expected:Ki})}if(nr[0]instanceof Array&&nr.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ee+", token: "+yi);switch(nr[0]){case 1:It.push(yi),qt.push(ae.yytext),st.push(ae.yylloc),It.push(nr[1]),yi=null,Fe=ae.yyleng,lt=ae.yytext,Ce=ae.yylineno,De=ae.yylloc;break;case 2:if(mi=this.productions_[nr[1]][1],Mi.$=qt[qt.length-mi],Mi._$={first_line:st[st.length-(mi||1)].first_line,last_line:st[st.length-1].last_line,first_column:st[st.length-(mi||1)].first_column,last_column:st[st.length-1].last_column},Aa&&(Mi._$.range=[st[st.length-(mi||1)].range[0],st[st.length-1].range[1]]),Mn=this.performAction.apply(Mi,[lt,Fe,Ce,Te.yy,nr[1],qt,st].concat(Ve)),typeof Mn!="undefined")return Mn;mi&&(It=It.slice(0,-1*mi*2),qt=qt.slice(0,-1*mi),st=st.slice(0,-1*mi)),It.push(this.productions_[nr[1]][0]),qt.push(Mi.$),st.push(Mi._$),yr=we[It[It.length-2]][It[It.length-1]],It.push(yr);break;case 3:return!0}}return!0}},ze=function(){var Ut={EOF:1,parseError:function(Et,It){if(this.yy.parser)this.yy.parser.parseError(Et,It);else throw new Error(Et)},setInput:function(St,Et){return this.yy=Et||this.yy||{},this._input=St,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var St=this._input[0];this.yytext+=St,this.yyleng++,this.offset++,this.match+=St,this.matched+=St;var Et=St.match(/(?:\r\n?|\n).*/g);return Et?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),St},unput:function(St){var Et=St.length,It=St.split(/(?:\r\n?|\n)/g);this._input=St+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Et),this.offset-=Et;var dt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),It.length-1&&(this.yylineno-=It.length-1);var qt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:It?(It.length===dt.length?this.yylloc.first_column:0)+dt[dt.length-It.length].length-It[0].length:this.yylloc.first_column-Et},this.options.ranges&&(this.yylloc.range=[qt[0],qt[0]+this.yyleng-Et]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1306
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(St){this.unput(this.match.slice(St))},pastInput:function(){var St=this.matched.substr(0,this.matched.length-this.match.length);return(St.length>20?"...":"")+St.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var St=this.match;return St.length<20&&(St+=this._input.substr(0,20-St.length)),(St.substr(0,20)+(St.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var St=this.pastInput(),Et=new Array(St.length+1).join("-");return St+this.upcomingInput()+`
1307
+ `+Et+"^"},test_match:function(St,Et){var It,dt,qt;if(this.options.backtrack_lexer&&(qt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(qt.yylloc.range=this.yylloc.range.slice(0))),dt=St[0].match(/(?:\r\n?|\n).*/g),dt&&(this.yylineno+=dt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:dt?dt[dt.length-1].length-dt[dt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+St[0].length},this.yytext+=St[0],this.match+=St[0],this.matches=St,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(St[0].length),this.matched+=St[0],It=this.performAction.call(this,this.yy,this,Et,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),It)return It;if(this._backtrack){for(var st in qt)this[st]=qt[st];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var St,Et,It,dt;this._more||(this.yytext="",this.match="");for(var qt=this._currentRules(),st=0;st<qt.length;st++)if(It=this._input.match(this.rules[qt[st]]),It&&(!Et||It[0].length>Et[0].length)){if(Et=It,dt=st,this.options.backtrack_lexer){if(St=this.test_match(It,qt[st]),St!==!1)return St;if(this._backtrack){Et=!1;continue}else return!1}else if(!this.options.flex)break}return Et?(St=this.test_match(Et,qt[dt]),St!==!1?St:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1308
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Et=this.next();return Et||this.lex()},begin:function(Et){this.conditionStack.push(Et)},popState:function(){var Et=this.conditionStack.length-1;return Et>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Et){return Et=this.conditionStack.length-1-Math.abs(Et||0),Et>=0?this.conditionStack[Et]:"INITIAL"},pushState:function(Et){this.begin(Et)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(Et,It,dt,qt){switch(dt){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:break;case 19:c;break;case 20:return 15;case 21:break;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:return this.begin("node"),49;case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:return this.begin("rel_u"),76;case 58:return this.begin("rel_u"),76;case 59:return this.begin("rel_d"),77;case 60:return this.begin("rel_d"),77;case 61:return this.begin("rel_l"),78;case 62:return this.begin("rel_l"),78;case 63:return this.begin("rel_r"),79;case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:this.popState(),this.popState();break;case 74:return 90;case 75:break;case 76:return 90;case 77:this.begin("string");break;case 78:this.popState();break;case 79:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 84:this.popState(),this.popState();break;case 85:return"STR";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,86,87,88,89,90],inclusive:!0}}};return Ut}();ri.lexer=ze;function he(){this.yy={}}return he.prototype=ri,ri.Parser=he,new he}();$a.parser=$a;const Fp=$a,Mp=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null;let Hr=[],Ws=[""],sr="global",Gr="",ns=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Jn=[],gl="",yl=!1,to=4,eo=2;var Y1;const Pp=function(){return Y1},Vp=function(t){Y1=Er(t,P())},Yp=function(t,e,i){ii.parseDirective(this,t,e,i)},zp=function(t,e,i,r,s,n,a,o,l){if(t==null||e===void 0||e===null||i===void 0||i===null||r===void 0||r===null)return;let h={};const u=Jn.find(d=>d.from===e&&d.to===i);if(u?h=u:Jn.push(h),h.type=t,h.from=e,h.to=i,h.label={text:r},s==null)h.techn={text:""};else if(typeof s=="object"){let[d,f]=Object.entries(s)[0];h[d]={text:f}}else h.techn={text:s};if(n==null)h.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];h[d]={text:f}}else h.descr={text:n};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];h[d]=f}else h.sprite=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];h[d]=f}else h.tags=o;if(typeof l=="object"){let[d,f]=Object.entries(l)[0];h[d]=f}else h.link=l;h.wrap=Us()},Wp=function(t,e,i,r,s,n,a){if(e===null||i===null)return;let o={};const l=Hr.find(h=>h.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,Hr.push(o)),i==null?o.label={text:""}:o.label={text:i},r==null)o.descr={text:""};else if(typeof r=="object"){let[h,u]=Object.entries(r)[0];o[h]={text:u}}else o.descr={text:r};if(typeof s=="object"){let[h,u]=Object.entries(s)[0];o[h]=u}else o.sprite=s;if(typeof n=="object"){let[h,u]=Object.entries(n)[0];o[h]=u}else o.tags=n;if(typeof a=="object"){let[h,u]=Object.entries(a)[0];o[h]=u}else o.link=a;o.typeC4Shape={text:t},o.parentBoundary=sr,o.wrap=Us()},Up=function(t,e,i,r,s,n,a,o){if(e===null||i===null)return;let l={};const h=Hr.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,Hr.push(l)),i==null?l.label={text:""}:l.label={text:i},r==null)l.techn={text:""};else if(typeof r=="object"){let[u,d]=Object.entries(r)[0];l[u]={text:d}}else l.techn={text:r};if(s==null)l.descr={text:""};else if(typeof s=="object"){let[u,d]=Object.entries(s)[0];l[u]={text:d}}else l.descr={text:s};if(typeof n=="object"){let[u,d]=Object.entries(n)[0];l[u]=d}else l.sprite=n;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];l[u]=d}else l.tags=a;if(typeof o=="object"){let[u,d]=Object.entries(o)[0];l[u]=d}else l.link=o;l.wrap=Us(),l.typeC4Shape={text:t},l.parentBoundary=sr},Zp=function(t,e,i,r,s,n,a,o){if(e===null||i===null)return;let l={};const h=Hr.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,Hr.push(l)),i==null?l.label={text:""}:l.label={text:i},r==null)l.techn={text:""};else if(typeof r=="object"){let[u,d]=Object.entries(r)[0];l[u]={text:d}}else l.techn={text:r};if(s==null)l.descr={text:""};else if(typeof s=="object"){let[u,d]=Object.entries(s)[0];l[u]={text:d}}else l.descr={text:s};if(typeof n=="object"){let[u,d]=Object.entries(n)[0];l[u]=d}else l.sprite=n;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];l[u]=d}else l.tags=a;if(typeof o=="object"){let[u,d]=Object.entries(o)[0];l[u]=d}else l.link=o;l.wrap=Us(),l.typeC4Shape={text:t},l.parentBoundary=sr},Hp=function(t,e,i,r,s){if(t===null||e===null)return;let n={};const a=ns.find(o=>o.alias===t);if(a&&t===a.alias?n=a:(n.alias=t,ns.push(n)),e==null?n.label={text:""}:n.label={text:e},i==null)n.type={text:"system"};else if(typeof i=="object"){let[o,l]=Object.entries(i)[0];n[o]={text:l}}else n.type={text:i};if(typeof r=="object"){let[o,l]=Object.entries(r)[0];n[o]=l}else n.tags=r;if(typeof s=="object"){let[o,l]=Object.entries(s)[0];n[o]=l}else n.link=s;n.parentBoundary=sr,n.wrap=Us(),Gr=sr,sr=t,Ws.push(Gr)},Gp=function(t,e,i,r,s){if(t===null||e===null)return;let n={};const a=ns.find(o=>o.alias===t);if(a&&t===a.alias?n=a:(n.alias=t,ns.push(n)),e==null?n.label={text:""}:n.label={text:e},i==null)n.type={text:"container"};else if(typeof i=="object"){let[o,l]=Object.entries(i)[0];n[o]={text:l}}else n.type={text:i};if(typeof r=="object"){let[o,l]=Object.entries(r)[0];n[o]=l}else n.tags=r;if(typeof s=="object"){let[o,l]=Object.entries(s)[0];n[o]=l}else n.link=s;n.parentBoundary=sr,n.wrap=Us(),Gr=sr,sr=t,Ws.push(Gr)},jp=function(t,e,i,r,s,n,a,o){if(e===null||i===null)return;let l={};const h=ns.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,ns.push(l)),i==null?l.label={text:""}:l.label={text:i},r==null)l.type={text:"node"};else if(typeof r=="object"){let[u,d]=Object.entries(r)[0];l[u]={text:d}}else l.type={text:r};if(s==null)l.descr={text:""};else if(typeof s=="object"){let[u,d]=Object.entries(s)[0];l[u]={text:d}}else l.descr={text:s};if(typeof a=="object"){let[u,d]=Object.entries(a)[0];l[u]=d}else l.tags=a;if(typeof o=="object"){let[u,d]=Object.entries(o)[0];l[u]=d}else l.link=o;l.nodeType=t,l.parentBoundary=sr,l.wrap=Us(),Gr=sr,sr=e,Ws.push(Gr)},qp=function(){sr=Gr,Ws.pop(),Gr=Ws.pop(),Ws.push(Gr)},Xp=function(t,e,i,r,s,n,a,o,l,h,u){let d=Hr.find(f=>f.alias===e);if(!(d===void 0&&(d=ns.find(f=>f.alias===e),d===void 0))){if(i!=null)if(typeof i=="object"){let[f,p]=Object.entries(i)[0];d[f]=p}else d.bgColor=i;if(r!=null)if(typeof r=="object"){let[f,p]=Object.entries(r)[0];d[f]=p}else d.fontColor=r;if(s!=null)if(typeof s=="object"){let[f,p]=Object.entries(s)[0];d[f]=p}else d.borderColor=s;if(n!=null)if(typeof n=="object"){let[f,p]=Object.entries(n)[0];d[f]=p}else d.shadowing=n;if(a!=null)if(typeof a=="object"){let[f,p]=Object.entries(a)[0];d[f]=p}else d.shape=a;if(o!=null)if(typeof o=="object"){let[f,p]=Object.entries(o)[0];d[f]=p}else d.sprite=o;if(l!=null)if(typeof l=="object"){let[f,p]=Object.entries(l)[0];d[f]=p}else d.techn=l;if(h!=null)if(typeof h=="object"){let[f,p]=Object.entries(h)[0];d[f]=p}else d.legendText=h;if(u!=null)if(typeof u=="object"){let[f,p]=Object.entries(u)[0];d[f]=p}else d.legendSprite=u}},Kp=function(t,e,i,r,s,n,a){const o=Jn.find(l=>l.from===e&&l.to===i);if(o!==void 0){if(r!=null)if(typeof r=="object"){let[l,h]=Object.entries(r)[0];o[l]=h}else o.textColor=r;if(s!=null)if(typeof s=="object"){let[l,h]=Object.entries(s)[0];o[l]=h}else o.lineColor=s;if(n!=null)if(typeof n=="object"){let[l,h]=Object.entries(n)[0];o[l]=parseInt(h)}else o.offsetX=parseInt(n);if(a!=null)if(typeof a=="object"){let[l,h]=Object.entries(a)[0];o[l]=parseInt(h)}else o.offsetY=parseInt(a)}},Qp=function(t,e,i){let r=to,s=eo;if(typeof e=="object"){const n=Object.values(e)[0];r=parseInt(n)}else r=parseInt(e);if(typeof i=="object"){const n=Object.values(i)[0];s=parseInt(n)}else s=parseInt(i);r>=1&&(to=r),s>=1&&(eo=s)},Jp=function(){return to},$p=function(){return eo},tg=function(){return sr},eg=function(){return Gr},z1=function(t){return t==null?Hr:Hr.filter(e=>e.parentBoundary===t)},ig=function(t){return Hr.find(e=>e.alias===t)},rg=function(t){return Object.keys(z1(t))},sg=function(t){return t==null?ns:ns.filter(e=>e.parentBoundary===t)},ng=function(){return Jn},ag=function(){return gl},og=function(t){yl=t},Us=function(){return yl},W1={addPersonOrSystem:Wp,addPersonOrSystemBoundary:Hp,addContainer:Up,addContainerBoundary:Gp,addComponent:Zp,addDeploymentNode:jp,popBoundaryParseStack:qp,addRel:zp,updateElStyle:Xp,updateRelStyle:Kp,updateLayoutConfig:Qp,autoWrap:Us,setWrap:og,getC4ShapeArray:z1,getC4Shape:ig,getC4ShapeKeys:rg,getBoundarys:sg,getCurrentBoundaryParse:tg,getParentBoundaryParse:eg,getRels:ng,getTitle:ag,getC4Type:Pp,getC4ShapeInRow:Jp,getC4BoundaryInRow:$p,setAccTitle:dr,getAccTitle:vr,getAccDescription:Tr,setAccDescription:Cr,parseDirective:Yp,getConfig:()=>P().c4,clear:function(){Hr=[],ns=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Gr="",sr="global",Ws=[""],Jn=[],Ws=[""],gl="",yl=!1,to=4,eo=2},LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(t){gl=Er(t,P())},setC4Type:Vp},ml=function(t,e){const i=t.append("rect");if(i.attr("x",e.x),i.attr("y",e.y),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("width",e.width),i.attr("height",e.height),i.attr("rx",e.rx),i.attr("ry",e.ry),e.attrs!=="undefined"&&e.attrs!==null)for(let r in e.attrs)i.attr(r,e.attrs[r]);return e.class!=="undefined"&&i.attr("class",e.class),i},U1=function(t,e,i,r,s,n){const a=t.append("image");a.attr("width",e),a.attr("height",i),a.attr("x",r),a.attr("y",s);let o=n.startsWith("data:image/png;base64")?n:(0,Vi.Nm)(n);a.attr("xlink:href",o)},lg=(t,e,i)=>{const r=t.append("g");let s=0;for(let n of e){let a=n.textColor?n.textColor:"#444444",o=n.lineColor?n.lineColor:"#444444",l=n.offsetX?parseInt(n.offsetX):0,h=n.offsetY?parseInt(n.offsetY):0,u="";if(s===0){let f=r.append("line");f.attr("x1",n.startPoint.x),f.attr("y1",n.startPoint.y),f.attr("x2",n.endPoint.x),f.attr("y2",n.endPoint.y),f.attr("stroke-width","1"),f.attr("stroke",o),f.style("fill","none"),n.type!=="rel_b"&&f.attr("marker-end","url("+u+"#arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&f.attr("marker-start","url("+u+"#arrowend)"),s=-1}else{let f=r.append("path");f.attr("fill","none").attr("stroke-width","1").attr("stroke",o).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",n.startPoint.x).replaceAll("starty",n.startPoint.y).replaceAll("controlx",n.startPoint.x+(n.endPoint.x-n.startPoint.x)/2-(n.endPoint.x-n.startPoint.x)/4).replaceAll("controly",n.startPoint.y+(n.endPoint.y-n.startPoint.y)/2).replaceAll("stopx",n.endPoint.x).replaceAll("stopy",n.endPoint.y)),n.type!=="rel_b"&&f.attr("marker-end","url("+u+"#arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&f.attr("marker-start","url("+u+"#arrowend)")}let d=i.messageFont();ys(i)(n.label.text,r,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+l,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+h,n.label.width,n.label.height,{fill:a},d),n.techn&&n.techn.text!==""&&(d=i.messageFont(),ys(i)("["+n.techn.text+"]",r,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+l,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+i.messageFontSize+5+h,Math.max(n.label.width,n.techn.width),n.techn.height,{fill:a,"font-style":"italic"},d))}},cg=function(t,e,i){const r=t.append("g");let s=e.bgColor?e.bgColor:"none",n=e.borderColor?e.borderColor:"#444444",a=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:s,stroke:n,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};ml(r,l);let h=i.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,ys(i)(e.label.text,r,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},h),e.type&&e.type.text!==""&&(h=i.boundaryFont(),h.fontColor=a,ys(i)(e.type.text,r,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},h)),e.descr&&e.descr.text!==""&&(h=i.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=a,ys(i)(e.descr.text,r,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},h))},hg=function(t,e,i){var r;let s=e.bgColor?e.bgColor:i[e.typeC4Shape.text+"_bg_color"],n=e.borderColor?e.borderColor:i[e.typeC4Shape.text+"_border_color"],a=e.fontColor?e.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const l=t.append("g");l.attr("class","person-man");const h=Z1();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":h.x=e.x,h.y=e.y,h.fill=s,h.width=e.width,h.height=e.height,h.stroke=n,h.rx=2.5,h.ry=2.5,h.attrs={"stroke-width":.5},ml(l,h);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",s).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",s).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let u=xg(i,e.typeC4Shape.text);switch(l.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":U1(l,48,48,e.x+e.width/2-24,e.y+e.image.Y,o);break}let d=i[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=a,ys(i)(e.label.text,l,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},d),d=i[e.typeC4Shape.text+"Font"](),d.fontColor=a,e.techn&&((r=e.techn)==null?void 0:r.text)!==""?ys(i)(e.techn.text,l,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},d):e.type&&e.type.text!==""&&ys(i)(e.type.text,l,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},d),e.descr&&e.descr.text!==""&&(d=i.personFont(),d.fontColor=a,ys(i)(e.descr.text,l,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},d)),e.height},ug=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},dg=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},fg=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},pg=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},gg=function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},yg=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")},mg=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},bg=function(t){const i=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);i.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),i.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},Z1=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},xg=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),ys=function(){function t(s,n,a,o,l,h,u){const d=n.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("text-anchor","middle").text(s);r(d,u)}function e(s,n,a,o,l,h,u,d){const{fontSize:f,fontFamily:p,fontWeight:b}=d,_=s.split(me.lineBreakRegex);for(let T=0;T<_.length;T++){const S=T*f-f*(_.length-1)/2,k=n.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",f).style("font-weight",b).style("font-family",p);k.append("tspan").attr("dy",S).text(_[T]).attr("alignment-baseline","mathematical"),r(k,u)}}function i(s,n,a,o,l,h,u,d){const f=n.append("switch"),b=f.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,f,a,o,l,h,u,d),r(b,u)}function r(s,n){for(const a in n)n.hasOwnProperty(a)&&s.attr(a,n[a])}return function(s){return s.textPlacement==="fo"?i:s.textPlacement==="old"?t:e}}(),as={drawRect:ml,drawBoundary:cg,drawC4Shape:hg,drawRels:lg,drawImage:U1,insertArrowHead:pg,insertArrowEnd:gg,insertArrowFilledHead:yg,insertDynamicNumber:mg,insertArrowCrossHead:bg,insertDatabaseIcon:ug,insertComputerIcon:dg,insertClockIcon:fg,getNoteRect:Z1,sanitizeUrl:Vi.Nm};let io=0,ro=0,H1=4,bl=2;$a.yy=W1;let $t={};class G1{constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,xl(e.db.getConfig())}setData(e,i,r,s){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=i,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=s}updateVal(e,i,r,s){e[i]===void 0?e[i]=r:e[i]=s(r,e[i])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let i=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,r=i+e.width,s=this.nextData.starty+e.margin*2,n=s+e.height;(i>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>H1)&&(i=this.nextData.startx+e.margin+$t.nextLinePaddingX,s=this.nextData.stopy+e.margin*2,this.nextData.stopx=r=i+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=s+e.height,this.nextData.cnt=1),e.x=i,e.y=s,this.updateVal(this.data,"startx",i,Math.min),this.updateVal(this.data,"starty",s,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",n,Math.max),this.updateVal(this.nextData,"startx",i,Math.min),this.updateVal(this.nextData,"starty",s,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",n,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},xl(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}}const xl=function(t){Oi($t,t),t.fontFamily&&($t.personFontFamily=$t.systemFontFamily=$t.messageFontFamily=t.fontFamily),t.fontSize&&($t.personFontSize=$t.systemFontSize=$t.messageFontSize=t.fontSize),t.fontWeight&&($t.personFontWeight=$t.systemFontWeight=$t.messageFontWeight=t.fontWeight)},$n=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),so=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),kg=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight});function jr(t,e,i,r,s){if(!e[t].width)if(i)e[t].text=p1(e[t].text,s,r),e[t].textLines=e[t].text.split(me.lineBreakRegex).length,e[t].width=s,e[t].height=rl(e[t].text,r);else{let n=e[t].text.split(me.lineBreakRegex);e[t].textLines=n.length;let a=0;e[t].height=0,e[t].width=0;for(const o of n)e[t].width=Math.max(ss(o,r),e[t].width),a=rl(o,r),e[t].height=e[t].height+a}}const j1=function(t,e,i){e.x=i.data.startx,e.y=i.data.starty,e.width=i.data.stopx-i.data.startx,e.height=i.data.stopy-i.data.starty,e.label.y=$t.c4ShapeMargin-35;let r=e.wrap&&$t.wrap,s=so($t);s.fontSize=s.fontSize+2,s.fontWeight="bold";let n=ss(e.label.text,s);jr("label",e,r,s,n),as.drawBoundary(t,e,$t)},q1=function(t,e,i,r){let s=0;for(const n of r){s=0;const a=i[n];let o=$n($t,a.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,a.typeC4Shape.width=ss("<<"+a.typeC4Shape.text+">>",o),a.typeC4Shape.height=o.fontSize+2,a.typeC4Shape.Y=$t.c4ShapePadding,s=a.typeC4Shape.Y+a.typeC4Shape.height-4,a.image={width:0,height:0,Y:0},a.typeC4Shape.text){case"person":case"external_person":a.image.width=48,a.image.height=48,a.image.Y=s,s=a.image.Y+a.image.height;break}a.sprite&&(a.image.width=48,a.image.height=48,a.image.Y=s,s=a.image.Y+a.image.height);let l=a.wrap&&$t.wrap,h=$t.width-$t.c4ShapePadding*2,u=$n($t,a.typeC4Shape.text);if(u.fontSize=u.fontSize+2,u.fontWeight="bold",jr("label",a,l,u,h),a.label.Y=s+8,s=a.label.Y+a.label.height,a.type&&a.type.text!==""){a.type.text="["+a.type.text+"]";let p=$n($t,a.typeC4Shape.text);jr("type",a,l,p,h),a.type.Y=s+5,s=a.type.Y+a.type.height}else if(a.techn&&a.techn.text!==""){a.techn.text="["+a.techn.text+"]";let p=$n($t,a.techn.text);jr("techn",a,l,p,h),a.techn.Y=s+5,s=a.techn.Y+a.techn.height}let d=s,f=a.label.width;if(a.descr&&a.descr.text!==""){let p=$n($t,a.typeC4Shape.text);jr("descr",a,l,p,h),a.descr.Y=s+20,s=a.descr.Y+a.descr.height,f=Math.max(a.label.width,a.descr.width),d=s-a.descr.textLines*5}f=f+$t.c4ShapePadding,a.width=Math.max(a.width||$t.width,f,$t.width),a.height=Math.max(a.height||$t.height,d,$t.height),a.margin=a.margin||$t.c4ShapeMargin,t.insert(a),as.drawC4Shape(e,a,$t)}t.bumpLastMargin($t.c4ShapeMargin)};class Or{constructor(e,i){this.x=e,this.y=i}}let X1=function(t,e){let i=t.x,r=t.y,s=e.x,n=e.y,a=i+t.width/2,o=r+t.height/2,l=Math.abs(i-s),h=Math.abs(r-n),u=h/l,d=t.height/t.width,f=null;return r==n&&i<s?f=new Or(i+t.width,o):r==n&&i>s?f=new Or(i,o):i==s&&r<n?f=new Or(a,r+t.height):i==s&&r>n&&(f=new Or(a,r)),i>s&&r<n?d>=u?f=new Or(i,o+u*t.width/2):f=new Or(a-l/h*t.height/2,r+t.height):i<s&&r<n?d>=u?f=new Or(i+t.width,o+u*t.width/2):f=new Or(a+l/h*t.height/2,r+t.height):i<s&&r>n?d>=u?f=new Or(i+t.width,o-u*t.width/2):f=new Or(a+t.height/2*l/h,r):i>s&&r>n&&(d>=u?f=new Or(i,o-t.width/2*u):f=new Or(a-t.height/2*l/h,r)),f},_g=function(t,e){let i={x:0,y:0};i.x=e.x+e.width/2,i.y=e.y+e.height/2;let r=X1(t,i);i.x=t.x+t.width/2,i.y=t.y+t.height/2;let s=X1(e,i);return{startPoint:r,endPoint:s}};const Eg=function(t,e,i,r){let s=0;for(let n of e){s=s+1;let a=n.wrap&&$t.wrap,o=kg($t);r.db.getC4Type()==="C4Dynamic"&&(n.label.text=s+": "+n.label.text);let h=ss(n.label.text,o);jr("label",n,a,o,h),n.techn&&n.techn.text!==""&&(h=ss(n.techn.text,o),jr("techn",n,a,o,h)),n.descr&&n.descr.text!==""&&(h=ss(n.descr.text,o),jr("descr",n,a,o,h));let u=i(n.from),d=i(n.to),f=_g(u,d);n.startPoint=f.startPoint,n.endPoint=f.endPoint}as.drawRels(t,e,$t)};function K1(t,e,i,r,s){let n=new G1(s);n.data.widthLimit=i.data.widthLimit/Math.min(bl,r.length);for(let[a,o]of r.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let h=o.wrap&&$t.wrap,u=so($t);if(u.fontSize=u.fontSize+2,u.fontWeight="bold",jr("label",o,h,u,n.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let b=so($t);jr("type",o,h,b,n.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let b=so($t);b.fontSize=b.fontSize-2,jr("descr",o,h,b,n.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(a==0||a%bl===0){let b=i.data.startx+$t.diagramMarginX,_=i.data.stopy+$t.diagramMarginY+l;n.setData(b,b,_,_)}else{let b=n.data.stopx!==n.data.startx?n.data.stopx+$t.diagramMarginX:n.data.startx,_=n.data.starty;n.setData(b,b,_,_)}n.name=o.alias;let d=s.db.getC4ShapeArray(o.alias),f=s.db.getC4ShapeKeys(o.alias);f.length>0&&q1(n,t,d,f),e=o.alias;let p=s.db.getBoundarys(e);p.length>0&&K1(t,e,n,p,s),o.alias!=="global"&&j1(t,o,n),i.data.stopy=Math.max(n.data.stopy+$t.c4ShapeMargin,i.data.stopy),i.data.stopx=Math.max(n.data.stopx+$t.c4ShapeMargin,i.data.stopx),io=Math.max(io,i.data.stopx),ro=Math.max(ro,i.data.stopy)}}const Q1={drawPersonOrSystemArray:q1,drawBoundary:j1,setConf:xl,draw:function(t,e,i,r){$t=P().c4;const s=P().securityLevel;let n;s==="sandbox"&&(n=(0,Q.Ys)("#i"+e));const a=s==="sandbox"?(0,Q.Ys)(n.nodes()[0].contentDocument.body):(0,Q.Ys)("body");let o=r.db;r.db.setWrap($t.wrap),H1=o.getC4ShapeInRow(),bl=o.getC4BoundaryInRow(),E.debug(`C:${JSON.stringify($t,null,2)}`);const l=s==="sandbox"?a.select(`[id="${e}"]`):(0,Q.Ys)(`[id="${e}"]`);as.insertComputerIcon(l),as.insertDatabaseIcon(l),as.insertClockIcon(l);let h=new G1(r);h.setData($t.diagramMarginX,$t.diagramMarginX,$t.diagramMarginY,$t.diagramMarginY),h.data.widthLimit=screen.availWidth,io=$t.diagramMarginX,ro=$t.diagramMarginY;const u=r.db.getTitle();let d=r.db.getBoundarys("");K1(l,"",h,d,r),as.insertArrowHead(l),as.insertArrowEnd(l),as.insertArrowCrossHead(l),as.insertArrowFilledHead(l),Eg(l,r.db.getRels(),r.db.getC4Shape,r),h.data.stopx=io,h.data.stopy=ro;const f=h.data;let b=f.stopy-f.starty+2*$t.diagramMarginY;const T=f.stopx-f.startx+2*$t.diagramMarginX;u&&l.append("text").text(u).attr("x",(f.stopx-f.startx)/2-4*$t.diagramMarginX).attr("y",f.starty+$t.diagramMarginY),Wr(l,b,T,$t.useMaxWidth);const S=u?60:0;l.attr("viewBox",f.startx-$t.diagramMarginX+" -"+($t.diagramMarginY+S)+" "+T+" "+(b+S)),E.debug("models:",f)}};var kl=function(){var t=function(K,N,A,G){for(A=A||{},G=K.length;G--;A[K[G]]=N);return A},e=[1,3],i=[1,7],r=[1,8],s=[1,9],n=[1,10],a=[1,13],o=[1,12],l=[1,16,25],h=[1,20],u=[1,32],d=[1,33],f=[1,34],p=[1,36],b=[1,39],_=[1,37],T=[1,38],S=[1,44],k=[1,45],I=[1,40],z=[1,41],H=[1,42],rt=[1,43],R=[1,48],F=[1,49],v=[1,50],L=[1,51],w=[16,25],m=[1,65],B=[1,66],g=[1,67],O=[1,68],y=[1,69],Y=[1,70],Bt=[1,71],J=[1,80],nt=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],at=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],it=[5,8,9,10,11,16,19,23,25],et=[54,88,89,90,91],Tt=[54,65,66,88,89,90,91],xt=[54,60,61,62,63,64,88,89,90,91],Z=[16,25,32],jt=[1,107],U={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,noteStatement:38,acc_title:39,acc_title_value:40,acc_descr:41,acc_descr_value:42,acc_descr_multiline_value:43,CLASS:44,STYLE_SEPARATOR:45,STRUCT_START:46,members:47,STRUCT_STOP:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,STR:54,NOTE_FOR:55,noteText:56,NOTE:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,CSSCLASS:74,commentToken:75,textToken:76,graphCodeTokens:77,textNoTagsToken:78,TAGSTART:79,TAGEND:80,"==":81,"--":82,PCT:83,DEFAULT:84,SPACE:85,MINUS:86,keywords:87,UNICODE_TEXT:88,NUM:89,ALPHA:90,BQUOTE_STR:91,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",39:"acc_title",40:"acc_title_value",41:"acc_descr",42:"acc_descr_value",43:"acc_descr_multiline_value",44:"CLASS",45:"STYLE_SEPARATOR",46:"STRUCT_START",48:"STRUCT_STOP",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"STR",55:"NOTE_FOR",57:"NOTE",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"CSSCLASS",77:"graphCodeTokens",79:"TAGSTART",80:"TAGEND",81:"==",82:"--",83:"PCT",84:"DEFAULT",85:"SPACE",86:"MINUS",87:"keywords",88:"UNICODE_TEXT",89:"NUM",90:"ALPHA",91:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[47,1],[47,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[38,3],[38,2],[53,3],[53,2],[53,2],[53,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[75,1],[75,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[78,1],[78,1],[78,1],[78,1],[28,1],[28,1],[28,1],[29,1],[56,1]],performAction:function(N,A,G,C,ft,x,Qt){var j=x.length-1;switch(ft){case 5:C.setDirection("TB");break;case 6:C.setDirection("BT");break;case 7:C.setDirection("RL");break;case 8:C.setDirection("LR");break;case 12:C.parseDirective("%%{","open_directive");break;case 13:C.parseDirective(x[j],"type_directive");break;case 14:x[j]=x[j].trim().replace(/'/g,'"'),C.parseDirective(x[j],"arg_directive");break;case 15:C.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=x[j];break;case 22:this.$=x[j-1]+x[j];break;case 23:case 24:this.$=x[j-1]+"~"+x[j];break;case 25:C.addRelation(x[j]);break;case 26:x[j-1].title=C.cleanupLabel(x[j]),C.addRelation(x[j-1]);break;case 35:this.$=x[j].trim(),C.setAccTitle(this.$);break;case 36:case 37:this.$=x[j].trim(),C.setAccDescription(this.$);break;case 38:C.addClass(x[j]);break;case 39:C.addClass(x[j-2]),C.setCssClass(x[j-2],x[j]);break;case 40:C.addClass(x[j-3]),C.addMembers(x[j-3],x[j-1]);break;case 41:C.addClass(x[j-5]),C.setCssClass(x[j-5],x[j-3]),C.addMembers(x[j-5],x[j-1]);break;case 42:C.addAnnotation(x[j],x[j-2]);break;case 43:this.$=[x[j]];break;case 44:x[j].push(x[j-1]),this.$=x[j];break;case 45:break;case 46:C.addMember(x[j-1],C.cleanupLabel(x[j]));break;case 47:break;case 48:break;case 49:this.$={id1:x[j-2],id2:x[j],relation:x[j-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:x[j-3],id2:x[j],relation:x[j-1],relationTitle1:x[j-2],relationTitle2:"none"};break;case 51:this.$={id1:x[j-3],id2:x[j],relation:x[j-2],relationTitle1:"none",relationTitle2:x[j-1]};break;case 52:this.$={id1:x[j-4],id2:x[j],relation:x[j-2],relationTitle1:x[j-3],relationTitle2:x[j-1]};break;case 53:C.addNote(x[j],x[j-1]);break;case 54:C.addNote(x[j]);break;case 55:this.$={type1:x[j-2],type2:x[j],lineType:x[j-1]};break;case 56:this.$={type1:"none",type2:x[j],lineType:x[j-1]};break;case 57:this.$={type1:x[j-1],type2:"none",lineType:x[j]};break;case 58:this.$={type1:"none",type2:"none",lineType:x[j]};break;case 59:this.$=C.relationType.AGGREGATION;break;case 60:this.$=C.relationType.EXTENSION;break;case 61:this.$=C.relationType.COMPOSITION;break;case 62:this.$=C.relationType.DEPENDENCY;break;case 63:this.$=C.relationType.LOLLIPOP;break;case 64:this.$=C.lineType.LINE;break;case 65:this.$=C.lineType.DOTTED_LINE;break;case 66:case 72:this.$=x[j-2],C.setClickEvent(x[j-1],x[j]);break;case 67:case 73:this.$=x[j-3],C.setClickEvent(x[j-2],x[j-1]),C.setTooltip(x[j-2],x[j]);break;case 68:case 76:this.$=x[j-2],C.setLink(x[j-1],x[j]);break;case 69:this.$=x[j-3],C.setLink(x[j-2],x[j-1],x[j]);break;case 70:case 78:this.$=x[j-3],C.setLink(x[j-2],x[j-1]),C.setTooltip(x[j-2],x[j]);break;case 71:case 79:this.$=x[j-4],C.setLink(x[j-3],x[j-2],x[j]),C.setTooltip(x[j-3],x[j-1]);break;case 74:this.$=x[j-3],C.setClickEvent(x[j-2],x[j-1],x[j]);break;case 75:this.$=x[j-4],C.setClickEvent(x[j-3],x[j-2],x[j-1]),C.setTooltip(x[j-3],x[j]);break;case 77:this.$=x[j-3],C.setLink(x[j-2],x[j-1],x[j]);break;case 80:C.setCssClass(x[j-1],x[j]);break}},table:[{3:1,4:2,5:e,6:4,7:5,8:i,9:r,10:s,11:n,12:6,13:11,19:a,23:o},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:i,9:r,10:s,11:n,12:6,13:11,19:a,23:o},{1:[2,9]},t(l,[2,5]),t(l,[2,6]),t(l,[2,7]),t(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:h},t([17,22],[2,13]),{6:31,7:30,8:i,9:r,10:s,11:n,13:11,19:a,24:21,26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:u,41:d,43:f,44:p,49:b,51:_,52:T,55:S,57:k,67:I,68:z,70:H,74:rt,88:R,89:F,90:v,91:L},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},t(w,[2,25],{32:[1,57]}),t(w,[2,27]),t(w,[2,28]),t(w,[2,29]),t(w,[2,30]),t(w,[2,31]),t(w,[2,32]),t(w,[2,33]),t(w,[2,34]),{40:[1,58]},{42:[1,59]},t(w,[2,37]),t(w,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:m,61:B,62:g,63:O,64:y,65:Y,66:Bt}),{27:72,28:46,29:47,88:R,89:F,90:v,91:L},t(w,[2,47]),t(w,[2,48]),{28:73,88:R,89:F,90:v},{27:74,28:46,29:47,88:R,89:F,90:v,91:L},{27:75,28:46,29:47,88:R,89:F,90:v,91:L},{27:76,28:46,29:47,88:R,89:F,90:v,91:L},{54:[1,77]},{27:78,28:46,29:47,88:R,89:F,90:v,91:L},{54:J,56:79},t(nt,[2,20],{28:46,29:47,27:81,30:[1,82],88:R,89:F,90:v,91:L}),t(nt,[2,21],{30:[1,83]}),t(at,[2,94]),t(at,[2,95]),t(at,[2,96]),t([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),t(it,[2,10]),{15:84,22:h},{22:[2,14]},{1:[2,16]},{6:31,7:30,8:i,9:r,10:s,11:n,13:11,19:a,24:85,25:[2,18],26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:u,41:d,43:f,44:p,49:b,51:_,52:T,55:S,57:k,67:I,68:z,70:H,74:rt,88:R,89:F,90:v,91:L},t(w,[2,26]),t(w,[2,35]),t(w,[2,36]),{27:86,28:46,29:47,54:[1,87],88:R,89:F,90:v,91:L},{53:88,58:63,59:64,60:m,61:B,62:g,63:O,64:y,65:Y,66:Bt},t(w,[2,46]),{59:89,65:Y,66:Bt},t(et,[2,58],{58:90,60:m,61:B,62:g,63:O,64:y}),t(Tt,[2,59]),t(Tt,[2,60]),t(Tt,[2,61]),t(Tt,[2,62]),t(Tt,[2,63]),t(xt,[2,64]),t(xt,[2,65]),t(w,[2,38],{45:[1,91],46:[1,92]}),{50:[1,93]},{54:[1,94]},{54:[1,95]},{71:[1,96],73:[1,97]},{28:98,88:R,89:F,90:v},{54:J,56:99},t(w,[2,54]),t(w,[2,98]),t(nt,[2,22]),t(nt,[2,23]),t(nt,[2,24]),{16:[1,100]},{25:[2,19]},t(Z,[2,49]),{27:101,28:46,29:47,88:R,89:F,90:v,91:L},{27:102,28:46,29:47,54:[1,103],88:R,89:F,90:v,91:L},t(et,[2,57],{58:104,60:m,61:B,62:g,63:O,64:y}),t(et,[2,56]),{28:105,88:R,89:F,90:v},{47:106,51:jt},{27:108,28:46,29:47,88:R,89:F,90:v,91:L},t(w,[2,66],{54:[1,109]}),t(w,[2,68],{54:[1,111],69:[1,110]}),t(w,[2,72],{54:[1,112],72:[1,113]}),t(w,[2,76],{54:[1,115],69:[1,114]}),t(w,[2,80]),t(w,[2,53]),t(it,[2,11]),t(Z,[2,51]),t(Z,[2,50]),{27:116,28:46,29:47,88:R,89:F,90:v,91:L},t(et,[2,55]),t(w,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:jt},t(w,[2,42]),t(w,[2,67]),t(w,[2,69]),t(w,[2,70],{69:[1,120]}),t(w,[2,73]),t(w,[2,74],{54:[1,121]}),t(w,[2,77]),t(w,[2,78],{69:[1,122]}),t(Z,[2,52]),{47:123,51:jt},t(w,[2,40]),{48:[2,44]},t(w,[2,71]),t(w,[2,75]),t(w,[2,79]),{48:[1,124]},t(w,[2,41])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],54:[2,14],55:[2,16],85:[2,19],119:[2,44]},parseError:function(N,A){if(A.recoverable)this.trace(N);else{var G=new Error(N);throw G.hash=A,G}},parse:function(N){var A=this,G=[0],C=[],ft=[null],x=[],Qt=this.table,j="",Nt=0,wt=0,kt=2,yt=1,_t=x.slice.call(arguments,1),mt=Object.create(this.lexer),Ct={yy:{}};for(var Xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xe)&&(Ct.yy[Xe]=this.yy[Xe]);mt.setInput(N,Ct.yy),Ct.yy.lexer=mt,Ct.yy.parser=this,typeof mt.yylloc=="undefined"&&(mt.yylloc={});var Oe=mt.yylloc;x.push(Oe);var ie=mt.options&&mt.options.ranges;typeof Ct.yy.parseError=="function"?this.parseError=Ct.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ee(){var st;return st=C.pop()||mt.lex()||yt,typeof st!="number"&&(st instanceof Array&&(C=st,st=C.pop()),st=A.symbols_[st]||st),st}for(var Le,ri,ze,he,Ut={},St,Et,It,dt;;){if(ri=G[G.length-1],this.defaultActions[ri]?ze=this.defaultActions[ri]:((Le===null||typeof Le=="undefined")&&(Le=ee()),ze=Qt[ri]&&Qt[ri][Le]),typeof ze=="undefined"||!ze.length||!ze[0]){var qt="";dt=[];for(St in Qt[ri])this.terminals_[St]&&St>kt&&dt.push("'"+this.terminals_[St]+"'");mt.showPosition?qt="Parse error on line "+(Nt+1)+`:
1309
+ `+mt.showPosition()+`
1310
+ Expecting `+dt.join(", ")+", got '"+(this.terminals_[Le]||Le)+"'":qt="Parse error on line "+(Nt+1)+": Unexpected "+(Le==yt?"end of input":"'"+(this.terminals_[Le]||Le)+"'"),this.parseError(qt,{text:mt.match,token:this.terminals_[Le]||Le,line:mt.yylineno,loc:Oe,expected:dt})}if(ze[0]instanceof Array&&ze.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ri+", token: "+Le);switch(ze[0]){case 1:G.push(Le),ft.push(mt.yytext),x.push(mt.yylloc),G.push(ze[1]),Le=null,wt=mt.yyleng,j=mt.yytext,Nt=mt.yylineno,Oe=mt.yylloc;break;case 2:if(Et=this.productions_[ze[1]][1],Ut.$=ft[ft.length-Et],Ut._$={first_line:x[x.length-(Et||1)].first_line,last_line:x[x.length-1].last_line,first_column:x[x.length-(Et||1)].first_column,last_column:x[x.length-1].last_column},ie&&(Ut._$.range=[x[x.length-(Et||1)].range[0],x[x.length-1].range[1]]),he=this.performAction.apply(Ut,[j,wt,Nt,Ct.yy,ze[1],ft,x].concat(_t)),typeof he!="undefined")return he;Et&&(G=G.slice(0,-1*Et*2),ft=ft.slice(0,-1*Et),x=x.slice(0,-1*Et)),G.push(this.productions_[ze[1]][0]),ft.push(Ut.$),x.push(Ut._$),It=Qt[G[G.length-2]][G[G.length-1]],G.push(It);break;case 3:return!0}}return!0}},gt=function(){var K={EOF:1,parseError:function(A,G){if(this.yy.parser)this.yy.parser.parseError(A,G);else throw new Error(A)},setInput:function(N,A){return this.yy=A||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var A=N.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},unput:function(N){var A=N.length,G=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var C=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),G.length-1&&(this.yylineno-=G.length-1);var ft=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:G?(G.length===C.length?this.yylloc.first_column:0)+C[C.length-G.length].length-G[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[ft[0],ft[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1311
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(N){this.unput(this.match.slice(N))},pastInput:function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var N=this.pastInput(),A=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
1312
+ `+A+"^"},test_match:function(N,A){var G,C,ft;if(this.options.backtrack_lexer&&(ft={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ft.yylloc.range=this.yylloc.range.slice(0))),C=N[0].match(/(?:\r\n?|\n).*/g),C&&(this.yylineno+=C.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(N[0].length),this.matched+=N[0],G=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),G)return G;if(this._backtrack){for(var x in ft)this[x]=ft[x];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,A,G,C;this._more||(this.yytext="",this.match="");for(var ft=this._currentRules(),x=0;x<ft.length;x++)if(G=this._input.match(this.rules[ft[x]]),G&&(!A||G[0].length>A[0].length)){if(A=G,C=x,this.options.backtrack_lexer){if(N=this.test_match(G,ft[x]),N!==!1)return N;if(this._backtrack){A=!1;continue}else return!1}else if(!this.options.flex)break}return A?(N=this.test_match(A,ft[C]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1313
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var A=this.next();return A||this.lex()},begin:function(A){this.conditionStack.push(A)},popState:function(){var A=this.conditionStack.length-1;return A>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(A){return A=this.conditionStack.length-1-Math.abs(A||0),A>=0?this.conditionStack[A]:"INITIAL"},pushState:function(A){this.begin(A)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(A,G,C,ft){switch(C){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:break;case 10:break;case 11:return this.begin("acc_title"),39;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),41;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 19:break;case 20:return 23;case 21:return 23;case 22:return this.begin("struct"),46;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),48;case 27:break;case 28:return"MEMBER";case 29:return 44;case 30:return 74;case 31:return 67;case 32:return 68;case 33:return 70;case 34:return 55;case 35:return 57;case 36:return 49;case 37:return 50;case 38:this.begin("generic");break;case 39:this.popState();break;case 40:return"GENERICTYPE";case 41:this.begin("string");break;case 42:this.popState();break;case 43:return"STR";case 44:this.begin("bqstring");break;case 45:this.popState();break;case 46:return"BQUOTE_STR";case 47:this.begin("href");break;case 48:this.popState();break;case 49:return 73;case 50:this.begin("callback_name");break;case 51:this.popState();break;case 52:this.popState(),this.begin("callback_args");break;case 53:return 71;case 54:this.popState();break;case 55:return 72;case 56:return 69;case 57:return 69;case 58:return 69;case 59:return 69;case 60:return 61;case 61:return 61;case 62:return 63;case 63:return 63;case 64:return 62;case 65:return 60;case 66:return 64;case 67:return 65;case 68:return 66;case 69:return 32;case 70:return 45;case 71:return 86;case 72:return"DOT";case 73:return"PLUS";case 74:return 83;case 75:return"EQUALS";case 76:return"EQUALS";case 77:return 90;case 78:return"PUNCTUATION";case 79:return 89;case 80:return 88;case 81:return 85;case 82:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[54,55],inclusive:!1},callback_name:{rules:[51,52,53],inclusive:!1},href:{rules:[48,49],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[39,40],inclusive:!1},bqstring:{rules:[45,46],inclusive:!1},string:{rules:[42,43],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,37,38,41,44,47,50,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82],inclusive:!0}}};return K}();U.lexer=gt;function tt(){this.yy={}}return tt.prototype=U,U.Parser=tt,new tt}();kl.parser=kl;const J1=kl,vg=(t,e)=>{var i;return((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*classDiagram/)!==null},Cg=(t,e)=>{var i;return t.match(/^\s*classDiagram/)!==null&&((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*classDiagram-v2/)!==null},_l="classid-";let El=[],fi={},no=[],$1=0,ta=[];const ea=t=>me.sanitizeText(t,P()),Tg=function(t,e,i){ii.parseDirective(this,t,e,i)},ia=function(t){let e="",i=t;if(t.indexOf("~")>0){let r=t.split("~");i=r[0],e=me.sanitizeText(r[1],P())}return{className:i,type:e}},vl=function(t){let e=ia(t);fi[e.className]===void 0&&(fi[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:_l+e.className+"-"+$1},$1++)},th=function(t){const e=Object.keys(fi);for(const i of e)if(fi[i].id===t)return fi[i].domId},Sg=function(){El=[],fi={},no=[],ta=[],ta.push(ih),ur()},wg=function(t){return fi[t]},Ag=function(){return fi},Lg=function(){return El},Bg=function(){return no},Ig=function(t){E.debug("Adding relation: "+JSON.stringify(t)),vl(t.id1),vl(t.id2),t.id1=ia(t.id1).className,t.id2=ia(t.id2).className,t.relationTitle1=me.sanitizeText(t.relationTitle1.trim(),P()),t.relationTitle2=me.sanitizeText(t.relationTitle2.trim(),P()),El.push(t)},Dg=function(t,e){const i=ia(t).className;fi[i].annotations.push(e)},eh=function(t,e){const i=ia(t).className,r=fi[i];if(typeof e=="string"){const s=e.trim();s.startsWith("<<")&&s.endsWith(">>")?r.annotations.push(ea(s.substring(2,s.length-2))):s.indexOf(")")>0?r.methods.push(ea(s)):s&&r.members.push(ea(s))}},Rg=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(i=>eh(t,i)))},Ng=function(t,e){const i={id:`note${no.length}`,class:e,text:t};no.push(i)},Og=function(t){return t.substring(0,1)===":"?me.sanitizeText(t.substr(1).trim(),P()):ea(t.trim())},Cl=function(t,e){t.split(",").forEach(function(i){let r=i;i[0].match(/\d/)&&(r=_l+r),fi[r]!==void 0&&fi[r].cssClasses.push(e)})},Fg=function(t,e){const i=P();t.split(",").forEach(function(r){e!==void 0&&(fi[r].tooltip=me.sanitizeText(e,i))})},Mg=function(t){return fi[t].tooltip},Pg=function(t,e,i){const r=P();t.split(",").forEach(function(s){let n=s;s[0].match(/\d/)&&(n=_l+n),fi[n]!==void 0&&(fi[n].link=xe.formatUrl(e,r),r.securityLevel==="sandbox"?fi[n].linkTarget="_top":typeof i=="string"?fi[n].linkTarget=ea(i):fi[n].linkTarget="_blank")}),Cl(t,"clickable")},Vg=function(t,e,i){t.split(",").forEach(function(r){Yg(r,e,i),fi[r].haveCallback=!0}),Cl(t,"clickable")},Yg=function(t,e,i){const r=P();let s=t,n=th(s);if(r.securityLevel==="loose"&&e!==void 0&&fi[s]!==void 0){let a=[];if(typeof i=="string"){a=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<a.length;o++){let l=a[o].trim();l.charAt(0)==='"'&&l.charAt(l.length-1)==='"'&&(l=l.substr(1,l.length-2)),a[o]=l}}a.length===0&&a.push(n),ta.push(function(){const o=document.querySelector(`[id="${n}"]`);o!==null&&o.addEventListener("click",function(){xe.runFunc(e,...a)},!1)})}},zg=function(t){ta.forEach(function(e){e(t)})},Wg={LINE:0,DOTTED_LINE:1},Ug={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},ih=function(t){let e=(0,Q.Ys)(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=(0,Q.Ys)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),(0,Q.Ys)(t).select("svg").selectAll("g.node").on("mouseover",function(){const s=(0,Q.Ys)(this);if(s.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),s.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),(0,Q.Ys)(this).classed("hover",!1)})};ta.push(ih);let rh="TB";const Tn={parseDirective:Tg,setAccTitle:dr,getAccTitle:vr,getAccDescription:Tr,setAccDescription:Cr,getConfig:()=>P().class,addClass:vl,bindFunctions:zg,clear:Sg,getClass:wg,getClasses:Ag,getNotes:Bg,addAnnotation:Dg,addNote:Ng,getRelations:Lg,addRelation:Ig,getDirection:()=>rh,setDirection:t=>{rh=t},addMember:eh,addMembers:Rg,cleanupLabel:Og,lineType:Wg,relationType:Ug,setClickEvent:Vg,setCssClass:Cl,setLink:Pg,getTooltip:Mg,setTooltip:Fg,lookUpDomId:th,setDiagramTitle:Ur,getDiagramTitle:Zr};let sh=0;const Zg=function(t,e,i,r,s){const n=function(k){switch(k){case s.db.relationType.AGGREGATION:return"aggregation";case s.db.relationType.EXTENSION:return"extension";case s.db.relationType.COMPOSITION:return"composition";case s.db.relationType.DEPENDENCY:return"dependency";case s.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter(k=>!Number.isNaN(k.y));const a=e.points,o=(0,Q.jvg)().x(function(k){return k.x}).y(function(k){return k.y}).curve(Q.$0Z),l=t.append("path").attr("d",o(a)).attr("id","edge"+sh).attr("class","relation");let h="";r.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),i.relation.lineType==1&&l.attr("class","relation dashed-line"),i.relation.lineType==10&&l.attr("class","relation dotted-line"),i.relation.type1!=="none"&&l.attr("marker-start","url("+h+"#"+n(i.relation.type1)+"Start)"),i.relation.type2!=="none"&&l.attr("marker-end","url("+h+"#"+n(i.relation.type2)+"End)");let u,d;const f=e.points.length;let p=xe.calcLabelPosition(e.points);u=p.x,d=p.y;let b,_,T,S;if(f%2!==0&&f>1){let k=xe.calcCardinalityPosition(i.relation.type1!=="none",e.points,e.points[0]),I=xe.calcCardinalityPosition(i.relation.type2!=="none",e.points,e.points[f-1]);E.debug("cardinality_1_point "+JSON.stringify(k)),E.debug("cardinality_2_point "+JSON.stringify(I)),b=k.x,_=k.y,T=I.x,S=I.y}if(i.title!==void 0){const k=t.append("g").attr("class","classLabel"),I=k.append("text").attr("class","label").attr("x",u).attr("y",d).attr("fill","red").attr("text-anchor","middle").text(i.title);window.label=I;const z=I.node().getBBox();k.insert("rect",":first-child").attr("class","box").attr("x",z.x-r.padding/2).attr("y",z.y-r.padding/2).attr("width",z.width+r.padding).attr("height",z.height+r.padding)}E.info("Rendering relation "+JSON.stringify(i)),i.relationTitle1!==void 0&&i.relationTitle1!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",b).attr("y",_).attr("fill","black").attr("font-size","6").text(i.relationTitle1),i.relationTitle2!==void 0&&i.relationTitle2!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",T).attr("y",S).attr("fill","black").attr("font-size","6").text(i.relationTitle2),sh++},Hg=function(t,e,i,r){E.debug("Rendering class ",e,i);const s=e.id,n={id:s,label:e.id,width:0,height:0},a=t.append("g").attr("id",r.db.lookUpDomId(s)).attr("class","classGroup");let o;e.link?o=a.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",i.textHeight+i.padding).attr("x",0):o=a.append("text").attr("y",i.textHeight+i.padding).attr("x",0);let l=!0;e.annotations.forEach(function(H){const rt=o.append("tspan").text("\xAB"+H+"\xBB");l||rt.attr("dy",i.textHeight),l=!1});let h=e.id;e.type!==void 0&&e.type!==""&&(h+="<"+e.type+">");const u=o.append("tspan").text(h).attr("class","title");l||u.attr("dy",i.textHeight);const d=o.node().getBBox().height,f=a.append("line").attr("x1",0).attr("y1",i.padding+d+i.dividerMargin/2).attr("y2",i.padding+d+i.dividerMargin/2),p=a.append("text").attr("x",i.padding).attr("y",d+i.dividerMargin+i.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach(function(H){nh(p,H,l,i),l=!1});const b=p.node().getBBox(),_=a.append("line").attr("x1",0).attr("y1",i.padding+d+i.dividerMargin+b.height).attr("y2",i.padding+d+i.dividerMargin+b.height),T=a.append("text").attr("x",i.padding).attr("y",d+2*i.dividerMargin+b.height+i.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach(function(H){nh(T,H,l,i),l=!1});const S=a.node().getBBox();var k=" ";e.cssClasses.length>0&&(k=k+e.cssClasses.join(" "));const z=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",S.width+2*i.padding).attr("height",S.height+i.padding+.5*i.dividerMargin).attr("class",k).node().getBBox().width;return o.node().childNodes.forEach(function(H){H.setAttribute("x",(z-H.getBBox().width)/2)}),e.tooltip&&o.insert("title").text(e.tooltip),f.attr("x2",z),_.attr("x2",z),n.width=z,n.height=S.height+i.padding+.5*i.dividerMargin,n},Gg=function(t,e,i,r){E.debug("Rendering note ",e,i);const s=e.id,n={id:s,text:e.text,width:0,height:0},a=t.append("g").attr("id",s).attr("class","classGroup");let o=a.append("text").attr("y",i.textHeight+i.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split(`
1314
+ `);l.forEach(function(f){E.debug(`Adding line: ${f}`),o.append("tspan").text(f).attr("class","title").attr("dy",i.textHeight)});const h=a.node().getBBox(),d=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",h.width+2*i.padding).attr("height",h.height+l.length*i.textHeight+i.padding+.5*i.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach(function(f){f.setAttribute("x",(d-f.getBBox().width)/2)}),n.width=d,n.height=h.height+l.length*i.textHeight+i.padding+.5*i.dividerMargin,n},ao=function(t){const e=/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/,i=/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/;let r=t.match(e),s=t.match(i);return r&&!s?jg(r):s?qg(s):Xg(t)},jg=function(t){let e="",i="";try{let r=t[1]?t[1].trim():"",s=t[2]?t[2].trim():"",n=t[3]?Ps(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";i=r+s+n+" "+a,e=Tl(o)}catch(r){i=t}return{displayText:i,cssStyle:e}},qg=function(t){let e="",i="";try{let r=t[1]?t[1].trim():"",s=t[2]?t[2].trim():"",n=t[3]?Ps(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?" : "+Ps(t[5]).trim():"";i=r+s+"("+n+")"+o,e=Tl(a)}catch(r){i=t}return{displayText:i,cssStyle:e}},Xg=function(t){let e="",i="",r="",s=t.indexOf("("),n=t.indexOf(")");if(s>1&&n>s&&n<=t.length){let a="",o="",l=t.substring(0,1);l.match(/\w/)?o=t.substring(0,s).trim():(l.match(/[#+~-]/)&&(a=l),o=t.substring(1,s).trim());const h=t.substring(s+1,n);t.substring(n+1,1),i=Tl(t.substring(n+1,n+2)),e=a+o+"("+Ps(h.trim())+")",n<t.length&&(r=t.substring(n+2).trim(),r!==""&&(r=" : "+Ps(r),e+=r))}else e=Ps(t);return{displayText:e,cssStyle:i}},nh=function(t,e,i,r){let s=ao(e);const n=t.append("tspan").attr("x",r.padding).text(s.displayText);s.cssStyle!==""&&n.attr("style",s.cssStyle),i||n.attr("dy",r.textHeight)},Tl=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},Sl={drawClass:Hg,drawEdge:Zg,drawNote:Gg,parseMember:ao};let oo={};const lo=20,ra=function(t){const e=Object.entries(oo).find(i=>i[1].label===t);if(e)return e[0]},Kg=function(t){t.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"),t.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"),t.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"),t.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"),t.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"),t.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"),t.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"),t.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")},Qg={draw:function(t,e,i,r){const s=P().class;oo={},E.info("Rendering diagram "+t);const n=P().securityLevel;let a;n==="sandbox"&&(a=(0,Q.Ys)("#i"+e));const o=n==="sandbox"?(0,Q.Ys)(a.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),l=o.select(`[id='${e}']`);Kg(l);const h=new Be.k({multigraph:!0});h.setGraph({isMultiGraph:!0}),h.setDefaultEdgeLabel(function(){return{}});const u=r.db.getClasses(),d=Object.keys(u);for(const k of d){const I=u[k],z=Sl.drawClass(l,I,s,r);oo[z.id]=z,h.setNode(z.id,z),E.info("Org height: "+z.height)}r.db.getRelations().forEach(function(k){E.info("tjoho"+ra(k.id1)+ra(k.id2)+JSON.stringify(k)),h.setEdge(ra(k.id1),ra(k.id2),{relation:k},k.title||"DEFAULT")}),r.db.getNotes().forEach(function(k){E.debug(`Adding note: ${JSON.stringify(k)}`);const I=Sl.drawNote(l,k,s,r);oo[I.id]=I,h.setNode(I.id,I),k.class&&k.class in u&&h.setEdge(k.id,ra(k.class),{relation:{id1:k.id,id2:k.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),(0,be.bK)(h),h.nodes().forEach(function(k){k!==void 0&&h.node(k)!==void 0&&(E.debug("Node "+k+": "+JSON.stringify(h.node(k))),o.select("#"+(r.db.lookUpDomId(k)||k)).attr("transform","translate("+(h.node(k).x-h.node(k).width/2)+","+(h.node(k).y-h.node(k).height/2)+" )"))}),h.edges().forEach(function(k){k!==void 0&&h.edge(k)!==void 0&&(E.debug("Edge "+k.v+" -> "+k.w+": "+JSON.stringify(h.edge(k))),Sl.drawEdge(l,h.edge(k),h.edge(k).relation,s,r))});const b=l.node().getBBox(),_=b.width+lo*2,T=b.height+lo*2;Wr(l,T,_,s.useMaxWidth);const S=`${b.x-lo} ${b.y-lo} ${_} ${T}`;E.debug(`viewBox ${S}`),l.attr("viewBox",S)}},Jg=(t,e,i,r)=>{e.forEach(s=>{$g[s](t,i,r)})},$g={extension:(t,e,i)=>{E.trace("Making markers for ",i),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).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")},composition:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).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")},aggregation:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).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")},dependency:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).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")},lollipop:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},point:(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 12 20").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:(t,e)=>{t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:(t,e)=>{t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},ah=Jg;function ty(t,e){e&&t.attr("style",e)}function ey(t){const e=(0,Q.Ys)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=e.append("xhtml:div"),r=t.label,s=t.isNode?"nodeLabel":"edgeLabel";return i.html('<span class="'+s+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>"),ty(i,t.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}const pr=(t,e,i,r)=>{let s=t||"";if(typeof s=="object"&&(s=s[0]),Ti(P().flowchart.htmlLabels)){s=s.replace(/\\n|\n/g,"<br />"),E.info("vertexText"+s);const n={isNode:r,label:Bc(s).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:e.replace("fill:","color:")};return ey(n)}else{const n=document.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("style",e.replace("color:","fill:"));let a=[];typeof s=="string"?a=s.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(s)?a=s:a=[];for(const o of a){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),i?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),n.appendChild(l)}return n}},ji=(t,e,i,r)=>{let s;i?s=i:s="node default";const n=t.insert("g").attr("class",s).attr("id",e.domId||e.id),a=n.insert("g").attr("class","label").attr("style",e.labelStyle);let o;e.labelText===void 0?o="":o=typeof e.labelText=="string"?e.labelText:e.labelText[0];const l=a.node().appendChild(pr(Er(Bc(o),P()),e.labelStyle,!1,r));let h=l.getBBox();if(Ti(P().flowchart.htmlLabels)){const d=l.children[0],f=(0,Q.Ys)(l);h=d.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}const u=e.padding/2;return a.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),{shapeSvg:n,bbox:h,halfPadding:u,label:a}},pi=(t,e)=>{const i=e.node().getBBox();t.width=i.width,t.height=i.height};function ms(t,e,i,r){return t.insert("polygon",":first-child").attr("points",r.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}let Ye={},qr={},oh={};const iy=()=>{qr={},oh={},Ye={}},co=(t,e)=>(E.trace("In isDecendant",e," ",t," = ",qr[e].includes(t)),!!qr[e].includes(t)),ry=(t,e)=>(E.info("Decendants of ",e," is ",qr[e]),E.info("Edge is ",t),t.v===e||t.w===e?!1:qr[e]?qr[e].includes(t.v)||co(t.v,e)||co(t.w,e)||qr[e].includes(t.w):(E.debug("Tilt, ",e,",not in decendants"),!1)),lh=(t,e,i,r)=>{E.warn("Copying children of ",t,"root",r,"data",e.node(t),r);const s=e.children(t)||[];t!==r&&s.push(t),E.warn("Copying (nodes) clusterId",t,"nodes",s),s.forEach(n=>{if(e.children(n).length>0)lh(n,e,i,r);else{const a=e.node(n);E.info("cp ",n," to ",r," with parent ",t),i.setNode(n,a),r!==e.parent(n)&&(E.warn("Setting parent",n,e.parent(n)),i.setParent(n,e.parent(n))),t!==r&&n!==t?(E.debug("Setting parent",n,t),i.setParent(n,t)):(E.info("In copy ",t,"root",r,"data",e.node(t),r),E.debug("Not Setting parent for node=",n,"cluster!==rootId",t!==r,"node!==clusterId",n!==t));const o=e.edges(n);E.debug("Copying Edges",o),o.forEach(l=>{E.info("Edge",l);const h=e.edge(l.v,l.w,l.name);E.info("Edge data",h,r);try{ry(l,r)?(E.info("Copying as ",l.v,l.w,h,l.name),i.setEdge(l.v,l.w,h,l.name),E.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):E.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",r," clusterId:",t)}catch(u){E.error(u)}})}E.debug("Removing node",n),e.removeNode(n)})},ch=(t,e)=>{const i=e.children(t);let r=[...i];for(const s of i)oh[s]=t,r=[...r,...ch(s,e)];return r},sa=(t,e)=>{E.trace("Searching",t);const i=e.children(t);if(E.trace("Searching children of id ",t,i),i.length<1)return E.trace("This is a valid node",t),t;for(const r of i){const s=sa(r,e);if(s)return E.trace("Found replacement for",t," => ",s),s}},ho=t=>!Ye[t]||!Ye[t].externalConnections?t:Ye[t]?Ye[t].id:t,sy=(t,e)=>{if(!t||e>10){E.debug("Opting out, no graph ");return}else E.debug("Opting in, graph ");t.nodes().forEach(function(i){t.children(i).length>0&&(E.warn("Cluster identified",i," Replacement id in edges: ",sa(i,t)),qr[i]=ch(i,t),Ye[i]={id:sa(i,t),clusterData:t.node(i)})}),t.nodes().forEach(function(i){const r=t.children(i),s=t.edges();r.length>0?(E.debug("Cluster identified",i,qr),s.forEach(n=>{if(n.v!==i&&n.w!==i){const a=co(n.v,i),o=co(n.w,i);a^o&&(E.warn("Edge: ",n," leaves cluster ",i),E.warn("Decendants of XXX ",i,": ",qr[i]),Ye[i].externalConnections=!0)}})):E.debug("Not a cluster ",i,qr)}),t.edges().forEach(function(i){const r=t.edge(i);E.warn("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),E.warn("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(t.edge(i)));let s=i.v,n=i.w;if(E.warn("Fix XXX",Ye,"ids:",i.v,i.w,"Translating: ",Ye[i.v]," --- ",Ye[i.w]),Ye[i.v]&&Ye[i.w]&&Ye[i.v]===Ye[i.w]){E.warn("Fixing and trixing link to self - removing XXX",i.v,i.w,i.name),E.warn("Fixing and trixing - removing XXX",i.v,i.w,i.name),s=ho(i.v),n=ho(i.w),t.removeEdge(i.v,i.w,i.name);const a=i.w+"---"+i.v;t.setNode(a,{domId:a,id:a,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const o=JSON.parse(JSON.stringify(r)),l=JSON.parse(JSON.stringify(r));o.label="",o.arrowTypeEnd="none",l.label="",o.fromCluster=i.v,l.toCluster=i.v,t.setEdge(s,a,o,i.name+"-cyclic-special"),t.setEdge(a,n,l,i.name+"-cyclic-special")}else(Ye[i.v]||Ye[i.w])&&(E.warn("Fixing and trixing - removing XXX",i.v,i.w,i.name),s=ho(i.v),n=ho(i.w),t.removeEdge(i.v,i.w,i.name),s!==i.v&&(r.fromCluster=i.v),n!==i.w&&(r.toCluster=i.w),E.warn("Fix Replacing with XXX",s,n,i.name),t.setEdge(s,n,r,i.name))}),E.warn("Adjusted Graph",fe.c(t)),hh(t,0),E.trace(Ye)},hh=(t,e)=>{if(E.warn("extractor - ",e,fe.c(t),t.children("D")),e>10){E.error("Bailing out");return}let i=t.nodes(),r=!1;for(const s of i){const n=t.children(s);r=r||n.length>0}if(!r){E.debug("Done, no node has children",t.nodes());return}E.debug("Nodes = ",i,e);for(const s of i)if(E.debug("Extracting node",s,Ye,Ye[s]&&!Ye[s].externalConnections,!t.parent(s),t.node(s),t.children("D")," Depth ",e),!Ye[s])E.debug("Not a cluster",s,e);else if(!Ye[s].externalConnections&&t.children(s)&&t.children(s).length>0){E.warn("Cluster without external connections, without a parent and with children",s,e);let a=t.graph().rankdir==="TB"?"LR":"TB";Ye[s]&&Ye[s].clusterData&&Ye[s].clusterData.dir&&(a=Ye[s].clusterData.dir,E.warn("Fixing dir",Ye[s].clusterData.dir,a));const o=new Be.k({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});E.warn("Old graph before copy",fe.c(t)),lh(s,t,o,s),t.setNode(s,{clusterNode:!0,id:s,clusterData:Ye[s].clusterData,labelText:Ye[s].labelText,graph:o}),E.warn("New graph after copy node: (",s,")",fe.c(o)),E.debug("Old graph after copy",fe.c(t))}else E.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!Ye[s].externalConnections," no parent: ",!t.parent(s)," children ",t.children(s)&&t.children(s).length>0,t.children("D"),e),E.debug(Ye);i=t.nodes(),E.warn("New list of nodes",i);for(const s of i){const n=t.node(s);E.warn(" Now next level",s,n),n.clusterNode&&hh(n.graph,e+1)}},uh=(t,e)=>{if(e.length===0)return[];let i=Object.assign(e);return e.forEach(r=>{const s=t.children(r),n=uh(t,s);i=[...i,...n]}),i},ny=t=>uh(t,t.children());function ay(t,e){return t.intersect(e)}function dh(t,e,i,r){var s=t.x,n=t.y,a=s-r.x,o=n-r.y,l=Math.sqrt(e*e*o*o+i*i*a*a),h=Math.abs(e*i*a/l);r.x<s&&(h=-h);var u=Math.abs(e*i*o/l);return r.y<n&&(u=-u),{x:s+h,y:n+u}}function oy(t,e,i){return dh(t,e,e,i)}function ly(t,e,i,r){var s,n,a,o,l,h,u,d,f,p,b,_,T,S,k;if(s=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,f=s*i.x+a*i.y+l,p=s*r.x+a*r.y+l,!(f!==0&&p!==0&&fh(f,p))&&(n=r.y-i.y,o=i.x-r.x,h=r.x*i.y-i.x*r.y,u=n*t.x+o*t.y+h,d=n*e.x+o*e.y+h,!(u!==0&&d!==0&&fh(u,d))&&(b=s*o-n*a,b!==0)))return _=Math.abs(b/2),T=a*h-o*l,S=T<0?(T-_)/b:(T+_)/b,T=n*l-s*h,k=T<0?(T-_)/b:(T+_)/b,{x:S,y:k}}function fh(t,e){return t*e>0}function cy(t,e,i){var r=t.x,s=t.y,n=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(b){a=Math.min(a,b.x),o=Math.min(o,b.y)}):(a=Math.min(a,e.x),o=Math.min(o,e.y));for(var l=r-t.width/2-a,h=s-t.height/2-o,u=0;u<e.length;u++){var d=e[u],f=e[u<e.length-1?u+1:0],p=ly(t,i,{x:l+d.x,y:h+d.y},{x:l+f.x,y:h+f.y});p&&n.push(p)}return n.length?(n.length>1&&n.sort(function(b,_){var T=b.x-i.x,S=b.y-i.y,k=Math.sqrt(T*T+S*S),I=_.x-i.x,z=_.y-i.y,H=Math.sqrt(I*I+z*z);return k<H?-1:k===H?0:1}),n[0]):t}const na=(t,e)=>{var i=t.x,r=t.y,s=e.x-i,n=e.y-r,a=t.width/2,o=t.height/2,l,h;return Math.abs(n)*a>Math.abs(s)*o?(n<0&&(o=-o),l=n===0?0:o*s/n,h=o):(s<0&&(a=-a),l=a,h=s===0?0:a*n/s),{x:i+l,y:r+h}},li={node:ay,circle:oy,ellipse:dh,polygon:cy,rect:na},hy=(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:s}=ji(t,e,"node "+e.classes,!0);E.info("Classes = ",e.classes);const n=i.insert("rect",":first-child");return n.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-s).attr("y",-r.height/2-s).attr("width",r.width+e.padding).attr("height",r.height+e.padding),pi(e,n),e.intersect=function(a){return li.rect(e,a)},i},ph=(t,e)=>{const{shapeSvg:i,bbox:r}=ji(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=s+n,o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];E.info("Question main (Circle)");const l=ms(i,a,a,o);return l.attr("style",e.style),pi(e,l),e.intersect=function(h){return E.warn("Intersect called"),li.polygon(e,o,h)},i},uy=(t,e)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=28,s=[{x:0,y:r/2},{x:r/2,y:0},{x:0,y:-r/2},{x:-r/2,y:0}];return i.insert("polygon",":first-child").attr("points",s.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(a){return li.circle(e,14,a)},i},dy=(t,e)=>{const{shapeSvg:i,bbox:r}=ji(t,e,void 0,!0),s=4,n=r.height+e.padding,a=n/s,o=r.width+2*a+e.padding,l=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-n/2},{x:o-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}],h=ms(i,o,n,l);return h.attr("style",e.style),pi(e,h),e.intersect=function(u){return li.polygon(e,l,u)},i},fy=(t,e)=>{const{shapeSvg:i,bbox:r}=ji(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:-n/2,y:0},{x:s,y:0},{x:s,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}];return ms(i,s,n,a).attr("style",e.style),e.width=s+n,e.height=n,e.intersect=function(l){return li.polygon(e,a,l)},i},py=(t,e)=>{const{shapeSvg:i,bbox:r}=ji(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:-2*n/6,y:0},{x:s-n/6,y:0},{x:s+2*n/6,y:-n},{x:n/6,y:-n}],o=ms(i,s,n,a);return o.attr("style",e.style),pi(e,o),e.intersect=function(l){return li.polygon(e,a,l)},i},gy=(t,e)=>{const{shapeSvg:i,bbox:r}=ji(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:2*n/6,y:0},{x:s+n/6,y:0},{x:s-2*n/6,y:-n},{x:-n/6,y:-n}],o=ms(i,s,n,a);return o.attr("style",e.style),pi(e,o),e.intersect=function(l){return li.polygon(e,a,l)},i},yy=(t,e)=>{const{shapeSvg:i,bbox:r}=ji(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:-2*n/6,y:0},{x:s+2*n/6,y:0},{x:s-n/6,y:-n},{x:n/6,y:-n}],o=ms(i,s,n,a);return o.attr("style",e.style),pi(e,o),e.intersect=function(l){return li.polygon(e,a,l)},i},my=(t,e)=>{const{shapeSvg:i,bbox:r}=ji(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:n/6,y:0},{x:s-n/6,y:0},{x:s+2*n/6,y:-n},{x:-2*n/6,y:-n}],o=ms(i,s,n,a);return o.attr("style",e.style),pi(e,o),e.intersect=function(l){return li.polygon(e,a,l)},i},by=(t,e)=>{const{shapeSvg:i,bbox:r}=ji(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:0,y:0},{x:s+n/2,y:0},{x:s,y:-n/2},{x:s+n/2,y:-n},{x:0,y:-n}],o=ms(i,s,n,a);return o.attr("style",e.style),pi(e,o),e.intersect=function(l){return li.polygon(e,a,l)},i},xy=(t,e)=>{const{shapeSvg:i,bbox:r}=ji(t,e,void 0,!0),s=r.width+e.padding,n=s/2,a=n/(2.5+s/50),o=r.height+a+e.padding,l="M 0,"+a+" a "+n+","+a+" 0,0,0 "+s+" 0 a "+n+","+a+" 0,0,0 "+-s+" 0 l 0,"+o+" a "+n+","+a+" 0,0,0 "+s+" 0 l 0,"+-o,h=i.attr("label-offset-y",a).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-s/2+","+-(o/2+a)+")");return pi(e,h),e.intersect=function(u){const d=li.rect(e,u),f=d.x-e.x;if(n!=0&&(Math.abs(f)<e.width/2||Math.abs(f)==e.width/2&&Math.abs(d.y-e.y)>e.height/2-a)){let p=a*a*(1-f*f/(n*n));p!=0&&(p=Math.sqrt(p)),p=a-p,u.y-e.y>0&&(p=-p),d.y+=p}return d},i},ky=(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:s}=ji(t,e,"node "+e.classes,!0);E.trace("Classes = ",e.classes);const n=i.insert("rect",":first-child"),a=r.width+e.padding,o=r.height+e.padding;if(n.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-s).attr("y",-r.height/2-s).attr("width",a).attr("height",o),e.props){const l=new Set(Object.keys(e.props));e.props.borders&&(gh(n,e.props.borders,a,o),l.delete("borders")),l.forEach(h=>{E.warn(`Unknown node property ${h}`)})}return pi(e,n),e.intersect=function(l){return li.rect(e,l)},i},_y=(t,e)=>{const{shapeSvg:i}=ji(t,e,"label",!0);E.trace("Classes = ",e.classes);const r=i.insert("rect",":first-child"),s=0,n=0;if(r.attr("width",s).attr("height",n),i.attr("class","label edgeLabel"),e.props){const a=new Set(Object.keys(e.props));e.props.borders&&(gh(r,e.props.borders,s,n),a.delete("borders")),a.forEach(o=>{E.warn(`Unknown node property ${o}`)})}return pi(e,r),e.intersect=function(a){return li.rect(e,a)},i};function gh(t,e,i,r){const s=[],n=o=>{s.push(o,0)},a=o=>{s.push(0,o)};e.includes("t")?(E.debug("add top border"),n(i)):a(i),e.includes("r")?(E.debug("add right border"),n(r)):a(r),e.includes("b")?(E.debug("add bottom border"),n(i)):a(i),e.includes("l")?(E.debug("add left border"),n(r)):a(r),t.attr("stroke-dasharray",s.join(" "))}const Ey=(t,e)=>{let i;e.classes?i="node "+e.classes:i="node default";const r=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=r.insert("rect",":first-child"),n=r.insert("line"),a=r.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let l="";typeof o=="object"?l=o[0]:l=o,E.info("Label text abc79",l,o,typeof o=="object");const h=a.node().appendChild(pr(l,e.labelStyle,!0,!0));let u={width:0,height:0};if(Ti(P().flowchart.htmlLabels)){const _=h.children[0],T=(0,Q.Ys)(h);u=_.getBoundingClientRect(),T.attr("width",u.width),T.attr("height",u.height)}E.info("Text 2",o);const d=o.slice(1,o.length);let f=h.getBBox();const p=a.node().appendChild(pr(d.join?d.join("<br/>"):d,e.labelStyle,!0,!0));if(Ti(P().flowchart.htmlLabels)){const _=p.children[0],T=(0,Q.Ys)(p);u=_.getBoundingClientRect(),T.attr("width",u.width),T.attr("height",u.height)}const b=e.padding/2;return(0,Q.Ys)(p).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+b+5)+")"),(0,Q.Ys)(h).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=a.node().getBBox(),a.attr("transform","translate("+-u.width/2+", "+(-u.height/2-b+3)+")"),s.attr("class","outer title-state").attr("x",-u.width/2-b).attr("y",-u.height/2-b).attr("width",u.width+e.padding).attr("height",u.height+e.padding),n.attr("class","divider").attr("x1",-u.width/2-b).attr("x2",u.width/2+b).attr("y1",-u.height/2-b+f.height+b).attr("y2",-u.height/2-b+f.height+b),pi(e,s),e.intersect=function(_){return li.rect(e,_)},r},vy=(t,e)=>{const{shapeSvg:i,bbox:r}=ji(t,e,void 0,!0),s=r.height+e.padding,n=r.width+s/4+e.padding,a=i.insert("rect",":first-child").attr("style",e.style).attr("rx",s/2).attr("ry",s/2).attr("x",-n/2).attr("y",-s/2).attr("width",n).attr("height",s);return pi(e,a),e.intersect=function(o){return li.rect(e,o)},i},Cy=(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:s}=ji(t,e,void 0,!0),n=i.insert("circle",":first-child");return n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+s).attr("width",r.width+e.padding).attr("height",r.height+e.padding),E.info("Circle main"),pi(e,n),e.intersect=function(a){return E.info("Circle intersect",e,r.width/2+s,a),li.circle(e,r.width/2+s,a)},i},Ty=(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:s}=ji(t,e,void 0,!0),n=5,a=i.insert("g",":first-child"),o=a.insert("circle"),l=a.insert("circle");return o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+s+n).attr("width",r.width+e.padding+n*2).attr("height",r.height+e.padding+n*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+s).attr("width",r.width+e.padding).attr("height",r.height+e.padding),E.info("DoubleCircle main"),pi(e,o),e.intersect=function(h){return E.info("DoubleCircle intersect",e,r.width/2+s+n,h),li.circle(e,r.width/2+s+n,h)},i},Sy=(t,e)=>{const{shapeSvg:i,bbox:r}=ji(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:0,y:0},{x:s,y:0},{x:s,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],o=ms(i,s,n,a);return o.attr("style",e.style),pi(e,o),e.intersect=function(l){return li.polygon(e,a,l)},i},wy=(t,e)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=i.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),pi(e,r),e.intersect=function(s){return li.circle(e,7,s)},i},yh=(t,e,i)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s=70,n=10;i==="LR"&&(s=10,n=70);const a=r.append("rect").attr("x",-1*s/2).attr("y",-1*n/2).attr("width",s).attr("height",n).attr("class","fork-join");return pi(e,a),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return li.rect(e,o)},r},mh={rhombus:ph,question:ph,rect:ky,labelRect:_y,rectWithTitle:Ey,choice:uy,circle:Cy,doublecircle:Ty,stadium:vy,hexagon:dy,rect_left_inv_arrow:fy,lean_right:py,lean_left:gy,trapezoid:yy,inv_trapezoid:my,rect_right_inv_arrow:by,cylinder:xy,start:wy,end:(t,e)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=i.insert("circle",":first-child"),s=i.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),pi(e,s),e.intersect=function(n){return li.circle(e,7,n)},i},note:hy,subroutine:Sy,fork:yh,join:yh,class_box:(t,e)=>{const i=e.padding/2,r=4,s=8;let n;e.classes?n="node "+e.classes:n="node default";const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),o=a.insert("rect",":first-child"),l=a.insert("line"),h=a.insert("line");let u=0,d=r;const f=a.insert("g").attr("class","label");let p=0;const b=e.classData.annotations&&e.classData.annotations[0],_=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",T=f.node().appendChild(pr(_,e.labelStyle,!0,!0));let S=T.getBBox();if(Ti(P().flowchart.htmlLabels)){const F=T.children[0],v=(0,Q.Ys)(T);S=F.getBoundingClientRect(),v.attr("width",S.width),v.attr("height",S.height)}e.classData.annotations[0]&&(d+=S.height+r,u+=S.width);let k=e.classData.id;e.classData.type!==void 0&&e.classData.type!==""&&(P().flowchart.htmlLabels?k+="&lt;"+e.classData.type+"&gt;":k+="<"+e.classData.type+">");const I=f.node().appendChild(pr(k,e.labelStyle,!0,!0));(0,Q.Ys)(I).attr("class","classTitle");let z=I.getBBox();if(Ti(P().flowchart.htmlLabels)){const F=I.children[0],v=(0,Q.Ys)(I);z=F.getBoundingClientRect(),v.attr("width",z.width),v.attr("height",z.height)}d+=z.height+r,z.width>u&&(u=z.width);const H=[];e.classData.members.forEach(F=>{const v=ao(F);let L=v.displayText;P().flowchart.htmlLabels&&(L=L.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const w=f.node().appendChild(pr(L,v.cssStyle?v.cssStyle:e.labelStyle,!0,!0));let m=w.getBBox();if(Ti(P().flowchart.htmlLabels)){const B=w.children[0],g=(0,Q.Ys)(w);m=B.getBoundingClientRect(),g.attr("width",m.width),g.attr("height",m.height)}m.width>u&&(u=m.width),d+=m.height+r,H.push(w)}),d+=s;const rt=[];if(e.classData.methods.forEach(F=>{const v=ao(F);let L=v.displayText;P().flowchart.htmlLabels&&(L=L.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const w=f.node().appendChild(pr(L,v.cssStyle?v.cssStyle:e.labelStyle,!0,!0));let m=w.getBBox();if(Ti(P().flowchart.htmlLabels)){const B=w.children[0],g=(0,Q.Ys)(w);m=B.getBoundingClientRect(),g.attr("width",m.width),g.attr("height",m.height)}m.width>u&&(u=m.width),d+=m.height+r,rt.push(w)}),d+=s,b){let F=(u-S.width)/2;(0,Q.Ys)(T).attr("transform","translate( "+(-1*u/2+F)+", "+-1*d/2+")"),p=S.height+r}let R=(u-z.width)/2;return(0,Q.Ys)(I).attr("transform","translate( "+(-1*u/2+R)+", "+(-1*d/2+p)+")"),p+=z.height+r,l.attr("class","divider").attr("x1",-u/2-i).attr("x2",u/2+i).attr("y1",-d/2-i+s+p).attr("y2",-d/2-i+s+p),p+=s,H.forEach(F=>{(0,Q.Ys)(F).attr("transform","translate( "+-u/2+", "+(-1*d/2+p+s/2)+")"),p+=z.height+r}),p+=s,h.attr("class","divider").attr("x1",-u/2-i).attr("x2",u/2+i).attr("y1",-d/2-i+s+p).attr("y2",-d/2-i+s+p),p+=s,rt.forEach(F=>{(0,Q.Ys)(F).attr("transform","translate( "+-u/2+", "+(-1*d/2+p)+")"),p+=z.height+r}),o.attr("class","outer title-state").attr("x",-u/2-i).attr("y",-(d/2)-i).attr("width",u+e.padding).attr("height",d+e.padding),pi(e,o),e.intersect=function(F){return li.rect(e,F)},a}};let Sn={};const bh=(t,e,i)=>{let r,s;if(e.link){let n;P().securityLevel==="sandbox"?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n),s=mh[e.shape](r,e,i)}else s=mh[e.shape](t,e,i),r=s;return e.tooltip&&s.attr("title",e.tooltip),e.class&&s.attr("class","node default "+e.class),Sn[e.id]=r,e.haveCallback&&Sn[e.id].attr("class",Sn[e.id].attr("class")+" clickable"),r},Ay=(t,e)=>{Sn[e.id]=t},Ly=()=>{Sn={}},xh=t=>{const e=Sn[t.id];E.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const i=8,r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-i)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},By={rect:(t,e)=>{E.trace("Creating subgraph rect for ",e.id,e);const i=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),r=i.insert("rect",":first-child"),s=i.insert("g").attr("class","cluster-label"),n=s.node().appendChild(pr(e.labelText,e.labelStyle,void 0,!0));let a=n.getBBox();if(Ti(P().flowchart.htmlLabels)){const d=n.children[0],f=(0,Q.Ys)(n);a=d.getBoundingClientRect(),f.attr("width",a.width),f.attr("height",a.height)}const o=0*e.padding,l=o/2,h=e.width<=a.width+o?a.width+o:e.width;e.width<=a.width+o?e.diff=(a.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,E.trace("Data ",e,JSON.stringify(e)),r.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-h/2).attr("y",e.y-e.height/2-l).attr("width",h).attr("height",e.height+o),s.attr("transform","translate("+(e.x-a.width/2)+", "+(e.y-e.height/2)+")");const u=r.node().getBBox();return e.width=u.width,e.height=u.height,e.intersect=function(d){return na(e,d)},i},roundedWithTitle:(t,e)=>{const i=t.insert("g").attr("class",e.classes).attr("id",e.id),r=i.insert("rect",":first-child"),s=i.insert("g").attr("class","cluster-label"),n=i.append("rect"),a=s.node().appendChild(pr(e.labelText,e.labelStyle,void 0,!0));let o=a.getBBox();if(Ti(P().flowchart.htmlLabels)){const f=a.children[0],p=(0,Q.Ys)(a);o=f.getBoundingClientRect(),p.attr("width",o.width),p.attr("height",o.height)}o=a.getBBox();const l=0*e.padding,h=l/2,u=e.width<=o.width+e.padding?o.width+e.padding:e.width;e.width<=o.width+e.padding?e.diff=(o.width+e.padding*0-e.width)/2:e.diff=-e.padding/2,r.attr("class","outer").attr("x",e.x-u/2-h).attr("y",e.y-e.height/2-h).attr("width",u+l).attr("height",e.height+l),n.attr("class","inner").attr("x",e.x-u/2-h).attr("y",e.y-e.height/2-h+o.height-1).attr("width",u+l).attr("height",e.height+l-o.height-3),s.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2-e.padding/3+(Ti(P().flowchart.htmlLabels)?5:3))+")");const d=r.node().getBBox();return e.height=d.height,e.intersect=function(f){return na(e,f)},i},noteGroup:(t,e)=>{const i=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=i.insert("rect",":first-child"),s=0*e.padding,n=s/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+s).attr("height",e.height+s).attr("fill","none");const a=r.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(o){return na(e,o)},i},divider:(t,e)=>{const i=t.insert("g").attr("class",e.classes).attr("id",e.id),r=i.insert("rect",":first-child"),s=0*e.padding,n=s/2;r.attr("class","divider").attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2).attr("width",e.width+s).attr("height",e.height+s);const a=r.node().getBBox();return e.width=a.width,e.height=a.height,e.diff=-e.padding/2,e.intersect=function(o){return na(e,o)},i}};let kh={};const Iy=(t,e)=>{E.trace("Inserting cluster");const i=e.shape||"rect";kh[e.id]=By[i](t,e)},Dy=()=>{kh={}};let uo={},Yi={};const Ry=()=>{uo={},Yi={}},_h=(t,e)=>{const i=pr(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),s=r.insert("g").attr("class","label");s.node().appendChild(i);let n=i.getBBox();if(Ti(P().flowchart.htmlLabels)){const o=i.children[0],l=(0,Q.Ys)(i);n=o.getBoundingClientRect(),l.attr("width",n.width),l.attr("height",n.height)}s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),uo[e.id]=r,e.width=n.width,e.height=n.height;let a;if(e.startLabelLeft){const o=pr(e.startLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Yi[e.id]||(Yi[e.id]={}),Yi[e.id].startLeft=l,fo(a,e.startLabelLeft)}if(e.startLabelRight){const o=pr(e.startLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=l.node().appendChild(o),h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Yi[e.id]||(Yi[e.id]={}),Yi[e.id].startRight=l,fo(a,e.startLabelRight)}if(e.endLabelLeft){const o=pr(e.endLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(o),Yi[e.id]||(Yi[e.id]={}),Yi[e.id].endLeft=l,fo(a,e.endLabelLeft)}if(e.endLabelRight){const o=pr(e.endLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(o),Yi[e.id]||(Yi[e.id]={}),Yi[e.id].endRight=l,fo(a,e.endLabelRight)}return i};function fo(t,e){P().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}const Ny=(t,e)=>{E.info("Moving label abc78 ",t.id,t.label,uo[t.id]);let i=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const r=uo[t.id];let s=t.x,n=t.y;if(i){const a=xe.calcLabelPosition(i);E.info("Moving label "+t.label+" from (",s,",",n,") to (",a.x,",",a.y,") abc78"),e.updatedPath&&(s=a.x,n=a.y)}r.attr("transform","translate("+s+", "+n+")")}if(t.startLabelLeft){const r=Yi[t.id].startLeft;let s=t.x,n=t.y;if(i){const a=xe.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",i);s=a.x,n=a.y}r.attr("transform","translate("+s+", "+n+")")}if(t.startLabelRight){const r=Yi[t.id].startRight;let s=t.x,n=t.y;if(i){const a=xe.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",i);s=a.x,n=a.y}r.attr("transform","translate("+s+", "+n+")")}if(t.endLabelLeft){const r=Yi[t.id].endLeft;let s=t.x,n=t.y;if(i){const a=xe.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",i);s=a.x,n=a.y}r.attr("transform","translate("+s+", "+n+")")}if(t.endLabelRight){const r=Yi[t.id].endRight;let s=t.x,n=t.y;if(i){const a=xe.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",i);s=a.x,n=a.y}r.attr("transform","translate("+s+", "+n+")")}},Oy=(t,e)=>{const i=t.x,r=t.y,s=Math.abs(e.x-i),n=Math.abs(e.y-r),a=t.width/2,o=t.height/2;return s>=a||n>=o},Fy=(t,e,i)=>{E.warn(`intersection calc abc89:
1315
+ outsidePoint: ${JSON.stringify(e)}
1316
+ insidePoint : ${JSON.stringify(i)}
1317
+ node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const r=t.x,s=t.y,n=Math.abs(r-i.x),a=t.width/2;let o=i.x<e.x?a-n:a+n;const l=t.height/2,h=Math.abs(e.y-i.y),u=Math.abs(e.x-i.x);if(Math.abs(s-e.y)*a>Math.abs(r-e.x)*l){let d=i.y<e.y?e.y-l-s:s-l-e.y;o=u*d/h;const f={x:i.x<e.x?i.x+o:i.x-u+o,y:i.y<e.y?i.y+h-d:i.y-h+d};return o===0&&(f.x=e.x,f.y=e.y),u===0&&(f.x=e.x),h===0&&(f.y=e.y),E.warn(`abc89 topp/bott calc, Q ${h}, q ${d}, R ${u}, r ${o}`,f),f}else{i.x<e.x?o=e.x-a-r:o=r-a-e.x;let d=h*o/u,f=i.x<e.x?i.x+u-o:i.x-u+o,p=i.y<e.y?i.y+d:i.y-d;return E.warn(`sides calc abc89, Q ${h}, q ${d}, R ${u}, r ${o}`,{_x:f,_y:p}),o===0&&(f=e.x,p=e.y),u===0&&(f=e.x),h===0&&(p=e.y),{x:f,y:p}}},Eh=(t,e)=>{E.warn("abc88 cutPathAtIntersect",t,e);let i=[],r=t[0],s=!1;return t.forEach(n=>{if(E.info("abc88 checking point",n,e),!Oy(e,n)&&!s){const a=Fy(e,r,n);E.warn("abc88 inside",n,r,a),E.warn("abc88 intersection",a);let o=!1;i.forEach(l=>{o=o||l.x===a.x&&l.y===a.y}),i.some(l=>l.x===a.x&&l.y===a.y)?E.warn("abc88 no intersect",a,i):i.push(a),s=!0}else E.warn("abc88 outside",n,r),r=n,s||i.push(n)}),E.warn("abc88 returning points",i),i},My=function(t,e,i,r,s,n){let a=i.points,o=!1;const l=n.node(e.v);var h=n.node(e.w);E.info("abc88 InsertEdge: ",i),h.intersect&&l.intersect&&(a=a.slice(1,i.points.length-1),a.unshift(l.intersect(a[0])),E.info("Last point",a[a.length-1],h,h.intersect(a[a.length-1])),a.push(h.intersect(a[a.length-1]))),i.toCluster&&(E.info("to cluster abc88",r[i.toCluster]),a=Eh(i.points,r[i.toCluster].node),o=!0),i.fromCluster&&(E.info("from cluster abc88",r[i.fromCluster]),a=Eh(a.reverse(),r[i.fromCluster].node).reverse(),o=!0);const u=a.filter(S=>!Number.isNaN(S.y));let d;s==="graph"||s==="flowchart"?d=i.curve||Q.$0Z:d=Q.$0Z;const f=(0,Q.jvg)().x(function(S){return S.x}).y(function(S){return S.y}).curve(d);let p;switch(i.thickness){case"normal":p="edge-thickness-normal";break;case"thick":p="edge-thickness-thick";break;default:p=""}switch(i.pattern){case"solid":p+=" edge-pattern-solid";break;case"dotted":p+=" edge-pattern-dotted";break;case"dashed":p+=" edge-pattern-dashed";break}const b=t.append("path").attr("d",f(u)).attr("id",i.id).attr("class"," "+p+(i.classes?" "+i.classes:"")).attr("style",i.style);let _="";switch((P().flowchart.arrowMarkerAbsolute||P().state.arrowMarkerAbsolute)&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),E.info("arrowTypeStart",i.arrowTypeStart),E.info("arrowTypeEnd",i.arrowTypeEnd),i.arrowTypeStart){case"arrow_cross":b.attr("marker-start","url("+_+"#"+s+"-crossStart)");break;case"arrow_point":b.attr("marker-start","url("+_+"#"+s+"-pointStart)");break;case"arrow_barb":b.attr("marker-start","url("+_+"#"+s+"-barbStart)");break;case"arrow_circle":b.attr("marker-start","url("+_+"#"+s+"-circleStart)");break;case"aggregation":b.attr("marker-start","url("+_+"#"+s+"-aggregationStart)");break;case"extension":b.attr("marker-start","url("+_+"#"+s+"-extensionStart)");break;case"composition":b.attr("marker-start","url("+_+"#"+s+"-compositionStart)");break;case"dependency":b.attr("marker-start","url("+_+"#"+s+"-dependencyStart)");break;case"lollipop":b.attr("marker-start","url("+_+"#"+s+"-lollipopStart)");break}switch(i.arrowTypeEnd){case"arrow_cross":b.attr("marker-end","url("+_+"#"+s+"-crossEnd)");break;case"arrow_point":b.attr("marker-end","url("+_+"#"+s+"-pointEnd)");break;case"arrow_barb":b.attr("marker-end","url("+_+"#"+s+"-barbEnd)");break;case"arrow_circle":b.attr("marker-end","url("+_+"#"+s+"-circleEnd)");break;case"aggregation":b.attr("marker-end","url("+_+"#"+s+"-aggregationEnd)");break;case"extension":b.attr("marker-end","url("+_+"#"+s+"-extensionEnd)");break;case"composition":b.attr("marker-end","url("+_+"#"+s+"-compositionEnd)");break;case"dependency":b.attr("marker-end","url("+_+"#"+s+"-dependencyEnd)");break;case"lollipop":b.attr("marker-end","url("+_+"#"+s+"-lollipopEnd)");break}let T={};return o&&(T.updatedPath=a),T.originalPath=i.points,T},vh=(t,e,i,r)=>{E.info("Graph in recursive render: XXX",fe.c(e),r);const s=e.graph().rankdir;E.trace("Dir in recursive render - dir:",s);const n=t.insert("g").attr("class","root");e.nodes()?E.info("Recursive render XXX",e.nodes()):E.info("No nodes found for",e),e.edges().length>0&&E.trace("Recursive edges",e.edge(e.edges()[0]));const a=n.insert("g").attr("class","clusters"),o=n.insert("g").attr("class","edgePaths"),l=n.insert("g").attr("class","edgeLabels"),h=n.insert("g").attr("class","nodes");e.nodes().forEach(function(d){const f=e.node(d);if(r!==void 0){const p=JSON.parse(JSON.stringify(r.clusterData));E.info("Setting data for cluster XXX (",d,") ",p,r),e.setNode(r.id,p),e.parent(d)||(E.trace("Setting parent",d,r.id),e.setParent(d,r.id,p))}if(E.info("(Insert) Node XXX"+d+": "+JSON.stringify(e.node(d))),f&&f.clusterNode){E.info("Cluster identified",d,f.width,e.node(d));const p=vh(h,f.graph,i,e.node(d)),b=p.elem;pi(f,b),f.diff=p.diff||0,E.info("Node bounds (abc123)",d,f,f.width,f.x,f.y),Ay(b,f),E.warn("Recursive render complete ",b,f)}else e.children(d).length>0?(E.info("Cluster - the non recursive path XXX",d,f.id,f,e),E.info(sa(f.id,e)),Ye[f.id]={id:sa(f.id,e),node:f}):(E.info("Node - the non recursive path",d,f.id,f),bh(h,e.node(d),s))}),e.edges().forEach(function(d){const f=e.edge(d.v,d.w,d.name);E.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(d)),E.info("Edge "+d.v+" -> "+d.w+": ",d," ",JSON.stringify(e.edge(d))),E.info("Fix",Ye,"ids:",d.v,d.w,"Translateing: ",Ye[d.v],Ye[d.w]),_h(l,f)}),e.edges().forEach(function(d){E.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(d))}),E.info("#############################################"),E.info("### Layout ###"),E.info("#############################################"),E.info(e),(0,be.bK)(e),E.info("Graph after layout:",fe.c(e));let u=0;return ny(e).forEach(function(d){const f=e.node(d);E.info("Position "+d+": "+JSON.stringify(e.node(d))),E.info("Position "+d+": ("+f.x,","+f.y,") width: ",f.width," height: ",f.height),f&&f.clusterNode?xh(f):e.children(d).length>0?(Iy(a,f),Ye[f.id].node=f):xh(f)}),e.edges().forEach(function(d){const f=e.edge(d);E.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(f),f);const p=My(o,d,f,Ye,i,e);Ny(f,p)}),e.nodes().forEach(function(d){const f=e.node(d);E.info(d,f.type,f.diff),f.type==="group"&&(u=f.diff)}),{elem:n,diff:u}},wl=(t,e,i,r,s)=>{ah(t,i,r,s),Ly(),Ry(),Dy(),iy(),E.warn("Graph at first:",fe.c(e)),sy(e),E.warn("Graph after:",fe.c(e)),vh(t,e,r)},Ch=t=>me.sanitizeText(t,P());let Th={dividerMargin:10,padding:5,textHeight:10};const Py=function(t,e,i,r){const s=Object.keys(t);E.info("keys:",s),E.info(t),s.forEach(function(n){const a=t[n];let o="";a.cssClasses.length>0&&(o=o+" "+a.cssClasses.join(" "));const l={labelStyle:""};let h=a.text!==void 0?a.text:a.id,u=0,d="";switch(a.type){case"class":d="class_box";break;default:d="class_box"}e.setNode(a.id,{labelStyle:l.labelStyle,shape:d,labelText:Ch(h),classData:a,rx:u,ry:u,class:o,style:l.style,id:a.id,domId:a.domId,tooltip:r.db.getTooltip(a.id)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:P().flowchart.padding}),E.info("setNode",{labelStyle:l.labelStyle,shape:d,labelText:h,rx:u,ry:u,class:o,style:l.style,id:a.id,width:a.type==="group"?500:void 0,type:a.type,padding:P().flowchart.padding})})},Vy=function(t,e,i,r){E.info(t),t.forEach(function(s,n){const a=s;let o="";const l={labelStyle:"",style:""};let h=a.text,u=0,d="note";if(e.setNode(a.id,{labelStyle:l.labelStyle,shape:d,labelText:Ch(h),noteData:a,rx:u,ry:u,class:o,style:l.style,id:a.id,domId:a.id,tooltip:"",type:"note",padding:P().flowchart.padding}),E.info("setNode",{labelStyle:l.labelStyle,shape:d,labelText:h,rx:u,ry:u,style:l.style,id:a.id,type:"note",padding:P().flowchart.padding}),!a.class||!(a.class in r))return;const f=i+n,p={};p.classes="relation",p.pattern="dotted",p.id=`edgeNote${f}`,p.arrowhead="none",E.info(`Note edge: ${JSON.stringify(p)}, ${JSON.stringify(a)}`),p.startLabelRight="",p.endLabelLeft="",p.arrowTypeStart="none",p.arrowTypeEnd="none";let b="fill:none",_="";p.style=b,p.labelStyle=_,p.curve=Nr(Th.curve,Q.c_6),e.setEdge(a.id,a.class,p,f)})},Yy=function(t,e){const i=P().flowchart;let r=0;t.forEach(function(s){r++;const n={};n.classes="relation",n.pattern=s.relation.lineType==1?"dashed":"solid",n.id="id"+r,s.type==="arrow_open"?n.arrowhead="none":n.arrowhead="normal",E.info(n,s),n.startLabelRight=s.relationTitle1==="none"?"":s.relationTitle1,n.endLabelLeft=s.relationTitle2==="none"?"":s.relationTitle2,n.arrowTypeStart=Sh(s.relation.type1),n.arrowTypeEnd=Sh(s.relation.type2);let a="",o="";if(s.style!==void 0){const l=gs(s.style);a=l.style,o=l.labelStyle}else a="fill:none";n.style=a,n.labelStyle=o,s.interpolate!==void 0?n.curve=Nr(s.interpolate,Q.c_6):t.defaultInterpolate!==void 0?n.curve=Nr(t.defaultInterpolate,Q.c_6):n.curve=Nr(i.curve,Q.c_6),s.text=s.title,s.text===void 0?s.style!==void 0&&(n.arrowheadStyle="fill: #333"):(n.arrowheadStyle="fill: #333",n.labelpos="c",P().flowchart.htmlLabels?(n.labelType="html",n.label='<span class="edgeLabel">'+s.text+"</span>"):(n.labelType="text",n.label=s.text.replace(me.lineBreakRegex,`
1318
+ `),s.style===void 0&&(n.style=n.style||"stroke: #333; stroke-width: 1.5px;fill:none"),n.labelStyle=n.labelStyle.replace("color:","fill:"))),e.setEdge(s.id1,s.id2,n,r)})},zy=function(t){Object.keys(t).forEach(function(i){Th[i]=t[i]})},Wy=function(t,e,i,r){E.info("Drawing class - ",e);const s=P().flowchart,n=P().securityLevel;E.info("config:",s);const a=s.nodeSpacing||50,o=s.rankSpacing||50,l=new Be.k({multigraph:!0,compound:!0}).setGraph({rankdir:r.db.getDirection(),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),h=r.db.getClasses(),u=r.db.getRelations(),d=r.db.getNotes();E.info(u),Py(h,l,e,r),Yy(u,l),Vy(d,l,u.length+1,h);let f;n==="sandbox"&&(f=(0,Q.Ys)("#i"+e));const p=n==="sandbox"?(0,Q.Ys)(f.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),b=p.select(`[id="${e}"]`),_=p.select("#"+e+" g");if(wl(_,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),xe.insertTitle(b,"classTitleText",s.titleTopMargin,r.db.getDiagramTitle()),Gn(l,b,s.diagramPadding,s.useMaxWidth),!s.htmlLabels){const T=n==="sandbox"?f.nodes()[0].contentDocument:document,S=T.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const k of S){const I=k.getBBox(),z=T.createElementNS("http://www.w3.org/2000/svg","rect");z.setAttribute("rx",0),z.setAttribute("ry",0),z.setAttribute("width",I.width),z.setAttribute("height",I.height),k.insertBefore(z,k.firstChild)}}};function Sh(t){let e;switch(t){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 Uy={setConf:zy,draw:Wy};var Al=function(){var t=function(w,m,B,g){for(B=B||{},g=w.length;g--;B[w[g]]=m);return B},e=[1,2],i=[1,5],r=[6,9,11,23,25,27,29,30,31,51],s=[1,17],n=[1,18],a=[1,19],o=[1,20],l=[1,21],h=[1,22],u=[1,25],d=[1,30],f=[1,31],p=[1,32],b=[1,33],_=[6,9,11,15,20,23,25,27,29,30,31,44,45,46,47,51],T=[1,45],S=[30,31,48,49],k=[4,6,9,11,23,25,27,29,30,31,51],I=[44,45,46,47],z=[22,37],H=[1,65],rt=[1,64],R=[22,37,39,41],F={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyTypeList:35,attributeComment:36,ATTRIBUTE_WORD:37,attributeKeyType:38,COMMA:39,ATTRIBUTE_KEY:40,COMMENT:41,cardinality:42,relType:43,ZERO_OR_ONE:44,ZERO_OR_MORE:45,ONE_OR_MORE:46,ONLY_ONE:47,NON_IDENTIFYING:48,IDENTIFYING:49,WORD:50,open_directive:51,type_directive:52,arg_directive:53,close_directive:54,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",39:"COMMA",40:"ATTRIBUTE_KEY",41:"COMMENT",44:"ZERO_OR_ONE",45:"ZERO_OR_MORE",46:"ONE_OR_MORE",47:"ONLY_ONE",48:"NON_IDENTIFYING",49:"IDENTIFYING",50:"WORD",51:"open_directive",52:"type_directive",53:"arg_directive",54:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[35,3],[38,1],[36,1],[18,3],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(m,B,g,O,y,Y,Bt){var J=Y.length-1;switch(y){case 1:break;case 3:this.$=[];break;case 4:Y[J-1].push(Y[J]),this.$=Y[J-1];break;case 5:case 6:this.$=Y[J];break;case 7:case 8:this.$=[];break;case 12:O.addEntity(Y[J-4]),O.addEntity(Y[J-2]),O.addRelationship(Y[J-4],Y[J],Y[J-2],Y[J-3]);break;case 13:O.addEntity(Y[J-3]),O.addAttributes(Y[J-3],Y[J-1]);break;case 14:O.addEntity(Y[J-2]);break;case 15:O.addEntity(Y[J]);break;case 16:case 17:this.$=Y[J].trim(),O.setAccTitle(this.$);break;case 18:case 19:this.$=Y[J].trim(),O.setAccDescription(this.$);break;case 20:case 43:this.$=Y[J];break;case 21:case 41:case 42:this.$=Y[J].replace(/"/g,"");break;case 22:case 30:this.$=[Y[J]];break;case 23:Y[J].push(Y[J-1]),this.$=Y[J];break;case 24:this.$={attributeType:Y[J-1],attributeName:Y[J]};break;case 25:this.$={attributeType:Y[J-2],attributeName:Y[J-1],attributeKeyTypeList:Y[J]};break;case 26:this.$={attributeType:Y[J-2],attributeName:Y[J-1],attributeComment:Y[J]};break;case 27:this.$={attributeType:Y[J-3],attributeName:Y[J-2],attributeKeyTypeList:Y[J-1],attributeComment:Y[J]};break;case 28:case 29:case 32:this.$=Y[J];break;case 31:Y[J-2].push(Y[J]),this.$=Y[J-2];break;case 33:this.$=Y[J].replace(/"/g,"");break;case 34:this.$={cardA:Y[J],relType:Y[J-1],cardB:Y[J-2]};break;case 35:this.$=O.Cardinality.ZERO_OR_ONE;break;case 36:this.$=O.Cardinality.ZERO_OR_MORE;break;case 37:this.$=O.Cardinality.ONE_OR_MORE;break;case 38:this.$=O.Cardinality.ONLY_ONE;break;case 39:this.$=O.Identification.NON_IDENTIFYING;break;case 40:this.$=O.Identification.IDENTIFYING;break;case 44:O.parseDirective("%%{","open_directive");break;case 45:O.parseDirective(Y[J],"type_directive");break;case 46:Y[J]=Y[J].trim().replace(/'/g,'"'),O.parseDirective(Y[J],"arg_directive");break;case 47:O.parseDirective("}%%","close_directive","er");break}},table:[{3:1,4:e,7:3,12:4,51:i},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,51:i},{13:8,52:[1,9]},{52:[2,44]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:s,25:n,27:a,29:o,30:l,31:h,51:i},{1:[2,2]},{14:23,15:[1,24],54:u},t([15,54],[2,45]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:26,12:4,17:16,23:s,25:n,27:a,29:o,30:l,31:h,51:i},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:27,42:29,20:[1,28],44:d,45:f,46:p,47:b}),{24:[1,34]},{26:[1,35]},{28:[1,36]},t(r,[2,19]),t(_,[2,20]),t(_,[2,21]),{11:[1,37]},{16:38,53:[1,39]},{11:[2,47]},t(r,[2,5]),{17:40,30:l,31:h},{21:41,22:[1,42],32:43,33:44,37:T},{43:46,48:[1,47],49:[1,48]},t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(S,[2,38]),t(r,[2,16]),t(r,[2,17]),t(r,[2,18]),t(k,[2,9]),{14:49,54:u},{54:[2,46]},{15:[1,50]},{22:[1,51]},t(r,[2,14]),{21:52,22:[2,22],32:43,33:44,37:T},{34:53,37:[1,54]},{37:[2,28]},{42:55,44:d,45:f,46:p,47:b},t(I,[2,39]),t(I,[2,40]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],50:[1,58]},t(r,[2,13]),{22:[2,23]},t(z,[2,24],{35:61,36:62,38:63,40:H,41:rt}),t([22,37,40,41],[2,29]),t([30,31],[2,34]),t(k,[2,10]),t(r,[2,12]),t(r,[2,41]),t(r,[2,42]),t(r,[2,43]),t(z,[2,25],{36:66,39:[1,67],41:rt}),t(z,[2,26]),t(R,[2,30]),t(z,[2,33]),t(R,[2,32]),t(z,[2,27]),{38:68,40:H},t(R,[2,31])],defaultActions:{5:[2,44],7:[2,2],25:[2,47],39:[2,46],45:[2,28],52:[2,23]},parseError:function(m,B){if(B.recoverable)this.trace(m);else{var g=new Error(m);throw g.hash=B,g}},parse:function(m){var B=this,g=[0],O=[],y=[null],Y=[],Bt=this.table,J="",nt=0,at=0,it=2,et=1,Tt=Y.slice.call(arguments,1),xt=Object.create(this.lexer),Z={yy:{}};for(var jt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,jt)&&(Z.yy[jt]=this.yy[jt]);xt.setInput(m,Z.yy),Z.yy.lexer=xt,Z.yy.parser=this,typeof xt.yylloc=="undefined"&&(xt.yylloc={});var U=xt.yylloc;Y.push(U);var gt=xt.options&&xt.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tt(){var wt;return wt=O.pop()||xt.lex()||et,typeof wt!="number"&&(wt instanceof Array&&(O=wt,wt=O.pop()),wt=B.symbols_[wt]||wt),wt}for(var K,N,A,G,C={},ft,x,Qt,j;;){if(N=g[g.length-1],this.defaultActions[N]?A=this.defaultActions[N]:((K===null||typeof K=="undefined")&&(K=tt()),A=Bt[N]&&Bt[N][K]),typeof A=="undefined"||!A.length||!A[0]){var Nt="";j=[];for(ft in Bt[N])this.terminals_[ft]&&ft>it&&j.push("'"+this.terminals_[ft]+"'");xt.showPosition?Nt="Parse error on line "+(nt+1)+`:
1319
+ `+xt.showPosition()+`
1320
+ Expecting `+j.join(", ")+", got '"+(this.terminals_[K]||K)+"'":Nt="Parse error on line "+(nt+1)+": Unexpected "+(K==et?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(Nt,{text:xt.match,token:this.terminals_[K]||K,line:xt.yylineno,loc:U,expected:j})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+K);switch(A[0]){case 1:g.push(K),y.push(xt.yytext),Y.push(xt.yylloc),g.push(A[1]),K=null,at=xt.yyleng,J=xt.yytext,nt=xt.yylineno,U=xt.yylloc;break;case 2:if(x=this.productions_[A[1]][1],C.$=y[y.length-x],C._$={first_line:Y[Y.length-(x||1)].first_line,last_line:Y[Y.length-1].last_line,first_column:Y[Y.length-(x||1)].first_column,last_column:Y[Y.length-1].last_column},gt&&(C._$.range=[Y[Y.length-(x||1)].range[0],Y[Y.length-1].range[1]]),G=this.performAction.apply(C,[J,at,nt,Z.yy,A[1],y,Y].concat(Tt)),typeof G!="undefined")return G;x&&(g=g.slice(0,-1*x*2),y=y.slice(0,-1*x),Y=Y.slice(0,-1*x)),g.push(this.productions_[A[1]][0]),y.push(C.$),Y.push(C._$),Qt=Bt[g[g.length-2]][g[g.length-1]],g.push(Qt);break;case 3:return!0}}return!0}},v=function(){var w={EOF:1,parseError:function(B,g){if(this.yy.parser)this.yy.parser.parseError(B,g);else throw new Error(B)},setInput:function(m,B){return this.yy=B||this.yy||{},this._input=m,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var B=m.match(/(?:\r\n?|\n).*/g);return B?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},unput:function(m){var B=m.length,g=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-B),this.offset-=B;var O=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===O.length?this.yylloc.first_column:0)+O[O.length-g.length].length-g[0].length:this.yylloc.first_column-B},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-B]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1321
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(m){this.unput(this.match.slice(m))},pastInput:function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var m=this.pastInput(),B=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
1322
+ `+B+"^"},test_match:function(m,B){var g,O,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),O=m[0].match(/(?:\r\n?|\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(m[0].length),this.matched+=m[0],g=this.performAction.call(this,this.yy,this,B,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var Y in y)this[Y]=y[Y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,B,g,O;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),Y=0;Y<y.length;Y++)if(g=this._input.match(this.rules[y[Y]]),g&&(!B||g[0].length>B[0].length)){if(B=g,O=Y,this.options.backtrack_lexer){if(m=this.test_match(g,y[Y]),m!==!1)return m;if(this._backtrack){B=!1;continue}else return!1}else if(!this.options.flex)break}return B?(m=this.test_match(B,y[O]),m!==!1?m:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1323
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var B=this.next();return B||this.lex()},begin:function(B){this.conditionStack.push(B)},popState:function(){var B=this.conditionStack.length-1;return B>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(B){return B=this.conditionStack.length-1-Math.abs(B||0),B>=0?this.conditionStack[B]:"INITIAL"},pushState:function(B){this.begin(B)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(B,g,O,y){switch(O){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),51;case 8:return this.begin("type_directive"),52;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),54;case 11:return 53;case 12:break;case 13:break;case 14:return 11;case 15:break;case 16:return 9;case 17:return 31;case 18:return 50;case 19:return 4;case 20:return this.begin("block"),20;case 21:return 39;case 22:break;case 23:return 40;case 24:return 37;case 25:return 37;case 26:return 41;case 27:break;case 28:return this.popState(),22;case 29:return g.yytext[0];case 30:return 44;case 31:return 46;case 32:return 46;case 33:return 46;case 34:return 44;case 35:return 44;case 36:return 45;case 37:return 45;case 38:return 45;case 39:return 45;case 40:return 45;case 41:return 46;case 42:return 45;case 43:return 46;case 44:return 47;case 45:return 47;case 46:return 47;case 47:return 47;case 48:return 44;case 49:return 45;case 50:return 46;case 51:return 48;case 52:return 49;case 53:return 49;case 54:return 48;case 55:return 48;case 56:return 48;case 57:return 30;case 58:return g.yytext[0];case 59:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28,29],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59],inclusive:!0}}};return w}();F.lexer=v;function L(){this.yy={}}return L.prototype=F,F.Parser=L,new L}();Al.parser=Al;const Zy=Al,Hy=t=>t.match(/^\s*erDiagram/)!==null;let aa={},Ll=[];const Gy={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},jy={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},qy=function(t,e,i){ii.parseDirective(this,t,e,i)},wh=function(t){return aa[t]===void 0&&(aa[t]={attributes:[]},E.info("Added new entity :",t)),aa[t]},Xy={Cardinality:Gy,Identification:jy,parseDirective:qy,getConfig:()=>P().er,addEntity:wh,addAttributes:function(t,e){let i=wh(t),r;for(r=e.length-1;r>=0;r--)i.attributes.push(e[r]),E.debug("Added attribute ",e[r].attributeName)},getEntities:()=>aa,addRelationship:function(t,e,i,r){let s={entityA:t,roleA:e,entityB:i,relSpec:r};Ll.push(s),E.debug("Added new relationship :",s)},getRelationships:()=>Ll,clear:function(){aa={},Ll=[],ur()},setAccTitle:dr,getAccTitle:vr,setAccDescription:Cr,getAccDescription:Tr,setDiagramTitle:Ur,getDiagramTitle:Zr},bs={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},xs={ERMarkers:bs,insertMarkers:function(t,e){let i;t.append("defs").append("marker").attr("id",bs.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",bs.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),i=t.append("defs").append("marker").attr("id",bs.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),i.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),i=t.append("defs").append("marker").attr("id",bs.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),i.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",bs.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",bs.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),i=t.append("defs").append("marker").attr("id",bs.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),i.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),i=t.append("defs").append("marker").attr("id",bs.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),i.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}},Ky=/[^\dA-Za-z](\W)*/g;let Ai={},oa=new Map;const Qy=function(t){const e=Object.keys(t);for(const i of e)Ai[i]=t[i]},Jy=(t,e,i)=>{const r=Ai.entityPadding/3,s=Ai.entityPadding/3,n=Ai.fontSize*.85,a=e.node().getBBox(),o=[];let l=!1,h=!1,u=0,d=0,f=0,p=0,b=a.height+r*2,_=1;i.forEach(I=>{I.attributeKeyTypeList!==void 0&&I.attributeKeyTypeList.length>0&&(l=!0),I.attributeComment!==void 0&&(h=!0)}),i.forEach(I=>{const z=`${e.node().id}-attr-${_}`;let H=0;const rt=Ps(I.attributeType),R=t.append("text").classed("er entityLabel",!0).attr("id",`${z}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",P().fontFamily).style("font-size",n+"px").text(rt),F=t.append("text").classed("er entityLabel",!0).attr("id",`${z}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",P().fontFamily).style("font-size",n+"px").text(I.attributeName),v={};v.tn=R,v.nn=F;const L=R.node().getBBox(),w=F.node().getBBox();if(u=Math.max(u,L.width),d=Math.max(d,w.width),H=Math.max(L.height,w.height),l){const m=I.attributeKeyTypeList!==void 0?I.attributeKeyTypeList.join(","):"",B=t.append("text").classed("er entityLabel",!0).attr("id",`${z}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",P().fontFamily).style("font-size",n+"px").text(m);v.kn=B;const g=B.node().getBBox();f=Math.max(f,g.width),H=Math.max(H,g.height)}if(h){const m=t.append("text").classed("er entityLabel",!0).attr("id",`${z}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",P().fontFamily).style("font-size",n+"px").text(I.attributeComment||"");v.cn=m;const B=m.node().getBBox();p=Math.max(p,B.width),H=Math.max(H,B.height)}v.height=H,o.push(v),b+=H+r*2,_+=1});let T=4;l&&(T+=2),h&&(T+=2);const S=u+d+f+p,k={width:Math.max(Ai.minEntityWidth,Math.max(a.width+Ai.entityPadding*2,S+s*T)),height:i.length>0?b:Math.max(Ai.minEntityHeight,a.height+Ai.entityPadding*2)};if(i.length>0){const I=Math.max(0,(k.width-S-s*T)/(T/2));e.attr("transform","translate("+k.width/2+","+(r+a.height/2)+")");let z=a.height+r*2,H="attributeBoxOdd";o.forEach(rt=>{const R=z+r+rt.height/2;rt.tn.attr("transform","translate("+s+","+R+")");const F=t.insert("rect","#"+rt.tn.node().id).classed(`er ${H}`,!0).attr("x",0).attr("y",z).attr("width",u+s*2+I).attr("height",rt.height+r*2),v=parseFloat(F.attr("x"))+parseFloat(F.attr("width"));rt.nn.attr("transform","translate("+(v+s)+","+R+")");const L=t.insert("rect","#"+rt.nn.node().id).classed(`er ${H}`,!0).attr("x",v).attr("y",z).attr("width",d+s*2+I).attr("height",rt.height+r*2);let w=parseFloat(L.attr("x"))+parseFloat(L.attr("width"));if(l){rt.kn.attr("transform","translate("+(w+s)+","+R+")");const m=t.insert("rect","#"+rt.kn.node().id).classed(`er ${H}`,!0).attr("x",w).attr("y",z).attr("width",f+s*2+I).attr("height",rt.height+r*2);w=parseFloat(m.attr("x"))+parseFloat(m.attr("width"))}h&&(rt.cn.attr("transform","translate("+(w+s)+","+R+")"),t.insert("rect","#"+rt.cn.node().id).classed(`er ${H}`,"true").attr("x",w).attr("y",z).attr("width",p+s*2+I).attr("height",rt.height+r*2)),z+=rt.height+r*2,H=H==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else k.height=Math.max(Ai.minEntityHeight,b),e.attr("transform","translate("+k.width/2+","+k.height/2+")");return k},$y=function(t,e,i){const r=Object.keys(e);let s;return r.forEach(function(n){const a=n3(n,"entity");oa.set(n,a);const o=t.append("g").attr("id",a);s=s===void 0?a:s;const l="text-"+a,h=o.append("text").classed("er entityLabel",!0).attr("id",l).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",P().fontFamily).style("font-size",Ai.fontSize+"px").text(n),{width:u,height:d}=Jy(o,h,e[n].attributes),p=o.insert("rect","#"+l).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",u).attr("height",d).node().getBBox();i.setNode(a,{width:p.width,height:p.height,shape:"rect",id:a})}),s},t3=function(t,e){e.nodes().forEach(function(i){i!==void 0&&e.node(i)!==void 0&&t.select("#"+i).attr("transform","translate("+(e.node(i).x-e.node(i).width/2)+","+(e.node(i).y-e.node(i).height/2)+" )")})},Ah=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},e3=function(t,e){return t.forEach(function(i){e.setEdge(oa.get(i.entityA),oa.get(i.entityB),{relationship:i},Ah(i))}),t};let Lh=0;const i3=function(t,e,i,r,s){Lh++;const n=i.edge(oa.get(e.entityA),oa.get(e.entityB),Ah(e)),a=(0,Q.jvg)().x(function(b){return b.x}).y(function(b){return b.y}).curve(Q.$0Z),o=t.insert("path","#"+r).classed("er relationshipLine",!0).attr("d",a(n.points)).style("stroke",Ai.stroke).style("fill","none");e.relSpec.relType===s.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(Ai.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),e.relSpec.cardA){case s.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+l+"#"+xs.ERMarkers.ZERO_OR_ONE_END+")");break;case s.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+xs.ERMarkers.ZERO_OR_MORE_END+")");break;case s.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+xs.ERMarkers.ONE_OR_MORE_END+")");break;case s.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+xs.ERMarkers.ONLY_ONE_END+")");break}switch(e.relSpec.cardB){case s.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+xs.ERMarkers.ZERO_OR_ONE_START+")");break;case s.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+xs.ERMarkers.ZERO_OR_MORE_START+")");break;case s.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+xs.ERMarkers.ONE_OR_MORE_START+")");break;case s.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+xs.ERMarkers.ONLY_ONE_START+")");break}const h=o.node().getTotalLength(),u=o.node().getPointAtLength(h*.5),d="rel"+Lh,p=t.append("text").classed("er relationshipLabel",!0).attr("id",d).attr("x",u.x).attr("y",u.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",P().fontFamily).style("font-size",Ai.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+d).classed("er relationshipLabelBox",!0).attr("x",u.x-p.width/2).attr("y",u.y-p.height/2).attr("width",p.width).attr("height",p.height)},r3=function(t,e,i,r){Ai=P().er,E.info("Drawing ER diagram");const s=P().securityLevel;let n;s==="sandbox"&&(n=(0,Q.Ys)("#i"+e));const o=(s==="sandbox"?(0,Q.Ys)(n.nodes()[0].contentDocument.body):(0,Q.Ys)("body")).select(`[id='${e}']`);xs.insertMarkers(o,Ai);let l;l=new Be.k({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Ai.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const h=$y(o,r.db.getEntities(),l),u=e3(r.db.getRelationships(),l);(0,be.bK)(l),t3(o,l),u.forEach(function(_){i3(o,_,l,h,r)});const d=Ai.diagramPadding;xe.insertTitle(o,"entityTitleText",Ai.titleTopMargin,r.db.getDiagramTitle());const f=o.node().getBBox(),p=f.width+d*2,b=f.height+d*2;Wr(o,b,p,Ai.useMaxWidth),o.attr("viewBox",`${f.x-d} ${f.y-d} ${p} ${b}`)},s3="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function n3(t="",e=""){const i=t.replace(Ky,"");return`${Bh(e)}${Bh(i)}${zn(t,s3)}`}function Bh(t=""){return t.length>0?`${t}-`:""}const a3={setConf:Qy,draw:r3};var Bl=function(){var t=function(qs,re,ue,Re){for(ue=ue||{},Re=qs.length;Re--;ue[qs[Re]]=re);return ue},e=[1,9],i=[1,7],r=[1,6],s=[1,8],n=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],a=[2,10],o=[1,20],l=[1,21],h=[1,22],u=[1,23],d=[1,30],f=[1,32],p=[1,33],b=[1,34],_=[1,62],T=[1,48],S=[1,52],k=[1,36],I=[1,37],z=[1,38],H=[1,39],rt=[1,40],R=[1,56],F=[1,63],v=[1,51],L=[1,53],w=[1,55],m=[1,59],B=[1,60],g=[1,41],O=[1,42],y=[1,43],Y=[1,44],Bt=[1,61],J=[1,50],nt=[1,54],at=[1,57],it=[1,58],et=[1,49],Tt=[1,66],xt=[1,71],Z=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],jt=[1,75],U=[1,74],gt=[1,76],tt=[20,21,23,81,82],K=[1,99],N=[1,104],A=[1,107],G=[1,108],C=[1,101],ft=[1,106],x=[1,109],Qt=[1,102],j=[1,114],Nt=[1,113],wt=[1,103],kt=[1,105],yt=[1,110],_t=[1,111],mt=[1,112],Ct=[1,115],Xe=[20,21,22,23,81,82],Oe=[20,21,22,23,53,81,82],ie=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],ee=[20,21,23],Le=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],ri=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],ze=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],he=[1,149],Ut=[1,157],St=[1,158],Et=[1,159],It=[1,160],dt=[1,144],qt=[1,145],st=[1,141],we=[1,152],lt=[1,153],Ce=[1,154],Fe=[1,155],Pe=[1,156],Me=[1,161],Ve=[1,162],ae=[1,147],Te=[1,150],Ie=[1,146],De=[1,143],Aa=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],zo=[1,165],yi=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],Ee=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],nr=[12,21,22,24],Mn=[22,106],Mi=[1,250],Xi=[1,245],mi=[1,246],yr=[1,254],Ki=[1,251],ar=[1,248],bi=[1,247],Kr=[1,249],Qr=[1,252],Jr=[1,253],$r=[1,255],js=[1,273],dd=[20,21,23,106],Ar=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],Dc={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(re,ue,Re,Ft,ni,M,La){var W=M.length-1;switch(ni){case 5:Ft.parseDirective("%%{","open_directive");break;case 6:Ft.parseDirective(M[W],"type_directive");break;case 7:M[W]=M[W].trim().replace(/'/g,'"'),Ft.parseDirective(M[W],"arg_directive");break;case 8:Ft.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(M[W])||M[W].length>0)&&M[W-1].push(M[W]),this.$=M[W-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:this.$=M[W];break;case 19:Ft.setDirection("TB"),this.$="TB";break;case 20:Ft.setDirection(M[W-1]),this.$=M[W-1];break;case 35:this.$=M[W-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=Ft.addSubGraph(M[W-6],M[W-1],M[W-4]);break;case 42:this.$=Ft.addSubGraph(M[W-3],M[W-1],M[W-3]);break;case 43:this.$=Ft.addSubGraph(void 0,M[W-1],void 0);break;case 45:this.$=M[W].trim(),Ft.setAccTitle(this.$);break;case 46:case 47:this.$=M[W].trim(),Ft.setAccDescription(this.$);break;case 51:Ft.addLink(M[W-2].stmt,M[W],M[W-1]),this.$={stmt:M[W],nodes:M[W].concat(M[W-2].nodes)};break;case 52:Ft.addLink(M[W-3].stmt,M[W-1],M[W-2]),this.$={stmt:M[W-1],nodes:M[W-1].concat(M[W-3].nodes)};break;case 53:this.$={stmt:M[W-1],nodes:M[W-1]};break;case 54:this.$={stmt:M[W],nodes:M[W]};break;case 55:this.$=[M[W]];break;case 56:this.$=M[W-4].concat(M[W]);break;case 57:this.$=[M[W-2]],Ft.setClass(M[W-2],M[W]);break;case 58:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"square");break;case 59:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"doublecircle");break;case 60:this.$=M[W-5],Ft.addVertex(M[W-5],M[W-2],"circle");break;case 61:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"ellipse");break;case 62:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"stadium");break;case 63:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"subroutine");break;case 64:this.$=M[W-7],Ft.addVertex(M[W-7],M[W-1],"rect",void 0,void 0,void 0,Object.fromEntries([[M[W-5],M[W-3]]]));break;case 65:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"cylinder");break;case 66:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"round");break;case 67:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"diamond");break;case 68:this.$=M[W-5],Ft.addVertex(M[W-5],M[W-2],"hexagon");break;case 69:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"odd");break;case 70:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"trapezoid");break;case 71:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"inv_trapezoid");break;case 72:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"lean_right");break;case 73:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"lean_left");break;case 74:this.$=M[W],Ft.addVertex(M[W]);break;case 75:M[W-1].text=M[W],this.$=M[W-1];break;case 76:case 77:M[W-2].text=M[W-1],this.$=M[W-2];break;case 78:this.$=M[W];break;case 79:var Vr=Ft.destructLink(M[W],M[W-2]);this.$={type:Vr.type,stroke:Vr.stroke,length:Vr.length,text:M[W-1]};break;case 80:var Vr=Ft.destructLink(M[W]);this.$={type:Vr.type,stroke:Vr.stroke,length:Vr.length};break;case 81:this.$=M[W-1];break;case 83:case 97:case 153:this.$=M[W-1]+""+M[W];break;case 98:case 99:this.$=M[W-4],Ft.addClass(M[W-2],M[W]);break;case 100:this.$=M[W-4],Ft.setClass(M[W-2],M[W]);break;case 101:case 109:this.$=M[W-1],Ft.setClickEvent(M[W-1],M[W]);break;case 102:case 110:this.$=M[W-3],Ft.setClickEvent(M[W-3],M[W-2]),Ft.setTooltip(M[W-3],M[W]);break;case 103:this.$=M[W-2],Ft.setClickEvent(M[W-2],M[W-1],M[W]);break;case 104:this.$=M[W-4],Ft.setClickEvent(M[W-4],M[W-3],M[W-2]),Ft.setTooltip(M[W-4],M[W]);break;case 105:case 111:this.$=M[W-1],Ft.setLink(M[W-1],M[W]);break;case 106:case 112:this.$=M[W-3],Ft.setLink(M[W-3],M[W-2]),Ft.setTooltip(M[W-3],M[W]);break;case 107:case 113:this.$=M[W-3],Ft.setLink(M[W-3],M[W-2],M[W]);break;case 108:case 114:this.$=M[W-5],Ft.setLink(M[W-5],M[W-4],M[W]),Ft.setTooltip(M[W-5],M[W-2]);break;case 115:this.$=M[W-4],Ft.addVertex(M[W-2],void 0,void 0,M[W]);break;case 116:case 118:this.$=M[W-4],Ft.updateLink(M[W-2],M[W]);break;case 117:this.$=M[W-4],Ft.updateLink([M[W-2]],M[W]);break;case 119:this.$=M[W-8],Ft.updateLinkInterpolate([M[W-6]],M[W-2]),Ft.updateLink([M[W-6]],M[W]);break;case 120:this.$=M[W-8],Ft.updateLinkInterpolate(M[W-6],M[W-2]),Ft.updateLink(M[W-6],M[W]);break;case 121:this.$=M[W-6],Ft.updateLinkInterpolate([M[W-4]],M[W]);break;case 122:this.$=M[W-6],Ft.updateLinkInterpolate(M[W-4],M[W]);break;case 123:case 125:this.$=[M[W]];break;case 124:case 126:M[W-2].push(M[W]),this.$=M[W-2];break;case 128:this.$=M[W-1]+M[W];break;case 150:this.$=M[W];break;case 151:this.$=M[W-1]+""+M[W];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:i,22:r,24:s},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:i,22:r,24:s},t(n,a,{17:11}),{7:12,13:[1,13]},{16:14,21:i,22:r,24:s},{16:15,21:i,22:r,24:s},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,43:31,44:f,46:p,48:b,50:35,51:45,52:_,54:46,66:T,67:S,86:k,87:I,88:z,89:H,90:rt,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,118:g,119:O,120:y,121:Y,122:Bt,123:J,124:nt,125:at,126:it,127:et},{8:64,10:[1,65],15:Tt},t([10,15],[2,6]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),{20:[1,68],21:[1,69],22:xt,27:67,30:70},t(Z,[2,11]),t(Z,[2,12]),t(Z,[2,13]),t(Z,[2,14]),t(Z,[2,15]),t(Z,[2,16]),{9:72,20:jt,21:U,23:gt,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:jt,21:U,23:gt},{9:81,20:jt,21:U,23:gt},{9:82,20:jt,21:U,23:gt},{9:83,20:jt,21:U,23:gt},{9:84,20:jt,21:U,23:gt},{9:86,20:jt,21:U,22:[1,85],23:gt},t(Z,[2,44]),{45:[1,87]},{47:[1,88]},t(Z,[2,47]),t(tt,[2,54],{30:89,22:xt}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:K,52:N,66:A,67:G,84:[1,97],91:C,97:96,98:[1,94],100:[1,95],105:ft,106:x,109:Qt,111:j,112:Nt,115:100,117:98,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t(Z,[2,158]),t(Z,[2,159]),t(Z,[2,160]),t(Z,[2,161]),t(Xe,[2,55],{53:[1,116]}),t(Oe,[2,74],{116:129,40:[1,117],52:_,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:T,67:S,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:R,95:F,105:v,106:L,109:w,111:m,112:B,122:Bt,123:J,124:nt,125:at,126:it,127:et}),t(ie,[2,150]),t(ie,[2,175]),t(ie,[2,176]),t(ie,[2,177]),t(ie,[2,178]),t(ie,[2,179]),t(ie,[2,180]),t(ie,[2,181]),t(ie,[2,182]),t(ie,[2,183]),t(ie,[2,184]),t(ie,[2,185]),t(ie,[2,186]),t(ie,[2,187]),t(ie,[2,188]),t(ie,[2,189]),t(ie,[2,190]),{9:130,20:jt,21:U,23:gt},{11:131,14:[1,132]},t(ee,[2,8]),t(n,[2,20]),t(n,[2,26]),t(n,[2,27]),{21:[1,133]},t(Le,[2,34],{30:134,22:xt}),t(Z,[2,35]),{50:135,51:45,52:_,54:46,66:T,67:S,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,122:Bt,123:J,124:nt,125:at,126:it,127:et},t(ri,[2,48]),t(ri,[2,49]),t(ri,[2,50]),t(ze,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:he,24:Ut,26:St,38:Et,39:139,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(Z,[2,36]),t(Z,[2,37]),t(Z,[2,38]),t(Z,[2,39]),t(Z,[2,40]),{22:he,24:Ut,26:St,38:Et,39:163,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t(Aa,a,{17:164}),t(Z,[2,45]),t(Z,[2,46]),t(tt,[2,53],{52:zo}),{26:K,52:N,66:A,67:G,91:C,97:166,102:[1,167],105:ft,106:x,109:Qt,111:j,112:Nt,115:100,117:98,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{95:[1,168],103:169,105:[1,170]},{26:K,52:N,66:A,67:G,91:C,95:[1,171],97:172,105:ft,106:x,109:Qt,111:j,112:Nt,115:100,117:98,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{26:K,52:N,66:A,67:G,91:C,97:173,105:ft,106:x,109:Qt,111:j,112:Nt,115:100,117:98,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t(ee,[2,101],{22:[1,174],99:[1,175]}),t(ee,[2,105],{22:[1,176]}),t(ee,[2,109],{115:100,117:178,22:[1,177],26:K,52:N,66:A,67:G,91:C,105:ft,106:x,109:Qt,111:j,112:Nt,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct}),t(ee,[2,111],{22:[1,179]}),t(yi,[2,152]),t(yi,[2,154]),t(yi,[2,155]),t(yi,[2,156]),t(yi,[2,157]),t(Ee,[2,162]),t(Ee,[2,163]),t(Ee,[2,164]),t(Ee,[2,165]),t(Ee,[2,166]),t(Ee,[2,167]),t(Ee,[2,168]),t(Ee,[2,169]),t(Ee,[2,170]),t(Ee,[2,171]),t(Ee,[2,172]),t(Ee,[2,173]),t(Ee,[2,174]),{52:_,54:180,66:T,67:S,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,122:Bt,123:J,124:nt,125:at,126:it,127:et},{22:he,24:Ut,26:St,38:Et,39:181,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,39:182,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,39:184,42:It,52:N,57:[1,183],66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,39:185,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,39:186,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,39:187,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{66:[1,188]},{22:he,24:Ut,26:St,38:Et,39:189,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,39:190,42:It,52:N,66:A,67:G,71:[1,191],73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,39:192,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,39:193,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,39:194,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t(ie,[2,151]),t(nr,[2,3]),{8:195,15:Tt},{15:[2,7]},t(n,[2,28]),t(Le,[2,33]),t(tt,[2,51],{30:196,22:xt}),t(ze,[2,75],{22:[1,197]}),{22:[1,198]},{22:he,24:Ut,26:St,38:Et,39:199,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,42:It,52:N,66:A,67:G,73:dt,81:qt,82:[1,200],83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t(Ee,[2,82]),t(Ee,[2,84]),t(Ee,[2,140]),t(Ee,[2,141]),t(Ee,[2,142]),t(Ee,[2,143]),t(Ee,[2,144]),t(Ee,[2,145]),t(Ee,[2,146]),t(Ee,[2,147]),t(Ee,[2,148]),t(Ee,[2,149]),t(Ee,[2,85]),t(Ee,[2,86]),t(Ee,[2,87]),t(Ee,[2,88]),t(Ee,[2,89]),t(Ee,[2,90]),t(Ee,[2,91]),t(Ee,[2,92]),t(Ee,[2,93]),t(Ee,[2,94]),t(Ee,[2,95]),{9:203,20:jt,21:U,22:he,23:gt,24:Ut,26:St,38:Et,40:[1,202],42:It,52:N,66:A,67:G,73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,204],43:31,44:f,46:p,48:b,50:35,51:45,52:_,54:46,66:T,67:S,86:k,87:I,88:z,89:H,90:rt,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,118:g,119:O,120:y,121:Y,122:Bt,123:J,124:nt,125:at,126:it,127:et},{22:xt,30:205},{22:[1,206],26:K,52:N,66:A,67:G,91:C,105:ft,106:x,109:Qt,111:j,112:Nt,115:100,117:178,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(Mn,[2,123]),{22:[1,211]},{22:[1,212],26:K,52:N,66:A,67:G,91:C,105:ft,106:x,109:Qt,111:j,112:Nt,115:100,117:178,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:[1,213],26:K,52:N,66:A,67:G,91:C,105:ft,106:x,109:Qt,111:j,112:Nt,115:100,117:178,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{84:[1,214]},t(ee,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(yi,[2,153]),{84:[1,219],101:[1,220]},t(Xe,[2,57],{116:129,52:_,66:T,67:S,91:R,95:F,105:v,106:L,109:w,111:m,112:B,122:Bt,123:J,124:nt,125:at,126:it,127:et}),{22:he,24:Ut,26:St,38:Et,41:[1,221],42:It,52:N,66:A,67:G,73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,42:It,52:N,56:[1,222],66:A,67:G,73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,39:223,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,42:It,52:N,58:[1,224],66:A,67:G,73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,42:It,52:N,60:[1,225],66:A,67:G,73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,42:It,52:N,62:[1,226],66:A,67:G,73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,42:It,52:N,64:[1,227],66:A,67:G,73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{67:[1,228]},{22:he,24:Ut,26:St,38:Et,42:It,52:N,66:A,67:G,70:[1,229],73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,42:It,52:N,66:A,67:G,72:[1,230],73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,39:231,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,41:[1,232],42:It,52:N,66:A,67:G,73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,42:It,52:N,66:A,67:G,73:dt,75:[1,233],77:[1,234],81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Ut,26:St,38:Et,42:It,52:N,66:A,67:G,73:dt,75:[1,236],77:[1,235],81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{9:237,20:jt,21:U,23:gt},t(tt,[2,52],{52:zo}),t(ze,[2,77]),t(ze,[2,76]),{22:he,24:Ut,26:St,38:Et,42:It,52:N,66:A,67:G,68:[1,238],73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t(ze,[2,79]),t(Ee,[2,83]),{22:he,24:Ut,26:St,38:Et,39:239,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t(Aa,a,{17:240}),t(Z,[2,43]),{51:241,52:_,54:46,66:T,67:S,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,122:Bt,123:J,124:nt,125:at,126:it,127:et},{22:Mi,66:Xi,67:mi,86:yr,96:242,102:Ki,105:ar,107:243,108:244,109:bi,110:Kr,111:Qr,112:Jr,113:$r},{22:Mi,66:Xi,67:mi,86:yr,96:256,102:Ki,105:ar,107:243,108:244,109:bi,110:Kr,111:Qr,112:Jr,113:$r},{22:Mi,66:Xi,67:mi,86:yr,96:257,102:Ki,104:[1,258],105:ar,107:243,108:244,109:bi,110:Kr,111:Qr,112:Jr,113:$r},{22:Mi,66:Xi,67:mi,86:yr,96:259,102:Ki,104:[1,260],105:ar,107:243,108:244,109:bi,110:Kr,111:Qr,112:Jr,113:$r},{105:[1,261]},{22:Mi,66:Xi,67:mi,86:yr,96:262,102:Ki,105:ar,107:243,108:244,109:bi,110:Kr,111:Qr,112:Jr,113:$r},{22:Mi,66:Xi,67:mi,86:yr,96:263,102:Ki,105:ar,107:243,108:244,109:bi,110:Kr,111:Qr,112:Jr,113:$r},{26:K,52:N,66:A,67:G,91:C,97:264,105:ft,106:x,109:Qt,111:j,112:Nt,115:100,117:98,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t(ee,[2,102]),{84:[1,265]},t(ee,[2,106],{22:[1,266]}),t(ee,[2,107]),t(ee,[2,110]),t(ee,[2,112],{22:[1,267]}),t(ee,[2,113]),t(Oe,[2,58]),t(Oe,[2,59]),{22:he,24:Ut,26:St,38:Et,42:It,52:N,58:[1,268],66:A,67:G,73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t(Oe,[2,66]),t(Oe,[2,61]),t(Oe,[2,62]),t(Oe,[2,63]),{66:[1,269]},t(Oe,[2,65]),t(Oe,[2,67]),{22:he,24:Ut,26:St,38:Et,42:It,52:N,66:A,67:G,72:[1,270],73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t(Oe,[2,69]),t(Oe,[2,70]),t(Oe,[2,72]),t(Oe,[2,71]),t(Oe,[2,73]),t(nr,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:he,24:Ut,26:St,38:Et,41:[1,271],42:It,52:N,66:A,67:G,73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,272],43:31,44:f,46:p,48:b,50:35,51:45,52:_,54:46,66:T,67:S,86:k,87:I,88:z,89:H,90:rt,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,118:g,119:O,120:y,121:Y,122:Bt,123:J,124:nt,125:at,126:it,127:et},t(Xe,[2,56]),t(ee,[2,115],{106:js}),t(dd,[2,125],{108:274,22:Mi,66:Xi,67:mi,86:yr,102:Ki,105:ar,109:bi,110:Kr,111:Qr,112:Jr,113:$r}),t(Ar,[2,127]),t(Ar,[2,129]),t(Ar,[2,130]),t(Ar,[2,131]),t(Ar,[2,132]),t(Ar,[2,133]),t(Ar,[2,134]),t(Ar,[2,135]),t(Ar,[2,136]),t(Ar,[2,137]),t(Ar,[2,138]),t(Ar,[2,139]),t(ee,[2,116],{106:js}),t(ee,[2,117],{106:js}),{22:[1,275]},t(ee,[2,118],{106:js}),{22:[1,276]},t(Mn,[2,124]),t(ee,[2,98],{106:js}),t(ee,[2,99],{106:js}),t(ee,[2,100],{115:100,117:178,26:K,52:N,66:A,67:G,91:C,105:ft,106:x,109:Qt,111:j,112:Nt,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct}),t(ee,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:jt,21:U,23:gt},t(Z,[2,42]),{22:Mi,66:Xi,67:mi,86:yr,102:Ki,105:ar,107:283,108:244,109:bi,110:Kr,111:Qr,112:Jr,113:$r},t(Ar,[2,128]),{26:K,52:N,66:A,67:G,91:C,97:284,105:ft,106:x,109:Qt,111:j,112:Nt,115:100,117:98,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{26:K,52:N,66:A,67:G,91:C,97:285,105:ft,106:x,109:Qt,111:j,112:Nt,115:100,117:98,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t(ee,[2,108]),t(ee,[2,114]),t(Oe,[2,60]),{22:he,24:Ut,26:St,38:Et,39:286,42:It,52:N,66:A,67:G,73:dt,81:qt,83:140,84:st,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},t(Oe,[2,68]),t(Aa,a,{17:287}),t(dd,[2,126],{108:274,22:Mi,66:Xi,67:mi,86:yr,102:Ki,105:ar,109:bi,110:Kr,111:Qr,112:Jr,113:$r}),t(ee,[2,121],{115:100,117:178,22:[1,288],26:K,52:N,66:A,67:G,91:C,105:ft,106:x,109:Qt,111:j,112:Nt,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct}),t(ee,[2,122],{115:100,117:178,22:[1,289],26:K,52:N,66:A,67:G,91:C,105:ft,106:x,109:Qt,111:j,112:Nt,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct}),{22:he,24:Ut,26:St,38:Et,41:[1,290],42:It,52:N,66:A,67:G,73:dt,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Fe,90:Pe,91:Me,92:Ve,94:142,95:ae,105:ft,106:x,109:Te,111:j,112:Nt,113:Ie,114:De,115:148,122:wt,123:kt,124:yt,125:_t,126:mt,127:Ct},{18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,291],43:31,44:f,46:p,48:b,50:35,51:45,52:_,54:46,66:T,67:S,86:k,87:I,88:z,89:H,90:rt,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,118:g,119:O,120:y,121:Y,122:Bt,123:J,124:nt,125:at,126:it,127:et},{22:Mi,66:Xi,67:mi,86:yr,96:292,102:Ki,105:ar,107:243,108:244,109:bi,110:Kr,111:Qr,112:Jr,113:$r},{22:Mi,66:Xi,67:mi,86:yr,96:293,102:Ki,105:ar,107:243,108:244,109:bi,110:Kr,111:Qr,112:Jr,113:$r},t(Oe,[2,64]),t(Z,[2,41]),t(ee,[2,119],{106:js}),t(ee,[2,120],{106:js})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(re,ue){if(ue.recoverable)this.trace(re);else{var Re=new Error(re);throw Re.hash=ue,Re}},parse:function(re){var ue=this,Re=[0],Ft=[],ni=[null],M=[],La=this.table,W="",Vr=0,fd=0,Cb=2,pd=1,Tb=M.slice.call(arguments,1),Pi=Object.create(this.lexer),fn={yy:{}};for(var Nc in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Nc)&&(fn.yy[Nc]=this.yy[Nc]);Pi.setInput(re,fn.yy),fn.yy.lexer=Pi,fn.yy.parser=this,typeof Pi.yylloc=="undefined"&&(Pi.yylloc={});var Oc=Pi.yylloc;M.push(Oc);var Sb=Pi.options&&Pi.options.ranges;typeof fn.yy.parseError=="function"?this.parseError=fn.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function wb(){var Ls;return Ls=Ft.pop()||Pi.lex()||pd,typeof Ls!="number"&&(Ls instanceof Array&&(Ft=Ls,Ls=Ft.pop()),Ls=ue.symbols_[Ls]||Ls),Ls}for(var mr,pn,Yr,Fc,Pn={},Wo,As,gd,Uo;;){if(pn=Re[Re.length-1],this.defaultActions[pn]?Yr=this.defaultActions[pn]:((mr===null||typeof mr=="undefined")&&(mr=wb()),Yr=La[pn]&&La[pn][mr]),typeof Yr=="undefined"||!Yr.length||!Yr[0]){var Mc="";Uo=[];for(Wo in La[pn])this.terminals_[Wo]&&Wo>Cb&&Uo.push("'"+this.terminals_[Wo]+"'");Pi.showPosition?Mc="Parse error on line "+(Vr+1)+`:
1324
+ `+Pi.showPosition()+`
1325
+ Expecting `+Uo.join(", ")+", got '"+(this.terminals_[mr]||mr)+"'":Mc="Parse error on line "+(Vr+1)+": Unexpected "+(mr==pd?"end of input":"'"+(this.terminals_[mr]||mr)+"'"),this.parseError(Mc,{text:Pi.match,token:this.terminals_[mr]||mr,line:Pi.yylineno,loc:Oc,expected:Uo})}if(Yr[0]instanceof Array&&Yr.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pn+", token: "+mr);switch(Yr[0]){case 1:Re.push(mr),ni.push(Pi.yytext),M.push(Pi.yylloc),Re.push(Yr[1]),mr=null,fd=Pi.yyleng,W=Pi.yytext,Vr=Pi.yylineno,Oc=Pi.yylloc;break;case 2:if(As=this.productions_[Yr[1]][1],Pn.$=ni[ni.length-As],Pn._$={first_line:M[M.length-(As||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(As||1)].first_column,last_column:M[M.length-1].last_column},Sb&&(Pn._$.range=[M[M.length-(As||1)].range[0],M[M.length-1].range[1]]),Fc=this.performAction.apply(Pn,[W,fd,Vr,fn.yy,Yr[1],ni,M].concat(Tb)),typeof Fc!="undefined")return Fc;As&&(Re=Re.slice(0,-1*As*2),ni=ni.slice(0,-1*As),M=M.slice(0,-1*As)),Re.push(this.productions_[Yr[1]][0]),ni.push(Pn.$),M.push(Pn._$),gd=La[Re[Re.length-2]][Re[Re.length-1]],Re.push(gd);break;case 3:return!0}}return!0}},vb=function(){var qs={EOF:1,parseError:function(ue,Re){if(this.yy.parser)this.yy.parser.parseError(ue,Re);else throw new Error(ue)},setInput:function(re,ue){return this.yy=ue||this.yy||{},this._input=re,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var re=this._input[0];this.yytext+=re,this.yyleng++,this.offset++,this.match+=re,this.matched+=re;var ue=re.match(/(?:\r\n?|\n).*/g);return ue?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),re},unput:function(re){var ue=re.length,Re=re.split(/(?:\r\n?|\n)/g);this._input=re+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ue),this.offset-=ue;var Ft=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Re.length-1&&(this.yylineno-=Re.length-1);var ni=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Re?(Re.length===Ft.length?this.yylloc.first_column:0)+Ft[Ft.length-Re.length].length-Re[0].length:this.yylloc.first_column-ue},this.options.ranges&&(this.yylloc.range=[ni[0],ni[0]+this.yyleng-ue]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1326
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(re){this.unput(this.match.slice(re))},pastInput:function(){var re=this.matched.substr(0,this.matched.length-this.match.length);return(re.length>20?"...":"")+re.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var re=this.match;return re.length<20&&(re+=this._input.substr(0,20-re.length)),(re.substr(0,20)+(re.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var re=this.pastInput(),ue=new Array(re.length+1).join("-");return re+this.upcomingInput()+`
1327
+ `+ue+"^"},test_match:function(re,ue){var Re,Ft,ni;if(this.options.backtrack_lexer&&(ni={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ni.yylloc.range=this.yylloc.range.slice(0))),Ft=re[0].match(/(?:\r\n?|\n).*/g),Ft&&(this.yylineno+=Ft.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ft?Ft[Ft.length-1].length-Ft[Ft.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+re[0].length},this.yytext+=re[0],this.match+=re[0],this.matches=re,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(re[0].length),this.matched+=re[0],Re=this.performAction.call(this,this.yy,this,ue,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Re)return Re;if(this._backtrack){for(var M in ni)this[M]=ni[M];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var re,ue,Re,Ft;this._more||(this.yytext="",this.match="");for(var ni=this._currentRules(),M=0;M<ni.length;M++)if(Re=this._input.match(this.rules[ni[M]]),Re&&(!ue||Re[0].length>ue[0].length)){if(ue=Re,Ft=M,this.options.backtrack_lexer){if(re=this.test_match(Re,ni[M]),re!==!1)return re;if(this._backtrack){ue=!1;continue}else return!1}else if(!this.options.flex)break}return ue?(re=this.test_match(ue,ni[Ft]),re!==!1?re:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1328
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ue=this.next();return ue||this.lex()},begin:function(ue){this.conditionStack.push(ue)},popState:function(){var ue=this.conditionStack.length-1;return ue>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(ue){return ue=this.conditionStack.length-1-Math.abs(ue||0),ue>=0?this.conditionStack[ue]:"INITIAL"},pushState:function(ue){this.begin(ue)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(ue,Re,Ft,ni){switch(Ft){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:break;case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 24:this.popState();break;case 25:return 100;case 26:this.begin("callbackname");break;case 27:this.popState();break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 30:this.popState();break;case 31:return 99;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 90;case 35:return ue.lex.firstGraph()&&this.begin("dir"),24;case 36:return ue.lex.firstGraph()&&this.begin("dir"),24;case 37:return ue.lex.firstGraph()&&this.begin("dir"),24;case 38:return 38;case 39:return 42;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),25;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;case 53:return this.popState(),26;case 54:return this.popState(),26;case 55:return 118;case 56:return 119;case 57:return 120;case 58:return 121;case 59:return 105;case 60:return 111;case 61:return 53;case 62:return 67;case 63:return 52;case 64:return 20;case 65:return 106;case 66:return 126;case 67:return 82;case 68:return 82;case 69:return 82;case 70:return 81;case 71:return 81;case 72:return 81;case 73:return 59;case 74:return 60;case 75:return 61;case 76:return 62;case 77:return 63;case 78:return 64;case 79:return 65;case 80:return 69;case 81:return 70;case 82:return 55;case 83:return 56;case 84:return 109;case 85:return 112;case 86:return 127;case 87:return 124;case 88:return 113;case 89:return 125;case 90:return 125;case 91:return 114;case 92:return 73;case 93:return 92;case 94:return"SEP";case 95:return 91;case 96:return 66;case 97:return 75;case 98:return 74;case 99:return 77;case 100:return 76;case 101:return 122;case 102:return 123;case 103:return 68;case 104:return 57;case 105:return 58;case 106:return 40;case 107:return 41;case 108:return 71;case 109:return 72;case 110:return 133;case 111:return 21;case 112:return 22;case 113:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[44,45,46,47,48,49,50,51,52,53,54],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],inclusive:!0}}};return qs}();Dc.lexer=vb;function Rc(){this.yy={}}return Rc.prototype=Dc,Dc.Parser=Rc,new Rc}();Bl.parser=Bl;const Il=Bl,o3=(t,e)=>{var i,r;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"||((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null},l3=(t,e)=>{var i,r;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-d3"||((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null?!0:t.match(/^\s*flowchart/)!==null},c3="flowchart-";let Ih=0,Dl=P(),ei={},ln=[],wn={},ks=[],po={},Rl={},go=0,Nl=!0,Fr,yo,mo=[];const bo=t=>me.sanitizeText(t,Dl),Dh=function(t,e,i){ii.parseDirective(this,t,e,i)},la=function(t){const e=Object.keys(ei);for(const i of e)if(ei[i].id===t)return ei[i].domId;return t},Rh=function(t,e,i,r,s,n,a={}){let o,l=t;l!==void 0&&l.trim().length!==0&&(ei[l]===void 0&&(ei[l]={id:l,domId:c3+l+"-"+Ih,styles:[],classes:[]}),Ih++,e!==void 0?(Dl=P(),o=bo(e.trim()),o[0]==='"'&&o[o.length-1]==='"'&&(o=o.substring(1,o.length-1)),ei[l].text=o):ei[l].text===void 0&&(ei[l].text=t),i!==void 0&&(ei[l].type=i),r!=null&&r.forEach(function(h){ei[l].styles.push(h)}),s!=null&&s.forEach(function(h){ei[l].classes.push(h)}),n!==void 0&&(ei[l].dir=n),ei[l].props===void 0?ei[l].props=a:a!==void 0&&Object.assign(ei[l].props,a))},Nh=function(t,e,i,r){const a={start:t,end:e,type:void 0,text:""};r=i.text,r!==void 0&&(a.text=bo(r.trim()),a.text[0]==='"'&&a.text[a.text.length-1]==='"'&&(a.text=a.text.substring(1,a.text.length-1))),i!==void 0&&(a.type=i.type,a.stroke=i.stroke,a.length=i.length),ln.push(a)},Oh=function(t,e,i,r){let s,n;for(s=0;s<t.length;s++)for(n=0;n<e.length;n++)Nh(t[s],e[n],i,r)},Fh=function(t,e){t.forEach(function(i){i==="default"?ln.defaultInterpolate=e:ln[i].interpolate=e})},Mh=function(t,e){t.forEach(function(i){i==="default"?ln.defaultStyle=e:(xe.isSubstringInArray("fill",e)===-1&&e.push("fill:none"),ln[i].style=e)})},Ph=function(t,e){wn[t]===void 0&&(wn[t]={id:t,styles:[],textStyles:[]}),e!=null&&e.forEach(function(i){if(i.match("color")){const s=i.replace("fill","bgFill").replace("color","fill");wn[t].textStyles.push(s)}wn[t].styles.push(i)})},Vh=function(t){Fr=t,Fr.match(/.*</)&&(Fr="RL"),Fr.match(/.*\^/)&&(Fr="BT"),Fr.match(/.*>/)&&(Fr="LR"),Fr.match(/.*v/)&&(Fr="TB"),Fr==="TD"&&(Fr="TB")},xo=function(t,e){t.split(",").forEach(function(i){let r=i;ei[r]!==void 0&&ei[r].classes.push(e),po[r]!==void 0&&po[r].classes.push(e)})},h3=function(t,e){t.split(",").forEach(function(i){e!==void 0&&(Rl[yo==="gen-1"?la(i):i]=bo(e))})},u3=function(t,e,i){let r=la(t);if(P().securityLevel!=="loose"||e===void 0)return;let s=[];if(typeof i=="string"){s=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let n=0;n<s.length;n++){let a=s[n].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),s[n]=a}}s.length===0&&s.push(t),ei[t]!==void 0&&(ei[t].haveCallback=!0,mo.push(function(){const n=document.querySelector(`[id="${r}"]`);n!==null&&n.addEventListener("click",function(){xe.runFunc(e,...s)},!1)}))},Yh=function(t,e,i){t.split(",").forEach(function(r){ei[r]!==void 0&&(ei[r].link=xe.formatUrl(e,Dl),ei[r].linkTarget=i)}),xo(t,"clickable")},zh=function(t){return Rl[t]},Wh=function(t,e,i){t.split(",").forEach(function(r){u3(r,e,i)}),xo(t,"clickable")},Uh=function(t){mo.forEach(function(e){e(t)})},Zh=function(){return Fr.trim()},Hh=function(){return ei},Gh=function(){return ln},jh=function(){return wn},qh=function(t){let e=(0,Q.Ys)(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=(0,Q.Ys)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),(0,Q.Ys)(t).select("svg").selectAll("g.node").on("mouseover",function(){const s=(0,Q.Ys)(this);if(s.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),s.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),(0,Q.Ys)(this).classed("hover",!1)})};mo.push(qh);const Xh=function(t="gen-1"){ei={},wn={},ln=[],mo=[qh],ks=[],po={},go=0,Rl=[],Nl=!0,yo=t,ur()},Kh=t=>{yo=t||"gen-2"},Qh=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},Jh=function(t,e,i){let r=t.trim(),s=i;t===i&&i.match(/\s/)&&(r=void 0);function n(u){const d={boolean:{},number:{},string:{}},f=[];let p;return{nodeList:u.filter(function(_){const T=typeof _;return _.stmt&&_.stmt==="dir"?(p=_.value,!1):_.trim()===""?!1:T in d?d[T].hasOwnProperty(_)?!1:d[T][_]=!0:f.includes(_)?!1:f.push(_)}),dir:p}}let a=[];const{nodeList:o,dir:l}=n(a.concat.apply(a,e));if(a=o,yo==="gen-1")for(let u=0;u<a.length;u++)a[u]=la(a[u]);r=r||"subGraph"+go,s=s||"",s=bo(s),go=go+1;const h={id:r,nodes:a,title:s.trim(),classes:[],dir:l};return E.info("Adding",h.id,h.nodes,h.dir),h.nodes=o0(h,ks).nodes,ks.push(h),po[r]=h,r},d3=function(t){for(const[e,i]of ks.entries())if(i.id===t)return e;return-1};let ca=-1;const $h=[],t0=function(t,e){const i=ks[e].nodes;if(ca=ca+1,ca>2e3)return;if($h[ca]=e,ks[e].id===t)return{result:!0,count:0};let r=0,s=1;for(;r<i.length;){const n=d3(i[r]);if(n>=0){const a=t0(t,n);if(a.result)return{result:!0,count:s+a.count};s=s+a.count}r=r+1}return{result:!1,count:s}},e0=function(t){return $h[t]},i0=function(){ca=-1,ks.length>0&&t0("none",ks.length-1)},r0=function(){return ks},s0=()=>Nl?(Nl=!1,!0):!1,f3=t=>{let e=t.trim(),i="arrow_open";switch(e[0]){case"<":i="arrow_point",e=e.slice(1);break;case"x":i="arrow_cross",e=e.slice(1);break;case"o":i="arrow_circle",e=e.slice(1);break}let r="normal";return e.includes("=")&&(r="thick"),e.includes(".")&&(r="dotted"),{type:i,stroke:r}},p3=(t,e)=>{const i=e.length;let r=0;for(let s=0;s<i;++s)e[s]===t&&++r;return r},g3=t=>{const e=t.trim();let i=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross",e[0]==="x"&&(r="double_"+r,i=i.slice(1));break;case">":r="arrow_point",e[0]==="<"&&(r="double_"+r,i=i.slice(1));break;case"o":r="arrow_circle",e[0]==="o"&&(r="double_"+r,i=i.slice(1));break}let s="normal",n=i.length-1;i[0]==="="&&(s="thick");let a=p3(".",i);return a&&(s="dotted",n=a),{type:r,stroke:s,length:n}},n0=(t,e)=>{const i=g3(t);let r;if(e){if(r=f3(e),r.stroke!==i.stroke)return{type:"INVALID",stroke:"INVALID"};if(r.type==="arrow_open")r.type=i.type;else{if(r.type!==i.type)return{type:"INVALID",stroke:"INVALID"};r.type="double_"+r.type}return r.type==="double_arrow"&&(r.type="double_arrow_point"),r.length=i.length,r}return i},a0=(t,e)=>{let i=!1;return t.forEach(r=>{r.nodes.indexOf(e)>=0&&(i=!0)}),i},o0=(t,e)=>{const i=[];return t.nodes.forEach((r,s)=>{a0(e,r)||i.push(t.nodes[s])}),{nodes:i}},l0={firstGraph:s0},os={parseDirective:Dh,defaultConfig:()=>vn.flowchart,setAccTitle:dr,getAccTitle:vr,getAccDescription:Tr,setAccDescription:Cr,addVertex:Rh,lookUpDomId:la,addLink:Oh,updateLinkInterpolate:Fh,updateLink:Mh,addClass:Ph,setDirection:Vh,setClass:xo,setTooltip:h3,getTooltip:zh,setClickEvent:Wh,setLink:Yh,bindFunctions:Uh,getDirection:Zh,getVertices:Hh,getEdges:Gh,getClasses:jh,clear:Xh,setGen:Kh,defaultStyle:Qh,addSubGraph:Jh,getDepthFirstPos:e0,indexNodes:i0,getSubGraphs:r0,destructLink:n0,lex:l0,exists:a0,makeUniq:o0,setDiagramTitle:Ur,getDiagramTitle:Zr},y3=Object.freeze(Object.defineProperty({__proto__:null,addClass:Ph,addLink:Oh,addSingleLink:Nh,addSubGraph:Jh,addVertex:Rh,bindFunctions:Uh,clear:Xh,default:os,defaultStyle:Qh,destructLink:n0,firstGraph:s0,getClasses:jh,getDepthFirstPos:e0,getDirection:Zh,getEdges:Gh,getSubGraphs:r0,getTooltip:zh,getVertices:Hh,indexNodes:i0,lex:l0,lookUpDomId:la,parseDirective:Dh,setClass:xo,setClickEvent:Wh,setDirection:Vh,setGen:Kh,setLink:Yh,updateLink:Mh,updateLinkInterpolate:Fh},Symbol.toStringTag,{value:"Module"}));function c0(t,e,i){const r=e.width,s=e.height,n=(r+s)*.9,a=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],o=_s(t,n,n,a);return i.intersect=function(l){return(0,qe.A)(i,a,l)},o}function h0(t,e,i){const s=e.height,n=s/4,a=e.width+2*n,o=[{x:n,y:0},{x:a-n,y:0},{x:a,y:-s/2},{x:a-n,y:-s},{x:n,y:-s},{x:0,y:-s/2}],l=_s(t,a,s,o);return i.intersect=function(h){return(0,qe.A)(i,o,h)},l}function u0(t,e,i){const r=e.width,s=e.height,n=[{x:-s/2,y:0},{x:r,y:0},{x:r,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}],a=_s(t,r,s,n);return i.intersect=function(o){return(0,qe.A)(i,n,o)},a}function d0(t,e,i){const r=e.width,s=e.height,n=[{x:-2*s/6,y:0},{x:r-s/6,y:0},{x:r+2*s/6,y:-s},{x:s/6,y:-s}],a=_s(t,r,s,n);return i.intersect=function(o){return(0,qe.A)(i,n,o)},a}function f0(t,e,i){const r=e.width,s=e.height,n=[{x:2*s/6,y:0},{x:r+s/6,y:0},{x:r-2*s/6,y:-s},{x:-s/6,y:-s}],a=_s(t,r,s,n);return i.intersect=function(o){return(0,qe.A)(i,n,o)},a}function p0(t,e,i){const r=e.width,s=e.height,n=[{x:-2*s/6,y:0},{x:r+2*s/6,y:0},{x:r-s/6,y:-s},{x:s/6,y:-s}],a=_s(t,r,s,n);return i.intersect=function(o){return(0,qe.A)(i,n,o)},a}function g0(t,e,i){const r=e.width,s=e.height,n=[{x:s/6,y:0},{x:r-s/6,y:0},{x:r+2*s/6,y:-s},{x:-2*s/6,y:-s}],a=_s(t,r,s,n);return i.intersect=function(o){return(0,qe.A)(i,n,o)},a}function y0(t,e,i){const r=e.width,s=e.height,n=[{x:0,y:0},{x:r+s/2,y:0},{x:r,y:-s/2},{x:r+s/2,y:-s},{x:0,y:-s}],a=_s(t,r,s,n);return i.intersect=function(o){return(0,qe.A)(i,n,o)},a}function m0(t,e,i){const r=e.height,s=e.width+r/4,n=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-s/2).attr("y",-r/2).attr("width",s).attr("height",r);return i.intersect=function(a){return(0,is.q)(i,a)},n}function b0(t,e,i){const r=e.width,s=e.height,n=[{x:0,y:0},{x:r,y:0},{x:r,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],a=_s(t,r,s,n);return i.intersect=function(o){return(0,qe.A)(i,n,o)},a}function x0(t,e,i){const r=e.width,s=r/2,n=s/(2.5+r/50),a=e.height+n,o="M 0,"+n+" a "+s+","+n+" 0,0,0 "+r+" 0 a "+s+","+n+" 0,0,0 "+-r+" 0 l 0,"+a+" a "+s+","+n+" 0,0,0 "+r+" 0 l 0,"+-a,l=t.attr("label-offset-y",n).insert("path",":first-child").attr("d",o).attr("transform","translate("+-r/2+","+-(a/2+n)+")");return i.intersect=function(h){const u=(0,is.q)(i,h),d=u.x-i.x;if(s!=0&&(Math.abs(d)<i.width/2||Math.abs(d)==i.width/2&&Math.abs(u.y-i.y)>i.height/2-n)){let f=n*n*(1-d*d/(s*s));f!=0&&(f=Math.sqrt(f)),f=n-f,h.y-i.y>0&&(f=-f),u.y+=f}return u},l}function m3(t){t.shapes().question=c0,t.shapes().hexagon=h0,t.shapes().stadium=m0,t.shapes().subroutine=b0,t.shapes().cylinder=x0,t.shapes().rect_left_inv_arrow=u0,t.shapes().lean_right=d0,t.shapes().lean_left=f0,t.shapes().trapezoid=p0,t.shapes().inv_trapezoid=g0,t.shapes().rect_right_inv_arrow=y0}function b3(t){t({question:c0}),t({hexagon:h0}),t({stadium:m0}),t({subroutine:b0}),t({cylinder:x0}),t({rect_left_inv_arrow:u0}),t({lean_right:d0}),t({lean_left:f0}),t({trapezoid:p0}),t({inv_trapezoid:g0}),t({rect_right_inv_arrow:y0})}function _s(t,e,i,r){return t.insert("polygon",":first-child").attr("points",r.map(function(s){return s.x+","+s.y}).join(" ")).attr("transform","translate("+-e/2+","+i/2+")")}const x3={addToRender:m3,addToRenderV2:b3},k0={},k3=function(t){const e=Object.keys(t);for(const i of e)k0[i]=t[i]},_0=function(t,e,i,r,s,n){const a=r?r.select(`[id="${i}"]`):(0,Q.Ys)(`[id="${i}"]`),o=s||document;Object.keys(t).forEach(function(h){const u=t[h];let d="default";u.classes.length>0&&(d=u.classes.join(" "));const f=gs(u.styles);let p=u.text!==void 0?u.text:u.id,b;if(Ti(P().flowchart.htmlLabels)){const S={label:p.replace(/fa[blrs]?:fa-[\w-]+/g,k=>`<i class='${k.replace(":"," ")}'></i>`)};b=(0,Ke.a)(a,S).node(),b.parentNode.removeChild(b)}else{const S=o.createElementNS("http://www.w3.org/2000/svg","text");S.setAttribute("style",f.labelStyle.replace("color:","fill:"));const k=p.split(me.lineBreakRegex);for(const I of k){const z=o.createElementNS("http://www.w3.org/2000/svg","tspan");z.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),z.setAttribute("dy","1em"),z.setAttribute("x","1"),z.textContent=I,S.appendChild(z)}b=S}let _=0,T="";switch(u.type){case"round":_=5,T="rect";break;case"square":T="rect";break;case"diamond":T="question";break;case"hexagon":T="hexagon";break;case"odd":T="rect_left_inv_arrow";break;case"lean_right":T="lean_right";break;case"lean_left":T="lean_left";break;case"trapezoid":T="trapezoid";break;case"inv_trapezoid":T="inv_trapezoid";break;case"odd_right":T="rect_left_inv_arrow";break;case"circle":T="circle";break;case"ellipse":T="ellipse";break;case"stadium":T="stadium";break;case"subroutine":T="subroutine";break;case"cylinder":T="cylinder";break;case"group":T="rect";break;default:T="rect"}E.warn("Adding node",u.id,u.domId),e.setNode(n.db.lookUpDomId(u.id),{labelType:"svg",labelStyle:f.labelStyle,shape:T,label:b,rx:_,ry:_,class:d,style:f.style,id:n.db.lookUpDomId(u.id)})})},E0=function(t,e,i){let r=0,s,n;if(t.defaultStyle!==void 0){const a=gs(t.defaultStyle);s=a.style,n=a.labelStyle}t.forEach(function(a){r++;var o="L-"+a.start+"-"+a.end,l="LS-"+a.start,h="LE-"+a.end;const u={};a.type==="arrow_open"?u.arrowhead="none":u.arrowhead="normal";let d="",f="";if(a.style!==void 0){const p=gs(a.style);d=p.style,f=p.labelStyle}else switch(a.stroke){case"normal":d="fill:none",s!==void 0&&(d=s),n!==void 0&&(f=n);break;case"dotted":d="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d=" stroke-width: 3.5px;fill:none";break}u.style=d,u.labelStyle=f,a.interpolate!==void 0?u.curve=Nr(a.interpolate,Q.c_6):t.defaultInterpolate!==void 0?u.curve=Nr(t.defaultInterpolate,Q.c_6):u.curve=Nr(k0.curve,Q.c_6),a.text===void 0?a.style!==void 0&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c",Ti(P().flowchart.htmlLabels)?(u.labelType="html",u.label=`<span id="L-${o}" class="edgeLabel L-${l}' L-${h}" style="${u.labelStyle}">${a.text.replace(/fa[blrs]?:fa-[\w-]+/g,p=>`<i class='${p.replace(":"," ")}'></i>`)}</span>`):(u.labelType="text",u.label=a.text.replace(me.lineBreakRegex,`
1329
+ `),a.style===void 0&&(u.style=u.style||"stroke: #333; stroke-width: 1.5px;fill:none"),u.labelStyle=u.labelStyle.replace("color:","fill:"))),u.id=o,u.class=l+" "+h,u.minlen=a.length||1,e.setEdge(i.db.lookUpDomId(a.start),i.db.lookUpDomId(a.end),u,r)})},_3={setConf:k3,addVertices:_0,addEdges:E0,getClasses:function(t,e){E.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(i){return E.error(i),{}}},draw:function(t,e,i,r){E.info("Drawing flowchart"),r.db.clear();const{securityLevel:s,flowchart:n}=P();let a;s==="sandbox"&&(a=(0,Q.Ys)("#i"+e));const o=s==="sandbox"?(0,Q.Ys)(a.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),l=s==="sandbox"?a.nodes()[0].contentDocument:document;try{r.parser.parse(t)}catch(rt){E.debug("Parsing failed")}let h=r.db.getDirection();h===void 0&&(h="TD");const u=n.nodeSpacing||50,d=n.rankSpacing||50,f=new Be.k({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:u,ranksep:d,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let p;const b=r.db.getSubGraphs();for(let rt=b.length-1;rt>=0;rt--)p=b[rt],r.db.addVertex(p.id,p.title,"group",void 0,p.classes);const _=r.db.getVertices();E.warn("Get vertices",_);const T=r.db.getEdges();let S=0;for(S=b.length-1;S>=0;S--){p=b[S],(0,Q.td_)("cluster").append("text");for(let rt=0;rt<p.nodes.length;rt++)E.warn("Setting subgraph",p.nodes[rt],r.db.lookUpDomId(p.nodes[rt]),r.db.lookUpDomId(p.id)),f.setParent(r.db.lookUpDomId(p.nodes[rt]),r.db.lookUpDomId(p.id))}_0(_,f,e,o,l,r),E0(T,f,r);const k=new yn.sY;x3.addToRender(k),k.arrows().none=function(R,F,v,L){const m=R.append("marker").attr("id",F).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");(0,Di.bg)(m,v[L+"Style"])},k.arrows().normal=function(R,F){R.append("marker").attr("id",F).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};const I=o.select(`[id="${e}"]`),z=o.select("#"+e+" g");for(k(z,f),z.selectAll("g.node").attr("title",function(){return r.db.getTooltip(this.id)}),r.db.indexNodes("subGraph"+S),S=0;S<b.length;S++)if(p=b[S],p.title!=="undefined"){const rt=l.querySelectorAll("#"+e+' [id="'+r.db.lookUpDomId(p.id)+'"] rect'),R=l.querySelectorAll("#"+e+' [id="'+r.db.lookUpDomId(p.id)+'"]'),F=rt[0].x.baseVal.value,v=rt[0].y.baseVal.value,L=rt[0].width.baseVal.value,m=(0,Q.Ys)(R[0]).select(".label");m.attr("transform",`translate(${F+L/2}, ${v+14})`),m.attr("id",e+"Text");for(let B=0;B<p.classes.length;B++)R[0].classList.add(p.classes[B])}if(!n.htmlLabels){const rt=l.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const R of rt){const F=R.getBBox(),v=l.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",F.width),v.setAttribute("height",F.height),R.insertBefore(v,R.firstChild)}}Gn(f,I,n.diagramPadding,n.useMaxWidth),Object.keys(_).forEach(function(rt){const R=_[rt];if(R.link){const F=o.select("#"+e+' [id="'+r.db.lookUpDomId(rt)+'"]');if(F){const v=l.createElementNS("http://www.w3.org/2000/svg","a");v.setAttributeNS("http://www.w3.org/2000/svg","class",R.classes.join(" ")),v.setAttributeNS("http://www.w3.org/2000/svg","href",R.link),v.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),s==="sandbox"?v.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):R.linkTarget&&v.setAttributeNS("http://www.w3.org/2000/svg","target",R.linkTarget);const L=F.insert(function(){return v},":first-child"),w=F.select(".label-container");w&&L.append(function(){return w.node()});const m=F.select(".label");m&&L.append(function(){return m.node()})}}})}},v0={},E3=function(t){const e=Object.keys(t);for(const i of e)v0[i]=t[i]},C0=function(t,e,i,r,s,n){const a=r.select(`[id="${i}"]`);Object.keys(t).forEach(function(l){const h=t[l];let u="default";h.classes.length>0&&(u=h.classes.join(" "));const d=gs(h.styles);let f=h.text!==void 0?h.text:h.id,p;if(Ti(P().flowchart.htmlLabels)){const T={label:f.replace(/fa[blrs]?:fa-[\w-]+/g,S=>`<i class='${S.replace(":"," ")}'></i>`)};p=(0,Ke.a)(a,T).node(),p.parentNode.removeChild(p)}else{const T=s.createElementNS("http://www.w3.org/2000/svg","text");T.setAttribute("style",d.labelStyle.replace("color:","fill:"));const S=f.split(me.lineBreakRegex);for(const k of S){const I=s.createElementNS("http://www.w3.org/2000/svg","tspan");I.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),I.setAttribute("dy","1em"),I.setAttribute("x","1"),I.textContent=k,T.appendChild(I)}p=T}let b=0,_="";switch(h.type){case"round":b=5,_="rect";break;case"square":_="rect";break;case"diamond":_="question";break;case"hexagon":_="hexagon";break;case"odd":_="rect_left_inv_arrow";break;case"lean_right":_="lean_right";break;case"lean_left":_="lean_left";break;case"trapezoid":_="trapezoid";break;case"inv_trapezoid":_="inv_trapezoid";break;case"odd_right":_="rect_left_inv_arrow";break;case"circle":_="circle";break;case"ellipse":_="ellipse";break;case"stadium":_="stadium";break;case"subroutine":_="subroutine";break;case"cylinder":_="cylinder";break;case"group":_="rect";break;case"doublecircle":_="doublecircle";break;default:_="rect"}e.setNode(h.id,{labelStyle:d.labelStyle,shape:_,labelText:f,rx:b,ry:b,class:u,style:d.style,id:h.id,link:h.link,linkTarget:h.linkTarget,tooltip:n.db.getTooltip(h.id)||"",domId:n.db.lookUpDomId(h.id),haveCallback:h.haveCallback,width:h.type==="group"?500:void 0,dir:h.dir,type:h.type,props:h.props,padding:P().flowchart.padding}),E.info("setNode",{labelStyle:d.labelStyle,shape:_,labelText:f,rx:b,ry:b,class:u,style:d.style,id:h.id,domId:n.db.lookUpDomId(h.id),width:h.type==="group"?500:void 0,type:h.type,dir:h.dir,props:h.props,padding:P().flowchart.padding})})},T0=function(t,e,i){E.info("abc78 edges = ",t);let r=0,s={},n,a;if(t.defaultStyle!==void 0){const o=gs(t.defaultStyle);n=o.style,a=o.labelStyle}t.forEach(function(o){r++;var l="L-"+o.start+"-"+o.end;s[l]===void 0?(s[l]=0,E.info("abc78 new entry",l,s[l])):(s[l]++,E.info("abc78 new entry",l,s[l]));let h=l+"-"+s[l];E.info("abc78 new link id to be used is",l,h,s[l]);var u="LS-"+o.start,d="LE-"+o.end;const f={style:"",labelStyle:""};switch(f.minlen=o.length||1,o.type==="arrow_open"?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle";break}let p="",b="";switch(o.stroke){case"normal":p="fill:none;",n!==void 0&&(p=n),a!==void 0&&(b=a),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;";break}if(o.style!==void 0){const _=gs(o.style);p=_.style,b=_.labelStyle}f.style=f.style+=p,f.labelStyle=f.labelStyle+=b,o.interpolate!==void 0?f.curve=Nr(o.interpolate,Q.c_6):t.defaultInterpolate!==void 0?f.curve=Nr(t.defaultInterpolate,Q.c_6):f.curve=Nr(v0.curve,Q.c_6),o.text===void 0?o.style!==void 0&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType="text",f.label=o.text.replace(me.lineBreakRegex,`
1330
+ `),o.style===void 0&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=h,f.classes="flowchart-link "+u+" "+d,e.setEdge(o.start,o.end,f,r)})},Ol={setConf:E3,addVertices:C0,addEdges:T0,getClasses:function(t,e){E.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(i){return}},draw:function(t,e,i,r){E.info("Drawing flowchart"),r.db.clear(),os.setGen("gen-2"),r.parser.parse(t);let s=r.db.getDirection();s===void 0&&(s="TD");const{securityLevel:n,flowchart:a}=P(),o=a.nodeSpacing||50,l=a.rankSpacing||50;let h;n==="sandbox"&&(h=(0,Q.Ys)("#i"+e));const u=n==="sandbox"?(0,Q.Ys)(h.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),d=n==="sandbox"?h.nodes()[0].contentDocument:document,f=new Be.k({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:o,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let p;const b=r.db.getSubGraphs();E.info("Subgraphs - ",b);for(let H=b.length-1;H>=0;H--)p=b[H],E.info("Subgraph - ",p),r.db.addVertex(p.id,p.title,"group",void 0,p.classes,p.dir);const _=r.db.getVertices(),T=r.db.getEdges();E.info("Edges",T);let S=0;for(S=b.length-1;S>=0;S--){p=b[S],(0,Q.td_)("cluster").append("text");for(let H=0;H<p.nodes.length;H++)E.info("Setting up subgraphs",p.nodes[H],p.id),f.setParent(p.nodes[H],p.id)}C0(_,f,e,u,d,r),T0(T,f);const k=u.select(`[id="${e}"]`),I=u.select("#"+e+" g");if(wl(I,f,["point","circle","cross"],"flowchart",e),xe.insertTitle(k,"flowchartTitleText",a.titleTopMargin,r.db.getDiagramTitle()),Gn(f,k,a.diagramPadding,a.useMaxWidth),r.db.indexNodes("subGraph"+S),!a.htmlLabels){const H=d.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const rt of H){const R=rt.getBBox(),F=d.createElementNS("http://www.w3.org/2000/svg","rect");F.setAttribute("rx",0),F.setAttribute("ry",0),F.setAttribute("width",R.width),F.setAttribute("height",R.height),rt.insertBefore(F,rt.firstChild)}}Object.keys(_).forEach(function(H){const rt=_[H];if(rt.link){const R=(0,Q.Ys)("#"+e+' [id="'+H+'"]');if(R){const F=d.createElementNS("http://www.w3.org/2000/svg","a");F.setAttributeNS("http://www.w3.org/2000/svg","class",rt.classes.join(" ")),F.setAttributeNS("http://www.w3.org/2000/svg","href",rt.link),F.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n==="sandbox"?F.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):rt.linkTarget&&F.setAttributeNS("http://www.w3.org/2000/svg","target",rt.linkTarget);const v=R.insert(function(){return F},":first-child"),L=R.select(".label-container");L&&v.append(function(){return L.node()});const w=R.select(".label");w&&v.append(function(){return w.node()})}}})}};var Fl=function(){var t=function(F,v,L,w){for(L=L||{},w=F.length;w--;L[F[w]]=v);return L},e=[1,3],i=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],s=[1,15],n=[1,16],a=[1,17],o=[1,18],l=[1,19],h=[1,20],u=[1,21],d=[1,22],f=[1,23],p=[1,24],b=[1,25],_=[1,26],T=[1,27],S=[1,29],k=[1,31],I=[1,34],z=[5,7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],H={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,tickInterval:16,excludes:17,includes:18,todayMarker:19,title:20,acc_title:21,acc_title_value:22,acc_descr:23,acc_descr_value:24,acc_descr_multiline_value:25,section:26,clickStatement:27,taskTxt:28,taskData:29,openDirective:30,typeDirective:31,closeDirective:32,":":33,argDirective:34,click:35,callbackname:36,callbackargs:37,href:38,clickStatementDebug:39,open_directive:40,type_directive:41,arg_directive:42,close_directive:43,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"tickInterval",17:"excludes",18:"includes",19:"todayMarker",20:"title",21:"acc_title",22:"acc_title_value",23:"acc_descr",24:"acc_descr_value",25:"acc_descr_multiline_value",26:"section",28:"taskTxt",29:"taskData",33:":",35:"click",36:"callbackname",37:"callbackargs",38:"href",40:"open_directive",41:"type_directive",42:"arg_directive",43:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[27,2],[27,3],[27,3],[27,4],[27,3],[27,4],[27,2],[39,2],[39,3],[39,3],[39,4],[39,3],[39,4],[39,2],[30,1],[31,1],[34,1],[32,1]],performAction:function(v,L,w,m,B,g,O){var y=g.length-1;switch(B){case 2:return g[y-1];case 3:this.$=[];break;case 4:g[y-1].push(g[y]),this.$=g[y-1];break;case 5:case 6:this.$=g[y];break;case 7:case 8:this.$=[];break;case 9:m.setDateFormat(g[y].substr(11)),this.$=g[y].substr(11);break;case 10:m.enableInclusiveEndDates(),this.$=g[y].substr(18);break;case 11:m.TopAxis(),this.$=g[y].substr(8);break;case 12:m.setAxisFormat(g[y].substr(11)),this.$=g[y].substr(11);break;case 13:m.setTickInterval(g[y].substr(13)),this.$=g[y].substr(13);break;case 14:m.setExcludes(g[y].substr(9)),this.$=g[y].substr(9);break;case 15:m.setIncludes(g[y].substr(9)),this.$=g[y].substr(9);break;case 16:m.setTodayMarker(g[y].substr(12)),this.$=g[y].substr(12);break;case 17:m.setDiagramTitle(g[y].substr(6)),this.$=g[y].substr(6);break;case 18:this.$=g[y].trim(),m.setAccTitle(this.$);break;case 19:case 20:this.$=g[y].trim(),m.setAccDescription(this.$);break;case 21:m.addSection(g[y].substr(8)),this.$=g[y].substr(8);break;case 23:m.addTask(g[y-1],g[y]),this.$="task";break;case 27:this.$=g[y-1],m.setClickEvent(g[y-1],g[y],null);break;case 28:this.$=g[y-2],m.setClickEvent(g[y-2],g[y-1],g[y]);break;case 29:this.$=g[y-2],m.setClickEvent(g[y-2],g[y-1],null),m.setLink(g[y-2],g[y]);break;case 30:this.$=g[y-3],m.setClickEvent(g[y-3],g[y-2],g[y-1]),m.setLink(g[y-3],g[y]);break;case 31:this.$=g[y-2],m.setClickEvent(g[y-2],g[y],null),m.setLink(g[y-2],g[y-1]);break;case 32:this.$=g[y-3],m.setClickEvent(g[y-3],g[y-1],g[y]),m.setLink(g[y-3],g[y-2]);break;case 33:this.$=g[y-1],m.setLink(g[y-1],g[y]);break;case 34:case 40:this.$=g[y-1]+" "+g[y];break;case 35:case 36:case 38:this.$=g[y-2]+" "+g[y-1]+" "+g[y];break;case 37:case 39:this.$=g[y-3]+" "+g[y-2]+" "+g[y-1]+" "+g[y];break;case 41:m.parseDirective("%%{","open_directive");break;case 42:m.parseDirective(g[y],"type_directive");break;case 43:g[y]=g[y].trim().replace(/'/g,'"'),m.parseDirective(g[y],"arg_directive");break;case 44:m.parseDirective("}%%","close_directive","gantt");break}},table:[{3:1,4:2,5:e,30:4,40:i},{1:[3]},{3:6,4:2,5:e,30:4,40:i},t(r,[2,3],{6:7}),{31:8,41:[1,9]},{41:[2,41]},{1:[2,1]},{4:30,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:s,13:n,14:a,15:o,16:l,17:h,18:u,19:d,20:f,21:p,23:b,25:_,26:T,27:28,28:S,30:4,35:k,40:i},{32:32,33:[1,33],43:I},t([33,43],[2,42]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:30,10:35,12:s,13:n,14:a,15:o,16:l,17:h,18:u,19:d,20:f,21:p,23:b,25:_,26:T,27:28,28:S,30:4,35:k,40:i},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,17]),{22:[1,36]},{24:[1,37]},t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),{29:[1,38]},t(r,[2,24]),{36:[1,39],38:[1,40]},{11:[1,41]},{34:42,42:[1,43]},{11:[2,44]},t(r,[2,5]),t(r,[2,18]),t(r,[2,19]),t(r,[2,23]),t(r,[2,27],{37:[1,44],38:[1,45]}),t(r,[2,33],{36:[1,46]}),t(z,[2,25]),{32:47,43:I},{43:[2,43]},t(r,[2,28],{38:[1,48]}),t(r,[2,29]),t(r,[2,31],{37:[1,49]}),{11:[1,50]},t(r,[2,30]),t(r,[2,32]),t(z,[2,26])],defaultActions:{5:[2,41],6:[2,1],34:[2,44],43:[2,43]},parseError:function(v,L){if(L.recoverable)this.trace(v);else{var w=new Error(v);throw w.hash=L,w}},parse:function(v){var L=this,w=[0],m=[],B=[null],g=[],O=this.table,y="",Y=0,Bt=0,J=2,nt=1,at=g.slice.call(arguments,1),it=Object.create(this.lexer),et={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(et.yy[Tt]=this.yy[Tt]);it.setInput(v,et.yy),et.yy.lexer=it,et.yy.parser=this,typeof it.yylloc=="undefined"&&(it.yylloc={});var xt=it.yylloc;g.push(xt);var Z=it.options&&it.options.ranges;typeof et.yy.parseError=="function"?this.parseError=et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function jt(){var Qt;return Qt=m.pop()||it.lex()||nt,typeof Qt!="number"&&(Qt instanceof Array&&(m=Qt,Qt=m.pop()),Qt=L.symbols_[Qt]||Qt),Qt}for(var U,gt,tt,K,N={},A,G,C,ft;;){if(gt=w[w.length-1],this.defaultActions[gt]?tt=this.defaultActions[gt]:((U===null||typeof U=="undefined")&&(U=jt()),tt=O[gt]&&O[gt][U]),typeof tt=="undefined"||!tt.length||!tt[0]){var x="";ft=[];for(A in O[gt])this.terminals_[A]&&A>J&&ft.push("'"+this.terminals_[A]+"'");it.showPosition?x="Parse error on line "+(Y+1)+`:
1331
+ `+it.showPosition()+`
1332
+ Expecting `+ft.join(", ")+", got '"+(this.terminals_[U]||U)+"'":x="Parse error on line "+(Y+1)+": Unexpected "+(U==nt?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(x,{text:it.match,token:this.terminals_[U]||U,line:it.yylineno,loc:xt,expected:ft})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+U);switch(tt[0]){case 1:w.push(U),B.push(it.yytext),g.push(it.yylloc),w.push(tt[1]),U=null,Bt=it.yyleng,y=it.yytext,Y=it.yylineno,xt=it.yylloc;break;case 2:if(G=this.productions_[tt[1]][1],N.$=B[B.length-G],N._$={first_line:g[g.length-(G||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(G||1)].first_column,last_column:g[g.length-1].last_column},Z&&(N._$.range=[g[g.length-(G||1)].range[0],g[g.length-1].range[1]]),K=this.performAction.apply(N,[y,Bt,Y,et.yy,tt[1],B,g].concat(at)),typeof K!="undefined")return K;G&&(w=w.slice(0,-1*G*2),B=B.slice(0,-1*G),g=g.slice(0,-1*G)),w.push(this.productions_[tt[1]][0]),B.push(N.$),g.push(N._$),C=O[w[w.length-2]][w[w.length-1]],w.push(C);break;case 3:return!0}}return!0}},rt=function(){var F={EOF:1,parseError:function(L,w){if(this.yy.parser)this.yy.parser.parseError(L,w);else throw new Error(L)},setInput:function(v,L){return this.yy=L||this.yy||{},this._input=v,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var L=v.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),v},unput:function(v){var L=v.length,w=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),w.length-1&&(this.yylineno-=w.length-1);var B=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:w?(w.length===m.length?this.yylloc.first_column:0)+m[m.length-w.length].length-w[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1333
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(v){this.unput(this.match.slice(v))},pastInput:function(){var v=this.matched.substr(0,this.matched.length-this.match.length);return(v.length>20?"...":"")+v.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var v=this.match;return v.length<20&&(v+=this._input.substr(0,20-v.length)),(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var v=this.pastInput(),L=new Array(v.length+1).join("-");return v+this.upcomingInput()+`
1334
+ `+L+"^"},test_match:function(v,L){var w,m,B;if(this.options.backtrack_lexer&&(B={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(B.yylloc.range=this.yylloc.range.slice(0))),m=v[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+v[0].length},this.yytext+=v[0],this.match+=v[0],this.matches=v,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(v[0].length),this.matched+=v[0],w=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),w)return w;if(this._backtrack){for(var g in B)this[g]=B[g];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var v,L,w,m;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),g=0;g<B.length;g++)if(w=this._input.match(this.rules[B[g]]),w&&(!L||w[0].length>L[0].length)){if(L=w,m=g,this.options.backtrack_lexer){if(v=this.test_match(w,B[g]),v!==!1)return v;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(v=this.test_match(L,B[m]),v!==!1?v:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1335
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var L=this.next();return L||this.lex()},begin:function(L){this.conditionStack.push(L)},popState:function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},pushState:function(L){this.begin(L)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(L,w,m,B){switch(m){case 0:return this.begin("open_directive"),40;case 1:return this.begin("type_directive"),41;case 2:return this.popState(),this.begin("arg_directive"),33;case 3:return this.popState(),this.popState(),43;case 4:return 42;case 5:return this.begin("acc_title"),21;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),23;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 38;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 36;case 26:this.popState();break;case 27:return 37;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 35;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 16;case 37:return 18;case 38:return 17;case 39:return 19;case 40:return"date";case 41:return 20;case 42:return"accDescription";case 43:return 26;case 44:return 28;case 45:return 29;case 46:return 33;case 47:return 7;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};return F}();H.lexer=rt;function R(){this.yy={}}return R.prototype=H,H.Parser=R,new R}();Fl.parser=Fl;const v3=Fl,C3=t=>t.match(/^\s*gantt/)!==null;oi().extend(Ms()),oi().extend(Ci()),oi().extend(Ri());let ls="",Ml="",Pl,Vl="",ha=[],ua=[],Yl={},zl=[],ko=[],An="";const S0=["active","done","crit","milestone"];let Wl=[],da=!1,Ul=!1,Zl=0;const T3=function(t,e,i){ii.parseDirective(this,t,e,i)},S3=function(){zl=[],ko=[],An="",Wl=[],_o=0,Gl=void 0,Eo=void 0,Li=[],ls="",Ml="",Pl=void 0,Vl="",ha=[],ua=[],da=!1,Ul=!1,Zl=0,Yl={},ur()},w3=function(t){Ml=t},A3=function(){return Ml},L3=function(t){Pl=t},B3=function(){return Pl},I3=function(t){Vl=t},D3=function(){return Vl},R3=function(t){ls=t},N3=function(){da=!0},O3=function(){return da},F3=function(){Ul=!0},M3=function(){return Ul},P3=function(){return ls},V3=function(t){ha=t.toLowerCase().split(/[\s,]+/)},Y3=function(){return ha},z3=function(t){ua=t.toLowerCase().split(/[\s,]+/)},W3=function(){return ua},U3=function(){return Yl},Z3=function(t){An=t,zl.push(t)},H3=function(){return zl},G3=function(){let t=D0();const e=10;let i=0;for(;!t&&i<e;)t=D0(),i++;return ko=Li,ko},w0=function(t,e,i,r){return r.includes(t.format(e.trim()))?!1:t.isoWeekday()>=6&&i.includes("weekends")||i.includes(t.format("dddd").toLowerCase())?!0:i.includes(t.format(e.trim()))},A0=function(t,e,i,r){if(!i.length||t.manualEndTime)return;let s;t.startTime instanceof Date?s=oi()(t.startTime):s=oi()(t.startTime,e,!0),s=s.add(1,"d");let n;t.endTime instanceof Date?n=oi()(t.endTime):n=oi()(t.endTime,e,!0);const[a,o]=j3(s,n,e,i,r);t.endTime=a.toDate(),t.renderEndTime=o},j3=function(t,e,i,r,s){let n=!1,a=null;for(;t<=e;)n||(a=e.toDate()),n=w0(t,i,r,s),n&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},Hl=function(t,e,i){i=i.trim();const s=/^after\s+([\d\w- ]+)/.exec(i.trim());if(s!==null){let a=null;if(s[1].split(" ").forEach(function(o){let l=Bn(o);l!==void 0&&(a?l.endTime>a.endTime&&(a=l):a=l)}),a)return a.endTime;{const o=new Date;return o.setHours(0,0,0,0),o}}let n=oi()(i,e.trim(),!0);if(n.isValid())return n.toDate();{E.debug("Invalid date:"+i),E.debug("With date format:"+e.trim());const a=new Date(i);if(a===void 0||isNaN(a.getTime()))throw new Error("Invalid date:"+i);return a}},L0=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},B0=function(t,e,i,r=!1){i=i.trim();let s=oi()(i,e.trim(),!0);if(s.isValid())return r&&(s=s.add(1,"d")),s.toDate();let n=oi()(t);const[a,o]=L0(i);if(!Number.isNaN(a)){const l=n.add(a,o);l.isValid()&&(n=l)}return n.toDate()};let _o=0;const Ln=function(t){return t===void 0?(_o=_o+1,"task"+_o):t},q3=function(t,e){let i;e.substr(0,1)===":"?i=e.substr(1,e.length):i=e;const r=i.split(","),s={};O0(r,s,S0);for(let a=0;a<r.length;a++)r[a]=r[a].trim();let n="";switch(r.length){case 1:s.id=Ln(),s.startTime=t.endTime,n=r[0];break;case 2:s.id=Ln(),s.startTime=Hl(void 0,ls,r[0]),n=r[1];break;case 3:s.id=Ln(r[0]),s.startTime=Hl(void 0,ls,r[1]),n=r[2];break}return n&&(s.endTime=B0(s.startTime,ls,n,da),s.manualEndTime=oi()(n,"YYYY-MM-DD",!0).isValid(),A0(s,ls,ua,ha)),s},X3=function(t,e){let i;e.substr(0,1)===":"?i=e.substr(1,e.length):i=e;const r=i.split(","),s={};O0(r,s,S0);for(let n=0;n<r.length;n++)r[n]=r[n].trim();switch(r.length){case 1:s.id=Ln(),s.startTime={type:"prevTaskEnd",id:t},s.endTime={data:r[0]};break;case 2:s.id=Ln(),s.startTime={type:"getStartDate",startData:r[0]},s.endTime={data:r[1]};break;case 3:s.id=Ln(r[0]),s.startTime={type:"getStartDate",startData:r[1]},s.endTime={data:r[2]};break}return s};let Gl,Eo,Li=[];const I0={},K3=function(t,e){const i={section:An,type:An,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=X3(Eo,e);i.raw.startTime=r.startTime,i.raw.endTime=r.endTime,i.id=r.id,i.prevTaskId=Eo,i.active=r.active,i.done=r.done,i.crit=r.crit,i.milestone=r.milestone,i.order=Zl,Zl++;const s=Li.push(i);Eo=i.id,I0[i.id]=s-1},Bn=function(t){const e=I0[t];return Li[e]},Q3=function(t,e){const i={section:An,type:An,description:t,task:t,classes:[]},r=q3(Gl,e);i.startTime=r.startTime,i.endTime=r.endTime,i.id=r.id,i.active=r.active,i.done=r.done,i.crit=r.crit,i.milestone=r.milestone,Gl=i,ko.push(i)},D0=function(){const t=function(i){const r=Li[i];let s="";switch(Li[i].raw.startTime.type){case"prevTaskEnd":{const n=Bn(r.prevTaskId);r.startTime=n.endTime;break}case"getStartDate":s=Hl(void 0,ls,Li[i].raw.startTime.startData),s&&(Li[i].startTime=s);break}return Li[i].startTime&&(Li[i].endTime=B0(Li[i].startTime,ls,Li[i].raw.endTime.data,da),Li[i].endTime&&(Li[i].processed=!0,Li[i].manualEndTime=oi()(Li[i].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),A0(Li[i],ls,ua,ha))),Li[i].processed};let e=!0;for(const[i,r]of Li.entries())t(i),e=e&&r.processed;return e},J3=function(t,e){let i=e;P().securityLevel!=="loose"&&(i=(0,Vi.Nm)(e)),t.split(",").forEach(function(r){Bn(r)!==void 0&&(N0(r,()=>{window.open(i,"_self")}),Yl[r]=i)}),R0(t,"clickable")},R0=function(t,e){t.split(",").forEach(function(i){let r=Bn(i);r!==void 0&&r.classes.push(e)})},$3=function(t,e,i){if(P().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof i=="string"){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let n=0;n<r.length;n++){let a=r[n].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),r[n]=a}}r.length===0&&r.push(t),Bn(t)!==void 0&&N0(t,()=>{xe.runFunc(e,...r)})},N0=function(t,e){Wl.push(function(){const i=document.querySelector(`[id="${t}"]`);i!==null&&i.addEventListener("click",function(){e()})},function(){const i=document.querySelector(`[id="${t}-text"]`);i!==null&&i.addEventListener("click",function(){e()})})},jl={parseDirective:T3,getConfig:()=>P().gantt,clear:S3,setDateFormat:R3,getDateFormat:P3,enableInclusiveEndDates:N3,endDatesAreInclusive:O3,enableTopAxis:F3,topAxisEnabled:M3,setAxisFormat:w3,getAxisFormat:A3,setTickInterval:L3,getTickInterval:B3,setTodayMarker:I3,getTodayMarker:D3,setAccTitle:dr,getAccTitle:vr,setDiagramTitle:Ur,getDiagramTitle:Zr,setAccDescription:Cr,getAccDescription:Tr,addSection:Z3,getSections:H3,getTasks:G3,addTask:K3,findTaskById:Bn,addTaskOrg:Q3,setIncludes:V3,getIncludes:Y3,setExcludes:z3,getExcludes:W3,setClickEvent:function(t,e,i){t.split(",").forEach(function(r){$3(r,e,i)}),R0(t,"clickable")},setLink:J3,getLinks:U3,bindFunctions:function(t){Wl.forEach(function(e){e(t)})},parseDuration:L0,isInvalidDate:w0};function O0(t,e,i){let r=!0;for(;r;)r=!1,i.forEach(function(s){const n="^\\s*"+s+"\\s*$",a=new RegExp(n);t[0].match(a)&&(e[s]=!0,t.shift(1),r=!0)})}const t4=function(){E.debug("Something is calling, setConf, remove the call")};let Es;const e4={setConf:t4,draw:function(t,e,i,r){const s=P().gantt,n=P().securityLevel;let a;n==="sandbox"&&(a=(0,Q.Ys)("#i"+e));const o=n==="sandbox"?(0,Q.Ys)(a.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document,h=l.getElementById(e);Es=h.parentElement.offsetWidth,Es===void 0&&(Es=1200),s.useWidth!==void 0&&(Es=s.useWidth);const u=r.db.getTasks(),d=u.length*(s.barHeight+s.barGap)+2*s.topPadding;h.setAttribute("viewBox","0 0 "+Es+" "+d);const f=o.select(`[id="${e}"]`),p=(0,Q.Xf)().domain([(0,Q.VV$)(u,function(L){return L.startTime}),(0,Q.Fp7)(u,function(L){return L.endTime})]).rangeRound([0,Es-s.leftPadding-s.rightPadding]);let b=[];for(const L of u)b.push(L.type);const _=b;b=R(b);function T(L,w){const m=L.startTime,B=w.startTime;let g=0;return m>B?g=1:m<B&&(g=-1),g}u.sort(T),S(u,Es,d),Wr(f,d,Es,s.useMaxWidth),f.append("text").text(r.db.getDiagramTitle()).attr("x",Es/2).attr("y",s.titleTopMargin).attr("class","titleText");function S(L,w,m){const B=s.barHeight,g=B+s.barGap,O=s.topPadding,y=s.leftPadding,Y=(0,Q.BYU)().domain([0,b.length]).range(["#00B9FA","#F95002"]).interpolate(Q.JHv);I(g,O,y,w,m,L,r.db.getExcludes(),r.db.getIncludes()),z(y,O,w,m),k(L,g,O,y,B,Y,w),H(g,O),rt(y,O,w,m)}function k(L,w,m,B,g,O,y){f.append("g").selectAll("rect").data(L).enter().append("rect").attr("x",0).attr("y",function(nt,at){return at=nt.order,at*w+m-2}).attr("width",function(){return y-s.rightPadding/2}).attr("height",w).attr("class",function(nt){for(const[at,it]of b.entries())if(nt.type===it)return"section section"+at%s.numberSectionStyles;return"section section0"});const Y=f.append("g").selectAll("rect").data(L).enter(),Bt=r.db.getLinks();if(Y.append("rect").attr("id",function(nt){return nt.id}).attr("rx",3).attr("ry",3).attr("x",function(nt){return nt.milestone?p(nt.startTime)+B+.5*(p(nt.endTime)-p(nt.startTime))-.5*g:p(nt.startTime)+B}).attr("y",function(nt,at){return at=nt.order,at*w+m}).attr("width",function(nt){return nt.milestone?g:p(nt.renderEndTime||nt.endTime)-p(nt.startTime)}).attr("height",g).attr("transform-origin",function(nt,at){return at=nt.order,(p(nt.startTime)+B+.5*(p(nt.endTime)-p(nt.startTime))).toString()+"px "+(at*w+m+.5*g).toString()+"px"}).attr("class",function(nt){const at="task";let it="";nt.classes.length>0&&(it=nt.classes.join(" "));let et=0;for(const[xt,Z]of b.entries())nt.type===Z&&(et=xt%s.numberSectionStyles);let Tt="";return nt.active?nt.crit?Tt+=" activeCrit":Tt=" active":nt.done?nt.crit?Tt=" doneCrit":Tt=" done":nt.crit&&(Tt+=" crit"),Tt.length===0&&(Tt=" task"),nt.milestone&&(Tt=" milestone "+Tt),Tt+=et,Tt+=" "+it,at+Tt}),Y.append("text").attr("id",function(nt){return nt.id+"-text"}).text(function(nt){return nt.task}).attr("font-size",s.fontSize).attr("x",function(nt){let at=p(nt.startTime),it=p(nt.renderEndTime||nt.endTime);nt.milestone&&(at+=.5*(p(nt.endTime)-p(nt.startTime))-.5*g),nt.milestone&&(it=at+g);const et=this.getBBox().width;return et>it-at?it+et+1.5*s.leftPadding>y?at+B-5:it+B+5:(it-at)/2+at+B}).attr("y",function(nt,at){return at=nt.order,at*w+s.barHeight/2+(s.fontSize/2-2)+m}).attr("text-height",g).attr("class",function(nt){const at=p(nt.startTime);let it=p(nt.endTime);nt.milestone&&(it=at+g);const et=this.getBBox().width;let Tt="";nt.classes.length>0&&(Tt=nt.classes.join(" "));let xt=0;for(const[jt,U]of b.entries())nt.type===U&&(xt=jt%s.numberSectionStyles);let Z="";return nt.active&&(nt.crit?Z="activeCritText"+xt:Z="activeText"+xt),nt.done?nt.crit?Z=Z+" doneCritText"+xt:Z=Z+" doneText"+xt:nt.crit&&(Z=Z+" critText"+xt),nt.milestone&&(Z+=" milestoneText"),et>it-at?it+et+1.5*s.leftPadding>y?Tt+" taskTextOutsideLeft taskTextOutside"+xt+" "+Z:Tt+" taskTextOutsideRight taskTextOutside"+xt+" "+Z+" width-"+et:Tt+" taskText taskText"+xt+" "+Z+" width-"+et}),P().securityLevel==="sandbox"){let nt;nt=(0,Q.Ys)("#i"+e);const at=nt.nodes()[0].contentDocument;Y.filter(function(it){return Bt[it.id]!==void 0}).each(function(it){var et=at.querySelector("#"+it.id),Tt=at.querySelector("#"+it.id+"-text");const xt=et.parentNode;var Z=at.createElement("a");Z.setAttribute("xlink:href",Bt[it.id]),Z.setAttribute("target","_top"),xt.appendChild(Z),Z.appendChild(et),Z.appendChild(Tt)})}}function I(L,w,m,B,g,O,y,Y){const Bt=O.reduce((xt,{startTime:Z})=>xt?Math.min(xt,Z):Z,0),J=O.reduce((xt,{endTime:Z})=>xt?Math.max(xt,Z):Z,0),nt=r.db.getDateFormat();if(!Bt||!J)return;const at=[];let it=null,et=oi()(Bt);for(;et.valueOf()<=J;)r.db.isInvalidDate(et,nt,y,Y)?it?it.end=et:it={start:et,end:et}:it&&(at.push(it),it=null),et=et.add(1,"d");f.append("g").selectAll("rect").data(at).enter().append("rect").attr("id",function(xt){return"exclude-"+xt.start.format("YYYY-MM-DD")}).attr("x",function(xt){return p(xt.start)+m}).attr("y",s.gridLineStartPadding).attr("width",function(xt){const Z=xt.end.add(1,"day");return p(Z)-p(xt.start)}).attr("height",g-w-s.gridLineStartPadding).attr("transform-origin",function(xt,Z){return(p(xt.start)+m+.5*(p(xt.end)-p(xt.start))).toString()+"px "+(Z*L+.5*g).toString()+"px"}).attr("class","exclude-range")}function z(L,w,m,B){let g=(0,Q.LLu)(p).tickSize(-B+w+s.gridLineStartPadding).tickFormat((0,Q.i$Z)(r.db.getAxisFormat()||s.axisFormat||"%Y-%m-%d"));const y=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||s.tickInterval);if(y!==null){const Y=y[1];switch(y[2]){case"minute":g.ticks(Q.Z_i.every(Y));break;case"hour":g.ticks(Q.WQD.every(Y));break;case"day":g.ticks(Q.rr1.every(Y));break;case"week":g.ticks(Q.NGh.every(Y));break;case"month":g.ticks(Q.F0B.every(Y));break}}if(f.append("g").attr("class","grid").attr("transform","translate("+L+", "+(B-50)+")").call(g).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||s.topAxis){let Y=(0,Q.F5q)(p).tickSize(-B+w+s.gridLineStartPadding).tickFormat((0,Q.i$Z)(r.db.getAxisFormat()||s.axisFormat||"%Y-%m-%d"));if(y!==null){const Bt=y[1];switch(y[2]){case"minute":Y.ticks(Q.Z_i.every(Bt));break;case"hour":Y.ticks(Q.WQD.every(Bt));break;case"day":Y.ticks(Q.rr1.every(Bt));break;case"week":Y.ticks(Q.NGh.every(Bt));break;case"month":Y.ticks(Q.F0B.every(Bt));break}}f.append("g").attr("class","grid").attr("transform","translate("+L+", "+w+")").call(Y).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function H(L,w){const m=[];let B=0;for(const[g,O]of b.entries())m[g]=[O,v(O,_)];f.append("g").selectAll("text").data(m).enter().append(function(g){const O=g[0].split(me.lineBreakRegex),y=-(O.length-1)/2,Y=l.createElementNS("http://www.w3.org/2000/svg","text");Y.setAttribute("dy",y+"em");for(const[Bt,J]of O.entries()){const nt=l.createElementNS("http://www.w3.org/2000/svg","tspan");nt.setAttribute("alignment-baseline","central"),nt.setAttribute("x","10"),Bt>0&&nt.setAttribute("dy","1em"),nt.textContent=J,Y.appendChild(nt)}return Y}).attr("x",10).attr("y",function(g,O){if(O>0)for(let y=0;y<O;y++)return B+=m[O-1][1],g[1]*L/2+B*L+w;else return g[1]*L/2+w}).attr("font-size",s.sectionFontSize).attr("font-size",s.sectionFontSize).attr("class",function(g){for(const[O,y]of b.entries())if(g[0]===y)return"sectionTitle sectionTitle"+O%s.numberSectionStyles;return"sectionTitle"})}function rt(L,w,m,B){const g=r.db.getTodayMarker();if(g==="off")return;const O=f.append("g").attr("class","today"),y=new Date,Y=O.append("line");Y.attr("x1",p(y)+L).attr("x2",p(y)+L).attr("y1",s.titleTopMargin).attr("y2",B-s.titleTopMargin).attr("class","today"),g!==""&&Y.attr("style",g.replace(/,/g,";"))}function R(L){const w={},m=[];for(let B=0,g=L.length;B<g;++B)Object.prototype.hasOwnProperty.call(w,L[B])||(w[L[B]]=!0,m.push(L[B]));return m}function F(L){let w=L.length;const m={};for(;w;)m[L[--w]]=(m[L[w]]||0)+1;return m}function v(L,w){return F(w)[L]||0}}};var ql=function(){var t=function(n,a,o,l){for(o=o||{},l=n.length;l--;o[n[l]]=a);return o},e=[6,9,10],i={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(a,o,l,h,u,d,f){switch(d.length-1,u){case 1:return h;case 4:break;case 6:h.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(a,o){if(o.recoverable)this.trace(a);else{var l=new Error(a);throw l.hash=o,l}},parse:function(a){var o=this,l=[0],h=[],u=[null],d=[],f=this.table,p="",b=0,_=0,T=2,S=1,k=d.slice.call(arguments,1),I=Object.create(this.lexer),z={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(z.yy[H]=this.yy[H]);I.setInput(a,z.yy),z.yy.lexer=I,z.yy.parser=this,typeof I.yylloc=="undefined"&&(I.yylloc={});var rt=I.yylloc;d.push(rt);var R=I.options&&I.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function F(){var J;return J=h.pop()||I.lex()||S,typeof J!="number"&&(J instanceof Array&&(h=J,J=h.pop()),J=o.symbols_[J]||J),J}for(var v,L,w,m,B={},g,O,y,Y;;){if(L=l[l.length-1],this.defaultActions[L]?w=this.defaultActions[L]:((v===null||typeof v=="undefined")&&(v=F()),w=f[L]&&f[L][v]),typeof w=="undefined"||!w.length||!w[0]){var Bt="";Y=[];for(g in f[L])this.terminals_[g]&&g>T&&Y.push("'"+this.terminals_[g]+"'");I.showPosition?Bt="Parse error on line "+(b+1)+`:
1336
+ `+I.showPosition()+`
1337
+ Expecting `+Y.join(", ")+", got '"+(this.terminals_[v]||v)+"'":Bt="Parse error on line "+(b+1)+": Unexpected "+(v==S?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(Bt,{text:I.match,token:this.terminals_[v]||v,line:I.yylineno,loc:rt,expected:Y})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+v);switch(w[0]){case 1:l.push(v),u.push(I.yytext),d.push(I.yylloc),l.push(w[1]),v=null,_=I.yyleng,p=I.yytext,b=I.yylineno,rt=I.yylloc;break;case 2:if(O=this.productions_[w[1]][1],B.$=u[u.length-O],B._$={first_line:d[d.length-(O||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(O||1)].first_column,last_column:d[d.length-1].last_column},R&&(B._$.range=[d[d.length-(O||1)].range[0],d[d.length-1].range[1]]),m=this.performAction.apply(B,[p,_,b,z.yy,w[1],u,d].concat(k)),typeof m!="undefined")return m;O&&(l=l.slice(0,-1*O*2),u=u.slice(0,-1*O),d=d.slice(0,-1*O)),l.push(this.productions_[w[1]][0]),u.push(B.$),d.push(B._$),y=f[l[l.length-2]][l[l.length-1]],l.push(y);break;case 3:return!0}}return!0}},r=function(){var n={EOF:1,parseError:function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},setInput:function(a,o){return this.yy=o||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var o=a.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var o=a.length,l=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var h=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===h.length?this.yylloc.first_column:0)+h[h.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1338
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),o=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
1339
+ `+o+"^"},test_match:function(a,o){var l,h,u;if(this.options.backtrack_lexer&&(u={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(u.yylloc.range=this.yylloc.range.slice(0))),h=a[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var d in u)this[d]=u[d];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,o,l,h;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),d=0;d<u.length;d++)if(l=this._input.match(this.rules[u[d]]),l&&(!o||l[0].length>o[0].length)){if(o=l,h=d,this.options.backtrack_lexer){if(a=this.test_match(l,u[d]),a!==!1)return a;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(a=this.test_match(o,u[h]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1340
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,l,h,u){switch(h){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return n}();i.lexer=r;function s(){this.yy={}}return s.prototype=i,i.Parser=s,new s}();ql.parser=ql;const i4=ql;var F0="",M0=!1;const r4={setMessage:t=>{E.debug("Setting message to: "+t),F0=t},getMessage:()=>F0,setInfo:t=>{M0=t},getInfo:()=>M0,clear:ur},s4={draw:(t,e,i)=>{try{E.debug(`Rendering info diagram
1341
+ `+t);const r=P().securityLevel;let s;r==="sandbox"&&(s=(0,Q.Ys)("#i"+e));const a=(r==="sandbox"?(0,Q.Ys)(s.nodes()[0].contentDocument.body):(0,Q.Ys)("body")).select("#"+e);a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+i),a.attr("height",100),a.attr("width",400)}catch(r){E.error("Error while rendering info diagram"),E.error(r.message)}}},n4=t=>t.match(/^\s*info/)!==null;var Xl=function(){var t=function(rt,R,F,v){for(F=F||{},v=rt.length;v--;F[rt[v]]=R);return F},e=[1,4],i=[1,5],r=[1,6],s=[1,7],n=[1,9],a=[1,11,13,15,17,19,20,26,27,28,29],o=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],h=[26,27,28],u=[2,8],d=[1,18],f=[1,19],p=[1,20],b=[1,21],_=[1,22],T=[1,23],S=[1,28],k=[6,26,27,28,29],I={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(R,F,v,L,w,m,B){var g=m.length-1;switch(w){case 4:L.setShowData(!0);break;case 7:this.$=m[g-1];break;case 9:L.addSection(m[g-1],L.cleanupValue(m[g]));break;case 10:this.$=m[g].trim(),L.setDiagramTitle(this.$);break;case 11:this.$=m[g].trim(),L.setAccTitle(this.$);break;case 12:case 13:this.$=m[g].trim(),L.setAccDescription(this.$);break;case 14:L.addSection(m[g].substr(8)),this.$=m[g].substr(8);break;case 21:L.parseDirective("%%{","open_directive");break;case 22:L.parseDirective(m[g],"type_directive");break;case 23:m[g]=m[g].trim().replace(/'/g,'"'),L.parseDirective(m[g],"arg_directive");break;case 24:L.parseDirective("}%%","close_directive","pie");break}},table:[{3:1,4:2,5:3,6:e,21:8,26:i,27:r,28:s,29:n},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:i,27:r,28:s,29:n},{3:11,4:2,5:3,6:e,21:8,26:i,27:r,28:s,29:n},t(a,o,{7:12,8:[1,13]}),t(l,[2,18]),t(l,[2,19]),t(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(h,u,{21:8,9:16,10:17,5:24,1:[2,3],11:d,13:f,15:p,17:b,19:_,20:T,29:n}),t(a,o,{7:25}),{23:26,24:[1,27],32:S},t([24,32],[2,22]),t(a,[2,6]),{4:29,26:i,27:r,28:s},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(h,[2,13]),t(h,[2,14]),t(h,[2,15]),t(h,u,{21:8,9:16,10:17,5:24,1:[2,4],11:d,13:f,15:p,17:b,19:_,20:T,29:n}),t(k,[2,16]),{25:34,31:[1,35]},t(k,[2,24]),t(a,[2,7]),t(h,[2,9]),t(h,[2,10]),t(h,[2,11]),t(h,[2,12]),{23:36,32:S},{32:[2,23]},t(k,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(R,F){if(F.recoverable)this.trace(R);else{var v=new Error(R);throw v.hash=F,v}},parse:function(R){var F=this,v=[0],L=[],w=[null],m=[],B=this.table,g="",O=0,y=0,Y=2,Bt=1,J=m.slice.call(arguments,1),nt=Object.create(this.lexer),at={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(at.yy[it]=this.yy[it]);nt.setInput(R,at.yy),at.yy.lexer=nt,at.yy.parser=this,typeof nt.yylloc=="undefined"&&(nt.yylloc={});var et=nt.yylloc;m.push(et);var Tt=nt.options&&nt.options.ranges;typeof at.yy.parseError=="function"?this.parseError=at.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function xt(){var ft;return ft=L.pop()||nt.lex()||Bt,typeof ft!="number"&&(ft instanceof Array&&(L=ft,ft=L.pop()),ft=F.symbols_[ft]||ft),ft}for(var Z,jt,U,gt,tt={},K,N,A,G;;){if(jt=v[v.length-1],this.defaultActions[jt]?U=this.defaultActions[jt]:((Z===null||typeof Z=="undefined")&&(Z=xt()),U=B[jt]&&B[jt][Z]),typeof U=="undefined"||!U.length||!U[0]){var C="";G=[];for(K in B[jt])this.terminals_[K]&&K>Y&&G.push("'"+this.terminals_[K]+"'");nt.showPosition?C="Parse error on line "+(O+1)+`:
1342
+ `+nt.showPosition()+`
1343
+ Expecting `+G.join(", ")+", got '"+(this.terminals_[Z]||Z)+"'":C="Parse error on line "+(O+1)+": Unexpected "+(Z==Bt?"end of input":"'"+(this.terminals_[Z]||Z)+"'"),this.parseError(C,{text:nt.match,token:this.terminals_[Z]||Z,line:nt.yylineno,loc:et,expected:G})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+jt+", token: "+Z);switch(U[0]){case 1:v.push(Z),w.push(nt.yytext),m.push(nt.yylloc),v.push(U[1]),Z=null,y=nt.yyleng,g=nt.yytext,O=nt.yylineno,et=nt.yylloc;break;case 2:if(N=this.productions_[U[1]][1],tt.$=w[w.length-N],tt._$={first_line:m[m.length-(N||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(N||1)].first_column,last_column:m[m.length-1].last_column},Tt&&(tt._$.range=[m[m.length-(N||1)].range[0],m[m.length-1].range[1]]),gt=this.performAction.apply(tt,[g,y,O,at.yy,U[1],w,m].concat(J)),typeof gt!="undefined")return gt;N&&(v=v.slice(0,-1*N*2),w=w.slice(0,-1*N),m=m.slice(0,-1*N)),v.push(this.productions_[U[1]][0]),w.push(tt.$),m.push(tt._$),A=B[v[v.length-2]][v[v.length-1]],v.push(A);break;case 3:return!0}}return!0}},z=function(){var rt={EOF:1,parseError:function(F,v){if(this.yy.parser)this.yy.parser.parseError(F,v);else throw new Error(F)},setInput:function(R,F){return this.yy=F||this.yy||{},this._input=R,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var R=this._input[0];this.yytext+=R,this.yyleng++,this.offset++,this.match+=R,this.matched+=R;var F=R.match(/(?:\r\n?|\n).*/g);return F?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),R},unput:function(R){var F=R.length,v=R.split(/(?:\r\n?|\n)/g);this._input=R+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-F),this.offset-=F;var L=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===L.length?this.yylloc.first_column:0)+L[L.length-v.length].length-v[0].length:this.yylloc.first_column-F},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-F]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1344
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(R){this.unput(this.match.slice(R))},pastInput:function(){var R=this.matched.substr(0,this.matched.length-this.match.length);return(R.length>20?"...":"")+R.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var R=this.match;return R.length<20&&(R+=this._input.substr(0,20-R.length)),(R.substr(0,20)+(R.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var R=this.pastInput(),F=new Array(R.length+1).join("-");return R+this.upcomingInput()+`
1345
+ `+F+"^"},test_match:function(R,F){var v,L,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),L=R[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+R[0].length},this.yytext+=R[0],this.match+=R[0],this.matches=R,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(R[0].length),this.matched+=R[0],v=this.performAction.call(this,this.yy,this,F,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var m in w)this[m]=w[m];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var R,F,v,L;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),m=0;m<w.length;m++)if(v=this._input.match(this.rules[w[m]]),v&&(!F||v[0].length>F[0].length)){if(F=v,L=m,this.options.backtrack_lexer){if(R=this.test_match(v,w[m]),R!==!1)return R;if(this._backtrack){F=!1;continue}else return!1}else if(!this.options.flex)break}return F?(R=this.test_match(F,w[L]),R!==!1?R:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1346
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var F=this.next();return F||this.lex()},begin:function(F){this.conditionStack.push(F)},popState:function(){var F=this.conditionStack.length-1;return F>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(F){return F=this.conditionStack.length-1-Math.abs(F||0),F>=0?this.conditionStack[F]:"INITIAL"},pushState:function(F){this.begin(F)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(F,v,L,w){switch(L){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:break;case 6:break;case 7:return 26;case 8:break;case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return rt}();I.lexer=z;function H(){this.yy={}}return H.prototype=I,I.Parser=H,new H}();Xl.parser=Xl;const a4=Xl,o4=t=>t.match(/^\s*pie/)!==null||t.match(/^\s*bar/)!==null;let vo={},Kl=!1;const l4={parseDirective:function(t,e,i){ii.parseDirective(this,t,e,i)},getConfig:()=>P().pie,addSection:function(t,e){t=me.sanitizeText(t,P()),vo[t]===void 0&&(vo[t]=e,E.debug("Added new section :",t))},getSections:()=>vo,cleanupValue:function(t){return t.substring(0,1)===":"&&(t=t.substring(1).trim()),Number(t.trim())},clear:function(){vo={},Kl=!1,ur()},setAccTitle:dr,getAccTitle:vr,setDiagramTitle:Ur,getDiagramTitle:Zr,setShowData:function(t){Kl=t},getShowData:function(){return Kl},getAccDescription:Tr,setAccDescription:Cr};let vs=P(),Cs;const fa=450,c4={draw:(t,e,i,r)=>{try{vs=P(),E.debug(`Rendering info diagram
1347
+ `+t);const k=P().securityLevel;let I;k==="sandbox"&&(I=(0,Q.Ys)("#i"+e));const z=k==="sandbox"?(0,Q.Ys)(I.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),H=k==="sandbox"?I.nodes()[0].contentDocument:document;r.db.clear(),r.parser.parse(t),E.debug("Parsed info diagram");const rt=H.getElementById(e);Cs=rt.parentElement.offsetWidth,Cs===void 0&&(Cs=1200),vs.useWidth!==void 0&&(Cs=vs.useWidth),vs.pie.useWidth!==void 0&&(Cs=vs.pie.useWidth);const R=z.select("#"+e);Wr(R,fa,Cs,vs.pie.useMaxWidth),rt.setAttribute("viewBox","0 0 "+Cs+" "+fa);var s=40,n=18,a=4,o=Math.min(Cs,fa)/2-s,l=R.append("g").attr("transform","translate("+Cs/2+","+fa/2+")"),h=r.db.getSections(),u=0;Object.keys(h).forEach(function(v){u+=h[v]});const F=vs.themeVariables;var d=[F.pie1,F.pie2,F.pie3,F.pie4,F.pie5,F.pie6,F.pie7,F.pie8,F.pie9,F.pie10,F.pie11,F.pie12],f=(0,Q.PKp)().range(d),p=Object.entries(h).map(function(v,L){return{order:L,name:v[0],value:v[1]}}),b=(0,Q.ve8)().value(function(v){return v.value}).sort(function(v,L){return v.order-L.order}),_=b(p),T=(0,Q.Nb1)().innerRadius(0).outerRadius(o);l.selectAll("mySlices").data(_).enter().append("path").attr("d",T).attr("fill",function(v){return f(v.data.name)}).attr("class","pieCircle"),l.selectAll("mySlices").data(_).enter().append("text").text(function(v){return(v.data.value/u*100).toFixed(0)+"%"}).attr("transform",function(v){return"translate("+T.centroid(v)+")"}).style("text-anchor","middle").attr("class","slice"),l.append("text").text(r.db.getDiagramTitle()).attr("x",0).attr("y",-(fa-50)/2).attr("class","pieTitleText");var S=l.selectAll(".legend").data(f.domain()).enter().append("g").attr("class","legend").attr("transform",function(v,L){const w=n+a,m=w*f.domain().length/2,B=12*n,g=L*w-m;return"translate("+B+","+g+")"});S.append("rect").attr("width",n).attr("height",n).style("fill",f).style("stroke",f),S.data(_).append("text").attr("x",n+a).attr("y",n-a).text(function(v){return r.db.getShowData()||vs.showData||vs.pie.showData?v.data.name+" ["+v.data.value+"]":v.data.name})}catch(k){E.error("Error while rendering info diagram"),E.error(k)}}};var Ql=function(){var t=function(jt,U,gt,tt){for(gt=gt||{},tt=jt.length;tt--;gt[jt[tt]]=U);return gt},e=[1,3],i=[1,5],r=[1,6],s=[1,7],n=[1,8],a=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],o=[1,22],l=[2,13],h=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,30],b=[1,31],_=[1,24],T=[1,32],S=[1,33],k=[1,36],I=[71,72],z=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],H=[1,56],rt=[1,57],R=[1,58],F=[1,59],v=[1,60],L=[1,61],w=[1,62],m=[62,63],B=[1,74],g=[1,70],O=[1,71],y=[1,72],Y=[1,73],Bt=[1,75],J=[1,79],nt=[1,80],at=[1,77],it=[1,78],et=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],Tt={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(U,gt,tt,K,N,A,G){var C=A.length-1;switch(N){case 6:this.$=A[C].trim(),K.setAccTitle(this.$);break;case 7:case 8:this.$=A[C].trim(),K.setAccDescription(this.$);break;case 9:K.parseDirective("%%{","open_directive");break;case 10:K.parseDirective(A[C],"type_directive");break;case 11:A[C]=A[C].trim().replace(/'/g,'"'),K.parseDirective(A[C],"arg_directive");break;case 12:K.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:K.addRequirement(A[C-3],A[C-4]);break;case 20:K.setNewReqId(A[C-2]);break;case 21:K.setNewReqText(A[C-2]);break;case 22:K.setNewReqRisk(A[C-2]);break;case 23:K.setNewReqVerifyMethod(A[C-2]);break;case 26:this.$=K.RequirementType.REQUIREMENT;break;case 27:this.$=K.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=K.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=K.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=K.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=K.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=K.RiskLevel.LOW_RISK;break;case 33:this.$=K.RiskLevel.MED_RISK;break;case 34:this.$=K.RiskLevel.HIGH_RISK;break;case 35:this.$=K.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=K.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=K.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=K.VerifyType.VERIFY_TEST;break;case 39:K.addElement(A[C-3]);break;case 40:K.setNewElementType(A[C-2]);break;case 41:K.setNewElementDocRef(A[C-2]);break;case 44:K.addRelationship(A[C-2],A[C],A[C-4]);break;case 45:K.addRelationship(A[C-2],A[C-4],A[C]);break;case 46:this.$=K.Relationships.CONTAINS;break;case 47:this.$=K.Relationships.COPIES;break;case 48:this.$=K.Relationships.DERIVES;break;case 49:this.$=K.Relationships.SATISFIES;break;case 50:this.$=K.Relationships.VERIFIES;break;case 51:this.$=K.Relationships.REFINES;break;case 52:this.$=K.Relationships.TRACES;break}},table:[{3:1,4:2,6:e,9:4,14:i,16:r,18:s,19:n},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:i,16:r,18:s,19:n},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(a,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:i,16:r,18:s,19:n},{1:[2,2]},{4:21,5:o,7:17,8:l,9:4,14:i,16:r,18:s,19:n,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:f,44:p,45:b,53:_,71:T,72:S},{11:34,12:[1,35],22:k},t([12,22],[2,10]),t(a,[2,6]),t(a,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:o,7:38,8:l,9:4,14:i,16:r,18:s,19:n,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:f,44:p,45:b,53:_,71:T,72:S},{4:21,5:o,7:39,8:l,9:4,14:i,16:r,18:s,19:n,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:f,44:p,45:b,53:_,71:T,72:S},{4:21,5:o,7:40,8:l,9:4,14:i,16:r,18:s,19:n,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:f,44:p,45:b,53:_,71:T,72:S},{4:21,5:o,7:41,8:l,9:4,14:i,16:r,18:s,19:n,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:f,44:p,45:b,53:_,71:T,72:S},{4:21,5:o,7:42,8:l,9:4,14:i,16:r,18:s,19:n,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:f,44:p,45:b,53:_,71:T,72:S},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(I,[2,26]),t(I,[2,27]),t(I,[2,28]),t(I,[2,29]),t(I,[2,30]),t(I,[2,31]),t(z,[2,55]),t(z,[2,56]),t(a,[2,4]),{13:51,21:[1,52]},t(a,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:H,65:rt,66:R,67:F,68:v,69:L,70:w},{61:63,64:H,65:rt,66:R,67:F,68:v,69:L,70:w},{11:64,22:k},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(m,[2,46]),t(m,[2,47]),t(m,[2,48]),t(m,[2,49]),t(m,[2,50]),t(m,[2,51]),t(m,[2,52]),{63:[1,68]},t(a,[2,5]),{5:B,29:69,30:g,33:O,35:y,37:Y,39:Bt},{5:J,39:nt,55:76,56:at,58:it},{32:81,71:T,72:S},{32:82,71:T,72:S},t(et,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:B,29:87,30:g,33:O,35:y,37:Y,39:Bt},t(et,[2,25]),t(et,[2,39]),{31:[1,88]},{31:[1,89]},{5:J,39:nt,55:90,56:at,58:it},t(et,[2,43]),t(et,[2,44]),t(et,[2,45]),{32:91,71:T,72:S},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},t(et,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(et,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:B,29:116,30:g,33:O,35:y,37:Y,39:Bt},{5:B,29:117,30:g,33:O,35:y,37:Y,39:Bt},{5:B,29:118,30:g,33:O,35:y,37:Y,39:Bt},{5:B,29:119,30:g,33:O,35:y,37:Y,39:Bt},{5:J,39:nt,55:120,56:at,58:it},{5:J,39:nt,55:121,56:at,58:it},t(et,[2,20]),t(et,[2,21]),t(et,[2,22]),t(et,[2,23]),t(et,[2,40]),t(et,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(U,gt){if(gt.recoverable)this.trace(U);else{var tt=new Error(U);throw tt.hash=gt,tt}},parse:function(U){var gt=this,tt=[0],K=[],N=[null],A=[],G=this.table,C="",ft=0,x=0,Qt=2,j=1,Nt=A.slice.call(arguments,1),wt=Object.create(this.lexer),kt={yy:{}};for(var yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,yt)&&(kt.yy[yt]=this.yy[yt]);wt.setInput(U,kt.yy),kt.yy.lexer=wt,kt.yy.parser=this,typeof wt.yylloc=="undefined"&&(wt.yylloc={});var _t=wt.yylloc;A.push(_t);var mt=wt.options&&wt.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(){var Et;return Et=K.pop()||wt.lex()||j,typeof Et!="number"&&(Et instanceof Array&&(K=Et,Et=K.pop()),Et=gt.symbols_[Et]||Et),Et}for(var Xe,Oe,ie,ee,Le={},ri,ze,he,Ut;;){if(Oe=tt[tt.length-1],this.defaultActions[Oe]?ie=this.defaultActions[Oe]:((Xe===null||typeof Xe=="undefined")&&(Xe=Ct()),ie=G[Oe]&&G[Oe][Xe]),typeof ie=="undefined"||!ie.length||!ie[0]){var St="";Ut=[];for(ri in G[Oe])this.terminals_[ri]&&ri>Qt&&Ut.push("'"+this.terminals_[ri]+"'");wt.showPosition?St="Parse error on line "+(ft+1)+`:
1348
+ `+wt.showPosition()+`
1349
+ Expecting `+Ut.join(", ")+", got '"+(this.terminals_[Xe]||Xe)+"'":St="Parse error on line "+(ft+1)+": Unexpected "+(Xe==j?"end of input":"'"+(this.terminals_[Xe]||Xe)+"'"),this.parseError(St,{text:wt.match,token:this.terminals_[Xe]||Xe,line:wt.yylineno,loc:_t,expected:Ut})}if(ie[0]instanceof Array&&ie.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Oe+", token: "+Xe);switch(ie[0]){case 1:tt.push(Xe),N.push(wt.yytext),A.push(wt.yylloc),tt.push(ie[1]),Xe=null,x=wt.yyleng,C=wt.yytext,ft=wt.yylineno,_t=wt.yylloc;break;case 2:if(ze=this.productions_[ie[1]][1],Le.$=N[N.length-ze],Le._$={first_line:A[A.length-(ze||1)].first_line,last_line:A[A.length-1].last_line,first_column:A[A.length-(ze||1)].first_column,last_column:A[A.length-1].last_column},mt&&(Le._$.range=[A[A.length-(ze||1)].range[0],A[A.length-1].range[1]]),ee=this.performAction.apply(Le,[C,x,ft,kt.yy,ie[1],N,A].concat(Nt)),typeof ee!="undefined")return ee;ze&&(tt=tt.slice(0,-1*ze*2),N=N.slice(0,-1*ze),A=A.slice(0,-1*ze)),tt.push(this.productions_[ie[1]][0]),N.push(Le.$),A.push(Le._$),he=G[tt[tt.length-2]][tt[tt.length-1]],tt.push(he);break;case 3:return!0}}return!0}},xt=function(){var jt={EOF:1,parseError:function(gt,tt){if(this.yy.parser)this.yy.parser.parseError(gt,tt);else throw new Error(gt)},setInput:function(U,gt){return this.yy=gt||this.yy||{},this._input=U,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var U=this._input[0];this.yytext+=U,this.yyleng++,this.offset++,this.match+=U,this.matched+=U;var gt=U.match(/(?:\r\n?|\n).*/g);return gt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),U},unput:function(U){var gt=U.length,tt=U.split(/(?:\r\n?|\n)/g);this._input=U+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-gt),this.offset-=gt;var K=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),tt.length-1&&(this.yylineno-=tt.length-1);var N=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:tt?(tt.length===K.length?this.yylloc.first_column:0)+K[K.length-tt.length].length-tt[0].length:this.yylloc.first_column-gt},this.options.ranges&&(this.yylloc.range=[N[0],N[0]+this.yyleng-gt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1350
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(U){this.unput(this.match.slice(U))},pastInput:function(){var U=this.matched.substr(0,this.matched.length-this.match.length);return(U.length>20?"...":"")+U.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var U=this.match;return U.length<20&&(U+=this._input.substr(0,20-U.length)),(U.substr(0,20)+(U.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var U=this.pastInput(),gt=new Array(U.length+1).join("-");return U+this.upcomingInput()+`
1351
+ `+gt+"^"},test_match:function(U,gt){var tt,K,N;if(this.options.backtrack_lexer&&(N={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(N.yylloc.range=this.yylloc.range.slice(0))),K=U[0].match(/(?:\r\n?|\n).*/g),K&&(this.yylineno+=K.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:K?K[K.length-1].length-K[K.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+U[0].length},this.yytext+=U[0],this.match+=U[0],this.matches=U,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(U[0].length),this.matched+=U[0],tt=this.performAction.call(this,this.yy,this,gt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),tt)return tt;if(this._backtrack){for(var A in N)this[A]=N[A];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var U,gt,tt,K;this._more||(this.yytext="",this.match="");for(var N=this._currentRules(),A=0;A<N.length;A++)if(tt=this._input.match(this.rules[N[A]]),tt&&(!gt||tt[0].length>gt[0].length)){if(gt=tt,K=A,this.options.backtrack_lexer){if(U=this.test_match(tt,N[A]),U!==!1)return U;if(this._backtrack){gt=!1;continue}else return!1}else if(!this.options.flex)break}return gt?(U=this.test_match(gt,N[K]),U!==!1?U:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1352
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var gt=this.next();return gt||this.lex()},begin:function(gt){this.conditionStack.push(gt)},popState:function(){var gt=this.conditionStack.length-1;return gt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(gt){return gt=this.conditionStack.length-1-Math.abs(gt||0),gt>=0?this.conditionStack[gt]:"INITIAL"},pushState:function(gt){this.begin(gt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(gt,tt,K,N){switch(K){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return tt.yytext=tt.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return jt}();Tt.lexer=xt;function Z(){this.yy={}}return Z.prototype=Tt,Tt.Parser=Z,new Z}();Ql.parser=Ql;const h4=Ql,u4=t=>t.match(/^\s*requirement(Diagram)?/)!==null;let Jl=[],gr={},pa={},Zs={},ga={};const d4={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,i){ii.parseDirective(this,t,e,i)},getConfig:()=>P().req,addRequirement:(t,e)=>(pa[t]===void 0&&(pa[t]={name:t,type:e,id:gr.id,text:gr.text,risk:gr.risk,verifyMethod:gr.verifyMethod}),gr={},pa[t]),getRequirements:()=>pa,setNewReqId:t=>{gr!==void 0&&(gr.id=t)},setNewReqText:t=>{gr!==void 0&&(gr.text=t)},setNewReqRisk:t=>{gr!==void 0&&(gr.risk=t)},setNewReqVerifyMethod:t=>{gr!==void 0&&(gr.verifyMethod=t)},setAccTitle:dr,getAccTitle:vr,setAccDescription:Cr,getAccDescription:Tr,addElement:t=>(ga[t]===void 0&&(ga[t]={name:t,type:Zs.type,docRef:Zs.docRef},E.info("Added new requirement: ",t)),Zs={},ga[t]),getElements:()=>ga,setNewElementType:t=>{Zs!==void 0&&(Zs.type=t)},setNewElementDocRef:t=>{Zs!==void 0&&(Zs.docRef=t)},addRelationship:(t,e,i)=>{Jl.push({type:t,src:e,dst:i})},getRelationships:()=>Jl,clear:()=>{Jl=[],gr={},pa={},Zs={},ga={},ur()}},$l={CONTAINS:"contains",ARROW:"arrow"},P0={ReqMarkers:$l,insertLineEndings:(t,e)=>{let i=t.append("defs").append("marker").attr("id",$l.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");i.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),i.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),i.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",$l.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0
1353
+ L${e.line_height},${e.line_height/2}
1354
+ M${e.line_height},${e.line_height/2}
1355
+ L0,${e.line_height}`).attr("stroke-width",1)}};let ci={},V0=0;const Y0=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",ci.rect_min_width+"px").attr("height",ci.rect_min_height+"px"),z0=(t,e,i)=>{let r=ci.rect_min_width/2,s=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",ci.rect_padding).attr("dominant-baseline","hanging"),n=0;i.forEach(h=>{n==0?s.append("tspan").attr("text-anchor","middle").attr("x",ci.rect_min_width/2).attr("dy",0).text(h):s.append("tspan").attr("text-anchor","middle").attr("x",ci.rect_min_width/2).attr("dy",ci.line_height*.75).text(h),n++});let a=1.5*ci.rect_padding,o=n*ci.line_height*.75,l=a+o;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",ci.rect_min_width).attr("y1",l).attr("y2",l),{titleNode:s,y:l}},W0=(t,e,i,r)=>{let s=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",ci.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),n=0;const a=30;let o=[];return i.forEach(l=>{let h=l.length;for(;h>a&&n<3;){let u=l.substring(0,a);l=l.substring(a,l.length),h=l.length,o[o.length]=u,n++}if(n==3){let u=o[o.length-1];o[o.length-1]=u.substring(0,u.length-4)+"..."}else o[o.length]=l;n=0}),o.forEach(l=>{s.append("tspan").attr("x",ci.rect_padding).attr("dy",ci.line_height).text(l)}),s},f4=(t,e,i,r)=>{const s=e.node().getTotalLength(),n=e.node().getPointAtLength(s*.5),a="rel"+V0;V0++;const l=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",n.x).attr("y",n.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",n.x-l.width/2).attr("y",n.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")},p4=function(t,e,i,r,s){const n=i.edge(In(e.src),In(e.dst)),a=(0,Q.jvg)().x(function(l){return l.x}).y(function(l){return l.y}),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(n.points)).attr("fill","none");e.type==s.db.Relationships.CONTAINS?o.attr("marker-start","url("+me.getUrl(ci.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+me.getUrl(ci.arrowMarkerAbsolute)+"#"+P0.ReqMarkers.ARROW+"_line_ending)")),f4(t,o,ci,`<<${e.type}>>`)},g4=(t,e,i)=>{Object.keys(t).forEach(r=>{let s=t[r];r=In(r),E.info("Added new requirement: ",r);const n=i.append("g").attr("id",r),a="req-"+r,o=Y0(n,a);let l=z0(n,r+"_title",[`<<${s.type}>>`,`${s.name}`]);W0(n,r+"_body",[`Id: ${s.id}`,`Text: ${s.text}`,`Risk: ${s.risk}`,`Verification: ${s.verifyMethod}`],l.y);const h=o.node().getBBox();e.setNode(r,{width:h.width,height:h.height,shape:"rect",id:r})})},y4=(t,e,i)=>{Object.keys(t).forEach(r=>{let s=t[r];const n=In(r),a=i.append("g").attr("id",n),o="element-"+n,l=Y0(a,o);let h=z0(a,o+"_title",["<<Element>>",`${r}`]);W0(a,o+"_body",[`Type: ${s.type||"Not Specified"}`,`Doc Ref: ${s.docRef||"None"}`],h.y);const u=l.node().getBBox();e.setNode(n,{width:u.width,height:u.height,shape:"rect",id:n})})},m4=(t,e)=>(t.forEach(function(i){let r=In(i.src),s=In(i.dst);e.setEdge(r,s,{relationship:i})}),t),b4=function(t,e){e.nodes().forEach(function(i){i!==void 0&&e.node(i)!==void 0&&(t.select("#"+i),t.select("#"+i).attr("transform","translate("+(e.node(i).x-e.node(i).width/2)+","+(e.node(i).y-e.node(i).height/2)+" )"))})},In=t=>t.replace(/\s/g,"").replace(/\./g,"_"),x4={draw:(t,e,i,r)=>{ci=P().requirement,r.db.clear(),r.parser.parse(t);const s=ci.securityLevel;let n;s==="sandbox"&&(n=(0,Q.Ys)("#i"+e));const o=(s==="sandbox"?(0,Q.Ys)(n.nodes()[0].contentDocument.body):(0,Q.Ys)("body")).select(`[id='${e}']`);P0.insertLineEndings(o,ci);const l=new Be.k({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:ci.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let h=r.db.getRequirements(),u=r.db.getElements(),d=r.db.getRelationships();g4(h,l,o),y4(u,l,o),m4(d,l),(0,be.bK)(l),b4(o,l),d.forEach(function(T){p4(o,T,l,e,r)});const f=ci.rect_padding,p=o.node().getBBox(),b=p.width+f*2,_=p.height+f*2;Wr(o,_,b,ci.useMaxWidth),o.attr("viewBox",`${p.x-f} ${p.y-f} ${b} ${_}`)}};var tc=function(){var t=function(gt,tt,K,N){for(K=K||{},N=gt.length;N--;K[gt[N]]=tt);return K},e=[1,2],i=[1,3],r=[1,5],s=[1,7],n=[2,5],a=[1,15],o=[1,17],l=[1,19],h=[1,21],u=[1,22],d=[1,23],f=[1,29],p=[1,30],b=[1,31],_=[1,32],T=[1,33],S=[1,34],k=[1,35],I=[1,36],z=[1,37],H=[1,38],rt=[1,39],R=[1,40],F=[1,42],v=[1,43],L=[1,45],w=[1,46],m=[1,47],B=[1,48],g=[1,49],O=[1,50],y=[1,53],Y=[1,4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],Bt=[4,5,21,54,56],J=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],nt=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,53,54,56,57,62,63,64,65,73,83],at=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,52,54,56,57,62,63,64,65,73,83],it=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,54,56,57,62,63,64,65,73,83],et=[71,72,73],Tt=[1,125],xt=[1,4,5,7,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],Z={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,box_section:11,box_line:12,participant_statement:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,box:19,restOfLine:20,end:21,signal:22,autonumber:23,NUM:24,off:25,activate:26,actor:27,deactivate:28,note_statement:29,links_statement:30,link_statement:31,properties_statement:32,details_statement:33,title:34,legacy_title:35,acc_title:36,acc_title_value:37,acc_descr:38,acc_descr_value:39,acc_descr_multiline_value:40,loop:41,rect:42,opt:43,alt:44,else_sections:45,par:46,par_sections:47,critical:48,option_sections:49,break:50,option:51,and:52,else:53,participant:54,AS:55,participant_actor:56,note:57,placement:58,text2:59,over:60,actor_pair:61,links:62,link:63,properties:64,details:65,spaceList:66,",":67,left_of:68,right_of:69,signaltype:70,"+":71,"-":72,ACTOR:73,SOLID_OPEN_ARROW:74,DOTTED_OPEN_ARROW:75,SOLID_ARROW:76,DOTTED_ARROW:77,SOLID_CROSS:78,DOTTED_CROSS:79,SOLID_POINT:80,DOTTED_POINT:81,TXT:82,open_directive:83,type_directive:84,arg_directive:85,close_directive:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",17:":",19:"box",20:"restOfLine",21:"end",23:"autonumber",24:"NUM",25:"off",26:"activate",28:"deactivate",34:"title",35:"legacy_title",36:"acc_title",37:"acc_title_value",38:"acc_descr",39:"acc_descr_value",40:"acc_descr_multiline_value",41:"loop",42:"rect",43:"opt",44:"alt",46:"par",48:"critical",50:"break",51:"option",52:"and",53:"else",54:"participant",55:"AS",56:"participant_actor",57:"note",60:"over",62:"links",63:"link",64:"properties",65:"details",67:",",68:"left_of",69:"right_of",71:"+",72:"-",73:"ACTOR",74:"SOLID_OPEN_ARROW",75:"DOTTED_OPEN_ARROW",76:"SOLID_ARROW",77:"DOTTED_ARROW",78:"SOLID_CROSS",79:"DOTTED_CROSS",80:"SOLID_POINT",81:"DOTTED_POINT",82:"TXT",83:"open_directive",84:"type_directive",85:"arg_directive",86:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[11,0],[11,2],[12,2],[12,1],[12,1],[6,4],[6,6],[10,1],[10,4],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[49,1],[49,4],[47,1],[47,4],[45,1],[45,4],[13,5],[13,3],[13,5],[13,3],[29,4],[29,4],[30,3],[31,3],[32,3],[33,3],[66,2],[66,1],[61,3],[61,1],[58,1],[58,1],[22,5],[22,5],[22,4],[27,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[59,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(tt,K,N,A,G,C,ft){var x=C.length-1;switch(G){case 4:return A.apply(C[x]),C[x];case 5:case 10:this.$=[];break;case 6:case 11:C[x-1].push(C[x]),this.$=C[x-1];break;case 7:case 8:case 12:case 13:this.$=C[x];break;case 9:case 14:this.$=[];break;case 18:C[x-1].unshift({type:"boxStart",boxData:A.parseBoxData(C[x-2])}),C[x-1].push({type:"boxEnd",boxText:C[x-2]}),this.$=C[x-1];break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(C[x-2]),sequenceIndexStep:Number(C[x-1]),sequenceVisible:!0,signalType:A.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(C[x-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:A.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:A.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:A.LINETYPE.AUTONUMBER};break;case 24:this.$={type:"activeStart",signalType:A.LINETYPE.ACTIVE_START,actor:C[x-1]};break;case 25:this.$={type:"activeEnd",signalType:A.LINETYPE.ACTIVE_END,actor:C[x-1]};break;case 31:A.setDiagramTitle(C[x].substring(6)),this.$=C[x].substring(6);break;case 32:A.setDiagramTitle(C[x].substring(7)),this.$=C[x].substring(7);break;case 33:this.$=C[x].trim(),A.setAccTitle(this.$);break;case 34:case 35:this.$=C[x].trim(),A.setAccDescription(this.$);break;case 36:C[x-1].unshift({type:"loopStart",loopText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.LOOP_START}),C[x-1].push({type:"loopEnd",loopText:C[x-2],signalType:A.LINETYPE.LOOP_END}),this.$=C[x-1];break;case 37:C[x-1].unshift({type:"rectStart",color:A.parseMessage(C[x-2]),signalType:A.LINETYPE.RECT_START}),C[x-1].push({type:"rectEnd",color:A.parseMessage(C[x-2]),signalType:A.LINETYPE.RECT_END}),this.$=C[x-1];break;case 38:C[x-1].unshift({type:"optStart",optText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.OPT_START}),C[x-1].push({type:"optEnd",optText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.OPT_END}),this.$=C[x-1];break;case 39:C[x-1].unshift({type:"altStart",altText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.ALT_START}),C[x-1].push({type:"altEnd",signalType:A.LINETYPE.ALT_END}),this.$=C[x-1];break;case 40:C[x-1].unshift({type:"parStart",parText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.PAR_START}),C[x-1].push({type:"parEnd",signalType:A.LINETYPE.PAR_END}),this.$=C[x-1];break;case 41:C[x-1].unshift({type:"criticalStart",criticalText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.CRITICAL_START}),C[x-1].push({type:"criticalEnd",signalType:A.LINETYPE.CRITICAL_END}),this.$=C[x-1];break;case 42:C[x-1].unshift({type:"breakStart",breakText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.BREAK_START}),C[x-1].push({type:"breakEnd",optText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.BREAK_END}),this.$=C[x-1];break;case 45:this.$=C[x-3].concat([{type:"option",optionText:A.parseMessage(C[x-1]),signalType:A.LINETYPE.CRITICAL_OPTION},C[x]]);break;case 47:this.$=C[x-3].concat([{type:"and",parText:A.parseMessage(C[x-1]),signalType:A.LINETYPE.PAR_AND},C[x]]);break;case 49:this.$=C[x-3].concat([{type:"else",altText:A.parseMessage(C[x-1]),signalType:A.LINETYPE.ALT_ELSE},C[x]]);break;case 50:C[x-3].type="addParticipant",C[x-3].description=A.parseMessage(C[x-1]),this.$=C[x-3];break;case 51:C[x-1].type="addParticipant",this.$=C[x-1];break;case 52:C[x-3].type="addActor",C[x-3].description=A.parseMessage(C[x-1]),this.$=C[x-3];break;case 53:C[x-1].type="addActor",this.$=C[x-1];break;case 54:this.$=[C[x-1],{type:"addNote",placement:C[x-2],actor:C[x-1].actor,text:C[x]}];break;case 55:C[x-2]=[].concat(C[x-1],C[x-1]).slice(0,2),C[x-2][0]=C[x-2][0].actor,C[x-2][1]=C[x-2][1].actor,this.$=[C[x-1],{type:"addNote",placement:A.PLACEMENT.OVER,actor:C[x-2].slice(0,2),text:C[x]}];break;case 56:this.$=[C[x-1],{type:"addLinks",actor:C[x-1].actor,text:C[x]}];break;case 57:this.$=[C[x-1],{type:"addALink",actor:C[x-1].actor,text:C[x]}];break;case 58:this.$=[C[x-1],{type:"addProperties",actor:C[x-1].actor,text:C[x]}];break;case 59:this.$=[C[x-1],{type:"addDetails",actor:C[x-1].actor,text:C[x]}];break;case 62:this.$=[C[x-2],C[x]];break;case 63:this.$=C[x];break;case 64:this.$=A.PLACEMENT.LEFTOF;break;case 65:this.$=A.PLACEMENT.RIGHTOF;break;case 66:this.$=[C[x-4],C[x-1],{type:"addMessage",from:C[x-4].actor,to:C[x-1].actor,signalType:C[x-3],msg:C[x]},{type:"activeStart",signalType:A.LINETYPE.ACTIVE_START,actor:C[x-1]}];break;case 67:this.$=[C[x-4],C[x-1],{type:"addMessage",from:C[x-4].actor,to:C[x-1].actor,signalType:C[x-3],msg:C[x]},{type:"activeEnd",signalType:A.LINETYPE.ACTIVE_END,actor:C[x-4]}];break;case 68:this.$=[C[x-3],C[x-1],{type:"addMessage",from:C[x-3].actor,to:C[x-1].actor,signalType:C[x-2],msg:C[x]}];break;case 69:this.$={type:"addParticipant",actor:C[x]};break;case 70:this.$=A.LINETYPE.SOLID_OPEN;break;case 71:this.$=A.LINETYPE.DOTTED_OPEN;break;case 72:this.$=A.LINETYPE.SOLID;break;case 73:this.$=A.LINETYPE.DOTTED;break;case 74:this.$=A.LINETYPE.SOLID_CROSS;break;case 75:this.$=A.LINETYPE.DOTTED_CROSS;break;case 76:this.$=A.LINETYPE.SOLID_POINT;break;case 77:this.$=A.LINETYPE.DOTTED_POINT;break;case 78:this.$=A.parseMessage(C[x].trim().substring(1));break;case 79:A.parseDirective("%%{","open_directive");break;case 80:A.parseDirective(C[x],"type_directive");break;case 81:C[x]=C[x].trim().replace(/'/g,'"'),A.parseDirective(C[x],"arg_directive");break;case 82:A.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:e,5:i,6:4,7:r,14:6,83:s},{1:[3]},{3:8,4:e,5:i,6:4,7:r,14:6,83:s},{3:9,4:e,5:i,6:4,7:r,14:6,83:s},{3:10,4:e,5:i,6:4,7:r,14:6,83:s},t([1,4,5,19,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],n,{8:11}),{15:12,84:[1,13]},{84:[2,79]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:b,38:_,40:T,41:S,42:k,43:I,44:z,46:H,48:rt,50:R,54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{16:51,17:[1,52],86:y},t([17,86],[2,80]),t(Y,[2,6]),{6:41,10:54,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:b,38:_,40:T,41:S,42:k,43:I,44:z,46:H,48:rt,50:R,54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},t(Y,[2,8]),t(Y,[2,9]),t(Y,[2,17]),{20:[1,55]},{5:[1,56]},{5:[1,59],24:[1,57],25:[1,58]},{27:60,73:O},{27:61,73:O},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},{5:[1,66]},t(Y,[2,31]),t(Y,[2,32]),{37:[1,67]},{39:[1,68]},t(Y,[2,35]),{20:[1,69]},{20:[1,70]},{20:[1,71]},{20:[1,72]},{20:[1,73]},{20:[1,74]},{20:[1,75]},t(Y,[2,43]),{27:76,73:O},{27:77,73:O},{70:78,74:[1,79],75:[1,80],76:[1,81],77:[1,82],78:[1,83],79:[1,84],80:[1,85],81:[1,86]},{58:87,60:[1,88],68:[1,89],69:[1,90]},{27:91,73:O},{27:92,73:O},{27:93,73:O},{27:94,73:O},t([5,55,67,74,75,76,77,78,79,80,81,82],[2,69]),{5:[1,95]},{18:96,85:[1,97]},{5:[2,82]},t(Y,[2,7]),t(Bt,[2,10],{11:98}),t(Y,[2,19]),{5:[1,100],24:[1,99]},{5:[1,101]},t(Y,[2,23]),{5:[1,102]},{5:[1,103]},t(Y,[2,26]),t(Y,[2,27]),t(Y,[2,28]),t(Y,[2,29]),t(Y,[2,30]),t(Y,[2,33]),t(Y,[2,34]),t(J,n,{8:104}),t(J,n,{8:105}),t(J,n,{8:106}),t(nt,n,{45:107,8:108}),t(at,n,{47:109,8:110}),t(it,n,{49:111,8:112}),t(J,n,{8:113}),{5:[1,115],55:[1,114]},{5:[1,117],55:[1,116]},{27:120,71:[1,118],72:[1,119],73:O},t(et,[2,70]),t(et,[2,71]),t(et,[2,72]),t(et,[2,73]),t(et,[2,74]),t(et,[2,75]),t(et,[2,76]),t(et,[2,77]),{27:121,73:O},{27:123,61:122,73:O},{73:[2,64]},{73:[2,65]},{59:124,82:Tt},{59:126,82:Tt},{59:127,82:Tt},{59:128,82:Tt},t(xt,[2,15]),{16:129,86:y},{86:[2,81]},{4:[1,132],5:[1,134],12:131,13:133,21:[1,130],54:F,56:v},{5:[1,135]},t(Y,[2,21]),t(Y,[2,22]),t(Y,[2,24]),t(Y,[2,25]),{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,136],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:b,38:_,40:T,41:S,42:k,43:I,44:z,46:H,48:rt,50:R,54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,137],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:b,38:_,40:T,41:S,42:k,43:I,44:z,46:H,48:rt,50:R,54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,138],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:b,38:_,40:T,41:S,42:k,43:I,44:z,46:H,48:rt,50:R,54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{21:[1,139]},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,48],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:b,38:_,40:T,41:S,42:k,43:I,44:z,46:H,48:rt,50:R,53:[1,140],54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{21:[1,141]},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,46],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:b,38:_,40:T,41:S,42:k,43:I,44:z,46:H,48:rt,50:R,52:[1,142],54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{21:[1,143]},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,44],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:b,38:_,40:T,41:S,42:k,43:I,44:z,46:H,48:rt,50:R,51:[1,144],54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,145],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:b,38:_,40:T,41:S,42:k,43:I,44:z,46:H,48:rt,50:R,54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{20:[1,146]},t(Y,[2,51]),{20:[1,147]},t(Y,[2,53]),{27:148,73:O},{27:149,73:O},{59:150,82:Tt},{59:151,82:Tt},{59:152,82:Tt},{67:[1,153],82:[2,63]},{5:[2,56]},{5:[2,78]},{5:[2,57]},{5:[2,58]},{5:[2,59]},{5:[1,154]},t(Y,[2,18]),t(Bt,[2,11]),{13:155,54:F,56:v},t(Bt,[2,13]),t(Bt,[2,14]),t(Y,[2,20]),t(Y,[2,36]),t(Y,[2,37]),t(Y,[2,38]),t(Y,[2,39]),{20:[1,156]},t(Y,[2,40]),{20:[1,157]},t(Y,[2,41]),{20:[1,158]},t(Y,[2,42]),{5:[1,159]},{5:[1,160]},{59:161,82:Tt},{59:162,82:Tt},{5:[2,68]},{5:[2,54]},{5:[2,55]},{27:163,73:O},t(xt,[2,16]),t(Bt,[2,12]),t(nt,n,{8:108,45:164}),t(at,n,{8:110,47:165}),t(it,n,{8:112,49:166}),t(Y,[2,50]),t(Y,[2,52]),{5:[2,66]},{5:[2,67]},{82:[2,62]},{21:[2,49]},{21:[2,47]},{21:[2,45]}],defaultActions:{7:[2,79],8:[2,1],9:[2,2],10:[2,3],53:[2,82],89:[2,64],90:[2,65],97:[2,81],124:[2,56],125:[2,78],126:[2,57],127:[2,58],128:[2,59],150:[2,68],151:[2,54],152:[2,55],161:[2,66],162:[2,67],163:[2,62],164:[2,49],165:[2,47],166:[2,45]},parseError:function(tt,K){if(K.recoverable)this.trace(tt);else{var N=new Error(tt);throw N.hash=K,N}},parse:function(tt){var K=this,N=[0],A=[],G=[null],C=[],ft=this.table,x="",Qt=0,j=0,Nt=2,wt=1,kt=C.slice.call(arguments,1),yt=Object.create(this.lexer),_t={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(_t.yy[mt]=this.yy[mt]);yt.setInput(tt,_t.yy),_t.yy.lexer=yt,_t.yy.parser=this,typeof yt.yylloc=="undefined"&&(yt.yylloc={});var Ct=yt.yylloc;C.push(Ct);var Xe=yt.options&&yt.options.ranges;typeof _t.yy.parseError=="function"?this.parseError=_t.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Oe(){var dt;return dt=A.pop()||yt.lex()||wt,typeof dt!="number"&&(dt instanceof Array&&(A=dt,dt=A.pop()),dt=K.symbols_[dt]||dt),dt}for(var ie,ee,Le,ri,ze={},he,Ut,St,Et;;){if(ee=N[N.length-1],this.defaultActions[ee]?Le=this.defaultActions[ee]:((ie===null||typeof ie=="undefined")&&(ie=Oe()),Le=ft[ee]&&ft[ee][ie]),typeof Le=="undefined"||!Le.length||!Le[0]){var It="";Et=[];for(he in ft[ee])this.terminals_[he]&&he>Nt&&Et.push("'"+this.terminals_[he]+"'");yt.showPosition?It="Parse error on line "+(Qt+1)+`:
1356
+ `+yt.showPosition()+`
1357
+ Expecting `+Et.join(", ")+", got '"+(this.terminals_[ie]||ie)+"'":It="Parse error on line "+(Qt+1)+": Unexpected "+(ie==wt?"end of input":"'"+(this.terminals_[ie]||ie)+"'"),this.parseError(It,{text:yt.match,token:this.terminals_[ie]||ie,line:yt.yylineno,loc:Ct,expected:Et})}if(Le[0]instanceof Array&&Le.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ee+", token: "+ie);switch(Le[0]){case 1:N.push(ie),G.push(yt.yytext),C.push(yt.yylloc),N.push(Le[1]),ie=null,j=yt.yyleng,x=yt.yytext,Qt=yt.yylineno,Ct=yt.yylloc;break;case 2:if(Ut=this.productions_[Le[1]][1],ze.$=G[G.length-Ut],ze._$={first_line:C[C.length-(Ut||1)].first_line,last_line:C[C.length-1].last_line,first_column:C[C.length-(Ut||1)].first_column,last_column:C[C.length-1].last_column},Xe&&(ze._$.range=[C[C.length-(Ut||1)].range[0],C[C.length-1].range[1]]),ri=this.performAction.apply(ze,[x,j,Qt,_t.yy,Le[1],G,C].concat(kt)),typeof ri!="undefined")return ri;Ut&&(N=N.slice(0,-1*Ut*2),G=G.slice(0,-1*Ut),C=C.slice(0,-1*Ut)),N.push(this.productions_[Le[1]][0]),G.push(ze.$),C.push(ze._$),St=ft[N[N.length-2]][N[N.length-1]],N.push(St);break;case 3:return!0}}return!0}},jt=function(){var gt={EOF:1,parseError:function(K,N){if(this.yy.parser)this.yy.parser.parseError(K,N);else throw new Error(K)},setInput:function(tt,K){return this.yy=K||this.yy||{},this._input=tt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var tt=this._input[0];this.yytext+=tt,this.yyleng++,this.offset++,this.match+=tt,this.matched+=tt;var K=tt.match(/(?:\r\n?|\n).*/g);return K?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),tt},unput:function(tt){var K=tt.length,N=tt.split(/(?:\r\n?|\n)/g);this._input=tt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-K),this.offset-=K;var A=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),N.length-1&&(this.yylineno-=N.length-1);var G=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:N?(N.length===A.length?this.yylloc.first_column:0)+A[A.length-N.length].length-N[0].length:this.yylloc.first_column-K},this.options.ranges&&(this.yylloc.range=[G[0],G[0]+this.yyleng-K]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1358
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(tt){this.unput(this.match.slice(tt))},pastInput:function(){var tt=this.matched.substr(0,this.matched.length-this.match.length);return(tt.length>20?"...":"")+tt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var tt=this.match;return tt.length<20&&(tt+=this._input.substr(0,20-tt.length)),(tt.substr(0,20)+(tt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var tt=this.pastInput(),K=new Array(tt.length+1).join("-");return tt+this.upcomingInput()+`
1359
+ `+K+"^"},test_match:function(tt,K){var N,A,G;if(this.options.backtrack_lexer&&(G={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(G.yylloc.range=this.yylloc.range.slice(0))),A=tt[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+tt[0].length},this.yytext+=tt[0],this.match+=tt[0],this.matches=tt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(tt[0].length),this.matched+=tt[0],N=this.performAction.call(this,this.yy,this,K,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var C in G)this[C]=G[C];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var tt,K,N,A;this._more||(this.yytext="",this.match="");for(var G=this._currentRules(),C=0;C<G.length;C++)if(N=this._input.match(this.rules[G[C]]),N&&(!K||N[0].length>K[0].length)){if(K=N,A=C,this.options.backtrack_lexer){if(tt=this.test_match(N,G[C]),tt!==!1)return tt;if(this._backtrack){K=!1;continue}else return!1}else if(!this.options.flex)break}return K?(tt=this.test_match(K,G[A]),tt!==!1?tt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1360
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var K=this.next();return K||this.lex()},begin:function(K){this.conditionStack.push(K)},popState:function(){var K=this.conditionStack.length-1;return K>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(K){return K=this.conditionStack.length-1-Math.abs(K||0),K>=0?this.conditionStack[K]:"INITIAL"},pushState:function(K){this.begin(K)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(K,N,A,G){switch(A){case 0:return this.begin("open_directive"),83;case 1:return this.begin("type_directive"),84;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),86;case 4:return 85;case 5:return 5;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:return 24;case 12:return this.begin("LINE"),19;case 13:return this.begin("ID"),54;case 14:return this.begin("ID"),56;case 15:return N.yytext=N.yytext.trim(),this.begin("ALIAS"),73;case 16:return this.popState(),this.popState(),this.begin("LINE"),55;case 17:return this.popState(),this.popState(),5;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),44;case 22:return this.begin("LINE"),53;case 23:return this.begin("LINE"),46;case 24:return this.begin("LINE"),52;case 25:return this.begin("LINE"),48;case 26:return this.begin("LINE"),51;case 27:return this.begin("LINE"),50;case 28:return this.popState(),20;case 29:return 21;case 30:return 68;case 31:return 69;case 32:return 62;case 33:return 63;case 34:return 64;case 35:return 65;case 36:return 60;case 37:return 57;case 38:return this.begin("ID"),26;case 39:return this.begin("ID"),28;case 40:return 34;case 41:return 35;case 42:return this.begin("acc_title"),36;case 43:return this.popState(),"acc_title_value";case 44:return this.begin("acc_descr"),38;case 45:return this.popState(),"acc_descr_value";case 46:this.begin("acc_descr_multiline");break;case 47:this.popState();break;case 48:return"acc_descr_multiline_value";case 49:return 7;case 50:return 23;case 51:return 25;case 52:return 67;case 53:return 5;case 54:return N.yytext=N.yytext.trim(),73;case 55:return 76;case 56:return 77;case 57:return 74;case 58:return 75;case 59:return 78;case 60:return 79;case 61:return 80;case 62:return 81;case 63:return 82;case 64:return 71;case 65:return 72;case 66:return 5;case 67:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[47,48],inclusive:!1},acc_descr:{rules:[45],inclusive:!1},acc_title:{rules:[43],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,15],inclusive:!1},ALIAS:{rules:[7,8,16,17],inclusive:!1},LINE:{rules:[7,8,28],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25,26,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,44,46,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return gt}();Z.lexer=jt;function U(){this.yy={}}return U.prototype=Z,Z.Parser=U,new U}();tc.parser=tc;const k4=tc,_4=t=>t.match(/^\s*sequenceDiagram/)!==null;let ya,Hs={},Dn=[],Xr=[],Co=!1,ec,Ts;const E4=function(t,e,i){ii.parseDirective(this,t,e,i)},v4=function(t){Dn.push({name:t.text,wrap:t.wrap===void 0&&cn()||!!t.wrap,fill:t.color,actorKeys:[]}),Ts=Dn.slice(-1)[0]},ic=function(t,e,i,r){let s=Ts;const n=Hs[t];if(n){if(Ts&&n.box&&Ts!==n.box)throw new Error("A same participant should only be defined in one Box: "+n.name+" can't be in '"+n.box.name+"' and in '"+Ts.name+"' at the same time.");if(s=n.box?n.box:Ts,n.box=s,n&&e===n.name&&i==null)return}(i==null||i.text==null)&&(i={text:e,wrap:null,type:r}),(r==null||i.text==null)&&(i={text:e,wrap:null,type:r}),Hs[t]={box:s,name:e,description:i.text,wrap:i.wrap===void 0&&cn()||!!i.wrap,prevActor:ya,links:{},properties:{},actorCnt:null,rectData:null,type:r||"participant"},ya&&Hs[ya]&&(Hs[ya].nextActor=t),Ts&&Ts.actorKeys.push(t),ya=t},C4=t=>{let e,i=0;for(e=0;e<Xr.length;e++)Xr[e].type===ba.ACTIVE_START&&Xr[e].from.actor===t&&i++,Xr[e].type===ba.ACTIVE_END&&Xr[e].from.actor===t&&i--;return i},T4=function(t,e,i,r){Xr.push({from:t,to:e,message:i.text,wrap:i.wrap===void 0&&cn()||!!i.wrap,answer:r})},gi=function(t,e,i={text:void 0,wrap:void 0},r){if(r===ba.ACTIVE_END&&C4(t.actor)<1){let n=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw n.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},n}return Xr.push({from:t,to:e,message:i.text,wrap:i.wrap===void 0&&cn()||!!i.wrap,type:r}),!0},S4=function(){return Dn.length>0},w4=function(){return Dn.some(t=>t.name)},A4=function(){return Xr},L4=function(){return Dn},B4=function(){return Hs},ma=function(t){return Hs[t]},I4=function(){return Object.keys(Hs)},D4=function(){Co=!0},R4=function(){Co=!1},N4=()=>Co,O4=function(t){ec=t},cn=()=>ec!==void 0?ec:P().sequence.wrap,F4=function(){Hs={},Dn=[],Xr=[],Co=!1,ur()},M4=function(t){const e=t.trim(),i={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:e.match(/^:?wrap:/)!==null?!0:e.match(/^:?nowrap:/)!==null?!1:void 0};return E.debug("parseMessage:",i),i},P4=function(t){const e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let i=e!=null&&e[1]?e[1].trim():"transparent",r=e!=null&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",i)||(i="transparent",r=t.trim());else{const n=new Option().style;n.color=i,n.color!==i&&(i="transparent",r=t.trim())}return{color:i,text:r!==void 0?Er(r.replace(/^:?(?:no)?wrap:/,""),P()):void 0,wrap:r!==void 0?r.match(/^:?wrap:/)!==null?!0:r.match(/^:?nowrap:/)!==null?!1:void 0:void 0}},ba={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31},V4={FILLED:0,OPEN:1},Y4={LEFTOF:0,RIGHTOF:1,OVER:2},U0=function(t,e,i){i.text,i.wrap===void 0&&cn()||i.wrap;const r=[].concat(t,t);Xr.push({from:r[0],to:r[1],message:i.text,wrap:i.wrap===void 0&&cn()||!!i.wrap,type:ba.NOTE,placement:e})},Z0=function(t,e){const i=ma(t);try{let r=Er(e.text,P());r=r.replace(/&amp;/g,"&"),r=r.replace(/&equals;/g,"=");const s=JSON.parse(r);rc(i,s)}catch(r){E.error("error while parsing actor link text",r)}},z4=function(t,e){const i=ma(t);try{const a={};let o=Er(e.text,P());var r=o.indexOf("@");o=o.replace(/&amp;/g,"&"),o=o.replace(/&equals;/g,"=");var s=o.slice(0,r-1).trim(),n=o.slice(r+1).trim();a[s]=n,rc(i,a)}catch(a){E.error("error while parsing actor link text",a)}};function rc(t,e){if(t.links==null)t.links=e;else for(let i in e)t.links[i]=e[i]}const H0=function(t,e){const i=ma(t);try{let r=Er(e.text,P());const s=JSON.parse(r);G0(i,s)}catch(r){E.error("error while parsing actor properties text",r)}};function G0(t,e){if(t.properties==null)t.properties=e;else for(let i in e)t.properties[i]=e[i]}function W4(){Ts=void 0}const j0=function(t,e){const i=ma(t),r=document.getElementById(e.text);try{const s=r.innerHTML,n=JSON.parse(s);n.properties&&G0(i,n.properties),n.links&&rc(i,n.links)}catch(s){E.error("error while parsing actor details text",s)}},U4=function(t,e){if(t!==void 0&&t.properties!==void 0)return t.properties[e]},q0=function(t){if(Array.isArray(t))t.forEach(function(e){q0(e)});else switch(t.type){case"sequenceIndex":Xr.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":ic(t.actor,t.actor,t.description,"participant");break;case"addActor":ic(t.actor,t.actor,t.description,"actor");break;case"activeStart":gi(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":gi(t.actor,void 0,void 0,t.signalType);break;case"addNote":U0(t.actor,t.placement,t.text);break;case"addLinks":Z0(t.actor,t.text);break;case"addALink":z4(t.actor,t.text);break;case"addProperties":H0(t.actor,t.text);break;case"addDetails":j0(t.actor,t.text);break;case"addMessage":gi(t.from,t.to,t.msg,t.signalType);break;case"boxStart":v4(t.boxData);break;case"boxEnd":W4();break;case"loopStart":gi(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":gi(void 0,void 0,void 0,t.signalType);break;case"rectStart":gi(void 0,void 0,t.color,t.signalType);break;case"rectEnd":gi(void 0,void 0,void 0,t.signalType);break;case"optStart":gi(void 0,void 0,t.optText,t.signalType);break;case"optEnd":gi(void 0,void 0,void 0,t.signalType);break;case"altStart":gi(void 0,void 0,t.altText,t.signalType);break;case"else":gi(void 0,void 0,t.altText,t.signalType);break;case"altEnd":gi(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":dr(t.text);break;case"parStart":gi(void 0,void 0,t.parText,t.signalType);break;case"and":gi(void 0,void 0,t.parText,t.signalType);break;case"parEnd":gi(void 0,void 0,void 0,t.signalType);break;case"criticalStart":gi(void 0,void 0,t.criticalText,t.signalType);break;case"option":gi(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":gi(void 0,void 0,void 0,t.signalType);break;case"breakStart":gi(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":gi(void 0,void 0,void 0,t.signalType);break}},X0={addActor:ic,addMessage:T4,addSignal:gi,addLinks:Z0,addDetails:j0,addProperties:H0,autoWrap:cn,setWrap:O4,enableSequenceNumbers:D4,disableSequenceNumbers:R4,showSequenceNumbers:N4,getMessages:A4,getActors:B4,getActor:ma,getActorKeys:I4,getActorProperty:U4,getAccTitle:vr,getBoxes:L4,getDiagramTitle:Zr,setDiagramTitle:Ur,parseDirective:E4,getConfig:()=>P().sequence,clear:F4,parseMessage:M4,parseBoxData:P4,LINETYPE:ba,ARROWTYPE:V4,PLACEMENT:Y4,addNote:U0,setAccTitle:dr,apply:q0,setAccDescription:Cr,getAccDescription:Tr,hasAtLeastOneBox:S4,hasAtLeastOneBoxWithTitle:w4};let sc=[];const Z4=t=>{sc.push(t)},K0=()=>{sc.forEach(t=>{t()}),sc=[]},To=function(t,e){const i=t.append("rect");return i.attr("x",e.x),i.attr("y",e.y),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("width",e.width),i.attr("height",e.height),i.attr("rx",e.rx),i.attr("ry",e.ry),e.class!==void 0&&i.attr("class",e.class),i},Q0=(t,e)=>{Z4(()=>{const i=document.querySelectorAll(t);i.length!==0&&(i[0].addEventListener("mouseover",function(){q4("actor"+e+"_popup")}),i[0].addEventListener("mouseout",function(){X4("actor"+e+"_popup")}))})},H4=function(t,e,i,r,s){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const n=e.links,a=e.actorCnt,o=e.rectData;var l="none";s&&(l="block !important");const h=t.append("g");h.attr("id","actor"+a+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",l),Q0("#actor"+a+"_popup",a);var u="";o.class!==void 0&&(u=" "+o.class);let d=o.width>i?o.width:i;const f=h.append("rect");if(f.attr("class","actorPopupMenuPanel"+u),f.attr("x",o.x),f.attr("y",o.height),f.attr("fill",o.fill),f.attr("stroke",o.stroke),f.attr("width",d),f.attr("height",o.height),f.attr("rx",o.rx),f.attr("ry",o.ry),n!=null){var p=20;for(let T in n){var b=h.append("a"),_=(0,Vi.Nm)(n[T]);b.attr("xlink:href",_),b.attr("target","_blank"),h5(r)(T,b,o.x+10,o.height+p,d,20,{class:"actor"},r),p+=30}}return f.attr("height",p),{height:o.height+p,width:d}},J0=function(t,e,i,r){const s=t.append("image");s.attr("x",e),s.attr("y",i);var n=(0,Vi.Nm)(r);s.attr("xlink:href",n)},$0=function(t,e,i,r){const s=t.append("use");s.attr("x",e),s.attr("y",i);var n=(0,Vi.Nm)(r);s.attr("xlink:href","#"+n)},G4=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},j4=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},q4=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="block")},X4=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="none")},Rn=function(t,e){let i=0,r=0;const s=e.text.split(me.lineBreakRegex),[n,a]=Un(e.fontSize);let o=[],l=0,h=()=>e.y;if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":h=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":h=()=>Math.round(e.y+(i+r+e.textMargin)/2);break;case"bottom":case"end":h=()=>Math.round(e.y+(i+r+2*e.textMargin)-e.textMargin);break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[u,d]of s.entries()){e.textMargin!==void 0&&e.textMargin===0&&n!==void 0&&(l=u*n);const f=t.append("text");if(f.attr("x",e.x),f.attr("y",h()),e.anchor!==void 0&&f.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&f.style("font-family",e.fontFamily),a!==void 0&&f.style("font-size",a),e.fontWeight!==void 0&&f.style("font-weight",e.fontWeight),e.fill!==void 0&&f.attr("fill",e.fill),e.class!==void 0&&f.attr("class",e.class),e.dy!==void 0?f.attr("dy",e.dy):l!==0&&f.attr("dy",l),e.tspan){const p=f.append("tspan");p.attr("x",e.x),e.fill!==void 0&&p.attr("fill",e.fill),p.text(d)}else f.text(d);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(r+=(f._groups||f)[0][0].getBBox().height,i=r),o.push(f)}return o},tu=function(t,e){function i(s,n,a,o,l){return s+","+n+" "+(s+a)+","+n+" "+(s+a)+","+(n+o-l)+" "+(s+a-l*1.2)+","+(n+o)+" "+s+","+(n+o)}const r=t.append("polygon");return r.attr("points",i(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,Rn(t,e),r};let cs=-1;const eu=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},K4=function(t,e,i,r){const s=e.x+e.width/2,n=e.y+5,a=t.append("g");var o=a;r||(cs++,o.append("line").attr("id","actor"+cs).attr("x1",s).attr("y1",n).attr("x2",s).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),o=a.append("g"),e.actorCnt=cs,e.links!=null&&(o.attr("id","root-"+cs),Q0("#root-"+cs,cs)));const l=So();var h="actor";e.properties!=null&&e.properties.class?h=e.properties.class:l.fill="#eaeaea",l.x=e.x,l.y=e.y,l.width=e.width,l.height=e.height,l.class=h,l.rx=3,l.ry=3;const u=To(o,l);if(e.rectData=l,e.properties!=null&&e.properties.icon){const f=e.properties.icon.trim();f.charAt(0)==="@"?$0(o,l.x+l.width-20,l.y+10,f.substr(1)):J0(o,l.x+l.width-20,l.y+10,f)}ac(i)(e.description,o,l.x,l.y,l.width,l.height,{class:"actor"},i);let d=e.height;if(u.node){const f=u.node().getBBox();e.height=f.height,d=f.height}return d},Q4=function(t,e,i,r){const s=e.x+e.width/2,n=e.y+80;r||(cs++,t.append("line").attr("id","actor"+cs).attr("x1",s).attr("y1",n).attr("x2",s).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const a=t.append("g");a.attr("class","actor-man");const o=So();o.x=e.x,o.y=e.y,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,a.append("line").attr("id","actor-man-torso"+cs).attr("x1",s).attr("y1",e.y+25).attr("x2",s).attr("y2",e.y+45),a.append("line").attr("id","actor-man-arms"+cs).attr("x1",s-18).attr("y1",e.y+33).attr("x2",s+18).attr("y2",e.y+33),a.append("line").attr("x1",s-18).attr("y1",e.y+60).attr("x2",s).attr("y2",e.y+45),a.append("line").attr("x1",s).attr("y1",e.y+45).attr("x2",s+16).attr("y2",e.y+60);const l=a.append("circle");l.attr("cx",e.x+e.width/2),l.attr("cy",e.y+10),l.attr("r",15),l.attr("width",e.width),l.attr("height",e.height);const h=a.node().getBBox();return e.height=h.height,ac(i)(e.description,a,o.x,o.y+35,o.width,o.height,{class:"actor"},i),e.height},J4=function(t,e,i,r){switch(e.type){case"actor":return Q4(t,e,i,r);case"participant":return K4(t,e,i,r)}},$4=function(t,e,i){const s=t.append("g");iu(s,e),e.name&&ac(i)(e.name,s,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},i),s.lower()},t5=function(t){return t.append("g")},e5=function(t,e,i,r,s){const n=So(),a=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+s%3,n.width=e.stopx-e.startx,n.height=i-e.starty,To(a,n)},i5=function(t,e,i,r){const{boxMargin:s,boxTextMargin:n,labelBoxHeight:a,labelBoxWidth:o,messageFontFamily:l,messageFontSize:h,messageFontWeight:u}=r,d=t.append("g"),f=function(_,T,S,k){return d.append("line").attr("x1",_).attr("y1",T).attr("x2",S).attr("y2",k).attr("class","loopLine")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(_){f(e.startx,_.y,e.stopx,_.y).style("stroke-dasharray","3, 3")});let p=nc();p.text=i,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=h,p.fontWeight=u,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=a||20,p.textMargin=n,p.class="labelText",tu(d,p),p=nc(),p.text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+s+n,p.anchor="middle",p.valign="middle",p.textMargin=n,p.class="loopText",p.fontFamily=l,p.fontSize=h,p.fontWeight=u,p.wrap=!0;let b=Rn(d,p);return e.sectionTitles!==void 0&&e.sectionTitles.forEach(function(_,T){if(_.message){p.text=_.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[T].y+s+n,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=h,p.fontWeight=u,p.wrap=e.wrap,b=Rn(d,p);let S=Math.round(b.map(k=>(k._groups||k)[0][0].getBBox().height).reduce((k,I)=>k+I));e.sections[T].height+=S-(s+n)}}),e.height=Math.round(e.stopy-e.starty),d},iu=function(t,e){To(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},r5=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},s5=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},n5=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},a5=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},o5=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")},l5=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},c5=function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},nc=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},So=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},ac=function(){function t(s,n,a,o,l,h,u){const d=n.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("text-anchor","middle").text(s);r(d,u)}function e(s,n,a,o,l,h,u,d){const{actorFontSize:f,actorFontFamily:p,actorFontWeight:b}=d,[_,T]=Un(f),S=s.split(me.lineBreakRegex);for(let k=0;k<S.length;k++){const I=k*_-_*(S.length-1)/2,z=n.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").style("font-size",T).style("font-weight",b).style("font-family",p);z.append("tspan").attr("x",a+l/2).attr("dy",I).text(S[k]),z.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(z,u)}}function i(s,n,a,o,l,h,u,d){const f=n.append("switch"),b=f.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,f,a,o,l,h,u,d),r(b,u)}function r(s,n){for(const a in n)n.hasOwnProperty(a)&&s.attr(a,n[a])}return function(s){return s.textPlacement==="fo"?i:s.textPlacement==="old"?t:e}}(),h5=function(){function t(s,n,a,o,l,h,u){const d=n.append("text").attr("x",a).attr("y",o).style("text-anchor","start").text(s);r(d,u)}function e(s,n,a,o,l,h,u,d){const{actorFontSize:f,actorFontFamily:p,actorFontWeight:b}=d,_=s.split(me.lineBreakRegex);for(let T=0;T<_.length;T++){const S=T*f-f*(_.length-1)/2,k=n.append("text").attr("x",a).attr("y",o).style("text-anchor","start").style("font-size",f).style("font-weight",b).style("font-family",p);k.append("tspan").attr("x",a).attr("dy",S).text(_[T]),k.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(k,u)}}function i(s,n,a,o,l,h,u,d){const f=n.append("switch"),b=f.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,f,a,o,l,h,u,d),r(b,u)}function r(s,n){for(const a in n)n.hasOwnProperty(a)&&s.attr(a,n[a])}return function(s){return s.textPlacement==="fo"?i:s.textPlacement==="old"?t:e}}(),si={drawRect:To,drawText:Rn,drawLabel:tu,drawActor:J4,drawBox:$4,drawPopup:H4,drawImage:J0,drawEmbeddedImage:$0,anchorElement:t5,drawActivation:e5,drawLoop:i5,drawBackgroundRect:iu,insertArrowHead:a5,insertArrowFilledHead:o5,insertSequenceNumber:l5,insertArrowCrossHead:c5,insertDatabaseIcon:r5,insertComputerIcon:s5,insertClockIcon:n5,getTextObj:nc,getNoteRect:So,popupMenu:G4,popdownMenu:j4,fixLifeLineHeights:eu,sanitizeUrl:Vi.Nm};let q={};const At={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,su(P())},updateVal:function(t,e,i,r){t[e]===void 0?t[e]=i:t[e]=r(i,t[e])},updateBounds:function(t,e,i,r){const s=this;let n=0;function a(o){return function(h){n++;const u=s.sequenceItems.length-n+1;s.updateVal(h,"starty",e-u*q.boxMargin,Math.min),s.updateVal(h,"stopy",r+u*q.boxMargin,Math.max),s.updateVal(At.data,"startx",t-u*q.boxMargin,Math.min),s.updateVal(At.data,"stopx",i+u*q.boxMargin,Math.max),o!=="activation"&&(s.updateVal(h,"startx",t-u*q.boxMargin,Math.min),s.updateVal(h,"stopx",i+u*q.boxMargin,Math.max),s.updateVal(At.data,"starty",e-u*q.boxMargin,Math.min),s.updateVal(At.data,"stopy",r+u*q.boxMargin,Math.max))}}this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},insert:function(t,e,i,r){const s=Math.min(t,i),n=Math.max(t,i),a=Math.min(e,r),o=Math.max(e,r);this.updateVal(At.data,"startx",s,Math.min),this.updateVal(At.data,"starty",a,Math.min),this.updateVal(At.data,"stopx",n,Math.max),this.updateVal(At.data,"stopy",o,Math.max),this.updateBounds(s,a,n,o)},newActivation:function(t,e,i){const r=i[t.from.actor],s=wo(t.from.actor).length||0,n=r.x+r.width/2+(s-1)*q.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+q.activationWidth,stopy:void 0,actor:t.from.actor,anchored:si.anchorElement(e)})},endActivation:function(t){const e=this.activations.map(function(i){return i.actor}).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:At.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},u5=function(t,e){At.bumpVerticalPos(q.boxMargin),e.height=q.boxMargin,e.starty=At.getVerticalPos();const i=si.getNoteRect();i.x=e.startx,i.y=e.starty,i.width=e.width||q.width,i.class="note";const r=t.append("g"),s=si.drawRect(r,i),n=si.getTextObj();n.x=e.startx,n.y=e.starty,n.width=i.width,n.dy="1em",n.text=e.message,n.class="noteText",n.fontFamily=q.noteFontFamily,n.fontSize=q.noteFontSize,n.fontWeight=q.noteFontWeight,n.anchor=q.noteAlign,n.textMargin=q.noteMargin,n.valign="center";const a=Rn(r,n),o=Math.round(a.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,h)=>l+h));s.attr("height",o+2*q.noteMargin),e.height+=o+2*q.noteMargin,At.bumpVerticalPos(o+2*q.noteMargin),e.stopy=e.starty+o+2*q.noteMargin,e.stopx=e.startx+i.width,At.insert(e.startx,e.starty,e.stopx,e.stopy),At.models.addNote(e)},hn=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),Nn=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),oc=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});function d5(t,e){At.bumpVerticalPos(10);const{startx:i,stopx:r,message:s}=e,n=me.splitBreaks(s).length,a=xe.calculateTextDimensions(s,hn(q)),o=a.height/n;e.height+=o,At.bumpVerticalPos(o);let l,h=a.height-10;const u=a.width;if(i===r){l=At.getVerticalPos()+h,q.rightAngles||(h+=q.boxMargin,l=At.getVerticalPos()+h),h+=30;const d=Math.max(u/2,q.width/2);At.insert(i-d,At.getVerticalPos()-10+h,r+d,At.getVerticalPos()+30+h)}else h+=q.boxMargin,l=At.getVerticalPos()+h,At.insert(i,l-10,r,l);return At.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,At.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}const f5=function(t,e,i,r){const{startx:s,stopx:n,starty:a,message:o,type:l,sequenceIndex:h,sequenceVisible:u}=e,d=xe.calculateTextDimensions(o,hn(q)),f=si.getTextObj();f.x=s,f.y=a+10,f.width=n-s,f.class="messageText",f.dy="1em",f.text=o,f.fontFamily=q.messageFontFamily,f.fontSize=q.messageFontSize,f.fontWeight=q.messageFontWeight,f.anchor=q.messageAlign,f.valign="center",f.textMargin=q.wrapPadding,f.tspan=!1,Rn(t,f);const p=d.width;let b;s===n?q.rightAngles?b=t.append("path").attr("d",`M ${s},${i} H ${s+Math.max(q.width/2,p/2)} V ${i+25} H ${s}`):b=t.append("path").attr("d","M "+s+","+i+" C "+(s+60)+","+(i-10)+" "+(s+60)+","+(i+30)+" "+s+","+(i+20)):(b=t.append("line"),b.attr("x1",s),b.attr("y1",i),b.attr("x2",n),b.attr("y2",i)),l===r.db.LINETYPE.DOTTED||l===r.db.LINETYPE.DOTTED_CROSS||l===r.db.LINETYPE.DOTTED_POINT||l===r.db.LINETYPE.DOTTED_OPEN?(b.style("stroke-dasharray","3, 3"),b.attr("class","messageLine1")):b.attr("class","messageLine0");let _="";q.arrowMarkerAbsolute&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),b.attr("stroke-width",2),b.attr("stroke","none"),b.style("fill","none"),(l===r.db.LINETYPE.SOLID||l===r.db.LINETYPE.DOTTED)&&b.attr("marker-end","url("+_+"#arrowhead)"),(l===r.db.LINETYPE.SOLID_POINT||l===r.db.LINETYPE.DOTTED_POINT)&&b.attr("marker-end","url("+_+"#filled-head)"),(l===r.db.LINETYPE.SOLID_CROSS||l===r.db.LINETYPE.DOTTED_CROSS)&&b.attr("marker-end","url("+_+"#crosshead)"),(u||q.showSequenceNumbers)&&(b.attr("marker-start","url("+_+"#sequencenumber)"),t.append("text").attr("x",s).attr("y",i+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},lc=function(t,e,i,r,s,n,a){if(s.hideUnusedParticipants===!0){const d=new Set;n.forEach(f=>{d.add(f.from),d.add(f.to)}),i=i.filter(f=>d.has(f))}let o=0,l=0,h=0,u;for(const d of i){const f=e[d],p=f.box;u&&u!=p&&(a||At.models.addBox(u),l+=q.boxMargin+u.margin),p&&p!=u&&(a||(p.x=o+l,p.y=r),l+=p.margin),f.width=f.width||q.width,f.height=Math.max(f.height||q.height,q.height),f.margin=f.margin||q.actorMargin,f.x=o+l,f.y=At.getVerticalPos();const b=si.drawActor(t,f,q,a);h=Math.max(h,b),At.insert(f.x,r,f.x+f.width,f.height),o+=f.width+l,f.box&&(f.box.width=o+p.margin-f.box.x),l=f.margin,u=f.box,At.models.addActor(f)}u&&!a&&At.models.addBox(u),At.bumpVerticalPos(h)},ru=function(t,e,i,r){let s=0,n=0;for(const a of i){const o=e[a],l=y5(o),h=si.drawPopup(t,o,l,q,q.forceMenus,r);h.height>s&&(s=h.height),h.width+o.x>n&&(n=h.width+o.x)}return{maxHeight:s,maxWidth:n}},su=function(t){Oi(q,t),t.fontFamily&&(q.actorFontFamily=q.noteFontFamily=q.messageFontFamily=t.fontFamily),t.fontSize&&(q.actorFontSize=q.noteFontSize=q.messageFontSize=t.fontSize),t.fontWeight&&(q.actorFontWeight=q.noteFontWeight=q.messageFontWeight=t.fontWeight)},wo=function(t){return At.activations.filter(function(e){return e.actor===t})},nu=function(t,e){const i=e[t],r=wo(t),s=r.reduce(function(a,o){return Math.min(a,o.startx)},i.x+i.width/2),n=r.reduce(function(a,o){return Math.max(a,o.stopx)},i.x+i.width/2);return[s,n]};function hs(t,e,i,r,s){At.bumpVerticalPos(i);let n=r;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,o=hn(q);e.message=xe.wrapLabel(`[${e.message}]`,a-2*q.wrapPadding,o),e.width=a,e.wrap=!0;const l=xe.calculateTextDimensions(e.message,o),h=Math.max(l.height,q.labelBoxHeight);n=r+h,E.debug(`${h} - ${e.message}`)}s(e),At.bumpVerticalPos(n)}const p5=function(t,e,i,r){const{securityLevel:s,sequence:n}=P();q=n,r.db.clear(),r.parser.parse(t);let a;s==="sandbox"&&(a=(0,Q.Ys)("#i"+e));const o=s==="sandbox"?(0,Q.Ys)(a.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),l=s==="sandbox"?a.nodes()[0].contentDocument:document;At.init(),E.debug(r.db);const h=s==="sandbox"?o.select(`[id="${e}"]`):(0,Q.Ys)(`[id="${e}"]`),u=r.db.getActors(),d=r.db.getBoxes(),f=r.db.getActorKeys(),p=r.db.getMessages(),b=r.db.getDiagramTitle(),_=r.db.hasAtLeastOneBox(),T=r.db.hasAtLeastOneBoxWithTitle(),S=g5(u,p,r);q.height=m5(u,S,d),si.insertComputerIcon(h),si.insertDatabaseIcon(h),si.insertClockIcon(h),_&&(At.bumpVerticalPos(q.boxMargin),T&&At.bumpVerticalPos(d[0].textMaxHeight)),lc(h,u,f,0,q,p,!1);const k=k5(p,u,S,r);si.insertArrowHead(h),si.insertArrowCrossHead(h),si.insertArrowFilledHead(h),si.insertSequenceNumber(h);function I(O,y){const Y=At.endActivation(O);Y.starty+18>y&&(Y.starty=y-6,y+=12),si.drawActivation(h,Y,y,q,wo(O.from.actor).length),At.insert(Y.startx,y-10,Y.stopx,y)}let z=1,H=1;const rt=[];p.forEach(function(O){let y,Y,Bt;switch(O.type){case r.db.LINETYPE.NOTE:Y=O.noteModel,u5(h,Y);break;case r.db.LINETYPE.ACTIVE_START:At.newActivation(O,h,u);break;case r.db.LINETYPE.ACTIVE_END:I(O,At.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:hs(k,O,q.boxMargin,q.boxMargin+q.boxTextMargin,J=>At.newLoop(J));break;case r.db.LINETYPE.LOOP_END:y=At.endLoop(),si.drawLoop(h,y,"loop",q),At.bumpVerticalPos(y.stopy-At.getVerticalPos()),At.models.addLoop(y);break;case r.db.LINETYPE.RECT_START:hs(k,O,q.boxMargin,q.boxMargin,J=>At.newLoop(void 0,J.message));break;case r.db.LINETYPE.RECT_END:y=At.endLoop(),si.drawBackgroundRect(h,y),At.models.addLoop(y),At.bumpVerticalPos(y.stopy-At.getVerticalPos());break;case r.db.LINETYPE.OPT_START:hs(k,O,q.boxMargin,q.boxMargin+q.boxTextMargin,J=>At.newLoop(J));break;case r.db.LINETYPE.OPT_END:y=At.endLoop(),si.drawLoop(h,y,"opt",q),At.bumpVerticalPos(y.stopy-At.getVerticalPos()),At.models.addLoop(y);break;case r.db.LINETYPE.ALT_START:hs(k,O,q.boxMargin,q.boxMargin+q.boxTextMargin,J=>At.newLoop(J));break;case r.db.LINETYPE.ALT_ELSE:hs(k,O,q.boxMargin+q.boxTextMargin,q.boxMargin,J=>At.addSectionToLoop(J));break;case r.db.LINETYPE.ALT_END:y=At.endLoop(),si.drawLoop(h,y,"alt",q),At.bumpVerticalPos(y.stopy-At.getVerticalPos()),At.models.addLoop(y);break;case r.db.LINETYPE.PAR_START:hs(k,O,q.boxMargin,q.boxMargin+q.boxTextMargin,J=>At.newLoop(J));break;case r.db.LINETYPE.PAR_AND:hs(k,O,q.boxMargin+q.boxTextMargin,q.boxMargin,J=>At.addSectionToLoop(J));break;case r.db.LINETYPE.PAR_END:y=At.endLoop(),si.drawLoop(h,y,"par",q),At.bumpVerticalPos(y.stopy-At.getVerticalPos()),At.models.addLoop(y);break;case r.db.LINETYPE.AUTONUMBER:z=O.message.start||z,H=O.message.step||H,O.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:hs(k,O,q.boxMargin,q.boxMargin+q.boxTextMargin,J=>At.newLoop(J));break;case r.db.LINETYPE.CRITICAL_OPTION:hs(k,O,q.boxMargin+q.boxTextMargin,q.boxMargin,J=>At.addSectionToLoop(J));break;case r.db.LINETYPE.CRITICAL_END:y=At.endLoop(),si.drawLoop(h,y,"critical",q),At.bumpVerticalPos(y.stopy-At.getVerticalPos()),At.models.addLoop(y);break;case r.db.LINETYPE.BREAK_START:hs(k,O,q.boxMargin,q.boxMargin+q.boxTextMargin,J=>At.newLoop(J));break;case r.db.LINETYPE.BREAK_END:y=At.endLoop(),si.drawLoop(h,y,"break",q),At.bumpVerticalPos(y.stopy-At.getVerticalPos()),At.models.addLoop(y);break;default:try{Bt=O.msgModel,Bt.starty=At.getVerticalPos(),Bt.sequenceIndex=z,Bt.sequenceVisible=r.db.showSequenceNumbers();const J=d5(h,Bt);rt.push({messageModel:Bt,lineStartY:J}),At.models.addMessage(Bt)}catch(J){E.error("error while drawing message",J)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(O.type)&&(z=z+H)}),rt.forEach(O=>f5(h,O.messageModel,O.lineStartY,r)),q.mirrorActors&&(At.bumpVerticalPos(q.boxMargin*2),lc(h,u,f,At.getVerticalPos(),q,p,!0),At.bumpVerticalPos(q.boxMargin),eu(h,At.getVerticalPos())),At.models.boxes.forEach(function(O){O.height=At.getVerticalPos()-O.y,At.insert(O.x,O.y,O.x+O.width,O.height),O.startx=O.x,O.starty=O.y,O.stopx=O.startx+O.width,O.stopy=O.starty+O.height,O.stroke="rgb(0,0,0, 0.5)",si.drawBox(h,O,q)}),_&&At.bumpVerticalPos(q.boxMargin);const R=ru(h,u,f,l),{bounds:F}=At.getBounds();E.debug("For line height fix Querying: #"+e+" .actor-line"),(0,Q.td_)("#"+e+" .actor-line").attr("y2",F.stopy);let L=F.stopy-F.starty;L<R.maxHeight&&(L=R.maxHeight);let w=L+2*q.diagramMarginY;q.mirrorActors&&(w=w-q.boxMargin+q.bottomMarginAdj);let m=F.stopx-F.startx;m<R.maxWidth&&(m=R.maxWidth);const B=m+2*q.diagramMarginX;b&&h.append("text").text(b).attr("x",(F.stopx-F.startx)/2-2*q.diagramMarginX).attr("y",-25),Wr(h,w,B,q.useMaxWidth);const g=b?40:0;h.attr("viewBox",F.startx-q.diagramMarginX+" -"+(q.diagramMarginY+g)+" "+B+" "+(w+g)),E.debug("models:",At.models)};function g5(t,e,i){const r={};return e.forEach(function(s){if(t[s.to]&&t[s.from]){const n=t[s.to];if(s.placement===i.db.PLACEMENT.LEFTOF&&!n.prevActor||s.placement===i.db.PLACEMENT.RIGHTOF&&!n.nextActor)return;const a=s.placement!==void 0,o=!a,l=a?Nn(q):hn(q),h=s.wrap?xe.wrapLabel(s.message,q.width-2*q.wrapPadding,l):s.message,d=xe.calculateTextDimensions(h,l).width+2*q.wrapPadding;o&&s.from===n.nextActor?r[s.to]=Math.max(r[s.to]||0,d):o&&s.from===n.prevActor?r[s.from]=Math.max(r[s.from]||0,d):o&&s.from===s.to?(r[s.from]=Math.max(r[s.from]||0,d/2),r[s.to]=Math.max(r[s.to]||0,d/2)):s.placement===i.db.PLACEMENT.RIGHTOF?r[s.from]=Math.max(r[s.from]||0,d):s.placement===i.db.PLACEMENT.LEFTOF?r[n.prevActor]=Math.max(r[n.prevActor]||0,d):s.placement===i.db.PLACEMENT.OVER&&(n.prevActor&&(r[n.prevActor]=Math.max(r[n.prevActor]||0,d/2)),n.nextActor&&(r[s.from]=Math.max(r[s.from]||0,d/2)))}}),E.debug("maxMessageWidthPerActor:",r),r}const y5=function(t){let e=0;const i=oc(q);for(const r in t.links){const n=xe.calculateTextDimensions(r,i).width+2*q.wrapPadding+2*q.boxMargin;e<n&&(e=n)}return e};function m5(t,e,i){let r=0;Object.keys(t).forEach(n=>{const a=t[n];a.wrap&&(a.description=xe.wrapLabel(a.description,q.width-2*q.wrapPadding,oc(q)));const o=xe.calculateTextDimensions(a.description,oc(q));a.width=a.wrap?q.width:Math.max(q.width,o.width+2*q.wrapPadding),a.height=a.wrap?Math.max(o.height,q.height):q.height,r=Math.max(r,a.height)});for(const n in e){const a=t[n];if(!a)continue;const o=t[a.nextActor];if(!o){const d=e[n]+q.actorMargin-a.width/2;a.margin=Math.max(d,q.actorMargin);continue}const h=e[n]+q.actorMargin-a.width/2-o.width/2;a.margin=Math.max(h,q.actorMargin)}let s=0;return i.forEach(n=>{const a=hn(q);let o=n.actorKeys.reduce((u,d)=>u+=t[d].width+(t[d].margin||0),0);o-=2*q.boxTextMargin,n.wrap&&(n.name=xe.wrapLabel(n.name,o-2*q.wrapPadding,a));const l=xe.calculateTextDimensions(n.name,a);s=Math.max(l.height,s);const h=Math.max(o,l.width+2*q.wrapPadding);if(n.margin=q.boxTextMargin,o<h){const u=(h-o)/2;n.margin+=u}}),i.forEach(n=>n.textMaxHeight=s),Math.max(r,q.height)}const b5=function(t,e,i){const r=e[t.from].x,s=e[t.to].x,n=t.wrap&&t.message;let a=xe.calculateTextDimensions(n?xe.wrapLabel(t.message,q.width,Nn(q)):t.message,Nn(q));const o={width:n?q.width:Math.max(q.width,a.width+2*q.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===i.db.PLACEMENT.RIGHTOF?(o.width=n?Math.max(q.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*q.noteMargin),o.startx=r+(e[t.from].width+q.actorMargin)/2):t.placement===i.db.PLACEMENT.LEFTOF?(o.width=Math.max(n?q.width:e[t.from].width/2+e[t.to].width/2,a.width+2*q.noteMargin),o.startx=r-o.width+(e[t.from].width-q.actorMargin)/2):t.to===t.from?(a=xe.calculateTextDimensions(n?xe.wrapLabel(t.message,Math.max(q.width,e[t.from].width),Nn(q)):t.message,Nn(q)),o.width=n?Math.max(q.width,e[t.from].width):Math.max(e[t.from].width,q.width,a.width+2*q.noteMargin),o.startx=r+(e[t.from].width-o.width)/2):(o.width=Math.abs(r+e[t.from].width/2-(s+e[t.to].width/2))+q.actorMargin,o.startx=r<s?r+e[t.from].width/2-q.actorMargin/2:s+e[t.to].width/2-q.actorMargin/2),n&&(o.message=xe.wrapLabel(t.message,o.width-2*q.wrapPadding,Nn(q))),E.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o},x5=function(t,e,i){let r=!1;if([i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(r=!0),!r)return{};const s=nu(t.from,e),n=nu(t.to,e),a=s[0]<=n[0]?1:0,o=s[0]<n[0]?0:1,l=[...s,...n],h=Math.abs(n[o]-s[a]);t.wrap&&t.message&&(t.message=xe.wrapLabel(t.message,Math.max(h+2*q.wrapPadding,q.width),hn(q)));const u=xe.calculateTextDimensions(t.message,hn(q));return{width:Math.max(t.wrap?0:u.width+2*q.wrapPadding,h+2*q.wrapPadding,q.width),height:0,startx:s[a],stopx:n[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}},k5=function(t,e,i,r){const s={},n=[];let a,o,l;return t.forEach(function(h){switch(h.id=xe.random({length:10}),h.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:n.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:h.message&&(a=n.pop(),s[a.id]=a,s[h.id]=a,n.push(a));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:a=n.pop(),s[a.id]=a;break;case r.db.LINETYPE.ACTIVE_START:{const d=e[h.from?h.from.actor:h.to.actor],f=wo(h.from?h.from.actor:h.to.actor).length,p=d.x+d.width/2+(f-1)*q.activationWidth/2,b={startx:p,stopx:p+q.activationWidth,actor:h.from.actor,enabled:!0};At.activations.push(b)}break;case r.db.LINETYPE.ACTIVE_END:{const d=At.activations.map(f=>f.actor).lastIndexOf(h.from.actor);delete At.activations.splice(d,1)[0]}break}h.placement!==void 0?(o=b5(h,e,r),h.noteModel=o,n.forEach(d=>{a=d,a.from=Math.min(a.from,o.startx),a.to=Math.max(a.to,o.startx+o.width),a.width=Math.max(a.width,Math.abs(a.from-a.to))-q.labelBoxWidth})):(l=x5(h,e,r),h.msgModel=l,l.startx&&l.stopx&&n.length>0&&n.forEach(d=>{if(a=d,l.startx===l.stopx){const f=e[h.from],p=e[h.to];a.from=Math.min(f.x-l.width/2,f.x-f.width/2,a.from),a.to=Math.max(p.x+l.width/2,p.x+f.width/2,a.to),a.width=Math.max(a.width,Math.abs(a.to-a.from))-q.labelBoxWidth}else a.from=Math.min(l.startx,a.from),a.to=Math.max(l.stopx,a.to),a.width=Math.max(a.width,l.width)-q.labelBoxWidth}))}),At.activations=[],E.debug("Loop type widths:",s),s},au={bounds:At,drawActors:lc,drawActorsPopup:ru,setConf:su,draw:p5};var cc=function(){var t=function(nt,at,it,et){for(it=it||{},et=nt.length;et--;it[nt[et]]=at);return it},e=[1,2],i=[1,3],r=[1,5],s=[1,7],n=[2,5],a=[1,15],o=[1,17],l=[1,21],h=[1,22],u=[1,23],d=[1,24],f=[1,37],p=[1,25],b=[1,26],_=[1,27],T=[1,28],S=[1,29],k=[1,32],I=[1,33],z=[1,34],H=[1,35],rt=[1,36],R=[1,39],F=[1,40],v=[1,41],L=[1,42],w=[1,38],m=[1,45],B=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],g=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],O=[1,4,5,7,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],y=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],Y={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,classDefStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,class:42,CLASSENTITY_IDS:43,STYLECLASS:44,openDirective:45,typeDirective:46,closeDirective:47,":":48,argDirective:49,direction_tb:50,direction_bt:51,direction_rl:52,direction_lr:53,eol:54,";":55,EDGE_STATE:56,STYLE_SEPARATOR:57,left_of:58,right_of:59,open_directive:60,type_directive:61,arg_directive:62,close_directive:63,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"class",43:"CLASSENTITY_IDS",44:"STYLECLASS",48:":",50:"direction_tb",51:"direction_bt",52:"direction_rl",53:"direction_lr",55:";",56:"EDGE_STATE",57:"STYLE_SEPARATOR",58:"left_of",59:"right_of",60:"open_directive",61:"type_directive",62:"arg_directive",63:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[11,3],[11,3],[12,3],[6,3],[6,5],[32,1],[32,1],[32,1],[32,1],[54,1],[54,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1],[45,1],[46,1],[49,1],[47,1]],performAction:function(at,it,et,Tt,xt,Z,jt){var U=Z.length-1;switch(xt){case 4:return Tt.setRootDoc(Z[U]),Z[U];case 5:this.$=[];break;case 6:Z[U]!="nl"&&(Z[U-1].push(Z[U]),this.$=Z[U-1]);break;case 7:case 8:this.$=Z[U];break;case 9:this.$="nl";break;case 12:this.$=Z[U];break;case 13:const N=Z[U-1];N.description=Tt.trimColon(Z[U]),this.$=N;break;case 14:this.$={stmt:"relation",state1:Z[U-2],state2:Z[U]};break;case 15:const A=Tt.trimColon(Z[U]);this.$={stmt:"relation",state1:Z[U-3],state2:Z[U-1],description:A};break;case 19:this.$={stmt:"state",id:Z[U-3],type:"default",description:"",doc:Z[U-1]};break;case 20:var gt=Z[U],tt=Z[U-2].trim();if(Z[U].match(":")){var K=Z[U].split(":");gt=K[0],tt=[tt,K[1]]}this.$={stmt:"state",id:gt,type:"default",description:tt};break;case 21:this.$={stmt:"state",id:Z[U-3],type:"default",description:Z[U-5],doc:Z[U-1]};break;case 22:this.$={stmt:"state",id:Z[U],type:"fork"};break;case 23:this.$={stmt:"state",id:Z[U],type:"join"};break;case 24:this.$={stmt:"state",id:Z[U],type:"choice"};break;case 25:this.$={stmt:"state",id:Tt.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:Z[U-1].trim(),note:{position:Z[U-2].trim(),text:Z[U].trim()}};break;case 30:this.$=Z[U].trim(),Tt.setAccTitle(this.$);break;case 31:case 32:this.$=Z[U].trim(),Tt.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:Z[U-1].trim(),classes:Z[U].trim()};break;case 35:this.$={stmt:"applyClass",id:Z[U-1].trim(),styleClass:Z[U].trim()};break;case 38:Tt.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:Tt.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:Tt.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:Tt.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:Z[U].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:Z[U-2].trim(),classes:[Z[U].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:Z[U-2].trim(),classes:[Z[U].trim()],type:"default",description:""};break;case 50:Tt.parseDirective("%%{","open_directive");break;case 51:Tt.parseDirective(Z[U],"type_directive");break;case 52:Z[U]=Z[U].trim().replace(/'/g,'"'),Tt.parseDirective(Z[U],"arg_directive");break;case 53:Tt.parseDirective("}%%","close_directive","state");break}},table:[{3:1,4:e,5:i,6:4,7:r,45:6,60:s},{1:[3]},{3:8,4:e,5:i,6:4,7:r,45:6,60:s},{3:9,4:e,5:i,6:4,7:r,45:6,60:s},{3:10,4:e,5:i,6:4,7:r,45:6,60:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],n,{8:11}),{46:12,61:[1,13]},{61:[2,50]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,22:d,24:f,25:p,26:b,27:_,28:T,29:S,32:31,33:k,35:I,37:z,38:H,42:rt,45:6,50:R,51:F,52:v,53:L,56:w,60:s},{47:43,48:[1,44],63:m},t([48,63],[2,51]),t(B,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:l,17:h,19:u,22:d,24:f,25:p,26:b,27:_,28:T,29:S,32:31,33:k,35:I,37:z,38:H,42:rt,45:6,50:R,51:F,52:v,53:L,56:w,60:s},t(B,[2,8]),t(B,[2,9]),t(B,[2,10]),t(B,[2,11]),t(B,[2,12],{14:[1,47],15:[1,48]}),t(B,[2,16]),{18:[1,49]},t(B,[2,18],{20:[1,50]}),{23:[1,51]},t(B,[2,22]),t(B,[2,23]),t(B,[2,24]),t(B,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},t(B,[2,28]),t(B,[2,29]),{34:[1,56]},{36:[1,57]},t(B,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},t(g,[2,44],{57:[1,61]}),t(g,[2,45],{57:[1,62]}),t(B,[2,38]),t(B,[2,39]),t(B,[2,40]),t(B,[2,41]),t(O,[2,36]),{49:63,62:[1,64]},t(O,[2,53]),t(B,[2,7]),t(B,[2,13]),{13:65,24:f,56:w},t(B,[2,17]),t(y,n,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},t(B,[2,30]),t(B,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:m},{63:[2,52]},t(B,[2,14],{14:[1,76]}),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,21:[1,77],22:d,24:f,25:p,26:b,27:_,28:T,29:S,32:31,33:k,35:I,37:z,38:H,42:rt,45:6,50:R,51:F,52:v,53:L,56:w,60:s},t(B,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},t(B,[2,33]),t(B,[2,34]),t(B,[2,35]),t(g,[2,46]),t(g,[2,47]),t(O,[2,37]),t(B,[2,15]),t(B,[2,19]),t(y,n,{8:81}),t(B,[2,26]),t(B,[2,27]),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,21:[1,82],22:d,24:f,25:p,26:b,27:_,28:T,29:S,32:31,33:k,35:I,37:z,38:H,42:rt,45:6,50:R,51:F,52:v,53:L,56:w,60:s},t(B,[2,21])],defaultActions:{7:[2,50],8:[2,1],9:[2,2],10:[2,3],54:[2,48],55:[2,49],64:[2,52]},parseError:function(at,it){if(it.recoverable)this.trace(at);else{var et=new Error(at);throw et.hash=it,et}},parse:function(at){var it=this,et=[0],Tt=[],xt=[null],Z=[],jt=this.table,U="",gt=0,tt=0,K=2,N=1,A=Z.slice.call(arguments,1),G=Object.create(this.lexer),C={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&(C.yy[ft]=this.yy[ft]);G.setInput(at,C.yy),C.yy.lexer=G,C.yy.parser=this,typeof G.yylloc=="undefined"&&(G.yylloc={});var x=G.yylloc;Z.push(x);var Qt=G.options&&G.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(){var ee;return ee=Tt.pop()||G.lex()||N,typeof ee!="number"&&(ee instanceof Array&&(Tt=ee,ee=Tt.pop()),ee=it.symbols_[ee]||ee),ee}for(var Nt,wt,kt,yt,_t={},mt,Ct,Xe,Oe;;){if(wt=et[et.length-1],this.defaultActions[wt]?kt=this.defaultActions[wt]:((Nt===null||typeof Nt=="undefined")&&(Nt=j()),kt=jt[wt]&&jt[wt][Nt]),typeof kt=="undefined"||!kt.length||!kt[0]){var ie="";Oe=[];for(mt in jt[wt])this.terminals_[mt]&&mt>K&&Oe.push("'"+this.terminals_[mt]+"'");G.showPosition?ie="Parse error on line "+(gt+1)+`:
1361
+ `+G.showPosition()+`
1362
+ Expecting `+Oe.join(", ")+", got '"+(this.terminals_[Nt]||Nt)+"'":ie="Parse error on line "+(gt+1)+": Unexpected "+(Nt==N?"end of input":"'"+(this.terminals_[Nt]||Nt)+"'"),this.parseError(ie,{text:G.match,token:this.terminals_[Nt]||Nt,line:G.yylineno,loc:x,expected:Oe})}if(kt[0]instanceof Array&&kt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+wt+", token: "+Nt);switch(kt[0]){case 1:et.push(Nt),xt.push(G.yytext),Z.push(G.yylloc),et.push(kt[1]),Nt=null,tt=G.yyleng,U=G.yytext,gt=G.yylineno,x=G.yylloc;break;case 2:if(Ct=this.productions_[kt[1]][1],_t.$=xt[xt.length-Ct],_t._$={first_line:Z[Z.length-(Ct||1)].first_line,last_line:Z[Z.length-1].last_line,first_column:Z[Z.length-(Ct||1)].first_column,last_column:Z[Z.length-1].last_column},Qt&&(_t._$.range=[Z[Z.length-(Ct||1)].range[0],Z[Z.length-1].range[1]]),yt=this.performAction.apply(_t,[U,tt,gt,C.yy,kt[1],xt,Z].concat(A)),typeof yt!="undefined")return yt;Ct&&(et=et.slice(0,-1*Ct*2),xt=xt.slice(0,-1*Ct),Z=Z.slice(0,-1*Ct)),et.push(this.productions_[kt[1]][0]),xt.push(_t.$),Z.push(_t._$),Xe=jt[et[et.length-2]][et[et.length-1]],et.push(Xe);break;case 3:return!0}}return!0}},Bt=function(){var nt={EOF:1,parseError:function(it,et){if(this.yy.parser)this.yy.parser.parseError(it,et);else throw new Error(it)},setInput:function(at,it){return this.yy=it||this.yy||{},this._input=at,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var at=this._input[0];this.yytext+=at,this.yyleng++,this.offset++,this.match+=at,this.matched+=at;var it=at.match(/(?:\r\n?|\n).*/g);return it?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),at},unput:function(at){var it=at.length,et=at.split(/(?:\r\n?|\n)/g);this._input=at+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-it),this.offset-=it;var Tt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),et.length-1&&(this.yylineno-=et.length-1);var xt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:et?(et.length===Tt.length?this.yylloc.first_column:0)+Tt[Tt.length-et.length].length-et[0].length:this.yylloc.first_column-it},this.options.ranges&&(this.yylloc.range=[xt[0],xt[0]+this.yyleng-it]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1363
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(at){this.unput(this.match.slice(at))},pastInput:function(){var at=this.matched.substr(0,this.matched.length-this.match.length);return(at.length>20?"...":"")+at.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var at=this.match;return at.length<20&&(at+=this._input.substr(0,20-at.length)),(at.substr(0,20)+(at.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var at=this.pastInput(),it=new Array(at.length+1).join("-");return at+this.upcomingInput()+`
1364
+ `+it+"^"},test_match:function(at,it){var et,Tt,xt;if(this.options.backtrack_lexer&&(xt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(xt.yylloc.range=this.yylloc.range.slice(0))),Tt=at[0].match(/(?:\r\n?|\n).*/g),Tt&&(this.yylineno+=Tt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Tt?Tt[Tt.length-1].length-Tt[Tt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+at[0].length},this.yytext+=at[0],this.match+=at[0],this.matches=at,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(at[0].length),this.matched+=at[0],et=this.performAction.call(this,this.yy,this,it,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),et)return et;if(this._backtrack){for(var Z in xt)this[Z]=xt[Z];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var at,it,et,Tt;this._more||(this.yytext="",this.match="");for(var xt=this._currentRules(),Z=0;Z<xt.length;Z++)if(et=this._input.match(this.rules[xt[Z]]),et&&(!it||et[0].length>it[0].length)){if(it=et,Tt=Z,this.options.backtrack_lexer){if(at=this.test_match(et,xt[Z]),at!==!1)return at;if(this._backtrack){it=!1;continue}else return!1}else if(!this.options.flex)break}return it?(at=this.test_match(it,xt[Tt]),at!==!1?at:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1365
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var it=this.next();return it||this.lex()},begin:function(it){this.conditionStack.push(it)},popState:function(){var it=this.conditionStack.length-1;return it>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(it){return it=this.conditionStack.length-1-Math.abs(it||0),it>=0?this.conditionStack[it]:"INITIAL"},pushState:function(it){this.begin(it)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(it,et,Tt,xt){switch(Tt){case 0:return 41;case 1:return 50;case 2:return 51;case 3:return 52;case 4:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:break;case 11:break;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:break;case 17:return this.pushState("SCALE"),17;case 18:return 18;case 19:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 25:this.popState();break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 34:return this.pushState("SCALE"),17;case 35:return 18;case 36:this.popState();break;case 37:this.pushState("STATE");break;case 38:return this.popState(),et.yytext=et.yytext.slice(0,-8).trim(),25;case 39:return this.popState(),et.yytext=et.yytext.slice(0,-8).trim(),26;case 40:return this.popState(),et.yytext=et.yytext.slice(0,-10).trim(),27;case 41:return this.popState(),et.yytext=et.yytext.slice(0,-8).trim(),25;case 42:return this.popState(),et.yytext=et.yytext.slice(0,-8).trim(),26;case 43:return this.popState(),et.yytext=et.yytext.slice(0,-10).trim(),27;case 44:return 50;case 45:return 51;case 46:return 52;case 47:return 53;case 48:this.pushState("STATE_STRING");break;case 49:return this.pushState("STATE_ID"),"AS";case 50:return this.popState(),"ID";case 51:this.popState();break;case 52:return"STATE_DESCR";case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;case 56:break;case 57:return this.popState(),21;case 58:break;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:break;case 65:return"NOTE_TEXT";case 66:return this.popState(),"ID";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),et.yytext=et.yytext.substr(2).trim(),31;case 69:return this.popState(),et.yytext=et.yytext.slice(0,-8).trim(),31;case 70:return 7;case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return et.yytext=et.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 79:return 5;case 80:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[14,15],inclusive:!1},close_directive:{rules:[14,15],inclusive:!1},arg_directive:{rules:[8,9,14,15],inclusive:!1},type_directive:{rules:[7,8,14,15],inclusive:!1},open_directive:{rules:[6,14,15],inclusive:!1},struct:{rules:[14,15,27,31,37,44,45,46,47,56,57,58,59,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[66],inclusive:!1},FLOATING_NOTE:{rules:[63,64,65],inclusive:!1},NOTE_TEXT:{rules:[68,69],inclusive:!1},NOTE_ID:{rules:[67],inclusive:!1},NOTE:{rules:[60,61,62],inclusive:!1},CLASS_STYLE:{rules:[33],inclusive:!1},CLASS:{rules:[32],inclusive:!1},CLASSDEFID:{rules:[30],inclusive:!1},CLASSDEF:{rules:[28,29],inclusive:!1},acc_descr_multiline:{rules:[25,26],inclusive:!1},acc_descr:{rules:[23],inclusive:!1},acc_title:{rules:[21],inclusive:!1},SCALE:{rules:[18,19,35,36],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[50],inclusive:!1},STATE_STRING:{rules:[51,52],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[14,15,38,39,40,41,42,43,48,49,53,54,55],inclusive:!1},ID:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,10,11,12,13,15,16,17,20,22,24,27,31,34,37,55,59,70,71,72,73,74,75,76,78,79,80],inclusive:!0}}};return nt}();Y.lexer=Bt;function J(){this.yy={}}return J.prototype=Y,Y.Parser=J,new J}();cc.parser=cc;const ou=cc,_5=(t,e)=>{var i;return((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*stateDiagram/)!==null},E5=(t,e)=>{var i;return!!(t.match(/^\s*stateDiagram-v2/)!==null||t.match(/^\s*stateDiagram/)&&((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper")},lu="LR",v5="TB",Ao="state",hc="relation",C5="classDef",T5="applyClass",xa="default",cu="divider",uc="[*]",hu="start",uu=uc,du="end",fu="color",pu="fill",S5="bgFill",w5=",";function gu(){return{}}let yu=lu,Lo=[],ka=gu();const mu=()=>({relations:[],states:{},documents:{}});let Bo={root:mu()},qi=Bo.root,_a=0,bu=0;const A5={LINE:0,DOTTED_LINE:1},L5={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Io=t=>JSON.parse(JSON.stringify(t)),B5=function(t,e,i){ii.parseDirective(this,t,e,i)},I5=t=>{E.info("Setting root doc",t),Lo=t},D5=()=>Lo,Do=(t,e,i)=>{if(e.stmt===hc)Do(t,e.state1,!0),Do(t,e.state2,!1);else if(e.stmt===Ao&&(e.id==="[*]"?(e.id=i?t.id+"_start":t.id+"_end",e.start=i):e.id=e.id.trim()),e.doc){const r=[];let s=[],n;for(n=0;n<e.doc.length;n++)if(e.doc[n].type===cu){const a=Io(e.doc[n]);a.doc=Io(s),r.push(a),s=[]}else s.push(e.doc[n]);if(r.length>0&&s.length>0){const a={stmt:Ao,id:d1(),type:"divider",doc:Io(s)};r.push(Io(a)),e.doc=r}e.doc.forEach(a=>Do(e,a,!0))}},R5=()=>(Do({id:"root"},{id:"root",doc:Lo},!0),{id:"root",doc:Lo}),N5=t=>{let e;t.doc?e=t.doc:e=t,E.info(e),xu(!0),E.info("Extract",e),e.forEach(i=>{switch(i.stmt){case Ao:un(i.id.trim(),i.type,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles);break;case hc:ku(i.state1,i.state2,i.description);break;case C5:_u(i.id.trim(),i.classes);break;case T5:gc(i.id.trim(),i.styleClass);break}})},un=function(t,e=xa,i=null,r=null,s=null,n=null,a=null,o=null){const l=t==null?void 0:t.trim();qi.states[l]===void 0?(E.info("Adding state ",l,r),qi.states[l]={id:l,descriptions:[],type:e,doc:i,note:s,classes:[],styles:[],textStyles:[]}):(qi.states[l].doc||(qi.states[l].doc=i),qi.states[l].type||(qi.states[l].type=e)),r&&(E.info("Setting state description",l,r),typeof r=="string"&&pc(l,r.trim()),typeof r=="object"&&r.forEach(h=>pc(l,h.trim()))),s&&(qi.states[l].note=s,qi.states[l].note.text=me.sanitizeText(qi.states[l].note.text,P())),n&&(E.info("Setting state classes",l,n),(typeof n=="string"?[n]:n).forEach(u=>gc(l,u.trim()))),a&&(E.info("Setting state styles",l,a),(typeof a=="string"?[a]:a).forEach(u=>Z5(l,u.trim()))),o&&(E.info("Setting state styles",l,a),(typeof o=="string"?[o]:o).forEach(u=>H5(l,u.trim())))},xu=function(t){Bo={root:mu()},qi=Bo.root,_a=0,ka=gu(),t||ur()},Ea=function(t){return qi.states[t]},O5=function(){return qi.states},F5=function(){E.info("Documents = ",Bo)},M5=function(){return qi.relations};function dc(t=""){let e=t;return t===uc&&(_a++,e=`${hu}${_a}`),e}function fc(t="",e=xa){return t===uc?hu:e}function P5(t=""){let e=t;return t===uu&&(_a++,e=`${du}${_a}`),e}function V5(t="",e=xa){return t===uu?du:e}function Y5(t,e,i){let r=dc(t.id.trim()),s=fc(t.id.trim(),t.type),n=dc(e.id.trim()),a=fc(e.id.trim(),e.type);un(r,s,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),un(n,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),qi.relations.push({id1:r,id2:n,relationTitle:me.sanitizeText(i,P())})}const ku=function(t,e,i){if(typeof t=="object")Y5(t,e,i);else{const r=dc(t.trim()),s=fc(t),n=P5(e.trim()),a=V5(e);un(r,s),un(n,a),qi.relations.push({id1:r,id2:n,title:me.sanitizeText(i,P())})}},pc=function(t,e){const i=qi.states[t],r=e.startsWith(":")?e.replace(":","").trim():e;i.descriptions.push(me.sanitizeText(r,P()))},z5=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},W5=()=>(bu++,"divider-id-"+bu),_u=function(t,e=""){ka[t]===void 0&&(ka[t]={id:t,styles:[],textStyles:[]});const i=ka[t];e!=null&&e.split(w5).forEach(r=>{const s=r.replace(/([^;]*);/,"$1").trim();if(r.match(fu)){const a=s.replace(pu,S5).replace(fu,pu);i.textStyles.push(a)}i.styles.push(s)})},U5=function(){return ka},gc=function(t,e){t.split(",").forEach(function(i){let r=Ea(i);if(r===void 0){const s=i.trim();un(s),r=Ea(s)}r.classes.push(e)})},Z5=function(t,e){const i=Ea(t);i!==void 0&&i.textStyles.push(e)},H5=function(t,e){const i=Ea(t);i!==void 0&&i.textStyles.push(e)},Ss={parseDirective:B5,getConfig:()=>P().state,addState:un,clear:xu,getState:Ea,getStates:O5,getRelations:M5,getClasses:U5,getDirection:()=>yu,addRelation:ku,getDividerId:W5,setDirection:t=>{yu=t},cleanupLabel:z5,lineType:A5,relationType:L5,logDocuments:F5,getRootDoc:D5,setRootDoc:I5,getRootDocV2:R5,extract:N5,trimColon:t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),getAccTitle:vr,setAccTitle:dr,getAccDescription:Tr,setAccDescription:Cr,addStyleClass:_u,setCssClass:gc,addDescription:pc,setDiagramTitle:Ur,getDiagramTitle:Zr},yc={},G5=(t,e)=>{yc[t]=e},j5=t=>yc[t],Eu=()=>Object.keys(yc),q5={get:j5,set:G5,keys:Eu,size:()=>Eu().length},X5=t=>t.append("circle").attr("class","start-state").attr("r",P().state.sizeUnit).attr("cx",P().state.padding+P().state.sizeUnit).attr("cy",P().state.padding+P().state.sizeUnit),K5=t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",P().state.textHeight).attr("class","divider").attr("x2",P().state.textHeight*2).attr("y1",0).attr("y2",0),Q5=(t,e)=>{const i=t.append("text").attr("x",2*P().state.padding).attr("y",P().state.textHeight+2*P().state.padding).attr("font-size",P().state.fontSize).attr("class","state-title").text(e.id),r=i.node().getBBox();return t.insert("rect",":first-child").attr("x",P().state.padding).attr("y",P().state.padding).attr("width",r.width+2*P().state.padding).attr("height",r.height+2*P().state.padding).attr("rx",P().state.radius),i},J5=(t,e)=>{const i=function(f,p,b){const _=f.append("tspan").attr("x",2*P().state.padding).text(p);b||_.attr("dy",P().state.textHeight)},s=t.append("text").attr("x",2*P().state.padding).attr("y",P().state.textHeight+1.3*P().state.padding).attr("font-size",P().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=s.height,a=t.append("text").attr("x",P().state.padding).attr("y",n+P().state.padding*.4+P().state.dividerMargin+P().state.textHeight).attr("class","state-description");let o=!0,l=!0;e.descriptions.forEach(function(f){o||(i(a,f,l),l=!1),o=!1});const h=t.append("line").attr("x1",P().state.padding).attr("y1",P().state.padding+n+P().state.dividerMargin/2).attr("y2",P().state.padding+n+P().state.dividerMargin/2).attr("class","descr-divider"),u=a.node().getBBox(),d=Math.max(u.width,s.width);return h.attr("x2",d+3*P().state.padding),t.insert("rect",":first-child").attr("x",P().state.padding).attr("y",P().state.padding).attr("width",d+2*P().state.padding).attr("height",u.height+n+2*P().state.padding).attr("rx",P().state.radius),t},$5=(t,e,i)=>{const r=P().state.padding,s=2*P().state.padding,n=t.node().getBBox(),a=n.width,o=n.x,l=t.append("text").attr("x",0).attr("y",P().state.titleShift).attr("font-size",P().state.fontSize).attr("class","state-title").text(e.id),u=l.node().getBBox().width+s;let d=Math.max(u,a);d===a&&(d=d+s);let f;const p=t.node().getBBox();e.doc,f=o-r,u>a&&(f=(a-d)/2+r),Math.abs(o-p.x)<r&&u>a&&(f=o-(u-a)/2);const b=1-P().state.textHeight;return t.insert("rect",":first-child").attr("x",f).attr("y",b).attr("class",i?"alt-composit":"composit").attr("width",d).attr("height",p.height+P().state.textHeight+P().state.titleShift+1).attr("rx","0"),l.attr("x",f+r),u<=a&&l.attr("x",o+(d-s)/2-u/2+r),t.insert("rect",":first-child").attr("x",f).attr("y",P().state.titleShift-P().state.textHeight-P().state.padding).attr("width",d).attr("height",P().state.textHeight*3).attr("rx",P().state.radius),t.insert("rect",":first-child").attr("x",f).attr("y",P().state.titleShift-P().state.textHeight-P().state.padding).attr("width",d).attr("height",p.height+3+2*P().state.textHeight).attr("rx",P().state.radius),t},tm=t=>(t.append("circle").attr("class","end-state-outer").attr("r",P().state.sizeUnit+P().state.miniPadding).attr("cx",P().state.padding+P().state.sizeUnit+P().state.miniPadding).attr("cy",P().state.padding+P().state.sizeUnit+P().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",P().state.sizeUnit).attr("cx",P().state.padding+P().state.sizeUnit+2).attr("cy",P().state.padding+P().state.sizeUnit+2)),em=(t,e)=>{let i=P().state.forkWidth,r=P().state.forkHeight;if(e.parentId){let s=i;i=r,r=s}return t.append("rect").style("stroke","black").style("fill","black").attr("width",i).attr("height",r).attr("x",P().state.padding).attr("y",P().state.padding)},im=(t,e,i,r)=>{let s=0;const n=r.append("text");n.style("text-anchor","start"),n.attr("class","noteText");let a=t.replace(/\r\n/g,"<br/>");a=a.replace(/\n/g,"<br/>");const o=a.split(me.lineBreakRegex);let l=1.25*P().state.noteMargin;for(const h of o){const u=h.trim();if(u.length>0){const d=n.append("tspan");if(d.text(u),l===0){const f=d.node().getBBox();l+=f.height}s+=l,d.attr("x",e+P().state.noteMargin),d.attr("y",i+s+1.25*P().state.noteMargin)}}return{textWidth:n.node().getBBox().width,textHeight:s}},rm=(t,e)=>{e.attr("class","state-note");const i=e.append("rect").attr("x",0).attr("y",P().state.padding),r=e.append("g"),{textWidth:s,textHeight:n}=im(t,0,0,r);return i.attr("height",n+2*P().state.noteMargin),i.attr("width",s+P().state.noteMargin*2),i},vu=function(t,e){const i=e.id,r={id:i,label:e.id,width:0,height:0},s=t.append("g").attr("id",i).attr("class","stateGroup");e.type==="start"&&X5(s),e.type==="end"&&tm(s),(e.type==="fork"||e.type==="join")&&em(s,e),e.type==="note"&&rm(e.note.text,s),e.type==="divider"&&K5(s),e.type==="default"&&e.descriptions.length===0&&Q5(s,e),e.type==="default"&&e.descriptions.length>0&&J5(s,e);const n=s.node().getBBox();return r.width=n.width+2*P().state.padding,r.height=n.height+2*P().state.padding,q5.set(i,r),r};let Cu=0;const sm=function(t,e,i){const r=function(l){switch(l){case Ss.relationType.AGGREGATION:return"aggregation";case Ss.relationType.EXTENSION:return"extension";case Ss.relationType.COMPOSITION:return"composition";case Ss.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter(l=>!Number.isNaN(l.y));const s=e.points,n=(0,Q.jvg)().x(function(l){return l.x}).y(function(l){return l.y}).curve(Q.$0Z),a=t.append("path").attr("d",n(s)).attr("id","edge"+Cu).attr("class","transition");let o="";if(P().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+r(Ss.relationType.DEPENDENCY)+"End)"),i.title!==void 0){const l=t.append("g").attr("class","stateLabel"),{x:h,y:u}=xe.calcLabelPosition(e.points),d=me.getRows(i.title);let f=0;const p=[];let b=0,_=0;for(let k=0;k<=d.length;k++){const I=l.append("text").attr("text-anchor","middle").text(d[k]).attr("x",h).attr("y",u+f),z=I.node().getBBox();b=Math.max(b,z.width),_=Math.min(_,z.x),E.info(z.x,h,u+f),f===0&&(f=I.node().getBBox().height,E.info("Title height",f,u)),p.push(I)}let T=f*d.length;if(d.length>1){const k=(d.length-1)*f*.5;p.forEach((I,z)=>I.attr("y",u+z*f-k)),T=f*d.length}const S=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",h-b/2-P().state.padding/2).attr("y",u-T/2-P().state.padding/2-3.5).attr("width",b+P().state.padding).attr("height",T+P().state.padding),E.info(S)}Cu++};let wr;const mc={},nm=function(){},am=function(t){t.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 19,7 L9,13 L14,7 L9,1 Z")},om=function(t,e,i,r){wr=P().state;const s=P().securityLevel;let n;s==="sandbox"&&(n=(0,Q.Ys)("#i"+e));const a=s==="sandbox"?(0,Q.Ys)(n.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),o=s==="sandbox"?n.nodes()[0].contentDocument:document;E.debug("Rendering diagram "+t);const l=a.select(`[id='${e}']`);am(l),new Be.k({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel(function(){return{}});const u=r.db.getRootDoc();Tu(u,l,void 0,!1,a,o,r);const d=wr.padding,f=l.node().getBBox(),p=f.width+d*2,b=f.height+d*2,_=p*1.75;Wr(l,b,_,wr.useMaxWidth),l.attr("viewBox",`${f.x-wr.padding} ${f.y-wr.padding} `+p+" "+b)},lm=t=>t?t.length*wr.fontSizeFactor:1,Tu=(t,e,i,r,s,n,a)=>{const o=new Be.k({compound:!0,multigraph:!0});let l,h=!0;for(l=0;l<t.length;l++)if(t[l].stmt==="relation"){h=!1;break}i?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:wr.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:wr.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}}),a.db.extract(t);const u=a.db.getStates(),d=a.db.getRelations(),f=Object.keys(u);for(const S of f){const k=u[S];i&&(k.parentId=i);let I;if(k.doc){let z=e.append("g").attr("id",k.id).attr("class","stateGroup");I=Tu(k.doc,z,k.id,!r,s,n,a);{z=$5(z,k,r);let H=z.node().getBBox();I.width=H.width,I.height=H.height+wr.padding/2,mc[k.id]={y:wr.compositTitleSize}}}else I=vu(e,k);if(k.note){const z={descriptions:[],id:k.id+"-note",note:k.note,type:"note"},H=vu(e,z);k.note.position==="left of"?(o.setNode(I.id+"-note",H),o.setNode(I.id,I)):(o.setNode(I.id,I),o.setNode(I.id+"-note",H)),o.setParent(I.id,I.id+"-group"),o.setParent(I.id+"-note",I.id+"-group")}else o.setNode(I.id,I)}E.debug("Count=",o.nodeCount(),o);let p=0;d.forEach(function(S){p++,E.debug("Setting edge",S),o.setEdge(S.id1,S.id2,{relation:S,width:lm(S.title),height:wr.labelHeight*me.getRows(S.title).length,labelpos:"c"},"id"+p)}),(0,be.bK)(o),E.debug("Graph after layout",o.nodes());const b=e.node();o.nodes().forEach(function(S){S!==void 0&&o.node(S)!==void 0?(E.warn("Node "+S+": "+JSON.stringify(o.node(S))),s.select("#"+b.id+" #"+S).attr("transform","translate("+(o.node(S).x-o.node(S).width/2)+","+(o.node(S).y+(mc[S]?mc[S].y:0)-o.node(S).height/2)+" )"),s.select("#"+b.id+" #"+S).attr("data-x-shift",o.node(S).x-o.node(S).width/2),n.querySelectorAll("#"+b.id+" #"+S+" .divider").forEach(I=>{const z=I.parentElement;let H=0,rt=0;z&&(z.parentElement&&(H=z.parentElement.getBBox().width),rt=parseInt(z.getAttribute("data-x-shift"),10),Number.isNaN(rt)&&(rt=0)),I.setAttribute("x1",0-rt+8),I.setAttribute("x2",H-rt-8)})):E.debug("No Node "+S+": "+JSON.stringify(o.node(S)))});let _=b.getBBox();o.edges().forEach(function(S){S!==void 0&&o.edge(S)!==void 0&&(E.debug("Edge "+S.v+" -> "+S.w+": "+JSON.stringify(o.edge(S))),sm(e,o.edge(S),o.edge(S).relation))}),_=b.getBBox();const T={id:i||"root",label:i||"root",width:0,height:0};return T.width=_.width+2*wr.padding,T.height=_.height+2*wr.padding,E.debug("Doc rendered",T,o),T},cm={setConf:nm,draw:om},Ro="rect",bc="rectWithTitle",hm="start",um="end",dm="divider",fm="roundedWithTitle",pm="note",gm="noteGroup",On="statediagram",ym=`${On}-state`,Su="transition",mm="note",bm=`${Su} note-edge`,xm=`${On}-${mm}`,km=`${On}-cluster`,_m=`${On}-cluster-alt`,wu="parent",Au="note",Em="state",xc="----",vm=`${xc}${Au}`,Lu=`${xc}${wu}`,Bu="fill:none",Iu="fill: #333",Du="c",Ru="text",Nu="normal";let No={},Gs=0;const Cm=function(t){const e=Object.keys(t);for(const i of e)t[i]},Tm=function(t,e){E.trace("Extracting classes"),e.db.clear();try{return e.parser.parse(t),e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}catch(i){return i}};function Sm(t){return t==null?"":t.classes?t.classes.join(" "):""}function kc(t="",e=0,i="",r=xc){const s=i!==null&&i.length>0?`${r}${i}`:"";return`${Em}-${t}${s}-${e}`}const va=(t,e,i,r,s,n)=>{const a=i.id,o=Sm(r[a]);if(a!=="root"){let l=Ro;i.start===!0&&(l=hm),i.start===!1&&(l=um),i.type!==xa&&(l=i.type),No[a]||(No[a]={id:a,shape:l,description:me.sanitizeText(a,P()),classes:`${o} ${ym}`});const h=No[a];i.description&&(Array.isArray(h.description)?(h.shape=bc,h.description.push(i.description)):h.description.length>0?(h.shape=bc,h.description===a?h.description=[i.description]:h.description=[h.description,i.description]):(h.shape=Ro,h.description=i.description),h.description=me.sanitizeTextOrArray(h.description,P())),h.description.length===1&&h.shape===bc&&(h.shape=Ro),!h.type&&i.doc&&(E.info("Setting cluster for ",a,_c(i)),h.type="group",h.dir=_c(i),h.shape=i.type===cu?dm:fm,h.classes=h.classes+" "+km+" "+(n?_m:""));const u={labelStyle:"",shape:h.shape,labelText:h.description,classes:h.classes,style:"",id:a,dir:h.dir,domId:kc(a,Gs),type:h.type,padding:15};if(i.note){const d={labelStyle:"",shape:pm,labelText:i.note.text,classes:xm,style:"",id:a+vm+"-"+Gs,domId:kc(a,Gs,Au),type:h.type,padding:15},f={labelStyle:"",shape:gm,labelText:i.note.text,classes:h.classes,style:"",id:a+Lu,domId:kc(a,Gs,wu),type:"group",padding:0};Gs++;const p=a+Lu;t.setNode(p,f),t.setNode(d.id,d),t.setNode(a,u),t.setParent(a,p),t.setParent(d.id,p);let b=a,_=d.id;i.note.position==="left of"&&(b=d.id,_=a),t.setEdge(b,_,{arrowhead:"none",arrowType:"",style:Bu,labelStyle:"",classes:bm,arrowheadStyle:Iu,labelpos:Du,labelType:Ru,thickness:Nu})}else t.setNode(a,u)}e&&e.id!=="root"&&(E.trace("Setting node ",a," to be child of its parent ",e.id),t.setParent(a,e.id)),i.doc&&(E.trace("Adding nodes children "),wm(t,i,i.doc,r,s,!n))},wm=(t,e,i,r,s,n)=>{E.trace("items",i),i.forEach(a=>{switch(a.stmt){case Ao:va(t,e,a,r,s,n);break;case xa:va(t,e,a,r,s,n);break;case hc:{va(t,e,a.state1,r,s,n),va(t,e,a.state2,r,s,n);const o={id:"edge"+Gs,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Bu,labelStyle:"",label:me.sanitizeText(a.description,P()),arrowheadStyle:Iu,labelpos:Du,labelType:Ru,thickness:Nu,classes:Su};t.setEdge(a.state1.id,a.state2.id,o,Gs),Gs++}break}})},_c=(t,e=v5)=>{let i=e;if(t.doc)for(let r=0;r<t.doc.length;r++){const s=t.doc[r];s.stmt==="dir"&&(i=s.value)}return i},Am={setConf:Cm,getClasses:Tm,draw:function(t,e,i,r){E.info("Drawing state diagram (v2)",e),No={};let s=r.db.getDirection();s===void 0&&(s=lu);const{securityLevel:n,state:a}=P(),o=a.nodeSpacing||50,l=a.rankSpacing||50;E.info(r.db.getRootDocV2()),r.db.extract(r.db.getRootDocV2()),E.info(r.db.getRootDocV2());const h=r.db.getStates(),u=new Be.k({multigraph:!0,compound:!0}).setGraph({rankdir:_c(r.db.getRootDocV2()),nodesep:o,ranksep:l,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});va(u,void 0,r.db.getRootDocV2(),h,r.db,!0);let d;n==="sandbox"&&(d=(0,Q.Ys)("#i"+e));const f=n==="sandbox"?(0,Q.Ys)(d.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),p=f.select(`[id="${e}"]`),b=f.select("#"+e+" g");wl(b,u,["barb"],On,e);const _=8;xe.insertTitle(p,"statediagramTitleText",a.titleTopMargin,r.db.getDiagramTitle());const T=p.node().getBBox(),S=T.width+_*2,k=T.height+_*2;p.attr("class",On);const I=p.node().getBBox();Wr(p,k,S,a.useMaxWidth);const z=`${I.x-_} ${I.y-_} ${S} ${k}`;E.debug(`viewBox ${z}`),p.attr("viewBox",z);const H=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const rt of H){const R=rt.getBBox(),F=document.createElementNS("http://www.w3.org/2000/svg",Ro);F.setAttribute("rx",0),F.setAttribute("ry",0),F.setAttribute("width",R.width),F.setAttribute("height",R.height),rt.insertBefore(F,rt.firstChild)}}};var Ec=function(){var t=function(_,T,S,k){for(S=S||{},k=_.length;k--;S[_[k]]=T);return S},e=[1,2],i=[1,5],r=[6,9,11,17,18,20,22,23,24,26],s=[1,15],n=[1,16],a=[1,17],o=[1,18],l=[1,19],h=[1,20],u=[1,24],d=[4,6,9,11,17,18,20,22,23,24,26],f={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(T,S,k,I,z,H,rt){var R=H.length-1;switch(z){case 1:return H[R-1];case 3:this.$=[];break;case 4:H[R-1].push(H[R]),this.$=H[R-1];break;case 5:case 6:this.$=H[R];break;case 7:case 8:this.$=[];break;case 11:I.setDiagramTitle(H[R].substr(6)),this.$=H[R].substr(6);break;case 12:this.$=H[R].trim(),I.setAccTitle(this.$);break;case 13:case 14:this.$=H[R].trim(),I.setAccDescription(this.$);break;case 15:I.addSection(H[R].substr(8)),this.$=H[R].substr(8);break;case 16:I.addTask(H[R-1],H[R]),this.$="task";break;case 18:I.parseDirective("%%{","open_directive");break;case 19:I.parseDirective(H[R],"type_directive");break;case 20:H[R]=H[R].trim().replace(/'/g,'"'),I.parseDirective(H[R],"arg_directive");break;case 21:I.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:i},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:i},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:s,18:n,20:a,22:o,23:l,24:h,26:i},{1:[2,2]},{14:22,15:[1,23],29:u},t([15,29],[2,19]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:21,10:25,12:4,17:s,18:n,20:a,22:o,23:l,24:h,26:i},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),{19:[1,26]},{21:[1,27]},t(r,[2,14]),t(r,[2,15]),{25:[1,28]},t(r,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(r,[2,5]),t(r,[2,12]),t(r,[2,13]),t(r,[2,16]),t(d,[2,9]),{14:32,29:u},{29:[2,20]},{11:[1,33]},t(d,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(T,S){if(S.recoverable)this.trace(T);else{var k=new Error(T);throw k.hash=S,k}},parse:function(T){var S=this,k=[0],I=[],z=[null],H=[],rt=this.table,R="",F=0,v=0,L=2,w=1,m=H.slice.call(arguments,1),B=Object.create(this.lexer),g={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(g.yy[O]=this.yy[O]);B.setInput(T,g.yy),g.yy.lexer=B,g.yy.parser=this,typeof B.yylloc=="undefined"&&(B.yylloc={});var y=B.yylloc;H.push(y);var Y=B.options&&B.options.ranges;typeof g.yy.parseError=="function"?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Bt(){var gt;return gt=I.pop()||B.lex()||w,typeof gt!="number"&&(gt instanceof Array&&(I=gt,gt=I.pop()),gt=S.symbols_[gt]||gt),gt}for(var J,nt,at,it,et={},Tt,xt,Z,jt;;){if(nt=k[k.length-1],this.defaultActions[nt]?at=this.defaultActions[nt]:((J===null||typeof J=="undefined")&&(J=Bt()),at=rt[nt]&&rt[nt][J]),typeof at=="undefined"||!at.length||!at[0]){var U="";jt=[];for(Tt in rt[nt])this.terminals_[Tt]&&Tt>L&&jt.push("'"+this.terminals_[Tt]+"'");B.showPosition?U="Parse error on line "+(F+1)+`:
1366
+ `+B.showPosition()+`
1367
+ Expecting `+jt.join(", ")+", got '"+(this.terminals_[J]||J)+"'":U="Parse error on line "+(F+1)+": Unexpected "+(J==w?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(U,{text:B.match,token:this.terminals_[J]||J,line:B.yylineno,loc:y,expected:jt})}if(at[0]instanceof Array&&at.length>1)throw new Error("Parse Error: multiple actions possible at state: "+nt+", token: "+J);switch(at[0]){case 1:k.push(J),z.push(B.yytext),H.push(B.yylloc),k.push(at[1]),J=null,v=B.yyleng,R=B.yytext,F=B.yylineno,y=B.yylloc;break;case 2:if(xt=this.productions_[at[1]][1],et.$=z[z.length-xt],et._$={first_line:H[H.length-(xt||1)].first_line,last_line:H[H.length-1].last_line,first_column:H[H.length-(xt||1)].first_column,last_column:H[H.length-1].last_column},Y&&(et._$.range=[H[H.length-(xt||1)].range[0],H[H.length-1].range[1]]),it=this.performAction.apply(et,[R,v,F,g.yy,at[1],z,H].concat(m)),typeof it!="undefined")return it;xt&&(k=k.slice(0,-1*xt*2),z=z.slice(0,-1*xt),H=H.slice(0,-1*xt)),k.push(this.productions_[at[1]][0]),z.push(et.$),H.push(et._$),Z=rt[k[k.length-2]][k[k.length-1]],k.push(Z);break;case 3:return!0}}return!0}},p=function(){var _={EOF:1,parseError:function(S,k){if(this.yy.parser)this.yy.parser.parseError(S,k);else throw new Error(S)},setInput:function(T,S){return this.yy=S||this.yy||{},this._input=T,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var S=T.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),T},unput:function(T){var S=T.length,k=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var I=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var z=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:k?(k.length===I.length?this.yylloc.first_column:0)+I[I.length-k.length].length-k[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1368
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(T){this.unput(this.match.slice(T))},pastInput:function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var T=this.pastInput(),S=new Array(T.length+1).join("-");return T+this.upcomingInput()+`
1369
+ `+S+"^"},test_match:function(T,S){var k,I,z;if(this.options.backtrack_lexer&&(z={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(z.yylloc.range=this.yylloc.range.slice(0))),I=T[0].match(/(?:\r\n?|\n).*/g),I&&(this.yylineno+=I.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:I?I[I.length-1].length-I[I.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(T[0].length),this.matched+=T[0],k=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var H in z)this[H]=z[H];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,S,k,I;this._more||(this.yytext="",this.match="");for(var z=this._currentRules(),H=0;H<z.length;H++)if(k=this._input.match(this.rules[z[H]]),k&&(!S||k[0].length>S[0].length)){if(S=k,I=H,this.options.backtrack_lexer){if(T=this.test_match(k,z[H]),T!==!1)return T;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(T=this.test_match(S,z[I]),T!==!1?T:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1370
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(S,k,I,z){switch(I){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return _}();f.lexer=p;function b(){this.yy={}}return b.prototype=f,f.Parser=b,new b}();Ec.parser=Ec;const Lm=Ec,Bm=t=>t.match(/^\s*journey/)!==null;let Fn="";const vc=[],Ca=[],Ta=[],Im=function(t,e,i){ii.parseDirective(this,t,e,i)},Dm=function(){vc.length=0,Ca.length=0,Fn="",Ta.length=0,ur()},Rm=function(t){Fn=t,vc.push(t)},Nm=function(){return vc},Om=function(){let t=Ou();const e=100;let i=0;for(;!t&&i<e;)t=Ou(),i++;return Ca.push(...Ta),Ca},Fm=function(){const t=[];return Ca.forEach(i=>{i.people&&t.push(...i.people)}),[...new Set(t)].sort()},Mm=function(t,e){const i=e.substr(1).split(":");let r=0,s=[];i.length===1?(r=Number(i[0]),s=[]):(r=Number(i[0]),s=i[1].split(","));const n=s.map(o=>o.trim()),a={section:Fn,type:Fn,people:n,task:t,score:r};Ta.push(a)},Pm=function(t){const e={section:Fn,type:Fn,description:t,task:t,classes:[]};Ca.push(e)},Ou=function(){const t=function(i){return Ta[i].processed};let e=!0;for(const[i,r]of Ta.entries())t(i),e=e&&r.processed;return e},Fu={parseDirective:Im,getConfig:()=>P().journey,clear:Dm,setDiagramTitle:Ur,getDiagramTitle:Zr,setAccTitle:dr,getAccTitle:vr,setAccDescription:Cr,getAccDescription:Tr,addSection:Rm,getSections:Nm,getTasks:Om,addTask:Mm,addTaskOrg:Pm,getActors:function(){return Fm()}},Oo=function(t,e){const i=t.append("rect");return i.attr("x",e.x),i.attr("y",e.y),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("width",e.width),i.attr("height",e.height),i.attr("rx",e.rx),i.attr("ry",e.ry),e.class!==void 0&&i.attr("class",e.class),i},Vm=function(t,e){const r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");s.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function n(l){const h=(0,Q.Nb1)().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(l){const h=(0,Q.Nb1)().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?n(s):e.score<3?a(s):o(s),r},Mu=function(t,e){const i=t.append("circle");return i.attr("cx",e.cx),i.attr("cy",e.cy),i.attr("class","actor-"+e.pos),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("r",e.r),i.class!==void 0&&i.attr("class",i.class),e.title!==void 0&&i.append("title").text(e.title),i},Pu=function(t,e){const i=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class!==void 0&&r.attr("class",e.class);const s=r.append("tspan");return s.attr("x",e.x+e.textMargin*2),s.text(i),r},Ym=function(t,e){function i(s,n,a,o,l){return s+","+n+" "+(s+a)+","+n+" "+(s+a)+","+(n+o-l)+" "+(s+a-l*1.2)+","+(n+o)+" "+s+","+(n+o)}const r=t.append("polygon");r.attr("points",i(e.x,e.y,50,20,7)),r.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,Pu(t,e)},zm=function(t,e,i){const r=t.append("g"),s=Cc();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=i.width,s.height=i.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,Oo(r,s),Yu(i)(e.text,r,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},i,e.colour)};let Vu=-1;const Wm=function(t,e,i){const r=e.x+i.width/2,s=t.append("g");Vu++;const n=300+5*30;s.append("line").attr("id","task"+Vu).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",n).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Vm(s,{cx:r,cy:300+(5-e.score)*30,score:e.score});const a=Cc();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=i.width,a.height=i.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,Oo(s,a);let o=e.x+14;e.people.forEach(l=>{const h=e.actors[l].color,u={cx:o,cy:e.y,r:7,fill:h,stroke:"#000",title:l,pos:e.actors[l].position};Mu(s,u),o+=10}),Yu(i)(e.task,s,a.x,a.y,a.width,a.height,{class:"task"},i,e.colour)},Um=function(t,e){Oo(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},Zm=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},Cc=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},Yu=function(){function t(s,n,a,o,l,h,u,d){const f=n.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("font-color",d).style("text-anchor","middle").text(s);r(f,u)}function e(s,n,a,o,l,h,u,d,f){const{taskFontSize:p,taskFontFamily:b}=d,_=s.split(/<br\s*\/?>/gi);for(let T=0;T<_.length;T++){const S=T*p-p*(_.length-1)/2,k=n.append("text").attr("x",a+l/2).attr("y",o).attr("fill",f).style("text-anchor","middle").style("font-size",p).style("font-family",b);k.append("tspan").attr("x",a+l/2).attr("dy",S).text(_[T]),k.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(k,u)}}function i(s,n,a,o,l,h,u,d){const f=n.append("switch"),b=f.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,f,a,o,l,h,u,d),r(b,u)}function r(s,n){for(const a in n)a in n&&s.attr(a,n[a])}return function(s){return s.textPlacement==="fo"?i:s.textPlacement==="old"?t:e}}(),Sa={drawRect:Oo,drawCircle:Mu,drawSection:zm,drawText:Pu,drawLabel:Ym,drawTask:Wm,drawBackgroundRect:Um,getTextObj:Zm,getNoteRect:Cc,initGraphics:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")}},Hm=function(t){Object.keys(t).forEach(function(i){Fo[i]=t[i]})},ws={};function Gm(t){const e=P().journey;let i=60;Object.keys(ws).forEach(r=>{const s=ws[r].color,n={cx:20,cy:i,r:7,fill:s,stroke:"#000",pos:ws[r].position};Sa.drawCircle(t,n);const a={x:40,y:i+7,fill:"#666",text:r,textMargin:e.boxTextMargin|5};Sa.drawText(t,a),i+=20})}const Fo=P().journey,dn=Fo.leftMargin,jm=function(t,e,i,r){const s=P().journey;r.db.clear(),r.parser.parse(t+`
1371
+ `);const n=P().securityLevel;let a;n==="sandbox"&&(a=(0,Q.Ys)("#i"+e));const o=n==="sandbox"?(0,Q.Ys)(a.nodes()[0].contentDocument.body):(0,Q.Ys)("body");Mr.init();const l=o.select("#"+e);Sa.initGraphics(l);const h=r.db.getTasks(),u=r.db.getDiagramTitle(),d=r.db.getActors();for(const S in ws)delete ws[S];let f=0;d.forEach(S=>{ws[S]={color:s.actorColours[f%s.actorColours.length],position:f},f++}),Gm(l),Mr.insert(0,0,dn,Object.keys(ws).length*50),qm(l,h,0);const p=Mr.getBounds();u&&l.append("text").text(u).attr("x",dn).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const b=p.stopy-p.starty+2*s.diagramMarginY,_=dn+p.stopx+2*s.diagramMarginX;Wr(l,b,_,s.useMaxWidth),l.append("line").attr("x1",dn).attr("y1",s.height*4).attr("x2",_-dn-4).attr("y2",s.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const T=u?70:0;l.attr("viewBox",`${p.startx} -25 ${_} ${b+T}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",b+T+25)},Mr={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,i,r){t[e]===void 0?t[e]=i:t[e]=r(i,t[e])},updateBounds:function(t,e,i,r){const s=P().journey,n=this;let a=0;function o(l){return function(u){a++;const d=n.sequenceItems.length-a+1;n.updateVal(u,"starty",e-d*s.boxMargin,Math.min),n.updateVal(u,"stopy",r+d*s.boxMargin,Math.max),n.updateVal(Mr.data,"startx",t-d*s.boxMargin,Math.min),n.updateVal(Mr.data,"stopx",i+d*s.boxMargin,Math.max),l!=="activation"&&(n.updateVal(u,"startx",t-d*s.boxMargin,Math.min),n.updateVal(u,"stopx",i+d*s.boxMargin,Math.max),n.updateVal(Mr.data,"starty",e-d*s.boxMargin,Math.min),n.updateVal(Mr.data,"stopy",r+d*s.boxMargin,Math.max))}}this.sequenceItems.forEach(o())},insert:function(t,e,i,r){const s=Math.min(t,i),n=Math.max(t,i),a=Math.min(e,r),o=Math.max(e,r);this.updateVal(Mr.data,"startx",s,Math.min),this.updateVal(Mr.data,"starty",a,Math.min),this.updateVal(Mr.data,"stopx",n,Math.max),this.updateVal(Mr.data,"stopy",o,Math.max),this.updateBounds(s,a,n,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Tc=Fo.sectionFills,zu=Fo.sectionColours,qm=function(t,e,i){const r=P().journey;let s="";const n=r.height*2+r.diagramMarginY,a=i+n;let o=0,l="#CCC",h="black",u=0;for(const[d,f]of e.entries()){if(s!==f.section){l=Tc[o%Tc.length],u=o%Tc.length,h=zu[o%zu.length];const b={x:d*r.taskMargin+d*r.width+dn,y:50,text:f.section,fill:l,num:u,colour:h};Sa.drawSection(t,b,r),s=f.section,o++}const p=f.people.reduce((b,_)=>(ws[_]&&(b[_]=ws[_]),b),{});f.x=d*r.taskMargin+d*r.width+dn,f.y=a,f.width=r.diagramMarginX,f.height=r.diagramMarginY,f.colour=h,f.fill=l,f.num=u,f.actors=p,Sa.drawTask(t,f,r),Mr.insert(f.x,f.y,f.x+f.width+r.taskMargin,300+5*30)}},Wu={setConf:Hm,draw:jm};let Uu={};const Mo={setConf:function(t){Uu=Ba(Ba({},Uu),t)},draw:(t,e,i)=>{try{E.debug(`Renering svg for syntax error
1372
+ `);const r=(0,Q.Ys)("#"+e),s=r.append("g");s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+i),r.attr("height",100),r.attr("width",500),r.attr("viewBox","768 0 912 512")}catch(r){E.error("Error while rendering info diagram"),E.error(Zf(r))}}},Zu="flowchart-elk",Xm={id:Zu,detector:(t,e)=>{var i;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk")},loader:()=>br(this,null,function*(){const{diagram:t}=yield Promise.all([ct.e(9517),ct.e(1160)]).then(ct.bind(ct,19487));return{id:Zu,diagram:t}})},Hu="timeline",Km={id:Hu,detector:t=>t.match(/^\s*timeline/)!==null,loader:()=>br(this,null,function*(){const{diagram:t}=yield Promise.all([ct.e(9517),ct.e(5493)]).then(ct.bind(ct,96316));return{id:Hu,diagram:t}})},Gu="mindmap",Qm={id:Gu,detector:t=>t.match(/^\s*mindmap/)!==null,loader:()=>br(this,null,function*(){const{diagram:t}=yield Promise.all([ct.e(9517),ct.e(5493),ct.e(8359),ct.e(8329),ct.e(4607)]).then(ct.bind(ct,47724));return{id:Gu,diagram:t}})};let ju=!1;const wa=()=>{ju||(ju=!0,l1(Xm,Km,Qm),Si("error",{db:{clear:()=>{}},styles:ol,renderer:Mo,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),Si("---",{db:{clear:()=>{}},styles:ol,renderer:Mo,parser:{parser:{yy:{}},parse:()=>{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 unindented `---` blocks")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),Si("c4",{parser:Fp,db:W1,renderer:Q1,styles:L1,init:t=>{Q1.setConf(t.c4)}},Mp),Si("class",{parser:J1,db:Tn,renderer:Qg,styles:jn,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Tn.clear()}},vg),Si("classDiagram",{parser:J1,db:Tn,renderer:Uy,styles:jn,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Tn.clear()}},Cg),Si("er",{parser:Zy,db:Xy,renderer:a3,styles:E1},Hy),Si("gantt",{parser:v3,db:jl,renderer:e4,styles:v1},C3),Si("info",{parser:i4,db:r4,renderer:s4,styles:C1},n4),Si("pie",{parser:a4,db:l4,renderer:c4,styles:T1},o4),Si("requirement",{parser:h4,db:d4,renderer:x4,styles:S1},u4),Si("sequence",{parser:k4,db:X0,renderer:au,styles:w1,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");X0.setWrap(t.wrap),au.setConf(t.sequence)}},_4),Si("state",{parser:ou,db:Ss,renderer:cm,styles:Ha,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ss.clear()}},_5),Si("stateDiagram",{parser:ou,db:Ss,renderer:Am,styles:Ha,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ss.clear()}},E5),Si("journey",{parser:Lm,db:Fu,renderer:Wu,styles:A1,init:t=>{Wu.setConf(t.journey),Fu.clear()}},Bm),Si("flowchart",{parser:Il,db:os,renderer:Ol,styles:Za,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,_3.setConf(t.flowchart),os.clear(),os.setGen("gen-1")}},o3),Si("flowchart-v2",{parser:Il,db:os,renderer:Ol,styles:Za,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,m1({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),Ol.setConf(t.flowchart),os.clear(),os.setGen("gen-2")}},l3),Si("gitGraph",{parser:op,db:wp,renderer:Np,styles:Op},lp))};class Sc{constructor(e,i){var r,s;this.txt=e,this.type="graph",this.detectTypeFailed=!1;const n=P();this.txt=e;try{this.type=tl(e,n)}catch(l){this.handleError(l,i),this.type="error",this.detectTypeFailed=!0}const a=D1(this.type);E.debug("Type "+this.type),this.db=a.db,(s=(r=this.db).clear)==null||s.call(r),this.renderer=a.renderer,this.parser=a.parser;const o=this.parser.parse.bind(this.parser);this.parser.parse=l=>o(Cf(l,this.db)),this.parser.parser.yy=this.db,a.init&&(a.init(n),E.info("Initialized diagram "+this.type,n)),this.txt+=`
1373
+ `,this.parse(this.txt,i)}parse(e,i){var r,s;if(this.detectTypeFailed)return!1;try{return e=e+`
1374
+ `,(s=(r=this.db).clear)==null||s.call(r),this.parser.parse(e),!0}catch(n){this.handleError(n,i)}return!1}handleError(e,i){if(i===void 0)throw e;if(nl(e)){i(e.str,e.hash);return}i(e)}getParser(){return this.parser}getType(){return this.type}}const wc=(t,e)=>{const i=tl(t,P());try{D1(i)}catch(r){const s=wf(i);if(!s)throw new Error(`Diagram ${i} not found.`);return s().then(({diagram:n})=>(Si(i,n,void 0),new Sc(t,e)))}return new Sc(t,e)},Ac=Sc,Jm="graphics-document document";function $m(t,e){t.attr("role",Jm),(0,Ni.Z)(e)||t.attr("aria-roledescription",e)}function tb(t,e,i,r){if(t.insert!==void 0)if(e||i){if(i){const s="chart-desc-"+r;t.attr("aria-describedby",s),t.insert("desc",":first-child").attr("id",s).text(i)}if(e){const s="chart-title-"+r;t.attr("aria-labelledby",s),t.insert("title",":first-child").attr("id",s).text(e)}}else return}const Lc=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],qu="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Xu="sandbox",Ku="loose",eb="http://www.w3.org/2000/svg",Qu="http://www.w3.org/1999/xlink",Ju="http://www.w3.org/1999/xhtml",ib="100%",rb="100%",sb="border:0;margin:0;",nb="margin:0",ab="allow-top-navigation-by-user-activation allow-popups",ob='The "iframe" tag is not supported by your browser.',$u=["foreignobject"],td=["dominant-baseline"];function lb(t,e){return wa(),new Ac(t,e).parse(t,e)}function cb(t,e){return br(this,null,function*(){return wa(),(yield wc(t,e)).parse(t,e)})}const ed=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){const r=i.substring(1,i.length-1);return/^\+?\d+$/.test(r)?"\uFB02\xB0\xB0"+r+"\xB6\xDF":"\uFB02\xB0"+r+"\xB6\xDF"}),e},Bc=function(t){let e=t;return e=e.replace(/fl°°/g,"&#"),e=e.replace(/fl°/g,"&"),e=e.replace(/¶ß/g,";"),e},id=(t,e,i=[])=>`
1375
+ .${t} ${e} { ${i.join(" !important; ")} !important; }`,hb=(t,e,i={})=>{var r;let s="";if(t.themeCSS!==void 0&&(s+=`
1376
+ ${t.themeCSS}`),t.fontFamily!==void 0&&(s+=`
1377
+ :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(s+=`
1378
+ :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!(0,Ni.Z)(i)&&Lc.includes(e)){const l=t.htmlLabels||((r=t.flowchart)==null?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const h in i){const u=i[h];(0,Ni.Z)(u.styles)||l.forEach(d=>{s+=id(u.id,d,u.styles)}),(0,Ni.Z)(u.textStyles)||(s+=id(u.id,"tspan",u.textStyles))}}return s},rd=(t,e,i,r)=>{const s=hb(t,e,i),n=tp(e,s,t.themeVariables);return te(Lt(`${r}{${n}}`),ve)},sd=(t="",e,i)=>{let r=t;return!i&&!e&&(r=r.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),r=Bc(r),r=r.replace(/<br>/g,"<br/>"),r},nd=(t="",e)=>{const i=e?e.viewBox.baseVal.height+"px":rb,r=btoa('<body style="'+nb+'">'+t+"</body>");return`<iframe style="width:${ib};height:${i};${sb}" src="data:text/html;base64,${r}" sandbox="${ab}">
1379
+ ${ob}
1380
+ </iframe>`},Po=(t,e,i,r,s)=>{const n=t.append("div");n.attr("id",i),r&&n.attr("style",r);const a=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns",eb);return s&&a.attr("xmlns:xlink",s),a.append("g"),t};function Vo(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const ad=(t,e,i,r)=>{var s,n,a;(s=t.getElementById(e))==null||s.remove(),(n=t.getElementById(i))==null||n.remove(),(a=t.getElementById(r))==null||a.remove()},ub=function(t,e,i,r){var Bt;var s,n,a,o;wa(),Hn();const l=xe.detectInit(e);l&&(sn(l),al(l));const h=P();E.debug(h),e.length>((Bt=h==null?void 0:h.maxTextSize)!=null?Bt:5e4)&&(e=qu),e=e.replace(/\r\n?/g,`
1381
+ `);const u="#"+t,d="i"+t,f="#"+d,p="d"+t,b="#"+p;let _=(0,Q.Ys)("body");const T=h.securityLevel===Xu,S=h.securityLevel===Ku,k=h.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),T){const J=Vo((0,Q.Ys)(r),d);_=(0,Q.Ys)(J.nodes()[0].contentDocument.body),_.node().style.margin=0}else _=(0,Q.Ys)(r);Po(_,t,p,`font-family: ${k}`,Qu)}else{if(ad(document,t,p,d),T){const J=Vo((0,Q.Ys)("body"),d);_=(0,Q.Ys)(J.nodes()[0].contentDocument.body),_.node().style.margin=0}else _=(0,Q.Ys)("body");Po(_,t,p)}e=ed(e);let I,z;try{if(I=wc(e),"then"in I)throw new Error("Diagram is a promise. Use renderAsync.")}catch(J){I=new Ac("error"),z=J}const H=_.select(b).node(),rt=I.type,R=H.firstChild,F=R.firstChild,v=Lc.includes(rt)?I.renderer.getClasses(e,I):{},L=rd(h,rt,v,u),w=document.createElement("style");w.innerHTML=L,R.insertBefore(w,F);try{I.renderer.draw(e,t,Wa,I)}catch(J){throw Mo.draw(e,t,Wa),J}const m=_.select(`${b} svg`),B=(n=(s=I.db).getAccTitle)==null?void 0:n.call(s),g=(o=(a=I.db).getAccDescription)==null?void 0:o.call(a);od(rt,m,B,g),_.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Ju);let O=_.select(b).node().innerHTML;if(E.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),O=sd(O,T,Ti(h.arrowMarkerAbsolute)),T){const J=_.select(b+" svg").node();O=nd(O,J)}else S||(O=xr().sanitize(O,{ADD_TAGS:$u,ADD_ATTR:td}));if(i!==void 0)switch(rt){case"flowchart":case"flowchart-v2":i(O,os.bindFunctions);break;case"gantt":i(O,jl.bindFunctions);break;case"class":case"classDiagram":i(O,Tn.bindFunctions);break;default:i(O)}else E.debug("CB = undefined!");K0();const y=T?f:b,Y=(0,Q.Ys)(y).node();if(Y&&"remove"in Y&&Y.remove(),z)throw z;return O},db=function(t,e,i,r){return br(this,null,function*(){var Bt;var s,n,a,o;wa(),Hn();const l=xe.detectInit(e);l&&(sn(l),al(l));const h=P();E.debug(h),e.length>((Bt=h==null?void 0:h.maxTextSize)!=null?Bt:5e4)&&(e=qu),e=e.replace(/\r\n?/g,`
1382
+ `);const u="#"+t,d="i"+t,f="#"+d,p="d"+t,b="#"+p;let _=(0,Q.Ys)("body");const T=h.securityLevel===Xu,S=h.securityLevel===Ku,k=h.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),T){const J=Vo((0,Q.Ys)(r),d);_=(0,Q.Ys)(J.nodes()[0].contentDocument.body),_.node().style.margin=0}else _=(0,Q.Ys)(r);Po(_,t,p,`font-family: ${k}`,Qu)}else{if(ad(document,t,p,d),T){const J=Vo((0,Q.Ys)("body"),d);_=(0,Q.Ys)(J.nodes()[0].contentDocument.body),_.node().style.margin=0}else _=(0,Q.Ys)("body");Po(_,t,p)}e=ed(e);let I,z;try{I=yield wc(e)}catch(J){I=new Ac("error"),z=J}const H=_.select(b).node(),rt=I.type,R=H.firstChild,F=R.firstChild,v=Lc.includes(rt)?I.renderer.getClasses(e,I):{},L=rd(h,rt,v,u),w=document.createElement("style");w.innerHTML=L,R.insertBefore(w,F);try{yield I.renderer.draw(e,t,Wa,I)}catch(J){throw Mo.draw(e,t,Wa),J}const m=_.select(`${b} svg`),B=(n=(s=I.db).getAccTitle)==null?void 0:n.call(s),g=(o=(a=I.db).getAccDescription)==null?void 0:o.call(a);od(rt,m,B,g),_.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Ju);let O=_.select(b).node().innerHTML;if(E.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),O=sd(O,T,Ti(h.arrowMarkerAbsolute)),T){const J=_.select(b+" svg").node();O=nd(O,J)}else S||(O=xr().sanitize(O,{ADD_TAGS:$u,ADD_ATTR:td}));if(i!==void 0)switch(rt){case"flowchart":case"flowchart-v2":i(O,os.bindFunctions);break;case"gantt":i(O,jl.bindFunctions);break;case"class":case"classDiagram":i(O,Tn.bindFunctions);break;default:i(O)}else E.debug("CB = undefined!");K0();const y=T?f:b,Y=(0,Q.Ys)(y).node();if(Y&&"remove"in Y&&Y.remove(),z)throw z;return O})};function fb(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),jf(t),t!=null&&t.theme&&t.theme in fs?t.themeVariables=fs[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=fs.default.getThemeVariables(t.themeVariables));const i=typeof t=="object"?Gf(t):y1();_r(i.logLevel),wa()}function od(t,e,i,r){$m(e,t),tb(e,i,r,e.attr("id"))}const ii=Object.freeze({render:ub,renderAsync:db,parse:lb,parseAsync:cb,parseDirective:ul,initialize:fb,getConfig:P,setConfig:m1,getSiteConfig:y1,updateSiteConfig:qf,reset:()=>{Hn()},globalReset:()=>{Hn(vn)},defaultConfig:vn});_r(P().logLevel),Hn(P());const pb=function(t,e,i){return br(this,null,function*(){try{yield cd(t,e,i)}catch(r){E.warn("Syntax Error rendering"),nl(r)&&E.warn(r.str),Pr.parseError&&Pr.parseError(r)}})},ld=(t,e,i)=>{E.warn(t),nl(t)?(i&&i(t.str,t.hash),e.push(Pc(Ba({},t),{message:t.str,error:t}))):(i&&i(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},gb=function(t,e,i){const r=ii.getConfig();t&&(Pr.sequenceConfig=t),E.debug(`${i?"":"No "}Callback function found`);let s;if(e===void 0)s=document.querySelectorAll(".mermaid");else if(typeof e=="string")s=document.querySelectorAll(e);else if(e instanceof HTMLElement)s=[e];else if(e instanceof NodeList)s=e;else throw new Error("Invalid argument nodes for mermaid.init");E.debug(`Found ${s.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(E.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),ii.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const n=new xe.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let a;const o=[];for(const l of Array.from(s)){E.info("Rendering diagram: "+l.id);if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${n.next()}`;a=l.innerHTML,a=(0,Pt.C)(xe.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=xe.detectInit(a);u&&E.debug("Detected early reinit: ",u);try{ii.render(h,a,(d,f)=>{l.innerHTML=d,i!==void 0&&i(h),f&&f(l)},l)}catch(d){ld(d,o,Pr.parseError)}}if(o.length>0)throw o[0]},yb=(...t)=>br(this,null,function*(){E.debug(`Loading ${t.length} external diagrams`);const i=(yield Promise.allSettled(t.map(a=>br(this,[a],function*({id:r,detector:s,loader:n}){const{diagram:o}=yield n();Si(r,o,s)})))).filter(r=>r.status==="rejected");if(i.length>0){E.error(`Failed to load ${i.length} external diagrams`);for(const r of i)E.error(r);throw new Error(`Failed to load ${i.length} external diagrams`)}}),cd=function(t,e,i){return br(this,null,function*(){const r=ii.getConfig();t&&(Pr.sequenceConfig=t),E.debug(`${i?"":"No "}Callback function found`);let s;if(e===void 0)s=document.querySelectorAll(".mermaid");else if(typeof e=="string")s=document.querySelectorAll(e);else if(e instanceof HTMLElement)s=[e];else if(e instanceof NodeList)s=e;else throw new Error("Invalid argument nodes for mermaid.init");E.debug(`Found ${s.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(E.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),ii.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const n=new xe.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let a;const o=[];for(const l of Array.from(s)){E.info("Rendering diagram: "+l.id);if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${n.next()}`;a=l.innerHTML,a=(0,Pt.C)(xe.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=xe.detectInit(a);u&&E.debug("Detected early reinit: ",u);try{yield ii.renderAsync(h,a,(d,f)=>{l.innerHTML=d,i!==void 0&&i(h),f&&f(l)},l)}catch(d){ld(d,o,Pr.parseError)}}if(o.length>0)throw o[0]})},mb=function(t){ii.initialize(t)},bb=(i,...r)=>br(this,[i,...r],function*(t,{lazyLoad:e=!0}={}){e?l1(...t):yield yb(...t)}),hd=function(){if(Pr.startOnLoad){const{startOnLoad:t}=ii.getConfig();t&&Pr.init().catch(e=>E.error("Mermaid failed to initialize",e))}};if(typeof document!="undefined"){window.addEventListener("load",hd,!1)}const xb=function(t){Pr.parseError=t},kb=t=>ii.parse(t,Pr.parseError),Yo=[];let Ic=!1;const ud=()=>br(this,null,function*(){if(!Ic){for(Ic=!0;Yo.length>0;){const t=Yo.shift();if(t)try{yield t()}catch(e){E.error("Error executing queue",e)}}Ic=!1}}),_b=t=>new Promise((e,i)=>{const r=()=>new Promise((s,n)=>{ii.parseAsync(t,Pr.parseError).then(a=>{s(a),e(a)},a=>{E.error("Error parsing",a),n(a),i(a)})});Yo.push(r),ud().catch(i)}),Eb=(t,e,i,r)=>new Promise((s,n)=>{const a=()=>new Promise((o,l)=>{ii.renderAsync(t,e,i,r).then(h=>{o(h),s(h)},h=>{E.error("Error parsing",h),l(h),n(h)})});Yo.push(a),ud().catch(n)}),Pr={startOnLoad:!0,diagrams:{},mermaidAPI:ii,parse:kb,parseAsync:_b,render:ii.render,renderAsync:Eb,init:pb,initThrowsErrors:gb,initThrowsErrorsAsync:cd,registerExternalDiagrams:bb,initialize:mb,parseError:void 0,contentLoaded:hd,setParseErrorHandler:xb}},47724:function(Qi,ai,ct){ct.d(ai,{diagram:function(){return ut}});var Pt=ct(4737),Qe=ct(23198),oi=ct(71377),Vi=ct.n(oi),Q=ct(14607),Ji=ct.n(Q),xr=ct(91619),ot=ct(12281),Ot=ct(7201),de=ct(27484),oe=ct.n(de),Xs=ct(17967),Ks=ct(77482),Zo=ct.n(Ks),Vn=ct(99791),Ho=ct(45625),Qs=ct(46060),Yn=ct(91518),Bs=ct(59542),Go=ct.n(Bs),Is=ct(10285),Js=ct.n(Is),hi=ct(28734),gn=ct.n(hi),Bi=function(){var V=function(_i,Dt,Rt,Xt){for(Rt=Rt||{},Xt=_i.length;Xt--;Rt[_i[Xt]]=Dt);return Rt},D=[1,4],X=[1,13],pt=[1,12],ht=[1,15],Lt=[1,16],Vt=[1,20],Wt=[1,19],ye=[6,7,8],Se=[1,26],be=[1,24],Be=[1,25],fe=[6,7,11],_e=[1,6,13,15,16,19,22],Mt=[1,33],Kt=[1,34],se=[1,6,7,11,13,15,16,19,22],Ae={trace:function(){},yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:function(Dt,Rt,Xt,ce,He,Ht,Ue){var Ne=Ht.length-1;switch(He){case 6:case 7:return ce;case 8:ce.getLogger().trace("Stop NL ");break;case 9:ce.getLogger().trace("Stop EOF ");break;case 11:ce.getLogger().trace("Stop NL2 ");break;case 12:ce.getLogger().trace("Stop EOF2 ");break;case 15:ce.getLogger().info("Node: ",Ht[Ne].id),ce.addNode(Ht[Ne-1].length,Ht[Ne].id,Ht[Ne].descr,Ht[Ne].type);break;case 16:ce.getLogger().trace("Icon: ",Ht[Ne]),ce.decorateNode({icon:Ht[Ne]});break;case 17:case 21:ce.decorateNode({class:Ht[Ne]});break;case 18:ce.getLogger().trace("SPACELIST");break;case 19:ce.getLogger().trace("Node: ",Ht[Ne].id),ce.addNode(0,Ht[Ne].id,Ht[Ne].descr,Ht[Ne].type);break;case 20:ce.decorateNode({icon:Ht[Ne]});break;case 25:ce.getLogger().trace("node found ..",Ht[Ne-2]),this.$={id:Ht[Ne-1],descr:Ht[Ne-1],type:ce.getType(Ht[Ne-2],Ht[Ne])};break;case 26:this.$={id:Ht[Ne],descr:Ht[Ne],type:ce.nodeType.DEFAULT};break;case 27:ce.getLogger().trace("node found ..",Ht[Ne-3]),this.$={id:Ht[Ne-3],descr:Ht[Ne-1],type:ce.getType(Ht[Ne-2],Ht[Ne])};break}},table:[{3:1,4:2,5:3,6:[1,5],8:D},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:D},{6:X,7:[1,10],9:9,12:11,13:pt,14:14,15:ht,16:Lt,17:17,18:18,19:Vt,22:Wt},V(ye,[2,3]),{1:[2,2]},V(ye,[2,4]),V(ye,[2,5]),{1:[2,6],6:X,12:21,13:pt,14:14,15:ht,16:Lt,17:17,18:18,19:Vt,22:Wt},{6:X,9:22,12:11,13:pt,14:14,15:ht,16:Lt,17:17,18:18,19:Vt,22:Wt},{6:Se,7:be,10:23,11:Be},V(fe,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:Vt,22:Wt}),V(fe,[2,18]),V(fe,[2,19]),V(fe,[2,20]),V(fe,[2,21]),V(fe,[2,23]),V(fe,[2,24]),V(fe,[2,26],{19:[1,30]}),{20:[1,31]},{6:Se,7:be,10:32,11:Be},{1:[2,7],6:X,12:21,13:pt,14:14,15:ht,16:Lt,17:17,18:18,19:Vt,22:Wt},V(_e,[2,14],{7:Mt,11:Kt}),V(se,[2,8]),V(se,[2,9]),V(se,[2,10]),V(fe,[2,15]),V(fe,[2,16]),V(fe,[2,17]),{20:[1,35]},{21:[1,36]},V(_e,[2,13],{7:Mt,11:Kt}),V(se,[2,11]),V(se,[2,12]),{21:[1,37]},V(fe,[2,25]),V(fe,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:function(Dt,Rt){if(Rt.recoverable)this.trace(Dt);else{var Xt=new Error(Dt);throw Xt.hash=Rt,Xt}},parse:function(Dt){var Rt=this,Xt=[0],ce=[],He=[null],Ht=[],Ue=this.table,Ne="",Ir=0,en=0,zn=2,yn=1,Di=Ht.slice.call(arguments,1),Ke=Object.create(this.lexer),qe={yy:{}};for(var is in this.yy)Object.prototype.hasOwnProperty.call(this.yy,is)&&(qe.yy[is]=this.yy[is]);Ke.setInput(Dt,qe.yy),qe.yy.lexer=Ke,qe.yy.parser=this,typeof Ke.yylloc=="undefined"&&(Ke.yylloc={});var Dr=Ke.yylloc;Ht.push(Dr);var Ms=Ke.options&&Ke.options.ranges;typeof qe.yy.parseError=="function"?this.parseError=qe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function kr(){var Rr;return Rr=ce.pop()||Ke.lex()||yn,typeof Rr!="number"&&(Rr instanceof Array&&(ce=Rr,Rr=ce.pop()),Rr=Rt.symbols_[Rr]||Rr),Rr}for(var Ci,lr,Ri,Ni,Hi={},E,_r,tr,mn;;){if(lr=Xt[Xt.length-1],this.defaultActions[lr]?Ri=this.defaultActions[lr]:((Ci===null||typeof Ci=="undefined")&&(Ci=kr()),Ri=Ue[lr]&&Ue[lr][Ci]),typeof Ri=="undefined"||!Ri.length||!Ri[0]){var bn="";mn=[];for(E in Ue[lr])this.terminals_[E]&&E>zn&&mn.push("'"+this.terminals_[E]+"'");Ke.showPosition?bn="Parse error on line "+(Ir+1)+`:
1383
+ `+Ke.showPosition()+`
1384
+ Expecting `+mn.join(", ")+", got '"+(this.terminals_[Ci]||Ci)+"'":bn="Parse error on line "+(Ir+1)+": Unexpected "+(Ci==yn?"end of input":"'"+(this.terminals_[Ci]||Ci)+"'"),this.parseError(bn,{text:Ke.match,token:this.terminals_[Ci]||Ci,line:Ke.yylineno,loc:Dr,expected:mn})}if(Ri[0]instanceof Array&&Ri.length>1)throw new Error("Parse Error: multiple actions possible at state: "+lr+", token: "+Ci);switch(Ri[0]){case 1:Xt.push(Ci),He.push(Ke.yytext),Ht.push(Ke.yylloc),Xt.push(Ri[1]),Ci=null,en=Ke.yyleng,Ne=Ke.yytext,Ir=Ke.yylineno,Dr=Ke.yylloc;break;case 2:if(_r=this.productions_[Ri[1]][1],Hi.$=He[He.length-_r],Hi._$={first_line:Ht[Ht.length-(_r||1)].first_line,last_line:Ht[Ht.length-1].last_line,first_column:Ht[Ht.length-(_r||1)].first_column,last_column:Ht[Ht.length-1].last_column},Ms&&(Hi._$.range=[Ht[Ht.length-(_r||1)].range[0],Ht[Ht.length-1].range[1]]),Ni=this.performAction.apply(Hi,[Ne,en,Ir,qe.yy,Ri[1],He,Ht].concat(Di)),typeof Ni!="undefined")return Ni;_r&&(Xt=Xt.slice(0,-1*_r*2),He=He.slice(0,-1*_r),Ht=Ht.slice(0,-1*_r)),Xt.push(this.productions_[Ri[1]][0]),He.push(Hi.$),Ht.push(Hi._$),tr=Ue[Xt[Xt.length-2]][Xt[Xt.length-1]],Xt.push(tr);break;case 3:return!0}}return!0}},je=function(){var _i={EOF:1,parseError:function(Rt,Xt){if(this.yy.parser)this.yy.parser.parseError(Rt,Xt);else throw new Error(Rt)},setInput:function(Dt,Rt){return this.yy=Rt||this.yy||{},this._input=Dt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Dt=this._input[0];this.yytext+=Dt,this.yyleng++,this.offset++,this.match+=Dt,this.matched+=Dt;var Rt=Dt.match(/(?:\r\n?|\n).*/g);return Rt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Dt},unput:function(Dt){var Rt=Dt.length,Xt=Dt.split(/(?:\r\n?|\n)/g);this._input=Dt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Rt),this.offset-=Rt;var ce=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Xt.length-1&&(this.yylineno-=Xt.length-1);var He=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Xt?(Xt.length===ce.length?this.yylloc.first_column:0)+ce[ce.length-Xt.length].length-Xt[0].length:this.yylloc.first_column-Rt},this.options.ranges&&(this.yylloc.range=[He[0],He[0]+this.yyleng-Rt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1385
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Dt){this.unput(this.match.slice(Dt))},pastInput:function(){var Dt=this.matched.substr(0,this.matched.length-this.match.length);return(Dt.length>20?"...":"")+Dt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Dt=this.match;return Dt.length<20&&(Dt+=this._input.substr(0,20-Dt.length)),(Dt.substr(0,20)+(Dt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Dt=this.pastInput(),Rt=new Array(Dt.length+1).join("-");return Dt+this.upcomingInput()+`
1386
+ `+Rt+"^"},test_match:function(Dt,Rt){var Xt,ce,He;if(this.options.backtrack_lexer&&(He={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(He.yylloc.range=this.yylloc.range.slice(0))),ce=Dt[0].match(/(?:\r\n?|\n).*/g),ce&&(this.yylineno+=ce.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ce?ce[ce.length-1].length-ce[ce.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Dt[0].length},this.yytext+=Dt[0],this.match+=Dt[0],this.matches=Dt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Dt[0].length),this.matched+=Dt[0],Xt=this.performAction.call(this,this.yy,this,Rt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Xt)return Xt;if(this._backtrack){for(var Ht in He)this[Ht]=He[Ht];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Dt,Rt,Xt,ce;this._more||(this.yytext="",this.match="");for(var He=this._currentRules(),Ht=0;Ht<He.length;Ht++)if(Xt=this._input.match(this.rules[He[Ht]]),Xt&&(!Rt||Xt[0].length>Rt[0].length)){if(Rt=Xt,ce=Ht,this.options.backtrack_lexer){if(Dt=this.test_match(Xt,He[Ht]),Dt!==!1)return Dt;if(this._backtrack){Rt=!1;continue}else return!1}else if(!this.options.flex)break}return Rt?(Dt=this.test_match(Rt,He[ce]),Dt!==!1?Dt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1387
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Rt=this.next();return Rt||this.lex()},begin:function(Rt){this.conditionStack.push(Rt)},popState:function(){var Rt=this.conditionStack.length-1;return Rt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Rt){return Rt=this.conditionStack.length-1-Math.abs(Rt||0),Rt>=0?this.conditionStack[Rt]:"INITIAL"},pushState:function(Rt){this.begin(Rt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Rt,Xt,ce,He){switch(ce){case 0:Rt.getLogger().trace("Found comment",Xt.yytext);break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:Rt.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return Rt.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:Rt.getLogger().trace("end icon"),this.popState();break;case 10:return Rt.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return Rt.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return Rt.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return Rt.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:Rt.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 22:return Rt.getLogger().trace("description:",Xt.yytext),"NODE_DESCR";case 23:this.popState();break;case 24:return this.popState(),Rt.getLogger().trace("node end ))"),"NODE_DEND";case 25:return this.popState(),Rt.getLogger().trace("node end )"),"NODE_DEND";case 26:return this.popState(),Rt.getLogger().trace("node end ...",Xt.yytext),"NODE_DEND";case 27:return this.popState(),Rt.getLogger().trace("node end (("),"NODE_DEND";case 28:return this.popState(),Rt.getLogger().trace("node end (-"),"NODE_DEND";case 29:return this.popState(),Rt.getLogger().trace("node end (-"),"NODE_DEND";case 30:return this.popState(),Rt.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),Rt.getLogger().trace("node end (("),"NODE_DEND";case 32:return Rt.getLogger().trace("Long description:",Xt.yytext),20;case 33:return Rt.getLogger().trace("Long description:",Xt.yytext),20}},rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\-\)\{\}]+)/i,/^(?:$)/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR:{rules:[22,23],inclusive:!1},NODE:{rules:[21,24,25,26,27,28,29,30,31,32,33],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return _i}();Ae.lexer=je;function Jt(){this.yy={}}return Jt.prototype=Ae,Ae.Parser=Jt,new Jt}();Bi.parser=Bi;const us=Bi,zi=V=>(0,Pt.n)(V,(0,Pt.g)());let xi=[],Ds=0,ds={};const $s=()=>{xi=[],Ds=0,ds={}},Rs=function(V){for(let D=xi.length-1;D>=0;D--)if(xi[D].level<V)return xi[D];return null},Ns=()=>xi.length>0?xi[0]:null,ts=(V,D,X,pt)=>{Pt.l.info("addNode",V,D,X,pt);const ht=(0,Pt.g)(),Lt={id:Ds++,nodeId:zi(D),level:V,descr:zi(X),type:pt,children:[],width:(0,Pt.g)().mindmap.maxNodeWidth};switch(Lt.type){case Ze.ROUNDED_RECT:Lt.padding=2*ht.mindmap.padding;break;case Ze.RECT:Lt.padding=2*ht.mindmap.padding;break;case Ze.HEXAGON:Lt.padding=2*ht.mindmap.padding;break;default:Lt.padding=ht.mindmap.padding}const Vt=Rs(V);if(Vt)Vt.children.push(Lt),xi.push(Lt);else if(xi.length===0)xi.push(Lt);else{let Wt=new Error('There can be only one root. No parent could be found for ("'+Lt.descr+'")');throw Wt.hash={text:"branch "+name,token:"branch "+name,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+name+'"']},Wt}},Ze={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Os=(V,D)=>{switch(Pt.l.debug("In get type",V,D),V){case"[":return Ze.RECT;case"(":return D===")"?Ze.ROUNDED_RECT:Ze.CLOUD;case"((":return Ze.CIRCLE;case")":return Ze.CLOUD;case"))":return Ze.BANG;case"{{":return Ze.HEXAGON;default:return Ze.DEFAULT}},es=(V,D)=>{ds[V]=D},tn=V=>{const D=xi[xi.length-1];V&&V.icon&&(D.icon=zi(V.icon)),V&&V.class&&(D.class=zi(V.class))},Wi=V=>{switch(V){case Ze.DEFAULT:return"no-border";case Ze.RECT:return"rect";case Ze.ROUNDED_RECT:return"rounded-rect";case Ze.CIRCLE:return"circle";case Ze.CLOUD:return"cloud";case Ze.BANG:return"bang";case Ze.HEXAGON:return"hexgon";default:return"no-border"}};let Fs;const Ii=V=>{Fs=V},zr=()=>Pt.l,$i=V=>xi[V],vt=V=>ds[V],Yt=Object.freeze(Object.defineProperty({__proto__:null,addNode:ts,clear:$s,decorateNode:tn,getElementById:vt,getLogger:zr,getMindmap:Ns,getNodeById:$i,getType:Os,nodeType:Ze,get parseError(){return Fs},sanitizeText:zi,setElementForId:es,setErrorHandler:Ii,type2Str:Wi},Symbol.toStringTag,{value:"Module"})),zt=12;function Zt(V,D){V.each(function(){var X=(0,Qe.Ys)(this),pt=X.text().split(/(\s+|<br>)/).reverse(),ht,Lt=[],Vt=1.1,Wt=X.attr("y"),ye=parseFloat(X.attr("dy")),Se=X.text(null).append("tspan").attr("x",0).attr("y",Wt).attr("dy",ye+"em");for(let be=0;be<pt.length;be++)ht=pt[pt.length-1-be],Lt.push(ht),Se.text(Lt.join(" ").trim()),(Se.node().getComputedTextLength()>D||ht==="<br>")&&(Lt.pop(),Se.text(Lt.join(" ").trim()),ht==="<br>"?Lt=[""]:Lt=[ht],Se=X.append("tspan").attr("x",0).attr("y",Wt).attr("dy",Vt+"em").text(ht))})}const te=function(V,D,X){V.append("path").attr("id","node-"+D.id).attr("class","node-bkg node-"+Wi(D.type)).attr("d",`M0 ${D.height-5} v${-D.height+2*5} q0,-5 5,-5 h${D.width-2*5} q5,0 5,5 v${D.height-5} H0 Z`),V.append("line").attr("class","node-line-"+X).attr("x1",0).attr("y1",D.height).attr("x2",D.width).attr("y2",D.height)},ve=function(V,D){V.append("rect").attr("id","node-"+D.id).attr("class","node-bkg node-"+Wi(D.type)).attr("height",D.height).attr("width",D.width)},Ge=function(V,D){const X=D.width,pt=D.height,ht=.15*X,Lt=.25*X,Vt=.35*X,Wt=.2*X;V.append("path").attr("id","node-"+D.id).attr("class","node-bkg node-"+Wi(D.type)).attr("d",`M0 0 a${ht},${ht} 0 0,1 ${X*.25},${-1*X*.1}
1388
+ a${Vt},${Vt} 1 0,1 ${X*.4},${-1*X*.1}
1389
+ a${Lt},${Lt} 1 0,1 ${X*.35},${1*X*.2}
1390
+
1391
+ a${ht},${ht} 1 0,1 ${X*.15},${1*pt*.35}
1392
+ a${Wt},${Wt} 1 0,1 ${-1*X*.15},${1*pt*.65}
1393
+
1394
+ a${Lt},${ht} 1 0,1 ${-1*X*.25},${X*.15}
1395
+ a${Vt},${Vt} 1 0,1 ${-1*X*.5},0
1396
+ a${ht},${ht} 1 0,1 ${-1*X*.25},${-1*X*.15}
1397
+
1398
+ a${ht},${ht} 1 0,1 ${-1*X*.1},${-1*pt*.35}
1399
+ a${Wt},${Wt} 1 0,1 ${X*.1},${-1*pt*.65}
1400
+
1401
+ H0 V0 Z`)},le=function(V,D){const X=D.width,pt=D.height,ht=.15*X;V.append("path").attr("id","node-"+D.id).attr("class","node-bkg node-"+Wi(D.type)).attr("d",`M0 0 a${ht},${ht} 1 0,0 ${X*.25},${-1*pt*.1}
1402
+ a${ht},${ht} 1 0,0 ${X*.25},0
1403
+ a${ht},${ht} 1 0,0 ${X*.25},0
1404
+ a${ht},${ht} 1 0,0 ${X*.25},${1*pt*.1}
1405
+
1406
+ a${ht},${ht} 1 0,0 ${X*.15},${1*pt*.33}
1407
+ a${ht*.8},${ht*.8} 1 0,0 0,${1*pt*.34}
1408
+ a${ht},${ht} 1 0,0 ${-1*X*.15},${1*pt*.33}
1409
+
1410
+ a${ht},${ht} 1 0,0 ${-1*X*.25},${pt*.15}
1411
+ a${ht},${ht} 1 0,0 ${-1*X*.25},0
1412
+ a${ht},${ht} 1 0,0 ${-1*X*.25},0
1413
+ a${ht},${ht} 1 0,0 ${-1*X*.25},${-1*pt*.15}
1414
+
1415
+ a${ht},${ht} 1 0,0 ${-1*X*.1},${-1*pt*.33}
1416
+ a${ht*.8},${ht*.8} 1 0,0 0,${-1*pt*.34}
1417
+ a${ht},${ht} 1 0,0 ${X*.1},${-1*pt*.33}
1418
+
1419
+ H0 V0 Z`)},ui=function(V,D){V.append("circle").attr("id","node-"+D.id).attr("class","node-bkg node-"+Wi(D.type)).attr("r",D.width/2)};function pe(V,D,X,pt,ht){return V.insert("polygon",":first-child").attr("points",pt.map(function(Lt){return Lt.x+","+Lt.y}).join(" ")).attr("transform","translate("+(ht.width-D)/2+", "+X+")")}const ge=function(V,D){const X=D.height,ht=X/4,Lt=D.width-D.padding+2*ht,Vt=[{x:ht,y:0},{x:Lt-ht,y:0},{x:Lt,y:-X/2},{x:Lt-ht,y:-X},{x:ht,y:-X},{x:0,y:-X/2}];pe(V,Lt,X,Vt,D)},ke=function(V,D){V.append("rect").attr("id","node-"+D.id).attr("class","node-bkg node-"+Wi(D.type)).attr("height",D.height).attr("rx",D.padding).attr("ry",D.padding).attr("width",D.width)},$e={drawNode:function(V,D,X,pt){const ht=X%(zt-1),Lt=V.append("g");D.section=ht;let Vt="section-"+ht;ht<0&&(Vt+=" section-root"),Lt.attr("class",(D.class?D.class+" ":"")+"mindmap-node "+Vt);const Wt=Lt.append("g"),ye=Lt.append("g"),be=ye.append("text").text(D.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Zt,D.width).node().getBBox(),Be=pt.fontSize.replace?pt.fontSize.replace("px",""):pt.fontSize;if(D.height=be.height+Be*1.1*.5+D.padding,D.width=be.width+2*D.padding,D.icon)if(D.type===Ze.CIRCLE)D.height+=50,D.width+=50,Lt.append("foreignObject").attr("height","50px").attr("width",D.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+ht+" "+D.icon),ye.attr("transform","translate("+D.width/2+", "+(D.height/2-1.5*D.padding)+")");else{D.width+=50;const fe=D.height;D.height=Math.max(fe,60);const _e=Math.abs(D.height-fe);Lt.append("foreignObject").attr("width","60px").attr("height",D.height).attr("style","text-align: center;margin-top:"+_e/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+ht+" "+D.icon),ye.attr("transform","translate("+(25+D.width/2)+", "+(_e/2+D.padding/2)+")")}else ye.attr("transform","translate("+D.width/2+", "+D.padding/2+")");switch(D.type){case Ze.DEFAULT:te(Wt,D,ht);break;case Ze.ROUNDED_RECT:ke(Wt,D);break;case Ze.RECT:ve(Wt,D);break;case Ze.CIRCLE:Wt.attr("transform","translate("+D.width/2+", "+ +D.height/2+")"),ui(Wt,D);break;case Ze.CLOUD:Ge(Wt,D);break;case Ze.BANG:le(Wt,D);break;case Ze.HEXAGON:ge(Wt,D);break}return es(D.id,Lt),D.height},positionNode:function(V){const D=vt(V.id),X=V.x||0,pt=V.y||0;D.attr("transform","translate("+X+","+pt+")")},drawEdge:function(D,X,pt,ht,Lt){const Vt=Lt%(zt-1),Wt=pt.x+pt.width/2,ye=pt.y+pt.height/2,Se=X.x+X.width/2,be=X.y+X.height/2,Be=Se>Wt?Wt+Math.abs(Wt-Se)/2:Wt-Math.abs(Wt-Se)/2,fe=be>ye?ye+Math.abs(ye-be)/2:ye-Math.abs(ye-be)/2,_e=Se>Wt?Math.abs(Wt-Be)/2+Wt:-Math.abs(Wt-Be)/2+Wt,Mt=be>ye?Math.abs(ye-fe)/2+ye:-Math.abs(ye-fe)/2+ye;D.append("path").attr("d",pt.direction==="TB"||pt.direction==="BT"?`M${Wt},${ye} Q${Wt},${Mt} ${Be},${fe} T${Se},${be}`:`M${Wt},${ye} Q${_e},${ye} ${Be},${fe} T${Se},${be}`).attr("class","edge section-edge-"+Vt+" edge-depth-"+ht)}};Vi().use(Ji());function Je(V,D,X,pt){$e.drawNode(V,D,X,pt),D.children&&D.children.forEach((ht,Lt)=>{Je(V,ht,X<0?Lt:X,pt)})}function ti(V,D){D.edges().map((X,pt)=>{const ht=X.data();if(X[0]._private.bodyBounds){const Lt=X[0]._private.rscratch;Pt.l.trace("Edge: ",pt,ht),V.insert("path").attr("d",`M ${Lt.startX},${Lt.startY} L ${Lt.midX},${Lt.midY} L${Lt.endX},${Lt.endY} `).attr("class","edge section-edge-"+ht.section+" edge-depth-"+ht.depth)}})}function di(V,D,X,pt){D.add({group:"nodes",data:{id:V.id,labelText:V.descr,height:V.height,width:V.width,level:pt,nodeId:V.id,padding:V.padding,type:V.type},position:{x:V.x,y:V.y}}),V.children&&V.children.forEach(ht=>{di(ht,D,X,pt+1),D.add({group:"edges",data:{id:`${V.id}_${ht.id}`,source:V.id,target:ht.id,depth:pt,section:ht.section}})})}function We(V,D){return new Promise(X=>{const pt=(0,Qe.Ys)("body").append("div").attr("id","cy").attr("style","display:none"),ht=Vi()({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});pt.remove(),di(V,ht,D,0),ht.nodes().forEach(function(Lt){Lt.layoutDimensions=()=>{const Vt=Lt.data();return{w:Vt.width,h:Vt.height}}}),ht.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),ht.ready(Lt=>{Pt.l.info("Ready",Lt),X(ht)})})}function Zi(V){V.nodes().map((D,X)=>{const pt=D.data();pt.x=D.position().x,pt.y=D.position().y,$e.positionNode(pt);const ht=vt(pt.nodeId);Pt.l.info("Id:",X,"Position: (",D.position().x,", ",D.position().y,")",pt),ht.attr("transform",`translate(${D.position().x-pt.width/2}, ${D.position().y-pt.height/2})`),ht.attr("attr",`apa-${X})`)})}const Br={draw:(V,D,X,pt)=>br(this,null,function*(){const ht=(0,Pt.g)();pt.db.clear(),pt.parser.parse(V),Pt.l.debug(`Renering info diagram
1420
+ `+V);const Lt=(0,Pt.g)().securityLevel;let Vt;Lt==="sandbox"&&(Vt=(0,Qe.Ys)("#i"+D));const ye=(Lt==="sandbox"?(0,Qe.Ys)(Vt.nodes()[0].contentDocument.body):(0,Qe.Ys)("body")).select("#"+D);ye.append("g");const Se=pt.db.getMindmap(),be=ye.append("g");be.attr("class","mindmap-edges");const Be=ye.append("g");Be.attr("class","mindmap-nodes"),Je(Be,Se,-1,ht);const fe=yield We(Se,ht);ti(be,fe),Zi(fe),(0,Pt.s)(void 0,ye,ht.mindmap.padding,ht.mindmap.useMaxWidth)})},or=V=>{let D="";for(let X=0;X<V.THEME_COLOR_LIMIT;X++)V["lineColor"+X]=V["lineColor"+X]||V["cScaleInv"+X],(0,xr.Z)(V["lineColor"+X])?V["lineColor"+X]=(0,ot.Z)(V["lineColor"+X],20):V["lineColor"+X]=(0,Ot.Z)(V["lineColor"+X],20);for(let X=0;X<V.THEME_COLOR_LIMIT;X++){const pt=""+(17-3*X);D+=`
1421
+ .section-${X-1} rect, .section-${X-1} path, .section-${X-1} circle, .section-${X-1} polygon, .section-${X-1} path {
1422
+ fill: ${V["cScale"+X]};
1423
+ }
1424
+ .section-${X-1} text {
1425
+ fill: ${V["cScaleLabel"+X]};
1426
+ }
1427
+ .node-icon-${X-1} {
1428
+ font-size: 40px;
1429
+ color: ${V["cScaleLabel"+X]};
1430
+ }
1431
+ .section-edge-${X-1}{
1432
+ stroke: ${V["cScale"+X]};
1433
+ }
1434
+ .edge-depth-${X-1}{
1435
+ stroke-width: ${pt};
1436
+ }
1437
+ .section-${X-1} line {
1438
+ stroke: ${V["cScaleInv"+X]} ;
1439
+ stroke-width: 3;
1440
+ }
1441
+
1442
+ .disabled, .disabled circle, .disabled text {
1443
+ fill: lightgray;
1444
+ }
1445
+ .disabled text {
1446
+ fill: #efefef;
1447
+ }
1448
+ `}return D},ut={db:Yt,renderer:Br,parser:us,styles:V=>`
1449
+ .edge {
1450
+ stroke-width: 3;
1451
+ }
1452
+ ${or(V)}
1453
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
1454
+ fill: ${V.git0};
1455
+ }
1456
+ .section-root text {
1457
+ fill: ${V.gitBranchLabel0};
1458
+ }
1459
+ .icon-container {
1460
+ height:100%;
1461
+ display: flex;
1462
+ justify-content: center;
1463
+ align-items: center;
1464
+ }
1465
+ .edge {
1466
+ fill: none;
1467
+ }
1468
+ `}},96316:function(Qi,ai,ct){ct.d(ai,{diagram:function(){return or}});var Pt=ct(4737),Qe=ct(23198),oi=ct(91619),Vi=ct(12281),Q=ct(7201),Ji=ct(27484),xr=ct.n(Ji),ot=ct(17967),Ot=ct(77482),de=ct.n(Ot),oe=ct(99791),Xs=ct(45625),Ks=ct(46060),Zo=ct(91518),Vn=ct(59542),Ho=ct.n(Vn),Qs=ct(10285),Yn=ct.n(Qs),Bs=ct(28734),Go=ct.n(Bs),Is=function(){var bt=function(_e,Mt,Kt,se){for(Kt=Kt||{},se=_e.length;se--;Kt[_e[se]]=Mt);return Kt},$=[1,2],ut=[1,5],V=[6,9,11,17,18,20,22,23,26,27,28],D=[1,15],X=[1,16],pt=[1,17],ht=[1,18],Lt=[1,19],Vt=[1,23],Wt=[1,24],ye=[1,27],Se=[4,6,9,11,17,18,20,22,23,26,27,28],be={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,period_statement:24,event_statement:25,period:26,event:27,open_directive:28,type_directive:29,arg_directive:30,close_directive:31,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",26:"period",27:"event",28:"open_directive",29:"type_directive",30:"arg_directive",31:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[24,1],[25,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(Mt,Kt,se,Ae,je,Jt,_i){var Dt=Jt.length-1;switch(je){case 1:return Jt[Dt-1];case 3:this.$=[];break;case 4:Jt[Dt-1].push(Jt[Dt]),this.$=Jt[Dt-1];break;case 5:case 6:this.$=Jt[Dt];break;case 7:case 8:this.$=[];break;case 11:Ae.getCommonDb().setDiagramTitle(Jt[Dt].substr(6)),this.$=Jt[Dt].substr(6);break;case 12:this.$=Jt[Dt].trim(),Ae.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=Jt[Dt].trim(),Ae.getCommonDb().setAccDescription(this.$);break;case 15:Ae.addSection(Jt[Dt].substr(8)),this.$=Jt[Dt].substr(8);break;case 19:Ae.addTask(Jt[Dt],0,""),this.$=Jt[Dt];break;case 20:Ae.addEvent(Jt[Dt].substr(2)),this.$=Jt[Dt];break;case 21:Ae.parseDirective("%%{","open_directive");break;case 22:Ae.parseDirective(Jt[Dt],"type_directive");break;case 23:Jt[Dt]=Jt[Dt].trim().replace(/'/g,'"'),Ae.parseDirective(Jt[Dt],"arg_directive");break;case 24:Ae.parseDirective("}%%","close_directive","timeline");break}},table:[{3:1,4:$,7:3,12:4,28:ut},{1:[3]},bt(V,[2,3],{5:6}),{3:7,4:$,7:3,12:4,28:ut},{13:8,29:[1,9]},{29:[2,21]},{6:[1,10],7:22,8:11,9:[1,12],10:13,11:[1,14],12:4,17:D,18:X,20:pt,22:ht,23:Lt,24:20,25:21,26:Vt,27:Wt,28:ut},{1:[2,2]},{14:25,15:[1,26],31:ye},bt([15,31],[2,22]),bt(V,[2,8],{1:[2,1]}),bt(V,[2,4]),{7:22,10:28,12:4,17:D,18:X,20:pt,22:ht,23:Lt,24:20,25:21,26:Vt,27:Wt,28:ut},bt(V,[2,6]),bt(V,[2,7]),bt(V,[2,11]),{19:[1,29]},{21:[1,30]},bt(V,[2,14]),bt(V,[2,15]),bt(V,[2,16]),bt(V,[2,17]),bt(V,[2,18]),bt(V,[2,19]),bt(V,[2,20]),{11:[1,31]},{16:32,30:[1,33]},{11:[2,24]},bt(V,[2,5]),bt(V,[2,12]),bt(V,[2,13]),bt(Se,[2,9]),{14:34,31:ye},{31:[2,23]},{11:[1,35]},bt(Se,[2,10])],defaultActions:{5:[2,21],7:[2,2],27:[2,24],33:[2,23]},parseError:function(Mt,Kt){if(Kt.recoverable)this.trace(Mt);else{var se=new Error(Mt);throw se.hash=Kt,se}},parse:function(Mt){var Kt=this,se=[0],Ae=[],je=[null],Jt=[],_i=this.table,Dt="",Rt=0,Xt=0,ce=2,He=1,Ht=Jt.slice.call(arguments,1),Ue=Object.create(this.lexer),Ne={yy:{}};for(var Ir in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ir)&&(Ne.yy[Ir]=this.yy[Ir]);Ue.setInput(Mt,Ne.yy),Ne.yy.lexer=Ue,Ne.yy.parser=this,typeof Ue.yylloc=="undefined"&&(Ue.yylloc={});var en=Ue.yylloc;Jt.push(en);var zn=Ue.options&&Ue.options.ranges;typeof Ne.yy.parseError=="function"?this.parseError=Ne.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yn(){var Ni;return Ni=Ae.pop()||Ue.lex()||He,typeof Ni!="number"&&(Ni instanceof Array&&(Ae=Ni,Ni=Ae.pop()),Ni=Kt.symbols_[Ni]||Ni),Ni}for(var Di,Ke,qe,is,Dr={},Ms,kr,Ci,lr;;){if(Ke=se[se.length-1],this.defaultActions[Ke]?qe=this.defaultActions[Ke]:((Di===null||typeof Di=="undefined")&&(Di=yn()),qe=_i[Ke]&&_i[Ke][Di]),typeof qe=="undefined"||!qe.length||!qe[0]){var Ri="";lr=[];for(Ms in _i[Ke])this.terminals_[Ms]&&Ms>ce&&lr.push("'"+this.terminals_[Ms]+"'");Ue.showPosition?Ri="Parse error on line "+(Rt+1)+`:
1469
+ `+Ue.showPosition()+`
1470
+ Expecting `+lr.join(", ")+", got '"+(this.terminals_[Di]||Di)+"'":Ri="Parse error on line "+(Rt+1)+": Unexpected "+(Di==He?"end of input":"'"+(this.terminals_[Di]||Di)+"'"),this.parseError(Ri,{text:Ue.match,token:this.terminals_[Di]||Di,line:Ue.yylineno,loc:en,expected:lr})}if(qe[0]instanceof Array&&qe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ke+", token: "+Di);switch(qe[0]){case 1:se.push(Di),je.push(Ue.yytext),Jt.push(Ue.yylloc),se.push(qe[1]),Di=null,Xt=Ue.yyleng,Dt=Ue.yytext,Rt=Ue.yylineno,en=Ue.yylloc;break;case 2:if(kr=this.productions_[qe[1]][1],Dr.$=je[je.length-kr],Dr._$={first_line:Jt[Jt.length-(kr||1)].first_line,last_line:Jt[Jt.length-1].last_line,first_column:Jt[Jt.length-(kr||1)].first_column,last_column:Jt[Jt.length-1].last_column},zn&&(Dr._$.range=[Jt[Jt.length-(kr||1)].range[0],Jt[Jt.length-1].range[1]]),is=this.performAction.apply(Dr,[Dt,Xt,Rt,Ne.yy,qe[1],je,Jt].concat(Ht)),typeof is!="undefined")return is;kr&&(se=se.slice(0,-1*kr*2),je=je.slice(0,-1*kr),Jt=Jt.slice(0,-1*kr)),se.push(this.productions_[qe[1]][0]),je.push(Dr.$),Jt.push(Dr._$),Ci=_i[se[se.length-2]][se[se.length-1]],se.push(Ci);break;case 3:return!0}}return!0}},Be=function(){var _e={EOF:1,parseError:function(Kt,se){if(this.yy.parser)this.yy.parser.parseError(Kt,se);else throw new Error(Kt)},setInput:function(Mt,Kt){return this.yy=Kt||this.yy||{},this._input=Mt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Mt=this._input[0];this.yytext+=Mt,this.yyleng++,this.offset++,this.match+=Mt,this.matched+=Mt;var Kt=Mt.match(/(?:\r\n?|\n).*/g);return Kt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Mt},unput:function(Mt){var Kt=Mt.length,se=Mt.split(/(?:\r\n?|\n)/g);this._input=Mt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Kt),this.offset-=Kt;var Ae=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),se.length-1&&(this.yylineno-=se.length-1);var je=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:se?(se.length===Ae.length?this.yylloc.first_column:0)+Ae[Ae.length-se.length].length-se[0].length:this.yylloc.first_column-Kt},this.options.ranges&&(this.yylloc.range=[je[0],je[0]+this.yyleng-Kt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1471
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Mt){this.unput(this.match.slice(Mt))},pastInput:function(){var Mt=this.matched.substr(0,this.matched.length-this.match.length);return(Mt.length>20?"...":"")+Mt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Mt=this.match;return Mt.length<20&&(Mt+=this._input.substr(0,20-Mt.length)),(Mt.substr(0,20)+(Mt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Mt=this.pastInput(),Kt=new Array(Mt.length+1).join("-");return Mt+this.upcomingInput()+`
1472
+ `+Kt+"^"},test_match:function(Mt,Kt){var se,Ae,je;if(this.options.backtrack_lexer&&(je={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(je.yylloc.range=this.yylloc.range.slice(0))),Ae=Mt[0].match(/(?:\r\n?|\n).*/g),Ae&&(this.yylineno+=Ae.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ae?Ae[Ae.length-1].length-Ae[Ae.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Mt[0].length},this.yytext+=Mt[0],this.match+=Mt[0],this.matches=Mt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Mt[0].length),this.matched+=Mt[0],se=this.performAction.call(this,this.yy,this,Kt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),se)return se;if(this._backtrack){for(var Jt in je)this[Jt]=je[Jt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Mt,Kt,se,Ae;this._more||(this.yytext="",this.match="");for(var je=this._currentRules(),Jt=0;Jt<je.length;Jt++)if(se=this._input.match(this.rules[je[Jt]]),se&&(!Kt||se[0].length>Kt[0].length)){if(Kt=se,Ae=Jt,this.options.backtrack_lexer){if(Mt=this.test_match(se,je[Jt]),Mt!==!1)return Mt;if(this._backtrack){Kt=!1;continue}else return!1}else if(!this.options.flex)break}return Kt?(Mt=this.test_match(Kt,je[Ae]),Mt!==!1?Mt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1473
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Kt=this.next();return Kt||this.lex()},begin:function(Kt){this.conditionStack.push(Kt)},popState:function(){var Kt=this.conditionStack.length-1;return Kt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Kt){return Kt=this.conditionStack.length-1-Math.abs(Kt||0),Kt>=0?this.conditionStack[Kt]:"INITIAL"},pushState:function(Kt){this.begin(Kt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Kt,se,Ae,je){switch(Ae){case 0:return this.begin("open_directive"),28;case 1:return this.begin("type_directive"),29;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),31;case 4:return 30;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 27;case 21:return 26;case 22:return 6;case 23:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?::\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23],inclusive:!0}}};return _e}();be.lexer=Be;function fe(){this.yy={}}return fe.prototype=be,be.Parser=fe,new fe}();Is.parser=Is;const Js=Is;let hi="",gn=0;const Bi=[],us=[],zi=[],xi=()=>Pt.j,Ds=(bt,$,ut)=>{(0,Pt.k)(globalThis,bt,$,ut)},ds=function(){Bi.length=0,us.length=0,hi="",zi.length=0,(0,Pt.m)()},$s=function(bt){hi=bt,Bi.push(bt)},Rs=function(){return Bi},Ns=function(){let bt=es();const $=100;let ut=0;for(;!bt&&ut<$;)bt=es(),ut++;return us.push(...zi),us},ts=function(bt,$,ut){const V={id:gn++,section:hi,type:hi,task:bt,score:$||0,events:ut?[ut]:[]};zi.push(V)},Ze=function(bt){zi.find(ut=>ut.id===gn-1).events.push(bt)},Os=function(bt){const $={section:hi,type:hi,description:bt,task:bt,classes:[]};us.push($)},es=function(){const bt=function(ut){return zi[ut].processed};let $=!0;for(const[ut,V]of zi.entries())bt(ut),$=$&&V.processed;return $},Wi=Object.freeze(Object.defineProperty({__proto__:null,addEvent:Ze,addSection:$s,addTask:ts,addTaskOrg:Os,clear:ds,default:{clear:ds,getCommonDb:xi,addSection:$s,getSections:Rs,getTasks:Ns,addTask:ts,addTaskOrg:Os,addEvent:Ze,parseDirective:Ds},getCommonDb:xi,getSections:Rs,getTasks:Ns,parseDirective:Ds},Symbol.toStringTag,{value:"Module"})),Fs=12,Ii=function(bt,$){const ut=bt.append("rect");return ut.attr("x",$.x),ut.attr("y",$.y),ut.attr("fill",$.fill),ut.attr("stroke",$.stroke),ut.attr("width",$.width),ut.attr("height",$.height),ut.attr("rx",$.rx),ut.attr("ry",$.ry),$.class!==void 0&&ut.attr("class",$.class),ut},zr=function(bt,$){const V=bt.append("circle").attr("cx",$.cx).attr("cy",$.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),D=bt.append("g");D.append("circle").attr("cx",$.cx-15/3).attr("cy",$.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),D.append("circle").attr("cx",$.cx+15/3).attr("cy",$.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function X(Lt){const Vt=(0,Qe.Nb1)().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);Lt.append("path").attr("class","mouth").attr("d",Vt).attr("transform","translate("+$.cx+","+($.cy+2)+")")}function pt(Lt){const Vt=(0,Qe.Nb1)().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);Lt.append("path").attr("class","mouth").attr("d",Vt).attr("transform","translate("+$.cx+","+($.cy+7)+")")}function ht(Lt){Lt.append("line").attr("class","mouth").attr("stroke",2).attr("x1",$.cx-5).attr("y1",$.cy+7).attr("x2",$.cx+5).attr("y2",$.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return $.score>3?X(D):$.score<3?pt(D):ht(D),V},$i=function(bt,$){const ut=bt.append("circle");return ut.attr("cx",$.cx),ut.attr("cy",$.cy),ut.attr("class","actor-"+$.pos),ut.attr("fill",$.fill),ut.attr("stroke",$.stroke),ut.attr("r",$.r),ut.class!==void 0&&ut.attr("class",ut.class),$.title!==void 0&&ut.append("title").text($.title),ut},vt=function(bt,$){const ut=$.text.replace(/<br\s*\/?>/gi," "),V=bt.append("text");V.attr("x",$.x),V.attr("y",$.y),V.attr("class","legend"),V.style("text-anchor",$.anchor),$.class!==void 0&&V.attr("class",$.class);const D=V.append("tspan");return D.attr("x",$.x+$.textMargin*2),D.text(ut),V},Yt=function(bt,$){function ut(D,X,pt,ht,Lt){return D+","+X+" "+(D+pt)+","+X+" "+(D+pt)+","+(X+ht-Lt)+" "+(D+pt-Lt*1.2)+","+(X+ht)+" "+D+","+(X+ht)}const V=bt.append("polygon");V.attr("points",ut($.x,$.y,50,20,7)),V.attr("class","labelBox"),$.y=$.y+$.labelMargin,$.x=$.x+.5*$.labelMargin,vt(bt,$)},zt=function(bt,$,ut){const V=bt.append("g"),D=le();D.x=$.x,D.y=$.y,D.fill=$.fill,D.width=ut.width,D.height=ut.height,D.class="journey-section section-type-"+$.num,D.rx=3,D.ry=3,Ii(V,D),ui(ut)($.text,V,D.x,D.y,D.width,D.height,{class:"journey-section section-type-"+$.num},ut,$.colour)};let Zt=-1;const te=function(bt,$,ut){const V=$.x+ut.width/2,D=bt.append("g");Zt++;const X=300+5*30;D.append("line").attr("id","task"+Zt).attr("x1",V).attr("y1",$.y).attr("x2",V).attr("y2",X).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),zr(D,{cx:V,cy:300+(5-$.score)*30,score:$.score});const pt=le();pt.x=$.x,pt.y=$.y,pt.fill=$.fill,pt.width=ut.width,pt.height=ut.height,pt.class="task task-type-"+$.num,pt.rx=3,pt.ry=3,Ii(D,pt),$.x+14,ui(ut)($.task,D,pt.x,pt.y,pt.width,pt.height,{class:"task"},ut,$.colour)},ve=function(bt,$){Ii(bt,{x:$.startx,y:$.starty,width:$.stopx-$.startx,height:$.stopy-$.starty,fill:$.fill,class:"rect"}).lower()},Ge=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},le=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},ui=function(){function bt(D,X,pt,ht,Lt,Vt,Wt,ye){const Se=X.append("text").attr("x",pt+Lt/2).attr("y",ht+Vt/2+5).style("font-color",ye).style("text-anchor","middle").text(D);V(Se,Wt)}function $(D,X,pt,ht,Lt,Vt,Wt,ye,Se){const{taskFontSize:be,taskFontFamily:Be}=ye,fe=D.split(/<br\s*\/?>/gi);for(let _e=0;_e<fe.length;_e++){const Mt=_e*be-be*(fe.length-1)/2,Kt=X.append("text").attr("x",pt+Lt/2).attr("y",ht).attr("fill",Se).style("text-anchor","middle").style("font-size",be).style("font-family",Be);Kt.append("tspan").attr("x",pt+Lt/2).attr("dy",Mt).text(fe[_e]),Kt.attr("y",ht+Vt/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),V(Kt,Wt)}}function ut(D,X,pt,ht,Lt,Vt,Wt,ye){const Se=X.append("switch"),Be=Se.append("foreignObject").attr("x",pt).attr("y",ht).attr("width",Lt).attr("height",Vt).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");Be.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(D),$(D,Se,pt,ht,Lt,Vt,Wt,ye),V(Be,Wt)}function V(D,X){for(const pt in X)pt in X&&D.attr(pt,X[pt])}return function(D){return D.textPlacement==="fo"?ut:D.textPlacement==="old"?bt:$}}(),pe=function(bt){bt.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")};function ge(bt,$){bt.each(function(){var ut=(0,Qe.Ys)(this),V=ut.text().split(/(\s+|<br>)/).reverse(),D,X=[],pt=1.1,ht=ut.attr("y"),Lt=parseFloat(ut.attr("dy")),Vt=ut.text(null).append("tspan").attr("x",0).attr("y",ht).attr("dy",Lt+"em");for(let Wt=0;Wt<V.length;Wt++)D=V[V.length-1-Wt],X.push(D),Vt.text(X.join(" ").trim()),(Vt.node().getComputedTextLength()>$||D==="<br>")&&(X.pop(),Vt.text(X.join(" ").trim()),D==="<br>"?X=[""]:X=[D],Vt=ut.append("tspan").attr("x",0).attr("y",ht).attr("dy",pt+"em").text(D))})}const ke=function(bt,$,ut,V){const D=ut%Fs-1,X=bt.append("g");$.section=D,X.attr("class",($.class?$.class+" ":"")+"timeline-node "+("section-"+D));const pt=X.append("g"),ht=X.append("g"),Vt=ht.append("text").text($.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(ge,$.width).node().getBBox(),Wt=V.fontSize&&V.fontSize.replace?V.fontSize.replace("px",""):V.fontSize;return $.height=Vt.height+Wt*1.1*.5+$.padding,$.height=Math.max($.height,$.maxHeight),$.width=$.width+2*$.padding,ht.attr("transform","translate("+$.width/2+", "+$.padding/2+")"),ki(pt,$,D),$},Ui=function(bt,$,ut){const V=bt.append("g"),X=V.append("text").text($.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(ge,$.width).node().getBBox(),pt=ut.fontSize&&ut.fontSize.replace?ut.fontSize.replace("px",""):ut.fontSize;return V.remove(),X.height+pt*1.1*.5+$.padding},ki=function(bt,$,ut){bt.append("path").attr("id","node-"+$.id).attr("class","node-bkg node-"+$.type).attr("d",`M0 ${$.height-5} v${-$.height+2*5} q0,-5 5,-5 h${$.width-2*5} q5,0 5,5 v${$.height-5} H0 Z`),bt.append("line").attr("class","node-line-"+ut).attr("x1",0).attr("y1",$.height).attr("x2",$.width).attr("y2",$.height)},Gt={drawRect:Ii,drawCircle:$i,drawSection:zt,drawText:vt,drawLabel:Yt,drawTask:te,drawBackgroundRect:ve,getTextObj:Ge,getNoteRect:le,initGraphics:pe,drawNode:ke,getVirtualNodeHeight:Ui},$e=function(bt){Object.keys(bt).forEach(function(ut){conf[ut]=bt[ut]})},Je=function(bt,$,ut,V){const D=(0,Pt.g)(),X=D.leftMargin?D.leftMargin:50;V.db.clear(),V.parser.parse(bt+`
1474
+ `),Pt.l.debug("timeline",V.db);const pt=D.securityLevel;let ht;pt==="sandbox"&&(ht=(0,Qe.Ys)("#i"+$));const Vt=(pt==="sandbox"?(0,Qe.Ys)(ht.nodes()[0].contentDocument.body):(0,Qe.Ys)("body")).select("#"+$);Vt.append("g");const Wt=V.db.getTasks(),ye=V.db.getCommonDb().getDiagramTitle();Pt.l.debug("task",Wt),Gt.initGraphics(Vt);const Se=V.db.getSections();Pt.l.debug("sections",Se);let be=0,Be=0,fe=0,_e=0,Mt=50+X,Kt=50;_e=50;let se=0,Ae=!0;Se.forEach(function(Rt){const Xt={number:se,descr:Rt,section:se,width:150,padding:20,maxHeight:be},ce=Gt.getVirtualNodeHeight(Vt,Xt,D);Pt.l.debug("sectionHeight before draw",ce),be=Math.max(be,ce+20)});let je=0,Jt=0;Pt.l.debug("tasks.length",Wt.length);for(const[Rt,Xt]of Wt.entries()){const ce={number:Rt,descr:Xt,section:Xt.section,width:150,padding:20,maxHeight:Be},He=Gt.getVirtualNodeHeight(Vt,ce,D);Pt.l.debug("taskHeight before draw",He),Be=Math.max(Be,He+20),je=Math.max(je,Xt.events.length);let Ht=0;for(let Ue=0;Ue<Xt.events.length;Ue++){const Ir={descr:Xt.events[Ue],section:Xt.section,number:Xt.section,width:150,padding:20,maxHeight:50};Ht+=Gt.getVirtualNodeHeight(Vt,Ir,D)}Jt=Math.max(Jt,Ht)}Pt.l.debug("maxSectionHeight before draw",be),Pt.l.debug("maxTaskHeight before draw",Be),Se&&Se.length>0?Se.forEach(Rt=>{const Xt={number:se,descr:Rt,section:se,width:150,padding:20,maxHeight:be};Pt.l.debug("sectionNode",Xt);const ce=Vt.append("g"),He=Gt.drawNode(ce,Xt,se,D);Pt.l.debug("sectionNode output",He),ce.attr("transform",`translate(${Mt}, ${_e})`),Kt+=be+50;const Ht=Wt.filter(Ue=>Ue.section===Rt);Ht.length>0&&ti(Vt,Ht,se,Mt,Kt,Be,D,je,Jt,be,!1),Mt+=200*Math.max(Ht.length,1),Kt=_e,se++}):(Ae=!1,ti(Vt,Wt,se,Mt,Kt,Be,D,je,Jt,be,!0));const _i=Vt.node().getBBox();Pt.l.debug("bounds",_i),ye&&Vt.append("text").text(ye).attr("x",_i.width/2-X).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),fe=Ae?be+Be+150:Be+100,Vt.append("g").attr("class","lineWrapper").append("line").attr("x1",X).attr("y1",fe).attr("x2",_i.width+3*X).attr("y2",fe).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,Pt.s)(void 0,Vt,D.timeline.padding?D.timeline.padding:50,D.timeline.useMaxWidth?D.timeline.useMaxWidth:!1)},ti=function(bt,$,ut,V,D,X,pt,ht,Lt,Vt,Wt){for(const ye of $){const Se={descr:ye.task,section:ut,number:ut,width:150,padding:20,maxHeight:X};Pt.l.debug("taskNode",Se);const be=bt.append("g").attr("class","taskWrapper"),fe=Gt.drawNode(be,Se,ut,pt).height;if(Pt.l.debug("taskHeight after draw",fe),be.attr("transform",`translate(${V}, ${D})`),X=Math.max(X,fe),ye.events){const _e=bt.append("g").attr("class","lineWrapper");let Mt=X;D+=100,Mt=Mt+di(bt,ye.events,ut,V,D,pt),D-=100,_e.append("line").attr("x1",V+190/2).attr("y1",D+X).attr("x2",V+190/2).attr("y2",D+X+(Wt?X:Vt)+Lt+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}V=V+200,Wt&&!(0,Pt.g)().timeline.disableMulticolor&&ut++}D=D-10},di=function(bt,$,ut,V,D,X){let pt=0;const ht=D;D=D+100;for(const Lt of $){const Vt={descr:Lt,section:ut,number:ut,width:150,padding:20,maxHeight:50};Pt.l.debug("eventNode",Vt);const Wt=bt.append("g").attr("class","eventWrapper"),Se=Gt.drawNode(Wt,Vt,ut,X).height;pt=pt+Se,Wt.attr("transform",`translate(${V}, ${D})`),D=D+10+Se}return D=ht,pt},We={setConf:$e,draw:Je},Zi=bt=>{let $="";for(let ut=0;ut<bt.THEME_COLOR_LIMIT;ut++)bt["lineColor"+ut]=bt["lineColor"+ut]||bt["cScaleInv"+ut],(0,oi.Z)(bt["lineColor"+ut])?bt["lineColor"+ut]=(0,Vi.Z)(bt["lineColor"+ut],20):bt["lineColor"+ut]=(0,Q.Z)(bt["lineColor"+ut],20);for(let ut=0;ut<bt.THEME_COLOR_LIMIT;ut++){const V=""+(17-3*ut);$+=`
1475
+ .section-${ut-1} rect, .section-${ut-1} path, .section-${ut-1} circle, .section-${ut-1} path {
1476
+ fill: ${bt["cScale"+ut]};
1477
+ }
1478
+ .section-${ut-1} text {
1479
+ fill: ${bt["cScaleLabel"+ut]};
1480
+ }
1481
+ .node-icon-${ut-1} {
1482
+ font-size: 40px;
1483
+ color: ${bt["cScaleLabel"+ut]};
1484
+ }
1485
+ .section-edge-${ut-1}{
1486
+ stroke: ${bt["cScale"+ut]};
1487
+ }
1488
+ .edge-depth-${ut-1}{
1489
+ stroke-width: ${V};
1490
+ }
1491
+ .section-${ut-1} line {
1492
+ stroke: ${bt["cScaleInv"+ut]} ;
1493
+ stroke-width: 3;
1494
+ }
1495
+
1496
+ .lineWrapper line{
1497
+ stroke: ${bt["cScaleLabel"+ut]} ;
1498
+ }
1499
+
1500
+ .disabled, .disabled circle, .disabled text {
1501
+ fill: lightgray;
1502
+ }
1503
+ .disabled text {
1504
+ fill: #efefef;
1505
+ }
1506
+ `}return $},or={db:Wi,renderer:We,parser:Js,styles:bt=>`
1507
+ .edge {
1508
+ stroke-width: 3;
1509
+ }
1510
+ ${Zi(bt)}
1511
+ .section-root rect, .section-root path, .section-root circle {
1512
+ fill: ${bt.git0};
1513
+ }
1514
+ .section-root text {
1515
+ fill: ${bt.gitBranchLabel0};
1516
+ }
1517
+ .icon-container {
1518
+ height:100%;
1519
+ display: flex;
1520
+ justify-content: center;
1521
+ align-items: center;
1522
+ }
1523
+ .edge {
1524
+ fill: none;
1525
+ }
1526
+ .eventWrapper {
1527
+ filter: brightness(120%);
1528
+ }
1529
+ `}}}]);
1530
+ }());