UNPKG

ruru

Version:

Grafast-flavoured GraphiQL distribution

2 lines • 42.2 kB
export const __webpack_esm_id__=7054;export const __webpack_esm_ids__=[7054];export const __webpack_esm_modules__={74912(e,t,n){n.r(t),n.d(t,{default:()=>r});var s=n(45718),i=n(11028);const r=(e,t)=>s.default.lang.round(i.default.parse(e)[t])},77054(e,t,n){n.d(t,{diagram:()=>fe}),n.r(t);var s=n(30489),i=n(41298),r=n(6342),a=(n(51752),n(48550),n(77948),n(56350),n(70848)),o=n(39989),c=n(27166),l=n(79456),g=n(35349),h=n(8850),u=n(87125),d=n(76076);function y(e){if((0,g.isPrimitive)(e))return e;const t=(0,h.getTag)(e);if(!function(e){switch((0,h.getTag)(e)){case u.argumentsTag:case u.arrayTag:case u.arrayBufferTag:case u.dataViewTag:case u.booleanTag:case u.dateTag:case u.float32ArrayTag:case u.float64ArrayTag:case u.int8ArrayTag:case u.int16ArrayTag:case u.int32ArrayTag:case u.mapTag:case u.numberTag:case u.objectTag:case u.regexpTag:case u.setTag:case u.stringTag:case u.symbolTag:case u.uint8ArrayTag:case u.uint8ClampedArrayTag:case u.uint16ArrayTag:case u.uint32ArrayTag:return!0;default:return!1}}(e))return{};if(n=e,Array.isArray(n)){const t=Array.from(e);return e.length>0&&"string"==typeof e[0]&&Object.hasOwn(e,"index")&&(t.index=e.index,t.input=e.input),t}var n;if((0,d.isTypedArray)(e)){const t=e;return new(0,t.constructor)(t.buffer,t.byteOffset,t.length)}if("[object ArrayBuffer]"===t)return new ArrayBuffer(e.byteLength);if("[object DataView]"===t){const t=e,n=t.buffer,s=t.byteOffset,i=t.byteLength,r=new ArrayBuffer(i),a=new Uint8Array(n,s,i);return new Uint8Array(r).set(a),new DataView(r)}if("[object Boolean]"===t||"[object Number]"===t||"[object String]"===t){const n=new(0,e.constructor)(e.valueOf());return"[object String]"===t?function(e,t){const n=t.valueOf().length;for(const s in t)Object.hasOwn(t,s)&&(Number.isNaN(Number(s))||Number(s)>=n)&&(e[s]=t[s])}(n,e):p(n,e),n}if("[object Date]"===t)return new Date(Number(e));if("[object RegExp]"===t){const t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if("[object Symbol]"===t)return Object(Symbol.prototype.valueOf.call(e));if("[object Map]"===t){const t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if("[object Set]"===t){const t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if("[object Arguments]"===t){const t=e,n={};return p(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}const s={};return function(e,t){const n=Object.getPrototypeOf(t);null!==n&&"function"==typeof t.constructor&&Object.setPrototypeOf(e,n)}(s,e),p(s,e),function(e,t){const n=Object.getOwnPropertySymbols(t);for(let s=0;s<n.length;s++){const i=n[s];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}(s,e),s}function p(e,t){for(const n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}var b=n(74912),_=n(62209),m=n(79806),f=n(58558),x=function(){var e=(0,l.__name)(function(e,t,n,s){for(n=n||{},s=e.length;s--;n[e[s]]=t);return n},"o"),t=[1,15],n=[1,7],s=[1,13],i=[1,14],r=[1,19],a=[1,16],o=[1,17],c=[1,18],g=[8,30],h=[8,10,21,28,29,30,31,39,43,46],u=[1,23],d=[1,24],y=[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],b=[1,49],_={trace:(0,l.__name)(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,l.__name)(function(e,t,n,s,i,r,a){var o=r.length-1;switch(i){case 4:s.getLogger().debug("Rule: separator (NL) ");break;case 5:s.getLogger().debug("Rule: separator (Space) ");break;case 6:s.getLogger().debug("Rule: separator (EOF) ");break;case 7:s.getLogger().debug("Rule: hierarchy: ",r[o-1]),s.setHierarchy(r[o-1]);break;case 8:s.getLogger().debug("Stop NL ");break;case 9:s.getLogger().debug("Stop EOF ");break;case 10:s.getLogger().debug("Stop NL2 ");break;case 11:s.getLogger().debug("Stop EOF2 ");break;case 12:s.getLogger().debug("Rule: statement: ",r[o]),"number"==typeof r[o].length?this.$=r[o]:this.$=[r[o]];break;case 13:s.getLogger().debug("Rule: statement #2: ",r[o-1]),this.$=[r[o-1]].concat(r[o]);break;case 14:s.getLogger().debug("Rule: link: ",r[o],e),this.$={edgeTypeStr:r[o],label:""};break;case 15:s.getLogger().debug("Rule: LABEL link: ",r[o-3],r[o-1],r[o]),this.$={edgeTypeStr:r[o],label:r[o-1]};break;case 18:const t=parseInt(r[o]),n=s.generateId();this.$={id:n,type:"space",label:"",width:t,children:[]};break;case 23:s.getLogger().debug("Rule: (nodeStatement link node) ",r[o-2],r[o-1],r[o]," typestr: ",r[o-1].edgeTypeStr);const i=s.edgeStrToEdgeData(r[o-1].edgeTypeStr),a=s.edgeStrToEdgeStartData(r[o-1].edgeTypeStr),c=s.edgeStrToThickness(r[o-1].edgeTypeStr),l=s.edgeStrToPattern(r[o-1].edgeTypeStr);this.$=[{id:r[o-2].id,label:r[o-2].label,type:r[o-2].type,directions:r[o-2].directions},{id:r[o-2].id+"-"+r[o].id,start:r[o-2].id,end:r[o].id,label:r[o-1].label,type:"edge",thickness:c,pattern:l,directions:r[o].directions,arrowTypeEnd:i,arrowTypeStart:a},{id:r[o].id,label:r[o].label,type:s.typeStr2Type(r[o].typeStr),directions:r[o].directions}];break;case 24:s.getLogger().debug("Rule: nodeStatement (abc88 node size) ",r[o-1],r[o]),this.$={id:r[o-1].id,label:r[o-1].label,type:s.typeStr2Type(r[o-1].typeStr),directions:r[o-1].directions,widthInColumns:parseInt(r[o],10)};break;case 25:s.getLogger().debug("Rule: nodeStatement (node) ",r[o]),this.$={id:r[o].id,label:r[o].label,type:s.typeStr2Type(r[o].typeStr),directions:r[o].directions,widthInColumns:1};break;case 26:s.getLogger().debug("APA123",this?this:"na"),s.getLogger().debug("COLUMNS: ",r[o]),this.$={type:"column-setting",columns:"auto"===r[o]?-1:parseInt(r[o])};break;case 27:s.getLogger().debug("Rule: id-block statement : ",r[o-2],r[o-1]),s.generateId(),this.$={...r[o-2],type:"composite",children:r[o-1]};break;case 28:s.getLogger().debug("Rule: blockStatement : ",r[o-2],r[o-1],r[o]);const g=s.generateId();this.$={id:g,type:"composite",label:"",children:r[o-1]};break;case 29:s.getLogger().debug("Rule: node (NODE_ID separator): ",r[o]),this.$={id:r[o]};break;case 30:s.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",r[o-1],r[o]),this.$={id:r[o-1],label:r[o].label,typeStr:r[o].typeStr,directions:r[o].directions};break;case 31:s.getLogger().debug("Rule: dirList: ",r[o]),this.$=[r[o]];break;case 32:s.getLogger().debug("Rule: dirList: ",r[o-1],r[o]),this.$=[r[o-1]].concat(r[o]);break;case 33:s.getLogger().debug("Rule: nodeShapeNLabel: ",r[o-2],r[o-1],r[o]),this.$={typeStr:r[o-2]+r[o],label:r[o-1]};break;case 34:s.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",r[o-3],r[o-2]," #3:",r[o-1],r[o]),this.$={typeStr:r[o-3]+r[o],label:r[o-2],directions:r[o-1]};break;case 35:case 36:this.$={type:"classDef",id:r[o-1].trim(),css:r[o].trim()};break;case 37:this.$={type:"applyClass",id:r[o-1].trim(),styleClass:r[o].trim()};break;case 38:this.$={type:"applyStyles",id:r[o-1].trim(),stylesStr:r[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:r,39:a,43:o,46:c},{8:[1,20]},e(g,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:n,28:s,29:i,31:r,39:a,43:o,46:c}),e(h,[2,16],{14:22,15:u,16:d}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(y,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:r},{10:t,11:27,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:r,39:a,43:o,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(g,[2,13]),{26:35,31:r},{31:[2,14]},{17:[1,36]},e(y,[2,24]),{10:t,11:37,13:4,14:22,15:u,16:d,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:r,39:a,43:o,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(p,[2,30]),{18:[1,43]},{18:[1,44]},e(y,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:b},{15:[1,50]},e(h,[2,27]),e(p,[2,33]),{38:[1,51]},{33:52,34:b,38:[2,31]},{31:[2,15]},e(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,l.__name)(function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},"parseError"),parse:(0,l.__name)(function(e){var t=this,n=[0],s=[],i=[null],r=[],a=this.table,o="",c=0,g=0,h=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);d.setInput(e,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var b=d.yylloc;r.push(b);var _=d.options&&d.options.ranges;function m(){var e;return"number"!=typeof(e=s.pop()||d.lex()||1)&&(e instanceof Array&&(e=(s=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.__name)(function(e){n.length=n.length-2*e,i.length=i.length-e,r.length=r.length-e},"popStack"),(0,l.__name)(m,"lex");for(var f,x,S,L,k,w,E,T,D,I={};;){if(S=n[n.length-1],this.defaultActions[S]?L=this.defaultActions[S]:(null==f&&(f=m()),L=a[S]&&a[S][f]),void 0===L||!L.length||!L[0]){var N;for(w in D=[],a[S])this.terminals_[w]&&w>2&&D.push("'"+this.terminals_[w]+"'");N=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(N,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:b,expected:D})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+f);switch(L[0]){case 1:n.push(f),i.push(d.yytext),r.push(d.yylloc),n.push(L[1]),f=null,x?(f=x,x=null):(g=d.yyleng,o=d.yytext,c=d.yylineno,b=d.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[L[1]][1],I.$=i[i.length-E],I._$={first_line:r[r.length-(E||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(E||1)].first_column,last_column:r[r.length-1].last_column},_&&(I._$.range=[r[r.length-(E||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(I,[o,g,c,y.yy,L[1],i,r].concat(u))))return k;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),r=r.slice(0,-1*E)),n.push(this.productions_[L[1]][0]),i.push(I.$),r.push(I._$),T=a[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0},"parse")},m=function(){return{EOF:1,parseError:(0,l.__name)(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:(0,l.__name)(function(e,t){return this.yy=t||this.yy||{},this._input=e,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,l.__name)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},"input"),unput:(0,l.__name)(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.__name)(function(){return this._more=!0,this},"more"),reject:(0,l.__name)(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,l.__name)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,l.__name)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.__name)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.__name)(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,l.__name)(function(e,t){var n,s,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))),(s=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1},"test_match"),next:(0,l.__name)(function(){if(this.done)return this.EOF;var e,t,n,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;r<i.length;r++)if((n=this._input.match(this.rules[i[r]]))&&(!t||n[0].length>t[0].length)){if(t=n,s=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[s]))&&e:""===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,l.__name)(function(){return this.next()||this.lex()},"lex"),begin:(0,l.__name)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,l.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.__name)(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,l.__name)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,l.__name)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,l.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,l.__name)(function(e,t,n,s){switch(n){case 0:return e.getLogger().debug("Found block-beta"),10;case 1:return e.getLogger().debug("Found id-block"),29;case 2:return e.getLogger().debug("Found block"),10;case 3:e.getLogger().debug(".",t.yytext);break;case 4:e.getLogger().debug("_",t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.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:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 13:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 14:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 15:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.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(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return e.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 e.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),37;case 74:return e.getLogger().debug("Lex: NODE_ID",t.yytext),31;case 75:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 78:return"NODE_DESCR";case 80:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 83:e.getLogger().debug("LEX POPPING"),this.popState();break;case 84:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 91:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 93:case 94:case 95:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 96:case 97:case 98:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 100:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 102:case 103:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 104:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.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 f(){this.yy={}}return _.lexer=m,(0,l.__name)(f,"Parser"),f.prototype=_,_.Parser=f,new f}();x.parser=x;var S=x,L=new Map,k=[],w=new Map,E="color",T="fill",D=new Map,I="",N=(0,l.__name)(e=>o.common_default.sanitizeText(e,(0,o.getConfig2)()),"sanitizeText"),$=(0,l.__name)(function(e,t=""){let n=D.get(e);n||(n={id:e,styles:[],textStyles:[]},D.set(e,n)),null!=t&&t.split(",").forEach(e=>{const t=e.replace(/([^;]*);/,"$1").trim();if(RegExp(E).exec(e)){const e=t.replace(T,"bgFill").replace(E,T);n.textStyles.push(e)}n.styles.push(t)})},"addStyleClass"),C=(0,l.__name)(function(e,t=""){const n=L.get(e);null!=t&&(n.styles=t.split(","))},"addStyle2Node"),O=(0,l.__name)(function(e,t){e.split(",").forEach(function(e){let n=L.get(e);if(void 0===n){const t=e.trim();n={id:t,type:"na",children:[]},L.set(t,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),A=(0,l.__name)((e,t)=>{const n=e.flat(),s=[],i=n.find(e=>"column-setting"===e?.type),r=i?.columns??-1;for(const e of n)if("number"==typeof r&&r>0&&"column-setting"!==e.type&&"number"==typeof e.widthInColumns&&e.widthInColumns>r&&c.log.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${r}`),e.label&&(e.label=N(e.label)),"classDef"!==e.type)if("applyClass"!==e.type)if("applyStyles"!==e.type)if("column-setting"===e.type)t.columns=e.columns??-1;else if("edge"===e.type){const t=(w.get(e.id)??0)+1;w.set(e.id,t),e.id=t+"-"+e.id,k.push(e)}else{e.label||("composite"===e.type?e.label="":e.label=e.id);const t=L.get(e.id);if(void 0===t?L.set(e.id,e):("na"!==e.type&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&A(e.children,e),"space"===e.type){const t=e.width??1;for(let n=0;n<t;n++){const t=y(e);t.id=t.id+"-"+n,L.set(t.id,t),s.push(t)}}else void 0===t&&s.push(e)}else e?.stylesStr&&C(e.id,e?.stylesStr);else O(e.id,e?.styleClass??"");else $(e.id,e.css);t.children=s},"populateBlockDatabase"),z=[],v={id:"root",type:"composite",children:[],columns:-1},R=(0,l.__name)(()=>{c.log.debug("Clear called"),(0,o.clear)(),v={id:"root",type:"composite",children:[],columns:-1},L=new Map([["root",v]]),z=[],D=new Map,k=[],w=new Map,I=""},"clear");function B(e){switch(c.log.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return c.log.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 P(e){return c.log.debug("typeStr2Type",e),"=="===e?"thick":"normal"}function F(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function M(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function Y(e){return e.includes("==")?"thick":"normal"}function j(e){return e.includes(".-")?"dotted":"solid"}(0,l.__name)(B,"typeStr2Type"),(0,l.__name)(P,"edgeTypeStr2Type"),(0,l.__name)(F,"edgeStrToEdgeData"),(0,l.__name)(M,"edgeStrToEdgeStartData"),(0,l.__name)(Y,"edgeStrToThickness"),(0,l.__name)(j,"edgeStrToPattern");var K=0,X=(0,l.__name)(()=>(K++,"id-"+Math.random().toString(36).substr(2,12)+"-"+K),"generateId"),W=(0,l.__name)(e=>{v.children=e,A(e,v),z=v.children},"setHierarchy"),U=(0,l.__name)(e=>{const t=L.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),H=(0,l.__name)(()=>[...L.values()],"getBlocksFlat"),G=(0,l.__name)(()=>z||[],"getBlocks"),V=(0,l.__name)(()=>k,"getEdges"),q=(0,l.__name)(e=>L.get(e),"getBlock"),J=(0,l.__name)(e=>{L.set(e.id,e)},"setBlock"),Z=(0,l.__name)(e=>{I=e},"setDiagramId"),Q=(0,l.__name)(()=>I,"getDiagramId"),ee=(0,l.__name)(()=>c.log,"getLogger"),te=(0,l.__name)(function(){return D},"getClasses"),ne={getConfig:(0,l.__name)(()=>(0,o.getConfig)().block,"getConfig"),typeStr2Type:B,edgeTypeStr2Type:P,edgeStrToEdgeData:F,edgeStrToEdgeStartData:M,edgeStrToThickness:Y,edgeStrToPattern:j,getLogger:ee,getBlocksFlat:H,getBlocks:G,getEdges:V,setHierarchy:W,getBlock:q,setBlock:J,getColumns:U,getClasses:te,clear:R,generateId:X,setDiagramId:Z,getDiagramId:Q},se=(0,l.__name)((e,t)=>{const n=b.default,s=n(e,"r"),i=n(e,"g"),r=n(e,"b");return _.default(s,i,r,t)},"fade"),ie=(0,l.__name)(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span {\n color: ${e.titleColor};\n }\n\n\n\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`<p>\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${e.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${se(e.mainBkg,.5)};\n fill: ${se(e.clusterBkg,.5)};\n stroke: ${se(e.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n ${(0,s.getIconStyles)()}\n`,"getStyles");function re(e,t){if(0===e||!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);return e<0?{px:t,py:0}:1===e?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}(0,l.__name)(re,"calculateBlockPosition");var ae=(0,l.__name)(e=>{let t=0,n=0;for(const s of e.children){const{width:e,height:i,x:r,y:a}=s.size??{width:0,height:0,x:0,y:0};if(c.log.debug("getMaxChildSize abc95 child:",s.id,"width:",e,"height:",i,"x:",r,"y:",a,s.type),"space"===s.type)continue;const o=e/(s.widthInColumns??1);o>t&&(t=o),i>n&&(n=i)}return{width:t,height:n}},"getMaxChildSize");function oe(e,t,n=0,s=0,i=8){c.log.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",n),e?.size?.width||(e.size={width:n,height:s,x:0,y:0});let r=0,a=0;if(e.children?.length>0){for(const n of e.children)oe(n,t,0,0,i);const o=ae(e);r=o.width,a=o.height,c.log.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",r,a);for(const t of e.children)t.size&&(c.log.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${r} ${a} ${JSON.stringify(t.size)}`),t.size.width=r*(t.widthInColumns??1)+i*((t.widthInColumns??1)-1),t.size.height=a,t.size.x=0,t.size.y=0,c.log.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${r} maxHeight:${a}`));for(const n of e.children)oe(n,t,r,a,i);const l=e.columns??-1;let g=0;for(const t of e.children)g+=t.widthInColumns??1;let h=e.children.length;l>0&&l<g&&(h=l);const u=Math.ceil(g/h);let d=h*(r+i)+i,y=u*(a+i)+i;if(d<n){c.log.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${n} siblingHeight ${s} width ${d}`),d=n,y=s;const t=(n-h*i-i)/h,o=(s-u*i-i)/u;c.log.debug("Size indata abc88",e.id,"childWidth",t,"maxWidth",r),c.log.debug("Size indata abc88",e.id,"childHeight",o,"maxHeight",a),c.log.debug("Size indata abc88 xSize",h,"padding",i);for(const n of e.children)n.size&&(n.size.width=t,n.size.height=o,n.size.x=0,n.size.y=0)}if(c.log.debug(`abc95 (finale calc) ${e.id} xSize ${h} ySize ${u} columns ${l}${e.children.length} width=${Math.max(d,e.size?.width||0)}`),d<(e?.size?.width||0)){d=e?.size?.width||0;const t=l>0?Math.min(e.children.length,l):e.children.length;if(t>0){const n=(d-t*i-i)/t;c.log.debug("abc95 (growing to fit) width",e.id,d,e.size?.width,n);for(const t of e.children)t.size&&(t.size.width=n)}}e.size={width:d,height:y,x:0,y:0}}c.log.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function ce(e,t,n=8){c.log.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const s=e.columns??-1;if(c.log.debug("layoutBlocks columns abc95",e.id,"=>",s,e),e.children&&e.children.length>0){const i=e?.children[0]?.size?.width??0,r=e.children.length*i+(e.children.length-1)*n;c.log.debug("widthOfChildren 88",r,"posX");const a=new Map;{let t=0;for(const n of e.children){if(!n.size)continue;const{py:e}=re(s,t),i=a.get(e)??0;n.size.height>i&&a.set(e,n.size.height);let r=n?.widthInColumns??1;s>0&&(r=Math.min(r,s-t%s)),t+=r}}const o=new Map;{let e=0;const t=[...a.keys()].sort((e,t)=>e-t);for(const s of t)o.set(s,e),e+=(a.get(s)??0)+n}let l=0;c.log.debug("abc91 block?.size?.x",e.id,e?.size?.x);let g=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-n,h=0;for(const i of e.children){const r=e;if(!i.size)continue;const{width:u,height:d}=i.size,{px:y,py:p}=re(s,l);if(p!=h&&(h=p,g=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-n,c.log.debug("New row in layout for block",e.id," and child ",i.id,h)),c.log.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${l} (px, py) ${y},${p} (${r?.size?.x},${r?.size?.y}) parent: ${r.id} width: ${u}${n}`),r.size){const e=u/2;i.size.x=g+n+e,c.log.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${g} new startingPosX${i.size.x} ${e} padding=${n} width=${u} halfWidth=${e} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${u*(i?.widthInColumns??1)/2}`),g=i.size.x+e;const t=o.get(p)??0,s=a.get(p)??d;i.size.y=r.size.y-r.size.height/2+t+s/2+n,c.log.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${g}${n}${e}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${u*(i?.widthInColumns??1)/2}`)}i.children&&ce(i,t,n);let b=i?.widthInColumns??1;s>0&&(b=Math.min(b,s-l%s)),l+=b,c.log.debug("abc88 columnsPos",i,l)}}c.log.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function le(e,{minX:t,minY:n,maxX:s,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&"root"!==e.id){const{x:r,y:a,width:o,height:c}=e.size;r-o/2<t&&(t=r-o/2),a-c/2<n&&(n=a-c/2),r+o/2>s&&(s=r+o/2),a+c/2>i&&(i=a+c/2)}if(e.children)for(const r of e.children)({minX:t,minY:n,maxX:s,maxY:i}=le(r,{minX:t,minY:n,maxX:s,maxY:i}));return{minX:t,minY:n,maxX:s,maxY:i}}function ge(e){const t=e.getBlock("root");if(!t)return;const n=(0,o.getConfig2)()?.block?.padding??8;oe(t,e,0,0,n),ce(t,e,n),c.log.debug("getBlocks",JSON.stringify(t,null,2));const{minX:s,minY:i,maxX:r,maxY:a}=le(t);return{x:s,y:i,width:r-s,height:a-i}}function he(e,t,n=!1){const s=e;let i="default";(s?.classes?.length||0)>0&&(i=(s?.classes??[]).join(" ")),i+=" flowchart-label";const r=(s?.classes??[]).flatMap(e=>t.getClasses().get(e)?.styles??[]);let c,l=0,g="rect";switch(s.type){case"round":l=5,g="rect";break;case"composite":l=0,g="composite",c=0;break;case"square":case"group":default:g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"block_arrow":g="block_arrow";break;case"odd":case"rect_left_inv_arrow":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"doublecircle":g="doublecircle"}const h=(0,a.getStylesFromArray)(s?.styles??[]),u=s.label,d=s.size??{width:0,height:0,x:0,y:0},y=t.getDiagramId();return{labelStyle:h.labelStyle,shape:g,label:u,labelText:u,rx:l,ry:l,class:i,cssClasses:i,cssStyles:s?.styles??[],cssCompiledStyles:r,style:h.style,id:s.id,domId:y?`${y}-${s.id}`:s.id,isGroup:!1,directions:s.directions,width:d.width||void 0,height:d.height||void 0,wrappingWidth:d.width||Number.POSITIVE_INFINITY,x:d.x,y:d.y,positioned:n,intersect:void 0,padding:c??(0,o.getConfig)()?.block?.padding??0,widthInColumns:s.widthInColumns??1}}async function ue(e,t,n){const s=he(t,n,!1);if("group"===t.type)return;const i=(0,o.getConfig)(),a=await(0,r.insertNode)(e,s,{config:i}),c=a.node()?.getBBox()??{width:0,height:0},l=n.getBlock(s.id);l.size={width:c.width,height:c.height,x:0,y:0,node:a},n.setBlock(l),a.remove()}async function de(e,t,n){const s=he(t,n,!0);if("space"!==n.getBlock(s.id).type){const n=(0,o.getConfig)();await(0,r.insertNode)(e,s,{config:n}),t.intersect=s?.intersect,(0,r.positionNode)(s)}}async function ye(e,t,n,s){for(const i of t)await s(e,i,n),i.children&&await ye(e,i.children,n,s)}async function pe(e,t,n){await ye(e,t,n,ue)}async function be(e,t,n){await ye(e,t,n,de)}async function _e(e,t,n,s,r){const a=new f.Graph({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const e of n)e.size&&a.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(const n of t)if(n.start&&n.end){const t=s.getBlock(n.start),o=s.getBlock(n.end);if(t?.size&&o?.size){const s=t.size,c=o.size,l=[{x:s.x,y:s.y},{x:s.x+(c.x-s.x)/2,y:s.y+(c.y-s.y)/2},{x:c.x,y:c.y}],g=r?`${r}-${n.id}`:n.id,h=`${"thick"===n.thickness?"edge-thickness-thick":"edge-thickness-normal"} ${"dotted"===n.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;(0,i.insertEdge)(e,{...n,id:g,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:h},{},"block",a.node(n.start),a.node(n.end),r),n.label&&(await(0,i.insertEdgeLabel)(e,{...n,label:n.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:h}),(0,i.positionEdgeLabel)({...n,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,l.__name)(oe,"setBlockSizes"),(0,l.__name)(ce,"layoutBlocks"),(0,l.__name)(le,"findBounds"),(0,l.__name)(ge,"layout"),(0,l.__name)(he,"getNodeFromBlock"),(0,l.__name)(ue,"calculateBlockSize"),(0,l.__name)(de,"insertBlockPositioned"),(0,l.__name)(ye,"performOperations"),(0,l.__name)(pe,"calculateBlockSizes"),(0,l.__name)(be,"insertBlocks"),(0,l.__name)(_e,"insertEdges");var me=(0,l.__name)(function(e,t){return t.db.getClasses()},"getClasses"),fe={parser:S,db:ne,renderer:{draw:(0,l.__name)(async function(e,t,n,s){const{securityLevel:r,block:a}=(0,o.getConfig)(),l=s.db;let g;l.setDiagramId(t),"sandbox"===r&&(g=(0,m.select)("#i"+t));const h="sandbox"===r?(0,m.select)(g.nodes()[0].contentDocument.body):(0,m.select)("body"),u="sandbox"===r?h.select(`[id="${t}"]`):(0,m.select)(`[id="${t}"]`);(0,i.markers_default)(u,["point","circle","cross"],s.type,t);const d=l.getBlocks(),y=l.getBlocksFlat(),p=l.getEdges(),b=u.insert("g").attr("class","block");await pe(b,d,l);const _=ge(l);await be(b,d,l),await _e(b,p,y,l,t);const f=b.node()?.getBBox(),x=f&&Number.isFinite(f.width)&&Number.isFinite(f.height)?f:_;if(x){const e=Math.max(1,Math.round(x.width/x.height*.125)),t=x.height+e+10,n=x.width+10,{useMaxWidth:s}=a;(0,o.configureSvgSize)(u,t,n,!!s),c.log.debug("Here Bounds",_,x),u.attr("viewBox",`${x.x-5} ${x.y-5} ${x.width+10} ${x.height+10}`)}},"draw"),getClasses:me},styles:ie}},30489(e,t,n){n.r(t),n.d(t,{getIconStyles:()=>s});var s=(0,n(79456).__name)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")}}; //# sourceMappingURL=7054.js.map