/*! third party licenses: js/vendor.LICENSE.txt */ import{g as ct}from"./chunk-55IACEB6-DorbukSM.chunk.mjs";import{s as ht}from"./chunk-QN33PNHL-BuaC_Ajj.chunk.mjs";import{_ as c,l as T,o as lt,r as dt,E as M,c as W,h as U,ad as gt}from"./NcSelect-DXLJbwym.chunk.mjs";import{w as pt,x as ut,y as yt}from"./isEmpty-nTVdZyYD.chunk.mjs";import"./whiteboard-main.mjs";import"./index-Anv74-sp.chunk.mjs";import"./vendor-BeFBwUwf.chunk.mjs";import"./index-C0mkXnFg.chunk.mjs";import"./index-Bn0s6V7w.chunk.mjs";import"./index-vg7q3Iku.chunk.mjs";import"./translation-DoG5ZELJ-DKBzIEvm.chunk.mjs";import"./percentages-BXMCSKIN-Cw9SI0WV.chunk.mjs";import"./useJwtStore-B1DPLYgs.chunk.mjs";import"./_plugin-vue2_normalizer-CBCAj2XU.chunk.mjs";import"./line-2ECJkxIB.chunk.mjs";import"./array-Cg_lHFoG.chunk.mjs";import"./path-i7Zvihw6.chunk.mjs";const m=[];for(let i=0;i<256;++i)m.push((i+256).toString(16).slice(1));function mt(i,t=0){return(m[i[t+0]]+m[i[t+1]]+m[i[t+2]]+m[i[t+3]]+"-"+m[i[t+4]]+m[i[t+5]]+"-"+m[i[t+6]]+m[i[t+7]]+"-"+m[i[t+8]]+m[i[t+9]]+"-"+m[i[t+10]]+m[i[t+11]]+m[i[t+12]]+m[i[t+13]]+m[i[t+14]]+m[i[t+15]]).toLowerCase()}let X;const ft=new Uint8Array(16);function Et(){if(!X){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");X=crypto.getRandomValues.bind(crypto)}return X(ft)}const bt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),it={randomUUID:bt};function _t(i,t,n){if(it.randomUUID&&!i)return it.randomUUID();i=i||{};const a=i.random??i.rng?.()??Et();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,mt(a)}var z=function(){var i=c(function(k,e,r,o){for(r=r||{},o=k.length;o--;r[k[o]]=e);return r},"o"),t=[1,4],n=[1,13],a=[1,12],p=[1,15],h=[1,16],u=[1,20],g=[1,19],f=[6,7,8],v=[1,26],V=[1,24],Y=[1,25],_=[6,7,11],q=[1,6,13,15,16,19,22],J=[1,33],K=[1,34],w=[1,6,7,11,13,15,16,19,22],F={trace:c(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:c(function(k,e,r,o,l,s,E){var d=s.length-1;switch(l){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",s[d].id),o.addNode(s[d-1].length,s[d].id,s[d].descr,s[d].type);break;case 16:o.getLogger().trace("Icon: ",s[d]),o.decorateNode({icon:s[d]});break;case 17:case 21:o.decorateNode({class:s[d]});break;case 18:o.getLogger().trace("SPACELIST");break;case 19:o.getLogger().trace("Node: ",s[d].id),o.addNode(0,s[d].id,s[d].descr,s[d].type);break;case 20:o.decorateNode({icon:s[d]});break;case 25:o.getLogger().trace("node found ..",s[d-2]),this.$={id:s[d-1],descr:s[d-1],type:o.getType(s[d-2],s[d])};break;case 26:this.$={id:s[d],descr:s[d],type:o.nodeType.DEFAULT};break;case 27:o.getLogger().trace("node found ..",s[d-3]),this.$={id:s[d-3],descr:s[d-1],type:o.getType(s[d-2],s[d])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:a,14:14,15:p,16:h,17:17,18:18,19:u,22:g},i(f,[2,3]),{1:[2,2]},i(f,[2,4]),i(f,[2,5]),{1:[2,6],6:n,12:21,13:a,14:14,15:p,16:h,17:17,18:18,19:u,22:g},{6:n,9:22,12:11,13:a,14:14,15:p,16:h,17:17,18:18,19:u,22:g},{6:v,7:V,10:23,11:Y},i(_,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:u,22:g}),i(_,[2,18]),i(_,[2,19]),i(_,[2,20]),i(_,[2,21]),i(_,[2,23]),i(_,[2,24]),i(_,[2,26],{19:[1,30]}),{20:[1,31]},{6:v,7:V,10:32,11:Y},{1:[2,7],6:n,12:21,13:a,14:14,15:p,16:h,17:17,18:18,19:u,22:g},i(q,[2,14],{7:J,11:K}),i(w,[2,8]),i(w,[2,9]),i(w,[2,10]),i(_,[2,15]),i(_,[2,16]),i(_,[2,17]),{20:[1,35]},{21:[1,36]},i(q,[2,13],{7:J,11:K}),i(w,[2,11]),i(w,[2,12]),{21:[1,37]},i(_,[2,25]),i(_,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(k,e){if(e.recoverable)this.trace(k);else{var r=new Error(k);throw r.hash=e,r}},"parseError"),parse:c(function(k){var e=this,r=[0],o=[],l=[null],s=[],E=this.table,d="",A=0,Q=0,st=2,Z=1,rt=s.slice.call(arguments,1),y=Object.create(this.lexer),O={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(O.yy[B]=this.yy[B]);y.setInput(k,O.yy),O.yy.lexer=y,O.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var j=y.yylloc;s.push(j);var ot=y.options&&y.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function at(S){r.length=r.length-2*S,l.length=l.length-S,s.length=s.length-S}c(at,"popStack");function tt(){var S;return S=o.pop()||y.lex()||Z,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=e.symbols_[S]||S),S}c(tt,"lex");for(var b,x,N,G,I={},$,L,et,P;;){if(x=r[r.length-1],this.defaultActions[x]?N=this.defaultActions[x]:((b===null||typeof b>"u")&&(b=tt()),N=E[x]&&E[x][b]),typeof N>"u"||!N.length||!N[0]){var H="";P=[];for($ in E[x])this.terminals_[$]&&$>st&&P.push("'"+this.terminals_[$]+"'");y.showPosition?H="Parse error on line "+(A+1)+`: `+y.showPosition()+` Expecting `+P.join(", ")+", got '"+(this.terminals_[b]||b)+"'":H="Parse error on line "+(A+1)+": Unexpected "+(b==Z?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(H,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:j,expected:P})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(N[0]){case 1:r.push(b),l.push(y.yytext),s.push(y.yylloc),r.push(N[1]),b=null,Q=y.yyleng,d=y.yytext,A=y.yylineno,j=y.yylloc;break;case 2:if(L=this.productions_[N[1]][1],I.$=l[l.length-L],I._$={first_line:s[s.length-(L||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(L||1)].first_column,last_column:s[s.length-1].last_column},ot&&(I._$.range=[s[s.length-(L||1)].range[0],s[s.length-1].range[1]]),G=this.performAction.apply(I,[d,Q,A,O.yy,N[1],l,s].concat(rt)),typeof G<"u")return G;L&&(r=r.slice(0,-1*L*2),l=l.slice(0,-1*L),s=s.slice(0,-1*L)),r.push(this.productions_[N[1]][0]),l.push(I.$),s.push(I._$),et=E[r[r.length-2]][r[r.length-1]],r.push(et);break;case 3:return!0}}return!0},"parse")},nt=function(){var k={EOF:1,parseError:c(function(e,r){if(this.yy.parser)this.yy.parser.parseError(e,r);else throw new Error(e)},"parseError"),setInput:c(function(e,r){return this.yy=r||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:c(function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var r=e.match(/(?:\r\n?|\n).*/g);return r?(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:c(function(e){var r=e.length,o=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var s=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:o?(o.length===l.length?this.yylloc.first_column:0)+l[l.length-o.length].length-o[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(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:c(function(e){this.unput(this.match.slice(e))},"less"),pastInput:c(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:c(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:c(function(){var e=this.pastInput(),r=new Array(e.length+1).join("-");return e+this.upcomingInput()+` `+r+"^"},"showPosition"),test_match:c(function(e,r){var o,l,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),l=e[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],o=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var E in s)this[E]=s[E];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,r,o,l;this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),E=0;Er[0].length)){if(r=o,l=E,this.options.backtrack_lexer){if(e=this.test_match(o,s[E]),e!==!1)return e;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(e=this.test_match(r,s[l]),e!==!1?e:!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:c(function(){var e=this.next();return e||this.lex()},"lex"),begin:c(function(e){this.conditionStack.push(e)},"begin"),popState:c(function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:c(function(e){this.begin(e)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(e,r,o,l){switch(o){case 0:return e.getLogger().trace("Found comment",r.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",r.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",r.yytext),"NODE_DEND";case 30:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 35:return e.getLogger().trace("Long description:",r.yytext),20;case 36:return e.getLogger().trace("Long description:",r.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}}};return k}();F.lexer=nt;function R(){this.yy={}}return c(R,"Parser"),R.prototype=F,F.Parser=R,new R}();z.parser=z;var St=z,D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},C,Nt=(C=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=D,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let n=this.nodes.length-1;n>=0;n--)if(this.nodes[n].level0?this.nodes[0]:null}addNode(t,n,a,p){T.info("addNode",t,n,a,p);let h=!1;this.nodes.length===0?(this.baseLevel=t,t=0,h=!0):this.baseLevel!==void 0&&(t=t-this.baseLevel,h=!1);const u=W();let g=u.mindmap?.padding??M.mindmap.padding;switch(p){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:g*=2;break}const f={id:this.count++,nodeId:U(n,u),level:t,descr:U(a,u),type:p,children:[],width:u.mindmap?.maxNodeWidth??M.mindmap.maxNodeWidth,padding:g,isRoot:h},v=this.getParent(t);if(v)v.children.push(f),this.nodes.push(f);else if(h)this.nodes.push(f);else throw new Error(`There can be only one root. No parent could be found for ("${f.descr}")`)}getType(t,n){switch(T.debug("In get type",t,n),t){case"[":return this.nodeType.RECT;case"(":return n===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,n){this.elements[t]=n}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;const n=W(),a=this.nodes[this.nodes.length-1];t.icon&&(a.icon=U(t.icon,n)),t.class&&(a.class=U(t.class,n))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,n){if(t.level===0?t.section=void 0:t.section=n,t.children)for(const[a,p]of t.children.entries()){const h=t.level===0?a:n;this.assignSections(p,h)}}flattenNodes(t,n){const a=["mindmap-node"];t.isRoot===!0?a.push("section-root","section--1"):t.section!==void 0&&a.push(`section-${t.section}`),t.class&&a.push(t.class);const p=a.join(" "),h=c(g=>{switch(g){case D.CIRCLE:return"mindmapCircle";case D.RECT:return"rect";case D.ROUNDED_RECT:return"rounded";case D.CLOUD:return"cloud";case D.BANG:return"bang";case D.HEXAGON:return"hexagon";case D.DEFAULT:return"defaultMindmapNode";case D.NO_BORDER:default:return"rect"}},"getShapeFromType"),u={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,isGroup:!1,shape:h(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:p,cssStyles:[],look:"default",icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(n.push(u),t.children)for(const g of t.children)this.flattenNodes(g,n)}generateEdges(t,n){if(t.children)for(const a of t.children){let p="edge";a.section!==void 0&&(p+=` section-edge-${a.section}`);const h=t.level+1;p+=` edge-depth-${h}`;const u={id:`edge_${t.id}_${a.id}`,start:t.id.toString(),end:a.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:p,depth:t.level,section:a.section};n.push(u),this.generateEdges(a,n)}}getData(){const t=this.getMindmap(),n=W(),a=gt().layout!==void 0,p=n;if(a||(p.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:p};T.debug("getData: mindmapRoot",t,n),this.assignSections(t);const h=[],u=[];this.flattenNodes(t,h),this.generateEdges(t,u),T.debug(`getData: processed ${h.length} nodes and ${u.length} edges`);const g=new Map;for(const f of h)g.set(f.id,{shape:f.shape,width:f.width,height:f.height,padding:f.padding});return{nodes:h,edges:u,config:p,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(g),type:"mindmap",diagramId:"mindmap-"+_t()}}getLogger(){return T}},c(C,"MindmapDB"),C),kt=c(async(i,t,n,a)=>{T.debug(`Rendering mindmap diagram `+i);const p=a.db,h=p.getData(),u=ct(t,h.config.securityLevel);h.type=a.type,h.layoutAlgorithm=lt(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=t,p.getMindmap()&&(h.nodes.forEach(g=>{g.shape==="rounded"?(g.radius=15,g.taper=15,g.stroke="none",g.width=0,g.padding=15):g.shape==="circle"?g.padding=10:g.shape==="rect"&&(g.width=0,g.padding=10)}),await dt(h,u),ht(u,h.config.mindmap?.padding??M.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??M.mindmap.useMaxWidth))},"draw"),Lt={draw:kt},Dt=c(i=>{let t="";for(let n=0;n` .edge { stroke-width: 3; } ${Dt(i)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${i.git0}; } .section-root text { fill: ${i.gitBranchLabel0}; } .section-root span { color: ${i.gitBranchLabel0}; } .section-2 span { color: ${i.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"),xt=Ot,Xt={get db(){return new Nt},renderer:Lt,parser:St,styles:xt};export{Xt as diagram}; //# sourceMappingURL=mindmap-definition-VGOIOE7T-CuWXKj-W.chunk.mjs.map