Files
Awperative/site/public/blockDiagram-VD42YOAC-VWWETFZB.min.js
2026-02-09 16:55:27 -05:00

124 lines
70 KiB
JavaScript
Executable File

import{a as Vt}from"./chunk-PPPUQLJ3.min.js";import{a as jt}from"./chunk-VUATWGGE.min.js";import{c as Yt}from"./chunk-77XMBG7U.min.js";import{a as Ht}from"./chunk-ANLQN3B7.min.js";import{f as Xt,g as mt}from"./chunk-XCAVDAZC.min.js";import{e as Ut}from"./chunk-R5JLOOQ4.min.js";import"./chunk-PTL4EUOE.min.js";import{d as Kt,m as tt,o as lt}from"./chunk-QZZKR5JD.min.js";import"./chunk-CM5D5KZN.min.js";import{D as nt,E as zt,F as X,K as At,L as Mt,P as Ft,W as I,a as Ot,b as Rt,y as $}from"./chunk-3EE2TK35.min.js";import"./chunk-E5F23VE2.min.js";import{J as Wt,N as Pt,b as d,d as w,j as N}from"./chunk-6TVUEPFY.min.js";import"./chunk-OSRY5VT3.min.js";var wt=(function(){var e=d(function(D,x,g,f){for(g=g||{},f=D.length;f--;g[D[f]]=x);return g},"o"),t=[1,15],a=[1,7],i=[1,13],l=[1,14],s=[1,19],r=[1,16],n=[1,17],c=[1,18],u=[8,30],o=[8,10,21,28,29,30,31,39,43,46],b=[1,23],m=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],L=[8,10,15,16,21,27,28,29,30,31,39,43,46],E=[1,49],S={trace:d(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:d(function(x,g,f,k,v,h,W){var p=h.length-1;switch(v){case 4:k.getLogger().debug("Rule: separator (NL) ");break;case 5:k.getLogger().debug("Rule: separator (Space) ");break;case 6:k.getLogger().debug("Rule: separator (EOF) ");break;case 7:k.getLogger().debug("Rule: hierarchy: ",h[p-1]),k.setHierarchy(h[p-1]);break;case 8:k.getLogger().debug("Stop NL ");break;case 9:k.getLogger().debug("Stop EOF ");break;case 10:k.getLogger().debug("Stop NL2 ");break;case 11:k.getLogger().debug("Stop EOF2 ");break;case 12:k.getLogger().debug("Rule: statement: ",h[p]),typeof h[p].length=="number"?this.$=h[p]:this.$=[h[p]];break;case 13:k.getLogger().debug("Rule: statement #2: ",h[p-1]),this.$=[h[p-1]].concat(h[p]);break;case 14:k.getLogger().debug("Rule: link: ",h[p],x),this.$={edgeTypeStr:h[p],label:""};break;case 15:k.getLogger().debug("Rule: LABEL link: ",h[p-3],h[p-1],h[p]),this.$={edgeTypeStr:h[p],label:h[p-1]};break;case 18:let R=parseInt(h[p]),G=k.generateId();this.$={id:G,type:"space",label:"",width:R,children:[]};break;case 23:k.getLogger().debug("Rule: (nodeStatement link node) ",h[p-2],h[p-1],h[p]," typestr: ",h[p-1].edgeTypeStr);let V=k.edgeStrToEdgeData(h[p-1].edgeTypeStr);this.$=[{id:h[p-2].id,label:h[p-2].label,type:h[p-2].type,directions:h[p-2].directions},{id:h[p-2].id+"-"+h[p].id,start:h[p-2].id,end:h[p].id,label:h[p-1].label,type:"edge",directions:h[p].directions,arrowTypeEnd:V,arrowTypeStart:"arrow_open"},{id:h[p].id,label:h[p].label,type:k.typeStr2Type(h[p].typeStr),directions:h[p].directions}];break;case 24:k.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[p-1],h[p]),this.$={id:h[p-1].id,label:h[p-1].label,type:k.typeStr2Type(h[p-1].typeStr),directions:h[p-1].directions,widthInColumns:parseInt(h[p],10)};break;case 25:k.getLogger().debug("Rule: nodeStatement (node) ",h[p]),this.$={id:h[p].id,label:h[p].label,type:k.typeStr2Type(h[p].typeStr),directions:h[p].directions,widthInColumns:1};break;case 26:k.getLogger().debug("APA123",this?this:"na"),k.getLogger().debug("COLUMNS: ",h[p]),this.$={type:"column-setting",columns:h[p]==="auto"?-1:parseInt(h[p])};break;case 27:k.getLogger().debug("Rule: id-block statement : ",h[p-2],h[p-1]);let Bt=k.generateId();this.$={...h[p-2],type:"composite",children:h[p-1]};break;case 28:k.getLogger().debug("Rule: blockStatement : ",h[p-2],h[p-1],h[p]);let at=k.generateId();this.$={id:at,type:"composite",label:"",children:h[p-1]};break;case 29:k.getLogger().debug("Rule: node (NODE_ID separator): ",h[p]),this.$={id:h[p]};break;case 30:k.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[p-1],h[p]),this.$={id:h[p-1],label:h[p].label,typeStr:h[p].typeStr,directions:h[p].directions};break;case 31:k.getLogger().debug("Rule: dirList: ",h[p]),this.$=[h[p]];break;case 32:k.getLogger().debug("Rule: dirList: ",h[p-1],h[p]),this.$=[h[p-1]].concat(h[p]);break;case 33:k.getLogger().debug("Rule: nodeShapeNLabel: ",h[p-2],h[p-1],h[p]),this.$={typeStr:h[p-2]+h[p],label:h[p-1]};break;case 34:k.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[p-3],h[p-2]," #3:",h[p-1],h[p]),this.$={typeStr:h[p-3]+h[p],label:h[p-2],directions:h[p-1]};break;case 35:case 36:this.$={type:"classDef",id:h[p-1].trim(),css:h[p].trim()};break;case 37:this.$={type:"applyClass",id:h[p-1].trim(),styleClass:h[p].trim()};break;case 38:this.$={type:"applyStyles",id:h[p-1].trim(),stylesStr:h[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:l,31:s,39:r,43:n,46:c}),e(o,[2,16],{14:22,15:b,16:m}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(y,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:s},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(L,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(y,[2,24]),{10:t,11:37,13:4,14:22,15:b,16:m,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(L,[2,30]),{18:[1,43]},{18:[1,44]},e(y,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:E},{15:[1,50]},e(o,[2,27]),e(L,[2,33]),{38:[1,51]},{33:52,34:E,38:[2,31]},{31:[2,15]},e(L,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(x,g){if(g.recoverable)this.trace(x);else{var f=new Error(x);throw f.hash=g,f}},"parseError"),parse:d(function(x){var g=this,f=[0],k=[],v=[null],h=[],W=this.table,p="",R=0,G=0,V=0,Bt=2,at=1,Se=h.slice.call(arguments,1),z=Object.create(this.lexer),q={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(q.yy[pt]=this.yy[pt]);z.setInput(x,q.yy),q.yy.lexer=z,q.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var ft=z.yylloc;h.push(ft);var ve=z.options&&z.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ee(P){f.length=f.length-2*P,v.length=v.length-P,h.length=h.length-P}d(Ee,"popStack");function Ct(){var P;return P=k.pop()||z.lex()||at,typeof P!="number"&&(P instanceof Array&&(k=P,P=k.pop()),P=g.symbols_[P]||P),P}d(Ct,"lex");for(var F,bt,J,H,qr,xt,Q={},st,Z,It,it;;){if(J=f[f.length-1],this.defaultActions[J]?H=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=Ct()),H=W[J]&&W[J][F]),typeof H>"u"||!H.length||!H[0]){var yt="";it=[];for(st in W[J])this.terminals_[st]&&st>Bt&&it.push("'"+this.terminals_[st]+"'");z.showPosition?yt="Parse error on line "+(R+1)+`:
`+z.showPosition()+`
Expecting `+it.join(", ")+", got '"+(this.terminals_[F]||F)+"'":yt="Parse error on line "+(R+1)+": Unexpected "+(F==at?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(yt,{text:z.match,token:this.terminals_[F]||F,line:z.yylineno,loc:ft,expected:it})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+F);switch(H[0]){case 1:f.push(F),v.push(z.yytext),h.push(z.yylloc),f.push(H[1]),F=null,bt?(F=bt,bt=null):(G=z.yyleng,p=z.yytext,R=z.yylineno,ft=z.yylloc,V>0&&V--);break;case 2:if(Z=this.productions_[H[1]][1],Q.$=v[v.length-Z],Q._$={first_line:h[h.length-(Z||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(Z||1)].first_column,last_column:h[h.length-1].last_column},ve&&(Q._$.range=[h[h.length-(Z||1)].range[0],h[h.length-1].range[1]]),xt=this.performAction.apply(Q,[p,G,R,q.yy,H[1],v,h].concat(Se)),typeof xt<"u")return xt;Z&&(f=f.slice(0,-1*Z*2),v=v.slice(0,-1*Z),h=h.slice(0,-1*Z)),f.push(this.productions_[H[1]][0]),v.push(Q.$),h.push(Q._$),It=W[f[f.length-2]][f[f.length-1]],f.push(It);break;case 3:return!0}}return!0},"parse")},C=(function(){var D={EOF:1,parseError:d(function(g,f){if(this.yy.parser)this.yy.parser.parseError(g,f);else throw new Error(g)},"parseError"),setInput:d(function(x,g){return this.yy=g||this.yy||{},this._input=x,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:d(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var g=x.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:d(function(x){var g=x.length,f=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;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),f.length-1&&(this.yylineno-=f.length-1);var v=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:f?(f.length===k.length?this.yylloc.first_column:0)+k[k.length-f.length].length-f[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(x){this.unput(this.match.slice(x))},"less"),pastInput:d(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var x=this.pastInput(),g=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
`+g+"^"},"showPosition"),test_match:d(function(x,g){var f,k,v;if(this.options.backtrack_lexer&&(v={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&&(v.yylloc.range=this.yylloc.range.slice(0))),k=x[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+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,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(x[0].length),this.matched+=x[0],f=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var h in v)this[h]=v[h];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,g,f,k;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),h=0;h<v.length;h++)if(f=this._input.match(this.rules[v[h]]),f&&(!g||f[0].length>g[0].length)){if(g=f,k=h,this.options.backtrack_lexer){if(x=this.test_match(f,v[h]),x!==!1)return x;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(x=this.test_match(g,v[k]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var g=this.next();return g||this.lex()},"lex"),begin:d(function(g){this.conditionStack.push(g)},"begin"),popState:d(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(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:d(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:d(function(g){this.begin(g)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:d(function(g,f,k,v){var h=v;switch(k){case 0:return g.getLogger().debug("Found block-beta"),10;break;case 1:return g.getLogger().debug("Found id-block"),29;break;case 2:return g.getLogger().debug("Found block"),10;break;case 3:g.getLogger().debug(".",f.yytext);break;case 4:g.getLogger().debug("_",f.yytext);break;case 5:return 5;case 6:return f.yytext=-1,28;break;case 7:return f.yytext=f.yytext.replace(/columns\s+/,""),g.getLogger().debug("COLUMNS (LEX)",f.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:g.getLogger().debug("LEX: POPPING STR:",f.yytext),this.popState();break;case 13:return g.getLogger().debug("LEX: STR end:",f.yytext),"STR";break;case 14:return f.yytext=f.yytext.replace(/space\:/,""),g.getLogger().debug("SPACE NUM (LEX)",f.yytext),21;break;case 15:return f.yytext="1",g.getLogger().debug("COLUMNS (LEX)",f.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),g.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),g.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),g.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),g.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),g.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),g.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),g.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),g.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),g.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),g.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return g.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return g.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return g.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return g.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return g.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return g.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return g.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),g.getLogger().debug("LEX ARR START"),37;break;case 74:return g.getLogger().debug("Lex: NODE_ID",f.yytext),31;break;case 75:return g.getLogger().debug("Lex: EOF",f.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:g.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:g.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return g.getLogger().debug("LEX: NODE_DESCR:",f.yytext),"NODE_DESCR";break;case 83:g.getLogger().debug("LEX POPPING"),this.popState();break;case 84:g.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return f.yytext=f.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (right): dir:",f.yytext),"DIR";break;case 86:return f.yytext=f.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (left):",f.yytext),"DIR";break;case 87:return f.yytext=f.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (x):",f.yytext),"DIR";break;case 88:return f.yytext=f.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (y):",f.yytext),"DIR";break;case 89:return f.yytext=f.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (up):",f.yytext),"DIR";break;case 90:return f.yytext=f.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (down):",f.yytext),"DIR";break;case 91:return f.yytext="]>",g.getLogger().debug("Lex (ARROW_DIR end):",f.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return g.getLogger().debug("Lex: LINK","#"+f.yytext+"#"),15;break;case 93:return g.getLogger().debug("Lex: LINK",f.yytext),15;break;case 94:return g.getLogger().debug("Lex: LINK",f.yytext),15;break;case 95:return g.getLogger().debug("Lex: LINK",f.yytext),15;break;case 96:return g.getLogger().debug("Lex: START_LINK",f.yytext),this.pushState("LLABEL"),16;break;case 97:return g.getLogger().debug("Lex: START_LINK",f.yytext),this.pushState("LLABEL"),16;break;case 98:return g.getLogger().debug("Lex: START_LINK",f.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return g.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),g.getLogger().debug("Lex: LINK","#"+f.yytext+"#"),15;break;case 102:return this.popState(),g.getLogger().debug("Lex: LINK",f.yytext),15;break;case 103:return this.popState(),g.getLogger().debug("Lex: LINK",f.yytext),15;break;case 104:return g.getLogger().debug("Lex: COLON",f.yytext),f.yytext=f.yytext.slice(1),27;break}},"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}}};return D})();S.lexer=C;function _(){this.yy={}}return d(_,"Parser"),_.prototype=S,S.Parser=_,new _})();wt.parser=wt;var _e=wt,U=new Map,Et=[],kt=new Map,Zt="color",Gt="fill",De="bgFill",ae=",",Ne=I(),ht=new Map,Te=d(e=>At.sanitizeText(e,Ne),"sanitizeText"),Be=d(function(e,t=""){let a=ht.get(e);a||(a={id:e,styles:[],textStyles:[]},ht.set(e,a)),t?.split(ae).forEach(i=>{let l=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Zt).exec(i)){let r=l.replace(Gt,De).replace(Zt,Gt);a.textStyles.push(r)}a.styles.push(l)})},"addStyleClass"),Ce=d(function(e,t=""){let a=U.get(e);t!=null&&(a.styles=t.split(ae))},"addStyle2Node"),Ie=d(function(e,t){e.split(",").forEach(function(a){let i=U.get(a);if(i===void 0){let l=a.trim();i={id:l,type:"na",children:[]},U.set(l,i)}i.classes||(i.classes=[]),i.classes.push(t)})},"setCssClass"),se=d((e,t)=>{let a=e.flat(),i=[],s=a.find(r=>r?.type==="column-setting")?.columns??-1;for(let r of a){if(typeof s=="number"&&s>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>s&&w.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${s}`),r.label&&(r.label=Te(r.label)),r.type==="classDef"){Be(r.id,r.css);continue}if(r.type==="applyClass"){Ie(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){r?.stylesStr&&Ce(r.id,r?.stylesStr);continue}if(r.type==="column-setting")t.columns=r.columns??-1;else if(r.type==="edge"){let n=(kt.get(r.id)??0)+1;kt.set(r.id,n),r.id=n+"-"+r.id,Et.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);let n=U.get(r.id);if(n===void 0?U.set(r.id,r):(r.type!=="na"&&(n.type=r.type),r.label!==r.id&&(n.label=r.label)),r.children&&se(r.children,r),r.type==="space"){let c=r.width??1;for(let u=0;u<c;u++){let o=Ut(r);o.id=o.id+"-"+u,U.set(o.id,o),i.push(o)}}else n===void 0&&i.push(r)}}t.children=i},"populateBlockDatabase"),_t=[],rt={id:"root",type:"composite",children:[],columns:-1},Oe=d(()=>{w.debug("Clear called"),Ft(),rt={id:"root",type:"composite",children:[],columns:-1},U=new Map([["root",rt]]),_t=[],ht=new Map,Et=[],kt=new Map},"clear");function ie(e){switch(w.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return w.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"}}d(ie,"typeStr2Type");function ne(e){switch(w.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}d(ne,"edgeTypeStr2Type");function le(e){switch(e.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}d(le,"edgeStrToEdgeData");var qt=0,Re=d(()=>(qt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+qt),"generateId"),ze=d(e=>{rt.children=e,se(e,rt),_t=rt.children},"setHierarchy"),Ae=d(e=>{let t=U.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),Me=d(()=>[...U.values()],"getBlocksFlat"),Fe=d(()=>_t||[],"getBlocks"),We=d(()=>Et,"getEdges"),Pe=d(e=>U.get(e),"getBlock"),Ye=d(e=>{U.set(e.id,e)},"setBlock"),He=d(()=>w,"getLogger"),Ke=d(function(){return ht},"getClasses"),Xe={getConfig:d(()=>$().block,"getConfig"),typeStr2Type:ie,edgeTypeStr2Type:ne,edgeStrToEdgeData:le,getLogger:He,getBlocksFlat:Me,getBlocks:Fe,getEdges:We,setHierarchy:ze,getBlock:Pe,setBlock:Ye,getColumns:Ae,getClasses:Ke,clear:Oe,generateId:Re},Ue=Xe,ct=d((e,t)=>{let a=Rt,i=a(e,"r"),l=a(e,"g"),s=a(e,"b");return Ot(i,l,s,t)},"fade"),je=d(e=>`.label {
font-family: ${e.fontFamily};
color: ${e.nodeTextColor||e.textColor};
}
.cluster-label text {
fill: ${e.titleColor};
}
.cluster-label span,p {
color: ${e.titleColor};
}
.label text,span,p {
fill: ${e.nodeTextColor||e.textColor};
color: ${e.nodeTextColor||e.textColor};
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${e.mainBkg};
stroke: ${e.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: ${e.arrowheadColor};
}
.edgePath .path {
stroke: ${e.lineColor};
stroke-width: 2.0px;
}
.flowchart-link {
stroke: ${e.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${e.edgeLabelBackground};
rect {
opacity: 0.5;
background-color: ${e.edgeLabelBackground};
fill: ${e.edgeLabelBackground};
}
text-align: center;
}
/* For html labels only */
.labelBkg {
background-color: ${ct(e.edgeLabelBackground,.5)};
// background-color:
}
.node .cluster {
// fill: ${ct(e.mainBkg,.5)};
fill: ${ct(e.clusterBkg,.5)};
stroke: ${ct(e.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: ${e.titleColor};
}
.cluster span,p {
color: ${e.titleColor};
}
/* .cluster div {
color: ${e.titleColor};
} */
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${e.fontFamily};
font-size: 12px;
background: ${e.tertiaryColor};
border: 1px solid ${e.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.flowchartTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${e.textColor};
}
${Vt()}
`,"getStyles"),Ve=je,Ze=d((e,t,a,i)=>{t.forEach(l=>{sr[l](e,a,i)})},"insertMarkers"),Ge=d((e,t,a)=>{w.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).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"),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).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"),qe=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).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"),e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).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"),Je=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).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"),e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).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"),Qe=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).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"),e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).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"),$e=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).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),e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).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"),tr=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).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"),er=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).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"),rr=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).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"),e.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).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"),ar=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-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"),sr={extension:Ge,composition:qe,aggregation:Je,dependency:Qe,lollipop:$e,point:tr,circle:er,cross:rr,barb:ar},ir=Ze,O=I()?.block?.padding??8;function ce(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};let a=t%e,i=Math.floor(t/e);return{px:a,py:i}}d(ce,"calculateBlockPosition");var nr=d(e=>{let t=0,a=0;for(let i of e.children){let{width:l,height:s,x:r,y:n}=i.size??{width:0,height:0,x:0,y:0};w.debug("getMaxChildSize abc95 child:",i.id,"width:",l,"height:",s,"x:",r,"y:",n,i.type),i.type!=="space"&&(l>t&&(t=l/(e.widthInColumns??1)),s>a&&(a=s))}return{width:t,height:a}},"getMaxChildSize");function dt(e,t,a=0,i=0){w.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",a),e?.size?.width||(e.size={width:a,height:i,x:0,y:0});let l=0,s=0;if(e.children?.length>0){for(let y of e.children)dt(y,t);let r=nr(e);l=r.width,s=r.height,w.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",l,s);for(let y of e.children)y.size&&(w.debug(`abc95 Setting size of children of ${e.id} id=${y.id} ${l} ${s} ${JSON.stringify(y.size)}`),y.size.width=l*(y.widthInColumns??1)+O*((y.widthInColumns??1)-1),y.size.height=s,y.size.x=0,y.size.y=0,w.debug(`abc95 updating size of ${e.id} children child:${y.id} maxWidth:${l} maxHeight:${s}`));for(let y of e.children)dt(y,t,l,s);let n=e.columns??-1,c=0;for(let y of e.children)c+=y.widthInColumns??1;let u=e.children.length;n>0&&n<c&&(u=n);let o=Math.ceil(c/u),b=u*(l+O)+O,m=o*(s+O)+O;if(b<a){w.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${i} width ${b}`),b=a,m=i;let y=(a-u*O-O)/u,L=(i-o*O-O)/o;w.debug("Size indata abc88",e.id,"childWidth",y,"maxWidth",l),w.debug("Size indata abc88",e.id,"childHeight",L,"maxHeight",s),w.debug("Size indata abc88 xSize",u,"padding",O);for(let E of e.children)E.size&&(E.size.width=y,E.size.height=L,E.size.x=0,E.size.y=0)}if(w.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${o} columns ${n}${e.children.length} width=${Math.max(b,e.size?.width||0)}`),b<(e?.size?.width||0)){b=e?.size?.width||0;let y=n>0?Math.min(e.children.length,n):e.children.length;if(y>0){let L=(b-y*O-O)/y;w.debug("abc95 (growing to fit) width",e.id,b,e.size?.width,L);for(let E of e.children)E.size&&(E.size.width=L)}}e.size={width:b,height:m,x:0,y:0}}w.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}d(dt,"setBlockSizes");function Dt(e,t){w.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let a=e.columns??-1;if(w.debug("layoutBlocks columns abc95",e.id,"=>",a,e),e.children&&e.children.length>0){let i=e?.children[0]?.size?.width??0,l=e.children.length*i+(e.children.length-1)*O;w.debug("widthOfChildren 88",l,"posX");let s=0;w.debug("abc91 block?.size?.x",e.id,e?.size?.x);let r=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-O,n=0;for(let c of e.children){let u=e;if(!c.size)continue;let{width:o,height:b}=c.size,{px:m,py:y}=ce(a,s);if(y!=n&&(n=y,r=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-O,w.debug("New row in layout for block",e.id," and child ",c.id,n)),w.debug(`abc89 layout blocks (child) id: ${c.id} Pos: ${s} (px, py) ${m},${y} (${u?.size?.x},${u?.size?.y}) parent: ${u.id} width: ${o}${O}`),u.size){let E=o/2;c.size.x=r+O+E,w.debug(`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${r} new startingPosX${c.size.x} ${E} padding=${O} width=${o} halfWidth=${E} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${o*(c?.widthInColumns??1)/2}`),r=c.size.x+E,c.size.y=u.size.y-u.size.height/2+y*(b+O)+b/2+O,w.debug(`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${r}${O}${E}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${o*(c?.widthInColumns??1)/2}`)}c.children&&Dt(c,t);let L=c?.widthInColumns??1;a>0&&(L=Math.min(L,a-s%a)),s+=L,w.debug("abc88 columnsPos",c,s)}}w.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}d(Dt,"layoutBlocks");function Nt(e,{minX:t,minY:a,maxX:i,maxY:l}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:s,y:r,width:n,height:c}=e.size;s-n/2<t&&(t=s-n/2),r-c/2<a&&(a=r-c/2),s+n/2>i&&(i=s+n/2),r+c/2>l&&(l=r+c/2)}if(e.children)for(let s of e.children)({minX:t,minY:a,maxX:i,maxY:l}=Nt(s,{minX:t,minY:a,maxX:i,maxY:l}));return{minX:t,minY:a,maxX:i,maxY:l}}d(Nt,"findBounds");function oe(e){let t=e.getBlock("root");if(!t)return;dt(t,e,0,0),Dt(t,e),w.debug("getBlocks",JSON.stringify(t,null,2));let{minX:a,minY:i,maxX:l,maxY:s}=Nt(t),r=s-i,n=l-a;return{x:a,y:i,width:n,height:r}}d(oe,"layout");function Lt(e,t){t&&e.attr("style",t)}d(Lt,"applyStyle");function he(e,t){let a=N(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=a.append("xhtml:div"),l=e.label,s=e.isNode?"nodeLabel":"edgeLabel",r=i.append("span");return r.html(nt(l,t)),Lt(r,e.labelStyle),r.attr("class",s),Lt(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),a.node()}d(he,"addHtmlLabel");var lr=d(async(e,t,a,i)=>{let l=e||"";typeof l=="object"&&(l=l[0]);let s=I();if(X(s.flowchart.htmlLabels)){l=l.replace(/\\n|\n/g,"<br />"),w.debug("vertexText"+l);let r=await Xt(lt(l)),n={isNode:i,label:r,labelStyle:t.replace("fill:","color:")};return he(n,s)}else{let r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("style",t.replace("color:","fill:"));let n=[];typeof l=="string"?n=l.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(l)?n=l:n=[];for(let c of n){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),a?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=c.trim(),r.appendChild(u)}return r}},"createLabel"),K=lr,cr=d((e,t,a,i,l)=>{t.arrowTypeStart&&Jt(e,"start",t.arrowTypeStart,a,i,l),t.arrowTypeEnd&&Jt(e,"end",t.arrowTypeEnd,a,i,l)},"addEdgeMarkers"),or={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Jt=d((e,t,a,i,l,s)=>{let r=or[a];if(!r){w.warn(`Unknown arrow type: ${a}`);return}let n=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${l}_${s}-${r}${n})`)},"addEdgeMarker"),St={},M={},hr=d(async(e,t)=>{let a=I(),i=X(a.flowchart.htmlLabels),l=t.labelType==="markdown"?mt(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:!0},a):await K(t.label,t.labelStyle),s=e.insert("g").attr("class","edgeLabel"),r=s.insert("g").attr("class","label");r.node().appendChild(l);let n=l.getBBox();if(i){let u=l.children[0],o=N(l);n=u.getBoundingClientRect(),o.attr("width",n.width),o.attr("height",n.height)}r.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),St[t.id]=s,t.width=n.width,t.height=n.height;let c;if(t.startLabelLeft){let u=await K(t.startLabelLeft,t.labelStyle),o=e.insert("g").attr("class","edgeTerminals"),b=o.insert("g").attr("class","inner");c=b.node().appendChild(u);let m=u.getBBox();b.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),M[t.id]||(M[t.id]={}),M[t.id].startLeft=o,et(c,t.startLabelLeft)}if(t.startLabelRight){let u=await K(t.startLabelRight,t.labelStyle),o=e.insert("g").attr("class","edgeTerminals"),b=o.insert("g").attr("class","inner");c=o.node().appendChild(u),b.node().appendChild(u);let m=u.getBBox();b.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),M[t.id]||(M[t.id]={}),M[t.id].startRight=o,et(c,t.startLabelRight)}if(t.endLabelLeft){let u=await K(t.endLabelLeft,t.labelStyle),o=e.insert("g").attr("class","edgeTerminals"),b=o.insert("g").attr("class","inner");c=b.node().appendChild(u);let m=u.getBBox();b.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),o.node().appendChild(u),M[t.id]||(M[t.id]={}),M[t.id].endLeft=o,et(c,t.endLabelLeft)}if(t.endLabelRight){let u=await K(t.endLabelRight,t.labelStyle),o=e.insert("g").attr("class","edgeTerminals"),b=o.insert("g").attr("class","inner");c=b.node().appendChild(u);let m=u.getBBox();b.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),o.node().appendChild(u),M[t.id]||(M[t.id]={}),M[t.id].endRight=o,et(c,t.endLabelRight)}return l},"insertEdgeLabel");function et(e,t){I().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(et,"setTerminalWidth");var dr=d((e,t)=>{w.debug("Moving label abc88 ",e.id,e.label,St[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath,i=I(),{subGraphTitleTotalMargin:l}=Ht(i);if(e.label){let s=St[e.id],r=e.x,n=e.y;if(a){let c=tt.calcLabelPosition(a);w.debug("Moving label "+e.label+" from (",r,",",n,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(r=c.x,n=c.y)}s.attr("transform",`translate(${r}, ${n+l/2})`)}if(e.startLabelLeft){let s=M[e.id].startLeft,r=e.x,n=e.y;if(a){let c=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);r=c.x,n=c.y}s.attr("transform",`translate(${r}, ${n})`)}if(e.startLabelRight){let s=M[e.id].startRight,r=e.x,n=e.y;if(a){let c=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);r=c.x,n=c.y}s.attr("transform",`translate(${r}, ${n})`)}if(e.endLabelLeft){let s=M[e.id].endLeft,r=e.x,n=e.y;if(a){let c=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);r=c.x,n=c.y}s.attr("transform",`translate(${r}, ${n})`)}if(e.endLabelRight){let s=M[e.id].endRight,r=e.x,n=e.y;if(a){let c=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);r=c.x,n=c.y}s.attr("transform",`translate(${r}, ${n})`)}},"positionEdgeLabel"),gr=d((e,t)=>{let a=e.x,i=e.y,l=Math.abs(t.x-a),s=Math.abs(t.y-i),r=e.width/2,n=e.height/2;return l>=r||s>=n},"outsideNode"),ur=d((e,t,a)=>{w.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(t)}
insidePoint : ${JSON.stringify(a)}
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,l=e.y,s=Math.abs(i-a.x),r=e.width/2,n=a.x<t.x?r-s:r+s,c=e.height/2,u=Math.abs(t.y-a.y),o=Math.abs(t.x-a.x);if(Math.abs(l-t.y)*r>Math.abs(i-t.x)*c){let b=a.y<t.y?t.y-c-l:l-c-t.y;n=o*b/u;let m={x:a.x<t.x?a.x+n:a.x-o+n,y:a.y<t.y?a.y+u-b:a.y-u+b};return n===0&&(m.x=t.x,m.y=t.y),o===0&&(m.x=t.x),u===0&&(m.y=t.y),w.debug(`abc89 topp/bott calc, Q ${u}, q ${b}, R ${o}, r ${n}`,m),m}else{a.x<t.x?n=t.x-r-i:n=i-r-t.x;let b=u*n/o,m=a.x<t.x?a.x+o-n:a.x-o+n,y=a.y<t.y?a.y+b:a.y-b;return w.debug(`sides calc abc89, Q ${u}, q ${b}, R ${o}, r ${n}`,{_x:m,_y:y}),n===0&&(m=t.x,y=t.y),o===0&&(m=t.x),u===0&&(y=t.y),{x:m,y}}},"intersection"),Qt=d((e,t)=>{w.debug("abc88 cutPathAtIntersect",e,t);let a=[],i=e[0],l=!1;return e.forEach(s=>{if(!gr(t,s)&&!l){let r=ur(t,i,s),n=!1;a.forEach(c=>{n=n||c.x===r.x&&c.y===r.y}),a.some(c=>c.x===r.x&&c.y===r.y)||a.push(r),l=!0}else i=s,l||a.push(s)}),a},"cutPathAtIntersect"),pr=d(function(e,t,a,i,l,s,r){let n=a.points;w.debug("abc88 InsertEdge: edge=",a,"e=",t);let c=!1,u=s.node(t.v);var o=s.node(t.w);o?.intersect&&u?.intersect&&(n=n.slice(1,a.points.length-1),n.unshift(u.intersect(n[0])),n.push(o.intersect(n[n.length-1]))),a.toCluster&&(w.debug("to cluster abc88",i[a.toCluster]),n=Qt(a.points,i[a.toCluster].node),c=!0),a.fromCluster&&(w.debug("from cluster abc88",i[a.fromCluster]),n=Qt(n.reverse(),i[a.fromCluster].node).reverse(),c=!0);let b=n.filter(x=>!Number.isNaN(x.y)),m=Pt;a.curve&&(l==="graph"||l==="flowchart")&&(m=a.curve);let{x:y,y:L}=Yt(a),E=Wt().x(y).y(L).curve(m),S;switch(a.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-thick";break;default:S=""}switch(a.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break}let C=e.append("path").attr("d",E(b)).attr("id",a.id).attr("class"," "+S+(a.classes?" "+a.classes:"")).attr("style",a.style),_="";(I().flowchart.arrowMarkerAbsolute||I().state.arrowMarkerAbsolute)&&(_=zt(!0)),cr(C,a,_,r,l);let D={};return c&&(D.updatedPath=n),D.originalPath=a.points,D},"insertEdge"),fr=d(e=>{let t=new Set;for(let a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),br=d((e,t,a)=>{let i=fr(e),l=2,s=t.height+2*a.padding,r=s/l,n=t.width+2*r+a.padding,c=a.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:r,y:0},{x:n/2,y:2*c},{x:n-r,y:0},{x:n,y:0},{x:n,y:-s/3},{x:n+2*c,y:-s/2},{x:n,y:-2*s/3},{x:n,y:-s},{x:n-r,y:-s},{x:n/2,y:-s-2*c},{x:r,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*c,y:-s/2},{x:0,y:-s/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:r,y:0},{x:n-r,y:0},{x:n,y:-s/2},{x:n-r,y:-s},{x:r,y:-s},{x:0,y:-s/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:r,y:-s},{x:n-r,y:-s},{x:n,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:-r},{x:n,y:-s+r},{x:0,y:-s}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:n,y:0},{x:0,y:-r},{x:0,y:-s+r},{x:n,y:-s}]:i.has("right")&&i.has("left")?[{x:r,y:0},{x:r,y:-c},{x:n-r,y:-c},{x:n-r,y:0},{x:n,y:-s/2},{x:n-r,y:-s},{x:n-r,y:-s+c},{x:r,y:-s+c},{x:r,y:-s},{x:0,y:-s/2}]:i.has("up")&&i.has("down")?[{x:n/2,y:0},{x:0,y:-c},{x:r,y:-c},{x:r,y:-s+c},{x:0,y:-s+c},{x:n/2,y:-s},{x:n,y:-s+c},{x:n-r,y:-s+c},{x:n-r,y:-c},{x:n,y:-c}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:n,y:-r},{x:0,y:-s}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-s}]:i.has("left")&&i.has("up")?[{x:n,y:0},{x:0,y:-r},{x:n,y:-s}]:i.has("left")&&i.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-s}]:i.has("right")?[{x:r,y:-c},{x:r,y:-c},{x:n-r,y:-c},{x:n-r,y:0},{x:n,y:-s/2},{x:n-r,y:-s},{x:n-r,y:-s+c},{x:r,y:-s+c},{x:r,y:-s+c}]:i.has("left")?[{x:r,y:0},{x:r,y:-c},{x:n-r,y:-c},{x:n-r,y:-s+c},{x:r,y:-s+c},{x:r,y:-s},{x:0,y:-s/2}]:i.has("up")?[{x:r,y:-c},{x:r,y:-s+c},{x:0,y:-s+c},{x:n/2,y:-s},{x:n,y:-s+c},{x:n-r,y:-s+c},{x:n-r,y:-c}]:i.has("down")?[{x:n/2,y:0},{x:0,y:-c},{x:r,y:-c},{x:r,y:-s+c},{x:n-r,y:-s+c},{x:n-r,y:-c},{x:n,y:-c}]:[{x:0,y:0}]},"getArrowPoints");function de(e,t){return e.intersect(t)}d(de,"intersectNode");var xr=de;function ge(e,t,a,i){var l=e.x,s=e.y,r=l-i.x,n=s-i.y,c=Math.sqrt(t*t*n*n+a*a*r*r),u=Math.abs(t*a*r/c);i.x<l&&(u=-u);var o=Math.abs(t*a*n/c);return i.y<s&&(o=-o),{x:l+u,y:s+o}}d(ge,"intersectEllipse");var ue=ge;function pe(e,t,a){return ue(e,t,t,a)}d(pe,"intersectCircle");var yr=pe;function fe(e,t,a,i){var l,s,r,n,c,u,o,b,m,y,L,E,S,C,_;if(l=t.y-e.y,r=e.x-t.x,c=t.x*e.y-e.x*t.y,m=l*a.x+r*a.y+c,y=l*i.x+r*i.y+c,!(m!==0&&y!==0&&vt(m,y))&&(s=i.y-a.y,n=a.x-i.x,u=i.x*a.y-a.x*i.y,o=s*e.x+n*e.y+u,b=s*t.x+n*t.y+u,!(o!==0&&b!==0&&vt(o,b))&&(L=l*n-s*r,L!==0)))return E=Math.abs(L/2),S=r*u-n*c,C=S<0?(S-E)/L:(S+E)/L,S=s*c-l*u,_=S<0?(S-E)/L:(S+E)/L,{x:C,y:_}}d(fe,"intersectLine");function vt(e,t){return e*t>0}d(vt,"sameSign");var mr=fe,wr=be;function be(e,t,a){var i=e.x,l=e.y,s=[],r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(L){r=Math.min(r,L.x),n=Math.min(n,L.y)}):(r=Math.min(r,t.x),n=Math.min(n,t.y));for(var c=i-e.width/2-r,u=l-e.height/2-n,o=0;o<t.length;o++){var b=t[o],m=t[o<t.length-1?o+1:0],y=mr(e,a,{x:c+b.x,y:u+b.y},{x:c+m.x,y:u+m.y});y&&s.push(y)}return s.length?(s.length>1&&s.sort(function(L,E){var S=L.x-a.x,C=L.y-a.y,_=Math.sqrt(S*S+C*C),D=E.x-a.x,x=E.y-a.y,g=Math.sqrt(D*D+x*x);return _<g?-1:_===g?0:1}),s[0]):e}d(be,"intersectPolygon");var kr=d((e,t)=>{var a=e.x,i=e.y,l=t.x-a,s=t.y-i,r=e.width/2,n=e.height/2,c,u;return Math.abs(s)*r>Math.abs(l)*n?(s<0&&(n=-n),c=s===0?0:n*l/s,u=n):(l<0&&(r=-r),c=r,u=l===0?0:r*s/l),{x:a+c,y:i+u}},"intersectRect"),Lr=kr,T={node:xr,circle:yr,ellipse:ue,polygon:wr,rect:Lr},A=d(async(e,t,a,i)=>{let l=I(),s,r=t.useHtmlLabels||X(l.flowchart.htmlLabels);a?s=a:s="node default";let n=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=n.insert("g").attr("class","label").attr("style",t.labelStyle),u;t.labelText===void 0?u="":u=typeof t.labelText=="string"?t.labelText:t.labelText[0];let o=c.node(),b;t.labelType==="markdown"?b=mt(c,nt(lt(u),l),{useHtmlLabels:r,width:t.width||l.flowchart.wrappingWidth,classes:"markdown-node-label"},l):b=o.appendChild(await K(nt(lt(u),l),t.labelStyle,!1,i));let m=b.getBBox(),y=t.padding/2;if(X(l.flowchart.htmlLabels)){let L=b.children[0],E=N(b),S=L.getElementsByTagName("img");if(S){let C=u.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...S].map(_=>new Promise(D=>{function x(){if(_.style.display="flex",_.style.flexDirection="column",C){let g=l.fontSize?l.fontSize:window.getComputedStyle(document.body).fontSize,k=parseInt(g,10)*5+"px";_.style.minWidth=k,_.style.maxWidth=k}else _.style.width="100%";D(_)}d(x,"setupImage"),setTimeout(()=>{_.complete&&x()}),_.addEventListener("error",x),_.addEventListener("load",x)})))}m=L.getBoundingClientRect(),E.attr("width",m.width),E.attr("height",m.height)}return r?c.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"):c.attr("transform","translate(0, "+-m.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:n,bbox:m,halfPadding:y,label:c}},"labelHelper"),B=d((e,t)=>{let a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function j(e,t,a,i){return e.insert("polygon",":first-child").attr("points",i.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}d(j,"insertPolygonShape");var Sr=d(async(e,t)=>{t.useHtmlLabels||I().flowchart.htmlLabels||(t.centerLabel=!0);let{shapeSvg:i,bbox:l,halfPadding:s}=await A(e,t,"node "+t.classes,!0);w.info("Classes = ",t.classes);let r=i.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-l.width/2-s).attr("y",-l.height/2-s).attr("width",l.width+t.padding).attr("height",l.height+t.padding),B(t,r),t.intersect=function(n){return T.rect(t,n)},i},"note"),vr=Sr,$t=d(e=>e?" "+e:"","formatClass"),Y=d((e,t)=>`${t||"node default"}${$t(e.classes)} ${$t(e.class)}`,"getClassesFromNode"),te=d(async(e,t)=>{let{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=l+s,n=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];w.info("Question main (Circle)");let c=j(a,r,r,n);return c.attr("style",t.style),B(t,c),t.intersect=function(u){return w.warn("Intersect called"),T.polygon(t,n,u)},a},"question"),Er=d((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=28,l=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return a.insert("polygon",":first-child").attr("points",l.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return T.circle(t,14,r)},a},"choice"),_r=d(async(e,t)=>{let{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=4,s=i.height+t.padding,r=s/l,n=i.width+2*r+t.padding,c=[{x:r,y:0},{x:n-r,y:0},{x:n,y:-s/2},{x:n-r,y:-s},{x:r,y:-s},{x:0,y:-s/2}],u=j(a,n,s,c);return u.attr("style",t.style),B(t,u),t.intersect=function(o){return T.polygon(t,c,o)},a},"hexagon"),Dr=d(async(e,t)=>{let{shapeSvg:a,bbox:i}=await A(e,t,void 0,!0),l=2,s=i.height+2*t.padding,r=s/l,n=i.width+2*r+t.padding,c=br(t.directions,i,t),u=j(a,n,s,c);return u.attr("style",t.style),B(t,u),t.intersect=function(o){return T.polygon(t,c,o)},a},"block_arrow"),Nr=d(async(e,t)=>{let{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:-s/2,y:0},{x:l,y:0},{x:l,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return j(a,l,s,r).attr("style",t.style),t.width=l+s,t.height=s,t.intersect=function(c){return T.polygon(t,r,c)},a},"rect_left_inv_arrow"),Tr=d(async(e,t)=>{let{shapeSvg:a,bbox:i}=await A(e,t,Y(t),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:-2*s/6,y:0},{x:l-s/6,y:0},{x:l+2*s/6,y:-s},{x:s/6,y:-s}],n=j(a,l,s,r);return n.attr("style",t.style),B(t,n),t.intersect=function(c){return T.polygon(t,r,c)},a},"lean_right"),Br=d(async(e,t)=>{let{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:2*s/6,y:0},{x:l+s/6,y:0},{x:l-2*s/6,y:-s},{x:-s/6,y:-s}],n=j(a,l,s,r);return n.attr("style",t.style),B(t,n),t.intersect=function(c){return T.polygon(t,r,c)},a},"lean_left"),Cr=d(async(e,t)=>{let{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:-2*s/6,y:0},{x:l+2*s/6,y:0},{x:l-s/6,y:-s},{x:s/6,y:-s}],n=j(a,l,s,r);return n.attr("style",t.style),B(t,n),t.intersect=function(c){return T.polygon(t,r,c)},a},"trapezoid"),Ir=d(async(e,t)=>{let{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:s/6,y:0},{x:l-s/6,y:0},{x:l+2*s/6,y:-s},{x:-2*s/6,y:-s}],n=j(a,l,s,r);return n.attr("style",t.style),B(t,n),t.intersect=function(c){return T.polygon(t,r,c)},a},"inv_trapezoid"),Or=d(async(e,t)=>{let{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:0,y:0},{x:l+s/2,y:0},{x:l,y:-s/2},{x:l+s/2,y:-s},{x:0,y:-s}],n=j(a,l,s,r);return n.attr("style",t.style),B(t,n),t.intersect=function(c){return T.polygon(t,r,c)},a},"rect_right_inv_arrow"),Rr=d(async(e,t)=>{let{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=l/2,r=s/(2.5+l/50),n=i.height+r+t.padding,c="M 0,"+r+" a "+s+","+r+" 0,0,0 "+l+" 0 a "+s+","+r+" 0,0,0 "+-l+" 0 l 0,"+n+" a "+s+","+r+" 0,0,0 "+l+" 0 l 0,"+-n,u=a.attr("label-offset-y",r).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-l/2+","+-(n/2+r)+")");return B(t,u),t.intersect=function(o){let b=T.rect(t,o),m=b.x-t.x;if(s!=0&&(Math.abs(m)<t.width/2||Math.abs(m)==t.width/2&&Math.abs(b.y-t.y)>t.height/2-r)){let y=r*r*(1-m*m/(s*s));y!=0&&(y=Math.sqrt(y)),y=r-y,o.y-t.y>0&&(y=-y),b.y+=y}return b},a},"cylinder"),zr=d(async(e,t)=>{let{shapeSvg:a,bbox:i,halfPadding:l}=await A(e,t,"node "+t.classes+" "+t.class,!0),s=a.insert("rect",":first-child"),r=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-r/2:-i.width/2-l,u=t.positioned?-n/2:-i.height/2-l;if(s.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",u).attr("width",r).attr("height",n),t.props){let o=new Set(Object.keys(t.props));t.props.borders&&(gt(s,t.props.borders,r,n),o.delete("borders")),o.forEach(b=>{w.warn(`Unknown node property ${b}`)})}return B(t,s),t.intersect=function(o){return T.rect(t,o)},a},"rect"),Ar=d(async(e,t)=>{let{shapeSvg:a,bbox:i,halfPadding:l}=await A(e,t,"node "+t.classes,!0),s=a.insert("rect",":first-child"),r=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-r/2:-i.width/2-l,u=t.positioned?-n/2:-i.height/2-l;if(s.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",u).attr("width",r).attr("height",n),t.props){let o=new Set(Object.keys(t.props));t.props.borders&&(gt(s,t.props.borders,r,n),o.delete("borders")),o.forEach(b=>{w.warn(`Unknown node property ${b}`)})}return B(t,s),t.intersect=function(o){return T.rect(t,o)},a},"composite"),Mr=d(async(e,t)=>{let{shapeSvg:a}=await A(e,t,"label",!0);w.trace("Classes = ",t.class);let i=a.insert("rect",":first-child"),l=0,s=0;if(i.attr("width",l).attr("height",s),a.attr("class","label edgeLabel"),t.props){let r=new Set(Object.keys(t.props));t.props.borders&&(gt(i,t.props.borders,l,s),r.delete("borders")),r.forEach(n=>{w.warn(`Unknown node property ${n}`)})}return B(t,i),t.intersect=function(r){return T.rect(t,r)},a},"labelRect");function gt(e,t,a,i){let l=[],s=d(n=>{l.push(n,0)},"addBorder"),r=d(n=>{l.push(0,n)},"skipBorder");t.includes("t")?(w.debug("add top border"),s(a)):r(a),t.includes("r")?(w.debug("add right border"),s(i)):r(i),t.includes("b")?(w.debug("add bottom border"),s(a)):r(a),t.includes("l")?(w.debug("add left border"),s(i)):r(i),e.attr("stroke-dasharray",l.join(" "))}d(gt,"applyNodePropertyBorders");var Fr=d(async(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";let i=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=i.insert("rect",":first-child"),s=i.insert("line"),r=i.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText,c="";typeof n=="object"?c=n[0]:c=n,w.info("Label text abc79",c,n,typeof n=="object");let u=r.node().appendChild(await K(c,t.labelStyle,!0,!0)),o={width:0,height:0};if(X(I().flowchart.htmlLabels)){let E=u.children[0],S=N(u);o=E.getBoundingClientRect(),S.attr("width",o.width),S.attr("height",o.height)}w.info("Text 2",n);let b=n.slice(1,n.length),m=u.getBBox(),y=r.node().appendChild(await K(b.join?b.join("<br/>"):b,t.labelStyle,!0,!0));if(X(I().flowchart.htmlLabels)){let E=y.children[0],S=N(y);o=E.getBoundingClientRect(),S.attr("width",o.width),S.attr("height",o.height)}let L=t.padding/2;return N(y).attr("transform","translate( "+(o.width>m.width?0:(m.width-o.width)/2)+", "+(m.height+L+5)+")"),N(u).attr("transform","translate( "+(o.width<m.width?0:-(m.width-o.width)/2)+", 0)"),o=r.node().getBBox(),r.attr("transform","translate("+-o.width/2+", "+(-o.height/2-L+3)+")"),l.attr("class","outer title-state").attr("x",-o.width/2-L).attr("y",-o.height/2-L).attr("width",o.width+t.padding).attr("height",o.height+t.padding),s.attr("class","divider").attr("x1",-o.width/2-L).attr("x2",o.width/2+L).attr("y1",-o.height/2-L+m.height+L).attr("y2",-o.height/2-L+m.height+L),B(t,l),t.intersect=function(E){return T.rect(t,E)},i},"rectWithTitle"),Wr=d(async(e,t)=>{let{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.height+t.padding,s=i.width+l/4+t.padding,r=a.insert("rect",":first-child").attr("style",t.style).attr("rx",l/2).attr("ry",l/2).attr("x",-s/2).attr("y",-l/2).attr("width",s).attr("height",l);return B(t,r),t.intersect=function(n){return T.rect(t,n)},a},"stadium"),Pr=d(async(e,t)=>{let{shapeSvg:a,bbox:i,halfPadding:l}=await A(e,t,Y(t,void 0),!0),s=a.insert("circle",":first-child");return s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l).attr("width",i.width+t.padding).attr("height",i.height+t.padding),w.info("Circle main"),B(t,s),t.intersect=function(r){return w.info("Circle intersect",t,i.width/2+l,r),T.circle(t,i.width/2+l,r)},a},"circle"),Yr=d(async(e,t)=>{let{shapeSvg:a,bbox:i,halfPadding:l}=await A(e,t,Y(t,void 0),!0),s=5,r=a.insert("g",":first-child"),n=r.insert("circle"),c=r.insert("circle");return r.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l+s).attr("width",i.width+t.padding+s*2).attr("height",i.height+t.padding+s*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l).attr("width",i.width+t.padding).attr("height",i.height+t.padding),w.info("DoubleCircle main"),B(t,n),t.intersect=function(u){return w.info("DoubleCircle intersect",t,i.width/2+l+s,u),T.circle(t,i.width/2+l+s,u)},a},"doublecircle"),Hr=d(async(e,t)=>{let{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:0,y:0},{x:l,y:0},{x:l,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],n=j(a,l,s,r);return n.attr("style",t.style),B(t,n),t.intersect=function(c){return T.polygon(t,r,c)},a},"subroutine"),Kr=d((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),B(t,i),t.intersect=function(l){return T.circle(t,7,l)},a},"start"),ee=d((e,t,a)=>{let i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),l=70,s=10;a==="LR"&&(l=10,s=70);let r=i.append("rect").attr("x",-1*l/2).attr("y",-1*s/2).attr("width",l).attr("height",s).attr("class","fork-join");return B(t,r),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return T.rect(t,n)},i},"forkJoin"),Xr=d((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child"),l=a.insert("circle",":first-child");return l.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),B(t,l),t.intersect=function(s){return T.circle(t,7,s)},a},"end"),Ur=d(async(e,t)=>{let a=t.padding/2,i=4,l=8,s;t.classes?s="node "+t.classes:s="node default";let r=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=r.insert("rect",":first-child"),c=r.insert("line"),u=r.insert("line"),o=0,b=i,m=r.insert("g").attr("class","label"),y=0,L=t.classData.annotations?.[0],E=t.classData.annotations[0]?"\xAB"+t.classData.annotations[0]+"\xBB":"",S=m.node().appendChild(await K(E,t.labelStyle,!0,!0)),C=S.getBBox();if(X(I().flowchart.htmlLabels)){let v=S.children[0],h=N(S);C=v.getBoundingClientRect(),h.attr("width",C.width),h.attr("height",C.height)}t.classData.annotations[0]&&(b+=C.height+i,o+=C.width);let _=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(I().flowchart.htmlLabels?_+="&lt;"+t.classData.type+"&gt;":_+="<"+t.classData.type+">");let D=m.node().appendChild(await K(_,t.labelStyle,!0,!0));N(D).attr("class","classTitle");let x=D.getBBox();if(X(I().flowchart.htmlLabels)){let v=D.children[0],h=N(D);x=v.getBoundingClientRect(),h.attr("width",x.width),h.attr("height",x.height)}b+=x.height+i,x.width>o&&(o=x.width);let g=[];t.classData.members.forEach(async v=>{let h=v.getDisplayDetails(),W=h.displayText;I().flowchart.htmlLabels&&(W=W.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let p=m.node().appendChild(await K(W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0)),R=p.getBBox();if(X(I().flowchart.htmlLabels)){let G=p.children[0],V=N(p);R=G.getBoundingClientRect(),V.attr("width",R.width),V.attr("height",R.height)}R.width>o&&(o=R.width),b+=R.height+i,g.push(p)}),b+=l;let f=[];if(t.classData.methods.forEach(async v=>{let h=v.getDisplayDetails(),W=h.displayText;I().flowchart.htmlLabels&&(W=W.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let p=m.node().appendChild(await K(W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0)),R=p.getBBox();if(X(I().flowchart.htmlLabels)){let G=p.children[0],V=N(p);R=G.getBoundingClientRect(),V.attr("width",R.width),V.attr("height",R.height)}R.width>o&&(o=R.width),b+=R.height+i,f.push(p)}),b+=l,L){let v=(o-C.width)/2;N(S).attr("transform","translate( "+(-1*o/2+v)+", "+-1*b/2+")"),y=C.height+i}let k=(o-x.width)/2;return N(D).attr("transform","translate( "+(-1*o/2+k)+", "+(-1*b/2+y)+")"),y+=x.height+i,c.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-b/2-a+l+y).attr("y2",-b/2-a+l+y),y+=l,g.forEach(v=>{N(v).attr("transform","translate( "+-o/2+", "+(-1*b/2+y+l/2)+")");let h=v?.getBBox();y+=(h?.height??0)+i}),y+=l,u.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-b/2-a+l+y).attr("y2",-b/2-a+l+y),y+=l,f.forEach(v=>{N(v).attr("transform","translate( "+-o/2+", "+(-1*b/2+y)+")");let h=v?.getBBox();y+=(h?.height??0)+i}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-o/2-a).attr("y",-(b/2)-a).attr("width",o+t.padding).attr("height",b+t.padding),B(t,n),t.intersect=function(v){return T.rect(t,v)},r},"class_box"),re={rhombus:te,composite:Ar,question:te,rect:zr,labelRect:Mr,rectWithTitle:Fr,choice:Er,circle:Pr,doublecircle:Yr,stadium:Wr,hexagon:_r,block_arrow:Dr,rect_left_inv_arrow:Nr,lean_right:Tr,lean_left:Br,trapezoid:Cr,inv_trapezoid:Ir,rect_right_inv_arrow:Or,cylinder:Rr,start:Kr,end:Xr,note:vr,subroutine:Hr,fork:ee,join:ee,class_box:Ur},ot={},xe=d(async(e,t,a)=>{let i,l;if(t.link){let s;I().securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s),l=await re[t.shape](i,t,a)}else l=await re[t.shape](e,t,a),i=l;return t.tooltip&&l.attr("title",t.tooltip),t.class&&l.attr("class","node default "+t.class),ot[t.id]=i,t.haveCallback&&ot[t.id].attr("class",ot[t.id].attr("class")+" clickable"),i},"insertNode"),jr=d(e=>{let t=ot[e.id];w.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let a=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode");function Tt(e,t,a=!1){let i=e,l="default";(i?.classes?.length||0)>0&&(l=(i?.classes??[]).join(" ")),l=l+" flowchart-label";let s=0,r="",n;switch(i.type){case"round":s=5,r="rect";break;case"composite":s=0,r="composite",n=0;break;case"square":r="rect";break;case"diamond":r="question";break;case"hexagon":r="hexagon";break;case"block_arrow":r="block_arrow";break;case"odd":r="rect_left_inv_arrow";break;case"lean_right":r="lean_right";break;case"lean_left":r="lean_left";break;case"trapezoid":r="trapezoid";break;case"inv_trapezoid":r="inv_trapezoid";break;case"rect_left_inv_arrow":r="rect_left_inv_arrow";break;case"circle":r="circle";break;case"ellipse":r="ellipse";break;case"stadium":r="stadium";break;case"subroutine":r="subroutine";break;case"cylinder":r="cylinder";break;case"group":r="rect";break;case"doublecircle":r="doublecircle";break;default:r="rect"}let c=Kt(i?.styles??[]),u=i.label,o=i.size??{width:0,height:0,x:0,y:0};return{labelStyle:c.labelStyle,shape:r,labelText:u,rx:s,ry:s,class:l,style:c.style,id:i.id,directions:i.directions,width:o.width,height:o.height,x:o.x,y:o.y,positioned:a,intersect:void 0,type:i.type,padding:n??$()?.block?.padding??0}}d(Tt,"getNodeFromBlock");async function ye(e,t,a){let i=Tt(t,a,!1);if(i.type==="group")return;let l=$(),s=await xe(e,i,{config:l}),r=s.node().getBBox(),n=a.getBlock(i.id);n.size={width:r.width,height:r.height,x:0,y:0,node:s},a.setBlock(n),s.remove()}d(ye,"calculateBlockSize");async function me(e,t,a){let i=Tt(t,a,!0);if(a.getBlock(i.id).type!=="space"){let s=$();await xe(e,i,{config:s}),t.intersect=i?.intersect,jr(i)}}d(me,"insertBlockPositioned");async function ut(e,t,a,i){for(let l of t)await i(e,l,a),l.children&&await ut(e,l.children,a,i)}d(ut,"performOperations");async function we(e,t,a){await ut(e,t,a,ye)}d(we,"calculateBlockSizes");async function ke(e,t,a){await ut(e,t,a,me)}d(ke,"insertBlocks");async function Le(e,t,a,i,l){let s=new jt({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let r of a)r.size&&s.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(let r of t)if(r.start&&r.end){let n=i.getBlock(r.start),c=i.getBlock(r.end);if(n?.size&&c?.size){let u=n.size,o=c.size,b=[{x:u.x,y:u.y},{x:u.x+(o.x-u.x)/2,y:u.y+(o.y-u.y)/2},{x:o.x,y:o.y}];pr(e,{v:r.start,w:r.end,name:r.id},{...r,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:b,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",s,l),r.label&&(await hr(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:b,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),dr({...r,x:b[1].x,y:b[1].y},{originalPath:b}))}}}d(Le,"insertEdges");var Vr=d(function(e,t){return t.db.getClasses()},"getClasses"),Zr=d(async function(e,t,a,i){let{securityLevel:l,block:s}=$(),r=i.db,n;l==="sandbox"&&(n=N("#i"+t));let c=l==="sandbox"?N(n.nodes()[0].contentDocument.body):N("body"),u=l==="sandbox"?c.select(`[id="${t}"]`):N(`[id="${t}"]`);ir(u,["point","circle","cross"],i.type,t);let b=r.getBlocks(),m=r.getBlocksFlat(),y=r.getEdges(),L=u.insert("g").attr("class","block");await we(L,b,r);let E=oe(r);if(await ke(L,b,r),await Le(L,y,m,r,t),E){let S=E,C=Math.max(1,Math.round(.125*(S.width/S.height))),_=S.height+C+10,D=S.width+10,{useMaxWidth:x}=s;Mt(u,_,D,!!x),w.debug("Here Bounds",E,S),u.attr("viewBox",`${S.x-5} ${S.y-5} ${S.width+10} ${S.height+10}`)}},"draw"),Gr={draw:Zr,getClasses:Vr},ga={parser:_e,db:Ue,renderer:Gr,styles:Ve};export{ga as diagram};
//# sourceMappingURL=blockDiagram-VD42YOAC-VWWETFZB.min.js.map