cmcts-c-agent-embedding 1.0.65-vib → 1.0.66-vib
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/README.md +349 -349
- package/dist/_basePickBy-1057a1b4.js +1 -0
- package/dist/_basePickBy-cbf78fb3.js +1 -0
- package/dist/_baseUniq-38ea2195.js +1 -0
- package/dist/_baseUniq-52a47b7b.js +1 -0
- package/dist/arc-6b847bc0.js +1 -0
- package/dist/arc-8928af28.js +1 -0
- package/dist/architecture-O4VJ6CD3-42323263.js +1 -0
- package/dist/architecture-O4VJ6CD3-b506967f.js +1 -0
- package/dist/architectureDiagram-VXUJARFQ-1bd867b6.js +1 -0
- package/dist/architectureDiagram-VXUJARFQ-2b851c59.js +1 -0
- package/dist/blockDiagram-VD42YOAC-5cea96b0.js +1 -0
- package/dist/blockDiagram-VD42YOAC-a909b757.js +1 -0
- package/dist/c4Diagram-YG6GDRKO-24d24519.js +1 -0
- package/dist/c4Diagram-YG6GDRKO-54783ab3.js +1 -0
- package/dist/channel-2af69aa2.js +1 -0
- package/dist/channel-f240e622.js +1 -0
- package/dist/chunk-4BX2VUAB-7747ae72.js +1 -0
- package/dist/chunk-4BX2VUAB-d05d937e.js +1 -0
- package/dist/chunk-55IACEB6-5a7b1be3.js +1 -0
- package/dist/chunk-55IACEB6-78729976.js +1 -0
- package/dist/chunk-B4BG7PRW-a97e69ff.js +1 -0
- package/dist/chunk-B4BG7PRW-cbf800c4.js +1 -0
- package/dist/chunk-DI55MBZ5-5dc4f926.js +1 -0
- package/dist/chunk-DI55MBZ5-95d71f6f.js +1 -0
- package/dist/chunk-FMBD7UC4-2c653fda.js +1 -0
- package/dist/chunk-FMBD7UC4-d75ed695.js +1 -0
- package/dist/chunk-QN33PNHL-0bf10733.js +1 -0
- package/dist/chunk-QN33PNHL-b00655c9.js +1 -0
- package/dist/chunk-QZHKN3VN-a979a9fe.js +1 -0
- package/dist/chunk-QZHKN3VN-d57979be.js +1 -0
- package/dist/chunk-TZMSLE5B-6755c559.js +1 -0
- package/dist/chunk-TZMSLE5B-ed6d6d7e.js +1 -0
- package/dist/classDiagram-2ON5EDUG-8b5a2a93.js +1 -0
- package/dist/classDiagram-2ON5EDUG-fa9ecfbb.js +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-8b5a2a93.js +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-fa9ecfbb.js +1 -0
- package/dist/clone-6cd174cf.js +1 -0
- package/dist/clone-8494eb3f.js +1 -0
- package/dist/components/buttons/ConsultationButton.d.ts +1 -0
- package/dist/components/buttons/ConsultationButton.d.ts.map +1 -1
- package/dist/components/buttons/PopupToast.d.ts +1 -1
- package/dist/components/buttons/PopupToast.d.ts.map +1 -1
- package/dist/components/modals/ZaloQRModal.d.ts.map +1 -1
- package/dist/cose-bilkent-S5V4N54A-2f5eb275.js +1 -0
- package/dist/cose-bilkent-S5V4N54A-3cda82b5.js +1 -0
- package/dist/cytoscape.esm-9acb9bfe.js +1 -0
- package/dist/dagre-6UL2VRFP-9b648c54.js +1 -0
- package/dist/dagre-6UL2VRFP-e997588d.js +1 -0
- package/dist/defaultLocale-1fe70b7d.js +1 -0
- package/dist/diagram-PSM6KHXK-1234d08d.js +1 -0
- package/dist/diagram-PSM6KHXK-15013de5.js +1 -0
- package/dist/diagram-QEK2KX5R-489b9505.js +1 -0
- package/dist/diagram-QEK2KX5R-9e94df2a.js +1 -0
- package/dist/diagram-S2PKOQOG-6fef3823.js +1 -0
- package/dist/diagram-S2PKOQOG-c943ed25.js +1 -0
- package/dist/erDiagram-Q2GNP2WA-2b1823f2.js +1 -0
- package/dist/erDiagram-Q2GNP2WA-7e6c6a04.js +1 -0
- package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -1
- package/dist/flowDiagram-NV44I4VS-709c6479.js +1 -0
- package/dist/flowDiagram-NV44I4VS-98a84da9.js +1 -0
- package/dist/ganttDiagram-LVOFAZNH-1d379d6a.js +1 -0
- package/dist/ganttDiagram-LVOFAZNH-d8342586.js +1 -0
- package/dist/gitGraph-ZV4HHKMB-788776f3.js +1 -0
- package/dist/gitGraph-ZV4HHKMB-ba420dcc.js +1 -0
- package/dist/gitGraphDiagram-NY62KEGX-804d1363.js +1 -0
- package/dist/gitGraphDiagram-NY62KEGX-919097ea.js +1 -0
- package/dist/graph-834f6046.js +1 -0
- package/dist/graph-db4953aa.js +1 -0
- package/dist/info-63CPKGFF-2dccc483.js +1 -0
- package/dist/info-63CPKGFF-ef40f1c4.js +1 -0
- package/dist/infoDiagram-F6ZHWCRC-579d50b4.js +1 -0
- package/dist/infoDiagram-F6ZHWCRC-c9877bad.js +1 -0
- package/dist/init-cf76ae07.js +1 -0
- package/dist/journeyDiagram-XKPGCS4Q-25d3c922.js +1 -0
- package/dist/journeyDiagram-XKPGCS4Q-2d2cda1c.js +1 -0
- package/dist/kanban-definition-3W4ZIXB7-c556bee0.js +1 -0
- package/dist/kanban-definition-3W4ZIXB7-cdb93ec0.js +1 -0
- package/dist/katex-0a18b0df.js +1 -0
- package/dist/layout-40652dba.js +1 -0
- package/dist/layout-54ffc604.js +1 -0
- package/dist/linear-2f639b72.js +1 -0
- package/dist/linear-ed2367ff.js +1 -0
- package/dist/mermaid-parser.core-0cfa7d2a.js +1 -0
- package/dist/mermaid-parser.core-10bed742.js +1 -0
- package/dist/mindmap-definition-VGOIOE7T-169f5fe5.js +1 -0
- package/dist/mindmap-definition-VGOIOE7T-dea1c792.js +1 -0
- package/dist/ordinal-221e41d7.js +1 -0
- package/dist/packet-HUATNLJX-6f2471ea.js +1 -0
- package/dist/packet-HUATNLJX-c69e28eb.js +1 -0
- package/dist/pie-WTHONI2E-4143e44b.js +1 -0
- package/dist/pie-WTHONI2E-82b1fe3f.js +1 -0
- package/dist/pieDiagram-ADFJNKIX-499eec78.js +1 -0
- package/dist/pieDiagram-ADFJNKIX-657effd5.js +1 -0
- package/dist/quadrantDiagram-AYHSOK5B-138a0c93.js +1 -0
- package/dist/quadrantDiagram-AYHSOK5B-91137c4d.js +1 -0
- package/dist/radar-NJJJXTRR-5e934a95.js +1 -0
- package/dist/radar-NJJJXTRR-94d77527.js +1 -0
- package/dist/requirementDiagram-UZGBJVZJ-a5d9fb39.js +1 -0
- package/dist/requirementDiagram-UZGBJVZJ-d7aeec99.js +1 -0
- package/dist/sankeyDiagram-TZEHDZUN-15053ae0.js +1 -0
- package/dist/sankeyDiagram-TZEHDZUN-aadd2125.js +1 -0
- package/dist/sequenceDiagram-WL72ISMW-12e778ef.js +1 -0
- package/dist/sequenceDiagram-WL72ISMW-9330a98a.js +1 -0
- package/dist/stateDiagram-FKZM4ZOC-01225f0f.js +1 -0
- package/dist/stateDiagram-FKZM4ZOC-af4836d7.js +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-4774cc10.js +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-5ef8e019.js +1 -0
- package/dist/timeline-definition-IT6M3QCI-9921f937.js +1 -0
- package/dist/timeline-definition-IT6M3QCI-a7a9bbec.js +1 -0
- package/dist/treemap-75Q7IDZK-100ddeb7.js +1 -0
- package/dist/treemap-75Q7IDZK-851117b4.js +1 -0
- package/dist/utils/redisAndQueue.d.ts +32 -0
- package/dist/utils/redisAndQueue.d.ts.map +1 -0
- package/dist/utils/transcriptApi.d.ts.map +1 -1
- package/dist/web-0016ac81.js +1 -0
- package/dist/web-4e6d8ea9.js +1 -0
- package/dist/web.js +1 -1
- package/dist/xychartDiagram-PRI3JC2R-003630a4.js +1 -0
- package/dist/xychartDiagram-PRI3JC2R-df869780.js +1 -0
- package/package.json +2 -2
- package/server.js +401 -401
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t}from"./chunk-FMBD7UC4-d75ed695.js";import{_ as e,d as r,l as a,j as i,i as s,ai as n,E as l,aj as o,ak as c,al as d,u as h,am as g,R as y,N as p,k as u,t as x,A as b,S as f,an as m,ao as w,e as k}from"./web-4e6d8ea9.js";import{c as L}from"./clone-6cd174cf.js";import{G as S}from"./graph-834f6046.js";import{c as _}from"./channel-f240e622.js";import"./_baseUniq-52a47b7b.js";var v=function(){var t=e((function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r}),"o"),r=[1,15],a=[1,7],i=[1,13],s=[1,14],n=[1,19],l=[1,16],o=[1,17],c=[1,18],d=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],y=[1,24],p=[8,10,15,16,21,28,29,30,31,39,43,46],u=[8,10,15,16,21,27,28,29,30,31,39,43,46],x=[1,49];d={trace:e((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:e((function(t,e,r,a,i,s,n){var l=s.length-1;switch(i){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",s[l-1]),a.setHierarchy(s[l-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",s[l]),"number"==typeof s[l].length?this.$=s[l]:this.$=[s[l]];break;case 13:a.getLogger().debug("Rule: statement #2: ",s[l-1]),this.$=[s[l-1]].concat(s[l]);break;case 14:a.getLogger().debug("Rule: link: ",s[l],t),this.$={edgeTypeStr:s[l],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",s[l-3],s[l-1],s[l]),this.$={edgeTypeStr:s[l],label:s[l-1]};break;case 18:var o=parseInt(s[l]),c=a.generateId();this.$={id:c,type:"space",label:"",width:o,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",s[l-2],s[l-1],s[l]," typestr: ",s[l-1].edgeTypeStr),c=a.edgeStrToEdgeData(s[l-1].edgeTypeStr),this.$=[{id:s[l-2].id,label:s[l-2].label,type:s[l-2].type,directions:s[l-2].directions},{id:s[l-2].id+"-"+s[l].id,start:s[l-2].id,end:s[l].id,label:s[l-1].label,type:"edge",directions:s[l].directions,arrowTypeEnd:c,arrowTypeStart:"arrow_open"},{id:s[l].id,label:s[l].label,type:a.typeStr2Type(s[l].typeStr),directions:s[l].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[l-1],s[l]),this.$={id:s[l-1].id,label:s[l-1].label,type:a.typeStr2Type(s[l-1].typeStr),directions:s[l-1].directions,widthInColumns:parseInt(s[l],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",s[l]),this.$={id:s[l].id,label:s[l].label,type:a.typeStr2Type(s[l].typeStr),directions:s[l].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this||"na"),a.getLogger().debug("COLUMNS: ",s[l]),this.$={type:"column-setting",columns:"auto"===s[l]?-1:parseInt(s[l])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",s[l-2],s[l-1]),a.generateId(),this.$={...s[l-2],type:"composite",children:s[l-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",s[l-2],s[l-1],s[l]),o=a.generateId(),this.$={id:o,type:"composite",label:"",children:s[l-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",s[l]),this.$={id:s[l]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[l-1],s[l]),this.$={id:s[l-1],label:s[l].label,typeStr:s[l].typeStr,directions:s[l].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",s[l]),this.$=[s[l]];break;case 32:a.getLogger().debug("Rule: dirList: ",s[l-1],s[l]),this.$=[s[l-1]].concat(s[l]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",s[l-2],s[l-1],s[l]),this.$={typeStr:s[l-2]+s[l],label:s[l-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[l-3],s[l-2]," #3:",s[l-1],s[l]),this.$={typeStr:s[l-3]+s[l],label:s[l-2],directions:s[l-1]};break;case 35:case 36:this.$={type:"classDef",id:s[l-1].trim(),css:s[l].trim()};break;case 37:this.$={type:"applyClass",id:s[l-1].trim(),styleClass:s[l].trim()};break;case 38:this.$={type:"applyStyles",id:s[l-1].trim(),stylesStr:s[l].trim()}}}),"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:r,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:s,31:n,39:l,43:o,46:c},{8:[1,20]},t(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:r,21:a,28:i,29:s,31:n,39:l,43:o,46:c}),t(h,[2,16],{14:22,15:g,16:y}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(p,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:n},{10:r,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:s,31:n,39:l,43:o,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(u,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,31:n},{31:[2,14]},{17:[1,36]},t(p,[2,24]),{10:r,11:37,13:4,14:22,15:g,16:y,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:s,31:n,39:l,43:o,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(u,[2,30]),{18:[1,43]},{18:[1,44]},t(p,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:x},{15:[1,50]},t(h,[2,27]),t(u,[2,33]),{38:[1,51]},{33:52,34:x,38:[2,31]},{31:[2,15]},t(u,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e((function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)}),"parseError"),parse:e((function(t){var r,a=this,i=[0],s=[],n=[null],l=[],o=this.table,c="",d=0,h=0,g=l.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(r in this.yy)Object.prototype.hasOwnProperty.call(this.yy,r)&&(p.yy[r]=this.yy[r]);y.setInput(t,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var u=y.yylloc,x=(l.push(u),y.options&&y.options.ranges);function b(){var t=s.pop()||y.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(s=t).pop()),t=a.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,e((function(t){i.length=i.length-2*t,n.length=n.length-t,l.length=l.length-t}),"popStack"),e(b,"lex");for(var f,m,w,k,L,S,_={};;){if(m=i[i.length-1],void 0===(w=this.defaultActions[m]||(null==f&&(f=b()),o[m]&&o[m][f]))||!w.length||!w[0]){var v,E=[];for(k in o[m])this.terminals_[k]&&2<k&&E.push("'"+this.terminals_[k]+"'");v=y.showPosition?"Parse error on line "+(d+1)+":\n"+y.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(d+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(v,{text:y.match,token:this.terminals_[f]||f,line:y.yylineno,loc:u,expected:E})}if(w[0]instanceof Array&&1<w.length)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(w[0]){case 1:i.push(f),n.push(y.yytext),l.push(y.yylloc),i.push(w[1]),f=null,h=y.yyleng,c=y.yytext,d=y.yylineno,u=y.yylloc;break;case 2:if(L=this.productions_[w[1]][1],_.$=n[n.length-L],_._$={first_line:l[l.length-(L||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(L||1)].first_column,last_column:l[l.length-1].last_column},x&&(_._$.range=[l[l.length-(L||1)].range[0],l[l.length-1].range[1]]),void 0!==(S=this.performAction.apply(_,[c,h,d,p.yy,w[1],n,l].concat(g))))return S;L&&(i=i.slice(0,-1*L*2),n=n.slice(0,-1*L),l=l.slice(0,-1*L)),i.push(this.productions_[w[1]][0]),n.push(_.$),l.push(_._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0}),"parse")},r={EOF:1,parseError:e((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:e((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:e((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:e((function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),a=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:e((function(){return this._more=!0,this}),"more"),reject:e((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:e((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:e((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:e((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:e((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:e((function(t,e){var r,a;if(this.options.backtrack_lexer&&(a={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)&&(a.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in a)this[i]=a[i];return!1}),"test_match"),next:e((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,r,a,i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length))if(e=r,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,i[a]))&&t:""===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:e((function(){return this.next()||this.lex()}),"lex"),begin:e((function(t){this.conditionStack.push(t)}),"begin"),popState:e((function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:e((function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:e((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:e((function(t){this.begin(t)}),"pushState"),stateStackSize:e((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:e((function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.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:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.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(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.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 t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.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 b(){this.yy={}}return d.lexer=r,e(b,"Parser"),new((b.prototype=d).Parser=b)}(),E=v.parser=v,D=new Map,T=[],C=new Map,N="color",$="fill",I=r(),B=new Map,z=e((t=>k.sanitizeText(t,I)),"sanitizeText"),R=e((function(t,e=""){let r=B.get(t);r||(r={id:t,styles:[],textStyles:[]},B.set(t,r)),null!=e&&e.split(",").forEach((t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp(N).exec(t)&&(t=e.replace($,"bgFill").replace(N,$),r.textStyles.push(t)),r.styles.push(e)}))}),"addStyleClass"),O=e((function(t,e=""){t=D.get(t),null!=e&&(t.styles=e.split(","))}),"addStyle2Node"),A=e((function(t,e){t.split(",").forEach((function(t){let r=D.get(t);void 0===r&&(r={id:t=t.trim(),type:"na",children:[]},D.set(t,r)),r.classes||(r.classes=[]),r.classes.push(e)}))}),"setCssClass"),M=e(((t,e)=>{t=t.flat();var r=[],i=t.find((t=>"column-setting"===t?.type))?.columns??-1;for(const o of t)if("number"==typeof i&&0<i&&"column-setting"!==o.type&&"number"==typeof o.widthInColumns&&o.widthInColumns>i&&a.warn(`Block ${o.id} width ${o.widthInColumns} exceeds configured column width `+i),o.label&&(o.label=z(o.label)),"classDef"===o.type)R(o.id,o.css);else if("applyClass"===o.type)A(o.id,o?.styleClass??"");else if("applyStyles"===o.type)o?.stylesStr&&O(o.id,o?.stylesStr);else if("column-setting"===o.type)e.columns=o.columns??-1;else if("edge"===o.type){var s=(C.get(o.id)??0)+1;C.set(o.id,s),o.id=s+"-"+o.id,T.push(o)}else if(o.label||("composite"===o.type?o.label="":o.label=o.id),void 0===(s=D.get(o.id))?D.set(o.id,o):("na"!==o.type&&(s.type=o.type),o.label!==o.id&&(s.label=o.label)),o.children&&M(o.children,o),"space"===o.type){var n=o.width??1;for(let t=0;t<n;t++){var l=L(o);l.id=l.id+"-"+t,D.set(l.id,l),r.push(l)}}else void 0===s&&r.push(o);e.children=r}),"populateBlockDatabase"),P=[],Y={id:"root",type:"composite",children:[],columns:-1},W=e((()=>{a.debug("Clear called"),x(),Y={id:"root",type:"composite",children:[],columns:-1},D=new Map([["root",Y]]),P=[],B=new Map,T=[],C=new Map}),"clear");function X(t){switch(a.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return a.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 F(t){return a.debug("typeStr2Type",t),"=="!==t?"normal":"thick"}function j(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}e(X,"typeStr2Type"),e(F,"edgeTypeStr2Type"),e(j,"edgeStrToEdgeData");var H=0,U=e((()=>(H++,"id-"+Math.random().toString(36).substr(2,12)+"-"+H)),"generateId"),K=e((t=>{Y.children=t,M(t,Y),P=Y.children}),"setHierarchy"),q=e((t=>(t=D.get(t))?t.columns||(t.children?t.children.length:-1):-1),"getColumns"),Z=e((()=>[...D.values()]),"getBlocksFlat"),G=e((()=>P||[]),"getBlocks"),J=e((()=>T),"getEdges"),V=e((t=>D.get(t)),"getBlock"),Q=e((t=>{D.set(t.id,t)}),"setBlock"),tt=e((()=>a),"getLogger"),et=e((function(){return B}),"getClasses"),rt={getConfig:e((()=>l().block),"getConfig"),typeStr2Type:X,edgeTypeStr2Type:F,edgeStrToEdgeData:j,getLogger:tt,getBlocksFlat:Z,getBlocks:G,getEdges:J,setHierarchy:K,getBlock:V,setBlock:Q,getColumns:q,getClasses:et,clear:W,generateId:U},at=e(((t,e)=>{var r=(i=_)(t,"r"),a=i(t,"g"),i=i(t,"b");return b(r,a,i,e)}),"fade"),it=e((e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.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: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${at(e.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${at(e.mainBkg,.5)};\n fill: ${at(e.clusterBkg,.5)};\n stroke: ${at(e.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: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.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: ${e.textColor};\n }\n ${t()}\n`),"getStyles"),st=e(((t,e,r,a)=>{e.forEach((e=>{nt[e](t,r,a)}))}),"insertMarkers"),nt={extension:e(((t,e,r)=>{a.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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:e(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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:e(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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:e(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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:e(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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:e(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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:e(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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:e(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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:e(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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")},lt=st,ot=r()?.block?.padding??8;function ct(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}e(ct,"calculateBlockPosition");var dt=e((t=>{let e=0,r=0;for(const o of t.children){var{width:i,height:s,x:n,y:l}=o.size??{width:0,height:0,x:0,y:0};a.debug("getMaxChildSize abc95 child:",o.id,"width:",i,"height:",s,"x:",n,"y:",l,o.type),"space"!==o.type&&(i>e&&(e=i/(t.widthInColumns??1)),s>r)&&(r=s)}return{width:e,height:r}}),"getMaxChildSize");function ht(t,e,r=0,i=0){if(a.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:i,x:0,y:0}),0<t.children?.length){for(const r of t.children)ht(r,e);var s=dt(t),n=s.width,l=s.height;a.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",n,l);for(const e of t.children)e.size&&(a.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${n} ${l} `+JSON.stringify(e.size)),e.size.width=n*(e.widthInColumns??1)+ot*((e.widthInColumns??1)-1),e.size.height=l,e.size.x=0,e.size.y=0,a.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${n} maxHeight:`+l));for(const r of t.children)ht(r,e,n,l);s=t.columns??-1;let g=0;for(const e of t.children)g+=e.widthInColumns??1;let y=t.children.length;0<s&&s<g&&(y=s);var o=Math.ceil(g/y);let p=y*(n+ot)+ot,u=o*(l+ot)+ot;if(p<r){a.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${i} width `+p),p=r,u=i;var c=(r-y*ot-ot)/y,d=(i-o*ot-ot)/o;a.debug("Size indata abc88",t.id,"childWidth",c,"maxWidth",n),a.debug("Size indata abc88",t.id,"childHeight",d,"maxHeight",l),a.debug("Size indata abc88 xSize",y,"padding",ot);for(const e of t.children)e.size&&(e.size.width=c,e.size.height=d,e.size.x=0,e.size.y=0)}if(a.debug(`abc95 (finale calc) ${t.id} xSize ${y} ySize ${o} columns ${s}${t.children.length} width=`+Math.max(p,t.size?.width||0)),p<(t?.size?.width||0)&&(p=t?.size?.width||0,0<(r=0<s?Math.min(t.children.length,s):t.children.length))){var h=(p-r*ot-ot)/r;a.debug("abc95 (growing to fit) width",t.id,p,t.size?.width,h);for(const e of t.children)e.size&&(e.size.width=h)}t.size={width:p,height:u,x:0,y:0}}a.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function gt(t,e){a.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: `+t?.size?.width);var r=t.columns??-1;if(a.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&0<t.children.length){var i=t?.children[0]?.size?.width??0;i=t.children.length*i+(t.children.length-1)*ot;a.debug("widthOfChildren 88",i,"posX");let e=0,d=(a.debug("abc91 block?.size?.x",t.id,t?.size?.x),t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-ot),h=0;for(const i of t.children){var s=t;if(i.size){var{width:n,height:l}=i.size,{px:o,py:c}=ct(r,e);c!=h&&(h=c,d=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-ot,a.debug("New row in layout for block",t.id," and child ",i.id,h)),a.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${e} (px, py) ${o},${c} (${s?.size?.x},${s?.size?.y}) parent: ${s.id} width: `+n+ot),s.size&&(o=n/2,i.size.x=d+ot+o,a.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${d} new startingPosX${i.size.x} ${o} padding=${ot} width=${n} halfWidth=${o} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 `+n*(i?.widthInColumns??1)/2),d=i.size.x+o,i.size.y=s.size.y-s.size.height/2+c*(l+ot)+l/2+ot,a.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${d}${ot}${o}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2`+n*(i?.widthInColumns??1)/2)),i.children&>(i);let g=i?.widthInColumns??1;0<r&&(g=Math.min(g,r-e%r)),e+=g,a.debug("abc88 columnsPos",i,e)}}}a.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: `+t?.size?.width)}function yt(t,{minX:e,minY:r,maxX:a,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){var s,n,l,o;if(t.size&&"root"!==t.id&&(({x:s,y:n,width:l,height:o}=t.size),s-l/2<e&&(e=s-l/2),n-o/2<r&&(r=n-o/2),a<s+l/2&&(a=s+l/2),i<n+o/2)&&(i=n+o/2),t.children)for(const s of t.children)({minX:e,minY:r,maxX:a,maxY:i}=yt(s,{minX:e,minY:r,maxX:a,maxY:i}));return{minX:e,minY:r,maxX:a,maxY:i}}function pt(t){var e,r,i=t.getBlock("root");if(i)return ht(i,t,0,0),gt(i),a.debug("getBlocks",JSON.stringify(i,null,2)),({minX:t,minY:i,maxX:e,maxY:r}=yt(i)),{x:t,y:i,width:e-t,height:r-i}}function ut(t,e){e&&t.attr("style",e)}function xt(t,e){var r=i(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=r.append("xhtml:div"),n=t.label,l=t.isNode?"nodeLabel":"edgeLabel",o=a.append("span");return o.html(s(n,e)),ut(o,t.labelStyle),o.attr("class",l),ut(a,t.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}e(ht,"setBlockSizes"),e(gt,"layoutBlocks"),e(yt,"findBounds"),e(pt,"layout"),e(ut,"applyStyle"),e(xt,"addHtmlLabel");var bt=e((async(t,e,i,s)=>{let n=t||"";if("object"==typeof n&&(n=n[0]),t=r(),o(t.flowchart.htmlLabels))return n=n.replace(/\\n|\n/g,"<br />"),a.debug("vertexText"+n),xt({isNode:s,label:await m(w(n)),labelStyle:e.replace("fill:","color:")},t);{var l=document.createElementNS("http://www.w3.org/2000/svg","text");l.setAttribute("style",e.replace("color:","fill:"));let t=[];for(const e of t="string"==typeof n?n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?n:[]){var c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),i?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=e.trim(),l.appendChild(c)}return l}}),"createLabel"),ft=e(((t,e,r,a,i)=>{e.arrowTypeStart&&wt(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&wt(t,"end",e.arrowTypeEnd,r,a,i)}),"addEdgeMarkers"),mt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},wt=e(((t,e,r,i,s,n)=>{var l=mt[r];l?t.attr("marker-"+e,`url(${i}#${s}_${n}-${l}${"start"===e?"Start":"End"})`):a.warn("Unknown arrow type: "+r)}),"addEdgeMarker"),kt={},Lt={},St=e((async(t,e)=>{var a,s=r(),n=o(s.flowchart.htmlLabels),l=(s="markdown"===e.labelType?c(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},s):await bt(e.label,e.labelStyle),t.insert("g").attr("class","edgeLabel")),d=l.insert("g").attr("class","label");d.node().appendChild(s);let h,g=s.getBBox();return n&&(n=s.children[0],a=i(s),g=n.getBoundingClientRect(),a.attr("width",g.width),a.attr("height",g.height)),d.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),kt[e.id]=l,e.width=g.width,e.height=g.height,e.startLabelLeft&&(n=await bt(e.startLabelLeft,e.labelStyle),h=(d=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner")).node().appendChild(n),l=n.getBBox(),d.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),Lt[e.id]||(Lt[e.id]={}),Lt[e.id].startLeft=a,_t(h,e.startLabelLeft)),e.startLabelRight&&(n=await bt(e.startLabelRight,e.labelStyle),l=(d=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),h=d.node().appendChild(n),l.node().appendChild(n),a=n.getBBox(),l.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),Lt[e.id]||(Lt[e.id]={}),Lt[e.id].startRight=d,_t(h,e.startLabelRight)),e.endLabelLeft&&(n=await bt(e.endLabelLeft,e.labelStyle),h=(a=(l=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner")).node().appendChild(n),d=n.getBBox(),a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(n),Lt[e.id]||(Lt[e.id]={}),Lt[e.id].endLeft=l,_t(h,e.endLabelLeft)),e.endLabelRight&&(a=await bt(e.endLabelRight,e.labelStyle),h=(n=(d=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner")).node().appendChild(a),l=a.getBBox(),n.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),d.node().appendChild(a),Lt[e.id]||(Lt[e.id]={}),Lt[e.id].endRight=d,_t(h,e.endLabelRight)),s}),"insertEdgeLabel");function _t(t,e){r().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}e(_t,"setTerminalWidth");var vt=e(((t,e)=>{a.debug("Moving label abc88 ",t.id,t.label,kt[t.id],e);var i=e.updatedPath||e.originalPath,s=r();s=d(s).subGraphTitleTotalMargin;if(t.label){var n=kt[t.id];let r=t.x,o=t.y;i&&(l=h.calcLabelPosition(i),a.debug("Moving label "+t.label+" from (",r,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath)&&(r=l.x,o=l.y),n.attr("transform",`translate(${r}, ${o+s/2})`)}if(t.startLabelLeft){e=Lt[t.id].startLeft;let r=t.x,a=t.y;i&&(r=(l=h.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",i)).x,a=l.y),e.attr("transform",`translate(${r}, ${a})`)}if(t.startLabelRight){n=Lt[t.id].startRight;let e=t.x,r=t.y;i&&(e=(s=h.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",i)).x,r=s.y),n.attr("transform",`translate(${e}, ${r})`)}if(t.endLabelLeft){var l=Lt[t.id].endLeft;let r=t.x,a=t.y;i&&(r=(e=h.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",i)).x,a=e.y),l.attr("transform",`translate(${r}, ${a})`)}if(t.endLabelRight){s=Lt[t.id].endRight;let e=t.x,r=t.y;i&&(e=(n=h.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",i)).x,r=n.y),s.attr("transform",`translate(${e}, ${r})`)}}),"positionEdgeLabel"),Et=e(((t,e)=>{var r=t.x,a=t.y;r=Math.abs(e.x-r),e=Math.abs(e.y-a),a=t.width/2,t=t.height/2;return a<=r||t<=e}),"outsideNode"),Dt=e(((t,e,r)=>{a.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);var i=t.x,s=t.y,n=Math.abs(i-r.x),l=t.width/2;let o=r.x<e.x?l-n:l+n;n=t.height/2,t=Math.abs(e.y-r.y);var c=Math.abs(e.x-r.x);if(Math.abs(s-e.y)*l>Math.abs(i-e.x)*n)return o=c*(s=r.y<e.y?e.y-n-s:s-n-e.y)/t,n={x:r.x<e.x?r.x+o:r.x-c+o,y:r.y<e.y?r.y+t-s:r.y-t+s},0===o&&(n.x=e.x,n.y=e.y),0===c&&(n.x=e.x),0===t&&(n.y=e.y),a.debug(`abc89 topp/bott calc, Q ${t}, q ${s}, R ${c}, r `+o,n),n;{s=t*(o=r.x<e.x?e.x-l-i:i-l-e.x)/c;let n=r.x<e.x?r.x+c-o:r.x-c+o,d=r.y<e.y?r.y+s:r.y-s;return a.debug(`sides calc abc89, Q ${t}, q ${s}, R ${c}, r `+o,{_x:n,_y:d}),0===o&&(n=e.x,d=e.y),0===c&&(n=e.x),0===t&&(d=e.y),{x:n,y:d}}}),"intersection"),Tt=e(((t,e)=>{a.debug("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],s=!1;return t.forEach((t=>{if(Et(e,t)||s)i=t,s||r.push(t);else{const a=Dt(e,i,t);let n=!1;r.forEach((t=>{n=n||t.x===a.x&&t.y===a.y})),r.some((t=>t.x===a.x&&t.y===a.y))||r.push(a),s=!0}})),r}),"cutPathAtIntersect"),Ct=e((function(t,e,i,s,n,l,o){let c=i.points,d=(a.debug("abc88 InsertEdge: edge=",i,"e=",e),!1);var h=l.node(e.v);l=l.node(e.w),l?.intersect&&h?.intersect&&((c=c.slice(1,i.points.length-1)).unshift(h.intersect(c[0])),c.push(l.intersect(c[c.length-1]))),i.toCluster&&(a.debug("to cluster abc88",s[i.toCluster]),c=Tt(i.points,s[i.toCluster].node),d=!0),i.fromCluster&&(a.debug("from cluster abc88",s[i.fromCluster]),c=Tt(c.reverse(),s[i.fromCluster].node).reverse(),d=!0),e=c.filter((t=>!Number.isNaN(t.y)));let u=f;!i.curve||"graph"!==n&&"flowchart"!==n||(u=i.curve);var{x:h,y:l}=g(i);s=y().x(h).y(l).curve(u);let x;switch(i.thickness){case"normal":x="edge-thickness-normal";break;case"thick":case"invisible":x="edge-thickness-thick";break;default:x=""}switch(i.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}h=t.append("path").attr("d",s(e)).attr("id",i.id).attr("class"," "+x+(i.classes?" "+i.classes:"")).attr("style",i.style);let b="";return(r().flowchart.arrowMarkerAbsolute||r().state.arrowMarkerAbsolute)&&(b=p(!0)),ft(h,i,b,o,n),l={},d&&(l.updatedPath=c),l.originalPath=i.points,l}),"insertEdge"),Nt=e((t=>{var e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e}),"expandAndDeduplicateDirections"),$t=e(((t,e,r)=>{t=Nt(t);var a=e.height+2*r.padding,i=a/2;e=e.width+2*i+r.padding,r=r.padding/2;return t.has("right")&&t.has("left")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:i,y:0},{x:e/2,y:2*r},{x:e-i,y:0},{x:e,y:0},{x:e,y:-a/3},{x:e+2*r,y:-a/2},{x:e,y:-2*a/3},{x:e,y:-a},{x:e-i,y:-a},{x:e/2,y:-a-2*r},{x:i,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*r,y:-a/2},{x:0,y:-a/3}]:t.has("right")&&t.has("left")&&t.has("up")?[{x:i,y:0},{x:e-i,y:0},{x:e,y:-a/2},{x:e-i,y:-a},{x:i,y:-a},{x:0,y:-a/2}]:t.has("right")&&t.has("left")&&t.has("down")?[{x:0,y:0},{x:i,y:-a},{x:e-i,y:-a},{x:e,y:0}]:t.has("right")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:e,y:-i},{x:e,y:i-a},{x:0,y:-a}]:t.has("left")&&t.has("up")&&t.has("down")?[{x:e,y:0},{x:0,y:-i},{x:0,y:i-a},{x:e,y:-a}]:t.has("right")&&t.has("left")?[{x:i,y:0},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:0},{x:e,y:-a/2},{x:e-i,y:-a},{x:e-i,y:r-a},{x:i,y:r-a},{x:i,y:-a},{x:0,y:-a/2}]:t.has("up")&&t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-a},{x:0,y:r-a},{x:e/2,y:-a},{x:e,y:r-a},{x:e-i,y:r-a},{x:e-i,y:-r},{x:e,y:-r}]:t.has("right")&&t.has("up")?[{x:0,y:0},{x:e,y:-i},{x:0,y:-a}]:t.has("right")&&t.has("down")?[{x:0,y:0},{x:e,y:0},{x:0,y:-a}]:t.has("left")&&t.has("up")?[{x:e,y:0},{x:0,y:-i},{x:e,y:-a}]:t.has("left")&&t.has("down")?[{x:e,y:0},{x:0,y:0},{x:e,y:-a}]:t.has("right")?[{x:i,y:-r},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:0},{x:e,y:-a/2},{x:e-i,y:-a},{x:e-i,y:r-a},{x:i,y:r-a},{x:i,y:r-a}]:t.has("left")?[{x:i,y:0},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:r-a},{x:i,y:r-a},{x:i,y:-a},{x:0,y:-a/2}]:t.has("up")?[{x:i,y:-r},{x:i,y:r-a},{x:0,y:r-a},{x:e/2,y:-a},{x:e,y:r-a},{x:e-i,y:r-a},{x:e-i,y:-r}]:t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-a},{x:e-i,y:r-a},{x:e-i,y:-r},{x:e,y:-r}]:[{x:0,y:0}]}),"getArrowPoints");function It(t,e){return t.intersect(e)}e(It,"intersectNode");var Bt=It;function zt(t,e,r,a){var i=t.x,s=(t=t.y,i-a.x),n=t-a.y,l=Math.sqrt(e*e*n*n+r*r*s*s);s=Math.abs(e*r*s/l),a.x<i&&(s=-s),e=Math.abs(e*r*n/l);return{x:i+s,y:t+(e=a.y<t?-e:e)}}e(zt,"intersectEllipse");var Rt=zt;function Ot(t,e,r){return Rt(t,e,e,r)}e(Ot,"intersectCircle");var At=Ot;function Mt(t,e,r,a){var i,s=e.y-t.y,n=t.x-e.x,l=e.x*t.y-t.x*e.y,o=s*r.x+n*r.y+l,c=s*a.x+n*a.y+l;if(!(0!=o&&0!=c&&Pt(o,c)||(o=a.y-r.y,c=r.x-a.x,r=a.x*r.y-r.x*a.y,a=o*t.x+c*t.y+r,t=o*e.x+c*e.y+r,0!=a&&0!=t&&Pt(a,t))||0==(i=s*c-o*n)))return e=Math.abs(i/2),{x:(a=n*r-c*l)<0?(a-e)/i:(a+e)/i,y:(a=o*l-s*r)<0?(a-e)/i:(a+e)/i}}function Pt(t,e){return 0<t*e}e(Mt,"intersectLine"),e(Pt,"sameSign");var Yt=Mt,Wt=Xt;function Xt(t,e,r){for(var a=t.x,i=t.y,s=[],n=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,o=("function"==typeof e.forEach?e.forEach((function(t){n=Math.min(n,t.x),l=Math.min(l,t.y)})):(n=Math.min(n,e.x),l=Math.min(l,e.y)),a-t.width/2-n),c=i-t.height/2-l,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0];(h=Yt(t,r,{x:o+h.x,y:c+h.y},{x:o+g.x,y:c+g.y}))&&s.push(h)}return s.length?(1<s.length&&s.sort((function(t,e){var a=t.x-r.x;t=t.y-r.y,a=Math.sqrt(a*a+t*t),t=e.x-r.x,e=e.y-r.y;return a<(t=Math.sqrt(t*t+e*e))?-1:a===t?0:1})),s[0]):t}e(Xt,"intersectPolygon");var Ft=e(((t,e)=>{var r,a=t.x,i=t.y,s=e.x-a,n=(e=e.y-i,t.width/2);t=t.height/2,t=Math.abs(e)*n>Math.abs(s)*t?(e<0&&(t=-t),r=0==e?0:t*s/e,t):(r=n=s<0?-n:n,0==s?0:n*e/s);return{x:a+r,y:i+t}}),"intersectRect"),jt={node:Bt,circle:At,ellipse:Rt,polygon:Wt,rect:Ft},Ht=e((async(t,a,n,l)=>{const d=r();let h;var g=a.useHtmlLabels||o(d.flowchart.htmlLabels);t=(n=(h=n||"node default",t.insert("g").attr("class",h).attr("id",a.domId||a.id))).insert("g").attr("class","label").attr("style",a.labelStyle);let y;y=void 0===a.labelText?"":"string"==typeof a.labelText?a.labelText:a.labelText[0];var p=t.node();let u,x=(u="markdown"===a.labelType?c(t,s(w(y),d),{useHtmlLabels:g,width:a.width||d.flowchart.wrappingWidth,classes:"markdown-node-label"},d):p.appendChild(await bt(s(w(y),d),a.labelStyle,!1,l))).getBBox();if(p=a.padding/2,o(d.flowchart.htmlLabels)){l=u.children[0];var b=i(u),f=l.getElementsByTagName("img");if(f){const t=""===y.replace(/<img[^>]*>/g,"").trim();await Promise.all([...f].map((r=>new Promise((a=>{function i(){var e;r.style.display="flex",r.style.flexDirection="column",t?(e=d.fontSize||window.getComputedStyle(document.body).fontSize,e=5*parseInt(e,10)+"px",r.style.minWidth=e,r.style.maxWidth=e):r.style.width="100%",a(r)}e(i,"setupImage"),setTimeout((()=>{r.complete&&i()})),r.addEventListener("error",i),r.addEventListener("load",i)})))))}x=l.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}return g?t.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"):t.attr("transform","translate(0, "+-x.height/2+")"),a.centerLabel&&t.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"),t.insert("rect",":first-child"),{shapeSvg:n,bbox:x,halfPadding:p,label:t}}),"labelHelper"),Ut=e(((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height}),"updateNodeBounds");function Kt(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}e(Kt,"insertPolygonShape");var qt=e((async(t,e)=>{e.useHtmlLabels||r().flowchart.htmlLabels||(e.centerLabel=!0);var{shapeSvg:t,bbox:i,halfPadding:s}=await Ht(t,e,"node "+e.classes,!0),n=(a.info("Classes = ",e.classes),t.insert("rect",":first-child"));return n.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-s).attr("y",-i.height/2-s).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Ut(e,n),e.intersect=function(t){return jt.rect(e,t)},t}),"note"),Zt=e((t=>t?" "+t:""),"formatClass"),Gt=e(((t,e)=>`${e||"node default"}${Zt(t.classes)} `+Zt(t.class)),"getClassesFromNode"),Jt=e((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Ht(t,e,Gt(e,void 0),!0);const i=[{x:(r=r.width+e.padding+(r.height+e.padding))/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];return a.info("Question main (Circle)"),(r=Kt(t,r,r,i)).attr("style",e.style),Ut(e,r),e.intersect=function(t){return a.warn("Intersect called"),jt.polygon(e,i,t)},t}),"question"),Vt=e(((t,e)=>((t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return jt.circle(e,14,t)},t)),"choice"),Qt=e((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Ht(t,e,Gt(e,void 0),!0),a=r.height+e.padding,i=a/4;const s=[{x:i,y:0},{x:(r=r.width+2*i+e.padding)-i,y:0},{x:r,y:-a/2},{x:r-i,y:-a},{x:i,y:-a},{x:0,y:-a/2}];return(i=Kt(t,r,a,s)).attr("style",e.style),Ut(e,i),e.intersect=function(t){return jt.polygon(e,s,t)},t}),"hexagon"),te=e((async(t,e)=>{var{shapeSvg:t,bbox:r}=await Ht(t,e,void 0,!0),a=r.height+2*e.padding,i=r.width+a/2*2+e.padding;const s=$t(e.directions,r,e);return(r=Kt(t,i,a,s)).attr("style",e.style),Ut(e,r),e.intersect=function(t){return jt.polygon(e,s,t)},t}),"block_arrow"),ee=e((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Ht(t,e,Gt(e,void 0),!0),a=r.width+e.padding;const i=[{x:-(r=r.height+e.padding)/2,y:0},{x:a,y:0},{x:a,y:-r},{x:-r/2,y:-r},{x:0,y:-r/2}];return Kt(t,a,r,i).attr("style",e.style),e.width=a+r,e.height=r,e.intersect=function(t){return jt.polygon(e,i,t)},t}),"rect_left_inv_arrow"),re=e((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Ht(t,e,Gt(e),!0),a=r.width+e.padding;const i=[{x:-2*(r=r.height+e.padding)/6,y:0},{x:a-r/6,y:0},{x:a+2*r/6,y:-r},{x:r/6,y:-r}];return(a=Kt(t,a,r,i)).attr("style",e.style),Ut(e,a),e.intersect=function(t){return jt.polygon(e,i,t)},t}),"lean_right"),ae=e((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Ht(t,e,Gt(e,void 0),!0),a=r.width+e.padding;const i=[{x:2*(r=r.height+e.padding)/6,y:0},{x:a+r/6,y:0},{x:a-2*r/6,y:-r},{x:-r/6,y:-r}];return(a=Kt(t,a,r,i)).attr("style",e.style),Ut(e,a),e.intersect=function(t){return jt.polygon(e,i,t)},t}),"lean_left"),ie=e((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Ht(t,e,Gt(e,void 0),!0),a=r.width+e.padding;const i=[{x:-2*(r=r.height+e.padding)/6,y:0},{x:a+2*r/6,y:0},{x:a-r/6,y:-r},{x:r/6,y:-r}];return(a=Kt(t,a,r,i)).attr("style",e.style),Ut(e,a),e.intersect=function(t){return jt.polygon(e,i,t)},t}),"trapezoid"),se=e((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Ht(t,e,Gt(e,void 0),!0),a=r.width+e.padding;const i=[{x:(r=r.height+e.padding)/6,y:0},{x:a-r/6,y:0},{x:a+2*r/6,y:-r},{x:-2*r/6,y:-r}];return(a=Kt(t,a,r,i)).attr("style",e.style),Ut(e,a),e.intersect=function(t){return jt.polygon(e,i,t)},t}),"inv_trapezoid"),ne=e((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Ht(t,e,Gt(e,void 0),!0),a=r.width+e.padding;const i=[{x:0,y:0},{x:a+(r=r.height+e.padding)/2,y:0},{x:a,y:-r/2},{x:a+r/2,y:-r},{x:0,y:-r}];return(a=Kt(t,a,r,i)).attr("style",e.style),Ut(e,a),e.intersect=function(t){return jt.polygon(e,i,t)},t}),"rect_right_inv_arrow"),le=e((async(t,e)=>{var{shapeSvg:t,bbox:r}=await Ht(t,e,Gt(e,void 0),!0),a=r.width+e.padding;const i=a/2,s=i/(2.5+a/50);var r=r.height+s+e.padding,n="M 0,"+s+" a "+i+","+s+" 0,0,0 "+a+" 0 a "+i+","+s+" 0,0,0 "+-a+" 0 l 0,"+r+" a "+i+","+s+" 0,0,0 "+a+" 0 l 0,"+-r;n=t.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",n).attr("transform","translate("+-a/2+","+-(r/2+s)+")");return Ut(e,n),e.intersect=function(t){var r=jt.rect(e,t),a=r.x-e.x;if(0!=i&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-s)){let n=s*s*(1-a*a/(i*i));0!=n&&(n=Math.sqrt(n)),n=s-n,0<t.y-e.y&&(n=-n),r.y+=n}return r},t}),"cylinder"),oe=e((async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:i}=await Ht(t,e,"node "+e.classes+" "+e.class,!0),s=t.insert("rect",":first-child"),n=e.positioned?e.width:r.width+e.padding,l=e.positioned?e.height:r.height+e.padding,o=e.positioned?-n/2:-r.width/2-i,r=e.positioned?-l/2:-r.height/2-i;return s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",n).attr("height",l),e.props&&(i=new Set(Object.keys(e.props)),e.props.borders&&(he(s,e.props.borders,n,l),i.delete("borders")),i.forEach((t=>{a.warn("Unknown node property "+t)}))),Ut(e,s),e.intersect=function(t){return jt.rect(e,t)},t}),"rect"),ce=e((async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:i}=await Ht(t,e,"node "+e.classes,!0),s=t.insert("rect",":first-child"),n=e.positioned?e.width:r.width+e.padding,l=e.positioned?e.height:r.height+e.padding,o=e.positioned?-n/2:-r.width/2-i,r=e.positioned?-l/2:-r.height/2-i;return s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",n).attr("height",l),e.props&&(i=new Set(Object.keys(e.props)),e.props.borders&&(he(s,e.props.borders,n,l),i.delete("borders")),i.forEach((t=>{a.warn("Unknown node property "+t)}))),Ut(e,s),e.intersect=function(t){return jt.rect(e,t)},t}),"composite"),de=e((async(t,e)=>{t=(await Ht(t,e,"label",!0)).shapeSvg;var r,i=(a.trace("Classes = ",e.class),t.insert("rect",":first-child"));return i.attr("width",0).attr("height",0),t.attr("class","label edgeLabel"),e.props&&(r=new Set(Object.keys(e.props)),e.props.borders&&(he(i,e.props.borders,0,0),r.delete("borders")),r.forEach((t=>{a.warn("Unknown node property "+t)}))),Ut(e,i),e.intersect=function(t){return jt.rect(e,t)},t}),"labelRect");function he(t,r,i,s){const n=[];var l=e((t=>{n.push(t,0)}),"addBorder"),o=e((t=>{n.push(0,t)}),"skipBorder");(r.includes("t")?(a.debug("add top border"),l):o)(i),(r.includes("r")?(a.debug("add right border"),l):o)(s),(r.includes("b")?(a.debug("add bottom border"),l):o)(i),(r.includes("l")?(a.debug("add left border"),l):o)(s),t.attr("stroke-dasharray",n.join(" "))}e(he,"applyNodePropertyBorders");var ge=e((async(t,e)=>{let s;s=e.classes?"node "+e.classes:"node default";var n=(t=t.insert("g").attr("class",s).attr("id",e.domId||e.id)).insert("rect",":first-child"),l=t.insert("line"),c=t.insert("g").attr("class","label");let d="";d="object"==typeof(x=e.labelText.flat?e.labelText.flat():e.labelText)?x[0]:x,a.info("Label text abc79",d,x,"object"==typeof x);var h=c.node().appendChild(await bt(d,e.labelStyle,!0,!0));let g={width:0,height:0};o(r().flowchart.htmlLabels)&&(p=h.children[0],u=i(h),g=p.getBoundingClientRect(),u.attr("width",g.width),u.attr("height",g.height)),a.info("Text 2",x);var y,p=x.slice(1,x.length),u=h.getBBox(),x=c.node().appendChild(await bt(p.join?p.join("<br/>"):p,e.labelStyle,!0,!0));o(r().flowchart.htmlLabels)&&(p=x.children[0],y=i(x),g=p.getBoundingClientRect(),y.attr("width",g.width),y.attr("height",g.height)),p=e.padding/2;return i(x).attr("transform","translate( "+(g.width>u.width?0:(u.width-g.width)/2)+", "+(u.height+p+5)+")"),i(h).attr("transform","translate( "+(g.width<u.width?0:-(u.width-g.width)/2)+", 0)"),g=c.node().getBBox(),c.attr("transform","translate("+-g.width/2+", "+(-g.height/2-p+3)+")"),n.attr("class","outer title-state").attr("x",-g.width/2-p).attr("y",-g.height/2-p).attr("width",g.width+e.padding).attr("height",g.height+e.padding),l.attr("class","divider").attr("x1",-g.width/2-p).attr("x2",g.width/2+p).attr("y1",-g.height/2-p+u.height+p).attr("y2",-g.height/2-p+u.height+p),Ut(e,n),e.intersect=function(t){return jt.rect(e,t)},t}),"rectWithTitle"),ye=e((async(t,e)=>{var{shapeSvg:t,bbox:r}=await Ht(t,e,Gt(e,void 0),!0),a=r.height+e.padding,r=(r=r.width+a/4+e.padding,t.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-r/2).attr("y",-a/2).attr("width",r).attr("height",a));return Ut(e,r),e.intersect=function(t){return jt.rect(e,t)},t}),"stadium"),pe=e((async(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:s}=await Ht(t,e,Gt(e,void 0),!0);return(t=r.insert("circle",":first-child")).attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+s).attr("width",i.width+e.padding).attr("height",i.height+e.padding),a.info("Circle main"),Ut(e,t),e.intersect=function(t){return a.info("Circle intersect",e,i.width/2+s,t),jt.circle(e,i.width/2+s,t)},r}),"circle"),ue=e((async(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:s}=await Ht(t,e,Gt(e,void 0),!0);var n=(t=r.insert("g",":first-child")).insert("circle"),l=t.insert("circle");return t.attr("class",e.class),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+s+5).attr("width",i.width+e.padding+10).attr("height",i.height+e.padding+10),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+s).attr("width",i.width+e.padding).attr("height",i.height+e.padding),a.info("DoubleCircle main"),Ut(e,n),e.intersect=function(t){return a.info("DoubleCircle intersect",e,i.width/2+s+5,t),jt.circle(e,i.width/2+s+5,t)},r}),"doublecircle"),xe=e((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Ht(t,e,Gt(e,void 0),!0),a=r.width+e.padding;const i=[{x:0,y:0},{x:a,y:0},{x:a,y:-(r=r.height+e.padding)},{x:0,y:-r},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-r},{x:-8,y:-r},{x:-8,y:0}];return(a=Kt(t,a,r,i)).attr("style",e.style),Ut(e,a),e.intersect=function(t){return jt.polygon(e,i,t)},t}),"subroutine"),be=e(((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Ut(e,r),e.intersect=function(t){return jt.circle(e,7,t)},t}),"start"),fe=e(((t,e,r)=>{let a=70,i=10;return"LR"===r&&(a=10,i=70),r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).append("rect").attr("x",-1*a/2).attr("y",-1*i/2).attr("width",a).attr("height",i).attr("class","fork-join"),Ut(e,r),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return jt.rect(e,t)},t}),"forkJoin"),me={rhombus:Jt,composite:ce,question:Jt,rect:oe,labelRect:de,rectWithTitle:ge,choice:Vt,circle:pe,doublecircle:ue,stadium:ye,hexagon:Qt,block_arrow:te,rect_left_inv_arrow:ee,lean_right:re,lean_left:ae,trapezoid:ie,inv_trapezoid:se,rect_right_inv_arrow:ne,cylinder:le,start:be,end:e(((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child"),a=t.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Ut(e,a),e.intersect=function(t){return jt.circle(e,7,t)},t}),"end"),note:qt,subroutine:xe,fork:fe,join:fe,class_box:e((async(t,e)=>{var a=e.padding/2;let s;s=e.classes?"node "+e.classes:"node default";var n=(t=t.insert("g").attr("class",s).attr("id",e.domId||e.id)).insert("rect",":first-child"),l=t.insert("line"),c=t.insert("line");let d=0,h=4;const g=t.insert("g").attr("class","label");let y=0;var p=e.classData.annotations?.[0],u=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"";let x=(u=g.node().appendChild(await bt(u,e.labelStyle,!0,!0))).getBBox(),b=(o(r().flowchart.htmlLabels)&&(m=u.children[0],f=i(u),x=m.getBoundingClientRect(),f.attr("width",x.width),f.attr("height",x.height)),e.classData.annotations[0]&&(h+=x.height+4,d+=x.width),e.classData.label);void 0!==e.classData.type&&""!==e.classData.type&&(r().flowchart.htmlLabels?b+="<"+e.classData.type+">":b+="<"+e.classData.type+">");var f,m=g.node().appendChild(await bt(b,e.labelStyle,!0,!0));i(m).attr("class","classTitle");let w=m.getBBox();o(r().flowchart.htmlLabels)&&(f=m.children[0],S=i(m),w=f.getBoundingClientRect(),S.attr("width",w.width),S.attr("height",w.height)),h+=w.height+4,w.width>d&&(d=w.width);const k=[],L=(e.classData.members.forEach((async t=>{let a=(t=t.getDisplayDetails()).displayText;var s,n;r().flowchart.htmlLabels&&(a=a.replace(/</g,"<").replace(/>/g,">"));let l=(t=g.node().appendChild(await bt(a,t.cssStyle||e.labelStyle,!0,!0))).getBBox();o(r().flowchart.htmlLabels)&&(s=t.children[0],n=i(t),l=s.getBoundingClientRect(),n.attr("width",l.width),n.attr("height",l.height)),l.width>d&&(d=l.width),h+=l.height+4,k.push(t)})),h+=8,[]);e.classData.methods.forEach((async t=>{let a=(t=t.getDisplayDetails()).displayText;var s,n;r().flowchart.htmlLabels&&(a=a.replace(/</g,"<").replace(/>/g,">"));let l=(t=g.node().appendChild(await bt(a,t.cssStyle||e.labelStyle,!0,!0))).getBBox();o(r().flowchart.htmlLabels)&&(s=t.children[0],n=i(t),l=s.getBoundingClientRect(),n.attr("width",l.width),n.attr("height",l.height)),l.width>d&&(d=l.width),h+=l.height+4,L.push(t)})),h+=8,p&&(f=(d-x.width)/2,i(u).attr("transform","translate( "+(-1*d/2+f)+", "+-1*h/2+")"),y=x.height+4);var S=(d-w.width)/2;return i(m).attr("transform","translate( "+(-1*d/2+S)+", "+(-1*h/2+y)+")"),y+=w.height+4,l.attr("class","divider").attr("x1",-d/2-a).attr("x2",d/2+a).attr("y1",-h/2-a+8+y).attr("y2",-h/2-a+8+y),y+=8,k.forEach((t=>{i(t).attr("transform","translate( "+-d/2+", "+(-1*h/2+y+4)+")"),t=t?.getBBox(),y+=(t?.height??0)+4})),y+=8,c.attr("class","divider").attr("x1",-d/2-a).attr("x2",d/2+a).attr("y1",-h/2-a+8+y).attr("y2",-h/2-a+8+y),y+=8,L.forEach((t=>{i(t).attr("transform","translate( "+-d/2+", "+(-1*h/2+y)+")"),t=t?.getBBox(),y+=(t?.height??0)+4})),n.attr("style",e.style).attr("class","outer title-state").attr("x",-d/2-a).attr("y",-h/2-a).attr("width",d+e.padding).attr("height",h+e.padding),Ut(e,n),e.intersect=function(t){return jt.rect(e,t)},t}),"class_box")},we={},ke=e((async(t,e,a)=>{let i,s;if(e.link){let n;"sandbox"===r().securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n),s=await me[e.shape](i,e,a)}else s=await me[e.shape](t,e,a),i=s;return e.tooltip&&s.attr("title",e.tooltip),e.class&&s.attr("class","node default "+e.class),we[e.id]=i,e.haveCallback&&we[e.id].attr("class",we[e.id].attr("class")+" clickable"),i}),"insertNode"),Le=e((t=>{var e=we[t.id],r=(a.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode");function Se(t,e,r=!1){let a,i="default",s=(0<(t?.classes?.length||0)&&(i=(t?.classes??[]).join(" ")),i+=" flowchart-label",0),o="";switch(t.type){case"round":s=5,o="rect";break;case"composite":s=0,o="composite",a=0;break;case"square":case"group":default:o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"block_arrow":o="block_arrow";break;case"odd":case"rect_left_inv_arrow":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"doublecircle":o="doublecircle"}var c=n(t?.styles??[]),d=t.label,h=t.size??{width:0,height:0,x:0,y:0};return{labelStyle:c.labelStyle,shape:o,labelText:d,rx:s,ry:s,class:i,style:c.style,id:t.id,directions:t.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:t.type,padding:a??l()?.block?.padding??0}}async function _e(t,e,r){var a;"group"!==(e=Se(e,0,!1)).type&&(a=l(),a=(t=await ke(t,e,{config:a})).node().getBBox(),(e=r.getBlock(e.id)).size={width:a.width,height:a.height,x:0,y:0,node:t},r.setBlock(e),t.remove())}async function ve(t,e,r){var a=Se(e,0,!0);"space"!==r.getBlock(a.id).type&&(r=l(),await ke(t,a,{config:r}),e.intersect=a?.intersect,Le(a))}async function Ee(t,e,r,a){for(const i of e)await a(t,i,r),i.children&&await Ee(t,i.children,r,a)}async function De(t,e,r){await Ee(t,e,r,_e)}async function Te(t,e,r){await Ee(t,e,r,ve)}async function Ce(t,e,r,a,i){var s,n,l=new S({multigraph:!0,compound:!0});l.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const t of r)t.size&&l.setNode(t.id,{width:t.size.width,height:t.size.height,intersect:t.intersect});for(const r of e)r.start&&r.end&&(n=a.getBlock(r.start),s=a.getBlock(r.end),n?.size)&&s?.size&&(n=n.size,s=s.size,n=[{x:n.x,y:n.y},{x:n.x+(s.x-n.x)/2,y:n.y+(s.y-n.y)/2},{x:s.x,y:s.y}],Ct(t,{v:r.start,w:r.end,name:r.id},{...r,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:n,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",l,i),r.label)&&(await St(t,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:n,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),vt({...r,x:n[1].x,y:n[1].y},{originalPath:n}))}e(Se,"getNodeFromBlock"),e(_e,"calculateBlockSize"),e(ve,"insertBlockPositioned"),e(Ee,"performOperations"),e(De,"calculateBlockSizes"),e(Te,"insertBlocks"),e(Ce,"insertEdges");var Ne=e((function(t,e){return e.db.getClasses()}),"getClasses"),$e={parser:E,db:rt,renderer:{draw:e((async function(t,e,r,s){var{securityLevel:n,block:o}=l(),c=s.db;let d;"sandbox"===n&&(d=i("#i"+e));var h=i("sandbox"===n?d.nodes()[0].contentDocument.body:"body"),n="sandbox"===n?h.select(`[id="${e}"]`):i(`[id="${e}"]`),g=(h=(lt(n,["point","circle","cross"],s.type,e),c.getBlocks()),s=c.getBlocksFlat(),c.getEdges()),y=n.insert("g").attr("class","block"),p=(await De(y,h,c),pt(c));await Te(y,h,c),await Ce(y,g,s,c,e),p&&(h=p,y=Math.max(1,Math.round(h.width/h.height*.125)),g=h.height+y+10,s=h.width+10,c=o.useMaxWidth,u(n,g,s,!!c),a.debug("Here Bounds",p,h),n.attr("viewBox",`${h.x-5} ${h.y-5} ${h.width+10} `+(h.height+10)))}),"draw"),getClasses:Ne},styles:it};export{$e as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t,g as e}from"./chunk-TZMSLE5B-ed6d6d7e.js";import{_ as a,a as n,s as i,g as r,b as s,c as o,d as l,w as h,e as d,f as p,h as u,i as y,j as g,l as b,k as f,m as _}from"./web-0016ac81.js";var m,x=function(){var t=a((function(t,e,a,n){for(a=a||{},n=t.length;n--;a[t[n]]=e);return a}),"o"),e=[1,24],n=[1,25],i=[1,26],r=[1,27],s=[1,28],o=[1,63],l=[1,64],h=[1,65],d=[1,66],p=[1,67],u=[1,68],y=[1,69],g=[1,29],b=[1,30],f=[1,31],_=[1,32],m=[1,33],x=[1,34],E=[1,35],S=[1,36],A=[1,37],C=[1,38],w=[1,39],v=[1,40],O=[1,41],k=[1,42],T=[1,43],R=[1,44],D=[1,45],N=[1,46],P=[1,47],B=[1,48],j=[1,50],M=[1,51],I=[1,52],L=[1,53],Y=[1,54],U=[1,55],F=[1,56],X=[1,57],z=[1,58],W=[1,59],Q=[1,60],$=[14,42],H=[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],q=[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],V=[1,82],G=[1,83],K=[1,84],J=[1,85],Z=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],at=[12,33],nt=[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];e={trace:a((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:a((function(t,e,a,n,i,r,s){var o=r.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(r[o-3]);break;case 19:n.setTitle(r[o].substring(6)),this.$=r[o].substring(6);break;case 20:n.setAccDescription(r[o].substring(15)),this.$=r[o].substring(15);break;case 21:this.$=r[o].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=r[o].trim(),n.setAccDescription(this.$);break;case 28:r[o].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...r[o]),this.$=r[o];break;case 29:r[o].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...r[o]),this.$=r[o];break;case 30:n.addPersonOrSystemBoundary(...r[o]),this.$=r[o];break;case 31:r[o].splice(2,0,"CONTAINER"),n.addContainerBoundary(...r[o]),this.$=r[o];break;case 32:n.addDeploymentNode("node",...r[o]),this.$=r[o];break;case 33:n.addDeploymentNode("nodeL",...r[o]),this.$=r[o];break;case 34:n.addDeploymentNode("nodeR",...r[o]),this.$=r[o];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...r[o]),this.$=r[o];break;case 40:n.addPersonOrSystem("external_person",...r[o]),this.$=r[o];break;case 41:n.addPersonOrSystem("system",...r[o]),this.$=r[o];break;case 42:n.addPersonOrSystem("system_db",...r[o]),this.$=r[o];break;case 43:n.addPersonOrSystem("system_queue",...r[o]),this.$=r[o];break;case 44:n.addPersonOrSystem("external_system",...r[o]),this.$=r[o];break;case 45:n.addPersonOrSystem("external_system_db",...r[o]),this.$=r[o];break;case 46:n.addPersonOrSystem("external_system_queue",...r[o]),this.$=r[o];break;case 47:n.addContainer("container",...r[o]),this.$=r[o];break;case 48:n.addContainer("container_db",...r[o]),this.$=r[o];break;case 49:n.addContainer("container_queue",...r[o]),this.$=r[o];break;case 50:n.addContainer("external_container",...r[o]),this.$=r[o];break;case 51:n.addContainer("external_container_db",...r[o]),this.$=r[o];break;case 52:n.addContainer("external_container_queue",...r[o]),this.$=r[o];break;case 53:n.addComponent("component",...r[o]),this.$=r[o];break;case 54:n.addComponent("component_db",...r[o]),this.$=r[o];break;case 55:n.addComponent("component_queue",...r[o]),this.$=r[o];break;case 56:n.addComponent("external_component",...r[o]),this.$=r[o];break;case 57:n.addComponent("external_component_db",...r[o]),this.$=r[o];break;case 58:n.addComponent("external_component_queue",...r[o]),this.$=r[o];break;case 60:n.addRel("rel",...r[o]),this.$=r[o];break;case 61:n.addRel("birel",...r[o]),this.$=r[o];break;case 62:n.addRel("rel_u",...r[o]),this.$=r[o];break;case 63:n.addRel("rel_d",...r[o]),this.$=r[o];break;case 64:n.addRel("rel_l",...r[o]),this.$=r[o];break;case 65:n.addRel("rel_r",...r[o]),this.$=r[o];break;case 66:n.addRel("rel_b",...r[o]),this.$=r[o];break;case 67:r[o].splice(0,1),n.addRel("rel",...r[o]),this.$=r[o];break;case 68:n.updateElStyle("update_el_style",...r[o]),this.$=r[o];break;case 69:n.updateRelStyle("update_rel_style",...r[o]),this.$=r[o];break;case 70:n.updateLayoutConfig("update_layout_config",...r[o]),this.$=r[o];break;case 71:this.$=[r[o]];break;case 72:r[o].unshift(r[o-1]),this.$=r[o];break;case 73:case 75:this.$=r[o].trim();break;case 74:var l={};l[r[o-1].trim()]=r[o].trim(),this.$=l;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:e,23:n,24:i,26:r,28:s,29:49,30:61,32:62,34:o,36:l,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:70,19:20,20:21,21:22,22:e,23:n,24:i,26:r,28:s,29:49,30:61,32:62,34:o,36:l,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:71,19:20,20:21,21:22,22:e,23:n,24:i,26:r,28:s,29:49,30:61,32:62,34:o,36:l,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:72,19:20,20:21,21:22,22:e,23:n,24:i,26:r,28:s,29:49,30:61,32:62,34:o,36:l,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:73,19:20,20:21,21:22,22:e,23:n,24:i,26:r,28:s,29:49,30:61,32:62,34:o,36:l,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{14:[1,74]},t($,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:l,37:h,38:d,39:p,40:u,41:y,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q}),t($,[2,14]),t(H,[2,16],{12:[1,76]}),t($,[2,36],{12:[1,77]}),t(q,[2,19]),t(q,[2,20]),{25:[1,78]},{27:[1,79]},t(q,[2,23]),{35:80,75:81,76:V,77:G,79:K,80:J},{35:86,75:81,76:V,77:G,79:K,80:J},{35:87,75:81,76:V,77:G,79:K,80:J},{35:88,75:81,76:V,77:G,79:K,80:J},{35:89,75:81,76:V,77:G,79:K,80:J},{35:90,75:81,76:V,77:G,79:K,80:J},{35:91,75:81,76:V,77:G,79:K,80:J},{35:92,75:81,76:V,77:G,79:K,80:J},{35:93,75:81,76:V,77:G,79:K,80:J},{35:94,75:81,76:V,77:G,79:K,80:J},{35:95,75:81,76:V,77:G,79:K,80:J},{35:96,75:81,76:V,77:G,79:K,80:J},{35:97,75:81,76:V,77:G,79:K,80:J},{35:98,75:81,76:V,77:G,79:K,80:J},{35:99,75:81,76:V,77:G,79:K,80:J},{35:100,75:81,76:V,77:G,79:K,80:J},{35:101,75:81,76:V,77:G,79:K,80:J},{35:102,75:81,76:V,77:G,79:K,80:J},{35:103,75:81,76:V,77:G,79:K,80:J},{35:104,75:81,76:V,77:G,79:K,80:J},t(Z,[2,59]),{35:105,75:81,76:V,77:G,79:K,80:J},{35:106,75:81,76:V,77:G,79:K,80:J},{35:107,75:81,76:V,77:G,79:K,80:J},{35:108,75:81,76:V,77:G,79:K,80:J},{35:109,75:81,76:V,77:G,79:K,80:J},{35:110,75:81,76:V,77:G,79:K,80:J},{35:111,75:81,76:V,77:G,79:K,80:J},{35:112,75:81,76:V,77:G,79:K,80:J},{35:113,75:81,76:V,77:G,79:K,80:J},{35:114,75:81,76:V,77:G,79:K,80:J},{35:115,75:81,76:V,77:G,79:K,80:J},{20:116,29:49,30:61,32:62,34:o,36:l,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{12:[1,118],33:[1,117]},{35:119,75:81,76:V,77:G,79:K,80:J},{35:120,75:81,76:V,77:G,79:K,80:J},{35:121,75:81,76:V,77:G,79:K,80:J},{35:122,75:81,76:V,77:G,79:K,80:J},{35:123,75:81,76:V,77:G,79:K,80:J},{35:124,75:81,76:V,77:G,79:K,80:J},{35:125,75:81,76:V,77:G,79:K,80:J},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t($,[2,15]),t(H,[2,17],{21:22,19:130,22:e,23:n,24:i,26:r,28:s}),t($,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:n,24:i,26:r,28:s,34:o,36:l,37:h,38:d,39:p,40:u,41:y,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q}),t(q,[2,21]),t(q,[2,22]),t(Z,[2,39]),t(tt,[2,71],{75:81,35:132,76:V,77:G,79:K,80:J}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(Z,[2,40]),t(Z,[2,41]),t(Z,[2,42]),t(Z,[2,43]),t(Z,[2,44]),t(Z,[2,45]),t(Z,[2,46]),t(Z,[2,47]),t(Z,[2,48]),t(Z,[2,49]),t(Z,[2,50]),t(Z,[2,51]),t(Z,[2,52]),t(Z,[2,53]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(Z,[2,58]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,64]),t(Z,[2,65]),t(Z,[2,66]),t(Z,[2,67]),t(Z,[2,68]),t(Z,[2,69]),t(Z,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(at,[2,28]),t(at,[2,29]),t(at,[2,30]),t(at,[2,31]),t(at,[2,32]),t(at,[2,33]),t(at,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(H,[2,18]),t($,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(Z,[2,24]),t(Z,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[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:a((function(t,e){var a;if(!e.recoverable)throw(a=new Error(t)).hash=e,a;this.trace(t)}),"parseError"),parse:a((function(t){var e,n=this,i=[0],r=[],s=[null],o=[],l=this.table,c="",h=0,d=0,p=o.slice.call(arguments,1),u=Object.create(this.lexer),y={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(y.yy[e]=this.yy[e]);u.setInput(t,y.yy),y.yy.lexer=u,y.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var g=u.yylloc,b=(o.push(g),u.options&&u.options.ranges);function f(){var t=r.pop()||u.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(r=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a((function(t){i.length=i.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),a(f,"lex");for(var _,m,x,E,S,A,C={};;){if(m=i[i.length-1],void 0===(x=this.defaultActions[m]||(null==_&&(_=f()),l[m]&&l[m][_]))||!x.length||!x[0]){var w,v=[];for(E in l[m])this.terminals_[E]&&2<E&&v.push("'"+this.terminals_[E]+"'");w=u.showPosition?"Parse error on line "+(h+1)+":\n"+u.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(w,{text:u.match,token:this.terminals_[_]||_,line:u.yylineno,loc:g,expected:v})}if(x[0]instanceof Array&&1<x.length)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+_);switch(x[0]){case 1:i.push(_),s.push(u.yytext),o.push(u.yylloc),i.push(x[1]),_=null,d=u.yyleng,c=u.yytext,h=u.yylineno,g=u.yylloc;break;case 2:if(S=this.productions_[x[1]][1],C.$=s[s.length-S],C._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},b&&(C._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(A=this.performAction.apply(C,[c,d,h,y.yy,x[1],s,o].concat(p))))return A;S&&(i=i.slice(0,-1*S*2),s=s.slice(0,-1*S),o=o.slice(0,-1*S)),i.push(this.productions_[x[1]][0]),s.push(C.$),o.push(C._$),A=l[i[i.length-2]][i[i.length-1]],i.push(A);break;case 3:return!0}}return!0}),"parse")},n={EOF:1,parseError:a((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:a((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:a((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:a((function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g),n=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),a.length-1&&(this.yylineno-=a.length-1),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:a?(a.length===t.length?this.yylloc.first_column:0)+t[t.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:a((function(){return this._more=!0,this}),"more"),reject:a((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:a((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:a((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:a((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:a((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:a((function(t,e){var a,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var i in n)this[i]=n[i];return!1}),"test_match"),next:a((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,a,n,i=this._currentRules(),r=0;r<i.length;r++)if((a=this._input.match(this.rules[i[r]]))&&(!e||a[0].length>e[0].length))if(e=a,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[r])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:a((function(){return this.next()||this.lex()}),"lex"),begin:a((function(t){this.conditionStack.push(t)}),"begin"),popState:a((function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:a((function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:a((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:a((function(t){this.begin(t)}),"pushState"),stateStackSize:a((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:a((function(t,e,a,n){switch(a){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:[],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 it(){this.yy={}}return e.lexer=n,a(it,"Parser"),new((it.prototype=e).Parser=it)}(),E=x.parser=x,S=[],A=[""],C="global",w="",v=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],O=[],k="",T=!1,R=4,D=2,N=a((function(){return m}),"getC4Type"),P=a((function(t){t=y(t,l()),m=t}),"setC4Type"),B=a((function(t,e,a,n,i,r,s,o,l){if(null!=t&&null!=e&&null!=a&&null!=n){let h={};var c=O.find((t=>t.from===e&&t.to===a));c?h=c:O.push(h),h.type=t,h.from=e,h.to=a,h.label={text:n},null==i?h.techn={text:""}:"object"==typeof i?([c,t]=Object.entries(i)[0],h[c]={text:t}):h.techn={text:i},null==r?h.descr={text:""}:"object"==typeof r?([n,c]=Object.entries(r)[0],h[n]={text:c}):h.descr={text:r},"object"==typeof s?([t,i]=Object.entries(s)[0],h[t]=i):h.sprite=s,"object"==typeof o?([n,c]=Object.entries(o)[0],h[n]=c):h.tags=o,"object"==typeof l?([r,t]=Object.entries(l)[0],h[r]=t):h.link=l,h.wrap=at()}}),"addRel"),j=a((function(t,e,a,n,i,r,s){if(null!==e&&null!==a){let l={};var o=S.find((t=>t.alias===e));o&&e===o.alias?l=o:(l.alias=e,S.push(l)),l.label=null==a?{text:""}:{text:a},null==n?l.descr={text:""}:"object"==typeof n?([o,a]=Object.entries(n)[0],l[o]={text:a}):l.descr={text:n},"object"==typeof i?([o,a]=Object.entries(i)[0],l[o]=a):l.sprite=i,"object"==typeof r?([n,o]=Object.entries(r)[0],l[n]=o):l.tags=r,"object"==typeof s?([a,i]=Object.entries(s)[0],l[a]=i):l.link=s,l.typeC4Shape={text:t},l.parentBoundary=C,l.wrap=at()}}),"addPersonOrSystem"),M=a((function(t,e,a,n,i,r,s,o){if(null!==e&&null!==a){let c={};var l=S.find((t=>t.alias===e));l&&e===l.alias?c=l:(c.alias=e,S.push(c)),c.label=null==a?{text:""}:{text:a},null==n?c.techn={text:""}:"object"==typeof n?([l,a]=Object.entries(n)[0],c[l]={text:a}):c.techn={text:n},null==i?c.descr={text:""}:"object"==typeof i?([l,a]=Object.entries(i)[0],c[l]={text:a}):c.descr={text:i},"object"==typeof r?([n,l]=Object.entries(r)[0],c[n]=l):c.sprite=r,"object"==typeof s?([a,i]=Object.entries(s)[0],c[a]=i):c.tags=s,"object"==typeof o?([n,l]=Object.entries(o)[0],c[n]=l):c.link=o,c.wrap=at(),c.typeC4Shape={text:t},c.parentBoundary=C}}),"addContainer"),I=a((function(t,e,a,n,i,r,s,o){if(null!==e&&null!==a){let c={};var l=S.find((t=>t.alias===e));l&&e===l.alias?c=l:(c.alias=e,S.push(c)),c.label=null==a?{text:""}:{text:a},null==n?c.techn={text:""}:"object"==typeof n?([l,a]=Object.entries(n)[0],c[l]={text:a}):c.techn={text:n},null==i?c.descr={text:""}:"object"==typeof i?([l,a]=Object.entries(i)[0],c[l]={text:a}):c.descr={text:i},"object"==typeof r?([n,l]=Object.entries(r)[0],c[n]=l):c.sprite=r,"object"==typeof s?([a,i]=Object.entries(s)[0],c[a]=i):c.tags=s,"object"==typeof o?([n,l]=Object.entries(o)[0],c[n]=l):c.link=o,c.wrap=at(),c.typeC4Shape={text:t},c.parentBoundary=C}}),"addComponent"),L=a((function(t,e,a,n,i){if(null!==t&&null!==e){let s={};var r=v.find((e=>e.alias===t));r&&t===r.alias?s=r:(s.alias=t,v.push(s)),s.label=null==e?{text:""}:{text:e},null==a?s.type={text:"system"}:"object"==typeof a?([r,e]=Object.entries(a)[0],s[r]={text:e}):s.type={text:a},"object"==typeof n?([r,e]=Object.entries(n)[0],s[r]=e):s.tags=n,"object"==typeof i?([a,r]=Object.entries(i)[0],s[a]=r):s.link=i,s.parentBoundary=C,s.wrap=at(),w=C,C=t,A.push(w)}}),"addPersonOrSystemBoundary"),Y=a((function(t,e,a,n,i){if(null!==t&&null!==e){let s={};var r=v.find((e=>e.alias===t));r&&t===r.alias?s=r:(s.alias=t,v.push(s)),s.label=null==e?{text:""}:{text:e},null==a?s.type={text:"container"}:"object"==typeof a?([r,e]=Object.entries(a)[0],s[r]={text:e}):s.type={text:a},"object"==typeof n?([r,e]=Object.entries(n)[0],s[r]=e):s.tags=n,"object"==typeof i?([a,r]=Object.entries(i)[0],s[a]=r):s.link=i,s.parentBoundary=C,s.wrap=at(),w=C,C=t,A.push(w)}}),"addContainerBoundary"),U=a((function(t,e,a,n,i,r,s,o){if(null!==e&&null!==a){let r={};var l=v.find((t=>t.alias===e));l&&e===l.alias?r=l:(r.alias=e,v.push(r)),r.label=null==a?{text:""}:{text:a},null==n?r.type={text:"node"}:"object"==typeof n?([l,a]=Object.entries(n)[0],r[l]={text:a}):r.type={text:n},null==i?r.descr={text:""}:"object"==typeof i?([l,a]=Object.entries(i)[0],r[l]={text:a}):r.descr={text:i},"object"==typeof s?([n,l]=Object.entries(s)[0],r[n]=l):r.tags=s,"object"==typeof o?([a,i]=Object.entries(o)[0],r[a]=i):r.link=o,r.nodeType=t,r.parentBoundary=C,r.wrap=at(),w=C,C=e,A.push(w)}}),"addDeploymentNode"),F=a((function(){C=w,A.pop(),w=A.pop(),A.push(w)}),"popBoundaryParseStack"),X=a((function(t,e,a,n,i,r,s,o,l,c,h){let d=S.find((t=>t.alias===e));var p,u;void 0===d&&void 0===(d=v.find((t=>t.alias===e)))||(null!=a&&("object"==typeof a?([u,p]=Object.entries(a)[0],d[u]=p):d.bgColor=a),null!=n&&("object"==typeof n?([u,p]=Object.entries(n)[0],d[u]=p):d.fontColor=n),null!=i&&("object"==typeof i?([a,u]=Object.entries(i)[0],d[a]=u):d.borderColor=i),null!=r&&("object"==typeof r?([p,n]=Object.entries(r)[0],d[p]=n):d.shadowing=r),null!=s&&("object"==typeof s?([a,u]=Object.entries(s)[0],d[a]=u):d.shape=s),null!=o&&("object"==typeof o?([i,p]=Object.entries(o)[0],d[i]=p):d.sprite=o),null!=l&&("object"==typeof l?([n,r]=Object.entries(l)[0],d[n]=r):d.techn=l),null!=c&&("object"==typeof c?([a,u]=Object.entries(c)[0],d[a]=u):d.legendText=c),null!=h&&("object"==typeof h?([s,i]=Object.entries(h)[0],d[s]=i):d.legendSprite=h))}),"updateElStyle"),z=a((function(t,e,a,n,i,r,s){var o,l,c=O.find((t=>t.from===e&&t.to===a));void 0!==c&&(null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.textColor=n),null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.lineColor=i),null!=r&&("object"==typeof r?([n,o]=Object.entries(r)[0],c[n]=parseInt(o)):c.offsetX=parseInt(r)),null!=s)&&("object"==typeof s?([l,i]=Object.entries(s)[0],c[l]=parseInt(i)):c.offsetY=parseInt(s))}),"updateRelStyle"),W=a((function(t,e,a){let n=R,i=D;var r;n="object"==typeof e?(r=Object.values(e)[0],parseInt(r)):parseInt(e),i="object"==typeof a?(r=Object.values(a)[0],parseInt(r)):parseInt(a),1<=n&&(R=n),1<=i&&(D=i)}),"updateLayoutConfig"),Q=a((function(){return R}),"getC4ShapeInRow"),$=a((function(){return D}),"getC4BoundaryInRow"),H=a((function(){return C}),"getCurrentBoundaryParse"),q=a((function(){return w}),"getParentBoundaryParse"),V=a((function(t){return null==t?S:S.filter((e=>e.parentBoundary===t))}),"getC4ShapeArray"),G=a((function(t){return S.find((e=>e.alias===t))}),"getC4Shape"),K=a((function(t){return Object.keys(V(t))}),"getC4ShapeKeys"),J=a((function(t){return null==t?v:v.filter((e=>e.parentBoundary===t))}),"getBoundaries"),Z=a((function(){return O}),"getRels"),tt=a((function(){return k}),"getTitle"),et=a((function(t){T=t}),"setWrap"),at=a((function(){return T}),"autoWrap"),nt=a((function(){S=[],v=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],C="global",A=[w=""],O=[],T=!(A=[k=""]),R=4,D=2}),"clear"),it=a((function(t){t=y(t,l()),k=t}),"setTitle"),rt={addPersonOrSystem:j,addPersonOrSystemBoundary:L,addContainer:M,addContainerBoundary:Y,addComponent:I,addDeploymentNode:U,popBoundaryParseStack:F,addRel:B,updateElStyle:X,updateRelStyle:z,updateLayoutConfig:W,autoWrap:at,setWrap:et,getC4ShapeArray:V,getC4Shape:G,getC4ShapeKeys:K,getBoundaries:J,getBoundarys:J,getCurrentBoundaryParse:H,getParentBoundaryParse:q,getRels:Z,getTitle:tt,getC4Type:N,getC4ShapeInRow:Q,getC4BoundaryInRow:$,setAccTitle:i,getAccTitle:r,getAccDescription:s,setAccDescription:o,getConfig:a((()=>l().c4),"getConfig"),clear:nt,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:it,setC4Type:P},st=a((function(e,a){return t(e,a)}),"drawRect"),ot=a((function(t,e,a,n,i,r){(t=t.append("image")).attr("width",e),t.attr("height",a),t.attr("x",n),t.attr("y",i),e=r.startsWith("data:image/png;base64")?r:_(r),t.attr("xlink:href",e)}),"drawImage"),lt=a(((t,e,a)=>{var n,i=t.append("g");let r=0;for(n of e){var s,o=n.textColor||"#444444",l=n.lineColor||"#444444",c=n.offsetX?parseInt(n.offsetX):0,h=n.offsetY?parseInt(n.offsetY):0;l=(0===r?((s=i.append("line")).attr("x1",n.startPoint.x),s.attr("y1",n.startPoint.y),s.attr("x2",n.endPoint.x),s.attr("y2",n.endPoint.y),s.attr("stroke-width","1"),s.attr("stroke",l),s.style("fill","none"),"rel_b"!==n.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==n.type&&"rel_b"!==n.type||s.attr("marker-start","url(#arrowend)"),r=-1):((s=i.append("path")).attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",n.startPoint.x).replaceAll("starty",n.startPoint.y).replaceAll("controlx",n.startPoint.x+(n.endPoint.x-n.startPoint.x)/2-(n.endPoint.x-n.startPoint.x)/4).replaceAll("controly",n.startPoint.y+(n.endPoint.y-n.startPoint.y)/2).replaceAll("stopx",n.endPoint.x).replaceAll("stopy",n.endPoint.y)),"rel_b"!==n.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==n.type&&"rel_b"!==n.type||s.attr("marker-start","url(#arrowend)")),a.messageFont());xt(a)(n.label.text,i,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+c,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+h,n.label.width,n.label.height,{fill:o},l),n.techn&&""!==n.techn.text&&(l=a.messageFont(),xt(a)("["+n.techn.text+"]",i,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+c,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+a.messageFontSize+5+h,Math.max(n.label.width,n.techn.width),n.techn.height,{fill:o,"font-style":"italic"},l))}}),"drawRels"),ct=a((function(t,e,a){t=t.append("g");var n=e.bgColor||"none",i=e.borderColor||"#444444",r=e.fontColor||"black";let s={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(s={"stroke-width":1}),n={x:e.x,y:e.y,fill:n,stroke:i,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:s},st(t,n);let o=a.boundaryFont();o.fontWeight="bold",o.fontSize=o.fontSize+2,o.fontColor=r,xt(a)(e.label.text,t,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},o),e.type&&""!==e.type.text&&((o=a.boundaryFont()).fontColor=r,xt(a)(e.type.text,t,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},o)),e.descr&&""!==e.descr.text&&((o=a.boundaryFont()).fontSize=o.fontSize-2,o.fontColor=r,xt(a)(e.descr.text,t,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},o))}),"drawBoundary"),ht=a((function(t,a,n){var i=a.bgColor||n[a.typeC4Shape.text+"_bg_color"],r=a.borderColor||n[a.typeC4Shape.text+"_border_color"],s=a.fontColor||"#FFFFFF";let o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(a.typeC4Shape.text){case"person":o="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":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}var l=t.append("g"),c=(l.attr("class","person-man"),e());switch(a.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":c.x=a.x,c.y=a.y,c.fill=i,c.width=a.width,c.height=a.height,c.stroke=r,c.rx=2.5,c.ry=2.5,c.attrs={"stroke-width":.5},st(l,c);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).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",a.x).replaceAll("starty",a.y).replaceAll("half",a.width/2).replaceAll("height",a.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",a.x).replaceAll("starty",a.y).replaceAll("half",a.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).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",a.x).replaceAll("starty",a.y).replaceAll("width",a.width).replaceAll("half",a.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",a.x+a.width).replaceAll("starty",a.y).replaceAll("half",a.height/2))}switch(t=mt(n,a.typeC4Shape.text),l.append("text").attr("fill",s).attr("font-family",t.fontFamily).attr("font-size",t.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",a.typeC4Shape.width).attr("x",a.x+a.width/2-a.typeC4Shape.width/2).attr("y",a.y+a.typeC4Shape.Y).text("<<"+a.typeC4Shape.text+">>"),a.typeC4Shape.text){case"person":case"external_person":ot(l,48,48,a.x+a.width/2-24,a.y+a.image.Y,o)}let h=n[a.typeC4Shape.text+"Font"]();return h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=s,xt(n)(a.label.text,l,a.x,a.y+a.label.Y,a.width,a.height,{fill:s},h),(h=n[a.typeC4Shape.text+"Font"]()).fontColor=s,a.techn&&""!==a.techn?.text?xt(n)(a.techn.text,l,a.x,a.y+a.techn.Y,a.width,a.height,{fill:s,"font-style":"italic"},h):a.type&&""!==a.type.text&&xt(n)(a.type.text,l,a.x,a.y+a.type.Y,a.width,a.height,{fill:s,"font-style":"italic"},h),a.descr&&""!==a.descr.text&&((h=n.personFont()).fontColor=s,xt(n)(a.descr.text,l,a.x,a.y+a.descr.Y,a.width,a.height,{fill:s},h)),a.height}),"drawC4Shape"),dt=a((function(t){t.append("defs").append("symbol").attr("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"),pt=a((function(t){t.append("defs").append("symbol").attr("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"),ut=a((function(t){t.append("defs").append("symbol").attr("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"),yt=a((function(t){t.append("defs").append("marker").attr("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"),gt=a((function(t){t.append("defs").append("marker").attr("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"),bt=a((function(t){t.append("defs").append("marker").attr("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"),ft=a((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertDynamicNumber"),_t=a((function(t){(t=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4)).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"),t.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"),mt=a(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"getC4ShapeFont"),xt=function(){function t(t,e,a,n,r,s,o){i(e.append("text").attr("x",a+r/2).attr("y",n+s/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,n,r,s,o,l){var{fontSize:c,fontFamily:h,fontWeight:p}=l,u=t.split(d.lineBreakRegex);for(let t=0;t<u.length;t++){var y=t*c-c*(u.length-1)/2,g=e.append("text").attr("x",a+r/2).attr("y",n).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",c).style("font-weight",p).style("font-family",h);g.append("tspan").attr("dy",y).text(u[t]).attr("alignment-baseline","mathematical"),i(g,o)}}function n(t,a,n,r,s,o,l,c){(o=(a=a.append("switch")).append("foreignObject").attr("x",n).attr("y",r).attr("width",s).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,a,n,r,s,0,l,c),i(o,l)}function i(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return a(t,"byText"),a(e,"byTspan"),a(n,"byFo"),a(i,"_setTextAttrs"),function(a){return"fo"===a.textPlacement?n:"old"===a.textPlacement?t:e}}(),Et={drawRect:st,drawBoundary:ct,drawC4Shape:ht,drawRels:lt,drawImage:ot,insertArrowHead:yt,insertArrowEnd:gt,insertArrowFilledHead:bt,insertDynamicNumber:ft,insertArrowCrossHead:_t,insertDatabaseIcon:dt,insertComputerIcon:pt,insertClockIcon:ut},St=0,At=0,Ct=4,wt=2,vt=(x.yy=rt,{}),Ot=class{static{a(this,"Bounds")}constructor(t){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,kt(t.db.getConfig())}setData(t,e,a,n){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=a,this.nextData.stopy=this.data.stopy=n}updateVal(t,e,a,n){void 0===t[e]?t[e]=a:t[e]=n(a,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,a=e+t.width,n=this.nextData.starty+2*t.margin,i=n+t.height;(e>=this.data.widthLimit||a>=this.data.widthLimit||this.nextData.cnt>Ct)&&(e=this.nextData.startx+t.margin+vt.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=a=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",a,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",a,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){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},kt(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},kt=a((function(t){n(vt,t),t.fontFamily&&(vt.personFontFamily=vt.systemFontFamily=vt.messageFontFamily=t.fontFamily),t.fontSize&&(vt.personFontSize=vt.systemFontSize=vt.messageFontSize=t.fontSize),t.fontWeight&&(vt.personFontWeight=vt.systemFontWeight=vt.messageFontWeight=t.fontWeight)}),"setConf"),Tt=a(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"c4ShapeFont"),Rt=a((t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight})),"boundaryFont"),Dt=a((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont");function Nt(t,e,a,n,i){if(!e[t].width)if(a)e[t].text=h(e[t].text,i,n),e[t].textLines=e[t].text.split(d.lineBreakRegex).length,e[t].width=i,e[t].height=p(e[t].text,n);else{var r;a=e[t].text.split(d.lineBreakRegex);e[t].textLines=a.length,e[t].height=0,e[t].width=0;for(const i of a)e[t].width=Math.max(u(i,n),e[t].width),r=p(i,n),e[t].height=e[t].height+r}}a(Nt,"calcC4ShapeTextWH");var Pt=a((function(t,e,a){e.x=a.data.startx,e.y=a.data.starty,e.width=a.data.stopx-a.data.startx,e.height=a.data.stopy-a.data.starty,e.label.y=vt.c4ShapeMargin-35;a=e.wrap&&vt.wrap;var n=Rt(vt),i=(n.fontSize=n.fontSize+2,n.fontWeight="bold",u(e.label.text,n));Nt("label",e,a,n,i),Et.drawBoundary(t,e,vt)}),"drawBoundary"),Bt=a((function(t,e,a,n){let i=0;for(const c of n){i=0;var r=a[c];switch((s=Tt(vt,r.typeC4Shape.text)).fontSize=s.fontSize-2,r.typeC4Shape.width=u("«"+r.typeC4Shape.text+"»",s),r.typeC4Shape.height=s.fontSize+2,r.typeC4Shape.Y=vt.c4ShapePadding,i=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height);var s=r.wrap&&vt.wrap,o=vt.width-2*vt.c4ShapePadding,l=Tt(vt,r.typeC4Shape.text);l.fontSize=l.fontSize+2,l.fontWeight="bold",Nt("label",r,s,l,o),r.label.Y=i+8,i=r.label.Y+r.label.height,r.type&&""!==r.type.text?(r.type.text="["+r.type.text+"]",Nt("type",r,s,Tt(vt,r.typeC4Shape.text),o),r.type.Y=i+5,i=r.type.Y+r.type.height):r.techn&&""!==r.techn.text&&(r.techn.text="["+r.techn.text+"]",Nt("techn",r,s,Tt(vt,r.techn.text),o),r.techn.Y=i+5,i=r.techn.Y+r.techn.height);let n=i,h=r.label.width;r.descr&&""!==r.descr.text&&(Nt("descr",r,s,Tt(vt,r.typeC4Shape.text),o),r.descr.Y=i+20,i=r.descr.Y+r.descr.height,h=Math.max(r.label.width,r.descr.width),n=i-5*r.descr.textLines),h+=vt.c4ShapePadding,r.width=Math.max(r.width||vt.width,h,vt.width),r.height=Math.max(r.height||vt.height,n,vt.height),r.margin=r.margin||vt.c4ShapeMargin,t.insert(r),Et.drawC4Shape(e,r,vt)}t.bumpLastMargin(vt.c4ShapeMargin)}),"drawC4ShapeArray"),jt=class{static{a(this,"Point")}constructor(t,e){this.x=t,this.y=e}},Mt=a((function(t,e){var a=t.x,n=t.y,i=e.x,r=(e=e.y,a+t.width/2),s=n+t.height/2,o=Math.abs(a-i),l=Math.abs(n-e),c=l/o,h=t.height/t.width;let d=null;return n==e&&a<i?d=new jt(a+t.width,s):n==e&&i<a?d=new jt(a,s):a==i&&n<e?d=new jt(r,n+t.height):a==i&&e<n&&(d=new jt(r,n)),i<a&&n<e?d=c<=h?new jt(a,s+c*t.width/2):new jt(r-o/l*t.height/2,n+t.height):a<i&&n<e?d=c<=h?new jt(a+t.width,s+c*t.width/2):new jt(r+o/l*t.height/2,n+t.height):a<i&&e<n?d=c<=h?new jt(a+t.width,s-c*t.width/2):new jt(r+t.height/2*o/l,n):i<a&&e<n&&(d=c<=h?new jt(a,s-t.width/2*c):new jt(r-t.height/2*o/l,n)),d}),"getIntersectPoint"),It=a((function(t,e){var a={x:0,y:0};return{startPoint:(a.x=e.x+e.width/2,a.y=e.y+e.height/2,Mt(t,a)),endPoint:t=(a.x=t.x+t.width/2,a.y=t.y+t.height/2,Mt(e,a))}}),"getIntersectPoints"),Lt=a((function(t,e,a,n){let i=0;for(var r of e){i+=1;var s=r.wrap&&vt.wrap,o=Dt(vt);"C4Dynamic"===n.db.getC4Type()&&(r.label.text=i+": "+r.label.text);let t=u(r.label.text,o);Nt("label",r,s,o,t),r.techn&&""!==r.techn.text&&(t=u(r.techn.text,o),Nt("techn",r,s,o,t)),r.descr&&""!==r.descr.text&&(t=u(r.descr.text,o),Nt("descr",r,s,o,t)),s=a(r.from),o=a(r.to),s=It(s,o),r.startPoint=s.startPoint,r.endPoint=s.endPoint}Et.drawRels(t,e,vt)}),"drawRels");function Yt(t,e,a,n,i){var r,s,o=new Ot(i);for([r,s]of(o.data.widthLimit=a.data.widthLimit/Math.min(wt,n.length),n.entries())){let n=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=n,n=s.image.Y+s.image.height);var l,c=s.wrap&&vt.wrap;c=((l=Rt(vt)).fontSize=l.fontSize+2,l.fontWeight="bold",Nt("label",s,c,l,o.data.widthLimit),s.label.Y=n+8,n=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",Nt("type",s,c,l=Rt(vt),o.data.widthLimit),s.type.Y=n+5,n=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((l=Rt(vt)).fontSize=l.fontSize-2,Nt("descr",s,c,l,o.data.widthLimit),s.descr.Y=n+20,n=s.descr.Y+s.descr.height),0==r||r%wt==0?(c=a.data.startx+vt.diagramMarginX,l=a.data.stopy+vt.diagramMarginY+n,o.setData(c,c,l,l)):(c=o.data.stopx!==o.data.startx?o.data.stopx+vt.diagramMarginX:o.data.startx,l=o.data.starty,o.setData(c,c,l,l)),o.name=s.alias,i.db.getC4ShapeArray(s.alias));0<(c=(0<(l=i.db.getC4ShapeKeys(s.alias)).length&&Bt(o,t,c,l),e=s.alias,i.db.getBoundaries(e))).length&&Yt(t,e,o,c,i),"global"!==s.alias&&Pt(t,s,o),a.data.stopy=Math.max(o.data.stopy+vt.c4ShapeMargin,a.data.stopy),a.data.stopx=Math.max(o.data.stopx+vt.c4ShapeMargin,a.data.stopx),St=Math.max(St,a.data.stopx),At=Math.max(At,a.data.stopy)}}a(Yt,"drawInsideBoundary");var Ut=a((function(t,e,a,n){let i;vt=l().c4,"sandbox"===(o=l().securityLevel)&&(i=g("#i"+e));var r=g("sandbox"===o?i.nodes()[0].contentDocument.body:"body"),s=n.db,o=(s=(n.db.setWrap(vt.wrap),Ct=s.getC4ShapeInRow(),wt=s.getC4BoundaryInRow(),b.debug("C:"+JSON.stringify(vt,null,2)),"sandbox"===o?r.select(`[id="${e}"]`):g(`[id="${e}"]`)),r=((o=(Et.insertComputerIcon(s),Et.insertDatabaseIcon(s),Et.insertClockIcon(s),new Ot(n))).setData(vt.diagramMarginX,vt.diagramMarginX,vt.diagramMarginY,vt.diagramMarginY),o.data.widthLimit=screen.availWidth,St=vt.diagramMarginX,At=vt.diagramMarginY,n.db.getTitle()),n=(e=(Yt(s,"",o,n.db.getBoundaries(""),n),Et.insertArrowHead(s),Et.insertArrowEnd(s),Et.insertArrowCrossHead(s),Et.insertArrowFilledHead(s),Lt(s,n.db.getRels(),n.db.getC4Shape,n),o.data.stopx=St,o.data.stopy=At,o.data)).stopy-e.starty+2*vt.diagramMarginY,e.stopx-e.startx+2*vt.diagramMarginX);r&&s.append("text").text(r).attr("x",(e.stopx-e.startx)/2-4*vt.diagramMarginX).attr("y",e.starty+vt.diagramMarginY),f(s,n,o,vt.useMaxWidth),r=r?60:0;s.attr("viewBox",e.startx-vt.diagramMarginX+" -"+(vt.diagramMarginY+r)+" "+o+" "+(n+r)),b.debug("models:",e)}),"draw"),Ft={drawPersonOrSystemArray:Bt,drawBoundary:Pt,setConf:kt,draw:Ut},Xt=a((t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`),"getStyles"),zt={parser:E,db:rt,renderer:Ft,styles:Xt,init:a((({c4:t,wrap:e})=>{Ft.setConf(t),rt.setWrap(e)}),"init")};export{zt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t,g as e}from"./chunk-TZMSLE5B-6755c559.js";import{_ as a,a as n,s as i,g as r,b as s,c as o,d as l,w as h,e as d,f as p,h as u,i as y,j as g,l as b,k as f,m as _}from"./web-4e6d8ea9.js";var m,x=function(){var t=a((function(t,e,a,n){for(a=a||{},n=t.length;n--;a[t[n]]=e);return a}),"o"),e=[1,24],n=[1,25],i=[1,26],r=[1,27],s=[1,28],o=[1,63],l=[1,64],h=[1,65],d=[1,66],p=[1,67],u=[1,68],y=[1,69],g=[1,29],b=[1,30],f=[1,31],_=[1,32],m=[1,33],x=[1,34],E=[1,35],S=[1,36],A=[1,37],C=[1,38],w=[1,39],v=[1,40],O=[1,41],k=[1,42],T=[1,43],R=[1,44],D=[1,45],N=[1,46],P=[1,47],B=[1,48],j=[1,50],M=[1,51],I=[1,52],L=[1,53],Y=[1,54],U=[1,55],F=[1,56],X=[1,57],z=[1,58],W=[1,59],Q=[1,60],$=[14,42],H=[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],q=[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],V=[1,82],G=[1,83],K=[1,84],J=[1,85],Z=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],at=[12,33],nt=[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];e={trace:a((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:a((function(t,e,a,n,i,r,s){var o=r.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(r[o-3]);break;case 19:n.setTitle(r[o].substring(6)),this.$=r[o].substring(6);break;case 20:n.setAccDescription(r[o].substring(15)),this.$=r[o].substring(15);break;case 21:this.$=r[o].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=r[o].trim(),n.setAccDescription(this.$);break;case 28:r[o].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...r[o]),this.$=r[o];break;case 29:r[o].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...r[o]),this.$=r[o];break;case 30:n.addPersonOrSystemBoundary(...r[o]),this.$=r[o];break;case 31:r[o].splice(2,0,"CONTAINER"),n.addContainerBoundary(...r[o]),this.$=r[o];break;case 32:n.addDeploymentNode("node",...r[o]),this.$=r[o];break;case 33:n.addDeploymentNode("nodeL",...r[o]),this.$=r[o];break;case 34:n.addDeploymentNode("nodeR",...r[o]),this.$=r[o];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...r[o]),this.$=r[o];break;case 40:n.addPersonOrSystem("external_person",...r[o]),this.$=r[o];break;case 41:n.addPersonOrSystem("system",...r[o]),this.$=r[o];break;case 42:n.addPersonOrSystem("system_db",...r[o]),this.$=r[o];break;case 43:n.addPersonOrSystem("system_queue",...r[o]),this.$=r[o];break;case 44:n.addPersonOrSystem("external_system",...r[o]),this.$=r[o];break;case 45:n.addPersonOrSystem("external_system_db",...r[o]),this.$=r[o];break;case 46:n.addPersonOrSystem("external_system_queue",...r[o]),this.$=r[o];break;case 47:n.addContainer("container",...r[o]),this.$=r[o];break;case 48:n.addContainer("container_db",...r[o]),this.$=r[o];break;case 49:n.addContainer("container_queue",...r[o]),this.$=r[o];break;case 50:n.addContainer("external_container",...r[o]),this.$=r[o];break;case 51:n.addContainer("external_container_db",...r[o]),this.$=r[o];break;case 52:n.addContainer("external_container_queue",...r[o]),this.$=r[o];break;case 53:n.addComponent("component",...r[o]),this.$=r[o];break;case 54:n.addComponent("component_db",...r[o]),this.$=r[o];break;case 55:n.addComponent("component_queue",...r[o]),this.$=r[o];break;case 56:n.addComponent("external_component",...r[o]),this.$=r[o];break;case 57:n.addComponent("external_component_db",...r[o]),this.$=r[o];break;case 58:n.addComponent("external_component_queue",...r[o]),this.$=r[o];break;case 60:n.addRel("rel",...r[o]),this.$=r[o];break;case 61:n.addRel("birel",...r[o]),this.$=r[o];break;case 62:n.addRel("rel_u",...r[o]),this.$=r[o];break;case 63:n.addRel("rel_d",...r[o]),this.$=r[o];break;case 64:n.addRel("rel_l",...r[o]),this.$=r[o];break;case 65:n.addRel("rel_r",...r[o]),this.$=r[o];break;case 66:n.addRel("rel_b",...r[o]),this.$=r[o];break;case 67:r[o].splice(0,1),n.addRel("rel",...r[o]),this.$=r[o];break;case 68:n.updateElStyle("update_el_style",...r[o]),this.$=r[o];break;case 69:n.updateRelStyle("update_rel_style",...r[o]),this.$=r[o];break;case 70:n.updateLayoutConfig("update_layout_config",...r[o]),this.$=r[o];break;case 71:this.$=[r[o]];break;case 72:r[o].unshift(r[o-1]),this.$=r[o];break;case 73:case 75:this.$=r[o].trim();break;case 74:var l={};l[r[o-1].trim()]=r[o].trim(),this.$=l;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:e,23:n,24:i,26:r,28:s,29:49,30:61,32:62,34:o,36:l,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:70,19:20,20:21,21:22,22:e,23:n,24:i,26:r,28:s,29:49,30:61,32:62,34:o,36:l,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:71,19:20,20:21,21:22,22:e,23:n,24:i,26:r,28:s,29:49,30:61,32:62,34:o,36:l,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:72,19:20,20:21,21:22,22:e,23:n,24:i,26:r,28:s,29:49,30:61,32:62,34:o,36:l,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:73,19:20,20:21,21:22,22:e,23:n,24:i,26:r,28:s,29:49,30:61,32:62,34:o,36:l,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{14:[1,74]},t($,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:l,37:h,38:d,39:p,40:u,41:y,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q}),t($,[2,14]),t(H,[2,16],{12:[1,76]}),t($,[2,36],{12:[1,77]}),t(q,[2,19]),t(q,[2,20]),{25:[1,78]},{27:[1,79]},t(q,[2,23]),{35:80,75:81,76:V,77:G,79:K,80:J},{35:86,75:81,76:V,77:G,79:K,80:J},{35:87,75:81,76:V,77:G,79:K,80:J},{35:88,75:81,76:V,77:G,79:K,80:J},{35:89,75:81,76:V,77:G,79:K,80:J},{35:90,75:81,76:V,77:G,79:K,80:J},{35:91,75:81,76:V,77:G,79:K,80:J},{35:92,75:81,76:V,77:G,79:K,80:J},{35:93,75:81,76:V,77:G,79:K,80:J},{35:94,75:81,76:V,77:G,79:K,80:J},{35:95,75:81,76:V,77:G,79:K,80:J},{35:96,75:81,76:V,77:G,79:K,80:J},{35:97,75:81,76:V,77:G,79:K,80:J},{35:98,75:81,76:V,77:G,79:K,80:J},{35:99,75:81,76:V,77:G,79:K,80:J},{35:100,75:81,76:V,77:G,79:K,80:J},{35:101,75:81,76:V,77:G,79:K,80:J},{35:102,75:81,76:V,77:G,79:K,80:J},{35:103,75:81,76:V,77:G,79:K,80:J},{35:104,75:81,76:V,77:G,79:K,80:J},t(Z,[2,59]),{35:105,75:81,76:V,77:G,79:K,80:J},{35:106,75:81,76:V,77:G,79:K,80:J},{35:107,75:81,76:V,77:G,79:K,80:J},{35:108,75:81,76:V,77:G,79:K,80:J},{35:109,75:81,76:V,77:G,79:K,80:J},{35:110,75:81,76:V,77:G,79:K,80:J},{35:111,75:81,76:V,77:G,79:K,80:J},{35:112,75:81,76:V,77:G,79:K,80:J},{35:113,75:81,76:V,77:G,79:K,80:J},{35:114,75:81,76:V,77:G,79:K,80:J},{35:115,75:81,76:V,77:G,79:K,80:J},{20:116,29:49,30:61,32:62,34:o,36:l,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{12:[1,118],33:[1,117]},{35:119,75:81,76:V,77:G,79:K,80:J},{35:120,75:81,76:V,77:G,79:K,80:J},{35:121,75:81,76:V,77:G,79:K,80:J},{35:122,75:81,76:V,77:G,79:K,80:J},{35:123,75:81,76:V,77:G,79:K,80:J},{35:124,75:81,76:V,77:G,79:K,80:J},{35:125,75:81,76:V,77:G,79:K,80:J},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t($,[2,15]),t(H,[2,17],{21:22,19:130,22:e,23:n,24:i,26:r,28:s}),t($,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:n,24:i,26:r,28:s,34:o,36:l,37:h,38:d,39:p,40:u,41:y,44:g,45:b,46:f,47:_,48:m,49:x,50:E,51:S,52:A,53:C,54:w,55:v,56:O,57:k,58:T,59:R,60:D,61:N,62:P,63:B,64:j,65:M,66:I,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q}),t(q,[2,21]),t(q,[2,22]),t(Z,[2,39]),t(tt,[2,71],{75:81,35:132,76:V,77:G,79:K,80:J}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(Z,[2,40]),t(Z,[2,41]),t(Z,[2,42]),t(Z,[2,43]),t(Z,[2,44]),t(Z,[2,45]),t(Z,[2,46]),t(Z,[2,47]),t(Z,[2,48]),t(Z,[2,49]),t(Z,[2,50]),t(Z,[2,51]),t(Z,[2,52]),t(Z,[2,53]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(Z,[2,58]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,64]),t(Z,[2,65]),t(Z,[2,66]),t(Z,[2,67]),t(Z,[2,68]),t(Z,[2,69]),t(Z,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(at,[2,28]),t(at,[2,29]),t(at,[2,30]),t(at,[2,31]),t(at,[2,32]),t(at,[2,33]),t(at,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(H,[2,18]),t($,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(Z,[2,24]),t(Z,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[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:a((function(t,e){var a;if(!e.recoverable)throw(a=new Error(t)).hash=e,a;this.trace(t)}),"parseError"),parse:a((function(t){var e,n=this,i=[0],r=[],s=[null],o=[],l=this.table,c="",h=0,d=0,p=o.slice.call(arguments,1),u=Object.create(this.lexer),y={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(y.yy[e]=this.yy[e]);u.setInput(t,y.yy),y.yy.lexer=u,y.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var g=u.yylloc,b=(o.push(g),u.options&&u.options.ranges);function f(){var t=r.pop()||u.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(r=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a((function(t){i.length=i.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),a(f,"lex");for(var _,m,x,E,S,A,C={};;){if(m=i[i.length-1],void 0===(x=this.defaultActions[m]||(null==_&&(_=f()),l[m]&&l[m][_]))||!x.length||!x[0]){var w,v=[];for(E in l[m])this.terminals_[E]&&2<E&&v.push("'"+this.terminals_[E]+"'");w=u.showPosition?"Parse error on line "+(h+1)+":\n"+u.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(w,{text:u.match,token:this.terminals_[_]||_,line:u.yylineno,loc:g,expected:v})}if(x[0]instanceof Array&&1<x.length)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+_);switch(x[0]){case 1:i.push(_),s.push(u.yytext),o.push(u.yylloc),i.push(x[1]),_=null,d=u.yyleng,c=u.yytext,h=u.yylineno,g=u.yylloc;break;case 2:if(S=this.productions_[x[1]][1],C.$=s[s.length-S],C._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},b&&(C._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(A=this.performAction.apply(C,[c,d,h,y.yy,x[1],s,o].concat(p))))return A;S&&(i=i.slice(0,-1*S*2),s=s.slice(0,-1*S),o=o.slice(0,-1*S)),i.push(this.productions_[x[1]][0]),s.push(C.$),o.push(C._$),A=l[i[i.length-2]][i[i.length-1]],i.push(A);break;case 3:return!0}}return!0}),"parse")},n={EOF:1,parseError:a((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:a((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:a((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:a((function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g),n=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),a.length-1&&(this.yylineno-=a.length-1),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:a?(a.length===t.length?this.yylloc.first_column:0)+t[t.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:a((function(){return this._more=!0,this}),"more"),reject:a((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:a((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:a((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:a((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:a((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:a((function(t,e){var a,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var i in n)this[i]=n[i];return!1}),"test_match"),next:a((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,a,n,i=this._currentRules(),r=0;r<i.length;r++)if((a=this._input.match(this.rules[i[r]]))&&(!e||a[0].length>e[0].length))if(e=a,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[r])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:a((function(){return this.next()||this.lex()}),"lex"),begin:a((function(t){this.conditionStack.push(t)}),"begin"),popState:a((function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:a((function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:a((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:a((function(t){this.begin(t)}),"pushState"),stateStackSize:a((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:a((function(t,e,a,n){switch(a){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:[],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 it(){this.yy={}}return e.lexer=n,a(it,"Parser"),new((it.prototype=e).Parser=it)}(),E=x.parser=x,S=[],A=[""],C="global",w="",v=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],O=[],k="",T=!1,R=4,D=2,N=a((function(){return m}),"getC4Type"),P=a((function(t){t=y(t,l()),m=t}),"setC4Type"),B=a((function(t,e,a,n,i,r,s,o,l){if(null!=t&&null!=e&&null!=a&&null!=n){let h={};var c=O.find((t=>t.from===e&&t.to===a));c?h=c:O.push(h),h.type=t,h.from=e,h.to=a,h.label={text:n},null==i?h.techn={text:""}:"object"==typeof i?([c,t]=Object.entries(i)[0],h[c]={text:t}):h.techn={text:i},null==r?h.descr={text:""}:"object"==typeof r?([n,c]=Object.entries(r)[0],h[n]={text:c}):h.descr={text:r},"object"==typeof s?([t,i]=Object.entries(s)[0],h[t]=i):h.sprite=s,"object"==typeof o?([n,c]=Object.entries(o)[0],h[n]=c):h.tags=o,"object"==typeof l?([r,t]=Object.entries(l)[0],h[r]=t):h.link=l,h.wrap=at()}}),"addRel"),j=a((function(t,e,a,n,i,r,s){if(null!==e&&null!==a){let l={};var o=S.find((t=>t.alias===e));o&&e===o.alias?l=o:(l.alias=e,S.push(l)),l.label=null==a?{text:""}:{text:a},null==n?l.descr={text:""}:"object"==typeof n?([o,a]=Object.entries(n)[0],l[o]={text:a}):l.descr={text:n},"object"==typeof i?([o,a]=Object.entries(i)[0],l[o]=a):l.sprite=i,"object"==typeof r?([n,o]=Object.entries(r)[0],l[n]=o):l.tags=r,"object"==typeof s?([a,i]=Object.entries(s)[0],l[a]=i):l.link=s,l.typeC4Shape={text:t},l.parentBoundary=C,l.wrap=at()}}),"addPersonOrSystem"),M=a((function(t,e,a,n,i,r,s,o){if(null!==e&&null!==a){let c={};var l=S.find((t=>t.alias===e));l&&e===l.alias?c=l:(c.alias=e,S.push(c)),c.label=null==a?{text:""}:{text:a},null==n?c.techn={text:""}:"object"==typeof n?([l,a]=Object.entries(n)[0],c[l]={text:a}):c.techn={text:n},null==i?c.descr={text:""}:"object"==typeof i?([l,a]=Object.entries(i)[0],c[l]={text:a}):c.descr={text:i},"object"==typeof r?([n,l]=Object.entries(r)[0],c[n]=l):c.sprite=r,"object"==typeof s?([a,i]=Object.entries(s)[0],c[a]=i):c.tags=s,"object"==typeof o?([n,l]=Object.entries(o)[0],c[n]=l):c.link=o,c.wrap=at(),c.typeC4Shape={text:t},c.parentBoundary=C}}),"addContainer"),I=a((function(t,e,a,n,i,r,s,o){if(null!==e&&null!==a){let c={};var l=S.find((t=>t.alias===e));l&&e===l.alias?c=l:(c.alias=e,S.push(c)),c.label=null==a?{text:""}:{text:a},null==n?c.techn={text:""}:"object"==typeof n?([l,a]=Object.entries(n)[0],c[l]={text:a}):c.techn={text:n},null==i?c.descr={text:""}:"object"==typeof i?([l,a]=Object.entries(i)[0],c[l]={text:a}):c.descr={text:i},"object"==typeof r?([n,l]=Object.entries(r)[0],c[n]=l):c.sprite=r,"object"==typeof s?([a,i]=Object.entries(s)[0],c[a]=i):c.tags=s,"object"==typeof o?([n,l]=Object.entries(o)[0],c[n]=l):c.link=o,c.wrap=at(),c.typeC4Shape={text:t},c.parentBoundary=C}}),"addComponent"),L=a((function(t,e,a,n,i){if(null!==t&&null!==e){let s={};var r=v.find((e=>e.alias===t));r&&t===r.alias?s=r:(s.alias=t,v.push(s)),s.label=null==e?{text:""}:{text:e},null==a?s.type={text:"system"}:"object"==typeof a?([r,e]=Object.entries(a)[0],s[r]={text:e}):s.type={text:a},"object"==typeof n?([r,e]=Object.entries(n)[0],s[r]=e):s.tags=n,"object"==typeof i?([a,r]=Object.entries(i)[0],s[a]=r):s.link=i,s.parentBoundary=C,s.wrap=at(),w=C,C=t,A.push(w)}}),"addPersonOrSystemBoundary"),Y=a((function(t,e,a,n,i){if(null!==t&&null!==e){let s={};var r=v.find((e=>e.alias===t));r&&t===r.alias?s=r:(s.alias=t,v.push(s)),s.label=null==e?{text:""}:{text:e},null==a?s.type={text:"container"}:"object"==typeof a?([r,e]=Object.entries(a)[0],s[r]={text:e}):s.type={text:a},"object"==typeof n?([r,e]=Object.entries(n)[0],s[r]=e):s.tags=n,"object"==typeof i?([a,r]=Object.entries(i)[0],s[a]=r):s.link=i,s.parentBoundary=C,s.wrap=at(),w=C,C=t,A.push(w)}}),"addContainerBoundary"),U=a((function(t,e,a,n,i,r,s,o){if(null!==e&&null!==a){let r={};var l=v.find((t=>t.alias===e));l&&e===l.alias?r=l:(r.alias=e,v.push(r)),r.label=null==a?{text:""}:{text:a},null==n?r.type={text:"node"}:"object"==typeof n?([l,a]=Object.entries(n)[0],r[l]={text:a}):r.type={text:n},null==i?r.descr={text:""}:"object"==typeof i?([l,a]=Object.entries(i)[0],r[l]={text:a}):r.descr={text:i},"object"==typeof s?([n,l]=Object.entries(s)[0],r[n]=l):r.tags=s,"object"==typeof o?([a,i]=Object.entries(o)[0],r[a]=i):r.link=o,r.nodeType=t,r.parentBoundary=C,r.wrap=at(),w=C,C=e,A.push(w)}}),"addDeploymentNode"),F=a((function(){C=w,A.pop(),w=A.pop(),A.push(w)}),"popBoundaryParseStack"),X=a((function(t,e,a,n,i,r,s,o,l,c,h){let d=S.find((t=>t.alias===e));var p,u;void 0===d&&void 0===(d=v.find((t=>t.alias===e)))||(null!=a&&("object"==typeof a?([u,p]=Object.entries(a)[0],d[u]=p):d.bgColor=a),null!=n&&("object"==typeof n?([u,p]=Object.entries(n)[0],d[u]=p):d.fontColor=n),null!=i&&("object"==typeof i?([a,u]=Object.entries(i)[0],d[a]=u):d.borderColor=i),null!=r&&("object"==typeof r?([p,n]=Object.entries(r)[0],d[p]=n):d.shadowing=r),null!=s&&("object"==typeof s?([a,u]=Object.entries(s)[0],d[a]=u):d.shape=s),null!=o&&("object"==typeof o?([i,p]=Object.entries(o)[0],d[i]=p):d.sprite=o),null!=l&&("object"==typeof l?([n,r]=Object.entries(l)[0],d[n]=r):d.techn=l),null!=c&&("object"==typeof c?([a,u]=Object.entries(c)[0],d[a]=u):d.legendText=c),null!=h&&("object"==typeof h?([s,i]=Object.entries(h)[0],d[s]=i):d.legendSprite=h))}),"updateElStyle"),z=a((function(t,e,a,n,i,r,s){var o,l,c=O.find((t=>t.from===e&&t.to===a));void 0!==c&&(null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.textColor=n),null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.lineColor=i),null!=r&&("object"==typeof r?([n,o]=Object.entries(r)[0],c[n]=parseInt(o)):c.offsetX=parseInt(r)),null!=s)&&("object"==typeof s?([l,i]=Object.entries(s)[0],c[l]=parseInt(i)):c.offsetY=parseInt(s))}),"updateRelStyle"),W=a((function(t,e,a){let n=R,i=D;var r;n="object"==typeof e?(r=Object.values(e)[0],parseInt(r)):parseInt(e),i="object"==typeof a?(r=Object.values(a)[0],parseInt(r)):parseInt(a),1<=n&&(R=n),1<=i&&(D=i)}),"updateLayoutConfig"),Q=a((function(){return R}),"getC4ShapeInRow"),$=a((function(){return D}),"getC4BoundaryInRow"),H=a((function(){return C}),"getCurrentBoundaryParse"),q=a((function(){return w}),"getParentBoundaryParse"),V=a((function(t){return null==t?S:S.filter((e=>e.parentBoundary===t))}),"getC4ShapeArray"),G=a((function(t){return S.find((e=>e.alias===t))}),"getC4Shape"),K=a((function(t){return Object.keys(V(t))}),"getC4ShapeKeys"),J=a((function(t){return null==t?v:v.filter((e=>e.parentBoundary===t))}),"getBoundaries"),Z=a((function(){return O}),"getRels"),tt=a((function(){return k}),"getTitle"),et=a((function(t){T=t}),"setWrap"),at=a((function(){return T}),"autoWrap"),nt=a((function(){S=[],v=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],C="global",A=[w=""],O=[],T=!(A=[k=""]),R=4,D=2}),"clear"),it=a((function(t){t=y(t,l()),k=t}),"setTitle"),rt={addPersonOrSystem:j,addPersonOrSystemBoundary:L,addContainer:M,addContainerBoundary:Y,addComponent:I,addDeploymentNode:U,popBoundaryParseStack:F,addRel:B,updateElStyle:X,updateRelStyle:z,updateLayoutConfig:W,autoWrap:at,setWrap:et,getC4ShapeArray:V,getC4Shape:G,getC4ShapeKeys:K,getBoundaries:J,getBoundarys:J,getCurrentBoundaryParse:H,getParentBoundaryParse:q,getRels:Z,getTitle:tt,getC4Type:N,getC4ShapeInRow:Q,getC4BoundaryInRow:$,setAccTitle:i,getAccTitle:r,getAccDescription:s,setAccDescription:o,getConfig:a((()=>l().c4),"getConfig"),clear:nt,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:it,setC4Type:P},st=a((function(e,a){return t(e,a)}),"drawRect"),ot=a((function(t,e,a,n,i,r){(t=t.append("image")).attr("width",e),t.attr("height",a),t.attr("x",n),t.attr("y",i),e=r.startsWith("data:image/png;base64")?r:_(r),t.attr("xlink:href",e)}),"drawImage"),lt=a(((t,e,a)=>{var n,i=t.append("g");let r=0;for(n of e){var s,o=n.textColor||"#444444",l=n.lineColor||"#444444",c=n.offsetX?parseInt(n.offsetX):0,h=n.offsetY?parseInt(n.offsetY):0;l=(0===r?((s=i.append("line")).attr("x1",n.startPoint.x),s.attr("y1",n.startPoint.y),s.attr("x2",n.endPoint.x),s.attr("y2",n.endPoint.y),s.attr("stroke-width","1"),s.attr("stroke",l),s.style("fill","none"),"rel_b"!==n.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==n.type&&"rel_b"!==n.type||s.attr("marker-start","url(#arrowend)"),r=-1):((s=i.append("path")).attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",n.startPoint.x).replaceAll("starty",n.startPoint.y).replaceAll("controlx",n.startPoint.x+(n.endPoint.x-n.startPoint.x)/2-(n.endPoint.x-n.startPoint.x)/4).replaceAll("controly",n.startPoint.y+(n.endPoint.y-n.startPoint.y)/2).replaceAll("stopx",n.endPoint.x).replaceAll("stopy",n.endPoint.y)),"rel_b"!==n.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==n.type&&"rel_b"!==n.type||s.attr("marker-start","url(#arrowend)")),a.messageFont());xt(a)(n.label.text,i,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+c,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+h,n.label.width,n.label.height,{fill:o},l),n.techn&&""!==n.techn.text&&(l=a.messageFont(),xt(a)("["+n.techn.text+"]",i,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+c,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+a.messageFontSize+5+h,Math.max(n.label.width,n.techn.width),n.techn.height,{fill:o,"font-style":"italic"},l))}}),"drawRels"),ct=a((function(t,e,a){t=t.append("g");var n=e.bgColor||"none",i=e.borderColor||"#444444",r=e.fontColor||"black";let s={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(s={"stroke-width":1}),n={x:e.x,y:e.y,fill:n,stroke:i,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:s},st(t,n);let o=a.boundaryFont();o.fontWeight="bold",o.fontSize=o.fontSize+2,o.fontColor=r,xt(a)(e.label.text,t,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},o),e.type&&""!==e.type.text&&((o=a.boundaryFont()).fontColor=r,xt(a)(e.type.text,t,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},o)),e.descr&&""!==e.descr.text&&((o=a.boundaryFont()).fontSize=o.fontSize-2,o.fontColor=r,xt(a)(e.descr.text,t,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},o))}),"drawBoundary"),ht=a((function(t,a,n){var i=a.bgColor||n[a.typeC4Shape.text+"_bg_color"],r=a.borderColor||n[a.typeC4Shape.text+"_border_color"],s=a.fontColor||"#FFFFFF";let o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(a.typeC4Shape.text){case"person":o="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":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}var l=t.append("g"),c=(l.attr("class","person-man"),e());switch(a.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":c.x=a.x,c.y=a.y,c.fill=i,c.width=a.width,c.height=a.height,c.stroke=r,c.rx=2.5,c.ry=2.5,c.attrs={"stroke-width":.5},st(l,c);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).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",a.x).replaceAll("starty",a.y).replaceAll("half",a.width/2).replaceAll("height",a.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",a.x).replaceAll("starty",a.y).replaceAll("half",a.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).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",a.x).replaceAll("starty",a.y).replaceAll("width",a.width).replaceAll("half",a.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",a.x+a.width).replaceAll("starty",a.y).replaceAll("half",a.height/2))}switch(t=mt(n,a.typeC4Shape.text),l.append("text").attr("fill",s).attr("font-family",t.fontFamily).attr("font-size",t.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",a.typeC4Shape.width).attr("x",a.x+a.width/2-a.typeC4Shape.width/2).attr("y",a.y+a.typeC4Shape.Y).text("<<"+a.typeC4Shape.text+">>"),a.typeC4Shape.text){case"person":case"external_person":ot(l,48,48,a.x+a.width/2-24,a.y+a.image.Y,o)}let h=n[a.typeC4Shape.text+"Font"]();return h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=s,xt(n)(a.label.text,l,a.x,a.y+a.label.Y,a.width,a.height,{fill:s},h),(h=n[a.typeC4Shape.text+"Font"]()).fontColor=s,a.techn&&""!==a.techn?.text?xt(n)(a.techn.text,l,a.x,a.y+a.techn.Y,a.width,a.height,{fill:s,"font-style":"italic"},h):a.type&&""!==a.type.text&&xt(n)(a.type.text,l,a.x,a.y+a.type.Y,a.width,a.height,{fill:s,"font-style":"italic"},h),a.descr&&""!==a.descr.text&&((h=n.personFont()).fontColor=s,xt(n)(a.descr.text,l,a.x,a.y+a.descr.Y,a.width,a.height,{fill:s},h)),a.height}),"drawC4Shape"),dt=a((function(t){t.append("defs").append("symbol").attr("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"),pt=a((function(t){t.append("defs").append("symbol").attr("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"),ut=a((function(t){t.append("defs").append("symbol").attr("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"),yt=a((function(t){t.append("defs").append("marker").attr("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"),gt=a((function(t){t.append("defs").append("marker").attr("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"),bt=a((function(t){t.append("defs").append("marker").attr("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"),ft=a((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertDynamicNumber"),_t=a((function(t){(t=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4)).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"),t.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"),mt=a(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"getC4ShapeFont"),xt=function(){function t(t,e,a,n,r,s,o){i(e.append("text").attr("x",a+r/2).attr("y",n+s/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,n,r,s,o,l){var{fontSize:c,fontFamily:h,fontWeight:p}=l,u=t.split(d.lineBreakRegex);for(let t=0;t<u.length;t++){var y=t*c-c*(u.length-1)/2,g=e.append("text").attr("x",a+r/2).attr("y",n).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",c).style("font-weight",p).style("font-family",h);g.append("tspan").attr("dy",y).text(u[t]).attr("alignment-baseline","mathematical"),i(g,o)}}function n(t,a,n,r,s,o,l,c){(o=(a=a.append("switch")).append("foreignObject").attr("x",n).attr("y",r).attr("width",s).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,a,n,r,s,0,l,c),i(o,l)}function i(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return a(t,"byText"),a(e,"byTspan"),a(n,"byFo"),a(i,"_setTextAttrs"),function(a){return"fo"===a.textPlacement?n:"old"===a.textPlacement?t:e}}(),Et={drawRect:st,drawBoundary:ct,drawC4Shape:ht,drawRels:lt,drawImage:ot,insertArrowHead:yt,insertArrowEnd:gt,insertArrowFilledHead:bt,insertDynamicNumber:ft,insertArrowCrossHead:_t,insertDatabaseIcon:dt,insertComputerIcon:pt,insertClockIcon:ut},St=0,At=0,Ct=4,wt=2,vt=(x.yy=rt,{}),Ot=class{static{a(this,"Bounds")}constructor(t){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,kt(t.db.getConfig())}setData(t,e,a,n){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=a,this.nextData.stopy=this.data.stopy=n}updateVal(t,e,a,n){void 0===t[e]?t[e]=a:t[e]=n(a,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,a=e+t.width,n=this.nextData.starty+2*t.margin,i=n+t.height;(e>=this.data.widthLimit||a>=this.data.widthLimit||this.nextData.cnt>Ct)&&(e=this.nextData.startx+t.margin+vt.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=a=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",a,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",a,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){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},kt(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},kt=a((function(t){n(vt,t),t.fontFamily&&(vt.personFontFamily=vt.systemFontFamily=vt.messageFontFamily=t.fontFamily),t.fontSize&&(vt.personFontSize=vt.systemFontSize=vt.messageFontSize=t.fontSize),t.fontWeight&&(vt.personFontWeight=vt.systemFontWeight=vt.messageFontWeight=t.fontWeight)}),"setConf"),Tt=a(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"c4ShapeFont"),Rt=a((t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight})),"boundaryFont"),Dt=a((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont");function Nt(t,e,a,n,i){if(!e[t].width)if(a)e[t].text=h(e[t].text,i,n),e[t].textLines=e[t].text.split(d.lineBreakRegex).length,e[t].width=i,e[t].height=p(e[t].text,n);else{var r;a=e[t].text.split(d.lineBreakRegex);e[t].textLines=a.length,e[t].height=0,e[t].width=0;for(const i of a)e[t].width=Math.max(u(i,n),e[t].width),r=p(i,n),e[t].height=e[t].height+r}}a(Nt,"calcC4ShapeTextWH");var Pt=a((function(t,e,a){e.x=a.data.startx,e.y=a.data.starty,e.width=a.data.stopx-a.data.startx,e.height=a.data.stopy-a.data.starty,e.label.y=vt.c4ShapeMargin-35;a=e.wrap&&vt.wrap;var n=Rt(vt),i=(n.fontSize=n.fontSize+2,n.fontWeight="bold",u(e.label.text,n));Nt("label",e,a,n,i),Et.drawBoundary(t,e,vt)}),"drawBoundary"),Bt=a((function(t,e,a,n){let i=0;for(const c of n){i=0;var r=a[c];switch((s=Tt(vt,r.typeC4Shape.text)).fontSize=s.fontSize-2,r.typeC4Shape.width=u("«"+r.typeC4Shape.text+"»",s),r.typeC4Shape.height=s.fontSize+2,r.typeC4Shape.Y=vt.c4ShapePadding,i=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height);var s=r.wrap&&vt.wrap,o=vt.width-2*vt.c4ShapePadding,l=Tt(vt,r.typeC4Shape.text);l.fontSize=l.fontSize+2,l.fontWeight="bold",Nt("label",r,s,l,o),r.label.Y=i+8,i=r.label.Y+r.label.height,r.type&&""!==r.type.text?(r.type.text="["+r.type.text+"]",Nt("type",r,s,Tt(vt,r.typeC4Shape.text),o),r.type.Y=i+5,i=r.type.Y+r.type.height):r.techn&&""!==r.techn.text&&(r.techn.text="["+r.techn.text+"]",Nt("techn",r,s,Tt(vt,r.techn.text),o),r.techn.Y=i+5,i=r.techn.Y+r.techn.height);let n=i,h=r.label.width;r.descr&&""!==r.descr.text&&(Nt("descr",r,s,Tt(vt,r.typeC4Shape.text),o),r.descr.Y=i+20,i=r.descr.Y+r.descr.height,h=Math.max(r.label.width,r.descr.width),n=i-5*r.descr.textLines),h+=vt.c4ShapePadding,r.width=Math.max(r.width||vt.width,h,vt.width),r.height=Math.max(r.height||vt.height,n,vt.height),r.margin=r.margin||vt.c4ShapeMargin,t.insert(r),Et.drawC4Shape(e,r,vt)}t.bumpLastMargin(vt.c4ShapeMargin)}),"drawC4ShapeArray"),jt=class{static{a(this,"Point")}constructor(t,e){this.x=t,this.y=e}},Mt=a((function(t,e){var a=t.x,n=t.y,i=e.x,r=(e=e.y,a+t.width/2),s=n+t.height/2,o=Math.abs(a-i),l=Math.abs(n-e),c=l/o,h=t.height/t.width;let d=null;return n==e&&a<i?d=new jt(a+t.width,s):n==e&&i<a?d=new jt(a,s):a==i&&n<e?d=new jt(r,n+t.height):a==i&&e<n&&(d=new jt(r,n)),i<a&&n<e?d=c<=h?new jt(a,s+c*t.width/2):new jt(r-o/l*t.height/2,n+t.height):a<i&&n<e?d=c<=h?new jt(a+t.width,s+c*t.width/2):new jt(r+o/l*t.height/2,n+t.height):a<i&&e<n?d=c<=h?new jt(a+t.width,s-c*t.width/2):new jt(r+t.height/2*o/l,n):i<a&&e<n&&(d=c<=h?new jt(a,s-t.width/2*c):new jt(r-t.height/2*o/l,n)),d}),"getIntersectPoint"),It=a((function(t,e){var a={x:0,y:0};return{startPoint:(a.x=e.x+e.width/2,a.y=e.y+e.height/2,Mt(t,a)),endPoint:t=(a.x=t.x+t.width/2,a.y=t.y+t.height/2,Mt(e,a))}}),"getIntersectPoints"),Lt=a((function(t,e,a,n){let i=0;for(var r of e){i+=1;var s=r.wrap&&vt.wrap,o=Dt(vt);"C4Dynamic"===n.db.getC4Type()&&(r.label.text=i+": "+r.label.text);let t=u(r.label.text,o);Nt("label",r,s,o,t),r.techn&&""!==r.techn.text&&(t=u(r.techn.text,o),Nt("techn",r,s,o,t)),r.descr&&""!==r.descr.text&&(t=u(r.descr.text,o),Nt("descr",r,s,o,t)),s=a(r.from),o=a(r.to),s=It(s,o),r.startPoint=s.startPoint,r.endPoint=s.endPoint}Et.drawRels(t,e,vt)}),"drawRels");function Yt(t,e,a,n,i){var r,s,o=new Ot(i);for([r,s]of(o.data.widthLimit=a.data.widthLimit/Math.min(wt,n.length),n.entries())){let n=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=n,n=s.image.Y+s.image.height);var l,c=s.wrap&&vt.wrap;c=((l=Rt(vt)).fontSize=l.fontSize+2,l.fontWeight="bold",Nt("label",s,c,l,o.data.widthLimit),s.label.Y=n+8,n=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",Nt("type",s,c,l=Rt(vt),o.data.widthLimit),s.type.Y=n+5,n=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((l=Rt(vt)).fontSize=l.fontSize-2,Nt("descr",s,c,l,o.data.widthLimit),s.descr.Y=n+20,n=s.descr.Y+s.descr.height),0==r||r%wt==0?(c=a.data.startx+vt.diagramMarginX,l=a.data.stopy+vt.diagramMarginY+n,o.setData(c,c,l,l)):(c=o.data.stopx!==o.data.startx?o.data.stopx+vt.diagramMarginX:o.data.startx,l=o.data.starty,o.setData(c,c,l,l)),o.name=s.alias,i.db.getC4ShapeArray(s.alias));0<(c=(0<(l=i.db.getC4ShapeKeys(s.alias)).length&&Bt(o,t,c,l),e=s.alias,i.db.getBoundaries(e))).length&&Yt(t,e,o,c,i),"global"!==s.alias&&Pt(t,s,o),a.data.stopy=Math.max(o.data.stopy+vt.c4ShapeMargin,a.data.stopy),a.data.stopx=Math.max(o.data.stopx+vt.c4ShapeMargin,a.data.stopx),St=Math.max(St,a.data.stopx),At=Math.max(At,a.data.stopy)}}a(Yt,"drawInsideBoundary");var Ut=a((function(t,e,a,n){let i;vt=l().c4,"sandbox"===(o=l().securityLevel)&&(i=g("#i"+e));var r=g("sandbox"===o?i.nodes()[0].contentDocument.body:"body"),s=n.db,o=(s=(n.db.setWrap(vt.wrap),Ct=s.getC4ShapeInRow(),wt=s.getC4BoundaryInRow(),b.debug("C:"+JSON.stringify(vt,null,2)),"sandbox"===o?r.select(`[id="${e}"]`):g(`[id="${e}"]`)),r=((o=(Et.insertComputerIcon(s),Et.insertDatabaseIcon(s),Et.insertClockIcon(s),new Ot(n))).setData(vt.diagramMarginX,vt.diagramMarginX,vt.diagramMarginY,vt.diagramMarginY),o.data.widthLimit=screen.availWidth,St=vt.diagramMarginX,At=vt.diagramMarginY,n.db.getTitle()),n=(e=(Yt(s,"",o,n.db.getBoundaries(""),n),Et.insertArrowHead(s),Et.insertArrowEnd(s),Et.insertArrowCrossHead(s),Et.insertArrowFilledHead(s),Lt(s,n.db.getRels(),n.db.getC4Shape,n),o.data.stopx=St,o.data.stopy=At,o.data)).stopy-e.starty+2*vt.diagramMarginY,e.stopx-e.startx+2*vt.diagramMarginX);r&&s.append("text").text(r).attr("x",(e.stopx-e.startx)/2-4*vt.diagramMarginX).attr("y",e.starty+vt.diagramMarginY),f(s,n,o,vt.useMaxWidth),r=r?60:0;s.attr("viewBox",e.startx-vt.diagramMarginX+" -"+(vt.diagramMarginY+r)+" "+o+" "+(n+r)),b.debug("models:",e)}),"draw"),Ft={drawPersonOrSystemArray:Bt,drawBoundary:Pt,setConf:kt,draw:Ut},Xt=a((t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`),"getStyles"),zt={parser:E,db:rt,renderer:Ft,styles:Xt,init:a((({c4:t,wrap:e})=>{Ft.setConf(t),rt.setWrap(e)}),"init")};export{zt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ap as a,aq as r}from"./web-0016ac81.js";var s=(s,o)=>a.lang.round(r.parse(s)[o]);export{s as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ap as a,aq as r}from"./web-4e6d8ea9.js";var s=(s,o)=>a.lang.round(r.parse(s)[o]);export{s as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as c}from"./web-0016ac81.js";function t(c,t){c.accDescr&&t.setAccDescription?.(c.accDescr),c.accTitle&&t.setAccTitle?.(c.accTitle),c.title&&t.setDiagramTitle?.(c.title)}c(t,"populateCommonDb");export{t as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as c}from"./web-4e6d8ea9.js";function t(c,t){c.accDescr&&t.setAccDescription?.(c.accDescr),c.accTitle&&t.setAccTitle?.(c.accTitle),c.title&&t.setDiagramTitle?.(c.title)}c(t,"populateCommonDb");export{t as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,j as o}from"./web-0016ac81.js";var t=e(((e,t)=>{let a;return"sandbox"===t&&(a=o("#i"+e)),o("sandbox"===t?a.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)}),"getDiagramElement");export{t as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,j as o}from"./web-4e6d8ea9.js";var t=e(((e,t)=>{let a;return"sandbox"===t&&(a=o("#i"+e)),o("sandbox"===t?a.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)}),"getDiagramElement");export{t as g};
|