@spteck/react-controls-v2 2.2.8 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_arrayEach-Bpca_7LJ.js → _arrayEach-8mS77K-T.js} +2 -2
- package/dist/{_arrayEach-DOL-P2QE.cjs → _arrayEach-BtnPcZvU.cjs} +2 -2
- package/dist/abstractions/IBrandCenterFonts.d.ts +33 -0
- package/dist/abstractions/index.d.ts +1 -0
- package/dist/{arc-DTzaPsdm.js → arc-5yDizpVi.js} +2 -2
- package/dist/{arc-WEST6KHn.cjs → arc-CHX8tzAa.cjs} +2 -2
- package/dist/{architecture-7HQA4BMR-CtBlJP9y.cjs → architecture-7HQA4BMR-C5SMaY7N.cjs} +2 -2
- package/dist/architecture-7HQA4BMR-QRAO6LZs.js +6 -0
- package/dist/{architectureDiagram-VXUJARFQ-CSqOUGQP.cjs → architectureDiagram-VXUJARFQ-BGkw31EW.cjs} +2 -2
- package/dist/{architectureDiagram-VXUJARFQ-DFzpbSmI.js → architectureDiagram-VXUJARFQ-aOTrDewq.js} +4 -4
- package/dist/{blockDiagram-VD42YOAC-Pg0vRrcx.cjs → blockDiagram-VD42YOAC-B-_xQI8-.cjs} +2 -2
- package/dist/{blockDiagram-VD42YOAC-CX5LBwDa.js → blockDiagram-VD42YOAC-BmLAe2UB.js} +5 -5
- package/dist/{c4Diagram-YG6GDRKO-D-rL6HFc.cjs → c4Diagram-YG6GDRKO-B-1eU6OG.cjs} +2 -2
- package/dist/{c4Diagram-YG6GDRKO-BB3LBIG5.js → c4Diagram-YG6GDRKO-BLrKS_53.js} +3 -3
- package/dist/{channel-C7sRieNj.js → channel-BlDl0fWH.js} +2 -2
- package/dist/channel-CavBJovq.cjs +2 -0
- package/dist/{chunk-4BX2VUAB-DQp-pCKe.cjs → chunk-4BX2VUAB-BPQfw6VK.cjs} +2 -2
- package/dist/{chunk-4BX2VUAB-D02TzcI2.js → chunk-4BX2VUAB-BhTmbZ0P.js} +2 -2
- package/dist/{chunk-55IACEB6-D7cA0QIy.js → chunk-55IACEB6-BFvNZWL0.js} +2 -2
- package/dist/{chunk-55IACEB6-J7KQbrr6.cjs → chunk-55IACEB6-CBWgQHsL.cjs} +2 -2
- package/dist/{chunk-B4BG7PRW-CJNUb2dF.js → chunk-B4BG7PRW-CqAtQU-I.js} +5 -5
- package/dist/{chunk-B4BG7PRW-C9gyAOP8.cjs → chunk-B4BG7PRW-so74-wMy.cjs} +2 -2
- package/dist/{chunk-DI55MBZ5-ISzDFhik.js → chunk-DI55MBZ5-BdBqxSCP.js} +4 -4
- package/dist/{chunk-DI55MBZ5-CST8ww1K.cjs → chunk-DI55MBZ5-BhxfU0Wh.cjs} +2 -2
- package/dist/{chunk-FMBD7UC4-TkkHMWVE.cjs → chunk-FMBD7UC4-BQChMkqq.cjs} +2 -2
- package/dist/{chunk-FMBD7UC4-DJvUa2pT.js → chunk-FMBD7UC4-CCEhBtde.js} +2 -2
- package/dist/{chunk-QN33PNHL-QmBeRY5P.js → chunk-QN33PNHL-C6wEvbod.js} +2 -2
- package/dist/{chunk-QN33PNHL-CFlYTM58.cjs → chunk-QN33PNHL-DptvB12p.cjs} +2 -2
- package/dist/{chunk-QZHKN3VN-cnwh_Uod.cjs → chunk-QZHKN3VN-BwPGFWEQ.cjs} +2 -2
- package/dist/{chunk-QZHKN3VN-BEpygh2o.js → chunk-QZHKN3VN-CWjhIJ4p.js} +2 -2
- package/dist/{chunk-TZMSLE5B-RcYgXG7j.js → chunk-TZMSLE5B-BulfQyEg.js} +2 -2
- package/dist/{chunk-TZMSLE5B-pl0uadTe.cjs → chunk-TZMSLE5B-Md78hDFm.cjs} +2 -2
- package/dist/{classDiagram-2ON5EDUG-DvJ5aIUy.cjs → classDiagram-2ON5EDUG-CZEKavO0.cjs} +2 -2
- package/dist/{classDiagram-2ON5EDUG-JTcDlkCj.js → classDiagram-2ON5EDUG-DBkePYfg.js} +3 -3
- package/dist/{classDiagram-v2-WZHVMYZB-DvJ5aIUy.cjs → classDiagram-v2-WZHVMYZB-CZEKavO0.cjs} +2 -2
- package/dist/{classDiagram-v2-WZHVMYZB-JTcDlkCj.js → classDiagram-v2-WZHVMYZB-DBkePYfg.js} +3 -3
- package/dist/components/fluentUIProvider/FluentUIProvider.d.ts +1 -0
- package/dist/components/typographyControl/ITypographyControlProps.d.ts +8 -0
- package/dist/components/worldMap/ensureMaplibreStyles.d.ts +3 -0
- package/dist/{cose-bilkent-S5V4N54A-CNBSqnWJ.cjs → cose-bilkent-S5V4N54A-CKKVaKER.cjs} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-BXgTMeQA.js → cose-bilkent-S5V4N54A-ZBFo9U8K.js} +2 -2
- package/dist/{dagre-6UL2VRFP-BxQXnc8r.cjs → dagre-6UL2VRFP-B0QLpgAH.cjs} +2 -2
- package/dist/{dagre-6UL2VRFP-Cd_O6pDp.js → dagre-6UL2VRFP-gVFAp2xo.js} +2 -2
- package/dist/{diagram-PSM6KHXK-qKGo-bga.cjs → diagram-PSM6KHXK-B8PzNDiz.cjs} +2 -2
- package/dist/{diagram-PSM6KHXK-DKttOUZo.js → diagram-PSM6KHXK-BgpltQW9.js} +5 -5
- package/dist/{diagram-QEK2KX5R-sAL77GDv.js → diagram-QEK2KX5R-B59l1ou-.js} +4 -4
- package/dist/{diagram-QEK2KX5R-Dm4O2qwN.cjs → diagram-QEK2KX5R-BSfzwv7M.cjs} +2 -2
- package/dist/{diagram-S2PKOQOG-8WvO4vmy.cjs → diagram-S2PKOQOG-Bk91GOvc.cjs} +2 -2
- package/dist/{diagram-S2PKOQOG-D4Ghlb0D.js → diagram-S2PKOQOG-CcfpCRwG.js} +4 -4
- package/dist/{erDiagram-Q2GNP2WA-qzVYNj9S.cjs → erDiagram-Q2GNP2WA-BD25OJ7l.cjs} +2 -2
- package/dist/{erDiagram-Q2GNP2WA-COoAAm3O.js → erDiagram-Q2GNP2WA-lrJ1SGpr.js} +5 -5
- package/dist/{flowDiagram-NV44I4VS-CNrQgFTG.js → flowDiagram-NV44I4VS-Df1uvtZp.js} +6 -6
- package/dist/{flowDiagram-NV44I4VS-BsOjWu-D.cjs → flowDiagram-NV44I4VS-DpxYrjDI.cjs} +2 -2
- package/dist/{ganttDiagram-JELNMOA3-Dtrv-8oJ.cjs → ganttDiagram-JELNMOA3-BuEjfD0h.cjs} +2 -2
- package/dist/{ganttDiagram-JELNMOA3-BVrS6gmp.js → ganttDiagram-JELNMOA3-CTXqXyUF.js} +3 -3
- package/dist/{gitGraph-G5XIXVHT-Bg4xBTiz.cjs → gitGraph-G5XIXVHT-BWFVrIFT.cjs} +2 -2
- package/dist/gitGraph-G5XIXVHT-CQDP2vEd.js +6 -0
- package/dist/{gitGraphDiagram-V2S2FVAM-DrU41uhu.js → gitGraphDiagram-V2S2FVAM-BEAiApuY.js} +5 -5
- package/dist/{gitGraphDiagram-V2S2FVAM-DgYw8zGa.cjs → gitGraphDiagram-V2S2FVAM-Bjrr2nre.cjs} +2 -2
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useBrandCenterFonts.d.ts +49 -0
- package/dist/index-CAoOhLkP.cjs +428 -0
- package/dist/{index-BDTZ2IYY.js → index-vFWWvdca.js} +284 -156
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +127 -126
- package/dist/info-VBDWY6EO-QvquFFhY.js +6 -0
- package/dist/{info-VBDWY6EO-CiLEGfFg.cjs → info-VBDWY6EO-YkPxeRZ-.cjs} +2 -2
- package/dist/{infoDiagram-HS3SLOUP-DuxmfWqC.cjs → infoDiagram-HS3SLOUP-DHcFj6RC.cjs} +2 -2
- package/dist/{infoDiagram-HS3SLOUP-DaJhVMrW.js → infoDiagram-HS3SLOUP-DPo4m3Oc.js} +3 -3
- package/dist/{journeyDiagram-XKPGCS4Q-YP1l6Jbo.cjs → journeyDiagram-XKPGCS4Q-B5mteNXQ.cjs} +2 -2
- package/dist/{journeyDiagram-XKPGCS4Q-D1JPhzYL.js → journeyDiagram-XKPGCS4Q-yOgvceJk.js} +5 -5
- package/dist/{kanban-definition-3W4ZIXB7-DwU3_oyo.js → kanban-definition-3W4ZIXB7-B2LjQzC5.js} +3 -3
- package/dist/{kanban-definition-3W4ZIXB7-BO-t1Gbj.cjs → kanban-definition-3W4ZIXB7-BJdCPi_F.cjs} +2 -2
- package/dist/{linear-Dgc4PPM8.js → linear-BI5TRYfw.js} +2 -2
- package/dist/{linear-BQ23CiiJ.cjs → linear-DHjw4hvs.cjs} +2 -2
- package/dist/{maplibre-gl-DTnxqLU4.js → maplibre-gl-BAtlodKY.js} +2 -2
- package/dist/{maplibre-gl-BctyehJs.cjs → maplibre-gl-BOvA2Ll0.cjs} +2 -2
- package/dist/{mermaid-parser.core-DbQ4PFus.cjs → mermaid-parser.core-BQzkWune.cjs} +2 -2
- package/dist/{mermaid-parser.core-w6zleprO.js → mermaid-parser.core-or1HXQYP.js} +10 -10
- package/dist/{mindmap-definition-VGOIOE7T-CSbvwpau.cjs → mindmap-definition-VGOIOE7T-BPCXwiSh.cjs} +2 -2
- package/dist/{mindmap-definition-VGOIOE7T-Cbzl6mka.js → mindmap-definition-VGOIOE7T-BX31I3PY.js} +4 -4
- package/dist/packet-DYOGHKS2-Bse7YjBO.js +6 -0
- package/dist/{packet-DYOGHKS2-BxerF4cq.cjs → packet-DYOGHKS2-ClruFccz.cjs} +2 -2
- package/dist/{pie-VRWISCQL-L0voe8n6.cjs → pie-VRWISCQL-DUiOByGp.cjs} +2 -2
- package/dist/pie-VRWISCQL-Q3eU4qER.js +6 -0
- package/dist/{pieDiagram-ADFJNKIX-CUG-3gNw.js → pieDiagram-ADFJNKIX-CL_8VDsb.js} +5 -5
- package/dist/{pieDiagram-ADFJNKIX-KEQLPuCu.cjs → pieDiagram-ADFJNKIX-OI8gruuh.cjs} +2 -2
- package/dist/{quadrantDiagram-AYHSOK5B-_f3Rr6lt.cjs → quadrantDiagram-AYHSOK5B-DjOcdqwN.cjs} +2 -2
- package/dist/{quadrantDiagram-AYHSOK5B-BlflMUJD.js → quadrantDiagram-AYHSOK5B-iD_dxfNt.js} +3 -3
- package/dist/{radar-ZZBFDIW7-DXjfa8Pu.cjs → radar-ZZBFDIW7-KeBFLHcK.cjs} +2 -2
- package/dist/radar-ZZBFDIW7-e5irSdhY.js +6 -0
- package/dist/{requirementDiagram-UZGBJVZJ-De_dYL_C.cjs → requirementDiagram-UZGBJVZJ-CoPWc6eZ.cjs} +2 -2
- package/dist/{requirementDiagram-UZGBJVZJ-CWfVB48W.js → requirementDiagram-UZGBJVZJ-DQbSltZv.js} +4 -4
- package/dist/{sankeyDiagram-TZEHDZUN-D6tJZNWR.js → sankeyDiagram-TZEHDZUN-4xAWn_AO.js} +2 -2
- package/dist/{sankeyDiagram-TZEHDZUN-Bms2wZob.cjs → sankeyDiagram-TZEHDZUN-yGUhPXDs.cjs} +2 -2
- package/dist/{sequenceDiagram-WL72ISMW-SfYU5YrW.js → sequenceDiagram-WL72ISMW-BCilDg3f.js} +4 -4
- package/dist/{sequenceDiagram-WL72ISMW-DG1ZRDp-.cjs → sequenceDiagram-WL72ISMW-CQFu5gn5.cjs} +2 -2
- package/dist/{stateDiagram-FKZM4ZOC-crzv2Jpa.cjs → stateDiagram-FKZM4ZOC-BKlriLiy.cjs} +2 -2
- package/dist/{stateDiagram-FKZM4ZOC-KZX0nngd.js → stateDiagram-FKZM4ZOC-DTQxNxM0.js} +3 -3
- package/dist/{stateDiagram-v2-4FDKWEC3-D0KjKJoK.js → stateDiagram-v2-4FDKWEC3-BS-Rbuf4.js} +3 -3
- package/dist/{stateDiagram-v2-4FDKWEC3-B2gXhXQz.cjs → stateDiagram-v2-4FDKWEC3-C3-DQJ_j.cjs} +2 -2
- package/dist/{timeline-definition-IT6M3QCI-DelvF0G9.cjs → timeline-definition-IT6M3QCI-BUZIaC_t.cjs} +2 -2
- package/dist/{timeline-definition-IT6M3QCI-C9RQjj2r.js → timeline-definition-IT6M3QCI-C-6fhIAz.js} +3 -3
- package/dist/{treemap-GDKQZRPO-BYKJsPAu.cjs → treemap-GDKQZRPO-D-lYWdWn.cjs} +2 -2
- package/dist/treemap-GDKQZRPO-DYKBo0ui.js +6 -0
- package/dist/{xychartDiagram-PRI3JC2R-Gz0Dlfd5.cjs → xychartDiagram-PRI3JC2R-DPXNUchU.cjs} +2 -2
- package/dist/{xychartDiagram-PRI3JC2R-DABo6Om8.js → xychartDiagram-PRI3JC2R-DV2aHw-9.js} +3 -3
- package/package.json +1 -1
- package/dist/architecture-7HQA4BMR-BmS7fgvO.js +0 -6
- package/dist/channel-5ocoFjxa.cjs +0 -2
- package/dist/gitGraph-G5XIXVHT-Ptq6pPhc.js +0 -6
- package/dist/index-Dza7OtUc.cjs +0 -428
- package/dist/info-VBDWY6EO-BjV4aU5K.js +0 -6
- package/dist/packet-DYOGHKS2-BTItCXbs.js +0 -6
- package/dist/pie-VRWISCQL-B_PZrfid.js +0 -6
- package/dist/radar-ZZBFDIW7-tkjoa-D4.js +0 -6
- package/dist/style.css +0 -1
- package/dist/treemap-GDKQZRPO-Bim5pzuq.js +0 -6
package/dist/{architectureDiagram-VXUJARFQ-DFzpbSmI.js → architectureDiagram-VXUJARFQ-aOTrDewq.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _a;
|
|
2
|
-
import { al as commonjsGlobal, ak as getDefaultExportFromCjs, _ as __name, K as selectSvgElement, ac as setupGraphViewbox, l as log, b as setAccTitle, a as getAccTitle, q as setDiagramTitle, t as getDiagramTitle, g as getAccDescription, s as setAccDescription, z as clear, F as cleanAndMerge, G as getConfig, H as defaultConfig_default, c as getConfig2, az as createText, aA as getIconSVG, i as sanitizeText, d as select, y as getEdgeId, aB as registerIconPacks, aC as unknownIcon } from "./index-
|
|
3
|
-
import { p as populateCommonDb } from "./chunk-4BX2VUAB-
|
|
4
|
-
import { p as parse } from "./mermaid-parser.core-
|
|
2
|
+
import { al as commonjsGlobal, ak as getDefaultExportFromCjs, _ as __name, K as selectSvgElement, ac as setupGraphViewbox, l as log, b as setAccTitle, a as getAccTitle, q as setDiagramTitle, t as getDiagramTitle, g as getAccDescription, s as setAccDescription, z as clear, F as cleanAndMerge, G as getConfig, H as defaultConfig_default, c as getConfig2, az as createText, aA as getIconSVG, i as sanitizeText, d as select, y as getEdgeId, aB as registerIconPacks, aC as unknownIcon } from "./index-vFWWvdca.js";
|
|
3
|
+
import { p as populateCommonDb } from "./chunk-4BX2VUAB-BhTmbZ0P.js";
|
|
4
|
+
import { p as parse } from "./mermaid-parser.core-or1HXQYP.js";
|
|
5
5
|
import { c as cytoscape$1 } from "./cytoscape.esm-BS1owLay.js";
|
|
6
6
|
var cytoscapeFcose = { exports: {} };
|
|
7
7
|
var coseBase = { exports: {} };
|
|
@@ -8677,4 +8677,4 @@ var diagram = {
|
|
|
8677
8677
|
export {
|
|
8678
8678
|
diagram
|
|
8679
8679
|
};
|
|
8680
|
-
//# sourceMappingURL=architectureDiagram-VXUJARFQ-
|
|
8680
|
+
//# sourceMappingURL=architectureDiagram-VXUJARFQ-aOTrDewq.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var t,e;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./chunk-FMBD7UC4-TkkHMWVE.cjs"),a=require("./index-Dza7OtUc.cjs"),n=require("./_arrayEach-DOL-P2QE.cjs"),i=require("./graph-C7xixGrW.cjs"),s=require("./channel-5ocoFjxa.cjs");var o=Object.prototype.hasOwnProperty;var l=/\w*$/;var c=a.Symbol?a.Symbol.prototype:void 0,d=c?c.valueOf:void 0;function h(t,e,r){var n,i,s,o,c,h=t.constructor;switch(e){case"[object ArrayBuffer]":return a.cloneArrayBuffer(t);case"[object Boolean]":case"[object Date]":return new h(+t);case"[object DataView]":return c=(o=t).buffer,new o.constructor(c,o.byteOffset,o.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a.cloneTypedArray(t,r);case"[object Map]":case"[object Set]":return new h;case"[object Number]":case"[object String]":return new h(t);case"[object RegExp]":return(s=new(i=t).constructor(i.source,l.exec(i))).lastIndex=i.lastIndex,s;case"[object Symbol]":return n=t,d?Object(d.call(n)):{}}}var g=a.nodeUtil&&a.nodeUtil.isMap,u=g?a.baseUnary(g):function(t){return a.isObjectLike(t)&&"[object Map]"==a.getTag(t)};var y=a.nodeUtil&&a.nodeUtil.isSet,p=y?a.baseUnary(y):function(t){return a.isObjectLike(t)&&"[object Set]"==a.getTag(t)},b="[object Arguments]",x="[object Function]",f="[object Object]",m={};function _(t,e,r,i,s,l){var c,d=1&e;if(void 0!==c)return c;if(!a.isObject(t))return t;var g=a.isArray(t);if(g)return c=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&o.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),a.copyArray(t,c);var y=a.getTag(t),w=y==x||"[object GeneratorFunction]"==y;if(a.isBuffer(t))return a.cloneBuffer(t,d);if(y==f||y==b||w&&!s)return c=w?{}:a.initCloneObject(t),function(t,e){return a.copyObject(t,n.getSymbols(t),e)}(t,function(t,e){return t&&a.copyObject(e,n.keys(e),t)}(c,t));if(!m[y])return s?t:{};c=h(t,y,d),l||(l=new a.Stack);var S=l.get(t);if(S)return S;l.set(t,c),p(t)?t.forEach(function(a){c.add(_(a,e,r,a,t,l))}):u(t)&&t.forEach(function(a,n){c.set(n,_(a,e,r,n,t,l))});var k=n.getAllKeys,L=g?void 0:k(t);return n.arrayEach(L||t,function(n,i){L&&(n=t[i=n]),a.assignValue(c,i,_(n,e,r,i,t,l))}),c}m[b]=m["[object Array]"]=m["[object ArrayBuffer]"]=m["[object DataView]"]=m["[object Boolean]"]=m["[object Date]"]=m["[object Float32Array]"]=m["[object Float64Array]"]=m["[object Int8Array]"]=m["[object Int16Array]"]=m["[object Int32Array]"]=m["[object Map]"]=m["[object Number]"]=m[f]=m["[object RegExp]"]=m["[object Set]"]=m["[object String]"]=m["[object Symbol]"]=m["[object Uint8Array]"]=m["[object Uint8ClampedArray]"]=m["[object Uint16Array]"]=m["[object Uint32Array]"]=!0,m["[object Error]"]=m[x]=m["[object WeakMap]"]=!1;function w(t){return _(t,4)}var S=function(){var t=a.__name(function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r},"o"),e=[1,15],r=[1,7],n=[1,13],i=[1,14],s=[1,19],o=[1,16],l=[1,17],c=[1,18],d=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],u=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],b=[1,49],x={trace:a.__name(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:a.__name(function(t,e,r,a,n,i,s){var o=i.length-1;switch(n){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: ",i[o-1]),a.setHierarchy(i[o-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: ",i[o]),"number"==typeof i[o].length?this.$=i[o]:this.$=[i[o]];break;case 13:a.getLogger().debug("Rule: statement #2: ",i[o-1]),this.$=[i[o-1]].concat(i[o]);break;case 14:a.getLogger().debug("Rule: link: ",i[o],t),this.$={edgeTypeStr:i[o],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",i[o-3],i[o-1],i[o]),this.$={edgeTypeStr:i[o],label:i[o-1]};break;case 18:const e=parseInt(i[o]),r=a.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",i[o-2],i[o-1],i[o]," typestr: ",i[o-1].edgeTypeStr);const n=a.edgeStrToEdgeData(i[o-1].edgeTypeStr);this.$=[{id:i[o-2].id,label:i[o-2].label,type:i[o-2].type,directions:i[o-2].directions},{id:i[o-2].id+"-"+i[o].id,start:i[o-2].id,end:i[o].id,label:i[o-1].label,type:"edge",directions:i[o].directions,arrowTypeEnd:n,arrowTypeStart:"arrow_open"},{id:i[o].id,label:i[o].label,type:a.typeStr2Type(i[o].typeStr),directions:i[o].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",i[o-1],i[o]),this.$={id:i[o-1].id,label:i[o-1].label,type:a.typeStr2Type(i[o-1].typeStr),directions:i[o-1].directions,widthInColumns:parseInt(i[o],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",i[o]),this.$={id:i[o].id,label:i[o].label,type:a.typeStr2Type(i[o].typeStr),directions:i[o].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",i[o]),this.$={type:"column-setting",columns:"auto"===i[o]?-1:parseInt(i[o])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",i[o-2],i[o-1]),a.generateId(),this.$={...i[o-2],type:"composite",children:i[o-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",i[o-2],i[o-1],i[o]);const s=a.generateId();this.$={id:s,type:"composite",label:"",children:i[o-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",i[o]),this.$={id:i[o]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",i[o-1],i[o]),this.$={id:i[o-1],label:i[o].label,typeStr:i[o].typeStr,directions:i[o].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",i[o]),this.$=[i[o]];break;case 32:a.getLogger().debug("Rule: dirList: ",i[o-1],i[o]),this.$=[i[o-1]].concat(i[o]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",i[o-2],i[o-1],i[o]),this.$={typeStr:i[o-2]+i[o],label:i[o-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",i[o-3],i[o-2]," #3:",i[o-1],i[o]),this.$={typeStr:i[o-3]+i[o],label:i[o-2],directions:i[o-1]};break;case 35:case 36:this.$={type:"classDef",id:i[o-1].trim(),css:i[o].trim()};break;case 37:this.$={type:"applyClass",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 38:this.$={type:"applyStyles",id:i[o-1].trim(),stylesStr:i[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:s,39:o,43:l,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:e,21:r,28:n,29:i,31:s,39:o,43:l,46:c}),t(h,[2,16],{14:22,15:g,16:u}),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(y,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:s},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:s,39:o,43:l,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(y,[2,24]),{10:e,11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:s,39:o,43:l,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(p,[2,30]),{18:[1,43]},{18:[1,44]},t(y,[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:b},{15:[1,50]},t(h,[2,27]),t(p,[2,33]),{38:[1,51]},{33:52,34:b,38:[2,31]},{31:[2,15]},t(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:a.__name(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:a.__name(function(t){var e=this,r=[0],n=[],i=[null],s=[],o=this.table,l="",c=0,d=0,h=s.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(u.yy[y]=this.yy[y]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var p=g.yylloc;s.push(p);var b=g.options&&g.options.ranges;function x(){var t;return"number"!=typeof(t=n.pop()||g.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a.__name(function(t){r.length=r.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),a.__name(x,"lex");for(var f,m,_,w,S,k,L,v,E={};;){if(m=r[r.length-1],this.defaultActions[m]?_=this.defaultActions[m]:(null==f&&(f=x()),_=o[m]&&o[m][f]),void 0===_||!_.length||!_[0]){var C="";for(S in v=[],o[m])this.terminals_[S]&&S>2&&v.push("'"+this.terminals_[S]+"'");C=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(C,{text:g.match,token:this.terminals_[f]||f,line:g.yylineno,loc:p,expected:v})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(_[0]){case 1:r.push(f),i.push(g.yytext),s.push(g.yylloc),r.push(_[1]),f=null,d=g.yyleng,l=g.yytext,c=g.yylineno,p=g.yylloc;break;case 2:if(k=this.productions_[_[1]][1],E.$=i[i.length-k],E._$={first_line:s[s.length-(k||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(k||1)].first_column,last_column:s[s.length-1].last_column},b&&(E._$.range=[s[s.length-(k||1)].range[0],s[s.length-1].range[1]]),void 0!==(w=this.performAction.apply(E,[l,d,c,u.yy,_[1],i,s].concat(h))))return w;k&&(r=r.slice(0,-1*k*2),i=i.slice(0,-1*k),s=s.slice(0,-1*k)),r.push(this.productions_[_[1]][0]),i.push(E.$),s.push(E._$),L=o[r[r.length-2]][r[r.length-1]],r.push(L);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:a.__name(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:a.__name(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.__name(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.__name(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=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);var n=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===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[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.__name(function(){return this._more=!0,this},"more"),reject:a.__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:a.__name(function(t){this.unput(this.match.slice(t))},"less"),pastInput:a.__name(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a.__name(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a.__name(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:a.__name(function(t,e){var r,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],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 n)this[i]=n[i];return!1}return!1},"test_match"),next:a.__name(function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),i=0;i<n.length;i++)if((r=this._input.match(this.rules[n[i]]))&&(!e||r[0].length>e[0].length)){if(e=r,a=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[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:a.__name(function(){var t=this.next();return t||this.lex()},"lex"),begin:a.__name(function(t){this.conditionStack.push(t)},"begin"),popState:a.__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a.__name(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a.__name(function(t){this.begin(t)},"pushState"),stateStackSize:a.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a.__name(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 m(){this.yy={}}return x.lexer=f,a.__name(m,"Parser"),m.prototype=x,x.Parser=m,new m}();S.parser=S;var k=S,L=new Map,v=[],E=new Map,C="color",T="fill",D=a.getConfig2(),$=new Map,I=a.__name(t=>a.common_default.sanitizeText(t,D),"sanitizeText"),N=a.__name(function(t,e=""){let r=$.get(t);r||(r={id:t,styles:[],textStyles:[]},$.set(t,r)),null!=e&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(C).exec(t)){const t=e.replace(T,"bgFill").replace(C,T);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),B=a.__name(function(t,e=""){const r=L.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),A=a.__name(function(t,e){t.split(",").forEach(function(t){let r=L.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},L.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),O=a.__name((t,e)=>{const r=t.flat(),n=[],i=r.find(t=>"column-setting"===(null==t?void 0:t.type)),s=(null==i?void 0:i.columns)??-1;for(const o of r)if("number"==typeof s&&s>0&&"column-setting"!==o.type&&"number"==typeof o.widthInColumns&&o.widthInColumns>s&&a.log.warn(`Block ${o.id} width ${o.widthInColumns} exceeds configured column width ${s}`),o.label&&(o.label=I(o.label)),"classDef"!==o.type)if("applyClass"!==o.type)if("applyStyles"!==o.type)if("column-setting"===o.type)e.columns=o.columns??-1;else if("edge"===o.type){const t=(E.get(o.id)??0)+1;E.set(o.id,t),o.id=t+"-"+o.id,v.push(o)}else{o.label||("composite"===o.type?o.label="":o.label=o.id);const t=L.get(o.id);if(void 0===t?L.set(o.id,o):("na"!==o.type&&(t.type=o.type),o.label!==o.id&&(t.label=o.label)),o.children&&O(o.children,o),"space"===o.type){const t=o.width??1;for(let e=0;e<t;e++){const t=w(o);t.id=t.id+"-"+e,L.set(t.id,t),n.push(t)}}else void 0===t&&n.push(o)}else(null==o?void 0:o.stylesStr)&&B(o.id,null==o?void 0:o.stylesStr);else A(o.id,(null==o?void 0:o.styleClass)??"");else N(o.id,o.css);e.children=n},"populateBlockDatabase"),z=[],R={id:"root",type:"composite",children:[],columns:-1},M=a.__name(()=>{a.log.debug("Clear called"),a.clear(),R={id:"root",type:"composite",children:[],columns:-1},L=new Map([["root",R]]),z=[],$=new Map,v=[],E=new Map},"clear");function j(t){switch(a.log.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return a.log.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function P(t){return a.log.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function Y(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}a.__name(j,"typeStr2Type"),a.__name(P,"edgeTypeStr2Type"),a.__name(Y,"edgeStrToEdgeData");var F=0,U=a.__name(()=>(F++,"id-"+Math.random().toString(36).substr(2,12)+"-"+F),"generateId"),W=a.__name(t=>{R.children=t,O(t,R),z=R.children},"setHierarchy"),X=a.__name(t=>{const e=L.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),H=a.__name(()=>[...L.values()],"getBlocksFlat"),K=a.__name(()=>z||[],"getBlocks"),q=a.__name(()=>v,"getEdges"),Z=a.__name(t=>L.get(t),"getBlock"),G=a.__name(t=>{L.set(t.id,t)},"setBlock"),V=a.__name(()=>a.log,"getLogger"),J=a.__name(function(){return $},"getClasses"),Q={getConfig:a.__name(()=>a.getConfig().block,"getConfig"),typeStr2Type:j,edgeTypeStr2Type:P,edgeStrToEdgeData:Y,getLogger:V,getBlocksFlat:H,getBlocks:K,getEdges:q,setHierarchy:W,getBlock:Z,setBlock:G,getColumns:X,getClasses:J,clear:M,generateId:U},tt=a.__name((t,e)=>{const r=s.channel,n=r(t,"r"),i=r(t,"g"),o=r(t,"b");return a.rgba(n,i,o,e)},"fade"),et=a.__name(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.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: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${tt(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${tt(t.mainBkg,.5)};\n fill: ${tt(t.clusterBkg,.5)};\n stroke: ${tt(t.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: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.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: ${t.textColor};\n }\n ${r.getIconStyles()}\n`,"getStyles"),rt=a.__name((t,e,r,a)=>{e.forEach(e=>{at[e](t,r,a)})},"insertMarkers"),at={extension:a.__name((t,e,r)=>{a.log.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:a.__name((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:a.__name((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:a.__name((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:a.__name((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:a.__name((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:a.__name((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:a.__name((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:a.__name((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")},nt=rt,it=(null==(e=null==(t=a.getConfig2())?void 0:t.block)?void 0:e.padding)??8;function st(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);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}a.__name(st,"calculateBlockPosition");var ot=a.__name(t=>{let e=0,r=0;for(const n of t.children){const{width:i,height:s,x:o,y:l}=n.size??{width:0,height:0,x:0,y:0};a.log.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",s,"x:",o,"y:",l,n.type),"space"!==n.type&&(i>e&&(e=i/(t.widthInColumns??1)),s>r&&(r=s))}return{width:e,height:r}},"getMaxChildSize");function lt(t,e,r=0,n=0){var i,s,o,l,c,d,h,g,u,y,p;a.log.debug("setBlockSizes abc95 (start)",t.id,null==(i=null==t?void 0:t.size)?void 0:i.x,"block width =",null==t?void 0:t.size,"siblingWidth",r),(null==(s=null==t?void 0:t.size)?void 0:s.width)||(t.size={width:r,height:n,x:0,y:0});let b=0,x=0;if((null==(o=t.children)?void 0:o.length)>0){for(const r of t.children)lt(r,e);const i=ot(t);b=i.width,x=i.height,a.log.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",b,x);for(const e of t.children)e.size&&(a.log.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${b} ${x} ${JSON.stringify(e.size)}`),e.size.width=b*(e.widthInColumns??1)+it*((e.widthInColumns??1)-1),e.size.height=x,e.size.x=0,e.size.y=0,a.log.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${b} maxHeight:${x}`));for(const r of t.children)lt(r,e,b,x);const s=t.columns??-1;let o=0;for(const e of t.children)o+=e.widthInColumns??1;let g=t.children.length;s>0&&s<o&&(g=s);const u=Math.ceil(o/g);let y=g*(b+it)+it,p=u*(x+it)+it;if(y<r){a.log.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${n} width ${y}`),y=r,p=n;const e=(r-g*it-it)/g,i=(n-u*it-it)/u;a.log.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",b),a.log.debug("Size indata abc88",t.id,"childHeight",i,"maxHeight",x),a.log.debug("Size indata abc88 xSize",g,"padding",it);for(const r of t.children)r.size&&(r.size.width=e,r.size.height=i,r.size.x=0,r.size.y=0)}if(a.log.debug(`abc95 (finale calc) ${t.id} xSize ${g} ySize ${u} columns ${s}${t.children.length} width=${Math.max(y,(null==(l=t.size)?void 0:l.width)||0)}`),y<((null==(c=null==t?void 0:t.size)?void 0:c.width)||0)){y=(null==(d=null==t?void 0:t.size)?void 0:d.width)||0;const e=s>0?Math.min(t.children.length,s):t.children.length;if(e>0){const r=(y-e*it-it)/e;a.log.debug("abc95 (growing to fit) width",t.id,y,null==(h=t.size)?void 0:h.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:y,height:p,x:0,y:0}}a.log.debug("setBlockSizes abc94 (done)",t.id,null==(g=null==t?void 0:t.size)?void 0:g.x,null==(u=null==t?void 0:t.size)?void 0:u.width,null==(y=null==t?void 0:t.size)?void 0:y.y,null==(p=null==t?void 0:t.size)?void 0:p.height)}function ct(t,e){var r,n,i,s,o,l,c,d,h,g,u,y,p,b,x,f,m;a.log.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${null==(r=null==t?void 0:t.size)?void 0:r.x} y: ${null==(n=null==t?void 0:t.size)?void 0:n.y} width: ${null==(i=null==t?void 0:t.size)?void 0:i.width}`);const _=t.columns??-1;if(a.log.debug("layoutBlocks columns abc95",t.id,"=>",_,t),t.children&&t.children.length>0){const e=(null==(o=null==(s=null==t?void 0:t.children[0])?void 0:s.size)?void 0:o.width)??0,r=t.children.length*e+(t.children.length-1)*it;a.log.debug("widthOfChildren 88",r,"posX");let n=0;a.log.debug("abc91 block?.size?.x",t.id,null==(l=null==t?void 0:t.size)?void 0:l.x);let i=(null==(c=null==t?void 0:t.size)?void 0:c.x)?(null==(d=null==t?void 0:t.size)?void 0:d.x)+(-(null==(h=null==t?void 0:t.size)?void 0:h.width)/2||0):-it,x=0;for(const s of t.children){const e=t;if(!s.size)continue;const{width:r,height:o}=s.size,{px:l,py:c}=st(_,n);if(c!=x&&(x=c,i=(null==(g=null==t?void 0:t.size)?void 0:g.x)?(null==(u=null==t?void 0:t.size)?void 0:u.x)+(-(null==(y=null==t?void 0:t.size)?void 0:y.width)/2||0):-it,a.log.debug("New row in layout for block",t.id," and child ",s.id,x)),a.log.debug(`abc89 layout blocks (child) id: ${s.id} Pos: ${n} (px, py) ${l},${c} (${null==(p=null==e?void 0:e.size)?void 0:p.x},${null==(b=null==e?void 0:e.size)?void 0:b.y}) parent: ${e.id} width: ${r}${it}`),e.size){const t=r/2;s.size.x=i+it+t,a.log.debug(`abc91 layout blocks (calc) px, pyid:${s.id} startingPos=X${i} new startingPosX${s.size.x} ${t} padding=${it} width=${r} halfWidth=${t} => x:${s.size.x} y:${s.size.y} ${s.widthInColumns} (width * (child?.w || 1)) / 2 ${r*((null==s?void 0:s.widthInColumns)??1)/2}`),i=s.size.x+t,s.size.y=e.size.y-e.size.height/2+c*(o+it)+o/2+it,a.log.debug(`abc88 layout blocks (calc) px, pyid:${s.id}startingPosX${i}${it}${t}=>x:${s.size.x}y:${s.size.y}${s.widthInColumns}(width * (child?.w || 1)) / 2${r*((null==s?void 0:s.widthInColumns)??1)/2}`)}s.children&&ct(s);let d=(null==s?void 0:s.widthInColumns)??1;_>0&&(d=Math.min(d,_-n%_)),n+=d,a.log.debug("abc88 columnsPos",s,n)}}a.log.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${null==(x=null==t?void 0:t.size)?void 0:x.x} y: ${null==(f=null==t?void 0:t.size)?void 0:f.y} width: ${null==(m=null==t?void 0:t.size)?void 0:m.width}`)}function dt(t,{minX:e,minY:r,maxX:a,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:i,y:s,width:o,height:l}=t.size;i-o/2<e&&(e=i-o/2),s-l/2<r&&(r=s-l/2),i+o/2>a&&(a=i+o/2),s+l/2>n&&(n=s+l/2)}if(t.children)for(const i of t.children)({minX:e,minY:r,maxX:a,maxY:n}=dt(i,{minX:e,minY:r,maxX:a,maxY:n}));return{minX:e,minY:r,maxX:a,maxY:n}}function ht(t){const e=t.getBlock("root");if(!e)return;lt(e,t,0,0),ct(e),a.log.debug("getBlocks",JSON.stringify(e,null,2));const{minX:r,minY:n,maxX:i,maxY:s}=dt(e);return{x:r,y:n,width:i-r,height:s-n}}function gt(t,e){e&&t.attr("style",e)}function ut(t,e){const r=a.select(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=r.append("xhtml:div"),i=t.label,s=t.isNode?"nodeLabel":"edgeLabel",o=n.append("span");return o.html(a.sanitizeText(i,e)),gt(o,t.labelStyle),o.attr("class",s),gt(n,t.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}a.__name(lt,"setBlockSizes"),a.__name(ct,"layoutBlocks"),a.__name(dt,"findBounds"),a.__name(ht,"layout"),a.__name(gt,"applyStyle"),a.__name(ut,"addHtmlLabel");var yt=a.__name(async(t,e,r,n)=>{let i=t||"";"object"==typeof i&&(i=i[0]);const s=a.getConfig2();if(a.evaluate(s.flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),a.log.debug("vertexText"+i);return ut({isNode:n,label:await a.replaceIconSubstring(a.decodeEntities(i)),labelStyle:e.replace("fill:","color:")},s)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let a=[];a="string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[];for(const e of a){const a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),r?a.setAttribute("class","title-row"):a.setAttribute("class","row"),a.textContent=e.trim(),t.appendChild(a)}return t}},"createLabel"),pt=a.__name((t,e,r,a,n)=>{e.arrowTypeStart&&xt(t,"start",e.arrowTypeStart,r,a,n),e.arrowTypeEnd&&xt(t,"end",e.arrowTypeEnd,r,a,n)},"addEdgeMarkers"),bt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},xt=a.__name((t,e,r,n,i,s)=>{const o=bt[r];if(!o)return void a.log.warn(`Unknown arrow type: ${r}`);const l="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${s}-${o}${l})`)},"addEdgeMarker"),ft={},mt={},_t=a.__name(async(t,e)=>{const r=a.getConfig2(),n=a.evaluate(r.flowchart.htmlLabels),i="markdown"===e.labelType?a.createText(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):await yt(e.label,e.labelStyle),s=t.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label");o.node().appendChild(i);let l,c=i.getBBox();if(n){const t=i.children[0],e=a.select(i);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}if(o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),ft[e.id]=s,e.width=c.width,e.height=c.height,e.startLabelLeft){const r=await yt(e.startLabelLeft,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner");l=n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),mt[e.id]||(mt[e.id]={}),mt[e.id].startLeft=a,wt(l,e.startLabelLeft)}if(e.startLabelRight){const r=await yt(e.startLabelRight,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner");l=a.node().appendChild(r),n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),mt[e.id]||(mt[e.id]={}),mt[e.id].startRight=a,wt(l,e.startLabelRight)}if(e.endLabelLeft){const r=await yt(e.endLabelLeft,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner");l=n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),a.node().appendChild(r),mt[e.id]||(mt[e.id]={}),mt[e.id].endLeft=a,wt(l,e.endLabelLeft)}if(e.endLabelRight){const r=await yt(e.endLabelRight,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner");l=n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),a.node().appendChild(r),mt[e.id]||(mt[e.id]={}),mt[e.id].endRight=a,wt(l,e.endLabelRight)}return i},"insertEdgeLabel");function wt(t,e){a.getConfig2().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}a.__name(wt,"setTerminalWidth");var St=a.__name((t,e)=>{a.log.debug("Moving label abc88 ",t.id,t.label,ft[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=a.getConfig2(),{subGraphTitleTotalMargin:i}=a.getSubGraphTitleMargins(n);if(t.label){const n=ft[t.id];let s=t.x,o=t.y;if(r){const n=a.utils_default.calcLabelPosition(r);a.log.debug("Moving label "+t.label+" from (",s,",",o,") to (",n.x,",",n.y,") abc88"),e.updatedPath&&(s=n.x,o=n.y)}n.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){const e=mt[t.id].startLeft;let n=t.x,i=t.y;if(r){const e=a.utils_default.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.startLabelRight){const e=mt[t.id].startRight;let n=t.x,i=t.y;if(r){const e=a.utils_default.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelLeft){const e=mt[t.id].endLeft;let n=t.x,i=t.y;if(r){const e=a.utils_default.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelRight){const e=mt[t.id].endRight;let n=t.x,i=t.y;if(r){const e=a.utils_default.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),kt=a.__name((t,e)=>{const r=t.x,a=t.y,n=Math.abs(e.x-r),i=Math.abs(e.y-a),s=t.width/2,o=t.height/2;return n>=s||i>=o},"outsideNode"),Lt=a.__name((t,e,r)=>{a.log.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}`);const n=t.x,i=t.y,s=Math.abs(n-r.x),o=t.width/2;let l=r.x<e.x?o-s:o+s;const c=t.height/2,d=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*o>Math.abs(n-e.x)*c){let t=r.y<e.y?e.y-c-i:i-c-e.y;l=h*t/d;const n={x:r.x<e.x?r.x+l:r.x-h+l,y:r.y<e.y?r.y+d-t:r.y-d+t};return 0===l&&(n.x=e.x,n.y=e.y),0===h&&(n.x=e.x),0===d&&(n.y=e.y),a.log.debug(`abc89 topp/bott calc, Q ${d}, q ${t}, R ${h}, r ${l}`,n),n}{l=r.x<e.x?e.x-o-n:n-o-e.x;let t=d*l/h,i=r.x<e.x?r.x+h-l:r.x-h+l,s=r.y<e.y?r.y+t:r.y-t;return a.log.debug(`sides calc abc89, Q ${d}, q ${t}, R ${h}, r ${l}`,{_x:i,_y:s}),0===l&&(i=e.x,s=e.y),0===h&&(i=e.x),0===d&&(s=e.y),{x:i,y:s}}},"intersection"),vt=a.__name((t,e)=>{a.log.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(t=>{if(kt(e,t)||i)n=t,i||r.push(t);else{const a=Lt(e,n,t);let s=!1;r.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)||r.push(a),i=!0}}),r},"cutPathAtIntersect"),Et=a.__name(function(t,e,r,n,i,s,o){let l=r.points;a.log.debug("abc88 InsertEdge: edge=",r,"e=",e);let c=!1;const d=s.node(e.v);var h=s.node(e.w);(null==h?void 0:h.intersect)&&(null==d?void 0:d.intersect)&&(l=l.slice(1,r.points.length-1),l.unshift(d.intersect(l[0])),l.push(h.intersect(l[l.length-1]))),r.toCluster&&(a.log.debug("to cluster abc88",n[r.toCluster]),l=vt(r.points,n[r.toCluster].node),c=!0),r.fromCluster&&(a.log.debug("from cluster abc88",n[r.fromCluster]),l=vt(l.reverse(),n[r.fromCluster].node).reverse(),c=!0);const g=l.filter(t=>!Number.isNaN(t.y));let u=a.curveBasis;!r.curve||"graph"!==i&&"flowchart"!==i||(u=r.curve);const{x:y,y:p}=a.getLineFunctionsWithOffset(r),b=a.line().x(y).y(p).curve(u);let x;switch(r.thickness){case"normal":x="edge-thickness-normal";break;case"thick":case"invisible":x="edge-thickness-thick";break;default:x=""}switch(r.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}const f=t.append("path").attr("d",b(g)).attr("id",r.id).attr("class"," "+x+(r.classes?" "+r.classes:"")).attr("style",r.style);let m="";(a.getConfig2().flowchart.arrowMarkerAbsolute||a.getConfig2().state.arrowMarkerAbsolute)&&(m=a.getUrl(!0)),pt(f,r,m,o,i);let _={};return c&&(_.updatedPath=l),_.originalPath=r.points,_},"insertEdge"),Ct=a.__name(t=>{const 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"),Tt=a.__name((t,e,r)=>{const a=Ct(t),n=e.height+2*r.padding,i=n/2,s=e.width+2*i+r.padding,o=r.padding/2;return a.has("right")&&a.has("left")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:i,y:0},{x:s/2,y:2*o},{x:s-i,y:0},{x:s,y:0},{x:s,y:-n/3},{x:s+2*o,y:-n/2},{x:s,y:-2*n/3},{x:s,y:-n},{x:s-i,y:-n},{x:s/2,y:-n-2*o},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*o,y:-n/2},{x:0,y:-n/3}]:a.has("right")&&a.has("left")&&a.has("up")?[{x:i,y:0},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:a.has("right")&&a.has("left")&&a.has("down")?[{x:0,y:0},{x:i,y:-n},{x:s-i,y:-n},{x:s,y:0}]:a.has("right")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:s,y:-i},{x:s,y:-n+i},{x:0,y:-n}]:a.has("left")&&a.has("up")&&a.has("down")?[{x:s,y:0},{x:0,y:-i},{x:0,y:-n+i},{x:s,y:-n}]:a.has("right")&&a.has("left")?[{x:i,y:0},{x:i,y:-o},{x:s-i,y:-o},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:s-i,y:-n+o},{x:i,y:-n+o},{x:i,y:-n},{x:0,y:-n/2}]:a.has("up")&&a.has("down")?[{x:s/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-n+o},{x:0,y:-n+o},{x:s/2,y:-n},{x:s,y:-n+o},{x:s-i,y:-n+o},{x:s-i,y:-o},{x:s,y:-o}]:a.has("right")&&a.has("up")?[{x:0,y:0},{x:s,y:-i},{x:0,y:-n}]:a.has("right")&&a.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-n}]:a.has("left")&&a.has("up")?[{x:s,y:0},{x:0,y:-i},{x:s,y:-n}]:a.has("left")&&a.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-n}]:a.has("right")?[{x:i,y:-o},{x:i,y:-o},{x:s-i,y:-o},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:s-i,y:-n+o},{x:i,y:-n+o},{x:i,y:-n+o}]:a.has("left")?[{x:i,y:0},{x:i,y:-o},{x:s-i,y:-o},{x:s-i,y:-n+o},{x:i,y:-n+o},{x:i,y:-n},{x:0,y:-n/2}]:a.has("up")?[{x:i,y:-o},{x:i,y:-n+o},{x:0,y:-n+o},{x:s/2,y:-n},{x:s,y:-n+o},{x:s-i,y:-n+o},{x:s-i,y:-o}]:a.has("down")?[{x:s/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-n+o},{x:s-i,y:-n+o},{x:s-i,y:-o},{x:s,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function Dt(t,e){return t.intersect(e)}a.__name(Dt,"intersectNode");var $t=Dt;function It(t,e,r,a){var n=t.x,i=t.y,s=n-a.x,o=i-a.y,l=Math.sqrt(e*e*o*o+r*r*s*s),c=Math.abs(e*r*s/l);a.x<n&&(c=-c);var d=Math.abs(e*r*o/l);return a.y<i&&(d=-d),{x:n+c,y:i+d}}a.__name(It,"intersectEllipse");var Nt=It;function Bt(t,e,r){return Nt(t,e,e,r)}a.__name(Bt,"intersectCircle");var At=Bt;function Ot(t,e,r,a){var n,i,s,o,l,c,d,h,g,u,y,p,b;if(n=e.y-t.y,s=t.x-e.x,l=e.x*t.y-t.x*e.y,g=n*r.x+s*r.y+l,u=n*a.x+s*a.y+l,!(0!==g&&0!==u&&zt(g,u)||(i=a.y-r.y,o=r.x-a.x,c=a.x*r.y-r.x*a.y,d=i*t.x+o*t.y+c,h=i*e.x+o*e.y+c,0!==d&&0!==h&&zt(d,h)||0===(y=n*o-i*s))))return p=Math.abs(y/2),{x:(b=s*c-o*l)<0?(b-p)/y:(b+p)/y,y:(b=i*l-n*c)<0?(b-p)/y:(b+p)/y}}function zt(t,e){return t*e>0}a.__name(Ot,"intersectLine"),a.__name(zt,"sameSign");var Rt=Ot,Mt=jt;function jt(t,e,r){var a=t.x,n=t.y,i=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=a-t.width/2-s,c=n-t.height/2-o,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],u=Rt(t,r,{x:l+h.x,y:c+h.y},{x:l+g.x,y:c+g.y});u&&i.push(u)}return i.length?(i.length>1&&i.sort(function(t,e){var a=t.x-r.x,n=t.y-r.y,i=Math.sqrt(a*a+n*n),s=e.x-r.x,o=e.y-r.y,l=Math.sqrt(s*s+o*o);return i<l?-1:i===l?0:1}),i[0]):t}a.__name(jt,"intersectPolygon");var Pt={node:$t,circle:At,ellipse:Nt,polygon:Mt,rect:a.__name((t,e)=>{var r,a,n=t.x,i=t.y,s=e.x-n,o=e.y-i,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),r=0===o?0:c*s/o,a=c):(s<0&&(l=-l),r=l,a=0===s?0:l*o/s),{x:n+r,y:i+a}},"intersectRect")},Yt=a.__name(async(t,e,r,n)=>{const i=a.getConfig2();let s;const o=e.useHtmlLabels||a.evaluate(i.flowchart.htmlLabels);s=r||"node default";const l=t.insert("g").attr("class",s).attr("id",e.domId||e.id),c=l.insert("g").attr("class","label").attr("style",e.labelStyle);let d;d=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const h=c.node();let g;g="markdown"===e.labelType?a.createText(c,a.sanitizeText(a.decodeEntities(d),i),{useHtmlLabels:o,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):h.appendChild(await yt(a.sanitizeText(a.decodeEntities(d),i),e.labelStyle,!1,n));let u=g.getBBox();const y=e.padding/2;if(a.evaluate(i.flowchart.htmlLabels)){const t=g.children[0],e=a.select(g),r=t.getElementsByTagName("img");if(r){const t=""===d.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,r=5,a=parseInt(t,10)*r+"px";e.style.minWidth=a,e.style.maxWidth=a}else e.style.width="100%";r(e)}a.__name(n,"setupImage"),setTimeout(()=>{e.complete&&n()}),e.addEventListener("error",n),e.addEventListener("load",n)})))}u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}return o?c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):c.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:l,bbox:u,halfPadding:y,label:c}},"labelHelper"),Ft=a.__name((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function Ut(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+")")}a.__name(Ut,"insertPolygonShape");var Wt=a.__name(async(t,e)=>{e.useHtmlLabels||a.getConfig2().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:r,bbox:n,halfPadding:i}=await Yt(t,e,"node "+e.classes,!0);a.log.info("Classes = ",e.classes);const s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),Ft(e,s),e.intersect=function(t){return Pt.rect(e,t)},r},"note"),Xt=a.__name(t=>t?" "+t:"","formatClass"),Ht=a.__name((t,e)=>`${e||"node default"}${Xt(t.classes)} ${Xt(t.class)}`,"getClassesFromNode"),Kt=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Yt(t,e,Ht(e,void 0),!0),i=n.width+e.padding+(n.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];a.log.info("Question main (Circle)");const o=Ut(r,i,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return a.log.warn("Intersect called"),Pt.polygon(e,s,t)},r},"question"),qt=a.__name((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",a.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 Pt.circle(e,14,t)},r},"choice"),Zt=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.height+e.padding,i=n/4,s=a.width+2*i+e.padding,o=[{x:i,y:0},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}],l=Ut(r,s,n,o);return l.attr("style",e.style),Ft(e,l),e.intersect=function(t){return Pt.polygon(e,o,t)},r},"hexagon"),Gt=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,void 0,!0),n=a.height+2*e.padding,i=n/2,s=a.width+2*i+e.padding,o=Tt(e.directions,a,e),l=Ut(r,s,n,o);return l.attr("style",e.style),Ft(e,l),e.intersect=function(t){return Pt.polygon(e,o,t)},r},"block_arrow"),Vt=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return Ut(r,n,i,s).attr("style",e.style),e.width=n+i,e.height=i,e.intersect=function(t){return Pt.polygon(e,s,t)},r},"rect_left_inv_arrow"),Jt=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:-2*i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:i/6,y:-i}],o=Ut(r,n,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return Pt.polygon(e,s,t)},r},"lean_right"),Qt=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:2*i/6,y:0},{x:n+i/6,y:0},{x:n-2*i/6,y:-i},{x:-i/6,y:-i}],o=Ut(r,n,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return Pt.polygon(e,s,t)},r},"lean_left"),te=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:-2*i/6,y:0},{x:n+2*i/6,y:0},{x:n-i/6,y:-i},{x:i/6,y:-i}],o=Ut(r,n,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return Pt.polygon(e,s,t)},r},"trapezoid"),ee=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=Ut(r,n,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return Pt.polygon(e,s,t)},r},"inv_trapezoid"),re=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],o=Ut(r,n,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return Pt.polygon(e,s,t)},r},"rect_right_inv_arrow"),ae=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=n/2,s=i/(2.5+n/50),o=a.height+s+e.padding,l="M 0,"+s+" a "+i+","+s+" 0,0,0 "+n+" 0 a "+i+","+s+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+i+","+s+" 0,0,0 "+n+" 0 l 0,"+-o,c=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+s)+")");return Ft(e,c),e.intersect=function(t){const r=Pt.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,t.y-e.y>0&&(n=-n),r.y+=n}return r},r},"cylinder"),ne=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await Yt(t,e,"node "+e.classes+" "+e.class,!0),s=r.insert("rect",":first-child"),o=e.positioned?e.width:n.width+e.padding,l=e.positioned?e.height:n.height+e.padding,c=e.positioned?-o/2:-n.width/2-i,d=e.positioned?-l/2:-n.height/2-i;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",o).attr("height",l),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(oe(s,e.props.borders,o,l),t.delete("borders")),t.forEach(t=>{a.log.warn(`Unknown node property ${t}`)})}return Ft(e,s),e.intersect=function(t){return Pt.rect(e,t)},r},"rect"),ie=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await Yt(t,e,"node "+e.classes,!0),s=r.insert("rect",":first-child"),o=e.positioned?e.width:n.width+e.padding,l=e.positioned?e.height:n.height+e.padding,c=e.positioned?-o/2:-n.width/2-i,d=e.positioned?-l/2:-n.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",o).attr("height",l),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(oe(s,e.props.borders,o,l),t.delete("borders")),t.forEach(t=>{a.log.warn(`Unknown node property ${t}`)})}return Ft(e,s),e.intersect=function(t){return Pt.rect(e,t)},r},"composite"),se=a.__name(async(t,e)=>{const{shapeSvg:r}=await Yt(t,e,"label",!0);a.log.trace("Classes = ",e.class);const n=r.insert("rect",":first-child");if(n.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(oe(n,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{a.log.warn(`Unknown node property ${t}`)})}return Ft(e,n),e.intersect=function(t){return Pt.rect(e,t)},r},"labelRect");function oe(t,e,r,n){const i=[],s=a.__name(t=>{i.push(t,0)},"addBorder"),o=a.__name(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(a.log.debug("add top border"),s(r)):o(r),e.includes("r")?(a.log.debug("add right border"),s(n)):o(n),e.includes("b")?(a.log.debug("add bottom border"),s(r)):o(r),e.includes("l")?(a.log.debug("add left border"),s(n)):o(n),t.attr("stroke-dasharray",i.join(" "))}a.__name(oe,"applyNodePropertyBorders");var le=a.__name(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),s=n.insert("line"),o=n.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText;let c="";c="object"==typeof l?l[0]:l,a.log.info("Label text abc79",c,l,"object"==typeof l);const d=o.node().appendChild(await yt(c,e.labelStyle,!0,!0));let h={width:0,height:0};if(a.evaluate(a.getConfig2().flowchart.htmlLabels)){const t=d.children[0],e=a.select(d);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}a.log.info("Text 2",l);const g=l.slice(1,l.length);let u=d.getBBox();const y=o.node().appendChild(await yt(g.join?g.join("<br/>"):g,e.labelStyle,!0,!0));if(a.evaluate(a.getConfig2().flowchart.htmlLabels)){const t=y.children[0],e=a.select(y);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}const p=e.padding/2;return a.select(y).attr("transform","translate( "+(h.width>u.width?0:(u.width-h.width)/2)+", "+(u.height+p+5)+")"),a.select(d).attr("transform","translate( "+(h.width<u.width?0:-(u.width-h.width)/2)+", 0)"),h=o.node().getBBox(),o.attr("transform","translate("+-h.width/2+", "+(-h.height/2-p+3)+")"),i.attr("class","outer title-state").attr("x",-h.width/2-p).attr("y",-h.height/2-p).attr("width",h.width+e.padding).attr("height",h.height+e.padding),s.attr("class","divider").attr("x1",-h.width/2-p).attr("x2",h.width/2+p).attr("y1",-h.height/2-p+u.height+p).attr("y2",-h.height/2-p+u.height+p),Ft(e,i),e.intersect=function(t){return Pt.rect(e,t)},n},"rectWithTitle"),ce=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.height+e.padding,i=a.width+n/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-i/2).attr("y",-n/2).attr("width",i).attr("height",n);return Ft(e,s),e.intersect=function(t){return Pt.rect(e,t)},r},"stadium"),de=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await Yt(t,e,Ht(e,void 0),!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),a.log.info("Circle main"),Ft(e,s),e.intersect=function(t){return a.log.info("Circle intersect",e,n.width/2+i,t),Pt.circle(e,n.width/2+i,t)},r},"circle"),he=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await Yt(t,e,Ht(e,void 0),!0),s=r.insert("g",":first-child"),o=s.insert("circle"),l=s.insert("circle");return s.attr("class",e.class),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),a.log.info("DoubleCircle main"),Ft(e,o),e.intersect=function(t){return a.log.info("DoubleCircle intersect",e,n.width/2+i+5,t),Pt.circle(e,n.width/2+i+5,t)},r},"doublecircle"),ge=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=Ut(r,n,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return Pt.polygon(e,s,t)},r},"subroutine"),ue=a.__name((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Ft(e,a),e.intersect=function(t){return Pt.circle(e,7,t)},r},"start"),ye=a.__name((t,e,r)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n=70,i=10;"LR"===r&&(n=10,i=70);const s=a.append("rect").attr("x",-1*n/2).attr("y",-1*i/2).attr("width",n).attr("height",i).attr("class","fork-join");return Ft(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Pt.rect(e,t)},a},"forkJoin"),pe={rhombus:Kt,composite:ie,question:Kt,rect:ne,labelRect:se,rectWithTitle:le,choice:qt,circle:de,doublecircle:he,stadium:ce,hexagon:Zt,block_arrow:Gt,rect_left_inv_arrow:Vt,lean_right:Jt,lean_left:Qt,trapezoid:te,inv_trapezoid:ee,rect_right_inv_arrow:re,cylinder:ae,start:ue,end:a.__name((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Ft(e,n),e.intersect=function(t){return Pt.circle(e,7,t)},r},"end"),note:Wt,subroutine:ge,fork:ye,join:ye,class_box:a.__name(async(t,e)=>{var r;const n=e.padding/2;let i;i=e.classes?"node "+e.classes:"node default";const s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=s.insert("rect",":first-child"),l=s.insert("line"),c=s.insert("line");let d=0,h=4;const g=s.insert("g").attr("class","label");let u=0;const y=null==(r=e.classData.annotations)?void 0:r[0],p=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",b=g.node().appendChild(await yt(p,e.labelStyle,!0,!0));let x=b.getBBox();if(a.evaluate(a.getConfig2().flowchart.htmlLabels)){const t=b.children[0],e=a.select(b);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}e.classData.annotations[0]&&(h+=x.height+4,d+=x.width);let f=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&(a.getConfig2().flowchart.htmlLabels?f+="<"+e.classData.type+">":f+="<"+e.classData.type+">");const m=g.node().appendChild(await yt(f,e.labelStyle,!0,!0));a.select(m).attr("class","classTitle");let _=m.getBBox();if(a.evaluate(a.getConfig2().flowchart.htmlLabels)){const t=m.children[0],e=a.select(m);_=t.getBoundingClientRect(),e.attr("width",_.width),e.attr("height",_.height)}h+=_.height+4,_.width>d&&(d=_.width);const w=[];e.classData.members.forEach(async t=>{const r=t.getDisplayDetails();let n=r.displayText;a.getConfig2().flowchart.htmlLabels&&(n=n.replace(/</g,"<").replace(/>/g,">"));const i=g.node().appendChild(await yt(n,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let s=i.getBBox();if(a.evaluate(a.getConfig2().flowchart.htmlLabels)){const t=i.children[0],e=a.select(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>d&&(d=s.width),h+=s.height+4,w.push(i)}),h+=8;const S=[];if(e.classData.methods.forEach(async t=>{const r=t.getDisplayDetails();let n=r.displayText;a.getConfig2().flowchart.htmlLabels&&(n=n.replace(/</g,"<").replace(/>/g,">"));const i=g.node().appendChild(await yt(n,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let s=i.getBBox();if(a.evaluate(a.getConfig2().flowchart.htmlLabels)){const t=i.children[0],e=a.select(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>d&&(d=s.width),h+=s.height+4,S.push(i)}),h+=8,y){let t=(d-x.width)/2;a.select(b).attr("transform","translate( "+(-1*d/2+t)+", "+-1*h/2+")"),u=x.height+4}let k=(d-_.width)/2;return a.select(m).attr("transform","translate( "+(-1*d/2+k)+", "+(-1*h/2+u)+")"),u+=_.height+4,l.attr("class","divider").attr("x1",-d/2-n).attr("x2",d/2+n).attr("y1",-h/2-n+8+u).attr("y2",-h/2-n+8+u),u+=8,w.forEach(t=>{a.select(t).attr("transform","translate( "+-d/2+", "+(-1*h/2+u+4)+")");const e=null==t?void 0:t.getBBox();u+=((null==e?void 0:e.height)??0)+4}),u+=8,c.attr("class","divider").attr("x1",-d/2-n).attr("x2",d/2+n).attr("y1",-h/2-n+8+u).attr("y2",-h/2-n+8+u),u+=8,S.forEach(t=>{a.select(t).attr("transform","translate( "+-d/2+", "+(-1*h/2+u)+")");const e=null==t?void 0:t.getBBox();u+=((null==e?void 0:e.height)??0)+4}),o.attr("style",e.style).attr("class","outer title-state").attr("x",-d/2-n).attr("y",-h/2-n).attr("width",d+e.padding).attr("height",h+e.padding),Ft(e,o),e.intersect=function(t){return Pt.rect(e,t)},s},"class_box")},be={},xe=a.__name(async(t,e,r)=>{let n,i;if(e.link){let s;"sandbox"===a.getConfig2().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await pe[e.shape](n,e,r)}else i=await pe[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),be[e.id]=n,e.haveCallback&&be[e.id].attr("class",be[e.id].attr("class")+" clickable"),n},"insertNode"),fe=a.__name(t=>{const e=be[t.id];a.log.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=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 me(t,e,r=!1){var n,i,s;const o=t;let l="default";((null==(n=null==o?void 0:o.classes)?void 0:n.length)||0)>0&&(l=((null==o?void 0:o.classes)??[]).join(" ")),l+=" flowchart-label";let c,d=0,h="";switch(o.type){case"round":d=5,h="rect";break;case"composite":d=0,h="composite",c=0;break;case"square":case"group":default:h="rect";break;case"diamond":h="question";break;case"hexagon":h="hexagon";break;case"block_arrow":h="block_arrow";break;case"odd":case"rect_left_inv_arrow":h="rect_left_inv_arrow";break;case"lean_right":h="lean_right";break;case"lean_left":h="lean_left";break;case"trapezoid":h="trapezoid";break;case"inv_trapezoid":h="inv_trapezoid";break;case"circle":h="circle";break;case"ellipse":h="ellipse";break;case"stadium":h="stadium";break;case"subroutine":h="subroutine";break;case"cylinder":h="cylinder";break;case"doublecircle":h="doublecircle"}const g=a.getStylesFromArray((null==o?void 0:o.styles)??[]),u=o.label,y=o.size??{width:0,height:0,x:0,y:0};return{labelStyle:g.labelStyle,shape:h,labelText:u,rx:d,ry:d,class:l,style:g.style,id:o.id,directions:o.directions,width:y.width,height:y.height,x:y.x,y:y.y,positioned:r,intersect:void 0,type:o.type,padding:c??(null==(s=null==(i=a.getConfig())?void 0:i.block)?void 0:s.padding)??0}}async function _e(t,e,r){const n=me(e,0,!1);if("group"===n.type)return;const i=a.getConfig(),s=await xe(t,n,{config:i}),o=s.node().getBBox(),l=r.getBlock(n.id);l.size={width:o.width,height:o.height,x:0,y:0,node:s},r.setBlock(l),s.remove()}async function we(t,e,r){const n=me(e,0,!0);if("space"!==r.getBlock(n.id).type){const r=a.getConfig();await xe(t,n,{config:r}),e.intersect=null==n?void 0:n.intersect,fe(n)}}async function Se(t,e,r,a){for(const n of e)await a(t,n,r),n.children&&await Se(t,n.children,r,a)}async function ke(t,e,r){await Se(t,e,r,_e)}async function Le(t,e,r){await Se(t,e,r,we)}async function ve(t,e,r,a,n){const s=new i.Graph({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const i of r)i.size&&s.setNode(i.id,{width:i.size.width,height:i.size.height,intersect:i.intersect});for(const i of e)if(i.start&&i.end){const e=a.getBlock(i.start),r=a.getBlock(i.end);if((null==e?void 0:e.size)&&(null==r?void 0:r.size)){const a=e.size,o=r.size,l=[{x:a.x,y:a.y},{x:a.x+(o.x-a.x)/2,y:a.y+(o.y-a.y)/2},{x:o.x,y:o.y}];Et(t,{v:i.start,w:i.end,name:i.id},{...i,arrowTypeEnd:i.arrowTypeEnd,arrowTypeStart:i.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",s,n),i.label&&(await _t(t,{...i,label:i.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:i.arrowTypeEnd,arrowTypeStart:i.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),St({...i,x:l[1].x,y:l[1].y},{originalPath:l}))}}}a.__name(me,"getNodeFromBlock"),a.__name(_e,"calculateBlockSize"),a.__name(we,"insertBlockPositioned"),a.__name(Se,"performOperations"),a.__name(ke,"calculateBlockSizes"),a.__name(Le,"insertBlocks"),a.__name(ve,"insertEdges");var Ee=a.__name(function(t,e){return e.db.getClasses()},"getClasses"),Ce={parser:k,db:Q,renderer:{draw:a.__name(async function(t,e,r,n){const{securityLevel:i,block:s}=a.getConfig(),o=n.db;let l;"sandbox"===i&&(l=a.select("#i"+e));const c="sandbox"===i?a.select(l.nodes()[0].contentDocument.body):a.select("body"),d="sandbox"===i?c.select(`[id="${e}"]`):a.select(`[id="${e}"]`);nt(d,["point","circle","cross"],n.type,e);const h=o.getBlocks(),g=o.getBlocksFlat(),u=o.getEdges(),y=d.insert("g").attr("class","block");await ke(y,h,o);const p=ht(o);if(await Le(y,h,o),await ve(y,u,g,o,e),p){const t=p,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,n=t.width+10,{useMaxWidth:i}=s;a.configureSvgSize(d,r,n,!!i),a.log.debug("Here Bounds",p,t),d.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},"draw"),getClasses:Ee},styles:et};exports.diagram=Ce;
|
|
2
|
-
//# sourceMappingURL=blockDiagram-VD42YOAC-
|
|
1
|
+
"use strict";var t,e;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./chunk-FMBD7UC4-BQChMkqq.cjs"),a=require("./index-CAoOhLkP.cjs"),n=require("./_arrayEach-BtnPcZvU.cjs"),i=require("./graph-C7xixGrW.cjs"),s=require("./channel-CavBJovq.cjs");var o=Object.prototype.hasOwnProperty;var l=/\w*$/;var c=a.Symbol?a.Symbol.prototype:void 0,d=c?c.valueOf:void 0;function h(t,e,r){var n,i,s,o,c,h=t.constructor;switch(e){case"[object ArrayBuffer]":return a.cloneArrayBuffer(t);case"[object Boolean]":case"[object Date]":return new h(+t);case"[object DataView]":return c=(o=t).buffer,new o.constructor(c,o.byteOffset,o.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a.cloneTypedArray(t,r);case"[object Map]":case"[object Set]":return new h;case"[object Number]":case"[object String]":return new h(t);case"[object RegExp]":return(s=new(i=t).constructor(i.source,l.exec(i))).lastIndex=i.lastIndex,s;case"[object Symbol]":return n=t,d?Object(d.call(n)):{}}}var g=a.nodeUtil&&a.nodeUtil.isMap,u=g?a.baseUnary(g):function(t){return a.isObjectLike(t)&&"[object Map]"==a.getTag(t)};var y=a.nodeUtil&&a.nodeUtil.isSet,p=y?a.baseUnary(y):function(t){return a.isObjectLike(t)&&"[object Set]"==a.getTag(t)},b="[object Arguments]",x="[object Function]",f="[object Object]",m={};function _(t,e,r,i,s,l){var c,d=1&e;if(void 0!==c)return c;if(!a.isObject(t))return t;var g=a.isArray(t);if(g)return c=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&o.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),a.copyArray(t,c);var y=a.getTag(t),w=y==x||"[object GeneratorFunction]"==y;if(a.isBuffer(t))return a.cloneBuffer(t,d);if(y==f||y==b||w&&!s)return c=w?{}:a.initCloneObject(t),function(t,e){return a.copyObject(t,n.getSymbols(t),e)}(t,function(t,e){return t&&a.copyObject(e,n.keys(e),t)}(c,t));if(!m[y])return s?t:{};c=h(t,y,d),l||(l=new a.Stack);var S=l.get(t);if(S)return S;l.set(t,c),p(t)?t.forEach(function(a){c.add(_(a,e,r,a,t,l))}):u(t)&&t.forEach(function(a,n){c.set(n,_(a,e,r,n,t,l))});var k=n.getAllKeys,L=g?void 0:k(t);return n.arrayEach(L||t,function(n,i){L&&(n=t[i=n]),a.assignValue(c,i,_(n,e,r,i,t,l))}),c}m[b]=m["[object Array]"]=m["[object ArrayBuffer]"]=m["[object DataView]"]=m["[object Boolean]"]=m["[object Date]"]=m["[object Float32Array]"]=m["[object Float64Array]"]=m["[object Int8Array]"]=m["[object Int16Array]"]=m["[object Int32Array]"]=m["[object Map]"]=m["[object Number]"]=m[f]=m["[object RegExp]"]=m["[object Set]"]=m["[object String]"]=m["[object Symbol]"]=m["[object Uint8Array]"]=m["[object Uint8ClampedArray]"]=m["[object Uint16Array]"]=m["[object Uint32Array]"]=!0,m["[object Error]"]=m[x]=m["[object WeakMap]"]=!1;function w(t){return _(t,4)}var S=function(){var t=a.__name(function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r},"o"),e=[1,15],r=[1,7],n=[1,13],i=[1,14],s=[1,19],o=[1,16],l=[1,17],c=[1,18],d=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],u=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],b=[1,49],x={trace:a.__name(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:a.__name(function(t,e,r,a,n,i,s){var o=i.length-1;switch(n){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: ",i[o-1]),a.setHierarchy(i[o-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: ",i[o]),"number"==typeof i[o].length?this.$=i[o]:this.$=[i[o]];break;case 13:a.getLogger().debug("Rule: statement #2: ",i[o-1]),this.$=[i[o-1]].concat(i[o]);break;case 14:a.getLogger().debug("Rule: link: ",i[o],t),this.$={edgeTypeStr:i[o],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",i[o-3],i[o-1],i[o]),this.$={edgeTypeStr:i[o],label:i[o-1]};break;case 18:const e=parseInt(i[o]),r=a.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",i[o-2],i[o-1],i[o]," typestr: ",i[o-1].edgeTypeStr);const n=a.edgeStrToEdgeData(i[o-1].edgeTypeStr);this.$=[{id:i[o-2].id,label:i[o-2].label,type:i[o-2].type,directions:i[o-2].directions},{id:i[o-2].id+"-"+i[o].id,start:i[o-2].id,end:i[o].id,label:i[o-1].label,type:"edge",directions:i[o].directions,arrowTypeEnd:n,arrowTypeStart:"arrow_open"},{id:i[o].id,label:i[o].label,type:a.typeStr2Type(i[o].typeStr),directions:i[o].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",i[o-1],i[o]),this.$={id:i[o-1].id,label:i[o-1].label,type:a.typeStr2Type(i[o-1].typeStr),directions:i[o-1].directions,widthInColumns:parseInt(i[o],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",i[o]),this.$={id:i[o].id,label:i[o].label,type:a.typeStr2Type(i[o].typeStr),directions:i[o].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",i[o]),this.$={type:"column-setting",columns:"auto"===i[o]?-1:parseInt(i[o])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",i[o-2],i[o-1]),a.generateId(),this.$={...i[o-2],type:"composite",children:i[o-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",i[o-2],i[o-1],i[o]);const s=a.generateId();this.$={id:s,type:"composite",label:"",children:i[o-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",i[o]),this.$={id:i[o]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",i[o-1],i[o]),this.$={id:i[o-1],label:i[o].label,typeStr:i[o].typeStr,directions:i[o].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",i[o]),this.$=[i[o]];break;case 32:a.getLogger().debug("Rule: dirList: ",i[o-1],i[o]),this.$=[i[o-1]].concat(i[o]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",i[o-2],i[o-1],i[o]),this.$={typeStr:i[o-2]+i[o],label:i[o-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",i[o-3],i[o-2]," #3:",i[o-1],i[o]),this.$={typeStr:i[o-3]+i[o],label:i[o-2],directions:i[o-1]};break;case 35:case 36:this.$={type:"classDef",id:i[o-1].trim(),css:i[o].trim()};break;case 37:this.$={type:"applyClass",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 38:this.$={type:"applyStyles",id:i[o-1].trim(),stylesStr:i[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:s,39:o,43:l,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:e,21:r,28:n,29:i,31:s,39:o,43:l,46:c}),t(h,[2,16],{14:22,15:g,16:u}),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(y,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:s},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:s,39:o,43:l,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(y,[2,24]),{10:e,11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:s,39:o,43:l,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(p,[2,30]),{18:[1,43]},{18:[1,44]},t(y,[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:b},{15:[1,50]},t(h,[2,27]),t(p,[2,33]),{38:[1,51]},{33:52,34:b,38:[2,31]},{31:[2,15]},t(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:a.__name(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:a.__name(function(t){var e=this,r=[0],n=[],i=[null],s=[],o=this.table,l="",c=0,d=0,h=s.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(u.yy[y]=this.yy[y]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var p=g.yylloc;s.push(p);var b=g.options&&g.options.ranges;function x(){var t;return"number"!=typeof(t=n.pop()||g.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a.__name(function(t){r.length=r.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),a.__name(x,"lex");for(var f,m,_,w,S,k,L,v,E={};;){if(m=r[r.length-1],this.defaultActions[m]?_=this.defaultActions[m]:(null==f&&(f=x()),_=o[m]&&o[m][f]),void 0===_||!_.length||!_[0]){var C="";for(S in v=[],o[m])this.terminals_[S]&&S>2&&v.push("'"+this.terminals_[S]+"'");C=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(C,{text:g.match,token:this.terminals_[f]||f,line:g.yylineno,loc:p,expected:v})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(_[0]){case 1:r.push(f),i.push(g.yytext),s.push(g.yylloc),r.push(_[1]),f=null,d=g.yyleng,l=g.yytext,c=g.yylineno,p=g.yylloc;break;case 2:if(k=this.productions_[_[1]][1],E.$=i[i.length-k],E._$={first_line:s[s.length-(k||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(k||1)].first_column,last_column:s[s.length-1].last_column},b&&(E._$.range=[s[s.length-(k||1)].range[0],s[s.length-1].range[1]]),void 0!==(w=this.performAction.apply(E,[l,d,c,u.yy,_[1],i,s].concat(h))))return w;k&&(r=r.slice(0,-1*k*2),i=i.slice(0,-1*k),s=s.slice(0,-1*k)),r.push(this.productions_[_[1]][0]),i.push(E.$),s.push(E._$),L=o[r[r.length-2]][r[r.length-1]],r.push(L);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:a.__name(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:a.__name(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.__name(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.__name(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=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);var n=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===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[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.__name(function(){return this._more=!0,this},"more"),reject:a.__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:a.__name(function(t){this.unput(this.match.slice(t))},"less"),pastInput:a.__name(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a.__name(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a.__name(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:a.__name(function(t,e){var r,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],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 n)this[i]=n[i];return!1}return!1},"test_match"),next:a.__name(function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),i=0;i<n.length;i++)if((r=this._input.match(this.rules[n[i]]))&&(!e||r[0].length>e[0].length)){if(e=r,a=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[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:a.__name(function(){var t=this.next();return t||this.lex()},"lex"),begin:a.__name(function(t){this.conditionStack.push(t)},"begin"),popState:a.__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a.__name(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a.__name(function(t){this.begin(t)},"pushState"),stateStackSize:a.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a.__name(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 m(){this.yy={}}return x.lexer=f,a.__name(m,"Parser"),m.prototype=x,x.Parser=m,new m}();S.parser=S;var k=S,L=new Map,v=[],E=new Map,C="color",T="fill",D=a.getConfig2(),$=new Map,I=a.__name(t=>a.common_default.sanitizeText(t,D),"sanitizeText"),N=a.__name(function(t,e=""){let r=$.get(t);r||(r={id:t,styles:[],textStyles:[]},$.set(t,r)),null!=e&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(C).exec(t)){const t=e.replace(T,"bgFill").replace(C,T);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),B=a.__name(function(t,e=""){const r=L.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),A=a.__name(function(t,e){t.split(",").forEach(function(t){let r=L.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},L.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),O=a.__name((t,e)=>{const r=t.flat(),n=[],i=r.find(t=>"column-setting"===(null==t?void 0:t.type)),s=(null==i?void 0:i.columns)??-1;for(const o of r)if("number"==typeof s&&s>0&&"column-setting"!==o.type&&"number"==typeof o.widthInColumns&&o.widthInColumns>s&&a.log.warn(`Block ${o.id} width ${o.widthInColumns} exceeds configured column width ${s}`),o.label&&(o.label=I(o.label)),"classDef"!==o.type)if("applyClass"!==o.type)if("applyStyles"!==o.type)if("column-setting"===o.type)e.columns=o.columns??-1;else if("edge"===o.type){const t=(E.get(o.id)??0)+1;E.set(o.id,t),o.id=t+"-"+o.id,v.push(o)}else{o.label||("composite"===o.type?o.label="":o.label=o.id);const t=L.get(o.id);if(void 0===t?L.set(o.id,o):("na"!==o.type&&(t.type=o.type),o.label!==o.id&&(t.label=o.label)),o.children&&O(o.children,o),"space"===o.type){const t=o.width??1;for(let e=0;e<t;e++){const t=w(o);t.id=t.id+"-"+e,L.set(t.id,t),n.push(t)}}else void 0===t&&n.push(o)}else(null==o?void 0:o.stylesStr)&&B(o.id,null==o?void 0:o.stylesStr);else A(o.id,(null==o?void 0:o.styleClass)??"");else N(o.id,o.css);e.children=n},"populateBlockDatabase"),z=[],R={id:"root",type:"composite",children:[],columns:-1},M=a.__name(()=>{a.log.debug("Clear called"),a.clear(),R={id:"root",type:"composite",children:[],columns:-1},L=new Map([["root",R]]),z=[],$=new Map,v=[],E=new Map},"clear");function j(t){switch(a.log.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return a.log.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function P(t){return a.log.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function Y(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}a.__name(j,"typeStr2Type"),a.__name(P,"edgeTypeStr2Type"),a.__name(Y,"edgeStrToEdgeData");var F=0,U=a.__name(()=>(F++,"id-"+Math.random().toString(36).substr(2,12)+"-"+F),"generateId"),W=a.__name(t=>{R.children=t,O(t,R),z=R.children},"setHierarchy"),X=a.__name(t=>{const e=L.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),H=a.__name(()=>[...L.values()],"getBlocksFlat"),K=a.__name(()=>z||[],"getBlocks"),q=a.__name(()=>v,"getEdges"),Z=a.__name(t=>L.get(t),"getBlock"),G=a.__name(t=>{L.set(t.id,t)},"setBlock"),V=a.__name(()=>a.log,"getLogger"),J=a.__name(function(){return $},"getClasses"),Q={getConfig:a.__name(()=>a.getConfig().block,"getConfig"),typeStr2Type:j,edgeTypeStr2Type:P,edgeStrToEdgeData:Y,getLogger:V,getBlocksFlat:H,getBlocks:K,getEdges:q,setHierarchy:W,getBlock:Z,setBlock:G,getColumns:X,getClasses:J,clear:M,generateId:U},tt=a.__name((t,e)=>{const r=s.channel,n=r(t,"r"),i=r(t,"g"),o=r(t,"b");return a.rgba(n,i,o,e)},"fade"),et=a.__name(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.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: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${tt(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${tt(t.mainBkg,.5)};\n fill: ${tt(t.clusterBkg,.5)};\n stroke: ${tt(t.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: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.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: ${t.textColor};\n }\n ${r.getIconStyles()}\n`,"getStyles"),rt=a.__name((t,e,r,a)=>{e.forEach(e=>{at[e](t,r,a)})},"insertMarkers"),at={extension:a.__name((t,e,r)=>{a.log.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:a.__name((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:a.__name((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:a.__name((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:a.__name((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:a.__name((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:a.__name((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:a.__name((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:a.__name((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")},nt=rt,it=(null==(e=null==(t=a.getConfig2())?void 0:t.block)?void 0:e.padding)??8;function st(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);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}a.__name(st,"calculateBlockPosition");var ot=a.__name(t=>{let e=0,r=0;for(const n of t.children){const{width:i,height:s,x:o,y:l}=n.size??{width:0,height:0,x:0,y:0};a.log.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",s,"x:",o,"y:",l,n.type),"space"!==n.type&&(i>e&&(e=i/(t.widthInColumns??1)),s>r&&(r=s))}return{width:e,height:r}},"getMaxChildSize");function lt(t,e,r=0,n=0){var i,s,o,l,c,d,h,g,u,y,p;a.log.debug("setBlockSizes abc95 (start)",t.id,null==(i=null==t?void 0:t.size)?void 0:i.x,"block width =",null==t?void 0:t.size,"siblingWidth",r),(null==(s=null==t?void 0:t.size)?void 0:s.width)||(t.size={width:r,height:n,x:0,y:0});let b=0,x=0;if((null==(o=t.children)?void 0:o.length)>0){for(const r of t.children)lt(r,e);const i=ot(t);b=i.width,x=i.height,a.log.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",b,x);for(const e of t.children)e.size&&(a.log.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${b} ${x} ${JSON.stringify(e.size)}`),e.size.width=b*(e.widthInColumns??1)+it*((e.widthInColumns??1)-1),e.size.height=x,e.size.x=0,e.size.y=0,a.log.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${b} maxHeight:${x}`));for(const r of t.children)lt(r,e,b,x);const s=t.columns??-1;let o=0;for(const e of t.children)o+=e.widthInColumns??1;let g=t.children.length;s>0&&s<o&&(g=s);const u=Math.ceil(o/g);let y=g*(b+it)+it,p=u*(x+it)+it;if(y<r){a.log.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${n} width ${y}`),y=r,p=n;const e=(r-g*it-it)/g,i=(n-u*it-it)/u;a.log.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",b),a.log.debug("Size indata abc88",t.id,"childHeight",i,"maxHeight",x),a.log.debug("Size indata abc88 xSize",g,"padding",it);for(const r of t.children)r.size&&(r.size.width=e,r.size.height=i,r.size.x=0,r.size.y=0)}if(a.log.debug(`abc95 (finale calc) ${t.id} xSize ${g} ySize ${u} columns ${s}${t.children.length} width=${Math.max(y,(null==(l=t.size)?void 0:l.width)||0)}`),y<((null==(c=null==t?void 0:t.size)?void 0:c.width)||0)){y=(null==(d=null==t?void 0:t.size)?void 0:d.width)||0;const e=s>0?Math.min(t.children.length,s):t.children.length;if(e>0){const r=(y-e*it-it)/e;a.log.debug("abc95 (growing to fit) width",t.id,y,null==(h=t.size)?void 0:h.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:y,height:p,x:0,y:0}}a.log.debug("setBlockSizes abc94 (done)",t.id,null==(g=null==t?void 0:t.size)?void 0:g.x,null==(u=null==t?void 0:t.size)?void 0:u.width,null==(y=null==t?void 0:t.size)?void 0:y.y,null==(p=null==t?void 0:t.size)?void 0:p.height)}function ct(t,e){var r,n,i,s,o,l,c,d,h,g,u,y,p,b,x,f,m;a.log.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${null==(r=null==t?void 0:t.size)?void 0:r.x} y: ${null==(n=null==t?void 0:t.size)?void 0:n.y} width: ${null==(i=null==t?void 0:t.size)?void 0:i.width}`);const _=t.columns??-1;if(a.log.debug("layoutBlocks columns abc95",t.id,"=>",_,t),t.children&&t.children.length>0){const e=(null==(o=null==(s=null==t?void 0:t.children[0])?void 0:s.size)?void 0:o.width)??0,r=t.children.length*e+(t.children.length-1)*it;a.log.debug("widthOfChildren 88",r,"posX");let n=0;a.log.debug("abc91 block?.size?.x",t.id,null==(l=null==t?void 0:t.size)?void 0:l.x);let i=(null==(c=null==t?void 0:t.size)?void 0:c.x)?(null==(d=null==t?void 0:t.size)?void 0:d.x)+(-(null==(h=null==t?void 0:t.size)?void 0:h.width)/2||0):-it,x=0;for(const s of t.children){const e=t;if(!s.size)continue;const{width:r,height:o}=s.size,{px:l,py:c}=st(_,n);if(c!=x&&(x=c,i=(null==(g=null==t?void 0:t.size)?void 0:g.x)?(null==(u=null==t?void 0:t.size)?void 0:u.x)+(-(null==(y=null==t?void 0:t.size)?void 0:y.width)/2||0):-it,a.log.debug("New row in layout for block",t.id," and child ",s.id,x)),a.log.debug(`abc89 layout blocks (child) id: ${s.id} Pos: ${n} (px, py) ${l},${c} (${null==(p=null==e?void 0:e.size)?void 0:p.x},${null==(b=null==e?void 0:e.size)?void 0:b.y}) parent: ${e.id} width: ${r}${it}`),e.size){const t=r/2;s.size.x=i+it+t,a.log.debug(`abc91 layout blocks (calc) px, pyid:${s.id} startingPos=X${i} new startingPosX${s.size.x} ${t} padding=${it} width=${r} halfWidth=${t} => x:${s.size.x} y:${s.size.y} ${s.widthInColumns} (width * (child?.w || 1)) / 2 ${r*((null==s?void 0:s.widthInColumns)??1)/2}`),i=s.size.x+t,s.size.y=e.size.y-e.size.height/2+c*(o+it)+o/2+it,a.log.debug(`abc88 layout blocks (calc) px, pyid:${s.id}startingPosX${i}${it}${t}=>x:${s.size.x}y:${s.size.y}${s.widthInColumns}(width * (child?.w || 1)) / 2${r*((null==s?void 0:s.widthInColumns)??1)/2}`)}s.children&&ct(s);let d=(null==s?void 0:s.widthInColumns)??1;_>0&&(d=Math.min(d,_-n%_)),n+=d,a.log.debug("abc88 columnsPos",s,n)}}a.log.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${null==(x=null==t?void 0:t.size)?void 0:x.x} y: ${null==(f=null==t?void 0:t.size)?void 0:f.y} width: ${null==(m=null==t?void 0:t.size)?void 0:m.width}`)}function dt(t,{minX:e,minY:r,maxX:a,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:i,y:s,width:o,height:l}=t.size;i-o/2<e&&(e=i-o/2),s-l/2<r&&(r=s-l/2),i+o/2>a&&(a=i+o/2),s+l/2>n&&(n=s+l/2)}if(t.children)for(const i of t.children)({minX:e,minY:r,maxX:a,maxY:n}=dt(i,{minX:e,minY:r,maxX:a,maxY:n}));return{minX:e,minY:r,maxX:a,maxY:n}}function ht(t){const e=t.getBlock("root");if(!e)return;lt(e,t,0,0),ct(e),a.log.debug("getBlocks",JSON.stringify(e,null,2));const{minX:r,minY:n,maxX:i,maxY:s}=dt(e);return{x:r,y:n,width:i-r,height:s-n}}function gt(t,e){e&&t.attr("style",e)}function ut(t,e){const r=a.select(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=r.append("xhtml:div"),i=t.label,s=t.isNode?"nodeLabel":"edgeLabel",o=n.append("span");return o.html(a.sanitizeText(i,e)),gt(o,t.labelStyle),o.attr("class",s),gt(n,t.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}a.__name(lt,"setBlockSizes"),a.__name(ct,"layoutBlocks"),a.__name(dt,"findBounds"),a.__name(ht,"layout"),a.__name(gt,"applyStyle"),a.__name(ut,"addHtmlLabel");var yt=a.__name(async(t,e,r,n)=>{let i=t||"";"object"==typeof i&&(i=i[0]);const s=a.getConfig2();if(a.evaluate(s.flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),a.log.debug("vertexText"+i);return ut({isNode:n,label:await a.replaceIconSubstring(a.decodeEntities(i)),labelStyle:e.replace("fill:","color:")},s)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let a=[];a="string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[];for(const e of a){const a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),r?a.setAttribute("class","title-row"):a.setAttribute("class","row"),a.textContent=e.trim(),t.appendChild(a)}return t}},"createLabel"),pt=a.__name((t,e,r,a,n)=>{e.arrowTypeStart&&xt(t,"start",e.arrowTypeStart,r,a,n),e.arrowTypeEnd&&xt(t,"end",e.arrowTypeEnd,r,a,n)},"addEdgeMarkers"),bt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},xt=a.__name((t,e,r,n,i,s)=>{const o=bt[r];if(!o)return void a.log.warn(`Unknown arrow type: ${r}`);const l="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${s}-${o}${l})`)},"addEdgeMarker"),ft={},mt={},_t=a.__name(async(t,e)=>{const r=a.getConfig2(),n=a.evaluate(r.flowchart.htmlLabels),i="markdown"===e.labelType?a.createText(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):await yt(e.label,e.labelStyle),s=t.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label");o.node().appendChild(i);let l,c=i.getBBox();if(n){const t=i.children[0],e=a.select(i);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}if(o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),ft[e.id]=s,e.width=c.width,e.height=c.height,e.startLabelLeft){const r=await yt(e.startLabelLeft,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner");l=n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),mt[e.id]||(mt[e.id]={}),mt[e.id].startLeft=a,wt(l,e.startLabelLeft)}if(e.startLabelRight){const r=await yt(e.startLabelRight,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner");l=a.node().appendChild(r),n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),mt[e.id]||(mt[e.id]={}),mt[e.id].startRight=a,wt(l,e.startLabelRight)}if(e.endLabelLeft){const r=await yt(e.endLabelLeft,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner");l=n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),a.node().appendChild(r),mt[e.id]||(mt[e.id]={}),mt[e.id].endLeft=a,wt(l,e.endLabelLeft)}if(e.endLabelRight){const r=await yt(e.endLabelRight,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner");l=n.node().appendChild(r);const i=r.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),a.node().appendChild(r),mt[e.id]||(mt[e.id]={}),mt[e.id].endRight=a,wt(l,e.endLabelRight)}return i},"insertEdgeLabel");function wt(t,e){a.getConfig2().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}a.__name(wt,"setTerminalWidth");var St=a.__name((t,e)=>{a.log.debug("Moving label abc88 ",t.id,t.label,ft[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=a.getConfig2(),{subGraphTitleTotalMargin:i}=a.getSubGraphTitleMargins(n);if(t.label){const n=ft[t.id];let s=t.x,o=t.y;if(r){const n=a.utils_default.calcLabelPosition(r);a.log.debug("Moving label "+t.label+" from (",s,",",o,") to (",n.x,",",n.y,") abc88"),e.updatedPath&&(s=n.x,o=n.y)}n.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){const e=mt[t.id].startLeft;let n=t.x,i=t.y;if(r){const e=a.utils_default.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.startLabelRight){const e=mt[t.id].startRight;let n=t.x,i=t.y;if(r){const e=a.utils_default.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelLeft){const e=mt[t.id].endLeft;let n=t.x,i=t.y;if(r){const e=a.utils_default.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelRight){const e=mt[t.id].endRight;let n=t.x,i=t.y;if(r){const e=a.utils_default.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),kt=a.__name((t,e)=>{const r=t.x,a=t.y,n=Math.abs(e.x-r),i=Math.abs(e.y-a),s=t.width/2,o=t.height/2;return n>=s||i>=o},"outsideNode"),Lt=a.__name((t,e,r)=>{a.log.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}`);const n=t.x,i=t.y,s=Math.abs(n-r.x),o=t.width/2;let l=r.x<e.x?o-s:o+s;const c=t.height/2,d=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*o>Math.abs(n-e.x)*c){let t=r.y<e.y?e.y-c-i:i-c-e.y;l=h*t/d;const n={x:r.x<e.x?r.x+l:r.x-h+l,y:r.y<e.y?r.y+d-t:r.y-d+t};return 0===l&&(n.x=e.x,n.y=e.y),0===h&&(n.x=e.x),0===d&&(n.y=e.y),a.log.debug(`abc89 topp/bott calc, Q ${d}, q ${t}, R ${h}, r ${l}`,n),n}{l=r.x<e.x?e.x-o-n:n-o-e.x;let t=d*l/h,i=r.x<e.x?r.x+h-l:r.x-h+l,s=r.y<e.y?r.y+t:r.y-t;return a.log.debug(`sides calc abc89, Q ${d}, q ${t}, R ${h}, r ${l}`,{_x:i,_y:s}),0===l&&(i=e.x,s=e.y),0===h&&(i=e.x),0===d&&(s=e.y),{x:i,y:s}}},"intersection"),vt=a.__name((t,e)=>{a.log.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(t=>{if(kt(e,t)||i)n=t,i||r.push(t);else{const a=Lt(e,n,t);let s=!1;r.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)||r.push(a),i=!0}}),r},"cutPathAtIntersect"),Et=a.__name(function(t,e,r,n,i,s,o){let l=r.points;a.log.debug("abc88 InsertEdge: edge=",r,"e=",e);let c=!1;const d=s.node(e.v);var h=s.node(e.w);(null==h?void 0:h.intersect)&&(null==d?void 0:d.intersect)&&(l=l.slice(1,r.points.length-1),l.unshift(d.intersect(l[0])),l.push(h.intersect(l[l.length-1]))),r.toCluster&&(a.log.debug("to cluster abc88",n[r.toCluster]),l=vt(r.points,n[r.toCluster].node),c=!0),r.fromCluster&&(a.log.debug("from cluster abc88",n[r.fromCluster]),l=vt(l.reverse(),n[r.fromCluster].node).reverse(),c=!0);const g=l.filter(t=>!Number.isNaN(t.y));let u=a.curveBasis;!r.curve||"graph"!==i&&"flowchart"!==i||(u=r.curve);const{x:y,y:p}=a.getLineFunctionsWithOffset(r),b=a.line().x(y).y(p).curve(u);let x;switch(r.thickness){case"normal":x="edge-thickness-normal";break;case"thick":case"invisible":x="edge-thickness-thick";break;default:x=""}switch(r.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}const f=t.append("path").attr("d",b(g)).attr("id",r.id).attr("class"," "+x+(r.classes?" "+r.classes:"")).attr("style",r.style);let m="";(a.getConfig2().flowchart.arrowMarkerAbsolute||a.getConfig2().state.arrowMarkerAbsolute)&&(m=a.getUrl(!0)),pt(f,r,m,o,i);let _={};return c&&(_.updatedPath=l),_.originalPath=r.points,_},"insertEdge"),Ct=a.__name(t=>{const 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"),Tt=a.__name((t,e,r)=>{const a=Ct(t),n=e.height+2*r.padding,i=n/2,s=e.width+2*i+r.padding,o=r.padding/2;return a.has("right")&&a.has("left")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:i,y:0},{x:s/2,y:2*o},{x:s-i,y:0},{x:s,y:0},{x:s,y:-n/3},{x:s+2*o,y:-n/2},{x:s,y:-2*n/3},{x:s,y:-n},{x:s-i,y:-n},{x:s/2,y:-n-2*o},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*o,y:-n/2},{x:0,y:-n/3}]:a.has("right")&&a.has("left")&&a.has("up")?[{x:i,y:0},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:a.has("right")&&a.has("left")&&a.has("down")?[{x:0,y:0},{x:i,y:-n},{x:s-i,y:-n},{x:s,y:0}]:a.has("right")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:s,y:-i},{x:s,y:-n+i},{x:0,y:-n}]:a.has("left")&&a.has("up")&&a.has("down")?[{x:s,y:0},{x:0,y:-i},{x:0,y:-n+i},{x:s,y:-n}]:a.has("right")&&a.has("left")?[{x:i,y:0},{x:i,y:-o},{x:s-i,y:-o},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:s-i,y:-n+o},{x:i,y:-n+o},{x:i,y:-n},{x:0,y:-n/2}]:a.has("up")&&a.has("down")?[{x:s/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-n+o},{x:0,y:-n+o},{x:s/2,y:-n},{x:s,y:-n+o},{x:s-i,y:-n+o},{x:s-i,y:-o},{x:s,y:-o}]:a.has("right")&&a.has("up")?[{x:0,y:0},{x:s,y:-i},{x:0,y:-n}]:a.has("right")&&a.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-n}]:a.has("left")&&a.has("up")?[{x:s,y:0},{x:0,y:-i},{x:s,y:-n}]:a.has("left")&&a.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-n}]:a.has("right")?[{x:i,y:-o},{x:i,y:-o},{x:s-i,y:-o},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:s-i,y:-n+o},{x:i,y:-n+o},{x:i,y:-n+o}]:a.has("left")?[{x:i,y:0},{x:i,y:-o},{x:s-i,y:-o},{x:s-i,y:-n+o},{x:i,y:-n+o},{x:i,y:-n},{x:0,y:-n/2}]:a.has("up")?[{x:i,y:-o},{x:i,y:-n+o},{x:0,y:-n+o},{x:s/2,y:-n},{x:s,y:-n+o},{x:s-i,y:-n+o},{x:s-i,y:-o}]:a.has("down")?[{x:s/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-n+o},{x:s-i,y:-n+o},{x:s-i,y:-o},{x:s,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function Dt(t,e){return t.intersect(e)}a.__name(Dt,"intersectNode");var $t=Dt;function It(t,e,r,a){var n=t.x,i=t.y,s=n-a.x,o=i-a.y,l=Math.sqrt(e*e*o*o+r*r*s*s),c=Math.abs(e*r*s/l);a.x<n&&(c=-c);var d=Math.abs(e*r*o/l);return a.y<i&&(d=-d),{x:n+c,y:i+d}}a.__name(It,"intersectEllipse");var Nt=It;function Bt(t,e,r){return Nt(t,e,e,r)}a.__name(Bt,"intersectCircle");var At=Bt;function Ot(t,e,r,a){var n,i,s,o,l,c,d,h,g,u,y,p,b;if(n=e.y-t.y,s=t.x-e.x,l=e.x*t.y-t.x*e.y,g=n*r.x+s*r.y+l,u=n*a.x+s*a.y+l,!(0!==g&&0!==u&&zt(g,u)||(i=a.y-r.y,o=r.x-a.x,c=a.x*r.y-r.x*a.y,d=i*t.x+o*t.y+c,h=i*e.x+o*e.y+c,0!==d&&0!==h&&zt(d,h)||0===(y=n*o-i*s))))return p=Math.abs(y/2),{x:(b=s*c-o*l)<0?(b-p)/y:(b+p)/y,y:(b=i*l-n*c)<0?(b-p)/y:(b+p)/y}}function zt(t,e){return t*e>0}a.__name(Ot,"intersectLine"),a.__name(zt,"sameSign");var Rt=Ot,Mt=jt;function jt(t,e,r){var a=t.x,n=t.y,i=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=a-t.width/2-s,c=n-t.height/2-o,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],u=Rt(t,r,{x:l+h.x,y:c+h.y},{x:l+g.x,y:c+g.y});u&&i.push(u)}return i.length?(i.length>1&&i.sort(function(t,e){var a=t.x-r.x,n=t.y-r.y,i=Math.sqrt(a*a+n*n),s=e.x-r.x,o=e.y-r.y,l=Math.sqrt(s*s+o*o);return i<l?-1:i===l?0:1}),i[0]):t}a.__name(jt,"intersectPolygon");var Pt={node:$t,circle:At,ellipse:Nt,polygon:Mt,rect:a.__name((t,e)=>{var r,a,n=t.x,i=t.y,s=e.x-n,o=e.y-i,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),r=0===o?0:c*s/o,a=c):(s<0&&(l=-l),r=l,a=0===s?0:l*o/s),{x:n+r,y:i+a}},"intersectRect")},Yt=a.__name(async(t,e,r,n)=>{const i=a.getConfig2();let s;const o=e.useHtmlLabels||a.evaluate(i.flowchart.htmlLabels);s=r||"node default";const l=t.insert("g").attr("class",s).attr("id",e.domId||e.id),c=l.insert("g").attr("class","label").attr("style",e.labelStyle);let d;d=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const h=c.node();let g;g="markdown"===e.labelType?a.createText(c,a.sanitizeText(a.decodeEntities(d),i),{useHtmlLabels:o,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):h.appendChild(await yt(a.sanitizeText(a.decodeEntities(d),i),e.labelStyle,!1,n));let u=g.getBBox();const y=e.padding/2;if(a.evaluate(i.flowchart.htmlLabels)){const t=g.children[0],e=a.select(g),r=t.getElementsByTagName("img");if(r){const t=""===d.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,r=5,a=parseInt(t,10)*r+"px";e.style.minWidth=a,e.style.maxWidth=a}else e.style.width="100%";r(e)}a.__name(n,"setupImage"),setTimeout(()=>{e.complete&&n()}),e.addEventListener("error",n),e.addEventListener("load",n)})))}u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}return o?c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):c.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:l,bbox:u,halfPadding:y,label:c}},"labelHelper"),Ft=a.__name((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function Ut(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+")")}a.__name(Ut,"insertPolygonShape");var Wt=a.__name(async(t,e)=>{e.useHtmlLabels||a.getConfig2().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:r,bbox:n,halfPadding:i}=await Yt(t,e,"node "+e.classes,!0);a.log.info("Classes = ",e.classes);const s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),Ft(e,s),e.intersect=function(t){return Pt.rect(e,t)},r},"note"),Xt=a.__name(t=>t?" "+t:"","formatClass"),Ht=a.__name((t,e)=>`${e||"node default"}${Xt(t.classes)} ${Xt(t.class)}`,"getClassesFromNode"),Kt=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Yt(t,e,Ht(e,void 0),!0),i=n.width+e.padding+(n.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];a.log.info("Question main (Circle)");const o=Ut(r,i,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return a.log.warn("Intersect called"),Pt.polygon(e,s,t)},r},"question"),qt=a.__name((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",a.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 Pt.circle(e,14,t)},r},"choice"),Zt=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.height+e.padding,i=n/4,s=a.width+2*i+e.padding,o=[{x:i,y:0},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}],l=Ut(r,s,n,o);return l.attr("style",e.style),Ft(e,l),e.intersect=function(t){return Pt.polygon(e,o,t)},r},"hexagon"),Gt=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,void 0,!0),n=a.height+2*e.padding,i=n/2,s=a.width+2*i+e.padding,o=Tt(e.directions,a,e),l=Ut(r,s,n,o);return l.attr("style",e.style),Ft(e,l),e.intersect=function(t){return Pt.polygon(e,o,t)},r},"block_arrow"),Vt=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return Ut(r,n,i,s).attr("style",e.style),e.width=n+i,e.height=i,e.intersect=function(t){return Pt.polygon(e,s,t)},r},"rect_left_inv_arrow"),Jt=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:-2*i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:i/6,y:-i}],o=Ut(r,n,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return Pt.polygon(e,s,t)},r},"lean_right"),Qt=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:2*i/6,y:0},{x:n+i/6,y:0},{x:n-2*i/6,y:-i},{x:-i/6,y:-i}],o=Ut(r,n,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return Pt.polygon(e,s,t)},r},"lean_left"),te=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:-2*i/6,y:0},{x:n+2*i/6,y:0},{x:n-i/6,y:-i},{x:i/6,y:-i}],o=Ut(r,n,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return Pt.polygon(e,s,t)},r},"trapezoid"),ee=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=Ut(r,n,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return Pt.polygon(e,s,t)},r},"inv_trapezoid"),re=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],o=Ut(r,n,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return Pt.polygon(e,s,t)},r},"rect_right_inv_arrow"),ae=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=n/2,s=i/(2.5+n/50),o=a.height+s+e.padding,l="M 0,"+s+" a "+i+","+s+" 0,0,0 "+n+" 0 a "+i+","+s+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+i+","+s+" 0,0,0 "+n+" 0 l 0,"+-o,c=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+s)+")");return Ft(e,c),e.intersect=function(t){const r=Pt.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,t.y-e.y>0&&(n=-n),r.y+=n}return r},r},"cylinder"),ne=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await Yt(t,e,"node "+e.classes+" "+e.class,!0),s=r.insert("rect",":first-child"),o=e.positioned?e.width:n.width+e.padding,l=e.positioned?e.height:n.height+e.padding,c=e.positioned?-o/2:-n.width/2-i,d=e.positioned?-l/2:-n.height/2-i;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",o).attr("height",l),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(oe(s,e.props.borders,o,l),t.delete("borders")),t.forEach(t=>{a.log.warn(`Unknown node property ${t}`)})}return Ft(e,s),e.intersect=function(t){return Pt.rect(e,t)},r},"rect"),ie=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await Yt(t,e,"node "+e.classes,!0),s=r.insert("rect",":first-child"),o=e.positioned?e.width:n.width+e.padding,l=e.positioned?e.height:n.height+e.padding,c=e.positioned?-o/2:-n.width/2-i,d=e.positioned?-l/2:-n.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",o).attr("height",l),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(oe(s,e.props.borders,o,l),t.delete("borders")),t.forEach(t=>{a.log.warn(`Unknown node property ${t}`)})}return Ft(e,s),e.intersect=function(t){return Pt.rect(e,t)},r},"composite"),se=a.__name(async(t,e)=>{const{shapeSvg:r}=await Yt(t,e,"label",!0);a.log.trace("Classes = ",e.class);const n=r.insert("rect",":first-child");if(n.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(oe(n,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{a.log.warn(`Unknown node property ${t}`)})}return Ft(e,n),e.intersect=function(t){return Pt.rect(e,t)},r},"labelRect");function oe(t,e,r,n){const i=[],s=a.__name(t=>{i.push(t,0)},"addBorder"),o=a.__name(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(a.log.debug("add top border"),s(r)):o(r),e.includes("r")?(a.log.debug("add right border"),s(n)):o(n),e.includes("b")?(a.log.debug("add bottom border"),s(r)):o(r),e.includes("l")?(a.log.debug("add left border"),s(n)):o(n),t.attr("stroke-dasharray",i.join(" "))}a.__name(oe,"applyNodePropertyBorders");var le=a.__name(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),s=n.insert("line"),o=n.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText;let c="";c="object"==typeof l?l[0]:l,a.log.info("Label text abc79",c,l,"object"==typeof l);const d=o.node().appendChild(await yt(c,e.labelStyle,!0,!0));let h={width:0,height:0};if(a.evaluate(a.getConfig2().flowchart.htmlLabels)){const t=d.children[0],e=a.select(d);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}a.log.info("Text 2",l);const g=l.slice(1,l.length);let u=d.getBBox();const y=o.node().appendChild(await yt(g.join?g.join("<br/>"):g,e.labelStyle,!0,!0));if(a.evaluate(a.getConfig2().flowchart.htmlLabels)){const t=y.children[0],e=a.select(y);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}const p=e.padding/2;return a.select(y).attr("transform","translate( "+(h.width>u.width?0:(u.width-h.width)/2)+", "+(u.height+p+5)+")"),a.select(d).attr("transform","translate( "+(h.width<u.width?0:-(u.width-h.width)/2)+", 0)"),h=o.node().getBBox(),o.attr("transform","translate("+-h.width/2+", "+(-h.height/2-p+3)+")"),i.attr("class","outer title-state").attr("x",-h.width/2-p).attr("y",-h.height/2-p).attr("width",h.width+e.padding).attr("height",h.height+e.padding),s.attr("class","divider").attr("x1",-h.width/2-p).attr("x2",h.width/2+p).attr("y1",-h.height/2-p+u.height+p).attr("y2",-h.height/2-p+u.height+p),Ft(e,i),e.intersect=function(t){return Pt.rect(e,t)},n},"rectWithTitle"),ce=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.height+e.padding,i=a.width+n/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-i/2).attr("y",-n/2).attr("width",i).attr("height",n);return Ft(e,s),e.intersect=function(t){return Pt.rect(e,t)},r},"stadium"),de=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await Yt(t,e,Ht(e,void 0),!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),a.log.info("Circle main"),Ft(e,s),e.intersect=function(t){return a.log.info("Circle intersect",e,n.width/2+i,t),Pt.circle(e,n.width/2+i,t)},r},"circle"),he=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await Yt(t,e,Ht(e,void 0),!0),s=r.insert("g",":first-child"),o=s.insert("circle"),l=s.insert("circle");return s.attr("class",e.class),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),a.log.info("DoubleCircle main"),Ft(e,o),e.intersect=function(t){return a.log.info("DoubleCircle intersect",e,n.width/2+i+5,t),Pt.circle(e,n.width/2+i+5,t)},r},"doublecircle"),ge=a.__name(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Yt(t,e,Ht(e,void 0),!0),n=a.width+e.padding,i=a.height+e.padding,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=Ut(r,n,i,s);return o.attr("style",e.style),Ft(e,o),e.intersect=function(t){return Pt.polygon(e,s,t)},r},"subroutine"),ue=a.__name((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Ft(e,a),e.intersect=function(t){return Pt.circle(e,7,t)},r},"start"),ye=a.__name((t,e,r)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n=70,i=10;"LR"===r&&(n=10,i=70);const s=a.append("rect").attr("x",-1*n/2).attr("y",-1*i/2).attr("width",n).attr("height",i).attr("class","fork-join");return Ft(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Pt.rect(e,t)},a},"forkJoin"),pe={rhombus:Kt,composite:ie,question:Kt,rect:ne,labelRect:se,rectWithTitle:le,choice:qt,circle:de,doublecircle:he,stadium:ce,hexagon:Zt,block_arrow:Gt,rect_left_inv_arrow:Vt,lean_right:Jt,lean_left:Qt,trapezoid:te,inv_trapezoid:ee,rect_right_inv_arrow:re,cylinder:ae,start:ue,end:a.__name((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Ft(e,n),e.intersect=function(t){return Pt.circle(e,7,t)},r},"end"),note:Wt,subroutine:ge,fork:ye,join:ye,class_box:a.__name(async(t,e)=>{var r;const n=e.padding/2;let i;i=e.classes?"node "+e.classes:"node default";const s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=s.insert("rect",":first-child"),l=s.insert("line"),c=s.insert("line");let d=0,h=4;const g=s.insert("g").attr("class","label");let u=0;const y=null==(r=e.classData.annotations)?void 0:r[0],p=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",b=g.node().appendChild(await yt(p,e.labelStyle,!0,!0));let x=b.getBBox();if(a.evaluate(a.getConfig2().flowchart.htmlLabels)){const t=b.children[0],e=a.select(b);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}e.classData.annotations[0]&&(h+=x.height+4,d+=x.width);let f=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&(a.getConfig2().flowchart.htmlLabels?f+="<"+e.classData.type+">":f+="<"+e.classData.type+">");const m=g.node().appendChild(await yt(f,e.labelStyle,!0,!0));a.select(m).attr("class","classTitle");let _=m.getBBox();if(a.evaluate(a.getConfig2().flowchart.htmlLabels)){const t=m.children[0],e=a.select(m);_=t.getBoundingClientRect(),e.attr("width",_.width),e.attr("height",_.height)}h+=_.height+4,_.width>d&&(d=_.width);const w=[];e.classData.members.forEach(async t=>{const r=t.getDisplayDetails();let n=r.displayText;a.getConfig2().flowchart.htmlLabels&&(n=n.replace(/</g,"<").replace(/>/g,">"));const i=g.node().appendChild(await yt(n,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let s=i.getBBox();if(a.evaluate(a.getConfig2().flowchart.htmlLabels)){const t=i.children[0],e=a.select(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>d&&(d=s.width),h+=s.height+4,w.push(i)}),h+=8;const S=[];if(e.classData.methods.forEach(async t=>{const r=t.getDisplayDetails();let n=r.displayText;a.getConfig2().flowchart.htmlLabels&&(n=n.replace(/</g,"<").replace(/>/g,">"));const i=g.node().appendChild(await yt(n,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let s=i.getBBox();if(a.evaluate(a.getConfig2().flowchart.htmlLabels)){const t=i.children[0],e=a.select(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>d&&(d=s.width),h+=s.height+4,S.push(i)}),h+=8,y){let t=(d-x.width)/2;a.select(b).attr("transform","translate( "+(-1*d/2+t)+", "+-1*h/2+")"),u=x.height+4}let k=(d-_.width)/2;return a.select(m).attr("transform","translate( "+(-1*d/2+k)+", "+(-1*h/2+u)+")"),u+=_.height+4,l.attr("class","divider").attr("x1",-d/2-n).attr("x2",d/2+n).attr("y1",-h/2-n+8+u).attr("y2",-h/2-n+8+u),u+=8,w.forEach(t=>{a.select(t).attr("transform","translate( "+-d/2+", "+(-1*h/2+u+4)+")");const e=null==t?void 0:t.getBBox();u+=((null==e?void 0:e.height)??0)+4}),u+=8,c.attr("class","divider").attr("x1",-d/2-n).attr("x2",d/2+n).attr("y1",-h/2-n+8+u).attr("y2",-h/2-n+8+u),u+=8,S.forEach(t=>{a.select(t).attr("transform","translate( "+-d/2+", "+(-1*h/2+u)+")");const e=null==t?void 0:t.getBBox();u+=((null==e?void 0:e.height)??0)+4}),o.attr("style",e.style).attr("class","outer title-state").attr("x",-d/2-n).attr("y",-h/2-n).attr("width",d+e.padding).attr("height",h+e.padding),Ft(e,o),e.intersect=function(t){return Pt.rect(e,t)},s},"class_box")},be={},xe=a.__name(async(t,e,r)=>{let n,i;if(e.link){let s;"sandbox"===a.getConfig2().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await pe[e.shape](n,e,r)}else i=await pe[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),be[e.id]=n,e.haveCallback&&be[e.id].attr("class",be[e.id].attr("class")+" clickable"),n},"insertNode"),fe=a.__name(t=>{const e=be[t.id];a.log.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=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 me(t,e,r=!1){var n,i,s;const o=t;let l="default";((null==(n=null==o?void 0:o.classes)?void 0:n.length)||0)>0&&(l=((null==o?void 0:o.classes)??[]).join(" ")),l+=" flowchart-label";let c,d=0,h="";switch(o.type){case"round":d=5,h="rect";break;case"composite":d=0,h="composite",c=0;break;case"square":case"group":default:h="rect";break;case"diamond":h="question";break;case"hexagon":h="hexagon";break;case"block_arrow":h="block_arrow";break;case"odd":case"rect_left_inv_arrow":h="rect_left_inv_arrow";break;case"lean_right":h="lean_right";break;case"lean_left":h="lean_left";break;case"trapezoid":h="trapezoid";break;case"inv_trapezoid":h="inv_trapezoid";break;case"circle":h="circle";break;case"ellipse":h="ellipse";break;case"stadium":h="stadium";break;case"subroutine":h="subroutine";break;case"cylinder":h="cylinder";break;case"doublecircle":h="doublecircle"}const g=a.getStylesFromArray((null==o?void 0:o.styles)??[]),u=o.label,y=o.size??{width:0,height:0,x:0,y:0};return{labelStyle:g.labelStyle,shape:h,labelText:u,rx:d,ry:d,class:l,style:g.style,id:o.id,directions:o.directions,width:y.width,height:y.height,x:y.x,y:y.y,positioned:r,intersect:void 0,type:o.type,padding:c??(null==(s=null==(i=a.getConfig())?void 0:i.block)?void 0:s.padding)??0}}async function _e(t,e,r){const n=me(e,0,!1);if("group"===n.type)return;const i=a.getConfig(),s=await xe(t,n,{config:i}),o=s.node().getBBox(),l=r.getBlock(n.id);l.size={width:o.width,height:o.height,x:0,y:0,node:s},r.setBlock(l),s.remove()}async function we(t,e,r){const n=me(e,0,!0);if("space"!==r.getBlock(n.id).type){const r=a.getConfig();await xe(t,n,{config:r}),e.intersect=null==n?void 0:n.intersect,fe(n)}}async function Se(t,e,r,a){for(const n of e)await a(t,n,r),n.children&&await Se(t,n.children,r,a)}async function ke(t,e,r){await Se(t,e,r,_e)}async function Le(t,e,r){await Se(t,e,r,we)}async function ve(t,e,r,a,n){const s=new i.Graph({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const i of r)i.size&&s.setNode(i.id,{width:i.size.width,height:i.size.height,intersect:i.intersect});for(const i of e)if(i.start&&i.end){const e=a.getBlock(i.start),r=a.getBlock(i.end);if((null==e?void 0:e.size)&&(null==r?void 0:r.size)){const a=e.size,o=r.size,l=[{x:a.x,y:a.y},{x:a.x+(o.x-a.x)/2,y:a.y+(o.y-a.y)/2},{x:o.x,y:o.y}];Et(t,{v:i.start,w:i.end,name:i.id},{...i,arrowTypeEnd:i.arrowTypeEnd,arrowTypeStart:i.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",s,n),i.label&&(await _t(t,{...i,label:i.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:i.arrowTypeEnd,arrowTypeStart:i.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),St({...i,x:l[1].x,y:l[1].y},{originalPath:l}))}}}a.__name(me,"getNodeFromBlock"),a.__name(_e,"calculateBlockSize"),a.__name(we,"insertBlockPositioned"),a.__name(Se,"performOperations"),a.__name(ke,"calculateBlockSizes"),a.__name(Le,"insertBlocks"),a.__name(ve,"insertEdges");var Ee=a.__name(function(t,e){return e.db.getClasses()},"getClasses"),Ce={parser:k,db:Q,renderer:{draw:a.__name(async function(t,e,r,n){const{securityLevel:i,block:s}=a.getConfig(),o=n.db;let l;"sandbox"===i&&(l=a.select("#i"+e));const c="sandbox"===i?a.select(l.nodes()[0].contentDocument.body):a.select("body"),d="sandbox"===i?c.select(`[id="${e}"]`):a.select(`[id="${e}"]`);nt(d,["point","circle","cross"],n.type,e);const h=o.getBlocks(),g=o.getBlocksFlat(),u=o.getEdges(),y=d.insert("g").attr("class","block");await ke(y,h,o);const p=ht(o);if(await Le(y,h,o),await ve(y,u,g,o,e),p){const t=p,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,n=t.width+10,{useMaxWidth:i}=s;a.configureSvgSize(d,r,n,!!i),a.log.debug("Here Bounds",p,t),d.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},"draw"),getClasses:Ee},styles:et};exports.diagram=Ce;
|
|
2
|
+
//# sourceMappingURL=blockDiagram-VD42YOAC-B-_xQI8-.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var _a, _b;
|
|
2
|
-
import { g as getIconStyles } from "./chunk-FMBD7UC4-
|
|
3
|
-
import { aH as copyObject, aI as Symbol$1, aJ as cloneTypedArray, aK as cloneArrayBuffer, aL as isObjectLike, aM as getTag, aN as baseUnary, aO as nodeUtil, aP as isObject, aQ as copyArray, aR as isBuffer, aS as cloneBuffer, aT as initCloneObject, aU as Stack, aD as isArray, aV as assignValue, _ as __name, G as getConfig, d as select, e as configureSvgSize, l as log, z as clear, B as rgba, c as getConfig2, aW as getLineFunctionsWithOffset, a9 as line, aa as curveBasis, a6 as getUrl, aX as evaluate, az as createText, as as getSubGraphTitleMargins, u as utils_default, k as common_default, aY as replaceIconSubstring, aZ as decodeEntities, i as sanitizeText, a_ as getStylesFromArray } from "./index-
|
|
4
|
-
import { k as keys, g as getSymbols, a as getAllKeys, b as arrayEach } from "./_arrayEach-
|
|
2
|
+
import { g as getIconStyles } from "./chunk-FMBD7UC4-CCEhBtde.js";
|
|
3
|
+
import { aH as copyObject, aI as Symbol$1, aJ as cloneTypedArray, aK as cloneArrayBuffer, aL as isObjectLike, aM as getTag, aN as baseUnary, aO as nodeUtil, aP as isObject, aQ as copyArray, aR as isBuffer, aS as cloneBuffer, aT as initCloneObject, aU as Stack, aD as isArray, aV as assignValue, _ as __name, G as getConfig, d as select, e as configureSvgSize, l as log, z as clear, B as rgba, c as getConfig2, aW as getLineFunctionsWithOffset, a9 as line, aa as curveBasis, a6 as getUrl, aX as evaluate, az as createText, as as getSubGraphTitleMargins, u as utils_default, k as common_default, aY as replaceIconSubstring, aZ as decodeEntities, i as sanitizeText, a_ as getStylesFromArray } from "./index-vFWWvdca.js";
|
|
4
|
+
import { k as keys, g as getSymbols, a as getAllKeys, b as arrayEach } from "./_arrayEach-8mS77K-T.js";
|
|
5
5
|
import { G as Graph } from "./graph-DH3cnEko.js";
|
|
6
|
-
import { c as channel } from "./channel-
|
|
6
|
+
import { c as channel } from "./channel-BlDl0fWH.js";
|
|
7
7
|
function baseAssign(object, source) {
|
|
8
8
|
return object && copyObject(source, keys(source), object);
|
|
9
9
|
}
|
|
@@ -3753,4 +3753,4 @@ var diagram = {
|
|
|
3753
3753
|
export {
|
|
3754
3754
|
diagram
|
|
3755
3755
|
};
|
|
3756
|
-
//# sourceMappingURL=blockDiagram-VD42YOAC-
|
|
3756
|
+
//# sourceMappingURL=blockDiagram-VD42YOAC-BmLAe2UB.js.map
|