export const __rspack_esm_id="9941";export const __rspack_esm_ids=["9941"];export const __webpack_modules__={11236(t,e,i){i.d(e,{diagram:()=>X});var n=i(34478),r=i(81179),s=i(13224),a=i(50476),o=i(86632),c=i(58524),l=i(79723),h=i(60217),d=i(70405),g=i(30611),p=function(){var t=(0,a.K2)(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),e=[1,4],i=[1,13],n=[1,12],r=[1,15],s=[1,16],o=[1,20],c=[1,19],l=[6,7,8],h=[1,26],d=[1,24],g=[1,25],p=[6,7,11],u=[1,6,13,15,16,19,22],y=[1,33],m=[1,34],f=[1,6,7,11,13,15,16,19,22],$={trace:(0,a.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,a.K2)(function(t,e,i,n,r,s,a){var o=s.length-1;switch(r){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",s[o].id),n.addNode(s[o-1].length,s[o].id,s[o].descr,s[o].type);break;case 16:n.getLogger().trace("Icon: ",s[o]),n.decorateNode({icon:s[o]});break;case 17:case 21:n.decorateNode({class:s[o]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",s[o].id),n.addNode(0,s[o].id,s[o].descr,s[o].type);break;case 20:n.decorateNode({icon:s[o]});break;case 25:n.getLogger().trace("node found ..",s[o-2]),this.$={id:s[o-1],descr:s[o-1],type:n.getType(s[o-2],s[o])};break;case 26:this.$={id:s[o],descr:s[o],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",s[o-3]),this.$={id:s[o-3],descr:s[o-1],type:n.getType(s[o-2],s[o])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:i,7:[1,10],9:9,12:11,13:n,14:14,15:r,16:s,17:17,18:18,19:o,22:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,15:r,16:s,17:17,18:18,19:o,22:c},{6:i,9:22,12:11,13:n,14:14,15:r,16:s,17:17,18:18,19:o,22:c},{6:h,7:d,10:23,11:g},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:c}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:d,10:32,11:g},{1:[2,7],6:i,12:21,13:n,14:14,15:r,16:s,17:17,18:18,19:o,22:c},t(u,[2,14],{7:y,11:m}),t(f,[2,8]),t(f,[2,9]),t(f,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(u,[2,13],{7:y,11:m}),t(f,[2,11]),t(f,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,a.K2)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,a.K2)(function(t){var e=this,i=[0],n=[],r=[null],s=[],o=this.table,c="",l=0,h=0,d=0,g=s.slice.call(arguments,1),p=Object.create(this.lexer),u={};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(u[y]=this.yy[y]);p.setInput(t,u),u.lexer=p,u.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;s.push(m);var f=p.options&&p.options.ranges;function $(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof u.parseError?this.parseError=u.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)(function(t){i.length=i.length-2*t,r.length=r.length-t,s.length=s.length-t},"popStack"),(0,a.K2)($,"lex");for(var _,E,b,k,x,S,N,L,D,w={};;){if(b=i[i.length-1],this.defaultActions[b]?k=this.defaultActions[b]:(null==_&&(_=$()),k=o[b]&&o[b][_]),void 0===k||!k.length||!k[0]){var I="";for(S in D=[],o[b])this.terminals_[S]&&S>2&&D.push("'"+this.terminals_[S]+"'");I=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:D})}if(k[0]instanceof Array&&k.length>1)throw Error("Parse Error: multiple actions possible at state: "+b+", token: "+_);switch(k[0]){case 1:i.push(_),r.push(p.yytext),s.push(p.yylloc),i.push(k[1]),_=null,E?(_=E,E=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,m=p.yylloc,d>0&&d--);break;case 2:if(N=this.productions_[k[1]][1],w.$=r[r.length-N],w._$={first_line:s[s.length-(N||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(N||1)].first_column,last_column:s[s.length-1].last_column},f&&(w._$.range=[s[s.length-(N||1)].range[0],s[s.length-1].range[1]]),void 0!==(x=this.performAction.apply(w,[c,h,l,u,k[1],r,s].concat(g))))return x;N&&(i=i.slice(0,-1*N*2),r=r.slice(0,-1*N),s=s.slice(0,-1*N)),i.push(this.productions_[k[1]][0]),r.push(w.$),s.push(w._$),L=o[i[i.length-2]][i[i.length-1]],i.push(L);break;case 3:return!0}}return!0},"parse")};function _(){this.yy={}}return $.lexer={EOF:1,parseError:(0,a.K2)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,a.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,a.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.K2)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),i.length-1&&(this.yylineno-=i.length-1);var r=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:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.K2)(function(){return this._more=!0,this},"more"),reject:(0,a.K2)(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,a.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,a.K2)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.K2)(function(t,e){var i,n,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var s in r)this[s]=r[s];return!1},"test_match"),next:(0,a.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,n,r=this._currentRules(),s=0;se[0].length)){if(e=i,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,r[s])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.K2)(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,a.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K2)(function(t,e,i,n){switch(i){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}},(0,a.K2)(_,"Parser"),_.prototype=$,$.Parser=_,new _}();p.parser=p;var u=[],y=0,m={},f=(0,a.K2)(()=>{u=[],y=0,m={}},"clear"),$=(0,a.K2)(function(t){for(let e=u.length-1;e>=0;e--)if(u[e].levelu.length>0?u[0]:null,"getMindmap"),E=(0,a.K2)((t,e,i,n)=>{a.Rm.info("addNode",t,e,i,n);let r=(0,a.D7)(),s=r.mindmap?.padding??a.UI.mindmap.padding;switch(n){case b.ROUNDED_RECT:case b.RECT:case b.HEXAGON:s*=2}let o={id:y++,nodeId:(0,a.jZ)(e,r),level:t,descr:(0,a.jZ)(i,r),type:n,children:[],width:r.mindmap?.maxNodeWidth??a.UI.mindmap.maxNodeWidth,padding:s},c=$(t);if(c)c.children.push(o),u.push(o);else if(0===u.length)u.push(o);else throw Error('There can be only one root. No parent could be found for ("'+o.descr+'")')},"addNode"),b={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},k=(0,a.K2)((t,e)=>{switch(a.Rm.debug("In get type",t,e),t){case"[":return b.RECT;case"(":return")"===e?b.ROUNDED_RECT:b.CLOUD;case"((":return b.CIRCLE;case")":return b.CLOUD;case"))":return b.BANG;case"{{":return b.HEXAGON;default:return b.DEFAULT}},"getType"),x=(0,a.K2)((t,e)=>{m[t]=e},"setElementForId"),S=(0,a.K2)(t=>{if(!t)return;let e=(0,a.D7)(),i=u[u.length-1];t.icon&&(i.icon=(0,a.jZ)(t.icon,e)),t.class&&(i.class=(0,a.jZ)(t.class,e))},"decorateNode"),N=(0,a.K2)(t=>{switch(t){case b.DEFAULT:return"no-border";case b.RECT:return"rect";case b.ROUNDED_RECT:return"rounded-rect";case b.CIRCLE:return"circle";case b.CLOUD:return"cloud";case b.BANG:return"bang";case b.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),L=(0,a.K2)(()=>a.Rm,"getLogger"),D=(0,a.K2)(t=>m[t],"getElementById"),w=(0,a.K2)(function(t,e,i,n){e.append("path").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("d",`M0 ${i.height-5} v${-i.height+10} q0,-5 5,-5 h${i.width-10} q5,0 5,5 v${i.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",i.height).attr("x2",i.width).attr("y2",i.height)},"defaultBkg"),I=(0,a.K2)(function(t,e,i){e.append("rect").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("height",i.height).attr("width",i.width)},"rectBkg"),O=(0,a.K2)(function(t,e,i){let n=i.width,r=i.height,s=.15*n,a=.25*n,o=.35*n,c=.2*n;e.append("path").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("d",`M0 0 a${s},${s} 0 0,1 ${.25*n},${-1*n*.1} a${o},${o} 1 0,1 ${.4*n},${-1*n*.1} a${a},${a} 1 0,1 ${.35*n},${.2*n} a${s},${s} 1 0,1 ${.15*n},${.35*r} a${c},${c} 1 0,1 ${-1*n*.15},${.65*r} a${a},${s} 1 0,1 ${-1*n*.25},${.15*n} a${o},${o} 1 0,1 ${-1*n*.5},0 a${s},${s} 1 0,1 ${-1*n*.25},${-1*n*.15} a${s},${s} 1 0,1 ${-1*n*.1},${-1*r*.35} a${c},${c} 1 0,1 ${.1*n},${-1*r*.65} H0 V0 Z`)},"cloudBkg"),K=(0,a.K2)(function(t,e,i){let n=i.width,r=i.height,s=.15*n;e.append("path").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("d",`M0 0 a${s},${s} 1 0,0 ${.25*n},${-1*r*.1} a${s},${s} 1 0,0 ${.25*n},0 a${s},${s} 1 0,0 ${.25*n},0 a${s},${s} 1 0,0 ${.25*n},${.1*r} a${s},${s} 1 0,0 ${.15*n},${.33*r} a${.8*s},${.8*s} 1 0,0 0,${.34*r} a${s},${s} 1 0,0 ${-1*n*.15},${.33*r} a${s},${s} 1 0,0 ${-1*n*.25},${.15*r} a${s},${s} 1 0,0 ${-1*n*.25},0 a${s},${s} 1 0,0 ${-1*n*.25},0 a${s},${s} 1 0,0 ${-1*n*.25},${-1*r*.15} a${s},${s} 1 0,0 ${-1*n*.1},${-1*r*.33} a${.8*s},${.8*s} 1 0,0 0,${-1*r*.34} a${s},${s} 1 0,0 ${.1*n},${-1*r*.33} H0 V0 Z`)},"bangBkg"),C=(0,a.K2)(function(t,e,i){e.append("circle").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("r",i.width/2)},"circleBkg");function v(t,e,i,n,r){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+(r.width-e)/2+", "+i+")")}(0,a.K2)(v,"insertPolygonShape");var T=(0,a.K2)(function(t,e,i){let n=i.height,r=n/4,s=i.width-i.padding+2*r,a=[{x:r,y:0},{x:s-r,y:0},{x:s,y:-n/2},{x:s-r,y:-n},{x:r,y:-n},{x:0,y:-n/2}];v(e,s,n,a,i)},"hexagonBkg"),R=(0,a.K2)(function(t,e,i){e.append("rect").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("height",i.height).attr("rx",i.padding).attr("ry",i.padding).attr("width",i.width)},"roundedRectBkg"),A=(0,a.K2)(async function(t,e,i,s,a){let o=a.htmlLabels,c=s%11,l=e.append("g");i.section=c;let h="section-"+c;c<0&&(h+=" section-root"),l.attr("class",(i.class?i.class+" ":"")+"mindmap-node "+h);let d=l.append("g"),g=l.append("g"),p=i.descr.replace(/()/g,"\n");await (0,n.GZ)(g,p,{useHtmlLabels:o,width:i.width,classes:"mindmap-node-label"},a),o||g.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let u=g.node().getBBox(),[y]=(0,r.I5)(a.fontSize);if(i.height=u.height+1.1*y*.5+i.padding,i.width=u.width+2*i.padding,i.icon)if(i.type===t.nodeType.CIRCLE)i.height+=50,i.width+=50,l.append("foreignObject").attr("height","50px").attr("width",i.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+c+" "+i.icon),g.attr("transform","translate("+i.width/2+", "+(i.height/2-1.5*i.padding)+")");else{i.width+=50;let t=i.height;i.height=Math.max(t,60);let e=Math.abs(i.height-t);l.append("foreignObject").attr("width","60px").attr("height",i.height).attr("style","text-align: center;margin-top:"+e/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+c+" "+i.icon),g.attr("transform","translate("+(25+i.width/2)+", "+(e/2+i.padding/2)+")")}else if(o){let t=(i.width-u.width)/2,e=(i.height-u.height)/2;g.attr("transform","translate("+t+", "+e+")")}else{let t=i.width/2,e=i.padding/2;g.attr("transform","translate("+t+", "+e+")")}switch(i.type){case t.nodeType.DEFAULT:w(t,d,i,c);break;case t.nodeType.ROUNDED_RECT:R(t,d,i,c);break;case t.nodeType.RECT:I(t,d,i,c);break;case t.nodeType.CIRCLE:d.attr("transform","translate("+i.width/2+", "+i.height/2+")"),C(t,d,i,c);break;case t.nodeType.CLOUD:O(t,d,i,c);break;case t.nodeType.BANG:K(t,d,i,c);break;case t.nodeType.HEXAGON:T(t,d,i,c)}return t.setElementForId(i.id,l),i.height},"drawNode"),P=(0,a.K2)(function(t,e){let i=t.getElementById(e.id),n=e.x||0,r=e.y||0;i.attr("transform","translate("+n+","+r+")")},"positionNode");async function B(t,e,i,n,r){await A(t,e,i,n,r),i.children&&await Promise.all(i.children.map((i,s)=>B(t,e,i,n<0?s:n,r)))}function M(t,e){e.edges().map((e,i)=>{let n=e.data();if(e[0]._private.bodyBounds){let r=e[0]._private.rscratch;a.Rm.trace("Edge: ",i,n),t.insert("path").attr("d",`M ${r.startX},${r.startY} L ${r.midX},${r.midY} L${r.endX},${r.endY} `).attr("class","edge section-edge-"+n.section+" edge-depth-"+n.depth)}})}function U(t,e,i,n){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:n,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(r=>{U(r,e,i,n+1),e.add({group:"edges",data:{id:`${t.id}_${r.id}`,source:t.id,target:r.id,depth:n,section:r.section}})})}function j(t,e){return new Promise(i=>{let n=(0,l.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),r=(0,o.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),U(t,r,e,0),r.nodes().forEach(function(t){t.layoutDimensions=()=>{let e=t.data();return{w:e.width,h:e.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(t=>{a.Rm.info("Ready",t),i(r)})})}function F(t,e){e.nodes().map((e,i)=>{let n=e.data();n.x=e.position().x,n.y=e.position().y,P(t,n);let r=t.getElementById(n.nodeId);a.Rm.info("Id:",i,"Position: (",e.position().x,", ",e.position().y,")",n),r.attr("transform",`translate(${e.position().x-n.width/2}, ${e.position().y-n.height/2})`),r.attr("attr",`apa-${i})`)})}o.A.use(c),(0,a.K2)(B,"drawNodes"),(0,a.K2)(M,"drawEdges"),(0,a.K2)(U,"addNodes"),(0,a.K2)(j,"layoutMindmap"),(0,a.K2)(F,"positionNodes");var H=(0,a.K2)(async(t,e,i,n)=>{a.Rm.debug("Rendering mindmap diagram\n"+t);let r=n.db,o=r.getMindmap();if(!o)return;let c=(0,a.D7)();c.htmlLabels=!1;let l=(0,s.D)(e),h=l.append("g");h.attr("class","mindmap-edges");let d=l.append("g");d.attr("class","mindmap-nodes"),await B(r,d,o,-1,c);let g=await j(o,c);M(h,g),F(r,g),(0,a.ot)(void 0,l,c.mindmap?.padding??a.UI.mindmap.padding,c.mindmap?.useMaxWidth??a.UI.mindmap.useMaxWidth)},"draw"),G=(0,a.K2)(t=>{let e="";for(let e=0;e` .edge { stroke-width: 3; } ${G(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } .section-root text { fill: ${t.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .mindmap-node-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } `,"getStyles")}}};