Files
Thesis/share/jupyter/lab/static/1042.37576ba0f95d869bc96f.js

1 line
23 KiB
JavaScript

"use strict";(self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[1042],{46884:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(70416);var s=n(1218);var r=(0,i.K2)(((e,t)=>{let n;if(t==="sandbox"){n=(0,s.Ltv)("#i"+e)}const i=t==="sandbox"?(0,s.Ltv)(n.nodes()[0].contentDocument.body):(0,s.Ltv)("body");const r=i.select(`[id="${e}"]`);return r}),"getDiagramElement")},47925:(e,t,n)=>{n.d(t,{P:()=>r});var i=n(42418);var s=n(70416);var r=(0,s.K2)(((e,t,n,r)=>{e.attr("class",n);const{width:c,height:l,x:h,y:d}=o(e,t);(0,i.a$)(e,l,c,r);const u=a(h,d,c,l,t);e.attr("viewBox",u);s.Rm.debug(`viewBox configured: ${u} with padding: ${t}`)}),"setupViewPortForSVG");var o=(0,s.K2)(((e,t)=>{const n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}}),"calculateDimensionsWithPadding");var a=(0,s.K2)(((e,t,n,i,s)=>`${e-s} ${t-s} ${n} ${i}`),"createViewBox")},41042:(e,t,n)=>{n.d(t,{diagram:()=>P});var i=n(46884);var s=n(47925);var r=n(78188);var o=n(25301);var a=n(46103);var c=n(47655);var l=n(15164);var h=n(55750);var d=n(95035);var u=n(29131);var g=n(42418);var p=n(70416);const y=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const f={randomUUID:y};let m;const b=new Uint8Array(16);function E(){if(!m){if(typeof crypto==="undefined"||!crypto.getRandomValues){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}m=crypto.getRandomValues.bind(crypto)}return m(b)}const _=[];for(let B=0;B<256;++B){_.push((B+256).toString(16).slice(1))}function k(e,t=0){return(_[e[t+0]]+_[e[t+1]]+_[e[t+2]]+_[e[t+3]]+"-"+_[e[t+4]]+_[e[t+5]]+"-"+_[e[t+6]]+_[e[t+7]]+"-"+_[e[t+8]]+_[e[t+9]]+"-"+_[e[t+10]]+_[e[t+11]]+_[e[t+12]]+_[e[t+13]]+_[e[t+14]]+_[e[t+15]]).toLowerCase()}function v(e,t=0){const n=k(e,t);if(!validate(n)){throw TypeError("Stringified UUID is invalid")}return n}const D=null&&v;function S(e,t,n){if(f.randomUUID&&!t&&!e){return f.randomUUID()}e=e||{};const i=e.random??e.rng?.()??E();if(i.length<16){throw new Error("Random bytes length must be >= 16")}i[6]=i[6]&15|64;i[8]=i[8]&63|128;if(t){n=n||0;if(n<0||n+16>t.length){throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`)}for(let e=0;e<16;++e){t[n+e]=i[e]}return t}return k(i)}const N=S;var L=n(63170);var x=n(77470);var I=n(48750);var O=function(){var e=(0,p.K2)((function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n}),"o"),t=[1,4],n=[1,13],i=[1,12],s=[1,15],r=[1,16],o=[1,20],a=[1,19],c=[6,7,8],l=[1,26],h=[1,24],d=[1,25],u=[6,7,11],g=[1,6,13,15,16,19,22],y=[1,33],f=[1,34],m=[1,6,7,11,13,15,16,19,22];var b={trace:(0,p.K2)((function e(){}),"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,p.K2)((function e(t,n,i,s,r,o,a){var c=o.length-1;switch(r){case 6:case 7:return s;break;case 8:s.getLogger().trace("Stop NL ");break;case 9:s.getLogger().trace("Stop EOF ");break;case 11:s.getLogger().trace("Stop NL2 ");break;case 12:s.getLogger().trace("Stop EOF2 ");break;case 15:s.getLogger().info("Node: ",o[c].id);s.addNode(o[c-1].length,o[c].id,o[c].descr,o[c].type);break;case 16:s.getLogger().trace("Icon: ",o[c]);s.decorateNode({icon:o[c]});break;case 17:case 21:s.decorateNode({class:o[c]});break;case 18:s.getLogger().trace("SPACELIST");break;case 19:s.getLogger().trace("Node: ",o[c].id);s.addNode(0,o[c].id,o[c].descr,o[c].type);break;case 20:s.decorateNode({icon:o[c]});break;case 25:s.getLogger().trace("node found ..",o[c-2]);this.$={id:o[c-1],descr:o[c-1],type:s.getType(o[c-2],o[c])};break;case 26:this.$={id:o[c],descr:o[c],type:s.nodeType.DEFAULT};break;case 27:s.getLogger().trace("node found ..",o[c-3]);this.$={id:o[c-3],descr:o[c-1],type:s.getType(o[c-2],o[c])};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:i,14:14,15:s,16:r,17:17,18:18,19:o,22:a},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:s,16:r,17:17,18:18,19:o,22:a},{6:n,9:22,12:11,13:i,14:14,15:s,16:r,17:17,18:18,19:o,22:a},{6:l,7:h,10:23,11:d},e(u,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:a}),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,23]),e(u,[2,24]),e(u,[2,26],{19:[1,30]}),{20:[1,31]},{6:l,7:h,10:32,11:d},{1:[2,7],6:n,12:21,13:i,14:14,15:s,16:r,17:17,18:18,19:o,22:a},e(g,[2,14],{7:y,11:f}),e(m,[2,8]),e(m,[2,9]),e(m,[2,10]),e(u,[2,15]),e(u,[2,16]),e(u,[2,17]),{20:[1,35]},{21:[1,36]},e(g,[2,13],{7:y,11:f}),e(m,[2,11]),e(m,[2,12]),{21:[1,37]},e(u,[2,25]),e(u,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,p.K2)((function e(t,n){if(n.recoverable){this.trace(t)}else{var i=new Error(t);i.hash=n;throw i}}),"parseError"),parse:(0,p.K2)((function e(t){var n=this,i=[0],s=[],r=[null],o=[],a=this.table,c="",l=0,h=0,d=0,u=2,g=1;var y=o.slice.call(arguments,1);var f=Object.create(this.lexer);var m={yy:{}};for(var b in this.yy){if(Object.prototype.hasOwnProperty.call(this.yy,b)){m.yy[b]=this.yy[b]}}f.setInput(t,m.yy);m.yy.lexer=f;m.yy.parser=this;if(typeof f.yylloc=="undefined"){f.yylloc={}}var E=f.yylloc;o.push(E);var _=f.options&&f.options.ranges;if(typeof m.yy.parseError==="function"){this.parseError=m.yy.parseError}else{this.parseError=Object.getPrototypeOf(this).parseError}function k(e){i.length=i.length-2*e;r.length=r.length-e;o.length=o.length-e}(0,p.K2)(k,"popStack");function v(){var e;e=s.pop()||f.lex()||g;if(typeof e!=="number"){if(e instanceof Array){s=e;e=s.pop()}e=n.symbols_[e]||e}return e}(0,p.K2)(v,"lex");var D,S,N,L,x,I,O={},T,w,C,R;while(true){N=i[i.length-1];if(this.defaultActions[N]){L=this.defaultActions[N]}else{if(D===null||typeof D=="undefined"){D=v()}L=a[N]&&a[N][D]}if(typeof L==="undefined"||!L.length||!L[0]){var $="";R=[];for(T in a[N]){if(this.terminals_[T]&&T>u){R.push("'"+this.terminals_[T]+"'")}}if(f.showPosition){$="Parse error on line "+(l+1)+":\n"+f.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[D]||D)+"'"}else{$="Parse error on line "+(l+1)+": Unexpected "+(D==g?"end of input":"'"+(this.terminals_[D]||D)+"'")}this.parseError($,{text:f.match,token:this.terminals_[D]||D,line:f.yylineno,loc:E,expected:R})}if(L[0]instanceof Array&&L.length>1){throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+D)}switch(L[0]){case 1:i.push(D);r.push(f.yytext);o.push(f.yylloc);i.push(L[1]);D=null;if(!S){h=f.yyleng;c=f.yytext;l=f.yylineno;E=f.yylloc;if(d>0){d--}}else{D=S;S=null}break;case 2:w=this.productions_[L[1]][1];O.$=r[r.length-w];O._$={first_line:o[o.length-(w||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(w||1)].first_column,last_column:o[o.length-1].last_column};if(_){O._$.range=[o[o.length-(w||1)].range[0],o[o.length-1].range[1]]}I=this.performAction.apply(O,[c,h,l,m.yy,L[1],r,o].concat(y));if(typeof I!=="undefined"){return I}if(w){i=i.slice(0,-1*w*2);r=r.slice(0,-1*w);o=o.slice(0,-1*w)}i.push(this.productions_[L[1]][0]);r.push(O.$);o.push(O._$);C=a[i[i.length-2]][i[i.length-1]];i.push(C);break;case 3:return true}}return true}),"parse")};var E=function(){var e={EOF:1,parseError:(0,p.K2)((function e(t,n){if(this.yy.parser){this.yy.parser.parseError(t,n)}else{throw new Error(t)}}),"parseError"),setInput:(0,p.K2)((function(e,t){this.yy=t||this.yy||{};this._input=e;this._more=this._backtrack=this.done=false;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};if(this.options.ranges){this.yylloc.range=[0,0]}this.offset=0;return this}),"setInput"),input:(0,p.K2)((function(){var e=this._input[0];this.yytext+=e;this.yyleng++;this.offset++;this.match+=e;this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);if(t){this.yylineno++;this.yylloc.last_line++}else{this.yylloc.last_column++}if(this.options.ranges){this.yylloc.range[1]++}this._input=this._input.slice(1);return e}),"input"),unput:(0,p.K2)((function(e){var t=e.length;var 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 i=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);if(n.length-1){this.yylineno-=n.length-1}var s=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t};if(this.options.ranges){this.yylloc.range=[s[0],s[0]+this.yyleng-t]}this.yyleng=this.yytext.length;return this}),"unput"),more:(0,p.K2)((function(){this._more=true;return this}),"more"),reject:(0,p.K2)((function(){if(this.options.backtrack_lexer){this._backtrack=true}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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}return this}),"reject"),less:(0,p.K2)((function(e){this.unput(this.match.slice(e))}),"less"),pastInput:(0,p.K2)((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,p.K2)((function(){var e=this.match;if(e.length<20){e+=this._input.substr(0,20-e.length)}return(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,p.K2)((function(){var e=this.pastInput();var t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"}),"showPosition"),test_match:(0,p.K2)((function(e,t){var n,i,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};if(this.options.ranges){s.yylloc.range=this.yylloc.range.slice(0)}}i=e[0].match(/(?:\r\n?|\n).*/g);if(i){this.yylineno+=i.length}this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]}this._more=false;this._backtrack=false;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]);if(this.done&&this._input){this.done=false}if(n){return n}else if(this._backtrack){for(var r in s){this[r]=s[r]}return false}return false}),"test_match"),next:(0,p.K2)((function(){if(this.done){return this.EOF}if(!this._input){this.done=true}var e,t,n,i;if(!this._more){this.yytext="";this.match=""}var s=this._currentRules();for(var r=0;r<s.length;r++){n=this._input.match(this.rules[s[r]]);if(n&&(!t||n[0].length>t[0].length)){t=n;i=r;if(this.options.backtrack_lexer){e=this.test_match(n,s[r]);if(e!==false){return e}else if(this._backtrack){t=false;continue}else{return false}}else if(!this.options.flex){break}}}if(t){e=this.test_match(t,s[i]);if(e!==false){return e}return false}if(this._input===""){return this.EOF}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}}),"next"),lex:(0,p.K2)((function e(){var t=this.next();if(t){return t}else{return this.lex()}}),"lex"),begin:(0,p.K2)((function e(t){this.conditionStack.push(t)}),"begin"),popState:(0,p.K2)((function e(){var t=this.conditionStack.length-1;if(t>0){return this.conditionStack.pop()}else{return this.conditionStack[0]}}),"popState"),_currentRules:(0,p.K2)((function e(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules}else{return this.conditions["INITIAL"].rules}}),"_currentRules"),topState:(0,p.K2)((function e(t){t=this.conditionStack.length-1-Math.abs(t||0);if(t>=0){return this.conditionStack[t]}else{return"INITIAL"}}),"topState"),pushState:(0,p.K2)((function e(t){this.begin(t)}),"pushState"),stateStackSize:(0,p.K2)((function e(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":true},performAction:(0,p.K2)((function e(t,n,i,s){var r=s;switch(i){case 0:t.getLogger().trace("Found comment",n.yytext);return 6;break;case 1:return 8;break;case 2:this.begin("CLASS");break;case 3:this.popState();return 16;break;case 4:this.popState();break;case 5:t.getLogger().trace("Begin icon");this.begin("ICON");break;case 6:t.getLogger().trace("SPACELINE");return 6;break;case 7:return 7;break;case 8:return 15;break;case 9:t.getLogger().trace("end icon");this.popState();break;case 10:t.getLogger().trace("Exploding node");this.begin("NODE");return 19;break;case 11:t.getLogger().trace("Cloud");this.begin("NODE");return 19;break;case 12:t.getLogger().trace("Explosion Bang");this.begin("NODE");return 19;break;case 13:t.getLogger().trace("Cloud Bang");this.begin("NODE");return 19;break;case 14:this.begin("NODE");return 19;break;case 15:this.begin("NODE");return 19;break;case 16:this.begin("NODE");return 19;break;case 17:this.begin("NODE");return 19;break;case 18:return 13;break;case 19:return 22;break;case 20:return 11;break;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";break;case 23:this.popState();break;case 24:t.getLogger().trace("Starting NSTR");this.begin("NSTR");break;case 25:t.getLogger().trace("description:",n.yytext);return"NODE_DESCR";break;case 26:this.popState();break;case 27:this.popState();t.getLogger().trace("node end ))");return"NODE_DEND";break;case 28:this.popState();t.getLogger().trace("node end )");return"NODE_DEND";break;case 29:this.popState();t.getLogger().trace("node end ...",n.yytext);return"NODE_DEND";break;case 30:this.popState();t.getLogger().trace("node end ((");return"NODE_DEND";break;case 31:this.popState();t.getLogger().trace("node end (-");return"NODE_DEND";break;case 32:this.popState();t.getLogger().trace("node end (-");return"NODE_DEND";break;case 33:this.popState();t.getLogger().trace("node end ((");return"NODE_DEND";break;case 34:this.popState();t.getLogger().trace("node end ((");return"NODE_DEND";break;case 35:t.getLogger().trace("Long description:",n.yytext);return 20;break;case 36:t.getLogger().trace("Long description:",n.yytext);return 20;break}}),"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:false},ICON:{rules:[8,9],inclusive:false},NSTR2:{rules:[22,23],inclusive:false},NSTR:{rules:[25,26],inclusive:false},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:false},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:true}}};return e}();b.lexer=E;function _(){this.yy={}}(0,p.K2)(_,"Parser");_.prototype=b;b.Parser=_;return new _}();O.parser=O;var T=O;var w={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6};var C=class{constructor(){this.nodes=[];this.count=0;this.elements={};this.getLogger=this.getLogger.bind(this);this.nodeType=w;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)}static{(0,p.K2)(this,"MindmapDB")}clear(){this.nodes=[];this.count=0;this.elements={};this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--){if(this.nodes[t].level<e){return this.nodes[t]}}return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,t,n,i){p.Rm.info("addNode",e,t,n,i);let s=false;if(this.nodes.length===0){this.baseLevel=e;e=0;s=true}else if(this.baseLevel!==void 0){e=e-this.baseLevel;s=false}const r=(0,g.D7)();let o=r.mindmap?.padding??g.UI.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:o*=2;break}const a={id:this.count++,nodeId:(0,g.jZ)(t,r),level:e,descr:(0,g.jZ)(n,r),type:i,children:[],width:r.mindmap?.maxNodeWidth??g.UI.mindmap.maxNodeWidth,padding:o,isRoot:s};const c=this.getParent(e);if(c){c.children.push(a);this.nodes.push(a)}else{if(s){this.nodes.push(a)}else{throw new Error(`There can be only one root. No parent could be found for ("${a.descr}")`)}}}getType(e,t){p.Rm.debug("In get type",e,t);switch(e){case"[":return this.nodeType.RECT;case"(":return t===")"?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(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e){return}const t=(0,g.D7)();const n=this.nodes[this.nodes.length-1];if(e.icon){n.icon=(0,g.jZ)(e.icon,t)}if(e.class){n.class=(0,g.jZ)(e.class,t)}}type2Str(e){switch(e){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(e,t){if(e.level===0){e.section=void 0}else{e.section=t}if(e.children){for(const[n,i]of e.children.entries()){const s=e.level===0?n:t;this.assignSections(i,s)}}}flattenNodes(e,t){const n=["mindmap-node"];if(e.isRoot===true){n.push("section-root","section--1")}else if(e.section!==void 0){n.push(`section-${e.section}`)}if(e.class){n.push(e.class)}const i=n.join(" ");const s=(0,p.K2)((e=>{switch(e){case w.CIRCLE:return"mindmapCircle";case w.RECT:return"rect";case w.ROUNDED_RECT:return"rounded";case w.CLOUD:return"cloud";case w.BANG:return"bang";case w.HEXAGON:return"hexagon";case w.DEFAULT:return"defaultMindmapNode";case w.NO_BORDER:default:return"rect"}}),"getShapeFromType");const r={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,isGroup:false,shape:s(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:i,cssStyles:[],look:"default",icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};t.push(r);if(e.children){for(const n of e.children){this.flattenNodes(n,t)}}}generateEdges(e,t){if(!e.children){return}for(const n of e.children){let i="edge";if(n.section!==void 0){i+=` section-edge-${n.section}`}const s=e.level+1;i+=` edge-depth-${s}`;const r={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:i,depth:e.level,section:n.section};t.push(r);this.generateEdges(n,t)}}getData(){const e=this.getMindmap();const t=(0,g.D7)();const n=(0,g.TM)();const i=n.layout!==void 0;const s=t;if(!i){s.layout="cose-bilkent"}if(!e){return{nodes:[],edges:[],config:s}}p.Rm.debug("getData: mindmapRoot",e,t);this.assignSections(e);const r=[];const o=[];this.flattenNodes(e,r);this.generateEdges(e,o);p.Rm.debug(`getData: processed ${r.length} nodes and ${o.length} edges`);const a=new Map;for(const c of r){a.set(c.id,{shape:c.shape,width:c.width,height:c.height,padding:c.padding})}return{nodes:r,edges:o,config:s,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(a),type:"mindmap",diagramId:"mindmap-"+N()}}getLogger(){return p.Rm}};var R=(0,p.K2)((async(e,t,n,o)=>{p.Rm.debug("Rendering mindmap diagram\n"+e);const a=o.db;const c=a.getData();const l=(0,i.A)(t,c.config.securityLevel);c.type=o.type;c.layoutAlgorithm=(0,r.q7)(c.config.layout,{fallback:"cose-bilkent"});c.diagramId=t;const h=a.getMindmap();if(!h){return}c.nodes.forEach((e=>{if(e.shape==="rounded"){e.radius=15;e.taper=15;e.stroke="none";e.width=0;e.padding=15}else if(e.shape==="circle"){e.padding=10}else if(e.shape==="rect"){e.width=0;e.padding=10}}));await(0,r.XX)(c,l);(0,s.P)(l,c.config.mindmap?.padding??g.UI.mindmap.padding,"mindmapDiagram",c.config.mindmap?.useMaxWidth??g.UI.mindmap.useMaxWidth)}),"draw");var $={draw:R};var A=(0,p.K2)((e=>{let t="";for(let n=0;n<e.THEME_COLOR_LIMIT;n++){e["lineColor"+n]=e["lineColor"+n]||e["cScaleInv"+n];if((0,L.A)(e["lineColor"+n])){e["lineColor"+n]=(0,x.A)(e["lineColor"+n],20)}else{e["lineColor"+n]=(0,I.A)(e["lineColor"+n],20)}}for(let n=0;n<e.THEME_COLOR_LIMIT;n++){const i=""+(17-3*n);t+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {\n fill: ${e["cScale"+n]};\n }\n .section-${n-1} text {\n fill: ${e["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${e["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${i};\n }\n .section-${n-1} line {\n stroke: ${e["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return t}),"genSections");var K=(0,p.K2)((e=>`\n .edge {\n stroke-width: 3;\n }\n ${A(e)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${e.git0};\n }\n .section-root text {\n fill: ${e.gitBranchLabel0};\n }\n .section-root span {\n color: ${e.gitBranchLabel0};\n }\n .section-2 span {\n color: ${e.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`),"getStyles");var U=K;var P={get db(){return new C},renderer:$,parser:T,styles:U}}}]);