cc-viewer 1.6.192 → 1.6.193
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/App-BCmqNn2_.js +1 -0
- package/dist/assets/AppHeader.module-wVvzNXcQ.js +2 -0
- package/dist/assets/Mobile-D8gW8cio.js +1 -0
- package/dist/assets/_baseUniq-ob5WCjfq.js +1 -0
- package/dist/assets/arc-tZK_aa2R.js +1 -0
- package/dist/assets/architectureDiagram-Q4EWVU46-CLUEAtql.js +1 -0
- package/dist/assets/blockDiagram-DXYQGD6D-xDM5WOZm.js +1 -0
- package/dist/assets/c4Diagram-AHTNJAMY-B6RZf0_O.js +1 -0
- package/dist/assets/{channel-G3S1FOvm.js → channel-yPGVmk7J.js} +1 -1
- package/dist/assets/chunk-4BX2VUAB-CEnrJ8lf.js +1 -0
- package/dist/assets/chunk-4TB4RGXK-rbexG5yC.js +1 -0
- package/dist/assets/chunk-55IACEB6-blt2QS_L.js +1 -0
- package/dist/assets/chunk-EDXVE4YY-CJab02SL.js +1 -0
- package/dist/assets/chunk-FMBD7UC4-b2SvZGni.js +1 -0
- package/dist/assets/chunk-OYMX7WX6-CTafJWoH.js +1 -0
- package/dist/assets/chunk-QZHKN3VN-DocThykI.js +1 -0
- package/dist/assets/{chunk-YZCP3GAM-BYW1PNda.js → chunk-YZCP3GAM-ntU--N7q.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-RlKigyDm.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-RlKigyDm.js +1 -0
- package/dist/assets/clone-zoFVytWa.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-DOA8531R.js +1 -0
- package/dist/assets/cytoscape.esm-CT1mZavR.js +9 -0
- package/dist/assets/dagre-KV5264BT-B9TB-rx0.js +1 -0
- package/dist/assets/defaultLocale-DZ7E7S9R.js +1 -0
- package/dist/assets/diagram-5BDNPKRD-d4f64tiM.js +1 -0
- package/dist/assets/diagram-G4DWMVQ6-DAHZ4eKZ.js +1 -0
- package/dist/assets/diagram-MMDJMWI5-Dw-VpXtN.js +1 -0
- package/dist/assets/diagram-TYMM5635-BMF1VNan.js +1 -0
- package/dist/assets/erDiagram-SMLLAGMA-DARFHI5n.js +1 -0
- package/dist/assets/flowDiagram-DWJPFMVM-4zgN2SRF.js +1 -0
- package/dist/assets/ganttDiagram-T4ZO3ILL-DnxYMHQX.js +1 -0
- package/dist/assets/gitGraphDiagram-UUTBAWPF-Tkkak6GE.js +1 -0
- package/dist/assets/graph-C8koNCFy.js +1 -0
- package/dist/assets/html2canvas.esm-HFdlUwfn.js +20 -0
- package/dist/assets/index-Cg7laj9Y.js +2 -0
- package/dist/assets/infoDiagram-42DDH7IO-B3fxENEb.js +1 -0
- package/dist/assets/{init-C7FSzFHJ.js → init-DMZMl1PR.js} +1 -1
- package/dist/assets/ishikawaDiagram-UXIWVN3A-DSYRAz6c.js +1 -0
- package/dist/assets/journeyDiagram-VCZTEJTY-C1ULMq89.js +1 -0
- package/dist/assets/kanban-definition-6JOO6SKY-DiS9f1Ou.js +1 -0
- package/dist/assets/katex-DSO9-KAp.js +1 -0
- package/dist/assets/layout-Dw7PqMj_.js +1 -0
- package/dist/assets/linear-CzxAHmCK.js +1 -0
- package/dist/assets/mermaid.core-DaRhWNVu.js +7 -0
- package/dist/assets/min-CYyUMv00.js +1 -0
- package/dist/assets/mindmap-definition-QFDTVHPH-BSnxqws_.js +1 -0
- package/dist/assets/ordinal-DA-_8pMy.js +1 -0
- package/dist/assets/pieDiagram-DEJITSTG-DLqzHBqi.js +1 -0
- package/dist/assets/quadrantDiagram-34T5L4WZ-BxGLS3JO.js +1 -0
- package/dist/assets/requirementDiagram-MS252O5E-CFH2qTHK.js +1 -0
- package/dist/assets/sankeyDiagram-XADWPNL6-CbI11f-J.js +1 -0
- package/dist/assets/sequenceDiagram-FGHM5R23-WQeKqjGD.js +1 -0
- package/dist/assets/stateDiagram-FHFEXIEX--nhFK-dR.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-DpubT_1_.js +1 -0
- package/dist/assets/timeline-definition-GMOUNBTQ-Dvcn0Sjo.js +1 -0
- package/dist/assets/vendor-antd-n6I8Q8WX.js +17 -0
- package/dist/assets/vendor-codemirror-CXzpjiCu.js +1 -0
- package/dist/assets/vendor-highlight-IFTJ9nxW.js +1 -0
- package/dist/assets/vendor-markdown-Bpu4AByL.js +1 -0
- package/dist/assets/vendor-qrcode-CVdDMI3Y.js +6 -0
- package/dist/assets/vendor-virtuoso-bstsOWAx.js +1 -0
- package/dist/assets/vendor-xterm-DckPrCx1.js +37 -0
- package/dist/assets/vennDiagram-DHZGUBPP-Bjjoa-3c.js +1 -0
- package/dist/assets/wardley-RL74JXVD-D8p4v9Ts.js +1 -0
- package/dist/assets/wardleyDiagram-NUSXRM2D-DoGm-2Kz.js +1 -0
- package/dist/assets/xychartDiagram-5P7HB3ND-D2jULfQB.js +1 -0
- package/dist/index.html +3 -3
- package/package.json +2 -1
- package/dist/assets/App-DuGHwadX.js +0 -31
- package/dist/assets/AppHeader.module-CozRDKfP.js +0 -573
- package/dist/assets/Mobile-Bab634xx.js +0 -10
- package/dist/assets/_baseUniq-DJPPdHyT.js +0 -1
- package/dist/assets/arc-DZ3Bjq-l.js +0 -1
- package/dist/assets/architectureDiagram-Q4EWVU46-xy0J2lr0.js +0 -36
- package/dist/assets/blockDiagram-DXYQGD6D-CoUm8UC5.js +0 -132
- package/dist/assets/c4Diagram-AHTNJAMY-CFHX4Dfx.js +0 -10
- package/dist/assets/chunk-4BX2VUAB-CiktxOyY.js +0 -1
- package/dist/assets/chunk-4TB4RGXK-DHl7ZlQV.js +0 -206
- package/dist/assets/chunk-55IACEB6-DcgWxDD5.js +0 -1
- package/dist/assets/chunk-EDXVE4YY-DeUzWpQx.js +0 -1
- package/dist/assets/chunk-FMBD7UC4-BCaKpugk.js +0 -15
- package/dist/assets/chunk-OYMX7WX6-DKMEMbG9.js +0 -231
- package/dist/assets/chunk-QZHKN3VN-BREApeQ-.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-B0-7EUsz.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-B0-7EUsz.js +0 -1
- package/dist/assets/clone-CX_D5SrR.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-DpwiMCiq.js +0 -1
- package/dist/assets/cytoscape.esm-BMgRe88L.js +0 -331
- package/dist/assets/dagre-KV5264BT-Dc7qbya2.js +0 -4
- package/dist/assets/defaultLocale-CcTwRAjA.js +0 -1
- package/dist/assets/diagram-5BDNPKRD-v7FsHeLQ.js +0 -10
- package/dist/assets/diagram-G4DWMVQ6-BhKNBlcE.js +0 -24
- package/dist/assets/diagram-MMDJMWI5-C-3cRdzG.js +0 -43
- package/dist/assets/diagram-TYMM5635-HfNcJIfT.js +0 -24
- package/dist/assets/erDiagram-SMLLAGMA-Ckj0dkk7.js +0 -85
- package/dist/assets/flowDiagram-DWJPFMVM-yf315tJr.js +0 -162
- package/dist/assets/ganttDiagram-T4ZO3ILL-Ch2bINVC.js +0 -292
- package/dist/assets/gitGraphDiagram-UUTBAWPF-CesdgsJi.js +0 -106
- package/dist/assets/graph-CRpmapJV.js +0 -1
- package/dist/assets/html2canvas.esm-B8c0f9Wq.js +0 -22
- package/dist/assets/index-DJ0iGKLy.js +0 -2
- package/dist/assets/infoDiagram-42DDH7IO-CuD16P9Y.js +0 -2
- package/dist/assets/ishikawaDiagram-UXIWVN3A-4y8aG54G.js +0 -70
- package/dist/assets/journeyDiagram-VCZTEJTY-B6TtR2Zk.js +0 -139
- package/dist/assets/kanban-definition-6JOO6SKY-DTcNHYUS.js +0 -89
- package/dist/assets/katex-CJRKSY_b.js +0 -257
- package/dist/assets/layout-CX5hpkD2.js +0 -1
- package/dist/assets/linear-tWlC-NXc.js +0 -1
- package/dist/assets/mermaid.core-DNvsWVDx.js +0 -308
- package/dist/assets/min-CDExe3RN.js +0 -1
- package/dist/assets/mindmap-definition-QFDTVHPH-CW0yNQcb.js +0 -96
- package/dist/assets/ordinal-aRyHI6gl.js +0 -1
- package/dist/assets/pieDiagram-DEJITSTG-DNrnOqmz.js +0 -30
- package/dist/assets/quadrantDiagram-34T5L4WZ-Cl176vnh.js +0 -7
- package/dist/assets/requirementDiagram-MS252O5E-DKp3A5f_.js +0 -84
- package/dist/assets/sankeyDiagram-XADWPNL6-BMV0lAz8.js +0 -10
- package/dist/assets/sequenceDiagram-FGHM5R23-CQ4preep.js +0 -157
- package/dist/assets/stateDiagram-FHFEXIEX-BKqYYN8H.js +0 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-C1W1ECmZ.js +0 -1
- package/dist/assets/timeline-definition-GMOUNBTQ-4kgeuumv.js +0 -120
- package/dist/assets/vendor-antd-Dk5s46Ag.js +0 -406
- package/dist/assets/vendor-codemirror-DxvDOrio.js +0 -46
- package/dist/assets/vendor-highlight-DVwgAdJY.js +0 -3
- package/dist/assets/vendor-markdown-DO-Ppp4f.js +0 -60
- package/dist/assets/vendor-qrcode-hI5wlAgK.js +0 -9
- package/dist/assets/vendor-virtuoso-HW77kTCh.js +0 -1
- package/dist/assets/vendor-xterm-D2cUrYEx.js +0 -140
- package/dist/assets/vennDiagram-DHZGUBPP-CqBcUIdK.js +0 -34
- package/dist/assets/wardley-RL74JXVD-CbEnkKx8.js +0 -162
- package/dist/assets/wardleyDiagram-NUSXRM2D-BJrjkZMg.js +0 -20
- package/dist/assets/xychartDiagram-5P7HB3ND-D8aBEz8e.js +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _a,_b;import{g as getIconStyles}from"./chunk-FMBD7UC4-b2SvZGni.js";import{_ as __name,C as getConfig,d as select,e as configureSvgSize,l as log,y as clear,A as rgba,ah as getLineFunctionsWithOffset,Q as line,R as curveBasis,c as getConfig2,N as getUrl,ai as getEffectiveHtmlLabels,aj as createText,ak as computeLabelTransform,al as getSubGraphTitleMargins,u as utils_default,k as common_default,am as getStylesFromArray,i as sanitizeText,an as decodeEntities,ao as configureLabelImages}from"./mermaid.core-DaRhWNVu.js";import{c as clone}from"./clone-zoFVytWa.js";import{G as Graph}from"./graph-C8koNCFy.js";import{c as channel}from"./channel-yPGVmk7J.js";import"./index-Cg7laj9Y.js";import"./vendor-codemirror-CXzpjiCu.js";import"./vendor-antd-n6I8Q8WX.js";import"./vendor-markdown-Bpu4AByL.js";import"./_baseUniq-ob5WCjfq.js";var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,15],$V1=[1,7],$V2=[1,13],$V3=[1,14],$V4=[1,19],$V5=[1,16],$V6=[1,17],$V7=[1,18],$V8=[8,30],$V9=[8,10,21,28,29,30,31,39,43,46],$Va=[1,23],$Vb=[1,24],$Vc=[8,10,15,16,21,28,29,30,31,39,43,46],$Vd=[8,10,15,16,21,27,28,29,30,31,39,43,46],$Ve=[1,49],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",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"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 4:yy.getLogger().debug("Rule: separator (NL) ");break;case 5:yy.getLogger().debug("Rule: separator (Space) ");break;case 6:yy.getLogger().debug("Rule: separator (EOF) ");break;case 7:yy.getLogger().debug("Rule: hierarchy: ",$$[$0-1]),yy.setHierarchy($$[$0-1]);break;case 8:yy.getLogger().debug("Stop NL ");break;case 9:yy.getLogger().debug("Stop EOF ");break;case 10:yy.getLogger().debug("Stop NL2 ");break;case 11:yy.getLogger().debug("Stop EOF2 ");break;case 12:yy.getLogger().debug("Rule: statement: ",$$[$0]),"number"==typeof $$[$0].length?this.$=$$[$0]:this.$=[$$[$0]];break;case 13:yy.getLogger().debug("Rule: statement #2: ",$$[$0-1]),this.$=[$$[$0-1]].concat($$[$0]);break;case 14:yy.getLogger().debug("Rule: link: ",$$[$0],yytext),this.$={edgeTypeStr:$$[$0],label:""};break;case 15:yy.getLogger().debug("Rule: LABEL link: ",$$[$0-3],$$[$0-1],$$[$0]),this.$={edgeTypeStr:$$[$0],label:$$[$0-1]};break;case 18:const num=parseInt($$[$0]),spaceId=yy.generateId();this.$={id:spaceId,type:"space",label:"",width:num,children:[]};break;case 23:yy.getLogger().debug("Rule: (nodeStatement link node) ",$$[$0-2],$$[$0-1],$$[$0]," typestr: ",$$[$0-1].edgeTypeStr);const edgeData=yy.edgeStrToEdgeData($$[$0-1].edgeTypeStr);this.$=[{id:$$[$0-2].id,label:$$[$0-2].label,type:$$[$0-2].type,directions:$$[$0-2].directions},{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"},{id:$$[$0].id,label:$$[$0].label,type:yy.typeStr2Type($$[$0].typeStr),directions:$$[$0].directions}];break;case 24: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)};break;case 25:yy.getLogger().debug("Rule: nodeStatement (node) ",$$[$0]),this.$={id:$$[$0].id,label:$$[$0].label,type:yy.typeStr2Type($$[$0].typeStr),directions:$$[$0].directions,widthInColumns:1};break;case 26:yy.getLogger().debug("APA123",this?this:"na"),yy.getLogger().debug("COLUMNS: ",$$[$0]),this.$={type:"column-setting",columns:"auto"===$$[$0]?-1:parseInt($$[$0])};break;case 27:yy.getLogger().debug("Rule: id-block statement : ",$$[$0-2],$$[$0-1]),yy.generateId(),this.$={...$$[$0-2],type:"composite",children:$$[$0-1]};break;case 28:yy.getLogger().debug("Rule: blockStatement : ",$$[$0-2],$$[$0-1],$$[$0]);const id=yy.generateId();this.$={id:id,type:"composite",label:"",children:$$[$0-1]};break;case 29:yy.getLogger().debug("Rule: node (NODE_ID separator): ",$$[$0]),this.$={id:$$[$0]};break;case 30:yy.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",$$[$0-1],$$[$0]),this.$={id:$$[$0-1],label:$$[$0].label,typeStr:$$[$0].typeStr,directions:$$[$0].directions};break;case 31:yy.getLogger().debug("Rule: dirList: ",$$[$0]),this.$=[$$[$0]];break;case 32:yy.getLogger().debug("Rule: dirList: ",$$[$0-1],$$[$0]),this.$=[$$[$0-1]].concat($$[$0]);break;case 33:yy.getLogger().debug("Rule: nodeShapeNLabel: ",$$[$0-2],$$[$0-1],$$[$0]),this.$={typeStr:$$[$0-2]+$$[$0],label:$$[$0-1]};break;case 34: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]};break;case 35:case 36:this.$={type:"classDef",id:$$[$0-1].trim(),css:$$[$0].trim()};break;case 37:this.$={type:"applyClass",id:$$[$0-1].trim(),styleClass:$$[$0].trim()};break;case 38:this.$={type:"applyStyles",id:$$[$0-1].trim(),stylesStr:$$[$0].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:$V0,11:3,13:4,19:5,20:6,21:$V1,22:8,23:9,24:10,25:11,26:12,28:$V2,29:$V3,31:$V4,39:$V5,43:$V6,46:$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,10:$V0,21:$V1,28:$V2,29:$V3,31:$V4,39:$V5,43:$V6,46:$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,31:$V4},{10:$V0,11:27,13:4,19:5,20:6,21:$V1,22:8,23:9,24:10,25:11,26:12,28:$V2,29:$V3,31:$V4,39:$V5,43:$V6,46:$V7},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},o($Vd,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},o($V8,[2,13]),{26:35,31:$V4},{31:[2,14]},{17:[1,36]},o($Vc,[2,24]),{10:$V0,11:37,13:4,14:22,15:$Va,16:$Vb,19:5,20:6,21:$V1,22:8,23:9,24:10,25:11,26:12,28:$V2,29:$V3,31:$V4,39:$V5,43:$V6,46:$V7},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[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]),{36:[1,47]},{33:48,34:$Ve},{15:[1,50]},o($V9,[2,27]),o($Vd,[2,33]),{38:[1,51]},{33:52,34:$Ve,38:[2,31]},{31:[2,15]},o($Vd,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return yy.getLogger().debug("Found block-beta"),10;case 1:return yy.getLogger().debug("Found id-block"),29;case 2:return yy.getLogger().debug("Found block"),10;case 3:yy.getLogger().debug(".",yy_.yytext);break;case 4:yy.getLogger().debug("_",yy_.yytext);break;case 5:return 5;case 6:return yy_.yytext=-1,28;case 7:return yy_.yytext=yy_.yytext.replace(/columns\s+/,""),yy.getLogger().debug("COLUMNS (LEX)",yy_.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:yy.getLogger().debug("LEX: POPPING STR:",yy_.yytext),this.popState();break;case 13:return yy.getLogger().debug("LEX: STR end:",yy_.yytext),"STR";case 14:return yy_.yytext=yy_.yytext.replace(/space\:/,""),yy.getLogger().debug("SPACE NUM (LEX)",yy_.yytext),21;case 15:return yy_.yytext="1",yy.getLogger().debug("COLUMNS (LEX)",yy_.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),yy.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),yy.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),yy.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),yy.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),yy.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),yy.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),yy.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),yy.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),yy.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),yy.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),yy.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),yy.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return yy.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return yy.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return yy.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return yy.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return yy.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return yy.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return yy.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return yy.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),yy.getLogger().debug("LEX ARR START"),37;case 74:return yy.getLogger().debug("Lex: NODE_ID",yy_.yytext),31;case 75:return yy.getLogger().debug("Lex: EOF",yy_.yytext),8;case 78:return"NODE_DESCR";case 80:yy.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:yy.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return yy.getLogger().debug("LEX: NODE_DESCR:",yy_.yytext),"NODE_DESCR";case 83:yy.getLogger().debug("LEX POPPING"),this.popState();break;case 84:yy.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return yy_.yytext=yy_.yytext.replace(/^,\s*/,""),yy.getLogger().debug("Lex (right): dir:",yy_.yytext),"DIR";case 86:return yy_.yytext=yy_.yytext.replace(/^,\s*/,""),yy.getLogger().debug("Lex (left):",yy_.yytext),"DIR";case 87:return yy_.yytext=yy_.yytext.replace(/^,\s*/,""),yy.getLogger().debug("Lex (x):",yy_.yytext),"DIR";case 88:return yy_.yytext=yy_.yytext.replace(/^,\s*/,""),yy.getLogger().debug("Lex (y):",yy_.yytext),"DIR";case 89:return yy_.yytext=yy_.yytext.replace(/^,\s*/,""),yy.getLogger().debug("Lex (up):",yy_.yytext),"DIR";case 90:return yy_.yytext=yy_.yytext.replace(/^,\s*/,""),yy.getLogger().debug("Lex (down):",yy_.yytext),"DIR";case 91:return yy_.yytext="]>",yy.getLogger().debug("Lex (ARROW_DIR end):",yy_.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return yy.getLogger().debug("Lex: LINK","#"+yy_.yytext+"#"),15;case 93:case 94:case 95:return yy.getLogger().debug("Lex: LINK",yy_.yytext),15;case 96:case 97:case 98:return yy.getLogger().debug("Lex: START_LINK",yy_.yytext),this.pushState("LLABEL"),16;case 100:return yy.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),yy.getLogger().debug("Lex: LINK","#"+yy_.yytext+"#"),15;case 102:case 103:return this.popState(),yy.getLogger().debug("Lex: LINK",yy_.yytext),15;case 104:return yy.getLogger().debug("Lex: COLON",yy_.yytext),yy_.yytext=yy_.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var block_default=parser,blockDatabase=new Map,edgeList=[],edgeCount=new Map,config=getConfig2(),classes=new Map,diagramId="",sanitizeText2=__name(txt=>common_default.sanitizeText(txt,config),"sanitizeText"),addStyleClass=__name(function(id,styleAttributes=""){let foundClass=classes.get(id);foundClass||(foundClass={id:id,styles:[],textStyles:[]},classes.set(id,foundClass)),null!=styleAttributes&&styleAttributes.split(",").forEach(attrib=>{const fixedAttrib=attrib.replace(/([^;]*);/,"$1").trim();if(RegExp("color").exec(attrib)){const newStyle2=fixedAttrib.replace("fill","bgFill").replace("color","fill");foundClass.textStyles.push(newStyle2)}foundClass.styles.push(fixedAttrib)})},"addStyleClass"),addStyle2Node=__name(function(id,styles=""){const foundBlock=blockDatabase.get(id);null!=styles&&(foundBlock.styles=styles.split(","))},"addStyle2Node"),setCssClass=__name(function(itemIds,cssClassName){itemIds.split(",").forEach(function(id){let foundBlock=blockDatabase.get(id);if(void 0===foundBlock){const trimmedId=id.trim();foundBlock={id:trimmedId,type:"na",children:[]},blockDatabase.set(trimmedId,foundBlock)}foundBlock.classes||(foundBlock.classes=[]),foundBlock.classes.push(cssClassName)})},"setCssClass"),populateBlockDatabase=__name((_blockList,parent)=>{const blockList=_blockList.flat(),children=[],columnSettingBlock=blockList.find(b=>"column-setting"===(null==b?void 0:b.type)),column=(null==columnSettingBlock?void 0:columnSettingBlock.columns)??-1;for(const block of blockList)if("number"==typeof column&&column>0&&"column-setting"!==block.type&&"number"==typeof block.widthInColumns&&block.widthInColumns>column&&log.warn(`Block ${block.id} width ${block.widthInColumns} exceeds configured column width ${column}`),block.label&&(block.label=sanitizeText2(block.label)),"classDef"!==block.type)if("applyClass"!==block.type)if("applyStyles"!==block.type)if("column-setting"===block.type)parent.columns=block.columns??-1;else if("edge"===block.type){const count=(edgeCount.get(block.id)??0)+1;edgeCount.set(block.id,count),block.id=count+"-"+block.id,edgeList.push(block)}else{block.label||("composite"===block.type?block.label="":block.label=block.id);const existingBlock=blockDatabase.get(block.id);if(void 0===existingBlock?blockDatabase.set(block.id,block):("na"!==block.type&&(existingBlock.type=block.type),block.label!==block.id&&(existingBlock.label=block.label)),block.children&&populateBlockDatabase(block.children,block),"space"===block.type){const w=block.width??1;for(let j=0;j<w;j++){const newBlock=clone(block);newBlock.id=newBlock.id+"-"+j,blockDatabase.set(newBlock.id,newBlock),children.push(newBlock)}}else void 0===existingBlock&&children.push(block)}else(null==block?void 0:block.stylesStr)&&addStyle2Node(block.id,null==block?void 0:block.stylesStr);else setCssClass(block.id,(null==block?void 0:block.styleClass)??"");else addStyleClass(block.id,block.css);parent.children=children},"populateBlockDatabase"),blocks=[],rootBlock={id:"root",type:"composite",children:[],columns:-1},clear2=__name(()=>{log.debug("Clear called"),clear(),rootBlock={id:"root",type:"composite",children:[],columns:-1},blockDatabase=new Map([["root",rootBlock]]),blocks=[],classes=new Map,edgeList=[],edgeCount=new Map,diagramId=""},"clear");function typeStr2Type(typeStr){switch(log.debug("typeStr2Type",typeStr),typeStr){case"[]":return"square";case"()":return log.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function edgeTypeStr2Type(typeStr){return log.debug("typeStr2Type",typeStr),"=="===typeStr?"thick":"normal"}function edgeStrToEdgeData(typeStr){switch(typeStr.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}__name(typeStr2Type,"typeStr2Type"),__name(edgeTypeStr2Type,"edgeTypeStr2Type"),__name(edgeStrToEdgeData,"edgeStrToEdgeData");var cnt=0,generateId=__name(()=>(cnt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+cnt),"generateId"),setHierarchy=__name(block=>{rootBlock.children=block,populateBlockDatabase(block,rootBlock),blocks=rootBlock.children},"setHierarchy"),getColumns=__name(blockId=>{const block=blockDatabase.get(blockId);return block?block.columns?block.columns:block.children?block.children.length:-1:-1},"getColumns"),getBlocksFlat=__name(()=>[...blockDatabase.values()],"getBlocksFlat"),getBlocks=__name(()=>blocks||[],"getBlocks"),getEdges=__name(()=>edgeList,"getEdges"),getBlock=__name(id=>blockDatabase.get(id),"getBlock"),setBlock=__name(block=>{blockDatabase.set(block.id,block)},"setBlock"),setDiagramId=__name(id=>{diagramId=id},"setDiagramId"),getDiagramId=__name(()=>diagramId,"getDiagramId"),getLogger=__name(()=>log,"getLogger"),getClasses=__name(function(){return classes},"getClasses"),blockDB_default={getConfig:__name(()=>getConfig().block,"getConfig"),typeStr2Type:typeStr2Type,edgeTypeStr2Type:edgeTypeStr2Type,edgeStrToEdgeData:edgeStrToEdgeData,getLogger:getLogger,getBlocksFlat:getBlocksFlat,getBlocks:getBlocks,getEdges:getEdges,setHierarchy:setHierarchy,getBlock:getBlock,setBlock:setBlock,getColumns:getColumns,getClasses:getClasses,clear:clear2,generateId:generateId,setDiagramId:setDiagramId,getDiagramId:getDiagramId},fade=__name((color,opacity)=>{const channel2=channel,r=channel2(color,"r"),g=channel2(color,"g"),b=channel2(color,"b");return rgba(r,g,b,opacity)},"fade"),styles_default=__name(options=>`.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 /*\n * This is for backward compatibility with existing code that didn't\n * add a \`<p>\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\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: ${options.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${fade(options.mainBkg,.5)};\n fill: ${fade(options.clusterBkg,.5)};\n stroke: ${fade(options.clusterBorder,.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 ${getIconStyles()}\n`,"getStyles"),insertMarkers=__name((elem,markerArray,type,id)=>{markerArray.forEach(markerName=>{markers[markerName](elem,type,id)})},"insertMarkers"),markers={extension:__name((elem,type,id)=>{log.trace("Making markers for ",id),elem.append("defs").append("marker").attr("id",id+"_"+type+"-extensionStart").attr("class","marker extension "+type).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),elem.append("defs").append("marker").attr("id",id+"_"+type+"-extensionEnd").attr("class","marker extension "+type).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:__name((elem,type,id)=>{elem.append("defs").append("marker").attr("id",id+"_"+type+"-compositionStart").attr("class","marker composition "+type).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),elem.append("defs").append("marker").attr("id",id+"_"+type+"-compositionEnd").attr("class","marker composition "+type).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:__name((elem,type,id)=>{elem.append("defs").append("marker").attr("id",id+"_"+type+"-aggregationStart").attr("class","marker aggregation "+type).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),elem.append("defs").append("marker").attr("id",id+"_"+type+"-aggregationEnd").attr("class","marker aggregation "+type).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:__name((elem,type,id)=>{elem.append("defs").append("marker").attr("id",id+"_"+type+"-dependencyStart").attr("class","marker dependency "+type).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),elem.append("defs").append("marker").attr("id",id+"_"+type+"-dependencyEnd").attr("class","marker dependency "+type).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:__name((elem,type,id)=>{elem.append("defs").append("marker").attr("id",id+"_"+type+"-lollipopStart").attr("class","marker lollipop "+type).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),elem.append("defs").append("marker").attr("id",id+"_"+type+"-lollipopEnd").attr("class","marker lollipop "+type).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:__name((elem,type,id)=>{elem.append("marker").attr("id",id+"_"+type+"-pointEnd").attr("class","marker "+type).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),elem.append("marker").attr("id",id+"_"+type+"-pointStart").attr("class","marker "+type).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:__name((elem,type,id)=>{elem.append("marker").attr("id",id+"_"+type+"-circleEnd").attr("class","marker "+type).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),elem.append("marker").attr("id",id+"_"+type+"-circleStart").attr("class","marker "+type).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:__name((elem,type,id)=>{elem.append("marker").attr("id",id+"_"+type+"-crossEnd").attr("class","marker cross "+type).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),elem.append("marker").attr("id",id+"_"+type+"-crossStart").attr("class","marker cross "+type).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:__name((elem,type,id)=>{elem.append("defs").append("marker").attr("id",id+"_"+type+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},markers_default=insertMarkers,padding=(null==(_b=null==(_a=getConfig2())?void 0:_a.block)?void 0:_b.padding)??8;function calculateBlockPosition(columns,position){if(0===columns||!Number.isInteger(columns))throw new Error("Columns must be an integer !== 0.");if(position<0||!Number.isInteger(position))throw new Error("Position must be a non-negative integer."+position);if(columns<0)return{px:position,py:0};if(1===columns)return{px:0,py:position};return{px:position%columns,py:Math.floor(position/columns)}}__name(calculateBlockPosition,"calculateBlockPosition");var getMaxChildSize=__name(block=>{let maxWidth=0,maxHeight=0;for(const child of block.children){const{width:width,height:height,x:x,y:y}=child.size??{width:0,height:0,x:0,y:0};log.debug("getMaxChildSize abc95 child:",child.id,"width:",width,"height:",height,"x:",x,"y:",y,child.type),"space"!==child.type&&(width>maxWidth&&(maxWidth=width/(child.widthInColumns??1)),height>maxHeight&&(maxHeight=height))}return{width:maxWidth,height:maxHeight}},"getMaxChildSize");function setBlockSizes(block,db2,siblingWidth=0,siblingHeight=0){var _a2,_b2,_c,_d,_e,_f,_g,_h,_i,_j,_k;log.debug("setBlockSizes abc95 (start)",block.id,null==(_a2=null==block?void 0:block.size)?void 0:_a2.x,"block width =",null==block?void 0:block.size,"siblingWidth",siblingWidth),(null==(_b2=null==block?void 0:block.size)?void 0:_b2.width)||(block.size={width:siblingWidth,height:siblingHeight,x:0,y:0});let maxWidth=0,maxHeight=0;if((null==(_c=block.children)?void 0:_c.length)>0){for(const child of block.children)setBlockSizes(child,db2);const childSize=getMaxChildSize(block);maxWidth=childSize.width,maxHeight=childSize.height,log.debug("setBlockSizes abc95 maxWidth of",block.id,":s children is ",maxWidth,maxHeight);for(const child of block.children)child.size&&(log.debug(`abc95 Setting size of children of ${block.id} id=${child.id} ${maxWidth} ${maxHeight} ${JSON.stringify(child.size)}`),child.size.width=maxWidth*(child.widthInColumns??1)+padding*((child.widthInColumns??1)-1),child.size.height=maxHeight,child.size.x=0,child.size.y=0,log.debug(`abc95 updating size of ${block.id} children child:${child.id} maxWidth:${maxWidth} maxHeight:${maxHeight}`));for(const child of block.children)setBlockSizes(child,db2,maxWidth,maxHeight);const columns=block.columns??-1;let numItems=0;for(const child of block.children)numItems+=child.widthInColumns??1;let xSize=block.children.length;columns>0&&columns<numItems&&(xSize=columns);const ySize=Math.ceil(numItems/xSize);let width=xSize*(maxWidth+padding)+padding,height=ySize*(maxHeight+padding)+padding;if(width<siblingWidth){log.debug(`Detected to small sibling: abc95 ${block.id} siblingWidth ${siblingWidth} siblingHeight ${siblingHeight} width ${width}`),width=siblingWidth,height=siblingHeight;const childWidth=(siblingWidth-xSize*padding-padding)/xSize,childHeight=(siblingHeight-ySize*padding-padding)/ySize;log.debug("Size indata abc88",block.id,"childWidth",childWidth,"maxWidth",maxWidth),log.debug("Size indata abc88",block.id,"childHeight",childHeight,"maxHeight",maxHeight),log.debug("Size indata abc88 xSize",xSize,"padding",padding);for(const child of block.children)child.size&&(child.size.width=childWidth,child.size.height=childHeight,child.size.x=0,child.size.y=0)}if(log.debug(`abc95 (finale calc) ${block.id} xSize ${xSize} ySize ${ySize} columns ${columns}${block.children.length} width=${Math.max(width,(null==(_d=block.size)?void 0:_d.width)||0)}`),width<((null==(_e=null==block?void 0:block.size)?void 0:_e.width)||0)){width=(null==(_f=null==block?void 0:block.size)?void 0:_f.width)||0;const num=columns>0?Math.min(block.children.length,columns):block.children.length;if(num>0){const childWidth=(width-num*padding-padding)/num;log.debug("abc95 (growing to fit) width",block.id,width,null==(_g=block.size)?void 0:_g.width,childWidth);for(const child of block.children)child.size&&(child.size.width=childWidth)}}block.size={width:width,height:height,x:0,y:0}}log.debug("setBlockSizes abc94 (done)",block.id,null==(_h=null==block?void 0:block.size)?void 0:_h.x,null==(_i=null==block?void 0:block.size)?void 0:_i.width,null==(_j=null==block?void 0:block.size)?void 0:_j.y,null==(_k=null==block?void 0:block.size)?void 0:_k.height)}function layoutBlocks(block,db2){var _a2,_b2,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q;log.debug(`abc85 layout blocks (=>layoutBlocks) ${block.id} x: ${null==(_a2=null==block?void 0:block.size)?void 0:_a2.x} y: ${null==(_b2=null==block?void 0:block.size)?void 0:_b2.y} width: ${null==(_c=null==block?void 0:block.size)?void 0:_c.width}`);const columns=block.columns??-1;if(log.debug("layoutBlocks columns abc95",block.id,"=>",columns,block),block.children&&block.children.length>0){const width=(null==(_e=null==(_d=null==block?void 0:block.children[0])?void 0:_d.size)?void 0:_e.width)??0,widthOfChildren=block.children.length*width+(block.children.length-1)*padding;log.debug("widthOfChildren 88",widthOfChildren,"posX");const rowHeights=new Map;{let colPos=0;for(const child of block.children){if(!child.size)continue;const{py:py}=calculateBlockPosition(columns,colPos),currentMax=rowHeights.get(py)??0;child.size.height>currentMax&&rowHeights.set(py,child.size.height);let filled=(null==child?void 0:child.widthInColumns)??1;columns>0&&(filled=Math.min(filled,columns-colPos%columns)),colPos+=filled}}const rowYOffsets=new Map;{let offset=0;const rows=[...rowHeights.keys()].sort((a,b)=>a-b);for(const row of rows)rowYOffsets.set(row,offset),offset+=(rowHeights.get(row)??0)+padding}let columnPos=0;log.debug("abc91 block?.size?.x",block.id,null==(_f=null==block?void 0:block.size)?void 0:_f.x);let startingPosX=(null==(_g=null==block?void 0:block.size)?void 0:_g.x)?(null==(_h=null==block?void 0:block.size)?void 0:_h.x)+(-(null==(_i=null==block?void 0:block.size)?void 0:_i.width)/2||0):-padding,rowPos=0;for(const child of block.children){const parent=block;if(!child.size)continue;const{width:width2,height:height}=child.size,{px:px,py:py}=calculateBlockPosition(columns,columnPos);if(py!=rowPos&&(rowPos=py,startingPosX=(null==(_j=null==block?void 0:block.size)?void 0:_j.x)?(null==(_k=null==block?void 0:block.size)?void 0:_k.x)+(-(null==(_l=null==block?void 0:block.size)?void 0:_l.width)/2||0):-padding,log.debug("New row in layout for block",block.id," and child ",child.id,rowPos)),log.debug(`abc89 layout blocks (child) id: ${child.id} Pos: ${columnPos} (px, py) ${px},${py} (${null==(_m=null==parent?void 0:parent.size)?void 0:_m.x},${null==(_n=null==parent?void 0:parent.size)?void 0:_n.y}) parent: ${parent.id} width: ${width2}${padding}`),parent.size){const halfWidth=width2/2;child.size.x=startingPosX+padding+halfWidth,log.debug(`abc91 layout blocks (calc) px, pyid:${child.id} startingPos=X${startingPosX} new startingPosX${child.size.x} ${halfWidth} padding=${padding} width=${width2} halfWidth=${halfWidth} => x:${child.size.x} y:${child.size.y} ${child.widthInColumns} (width * (child?.w || 1)) / 2 ${width2*((null==child?void 0:child.widthInColumns)??1)/2}`),startingPosX=child.size.x+halfWidth;const rowYOffset=rowYOffsets.get(py)??0,rowHeight=rowHeights.get(py)??height;child.size.y=parent.size.y-parent.size.height/2+rowYOffset+rowHeight/2+padding,log.debug(`abc88 layout blocks (calc) px, pyid:${child.id}startingPosX${startingPosX}${padding}${halfWidth}=>x:${child.size.x}y:${child.size.y}${child.widthInColumns}(width * (child?.w || 1)) / 2${width2*((null==child?void 0:child.widthInColumns)??1)/2}`)}child.children&&layoutBlocks(child);let columnsFilled=(null==child?void 0:child.widthInColumns)??1;columns>0&&(columnsFilled=Math.min(columnsFilled,columns-columnPos%columns)),columnPos+=columnsFilled,log.debug("abc88 columnsPos",child,columnPos)}}log.debug(`layout blocks (<==layoutBlocks) ${block.id} x: ${null==(_o=null==block?void 0:block.size)?void 0:_o.x} y: ${null==(_p=null==block?void 0:block.size)?void 0:_p.y} width: ${null==(_q=null==block?void 0:block.size)?void 0:_q.width}`)}function findBounds(block,{minX:minX,minY:minY,maxX:maxX,maxY:maxY}={minX:0,minY:0,maxX:0,maxY:0}){if(block.size&&"root"!==block.id){const{x:x,y:y,width:width,height:height}=block.size;x-width/2<minX&&(minX=x-width/2),y-height/2<minY&&(minY=y-height/2),x+width/2>maxX&&(maxX=x+width/2),y+height/2>maxY&&(maxY=y+height/2)}if(block.children)for(const child of block.children)({minX:minX,minY:minY,maxX:maxX,maxY:maxY}=findBounds(child,{minX:minX,minY:minY,maxX:maxX,maxY:maxY}));return{minX:minX,minY:minY,maxX:maxX,maxY:maxY}}function layout(db2){const root=db2.getBlock("root");if(!root)return;setBlockSizes(root,db2,0,0),layoutBlocks(root),log.debug("getBlocks",JSON.stringify(root,null,2));const{minX:minX,minY:minY,maxX:maxX,maxY:maxY}=findBounds(root);return{x:minX,y:minY,width:maxX-minX,height:maxY-minY}}__name(setBlockSizes,"setBlockSizes"),__name(layoutBlocks,"layoutBlocks"),__name(findBounds,"findBounds"),__name(layout,"layout");var createLabel_default=__name(async(element,_vertexText,style,isTitle=!1,isNode=!1)=>{let vertexText=_vertexText||"";"object"==typeof vertexText&&(vertexText=vertexText[0]);const config2=getConfig2(),useHtmlLabels=getEffectiveHtmlLabels(config2);return await createText(element,vertexText,{style:style,isTitle:isTitle,useHtmlLabels:useHtmlLabels,markdown:!1,isNode:isNode,width:Number.POSITIVE_INFINITY},config2)},"createLabel"),addEdgeMarkers=__name((svgPath,edge,url,id,diagramType)=>{edge.arrowTypeStart&&addEdgeMarker(svgPath,"start",edge.arrowTypeStart,url,id,diagramType),edge.arrowTypeEnd&&addEdgeMarker(svgPath,"end",edge.arrowTypeEnd,url,id,diagramType)},"addEdgeMarkers"),arrowTypesMap={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},addEdgeMarker=__name((svgPath,position,arrowType,url,id,diagramType)=>{const endMarkerType=arrowTypesMap[arrowType];if(!endMarkerType)return void log.warn(`Unknown arrow type: ${arrowType}`);const suffix="start"===position?"Start":"End";svgPath.attr(`marker-${position}`,`url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`)},"addEdgeMarker"),edgeLabels={},terminalLabels={},insertEdgeLabel=__name(async(elem,edge)=>{const config2=getConfig2(),useHtmlLabels=getEffectiveHtmlLabels(config2),edgeLabel=elem.insert("g").attr("class","edgeLabel"),label=edgeLabel.insert("g").attr("class","label"),isMarkdown="markdown"===edge.labelType,labelElement=await createText(elem,edge.label,{style:edge.labelStyle,useHtmlLabels:useHtmlLabels,addSvgBackground:isMarkdown,isNode:!1,markdown:isMarkdown,width:isMarkdown?void 0:Number.POSITIVE_INFINITY},config2);label.node().appendChild(labelElement);let fo,bbox=labelElement.getBBox(),transformBbox=bbox;if(useHtmlLabels){const div=labelElement.children[0],dv=select(labelElement);bbox=div.getBoundingClientRect(),transformBbox=bbox,dv.attr("width",bbox.width),dv.attr("height",bbox.height)}else{const textEl=select(labelElement).select("text").node();textEl&&"function"==typeof textEl.getBBox&&(transformBbox=textEl.getBBox())}if(label.attr("transform",computeLabelTransform(transformBbox,useHtmlLabels)),edgeLabels[edge.id]=edgeLabel,edge.width=bbox.width,edge.height=bbox.height,edge.startLabelLeft){const startEdgeLabelLeft=elem.insert("g").attr("class","edgeTerminals"),inner=startEdgeLabelLeft.insert("g").attr("class","inner"),startLabelElement=await createLabel_default(inner,edge.startLabelLeft,edge.labelStyle);fo=startLabelElement;let slBox=startLabelElement.getBBox();if(useHtmlLabels){const div=startLabelElement.children[0],dv=select(startLabelElement);slBox=div.getBoundingClientRect(),dv.attr("width",slBox.width),dv.attr("height",slBox.height)}inner.attr("transform",computeLabelTransform(slBox,useHtmlLabels)),terminalLabels[edge.id]||(terminalLabels[edge.id]={}),terminalLabels[edge.id].startLeft=startEdgeLabelLeft,setTerminalWidth(fo,edge.startLabelLeft)}if(edge.startLabelRight){const startEdgeLabelRight=elem.insert("g").attr("class","edgeTerminals"),inner=startEdgeLabelRight.insert("g").attr("class","inner"),startLabelElement=await createLabel_default(startEdgeLabelRight,edge.startLabelRight,edge.labelStyle);fo=startLabelElement,inner.node().appendChild(startLabelElement);let slBox=startLabelElement.getBBox();if(useHtmlLabels){const div=startLabelElement.children[0],dv=select(startLabelElement);slBox=div.getBoundingClientRect(),dv.attr("width",slBox.width),dv.attr("height",slBox.height)}inner.attr("transform",computeLabelTransform(slBox,useHtmlLabels)),terminalLabels[edge.id]||(terminalLabels[edge.id]={}),terminalLabels[edge.id].startRight=startEdgeLabelRight,setTerminalWidth(fo,edge.startLabelRight)}if(edge.endLabelLeft){const endEdgeLabelLeft=elem.insert("g").attr("class","edgeTerminals"),inner=endEdgeLabelLeft.insert("g").attr("class","inner"),endLabelElement=await createLabel_default(inner,edge.endLabelLeft,edge.labelStyle);fo=endLabelElement;let slBox=endLabelElement.getBBox();if(useHtmlLabels){const div=endLabelElement.children[0],dv=select(endLabelElement);slBox=div.getBoundingClientRect(),dv.attr("width",slBox.width),dv.attr("height",slBox.height)}inner.attr("transform",computeLabelTransform(slBox,useHtmlLabels)),endEdgeLabelLeft.node().appendChild(endLabelElement),terminalLabels[edge.id]||(terminalLabels[edge.id]={}),terminalLabels[edge.id].endLeft=endEdgeLabelLeft,setTerminalWidth(fo,edge.endLabelLeft)}if(edge.endLabelRight){const endEdgeLabelRight=elem.insert("g").attr("class","edgeTerminals"),inner=endEdgeLabelRight.insert("g").attr("class","inner"),endLabelElement=await createLabel_default(inner,edge.endLabelRight,edge.labelStyle);fo=endLabelElement;let slBox=endLabelElement.getBBox();if(useHtmlLabels){const div=endLabelElement.children[0],dv=select(endLabelElement);slBox=div.getBoundingClientRect(),dv.attr("width",slBox.width),dv.attr("height",slBox.height)}inner.attr("transform",computeLabelTransform(slBox,useHtmlLabels)),endEdgeLabelRight.node().appendChild(endLabelElement),terminalLabels[edge.id]||(terminalLabels[edge.id]={}),terminalLabels[edge.id].endRight=endEdgeLabelRight,setTerminalWidth(fo,edge.endLabelRight)}return labelElement},"insertEdgeLabel");function setTerminalWidth(fo,value){getEffectiveHtmlLabels(getConfig2())&&fo&&(fo.style.width=9*value.length+"px",fo.style.height="12px")}__name(setTerminalWidth,"setTerminalWidth");var positionEdgeLabel=__name((edge,paths)=>{log.debug("Moving label abc88 ",edge.id,edge.label,edgeLabels[edge.id],paths);let path=paths.updatedPath?paths.updatedPath:paths.originalPath;const siteConfig=getConfig2(),{subGraphTitleTotalMargin:subGraphTitleTotalMargin}=getSubGraphTitleMargins(siteConfig);if(edge.label){const el=edgeLabels[edge.id];let x=edge.x,y=edge.y;if(path){const pos=utils_default.calcLabelPosition(path);log.debug("Moving label "+edge.label+" from (",x,",",y,") to (",pos.x,",",pos.y,") abc88"),paths.updatedPath&&(x=pos.x,y=pos.y)}el.attr("transform",`translate(${x}, ${y+subGraphTitleTotalMargin/2})`)}if(edge.startLabelLeft){const el=terminalLabels[edge.id].startLeft;let x=edge.x,y=edge.y;if(path){const pos=utils_default.calcTerminalLabelPosition(edge.arrowTypeStart?10:0,"start_left",path);x=pos.x,y=pos.y}el.attr("transform",`translate(${x}, ${y})`)}if(edge.startLabelRight){const el=terminalLabels[edge.id].startRight;let x=edge.x,y=edge.y;if(path){const pos=utils_default.calcTerminalLabelPosition(edge.arrowTypeStart?10:0,"start_right",path);x=pos.x,y=pos.y}el.attr("transform",`translate(${x}, ${y})`)}if(edge.endLabelLeft){const el=terminalLabels[edge.id].endLeft;let x=edge.x,y=edge.y;if(path){const pos=utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd?10:0,"end_left",path);x=pos.x,y=pos.y}el.attr("transform",`translate(${x}, ${y})`)}if(edge.endLabelRight){const el=terminalLabels[edge.id].endRight;let x=edge.x,y=edge.y;if(path){const pos=utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd?10:0,"end_right",path);x=pos.x,y=pos.y}el.attr("transform",`translate(${x}, ${y})`)}},"positionEdgeLabel"),outsideNode=__name((node,point2)=>{const x=node.x,y=node.y,dx=Math.abs(point2.x-x),dy=Math.abs(point2.y-y),w=node.width/2,h=node.height/2;return dx>=w||dy>=h},"outsideNode"),intersection=__name((node,outsidePoint,insidePoint)=>{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}`);const x=node.x,y=node.y,dx=Math.abs(x-insidePoint.x),w=node.width/2;let r=insidePoint.x<outsidePoint.x?w-dx:w+dx;const h=node.height/2,Q=Math.abs(outsidePoint.y-insidePoint.y),R=Math.abs(outsidePoint.x-insidePoint.x);if(Math.abs(y-outsidePoint.y)*w>Math.abs(x-outsidePoint.x)*h){let q=insidePoint.y<outsidePoint.y?outsidePoint.y-h-y:y-h-outsidePoint.y;r=R*q/Q;const res={x:insidePoint.x<outsidePoint.x?insidePoint.x+r:insidePoint.x-R+r,y:insidePoint.y<outsidePoint.y?insidePoint.y+Q-q:insidePoint.y-Q+q};return 0===r&&(res.x=outsidePoint.x,res.y=outsidePoint.y),0===R&&(res.x=outsidePoint.x),0===Q&&(res.y=outsidePoint.y),log.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`,res),res}{r=insidePoint.x<outsidePoint.x?outsidePoint.x-w-x:x-w-outsidePoint.x;let q=Q*r/R,_x=insidePoint.x<outsidePoint.x?insidePoint.x+R-r:insidePoint.x-R+r,_y=insidePoint.y<outsidePoint.y?insidePoint.y+q:insidePoint.y-q;return log.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`,{_x:_x,_y:_y}),0===r&&(_x=outsidePoint.x,_y=outsidePoint.y),0===R&&(_x=outsidePoint.x),0===Q&&(_y=outsidePoint.y),{x:_x,y:_y}}},"intersection"),cutPathAtIntersect=__name((_points,boundaryNode)=>{log.debug("abc88 cutPathAtIntersect",_points,boundaryNode);let points=[],lastPointOutside=_points[0],isInside=!1;return _points.forEach(point2=>{if(outsideNode(boundaryNode,point2)||isInside)lastPointOutside=point2,isInside||points.push(point2);else{const inter=intersection(boundaryNode,lastPointOutside,point2);let pointPresent=!1;points.forEach(p=>{pointPresent=pointPresent||p.x===inter.x&&p.y===inter.y}),points.some(e=>e.x===inter.x&&e.y===inter.y)||points.push(inter),isInside=!0}}),points},"cutPathAtIntersect"),insertEdge=__name(function(elem,e,edge,clusterDb,diagramType,graph,id){let points=edge.points;log.debug("abc88 InsertEdge: edge=",edge,"e=",e);let pointsHasChanged=!1;const tail=graph.node(e.v);var head=graph.node(e.w);(null==head?void 0:head.intersect)&&(null==tail?void 0:tail.intersect)&&(points=points.slice(1,edge.points.length-1),points.unshift(tail.intersect(points[0])),points.push(head.intersect(points[points.length-1]))),edge.toCluster&&(log.debug("to cluster abc88",clusterDb[edge.toCluster]),points=cutPathAtIntersect(edge.points,clusterDb[edge.toCluster].node),pointsHasChanged=!0),edge.fromCluster&&(log.debug("from cluster abc88",clusterDb[edge.fromCluster]),points=cutPathAtIntersect(points.reverse(),clusterDb[edge.fromCluster].node).reverse(),pointsHasChanged=!0);const lineData=points.filter(p=>!Number.isNaN(p.y));let curve=curveBasis;!edge.curve||"graph"!==diagramType&&"flowchart"!==diagramType||(curve=edge.curve);const{x:x,y:y}=getLineFunctionsWithOffset(edge),lineFunction=line().x(x).y(y).curve(curve);let strokeClasses;switch(edge.thickness){case"normal":strokeClasses="edge-thickness-normal";break;case"thick":case"invisible":strokeClasses="edge-thickness-thick";break;default:strokeClasses=""}switch(edge.pattern){case"solid":strokeClasses+=" edge-pattern-solid";break;case"dotted":strokeClasses+=" edge-pattern-dotted";break;case"dashed":strokeClasses+=" edge-pattern-dashed"}const svgPath=elem.append("path").attr("d",lineFunction(lineData)).attr("id",edge.id).attr("class"," "+strokeClasses+(edge.classes?" "+edge.classes:"")).attr("style",edge.style);let url="";(getConfig2().flowchart.arrowMarkerAbsolute||getConfig2().state.arrowMarkerAbsolute)&&(url=getUrl(!0)),addEdgeMarkers(svgPath,edge,url,id,diagramType);let paths={};return pointsHasChanged&&(paths.updatedPath=points),paths.originalPath=edge.points,paths},"insertEdge"),expandAndDeduplicateDirections=__name(directions=>{const uniqueDirections=new Set;for(const direction of directions)switch(direction){case"x":uniqueDirections.add("right"),uniqueDirections.add("left");break;case"y":uniqueDirections.add("up"),uniqueDirections.add("down");break;default:uniqueDirections.add(direction)}return uniqueDirections},"expandAndDeduplicateDirections"),getArrowPoints=__name((duplicatedDirections,bbox,node)=>{const directions=expandAndDeduplicateDirections(duplicatedDirections),height=bbox.height+2*node.padding,midpoint=height/2,width=bbox.width+2*midpoint+node.padding,padding2=node.padding/2;return directions.has("right")&&directions.has("left")&&directions.has("up")&&directions.has("down")?[{x:0,y:0},{x:midpoint,y:0},{x:width/2,y:2*padding2},{x:width-midpoint,y:0},{x:width,y:0},{x:width,y:-height/3},{x:width+2*padding2,y:-height/2},{x:width,y:-2*height/3},{x:width,y:-height},{x:width-midpoint,y:-height},{x:width/2,y:-height-2*padding2},{x:midpoint,y:-height},{x:0,y:-height},{x:0,y:-2*height/3},{x:-2*padding2,y:-height/2},{x:0,y:-height/3}]:directions.has("right")&&directions.has("left")&&directions.has("up")?[{x:midpoint,y:0},{x:width-midpoint,y:0},{x:width,y:-height/2},{x:width-midpoint,y:-height},{x:midpoint,y:-height},{x:0,y:-height/2}]:directions.has("right")&&directions.has("left")&&directions.has("down")?[{x:0,y:0},{x:midpoint,y:-height},{x:width-midpoint,y:-height},{x:width,y:0}]:directions.has("right")&&directions.has("up")&&directions.has("down")?[{x:0,y:0},{x:width,y:-midpoint},{x:width,y:-height+midpoint},{x:0,y:-height}]:directions.has("left")&&directions.has("up")&&directions.has("down")?[{x:width,y:0},{x:0,y:-midpoint},{x:0,y:-height+midpoint},{x:width,y:-height}]:directions.has("right")&&directions.has("left")?[{x:midpoint,y:0},{x:midpoint,y:-padding2},{x:width-midpoint,y:-padding2},{x:width-midpoint,y:0},{x:width,y:-height/2},{x:width-midpoint,y:-height},{x:width-midpoint,y:-height+padding2},{x:midpoint,y:-height+padding2},{x:midpoint,y:-height},{x:0,y:-height/2}]:directions.has("up")&&directions.has("down")?[{x:width/2,y:0},{x:0,y:-padding2},{x:midpoint,y:-padding2},{x:midpoint,y:-height+padding2},{x:0,y:-height+padding2},{x:width/2,y:-height},{x:width,y:-height+padding2},{x:width-midpoint,y:-height+padding2},{x:width-midpoint,y:-padding2},{x:width,y:-padding2}]:directions.has("right")&&directions.has("up")?[{x:0,y:0},{x:width,y:-midpoint},{x:0,y:-height}]:directions.has("right")&&directions.has("down")?[{x:0,y:0},{x:width,y:0},{x:0,y:-height}]:directions.has("left")&&directions.has("up")?[{x:width,y:0},{x:0,y:-midpoint},{x:width,y:-height}]:directions.has("left")&&directions.has("down")?[{x:width,y:0},{x:0,y:0},{x:width,y:-height}]:directions.has("right")?[{x:midpoint,y:-padding2},{x:midpoint,y:-padding2},{x:width-midpoint,y:-padding2},{x:width-midpoint,y:0},{x:width,y:-height/2},{x:width-midpoint,y:-height},{x:width-midpoint,y:-height+padding2},{x:midpoint,y:-height+padding2},{x:midpoint,y:-height+padding2}]:directions.has("left")?[{x:midpoint,y:0},{x:midpoint,y:-padding2},{x:width-midpoint,y:-padding2},{x:width-midpoint,y:-height+padding2},{x:midpoint,y:-height+padding2},{x:midpoint,y:-height},{x:0,y:-height/2}]:directions.has("up")?[{x:midpoint,y:-padding2},{x:midpoint,y:-height+padding2},{x:0,y:-height+padding2},{x:width/2,y:-height},{x:width,y:-height+padding2},{x:width-midpoint,y:-height+padding2},{x:width-midpoint,y:-padding2}]:directions.has("down")?[{x:width/2,y:0},{x:0,y:-padding2},{x:midpoint,y:-padding2},{x:midpoint,y:-height+padding2},{x:width-midpoint,y:-height+padding2},{x:width-midpoint,y:-padding2},{x:width,y:-padding2}]:[{x:0,y:0}]},"getArrowPoints");function intersectNode(node,point2){return node.intersect(point2)}__name(intersectNode,"intersectNode");var intersect_node_default=intersectNode;function intersectEllipse(node,rx,ry,point2){var cx=node.x,cy=node.y,px=cx-point2.x,py=cy-point2.y,det=Math.sqrt(rx*rx*py*py+ry*ry*px*px),dx=Math.abs(rx*ry*px/det);point2.x<cx&&(dx=-dx);var dy=Math.abs(rx*ry*py/det);return point2.y<cy&&(dy=-dy),{x:cx+dx,y:cy+dy}}__name(intersectEllipse,"intersectEllipse");var intersect_ellipse_default=intersectEllipse;function intersectCircle(node,rx,point2){return intersect_ellipse_default(node,rx,rx,point2)}__name(intersectCircle,"intersectCircle");var intersect_circle_default=intersectCircle;function intersectLine(p1,p2,q1,q2){var a1,a2,b1,b2,c1,c2,r1,r2,r3,r4,denom,offset,num;if(a1=p2.y-p1.y,b1=p1.x-p2.x,c1=p2.x*p1.y-p1.x*p2.y,r3=a1*q1.x+b1*q1.y+c1,r4=a1*q2.x+b1*q2.y+c1,!(0!==r3&&0!==r4&&sameSign(r3,r4)||(a2=q2.y-q1.y,b2=q1.x-q2.x,c2=q2.x*q1.y-q1.x*q2.y,r1=a2*p1.x+b2*p1.y+c2,r2=a2*p2.x+b2*p2.y+c2,0!==r1&&0!==r2&&sameSign(r1,r2)||0===(denom=a1*b2-a2*b1))))return offset=Math.abs(denom/2),{x:(num=b1*c2-b2*c1)<0?(num-offset)/denom:(num+offset)/denom,y:(num=a2*c1-a1*c2)<0?(num-offset)/denom:(num+offset)/denom}}function sameSign(r1,r2){return r1*r2>0}__name(intersectLine,"intersectLine"),__name(sameSign,"sameSign");var intersect_line_default=intersectLine,intersect_polygon_default=intersectPolygon;function intersectPolygon(node,polyPoints,point2){var x1=node.x,y1=node.y,intersections=[],minX=Number.POSITIVE_INFINITY,minY=Number.POSITIVE_INFINITY;"function"==typeof polyPoints.forEach?polyPoints.forEach(function(entry){minX=Math.min(minX,entry.x),minY=Math.min(minY,entry.y)}):(minX=Math.min(minX,polyPoints.x),minY=Math.min(minY,polyPoints.y));for(var left=x1-node.width/2-minX,top=y1-node.height/2-minY,i=0;i<polyPoints.length;i++){var p1=polyPoints[i],p2=polyPoints[i<polyPoints.length-1?i+1:0],intersect=intersect_line_default(node,point2,{x:left+p1.x,y:top+p1.y},{x:left+p2.x,y:top+p2.y});intersect&&intersections.push(intersect)}return intersections.length?(intersections.length>1&&intersections.sort(function(p,q){var pdx=p.x-point2.x,pdy=p.y-point2.y,distp=Math.sqrt(pdx*pdx+pdy*pdy),qdx=q.x-point2.x,qdy=q.y-point2.y,distq=Math.sqrt(qdx*qdx+qdy*qdy);return distp<distq?-1:distp===distq?0:1}),intersections[0]):node}__name(intersectPolygon,"intersectPolygon");var intersect_default={node:intersect_node_default,circle:intersect_circle_default,ellipse:intersect_ellipse_default,polygon:intersect_polygon_default,rect:__name((node,point2)=>{var sx,sy,x=node.x,y=node.y,dx=point2.x-x,dy=point2.y-y,w=node.width/2,h=node.height/2;return Math.abs(dy)*w>Math.abs(dx)*h?(dy<0&&(h=-h),sx=0===dy?0:h*dx/dy,sy=h):(dx<0&&(w=-w),sx=w,sy=0===dx?0:w*dy/dx),{x:x+sx,y:y+sy}},"intersectRect")},labelHelper=__name(async(parent,node,_classes,isNode)=>{const config2=getConfig2();let classes2;const useHtmlLabels=node.useHtmlLabels||getEffectiveHtmlLabels(config2);classes2=_classes||"node default";const shapeSvg=parent.insert("g").attr("class",classes2).attr("id",node.domId||node.id),label=shapeSvg.insert("g").attr("class","label").attr("style",node.labelStyle);let labelText,text;labelText=void 0===node.labelText?"":"string"==typeof node.labelText?node.labelText:node.labelText[0],text="markdown"===node.labelType?createText(label,sanitizeText(decodeEntities(labelText),config2),{useHtmlLabels:useHtmlLabels,width:node.width||config2.flowchart.wrappingWidth,classes:"markdown-node-label"},config2):await createLabel_default(label,sanitizeText(decodeEntities(labelText),config2),node.labelStyle,!1,isNode);let bbox=text.getBBox();const halfPadding=node.padding/2;if(getEffectiveHtmlLabels(config2)){const div=text.children[0],dv=select(text);await configureLabelImages(div,labelText),bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}return useHtmlLabels?label.attr("transform","translate("+-bbox.width/2+", "+-bbox.height/2+")"):label.attr("transform","translate(0, "+-bbox.height/2+")"),node.centerLabel&&label.attr("transform","translate("+-bbox.width/2+", "+-bbox.height/2+")"),label.insert("rect",":first-child"),{shapeSvg:shapeSvg,bbox:bbox,halfPadding:halfPadding,label:label}},"labelHelper"),updateNodeBounds=__name((node,element)=>{const bbox=element.node().getBBox();node.width=bbox.width,node.height=bbox.height},"updateNodeBounds");function insertPolygonShape(parent,w,h,points){return parent.insert("polygon",":first-child").attr("points",points.map(function(d){return d.x+","+d.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-w/2+","+h/2+")")}__name(insertPolygonShape,"insertPolygonShape");var note_default=__name(async(parent,node)=>{node.useHtmlLabels||getEffectiveHtmlLabels(getConfig2())||(node.centerLabel=!0);const{shapeSvg:shapeSvg,bbox:bbox,halfPadding:halfPadding}=await labelHelper(parent,node,"node "+node.classes,!0);log.info("Classes = ",node.classes);const rect2=shapeSvg.insert("rect",":first-child");return rect2.attr("rx",node.rx).attr("ry",node.ry).attr("x",-bbox.width/2-halfPadding).attr("y",-bbox.height/2-halfPadding).attr("width",bbox.width+node.padding).attr("height",bbox.height+node.padding),updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg},"note"),formatClass=__name(str=>str?" "+str:"","formatClass"),getClassesFromNode=__name((node,otherClasses)=>`${otherClasses||"node default"}${formatClass(node.classes)} ${formatClass(node.class)}`,"getClassesFromNode"),question=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox}=await labelHelper(parent,node,getClassesFromNode(node,void 0),!0),s=bbox.width+node.padding+(bbox.height+node.padding),points=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];log.info("Question main (Circle)");const questionElem=insertPolygonShape(shapeSvg,s,s,points);return questionElem.attr("style",node.style),updateNodeBounds(node,questionElem),node.intersect=function(point2){return log.warn("Intersect called"),intersect_default.polygon(node,points,point2)},shapeSvg},"question"),choice=__name((parent,node)=>{const shapeSvg=parent.insert("g").attr("class","node default").attr("id",node.domId||node.id),points=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return shapeSvg.insert("polygon",":first-child").attr("points",points.map(function(d){return d.x+","+d.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),node.width=28,node.height=28,node.intersect=function(point2){return intersect_default.circle(node,14,point2)},shapeSvg},"choice"),hexagon=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox}=await labelHelper(parent,node,getClassesFromNode(node,void 0),!0),h=bbox.height+node.padding,m=h/4,w=bbox.width+2*m+node.padding,points=[{x:m,y:0},{x:w-m,y:0},{x:w,y:-h/2},{x:w-m,y:-h},{x:m,y:-h},{x:0,y:-h/2}],hex=insertPolygonShape(shapeSvg,w,h,points);return hex.attr("style",node.style),updateNodeBounds(node,hex),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg},"hexagon"),block_arrow=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox}=await labelHelper(parent,node,void 0,!0),h=bbox.height+2*node.padding,m=h/2,w=bbox.width+2*m+node.padding,points=getArrowPoints(node.directions,bbox,node),blockArrow=insertPolygonShape(shapeSvg,w,h,points);return blockArrow.attr("style",node.style),updateNodeBounds(node,blockArrow),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg},"block_arrow"),rect_left_inv_arrow=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox}=await labelHelper(parent,node,getClassesFromNode(node,void 0),!0),w=bbox.width+node.padding,h=bbox.height+node.padding,points=[{x:-h/2,y:0},{x:w,y:0},{x:w,y:-h},{x:-h/2,y:-h},{x:0,y:-h/2}];return insertPolygonShape(shapeSvg,w,h,points).attr("style",node.style),node.width=w+h,node.height=h,node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg},"rect_left_inv_arrow"),lean_right=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox}=await labelHelper(parent,node,getClassesFromNode(node),!0),w=bbox.width+node.padding,h=bbox.height+node.padding,points=[{x:-2*h/6,y:0},{x:w-h/6,y:0},{x:w+2*h/6,y:-h},{x:h/6,y:-h}],el=insertPolygonShape(shapeSvg,w,h,points);return el.attr("style",node.style),updateNodeBounds(node,el),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg},"lean_right"),lean_left=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox}=await labelHelper(parent,node,getClassesFromNode(node,void 0),!0),w=bbox.width+node.padding,h=bbox.height+node.padding,points=[{x:2*h/6,y:0},{x:w+h/6,y:0},{x:w-2*h/6,y:-h},{x:-h/6,y:-h}],el=insertPolygonShape(shapeSvg,w,h,points);return el.attr("style",node.style),updateNodeBounds(node,el),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg},"lean_left"),trapezoid=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox}=await labelHelper(parent,node,getClassesFromNode(node,void 0),!0),w=bbox.width+node.padding,h=bbox.height+node.padding,points=[{x:-2*h/6,y:0},{x:w+2*h/6,y:0},{x:w-h/6,y:-h},{x:h/6,y:-h}],el=insertPolygonShape(shapeSvg,w,h,points);return el.attr("style",node.style),updateNodeBounds(node,el),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg},"trapezoid"),inv_trapezoid=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox}=await labelHelper(parent,node,getClassesFromNode(node,void 0),!0),w=bbox.width+node.padding,h=bbox.height+node.padding,points=[{x:h/6,y:0},{x:w-h/6,y:0},{x:w+2*h/6,y:-h},{x:-2*h/6,y:-h}],el=insertPolygonShape(shapeSvg,w,h,points);return el.attr("style",node.style),updateNodeBounds(node,el),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg},"inv_trapezoid"),rect_right_inv_arrow=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox}=await labelHelper(parent,node,getClassesFromNode(node,void 0),!0),w=bbox.width+node.padding,h=bbox.height+node.padding,points=[{x:0,y:0},{x:w+h/2,y:0},{x:w,y:-h/2},{x:w+h/2,y:-h},{x:0,y:-h}],el=insertPolygonShape(shapeSvg,w,h,points);return el.attr("style",node.style),updateNodeBounds(node,el),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg},"rect_right_inv_arrow"),cylinder=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox}=await labelHelper(parent,node,getClassesFromNode(node,void 0),!0),w=bbox.width+node.padding,rx=w/2,ry=rx/(2.5+w/50),h=bbox.height+ry+node.padding,shape="M 0,"+ry+" a "+rx+","+ry+" 0,0,0 "+w+" 0 a "+rx+","+ry+" 0,0,0 "+-w+" 0 l 0,"+h+" a "+rx+","+ry+" 0,0,0 "+w+" 0 l 0,"+-h,el=shapeSvg.attr("label-offset-y",ry).insert("path",":first-child").attr("style",node.style).attr("d",shape).attr("transform","translate("+-w/2+","+-(h/2+ry)+")");return updateNodeBounds(node,el),node.intersect=function(point2){const pos=intersect_default.rect(node,point2),x=pos.x-node.x;if(0!=rx&&(Math.abs(x)<node.width/2||Math.abs(x)==node.width/2&&Math.abs(pos.y-node.y)>node.height/2-ry)){let y=ry*ry*(1-x*x/(rx*rx));0!=y&&(y=Math.sqrt(y)),y=ry-y,point2.y-node.y>0&&(y=-y),pos.y+=y}return pos},shapeSvg},"cylinder"),rect=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox,halfPadding:halfPadding}=await labelHelper(parent,node,"node "+node.classes+" "+node.class,!0),rect2=shapeSvg.insert("rect",":first-child"),totalWidth=node.positioned?node.width:bbox.width+node.padding,totalHeight=node.positioned?node.height:bbox.height+node.padding,x=node.positioned?-totalWidth/2:-bbox.width/2-halfPadding,y=node.positioned?-totalHeight/2:-bbox.height/2-halfPadding;if(rect2.attr("class","basic label-container").attr("style",node.style).attr("rx",node.rx).attr("ry",node.ry).attr("x",x).attr("y",y).attr("width",totalWidth).attr("height",totalHeight),node.props){const propKeys=new Set(Object.keys(node.props));node.props.borders&&(applyNodePropertyBorders(rect2,node.props.borders,totalWidth,totalHeight),propKeys.delete("borders")),propKeys.forEach(propKey=>{log.warn(`Unknown node property ${propKey}`)})}return updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg},"rect"),composite=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox,halfPadding:halfPadding}=await labelHelper(parent,node,"node "+node.classes,!0),rect2=shapeSvg.insert("rect",":first-child"),totalWidth=node.positioned?node.width:bbox.width+node.padding,totalHeight=node.positioned?node.height:bbox.height+node.padding,x=node.positioned?-totalWidth/2:-bbox.width/2-halfPadding,y=node.positioned?-totalHeight/2:-bbox.height/2-halfPadding;if(rect2.attr("class","basic cluster composite label-container").attr("style",node.style).attr("rx",node.rx).attr("ry",node.ry).attr("x",x).attr("y",y).attr("width",totalWidth).attr("height",totalHeight),node.props){const propKeys=new Set(Object.keys(node.props));node.props.borders&&(applyNodePropertyBorders(rect2,node.props.borders,totalWidth,totalHeight),propKeys.delete("borders")),propKeys.forEach(propKey=>{log.warn(`Unknown node property ${propKey}`)})}return updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg},"composite"),labelRect=__name(async(parent,node)=>{const{shapeSvg:shapeSvg}=await labelHelper(parent,node,"label",!0);log.trace("Classes = ",node.class);const rect2=shapeSvg.insert("rect",":first-child");if(rect2.attr("width",0).attr("height",0),shapeSvg.attr("class","label edgeLabel"),node.props){const propKeys=new Set(Object.keys(node.props));node.props.borders&&(applyNodePropertyBorders(rect2,node.props.borders,0,0),propKeys.delete("borders")),propKeys.forEach(propKey=>{log.warn(`Unknown node property ${propKey}`)})}return updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg},"labelRect");function applyNodePropertyBorders(rect2,borders,totalWidth,totalHeight){const strokeDashArray=[],addBorder=__name(length=>{strokeDashArray.push(length,0)},"addBorder"),skipBorder=__name(length=>{strokeDashArray.push(0,length)},"skipBorder");borders.includes("t")?(log.debug("add top border"),addBorder(totalWidth)):skipBorder(totalWidth),borders.includes("r")?(log.debug("add right border"),addBorder(totalHeight)):skipBorder(totalHeight),borders.includes("b")?(log.debug("add bottom border"),addBorder(totalWidth)):skipBorder(totalWidth),borders.includes("l")?(log.debug("add left border"),addBorder(totalHeight)):skipBorder(totalHeight),rect2.attr("stroke-dasharray",strokeDashArray.join(" "))}__name(applyNodePropertyBorders,"applyNodePropertyBorders");var rectWithTitle=__name(async(parent,node)=>{let classes2;classes2=node.classes?"node "+node.classes:"node default";const shapeSvg=parent.insert("g").attr("class",classes2).attr("id",node.domId||node.id),rect2=shapeSvg.insert("rect",":first-child"),innerLine=shapeSvg.insert("line"),label=shapeSvg.insert("g").attr("class","label"),text2=node.labelText.flat?node.labelText.flat():node.labelText;let title="";title="object"==typeof text2?text2[0]:text2,log.info("Label text abc79",title,text2,"object"==typeof text2);const text=await createLabel_default(label,title,node.labelStyle,!0,!0);let bbox={width:0,height:0};if(getEffectiveHtmlLabels(getConfig2())){const div=text.children[0],dv=select(text);bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}log.info("Text 2",text2);const textRows=text2.slice(1,text2.length);let titleBox=text.getBBox();const descr=await createLabel_default(label,textRows.join?textRows.join("<br/>"):textRows,node.labelStyle,!0,!0);if(getEffectiveHtmlLabels(getConfig2())){const div=descr.children[0],dv=select(descr);bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}const halfPadding=node.padding/2;return select(descr).attr("transform","translate( "+(bbox.width>titleBox.width?0:(titleBox.width-bbox.width)/2)+", "+(titleBox.height+halfPadding+5)+")"),select(text).attr("transform","translate( "+(bbox.width<titleBox.width?0:-(titleBox.width-bbox.width)/2)+", 0)"),bbox=label.node().getBBox(),label.attr("transform","translate("+-bbox.width/2+", "+(-bbox.height/2-halfPadding+3)+")"),rect2.attr("class","outer title-state").attr("x",-bbox.width/2-halfPadding).attr("y",-bbox.height/2-halfPadding).attr("width",bbox.width+node.padding).attr("height",bbox.height+node.padding),innerLine.attr("class","divider").attr("x1",-bbox.width/2-halfPadding).attr("x2",bbox.width/2+halfPadding).attr("y1",-bbox.height/2-halfPadding+titleBox.height+halfPadding).attr("y2",-bbox.height/2-halfPadding+titleBox.height+halfPadding),updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg},"rectWithTitle"),stadium=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox}=await labelHelper(parent,node,getClassesFromNode(node,void 0),!0),h=bbox.height+node.padding,w=bbox.width+h/4+node.padding,rect2=shapeSvg.insert("rect",":first-child").attr("style",node.style).attr("rx",h/2).attr("ry",h/2).attr("x",-w/2).attr("y",-h/2).attr("width",w).attr("height",h);return updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg},"stadium"),circle2=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox,halfPadding:halfPadding}=await labelHelper(parent,node,getClassesFromNode(node,void 0),!0),circle3=shapeSvg.insert("circle",":first-child");return circle3.attr("style",node.style).attr("rx",node.rx).attr("ry",node.ry).attr("r",bbox.width/2+halfPadding).attr("width",bbox.width+node.padding).attr("height",bbox.height+node.padding),log.info("Circle main"),updateNodeBounds(node,circle3),node.intersect=function(point2){return log.info("Circle intersect",node,bbox.width/2+halfPadding,point2),intersect_default.circle(node,bbox.width/2+halfPadding,point2)},shapeSvg},"circle"),doublecircle=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox,halfPadding:halfPadding}=await labelHelper(parent,node,getClassesFromNode(node,void 0),!0),circleGroup=shapeSvg.insert("g",":first-child"),outerCircle=circleGroup.insert("circle"),innerCircle=circleGroup.insert("circle");return circleGroup.attr("class",node.class),outerCircle.attr("style",node.style).attr("rx",node.rx).attr("ry",node.ry).attr("r",bbox.width/2+halfPadding+5).attr("width",bbox.width+node.padding+10).attr("height",bbox.height+node.padding+10),innerCircle.attr("style",node.style).attr("rx",node.rx).attr("ry",node.ry).attr("r",bbox.width/2+halfPadding).attr("width",bbox.width+node.padding).attr("height",bbox.height+node.padding),log.info("DoubleCircle main"),updateNodeBounds(node,outerCircle),node.intersect=function(point2){return log.info("DoubleCircle intersect",node,bbox.width/2+halfPadding+5,point2),intersect_default.circle(node,bbox.width/2+halfPadding+5,point2)},shapeSvg},"doublecircle"),subroutine=__name(async(parent,node)=>{const{shapeSvg:shapeSvg,bbox:bbox}=await labelHelper(parent,node,getClassesFromNode(node,void 0),!0),w=bbox.width+node.padding,h=bbox.height+node.padding,points=[{x:0,y:0},{x:w,y:0},{x:w,y:-h},{x:0,y:-h},{x:0,y:0},{x:-8,y:0},{x:w+8,y:0},{x:w+8,y:-h},{x:-8,y:-h},{x:-8,y:0}],el=insertPolygonShape(shapeSvg,w,h,points);return el.attr("style",node.style),updateNodeBounds(node,el),node.intersect=function(point2){return intersect_default.polygon(node,points,point2)},shapeSvg},"subroutine"),start=__name((parent,node)=>{const shapeSvg=parent.insert("g").attr("class","node default").attr("id",node.domId||node.id),circle3=shapeSvg.insert("circle",":first-child");return circle3.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),updateNodeBounds(node,circle3),node.intersect=function(point2){return intersect_default.circle(node,7,point2)},shapeSvg},"start"),forkJoin=__name((parent,node,dir)=>{const shapeSvg=parent.insert("g").attr("class","node default").attr("id",node.domId||node.id);let width=70,height=10;"LR"===dir&&(width=10,height=70);const shape=shapeSvg.append("rect").attr("x",-1*width/2).attr("y",-1*height/2).attr("width",width).attr("height",height).attr("class","fork-join");return updateNodeBounds(node,shape),node.height=node.height+node.padding/2,node.width=node.width+node.padding/2,node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg},"forkJoin"),shapes={rhombus:question,composite:composite,question:question,rect:rect,labelRect:labelRect,rectWithTitle:rectWithTitle,choice:choice,circle:circle2,doublecircle:doublecircle,stadium:stadium,hexagon:hexagon,block_arrow:block_arrow,rect_left_inv_arrow:rect_left_inv_arrow,lean_right:lean_right,lean_left:lean_left,trapezoid:trapezoid,inv_trapezoid:inv_trapezoid,rect_right_inv_arrow:rect_right_inv_arrow,cylinder:cylinder,start:start,end:__name((parent,node)=>{const shapeSvg=parent.insert("g").attr("class","node default").attr("id",node.domId||node.id),innerCircle=shapeSvg.insert("circle",":first-child"),circle3=shapeSvg.insert("circle",":first-child");return circle3.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),innerCircle.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),updateNodeBounds(node,circle3),node.intersect=function(point2){return intersect_default.circle(node,7,point2)},shapeSvg},"end"),note:note_default,subroutine:subroutine,fork:forkJoin,join:forkJoin,class_box:__name(async(parent,node)=>{var _a2;const halfPadding=node.padding/2;let classes2;classes2=node.classes?"node "+node.classes:"node default";const shapeSvg=parent.insert("g").attr("class",classes2).attr("id",node.domId||node.id),rect2=shapeSvg.insert("rect",":first-child"),topLine=shapeSvg.insert("line"),bottomLine=shapeSvg.insert("line");let maxWidth=0,maxHeight=4;const labelContainer=shapeSvg.insert("g").attr("class","label");let verticalPos=0;const hasInterface=null==(_a2=node.classData.annotations)?void 0:_a2[0],interfaceLabelText=node.classData.annotations[0]?"«"+node.classData.annotations[0]+"»":"",interfaceLabel=await createLabel_default(labelContainer,interfaceLabelText,node.labelStyle,!0,!0);let interfaceBBox=interfaceLabel.getBBox();if(getEffectiveHtmlLabels(getConfig2())){const div=interfaceLabel.children[0],dv=select(interfaceLabel);interfaceBBox=div.getBoundingClientRect(),dv.attr("width",interfaceBBox.width),dv.attr("height",interfaceBBox.height)}node.classData.annotations[0]&&(maxHeight+=interfaceBBox.height+4,maxWidth+=interfaceBBox.width);let classTitleString=node.classData.label;void 0!==node.classData.type&&""!==node.classData.type&&(getEffectiveHtmlLabels(getConfig2())?classTitleString+="<"+node.classData.type+">":classTitleString+="<"+node.classData.type+">");const classTitleLabel=await createLabel_default(labelContainer,classTitleString,node.labelStyle,!0,!0);select(classTitleLabel).attr("class","classTitle");let classTitleBBox=classTitleLabel.getBBox();if(getEffectiveHtmlLabels(getConfig2())){const div=classTitleLabel.children[0],dv=select(classTitleLabel);classTitleBBox=div.getBoundingClientRect(),dv.attr("width",classTitleBBox.width),dv.attr("height",classTitleBBox.height)}maxHeight+=classTitleBBox.height+4,classTitleBBox.width>maxWidth&&(maxWidth=classTitleBBox.width);const classAttributes=[];node.classData.members.forEach(async member=>{const parsedInfo=member.getDisplayDetails();let parsedText=parsedInfo.displayText;getEffectiveHtmlLabels(getConfig2())&&(parsedText=parsedText.replace(/</g,"<").replace(/>/g,">"));const lbl=await createLabel_default(labelContainer,parsedText,parsedInfo.cssStyle?parsedInfo.cssStyle:node.labelStyle,!0,!0);let bbox=lbl.getBBox();if(getEffectiveHtmlLabels(getConfig2())){const div=lbl.children[0],dv=select(lbl);bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}bbox.width>maxWidth&&(maxWidth=bbox.width),maxHeight+=bbox.height+4,classAttributes.push(lbl)}),maxHeight+=8;const classMethods=[];if(node.classData.methods.forEach(async member=>{const parsedInfo=member.getDisplayDetails();let displayText=parsedInfo.displayText;getEffectiveHtmlLabels(getConfig2())&&(displayText=displayText.replace(/</g,"<").replace(/>/g,">"));const lbl=await createLabel_default(labelContainer,displayText,parsedInfo.cssStyle?parsedInfo.cssStyle:node.labelStyle,!0,!0);let bbox=lbl.getBBox();if(getEffectiveHtmlLabels(getConfig2())){const div=lbl.children[0],dv=select(lbl);bbox=div.getBoundingClientRect(),dv.attr("width",bbox.width),dv.attr("height",bbox.height)}bbox.width>maxWidth&&(maxWidth=bbox.width),maxHeight+=bbox.height+4,classMethods.push(lbl)}),maxHeight+=8,hasInterface){let diffX2=(maxWidth-interfaceBBox.width)/2;select(interfaceLabel).attr("transform","translate( "+(-1*maxWidth/2+diffX2)+", "+-1*maxHeight/2+")"),verticalPos=interfaceBBox.height+4}let diffX=(maxWidth-classTitleBBox.width)/2;return select(classTitleLabel).attr("transform","translate( "+(-1*maxWidth/2+diffX)+", "+(-1*maxHeight/2+verticalPos)+")"),verticalPos+=classTitleBBox.height+4,topLine.attr("class","divider").attr("x1",-maxWidth/2-halfPadding).attr("x2",maxWidth/2+halfPadding).attr("y1",-maxHeight/2-halfPadding+8+verticalPos).attr("y2",-maxHeight/2-halfPadding+8+verticalPos),verticalPos+=8,classAttributes.forEach(lbl=>{select(lbl).attr("transform","translate( "+-maxWidth/2+", "+(-1*maxHeight/2+verticalPos+4)+")");const memberBBox=null==lbl?void 0:lbl.getBBox();verticalPos+=((null==memberBBox?void 0:memberBBox.height)??0)+4}),verticalPos+=8,bottomLine.attr("class","divider").attr("x1",-maxWidth/2-halfPadding).attr("x2",maxWidth/2+halfPadding).attr("y1",-maxHeight/2-halfPadding+8+verticalPos).attr("y2",-maxHeight/2-halfPadding+8+verticalPos),verticalPos+=8,classMethods.forEach(lbl=>{select(lbl).attr("transform","translate( "+-maxWidth/2+", "+(-1*maxHeight/2+verticalPos)+")");const memberBBox=null==lbl?void 0:lbl.getBBox();verticalPos+=((null==memberBBox?void 0:memberBBox.height)??0)+4}),rect2.attr("style",node.style).attr("class","outer title-state").attr("x",-maxWidth/2-halfPadding).attr("y",-maxHeight/2-halfPadding).attr("width",maxWidth+node.padding).attr("height",maxHeight+node.padding),updateNodeBounds(node,rect2),node.intersect=function(point2){return intersect_default.rect(node,point2)},shapeSvg},"class_box")},nodeElems={},insertNode=__name(async(elem,node,renderOptions)=>{let newEl,el;if(node.link){let target;"sandbox"===getConfig2().securityLevel?target="_top":node.linkTarget&&(target=node.linkTarget||"_blank"),newEl=elem.insert("svg:a").attr("xlink:href",node.link).attr("target",target),el=await shapes[node.shape](newEl,node,renderOptions)}else el=await shapes[node.shape](elem,node,renderOptions),newEl=el;return node.tooltip&&el.attr("title",node.tooltip),node.class&&el.attr("class","node default "+node.class),nodeElems[node.id]=newEl,node.haveCallback&&nodeElems[node.id].attr("class",nodeElems[node.id].attr("class")+" clickable"),newEl},"insertNode"),positionNode=__name(node=>{const el=nodeElems[node.id];log.trace("Transforming node",node.diff,node,"translate("+(node.x-node.width/2-5)+", "+node.width/2+")");const diff=node.diff||0;return node.clusterNode?el.attr("transform","translate("+(node.x+diff-node.width/2)+", "+(node.y-node.height/2-8)+")"):el.attr("transform","translate("+node.x+", "+node.y+")"),diff},"positionNode");function getNodeFromBlock(block,db2,positioned=!1){var _a2,_b2,_c;const vertex=block;let classStr="default";((null==(_a2=null==vertex?void 0:vertex.classes)?void 0:_a2.length)||0)>0&&(classStr=((null==vertex?void 0:vertex.classes)??[]).join(" ")),classStr+=" flowchart-label";let padding2,radius=0,shape="";switch(vertex.type){case"round":radius=5,shape="rect";break;case"composite":radius=0,shape="composite",padding2=0;break;case"square":case"group":default:shape="rect";break;case"diamond":shape="question";break;case"hexagon":shape="hexagon";break;case"block_arrow":shape="block_arrow";break;case"odd":case"rect_left_inv_arrow":shape="rect_left_inv_arrow";break;case"lean_right":shape="lean_right";break;case"lean_left":shape="lean_left";break;case"trapezoid":shape="trapezoid";break;case"inv_trapezoid":shape="inv_trapezoid";break;case"circle":shape="circle";break;case"ellipse":shape="ellipse";break;case"stadium":shape="stadium";break;case"subroutine":shape="subroutine";break;case"cylinder":shape="cylinder";break;case"doublecircle":shape="doublecircle"}const styles=getStylesFromArray((null==vertex?void 0:vertex.styles)??[]),vertexText=vertex.label,bounds=vertex.size??{width:0,height:0,x:0,y:0},dbDiagramId=db2.getDiagramId();return{labelStyle:styles.labelStyle,shape:shape,labelText:vertexText,rx:radius,ry:radius,class:classStr,style:styles.style,id:vertex.id,domId:dbDiagramId?`${dbDiagramId}-${vertex.id}`:vertex.id,directions:vertex.directions,width:bounds.width,height:bounds.height,x:bounds.x,y:bounds.y,positioned:positioned,intersect:void 0,type:vertex.type,padding:padding2??(null==(_c=null==(_b2=getConfig())?void 0:_b2.block)?void 0:_c.padding)??0}}async function calculateBlockSize(elem,block,db2){const node=getNodeFromBlock(block,db2,!1);if("group"===node.type)return;const config2=getConfig(),nodeEl=await insertNode(elem,node,{config:config2}),boundingBox=nodeEl.node().getBBox(),obj=db2.getBlock(node.id);obj.size={width:boundingBox.width,height:boundingBox.height,x:0,y:0,node:nodeEl},db2.setBlock(obj),nodeEl.remove()}async function insertBlockPositioned(elem,block,db2){const node=getNodeFromBlock(block,db2,!0);if("space"!==db2.getBlock(node.id).type){const config2=getConfig();await insertNode(elem,node,{config:config2}),block.intersect=null==node?void 0:node.intersect,positionNode(node)}}async function performOperations(elem,blocks2,db2,operation){for(const block of blocks2)await operation(elem,block,db2),block.children&&await performOperations(elem,block.children,db2,operation)}async function calculateBlockSizes(elem,blocks2,db2){await performOperations(elem,blocks2,db2,calculateBlockSize)}async function insertBlocks(elem,blocks2,db2){await performOperations(elem,blocks2,db2,insertBlockPositioned)}async function insertEdges(elem,edges,blocks2,db2,id){const g=new Graph({multigraph:!0,compound:!0});g.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const block of blocks2)block.size&&g.setNode(block.id,{width:block.size.width,height:block.size.height,intersect:block.intersect});for(const edge of edges)if(edge.start&&edge.end){const startBlock=db2.getBlock(edge.start),endBlock=db2.getBlock(edge.end);if((null==startBlock?void 0:startBlock.size)&&(null==endBlock?void 0:endBlock.size)){const start2=startBlock.size,end2=endBlock.size,points=[{x:start2.x,y:start2.y},{x:start2.x+(end2.x-start2.x)/2,y:start2.y+(end2.y-start2.y)/2},{x:end2.x,y:end2.y}],prefixedEdgeId=id?`${id}-${edge.id}`:edge.id;insertEdge(elem,{v:edge.start,w:edge.end,name:prefixedEdgeId},{...edge,id:prefixedEdgeId,arrowTypeEnd:edge.arrowTypeEnd,arrowTypeStart:edge.arrowTypeStart,points:points,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",g,id),edge.label&&(await insertEdgeLabel(elem,{...edge,label:edge.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:edge.arrowTypeEnd,arrowTypeStart:edge.arrowTypeStart,points:points,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),positionEdgeLabel({...edge,x:points[1].x,y:points[1].y},{originalPath:points}))}}}__name(getNodeFromBlock,"getNodeFromBlock"),__name(calculateBlockSize,"calculateBlockSize"),__name(insertBlockPositioned,"insertBlockPositioned"),__name(performOperations,"performOperations"),__name(calculateBlockSizes,"calculateBlockSizes"),__name(insertBlocks,"insertBlocks"),__name(insertEdges,"insertEdges");var getClasses2=__name(function(text,diagObj){return diagObj.db.getClasses()},"getClasses"),diagram={parser:block_default,db:blockDB_default,renderer:{draw:__name(async function(text,id,_version,diagObj){const{securityLevel:securityLevel,block:conf}=getConfig(),db2=diagObj.db;let sandboxElement;db2.setDiagramId(id),"sandbox"===securityLevel&&(sandboxElement=select("#i"+id));const root=select("sandbox"===securityLevel?sandboxElement.nodes()[0].contentDocument.body:"body"),svg="sandbox"===securityLevel?root.select(`[id="${id}"]`):select(`[id="${id}"]`);markers_default(svg,["point","circle","cross"],diagObj.type,id);const bl=db2.getBlocks(),blArr=db2.getBlocksFlat(),edges=db2.getEdges(),nodes=svg.insert("g").attr("class","block");await calculateBlockSizes(nodes,bl,db2);const bounds=layout(db2);if(await insertBlocks(nodes,bl,db2),await insertEdges(nodes,edges,blArr,db2,id),bounds){const bounds2=bounds,magicFactor=Math.max(1,Math.round(bounds2.width/bounds2.height*.125)),height=bounds2.height+magicFactor+10,width=bounds2.width+10,{useMaxWidth:useMaxWidth}=conf;configureSvgSize(svg,height,width,!!useMaxWidth),log.debug("Here Bounds",bounds,bounds2),svg.attr("viewBox",`${bounds2.x-5} ${bounds2.y-5} ${bounds2.width+10} ${bounds2.height+10}`)}},"draw"),getClasses:getClasses2},styles:styles_default};export{diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _a,_b;import{g as getNoteRect,d as drawRect}from"./chunk-YZCP3GAM-ntU--N7q.js";import{s as setAccDescription,g as getAccDescription,a as getAccTitle,b as setAccTitle,_ as __name,c as getConfig2,d as select,l as log,e as configureSvgSize,f as assignWithDepth_default,h as calculateTextWidth,i as sanitizeText,j as distExports,w as wrapLabel,k as common_default,m as calculateTextHeight}from"./mermaid.core-DaRhWNVu.js";import"./index-Cg7laj9Y.js";import"./vendor-codemirror-CXzpjiCu.js";import"./vendor-antd-n6I8Q8WX.js";import"./vendor-markdown-Bpu4AByL.js";var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,24],$V1=[1,25],$V2=[1,26],$V3=[1,27],$V4=[1,28],$V5=[1,63],$V6=[1,64],$V7=[1,65],$V8=[1,66],$V9=[1,67],$Va=[1,68],$Vb=[1,69],$Vc=[1,29],$Vd=[1,30],$Ve=[1,31],$Vf=[1,32],$Vg=[1,33],$Vh=[1,34],$Vi=[1,35],$Vj=[1,36],$Vk=[1,37],$Vl=[1,38],$Vm=[1,39],$Vn=[1,40],$Vo=[1,41],$Vp=[1,42],$Vq=[1,43],$Vr=[1,44],$Vs=[1,45],$Vt=[1,46],$Vu=[1,47],$Vv=[1,48],$Vw=[1,50],$Vx=[1,51],$Vy=[1,52],$Vz=[1,53],$VA=[1,54],$VB=[1,55],$VC=[1,56],$VD=[1,57],$VE=[1,58],$VF=[1,59],$VG=[1,60],$VH=[14,42],$VI=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],$VJ=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],$VK=[1,82],$VL=[1,83],$VM=[1,84],$VN=[1,85],$VO=[12,14,42],$VP=[12,14,33,42],$VQ=[12,14,33,42,76,77,79,80],$VR=[12,33],$VS=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 3:yy.setDirection("TB");break;case 4:yy.setDirection("BT");break;case 5:yy.setDirection("RL");break;case 6:yy.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:yy.setC4Type($$[$0-3]);break;case 19:yy.setTitle($$[$0].substring(6)),this.$=$$[$0].substring(6);break;case 20:yy.setAccDescription($$[$0].substring(15)),this.$=$$[$0].substring(15);break;case 21:this.$=$$[$0].trim(),yy.setTitle(this.$);break;case 22:case 23:this.$=$$[$0].trim(),yy.setAccDescription(this.$);break;case 28:$$[$0].splice(2,0,"ENTERPRISE"),yy.addPersonOrSystemBoundary(...$$[$0]),this.$=$$[$0];break;case 29:$$[$0].splice(2,0,"SYSTEM"),yy.addPersonOrSystemBoundary(...$$[$0]),this.$=$$[$0];break;case 30:yy.addPersonOrSystemBoundary(...$$[$0]),this.$=$$[$0];break;case 31:$$[$0].splice(2,0,"CONTAINER"),yy.addContainerBoundary(...$$[$0]),this.$=$$[$0];break;case 32:yy.addDeploymentNode("node",...$$[$0]),this.$=$$[$0];break;case 33:yy.addDeploymentNode("nodeL",...$$[$0]),this.$=$$[$0];break;case 34:yy.addDeploymentNode("nodeR",...$$[$0]),this.$=$$[$0];break;case 35:yy.popBoundaryParseStack();break;case 39:yy.addPersonOrSystem("person",...$$[$0]),this.$=$$[$0];break;case 40:yy.addPersonOrSystem("external_person",...$$[$0]),this.$=$$[$0];break;case 41:yy.addPersonOrSystem("system",...$$[$0]),this.$=$$[$0];break;case 42:yy.addPersonOrSystem("system_db",...$$[$0]),this.$=$$[$0];break;case 43:yy.addPersonOrSystem("system_queue",...$$[$0]),this.$=$$[$0];break;case 44:yy.addPersonOrSystem("external_system",...$$[$0]),this.$=$$[$0];break;case 45:yy.addPersonOrSystem("external_system_db",...$$[$0]),this.$=$$[$0];break;case 46:yy.addPersonOrSystem("external_system_queue",...$$[$0]),this.$=$$[$0];break;case 47:yy.addContainer("container",...$$[$0]),this.$=$$[$0];break;case 48:yy.addContainer("container_db",...$$[$0]),this.$=$$[$0];break;case 49:yy.addContainer("container_queue",...$$[$0]),this.$=$$[$0];break;case 50:yy.addContainer("external_container",...$$[$0]),this.$=$$[$0];break;case 51:yy.addContainer("external_container_db",...$$[$0]),this.$=$$[$0];break;case 52:yy.addContainer("external_container_queue",...$$[$0]),this.$=$$[$0];break;case 53:yy.addComponent("component",...$$[$0]),this.$=$$[$0];break;case 54:yy.addComponent("component_db",...$$[$0]),this.$=$$[$0];break;case 55:yy.addComponent("component_queue",...$$[$0]),this.$=$$[$0];break;case 56:yy.addComponent("external_component",...$$[$0]),this.$=$$[$0];break;case 57:yy.addComponent("external_component_db",...$$[$0]),this.$=$$[$0];break;case 58:yy.addComponent("external_component_queue",...$$[$0]),this.$=$$[$0];break;case 60:yy.addRel("rel",...$$[$0]),this.$=$$[$0];break;case 61:yy.addRel("birel",...$$[$0]),this.$=$$[$0];break;case 62:yy.addRel("rel_u",...$$[$0]),this.$=$$[$0];break;case 63:yy.addRel("rel_d",...$$[$0]),this.$=$$[$0];break;case 64:yy.addRel("rel_l",...$$[$0]),this.$=$$[$0];break;case 65:yy.addRel("rel_r",...$$[$0]),this.$=$$[$0];break;case 66:yy.addRel("rel_b",...$$[$0]),this.$=$$[$0];break;case 67:$$[$0].splice(0,1),yy.addRel("rel",...$$[$0]),this.$=$$[$0];break;case 68:yy.updateElStyle("update_el_style",...$$[$0]),this.$=$$[$0];break;case 69:yy.updateRelStyle("update_rel_style",...$$[$0]),this.$=$$[$0];break;case 70:yy.updateLayoutConfig("update_layout_config",...$$[$0]),this.$=$$[$0];break;case 71:this.$=[$$[$0]];break;case 72:$$[$0].unshift($$[$0-1]),this.$=$$[$0];break;case 73:case 75:this.$=$$[$0].trim();break;case 74:let kv={};kv[$$[$0-1].trim()]=$$[$0].trim(),this.$=kv;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{13:70,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{13:71,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{13:72,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{13:73,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{14:[1,74]},o($VH,[2,13],{43:23,29:49,30:61,32:62,20:75,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG}),o($VH,[2,14]),o($VI,[2,16],{12:[1,76]}),o($VH,[2,36],{12:[1,77]}),o($VJ,[2,19]),o($VJ,[2,20]),{25:[1,78]},{27:[1,79]},o($VJ,[2,23]),{35:80,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:86,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:87,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:88,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:89,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:90,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:91,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:92,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:93,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:94,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:95,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:96,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:97,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:98,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:99,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:100,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:101,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:102,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:103,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:104,75:81,76:$VK,77:$VL,79:$VM,80:$VN},o($VO,[2,59]),{35:105,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:106,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:107,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:108,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:109,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:110,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:111,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:112,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:113,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:114,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:115,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{20:116,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{12:[1,118],33:[1,117]},{35:119,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:120,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:121,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:122,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:123,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:124,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:125,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},o($VH,[2,15]),o($VI,[2,17],{21:22,19:130,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4}),o($VH,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG}),o($VJ,[2,21]),o($VJ,[2,22]),o($VO,[2,39]),o($VP,[2,71],{75:81,35:132,76:$VK,77:$VL,79:$VM,80:$VN}),o($VQ,[2,73]),{78:[1,133]},o($VQ,[2,75]),o($VQ,[2,76]),o($VO,[2,40]),o($VO,[2,41]),o($VO,[2,42]),o($VO,[2,43]),o($VO,[2,44]),o($VO,[2,45]),o($VO,[2,46]),o($VO,[2,47]),o($VO,[2,48]),o($VO,[2,49]),o($VO,[2,50]),o($VO,[2,51]),o($VO,[2,52]),o($VO,[2,53]),o($VO,[2,54]),o($VO,[2,55]),o($VO,[2,56]),o($VO,[2,57]),o($VO,[2,58]),o($VO,[2,60]),o($VO,[2,61]),o($VO,[2,62]),o($VO,[2,63]),o($VO,[2,64]),o($VO,[2,65]),o($VO,[2,66]),o($VO,[2,67]),o($VO,[2,68]),o($VO,[2,69]),o($VO,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},o($VR,[2,28]),o($VR,[2,29]),o($VR,[2,30]),o($VR,[2,31]),o($VR,[2,32]),o($VR,[2,33]),o($VR,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},o($VI,[2,18]),o($VH,[2,38]),o($VP,[2,72]),o($VQ,[2,74]),o($VO,[2,24]),o($VO,[2,35]),o($VS,[2,25]),o($VS,[2,26],{12:[1,138]}),o($VS,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c2=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c2+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var c4Type,c4Diagram_default=parser,c4ShapeArray=[],boundaryParseStack=[""],currentBoundaryParse="global",parentBoundaryParse="",boundaries=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],rels=[],title="",wrapEnabled=!1,c4ShapeInRow=4,c4BoundaryInRow=2,getC4Type=__name(function(){return c4Type},"getC4Type"),setC4Type=__name(function(c4TypeParam){let sanitizedText=sanitizeText(c4TypeParam,getConfig2());c4Type=sanitizedText},"setC4Type"),addRel=__name(function(type,from,to,label,techn,descr,sprite,tags,link){if(null==type||null==from||null==to||null==label)return;let rel={};const old=rels.find(rel2=>rel2.from===from&&rel2.to===to);if(old?rel=old:rels.push(rel),rel.type=type,rel.from=from,rel.to=to,rel.label={text:label},null==techn)rel.techn={text:""};else if("object"==typeof techn){let[key,value]=Object.entries(techn)[0];rel[key]={text:value}}else rel.techn={text:techn};if(null==descr)rel.descr={text:""};else if("object"==typeof descr){let[key,value]=Object.entries(descr)[0];rel[key]={text:value}}else rel.descr={text:descr};if("object"==typeof sprite){let[key,value]=Object.entries(sprite)[0];rel[key]=value}else rel.sprite=sprite;if("object"==typeof tags){let[key,value]=Object.entries(tags)[0];rel[key]=value}else rel.tags=tags;if("object"==typeof link){let[key,value]=Object.entries(link)[0];rel[key]=value}else rel.link=link;rel.wrap=autoWrap()},"addRel"),addPersonOrSystem=__name(function(typeC4Shape,alias,label,descr,sprite,tags,link){if(null===alias||null===label)return;let personOrSystem={};const old=c4ShapeArray.find(personOrSystem2=>personOrSystem2.alias===alias);if(old&&alias===old.alias?personOrSystem=old:(personOrSystem.alias=alias,c4ShapeArray.push(personOrSystem)),personOrSystem.label=null==label?{text:""}:{text:label},null==descr)personOrSystem.descr={text:""};else if("object"==typeof descr){let[key,value]=Object.entries(descr)[0];personOrSystem[key]={text:value}}else personOrSystem.descr={text:descr};if("object"==typeof sprite){let[key,value]=Object.entries(sprite)[0];personOrSystem[key]=value}else personOrSystem.sprite=sprite;if("object"==typeof tags){let[key,value]=Object.entries(tags)[0];personOrSystem[key]=value}else personOrSystem.tags=tags;if("object"==typeof link){let[key,value]=Object.entries(link)[0];personOrSystem[key]=value}else personOrSystem.link=link;personOrSystem.typeC4Shape={text:typeC4Shape},personOrSystem.parentBoundary=currentBoundaryParse,personOrSystem.wrap=autoWrap()},"addPersonOrSystem"),addContainer=__name(function(typeC4Shape,alias,label,techn,descr,sprite,tags,link){if(null===alias||null===label)return;let container={};const old=c4ShapeArray.find(container2=>container2.alias===alias);if(old&&alias===old.alias?container=old:(container.alias=alias,c4ShapeArray.push(container)),container.label=null==label?{text:""}:{text:label},null==techn)container.techn={text:""};else if("object"==typeof techn){let[key,value]=Object.entries(techn)[0];container[key]={text:value}}else container.techn={text:techn};if(null==descr)container.descr={text:""};else if("object"==typeof descr){let[key,value]=Object.entries(descr)[0];container[key]={text:value}}else container.descr={text:descr};if("object"==typeof sprite){let[key,value]=Object.entries(sprite)[0];container[key]=value}else container.sprite=sprite;if("object"==typeof tags){let[key,value]=Object.entries(tags)[0];container[key]=value}else container.tags=tags;if("object"==typeof link){let[key,value]=Object.entries(link)[0];container[key]=value}else container.link=link;container.wrap=autoWrap(),container.typeC4Shape={text:typeC4Shape},container.parentBoundary=currentBoundaryParse},"addContainer"),addComponent=__name(function(typeC4Shape,alias,label,techn,descr,sprite,tags,link){if(null===alias||null===label)return;let component={};const old=c4ShapeArray.find(component2=>component2.alias===alias);if(old&&alias===old.alias?component=old:(component.alias=alias,c4ShapeArray.push(component)),component.label=null==label?{text:""}:{text:label},null==techn)component.techn={text:""};else if("object"==typeof techn){let[key,value]=Object.entries(techn)[0];component[key]={text:value}}else component.techn={text:techn};if(null==descr)component.descr={text:""};else if("object"==typeof descr){let[key,value]=Object.entries(descr)[0];component[key]={text:value}}else component.descr={text:descr};if("object"==typeof sprite){let[key,value]=Object.entries(sprite)[0];component[key]=value}else component.sprite=sprite;if("object"==typeof tags){let[key,value]=Object.entries(tags)[0];component[key]=value}else component.tags=tags;if("object"==typeof link){let[key,value]=Object.entries(link)[0];component[key]=value}else component.link=link;component.wrap=autoWrap(),component.typeC4Shape={text:typeC4Shape},component.parentBoundary=currentBoundaryParse},"addComponent"),addPersonOrSystemBoundary=__name(function(alias,label,type,tags,link){if(null===alias||null===label)return;let boundary={};const old=boundaries.find(boundary2=>boundary2.alias===alias);if(old&&alias===old.alias?boundary=old:(boundary.alias=alias,boundaries.push(boundary)),boundary.label=null==label?{text:""}:{text:label},null==type)boundary.type={text:"system"};else if("object"==typeof type){let[key,value]=Object.entries(type)[0];boundary[key]={text:value}}else boundary.type={text:type};if("object"==typeof tags){let[key,value]=Object.entries(tags)[0];boundary[key]=value}else boundary.tags=tags;if("object"==typeof link){let[key,value]=Object.entries(link)[0];boundary[key]=value}else boundary.link=link;boundary.parentBoundary=currentBoundaryParse,boundary.wrap=autoWrap(),parentBoundaryParse=currentBoundaryParse,currentBoundaryParse=alias,boundaryParseStack.push(parentBoundaryParse)},"addPersonOrSystemBoundary"),addContainerBoundary=__name(function(alias,label,type,tags,link){if(null===alias||null===label)return;let boundary={};const old=boundaries.find(boundary2=>boundary2.alias===alias);if(old&&alias===old.alias?boundary=old:(boundary.alias=alias,boundaries.push(boundary)),boundary.label=null==label?{text:""}:{text:label},null==type)boundary.type={text:"container"};else if("object"==typeof type){let[key,value]=Object.entries(type)[0];boundary[key]={text:value}}else boundary.type={text:type};if("object"==typeof tags){let[key,value]=Object.entries(tags)[0];boundary[key]=value}else boundary.tags=tags;if("object"==typeof link){let[key,value]=Object.entries(link)[0];boundary[key]=value}else boundary.link=link;boundary.parentBoundary=currentBoundaryParse,boundary.wrap=autoWrap(),parentBoundaryParse=currentBoundaryParse,currentBoundaryParse=alias,boundaryParseStack.push(parentBoundaryParse)},"addContainerBoundary"),addDeploymentNode=__name(function(nodeType,alias,label,type,descr,sprite,tags,link){if(null===alias||null===label)return;let boundary={};const old=boundaries.find(boundary2=>boundary2.alias===alias);if(old&&alias===old.alias?boundary=old:(boundary.alias=alias,boundaries.push(boundary)),boundary.label=null==label?{text:""}:{text:label},null==type)boundary.type={text:"node"};else if("object"==typeof type){let[key,value]=Object.entries(type)[0];boundary[key]={text:value}}else boundary.type={text:type};if(null==descr)boundary.descr={text:""};else if("object"==typeof descr){let[key,value]=Object.entries(descr)[0];boundary[key]={text:value}}else boundary.descr={text:descr};if("object"==typeof tags){let[key,value]=Object.entries(tags)[0];boundary[key]=value}else boundary.tags=tags;if("object"==typeof link){let[key,value]=Object.entries(link)[0];boundary[key]=value}else boundary.link=link;boundary.nodeType=nodeType,boundary.parentBoundary=currentBoundaryParse,boundary.wrap=autoWrap(),parentBoundaryParse=currentBoundaryParse,currentBoundaryParse=alias,boundaryParseStack.push(parentBoundaryParse)},"addDeploymentNode"),popBoundaryParseStack=__name(function(){currentBoundaryParse=parentBoundaryParse,boundaryParseStack.pop(),parentBoundaryParse=boundaryParseStack.pop(),boundaryParseStack.push(parentBoundaryParse)},"popBoundaryParseStack"),updateElStyle=__name(function(typeC4Shape,elementName,bgColor,fontColor,borderColor,shadowing,shape,sprite,techn,legendText,legendSprite){let old=c4ShapeArray.find(element=>element.alias===elementName);if(void 0!==old||(old=boundaries.find(element=>element.alias===elementName),void 0!==old)){if(null!=bgColor)if("object"==typeof bgColor){let[key,value]=Object.entries(bgColor)[0];old[key]=value}else old.bgColor=bgColor;if(null!=fontColor)if("object"==typeof fontColor){let[key,value]=Object.entries(fontColor)[0];old[key]=value}else old.fontColor=fontColor;if(null!=borderColor)if("object"==typeof borderColor){let[key,value]=Object.entries(borderColor)[0];old[key]=value}else old.borderColor=borderColor;if(null!=shadowing)if("object"==typeof shadowing){let[key,value]=Object.entries(shadowing)[0];old[key]=value}else old.shadowing=shadowing;if(null!=shape)if("object"==typeof shape){let[key,value]=Object.entries(shape)[0];old[key]=value}else old.shape=shape;if(null!=sprite)if("object"==typeof sprite){let[key,value]=Object.entries(sprite)[0];old[key]=value}else old.sprite=sprite;if(null!=techn)if("object"==typeof techn){let[key,value]=Object.entries(techn)[0];old[key]=value}else old.techn=techn;if(null!=legendText)if("object"==typeof legendText){let[key,value]=Object.entries(legendText)[0];old[key]=value}else old.legendText=legendText;if(null!=legendSprite)if("object"==typeof legendSprite){let[key,value]=Object.entries(legendSprite)[0];old[key]=value}else old.legendSprite=legendSprite}},"updateElStyle"),updateRelStyle=__name(function(typeC4Shape,from,to,textColor,lineColor,offsetX,offsetY){const old=rels.find(rel=>rel.from===from&&rel.to===to);if(void 0!==old){if(null!=textColor)if("object"==typeof textColor){let[key,value]=Object.entries(textColor)[0];old[key]=value}else old.textColor=textColor;if(null!=lineColor)if("object"==typeof lineColor){let[key,value]=Object.entries(lineColor)[0];old[key]=value}else old.lineColor=lineColor;if(null!=offsetX)if("object"==typeof offsetX){let[key,value]=Object.entries(offsetX)[0];old[key]=parseInt(value)}else old.offsetX=parseInt(offsetX);if(null!=offsetY)if("object"==typeof offsetY){let[key,value]=Object.entries(offsetY)[0];old[key]=parseInt(value)}else old.offsetY=parseInt(offsetY)}},"updateRelStyle"),updateLayoutConfig=__name(function(typeC4Shape,c4ShapeInRowParam,c4BoundaryInRowParam){let c4ShapeInRowValue=c4ShapeInRow,c4BoundaryInRowValue=c4BoundaryInRow;if("object"==typeof c4ShapeInRowParam){const value=Object.values(c4ShapeInRowParam)[0];c4ShapeInRowValue=parseInt(value)}else c4ShapeInRowValue=parseInt(c4ShapeInRowParam);if("object"==typeof c4BoundaryInRowParam){const value=Object.values(c4BoundaryInRowParam)[0];c4BoundaryInRowValue=parseInt(value)}else c4BoundaryInRowValue=parseInt(c4BoundaryInRowParam);c4ShapeInRowValue>=1&&(c4ShapeInRow=c4ShapeInRowValue),c4BoundaryInRowValue>=1&&(c4BoundaryInRow=c4BoundaryInRowValue)},"updateLayoutConfig"),getC4ShapeInRow=__name(function(){return c4ShapeInRow},"getC4ShapeInRow"),getC4BoundaryInRow=__name(function(){return c4BoundaryInRow},"getC4BoundaryInRow"),getCurrentBoundaryParse=__name(function(){return currentBoundaryParse},"getCurrentBoundaryParse"),getParentBoundaryParse=__name(function(){return parentBoundaryParse},"getParentBoundaryParse"),getC4ShapeArray=__name(function(parentBoundary){return null==parentBoundary?c4ShapeArray:c4ShapeArray.filter(personOrSystem=>personOrSystem.parentBoundary===parentBoundary)},"getC4ShapeArray"),getC4Shape=__name(function(alias){return c4ShapeArray.find(personOrSystem=>personOrSystem.alias===alias)},"getC4Shape"),getC4ShapeKeys=__name(function(parentBoundary){return Object.keys(getC4ShapeArray(parentBoundary))},"getC4ShapeKeys"),getBoundaries=__name(function(parentBoundary){return null==parentBoundary?boundaries:boundaries.filter(boundary=>boundary.parentBoundary===parentBoundary)},"getBoundaries"),getBoundarys=getBoundaries,getRels=__name(function(){return rels},"getRels"),getTitle=__name(function(){return title},"getTitle"),setWrap=__name(function(wrapSetting){wrapEnabled=wrapSetting},"setWrap"),autoWrap=__name(function(){return wrapEnabled},"autoWrap"),clear=__name(function(){c4ShapeArray=[],boundaries=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],parentBoundaryParse="",currentBoundaryParse="global",boundaryParseStack=[""],rels=[],boundaryParseStack=[""],title="",wrapEnabled=!1,c4ShapeInRow=4,c4BoundaryInRow=2},"clear"),setTitle=__name(function(txt){let sanitizedText=sanitizeText(txt,getConfig2());title=sanitizedText},"setTitle"),c4Db_default={addPersonOrSystem:addPersonOrSystem,addPersonOrSystemBoundary:addPersonOrSystemBoundary,addContainer:addContainer,addContainerBoundary:addContainerBoundary,addComponent:addComponent,addDeploymentNode:addDeploymentNode,popBoundaryParseStack:popBoundaryParseStack,addRel:addRel,updateElStyle:updateElStyle,updateRelStyle:updateRelStyle,updateLayoutConfig:updateLayoutConfig,autoWrap:autoWrap,setWrap:setWrap,getC4ShapeArray:getC4ShapeArray,getC4Shape:getC4Shape,getC4ShapeKeys:getC4ShapeKeys,getBoundaries:getBoundaries,getBoundarys:getBoundarys,getCurrentBoundaryParse:getCurrentBoundaryParse,getParentBoundaryParse:getParentBoundaryParse,getRels:getRels,getTitle:getTitle,getC4Type:getC4Type,getC4ShapeInRow:getC4ShapeInRow,getC4BoundaryInRow:getC4BoundaryInRow,setAccTitle:setAccTitle,getAccTitle:getAccTitle,getAccDescription:getAccDescription,setAccDescription:setAccDescription,getConfig:__name(()=>getConfig2().c4,"getConfig"),clear:clear,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:setTitle,setC4Type:setC4Type},drawRect2=__name(function(elem,rectData){return drawRect(elem,rectData)},"drawRect"),drawImage=__name(function(elem,width,height,x,y,link){const imageElem=elem.append("image");imageElem.attr("width",width),imageElem.attr("height",height),imageElem.attr("x",x),imageElem.attr("y",y);let sanitizedLink=link.startsWith("data:image/png;base64")?link:distExports.sanitizeUrl(link);imageElem.attr("xlink:href",sanitizedLink)},"drawImage"),drawRels=__name((elem,rels2,conf2,diagramId)=>{const relsElem=elem.append("g");let i=0;for(let rel of rels2){let textColor=rel.textColor?rel.textColor:"#444444",strokeColor=rel.lineColor?rel.lineColor:"#444444",offsetX=rel.offsetX?parseInt(rel.offsetX):0,offsetY=rel.offsetY?parseInt(rel.offsetY):0,url="";if(0===i){let line=relsElem.append("line");line.attr("x1",rel.startPoint.x),line.attr("y1",rel.startPoint.y),line.attr("x2",rel.endPoint.x),line.attr("y2",rel.endPoint.y),line.attr("stroke-width","1"),line.attr("stroke",strokeColor),line.style("fill","none"),"rel_b"!==rel.type&&line.attr("marker-end","url("+url+"#"+diagramId+"-arrowhead)"),"birel"!==rel.type&&"rel_b"!==rel.type||line.attr("marker-start","url("+url+"#"+diagramId+"-arrowend)"),i=-1}else{let line=relsElem.append("path");line.attr("fill","none").attr("stroke-width","1").attr("stroke",strokeColor).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",rel.startPoint.x).replaceAll("starty",rel.startPoint.y).replaceAll("controlx",rel.startPoint.x+(rel.endPoint.x-rel.startPoint.x)/2-(rel.endPoint.x-rel.startPoint.x)/4).replaceAll("controly",rel.startPoint.y+(rel.endPoint.y-rel.startPoint.y)/2).replaceAll("stopx",rel.endPoint.x).replaceAll("stopy",rel.endPoint.y)),"rel_b"!==rel.type&&line.attr("marker-end","url("+url+"#"+diagramId+"-arrowhead)"),"birel"!==rel.type&&"rel_b"!==rel.type||line.attr("marker-start","url("+url+"#"+diagramId+"-arrowend)")}let messageConf=conf2.messageFont();_drawTextCandidateFunc(conf2)(rel.label.text,relsElem,Math.min(rel.startPoint.x,rel.endPoint.x)+Math.abs(rel.endPoint.x-rel.startPoint.x)/2+offsetX,Math.min(rel.startPoint.y,rel.endPoint.y)+Math.abs(rel.endPoint.y-rel.startPoint.y)/2+offsetY,rel.label.width,rel.label.height,{fill:textColor},messageConf),rel.techn&&""!==rel.techn.text&&(messageConf=conf2.messageFont(),_drawTextCandidateFunc(conf2)("["+rel.techn.text+"]",relsElem,Math.min(rel.startPoint.x,rel.endPoint.x)+Math.abs(rel.endPoint.x-rel.startPoint.x)/2+offsetX,Math.min(rel.startPoint.y,rel.endPoint.y)+Math.abs(rel.endPoint.y-rel.startPoint.y)/2+conf2.messageFontSize+5+offsetY,Math.max(rel.label.width,rel.techn.width),rel.techn.height,{fill:textColor,"font-style":"italic"},messageConf))}},"drawRels"),drawBoundary=__name(function(elem,boundary,conf2){const boundaryElem=elem.append("g");let fillColor=boundary.bgColor?boundary.bgColor:"none",strokeColor=boundary.borderColor?boundary.borderColor:"#444444",fontColor=boundary.fontColor?boundary.fontColor:"black",attrsValue={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};boundary.nodeType&&(attrsValue={"stroke-width":1});let rectData={x:boundary.x,y:boundary.y,fill:fillColor,stroke:strokeColor,width:boundary.width,height:boundary.height,rx:2.5,ry:2.5,attrs:attrsValue};drawRect2(boundaryElem,rectData);let boundaryConf=conf2.boundaryFont();boundaryConf.fontWeight="bold",boundaryConf.fontSize=boundaryConf.fontSize+2,boundaryConf.fontColor=fontColor,_drawTextCandidateFunc(conf2)(boundary.label.text,boundaryElem,boundary.x,boundary.y+boundary.label.Y,boundary.width,boundary.height,{fill:"#444444"},boundaryConf),boundary.type&&""!==boundary.type.text&&(boundaryConf=conf2.boundaryFont(),boundaryConf.fontColor=fontColor,_drawTextCandidateFunc(conf2)(boundary.type.text,boundaryElem,boundary.x,boundary.y+boundary.type.Y,boundary.width,boundary.height,{fill:"#444444"},boundaryConf)),boundary.descr&&""!==boundary.descr.text&&(boundaryConf=conf2.boundaryFont(),boundaryConf.fontSize=boundaryConf.fontSize-2,boundaryConf.fontColor=fontColor,_drawTextCandidateFunc(conf2)(boundary.descr.text,boundaryElem,boundary.x,boundary.y+boundary.descr.Y,boundary.width,boundary.height,{fill:"#444444"},boundaryConf))},"drawBoundary"),drawC4Shape=__name(function(elem,c4Shape,conf2){var _a2;let fillColor=c4Shape.bgColor?c4Shape.bgColor:conf2[c4Shape.typeC4Shape.text+"_bg_color"],strokeColor=c4Shape.borderColor?c4Shape.borderColor:conf2[c4Shape.typeC4Shape.text+"_border_color"],fontColor=c4Shape.fontColor?c4Shape.fontColor:"#FFFFFF",personImg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(c4Shape.typeC4Shape.text){case"person":personImg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":personImg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const c4ShapeElem=elem.append("g");c4ShapeElem.attr("class","person-man");const rect=getNoteRect();switch(c4Shape.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":rect.x=c4Shape.x,rect.y=c4Shape.y,rect.fill=fillColor,rect.width=c4Shape.width,rect.height=c4Shape.height,rect.stroke=strokeColor,rect.rx=2.5,rect.ry=2.5,rect.attrs={"stroke-width":.5},drawRect2(c4ShapeElem,rect);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":c4ShapeElem.append("path").attr("fill",fillColor).attr("stroke-width","0.5").attr("stroke",strokeColor).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",c4Shape.x).replaceAll("starty",c4Shape.y).replaceAll("half",c4Shape.width/2).replaceAll("height",c4Shape.height)),c4ShapeElem.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",strokeColor).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",c4Shape.x).replaceAll("starty",c4Shape.y).replaceAll("half",c4Shape.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":c4ShapeElem.append("path").attr("fill",fillColor).attr("stroke-width","0.5").attr("stroke",strokeColor).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",c4Shape.x).replaceAll("starty",c4Shape.y).replaceAll("width",c4Shape.width).replaceAll("half",c4Shape.height/2)),c4ShapeElem.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",strokeColor).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",c4Shape.x+c4Shape.width).replaceAll("starty",c4Shape.y).replaceAll("half",c4Shape.height/2))}let c4ShapeFontConf=getC4ShapeFont(conf2,c4Shape.typeC4Shape.text);switch(c4ShapeElem.append("text").attr("fill",fontColor).attr("font-family",c4ShapeFontConf.fontFamily).attr("font-size",c4ShapeFontConf.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",c4Shape.typeC4Shape.width).attr("x",c4Shape.x+c4Shape.width/2-c4Shape.typeC4Shape.width/2).attr("y",c4Shape.y+c4Shape.typeC4Shape.Y).text("<<"+c4Shape.typeC4Shape.text+">>"),c4Shape.typeC4Shape.text){case"person":case"external_person":drawImage(c4ShapeElem,48,48,c4Shape.x+c4Shape.width/2-24,c4Shape.y+c4Shape.image.Y,personImg)}let textFontConf=conf2[c4Shape.typeC4Shape.text+"Font"]();return textFontConf.fontWeight="bold",textFontConf.fontSize=textFontConf.fontSize+2,textFontConf.fontColor=fontColor,_drawTextCandidateFunc(conf2)(c4Shape.label.text,c4ShapeElem,c4Shape.x,c4Shape.y+c4Shape.label.Y,c4Shape.width,c4Shape.height,{fill:fontColor},textFontConf),textFontConf=conf2[c4Shape.typeC4Shape.text+"Font"](),textFontConf.fontColor=fontColor,c4Shape.techn&&""!==(null==(_a2=c4Shape.techn)?void 0:_a2.text)?_drawTextCandidateFunc(conf2)(c4Shape.techn.text,c4ShapeElem,c4Shape.x,c4Shape.y+c4Shape.techn.Y,c4Shape.width,c4Shape.height,{fill:fontColor,"font-style":"italic"},textFontConf):c4Shape.type&&""!==c4Shape.type.text&&_drawTextCandidateFunc(conf2)(c4Shape.type.text,c4ShapeElem,c4Shape.x,c4Shape.y+c4Shape.type.Y,c4Shape.width,c4Shape.height,{fill:fontColor,"font-style":"italic"},textFontConf),c4Shape.descr&&""!==c4Shape.descr.text&&(textFontConf=conf2.personFont(),textFontConf.fontColor=fontColor,_drawTextCandidateFunc(conf2)(c4Shape.descr.text,c4ShapeElem,c4Shape.x,c4Shape.y+c4Shape.descr.Y,c4Shape.width,c4Shape.height,{fill:fontColor},textFontConf)),c4Shape.height},"drawC4Shape"),insertDatabaseIcon=__name(function(elem,id){elem.append("defs").append("symbol").attr("id",id+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),insertComputerIcon=__name(function(elem,id){elem.append("defs").append("symbol").attr("id",id+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),insertClockIcon=__name(function(elem,id){elem.append("defs").append("symbol").attr("id",id+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),insertArrowHead=__name(function(elem,id){elem.append("defs").append("marker").attr("id",id+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),insertArrowEnd=__name(function(elem,id){elem.append("defs").append("marker").attr("id",id+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),insertArrowFilledHead=__name(function(elem,id){elem.append("defs").append("marker").attr("id",id+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),insertArrowCrossHead=__name(function(elem,id){const marker=elem.append("defs").append("marker").attr("id",id+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);marker.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),marker.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),getC4ShapeFont=__name((cnf,typeC4Shape)=>({fontFamily:cnf[typeC4Shape+"FontFamily"],fontSize:cnf[typeC4Shape+"FontSize"],fontWeight:cnf[typeC4Shape+"FontWeight"]}),"getC4ShapeFont"),_drawTextCandidateFunc=function(){function byText(content,g,x,y,width,height,textAttrs){_setTextAttrs(g.append("text").attr("x",x+width/2).attr("y",y+height/2+5).style("text-anchor","middle").text(content),textAttrs)}function byTspan(content,g,x,y,width,height,textAttrs,conf2){const{fontSize:fontSize,fontFamily:fontFamily,fontWeight:fontWeight}=conf2,lines=content.split(common_default.lineBreakRegex);for(let i=0;i<lines.length;i++){const dy=i*fontSize-fontSize*(lines.length-1)/2,text=g.append("text").attr("x",x+width/2).attr("y",y).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",fontSize).style("font-weight",fontWeight).style("font-family",fontFamily);text.append("tspan").attr("dy",dy).text(lines[i]).attr("alignment-baseline","mathematical"),_setTextAttrs(text,textAttrs)}}function byFo(content,g,x,y,width,height,textAttrs,conf2){const s=g.append("switch"),text=s.append("foreignObject").attr("x",x).attr("y",y).attr("width",width).attr("height",height).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");text.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(content),byTspan(content,s,x,y,width,0,textAttrs,conf2),_setTextAttrs(text,textAttrs)}function _setTextAttrs(toText,fromTextAttrsDict){for(const key in fromTextAttrsDict)fromTextAttrsDict.hasOwnProperty(key)&&toText.attr(key,fromTextAttrsDict[key])}return __name(byText,"byText"),__name(byTspan,"byTspan"),__name(byFo,"byFo"),__name(_setTextAttrs,"_setTextAttrs"),function(conf2){return"fo"===conf2.textPlacement?byFo:"old"===conf2.textPlacement?byText:byTspan}}(),svgDraw_default={drawRect:drawRect2,drawBoundary:drawBoundary,drawC4Shape:drawC4Shape,drawRels:drawRels,drawImage:drawImage,insertArrowHead:insertArrowHead,insertArrowEnd:insertArrowEnd,insertArrowFilledHead:insertArrowFilledHead,insertArrowCrossHead:insertArrowCrossHead,insertDatabaseIcon:insertDatabaseIcon,insertComputerIcon:insertComputerIcon,insertClockIcon:insertClockIcon},globalBoundaryMaxX=0,globalBoundaryMaxY=0,c4ShapeInRow2=4,c4BoundaryInRow2=2;parser.yy=c4Db_default;var conf={},Bounds=(__name(_a=class{constructor(diagObj){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,setConf(diagObj.db.getConfig())}setData(startx,stopx,starty,stopy){this.nextData.startx=this.data.startx=startx,this.nextData.stopx=this.data.stopx=stopx,this.nextData.starty=this.data.starty=starty,this.nextData.stopy=this.data.stopy=stopy}updateVal(obj,key,val,fun){void 0===obj[key]?obj[key]=val:obj[key]=fun(val,obj[key])}insert(c4Shape){this.nextData.cnt=this.nextData.cnt+1;let _startx=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+c4Shape.margin:this.nextData.stopx+2*c4Shape.margin,_stopx=_startx+c4Shape.width,_starty=this.nextData.starty+2*c4Shape.margin,_stopy=_starty+c4Shape.height;(_startx>=this.data.widthLimit||_stopx>=this.data.widthLimit||this.nextData.cnt>c4ShapeInRow2)&&(_startx=this.nextData.startx+c4Shape.margin+conf.nextLinePaddingX,_starty=this.nextData.stopy+2*c4Shape.margin,this.nextData.stopx=_stopx=_startx+c4Shape.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=_stopy=_starty+c4Shape.height,this.nextData.cnt=1),c4Shape.x=_startx,c4Shape.y=_starty,this.updateVal(this.data,"startx",_startx,Math.min),this.updateVal(this.data,"starty",_starty,Math.min),this.updateVal(this.data,"stopx",_stopx,Math.max),this.updateVal(this.data,"stopy",_stopy,Math.max),this.updateVal(this.nextData,"startx",_startx,Math.min),this.updateVal(this.nextData,"starty",_starty,Math.min),this.updateVal(this.nextData,"stopx",_stopx,Math.max),this.updateVal(this.nextData,"stopy",_stopy,Math.max)}init(diagObj){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},setConf(diagObj.db.getConfig())}bumpLastMargin(margin){this.data.stopx+=margin,this.data.stopy+=margin}},"Bounds"),_a),setConf=__name(function(cnf){assignWithDepth_default(conf,cnf),cnf.fontFamily&&(conf.personFontFamily=conf.systemFontFamily=conf.messageFontFamily=cnf.fontFamily),cnf.fontSize&&(conf.personFontSize=conf.systemFontSize=conf.messageFontSize=cnf.fontSize),cnf.fontWeight&&(conf.personFontWeight=conf.systemFontWeight=conf.messageFontWeight=cnf.fontWeight)},"setConf"),c4ShapeFont=__name((cnf,typeC4Shape)=>({fontFamily:cnf[typeC4Shape+"FontFamily"],fontSize:cnf[typeC4Shape+"FontSize"],fontWeight:cnf[typeC4Shape+"FontWeight"]}),"c4ShapeFont"),boundaryFont=__name(cnf=>({fontFamily:cnf.boundaryFontFamily,fontSize:cnf.boundaryFontSize,fontWeight:cnf.boundaryFontWeight}),"boundaryFont"),messageFont=__name(cnf=>({fontFamily:cnf.messageFontFamily,fontSize:cnf.messageFontSize,fontWeight:cnf.messageFontWeight}),"messageFont");function calcC4ShapeTextWH(textType,c4Shape,c4ShapeTextWrap,textConf,textLimitWidth){if(!c4Shape[textType].width)if(c4ShapeTextWrap)c4Shape[textType].text=wrapLabel(c4Shape[textType].text,textLimitWidth,textConf),c4Shape[textType].textLines=c4Shape[textType].text.split(common_default.lineBreakRegex).length,c4Shape[textType].width=textLimitWidth,c4Shape[textType].height=calculateTextHeight(c4Shape[textType].text,textConf);else{let lines=c4Shape[textType].text.split(common_default.lineBreakRegex);c4Shape[textType].textLines=lines.length;let lineHeight=0;c4Shape[textType].height=0,c4Shape[textType].width=0;for(const line of lines)c4Shape[textType].width=Math.max(calculateTextWidth(line,textConf),c4Shape[textType].width),lineHeight=calculateTextHeight(line,textConf),c4Shape[textType].height=c4Shape[textType].height+lineHeight}}__name(calcC4ShapeTextWH,"calcC4ShapeTextWH");var drawBoundary2=__name(function(diagram2,boundary,bounds){boundary.x=bounds.data.startx,boundary.y=bounds.data.starty,boundary.width=bounds.data.stopx-bounds.data.startx,boundary.height=bounds.data.stopy-bounds.data.starty,boundary.label.y=conf.c4ShapeMargin-35;let boundaryTextWrap=boundary.wrap&&conf.wrap,boundaryLabelConf=boundaryFont(conf);boundaryLabelConf.fontSize=boundaryLabelConf.fontSize+2,boundaryLabelConf.fontWeight="bold",calcC4ShapeTextWH("label",boundary,boundaryTextWrap,boundaryLabelConf,calculateTextWidth(boundary.label.text,boundaryLabelConf)),svgDraw_default.drawBoundary(diagram2,boundary,conf)},"drawBoundary"),drawC4ShapeArray=__name(function(currentBounds,diagram2,c4ShapeArray2,c4ShapeKeys){let Y=0;for(const c4ShapeKey of c4ShapeKeys){Y=0;const c4Shape=c4ShapeArray2[c4ShapeKey];let c4ShapeTypeConf=c4ShapeFont(conf,c4Shape.typeC4Shape.text);switch(c4ShapeTypeConf.fontSize=c4ShapeTypeConf.fontSize-2,c4Shape.typeC4Shape.width=calculateTextWidth("«"+c4Shape.typeC4Shape.text+"»",c4ShapeTypeConf),c4Shape.typeC4Shape.height=c4ShapeTypeConf.fontSize+2,c4Shape.typeC4Shape.Y=conf.c4ShapePadding,Y=c4Shape.typeC4Shape.Y+c4Shape.typeC4Shape.height-4,c4Shape.image={width:0,height:0,Y:0},c4Shape.typeC4Shape.text){case"person":case"external_person":c4Shape.image.width=48,c4Shape.image.height=48,c4Shape.image.Y=Y,Y=c4Shape.image.Y+c4Shape.image.height}c4Shape.sprite&&(c4Shape.image.width=48,c4Shape.image.height=48,c4Shape.image.Y=Y,Y=c4Shape.image.Y+c4Shape.image.height);let c4ShapeTextWrap=c4Shape.wrap&&conf.wrap,textLimitWidth=conf.width-2*conf.c4ShapePadding,c4ShapeLabelConf=c4ShapeFont(conf,c4Shape.typeC4Shape.text);if(c4ShapeLabelConf.fontSize=c4ShapeLabelConf.fontSize+2,c4ShapeLabelConf.fontWeight="bold",calcC4ShapeTextWH("label",c4Shape,c4ShapeTextWrap,c4ShapeLabelConf,textLimitWidth),c4Shape.label.Y=Y+8,Y=c4Shape.label.Y+c4Shape.label.height,c4Shape.type&&""!==c4Shape.type.text){c4Shape.type.text="["+c4Shape.type.text+"]",calcC4ShapeTextWH("type",c4Shape,c4ShapeTextWrap,c4ShapeFont(conf,c4Shape.typeC4Shape.text),textLimitWidth),c4Shape.type.Y=Y+5,Y=c4Shape.type.Y+c4Shape.type.height}else if(c4Shape.techn&&""!==c4Shape.techn.text){c4Shape.techn.text="["+c4Shape.techn.text+"]",calcC4ShapeTextWH("techn",c4Shape,c4ShapeTextWrap,c4ShapeFont(conf,c4Shape.techn.text),textLimitWidth),c4Shape.techn.Y=Y+5,Y=c4Shape.techn.Y+c4Shape.techn.height}let rectHeight=Y,rectWidth=c4Shape.label.width;if(c4Shape.descr&&""!==c4Shape.descr.text){calcC4ShapeTextWH("descr",c4Shape,c4ShapeTextWrap,c4ShapeFont(conf,c4Shape.typeC4Shape.text),textLimitWidth),c4Shape.descr.Y=Y+20,Y=c4Shape.descr.Y+c4Shape.descr.height,rectWidth=Math.max(c4Shape.label.width,c4Shape.descr.width),rectHeight=Y-5*c4Shape.descr.textLines}rectWidth+=conf.c4ShapePadding,c4Shape.width=Math.max(c4Shape.width||conf.width,rectWidth,conf.width),c4Shape.height=Math.max(c4Shape.height||conf.height,rectHeight,conf.height),c4Shape.margin=c4Shape.margin||conf.c4ShapeMargin,currentBounds.insert(c4Shape),svgDraw_default.drawC4Shape(diagram2,c4Shape,conf)}currentBounds.bumpLastMargin(conf.c4ShapeMargin)},"drawC4ShapeArray"),Point=(__name(_b=class{constructor(x,y){this.x=x,this.y=y}},"Point"),_b),getIntersectPoint=__name(function(fromNode,endPoint){let x1=fromNode.x,y1=fromNode.y,x2=endPoint.x,y2=endPoint.y,fromCenterX=x1+fromNode.width/2,fromCenterY=y1+fromNode.height/2,dx=Math.abs(x1-x2),dy=Math.abs(y1-y2),tanDYX=dy/dx,fromDYX=fromNode.height/fromNode.width,returnPoint=null;return y1==y2&&x1<x2?returnPoint=new Point(x1+fromNode.width,fromCenterY):y1==y2&&x1>x2?returnPoint=new Point(x1,fromCenterY):x1==x2&&y1<y2?returnPoint=new Point(fromCenterX,y1+fromNode.height):x1==x2&&y1>y2&&(returnPoint=new Point(fromCenterX,y1)),x1>x2&&y1<y2?returnPoint=fromDYX>=tanDYX?new Point(x1,fromCenterY+tanDYX*fromNode.width/2):new Point(fromCenterX-dx/dy*fromNode.height/2,y1+fromNode.height):x1<x2&&y1<y2?returnPoint=fromDYX>=tanDYX?new Point(x1+fromNode.width,fromCenterY+tanDYX*fromNode.width/2):new Point(fromCenterX+dx/dy*fromNode.height/2,y1+fromNode.height):x1<x2&&y1>y2?returnPoint=fromDYX>=tanDYX?new Point(x1+fromNode.width,fromCenterY-tanDYX*fromNode.width/2):new Point(fromCenterX+fromNode.height/2*dx/dy,y1):x1>x2&&y1>y2&&(returnPoint=fromDYX>=tanDYX?new Point(x1,fromCenterY-fromNode.width/2*tanDYX):new Point(fromCenterX-fromNode.height/2*dx/dy,y1)),returnPoint},"getIntersectPoint"),getIntersectPoints=__name(function(fromNode,endNode){let endIntersectPoint={x:0,y:0};endIntersectPoint.x=endNode.x+endNode.width/2,endIntersectPoint.y=endNode.y+endNode.height/2;let startPoint=getIntersectPoint(fromNode,endIntersectPoint);return endIntersectPoint.x=fromNode.x+fromNode.width/2,endIntersectPoint.y=fromNode.y+fromNode.height/2,{startPoint:startPoint,endPoint:getIntersectPoint(endNode,endIntersectPoint)}},"getIntersectPoints"),drawRels2=__name(function(diagram2,rels2,getC4ShapeObj,diagObj,diagramId){let i=0;for(let rel of rels2){i+=1;let relTextWrap=rel.wrap&&conf.wrap,relConf=messageFont(conf);"C4Dynamic"===diagObj.db.getC4Type()&&(rel.label.text=i+": "+rel.label.text);let textLimitWidth=calculateTextWidth(rel.label.text,relConf);calcC4ShapeTextWH("label",rel,relTextWrap,relConf,textLimitWidth),rel.techn&&""!==rel.techn.text&&(textLimitWidth=calculateTextWidth(rel.techn.text,relConf),calcC4ShapeTextWH("techn",rel,relTextWrap,relConf,textLimitWidth)),rel.descr&&""!==rel.descr.text&&(textLimitWidth=calculateTextWidth(rel.descr.text,relConf),calcC4ShapeTextWH("descr",rel,relTextWrap,relConf,textLimitWidth));let fromNode=getC4ShapeObj(rel.from),endNode=getC4ShapeObj(rel.to),points=getIntersectPoints(fromNode,endNode);rel.startPoint=points.startPoint,rel.endPoint=points.endPoint}svgDraw_default.drawRels(diagram2,rels2,conf,diagramId)},"drawRels");function drawInsideBoundary(diagram2,parentBoundaryAlias,parentBounds,currentBoundaries,diagObj){let currentBounds=new Bounds(diagObj);currentBounds.data.widthLimit=parentBounds.data.widthLimit/Math.min(c4BoundaryInRow2,currentBoundaries.length);for(let[i,currentBoundary]of currentBoundaries.entries()){let Y=0;currentBoundary.image={width:0,height:0,Y:0},currentBoundary.sprite&&(currentBoundary.image.width=48,currentBoundary.image.height=48,currentBoundary.image.Y=Y,Y=currentBoundary.image.Y+currentBoundary.image.height);let currentBoundaryTextWrap=currentBoundary.wrap&&conf.wrap,currentBoundaryLabelConf=boundaryFont(conf);if(currentBoundaryLabelConf.fontSize=currentBoundaryLabelConf.fontSize+2,currentBoundaryLabelConf.fontWeight="bold",calcC4ShapeTextWH("label",currentBoundary,currentBoundaryTextWrap,currentBoundaryLabelConf,currentBounds.data.widthLimit),currentBoundary.label.Y=Y+8,Y=currentBoundary.label.Y+currentBoundary.label.height,currentBoundary.type&&""!==currentBoundary.type.text){currentBoundary.type.text="["+currentBoundary.type.text+"]",calcC4ShapeTextWH("type",currentBoundary,currentBoundaryTextWrap,boundaryFont(conf),currentBounds.data.widthLimit),currentBoundary.type.Y=Y+5,Y=currentBoundary.type.Y+currentBoundary.type.height}if(currentBoundary.descr&&""!==currentBoundary.descr.text){let currentBoundaryDescrConf=boundaryFont(conf);currentBoundaryDescrConf.fontSize=currentBoundaryDescrConf.fontSize-2,calcC4ShapeTextWH("descr",currentBoundary,currentBoundaryTextWrap,currentBoundaryDescrConf,currentBounds.data.widthLimit),currentBoundary.descr.Y=Y+20,Y=currentBoundary.descr.Y+currentBoundary.descr.height}if(0==i||i%c4BoundaryInRow2===0){let _x=parentBounds.data.startx+conf.diagramMarginX,_y=parentBounds.data.stopy+conf.diagramMarginY+Y;currentBounds.setData(_x,_x,_y,_y)}else{let _x=currentBounds.data.stopx!==currentBounds.data.startx?currentBounds.data.stopx+conf.diagramMarginX:currentBounds.data.startx,_y=currentBounds.data.starty;currentBounds.setData(_x,_x,_y,_y)}currentBounds.name=currentBoundary.alias;let currentPersonOrSystemArray=diagObj.db.getC4ShapeArray(currentBoundary.alias),currentPersonOrSystemKeys=diagObj.db.getC4ShapeKeys(currentBoundary.alias);currentPersonOrSystemKeys.length>0&&drawC4ShapeArray(currentBounds,diagram2,currentPersonOrSystemArray,currentPersonOrSystemKeys),parentBoundaryAlias=currentBoundary.alias;let nextCurrentBoundaries=diagObj.db.getBoundaries(parentBoundaryAlias);nextCurrentBoundaries.length>0&&drawInsideBoundary(diagram2,parentBoundaryAlias,currentBounds,nextCurrentBoundaries,diagObj),"global"!==currentBoundary.alias&&drawBoundary2(diagram2,currentBoundary,currentBounds),parentBounds.data.stopy=Math.max(currentBounds.data.stopy+conf.c4ShapeMargin,parentBounds.data.stopy),parentBounds.data.stopx=Math.max(currentBounds.data.stopx+conf.c4ShapeMargin,parentBounds.data.stopx),globalBoundaryMaxX=Math.max(globalBoundaryMaxX,parentBounds.data.stopx),globalBoundaryMaxY=Math.max(globalBoundaryMaxY,parentBounds.data.stopy)}}__name(drawInsideBoundary,"drawInsideBoundary");var c4Renderer_default={drawPersonOrSystemArray:drawC4ShapeArray,drawBoundary:drawBoundary2,setConf:setConf,draw:__name(function(_text,id,_version,diagObj){conf=getConfig2().c4;const securityLevel=getConfig2().securityLevel;let sandboxElement;"sandbox"===securityLevel&&(sandboxElement=select("#i"+id));const root=select("sandbox"===securityLevel?sandboxElement.nodes()[0].contentDocument.body:"body");let db=diagObj.db;diagObj.db.setWrap(conf.wrap),c4ShapeInRow2=db.getC4ShapeInRow(),c4BoundaryInRow2=db.getC4BoundaryInRow(),log.debug(`C:${JSON.stringify(conf,null,2)}`);const diagram2="sandbox"===securityLevel?root.select(`[id="${id}"]`):select(`[id="${id}"]`);svgDraw_default.insertComputerIcon(diagram2,id),svgDraw_default.insertDatabaseIcon(diagram2,id),svgDraw_default.insertClockIcon(diagram2,id);let screenBounds=new Bounds(diagObj);screenBounds.setData(conf.diagramMarginX,conf.diagramMarginX,conf.diagramMarginY,conf.diagramMarginY),screenBounds.data.widthLimit=screen.availWidth,globalBoundaryMaxX=conf.diagramMarginX,globalBoundaryMaxY=conf.diagramMarginY;const title2=diagObj.db.getTitle();drawInsideBoundary(diagram2,"",screenBounds,diagObj.db.getBoundaries(""),diagObj),svgDraw_default.insertArrowHead(diagram2,id),svgDraw_default.insertArrowEnd(diagram2,id),svgDraw_default.insertArrowCrossHead(diagram2,id),svgDraw_default.insertArrowFilledHead(diagram2,id),drawRels2(diagram2,diagObj.db.getRels(),diagObj.db.getC4Shape,diagObj,id),screenBounds.data.stopx=globalBoundaryMaxX,screenBounds.data.stopy=globalBoundaryMaxY;const box=screenBounds.data;let height=box.stopy-box.starty+2*conf.diagramMarginY;const width=box.stopx-box.startx+2*conf.diagramMarginX;title2&&diagram2.append("text").text(title2).attr("x",(box.stopx-box.startx)/2-4*conf.diagramMarginX).attr("y",box.starty+conf.diagramMarginY),configureSvgSize(diagram2,height,width,conf.useMaxWidth);const extraVertForTitle=title2?60:0;diagram2.attr("viewBox",box.startx-conf.diagramMarginX+" -"+(conf.diagramMarginY+extraVertForTitle)+" "+width+" "+(height+extraVertForTitle)),log.debug("models:",box)},"draw")},diagram={parser:c4Diagram_default,db:c4Db_default,renderer:c4Renderer_default,styles:__name(options=>`.person {\n stroke: ${options.personBorder};\n fill: ${options.personBkg};\n }\n`,"getStyles"),init:__name(({c4:c4,wrap:wrap})=>{c4Renderer_default.setConf(c4),c4Db_default.setWrap(wrap)},"init")};export{diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ap as Utils,aq as Color}from"./mermaid.core-
|
|
1
|
+
import{ap as Utils,aq as Color}from"./mermaid.core-DaRhWNVu.js";const channel=(color,channel2)=>Utils.lang.round(Color.parse(color)[channel2]);export{channel as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as __name}from"./mermaid.core-DaRhWNVu.js";function populateCommonDb(ast,db){var _a,_b,_c;ast.accDescr&&(null==(_a=db.setAccDescription)||_a.call(db,ast.accDescr)),ast.accTitle&&(null==(_b=db.setAccTitle)||_b.call(db,ast.accTitle)),ast.title&&(null==(_c=db.setDiagramTitle)||_c.call(db,ast.title))}__name(populateCommonDb,"populateCommonDb");export{populateCommonDb as p};
|