mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-31 01:47:17 +02:00
113 lines
No EOL
41 KiB
JavaScript
113 lines
No EOL
41 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["86141"],{64085:function(e,t,s){s.d(t,{k:()=>f});var i=s("94193"),r=s("61870"),n=s("13255"),a=s("56430"),o=s("69052"),l=s("31570"),c=s("46390"),h=s("4740"),u=s("40805"),d=s("29183"),g=s("46826"),p=s("42113"),y=(0,d.Z)(function(e){return(0,g.Z)((0,u.Z)(e,1,p.Z,!0))}),b=s("70485"),_=s("98381");class f{constructor(e={}){this._isDirected=!i.Z(e,"directed")||e.directed,this._isMultigraph=!!i.Z(e,"multigraph")&&e.multigraph,this._isCompound=!!i.Z(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.Z(void 0),this._defaultEdgeLabelFn=r.Z(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return!n.Z(e)&&(e=r.Z(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return a.Z(this._nodes)}sources(){var e=this;return o.Z(this.nodes(),function(t){return l.Z(e._in[t])})}sinks(){var e=this;return o.Z(this.nodes(),function(t){return l.Z(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return c.Z(e,function(e){s.length>1?i.setNode(e,t):i.setNode(e)}),this}setNode(e,t){return i.Z(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return i.Z(this._nodes,e)}removeNode(e){var t=this;if(i.Z(this._nodes,e)){var s=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],c.Z(this.children(e),function(e){t.setParent(e)}),delete this._children[e]),c.Z(a.Z(this._in[e]),s),delete this._in[e],delete this._preds[e],c.Z(a.Z(this._out[e]),s),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(h.Z(t))t="\0";else{t+="";for(var s=t;!h.Z(s);s=this.parent(s))if(s===e)throw Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}}children(e){if(h.Z(e)&&(e="\0"),this._isCompound){var t=this._children[e];if(t)return a.Z(t)}else if("\0"===e)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return a.Z(t)}successors(e){var t=this._sucs[e];if(t)return a.Z(t)}neighbors(e){var t=this.predecessors(e);if(t)return y(t,this.successors(e))}isLeaf(e){var t;return 0===(t=this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;c.Z(this._nodes,function(s,i){e(i)&&t.setNode(i,s)}),c.Z(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,s.edge(e))});var i={};return this._isCompound&&c.Z(t.nodes(),function(e){t.setParent(e,function e(r){var n=s.parent(r);return void 0===n||t.hasNode(n)?(i[r]=n,n):n in i?i[n]:e(n)}(e))}),t}setDefaultEdgeLabel(e){return!n.Z(e)&&(e=r.Z(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return b.Z(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return _.Z(e,function(e,r){return i.length>1?s.setEdge(e,r,t):s.setEdge(e,r),r}),this}setEdge(){var e,t,s,r,n=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(e=a.v,t=a.w,s=a.name,2==arguments.length&&(r=arguments[1],n=!0)):(e=a,t=arguments[1],s=arguments[3],arguments.length>2&&(r=arguments[2],n=!0)),e=""+e,t=""+t,!h.Z(s)&&(s=""+s);var o=S(this._isDirected,e,t,s);if(i.Z(this._edgeLabels,o))return n&&(this._edgeLabels[o]=r),this;if(!h.Z(s)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[o]=n?r:this._defaultEdgeLabelFn(e,t,s);var l=function(e,t,s,i){var r=""+t,n=""+s;if(!e&&r>n){var a=r;r=n,n=a}var o={v:r,w:n};return i&&(o.name=i),o}(this._isDirected,e,t,s);return e=l.v,t=l.w,Object.freeze(l),this._edgeObjs[o]=l,x(this._preds[t],e),x(this._sucs[e],t),this._in[t][o]=l,this._out[e][o]=l,this._edgeCount++,this}edge(e,t,s){var i=1==arguments.length?m(this._isDirected,arguments[0]):S(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var r=1==arguments.length?m(this._isDirected,arguments[0]):S(this._isDirected,e,t,s);return i.Z(this._edgeLabels,r)}removeEdge(e,t,s){var i=1==arguments.length?m(this._isDirected,arguments[0]):S(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],L(this._preds[t],e),L(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=b.Z(s);return t?o.Z(i,function(e){return e.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=b.Z(s);return t?o.Z(i,function(e){return e.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}function x(e,t){e[t]?e[t]++:e[t]=1}function L(e,t){!--e[t]&&delete e[t]}function S(e,t,s,i){var r=""+t,n=""+s;if(!e&&r>n){var a=r;r=n,n=a}return r+"\x01"+n+"\x01"+(h.Z(i)?"\0":i)}f.prototype._nodeCount=0,f.prototype._edgeCount=0;function m(e,t){return S(e,t.v,t.w,t.name)}},62145:function(e,t,s){s.d(t,{k:function(){return i.k}});var i=s(64085)},66740:function(e,t,s){s.d(t,{Z:function(){return n}});var i=s(40597),r=s(36404);let n=(e,t)=>i.Z.lang.round(r.Z.parse(e)[t])},2355:function(e,t,s){s.d(t,{diagram:function(){return eo}});var i=s(67157),r=s(57668);s(25653),s(19039);var n=s(84890),a=s(28923),o=s(84128),l=s(66740),c=s(62321),h=s(11141),u=s(62145),d=function(){var e=(0,a.eW)(function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s},"o"),t=[1,7],s=[1,13],i=[1,14],r=[1,15],n=[1,19],o=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,21,28,29,30,31,32,40,44,47],d=[1,23],g=[1,24],p=[8,15,16,21,28,29,30,31,32,40,44,47],y=[8,15,16,21,27,28,29,30,31,32,40,44,47],b=[1,49],_={trace:(0,a.eW)(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,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList: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:49,$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:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"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],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,a.eW)(function(e,t,s,i,r,n,a){var o=n.length-1;switch(r){case 4:i.getLogger().debug("Rule: separator (NL) ");break;case 5:i.getLogger().debug("Rule: separator (Space) ");break;case 6:i.getLogger().debug("Rule: separator (EOF) ");break;case 7:i.getLogger().debug("Rule: hierarchy: ",n[o-1]),i.setHierarchy(n[o-1]);break;case 8:i.getLogger().debug("Stop NL ");break;case 9:i.getLogger().debug("Stop EOF ");break;case 10:i.getLogger().debug("Stop NL2 ");break;case 11:i.getLogger().debug("Stop EOF2 ");break;case 12:i.getLogger().debug("Rule: statement: ",n[o]),"number"==typeof n[o].length?this.$=n[o]:this.$=[n[o]];break;case 13:i.getLogger().debug("Rule: statement #2: ",n[o-1]),this.$=[n[o-1]].concat(n[o]);break;case 14:i.getLogger().debug("Rule: link: ",n[o],e),this.$={edgeTypeStr:n[o],label:""};break;case 15:i.getLogger().debug("Rule: LABEL link: ",n[o-3],n[o-1],n[o]),this.$={edgeTypeStr:n[o],label:n[o-1]};break;case 18:let l=parseInt(n[o]),c=i.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:i.getLogger().debug("Rule: (nodeStatement link node) ",n[o-2],n[o-1],n[o]," typestr: ",n[o-1].edgeTypeStr);let h=i.edgeStrToEdgeData(n[o-1].edgeTypeStr);this.$=[{id:n[o-2].id,label:n[o-2].label,type:n[o-2].type,directions:n[o-2].directions},{id:n[o-2].id+"-"+n[o].id,start:n[o-2].id,end:n[o].id,label:n[o-1].label,type:"edge",directions:n[o].directions,arrowTypeEnd:h,arrowTypeStart:"arrow_open"},{id:n[o].id,label:n[o].label,type:i.typeStr2Type(n[o].typeStr),directions:n[o].directions}];break;case 24:i.getLogger().debug("Rule: nodeStatement (abc88 node size) ",n[o-1],n[o]),this.$={id:n[o-1].id,label:n[o-1].label,type:i.typeStr2Type(n[o-1].typeStr),directions:n[o-1].directions,widthInColumns:parseInt(n[o],10)};break;case 25:i.getLogger().debug("Rule: nodeStatement (node) ",n[o]),this.$={id:n[o].id,label:n[o].label,type:i.typeStr2Type(n[o].typeStr),directions:n[o].directions,widthInColumns:1};break;case 26:i.getLogger().debug("APA123",this?this:"na"),i.getLogger().debug("COLUMNS: ",n[o]),this.$={type:"column-setting",columns:"auto"===n[o]?-1:parseInt(n[o])};break;case 27:i.getLogger().debug("Rule: id-block statement : ",n[o-2],n[o-1]),i.generateId(),this.$={...n[o-2],type:"composite",children:n[o-1]};break;case 28:i.getLogger().debug("Rule: blockStatement : ",n[o-2],n[o-1],n[o]);let u=i.generateId();this.$={id:u,type:"composite",label:"",children:n[o-1]};break;case 29:i.getLogger().debug("Rule: node (NODE_ID separator): ",n[o]),this.$={id:n[o]};break;case 30:i.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",n[o-1],n[o]),this.$={id:n[o-1],label:n[o].label,typeStr:n[o].typeStr,directions:n[o].directions};break;case 31:i.getLogger().debug("Rule: dirList: ",n[o]),this.$=[n[o]];break;case 32:i.getLogger().debug("Rule: dirList: ",n[o-1],n[o]),this.$=[n[o-1]].concat(n[o]);break;case 33:i.getLogger().debug("Rule: nodeShapeNLabel: ",n[o-2],n[o-1],n[o]),this.$={typeStr:n[o-2]+n[o],label:n[o-1]};break;case 34:i.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",n[o-3],n[o-2]," #3:",n[o-1],n[o]),this.$={typeStr:n[o-3]+n[o],label:n[o-2],directions:n[o-1]};break;case 35:case 36:this.$={type:"classDef",id:n[o-1].trim(),css:n[o].trim()};break;case 37:this.$={type:"applyClass",id:n[o-1].trim(),styleClass:n[o].trim()};break;case 38:this.$={type:"applyStyles",id:n[o-1].trim(),stylesStr:n[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:r,32:n,40:o,44:l,47:c},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:s,29:i,31:r,32:n,40:o,44:l,47:c}),e(u,[2,16],{14:22,15:d,16:g}),e(u,[2,17]),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,22]),e(p,[2,25],{27:[1,25]}),e(u,[2,26]),{19:26,26:12,32:n},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:r,32:n,40:o,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(y,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,32:n},{32:[2,14]},{17:[1,36]},e(p,[2,24]),{11:37,13:4,14:22,15:d,16:g,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:r,32:n,40:o,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(p,[2,23]),{18:[1,45]},{30:[1,46]},e(u,[2,28]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{37:[1,47]},{34:48,35:b},{15:[1,50]},e(u,[2,27]),e(y,[2,33]),{39:[1,51]},{34:52,35:b,39:[2,31]},{32:[2,15]},e(y,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,a.eW)(function(e,t){if(t.recoverable)this.trace(e);else{var s=Error(e);throw s.hash=t,s}},"parseError"),parse:(0,a.eW)(function(e){var t=this,s=[0],i=[],r=[null],n=[],o=this.table,l="",c=0,h=0,u=0,d=n.slice.call(arguments,1),g=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);g.setInput(e,p.yy),p.yy.lexer=g,p.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var b=g.yylloc;n.push(b);var _=g.options&&g.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(){var e;return"number"!=typeof(e=i.pop()||g.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}(0,a.eW)(function(e){s.length=s.length-2*e,r.length=r.length-e,n.length=n.length-e},"popStack"),(0,a.eW)(f,"lex");for(var x,L,S,m,k,E,w,D,N,v={};;){if(S=s[s.length-1],this.defaultActions[S]?m=this.defaultActions[S]:(null==x&&(x=f()),m=o[S]&&o[S][x]),void 0===m||!m.length||!m[0]){var C="";for(E in N=[],o[S])this.terminals_[E]&&E>2&&N.push("'"+this.terminals_[E]+"'");C=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+N.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(C,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:b,expected:N})}if(m[0]instanceof Array&&m.length>1)throw Error("Parse Error: multiple actions possible at state: "+S+", token: "+x);switch(m[0]){case 1:s.push(x),r.push(g.yytext),n.push(g.yylloc),s.push(m[1]),x=null,L?(x=L,L=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,b=g.yylloc,u>0&&u--);break;case 2:if(w=this.productions_[m[1]][1],v.$=r[r.length-w],v._$={first_line:n[n.length-(w||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(w||1)].first_column,last_column:n[n.length-1].last_column},_&&(v._$.range=[n[n.length-(w||1)].range[0],n[n.length-1].range[1]]),void 0!==(k=this.performAction.apply(v,[l,h,c,p.yy,m[1],r,n].concat(d))))return k;w&&(s=s.slice(0,-1*w*2),r=r.slice(0,-1*w),n=n.slice(0,-1*w)),s.push(this.productions_[m[1]][0]),r.push(v.$),n.push(v._$),D=o[s[s.length-2]][s[s.length-1]],s.push(D);break;case 3:return!0}}return!0},"parse")},f={EOF:1,parseError:(0,a.eW)(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},"parseError"),setInput:(0,a.eW)(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,a.eW)(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,a.eW)(function(e){var t=e.length,s=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),s.length-1&&(this.yylineno-=s.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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.eW)(function(){return this._more=!0,this},"more"),reject:(0,a.eW)(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.eW)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,a.eW)(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,a.eW)(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,a.eW)(function(){var e=this.pastInput(),t=Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,a.eW)(function(e,t){var s,i,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))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(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,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],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var n in r)this[n]=r[n];return!1},"test_match"),next:(0,a.eW)(function(){if(this.done)return this.EOF;!this._input&&(this.done=!0),!this._more&&(this.yytext="",this.match="");for(var e,t,s,i,r=this._currentRules(),n=0;n<r.length;n++)if((s=this._input.match(this.rules[r[n]]))&&(!t||s[0].length>t[0].length)){if(t=s,i=n,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,r[n])))return e;if(!this._backtrack)return!1;else{t=!1;continue}}if(!this.options.flex)break}if(t)return!1!==(e=this.test_match(t,r[i]))&&e;return""===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.eW)(function(){var e=this.next();return e?e:this.lex()},"lex"),begin:(0,a.eW)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,a.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.eW)(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.eW)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,a.eW)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,a.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,a.eW)(function(e,t,s,i){switch(s){case 0:return 10;case 1:return e.getLogger().debug("Found space-block"),31;case 2:return e.getLogger().debug("Found nl-block"),31;case 3:return e.getLogger().debug("Found space-block"),29;case 4:e.getLogger().debug(".",t.yytext);break;case 5:e.getLogger().debug("_",t.yytext);break;case 6:return 5;case 7:return t.yytext=-1,28;case 8:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.yytext),28;case 9:case 77:case 78:case 100:this.pushState("md_string");break;case 10:return"MD_STR";case 11:case 35:case 80:this.popState();break;case 12:this.pushState("string");break;case 13:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 14:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 15:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 16:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:case 41:case 42:case 45:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 44: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:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 49: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 this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:case 60:case 61:case 62:case 65:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 63:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),38;case 75:return e.getLogger().debug("Lex: NODE_ID",t.yytext),32;case 76:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 79:return"NODE_DESCR";case 81:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 84:e.getLogger().debug("LEX POPPING"),this.popState();break;case 85:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 91:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 92:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 94:case 95:case 96:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 97:case 98:case 99:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 101:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 103:case 104:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 105:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\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:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};function x(){this.yy={}}return _.lexer=f,(0,a.eW)(x,"Parser"),x.prototype=_,_.Parser=x,new x}();d.parser=d;var g=new Map,p=[],y=new Map,b="color",_="fill",f=(0,a.nV)(),x=new Map,L=(0,a.eW)(e=>a.SY.sanitizeText(e,f),"sanitizeText"),S=(0,a.eW)(function(e,t=""){let s=x.get(e);!s&&(s={id:e,styles:[],textStyles:[]},x.set(e,s)),null!=t&&t.split(",").forEach(e=>{let t=e.replace(/([^;]*);/,"$1").trim();if(RegExp(b).exec(e)){let e=t.replace(_,"bgFill").replace(b,_);s.textStyles.push(e)}s.styles.push(t)})},"addStyleClass"),m=(0,a.eW)(function(e,t=""){let s=g.get(e);null!=t&&(s.styles=t.split(","))},"addStyle2Node"),k=(0,a.eW)(function(e,t){e.split(",").forEach(function(e){let s=g.get(e);if(void 0===s){let t=e.trim();s={id:t,type:"na",children:[]},g.set(t,s)}!s.classes&&(s.classes=[]),s.classes.push(t)})},"setCssClass"),E=(0,a.eW)((e,t)=>{let s=e.flat(),i=[];for(let e of s){if(e.label&&(e.label=L(e.label)),"classDef"===e.type){S(e.id,e.css);continue}if("applyClass"===e.type){k(e.id,e?.styleClass??"");continue}if("applyStyles"===e.type){e?.stylesStr&&m(e.id,e?.stylesStr);continue}if("column-setting"===e.type)t.columns=e.columns??-1;else if("edge"===e.type){let t=(y.get(e.id)??0)+1;y.set(e.id,t),e.id=t+"-"+e.id,p.push(e)}else{!e.label&&("composite"===e.type?e.label="":e.label=e.id);let t=g.get(e.id);if(void 0===t?g.set(e.id,e):("na"!==e.type&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&E(e.children,e),"space"===e.type){let t=e.width??1;for(let s=0;s<t;s++){let t=(0,o.Z)(e);t.id=t.id+"-"+s,g.set(t.id,t),i.push(t)}}else void 0===t&&i.push(e)}}t.children=i},"populateBlockDatabase"),w=[],D={id:"root",type:"composite",children:[],columns:-1},N=(0,a.eW)(()=>{a.cM.debug("Clear called"),(0,a.ZH)(),g=new Map([["root",D={id:"root",type:"composite",children:[],columns:-1}]]),w=[],x=new Map,p=[],y=new Map},"clear");function v(e){switch(a.cM.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return a.cM.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 C(e){if(a.cM.debug("typeStr2Type",e),"=="===e)return"thick";return"normal"}function $(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}(0,a.eW)(v,"typeStr2Type"),(0,a.eW)(C,"edgeTypeStr2Type"),(0,a.eW)($,"edgeStrToEdgeData");var I=0,T=(0,a.eW)(()=>(I++,"id-"+Math.random().toString(36).substr(2,12)+"-"+I),"generateId"),z=(0,a.eW)(e=>{D.children=e,E(e,D),w=D.children},"setHierarchy"),O=(0,a.eW)(e=>{let t=g.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),A=(0,a.eW)(()=>[...g.values()],"getBlocksFlat"),W=(0,a.eW)(()=>w||[],"getBlocks"),R=(0,a.eW)(()=>p,"getEdges"),B=(0,a.eW)(e=>g.get(e),"getBlock"),M=(0,a.eW)(e=>{g.set(e.id,e)},"setBlock"),Z=(0,a.eW)(()=>console,"getLogger"),P=(0,a.eW)(function(){return x},"getClasses"),F={getConfig:(0,a.eW)(()=>(0,a.iE)().block,"getConfig"),typeStr2Type:v,edgeTypeStr2Type:C,edgeStrToEdgeData:$,getLogger:Z,getBlocksFlat:A,getBlocks:W,getEdges:R,setHierarchy:z,getBlock:B,setBlock:M,getColumns:O,getClasses:P,clear:N,generateId:T},Y=(0,a.eW)((e,t)=>{let s=l.Z,i=s(e,"r"),r=s(e,"g"),n=s(e,"b");return c.Z(i,r,n,t)},"fade"),K=(0,a.eW)(e=>`.label {
|
|
font-family: ${e.fontFamily};
|
|
color: ${e.nodeTextColor||e.textColor};
|
|
}
|
|
.cluster-label text {
|
|
fill: ${e.titleColor};
|
|
}
|
|
.cluster-label span,p {
|
|
color: ${e.titleColor};
|
|
}
|
|
|
|
|
|
|
|
.label text,span,p {
|
|
fill: ${e.nodeTextColor||e.textColor};
|
|
color: ${e.nodeTextColor||e.textColor};
|
|
}
|
|
|
|
.node rect,
|
|
.node circle,
|
|
.node ellipse,
|
|
.node polygon,
|
|
.node path {
|
|
fill: ${e.mainBkg};
|
|
stroke: ${e.nodeBorder};
|
|
stroke-width: 1px;
|
|
}
|
|
.flowchart-label text {
|
|
text-anchor: middle;
|
|
}
|
|
// .flowchart-label .text-outer-tspan {
|
|
// text-anchor: middle;
|
|
// }
|
|
// .flowchart-label .text-inner-tspan {
|
|
// text-anchor: start;
|
|
// }
|
|
|
|
.node .label {
|
|
text-align: center;
|
|
}
|
|
.node.clickable {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.arrowheadPath {
|
|
fill: ${e.arrowheadColor};
|
|
}
|
|
|
|
.edgePath .path {
|
|
stroke: ${e.lineColor};
|
|
stroke-width: 2.0px;
|
|
}
|
|
|
|
.flowchart-link {
|
|
stroke: ${e.lineColor};
|
|
fill: none;
|
|
}
|
|
|
|
.edgeLabel {
|
|
background-color: ${e.edgeLabelBackground};
|
|
rect {
|
|
opacity: 0.5;
|
|
background-color: ${e.edgeLabelBackground};
|
|
fill: ${e.edgeLabelBackground};
|
|
}
|
|
text-align: center;
|
|
}
|
|
|
|
/* For html labels only */
|
|
.labelBkg {
|
|
background-color: ${Y(e.edgeLabelBackground,.5)};
|
|
// background-color:
|
|
}
|
|
|
|
.node .cluster {
|
|
// fill: ${Y(e.mainBkg,.5)};
|
|
fill: ${Y(e.clusterBkg,.5)};
|
|
stroke: ${Y(e.clusterBorder,.2)};
|
|
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
stroke-width: 1px;
|
|
}
|
|
|
|
.cluster text {
|
|
fill: ${e.titleColor};
|
|
}
|
|
|
|
.cluster span,p {
|
|
color: ${e.titleColor};
|
|
}
|
|
/* .cluster div {
|
|
color: ${e.titleColor};
|
|
} */
|
|
|
|
div.mermaidTooltip {
|
|
position: absolute;
|
|
text-align: center;
|
|
max-width: 200px;
|
|
padding: 2px;
|
|
font-family: ${e.fontFamily};
|
|
font-size: 12px;
|
|
background: ${e.tertiaryColor};
|
|
border: 1px solid ${e.border2};
|
|
border-radius: 2px;
|
|
pointer-events: none;
|
|
z-index: 100;
|
|
}
|
|
|
|
.flowchartTitleText {
|
|
text-anchor: middle;
|
|
font-size: 18px;
|
|
fill: ${e.textColor};
|
|
}
|
|
`,"getStyles"),j=a.nV()?.block?.padding??8;function X(e,t){if(0===e||!Number.isInteger(e))throw Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(1===e)return{px:0,py:t};let s=Math.floor(t/e);return{px:t%e,py:s}}(0,a.eW)(X,"calculateBlockPosition");var U=(0,a.eW)(e=>{let t=0,s=0;for(let i of e.children){let{width:r,height:n,x:o,y:l}=i.size??{width:0,height:0,x:0,y:0};if(a.cM.debug("getMaxChildSize abc95 child:",i.id,"width:",r,"height:",n,"x:",o,"y:",l,i.type),"space"!==i.type)r>t&&(t=r/(e.widthInColumns??1)),n>s&&(s=n)}return{width:t,height:s}},"getMaxChildSize");function H(e,t,s=0,i=0){a.cM.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"sieblingWidth",s),!e?.size?.width&&(e.size={width:s,height:i,x:0,y:0});let r=0,n=0;if(e.children?.length>0){for(let s of e.children)H(s,t);let o=U(e);for(let t of(r=o.width,n=o.height,a.cM.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",r,n),e.children))t.size&&(a.cM.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${r} ${n} ${JSON.stringify(t.size)}`),t.size.width=r*(t.widthInColumns??1)+j*((t.widthInColumns??1)-1),t.size.height=n,t.size.x=0,t.size.y=0,a.cM.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${r} maxHeight:${n}`));for(let s of e.children)H(s,t,r,n);let l=e.columns??-1,c=0;for(let t of e.children)c+=t.widthInColumns??1;let h=e.children.length;l>0&&l<c&&(h=l);let u=Math.ceil(c/h),d=h*(r+j)+j,g=u*(n+j)+j;if(d<s){a.cM.debug(`Detected to small siebling: abc95 ${e.id} sieblingWidth ${s} sieblingHeight ${i} width ${d}`),d=s,g=i;let t=(s-h*j-j)/h,o=(i-u*j-j)/u;for(let s of(a.cM.debug("Size indata abc88",e.id,"childWidth",t,"maxWidth",r),a.cM.debug("Size indata abc88",e.id,"childHeight",o,"maxHeight",n),a.cM.debug("Size indata abc88 xSize",h,"padding",j),e.children))s.size&&(s.size.width=t,s.size.height=o,s.size.x=0,s.size.y=0)}if(a.cM.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;let t=l>0?Math.min(e.children.length,l):e.children.length;if(t>0){let s=(d-t*j-j)/t;for(let t of(a.cM.debug("abc95 (growing to fit) width",e.id,d,e.size?.width,s),e.children))t.size&&(t.size.width=s)}}e.size={width:d,height:g,x:0,y:0}}a.cM.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function G(e,t){a.cM.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let s=e.columns??-1;if(a.cM.debug("layoutBlocks columns abc95",e.id,"=>",s,e),e.children&&e.children.length>0){let i=e?.children[0]?.size?.width??0,r=e.children.length*i+(e.children.length-1)*j;a.cM.debug("widthOfChildren 88",r,"posX");let n=0;a.cM.debug("abc91 block?.size?.x",e.id,e?.size?.x);let o=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-j,l=0;for(let i of e.children){if(!i.size)continue;let{width:r,height:c}=i.size,{px:h,py:u}=X(s,n);if(u!=l&&(l=u,o=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-j,a.cM.debug("New row in layout for block",e.id," and child ",i.id,l)),a.cM.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${n} (px, py) ${h},${u} (${e?.size?.x},${e?.size?.y}) parent: ${e.id} width: ${r}${j}`),e.size){let t=r/2;i.size.x=o+j+t,a.cM.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${o} new startingPosX${i.size.x} ${t} padding=${j} width=${r} halfWidth=${t} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${r*(i?.widthInColumns??1)/2}`),o=i.size.x+t,i.size.y=e.size.y-e.size.height/2+u*(c+j)+c/2+j,a.cM.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${o}${j}${t}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${r*(i?.widthInColumns??1)/2}`)}i.children&&G(i,t),n+=i?.widthInColumns??1,a.cM.debug("abc88 columnsPos",i,n)}}a.cM.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function q(e,{minX:t,minY:s,maxX:i,maxY:r}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&"root"!==e.id){let{x:n,y:a,width:o,height:l}=e.size;n-o/2<t&&(t=n-o/2),a-l/2<s&&(s=a-l/2),n+o/2>i&&(i=n+o/2),a+l/2>r&&(r=a+l/2)}if(e.children)for(let n of e.children)({minX:t,minY:s,maxX:i,maxY:r}=q(n,{minX:t,minY:s,maxX:i,maxY:r}));return{minX:t,minY:s,maxX:i,maxY:r}}function J(e){let t=e.getBlock("root");if(!t)return;H(t,e,0,0),G(t,e),a.cM.debug("getBlocks",JSON.stringify(t,null,2));let{minX:s,minY:i,maxX:r,maxY:n}=q(t);return{x:s,y:i,width:r-s,height:n-i}}function Q(e,t,s=!1){let i;let r="default";(e?.classes?.length||0)>0&&(r=(e?.classes??[]).join(" ")),r+=" flowchart-label";let o=0,l="";switch(e.type){case"round":o=5,l="rect";break;case"composite":o=0,l="composite",i=0;break;case"square":case"group":default:l="rect";break;case"diamond":l="question";break;case"hexagon":l="hexagon";break;case"block_arrow":l="block_arrow";break;case"odd":case"rect_left_inv_arrow":l="rect_left_inv_arrow";break;case"lean_right":l="lean_right";break;case"lean_left":l="lean_left";break;case"trapezoid":l="trapezoid";break;case"inv_trapezoid":l="inv_trapezoid";break;case"circle":l="circle";break;case"ellipse":l="ellipse";break;case"stadium":l="stadium";break;case"subroutine":l="subroutine";break;case"cylinder":l="cylinder";break;case"doublecircle":l="doublecircle"}let c=(0,n.be)(e?.styles??[]),h=e.label,u=e.size??{width:0,height:0,x:0,y:0};return{labelStyle:c.labelStyle,shape:l,labelText:h,rx:o,ry:o,class:r,style:c.style,id:e.id,directions:e.directions,width:u.width,height:u.height,x:u.x,y:u.y,positioned:s,intersect:void 0,type:e.type,padding:i??a.iE()?.block?.padding??0}}async function V(e,t,s){let i=Q(t,s,!1);if("group"===i.type)return;let n=await (0,r.Lf)(e,i),a=n.node().getBBox(),o=s.getBlock(i.id);o.size={width:a.width,height:a.height,x:0,y:0,node:n},s.setBlock(o),n.remove()}async function ee(e,t,s){let i=Q(t,s,!0);"space"!==s.getBlock(i.id).type&&(await (0,r.Lf)(e,i),t.intersect=i?.intersect,(0,r.aH)(i))}async function et(e,t,s,i){for(let r of t)await i(e,r,s),r.children&&await et(e,r.children,s,i)}async function es(e,t,s){await et(e,t,s,V)}async function ei(e,t,s){await et(e,t,s,ee)}async function er(e,t,s,r,n){let a=new u.k({multigraph:!0,compound:!0});for(let e of(a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8}),s))e.size&&a.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let s of t)if(s.start&&s.end){let t=r.getBlock(s.start),o=r.getBlock(s.end);if(t?.size&&o?.size){let r=t.size,l=o.size,c=[{x:r.x,y:r.y},{x:r.x+(l.x-r.x)/2,y:r.y+(l.y-r.y)/2},{x:l.x,y:l.y}];(0,i.QP)(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:c,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,n),s.label&&(await (0,i.I_)(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:c,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),(0,i.Jj)({...s,x:c[1].x,y:c[1].y},{originalPath:c}))}}}(0,a.eW)(H,"setBlockSizes"),(0,a.eW)(G,"layoutBlocks"),(0,a.eW)(q,"findBounds"),(0,a.eW)(J,"layout"),(0,a.eW)(Q,"getNodeFromBlock"),(0,a.eW)(V,"calculateBlockSize"),(0,a.eW)(ee,"insertBlockPositioned"),(0,a.eW)(et,"performOperations"),(0,a.eW)(es,"calculateBlockSizes"),(0,a.eW)(ei,"insertBlocks"),(0,a.eW)(er,"insertEdges");var en=(0,a.eW)(function(e,t){return t.db.getClasses()},"getClasses"),ea=(0,a.eW)(async function(e,t,s,r){let n;let{securityLevel:o,block:l}=(0,a.iE)(),c=r.db;"sandbox"===o&&(n=(0,h.Ys)("#i"+t));let u="sandbox"===o?(0,h.Ys)(n.nodes()[0].contentDocument.body):(0,h.Ys)("body"),d="sandbox"===o?u.select(`[id="${t}"]`):(0,h.Ys)(`[id="${t}"]`);(0,i.DQ)(d,["point","circle","cross"],r.type,t);let g=c.getBlocks(),p=c.getBlocksFlat(),y=c.getEdges(),b=d.insert("g").attr("class","block");await es(b,g,c);let _=J(c);if(await ei(b,g,c),await er(b,y,p,c,t),_){let e=Math.max(1,Math.round(.125*(_.width/_.height))),t=_.height+e+10,s=_.width+10,{useMaxWidth:i}=l;(0,a.v2)(d,t,s,!!i),a.cM.debug("Here Bounds",_,_),d.attr("viewBox",`${_.x-5} ${_.y-5} ${_.width+10} ${_.height+10}`)}},"draw"),eo={parser:d,db:F,renderer:{draw:ea,getClasses:en},styles:K}}}]); |