package.dist.chunks.mermaid.esm.min.blockDiagram-MYUW6R5Q.mjs.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mermaid Show documentation
Show all versions of mermaid Show documentation
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
The newest version!
{
"version": 3,
"sources": ["../../../src/diagrams/block/parser/block.jison", "../../../src/diagrams/block/blockDB.ts", "../../../src/diagrams/block/styles.ts", "../../../src/dagre-wrapper/markers.js", "../../../src/diagrams/block/layout.ts", "../../../src/dagre-wrapper/createLabel.js", "../../../src/dagre-wrapper/edgeMarker.ts", "../../../src/dagre-wrapper/edges.js", "../../../src/dagre-wrapper/blockArrowHelper.ts", "../../../src/dagre-wrapper/intersect/intersect-node.js", "../../../src/dagre-wrapper/intersect/intersect-ellipse.js", "../../../src/dagre-wrapper/intersect/intersect-circle.js", "../../../src/dagre-wrapper/intersect/intersect-line.js", "../../../src/dagre-wrapper/intersect/intersect-polygon.js", "../../../src/dagre-wrapper/intersect/intersect-rect.js", "../../../src/dagre-wrapper/intersect/index.js", "../../../src/dagre-wrapper/shapes/util.js", "../../../src/dagre-wrapper/shapes/note.js", "../../../src/dagre-wrapper/nodes.js", "../../../src/diagrams/block/renderHelpers.ts", "../../../src/diagrams/block/blockRenderer.ts", "../../../src/diagrams/block/blockDiagram.ts"],
"sourcesContent": ["/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,7],$V1=[1,13],$V2=[1,14],$V3=[1,15],$V4=[1,19],$V5=[1,16],$V6=[1,17],$V7=[1,18],$V8=[8,30],$V9=[8,21,28,29,30,31,32,40,44,47],$Va=[1,23],$Vb=[1,24],$Vc=[8,15,16,21,28,29,30,31,32,40,44,47],$Vd=[8,15,16,21,27,28,29,30,31,32,40,44,47],$Ve=[1,49];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"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},\nterminals_: {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\"},\nproductions_: [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]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 4:\nyy.getLogger().debug('Rule: separator (NL) ');\nbreak;\ncase 5:\nyy.getLogger().debug('Rule: separator (Space) ');\nbreak;\ncase 6:\nyy.getLogger().debug('Rule: separator (EOF) ');\nbreak;\ncase 7:\n yy.getLogger().debug(\"Rule: hierarchy: \", $$[$0-1]); yy.setHierarchy($$[$0-1]); \nbreak;\ncase 8:\nyy.getLogger().debug('Stop NL ');\nbreak;\ncase 9:\nyy.getLogger().debug('Stop EOF ');\nbreak;\ncase 10:\nyy.getLogger().debug('Stop NL2 ');\nbreak;\ncase 11:\nyy.getLogger().debug('Stop EOF2 ');\nbreak;\ncase 12:\n yy.getLogger().debug(\"Rule: statement: \", $$[$0]); typeof $$[$0].length === 'number'?this.$ = $$[$0]:this.$ = [$$[$0]]; \nbreak;\ncase 13:\n yy.getLogger().debug(\"Rule: statement #2: \", $$[$0-1]); this.$ = [$$[$0-1]].concat($$[$0]); \nbreak;\ncase 14:\n yy.getLogger().debug(\"Rule: link: \", $$[$0], yytext); this.$={edgeTypeStr: $$[$0], label:''}; \nbreak;\ncase 15:\n yy.getLogger().debug(\"Rule: LABEL link: \", $$[$0-3], $$[$0-1], $$[$0]); this.$={edgeTypeStr: $$[$0], label:$$[$0-1]}; \nbreak;\ncase 18:\n const num=parseInt($$[$0]); const spaceId = yy.generateId(); this.$ = { id: spaceId, type:'space', label:'', width: num, children: [] }\nbreak;\ncase 23:\n\n yy.getLogger().debug('Rule: (nodeStatement link node) ', $$[$0-2], $$[$0-1], $$[$0], ' typestr: ',$$[$0-1].edgeTypeStr);\n const edgeData = yy.edgeStrToEdgeData($$[$0-1].edgeTypeStr)\n this.$ = [\n {id: $$[$0-2].id, label: $$[$0-2].label, type:$$[$0-2].type, directions: $$[$0-2].directions},\n {id: $$[$0-2].id + '-' + $$[$0].id, start: $$[$0-2].id, end: $$[$0].id, label: $$[$0-1].label, type: 'edge', directions: $$[$0].directions, arrowTypeEnd: edgeData, arrowTypeStart: 'arrow_open' },\n {id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions}\n ];\n \nbreak;\ncase 24:\n yy.getLogger().debug('Rule: nodeStatement (abc88 node size) ', $$[$0-1], $$[$0]); this.$ = {id: $$[$0-1].id, label: $$[$0-1].label, type: yy.typeStr2Type($$[$0-1].typeStr), directions: $$[$0-1].directions, widthInColumns: parseInt($$[$0],10)}; \nbreak;\ncase 25:\n yy.getLogger().debug('Rule: nodeStatement (node) ', $$[$0]); this.$ = {id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions, widthInColumns:1}; \nbreak;\ncase 26:\n yy.getLogger().debug('APA123', this? this:'na'); yy.getLogger().debug(\"COLUMNS: \", $$[$0]); this.$ = {type: 'column-setting', columns: $$[$0] === 'auto'?-1:parseInt($$[$0]) } \nbreak;\ncase 27:\n yy.getLogger().debug('Rule: id-block statement : ', $$[$0-2], $$[$0-1]); const id2 = yy.generateId(); this.$ = { ...$$[$0-2], type:'composite', children: $$[$0-1] }; \nbreak;\ncase 28:\n yy.getLogger().debug('Rule: blockStatement : ', $$[$0-2], $$[$0-1], $$[$0]); const id = yy.generateId(); this.$ = { id, type:'composite', label:'', children: $$[$0-1] }; \nbreak;\ncase 29:\n yy.getLogger().debug(\"Rule: node (NODE_ID separator): \", $$[$0]); this.$ = { id: $$[$0] }; \nbreak;\ncase 30:\n\n yy.getLogger().debug(\"Rule: node (NODE_ID nodeShapeNLabel separator): \", $$[$0-1], $$[$0]);\n this.$ = { id: $$[$0-1], label: $$[$0].label, typeStr: $$[$0].typeStr, directions: $$[$0].directions };\n \nbreak;\ncase 31:\n yy.getLogger().debug(\"Rule: dirList: \", $$[$0]); this.$ = [$$[$0]]; \nbreak;\ncase 32:\n yy.getLogger().debug(\"Rule: dirList: \", $$[$0-1], $$[$0]); this.$ = [$$[$0-1]].concat($$[$0]); \nbreak;\ncase 33:\n yy.getLogger().debug(\"Rule: nodeShapeNLabel: \", $$[$0-2], $$[$0-1], $$[$0]); this.$ = { typeStr: $$[$0-2] + $$[$0], label: $$[$0-1] }; \nbreak;\ncase 34:\n yy.getLogger().debug(\"Rule: BLOCK_ARROW nodeShapeNLabel: \", $$[$0-3], $$[$0-2], \" #3:\",$$[$0-1], $$[$0]); this.$ = { typeStr: $$[$0-3] + $$[$0], label: $$[$0-2], directions: $$[$0-1]}; \nbreak;\ncase 35: case 36:\n\n this.$ = { type: 'classDef', id: $$[$0-1].trim(), css: $$[$0].trim() };\n \nbreak;\ncase 37:\n\n //log.debug('apply class: id(s): ',$$[$0-1], ' style class: ', $$[$0]);\n this.$={ type: 'applyClass', id: $$[$0-1].trim(), styleClass: $$[$0].trim() };\n \nbreak;\ncase 38:\n\n this.$={ type: 'applyStyles', id: $$[$0-1].trim(), stylesStr: $$[$0].trim() };\n \nbreak;\n}\n},\ntable: [{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:$V0,22:8,23:9,24:10,25:11,26:12,28:$V1,29:$V2,31:$V3,32:$V4,40:$V5,44:$V6,47:$V7},{8:[1,20]},o($V8,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:$V0,28:$V1,29:$V2,31:$V3,32:$V4,40:$V5,44:$V6,47:$V7}),o($V9,[2,16],{14:22,15:$Va,16:$Vb}),o($V9,[2,17]),o($V9,[2,18]),o($V9,[2,19]),o($V9,[2,20]),o($V9,[2,21]),o($V9,[2,22]),o($Vc,[2,25],{27:[1,25]}),o($V9,[2,26]),{19:26,26:12,32:$V4},{11:27,13:4,19:5,20:6,21:$V0,22:8,23:9,24:10,25:11,26:12,28:$V1,29:$V2,31:$V3,32:$V4,40:$V5,44:$V6,47:$V7},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},o($Vd,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},o($V8,[2,13]),{26:35,32:$V4},{32:[2,14]},{17:[1,36]},o($Vc,[2,24]),{11:37,13:4,14:22,15:$Va,16:$Vb,19:5,20:6,21:$V0,22:8,23:9,24:10,25:11,26:12,28:$V1,29:$V2,31:$V3,32:$V4,40:$V5,44:$V6,47:$V7},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},o($Vd,[2,30]),{18:[1,43]},{18:[1,44]},o($Vc,[2,23]),{18:[1,45]},{30:[1,46]},o($V9,[2,28]),o($V9,[2,35]),o($V9,[2,36]),o($V9,[2,37]),o($V9,[2,38]),{37:[1,47]},{34:48,35:$Ve},{15:[1,50]},o($V9,[2,27]),o($Vd,[2,33]),{39:[1,51]},{34:52,35:$Ve,39:[2,31]},{32:[2,15]},o($Vd,[2,34]),{39:[2,32]}],\ndefaultActions: {20:[2,7],23:[2,14],50:[2,15],52:[2,32]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n 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(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: return 10; \nbreak;\ncase 1: yy.getLogger().debug('Found space-block'); return 31;\nbreak;\ncase 2: yy.getLogger().debug('Found nl-block'); return 31;\nbreak;\ncase 3: yy.getLogger().debug('Found space-block'); return 29;\nbreak;\ncase 4: yy.getLogger().debug('.', yy_.yytext); /* skip all whitespace */ \nbreak;\ncase 5:yy.getLogger().debug('_', yy_.yytext); /* skip all whitespace */ \nbreak;\ncase 6: return 5 \nbreak;\ncase 7: yy_.yytext=-1; return 28; \nbreak;\ncase 8: yy_.yytext = yy_.yytext.replace(/columns\\s+/,''); yy.getLogger().debug('COLUMNS (LEX)', yy_.yytext); return 28; \nbreak;\ncase 9: this.pushState(\"md_string\");\nbreak;\ncase 10: return \"MD_STR\";\nbreak;\ncase 11: this.popState();\nbreak;\ncase 12:this.pushState(\"string\");\nbreak;\ncase 13: yy.getLogger().debug('LEX: POPPING STR:', yy_.yytext);this.popState();\nbreak;\ncase 14: yy.getLogger().debug('LEX: STR end:', yy_.yytext); return \"STR\";\nbreak;\ncase 15: yy_.yytext = yy_.yytext.replace(/space\\:/,'');yy.getLogger().debug('SPACE NUM (LEX)', yy_.yytext); return 21; \nbreak;\ncase 16: yy_.yytext = '1'; yy.getLogger().debug('COLUMNS (LEX)', yy_.yytext); return 21; \nbreak;\ncase 17:return 43;\nbreak;\ncase 18:return 'LINKSTYLE';\nbreak;\ncase 19:return 'INTERPOLATE';\nbreak;\ncase 20: this.pushState('CLASSDEF'); return 40; \nbreak;\ncase 21: this.popState(); this.pushState('CLASSDEFID'); return 'DEFAULT_CLASSDEF_ID' \nbreak;\ncase 22: this.popState(); this.pushState('CLASSDEFID'); return 41 \nbreak;\ncase 23: this.popState(); return 42 \nbreak;\ncase 24: this.pushState('CLASS'); return 44; \nbreak;\ncase 25: this.popState(); this.pushState('CLASS_STYLE'); return 45 \nbreak;\ncase 26: this.popState(); return 46 \nbreak;\ncase 27: this.pushState('STYLE_STMNT'); return 47; \nbreak;\ncase 28: this.popState(); this.pushState('STYLE_DEFINITION'); return 48 \nbreak;\ncase 29: this.popState(); return 49 \nbreak;\ncase 30: this.pushState(\"acc_title\");return 'acc_title'; \nbreak;\ncase 31: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 32: this.pushState(\"acc_descr\");return 'acc_descr'; \nbreak;\ncase 33: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 34: this.pushState(\"acc_descr_multiline\");\nbreak;\ncase 35: this.popState(); \nbreak;\ncase 36:return \"acc_descr_multiline_value\";\nbreak;\ncase 37:return 30;\nbreak;\ncase 38: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 39: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 40: this.popState();yy.getLogger().debug('Lex: ))'); return \"NODE_DEND\"; \nbreak;\ncase 41: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 42: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 43: this.popState();yy.getLogger().debug('Lex: (-'); return \"NODE_DEND\"; \nbreak;\ncase 44: this.popState();yy.getLogger().debug('Lex: -)'); return \"NODE_DEND\"; \nbreak;\ncase 45: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 46: this.popState();yy.getLogger().debug('Lex: ]]'); return \"NODE_DEND\"; \nbreak;\ncase 47: this.popState();yy.getLogger().debug('Lex: ('); return \"NODE_DEND\"; \nbreak;\ncase 48: this.popState();yy.getLogger().debug('Lex: ])'); return \"NODE_DEND\"; \nbreak;\ncase 49: this.popState();yy.getLogger().debug('Lex: /]'); return \"NODE_DEND\"; \nbreak;\ncase 50: this.popState();yy.getLogger().debug('Lex: /]'); return \"NODE_DEND\"; \nbreak;\ncase 51: this.popState();yy.getLogger().debug('Lex: )]'); return \"NODE_DEND\"; \nbreak;\ncase 52: this.popState();yy.getLogger().debug('Lex: )'); return \"NODE_DEND\"; \nbreak;\ncase 53: this.popState();yy.getLogger().debug('Lex: ]>'); return \"NODE_DEND\"; \nbreak;\ncase 54: this.popState();yy.getLogger().debug('Lex: ]'); return \"NODE_DEND\"; \nbreak;\ncase 55: yy.getLogger().debug('Lexa: -)'); this.pushState('NODE');return 36; \nbreak;\ncase 56: yy.getLogger().debug('Lexa: (-'); this.pushState('NODE');return 36; \nbreak;\ncase 57: yy.getLogger().debug('Lexa: ))'); this.pushState('NODE');return 36; \nbreak;\ncase 58: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 59: yy.getLogger().debug('Lex: ((('); this.pushState('NODE');return 36; \nbreak;\ncase 60: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 61: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 62: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 63: yy.getLogger().debug('Lexc: >'); this.pushState('NODE');return 36; \nbreak;\ncase 64: yy.getLogger().debug('Lexa: (['); this.pushState('NODE');return 36; \nbreak;\ncase 65: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 66: this.pushState('NODE');return 36; \nbreak;\ncase 67: this.pushState('NODE');return 36; \nbreak;\ncase 68: this.pushState('NODE');return 36; \nbreak;\ncase 69: this.pushState('NODE');return 36; \nbreak;\ncase 70: this.pushState('NODE');return 36; \nbreak;\ncase 71: this.pushState('NODE');return 36; \nbreak;\ncase 72: this.pushState('NODE');return 36; \nbreak;\ncase 73: yy.getLogger().debug('Lexa: ['); this.pushState('NODE');return 36; \nbreak;\ncase 74: this.pushState('BLOCK_ARROW');yy.getLogger().debug('LEX ARR START');return 38; \nbreak;\ncase 75: yy.getLogger().debug('Lex: NODE_ID', yy_.yytext);return 32; \nbreak;\ncase 76: yy.getLogger().debug('Lex: EOF', yy_.yytext);return 8; \nbreak;\ncase 77: this.pushState(\"md_string\");\nbreak;\ncase 78: this.pushState(\"md_string\");\nbreak;\ncase 79: return \"NODE_DESCR\";\nbreak;\ncase 80: this.popState();\nbreak;\ncase 81: yy.getLogger().debug('Lex: Starting string');this.pushState(\"string\");\nbreak;\ncase 82: yy.getLogger().debug('LEX ARR: Starting string');this.pushState(\"string\");\nbreak;\ncase 83: yy.getLogger().debug('LEX: NODE_DESCR:', yy_.yytext); return \"NODE_DESCR\";\nbreak;\ncase 84:yy.getLogger().debug('LEX POPPING');this.popState();\nbreak;\ncase 85: yy.getLogger().debug('Lex: =>BAE'); this.pushState('ARROW_DIR'); \nbreak;\ncase 86: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (right): dir:',yy_.yytext);return \"DIR\"; \nbreak;\ncase 87: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (left):',yy_.yytext);return \"DIR\"; \nbreak;\ncase 88: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (x):',yy_.yytext); return \"DIR\"; \nbreak;\ncase 89: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (y):',yy_.yytext); return \"DIR\"; \nbreak;\ncase 90: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (up):',yy_.yytext); return \"DIR\"; \nbreak;\ncase 91: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (down):',yy_.yytext); return \"DIR\"; \nbreak;\ncase 92: yy_.yytext=']>';yy.getLogger().debug('Lex (ARROW_DIR end):',yy_.yytext);this.popState();this.popState();return \"BLOCK_ARROW_END\"; \nbreak;\ncase 93: yy.getLogger().debug('Lex: LINK', '#'+yy_.yytext+'#'); return 15; \nbreak;\ncase 94: yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 95: yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 96: yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 97: yy.getLogger().debug('Lex: START_LINK', yy_.yytext);this.pushState(\"LLABEL\");return 16; \nbreak;\ncase 98: yy.getLogger().debug('Lex: START_LINK', yy_.yytext);this.pushState(\"LLABEL\");return 16; \nbreak;\ncase 99: yy.getLogger().debug('Lex: START_LINK', yy_.yytext);this.pushState(\"LLABEL\");return 16; \nbreak;\ncase 100: this.pushState(\"md_string\");\nbreak;\ncase 101: yy.getLogger().debug('Lex: Starting string');this.pushState(\"string\"); return \"LINK_LABEL\";\nbreak;\ncase 102: this.popState(); yy.getLogger().debug('Lex: LINK', '#'+yy_.yytext+'#'); return 15; \nbreak;\ncase 103: this.popState(); yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 104: this.popState(); yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 105: yy.getLogger().debug('Lex: COLON', yy_.yytext); yy_.yytext=yy_.yytext.slice(1);return 27; \nbreak;\n}\n},\nrules: [/^(?: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\\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\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+)/],\nconditions: {\"STYLE_DEFINITION\":{\"rules\":[29],\"inclusive\":false},\"STYLE_STMNT\":{\"rules\":[28],\"inclusive\":false},\"CLASSDEFID\":{\"rules\":[23],\"inclusive\":false},\"CLASSDEF\":{\"rules\":[21,22],\"inclusive\":false},\"CLASS_STYLE\":{\"rules\":[26],\"inclusive\":false},\"CLASS\":{\"rules\":[25],\"inclusive\":false},\"LLABEL\":{\"rules\":[100,101,102,103,104],\"inclusive\":false},\"ARROW_DIR\":{\"rules\":[86,87,88,89,90,91,92],\"inclusive\":false},\"BLOCK_ARROW\":{\"rules\":[77,82,85],\"inclusive\":false},\"NODE\":{\"rules\":[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],\"inclusive\":false},\"md_string\":{\"rules\":[10,11,79,80],\"inclusive\":false},\"space\":{\"rules\":[],\"inclusive\":false},\"string\":{\"rules\":[13,14,83,84],\"inclusive\":false},\"acc_descr_multiline\":{\"rules\":[35,36],\"inclusive\":false},\"acc_descr\":{\"rules\":[33],\"inclusive\":false},\"acc_title\":{\"rules\":[31],\"inclusive\":false},\"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\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import clone from 'lodash-es/clone.js';\nimport * as configApi from '../../config.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DiagramDB } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport common from '../common/common.js';\nimport { clear as commonClear } from '../common/commonDb.js';\nimport type { Block, ClassDef } from './blockTypes.js';\n\n// Initialize the node database for simple lookups\nlet blockDatabase = new Map();\nlet edgeList: Block[] = [];\nlet edgeCount = new Map();\n\nconst COLOR_KEYWORD = 'color';\nconst FILL_KEYWORD = 'fill';\nconst BG_FILL = 'bgFill';\nconst STYLECLASS_SEP = ',';\nconst config = getConfig();\n\nlet classes = new Map();\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, config);\n\n/**\n * Called when the parser comes across a (style) class definition\n * @example classDef my-style fill:#f96;\n *\n * @param id - the id of this (style) class\n * @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)\n */\nexport const addStyleClass = function (id: string, styleAttributes = '') {\n // create a new style class object with this id\n let foundClass = classes.get(id);\n if (!foundClass) {\n foundClass = { id: id, styles: [], textStyles: [] };\n classes.set(id, foundClass); // This is a classDef\n }\n if (styleAttributes !== undefined && styleAttributes !== null) {\n styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => {\n // remove any trailing ;\n const fixedAttrib = attrib.replace(/([^;]*);/, '$1').trim();\n\n // replace some style keywords\n if (RegExp(COLOR_KEYWORD).exec(attrib)) {\n const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL);\n const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD);\n foundClass.textStyles.push(newStyle2);\n }\n foundClass.styles.push(fixedAttrib);\n });\n }\n};\n\n/**\n * Called when the parser comes across a style definition\n * @example style my-block-id fill:#f96;\n *\n * @param id - the id of the block to style\n * @param styles - the string with 1 or more style attributes (each separated by a comma)\n */\nexport const addStyle2Node = function (id: string, styles = '') {\n const foundBlock = blockDatabase.get(id)!;\n if (styles !== undefined && styles !== null) {\n foundBlock.styles = styles.split(STYLECLASS_SEP);\n }\n};\n\n/**\n * Add a CSS/style class to the block with the given id.\n * If the block isn't already in the list of known blocks, add it.\n * Might be called by parser when a CSS/style class should be applied to a block\n *\n * @param itemIds - The id or a list of ids of the item(s) to apply the css class to\n * @param cssClassName - CSS class name\n */\nexport const setCssClass = function (itemIds: string, cssClassName: string) {\n itemIds.split(',').forEach(function (id: string) {\n let foundBlock = blockDatabase.get(id);\n if (foundBlock === undefined) {\n const trimmedId = id.trim();\n foundBlock = { id: trimmedId, type: 'na', children: [] } as Block;\n blockDatabase.set(trimmedId, foundBlock);\n }\n if (!foundBlock.classes) {\n foundBlock.classes = [];\n }\n foundBlock.classes.push(cssClassName);\n });\n};\n\nconst populateBlockDatabase = (_blockList: Block[], parent: Block): void => {\n const blockList = _blockList.flat();\n const children = [];\n for (const block of blockList) {\n if (block.label) {\n block.label = sanitizeText(block.label);\n }\n if (block.type === 'classDef') {\n addStyleClass(block.id, block.css);\n continue;\n }\n if (block.type === 'applyClass') {\n setCssClass(block.id, block?.styleClass ?? '');\n continue;\n }\n if (block.type === 'applyStyles') {\n if (block?.stylesStr) {\n addStyle2Node(block.id, block?.stylesStr);\n }\n continue;\n }\n if (block.type === 'column-setting') {\n parent.columns = block.columns ?? -1;\n } else if (block.type === 'edge') {\n const count = (edgeCount.get(block.id) ?? 0) + 1;\n edgeCount.set(block.id, count);\n block.id = count + '-' + block.id;\n edgeList.push(block);\n } else {\n if (!block.label) {\n if (block.type === 'composite') {\n block.label = '';\n // log.debug('abc89 composite', block);\n } else {\n block.label = block.id;\n }\n }\n const existingBlock = blockDatabase.get(block.id);\n\n if (existingBlock === undefined) {\n blockDatabase.set(block.id, block);\n } else {\n // Add newer relevant data to aggregated node\n if (block.type !== 'na') {\n existingBlock.type = block.type;\n }\n if (block.label !== block.id) {\n existingBlock.label = block.label;\n }\n }\n\n if (block.children) {\n populateBlockDatabase(block.children, block);\n }\n if (block.type === 'space') {\n // log.debug('abc95 space', block);\n const w = block.width ?? 1;\n for (let j = 0; j < w; j++) {\n const newBlock = clone(block);\n newBlock.id = newBlock.id + '-' + j;\n blockDatabase.set(newBlock.id, newBlock);\n children.push(newBlock);\n }\n } else if (existingBlock === undefined) {\n children.push(block);\n }\n }\n }\n parent.children = children;\n};\n\nlet blocks: Block[] = [];\nlet rootBlock = { id: 'root', type: 'composite', children: [], columns: -1 } as Block;\n\nconst clear = (): void => {\n log.debug('Clear called');\n commonClear();\n rootBlock = { id: 'root', type: 'composite', children: [], columns: -1 } as Block;\n blockDatabase = new Map([['root', rootBlock]]);\n blocks = [];\n classes = new Map();\n\n edgeList = [];\n edgeCount = new Map();\n};\n\nexport function typeStr2Type(typeStr: string) {\n log.debug('typeStr2Type', typeStr);\n switch (typeStr) {\n case '[]':\n return 'square';\n case '()':\n log.debug('we have a round');\n return 'round';\n case '(())':\n return 'circle';\n case '>]':\n return 'rect_left_inv_arrow';\n case '{}':\n return 'diamond';\n case '{{}}':\n return 'hexagon';\n case '([])':\n return 'stadium';\n case '[[]]':\n return 'subroutine';\n case '[()]':\n return 'cylinder';\n case '((()))':\n return 'doublecircle';\n case '[//]':\n return 'lean_right';\n case '[\\\\\\\\]':\n return 'lean_left';\n case '[/\\\\]':\n return 'trapezoid';\n case '[\\\\/]':\n return 'inv_trapezoid';\n case '<[]>':\n return 'block_arrow';\n default:\n return 'na';\n }\n}\n\nexport function edgeTypeStr2Type(typeStr: string): string {\n log.debug('typeStr2Type', typeStr);\n switch (typeStr) {\n case '==':\n return 'thick';\n default:\n return 'normal';\n }\n}\n\nexport function edgeStrToEdgeData(typeStr: string): string {\n switch (typeStr.trim()) {\n case '--x':\n return 'arrow_cross';\n case '--o':\n return 'arrow_circle';\n default:\n return 'arrow_point';\n }\n}\n\nlet cnt = 0;\nexport const generateId = () => {\n cnt++;\n return 'id-' + Math.random().toString(36).substr(2, 12) + '-' + cnt;\n};\n\nconst setHierarchy = (block: Block[]): void => {\n rootBlock.children = block;\n populateBlockDatabase(block, rootBlock);\n blocks = rootBlock.children;\n};\n\nconst getColumns = (blockId: string): number => {\n const block = blockDatabase.get(blockId);\n if (!block) {\n return -1;\n }\n if (block.columns) {\n return block.columns;\n }\n if (!block.children) {\n return -1;\n }\n return block.children.length;\n};\n\n/**\n * Returns all the blocks as a flat array\n * @returns\n */\nconst getBlocksFlat = () => {\n return [...blockDatabase.values()];\n};\n/**\n * Returns the hierarchy of blocks\n * @returns\n */\nconst getBlocks = () => {\n return blocks || [];\n};\n\nconst getEdges = () => {\n return edgeList;\n};\nconst getBlock = (id: string) => {\n return blockDatabase.get(id);\n};\n\nconst setBlock = (block: Block) => {\n blockDatabase.set(block.id, block);\n};\n\nconst getLogger = () => console;\n\n/**\n * Return all of the style classes\n */\nexport const getClasses = function () {\n return classes;\n};\n\nconst db = {\n getConfig: () => configApi.getConfig().block,\n typeStr2Type: typeStr2Type,\n edgeTypeStr2Type: edgeTypeStr2Type,\n edgeStrToEdgeData,\n getLogger,\n getBlocksFlat,\n getBlocks,\n getEdges,\n setHierarchy,\n getBlock,\n setBlock,\n getColumns,\n getClasses,\n clear,\n generateId,\n} as const;\n\nexport type BlockDB = typeof db & DiagramDB;\nexport default db;\n", "import * as khroma from 'khroma';\n\n/** Returns the styles given options */\nexport interface BlockChartStyleOptions {\n arrowheadColor: string;\n border2: string;\n clusterBkg: string;\n clusterBorder: string;\n edgeLabelBackground: string;\n fontFamily: string;\n lineColor: string;\n mainBkg: string;\n nodeBorder: string;\n nodeTextColor: string;\n tertiaryColor: string;\n textColor: string;\n titleColor: string;\n}\n\nconst fade = (color: string, opacity: number) => {\n // @ts-ignore TODO: incorrect types from khroma\n const channel = khroma.channel;\n\n const r = channel(color, 'r');\n const g = channel(color, 'g');\n const b = channel(color, 'b');\n\n // @ts-ignore incorrect types from khroma\n return khroma.rgba(r, g, b, opacity);\n};\n\nconst getStyles = (options: BlockChartStyleOptions) =>\n `.label {\n font-family: ${options.fontFamily};\n color: ${options.nodeTextColor || options.textColor};\n }\n .cluster-label text {\n fill: ${options.titleColor};\n }\n .cluster-label span,p {\n color: ${options.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${options.nodeTextColor || options.textColor};\n color: ${options.nodeTextColor || options.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${fade(options.edgeLabelBackground, 0.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${fade(options.mainBkg, 0.5)};\n fill: ${fade(options.clusterBkg, 0.5)};\n stroke: ${fade(options.clusterBorder, 0.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n .cluster span,p {\n color: ${options.titleColor};\n }\n /* .cluster div {\n color: ${options.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${options.fontFamily};\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n }\n`;\n\nexport default getStyles;\n", "/** Setup arrow head and define the marker. The result is appended to the svg. */\n\nimport { log } from '../logger.js';\n\n// Only add the number of markers that the diagram needs\nconst insertMarkers = (elem, markerArray, type, id) => {\n markerArray.forEach((markerName) => {\n markers[markerName](elem, type, id);\n });\n};\n\nconst extension = (elem, type, id) => {\n log.trace('Making markers for ', id);\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-extensionStart')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-extensionEnd')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n};\n\nconst composition = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-compositionStart')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-compositionEnd')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst aggregation = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-aggregationStart')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-aggregationEnd')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst dependency = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-dependencyStart')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 6)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-dependencyEnd')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 13)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\nconst lollipop = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-lollipopStart')\n .attr('class', 'marker lollipop ' + type)\n .attr('refX', 13)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('circle')\n .attr('stroke', 'black')\n .attr('fill', 'transparent')\n .attr('cx', 7)\n .attr('cy', 7)\n .attr('r', 6);\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-lollipopEnd')\n .attr('class', 'marker lollipop ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('circle')\n .attr('stroke', 'black')\n .attr('fill', 'transparent')\n .attr('cx', 7)\n .attr('cy', 7)\n .attr('r', 6);\n};\nconst point = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-pointEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 6)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-pointStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 4.5)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 5 L 10 10 L 10 0 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst circle = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-circleEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 11)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-circleStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', -1)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst cross = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-crossEnd')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', 12)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-crossStart')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', -1)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n};\nconst barb = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-barbEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 14)\n .attr('markerUnits', 'strokeWidth')\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n\n// TODO rename the class diagram markers to something shape descriptive and semantic free\nconst markers = {\n extension,\n composition,\n aggregation,\n dependency,\n lollipop,\n point,\n circle,\n cross,\n barb,\n};\nexport default insertMarkers;\n", "import type { BlockDB } from './blockDB.js';\nimport type { Block } from './blockTypes.js';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\n// TODO: This means the number we provide in diagram's config will never be used. Should fix.\nconst padding = getConfig()?.block?.padding ?? 8;\n\ninterface BlockPosition {\n px: number;\n py: number;\n}\n\nexport function calculateBlockPosition(columns: number, position: number): BlockPosition {\n // log.debug('calculateBlockPosition abc89', columns, position);\n // Ensure that columns is a positive integer\n if (columns === 0 || !Number.isInteger(columns)) {\n throw new Error('Columns must be an integer !== 0.');\n }\n\n // Ensure that position is a non-negative integer\n if (position < 0 || !Number.isInteger(position)) {\n throw new Error('Position must be a non-negative integer.' + position);\n }\n\n if (columns < 0) {\n // Auto columns is set\n return { px: position, py: 0 };\n }\n if (columns === 1) {\n // Auto columns is set\n return { px: 0, py: position };\n }\n // Calculate posX and posY\n const px = position % columns;\n const py = Math.floor(position / columns);\n // log.debug('calculateBlockPosition abc89', columns, position, '=> (', px, py, ')');\n return { px, py };\n}\n\nconst getMaxChildSize = (block: Block) => {\n let maxWidth = 0;\n let maxHeight = 0;\n // find max width of children\n // log.debug('getMaxChildSize abc95 (start) parent:', block.id);\n for (const child of block.children) {\n const { width, height, x, y } = child.size ?? { width: 0, height: 0, x: 0, y: 0 };\n log.debug(\n 'getMaxChildSize abc95 child:',\n child.id,\n 'width:',\n width,\n 'height:',\n height,\n 'x:',\n x,\n 'y:',\n y,\n child.type\n );\n if (child.type === 'space') {\n continue;\n }\n if (width > maxWidth) {\n maxWidth = width / (block.widthInColumns ?? 1);\n }\n if (height > maxHeight) {\n maxHeight = height;\n }\n }\n return { width: maxWidth, height: maxHeight };\n};\n\nfunction setBlockSizes(block: Block, db: BlockDB, siblingWidth = 0, siblingHeight = 0) {\n log.debug(\n 'setBlockSizes abc95 (start)',\n block.id,\n block?.size?.x,\n 'block width =',\n block?.size,\n 'sieblingWidth',\n siblingWidth\n );\n if (!block?.size?.width) {\n block.size = {\n width: siblingWidth,\n height: siblingHeight,\n x: 0,\n y: 0,\n };\n }\n let maxWidth = 0;\n let maxHeight = 0;\n\n if (block.children?.length > 0) {\n for (const child of block.children) {\n setBlockSizes(child, db);\n }\n // find max width of children\n const childSize = getMaxChildSize(block);\n maxWidth = childSize.width;\n maxHeight = childSize.height;\n log.debug('setBlockSizes abc95 maxWidth of', block.id, ':s children is ', maxWidth, maxHeight);\n\n // set width of block to max width of children\n for (const child of block.children) {\n if (child.size) {\n log.debug(\n `abc95 Setting size of children of ${block.id} id=${child.id} ${maxWidth} ${maxHeight} ${JSON.stringify(child.size)}`\n );\n child.size.width =\n maxWidth * (child.widthInColumns ?? 1) + padding * ((child.widthInColumns ?? 1) - 1);\n child.size.height = maxHeight;\n child.size.x = 0;\n child.size.y = 0;\n\n log.debug(\n `abc95 updating size of ${block.id} children child:${child.id} maxWidth:${maxWidth} maxHeight:${maxHeight}`\n );\n }\n }\n for (const child of block.children) {\n setBlockSizes(child, db, maxWidth, maxHeight);\n }\n\n const columns = block.columns ?? -1;\n let numItems = 0;\n for (const child of block.children) {\n numItems += child.widthInColumns ?? 1;\n }\n\n // The width and height in number blocks\n let xSize = block.children.length;\n if (columns > 0 && columns < numItems) {\n xSize = columns;\n }\n\n const ySize = Math.ceil(numItems / xSize);\n\n let width = xSize * (maxWidth + padding) + padding;\n let height = ySize * (maxHeight + padding) + padding;\n // If maxWidth\n if (width < siblingWidth) {\n log.debug(\n `Detected to small siebling: abc95 ${block.id} sieblingWidth ${siblingWidth} sieblingHeight ${siblingHeight} width ${width}`\n );\n width = siblingWidth;\n height = siblingHeight;\n const childWidth = (siblingWidth - xSize * padding - padding) / xSize;\n const childHeight = (siblingHeight - ySize * padding - padding) / ySize;\n // cspell:ignore indata\n log.debug('Size indata abc88', block.id, 'childWidth', childWidth, 'maxWidth', maxWidth);\n log.debug('Size indata abc88', block.id, 'childHeight', childHeight, 'maxHeight', maxHeight);\n log.debug('Size indata abc88 xSize', xSize, 'padding', padding);\n\n // set width of block to max width of children\n for (const child of block.children) {\n if (child.size) {\n child.size.width = childWidth;\n child.size.height = childHeight;\n child.size.x = 0;\n child.size.y = 0;\n }\n }\n }\n\n log.debug(\n `abc95 (finale calc) ${block.id} xSize ${xSize} ySize ${ySize} columns ${columns}${\n block.children.length\n } width=${Math.max(width, block.size?.width || 0)}`\n );\n if (width < (block?.size?.width || 0)) {\n width = block?.size?.width || 0;\n\n // Grow children to fit\n const num = columns > 0 ? Math.min(block.children.length, columns) : block.children.length;\n if (num > 0) {\n const childWidth = (width - num * padding - padding) / num;\n log.debug('abc95 (growing to fit) width', block.id, width, block.size?.width, childWidth);\n for (const child of block.children) {\n if (child.size) {\n child.size.width = childWidth;\n }\n }\n }\n }\n block.size = {\n width,\n height,\n x: 0,\n y: 0,\n };\n }\n\n log.debug(\n 'setBlockSizes abc94 (done)',\n block.id,\n block?.size?.x,\n block?.size?.width,\n block?.size?.y,\n block?.size?.height\n );\n}\n\nfunction layoutBlocks(block: Block, db: BlockDB) {\n log.debug(\n `abc85 layout blocks (=>layoutBlocks) ${block.id} x: ${block?.size?.x} y: ${block?.size?.y} width: ${block?.size?.width}`\n );\n const columns = block.columns ?? -1;\n log.debug('layoutBlocks columns abc95', block.id, '=>', columns, block);\n if (\n block.children && // find max width of children\n block.children.length > 0\n ) {\n const width = block?.children[0]?.size?.width ?? 0;\n const widthOfChildren = block.children.length * width + (block.children.length - 1) * padding;\n\n log.debug('widthOfChildren 88', widthOfChildren, 'posX');\n\n // let first = true;\n let columnPos = 0;\n log.debug('abc91 block?.size?.x', block.id, block?.size?.x);\n let startingPosX = block?.size?.x ? block?.size?.x + (-block?.size?.width / 2 || 0) : -padding;\n let rowPos = 0;\n for (const child of block.children) {\n const parent = block;\n\n if (!child.size) {\n continue;\n }\n const { width, height } = child.size;\n const { px, py } = calculateBlockPosition(columns, columnPos);\n if (py != rowPos) {\n rowPos = py;\n startingPosX = block?.size?.x ? block?.size?.x + (-block?.size?.width / 2 || 0) : -padding;\n log.debug('New row in layout for block', block.id, ' and child ', child.id, rowPos);\n }\n log.debug(\n `abc89 layout blocks (child) id: ${child.id} Pos: ${columnPos} (px, py) ${px},${py} (${parent?.size?.x},${parent?.size?.y}) parent: ${parent.id} width: ${width}${padding}`\n );\n if (parent.size) {\n const halfWidth = width / 2;\n child.size.x = startingPosX + padding + halfWidth;\n\n // cspell:ignore pyid\n log.debug(\n `abc91 layout blocks (calc) px, pyid:${\n child.id\n } startingPos=X${startingPosX} new startingPosX${\n child.size.x\n } ${halfWidth} padding=${padding} width=${width} halfWidth=${halfWidth} => x:${\n child.size.x\n } y:${child.size.y} ${child.widthInColumns} (width * (child?.w || 1)) / 2 ${\n (width * (child?.widthInColumns ?? 1)) / 2\n }`\n );\n\n startingPosX = child.size.x + halfWidth;\n\n child.size.y =\n parent.size.y - parent.size.height / 2 + py * (height + padding) + height / 2 + padding;\n\n log.debug(\n `abc88 layout blocks (calc) px, pyid:${\n child.id\n }startingPosX${startingPosX}${padding}${halfWidth}=>x:${child.size.x}y:${child.size.y}${\n child.widthInColumns\n }(width * (child?.w || 1)) / 2${(width * (child?.widthInColumns ?? 1)) / 2}`\n );\n }\n if (child.children) {\n layoutBlocks(child, db);\n }\n columnPos += child?.widthInColumns ?? 1;\n log.debug('abc88 columnsPos', child, columnPos);\n }\n }\n log.debug(\n `layout blocks (<==layoutBlocks) ${block.id} x: ${block?.size?.x} y: ${block?.size?.y} width: ${block?.size?.width}`\n );\n}\n\nfunction findBounds(\n block: Block,\n { minX, minY, maxX, maxY } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }\n) {\n if (block.size && block.id !== 'root') {\n const { x, y, width, height } = block.size;\n if (x - width / 2 < minX) {\n minX = x - width / 2;\n }\n if (y - height / 2 < minY) {\n minY = y - height / 2;\n }\n if (x + width / 2 > maxX) {\n maxX = x + width / 2;\n }\n if (y + height / 2 > maxY) {\n maxY = y + height / 2;\n }\n }\n if (block.children) {\n for (const child of block.children) {\n ({ minX, minY, maxX, maxY } = findBounds(child, { minX, minY, maxX, maxY }));\n }\n }\n return { minX, minY, maxX, maxY };\n}\n\nexport function layout(db: BlockDB) {\n const root = db.getBlock('root');\n if (!root) {\n return;\n }\n\n setBlockSizes(root, db, 0, 0);\n layoutBlocks(root, db);\n // Position blocks relative to parents\n // positionBlock(root, root, db);\n log.debug('getBlocks', JSON.stringify(root, null, 2));\n\n const { minX, minY, maxX, maxY } = findBounds(root);\n\n const height = maxY - minY;\n const width = maxX - minX;\n return { x: minX, y: minY, width, height };\n}\n", "import { select } from 'd3';\nimport { log } from '../logger.js';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport { evaluate } from '../diagrams/common/common.js';\nimport { decodeEntities } from '../utils.js';\nimport { replaceIconSubstring } from '../rendering-util/createText.js';\n\n/**\n * @param dom\n * @param styleFn\n */\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr('style', styleFn);\n }\n}\n\n/**\n * @param {any} node\n * @returns {SVGForeignObjectElement} Node\n */\nfunction addHtmlLabel(node) {\n const fo = select(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject'));\n const div = fo.append('xhtml:div');\n\n const label = node.label;\n const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n const span = div.append('span');\n span.html(label);\n applyStyle(span, node.labelStyle);\n span.attr('class', labelClass);\n\n applyStyle(div, node.labelStyle);\n div.style('display', 'inline-block');\n // Fix for firefox\n div.style('white-space', 'nowrap');\n div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n return fo.node();\n}\n/**\n * @param _vertexText\n * @param style\n * @param isTitle\n * @param isNode\n * @deprecated svg-util/createText instead\n */\nconst createLabel = (_vertexText, style, isTitle, isNode) => {\n let vertexText = _vertexText || '';\n if (typeof vertexText === 'object') {\n vertexText = vertexText[0];\n }\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n vertexText = vertexText.replace(/\\\\n|\\n/g, '
');\n log.debug('vertexText' + vertexText);\n const node = {\n isNode,\n label: replaceIconSubstring(decodeEntities(vertexText)),\n labelStyle: style.replace('fill:', 'color:'),\n };\n let vertexNode = addHtmlLabel(node);\n // vertexNode.parentNode.removeChild(vertexNode);\n return vertexNode;\n } else {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', style.replace('color:', 'fill:'));\n let rows = [];\n if (typeof vertexText === 'string') {\n rows = vertexText.split(/\\\\n|\\n|
/gi);\n } else if (Array.isArray(vertexText)) {\n rows = vertexText;\n } else {\n rows = [];\n }\n\n for (const row of rows) {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '0');\n if (isTitle) {\n tspan.setAttribute('class', 'title-row');\n } else {\n tspan.setAttribute('class', 'row');\n }\n tspan.textContent = row.trim();\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n }\n};\n\nexport default createLabel;\n", "import type { SVG } from '../diagram-api/types.js';\nimport { log } from '../logger.js';\nimport type { EdgeData } from '../types.js';\n/**\n * Adds SVG markers to a path element based on the arrow types specified in the edge.\n *\n * @param svgPath - The SVG path element to add markers to.\n * @param edge - The edge data object containing the arrow types.\n * @param url - The URL of the SVG marker definitions.\n * @param id - The ID prefix for the SVG marker definitions.\n * @param diagramType - The type of diagram being rendered.\n */\nexport const addEdgeMarkers = (\n svgPath: SVG,\n edge: Pick,\n url: string,\n id: string,\n diagramType: string\n) => {\n if (edge.arrowTypeStart) {\n addEdgeMarker(svgPath, 'start', edge.arrowTypeStart, url, id, diagramType);\n }\n if (edge.arrowTypeEnd) {\n addEdgeMarker(svgPath, 'end', edge.arrowTypeEnd, url, id, diagramType);\n }\n};\n\nconst arrowTypesMap = {\n arrow_cross: 'cross',\n arrow_point: 'point',\n arrow_barb: 'barb',\n arrow_circle: 'circle',\n aggregation: 'aggregation',\n extension: 'extension',\n composition: 'composition',\n dependency: 'dependency',\n lollipop: 'lollipop',\n} as const;\n\nconst addEdgeMarker = (\n svgPath: SVG,\n position: 'start' | 'end',\n arrowType: string,\n url: string,\n id: string,\n diagramType: string\n) => {\n const endMarkerType = arrowTypesMap[arrowType as keyof typeof arrowTypesMap];\n\n if (!endMarkerType) {\n log.warn(`Unknown arrow type: ${arrowType}`);\n return; // unknown arrow type, ignore\n }\n\n const suffix = position === 'start' ? 'Start' : 'End';\n svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`);\n};\n", "import { log } from '../logger.js';\nimport createLabel from './createLabel.js';\nimport { createText } from '../rendering-util/createText.js';\nimport { line, curveBasis, select } from 'd3';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport utils from '../utils.js';\nimport { evaluate } from '../diagrams/common/common.js';\nimport { getLineFunctionsWithOffset } from '../utils/lineWithOffset.js';\nimport { getSubGraphTitleMargins } from '../utils/subGraphTitleMargins.js';\nimport { addEdgeMarkers } from './edgeMarker.js';\n\nlet edgeLabels = {};\nlet terminalLabels = {};\n\nexport const clear = () => {\n edgeLabels = {};\n terminalLabels = {};\n};\n\nexport const insertEdgeLabel = (elem, edge) => {\n const config = getConfig();\n const useHtmlLabels = evaluate(config.flowchart.htmlLabels);\n // Create the actual text element\n const labelElement =\n edge.labelType === 'markdown'\n ? createText(\n elem,\n edge.label,\n {\n style: edge.labelStyle,\n useHtmlLabels,\n addSvgBackground: true,\n },\n config\n )\n : createLabel(edge.label, edge.labelStyle);\n\n // Create outer g, edgeLabel, this will be positioned after graph layout\n const edgeLabel = elem.insert('g').attr('class', 'edgeLabel');\n\n // Create inner g, label, this will be positioned now for centering the text\n const label = edgeLabel.insert('g').attr('class', 'label');\n label.node().appendChild(labelElement);\n\n // Center the label\n let bbox = labelElement.getBBox();\n if (useHtmlLabels) {\n const div = labelElement.children[0];\n const dv = select(labelElement);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n\n // Make element accessible by id for positioning\n edgeLabels[edge.id] = edgeLabel;\n\n // Update the abstract data of the edge with the new information about its width and height\n edge.width = bbox.width;\n edge.height = bbox.height;\n\n let fo;\n if (edge.startLabelLeft) {\n // Create the actual text element\n const startLabelElement = createLabel(edge.startLabelLeft, edge.labelStyle);\n const startEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startLeft = startEdgeLabelLeft;\n setTerminalWidth(fo, edge.startLabelLeft);\n }\n if (edge.startLabelRight) {\n // Create the actual text element\n const startLabelElement = createLabel(edge.startLabelRight, edge.labelStyle);\n const startEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelRight.insert('g').attr('class', 'inner');\n fo = startEdgeLabelRight.node().appendChild(startLabelElement);\n inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startRight = startEdgeLabelRight;\n setTerminalWidth(fo, edge.startLabelRight);\n }\n if (edge.endLabelLeft) {\n // Create the actual text element\n const endLabelElement = createLabel(edge.endLabelLeft, edge.labelStyle);\n const endEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelLeft.node().appendChild(endLabelElement);\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endLeft = endEdgeLabelLeft;\n setTerminalWidth(fo, edge.endLabelLeft);\n }\n if (edge.endLabelRight) {\n // Create the actual text element\n const endLabelElement = createLabel(edge.endLabelRight, edge.labelStyle);\n const endEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelRight.insert('g').attr('class', 'inner');\n\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelRight.node().appendChild(endLabelElement);\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endRight = endEdgeLabelRight;\n setTerminalWidth(fo, edge.endLabelRight);\n }\n return labelElement;\n};\n\n/**\n * @param {any} fo\n * @param {any} value\n */\nfunction setTerminalWidth(fo, value) {\n if (getConfig().flowchart.htmlLabels && fo) {\n fo.style.width = value.length * 9 + 'px';\n fo.style.height = '12px';\n }\n}\n\nexport const positionEdgeLabel = (edge, paths) => {\n log.debug('Moving label abc88 ', edge.id, edge.label, edgeLabels[edge.id], paths);\n let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n const siteConfig = getConfig();\n const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n if (edge.label) {\n const el = edgeLabels[edge.id];\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // // debugger;\n const pos = utils.calcLabelPosition(path);\n log.debug(\n 'Moving label ' + edge.label + ' from (',\n x,\n ',',\n y,\n ') to (',\n pos.x,\n ',',\n pos.y,\n ') abc88'\n );\n if (paths.updatedPath) {\n x = pos.x;\n y = pos.y;\n }\n }\n el.attr('transform', `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);\n }\n\n //let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n if (edge.startLabelLeft) {\n const el = terminalLabels[edge.id].startLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, 'start_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.startLabelRight) {\n const el = terminalLabels[edge.id].startRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(\n edge.arrowTypeStart ? 10 : 0,\n 'start_right',\n path\n );\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.endLabelLeft) {\n const el = terminalLabels[edge.id].endLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.endLabelRight) {\n const el = terminalLabels[edge.id].endRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_right', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n};\n\nconst outsideNode = (node, point) => {\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(point.x - x);\n const dy = Math.abs(point.y - y);\n const w = node.width / 2;\n const h = node.height / 2;\n if (dx >= w || dy >= h) {\n return true;\n }\n return false;\n};\n\nexport const intersection = (node, outsidePoint, insidePoint) => {\n log.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(outsidePoint)}\n insidePoint : ${JSON.stringify(insidePoint)}\n node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);\n const x = node.x;\n const y = node.y;\n\n const dx = Math.abs(x - insidePoint.x);\n // const dy = Math.abs(y - insidePoint.y);\n const w = node.width / 2;\n let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n const h = node.height / 2;\n\n const Q = Math.abs(outsidePoint.y - insidePoint.y);\n const R = Math.abs(outsidePoint.x - insidePoint.x);\n\n if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {\n // Intersection is top or bottom of rect.\n let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n r = (R * q) / Q;\n const res = {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q,\n };\n\n if (r === 0) {\n res.x = outsidePoint.x;\n res.y = outsidePoint.y;\n }\n if (R === 0) {\n res.x = outsidePoint.x;\n }\n if (Q === 0) {\n res.y = outsidePoint.y;\n }\n\n log.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); // cspell: disable-line\n\n return res;\n } else {\n // Intersection onn sides of rect\n if (insidePoint.x < outsidePoint.x) {\n r = outsidePoint.x - w - x;\n } else {\n // r = outsidePoint.x - w - x;\n r = x - w - outsidePoint.x;\n }\n let q = (Q * r) / R;\n // OK let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x + dx - w;\n // OK let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : outsidePoint.x + r;\n let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;\n // let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : outsidePoint.x + r;\n let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;\n log.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });\n if (r === 0) {\n _x = outsidePoint.x;\n _y = outsidePoint.y;\n }\n if (R === 0) {\n _x = outsidePoint.x;\n }\n if (Q === 0) {\n _y = outsidePoint.y;\n }\n\n return { x: _x, y: _y };\n }\n};\n/**\n * This function will page a path and node where the last point(s) in the path is inside the node\n * and return an update path ending by the border of the node.\n *\n * @param {Array} _points\n * @param {any} boundaryNode\n * @returns {Array} Points\n */\nconst cutPathAtIntersect = (_points, boundaryNode) => {\n log.debug('abc88 cutPathAtIntersect', _points, boundaryNode);\n let points = [];\n let lastPointOutside = _points[0];\n let isInside = false;\n _points.forEach((point) => {\n // check if point is inside the boundary rect\n if (!outsideNode(boundaryNode, point) && !isInside) {\n // First point inside the rect found\n // Calc the intersection coord between the point anf the last point outside the rect\n const inter = intersection(boundaryNode, lastPointOutside, point);\n\n // // Check case where the intersection is the same as the last point\n let pointPresent = false;\n points.forEach((p) => {\n pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n });\n // // if (!pointPresent) {\n if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {\n points.push(inter);\n }\n\n isInside = true;\n } else {\n // Outside\n lastPointOutside = point;\n // points.push(point);\n if (!isInside) {\n points.push(point);\n }\n }\n });\n return points;\n};\n\nexport const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph, id) {\n let points = edge.points;\n log.debug('abc88 InsertEdge: edge=', edge, 'e=', e);\n let pointsHasChanged = false;\n const tail = graph.node(e.v);\n var head = graph.node(e.w);\n\n if (head?.intersect && tail?.intersect) {\n points = points.slice(1, edge.points.length - 1);\n points.unshift(tail.intersect(points[0]));\n points.push(head.intersect(points[points.length - 1]));\n }\n\n if (edge.toCluster) {\n log.debug('to cluster abc88', clusterDb[edge.toCluster]);\n points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);\n\n pointsHasChanged = true;\n }\n\n if (edge.fromCluster) {\n log.debug('from cluster abc88', clusterDb[edge.fromCluster]);\n points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();\n\n pointsHasChanged = true;\n }\n\n // The data for our line\n const lineData = points.filter((p) => !Number.isNaN(p.y));\n\n // This is the accessor function we talked about above\n let curve = curveBasis;\n // Currently only flowcharts get the curve from the settings, perhaps this should\n // be expanded to a common setting? Restricting it for now in order not to cause side-effects that\n // have not been thought through\n if (edge.curve && (diagramType === 'graph' || diagramType === 'flowchart')) {\n curve = edge.curve;\n }\n\n const { x, y } = getLineFunctionsWithOffset(edge);\n const lineFunction = line().x(x).y(y).curve(curve);\n\n // Construct stroke classes based on properties\n let strokeClasses;\n switch (edge.thickness) {\n case 'normal':\n strokeClasses = 'edge-thickness-normal';\n break;\n case 'thick':\n strokeClasses = 'edge-thickness-thick';\n break;\n case 'invisible':\n strokeClasses = 'edge-thickness-thick';\n break;\n default:\n strokeClasses = '';\n }\n switch (edge.pattern) {\n case 'solid':\n strokeClasses += ' edge-pattern-solid';\n break;\n case 'dotted':\n strokeClasses += ' edge-pattern-dotted';\n break;\n case 'dashed':\n strokeClasses += ' edge-pattern-dashed';\n break;\n }\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', edge.id)\n .attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : ''))\n .attr('style', edge.style);\n\n // DEBUG code, adds a red circle at each edge coordinate\n // edge.points.forEach((point) => {\n // elem\n // .append('circle')\n // .style('stroke', 'red')\n // .style('fill', 'red')\n // .attr('r', 1)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n\n let url = '';\n // // TODO: Can we load this config only from the rendered graph type?\n if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n addEdgeMarkers(svgPath, edge, url, id, diagramType);\n\n let paths = {};\n if (pointsHasChanged) {\n paths.updatedPath = points;\n }\n paths.originalPath = edge.points;\n return paths;\n};\n", "import type { Direction } from '../../src/diagrams/block/blockTypes.js';\n\nconst expandAndDeduplicateDirections = (directions: Direction[]) => {\n const uniqueDirections = new Set();\n\n for (const direction of directions) {\n switch (direction) {\n case 'x':\n uniqueDirections.add('right');\n uniqueDirections.add('left');\n break;\n case 'y':\n uniqueDirections.add('up');\n uniqueDirections.add('down');\n break;\n default:\n uniqueDirections.add(direction);\n break;\n }\n }\n\n return uniqueDirections;\n};\nexport const getArrowPoints = (\n duplicatedDirections: Direction[],\n bbox: { width: number; height: number },\n node: any\n) => {\n // Expand and deduplicate the provided directions.\n // for instance: x, right => right, left\n const directions = expandAndDeduplicateDirections(duplicatedDirections);\n\n // Factor to divide height for some calculations.\n const f = 2;\n\n // Calculated height of the bounding box, accounting for node padding.\n const height = bbox.height + 2 * node.padding;\n // Midpoint calculation based on height.\n const midpoint = height / f;\n // Calculated width of the bounding box, accounting for additional width and node padding.\n const width = bbox.width + 2 * midpoint + node.padding;\n // Padding to use, half of the node padding.\n const padding = node.padding / 2;\n\n if (\n directions.has('right') &&\n directions.has('left') &&\n directions.has('up') &&\n directions.has('down')\n ) {\n // SQUARE\n return [\n // Bottom\n { x: 0, y: 0 },\n { x: midpoint, y: 0 },\n { x: width / 2, y: 2 * padding },\n { x: width - midpoint, y: 0 },\n { x: width, y: 0 },\n\n // Right\n { x: width, y: -height / 3 },\n { x: width + 2 * padding, y: -height / 2 },\n { x: width, y: (-2 * height) / 3 },\n { x: width, y: -height },\n\n // Top\n { x: width - midpoint, y: -height },\n { x: width / 2, y: -height - 2 * padding },\n { x: midpoint, y: -height },\n\n // Left\n { x: 0, y: -height },\n { x: 0, y: (-2 * height) / 3 },\n { x: -2 * padding, y: -height / 2 },\n { x: 0, y: -height / 3 },\n ];\n }\n if (directions.has('right') && directions.has('left') && directions.has('up')) {\n // RECTANGLE_VERTICAL (Top Open)\n return [\n { x: midpoint, y: 0 },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 },\n ];\n }\n if (directions.has('right') && directions.has('left') && directions.has('down')) {\n // RECTANGLE_VERTICAL (Bottom Open)\n return [\n { x: 0, y: 0 },\n { x: midpoint, y: -height },\n { x: width - midpoint, y: -height },\n { x: width, y: 0 },\n ];\n }\n if (directions.has('right') && directions.has('up') && directions.has('down')) {\n // RECTANGLE_HORIZONTAL (Right Open)\n return [\n { x: 0, y: 0 },\n { x: width, y: -midpoint },\n { x: width, y: -height + midpoint },\n { x: 0, y: -height },\n ];\n }\n if (directions.has('left') && directions.has('up') && directions.has('down')) {\n // RECTANGLE_HORIZONTAL (Left Open)\n return [\n { x: width, y: 0 },\n { x: 0, y: -midpoint },\n { x: 0, y: -height + midpoint },\n { x: width, y: -height },\n ];\n }\n if (directions.has('right') && directions.has('left')) {\n // HORIZONTAL_LINE\n return [\n { x: midpoint, y: 0 },\n { x: midpoint, y: -padding },\n { x: width - midpoint, y: -padding },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: width - midpoint, y: -height + padding },\n { x: midpoint, y: -height + padding },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 },\n ];\n }\n if (directions.has('up') && directions.has('down')) {\n // VERTICAL_LINE\n return [\n // Bottom center\n { x: width / 2, y: 0 },\n // Left pont of bottom arrow\n { x: 0, y: -padding },\n { x: midpoint, y: -padding },\n // Left top over vertical section\n { x: midpoint, y: -height + padding },\n { x: 0, y: -height + padding },\n // Top of arrow\n { x: width / 2, y: -height },\n { x: width, y: -height + padding },\n // Top of right vertical bar\n { x: width - midpoint, y: -height + padding },\n { x: width - midpoint, y: -padding },\n { x: width, y: -padding },\n ];\n }\n if (directions.has('right') && directions.has('up')) {\n // ANGLE_RT\n return [\n { x: 0, y: 0 },\n { x: width, y: -midpoint },\n { x: 0, y: -height },\n ];\n }\n if (directions.has('right') && directions.has('down')) {\n // ANGLE_RB\n return [\n { x: 0, y: 0 },\n { x: width, y: 0 },\n { x: 0, y: -height },\n ];\n }\n if (directions.has('left') && directions.has('up')) {\n // ANGLE_LT\n return [\n { x: width, y: 0 },\n { x: 0, y: -midpoint },\n { x: width, y: -height },\n ];\n }\n if (directions.has('left') && directions.has('down')) {\n // ANGLE_LB\n return [\n { x: width, y: 0 },\n { x: 0, y: 0 },\n { x: width, y: -height },\n ];\n }\n if (directions.has('right')) {\n // ARROW_RIGHT\n return [\n { x: midpoint, y: -padding },\n { x: midpoint, y: -padding },\n { x: width - midpoint, y: -padding },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: width - midpoint, y: -height + padding },\n // top left corner of arrow\n { x: midpoint, y: -height + padding },\n { x: midpoint, y: -height + padding },\n ];\n }\n if (directions.has('left')) {\n // ARROW_LEFT\n return [\n { x: midpoint, y: 0 },\n { x: midpoint, y: -padding },\n // Two points, the right corners\n { x: width - midpoint, y: -padding },\n { x: width - midpoint, y: -height + padding },\n { x: midpoint, y: -height + padding },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 },\n ];\n }\n if (directions.has('up')) {\n // ARROW_TOP\n return [\n // Bottom center\n { x: midpoint, y: -padding },\n // Left top over vertical section\n { x: midpoint, y: -height + padding },\n { x: 0, y: -height + padding },\n // Top of arrow\n { x: width / 2, y: -height },\n { x: width, y: -height + padding },\n // Top of right vertical bar\n { x: width - midpoint, y: -height + padding },\n { x: width - midpoint, y: -padding },\n ];\n }\n if (directions.has('down')) {\n // ARROW_BOTTOM\n return [\n // Bottom center\n { x: width / 2, y: 0 },\n // Left pont of bottom arrow\n { x: 0, y: -padding },\n { x: midpoint, y: -padding },\n // Left top over vertical section\n { x: midpoint, y: -height + padding },\n { x: width - midpoint, y: -height + padding },\n { x: width - midpoint, y: -padding },\n { x: width, y: -padding },\n ];\n }\n\n // POINT\n return [{ x: 0, y: 0 }];\n};\n", "/**\n * @param node\n * @param point\n */\nfunction intersectNode(node, point) {\n // console.info('Intersect Node');\n return node.intersect(point);\n}\n\nexport default intersectNode;\n", "/**\n * @param node\n * @param rx\n * @param ry\n * @param point\n */\nfunction intersectEllipse(node, rx, ry, point) {\n // Formulae from: https://mathworld.wolfram.com/Ellipse-LineIntersection.html\n\n var cx = node.x;\n var cy = node.y;\n\n var px = cx - point.x;\n var py = cy - point.y;\n\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n\n var dx = Math.abs((rx * ry * px) / det);\n if (point.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs((rx * ry * py) / det);\n if (point.y < cy) {\n dy = -dy;\n }\n\n return { x: cx + dx, y: cy + dy };\n}\n\nexport default intersectEllipse;\n", "import intersectEllipse from './intersect-ellipse.js';\n\n/**\n * @param node\n * @param rx\n * @param point\n */\nfunction intersectCircle(node, rx, point) {\n return intersectEllipse(node, rx, rx, point);\n}\n\nexport default intersectCircle;\n", "/**\n * Returns the point at which two lines, p and q, intersect or returns undefined if they do not intersect.\n *\n * @param p1\n * @param p2\n * @param q1\n * @param q2\n */\nfunction intersectLine(p1, p2, q1, q2) {\n // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n // p7 and p473.\n\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y;\n\n // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +\n // b1 y + c1 = 0.\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y;\n\n // Compute r3 and r4.\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1;\n\n // Check signs of r3 and r4. If both point 3 and point 4 lie on\n // same side of line 1, the line segments do not intersect.\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return /*DON'T_INTERSECT*/;\n }\n\n // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y;\n\n // Compute r1 and r2\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2;\n\n // Check signs of r1 and r2. If both point 1 and point 2 lie\n // on same side of second line segment, the line segments do\n // not intersect.\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return /*DON'T_INTERSECT*/;\n }\n\n // Line segments intersect: compute intersection point.\n denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return /*COLLINEAR*/;\n }\n\n offset = Math.abs(denom / 2);\n\n // The denom/2 is to get rounding instead of truncating. It\n // is added or subtracted to the numerator, depending upon the\n // sign of the numerator.\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n return { x: x, y: y };\n}\n\n/**\n * @param r1\n * @param r2\n */\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\n\nexport default intersectLine;\n", "/* eslint \"no-console\": off */\n\nimport intersectLine from './intersect-line.js';\n\nexport default intersectPolygon;\n\n/**\n * Returns the point ({x, y}) at which the point argument intersects with the node argument assuming\n * that it has the shape specified by polygon.\n *\n * @param node\n * @param polyPoints\n * @param point\n */\nfunction intersectPolygon(node, polyPoints, point) {\n var x1 = node.x;\n var y1 = node.y;\n\n var intersections = [];\n\n var minX = Number.POSITIVE_INFINITY;\n var minY = Number.POSITIVE_INFINITY;\n if (typeof polyPoints.forEach === 'function') {\n polyPoints.forEach(function (entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n\n var left = x1 - node.width / 2 - minX;\n var top = y1 - node.height / 2 - minY;\n\n for (var i = 0; i < polyPoints.length; i++) {\n var p1 = polyPoints[i];\n var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n var intersect = intersectLine(\n node,\n point,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect) {\n intersections.push(intersect);\n }\n }\n\n if (!intersections.length) {\n // console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node);\n return node;\n }\n\n if (intersections.length > 1) {\n // More intersections, find the one nearest to edge end point\n intersections.sort(function (p, q) {\n var pdx = p.x - point.x;\n var pdy = p.y - point.y;\n var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n\n var qdx = q.x - point.x;\n var qdy = q.y - point.y;\n var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\n", "const intersectRect = (node, point) => {\n var x = node.x;\n var y = node.y;\n\n // Rectangle intersection algorithm from:\n // https://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = point.x - x;\n var dy = point.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = dy === 0 ? 0 : (h * dx) / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = dx === 0 ? 0 : (w * dy) / dx;\n }\n\n return { x: x + sx, y: y + sy };\n};\n\nexport default intersectRect;\n", "/*\n * Borrowed with love from dagre-d3. Many thanks to cpettitt!\n */\n\nimport node from './intersect-node.js';\nimport circle from './intersect-circle.js';\nimport ellipse from './intersect-ellipse.js';\nimport polygon from './intersect-polygon.js';\nimport rect from './intersect-rect.js';\n\nexport default {\n node,\n circle,\n ellipse,\n polygon,\n rect,\n};\n", "import createLabel from '../createLabel.js';\nimport { createText } from '../../rendering-util/createText.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { select } from 'd3';\nimport { evaluate, sanitizeText } from '../../diagrams/common/common.js';\nimport { decodeEntities } from '../../utils.js';\n\nexport const labelHelper = async (parent, node, _classes, isNode) => {\n const config = getConfig();\n let classes;\n const useHtmlLabels = node.useHtmlLabels || evaluate(config.flowchart.htmlLabels);\n if (!_classes) {\n classes = 'node default';\n } else {\n classes = _classes;\n }\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'label').attr('style', node.labelStyle);\n\n // Replace labelText with default value if undefined\n let labelText;\n if (node.labelText === undefined) {\n labelText = '';\n } else {\n labelText = typeof node.labelText === 'string' ? node.labelText : node.labelText[0];\n }\n\n const textNode = label.node();\n let text;\n if (node.labelType === 'markdown') {\n // text = textNode;\n text = createText(\n label,\n sanitizeText(decodeEntities(labelText), config),\n {\n useHtmlLabels,\n width: node.width || config.flowchart.wrappingWidth,\n classes: 'markdown-node-label',\n },\n config\n );\n } else {\n text = textNode.appendChild(\n createLabel(sanitizeText(decodeEntities(labelText), config), node.labelStyle, false, isNode)\n );\n }\n // Get the size of the label\n let bbox = text.getBBox();\n const halfPadding = node.padding / 2;\n\n if (evaluate(config.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n\n // if there are images, need to wait for them to load before getting the bounding box\n const images = div.getElementsByTagName('img');\n if (images) {\n const noImgText = labelText.replace(/]*>/g, '').trim() === '';\n\n await Promise.all(\n [...images].map(\n (img) =>\n new Promise((res) => {\n /**\n *\n */\n function setupImage() {\n img.style.display = 'flex';\n img.style.flexDirection = 'column';\n\n if (noImgText) {\n // default size if no text\n const bodyFontSize = config.fontSize\n ? config.fontSize\n : window.getComputedStyle(document.body).fontSize;\n const enlargingFactor = 5;\n const width = parseInt(bodyFontSize, 10) * enlargingFactor + 'px';\n img.style.minWidth = width;\n img.style.maxWidth = width;\n } else {\n img.style.width = '100%';\n }\n res(img);\n }\n setTimeout(() => {\n if (img.complete) {\n setupImage();\n }\n });\n img.addEventListener('error', setupImage);\n img.addEventListener('load', setupImage);\n })\n )\n );\n }\n\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n // Center the label\n if (useHtmlLabels) {\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n } else {\n label.attr('transform', 'translate(' + 0 + ', ' + -bbox.height / 2 + ')');\n }\n if (node.centerLabel) {\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n }\n label.insert('rect', ':first-child');\n\n return { shapeSvg, bbox, halfPadding, label };\n};\n\nexport const updateNodeBounds = (node, element) => {\n const bbox = element.node().getBBox();\n node.width = bbox.width;\n node.height = bbox.height;\n};\n\n/**\n * @param parent\n * @param w\n * @param h\n * @param points\n */\nexport function insertPolygonShape(parent, w, h, points) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('class', 'label-container')\n .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n", "import { updateNodeBounds, labelHelper } from './util.js';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport intersect from '../intersect/index.js';\n\nconst note = async (parent, node) => {\n const useHtmlLabels = node.useHtmlLabels || getConfig().flowchart.htmlLabels;\n if (!useHtmlLabels) {\n node.centerLabel = true;\n }\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n 'node ' + node.classes,\n true\n );\n\n log.info('Classes = ', node.classes);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nexport default note;\n", "import { select } from 'd3';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport { evaluate } from '../diagrams/common/common.js';\nimport { log } from '../logger.js';\nimport { getArrowPoints } from './blockArrowHelper.js';\nimport createLabel from './createLabel.js';\nimport intersect from './intersect/index.js';\nimport note from './shapes/note.js';\nimport { insertPolygonShape, labelHelper, updateNodeBounds } from './shapes/util.js';\n\nconst formatClass = (str) => {\n if (str) {\n return ' ' + str;\n }\n return '';\n};\nconst getClassesFromNode = (node, otherClasses) => {\n return `${otherClasses ? otherClasses : 'node default'}${formatClass(node.classes)} ${formatClass(\n node.class\n )}`;\n};\n\nconst question = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const s = w + h;\n\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 },\n ];\n\n log.info('Question main (Circle)');\n\n const questionElem = insertPolygonShape(shapeSvg, s, s, points);\n questionElem.attr('style', node.style);\n updateNodeBounds(node, questionElem);\n\n node.intersect = function (point) {\n log.warn('Intersect called');\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst choice = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n const s = 28;\n const points = [\n { x: 0, y: s / 2 },\n { x: s / 2, y: 0 },\n { x: 0, y: -s / 2 },\n { x: -s / 2, y: 0 },\n ];\n\n const choice = shapeSvg.insert('polygon', ':first-child').attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n );\n // center the circle around its coordinate\n choice.attr('class', 'state-start').attr('r', 7).attr('width', 28).attr('height', 28);\n node.width = 28;\n node.height = 28;\n\n node.intersect = function (point) {\n return intersect.circle(node, 14, point);\n };\n\n return shapeSvg;\n};\n\nconst hexagon = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const f = 4;\n const h = bbox.height + node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n const hex = insertPolygonShape(shapeSvg, w, h, points);\n hex.attr('style', node.style);\n updateNodeBounds(node, hex);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst block_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(parent, node, undefined, true);\n\n const f = 2;\n const h = bbox.height + 2 * node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n\n const points = getArrowPoints(node.directions, bbox, node);\n\n const blockArrow = insertPolygonShape(shapeSvg, w, h, points);\n blockArrow.attr('style', node.style);\n updateNodeBounds(node, blockArrow);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst rect_left_inv_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: -h / 2, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: -h / 2, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n\n node.width = w + h;\n node.height = h;\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst lean_right = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst lean_left = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (2 * h) / 6, y: 0 },\n { x: w + h / 6, y: 0 },\n { x: w - (2 * h) / 6, y: -h },\n { x: -h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst trapezoid = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w + (2 * h) / 6, y: 0 },\n { x: w - h / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst inv_trapezoid = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: (-2 * h) / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst rect_right_inv_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w + h / 2, y: 0 },\n { x: w, y: -h / 2 },\n { x: w + h / 2, y: -h },\n { x: 0, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst cylinder = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = bbox.height + ry + node.padding;\n\n const shape =\n 'M 0,' +\n ry +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n -w +\n ' 0 l 0,' +\n h +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 l 0,' +\n -h;\n\n const el = shapeSvg\n .attr('label-offset-y', ry)\n .insert('path', ':first-child')\n .attr('style', node.style)\n .attr('d', shape)\n .attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');\n\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n const x = pos.x - node.x;\n\n if (\n rx != 0 &&\n (Math.abs(x) < node.width / 2 ||\n (Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry))\n ) {\n // ellipsis equation: x*x / a*a + y*y / b*b = 1\n // solve for y to get adjusted value for pos.y\n let y = ry * ry * (1 - (x * x) / (rx * rx));\n if (y != 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point.y - node.y > 0) {\n y = -y;\n }\n\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n};\n\nconst rect = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n 'node ' + node.classes + ' ' + node.class,\n true\n );\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // console.log('Rect node:', node, 'bbox:', bbox, 'halfPadding:', halfPadding, 'node.padding:', node.padding);\n // const totalWidth = bbox.width + node.padding * 2;\n // const totalHeight = bbox.height + node.padding * 2;\n const totalWidth = node.positioned ? node.width : bbox.width + node.padding;\n const totalHeight = node.positioned ? node.height : bbox.height + node.padding;\n const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;\n const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;\n rect\n .attr('class', 'basic label-container')\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect, node.props.borders, totalWidth, totalHeight);\n propKeys.delete('borders');\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst composite = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n 'node ' + node.classes,\n true\n );\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // const totalWidth = bbox.width + node.padding * 2;\n // const totalHeight = bbox.height + node.padding * 2;\n const totalWidth = node.positioned ? node.width : bbox.width + node.padding;\n const totalHeight = node.positioned ? node.height : bbox.height + node.padding;\n const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;\n const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;\n rect\n .attr('class', 'basic cluster composite label-container')\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect, node.props.borders, totalWidth, totalHeight);\n propKeys.delete('borders');\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst labelRect = async (parent, node) => {\n const { shapeSvg } = await labelHelper(parent, node, 'label', true);\n\n log.trace('Classes = ', node.class);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Hide the rect we are only after the label\n const totalWidth = 0;\n const totalHeight = 0;\n rect.attr('width', totalWidth).attr('height', totalHeight);\n shapeSvg.attr('class', 'label edgeLabel');\n\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect, node.props.borders, totalWidth, totalHeight);\n propKeys.delete('borders');\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\n/**\n * @param rect\n * @param borders\n * @param totalWidth\n * @param totalHeight\n */\nfunction applyNodePropertyBorders(rect, borders, totalWidth, totalHeight) {\n const strokeDashArray = [];\n const addBorder = (length) => {\n strokeDashArray.push(length, 0);\n };\n const skipBorder = (length) => {\n strokeDashArray.push(0, length);\n };\n if (borders.includes('t')) {\n log.debug('add top border');\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes('r')) {\n log.debug('add right border');\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n if (borders.includes('b')) {\n log.debug('add bottom border');\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes('l')) {\n log.debug('add left border');\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n rect.attr('stroke-dasharray', strokeDashArray.join(' '));\n}\n\nconst rectWithTitle = (parent, node) => {\n // const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes);\n\n let classes;\n if (!node.classes) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.classes;\n }\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n // const innerRect = shapeSvg.insert('rect');\n const innerLine = shapeSvg.insert('line');\n\n const label = shapeSvg.insert('g').attr('class', 'label');\n\n const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;\n // const text2 = typeof text2prim === 'object' ? text2prim[0] : text2prim;\n\n let title = '';\n if (typeof text2 === 'object') {\n title = text2[0];\n } else {\n title = text2;\n }\n log.info('Label text abc79', title, text2, typeof text2 === 'object');\n\n const text = label.node().appendChild(createLabel(title, node.labelStyle, true, true));\n let bbox = { width: 0, height: 0 };\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n log.info('Text 2', text2);\n const textRows = text2.slice(1, text2.length);\n let titleBox = text.getBBox();\n const descr = label\n .node()\n .appendChild(\n createLabel(textRows.join ? textRows.join('
') : textRows, node.labelStyle, true, true)\n );\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = descr.children[0];\n const dv = select(descr);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n // bbox = label.getBBox();\n // log.info(descr);\n const halfPadding = node.padding / 2;\n select(descr).attr(\n 'transform',\n 'translate( ' +\n // (titleBox.width - bbox.width) / 2 +\n (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +\n ', ' +\n (titleBox.height + halfPadding + 5) +\n ')'\n );\n select(text).attr(\n 'transform',\n 'translate( ' +\n // (titleBox.width - bbox.width) / 2 +\n (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +\n ', ' +\n 0 +\n ')'\n );\n // Get the size of the label\n\n // Bounding box for title and text\n bbox = label.node().getBBox();\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'\n );\n\n rect\n .attr('class', 'outer title-state')\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n innerLine\n .attr('class', 'divider')\n .attr('x1', -bbox.width / 2 - halfPadding)\n .attr('x2', bbox.width / 2 + halfPadding)\n .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding)\n .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst stadium = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const h = bbox.height + node.padding;\n const w = bbox.width + h / 4 + node.padding;\n\n // add the rect\n const rect = shapeSvg\n .insert('rect', ':first-child')\n .attr('style', node.style)\n .attr('rx', h / 2)\n .attr('ry', h / 2)\n .attr('x', -w / 2)\n .attr('y', -h / 2)\n .attr('width', w)\n .attr('height', h);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst circle = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n const circle = shapeSvg.insert('circle', ':first-child');\n\n // center the circle around its coordinate\n circle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n log.info('Circle main');\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n log.info('Circle intersect', node, bbox.width / 2 + halfPadding, point);\n return intersect.circle(node, bbox.width / 2 + halfPadding, point);\n };\n\n return shapeSvg;\n};\n\nconst doublecircle = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n const gap = 5;\n const circleGroup = shapeSvg.insert('g', ':first-child');\n const outerCircle = circleGroup.insert('circle');\n const innerCircle = circleGroup.insert('circle');\n\n circleGroup.attr('class', node.class);\n\n // center the circle around its coordinate\n outerCircle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding + gap)\n .attr('width', bbox.width + node.padding + gap * 2)\n .attr('height', bbox.height + node.padding + gap * 2);\n\n innerCircle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n log.info('DoubleCircle main');\n\n updateNodeBounds(node, outerCircle);\n\n node.intersect = function (point) {\n log.info('DoubleCircle intersect', node, bbox.width / 2 + halfPadding + gap, point);\n return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point);\n };\n\n return shapeSvg;\n};\n\nconst subroutine = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst start = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n const circle = shapeSvg.insert('circle', ':first-child');\n\n // center the circle around its coordinate\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n};\n\nconst forkJoin = (parent, node, dir) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n let width = 70;\n let height = 10;\n\n if (dir === 'LR') {\n width = 10;\n height = 70;\n }\n\n const shape = shapeSvg\n .append('rect')\n .attr('x', (-1 * width) / 2)\n .attr('y', (-1 * height) / 2)\n .attr('width', width)\n .attr('height', height)\n .attr('class', 'fork-join');\n\n updateNodeBounds(node, shape);\n node.height = node.height + node.padding / 2;\n node.width = node.width + node.padding / 2;\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst end = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n const innerCircle = shapeSvg.insert('circle', ':first-child');\n const circle = shapeSvg.insert('circle', ':first-child');\n\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n\n innerCircle.attr('class', 'state-end').attr('r', 5).attr('width', 10).attr('height', 10);\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n};\n\nconst class_box = (parent, node) => {\n const halfPadding = node.padding / 2;\n const rowPadding = 4;\n const lineHeight = 8;\n\n let classes;\n if (!node.classes) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.classes;\n }\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n const topLine = shapeSvg.insert('line');\n const bottomLine = shapeSvg.insert('line');\n let maxWidth = 0;\n let maxHeight = rowPadding;\n\n const labelContainer = shapeSvg.insert('g').attr('class', 'label');\n let verticalPos = 0;\n const hasInterface = node.classData.annotations?.[0];\n\n // 1. Create the labels\n const interfaceLabelText = node.classData.annotations[0]\n ? '\u00AB' + node.classData.annotations[0] + '\u00BB'\n : '';\n const interfaceLabel = labelContainer\n .node()\n .appendChild(createLabel(interfaceLabelText, node.labelStyle, true, true));\n let interfaceBBox = interfaceLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = interfaceLabel.children[0];\n const dv = select(interfaceLabel);\n interfaceBBox = div.getBoundingClientRect();\n dv.attr('width', interfaceBBox.width);\n dv.attr('height', interfaceBBox.height);\n }\n if (node.classData.annotations[0]) {\n maxHeight += interfaceBBox.height + rowPadding;\n maxWidth += interfaceBBox.width;\n }\n\n let classTitleString = node.classData.label;\n\n if (node.classData.type !== undefined && node.classData.type !== '') {\n if (getConfig().flowchart.htmlLabels) {\n classTitleString += '<' + node.classData.type + '>';\n } else {\n classTitleString += '<' + node.classData.type + '>';\n }\n }\n const classTitleLabel = labelContainer\n .node()\n .appendChild(createLabel(classTitleString, node.labelStyle, true, true));\n select(classTitleLabel).attr('class', 'classTitle');\n let classTitleBBox = classTitleLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = classTitleLabel.children[0];\n const dv = select(classTitleLabel);\n classTitleBBox = div.getBoundingClientRect();\n dv.attr('width', classTitleBBox.width);\n dv.attr('height', classTitleBBox.height);\n }\n maxHeight += classTitleBBox.height + rowPadding;\n if (classTitleBBox.width > maxWidth) {\n maxWidth = classTitleBBox.width;\n }\n const classAttributes = [];\n node.classData.members.forEach((member) => {\n const parsedInfo = member.getDisplayDetails();\n let parsedText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n parsedText = parsedText.replace(//g, '>');\n }\n const lbl = labelContainer\n .node()\n .appendChild(\n createLabel(\n parsedText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n classAttributes.push(lbl);\n });\n\n maxHeight += lineHeight;\n\n const classMethods = [];\n node.classData.methods.forEach((member) => {\n const parsedInfo = member.getDisplayDetails();\n let displayText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n displayText = displayText.replace(//g, '>');\n }\n const lbl = labelContainer\n .node()\n .appendChild(\n createLabel(\n displayText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n\n classMethods.push(lbl);\n });\n\n maxHeight += lineHeight;\n\n // 2. Position the labels\n\n // position the interface label\n if (hasInterface) {\n let diffX = (maxWidth - interfaceBBox.width) / 2;\n select(interfaceLabel).attr(\n 'transform',\n 'translate( ' + ((-1 * maxWidth) / 2 + diffX) + ', ' + (-1 * maxHeight) / 2 + ')'\n );\n verticalPos = interfaceBBox.height + rowPadding;\n }\n // Position the class title label\n let diffX = (maxWidth - classTitleBBox.width) / 2;\n select(classTitleLabel).attr(\n 'transform',\n 'translate( ' +\n ((-1 * maxWidth) / 2 + diffX) +\n ', ' +\n ((-1 * maxHeight) / 2 + verticalPos) +\n ')'\n );\n verticalPos += classTitleBBox.height + rowPadding;\n\n topLine\n .attr('class', 'divider')\n .attr('x1', -maxWidth / 2 - halfPadding)\n .attr('x2', maxWidth / 2 + halfPadding)\n .attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos)\n .attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n\n verticalPos += lineHeight;\n\n classAttributes.forEach((lbl) => {\n select(lbl).attr(\n 'transform',\n 'translate( ' +\n -maxWidth / 2 +\n ', ' +\n ((-1 * maxHeight) / 2 + verticalPos + lineHeight / 2) +\n ')'\n );\n //get the height of the bounding box of each member if exists\n const memberBBox = lbl?.getBBox();\n verticalPos += (memberBBox?.height ?? 0) + rowPadding;\n });\n\n verticalPos += lineHeight;\n bottomLine\n .attr('class', 'divider')\n .attr('x1', -maxWidth / 2 - halfPadding)\n .attr('x2', maxWidth / 2 + halfPadding)\n .attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos)\n .attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n\n verticalPos += lineHeight;\n\n classMethods.forEach((lbl) => {\n select(lbl).attr(\n 'transform',\n 'translate( ' + -maxWidth / 2 + ', ' + ((-1 * maxHeight) / 2 + verticalPos) + ')'\n );\n const memberBBox = lbl?.getBBox();\n verticalPos += (memberBBox?.height ?? 0) + rowPadding;\n });\n\n rect\n .attr('style', node.style)\n .attr('class', 'outer title-state')\n .attr('x', -maxWidth / 2 - halfPadding)\n .attr('y', -(maxHeight / 2) - halfPadding)\n .attr('width', maxWidth + node.padding)\n .attr('height', maxHeight + node.padding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst shapes = {\n rhombus: question,\n composite,\n question,\n rect,\n labelRect,\n rectWithTitle,\n choice,\n circle,\n doublecircle,\n stadium,\n hexagon,\n block_arrow,\n rect_left_inv_arrow,\n lean_right,\n lean_left,\n trapezoid,\n inv_trapezoid,\n rect_right_inv_arrow,\n cylinder,\n start,\n end,\n note,\n subroutine,\n fork: forkJoin,\n join: forkJoin,\n class_box,\n};\n\nlet nodeElems = {};\n\nexport const insertNode = async (elem, node, renderOptions) => {\n let newEl;\n let el;\n\n // Add link when appropriate\n if (node.link) {\n let target;\n if (getConfig().securityLevel === 'sandbox') {\n target = '_top';\n } else if (node.linkTarget) {\n target = node.linkTarget || '_blank';\n }\n newEl = elem.insert('svg:a').attr('xlink:href', node.link).attr('target', target);\n el = await shapes[node.shape](newEl, node, renderOptions);\n } else {\n el = await shapes[node.shape](elem, node, renderOptions);\n newEl = el;\n }\n if (node.tooltip) {\n el.attr('title', node.tooltip);\n }\n if (node.class) {\n el.attr('class', 'node default ' + node.class);\n }\n\n nodeElems[node.id] = newEl;\n\n if (node.haveCallback) {\n nodeElems[node.id].attr('class', nodeElems[node.id].attr('class') + ' clickable');\n }\n return newEl;\n};\nexport const setNodeElem = (elem, node) => {\n nodeElems[node.id] = elem;\n};\nexport const clear = () => {\n nodeElems = {};\n};\n\nexport const positionNode = (node) => {\n const el = nodeElems[node.id];\n log.trace(\n 'Transforming node',\n node.diff,\n node,\n 'translate(' + (node.x - node.width / 2 - 5) + ', ' + node.width / 2 + ')'\n );\n const padding = 8;\n const diff = node.diff || 0;\n if (node.clusterNode) {\n el.attr(\n 'transform',\n 'translate(' +\n (node.x + diff - node.width / 2) +\n ', ' +\n (node.y - node.height / 2 - padding) +\n ')'\n );\n } else {\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n }\n return diff;\n};\n", "import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { getConfig } from '../../config.js';\nimport { insertEdge, insertEdgeLabel, positionEdgeLabel } from '../../dagre-wrapper/edges.js';\nimport { insertNode, positionNode } from '../../dagre-wrapper/nodes.js';\nimport { getStylesFromArray } from '../../utils.js';\nimport type { BlockDB } from './blockDB.js';\nimport type { Block } from './blockTypes.js';\n\nfunction getNodeFromBlock(block: Block, db: BlockDB, positioned = false) {\n const vertex = block;\n\n let classStr = 'default';\n if ((vertex?.classes?.length || 0) > 0) {\n classStr = (vertex?.classes ?? []).join(' ');\n }\n classStr = classStr + ' flowchart-label';\n\n // We create a SVG label, either by delegating to addHtmlLabel or manually\n let radius = 0;\n let shape = '';\n let padding;\n // Set the shape based parameters\n switch (vertex.type) {\n case 'round':\n radius = 5;\n shape = 'rect';\n break;\n case 'composite':\n radius = 0;\n shape = 'composite';\n padding = 0;\n break;\n case 'square':\n shape = 'rect';\n break;\n case 'diamond':\n shape = 'question';\n break;\n case 'hexagon':\n shape = 'hexagon';\n break;\n case 'block_arrow':\n shape = 'block_arrow';\n break;\n case 'odd':\n shape = 'rect_left_inv_arrow';\n break;\n case 'lean_right':\n shape = 'lean_right';\n break;\n case 'lean_left':\n shape = 'lean_left';\n break;\n case 'trapezoid':\n shape = 'trapezoid';\n break;\n case 'inv_trapezoid':\n shape = 'inv_trapezoid';\n break;\n case 'rect_left_inv_arrow':\n shape = 'rect_left_inv_arrow';\n break;\n case 'circle':\n shape = 'circle';\n break;\n case 'ellipse':\n shape = 'ellipse';\n break;\n case 'stadium':\n shape = 'stadium';\n break;\n case 'subroutine':\n shape = 'subroutine';\n break;\n case 'cylinder':\n shape = 'cylinder';\n break;\n case 'group':\n shape = 'rect';\n break;\n case 'doublecircle':\n shape = 'doublecircle';\n break;\n default:\n shape = 'rect';\n }\n\n const styles = getStylesFromArray(vertex?.styles ?? []);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.label;\n\n const bounds = vertex.size ?? { width: 0, height: 0, x: 0, y: 0 };\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: vertexText,\n rx: radius,\n ry: radius,\n class: classStr,\n style: styles.style,\n id: vertex.id,\n directions: vertex.directions,\n width: bounds.width,\n height: bounds.height,\n x: bounds.x,\n y: bounds.y,\n positioned,\n intersect: undefined,\n type: vertex.type,\n padding: padding ?? getConfig()?.block?.padding ?? 0,\n };\n return node;\n}\nasync function calculateBlockSize(\n elem: d3.Selection,\n block: any,\n db: any\n) {\n const node = getNodeFromBlock(block, db, false);\n if (node.type === 'group') {\n return;\n }\n\n // Add the element to the DOM to size it\n const config = getConfig();\n const nodeEl = await insertNode(elem, node, { config });\n const boundingBox = nodeEl.node().getBBox();\n const obj = db.getBlock(node.id);\n obj.size = { width: boundingBox.width, height: boundingBox.height, x: 0, y: 0, node: nodeEl };\n db.setBlock(obj);\n nodeEl.remove();\n}\ntype ActionFun = typeof calculateBlockSize;\n\nexport async function insertBlockPositioned(elem: any, block: Block, db: any) {\n const node = getNodeFromBlock(block, db, true);\n // Add the element to the DOM to size it\n const obj = db.getBlock(node.id);\n if (obj.type !== 'space') {\n const config = getConfig();\n await insertNode(elem, node, { config });\n block.intersect = node?.intersect;\n positionNode(node);\n }\n}\n\nexport async function performOperations(\n elem: d3.Selection,\n blocks: Block[],\n db: BlockDB,\n operation: ActionFun\n) {\n for (const block of blocks) {\n await operation(elem, block, db);\n if (block.children) {\n await performOperations(elem, block.children, db, operation);\n }\n }\n}\n\nexport async function calculateBlockSizes(elem: any, blocks: Block[], db: BlockDB) {\n await performOperations(elem, blocks, db, calculateBlockSize);\n}\n\nexport async function insertBlocks(\n elem: d3.Selection,\n blocks: Block[],\n db: BlockDB\n) {\n await performOperations(elem, blocks, db, insertBlockPositioned);\n}\n\nexport async function insertEdges(\n elem: any,\n edges: Block[],\n blocks: Block[],\n db: BlockDB,\n id: string\n) {\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true,\n });\n g.setGraph({\n rankdir: 'TB',\n nodesep: 10,\n ranksep: 10,\n marginx: 8,\n marginy: 8,\n });\n\n for (const block of blocks) {\n if (block.size) {\n g.setNode(block.id, {\n width: block.size.width,\n height: block.size.height,\n intersect: block.intersect,\n });\n }\n }\n\n for (const edge of edges) {\n // elem, e, edge, clusterDb, diagramType, graph;\n if (edge.start && edge.end) {\n const startBlock = db.getBlock(edge.start);\n const endBlock = db.getBlock(edge.end);\n\n if (startBlock?.size && endBlock?.size) {\n const start = startBlock.size;\n const end = endBlock.size;\n const points = [\n { x: start.x, y: start.y },\n { x: start.x + (end.x - start.x) / 2, y: start.y + (end.y - start.y) / 2 },\n { x: end.x, y: end.y },\n ];\n // edge.points = points;\n insertEdge(\n elem,\n { v: edge.start, w: edge.end, name: edge.id },\n {\n ...edge,\n arrowTypeEnd: edge.arrowTypeEnd,\n arrowTypeStart: edge.arrowTypeStart,\n points,\n classes: 'edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1',\n },\n undefined,\n 'block',\n g,\n id\n );\n if (edge.label) {\n await insertEdgeLabel(elem, {\n ...edge,\n label: edge.label,\n labelStyle: 'stroke: #333; stroke-width: 1.5px;fill:none;',\n arrowTypeEnd: edge.arrowTypeEnd,\n arrowTypeStart: edge.arrowTypeStart,\n points,\n classes: 'edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1',\n });\n positionEdgeLabel(\n { ...edge, x: points[1].x, y: points[1].y },\n {\n originalPath: points,\n }\n );\n }\n }\n }\n }\n}\n", "import { select as d3select } from 'd3';\nimport type { Diagram } from '../../Diagram.js';\nimport * as configApi from '../../config.js';\nimport insertMarkers from '../../dagre-wrapper/markers.js';\nimport { log } from '../../logger.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport type { BlockDB } from './blockDB.js';\nimport { layout } from './layout.js';\nimport { calculateBlockSizes, insertBlocks, insertEdges } from './renderHelpers.js';\n\nexport const getClasses = function (text: any, diagObj: any) {\n return diagObj.db.getClasses();\n};\n\nexport const draw = async function (\n text: string,\n id: string,\n _version: string,\n diagObj: Diagram\n): Promise {\n const { securityLevel, block: conf } = configApi.getConfig();\n const db = diagObj.db as BlockDB;\n let sandboxElement: any;\n if (securityLevel === 'sandbox') {\n sandboxElement = d3select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? d3select(sandboxElement.nodes()[0].contentDocument.body)\n : d3select('body');\n\n const svg =\n securityLevel === 'sandbox'\n ? root.select(`[id=\"${id}\"]`)\n : d3select(`[id=\"${id}\"]`);\n\n // Define the supported markers for the diagram\n const markers = ['point', 'circle', 'cross'];\n\n // Add the marker definitions to the svg as marker tags\n insertMarkers(svg, markers, diagObj.type, id);\n\n const bl = db.getBlocks();\n const blArr = db.getBlocksFlat();\n const edges = db.getEdges();\n\n const nodes = svg.insert('g').attr('class', 'block');\n await calculateBlockSizes(nodes, bl, db);\n const bounds = layout(db);\n await insertBlocks(nodes, bl, db);\n await insertEdges(nodes, edges, blArr, db, id);\n\n // Establish svg dimensions and get width and height\n // Why, oh why ????\n if (bounds) {\n const bounds2 = bounds;\n const magicFactor = Math.max(1, Math.round(0.125 * (bounds2.width / bounds2.height)));\n const height = bounds2.height + magicFactor + 10;\n const width = bounds2.width + 10;\n const { useMaxWidth } = conf!;\n configureSvgSize(svg, height, width, !!useMaxWidth);\n log.debug('Here Bounds', bounds, bounds2);\n svg.attr(\n 'viewBox',\n `${bounds2.x - 5} ${bounds2.y - 5} ${bounds2.width + 10} ${bounds2.height + 10}`\n );\n }\n};\n\nexport default {\n draw,\n getClasses,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: jison doesn't export types\nimport parser from './parser/block.jison';\nimport db from './blockDB.js';\nimport flowStyles from './styles.js';\nimport renderer from './blockRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles: flowStyles,\n};\n"],
"mappings": "4hBAyEA,IAAIA,GAAU,UAAU,CACxB,IAAIC,EAAEC,EAAA,SAASC,EAAEC,EAAEH,EAAEI,EAAE,CAAC,IAAIJ,EAAEA,GAAG,CAAC,EAAEI,EAAEF,EAAE,OAAOE,IAAIJ,EAAEE,EAAEE,CAAC,CAAC,EAAED,EAAE,CAAC,OAAOH,CAAC,EAAhE,KAAkEK,EAAI,CAAC,EAAE,CAAC,EAAEC,EAAI,CAAC,EAAE,EAAE,EAAEC,EAAI,CAAC,EAAE,EAAE,EAAEC,EAAI,CAAC,EAAE,EAAE,EAAEC,EAAI,CAAC,EAAE,EAAE,EAAEC,EAAI,CAAC,EAAE,EAAE,EAAEC,EAAI,CAAC,EAAE,EAAE,EAAEC,EAAI,CAAC,EAAE,EAAE,EAAEC,EAAI,CAAC,EAAE,EAAE,EAAEC,EAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE,EAAEC,EAAI,CAAC,EAAE,EAAE,EAAEC,EAAI,CAAC,EAAE,EAAE,EAAEC,EAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE,EAAEC,EAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE,EAAEC,EAAI,CAAC,EAAE,EAAE,EAC7TpB,EAAS,CAAC,MAAOE,EAAA,UAAkB,CAAE,EAApB,SACrB,GAAI,CAAC,EACL,SAAU,CAAC,MAAQ,EAAE,WAAa,EAAE,UAAY,EAAE,GAAK,EAAE,UAAY,EAAE,MAAQ,EAAE,IAAM,EAAE,MAAQ,EAAE,kBAAoB,GAAG,SAAW,GAAG,KAAO,GAAG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"$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "num", "spaceId", "edgeData", "id2", "id", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "block_default", "parser", "blockDatabase", "edgeList", "edgeCount", "COLOR_KEYWORD", "FILL_KEYWORD", "BG_FILL", "STYLECLASS_SEP", "config", "getConfig", "classes", "sanitizeText", "__name", "txt", "common_default", "addStyleClass", "id", "styleAttributes", "foundClass", "attrib", "fixedAttrib", "newStyle2", "addStyle2Node", "styles", "foundBlock", "setCssClass", "itemIds", "cssClassName", "trimmedId", "populateBlockDatabase", "_blockList", "parent", "blockList", "children", "block", "count", "existingBlock", "w", "j", "newBlock", "clone_default", "blocks", "rootBlock", "clear", "log", "typeStr2Type", "typeStr", "edgeTypeStr2Type", "edgeStrToEdgeData", "cnt", "generateId", "setHierarchy", "getColumns", "blockId", "getBlocksFlat", "getBlocks", "getEdges", "getBlock", "setBlock", "getLogger", "getClasses", "db", "blockDB_default", "fade", "__name", "color", "opacity", "channel", "channel_default", "r", "g", "b", "rgba_default", "getStyles", "options", "styles_default", "insertMarkers", "__name", "elem", "markerArray", "type", "id", "markerName", "markers", "extension", "log", "composition", "aggregation", "dependency", "lollipop", "point", "circle", "cross", "barb", "markers_default", "padding", "getConfig", "calculateBlockPosition", "columns", "position", "px", "py", "__name", "getMaxChildSize", "block", "maxWidth", "maxHeight", "child", "width", "height", "x", "y", "log", "setBlockSizes", "db", "siblingWidth", "siblingHeight", "childSize", "numItems", "xSize", "ySize", "childWidth", "childHeight", "num", "layoutBlocks", "widthOfChildren", "columnPos", "startingPosX", "rowPos", "parent", "halfWidth", "findBounds", "minX", "minY", "maxX", "maxY", "layout", "root", "applyStyle", "dom", "styleFn", "__name", "addHtmlLabel", "node", "fo", "select_default", "div", "label", "labelClass", "span", "createLabel", "_vertexText", "style", "isTitle", "isNode", "vertexText", "evaluate", "getConfig", "log", "replaceIconSubstring", "decodeEntities", "svgLabel", "rows", "row", "tspan", "createLabel_default", "addEdgeMarkers", "__name", "svgPath", "edge", "url", "id", "diagramType", "addEdgeMarker", "arrowTypesMap", "position", "arrowType", "endMarkerType", "log", "suffix", "edgeLabels", "terminalLabels", "insertEdgeLabel", "__name", "elem", "edge", "config", "getConfig", "useHtmlLabels", "evaluate", "labelElement", "createText", "createLabel_default", "edgeLabel", "label", "bbox", "div", "dv", "select_default", "edgeLabels", "fo", "startLabelElement", "startEdgeLabelLeft", "inner", "slBox", "terminalLabels", "setTerminalWidth", "startEdgeLabelRight", "endLabelElement", "endEdgeLabelLeft", "endEdgeLabelRight", "value", "positionEdgeLabel", "paths", "log", "path", "siteConfig", "subGraphTitleTotalMargin", "getSubGraphTitleMargins", "el", "x", "y", "pos", "utils_default", "outsideNode", "node", "point", "dx", "dy", "w", "h", "intersection", "outsidePoint", "insidePoint", "r", "Q", "R", "q", "res", "_x", "_y", "cutPathAtIntersect", "_points", "boundaryNode", "points", "lastPointOutside", "isInside", "inter", "pointPresent", "p", "e", "insertEdge", "clusterDb", "diagramType", "graph", "id", "pointsHasChanged", "tail", "head", "lineData", "curve", "basis_default", "getLineFunctionsWithOffset", "lineFunction", "line_default", "strokeClasses", "svgPath", "url", "addEdgeMarkers", "expandAndDeduplicateDirections", "__name", "directions", "uniqueDirections", "direction", "getArrowPoints", "duplicatedDirections", "bbox", "node", "f", "height", "midpoint", "width", "padding", "intersectNode", "node", "point", "__name", "intersect_node_default", "intersectEllipse", "node", "rx", "ry", "point", "cx", "cy", "px", "py", "det", "dx", "dy", "__name", "intersect_ellipse_default", "intersectCircle", "node", "rx", "point", "intersect_ellipse_default", "__name", "intersect_circle_default", "intersectLine", "p1", "p2", "q1", "q2", "a1", "a2", "b1", "b2", "c1", "c2", "r1", "r2", "r3", "r4", "denom", "offset", "num", "x", "y", "sameSign", "__name", "intersect_line_default", "intersect_polygon_default", "intersectPolygon", "node", "polyPoints", "point", "x1", "y1", "intersections", "minX", "minY", "entry", "left", "top", "i", "p1", "p2", "intersect", "intersect_line_default", "p", "q", "pdx", "pdy", "distp", "qdx", "qdy", "distq", "__name", "intersectRect", "__name", "node", "point", "x", "y", "dx", "dy", "w", "h", "sx", "sy", "intersect_rect_default", "intersect_default", "intersect_node_default", "intersect_circle_default", "intersect_ellipse_default", "intersect_polygon_default", "intersect_rect_default", "labelHelper", "__name", "parent", "node", "_classes", "isNode", "config", "getConfig", "classes", "useHtmlLabels", "evaluate", "shapeSvg", "label", "labelText", "textNode", "text", "createText", "sanitizeText", "decodeEntities", "createLabel_default", "bbox", "halfPadding", "div", "dv", "select_default", "images", "noImgText", "img", "res", "setupImage", "bodyFontSize", "width", "updateNodeBounds", "element", "insertPolygonShape", "w", "h", "points", "d", "note", "__name", "parent", "node", "getConfig", "shapeSvg", "bbox", "halfPadding", "labelHelper", "log", "rect", "updateNodeBounds", "point", "intersect_default", "note_default", "formatClass", "__name", "str", "getClassesFromNode", "node", "otherClasses", "question", "parent", "shapeSvg", "bbox", "labelHelper", "w", "h", "s", "points", "log", "questionElem", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "choice", "d", "hexagon", "f", "m", "hex", "block_arrow", "getArrowPoints", "blockArrow", "rect_left_inv_arrow", "lean_right", "el", "lean_left", "trapezoid", "inv_trapezoid", "rect_right_inv_arrow", "cylinder", "rx", "ry", "shape", "pos", "x", "y", "rect", "halfPadding", "totalWidth", "totalHeight", "propKeys", "applyNodePropertyBorders", "propKey", "composite", "labelRect", "borders", "strokeDashArray", "addBorder", "length", "skipBorder", "rectWithTitle", "classes", "innerLine", "label", "text2", "title", "text", "createLabel_default", "evaluate", "getConfig", "div", "dv", "select_default", "textRows", "titleBox", "descr", "stadium", "circle", "doublecircle", "gap", "circleGroup", "outerCircle", "innerCircle", "subroutine", "start", "forkJoin", "dir", "width", "height", "end", "class_box", "rowPadding", "lineHeight", "topLine", "bottomLine", "maxWidth", "maxHeight", "labelContainer", "verticalPos", "hasInterface", "interfaceLabelText", "interfaceLabel", "interfaceBBox", "classTitleString", "classTitleLabel", "classTitleBBox", "classAttributes", "member", "parsedInfo", "parsedText", "lbl", "classMethods", "displayText", "diffX", "memberBBox", "shapes", "note_default", "nodeElems", "insertNode", "elem", "renderOptions", "newEl", "target", "positionNode", "__name", "node", "el", "nodeElems", "log", "padding", "diff", "getNodeFromBlock", "block", "db", "positioned", "vertex", "classStr", "radius", "shape", "padding", "styles", "getStylesFromArray", "vertexText", "bounds", "getConfig", "__name", "calculateBlockSize", "elem", "node", "config", "nodeEl", "insertNode", "boundingBox", "obj", "insertBlockPositioned", "positionNode", "performOperations", "blocks", "operation", "calculateBlockSizes", "insertBlocks", "insertEdges", "edges", "id", "g", "Graph", "edge", "startBlock", "endBlock", "start", "end", "points", "insertEdge", "insertEdgeLabel", "positionEdgeLabel", "getClasses", "__name", "text", "diagObj", "draw", "id", "_version", "securityLevel", "conf", "getConfig", "db", "sandboxElement", "select_default", "root", "svg", "markers_default", "bl", "blArr", "edges", "nodes", "calculateBlockSizes", "bounds", "layout", "insertBlocks", "insertEdges", "bounds2", "magicFactor", "height", "width", "useMaxWidth", "configureSvgSize", "log", "blockRenderer_default", "diagram", "block_default", "blockDB_default", "blockRenderer_default", "styles_default"]
}