UNPKG

@asyncapi/studio

Version:

One place that allows you to develop an AsyncAPI document, validate it, convert it to the latest version, preview the documentation and visualize the events flow.

127 lines (112 loc) 70.4 kB
"use strict";exports.id=3871,exports.ids=[3871],exports.modules={66881:(t,e,r)=>{r.d(e,{Z:()=>s});var a=r(1249),i=r(67444);let s=(t,e)=>a.Z.lang.round(i.Z.parse(t)[e])},84007:(t,e,r)=>{r.d(e,{Z:()=>i});var a=r(64268);let i=function(t){return(0,a.Z)(t,4)}},23871:(t,e,r)=>{r.d(e,{diagram:()=>en});var a=r(2840),i=r(88441),s=r(73943),n=r(64890),l=r(63951),o=r(51635),c=r(17605),d=r(84007),h=r(66881),g=r(20299),y=r(25329),u=r(19386),p=function(){var t=(0,c.eW)(function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r},"o"),e=[1,15],r=[1,7],a=[1,13],i=[1,14],s=[1,19],n=[1,16],l=[1,17],o=[1,18],d=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],y=[1,24],u=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],x=[1,49],b={trace:(0,c.eW)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,c.eW)(function(t,e,r,a,i,s,n){var l=s.length-1;switch(i){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",s[l-1]),a.setHierarchy(s[l-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",s[l]),"number"==typeof s[l].length?this.$=s[l]:this.$=[s[l]];break;case 13:a.getLogger().debug("Rule: statement #2: ",s[l-1]),this.$=[s[l-1]].concat(s[l]);break;case 14:a.getLogger().debug("Rule: link: ",s[l],t),this.$={edgeTypeStr:s[l],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",s[l-3],s[l-1],s[l]),this.$={edgeTypeStr:s[l],label:s[l-1]};break;case 18:let o=parseInt(s[l]),c=a.generateId();this.$={id:c,type:"space",label:"",width:o,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",s[l-2],s[l-1],s[l]," typestr: ",s[l-1].edgeTypeStr);let d=a.edgeStrToEdgeData(s[l-1].edgeTypeStr);this.$=[{id:s[l-2].id,label:s[l-2].label,type:s[l-2].type,directions:s[l-2].directions},{id:s[l-2].id+"-"+s[l].id,start:s[l-2].id,end:s[l].id,label:s[l-1].label,type:"edge",directions:s[l].directions,arrowTypeEnd:d,arrowTypeStart:"arrow_open"},{id:s[l].id,label:s[l].label,type:a.typeStr2Type(s[l].typeStr),directions:s[l].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[l-1],s[l]),this.$={id:s[l-1].id,label:s[l-1].label,type:a.typeStr2Type(s[l-1].typeStr),directions:s[l-1].directions,widthInColumns:parseInt(s[l],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",s[l]),this.$={id:s[l].id,label:s[l].label,type:a.typeStr2Type(s[l].typeStr),directions:s[l].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",s[l]),this.$={type:"column-setting",columns:"auto"===s[l]?-1:parseInt(s[l])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",s[l-2],s[l-1]),a.generateId(),this.$={...s[l-2],type:"composite",children:s[l-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",s[l-2],s[l-1],s[l]);let h=a.generateId();this.$={id:h,type:"composite",label:"",children:s[l-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",s[l]),this.$={id:s[l]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[l-1],s[l]),this.$={id:s[l-1],label:s[l].label,typeStr:s[l].typeStr,directions:s[l].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",s[l]),this.$=[s[l]];break;case 32:a.getLogger().debug("Rule: dirList: ",s[l-1],s[l]),this.$=[s[l-1]].concat(s[l]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",s[l-2],s[l-1],s[l]),this.$={typeStr:s[l-2]+s[l],label:s[l-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[l-3],s[l-2]," #3:",s[l-1],s[l]),this.$={typeStr:s[l-3]+s[l],label:s[l-2],directions:s[l-1]};break;case 35:case 36:this.$={type:"classDef",id:s[l-1].trim(),css:s[l].trim()};break;case 37:this.$={type:"applyClass",id:s[l-1].trim(),styleClass:s[l].trim()};break;case 38:this.$={type:"applyStyles",id:s[l-1].trim(),stylesStr:s[l].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:l,46:o},{8:[1,20]},t(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:a,29:i,31:s,39:n,43:l,46:o}),t(h,[2,16],{14:22,15:g,16:y}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(u,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:s},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:l,46:o},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(u,[2,24]),{10:e,11:37,13:4,14:22,15:g,16:y,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:l,46:o},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(p,[2,30]),{18:[1,43]},{18:[1,44]},t(u,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:x},{15:[1,50]},t(h,[2,27]),t(p,[2,33]),{38:[1,51]},{33:52,34:x,38:[2,31]},{31:[2,15]},t(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,c.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var r=Error(t);throw r.hash=e,r}},"parseError"),parse:(0,c.eW)(function(t){var e=this,r=[0],a=[],i=[null],s=[],n=this.table,l="",o=0,d=0,h=0,g=s.slice.call(arguments,1),y=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);y.setInput(t,u.yy),u.yy.lexer=y,u.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var x=y.yylloc;s.push(x);var b=y.options&&y.options.ranges;function f(){var t;return"number"!=typeof(t=a.pop()||y.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.eW)(function(t){r.length=r.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,c.eW)(f,"lex");for(var w,m,k,L,S,_,E,W,$,D={};;){if(k=r[r.length-1],this.defaultActions[k]?L=this.defaultActions[k]:(null==w&&(w=f()),L=n[k]&&n[k][w]),void 0===L||!L.length||!L[0]){var T="";for(_ in $=[],n[k])this.terminals_[_]&&_>2&&$.push("'"+this.terminals_[_]+"'");T=y.showPosition?"Parse error on line "+(o+1)+":\n"+y.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==w?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(T,{text:y.match,token:this.terminals_[w]||w,line:y.yylineno,loc:x,expected:$})}if(L[0]instanceof Array&&L.length>1)throw Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(L[0]){case 1:r.push(w),i.push(y.yytext),s.push(y.yylloc),r.push(L[1]),w=null,m?(w=m,m=null):(d=y.yyleng,l=y.yytext,o=y.yylineno,x=y.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[L[1]][1],D.$=i[i.length-E],D._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},b&&(D._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),void 0!==(S=this.performAction.apply(D,[l,d,o,u.yy,L[1],i,s].concat(g))))return S;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),s=s.slice(0,-1*E)),r.push(this.productions_[L[1]][0]),i.push(D.$),s.push(D._$),W=n[r[r.length-2]][r[r.length-1]],r.push(W);break;case 3:return!0}}return!0},"parse")},f={EOF:1,parseError:(0,c.eW)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,c.eW)(function(t,e){return this.yy=e||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},"setInput"),input:(0,c.eW)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.eW)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;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),r.length-1&&(this.yylineno-=r.length-1);var i=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.eW)(function(){return this._more=!0,this},"more"),reject:(0,c.eW)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.eW)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.eW)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.eW)(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,"")},"upcomingInput"),showPosition:(0,c.eW)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.eW)(function(t,e){var r,a,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(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+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var s in i)this[s]=i[s];return!1},"test_match"),next:(0,c.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,r,a,i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,c.eW)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.eW)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.eW)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.eW)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,c.eW)(function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};function w(){this.yy={}}return b.lexer=f,(0,c.eW)(w,"Parser"),w.prototype=b,b.Parser=w,new w}();p.parser=p;var x=new Map,b=[],f=new Map,w="color",m="fill",k=(0,o.nV)(),L=new Map,S=(0,c.eW)(t=>o.SY.sanitizeText(t,k),"sanitizeText"),_=(0,c.eW)(function(t,e=""){let r=L.get(t);r||(r={id:t,styles:[],textStyles:[]},L.set(t,r)),null!=e&&e.split(",").forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(w).exec(t)){let t=e.replace(m,"bgFill").replace(w,m);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),E=(0,c.eW)(function(t,e=""){let r=x.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),W=(0,c.eW)(function(t,e){t.split(",").forEach(function(t){let r=x.get(t);if(void 0===r){let e=t.trim();r={id:e,type:"na",children:[]},x.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),$=(0,c.eW)((t,e)=>{let r=t.flat(),a=[],i=r.find(t=>t?.type==="column-setting"),s=i?.columns??-1;for(let t of r){if("number"==typeof s&&s>0&&"column-setting"!==t.type&&"number"==typeof t.widthInColumns&&t.widthInColumns>s&&c.cM.warn(`Block ${t.id} width ${t.widthInColumns} exceeds configured column width ${s}`),t.label&&(t.label=S(t.label)),"classDef"===t.type){_(t.id,t.css);continue}if("applyClass"===t.type){W(t.id,t?.styleClass??"");continue}if("applyStyles"===t.type){t?.stylesStr&&E(t.id,t?.stylesStr);continue}if("column-setting"===t.type)e.columns=t.columns??-1;else if("edge"===t.type){let e=(f.get(t.id)??0)+1;f.set(t.id,e),t.id=e+"-"+t.id,b.push(t)}else{t.label||("composite"===t.type?t.label="":t.label=t.id);let e=x.get(t.id);if(void 0===e?x.set(t.id,t):("na"!==t.type&&(e.type=t.type),t.label!==t.id&&(e.label=t.label)),t.children&&$(t.children,t),"space"===t.type){let e=t.width??1;for(let r=0;r<e;r++){let e=(0,d.Z)(t);e.id=e.id+"-"+r,x.set(e.id,e),a.push(e)}}else void 0===e&&a.push(t)}}e.children=a},"populateBlockDatabase"),D=[],T={id:"root",type:"composite",children:[],columns:-1},M=(0,c.eW)(()=>{c.cM.debug("Clear called"),(0,o.ZH)(),x=new Map([["root",T={id:"root",type:"composite",children:[],columns:-1}]]),D=[],L=new Map,b=[],f=new Map},"clear");function I(t){switch(c.cM.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return c.cM.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function N(t){return(c.cM.debug("typeStr2Type",t),"=="===t)?"thick":"normal"}function v(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}(0,c.eW)(I,"typeStr2Type"),(0,c.eW)(N,"edgeTypeStr2Type"),(0,c.eW)(v,"edgeStrToEdgeData");var C=0,B=(0,c.eW)(()=>(C++,"id-"+Math.random().toString(36).substr(2,12)+"-"+C),"generateId"),R=(0,c.eW)(t=>{T.children=t,$(t,T),D=T.children},"setHierarchy"),O=(0,c.eW)(t=>{let e=x.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),z=(0,c.eW)(()=>[...x.values()],"getBlocksFlat"),A=(0,c.eW)(()=>D||[],"getBlocks"),P=(0,c.eW)(()=>b,"getEdges"),Y=(0,c.eW)(t=>x.get(t),"getBlock"),X=(0,c.eW)(t=>{x.set(t.id,t)},"setBlock"),F=(0,c.eW)(()=>c.cM,"getLogger"),H=(0,c.eW)(function(){return L},"getClasses"),U={getConfig:(0,c.eW)(()=>(0,o.iE)().block,"getConfig"),typeStr2Type:I,edgeTypeStr2Type:N,edgeStrToEdgeData:v,getLogger:F,getBlocksFlat:z,getBlocks:A,getEdges:P,setHierarchy:R,getBlock:Y,setBlock:X,getColumns:O,getClasses:H,clear:M,generateId:B},K=(0,c.eW)((t,e)=>{let r=h.Z,a=r(t,"r"),i=r(t,"g"),s=r(t,"b");return g.Z(a,i,s,e)},"fade"),V=(0,c.eW)(t=>`.label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } .cluster-label text { fill: ${t.titleColor}; } .cluster-label span,p { color: ${t.titleColor}; } .label text,span,p { fill: ${t.nodeTextColor||t.textColor}; color: ${t.nodeTextColor||t.textColor}; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: 1px; } .flowchart-label text { text-anchor: middle; } // .flowchart-label .text-outer-tspan { // text-anchor: middle; // } // .flowchart-label .text-inner-tspan { // text-anchor: start; // } .node .label { text-align: center; } .node.clickable { cursor: pointer; } .arrowheadPath { fill: ${t.arrowheadColor}; } .edgePath .path { stroke: ${t.lineColor}; stroke-width: 2.0px; } .flowchart-link { stroke: ${t.lineColor}; fill: none; } .edgeLabel { background-color: ${t.edgeLabelBackground}; /* * This is for backward compatibility with existing code that didn't * add a \`<p>\` around edge labels. * * TODO: We should probably remove this in a future release. */ p { margin: 0; padding: 0; display: inline; } rect { opacity: 0.5; background-color: ${t.edgeLabelBackground}; fill: ${t.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { background-color: ${t.edgeLabelBackground}; } .node .cluster { // fill: ${K(t.mainBkg,.5)}; fill: ${K(t.clusterBkg,.5)}; stroke: ${K(t.clusterBorder,.2)}; box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; stroke-width: 1px; } .cluster text { fill: ${t.titleColor}; } .cluster span,p { color: ${t.titleColor}; } /* .cluster div { color: ${t.titleColor}; } */ div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${t.fontFamily}; font-size: 12px; background: ${t.tertiaryColor}; border: 1px solid ${t.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .flowchartTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } ${(0,a.G)()} `,"getStyles"),j=(0,c.eW)((t,e,r,a)=>{e.forEach(e=>{te[e](t,r,a)})},"insertMarkers"),Z=(0,c.eW)((t,e,r)=>{c.cM.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).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",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),q=(0,c.eW)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).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",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).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")},"composition"),G=(0,c.eW)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).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",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).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"),J=(0,c.eW)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).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",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).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")},"dependency"),Q=(0,c.eW)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),tt=(0,c.eW)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).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",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).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")},"point"),te={extension:Z,composition:q,aggregation:G,dependency:J,lollipop:Q,point:tt,circle:(0,c.eW)((t,e,r)=>{t.append("marker").attr("id",r+"_"+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",r+"_"+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")},"circle"),cross:(0,c.eW)((t,e,r)=>{t.append("marker").attr("id",r+"_"+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",r+"_"+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")},"cross"),barb:(0,c.eW)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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")},"barb")},tr=o.nV()?.block?.padding??8;function ta(t,e){if(0===t||!Number.isInteger(t))throw Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}(0,c.eW)(ta,"calculateBlockPosition");var ti=(0,c.eW)(t=>{let e=0,r=0;for(let a of t.children){let{width:t,height:i,x:s,y:n}=a.size??{width:0,height:0,x:0,y:0};c.cM.debug("getMaxChildSize abc95 child:",a.id,"width:",t,"height:",i,"x:",s,"y:",n,a.type),"space"!==a.type&&(t>e&&(e=t/(a.widthInColumns??1)),i>r&&(r=i))}return{width:e,height:r}},"getMaxChildSize");function ts(t,e,r=0,a=0){c.cM.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:a,x:0,y:0});let i=0,s=0;if(t.children?.length>0){for(let r of t.children)ts(r,e);let n=ti(t);for(let e of(i=n.width,s=n.height,c.cM.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,s),t.children))e.size&&(c.cM.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${i} ${s} ${JSON.stringify(e.size)}`),e.size.width=i*(e.widthInColumns??1)+tr*((e.widthInColumns??1)-1),e.size.height=s,e.size.x=0,e.size.y=0,c.cM.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${i} maxHeight:${s}`));for(let r of t.children)ts(r,e,i,s);let l=t.columns??-1,o=0;for(let e of t.children)o+=e.widthInColumns??1;let d=t.children.length;l>0&&l<o&&(d=l);let h=Math.ceil(o/d),g=d*(i+tr)+tr,y=h*(s+tr)+tr;if(g<r){c.cM.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${a} width ${g}`),g=r,y=a;let e=(r-d*tr-tr)/d,n=(a-h*tr-tr)/h;for(let r of(c.cM.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",i),c.cM.debug("Size indata abc88",t.id,"childHeight",n,"maxHeight",s),c.cM.debug("Size indata abc88 xSize",d,"padding",tr),t.children))r.size&&(r.size.width=e,r.size.height=n,r.size.x=0,r.size.y=0)}if(c.cM.debug(`abc95 (finale calc) ${t.id} xSize ${d} ySize ${h} columns ${l}${t.children.length} width=${Math.max(g,t.size?.width||0)}`),g<(t?.size?.width||0)){g=t?.size?.width||0;let e=l>0?Math.min(t.children.length,l):t.children.length;if(e>0){let r=(g-e*tr-tr)/e;for(let e of(c.cM.debug("abc95 (growing to fit) width",t.id,g,t.size?.width,r),t.children))e.size&&(e.size.width=r)}}t.size={width:g,height:y,x:0,y:0}}c.cM.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function tn(t,e){c.cM.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let r=t.columns??-1;if(c.cM.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){let a=t?.children[0]?.size?.width??0,i=t.children.length*a+(t.children.length-1)*tr;c.cM.debug("widthOfChildren 88",i,"posX");let s=new Map;{let e=0;for(let a of t.children){if(!a.size)continue;let{py:t}=ta(r,e),i=s.get(t)??0;a.size.height>i&&s.set(t,a.size.height);let n=a?.widthInColumns??1;r>0&&(n=Math.min(n,r-e%r)),e+=n}}let n=new Map;{let t=0;for(let e of[...s.keys()].sort((t,e)=>t-e))n.set(e,t),t+=(s.get(e)??0)+tr}let l=0;c.cM.debug("abc91 block?.size?.x",t.id,t?.size?.x);let o=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-tr,d=0;for(let a of t.children){if(!a.size)continue;let{width:i,height:h}=a.size,{px:g,py:y}=ta(r,l);if(y!=d&&(d=y,o=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-tr,c.cM.debug("New row in layout for block",t.id," and child ",a.id,d)),c.cM.debug(`abc89 layout blocks (child) id: ${a.id} Pos: ${l} (px, py) ${g},${y} (${t?.size?.x},${t?.size?.y}) parent: ${t.id} width: ${i}${tr}`),t.size){let e=i/2;a.size.x=o+tr+e,c.cM.debug(`abc91 layout blocks (calc) px, pyid:${a.id} startingPos=X${o} new startingPosX${a.size.x} ${e} padding=${tr} width=${i} halfWidth=${e} => x:${a.size.x} y:${a.size.y} ${a.widthInColumns} (width * (child?.w || 1)) / 2 ${i*(a?.widthInColumns??1)/2}`),o=a.size.x+e;let r=n.get(y)??0,l=s.get(y)??h;a.size.y=t.size.y-t.size.height/2+r+l/2+tr,c.cM.debug(`abc88 layout blocks (calc) px, pyid:${a.id}startingPosX${o}${tr}${e}=>x:${a.size.x}y:${a.size.y}${a.widthInColumns}(width * (child?.w || 1)) / 2${i*(a?.widthInColumns??1)/2}`)}a.children&&tn(a,e);let u=a?.widthInColumns??1;r>0&&(u=Math.min(u,r-l%r)),l+=u,c.cM.debug("abc88 columnsPos",a,l)}}c.cM.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function tl(t,{minX:e,minY:r,maxX:a,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){let{x:s,y:n,width:l,height:o}=t.size;s-l/2<e&&(e=s-l/2),n-o/2<r&&(r=n-o/2),s+l/2>a&&(a=s+l/2),n+o/2>i&&(i=n+o/2)}if(t.children)for(let s of t.children)({minX:e,minY:r,maxX:a,maxY:i}=tl(s,{minX:e,minY:r,maxX:a,maxY:i}));return{minX:e,minY:r,maxX:a,maxY:i}}function to(t){let e=t.getBlock("root");if(!e)return;ts(e,t,0,0),tn(e,t),c.cM.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:a,maxX:i,maxY:s}=tl(e);return{x:r,y:a,width:i-r,height:s-a}}(0,c.eW)(ts,"setBlockSizes"),(0,c.eW)(tn,"layoutBlocks"),(0,c.eW)(tl,"findBounds"),(0,c.eW)(to,"layout");var tc=(0,c.eW)(async(t,e,r,a=!1,i=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);let l=(0,o.nV)(),c=(0,o._X)(l);return await (0,n.rw)(t,s,{style:r,isTitle:a,useHtmlLabels:c,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},l)},"createLabel"),td=(0,c.eW)((t,e,r,a,i)=>{e.arrowTypeStart&&tg(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&tg(t,"end",e.arrowTypeEnd,r,a,i)},"addEdgeMarkers"),th={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},tg=(0,c.eW)((t,e,r,a,i,s)=>{let n=th[r];if(!n){c.cM.warn(`Unknown arrow type: ${r}`);return}t.attr(`marker-${e}`,`url(${a}#${i}_${s}-${n}${"start"===e?"Start":"End"})`)},"addEdgeMarker"),ty={},tu={},tp=(0,c.eW)(async(t,e)=>{let r;let a=(0,o.nV)(),s=(0,o._X)(a),l=t.insert("g").attr("class","edgeLabel"),c=l.insert("g").attr("class","label"),d="markdown"===e.labelType,h=await (0,n.rw)(t,e.label,{style:e.labelStyle,useHtmlLabels:s,addSvgBackground:d,isNode:!1,markdown:d,width:d?void 0:Number.POSITIVE_INFINITY},a);c.node().appendChild(h);let g=h.getBBox(),u=g;if(s){let t=h.children[0],e=(0,y.Ys)(h);u=g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}else{let t=(0,y.Ys)(h).select("text").node();t&&"function"==typeof t.getBBox&&(u=t.getBBox())}if(c.attr("transform",(0,i.eR)(u,s)),ty[e.id]=l,e.width=g.width,e.height=g.height,e.startLabelLeft){let a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner"),l=await tc(n,e.startLabelLeft,e.labelStyle);r=l;let o=l.getBBox();if(s){let t=l.children[0],e=(0,y.Ys)(l);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}n.attr("transform",(0,i.eR)(o,s)),tu[e.id]||(tu[e.id]={}),tu[e.id].startLeft=a,tx(r,e.startLabelLeft)}if(e.startLabelRight){let a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner"),l=await tc(a,e.startLabelRight,e.labelStyle);r=l,n.node().appendChild(l);let o=l.getBBox();if(s){let t=l.children[0],e=(0,y.Ys)(l);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}n.attr("transform",(0,i.eR)(o,s)),tu[e.id]||(tu[e.id]={}),tu[e.id].startRight=a,tx(r,e.startLabelRight)}if(e.endLabelLeft){let a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner"),l=await tc(n,e.endLabelLeft,e.labelStyle);r=l;let o=l.getBBox();if(s){let t=l.children[0],e=(0,y.Ys)(l);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}n.attr("transform",(0,i.eR)(o,s)),a.node().appendChild(l),tu[e.id]||(tu[e.id]={}),tu[e.id].endLeft=a,tx(r,e.endLabelLeft)}if(e.endLabelRight){let a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner"),l=await tc(n,e.endLabelRight,e.labelStyle);r=l;let o=l.getBBox();if(s){let t=l.children[0],e=(0,y.Ys)(l);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}n.attr("transform",(0,i.eR)(o,s)),a.node().appendChild(l),tu[e.id]||(tu[e.id]={}),tu[e.id].endRight=a,tx(r,e.endLabelRight)}return h},"insertEdgeLabel");function tx(t,e){(0,o._X)((0,o.nV)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.eW)(tx,"setTerminalWidth");var tb=(0,c.eW)((t,e)=>{c.cM.debug("Moving label abc88 ",t.id,t.label,ty[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,a=(0,o.nV)(),{subGraphTitleTotalMargin:i}=(0,s.L)(a);if(t.label){let a=ty[t.id],s=t.x,n=t.y;if(r){let a=l.w8.calcLabelPosition(r);c.cM.debug("Moving label "+t.label+" from (",s,",",n,") to (",a.x,",",a.y,") abc88"),e.updatedPath&&(s=a.x,n=a.y)}a.attr("transform",`translate(${s}, ${n+i/2})`)}if(t.startLabelLeft){let e=tu[t.id].startLeft,a=t.x,i=t.y;if(r){let e=l.w8.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.startLabelRight){let e=tu[t.id].startRight,a=t.x,i=t.y;if(r){let e=l.w8.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelLeft){let e=tu[t.id].endLeft,a=t.x,i=t.y;if(r){let e=l.w8.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelRight){let e=tu[t.id].endRight,a=t.x,i=t.y;if(r){let e=l.w8.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}},"positionEdgeLabel"),tf=(0,c.eW)((t,e)=>{let r=t.x,a=t.y,i=Math.abs(e.x-r),s=Math.abs(e.y-a),n=t.width/2,l=t.height/2;return i>=n||s>=l},"outsideNode"),tw=(0,c.eW)((t,e,r)=>{c.cM.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(r)} node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let a=t.x,i=t.y,s=Math.abs(a-r.x),n=t.width/2,l=r.x<e.x?n-s:n+s,o=t.height/2,d=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*n>Math.abs(a-e.x)*o){let t=r.y<e.y?e.y-o-i:i-o-e.y;l=h*t/d;let a={x:r.x<e.x?r.x+l:r.x-h+l,y:r.y<e.y?r.y+d-t:r.y-d+t};return 0===l&&(a.x=e.x,a.y=e.y),0===h&&(a.x=e.x),0===d&&(a.y=e.y),c.cM.debug(`abc89 topp/bott calc, Q ${d}, q ${t}, R ${h}, r ${l}`,a),a}{let t=d*(l=r.x<e.x?e.x-n-a:a-n-e.x)/h,i=r.x<e.x?r.x+h-l:r.x-h+l,s=r.y<e.y?r.y+t:r.y-t;return c.cM.debug(`sides calc abc89, Q ${d}, q ${t}, R ${h}, r ${l}`,{_x:i,_y:s}),0===l&&(i=e.x,s=e.y),0===h&&(i=e.x),0===d&&(s=e.y),{x:i,y:s}}},"intersection"),tm=(0,c.eW)((t,e)=>{c.cM.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach(t=>{if(tf(e,t)||i)a=t,i||r.push(t);else{let s=tw(e,a,t),n=!1;r.forEach(t=>{n=n||t.x===s.x&&t.y===s.y}),r.some(t=>t.x===s.x&&t.y===s.y)||r.push(s),i=!0}}),r},"cutPathAtIntersect"),tk=(0,c.eW)(function(t,e,r,a,s,n,l){let d,h=r.points;c.cM.debug("abc88 InsertEdge: edge=",r,"e=",e);let g=!1,u=n.node(e.v);var p=n.node(e.w);p?.intersect&&u?.intersect&&((h=h.slice(1,r.points.length-1)).unshift(u.intersect(h[0])),h.push(p.intersect(h[h.length-1]))),r.toCluster&&(c.cM.debug("to cluster abc88",a[r.toCluster]),h=tm(r.points,a[r.toCluster].node),g=!0),r.fromCluster&&(c.cM.debug("from cluster abc88",a[r.fromCluster]),h=tm(h.reverse(),a[r.fromCluster].node).reverse(),g=!0);let x=h.filter(t=>!Number.isNaN(t.y)),b=y.$0Z;r.curve&&("graph"===s||"flowchart"===s)&&(b=r.curve);let{x:f,y:w}=(0,i.om)(r),m=(0,y.jvg)().x(f).y(w).curve(b);switch(r.thickness){case"normal":d="edge-thickness-normal";break;case"thick":case"invisible":d="edge-thickness-thick";break;default:d=""}switch(r.pattern){case"solid":d+=" edge-pattern-solid";break;case"dotted":d+=" edge-pattern-dotted";break;case"dashed":d+=" edge-pattern-dashed"}let k=t.append("path").attr("d",m(x)).attr("id",r.id).attr("class"," "+d+(r.classes?" "+r.classes:"")).attr("style",r.style),L="";((0,o.nV)().flowchart.arrowMarkerAbsolute||(0,o.nV)().state.arrowMarkerAbsolute)&&(L=(0,o.Gr)(!0)),td(k,r,L,l,s);let S={};return g&&(S.updatedPath=h),S.originalPath=r.points,S},"insertEdge"),tL=(0,c.eW)(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),tS=(0,c.eW)((t,e,r)=>{let a=tL(t),i=e.height+2*r.padding,s=i/2,n=e.width+2*s+r.padding,l=r.padding/2;return a.has("right")&&a.has("left")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:s,y:0},{x:n/2,y:2*l},{x:n-s,y:0},{x:n,y:0},{x:n,y:-i/3},{x:n+2*l,y:-i/2},{x:n,y:-2*i/3},{x:n,y:-i},{x:n-s,y:-i},{x:n/2,y:-i-2*l},{x:s,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*l,y:-i/2},{x:0,y:-i/3}]:a.has("right")&&a.has("left")&&a.has("up")?[{x:s,y:0},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}]:a.has("right")&&a.has("left")&&a.has("down")?[{x:0,y:0},{x:s,y:-i},{x:n-s,y:-i},{x:n,y:0}]:a.has("right")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:n,y:-s},{x:n,y:-i+s},{x:0,y:-i}]:a.has("left")&&a.has("up")&&a.has("down")?[{x:n,y:0},{x:0,y:-s},{x:0,y:-i+s},{x:n,y:-i}]:a.has("right")&&a.has("left")?[{x:s,y:0},{x:s,y:-l},{x:n-s,y:-l},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:n-s,y:-i+l},{x:s,y:-i+l},{x:s,y:-i},{x:0,y:-i/2}]:a.has("up")&&a.has("down")?[{x:n/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-i+l},{x:0,y:-i+l},{x:n/2,y:-i},{x:n,y:-i+l},{x:n-s,y:-i+l},{x:n-s,y:-l},{x:n,y:-l}]:a.has("right")&&a.has("up")?[{x:0,y:0},{x:n,y:-s},{x:0,y:-i}]:a.has("right")&&a.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-i}]:a.has("left")&&a.has("up")?[{x:n,y:0},{x:0,y:-s},{x:n,y:-i}]:a.has("left")&&a.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-i}]:a.has("right")?[{x:s,y:-l},{x:s,y:-l},{x:n-s,y:-l},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:n-s,y:-i+l},{x:s,y:-i+l},{x:s,y:-i+l}]:a.has("left")?[{x:s,y:0},{x:s,y:-l},{x:n-s,y:-l},{x:n-s,y:-i+l},{x:s,y:-i+l},{x:s,y:-i},{x:0,y:-i/2}]:a.has("up")?[{x:s,y:-l},{x:s,y:-i+l},{x:0,y:-i+l},{x:n/2,y:-i},{x:n,y:-i+l},{x:n-s,y:-i+l},{x:n-s,y:-l}]:a.has("down")?[{x:n/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-i+l},{x:n-s,y:-i+l},{x:n-s,y:-l},{x:n,y:-l}]:[{x:0,y:0}]},"getArrowPoints");function t_(t,e,r,a){var i=t.x,s=t.y,n=i-a.x,l=s-a.y,o=Math.sqrt(e*e*l*l+r*r*n*n),c=Math.abs(e*r*n/o);a.x<i&&(c=-c);var d=Math.abs(e*r*l/o);return a.y<s&&(d=-d),{x:i+c,y:s+d}}function tE(t,e,r){return t_(t,e,e,r)}function tW(t,e,r,a){var i,s,n,l,o,c,d,h,g,y,u,p,x;if(i=e.y-t.y,n=t.x-e.x,o=e.x*t.y-t.x*e.y,g=i*r.x+n*r.y+o,y=i*a.x+n*a.y+o,!(0!==g&&0!==y&&t$(g,y))&&(s=a.y-r.y,l=r.x-a.x,c=a.x*r.y-r.x*a.y,d=s*t.x+l*t.y+c,h=s*e.x+l*e.y+c,!(0!==d&&0!==h&&t$(d,h))&&0!=(u=i*l-s*n)))return p=Math.abs(u/2),{x:(x=n*c-l*o)<0?(x-p)/u:(x+p)/u,y:(x=s*o-i*c)<0?(x-p)/u:(x+p)/u}}function t$(t,e){return t*e>0}function tD(t,e,r){var a=t.x,i=t.y,s=[],n=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),l=Math.min(l,t.y)}):(n=Math.min(n,e.x),l=Math.min(l,e.y));for(var o=a-t.width/2-n,c=i-t.height/2-l,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],y=tW(t,r,{x:o+h.x,y:c+h.y},{x:o+g.x,y:c+g.y});y&&s.push(y)}return s.length?(s.length>1&&s.sort(function(t,e){var a=t.x-r.x,i=t.y-r.y,s=Math.sqrt(a*a+i*i),n=e.x-r.x,l=e.y-r.y,o=Math.sqrt(n*n+l*l);return s<o?-1:s===o?0:1}),s[0]):t}(0,c.eW)(function(t,e){return t.intersect(e)},"intersectNode"),(0,c.eW)(t_,"intersectEllipse"),(0,c.eW)(tE,"intersectCircle"),(0,c.eW)(tW,"intersectLine"),(0,c.eW)(t$,"sameSign"),(0,c.eW)(tD,"intersectPolygon");var tT={circle:tE,polygon:tD,rect:(0,c.eW)((t,e)=>{var r,a,i=t.x,s=t.y,n=e.x-i,l=e.y-s,o=t.width/2,c=t.height/2;return Math.abs(l)*o>Math.abs(n)*c?(l<0&&(c=-c),r=0===l?0:c*n/l,a=c):(n<0&&(o=-o),r=o,a=0===n?0:o